summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>1998-01-10 23:00:07 +0000
committercvs2svn <cvs2svn@FreeBSD.org>1998-01-10 23:00:07 +0000
commit7c6e96080c4fb49bf912942804477d202a53396c (patch)
tree876b1afcb203be407dbb2ddfc69653f78b8680c2 /lib
parent1a06f650e6ca43e02260e8d252597fbed2cea73e (diff)
downloadFreeBSD-src-7c6e96080c4fb49bf912942804477d202a53396c.zip
FreeBSD-src-7c6e96080c4fb49bf912942804477d202a53396c.tar.gz
This commit was manufactured by cvs2svn to create branch 'JB'.
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile54
-rw-r--r--lib/Makefile.inc3
-rw-r--r--lib/compat/Makefile16
-rw-r--r--lib/compat/Makefile.inc3
-rw-r--r--lib/compat/compat1x/Makefile27
-rw-r--r--lib/compat/compat1x/libc.so.1.1.gz.uu3921
-rw-r--r--lib/compat/compat1x/libcurses.so.1.1.gz.uu428
-rw-r--r--lib/compat/compat1x/libf2c.so.1.1.gz.uu787
-rw-r--r--lib/compat/compat1x/libg++.so.1.1.gz.uu3530
-rw-r--r--lib/compat/compat1x/libgcc.so.1.1.gz.uu133
-rw-r--r--lib/compat/compat1x/libgnumalloc.so.1.1.gz.uu142
-rw-r--r--lib/compat/compat1x/libgnuregex.so.1.1.gz.uu270
-rw-r--r--lib/compat/compat1x/libln.so.1.1.gz.uu13
-rw-r--r--lib/compat/compat1x/libm.so.1.1.gz.uu538
-rw-r--r--lib/compat/compat1x/libmalloc.so.1.1.gz.uu183
-rw-r--r--lib/compat/compat1x/libreadline.so.1.1.gz.uu1117
-rw-r--r--lib/compat/compat1x/libresolv.so.1.1.gz.uu153
-rw-r--r--lib/compat/compat1x/librpcsvc.so.1.1.gz.uu165
-rw-r--r--lib/compat/compat1x/libskey.so.1.1.gz.uu247
-rw-r--r--lib/compat/compat1x/libtelnet.so.1.1.gz.uu63
-rw-r--r--lib/compat/compat1x/libtermcap.so.1.1.gz.uu75
-rw-r--r--lib/compat/compat1x/libutil.so.1.1.gz.uu208
-rw-r--r--lib/compat/compat1x/liby.so.1.1.gz.uu18
-rw-r--r--lib/compat/compat20/Makefile23
-rw-r--r--lib/compat/compat20/libdialog.so.2.0.gz.uu486
-rw-r--r--lib/compat/compat20/libforms.so.2.0.gz.uu78
-rw-r--r--lib/compat/compat20/libg++.so.2.0.gz.uu4306
-rw-r--r--lib/compat/compat20/libgcc.so.261.0.gz.uu174
-rw-r--r--lib/compat/compat20/libncurses.so.2.0.gz.uu562
-rw-r--r--lib/compat/compat20/libreadline.so.2.0.gz.uu1199
-rw-r--r--lib/compat/compat21/Makefile22
-rw-r--r--lib/compat/compat21/libc.so.2.2.gz.uu4566
-rw-r--r--lib/compat/compat21/libg++.so.3.0.gz.uu4253
-rw-r--r--lib/compat/compat21/libgmp.so.2.0.gz.uu426
-rw-r--r--lib/csu/i386/Makefile57
-rw-r--r--lib/csu/i386/c++rt0.c107
-rw-r--r--lib/csu/i386/crt0.c438
-rw-r--r--lib/csu/i386/dlfcn.h60
-rw-r--r--lib/csu/i386/dlopen.3236
-rw-r--r--lib/libF77/F77_aloc.c32
-rw-r--r--lib/libF77/Notice23
-rw-r--r--lib/libF77/README108
-rw-r--r--lib/libF77/Version.c49
-rw-r--r--lib/libF77/abort_.c18
-rw-r--r--lib/libF77/c_abs.c14
-rw-r--r--lib/libF77/c_cos.c17
-rw-r--r--lib/libF77/c_div.c37
-rw-r--r--lib/libF77/c_exp.c19
-rw-r--r--lib/libF77/c_log.c17
-rw-r--r--lib/libF77/c_sin.c17
-rw-r--r--lib/libF77/c_sqrt.c35
-rw-r--r--lib/libF77/cabs.c27
-rw-r--r--lib/libF77/d_abs.c12
-rw-r--r--lib/libF77/d_acos.c13
-rw-r--r--lib/libF77/d_asin.c13
-rw-r--r--lib/libF77/d_atan.c13
-rw-r--r--lib/libF77/d_atn2.c13
-rw-r--r--lib/libF77/d_cnjg.c12
-rw-r--r--lib/libF77/d_cos.c13
-rw-r--r--lib/libF77/d_cosh.c13
-rw-r--r--lib/libF77/d_dim.c10
-rw-r--r--lib/libF77/d_exp.c13
-rw-r--r--lib/libF77/d_imag.c10
-rw-r--r--lib/libF77/d_int.c13
-rw-r--r--lib/libF77/d_lg10.c13
-rw-r--r--lib/libF77/d_log.c13
-rw-r--r--lib/libF77/d_mod.c40
-rw-r--r--lib/libF77/d_nint.c14
-rw-r--r--lib/libF77/d_prod.c10
-rw-r--r--lib/libF77/d_sign.c12
-rw-r--r--lib/libF77/d_sin.c13
-rw-r--r--lib/libF77/d_sinh.c13
-rw-r--r--lib/libF77/d_sqrt.c13
-rw-r--r--lib/libF77/d_tan.c13
-rw-r--r--lib/libF77/d_tanh.c13
-rw-r--r--lib/libF77/derf_.c12
-rw-r--r--lib/libF77/derfc_.c14
-rw-r--r--lib/libF77/ef1asc_.c21
-rw-r--r--lib/libF77/ef1cmc_.c14
-rw-r--r--lib/libF77/erf_.c12
-rw-r--r--lib/libF77/erfc_.c12
-rw-r--r--lib/libF77/f2ch.add162
-rw-r--r--lib/libF77/getarg_.c28
-rw-r--r--lib/libF77/getenv_.c51
-rw-r--r--lib/libF77/h_abs.c12
-rw-r--r--lib/libF77/h_dim.c10
-rw-r--r--lib/libF77/h_dnnt.c14
-rw-r--r--lib/libF77/h_indx.c26
-rw-r--r--lib/libF77/h_len.c10
-rw-r--r--lib/libF77/h_mod.c10
-rw-r--r--lib/libF77/h_nint.c14
-rw-r--r--lib/libF77/h_sign.c12
-rw-r--r--lib/libF77/hl_ge.c12
-rw-r--r--lib/libF77/hl_gt.c12
-rw-r--r--lib/libF77/hl_le.c12
-rw-r--r--lib/libF77/hl_lt.c12
-rw-r--r--lib/libF77/i_abs.c12
-rw-r--r--lib/libF77/i_dim.c10
-rw-r--r--lib/libF77/i_dnnt.c14
-rw-r--r--lib/libF77/i_indx.c26
-rw-r--r--lib/libF77/i_len.c10
-rw-r--r--lib/libF77/i_mod.c10
-rw-r--r--lib/libF77/i_nint.c14
-rw-r--r--lib/libF77/i_sign.c12
-rw-r--r--lib/libF77/iargc_.c11
-rw-r--r--lib/libF77/l_ge.c12
-rw-r--r--lib/libF77/l_gt.c12
-rw-r--r--lib/libF77/l_le.c12
-rw-r--r--lib/libF77/l_lt.c12
-rw-r--r--lib/libF77/lbitbits.c62
-rw-r--r--lib/libF77/lbitshft.c11
-rw-r--r--lib/libF77/main.c135
-rw-r--r--lib/libF77/pow_ci.c20
-rw-r--r--lib/libF77/pow_dd.c13
-rw-r--r--lib/libF77/pow_di.c35
-rw-r--r--lib/libF77/pow_hh.c33
-rw-r--r--lib/libF77/pow_ii.c33
-rw-r--r--lib/libF77/pow_qq.c33
-rw-r--r--lib/libF77/pow_ri.c35
-rw-r--r--lib/libF77/pow_zi.c54
-rw-r--r--lib/libF77/pow_zz.c23
-rw-r--r--lib/libF77/r_abs.c12
-rw-r--r--lib/libF77/r_acos.c13
-rw-r--r--lib/libF77/r_asin.c13
-rw-r--r--lib/libF77/r_atan.c13
-rw-r--r--lib/libF77/r_atn2.c13
-rw-r--r--lib/libF77/r_cnjg.c11
-rw-r--r--lib/libF77/r_cos.c13
-rw-r--r--lib/libF77/r_cosh.c13
-rw-r--r--lib/libF77/r_dim.c10
-rw-r--r--lib/libF77/r_exp.c13
-rw-r--r--lib/libF77/r_imag.c10
-rw-r--r--lib/libF77/r_int.c13
-rw-r--r--lib/libF77/r_lg10.c13
-rw-r--r--lib/libF77/r_log.c13
-rw-r--r--lib/libF77/r_mod.c40
-rw-r--r--lib/libF77/r_nint.c14
-rw-r--r--lib/libF77/r_sign.c12
-rw-r--r--lib/libF77/r_sin.c13
-rw-r--r--lib/libF77/r_sinh.c13
-rw-r--r--lib/libF77/r_sqrt.c13
-rw-r--r--lib/libF77/r_tan.c13
-rw-r--r--lib/libF77/r_tanh.c13
-rw-r--r--lib/libF77/s_cat.c75
-rw-r--r--lib/libF77/s_cmp.c44
-rw-r--r--lib/libF77/s_copy.c51
-rw-r--r--lib/libF77/s_paus.c88
-rw-r--r--lib/libF77/s_rnge.c26
-rw-r--r--lib/libF77/s_stop.c37
-rw-r--r--lib/libF77/sig_die.c45
-rw-r--r--lib/libF77/signal1.h25
-rw-r--r--lib/libF77/signal_.c19
-rw-r--r--lib/libF77/system_.c36
-rw-r--r--lib/libF77/z_abs.c12
-rw-r--r--lib/libF77/z_cos.c15
-rw-r--r--lib/libF77/z_div.c36
-rw-r--r--lib/libF77/z_exp.c17
-rw-r--r--lib/libF77/z_log.c16
-rw-r--r--lib/libF77/z_sin.c15
-rw-r--r--lib/libF77/z_sqrt.c29
-rw-r--r--lib/libI77/Notice23
-rw-r--r--lib/libI77/README225
-rw-r--r--lib/libI77/Version.c244
-rw-r--r--lib/libI77/backspace.c98
-rw-r--r--lib/libI77/close.c95
-rw-r--r--lib/libI77/dfe.c152
-rw-r--r--lib/libI77/dolio.c20
-rw-r--r--lib/libI77/due.c70
-rw-r--r--lib/libI77/endfile.c195
-rw-r--r--lib/libI77/err.c278
-rw-r--r--lib/libI77/f2ch.add162
-rw-r--r--lib/libI77/fio.h102
-rw-r--r--lib/libI77/fmt.c488
-rw-r--r--lib/libI77/fmt.h99
-rw-r--r--lib/libI77/fmtlib.c45
-rw-r--r--lib/libI77/fp.h28
-rw-r--r--lib/libI77/iio.c142
-rw-r--r--lib/libI77/ilnw.c77
-rw-r--r--lib/libI77/inquire.c106
-rw-r--r--lib/libI77/lio.h74
-rw-r--r--lib/libI77/lread.c659
-rw-r--r--lib/libI77/lwrite.c310
-rw-r--r--lib/libI77/open.c239
-rw-r--r--lib/libI77/rawio.h43
-rw-r--r--lib/libI77/rdfmt.c475
-rw-r--r--lib/libI77/rewind.c24
-rw-r--r--lib/libI77/rsfe.c79
-rw-r--r--lib/libI77/rsli.c103
-rw-r--r--lib/libI77/rsne.c609
-rw-r--r--lib/libI77/sfe.c42
-rw-r--r--lib/libI77/sue.c83
-rw-r--r--lib/libI77/typesize.c12
-rw-r--r--lib/libI77/uio.c68
-rw-r--r--lib/libI77/util.c51
-rw-r--r--lib/libI77/wref.c275
-rw-r--r--lib/libI77/wrtfmt.c387
-rw-r--r--lib/libI77/wsfe.c84
-rw-r--r--lib/libI77/wsle.c40
-rw-r--r--lib/libI77/wsne.c26
-rw-r--r--lib/libI77/xwsne.c72
-rw-r--r--lib/libalias/HISTORY126
-rw-r--r--lib/libalias/Makefile12
-rw-r--r--lib/libalias/alias.c1114
-rw-r--r--lib/libalias/alias.h164
-rw-r--r--lib/libalias/alias_db.c2232
-rw-r--r--lib/libalias/alias_ftp.c225
-rw-r--r--lib/libalias/alias_irc.c314
-rw-r--r--lib/libalias/alias_local.h99
-rw-r--r--lib/libalias/alias_old.c77
-rw-r--r--lib/libalias/alias_util.c137
-rw-r--r--lib/libalias/libalias.3767
-rw-r--r--lib/libc/Makefile39
-rw-r--r--lib/libc/Makefile.inc35
-rw-r--r--lib/libc/amd64/SYS.h86
-rw-r--r--lib/libc/amd64/gen/Makefile.inc5
-rw-r--r--lib/libc/amd64/gen/_setjmp.S92
-rw-r--r--lib/libc/amd64/gen/frexp.c67
-rw-r--r--lib/libc/amd64/gen/infinity.c9
-rw-r--r--lib/libc/amd64/gen/isinf.c68
-rw-r--r--lib/libc/amd64/gen/ldexp.c74
-rw-r--r--lib/libc/amd64/gen/setjmp.S113
-rw-r--r--lib/libc/amd64/gen/sigsetjmp.S125
-rw-r--r--lib/libc/amd64/net/Makefile.inc4
-rw-r--r--lib/libc/amd64/net/htonl.S53
-rw-r--r--lib/libc/amd64/net/htons.S51
-rw-r--r--lib/libc/amd64/net/ntohl.S53
-rw-r--r--lib/libc/amd64/net/ntohs.S51
-rw-r--r--lib/libc/amd64/sys/Makefile.inc10
-rw-r--r--lib/libc/amd64/sys/brk.S91
-rw-r--r--lib/libc/amd64/sys/cerror.S87
-rw-r--r--lib/libc/amd64/sys/exect.S56
-rw-r--r--lib/libc/amd64/sys/pipe.S51
-rw-r--r--lib/libc/amd64/sys/ptrace.S62
-rw-r--r--lib/libc/amd64/sys/reboot.S47
-rw-r--r--lib/libc/amd64/sys/sbrk.S95
-rw-r--r--lib/libc/amd64/sys/setlogin.S59
-rw-r--r--lib/libc/amd64/sys/sigreturn.S52
-rw-r--r--lib/libc/amd64/sys/vfork.S101
-rw-r--r--lib/libc/compat-43/Makefile.inc16
-rw-r--r--lib/libc/compat-43/creat.261
-rw-r--r--lib/libc/compat-43/creat.c50
-rw-r--r--lib/libc/compat-43/gethostid.375
-rw-r--r--lib/libc/compat-43/gethostid.c59
-rw-r--r--lib/libc/compat-43/getwd.c54
-rw-r--r--lib/libc/compat-43/killpg.296
-rw-r--r--lib/libc/compat-43/killpg.c59
-rw-r--r--lib/libc/compat-43/sethostid.c57
-rw-r--r--lib/libc/compat-43/setpgrp.c50
-rw-r--r--lib/libc/compat-43/setrgid.c50
-rw-r--r--lib/libc/compat-43/setruid.379
-rw-r--r--lib/libc/compat-43/setruid.c50
-rw-r--r--lib/libc/compat-43/sigblock.284
-rw-r--r--lib/libc/compat-43/sigcompat.c85
-rw-r--r--lib/libc/compat-43/sigpause.274
-rw-r--r--lib/libc/compat-43/sigsetmask.282
-rw-r--r--lib/libc/compat-43/sigvec.2326
-rw-r--r--lib/libc/db/Makefile.inc11
-rw-r--r--lib/libc/db/README40
-rw-r--r--lib/libc/db/btree/Makefile.inc8
-rw-r--r--lib/libc/db/btree/bt_close.c182
-rw-r--r--lib/libc/db/btree/bt_conv.c221
-rw-r--r--lib/libc/db/btree/bt_debug.c329
-rw-r--r--lib/libc/db/btree/bt_delete.c657
-rw-r--r--lib/libc/db/btree/bt_get.c105
-rw-r--r--lib/libc/db/btree/bt_open.c444
-rw-r--r--lib/libc/db/btree/bt_overflow.c228
-rw-r--r--lib/libc/db/btree/bt_page.c98
-rw-r--r--lib/libc/db/btree/bt_put.c320
-rw-r--r--lib/libc/db/btree/bt_search.c213
-rw-r--r--lib/libc/db/btree/bt_seq.c460
-rw-r--r--lib/libc/db/btree/bt_split.c827
-rw-r--r--lib/libc/db/btree/bt_utils.c260
-rw-r--r--lib/libc/db/btree/btree.h383
-rw-r--r--lib/libc/db/btree/extern.h70
-rw-r--r--lib/libc/db/changelog103
-rw-r--r--lib/libc/db/db/Makefile.inc6
-rw-r--r--lib/libc/db/db/db.c99
-rw-r--r--lib/libc/db/docs/hash.usenix.ps12209
-rw-r--r--lib/libc/db/docs/libtp.usenix.ps12340
-rw-r--r--lib/libc/db/hash/Makefile.inc7
-rw-r--r--lib/libc/db/hash/README72
-rw-r--r--lib/libc/db/hash/extern.h65
-rw-r--r--lib/libc/db/hash/hash.c1001
-rw-r--r--lib/libc/db/hash/hash.h293
-rw-r--r--lib/libc/db/hash/hash_bigkey.c667
-rw-r--r--lib/libc/db/hash/hash_buf.c355
-rw-r--r--lib/libc/db/hash/hash_func.c212
-rw-r--r--lib/libc/db/hash/hash_log2.c54
-rw-r--r--lib/libc/db/hash/hash_page.c944
-rw-r--r--lib/libc/db/hash/hsearch.c107
-rw-r--r--lib/libc/db/hash/ndbm.c229
-rw-r--r--lib/libc/db/hash/page.h92
-rw-r--r--lib/libc/db/hash/search.h51
-rw-r--r--lib/libc/db/man/Makefile.inc10
-rw-r--r--lib/libc/db/man/btree.3233
-rw-r--r--lib/libc/db/man/dbopen.3476
-rw-r--r--lib/libc/db/man/hash.3159
-rw-r--r--lib/libc/db/man/mpool.3220
-rw-r--r--lib/libc/db/man/recno.3216
-rw-r--r--lib/libc/db/mpool/Makefile.inc6
-rw-r--r--lib/libc/db/mpool/README7
-rw-r--r--lib/libc/db/mpool/mpool.c463
-rw-r--r--lib/libc/db/mpool/mpool.libtp746
-rw-r--r--lib/libc/db/recno/Makefile.inc7
-rw-r--r--lib/libc/db/recno/extern.h54
-rw-r--r--lib/libc/db/recno/rec_close.c182
-rw-r--r--lib/libc/db/recno/rec_delete.c197
-rw-r--r--lib/libc/db/recno/rec_get.c311
-rw-r--r--lib/libc/db/recno/rec_open.c241
-rw-r--r--lib/libc/db/recno/rec_put.c280
-rw-r--r--lib/libc/db/recno/rec_search.c126
-rw-r--r--lib/libc/db/recno/rec_seq.c131
-rw-r--r--lib/libc/db/recno/rec_utils.c122
-rw-r--r--lib/libc/db/recno/recno.h39
-rw-r--r--lib/libc/db/test/Makefile23
-rw-r--r--lib/libc/db/test/README74
-rw-r--r--lib/libc/db/test/btree.tests/main.c765
-rw-r--r--lib/libc/db/test/dbtest.c753
-rw-r--r--lib/libc/db/test/hash.tests/driver2.c114
-rw-r--r--lib/libc/db/test/hash.tests/makedb.sh13
-rw-r--r--lib/libc/db/test/hash.tests/tcreat3.c105
-rw-r--r--lib/libc/db/test/hash.tests/tdel.c122
-rw-r--r--lib/libc/db/test/hash.tests/testit147
-rw-r--r--lib/libc/db/test/hash.tests/thash4.c132
-rw-r--r--lib/libc/db/test/hash.tests/tread2.c105
-rw-r--r--lib/libc/db/test/hash.tests/tseq.c88
-rw-r--r--lib/libc/db/test/hash.tests/tverify.c107
-rw-r--r--lib/libc/db/test/run.test705
-rw-r--r--lib/libc/gen/Makefile.inc129
-rw-r--r--lib/libc/gen/__xuname.c125
-rw-r--r--lib/libc/gen/_rand48.c46
-rw-r--r--lib/libc/gen/alarm.395
-rw-r--r--lib/libc/gen/alarm.c59
-rw-r--r--lib/libc/gen/arc4random.383
-rw-r--r--lib/libc/gen/arc4random.c172
-rw-r--r--lib/libc/gen/assert.c52
-rw-r--r--lib/libc/gen/clock.368
-rw-r--r--lib/libc/gen/clock.c57
-rw-r--r--lib/libc/gen/closedir.c62
-rw-r--r--lib/libc/gen/config.c187
-rw-r--r--lib/libc/gen/config_open.373
-rw-r--r--lib/libc/gen/confstr.3125
-rw-r--r--lib/libc/gen/confstr.c86
-rw-r--r--lib/libc/gen/crypt.3296
-rw-r--r--lib/libc/gen/crypt.c100
-rw-r--r--lib/libc/gen/ctermid.393
-rw-r--r--lib/libc/gen/ctermid.c53
-rw-r--r--lib/libc/gen/daemon.378
-rw-r--r--lib/libc/gen/daemon.c71
-rw-r--r--lib/libc/gen/devname.368
-rw-r--r--lib/libc/gen/devname.c80
-rw-r--r--lib/libc/gen/directory.3183
-rw-r--r--lib/libc/gen/disklabel.c174
-rw-r--r--lib/libc/gen/drand48.c22
-rw-r--r--lib/libc/gen/erand48.c23
-rw-r--r--lib/libc/gen/err.3147
-rw-r--r--lib/libc/gen/err.c216
-rw-r--r--lib/libc/gen/errlst.c141
-rw-r--r--lib/libc/gen/exec.3291
-rw-r--r--lib/libc/gen/exec.c303
-rw-r--r--lib/libc/gen/fnmatch.3142
-rw-r--r--lib/libc/gen/fnmatch.c231
-rw-r--r--lib/libc/gen/frexp.385
-rw-r--r--lib/libc/gen/fstab.c227
-rw-r--r--lib/libc/gen/ftok.385
-rw-r--r--lib/libc/gen/ftok.c47
-rw-r--r--lib/libc/gen/fts-compat.c1039
-rw-r--r--lib/libc/gen/fts-compat.h128
-rw-r--r--lib/libc/gen/fts.3749
-rw-r--r--lib/libc/gen/fts.c1039
-rw-r--r--lib/libc/gen/getbootfile.370
-rw-r--r--lib/libc/gen/getbootfile.c55
-rw-r--r--lib/libc/gen/getbsize.379
-rw-r--r--lib/libc/gen/getbsize.c106
-rw-r--r--lib/libc/gen/getcap.3528
-rw-r--r--lib/libc/gen/getcap.c1049
-rw-r--r--lib/libc/gen/getcwd.3156
-rw-r--r--lib/libc/gen/getcwd.c277
-rw-r--r--lib/libc/gen/getdiskbyname.364
-rw-r--r--lib/libc/gen/getdomainname.399
-rw-r--r--lib/libc/gen/getdomainname.c61
-rw-r--r--lib/libc/gen/getfsent.3150
-rw-r--r--lib/libc/gen/getgrent.3205
-rw-r--r--lib/libc/gen/getgrent.c553
-rw-r--r--lib/libc/gen/getgrouplist.393
-rw-r--r--lib/libc/gen/getgrouplist.c91
-rw-r--r--lib/libc/gen/gethostname.397
-rw-r--r--lib/libc/gen/gethostname.c55
-rw-r--r--lib/libc/gen/getloadavg.365
-rw-r--r--lib/libc/gen/getloadavg.c71
-rw-r--r--lib/libc/gen/getlogin.c58
-rw-r--r--lib/libc/gen/getmntinfo.3109
-rw-r--r--lib/libc/gen/getmntinfo.c70
-rw-r--r--lib/libc/gen/getnetgrent.3128
-rw-r--r--lib/libc/gen/getnetgrent.c632
-rw-r--r--lib/libc/gen/getosreldate.c63
-rw-r--r--lib/libc/gen/getpagesize.360
-rw-r--r--lib/libc/gen/getpagesize.c61
-rw-r--r--lib/libc/gen/getpass.394
-rw-r--r--lib/libc/gen/getpass.c124
-rw-r--r--lib/libc/gen/getpwent.3218
-rw-r--r--lib/libc/gen/getpwent.c835
-rw-r--r--lib/libc/gen/getttyent.3209
-rw-r--r--lib/libc/gen/getttyent.c264
-rw-r--r--lib/libc/gen/getusershell.398
-rw-r--r--lib/libc/gen/getusershell.c137
-rw-r--r--lib/libc/gen/getvfsbyname.397
-rw-r--r--lib/libc/gen/getvfsbyname.c80
-rw-r--r--lib/libc/gen/getvfsent.3228
-rw-r--r--lib/libc/gen/getvfsent.c248
-rw-r--r--lib/libc/gen/glob.3446
-rw-r--r--lib/libc/gen/glob.c860
-rw-r--r--lib/libc/gen/initgroups.383
-rw-r--r--lib/libc/gen/initgroups.c60
-rw-r--r--lib/libc/gen/isatty.c63
-rw-r--r--lib/libc/gen/isinf.372
-rw-r--r--lib/libc/gen/jrand48.c21
-rw-r--r--lib/libc/gen/lcong48.c30
-rw-r--r--lib/libc/gen/ldexp.377
-rw-r--r--lib/libc/gen/lrand48.c23
-rw-r--r--lib/libc/gen/modf.372
-rw-r--r--lib/libc/gen/mrand48.c23
-rw-r--r--lib/libc/gen/msgctl.3209
-rw-r--r--lib/libc/gen/msgctl.c15
-rw-r--r--lib/libc/gen/msgget.3134
-rw-r--r--lib/libc/gen/msgget.c14
-rw-r--r--lib/libc/gen/msgrcv.3209
-rw-r--r--lib/libc/gen/msgrcv.c17
-rw-r--r--lib/libc/gen/msgsnd.3161
-rw-r--r--lib/libc/gen/msgsnd.c16
-rw-r--r--lib/libc/gen/nice.368
-rw-r--r--lib/libc/gen/nice.c58
-rw-r--r--lib/libc/gen/nlist.378
-rw-r--r--lib/libc/gen/nlist.c381
-rw-r--r--lib/libc/gen/nrand48.c21
-rw-r--r--lib/libc/gen/ntp_gettime.c59
-rw-r--r--lib/libc/gen/opendir.c274
-rw-r--r--lib/libc/gen/pause.384
-rw-r--r--lib/libc/gen/pause.c49
-rw-r--r--lib/libc/gen/popen.3192
-rw-r--r--lib/libc/gen/popen.c177
-rw-r--r--lib/libc/gen/psignal.392
-rw-r--r--lib/libc/gen/psignal.c65
-rw-r--r--lib/libc/gen/pw_scan.c144
-rw-r--r--lib/libc/gen/pw_scan.h36
-rw-r--r--lib/libc/gen/pwcache.394
-rw-r--r--lib/libc/gen/pwcache.c119
-rw-r--r--lib/libc/gen/raise.377
-rw-r--r--lib/libc/gen/raise.c46
-rw-r--r--lib/libc/gen/rand48.3160
-rw-r--r--lib/libc/gen/rand48.h30
-rw-r--r--lib/libc/gen/readdir.c75
-rw-r--r--lib/libc/gen/rewinddir.c50
-rw-r--r--lib/libc/gen/scandir.3106
-rw-r--r--lib/libc/gen/scandir.c136
-rw-r--r--lib/libc/gen/seed48.c36
-rw-r--r--lib/libc/gen/seekdir.c54
-rw-r--r--lib/libc/gen/semconfig.c13
-rw-r--r--lib/libc/gen/semctl.c15
-rw-r--r--lib/libc/gen/semget.c15
-rw-r--r--lib/libc/gen/semop.c15
-rw-r--r--lib/libc/gen/setdomainname.c57
-rw-r--r--lib/libc/gen/setflags.c174
-rw-r--r--lib/libc/gen/setflagsbyname.c174
-rw-r--r--lib/libc/gen/sethostname.c58
-rw-r--r--lib/libc/gen/setjmp.3173
-rw-r--r--lib/libc/gen/setjmperr.c53
-rw-r--r--lib/libc/gen/setmode.3106
-rw-r--r--lib/libc/gen/setmode.c453
-rw-r--r--lib/libc/gen/setproctitle.3113
-rw-r--r--lib/libc/gen/setproctitle.c125
-rw-r--r--lib/libc/gen/shmat.c19
-rw-r--r--lib/libc/gen/shmctl.c19
-rw-r--r--lib/libc/gen/shmdt.c17
-rw-r--r--lib/libc/gen/shmget.c19
-rw-r--r--lib/libc/gen/siginterrupt.3111
-rw-r--r--lib/libc/gen/siginterrupt.c62
-rw-r--r--lib/libc/gen/siglist.c109
-rw-r--r--lib/libc/gen/signal.3227
-rw-r--r--lib/libc/gen/signal.c60
-rw-r--r--lib/libc/gen/sigsetops.3113
-rw-r--r--lib/libc/gen/sigsetops.c88
-rw-r--r--lib/libc/gen/sleep.390
-rw-r--r--lib/libc/gen/sleep.c69
-rw-r--r--lib/libc/gen/srand48.c30
-rw-r--r--lib/libc/gen/stringlist.3120
-rw-r--r--lib/libc/gen/stringlist.c120
-rw-r--r--lib/libc/gen/strtofflags.c174
-rw-r--r--lib/libc/gen/sysconf.3186
-rw-r--r--lib/libc/gen/sysconf.c188
-rw-r--r--lib/libc/gen/sysctl.3697
-rw-r--r--lib/libc/gen/sysctl.c178
-rw-r--r--lib/libc/gen/sysctlbyname.c35
-rw-r--r--lib/libc/gen/syslog.3269
-rw-r--r--lib/libc/gen/syslog.c363
-rw-r--r--lib/libc/gen/tcgetpgrp.379
-rw-r--r--lib/libc/gen/tcsendbreak.3154
-rw-r--r--lib/libc/gen/tcsetattr.3330
-rw-r--r--lib/libc/gen/tcsetpgrp.3100
-rw-r--r--lib/libc/gen/telldir.c157
-rw-r--r--lib/libc/gen/termios.c245
-rw-r--r--lib/libc/gen/time.385
-rw-r--r--lib/libc/gen/time.c52
-rw-r--r--lib/libc/gen/times.3137
-rw-r--r--lib/libc/gen/times.c67
-rw-r--r--lib/libc/gen/timezone.367
-rw-r--r--lib/libc/gen/timezone.c134
-rw-r--r--lib/libc/gen/ttyname.3126
-rw-r--r--lib/libc/gen/ttyname.c224
-rw-r--r--lib/libc/gen/ttyslot.c68
-rw-r--r--lib/libc/gen/tzset.3325
-rw-r--r--lib/libc/gen/ualarm.399
-rw-r--r--lib/libc/gen/ualarm.c65
-rw-r--r--lib/libc/gen/uname.393
-rw-r--r--lib/libc/gen/uname.c125
-rw-r--r--lib/libc/gen/unvis.3163
-rw-r--r--lib/libc/gen/unvis.c247
-rw-r--r--lib/libc/gen/usleep.399
-rw-r--r--lib/libc/gen/usleep.c54
-rw-r--r--lib/libc/gen/utime.387
-rw-r--r--lib/libc/gen/utime.c57
-rw-r--r--lib/libc/gen/valloc.375
-rw-r--r--lib/libc/gen/valloc.c50
-rw-r--r--lib/libc/gen/vis.3265
-rw-r--r--lib/libc/gen/vis.c187
-rw-r--r--lib/libc/gen/wait.c48
-rw-r--r--lib/libc/gen/wait3.c50
-rw-r--r--lib/libc/gen/waitpid.c54
-rw-r--r--lib/libc/gmon/Makefile.inc17
-rw-r--r--lib/libc/gmon/gmon.c258
-rw-r--r--lib/libc/gmon/mcount.c325
-rw-r--r--lib/libc/gmon/moncontrol.3105
-rw-r--r--lib/libc/i386/DEFS.h41
-rw-r--r--lib/libc/i386/SYS.h86
-rw-r--r--lib/libc/i386/gen/Makefile.inc5
-rw-r--r--lib/libc/i386/gen/_setjmp.S92
-rw-r--r--lib/libc/i386/gen/alloca.S60
-rw-r--r--lib/libc/i386/gen/fabs.S49
-rw-r--r--lib/libc/i386/gen/frexp.c67
-rw-r--r--lib/libc/i386/gen/infinity.c9
-rw-r--r--lib/libc/i386/gen/isinf.c68
-rw-r--r--lib/libc/i386/gen/ldexp.c74
-rw-r--r--lib/libc/i386/gen/modf.S79
-rw-r--r--lib/libc/i386/gen/setjmp.S113
-rw-r--r--lib/libc/i386/gen/sigsetjmp.S125
-rw-r--r--lib/libc/i386/net/Makefile.inc4
-rw-r--r--lib/libc/i386/net/htonl.S53
-rw-r--r--lib/libc/i386/net/htons.S51
-rw-r--r--lib/libc/i386/net/ntohl.S53
-rw-r--r--lib/libc/i386/net/ntohs.S51
-rw-r--r--lib/libc/i386/stdlib/Makefile.inc4
-rw-r--r--lib/libc/i386/stdlib/abs.S51
-rw-r--r--lib/libc/i386/stdlib/div.S47
-rw-r--r--lib/libc/i386/stdlib/labs.S51
-rw-r--r--lib/libc/i386/stdlib/ldiv.S47
-rw-r--r--lib/libc/i386/string/Makefile.inc6
-rw-r--r--lib/libc/i386/string/bcmp.S70
-rw-r--r--lib/libc/i386/string/bcopy.S103
-rw-r--r--lib/libc/i386/string/bzero.S87
-rw-r--r--lib/libc/i386/string/ffs.S59
-rw-r--r--lib/libc/i386/string/index.S69
-rw-r--r--lib/libc/i386/string/memchr.S64
-rw-r--r--lib/libc/i386/string/memcmp.S81
-rw-r--r--lib/libc/i386/string/memcpy.S2
-rw-r--r--lib/libc/i386/string/memmove.S2
-rw-r--r--lib/libc/i386/string/memset.S95
-rw-r--r--lib/libc/i386/string/rindex.S70
-rw-r--r--lib/libc/i386/string/strcat.S106
-rw-r--r--lib/libc/i386/string/strchr.S69
-rw-r--r--lib/libc/i386/string/strcmp.S125
-rw-r--r--lib/libc/i386/string/strcpy.S95
-rw-r--r--lib/libc/i386/string/strlen.S59
-rw-r--r--lib/libc/i386/string/strncmp.S172
-rw-r--r--lib/libc/i386/string/strrchr.S70
-rw-r--r--lib/libc/i386/string/swab.S105
-rw-r--r--lib/libc/i386/sys/Makefile.inc10
-rw-r--r--lib/libc/i386/sys/Ovfork.S101
-rw-r--r--lib/libc/i386/sys/brk.S91
-rw-r--r--lib/libc/i386/sys/cerror.S87
-rw-r--r--lib/libc/i386/sys/exect.S56
-rw-r--r--lib/libc/i386/sys/fork.S51
-rw-r--r--lib/libc/i386/sys/i386_get_ldt.298
-rw-r--r--lib/libc/i386/sys/i386_get_ldt.c55
-rw-r--r--lib/libc/i386/sys/i386_set_ldt.c55
-rw-r--r--lib/libc/i386/sys/pipe.S51
-rw-r--r--lib/libc/i386/sys/ptrace.S62
-rw-r--r--lib/libc/i386/sys/reboot.S47
-rw-r--r--lib/libc/i386/sys/rfork.S51
-rw-r--r--lib/libc/i386/sys/sbrk.S95
-rw-r--r--lib/libc/i386/sys/setlogin.S59
-rw-r--r--lib/libc/i386/sys/sigpending.S50
-rw-r--r--lib/libc/i386/sys/sigprocmask.S72
-rw-r--r--lib/libc/i386/sys/sigreturn.S52
-rw-r--r--lib/libc/i386/sys/sigsuspend.S62
-rw-r--r--lib/libc/i386/sys/syscall.S57
-rw-r--r--lib/libc/locale/Makefile.inc26
-rw-r--r--lib/libc/locale/ansi.c149
-rw-r--r--lib/libc/locale/collate.c197
-rw-r--r--lib/libc/locale/collate.h66
-rw-r--r--lib/libc/locale/collcmp.c84
-rw-r--r--lib/libc/locale/ctype.3120
-rw-r--r--lib/libc/locale/ctype.c72
-rw-r--r--lib/libc/locale/euc.4241
-rw-r--r--lib/libc/locale/euc.5241
-rw-r--r--lib/libc/locale/euc.c222
-rw-r--r--lib/libc/locale/frune.c103
-rw-r--r--lib/libc/locale/isalnum.387
-rw-r--r--lib/libc/locale/isalpha.385
-rw-r--r--lib/libc/locale/isascii.358
-rw-r--r--lib/libc/locale/isblank.355
-rw-r--r--lib/libc/locale/iscntrl.375
-rw-r--r--lib/libc/locale/isctype.c182
-rw-r--r--lib/libc/locale/isdigit.370
-rw-r--r--lib/libc/locale/isgraph.387
-rw-r--r--lib/libc/locale/islower.374
-rw-r--r--lib/libc/locale/isprint.387
-rw-r--r--lib/libc/locale/ispunct.378
-rw-r--r--lib/libc/locale/isspace.370
-rw-r--r--lib/libc/locale/isupper.374
-rw-r--r--lib/libc/locale/isxdigit.373
-rw-r--r--lib/libc/locale/lconv.c70
-rw-r--r--lib/libc/locale/localeconv.c49
-rw-r--r--lib/libc/locale/mbrune.3157
-rw-r--r--lib/libc/locale/mbrune.c112
-rw-r--r--lib/libc/locale/mskanji.c107
-rw-r--r--lib/libc/locale/multibyte.3241
-rw-r--r--lib/libc/locale/nomacros.c9
-rw-r--r--lib/libc/locale/none.c91
-rw-r--r--lib/libc/locale/rune.3270
-rw-r--r--lib/libc/locale/rune.c173
-rw-r--r--lib/libc/locale/runetype.c64
-rw-r--r--lib/libc/locale/setinvalidrune.c44
-rw-r--r--lib/libc/locale/setlocale.3330
-rw-r--r--lib/libc/locale/setlocale.c316
-rw-r--r--lib/libc/locale/setlocale.h34
-rw-r--r--lib/libc/locale/setrunelocale.c133
-rw-r--r--lib/libc/locale/table.c162
-rw-r--r--lib/libc/locale/toascii.369
-rw-r--r--lib/libc/locale/tolower.388
-rw-r--r--lib/libc/locale/tolower.c60
-rw-r--r--lib/libc/locale/toupper.388
-rw-r--r--lib/libc/locale/toupper.c60
-rw-r--r--lib/libc/locale/utf2.487
-rw-r--r--lib/libc/locale/utf2.587
-rw-r--r--lib/libc/locale/utf2.c150
-rw-r--r--lib/libc/net/Makefile.inc54
-rw-r--r--lib/libc/net/addr2ascii.3215
-rw-r--r--lib/libc/net/addr2ascii.c92
-rw-r--r--lib/libc/net/ascii2addr.c72
-rw-r--r--lib/libc/net/base64.c321
-rw-r--r--lib/libc/net/byteorder.376
-rw-r--r--lib/libc/net/ether_addr.c226
-rw-r--r--lib/libc/net/ethers.3193
-rw-r--r--lib/libc/net/gethostbydns.c736
-rw-r--r--lib/libc/net/gethostbyht.c202
-rw-r--r--lib/libc/net/gethostbyname.3305
-rw-r--r--lib/libc/net/gethostbynis.c142
-rw-r--r--lib/libc/net/gethostnamadr.c224
-rw-r--r--lib/libc/net/getnetbydns.c313
-rw-r--r--lib/libc/net/getnetbyht.c173
-rw-r--r--lib/libc/net/getnetbynis.c177
-rw-r--r--lib/libc/net/getnetent.3158
-rw-r--r--lib/libc/net/getnetnamadr.c190
-rw-r--r--lib/libc/net/getproto.c55
-rw-r--r--lib/libc/net/getprotoent.3146
-rw-r--r--lib/libc/net/getprotoent.c119
-rw-r--r--lib/libc/net/getprotoname.c62
-rw-r--r--lib/libc/net/getservbyname.c79
-rw-r--r--lib/libc/net/getservbyport.c74
-rw-r--r--lib/libc/net/getservent.3156
-rw-r--r--lib/libc/net/getservent.c278
-rw-r--r--lib/libc/net/herror.c112
-rw-r--r--lib/libc/net/inet.3210
-rw-r--r--lib/libc/net/inet_addr.c180
-rw-r--r--lib/libc/net/inet_lnaof.c59
-rw-r--r--lib/libc/net/inet_makeaddr.c62
-rw-r--r--lib/libc/net/inet_net_ntop.c140
-rw-r--r--lib/libc/net/inet_net_pton.c208
-rw-r--r--lib/libc/net/inet_neta.c83
-rw-r--r--lib/libc/net/inet_netof.c58
-rw-r--r--lib/libc/net/inet_network.c91
-rw-r--r--lib/libc/net/inet_ntoa.c59
-rw-r--r--lib/libc/net/inet_ntop.c190
-rw-r--r--lib/libc/net/inet_pton.c214
-rw-r--r--lib/libc/net/iso_addr.3110
-rw-r--r--lib/libc/net/iso_addr.c117
-rw-r--r--lib/libc/net/linkaddr.3138
-rw-r--r--lib/libc/net/linkaddr.c158
-rw-r--r--lib/libc/net/map_v4v6.c128
-rw-r--r--lib/libc/net/ns.3131
-rw-r--r--lib/libc/net/ns_addr.c227
-rw-r--r--lib/libc/net/ns_ntoa.c100
-rw-r--r--lib/libc/net/nsap_addr.c103
-rw-r--r--lib/libc/net/rcmd.3204
-rw-r--r--lib/libc/net/rcmd.c518
-rw-r--r--lib/libc/net/recv.c50
-rw-r--r--lib/libc/net/res_comp.c496
-rw-r--r--lib/libc/net/res_config.h8
-rw-r--r--lib/libc/net/res_data.c111
-rw-r--r--lib/libc/net/res_debug.c1520
-rw-r--r--lib/libc/net/res_init.c461
-rw-r--r--lib/libc/net/res_mkquery.c186
-rw-r--r--lib/libc/net/res_query.c401
-rw-r--r--lib/libc/net/res_send.c810
-rw-r--r--lib/libc/net/res_stubs.c64
-rw-r--r--lib/libc/net/resolver.3351
-rw-r--r--lib/libc/net/send.c50
-rw-r--r--lib/libc/nls/Makefile.inc10
-rw-r--r--lib/libc/nls/catclose.354
-rw-r--r--lib/libc/nls/catclose.c25
-rw-r--r--lib/libc/nls/catgets.366
-rw-r--r--lib/libc/nls/catgets.c28
-rw-r--r--lib/libc/nls/catopen.382
-rw-r--r--lib/libc/nls/catopen.c26
-rw-r--r--lib/libc/nls/msgcat.c428
-rw-r--r--lib/libc/nls/msgcat.h170
-rw-r--r--lib/libc/quad/Makefile.inc19
-rw-r--r--lib/libc/quad/TESTS/Makefile11
-rw-r--r--lib/libc/quad/TESTS/divrem.c78
-rw-r--r--lib/libc/quad/TESTS/mul.c74
-rw-r--r--lib/libc/quad/adddi3.c60
-rw-r--r--lib/libc/quad/anddi3.c58
-rw-r--r--lib/libc/quad/ashldi3.c66
-rw-r--r--lib/libc/quad/ashrdi3.c75
-rw-r--r--lib/libc/quad/cmpdi2.c59
-rw-r--r--lib/libc/quad/divdi3.c65
-rw-r--r--lib/libc/quad/fixdfdi.c62
-rw-r--r--lib/libc/quad/fixsfdi.c63
-rw-r--r--lib/libc/quad/fixunsdfdi.c96
-rw-r--r--lib/libc/quad/fixunssfdi.c100
-rw-r--r--lib/libc/quad/floatdidf.c74
-rw-r--r--lib/libc/quad/floatdisf.c76
-rw-r--r--lib/libc/quad/floatunsdidf.c59
-rw-r--r--lib/libc/quad/iordi3.c58
-rw-r--r--lib/libc/quad/lshldi3.c66
-rw-r--r--lib/libc/quad/lshrdi3.c65
-rw-r--r--lib/libc/quad/moddi3.c67
-rw-r--r--lib/libc/quad/muldi3.c246
-rw-r--r--lib/libc/quad/negdi2.c57
-rw-r--r--lib/libc/quad/notdi2.c58
-rw-r--r--lib/libc/quad/qdivrem.c279
-rw-r--r--lib/libc/quad/quad.h115
-rw-r--r--lib/libc/quad/subdi3.c59
-rw-r--r--lib/libc/quad/ucmpdi2.c58
-rw-r--r--lib/libc/quad/udivdi3.c53
-rw-r--r--lib/libc/quad/umoddi3.c55
-rw-r--r--lib/libc/quad/xordi3.c58
-rw-r--r--lib/libc/regex/COPYRIGHT56
-rw-r--r--lib/libc/regex/Makefile.inc17
-rw-r--r--lib/libc/regex/WHATSNEW94
-rw-r--r--lib/libc/regex/cclass.h62
-rw-r--r--lib/libc/regex/cname.h141
-rw-r--r--lib/libc/regex/engine.c1092
-rw-r--r--lib/libc/regex/re_format.7269
-rw-r--r--lib/libc/regex/regcomp.c1777
-rw-r--r--lib/libc/regex/regerror.c178
-rw-r--r--lib/libc/regex/regex.3540
-rw-r--r--lib/libc/regex/regex2.h173
-rw-r--r--lib/libc/regex/regexec.c181
-rw-r--r--lib/libc/regex/regfree.c80
-rw-r--r--lib/libc/regex/utils.h57
-rw-r--r--lib/libc/rpc/DISCLAIMER28
-rw-r--r--lib/libc/rpc/Makefile.inc119
-rw-r--r--lib/libc/rpc/PSD.doc/nfs.rfc.ms1372
-rw-r--r--lib/libc/rpc/PSD.doc/rpc.prog.ms2684
-rw-r--r--lib/libc/rpc/PSD.doc/rpc.rfc.ms1302
-rw-r--r--lib/libc/rpc/PSD.doc/rpcgen.ms1299
-rw-r--r--lib/libc/rpc/PSD.doc/xdr.nts.ms1966
-rw-r--r--lib/libc/rpc/PSD.doc/xdr.rfc.ms1058
-rw-r--r--lib/libc/rpc/README233
-rw-r--r--lib/libc/rpc/auth_des.c554
-rw-r--r--lib/libc/rpc/auth_none.c136
-rw-r--r--lib/libc/rpc/auth_time.c501
-rw-r--r--lib/libc/rpc/auth_unix.c349
-rw-r--r--lib/libc/rpc/authdes_prot.c82
-rw-r--r--lib/libc/rpc/authunix_prot.c68
-rw-r--r--lib/libc/rpc/bindresvport.330
-rw-r--r--lib/libc/rpc/bindresvport.c107
-rw-r--r--lib/libc/rpc/clnt_generic.c137
-rw-r--r--lib/libc/rpc/clnt_perror.c254
-rw-r--r--lib/libc/rpc/clnt_raw.c242
-rw-r--r--lib/libc/rpc/clnt_simple.c122
-rw-r--r--lib/libc/rpc/clnt_tcp.c580
-rw-r--r--lib/libc/rpc/clnt_udp.c567
-rw-r--r--lib/libc/rpc/clnt_unix.c635
-rw-r--r--lib/libc/rpc/crypt_client.c89
-rw-r--r--lib/libc/rpc/des_crypt.3126
-rw-r--r--lib/libc/rpc/des_crypt.c153
-rw-r--r--lib/libc/rpc/des_soft.c67
-rw-r--r--lib/libc/rpc/get_myaddress.c112
-rw-r--r--lib/libc/rpc/getpublickey.c45
-rw-r--r--lib/libc/rpc/getrpcent.396
-rw-r--r--lib/libc/rpc/getrpcent.c303
-rw-r--r--lib/libc/rpc/getrpcport.329
-rw-r--r--lib/libc/rpc/getrpcport.c63
-rw-r--r--lib/libc/rpc/key_call.c425
-rw-r--r--lib/libc/rpc/key_prot_xdr.c166
-rw-r--r--lib/libc/rpc/netname.c136
-rw-r--r--lib/libc/rpc/netnamer.c327
-rw-r--r--lib/libc/rpc/pmap_clnt.c149
-rw-r--r--lib/libc/rpc/pmap_getmaps.c86
-rw-r--r--lib/libc/rpc/pmap_getport.c91
-rw-r--r--lib/libc/rpc/pmap_prot.c59
-rw-r--r--lib/libc/rpc/pmap_prot2.c118
-rw-r--r--lib/libc/rpc/pmap_rmt.c415
-rw-r--r--lib/libc/rpc/publickey.344
-rw-r--r--lib/libc/rpc/publickey.537
-rw-r--r--lib/libc/rpc/rpc.31737
-rw-r--r--lib/libc/rpc/rpc.534
-rw-r--r--lib/libc/rpc/rpc_callmsg.c193
-rw-r--r--lib/libc/rpc/rpc_commondata.c43
-rw-r--r--lib/libc/rpc/rpc_dtablesize.c61
-rw-r--r--lib/libc/rpc/rpc_prot.c297
-rw-r--r--lib/libc/rpc/rpc_secure.3228
-rw-r--r--lib/libc/rpc/rpcdname.c77
-rw-r--r--lib/libc/rpc/rstat.157
-rw-r--r--lib/libc/rpc/rstat_svc.821
-rw-r--r--lib/libc/rpc/rtime.343
-rw-r--r--lib/libc/rpc/rtime.c157
-rw-r--r--lib/libc/rpc/svc.c494
-rw-r--r--lib/libc/rpc/svc_auth.c211
-rw-r--r--lib/libc/rpc/svc_auth_des.c531
-rw-r--r--lib/libc/rpc/svc_auth_unix.c148
-rw-r--r--lib/libc/rpc/svc_raw.c168
-rw-r--r--lib/libc/rpc/svc_run.c87
-rw-r--r--lib/libc/rpc/svc_simple.c150
-rw-r--r--lib/libc/rpc/svc_tcp.c448
-rw-r--r--lib/libc/rpc/svc_udp.c480
-rw-r--r--lib/libc/rpc/svc_unix.c511
-rw-r--r--lib/libc/stdio/Makefile.inc43
-rw-r--r--lib/libc/stdio/asprintf.c59
-rw-r--r--lib/libc/stdio/clrerr.c63
-rw-r--r--lib/libc/stdio/fclose.393
-rw-r--r--lib/libc/stdio/fclose.c83
-rw-r--r--lib/libc/stdio/fdopen.c89
-rw-r--r--lib/libc/stdio/feof.c57
-rw-r--r--lib/libc/stdio/ferror.3100
-rw-r--r--lib/libc/stdio/ferror.c57
-rw-r--r--lib/libc/stdio/fflush.3110
-rw-r--r--lib/libc/stdio/fflush.c108
-rw-r--r--lib/libc/stdio/fgetc.c64
-rw-r--r--lib/libc/stdio/fgetln.3124
-rw-r--r--lib/libc/stdio/fgetln.c165
-rw-r--r--lib/libc/stdio/fgetpos.c65
-rw-r--r--lib/libc/stdio/fgets.3156
-rw-r--r--lib/libc/stdio/fgets.c126
-rw-r--r--lib/libc/stdio/fileno.c57
-rw-r--r--lib/libc/stdio/findfp.c175
-rw-r--r--lib/libc/stdio/flags.c95
-rw-r--r--lib/libc/stdio/floatio.h46
-rw-r--r--lib/libc/stdio/fopen.3237
-rw-r--r--lib/libc/stdio/fopen.c84
-rw-r--r--lib/libc/stdio/fprintf.c73
-rw-r--r--lib/libc/stdio/fpurge.c81
-rw-r--r--lib/libc/stdio/fputc.c65
-rw-r--r--lib/libc/stdio/fputs.3107
-rw-r--r--lib/libc/stdio/fputs.c77
-rw-r--r--lib/libc/stdio/fread.3106
-rw-r--r--lib/libc/stdio/fread.c96
-rw-r--r--lib/libc/stdio/freopen.c155
-rw-r--r--lib/libc/stdio/fscanf.c84
-rw-r--r--lib/libc/stdio/fseek.3188
-rw-r--r--lib/libc/stdio/fseek.c276
-rw-r--r--lib/libc/stdio/fsetpos.c56
-rw-r--r--lib/libc/stdio/ftell.c106
-rw-r--r--lib/libc/stdio/funopen.3169
-rw-r--r--lib/libc/stdio/funopen.c81
-rw-r--r--lib/libc/stdio/fvwrite.c196
-rw-r--r--lib/libc/stdio/fvwrite.h56
-rw-r--r--lib/libc/stdio/fwalk.c64
-rw-r--r--lib/libc/stdio/fwrite.c86
-rw-r--r--lib/libc/stdio/getc.3136
-rw-r--r--lib/libc/stdio/getc.c69
-rw-r--r--lib/libc/stdio/getchar.c68
-rw-r--r--lib/libc/stdio/gets.c75
-rw-r--r--lib/libc/stdio/getw.c54
-rw-r--r--lib/libc/stdio/glue.h47
-rw-r--r--lib/libc/stdio/local.h87
-rw-r--r--lib/libc/stdio/makebuf.c118
-rw-r--r--lib/libc/stdio/mktemp.3158
-rw-r--r--lib/libc/stdio/mktemp.c131
-rw-r--r--lib/libc/stdio/perror.c67
-rw-r--r--lib/libc/stdio/printf.3666
-rw-r--r--lib/libc/stdio/printf.c72
-rw-r--r--lib/libc/stdio/putc.3129
-rw-r--r--lib/libc/stdio/putc.c70
-rw-r--r--lib/libc/stdio/putchar.c71
-rw-r--r--lib/libc/stdio/puts.c80
-rw-r--r--lib/libc/stdio/putw.c73
-rw-r--r--lib/libc/stdio/refill.c135
-rw-r--r--lib/libc/stdio/remove.378
-rw-r--r--lib/libc/stdio/remove.c53
-rw-r--r--lib/libc/stdio/rewind.c65
-rw-r--r--lib/libc/stdio/rget.c64
-rw-r--r--lib/libc/stdio/scanf.3439
-rw-r--r--lib/libc/stdio/scanf.c83
-rw-r--r--lib/libc/stdio/setbuf.3202
-rw-r--r--lib/libc/stdio/setbuf.c50
-rw-r--r--lib/libc/stdio/setbuffer.c66
-rw-r--r--lib/libc/stdio/setvbuf.c178
-rw-r--r--lib/libc/stdio/snprintf.c89
-rw-r--r--lib/libc/stdio/sprintf.c81
-rw-r--r--lib/libc/stdio/sscanf.c97
-rw-r--r--lib/libc/stdio/stdio.3287
-rw-r--r--lib/libc/stdio/stdio.c111
-rw-r--r--lib/libc/stdio/tempnam.c91
-rw-r--r--lib/libc/stdio/tmpfile.c79
-rw-r--r--lib/libc/stdio/tmpnam.3219
-rw-r--r--lib/libc/stdio/tmpnam.c58
-rw-r--r--lib/libc/stdio/ungetc.395
-rw-r--r--lib/libc/stdio/ungetc.c183
-rw-r--r--lib/libc/stdio/vasprintf.c142
-rw-r--r--lib/libc/stdio/vfprintf.c1284
-rw-r--r--lib/libc/stdio/vfscanf.c791
-rw-r--r--lib/libc/stdio/vprintf.c53
-rw-r--r--lib/libc/stdio/vscanf.c66
-rw-r--r--lib/libc/stdio/vsnprintf.c72
-rw-r--r--lib/libc/stdio/vsprintf.c64
-rw-r--r--lib/libc/stdio/vsscanf.c78
-rw-r--r--lib/libc/stdio/wbuf.c93
-rw-r--r--lib/libc/stdio/wsetup.c95
-rw-r--r--lib/libc/stdlib/Makefile.inc30
-rw-r--r--lib/libc/stdlib/abort.370
-rw-r--r--lib/libc/stdlib/abort.c86
-rw-r--r--lib/libc/stdlib/abs.374
-rw-r--r--lib/libc/stdlib/abs.c45
-rw-r--r--lib/libc/stdlib/alloca.378
-rw-r--r--lib/libc/stdlib/atexit.377
-rw-r--r--lib/libc/stdlib/atexit.c69
-rw-r--r--lib/libc/stdlib/atexit.h45
-rw-r--r--lib/libc/stdlib/atof.387
-rw-r--r--lib/libc/stdlib/atof.c46
-rw-r--r--lib/libc/stdlib/atoi.373
-rw-r--r--lib/libc/stdlib/atoi.c46
-rw-r--r--lib/libc/stdlib/atol.374
-rw-r--r--lib/libc/stdlib/atol.c46
-rw-r--r--lib/libc/stdlib/bsearch.390
-rw-r--r--lib/libc/stdlib/bsearch.c81
-rw-r--r--lib/libc/stdlib/calloc.c52
-rw-r--r--lib/libc/stdlib/div.367
-rw-r--r--lib/libc/stdlib/div.c79
-rw-r--r--lib/libc/stdlib/exit.389
-rw-r--r--lib/libc/stdlib/exit.c60
-rw-r--r--lib/libc/stdlib/getenv.3151
-rw-r--r--lib/libc/stdlib/getenv.c91
-rw-r--r--lib/libc/stdlib/getopt.3262
-rw-r--r--lib/libc/stdlib/getopt.c117
-rw-r--r--lib/libc/stdlib/getsubopt.3146
-rw-r--r--lib/libc/stdlib/getsubopt.c99
-rw-r--r--lib/libc/stdlib/heapsort.c183
-rw-r--r--lib/libc/stdlib/labs.366
-rw-r--r--lib/libc/stdlib/labs.c45
-rw-r--r--lib/libc/stdlib/ldiv.370
-rw-r--r--lib/libc/stdlib/ldiv.c58
-rw-r--r--lib/libc/stdlib/malloc.3424
-rw-r--r--lib/libc/stdlib/malloc.c1136
-rw-r--r--lib/libc/stdlib/memory.371
-rw-r--r--lib/libc/stdlib/merge.c347
-rw-r--r--lib/libc/stdlib/putenv.c58
-rw-r--r--lib/libc/stdlib/qsort.3233
-rw-r--r--lib/libc/stdlib/qsort.c178
-rw-r--r--lib/libc/stdlib/radixsort.3161
-rw-r--r--lib/libc/stdlib/radixsort.c318
-rw-r--r--lib/libc/stdlib/rand.384
-rw-r--r--lib/libc/stdlib/rand.c54
-rw-r--r--lib/libc/stdlib/random.3189
-rw-r--r--lib/libc/stdlib/random.c494
-rw-r--r--lib/libc/stdlib/realpath.3125
-rw-r--r--lib/libc/stdlib/realpath.c163
-rw-r--r--lib/libc/stdlib/setenv.c117
-rw-r--r--lib/libc/stdlib/strhash.c436
-rw-r--r--lib/libc/stdlib/strtod.3132
-rw-r--r--lib/libc/stdlib/strtod.c2443
-rw-r--r--lib/libc/stdlib/strtol.3168
-rw-r--r--lib/libc/stdlib/strtol.c131
-rw-r--r--lib/libc/stdlib/strtoll.c138
-rw-r--r--lib/libc/stdlib/strtoq.c138
-rw-r--r--lib/libc/stdlib/strtoul.3163
-rw-r--r--lib/libc/stdlib/strtoul.c109
-rw-r--r--lib/libc/stdlib/strtoull.c116
-rw-r--r--lib/libc/stdlib/strtouq.c116
-rw-r--r--lib/libc/stdlib/system.396
-rw-r--r--lib/libc/stdlib/system.c92
-rw-r--r--lib/libc/stdtime/Makefile.inc15
-rw-r--r--lib/libc/stdtime/asctime.c61
-rw-r--r--lib/libc/stdtime/ctime.3257
-rw-r--r--lib/libc/stdtime/difftime.c77
-rw-r--r--lib/libc/stdtime/localtime.c1754
-rw-r--r--lib/libc/stdtime/private.h218
-rw-r--r--lib/libc/stdtime/strftime.3247
-rw-r--r--lib/libc/stdtime/strftime.c421
-rw-r--r--lib/libc/stdtime/strptime.385
-rw-r--r--lib/libc/stdtime/strptime.c349
-rw-r--r--lib/libc/stdtime/time2posix.3114
-rw-r--r--lib/libc/stdtime/timelocal.c197
-rw-r--r--lib/libc/stdtime/timelocal.h51
-rw-r--r--lib/libc/stdtime/tzfile.5122
-rw-r--r--lib/libc/stdtime/tzfile.h187
-rw-r--r--lib/libc/string/Makefile.inc30
-rw-r--r--lib/libc/string/bcmp.372
-rw-r--r--lib/libc/string/bcmp.c59
-rw-r--r--lib/libc/string/bcopy.371
-rw-r--r--lib/libc/string/bcopy.c139
-rw-r--r--lib/libc/string/bstring.3109
-rw-r--r--lib/libc/string/bzero.368
-rw-r--r--lib/libc/string/bzero.c2
-rw-r--r--lib/libc/string/ffs.361
-rw-r--r--lib/libc/string/ffs.c54
-rw-r--r--lib/libc/string/index.380
-rw-r--r--lib/libc/string/index.c57
-rw-r--r--lib/libc/string/memccpy.373
-rw-r--r--lib/libc/string/memccpy.c59
-rw-r--r--lib/libc/string/memchr.381
-rw-r--r--lib/libc/string/memchr.c59
-rw-r--r--lib/libc/string/memcmp.383
-rw-r--r--lib/libc/string/memcmp.c61
-rw-r--r--lib/libc/string/memcpy.383
-rw-r--r--lib/libc/string/memcpy.c2
-rw-r--r--lib/libc/string/memmove.375
-rw-r--r--lib/libc/string/memmove.c2
-rw-r--r--lib/libc/string/memset.370
-rw-r--r--lib/libc/string/memset.c130
-rw-r--r--lib/libc/string/rindex.382
-rw-r--r--lib/libc/string/rindex.c59
-rw-r--r--lib/libc/string/strcasecmp.387
-rw-r--r--lib/libc/string/strcasecmp.c76
-rw-r--r--lib/libc/string/strcat.396
-rw-r--r--lib/libc/string/strcat.c50
-rw-r--r--lib/libc/string/strchr.387
-rw-r--r--lib/libc/string/strchr.c2
-rw-r--r--lib/libc/string/strcmp.393
-rw-r--r--lib/libc/string/strcmp.c55
-rw-r--r--lib/libc/string/strcoll.372
-rw-r--r--lib/libc/string/strcoll.c78
-rw-r--r--lib/libc/string/strcpy.3121
-rw-r--r--lib/libc/string/strcpy.c50
-rw-r--r--lib/libc/string/strcspn.384
-rw-r--r--lib/libc/string/strcspn.c68
-rw-r--r--lib/libc/string/strdup.365
-rw-r--r--lib/libc/string/strdup.c54
-rw-r--r--lib/libc/string/strerror.3130
-rw-r--r--lib/libc/string/strerror.c71
-rw-r--r--lib/libc/string/string.3156
-rw-r--r--lib/libc/string/strlen.370
-rw-r--r--lib/libc/string/strlen.c50
-rw-r--r--lib/libc/string/strmode.3150
-rw-r--r--lib/libc/string/strmode.c152
-rw-r--r--lib/libc/string/strncat.c68
-rw-r--r--lib/libc/string/strncmp.c57
-rw-r--r--lib/libc/string/strncpy.c68
-rw-r--r--lib/libc/string/strpbrk.379
-rw-r--r--lib/libc/string/strpbrk.c57
-rw-r--r--lib/libc/string/strrchr.390
-rw-r--r--lib/libc/string/strrchr.c2
-rw-r--r--lib/libc/string/strsep.3109
-rw-r--r--lib/libc/string/strsep.c80
-rw-r--r--lib/libc/string/strspn.379
-rw-r--r--lib/libc/string/strspn.c61
-rw-r--r--lib/libc/string/strstr.388
-rw-r--r--lib/libc/string/strstr.c65
-rw-r--r--lib/libc/string/strtok.3110
-rw-r--r--lib/libc/string/strtok.c90
-rw-r--r--lib/libc/string/strxfrm.377
-rw-r--r--lib/libc/string/strxfrm.c92
-rw-r--r--lib/libc/string/swab.365
-rw-r--r--lib/libc/string/swab.c65
-rw-r--r--lib/libc/sys/Makefile.inc152
-rw-r--r--lib/libc/sys/_exit.2118
-rw-r--r--lib/libc/sys/accept.2192
-rw-r--r--lib/libc/sys/access.2135
-rw-r--r--lib/libc/sys/acct.2114
-rw-r--r--lib/libc/sys/adjtime.2111
-rw-r--r--lib/libc/sys/bind.2146
-rw-r--r--lib/libc/sys/brk.2149
-rw-r--r--lib/libc/sys/chdir.2133
-rw-r--r--lib/libc/sys/chflags.2166
-rw-r--r--lib/libc/sys/chmod.2209
-rw-r--r--lib/libc/sys/chown.2169
-rw-r--r--lib/libc/sys/chroot.297
-rw-r--r--lib/libc/sys/clock_gettime.2124
-rw-r--r--lib/libc/sys/close.2149
-rw-r--r--lib/libc/sys/connect.2170
-rw-r--r--lib/libc/sys/dup.2204
-rw-r--r--lib/libc/sys/execve.2279
-rw-r--r--lib/libc/sys/fcntl.2518
-rw-r--r--lib/libc/sys/flock.2171
-rw-r--r--lib/libc/sys/fork.2124
-rw-r--r--lib/libc/sys/fsync.2103
-rw-r--r--lib/libc/sys/ftruncate.c68
-rw-r--r--lib/libc/sys/getdirentries.2182
-rw-r--r--lib/libc/sys/getdtablesize.260
-rw-r--r--lib/libc/sys/getfh.294
-rw-r--r--lib/libc/sys/getfsstat.2171
-rw-r--r--lib/libc/sys/getgid.282
-rw-r--r--lib/libc/sys/getgroups.290
-rw-r--r--lib/libc/sys/getitimer.2176
-rw-r--r--lib/libc/sys/getlogin.2165
-rw-r--r--lib/libc/sys/getpeername.2113
-rw-r--r--lib/libc/sys/getpgrp.2122
-rw-r--r--lib/libc/sys/getpid.279
-rw-r--r--lib/libc/sys/getpriority.2142
-rw-r--r--lib/libc/sys/getrlimit.2183
-rw-r--r--lib/libc/sys/getrusage.2175
-rw-r--r--lib/libc/sys/getsid.277
-rw-r--r--lib/libc/sys/getsockname.2112
-rw-r--r--lib/libc/sys/getsockopt.2397
-rw-r--r--lib/libc/sys/gettimeofday.2128
-rw-r--r--lib/libc/sys/getuid.292
-rw-r--r--lib/libc/sys/intro.2710
-rw-r--r--lib/libc/sys/ioctl.2129
-rw-r--r--lib/libc/sys/issetugid.294
-rw-r--r--lib/libc/sys/kill.2137
-rw-r--r--lib/libc/sys/ktrace.2163
-rw-r--r--lib/libc/sys/link.2159
-rw-r--r--lib/libc/sys/listen.2142
-rw-r--r--lib/libc/sys/lseek.2141
-rw-r--r--lib/libc/sys/lseek.c69
-rw-r--r--lib/libc/sys/madvise.2127
-rw-r--r--lib/libc/sys/mincore.288
-rw-r--r--lib/libc/sys/minherit.294
-rw-r--r--lib/libc/sys/mkdir.2113
-rw-r--r--lib/libc/sys/mkfifo.2123
-rw-r--r--lib/libc/sys/mknod.2121
-rw-r--r--lib/libc/sys/mlock.2162
-rw-r--r--lib/libc/sys/mmap.2241
-rw-r--r--lib/libc/sys/mmap.c58
-rw-r--r--lib/libc/sys/mount.2325
-rw-r--r--lib/libc/sys/mprotect.287
-rw-r--r--lib/libc/sys/msync.298
-rw-r--r--lib/libc/sys/munmap.282
-rw-r--r--lib/libc/sys/nanosleep.2120
-rw-r--r--lib/libc/sys/nfssvc.2250
-rw-r--r--lib/libc/sys/open.2292
-rw-r--r--lib/libc/sys/pathconf.2164
-rw-r--r--lib/libc/sys/pipe.2119
-rw-r--r--lib/libc/sys/poll.2188
-rw-r--r--lib/libc/sys/profil.2136
-rw-r--r--lib/libc/sys/ptrace.2293
-rw-r--r--lib/libc/sys/quotactl.2216
-rw-r--r--lib/libc/sys/read.2236
-rw-r--r--lib/libc/sys/readlink.296
-rw-r--r--lib/libc/sys/reboot.2160
-rw-r--r--lib/libc/sys/recv.2291
-rw-r--r--lib/libc/sys/rename.2199
-rw-r--r--lib/libc/sys/revoke.2106
-rw-r--r--lib/libc/sys/rfork.2137
-rw-r--r--lib/libc/sys/rmdir.2104
-rw-r--r--lib/libc/sys/rtprio.2108
-rw-r--r--lib/libc/sys/select.2191
-rw-r--r--lib/libc/sys/semctl.2173
-rw-r--r--lib/libc/sys/semget.2138
-rw-r--r--lib/libc/sys/semop.2192
-rw-r--r--lib/libc/sys/send.2185
-rw-r--r--lib/libc/sys/setgroups.283
-rw-r--r--lib/libc/sys/setpgid.290
-rw-r--r--lib/libc/sys/setregid.292
-rw-r--r--lib/libc/sys/setreuid.290
-rw-r--r--lib/libc/sys/setsid.282
-rw-r--r--lib/libc/sys/setuid.2161
-rw-r--r--lib/libc/sys/shmat.2110
-rw-r--r--lib/libc/sys/shmctl.2136
-rw-r--r--lib/libc/sys/shmget.2138
-rw-r--r--lib/libc/sys/shutdown.282
-rw-r--r--lib/libc/sys/sigaction.2410
-rw-r--r--lib/libc/sys/sigaltstack.2166
-rw-r--r--lib/libc/sys/sigpending.272
-rw-r--r--lib/libc/sys/sigprocmask.2120
-rw-r--r--lib/libc/sys/sigreturn.2111
-rw-r--r--lib/libc/sys/sigstack.251
-rw-r--r--lib/libc/sys/sigsuspend.280
-rw-r--r--lib/libc/sys/socket.2272
-rw-r--r--lib/libc/sys/socketpair.291
-rw-r--r--lib/libc/sys/stat.2292
-rw-r--r--lib/libc/sys/statfs.2181
-rw-r--r--lib/libc/sys/swapon.2111
-rw-r--r--lib/libc/sys/symlink.2136
-rw-r--r--lib/libc/sys/sync.274
-rw-r--r--lib/libc/sys/syscall.276
-rw-r--r--lib/libc/sys/truncate.2128
-rw-r--r--lib/libc/sys/truncate.c54
-rw-r--r--lib/libc/sys/umask.288
-rw-r--r--lib/libc/sys/undelete.2105
-rw-r--r--lib/libc/sys/unlink.2119
-rw-r--r--lib/libc/sys/utimes.2116
-rw-r--r--lib/libc/sys/vfork.2130
-rw-r--r--lib/libc/sys/wait.2298
-rw-r--r--lib/libc/sys/write.2252
-rw-r--r--lib/libc/xdr/Makefile.inc43
-rw-r--r--lib/libc/xdr/xdr.3825
-rw-r--r--lib/libc/xdr/xdr.c719
-rw-r--r--lib/libc/xdr/xdr_array.c155
-rw-r--r--lib/libc/xdr/xdr_float.c314
-rw-r--r--lib/libc/xdr/xdr_mem.c242
-rw-r--r--lib/libc/xdr/xdr_rec.c586
-rw-r--r--lib/libc/xdr/xdr_reference.c136
-rw-r--r--lib/libc/xdr/xdr_sizeof.c163
-rw-r--r--lib/libc/xdr/xdr_stdio.c189
-rw-r--r--lib/libc/yp/Makefile.inc17
-rw-r--r--lib/libc/yp/xdryp.c119
-rw-r--r--lib/libc/yp/yplib.c1033
-rw-r--r--lib/libc_r/Makefile21
-rw-r--r--lib/libc_r/man/Makefile.inc17
-rw-r--r--lib/libc_r/man/pthread_create.3109
-rw-r--r--lib/libc_r/man/pthread_detach.379
-rw-r--r--lib/libc_r/man/pthread_equal.366
-rw-r--r--lib/libc_r/man/pthread_exit.399
-rw-r--r--lib/libc_r/man/pthread_getspecific.382
-rw-r--r--lib/libc_r/man/pthread_join.3100
-rw-r--r--lib/libc_r/man/pthread_key_create.398
-rw-r--r--lib/libc_r/man/pthread_key_delete.392
-rw-r--r--lib/libc_r/man/pthread_once.3100
-rw-r--r--lib/libc_r/man/pthread_self.359
-rw-r--r--lib/libc_r/man/pthread_setspecific.391
-rw-r--r--lib/libc_r/sys/Makefile.inc5
-rw-r--r--lib/libc_r/sys/__error.c50
-rw-r--r--lib/libc_r/uthread/Makefile.inc94
-rw-r--r--lib/libc_r/uthread/pthread_private.h783
-rw-r--r--lib/libc_r/uthread/uthread_accept.c97
-rw-r--r--lib/libc_r/uthread/uthread_attr_destroy.c60
-rw-r--r--lib/libc_r/uthread/uthread_attr_getdetachstate.c57
-rw-r--r--lib/libc_r/uthread/uthread_attr_getstackaddr.c52
-rw-r--r--lib/libc_r/uthread/uthread_attr_getstacksize.c52
-rw-r--r--lib/libc_r/uthread/uthread_attr_init.c59
-rw-r--r--lib/libc_r/uthread/uthread_attr_setcreatesuspend.c0
-rw-r--r--lib/libc_r/uthread/uthread_attr_setcreatesuspend_np.c51
-rw-r--r--lib/libc_r/uthread/uthread_attr_setdetachstate.c59
-rw-r--r--lib/libc_r/uthread/uthread_attr_setprio.c50
-rw-r--r--lib/libc_r/uthread/uthread_attr_setstackaddr.c52
-rw-r--r--lib/libc_r/uthread/uthread_attr_setstacksize.c52
-rw-r--r--lib/libc_r/uthread/uthread_autoinit.cc88
-rw-r--r--lib/libc_r/uthread/uthread_bind.c50
-rw-r--r--lib/libc_r/uthread/uthread_clean.c68
-rw-r--r--lib/libc_r/uthread/uthread_close.c96
-rw-r--r--lib/libc_r/uthread/uthread_cond.c334
-rw-r--r--lib/libc_r/uthread/uthread_condattr_destroy.c51
-rw-r--r--lib/libc_r/uthread/uthread_condattr_init.c57
-rw-r--r--lib/libc_r/uthread/uthread_connect.c76
-rw-r--r--lib/libc_r/uthread/uthread_create.c280
-rw-r--r--lib/libc_r/uthread/uthread_detach.c74
-rw-r--r--lib/libc_r/uthread/uthread_dup.c37
-rw-r--r--lib/libc_r/uthread/uthread_dup2.c74
-rw-r--r--lib/libc_r/uthread/uthread_equal.c43
-rw-r--r--lib/libc_r/uthread/uthread_execve.c112
-rw-r--r--lib/libc_r/uthread/uthread_exit.c205
-rw-r--r--lib/libc_r/uthread/uthread_fchmod.c50
-rw-r--r--lib/libc_r/uthread/uthread_fchown.c51
-rw-r--r--lib/libc_r/uthread/uthread_fcntl.c116
-rw-r--r--lib/libc_r/uthread/uthread_fd.c405
-rw-r--r--lib/libc_r/uthread/uthread_file.c125
-rw-r--r--lib/libc_r/uthread/uthread_flock.c49
-rw-r--r--lib/libc_r/uthread/uthread_fork.c92
-rw-r--r--lib/libc_r/uthread/uthread_fstat.c57
-rw-r--r--lib/libc_r/uthread/uthread_fstatfs.c57
-rw-r--r--lib/libc_r/uthread/uthread_fsync.c49
-rw-r--r--lib/libc_r/uthread/uthread_getdirentries.c50
-rw-r--r--lib/libc_r/uthread/uthread_getpeername.c50
-rw-r--r--lib/libc_r/uthread/uthread_getprio.c73
-rw-r--r--lib/libc_r/uthread/uthread_getsockname.c50
-rw-r--r--lib/libc_r/uthread/uthread_getsockopt.c50
-rw-r--r--lib/libc_r/uthread/uthread_info.c182
-rw-r--r--lib/libc_r/uthread/uthread_init.c228
-rw-r--r--lib/libc_r/uthread/uthread_ioctl.c53
-rw-r--r--lib/libc_r/uthread/uthread_join.c113
-rw-r--r--lib/libc_r/uthread/uthread_kern.c1739
-rw-r--r--lib/libc_r/uthread/uthread_kill.c78
-rw-r--r--lib/libc_r/uthread/uthread_listen.c50
-rw-r--r--lib/libc_r/uthread/uthread_longjmp.c45
-rw-r--r--lib/libc_r/uthread/uthread_mattr_init.c57
-rw-r--r--lib/libc_r/uthread/uthread_mattr_kind_np.c64
-rw-r--r--lib/libc_r/uthread/uthread_multi_np.c44
-rw-r--r--lib/libc_r/uthread/uthread_mutex.c377
-rw-r--r--lib/libc_r/uthread/uthread_mutexattr_destroy.c51
-rw-r--r--lib/libc_r/uthread/uthread_nanosleep.c118
-rw-r--r--lib/libc_r/uthread/uthread_once.c50
-rw-r--r--lib/libc_r/uthread/uthread_open.c80
-rw-r--r--lib/libc_r/uthread/uthread_pipe.c53
-rw-r--r--lib/libc_r/uthread/uthread_queue.c124
-rw-r--r--lib/libc_r/uthread/uthread_read.c83
-rw-r--r--lib/libc_r/uthread/uthread_readv.c83
-rw-r--r--lib/libc_r/uthread/uthread_recvfrom.c70
-rw-r--r--lib/libc_r/uthread/uthread_resume.c0
-rw-r--r--lib/libc_r/uthread/uthread_resume_np.c70
-rw-r--r--lib/libc_r/uthread/uthread_select.c172
-rw-r--r--lib/libc_r/uthread/uthread_self.c43
-rw-r--r--lib/libc_r/uthread/uthread_sendto.c63
-rw-r--r--lib/libc_r/uthread/uthread_seterrno.c61
-rw-r--r--lib/libc_r/uthread/uthread_setjmp.c44
-rw-r--r--lib/libc_r/uthread/uthread_setprio.c80
-rw-r--r--lib/libc_r/uthread/uthread_setsockopt.c50
-rw-r--r--lib/libc_r/uthread/uthread_shutdown.c71
-rw-r--r--lib/libc_r/uthread/uthread_sig.c167
-rw-r--r--lib/libc_r/uthread/uthread_sigaction.c82
-rw-r--r--lib/libc_r/uthread/uthread_sigblock.c48
-rw-r--r--lib/libc_r/uthread/uthread_sigmask.c92
-rw-r--r--lib/libc_r/uthread/uthread_signal.c57
-rw-r--r--lib/libc_r/uthread/uthread_sigprocmask.c92
-rw-r--r--lib/libc_r/uthread/uthread_sigsetmask.c48
-rw-r--r--lib/libc_r/uthread/uthread_sigsuspend.c66
-rw-r--r--lib/libc_r/uthread/uthread_sigwait.c73
-rw-r--r--lib/libc_r/uthread/uthread_single_np.c44
-rw-r--r--lib/libc_r/uthread/uthread_socket.c57
-rw-r--r--lib/libc_r/uthread/uthread_socketpair.c55
-rw-r--r--lib/libc_r/uthread/uthread_spec.c236
-rw-r--r--lib/libc_r/uthread/uthread_suspend.c0
-rw-r--r--lib/libc_r/uthread/uthread_suspend_np.c67
-rw-r--r--lib/libc_r/uthread/uthread_wait4.c61
-rw-r--r--lib/libc_r/uthread/uthread_write.c83
-rw-r--r--lib/libc_r/uthread/uthread_writev.c83
-rw-r--r--lib/libc_r/uthread/uthread_yield.c49
-rw-r--r--lib/libcalendar/Makefile20
-rw-r--r--lib/libcalendar/calendar.3197
-rw-r--r--lib/libcalendar/calendar.c329
-rw-r--r--lib/libcalendar/calendar.h42
-rw-r--r--lib/libcalendar/easter.c100
-rw-r--r--lib/libcom_err/Makefile14
-rw-r--r--lib/libcom_err/com_err.396
-rw-r--r--lib/libcom_err/com_err.c111
-rw-r--r--lib/libcom_err/com_err.h36
-rw-r--r--lib/libcom_err/doc/Makefile7
-rw-r--r--lib/libcom_err/doc/com_err.texinfo616
-rw-r--r--lib/libcom_err/error_message.c72
-rw-r--r--lib/libcom_err/error_table.h30
-rw-r--r--lib/libcom_err/et_name.c43
-rw-r--r--lib/libcom_err/init_et.c55
-rw-r--r--lib/libcom_err/internal.h18
-rw-r--r--lib/libcom_err/mit-sipb-copyright.h19
-rw-r--r--lib/libcom_err/test/test.c47
-rw-r--r--lib/libcom_err/test/test1.et69
-rw-r--r--lib/libcom_err/test/test2.et9
-rw-r--r--lib/libcompat/4.1/ascftime.c52
-rw-r--r--lib/libcompat/4.1/cftime.399
-rw-r--r--lib/libcompat/4.1/cftime.c53
-rw-r--r--lib/libcompat/4.1/ftime.384
-rw-r--r--lib/libcompat/4.1/ftime.c54
-rw-r--r--lib/libcompat/4.1/getpw.388
-rw-r--r--lib/libcompat/4.1/getpw.c58
-rw-r--r--lib/libcompat/4.1/gtty.c52
-rw-r--r--lib/libcompat/4.1/stty.395
-rw-r--r--lib/libcompat/4.1/stty.c52
-rw-r--r--lib/libcompat/4.1/vlimit.3125
-rw-r--r--lib/libcompat/4.1/vtimes.3143
-rw-r--r--lib/libcompat/4.3/cfree.349
-rw-r--r--lib/libcompat/4.3/cfree.c45
-rw-r--r--lib/libcompat/4.3/insque.388
-rw-r--r--lib/libcompat/4.3/insque.c57
-rw-r--r--lib/libcompat/4.3/lsearch.3103
-rw-r--r--lib/libcompat/4.3/lsearch.c93
-rw-r--r--lib/libcompat/4.3/re_comp.3124
-rw-r--r--lib/libcompat/4.3/regex.c96
-rw-r--r--lib/libcompat/4.3/remque.c55
-rw-r--r--lib/libcompat/4.3/rexec.3131
-rw-r--r--lib/libcompat/4.3/rexec.c389
-rw-r--r--lib/libcompat/4.4/cuserid.382
-rw-r--r--lib/libcompat/4.4/cuserid.c59
-rw-r--r--lib/libcompat/Makefile74
-rw-r--r--lib/libcompat/SysV/ftok.385
-rw-r--r--lib/libcompat/SysV/ftok.c47
-rw-r--r--lib/libcompat/regexp/COPYRIGHT22
-rw-r--r--lib/libcompat/regexp/README84
-rw-r--r--lib/libcompat/regexp/regerror.c18
-rw-r--r--lib/libcompat/regexp/regexp.3320
-rw-r--r--lib/libcompat/regexp/regexp.c1333
-rw-r--r--lib/libcompat/regexp/regmagic.h5
-rw-r--r--lib/libcompat/regexp/regsub.c81
-rw-r--r--lib/libcrypt/Makefile57
-rw-r--r--lib/libcrypt/crypt.c157
-rw-r--r--lib/libcurses/EXAMPLES/ex1.c112
-rw-r--r--lib/libcurses/Makefile22
-rw-r--r--lib/libcurses/PSD.doc/Makefile35
-rw-r--r--lib/libcurses/PSD.doc/Master54
-rw-r--r--lib/libcurses/PSD.doc/appen.A77
-rw-r--r--lib/libcurses/PSD.doc/appen.B201
-rw-r--r--lib/libcurses/PSD.doc/appen.C127
-rw-r--r--lib/libcurses/PSD.doc/appenA77
-rw-r--r--lib/libcurses/PSD.doc/c_macros70
-rw-r--r--lib/libcurses/PSD.doc/doc.I349
-rw-r--r--lib/libcurses/PSD.doc/doc.II142
-rw-r--r--lib/libcurses/PSD.doc/doc.III343
-rw-r--r--lib/libcurses/PSD.doc/doc.IV110
-rw-r--r--lib/libcurses/PSD.doc/ex1.c102
-rw-r--r--lib/libcurses/PSD.doc/ex2.c210
-rw-r--r--lib/libcurses/PSD.doc/fns.doc799
-rw-r--r--lib/libcurses/PSD.doc/intro.0106
-rw-r--r--lib/libcurses/PSD.doc/intro.1249
-rw-r--r--lib/libcurses/PSD.doc/intro.277
-rw-r--r--lib/libcurses/PSD.doc/intro.3228
-rw-r--r--lib/libcurses/PSD.doc/intro.469
-rw-r--r--lib/libcurses/PSD.doc/intro.587
-rw-r--r--lib/libcurses/PSD.doc/intro.644
-rw-r--r--lib/libcurses/PSD.doc/life.c163
-rw-r--r--lib/libcurses/PSD.doc/macros144
-rw-r--r--lib/libcurses/PSD.doc/twinkle1.c157
-rw-r--r--lib/libcurses/PSD.doc/twinkle2.c96
-rw-r--r--lib/libcurses/PSD.doc/win_st.c58
-rw-r--r--lib/libcurses/_putchar.c47
-rw-r--r--lib/libcurses/addbytes.c157
-rw-r--r--lib/libcurses/addch.c66
-rw-r--r--lib/libcurses/addnstr.c62
-rw-r--r--lib/libcurses/box.c78
-rw-r--r--lib/libcurses/clear.c53
-rw-r--r--lib/libcurses/clrtobot.c75
-rw-r--r--lib/libcurses/clrtoeol.c83
-rw-r--r--lib/libcurses/cr_put.c433
-rw-r--r--lib/libcurses/ctrace.c76
-rw-r--r--lib/libcurses/cur_hash.c62
-rw-r--r--lib/libcurses/curses.3207
-rw-r--r--lib/libcurses/curses.c80
-rw-r--r--lib/libcurses/curses.h392
-rw-r--r--lib/libcurses/delch.c63
-rw-r--r--lib/libcurses/deleteln.c82
-rw-r--r--lib/libcurses/delwin.c80
-rw-r--r--lib/libcurses/erase.c72
-rw-r--r--lib/libcurses/fullname.c60
-rw-r--r--lib/libcurses/getch.c77
-rw-r--r--lib/libcurses/getstr.c57
-rw-r--r--lib/libcurses/id_subwins.c65
-rw-r--r--lib/libcurses/idlok.c54
-rw-r--r--lib/libcurses/initscr.c95
-rw-r--r--lib/libcurses/insch.c74
-rw-r--r--lib/libcurses/insertln.c82
-rw-r--r--lib/libcurses/longname.c56
-rw-r--r--lib/libcurses/move.c62
-rw-r--r--lib/libcurses/mvwin.c77
-rw-r--r--lib/libcurses/newwin.c249
-rw-r--r--lib/libcurses/overlay.c82
-rw-r--r--lib/libcurses/overwrite.c76
-rw-r--r--lib/libcurses/printw.c200
-rw-r--r--lib/libcurses/putchar.c49
-rw-r--r--lib/libcurses/refresh.c850
-rw-r--r--lib/libcurses/scanw.c175
-rw-r--r--lib/libcurses/scroll.c71
-rw-r--r--lib/libcurses/setterm.c236
-rw-r--r--lib/libcurses/standout.c68
-rw-r--r--lib/libcurses/toucholap.c77
-rw-r--r--lib/libcurses/touchwin.c120
-rw-r--r--lib/libcurses/tscroll.c142
-rw-r--r--lib/libcurses/tstp.c128
-rw-r--r--lib/libcurses/tty.c286
-rw-r--r--lib/libcurses/unctrl.c107
-rw-r--r--lib/libdisk/Makefile60
-rw-r--r--lib/libdisk/blocks.c41
-rw-r--r--lib/libdisk/change.c82
-rw-r--r--lib/libdisk/chunk.c434
-rw-r--r--lib/libdisk/create_chunk.c358
-rw-r--r--lib/libdisk/disk.c386
-rw-r--r--lib/libdisk/disklabel.c33
-rw-r--r--lib/libdisk/libdisk.3339
-rw-r--r--lib/libdisk/libdisk.h326
-rw-r--r--lib/libdisk/rules.c316
-rw-r--r--lib/libdisk/tst01.c296
-rw-r--r--lib/libdisk/write_disk.c233
-rw-r--r--lib/libedit/Makefile67
-rw-r--r--lib/libedit/TEST/test.c241
-rw-r--r--lib/libedit/chared.c639
-rw-r--r--lib/libedit/chared.h158
-rw-r--r--lib/libedit/common.c992
-rw-r--r--lib/libedit/editline.3532
-rw-r--r--lib/libedit/editrc.5292
-rw-r--r--lib/libedit/el.c338
-rw-r--r--lib/libedit/el.h129
-rw-r--r--lib/libedit/emacs.c504
-rw-r--r--lib/libedit/hist.c170
-rw-r--r--lib/libedit/hist.h77
-rw-r--r--lib/libedit/history.c685
-rw-r--r--lib/libedit/key.c728
-rw-r--r--lib/libedit/key.h80
-rw-r--r--lib/libedit/makelist188
-rw-r--r--lib/libedit/map.c1397
-rw-r--r--lib/libedit/map.h77
-rw-r--r--lib/libedit/parse.c250
-rw-r--r--lib/libedit/parse.h50
-rw-r--r--lib/libedit/prompt.c123
-rw-r--r--lib/libedit/prompt.h59
-rw-r--r--lib/libedit/read.c446
-rw-r--r--lib/libedit/refresh.c1015
-rw-r--r--lib/libedit/refresh.h60
-rw-r--r--lib/libedit/search.c632
-rw-r--r--lib/libedit/search.h68
-rw-r--r--lib/libedit/sig.c193
-rw-r--r--lib/libedit/sig.h70
-rw-r--r--lib/libedit/sys.h115
-rw-r--r--lib/libedit/term.c1378
-rw-r--r--lib/libedit/term.h118
-rw-r--r--lib/libedit/tokenizer.c385
-rw-r--r--lib/libedit/tokenizer.h53
-rw-r--r--lib/libedit/tty.c1144
-rw-r--r--lib/libedit/tty.h481
-rw-r--r--lib/libedit/vi.c986
-rw-r--r--lib/libf2c/Makefile38
-rw-r--r--lib/libftpio/Makefile28
-rw-r--r--lib/libftpio/ftp.errors44
-rw-r--r--lib/libftpio/ftpio.3198
-rw-r--r--lib/libftpio/ftpio.c866
-rw-r--r--lib/libftpio/ftpio.h68
-rw-r--r--lib/libgnumalloc/Makefile30
-rw-r--r--lib/libgnumalloc/cfree.c5
-rw-r--r--lib/libipx/Makefile9
-rw-r--r--lib/libipx/ipx.3125
-rw-r--r--lib/libipx/ipx_addr.c227
-rw-r--r--lib/libipx/ipx_ntoa.c98
-rw-r--r--lib/libkse/Makefile21
-rw-r--r--lib/libkse/sys/Makefile.inc5
-rw-r--r--lib/libkse/thread/Makefile.inc94
-rw-r--r--lib/libkse/thread/thr_attr_destroy.c60
-rw-r--r--lib/libkse/thread/thr_attr_getdetachstate.c57
-rw-r--r--lib/libkse/thread/thr_attr_getstackaddr.c52
-rw-r--r--lib/libkse/thread/thr_attr_getstacksize.c52
-rw-r--r--lib/libkse/thread/thr_attr_init.c59
-rw-r--r--lib/libkse/thread/thr_attr_setcreatesuspend_np.c51
-rw-r--r--lib/libkse/thread/thr_attr_setdetachstate.c59
-rw-r--r--lib/libkse/thread/thr_attr_setstackaddr.c52
-rw-r--r--lib/libkse/thread/thr_attr_setstacksize.c52
-rw-r--r--lib/libkse/thread/thr_clean.c68
-rw-r--r--lib/libkse/thread/thr_close.c96
-rw-r--r--lib/libkse/thread/thr_cond.c334
-rw-r--r--lib/libkse/thread/thr_condattr_destroy.c51
-rw-r--r--lib/libkse/thread/thr_condattr_init.c57
-rw-r--r--lib/libkse/thread/thr_create.c280
-rw-r--r--lib/libkse/thread/thr_detach.c74
-rw-r--r--lib/libkse/thread/thr_equal.c43
-rw-r--r--lib/libkse/thread/thr_exit.c205
-rw-r--r--lib/libkse/thread/thr_fcntl.c116
-rw-r--r--lib/libkse/thread/thr_fork.c92
-rw-r--r--lib/libkse/thread/thr_fsync.c49
-rw-r--r--lib/libkse/thread/thr_getprio.c73
-rw-r--r--lib/libkse/thread/thr_info.c182
-rw-r--r--lib/libkse/thread/thr_init.c228
-rw-r--r--lib/libkse/thread/thr_join.c113
-rw-r--r--lib/libkse/thread/thr_kern.c1739
-rw-r--r--lib/libkse/thread/thr_kill.c78
-rw-r--r--lib/libkse/thread/thr_mattr_init.c57
-rw-r--r--lib/libkse/thread/thr_mattr_kind_np.c64
-rw-r--r--lib/libkse/thread/thr_multi_np.c44
-rw-r--r--lib/libkse/thread/thr_mutex.c377
-rw-r--r--lib/libkse/thread/thr_mutexattr_destroy.c51
-rw-r--r--lib/libkse/thread/thr_nanosleep.c118
-rw-r--r--lib/libkse/thread/thr_once.c50
-rw-r--r--lib/libkse/thread/thr_open.c80
-rw-r--r--lib/libkse/thread/thr_private.h783
-rw-r--r--lib/libkse/thread/thr_read.c83
-rw-r--r--lib/libkse/thread/thr_readv.c83
-rw-r--r--lib/libkse/thread/thr_resume_np.c70
-rw-r--r--lib/libkse/thread/thr_select.c172
-rw-r--r--lib/libkse/thread/thr_self.c43
-rw-r--r--lib/libkse/thread/thr_seterrno.c61
-rw-r--r--lib/libkse/thread/thr_setprio.c80
-rw-r--r--lib/libkse/thread/thr_sig.c167
-rw-r--r--lib/libkse/thread/thr_sigaction.c82
-rw-r--r--lib/libkse/thread/thr_sigmask.c92
-rw-r--r--lib/libkse/thread/thr_sigprocmask.c92
-rw-r--r--lib/libkse/thread/thr_sigsuspend.c66
-rw-r--r--lib/libkse/thread/thr_sigwait.c73
-rw-r--r--lib/libkse/thread/thr_single_np.c44
-rw-r--r--lib/libkse/thread/thr_spec.c236
-rw-r--r--lib/libkse/thread/thr_suspend_np.c67
-rw-r--r--lib/libkse/thread/thr_wait4.c61
-rw-r--r--lib/libkse/thread/thr_write.c83
-rw-r--r--lib/libkse/thread/thr_writev.c83
-rw-r--r--lib/libkse/thread/thr_yield.c49
-rw-r--r--lib/libkvm/Makefile14
-rw-r--r--lib/libkvm/kvm.3101
-rw-r--r--lib/libkvm/kvm.c545
-rw-r--r--lib/libkvm/kvm.h73
-rw-r--r--lib/libkvm/kvm_amd64.c194
-rw-r--r--lib/libkvm/kvm_file.c187
-rw-r--r--lib/libkvm/kvm_geterr.380
-rw-r--r--lib/libkvm/kvm_getfiles.385
-rw-r--r--lib/libkvm/kvm_getloadavg.363
-rw-r--r--lib/libkvm/kvm_getloadavg.c106
-rw-r--r--lib/libkvm/kvm_getprocs.3164
-rw-r--r--lib/libkvm/kvm_hp300.c286
-rw-r--r--lib/libkvm/kvm_i386.c194
-rw-r--r--lib/libkvm/kvm_mips.c207
-rw-r--r--lib/libkvm/kvm_nlist.388
-rw-r--r--lib/libkvm/kvm_open.3185
-rw-r--r--lib/libkvm/kvm_private.h82
-rw-r--r--lib/libkvm/kvm_proc.c722
-rw-r--r--lib/libkvm/kvm_read.393
-rw-r--r--lib/libkvm/kvm_sparc.c236
-rw-r--r--lib/libm/Makefile168
-rw-r--r--lib/libm/README279
-rw-r--r--lib/libm/common/atan2.c281
-rw-r--r--lib/libm/common/sincos.c98
-rw-r--r--lib/libm/common/tan.c74
-rw-r--r--lib/libm/common/trig.h215
-rw-r--r--lib/libm/common_source/acos.388
-rw-r--r--lib/libm/common_source/acosh.381
-rw-r--r--lib/libm/common_source/acosh.c102
-rw-r--r--lib/libm/common_source/asin.390
-rw-r--r--lib/libm/common_source/asincos.c169
-rw-r--r--lib/libm/common_source/asinh.369
-rw-r--r--lib/libm/common_source/asinh.c101
-rw-r--r--lib/libm/common_source/atan.374
-rw-r--r--lib/libm/common_source/atan.c87
-rw-r--r--lib/libm/common_source/atan2.3189
-rw-r--r--lib/libm/common_source/atanh.383
-rw-r--r--lib/libm/common_source/atanh.c83
-rw-r--r--lib/libm/common_source/ceil.365
-rw-r--r--lib/libm/common_source/cos.373
-rw-r--r--lib/libm/common_source/cosh.374
-rw-r--r--lib/libm/common_source/cosh.c133
-rw-r--r--lib/libm/common_source/erf.382
-rw-r--r--lib/libm/common_source/erf.c396
-rw-r--r--lib/libm/common_source/exp.3284
-rw-r--r--lib/libm/common_source/exp.c203
-rw-r--r--lib/libm/common_source/exp__E.c136
-rw-r--r--lib/libm/common_source/expm1.c167
-rw-r--r--lib/libm/common_source/fabs.366
-rw-r--r--lib/libm/common_source/floor.365
-rw-r--r--lib/libm/common_source/floor.c137
-rw-r--r--lib/libm/common_source/fmod.375
-rw-r--r--lib/libm/common_source/fmod.c155
-rw-r--r--lib/libm/common_source/gamma.c336
-rw-r--r--lib/libm/common_source/hypot.3124
-rw-r--r--lib/libm/common_source/ieee.3267
-rw-r--r--lib/libm/common_source/infnan.3180
-rw-r--r--lib/libm/common_source/j0.3126
-rw-r--r--lib/libm/common_source/j0.c439
-rw-r--r--lib/libm/common_source/j1.c446
-rw-r--r--lib/libm/common_source/jn.c311
-rw-r--r--lib/libm/common_source/lgamma.3123
-rw-r--r--lib/libm/common_source/lgamma.c307
-rw-r--r--lib/libm/common_source/log.c486
-rw-r--r--lib/libm/common_source/log10.c95
-rw-r--r--lib/libm/common_source/log1p.c170
-rw-r--r--lib/libm/common_source/log__L.c110
-rw-r--r--lib/libm/common_source/math.3630
-rw-r--r--lib/libm/common_source/mathimpl.h98
-rw-r--r--lib/libm/common_source/pow.c216
-rw-r--r--lib/libm/common_source/rint.3115
-rw-r--r--lib/libm/common_source/sin.372
-rw-r--r--lib/libm/common_source/sinh.374
-rw-r--r--lib/libm/common_source/sinh.c121
-rw-r--r--lib/libm/common_source/sqrt.3120
-rw-r--r--lib/libm/common_source/tan.373
-rw-r--r--lib/libm/common_source/tanh.370
-rw-r--r--lib/libm/common_source/tanh.c99
-rw-r--r--lib/libm/ieee/cabs.c230
-rw-r--r--lib/libm/ieee/cbrt.c120
-rw-r--r--lib/libm/ieee/support.c524
-rw-r--r--lib/libmd/Makefile93
-rw-r--r--lib/libmd/md2.copyright17
-rw-r--r--lib/libmd/md2.h44
-rw-r--r--lib/libmd/md2c.c199
-rw-r--r--lib/libmd/md4.copyright20
-rw-r--r--lib/libmd/md4.h46
-rw-r--r--lib/libmd/md4c.c279
-rw-r--r--lib/libmd/md5.copyright21
-rw-r--r--lib/libmd/md5.h4
-rw-r--r--lib/libmd/md5c.c331
-rw-r--r--lib/libmd/mdX.3137
-rw-r--r--lib/libmd/mdXhl.c71
-rw-r--r--lib/libmd/mddriver.c69
-rw-r--r--lib/libmytinfo/EXAMPLES/terminfo.src104
-rw-r--r--lib/libmytinfo/INSTALL211
-rw-r--r--lib/libmytinfo/Makefile58
-rw-r--r--lib/libmytinfo/README75
-rw-r--r--lib/libmytinfo/README.doc125
-rw-r--r--lib/libmytinfo/TESTS/Makefile42
-rw-r--r--lib/libmytinfo/TESTS/caps.c173
-rw-r--r--lib/libmytinfo/TESTS/clear.c156
-rw-r--r--lib/libmytinfo/TESTS/quit.c72
-rw-r--r--lib/libmytinfo/TESTS/tput.c196
-rw-r--r--lib/libmytinfo/TESTS/tset.c919
-rw-r--r--lib/libmytinfo/TESTS/ttest.c297
-rw-r--r--lib/libmytinfo/addstr.c88
-rw-r--r--lib/libmytinfo/bin_order48
-rw-r--r--lib/libmytinfo/bsearch.c97
-rw-r--r--lib/libmytinfo/buildpath.c203
-rw-r--r--lib/libmytinfo/cap_list529
-rw-r--r--lib/libmytinfo/compar.c40
-rw-r--r--lib/libmytinfo/config.h89
-rw-r--r--lib/libmytinfo/defs.h195
-rw-r--r--lib/libmytinfo/fillterm.c81
-rw-r--r--lib/libmytinfo/findcap.c149
-rw-r--r--lib/libmytinfo/findterm.c286
-rw-r--r--lib/libmytinfo/getother.c49
-rw-r--r--lib/libmytinfo/gettbin.c127
-rw-r--r--lib/libmytinfo/gettcap.c276
-rw-r--r--lib/libmytinfo/gettinfo.c303
-rw-r--r--lib/libmytinfo/mkbinorder.c116
-rw-r--r--lib/libmytinfo/mkcaplist.c166
-rw-r--r--lib/libmytinfo/mkcapsort.c134
-rw-r--r--lib/libmytinfo/mktermhead.c160
-rw-r--r--lib/libmytinfo/mkversion.c35
-rw-r--r--lib/libmytinfo/readcaps.c151
-rw-r--r--lib/libmytinfo/tcapconv.c194
-rw-r--r--lib/libmytinfo/tcapvars.c36
-rw-r--r--lib/libmytinfo/term.h664
-rw-r--r--lib/libmytinfo/term.head527
-rw-r--r--lib/libmytinfo/term.tail137
-rw-r--r--lib/libmytinfo/termcap.c165
-rw-r--r--lib/libmytinfo/terminfo.c132
-rw-r--r--lib/libmytinfo/tgoto.c148
-rw-r--r--lib/libmytinfo/tiget.c51
-rw-r--r--lib/libmytinfo/tmatch.c37
-rw-r--r--lib/libmytinfo/tparm.c807
-rw-r--r--lib/libmytinfo/tputs.c266
-rw-r--r--lib/libmytinfo/tty.c446
-rw-r--r--lib/libmytinfo/version.h10
-rw-r--r--lib/libncurses/COPYRIGHT.NEW19
-rw-r--r--lib/libncurses/COPYRIGHT.OLD5
-rw-r--r--lib/libncurses/MKkeyname.awk30
-rw-r--r--lib/libncurses/MKkeys.awk1
-rw-r--r--lib/libncurses/Makefile209
-rw-r--r--lib/libncurses/README42
-rw-r--r--lib/libncurses/TESTS/Makefile35
-rw-r--r--lib/libncurses/TESTS/README21
-rw-r--r--lib/libncurses/TESTS/battle.c705
-rw-r--r--lib/libncurses/TESTS/copy.c39
-rw-r--r--lib/libncurses/TESTS/corner.c16
-rw-r--r--lib/libncurses/TESTS/ensor.c52
-rw-r--r--lib/libncurses/TESTS/firework.c113
-rw-r--r--lib/libncurses/TESTS/getch.c29
-rw-r--r--lib/libncurses/TESTS/hanoi.c275
-rw-r--r--lib/libncurses/TESTS/knight.c320
-rw-r--r--lib/libncurses/TESTS/ncurses.c1121
-rw-r--r--lib/libncurses/TESTS/newdemo.c350
-rw-r--r--lib/libncurses/TESTS/over.c120
-rw-r--r--lib/libncurses/TESTS/rain.c96
-rw-r--r--lib/libncurses/TESTS/scroll.c30
-rw-r--r--lib/libncurses/TESTS/scroll2.c91
-rw-r--r--lib/libncurses/TESTS/scroll3.c51
-rw-r--r--lib/libncurses/TESTS/test.c27
-rw-r--r--lib/libncurses/TESTS/testcurs.c532
-rw-r--r--lib/libncurses/TESTS/worm.c268
-rw-r--r--lib/libncurses/TESTS/xmas.c1192
-rw-r--r--lib/libncurses/copyright.c19
-rw-r--r--lib/libncurses/curs_addch.3115
-rw-r--r--lib/libncurses/curs_addchst.349
-rw-r--r--lib/libncurses/curs_addstr.344
-rw-r--r--lib/libncurses/curs_attr.384
-rw-r--r--lib/libncurses/curs_beep.329
-rw-r--r--lib/libncurses/curs_bkgd.350
-rw-r--r--lib/libncurses/curs_border.367
-rw-r--r--lib/libncurses/curs_clear.353
-rw-r--r--lib/libncurses/curs_color.3138
-rw-r--r--lib/libncurses/curs_delch.334
-rw-r--r--lib/libncurses/curs_delln.350
-rw-r--r--lib/libncurses/curs_getch.3188
-rw-r--r--lib/libncurses/curs_getstr.353
-rw-r--r--lib/libncurses/curs_getyx.341
-rw-r--r--lib/libncurses/curs_inch.340
-rw-r--r--lib/libncurses/curs_inchstr.345
-rw-r--r--lib/libncurses/curs_initscr.384
-rw-r--r--lib/libncurses/curs_inopts.3170
-rw-r--r--lib/libncurses/curs_insch.336
-rw-r--r--lib/libncurses/curs_insstr.359
-rw-r--r--lib/libncurses/curs_instr.344
-rw-r--r--lib/libncurses/curs_kernel.3115
-rw-r--r--lib/libncurses/curs_move.328
-rw-r--r--lib/libncurses/curs_outopts.3115
-rw-r--r--lib/libncurses/curs_overlay.341
-rw-r--r--lib/libncurses/curs_pad.374
-rw-r--r--lib/libncurses/curs_printw.341
-rw-r--r--lib/libncurses/curs_refresh.369
-rw-r--r--lib/libncurses/curs_scanw.343
-rw-r--r--lib/libncurses/curs_scr_dmp.358
-rw-r--r--lib/libncurses/curs_scroll.337
-rw-r--r--lib/libncurses/curs_slk.385
-rw-r--r--lib/libncurses/curs_termatt.374
-rw-r--r--lib/libncurses/curs_termin.3191
-rw-r--r--lib/libncurses/curs_touch.357
-rw-r--r--lib/libncurses/curs_util.381
-rw-r--r--lib/libncurses/curs_window.3123
-rw-r--r--lib/libncurses/curses.h544
-rw-r--r--lib/libncurses/curses.priv.h136
-rw-r--r--lib/libncurses/doc/color.doc71
-rw-r--r--lib/libncurses/doc/manual.doc1361
-rw-r--r--lib/libncurses/keys.list149
-rw-r--r--lib/libncurses/lib_acs.c98
-rw-r--r--lib/libncurses/lib_addch.c127
-rw-r--r--lib/libncurses/lib_addstr.c56
-rw-r--r--lib/libncurses/lib_beep.c56
-rw-r--r--lib/libncurses/lib_bkgd.c49
-rw-r--r--lib/libncurses/lib_box.c131
-rw-r--r--lib/libncurses/lib_clear.c24
-rw-r--r--lib/libncurses/lib_clrbot.c53
-rw-r--r--lib/libncurses/lib_clreol.c48
-rw-r--r--lib/libncurses/lib_color.c107
-rw-r--r--lib/libncurses/lib_delch.c39
-rw-r--r--lib/libncurses/lib_delwin.c36
-rw-r--r--lib/libncurses/lib_doupdate.c593
-rw-r--r--lib/libncurses/lib_endwin.c50
-rw-r--r--lib/libncurses/lib_erase.c48
-rw-r--r--lib/libncurses/lib_getch.c224
-rw-r--r--lib/libncurses/lib_getstr.c113
-rw-r--r--lib/libncurses/lib_inchstr.c29
-rw-r--r--lib/libncurses/lib_initscr.c40
-rw-r--r--lib/libncurses/lib_insch.c36
-rw-r--r--lib/libncurses/lib_insdel.c31
-rw-r--r--lib/libncurses/lib_insstr.c21
-rw-r--r--lib/libncurses/lib_instr.c54
-rw-r--r--lib/libncurses/lib_kernel.c318
-rw-r--r--lib/libncurses/lib_longname.c35
-rw-r--r--lib/libncurses/lib_move.c30
-rw-r--r--lib/libncurses/lib_mvcur.c700
-rw-r--r--lib/libncurses/lib_mvwin.c29
-rw-r--r--lib/libncurses/lib_newterm.c176
-rw-r--r--lib/libncurses/lib_newwin.c185
-rw-r--r--lib/libncurses/lib_options.c252
-rw-r--r--lib/libncurses/lib_overlay.c110
-rw-r--r--lib/libncurses/lib_pad.c143
-rw-r--r--lib/libncurses/lib_printw.c75
-rw-r--r--lib/libncurses/lib_raw.c201
-rw-r--r--lib/libncurses/lib_refresh.c91
-rw-r--r--lib/libncurses/lib_scanw.c66
-rw-r--r--lib/libncurses/lib_screen.c58
-rw-r--r--lib/libncurses/lib_scroll.c218
-rw-r--r--lib/libncurses/lib_scrreg.c32
-rw-r--r--lib/libncurses/lib_set_term.c33
-rw-r--r--lib/libncurses/lib_slk.c255
-rw-r--r--lib/libncurses/lib_touch.c48
-rw-r--r--lib/libncurses/lib_trace.c179
-rw-r--r--lib/libncurses/lib_tstp.c78
-rw-r--r--lib/libncurses/lib_twait.c75
-rw-r--r--lib/libncurses/lib_unctrl.c43
-rw-r--r--lib/libncurses/lib_vidattr.c199
-rw-r--r--lib/libncurses/lib_window.c85
-rw-r--r--lib/libncurses/ncurses.3427
-rw-r--r--lib/libncurses/term.5153
-rw-r--r--lib/libncurses/terminfo.h2
-rw-r--r--lib/libncurses/unctrl.h52
-rw-r--r--lib/libopie/Makefile32
-rw-r--r--lib/libopie/config.h379
-rw-r--r--lib/libpam/modules/pam_kerberosIV/klogin.c204
-rw-r--r--lib/libpam/modules/pam_login_access/login.access.550
-rw-r--r--lib/libpam/modules/pam_login_access/login_access.c239
-rw-r--r--lib/libpcap/Makefile41
-rw-r--r--lib/libpthread/Makefile21
-rw-r--r--lib/libpthread/man/Makefile.inc17
-rw-r--r--lib/libpthread/man/pthread_create.3109
-rw-r--r--lib/libpthread/man/pthread_detach.379
-rw-r--r--lib/libpthread/man/pthread_equal.366
-rw-r--r--lib/libpthread/man/pthread_exit.399
-rw-r--r--lib/libpthread/man/pthread_getspecific.382
-rw-r--r--lib/libpthread/man/pthread_join.3100
-rw-r--r--lib/libpthread/man/pthread_key_create.398
-rw-r--r--lib/libpthread/man/pthread_key_delete.392
-rw-r--r--lib/libpthread/man/pthread_once.3100
-rw-r--r--lib/libpthread/man/pthread_self.359
-rw-r--r--lib/libpthread/man/pthread_setspecific.391
-rw-r--r--lib/libpthread/sys/Makefile.inc5
-rw-r--r--lib/libpthread/thread/Makefile.inc94
-rw-r--r--lib/libpthread/thread/thr_attr_destroy.c60
-rw-r--r--lib/libpthread/thread/thr_attr_getdetachstate.c57
-rw-r--r--lib/libpthread/thread/thr_attr_getstackaddr.c52
-rw-r--r--lib/libpthread/thread/thr_attr_getstacksize.c52
-rw-r--r--lib/libpthread/thread/thr_attr_init.c59
-rw-r--r--lib/libpthread/thread/thr_attr_setcreatesuspend_np.c51
-rw-r--r--lib/libpthread/thread/thr_attr_setdetachstate.c59
-rw-r--r--lib/libpthread/thread/thr_attr_setstackaddr.c52
-rw-r--r--lib/libpthread/thread/thr_attr_setstacksize.c52
-rw-r--r--lib/libpthread/thread/thr_clean.c68
-rw-r--r--lib/libpthread/thread/thr_close.c96
-rw-r--r--lib/libpthread/thread/thr_cond.c334
-rw-r--r--lib/libpthread/thread/thr_condattr_destroy.c51
-rw-r--r--lib/libpthread/thread/thr_condattr_init.c57
-rw-r--r--lib/libpthread/thread/thr_create.c280
-rw-r--r--lib/libpthread/thread/thr_detach.c74
-rw-r--r--lib/libpthread/thread/thr_equal.c43
-rw-r--r--lib/libpthread/thread/thr_exit.c205
-rw-r--r--lib/libpthread/thread/thr_fcntl.c116
-rw-r--r--lib/libpthread/thread/thr_fork.c92
-rw-r--r--lib/libpthread/thread/thr_fsync.c49
-rw-r--r--lib/libpthread/thread/thr_getprio.c73
-rw-r--r--lib/libpthread/thread/thr_info.c182
-rw-r--r--lib/libpthread/thread/thr_init.c228
-rw-r--r--lib/libpthread/thread/thr_join.c113
-rw-r--r--lib/libpthread/thread/thr_kern.c1739
-rw-r--r--lib/libpthread/thread/thr_kill.c78
-rw-r--r--lib/libpthread/thread/thr_mattr_init.c57
-rw-r--r--lib/libpthread/thread/thr_mattr_kind_np.c64
-rw-r--r--lib/libpthread/thread/thr_multi_np.c44
-rw-r--r--lib/libpthread/thread/thr_mutex.c377
-rw-r--r--lib/libpthread/thread/thr_mutexattr_destroy.c51
-rw-r--r--lib/libpthread/thread/thr_nanosleep.c118
-rw-r--r--lib/libpthread/thread/thr_once.c50
-rw-r--r--lib/libpthread/thread/thr_open.c80
-rw-r--r--lib/libpthread/thread/thr_private.h783
-rw-r--r--lib/libpthread/thread/thr_read.c83
-rw-r--r--lib/libpthread/thread/thr_readv.c83
-rw-r--r--lib/libpthread/thread/thr_resume_np.c70
-rw-r--r--lib/libpthread/thread/thr_select.c172
-rw-r--r--lib/libpthread/thread/thr_self.c43
-rw-r--r--lib/libpthread/thread/thr_seterrno.c61
-rw-r--r--lib/libpthread/thread/thr_setprio.c80
-rw-r--r--lib/libpthread/thread/thr_sig.c167
-rw-r--r--lib/libpthread/thread/thr_sigaction.c82
-rw-r--r--lib/libpthread/thread/thr_sigmask.c92
-rw-r--r--lib/libpthread/thread/thr_sigprocmask.c92
-rw-r--r--lib/libpthread/thread/thr_sigsuspend.c66
-rw-r--r--lib/libpthread/thread/thr_sigwait.c73
-rw-r--r--lib/libpthread/thread/thr_single_np.c44
-rw-r--r--lib/libpthread/thread/thr_spec.c236
-rw-r--r--lib/libpthread/thread/thr_suspend_np.c67
-rw-r--r--lib/libpthread/thread/thr_wait4.c61
-rw-r--r--lib/libpthread/thread/thr_write.c83
-rw-r--r--lib/libpthread/thread/thr_writev.c83
-rw-r--r--lib/libpthread/thread/thr_yield.c49
-rw-r--r--lib/libresolv/Makefile32
-rw-r--r--lib/libresolv/fakelib.c1
-rw-r--r--lib/librpcsvc/Makefile36
-rw-r--r--lib/librpcsvc/publickey.c172
-rw-r--r--lib/librpcsvc/rnusers.c68
-rw-r--r--lib/librpcsvc/rstat.c67
-rw-r--r--lib/librpcsvc/rwall.c52
-rw-r--r--lib/librpcsvc/secretkey.c85
-rw-r--r--lib/librpcsvc/xcrypt.c192
-rw-r--r--lib/librpcsvc/yp_passwd.c90
-rw-r--r--lib/librpcsvc/yp_update.c204
-rw-r--r--lib/libscsi/Makefile21
-rw-r--r--lib/libscsi/scsi.3350
-rw-r--r--lib/libscsi/scsi.c1192
-rw-r--r--lib/libscsi/scsi.h86
-rw-r--r--lib/libskey/Makefile23
-rw-r--r--lib/libskey/mdx.h19
-rw-r--r--lib/libskey/pathnames.h6
-rw-r--r--lib/libskey/put.c2292
-rw-r--r--lib/libskey/skey.159
-rw-r--r--lib/libskey/skey.3157
-rw-r--r--lib/libskey/skey.access.5125
-rw-r--r--lib/libskey/skey.h60
-rw-r--r--lib/libskey/skey_crypt.c38
-rw-r--r--lib/libskey/skey_getpass.c37
-rw-r--r--lib/libskey/skeyaccess.c485
-rw-r--r--lib/libskey/skeylogin.c342
-rw-r--r--lib/libskey/skeysubr.c130
-rw-r--r--lib/libss/Makefile38
-rw-r--r--lib/libss/copyright.h19
-rw-r--r--lib/libss/data.c16
-rw-r--r--lib/libss/error.c101
-rw-r--r--lib/libss/execute_cmd.c221
-rw-r--r--lib/libss/help.c148
-rw-r--r--lib/libss/invocation.c84
-rw-r--r--lib/libss/list_rqs.c94
-rw-r--r--lib/libss/listen.c164
-rw-r--r--lib/libss/pager.c91
-rw-r--r--lib/libss/parse.c138
-rw-r--r--lib/libss/prompt.c32
-rw-r--r--lib/libss/request_tbl.c66
-rw-r--r--lib/libss/requests.c52
-rw-r--r--lib/libss/ss.h69
-rw-r--r--lib/libss/ss_err.et39
-rw-r--r--lib/libss/ss_internal.h115
-rw-r--r--lib/libss/std_rqs.ct46
-rw-r--r--lib/libtcl/Makefile375
-rw-r--r--lib/libtelnet/Makefile12
-rw-r--r--lib/libtelnet/genget.c104
-rw-r--r--lib/libtelnet/getent.c71
-rw-r--r--lib/libtelnet/misc-proto.h79
-rw-r--r--lib/libtelnet/misc.c93
-rw-r--r--lib/libtelnet/misc.h42
-rw-r--r--lib/libtermcap/Makefile38
-rw-r--r--lib/libtermcap/TEST/tc1.c63
-rw-r--r--lib/libtermcap/TEST/tc2.c90
-rw-r--r--lib/libtermcap/TEST/tc3.c112
-rw-r--r--lib/libtermcap/pathnames.h37
-rw-r--r--lib/libtermcap/termcap.3290
-rw-r--r--lib/libtermcap/termcap.c305
-rw-r--r--lib/libtermcap/termcap.h53
-rw-r--r--lib/libtermcap/tgoto.c227
-rw-r--r--lib/libtermcap/tospeed.c72
-rw-r--r--lib/libtermcap/tparm.c753
-rw-r--r--lib/libtermcap/tputs.c123
-rw-r--r--lib/libutil/Makefile37
-rw-r--r--lib/libutil/_secure_path.370
-rw-r--r--lib/libutil/_secure_path.c72
-rw-r--r--lib/libutil/libutil.h59
-rw-r--r--lib/libutil/login.369
-rw-r--r--lib/libutil/login.c69
-rw-r--r--lib/libutil/login.conf.5365
-rw-r--r--lib/libutil/login_auth.371
-rw-r--r--lib/libutil/login_auth.c671
-rw-r--r--lib/libutil/login_cap.3392
-rw-r--r--lib/libutil/login_cap.c780
-rw-r--r--lib/libutil/login_cap.h156
-rw-r--r--lib/libutil/login_class.3187
-rw-r--r--lib/libutil/login_class.c387
-rw-r--r--lib/libutil/login_ok.3138
-rw-r--r--lib/libutil/login_ok.c251
-rw-r--r--lib/libutil/login_times.3155
-rw-r--r--lib/libutil/login_times.c162
-rw-r--r--lib/libutil/login_tty.366
-rw-r--r--lib/libutil/login_tty.c63
-rw-r--r--lib/libutil/logout.371
-rw-r--r--lib/libutil/logout.c78
-rw-r--r--lib/libutil/logwtmp.373
-rw-r--r--lib/libutil/logwtmp.c90
-rw-r--r--lib/libutil/pty.3144
-rw-r--r--lib/libutil/pty.c136
-rw-r--r--lib/libutil/pw_util.c237
-rw-r--r--lib/libutil/setproctitle.3113
-rw-r--r--lib/libutil/setproctitle.c125
-rw-r--r--lib/libutil/stat_flags.c174
-rw-r--r--lib/libutil/uucplock.3162
-rw-r--r--lib/libutil/uucplock.c201
-rw-r--r--lib/libvgl/Makefile12
-rw-r--r--lib/libvgl/bitmap.c229
-rw-r--r--lib/libvgl/keyboard.c90
-rw-r--r--lib/libvgl/main.c231
-rw-r--r--lib/libvgl/mouse.c284
-rw-r--r--lib/libvgl/simple.c357
-rw-r--r--lib/libvgl/text.c243
-rw-r--r--lib/libvgl/vgl.3280
-rw-r--r--lib/libvgl/vgl.h126
-rw-r--r--lib/libxpg4/Makefile9
-rw-r--r--lib/liby/Makefile27
-rw-r--r--lib/liby/main.c42
-rw-r--r--lib/liby/yyerror.c46
-rw-r--r--lib/libz/ChangeLog239
-rw-r--r--lib/libz/Makefile36
-rw-r--r--lib/libz/README99
-rw-r--r--lib/libz/adler32.c48
-rw-r--r--lib/libz/algorithm.doc105
-rw-r--r--lib/libz/compress.c57
-rw-r--r--lib/libz/crc32.c162
-rw-r--r--lib/libz/deflate.c1207
-rw-r--r--lib/libz/deflate.h275
-rw-r--r--lib/libz/example.c503
-rw-r--r--lib/libz/gzio.c523
-rw-r--r--lib/libz/infblock.c405
-rw-r--r--lib/libz/infblock.h37
-rw-r--r--lib/libz/infcodes.c247
-rw-r--r--lib/libz/infcodes.h27
-rw-r--r--lib/libz/inffast.c168
-rw-r--r--lib/libz/inffast.h17
-rw-r--r--lib/libz/inflate.c345
-rw-r--r--lib/libz/inftrees.c478
-rw-r--r--lib/libz/inftrees.h59
-rw-r--r--lib/libz/infutil.c87
-rw-r--r--lib/libz/infutil.h99
-rw-r--r--lib/libz/minigzip.c246
-rw-r--r--lib/libz/trees.c1141
-rw-r--r--lib/libz/uncompr.c58
-rw-r--r--lib/libz/zconf.h184
-rw-r--r--lib/libz/zlib.h780
-rw-r--r--lib/libz/zutil.c211
-rw-r--r--lib/libz/zutil.h203
-rw-r--r--lib/msun/Makefile154
-rw-r--r--lib/msun/alpha/s_copysign.S45
-rw-r--r--lib/msun/alpha/s_copysignf.S45
-rw-r--r--lib/msun/bsdsrc/b_exp.c203
-rw-r--r--lib/msun/bsdsrc/b_log.c486
-rw-r--r--lib/msun/bsdsrc/b_tgamma.c336
-rw-r--r--lib/msun/bsdsrc/mathimpl.h98
-rw-r--r--lib/msun/i387/e_acos.S56
-rw-r--r--lib/msun/i387/e_asin.S55
-rw-r--r--lib/msun/i387/e_atan2.S44
-rw-r--r--lib/msun/i387/e_exp.S96
-rw-r--r--lib/msun/i387/e_fmod.S48
-rw-r--r--lib/msun/i387/e_log.S44
-rw-r--r--lib/msun/i387/e_log10.S44
-rw-r--r--lib/msun/i387/e_remainder.S48
-rw-r--r--lib/msun/i387/e_scalb.S45
-rw-r--r--lib/msun/i387/e_sqrt.S43
-rw-r--r--lib/msun/i387/s_atan.S44
-rw-r--r--lib/msun/i387/s_ceil.S58
-rw-r--r--lib/msun/i387/s_copysign.S48
-rw-r--r--lib/msun/i387/s_cos.S56
-rw-r--r--lib/msun/i387/s_finite.S46
-rw-r--r--lib/msun/i387/s_floor.S58
-rw-r--r--lib/msun/i387/s_ilogb.S53
-rw-r--r--lib/msun/i387/s_log1p.S55
-rw-r--r--lib/msun/i387/s_logb.S44
-rw-r--r--lib/msun/i387/s_rint.S43
-rw-r--r--lib/msun/i387/s_scalbn.S45
-rw-r--r--lib/msun/i387/s_significand.S44
-rw-r--r--lib/msun/i387/s_sin.S56
-rw-r--r--lib/msun/i387/s_tan.S58
-rw-r--r--lib/msun/man/acos.396
-rw-r--r--lib/msun/man/acosh.388
-rw-r--r--lib/msun/man/asin.398
-rw-r--r--lib/msun/man/asinh.376
-rw-r--r--lib/msun/man/atan.382
-rw-r--r--lib/msun/man/atan2.3196
-rw-r--r--lib/msun/man/atanh.390
-rw-r--r--lib/msun/man/ceil.368
-rw-r--r--lib/msun/man/cos.381
-rw-r--r--lib/msun/man/cosh.382
-rw-r--r--lib/msun/man/erf.393
-rw-r--r--lib/msun/man/exp.3320
-rw-r--r--lib/msun/man/fabs.374
-rw-r--r--lib/msun/man/floor.368
-rw-r--r--lib/msun/man/fmod.385
-rw-r--r--lib/msun/man/hypot.3134
-rw-r--r--lib/msun/man/ieee.3182
-rw-r--r--lib/msun/man/ieee_test.3107
-rw-r--r--lib/msun/man/j0.3155
-rw-r--r--lib/msun/man/lgamma.3139
-rw-r--r--lib/msun/man/math.3635
-rw-r--r--lib/msun/man/rint.368
-rw-r--r--lib/msun/man/sin.380
-rw-r--r--lib/msun/man/sinh.382
-rw-r--r--lib/msun/man/sqrt.3134
-rw-r--r--lib/msun/man/tan.379
-rw-r--r--lib/msun/man/tanh.378
-rw-r--r--lib/msun/src/e_acos.c111
-rw-r--r--lib/msun/src/e_acosf.c89
-rw-r--r--lib/msun/src/e_acosh.c69
-rw-r--r--lib/msun/src/e_acoshf.c57
-rw-r--r--lib/msun/src/e_asin.c120
-rw-r--r--lib/msun/src/e_asinf.c92
-rw-r--r--lib/msun/src/e_atan2.c130
-rw-r--r--lib/msun/src/e_atan2f.c105
-rw-r--r--lib/msun/src/e_atanh.c74
-rw-r--r--lib/msun/src/e_atanhf.c58
-rw-r--r--lib/msun/src/e_cosh.c93
-rw-r--r--lib/msun/src/e_coshf.c71
-rw-r--r--lib/msun/src/e_exp.c167
-rw-r--r--lib/msun/src/e_expf.c103
-rw-r--r--lib/msun/src/e_fmod.c140
-rw-r--r--lib/msun/src/e_fmodf.c113
-rw-r--r--lib/msun/src/e_gamma.c37
-rw-r--r--lib/msun/src/e_gamma_r.c35
-rw-r--r--lib/msun/src/e_gammaf.c39
-rw-r--r--lib/msun/src/e_gammaf_r.c38
-rw-r--r--lib/msun/src/e_hypot.c128
-rw-r--r--lib/msun/src/e_hypotf.c87
-rw-r--r--lib/msun/src/e_j0.c487
-rw-r--r--lib/msun/src/e_j0f.c444
-rw-r--r--lib/msun/src/e_j1.c486
-rw-r--r--lib/msun/src/e_j1f.c444
-rw-r--r--lib/msun/src/e_jn.c281
-rw-r--r--lib/msun/src/e_jnf.c212
-rw-r--r--lib/msun/src/e_lgamma.c36
-rw-r--r--lib/msun/src/e_lgamma_r.c312
-rw-r--r--lib/msun/src/e_lgammaf.c39
-rw-r--r--lib/msun/src/e_lgammaf_r.c248
-rw-r--r--lib/msun/src/e_log.c146
-rw-r--r--lib/msun/src/e_log10.c98
-rw-r--r--lib/msun/src/e_log10f.c67
-rw-r--r--lib/msun/src/e_logf.c97
-rw-r--r--lib/msun/src/e_pow.c312
-rw-r--r--lib/msun/src/e_powf.c253
-rw-r--r--lib/msun/src/e_rem_pio2.c183
-rw-r--r--lib/msun/src/e_rem_pio2f.c196
-rw-r--r--lib/msun/src/e_remainder.c80
-rw-r--r--lib/msun/src/e_remainderf.c73
-rw-r--r--lib/msun/src/e_scalb.c55
-rw-r--r--lib/msun/src/e_scalbf.c52
-rw-r--r--lib/msun/src/e_sinh.c86
-rw-r--r--lib/msun/src/e_sinhf.c68
-rw-r--r--lib/msun/src/e_sqrt.c453
-rw-r--r--lib/msun/src/e_sqrtf.c97
-rw-r--r--lib/msun/src/get_hw_float.c50
-rw-r--r--lib/msun/src/k_cos.c96
-rw-r--r--lib/msun/src/k_cosf.c64
-rw-r--r--lib/msun/src/k_rem_pio2.c320
-rw-r--r--lib/msun/src/k_rem_pio2f.c213
-rw-r--r--lib/msun/src/k_sin.c79
-rw-r--r--lib/msun/src/k_sinf.c54
-rw-r--r--lib/msun/src/k_standard.c782
-rw-r--r--lib/msun/src/k_tan.c131
-rw-r--r--lib/msun/src/k_tanf.c101
-rw-r--r--lib/msun/src/math.h277
-rw-r--r--lib/msun/src/math_private.h223
-rw-r--r--lib/msun/src/s_asinh.c65
-rw-r--r--lib/msun/src/s_asinhf.c57
-rw-r--r--lib/msun/src/s_atan.c139
-rw-r--r--lib/msun/src/s_atanf.c119
-rw-r--r--lib/msun/src/s_cbrt.c93
-rw-r--r--lib/msun/src/s_cbrtf.c83
-rw-r--r--lib/msun/src/s_ceil.c80
-rw-r--r--lib/msun/src/s_ceilf.c61
-rw-r--r--lib/msun/src/s_copysign.c38
-rw-r--r--lib/msun/src/s_copysignf.c41
-rw-r--r--lib/msun/src/s_cos.c82
-rw-r--r--lib/msun/src/s_cosf.c59
-rw-r--r--lib/msun/src/s_erf.c314
-rw-r--r--lib/msun/src/s_erff.c223
-rw-r--r--lib/msun/src/s_expm1.c228
-rw-r--r--lib/msun/src/s_expm1f.c133
-rw-r--r--lib/msun/src/s_fabs.c35
-rw-r--r--lib/msun/src/s_fabsf.c38
-rw-r--r--lib/msun/src/s_finite.c35
-rw-r--r--lib/msun/src/s_finitef.c38
-rw-r--r--lib/msun/src/s_floor.c81
-rw-r--r--lib/msun/src/s_floorf.c70
-rw-r--r--lib/msun/src/s_frexp.c59
-rw-r--r--lib/msun/src/s_frexpf.c52
-rw-r--r--lib/msun/src/s_ilogb.c50
-rw-r--r--lib/msun/src/s_ilogbf.c43
-rw-r--r--lib/msun/src/s_isnan.c38
-rw-r--r--lib/msun/src/s_isnanf.c40
-rw-r--r--lib/msun/src/s_ldexp.c32
-rw-r--r--lib/msun/src/s_ldexpf.c35
-rw-r--r--lib/msun/src/s_lib_version.c39
-rw-r--r--lib/msun/src/s_log1p.c173
-rw-r--r--lib/msun/src/s_log1pf.c112
-rw-r--r--lib/msun/src/s_logb.c42
-rw-r--r--lib/msun/src/s_logbf.c39
-rw-r--r--lib/msun/src/s_matherr.c30
-rw-r--r--lib/msun/src/s_modf.c83
-rw-r--r--lib/msun/src/s_modff.c64
-rw-r--r--lib/msun/src/s_nextafter.c79
-rw-r--r--lib/msun/src/s_nextafterf.c70
-rw-r--r--lib/msun/src/s_rint.c93
-rw-r--r--lib/msun/src/s_rintf.c77
-rw-r--r--lib/msun/src/s_scalbn.c66
-rw-r--r--lib/msun/src/s_scalbnf.c62
-rw-r--r--lib/msun/src/s_signgam.c3
-rw-r--r--lib/msun/src/s_significand.c34
-rw-r--r--lib/msun/src/s_significandf.c31
-rw-r--r--lib/msun/src/s_sin.c82
-rw-r--r--lib/msun/src/s_sinf.c53
-rw-r--r--lib/msun/src/s_tan.c76
-rw-r--r--lib/msun/src/s_tanf.c48
-rw-r--r--lib/msun/src/s_tanh.c86
-rw-r--r--lib/msun/src/s_tanhf.c64
-rw-r--r--lib/msun/src/w_acos.c43
-rw-r--r--lib/msun/src/w_acosf.c47
-rw-r--r--lib/msun/src/w_acosh.c42
-rw-r--r--lib/msun/src/w_acoshf.c47
-rw-r--r--lib/msun/src/w_asin.c44
-rw-r--r--lib/msun/src/w_asinf.c48
-rw-r--r--lib/msun/src/w_atan2.c43
-rw-r--r--lib/msun/src/w_atan2f.c47
-rw-r--r--lib/msun/src/w_atanh.c47
-rw-r--r--lib/msun/src/w_atanhf.c52
-rw-r--r--lib/msun/src/w_cabs.c27
-rw-r--r--lib/msun/src/w_cabsf.c21
-rw-r--r--lib/msun/src/w_cosh.c42
-rw-r--r--lib/msun/src/w_coshf.c46
-rw-r--r--lib/msun/src/w_drem.c15
-rw-r--r--lib/msun/src/w_dremf.c16
-rw-r--r--lib/msun/src/w_exp.c53
-rw-r--r--lib/msun/src/w_expf.c58
-rw-r--r--lib/msun/src/w_fmod.c43
-rw-r--r--lib/msun/src/w_fmodf.c47
-rw-r--r--lib/msun/src/w_gamma.c49
-rw-r--r--lib/msun/src/w_gamma_r.c46
-rw-r--r--lib/msun/src/w_gammaf.c48
-rw-r--r--lib/msun/src/w_gammaf_r.c51
-rw-r--r--lib/msun/src/w_hypot.c43
-rw-r--r--lib/msun/src/w_hypotf.c47
-rw-r--r--lib/msun/src/w_j0.c41
-rw-r--r--lib/msun/src/w_j0f.c45
-rw-r--r--lib/msun/src/w_j1.c42
-rw-r--r--lib/msun/src/w_j1f.c46
-rw-r--r--lib/msun/src/w_jn.c42
-rw-r--r--lib/msun/src/w_jnf.c42
-rw-r--r--lib/msun/src/w_lgamma.c49
-rw-r--r--lib/msun/src/w_lgamma_r.c46
-rw-r--r--lib/msun/src/w_lgammaf.c48
-rw-r--r--lib/msun/src/w_lgammaf_r.c51
-rw-r--r--lib/msun/src/w_log.c43
-rw-r--r--lib/msun/src/w_log10.c46
-rw-r--r--lib/msun/src/w_log10f.c51
-rw-r--r--lib/msun/src/w_logf.c48
-rw-r--r--lib/msun/src/w_pow.c61
-rw-r--r--lib/msun/src/w_powf.c72
-rw-r--r--lib/msun/src/w_remainder.c42
-rw-r--r--lib/msun/src/w_remainderf.c46
-rw-r--r--lib/msun/src/w_scalb.c60
-rw-r--r--lib/msun/src/w_scalbf.c65
-rw-r--r--lib/msun/src/w_sinh.c42
-rw-r--r--lib/msun/src/w_sinhf.c46
-rw-r--r--lib/msun/src/w_sqrt.c42
-rw-r--r--lib/msun/src/w_sqrtf.c46
-rw-r--r--lib/msun/src/w_y0.c50
-rw-r--r--lib/msun/src/w_y0f.c54
-rw-r--r--lib/msun/src/w_y1.c50
-rw-r--r--lib/msun/src/w_y1f.c54
-rw-r--r--lib/msun/src/w_yn.c50
-rw-r--r--lib/msun/src/w_ynf.c50
-rw-r--r--lib/ncurses/ncurses/Makefile209
2267 files changed, 0 insertions, 385003 deletions
diff --git a/lib/Makefile b/lib/Makefile
deleted file mode 100644
index a116a88..0000000
--- a/lib/Makefile
+++ /dev/null
@@ -1,54 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/4/93
-
-.if ${MACHINE} == "tahoe"
-SUBDIR=csu/tahoe.pcc
-.elif ${MACHINE} == "vax"
-SUBDIR=csu/vax.pcc
-.elif exists(${.CURDIR}/csu/${MACHINE})
-SUBDIR=csu/${MACHINE}
-.endif
-
-# Don't want to build libc on alpha just yet
-.if ${MACHINE} != "alpha"
-SUBDIR+=libc
-.endif
-
-# XXX MISSING: libplot
-SUBDIR+=libalias libcalendar libcompat libcom_err libcurses libdisk \
- libedit libf2c libftpio libgnumalloc libipx libkvm libmd libmytinfo \
- libncurses libopie libpcap libresolv librpcsvc \
- libscsi libskey libss libtermcap libutil libvgl libxpg4 liby libz
-
-.if !defined(NOLIBC_R) && ${MACHINE} != "alpha"
-SUBDIR+= libc_r
-.endif
-
-.if !defined(NOTCL) && exists (${.CURDIR}/../contrib/tcl) && \
- exists(${.CURDIR}/../usr.bin/tclsh) && exists (${.CURDIR}/libtcl)
-SUBDIR+=libtcl
-.endif
-
-.if !exists(${.CURDIR}/../secure) || defined(NOSECURE) || defined(NOCRYPT)
-SUBDIR+= libcrypt
-.else
-SUBDIR+= ../secure/lib/libcrypt
-.if defined(RELEASEDIR)
-# releases do need both libraries
-SUBDIR+= libcrypt
-.endif
-.endif
-
-.if defined(RELEASEDIR) || !exists(${.CURDIR}/../kerberosIV) || defined(NOCRYPT) || !defined(MAKE_KERBEROS4)
-# releases do need both libraries
-SUBDIR+= libtelnet
-.endif
-
-.if defined(WANT_CSRG_LIBM)
-SUBDIR+= libm
-.else
-SUBDIR+= msun
-.endif
-
-SUBDIR+= compat
-
-.include <bsd.subdir.mk>
diff --git a/lib/Makefile.inc b/lib/Makefile.inc
deleted file mode 100644
index 62677fd..0000000
--- a/lib/Makefile.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default version for system libs (override in <lib>/Makefile if necessary)
-SHLIB_MAJOR?= 2
-SHLIB_MINOR?= 0
diff --git a/lib/compat/Makefile b/lib/compat/Makefile
deleted file mode 100644
index 4de6109..0000000
--- a/lib/compat/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# $Id$
-
-SUBDIR=
-
-# Note that compat21 is *not* for the 2.1.x branch!
-.if defined(COMPAT1X) || defined(RELEASEDIR)
-SUBDIR+= compat1x
-.endif
-.if defined(COMPAT20) || defined(RELEASEDIR)
-SUBDIR+= compat20
-.endif
-.if defined(COMPAT21) || defined(RELEASEDIR)
-SUBDIR+= compat21
-.endif
-
-.include <bsd.subdir.mk>
diff --git a/lib/compat/Makefile.inc b/lib/compat/Makefile.inc
deleted file mode 100644
index 5201d4a..0000000
--- a/lib/compat/Makefile.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-# $Id$
-
-LIBCOMPATDIR?= ${LIBDIR}/compat
diff --git a/lib/compat/compat1x/Makefile b/lib/compat/compat1x/Makefile
deleted file mode 100644
index 51e6807..0000000
--- a/lib/compat/compat1x/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id$
-
-DISTRIBUTION= compat1x
-
-LIBS= libc.so.1.1 libcurses.so.1.1 libf2c.so.1.1 libg++.so.1.1 \
- libgcc.so.1.1 libgnumalloc.so.1.1 libgnuregex.so.1.1 libln.so.1.1 \
- libm.so.1.1 libmalloc.so.1.1 libreadline.so.1.1 libresolv.so.1.1 \
- librpcsvc.so.1.1 libskey.so.1.1 libtelnet.so.1.1 libtermcap.so.1.1 \
- libutil.so.1.1 liby.so.1.1
-
-CLEANFILES+= ${LIBS}
-LINKS= ${LIBCOMPATDIR}/libtermcap.so.1.1 ${LIBCOMPATDIR}/libtermlib.so.1.1
-
-all: ${LIBS}
-
-.for lib in ${LIBS}
-${lib}: ${lib}.gz.uu
- uudecode -p ${.CURDIR}/${lib}.gz.uu | gunzip > ${lib}
-.endfor
-
-beforeinstall:
- ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} ${LIBS} \
- ${DESTDIR}${LIBCOMPATDIR}
-
-# Get all the fruit, even though we don't set PROG.
-# XXX bsd.lib.mk has fruitflies, e.g., it fails if LIBS is empty.
-.include <bsd.prog.mk>
diff --git a/lib/compat/compat1x/libc.so.1.1.gz.uu b/lib/compat/compat1x/libc.so.1.1.gz.uu
deleted file mode 100644
index f2e0046..0000000
--- a/lib/compat/compat1x/libc.so.1.1.gz.uu
+++ /dev/null
@@ -1,3921 +0,0 @@
-begin 444 libc.so.1.1.gz
-M'XL("/4+%RX``VQI8F,N<V\N,2XQ`)R:?WA4U9G'[V0F9`@),V*$^(AU-*"R
-M105$V<0`@3`A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8"#RW6\8330KD5Q;K,]+*)"5<Z$6L#/(&5E]&0Y*.%T9MN5)
-MZJ&ORPX:=82.$0QD_;>-E'T]E;TPMTG*.I9K*H>^WJ0^],T:E*Q@XI9*W:B=
-M*.W!IX('&$^"?[_5W,O,U61`MDBJ>2_3YJ"G+V(71R5719,D*M]!+3O^\:67
-M8.HKX7R'*!V,8+:FG1"%D9>8TS9:':I"_I3)QH-!3C(PDH&1#'*204XR,)*I
-M--&Y5JJ9`?:C+SI7HEN)-:NVZH0/OPBRYI5;@^8/,`_SJ\1D1CZ.Q/=HYJ!\
-M\YK:QSWW*\?H-DUM$=B^4<]7ZO%*35`H#^$J]XW%E<TL1+AI?HL.#8,U7IFG
-.!&D%@O\';ULWR:(F!@"^
-`
-end
diff --git a/lib/compat/compat1x/libcurses.so.1.1.gz.uu b/lib/compat/compat1x/libcurses.so.1.1.gz.uu
deleted file mode 100644
index db25272..0000000
--- a/lib/compat/compat1x/libcurses.so.1.1.gz.uu
+++ /dev/null
@@ -1,428 +0,0 @@
-begin 444 libcurses.so.1.1.gz
-M'XL("(H.%RX``VQI8F-U<G-E<RYS;RXQ+C$`[+T-6%37N2^^!D8=<>M,#(D3
-M#TV(T40+2<`8=1N-@`S@!S`0/DQB0!AF%$5`F`%,`3$;&C8[HW-JTB:MIS<G
-M'R<Y;>ZII\;61).@L:"II]74DWA;_[VVM?^S*9QS:,K124J<^[YKO?/!EO28
-M>Y_[_/_/<^\\SOSVNS[>M=YWO6NM=WUL/,.^WL6Z&&/)C&V,8VS^+?PQ\BE5
-M?Z^,V,O+'M&1>GS/^XLAL=9AT7;;U(XQK=2B-25J';9"M6-<"86LW7\P072I
-M9'UWMEH:##DD]:S2'U2"4UH[U?^><DRQ=X5"H7\)!`)+.AD[NYNQK8!MN\4W
-MO1/SC@%WM=RFMB9N8^IHSY6.>'_.M/G!10/JZ-L6J,.B$^I9IU_Y#ZBL,^2S
-MZ(\!1^6DK:??-RV]?^AKINNJ-[26PG+G(W<I<,44Y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-M-]?W)W$+^N.IVZX>W33;51]_U+NC:$OQY_G7^.WL+5;9R8<C=<.&+E"2T<;M
-M--,/9Q/&>AW[XNY.>SQN^L]9RP"+LW;._]L!@?EASBBR5+S\(V?$C>5';2>)
-FZE-(8[Y^>F3">O&X8B^-'M)/+!_$)-J]Q\>O3/7_*2>&+A5C!@#$
-`
-end
diff --git a/lib/compat/compat1x/libgcc.so.1.1.gz.uu b/lib/compat/compat1x/libgcc.so.1.1.gz.uu
deleted file mode 100644
index 3a20167..0000000
--- a/lib/compat/compat1x/libgcc.so.1.1.gz.uu
+++ /dev/null
@@ -1,133 +0,0 @@
-begin 444 libgcc.so.1.1.gz
-M'XL("!H*%RX``VQI8F=C8RYS;RXQ+C$`[%Q]=%1%EJ]\DD!#&@@($B5@'(U!
-M-@'\R(S.!*%1E`8$&U0,34AW()@/3/<#_.@U3HOCH\TQ@Q_KQ\X>UAU7U[-^
-MS*@LH^Y*HD.`832$K"280*]&IS%93P]F2*LYZ;WWO=_K5VF"XSAG9O:/KG,>
-M];NW;MU[ZU:]JNK.;0Z)!^I%H1#"*K2R+DN(7&$6A_I)P):1];+-<N`=DP[8
-M+45M`[\G%FB'Y<F!KUAB6+O:JG<Z0Y\NS\U,VRW$.A+29$$[,HY\I!Y6]X_8
-M7Y>/?%OY;EM&EV)%"VC[<+HS:'1$NRU.WBW1_CXK=_$-500<0_7O62I4QV!G
-M]6!W:;C;%OZP--)9/12P163YC$Z6'PPX!G=;5`<)1/Q]J1_FY-U,W>(\)OD/
-M;1DF<P2:^K+]TL%.6WQOK;TS3K[39NF(L?3V8>,ENL-MD=LM'?;A\AV*11X/
-MV^^V68^=/!&L[UE8WU^2]=C>"Z/4JMH&`\.=^J[RUJ[2#):VU0\F93UZ-FG,
-MC_6-*!6CQ]"A^L$23W)1&]87M1>U&8U*FB8;6YGHGT00(FD*NDK^<,ALEF_O
-M_W>0[RBU:`Y^TV!U>6T`9H\S_"UJD]11^(8-F?OS8"61^'CY^RRK5]$;-N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<*L#$[8C"=N0[0[AD9/@RA7=5S5<=68
-MCF@',!K#%^T`1AU7=5Q54ALW0,4PP.RD$9XTRA(.^$C"PFF&\RFC@24`2/3@
-M'4P9CQ=(4F-\R#_+.>6K_%(R#;RB!LZQ%.%-?:CVJ*HHR5$8US3UL2K2^#]U
-M(4"KZW!1L7*H+X*+`CPK3Z3@Y4[.-#$D>1I(\O+!\+<9S7CW<)[(RL;@?@CK
-M(C6RO%="K[[>S.2^%]+XT*]7E?V.Z;0MS#-A^6)HL4G1D&<>0^]L!_FX=#'4
-==O9EC;/+^OWIYVU88>%O"O\*(/0#Q4I#3Q9A``!H
-`
-end
diff --git a/lib/compat/compat1x/libgnumalloc.so.1.1.gz.uu b/lib/compat/compat1x/libgnumalloc.so.1.1.gz.uu
deleted file mode 100644
index bc63c8e..0000000
--- a/lib/compat/compat1x/libgnumalloc.so.1.1.gz.uu
+++ /dev/null
@@ -1,142 +0,0 @@
-begin 444 libgnumalloc.so.1.1.gz
-M'XL("*()%RX``VQI8F=N=6UA;&QO8RYS;RXQ+C$`[#I_<)/'E9^DS_)GHB`9
-MC"$@P"3\<FR"S#B-12AG)Y:!G!T4XA_)I!=A;`$FQG9LR?P89&)_<<)F3S.Z
-M<]KD,KUIKVW:SJ6]_B#72>)>P-`BZ+4)@;LTQS&-2YST<^0VAE)0B(+NO=W]
-MI$]*TMS-]+_3SECO>[MOW[[W]NW;M[O^I?3$8Y)+DB2'Q,I&JR252.G21-YM
-M:;Y?P\^'!H_?#I14+0<D&52HE#Q-HN3ZX'M)NR2I/Y.'KP1N>@49E5XB;W*R
-M9B0R785&JE8#KE9)`9EUC(?]EQ]ZV'?J.!LC/<29U9(458M,@,DPV&&4:R=*
-MJ#V:3":)E8Y@#3!4UTJ!#LHHPW+UV+C9FURC75R-`B(%E:),@116K2`:K99Y
-M[4I$.,5(D8&.F"D(B6THPDOX$Y,CD8JC87_\H8=17)17G5(,9EFTFAE$>_TZ
-M2.A)H"F.!@LJCDYN@>Z1"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/(LAY\&^#6>YS3`
-M1SF\#\H>-_'Q@G'_"4^?#[PQ8&(V:!@?XO!*\'\RY=CXC&/<\W^UY^%F/!]C
-MOO/Q5CN76.C\%:N;C[&T&=?&AG;D!E\3V;)IT\)4&1ABM]N]I5%-)[BA"_<W
-M-7IN@-9O;=RJI)O=N,F3W0VE_KX&#UFSHK*2]1WK<V_S;<&DQ?BW!/^J\$^&
-MOX45^%>)?POQ[R;\6X1_-^,?EEBXA%,[U1:RIJH"6E&ON._S;&G8VNAQ-S1M
-M<C?3%.A1=HI/:8)&-#578J-]'J_"X!1EO/6-6P#=DL4+LYXOS!0#<(NW26V&
-MA^DR/J5^T[^2-945,K2U<O$B.96'<4&CVM"`1EE;&[=``]94WK00,MRW:5NS
-M6X':?`WUB@>++;D)FMN@C%L(J]K6U`CU7P;G$IE2J"H]RN[[U,V8(F?&*(?V
-*_PM)1.Y1!H8``+D)
-`
-end
diff --git a/lib/compat/compat1x/libln.so.1.1.gz.uu b/lib/compat/compat1x/libln.so.1.1.gz.uu
deleted file mode 100644
index 14a62ce..0000000
--- a/lib/compat/compat1x/libln.so.1.1.gz.uu
+++ /dev/null
@@ -1,13 +0,0 @@
-begin 444 libln.so.1.1.gz
-M'XL("#\3%RX``VQI8FQN+G-O+C$N,0#MF3U+`T$0AB?Q(VHA*=.IA9`B1`B(
-M"*)>-)'`:81$4$36>'>$R.4B&"4!"VT$L4GIO[%()?@3;(5H(UB*H+.7/3>(
-M0@K!YGU@;CYV=NZN'-Y[NCRG*)%OC,LV29JMJ\="1P:[%^TY[NDLR4>*']=[
-M[W=M\C@*$R5.V4?8#W#K$%N(;9#\,Y\/)I@YK,XBJC>HC:A:@!^K[QI3^;[*
-MI]0[`N)JEJV*,S(/ZW^95??/U/T%MM&>W/@V3XC5G0UC/;?"T9J93QNFR&>S
-MA4Q1%(VTF1$DFDW7:9!PZDZC3J):JGB<V*5ZB9UG\[5N[>'VA0``````````
-M@']&[MQ1WH'CT?[OR!W<9EOF>)/M1M7E3A_C)=J4"9_'E&\]O?G;?ZOSJOPS
-M^]"/LP$``````````/#WR)U=:N]R3Q\GK;%/D];3$Z2U]!1I'7V>M(:^R'Z"
-MNCTY-5?&VSWQ(?6CJ_\FJ+N5`UE+'M>H;%DI8=6J1Q77L9-2:B][)U\%8=$G
-(L6!$I=8@``#Q
-`
-end
diff --git a/lib/compat/compat1x/libm.so.1.1.gz.uu b/lib/compat/compat1x/libm.so.1.1.gz.uu
deleted file mode 100644
index 07ba894..0000000
--- a/lib/compat/compat1x/libm.so.1.1.gz.uu
+++ /dev/null
@@ -1,538 +0,0 @@
-begin 444 libm.so.1.1.gz
-M'XL(",T.%RX``VQI8FTN<V\N,2XQ`.R]"WQ,5_<_?"+!A$B"(`CBVK@G[BF3
-M.2ZC;B%4W"H2ET1<0FC&K4)T4.D(J50%592ZU*4AJG%),@DJ(BH(9IA)@]`9
-MH^UH4T:E\E]KGW5F3D+[/,_O\_M_WO?SOD_:9'WW/ONZ]MIKK[WW.D<!MS:!
-MB^4XSI=C/[NZV2']E+P:T.618E&_I3U_#7PLY]=_NZ39-PT&"<^LBM#$A^HG
-MLG=-&'IOU3DO*,JH+MQ846%4RHRF'TL22I4)Y7R<S*B#",O,9$.8C"*=XA00
-M9=BC@\10A-&GC<D9<X?9,%HMB7XRG^,,2ILAV$81-R#"TC2Y0N56H9*9+N!C
-M=1[6&6HSJ+4`-&%EE\Y)^Z"0M-?>V)F0L7(SJV,CIT9CPMD<%;\"4JG/>QK5
-M"<D5%3H]IJT>YV4XM`Z">JTN1W])EU=LMG@D)[,^ZO*$1]14?\S-(!7W%D1H
-MPLH=S;-F2]MT8QYKD]ZDOV0LD;1+;QF2;%3[?`*=--NC6^DO8=E>;:`=]_67
-MBG.+GU*UI^9AHV66&D;=;&XVM<!T"&)UVDJU5QW?,YFW]3\NO_O:.%>-9^/N
-M:6^VSSP)*P<EE/$>:X["DXKT\]#BBG0M_A7ZWW4>&V/&T3R(-H391(%0K0#1
-MD42I@H`-6H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5N1^!GE^]O-]<.]V++0!NN'"M&W2,G?->X:+Q[SQZH'GL+
-MK,*]4S-04V]'?V]G?T/\G<;&4&93*//IJRWV7\49[&SO_2YET/T6HECNY0.9
-@OFR18Y*M8+AP_D8Z.K17HWCU1](!*_PW"GMBI1G=``#O
-`
-end
diff --git a/lib/compat/compat1x/libmalloc.so.1.1.gz.uu b/lib/compat/compat1x/libmalloc.so.1.1.gz.uu
deleted file mode 100644
index 468d9f8..0000000
--- a/lib/compat/compat1x/libmalloc.so.1.1.gz.uu
+++ /dev/null
@@ -1,183 +0,0 @@
-begin 444 libmalloc.so.1.1.gz
-M'XL(")(.%RX``VQI8FUA;&QO8RYS;RXQ+C$`[5P/>%35E7\SF21#&$C`B%01
-M1R`K@0A)")`)?TP""7\D,"`)5&UC2"803"9Q_H3@$@6':%^?4])B_VSK?NOZ
-MN6V_KEW=1HHKZYH()>C:BM1==ZW;6K>U$T/=Z$89<=;9W[GWO'EOAC^"W=UO
-MO]V\S^2<<^^YYYQ[[KGWGO=RY"7E_KU*N:(H.8IX1L8IBE,QGEEKFLJ<]9ZV
-MAM;6]L9YC06=SJ)Y1<XBEZMD?N&"^86+G,7%90M=944NI[<AX'%6=74X9REY
-M_K*\IC*E5OUMW2T1DG+;OJ-G;U*4>-`>N0W*U.-:R(;FT#%;J%0)W!`/YL2#
-MCG#H@^?B<7>\SXZNR#7@DVA=)!/X\/A>.4C+47/4D;`G>ML77SB:K.,;0H>#
-MU)R^R:S&3FIFQX.YT)2LYJF;##6/`!]V]'ZZGGF&GCV7J&>=24_I1?1(?W^:
-MNXL+S^/N9!N_O%SZ^XJ;+NSOI@'#P+]<;ACXS>67YN\_`I\6M+-P2)Y0%]&6
-M"SW)\ZN+M*+9)&.+(>37RX00]0Q,JHO<OIS,A2==9P)?,`0[MD2*6;#9+H/A
-M!MWIYCF]MLR8T]%EYYG3Z&U?K'_A:-*<-BU+K.V)91=>6[.:#I.:VY==8@R]
-ML_1<WVU8=E[?%2XS?,?Q01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q(ZDO\T[N7:9LN:]V*$OPLQ,\B_)"N4ORX
-MB$<H)<XB8BTBWJ*%NHS/&`VDEDG^1PXO0P!.`W*-<"T=#/6T&;P-;1Z=0?R[
-M?)<CT$^;N<5;[PUB1XI?Y,]F7CXO_V-OP,0_`&>V_L)#+]\QM,]]GGDED",Q
-M>'F[KV&;O(TDSV?9`/6B%OQNBJ;4!OU?*/GLR^?O"."(N#0!.#D;=A/P>.\B
-MT(R(%=-N]HISC$*^J"01Y^)RNTN1_Q?VY<R7+;OLO6X,O-QMSH#_!^C+'_B?
-('3(EEH]B``!S
-`
-end
diff --git a/lib/compat/compat1x/libreadline.so.1.1.gz.uu b/lib/compat/compat1x/libreadline.so.1.1.gz.uu
deleted file mode 100644
index 680c543..0000000
--- a/lib/compat/compat1x/libreadline.so.1.1.gz.uu
+++ /dev/null
@@ -1,1117 +0,0 @@
-begin 444 libreadline.so.1.1.gz
-M'XL("*<)%RX``VQI8G)E861L:6YE+G-O+C$N,0#L_7]<5%7^!X[?&48<<&1&
-MQ1\9)2J6)BH:*6.D2(R:B8XDX):;(HP"(A#<ZX]B@!I(ANO8E-9:Z[;]L-9:
-MM]RTLG0-71>LM2+7REJWK&7KTM`NN:1DQ'Q>KW->=^;.B+OO]_OS_>?[>3B%
-MS_,ZOW^\SNN\SKGGQPGAP5IAI4X0T@3VVS)&$.*%X&_:Y"0AV_V/G#L4I.ZZ
-M_X_3P+/LJ@5"SC:Z+;(K%8RN%+\X1]Y7A;;,S9^D3"O0">Y()7<`VMEUS&X8
-MV"E1^,]X\.1N5K[/![,"_[@[?3$\KA:6[M0FCZ/[KKO?_N.X2DS?U6'*#>;A
-MI168AS9,37"[E.F8PG@=ISJ`:K'U^.'78NL66(X6ZC"+@FB0!7^K[%K.<BQ(
-MM_*\@M%<E\(RZ''->:K7;_?OPUB4AE4Z@8R3P.@Z9FD?!-Z\$"^`T#X$_E7&
-M8@DB\S%#%HJLW@<&94&>3FC_`DQ>>5]J?RBMU.5Q-4%D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LB!IPM8D^C'.-3Z6$$A?V6L-DV,.CR+60]%"(WRL*?N)P5')-
-M'3LC&9JCPY@CNN>(\#FB?(X.9^[TDT<W_#9^=R3U>:TV2@D2+*#)BS1YD99?
-M9+;0\HNT_"(MOTC++]+R^VGY_?3$?GIB_WQ'))A#AI.=S=1GLA5WVZRX_^VD
-M8G2GTW"N4C32>1*QMLIJ!88_XFEM?1E1H?S&2S_)415$YTSW:F95-H0S27-?
-MB)9\(\V;UYH&NOQ//ITPOW@9K7.++/G%UDMPI5A986MM@V(G>`6-(AO%'MB.
-M*-ORROTZR]&FM2X9MTMCH"6ML@,I^"#;YZ1;"]KA5SDM,,J5,;\[K#C:_)_A
-MEM9?ISOA(HO)(ZVGN7X_5#/AQ^@7431+W"=`E-$W8$)U58\4U<78$&V>$/E3
-MD5XF2%>&LYD[S97><,N&6Z0\^%>JEDP95G!9)ENM1-#DLK1+RJXG*CG&?E?9
-MX5-K?5UH)/1.5&R2]\$V$A?R0[R.+:`GW[;_SL/1@]VD+`MFZ+P$)T+^B(I+
-M9<[UUQJ"U/?;ZDQ"[)V(W-<N60<_KPOK<UPLUX^O=&I,@OR6,"D#9X(_9)AF
-MB?Q9HG]V_[^1VTTF/1!KJC^G:2Y@H_82_OS2MIRM1]E%\D0=CPO[IMF8N-6W
-M7<_:!T\.U^.FV[.EDKYD;2.^JBKE/8[1S88&0S)/',T4J^D/<J:/EQ!:L.2Q
-1,)'P20W=E.>?"MZ>E&CO`0"^
-`
-end
diff --git a/lib/compat/compat1x/libresolv.so.1.1.gz.uu b/lib/compat/compat1x/libresolv.so.1.1.gz.uu
deleted file mode 100644
index 2ff9c90..0000000
--- a/lib/compat/compat1x/libresolv.so.1.1.gz.uu
+++ /dev/null
@@ -1,153 +0,0 @@
-begin 444 libresolv.so.1.1.gz
-M'XL("),.%RX``VQI8G)E<V]L=BYS;RXQ+C$`[3QK>%35M7L>"4,8G0$#!$AA
-M(`$3&/+@F0!""`P/2S0\DM3:.@R3&9(`,^G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ZFIH3T?_2:&1$NI>.K,])MR2+/U3&9OM*C3!?8K*:^@ID4K
-H:471X]9OYO3K.E9UG>J%KS0]O)"Z'#SM\_.O!E+L_Q<9C<FN?D@``*^@
-`
-end
diff --git a/lib/compat/compat1x/librpcsvc.so.1.1.gz.uu b/lib/compat/compat1x/librpcsvc.so.1.1.gz.uu
deleted file mode 100644
index b9c2570..0000000
--- a/lib/compat/compat1x/librpcsvc.so.1.1.gz.uu
+++ /dev/null
@@ -1,165 +0,0 @@
-begin 444 librpcsvc.so.1.1.gz
-M'XL(")0.%RX``VQI8G)P8W-V8RYS;RXQ+C$`[%P+=)1%EJZ0$`)&004))($`
-M>9($$D(("0$2()T$\B2!\`I-2#HDT$F'3C<DBB,<4&0P8\9=9Q9QSH`KZXJS
-M(^JXPJBSJ*,.KG,$'S."Z\KH<#8,NN(;@9BM^NM6U>V_.YV*Q#UGS^8_]JG<
-M^U?=NO75K>?_R>ODKNUD'2%D%#&>AA&$1!'U+-MSKJ*+_;%ZQTL9-%^/.[3'
-M'=)U._WSSN.NX4<#Z*L+09V=J<?W5E\]\1++7[5<EAA*L^V]/62O.[2!!!&R
-MO*HKFVIV_CZ4EBWLL`25575-,10A5#&[PQ)*%2.D(J[#,HHJ/K,*Q2T=EM%4
-M<=9J5!["*P^D=7?8OER]UDJK-]5_IU743ZL^*.UD\:H/2$5"AR6$*G9+11CW
-M90NO:02O:6AGI[DN65.X56)SXKN>'@ULSJ]%OMU/R_":;]XY+\`]ACLXO8=9
-M<@]+/7XAA-9M&%35F^SMP_:>7BM:$LM-/2P58WA;*[B7P[B70WK',!?;K5Z+
-M^H+9#>5F>NL+:>5*M<3G='<O^)CC[55:9F,4E`I?:W2%\M<7IO=7(U^/50M?
-M*:9$8+J_3TREM7QJP(A;<&%[M3GNI`^RS,VL3`^198HTRGRPAF9_*I0*&T.A
-M6$RUUO@ZM`:UU]TC8@CZ/$4JH,]W]_CK<VFUU/`GA/D3`O[<OT;+GS'8GW,R
-MIB%6_J%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-$#W
-M1I&/%S>G37TJ59),I>EL&@_6%=/NFZP_?/37@63*)(^DFGD1[;_IH?7(NI>)
-M7O'9G3G?$8^D?:GHE;;/@D=X^AGWR/*[1(^L>X_H%>>O#H^LVS(]XMGYSL[W
-,7)[OGZ.=52GWA0``
-`
-end
diff --git a/lib/compat/compat1x/libskey.so.1.1.gz.uu b/lib/compat/compat1x/libskey.so.1.1.gz.uu
deleted file mode 100644
index 91d8512..0000000
--- a/lib/compat/compat1x/libskey.so.1.1.gz.uu
+++ /dev/null
@@ -1,247 +0,0 @@
-begin 444 libskey.so.1.1.gz
-M'XL(")4.%RX``VQI8G-K97DN<V\N,2XQ`.V<>W1<]77OCQ[8LJT@`<8X8(@,
-M.($@;,L8L(E+/#/GS$-S'L-YS,DDJ]659?F%+;G2#,9I;$P&@P>M:=0'O;=I
-M;Y,FH2M]W)80XCH)E\B&:YN4M@;:-.GEMH0ZN4/D=>.D#@BNR]S//N?(&A1[
-MD=7_;I<'OMJ_QSY[[]_>O\?^C73\@O+P/F6EH@3@T]:J*%W*S*<T=._0\*ZA
-MKBW#H\6[NI:-GFL8&BSN&AZYMVM3_XZMVW?3M5$9+A6[AC=U[1C<,3RR6]D^
-M/-"_71Y3,KFN_HT;1P9'1Q'0-31<[!H9W+QUM#@X,KBQ:]/P2"!<9//Q*C\H
-MG\KY>:<FM4\\^.R1%=@V,;:G[>S7ZWQ^^N>5X^6I=TH+#C71__HN?H[72VVU
-MJ69%*3_7NG^B>*54O\)3N5J9WM==80EXSM!8.2I<;Y2NHJ%:GOC;>CVWK:7V
-M)_2\?K,PEO>V-1<_7+^/SA?IG/S^^/CXL;EBRV2A6CX5\7]2^-^B<7S,[*P8
-MAZI[)M;^>'0-O&/&H?):I?A"_;[VVJ=$W]S0JF=IH*_>DZO]\@HQM;VL'6HM
-M'VM=^^.1OQJ[K[U2>JKJ352FRL?.KCW1\?!_17;5>+IB/#$NMC]5O[->>J)V
-M0_ADO?1T[<O*]'@'MS4'#+5_6QX.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O#L]^-;CA1>#PI=_H;=_@-=_@O=YI2Y:/#BN;!P96
-M]0V@BOK&Y?+*\>:ATKF&O@%%3ZP$/6`5N`VLEC?,PW>71S8.R>O">N)V<`>X
-M$ZP!:Y4=&U?_PO+%?]N'!^X]ITC^1=!?^&%\,M(_$+PYWC^TL7^$8>X:'9&P
-L;!T*WIZ>;?ZTN3.N_865A?$EU/]NWYW/5R)UM+1AY!<6^O\`!^*N:-QF``"P
-`
-end
diff --git a/lib/compat/compat1x/libtelnet.so.1.1.gz.uu b/lib/compat/compat1x/libtelnet.so.1.1.gz.uu
deleted file mode 100644
index 0cc9cb9..0000000
--- a/lib/compat/compat1x/libtelnet.so.1.1.gz.uu
+++ /dev/null
@@ -1,63 +0,0 @@
-begin 444 libtelnet.so.1.1.gz
-M'XL("-$.%RX``VQI8G1E;&YE="YS;RXQ+C$`[1AI<!/7^:U\R;+L%>#$.)A$
-MAM!RN&"[)K&4RQ:6W'1L<!T<Z'!LA+RV!;:D2KN)/8.)Z"+P>J-D&T(ZT\ZD
-MZ0RT)=.A)TR2#AX9,N9HRKAI:=-CFL039N2('RY1:^$:MM_;??;*&CH#/]K^
-MT?,\?\=^]WO[WNI['QT.(PM"ZH318$#(BO31(5X3KINW/?M,'%,[#IZO!4%I
-MT!A^"O%%;RLP)I=1",GBX.PP/=2:DEK-PX5#K4EZI",U?0[!<ZZT/;X"E(3W
-M<D?CM/`QE2B395D2<L&>A(:;Y(VQ>,$J!:A(C*M.T[.TQR=HA,0QT$PL2].1
-M?BG7`98H`!X]PJ=`)ZG[.D/?I:^J-#US>_QY32]1KOLYE.['F;2-\:7AP13B
-M2IK57!6G>=(,VK@699!XV(:X`C&USCF;,$G.V36I1(Y<$XNR\1V[F4OGU5JF
-M%7*R!/P-&A%OJ8DE'A.G$H]&A5PH96)#C2+Q9N%)Q*V49>41A3?&G[^M*,)[
-M1@C:N/]J1.&OBM,YO`5$^(_$5)1-:@[`_KQU":QK]FQ.(_U:3$U:VC6+XT@?
-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
-LLP8QW!Z^"[!:F%^&I_N\`<1TLAY_)PN<NGEYM9-UKP[F\'\#[[3E%#\D```-
-`
-end
diff --git a/lib/compat/compat1x/libtermcap.so.1.1.gz.uu b/lib/compat/compat1x/libtermcap.so.1.1.gz.uu
deleted file mode 100644
index 54a3cc1..0000000
--- a/lib/compat/compat1x/libtermcap.so.1.1.gz.uu
+++ /dev/null
@@ -1,75 +0,0 @@
-begin 444 libtermcap.so.1.1.gz
-M'XL("-(.%RX``VQI8G1E<FUC87`N<V\N,2XQ`.T:;7!4U?7N9I-LPB:[I"D)
-M@F4IV`F"))$`V2U@LK`+S!!9(%&K#.NZV1`@;':R[ZET2%QXK.3E]=DW1&>J
-M8VUM1ZW^4*M#1[#$#3I)K-8NJ5ILF1;0CAN7L=%&66C*ZSGWW667)7[]Z'0Z
-MLV?F[CGWW/-US[GOOH^];Y+[P\1*"+$0"@_J">VFH-FYN6EUHYMB=V/S.K)N
-M8Y.3+.;\7;M]WJ"UF@]U58?:O5W^ZMT[0KYJQB>D1?R[<,YXZRU;XFCECGVO
-M7IQ#B"Q5YA$B-B5%Z2=`2$U&4;+H@/]B)?X*T;^IJCL^$_R+SDGA-4,DRA6%
-MZZO-!^XG.#Q"A]&0-C:MG4"T[D1(4119.$%'3\&H>!S'1[FJFJCXI\DC*L"G
-MSXHCYV,R5Z!NE@5TYH[O!\FA@FJ7\)I18XF?+!@41XZ@323<LO`NFKPE<0W8
-M%YS)R427HE"7*C^9LM)*HS%I70EFIA,&#3##1(.BA%=9N?SP*CM?-U1`7.%5
-MA*M-\PJ0P8\C=Q;JU6IZLH"9L0V&'J#COX6A81VF4.B>)-Q*J6DR;"/<TK"M
-MFJO1DJ?RIOACF=G4DE,&06Z*__0[A,2CP$R4*`I(JKPQ/A>3Z3]WQS;/ZZ\V
-MLSKZ`US7'BO7V6GMZ`QL+Z;UVW?.8B`DHX3+P=AP)/DO547&97_#D4G&JE4E
-M&KXX)-03KGXG49?%OP]*8F0")"#1D6AWA=2/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6S':FS#7A>(W6NXH8,?FT&O32#MI'T.8C5)'T&
-MHHFDSSLTD_39AFTD?:[!3])G&CI(^OP"3])G%WI(^MS"09(^H_``29]/Z"?I
-MLPEX;F*.-BWR%(L1Z=]DT",X=YA`%#JQ#/[;C*Z"=C)CWJ<8O0S:::)].[EW
-M'B%CC$X"_0]&8VR?I62`OL1T5?"GUVET.$_SCW0_T,4Z39X#>3Q(;("YG(;$
-MS&+T`9CT?"8?`+I*IYW3P:,9>$@;Y_MS,&!C,DBORZ!OUVG^QF&2=S%?DQ!S
-M!Z-7@"$^0WX/HY\`NIO1%DCV/N873[>*S"_6]Q"30?KQ#/I%YM<*\WJ9T0Z@
-M7\NP\V;&7-[177FNY,M/E'S5@1%V4N2+3H5\R7F0J0Z"I+XUA3K)=I_O1H^O
-M<W=P1X>_=3'$Y]D>X"\S/#[B"?E\H1VM9,/J&FBUT&Z$MH1X@EZN_6X_"`3I
-M+W<7WZ8QD=BPN@[:4FC+B*>],^CKY&EXH5T[@H!:_;[.5C^,+K]L7_N>]4TB
-M\G3Y0WP'M_A&XO&VMH+LDG20=4O2ANF'KV]DF-L="OIJ:ZYF_`>W%"/E:30`
-!`'3Y
-`
-end
diff --git a/lib/compat/compat1x/libutil.so.1.1.gz.uu b/lib/compat/compat1x/libutil.so.1.1.gz.uu
deleted file mode 100644
index 53f55b6..0000000
--- a/lib/compat/compat1x/libutil.so.1.1.gz.uu
+++ /dev/null
@@ -1,208 +0,0 @@
-begin 444 libutil.so.1.1.gz
-M'XL("-,.%RX``VQI8G5T:6PN<V\N,2XQ`.U\>WQ4199_==()#082D9?*HX$$
-M@\2\@TGD$1X)/@A&((F.CZ9)=UXDW9GN>R$X@-%+NS1M_VQ%9AR=SZ@[XF_6
-M=5UG`CZ(*"`2=!UE7599!QU4G+T8=B9B!C-.3._W5%5WWS0XH_O[_;6?7#ZY
-MYYRJ4Z?..77J>8M^B]W;P<H88VF,%>]B;&`D8U86>W)8CL.Y/L>EMK2P:O]G
-M-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M4K:_)@B"(`B"(`B"(/R34%^<P)XRE=A_#?7$=]$VT:?6/LZ-*/7EK]&O44![
-MLA+;GW]XGH?:_\[Z!36&^A%U!/4]ZBC,I,Y,49^9-L;RZ5PR5;*<>U;-ZDPE
-MM8R6RQ2TR%THGSM8OV1ZN"2?T?*90O9OOH\@"((@"((@"((@_`]0STZS<NK3
-MCT(X\YZ$<'Z=AG!VG8=P3GT1PADUS;>#^?0"ZDG8S:GR&>3?'O*;=&X,8!OS
-MV^@?03L-N_\4J'8&K<OYY#\;\E]P;0]K7PZMO^)]Z.X]V-],?._L^[>IM_\K
-MPFW`FF%,*Z.QWK1KEIFF8?A:?6.PH`Q0KF&XMCG0X)_$G]169K,#_Q?(]\^5
-$F"$``&%,
-`
-end
diff --git a/lib/compat/compat20/Makefile b/lib/compat/compat20/Makefile
deleted file mode 100644
index a9849be..0000000
--- a/lib/compat/compat20/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# $Id$
-
-DISTRIBUTION= compat20
-
-LIBS= libdialog.so.2.0 libforms.so.2.0 libg++.so.2.0 libgcc.so.261.0 \
- libncurses.so.2.0 libreadline.so.2.0
-
-CLEANFILES+= ${LIBS}
-
-all: ${LIBS}
-
-.for lib in ${LIBS}
-${lib}: ${lib}.gz.uu
- uudecode -p ${.CURDIR}/${lib}.gz.uu | gunzip > ${lib}
-.endfor
-
-beforeinstall:
- ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} ${LIBS} \
- ${DESTDIR}${LIBCOMPATDIR}
-
-# Get all the fruit, even though we don't set PROG.
-# XXX bsd.lib.mk has fruitflies, e.g., it fails if LIBS is empty.
-.include <bsd.prog.mk>
diff --git a/lib/compat/compat20/libdialog.so.2.0.gz.uu b/lib/compat/compat20/libdialog.so.2.0.gz.uu
deleted file mode 100644
index f3231e5..0000000
--- a/lib/compat/compat20/libdialog.so.2.0.gz.uu
+++ /dev/null
@@ -1,486 +0,0 @@
-begin 444 libdialog.so.2.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8E`?2+0GP@,2`06)`(3$FT!#+0EUWC;A5:05]WF*U[7)A<4F4MF
-M<S55-6EJDEJ4`D.3@:')EO`:GG8B=&DY'T9%PJQ(FA7-9D6+6=%J5JPU*]:9
-M%6UFQ7GA"G726*-&K?PTA5E)P/).+'E\DEAH?TX;)DU81BG,)PP^J9_FTXX=
-MR,JA0VPBS";#;'.8;0FSK3IKT0<51D,U'"R]BO`DH0HN>=,[XXDJ7S0N$3I0
-MIQU($VY29[TUVH3=&:I77P/0A)UJB,M]TQ*^`D]_*&G2ZFP*5R3,BJ19T6Q6
-MM)@5K6;%6K-BG5G1%J[PEWZXEF<S7%EEZ1L*SM.OS=-&*9!ML@;5!(3J^NR!
-M7($R[6%G-M1"5^-)ZBG2(3819I-AMCG,MH39UC"[-LRN"[-M8?:\D+7]8>/I
-M1P`L^@'IL+.5_C`_AGL:]34#>G4I/6![,Q#"_($\806_(#2AHY6W"P/!#,KK
-MA^7]5H9"ZE.'N(UQAHU0FJ$U8IL(!5>.V)0T^Q@13Q@A3Q@Q3QA!Q[717RC&
-MZ@@M"?\.;=HEZ$G*I:,Q"9U):C>4TX[HB\HA=2X1XI(AKCG$M82XUO"]Z]LX
-<?`)I/GQ"%0FS(AFNL$JYK+SS_G_RJ@X[1N<``"X1
-`
-end
diff --git a/lib/compat/compat20/libforms.so.2.0.gz.uu b/lib/compat/compat20/libforms.so.2.0.gz.uu
deleted file mode 100644
index 0baf3b4..0000000
--- a/lib/compat/compat20/libforms.so.2.0.gz.uu
+++ /dev/null
@@ -1,78 +0,0 @@
-begin 444 libforms.so.2.0.gz
-M'XL(""*>)B\``VQI8F9O<FUS+G-O+C(N,`#M6W]L&]4=?W:<Y)JZC9.ZC=NZ
-M[96&T5&O*Z5C#:#1)G779DGQ3#,VH/5<^Y*X=6QCW^&TFZE6+W2N\>2136-H
-M/Q#3M(D)P1@MK$-32"="4<6OH5*A::#0B3/.M(A%PW2!V_?].-_YXA0J3=H_
-M?NKE\_V^^[[O^[[OO?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#/)E9_`>B;&'T7.'(GHV,P:"^C.6CK8VV?
-MAC]A5E]:"&-G]*XFA.YC,M\%&T89/0+TPXP^!TYZC-&30)]F]"6@)QB]%/2\
-MSNB-0$\R^B2,?9KU]2#X_Y*I^AG=)YS#Z<[9RJ=KZJE8M>.OBN,N_=$6.=0J
-MZQT(!#;[`M&A6"@L!#?BH\*!B%2N\`7*DAM[NC;IF>OTS&;D4W\%[A>E!/(E
-M!J-)VK<FM64K\I'_@N(;$B*22H<B,4E4&7\`_]14U^8&T!P,)6(^.BA"TM:$
-M9(T)/:=MU_6:5>2WZ3[\8TO:DUYLBY[Y@IZY0<]\4<]LU3,=%7ZI]-)UV*6A
--!#EZ_2^C!929\C,``#[\
-`
-end
diff --git a/lib/compat/compat20/libg++.so.2.0.gz.uu b/lib/compat/compat20/libg++.so.2.0.gz.uu
deleted file mode 100644
index d835d3b..0000000
--- a/lib/compat/compat20/libg++.so.2.0.gz.uu
+++ /dev/null
@@ -1,4306 +0,0 @@
-begin 444 libg++.so.2.0.gz
-M'XL("+V<)B\``VQI8F<K*RYS;RXR+C``S+T/?!35M3@^N]DDFV3)++!"U"@1
-M08U!3125I523R"8!V603LAO:JM56HU*MB#L$;#9_G&S-,*S=/J3UO:>MWU=M
-M?:]:;150%$@B38#GTX!40<&BCZ<3-]5H8[+$E?V=<^[,[DRR`=KZ?;\O'S8S
-M<^^YYYY[[CGGGOO_->['71R7P7'%'/V[X3&.*^"2_US+Z\N6N3C7DFI/74UE
-MG6OY<LY5MJS.5;;X6YRKJF9YO;<:/JZK8A^+:QJJ.==U-=406.%=[EK,N>J7
-MN%V+:[SU\%93XRZK_A;$`([E55X5NKJF'A-`%LO9L[JFW(L@#,UR5SU[+2NO
-MJ:M'C-6N>C48WA+9PSO#5[9X<1W@+/.5+5G&OI94`RGP6E%=L]SK\0`:SN71
-M?]1X(`%^`5TUUUU?KX>KJZFOT7U7UU!(C4>+J_^6!W"[EU<N7_)M>%F,#(,\
-MZURU5#3$Q[D@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=#H;OSDQ;Z-$^I?ZDI_U)3_J469GJ^->`M+4PD?6O`6YKR+S7E
-M7ZJ;<?IW@"4,!M[:?"D%YTLIV4T=_(<D[X(YAON/,J6(_0_#S53\:YDS2?\=
-MW+303X_ITOH.SM"*Z.8]GK]8BK@X^?62M[4T1\()<0F[%"?<WONTM7PJ(NN#
-MB>R':7I)^[6U+(X$:U/O09P+H0G]D/>.P:2YE*/RUH\_JF!-4^K5O7LB5RE7
-MXCF5H'?GD?.<`A677W[RP5@FENG)>HZ/;L'K)TX/8-7EK1WT%LL2WO_2VB^X
-ME;#_`9G>3]S9Z:OKZ(W';&G8G^^ST;,GF<N.:[)M+5?;YQK[++'/M?99:I]/
-MVV<9-,U20F'IZ_>KLFCUG43'^@;2^/^O>;8X+&K]I'C,E8REDNOM^VO_ZT\\
-M5/`\)SS0\6RSO;Y+`3S>X*.M@72VF!DH?AD^^DHEL[F(>S;V'U]-J"`\VO)N
-+RO\&%(^I,PAG``!+
-`
-end
diff --git a/lib/compat/compat20/libncurses.so.2.0.gz.uu b/lib/compat/compat20/libncurses.so.2.0.gz.uu
deleted file mode 100644
index 645c357..0000000
--- a/lib/compat/compat20/libncurses.so.2.0.gz.uu
+++ /dev/null
@@ -1,562 +0,0 @@
-begin 444 libncurses.so.2.0.gz
-M'XL("&*>)B\``VQI8FYC=7)S97,N<V\N,BXP`*Q:#70459:N;HJD"1VJ$S(8
-M`;499`A##ILPCM(>'-,A%1*D21/H!,<_!B6C<41^NE0TG70HXJ2H:>BS+NH>
-MW1U44&2=L?D1.Z"0('2#*QK9.+*[[)GH1JW8F3&#6=(Z;6KO?57559T?B&#.
-M2?J]^^Z[[][[WOWN?:_S'O5D*]5.492-HCK3*&IE-D79*?W'(WPFNBRBQ^KW
-M95+>3-%I.T"-:Q><MA@='+?45MAZZAW"X[&(+.'AQF;*E"SWMT\K5D:)C.JJ
-M91**NZ/QG;]]0%$B9Q%Y"_1%2@R_!I_\@/D12UB&G]C&(#]@\LYN&-=TP>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4&B=*+
-M0A(')ROD+EFOLKX['][>?Y!#LL\1;UY4Z5#34+U0IT854;\<W6'WAKS-_&Z3
-M[Z_80:J_4VYP1P[!O0_4Z>%G,>Z7GHWNT4H:/F;M+/%SB.A84CTATRIVV1:_
-M;`^EA"C=IV2*[K^TB+?5O8QV'2NL(W[9&;_LBE]VQR]GNM?V9,OE8CEVJ[VU
-MQ6V.7"^7Y+M8N6`_*5<QR=*A]QN/2>,QC+]]5O+;O?KO,_0G2?NK`?[T+1NK
-MIJNX^P]4XG?L277\.C$FK8E!:6U/7"<ZMK73)(PQ88$QLZNSM:2!):PJ/L#_
-MQ+*O%F'^_GJ0HJ+[_L7R6YEW6,(3Q=E(UOZ\ANF9HO]16BQCH]_PA6%M6,5&
-M%:NK3O1KZAT'0OZX,?Q"P*>$C]CNJZD]W/#_G99*<OFB=[H(Z!\H5GU9WF$U
-A0UZ[*LNNP,X$:]$R&=Q/&&+96N.7;>9_`8NWL`*8'`(`
-`
-end
diff --git a/lib/compat/compat21/Makefile b/lib/compat/compat21/Makefile
deleted file mode 100644
index 0fcb691..0000000
--- a/lib/compat/compat21/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# $Id: Makefile,v 1.8 1997/02/22 14:57:39 peter Exp $
-
-DISTRIBUTION= compat21
-
-LIBS= libc.so.2.2 libg++.so.3.0 libgmp.so.2.0
-
-CLEANFILES+= ${LIBS}
-
-all: ${LIBS}
-
-.for lib in ${LIBS}
-${lib}: ${lib}.gz.uu
- uudecode -p ${.CURDIR}/${lib}.gz.uu | gunzip > ${lib}
-.endfor
-
-beforeinstall:
- ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} ${LIBS} \
- ${DESTDIR}${LIBCOMPATDIR}
-
-# Get all the fruit, even though we don't set PROG.
-# XXX bsd.lib.mk has fruitflies, e.g., it fails if LIBS is empty.
-.include <bsd.prog.mk>
diff --git a/lib/compat/compat21/libc.so.2.2.gz.uu b/lib/compat/compat21/libc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mith Exp $
-
-CFLAGS+= -DLIBC_SCCS -fno-omit-frame-pointer -I${.CURDIR}
-OBJS= crt0.o c++rt0.o gcrt0.o scrt0.o sgcrt0.o
-CLEANFILES+= a.out
-MAN3+= dlopen.3
-MLINKS+= dlopen.3 dlsym.3 \
- dlopen.3 dlerror.3 \
- dlopen.3 dlclose.3
-
-all: ${OBJS}
-
-crt0.o: crt0.c
- ${CC} ${CFLAGS} -c -DCRT0 -DDYNAMIC ${.CURDIR}/crt0.c -o ${.TARGET}
- ${LD} -O ${.TARGET} -x -r ${.TARGET}
-
-c++rt0.o: c++rt0.c
- ${CC} ${CFLAGS} -fpic -c ${.CURDIR}/c++rt0.c
- @${LD} -O ${.TARGET} -x -r ${.TARGET}
-
-#
-# gcrt0.o doesn't really depend on crt0.o, but this is the easiest way
-# to get the dependencies mostly correct.
-#
-gcrt0.o: crt0.o
- ${CC} ${CFLAGS} -c -DMCRT0 -DDYNAMIC ${.CURDIR}/crt0.c -o ${.TARGET}
- ${LD} -O ${.TARGET} -x -r ${.TARGET}
-
-# dependencies fudged as for gcrt0.o
-scrt0.o: crt0.o
- ${CC} ${CFLAGS} -c -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- ${LD} -O ${TARGET} -x -r ${.TARGET}
-
-# dependencies fudged as for gcrt0.o
-sgcrt0.o: scrt0.o
- ${CC} ${CFLAGS} -c -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- ${LD} -O ${.TARGET} -x -r ${.TARGET}
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/dlfcn.h \
- ${DESTDIR}/usr/include
-
-realinstall:
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
- ${DESTDIR}/usr/lib
-
-depend: .depend
-
-.depend: crt0.c c++rt0.c
- rm -f .depend
- mkdep ${CFLAGS} -DCRT0 -DDYNAMIC ${.CURDIR}/crt0.c
- mkdep -a ${CFLAGS} ${.CURDIR}/c++rt0.c
-
-lint tags:
-
-.include <bsd.prog.mk>
diff --git a/lib/csu/i386/c++rt0.c b/lib/csu/i386/c++rt0.c
deleted file mode 100644
index 413524f..0000000
--- a/lib/csu/i386/c++rt0.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1993 Paul Kranenburg
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: c++rt0.c,v 1.7 1997/02/22 14:57:42 peter Exp $
- */
-
-/*
- * Run-time module for GNU C++ compiled shared libraries.
- *
- * The linker constructs the following arrays of pointers to global
- * constructors and destructors. The first element contains the
- * number of pointers in each.
- * The tables are also null-terminated.
- */
-extern void (*__CTOR_LIST__[])(void);
-extern void (*__DTOR_LIST__[])(void);
-
-static void
-__dtors(void)
-{
- unsigned long i = (unsigned long) __DTOR_LIST__[0];
- void (**p)(void) = __DTOR_LIST__ + i;
-
- while (i--)
- (**p--)();
-}
-
-static void
-__ctors(void)
-{
- void (**p)(void) = __CTOR_LIST__ + 1;
-
- while (*p)
- (**p++)();
-}
-
-extern void __init() asm(".init");
-extern void __fini() asm(".fini");
-
-void
-__init(void)
-{
- static int initialized = 0;
-
- /*
- * Call global constructors.
- * Arrange to call global destructors at exit.
- */
- if (!initialized) {
- initialized = 1;
- __ctors();
- }
-
-}
-
-void
-__fini(void)
-{
- __dtors();
-}
-
-/*
- * Make sure there is at least one constructor and one destructor in the
- * shared library. Otherwise, the linker does not realize that the
- * constructor and destructor lists are linker sets. It treats them as
- * commons and resolves them to the lists from the main program. That
- * causes multiple invocations of the main program's static constructors
- * and destructors, which is very bad.
- */
-
-static void
-do_nothing(void)
-{
-}
-
-/* Linker magic to add an element to a constructor or destructor list. */
-#define TEXT_SET(set, sym) \
- asm(".stabs \"_" #set "\", 23, 0, 0, _" #sym)
-
-TEXT_SET(__CTOR_LIST__, do_nothing);
-TEXT_SET(__DTOR_LIST__, do_nothing);
diff --git a/lib/csu/i386/crt0.c b/lib/csu/i386/crt0.c
deleted file mode 100644
index b3884e4..0000000
--- a/lib/csu/i386/crt0.c
+++ /dev/null
@@ -1,438 +0,0 @@
-/*
- * Copyright (c) 1993 Paul Kranenburg
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: crt0.c,v 1.30 1997/08/02 04:56:33 jdp Exp $
- */
-
-#include <sys/param.h>
-
-#include <stdlib.h>
-#include <dlfcn.h>
-
-#ifdef DYNAMIC
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <a.out.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <link.h>
-
-/* !!!
- * This is gross, ld.so is a ZMAGIC a.out, but has `sizeof(hdr)' for
- * an entry point and not at PAGSIZ as the N_*ADDR macros assume.
- */
-#undef N_DATADDR
-#define N_DATADDR(x) ((x).a_text)
-
-#undef N_BSSADDR
-#define N_BSSADDR(x) ((x).a_text + (x).a_data)
-
-#ifndef N_GETMAGIC
-#define N_GETMAGIC(x) ((x).a_magic)
-#endif /* N_GETMAGIC */
-
-#ifndef MAP_PRIVATE
-#define MAP_PRIVATE MAP_COPY
-#endif /* MAP_PRIVATE */
-
-#ifndef MAP_FILE
-#define MAP_FILE 0
-#endif /* MAP_FILE */
-
-#ifndef MAP_ANON
-#define MAP_ANON 0
-#endif /* MAP_ANON */
-
-#ifdef DEBUG
-/*
- * We need these two because we are going to call them before the ld.so is
- * finished (as a matter of fact before we know if it exists !) so we must
- * provide these versions for them
- */
-static char *_getenv();
-static int _strncmp();
-#endif /* DEBUG */
-
-#ifndef LDSO
-#define LDSO "/usr/libexec/ld.so"
-#endif /* LDSO */
-
-extern struct _dynamic _DYNAMIC;
-static struct ld_entry *ld_entry;
-static void __do_dynamic_link ();
-#endif /* DYNAMIC */
-
-int _callmain();
-int errno;
-static char empty[1];
-char *__progname = empty;
-char **environ;
-
-static int ldso_version;
-
-extern unsigned char etext;
-extern unsigned char eprol asm ("eprol");
-extern start() asm("start");
-extern mcount() asm ("mcount");
-extern int main(int argc, char **argv, char **envp);
-int __syscall(int syscall,...);
-#ifdef MCRT0
-void monstartup(void *low, void *high);
-#endif /* MCRT0 */
-
-
-/*
- * We need these system calls, but can't use library stubs because the are
- * not accessible until we have done the ld.so stunt.
- */
-
-#define _exit(v) \
- __syscall(SYS_exit, (int)(v))
-#define _open(name, f, m) \
- __syscall(SYS_open, (char *)(name), (int)(f), (int)(m))
-#define _read(fd, s, n) \
- __syscall(SYS_read, (int)(fd), (void *)(s), (size_t)(n))
-#define _write(fd, s, n) \
- __syscall(SYS_write, (int)(fd), (void *)(s), (size_t)(n))
-#define _mmap(addr, len, prot, flags, fd, off) \
- (caddr_t) __syscall(SYS_mmap, (caddr_t)(addr), (size_t)(len), \
- (int)(prot), (int)(flags), (int)(fd), (long)0L, (off_t)(off))
-
-#define _PUTNMSG(str, len) _write(2, (str), (len))
-#define _PUTMSG(str) _PUTNMSG((str), sizeof (str) - 1)
-#define _FATAL(str) ( _PUTMSG(str), _exit(1) )
-
-
-int
-start()
-{
- struct kframe {
- int kargc;
- char *kargv[1]; /* size depends on kargc */
- char kargstr[1]; /* size varies */
- char kenvstr[1]; /* size varies */
- };
- /*
- * ALL REGISTER VARIABLES!!!
- */
- register struct kframe *kfp;
- register char **targv;
- register char **argv;
- extern void _mcleanup();
-#ifdef DYNAMIC
- volatile caddr_t x;
-#endif
-
-#ifdef lint
- kfp = 0;
-#else /* not lint */
- /* just above the saved frame pointer */
- asm ("lea 4(%%ebp), %0" : "=r" (kfp) );
-#endif /* not lint */
- for (argv = targv = &kfp->kargv[0]; *targv++; /* void */)
- /* void */ ;
- if (targv >= (char **)(*argv))
- --targv;
- environ = targv;
-
- if (argv[0]) {
- register char *s;
- __progname = argv[0];
- for (s=__progname; *s != '\0'; s++)
- if (*s == '/')
- __progname = s+1;
- }
-
-#ifdef DYNAMIC
- /* ld(1) convention: if DYNAMIC = 0 then statically linked */
- /* sometimes GCC is too smart/stupid for its own good */
- x = (caddr_t)&_DYNAMIC;
- if (x)
- __do_dynamic_link();
-#endif /* DYNAMIC */
-
-asm("eprol:");
-
-#ifdef MCRT0
- atexit(_mcleanup);
- monstartup(&eprol, &etext);
-#endif /* MCRT0 */
-
-asm ("__callmain:"); /* Defined for the benefit of debuggers */
- exit(main(kfp->kargc, argv, environ));
-}
-
-#ifdef DYNAMIC
-static void
-__do_dynamic_link ()
-{
- struct crt_ldso crt;
- struct exec hdr;
- char *ldso;
- int (*entry)();
-
-#ifdef DEBUG
- /* Provision for alternate ld.so - security risk! */
- if (!(ldso = _getenv("LDSO")))
-#endif
- ldso = LDSO;
-
- crt.crt_ldfd = _open(ldso, 0, 0);
- if (crt.crt_ldfd == -1) {
- _PUTMSG("Couldn't open ");
- _PUTMSG(LDSO);
- _FATAL(".\n");
- }
-
- /* Read LDSO exec header */
- if (_read(crt.crt_ldfd, &hdr, sizeof hdr) < sizeof hdr) {
- _FATAL("Failure reading ld.so\n");
- }
- if ((N_GETMAGIC_NET(hdr) != ZMAGIC) && (N_GETMAGIC(hdr) != QMAGIC)) {
- _FATAL("Bad magic: ld.so\n");
- }
-
- /* We use MAP_ANON */
- crt.crt_dzfd = -1;
-
- /* Map in ld.so */
- crt.crt_ba = (int)_mmap(0, hdr.a_text,
- PROT_READ|PROT_EXEC,
- MAP_FILE|MAP_PRIVATE,
- crt.crt_ldfd, N_TXTOFF(hdr));
- if (crt.crt_ba == -1) {
- _FATAL("Cannot map ld.so (text)\n");
- }
-
- /* Map in data segment of ld.so writable */
- if ((int)_mmap((caddr_t)(crt.crt_ba+N_DATADDR(hdr)), hdr.a_data,
- PROT_READ|PROT_WRITE,
- MAP_FIXED|MAP_FILE|MAP_PRIVATE,
- crt.crt_ldfd, N_DATOFF(hdr)) == -1) {
- _FATAL("Cannot map ld.so (data)\n");
- }
-
- /* Map bss segment of ld.so zero */
- if (hdr.a_bss && (int)_mmap((caddr_t)(crt.crt_ba+N_BSSADDR(hdr)),
- hdr.a_bss,
- PROT_READ|PROT_WRITE,
- MAP_FIXED|MAP_ANON|MAP_PRIVATE,
- crt.crt_dzfd, 0) == -1) {
- _FATAL("Cannot map ld.so (bss)\n");
- }
-
- crt.crt_dp = &_DYNAMIC;
- crt.crt_ep = environ;
- crt.crt_bp = (caddr_t)_callmain;
- crt.crt_prog = __progname;
- crt.crt_ldso = ldso;
- crt.crt_ldentry = NULL;
-
- entry = (int (*)())(crt.crt_ba + sizeof hdr);
- ldso_version = (*entry)(CRT_VERSION_BSD_4, &crt);
- ld_entry = crt.crt_ldentry;
- if (ldso_version == -1 && ld_entry == NULL) {
- /* if version 4 not recognised, try version 3 */
- ldso_version = (*entry)(CRT_VERSION_BSD_3, &crt);
- ld_entry = _DYNAMIC.d_entry;
- }
- if (ldso_version == -1) {
- _PUTMSG("ld.so failed");
- if (ld_entry != NULL) {
- const char *msg = (ld_entry->dlerror)();
- if(msg != NULL) {
- const char *endp;
- _PUTMSG(": ");
- for(endp = msg; *endp != '\0'; ++endp)
- ; /* Find the end */
- _PUTNMSG(msg, endp - msg);
- }
- }
- _FATAL("\n");
- }
-
-
- if (ldso_version >= LDSO_VERSION_HAS_DLEXIT)
- atexit(ld_entry->dlexit);
-
- return;
-}
-
-/*
- * DL stubs
- */
-
-void *
-dlopen(name, mode)
-const char *name;
-int mode;
-{
- if (ld_entry == NULL)
- return NULL;
-
- return (ld_entry->dlopen)(name, mode);
-}
-
-int
-dlclose(fd)
-void *fd;
-{
- if (ld_entry == NULL)
- return -1;
-
- return (ld_entry->dlclose)(fd);
-}
-
-void *
-dlsym(fd, name)
-void *fd;
-const char *name;
-{
- if (ld_entry == NULL)
- return NULL;
-
- if (ldso_version >= LDSO_VERSION_HAS_DLSYM3) {
- void *retaddr = *(&fd - 1); /* XXX - ABI/machine dependent */
- return (ld_entry->dlsym3)(fd, name, retaddr);
- } else
- return (ld_entry->dlsym)(fd, name);
-}
-
-
-const char *
-dlerror()
-{
- if (ld_entry == NULL)
- return "Service unavailable";
-
- return (ld_entry->dlerror)();
-}
-
-
-/*
- * Support routines
- */
-
-#ifdef DEBUG
-static int
-_strncmp(s1, s2, n)
- register char *s1, *s2;
- register n;
-{
-
- if (n == 0)
- return (0);
- do {
- if (*s1 != *s2++)
- return (*(unsigned char *)s1 - *(unsigned char *)--s2);
- if (*s1++ == 0)
- break;
- } while (--n != 0);
- return (0);
-}
-
-static char *
-_getenv(name)
- register char *name;
-{
- extern char **environ;
- register int len;
- register char **P, *C;
-
- for (C = name, len = 0; *C && *C != '='; ++C, ++len);
- for (P = environ; *P; ++P)
- if (!_strncmp(*P, name, len))
- if (*(C = *P + len) == '=') {
- return(++C);
- }
- return (char *)0;
-}
-
-#endif /* DEBUG */
-
- asm(" ___syscall:");
- asm(" popl %ecx");
- asm(" popl %eax");
- asm(" pushl %ecx");
- asm(" .byte 0x9a");
- asm(" .long 0");
- asm(" .word 7");
- asm(" pushl %ecx");
- asm(" jc 1f");
- asm(" ret");
- asm(" 1:");
- asm(" movl $-1,%eax");
- asm(" ret");
-
-#else /* DYNAMIC */
-
-/*
- * DL stubs for static linking case (just return error)
- */
-
-void *
-dlopen(name, mode)
-const char *name;
-int mode;
-{
- return NULL;
-}
-
-int
-dlclose(fd)
-void *fd;
-{
- return -1;
-}
-
-void *
-dlsym(fd, name)
-void *fd;
-const char *name;
-{
- return NULL;
-}
-
-
-const char *
-dlerror()
-{
- return "Service unavailable";
-}
-#endif /* DYNAMIC */
-
-
-/*
- * Support routines
- */
-
-#ifdef MCRT0
-asm (" .text");
-asm ("_eprol:");
-#endif
diff --git a/lib/csu/i386/dlfcn.h b/lib/csu/i386/dlfcn.h
deleted file mode 100644
index e167ef2..0000000
--- a/lib/csu/i386/dlfcn.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)err.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _DLFCN_H_
-#define _DLFCN_H_
-#include <sys/cdefs.h>
-
-/*
- * Modes for dlopen().
- */
-#define RTLD_LAZY 1 /* Bind function calls lazily */
-#define RTLD_NOW 2 /* Bind function calls immediately */
-
-/*
- * Special handle argument for dlsym(). It causes the search for the
- * symbol to begin in the next shared object after the one containing
- * the caller.
- */
-#define RTLD_NEXT ((void *) -1)
-
-__BEGIN_DECLS
-void *dlopen __P((const char *, int));
-void *dlsym __P((void *, const char *));
-const char *dlerror __P((void));
-int dlclose __P((void *));
-__END_DECLS
-
-#endif /* !_DLFCN_H_ */
diff --git a/lib/csu/i386/dlopen.3 b/lib/csu/i386/dlopen.3
deleted file mode 100644
index b9a987c..0000000
--- a/lib/csu/i386/dlopen.3
+++ /dev/null
@@ -1,236 +0,0 @@
-.\" This source code is a product of Sun Microsystems, Inc. and is provided
-.\" for unrestricted use provided that this legend is included on all tape
-.\" media and as a part of the software program in whole or part. Users
-.\" may copy or modify this source code without charge, but are not authorized
-.\" to license or distribute it to anyone else except as part of a product or
-.\" program developed by the user.
-.\"
-.\" THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
-.\" SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
-.\" OF SUCH SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT
-.\" EXPRESS OR IMPLIED WARRANTY OF ANY KIND. SUN MICROSYSTEMS, INC. DISCLAIMS
-.\" ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
-.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN
-.\" NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
-.\" INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
-.\" FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
-.\"
-.\" This source code is provided with no support and without any obligation on
-.\" the part of Sun Microsystems, Inc. to assist in its use, correction,
-.\" modification or enhancement.
-.\"
-.\" SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
-.\" INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
-.\" SOURCE CODE OR ANY PART THEREOF.
-.\"
-.\" Sun Microsystems, Inc.
-.\" 2550 Garcia Avenue
-.\" Mountain View, California 94043
-.\"
-.\" Copyright (c) 1991 Sun Microsystems, Inc.
-.\"
-.\" @(#) dlopen.3 1.6 90/01/31 SMI
-.Dd September 24, 1989
-.Os FreeBSD
-.Dt DLOPEN 3
-.Sh NAME
-.Nm dlopen, dlsym, dlerror, dlclose
-.Nd programmatic interface to the dynamic linker
-.Sh SYNOPSIS
-.Fd #include <dlfcn.h>
-.Ft void *
-.Fn dlopen "const char *path" "int mode"
-.Ft void *
-.Fn dlsym "void *handle" "const char *symbol"
-.Ft const char *
-.Fn dlerror "void"
-.Ft int
-.Fn dlclose "void *handle"
-.Sh DESCRIPTION
-These functions provide a simple programmatic interface to the services of the
-dynamic linker.
-Operations are provided to add new shared objects to a
-program's address space, to obtain the address bindings of symbols
-defined by such
-objects, and to remove such objects when their use is no longer required.
-.Pp
-.Fn dlopen
-provides access to the shared object in
-.Fa path ,
-returning a descriptor that can be used for later
-references to the object in calls to
-.Fn dlsym
-and
-.Fn dlclose .
-If
-.Fa path
-was not in the address space prior to the call to
-.Fn dlopen ,
-it is placed in the address space.
-When an object is first loaded into the address space in this way, its
-function
-.Fn _init ,
-if any, is called by the dynamic linker.
-(Note that
-.Ql _init
-is the name as expressed in the C language.
-From assembly language, the name would appear as
-.Ql __init
-instead.)
-If
-.Fa path
-has already been placed in the address space in a previous call to
-.Fn dlopen ,
-it is not added a second time, although a reference count of
-.Fn dlopen
-operations on
-.Fa path
-is maintained.
-A null pointer supplied for
-.Fa path
-is interpreted as a reference to the main
-executable of the process.
-.Fa mode
-controls the way in which external function references from the
-loaded object are bound to their referents.
-It must contains one of the following values:
-.Bl -tag -width RTLD_LAZYX
-.It Dv RTLD_LAZY
-Each external function reference is resolved when the function is first
-called.
-.It Dv RTLD_NOW
-All external function references are bound immediately by
-.Fn dlopen .
-.El
-.Pp
-.Dv RTLD_LAZY
-is normally preferred, for reasons of efficiency.
-However,
-.Dv RTLD_NOW
-is useful to ensure that any undefined symbols are discovered during the
-call to
-.Fn dlopen .
-If
-.Fn dlopen
-fails, it returns a null pointer, and sets an error condition which may
-be interrogated with
-.Fn dlerror .
-.Pp
-.Fn dlsym
-returns the address binding of the symbol described in the null-terminated
-character string
-.Fa symbol ,
-as it occurs in the shared object identified by
-.Fa handle .
-Note that
-.Fa symbol
-is the assembly language representation of the symbol name.
-The assembly language representation of a C language symbol contains an
-extra underscore at the beginning.
-For example, the symbol
-.Ql foo
-in C would appear as
-.Ql _foo
-in assembly language, and in the
-.Fa symbol
-argument to
-.Fn dlsym .
-The symbols exported by objects added to the address space by
-.Fn dlopen
-can be accessed only through calls to
-.Fn dlsym .
-Such symbols do not supersede any definition of those symbols already present
-in the address space when the object is loaded, nor are they available to
-satisfy normal dynamic linking references.
-A null pointer supplied as the value of
-.Fa handle
-is interpreted as a reference to the executable from which the call to
-.Fn dlsym
-is being made. Thus a shared object can reference its own symbols.
-.Fn dlsym
-returns a null pointer if the symbol cannot be found, and sets an error
-condition which may be queried with
-.Fn dlerror .
-.Pp
-If
-.Fn dlsym
-is called with the special
-.Fa handle
-.Dv RTLD_NEXT ,
-then the search for the symbol is limited to the shared objects
-which were loaded after the one issuing the call to
-.Fn dlsym .
-Thus, if the function is called from the main program, all
-the shared libraries are searched.
-If it is called from a shared library, all subsequent shared
-libraries are searched.
-.Dv RTLD_NEXT
-is useful for implementing wrappers around library functions.
-For example, a wrapper function
-.Fn getpid
-could access the
-.Dq real
-.Fn getpid
-with
-.Li dlsym(RTLD_NEXT, \&"_getpid\&") .
-.Pp
-.Fn dlerror
-returns a null-terminated character string describing the last error that
-occurred during a call to
-.Fn dlopen ,
-.Fn dlsym ,
-or
-.Fn dlclose .
-If no such error has occurred,
-.Fn dlerror
-returns a null pointer.
-At each call to
-.Fn dlerror ,
-the error indication is reset. Thus in the case of two calls
-to
-.Fn dlerror ,
-where the second call follows the first immediately, the second call
-will always return a null pointer.
-.Pp
-.Fn dlclose
-deletes a reference to the shared object referenced by
-.Fa handle .
-If the reference count drops to 0, the object is removed from the
-address space, and
-.Fa handle
-is rendered invalid.
-Just before removing a shared object in this way, the dynamic linker
-calls the object's
-.Fn _fini
-function, if such a function is defined by the object.
-As with
-.Ql _init ,
-.Ql _fini
-is the C language name of the function.
-If
-.Fn dlclose
-is successful, it returns a value of 0.
-Otherwise it returns -1, and sets an error condition that can be
-interrogated with
-.Fn dlerror .
-.Pp
-The object-intrinsic functions
-.Fn _init
-and
-.Fn _fini
-are called with no arguments, and are not expected to return values.
-.Sh ERRORS
-.Fn dlopen
-and
-.Fn dlsym
-return the null pointer in the event of errors.
-.Fn dlclose
-returns 0 on success, or -1 if an error occurred.
-Whenever an error has been detected, a message detailing it can be
-retrieved via a call to
-.Fn dlerror .
-.Sh SEE ALSO
-.Xr ld 1 ,
-.Xr rtld 1 ,
-.Xr link 5
-
diff --git a/lib/libF77/F77_aloc.c b/lib/libF77/F77_aloc.c
deleted file mode 100644
index e8ba744..0000000
--- a/lib/libF77/F77_aloc.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "f2c.h"
-#undef abs
-#undef min
-#undef max
-#include "stdio.h"
-
-static integer memfailure = 3;
-
-#ifdef KR_headers
-extern char *malloc();
-extern void exit_();
-
- char *
-F77_aloc(Len, whence) integer Len; char *whence;
-#else
-#include "stdlib.h"
-extern void exit_(integer*);
-
- char *
-F77_aloc(integer Len, char *whence)
-#endif
-{
- char *rv;
- unsigned int uLen = (unsigned int) Len; /* for K&R C */
-
- if (!(rv = (char*)malloc(uLen))) {
- fprintf(stderr, "malloc(%u) failure in %s\n",
- uLen, whence);
- exit_(&memfailure);
- }
- return rv;
- }
diff --git a/lib/libF77/Notice b/lib/libF77/Notice
deleted file mode 100644
index 64af9f1..0000000
--- a/lib/libF77/Notice
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************
-Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories and Bellcore.
-
-Permission to use, copy, modify, and distribute this software
-and its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the names of AT&T Bell Laboratories or
-Bellcore or any of their entities not be used in advertising or
-publicity pertaining to distribution of the software without
-specific, written prior permission.
-
-AT&T and Bellcore disclaim all warranties with regard to this
-software, including all implied warranties of merchantability
-and fitness. In no event shall AT&T or Bellcore 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.
-****************************************************************/
-
diff --git a/lib/libF77/README b/lib/libF77/README
deleted file mode 100644
index 7668215..0000000
--- a/lib/libF77/README
+++ /dev/null
@@ -1,108 +0,0 @@
-If your compiler does not recognize ANSI C headers,
-compile with KR_headers defined: either add -DKR_headers
-to the definition of CFLAGS in the makefile, or insert
-
-#define KR_headers
-
-at the top of f2c.h , cabs.c , main.c , and sig_die.c .
-
-Under MS-DOS, compile s_paus.c with -DMSDOS.
-
-If you have a really ancient K&R C compiler that does not understand
-void, add -Dvoid=int to the definition of CFLAGS in the makefile.
-
-If you use a C++ compiler, first create a local f2c.h by appending
-f2ch.add to the usual f2c.h, e.g., by issuing the command
- make f2c.h
-which assumes f2c.h is installed in /usr/include .
-
-If your system lacks onexit() and you are not using an ANSI C
-compiler, then you should compile main.c, s_paus.c, s_stop.c, and
-sig_die.c with NO_ONEXIT defined. See the comments about onexit in
-the makefile.
-
-If your system has a double drem() function such that drem(a,b)
-is the IEEE remainder function (with double a, b), then you may
-wish to compile r_mod.c and d_mod.c with IEEE_drem defined.
-On some systems, you may also need to compile with -Ddrem=remainder .
-
-To check for transmission errors, issue the command
- make check
-This assumes you have the xsum program whose source, xsum.c,
-is distributed as part of "all from f2c/src". If you do not
-have xsum, you can obtain xsum.c by sending the following E-mail
-message to netlib@netlib.bell-labs.com
- send xsum.c from f2c/src
-
-The makefile assumes you have installed f2c.h in a standard
-place (and does not cause recompilation when f2c.h is changed);
-f2c.h comes with "all from f2c" (the source for f2c) and is
-available separately ("f2c.h from f2c").
-
-Most of the routines in libF77 are support routines for Fortran
-intrinsic functions or for operations that f2c chooses not
-to do "in line". There are a few exceptions, summarized below --
-functions and subroutines that appear to your program as ordinary
-external Fortran routines.
-
-1. CALL ABORT prints a message and causes a core dump.
-
-2. ERF(r) and DERF(d) and the REAL and DOUBLE PRECISION
- error functions (with x REAL and d DOUBLE PRECISION);
- DERF must be declared DOUBLE PRECISION in your program.
- Both ERF and DERF assume your C library provides the
- underlying erf() function (which not all systems do).
-
-3. ERFC(r) and DERFC(d) are the complementary error functions:
- ERFC(r) = 1 - ERF(r) and DERFC(d) = 1.d0 - DERFC(d)
- (except that their results may be more accurate than
- explicitly evaluating the above formulae would give).
- Again, ERFC and r are REAL, and DERFC and d are DOUBLE
- PRECISION (and must be declared as such in your program),
- and ERFC and DERFC rely on your system's erfc().
-
-4. CALL GETARG(n,s), where n is an INTEGER and s is a CHARACTER
- variable, sets s to the n-th command-line argument (or to
- all blanks if there are fewer than n command-line arguments);
- CALL GETARG(0,s) sets s to the name of the program (on systems
- that support this feature). See IARGC below.
-
-5. CALL GETENV(name, value), where name and value are of type
- CHARACTER, sets value to the environment value, $name, of
- name (or to blanks if $name has not been set).
-
-6. NARGS = IARGC() sets NARGS to the number of command-line
- arguments (an INTEGER value).
-
-7. CALL SIGNAL(n,func), where n is an INTEGER and func is an
- EXTERNAL procedure, arranges for func to be invoked when
- signal n occurs (on systems where this makes sense).
-
-8. CALL SYSTEM(cmd), where cmd is of type CHARACTER, passes
- cmd to the system's command processor (on systems where
- this can be done).
-
-The makefile does not attempt to compile pow_qq.c, qbitbits.c,
-and qbitshft.c, which are meant for use with INTEGER*8. To use
-INTEGER*8, you must modify f2c.h to declare longint and ulongint
-appropriately; then add pow_qq.o to the POW = line in the makefile,
-and add " qbitbits.o qbitshft.o" to the makefile's F90BIT = line.
-
-Following Fortran 90, s_cat.c and s_copy.c allow the target of a
-(character string) assignment to be appear on its right-hand, at
-the cost of some extra overhead for all run-time concatenations.
-If you prefer the extra efficiency that comes with the Fortran 77
-requirement that the left-hand side of a character assignment not
-be involved in the right-hand side, compile s_cat.c and s_copy.c
-with -DNO_OVERWRITE .
-
-If your system lacks a ranlib command, you don't need it.
-Either comment out the makefile's ranlib invocation, or install
-a harmless "ranlib" command somewhere in your PATH, such as the
-one-line shell script
-
- exit 0
-
-or (on some systems)
-
- exec /usr/bin/ar lts $1 >/dev/null
diff --git a/lib/libF77/Version.c b/lib/libF77/Version.c
deleted file mode 100644
index eb4fa2d..0000000
--- a/lib/libF77/Version.c
+++ /dev/null
@@ -1,49 +0,0 @@
-static char junk[] = "\n@(#)LIBF77 VERSION 19970226\n";
-
-/*
-2.00 11 June 1980. File version.c added to library.
-2.01 31 May 1988. s_paus() flushes stderr; names of hl_* fixed
- [ d]erf[c ] added
- 8 Aug. 1989: #ifdefs for f2c -i2 added to s_cat.c
- 29 Nov. 1989: s_cmp returns long (for f2c)
- 30 Nov. 1989: arg types from f2c.h
- 12 Dec. 1989: s_rnge allows long names
- 19 Dec. 1989: getenv_ allows unsorted environment
- 28 Mar. 1990: add exit(0) to end of main()
- 2 Oct. 1990: test signal(...) == SIG_IGN rather than & 01 in main
- 17 Oct. 1990: abort() calls changed to sig_die(...,1)
- 22 Oct. 1990: separate sig_die from main
- 25 Apr. 1991: minor, theoretically invisible tweaks to s_cat, sig_die
- 31 May 1991: make system_ return status
- 18 Dec. 1991: change long to ftnlen (for -i2) many places
- 28 Feb. 1992: repair z_sqrt.c (scribbled on input, gave wrong answer)
- 18 July 1992: for n < 0, repair handling of 0**n in pow_[dr]i.c
- and m**n in pow_hh.c and pow_ii.c;
- catch SIGTRAP in main() for error msg before abort
- 23 July 1992: switch to ANSI prototypes unless KR_headers is #defined
- 23 Oct. 1992: fix botch in signal_.c (erroneous deref of 2nd arg);
- change Cabs to f__cabs.
- 12 March 1993: various tweaks for C++
- 2 June 1994: adjust so abnormal terminations invoke f_exit just once
- 16 Sept. 1994: s_cmp: treat characters as unsigned in comparisons.
- 19 Sept. 1994: s_paus: flush after end of PAUSE; add -DMSDOS
- 12 Jan. 1995: pow_[dhiqrz][hiq]: adjust x**i to work on machines
- that sign-extend right shifts when i is the most
- negative integer.
- 26 Jan. 1995: adjust s_cat.c, s_copy.c to permit the left-hand side
- of character assignments to appear on the right-hand
- side (unless compiled with -DNO_OVERWRITE).
- 27 Jan. 1995: minor tweak to s_copy.c: copy forward whenever
- possible (for better cache behavior).
- 30 May 1995: added subroutine exit(rc) integer rc. Version not changed.
- 29 Aug. 1995: add F77_aloc.c; use it in s_cat.c and system_.c.
- 6 Sept. 1995: fix return type of system_ under -DKR_headers.
- 19 Dec. 1995: s_cat.c: fix bug when 2nd or later arg overlaps lhs.
- 19 Mar. 1996: s_cat.c: supply missing break after overlap detection.
- 13 May 1996: add [lq]bitbits.c and [lq]bitshft.c (f90 bit intrinsics).
- 19 June 1996: add casts to unsigned in [lq]bitshft.c.
- 26 Feb. 1997: adjust functions with a complex output argument
- to permit aliasing it with input arguments.
- (For now, at least, this is just for possible
- benefit of g77.)
-*/
diff --git a/lib/libF77/abort_.c b/lib/libF77/abort_.c
deleted file mode 100644
index 9d4a056..0000000
--- a/lib/libF77/abort_.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "stdio.h"
-#include "f2c.h"
-
-#ifdef KR_headers
-extern VOID sig_die();
-
-int abort_()
-#else
-extern void sig_die(char*,int);
-
-int abort_(void)
-#endif
-{
-sig_die("Fortran abort routine called", 1);
-#ifdef __cplusplus
-return 0;
-#endif
-}
diff --git a/lib/libF77/c_abs.c b/lib/libF77/c_abs.c
deleted file mode 100644
index 041fbd3..0000000
--- a/lib/libF77/c_abs.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern double f__cabs();
-
-double c_abs(z) complex *z;
-#else
-extern double f__cabs(double, double);
-
-double c_abs(complex *z)
-#endif
-{
-return( f__cabs( z->r, z->i ) );
-}
diff --git a/lib/libF77/c_cos.c b/lib/libF77/c_cos.c
deleted file mode 100644
index 4aea0c3..0000000
--- a/lib/libF77/c_cos.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern double sin(), cos(), sinh(), cosh();
-
-VOID c_cos(r, z) complex *r, *z;
-#else
-#undef abs
-#include "math.h"
-
-void c_cos(complex *r, complex *z)
-#endif
-{
- double zr = z->r;
- r->r = cos(zr) * cosh(z->i);
- r->i = - sin(zr) * sinh(z->i);
- }
diff --git a/lib/libF77/c_div.c b/lib/libF77/c_div.c
deleted file mode 100644
index 57139a0..0000000
--- a/lib/libF77/c_div.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern VOID sig_die();
-VOID c_div(c, a, b)
-complex *a, *b, *c;
-#else
-extern void sig_die(char*,int);
-void c_div(complex *c, complex *a, complex *b)
-#endif
-{
- double ratio, den;
- double abr, abi;
- double ai = a->i, ar = a->r, bi = b->i, br = b->r;
-
- if( (abr = br) < 0.)
- abr = - abr;
- if( (abi = bi) < 0.)
- abi = - abi;
- if( abr <= abi )
- {
- if(abi == 0)
- sig_die("complex division by zero", 1);
- ratio = (double)br / bi ;
- den = bi * (1 + ratio*ratio);
- c->r = (ar*ratio + ai) / den;
- c->i = (ai*ratio - ar) / den;
- }
-
- else
- {
- ratio = (double)bi / br ;
- den = br * (1 + ratio*ratio);
- c->r = (ar + ai*ratio) / den;
- c->i = (ai - ar*ratio) / den;
- }
- }
diff --git a/lib/libF77/c_exp.c b/lib/libF77/c_exp.c
deleted file mode 100644
index 8252c7f..0000000
--- a/lib/libF77/c_exp.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern double exp(), cos(), sin();
-
- VOID c_exp(r, z) complex *r, *z;
-#else
-#undef abs
-#include "math.h"
-
-void c_exp(complex *r, complex *z)
-#endif
-{
-double expx;
-
-expx = exp(z->r);
-r->r = expx * cos(z->i);
-r->i = expx * sin(z->i);
-}
diff --git a/lib/libF77/c_log.c b/lib/libF77/c_log.c
deleted file mode 100644
index 6ac990c..0000000
--- a/lib/libF77/c_log.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern double log(), f__cabs(), atan2();
-VOID c_log(r, z) complex *r, *z;
-#else
-#undef abs
-#include "math.h"
-extern double f__cabs(double, double);
-
-void c_log(complex *r, complex *z)
-#endif
-{
- double zi;
- r->i = atan2(zi = z->i, z->r);
- r->r = log( f__cabs(z->r, zi) );
- }
diff --git a/lib/libF77/c_sin.c b/lib/libF77/c_sin.c
deleted file mode 100644
index 15acccc..0000000
--- a/lib/libF77/c_sin.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern double sin(), cos(), sinh(), cosh();
-
-VOID c_sin(r, z) complex *r, *z;
-#else
-#undef abs
-#include "math.h"
-
-void c_sin(complex *r, complex *z)
-#endif
-{
- double zr = z->r;
- r->r = sin(zr) * cosh(z->i);
- r->i = cos(zr) * sinh(z->i);
- }
diff --git a/lib/libF77/c_sqrt.c b/lib/libF77/c_sqrt.c
deleted file mode 100644
index 8481ee4..0000000
--- a/lib/libF77/c_sqrt.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern double sqrt(), f__cabs();
-
-VOID c_sqrt(r, z) complex *r, *z;
-#else
-#undef abs
-#include "math.h"
-extern double f__cabs(double, double);
-
-void c_sqrt(complex *r, complex *z)
-#endif
-{
- double mag, t;
- double zi = z->i, zr = z->r;
-
- if( (mag = f__cabs(zr, zi)) == 0.)
- r->r = r->i = 0.;
- else if(zr > 0)
- {
- r->r = t = sqrt(0.5 * (mag + zr) );
- t = zi / t;
- r->i = 0.5 * t;
- }
- else
- {
- t = sqrt(0.5 * (mag - zr) );
- if(zi < 0)
- t = -t;
- r->i = t;
- t = zi / t;
- r->r = 0.5 * t;
- }
- }
diff --git a/lib/libF77/cabs.c b/lib/libF77/cabs.c
deleted file mode 100644
index 09e90af..0000000
--- a/lib/libF77/cabs.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifdef KR_headers
-extern double sqrt();
-double f__cabs(real, imag) double real, imag;
-#else
-#undef abs
-#include "math.h"
-double f__cabs(double real, double imag)
-#endif
-{
-double temp;
-
-if(real < 0)
- real = -real;
-if(imag < 0)
- imag = -imag;
-if(imag > real){
- temp = real;
- real = imag;
- imag = temp;
-}
-if((real+imag) == real)
- return(real);
-
-temp = imag/real;
-temp = real*sqrt(1.0 + temp*temp); /*overflow!!*/
-return(temp);
-}
diff --git a/lib/libF77/d_abs.c b/lib/libF77/d_abs.c
deleted file mode 100644
index cb157e0..0000000
--- a/lib/libF77/d_abs.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double d_abs(x) doublereal *x;
-#else
-double d_abs(doublereal *x)
-#endif
-{
-if(*x >= 0)
- return(*x);
-return(- *x);
-}
diff --git a/lib/libF77/d_acos.c b/lib/libF77/d_acos.c
deleted file mode 100644
index ecb56e8..0000000
--- a/lib/libF77/d_acos.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double acos();
-double d_acos(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_acos(doublereal *x)
-#endif
-{
-return( acos(*x) );
-}
diff --git a/lib/libF77/d_asin.c b/lib/libF77/d_asin.c
deleted file mode 100644
index 045e733..0000000
--- a/lib/libF77/d_asin.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double asin();
-double d_asin(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_asin(doublereal *x)
-#endif
-{
-return( asin(*x) );
-}
diff --git a/lib/libF77/d_atan.c b/lib/libF77/d_atan.c
deleted file mode 100644
index 03530a1..0000000
--- a/lib/libF77/d_atan.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double atan();
-double d_atan(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_atan(doublereal *x)
-#endif
-{
-return( atan(*x) );
-}
diff --git a/lib/libF77/d_atn2.c b/lib/libF77/d_atn2.c
deleted file mode 100644
index 7c25ac0..0000000
--- a/lib/libF77/d_atn2.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double atan2();
-double d_atn2(x,y) doublereal *x, *y;
-#else
-#undef abs
-#include "math.h"
-double d_atn2(doublereal *x, doublereal *y)
-#endif
-{
-return( atan2(*x,*y) );
-}
diff --git a/lib/libF77/d_cnjg.c b/lib/libF77/d_cnjg.c
deleted file mode 100644
index c778c38..0000000
--- a/lib/libF77/d_cnjg.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
- VOID
-#ifdef KR_headers
-d_cnjg(r, z) doublecomplex *r, *z;
-#else
-d_cnjg(doublecomplex *r, doublecomplex *z)
-#endif
-{
-r->r = z->r;
-r->i = - z->i;
-}
diff --git a/lib/libF77/d_cos.c b/lib/libF77/d_cos.c
deleted file mode 100644
index 45c4838..0000000
--- a/lib/libF77/d_cos.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double cos();
-double d_cos(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_cos(doublereal *x)
-#endif
-{
-return( cos(*x) );
-}
diff --git a/lib/libF77/d_cosh.c b/lib/libF77/d_cosh.c
deleted file mode 100644
index 1181833..0000000
--- a/lib/libF77/d_cosh.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double cosh();
-double d_cosh(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_cosh(doublereal *x)
-#endif
-{
-return( cosh(*x) );
-}
diff --git a/lib/libF77/d_dim.c b/lib/libF77/d_dim.c
deleted file mode 100644
index 1d0ecb7..0000000
--- a/lib/libF77/d_dim.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double d_dim(a,b) doublereal *a, *b;
-#else
-double d_dim(doublereal *a, doublereal *b)
-#endif
-{
-return( *a > *b ? *a - *b : 0);
-}
diff --git a/lib/libF77/d_exp.c b/lib/libF77/d_exp.c
deleted file mode 100644
index 3f2b6ff..0000000
--- a/lib/libF77/d_exp.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double exp();
-double d_exp(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_exp(doublereal *x)
-#endif
-{
-return( exp(*x) );
-}
diff --git a/lib/libF77/d_imag.c b/lib/libF77/d_imag.c
deleted file mode 100644
index 793a3f9..0000000
--- a/lib/libF77/d_imag.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double d_imag(z) doublecomplex *z;
-#else
-double d_imag(doublecomplex *z)
-#endif
-{
-return(z->i);
-}
diff --git a/lib/libF77/d_int.c b/lib/libF77/d_int.c
deleted file mode 100644
index 6c0e642..0000000
--- a/lib/libF77/d_int.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double floor();
-double d_int(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_int(doublereal *x)
-#endif
-{
-return( (*x>0) ? floor(*x) : -floor(- *x) );
-}
diff --git a/lib/libF77/d_lg10.c b/lib/libF77/d_lg10.c
deleted file mode 100644
index 3135881..0000000
--- a/lib/libF77/d_lg10.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double log10();
-double d_lg10(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_lg10(doublereal *x)
-#endif
-{
-return( log10(*x) );
-}
diff --git a/lib/libF77/d_log.c b/lib/libF77/d_log.c
deleted file mode 100644
index d7a1941..0000000
--- a/lib/libF77/d_log.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double log();
-double d_log(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_log(doublereal *x)
-#endif
-{
-return( log(*x) );
-}
diff --git a/lib/libF77/d_mod.c b/lib/libF77/d_mod.c
deleted file mode 100644
index 0d3ffbf..0000000
--- a/lib/libF77/d_mod.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-#ifdef IEEE_drem
-double drem();
-#else
-double floor();
-#endif
-double d_mod(x,y) doublereal *x, *y;
-#else
-#ifdef IEEE_drem
-double drem(double, double);
-#else
-#undef abs
-#include "math.h"
-#endif
-double d_mod(doublereal *x, doublereal *y)
-#endif
-{
-#ifdef IEEE_drem
- double xa, ya, z;
- if ((ya = *y) < 0.)
- ya = -ya;
- z = drem(xa = *x, ya);
- if (xa > 0) {
- if (z < 0)
- z += ya;
- }
- else if (z > 0)
- z -= ya;
- return z;
-#else
- double quotient;
- if( (quotient = *x / *y) >= 0)
- quotient = floor(quotient);
- else
- quotient = -floor(-quotient);
- return(*x - (*y) * quotient );
-#endif
-}
diff --git a/lib/libF77/d_nint.c b/lib/libF77/d_nint.c
deleted file mode 100644
index 2ead3df..0000000
--- a/lib/libF77/d_nint.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double floor();
-double d_nint(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_nint(doublereal *x)
-#endif
-{
-return( (*x)>=0 ?
- floor(*x + .5) : -floor(.5 - *x) );
-}
diff --git a/lib/libF77/d_prod.c b/lib/libF77/d_prod.c
deleted file mode 100644
index 3d4cef7..0000000
--- a/lib/libF77/d_prod.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double d_prod(x,y) real *x, *y;
-#else
-double d_prod(real *x, real *y)
-#endif
-{
-return( (*x) * (*y) );
-}
diff --git a/lib/libF77/d_sign.c b/lib/libF77/d_sign.c
deleted file mode 100644
index 514ff0b..0000000
--- a/lib/libF77/d_sign.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double d_sign(a,b) doublereal *a, *b;
-#else
-double d_sign(doublereal *a, doublereal *b)
-#endif
-{
-double x;
-x = (*a >= 0 ? *a : - *a);
-return( *b >= 0 ? x : -x);
-}
diff --git a/lib/libF77/d_sin.c b/lib/libF77/d_sin.c
deleted file mode 100644
index 0013af0..0000000
--- a/lib/libF77/d_sin.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double sin();
-double d_sin(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_sin(doublereal *x)
-#endif
-{
-return( sin(*x) );
-}
diff --git a/lib/libF77/d_sinh.c b/lib/libF77/d_sinh.c
deleted file mode 100644
index 1ccd02e..0000000
--- a/lib/libF77/d_sinh.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double sinh();
-double d_sinh(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_sinh(doublereal *x)
-#endif
-{
-return( sinh(*x) );
-}
diff --git a/lib/libF77/d_sqrt.c b/lib/libF77/d_sqrt.c
deleted file mode 100644
index bee10a3..0000000
--- a/lib/libF77/d_sqrt.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double sqrt();
-double d_sqrt(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_sqrt(doublereal *x)
-#endif
-{
-return( sqrt(*x) );
-}
diff --git a/lib/libF77/d_tan.c b/lib/libF77/d_tan.c
deleted file mode 100644
index 23fa423..0000000
--- a/lib/libF77/d_tan.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double tan();
-double d_tan(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_tan(doublereal *x)
-#endif
-{
-return( tan(*x) );
-}
diff --git a/lib/libF77/d_tanh.c b/lib/libF77/d_tanh.c
deleted file mode 100644
index 0363a49..0000000
--- a/lib/libF77/d_tanh.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double tanh();
-double d_tanh(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-double d_tanh(doublereal *x)
-#endif
-{
-return( tanh(*x) );
-}
diff --git a/lib/libF77/derf_.c b/lib/libF77/derf_.c
deleted file mode 100644
index 6afaccd..0000000
--- a/lib/libF77/derf_.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double erf();
-double derf_(x) doublereal *x;
-#else
-extern double erf(double);
-double derf_(doublereal *x)
-#endif
-{
-return( erf(*x) );
-}
diff --git a/lib/libF77/derfc_.c b/lib/libF77/derfc_.c
deleted file mode 100644
index e199f91..0000000
--- a/lib/libF77/derfc_.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern double erfc();
-
-double derfc_(x) doublereal *x;
-#else
-extern double erfc(double);
-
-double derfc_(doublereal *x)
-#endif
-{
-return( erfc(*x) );
-}
diff --git a/lib/libF77/ef1asc_.c b/lib/libF77/ef1asc_.c
deleted file mode 100644
index b2b8d72..0000000
--- a/lib/libF77/ef1asc_.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* EFL support routine to copy string b to string a */
-
-#include "f2c.h"
-
-
-#define M ( (long) (sizeof(long) - 1) )
-#define EVEN(x) ( ( (x)+ M) & (~M) )
-
-#ifdef KR_headers
-extern VOID s_copy();
-ef1asc_(a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb;
-#else
-extern void s_copy(char*,char*,ftnlen,ftnlen);
-int ef1asc_(ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb)
-#endif
-{
-s_copy( (char *)a, (char *)b, EVEN(*la), *lb );
-#ifdef __cplusplus
-return 0;
-#endif
-}
diff --git a/lib/libF77/ef1cmc_.c b/lib/libF77/ef1cmc_.c
deleted file mode 100644
index 8239a6b..0000000
--- a/lib/libF77/ef1cmc_.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* EFL support routine to compare two character strings */
-
-#include "f2c.h"
-
-#ifdef KR_headers
-extern integer s_cmp();
-integer ef1cmc_(a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb;
-#else
-extern integer s_cmp(char*,char*,ftnlen,ftnlen);
-integer ef1cmc_(ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb)
-#endif
-{
-return( s_cmp( (char *)a, (char *)b, *la, *lb) );
-}
diff --git a/lib/libF77/erf_.c b/lib/libF77/erf_.c
deleted file mode 100644
index f7565ae..0000000
--- a/lib/libF77/erf_.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double erf();
-double erf_(x) real *x;
-#else
-extern double erf(double);
-double erf_(real *x)
-#endif
-{
-return( erf(*x) );
-}
diff --git a/lib/libF77/erfc_.c b/lib/libF77/erfc_.c
deleted file mode 100644
index 56adb2f..0000000
--- a/lib/libF77/erfc_.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double erfc();
-double erfc_(x) real *x;
-#else
-extern double erfc(double);
-double erfc_(real *x)
-#endif
-{
-return( erfc(*x) );
-}
diff --git a/lib/libF77/f2ch.add b/lib/libF77/f2ch.add
deleted file mode 100644
index a2acc17..0000000
--- a/lib/libF77/f2ch.add
+++ /dev/null
@@ -1,162 +0,0 @@
-/* If you are using a C++ compiler, append the following to f2c.h
- for compiling libF77 and libI77. */
-
-#ifdef __cplusplus
-extern "C" {
-extern int abort_(void);
-extern double c_abs(complex *);
-extern void c_cos(complex *, complex *);
-extern void c_div(complex *, complex *, complex *);
-extern void c_exp(complex *, complex *);
-extern void c_log(complex *, complex *);
-extern void c_sin(complex *, complex *);
-extern void c_sqrt(complex *, complex *);
-extern double d_abs(double *);
-extern double d_acos(double *);
-extern double d_asin(double *);
-extern double d_atan(double *);
-extern double d_atn2(double *, double *);
-extern void d_cnjg(doublecomplex *, doublecomplex *);
-extern double d_cos(double *);
-extern double d_cosh(double *);
-extern double d_dim(double *, double *);
-extern double d_exp(double *);
-extern double d_imag(doublecomplex *);
-extern double d_int(double *);
-extern double d_lg10(double *);
-extern double d_log(double *);
-extern double d_mod(double *, double *);
-extern double d_nint(double *);
-extern double d_prod(float *, float *);
-extern double d_sign(double *, double *);
-extern double d_sin(double *);
-extern double d_sinh(double *);
-extern double d_sqrt(double *);
-extern double d_tan(double *);
-extern double d_tanh(double *);
-extern double derf_(double *);
-extern double derfc_(double *);
-extern integer do_fio(ftnint *, char *, ftnlen);
-extern integer do_lio(ftnint *, ftnint *, char *, ftnlen);
-extern integer do_uio(ftnint *, char *, ftnlen);
-extern integer e_rdfe(void);
-extern integer e_rdue(void);
-extern integer e_rsfe(void);
-extern integer e_rsfi(void);
-extern integer e_rsle(void);
-extern integer e_rsli(void);
-extern integer e_rsue(void);
-extern integer e_wdfe(void);
-extern integer e_wdue(void);
-extern integer e_wsfe(void);
-extern integer e_wsfi(void);
-extern integer e_wsle(void);
-extern integer e_wsli(void);
-extern integer e_wsue(void);
-extern int ef1asc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
-extern integer ef1cmc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
-extern double erf(double);
-extern double erf_(float *);
-extern double erfc(double);
-extern double erfc_(float *);
-extern integer f_back(alist *);
-extern integer f_clos(cllist *);
-extern integer f_end(alist *);
-extern void f_exit(void);
-extern integer f_inqu(inlist *);
-extern integer f_open(olist *);
-extern integer f_rew(alist *);
-extern int flush_(void);
-extern void getarg_(integer *, char *, ftnlen);
-extern void getenv_(char *, char *, ftnlen, ftnlen);
-extern short h_abs(short *);
-extern short h_dim(short *, short *);
-extern short h_dnnt(double *);
-extern short h_indx(char *, char *, ftnlen, ftnlen);
-extern short h_len(char *, ftnlen);
-extern short h_mod(short *, short *);
-extern short h_nint(float *);
-extern short h_sign(short *, short *);
-extern short hl_ge(char *, char *, ftnlen, ftnlen);
-extern short hl_gt(char *, char *, ftnlen, ftnlen);
-extern short hl_le(char *, char *, ftnlen, ftnlen);
-extern short hl_lt(char *, char *, ftnlen, ftnlen);
-extern integer i_abs(integer *);
-extern integer i_dim(integer *, integer *);
-extern integer i_dnnt(double *);
-extern integer i_indx(char *, char *, ftnlen, ftnlen);
-extern integer i_len(char *, ftnlen);
-extern integer i_mod(integer *, integer *);
-extern integer i_nint(float *);
-extern integer i_sign(integer *, integer *);
-extern integer iargc_(void);
-extern ftnlen l_ge(char *, char *, ftnlen, ftnlen);
-extern ftnlen l_gt(char *, char *, ftnlen, ftnlen);
-extern ftnlen l_le(char *, char *, ftnlen, ftnlen);
-extern ftnlen l_lt(char *, char *, ftnlen, ftnlen);
-extern void pow_ci(complex *, complex *, integer *);
-extern double pow_dd(double *, double *);
-extern double pow_di(double *, integer *);
-extern short pow_hh(short *, shortint *);
-extern integer pow_ii(integer *, integer *);
-extern double pow_ri(float *, integer *);
-extern void pow_zi(doublecomplex *, doublecomplex *, integer *);
-extern void pow_zz(doublecomplex *, doublecomplex *, doublecomplex *);
-extern double r_abs(float *);
-extern double r_acos(float *);
-extern double r_asin(float *);
-extern double r_atan(float *);
-extern double r_atn2(float *, float *);
-extern void r_cnjg(complex *, complex *);
-extern double r_cos(float *);
-extern double r_cosh(float *);
-extern double r_dim(float *, float *);
-extern double r_exp(float *);
-extern double r_imag(complex *);
-extern double r_int(float *);
-extern double r_lg10(float *);
-extern double r_log(float *);
-extern double r_mod(float *, float *);
-extern double r_nint(float *);
-extern double r_sign(float *, float *);
-extern double r_sin(float *);
-extern double r_sinh(float *);
-extern double r_sqrt(float *);
-extern double r_tan(float *);
-extern double r_tanh(float *);
-extern void s_cat(char *, char **, integer *, integer *, ftnlen);
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-extern void s_copy(char *, char *, ftnlen, ftnlen);
-extern int s_paus(char *, ftnlen);
-extern integer s_rdfe(cilist *);
-extern integer s_rdue(cilist *);
-extern integer s_rnge(char *, integer, char *, integer);
-extern integer s_rsfe(cilist *);
-extern integer s_rsfi(icilist *);
-extern integer s_rsle(cilist *);
-extern integer s_rsli(icilist *);
-extern integer s_rsne(cilist *);
-extern integer s_rsni(icilist *);
-extern integer s_rsue(cilist *);
-extern int s_stop(char *, ftnlen);
-extern integer s_wdfe(cilist *);
-extern integer s_wdue(cilist *);
-extern integer s_wsfe(cilist *);
-extern integer s_wsfi(icilist *);
-extern integer s_wsle(cilist *);
-extern integer s_wsli(icilist *);
-extern integer s_wsne(cilist *);
-extern integer s_wsni(icilist *);
-extern integer s_wsue(cilist *);
-extern void sig_die(char *, int);
-extern integer signal_(integer *, void (*)(int));
-extern integer system_(char *, ftnlen);
-extern double z_abs(doublecomplex *);
-extern void z_cos(doublecomplex *, doublecomplex *);
-extern void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
-extern void z_exp(doublecomplex *, doublecomplex *);
-extern void z_log(doublecomplex *, doublecomplex *);
-extern void z_sin(doublecomplex *, doublecomplex *);
-extern void z_sqrt(doublecomplex *, doublecomplex *);
- }
-#endif
diff --git a/lib/libF77/getarg_.c b/lib/libF77/getarg_.c
deleted file mode 100644
index fef0da7..0000000
--- a/lib/libF77/getarg_.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "f2c.h"
-
-/*
- * subroutine getarg(k, c)
- * returns the kth unix command argument in fortran character
- * variable argument c
-*/
-
-#ifdef KR_headers
-VOID getarg_(n, s, ls) ftnint *n; register char *s; ftnlen ls;
-#else
-void getarg_(ftnint *n, register char *s, ftnlen ls)
-#endif
-{
-extern int xargc;
-extern char **xargv;
-register char *t;
-register int i;
-
-if(*n>=0 && *n<xargc)
- t = xargv[*n];
-else
- t = "";
-for(i = 0; i<ls && *t!='\0' ; ++i)
- *s++ = *t++;
-for( ; i<ls ; ++i)
- *s++ = ' ';
-}
diff --git a/lib/libF77/getenv_.c b/lib/libF77/getenv_.c
deleted file mode 100644
index 2a035ea..0000000
--- a/lib/libF77/getenv_.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#include "f2c.h"
-
-/*
- * getenv - f77 subroutine to return environment variables
- *
- * called by:
- * call getenv (ENV_NAME, char_var)
- * where:
- * ENV_NAME is the name of an environment variable
- * char_var is a character variable which will receive
- * the current value of ENV_NAME, or all blanks
- * if ENV_NAME is not defined
- */
-
-#ifdef KR_headers
-VOID getenv_(fname, value, flen, vlen) char *value, *fname; ftnlen vlen, flen;
-#else
-void getenv_(char *fname, char *value, ftnlen flen, ftnlen vlen)
-#endif
-{
-extern char **environ;
-register char *ep, *fp, *flast;
-register char **env = environ;
-
-flast = fname + flen;
-for(fp = fname ; fp < flast ; ++fp)
- if(*fp == ' ')
- {
- flast = fp;
- break;
- }
-
-while (ep = *env++)
- {
- for(fp = fname; fp<flast ; )
- if(*fp++ != *ep++)
- goto endloop;
-
- if(*ep++ == '=') { /* copy right hand side */
- while( *ep && --vlen>=0 )
- *value++ = *ep++;
-
- goto blank;
- }
-endloop: ;
- }
-
-blank:
- while( --vlen >= 0 )
- *value++ = ' ';
-}
diff --git a/lib/libF77/h_abs.c b/lib/libF77/h_abs.c
deleted file mode 100644
index 73b8215..0000000
--- a/lib/libF77/h_abs.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-shortint h_abs(x) shortint *x;
-#else
-shortint h_abs(shortint *x)
-#endif
-{
-if(*x >= 0)
- return(*x);
-return(- *x);
-}
diff --git a/lib/libF77/h_dim.c b/lib/libF77/h_dim.c
deleted file mode 100644
index ceff660..0000000
--- a/lib/libF77/h_dim.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-shortint h_dim(a,b) shortint *a, *b;
-#else
-shortint h_dim(shortint *a, shortint *b)
-#endif
-{
-return( *a > *b ? *a - *b : 0);
-}
diff --git a/lib/libF77/h_dnnt.c b/lib/libF77/h_dnnt.c
deleted file mode 100644
index 9fbeb5c..0000000
--- a/lib/libF77/h_dnnt.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double floor();
-shortint h_dnnt(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-shortint h_dnnt(doublereal *x)
-#endif
-{
-return( (*x)>=0 ?
- floor(*x + .5) : -floor(.5 - *x) );
-}
diff --git a/lib/libF77/h_indx.c b/lib/libF77/h_indx.c
deleted file mode 100644
index a211cc7..0000000
--- a/lib/libF77/h_indx.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-shortint h_indx(a, b, la, lb) char *a, *b; ftnlen la, lb;
-#else
-shortint h_indx(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-ftnlen i, n;
-char *s, *t, *bend;
-
-n = la - lb + 1;
-bend = b + lb;
-
-for(i = 0 ; i < n ; ++i)
- {
- s = a + i;
- t = b;
- while(t < bend)
- if(*s++ != *t++)
- goto no;
- return((shortint)i+1);
- no: ;
- }
-return(0);
-}
diff --git a/lib/libF77/h_len.c b/lib/libF77/h_len.c
deleted file mode 100644
index 00a2151..0000000
--- a/lib/libF77/h_len.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-shortint h_len(s, n) char *s; ftnlen n;
-#else
-shortint h_len(char *s, ftnlen n)
-#endif
-{
-return(n);
-}
diff --git a/lib/libF77/h_mod.c b/lib/libF77/h_mod.c
deleted file mode 100644
index 43431c1..0000000
--- a/lib/libF77/h_mod.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-shortint h_mod(a,b) short *a, *b;
-#else
-shortint h_mod(short *a, short *b)
-#endif
-{
-return( *a % *b);
-}
diff --git a/lib/libF77/h_nint.c b/lib/libF77/h_nint.c
deleted file mode 100644
index bf63df1..0000000
--- a/lib/libF77/h_nint.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double floor();
-shortint h_nint(x) real *x;
-#else
-#undef abs
-#include "math.h"
-shortint h_nint(real *x)
-#endif
-{
-return( (*x)>=0 ?
- floor(*x + .5) : -floor(.5 - *x) );
-}
diff --git a/lib/libF77/h_sign.c b/lib/libF77/h_sign.c
deleted file mode 100644
index 7b06c15..0000000
--- a/lib/libF77/h_sign.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-shortint h_sign(a,b) shortint *a, *b;
-#else
-shortint h_sign(shortint *a, shortint *b)
-#endif
-{
-shortint x;
-x = (*a >= 0 ? *a : - *a);
-return( *b >= 0 ? x : -x);
-}
diff --git a/lib/libF77/hl_ge.c b/lib/libF77/hl_ge.c
deleted file mode 100644
index 4c29527..0000000
--- a/lib/libF77/hl_ge.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern integer s_cmp();
-shortlogical hl_ge(a,b,la,lb) char *a, *b; ftnlen la, lb;
-#else
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-shortlogical hl_ge(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-return(s_cmp(a,b,la,lb) >= 0);
-}
diff --git a/lib/libF77/hl_gt.c b/lib/libF77/hl_gt.c
deleted file mode 100644
index c4f345a..0000000
--- a/lib/libF77/hl_gt.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern integer s_cmp();
-shortlogical hl_gt(a,b,la,lb) char *a, *b; ftnlen la, lb;
-#else
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-shortlogical hl_gt(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-return(s_cmp(a,b,la,lb) > 0);
-}
diff --git a/lib/libF77/hl_le.c b/lib/libF77/hl_le.c
deleted file mode 100644
index a9cce59..0000000
--- a/lib/libF77/hl_le.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern integer s_cmp();
-shortlogical hl_le(a,b,la,lb) char *a, *b; ftnlen la, lb;
-#else
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-shortlogical hl_le(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-return(s_cmp(a,b,la,lb) <= 0);
-}
diff --git a/lib/libF77/hl_lt.c b/lib/libF77/hl_lt.c
deleted file mode 100644
index 162d919..0000000
--- a/lib/libF77/hl_lt.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern integer s_cmp();
-shortlogical hl_lt(a,b,la,lb) char *a, *b; ftnlen la, lb;
-#else
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-shortlogical hl_lt(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-return(s_cmp(a,b,la,lb) < 0);
-}
diff --git a/lib/libF77/i_abs.c b/lib/libF77/i_abs.c
deleted file mode 100644
index be21295..0000000
--- a/lib/libF77/i_abs.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-integer i_abs(x) integer *x;
-#else
-integer i_abs(integer *x)
-#endif
-{
-if(*x >= 0)
- return(*x);
-return(- *x);
-}
diff --git a/lib/libF77/i_dim.c b/lib/libF77/i_dim.c
deleted file mode 100644
index 6e1b170..0000000
--- a/lib/libF77/i_dim.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-integer i_dim(a,b) integer *a, *b;
-#else
-integer i_dim(integer *a, integer *b)
-#endif
-{
-return( *a > *b ? *a - *b : 0);
-}
diff --git a/lib/libF77/i_dnnt.c b/lib/libF77/i_dnnt.c
deleted file mode 100644
index 9d46c4b..0000000
--- a/lib/libF77/i_dnnt.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double floor();
-integer i_dnnt(x) doublereal *x;
-#else
-#undef abs
-#include "math.h"
-integer i_dnnt(doublereal *x)
-#endif
-{
-return( (*x)>=0 ?
- floor(*x + .5) : -floor(.5 - *x) );
-}
diff --git a/lib/libF77/i_indx.c b/lib/libF77/i_indx.c
deleted file mode 100644
index 96e7bc5..0000000
--- a/lib/libF77/i_indx.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-integer i_indx(a, b, la, lb) char *a, *b; ftnlen la, lb;
-#else
-integer i_indx(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-ftnlen i, n;
-char *s, *t, *bend;
-
-n = la - lb + 1;
-bend = b + lb;
-
-for(i = 0 ; i < n ; ++i)
- {
- s = a + i;
- t = b;
- while(t < bend)
- if(*s++ != *t++)
- goto no;
- return(i+1);
- no: ;
- }
-return(0);
-}
diff --git a/lib/libF77/i_len.c b/lib/libF77/i_len.c
deleted file mode 100644
index 4020fee..0000000
--- a/lib/libF77/i_len.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-integer i_len(s, n) char *s; ftnlen n;
-#else
-integer i_len(char *s, ftnlen n)
-#endif
-{
-return(n);
-}
diff --git a/lib/libF77/i_mod.c b/lib/libF77/i_mod.c
deleted file mode 100644
index 6937c42..0000000
--- a/lib/libF77/i_mod.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-integer i_mod(a,b) integer *a, *b;
-#else
-integer i_mod(integer *a, integer *b)
-#endif
-{
-return( *a % *b);
-}
diff --git a/lib/libF77/i_nint.c b/lib/libF77/i_nint.c
deleted file mode 100644
index ccde785..0000000
--- a/lib/libF77/i_nint.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double floor();
-integer i_nint(x) real *x;
-#else
-#undef abs
-#include "math.h"
-integer i_nint(real *x)
-#endif
-{
-return( (*x)>=0 ?
- floor(*x + .5) : -floor(.5 - *x) );
-}
diff --git a/lib/libF77/i_sign.c b/lib/libF77/i_sign.c
deleted file mode 100644
index 94009b8..0000000
--- a/lib/libF77/i_sign.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-integer i_sign(a,b) integer *a, *b;
-#else
-integer i_sign(integer *a, integer *b)
-#endif
-{
-integer x;
-x = (*a >= 0 ? *a : - *a);
-return( *b >= 0 ? x : -x);
-}
diff --git a/lib/libF77/iargc_.c b/lib/libF77/iargc_.c
deleted file mode 100644
index 29614ec..0000000
--- a/lib/libF77/iargc_.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-ftnint iargc_()
-#else
-ftnint iargc_(void)
-#endif
-{
-extern int xargc;
-return ( xargc - 1 );
-}
diff --git a/lib/libF77/l_ge.c b/lib/libF77/l_ge.c
deleted file mode 100644
index 86b4a1f..0000000
--- a/lib/libF77/l_ge.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern integer s_cmp();
-logical l_ge(a,b,la,lb) char *a, *b; ftnlen la, lb;
-#else
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-logical l_ge(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-return(s_cmp(a,b,la,lb) >= 0);
-}
diff --git a/lib/libF77/l_gt.c b/lib/libF77/l_gt.c
deleted file mode 100644
index c4b52f5..0000000
--- a/lib/libF77/l_gt.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern integer s_cmp();
-logical l_gt(a,b,la,lb) char *a, *b; ftnlen la, lb;
-#else
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-logical l_gt(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-return(s_cmp(a,b,la,lb) > 0);
-}
diff --git a/lib/libF77/l_le.c b/lib/libF77/l_le.c
deleted file mode 100644
index f2740a2..0000000
--- a/lib/libF77/l_le.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern integer s_cmp();
-logical l_le(a,b,la,lb) char *a, *b; ftnlen la, lb;
-#else
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-logical l_le(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-return(s_cmp(a,b,la,lb) <= 0);
-}
diff --git a/lib/libF77/l_lt.c b/lib/libF77/l_lt.c
deleted file mode 100644
index c48dc94..0000000
--- a/lib/libF77/l_lt.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern integer s_cmp();
-logical l_lt(a,b,la,lb) char *a, *b; ftnlen la, lb;
-#else
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-logical l_lt(char *a, char *b, ftnlen la, ftnlen lb)
-#endif
-{
-return(s_cmp(a,b,la,lb) < 0);
-}
diff --git a/lib/libF77/lbitbits.c b/lib/libF77/lbitbits.c
deleted file mode 100644
index 75e9f9c..0000000
--- a/lib/libF77/lbitbits.c
+++ /dev/null
@@ -1,62 +0,0 @@
-#include "f2c.h"
-
-#ifndef LONGBITS
-#define LONGBITS 32
-#endif
-
- integer
-#ifdef KR_headers
-lbit_bits(a, b, len) integer a, b, len;
-#else
-lbit_bits(integer a, integer b, integer len)
-#endif
-{
- /* Assume 2's complement arithmetic */
-
- unsigned long x, y;
-
- x = (unsigned long) a;
- y = (unsigned long)-1L;
- x >>= b;
- y <<= len;
- return (integer)(x & ~y);
- }
-
- integer
-#ifdef KR_headers
-lbit_cshift(a, b, len) integer a, b, len;
-#else
-lbit_cshift(integer a, integer b, integer len)
-#endif
-{
- unsigned long x, y, z;
-
- x = (unsigned long)a;
- if (len <= 0) {
- if (len == 0)
- return 0;
- goto full_len;
- }
- if (len >= LONGBITS) {
- full_len:
- if (b >= 0) {
- b %= LONGBITS;
- return (integer)(x << b | x >> LONGBITS -b );
- }
- b = -b;
- b %= LONGBITS;
- return (integer)(x << LONGBITS - b | x >> b);
- }
- y = z = (unsigned long)-1;
- y <<= len;
- z &= ~y;
- y &= x;
- x &= z;
- if (b >= 0) {
- b %= len;
- return (integer)(y | z & (x << b | x >> len - b));
- }
- b = -b;
- b %= len;
- return (integer)(y | z & (x >> b | x << len - b));
- }
diff --git a/lib/libF77/lbitshft.c b/lib/libF77/lbitshft.c
deleted file mode 100644
index 81b0fdb..0000000
--- a/lib/libF77/lbitshft.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "f2c.h"
-
- integer
-#ifdef KR_headers
-lbit_shift(a, b) integer a; integer b;
-#else
-lbit_shift(integer a, integer b)
-#endif
-{
- return b >= 0 ? a << b : (integer)((uinteger)a >> -b);
- }
diff --git a/lib/libF77/main.c b/lib/libF77/main.c
deleted file mode 100644
index d6ff84a..0000000
--- a/lib/libF77/main.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/* STARTUP PROCEDURE FOR UNIX FORTRAN PROGRAMS */
-
-#include "stdio.h"
-#include "signal1.h"
-
-#ifndef SIGIOT
-#ifdef SIGABRT
-#define SIGIOT SIGABRT
-#endif
-#endif
-
-#ifndef KR_headers
-#undef VOID
-#include "stdlib.h"
-#endif
-
-#ifndef VOID
-#define VOID void
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef NO__STDC
-#define ONEXIT onexit
-extern VOID f_exit();
-#else
-#ifndef KR_headers
-extern void f_exit(void);
-#ifndef NO_ONEXIT
-#define ONEXIT atexit
-extern int atexit(void (*)(void));
-#endif
-#else
-#ifndef NO_ONEXIT
-#define ONEXIT onexit
-extern VOID f_exit();
-#endif
-#endif
-#endif
-
-#ifdef KR_headers
-extern VOID f_init(), sig_die();
-extern int MAIN__();
-#define Int /* int */
-#else
-extern void f_init(void), sig_die(char*, int);
-extern int MAIN__(void);
-#define Int int
-#endif
-
-static VOID sigfdie(Int n)
-{
-sig_die("Floating Exception", 1);
-}
-
-
-static VOID sigidie(Int n)
-{
-sig_die("IOT Trap", 1);
-}
-
-#ifdef SIGQUIT
-static VOID sigqdie(Int n)
-{
-sig_die("Quit signal", 1);
-}
-#endif
-
-
-static VOID sigindie(Int n)
-{
-sig_die("Interrupt", 0);
-}
-
-static VOID sigtdie(Int n)
-{
-sig_die("Killed", 0);
-}
-
-#ifdef SIGTRAP
-static VOID sigtrdie(Int n)
-{
-sig_die("Trace trap", 1);
-}
-#endif
-
-
-int xargc;
-char **xargv;
-
-#ifdef __cplusplus
- }
-#endif
-
-#ifdef KR_headers
-main(argc, argv) int argc; char **argv;
-#else
-main(int argc, char **argv)
-#endif
-{
-xargc = argc;
-xargv = argv;
-signal1(SIGFPE, sigfdie); /* ignore underflow, enable overflow */
-#ifdef SIGIOT
-signal1(SIGIOT, sigidie);
-#endif
-#ifdef SIGTRAP
-signal1(SIGTRAP, sigtrdie);
-#endif
-#ifdef SIGQUIT
-if(signal1(SIGQUIT,sigqdie) == SIG_IGN)
- signal1(SIGQUIT, SIG_IGN);
-#endif
-if(signal1(SIGINT, sigindie) == SIG_IGN)
- signal1(SIGINT, SIG_IGN);
-signal1(SIGTERM,sigtdie);
-
-#ifdef pdp11
- ldfps(01200); /* detect overflow as an exception */
-#endif
-
-f_init();
-#ifndef NO_ONEXIT
-ONEXIT(f_exit);
-#endif
-MAIN__();
-#ifdef NO_ONEXIT
-f_exit();
-#endif
-exit(0); /* exit(0) rather than return(0) to bypass Cray bug */
-return 0; /* For compilers that complain of missing return values; */
- /* others will complain that this is unreachable code. */
-}
diff --git a/lib/libF77/pow_ci.c b/lib/libF77/pow_ci.c
deleted file mode 100644
index 37e2ce0..0000000
--- a/lib/libF77/pow_ci.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-VOID pow_ci(p, a, b) /* p = a**b */
- complex *p, *a; integer *b;
-#else
-extern void pow_zi(doublecomplex*, doublecomplex*, integer*);
-void pow_ci(complex *p, complex *a, integer *b) /* p = a**b */
-#endif
-{
-doublecomplex p1, a1;
-
-a1.r = a->r;
-a1.i = a->i;
-
-pow_zi(&p1, &a1, b);
-
-p->r = p1.r;
-p->i = p1.i;
-}
diff --git a/lib/libF77/pow_dd.c b/lib/libF77/pow_dd.c
deleted file mode 100644
index d2bb0e3..0000000
--- a/lib/libF77/pow_dd.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double pow();
-double pow_dd(ap, bp) doublereal *ap, *bp;
-#else
-#undef abs
-#include "math.h"
-double pow_dd(doublereal *ap, doublereal *bp)
-#endif
-{
-return(pow(*ap, *bp) );
-}
diff --git a/lib/libF77/pow_di.c b/lib/libF77/pow_di.c
deleted file mode 100644
index affed62..0000000
--- a/lib/libF77/pow_di.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double pow_di(ap, bp) doublereal *ap; integer *bp;
-#else
-double pow_di(doublereal *ap, integer *bp)
-#endif
-{
-double pow, x;
-integer n;
-unsigned long u;
-
-pow = 1;
-x = *ap;
-n = *bp;
-
-if(n != 0)
- {
- if(n < 0)
- {
- n = -n;
- x = 1/x;
- }
- for(u = n; ; )
- {
- if(u & 01)
- pow *= x;
- if(u >>= 1)
- x *= x;
- else
- break;
- }
- }
-return(pow);
-}
diff --git a/lib/libF77/pow_hh.c b/lib/libF77/pow_hh.c
deleted file mode 100644
index 24a0197..0000000
--- a/lib/libF77/pow_hh.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-shortint pow_hh(ap, bp) shortint *ap, *bp;
-#else
-shortint pow_hh(shortint *ap, shortint *bp)
-#endif
-{
- shortint pow, x, n;
- unsigned u;
-
- x = *ap;
- n = *bp;
-
- if (n <= 0) {
- if (n == 0 || x == 1)
- return 1;
- if (x != -1)
- return x == 0 ? 1/x : 0;
- n = -n;
- }
- u = n;
- for(pow = 1; ; )
- {
- if(u & 01)
- pow *= x;
- if(u >>= 1)
- x *= x;
- else
- break;
- }
- return(pow);
- }
diff --git a/lib/libF77/pow_ii.c b/lib/libF77/pow_ii.c
deleted file mode 100644
index 84d1c7e..0000000
--- a/lib/libF77/pow_ii.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-integer pow_ii(ap, bp) integer *ap, *bp;
-#else
-integer pow_ii(integer *ap, integer *bp)
-#endif
-{
- integer pow, x, n;
- unsigned long u;
-
- x = *ap;
- n = *bp;
-
- if (n <= 0) {
- if (n == 0 || x == 1)
- return 1;
- if (x != -1)
- return x == 0 ? 1/x : 0;
- n = -n;
- }
- u = n;
- for(pow = 1; ; )
- {
- if(u & 01)
- pow *= x;
- if(u >>= 1)
- x *= x;
- else
- break;
- }
- return(pow);
- }
diff --git a/lib/libF77/pow_qq.c b/lib/libF77/pow_qq.c
deleted file mode 100644
index 3bc80e0..0000000
--- a/lib/libF77/pow_qq.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-longint pow_qq(ap, bp) longint *ap, *bp;
-#else
-longint pow_qq(longint *ap, longint *bp)
-#endif
-{
- longint pow, x, n;
- unsigned long long u; /* system-dependent */
-
- x = *ap;
- n = *bp;
-
- if (n <= 0) {
- if (n == 0 || x == 1)
- return 1;
- if (x != -1)
- return x == 0 ? 1/x : 0;
- n = -n;
- }
- u = n;
- for(pow = 1; ; )
- {
- if(u & 01)
- pow *= x;
- if(u >>= 1)
- x *= x;
- else
- break;
- }
- return(pow);
- }
diff --git a/lib/libF77/pow_ri.c b/lib/libF77/pow_ri.c
deleted file mode 100644
index 6e5816b..0000000
--- a/lib/libF77/pow_ri.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double pow_ri(ap, bp) real *ap; integer *bp;
-#else
-double pow_ri(real *ap, integer *bp)
-#endif
-{
-double pow, x;
-integer n;
-unsigned long u;
-
-pow = 1;
-x = *ap;
-n = *bp;
-
-if(n != 0)
- {
- if(n < 0)
- {
- n = -n;
- x = 1/x;
- }
- for(u = n; ; )
- {
- if(u & 01)
- pow *= x;
- if(u >>= 1)
- x *= x;
- else
- break;
- }
- }
-return(pow);
-}
diff --git a/lib/libF77/pow_zi.c b/lib/libF77/pow_zi.c
deleted file mode 100644
index abb3cb2..0000000
--- a/lib/libF77/pow_zi.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-VOID pow_zi(p, a, b) /* p = a**b */
- doublecomplex *p, *a; integer *b;
-#else
-extern void z_div(doublecomplex*, doublecomplex*, doublecomplex*);
-void pow_zi(doublecomplex *p, doublecomplex *a, integer *b) /* p = a**b */
-#endif
-{
- integer n;
- unsigned long u;
- double t;
- doublecomplex q, x;
- static doublecomplex one = {1.0, 0.0};
-
- n = *b;
- q.r = 1;
- q.i = 0;
-
- if(n == 0)
- goto done;
- if(n < 0)
- {
- n = -n;
- z_div(&x, &one, a);
- }
- else
- {
- x.r = a->r;
- x.i = a->i;
- }
-
- for(u = n; ; )
- {
- if(u & 01)
- {
- t = q.r * x.r - q.i * x.i;
- q.i = q.r * x.i + q.i * x.r;
- q.r = t;
- }
- if(u >>= 1)
- {
- t = x.r * x.r - x.i * x.i;
- x.i = 2 * x.r * x.i;
- x.r = t;
- }
- else
- break;
- }
- done:
- p->i = q.i;
- p->r = q.r;
- }
diff --git a/lib/libF77/pow_zz.c b/lib/libF77/pow_zz.c
deleted file mode 100644
index 55785df..0000000
--- a/lib/libF77/pow_zz.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double log(), exp(), cos(), sin(), atan2(), f__cabs();
-VOID pow_zz(r,a,b) doublecomplex *r, *a, *b;
-#else
-#undef abs
-#include "math.h"
-extern double f__cabs(double,double);
-void pow_zz(doublecomplex *r, doublecomplex *a, doublecomplex *b)
-#endif
-{
-double logr, logi, x, y;
-
-logr = log( f__cabs(a->r, a->i) );
-logi = atan2(a->i, a->r);
-
-x = exp( logr * b->r - logi * b->i );
-y = logr * b->i + logi * b->r;
-
-r->r = x * cos(y);
-r->i = x * sin(y);
-}
diff --git a/lib/libF77/r_abs.c b/lib/libF77/r_abs.c
deleted file mode 100644
index 7b22296..0000000
--- a/lib/libF77/r_abs.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double r_abs(x) real *x;
-#else
-double r_abs(real *x)
-#endif
-{
-if(*x >= 0)
- return(*x);
-return(- *x);
-}
diff --git a/lib/libF77/r_acos.c b/lib/libF77/r_acos.c
deleted file mode 100644
index 328812a..0000000
--- a/lib/libF77/r_acos.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double acos();
-double r_acos(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_acos(real *x)
-#endif
-{
-return( acos(*x) );
-}
diff --git a/lib/libF77/r_asin.c b/lib/libF77/r_asin.c
deleted file mode 100644
index a30c670..0000000
--- a/lib/libF77/r_asin.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double asin();
-double r_asin(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_asin(real *x)
-#endif
-{
-return( asin(*x) );
-}
diff --git a/lib/libF77/r_atan.c b/lib/libF77/r_atan.c
deleted file mode 100644
index 1e3817b..0000000
--- a/lib/libF77/r_atan.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double atan();
-double r_atan(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_atan(real *x)
-#endif
-{
-return( atan(*x) );
-}
diff --git a/lib/libF77/r_atn2.c b/lib/libF77/r_atn2.c
deleted file mode 100644
index 3832a27..0000000
--- a/lib/libF77/r_atn2.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double atan2();
-double r_atn2(x,y) real *x, *y;
-#else
-#undef abs
-#include "math.h"
-double r_atn2(real *x, real *y)
-#endif
-{
-return( atan2(*x,*y) );
-}
diff --git a/lib/libF77/r_cnjg.c b/lib/libF77/r_cnjg.c
deleted file mode 100644
index e127ca9..0000000
--- a/lib/libF77/r_cnjg.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-VOID r_cnjg(r, z) complex *r, *z;
-#else
-VOID r_cnjg(complex *r, complex *z)
-#endif
-{
-r->r = z->r;
-r->i = - z->i;
-}
diff --git a/lib/libF77/r_cos.c b/lib/libF77/r_cos.c
deleted file mode 100644
index cf5c8eb..0000000
--- a/lib/libF77/r_cos.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double cos();
-double r_cos(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_cos(real *x)
-#endif
-{
-return( cos(*x) );
-}
diff --git a/lib/libF77/r_cosh.c b/lib/libF77/r_cosh.c
deleted file mode 100644
index 5756c17..0000000
--- a/lib/libF77/r_cosh.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double cosh();
-double r_cosh(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_cosh(real *x)
-#endif
-{
-return( cosh(*x) );
-}
diff --git a/lib/libF77/r_dim.c b/lib/libF77/r_dim.c
deleted file mode 100644
index baca95c..0000000
--- a/lib/libF77/r_dim.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double r_dim(a,b) real *a, *b;
-#else
-double r_dim(real *a, real *b)
-#endif
-{
-return( *a > *b ? *a - *b : 0);
-}
diff --git a/lib/libF77/r_exp.c b/lib/libF77/r_exp.c
deleted file mode 100644
index a95f4bc..0000000
--- a/lib/libF77/r_exp.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double exp();
-double r_exp(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_exp(real *x)
-#endif
-{
-return( exp(*x) );
-}
diff --git a/lib/libF77/r_imag.c b/lib/libF77/r_imag.c
deleted file mode 100644
index d51252b..0000000
--- a/lib/libF77/r_imag.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double r_imag(z) complex *z;
-#else
-double r_imag(complex *z)
-#endif
-{
-return(z->i);
-}
diff --git a/lib/libF77/r_int.c b/lib/libF77/r_int.c
deleted file mode 100644
index 11264bf..0000000
--- a/lib/libF77/r_int.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double floor();
-double r_int(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_int(real *x)
-#endif
-{
-return( (*x>0) ? floor(*x) : -floor(- *x) );
-}
diff --git a/lib/libF77/r_lg10.c b/lib/libF77/r_lg10.c
deleted file mode 100644
index c40138e..0000000
--- a/lib/libF77/r_lg10.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-float log10f();
-double r_lg10(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_lg10(real *x)
-#endif
-{
-return( log10f(*x) );
-}
diff --git a/lib/libF77/r_log.c b/lib/libF77/r_log.c
deleted file mode 100644
index aec6726..0000000
--- a/lib/libF77/r_log.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double log();
-double r_log(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_log(real *x)
-#endif
-{
-return( log(*x) );
-}
diff --git a/lib/libF77/r_mod.c b/lib/libF77/r_mod.c
deleted file mode 100644
index 7adb44c..0000000
--- a/lib/libF77/r_mod.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-#ifdef IEEE_drem
-double drem();
-#else
-double floor();
-#endif
-double r_mod(x,y) real *x, *y;
-#else
-#ifdef IEEE_drem
-double drem(double, double);
-#else
-#undef abs
-#include "math.h"
-#endif
-double r_mod(real *x, real *y)
-#endif
-{
-#ifdef IEEE_drem
- double xa, ya, z;
- if ((ya = *y) < 0.)
- ya = -ya;
- z = drem(xa = *x, ya);
- if (xa > 0) {
- if (z < 0)
- z += ya;
- }
- else if (z > 0)
- z -= ya;
- return z;
-#else
- double quotient;
- if( (quotient = (double)*x / *y) >= 0)
- quotient = floor(quotient);
- else
- quotient = -floor(-quotient);
- return(*x - (*y) * quotient );
-#endif
-}
diff --git a/lib/libF77/r_nint.c b/lib/libF77/r_nint.c
deleted file mode 100644
index c45bac6..0000000
--- a/lib/libF77/r_nint.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double floor();
-double r_nint(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_nint(real *x)
-#endif
-{
-return( (*x)>=0 ?
- floor(*x + .5) : -floor(.5 - *x) );
-}
diff --git a/lib/libF77/r_sign.c b/lib/libF77/r_sign.c
deleted file mode 100644
index df6d02a..0000000
--- a/lib/libF77/r_sign.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double r_sign(a,b) real *a, *b;
-#else
-double r_sign(real *a, real *b)
-#endif
-{
-double x;
-x = (*a >= 0 ? *a : - *a);
-return( *b >= 0 ? x : -x);
-}
diff --git a/lib/libF77/r_sin.c b/lib/libF77/r_sin.c
deleted file mode 100644
index d2a3dac..0000000
--- a/lib/libF77/r_sin.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double sin();
-double r_sin(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_sin(real *x)
-#endif
-{
-return( sin(*x) );
-}
diff --git a/lib/libF77/r_sinh.c b/lib/libF77/r_sinh.c
deleted file mode 100644
index 00cba0c..0000000
--- a/lib/libF77/r_sinh.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double sinh();
-double r_sinh(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_sinh(real *x)
-#endif
-{
-return( sinh(*x) );
-}
diff --git a/lib/libF77/r_sqrt.c b/lib/libF77/r_sqrt.c
deleted file mode 100644
index 26b4545..0000000
--- a/lib/libF77/r_sqrt.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double sqrt();
-double r_sqrt(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_sqrt(real *x)
-#endif
-{
-return( sqrt(*x) );
-}
diff --git a/lib/libF77/r_tan.c b/lib/libF77/r_tan.c
deleted file mode 100644
index 736b378..0000000
--- a/lib/libF77/r_tan.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double tan();
-double r_tan(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_tan(real *x)
-#endif
-{
-return( tan(*x) );
-}
diff --git a/lib/libF77/r_tanh.c b/lib/libF77/r_tanh.c
deleted file mode 100644
index 044255a..0000000
--- a/lib/libF77/r_tanh.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double tanh();
-double r_tanh(x) real *x;
-#else
-#undef abs
-#include "math.h"
-double r_tanh(real *x)
-#endif
-{
-return( tanh(*x) );
-}
diff --git a/lib/libF77/s_cat.c b/lib/libF77/s_cat.c
deleted file mode 100644
index 038f0ec..0000000
--- a/lib/libF77/s_cat.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Unless compiled with -DNO_OVERWRITE, this variant of s_cat allows the
- * target of a concatenation to appear on its right-hand side (contrary
- * to the Fortran 77 Standard, but in accordance with Fortran 90).
- */
-
-#include "f2c.h"
-#ifndef NO_OVERWRITE
-#include "stdio.h"
-#undef abs
-#ifdef KR_headers
- extern char *F77_aloc();
- extern void free();
- extern void exit_();
-#else
-#undef min
-#undef max
-#include "stdlib.h"
- extern char *F77_aloc(ftnlen, char*);
-#endif
-#include "string.h"
-#endif /* NO_OVERWRITE */
-
- VOID
-#ifdef KR_headers
-s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnlen rnp[], *np, ll;
-#else
-s_cat(char *lp, char *rpp[], ftnlen rnp[], ftnlen *np, ftnlen ll)
-#endif
-{
- ftnlen i, nc;
- char *rp;
- ftnlen n = *np;
-#ifndef NO_OVERWRITE
- ftnlen L, m;
- char *lp0, *lp1;
-
- lp0 = 0;
- lp1 = lp;
- L = ll;
- i = 0;
- while(i < n) {
- rp = rpp[i];
- m = rnp[i++];
- if (rp >= lp1 || rp + m <= lp) {
- if ((L -= m) <= 0) {
- n = i;
- break;
- }
- lp1 += m;
- continue;
- }
- lp0 = lp;
- lp = lp1 = F77_aloc(L = ll, "s_cat");
- break;
- }
- lp1 = lp;
-#endif /* NO_OVERWRITE */
- for(i = 0 ; i < n ; ++i) {
- nc = ll;
- if(rnp[i] < nc)
- nc = rnp[i];
- ll -= nc;
- rp = rpp[i];
- while(--nc >= 0)
- *lp++ = *rp++;
- }
- while(--ll >= 0)
- *lp++ = ' ';
-#ifndef NO_OVERWRITE
- if (lp0) {
- memcpy(lp0, lp1, L);
- free(lp1);
- }
-#endif
- }
diff --git a/lib/libF77/s_cmp.c b/lib/libF77/s_cmp.c
deleted file mode 100644
index 1e052f2..0000000
--- a/lib/libF77/s_cmp.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include "f2c.h"
-
-/* compare two strings */
-
-#ifdef KR_headers
-integer s_cmp(a0, b0, la, lb) char *a0, *b0; ftnlen la, lb;
-#else
-integer s_cmp(char *a0, char *b0, ftnlen la, ftnlen lb)
-#endif
-{
-register unsigned char *a, *aend, *b, *bend;
-a = (unsigned char *)a0;
-b = (unsigned char *)b0;
-aend = a + la;
-bend = b + lb;
-
-if(la <= lb)
- {
- while(a < aend)
- if(*a != *b)
- return( *a - *b );
- else
- { ++a; ++b; }
-
- while(b < bend)
- if(*b != ' ')
- return( ' ' - *b );
- else ++b;
- }
-
-else
- {
- while(b < bend)
- if(*a == *b)
- { ++a; ++b; }
- else
- return( *a - *b );
- while(a < aend)
- if(*a != ' ')
- return(*a - ' ');
- else ++a;
- }
-return(0);
-}
diff --git a/lib/libF77/s_copy.c b/lib/libF77/s_copy.c
deleted file mode 100644
index d167351..0000000
--- a/lib/libF77/s_copy.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Unless compiled with -DNO_OVERWRITE, this variant of s_copy allows the
- * target of an assignment to appear on its right-hand side (contrary
- * to the Fortran 77 Standard, but in accordance with Fortran 90),
- * as in a(2:5) = a(4:7) .
- */
-
-#include "f2c.h"
-
-/* assign strings: a = b */
-
-#ifdef KR_headers
-VOID s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb;
-#else
-void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb)
-#endif
-{
- register char *aend, *bend;
-
- aend = a + la;
-
- if(la <= lb)
-#ifndef NO_OVERWRITE
- if (a <= b || a >= b + la)
-#endif
- while(a < aend)
- *a++ = *b++;
-#ifndef NO_OVERWRITE
- else
- for(b += la; a < aend; )
- *--aend = *--b;
-#endif
-
- else {
- bend = b + lb;
-#ifndef NO_OVERWRITE
- if (a <= b || a >= bend)
-#endif
- while(b < bend)
- *a++ = *b++;
-#ifndef NO_OVERWRITE
- else {
- a += lb;
- while(b < bend)
- *--a = *--bend;
- a += lb;
- }
-#endif
- while(a < aend)
- *a++ = ' ';
- }
- }
diff --git a/lib/libF77/s_paus.c b/lib/libF77/s_paus.c
deleted file mode 100644
index 2501cb5a..0000000
--- a/lib/libF77/s_paus.c
+++ /dev/null
@@ -1,88 +0,0 @@
-#include "stdio.h"
-#include "f2c.h"
-#define PAUSESIG 15
-
-#ifdef KR_headers
-#define Void /* void */
-#define Int /* int */
-#else
-#define Void void
-#define Int int
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-#include "signal1.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern int getpid(void), isatty(int), pause(void);
-#endif
-
-extern VOID f_exit(Void);
-
- static VOID
-waitpause(Int n)
-{ n = n; /* shut up compiler warning */
- return;
- }
-
- static VOID
-#ifdef KR_headers
-s_1paus(fin) FILE *fin;
-#else
-s_1paus(FILE *fin)
-#endif
-{
- fprintf(stderr,
- "To resume execution, type go. Other input will terminate the job.\n");
- fflush(stderr);
- if( getc(fin)!='g' || getc(fin)!='o' || getc(fin)!='\n' ) {
- fprintf(stderr, "STOP\n");
-#ifdef NO_ONEXIT
- f_exit();
-#endif
- exit(0);
- }
- }
-
- int
-#ifdef KR_headers
-s_paus(s, n) char *s; ftnlen n;
-#else
-s_paus(char *s, ftnlen n)
-#endif
-{
- fprintf(stderr, "PAUSE ");
- if(n > 0)
- fprintf(stderr, " %.*s", (int)n, s);
- fprintf(stderr, " statement executed\n");
- if( isatty(fileno(stdin)) )
- s_1paus(stdin);
- else {
-#ifdef MSDOS
- FILE *fin;
- fin = fopen("con", "r");
- if (!fin) {
- fprintf(stderr, "s_paus: can't open con!\n");
- fflush(stderr);
- exit(1);
- }
- s_1paus(fin);
- fclose(fin);
-#else
- fprintf(stderr,
- "To resume execution, execute a kill -%d %d command\n",
- PAUSESIG, getpid() );
- signal1(PAUSESIG, waitpause);
- fflush(stderr);
- pause();
-#endif
- }
- fprintf(stderr, "Execution resumes after PAUSE.\n");
- fflush(stderr);
- return 0; /* NOT REACHED */
-#ifdef __cplusplus
- }
-#endif
-}
diff --git a/lib/libF77/s_rnge.c b/lib/libF77/s_rnge.c
deleted file mode 100644
index b200fce..0000000
--- a/lib/libF77/s_rnge.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "stdio.h"
-#include "f2c.h"
-
-/* called when a subscript is out of range */
-
-#ifdef KR_headers
-extern VOID sig_die();
-integer s_rnge(varn, offset, procn, line) char *varn, *procn; ftnint offset, line;
-#else
-extern VOID sig_die(char*,int);
-integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
-#endif
-{
-register int i;
-
-fprintf(stderr, "Subscript out of range on file line %ld, procedure ", line);
-while((i = *procn) && i != '_' && i != ' ')
- putc(*procn++, stderr);
-fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ", offset+1);
-while((i = *varn) && i != ' ')
- putc(*varn++, stderr);
-sig_die(".", 1);
-#ifdef __cplusplus
-return 0;
-#endif
-}
diff --git a/lib/libF77/s_stop.c b/lib/libF77/s_stop.c
deleted file mode 100644
index be3c28b..0000000
--- a/lib/libF77/s_stop.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "stdio.h"
-#include "f2c.h"
-
-#ifdef KR_headers
-extern void f_exit();
-VOID s_stop(s, n) char *s; ftnlen n;
-#else
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-void f_exit(void);
-
-int s_stop(char *s, ftnlen n)
-#endif
-{
-int i;
-
-if(n > 0)
- {
- fprintf(stderr, "STOP ");
- for(i = 0; i<n ; ++i)
- putc(*s++, stderr);
- fprintf(stderr, " statement executed\n");
- }
-#ifdef NO_ONEXIT
-f_exit();
-#endif
-exit(0);
-#ifdef __cplusplus
-return 0; /* NOT REACHED */
-}
-#endif
-}
diff --git a/lib/libF77/sig_die.c b/lib/libF77/sig_die.c
deleted file mode 100644
index dba1521..0000000
--- a/lib/libF77/sig_die.c
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "stdio.h"
-#include "signal.h"
-
-#ifndef SIGIOT
-#ifdef SIGABRT
-#define SIGIOT SIGABRT
-#endif
-#endif
-
-#ifdef KR_headers
-void sig_die(s, kill) register char *s; int kill;
-#else
-#include "stdlib.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
- extern void f_exit(void);
-
-void sig_die(register char *s, int kill)
-#endif
-{
- /* print error message, then clear buffers */
- fprintf(stderr, "%s\n", s);
-
- if(kill)
- {
- fflush(stderr);
- f_exit();
- fflush(stderr);
- /* now get a core */
-#ifdef SIGIOT
- signal(SIGIOT, SIG_DFL);
-#endif
- abort();
- }
- else {
-#ifdef NO_ONEXIT
- f_exit();
-#endif
- exit(1);
- }
- }
-#ifdef __cplusplus
-}
-#endif
diff --git a/lib/libF77/signal1.h b/lib/libF77/signal1.h
deleted file mode 100644
index 8800a18..0000000
--- a/lib/libF77/signal1.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* You may need to adjust the definition of signal1 to supply a */
-/* cast to the correct argument type. This detail is system- and */
-/* compiler-dependent. The #define below assumes signal.h declares */
-/* type SIG_PF for the signal function's second argument. */
-
-#include <signal.h>
-
-#ifndef Sigret_t
-#define Sigret_t void
-#endif
-#ifndef Sigarg_t
-#ifdef KR_headers
-#define Sigarg_t
-#else
-#define Sigarg_t int
-#endif
-#endif /*Sigarg_t*/
-
-#ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */
-#define sig_pf SIG_PF
-#else
-typedef Sigret_t (*sig_pf)(Sigarg_t);
-#endif
-
-#define signal1(a,b) signal(a,(sig_pf)b)
diff --git a/lib/libF77/signal_.c b/lib/libF77/signal_.c
deleted file mode 100644
index 9b31f5a..0000000
--- a/lib/libF77/signal_.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-typedef VOID (*sig_pf)();
-extern sig_pf signal();
-#define signal1 signal
-
-ftnint signal_(sigp, proc) integer *sigp; sig_pf proc;
-#else
-#include "signal1.h"
-
-ftnint signal_(integer *sigp, sig_pf proc)
-#endif
-{
- int sig;
- sig = (int)*sigp;
-
- return (ftnint)signal(sig, proc);
- }
diff --git a/lib/libF77/system_.c b/lib/libF77/system_.c
deleted file mode 100644
index e6b3a02..0000000
--- a/lib/libF77/system_.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* f77 interface to system routine */
-
-#include "f2c.h"
-
-#ifdef KR_headers
-extern char *F77_aloc();
-
- integer
-system_(s, n) register char *s; ftnlen n;
-#else
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-extern char *F77_aloc(ftnlen, char*);
-
- integer
-system_(register char *s, ftnlen n)
-#endif
-{
- char buff0[256], *buff;
- register char *bp, *blast;
- integer rv;
-
- buff = bp = n < sizeof(buff0)
- ? buff0 : F77_aloc(n+1, "system_");
- blast = bp + n;
-
- while(bp < blast && *s)
- *bp++ = *s++;
- *bp = 0;
- rv = system(buff);
- if (buff != buff0)
- free(buff);
- return rv;
- }
diff --git a/lib/libF77/z_abs.c b/lib/libF77/z_abs.c
deleted file mode 100644
index 7e67ad2..0000000
--- a/lib/libF77/z_abs.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double f__cabs();
-double z_abs(z) doublecomplex *z;
-#else
-double f__cabs(double, double);
-double z_abs(doublecomplex *z)
-#endif
-{
-return( f__cabs( z->r, z->i ) );
-}
diff --git a/lib/libF77/z_cos.c b/lib/libF77/z_cos.c
deleted file mode 100644
index fdd1510..0000000
--- a/lib/libF77/z_cos.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double sin(), cos(), sinh(), cosh();
-VOID z_cos(r, z) doublecomplex *r, *z;
-#else
-#undef abs
-#include "math.h"
-void z_cos(doublecomplex *r, doublecomplex *z)
-#endif
-{
- double zr = z->r;
- r->r = cos(zr) * cosh(z->i);
- r->i = - sin(zr) * sinh(z->i);
- }
diff --git a/lib/libF77/z_div.c b/lib/libF77/z_div.c
deleted file mode 100644
index ed7ee66..0000000
--- a/lib/libF77/z_div.c
+++ /dev/null
@@ -1,36 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-extern void sig_die();
-VOID z_div(c, a, b) doublecomplex *a, *b, *c;
-#else
-extern void sig_die(char*, int);
-void z_div(doublecomplex *c, doublecomplex *a, doublecomplex *b)
-#endif
-{
- double ratio, den;
- double abr, abi;
- double ai = a->i, ar = a->r, bi = b->i, br = b->r;
-
- if( (abr = br) < 0.)
- abr = - abr;
- if( (abi = bi) < 0.)
- abi = - abi;
- if( abr <= abi )
- {
- if(abi == 0)
- sig_die("complex division by zero", 1);
- ratio = br / bi ;
- den = bi * (1 + ratio*ratio);
- c->r = (ar*ratio + ai) / den;
- c->i = (ai*ratio - ar) / den;
- }
-
- else
- {
- ratio = bi / br ;
- den = br * (1 + ratio*ratio);
- c->r = (ar + ai*ratio) / den;
- c->i = (ai - ar*ratio) / den;
- }
- }
diff --git a/lib/libF77/z_exp.c b/lib/libF77/z_exp.c
deleted file mode 100644
index 56138f3..0000000
--- a/lib/libF77/z_exp.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double exp(), cos(), sin();
-VOID z_exp(r, z) doublecomplex *r, *z;
-#else
-#undef abs
-#include "math.h"
-void z_exp(doublecomplex *r, doublecomplex *z)
-#endif
-{
-double expx;
-
-expx = exp(z->r);
-r->r = expx * cos(z->i);
-r->i = expx * sin(z->i);
-}
diff --git a/lib/libF77/z_log.c b/lib/libF77/z_log.c
deleted file mode 100644
index 2d52b94..0000000
--- a/lib/libF77/z_log.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double log(), f__cabs(), atan2();
-VOID z_log(r, z) doublecomplex *r, *z;
-#else
-#undef abs
-#include "math.h"
-extern double f__cabs(double, double);
-void z_log(doublecomplex *r, doublecomplex *z)
-#endif
-{
- double zi = z->i;
- r->i = atan2(zi, z->r);
- r->r = log( f__cabs( z->r, zi ) );
- }
diff --git a/lib/libF77/z_sin.c b/lib/libF77/z_sin.c
deleted file mode 100644
index 577be1d..0000000
--- a/lib/libF77/z_sin.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double sin(), cos(), sinh(), cosh();
-VOID z_sin(r, z) doublecomplex *r, *z;
-#else
-#undef abs
-#include "math.h"
-void z_sin(doublecomplex *r, doublecomplex *z)
-#endif
-{
- double zr = z->r;
- r->r = sin(zr) * cosh(z->i);
- r->i = cos(zr) * sinh(z->i);
- }
diff --git a/lib/libF77/z_sqrt.c b/lib/libF77/z_sqrt.c
deleted file mode 100644
index c04e8f0..0000000
--- a/lib/libF77/z_sqrt.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "f2c.h"
-
-#ifdef KR_headers
-double sqrt(), f__cabs();
-VOID z_sqrt(r, z) doublecomplex *r, *z;
-#else
-#undef abs
-#include "math.h"
-extern double f__cabs(double, double);
-void z_sqrt(doublecomplex *r, doublecomplex *z)
-#endif
-{
- double mag, zi = z->i, zr = z->r;
-
- if( (mag = f__cabs(zr, zi)) == 0.)
- r->r = r->i = 0.;
- else if(zr > 0)
- {
- r->r = sqrt(0.5 * (mag + zr) );
- r->i = zi / r->r / 2;
- }
- else
- {
- r->i = sqrt(0.5 * (mag - zr) );
- if(zi < 0)
- r->i = - r->i;
- r->r = zi / r->i / 2;
- }
- }
diff --git a/lib/libI77/Notice b/lib/libI77/Notice
deleted file mode 100644
index 8db1d7b..0000000
--- a/lib/libI77/Notice
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************
-Copyright 1990 - 1997 by AT&T Bell Laboratories and Bellcore.
-
-Permission to use, copy, modify, and distribute this software
-and its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appear in all
-copies and that both that the copyright notice and this
-permission notice and warranty disclaimer appear in supporting
-documentation, and that the names of AT&T Bell Laboratories or
-Bellcore or any of their entities not be used in advertising or
-publicity pertaining to distribution of the software without
-specific, written prior permission.
-
-AT&T and Bellcore disclaim all warranties with regard to this
-software, including all implied warranties of merchantability
-and fitness. In no event shall AT&T or Bellcore 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.
-****************************************************************/
-
diff --git a/lib/libI77/README b/lib/libI77/README
deleted file mode 100644
index 30dd5b5..0000000
--- a/lib/libI77/README
+++ /dev/null
@@ -1,225 +0,0 @@
-If your compiler does not recognize ANSI C headers,
-compile with KR_headers defined: either add -DKR_headers
-to the definition of CFLAGS in the makefile, or insert
-
-#define KR_headers
-
-at the top of f2c.h and fmtlib.c .
-
-
-If you have a really ancient K&R C compiler that does not understand
-void, add -Dvoid=int to the definition of CFLAGS in the makefile.
-
-If you use a C++ compiler, first create a local f2c.h by appending
-f2ch.add to the usual f2c.h, e.g., by issuing the command
- make f2c.h
-which assumes f2c.h is installed in /usr/include .
-
-If your system lacks /usr/include/fcntl.h , then you
-should simply create an empty fcntl.h in this directory.
-If your compiler then complains about creat and open not
-having a prototype, compile with OPEN_DECL defined.
-On many systems, open and creat are declared in fcntl.h .
-
-If your system has /usr/include/fcntl.h, you may need to add
--D_POSIX_SOURCE to the makefile's definition of CFLAGS.
-
-If your system's sprintf does not work the way ANSI C
-specifies -- specifically, if it does not return the
-number of characters transmitted -- then insert the line
-
-#define USE_STRLEN
-
-at the end of fmt.h . This is necessary with
-at least some versions of Sun and DEC software.
-In particular, if you get a warning about an improper
-pointer/integer combination in compiling wref.c, then
-you need to compile with -DUSE_STRLEN .
-
-If your system's fopen does not like the ANSI binary
-reading and writing modes "rb" and "wb", then you should
-compile open.c with NON_ANSI_RW_MODES #defined.
-
-If you get error messages about references to cf->_ptr
-and cf->_base when compiling wrtfmt.c and wsfe.c or to
-stderr->_flag when compiling err.c, then insert the line
-
-#define NON_UNIX_STDIO
-
-at the beginning of fio.h, and recompile everything (or
-at least those modules that contain NON_UNIX_STDIO).
-
-Unformatted sequential records consist of a length of record
-contents, the record contents themselves, and the length of
-record contents again (for backspace). Prior to 17 Oct. 1991,
-the length was of type int; now it is of type long, but you
-can change it back to int by inserting
-
-#define UIOLEN_int
-
-at the beginning of fio.h. This affects only sue.c and uio.c .
-
-On VAX, Cray, or Research Tenth-Edition Unix systems, you may
-need to add -DVAX, -DCRAY, or -DV10 (respectively) to CFLAGS
-to make fp.h work correctly. Alternatively, you may need to
-edit fp.h to suit your machine.
-
-You may need to supply the following non-ANSI routines:
-
- fstat(int fileds, struct stat *buf) is similar
-to stat(char *name, struct stat *buf), except that
-the first argument, fileds, is the file descriptor
-returned by open rather than the name of the file.
-fstat is used in the system-dependent routine
-canseek (in the libI77 source file err.c), which
-is supposed to return 1 if it's possible to issue
-seeks on the file in question, 0 if it's not; you may
-need to suitably modify err.c . On non-UNIX systems,
-you can avoid references to fstat and stat by compiling
-with NON_UNIX_STDIO defined; in that case, you may need
-to supply access(char *Name,0), which is supposed to
-return 0 if file Name exists, nonzero otherwise.
-
- char * mktemp(char *buf) is supposed to replace the
-6 trailing X's in buf with a unique number and then
-return buf. The idea is to get a unique name for
-a temporary file.
-
-On non-UNIX systems, you may need to change a few other,
-e.g.: the form of name computed by mktemp() in endfile.c and
-open.c; the use of the open(), close(), and creat() system
-calls in endfile.c, err.c, open.c; and the modes in calls on
-fopen() and fdopen() (and perhaps the use of fdopen() itself
--- it's supposed to return a FILE* corresponding to a given
-an integer file descriptor) in err.c and open.c (component ufmt
-of struct unit is 1 for formatted I/O -- text mode on some systems
--- and 0 for unformatted I/O -- binary mode on some systems).
-Compiling with -DNON_UNIX_STDIO omits all references to creat()
-and almost all references to open() and close(), the exception
-being in the function f__isdev() (in open.c).
-
-For MS-DOS, compile all of libI77 with -DMSDOS (which implies
--DNON_UNIX_STDIO). You may need to make other compiler-dependent
-adjustments; for example, for Turbo C++ you need to adjust the mktemp
-invocations and to #undef ungetc in lread.c and rsne.c .
-
-If you want to be able to load against libI77 but not libF77,
-then you will need to add sig_die.o (from libF77) to libI77.
-
-If you wish to use translated Fortran that has funny notions
-of record length for direct unformatted I/O (i.e., that assumes
-RECL= values in OPEN statements are not bytes but rather counts
-of some other units -- e.g., 4-character words for VMS), then you
-should insert an appropriate #define for url_Adjust at the
-beginning of open.c . For VMS Fortran, for example,
-#define url_Adjust(x) x *= 4
-would suffice.
-
-To check for transmission errors, issue the command
- make check
-This assumes you have the xsum program whose source, xsum.c,
-is distributed as part of "all from f2c/src". If you do not
-have xsum, you can obtain xsum.c by sending the following E-mail
-message to netlib@netlib.bell-labs.com
- send xsum.c from f2c/src
-
-The makefile assumes you have installed f2c.h in a standard
-place (and does not cause recompilation when f2c.h is changed);
-f2c.h comes with "all from f2c" (the source for f2c) and is
-available separately ("f2c.h from f2c").
-
-By default, Fortran I/O units 5, 6, and 0 are pre-connected to
-stdin, stdout, and stderr, respectively. You can change this
-behavior by changing f_init() in err.c to suit your needs.
-Note that f2c assumes READ(*... means READ(5... and WRITE(*...
-means WRITE(6... . Moreover, an OPEN(n,... statement that does
-not specify a file name (and does not specify STATUS='SCRATCH')
-assumes FILE='fort.n' . You can change this by editing open.c
-and endfile.c suitably.
-
-Unless you adjust the "#define MXUNIT" line in fio.h, Fortran units
-0, 1, ..., 99 are available, i.e., the highest allowed unit number
-is MXUNIT - 1.
-
-Lines protected from compilation by #ifdef Allow_TYQUAD
-are for a possible extension to 64-bit integers in which
-integer = int = 32 bits and longint = long = 64 bits.
-
-Extensions (Feb. 1993) to NAMELIST processing:
- 1. Reading a ? instead of &name (the start of a namelist) causes
-the namelist being sought to be written to stdout (unit 6);
-to omit this feature, compile rsne.c with -DNo_Namelist_Questions.
- 2. Reading the wrong namelist name now leads to an error message
-and an attempt to skip input until the right namelist name is found;
-to omit this feature, compile rsne.c with -DNo_Bad_Namelist_Skip.
- 3. Namelist writes now insert newlines before each variable; to omit
-this feature, compile xwsne.c with -DNo_Extra_Namelist_Newlines.
- 4. (Sept. 1995) When looking for the &name that starts namelist
-input, lines whose first non-blank character is something other
-than &, $, or ? are treated as comment lines and ignored, unless
-rsne.c is compiled with -DNo_Namelist_Comments.
-
-Nonstandard extension (Feb. 1993) to open: for sequential files,
-ACCESS='APPEND' (or access='anything else starting with "A" or "a"')
-causes the file to be positioned at end-of-file, so a write will
-append to the file.
-
-Some buggy Fortran programs use unformatted direct I/O to write
-an incomplete record and later read more from that record than
-they have written. For records other than the last, the unwritten
-portion of the record reads as binary zeros. The last record is
-a special case: attempting to read more from it than was written
-gives end-of-file -- which may help one find a bug. Some other
-Fortran I/O libraries treat the last record no differently than
-others and thus give no help in finding the bug of reading more
-than was written. If you wish to have this behavior, compile
-uio.c with -DPad_UDread .
-
-If you want to be able to catch write failures (e.g., due to a
-disk being full) with an ERR= specifier, compile dfe.c, due.c,
-sfe.c, sue.c, and wsle.c with -DALWAYS_FLUSH. This will lead to
-slower execution and more I/O, but should make ERR= work as
-expected, provided fflush returns an error return when its
-physical write fails.
-
-Carriage controls are meant to be interpreted by the UNIX col
-program (or a similar program). Sometimes it's convenient to use
-only ' ' as the carriage control character (normal single spacing).
-If you compile lwrite.c and wsfe.c with -DOMIT_BLANK_CC, formatted
-external output lines will have an initial ' ' quietly omitted,
-making use of the col program unnecessary with output that only
-has ' ' for carriage control.
-
-The Fortran 77 Standard leaves it up to the implementation whether
-formatted writes of floating-point numbers of absolute value < 1 have
-a zero before the decimal point. By default, libI77 omits such
-superfluous zeros, but you can cause them to appear by compiling
-lwrite.c, wref.c, and wrtfmt.c with -DWANT_LEAD_0 .
-
-If your system lacks a ranlib command, you don't need it.
-Either comment out the makefile's ranlib invocation, or install
-a harmless "ranlib" command somewhere in your PATH, such as the
-one-line shell script
-
- exit 0
-
-or (on some systems)
-
- exec /usr/bin/ar lts $1 >/dev/null
-
-Most of the routines in libI77 are support routines for Fortran
-I/O. There are a few exceptions, summarized below -- I/O related
-functions and subroutines that appear to your program as ordinary
-external Fortran routines.
-
-1. CALL FLUSH flushes all buffers.
-
-2. FTELL(i) is an INTEGER function that returns the current
- offset of Fortran unit i (or -1 if unit i is not open).
-
-3. CALL FSEEK(i, offset, whence, *errlab) attemps to move
- Fortran unit i to the specified offset: absolute offset
- if whence = 0; relative to the current offset if whence = 1;
- relative to the end of the file if whence = 2. It branches
- to label errlab if unit i is not open or if the call
- otherwise fails.
diff --git a/lib/libI77/Version.c b/lib/libI77/Version.c
deleted file mode 100644
index b73ae67..0000000
--- a/lib/libI77/Version.c
+++ /dev/null
@@ -1,244 +0,0 @@
-static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19970226\n";
-
-/*
-2.01 $ format added
-2.02 Coding bug in open.c repaired
-2.03 fixed bugs in lread.c (read * with negative f-format) and lio.c
- and lio.h (e-format conforming to spec)
-2.04 changed open.c and err.c (fopen and freopen respectively) to
- update to new c-library (append mode)
-2.05 added namelist capability
-2.06 allow internal list and namelist I/O
-*/
-
-/*
-close.c:
- allow upper-case STATUS= values
-endfile.c
- create fort.nnn if unit nnn not open;
- else if (file length == 0) use creat() rather than copy;
- use local copy() rather than forking /bin/cp;
- rewind, fseek to clear buffer (for no reading past EOF)
-err.c
- use neither setbuf nor setvbuf; make stderr buffered
-fio.h
- #define _bufend
-inquire.c
- upper case responses;
- omit byfile test from SEQUENTIAL=
- answer "YES" to DIRECT= for unopened file (open to debate)
-lio.c
- flush stderr, stdout at end of each stmt
- space before character strings in list output only at line start
-lio.h
- adjust LEW, LED consistent with old libI77
-lread.c
- use atof()
- allow "nnn*," when reading complex constants
-open.c
- try opening for writing when open for read fails, with
- special uwrt value (2) delaying creat() to first write;
- set curunit so error messages don't drop core;
- no file name ==> fort.nnn except for STATUS='SCRATCH'
-rdfmt.c
- use atof(); trust EOF == end-of-file (so don't read past
- end-of-file after endfile stmt)
-sfe.c
- flush stderr, stdout at end of each stmt
-wrtfmt.c:
- use upper case
- put wrt_E and wrt_F into wref.c, use sprintf()
- rather than ecvt() and fcvt() [more accurate on VAX]
-*/
-
-/* 16 Oct. 1988: uwrt = 3 after write, rewind, so close won't zap the file. */
-
-/* 10 July 1989: change _bufend to buf_end in fio.h, wsfe.c, wrtfmt.c */
-
-/* 28 Nov. 1989: corrections for IEEE and Cray arithmetic */
-/* 29 Nov. 1989: change various int return types to long for f2c */
-/* 30 Nov. 1989: various types from f2c.h */
-/* 6 Dec. 1989: types corrected various places */
-/* 19 Dec. 1989: make iostat= work right for internal I/O */
-/* 8 Jan. 1990: add rsne, wsne -- routines for handling NAMELIST */
-/* 28 Jan. 1990: have NAMELIST read treat $ as &, general white
- space as blank */
-/* 27 Mar. 1990: change an = to == in rd_L(rdfmt.c) so formatted reads
- of logical values reject letters other than fFtT;
- have nowwriting reset cf */
-/* 14 Aug. 1990: adjust lread.c to treat tabs as spaces in list input */
-/* 17 Aug. 1990: adjust open.c to recognize blank='Z...' as well as
- blank='z...' when reopening an open file */
-/* 30 Aug. 1990: prevent embedded blanks in list output of complex values;
- omit exponent field in list output of values of
- magnitude between 10 and 1e8; prevent writing stdin
- and reading stdout or stderr; don't close stdin, stdout,
- or stderr when reopening units 5, 6, 0. */
-/* 18 Sep. 1990: add component udev to unit and consider old == new file
- iff uinode and udev values agree; use stat rather than
- access to check existence of file (when STATUS='OLD')*/
-/* 2 Oct. 1990: adjust rewind.c so two successive rewinds after a write
- don't clobber the file. */
-/* 9 Oct. 1990: add #include "fcntl.h" to endfile.c, err.c, open.c;
- adjust g_char in util.c for segmented memories. */
-/* 17 Oct. 1990: replace abort() and _cleanup() with calls on
- sig_die(...,1) (defined in main.c). */
-/* 5 Nov. 1990: changes to open.c: complain if new= is specified and the
- file already exists; allow file= to be omitted in open stmts
- and allow status='replace' (Fortran 90 extensions). */
-/* 11 Dec. 1990: adjustments for POSIX. */
-/* 15 Jan. 1991: tweak i_ungetc in rsli.c to allow reading from
- strings in read-only memory. */
-/* 25 Apr. 1991: adjust namelist stuff to work with f2c -i2 */
-/* 26 Apr. 1991: fix some bugs with NAMELIST read of multi-dim. arrays */
-/* 16 May 1991: increase LEFBL in lio.h to bypass NeXT bug */
-/* 17 Oct. 1991: change type of length field in sequential unformatted
- records from int to long (for systems where sizeof(int)
- can vary, depending on the compiler or compiler options). */
-/* 14 Nov. 1991: change uint to Uint in fmt.h, rdfmt.c, wrtfmt.c. */
-/* 25 Nov. 1991: change uint to Uint in lwrite.c; change sizeof(int) to
- sizeof(uioint) in fseeks in sue.c (missed on 17 Oct.). */
-/* 1 Dec. 1991: uio.c: add test for read failure (seq. unformatted reads);
- adjust an error return from EOF to off end of record */
-/* 12 Dec. 1991: rsli.c: fix bug with internal list input that caused
- the last character of each record to be ignored.
- iio.c: adjust error message in internal formatted
- input from "end-of-file" to "off end of record" if
- the format specifies more characters than the
- record contains. */
-/* 17 Jan. 1992: lread.c, rsne.c: in list and namelist input,
- treat "r* ," and "r*," alike (where r is a
- positive integer constant), and fix a bug in
- handling null values following items with repeat
- counts (e.g., 2*1,,3); for namelist reading
- of a numeric array, allow a new name-value subsequence
- to terminate the current one (as though the current
- one ended with the right number of null values).
- lio.h, lwrite.c: omit insignificant zeros in
- list and namelist output. To get the old
- behavior, compile with -DOld_list_output . */
-/* 18 Jan. 1992: make list output consistent with F format by
- printing .1 rather than 0.1 (introduced yesterday). */
-/* 3 Feb. 1992: rsne.c: fix namelist read bug that caused the
- character following a comma to be ignored. */
-/* 19 May 1992: adjust iio.c, ilnw.c, rdfmt.c and rsli.c to make err=
- work with internal list and formatted I/O. */
-/* 18 July 1992: adjust rsne.c to allow namelist input to stop at
- an & (e.g. &end). */
-/* 23 July 1992: switch to ANSI prototypes unless KR_headers is #defined ;
- recognize Z format (assuming 8-bit bytes). */
-/* 14 Aug. 1992: tweak wrt_E in wref.c to avoid -NaN */
-/* 23 Oct. 1992: Supply missing l_eof = 0 assignment to s_rsne() in rsne.c
- (so end-of-file on other files won't confuse namelist
- reads of external files). Prepend f__ to external
- names that are only of internal interest to lib[FI]77. */
-/* 1 Feb. 1993: backspace.c: fix bug that bit when last char of 2nd
- buffer == '\n'.
- endfile.c: guard against tiny L_tmpnam; close and reopen
- files in t_runc().
- lio.h: lengthen LINTW (buffer size in lwrite.c).
- err.c, open.c: more prepending of f__ (to [rw]_mode). */
-/* 5 Feb. 1993: tweaks to NAMELIST: rsne.c: ? prints the namelist being
- sought; namelists of the wrong name are skipped (after
- an error message; xwsne.c: namelist writes have a
- newline before each new variable.
- open.c: ACCESS='APPEND' positions sequential files
- at EOF (nonstandard extension -- that doesn't require
- changing data structures). */
-/* 9 Feb. 1993: Change some #ifdef MSDOS lines to #ifdef NON_UNIX_STDIO.
- err.c: under NON_UNIX_STDIO, avoid close(creat(name,0666))
- when the unit has another file descriptor for name. */
-/* 4 March 1993: err.c, open.c: take declaration of fdopen from rawio.h;
- open.c: always give f__w_mode[] 4 elements for use
- in t_runc (in endfile.c -- for change of 1 Feb. 1993). */
-/* 6 March 1993: uio.c: adjust off-end-of-record test for sequential
- unformatted reads to respond to err= rather than end=. */
-/* 12 March 1993: various tweaks for C++ */
-/* 6 April 1993: adjust error returns for formatted inputs to flush
- the current input line when err=label is specified.
- To restore the old behavior (input left mid-line),
- either adjust the #definition of errfl in fio.h or
- omit the invocation of f__doend in err__fl (in err.c). */
-/* 23 June 1993: iio.c: fix bug in format reversions for internal writes. */
-/* 5 Aug. 1993: lread.c: fix bug in handling repetition counts for
- logical data (during list or namelist input).
- Change struct f__syl to struct syl (for buggy compilers). */
-/* 7 Aug. 1993: lread.c: fix bug in namelist reading of incomplete
- logical arrays. */
-/* 9 Aug. 1993: lread.c: fix bug in namelist reading of an incomplete
- array of numeric data followed by another namelist
- item whose name starts with 'd', 'D', 'e', or 'E'. */
-/* 8 Sept. 1993: open.c: protect #include "sys/..." with
- #ifndef NON_UNIX_STDIO; Version date not changed. */
-/* 10 Nov. 1993: backspace.c: add nonsense for #ifdef MSDOS */
-/* 8 Dec. 1993: iio.c: adjust internal formatted reads to treat
- short records as though padded with blanks
- (rather than causing an "off end of record" error). */
-/* 22 Feb. 1994: lread.c: check that realloc did not return NULL. */
-/* 6 June 1994: Under NON_UNIX_STDIO, use binary mode for direct
- formatted files (avoiding any confusion regarding \n). */
-/* 5 July 1994: Fix bug (introduced 6 June 1994?) in reopening files
- under NON_UNIX_STDIO. */
-/* 6 July 1994: wref.c: protect with #ifdef GOOD_SPRINTF_EXPONENT an
- optimization that requires exponents to have 2 digits
- when 2 digits suffice.
- lwrite.c wsfe.c (list and formatted external output):
- omit ' ' carriage-control when compiled with
- -DOMIT_BLANK_CC . Off-by-one bug fixed in character
- count for list output of character strings.
- Omit '.' in list-directed printing of Nan, Infinity. */
-/* 12 July 1994: wrtfmt.c: under G11.4, write 0. as " .0000 " rather
- than " .0000E+00". */
-/* 3 Aug. 1994: lwrite.c: do not insert a newline when appending an
- oversize item to an empty line. */
-/* 12 Aug. 1994: rsli.c rsne.c: fix glitch (reset nml_read) that kept
- ERR= (in list- or format-directed input) from working
- after a NAMELIST READ. */
-/* 7 Sept. 1994: typesize.c: adjust to allow types LOGICAL*1, LOGICAL*2,
- INTEGER*1, and (under -DAllow_TYQUAD) INTEGER*8
- in NAMELISTs. */
-/* 6 Oct. 1994: util.c: omit f__mvgbt, as it is never used. */
-/* 2 Nov. 1994: add #ifdef ALWAYS_FLUSH logic. */
-/* 26 Jan. 1995: wref.c: fix glitch in printing the exponent of 0 when
- GOOD_SPRINTF_EXPONENT is not #defined. */
-/* 24 Feb. 1995: iio.c: z_getc: insert (unsigned char *) to allow
- internal reading of characters with high-bit set
- (on machines that sign-extend characters). */
-/* 14 March 1995:lread.c and rsfe.c: adjust s_rsle and s_rsfe to
- check for end-of-file (to prevent infinite loops
- with empty read statements). */
-/* 26 May 1995: iio.c: z_wnew: fix bug in handling T format items
- in internal writes whose last item is written to
- an earlier position than some previous item. */
-/* 29 Aug. 1995: backspace.c: adjust MSDOS logic. */
-/* 6 Sept. 1995: Adjust namelist input to treat a subscripted name
- whose subscripts do not involve colons similarly
- to the name without a subscript: accept several
- values, stored in successive elements starting at
- the indicated subscript. Adjust namelist output
- to quote character strings (avoiding confusion with
- arrays of character strings). Adjust f_init calls
- for people who don't use libF77's main(); now open and
- namelist read statements invoke f_init if needed. */
-/* 7 Sept. 1995: Fix some bugs with -DAllow_TYQUAD (for integer*8).
- Add -DNo_Namelist_Comments lines to rsne.c. */
-/* 5 Oct. 1995: wrtfmt.c: fix bug with t editing (f__cursor was not
- always zeroed in mv_cur). */
-/* 11 Oct. 1995: move defs of f__hiwater, f__svic, f__icptr from wrtfmt.c
- to err.c */
-/* 15 Mar. 1996: lread.c, rsfe.c: honor END= in READ stmt with empty iolist */
-
-/* 13 May 1996: add ftell_.c and fseek_.c */
-/* 9 June 1996: Adjust rsli.c and lread.c so internal list input with
- too few items in the input string will honor end= . */
-/* 12 Sept. 1995:fmtlib.c: fix glitch in printing the most negative integer. */
-/* 25 Sept. 1995:fmt.h: for formatted writes of negative integer*1 values,
- make ic signed on ANSI systems. If formatted writes of
- integer*1 values trouble you when using a K&R C compiler,
- switch to an ANSI compiler or use a compiler flag that
- makes characters signed. */
-/* 9 Dec. 1996: d[fu]e.c, err.c: complain about non-positive rec=
- in direct read and write statements.
- ftell_.c: change param "unit" to "Unit" for -DKR_headers. */
-/* 26 Feb. 1997: ftell_.c: on systems that define SEEK_SET, etc., use
- SEEK_SET, SEEK_CUR, SEEK_END for *whence = 0, 1, 2. */
diff --git a/lib/libI77/backspace.c b/lib/libI77/backspace.c
deleted file mode 100644
index 3771cd9..0000000
--- a/lib/libI77/backspace.c
+++ /dev/null
@@ -1,98 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#ifdef KR_headers
-integer f_back(a) alist *a;
-#else
-integer f_back(alist *a)
-#endif
-{ unit *b;
- int i, n, ndec;
-#ifdef MSDOS
- int j, k;
- long w, z;
-#endif
- long x, y;
- char buf[32];
- if(a->aunit >= MXUNIT || a->aunit < 0)
- err(a->aerr,101,"backspace")
- b= &f__units[a->aunit];
- if(b->useek==0) err(a->aerr,106,"backspace")
- if(b->ufd==NULL) {
- fk_open(1, 1, a->aunit);
- return(0);
- }
- if(b->uend==1)
- { b->uend=0;
- return(0);
- }
- if(b->uwrt) {
- (void) t_runc(a);
- if (f__nowreading(b))
- err(a->aerr,errno,"backspace")
- }
- if(b->url>0)
- {
- x=ftell(b->ufd);
- y = x % b->url;
- if(y == 0) x--;
- x /= b->url;
- x *= b->url;
- (void) fseek(b->ufd,x,SEEK_SET);
- return(0);
- }
-
- if(b->ufmt==0)
- { (void) fseek(b->ufd,-(long)sizeof(int),SEEK_CUR);
- (void) fread((char *)&n,sizeof(int),1,b->ufd);
- (void) fseek(b->ufd,-(long)n-2*sizeof(int),SEEK_CUR);
- return(0);
- }
-#ifdef MSDOS
- w = -1;
-#endif
- for(ndec = 1;; ndec = 0)
- {
- y = x = ftell(b->ufd);
- if(x < sizeof(buf))
- x = 0;
- else
- x -= sizeof(buf);
- (void) fseek(b->ufd,x,SEEK_SET);
- n=fread(buf,1,(int)(y-x), b->ufd);
- for(i = n - ndec; --i >= 0; )
- {
- if(buf[i]!='\n') continue;
-#ifdef MSDOS
- for(j = k = 0; j <= i; j++)
- if (buf[j] == '\n')
- k++;
- fseek(b->ufd,x,SEEK_SET);
- for(;;)
- if (getc(b->ufd) == '\n') {
- if ((z = ftell(b->ufd)) >= y && ndec) {
- if (w == -1)
- goto break2;
- break;
- }
- if (--k <= 0)
- return 0;
- w = z;
- }
- fseek(b->ufd, w, SEEK_SET);
-#else
- fseek(b->ufd,(long)(i+1-n),SEEK_CUR);
-#endif
- return(0);
- }
-#ifdef MSDOS
- break2:
-#endif
- if(x==0)
- {
- (void) fseek(b->ufd, 0L, SEEK_SET);
- return(0);
- }
- else if(n<=0) err(a->aerr,(EOF),"backspace")
- (void) fseek(b->ufd, x, SEEK_SET);
- }
-}
diff --git a/lib/libI77/close.c b/lib/libI77/close.c
deleted file mode 100644
index 29a7af5..0000000
--- a/lib/libI77/close.c
+++ /dev/null
@@ -1,95 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#ifdef KR_headers
-integer f_clos(a) cllist *a;
-#else
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-#ifdef NON_UNIX_STDIO
-#ifndef unlink
-#define unlink remove
-#endif
-#else
-#ifdef MSDOS
-#include "io.h"
-#else
-#ifdef __cplusplus
-extern "C" int unlink(const char*);
-#else
-extern int unlink(const char*);
-#endif
-#endif
-#endif
-
-integer f_clos(cllist *a)
-#endif
-{ unit *b;
-
- if(a->cunit >= MXUNIT) return(0);
- b= &f__units[a->cunit];
- if(b->ufd==NULL)
- goto done;
- if (!a->csta)
- if (b->uscrtch == 1)
- goto Delete;
- else
- goto Keep;
- switch(*a->csta) {
- default:
- Keep:
- case 'k':
- case 'K':
- if(b->uwrt == 1)
- t_runc((alist *)a);
- if(b->ufnm) {
- fclose(b->ufd);
- free(b->ufnm);
- }
- break;
- case 'd':
- case 'D':
- Delete:
- if(b->ufnm) {
- fclose(b->ufd);
- unlink(b->ufnm); /*SYSDEP*/
- free(b->ufnm);
- }
- }
- b->ufd=NULL;
- done:
- b->uend=0;
- b->ufnm=NULL;
- return(0);
- }
- void
-#ifdef KR_headers
-f_exit()
-#else
-f_exit(void)
-#endif
-{ int i;
- static cllist xx;
- if (!xx.cerr) {
- xx.cerr=1;
- xx.csta=NULL;
- for(i=0;i<MXUNIT;i++)
- {
- xx.cunit=i;
- (void) f_clos(&xx);
- }
- }
-}
- int
-#ifdef KR_headers
-flush_()
-#else
-flush_(void)
-#endif
-{ int i;
- for(i=0;i<MXUNIT;i++)
- if(f__units[i].ufd != NULL && f__units[i].uwrt)
- fflush(f__units[i].ufd);
-return 0;
-}
diff --git a/lib/libI77/dfe.c b/lib/libI77/dfe.c
deleted file mode 100644
index 51023d5..0000000
--- a/lib/libI77/dfe.c
+++ /dev/null
@@ -1,152 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-
-y_rsk(Void)
-{
- if(f__curunit->uend || f__curunit->url <= f__recpos
- || f__curunit->url == 1) return 0;
- do {
- getc(f__cf);
- } while(++f__recpos < f__curunit->url);
- return 0;
-}
-y_getc(Void)
-{
- int ch;
- if(f__curunit->uend) return(-1);
- if((ch=getc(f__cf))!=EOF)
- {
- f__recpos++;
- if(f__curunit->url>=f__recpos ||
- f__curunit->url==1)
- return(ch);
- else return(' ');
- }
- if(feof(f__cf))
- {
- f__curunit->uend=1;
- errno=0;
- return(-1);
- }
- err(f__elist->cierr,errno,"readingd");
-}
-#ifdef KR_headers
-y_putc(c)
-#else
-y_putc(int c)
-#endif
-{
- f__recpos++;
- if(f__recpos <= f__curunit->url || f__curunit->url==1)
- putc(c,f__cf);
- else
- err(f__elist->cierr,110,"dout");
- return(0);
-}
-y_rev(Void)
-{ /*what about work done?*/
- if(f__curunit->url==1 || f__recpos==f__curunit->url)
- return(0);
- while(f__recpos<f__curunit->url)
- (*f__putn)(' ');
- f__recpos=0;
- return(0);
-}
-y_err(Void)
-{
- err(f__elist->cierr, 110, "dfe");
-}
-
-y_newrec(Void)
-{
- if(f__curunit->url == 1 || f__recpos == f__curunit->url) {
- f__hiwater = f__recpos = f__cursor = 0;
- return(1);
- }
- if(f__hiwater > f__recpos)
- f__recpos = f__hiwater;
- y_rev();
- f__hiwater = f__cursor = 0;
- return(1);
-}
-
-#ifdef KR_headers
-c_dfe(a) cilist *a;
-#else
-c_dfe(cilist *a)
-#endif
-{
- f__sequential=0;
- f__formatted=f__external=1;
- f__elist=a;
- f__cursor=f__scale=f__recpos=0;
- if(a->ciunit>MXUNIT || a->ciunit<0)
- err(a->cierr,101,"startchk");
- f__curunit = &f__units[a->ciunit];
- if(f__curunit->ufd==NULL && fk_open(DIR,FMT,a->ciunit))
- err(a->cierr,104,"dfe");
- f__cf=f__curunit->ufd;
- if(!f__curunit->ufmt) err(a->cierr,102,"dfe")
- if(!f__curunit->useek) err(a->cierr,104,"dfe")
- f__fmtbuf=a->cifmt;
- if(a->cirec <= 0)
- err(a->cierr,130,"dfe")
- fseek(f__cf,(long)f__curunit->url * (a->cirec-1),SEEK_SET);
- f__curunit->uend = 0;
- return(0);
-}
-#ifdef KR_headers
-integer s_rdfe(a) cilist *a;
-#else
-integer s_rdfe(cilist *a)
-#endif
-{
- int n;
- if(!f__init) f_init();
- f__reading=1;
- if(n=c_dfe(a))return(n);
- if(f__curunit->uwrt && f__nowreading(f__curunit))
- err(a->cierr,errno,"read start");
- f__getn = y_getc;
- f__doed = rd_ed;
- f__doned = rd_ned;
- f__dorevert = f__donewrec = y_err;
- f__doend = y_rsk;
- if(pars_f(f__fmtbuf)<0)
- err(a->cierr,100,"read start");
- fmt_bg();
- return(0);
-}
-#ifdef KR_headers
-integer s_wdfe(a) cilist *a;
-#else
-integer s_wdfe(cilist *a)
-#endif
-{
- int n;
- if(!f__init) f_init();
- f__reading=0;
- if(n=c_dfe(a)) return(n);
- if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
- err(a->cierr,errno,"startwrt");
- f__putn = y_putc;
- f__doed = w_ed;
- f__doned= w_ned;
- f__dorevert = y_err;
- f__donewrec = y_newrec;
- f__doend = y_rev;
- if(pars_f(f__fmtbuf)<0)
- err(a->cierr,100,"startwrt");
- fmt_bg();
- return(0);
-}
-integer e_rdfe(Void)
-{
- (void) en_fio();
- return(0);
-}
-integer e_wdfe(Void)
-{
- return en_fio();
-}
diff --git a/lib/libI77/dolio.c b/lib/libI77/dolio.c
deleted file mode 100644
index 4b5a2ca..0000000
--- a/lib/libI77/dolio.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "f2c.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef KR_headers
-extern int (*f__lioproc)();
-
-integer do_lio(type,number,ptr,len) ftnint *number,*type; char *ptr; ftnlen len;
-#else
-extern int (*f__lioproc)(ftnint*, char*, ftnlen, ftnint);
-
-integer do_lio(ftnint *type, ftnint *number, char *ptr, ftnlen len)
-#endif
-{
- return((*f__lioproc)(number,ptr,len,*type));
-}
-#ifdef __cplusplus
- }
-#endif
diff --git a/lib/libI77/due.c b/lib/libI77/due.c
deleted file mode 100644
index 670b0f1..0000000
--- a/lib/libI77/due.c
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-
-#ifdef KR_headers
-c_due(a) cilist *a;
-#else
-c_due(cilist *a)
-#endif
-{
- if(!f__init) f_init();
- if(a->ciunit>=MXUNIT || a->ciunit<0)
- err(a->cierr,101,"startio");
- f__sequential=f__formatted=f__recpos=0;
- f__external=1;
- f__curunit = &f__units[a->ciunit];
- f__elist=a;
- if(f__curunit->ufd==NULL && fk_open(DIR,UNF,a->ciunit) ) err(a->cierr,104,"due");
- f__cf=f__curunit->ufd;
- if(f__curunit->ufmt) err(a->cierr,102,"cdue")
- if(!f__curunit->useek) err(a->cierr,104,"cdue")
- if(f__curunit->ufd==NULL) err(a->cierr,114,"cdue")
- if(a->cirec <= 0)
- err(a->cierr,130,"due")
- fseek(f__cf,(long)(a->cirec-1)*f__curunit->url,SEEK_SET);
- f__curunit->uend = 0;
- return(0);
-}
-#ifdef KR_headers
-integer s_rdue(a) cilist *a;
-#else
-integer s_rdue(cilist *a)
-#endif
-{
- int n;
- f__reading=1;
- if(n=c_due(a)) return(n);
- if(f__curunit->uwrt && f__nowreading(f__curunit))
- err(a->cierr,errno,"read start");
- return(0);
-}
-#ifdef KR_headers
-integer s_wdue(a) cilist *a;
-#else
-integer s_wdue(cilist *a)
-#endif
-{
- int n;
- f__reading=0;
- if(n=c_due(a)) return(n);
- if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
- err(a->cierr,errno,"write start");
- return(0);
-}
-integer e_rdue(Void)
-{
- if(f__curunit->url==1 || f__recpos==f__curunit->url)
- return(0);
- fseek(f__cf,(long)(f__curunit->url-f__recpos),SEEK_CUR);
- if(ftell(f__cf)%f__curunit->url)
- err(f__elist->cierr,200,"syserr");
- return(0);
-}
-integer e_wdue(Void)
-{
-#ifdef ALWAYS_FLUSH
- if (fflush(f__cf))
- err(f__elist->cierr,errno,"write end");
-#endif
- return(e_rdue());
-}
diff --git a/lib/libI77/endfile.c b/lib/libI77/endfile.c
deleted file mode 100644
index f5990e3..0000000
--- a/lib/libI77/endfile.c
+++ /dev/null
@@ -1,195 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#ifndef NON_UNIX_STDIO
-#include "sys/types.h"
-#endif
-#include "rawio.h"
-
-#ifdef KR_headers
-extern char *strcpy();
-#else
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-#include "string.h"
-#endif
-
-#ifdef NON_UNIX_STDIO
-#ifndef unlink
-#define unlink remove
-#endif
-#else
-#ifdef MSDOS
-#include "io.h"
-#endif
-#endif
-
-#ifdef NON_UNIX_STDIO
-extern char *f__r_mode[], *f__w_mode[];
-#endif
-
-#ifdef KR_headers
-integer f_end(a) alist *a;
-#else
-integer f_end(alist *a)
-#endif
-{
- unit *b;
- if(a->aunit>=MXUNIT || a->aunit<0) err(a->aerr,101,"endfile");
- b = &f__units[a->aunit];
- if(b->ufd==NULL) {
- char nbuf[10];
- (void) sprintf(nbuf,"fort.%ld",a->aunit);
-#ifdef NON_UNIX_STDIO
- { FILE *tf;
- if (tf = fopen(nbuf, f__w_mode[0]))
- fclose(tf);
- }
-#else
- close(creat(nbuf, 0666));
-#endif
- return(0);
- }
- b->uend=1;
- return(b->useek ? t_runc(a) : 0);
-}
-
- static int
-#ifdef NON_UNIX_STDIO
-#ifdef KR_headers
-copy(from, len, to) char *from, *to; register long len;
-#else
-copy(FILE *from, register long len, FILE *to)
-#endif
-{
- int k, len1;
- char buf[BUFSIZ];
-
- while(fread(buf, len1 = len > BUFSIZ ? BUFSIZ : (int)len, 1, from)) {
- if (!fwrite(buf, len1, 1, to))
- return 1;
- if ((len -= len1) <= 0)
- break;
- }
- return 0;
- }
-#else
-#ifdef KR_headers
-copy(from, len, to) char *from, *to; register long len;
-#else
-copy(char *from, register long len, char *to)
-#endif
-{
- register int n;
- int k, rc = 0, tmp;
- char buf[BUFSIZ];
-
- if ((k = open(from, O_RDONLY)) < 0)
- return 1;
- if ((tmp = creat(to,0666)) < 0)
- return 1;
- while((n = read(k, buf, len > BUFSIZ ? BUFSIZ : (int)len)) > 0) {
- if (write(tmp, buf, n) != n)
- { rc = 1; break; }
- if ((len -= n) <= 0)
- break;
- }
- close(k);
- close(tmp);
- return n < 0 ? 1 : rc;
- }
-#endif
-
-#ifndef L_tmpnam
-#define L_tmpnam 16
-#endif
-
- int
-#ifdef KR_headers
-t_runc(a) alist *a;
-#else
-t_runc(alist *a)
-#endif
-{
- char nm[L_tmpnam+12]; /* extra space in case L_tmpnam is tiny */
- long loc, len;
- unit *b;
-#ifdef NON_UNIX_STDIO
- FILE *bf, *tf;
-#else
- FILE *bf;
-#endif
- int rc = 0;
-
- b = &f__units[a->aunit];
- if(b->url)
- return(0); /*don't truncate direct files*/
- loc=ftell(bf = b->ufd);
- fseek(bf,0L,SEEK_END);
- len=ftell(bf);
- if (loc >= len || b->useek == 0 || b->ufnm == NULL)
- return(0);
-#ifdef NON_UNIX_STDIO
- fclose(b->ufd);
-#else
- rewind(b->ufd); /* empty buffer */
-#endif
- if (!loc) {
-#ifdef NON_UNIX_STDIO
- if (!(bf = fopen(b->ufnm, f__w_mode[b->ufmt])))
-#else
- if (close(creat(b->ufnm,0666)))
-#endif
- rc = 1;
- if (b->uwrt)
- b->uwrt = 1;
- goto done;
- }
-#ifdef _POSIX_SOURCE
- tmpnam(nm);
-#else
- strcpy(nm,"tmp.FXXXXXX");
- mktemp(nm);
-#endif
-#ifdef NON_UNIX_STDIO
- if (!(bf = fopen(b->ufnm, f__r_mode[0]))) {
- bad:
- rc = 1;
- goto done;
- }
- if (!(tf = fopen(nm, f__w_mode[0])))
- goto bad;
- if (copy(bf, loc, tf)) {
- bad1:
- rc = 1;
- goto done1;
- }
- if (!(bf = freopen(b->ufnm, f__w_mode[0], bf)))
- goto bad1;
- if (!(tf = freopen(nm, f__r_mode[0], tf)))
- goto bad1;
- if (copy(tf, loc, bf))
- goto bad1;
- if (f__w_mode[0] != f__w_mode[b->ufmt]) {
- if (!(bf = freopen(b->ufnm, f__w_mode[b->ufmt|2], bf)))
- goto bad1;
- fseek(bf, loc, SEEK_SET);
- }
-done1:
- fclose(tf);
- unlink(nm);
-done:
- f__cf = b->ufd = bf;
-#else
- if (copy(b->ufnm, loc, nm)
- || copy(nm, loc, b->ufnm))
- rc = 1;
- unlink(nm);
- fseek(b->ufd, loc, SEEK_SET);
-done:
-#endif
- if (rc)
- err(a->aerr,111,"endfile");
- return 0;
- }
diff --git a/lib/libI77/err.c b/lib/libI77/err.c
deleted file mode 100644
index 29747ff..0000000
--- a/lib/libI77/err.c
+++ /dev/null
@@ -1,278 +0,0 @@
-#ifndef NON_UNIX_STDIO
-#include "sys/types.h"
-#include "sys/stat.h"
-#endif
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h" /* for struct syl */
-#include "rawio.h" /* for fcntl.h, fdopen */
-#ifdef NON_UNIX_STDIO
-#ifdef KR_headers
-extern char *malloc();
-#else
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-#endif
-#endif
-
-/*global definitions*/
-unit f__units[MXUNIT]; /*unit table*/
-flag f__init; /*0 on entry, 1 after initializations*/
-cilist *f__elist; /*active external io list*/
-icilist *f__svic; /*active internal io list*/
-flag f__reading; /*1 if reading, 0 if writing*/
-flag f__cplus,f__cblank;
-char *f__fmtbuf;
-flag f__external; /*1 if external io, 0 if internal */
-#ifdef KR_headers
-int (*f__doed)(),(*f__doned)();
-int (*f__doend)(),(*f__donewrec)(),(*f__dorevert)();
-int (*f__getn)(),(*f__putn)(); /*for formatted io*/
-#else
-int (*f__getn)(void),(*f__putn)(int); /*for formatted io*/
-int (*f__doed)(struct syl*, char*, ftnlen),(*f__doned)(struct syl*);
-int (*f__dorevert)(void),(*f__donewrec)(void),(*f__doend)(void);
-#endif
-flag f__sequential; /*1 if sequential io, 0 if direct*/
-flag f__formatted; /*1 if formatted io, 0 if unformatted*/
-FILE *f__cf; /*current file*/
-unit *f__curunit; /*current unit*/
-int f__recpos; /*place in current record*/
-int f__cursor, f__hiwater, f__scale;
-char *f__icptr;
-
-/*error messages*/
-char *F_err[] =
-{
- "error in format", /* 100 */
- "illegal unit number", /* 101 */
- "formatted io not allowed", /* 102 */
- "unformatted io not allowed", /* 103 */
- "direct io not allowed", /* 104 */
- "sequential io not allowed", /* 105 */
- "can't backspace file", /* 106 */
- "null file name", /* 107 */
- "can't stat file", /* 108 */
- "unit not connected", /* 109 */
- "off end of record", /* 110 */
- "truncation failed in endfile", /* 111 */
- "incomprehensible list input", /* 112 */
- "out of free space", /* 113 */
- "unit not connected", /* 114 */
- "read unexpected character", /* 115 */
- "bad logical input field", /* 116 */
- "bad variable type", /* 117 */
- "bad namelist name", /* 118 */
- "variable not in namelist", /* 119 */
- "no end record", /* 120 */
- "variable count incorrect", /* 121 */
- "subscript for scalar variable", /* 122 */
- "invalid array section", /* 123 */
- "substring out of bounds", /* 124 */
- "subscript out of bounds", /* 125 */
- "can't read file", /* 126 */
- "can't write file", /* 127 */
- "'new' file exists", /* 128 */
- "can't append to file", /* 129 */
- "non-positive record number" /* 130 */
-};
-#define MAXERR (sizeof(F_err)/sizeof(char *)+100)
-
-#ifdef KR_headers
-f__canseek(f) FILE *f; /*SYSDEP*/
-#else
-f__canseek(FILE *f) /*SYSDEP*/
-#endif
-{
-#ifdef NON_UNIX_STDIO
- return !isatty(fileno(f));
-#else
- struct stat x;
-
- if (fstat(fileno(f),&x) < 0)
- return(0);
-#ifdef S_IFMT
- switch(x.st_mode & S_IFMT) {
- case S_IFDIR:
- case S_IFREG:
- if(x.st_nlink > 0) /* !pipe */
- return(1);
- else
- return(0);
- case S_IFCHR:
- if(isatty(fileno(f)))
- return(0);
- return(1);
-#ifdef S_IFBLK
- case S_IFBLK:
- return(1);
-#endif
- }
-#else
-#ifdef S_ISDIR
- /* POSIX version */
- if (S_ISREG(x.st_mode) || S_ISDIR(x.st_mode)) {
- if(x.st_nlink > 0) /* !pipe */
- return(1);
- else
- return(0);
- }
- if (S_ISCHR(x.st_mode)) {
- if(isatty(fileno(f)))
- return(0);
- return(1);
- }
- if (S_ISBLK(x.st_mode))
- return(1);
-#else
- Help! How does fstat work on this system?
-#endif
-#endif
- return(0); /* who knows what it is? */
-#endif
-}
-
- void
-#ifdef KR_headers
-f__fatal(n,s) char *s;
-#else
-f__fatal(int n, char *s)
-#endif
-{
- if(n<100 && n>=0) perror(s); /*SYSDEP*/
- else if(n >= (int)MAXERR || n < -1)
- { fprintf(stderr,"%s: illegal error number %d\n",s,n);
- }
- else if(n == -1) fprintf(stderr,"%s: end of file\n",s);
- else
- fprintf(stderr,"%s: %s\n",s,F_err[n-100]);
- if (f__curunit) {
- fprintf(stderr,"apparent state: unit %d ",f__curunit-f__units);
- fprintf(stderr, f__curunit->ufnm ? "named %s\n" : "(unnamed)\n",
- f__curunit->ufnm);
- }
- else
- fprintf(stderr,"apparent state: internal I/O\n");
- if (f__fmtbuf)
- fprintf(stderr,"last format: %s\n",f__fmtbuf);
- fprintf(stderr,"lately %s %s %s %s",f__reading?"reading":"writing",
- f__sequential?"sequential":"direct",f__formatted?"formatted":"unformatted",
- f__external?"external":"internal");
- sig_die(" IO", 1);
-}
-/*initialization routine*/
- VOID
-f_init(Void)
-{ unit *p;
-
- f__init=1;
- p= &f__units[0];
- p->ufd=stderr;
- p->useek=f__canseek(stderr);
-#ifdef NON_UNIX_STDIO
- setbuf(stderr, (char *)malloc(BUFSIZ));
-#else
- stderr->_flag &= ~_IONBF;
-#endif
- p->ufmt=1;
- p->uwrt=1;
- p = &f__units[5];
- p->ufd=stdin;
- p->useek=f__canseek(stdin);
- p->ufmt=1;
- p->uwrt=0;
- p= &f__units[6];
- p->ufd=stdout;
- p->useek=f__canseek(stdout);
- p->ufmt=1;
- p->uwrt=1;
-}
-#ifdef KR_headers
-f__nowreading(x) unit *x;
-#else
-f__nowreading(unit *x)
-#endif
-{
- long loc;
- int ufmt;
- extern char *f__r_mode[];
-
- if (!x->ufnm)
- goto cantread;
- ufmt = x->ufmt;
- loc=ftell(x->ufd);
- if(freopen(x->ufnm,f__r_mode[ufmt],x->ufd) == NULL) {
- cantread:
- errno = 126;
- return(1);
- }
- x->uwrt=0;
- (void) fseek(x->ufd,loc,SEEK_SET);
- return(0);
-}
-#ifdef KR_headers
-f__nowwriting(x) unit *x;
-#else
-f__nowwriting(unit *x)
-#endif
-{
- long loc;
- int ufmt;
- extern char *f__w_mode[];
-#ifndef NON_UNIX_STDIO
- int k;
-#endif
-
- if (!x->ufnm)
- goto cantwrite;
- ufmt = x->ufmt;
-#ifdef NON_UNIX_STDIO
- ufmt |= 2;
-#endif
- if (x->uwrt == 3) { /* just did write, rewind */
-#ifdef NON_UNIX_STDIO
- if (!(f__cf = x->ufd =
- freopen(x->ufnm,f__w_mode[ufmt],x->ufd)))
-#else
- if (close(creat(x->ufnm,0666)))
-#endif
- goto cantwrite;
- }
- else {
- loc=ftell(x->ufd);
-#ifdef NON_UNIX_STDIO
- if (!(f__cf = x->ufd =
- freopen(x->ufnm, f__w_mode[ufmt], x->ufd)))
-#else
- if (fclose(x->ufd) < 0
- || (k = x->uwrt == 2 ? creat(x->ufnm,0666)
- : open(x->ufnm,O_WRONLY)) < 0
- || (f__cf = x->ufd = fdopen(k,f__w_mode[ufmt])) == NULL)
-#endif
- {
- x->ufd = NULL;
- cantwrite:
- errno = 127;
- return(1);
- }
- (void) fseek(x->ufd,loc,SEEK_SET);
- }
- x->uwrt = 1;
- return(0);
-}
-
- int
-#ifdef KR_headers
-err__fl(f, m, s) int f, m; char *s;
-#else
-err__fl(int f, int m, char *s)
-#endif
-{
- if (!f)
- f__fatal(m, s);
- if (f__doend)
- (*f__doend)();
- return errno = m;
- }
diff --git a/lib/libI77/f2ch.add b/lib/libI77/f2ch.add
deleted file mode 100644
index a2acc17..0000000
--- a/lib/libI77/f2ch.add
+++ /dev/null
@@ -1,162 +0,0 @@
-/* If you are using a C++ compiler, append the following to f2c.h
- for compiling libF77 and libI77. */
-
-#ifdef __cplusplus
-extern "C" {
-extern int abort_(void);
-extern double c_abs(complex *);
-extern void c_cos(complex *, complex *);
-extern void c_div(complex *, complex *, complex *);
-extern void c_exp(complex *, complex *);
-extern void c_log(complex *, complex *);
-extern void c_sin(complex *, complex *);
-extern void c_sqrt(complex *, complex *);
-extern double d_abs(double *);
-extern double d_acos(double *);
-extern double d_asin(double *);
-extern double d_atan(double *);
-extern double d_atn2(double *, double *);
-extern void d_cnjg(doublecomplex *, doublecomplex *);
-extern double d_cos(double *);
-extern double d_cosh(double *);
-extern double d_dim(double *, double *);
-extern double d_exp(double *);
-extern double d_imag(doublecomplex *);
-extern double d_int(double *);
-extern double d_lg10(double *);
-extern double d_log(double *);
-extern double d_mod(double *, double *);
-extern double d_nint(double *);
-extern double d_prod(float *, float *);
-extern double d_sign(double *, double *);
-extern double d_sin(double *);
-extern double d_sinh(double *);
-extern double d_sqrt(double *);
-extern double d_tan(double *);
-extern double d_tanh(double *);
-extern double derf_(double *);
-extern double derfc_(double *);
-extern integer do_fio(ftnint *, char *, ftnlen);
-extern integer do_lio(ftnint *, ftnint *, char *, ftnlen);
-extern integer do_uio(ftnint *, char *, ftnlen);
-extern integer e_rdfe(void);
-extern integer e_rdue(void);
-extern integer e_rsfe(void);
-extern integer e_rsfi(void);
-extern integer e_rsle(void);
-extern integer e_rsli(void);
-extern integer e_rsue(void);
-extern integer e_wdfe(void);
-extern integer e_wdue(void);
-extern integer e_wsfe(void);
-extern integer e_wsfi(void);
-extern integer e_wsle(void);
-extern integer e_wsli(void);
-extern integer e_wsue(void);
-extern int ef1asc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
-extern integer ef1cmc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
-extern double erf(double);
-extern double erf_(float *);
-extern double erfc(double);
-extern double erfc_(float *);
-extern integer f_back(alist *);
-extern integer f_clos(cllist *);
-extern integer f_end(alist *);
-extern void f_exit(void);
-extern integer f_inqu(inlist *);
-extern integer f_open(olist *);
-extern integer f_rew(alist *);
-extern int flush_(void);
-extern void getarg_(integer *, char *, ftnlen);
-extern void getenv_(char *, char *, ftnlen, ftnlen);
-extern short h_abs(short *);
-extern short h_dim(short *, short *);
-extern short h_dnnt(double *);
-extern short h_indx(char *, char *, ftnlen, ftnlen);
-extern short h_len(char *, ftnlen);
-extern short h_mod(short *, short *);
-extern short h_nint(float *);
-extern short h_sign(short *, short *);
-extern short hl_ge(char *, char *, ftnlen, ftnlen);
-extern short hl_gt(char *, char *, ftnlen, ftnlen);
-extern short hl_le(char *, char *, ftnlen, ftnlen);
-extern short hl_lt(char *, char *, ftnlen, ftnlen);
-extern integer i_abs(integer *);
-extern integer i_dim(integer *, integer *);
-extern integer i_dnnt(double *);
-extern integer i_indx(char *, char *, ftnlen, ftnlen);
-extern integer i_len(char *, ftnlen);
-extern integer i_mod(integer *, integer *);
-extern integer i_nint(float *);
-extern integer i_sign(integer *, integer *);
-extern integer iargc_(void);
-extern ftnlen l_ge(char *, char *, ftnlen, ftnlen);
-extern ftnlen l_gt(char *, char *, ftnlen, ftnlen);
-extern ftnlen l_le(char *, char *, ftnlen, ftnlen);
-extern ftnlen l_lt(char *, char *, ftnlen, ftnlen);
-extern void pow_ci(complex *, complex *, integer *);
-extern double pow_dd(double *, double *);
-extern double pow_di(double *, integer *);
-extern short pow_hh(short *, shortint *);
-extern integer pow_ii(integer *, integer *);
-extern double pow_ri(float *, integer *);
-extern void pow_zi(doublecomplex *, doublecomplex *, integer *);
-extern void pow_zz(doublecomplex *, doublecomplex *, doublecomplex *);
-extern double r_abs(float *);
-extern double r_acos(float *);
-extern double r_asin(float *);
-extern double r_atan(float *);
-extern double r_atn2(float *, float *);
-extern void r_cnjg(complex *, complex *);
-extern double r_cos(float *);
-extern double r_cosh(float *);
-extern double r_dim(float *, float *);
-extern double r_exp(float *);
-extern double r_imag(complex *);
-extern double r_int(float *);
-extern double r_lg10(float *);
-extern double r_log(float *);
-extern double r_mod(float *, float *);
-extern double r_nint(float *);
-extern double r_sign(float *, float *);
-extern double r_sin(float *);
-extern double r_sinh(float *);
-extern double r_sqrt(float *);
-extern double r_tan(float *);
-extern double r_tanh(float *);
-extern void s_cat(char *, char **, integer *, integer *, ftnlen);
-extern integer s_cmp(char *, char *, ftnlen, ftnlen);
-extern void s_copy(char *, char *, ftnlen, ftnlen);
-extern int s_paus(char *, ftnlen);
-extern integer s_rdfe(cilist *);
-extern integer s_rdue(cilist *);
-extern integer s_rnge(char *, integer, char *, integer);
-extern integer s_rsfe(cilist *);
-extern integer s_rsfi(icilist *);
-extern integer s_rsle(cilist *);
-extern integer s_rsli(icilist *);
-extern integer s_rsne(cilist *);
-extern integer s_rsni(icilist *);
-extern integer s_rsue(cilist *);
-extern int s_stop(char *, ftnlen);
-extern integer s_wdfe(cilist *);
-extern integer s_wdue(cilist *);
-extern integer s_wsfe(cilist *);
-extern integer s_wsfi(icilist *);
-extern integer s_wsle(cilist *);
-extern integer s_wsli(icilist *);
-extern integer s_wsne(cilist *);
-extern integer s_wsni(icilist *);
-extern integer s_wsue(cilist *);
-extern void sig_die(char *, int);
-extern integer signal_(integer *, void (*)(int));
-extern integer system_(char *, ftnlen);
-extern double z_abs(doublecomplex *);
-extern void z_cos(doublecomplex *, doublecomplex *);
-extern void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
-extern void z_exp(doublecomplex *, doublecomplex *);
-extern void z_log(doublecomplex *, doublecomplex *);
-extern void z_sin(doublecomplex *, doublecomplex *);
-extern void z_sqrt(doublecomplex *, doublecomplex *);
- }
-#endif
diff --git a/lib/libI77/fio.h b/lib/libI77/fio.h
deleted file mode 100644
index e8c693b..0000000
--- a/lib/libI77/fio.h
+++ /dev/null
@@ -1,102 +0,0 @@
-#include "stdio.h"
-#include "errno.h"
-#ifndef NULL
-/* ANSI C */
-#include "stddef.h"
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#endif
-
-#ifdef MSDOS
-#ifndef NON_UNIX_STDIO
-#define NON_UNIX_STDIO
-#endif
-#endif
-
-#ifdef UIOLEN_int
-typedef int uiolen;
-#else
-typedef long uiolen;
-#endif
-
-/*units*/
-typedef struct
-{ FILE *ufd; /*0=unconnected*/
- char *ufnm;
-#ifndef MSDOS
- long uinode;
- int udev;
-#endif
- int url; /*0=sequential*/
- flag useek; /*true=can backspace, use dir, ...*/
- flag ufmt;
- flag uprnt;
- flag ublnk;
- flag uend;
- flag uwrt; /*last io was write*/
- flag uscrtch;
-} unit;
-
-extern flag f__init;
-extern cilist *f__elist; /*active external io list*/
-extern flag f__reading,f__external,f__sequential,f__formatted;
-#undef Void
-#ifdef KR_headers
-#define Void /*void*/
-extern int (*f__getn)(),(*f__putn)(); /*for formatted io*/
-extern long f__inode();
-extern VOID sig_die();
-extern int (*f__donewrec)(), t_putc(), x_wSL();
-extern int c_sfe(), err__fl(), xrd_SL();
-#else
-#define Void void
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern int (*f__getn)(void),(*f__putn)(int); /*for formatted io*/
-extern long f__inode(char*,int*);
-extern void sig_die(char*,int);
-extern void f__fatal(int,char*);
-extern int t_runc(alist*);
-extern int f__nowreading(unit*), f__nowwriting(unit*);
-extern int fk_open(int,int,ftnint);
-extern int en_fio(void);
-extern void f_init(void);
-extern int (*f__donewrec)(void), t_putc(int), x_wSL(void);
-extern void b_char(char*,char*,ftnlen), g_char(char*,ftnlen,char*);
-extern int c_sfe(cilist*), z_rnew(void);
-extern int isatty(int);
-extern int err__fl(int,int,char*);
-extern int xrd_SL(void);
-#ifdef __cplusplus
- }
-#endif
-#endif
-extern int (*f__doend)(Void);
-extern FILE *f__cf; /*current file*/
-extern unit *f__curunit; /*current unit*/
-extern unit f__units[];
-#define err(f,m,s) {if(f) errno= m; else f__fatal(m,s); return(m);}
-#define errfl(f,m,s) return err__fl((int)f,m,s)
-
-/*Table sizes*/
-#define MXUNIT 100
-
-extern int f__recpos; /*position in current record*/
-extern int f__cursor; /* offset to move to */
-extern int f__hiwater; /* so TL doesn't confuse us */
-
-#define WRITE 1
-#define READ 2
-#define SEQ 3
-#define DIR 4
-#define FMT 5
-#define UNF 6
-#define EXT 7
-#define INT 8
-
-#define buf_end(x) (x->_flag & _IONBF ? x->_ptr : x->_base + BUFSIZ)
diff --git a/lib/libI77/fmt.c b/lib/libI77/fmt.c
deleted file mode 100644
index 12792fc..0000000
--- a/lib/libI77/fmt.c
+++ /dev/null
@@ -1,488 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-#define skip(s) while(*s==' ') s++
-#ifdef interdata
-#define SYLMX 300
-#endif
-#ifdef pdp11
-#define SYLMX 300
-#endif
-#ifdef vax
-#define SYLMX 300
-#endif
-#ifndef SYLMX
-#define SYLMX 300
-#endif
-#define GLITCH '\2'
- /* special quote character for stu */
-extern int f__cursor,f__scale;
-extern flag f__cblank,f__cplus; /*blanks in I and compulsory plus*/
-struct syl f__syl[SYLMX];
-int f__parenlvl,f__pc,f__revloc;
-
-#ifdef KR_headers
-char *ap_end(s) char *s;
-#else
-char *ap_end(char *s)
-#endif
-{ char quote;
- quote= *s++;
- for(;*s;s++)
- { if(*s!=quote) continue;
- if(*++s!=quote) return(s);
- }
- if(f__elist->cierr) {
- errno = 100;
- return(NULL);
- }
- f__fatal(100, "bad string");
- /*NOTREACHED*/ return 0;
-}
-#ifdef KR_headers
-op_gen(a,b,c,d)
-#else
-op_gen(int a, int b, int c, int d)
-#endif
-{ struct syl *p= &f__syl[f__pc];
- if(f__pc>=SYLMX)
- { fprintf(stderr,"format too complicated:\n");
- sig_die(f__fmtbuf, 1);
- }
- p->op=a;
- p->p1=b;
- p->p2=c;
- p->p3=d;
- return(f__pc++);
-}
-#ifdef KR_headers
-char *f_list();
-char *gt_num(s,n) char *s; int *n;
-#else
-char *f_list(char*);
-char *gt_num(char *s, int *n)
-#endif
-{ int m=0,f__cnt=0;
- char c;
- for(c= *s;;c = *s)
- { if(c==' ')
- { s++;
- continue;
- }
- if(c>'9' || c<'0') break;
- m=10*m+c-'0';
- f__cnt++;
- s++;
- }
- if(f__cnt==0) *n=1;
- else *n=m;
- return(s);
-}
-#ifdef KR_headers
-char *f_s(s,curloc) char *s;
-#else
-char *f_s(char *s, int curloc)
-#endif
-{
- skip(s);
- if(*s++!='(')
- {
- return(NULL);
- }
- if(f__parenlvl++ ==1) f__revloc=curloc;
- if(op_gen(RET1,curloc,0,0)<0 ||
- (s=f_list(s))==NULL)
- {
- return(NULL);
- }
- skip(s);
- return(s);
-}
-#ifdef KR_headers
-ne_d(s,p) char *s,**p;
-#else
-ne_d(char *s, char **p)
-#endif
-{ int n,x,sign=0;
- struct syl *sp;
- switch(*s)
- {
- default:
- return(0);
- case ':': (void) op_gen(COLON,0,0,0); break;
- case '$':
- (void) op_gen(NONL, 0, 0, 0); break;
- case 'B':
- case 'b':
- if(*++s=='z' || *s == 'Z') (void) op_gen(BZ,0,0,0);
- else (void) op_gen(BN,0,0,0);
- break;
- case 'S':
- case 's':
- if(*(s+1)=='s' || *(s+1) == 'S')
- { x=SS;
- s++;
- }
- else if(*(s+1)=='p' || *(s+1) == 'P')
- { x=SP;
- s++;
- }
- else x=S;
- (void) op_gen(x,0,0,0);
- break;
- case '/': (void) op_gen(SLASH,0,0,0); break;
- case '-': sign=1;
- case '+': s++; /*OUTRAGEOUS CODING TRICK*/
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- s=gt_num(s,&n);
- switch(*s)
- {
- default:
- return(0);
- case 'P':
- case 'p': if(sign) n= -n; (void) op_gen(P,n,0,0); break;
- case 'X':
- case 'x': (void) op_gen(X,n,0,0); break;
- case 'H':
- case 'h':
- sp = &f__syl[op_gen(H,n,0,0)];
- *(char **)&sp->p2 = s + 1;
- s+=n;
- break;
- }
- break;
- case GLITCH:
- case '"':
- case '\'':
- sp = &f__syl[op_gen(APOS,0,0,0)];
- *(char **)&sp->p2 = s;
- if((*p = ap_end(s)) == NULL)
- return(0);
- return(1);
- case 'T':
- case 't':
- if(*(s+1)=='l' || *(s+1) == 'L')
- { x=TL;
- s++;
- }
- else if(*(s+1)=='r'|| *(s+1) == 'R')
- { x=TR;
- s++;
- }
- else x=T;
- s=gt_num(s+1,&n);
- s--;
- (void) op_gen(x,n,0,0);
- break;
- case 'X':
- case 'x': (void) op_gen(X,1,0,0); break;
- case 'P':
- case 'p': (void) op_gen(P,1,0,0); break;
- }
- s++;
- *p=s;
- return(1);
-}
-#ifdef KR_headers
-e_d(s,p) char *s,**p;
-#else
-e_d(char *s, char **p)
-#endif
-{ int i,im,n,w,d,e,found=0,x=0;
- char *sv=s;
- s=gt_num(s,&n);
- (void) op_gen(STACK,n,0,0);
- switch(*s++)
- {
- default: break;
- case 'E':
- case 'e': x=1;
- case 'G':
- case 'g':
- found=1;
- s=gt_num(s,&w);
- if(w==0) break;
- if(*s=='.')
- { s++;
- s=gt_num(s,&d);
- }
- else d=0;
- if(*s!='E' && *s != 'e')
- (void) op_gen(x==1?E:G,w,d,0); /* default is Ew.dE2 */
- else
- { s++;
- s=gt_num(s,&e);
- (void) op_gen(x==1?EE:GE,w,d,e);
- }
- break;
- case 'O':
- case 'o':
- i = O;
- im = OM;
- goto finish_I;
- case 'Z':
- case 'z':
- i = Z;
- im = ZM;
- goto finish_I;
- case 'L':
- case 'l':
- found=1;
- s=gt_num(s,&w);
- if(w==0) break;
- (void) op_gen(L,w,0,0);
- break;
- case 'A':
- case 'a':
- found=1;
- skip(s);
- if(*s>='0' && *s<='9')
- { s=gt_num(s,&w);
- if(w==0) break;
- (void) op_gen(AW,w,0,0);
- break;
- }
- (void) op_gen(A,0,0,0);
- break;
- case 'F':
- case 'f':
- found=1;
- s=gt_num(s,&w);
- if(w==0) break;
- if(*s=='.')
- { s++;
- s=gt_num(s,&d);
- }
- else d=0;
- (void) op_gen(F,w,d,0);
- break;
- case 'D':
- case 'd':
- found=1;
- s=gt_num(s,&w);
- if(w==0) break;
- if(*s=='.')
- { s++;
- s=gt_num(s,&d);
- }
- else d=0;
- (void) op_gen(D,w,d,0);
- break;
- case 'I':
- case 'i':
- i = I;
- im = IM;
- finish_I:
- found=1;
- s=gt_num(s,&w);
- if(w==0) break;
- if(*s!='.')
- { (void) op_gen(i,w,0,0);
- break;
- }
- s++;
- s=gt_num(s,&d);
- (void) op_gen(im,w,d,0);
- break;
- }
- if(found==0)
- { f__pc--; /*unSTACK*/
- *p=sv;
- return(0);
- }
- *p=s;
- return(1);
-}
-#ifdef KR_headers
-char *i_tem(s) char *s;
-#else
-char *i_tem(char *s)
-#endif
-{ char *t;
- int n,curloc;
- if(*s==')') return(s);
- if(ne_d(s,&t)) return(t);
- if(e_d(s,&t)) return(t);
- s=gt_num(s,&n);
- if((curloc=op_gen(STACK,n,0,0))<0) return(NULL);
- return(f_s(s,curloc));
-}
-#ifdef KR_headers
-char *f_list(s) char *s;
-#else
-char *f_list(char *s)
-#endif
-{
- for(;*s!=0;)
- { skip(s);
- if((s=i_tem(s))==NULL) return(NULL);
- skip(s);
- if(*s==',') s++;
- else if(*s==')')
- { if(--f__parenlvl==0)
- {
- (void) op_gen(REVERT,f__revloc,0,0);
- return(++s);
- }
- (void) op_gen(GOTO,0,0,0);
- return(++s);
- }
- }
- return(NULL);
-}
-
-#ifdef KR_headers
-pars_f(s) char *s;
-#else
-pars_f(char *s)
-#endif
-{
- f__parenlvl=f__revloc=f__pc=0;
- if(f_s(s,0) == NULL)
- {
- return(-1);
- }
- return(0);
-}
-#define STKSZ 10
-int f__cnt[STKSZ],f__ret[STKSZ],f__cp,f__rp;
-flag f__workdone, f__nonl;
-
-#ifdef KR_headers
-type_f(n)
-#else
-type_f(int n)
-#endif
-{
- switch(n)
- {
- default:
- return(n);
- case RET1:
- return(RET1);
- case REVERT: return(REVERT);
- case GOTO: return(GOTO);
- case STACK: return(STACK);
- case X:
- case SLASH:
- case APOS: case H:
- case T: case TL: case TR:
- return(NED);
- case F:
- case I:
- case IM:
- case A: case AW:
- case O: case OM:
- case L:
- case E: case EE: case D:
- case G: case GE:
- case Z: case ZM:
- return(ED);
- }
-}
-#ifdef KR_headers
-integer do_fio(number,ptr,len) ftnint *number; ftnlen len; char *ptr;
-#else
-integer do_fio(ftnint *number, char *ptr, ftnlen len)
-#endif
-{ struct syl *p;
- int n,i;
- for(i=0;i<*number;i++,ptr+=len)
- {
-loop: switch(type_f((p= &f__syl[f__pc])->op))
- {
- default:
- fprintf(stderr,"unknown code in do_fio: %d\n%s\n",
- p->op,f__fmtbuf);
- err(f__elist->cierr,100,"do_fio");
- case NED:
- if((*f__doned)(p))
- { f__pc++;
- goto loop;
- }
- f__pc++;
- continue;
- case ED:
- if(f__cnt[f__cp]<=0)
- { f__cp--;
- f__pc++;
- goto loop;
- }
- if(ptr==NULL)
- return((*f__doend)());
- f__cnt[f__cp]--;
- f__workdone=1;
- if((n=(*f__doed)(p,ptr,len))>0)
- errfl(f__elist->cierr,errno,"fmt");
- if(n<0)
- err(f__elist->ciend,(EOF),"fmt");
- continue;
- case STACK:
- f__cnt[++f__cp]=p->p1;
- f__pc++;
- goto loop;
- case RET1:
- f__ret[++f__rp]=p->p1;
- f__pc++;
- goto loop;
- case GOTO:
- if(--f__cnt[f__cp]<=0)
- { f__cp--;
- f__rp--;
- f__pc++;
- goto loop;
- }
- f__pc=1+f__ret[f__rp--];
- goto loop;
- case REVERT:
- f__rp=f__cp=0;
- f__pc = p->p1;
- if(ptr==NULL)
- return((*f__doend)());
- if(!f__workdone) return(0);
- if((n=(*f__dorevert)()) != 0) return(n);
- goto loop;
- case COLON:
- if(ptr==NULL)
- return((*f__doend)());
- f__pc++;
- goto loop;
- case NONL:
- f__nonl = 1;
- f__pc++;
- goto loop;
- case S:
- case SS:
- f__cplus=0;
- f__pc++;
- goto loop;
- case SP:
- f__cplus = 1;
- f__pc++;
- goto loop;
- case P: f__scale=p->p1;
- f__pc++;
- goto loop;
- case BN:
- f__cblank=0;
- f__pc++;
- goto loop;
- case BZ:
- f__cblank=1;
- f__pc++;
- goto loop;
- }
- }
- return(0);
-}
-en_fio(Void)
-{ ftnint one=1;
- return(do_fio(&one,(char *)NULL,(ftnint)0));
-}
- VOID
-fmt_bg(Void)
-{
- f__workdone=f__cp=f__rp=f__pc=f__cursor=0;
- f__cnt[0]=f__ret[0]=0;
-}
diff --git a/lib/libI77/fmt.h b/lib/libI77/fmt.h
deleted file mode 100644
index 509746e..0000000
--- a/lib/libI77/fmt.h
+++ /dev/null
@@ -1,99 +0,0 @@
-struct syl
-{ int op,p1,p2,p3;
-};
-#define RET1 1
-#define REVERT 2
-#define GOTO 3
-#define X 4
-#define SLASH 5
-#define STACK 6
-#define I 7
-#define ED 8
-#define NED 9
-#define IM 10
-#define APOS 11
-#define H 12
-#define TL 13
-#define TR 14
-#define T 15
-#define COLON 16
-#define S 17
-#define SP 18
-#define SS 19
-#define P 20
-#define BN 21
-#define BZ 22
-#define F 23
-#define E 24
-#define EE 25
-#define D 26
-#define G 27
-#define GE 28
-#define L 29
-#define A 30
-#define AW 31
-#define O 32
-#define NONL 33
-#define OM 34
-#define Z 35
-#define ZM 36
-extern struct syl f__syl[];
-extern int f__pc,f__parenlvl,f__revloc;
-typedef union
-{ real pf;
- doublereal pd;
-} ufloat;
-typedef union
-{ short is;
-#ifndef KR_headers
- signed
-#endif
- char ic;
- integer il;
-#ifdef Allow_TYQUAD
- longint ili;
-#endif
-} Uint;
-#ifdef KR_headers
-extern int (*f__doed)(),(*f__doned)();
-extern int (*f__dorevert)();
-extern int rd_ed(),rd_ned();
-extern int w_ed(),w_ned();
-#else
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern int (*f__doed)(struct syl*, char*, ftnlen),(*f__doned)(struct syl*);
-extern int (*f__dorevert)(void);
-extern void fmt_bg(void);
-extern int pars_f(char*);
-extern int rd_ed(struct syl*, char*, ftnlen),rd_ned(struct syl*);
-extern int w_ed(struct syl*, char*, ftnlen),w_ned(struct syl*);
-extern int wrt_E(ufloat*, int, int, int, ftnlen);
-extern int wrt_F(ufloat*, int, int, ftnlen);
-extern int wrt_L(Uint*, int, ftnlen);
-#ifdef __cplusplus
- }
-#endif
-#endif
-extern flag f__cblank,f__cplus,f__workdone, f__nonl;
-extern char *f__fmtbuf;
-extern int f__scale;
-#define GET(x) if((x=(*f__getn)())<0) return(x)
-#define VAL(x) (x!='\n'?x:' ')
-#define PUT(x) (*f__putn)(x)
-extern int f__cursor;
-
-#undef TYQUAD
-#ifndef Allow_TYQUAD
-#undef longint
-#define longint long
-#else
-#define TYQUAD 14
-#endif
-
-#ifdef KR_headers
-extern char *f__icvt();
-#else
-extern char *f__icvt(longint, int*, int*, int);
-#endif
diff --git a/lib/libI77/fmtlib.c b/lib/libI77/fmtlib.c
deleted file mode 100644
index 91483fc..0000000
--- a/lib/libI77/fmtlib.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* @(#)fmtlib.c 1.2 */
-#define MAXINTLENGTH 23
-
-#include "f2c.h"
-#ifndef Allow_TYQUAD
-#undef longint
-#define longint long
-#undef ulongint
-#define ulongint unsigned long
-#endif
-
-#ifdef KR_headers
-char *f__icvt(value,ndigit,sign, base) longint value; int *ndigit,*sign;
- register int base;
-#else
-char *f__icvt(longint value, int *ndigit, int *sign, int base)
-#endif
-{
- static char buf[MAXINTLENGTH+1];
- register int i;
- ulongint uvalue;
-
- if(value > 0) {
- uvalue = value;
- *sign = 0;
- }
- else if (value < 0) {
- uvalue = -value;
- *sign = 1;
- }
- else {
- *sign = 0;
- *ndigit = 1;
- buf[MAXINTLENGTH-1] = '0';
- return &buf[MAXINTLENGTH-1];
- }
- i = MAXINTLENGTH;
- do {
- buf[--i] = (uvalue%base) + '0';
- uvalue /= base;
- }
- while(uvalue > 0);
- *ndigit = MAXINTLENGTH - i;
- return &buf[i];
- }
diff --git a/lib/libI77/fp.h b/lib/libI77/fp.h
deleted file mode 100644
index 40743d7..0000000
--- a/lib/libI77/fp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#define FMAX 40
-#define EXPMAXDIGS 8
-#define EXPMAX 99999999
-/* FMAX = max number of nonzero digits passed to atof() */
-/* EXPMAX = 10^EXPMAXDIGS - 1 = largest allowed exponent absolute value */
-
-#ifdef V10 /* Research Tenth-Edition Unix */
-#include "local.h"
-#endif
-
-/* MAXFRACDIGS and MAXINTDIGS are for wrt_F -- bounds (not necessarily
- tight) on the maximum number of digits to the right and left of
- * the decimal point.
- */
-
-#ifdef VAX
-#define MAXFRACDIGS 56
-#define MAXINTDIGS 38
-#else
-#ifdef CRAY
-#define MAXFRACDIGS 9880
-#define MAXINTDIGS 9864
-#else
-/* values that suffice for IEEE double */
-#define MAXFRACDIGS 344
-#define MAXINTDIGS 308
-#endif
-#endif
diff --git a/lib/libI77/iio.c b/lib/libI77/iio.c
deleted file mode 100644
index 4c8eb9d..0000000
--- a/lib/libI77/iio.c
+++ /dev/null
@@ -1,142 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-extern char *f__icptr;
-char *f__icend;
-extern icilist *f__svic;
-int f__icnum;
-extern int f__hiwater;
-z_getc(Void)
-{
- if(f__recpos++ < f__svic->icirlen) {
- if(f__icptr >= f__icend) err(f__svic->iciend,(EOF),"endfile");
- return(*(unsigned char *)f__icptr++);
- }
- return '\n';
-}
-#ifdef KR_headers
-z_putc(c)
-#else
-z_putc(int c)
-#endif
-{
- if(f__icptr >= f__icend) err(f__svic->icierr,110,"inwrite");
- if(f__recpos++ < f__svic->icirlen)
- *f__icptr++ = c;
- else err(f__svic->icierr,110,"recend");
- return 0;
-}
-z_rnew(Void)
-{
- f__icptr = f__svic->iciunit + (++f__icnum)*f__svic->icirlen;
- f__recpos = 0;
- f__cursor = 0;
- f__hiwater = 0;
- return 1;
-}
-
- static int
-z_endp(Void)
-{
- (*f__donewrec)();
- return 0;
- }
-
-#ifdef KR_headers
-c_si(a) icilist *a;
-#else
-c_si(icilist *a)
-#endif
-{
- f__elist = (cilist *)a;
- f__fmtbuf=a->icifmt;
- if(pars_f(f__fmtbuf)<0)
- err(a->icierr,100,"startint");
- fmt_bg();
- f__sequential=f__formatted=1;
- f__external=0;
- f__cblank=f__cplus=f__scale=0;
- f__svic=a;
- f__icnum=f__recpos=0;
- f__cursor = 0;
- f__hiwater = 0;
- f__icptr = a->iciunit;
- f__icend = f__icptr + a->icirlen*a->icirnum;
- f__curunit = 0;
- f__cf = 0;
- return(0);
-}
-
- int
-iw_rev(Void)
-{
- if(f__workdone)
- z_endp();
- f__hiwater = f__recpos = f__cursor = 0;
- return(f__workdone=0);
- }
-
-#ifdef KR_headers
-integer s_rsfi(a) icilist *a;
-#else
-integer s_rsfi(icilist *a)
-#endif
-{ int n;
- if(n=c_si(a)) return(n);
- f__reading=1;
- f__doed=rd_ed;
- f__doned=rd_ned;
- f__getn=z_getc;
- f__dorevert = z_endp;
- f__donewrec = z_rnew;
- f__doend = z_endp;
- return(0);
-}
-
-z_wnew(Void)
-{
- if (f__recpos < f__hiwater) {
- f__icptr += f__hiwater - f__recpos;
- f__recpos = f__hiwater;
- }
- while(f__recpos++ < f__svic->icirlen)
- *f__icptr++ = ' ';
- f__recpos = 0;
- f__cursor = 0;
- f__hiwater = 0;
- f__icnum++;
- return 1;
-}
-#ifdef KR_headers
-integer s_wsfi(a) icilist *a;
-#else
-integer s_wsfi(icilist *a)
-#endif
-{ int n;
- if(n=c_si(a)) return(n);
- f__reading=0;
- f__doed=w_ed;
- f__doned=w_ned;
- f__putn=z_putc;
- f__dorevert = iw_rev;
- f__donewrec = z_wnew;
- f__doend = z_endp;
- return(0);
-}
-integer e_rsfi(Void)
-{ int n;
- n = en_fio();
- f__fmtbuf = NULL;
- return(n);
-}
-integer e_wsfi(Void)
-{
- int n;
- n = en_fio();
- f__fmtbuf = NULL;
- if(f__icnum >= f__svic->icirnum)
- return(n);
- while(f__recpos++ < f__svic->icirlen)
- *f__icptr++ = ' ';
- return(n);
-}
diff --git a/lib/libI77/ilnw.c b/lib/libI77/ilnw.c
deleted file mode 100644
index b415686..0000000
--- a/lib/libI77/ilnw.c
+++ /dev/null
@@ -1,77 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "lio.h"
-extern char *f__icptr;
-extern char *f__icend;
-extern icilist *f__svic;
-extern int f__icnum;
-#ifdef KR_headers
-extern int z_putc();
-#else
-extern int z_putc(int);
-#endif
-
- static int
-z_wSL(Void)
-{
- while(f__recpos < f__svic->icirlen)
- z_putc(' ');
- return z_rnew();
- }
-
- VOID
-#ifdef KR_headers
-c_liw(a) icilist *a;
-#else
-c_liw(icilist *a)
-#endif
-{
- f__reading = 0;
- f__external = 0;
- f__formatted = 1;
- f__putn = z_putc;
- L_len = a->icirlen;
- f__donewrec = z_wSL;
- f__svic = a;
- f__icnum = f__recpos = 0;
- f__cursor = 0;
- f__cf = 0;
- f__curunit = 0;
- f__icptr = a->iciunit;
- f__icend = f__icptr + a->icirlen*a->icirnum;
- f__elist = (cilist *)a;
- }
-
- integer
-#ifdef KR_headers
-s_wsni(a) icilist *a;
-#else
-s_wsni(icilist *a)
-#endif
-{
- cilist ca;
-
- c_liw(a);
- ca.cifmt = a->icifmt;
- x_wsne(&ca);
- z_wSL();
- return 0;
- }
-
- integer
-#ifdef KR_headers
-s_wsli(a) icilist *a;
-#else
-s_wsli(icilist *a)
-#endif
-{
- f__lioproc = l_write;
- c_liw(a);
- return(0);
- }
-
-integer e_wsli(Void)
-{
- z_wSL();
- return(0);
- }
diff --git a/lib/libI77/inquire.c b/lib/libI77/inquire.c
deleted file mode 100644
index ec98b22..0000000
--- a/lib/libI77/inquire.c
+++ /dev/null
@@ -1,106 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#ifdef KR_headers
-integer f_inqu(a) inlist *a;
-#else
-#ifdef MSDOS
-#undef abs
-#undef min
-#undef max
-#include "string.h"
-#include "io.h"
-#endif
-integer f_inqu(inlist *a)
-#endif
-{ flag byfile;
- int i, n;
- unit *p;
- char buf[256];
- long x;
- if(a->infile!=NULL)
- { byfile=1;
- g_char(a->infile,a->infilen,buf);
-#ifdef NON_UNIX_STDIO
- x = access(buf,0) ? -1 : 0;
- for(i=0,p=NULL;i<MXUNIT;i++)
- if(f__units[i].ufd != NULL
- && f__units[i].ufnm != NULL
- && !strcmp(f__units[i].ufnm,buf)) {
- p = &f__units[i];
- break;
- }
-#else
- x=f__inode(buf, &n);
- for(i=0,p=NULL;i<MXUNIT;i++)
- if(f__units[i].uinode==x
- && f__units[i].ufd!=NULL
- && f__units[i].udev == n) {
- p = &f__units[i];
- break;
- }
-#endif
- }
- else
- {
- byfile=0;
- if(a->inunit<MXUNIT && a->inunit>=0)
- {
- p= &f__units[a->inunit];
- }
- else
- {
- p=NULL;
- }
- }
- if(a->inex!=NULL)
- if(byfile && x != -1 || !byfile && p!=NULL)
- *a->inex=1;
- else *a->inex=0;
- if(a->inopen!=NULL)
- if(byfile) *a->inopen=(p!=NULL);
- else *a->inopen=(p!=NULL && p->ufd!=NULL);
- if(a->innum!=NULL) *a->innum= p-f__units;
- if(a->innamed!=NULL)
- if(byfile || p!=NULL && p->ufnm!=NULL)
- *a->innamed=1;
- else *a->innamed=0;
- if(a->inname!=NULL)
- if(byfile)
- b_char(buf,a->inname,a->innamlen);
- else if(p!=NULL && p->ufnm!=NULL)
- b_char(p->ufnm,a->inname,a->innamlen);
- if(a->inacc!=NULL && p!=NULL && p->ufd!=NULL)
- if(p->url)
- b_char("DIRECT",a->inacc,a->inacclen);
- else b_char("SEQUENTIAL",a->inacc,a->inacclen);
- if(a->inseq!=NULL)
- if(p!=NULL && p->url)
- b_char("NO",a->inseq,a->inseqlen);
- else b_char("YES",a->inseq,a->inseqlen);
- if(a->indir!=NULL)
- if(p==NULL || p->url)
- b_char("YES",a->indir,a->indirlen);
- else b_char("NO",a->indir,a->indirlen);
- if(a->infmt!=NULL)
- if(p!=NULL && p->ufmt==0)
- b_char("UNFORMATTED",a->infmt,a->infmtlen);
- else b_char("FORMATTED",a->infmt,a->infmtlen);
- if(a->inform!=NULL)
- if(p!=NULL && p->ufmt==0)
- b_char("NO",a->inform,a->informlen);
- else b_char("YES",a->inform,a->informlen);
- if(a->inunf)
- if(p!=NULL && p->ufmt==0)
- b_char("YES",a->inunf,a->inunflen);
- else if (p!=NULL) b_char("NO",a->inunf,a->inunflen);
- else b_char("UNKNOWN",a->inunf,a->inunflen);
- if(a->inrecl!=NULL && p!=NULL)
- *a->inrecl=p->url;
- if(a->innrec!=NULL && p!=NULL && p->url>0)
- *a->innrec=ftell(p->ufd)/p->url+1;
- if(a->inblank && p!=NULL && p->ufmt)
- if(p->ublnk)
- b_char("ZERO",a->inblank,a->inblanklen);
- else b_char("NULL",a->inblank,a->inblanklen);
- return(0);
-}
diff --git a/lib/libI77/lio.h b/lib/libI77/lio.h
deleted file mode 100644
index 0123172..0000000
--- a/lib/libI77/lio.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* copy of ftypes from the compiler */
-/* variable types
- * numeric assumptions:
- * int < reals < complexes
- * TYDREAL-TYREAL = TYDCOMPLEX-TYCOMPLEX
- */
-
-/* 0-10 retain their old (pre LOGICAL*1, etc.) */
-/* values to allow mixing old and new objects. */
-
-#define TYUNKNOWN 0
-#define TYADDR 1
-#define TYSHORT 2
-#define TYLONG 3
-#define TYREAL 4
-#define TYDREAL 5
-#define TYCOMPLEX 6
-#define TYDCOMPLEX 7
-#define TYLOGICAL 8
-#define TYCHAR 9
-#define TYSUBR 10
-#define TYINT1 11
-#define TYLOGICAL1 12
-#define TYLOGICAL2 13
-#ifdef Allow_TYQUAD
-#undef TYQUAD
-#define TYQUAD 14
-#endif
-
-#define LINTW 24
-#define LINE 80
-#define LLOGW 2
-#ifdef Old_list_output
-#define LLOW 1.0
-#define LHIGH 1.e9
-#define LEFMT " %# .8E"
-#define LFFMT " %# .9g"
-#else
-#define LGFMT "%.9G"
-#endif
-/* LEFBL 20 should suffice; 24 overcomes a NeXT bug. */
-#define LEFBL 24
-
-typedef union
-{
- char flchar;
- short flshort;
- ftnint flint;
-#ifdef Allow_TYQUAD
- longint fllongint;
-#endif
- real flreal;
- doublereal fldouble;
-} flex;
-extern int f__scale;
-#ifdef KR_headers
-extern int (*f__lioproc)(), (*l_getc)(), (*l_ungetc)();
-extern int l_read(), l_write();
-#else
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern int (*f__lioproc)(ftnint*, char*, ftnlen, ftnint);
-extern int l_write(ftnint*, char*, ftnlen, ftnint);
-extern void x_wsne(cilist*);
-extern int c_le(cilist*), (*l_getc)(void), (*l_ungetc)(int,FILE*);
-extern int l_read(ftnint*,char*,ftnlen,ftnint);
-extern integer e_rsle(void), e_wsle(void), s_wsne(cilist*);
-extern int z_rnew(void);
-#ifdef __cplusplus
- }
-#endif
-#endif
-extern ftnint L_len;
diff --git a/lib/libI77/lread.c b/lib/libI77/lread.c
deleted file mode 100644
index 27f0269..0000000
--- a/lib/libI77/lread.c
+++ /dev/null
@@ -1,659 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-#include "lio.h"
-#include "ctype.h"
-#include "fp.h"
-
-extern char *f__fmtbuf;
-
-#ifdef Allow_TYQUAD
-static longint f__llx;
-static int quad_read;
-#endif
-
-#ifdef KR_headers
-extern double atof();
-extern char *malloc(), *realloc();
-int (*f__lioproc)(), (*l_getc)(), (*l_ungetc)();
-#else
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-int (*f__lioproc)(ftnint*, char*, ftnlen, ftnint), (*l_getc)(void),
- (*l_ungetc)(int,FILE*);
-#endif
-int l_eof;
-
-#define isblnk(x) (f__ltab[x+1]&B)
-#define issep(x) (f__ltab[x+1]&SX)
-#define isapos(x) (f__ltab[x+1]&AX)
-#define isexp(x) (f__ltab[x+1]&EX)
-#define issign(x) (f__ltab[x+1]&SG)
-#define iswhit(x) (f__ltab[x+1]&WH)
-#define SX 1
-#define B 2
-#define AX 4
-#define EX 8
-#define SG 16
-#define WH 32
-char f__ltab[128+1] = { /* offset one for EOF */
- 0,
- 0,0,AX,0,0,0,0,0,0,WH|B,SX|WH,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- SX|B|WH,0,AX,0,0,0,0,AX,0,0,0,SG,SX,SG,0,SX,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,EX,EX,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,
- AX,0,0,0,EX,EX,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
-};
-
-#ifdef ungetc
- static int
-#ifdef KR_headers
-un_getc(x,f__cf) int x; FILE *f__cf;
-#else
-un_getc(int x, FILE *f__cf)
-#endif
-{ return ungetc(x,f__cf); }
-#else
-#define un_getc ungetc
-#ifdef KR_headers
- extern int ungetc();
-#else
-extern int ungetc(int, FILE*); /* for systems with a buggy stdio.h */
-#endif
-#endif
-
-t_getc(Void)
-{ int ch;
- if(f__curunit->uend) return(EOF);
- if((ch=getc(f__cf))!=EOF) return(ch);
- if(feof(f__cf))
- f__curunit->uend = l_eof = 1;
- return(EOF);
-}
-integer e_rsle(Void)
-{
- int ch;
- if(f__curunit->uend) return(0);
- while((ch=t_getc())!='\n')
- if (ch == EOF) {
- if(feof(f__cf))
- f__curunit->uend = l_eof = 1;
- return EOF;
- }
- return(0);
-}
-
-flag f__lquit;
-int f__lcount,f__ltype,nml_read;
-char *f__lchar;
-double f__lx,f__ly;
-#define ERR(x) if(n=(x)) return(n)
-#define GETC(x) (x=(*l_getc)())
-#define Ungetc(x,y) (*l_ungetc)(x,y)
-
-#ifdef KR_headers
-l_R(poststar) int poststar;
-#else
-l_R(int poststar)
-#endif
-{
- char s[FMAX+EXPMAXDIGS+4];
- register int ch;
- register char *sp, *spe, *sp1;
- long e, exp;
- int havenum, havestar, se;
-
- if (!poststar) {
- if (f__lcount > 0)
- return(0);
- f__lcount = 1;
- }
-#ifdef Allow_TYQUAD
- f__llx = 0;
-#endif
- f__ltype = 0;
- exp = 0;
- havestar = 0;
-retry:
- sp1 = sp = s;
- spe = sp + FMAX;
- havenum = 0;
-
- switch(GETC(ch)) {
- case '-': *sp++ = ch; sp1++; spe++;
- case '+':
- GETC(ch);
- }
- while(ch == '0') {
- ++havenum;
- GETC(ch);
- }
- while(isdigit(ch)) {
- if (sp < spe) *sp++ = ch;
- else ++exp;
- GETC(ch);
- }
- if (ch == '*' && !poststar) {
- if (sp == sp1 || exp || *s == '-') {
- errfl(f__elist->cierr,112,"bad repetition count");
- }
- poststar = havestar = 1;
- *sp = 0;
- f__lcount = atoi(s);
- goto retry;
- }
- if (ch == '.') {
- GETC(ch);
- if (sp == sp1)
- while(ch == '0') {
- ++havenum;
- --exp;
- GETC(ch);
- }
- while(isdigit(ch)) {
- if (sp < spe)
- { *sp++ = ch; --exp; }
- GETC(ch);
- }
- }
- havenum += sp - sp1;
- se = 0;
- if (issign(ch))
- goto signonly;
- if (havenum && isexp(ch)) {
- GETC(ch);
- if (issign(ch)) {
-signonly:
- if (ch == '-') se = 1;
- GETC(ch);
- }
- if (!isdigit(ch)) {
-bad:
- errfl(f__elist->cierr,112,"exponent field");
- }
-
- e = ch - '0';
- while(isdigit(GETC(ch))) {
- e = 10*e + ch - '0';
- if (e > EXPMAX)
- goto bad;
- }
- if (se)
- exp -= e;
- else
- exp += e;
- }
- (void) Ungetc(ch, f__cf);
- if (sp > sp1) {
- ++havenum;
- while(*--sp == '0')
- ++exp;
- if (exp)
- sprintf(sp+1, "e%ld", exp);
- else
- sp[1] = 0;
- f__lx = atof(s);
-#ifdef Allow_TYQUAD
- if (quad_read && (se = sp - sp1 + exp) > 14 && se < 20) {
- /* Assuming 64-bit longint and 32-bit long. */
- if (exp < 0)
- sp += exp;
- if (sp1 <= sp) {
- f__llx = *sp1 - '0';
- while(++sp1 <= sp)
- f__llx = 10*f__llx + (*sp1 - '0');
- }
- while(--exp >= 0)
- f__llx *= 10;
- if (*s == '-')
- f__llx = -f__llx;
- }
-#endif
- }
- else
- f__lx = 0.;
- if (havenum)
- f__ltype = TYLONG;
- else
- switch(ch) {
- case ',':
- case '/':
- break;
- default:
- if (havestar && ( ch == ' '
- ||ch == '\t'
- ||ch == '\n'))
- break;
- if (nml_read > 1) {
- f__lquit = 2;
- return 0;
- }
- errfl(f__elist->cierr,112,"invalid number");
- }
- return 0;
- }
-
- static int
-#ifdef KR_headers
-rd_count(ch) register int ch;
-#else
-rd_count(register int ch)
-#endif
-{
- if (ch < '0' || ch > '9')
- return 1;
- f__lcount = ch - '0';
- while(GETC(ch) >= '0' && ch <= '9')
- f__lcount = 10*f__lcount + ch - '0';
- Ungetc(ch,f__cf);
- return f__lcount <= 0;
- }
-
-l_C(Void)
-{ int ch, nml_save;
- double lz;
- if(f__lcount>0) return(0);
- f__ltype=0;
- GETC(ch);
- if(ch!='(')
- {
- if (nml_read > 1 && (ch < '0' || ch > '9')) {
- Ungetc(ch,f__cf);
- f__lquit = 2;
- return 0;
- }
- if (rd_count(ch))
- if(!f__cf || !feof(f__cf))
- errfl(f__elist->cierr,112,"complex format");
- else
- err(f__elist->cierr,(EOF),"lread");
- if(GETC(ch)!='*')
- {
- if(!f__cf || !feof(f__cf))
- errfl(f__elist->cierr,112,"no star");
- else
- err(f__elist->cierr,(EOF),"lread");
- }
- if(GETC(ch)!='(')
- { Ungetc(ch,f__cf);
- return(0);
- }
- }
- else
- f__lcount = 1;
- while(iswhit(GETC(ch)));
- Ungetc(ch,f__cf);
- nml_save = nml_read;
- nml_read = 0;
- if (ch = l_R(1))
- return ch;
- if (!f__ltype)
- errfl(f__elist->cierr,112,"no real part");
- lz = f__lx;
- while(iswhit(GETC(ch)));
- if(ch!=',')
- { (void) Ungetc(ch,f__cf);
- errfl(f__elist->cierr,112,"no comma");
- }
- while(iswhit(GETC(ch)));
- (void) Ungetc(ch,f__cf);
- if (ch = l_R(1))
- return ch;
- if (!f__ltype)
- errfl(f__elist->cierr,112,"no imaginary part");
- while(iswhit(GETC(ch)));
- if(ch!=')') errfl(f__elist->cierr,112,"no )");
- f__ly = f__lx;
- f__lx = lz;
-#ifdef Allow_TYQUAD
- f__llx = 0;
-#endif
- nml_read = nml_save;
- return(0);
-}
-l_L(Void)
-{
- int ch;
- if(f__lcount>0) return(0);
- f__lcount = 1;
- f__ltype=0;
- GETC(ch);
- if(isdigit(ch))
- {
- rd_count(ch);
- if(GETC(ch)!='*')
- if(!f__cf || !feof(f__cf))
- errfl(f__elist->cierr,112,"no star");
- else
- err(f__elist->cierr,(EOF),"lread");
- GETC(ch);
- }
- if(ch == '.') GETC(ch);
- switch(ch)
- {
- case 't':
- case 'T':
- f__lx=1;
- break;
- case 'f':
- case 'F':
- f__lx=0;
- break;
- default:
- if(isblnk(ch) || issep(ch) || ch==EOF)
- { (void) Ungetc(ch,f__cf);
- return(0);
- }
- if (nml_read > 1) {
- Ungetc(ch,f__cf);
- f__lquit = 2;
- return 0;
- }
- errfl(f__elist->cierr,112,"logical");
- }
- f__ltype=TYLONG;
- while(!issep(GETC(ch)) && ch!=EOF);
- (void) Ungetc(ch, f__cf);
- return(0);
-}
-#define BUFSIZE 128
-l_CHAR(Void)
-{ int ch,size,i;
- static char rafail[] = "realloc failure";
- char quote,*p;
- if(f__lcount>0) return(0);
- f__ltype=0;
- if(f__lchar!=NULL) free(f__lchar);
- size=BUFSIZE;
- p=f__lchar = (char *)malloc((unsigned int)size);
- if(f__lchar == NULL)
- errfl(f__elist->cierr,113,"no space");
-
- GETC(ch);
- if(isdigit(ch)) {
- /* allow Fortran 8x-style unquoted string... */
- /* either find a repetition count or the string */
- f__lcount = ch - '0';
- *p++ = ch;
- for(i = 1;;) {
- switch(GETC(ch)) {
- case '*':
- if (f__lcount == 0) {
- f__lcount = 1;
- goto noquote;
- }
- p = f__lchar;
- goto have_lcount;
- case ',':
- case ' ':
- case '\t':
- case '\n':
- case '/':
- Ungetc(ch,f__cf);
- /* no break */
- case EOF:
- f__lcount = 1;
- f__ltype = TYCHAR;
- return *p = 0;
- }
- if (!isdigit(ch)) {
- f__lcount = 1;
- goto noquote;
- }
- *p++ = ch;
- f__lcount = 10*f__lcount + ch - '0';
- if (++i == size) {
- f__lchar = (char *)realloc(f__lchar,
- (unsigned int)(size += BUFSIZE));
- if(f__lchar == NULL)
- errfl(f__elist->cierr,113,rafail);
- p = f__lchar + i;
- }
- }
- }
- else (void) Ungetc(ch,f__cf);
- have_lcount:
- if(GETC(ch)=='\'' || ch=='"') quote=ch;
- else if(isblnk(ch) || (issep(ch) && ch != '\n') || ch==EOF)
- { (void) Ungetc(ch,f__cf);
- return(0);
- }
- else {
- /* Fortran 8x-style unquoted string */
- *p++ = ch;
- for(i = 1;;) {
- switch(GETC(ch)) {
- case ',':
- case ' ':
- case '\t':
- case '\n':
- case '/':
- Ungetc(ch,f__cf);
- /* no break */
- case EOF:
- f__ltype = TYCHAR;
- return *p = 0;
- }
- noquote:
- *p++ = ch;
- if (++i == size) {
- f__lchar = (char *)realloc(f__lchar,
- (unsigned int)(size += BUFSIZE));
- if(f__lchar == NULL)
- errfl(f__elist->cierr,113,rafail);
- p = f__lchar + i;
- }
- }
- }
- f__ltype=TYCHAR;
- for(i=0;;)
- { while(GETC(ch)!=quote && ch!='\n'
- && ch!=EOF && ++i<size) *p++ = ch;
- if(i==size)
- {
- newone:
- f__lchar= (char *)realloc(f__lchar,
- (unsigned int)(size += BUFSIZE));
- if(f__lchar == NULL)
- errfl(f__elist->cierr,113,rafail);
- p=f__lchar+i-1;
- *p++ = ch;
- }
- else if(ch==EOF) return(EOF);
- else if(ch=='\n')
- { if(*(p-1) != '\\') continue;
- i--;
- p--;
- if(++i<size) *p++ = ch;
- else goto newone;
- }
- else if(GETC(ch)==quote)
- { if(++i<size) *p++ = ch;
- else goto newone;
- }
- else
- { (void) Ungetc(ch,f__cf);
- *p = 0;
- return(0);
- }
- }
-}
-#ifdef KR_headers
-c_le(a) cilist *a;
-#else
-c_le(cilist *a)
-#endif
-{
- if(!f__init)
- f_init();
- f__fmtbuf="list io";
- if(a->ciunit>=MXUNIT || a->ciunit<0)
- err(a->cierr,101,"stler");
- f__scale=f__recpos=0;
- f__elist=a;
- f__curunit = &f__units[a->ciunit];
- if(f__curunit->ufd==NULL && fk_open(SEQ,FMT,a->ciunit))
- err(a->cierr,102,"lio");
- f__cf=f__curunit->ufd;
- if(!f__curunit->ufmt) err(a->cierr,103,"lio")
- return(0);
-}
-#ifdef KR_headers
-l_read(number,ptr,len,type) ftnint *number,type; char *ptr; ftnlen len;
-#else
-l_read(ftnint *number, char *ptr, ftnlen len, ftnint type)
-#endif
-{
-#define Ptr ((flex *)ptr)
- int i,n,ch;
- doublereal *yy;
- real *xx;
- for(i=0;i<*number;i++)
- {
- if(f__lquit) return(0);
- if(l_eof)
- err(f__elist->ciend, EOF, "list in")
- if(f__lcount == 0) {
- f__ltype = 0;
- for(;;) {
- GETC(ch);
- switch(ch) {
- case EOF:
- err(f__elist->ciend,(EOF),"list in")
- case ' ':
- case '\t':
- case '\n':
- continue;
- case '/':
- f__lquit = 1;
- goto loopend;
- case ',':
- f__lcount = 1;
- goto loopend;
- default:
- (void) Ungetc(ch, f__cf);
- goto rddata;
- }
- }
- }
- rddata:
- switch((int)type)
- {
- case TYINT1:
- case TYSHORT:
- case TYLONG:
- case TYREAL:
- case TYDREAL:
- ERR(l_R(0));
- break;
-#ifdef TYQUAD
- case TYQUAD:
- quad_read = 1;
- n = l_R(0);
- quad_read = 0;
- if (n)
- return n;
- break;
-#endif
- case TYCOMPLEX:
- case TYDCOMPLEX:
- ERR(l_C());
- break;
- case TYLOGICAL1:
- case TYLOGICAL2:
- case TYLOGICAL:
- ERR(l_L());
- break;
- case TYCHAR:
- ERR(l_CHAR());
- break;
- }
- while (GETC(ch) == ' ' || ch == '\t');
- if (ch != ',' || f__lcount > 1)
- Ungetc(ch,f__cf);
- loopend:
- if(f__lquit) return(0);
- if(f__cf && ferror(f__cf)) {
- clearerr(f__cf);
- errfl(f__elist->cierr,errno,"list in");
- }
- if(f__ltype==0) goto bump;
- switch((int)type)
- {
- case TYINT1:
- case TYLOGICAL1:
- Ptr->flchar = (char)f__lx;
- break;
- case TYLOGICAL2:
- case TYSHORT:
- Ptr->flshort = (short)f__lx;
- break;
- case TYLOGICAL:
- case TYLONG:
- Ptr->flint=f__lx;
- break;
-#ifdef Allow_TYQUAD
- case TYQUAD:
- if (!(Ptr->fllongint = f__llx))
- Ptr->fllongint = f__lx;
- break;
-#endif
- case TYREAL:
- Ptr->flreal=f__lx;
- break;
- case TYDREAL:
- Ptr->fldouble=f__lx;
- break;
- case TYCOMPLEX:
- xx=(real *)ptr;
- *xx++ = f__lx;
- *xx = f__ly;
- break;
- case TYDCOMPLEX:
- yy=(doublereal *)ptr;
- *yy++ = f__lx;
- *yy = f__ly;
- break;
- case TYCHAR:
- b_char(f__lchar,ptr,len);
- break;
- }
- bump:
- if(f__lcount>0) f__lcount--;
- ptr += len;
- if (nml_read)
- nml_read++;
- }
- return(0);
-#undef Ptr
-}
-#ifdef KR_headers
-integer s_rsle(a) cilist *a;
-#else
-integer s_rsle(cilist *a)
-#endif
-{
- int n;
-
- if(n=c_le(a)) return(n);
- f__reading=1;
- f__external=1;
- f__formatted=1;
- f__lioproc = l_read;
- f__lquit = 0;
- f__lcount = 0;
- l_eof = 0;
- if(f__curunit->uwrt && f__nowreading(f__curunit))
- err(a->cierr,errno,"read start");
- if(f__curunit->uend)
- err(f__elist->ciend,(EOF),"read start");
- l_getc = t_getc;
- l_ungetc = un_getc;
- f__doend = xrd_SL;
- return(0);
-}
diff --git a/lib/libI77/lwrite.c b/lib/libI77/lwrite.c
deleted file mode 100644
index 5da7dfb..0000000
--- a/lib/libI77/lwrite.c
+++ /dev/null
@@ -1,310 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-#include "lio.h"
-
-ftnint L_len;
-int f__Aquote;
-
- static VOID
-donewrec(Void)
-{
- if (f__recpos)
- (*f__donewrec)();
- }
-
-#ifdef KR_headers
-t_putc(c)
-#else
-t_putc(int c)
-#endif
-{
- f__recpos++;
- putc(c,f__cf);
- return(0);
-}
- static VOID
-#ifdef KR_headers
-lwrt_I(n) longint n;
-#else
-lwrt_I(longint n)
-#endif
-{
- char *p;
- int ndigit, sign;
-
- p = f__icvt(n, &ndigit, &sign, 10);
- if(f__recpos + ndigit >= L_len)
- donewrec();
- PUT(' ');
- if (sign)
- PUT('-');
- while(*p)
- PUT(*p++);
-}
- static VOID
-#ifdef KR_headers
-lwrt_L(n, len) ftnint n; ftnlen len;
-#else
-lwrt_L(ftnint n, ftnlen len)
-#endif
-{
- if(f__recpos+LLOGW>=L_len)
- donewrec();
- wrt_L((Uint *)&n,LLOGW, len);
-}
- static VOID
-#ifdef KR_headers
-lwrt_A(p,len) char *p; ftnlen len;
-#else
-lwrt_A(char *p, ftnlen len)
-#endif
-{
- int a;
- char *p1, *pe;
-
- a = 0;
- pe = p + len;
- if (f__Aquote) {
- a = 3;
- if (len > 1 && p[len-1] == ' ') {
- while(--len > 1 && p[len-1] == ' ');
- pe = p + len;
- }
- p1 = p;
- while(p1 < pe)
- if (*p1++ == '\'')
- a++;
- }
- if(f__recpos+len+a >= L_len)
- donewrec();
- if (a
-#ifndef OMIT_BLANK_CC
- || !f__recpos
-#endif
- )
- PUT(' ');
- if (a) {
- PUT('\'');
- while(p < pe) {
- if (*p == '\'')
- PUT('\'');
- PUT(*p++);
- }
- PUT('\'');
- }
- else
- while(p < pe)
- PUT(*p++);
-}
-
- static int
-#ifdef KR_headers
-l_g(buf, n) char *buf; double n;
-#else
-l_g(char *buf, double n)
-#endif
-{
-#ifdef Old_list_output
- doublereal absn;
- char *fmt;
-
- absn = n;
- if (absn < 0)
- absn = -absn;
- fmt = LLOW <= absn && absn < LHIGH ? LFFMT : LEFMT;
-#ifdef USE_STRLEN
- sprintf(buf, fmt, n);
- return strlen(buf);
-#else
- return sprintf(buf, fmt, n);
-#endif
-
-#else
- register char *b, c, c1;
-
- b = buf;
- *b++ = ' ';
- if (n < 0) {
- *b++ = '-';
- n = -n;
- }
- else
- *b++ = ' ';
- if (n == 0) {
- *b++ = '0';
- *b++ = '.';
- *b = 0;
- goto f__ret;
- }
- sprintf(b, LGFMT, n);
- switch(*b) {
-#ifndef WANT_LEAD_0
- case '0':
- while(b[0] = b[1])
- b++;
- break;
-#endif
- case 'i':
- case 'I':
- /* Infinity */
- case 'n':
- case 'N':
- /* NaN */
- while(*++b);
- break;
-
- default:
- /* Fortran 77 insists on having a decimal point... */
- for(;; b++)
- switch(*b) {
- case 0:
- *b++ = '.';
- *b = 0;
- goto f__ret;
- case '.':
- while(*++b);
- goto f__ret;
- case 'E':
- for(c1 = '.', c = 'E'; *b = c1;
- c1 = c, c = *++b);
- goto f__ret;
- }
- }
- f__ret:
- return b - buf;
-#endif
- }
-
- static VOID
-#ifdef KR_headers
-l_put(s) register char *s;
-#else
-l_put(register char *s)
-#endif
-{
-#ifdef KR_headers
- register int c, (*pn)() = f__putn;
-#else
- register int c, (*pn)(int) = f__putn;
-#endif
- while(c = *s++)
- (*pn)(c);
- }
-
- static VOID
-#ifdef KR_headers
-lwrt_F(n) double n;
-#else
-lwrt_F(double n)
-#endif
-{
- char buf[LEFBL];
-
- if(f__recpos + l_g(buf,n) >= L_len)
- donewrec();
- l_put(buf);
-}
- static VOID
-#ifdef KR_headers
-lwrt_C(a,b) double a,b;
-#else
-lwrt_C(double a, double b)
-#endif
-{
- char *ba, *bb, bufa[LEFBL], bufb[LEFBL];
- int al, bl;
-
- al = l_g(bufa, a);
- for(ba = bufa; *ba == ' '; ba++)
- --al;
- bl = l_g(bufb, b) + 1; /* intentionally high by 1 */
- for(bb = bufb; *bb == ' '; bb++)
- --bl;
- if(f__recpos + al + bl + 3 >= L_len)
- donewrec();
-#ifdef OMIT_BLANK_CC
- else
-#endif
- PUT(' ');
- PUT('(');
- l_put(ba);
- PUT(',');
- if (f__recpos + bl >= L_len) {
- (*f__donewrec)();
-#ifndef OMIT_BLANK_CC
- PUT(' ');
-#endif
- }
- l_put(bb);
- PUT(')');
-}
-#ifdef KR_headers
-l_write(number,ptr,len,type) ftnint *number,type; char *ptr; ftnlen len;
-#else
-l_write(ftnint *number, char *ptr, ftnlen len, ftnint type)
-#endif
-{
-#define Ptr ((flex *)ptr)
- int i;
- longint x;
- double y,z;
- real *xx;
- doublereal *yy;
- for(i=0;i< *number; i++)
- {
- switch((int)type)
- {
- default: f__fatal(204,"unknown type in lio");
- case TYINT1:
- x = Ptr->flchar;
- goto xint;
- case TYSHORT:
- x=Ptr->flshort;
- goto xint;
-#ifdef Allow_TYQUAD
- case TYQUAD:
- x = Ptr->fllongint;
- goto xint;
-#endif
- case TYLONG:
- x=Ptr->flint;
- xint: lwrt_I(x);
- break;
- case TYREAL:
- y=Ptr->flreal;
- goto xfloat;
- case TYDREAL:
- y=Ptr->fldouble;
- xfloat: lwrt_F(y);
- break;
- case TYCOMPLEX:
- xx= &Ptr->flreal;
- y = *xx++;
- z = *xx;
- goto xcomplex;
- case TYDCOMPLEX:
- yy = &Ptr->fldouble;
- y= *yy++;
- z = *yy;
- xcomplex:
- lwrt_C(y,z);
- break;
- case TYLOGICAL1:
- x = Ptr->flchar;
- goto xlog;
- case TYLOGICAL2:
- x = Ptr->flshort;
- goto xlog;
- case TYLOGICAL:
- x = Ptr->flint;
- xlog: lwrt_L(Ptr->flint, len);
- break;
- case TYCHAR:
- lwrt_A(ptr,len);
- break;
- }
- ptr += len;
- }
- return(0);
-}
diff --git a/lib/libI77/open.c b/lib/libI77/open.c
deleted file mode 100644
index 75386b9..0000000
--- a/lib/libI77/open.c
+++ /dev/null
@@ -1,239 +0,0 @@
-#ifndef NON_UNIX_STDIO
-#include "sys/types.h"
-#include "sys/stat.h"
-#endif
-#include "f2c.h"
-#include "fio.h"
-#include "string.h"
-#include "rawio.h"
-
-#ifdef KR_headers
-extern char *malloc(), *mktemp();
-extern integer f_clos();
-#else
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-extern int f__canseek(FILE*);
-extern integer f_clos(cllist*);
-#endif
-
-#ifdef NON_ANSI_RW_MODES
-char *f__r_mode[2] = {"r", "r"};
-char *f__w_mode[4] = {"w", "w", "r+w", "r+w"};
-#else
-char *f__r_mode[2] = {"rb", "r"};
-char *f__w_mode[4] = {"wb", "w", "r+b", "r+"};
-#endif
-
-#ifdef KR_headers
-f__isdev(s) char *s;
-#else
-f__isdev(char *s)
-#endif
-{
-#ifdef NON_UNIX_STDIO
- int i, j;
-
- i = open(s,O_RDONLY);
- if (i == -1)
- return 0;
- j = isatty(i);
- close(i);
- return j;
-#else
- struct stat x;
-
- if(stat(s, &x) == -1) return(0);
-#ifdef S_IFMT
- switch(x.st_mode&S_IFMT) {
- case S_IFREG:
- case S_IFDIR:
- return(0);
- }
-#else
-#ifdef S_ISREG
- /* POSIX version */
- if(S_ISREG(x.st_mode) || S_ISDIR(x.st_mode))
- return(0);
- else
-#else
- Help! How does stat work on this system?
-#endif
-#endif
- return(1);
-#endif
-}
-#ifdef KR_headers
-integer f_open(a) olist *a;
-#else
-integer f_open(olist *a)
-#endif
-{ unit *b;
- integer rv;
- char buf[256], *s;
- cllist x;
- int ufmt;
-#ifdef NON_UNIX_STDIO
- FILE *tf;
-#else
- int n;
- struct stat stb;
-#endif
- if(a->ounit>=MXUNIT || a->ounit<0)
- err(a->oerr,101,"open")
- if (!f__init)
- f_init();
- f__curunit = b = &f__units[a->ounit];
- if(b->ufd) {
- if(a->ofnm==0)
- {
- same: if (a->oblnk)
- b->ublnk = *a->oblnk == 'z' || *a->oblnk == 'Z';
- return(0);
- }
-#ifdef NON_UNIX_STDIO
- if (b->ufnm
- && strlen(b->ufnm) == a->ofnmlen
- && !strncmp(b->ufnm, b->ufnm, (unsigned)a->ofnmlen))
- goto same;
-#else
- g_char(a->ofnm,a->ofnmlen,buf);
- if (f__inode(buf,&n) == b->uinode && n == b->udev)
- goto same;
-#endif
- x.cunit=a->ounit;
- x.csta=0;
- x.cerr=a->oerr;
- if ((rv = f_clos(&x)) != 0)
- return rv;
- }
- b->url = (int)a->orl;
- b->ublnk = a->oblnk && (*a->oblnk == 'z' || *a->oblnk == 'Z');
- if(a->ofm==0)
- { if(b->url>0) b->ufmt=0;
- else b->ufmt=1;
- }
- else if(*a->ofm=='f' || *a->ofm == 'F') b->ufmt=1;
- else b->ufmt=0;
- ufmt = b->ufmt;
-#ifdef url_Adjust
- if (b->url && !ufmt)
- url_Adjust(b->url);
-#endif
- if (a->ofnm) {
- g_char(a->ofnm,a->ofnmlen,buf);
- if (!buf[0])
- err(a->oerr,107,"open")
- }
- else
- sprintf(buf, "fort.%ld", a->ounit);
- b->uscrtch = 0;
- switch(a->osta ? *a->osta : 'u')
- {
- case 'o':
- case 'O':
-#ifdef NON_UNIX_STDIO
- if(access(buf,0))
-#else
- if(stat(buf,&stb))
-#endif
- err(a->oerr,errno,"open")
- break;
- case 's':
- case 'S':
- b->uscrtch=1;
-#ifdef _POSIX_SOURCE
- tmpnam(buf);
-#else
- (void) strcpy(buf,"tmp.FXXXXXX");
- (void) mktemp(buf);
-#endif
- goto replace;
- case 'n':
- case 'N':
-#ifdef NON_UNIX_STDIO
- if(!access(buf,0))
-#else
- if(!stat(buf,&stb))
-#endif
- err(a->oerr,128,"open")
- /* no break */
- case 'r': /* Fortran 90 replace option */
- case 'R':
- replace:
-#ifdef NON_UNIX_STDIO
- if (tf = fopen(buf,f__w_mode[0]))
- fclose(tf);
-#else
- (void) close(creat(buf, 0666));
-#endif
- }
-
- b->ufnm=(char *) malloc((unsigned int)(strlen(buf)+1));
- if(b->ufnm==NULL) err(a->oerr,113,"no space");
- (void) strcpy(b->ufnm,buf);
- b->uend=0;
- b->uwrt = 0;
-#ifdef NON_UNIX_STDIO
- if ((s = a->oacc) && (*s == 'd' || *s == 'D'))
- ufmt = 0;
-#endif
- if(f__isdev(buf))
- { b->ufd = fopen(buf,f__r_mode[ufmt]);
- if(b->ufd==NULL) err(a->oerr,errno,buf)
- }
- else {
- if(!(b->ufd = fopen(buf, f__r_mode[ufmt]))) {
-#ifdef NON_UNIX_STDIO
- if (b->ufd = fopen(buf, f__w_mode[ufmt|2]))
- b->uwrt = 2;
- else if (b->ufd = fopen(buf, f__w_mode[ufmt]))
- b->uwrt = 1;
- else
-#else
- if ((n = open(buf,O_WRONLY)) >= 0)
- b->uwrt = 2;
- else {
- n = creat(buf, 0666);
- b->uwrt = 1;
- }
- if (n < 0
- || (b->ufd = fdopen(n, f__w_mode[ufmt])) == NULL)
-#endif
- err(a->oerr, errno, "open");
- }
- }
- b->useek=f__canseek(b->ufd);
-#ifndef NON_UNIX_STDIO
- if((b->uinode=f__inode(buf,&b->udev))==-1)
- err(a->oerr,108,"open")
-#endif
- if(b->useek)
- if (a->orl)
- rewind(b->ufd);
- else if ((s = a->oacc) && (*s == 'a' || *s == 'A')
- && fseek(b->ufd, 0L, SEEK_END))
- err(a->oerr,129,"open");
- return(0);
-}
-#ifdef KR_headers
-fk_open(seq,fmt,n) ftnint n;
-#else
-fk_open(int seq, int fmt, ftnint n)
-#endif
-{ char nbuf[10];
- olist a;
- (void) sprintf(nbuf,"fort.%ld",n);
- a.oerr=1;
- a.ounit=n;
- a.ofnm=nbuf;
- a.ofnmlen=strlen(nbuf);
- a.osta=NULL;
- a.oacc= seq==SEQ?"s":"d";
- a.ofm = fmt==FMT?"f":"u";
- a.orl = seq==DIR?1:0;
- a.oblnk=NULL;
- return(f_open(&a));
-}
diff --git a/lib/libI77/rawio.h b/lib/libI77/rawio.h
deleted file mode 100644
index 4cbd847..0000000
--- a/lib/libI77/rawio.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifdef KR_headers
-extern FILE *fdopen();
-#else
-#ifdef MSDOS
-#include "io.h"
-#ifndef WATCOM
-#define close _close
-#define creat _creat
-#define open _open
-#define read _read
-#define write _write
-#endif /*WATCOM*/
-#endif /*MSDOS*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifndef MSDOS
-#ifdef OPEN_DECL
-extern int creat(const char*,int), open(const char*,int);
-#endif
-extern int close(int);
-extern int read(int,void*,size_t), write(int,void*,size_t);
-extern int unlink(const char*);
-#ifndef _POSIX_SOURCE
-#ifndef NON_UNIX_STDIO
-extern FILE *fdopen(int, const char*);
-#endif
-#endif
-#endif /*KR_HEADERS*/
-
-extern char *mktemp(char*);
-
-#ifdef __cplusplus
- }
-#endif
-#endif
-
-#include "fcntl.h"
-
-#ifndef O_WRONLY
-#define O_RDONLY 0
-#define O_WRONLY 1
-#endif
diff --git a/lib/libI77/rdfmt.c b/lib/libI77/rdfmt.c
deleted file mode 100644
index 03b325e..0000000
--- a/lib/libI77/rdfmt.c
+++ /dev/null
@@ -1,475 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-#include "fp.h"
-#include "ctype.h"
-
-extern int f__cursor;
-#ifdef KR_headers
-extern double atof();
-#else
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-#endif
-
- static int
-#ifdef KR_headers
-rd_Z(n,w,len) Uint *n; ftnlen len;
-#else
-rd_Z(Uint *n, int w, ftnlen len)
-#endif
-{
- long x[9];
- char *s, *s0, *s1, *se, *t;
- int ch, i, w1, w2;
- static char hex[256];
- static int one = 1;
- int bad = 0;
-
- if (!hex['0']) {
- s = "0123456789";
- while(ch = *s++)
- hex[ch] = ch - '0' + 1;
- s = "ABCDEF";
- while(ch = *s++)
- hex[ch] = hex[ch + 'a' - 'A'] = ch - 'A' + 11;
- }
- s = s0 = (char *)x;
- s1 = (char *)&x[4];
- se = (char *)&x[8];
- if (len > 4*sizeof(long))
- return errno = 117;
- while (w) {
- GET(ch);
- if (ch==',' || ch=='\n')
- break;
- w--;
- if (ch > ' ') {
- if (!hex[ch & 0xff])
- bad++;
- *s++ = ch;
- if (s == se) {
- /* discard excess characters */
- for(t = s0, s = s1; t < s1;)
- *t++ = *s++;
- s = s1;
- }
- }
- }
- if (bad)
- return errno = 115;
- w = (int)len;
- w1 = s - s0;
- w2 = w1+1 >> 1;
- t = (char *)n;
- if (*(char *)&one) {
- /* little endian */
- t += w - 1;
- i = -1;
- }
- else
- i = 1;
- for(; w > w2; t += i, --w)
- *t = 0;
- if (!w)
- return 0;
- if (w < w2)
- s0 = s - (w << 1);
- else if (w1 & 1) {
- *t = hex[*s0++ & 0xff] - 1;
- if (!--w)
- return 0;
- t += i;
- }
- do {
- *t = hex[*s0 & 0xff]-1 << 4 | hex[s0[1] & 0xff]-1;
- t += i;
- s0 += 2;
- }
- while(--w);
- return 0;
- }
-
- static int
-#ifdef KR_headers
-rd_I(n,w,len, base) Uint *n; int w; ftnlen len; register int base;
-#else
-rd_I(Uint *n, int w, ftnlen len, register int base)
-#endif
-{ longint x;
- int sign,ch;
- char s[84], *ps;
- ps=s; x=0;
- while (w)
- {
- GET(ch);
- if (ch==',' || ch=='\n') break;
- *ps=ch; ps++; w--;
- }
- *ps='\0';
- ps=s;
- while (*ps==' ') ps++;
- if (*ps=='-') { sign=1; ps++; }
- else { sign=0; if (*ps=='+') ps++; }
-loop: while (*ps>='0' && *ps<='9') { x=x*base+(*ps-'0'); ps++; }
- if (*ps==' ') {if (f__cblank) x *= base; ps++; goto loop;}
- if(sign) x = -x;
- if(len==sizeof(integer)) n->il=x;
- else if(len == sizeof(char)) n->ic = (char)x;
-#ifdef Allow_TYQUAD
- else if (len == sizeof(longint)) n->ili = x;
-#endif
- else n->is = (short)x;
- if (*ps) return(errno=115); else return(0);
-}
- static int
-#ifdef KR_headers
-rd_L(n,w,len) ftnint *n; ftnlen len;
-#else
-rd_L(ftnint *n, int w, ftnlen len)
-#endif
-{ int ch, lv;
- char s[84], *ps;
- ps=s;
- while (w) {
- GET(ch);
- if (ch==','||ch=='\n') break;
- *ps=ch;
- ps++; w--;
- }
- *ps='\0';
- ps=s; while (*ps==' ') ps++;
- if (*ps=='.') ps++;
- if (*ps=='t' || *ps == 'T')
- lv = 1;
- else if (*ps == 'f' || *ps == 'F')
- lv = 0;
- else return(errno=116);
- switch(len) {
- case sizeof(char): *(char *)n = (char)lv; break;
- case sizeof(short): *(short *)n = (short)lv; break;
- default: *n = lv;
- }
- return 0;
-}
-
- static int
-#ifdef KR_headers
-rd_F(p, w, d, len) ufloat *p; ftnlen len;
-#else
-rd_F(ufloat *p, int w, int d, ftnlen len)
-#endif
-{
- char s[FMAX+EXPMAXDIGS+4];
- register int ch;
- register char *sp, *spe, *sp1;
- double x;
- int scale1, se;
- long e, exp;
-
- sp1 = sp = s;
- spe = sp + FMAX;
- exp = -d;
- x = 0.;
-
- do {
- GET(ch);
- w--;
- } while (ch == ' ' && w);
- switch(ch) {
- case '-': *sp++ = ch; sp1++; spe++;
- case '+':
- if (!w) goto zero;
- --w;
- GET(ch);
- }
- while(ch == ' ') {
-blankdrop:
- if (!w--) goto zero; GET(ch); }
- while(ch == '0')
- { if (!w--) goto zero; GET(ch); }
- if (ch == ' ' && f__cblank)
- goto blankdrop;
- scale1 = f__scale;
- while(isdigit(ch)) {
-digloop1:
- if (sp < spe) *sp++ = ch;
- else ++exp;
-digloop1e:
- if (!w--) goto done;
- GET(ch);
- }
- if (ch == ' ') {
- if (f__cblank)
- { ch = '0'; goto digloop1; }
- goto digloop1e;
- }
- if (ch == '.') {
- exp += d;
- if (!w--) goto done;
- GET(ch);
- if (sp == sp1) { /* no digits yet */
- while(ch == '0') {
-skip01:
- --exp;
-skip0:
- if (!w--) goto done;
- GET(ch);
- }
- if (ch == ' ') {
- if (f__cblank) goto skip01;
- goto skip0;
- }
- }
- while(isdigit(ch)) {
-digloop2:
- if (sp < spe)
- { *sp++ = ch; --exp; }
-digloop2e:
- if (!w--) goto done;
- GET(ch);
- }
- if (ch == ' ') {
- if (f__cblank)
- { ch = '0'; goto digloop2; }
- goto digloop2e;
- }
- }
- switch(ch) {
- default:
- break;
- case '-': se = 1; goto signonly;
- case '+': se = 0; goto signonly;
- case 'e':
- case 'E':
- case 'd':
- case 'D':
- if (!w--)
- goto bad;
- GET(ch);
- while(ch == ' ') {
- if (!w--)
- goto bad;
- GET(ch);
- }
- se = 0;
- switch(ch) {
- case '-': se = 1;
- case '+':
-signonly:
- if (!w--)
- goto bad;
- GET(ch);
- }
- while(ch == ' ') {
- if (!w--)
- goto bad;
- GET(ch);
- }
- if (!isdigit(ch))
- goto bad;
-
- e = ch - '0';
- for(;;) {
- if (!w--)
- { ch = '\n'; break; }
- GET(ch);
- if (!isdigit(ch)) {
- if (ch == ' ') {
- if (f__cblank)
- ch = '0';
- else continue;
- }
- else
- break;
- }
- e = 10*e + ch - '0';
- if (e > EXPMAX && sp > sp1)
- goto bad;
- }
- if (se)
- exp -= e;
- else
- exp += e;
- scale1 = 0;
- }
- switch(ch) {
- case '\n':
- case ',':
- break;
- default:
-bad:
- return (errno = 115);
- }
-done:
- if (sp > sp1) {
- while(*--sp == '0')
- ++exp;
- if (exp -= scale1)
- sprintf(sp+1, "e%ld", exp);
- else
- sp[1] = 0;
- x = atof(s);
- }
-zero:
- if (len == sizeof(real))
- p->pf = x;
- else
- p->pd = x;
- return(0);
- }
-
-
- static int
-#ifdef KR_headers
-rd_A(p,len) char *p; ftnlen len;
-#else
-rd_A(char *p, ftnlen len)
-#endif
-{ int i,ch;
- for(i=0;i<len;i++)
- { GET(ch);
- *p++=VAL(ch);
- }
- return(0);
-}
- static int
-#ifdef KR_headers
-rd_AW(p,w,len) char *p; ftnlen len;
-#else
-rd_AW(char *p, int w, ftnlen len)
-#endif
-{ int i,ch;
- if(w>=len)
- { for(i=0;i<w-len;i++)
- GET(ch);
- for(i=0;i<len;i++)
- { GET(ch);
- *p++=VAL(ch);
- }
- return(0);
- }
- for(i=0;i<w;i++)
- { GET(ch);
- *p++=VAL(ch);
- }
- for(i=0;i<len-w;i++) *p++=' ';
- return(0);
-}
- static int
-#ifdef KR_headers
-rd_H(n,s) char *s;
-#else
-rd_H(int n, char *s)
-#endif
-{ int i,ch;
- for(i=0;i<n;i++)
- if((ch=(*f__getn)())<0) return(ch);
- else *s++ = ch=='\n'?' ':ch;
- return(1);
-}
- static int
-#ifdef KR_headers
-rd_POS(s) char *s;
-#else
-rd_POS(char *s)
-#endif
-{ char quote;
- int ch;
- quote= *s++;
- for(;*s;s++)
- if(*s==quote && *(s+1)!=quote) break;
- else if((ch=(*f__getn)())<0) return(ch);
- else *s = ch=='\n'?' ':ch;
- return(1);
-}
-#ifdef KR_headers
-rd_ed(p,ptr,len) struct syl *p; char *ptr; ftnlen len;
-#else
-rd_ed(struct syl *p, char *ptr, ftnlen len)
-#endif
-{ int ch;
- for(;f__cursor>0;f__cursor--) if((ch=(*f__getn)())<0) return(ch);
- if(f__cursor<0)
- { if(f__recpos+f__cursor < 0) /*err(elist->cierr,110,"fmt")*/
- f__cursor = -f__recpos; /* is this in the standard? */
- if(f__external == 0) {
- extern char *f__icptr;
- f__icptr += f__cursor;
- }
- else if(f__curunit && f__curunit->useek)
- (void) fseek(f__cf,(long) f__cursor,SEEK_CUR);
- else
- err(f__elist->cierr,106,"fmt");
- f__recpos += f__cursor;
- f__cursor=0;
- }
- switch(p->op)
- {
- default: fprintf(stderr,"rd_ed, unexpected code: %d\n", p->op);
- sig_die(f__fmtbuf, 1);
- case IM:
- case I: ch = rd_I((Uint *)ptr,p->p1,len, 10);
- break;
-
- /* O and OM don't work right for character, double, complex, */
- /* or doublecomplex, and they differ from Fortran 90 in */
- /* showing a minus sign for negative values. */
-
- case OM:
- case O: ch = rd_I((Uint *)ptr, p->p1, len, 8);
- break;
- case L: ch = rd_L((ftnint *)ptr,p->p1,len);
- break;
- case A: ch = rd_A(ptr,len);
- break;
- case AW:
- ch = rd_AW(ptr,p->p1,len);
- break;
- case E: case EE:
- case D:
- case G:
- case GE:
- case F: ch = rd_F((ufloat *)ptr,p->p1,p->p2,len);
- break;
-
- /* Z and ZM assume 8-bit bytes. */
-
- case ZM:
- case Z:
- ch = rd_Z((Uint *)ptr, p->p1, len);
- break;
- }
- if(ch == 0) return(ch);
- else if(ch == EOF) return(EOF);
- if (f__cf)
- clearerr(f__cf);
- return(errno);
-}
-#ifdef KR_headers
-rd_ned(p) struct syl *p;
-#else
-rd_ned(struct syl *p)
-#endif
-{
- switch(p->op)
- {
- default: fprintf(stderr,"rd_ned, unexpected code: %d\n", p->op);
- sig_die(f__fmtbuf, 1);
- case APOS:
- return(rd_POS(*(char **)&p->p2));
- case H: return(rd_H(p->p1,*(char **)&p->p2));
- case SLASH: return((*f__donewrec)());
- case TR:
- case X: f__cursor += p->p1;
- return(1);
- case T: f__cursor=p->p1-f__recpos - 1;
- return(1);
- case TL: f__cursor -= p->p1;
- if(f__cursor < -f__recpos) /* TL1000, 1X */
- f__cursor = -f__recpos;
- return(1);
- }
-}
diff --git a/lib/libI77/rewind.c b/lib/libI77/rewind.c
deleted file mode 100644
index e58daad7..0000000
--- a/lib/libI77/rewind.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#ifdef KR_headers
-integer f_rew(a) alist *a;
-#else
-integer f_rew(alist *a)
-#endif
-{
- unit *b;
- if(a->aunit>=MXUNIT || a->aunit<0)
- err(a->aerr,101,"rewind");
- b = &f__units[a->aunit];
- if(b->ufd == NULL || b->uwrt == 3)
- return(0);
- if(!b->useek)
- err(a->aerr,106,"rewind")
- if(b->uwrt) {
- (void) t_runc(a);
- b->uwrt = 3;
- }
- rewind(b->ufd);
- b->uend=0;
- return(0);
-}
diff --git a/lib/libI77/rsfe.c b/lib/libI77/rsfe.c
deleted file mode 100644
index 41ff257..0000000
--- a/lib/libI77/rsfe.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* read sequential formatted external */
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-
-xrd_SL(Void)
-{ int ch;
- if(!f__curunit->uend)
- while((ch=getc(f__cf))!='\n')
- if (ch == EOF) {
- f__curunit->uend = 1;
- break;
- }
- f__cursor=f__recpos=0;
- return(1);
-}
-x_getc(Void)
-{ int ch;
- if(f__curunit->uend) return(EOF);
- ch = getc(f__cf);
- if(ch!=EOF && ch!='\n')
- { f__recpos++;
- return(ch);
- }
- if(ch=='\n')
- { (void) ungetc(ch,f__cf);
- return(ch);
- }
- if(f__curunit->uend || feof(f__cf))
- { errno=0;
- f__curunit->uend=1;
- return(-1);
- }
- return(-1);
-}
-x_endp(Void)
-{
- xrd_SL();
- return f__curunit->uend == 1 ? EOF : 0;
-}
-x_rev(Void)
-{
- (void) xrd_SL();
- return(0);
-}
-#ifdef KR_headers
-integer s_rsfe(a) cilist *a; /* start */
-#else
-integer s_rsfe(cilist *a) /* start */
-#endif
-{ int n;
- if(!f__init) f_init();
- if(n=c_sfe(a)) return(n);
- f__reading=1;
- f__sequential=1;
- f__formatted=1;
- f__external=1;
- f__elist=a;
- f__cursor=f__recpos=0;
- f__scale=0;
- f__fmtbuf=a->cifmt;
- f__curunit= &f__units[a->ciunit];
- f__cf=f__curunit->ufd;
- if(pars_f(f__fmtbuf)<0) err(a->cierr,100,"startio");
- f__getn= x_getc;
- f__doed= rd_ed;
- f__doned= rd_ned;
- fmt_bg();
- f__doend=x_endp;
- f__donewrec=xrd_SL;
- f__dorevert=x_rev;
- f__cblank=f__curunit->ublnk;
- f__cplus=0;
- if(f__curunit->uwrt && f__nowreading(f__curunit))
- err(a->cierr,errno,"read start");
- if(f__curunit->uend)
- err(f__elist->ciend,(EOF),"read start");
- return(0);
-}
diff --git a/lib/libI77/rsli.c b/lib/libI77/rsli.c
deleted file mode 100644
index a081cd5..0000000
--- a/lib/libI77/rsli.c
+++ /dev/null
@@ -1,103 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "lio.h"
-#include "fmt.h" /* for f__doend */
-
-extern flag f__lquit;
-extern int f__lcount;
-extern char *f__icptr;
-extern char *f__icend;
-extern icilist *f__svic;
-extern int f__icnum, f__recpos;
-
-static int i_getc(Void)
-{
- if(f__recpos >= f__svic->icirlen) {
- if (f__recpos++ == f__svic->icirlen)
- return '\n';
- z_rnew();
- }
- f__recpos++;
- if(f__icptr >= f__icend)
- return EOF;
- return(*f__icptr++);
- }
-
- static
-#ifdef KR_headers
-int i_ungetc(ch, f) int ch; FILE *f;
-#else
-int i_ungetc(int ch, FILE *f)
-#endif
-{
- if (--f__recpos == f__svic->icirlen)
- return '\n';
- if (f__recpos < -1)
- err(f__svic->icierr,110,"recend");
- /* *--icptr == ch, and icptr may point to read-only memory */
- return *--f__icptr /* = ch */;
- }
-
- static void
-#ifdef KR_headers
-c_lir(a) icilist *a;
-#else
-c_lir(icilist *a)
-#endif
-{
- extern int l_eof;
- f__reading = 1;
- f__external = 0;
- f__formatted = 1;
- f__svic = a;
- L_len = a->icirlen;
- f__recpos = -1;
- f__icnum = f__recpos = 0;
- f__cursor = 0;
- l_getc = i_getc;
- l_ungetc = i_ungetc;
- l_eof = 0;
- f__icptr = a->iciunit;
- f__icend = f__icptr + a->icirlen*a->icirnum;
- f__cf = 0;
- f__curunit = 0;
- f__elist = (cilist *)a;
- }
-
-
-#ifdef KR_headers
-integer s_rsli(a) icilist *a;
-#else
-integer s_rsli(icilist *a)
-#endif
-{
- f__lioproc = l_read;
- f__lquit = 0;
- f__lcount = 0;
- c_lir(a);
- f__doend = 0;
- return(0);
- }
-
-integer e_rsli(Void)
-{ return 0; }
-
-#ifdef KR_headers
-integer s_rsni(a) icilist *a;
-#else
-extern int x_rsne(cilist*);
-
-integer s_rsni(icilist *a)
-#endif
-{
- extern int nml_read;
- integer rv;
- cilist ca;
- ca.ciend = a->iciend;
- ca.cierr = a->icierr;
- ca.cifmt = a->icifmt;
- c_lir(a);
- rv = x_rsne(&ca);
- nml_read = 0;
- return rv;
- }
diff --git a/lib/libI77/rsne.c b/lib/libI77/rsne.c
deleted file mode 100644
index cc679c7..0000000
--- a/lib/libI77/rsne.c
+++ /dev/null
@@ -1,609 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "lio.h"
-
-#define MAX_NL_CACHE 3 /* maximum number of namelist hash tables to cache */
-#define MAXDIM 20 /* maximum number of subscripts */
-
- struct dimen {
- ftnlen extent;
- ftnlen curval;
- ftnlen delta;
- ftnlen stride;
- };
- typedef struct dimen dimen;
-
- struct hashentry {
- struct hashentry *next;
- char *name;
- Vardesc *vd;
- };
- typedef struct hashentry hashentry;
-
- struct hashtab {
- struct hashtab *next;
- Namelist *nl;
- int htsize;
- hashentry *tab[1];
- };
- typedef struct hashtab hashtab;
-
- static hashtab *nl_cache;
- static int n_nlcache;
- static hashentry **zot;
- static int colonseen;
- extern ftnlen f__typesize[];
-
- extern flag f__lquit;
- extern int f__lcount, nml_read;
- extern t_getc(Void);
-
-#ifdef KR_headers
- extern char *malloc(), *memset();
-
-#ifdef ungetc
- static int
-un_getc(x,f__cf) int x; FILE *f__cf;
-{ return ungetc(x,f__cf); }
-#else
-#define un_getc ungetc
- extern int ungetc();
-#endif
-
-#else
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-#include "string.h"
-
-#ifdef ungetc
- static int
-un_getc(int x, FILE *f__cf)
-{ return ungetc(x,f__cf); }
-#else
-#define un_getc ungetc
-extern int ungetc(int, FILE*); /* for systems with a buggy stdio.h */
-#endif
-#endif
-
- static Vardesc *
-#ifdef KR_headers
-hash(ht, s) hashtab *ht; register char *s;
-#else
-hash(hashtab *ht, register char *s)
-#endif
-{
- register int c, x;
- register hashentry *h;
- char *s0 = s;
-
- for(x = 0; c = *s++; x = x & 0x4000 ? ((x << 1) & 0x7fff) + 1 : x << 1)
- x += c;
- for(h = *(zot = ht->tab + x % ht->htsize); h; h = h->next)
- if (!strcmp(s0, h->name))
- return h->vd;
- return 0;
- }
-
- hashtab *
-#ifdef KR_headers
-mk_hashtab(nl) Namelist *nl;
-#else
-mk_hashtab(Namelist *nl)
-#endif
-{
- int nht, nv;
- hashtab *ht;
- Vardesc *v, **vd, **vde;
- hashentry *he;
-
- hashtab **x, **x0, *y;
- for(x = &nl_cache; y = *x; x0 = x, x = &y->next)
- if (nl == y->nl)
- return y;
- if (n_nlcache >= MAX_NL_CACHE) {
- /* discard least recently used namelist hash table */
- y = *x0;
- free((char *)y->next);
- y->next = 0;
- }
- else
- n_nlcache++;
- nv = nl->nvars;
- if (nv >= 0x4000)
- nht = 0x7fff;
- else {
- for(nht = 1; nht < nv; nht <<= 1);
- nht += nht - 1;
- }
- ht = (hashtab *)malloc(sizeof(hashtab) + (nht-1)*sizeof(hashentry *)
- + nv*sizeof(hashentry));
- if (!ht)
- return 0;
- he = (hashentry *)&ht->tab[nht];
- ht->nl = nl;
- ht->htsize = nht;
- ht->next = nl_cache;
- nl_cache = ht;
- memset((char *)ht->tab, 0, nht*sizeof(hashentry *));
- vd = nl->vars;
- vde = vd + nv;
- while(vd < vde) {
- v = *vd++;
- if (!hash(ht, v->name)) {
- he->next = *zot;
- *zot = he;
- he->name = v->name;
- he->vd = v;
- he++;
- }
- }
- return ht;
- }
-
-static char Alpha[256], Alphanum[256];
-
- static VOID
-nl_init(Void) {
- register char *s;
- register int c;
-
- if(!f__init)
- f_init();
- for(s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; c = *s++; )
- Alpha[c]
- = Alphanum[c]
- = Alpha[c + 'a' - 'A']
- = Alphanum[c + 'a' - 'A']
- = c;
- for(s = "0123456789_"; c = *s++; )
- Alphanum[c] = c;
- }
-
-#define GETC(x) (x=(*l_getc)())
-#define Ungetc(x,y) (*l_ungetc)(x,y)
-
- static int
-#ifdef KR_headers
-getname(s, slen) register char *s; int slen;
-#else
-getname(register char *s, int slen)
-#endif
-{
- register char *se = s + slen - 1;
- register int ch;
-
- GETC(ch);
- if (!(*s++ = Alpha[ch & 0xff])) {
- if (ch != EOF)
- ch = 115;
- errfl(f__elist->cierr, ch, "namelist read");
- }
- while(*s = Alphanum[GETC(ch) & 0xff])
- if (s < se)
- s++;
- if (ch == EOF)
- err(f__elist->cierr, EOF, "namelist read");
- if (ch > ' ')
- Ungetc(ch,f__cf);
- return *s = 0;
- }
-
- static int
-#ifdef KR_headers
-getnum(chp, val) int *chp; ftnlen *val;
-#else
-getnum(int *chp, ftnlen *val)
-#endif
-{
- register int ch, sign;
- register ftnlen x;
-
- while(GETC(ch) <= ' ' && ch >= 0);
- if (ch == '-') {
- sign = 1;
- GETC(ch);
- }
- else {
- sign = 0;
- if (ch == '+')
- GETC(ch);
- }
- x = ch - '0';
- if (x < 0 || x > 9)
- return 115;
- while(GETC(ch) >= '0' && ch <= '9')
- x = 10*x + ch - '0';
- while(ch <= ' ' && ch >= 0)
- GETC(ch);
- if (ch == EOF)
- return EOF;
- *val = sign ? -x : x;
- *chp = ch;
- return 0;
- }
-
- static int
-#ifdef KR_headers
-getdimen(chp, d, delta, extent, x1)
- int *chp; dimen *d; ftnlen delta, extent, *x1;
-#else
-getdimen(int *chp, dimen *d, ftnlen delta, ftnlen extent, ftnlen *x1)
-#endif
-{
- register int k;
- ftnlen x2, x3;
-
- if (k = getnum(chp, x1))
- return k;
- x3 = 1;
- if (*chp == ':') {
- if (k = getnum(chp, &x2))
- return k;
- x2 -= *x1;
- if (*chp == ':') {
- if (k = getnum(chp, &x3))
- return k;
- if (!x3)
- return 123;
- x2 /= x3;
- colonseen = 1;
- }
- if (x2 < 0 || x2 >= extent)
- return 123;
- d->extent = x2 + 1;
- }
- else
- d->extent = 1;
- d->curval = 0;
- d->delta = delta;
- d->stride = x3;
- return 0;
- }
-
-#ifndef No_Namelist_Questions
- static Void
-#ifdef KR_headers
-print_ne(a) cilist *a;
-#else
-print_ne(cilist *a)
-#endif
-{
- flag intext = f__external;
- int rpsave = f__recpos;
- FILE *cfsave = f__cf;
- unit *usave = f__curunit;
- cilist t;
- t = *a;
- t.ciunit = 6;
- s_wsne(&t);
- fflush(f__cf);
- f__external = intext;
- f__reading = 1;
- f__recpos = rpsave;
- f__cf = cfsave;
- f__curunit = usave;
- f__elist = a;
- }
-#endif
-
- static char where0[] = "namelist read start ";
-
-#ifdef KR_headers
-x_rsne(a) cilist *a;
-#else
-x_rsne(cilist *a)
-#endif
-{
- int ch, got1, k, n, nd, quote, readall;
- Namelist *nl;
- static char where[] = "namelist read";
- char buf[64];
- hashtab *ht;
- Vardesc *v;
- dimen *dn, *dn0, *dn1;
- ftnlen *dims, *dims1;
- ftnlen b, b0, b1, ex, no, no1, nomax, size, span;
- ftnint type;
- char *vaddr;
- long iva, ivae;
- dimen dimens[MAXDIM], substr;
-
- if (!Alpha['a'])
- nl_init();
- f__reading=1;
- f__formatted=1;
- got1 = 0;
- top:
- for(;;) switch(GETC(ch)) {
- case EOF:
- eof:
- err(a->ciend,(EOF),where0);
- case '&':
- case '$':
- goto have_amp;
-#ifndef No_Namelist_Questions
- case '?':
- print_ne(a);
- continue;
-#endif
- default:
- if (ch <= ' ' && ch >= 0)
- continue;
-#ifndef No_Namelist_Comments
- while(GETC(ch) != '\n')
- if (ch == EOF)
- goto eof;
-#else
- errfl(a->cierr, 115, where0);
-#endif
- }
- have_amp:
- if (ch = getname(buf,sizeof(buf)))
- return ch;
- nl = (Namelist *)a->cifmt;
- if (strcmp(buf, nl->name))
-#ifdef No_Bad_Namelist_Skip
- errfl(a->cierr, 118, where0);
-#else
- {
- fprintf(stderr,
- "Skipping namelist \"%s\": seeking namelist \"%s\".\n",
- buf, nl->name);
- fflush(stderr);
- for(;;) switch(GETC(ch)) {
- case EOF:
- err(a->ciend, EOF, where0);
- case '/':
- case '&':
- case '$':
- if (f__external)
- e_rsle();
- else
- z_rnew();
- goto top;
- case '"':
- case '\'':
- quote = ch;
- more_quoted:
- while(GETC(ch) != quote)
- if (ch == EOF)
- err(a->ciend, EOF, where0);
- if (GETC(ch) == quote)
- goto more_quoted;
- Ungetc(ch,f__cf);
- default:
- continue;
- }
- }
-#endif
- ht = mk_hashtab(nl);
- if (!ht)
- errfl(f__elist->cierr, 113, where0);
- for(;;) {
- for(;;) switch(GETC(ch)) {
- case EOF:
- if (got1)
- return 0;
- err(a->ciend, EOF, where0);
- case '/':
- case '$':
- case '&':
- return 0;
- default:
- if (ch <= ' ' && ch >= 0 || ch == ',')
- continue;
- Ungetc(ch,f__cf);
- if (ch = getname(buf,sizeof(buf)))
- return ch;
- goto havename;
- }
- havename:
- v = hash(ht,buf);
- if (!v)
- errfl(a->cierr, 119, where);
- while(GETC(ch) <= ' ' && ch >= 0);
- vaddr = v->addr;
- type = v->type;
- if (type < 0) {
- size = -type;
- type = TYCHAR;
- }
- else
- size = f__typesize[type];
- ivae = size;
- iva = readall = 0;
- if (ch == '(' /*)*/ ) {
- dn = dimens;
- if (!(dims = v->dims)) {
- if (type != TYCHAR)
- errfl(a->cierr, 122, where);
- if (k = getdimen(&ch, dn, (ftnlen)size,
- (ftnlen)size, &b))
- errfl(a->cierr, k, where);
- if (ch != ')')
- errfl(a->cierr, 115, where);
- b1 = dn->extent;
- if (--b < 0 || b + b1 > size)
- return 124;
- iva += b;
- size = b1;
- while(GETC(ch) <= ' ' && ch >= 0);
- goto scalar;
- }
- nd = (int)dims[0];
- nomax = span = dims[1];
- ivae = iva + size*nomax;
- colonseen = 0;
- if (k = getdimen(&ch, dn, size, nomax, &b))
- errfl(a->cierr, k, where);
- no = dn->extent;
- b0 = dims[2];
- dims1 = dims += 3;
- ex = 1;
- for(n = 1; n++ < nd; dims++) {
- if (ch != ',')
- errfl(a->cierr, 115, where);
- dn1 = dn + 1;
- span /= *dims;
- if (k = getdimen(&ch, dn1, dn->delta**dims,
- span, &b1))
- errfl(a->cierr, k, where);
- ex *= *dims;
- b += b1*ex;
- no *= dn1->extent;
- dn = dn1;
- }
- if (ch != ')')
- errfl(a->cierr, 115, where);
- readall = 1 - colonseen;
- b -= b0;
- if (b < 0 || b >= nomax)
- errfl(a->cierr, 125, where);
- iva += size * b;
- dims = dims1;
- while(GETC(ch) <= ' ' && ch >= 0);
- no1 = 1;
- dn0 = dimens;
- if (type == TYCHAR && ch == '(' /*)*/) {
- if (k = getdimen(&ch, &substr, size, size, &b))
- errfl(a->cierr, k, where);
- if (ch != ')')
- errfl(a->cierr, 115, where);
- b1 = substr.extent;
- if (--b < 0 || b + b1 > size)
- return 124;
- iva += b;
- b0 = size;
- size = b1;
- while(GETC(ch) <= ' ' && ch >= 0);
- if (b1 < b0)
- goto delta_adj;
- }
- if (readall)
- goto delta_adj;
- for(; dn0 < dn; dn0++) {
- if (dn0->extent != *dims++ || dn0->stride != 1)
- break;
- no1 *= dn0->extent;
- }
- if (dn0 == dimens && dimens[0].stride == 1) {
- no1 = dimens[0].extent;
- dn0++;
- }
- delta_adj:
- ex = 0;
- for(dn1 = dn0; dn1 <= dn; dn1++)
- ex += (dn1->extent-1)
- * (dn1->delta *= dn1->stride);
- for(dn1 = dn; dn1 > dn0; dn1--) {
- ex -= (dn1->extent - 1) * dn1->delta;
- dn1->delta -= ex;
- }
- }
- else if (dims = v->dims) {
- no = no1 = dims[1];
- ivae = iva + no*size;
- }
- else
- scalar:
- no = no1 = 1;
- if (ch != '=')
- errfl(a->cierr, 115, where);
- got1 = nml_read = 1;
- f__lcount = 0;
- readloop:
- for(;;) {
- if (iva >= ivae || iva < 0) {
- f__lquit = 1;
- goto mustend;
- }
- else if (iva + no1*size > ivae)
- no1 = (ivae - iva)/size;
- f__lquit = 0;
- if (k = l_read(&no1, vaddr + iva, size, type))
- return k;
- if (f__lquit == 1)
- return 0;
- if (readall) {
- iva += dn0->delta;
- if (f__lcount > 0) {
- no1 = (ivae - iva)/size;
- if (no1 > f__lcount)
- no1 = f__lcount;
- iva += no1 * dn0->delta;
- if (k = l_read(&no1, vaddr + iva,
- size, type))
- return k;
- }
- }
- mustend:
- GETC(ch);
- if (readall)
- if (iva >= ivae)
- readall = 0;
- else for(;;) {
- switch(ch) {
- case ' ':
- case '\t':
- case '\n':
- GETC(ch);
- continue;
- }
- break;
- }
- if (ch == '/' || ch == '$' || ch == '&') {
- f__lquit = 1;
- return 0;
- }
- else if (f__lquit) {
- while(ch <= ' ' && ch >= 0)
- GETC(ch);
- Ungetc(ch,f__cf);
- if (!Alpha[ch & 0xff] && ch >= 0)
- errfl(a->cierr, 125, where);
- break;
- }
- Ungetc(ch,f__cf);
- if (readall && !Alpha[ch & 0xff])
- goto readloop;
- if ((no -= no1) <= 0)
- break;
- for(dn1 = dn0; dn1 <= dn; dn1++) {
- if (++dn1->curval < dn1->extent) {
- iva += dn1->delta;
- goto readloop;
- }
- dn1->curval = 0;
- }
- break;
- }
- }
- }
-
- integer
-#ifdef KR_headers
-s_rsne(a) cilist *a;
-#else
-s_rsne(cilist *a)
-#endif
-{
- extern int l_eof;
- int n;
-
- f__external=1;
- l_eof = 0;
- if(n = c_le(a))
- return n;
- if(f__curunit->uwrt && f__nowreading(f__curunit))
- err(a->cierr,errno,where0);
- l_getc = t_getc;
- l_ungetc = un_getc;
- f__doend = xrd_SL;
- n = x_rsne(a);
- nml_read = 0;
- if (n)
- return n;
- return e_rsle();
- }
diff --git a/lib/libI77/sfe.c b/lib/libI77/sfe.c
deleted file mode 100644
index eea9078..0000000
--- a/lib/libI77/sfe.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* sequential formatted external common routines*/
-#include "f2c.h"
-#include "fio.h"
-
-extern char *f__fmtbuf;
-
-integer e_rsfe(Void)
-{ int n;
- n=en_fio();
- if (f__cf == stdout)
- fflush(stdout);
- else if (f__cf == stderr)
- fflush(stderr);
- f__fmtbuf=NULL;
- return(n);
-}
-#ifdef KR_headers
-c_sfe(a) cilist *a; /* check */
-#else
-c_sfe(cilist *a) /* check */
-#endif
-{ unit *p;
- if(a->ciunit >= MXUNIT || a->ciunit<0)
- err(a->cierr,101,"startio");
- p = &f__units[a->ciunit];
- if(p->ufd==NULL && fk_open(SEQ,FMT,a->ciunit)) err(a->cierr,114,"sfe")
- if(!p->ufmt) err(a->cierr,102,"sfe")
- return(0);
-}
-integer e_wsfe(Void)
-{
-#ifdef ALWAYS_FLUSH
- int n;
- n = en_fio();
- f__fmtbuf=NULL;
- if (!n && fflush(f__cf))
- err(f__elist->cierr, errno, "write end");
- return n;
-#else
- return(e_rsfe());
-#endif
-}
diff --git a/lib/libI77/sue.c b/lib/libI77/sue.c
deleted file mode 100644
index b1b8bc3..0000000
--- a/lib/libI77/sue.c
+++ /dev/null
@@ -1,83 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-extern uiolen f__reclen;
-long f__recloc;
-
-#ifdef KR_headers
-c_sue(a) cilist *a;
-#else
-c_sue(cilist *a)
-#endif
-{
- if(a->ciunit >= MXUNIT || a->ciunit < 0)
- err(a->cierr,101,"startio");
- f__external=f__sequential=1;
- f__formatted=0;
- f__curunit = &f__units[a->ciunit];
- f__elist=a;
- if(f__curunit->ufd==NULL && fk_open(SEQ,UNF,a->ciunit))
- err(a->cierr,114,"sue");
- f__cf=f__curunit->ufd;
- if(f__curunit->ufmt) err(a->cierr,103,"sue")
- if(!f__curunit->useek) err(a->cierr,103,"sue")
- return(0);
-}
-#ifdef KR_headers
-integer s_rsue(a) cilist *a;
-#else
-integer s_rsue(cilist *a)
-#endif
-{
- int n;
- if(!f__init) f_init();
- f__reading=1;
- if(n=c_sue(a)) return(n);
- f__recpos=0;
- if(f__curunit->uwrt && f__nowreading(f__curunit))
- err(a->cierr, errno, "read start");
- if(fread((char *)&f__reclen,sizeof(uiolen),1,f__cf)
- != 1)
- { if(feof(f__cf))
- { f__curunit->uend = 1;
- err(a->ciend, EOF, "start");
- }
- clearerr(f__cf);
- err(a->cierr, errno, "start");
- }
- return(0);
-}
-#ifdef KR_headers
-integer s_wsue(a) cilist *a;
-#else
-integer s_wsue(cilist *a)
-#endif
-{
- int n;
- if(!f__init) f_init();
- if(n=c_sue(a)) return(n);
- f__reading=0;
- f__reclen=0;
- if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
- err(a->cierr, errno, "write start");
- f__recloc=ftell(f__cf);
- (void) fseek(f__cf,(long)sizeof(uiolen),SEEK_CUR);
- return(0);
-}
-integer e_wsue(Void)
-{ long loc;
- fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf);
-#ifdef ALWAYS_FLUSH
- if (fflush(f__cf))
- err(f__elist->cierr, errno, "write end");
-#endif
- loc=ftell(f__cf);
- fseek(f__cf,f__recloc,SEEK_SET);
- fwrite((char *)&f__reclen,sizeof(uiolen),1,f__cf);
- fseek(f__cf,loc,SEEK_SET);
- return(0);
-}
-integer e_rsue(Void)
-{
- (void) fseek(f__cf,(long)(f__reclen-f__recpos+sizeof(uiolen)),SEEK_CUR);
- return(0);
-}
diff --git a/lib/libI77/typesize.c b/lib/libI77/typesize.c
deleted file mode 100644
index 1cb20ff..0000000
--- a/lib/libI77/typesize.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "f2c.h"
-
-ftnlen f__typesize[] = { 0, 0, sizeof(shortint), sizeof(integer),
- sizeof(real), sizeof(doublereal),
- sizeof(complex), sizeof(doublecomplex),
- sizeof(logical), sizeof(char),
- 0, sizeof(integer1),
- sizeof(logical1), sizeof(shortlogical),
-#ifdef Allow_TYQUAD
- sizeof(longint),
-#endif
- 0};
diff --git a/lib/libI77/uio.c b/lib/libI77/uio.c
deleted file mode 100644
index e40875e..0000000
--- a/lib/libI77/uio.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-uiolen f__reclen;
-
-#ifdef KR_headers
-do_us(number,ptr,len) ftnint *number; char *ptr; ftnlen len;
-#else
-do_us(ftnint *number, char *ptr, ftnlen len)
-#endif
-{
- if(f__reading)
- {
- f__recpos += (int)(*number * len);
- if(f__recpos>f__reclen)
- err(f__elist->cierr, 110, "do_us");
- if (fread(ptr,(int)len,(int)(*number),f__cf) != *number)
- err(f__elist->ciend, EOF, "do_us");
- return(0);
- }
- else
- {
- f__reclen += *number * len;
- (void) fwrite(ptr,(int)len,(int)(*number),f__cf);
- return(0);
- }
-}
-#ifdef KR_headers
-integer do_ud(number,ptr,len) ftnint *number; char *ptr; ftnlen len;
-#else
-integer do_ud(ftnint *number, char *ptr, ftnlen len)
-#endif
-{
- f__recpos += (int)(*number * len);
- if(f__recpos > f__curunit->url && f__curunit->url!=1)
- err(f__elist->cierr,110,"do_ud");
- if(f__reading)
- {
-#ifdef Pad_UDread
-#ifdef KR_headers
- int i;
-#else
- size_t i;
-#endif
- if (!(i = fread(ptr,(int)len,(int)(*number),f__cf))
- && !(f__recpos - *number*len))
- err(f__elist->cierr,EOF,"do_ud")
- if (i < *number)
- memset(ptr + i*len, 0, (*number - i)*len);
- return 0;
-#else
- if(fread(ptr,(int)len,(int)(*number),f__cf) != *number)
- err(f__elist->cierr,EOF,"do_ud")
- else return(0);
-#endif
- }
- (void) fwrite(ptr,(int)len,(int)(*number),f__cf);
- return(0);
-}
-#ifdef KR_headers
-integer do_uio(number,ptr,len) ftnint *number; char *ptr; ftnlen len;
-#else
-integer do_uio(ftnint *number, char *ptr, ftnlen len)
-#endif
-{
- if(f__sequential)
- return(do_us(number,ptr,len));
- else return(do_ud(number,ptr,len));
-}
diff --git a/lib/libI77/util.c b/lib/libI77/util.c
deleted file mode 100644
index 5275499..0000000
--- a/lib/libI77/util.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef NON_UNIX_STDIO
-#include "sys/types.h"
-#include "sys/stat.h"
-#endif
-#include "f2c.h"
-#include "fio.h"
-
- VOID
-#ifdef KR_headers
-g_char(a,alen,b) char *a,*b; ftnlen alen;
-#else
-g_char(char *a, ftnlen alen, char *b)
-#endif
-{
- char *x = a + alen, *y = b + alen;
-
- for(;; y--) {
- if (x <= a) {
- *b = 0;
- return;
- }
- if (*--x != ' ')
- break;
- }
- *y-- = 0;
- do *y-- = *x;
- while(x-- > a);
- }
-
- VOID
-#ifdef KR_headers
-b_char(a,b,blen) char *a,*b; ftnlen blen;
-#else
-b_char(char *a, char *b, ftnlen blen)
-#endif
-{ int i;
- for(i=0;i<blen && *a!=0;i++) *b++= *a++;
- for(;i<blen;i++) *b++=' ';
-}
-#ifndef NON_UNIX_STDIO
-#ifdef KR_headers
-long f__inode(a, dev) char *a; int *dev;
-#else
-long f__inode(char *a, int *dev)
-#endif
-{ struct stat x;
- if(stat(a,&x)<0) return(-1);
- *dev = x.st_dev;
- return(x.st_ino);
-}
-#endif
diff --git a/lib/libI77/wref.c b/lib/libI77/wref.c
deleted file mode 100644
index 5e4871d..0000000
--- a/lib/libI77/wref.c
+++ /dev/null
@@ -1,275 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-#include "fp.h"
-#ifndef VAX
-#include "ctype.h"
-#endif
-
-#ifndef KR_headers
-#undef abs
-#undef min
-#undef max
-#include "stdlib.h"
-#include "string.h"
-#endif
-
-#ifdef KR_headers
-wrt_E(p,w,d,e,len) ufloat *p; ftnlen len;
-#else
-wrt_E(ufloat *p, int w, int d, int e, ftnlen len)
-#endif
-{
- char buf[FMAX+EXPMAXDIGS+4], *s, *se;
- int d1, delta, e1, i, sign, signspace;
- double dd;
-#ifdef WANT_LEAD_0
- int insert0 = 0;
-#endif
-#ifndef VAX
- int e0 = e;
-#endif
-
- if(e <= 0)
- e = 2;
- if(f__scale) {
- if(f__scale >= d + 2 || f__scale <= -d)
- goto nogood;
- }
- if(f__scale <= 0)
- --d;
- if (len == sizeof(real))
- dd = p->pf;
- else
- dd = p->pd;
- if (dd < 0.) {
- signspace = sign = 1;
- dd = -dd;
- }
- else {
- sign = 0;
- signspace = (int)f__cplus;
-#ifndef VAX
- if (!dd)
- dd = 0.; /* avoid -0 */
-#endif
- }
- delta = w - (2 /* for the . and the d adjustment above */
- + 2 /* for the E+ */ + signspace + d + e);
-#ifdef WANT_LEAD_0
- if (f__scale <= 0 && delta > 0) {
- delta--;
- insert0 = 1;
- }
- else
-#endif
- if (delta < 0) {
-nogood:
- while(--w >= 0)
- PUT('*');
- return(0);
- }
- if (f__scale < 0)
- d += f__scale;
- if (d > FMAX) {
- d1 = d - FMAX;
- d = FMAX;
- }
- else
- d1 = 0;
- sprintf(buf,"%#.*E", d, dd);
-#ifndef VAX
- /* check for NaN, Infinity */
- if (!isdigit(buf[0])) {
- switch(buf[0]) {
- case 'n':
- case 'N':
- signspace = 0; /* no sign for NaNs */
- }
- delta = w - strlen(buf) - signspace;
- if (delta < 0)
- goto nogood;
- while(--delta >= 0)
- PUT(' ');
- if (signspace)
- PUT(sign ? '-' : '+');
- for(s = buf; *s; s++)
- PUT(*s);
- return 0;
- }
-#endif
- se = buf + d + 3;
-#ifdef GOOD_SPRINTF_EXPONENT /* When possible, exponent has 2 digits. */
- if (f__scale != 1 && dd)
- sprintf(se, "%+.2d", atoi(se) + 1 - f__scale);
-#else
- if (dd)
- sprintf(se, "%+.2d", atoi(se) + 1 - f__scale);
- else
- strcpy(se, "+00");
-#endif
- s = ++se;
- if (e < 2) {
- if (*s != '0')
- goto nogood;
- }
-#ifndef VAX
- /* accommodate 3 significant digits in exponent */
- if (s[2]) {
-#ifdef Pedantic
- if (!e0 && !s[3])
- e1 = 2;/* for(s -= 2, e1 = 2; s[0] = s[1]; s++);
-
- /* Pedantic gives the behavior that Fortran 77 specifies, */
- /* i.e., requires that E be specified for exponent fields */
- /* of more than 3 digits. With Pedantic undefined, we get */
- /* the behavior that Cray displays -- you get a bigger */
- /* exponent field if it fits. */
-#else
- if (!e0) {
- for(s -= 2, e1 = 2; s[0] = s[1]; s++)
-#ifdef CRAY
- delta--;
- if ((delta += 4) < 0)
- goto nogood
-#endif
- ;
- }
-#endif
- else if (e0 >= 0)
- goto shift;
- else
- e1 = e;
- }
- else
- shift:
-#endif
- for(s += 2, e1 = 2; *s; ++e1, ++s)
- if (e1 >= e)
- goto nogood;
- while(--delta >= 0)
- PUT(' ');
- if (signspace)
- PUT(sign ? '-' : '+');
- s = buf;
- i = f__scale;
- if (f__scale <= 0) {
-#ifdef WANT_LEAD_0
- if (insert0)
- PUT('0');
-#endif
- PUT('.');
- for(; i < 0; ++i)
- PUT('0');
- PUT(*s);
- s += 2;
- }
- else if (f__scale > 1) {
- PUT(*s);
- s += 2;
- while(--i > 0)
- PUT(*s++);
- PUT('.');
- }
- if (d1) {
- se -= 2;
- while(s < se) PUT(*s++);
- se += 2;
- do PUT('0'); while(--d1 > 0);
- }
- while(s < se)
- PUT(*s++);
- if (e < 2)
- PUT(s[1]);
- else {
- while(++e1 <= e)
- PUT('0');
- while(*s)
- PUT(*s++);
- }
- return 0;
- }
-
-#ifdef KR_headers
-wrt_F(p,w,d,len) ufloat *p; ftnlen len;
-#else
-wrt_F(ufloat *p, int w, int d, ftnlen len)
-#endif
-{
- int d1, sign, n;
- double x;
- char *b, buf[MAXINTDIGS+MAXFRACDIGS+4], *s;
-
- x= (len==sizeof(real)?p->pf:p->pd);
- if (d < MAXFRACDIGS)
- d1 = 0;
- else {
- d1 = d - MAXFRACDIGS;
- d = MAXFRACDIGS;
- }
- if (x < 0.)
- { x = -x; sign = 1; }
- else {
- sign = 0;
-#ifndef VAX
- if (!x)
- x = 0.;
-#endif
- }
-
- if (n = f__scale)
- if (n > 0)
- do x *= 10.; while(--n > 0);
- else
- do x *= 0.1; while(++n < 0);
-
-#ifdef USE_STRLEN
- sprintf(b = buf, "%#.*f", d, x);
- n = strlen(b) + d1;
-#else
- n = sprintf(b = buf, "%#.*f", d, x) + d1;
-#endif
-
-#ifndef WANT_LEAD_0
- if (buf[0] == '0' && d)
- { ++b; --n; }
-#endif
- if (sign) {
- /* check for all zeros */
- for(s = b;;) {
- while(*s == '0') s++;
- switch(*s) {
- case '.':
- s++; continue;
- case 0:
- sign = 0;
- }
- break;
- }
- }
- if (sign || f__cplus)
- ++n;
- if (n > w) {
-#ifdef WANT_LEAD_0
- if (buf[0] == '0' && --n == w)
- ++b;
- else
-#endif
- {
- while(--w >= 0)
- PUT('*');
- return 0;
- }
- }
- for(w -= n; --w >= 0; )
- PUT(' ');
- if (sign)
- PUT('-');
- else if (f__cplus)
- PUT('+');
- while(n = *b++)
- PUT(n);
- while(--d1 >= 0)
- PUT('0');
- return 0;
- }
diff --git a/lib/libI77/wrtfmt.c b/lib/libI77/wrtfmt.c
deleted file mode 100644
index f261ec3..0000000
--- a/lib/libI77/wrtfmt.c
+++ /dev/null
@@ -1,387 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-
-extern icilist *f__svic;
-extern char *f__icptr;
-
- static int
-mv_cur(Void) /* shouldn't use fseek because it insists on calling fflush */
- /* instead we know too much about stdio */
-{
- int cursor = f__cursor;
- f__cursor = 0;
- if(f__external == 0) {
- if(cursor < 0) {
- if(f__hiwater < f__recpos)
- f__hiwater = f__recpos;
- f__recpos += cursor;
- f__icptr += cursor;
- if(f__recpos < 0)
- err(f__elist->cierr, 110, "left off");
- }
- else if(cursor > 0) {
- if(f__recpos + cursor >= f__svic->icirlen)
- err(f__elist->cierr, 110, "recend");
- if(f__hiwater <= f__recpos)
- for(; cursor > 0; cursor--)
- (*f__putn)(' ');
- else if(f__hiwater <= f__recpos + cursor) {
- cursor -= f__hiwater - f__recpos;
- f__icptr += f__hiwater - f__recpos;
- f__recpos = f__hiwater;
- for(; cursor > 0; cursor--)
- (*f__putn)(' ');
- }
- else {
- f__icptr += cursor;
- f__recpos += cursor;
- }
- }
- return(0);
- }
- if(cursor > 0) {
- if(f__hiwater <= f__recpos)
- for(;cursor>0;cursor--) (*f__putn)(' ');
- else if(f__hiwater <= f__recpos + cursor) {
-#ifndef NON_UNIX_STDIO
- if(f__cf->_ptr + f__hiwater - f__recpos < buf_end(f__cf))
- f__cf->_ptr += f__hiwater - f__recpos;
- else
-#endif
- (void) fseek(f__cf, (long) (f__hiwater - f__recpos), SEEK_CUR);
- cursor -= f__hiwater - f__recpos;
- f__recpos = f__hiwater;
- for(; cursor > 0; cursor--)
- (*f__putn)(' ');
- }
- else {
-#ifndef NON_UNIX_STDIO
- if(f__cf->_ptr + cursor < buf_end(f__cf))
- f__cf->_ptr += cursor;
- else
-#endif
- (void) fseek(f__cf, (long)cursor, SEEK_CUR);
- f__recpos += cursor;
- }
- }
- if(cursor<0)
- {
- if(cursor+f__recpos<0) err(f__elist->cierr,110,"left off");
-#ifndef NON_UNIX_STDIO
- if(f__cf->_ptr + cursor >= f__cf->_base)
- f__cf->_ptr += cursor;
- else
-#endif
- if(f__curunit && f__curunit->useek)
- (void) fseek(f__cf,(long)cursor,SEEK_CUR);
- else
- err(f__elist->cierr,106,"fmt");
- if(f__hiwater < f__recpos)
- f__hiwater = f__recpos;
- f__recpos += cursor;
- }
- return(0);
-}
-
- static int
-#ifdef KR_headers
-wrt_Z(n,w,minlen,len) Uint *n; int w, minlen; ftnlen len;
-#else
-wrt_Z(Uint *n, int w, int minlen, ftnlen len)
-#endif
-{
- register char *s, *se;
- register int i, w1;
- static int one = 1;
- static char hex[] = "0123456789ABCDEF";
- s = (char *)n;
- --len;
- if (*(char *)&one) {
- /* little endian */
- se = s;
- s += len;
- i = -1;
- }
- else {
- se = s + len;
- i = 1;
- }
- for(;; s += i)
- if (s == se || *s)
- break;
- w1 = (i*(se-s) << 1) + 1;
- if (*s & 0xf0)
- w1++;
- if (w1 > w)
- for(i = 0; i < w; i++)
- (*f__putn)('*');
- else {
- if ((minlen -= w1) > 0)
- w1 += minlen;
- while(--w >= w1)
- (*f__putn)(' ');
- while(--minlen >= 0)
- (*f__putn)('0');
- if (!(*s & 0xf0)) {
- (*f__putn)(hex[*s & 0xf]);
- if (s == se)
- return 0;
- s += i;
- }
- for(;; s += i) {
- (*f__putn)(hex[*s >> 4 & 0xf]);
- (*f__putn)(hex[*s & 0xf]);
- if (s == se)
- break;
- }
- }
- return 0;
- }
-
- static int
-#ifdef KR_headers
-wrt_I(n,w,len, base) Uint *n; ftnlen len; register int base;
-#else
-wrt_I(Uint *n, int w, ftnlen len, register int base)
-#endif
-{ int ndigit,sign,spare,i;
- longint x;
- char *ans;
- if(len==sizeof(integer)) x=n->il;
- else if(len == sizeof(char)) x = n->ic;
-#ifdef Allow_TYQUAD
- else if (len == sizeof(longint)) x = n->ili;
-#endif
- else x=n->is;
- ans=f__icvt(x,&ndigit,&sign, base);
- spare=w-ndigit;
- if(sign || f__cplus) spare--;
- if(spare<0)
- for(i=0;i<w;i++) (*f__putn)('*');
- else
- { for(i=0;i<spare;i++) (*f__putn)(' ');
- if(sign) (*f__putn)('-');
- else if(f__cplus) (*f__putn)('+');
- for(i=0;i<ndigit;i++) (*f__putn)(*ans++);
- }
- return(0);
-}
- static int
-#ifdef KR_headers
-wrt_IM(n,w,m,len,base) Uint *n; ftnlen len; int base;
-#else
-wrt_IM(Uint *n, int w, int m, ftnlen len, int base)
-#endif
-{ int ndigit,sign,spare,i,xsign;
- longint x;
- char *ans;
- if(sizeof(integer)==len) x=n->il;
- else if(len == sizeof(char)) x = n->ic;
-#ifdef Allow_TYQUAD
- else if (len == sizeof(longint)) x = n->ili;
-#endif
- else x=n->is;
- ans=f__icvt(x,&ndigit,&sign, base);
- if(sign || f__cplus) xsign=1;
- else xsign=0;
- if(ndigit+xsign>w || m+xsign>w)
- { for(i=0;i<w;i++) (*f__putn)('*');
- return(0);
- }
- if(x==0 && m==0)
- { for(i=0;i<w;i++) (*f__putn)(' ');
- return(0);
- }
- if(ndigit>=m)
- spare=w-ndigit-xsign;
- else
- spare=w-m-xsign;
- for(i=0;i<spare;i++) (*f__putn)(' ');
- if(sign) (*f__putn)('-');
- else if(f__cplus) (*f__putn)('+');
- for(i=0;i<m-ndigit;i++) (*f__putn)('0');
- for(i=0;i<ndigit;i++) (*f__putn)(*ans++);
- return(0);
-}
- static int
-#ifdef KR_headers
-wrt_AP(s) char *s;
-#else
-wrt_AP(char *s)
-#endif
-{ char quote;
- int i;
-
- if(f__cursor && (i = mv_cur()))
- return i;
- quote = *s++;
- for(;*s;s++)
- { if(*s!=quote) (*f__putn)(*s);
- else if(*++s==quote) (*f__putn)(*s);
- else return(1);
- }
- return(1);
-}
- static int
-#ifdef KR_headers
-wrt_H(a,s) char *s;
-#else
-wrt_H(int a, char *s)
-#endif
-{
- int i;
-
- if(f__cursor && (i = mv_cur()))
- return i;
- while(a--) (*f__putn)(*s++);
- return(1);
-}
-#ifdef KR_headers
-wrt_L(n,len, sz) Uint *n; ftnlen sz;
-#else
-wrt_L(Uint *n, int len, ftnlen sz)
-#endif
-{ int i;
- long x;
- if(sizeof(long)==sz) x=n->il;
- else if(sz == sizeof(char)) x = n->ic;
- else x=n->is;
- for(i=0;i<len-1;i++)
- (*f__putn)(' ');
- if(x) (*f__putn)('T');
- else (*f__putn)('F');
- return(0);
-}
- static int
-#ifdef KR_headers
-wrt_A(p,len) char *p; ftnlen len;
-#else
-wrt_A(char *p, ftnlen len)
-#endif
-{
- while(len-- > 0) (*f__putn)(*p++);
- return(0);
-}
- static int
-#ifdef KR_headers
-wrt_AW(p,w,len) char * p; ftnlen len;
-#else
-wrt_AW(char * p, int w, ftnlen len)
-#endif
-{
- while(w>len)
- { w--;
- (*f__putn)(' ');
- }
- while(w-- > 0)
- (*f__putn)(*p++);
- return(0);
-}
-
- static int
-#ifdef KR_headers
-wrt_G(p,w,d,e,len) ufloat *p; ftnlen len;
-#else
-wrt_G(ufloat *p, int w, int d, int e, ftnlen len)
-#endif
-{ double up = 1,x;
- int i=0,oldscale,n,j;
- x = len==sizeof(real)?p->pf:p->pd;
- if(x < 0 ) x = -x;
- if(x<.1) {
- if (x != 0.)
- return(wrt_E(p,w,d,e,len));
-#ifdef WANT_LEAD_0
- i = 1;
-#endif
- goto have_i;
- }
- for(;i<=d;i++,up*=10)
- { if(x>=up) continue;
- have_i:
- oldscale = f__scale;
- f__scale = 0;
- if(e==0) n=4;
- else n=e+2;
- i=wrt_F(p,w-n,d-i,len);
- for(j=0;j<n;j++) (*f__putn)(' ');
- f__scale=oldscale;
- return(i);
- }
- return(wrt_E(p,w,d,e,len));
-}
-#ifdef KR_headers
-w_ed(p,ptr,len) struct syl *p; char *ptr; ftnlen len;
-#else
-w_ed(struct syl *p, char *ptr, ftnlen len)
-#endif
-{
- int i;
-
- if(f__cursor && (i = mv_cur()))
- return i;
- switch(p->op)
- {
- default:
- fprintf(stderr,"w_ed, unexpected code: %d\n", p->op);
- sig_die(f__fmtbuf, 1);
- case I: return(wrt_I((Uint *)ptr,p->p1,len, 10));
- case IM:
- return(wrt_IM((Uint *)ptr,p->p1,p->p2,len,10));
-
- /* O and OM don't work right for character, double, complex, */
- /* or doublecomplex, and they differ from Fortran 90 in */
- /* showing a minus sign for negative values. */
-
- case O: return(wrt_I((Uint *)ptr, p->p1, len, 8));
- case OM:
- return(wrt_IM((Uint *)ptr,p->p1,p->p2,len,8));
- case L: return(wrt_L((Uint *)ptr,p->p1, len));
- case A: return(wrt_A(ptr,len));
- case AW:
- return(wrt_AW(ptr,p->p1,len));
- case D:
- case E:
- case EE:
- return(wrt_E((ufloat *)ptr,p->p1,p->p2,p->p3,len));
- case G:
- case GE:
- return(wrt_G((ufloat *)ptr,p->p1,p->p2,p->p3,len));
- case F: return(wrt_F((ufloat *)ptr,p->p1,p->p2,len));
-
- /* Z and ZM assume 8-bit bytes. */
-
- case Z: return(wrt_Z((Uint *)ptr,p->p1,0,len));
- case ZM:
- return(wrt_Z((Uint *)ptr,p->p1,p->p2,len));
- }
-}
-#ifdef KR_headers
-w_ned(p) struct syl *p;
-#else
-w_ned(struct syl *p)
-#endif
-{
- switch(p->op)
- {
- default: fprintf(stderr,"w_ned, unexpected code: %d\n", p->op);
- sig_die(f__fmtbuf, 1);
- case SLASH:
- return((*f__donewrec)());
- case T: f__cursor = p->p1-f__recpos - 1;
- return(1);
- case TL: f__cursor -= p->p1;
- if(f__cursor < -f__recpos) /* TL1000, 1X */
- f__cursor = -f__recpos;
- return(1);
- case TR:
- case X:
- f__cursor += p->p1;
- return(1);
- case APOS:
- return(wrt_AP(*(char **)&p->p2));
- case H:
- return(wrt_H(p->p1,*(char **)&p->p2));
- }
-}
diff --git a/lib/libI77/wsfe.c b/lib/libI77/wsfe.c
deleted file mode 100644
index 7c7f014..0000000
--- a/lib/libI77/wsfe.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*write sequential formatted external*/
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-extern int f__hiwater;
-
-#ifdef KR_headers
-x_putc(c)
-#else
-x_putc(int c)
-#endif
-{
- /* this uses \n as an indicator of record-end */
- if(c == '\n' && f__recpos < f__hiwater) { /* fseek calls fflush, a loss */
-#ifndef NON_UNIX_STDIO
- if(f__cf->_ptr + f__hiwater - f__recpos < buf_end(f__cf))
- f__cf->_ptr += f__hiwater - f__recpos;
- else
-#endif
- (void) fseek(f__cf, (long)(f__hiwater - f__recpos), SEEK_CUR);
- }
-#ifdef OMIT_BLANK_CC
- if (!f__recpos++ && c == ' ')
- return c;
-#else
- f__recpos++;
-#endif
- return putc(c,f__cf);
-}
-x_wSL(Void)
-{
- (*f__putn)('\n');
- f__recpos=0;
- f__cursor = 0;
- f__hiwater = 0;
- return(1);
-}
-xw_end(Void)
-{
- if(f__nonl == 0)
- (*f__putn)('\n');
- f__hiwater = f__recpos = f__cursor = 0;
- return(0);
-}
-xw_rev(Void)
-{
- if(f__workdone) (*f__putn)('\n');
- f__hiwater = f__recpos = f__cursor = 0;
- return(f__workdone=0);
-}
-
-#ifdef KR_headers
-integer s_wsfe(a) cilist *a; /*start*/
-#else
-integer s_wsfe(cilist *a) /*start*/
-#endif
-{ int n;
- if(!f__init) f_init();
- if(n=c_sfe(a)) return(n);
- f__reading=0;
- f__sequential=1;
- f__formatted=1;
- f__external=1;
- f__elist=a;
- f__hiwater = f__cursor=f__recpos=0;
- f__nonl = 0;
- f__scale=0;
- f__fmtbuf=a->cifmt;
- f__curunit = &f__units[a->ciunit];
- f__cf=f__curunit->ufd;
- if(pars_f(f__fmtbuf)<0) err(a->cierr,100,"startio");
- f__putn= x_putc;
- f__doed= w_ed;
- f__doned= w_ned;
- f__doend=xw_end;
- f__dorevert=xw_rev;
- f__donewrec=x_wSL;
- fmt_bg();
- f__cplus=0;
- f__cblank=f__curunit->ublnk;
- if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
- err(a->cierr,errno,"write start");
- return(0);
-}
diff --git a/lib/libI77/wsle.c b/lib/libI77/wsle.c
deleted file mode 100644
index 44b6972..0000000
--- a/lib/libI77/wsle.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "fmt.h"
-#include "lio.h"
-
-#ifdef KR_headers
-integer s_wsle(a) cilist *a;
-#else
-integer s_wsle(cilist *a)
-#endif
-{
- int n;
- if(n=c_le(a)) return(n);
- f__reading=0;
- f__external=1;
- f__formatted=1;
- f__putn = t_putc;
- f__lioproc = l_write;
- L_len = LINE;
- f__donewrec = x_wSL;
- if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
- err(a->cierr, errno, "list output start");
- return(0);
- }
-
-integer e_wsle(Void)
-{
- t_putc('\n');
- f__recpos=0;
-#ifdef ALWAYS_FLUSH
- if (fflush(f__cf))
- err(f__elist->cierr, errno, "write end");
-#else
- if (f__cf == stdout)
- fflush(stdout);
- else if (f__cf == stderr)
- fflush(stderr);
-#endif
- return(0);
- }
diff --git a/lib/libI77/wsne.c b/lib/libI77/wsne.c
deleted file mode 100644
index 0febd52..0000000
--- a/lib/libI77/wsne.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "lio.h"
-
- integer
-#ifdef KR_headers
-s_wsne(a) cilist *a;
-#else
-s_wsne(cilist *a)
-#endif
-{
- int n;
-
- if(n=c_le(a))
- return(n);
- f__reading=0;
- f__external=1;
- f__formatted=1;
- f__putn = t_putc;
- L_len = LINE;
- f__donewrec = x_wSL;
- if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
- err(a->cierr, errno, "namelist output start");
- x_wsne(a);
- return e_wsle();
- }
diff --git a/lib/libI77/xwsne.c b/lib/libI77/xwsne.c
deleted file mode 100644
index 41c929b..0000000
--- a/lib/libI77/xwsne.c
+++ /dev/null
@@ -1,72 +0,0 @@
-#include "f2c.h"
-#include "fio.h"
-#include "lio.h"
-#include "fmt.h"
-
-extern int f__Aquote;
-
- static VOID
-nl_donewrec(Void)
-{
- (*f__donewrec)();
- PUT(' ');
- }
-
-#ifdef KR_headers
-x_wsne(a) cilist *a;
-#else
-#include "string.h"
-
- VOID
-x_wsne(cilist *a)
-#endif
-{
- Namelist *nl;
- char *s;
- Vardesc *v, **vd, **vde;
- ftnint *number, type;
- ftnlen *dims;
- ftnlen size;
- static ftnint one = 1;
- extern ftnlen f__typesize[];
-
- nl = (Namelist *)a->cifmt;
- PUT('&');
- for(s = nl->name; *s; s++)
- PUT(*s);
- PUT(' ');
- f__Aquote = 1;
- vd = nl->vars;
- vde = vd + nl->nvars;
- while(vd < vde) {
- v = *vd++;
- s = v->name;
-#ifdef No_Extra_Namelist_Newlines
- if (f__recpos+strlen(s)+2 >= L_len)
-#endif
- nl_donewrec();
- while(*s)
- PUT(*s++);
- PUT(' ');
- PUT('=');
- number = (dims = v->dims) ? dims + 1 : &one;
- type = v->type;
- if (type < 0) {
- size = -type;
- type = TYCHAR;
- }
- else
- size = f__typesize[type];
- l_write(number, v->addr, size, type);
- if (vd < vde) {
- if (f__recpos+2 >= L_len)
- nl_donewrec();
- PUT(',');
- PUT(' ');
- }
- else if (f__recpos+1 >= L_len)
- nl_donewrec();
- }
- f__Aquote = 0;
- PUT('/');
- }
diff --git a/lib/libalias/HISTORY b/lib/libalias/HISTORY
deleted file mode 100644
index 5d29e34..0000000
--- a/lib/libalias/HISTORY
+++ /dev/null
@@ -1,126 +0,0 @@
-Version 1.0: August 11, 1996 (cjm)
-
-Version 1.1: August 20, 1996 (cjm)
- - Host accepts incoming connections for ports 0 to 1023.
-
-Version 1.2: September 7, 1996 (cjm)
- - Fragment handling error in alias_db.c corrected.
-
-Version 1.3: September 15, 1996 (cjm)
- - Generalized mechanism for handling incoming
- connections (no more 0 to 1023 restriction).
-
- - Increased ICMP support (will handle traceroute now).
-
- - Improved TCP close connection logic.
-
-Version 1.4: September 16, 1996 (cjm)
-
-Version 1.5: September 17, 1996 (cjm)
- - Corrected error in handling incoming UDP packets
- with zero checksum.
-
-Version 1.6: September 18, 1996
- - Simplified ICMP data storage. Will now handle
- tracert from Win95 and NT as well as FreeBSD
- traceroute, which uses UDP packets to non-existent
- ports.
-
-Verstion 1.7: January 9, 1997 (cjm)
- - Reduced malloc() activity for ICMP echo and
- timestamp requests.
-
- - Added handling for out-of-order IP fragments.
-
- - Switched to differential checksum computation
- for IP headers (TCP, UDP and ICMP checksums
- were already differential).
-
- - Accepts FTP data connections from other than
- port 20. This allows one ftp connections
- from two hosts which are both running packet
- aliasing.
-
- - Checksum error on FTP transfers. Problem
- in code located by Martin Renters and
- Brian Somers.
-
-Version 1.8: January 14, 1997 (cjm)
- - Fixed data type error in function StartPoint()
- in alias_db.c (this bug did not exist before v1.7)
- Problem in code located by Ari Suutari.
-
-Version 1.9: February 1, 1997 (Eivind Eklund <perhaps@yes.no>)
- - Added support for IRC DCC (ee)
-
- - Changed the aliasing routines to use ANSI style
- throughout (ee)
-
- - Minor API changes for integration with other
- programs than PPP (ee)
-
- - Fixed minor security hole in alias_ftp.c for
- other applications of the aliasing software.
- Hole could _not_ manifest in ppp+pktAlias, but
- could potentially manifest in other applications
- of the aliasing. (ee)
-
- - Connections initiated from packet aliasing
- host machine will not have their port number
- aliased unless it conflicts with an aliasing
- port already being used. (There is an option
- to disable this for debugging) (cjm)
-
- - Sockets will be allocated in cases where
- there might be port interference with the
- host machine. This can be disabled in cases
- where the ppp host will be acting purely as a
- masquerading router and not generate any
- traffic of its own.
- (cjm)
-
-Version 2.0: March, 1997 (cjm)
- - Aliasing links are cleared only when a host interface address
- changes.
-
- - PacketAliasPermanentLink() API added.
-
- - Option for only aliasing private, unregistered
- IP addresses added.
-
- - Substantial rework to the aliasing lookup engine.
-
-Version 2.1: May, 1997 (cjm)
- - Continuing rework to the aliasing lookup engine
- to support multiple incoming addresses and static
- NAT. PacketAliasRedirectPort() and
- PacketAliasRedirectAddr() added to API.
-
- - Now supports outgoing as well as incoming ICMP
- error messges.
-
-Version 2.2: July, 1997 (cjm)
- - Rationalized API function names to all begin with
- "PacketAlias..." Old function names are retained
- for backwards compatitibility.
-
- - Packet aliasing engine will now free memory of
- fragments which are never resolved after a timeout
- period. Once a fragment is resolved, it becomes
- the users responsibility to free the memory.
-
-Version 2.3: August 11, 1997 (cjm)
- - Problem associated with socket file descriptor
- accumulation in alias_db.c corrected. The sockets
- had to be closed when a binding failed. Problem
- in code located by Gordon Burditt.
-
-Version 2.4: September 1, 1997 (cjm)
- - PKT_ALIAS_UNREGISTERED_ONLY option repaired.
- This part of the code was incorrectly re-implemented
- in version 2.1.
-
-Version 2.5: December, 1997 (ee)
- - Added PKT_ALIAS_PUNCH_FW mode for firewall
- bypass of FTP/IRC DCC data connections. Also added
- improved TCP connection monitoring.
diff --git a/lib/libalias/Makefile b/lib/libalias/Makefile
deleted file mode 100644
index 6ce9e46..0000000
--- a/lib/libalias/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-LIB= alias
-SHLIB_MAJOR= 2
-SHLIB_MINOR= 5
-CFLAGS+=-Wall -I${.CURDIR}
-SRCS= alias.c alias_db.c alias_ftp.c alias_irc.c alias_util.c alias_old.c
-MAN3=libalias.3
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/alias.h \
- ${DESTDIR}/usr/include
-
-.include <bsd.lib.mk>
diff --git a/lib/libalias/alias.c b/lib/libalias/alias.c
deleted file mode 100644
index c8ef65a..0000000
--- a/lib/libalias/alias.c
+++ /dev/null
@@ -1,1114 +0,0 @@
-/* -*- mode: c; tab-width: 8; c-basic-indent: 4; -*- */
-/*
- Alias.c provides supervisory control for the functions of the
- packet aliasing software. It consists of routines to monitor
- TCP connection state, protocol-specific aliasing routines,
- fragment handling and the following outside world functional
- interfaces: SaveFragmentPtr, GetFragmentPtr, FragmentAliasIn,
- PacketAliasIn and PacketAliasOut.
-
- The other C program files are briefly described. The data
- structure framework which holds information needed to translate
- packets is encapsulated in alias_db.c. Data is accessed by
- function calls, so other segments of the program need not know
- about the underlying data structures. Alias_ftp.c contains
- special code for modifying the ftp PORT command used to establish
- data connections, while alias_irc.c do the same for IRC
- DCC. Alias_util.c contains a few utility routines.
-
- This software is placed into the public domain with no restrictions
- on its distribution.
-
- Version 1.0 August, 1996 (cjm)
-
- Version 1.1 August 20, 1996 (cjm)
- PPP host accepts incoming connections for ports 0 to 1023.
- (Gary Roberts pointed out the need to handle incoming
- connections.)
-
- Version 1.2 September 7, 1996 (cjm)
- Fragment handling error in alias_db.c corrected.
- (Tom Torrance helped fix this problem.)
-
- Version 1.4 September 16, 1996 (cjm)
- - A more generalized method for handling incoming
- connections, without the 0-1023 restriction, is
- implemented in alias_db.c
- - Improved ICMP support in alias.c. Traceroute
- packet streams can now be correctly aliased.
- - TCP connection closing logic simplified in
- alias.c and now allows for additional 1 minute
- "grace period" after FIN or RST is observed.
-
- Version 1.5 September 17, 1996 (cjm)
- Corrected error in handling incoming UDP packets with 0 checksum.
- (Tom Torrance helped fix this problem.)
-
- Version 1.6 September 18, 1996 (cjm)
- Simplified ICMP aliasing scheme. Should now support
- traceroute from Win95 as well as FreeBSD.
-
- Version 1.7 January 9, 1997 (cjm)
- - Out-of-order fragment handling.
- - IP checksum error fixed for ftp transfers
- from aliasing host.
- - Integer return codes added to all
- aliasing/de-aliasing functions.
- - Some obsolete comments cleaned up.
- - Differential checksum computations for
- IP header (TCP, UDP and ICMP were already
- differential).
-
- Version 2.1 May 1997 (cjm)
- - Added support for outgoing ICMP error
- messages.
- - Added two functions PacketAliasIn2()
- and PacketAliasOut2() for dynamic address
- control (e.g. round-robin allocation of
- incoming packets).
-
- Version 2.2 July 1997 (cjm)
- - Rationalized API function names to begin
- with "PacketAlias..."
- - Eliminated PacketAliasIn2() and
- PacketAliasOut2() as poorly conceived.
-
- See HISTORY file for additional revisions.
-
-*/
-
-#include <stdio.h>
-#include <unistd.h>
-
-#include <sys/param.h>
-#include <sys/types.h>
-
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip_icmp.h>
-#include <netinet/tcp.h>
-#include <netinet/udp.h>
-
-#include "alias_local.h"
-#include "alias.h"
-
-#define FTP_CONTROL_PORT_NUMBER 21
-#define IRC_CONTROL_PORT_NUMBER_1 6667
-#define IRC_CONTROL_PORT_NUMBER_2 6668
-
-/*
- The following macro is used to update an
- internet checksum. "delta" is a 32-bit
- accumulation of all the changes to the
- checksum (adding in new 16-bit words and
- subtracting out old words), and "cksum"
- is the checksum value to be updated.
-*/
-#define ADJUST_CHECKSUM(acc, cksum) { \
- acc += cksum; \
- if (acc < 0) \
- { \
- acc = -acc; \
- acc = (acc >> 16) + (acc & 0xffff); \
- acc += acc >> 16; \
- cksum = (u_short) ~acc; \
- } \
- else \
- { \
- acc = (acc >> 16) + (acc & 0xffff); \
- acc += acc >> 16; \
- cksum = (u_short) acc; \
- } \
-}
-
-
-
-
-/* TCP Handling Routines
-
- TcpMonitorIn() -- These routines monitor TCP connections, and
- TcpMonitorOut() -- delete a link node when a connection is closed.
-
-These routines look for SYN, ACK and RST flags to determine when TCP
-connections open and close. When a TCP connection closes, the data
-structure containing packet aliasing information is deleted after
-a timeout period.
-*/
-
-/* Local prototypes */
-static void TcpMonitorIn(struct ip *, struct alias_link *);
-
-static void TcpMonitorOut(struct ip *, struct alias_link *);
-
-
-static void
-TcpMonitorIn(struct ip *pip, struct alias_link *link)
-{
- struct tcphdr *tc;
-
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
-
- switch (GetStateIn(link))
- {
- case ALIAS_TCP_STATE_NOT_CONNECTED:
- if (tc->th_flags & TH_SYN)
- SetStateIn(link, ALIAS_TCP_STATE_CONNECTED);
- break;
- case ALIAS_TCP_STATE_CONNECTED:
- if (tc->th_flags & TH_FIN
- || tc->th_flags & TH_RST)
- SetStateIn(link, ALIAS_TCP_STATE_DISCONNECTED);
- break;
- }
-}
-
-static void
-TcpMonitorOut(struct ip *pip, struct alias_link *link)
-{
- struct tcphdr *tc;
-
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
-
- switch (GetStateOut(link))
- {
- case ALIAS_TCP_STATE_NOT_CONNECTED:
- if (tc->th_flags & TH_SYN)
- SetStateOut(link, ALIAS_TCP_STATE_CONNECTED);
- break;
- case ALIAS_TCP_STATE_CONNECTED:
- if (tc->th_flags & TH_FIN
- || tc->th_flags & TH_RST)
- SetStateOut(link, ALIAS_TCP_STATE_DISCONNECTED);
- break;
- }
-}
-
-
-
-
-
-/* Protocol Specific Packet Aliasing Routines
-
- IcmpAliasIn(), IcmpAliasIn1(), IcmpAliasIn2(), IcmpAliasIn3()
- IcmpAliasOut(), IcmpAliasOut1(), IcmpAliasOut2(), IcmpAliasOut3()
- UdpAliasIn(), UdpAliasOut()
- TcpAliasIn(), TcpAliasOut()
-
-These routines handle protocol specific details of packet aliasing.
-One may observe a certain amount of repetitive arithmetic in these
-functions, the purpose of which is to compute a revised checksum
-without actually summing over the entire data packet, which could be
-unnecessarily time consuming.
-
-The purpose of the packet aliasing routines is to replace the source
-address of the outgoing packet and then correctly put it back for
-any incoming packets. For TCP and UDP, ports are also re-mapped.
-
-For ICMP echo/timestamp requests and replies, the following scheme
-is used: the id number is replaced by an alias for the outgoing
-packet.
-
-ICMP error messages are handled by looking at the IP fragment
-in the data section of the message.
-
-For TCP and UDP protocols, a port number is chosen for an outgoing
-packet, and then incoming packets are identified by IP address and
-port numbers. For TCP packets, there is additional logic in the event
-that sequence and ack numbers have been altered (as is the case for
-FTP data port commands).
-
-The port numbers used by the packet aliasing module are not true
-ports in the Unix sense. No sockets are actually bound to ports.
-They are more correctly thought of as placeholders.
-
-All packets go through the aliasing mechanism, whether they come from
-the gateway machine or other machines on a local area network.
-*/
-
-
-/* Local prototypes */
-static int IcmpAliasIn1(struct ip *);
-static int IcmpAliasIn2(struct ip *);
-static int IcmpAliasIn3(struct ip *);
-static int IcmpAliasIn (struct ip *);
-
-static int IcmpAliasOut1(struct ip *);
-static int IcmpAliasOut2(struct ip *);
-static int IcmpAliasOut3(struct ip *);
-static int IcmpAliasOut (struct ip *);
-
-static int UdpAliasOut(struct ip *);
-static int UdpAliasIn (struct ip *);
-
-static int TcpAliasOut(struct ip *, int);
-static int TcpAliasIn (struct ip *);
-
-
-static int
-IcmpAliasIn1(struct ip *pip)
-{
-/*
- De-alias incoming echo and timestamp replies
-*/
- struct alias_link *link;
- struct icmp *ic;
-
- ic = (struct icmp *) ((char *) pip + (pip->ip_hl << 2));
-
-/* Get source address from ICMP data field and restore original data */
- link = FindIcmpIn(pip->ip_src, pip->ip_dst, ic->icmp_id);
- if (link != NULL)
- {
- u_short original_id;
- int accumulate;
-
- original_id = GetOriginalPort(link);
-
-/* Adjust ICMP checksum */
- accumulate = ic->icmp_id;
- accumulate -= original_id;
- ADJUST_CHECKSUM(accumulate, ic->icmp_cksum)
-
-/* Put original sequence number back in */
- ic->icmp_id = original_id;
-
-/* Put original address back into IP header */
- {
- struct in_addr original_address;
-
- original_address = GetOriginalAddress(link);
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &original_address,
- (u_short *) &pip->ip_dst,
- 2);
- pip->ip_dst = original_address;
- }
-
- return(PKT_ALIAS_OK);
- }
- return(PKT_ALIAS_IGNORED);
-}
-
-static int
-IcmpAliasIn2(struct ip *pip)
-{
-/*
- Alias incoming ICMP error messages containing
- IP header and first 64 bits of datagram.
-*/
- struct ip *ip;
- struct icmp *ic, *ic2;
- struct udphdr *ud;
- struct tcphdr *tc;
- struct alias_link *link;
-
- ic = (struct icmp *) ((char *) pip + (pip->ip_hl << 2));
- ip = (struct ip *) ic->icmp_data;
-
- ud = (struct udphdr *) ((char *) ip + (ip->ip_hl <<2));
- tc = (struct tcphdr *) ud;
- ic2 = (struct icmp *) ud;
-
- if (ip->ip_p == IPPROTO_UDP)
- link = FindUdpTcpIn(ip->ip_dst, ip->ip_src,
- ud->uh_dport, ud->uh_sport,
- IPPROTO_UDP);
- else if (ip->ip_p == IPPROTO_TCP)
- link = FindUdpTcpIn(ip->ip_dst, ip->ip_src,
- tc->th_dport, tc->th_sport,
- IPPROTO_TCP);
- else if (ip->ip_p == IPPROTO_ICMP)
- if (ic2->icmp_type == ICMP_ECHO || ic2->icmp_type == ICMP_TSTAMP)
- link = FindIcmpIn(ip->ip_dst, ip->ip_src, ic2->icmp_id);
- else
- link = NULL;
- else
- link = NULL;
-
- if (link != NULL)
- {
- if (ip->ip_p == IPPROTO_UDP || ip->ip_p == IPPROTO_TCP)
- {
- u_short *sptr;
- int accumulate;
- struct in_addr original_address;
- u_short original_port;
-
- original_address = GetOriginalAddress(link);
- original_port = GetOriginalPort(link);
-
-/* Adjust ICMP checksum */
- sptr = (u_short *) &(ip->ip_src);
- accumulate = *sptr++;
- accumulate += *sptr;
- sptr = (u_short *) &original_address;
- accumulate -= *sptr++;
- accumulate -= *sptr;
- accumulate += ud->uh_sport;
- accumulate -= original_port;
- ADJUST_CHECKSUM(accumulate, ic->icmp_cksum)
-
-/* Un-alias address in IP header */
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &original_address,
- (u_short *) &pip->ip_dst,
- 2);
- pip->ip_dst = original_address;
-
-/* Un-alias address and port number of original IP packet
-fragment contained in ICMP data section */
- ip->ip_src = original_address;
- ud->uh_sport = original_port;
- }
- else if (pip->ip_p == IPPROTO_ICMP)
- {
- u_short *sptr;
- int accumulate;
- struct in_addr original_address;
- u_short original_id;
-
- original_address = GetOriginalAddress(link);
- original_id = GetOriginalPort(link);
-
-/* Adjust ICMP checksum */
- sptr = (u_short *) &(ip->ip_src);
- accumulate = *sptr++;
- accumulate += *sptr;
- sptr = (u_short *) &original_address;
- accumulate -= *sptr++;
- accumulate -= *sptr;
- accumulate += ic2->icmp_id;
- accumulate -= original_id;
- ADJUST_CHECKSUM(accumulate, ic->icmp_cksum)
-
-/* Un-alias address in IP header */
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &original_address,
- (u_short *) &pip->ip_dst,
- 2);
- pip->ip_dst = original_address;
-
-/* Un-alias address of original IP packet and seqence number of
- embedded icmp datagram */
- ip->ip_src = original_address;
- ic2->icmp_id = original_id;
- }
- return(PKT_ALIAS_OK);
- }
- return(PKT_ALIAS_IGNORED);
-}
-
-
-static int
-IcmpAliasIn3(struct ip *pip)
-{
- struct in_addr original_address;
-
- original_address = FindOriginalAddress(pip->ip_dst);
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &original_address,
- (u_short *) &pip->ip_dst,
- 2);
- pip->ip_dst = original_address;
-
- return PKT_ALIAS_OK;
-}
-
-
-static int
-IcmpAliasIn(struct ip *pip)
-{
- int iresult;
- struct icmp *ic;
-
- ic = (struct icmp *) ((char *) pip + (pip->ip_hl << 2));
-
- iresult = PKT_ALIAS_IGNORED;
- switch (ic->icmp_type)
- {
- case ICMP_ECHOREPLY:
- case ICMP_TSTAMPREPLY:
- if (ic->icmp_code == 0)
- {
- iresult = IcmpAliasIn1(pip);
- }
- break;
- case ICMP_UNREACH:
- case ICMP_SOURCEQUENCH:
- case ICMP_TIMXCEED:
- case ICMP_PARAMPROB:
- iresult = IcmpAliasIn2(pip);
- break;
- case ICMP_ECHO:
- case ICMP_TSTAMP:
- iresult = IcmpAliasIn3(pip);
- break;
- }
- return(iresult);
-}
-
-
-static int
-IcmpAliasOut1(struct ip *pip)
-{
-/*
- Alias ICMP echo and timestamp packets
-*/
- struct alias_link *link;
- struct icmp *ic;
-
- ic = (struct icmp *) ((char *) pip + (pip->ip_hl << 2));
-
-/* Save overwritten data for when echo packet returns */
- link = FindIcmpOut(pip->ip_src, pip->ip_dst, ic->icmp_id);
- if (link != NULL)
- {
- u_short alias_id;
- int accumulate;
-
- alias_id = GetAliasPort(link);
-
-/* Since data field is being modified, adjust ICMP checksum */
- accumulate = ic->icmp_id;
- accumulate -= alias_id;
- ADJUST_CHECKSUM(accumulate, ic->icmp_cksum)
-
-/* Alias sequence number */
- ic->icmp_id = alias_id;
-
-/* Change source address */
- {
- struct in_addr alias_address;
-
- alias_address = GetAliasAddress(link);
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &alias_address,
- (u_short *) &pip->ip_src,
- 2);
- pip->ip_src = alias_address;
- }
-
- return(PKT_ALIAS_OK);
- }
- return(PKT_ALIAS_IGNORED);
-}
-
-
-static int
-IcmpAliasOut2(struct ip *pip)
-{
-/*
- Alias outgoing ICMP error messages containing
- IP header and first 64 bits of datagram.
-*/
- struct in_addr alias_addr;
- struct ip *ip;
- struct icmp *ic;
-
- ic = (struct icmp *) ((char *) pip + (pip->ip_hl << 2));
- ip = (struct ip *) ic->icmp_data;
-
- alias_addr = FindAliasAddress(ip->ip_src);
-
-/* Alias destination address in IP fragment */
- DifferentialChecksum(&ic->icmp_cksum,
- (u_short *) &alias_addr,
- (u_short *) &ip->ip_dst,
- 2);
- ip->ip_dst = alias_addr;
-
-/* alias source address in IP header */
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &alias_addr,
- (u_short *) &pip->ip_src,
- 2);
- pip->ip_src = alias_addr;
-
- return PKT_ALIAS_OK;
-}
-
-
-static int
-IcmpAliasOut3(struct ip *pip)
-{
-/*
- Handle outgoing echo and timestamp replies. The
- only thing which is done in this case is to alias
- the source IP address of the packet.
-*/
- struct in_addr alias_addr;
-
- alias_addr = FindAliasAddress(pip->ip_src);
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &alias_addr,
- (u_short *) &pip->ip_src,
- 2);
- pip->ip_src = alias_addr;
-
- return PKT_ALIAS_OK;
-}
-
-
-static int
-IcmpAliasOut(struct ip *pip)
-{
- int iresult;
- struct icmp *ic;
-
- ic = (struct icmp *) ((char *) pip + (pip->ip_hl << 2));
-
- iresult = PKT_ALIAS_IGNORED;
- switch (ic->icmp_type)
- {
- case ICMP_ECHO:
- case ICMP_TSTAMP:
- if (ic->icmp_code == 0)
- {
- iresult = IcmpAliasOut1(pip);
- }
- break;
- case ICMP_UNREACH:
- case ICMP_SOURCEQUENCH:
- case ICMP_TIMXCEED:
- case ICMP_PARAMPROB:
- iresult = IcmpAliasOut2(pip);
- break;
- case ICMP_ECHOREPLY:
- case ICMP_TSTAMPREPLY:
- iresult = IcmpAliasOut3(pip);
- }
- return(iresult);
-}
-
-static int
-UdpAliasIn(struct ip *pip)
-{
- struct udphdr *ud;
- struct alias_link *link;
-
- ud = (struct udphdr *) ((char *) pip + (pip->ip_hl << 2));
-
- link = FindUdpTcpIn(pip->ip_src, pip->ip_dst,
- ud->uh_sport, ud->uh_dport,
- IPPROTO_UDP);
- if (link != NULL)
- {
- struct in_addr alias_address;
- struct in_addr original_address;
- u_short alias_port;
- int accumulate;
- u_short *sptr;
-
- alias_address = GetAliasAddress(link);
- original_address = GetOriginalAddress(link);
- alias_port = ud->uh_dport;
- ud->uh_dport = GetOriginalPort(link);
-
-/* If UDP checksum is not zero, then adjust since destination port */
-/* is being unaliased and destination port is being altered. */
- if (ud->uh_sum != 0)
- {
- accumulate = alias_port;
- accumulate -= ud->uh_dport;
- sptr = (u_short *) &alias_address;
- accumulate += *sptr++;
- accumulate += *sptr;
- sptr = (u_short *) &original_address;
- accumulate -= *sptr++;
- accumulate -= *sptr;
- ADJUST_CHECKSUM(accumulate, ud->uh_sum)
- }
-
-/* Restore original IP address */
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &original_address,
- (u_short *) &pip->ip_dst,
- 2);
- pip->ip_dst = original_address;
- return(PKT_ALIAS_OK);
- }
- return(PKT_ALIAS_IGNORED);
-}
-
-static int
-UdpAliasOut(struct ip *pip)
-{
- struct udphdr *ud;
- struct alias_link *link;
-
- ud = (struct udphdr *) ((char *) pip + (pip->ip_hl << 2));
-
- link = FindUdpTcpOut(pip->ip_src, pip->ip_dst,
- ud->uh_sport, ud->uh_dport,
- IPPROTO_UDP);
- if (link != NULL)
- {
- u_short alias_port;
- struct in_addr alias_address;
-
- alias_address = GetAliasAddress(link);
- alias_port = GetAliasPort(link);
-
-/* If UDP checksum is not zero, adjust since source port is */
-/* being aliased and source address is being altered */
- if (ud->uh_sum != 0)
- {
- int accumulate;
- u_short *sptr;
-
- accumulate = ud->uh_sport;
- accumulate -= alias_port;
- sptr = (u_short *) &(pip->ip_src);
- accumulate += *sptr++;
- accumulate += *sptr;
- sptr = (u_short *) &alias_address;
- accumulate -= *sptr++;
- accumulate -= *sptr;
- ADJUST_CHECKSUM(accumulate, ud->uh_sum)
- }
-
-/* Put alias port in TCP header */
- ud->uh_sport = alias_port;
-
-/* Change source address */
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &alias_address,
- (u_short *) &pip->ip_src,
- 2);
- pip->ip_src = alias_address;
-
- return(PKT_ALIAS_OK);
- }
- return(PKT_ALIAS_IGNORED);
-}
-
-
-
-static int
-TcpAliasIn(struct ip *pip)
-{
- struct tcphdr *tc;
- struct alias_link *link;
-
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
-
- link = FindUdpTcpIn(pip->ip_src, pip->ip_dst,
- tc->th_sport, tc->th_dport,
- IPPROTO_TCP);
- if (link != NULL)
- {
- struct in_addr alias_address;
- struct in_addr original_address;
- u_short alias_port;
- int accumulate;
- u_short *sptr;
-
- alias_address = GetAliasAddress(link);
- original_address = GetOriginalAddress(link);
- alias_port = tc->th_dport;
- tc->th_dport = GetOriginalPort(link);
-
-/* Adjust TCP checksum since destination port is being unaliased */
-/* and destination port is being altered. */
- accumulate = alias_port;
- accumulate -= tc->th_dport;
- sptr = (u_short *) &alias_address;
- accumulate += *sptr++;
- accumulate += *sptr;
- sptr = (u_short *) &original_address;
- accumulate -= *sptr++;
- accumulate -= *sptr;
-
-/* See if ack number needs to be modified */
- if (GetAckModified(link) == 1)
- {
- int delta;
-
- delta = GetDeltaAckIn(pip, link);
- if (delta != 0)
- {
- sptr = (u_short *) &tc->th_ack;
- accumulate += *sptr++;
- accumulate += *sptr;
- tc->th_ack = htonl(ntohl(tc->th_ack) - delta);
- sptr = (u_short *) &tc->th_ack;
- accumulate -= *sptr++;
- accumulate -= *sptr;
- }
- }
-
- ADJUST_CHECKSUM(accumulate, tc->th_sum);
-
-/* Restore original IP address */
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &original_address,
- (u_short *) &pip->ip_dst,
- 2);
- pip->ip_dst = original_address;
-
-/* Monitor TCP connection state */
- TcpMonitorIn(pip, link);
-
- return(PKT_ALIAS_OK);
- }
- return(PKT_ALIAS_IGNORED);
-}
-
-static int
-TcpAliasOut(struct ip *pip, int maxpacketsize)
-{
- struct tcphdr *tc;
- struct alias_link *link;
-
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
-
- link = FindUdpTcpOut(pip->ip_src, pip->ip_dst,
- tc->th_sport, tc->th_dport,
- IPPROTO_TCP);
- if (link !=NULL)
- {
- struct in_addr alias_address;
- u_short alias_port;
- int accumulate;
- u_short *sptr;
-
- alias_port = GetAliasPort(link);
- alias_address = GetAliasAddress(link);
-
-/* Monitor tcp connection state */
- TcpMonitorOut(pip, link);
-
-/* Special processing for ftp connection */
- if (ntohs(tc->th_dport) == FTP_CONTROL_PORT_NUMBER
- || ntohs(tc->th_sport) == FTP_CONTROL_PORT_NUMBER)
- AliasHandleFtpOut(pip, link, maxpacketsize);
- if (ntohs(tc->th_dport) == IRC_CONTROL_PORT_NUMBER_1
- || ntohs(tc->th_dport) == IRC_CONTROL_PORT_NUMBER_2)
- AliasHandleIrcOut(pip, link, maxpacketsize);
-
-/* Adjust TCP checksum since source port is being aliased */
-/* and source address is being altered */
- accumulate = tc->th_sport;
- accumulate -= alias_port;
- sptr = (u_short *) &(pip->ip_src);
- accumulate += *sptr++;
- accumulate += *sptr;
- sptr = (u_short *) &alias_address;
- accumulate -= *sptr++;
- accumulate -= *sptr;
-
-/* Modify sequence number if necessary */
- if (GetAckModified(link) == 1)
- {
- int delta;
-
- delta = GetDeltaSeqOut(pip, link);
- if (delta != 0)
- {
- sptr = (u_short *) &tc->th_seq;
- accumulate += *sptr++;
- accumulate += *sptr;
- tc->th_seq = htonl(ntohl(tc->th_seq) + delta);
- sptr = (u_short *) &tc->th_seq;
- accumulate -= *sptr++;
- accumulate -= *sptr;
- }
- }
-
- ADJUST_CHECKSUM(accumulate, tc->th_sum)
-
-/* Put alias address in TCP header */
- tc->th_sport = alias_port;
-
-/* Change source address */
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &alias_address,
- (u_short *) &pip->ip_src,
- 2);
- pip->ip_src = alias_address;
-
- return(PKT_ALIAS_OK);
- }
- return(PKT_ALIAS_IGNORED);
-}
-
-
-
-
-/* Fragment Handling
-
- FragmentIn()
- FragmentOut()
-
-The packet aliasing module has a limited ability for handling IP
-fragments. If the ICMP, TCP or UDP header is in the first fragment
-received, then the id number of the IP packet is saved, and other
-fragments are identified according to their ID number and IP address
-they were sent from. Pointers to unresolved fragments can also be
-saved and recalled when a header fragment is seen.
-*/
-
-/* Local prototypes */
-static int FragmentIn(struct ip *);
-static int FragmentOut(struct ip *);
-
-
-static int
-FragmentIn(struct ip *pip)
-{
- struct alias_link *link;
-
- link = FindFragmentIn2(pip->ip_src, pip->ip_dst, pip->ip_id);
- if (link != NULL)
- {
- struct in_addr original_address;
-
- GetFragmentAddr(link, &original_address);
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &original_address,
- (u_short *) &pip->ip_dst,
- 2);
- pip->ip_dst = original_address;
-
- return(PKT_ALIAS_OK);
- }
- return(PKT_ALIAS_UNRESOLVED_FRAGMENT);
-}
-
-
-static int
-FragmentOut(struct ip *pip)
-{
- struct in_addr alias_address;
-
- alias_address = FindAliasAddress(pip->ip_src);
- DifferentialChecksum(&pip->ip_sum,
- (u_short *) &alias_address,
- (u_short *) &pip->ip_src,
- 2);
- pip->ip_src = alias_address;
-
- return(PKT_ALIAS_OK);
-}
-
-
-
-
-
-
-/* Outside World Access
-
- PacketAliasSaveFragment()
- PacketAliasGetFragment()
- PacketAliasFragmentIn()
- PacketAliasIn()
- PacketAliasOut()
-
-(prototypes in alias.h)
-*/
-
-
-int
-PacketAliasSaveFragment(char *ptr)
-{
- int iresult;
- struct alias_link *link;
- struct ip *pip;
-
- pip = (struct ip *) ptr;
- link = AddFragmentPtrLink(pip->ip_src, pip->ip_id);
- iresult = PKT_ALIAS_ERROR;
- if (link != NULL)
- {
- SetFragmentPtr(link, ptr);
- iresult = PKT_ALIAS_OK;
- }
- return(iresult);
-}
-
-
-char *
-PacketAliasGetFragment(char *ptr)
-{
- struct alias_link *link;
- char *fptr;
- struct ip *pip;
-
- pip = (struct ip *) ptr;
- link = FindFragmentPtr(pip->ip_src, pip->ip_id);
- if (link != NULL)
- {
- GetFragmentPtr(link, &fptr);
- SetFragmentPtr(link, NULL);
- SetExpire(link, 0); /* Deletes link */
-
- return(fptr);
- }
- else
- {
- return(NULL);
- }
-}
-
-
-void
-PacketAliasFragmentIn(char *ptr, /* Points to correctly de-aliased
- header fragment */
- char *ptr_fragment /* Points to fragment which must
- be de-aliased */
- )
-{
- struct ip *pip;
- struct ip *fpip;
-
- pip = (struct ip *) ptr;
- fpip = (struct ip *) ptr_fragment;
-
- DifferentialChecksum(&fpip->ip_sum,
- (u_short *) &pip->ip_dst,
- (u_short *) &fpip->ip_dst,
- 2);
- fpip->ip_dst = pip->ip_dst;
-}
-
-
-int
-PacketAliasIn(char *ptr, int maxpacketsize)
-{
- struct in_addr alias_addr;
- struct ip *pip;
- int iresult;
-
- HouseKeeping();
- ClearCheckNewLink();
- pip = (struct ip *) ptr;
- alias_addr = pip->ip_dst;
-
- /* Defense against mangled packets */
- if (ntohs(pip->ip_len) > maxpacketsize
- || (pip->ip_hl<<2) > maxpacketsize)
- return PKT_ALIAS_IGNORED;
-
- iresult = PKT_ALIAS_IGNORED;
- if ( (ntohs(pip->ip_off) & IP_OFFMASK) == 0 )
- {
- switch (pip->ip_p)
- {
- case IPPROTO_ICMP:
- iresult = IcmpAliasIn(pip);
- break;
- case IPPROTO_UDP:
- iresult = UdpAliasIn(pip);
- break;
- case IPPROTO_TCP:
- iresult = TcpAliasIn(pip);
- break;
- }
-
- if (ntohs(pip->ip_off) & IP_MF)
- {
- struct alias_link *link;
-
- link = FindFragmentIn1(pip->ip_src, alias_addr, pip->ip_id);
- if (link != NULL)
- {
- iresult = PKT_ALIAS_FOUND_HEADER_FRAGMENT;
- SetFragmentAddr(link, pip->ip_dst);
- }
- else
- {
- iresult = PKT_ALIAS_ERROR;
- }
- }
- }
- else
- {
- iresult = FragmentIn(pip);
- }
-
- return(iresult);
-}
-
-
-
-/* Unregistered address ranges */
-
-/* 10.0.0.0 -> 10.255.255.255 */
-#define UNREG_ADDR_A_LOWER 0x0a000000
-#define UNREG_ADDR_A_UPPER 0x0affffff
-
-/* 172.16.0.0 -> 172.31.255.255 */
-#define UNREG_ADDR_B_LOWER 0xac100000
-#define UNREG_ADDR_B_UPPER 0xac1fffff
-
-/* 192.168.0.0 -> 192.168.255.255 */
-#define UNREG_ADDR_C_LOWER 0xc0a80000
-#define UNREG_ADDR_C_UPPER 0xc0a8ffff
-
-
-
-int
-PacketAliasOut(char *ptr, /* valid IP packet */
- int maxpacketsize /* How much the packet data may grow
- (FTP and IRC inline changes) */
- )
-{
- int iresult;
- struct in_addr addr_save;
- struct ip *pip;
-
- HouseKeeping();
- ClearCheckNewLink();
- pip = (struct ip *) ptr;
-
- /* Defense against mangled packets */
- if (ntohs(pip->ip_len) > maxpacketsize
- || (pip->ip_hl<<2) > maxpacketsize)
- return PKT_ALIAS_IGNORED;
-
- addr_save = GetDefaultAliasAddress();
- if (packetAliasMode & PKT_ALIAS_UNREGISTERED_ONLY)
- {
- unsigned int addr;
- int iclass;
-
- iclass = 0;
- addr = ntohl(pip->ip_src.s_addr);
- if (addr >= UNREG_ADDR_C_LOWER && addr <= UNREG_ADDR_C_UPPER)
- iclass = 3;
- else if (addr >= UNREG_ADDR_B_LOWER && addr <= UNREG_ADDR_B_UPPER)
- iclass = 2;
- else if (addr >= UNREG_ADDR_A_LOWER && addr <= UNREG_ADDR_A_UPPER)
- iclass = 1;
-
- if (iclass == 0)
- {
- SetDefaultAliasAddress(pip->ip_src);
- }
- }
-
- iresult = PKT_ALIAS_IGNORED;
- if ((ntohs(pip->ip_off) & IP_OFFMASK) == 0)
- {
- switch (pip->ip_p)
- {
- case IPPROTO_ICMP:
- iresult = IcmpAliasOut(pip);
- break;
- case IPPROTO_UDP:
- iresult = UdpAliasOut(pip);
- break;
- case IPPROTO_TCP:
- iresult = TcpAliasOut(pip, maxpacketsize);
- break;
- }
- }
- else
- {
- iresult = FragmentOut(pip);
- }
-
- SetDefaultAliasAddress(addr_save);
- return(iresult);
-}
diff --git a/lib/libalias/alias.h b/lib/libalias/alias.h
deleted file mode 100644
index 033021d..0000000
--- a/lib/libalias/alias.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*lint -save -library Flexelint comment for external headers */
-
-/*
- Alias.h defines the outside world interfaces for the packet
- aliasing software.
-
- This software is placed into the public domain with no restrictions
- on its distribution.
-*/
-
-
-#ifndef _ALIAS_H_
-#define _ALIAS_H_
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/* Alias link representative (incomplete struct) */
-struct alias_link;
-
-/* External interfaces (API) to packet aliasing engine */
-
-/* Initialization and Control */
- extern void
- PacketAliasInit(void);
-
- extern void
- PacketAliasUninit(void);
-
- extern void
- PacketAliasSetAddress(struct in_addr);
-
- extern unsigned int
- PacketAliasSetMode(unsigned int, unsigned int);
-
- extern void
- PacketAliasSetFWBase(unsigned int, unsigned int);
-
-/* Packet Handling */
- extern int
- PacketAliasIn(char *, int maxpacketsize);
-
- extern int
- PacketAliasOut(char *, int maxpacketsize);
-
-/* Port and Address Redirection */
- extern struct alias_link *
- PacketAliasRedirectPort(struct in_addr, u_short,
- struct in_addr, u_short,
- struct in_addr, u_short,
- u_char);
-
- extern struct alias_link *
- PacketAliasRedirectAddr(struct in_addr,
- struct in_addr);
-
- extern void
- PacketAliasRedirectDelete(struct alias_link *);
-
-/* Fragment Handling */
- extern int
- PacketAliasSaveFragment(char *);
-
- extern char *
- PacketAliasGetFragment(char *);
-
- extern void
- PacketAliasFragmentIn(char *, char *);
-
-/* Miscellaneous Functions */
- extern u_short
- PacketAliasInternetChecksum(u_short *, int);
-
-
-/*
- In version 2.2, the function names were rationalized
- to all be of the form PacketAlias... These are the
- old function names for backwards compatibility
-*/
-extern int SaveFragmentPtr(char *);
-extern char *GetNextFragmentPtr(char *);
-extern void FragmentAliasIn(char *, char *);
-extern void SetPacketAliasAddress(struct in_addr);
-extern void InitPacketAlias(void);
-extern unsigned int SetPacketAliasMode(unsigned int, unsigned int);
-extern int PacketAliasIn2(char *, struct in_addr, int maxpacketsize);
-extern int PacketAliasOut2(char *, struct in_addr, int maxpacketsize);
-extern int
-PacketAliasPermanentLink(struct in_addr, u_short,
- struct in_addr, u_short,
- u_short, u_char);
-extern u_short InternetChecksum(u_short *, int);
-
-/* Obsolete constant */
-#define PKT_ALIAS_NEW_LINK 5
-
-/********************** Mode flags ********************/
-/* Set these flags using SetPacketAliasMode() */
-
-/* If PKT_ALIAS_LOG is set, a message will be printed to
- /var/log/alias.log every time a link is created or deleted. This
- is useful for debugging */
-#define PKT_ALIAS_LOG 0x01
-
-/* If PKT_ALIAS_DENY_INCOMING is set, then incoming connections (e.g.
- to ftp, telnet or web servers will be prevented by the aliasing
- mechanism. */
-#define PKT_ALIAS_DENY_INCOMING 0x02
-
-/* If PKT_ALIAS_SAME_PORTS is set, packets will be attempted sent from
- the same port as they originated on. This allows eg rsh to work
- *99% of the time*, but _not_ 100%. (It will be slightly flakey
- instead of not working at all.) This mode bit is set by
- PacketAliasInit(), so it is a default mode of operation. */
-#define PKT_ALIAS_SAME_PORTS 0x04
-
-/* If PKT_ALIAS_USE_SOCKETS is set, then when partially specified
- links (e.g. destination port and/or address is zero), the packet
- aliasing engine will attempt to allocate a socket for the aliasing
- port it chooses. This will avoid interference with the host
- machine. Fully specified links do not require this. This bit
- is set after a call to PacketAliasInit(), so it is a default
- mode of operation.*/
-#define PKT_ALIAS_USE_SOCKETS 0x08
-
-/* If PKT_ALIAS_UNREGISTERED_ONLY is set, then only packets with with
- unregistered source addresses will be aliased (along with those
- of the ppp host maching itself. Private addresses are those
- in the following ranges:
-
- 10.0.0.0 -> 10.255.255.255
- 172.16.0.0 -> 172.31.255.255
- 192.168.0.0 -> 192.168.255.255 */
-#define PKT_ALIAS_UNREGISTERED_ONLY 0x10
-
-/* If PKT_ALIAS_RESET_ON_ADDR_CHANGE is set, then the table of dynamic
- aliasing links will be reset whenever PacketAliasSetAddress()
- changes the default aliasing address. If the default aliasing
- address is left unchanged by this functions call, then the
- table of dynamic aliasing links will be left intact. This
- bit is set after a call to PacketAliasInit(). */
-#define PKT_ALIAS_RESET_ON_ADDR_CHANGE 0x20
-
-/* If PKT_ALIAS_PUNCH_FW is set, active FTP and IRC DCC connections
- will create a 'hole' in the firewall to allow the transfers to
- work. Where (IPFW "line-numbers") the hole is created is
- controlled by PacketAliasSetFWBase(base, size). The hole will be
- attached to that particular alias_link, so when the link goes away
- so do the hole. */
-#define PKT_ALIAS_PUNCH_FW 0x40
-
-/* Return Codes */
-#define PKT_ALIAS_ERROR -1
-#define PKT_ALIAS_OK 1
-#define PKT_ALIAS_IGNORED 2
-#define PKT_ALIAS_UNRESOLVED_FRAGMENT 3
-#define PKT_ALIAS_FOUND_HEADER_FRAGMENT 4
-
-#undef __libalias_version
-#define __libalias_version "2.5"
-
-#endif
-/*lint -restore */
diff --git a/lib/libalias/alias_db.c b/lib/libalias/alias_db.c
deleted file mode 100644
index b07688f..0000000
--- a/lib/libalias/alias_db.c
+++ /dev/null
@@ -1,2232 +0,0 @@
-/* -*- mode: c; tab-width: 8; c-basic-indent: 4; -*-
- Alias_db.c encapsulates all data structures used for storing
- packet aliasing data. Other parts of the aliasing software
- access data through functions provided in this file.
-
- Data storage is based on the notion of a "link", which is
- established for ICMP echo/reply packets, UDP datagrams and
- TCP stream connections. A link stores the original source
- and destination addresses. For UDP and TCP, it also stores
- source and destination port numbers, as well as an alias
- port number. Links are also used to store information about
- fragments.
-
- There is a facility for sweeping through and deleting old
- links as new packets are sent through. A simple timeout is
- used for ICMP and UDP links. TCP links are left alone unless
- there is an incomplete connection, in which case the link
- can be deleted after a certain amount of time.
-
-
- This software is placed into the public domain with no restrictions
- on its distribution.
-
- Initial version: August, 1996 (cjm)
-
- Version 1.4: September 16, 1996 (cjm)
- Facility for handling incoming links added.
-
- Version 1.6: September 18, 1996 (cjm)
- ICMP data handling simplified.
-
- Version 1.7: January 9, 1997 (cjm)
- Fragment handling simplified.
- Saves pointers for unresolved fragments.
- Permits links for unspecied remote ports
- or unspecified remote addresses.
- Fixed bug which did not properly zero port
- table entries after a link was deleted.
- Cleaned up some obsolete comments.
-
- Version 1.8: January 14, 1997 (cjm)
- Fixed data type error in StartPoint().
- (This error did not exist prior to v1.7
- and was discovered and fixed by Ari Suutari)
-
- Version 1.9: February 1, 1997
- Optionally, connections initiated from packet aliasing host
- machine will will not have their port number aliased unless it
- conflicts with an aliasing port already being used. (cjm)
-
- All options earlier being #ifdef'ed now are available through
- a new interface, SetPacketAliasMode(). This allow run time
- control (which is now available in PPP+pktAlias through the
- 'alias' keyword). (ee)
-
- Added ability to create an alias port without
- either destination address or port specified.
- port type = ALIAS_PORT_UNKNOWN_DEST_ALL (ee)
-
- Removed K&R style function headers
- and general cleanup. (ee)
-
- Added packetAliasMode to replace compiler #defines's (ee)
-
- Allocates sockets for partially specified
- ports if ALIAS_USE_SOCKETS defined. (cjm)
-
- Version 2.0: March, 1997
- SetAliasAddress() will now clean up alias links
- if the aliasing address is changed. (cjm)
-
- PacketAliasPermanentLink() function added to support permanent
- links. (J. Fortes suggested the need for this.)
- Examples:
-
- (192.168.0.1, port 23) <-> alias port 6002, unknown dest addr/port
-
- (192.168.0.2, port 21) <-> alias port 3604, known dest addr
- unknown dest port
-
- These permament links allow for incoming connections to
- machines on the local network. They can be given with a
- user-chosen amount of specificity, with increasing specificity
- meaning more security. (cjm)
-
- Quite a bit of rework to the basic engine. The portTable[]
- array, which kept track of which ports were in use was replaced
- by a table/linked list structure. (cjm)
-
- SetExpire() function added. (cjm)
-
- DeleteLink() no longer frees memory association with a pointer
- to a fragment (this bug was first recognized by E. Eklund in
- v1.9).
-
- Version 2.1: May, 1997 (cjm)
- Packet aliasing engine reworked so that it can handle
- multiple external addresses rather than just a single
- host address.
-
- PacketAliasRedirectPort() and PacketAliasRedirectAddr()
- added to the API. The first function is a more generalized
- version of PacketAliasPermanentLink(). The second function
- implements static network address translation.
-
- See HISTORY file for additional revisions.
-*/
-
-
-/* System include files */
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include <sys/errno.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <osreldate.h>
-
-/* BSD network include files */
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-
-#include "alias.h"
-#include "alias_local.h"
-
-
-
-/*
- Constants (note: constants are also defined
- near relevant functions or structs)
-*/
-
-/* Sizes of input and output link tables */
-#define LINK_TABLE_OUT_SIZE 101
-#define LINK_TABLE_IN_SIZE 4001
-
-/* Parameters used for cleanup of expired links */
-#define ALIAS_CLEANUP_INTERVAL_SECS 60
-#define ALIAS_CLEANUP_MAX_SPOKES 30
-
-/* Timouts (in seconds) for different link types) */
-#define ICMP_EXPIRE_TIME 60
-#define UDP_EXPIRE_TIME 60
-#define FRAGMENT_ID_EXPIRE_TIME 10
-#define FRAGMENT_PTR_EXPIRE_TIME 30
-
-/* TCP link expire time for different cases */
-/* When the link has been used and closed - minimal grace time to
- allow ACKs and potential re-connect in FTP (XXX - is this allowed?) */
-#ifndef TCP_EXPIRE_DEAD
-# define TCP_EXPIRE_DEAD 10
-#endif
-
-/* When the link has been used and closed on one side - the other side
- is allowed to still send data */
-#ifndef TCP_EXPIRE_SINGLEDEAD
-# define TCP_EXPIRE_SINGLEDEAD 90
-#endif
-
-/* When the link isn't yet up */
-#ifndef TCP_EXPIRE_INITIAL
-# define TCP_EXPIRE_INITIAL 300
-#endif
-
-/* When the link is up */
-#ifndef TCP_EXPIRE_CONNECTED
-# define TCP_EXPIRE_CONNECTED 86400
-#endif
-
-
-/* Dummy port number codes used for FindLinkIn/Out() and AddLink().
- These constants can be anything except zero, which indicates an
- unknown port numbea. */
-
-#define NO_DEST_PORT 1
-#define NO_SRC_PORT 1
-
-
-
-/* Data Structures
-
- The fundamental data structure used in this program is
- "struct alias_link". Whenever a TCP connection is made,
- a UDP datagram is sent out, or an ICMP echo request is made,
- a link record is made (if it has not already been created).
- The link record is identified by the source address/port
- and the destination address/port. In the case of an ICMP
- echo request, the source port is treated as being equivalent
- with the 16-bit id number of the ICMP packet.
-
- The link record also can store some auxiliary data. For
- TCP connections that have had sequence and acknowledgment
- modifications, data space is available to track these changes.
- A state field is used to keep track in changes to the tcp
- connection state. Id numbers of fragments can also be
- stored in the auxiliary space. Pointers to unresolved
- framgents can also be stored.
-
- The link records support two independent chainings. Lookup
- tables for input and out tables hold the initial pointers
- the link chains. On input, the lookup table indexes on alias
- port and link type. On output, the lookup table indexes on
- source addreess, destination address, source port, destination
- port and link type.
-*/
-
-struct ack_data_record /* used to save changes to ack/seq numbers */
-{
- u_long ack_old;
- u_long ack_new;
- int delta;
- int active;
-};
-
-struct tcp_state /* Information about tcp connection */
-{
- int in; /* State for outside -> inside */
- int out; /* State for inside -> outside */
- int index; /* Index to ack data array */
- int ack_modified; /* Indicates whether ack and seq numbers */
- /* been modified */
-};
-
-#define N_LINK_TCP_DATA 3 /* Number of distinct ack number changes
- saved for a modified TCP stream */
-struct tcp_dat
-{
- struct tcp_state state;
- struct ack_data_record ack[N_LINK_TCP_DATA];
- int fwhole; /* Which firewall record is used for this hole? */
-};
-
-struct alias_link /* Main data structure */
-{
- struct in_addr src_addr; /* Address and port information */
- struct in_addr dst_addr; /* . */
- struct in_addr alias_addr; /* . */
- u_short src_port; /* . */
- u_short dst_port; /* . */
- u_short alias_port; /* . */
-
- int link_type; /* Type of link: tcp, udp, icmp, frag */
-
-/* values for link_type */
-#define LINK_ICMP 1
-#define LINK_UDP 2
-#define LINK_TCP 3
-#define LINK_FRAGMENT_ID 4
-#define LINK_FRAGMENT_PTR 5
-#define LINK_ADDR 6
-
- int flags; /* indicates special characteristics */
-
-/* flag bits */
-#define LINK_UNKNOWN_DEST_PORT 0x01
-#define LINK_UNKNOWN_DEST_ADDR 0x02
-#define LINK_PERMANENT 0x04
-#define LINK_PARTIALLY_SPECIFIED 0x03 /* logical-or of first two bits */
-#define LINK_UNFIREWALLED 0x08
-
- int timestamp; /* Time link was last accessed */
- int expire_time; /* Expire time for link */
-
- int sockfd; /* socket descriptor */
-
- u_int start_point_out; /* Index number in output lookup table */
- u_int start_point_in;
- struct alias_link *next_out; /* Linked list pointers for input and */
- struct alias_link *last_out; /* output tables */
- struct alias_link *next_in; /* . */
- struct alias_link *last_in; /* . */
-
- union /* Auxiliary data */
- {
- char *frag_ptr;
- struct in_addr frag_addr;
- struct tcp_dat *tcp;
- } data;
-};
-
-
-
-
-
-/* Global Variables
-
- The global variables listed here are only accessed from
- within alias_db.c and so are prefixed with the static
- designation.
-*/
-
-int packetAliasMode; /* Mode flags */
- /* - documented in alias.h */
-
-static struct in_addr aliasAddress; /* Address written onto source */
- /* field of IP packet. */
-
-static struct in_addr targetAddress; /* IP address incoming packets */
- /* are sent to if no aliasing */
- /* link already exists */
-
-static struct in_addr nullAddress; /* Used as a dummy parameter for */
- /* some function calls */
-static struct alias_link *
-linkTableOut[LINK_TABLE_OUT_SIZE]; /* Lookup table of pointers to */
- /* chains of link records. Each */
-static struct alias_link * /* link record is doubly indexed */
-linkTableIn[LINK_TABLE_IN_SIZE]; /* into input and output lookup */
- /* tables. */
-
-static int icmpLinkCount; /* Link statistics */
-static int udpLinkCount;
-static int tcpLinkCount;
-static int fragmentIdLinkCount;
-static int fragmentPtrLinkCount;
-static int sockCount;
-
-static int cleanupIndex; /* Index to chain of link table */
- /* being inspected for old links */
-
-static int timeStamp; /* System time in seconds for */
- /* current packet */
-
-static int lastCleanupTime; /* Last time IncrementalCleanup() */
- /* was called */
-
-static int houseKeepingResidual; /* used by HouseKeeping() */
-
-static int deleteAllLinks; /* If equal to zero, DeleteLink() */
- /* will not remove permanent links */
-
-static FILE *monitorFile; /* File descriptor for link */
- /* statistics monitoring file */
-
-static int newDefaultLink; /* Indicates if a new aliasing */
- /* link has been created after a */
- /* call to PacketAliasIn/Out(). */
-
-static int fireWallFD = -1; /* File descriptor to be able to */
- /* control firewall. Opened by */
- /* PacketAliasSetMode on first */
- /* setting the PKT_ALIAS_PUNCH_FW */
- /* flag. */
-
-
-
-
-
-
-/* Internal utility routines (used only in alias_db.c)
-
-Lookup table starting points:
- StartPointIn() -- link table initial search point for
- outgoing packets
- StartPointOut() -- port table initial search point for
- incoming packets
-
-Miscellaneous:
- SeqDiff() -- difference between two TCP sequences
- ShowAliasStats() -- send alias statistics to a monitor file
-*/
-
-
-/* Local prototypes */
-static u_int StartPointIn(struct in_addr, u_short, int);
-
-static u_int StartPointOut(struct in_addr, struct in_addr,
- u_short, u_short, int);
-
-static int SeqDiff(u_long, u_long);
-
-static void ShowAliasStats(void);
-
-/* Firewall control */
-static void InitPunchFW(void);
-static void UninitPunchFW(void);
-static void ClearFWHole(struct alias_link *link);
-
-/* Log file control */
-static void InitPacketAliasLog(void);
-static void UninitPacketAliasLog(void);
-
-static u_int
-StartPointIn(struct in_addr alias_addr,
- u_short alias_port,
- int link_type)
-{
- u_int n;
-
- n = alias_addr.s_addr;
- n += alias_port;
- n += link_type;
- return(n % LINK_TABLE_IN_SIZE);
-}
-
-
-static u_int
-StartPointOut(struct in_addr src_addr, struct in_addr dst_addr,
- u_short src_port, u_short dst_port, int link_type)
-{
- u_int n;
-
- n = src_addr.s_addr;
- n += dst_addr.s_addr;
- n += src_port;
- n += dst_port;
- n += link_type;
-
- return(n % LINK_TABLE_OUT_SIZE);
-}
-
-
-static int
-SeqDiff(u_long x, u_long y)
-{
-/* Return the difference between two TCP sequence numbers */
-
-/*
- This function is encapsulated in case there are any unusual
- arithmetic conditions that need to be considered.
-*/
-
- return (ntohl(y) - ntohl(x));
-}
-
-
-static void
-ShowAliasStats(void)
-{
-/* Used for debugging */
-
- if (packetAliasMode & PKT_ALIAS_LOG)
- {
- fprintf(monitorFile, "icmp=%d, udp=%d, tcp=%d, frag_id=%d frag_ptr=%d",
- icmpLinkCount,
- udpLinkCount,
- tcpLinkCount,
- fragmentIdLinkCount,
- fragmentPtrLinkCount);
-
- fprintf(monitorFile, " / tot=%d (sock=%d)\n",
- icmpLinkCount + udpLinkCount
- + tcpLinkCount
- + fragmentIdLinkCount
- + fragmentPtrLinkCount,
- sockCount);
-
- fflush(monitorFile);
- }
-}
-
-
-
-
-
-/* Internal routines for finding, deleting and adding links
-
-Port Allocation:
- GetNewPort() -- find and reserve new alias port number
- GetSocket() -- try to allocate a socket for a given port
-
-Link creation and deletion:
- CleanupAliasData() - remove all link chains from lookup table
- IncrementalCleanup() - look for stale links in a single chain
- DeleteLink() - remove link
- AddLink() - add link
- ReLink() - change link
-
-Link search:
- FindLinkOut() - find link for outgoing packets
- FindLinkIn() - find link for incoming packets
-*/
-
-/* Local prototypes */
-static int GetNewPort(struct alias_link *, int);
-
-static u_short GetSocket(u_short, int *, int);
-
-static void CleanupAliasData(void);
-
-static void IncrementalCleanup(void);
-
-static void DeleteLink(struct alias_link *);
-
-static struct alias_link *
-AddLink(struct in_addr, struct in_addr, struct in_addr,
- u_short, u_short, int, int);
-
-static struct alias_link *
-ReLink(struct alias_link *,
- struct in_addr, struct in_addr, struct in_addr,
- u_short, u_short, int, int);
-
-static struct alias_link *
-FindLinkOut(struct in_addr, struct in_addr, u_short, u_short, int);
-
-static struct alias_link *
-FindLinkIn(struct in_addr, struct in_addr, u_short, u_short, int, int);
-
-
-#define ALIAS_PORT_BASE 0x08000
-#define ALIAS_PORT_MASK 0x07fff
-#define GET_NEW_PORT_MAX_ATTEMPTS 20
-
-#define GET_ALIAS_PORT -1
-#define GET_ALIAS_ID GET_ALIAS_PORT
-
-/* GetNewPort() allocates port numbers. Note that if a port number
- is already in use, that does not mean that it cannot be used by
- another link concurrently. This is because GetNewPort() looks for
- unused triplets: (dest addr, dest port, alias port). */
-
-static int
-GetNewPort(struct alias_link *link, int alias_port_param)
-{
- int i;
- int max_trials;
- u_short port_sys;
- u_short port_net;
-
-/*
- Description of alias_port_param for GetNewPort(). When
- this parameter is zero or positive, it precisely specifies
- the port number. GetNewPort() will return this number
- without check that it is in use.
-
- Whis this parameter is -1, it indicates to get a randomly
- selected port number.
-*/
-
- if (alias_port_param == GET_ALIAS_PORT)
- {
- /*
- * The aliasing port is automatically selected
- * by one of two methods below:
- */
- max_trials = GET_NEW_PORT_MAX_ATTEMPTS;
-
- if (packetAliasMode & PKT_ALIAS_SAME_PORTS)
- {
- /*
- * When the ALIAS_SAME_PORTS option is
- * chosen, the first try will be the
- * actual source port. If this is already
- * in use, the remainder of the trials
- * will be random.
- */
- port_net = link->src_port;
- port_sys = ntohs(port_net);
- }
- else
- {
- /* First trial and all subsequent are random. */
- port_sys = random() & ALIAS_PORT_MASK;
- port_sys += ALIAS_PORT_BASE;
- port_net = htons(port_sys);
- }
- }
- else if (alias_port_param >= 0 && alias_port_param < 0x10000)
- {
- link->alias_port = (u_short) alias_port_param;
- return(0);
- }
- else
- {
- fprintf(stderr, "PacketAlias/GetNewPort(): ");
- fprintf(stderr, "input parameter error\n");
- return(-1);
- }
-
-
-/* Port number search */
- for (i=0; i<max_trials; i++)
- {
- int go_ahead;
- struct alias_link *search_result;
-
- search_result = FindLinkIn(link->dst_addr, link->alias_addr,
- link->dst_port, port_net,
- link->link_type, 0);
-
- if (search_result == NULL)
- go_ahead = 1;
- else if (!(link->flags & LINK_PARTIALLY_SPECIFIED)
- && (search_result->flags & LINK_PARTIALLY_SPECIFIED))
- go_ahead = 1;
- else
- go_ahead = 0;
-
- if (go_ahead)
- {
- if ((packetAliasMode && PKT_ALIAS_USE_SOCKETS)
- && (link->flags & LINK_PARTIALLY_SPECIFIED))
- {
- if (GetSocket(port_net, &link->sockfd, link->link_type))
- {
- link->alias_port = port_net;
- return(0);
- }
- }
- else
- {
- link->alias_port = port_net;
- return(0);
- }
- }
-
- port_sys = random() & ALIAS_PORT_MASK;
- port_sys += ALIAS_PORT_BASE;
- port_net = htons(port_sys);
- }
-
- fprintf(stderr, "PacketAlias/GetnewPort(): ");
- fprintf(stderr, "could not find free port\n");
-
- return(-1);
-}
-
-
-static u_short
-GetSocket(u_short port_net, int *sockfd, int link_type)
-{
- int err;
- int sock;
- struct sockaddr_in sock_addr;
-
- if (link_type == LINK_TCP)
- sock = socket(AF_INET, SOCK_STREAM, 0);
- else if (link_type == LINK_UDP)
- sock = socket(AF_INET, SOCK_DGRAM, 0);
- else
- {
- fprintf(stderr, "PacketAlias/GetSocket(): ");
- fprintf(stderr, "incorrect link type\n");
- return(0);
- }
-
- if (sock < 0)
- {
- fprintf(stderr, "PacketAlias/GetSocket(): ");
- fprintf(stderr, "socket() error %d\n", *sockfd);
- return(0);
- }
-
- sock_addr.sin_family = AF_INET;
- sock_addr.sin_addr.s_addr = htonl(INADDR_ANY);
- sock_addr.sin_port = port_net;
-
- err = bind(sock,
- (struct sockaddr *) &sock_addr,
- sizeof(sock_addr));
- if (err == 0)
- {
- sockCount++;
- *sockfd = sock;
- return(1);
- }
- else
- {
- close(sock);
- return(0);
- }
-}
-
-
-static void
-CleanupAliasData(void)
-{
- struct alias_link *link;
- int i, icount;
-
- icount = 0;
- for (i=0; i<LINK_TABLE_OUT_SIZE; i++)
- {
- link = linkTableOut[i];
- linkTableOut[i] = NULL;
- while (link != NULL)
- {
- struct alias_link *link_next;
- link_next = link->next_out;
- icount++;
- DeleteLink(link);
- link = link_next;
- }
- }
-
- cleanupIndex =0;
-}
-
-
-static void
-IncrementalCleanup(void)
-{
- int icount;
- struct alias_link *link;
-
- icount = 0;
- link = linkTableOut[cleanupIndex++];
- while (link != NULL)
- {
- int idelta;
- struct alias_link *link_next;
-
- link_next = link->next_out;
- idelta = timeStamp - link->timestamp;
- switch (link->link_type)
- {
- case LINK_ICMP:
- case LINK_UDP:
- case LINK_FRAGMENT_ID:
- case LINK_FRAGMENT_PTR:
- if (idelta > link->expire_time)
- {
- DeleteLink(link);
- icount++;
- }
- break;
- case LINK_TCP:
- if (idelta > link->expire_time)
- {
- struct tcp_dat *tcp_aux;
-
- tcp_aux = link->data.tcp;
- if (tcp_aux->state.in != ALIAS_TCP_STATE_CONNECTED
- || tcp_aux->state.out != ALIAS_TCP_STATE_CONNECTED)
- {
- DeleteLink(link);
- icount++;
- }
- }
- break;
- }
- link = link_next;
- }
-
- if (cleanupIndex == LINK_TABLE_OUT_SIZE)
- cleanupIndex = 0;
-}
-
-void
-DeleteLink(struct alias_link *link)
-{
- struct alias_link *link_last;
- struct alias_link *link_next;
-
-/* Don't do anything if the link is marked permanent */
- if (deleteAllLinks == 0 && link->flags & LINK_PERMANENT)
- return;
-
-/* Delete associatied firewall hole, if any */
- ClearFWHole(link);
-
-/* Adjust output table pointers */
- link_last = link->last_out;
- link_next = link->next_out;
-
- if (link_last != NULL)
- link_last->next_out = link_next;
- else
- linkTableOut[link->start_point_out] = link_next;
-
- if (link_next != NULL)
- link_next->last_out = link_last;
-
-/* Adjust input table pointers */
- link_last = link->last_in;
- link_next = link->next_in;
-
- if (link_last != NULL)
- link_last->next_in = link_next;
- else
- linkTableIn[link->start_point_in] = link_next;
-
- if (link_next != NULL)
- link_next->last_in = link_last;
-
-/* Close socket, if one has been allocated */
- if (link->sockfd != -1)
- {
- sockCount--;
- close(link->sockfd);
- }
-
-/* Link-type dependent cleanup */
- switch(link->link_type)
- {
- case LINK_ICMP:
- icmpLinkCount--;
- break;
- case LINK_UDP:
- udpLinkCount--;
- break;
- case LINK_TCP:
- tcpLinkCount--;
- if (link->data.tcp != NULL)
- free(link->data.tcp);
- break;
- case LINK_FRAGMENT_ID:
- fragmentIdLinkCount--;
- break;
- case LINK_FRAGMENT_PTR:
- fragmentPtrLinkCount--;
- if (link->data.frag_ptr != NULL)
- free(link->data.frag_ptr);
- break;
- }
-
-/* Free memory */
- free(link);
-
-/* Write statistics, if logging enabled */
- if (packetAliasMode & PKT_ALIAS_LOG)
- {
- ShowAliasStats();
- }
-}
-
-
-static struct alias_link *
-AddLink(struct in_addr src_addr,
- struct in_addr dst_addr,
- struct in_addr alias_addr,
- u_short src_port,
- u_short dst_port,
- int alias_port_param, /* if less than zero, alias */
- int link_type) /* port will be automatically */
-{ /* chosen. If greater than */
- u_int start_point; /* zero, equal to alias port */
- struct alias_link *link;
- struct alias_link *first_link;
-
- link = malloc(sizeof(struct alias_link));
- if (link != NULL)
- {
- /* If either the aliasing address or source address are
- equal to the default device address (equal to the
- global variable aliasAddress), then set the alias
- address field of the link record to zero */
-
- if (src_addr.s_addr == aliasAddress.s_addr)
- src_addr.s_addr = 0;
-
- if (alias_addr.s_addr == aliasAddress.s_addr)
- alias_addr.s_addr = 0;
-
- /* Basic initialization */
- link->src_addr = src_addr;
- link->dst_addr = dst_addr;
- link->src_port = src_port;
- link->alias_addr = alias_addr;
- link->dst_port = dst_port;
- link->link_type = link_type;
- link->sockfd = -1;
- link->flags = 0;
- link->timestamp = timeStamp;
-
- /* Expiration time */
- switch (link_type)
- {
- case LINK_ICMP:
- link->expire_time = ICMP_EXPIRE_TIME;
- break;
- case LINK_UDP:
- link->expire_time = UDP_EXPIRE_TIME;
- break;
- case LINK_TCP:
- link->expire_time = TCP_EXPIRE_INITIAL;
- break;
- case LINK_FRAGMENT_ID:
- link->expire_time = FRAGMENT_ID_EXPIRE_TIME;
- break;
- case LINK_FRAGMENT_PTR:
- link->expire_time = FRAGMENT_PTR_EXPIRE_TIME;
- break;
- }
-
- /* Determine alias flags */
- if (dst_addr.s_addr == 0)
- link->flags |= LINK_UNKNOWN_DEST_ADDR;
- if (dst_port == 0)
- link->flags |= LINK_UNKNOWN_DEST_PORT;
-
- /* Determine alias port */
- if (GetNewPort(link, alias_port_param) != 0)
- {
- free(link);
- return(NULL);
- }
-
- /* Set up pointers for output lookup table */
- start_point = StartPointOut(src_addr, dst_addr,
- src_port, dst_port, link_type);
- first_link = linkTableOut[start_point];
-
- link->last_out = NULL;
- link->next_out = first_link;
- link->start_point_out = start_point;
-
- if (first_link != NULL)
- first_link->last_out = link;
-
- linkTableOut[start_point] = link;
-
- /* Set up pointers for input lookup table */
- start_point = StartPointIn(alias_addr, link->alias_port, link_type);
- first_link = linkTableIn[start_point];
-
- link->last_in = NULL;
- link->next_in = first_link;
- link->start_point_in = start_point;
-
- if (first_link != NULL)
- first_link->last_in = link;
-
- linkTableIn[start_point] = link;
-
- /* Link-type dependent initialization */
- switch(link_type)
- {
- struct tcp_dat *aux_tcp;
-
- case LINK_ICMP:
- icmpLinkCount++;
- break;
- case LINK_UDP:
- udpLinkCount++;
- break;
- case LINK_TCP:
- aux_tcp = malloc(sizeof(struct tcp_dat));
- link->data.tcp = aux_tcp;
- if (aux_tcp != NULL)
- {
- int i;
-
- tcpLinkCount++;
- aux_tcp->state.in = ALIAS_TCP_STATE_NOT_CONNECTED;
- aux_tcp->state.out = ALIAS_TCP_STATE_NOT_CONNECTED;
- aux_tcp->state.index = 0;
- aux_tcp->state.ack_modified = 0;
- for (i=0; i<N_LINK_TCP_DATA; i++)
- aux_tcp->ack[i].active = 0;
- aux_tcp->fwhole = -1;
- }
- else
- {
- fprintf(stderr, "PacketAlias/AddLink: ");
- fprintf(stderr, " cannot allocate auxiliary TCP data\n");
- }
- break;
- case LINK_FRAGMENT_ID:
- fragmentIdLinkCount++;
- break;
- case LINK_FRAGMENT_PTR:
- fragmentPtrLinkCount++;
- break;
- }
- }
- else
- {
- fprintf(stderr, "PacketAlias/AddLink(): ");
- fprintf(stderr, "malloc() call failed.\n");
- }
-
- if (packetAliasMode & PKT_ALIAS_LOG)
- {
- ShowAliasStats();
- }
-
- return(link);
-}
-
-static struct alias_link *
-ReLink(struct alias_link *old_link,
- struct in_addr src_addr,
- struct in_addr dst_addr,
- struct in_addr alias_addr,
- u_short src_port,
- u_short dst_port,
- int alias_port_param, /* if less than zero, alias */
- int link_type) /* port will be automatically */
-{ /* chosen. If greater than */
- struct alias_link *new_link; /* zero, equal to alias port */
-
- new_link = AddLink(src_addr, dst_addr, alias_addr,
- src_port, dst_port, alias_port_param,
- link_type);
- if (new_link != NULL &&
- old_link->link_type == LINK_TCP &&
- old_link->data.tcp &&
- old_link->data.tcp->fwhole > 0) {
- PunchFWHole(new_link);
- }
- DeleteLink(old_link);
- return new_link;
-}
-
-static struct alias_link *
-FindLinkOut(struct in_addr src_addr,
- struct in_addr dst_addr,
- u_short src_port,
- u_short dst_port,
- int link_type)
-{
- u_int i;
- struct alias_link *link;
-
- if (src_addr.s_addr == aliasAddress.s_addr)
- src_addr.s_addr = 0;
-
- i = StartPointOut(src_addr, dst_addr, src_port, dst_port, link_type);
- link = linkTableOut[i];
- while (link != NULL)
- {
- if (link->src_addr.s_addr == src_addr.s_addr
- && link->dst_addr.s_addr == dst_addr.s_addr
- && link->dst_port == dst_port
- && link->src_port == src_port
- && link->link_type == link_type)
- {
- link->timestamp = timeStamp;
- break;
- }
- link = link->next_out;
- }
-
- return(link);
-}
-
-
-struct alias_link *
-FindLinkIn(struct in_addr dst_addr,
- struct in_addr alias_addr,
- u_short dst_port,
- u_short alias_port,
- int link_type,
- int replace_partial_links)
-{
- int flags_in;
- u_int start_point;
- struct alias_link *link;
- struct alias_link *link_fully_specified;
- struct alias_link *link_unknown_all;
- struct alias_link *link_unknown_dst_addr;
- struct alias_link *link_unknown_dst_port;
-
-/* Initialize pointers */
- link_fully_specified = NULL;
- link_unknown_all = NULL;
- link_unknown_dst_addr = NULL;
- link_unknown_dst_port = NULL;
-
-/* If either the dest addr or port is unknown, the search
- loop will have to know about this. */
-
- flags_in = 0;
- if (dst_addr.s_addr == 0)
- flags_in |= LINK_UNKNOWN_DEST_ADDR;
- if (dst_port == 0)
- flags_in |= LINK_UNKNOWN_DEST_PORT;
-
-/* The following allows permanent links to be
- be specified as using the default aliasing address
- (i.e. device interface address) without knowing
- in advance what that address is. */
-
- if (alias_addr.s_addr == aliasAddress.s_addr)
- alias_addr.s_addr = 0;
-
-/* Search loop */
- start_point = StartPointIn(alias_addr, alias_port, link_type);
- link = linkTableIn[start_point];
- while (link != NULL)
- {
- int flags;
-
- flags = flags_in | link->flags;
- if (!(flags & LINK_PARTIALLY_SPECIFIED))
- {
- if (link->alias_addr.s_addr == alias_addr.s_addr
- && link->alias_port == alias_port
- && link->dst_addr.s_addr == dst_addr.s_addr
- && link->dst_port == dst_port
- && link->link_type == link_type)
- {
- link_fully_specified = link;
- break;
- }
- }
- else if ((flags & LINK_UNKNOWN_DEST_ADDR)
- && (flags & LINK_UNKNOWN_DEST_PORT))
- {
- if (link->alias_addr.s_addr == alias_addr.s_addr
- && link->alias_port == alias_port
- && link->link_type == link_type)
- {
- if (link_unknown_all == NULL)
- link_unknown_all = link;
- }
- }
- else if (flags & LINK_UNKNOWN_DEST_ADDR)
- {
- if (link->alias_addr.s_addr == alias_addr.s_addr
- && link->alias_port == alias_port
- && link->link_type == link_type
- && link->dst_port == dst_port)
- {
- if (link_unknown_dst_addr == NULL)
- link_unknown_dst_addr = link;
- }
- }
- else if (flags & LINK_UNKNOWN_DEST_PORT)
- {
- if (link->alias_addr.s_addr == alias_addr.s_addr
- && link->alias_port == alias_port
- && link->link_type == link_type
- && link->dst_addr.s_addr == dst_addr.s_addr)
- {
- if (link_unknown_dst_port == NULL)
- link_unknown_dst_port = link;
- }
- }
- link = link->next_in;
- }
-
-
-
- if (link_fully_specified != NULL)
- {
- return link_fully_specified;
- }
- else if (link_unknown_dst_port != NULL)
- {
- return replace_partial_links
- ? ReLink(link_unknown_dst_port,
- link_unknown_dst_port->src_addr, dst_addr, alias_addr,
- link_unknown_dst_port->src_port, dst_port, alias_port,
- link_type)
- : link_unknown_dst_port;
- }
- else if (link_unknown_dst_addr != NULL)
- {
- return replace_partial_links
- ? ReLink(link_unknown_dst_addr,
- link_unknown_dst_addr->src_addr, dst_addr, alias_addr,
- link_unknown_dst_addr->src_port, dst_port, alias_port,
- link_type)
- : link_unknown_dst_addr;
- }
- else if (link_unknown_all != NULL)
- {
- return replace_partial_links
- ? ReLink(link_unknown_all,
- link_unknown_all->src_addr, dst_addr, alias_addr,
- link_unknown_all->src_port, dst_port, alias_port,
- link_type)
- : link_unknown_all;
- }
- else
- {
- return(NULL);
- }
-}
-
-
-
-
-/* External routines for finding/adding links
-
--- "external" means outside alias_db.c, but within alias*.c --
-
- FindIcmpIn(), FindIcmpOut()
- FindFragmentIn1(), FindFragmentIn2()
- AddFragmentPtrLink(), FindFragmentPtr()
- FindUdpTcpIn(), FindUdpTcpOut()
- FindOriginalAddress(), FindAliasAddress()
-
-(prototypes in alias_local.h)
-*/
-
-
-struct alias_link *
-FindIcmpIn(struct in_addr dst_addr,
- struct in_addr alias_addr,
- u_short id_alias)
-{
- return FindLinkIn(dst_addr, alias_addr,
- NO_DEST_PORT, id_alias,
- LINK_ICMP, 0);
-}
-
-
-struct alias_link *
-FindIcmpOut(struct in_addr src_addr,
- struct in_addr dst_addr,
- u_short id)
-{
- struct alias_link * link;
-
- link = FindLinkOut(src_addr, dst_addr,
- id, NO_DEST_PORT,
- LINK_ICMP);
- if (link == NULL)
- {
- struct in_addr alias_addr;
-
- alias_addr = FindAliasAddress(src_addr);
- link = AddLink(src_addr, dst_addr, alias_addr,
- id, NO_DEST_PORT, GET_ALIAS_ID,
- LINK_ICMP);
- }
-
- return(link);
-}
-
-
-struct alias_link *
-FindFragmentIn1(struct in_addr dst_addr,
- struct in_addr alias_addr,
- u_short ip_id)
-{
- struct alias_link *link;
-
- link = FindLinkIn(dst_addr, alias_addr,
- NO_DEST_PORT, ip_id,
- LINK_FRAGMENT_ID, 0);
-
- if (link == NULL)
- {
- link = AddLink(nullAddress, dst_addr, alias_addr,
- NO_SRC_PORT, NO_DEST_PORT, ip_id,
- LINK_FRAGMENT_ID);
- }
-
- return(link);
-}
-
-
-struct alias_link *
-FindFragmentIn2(struct in_addr dst_addr, /* Doesn't add a link if one */
- struct in_addr alias_addr, /* is not found. */
- u_short ip_id)
-{
- return FindLinkIn(dst_addr, alias_addr,
- NO_DEST_PORT, ip_id,
- LINK_FRAGMENT_ID, 0);
-}
-
-
-struct alias_link *
-AddFragmentPtrLink(struct in_addr dst_addr,
- u_short ip_id)
-{
- return AddLink(nullAddress, dst_addr, nullAddress,
- NO_SRC_PORT, NO_DEST_PORT, ip_id,
- LINK_FRAGMENT_PTR);
-}
-
-
-struct alias_link *
-FindFragmentPtr(struct in_addr dst_addr,
- u_short ip_id)
-{
- return FindLinkIn(dst_addr, nullAddress,
- NO_DEST_PORT, ip_id,
- LINK_FRAGMENT_PTR, 0);
-}
-
-
-struct alias_link *
-FindUdpTcpIn(struct in_addr dst_addr,
- struct in_addr alias_addr,
- u_short dst_port,
- u_short alias_port,
- u_char proto)
-{
- int link_type;
- struct alias_link *link;
-
- switch (proto)
- {
- case IPPROTO_UDP:
- link_type = LINK_UDP;
- break;
- case IPPROTO_TCP:
- link_type = LINK_TCP;
- break;
- default:
- return NULL;
- break;
- }
-
- link = FindLinkIn(dst_addr, alias_addr,
- dst_port, alias_port,
- link_type, 1);
-
- if ( !(packetAliasMode & PKT_ALIAS_DENY_INCOMING) && link == NULL)
- {
- struct in_addr target_addr;
-
- target_addr = FindOriginalAddress(alias_addr);
- link = AddLink(target_addr, dst_addr, alias_addr,
- alias_port, dst_port, alias_port,
- link_type);
- }
-
- return(link);
-}
-
-
-struct alias_link *
-FindUdpTcpOut(struct in_addr src_addr,
- struct in_addr dst_addr,
- u_short src_port,
- u_short dst_port,
- u_char proto)
-{
- int link_type;
- struct alias_link *link;
-
- switch (proto)
- {
- case IPPROTO_UDP:
- link_type = LINK_UDP;
- break;
- case IPPROTO_TCP:
- link_type = LINK_TCP;
- break;
- default:
- return NULL;
- break;
- }
-
- link = FindLinkOut(src_addr, dst_addr, src_port, dst_port, link_type);
-
- if (link == NULL)
- {
- struct in_addr alias_addr;
-
- alias_addr = FindAliasAddress(src_addr);
- link = AddLink(src_addr, dst_addr, alias_addr,
- src_port, dst_port, GET_ALIAS_PORT,
- link_type);
- }
-
- return(link);
-}
-
-
-struct in_addr
-FindOriginalAddress(struct in_addr alias_addr)
-{
- struct alias_link *link;
-
- link = FindLinkIn(nullAddress, alias_addr,
- 0, 0, LINK_ADDR, 0);
- if (link == NULL)
- {
- newDefaultLink = 1;
- if (targetAddress.s_addr != 0)
- return targetAddress;
- else
- return alias_addr;
- }
- else
- {
- if (link->src_addr.s_addr == 0)
- return aliasAddress;
- else
- return link->src_addr;
- }
-}
-
-
-struct in_addr
-FindAliasAddress(struct in_addr original_addr)
-{
- struct alias_link *link;
-
- link = FindLinkOut(original_addr, nullAddress,
- 0, 0, LINK_ADDR);
- if (link == NULL)
- {
- return aliasAddress;
- }
- else
- {
- if (link->alias_addr.s_addr == 0)
- return aliasAddress;
- else
- return link->alias_addr;
- }
-}
-
-
-/* External routines for getting or changing link data
- (external to alias_db.c, but internal to alias*.c)
-
- SetFragmentData(), GetFragmentData()
- SetFragmentPtr(), GetFragmentPtr()
- SetStateIn(), SetStateOut(), GetStateIn(), GetStateOut()
- GetOriginalAddress(), GetDestAddress(), GetAliasAddress()
- GetOriginalPort(), GetAliasPort()
- SetAckModified(), GetAckModified()
- GetDeltaAckIn(), GetDeltaSeqOut(), AddSeq()
-*/
-
-
-void
-SetFragmentAddr(struct alias_link *link, struct in_addr src_addr)
-{
- link->data.frag_addr = src_addr;
-}
-
-
-void
-GetFragmentAddr(struct alias_link *link, struct in_addr *src_addr)
-{
- *src_addr = link->data.frag_addr;
-}
-
-
-void
-SetFragmentPtr(struct alias_link *link, char *fptr)
-{
- link->data.frag_ptr = fptr;
-}
-
-
-void
-GetFragmentPtr(struct alias_link *link, char **fptr)
-{
- *fptr = link->data.frag_ptr;
-}
-
-
-void
-SetStateIn(struct alias_link *link, int state)
-{
- /* TCP input state */
- switch (state) {
- case ALIAS_TCP_STATE_DISCONNECTED:
- if (link->data.tcp->state.out != ALIAS_TCP_STATE_CONNECTED) {
- link->expire_time = TCP_EXPIRE_DEAD;
- } else {
- link->expire_time = TCP_EXPIRE_SINGLEDEAD;
- }
- link->data.tcp->state.in = state;
- break;
- case ALIAS_TCP_STATE_CONNECTED:
- link->expire_time = TCP_EXPIRE_CONNECTED;
- /*FALLTHROUGH*/
- case ALIAS_TCP_STATE_NOT_CONNECTED:
- link->data.tcp->state.in = state;
- break;
- default:
- abort();
- }
-}
-
-
-void
-SetStateOut(struct alias_link *link, int state)
-{
- /* TCP output state */
- switch (state) {
- case ALIAS_TCP_STATE_DISCONNECTED:
- if (link->data.tcp->state.in != ALIAS_TCP_STATE_CONNECTED) {
- link->expire_time = TCP_EXPIRE_DEAD;
- } else {
- link->expire_time = TCP_EXPIRE_SINGLEDEAD;
- }
- link->data.tcp->state.out = state;
- break;
- case ALIAS_TCP_STATE_CONNECTED:
- link->expire_time = TCP_EXPIRE_CONNECTED;
- /*FALLTHROUGH*/
- case ALIAS_TCP_STATE_NOT_CONNECTED:
- link->data.tcp->state.out = state;
- break;
- default:
- abort();
- }
-}
-
-
-int
-GetStateIn(struct alias_link *link)
-{
- /* TCP input state */
- return link->data.tcp->state.in;
-}
-
-
-int
-GetStateOut(struct alias_link *link)
-{
- /* TCP output state */
- return link->data.tcp->state.out;
-}
-
-
-struct in_addr
-GetOriginalAddress(struct alias_link *link)
-{
- if (link->src_addr.s_addr == 0)
- return aliasAddress;
- else
- return(link->src_addr);
-}
-
-
-struct in_addr
-GetDestAddress(struct alias_link *link)
-{
- return(link->dst_addr);
-}
-
-
-struct in_addr
-GetAliasAddress(struct alias_link *link)
-{
- if (link->alias_addr.s_addr == 0)
- return aliasAddress;
- else
- return link->alias_addr;
-}
-
-
-struct in_addr
-GetDefaultAliasAddress()
-{
- return aliasAddress;
-}
-
-
-void
-SetDefaultAliasAddress(struct in_addr alias_addr)
-{
- aliasAddress = alias_addr;
-}
-
-
-u_short
-GetOriginalPort(struct alias_link *link)
-{
- return(link->src_port);
-}
-
-
-u_short
-GetAliasPort(struct alias_link *link)
-{
- return(link->alias_port);
-}
-
-u_short
-GetDestPort(struct alias_link *link)
-{
- return(link->dst_port);
-}
-
-void
-SetAckModified(struct alias_link *link)
-{
-/* Indicate that ack numbers have been modified in a TCP connection */
- link->data.tcp->state.ack_modified = 1;
-}
-
-
-int
-GetAckModified(struct alias_link *link)
-{
-/* See if ack numbers have been modified */
- return link->data.tcp->state.ack_modified;
-}
-
-
-int
-GetDeltaAckIn(struct ip *pip, struct alias_link *link)
-{
-/*
-Find out how much the ack number has been altered for an incoming
-TCP packet. To do this, a circular list is ack numbers where the TCP
-packet size was altered is searched.
-*/
-
- int i;
- struct tcphdr *tc;
- int delta, ack_diff_min;
- u_long ack;
-
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
- ack = tc->th_ack;
-
- delta = 0;
- ack_diff_min = -1;
- for (i=0; i<N_LINK_TCP_DATA; i++)
- {
- struct ack_data_record x;
-
- x = link->data.tcp->ack[i];
- if (x.active == 1)
- {
- int ack_diff;
-
- ack_diff = SeqDiff(x.ack_new, ack);
- if (ack_diff >= 0)
- {
- if (ack_diff_min >= 0)
- {
- if (ack_diff < ack_diff_min)
- {
- delta = x.delta;
- ack_diff_min = ack_diff;
- }
- }
- else
- {
- delta = x.delta;
- ack_diff_min = ack_diff;
- }
- }
- }
- }
- return (delta);
-}
-
-
-int
-GetDeltaSeqOut(struct ip *pip, struct alias_link *link)
-{
-/*
-Find out how much the seq number has been altered for an outgoing
-TCP packet. To do this, a circular list is ack numbers where the TCP
-packet size was altered is searched.
-*/
-
- int i;
- struct tcphdr *tc;
- int delta, seq_diff_min;
- u_long seq;
-
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
- seq = tc->th_seq;
-
- delta = 0;
- seq_diff_min = -1;
- for (i=0; i<N_LINK_TCP_DATA; i++)
- {
- struct ack_data_record x;
-
- x = link->data.tcp->ack[i];
- if (x.active == 1)
- {
- int seq_diff;
-
- seq_diff = SeqDiff(x.ack_old, seq);
- if (seq_diff >= 0)
- {
- if (seq_diff_min >= 0)
- {
- if (seq_diff < seq_diff_min)
- {
- delta = x.delta;
- seq_diff_min = seq_diff;
- }
- }
- else
- {
- delta = x.delta;
- seq_diff_min = seq_diff;
- }
- }
- }
- }
- return (delta);
-}
-
-
-void
-AddSeq(struct ip *pip, struct alias_link *link, int delta)
-{
-/*
-When a TCP packet has been altered in length, save this
-information in a circular list. If enough packets have
-been altered, then this list will begin to overwrite itself.
-*/
-
- struct tcphdr *tc;
- struct ack_data_record x;
- int hlen, tlen, dlen;
- int i;
-
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
-
- hlen = (pip->ip_hl + tc->th_off) << 2;
- tlen = ntohs(pip->ip_len);
- dlen = tlen - hlen;
-
- x.ack_old = htonl(ntohl(tc->th_seq) + dlen);
- x.ack_new = htonl(ntohl(tc->th_seq) + dlen + delta);
- x.delta = delta;
- x.active = 1;
-
- i = link->data.tcp->state.index;
- link->data.tcp->ack[i] = x;
-
- i++;
- if (i == N_LINK_TCP_DATA)
- link->data.tcp->state.index = 0;
- else
- link->data.tcp->state.index = i;
-}
-
-void
-SetExpire(struct alias_link *link, int expire)
-{
- if (expire == 0)
- {
- link->flags &= ~LINK_PERMANENT;
- DeleteLink(link);
- }
- else if (expire == -1)
- {
- link->flags |= LINK_PERMANENT;
- }
- else if (expire > 0)
- {
- link->expire_time = expire;
- }
- else
- {
- fprintf(stderr, "PacketAlias/SetExpire(): ");
- fprintf(stderr, "error in expire parameter\n");
- }
-}
-
-void
-ClearCheckNewLink(void)
-{
- newDefaultLink = 0;
-}
-
-
-/* Miscellaneous Functions
-
- HouseKeeping()
- InitPacketAliasLog()
- UninitPacketAliasLog()
-*/
-
-/*
- Whenever an outgoing or incoming packet is handled, HouseKeeping()
- is called to find and remove timed-out aliasing links. Logic exists
- to sweep through the entire table and linked list structure
- every 60 seconds.
-
- (prototype in alias_local.h)
-*/
-
-void
-HouseKeeping(void)
-{
- int i, n, n100;
- struct timeval tv;
- struct timezone tz;
-
- /*
- * Save system time (seconds) in global variable timeStamp for
- * use by other functions. This is done so as not to unnecessarily
- * waste timeline by making system calls.
- */
- gettimeofday(&tv, &tz);
- timeStamp = tv.tv_sec;
-
- /* Compute number of spokes (output table link chains) to cover */
- n100 = LINK_TABLE_OUT_SIZE * 100 + houseKeepingResidual;
- n100 *= timeStamp - lastCleanupTime;
- n100 /= ALIAS_CLEANUP_INTERVAL_SECS;
-
- n = n100/100;
-
- /* Handle different cases */
- if (n > ALIAS_CLEANUP_MAX_SPOKES)
- {
- n = ALIAS_CLEANUP_MAX_SPOKES;
- lastCleanupTime = timeStamp;
- houseKeepingResidual = 0;
-
- for (i=0; i<n; i++)
- IncrementalCleanup();
- }
- else if (n > 0)
- {
- lastCleanupTime = timeStamp;
- houseKeepingResidual = n100 - 100*n;
-
- for (i=0; i<n; i++)
- IncrementalCleanup();
- }
- else if (n < 0)
- {
- fprintf(stderr, "PacketAlias/HouseKeeping(): ");
- fprintf(stderr, "something unexpected in time values\n");
- lastCleanupTime = timeStamp;
- houseKeepingResidual = 0;
- }
-}
-
-
-/* Init the log file and enable logging */
-static void
-InitPacketAliasLog(void)
-{
- if ((~packetAliasMode & PKT_ALIAS_LOG)
- && (monitorFile = fopen("/var/log/alias.log", "w")))
- {
- packetAliasMode |= PKT_ALIAS_LOG;
- fprintf(monitorFile,
- "PacketAlias/InitPacketAliasLog: Packet alias logging enabled.\n");
- }
-}
-
-
-/* Close the log-file and disable logging. */
-static void
-UninitPacketAliasLog(void)
-{
- if( monitorFile )
- fclose(monitorFile);
- packetAliasMode &= ~PKT_ALIAS_LOG;
-}
-
-
-
-
-
-
-/* Outside world interfaces
-
--- "outside world" means other than alias*.c routines --
-
- PacketAliasRedirectPort()
- PacketAliasRedirectAddr()
- PacketAliasRedirectDelete()
- PacketAliasSetAddress()
- PacketAliasInit()
- PacketAliasUninit()
- PacketAliasSetMode()
-
-(prototypes in alias.h)
-*/
-
-/* Redirection from a specific public addr:port to a
- a private addr:port */
-struct alias_link *
-PacketAliasRedirectPort(struct in_addr src_addr, u_short src_port,
- struct in_addr dst_addr, u_short dst_port,
- struct in_addr alias_addr, u_short alias_port,
- u_char proto)
-{
- int link_type;
- struct alias_link *link;
-
- switch(proto)
- {
- case IPPROTO_UDP:
- link_type = LINK_UDP;
- break;
- case IPPROTO_TCP:
- link_type = LINK_TCP;
- break;
- default:
- fprintf(stderr, "PacketAliasRedirectPort(): ");
- fprintf(stderr, "only TCP and UDP protocols allowed\n");
- return NULL;
- }
-
- link = AddLink(src_addr, dst_addr, alias_addr,
- src_port, dst_port, alias_port,
- link_type);
-
- if (link != NULL)
- {
- link->flags |= LINK_PERMANENT;
- }
- else
- {
- fprintf(stderr, "PacketAliasRedirectPort(): "
- "call to AddLink() failed\n");
- }
-
- return link;
-}
-
-
-/* Static address translation */
-struct alias_link *
-PacketAliasRedirectAddr(struct in_addr src_addr,
- struct in_addr alias_addr)
-{
- struct alias_link *link;
-
- link = AddLink(src_addr, nullAddress, alias_addr,
- 0, 0, 0,
- LINK_ADDR);
-
- if (link != NULL)
- {
- link->flags |= LINK_PERMANENT;
- }
- else
- {
- fprintf(stderr, "PacketAliasRedirectAddr(): "
- "call to AddLink() failed\n");
- }
-
- return link;
-}
-
-
-void
-PacketAliasRedirectDelete(struct alias_link *link)
-{
-/* This is a dangerous function to put in the API,
- because an invalid pointer can crash the program. */
-
- deleteAllLinks = 1;
- DeleteLink(link);
- deleteAllLinks = 0;
-}
-
-
-void
-PacketAliasSetAddress(struct in_addr addr)
-{
- if (packetAliasMode & PKT_ALIAS_RESET_ON_ADDR_CHANGE
- && aliasAddress.s_addr != addr.s_addr)
- {
- CleanupAliasData();
- aliasAddress = addr;
- }
-}
-
-
-void
-PacketAliasSetTarget(struct in_addr target_addr)
-{
- targetAddress = target_addr;
-}
-
-
-void
-PacketAliasInit(void)
-{
- int i;
- struct timeval tv;
- struct timezone tz;
- static int firstCall = 1;
-
- if (firstCall == 1)
- {
- gettimeofday(&tv, &tz);
- timeStamp = tv.tv_sec;
- lastCleanupTime = tv.tv_sec;
- houseKeepingResidual = 0;
-
- for (i=0; i<LINK_TABLE_OUT_SIZE; i++)
- linkTableOut[i] = NULL;
- for (i=0; i<LINK_TABLE_IN_SIZE; i++)
- linkTableIn[i] = NULL;
-
- atexit(PacketAliasUninit);
- firstCall = 0;
- }
- else
- {
- deleteAllLinks = 1;
- CleanupAliasData();
- deleteAllLinks = 0;
- }
-
- aliasAddress.s_addr = 0;
- targetAddress.s_addr = 0;
-
- icmpLinkCount = 0;
- udpLinkCount = 0;
- tcpLinkCount = 0;
- fragmentIdLinkCount = 0;
- fragmentPtrLinkCount = 0;
- sockCount = 0;
-
- cleanupIndex =0;
-
- packetAliasMode = PKT_ALIAS_SAME_PORTS
- | PKT_ALIAS_USE_SOCKETS
- | PKT_ALIAS_RESET_ON_ADDR_CHANGE;
-}
-
-void
-PacketAliasUninit(void) {
- deleteAllLinks = 1;
- CleanupAliasData();
- deleteAllLinks = 0;
- UninitPacketAliasLog();
- UninitPunchFW();
-}
-
-
-/* Change mode for some operations */
-unsigned int
-PacketAliasSetMode(
- unsigned int flags, /* Which state to bring flags to */
- unsigned int mask /* Mask of which flags to affect (use 0 to do a
- probe for flag values) */
-)
-{
-/* Enable logging? */
- if (flags & mask & PKT_ALIAS_LOG)
- {
- InitPacketAliasLog(); /* Do the enable */
- } else
-/* _Disable_ logging? */
- if (~flags & mask & PKT_ALIAS_LOG) {
- UninitPacketAliasLog();
- }
-
-/* Start punching holes in the firewall? */
- if (flags & mask & PKT_ALIAS_PUNCH_FW) {
- InitPunchFW();
- } else
-/* Stop punching holes in the firewall? */
- if (~flags & mask & PKT_ALIAS_PUNCH_FW) {
- UninitPunchFW();
- }
-
-/* Other flags can be set/cleared without special action */
- packetAliasMode = (flags & mask) | (packetAliasMode & ~mask);
- return packetAliasMode;
-}
-
-
-int
-PacketAliasCheckNewLink(void)
-{
- return newDefaultLink;
-}
-
-
-/*****************
- Code to support firewall punching. This shouldn't really be in this
- file, but making variables global is evil too.
- ****************/
-
-/* Firewall include files */
-#include <sys/queue.h>
-#include <net/if.h>
-#include <netinet/ip_fw.h>
-#include <string.h>
-#include <err.h>
-
-static void ClearAllFWHoles(void);
-
-static int fireWallBaseNum; /* The first firewall entry free for our use */
-static int fireWallNumNums; /* How many entries can we use? */
-static int fireWallActiveNum; /* Which entry did we last use? */
-static char *fireWallField; /* bool array for entries */
-
-#define fw_setfield(field, num) \
-do { \
- (field)[num] = 1; \
-} /*lint -save -e717 */ while(0) /*lint -restore */
-#define fw_clrfield(field, num) \
-do { \
- (field)[num] = 0; \
-} /*lint -save -e717 */ while(0) /*lint -restore */
-#define fw_tstfield(field, num) ((field)[num])
-
-void
-PacketAliasSetFWBase(unsigned int base, unsigned int num) {
- fireWallBaseNum = base;
- fireWallNumNums = num;
-}
-
-static void
-InitPunchFW(void) {
- fireWallField = malloc(fireWallNumNums);
- if (fireWallField) {
- memset(fireWallField, 0, fireWallNumNums);
- if (fireWallFD < 0) {
- fireWallFD = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
- }
- ClearAllFWHoles();
- fireWallActiveNum = fireWallBaseNum;
- }
-}
-
-static void
-UninitPunchFW(void) {
- ClearAllFWHoles();
- if (fireWallFD >= 0)
- close(fireWallFD);
- fireWallFD = -1;
- if (fireWallField)
- free(fireWallField);
- fireWallField = NULL;
- packetAliasMode &= ~PKT_ALIAS_PUNCH_FW;
-}
-
-/* Make a certain link go through the firewall */
-void
-PunchFWHole(struct alias_link *link) {
- int r; /* Result code */
- struct ip_fw rule; /* On-the-fly built rule */
- int fwhole; /* Where to punch hole */
-
-/* Don't do anything unless we are asked to */
- if ( !(packetAliasMode & PKT_ALIAS_PUNCH_FW) ||
- fireWallFD < 0 ||
- link->link_type != LINK_TCP ||
- !link->data.tcp)
- return;
-
- memset(&rule, 0, sizeof rule);
-
-/** Build rule **/
-
- /* Find empty slot */
- for (fwhole = fireWallActiveNum;
- fwhole < fireWallBaseNum + fireWallNumNums &&
- fw_tstfield(fireWallField, fwhole);
- fwhole++)
- ;
- if (fwhole >= fireWallBaseNum + fireWallNumNums ||
- fw_tstfield(fireWallField, fwhole)) {
- for (fwhole = fireWallBaseNum;
- fwhole < fireWallActiveNum &&
- fw_tstfield(fireWallField, fwhole);
- fwhole++)
- ;
- if (fwhole == fireWallActiveNum) {
- /* No rule point empty - we can't punch more holes. */
- fireWallActiveNum = fireWallBaseNum;
- fprintf(stderr, "libalias: Unable to create firewall hole!\n");
- return;
- }
- }
- /* Start next search at next position */
- fireWallActiveNum = fwhole+1;
-
- /* Build generic part of the two rules */
- rule.fw_number = fwhole;
-#if __FreeBSD_version < 300000
- rule.fw_nsp = 1; /* 1 source port */
- rule.fw_ndp = 1; /* 1 destination port */
-#else
- rule.fw_nports = 1; /* Number of source ports; dest ports follow */
-#endif
- rule.fw_flg = IP_FW_F_ACCEPT;
- rule.fw_prot = IPPROTO_TCP;
- rule.fw_smsk.s_addr = INADDR_BROADCAST;
- rule.fw_dmsk.s_addr = INADDR_BROADCAST;
-
- /* Build and apply specific part of the rules */
- rule.fw_src = GetOriginalAddress(link);
- rule.fw_dst = GetDestAddress(link);
- rule.fw_uar.fw_pts[0] = ntohs(GetOriginalPort(link));
- rule.fw_uar.fw_pts[1] = ntohs(GetDestPort(link));
-
- /* Skip non-bound links - XXX should not be strictly necessary,
- but seems to leave hole if not done. Leak of non-bound links?
- (Code should be left even if the problem is fixed - it is a
- clear optimization) */
- if (rule.fw_uar.fw_pts[0] != 0 && rule.fw_uar.fw_pts[1] != 0) {
- r = setsockopt(fireWallFD, IPPROTO_IP, IP_FW_ADD, &rule, sizeof rule);
- if (r)
- err(1, "alias punch inbound(1) setsockopt(IP_FW_ADD)");
- rule.fw_src = GetDestAddress(link);
- rule.fw_dst = GetOriginalAddress(link);
- rule.fw_uar.fw_pts[0] = ntohs(GetDestPort(link));
- rule.fw_uar.fw_pts[1] = ntohs(GetOriginalPort(link));
- r = setsockopt(fireWallFD, IPPROTO_IP, IP_FW_ADD, &rule, sizeof rule);
- if (r)
- err(1, "alias punch inbound(2) setsockopt(IP_FW_ADD)");
- }
-/* Indicate hole applied */
- link->data.tcp->fwhole = fwhole;
- fw_setfield(fireWallField, fwhole);
-}
-
-/* Remove a hole in a firewall associated with a particular alias
- link. Calling this too often is harmless. */
-static void
-ClearFWHole(struct alias_link *link) {
- if (link->link_type == LINK_TCP && link->data.tcp) {
- int fwhole = link->data.tcp->fwhole; /* Where is the firewall hole? */
- struct ip_fw rule;
-
- if (fwhole < 0)
- return;
-
- memset(&rule, 0, sizeof rule);
- rule.fw_number = fwhole;
- while (!setsockopt(fireWallFD, IPPROTO_IP, IP_FW_DEL, &rule, sizeof rule))
- ;
- fw_clrfield(fireWallField, fwhole);
- link->data.tcp->fwhole = -1;
- }
-}
-
-/* Clear out the entire range dedicated to firewall holes. */
-static void
-ClearAllFWHoles(void) {
- struct ip_fw rule; /* On-the-fly built rule */
- int i;
-
- if (fireWallFD < 0)
- return;
-
- memset(&rule, 0, sizeof rule);
- for (i = fireWallBaseNum; i < fireWallBaseNum + fireWallNumNums; i++) {
- rule.fw_number = i;
- while (!setsockopt(fireWallFD, IPPROTO_IP, IP_FW_DEL, &rule, sizeof rule))
- ;
- }
- memset(fireWallField, 0, fireWallNumNums);
-}
diff --git a/lib/libalias/alias_ftp.c b/lib/libalias/alias_ftp.c
deleted file mode 100644
index df6d02c..0000000
--- a/lib/libalias/alias_ftp.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- Alias_ftp.c performs special processing for FTP sessions under
- TCP. Specifically, when a PORT command from the client side
- is sent, it is intercepted and modified. The address is changed
- to the gateway machine and an aliasing port is used.
-
- For this routine to work, the PORT command must fit entirely
- into a single TCP packet. This is typically the case, but exceptions
- can easily be envisioned under the actual specifications.
-
- Probably the most troubling aspect of the approach taken here is
- that the new PORT command will typically be a different length, and
- this causes a certain amount of bookkeeping to keep track of the
- changes of sequence and acknowledgment numbers, since the client
- machine is totally unaware of the modification to the TCP stream.
-
-
- This software is placed into the public domain with no restrictions
- on its distribution.
-
- Initial version: August, 1996 (cjm)
-
- Version 1.6
- Brian Somers and Martin Renters identified an IP checksum
- error for modified IP packets.
-
- Version 1.7: January 9, 1996 (cjm)
- Differental checksum computation for change
- in IP packet length.
-
- Version 2.1: May, 1997 (cjm)
- Very minor changes to conform with
- local/global/function naming conventions
- withing the packet alising module.
-
- See HISTORY file for record of revisions.
-*/
-
-/* Includes */
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
-
-#include "alias_local.h"
-
-static void NewFtpPortCommand(struct ip *, struct alias_link *, struct in_addr, u_short, int);
-
-
-
-void
-AliasHandleFtpOut(
-struct ip *pip, /* IP packet to examine/patch */
-struct alias_link *link, /* The link to go through (aliased port) */
-int maxpacketsize /* The maximum size this packet can grow to (including headers) */)
-{
- int hlen, tlen, dlen;
- struct in_addr true_addr;
- u_short true_port;
- char *sptr;
- struct tcphdr *tc;
-
-/* Calculate data length of TCP packet */
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
- hlen = (pip->ip_hl + tc->th_off) << 2;
- tlen = ntohs(pip->ip_len);
- dlen = tlen - hlen;
-
-/* Return is data length is too long or too short */
- if (dlen<10 || dlen>80)
- return;
-
-/* Place string pointer and beginning of data */
- sptr = (char *) pip;
- sptr += hlen;
-
-/* Parse through string using state diagram method */
- {
- char ch, zero;
- int i, state;
- u_long a1, a2, a3, a4;
- u_short p1, p2;
-
- a1=0; a2=0; a3=0; a4=0; p1=0; p2=0;
- zero = '0';
- state=-4;
- for (i=0; i<dlen; i++)
- {
- ch = sptr[i];
- switch (state)
- {
- case -4: if (ch == 'P') state=-3; else return; break;
- case -3: if (ch == 'O') state=-2; else return; break;
- case -2: if (ch == 'R') state=-1; else return; break;
- case -1: if (ch == 'T') state= 0; else return; break;
-
- case 0 :
- if (isdigit(ch)) {a1=ch-zero; state=1 ;} break;
- case 1 :
- if (isdigit(ch)) a1=10*a1+ch-zero; else state=2 ; break;
- case 2 :
- if (isdigit(ch)) {a2=ch-zero; state=3 ;} break;
- case 3 :
- if (isdigit(ch)) a2=10*a2+ch-zero; else state=4 ; break;
- case 4 :
- if (isdigit(ch)) {a3=ch-zero; state=5 ;} break;
- case 5 :
- if (isdigit(ch)) a3=10*a3+ch-zero; else state=6 ; break;
- case 6 :
- if (isdigit(ch)) {a4=ch-zero; state=7 ;} break;
- case 7 :
- if (isdigit(ch)) a4=10*a4+ch-zero; else state=8 ; break;
- case 8 :
- if (isdigit(ch)) {p1=ch-zero; state=9 ;} break;
- case 9 :
- if (isdigit(ch)) p1=10*p1+ch-zero; else state=10; break;
- case 10:
- if (isdigit(ch)) {p2=ch-zero; state=11;} break;
- case 11:
- if (isdigit(ch)) p2=10*p2+ch-zero; break;
- }
- }
-
- if (state == 11)
- {
- true_port = htons((p1<<8) + p2);
- true_addr.s_addr = htonl((a1<<24) + (a2<<16) +(a3<<8) + a4);
- NewFtpPortCommand(pip, link, true_addr, true_port, maxpacketsize);
- }
- }
-}
-
-static void
-NewFtpPortCommand(struct ip *pip,
- struct alias_link *link,
- struct in_addr true_addr,
- u_short true_port,
- int maxpacketsize)
-{
- struct alias_link *ftp_link;
-
-/* Establish link to address and port found in PORT command */
- ftp_link = FindUdpTcpOut(true_addr, GetDestAddress(link),
- true_port, 0, IPPROTO_TCP);
-
- if (ftp_link != NULL)
- {
- int slen, hlen, tlen, dlen;
- struct tcphdr *tc;
-
-/* Punch hole in firewall */
- PunchFWHole(ftp_link);
-
-/* Calculate data length of TCP packet */
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
- hlen = (pip->ip_hl + tc->th_off) << 2;
- tlen = ntohs(pip->ip_len);
- dlen = tlen - hlen;
-
-/* Create new PORT command */
- {
- char stemp[80];
- char *sptr;
- u_short alias_port;
- u_char *ptr;
- int a1, a2, a3, a4, p1, p2;
- struct in_addr alias_address;
-
-/* Decompose alias address into quad format */
- alias_address = GetAliasAddress(link);
- ptr = (u_char *) &alias_address.s_addr;
- a1 = *ptr++; a2=*ptr++; a3=*ptr++; a4=*ptr;
-
-/* Decompose alias port into pair format */
- alias_port = GetAliasPort(ftp_link);
- ptr = (char *) &alias_port;
- p1 = *ptr++; p2=*ptr;
-
-/* Generate command string */
- sprintf(stemp, "PORT %d,%d,%d,%d,%d,%d\r\n",
- a1,a2,a3,a4,p1,p2);
-
-/* Save string length for IP header modification */
- slen = strlen(stemp);
-
-/* Copy into IP packet */
- sptr = (char *) pip; sptr += hlen;
- strncpy(sptr, stemp, maxpacketsize-hlen);
- }
-
-/* Save information regarding modified seq and ack numbers */
- {
- int delta;
-
- SetAckModified(link);
- delta = GetDeltaSeqOut(pip, link);
- AddSeq(pip, link, delta+slen-dlen);
- }
-
-/* Revise IP header */
- {
- u_short new_len;
-
- new_len = htons(hlen + slen);
- DifferentialChecksum(&pip->ip_sum,
- &new_len,
- &pip->ip_len,
- 1);
- pip->ip_len = new_len;
- }
-
-/* Compute TCP checksum for revised packet */
- tc->th_sum = 0;
- tc->th_sum = TcpChecksum(pip);
- }
- else
- {
- fprintf(stderr,
- "PacketAlias/HandleFtpOut: Cannot allocate FTP data port\n");
- }
-}
diff --git a/lib/libalias/alias_irc.c b/lib/libalias/alias_irc.c
deleted file mode 100644
index 933e3c6..0000000
--- a/lib/libalias/alias_irc.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/* Alias_irc.c intercepts packages contain IRC CTCP commands, and
- changes DCC commands to export a port on the aliasing host instead
- of an aliased host.
-
- For this routine to work, the DCC command must fit entirely into a
- single TCP packet. This will usually happen, but is not
- guaranteed.
-
- The interception is likely to change the length of the packet.
- The handling of this is copied more-or-less verbatim from
- ftp_alias.c
-
- This software is placed into the public domain with no restrictions
- on its distribution.
-
- Initial version: Eivind Eklund <perhaps@yes.no> (ee) 97-01-29
-
- Version 2.1: May, 1997 (cjm)
- Very minor changes to conform with
- local/global/function naming conventions
- withing the packet alising module.
-*/
-
-/* Includes */
-#include <ctype.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
-#include <limits.h>
-
-#include "alias_local.h"
-
-/* Local defines */
-#define DBprintf(a)
-
-
-void
-AliasHandleIrcOut(struct ip *pip, /* IP packet to examine */
- struct alias_link *link, /* Which link are we on? */
- int maxsize /* Maximum size of IP packet including headers */
- )
-{
- int hlen, tlen, dlen;
- struct in_addr true_addr;
- u_short true_port;
- char *sptr;
- struct tcphdr *tc;
- int i; /* Iterator through the source */
-
-/* Calculate data length of TCP packet */
- tc = (struct tcphdr *) ((char *) pip + (pip->ip_hl << 2));
- hlen = (pip->ip_hl + tc->th_off) << 2;
- tlen = ntohs(pip->ip_len);
- dlen = tlen - hlen;
-
- /* Return if data length is too short - assume an entire PRIVMSG in each packet. */
- if (dlen<sizeof(":A!a@n.n PRIVMSG A :aDCC 1 1a")-1)
- return;
-
-/* Place string pointer at beginning of data */
- sptr = (char *) pip;
- sptr += hlen;
- maxsize -= hlen; /* We're interested in maximum size of data, not packet */
-
- /* Search for a CTCP command [Note 1] */
- for( i=0; i<dlen; i++ ) {
- if(sptr[i]=='\001')
- goto lFOUND_CTCP;
- }
- return; /* No CTCP commands in */
- /* Handle CTCP commands - the buffer may have to be copied */
-lFOUND_CTCP:
- {
- char newpacket[65536]; /* Estimate of maximum packet size :) */
- int copyat = i; /* Same */
- int iCopy = 0; /* How much data have we written to copy-back string? */
- unsigned long org_addr; /* Original IP address */
- unsigned short org_port; /* Original source port address */
- lCTCP_START:
- if( i >= dlen || iCopy >= sizeof(newpacket) )
- goto lPACKET_DONE;
- newpacket[iCopy++] = sptr[i++]; /* Copy the CTCP start character */
- /* Start of a CTCP */
- if( i+4 >= dlen ) /* Too short for DCC */
- goto lBAD_CTCP;
- if( sptr[i+0] != 'D' )
- goto lBAD_CTCP;
- if( sptr[i+1] != 'C' )
- goto lBAD_CTCP;
- if( sptr[i+2] != 'C' )
- goto lBAD_CTCP;
- if( sptr[i+3] != ' ' )
- goto lBAD_CTCP;
- /* We have a DCC command - handle it! */
- i+= 4; /* Skip "DCC " */
- if( iCopy+4 > sizeof(newpacket) )
- goto lPACKET_DONE;
- newpacket[iCopy++] = 'D';
- newpacket[iCopy++] = 'C';
- newpacket[iCopy++] = 'C';
- newpacket[iCopy++] = ' ';
-
- DBprintf(("Found DCC\n"));
- /* Skip any extra spaces (should not occur according to
- protocol, but DCC breaks CTCP protocol anyway */
- while(sptr[i] == ' ') {
- if( ++i >= dlen) {
- DBprintf(("DCC packet terminated in just spaces\n"));
- goto lPACKET_DONE;
- }
- }
-
- DBprintf(("Transferring command...\n"));
- while(sptr[i] != ' ') {
- newpacket[iCopy++] = sptr[i];
- if( ++i >= dlen || iCopy >= sizeof(newpacket) ) {
- DBprintf(("DCC packet terminated during command\n"));
- goto lPACKET_DONE;
- }
- }
- /* Copy _one_ space */
- if( i+1 < dlen && iCopy < sizeof(newpacket) )
- newpacket[iCopy++] = sptr[i++];
-
- DBprintf(("Done command - removing spaces\n"));
- /* Skip any extra spaces (should not occur according to
- protocol, but DCC breaks CTCP protocol anyway */
- while(sptr[i] == ' ') {
- if( ++i >= dlen ) {
- DBprintf(("DCC packet terminated in just spaces (post-command)\n"));
- goto lPACKET_DONE;
- }
- }
-
- DBprintf(("Transferring filename...\n"));
- while(sptr[i] != ' ') {
- newpacket[iCopy++] = sptr[i];
- if( ++i >= dlen || iCopy >= sizeof(newpacket) ) {
- DBprintf(("DCC packet terminated during filename\n"));
- goto lPACKET_DONE;
- }
- }
- /* Copy _one_ space */
- if( i+1 < dlen && iCopy < sizeof(newpacket) )
- newpacket[iCopy++] = sptr[i++];
-
- DBprintf(("Done filename - removing spaces\n"));
- /* Skip any extra spaces (should not occur according to
- protocol, but DCC breaks CTCP protocol anyway */
- while(sptr[i] == ' ') {
- if( ++i >= dlen ) {
- DBprintf(("DCC packet terminated in just spaces (post-filename)\n"));
- goto lPACKET_DONE;
- }
- }
-
- DBprintf(("Fetching IP address\n"));
- /* Fetch IP address */
- org_addr = 0;
- while(i<dlen && isdigit(sptr[i])) {
- if( org_addr > ULONG_MAX/10UL ) { /* Terminate on overflow */
- DBprintf(("DCC Address overflow (org_addr == 0x%08lx, next char %c\n", org_addr, sptr[i]));
- goto lBAD_CTCP;
- }
- org_addr *= 10;
- org_addr += sptr[i++]-'0';
- }
- DBprintf(("Skipping space\n"));
- if( i+1 >= dlen || sptr[i] != ' ' ) {
- DBprintf(("Overflow (%d >= %d) or bad character (%02x) terminating IP address\n", i+1, dlen, sptr[i]));
- goto lBAD_CTCP;
- }
- /* Skip any extra spaces (should not occur according to
- protocol, but DCC breaks CTCP protocol anyway, so we might
- as well play it safe */
- while(sptr[i] == ' ') {
- if( ++i >= dlen ) {
- DBprintf(("Packet failure - space overflow.\n"));
- goto lPACKET_DONE;
- }
- }
- DBprintf(("Fetching port number\n"));
- /* Fetch source port */
- org_port = 0;
- while(i<dlen && isdigit(sptr[i])) {
- if( org_port > 6554 ) { /* Terminate on overflow (65536/10 rounded up*/
- DBprintf(("DCC: port number overflow\n"));
- goto lBAD_CTCP;
- }
- org_port *= 10;
- org_port += sptr[i++]-'0';
- }
- /* Skip illegal addresses (or early termination) */
- if( i >= dlen || (sptr[i] != '\001' && sptr[i] != ' ') ) {
- DBprintf(("Bad port termination\n"));
- goto lBAD_CTCP;
- }
- DBprintf(("Got IP %lu and port %u\n", org_addr, (unsigned)org_port));
-
- /* We've got the address and port - now alias it */
- {
- struct alias_link *dcc_link;
- struct in_addr destaddr;
-
-
- true_port = htons(org_port);
- true_addr.s_addr = htonl(org_addr);
- destaddr.s_addr = 0;
-
- /* Steal the FTP_DATA_PORT - it doesn't really matter, and this
- would probably allow it through at least _some_
- firewalls. */
- dcc_link = FindUdpTcpOut (true_addr,
- destaddr,
- true_port,
- 0, IPPROTO_TCP);
- DBprintf(("Got a DCC link\n"));
- if ( dcc_link ) {
- struct in_addr alias_address; /* Address from aliasing */
- u_short alias_port; /* Port given by aliasing */
-
- /* Generate firewall hole as appropriate */
- PunchFWHole(dcc_link);
-
- alias_address = GetAliasAddress(link);
- iCopy += snprintf(&newpacket[iCopy],
- sizeof(newpacket)-iCopy,
- "%lu ", htonl(alias_address.s_addr));
- if( iCopy >= sizeof(newpacket) ) { /* Truncated/fit exactly - bad news */
- DBprintf(("DCC constructed packet overflow.\n"));
- goto lBAD_CTCP;
- }
- alias_port = GetAliasPort(dcc_link);
- iCopy += snprintf(&newpacket[iCopy],
- sizeof(newpacket)-iCopy,
- "%u", htons(alias_port) );
- /* Done - truncated cases will be taken care of by lBAD_CTCP */
- DBprintf(("Aliased IP %lu and port %u\n", alias_address.s_addr, (unsigned)alias_port));
- }
- }
- /* An uninteresting CTCP - state entered right after '\001' has
- been pushed. Also used to copy the rest of a DCC, after IP
- address and port has been handled */
- lBAD_CTCP:
- for(; i<dlen && iCopy<sizeof(newpacket); i++,iCopy++) {
- newpacket[iCopy] = sptr[i]; /* Copy CTCP unchanged */
- if(sptr[i] == '\001') {
- goto lNORMAL_TEXT;
- }
- }
- goto lPACKET_DONE;
- /* Normal text */
- lNORMAL_TEXT:
- for(; i<dlen && iCopy<sizeof(newpacket); i++,iCopy++) {
- newpacket[iCopy] = sptr[i]; /* Copy CTCP unchanged */
- if(sptr[i] == '\001') {
- goto lCTCP_START;
- }
- }
- /* Handle the end of a packet */
- lPACKET_DONE:
- iCopy = iCopy > maxsize-copyat ? maxsize-copyat : iCopy;
- memcpy(sptr+copyat, newpacket, iCopy);
-
-/* Save information regarding modified seq and ack numbers */
- {
- int delta;
-
- SetAckModified(link);
- delta = GetDeltaSeqOut(pip, link);
- AddSeq(pip, link, delta+copyat+iCopy-dlen);
- }
-
- /* Revise IP header */
- {
- u_short new_len;
-
- new_len = htons(hlen + iCopy + copyat);
- DifferentialChecksum(&pip->ip_sum,
- &new_len,
- &pip->ip_len,
- 1);
- pip->ip_len = new_len;
- }
-
- /* Compute TCP checksum for revised packet */
- tc->th_sum = 0;
- tc->th_sum = TcpChecksum(pip);
- return;
- }
-}
-
-/* Notes:
- [Note 1]
- The initial search will most often fail; it could be replaced with a 32-bit specific search.
- Such a search would be done for 32-bit unsigned value V:
- V ^= 0x01010101; (Search is for null bytes)
- if( ((V-0x01010101)^V) & 0x80808080 ) {
- (found a null bytes which was a 01 byte)
- }
- To assert that the processor is 32-bits, do
- extern int ircdccar[32]; (32 bits)
- extern int ircdccar[CHAR_BIT*sizeof(unsigned int)];
- which will generate a type-error on all but 32-bit machines.
-
- [Note 2] This routine really ought to be replaced with one that
- creates a transparent proxy on the aliasing host, to allow arbitary
- changes in the TCP stream. This should not be too difficult given
- this base; I (ee) will try to do this some time later.
- */
diff --git a/lib/libalias/alias_local.h b/lib/libalias/alias_local.h
deleted file mode 100644
index ba5f31f..0000000
--- a/lib/libalias/alias_local.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- mode: c; tab-width: 3; c-basic-offset: 3; -*-
- Alias_local.h contains the function prototypes for alias.c,
- alias_db.c, alias_util.c and alias_ftp.c, alias_irc.c (as well
- as any future add-ons). It is intended to be used only within
- the aliasing software. Outside world interfaces are defined
- in alias.h
-
- This software is placed into the public domain with no restrictions
- on its distribution.
-
- Initial version: August, 1996 (cjm)
-
- <updated several times by original author and Eivind Eiklund>
-*/
-#ifndef ALIAS_LOCAL_H
-#define ALIAS_LOCAL_H
-
-extern int packetAliasMode;
-
-struct alias_link;
-
-/* General utilities */
-u_short IpChecksum(struct ip *);
-u_short TcpChecksum(struct ip *);
-void DifferentialChecksum(u_short *, u_short *, u_short *, int);
-
-/* Internal data access */
-struct alias_link *
-FindIcmpIn(struct in_addr, struct in_addr, u_short);
-
-struct alias_link *
-FindIcmpOut(struct in_addr, struct in_addr, u_short);
-
-struct alias_link *
-FindFragmentIn1(struct in_addr, struct in_addr, u_short);
-
-struct alias_link *
-FindFragmentIn2(struct in_addr, struct in_addr, u_short);
-
-struct alias_link *
-AddFragmentPtrLink(struct in_addr, u_short);
-
-struct alias_link *
-FindFragmentPtr(struct in_addr, u_short);
-
-struct alias_link *
-FindUdpTcpIn (struct in_addr, struct in_addr, u_short, u_short, u_char);
-
-struct alias_link *
-FindUdpTcpOut(struct in_addr, struct in_addr, u_short, u_short, u_char);
-
-struct in_addr
-FindOriginalAddress(struct in_addr);
-
-struct in_addr
-FindAliasAddress(struct in_addr);
-
-/* External data access/modification */
-void GetFragmentAddr(struct alias_link *, struct in_addr *);
-void SetFragmentAddr(struct alias_link *, struct in_addr);
-void GetFragmentPtr(struct alias_link *, char **);
-void SetFragmentPtr(struct alias_link *, char *);
-void SetStateIn(struct alias_link *, int);
-void SetStateOut(struct alias_link *, int);
-int GetStateIn(struct alias_link *);
-int GetStateOut(struct alias_link *);
-struct in_addr GetOriginalAddress(struct alias_link *);
-struct in_addr GetDestAddress(struct alias_link *);
-struct in_addr GetAliasAddress(struct alias_link *);
-struct in_addr GetDefaultAliasAddress(void);
-void SetDefaultAliasAddress(struct in_addr);
-u_short GetOriginalPort(struct alias_link *);
-u_short GetAliasPort(struct alias_link *);
-void SetAckModified(struct alias_link *);
-int GetAckModified(struct alias_link *);
-int GetDeltaAckIn(struct ip *, struct alias_link *);
-int GetDeltaSeqOut(struct ip *, struct alias_link *);
-void AddSeq(struct ip *, struct alias_link *, int);
-void SetExpire(struct alias_link *, int);
-void ClearCheckNewLink(void);
-void PunchFWHole(struct alias_link *);
-
-
-/* Housekeeping function */
-void HouseKeeping(void);
-
-/* Tcp specfic routines */
-/*lint -save -library Suppress flexelint warnings */
-void AliasHandleFtpOut(struct ip *, struct alias_link *, int);
-void AliasHandleIrcOut(struct ip *pip, struct alias_link *link, int maxsize );
-
-enum alias_tcp_state {
- ALIAS_TCP_STATE_NOT_CONNECTED,
- ALIAS_TCP_STATE_CONNECTED,
- ALIAS_TCP_STATE_DISCONNECTED
-};
-
-/*lint -restore */
-#endif /* defined(ALIAS_LOCAL_H) */
diff --git a/lib/libalias/alias_old.c b/lib/libalias/alias_old.c
deleted file mode 100644
index 3f634d4..0000000
--- a/lib/libalias/alias_old.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- This file can be considered a junk pile of old functions that
- are either obsolete or have had their names changed. In the
- transition from alias2.1 to alias2.2, all the function names
- were rationalized so that they began with "PacketAlias..."
-
- These functions are included for backwards compatibility.
-*/
-
-#include <sys/types.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include "alias.h"
-#include "alias_local.h"
-
-void
-InitPacketAlias(void)
-{
- PacketAliasInit();
-}
-
-void
-SetPacketAliasAddress(struct in_addr addr)
-{
- PacketAliasSetAddress(addr);
-}
-
-unsigned int
-SetPacketAliasMode(unsigned int flags, unsigned int mask)
-{
- return PacketAliasSetMode(flags, mask);
-}
-
-int
-PacketAliasPermanentLink(struct in_addr src_addr, u_short src_port,
- struct in_addr dst_addr, u_short dst_port,
- u_short alias_port, u_char proto)
-{
- struct alias_link *link;
- struct in_addr null_address;
-
- null_address.s_addr = 0;
- link = PacketAliasRedirectPort(src_addr, src_port,
- dst_addr, dst_port,
- null_address, alias_port,
- proto);
-
- if (link == NULL)
- return -1;
- else
- return 0;
-}
-
-int
-SaveFragmentPtr(char *ptr)
-{
- return PacketAliasSaveFragment(ptr);
-}
-
-char *
-GetNextFragmentPtr(char *ptr)
-{
- return PacketAliasGetFragment(ptr);
-}
-
-void
-FragmentAliasIn(char *header, char *fragment)
-{
- PacketAliasFragmentIn(header, fragment);
-}
-
-u_short
-InternetChecksum(u_short *ptr, int len)
-{
- return PacketAliasInternetChecksum(ptr, len);
-}
diff --git a/lib/libalias/alias_util.c b/lib/libalias/alias_util.c
deleted file mode 100644
index fe07653..0000000
--- a/lib/libalias/alias_util.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- Alias_util.h contains general utilities used by other functions
- in the packet aliasing module. At the moment, there are functions
- for computing IP header and TCP packet checksums.
-
- The checksum routines are based upon example code in a Unix networking
- text written by Stevens (sorry, I can't remember the title -- but
- at least this is a good author).
-
- Initial Version: August, 1996 (cjm)
-
- Version 1.7: January 9, 1997
- Added differential checksum update function.
-*/
-
-/*
-Note: the checksum routines assume that the actual checksum word has
-been zeroed out. If the checksum workd is filled with the proper value,
-then these routines will give a result of zero (useful for testing
-purposes);
-*/
-
-#include <sys/types.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/tcp.h>
-
-#include "alias.h"
-#include "alias_local.h"
-
-u_short
-PacketAliasInternetChecksum(u_short *ptr, int nbytes)
-{
- int sum, oddbyte;
-
- sum = 0;
- while (nbytes > 1)
- {
- sum += *ptr++;
- nbytes -= 2;
- }
- if (nbytes == 1)
- {
- oddbyte = 0;
- *((u_char *) &oddbyte) = *(u_char *) ptr;
- sum += oddbyte;
- }
- sum = (sum >> 16) + (sum & 0xffff);
- sum += (sum >> 16);
- return(~sum);
-}
-
-u_short
-IpChecksum(struct ip *pip)
-{
- return( PacketAliasInternetChecksum((u_short *) pip,
- (pip->ip_hl << 2)) );
-
-}
-
-u_short
-TcpChecksum(struct ip *pip)
-{
- u_short *ptr;
- struct tcphdr *tc;
- int nhdr, ntcp, nbytes;
- int sum, oddbyte;
-
- nhdr = pip->ip_hl << 2;
- ntcp = ntohs(pip->ip_len) - nhdr;
-
- tc = (struct tcphdr *) ((char *) pip + nhdr);
- ptr = (u_short *) tc;
-
-/* Add up TCP header and data */
- nbytes = ntcp;
- sum = 0;
- while (nbytes > 1)
- {
- sum += *ptr++;
- nbytes -= 2;
- }
- if (nbytes == 1)
- {
- oddbyte = 0;
- *((u_char *) &oddbyte) = *(u_char *) ptr;
- sum += oddbyte;
- }
-
-/* "Pseudo-header" data */
- ptr = (u_short *) &(pip->ip_dst);
- sum += *ptr++;
- sum += *ptr;
- ptr = (u_short *) &(pip->ip_src);
- sum += *ptr++;
- sum += *ptr;
- sum += htons((u_short) ntcp);
- sum += htons((u_short) pip->ip_p);
-
-/* Roll over carry bits */
- sum = (sum >> 16) + (sum & 0xffff);
- sum += (sum >> 16);
-
-/* Return checksum */
- return((u_short) ~sum);
-}
-
-
-void
-DifferentialChecksum(u_short *cksum, u_short *new, u_short *old, int n)
-{
- int i;
- int accumulate;
-
- accumulate = *cksum;
- for (i=0; i<n; i++)
- {
- accumulate -= *new++;
- accumulate += *old++;
- }
-
- if (accumulate < 0)
- {
- accumulate = -accumulate;
- accumulate = (accumulate >> 16) + (accumulate & 0xffff);
- accumulate += accumulate >> 16;
- *cksum = (u_short) ~accumulate;
- }
- else
- {
- accumulate = (accumulate >> 16) + (accumulate & 0xffff);
- accumulate += accumulate >> 16;
- *cksum = (u_short) accumulate;
- }
-}
-
diff --git a/lib/libalias/libalias.3 b/lib/libalias/libalias.3
deleted file mode 100644
index 51f3194..0000000
--- a/lib/libalias/libalias.3
+++ /dev/null
@@ -1,767 +0,0 @@
-.Dd July, 1997
-.Dt "libalias" 3
-.Os
-.Sh NAME
-.Nm "libalias"
-Packet Aliasing Library. A collection of
-functions for aliasing and de-aliasing
-of IP packets, intended for masquerading and
-network address translation (NAT).
-
-.Sh SYNOPSIS
-.Fd #include <netinet/in.h>
-.Fd #include <alias.h>
-
-Function prototypes are given in the main body
-of the text.
-
-.Sh CONTENTS
-.Bd -literal -offset left
-1. Introduction
-2. Initialization and Control
- 2.1 PacketAliasInit()
- 2.2 PacketAliasUninit()
- 2.3 PacketAliasSetAddress()
- 2.4 PacketAliasSetMode()
- 2.5 PacketAliasSetFWBase()
-3. Packet Handling
- 3.1 PacketAliasOut()
- 3.2 PacketAliasIn()
-4. Port and Address Redirection
- 4.1 PacketAliasRedirectPort()
- 4.2 PacketAliasRedirectAddr()
- 4.3 PacketAliasRedirectDelete()
-5. Fragment Handling
- 5.1 PacketAliasSaveFragment()
- 5.2 PacketAliasGetFragment()
- 5.3 PacketAliasFragmentIn()
-6. Miscellaneous Functions
- 6.1 PacketAliasSetTarget()
- 6.2 PacketAliasCheckNewLink()
- 6.3 PacketAliasInternetChecksum()
-7. Authors
-8. Acknowledgments
-
-Appendix A: Conceptual Background
- A.1 Aliasing Links
- A.2 Static and Dynamic Links
- A.3 Partially Specified Links
- A.4 Dynamic Link Creation
-.Ed
-
-.Sh 1. Introduction
-This library is a moderately portable
-set of functions designed to assist
-in the process of IP masquerading and
-network address translation. Outgoing
-packets from a local network with
-unregistered IP addresses can be aliased
-to appear as if they came from an
-accessible IP address. Incoming packets
-are then de-aliased so that they are sent
-to the correct machine on the local network.
-
-A certain amount of flexibility is built
-into the packet aliasing engine. In
-the simplest mode of operation, a
-many-to-one address mapping takes place
-between local network and the packet
-aliasing host. This is known as IP
-masquerading. In addition, one-to-one
-mappings between local and public addresses
-can also be implemented, which is known as
-static NAT. In between these extremes,
-different groups of private addresses
-can be linked to different public addresses,
-comprising several distinct many-to-one
-mappings. Also, a given public address
-and port can be staticly redirected to
-a private address/port.
-
-The packet aliasing engine was designed
-to operate in user space outside of the
-kernel, without any access to private
-kernel data structure, but the source code
-can also be ported to a kernel environment.
-
-.Sh 2. Initialization and Control
-Two specific functions, PacketAliasInit()
-and PacketAliasSetAddress(), must always be
-called before any packet handling may be
-performed. In addition, the operating mode
-of the packet aliasing engine can be customized
-by calling PacketAliasSetMode().
-.Ss 2.1 PacketAliasInit()
-
-.Ft void
-.Fn PacketAliasInit "void"
-
-This function has no argument or return
-value and is used to initialize internal
-data structures. The following mode bits
-are always set after calling
-PacketAliasInit(). See section 2.3 for
-the meaning of these mode bits.
-.Bd -literal -offset indent
- PKT_ALIAS_USE_SAME_PORTS
- PKT_ALIAS_USE_SOCKETS
- PKT_ALIAS_RESET_ON_ADDR_CHANGE
-
-.Ed
-This function will always return the packet
-aliasing engine to the same initial state.
-PacketAliasSetAddress() must be called afterwards,
-and any desired changes from the default mode
-bits listed above require a call to
-PacketAliasSetMode().
-
-It is mandatory that this function be called
-at the beginning of a program prior to any
-packet handling.
-.Ss 2.2 PacketAliasUnInit()
-
-.Ft void
-.Fn PacketAliasUnInit "void"
-
-This function has no argument or return
-value and is used to clear any resources
-attached to internal data structures.
-
-This functions should be called when a
-program stop using the aliasing engine;
-it do, among other things, clear out any
-firewall holes. To provide backwards
-compatibility and extra security, it is
-added to the atexit() chain by
-PacketAliasInit(). Calling it multiple
-times is harmless.
-.Ss 2.3 PacketAliasSetAddress()
-
-.Ft void
-.Fn PacketAliasSetAddress "struct in_addr addr"
-
-This function sets the source address to which
-outgoing packets from the local area network
-are aliased. All outgoing packets are remapped
-to this address unless overridden by a static
-address mapping established by
-PacketAliasRedirectAddr().
-
-If the PKT_ALIAS_RESET_ON_ADDR_CHANGE mode bit
-is set (the default mode of operation), then
-the internal aliasing link tables will be reset
-any time the aliasing address changes, as if
-PacketAliasReset() were called. This is useful
-for interfaces such as ppp where the IP
-address may or may not change on successive
-dial-up attempts.
-
-If the PKT_ALIAS_RESET_ON_ADDR_CHANGE mode bit
-is set to zero, this function can also be used to
-dynamically change the aliasing address on a
-packet to packet basis (it is a low overhead
-call).
-
-It is mandatory that this function be called
-prior to any packet handling.
-.Ss 2.4 PacketAliasSetMode()
-
-.Ft void
-.Fn PacketAliasSetMode "int mode" "int mask"
-
-This function sets or clears mode bits
-according to the value of
-.Em mode .
-Only bits marked in
-.Em mask
-are affected. The following mode bits are
-defined in alias.h:
-.Bl -hang -offset left
-.It PKT_ALIAS_LOG.
-Enables logging /var/log/alias.log. The log file
-shows total numbers of links (icmp, tcp, udp) each
-time an aliasing link is created or deleted. Mainly
-useful for debugging when the log file is viewed
-continuously with "tail -f".
-.It PKT_ALIAS_DENY_INCOMING.
-If this mode bit is set, all incoming packets
-associated with new TCP connections or new
-UDP transactions will be marked for being
-ignored (PacketAliasIn() return code
-PKT_ALIAS_IGNORED) by the calling program.
-Response packets to connections or transactions
-initiated from the packet aliasing host or
-local network will be unaffected. This mode
-bit is useful for implementing a one-way firewall.
-.It PKT_ALIAS_SAME_PORTS.
-If this mode bit is set, the packet aliasing
-engine will attempt to leave the alias port
-numbers unchanged from the actual local port
-number. This can be done as long as the
-quintuple (proto, alias addr, alias port,
-remote addr, remote port) is unique. If a
-conflict exists, an new aliasing port number is
-chosen even if this mode bit is set.
-.It PKT_ALIAS_USE_SOCKETS.
-This bit should be set when the the packet
-aliasing host originates network traffic as
-well as forwards it. When the packet aliasing
-host is waiting for a connection from an
-unknown host address or unknown port number
-(e.g. an FTP data connection), this mode bit
-specifies that a socket be allocated as a place
-holder to prevent port conflicts. Once a
-connection is extablished, usually within a
-minute or so, the socket is closed.
-.It PKT_ALIAS_UNREGISTERED_ONLY.
-If this mode bit is set, traffic on the
-local network which does not originate from
-unregistered address spaces will be ignored.
-Standard Class A, B and C unregistered addresses
-are:
-.Bd -literal -offset indent
- 10.0.0.0 -> 10.255.255.255 (Class A subnet)
- 172.16.0.0 -> 172.31.255.255 (Class B subnets)
- 192.168.0.0 -> 192.168.255.255 (Class C subnets)
-
-.Ed
-This option is useful in the case that
-packet aliasing host has both registered and
-unregistered subnets on different interfaces.
-The registered subnet is fully accessible to
-the outside world, so traffic from it doesn't
-need to be passed through the packet aliasing
-engine.
-.It PKT_ALIAS_RESET_ON_ADDR_CHANGE.
-When this mode bit is set and
-PacketAliasSetAddress() is called to change
-the aliasing address, the internal link table
-of the packet aliasing engine will be cleared.
-This operating mode is useful for ppp links
-where the interface address can sometimes
-change or remain the same between dial-ups.
-If this mode bit is not set, it the link table
-will never be reset in the event of an
-address change.
-.It PKT_ALIAS_PUNCH_FW.
-This option make libalias `punch holes' in an
-ipfw based firewall for FTP/IRC DCC connections.
-The holes punched are bound by from/to IP address
-and port; it will not be possible to use a hole
-for another connection. A hole is removed when
-the connection that use it die. To cater for
-unexpected death of a program using libalias (e.g
-kill -9), changing the state of the flag will
-clear the entire ipfw range allocated for holes.
-This will also happen on the initial call to
-PacketAliasSetFWBase(). This call must happen
-prior to setting this flag.
-
-.El
-
-.Ss 2.5 PacketAliasSetFWBase()
-
-.Ft void
-.Fn PacketAliasSetFWBase "unsigned int base" "unsigned int num"
-
-Set IPFW range allocated for punching firewall holes (with the
-PKT_ALIAS_PUNCH_FW flag). The range will be cleared for all rules on
-initialization.
-
-.Sh 3. Packet Handling
-The packet handling functions are used to
-modify incoming (remote->local) and outgoing
-(local->remote) packets. The calling program
-is responsible for receiving and sending
-packets via network interfaces.
-
-Along with PacketAliasInit() and PacketAliasSetAddress(),
-the two packet handling functions, PacketAliasIn()
-and PacketAliasOut(), comprise minimal set of functions
-needed for a basic IP masquerading implementation.
-.Ss 3.1 PacketAliasIn()
-
-.Ft int
-.Fn PacketAliasIn "char *buffer" "int maxpacketsize"
-
-An incoming packet coming from a remote machine to
-the local network is de-aliased by this function.
-The IP packet is pointed to by
-.Em buffer ,
-and
-.Em maxpacketsize
-indicates the size of the data structure containing
-the packet and should be at least as large as the
-actual packet size.
-
-Return codes:
-.Bl -hang -offset left
-.It PKT_ALIAS_ERROR.
-An internal error within the packet aliasing
-engine occured.
-.It PKT_ALIAS_OK.
-The packet aliasing process was successful.
-.It PKT_ALIAS_IGNORED.
-The packet was ignored and not de-aliased.
-This can happen if the protocal is unrecognized,
-possibly an ICMP message type is not handled or
-if incoming packets for new connections are being
-ignored (see PKT_ALIAS_DENY_INCOMING in section
-2.2).
-.It PKT_ALIAS_UNRESOLVED_FRAGMENT.
-This is returned when a fragment cannot be
-resolved because the header fragment has not
-been sent yet. In this situation, fragments
-must be saved with PacketAliasSaveFragment()
-until a header fragment is found.
-.It PKT_ALIAS_FOUND_HEADER_FRAGMENT.
-The packet aliasing process was successful,
-and a header fragment was found. This is a
-signal to retrieve any unresolved fragments
-with PacketAliasGetFragment() and de-alias
-them with PacketAliasFragmentIn().
-.El
-.Ss 3.2 PacketAliasOut()
-
-.Ft int
-.Fn PacketAliasIn "char *buffer" "int maxpacketsize"
-
-An outgoing packet coming from the local network
-to a remote machine is aliased by this function.
-The IP packet is pointed to by
-.Em buffer r,
-and
-.Em maxpacketsize
-indicates the maximum packet size permissable
-should the packet length be changed. IP encoding
-protocols place addresss and port information in
-the encapsulated data stream which have to be
-modified and can account for changes in packet
-length. Well known examples of such protocols
-are FTP and IRC DCC.
-
-Return codes:
-.Bl -hang -offset left
-.It PKT_ALIAS_ERROR.
-An internal error within the packet aliasing
-engine occured.
-.It PKT_ALIAS_OK.
-The packet aliasing process was successful.
-.It PKT_ALIAS_IGNORED.
-The packet was ignored and not de-aliased.
-This can happen if the protocal is unrecognized,
-or possibly an ICMP message type is not handled.
-.El
-
-.Sh 4. Port and Address Redirection
-The functions described in this section allow machines
-on the local network to be accessible in some degree
-to new incoming connections from the external network.
-Individual ports can be re-mapped or static network
-address translations can be designated.
-.Ss 4.1 PacketAliasRedirectPort()
-
-.Ft struct alias_link *
-.Fo PacketAliasRedirectPort
-.Fa "struct in_addr local_addr"
-.Fa "u_short local_port"
-.Fa "struct in_addr remote_addr"
-.Fa "u_short remote_port"
-.Fa "struct in_addr alias_addr"
-.Fa "u_short alias_port"
-.Fa "u_char proto"
-.Fc
-
-This function specifies that traffic from a
-given remote address/port to an alias address/port
-be redirected to a specified local address/port.
-The paramater
-.Em proto
-can be either IPPROTO_TCP or IPPROTO_UDP, as
-defined in <netinet/in.h>.
-
-If
-.Em local_addr
-or
-.Em alias_addr
-is zero, this indicates that the packet aliasing
-address as established by PacketAliasSetAddress()
-is to be used. Even if PacketAliasAddress() is
-called to change the address after PacketAliasRedirectPort()
-is called, a zero reference will track this change.
-
-If
-.Em remote_addr
-is zero, this indicates to redirect packets from
-any remote address. Likewise, if
-.Em remote_port
-is zero, this indicates to redirect packets originating
-from any remote port number. Almost always, the remote
-port specification will be zero, but non-zero remote
-addresses can be sometimes be useful for firewalling.
-If two calls to PacketAliasRedirectPort() overlap in
-their address/port specifications, then the most recent
-call will have precedence.
-
-This function returns a pointer which can subsequently
-be used by PacketAliasRedirectDelete(). If NULL is
-returned, then the function call did not complete
-successfully.
-
-All port numbers are in network address byte order,
-so it is necessary to use htons() to convert these
-parameters from internally readable numbers to
-network byte order. Addresses are also in network
-byte order, which is implicit in the use of the
-.Em struct in_addr
-data type.
-.Ss 4.2 PacketAliasRedirectAddr()
-
-.Ft struct alias_link *
-.Fo PacketAliasRedirectAddress
-.Fa "struct in_addr local_addr"
-.Fa "struct in_addr alias_addr"
-.Fc
-
-This function desgnates that all incoming
-traffic to
-.Em alias_addr
-be redirected to
-.Em local_addr.
-Similarly, all outgoing traffic from
-.Em local_addr
-is aliased to
-.Em alias_addr .
-
-If
-.Em local_addr
-or
-.Em alias_addr
-is zero, this indicates that the packet aliasing
-address as established by PacketAliasSetAddress()
-is to be used. Even if PacketAliasAddress() is
-called to change the address after PacketAliasRedirectAddr()
-is called, a zero reference will track this change.
-
-If subsequent calls to PacketAliasRedirectAddr()
-use the same aliasing address, all new incoming
-traffic to this aliasing address will be redirected
-to the local address made in the last function call,
-but new traffic all of the local machines designated
-in the several function calls will be aliased to
-the same address. Consider the following example:
-.Bd -literal -offset left
- PacketAliasRedirectAddr(inet_aton("192.168.0.2"),
- inet_aton("141.221.254.101"));
- PacketAliasRedirectAddr(inet_aton("192.168.0.3"),
- inet_aton("141.221.254.101"));
- PacketAliasRedirectAddr(inet_aton("192.168.0.4"),
- inet_aton("141.221.254.101"));
-.Ed
-
-Any outgoing connections such as telnet or ftp
-from 192.168.0.2, 102.168.0.3, 192.168.0.4 will
-appear to come from 141.221.254.101. Any incoming
-connections to 141.221.254.101 will be directed
-to 192.168.0.4.
-
-Any calls to PacketAliasRedirectPort() will
-have precedence over address mappings designated
-by PacketAliasRedirectAddr().
-
-This function returns a pointer which can subsequently
-be used by PacketAliasRedirectDelete(). If NULL is
-returned, then the function call did not complete
-successfully.
-.Ss 4.3 PacketAliasRedirectDelete()
-
-.Ft void
-.Fn PacketAliasRedirectDelete "struct alias_link *ptr"
-
-This function will delete a specific static redirect
-rule entered by PacketAliasRedirectPort() or
-PacketAliasRedirectAddr(). The parameter
-.Em ptr
-is the pointer returned by either of the redirection
-functions. If an invalid pointer is passed to
-PacketAliasRedirectDelete(), then a program crash
-or unpredictable operation could result, so it is
-necessary to be careful using this function.
-
-.Sh 5. Fragment Handling
-The functions in this section are used to deal with
-incoming fragments.
-
-Outgoing fragments are handled within PacketAliasOut()
-by changing the address according to any
-applicable mapping set by PacketAliasRedirectAddress(),
-or the default aliasing address set by
-PacketAliasSetAddress().
-
-Incoming fragments are handled in one of two ways.
-If the header of a fragmented IP packet has already
-been seen, then all subsequent fragments will be
-re-mapped in the same manner the header fragment
-was. Fragments which arrive before the header
-are saved and then retrieved once the header fragment
-has been resolved.
-.Ss 5.1 PacketAliasSaveFragment()
-
-.Ft int
-.Fn PacketAliasSaveFragment "char *ptr"
-
-When PacketAliasIn() returns
-PKT_ALIAS_UNRESOLVED_FRAGMENT, this
-function can be used to save the pointer to
-the unresolved fragment.
-
-It is implicitly assumed that
-.Em ptr
-points to a block of memory allocated by
-malloc(). If the fragment is never
-resolved, the packet aliasing engine will
-automatically free the memory after a
-timeout period. [Eventually this function
-should be modified so that a callback
-function for freeing memory is passed as
-an argument.]
-
-This function returns PKT_ALIAS_OK if it
-was successful and PKT_ALIAS_ERROR if there
-was an error.
-.Ss 5.2 PacketAliasGetNextFragment()
-
-.Ft char *
-.Fn PacketAliasGetFragment "char *buffer"
-
-This function can be used to retrieve fragment
-pointers saved by PacketAliasSaveFragment().
-The IP header fragment pointed to by
-Em buffer
-is the header fragment indicated when
-PacketAliasIn() returns PKT_ALIAS_FOUND_HEADER_FRAGMENT.
-Once a a fragment pointer is retrieved, it
-becomes the calling program's responsibility
-to free the dynamically allocated memory for
-the fragment.
-
-PacketAliasGetFragment() can be called
-sequentially until there are no more fragments
-available, at which time it returns NULL.
-.Ss 5.3 PacketAliasFragmentIn()
-
-.Ft void
-.Fn PacketAliasFragmentIn "char *header" "char *fragment"
-
-When a fragment is retrieved with
-PacketAliasGetFragment(), it can then be
-de-aliased with a call to PacketAliasFragmentIn().
-.Em header
-is the pointer to a header fragment used as a
-template, and
-.Em fragment
-is the pointer to the packet to be de-aliased.
-
-.Sh 6. Miscellaneous Functions
-
-.Ss 6.1 PacketAliasSetTarget()
-
-.Ft void
-.Fn PacketAliasSetTarget "struct in_addr addr"
-
-When an incoming packet not associated with
-any pre-existing aliasing link arrives at the
-host machine, it will be sent to the address
-indicated by a call to PacketAliasSetTarget().
-
-If this function is not called, or is called
-with a zero address argument, then all new
-incoming packets go to the address set by
-PacketAliasSetAddress.
-.Ss 6.2 PacketAliasCheckNewLink()
-
-.Ft int
-.Fn PacketAliasCheckNewLink "void"
-
-This function returns a non-zero value when
-a new aliasing link is created. In circumstances
-where incoming traffic is being sequentially
-sent to different local servers, this function
-can be used to trigger when PacketAliasSetTarget()
-is called to change the default target address.
-.Ss 6.3 PacketAliasInternetChecksum()
-
-.Ft u_short
-.Fn PacketAliasInternetChecksum "char *buffer" "int nbytes"
-
-This is a utility function that does not seem
-to be available elswhere and is included as a
-convenience. It computes the internet checksum,
-which is used in both IP and protocol-specific
-headers (TCP, UDP, ICMP).
-
-.Em buffer
-points to the data block to be checksummed, and
-.Em nbytes
-is the number of bytes. The 16-bit checksum
-field should be zeroed before computing the checksum.
-
-Checksums can also be verified by operating on a block
-of data including its checksum. If the checksum is
-valid, PacketAliasInternetChecksum() will return zero.
-
-.Sh 7. Authors
-Charles Mott (cmott@srv.net), versions 1.0 - 1.8, 2.0 - 2.4.
-
-Eivind Eklund (eivind@freebsd.org), versions 1.8b, 1.9 and
-2.5. Added IRC DCC support as well as contributing a number of
-architectural improvements; added the firewall bypass
-for FTP/IRC DCC.
-
-.Sh 8. Acknowledgments
-
-Listed below, in approximate chronological
-order, are individuals who have provided
-valuable comments and/or debugging assistance.
-
-.Bl -inset -compact -offset left
-.It Gary Roberts
-.It Tom Torrance
-.It Reto Burkhalter
-.It Martin Renters
-.It Brian Somers
-.It Paul Traina
-.It Ari Suutari
-.It Dave Remien
-.It J. Fortes
-.It Andrzej Bialeki
-.It Gordon Burditt
-.El
-
-.Sh Appendix: Conceptual Background
-This appendix is intended for those who
-are planning to modify the source code or want
-to create somewhat esoteric applications using
-the packet aliasing functions.
-
-The conceptual framework under which the
-packet aliasing engine operates is described here.
-Central to the discussion is the idea of an
-"aliasing link" which describes the relationship
-for a given packet transaction between the local
-machine, aliased identity and remote machine. It
-is discussed how such links come into existence
-and are destroyed.
-.Ss A.1 Aliasing Links
-There is a notion of an "aliasing link",
-which is 7-tuple describing a specific
-translation:
-.Bd -literal -offset indent
-(local addr, local port, alias addr, alias port,
- remote addr, remote port, protocol)
-.Ed
-
-Outgoing packets have the local address and
-port number replaced with the alias address
-and port number. Incoming packets undergo the
-reverse process. The packet aliasing engine
-attempts to match packets against an internal
-table of aliasing links to determine how to
-modify a given IP packet. Both the IP
-header and protocol dependent headers are
-modified as necessary. Aliasing links are
-created and deleted as necessary according
-to network traffic.
-
-Protocols can be TCP, UDP or even ICMP in
-certain circumstances. (Some types of ICMP
-packets can be aliased according to sequence
-or id number which acts as an equivalent port
-number for identifying how individual packets
-should be handled.)
-
-Each aliasing link must have a unique
-combination of the following five quanties:
-alias address/port, remote address/port
-and protocol. This ensures that several
-machines on a local network can share the
-same aliased IP address. In cases where
-conflicts might arise, the aliasing port
-is chosen so that uniqueness is maintained.
-.Ss A.2 Static and Dynamic Links
-Aliasing links can either be static or dynamic.
-Static links persist indefinitely and represent
-fixed rules for translating IP packets. Dynamic
-links come into existence for a specific TCP
-connection or UDP transaction or ICMP echo
-sequence. For the case of TCP, the connection
-can be monitored to see when the associated
-aliasing link should be deleted. Aliasing links
-for UDP transactions (and ICMP echo and timestamp
-equests) work on a simple timeout rule. When
-no activity is observed on a dynamic link for
-a certain amount of time it is automatically
-deleted. Timeout rules also apply to TCP
-connections which do not open or close
-properly.
-.Ss A.3 Partially Specified Aliasing Links
-Aliasing links can be partially specified,
-meaning that the remote address and/or remote
-ports are unkown. In this case, when a packet
-matching the incomplete specification is found,
-a fully specified dynamic link is created. If
-the original partially specified link is dynamic,
-it will be deleted after the fully specified link
-is created, otherwise it will persist.
-
-For instance, a partially specified link might
-be
-.Bd -literal -offset indent
-(192.168.0.4, 23, 204.228.203.215, 8066, 0, 0, tcp)
-.Ed
-
-The zeros denote unspecified components for
-the remote address and port. If this link were
-static it would have the effect of redirecting
-all incoming traffic from port 8066 of
-204.228.203.215 to port 23 (telnet) of machine
-192.168.0.4 on the local network. Each
-individual telnet connection would initiate
-the creation of a distinct dynamic link.
-.Ss A.4 Dynamic Link Creation
-In addition to aliasing links, there are
-also address mappings that can be stored
-within the internal data table of the packet
-aliasing mechanism.
-.Bd -literal -offset indent
-(local addr, alias addr)
-.Ed
-
-Address mappings are searched when creating
-new dynamic links.
-
-All outgoing packets from the local network
-automatically create a dynamic link if
-they do not match an already existing fully
-specified link. If an address mapping exists
-for the the outgoing packet, this determines
-the alias address to be used. If no mapping
-exists, then a default address, usually the
-address of the packet aliasing host, is used.
-If necessary, this default address can be
-changed as often as each indvidual packet
-arrives.
-
-The aliasing port number is determined
-such that the new dynamic link does not
-conflict with any existing links. In the
-default operating mode, the packet aliasing
-engine attempts to set the aliasing port
-equal to the local port number. If this
-results in a conflict, then port numbers
-are randomly chosen until a unique aliasing
-link can be established. In an alternate
-operating mode, the first choice of an
-aliasing port is also random and unrelated
-to the local port number.
-
diff --git a/lib/libc/Makefile b/lib/libc/Makefile
deleted file mode 100644
index ef476fa..0000000
--- a/lib/libc/Makefile
+++ /dev/null
@@ -1,39 +0,0 @@
-# @(#)Makefile 8.2 (Berkeley) 2/3/94
-# $Id: Makefile,v 1.18 1997/05/03 03:49:51 jb Exp $
-#
-# All library objects contain rcsid strings by default; they may be
-# excluded as a space-saving measure. To produce a library that does
-# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
-# from CFLAGS below. To remove these strings from just the system call
-# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
-LIB=c
-SHLIB_MAJOR= 3
-SHLIB_MINOR= 0
-CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS
-AINC= -I${.CURDIR}/${MACHINE}
-CLEANFILES+=tags
-INSTALL_PIC_ARCHIVE= yes
-PRECIOUSLIB= yes
-
-#
-# Include make rules that are shared with libc_r.
-#
-.include "${.CURDIR}/Makefile.inc"
-
-KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
- lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
- subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
-KSRCS= bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \
- strlen.c strncpy.c
-
-libkern: libkern.gen libkern.${MACHINE}
-
-libkern.gen: ${KQSRCS} ${KSRCS}
- cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern
-
-libkern.${MACHINE}:: ${KMSRCS}
-.if defined(KMSRCS) && !empty(KMSRCS)
- cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE}
-.endif
-
-.include <bsd.lib.mk>
diff --git a/lib/libc/Makefile.inc b/lib/libc/Makefile.inc
deleted file mode 100644
index 6e29f43..0000000
--- a/lib/libc/Makefile.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-# $Id: Makefile.inc,v 1.2 1997/10/15 16:29:08 bde Exp $
-#
-# This file contains make rules that are shared by libc and libc_r.
-#
-.include "${.CURDIR}/../libc/db/Makefile.inc"
-.include "${.CURDIR}/../libc/compat-43/Makefile.inc"
-.include "${.CURDIR}/../libc/gen/Makefile.inc"
-.include "${.CURDIR}/../libc/gmon/Makefile.inc"
-.include "${.CURDIR}/../libc/locale/Makefile.inc"
-.include "${.CURDIR}/../libc/net/Makefile.inc"
-.include "${.CURDIR}/../libc/nls/Makefile.inc"
-.include "${.CURDIR}/../libc/quad/Makefile.inc"
-.include "${.CURDIR}/../libc/regex/Makefile.inc"
-.include "${.CURDIR}/../libc/stdio/Makefile.inc"
-.include "${.CURDIR}/../libc/stdlib/Makefile.inc"
-.include "${.CURDIR}/../libc/stdtime/Makefile.inc"
-.include "${.CURDIR}/../libc/string/Makefile.inc"
-.include "${.CURDIR}/../libc/sys/Makefile.inc"
-.include "${.CURDIR}/../libc/rpc/Makefile.inc"
-.include "${.CURDIR}/../libc/xdr/Makefile.inc"
-.if !defined(NO_YP_LIBC)
-CFLAGS+= -DYP
-.include "${.CURDIR}/../libc/yp/Makefile.inc"
-.endif
-
-# Append machine-dependent sources, then append machine-independent sources
-# for which there is no machine-dependent variant.
-.if !empty(MDSRCS)
-SRCS+= ${MDSRCS}
-.for _src in ${MISRCS}
-.if ${MDSRCS:R:M${_src:R}} == ""
-SRCS+= ${_src}
-.endif
-.endfor
-.endif
diff --git a/lib/libc/amd64/SYS.h b/lib/libc/amd64/SYS.h
deleted file mode 100644
index 593b2ed..0000000
--- a/lib/libc/amd64/SYS.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91
- *
- * $Id: SYS.h,v 1.10 1997/02/22 14:58:30 peter Exp $
- */
-
-#include <sys/syscall.h>
-#include "DEFS.h"
-
-#define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
- ENTRY(x); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
-#define RSYSCALL(x) SYSCALL(x); ret
-
-#define PSEUDO(x,y) ENTRY(x); lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
-/* gas messes up offset -- although we don't currently need it, do for BCS */
-#define LCALL(x,y) .byte 0x9a ; .long y; .word x
-
-/*
- * Design note:
- *
- * The macros PSYSCALL() and PRSYSCALL() are intended for use where a
- * syscall needs to be renamed in the threaded library. When building
- * a normal library, they default to the traditional SYSCALL() and
- * RSYSCALL(). This avoids the need to #ifdef _THREAD_SAFE everywhere
- * that the renamed function needs to be called.
- */
-#ifdef _THREAD_SAFE
-/*
- * For the thread_safe versions, we prepend _thread_sys_ to the function
- * name so that the 'C' wrapper can go around the real name.
- */
-#define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
- ENTRY(__CONCAT(_thread_sys_,x)); \
- lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
-#define PRSYSCALL(x) PSYSCALL(x); ret
-#define PPSEUDO(x,y) ENTRY(__CONCAT(_thread_sys_,x)); \
- lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
-#else
-/*
- * The non-threaded library defaults to traditional syscalls where
- * the function name matches the syscall name.
- */
-#define PSYSCALL(x) SYSCALL(x)
-#define PRSYSCALL(x) RSYSCALL(x)
-#define PPSEUDO(x,y) PSEUDO(x,y)
-#endif
-
-#ifdef __ELF__
-#define KERNCALL int $0x80 /* Faster */
-#else
-#define KERNCALL LCALL(7,0) /* The old way */
-#endif
diff --git a/lib/libc/amd64/gen/Makefile.inc b/lib/libc/amd64/gen/Makefile.inc
deleted file mode 100644
index 5932d08..0000000
--- a/lib/libc/amd64/gen/Makefile.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.8 1997/02/22 14:58:33 peter Exp $
-
-SRCS+= _setjmp.S alloca.S fabs.S frexp.c infinity.c isinf.c ldexp.c modf.S \
- setjmp.S sigsetjmp.S
diff --git a/lib/libc/amd64/gen/_setjmp.S b/lib/libc/amd64/gen/_setjmp.S
deleted file mode 100644
index 62259ce..0000000
--- a/lib/libc/amd64/gen/_setjmp.S
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/*
- * C library -- _setjmp, _longjmp
- *
- * _longjmp(a,v)
- * will generate a "return(v)" from the last call to
- * _setjmp(a)
- * by restoring registers from the environment 'a'.
- * The previous signal state is NOT restored.
- */
-
-#include "DEFS.h"
-
-#ifdef _THREAD_SAFE
-ENTRY(__thread_sys_setjmp)
-#else
-ENTRY(_setjmp)
-#endif
- movl 4(%esp),%eax
- movl 0(%esp),%edx
- movl %edx, 0(%eax) /* rta */
- movl %ebx, 4(%eax)
- movl %esp, 8(%eax)
- movl %ebp,12(%eax)
- movl %esi,16(%eax)
- movl %edi,20(%eax)
- fnstcw 28(%eax)
- xorl %eax,%eax
- ret
-
-#ifdef _THREAD_SAFE
-ENTRY(__thread_sys_longjmp)
-#else
-ENTRY(_longjmp)
-#endif
- movl 4(%esp),%edx
- movl 8(%esp),%eax
- movl 0(%edx),%ecx
- movl 4(%edx),%ebx
- movl 8(%edx),%esp
- movl 12(%edx),%ebp
- movl 16(%edx),%esi
- movl 20(%edx),%edi
- fninit
- fldcw 28(%edx)
- testl %eax,%eax
- jnz 1f
- incl %eax
-1: movl %ecx,0(%esp)
- ret
diff --git a/lib/libc/amd64/gen/frexp.c b/lib/libc/amd64/gen/frexp.c
deleted file mode 100644
index aba4802..0000000
--- a/lib/libc/amd64/gen/frexp.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static const char rcsid[] = "$Id$";
-#endif /* LIBC_RCS and not lint */
-
-#include <sys/types.h>
-#include <math.h>
-
-double
-frexp(value, eptr)
- double value;
- int *eptr;
-{
- union {
- double v;
- struct {
- u_int u_mant2 : 32;
- u_int u_mant1 : 20;
- u_int u_exp : 11;
- u_int u_sign : 1;
- } s;
- } u;
-
- if (value) {
- u.v = value;
- *eptr = u.s.u_exp - 1022;
- u.s.u_exp = 1022;
- return(u.v);
- } else {
- *eptr = 0;
- return((double)0);
- }
-}
diff --git a/lib/libc/amd64/gen/infinity.c b/lib/libc/amd64/gen/infinity.c
deleted file mode 100644
index e46f676..0000000
--- a/lib/libc/amd64/gen/infinity.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * infinity.c
- * $Id$
- */
-
-#include <math.h>
-
-/* bytes for +Infinity on a 387 */
-char __infinity[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f };
diff --git a/lib/libc/amd64/gen/isinf.c b/lib/libc/amd64/gen/isinf.c
deleted file mode 100644
index a796dcf..0000000
--- a/lib/libc/amd64/gen/isinf.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static const char rcsid[] = "$Id$";
-#endif /* LIBC_RCS and not lint */
-
-#include <sys/types.h>
-
-int
-isnan(d)
- double d;
-{
- register struct IEEEdp {
- u_int manl : 32;
- u_int manh : 20;
- u_int exp : 11;
- u_int sign : 1;
- } *p = (struct IEEEdp *)&d;
-
- return(p->exp == 2047 && (p->manh || p->manl));
-}
-
-int
-isinf(d)
- double d;
-{
- register struct IEEEdp {
- u_int manl : 32;
- u_int manh : 20;
- u_int exp : 11;
- u_int sign : 1;
- } *p = (struct IEEEdp *)&d;
-
- return(p->exp == 2047 && !p->manh && !p->manl);
-}
diff --git a/lib/libc/amd64/gen/ldexp.c b/lib/libc/amd64/gen/ldexp.c
deleted file mode 100644
index 8b63f52..0000000
--- a/lib/libc/amd64/gen/ldexp.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static const char rcsid[] = "$Id$";
-#endif /* LIBC_RCS and not lint */
-
-/*
- * ldexp(value, exp): return value * (2 ** exp).
- *
- * Written by Sean Eric Fagan (sef@kithrup.COM)
- * Sun Mar 11 20:27:09 PST 1990
- */
-
-/*
- * We do the conversion in C to let gcc optimize it away, if possible.
- * The "fxch ; fstp" stuff is because value is still on the stack
- * (stupid 8087!).
- */
-double
-ldexp (double value, int exp)
-{
- double temp, texp, temp2;
- texp = exp;
-#ifdef __GNUC__
-#if __GNUC__ >= 2
- asm ("fscale "
- : "=u" (temp2), "=t" (temp)
- : "0" (texp), "1" (value));
-#else
- asm ("fscale ; fxch %%st(1) ; fstp%L1 %1 "
- : "=f" (temp), "=0" (temp2)
- : "0" (texp), "f" (value));
-#endif
-#else
-error unknown asm
-#endif
- return (temp);
-}
diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S
deleted file mode 100644
index 6525a16..0000000
--- a/lib/libc/amd64/gen/setjmp.S
+++ /dev/null
@@ -1,113 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/*
- * C library -- _setjmp, _longjmp
- *
- * longjmp(a,v)
- * will generate a "return(v)" from the last call to
- * setjmp(a)
- * by restoring registers from the environment 'a'.
- * The previous signal state is restored.
- */
-
-#include "DEFS.h"
-#include "SYS.h"
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_setjmp)
-#else
-ENTRY(setjmp)
-#endif
- PIC_PROLOGUE
- pushl $0
-#ifdef _THREAD_SAFE
- call PIC_PLT(CNAME(_thread_sys_sigblock))
-#else
- call PIC_PLT(CNAME(sigblock))
-#endif
- popl %edx
- PIC_EPILOGUE
- movl 4(%esp),%ecx
- movl 0(%esp),%edx
- movl %edx, 0(%ecx)
- movl %ebx, 4(%ecx)
- movl %esp, 8(%ecx)
- movl %ebp,12(%ecx)
- movl %esi,16(%ecx)
- movl %edi,20(%ecx)
- movl %eax,24(%ecx)
- fnstcw 28(%ecx)
- xorl %eax,%eax
- ret
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_longjmp)
-#else
-ENTRY(longjmp)
-#endif
- movl 4(%esp),%edx
- PIC_PROLOGUE
- pushl 24(%edx)
-#ifdef _THREAD_SAFE
- call PIC_PLT(CNAME(_thread_sys_sigsetmask))
-#else
- call PIC_PLT(CNAME(sigsetmask)) /* XXX this is not reentrant */
-#endif
- popl %eax
- PIC_EPILOGUE
- movl 4(%esp),%edx
- movl 8(%esp),%eax
- movl 0(%edx),%ecx
- movl 4(%edx),%ebx
- movl 8(%edx),%esp
- movl 12(%edx),%ebp
- movl 16(%edx),%esi
- movl 20(%edx),%edi
- fninit
- fldcw 28(%edx)
- testl %eax,%eax
- jnz 1f
- incl %eax
-1: movl %ecx,0(%esp)
- ret
diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S
deleted file mode 100644
index 1220598..0000000
--- a/lib/libc/amd64/gen/sigsetjmp.S
+++ /dev/null
@@ -1,125 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-#include "SYS.h"
-
-/*-
- * TODO:
- * Rename sigsetjmp to __sigsetjmp and siglongjmp to __siglongjmp,
- * remove the other *jmp functions and define everything in terms
- * of the renamed functions. This requires compiler support for
- * the renamed functions (introduced in gcc-2.5.3; previous versions
- * only supported *jmp with 0 or 1 leading underscores).
- *
- * Use sigprocmask() instead of sigblock() and sigsetmask(), and
- * check for and handle errors.
- *
- * Restore _all_ the registers and the signal mask atomically. Can
- * use sigreturn() if sigreturn() works.
- */
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_sigsetjmp)
-#else
-ENTRY(sigsetjmp)
-#endif
- movl 8(%esp),%eax
- movl 4(%esp),%ecx
- movl %eax,32(%ecx)
- testl %eax,%eax
- jz 2f
- PIC_PROLOGUE
- pushl $0
-#ifdef _THREAD_SAFE
- call PIC_PLT(CNAME(_thread_sys_sigblock))
-#else
- call PIC_PLT(CNAME(sigblock))
-#endif
- addl $4,%esp
- PIC_EPILOGUE
- movl 4(%esp),%ecx
- movl %eax,24(%ecx)
-2: movl 0(%esp),%edx
- movl %edx, 0(%ecx)
- movl %ebx, 4(%ecx)
- movl %esp, 8(%ecx)
- movl %ebp,12(%ecx)
- movl %esi,16(%ecx)
- movl %edi,20(%ecx)
- fnstcw 28(%ecx)
- xorl %eax,%eax
- ret
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_siglongjmp)
-#else
-ENTRY(siglongjmp)
-#endif
- movl 4(%esp),%edx
- cmpl $0,32(%edx)
- jz 2f
- PIC_PROLOGUE
- pushl 24(%edx)
-#ifdef _THREAD_SAFE
- call PIC_PLT(CNAME(_thread_sys_sigsetmask))
-#else
- call PIC_PLT(CNAME(sigsetmask))
-#endif
- addl $4,%esp
- PIC_EPILOGUE
-2: movl 4(%esp),%edx
- movl 8(%esp),%eax
- movl 0(%edx),%ecx
- movl 4(%edx),%ebx
- movl 8(%edx),%esp
- movl 12(%edx),%ebp
- movl 16(%edx),%esi
- movl 20(%edx),%edi
- fninit
- fldcw 28(%edx)
- testl %eax,%eax
- jnz 1f
- incl %eax
-1: movl %ecx,0(%esp)
- ret
diff --git a/lib/libc/amd64/net/Makefile.inc b/lib/libc/amd64/net/Makefile.inc
deleted file mode 100644
index dff7fd1..0000000
--- a/lib/libc/amd64/net/Makefile.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id$
-
-SRCS+= htonl.S htons.S ntohl.S ntohs.S
diff --git a/lib/libc/amd64/net/htonl.S b/lib/libc/amd64/net/htonl.S
deleted file mode 100644
index 095c40a..0000000
--- a/lib/libc/amd64/net/htonl.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/* netorder = htonl(hostorder) */
-
-#include "DEFS.h"
-
-ENTRY(htonl)
- movl 4(%esp),%eax
- xchgb %al,%ah
- roll $16,%eax
- xchgb %al,%ah
- ret
diff --git a/lib/libc/amd64/net/htons.S b/lib/libc/amd64/net/htons.S
deleted file mode 100644
index 238dfc2..0000000
--- a/lib/libc/amd64/net/htons.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/* netorder = htons(hostorder) */
-
-#include "DEFS.h"
-
-ENTRY(htons)
- movzwl 4(%esp),%eax
- xchgb %al,%ah
- ret
diff --git a/lib/libc/amd64/net/ntohl.S b/lib/libc/amd64/net/ntohl.S
deleted file mode 100644
index 5af5008..0000000
--- a/lib/libc/amd64/net/ntohl.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/* hostorder = ntohl(netorder) */
-
-#include "DEFS.h"
-
-ENTRY(ntohl)
- movl 4(%esp),%eax
- xchgb %al,%ah
- roll $16,%eax
- xchgb %al,%ah
- ret
diff --git a/lib/libc/amd64/net/ntohs.S b/lib/libc/amd64/net/ntohs.S
deleted file mode 100644
index 4bed4a2..0000000
--- a/lib/libc/amd64/net/ntohs.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/* hostorder = ntohs(netorder) */
-
-#include "DEFS.h"
-
-ENTRY(ntohs)
- movzwl 4(%esp),%eax
- xchgb %al,%ah
- ret
diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc
deleted file mode 100644
index b65e4f5..0000000
--- a/lib/libc/amd64/sys/Makefile.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-# from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp
-# $Id: Makefile.inc,v 1.6 1997/10/16 14:26:13 bde Exp $
-
-SRCS+= i386_get_ldt.c i386_set_ldt.c
-
-.if ${LIB} == "c"
-MAN2+= i386_get_ldt.2
-
-MLINKS+=i386_get_ldt.2 i386_set_ldt.2
-.endif
diff --git a/lib/libc/amd64/sys/brk.S b/lib/libc/amd64/sys/brk.S
deleted file mode 100644
index 4fdf0c6..0000000
--- a/lib/libc/amd64/sys/brk.S
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
- .globl HIDENAME(curbrk)
- .globl HIDENAME(minbrk)
-ENTRY(_brk)
- jmp ok
-
-ENTRY(brk)
-#ifdef PIC
- movl 4(%esp),%eax
- PIC_PROLOGUE
- movl PIC_GOT(HIDENAME(curbrk)),%edx # set up GOT addressing
- movl PIC_GOT(HIDENAME(minbrk)),%ecx #
- PIC_EPILOGUE
- cmpl %eax,(%ecx)
- jbe ok
- movl (%ecx),%eax
- movl %eax,4(%esp)
-ok:
- lea SYS_break,%eax
- KERNCALL
- jb err
- movl 4(%esp),%eax
- movl %eax,(%edx)
- movl $0,%eax
- ret
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
-
-#else
-
- movl 4(%esp),%eax
- cmpl %eax,HIDENAME(minbrk)
- jbe ok
- movl HIDENAME(minbrk),%eax
- movl %eax,4(%esp)
-ok:
- lea SYS_break,%eax
- KERNCALL
- jb err
- movl 4(%esp),%eax
- movl %eax,HIDENAME(curbrk)
- movl $0,%eax
- ret
-err:
- jmp HIDENAME(cerror)
-#endif
diff --git a/lib/libc/amd64/sys/cerror.S b/lib/libc/amd64/sys/cerror.S
deleted file mode 100644
index 2d8f935..0000000
--- a/lib/libc/amd64/sys/cerror.S
+++ /dev/null
@@ -1,87 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
- .globl HIDENAME(cerror)
-
-#ifdef _THREAD_SAFE
- /*
- * Threaded version using __error().
- */
- .globl CNAME(__error)
- .type CNAME(__error),@function
-HIDENAME(cerror):
- pushl %eax
-#ifdef PIC
- /* The caller must execute the PIC prologue before jumping to cerror. */
- call PIC_PLT(CNAME(__error))
- popl %ecx
- PIC_EPILOGUE
-#else
- call CNAME(__error)
- popl %ecx
-#endif
- movl %ecx,(%eax)
- movl $-1,%eax
- movl $-1,%edx
- ret
-
-#else /* _THREAD_SAFE */
- /*
- * Non-threaded version using global errno.
- */
- .globl CNAME(errno)
-HIDENAME(cerror):
-#ifdef PIC
- /* The caller must execute the PIC prologue before jumping to cerror. */
- movl PIC_GOT(CNAME(errno)),%ecx
- movl %eax,(%ecx)
- PIC_EPILOGUE
-#else
- movl %eax,CNAME(errno)
-#endif
- movl $-1,%eax
- movl $-1,%edx
- ret
-#endif /* _THREAD_SAFE */
diff --git a/lib/libc/amd64/sys/exect.S b/lib/libc/amd64/sys/exect.S
deleted file mode 100644
index af0d2ee..0000000
--- a/lib/libc/amd64/sys/exect.S
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-#include <machine/psl.h>
-
-ENTRY(exect)
- lea SYS_execve,%eax
- pushf
- popl %edx
- orl $ PSL_T,%edx
- pushl %edx
- popf
- KERNCALL
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */
diff --git a/lib/libc/amd64/sys/pipe.S b/lib/libc/amd64/sys/pipe.S
deleted file mode 100644
index 637b86f..0000000
--- a/lib/libc/amd64/sys/pipe.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-PSYSCALL(pipe)
- movl 4(%esp),%ecx
- movl %eax,(%ecx)
- movl %edx,4(%ecx)
- movl $0,%eax
- ret
diff --git a/lib/libc/amd64/sys/ptrace.S b/lib/libc/amd64/sys/ptrace.S
deleted file mode 100644
index 018a02c..0000000
--- a/lib/libc/amd64/sys/ptrace.S
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-ENTRY(ptrace)
- xorl %eax,%eax
-#ifdef PIC
- PIC_PROLOGUE
- movl PIC_GOT(CNAME(errno)),%edx
- movl %eax,(%edx)
- PIC_EPILOGUE
-#else
- movl %eax,CNAME(errno)
-#endif
- lea SYS_ptrace,%eax
- KERNCALL
- jb err
- ret
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
diff --git a/lib/libc/amd64/sys/reboot.S b/lib/libc/amd64/sys/reboot.S
deleted file mode 100644
index 70049b2..0000000
--- a/lib/libc/amd64/sys/reboot.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-SYSCALL(reboot)
- iret
diff --git a/lib/libc/amd64/sys/sbrk.S b/lib/libc/amd64/sys/sbrk.S
deleted file mode 100644
index a3afd89..0000000
--- a/lib/libc/amd64/sys/sbrk.S
+++ /dev/null
@@ -1,95 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
- .globl CNAME(end)
- .globl HIDENAME(minbrk)
- .globl HIDENAME(curbrk)
-
- .data
-HIDENAME(minbrk): .long CNAME(end)
-HIDENAME(curbrk): .long CNAME(end)
- .text
-
-ENTRY(sbrk)
-#ifdef PIC
- movl 4(%esp),%ecx
- PIC_PROLOGUE
- movl PIC_GOT(HIDENAME(curbrk)),%edx
- movl (%edx),%eax
- PIC_EPILOGUE
- testl %ecx,%ecx
- jz back
- addl %eax,4(%esp)
- lea SYS_break,%eax
- KERNCALL
- jb err
- PIC_PROLOGUE
- movl PIC_GOT(HIDENAME(curbrk)),%edx
- movl (%edx),%eax
- addl %ecx,(%edx)
- PIC_EPILOGUE
-back:
- ret
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
-
-#else /* !PIC */
-
- movl 4(%esp),%ecx
- movl HIDENAME(curbrk),%eax
- testl %ecx,%ecx
- jz back
- addl %eax,4(%esp)
- lea SYS_break,%eax
- KERNCALL
- jb err
- movl HIDENAME(curbrk),%eax
- addl %ecx,HIDENAME(curbrk)
-back:
- ret
-err:
- jmp HIDENAME(cerror)
-#endif /* PIC */
diff --git a/lib/libc/amd64/sys/setlogin.S b/lib/libc/amd64/sys/setlogin.S
deleted file mode 100644
index 7bcf3bd..0000000
--- a/lib/libc/amd64/sys/setlogin.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "SYS.h"
-
-.globl CNAME(_logname_valid) /* in getlogin() */
-
-SYSCALL(setlogin)
-#ifdef PIC
- PIC_PROLOGUE
- pushl %eax
- movl PIC_GOT(CNAME(_logname_valid)),%eax
- movl $0,(%eax)
- popl %eax
- PIC_EPILOGUE
-#else
- movl $0,CNAME(_logname_valid)
-#endif
- ret /* setlogin(name) */
diff --git a/lib/libc/amd64/sys/sigreturn.S b/lib/libc/amd64/sys/sigreturn.S
deleted file mode 100644
index 65deb40..0000000
--- a/lib/libc/amd64/sys/sigreturn.S
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-/*
- * NOTE: If the profiling ENTRY() code ever changes any registers, they
- * must be saved. On FreeBSD, this is not the case.
- */
-
-PSYSCALL(sigreturn)
- ret
diff --git a/lib/libc/amd64/sys/vfork.S b/lib/libc/amd64/sys/vfork.S
deleted file mode 100644
index e4ed257..0000000
--- a/lib/libc/amd64/sys/vfork.S
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "DEFS.h"
-#include "SYS.h"
-
-/*
- * pid = vfork();
- *
- * %edx == 0 in parent process, %edx == 1 in child process.
- * %eax == pid of child in parent, %eax == pid of parent in child.
- *
- */
-
-ENTRY(vfork)
- popl %ecx /* my rta into ecx */
- lea SYS_vfork,%eax
- KERNCALL
- jb verror
-vforkok:
- cmpl $0,%edx /* child process? */
- jne child /* yes */
- jmp parent
-#ifdef _THREAD_SAFE
- /*
- * Threaded version using __error().
- */
- .globl CNAME(__error)
- .type CNAME(__error),@function
-verror:
- pushl %eax
-#ifdef PIC
- call PIC_PLT(CNAME(__error))
-#else
- call CNAME(__error)
-#endif
- popl %ecx
- movl %ecx,(%eax)
- movl $-1,%eax
- movl $-1,%edx
-#else /* !_THREAD_SAFE */
- /*
- * Non-threaded version using global errno.
- */
- .globl CNAME(errno)
-verror:
-#ifdef PIC
- PIC_PROLOGUE
- movl PIC_GOT(CNAME(errno)), %edx
- movl %eax,(%edx)
- PIC_EPILOGUE
-#else
- movl %eax,CNAME(errno)
-#endif
- movl $-1,%eax
-#endif /* !_THREAD_SAFE */
- jmp %ecx
-child:
- movl $0,%eax
-parent:
- jmp %ecx
diff --git a/lib/libc/compat-43/Makefile.inc b/lib/libc/compat-43/Makefile.inc
deleted file mode 100644
index 7983262..0000000
--- a/lib/libc/compat-43/Makefile.inc
+++ /dev/null
@@ -1,16 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/2/93
-# $Id: Makefile.inc,v 1.6 1997/10/15 16:15:20 bde Exp $
-
-# compat-43 sources
-.PATH: ${.CURDIR}/../libc/${MACHINE}/compat-43 ${.CURDIR}/../libc/compat-43
-
-SRCS+= creat.c gethostid.c getwd.c killpg.c sethostid.c setpgrp.c \
- setrgid.c setruid.c sigcompat.c
-
-.if ${LIB} == "c"
-MAN2+= creat.2 killpg.2 sigblock.2 sigpause.2 sigsetmask.2 sigvec.2
-MAN3+= gethostid.3 setruid.3
-
-MLINKS+=gethostid.3 sethostid.3
-MLINKS+=setruid.3 setrgid.3
-.endif
diff --git a/lib/libc/compat-43/creat.2 b/lib/libc/compat-43/creat.2
deleted file mode 100644
index b4a035c..0000000
--- a/lib/libc/compat-43/creat.2
+++ /dev/null
@@ -1,61 +0,0 @@
-.\" Copyright (c) 1989, 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)creat.2 8.1 (Berkeley) 6/2/93
-.\"
-.Dd June 2, 1993
-.Dt CREAT 2
-.Os BSD 4
-.Sh NAME
-.Nm creat
-.Nd create a new file
-.Sh SYNOPSIS
-.Fd #include <fcntl.h>
-.Ft int
-.Fn creat "const char *path" "mode_t mode"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is made obsolete by:
-.Ef
-.Xr open 2 .
-.Pp
-.Fn Creat
-is the same as:
-.Bd -literal -offset indent
-open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
-.Ed
-.Sh SEE ALSO
-.Xr open 2
-.Sh HISTORY
-The
-.Fn creat
-function call appeared in
-.At v6 .
diff --git a/lib/libc/compat-43/creat.c b/lib/libc/compat-43/creat.c
deleted file mode 100644
index a4f1234..0000000
--- a/lib/libc/compat-43/creat.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)creat.c 8.1 (Berkeley) 6/2/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <fcntl.h>
-
-int
-#if __STDC__
-creat(const char *path, mode_t mode)
-#else
-creat(path, mode)
- char *path;
- mode_t mode;
-#endif
-{
- return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
-}
diff --git a/lib/libc/compat-43/gethostid.3 b/lib/libc/compat-43/gethostid.3
deleted file mode 100644
index b4f6b62..0000000
--- a/lib/libc/compat-43/gethostid.3
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)gethostid.3 8.1 (Berkeley) 6/2/93
-.\"
-.Dd June 2, 1993
-.Dt GETHOSTID 3
-.Os BSD 4.2
-.Sh NAME
-.Nm gethostid ,
-.Nm sethostid
-.Nd get/set unique identifier of current host
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft long
-.Fn gethostid void
-.Ft void
-.Fn sethostid "long hostid"
-.Sh DESCRIPTION
-.Fn Sethostid
-establishes a 32-bit identifier for the
-current processor that is intended to be unique among all
-UNIX systems in existence. This is normally a DARPA Internet
-address for the local machine. This call is allowed only to the
-super-user and is normally performed at boot time.
-.Pp
-.Fn Gethostid
-returns the 32-bit identifier for the current processor.
-.Pp
-This function has been deprecated.
-The hostid should be set or retrieved by use of
-.Xr sysctl 3 .
-.Sh SEE ALSO
-.Xr gethostname 3 ,
-.Xr sysctl 3 ,
-.Xr sysctl 8 .
-.Sh BUGS
-32 bits for the identifier is too small.
-.Sh HISTORY
-The
-.Fn gethostid
-and
-.Fn sethostid
-syscalls appeared in
-.Bx 4.2
-and were dropped in
-.Bx 4.4 .
diff --git a/lib/libc/compat-43/gethostid.c b/lib/libc/compat-43/gethostid.c
deleted file mode 100644
index c4caff6..0000000
--- a/lib/libc/compat-43/gethostid.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostid.c 8.1 (Berkeley) 6/2/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-#if __STDC__
-long
-gethostid(void)
-#else
-long
-gethostid()
-#endif
-{
- int mib[2];
- size_t size;
- long value;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_HOSTID;
- size = sizeof value;
- if (sysctl(mib, 2, &value, &size, NULL, 0) == -1)
- return (-1);
- return (value);
-}
diff --git a/lib/libc/compat-43/getwd.c b/lib/libc/compat-43/getwd.c
deleted file mode 100644
index 9f0e633..0000000
--- a/lib/libc/compat-43/getwd.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getwd.c 8.1 (Berkeley) 6/2/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-char *
-getwd(buf)
- char *buf;
-{
- char *p;
-
- if ( (p = getcwd(buf, MAXPATHLEN)) )
- return(p);
- (void)strcpy(buf, strerror(errno));
- return((char *)NULL);
-}
diff --git a/lib/libc/compat-43/killpg.2 b/lib/libc/compat-43/killpg.2
deleted file mode 100644
index 01e44f4..0000000
--- a/lib/libc/compat-43/killpg.2
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)killpg.2 8.1 (Berkeley) 6/2/93
-.\"
-.Dd June 2, 1993
-.Dt KILLPG 2
-.Os BSD 4
-.Sh NAME
-.Nm killpg
-.Nd send signal to a process group
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <signal.h>
-.Ft int
-.Fn killpg "pid_t pgrp" "int sig"
-.Sh DESCRIPTION
-.Fn Killpg
-sends the signal
-.Fa sig
-to the process group
-.Fa pgrp .
-See
-.Xr sigaction 2
-for a list of signals.
-If
-.Fa pgrp
-is 0,
-.Fn killpg
-sends the signal to the sending process's process group.
-.Pp
-The sending process and members of the process group must
-have the same effective user ID, or
-the sender must be the super-user.
-As a single special case the continue signal SIGCONT may be sent
-to any process that is a descendant of the current process.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Killpg
-will fail and no signal will be sent if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa Sig
-is not a valid signal number.
-.It Bq Er ESRCH
-No process can be found in the process group specified by
-.Fa pgrp .
-.It Bq Er ESRCH
-The process group was given as 0
-but the sending process does not have a process group.
-.It Bq Er EPERM
-The sending process is not the super-user and one or more
-of the target processes has an effective user ID different from that
-of the sending process.
-.El
-.Sh SEE ALSO
-.Xr getpgrp 2 ,
-.Xr kill 2 ,
-.Xr sigaction 2
-.Sh HISTORY
-The
-.Fn killpg
-function call appeared in
-.Bx 4.0 .
diff --git a/lib/libc/compat-43/killpg.c b/lib/libc/compat-43/killpg.c
deleted file mode 100644
index ac3ba6e..0000000
--- a/lib/libc/compat-43/killpg.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)killpg.c 8.1 (Berkeley) 6/2/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <errno.h>
-
-/*
- * Backwards-compatible killpg().
- */
-int
-#if __STDC__
-killpg(pid_t pgid, int sig)
-#else
-killpg(pgid, sig)
- pid_t pgid;
- int sig;
-#endif
-{
- if (pgid == 1) {
- errno = ESRCH;
- return (-1);
- }
- return (kill(-pgid, sig));
-}
diff --git a/lib/libc/compat-43/sethostid.c b/lib/libc/compat-43/sethostid.c
deleted file mode 100644
index 8122c81..0000000
--- a/lib/libc/compat-43/sethostid.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)sethostid.c 8.1 (Berkeley) 6/2/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-#if __STDC__
-long
-sethostid(long hostid)
-#else
-long
-sethostid(hostid)
- long hostid;
-#endif
-{
- int mib[2];
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_HOSTID;
- if (sysctl(mib, 2, NULL, NULL, &hostid, sizeof hostid) == -1)
- return (-1);
- return (0);
-}
diff --git a/lib/libc/compat-43/setpgrp.c b/lib/libc/compat-43/setpgrp.c
deleted file mode 100644
index dc0dd3f..0000000
--- a/lib/libc/compat-43/setpgrp.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setpgrp.c 8.1 (Berkeley) 6/2/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <unistd.h>
-
-int
-#if __STDC__
-setpgrp(pid_t pid, pid_t pgid)
-#else
-setpgrp(pid, pgid)
- pid_t pid, pgid;
-#endif
-{
- return(setpgid(pid, pgid));
-}
diff --git a/lib/libc/compat-43/setrgid.c b/lib/libc/compat-43/setrgid.c
deleted file mode 100644
index 1d86642..0000000
--- a/lib/libc/compat-43/setrgid.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setrgid.c 8.1 (Berkeley) 6/2/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <unistd.h>
-
-int
-#ifdef __STDC__
-setrgid(gid_t rgid)
-#else
-setrgid(rgid)
- int rgid;
-#endif
-{
-
- return (setregid(rgid, -1));
-}
diff --git a/lib/libc/compat-43/setruid.3 b/lib/libc/compat-43/setruid.3
deleted file mode 100644
index 32245c1..0000000
--- a/lib/libc/compat-43/setruid.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setruid.3 8.1 (Berkeley) 6/2/93
-.\"
-.Dd June 2, 1993
-.Dt SETRUID 3
-.Os BSD 4.2
-.Sh NAME
-.Nm setruid ,
-.Nm setrgid
-.Nd set user and group ID
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn setruid "uid_t ruid"
-.Ft int
-.Fn setrgid "gid_t rgid"
-.Sh DESCRIPTION
-The
-.Fn setruid
-function
-.Pq Fn setrgid
-sets the real user ID (group ID) of the
-current process.
-.Sh RETURN VALUES
-Upon success, these functions return 0;
-otherwise \-1 is returned.
-.Pp
-If the user is not the super user, or the uid
-specified is not the real or effective ID, these
-functions return \-1.
-.Pp
-The use of these calls is not portable.
-Their use is discouraged; they will be removed in the future.
-.Sh SEE ALSO
-.Xr getgid 2 ,
-.Xr getuid 2 ,
-.Xr setegid 2 ,
-.Xr seteuid 2 ,
-.Xr setgid 2 ,
-.Xr setuid 2
-.Sh HISTORY
-The
-.Fn setruid
-and
-.Fn setrgid
-syscalls appeared in
-.Bx 4.2
-and were dropped in
-.Bx 4.4 .
diff --git a/lib/libc/compat-43/setruid.c b/lib/libc/compat-43/setruid.c
deleted file mode 100644
index 1551abb..0000000
--- a/lib/libc/compat-43/setruid.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setruid.c 8.1 (Berkeley) 6/2/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <unistd.h>
-
-int
-#ifdef __STDC__
-setruid(uid_t ruid)
-#else
-setruid(ruid)
- int ruid;
-#endif
-{
-
- return (setreuid(ruid, -1));
-}
diff --git a/lib/libc/compat-43/sigblock.2 b/lib/libc/compat-43/sigblock.2
deleted file mode 100644
index bb61f61..0000000
--- a/lib/libc/compat-43/sigblock.2
+++ /dev/null
@@ -1,84 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigblock.2 8.1 (Berkeley) 6/2/93
-.\"
-.Dd June 2, 1993
-.Dt SIGBLOCK 2
-.Os BSD 4.2
-.Sh NAME
-.Nm sigblock
-.Nd block signals
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft int
-.Fn sigblock "int mask"
-.Ft int
-.Fn sigmask signum
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is made obsolete by:
-.Ef
-.Xr sigprocmask 2 .
-.Pp
-.Fn Sigblock
-adds the signals specified in
-.Fa mask
-to the set of signals currently
-being blocked from delivery.
-Signals are blocked if the
-corresponding bit in
-.Fa mask
-is a 1; the macro
-.Fn sigmask
-is provided to construct the mask for a given
-.Fa signum .
-.Pp
-It is not possible to block
-.Dv SIGKILL
-or
-.Dv SIGSTOP ;
-this restriction is silently
-imposed by the system.
-.Sh RETURN VALUES
-The previous set of masked signals is returned.
-.Sh SEE ALSO
-.Xr kill 2 ,
-.Xr sigaction 2 ,
-.Xr sigprocmask 2 ,
-.Xr sigsetmask 2 ,
-.Xr sigsetops 3
-.Sh HISTORY
-The
-.Fn sigblock
-function call appeared in
-.Bx 4.2
-and has been deprecated.
diff --git a/lib/libc/compat-43/sigcompat.c b/lib/libc/compat-43/sigcompat.c
deleted file mode 100644
index 56550d2..0000000
--- a/lib/libc/compat-43/sigcompat.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)sigcompat.c 8.1 (Berkeley) 6/2/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <signal.h>
-
-int
-sigvec(signo, sv, osv)
- int signo;
- struct sigvec *sv, *osv;
-{
- int ret;
-
- if (sv)
- sv->sv_flags ^= SV_INTERRUPT; /* !SA_INTERRUPT */
- ret = sigaction(signo, (struct sigaction *)sv, (struct sigaction *)osv);
- if (ret == 0 && osv)
- osv->sv_flags ^= SV_INTERRUPT; /* !SA_INTERRUPT */
- return (ret);
-}
-
-int
-sigsetmask(mask)
- int mask;
-{
- int omask, n;
-
- n = sigprocmask(SIG_SETMASK, (sigset_t *) &mask, (sigset_t *) &omask);
- if (n)
- return (n);
- return (omask);
-}
-
-int
-sigblock(mask)
- int mask;
-{
- int omask, n;
-
- n = sigprocmask(SIG_BLOCK, (sigset_t *) &mask, (sigset_t *) &omask);
- if (n)
- return (n);
- return (omask);
-}
-
-int
-sigpause(mask)
- int mask;
-{
- return (sigsuspend((sigset_t *)&mask));
-}
diff --git a/lib/libc/compat-43/sigpause.2 b/lib/libc/compat-43/sigpause.2
deleted file mode 100644
index 52230cc..0000000
--- a/lib/libc/compat-43/sigpause.2
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigpause.2 8.1 (Berkeley) 6/2/93
-.\"
-.Dd June 2, 1993
-.Dt SIGPAUSE 2
-.Os BSD 4
-.Sh NAME
-.Nm sigpause
-.Nd atomically release blocked signals and wait for interrupt
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft int
-.Fn sigpause "int sigmask"
-.Sh DESCRIPTION
-.Sy This interface is made obsolete by
-.Xr sigsuspend 2 .
-.Pp
-.Fn Sigpause
-assigns
-.Fa sigmask
-to the set of masked signals
-and then waits for a signal to arrive;
-on return the set of masked signals is restored.
-.Fa Sigmask
-is usually 0 to indicate that no
-signals are to be blocked.
-.Fn Sigpause
-always terminates by being interrupted, returning -1 with
-.Va errno
-set to
-.Dv EINTR
-.Sh SEE ALSO
-.Xr kill 2 ,
-.Xr sigaction 2 ,
-.Xr sigblock 2 ,
-.Xr sigprocmask 2 ,
-.Xr sigsuspend 2 ,
-.Xr sigvec 2
-.Sh HISTORY
-The
-.Fn sigpause
-function call appeared in
-.Bx 4.2
-and has been deprecated.
diff --git a/lib/libc/compat-43/sigsetmask.2 b/lib/libc/compat-43/sigsetmask.2
deleted file mode 100644
index 6131b0f..0000000
--- a/lib/libc/compat-43/sigsetmask.2
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigsetmask.2 8.1 (Berkeley) 6/2/93
-.\"
-.Dd June 2, 1993
-.Dt SIGSETMASK 2
-.Os BSD 4.2
-.Sh NAME
-.Nm sigsetmask
-.Nd set current signal mask
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft int
-.Fn sigsetmask "int mask"
-.Fn sigmask signum
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is made obsoleted by:
-.Ef
-.Xr sigprocmask 2 .
-.Pp
-.Fn Sigsetmask
-sets the current signal mask
-Signals are blocked from delivery if the
-corresponding bit in
-.Fa mask
-is a 1; the macro
-.Fn sigmask
-is provided to construct the mask for a given
-.Fa signum .
-.Pp
-The system
-quietly disallows
-.Dv SIGKILL
-or
-.Dv SIGSTOP
-to be blocked.
-.Sh RETURN VALUES
-The previous set of masked signals is returned.
-.Sh SEE ALSO
-.Xr kill 2 ,
-.Xr sigaction 2 ,
-.Xr sigblock 2 ,
-.Xr sigprocmask 2 ,
-.Xr sigsuspend 2 ,
-.Xr sigvec 2 ,
-.Xr sigsetops 3
-.Sh HISTORY
-The
-.Fn sigsetmask
-function call appeared in
-.Bx 4.2
-and has been deprecated.
diff --git a/lib/libc/compat-43/sigvec.2 b/lib/libc/compat-43/sigvec.2
deleted file mode 100644
index de8d452..0000000
--- a/lib/libc/compat-43/sigvec.2
+++ /dev/null
@@ -1,326 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigvec.2 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt SIGVEC 2
-.Os BSD 4
-.Sh NAME
-.Nm sigvec
-.Nd software signal facilities
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Bd -literal
-struct sigvec {
- void (*sv_handler)();
- sigset_t sv_mask;
- int sv_flags;
-};
-.Ed
-.Ft int
-.Fn sigvec "int sig" "struct sigvec *vec" "struct sigvec *ovec"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is made obsolete by sigaction(2).
-.Ef
-.Pp
-The system defines a set of signals that may be delivered to a process.
-Signal delivery resembles the occurrence of a hardware interrupt:
-the signal is blocked from further occurrence, the current process
-context is saved, and a new one is built. A process may specify a
-.Em handler
-to which a signal is delivered, or specify that a signal is to be
-.Em blocked
-or
-.Em ignored .
-A process may also specify that a default action is to be taken
-by the system when a signal occurs.
-Normally, signal handlers execute on the current stack
-of the process. This may be changed, on a per-handler basis,
-so that signals are taken on a special
-.Em "signal stack" .
-.Pp
-All signals have the same
-.Em priority .
-Signal routines execute with the signal that caused their
-invocation
-.Em blocked ,
-but other signals may yet occur.
-A global
-.Em "signal mask"
-defines the set of signals currently blocked from delivery
-to a process. The signal mask for a process is initialized
-from that of its parent (normally 0). It
-may be changed with a
-.Xr sigblock 2
-or
-.Xr sigsetmask 2
-call, or when a signal is delivered to the process.
-.Pp
-When a signal
-condition arises for a process, the signal is added to a set of
-signals pending for the process. If the signal is not currently
-.Em blocked
-by the process then it is delivered to the process. When a signal
-is delivered, the current state of the process is saved,
-a new signal mask is calculated (as described below),
-and the signal handler is invoked. The call to the handler
-is arranged so that if the signal handling routine returns
-normally the process will resume execution in the context
-from before the signal's delivery.
-If the process wishes to resume in a different context, then it
-must arrange to restore the previous context itself.
-.Pp
-When a signal is delivered to a process a new signal mask is
-installed for the duration of the process' signal handler
-(or until a
-.Xr sigblock 2
-or
-.Xr sigsetmask 2
-call is made).
-This mask is formed by taking the current signal mask,
-adding the signal to be delivered, and
-.Em or Ns 'ing
-in the signal mask associated with the handler to be invoked.
-.Pp
-.Fn Sigvec
-assigns a handler for a specific signal. If
-.Fa vec
-is non-zero, it
-specifies a handler routine and mask
-to be used when delivering the specified signal.
-Further, if the
-.Dv SV_ONSTACK
-bit is set in
-.Fa sv_flags ,
-the system will deliver the signal to the process on a
-.Em "signal stack" ,
-specified with
-.Xr sigaltstack 2 .
-If
-.Fa ovec
-is non-zero, the previous handling information for the signal
-is returned to the user.
-.Pp
-The following is a list of all signals
-with names as in the include file
-.Aq Pa signal.h :
-.Bl -column SIGVTALARMXX "create core imagexxx"
-.It Sy " NAME " " Default Action " " Description"
-.It Dv SIGHUP No " terminate process" " terminal line hangup"
-.It Dv SIGINT No " terminate process" " interrupt program"
-.It Dv SIGQUIT No " create core image" " quit program"
-.It Dv SIGILL No " create core image" " illegal instruction"
-.It Dv SIGTRAP No " create core image" " trace trap"
-.It Dv SIGABRT No " create core image" Xr abort 3
-call (formerly
-.Dv SIGIOT )
-.It Dv SIGEMT No " create core image" " emulate instruction executed"
-.It Dv SIGFPE No " create core image" " floating-point exception"
-.It Dv SIGKILL No " terminate process" " kill program"
-.It Dv SIGBUS No " create core image" " bus error"
-.It Dv SIGSEGV No " create core image" " segmentation violation"
-.It Dv SIGSYS No " create core image" " non-existent system call invoked"
-.It Dv SIGPIPE No " terminate process" " write on a pipe with no reader"
-.It Dv SIGALRM No " terminate process" " real-time timer expired"
-.It Dv SIGTERM No " terminate process" " software termination signal"
-.It Dv SIGURG No " discard signal" " urgent condition present on socket"
-.It Dv SIGSTOP No " stop process" " stop (cannot be caught or ignored)"
-.It Dv SIGTSTP No " stop process" " stop signal generated from keyboard"
-.It Dv SIGCONT No " discard signal" " continue after stop"
-.It Dv SIGCHLD No " discard signal" " child status has changed"
-.It Dv SIGTTIN No " stop process" " background read attempted from control terminal"
-.It Dv SIGTTOU No " stop process" " background write attempted to control terminal"
-.It Dv SIGIO No " discard signal" Tn " I/O"
-is possible on a descriptor (see
-.Xr fcntl 2 )
-.It Dv SIGXCPU No " terminate process" " cpu time limit exceeded (see"
-.Xr setrlimit 2 )
-.It Dv SIGXFSZ No " terminate process" " file size limit exceeded (see"
-.Xr setrlimit 2 )
-.It Dv SIGVTALRM No " terminate process" " virtual time alarm (see"
-.Xr setitimer 2 )
-.It Dv SIGPROF No " terminate process" " profiling timer alarm (see"
-.Xr setitimer 2 )
-.It Dv SIGWINCH No " discard signal" " Window size change"
-.It Dv SIGINFO No " discard signal" " status request from keyboard"
-.It Dv SIGUSR1 No " terminate process" " User defined signal 1"
-.It Dv SIGUSR2 No " terminate process" " User defined signal 2"
-.El
-.Pp
-Once a signal handler is installed, it remains installed
-until another
-.Fn sigvec
-call is made, or an
-.Xr execve 2
-is performed.
-A signal-specific default action may be reset by
-setting
-.Fa sv_handler
-to
-.Dv SIG_DFL .
-The defaults are process termination, possibly with core dump;
-no action; stopping the process; or continuing the process.
-See the above signal list for each signal's default action.
-If
-.Fa sv_handler
-is
-.Dv SIG_IGN
-current and pending instances
-of the signal are ignored and discarded.
-.Pp
-If a signal is caught during the system calls listed below,
-the call is normally restarted.
-The call can be forced to terminate prematurely with an
-.Dv EINTR
-error return by setting the
-.Dv SV_INTERRUPT
-bit in
-.Fa sv_flags .
-The affected system calls include
-.Xr read 2 ,
-.Xr write 2 ,
-.Xr sendto 2 ,
-.Xr recvfrom 2 ,
-.Xr sendmsg 2
-and
-.Xr recvmsg 2
-on a communications channel or a slow device (such as a terminal,
-but not a regular file)
-and during a
-.Xr wait 2
-or
-.Xr ioctl 2 .
-However, calls that have already committed are not restarted,
-but instead return a partial success (for example, a short read count).
-.Pp
-After a
-.Xr fork 2
-or
-.Xr vfork 2
-all signals, the signal mask, the signal stack,
-and the restart/interrupt flags are inherited by the child.
-.Pp
-.Xr Execve 2
-reinstates the default
-action for all signals which were caught and
-resets all signals to be caught on the user stack.
-Ignored signals remain ignored;
-the signal mask remains the same;
-signals that interrupt system calls continue to do so.
-.Sh NOTES
-The mask specified in
-.Fa vec
-is not allowed to block
-.Dv SIGKILL
-or
-.Dv SIGSTOP .
-This is done silently by the system.
-.Pp
-The
-.Dv SV_INTERRUPT
-flag is not available in
-.Bx 4.2 ,
-hence it should not be used if backward compatibility is needed.
-.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
-.Sh ERRORS
-.Fn Sigvec
-will fail and no new signal handler will be installed if one
-of the following occurs:
-.Bl -tag -width [EINVAL]
-.It Bq Er EFAULT
-Either
-.Fa vec
-or
-.Fa ovec
-points to memory that is not a valid part of the process
-address space.
-.It Bq Er EINVAL
-.Fa Sig
-is not a valid signal number.
-.It Bq Er EINVAL
-An attempt is made to ignore or supply a handler for
-.Dv SIGKILL
-or
-.Dv SIGSTOP .
-.El
-.Sh SEE ALSO
-.Xr kill 1 ,
-.Xr kill 2 ,
-.Xr ptrace 2 ,
-.Xr sigaction 2 ,
-.Xr sigaltstack 2 ,
-.Xr sigblock 2 ,
-.Xr sigpause 2 ,
-.Xr sigprocmask 2 ,
-.Xr sigsetmask 2 ,
-.Xr sigsuspend 2 ,
-.Xr setjmp 3 ,
-.Xr siginterrupt 3 ,
-.Xr signal 3 ,
-.Xr sigsetops 3 ,
-.Xr tty 4
-.Sh EXAMPLE
-On the
-.Tn VAX\-11
-The handler routine can be declared:
-.Bd -literal -offset indent
-void handler(sig, code, scp)
-int sig, code;
-struct sigcontext *scp;
-.Ed
-.Pp
-Here
-.Fa sig
-is the signal number, into which the hardware faults and traps are
-mapped as defined below.
-.Fa Code
-is a parameter that is either a constant
-as given below or, for compatibility mode faults, the code provided by
-the hardware (Compatibility mode faults are distinguished from the
-other
-.Dv SIGILL
-traps by having
-.Dv PSL_CM
-set in the psl).
-.Fa Scp
-is a pointer to the
-.Fa sigcontext
-structure (defined in
-.Aq Pa signal.h ) ,
-used to restore the context from before the signal.
-.Sh BUGS
-This manual page is still confusing.
diff --git a/lib/libc/db/Makefile.inc b/lib/libc/db/Makefile.inc
deleted file mode 100644
index 518205c..0000000
--- a/lib/libc/db/Makefile.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-# from @(#)Makefile.inc 8.2 (Berkeley) 2/21/94
-# $Id$
-#
-CFLAGS+=-D__DBINTERFACE_PRIVATE
-
-.include "${.CURDIR}/../libc/db/btree/Makefile.inc"
-.include "${.CURDIR}/../libc/db/db/Makefile.inc"
-.include "${.CURDIR}/../libc/db/hash/Makefile.inc"
-.include "${.CURDIR}/../libc/db/man/Makefile.inc"
-.include "${.CURDIR}/../libc/db/mpool/Makefile.inc"
-.include "${.CURDIR}/../libc/db/recno/Makefile.inc"
diff --git a/lib/libc/db/README b/lib/libc/db/README
deleted file mode 100644
index bed2c92..0000000
--- a/lib/libc/db/README
+++ /dev/null
@@ -1,40 +0,0 @@
-# @(#)README 8.27 (Berkeley) 9/1/94
-
-This is version 1.85 of the Berkeley DB code.
-
-For information on compiling and installing this software, see the file
-PORT/README.
-
-Newer versions of this software will periodically be made available by
-anonymous ftp from ftp.cs.berkeley.edu. An archive in compressed format
-is in ucb/4bsd/db.tar.Z, or in gzip format in ucb/4bsd/db.tar.gz. If
-you'd like to receive announcements of future releases of this software,
-send email to the contact address below.
-
-Email questions may be addressed to Keith Bostic at bostic@cs.berkeley.edu.
-
-============================================
-Distribution contents:
-
-Makefile.inc Ignore this, it's the 4.4BSD subsystem Makefile.
-PORT The per OS/architecture directories to use to build
- libdb.a, if you're not running 4.4BSD. See the file
- PORT/README for more information.
-README This file.
-btree The B+tree routines.
-changelog List of changes, per version.
-db The dbopen(3) interface routine.
-docs Various USENIX papers, and the formatted manual pages.
-hash The extended linear hashing routines.
-man The unformatted manual pages.
-mpool The memory pool routines.
-recno The fixed/variable length record routines.
-test Test package.
-
-============================================
-Debugging:
-
-If you're running a memory checker (e.g. Purify) on DB, make sure that
-you recompile it with "-DPURIFY" in the CFLAGS, first. By default,
-allocated pages are not initialized by the DB code, and they will show
-up as reads of uninitialized memory in the buffer write routines.
diff --git a/lib/libc/db/btree/Makefile.inc b/lib/libc/db/btree/Makefile.inc
deleted file mode 100644
index f373a21..0000000
--- a/lib/libc/db/btree/Makefile.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-# from @(#)Makefile.inc 8.2 (Berkeley) 7/14/94
-# $Id$
-
-.PATH: ${.CURDIR}/../libc/db/btree
-
-SRCS+= bt_close.c bt_conv.c bt_debug.c bt_delete.c bt_get.c bt_open.c \
- bt_overflow.c bt_page.c bt_put.c bt_search.c bt_seq.c bt_split.c \
- bt_utils.c
diff --git a/lib/libc/db/btree/bt_close.c b/lib/libc/db/btree/bt_close.c
deleted file mode 100644
index 27f9ab6..0000000
--- a/lib/libc/db/btree/bt_close.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_close.c 8.7 (Berkeley) 8/17/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <db.h>
-#include "btree.h"
-
-static int bt_meta __P((BTREE *));
-
-/*
- * BT_CLOSE -- Close a btree.
- *
- * Parameters:
- * dbp: pointer to access method
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__bt_close(dbp)
- DB *dbp;
-{
- BTREE *t;
- int fd;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /* Sync the tree. */
- if (__bt_sync(dbp, 0) == RET_ERROR)
- return (RET_ERROR);
-
- /* Close the memory pool. */
- if (mpool_close(t->bt_mp) == RET_ERROR)
- return (RET_ERROR);
-
- /* Free random memory. */
- if (t->bt_cursor.key.data != NULL) {
- free(t->bt_cursor.key.data);
- t->bt_cursor.key.size = 0;
- t->bt_cursor.key.data = NULL;
- }
- if (t->bt_rkey.data) {
- free(t->bt_rkey.data);
- t->bt_rkey.size = 0;
- t->bt_rkey.data = NULL;
- }
- if (t->bt_rdata.data) {
- free(t->bt_rdata.data);
- t->bt_rdata.size = 0;
- t->bt_rdata.data = NULL;
- }
-
- fd = t->bt_fd;
- free(t);
- free(dbp);
- return (close(fd) ? RET_ERROR : RET_SUCCESS);
-}
-
-/*
- * BT_SYNC -- sync the btree to disk.
- *
- * Parameters:
- * dbp: pointer to access method
- *
- * Returns:
- * RET_SUCCESS, RET_ERROR.
- */
-int
-__bt_sync(dbp, flags)
- const DB *dbp;
- u_int flags;
-{
- BTREE *t;
- int status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /* Sync doesn't currently take any flags. */
- if (flags != 0) {
- errno = EINVAL;
- return (RET_ERROR);
- }
-
- if (F_ISSET(t, B_INMEM | B_RDONLY) || !F_ISSET(t, B_MODIFIED))
- return (RET_SUCCESS);
-
- if (F_ISSET(t, B_METADIRTY) && bt_meta(t) == RET_ERROR)
- return (RET_ERROR);
-
- if ((status = mpool_sync(t->bt_mp)) == RET_SUCCESS)
- F_CLR(t, B_MODIFIED);
-
- return (status);
-}
-
-/*
- * BT_META -- write the tree meta data to disk.
- *
- * Parameters:
- * t: tree
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-static int
-bt_meta(t)
- BTREE *t;
-{
- BTMETA m;
- void *p;
-
- if ((p = mpool_get(t->bt_mp, P_META, 0)) == NULL)
- return (RET_ERROR);
-
- /* Fill in metadata. */
- m.magic = BTREEMAGIC;
- m.version = BTREEVERSION;
- m.psize = t->bt_psize;
- m.free = t->bt_free;
- m.nrecs = t->bt_nrecs;
- m.flags = F_ISSET(t, SAVEMETA);
-
- memmove(p, &m, sizeof(BTMETA));
- mpool_put(t->bt_mp, p, MPOOL_DIRTY);
- return (RET_SUCCESS);
-}
diff --git a/lib/libc/db/btree/bt_conv.c b/lib/libc/db/btree/bt_conv.c
deleted file mode 100644
index 1cb208b1..0000000
--- a/lib/libc/db/btree/bt_conv.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_conv.c 8.5 (Berkeley) 8/17/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-
-#include <stdio.h>
-
-#include <db.h>
-#include "btree.h"
-
-static void mswap __P((PAGE *));
-
-/*
- * __BT_BPGIN, __BT_BPGOUT --
- * Convert host-specific number layout to/from the host-independent
- * format stored on disk.
- *
- * Parameters:
- * t: tree
- * pg: page number
- * h: page to convert
- */
-void
-__bt_pgin(t, pg, pp)
- void *t;
- pgno_t pg;
- void *pp;
-{
- PAGE *h;
- indx_t i, top;
- u_char flags;
- char *p;
-
- if (!F_ISSET(((BTREE *)t), B_NEEDSWAP))
- return;
- if (pg == P_META) {
- mswap(pp);
- return;
- }
-
- h = pp;
- M_32_SWAP(h->pgno);
- M_32_SWAP(h->prevpg);
- M_32_SWAP(h->nextpg);
- M_32_SWAP(h->flags);
- M_16_SWAP(h->lower);
- M_16_SWAP(h->upper);
-
- top = NEXTINDEX(h);
- if ((h->flags & P_TYPE) == P_BINTERNAL)
- for (i = 0; i < top; i++) {
- M_16_SWAP(h->linp[i]);
- p = (char *)GETBINTERNAL(h, i);
- P_32_SWAP(p);
- p += sizeof(u_int32_t);
- P_32_SWAP(p);
- p += sizeof(pgno_t);
- if (*(u_char *)p & P_BIGKEY) {
- p += sizeof(u_char);
- P_32_SWAP(p);
- p += sizeof(pgno_t);
- P_32_SWAP(p);
- }
- }
- else if ((h->flags & P_TYPE) == P_BLEAF)
- for (i = 0; i < top; i++) {
- M_16_SWAP(h->linp[i]);
- p = (char *)GETBLEAF(h, i);
- P_32_SWAP(p);
- p += sizeof(u_int32_t);
- P_32_SWAP(p);
- p += sizeof(u_int32_t);
- flags = *(u_char *)p;
- if (flags & (P_BIGKEY | P_BIGDATA)) {
- p += sizeof(u_char);
- if (flags & P_BIGKEY) {
- P_32_SWAP(p);
- p += sizeof(pgno_t);
- P_32_SWAP(p);
- }
- if (flags & P_BIGDATA) {
- p += sizeof(u_int32_t);
- P_32_SWAP(p);
- p += sizeof(pgno_t);
- P_32_SWAP(p);
- }
- }
- }
-}
-
-void
-__bt_pgout(t, pg, pp)
- void *t;
- pgno_t pg;
- void *pp;
-{
- PAGE *h;
- indx_t i, top;
- u_char flags;
- char *p;
-
- if (!F_ISSET(((BTREE *)t), B_NEEDSWAP))
- return;
- if (pg == P_META) {
- mswap(pp);
- return;
- }
-
- h = pp;
- top = NEXTINDEX(h);
- if ((h->flags & P_TYPE) == P_BINTERNAL)
- for (i = 0; i < top; i++) {
- p = (char *)GETBINTERNAL(h, i);
- P_32_SWAP(p);
- p += sizeof(u_int32_t);
- P_32_SWAP(p);
- p += sizeof(pgno_t);
- if (*(u_char *)p & P_BIGKEY) {
- p += sizeof(u_char);
- P_32_SWAP(p);
- p += sizeof(pgno_t);
- P_32_SWAP(p);
- }
- M_16_SWAP(h->linp[i]);
- }
- else if ((h->flags & P_TYPE) == P_BLEAF)
- for (i = 0; i < top; i++) {
- p = (char *)GETBLEAF(h, i);
- P_32_SWAP(p);
- p += sizeof(u_int32_t);
- P_32_SWAP(p);
- p += sizeof(u_int32_t);
- flags = *(u_char *)p;
- if (flags & (P_BIGKEY | P_BIGDATA)) {
- p += sizeof(u_char);
- if (flags & P_BIGKEY) {
- P_32_SWAP(p);
- p += sizeof(pgno_t);
- P_32_SWAP(p);
- }
- if (flags & P_BIGDATA) {
- p += sizeof(u_int32_t);
- P_32_SWAP(p);
- p += sizeof(pgno_t);
- P_32_SWAP(p);
- }
- }
- M_16_SWAP(h->linp[i]);
- }
-
- M_32_SWAP(h->pgno);
- M_32_SWAP(h->prevpg);
- M_32_SWAP(h->nextpg);
- M_32_SWAP(h->flags);
- M_16_SWAP(h->lower);
- M_16_SWAP(h->upper);
-}
-
-/*
- * MSWAP -- Actually swap the bytes on the meta page.
- *
- * Parameters:
- * p: page to convert
- */
-static void
-mswap(pg)
- PAGE *pg;
-{
- char *p;
-
- p = (char *)pg;
- P_32_SWAP(p); /* magic */
- p += sizeof(u_int32_t);
- P_32_SWAP(p); /* version */
- p += sizeof(u_int32_t);
- P_32_SWAP(p); /* psize */
- p += sizeof(u_int32_t);
- P_32_SWAP(p); /* free */
- p += sizeof(u_int32_t);
- P_32_SWAP(p); /* nrecs */
- p += sizeof(u_int32_t);
- P_32_SWAP(p); /* flags */
- p += sizeof(u_int32_t);
-}
diff --git a/lib/libc/db/btree/bt_debug.c b/lib/libc/db/btree/bt_debug.c
deleted file mode 100644
index 3aefbe7..0000000
--- a/lib/libc/db/btree/bt_debug.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_debug.c 8.5 (Berkeley) 8/17/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <db.h>
-#include "btree.h"
-
-#ifdef DEBUG
-/*
- * BT_DUMP -- Dump the tree
- *
- * Parameters:
- * dbp: pointer to the DB
- */
-void
-__bt_dump(dbp)
- DB *dbp;
-{
- BTREE *t;
- PAGE *h;
- pgno_t i;
- char *sep;
-
- t = dbp->internal;
- (void)fprintf(stderr, "%s: pgsz %d",
- F_ISSET(t, B_INMEM) ? "memory" : "disk", t->bt_psize);
- if (F_ISSET(t, R_RECNO))
- (void)fprintf(stderr, " keys %lu", t->bt_nrecs);
-#undef X
-#define X(flag, name) \
- if (F_ISSET(t, flag)) { \
- (void)fprintf(stderr, "%s%s", sep, name); \
- sep = ", "; \
- }
- if (t->flags != 0) {
- sep = " flags (";
- X(R_FIXLEN, "FIXLEN");
- X(B_INMEM, "INMEM");
- X(B_NODUPS, "NODUPS");
- X(B_RDONLY, "RDONLY");
- X(R_RECNO, "RECNO");
- X(B_METADIRTY,"METADIRTY");
- (void)fprintf(stderr, ")\n");
- }
-#undef X
-
- for (i = P_ROOT; (h = mpool_get(t->bt_mp, i, 0)) != NULL; ++i) {
- __bt_dpage(h);
- (void)mpool_put(t->bt_mp, h, 0);
- }
-}
-
-/*
- * BT_DMPAGE -- Dump the meta page
- *
- * Parameters:
- * h: pointer to the PAGE
- */
-void
-__bt_dmpage(h)
- PAGE *h;
-{
- BTMETA *m;
- char *sep;
-
- m = (BTMETA *)h;
- (void)fprintf(stderr, "magic %lx\n", m->magic);
- (void)fprintf(stderr, "version %lu\n", m->version);
- (void)fprintf(stderr, "psize %lu\n", m->psize);
- (void)fprintf(stderr, "free %lu\n", m->free);
- (void)fprintf(stderr, "nrecs %lu\n", m->nrecs);
- (void)fprintf(stderr, "flags %lu", m->flags);
-#undef X
-#define X(flag, name) \
- if (m->flags & flag) { \
- (void)fprintf(stderr, "%s%s", sep, name); \
- sep = ", "; \
- }
- if (m->flags) {
- sep = " (";
- X(B_NODUPS, "NODUPS");
- X(R_RECNO, "RECNO");
- (void)fprintf(stderr, ")");
- }
-}
-
-/*
- * BT_DNPAGE -- Dump the page
- *
- * Parameters:
- * n: page number to dump.
- */
-void
-__bt_dnpage(dbp, pgno)
- DB *dbp;
- pgno_t pgno;
-{
- BTREE *t;
- PAGE *h;
-
- t = dbp->internal;
- if ((h = mpool_get(t->bt_mp, pgno, 0)) != NULL) {
- __bt_dpage(h);
- (void)mpool_put(t->bt_mp, h, 0);
- }
-}
-
-/*
- * BT_DPAGE -- Dump the page
- *
- * Parameters:
- * h: pointer to the PAGE
- */
-void
-__bt_dpage(h)
- PAGE *h;
-{
- BINTERNAL *bi;
- BLEAF *bl;
- RINTERNAL *ri;
- RLEAF *rl;
- indx_t cur, top;
- char *sep;
-
- (void)fprintf(stderr, " page %d: (", h->pgno);
-#undef X
-#define X(flag, name) \
- if (h->flags & flag) { \
- (void)fprintf(stderr, "%s%s", sep, name); \
- sep = ", "; \
- }
- sep = "";
- X(P_BINTERNAL, "BINTERNAL") /* types */
- X(P_BLEAF, "BLEAF")
- X(P_RINTERNAL, "RINTERNAL") /* types */
- X(P_RLEAF, "RLEAF")
- X(P_OVERFLOW, "OVERFLOW")
- X(P_PRESERVE, "PRESERVE");
- (void)fprintf(stderr, ")\n");
-#undef X
-
- (void)fprintf(stderr, "\tprev %2d next %2d", h->prevpg, h->nextpg);
- if (h->flags & P_OVERFLOW)
- return;
-
- top = NEXTINDEX(h);
- (void)fprintf(stderr, " lower %3d upper %3d nextind %d\n",
- h->lower, h->upper, top);
- for (cur = 0; cur < top; cur++) {
- (void)fprintf(stderr, "\t[%03d] %4d ", cur, h->linp[cur]);
- switch (h->flags & P_TYPE) {
- case P_BINTERNAL:
- bi = GETBINTERNAL(h, cur);
- (void)fprintf(stderr,
- "size %03d pgno %03d", bi->ksize, bi->pgno);
- if (bi->flags & P_BIGKEY)
- (void)fprintf(stderr, " (indirect)");
- else if (bi->ksize)
- (void)fprintf(stderr,
- " {%.*s}", (int)bi->ksize, bi->bytes);
- break;
- case P_RINTERNAL:
- ri = GETRINTERNAL(h, cur);
- (void)fprintf(stderr, "entries %03d pgno %03d",
- ri->nrecs, ri->pgno);
- break;
- case P_BLEAF:
- bl = GETBLEAF(h, cur);
- if (bl->flags & P_BIGKEY)
- (void)fprintf(stderr,
- "big key page %lu size %u/",
- *(pgno_t *)bl->bytes,
- *(u_int32_t *)(bl->bytes + sizeof(pgno_t)));
- else if (bl->ksize)
- (void)fprintf(stderr, "%s/", bl->bytes);
- if (bl->flags & P_BIGDATA)
- (void)fprintf(stderr,
- "big data page %lu size %u",
- *(pgno_t *)(bl->bytes + bl->ksize),
- *(u_int32_t *)(bl->bytes + bl->ksize +
- sizeof(pgno_t)));
- else if (bl->dsize)
- (void)fprintf(stderr, "%.*s",
- (int)bl->dsize, bl->bytes + bl->ksize);
- break;
- case P_RLEAF:
- rl = GETRLEAF(h, cur);
- if (rl->flags & P_BIGDATA)
- (void)fprintf(stderr,
- "big data page %lu size %u",
- *(pgno_t *)rl->bytes,
- *(u_int32_t *)(rl->bytes + sizeof(pgno_t)));
- else if (rl->dsize)
- (void)fprintf(stderr,
- "%.*s", (int)rl->dsize, rl->bytes);
- break;
- }
- (void)fprintf(stderr, "\n");
- }
-}
-#endif
-
-#ifdef STATISTICS
-/*
- * BT_STAT -- Gather/print the tree statistics
- *
- * Parameters:
- * dbp: pointer to the DB
- */
-void
-__bt_stat(dbp)
- DB *dbp;
-{
- extern u_long bt_cache_hit, bt_cache_miss, bt_pfxsaved, bt_rootsplit;
- extern u_long bt_sortsplit, bt_split;
- BTREE *t;
- PAGE *h;
- pgno_t i, pcont, pinternal, pleaf;
- u_long ifree, lfree, nkeys;
- int levels;
-
- t = dbp->internal;
- pcont = pinternal = pleaf = 0;
- nkeys = ifree = lfree = 0;
- for (i = P_ROOT; (h = mpool_get(t->bt_mp, i, 0)) != NULL; ++i) {
- switch (h->flags & P_TYPE) {
- case P_BINTERNAL:
- case P_RINTERNAL:
- ++pinternal;
- ifree += h->upper - h->lower;
- break;
- case P_BLEAF:
- case P_RLEAF:
- ++pleaf;
- lfree += h->upper - h->lower;
- nkeys += NEXTINDEX(h);
- break;
- case P_OVERFLOW:
- ++pcont;
- break;
- }
- (void)mpool_put(t->bt_mp, h, 0);
- }
-
- /* Count the levels of the tree. */
- for (i = P_ROOT, levels = 0 ;; ++levels) {
- h = mpool_get(t->bt_mp, i, 0);
- if (h->flags & (P_BLEAF|P_RLEAF)) {
- if (levels == 0)
- levels = 1;
- (void)mpool_put(t->bt_mp, h, 0);
- break;
- }
- i = F_ISSET(t, R_RECNO) ?
- GETRINTERNAL(h, 0)->pgno :
- GETBINTERNAL(h, 0)->pgno;
- (void)mpool_put(t->bt_mp, h, 0);
- }
-
- (void)fprintf(stderr, "%d level%s with %ld keys",
- levels, levels == 1 ? "" : "s", nkeys);
- if (F_ISSET(t, R_RECNO))
- (void)fprintf(stderr, " (%ld header count)", t->bt_nrecs);
- (void)fprintf(stderr,
- "\n%lu pages (leaf %ld, internal %ld, overflow %ld)\n",
- pinternal + pleaf + pcont, pleaf, pinternal, pcont);
- (void)fprintf(stderr, "%ld cache hits, %ld cache misses\n",
- bt_cache_hit, bt_cache_miss);
- (void)fprintf(stderr, "%ld splits (%ld root splits, %ld sort splits)\n",
- bt_split, bt_rootsplit, bt_sortsplit);
- pleaf *= t->bt_psize - BTDATAOFF;
- if (pleaf)
- (void)fprintf(stderr,
- "%.0f%% leaf fill (%ld bytes used, %ld bytes free)\n",
- ((double)(pleaf - lfree) / pleaf) * 100,
- pleaf - lfree, lfree);
- pinternal *= t->bt_psize - BTDATAOFF;
- if (pinternal)
- (void)fprintf(stderr,
- "%.0f%% internal fill (%ld bytes used, %ld bytes free\n",
- ((double)(pinternal - ifree) / pinternal) * 100,
- pinternal - ifree, ifree);
- if (bt_pfxsaved)
- (void)fprintf(stderr, "prefix checking removed %lu bytes.\n",
- bt_pfxsaved);
-}
-#endif
diff --git a/lib/libc/db/btree/bt_delete.c b/lib/libc/db/btree/bt_delete.c
deleted file mode 100644
index ece1ab6..0000000
--- a/lib/libc/db/btree/bt_delete.c
+++ /dev/null
@@ -1,657 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_delete.c 8.13 (Berkeley) 7/28/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <db.h>
-#include "btree.h"
-
-static int __bt_bdelete __P((BTREE *, const DBT *));
-static int __bt_curdel __P((BTREE *, const DBT *, PAGE *, u_int));
-static int __bt_pdelete __P((BTREE *, PAGE *));
-static int __bt_relink __P((BTREE *, PAGE *));
-static int __bt_stkacq __P((BTREE *, PAGE **, CURSOR *));
-
-/*
- * __bt_delete
- * Delete the item(s) referenced by a key.
- *
- * Return RET_SPECIAL if the key is not found.
- */
-int
-__bt_delete(dbp, key, flags)
- const DB *dbp;
- const DBT *key;
- u_int flags;
-{
- BTREE *t;
- CURSOR *c;
- PAGE *h;
- int status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /* Check for change to a read-only tree. */
- if (F_ISSET(t, B_RDONLY)) {
- errno = EPERM;
- return (RET_ERROR);
- }
-
- switch (flags) {
- case 0:
- status = __bt_bdelete(t, key);
- break;
- case R_CURSOR:
- /*
- * If flags is R_CURSOR, delete the cursor. Must already
- * have started a scan and not have already deleted it.
- */
- c = &t->bt_cursor;
- if (F_ISSET(c, CURS_INIT)) {
- if (F_ISSET(c, CURS_ACQUIRE | CURS_AFTER | CURS_BEFORE))
- return (RET_SPECIAL);
- if ((h = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL)
- return (RET_ERROR);
-
- /*
- * If the page is about to be emptied, we'll need to
- * delete it, which means we have to acquire a stack.
- */
- if (NEXTINDEX(h) == 1)
- if (__bt_stkacq(t, &h, &t->bt_cursor))
- return (RET_ERROR);
-
- status = __bt_dleaf(t, NULL, h, c->pg.index);
-
- if (NEXTINDEX(h) == 0 && status == RET_SUCCESS) {
- if (__bt_pdelete(t, h))
- return (RET_ERROR);
- } else
- mpool_put(t->bt_mp,
- h, status == RET_SUCCESS ? MPOOL_DIRTY : 0);
- break;
- }
- /* FALLTHROUGH */
- default:
- errno = EINVAL;
- return (RET_ERROR);
- }
- if (status == RET_SUCCESS)
- F_SET(t, B_MODIFIED);
- return (status);
-}
-
-/*
- * __bt_stkacq --
- * Acquire a stack so we can delete a cursor entry.
- *
- * Parameters:
- * t: tree
- * hp: pointer to current, pinned PAGE pointer
- * c: pointer to the cursor
- *
- * Returns:
- * 0 on success, 1 on failure
- */
-static int
-__bt_stkacq(t, hp, c)
- BTREE *t;
- PAGE **hp;
- CURSOR *c;
-{
- BINTERNAL *bi;
- EPG *e;
- EPGNO *parent;
- PAGE *h;
- indx_t index;
- pgno_t pgno;
- recno_t nextpg, prevpg;
- int exact, level;
-
- /*
- * Find the first occurrence of the key in the tree. Toss the
- * currently locked page so we don't hit an already-locked page.
- */
- h = *hp;
- mpool_put(t->bt_mp, h, 0);
- if ((e = __bt_search(t, &c->key, &exact)) == NULL)
- return (1);
- h = e->page;
-
- /* See if we got it in one shot. */
- if (h->pgno == c->pg.pgno)
- goto ret;
-
- /*
- * Move right, looking for the page. At each move we have to move
- * up the stack until we don't have to move to the next page. If
- * we have to change pages at an internal level, we have to fix the
- * stack back up.
- */
- while (h->pgno != c->pg.pgno) {
- if ((nextpg = h->nextpg) == P_INVALID)
- break;
- mpool_put(t->bt_mp, h, 0);
-
- /* Move up the stack. */
- for (level = 0; (parent = BT_POP(t)) != NULL; ++level) {
- /* Get the parent page. */
- if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
- return (1);
-
- /* Move to the next index. */
- if (parent->index != NEXTINDEX(h) - 1) {
- index = parent->index + 1;
- BT_PUSH(t, h->pgno, index);
- break;
- }
- mpool_put(t->bt_mp, h, 0);
- }
-
- /* Restore the stack. */
- while (level--) {
- /* Push the next level down onto the stack. */
- bi = GETBINTERNAL(h, index);
- pgno = bi->pgno;
- BT_PUSH(t, pgno, 0);
-
- /* Lose the currently pinned page. */
- mpool_put(t->bt_mp, h, 0);
-
- /* Get the next level down. */
- if ((h = mpool_get(t->bt_mp, pgno, 0)) == NULL)
- return (1);
- index = 0;
- }
- mpool_put(t->bt_mp, h, 0);
- if ((h = mpool_get(t->bt_mp, nextpg, 0)) == NULL)
- return (1);
- }
-
- if (h->pgno == c->pg.pgno)
- goto ret;
-
- /* Reacquire the original stack. */
- mpool_put(t->bt_mp, h, 0);
- if ((e = __bt_search(t, &c->key, &exact)) == NULL)
- return (1);
- h = e->page;
-
- /*
- * Move left, looking for the page. At each move we have to move
- * up the stack until we don't have to change pages to move to the
- * next page. If we have to change pages at an internal level, we
- * have to fix the stack back up.
- */
- while (h->pgno != c->pg.pgno) {
- if ((prevpg = h->prevpg) == P_INVALID)
- break;
- mpool_put(t->bt_mp, h, 0);
-
- /* Move up the stack. */
- for (level = 0; (parent = BT_POP(t)) != NULL; ++level) {
- /* Get the parent page. */
- if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
- return (1);
-
- /* Move to the next index. */
- if (parent->index != 0) {
- index = parent->index - 1;
- BT_PUSH(t, h->pgno, index);
- break;
- }
- mpool_put(t->bt_mp, h, 0);
- }
-
- /* Restore the stack. */
- while (level--) {
- /* Push the next level down onto the stack. */
- bi = GETBINTERNAL(h, index);
- pgno = bi->pgno;
-
- /* Lose the currently pinned page. */
- mpool_put(t->bt_mp, h, 0);
-
- /* Get the next level down. */
- if ((h = mpool_get(t->bt_mp, pgno, 0)) == NULL)
- return (1);
-
- index = NEXTINDEX(h) - 1;
- BT_PUSH(t, pgno, index);
- }
- mpool_put(t->bt_mp, h, 0);
- if ((h = mpool_get(t->bt_mp, prevpg, 0)) == NULL)
- return (1);
- }
-
-
-ret: mpool_put(t->bt_mp, h, 0);
- return ((*hp = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL);
-}
-
-/*
- * __bt_bdelete --
- * Delete all key/data pairs matching the specified key.
- *
- * Parameters:
- * t: tree
- * key: key to delete
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
- */
-static int
-__bt_bdelete(t, key)
- BTREE *t;
- const DBT *key;
-{
- EPG *e;
- PAGE *h;
- int deleted, exact, redo;
-
- deleted = 0;
-
- /* Find any matching record; __bt_search pins the page. */
-loop: if ((e = __bt_search(t, key, &exact)) == NULL)
- return (deleted ? RET_SUCCESS : RET_ERROR);
- if (!exact) {
- mpool_put(t->bt_mp, e->page, 0);
- return (deleted ? RET_SUCCESS : RET_SPECIAL);
- }
-
- /*
- * Delete forward, then delete backward, from the found key. If
- * there are duplicates and we reach either side of the page, do
- * the key search again, so that we get them all.
- */
- redo = 0;
- h = e->page;
- do {
- if (__bt_dleaf(t, key, h, e->index)) {
- mpool_put(t->bt_mp, h, 0);
- return (RET_ERROR);
- }
- if (F_ISSET(t, B_NODUPS)) {
- if (NEXTINDEX(h) == 0) {
- if (__bt_pdelete(t, h))
- return (RET_ERROR);
- } else
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- return (RET_SUCCESS);
- }
- deleted = 1;
- } while (e->index < NEXTINDEX(h) && __bt_cmp(t, key, e) == 0);
-
- /* Check for right-hand edge of the page. */
- if (e->index == NEXTINDEX(h))
- redo = 1;
-
- /* Delete from the key to the beginning of the page. */
- while (e->index-- > 0) {
- if (__bt_cmp(t, key, e) != 0)
- break;
- if (__bt_dleaf(t, key, h, e->index) == RET_ERROR) {
- mpool_put(t->bt_mp, h, 0);
- return (RET_ERROR);
- }
- if (e->index == 0)
- redo = 1;
- }
-
- /* Check for an empty page. */
- if (NEXTINDEX(h) == 0) {
- if (__bt_pdelete(t, h))
- return (RET_ERROR);
- goto loop;
- }
-
- /* Put the page. */
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
-
- if (redo)
- goto loop;
- return (RET_SUCCESS);
-}
-
-/*
- * __bt_pdelete --
- * Delete a single page from the tree.
- *
- * Parameters:
- * t: tree
- * h: leaf page
- *
- * Returns:
- * RET_SUCCESS, RET_ERROR.
- *
- * Side-effects:
- * mpool_put's the page
- */
-static int
-__bt_pdelete(t, h)
- BTREE *t;
- PAGE *h;
-{
- BINTERNAL *bi;
- PAGE *pg;
- EPGNO *parent;
- indx_t cnt, index, *ip, offset;
- u_int32_t nksize;
- char *from;
-
- /*
- * Walk the parent page stack -- a LIFO stack of the pages that were
- * traversed when we searched for the page where the delete occurred.
- * Each stack entry is a page number and a page index offset. The
- * offset is for the page traversed on the search. We've just deleted
- * a page, so we have to delete the key from the parent page.
- *
- * If the delete from the parent page makes it empty, this process may
- * continue all the way up the tree. We stop if we reach the root page
- * (which is never deleted, it's just not worth the effort) or if the
- * delete does not empty the page.
- */
- while ((parent = BT_POP(t)) != NULL) {
- /* Get the parent page. */
- if ((pg = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
- return (RET_ERROR);
-
- index = parent->index;
- bi = GETBINTERNAL(pg, index);
-
- /* Free any overflow pages. */
- if (bi->flags & P_BIGKEY &&
- __ovfl_delete(t, bi->bytes) == RET_ERROR) {
- mpool_put(t->bt_mp, pg, 0);
- return (RET_ERROR);
- }
-
- /*
- * Free the parent if it has only the one key and it's not the
- * root page. If it's the rootpage, turn it back into an empty
- * leaf page.
- */
- if (NEXTINDEX(pg) == 1)
- if (pg->pgno == P_ROOT) {
- pg->lower = BTDATAOFF;
- pg->upper = t->bt_psize;
- pg->flags = P_BLEAF;
- } else {
- if (__bt_relink(t, pg) || __bt_free(t, pg))
- return (RET_ERROR);
- continue;
- }
- else {
- /* Pack remaining key items at the end of the page. */
- nksize = NBINTERNAL(bi->ksize);
- from = (char *)pg + pg->upper;
- memmove(from + nksize, from, (char *)bi - from);
- pg->upper += nksize;
-
- /* Adjust indices' offsets, shift the indices down. */
- offset = pg->linp[index];
- for (cnt = index, ip = &pg->linp[0]; cnt--; ++ip)
- if (ip[0] < offset)
- ip[0] += nksize;
- for (cnt = NEXTINDEX(pg) - index; --cnt; ++ip)
- ip[0] = ip[1] < offset ? ip[1] + nksize : ip[1];
- pg->lower -= sizeof(indx_t);
- }
-
- mpool_put(t->bt_mp, pg, MPOOL_DIRTY);
- break;
- }
-
- /* Free the leaf page, as long as it wasn't the root. */
- if (h->pgno == P_ROOT) {
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- return (RET_SUCCESS);
- }
- return (__bt_relink(t, h) || __bt_free(t, h));
-}
-
-/*
- * __bt_dleaf --
- * Delete a single record from a leaf page.
- *
- * Parameters:
- * t: tree
- * key: referenced key
- * h: page
- * index: index on page to delete
- *
- * Returns:
- * RET_SUCCESS, RET_ERROR.
- */
-int
-__bt_dleaf(t, key, h, index)
- BTREE *t;
- const DBT *key;
- PAGE *h;
- u_int index;
-{
- BLEAF *bl;
- indx_t cnt, *ip, offset;
- u_int32_t nbytes;
- void *to;
- char *from;
-
- /* If this record is referenced by the cursor, delete the cursor. */
- if (F_ISSET(&t->bt_cursor, CURS_INIT) &&
- !F_ISSET(&t->bt_cursor, CURS_ACQUIRE) &&
- t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index == index &&
- __bt_curdel(t, key, h, index))
- return (RET_ERROR);
-
- /* If the entry uses overflow pages, make them available for reuse. */
- to = bl = GETBLEAF(h, index);
- if (bl->flags & P_BIGKEY && __ovfl_delete(t, bl->bytes) == RET_ERROR)
- return (RET_ERROR);
- if (bl->flags & P_BIGDATA &&
- __ovfl_delete(t, bl->bytes + bl->ksize) == RET_ERROR)
- return (RET_ERROR);
-
- /* Pack the remaining key/data items at the end of the page. */
- nbytes = NBLEAF(bl);
- from = (char *)h + h->upper;
- memmove(from + nbytes, from, (char *)to - from);
- h->upper += nbytes;
-
- /* Adjust the indices' offsets, shift the indices down. */
- offset = h->linp[index];
- for (cnt = index, ip = &h->linp[0]; cnt--; ++ip)
- if (ip[0] < offset)
- ip[0] += nbytes;
- for (cnt = NEXTINDEX(h) - index; --cnt; ++ip)
- ip[0] = ip[1] < offset ? ip[1] + nbytes : ip[1];
- h->lower -= sizeof(indx_t);
-
- /* If the cursor is on this page, adjust it as necessary. */
- if (F_ISSET(&t->bt_cursor, CURS_INIT) &&
- !F_ISSET(&t->bt_cursor, CURS_ACQUIRE) &&
- t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index > index)
- --t->bt_cursor.pg.index;
-
- return (RET_SUCCESS);
-}
-
-/*
- * __bt_curdel --
- * Delete the cursor.
- *
- * Parameters:
- * t: tree
- * key: referenced key (or NULL)
- * h: page
- * index: index on page to delete
- *
- * Returns:
- * RET_SUCCESS, RET_ERROR.
- */
-static int
-__bt_curdel(t, key, h, index)
- BTREE *t;
- const DBT *key;
- PAGE *h;
- u_int index;
-{
- CURSOR *c;
- EPG e;
- PAGE *pg;
- int curcopy, status;
-
- /*
- * If there are duplicates, move forward or backward to one.
- * Otherwise, copy the key into the cursor area.
- */
- c = &t->bt_cursor;
- F_CLR(c, CURS_AFTER | CURS_BEFORE | CURS_ACQUIRE);
-
- curcopy = 0;
- if (!F_ISSET(t, B_NODUPS)) {
- /*
- * We're going to have to do comparisons. If we weren't
- * provided a copy of the key, i.e. the user is deleting
- * the current cursor position, get one.
- */
- if (key == NULL) {
- e.page = h;
- e.index = index;
- if ((status = __bt_ret(t, &e,
- &c->key, &c->key, NULL, NULL, 1)) != RET_SUCCESS)
- return (status);
- curcopy = 1;
- key = &c->key;
- }
- /* Check previous key, if not at the beginning of the page. */
- if (index > 0) {
- e.page = h;
- e.index = index - 1;
- if (__bt_cmp(t, key, &e) == 0) {
- F_SET(c, CURS_BEFORE);
- goto dup2;
- }
- }
- /* Check next key, if not at the end of the page. */
- if (index < NEXTINDEX(h) - 1) {
- e.page = h;
- e.index = index + 1;
- if (__bt_cmp(t, key, &e) == 0) {
- F_SET(c, CURS_AFTER);
- goto dup2;
- }
- }
- /* Check previous key if at the beginning of the page. */
- if (index == 0 && h->prevpg != P_INVALID) {
- if ((pg = mpool_get(t->bt_mp, h->prevpg, 0)) == NULL)
- return (RET_ERROR);
- e.page = pg;
- e.index = NEXTINDEX(pg) - 1;
- if (__bt_cmp(t, key, &e) == 0) {
- F_SET(c, CURS_BEFORE);
- goto dup1;
- }
- mpool_put(t->bt_mp, pg, 0);
- }
- /* Check next key if at the end of the page. */
- if (index == NEXTINDEX(h) - 1 && h->nextpg != P_INVALID) {
- if ((pg = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL)
- return (RET_ERROR);
- e.page = pg;
- e.index = 0;
- if (__bt_cmp(t, key, &e) == 0) {
- F_SET(c, CURS_AFTER);
-dup1: mpool_put(t->bt_mp, pg, 0);
-dup2: c->pg.pgno = e.page->pgno;
- c->pg.index = e.index;
- return (RET_SUCCESS);
- }
- mpool_put(t->bt_mp, pg, 0);
- }
- }
- e.page = h;
- e.index = index;
- if (curcopy || (status =
- __bt_ret(t, &e, &c->key, &c->key, NULL, NULL, 1)) == RET_SUCCESS) {
- F_SET(c, CURS_ACQUIRE);
- return (RET_SUCCESS);
- }
- return (status);
-}
-
-/*
- * __bt_relink --
- * Link around a deleted page.
- *
- * Parameters:
- * t: tree
- * h: page to be deleted
- */
-static int
-__bt_relink(t, h)
- BTREE *t;
- PAGE *h;
-{
- PAGE *pg;
-
- if (h->nextpg != P_INVALID) {
- if ((pg = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL)
- return (RET_ERROR);
- pg->prevpg = h->prevpg;
- mpool_put(t->bt_mp, pg, MPOOL_DIRTY);
- }
- if (h->prevpg != P_INVALID) {
- if ((pg = mpool_get(t->bt_mp, h->prevpg, 0)) == NULL)
- return (RET_ERROR);
- pg->nextpg = h->nextpg;
- mpool_put(t->bt_mp, pg, MPOOL_DIRTY);
- }
- return (0);
-}
diff --git a/lib/libc/db/btree/bt_get.c b/lib/libc/db/btree/bt_get.c
deleted file mode 100644
index 74824c7..0000000
--- a/lib/libc/db/btree/bt_get.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_get.c 8.6 (Berkeley) 7/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdio.h>
-
-#include <db.h>
-#include "btree.h"
-
-/*
- * __BT_GET -- Get a record from the btree.
- *
- * Parameters:
- * dbp: pointer to access method
- * key: key to find
- * data: data to return
- * flag: currently unused
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
- */
-int
-__bt_get(dbp, key, data, flags)
- const DB *dbp;
- const DBT *key;
- DBT *data;
- u_int flags;
-{
- BTREE *t;
- EPG *e;
- int exact, status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /* Get currently doesn't take any flags. */
- if (flags) {
- errno = EINVAL;
- return (RET_ERROR);
- }
-
- if ((e = __bt_search(t, key, &exact)) == NULL)
- return (RET_ERROR);
- if (!exact) {
- mpool_put(t->bt_mp, e->page, 0);
- return (RET_SPECIAL);
- }
-
- status = __bt_ret(t, e, NULL, NULL, data, &t->bt_rdata, 0);
-
- /*
- * If the user is doing concurrent access, we copied the
- * key/data, toss the page.
- */
- if (F_ISSET(t, B_DB_LOCK))
- mpool_put(t->bt_mp, e->page, 0);
- else
- t->bt_pinned = e->page;
- return (status);
-}
diff --git a/lib/libc/db/btree/bt_open.c b/lib/libc/db/btree/bt_open.c
deleted file mode 100644
index 5fc3168..0000000
--- a/lib/libc/db/btree/bt_open.c
+++ /dev/null
@@ -1,444 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_open.c 8.10 (Berkeley) 8/17/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Implementation of btree access method for 4.4BSD.
- *
- * The design here was originally based on that of the btree access method
- * used in the Postgres database system at UC Berkeley. This implementation
- * is wholly independent of the Postgres code.
- */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <db.h>
-#include "btree.h"
-
-#ifdef DEBUG
-#undef MINPSIZE
-#define MINPSIZE 128
-#endif
-
-static int byteorder __P((void));
-static int nroot __P((BTREE *));
-static int tmp __P((void));
-
-/*
- * __BT_OPEN -- Open a btree.
- *
- * Creates and fills a DB struct, and calls the routine that actually
- * opens the btree.
- *
- * Parameters:
- * fname: filename (NULL for in-memory trees)
- * flags: open flag bits
- * mode: open permission bits
- * b: BTREEINFO pointer
- *
- * Returns:
- * NULL on failure, pointer to DB on success.
- *
- */
-DB *
-__bt_open(fname, flags, mode, openinfo, dflags)
- const char *fname;
- int flags, mode, dflags;
- const BTREEINFO *openinfo;
-{
- struct stat sb;
- BTMETA m;
- BTREE *t;
- BTREEINFO b;
- DB *dbp;
- pgno_t ncache;
- ssize_t nr;
- int machine_lorder;
-
- t = NULL;
-
- /*
- * Intention is to make sure all of the user's selections are okay
- * here and then use them without checking. Can't be complete, since
- * we don't know the right page size, lorder or flags until the backing
- * file is opened. Also, the file's page size can cause the cachesize
- * to change.
- */
- machine_lorder = byteorder();
- if (openinfo) {
- b = *openinfo;
-
- /* Flags: R_DUP. */
- if (b.flags & ~(R_DUP))
- goto einval;
-
- /*
- * Page size must be indx_t aligned and >= MINPSIZE. Default
- * page size is set farther on, based on the underlying file
- * transfer size.
- */
- if (b.psize &&
- (b.psize < MINPSIZE || b.psize > MAX_PAGE_OFFSET + 1 ||
- b.psize & (sizeof(indx_t) - 1) ))
- goto einval;
-
- /* Minimum number of keys per page; absolute minimum is 2. */
- if (b.minkeypage) {
- if (b.minkeypage < 2)
- goto einval;
- } else
- b.minkeypage = DEFMINKEYPAGE;
-
- /* If no comparison, use default comparison and prefix. */
- if (b.compare == NULL) {
- b.compare = __bt_defcmp;
- if (b.prefix == NULL)
- b.prefix = __bt_defpfx;
- }
-
- if (b.lorder == 0)
- b.lorder = machine_lorder;
- } else {
- b.compare = __bt_defcmp;
- b.cachesize = 0;
- b.flags = 0;
- b.lorder = machine_lorder;
- b.minkeypage = DEFMINKEYPAGE;
- b.prefix = __bt_defpfx;
- b.psize = 0;
- }
-
- /* Check for the ubiquitous PDP-11. */
- if (b.lorder != BIG_ENDIAN && b.lorder != LITTLE_ENDIAN)
- goto einval;
-
- /* Allocate and initialize DB and BTREE structures. */
- if ((t = (BTREE *)malloc(sizeof(BTREE))) == NULL)
- goto err;
- memset(t, 0, sizeof(BTREE));
- t->bt_fd = -1; /* Don't close unopened fd on error. */
- t->bt_lorder = b.lorder;
- t->bt_order = NOT;
- t->bt_cmp = b.compare;
- t->bt_pfx = b.prefix;
- t->bt_rfd = -1;
-
- if ((t->bt_dbp = dbp = (DB *)malloc(sizeof(DB))) == NULL)
- goto err;
- memset(t->bt_dbp, 0, sizeof(DB));
- if (t->bt_lorder != machine_lorder)
- F_SET(t, B_NEEDSWAP);
-
- dbp->type = DB_BTREE;
- dbp->internal = t;
- dbp->close = __bt_close;
- dbp->del = __bt_delete;
- dbp->fd = __bt_fd;
- dbp->get = __bt_get;
- dbp->put = __bt_put;
- dbp->seq = __bt_seq;
- dbp->sync = __bt_sync;
-
- /*
- * If no file name was supplied, this is an in-memory btree and we
- * open a backing temporary file. Otherwise, it's a disk-based tree.
- */
- if (fname) {
- switch (flags & O_ACCMODE) {
- case O_RDONLY:
- F_SET(t, B_RDONLY);
- break;
- case O_RDWR:
- break;
- case O_WRONLY:
- default:
- goto einval;
- }
-
- if ((t->bt_fd = open(fname, flags, mode)) < 0)
- goto err;
-
- } else {
- if ((flags & O_ACCMODE) != O_RDWR)
- goto einval;
- if ((t->bt_fd = tmp()) == -1)
- goto err;
- F_SET(t, B_INMEM);
- }
-
- if (fcntl(t->bt_fd, F_SETFD, 1) == -1)
- goto err;
-
- if (fstat(t->bt_fd, &sb))
- goto err;
- if (sb.st_size) {
- if ((nr = read(t->bt_fd, &m, sizeof(BTMETA))) < 0)
- goto err;
- if (nr != sizeof(BTMETA))
- goto eftype;
-
- /*
- * Read in the meta-data. This can change the notion of what
- * the lorder, page size and flags are, and, when the page size
- * changes, the cachesize value can change too. If the user
- * specified the wrong byte order for an existing database, we
- * don't bother to return an error, we just clear the NEEDSWAP
- * bit.
- */
- if (m.magic == BTREEMAGIC)
- F_CLR(t, B_NEEDSWAP);
- else {
- F_SET(t, B_NEEDSWAP);
- M_32_SWAP(m.magic);
- M_32_SWAP(m.version);
- M_32_SWAP(m.psize);
- M_32_SWAP(m.free);
- M_32_SWAP(m.nrecs);
- M_32_SWAP(m.flags);
- }
- if (m.magic != BTREEMAGIC || m.version != BTREEVERSION)
- goto eftype;
- if (m.psize < MINPSIZE || m.psize > MAX_PAGE_OFFSET + 1 ||
- m.psize & (sizeof(indx_t) - 1) )
- goto eftype;
- if (m.flags & ~SAVEMETA)
- goto eftype;
- b.psize = m.psize;
- F_SET(t, m.flags);
- t->bt_free = m.free;
- t->bt_nrecs = m.nrecs;
- } else {
- /*
- * Set the page size to the best value for I/O to this file.
- * Don't overflow the page offset type.
- */
- if (b.psize == 0) {
- b.psize = sb.st_blksize;
- if (b.psize < MINPSIZE)
- b.psize = MINPSIZE;
- if (b.psize > MAX_PAGE_OFFSET + 1)
- b.psize = MAX_PAGE_OFFSET + 1;
- }
-
- /* Set flag if duplicates permitted. */
- if (!(b.flags & R_DUP))
- F_SET(t, B_NODUPS);
-
- t->bt_free = P_INVALID;
- t->bt_nrecs = 0;
- F_SET(t, B_METADIRTY);
- }
-
- t->bt_psize = b.psize;
-
- /* Set the cache size; must be a multiple of the page size. */
- if (b.cachesize && b.cachesize & (b.psize - 1) )
- b.cachesize += (~b.cachesize & (b.psize - 1) ) + 1;
- if (b.cachesize < b.psize * MINCACHE)
- b.cachesize = b.psize * MINCACHE;
-
- /* Calculate number of pages to cache. */
- ncache = (b.cachesize + t->bt_psize - 1) / t->bt_psize;
-
- /*
- * The btree data structure requires that at least two keys can fit on
- * a page, but other than that there's no fixed requirement. The user
- * specified a minimum number per page, and we translated that into the
- * number of bytes a key/data pair can use before being placed on an
- * overflow page. This calculation includes the page header, the size
- * of the index referencing the leaf item and the size of the leaf item
- * structure. Also, don't let the user specify a minkeypage such that
- * a key/data pair won't fit even if both key and data are on overflow
- * pages.
- */
- t->bt_ovflsize = (t->bt_psize - BTDATAOFF) / b.minkeypage -
- (sizeof(indx_t) + NBLEAFDBT(0, 0));
- if (t->bt_ovflsize < NBLEAFDBT(NOVFLSIZE, NOVFLSIZE) + sizeof(indx_t))
- t->bt_ovflsize =
- NBLEAFDBT(NOVFLSIZE, NOVFLSIZE) + sizeof(indx_t);
-
- /* Initialize the buffer pool. */
- if ((t->bt_mp =
- mpool_open(NULL, t->bt_fd, t->bt_psize, ncache)) == NULL)
- goto err;
- if (!F_ISSET(t, B_INMEM))
- mpool_filter(t->bt_mp, __bt_pgin, __bt_pgout, t);
-
- /* Create a root page if new tree. */
- if (nroot(t) == RET_ERROR)
- goto err;
-
- /* Global flags. */
- if (dflags & DB_LOCK)
- F_SET(t, B_DB_LOCK);
- if (dflags & DB_SHMEM)
- F_SET(t, B_DB_SHMEM);
- if (dflags & DB_TXN)
- F_SET(t, B_DB_TXN);
-
- return (dbp);
-
-einval: errno = EINVAL;
- goto err;
-
-eftype: errno = EFTYPE;
- goto err;
-
-err: if (t) {
- if (t->bt_dbp)
- free(t->bt_dbp);
- if (t->bt_fd != -1)
- (void)close(t->bt_fd);
- free(t);
- }
- return (NULL);
-}
-
-/*
- * NROOT -- Create the root of a new tree.
- *
- * Parameters:
- * t: tree
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-static int
-nroot(t)
- BTREE *t;
-{
- PAGE *meta, *root;
- pgno_t npg;
-
- if ((meta = mpool_get(t->bt_mp, 0, 0)) != NULL) {
- mpool_put(t->bt_mp, meta, 0);
- return (RET_SUCCESS);
- }
- if (errno != EINVAL) /* It's OK to not exist. */
- return (RET_ERROR);
- errno = 0;
-
- if ((meta = mpool_new(t->bt_mp, &npg)) == NULL)
- return (RET_ERROR);
-
- if ((root = mpool_new(t->bt_mp, &npg)) == NULL)
- return (RET_ERROR);
-
- if (npg != P_ROOT)
- return (RET_ERROR);
- root->pgno = npg;
- root->prevpg = root->nextpg = P_INVALID;
- root->lower = BTDATAOFF;
- root->upper = t->bt_psize;
- root->flags = P_BLEAF;
- memset(meta, 0, t->bt_psize);
- mpool_put(t->bt_mp, meta, MPOOL_DIRTY);
- mpool_put(t->bt_mp, root, MPOOL_DIRTY);
- return (RET_SUCCESS);
-}
-
-static int
-tmp()
-{
- sigset_t set, oset;
- int fd;
- char *envtmp;
- char path[MAXPATHLEN];
-
- envtmp = getenv("TMPDIR");
- (void)snprintf(path,
- sizeof(path), "%s/bt.XXXXXX", envtmp ? envtmp : "/tmp");
-
- (void)sigfillset(&set);
- (void)sigprocmask(SIG_BLOCK, &set, &oset);
- if ((fd = mkstemp(path)) != -1)
- (void)unlink(path);
- (void)sigprocmask(SIG_SETMASK, &oset, NULL);
- return(fd);
-}
-
-static int
-byteorder()
-{
- u_int32_t x;
- u_char *p;
-
- x = 0x01020304;
- p = (u_char *)&x;
- switch (*p) {
- case 1:
- return (BIG_ENDIAN);
- case 4:
- return (LITTLE_ENDIAN);
- default:
- return (0);
- }
-}
-
-int
-__bt_fd(dbp)
- const DB *dbp;
-{
- BTREE *t;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /* In-memory database can't have a file descriptor. */
- if (F_ISSET(t, B_INMEM)) {
- errno = ENOENT;
- return (-1);
- }
- return (t->bt_fd);
-}
diff --git a/lib/libc/db/btree/bt_overflow.c b/lib/libc/db/btree/bt_overflow.c
deleted file mode 100644
index b28b8e0..0000000
--- a/lib/libc/db/btree/bt_overflow.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_overflow.c 8.5 (Berkeley) 7/16/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <db.h>
-#include "btree.h"
-
-/*
- * Big key/data code.
- *
- * Big key and data entries are stored on linked lists of pages. The initial
- * reference is byte string stored with the key or data and is the page number
- * and size. The actual record is stored in a chain of pages linked by the
- * nextpg field of the PAGE header.
- *
- * The first page of the chain has a special property. If the record is used
- * by an internal page, it cannot be deleted and the P_PRESERVE bit will be set
- * in the header.
- *
- * XXX
- * A single DBT is written to each chain, so a lot of space on the last page
- * is wasted. This is a fairly major bug for some data sets.
- */
-
-/*
- * __OVFL_GET -- Get an overflow key/data item.
- *
- * Parameters:
- * t: tree
- * p: pointer to { pgno_t, u_int32_t }
- * buf: storage address
- * bufsz: storage size
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__ovfl_get(t, p, ssz, buf, bufsz)
- BTREE *t;
- void *p;
- size_t *ssz;
- void **buf;
- size_t *bufsz;
-{
- PAGE *h;
- pgno_t pg;
- size_t nb, plen;
- u_int32_t sz;
-
- memmove(&pg, p, sizeof(pgno_t));
- memmove(&sz, (char *)p + sizeof(pgno_t), sizeof(u_int32_t));
- *ssz = sz;
-
-#ifdef DEBUG
- if (pg == P_INVALID || sz == 0)
- abort();
-#endif
- /* Make the buffer bigger as necessary. */
- if (*bufsz < sz) {
- *buf = (char *)(*buf == NULL ? malloc(sz) : realloc(*buf, sz));
- if (*buf == NULL)
- return (RET_ERROR);
- *bufsz = sz;
- }
-
- /*
- * Step through the linked list of pages, copying the data on each one
- * into the buffer. Never copy more than the data's length.
- */
- plen = t->bt_psize - BTDATAOFF;
- for (p = *buf;; p = (char *)p + nb, pg = h->nextpg) {
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (RET_ERROR);
-
- nb = MIN(sz, plen);
- memmove(p, (char *)h + BTDATAOFF, nb);
- mpool_put(t->bt_mp, h, 0);
-
- if ((sz -= nb) == 0)
- break;
- }
- return (RET_SUCCESS);
-}
-
-/*
- * __OVFL_PUT -- Store an overflow key/data item.
- *
- * Parameters:
- * t: tree
- * data: DBT to store
- * pgno: storage page number
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__ovfl_put(t, dbt, pg)
- BTREE *t;
- const DBT *dbt;
- pgno_t *pg;
-{
- PAGE *h, *last;
- void *p;
- pgno_t npg;
- size_t nb, plen;
- u_int32_t sz;
-
- /*
- * Allocate pages and copy the key/data record into them. Store the
- * number of the first page in the chain.
- */
- plen = t->bt_psize - BTDATAOFF;
- for (last = NULL, p = dbt->data, sz = dbt->size;;
- p = (char *)p + plen, last = h) {
- if ((h = __bt_new(t, &npg)) == NULL)
- return (RET_ERROR);
-
- h->pgno = npg;
- h->nextpg = h->prevpg = P_INVALID;
- h->flags = P_OVERFLOW;
- h->lower = h->upper = 0;
-
- nb = MIN(sz, plen);
- memmove((char *)h + BTDATAOFF, p, nb);
-
- if (last) {
- last->nextpg = h->pgno;
- mpool_put(t->bt_mp, last, MPOOL_DIRTY);
- } else
- *pg = h->pgno;
-
- if ((sz -= nb) == 0) {
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- break;
- }
- }
- return (RET_SUCCESS);
-}
-
-/*
- * __OVFL_DELETE -- Delete an overflow chain.
- *
- * Parameters:
- * t: tree
- * p: pointer to { pgno_t, u_int32_t }
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__ovfl_delete(t, p)
- BTREE *t;
- void *p;
-{
- PAGE *h;
- pgno_t pg;
- size_t plen;
- u_int32_t sz;
-
- memmove(&pg, p, sizeof(pgno_t));
- memmove(&sz, (char *)p + sizeof(pgno_t), sizeof(u_int32_t));
-
-#ifdef DEBUG
- if (pg == P_INVALID || sz == 0)
- abort();
-#endif
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (RET_ERROR);
-
- /* Don't delete chains used by internal pages. */
- if (h->flags & P_PRESERVE) {
- mpool_put(t->bt_mp, h, 0);
- return (RET_SUCCESS);
- }
-
- /* Step through the chain, calling the free routine for each page. */
- for (plen = t->bt_psize - BTDATAOFF;; sz -= plen) {
- pg = h->nextpg;
- __bt_free(t, h);
- if (sz <= plen)
- break;
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (RET_ERROR);
- }
- return (RET_SUCCESS);
-}
diff --git a/lib/libc/db/btree/bt_page.c b/lib/libc/db/btree/bt_page.c
deleted file mode 100644
index 0d9d138..0000000
--- a/lib/libc/db/btree/bt_page.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_page.c 8.3 (Berkeley) 7/14/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <stdio.h>
-
-#include <db.h>
-#include "btree.h"
-
-/*
- * __bt_free --
- * Put a page on the freelist.
- *
- * Parameters:
- * t: tree
- * h: page to free
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- *
- * Side-effect:
- * mpool_put's the page.
- */
-int
-__bt_free(t, h)
- BTREE *t;
- PAGE *h;
-{
- /* Insert the page at the head of the free list. */
- h->prevpg = P_INVALID;
- h->nextpg = t->bt_free;
- t->bt_free = h->pgno;
-
- /* Make sure the page gets written back. */
- return (mpool_put(t->bt_mp, h, MPOOL_DIRTY));
-}
-
-/*
- * __bt_new --
- * Get a new page, preferably from the freelist.
- *
- * Parameters:
- * t: tree
- * npg: storage for page number.
- *
- * Returns:
- * Pointer to a page, NULL on error.
- */
-PAGE *
-__bt_new(t, npg)
- BTREE *t;
- pgno_t *npg;
-{
- PAGE *h;
-
- if (t->bt_free != P_INVALID &&
- (h = mpool_get(t->bt_mp, t->bt_free, 0)) != NULL) {
- *npg = t->bt_free;
- t->bt_free = h->nextpg;
- return (h);
- }
- return (mpool_new(t->bt_mp, npg));
-}
diff --git a/lib/libc/db/btree/bt_put.c b/lib/libc/db/btree/bt_put.c
deleted file mode 100644
index 952be09..0000000
--- a/lib/libc/db/btree/bt_put.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_put.c 8.8 (Berkeley) 7/26/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <db.h>
-#include "btree.h"
-
-static EPG *bt_fast __P((BTREE *, const DBT *, const DBT *, int *));
-
-/*
- * __BT_PUT -- Add a btree item to the tree.
- *
- * Parameters:
- * dbp: pointer to access method
- * key: key
- * data: data
- * flag: R_NOOVERWRITE
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key is already in the
- * tree and R_NOOVERWRITE specified.
- */
-int
-__bt_put(dbp, key, data, flags)
- const DB *dbp;
- DBT *key;
- const DBT *data;
- u_int flags;
-{
- BTREE *t;
- DBT tkey, tdata;
- EPG *e;
- PAGE *h;
- indx_t index, nxtindex;
- pgno_t pg;
- u_int32_t nbytes;
- int dflags, exact, status;
- char *dest, db[NOVFLSIZE], kb[NOVFLSIZE];
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /* Check for change to a read-only tree. */
- if (F_ISSET(t, B_RDONLY)) {
- errno = EPERM;
- return (RET_ERROR);
- }
-
- switch (flags) {
- case 0:
- case R_NOOVERWRITE:
- break;
- case R_CURSOR:
- /*
- * If flags is R_CURSOR, put the cursor. Must already
- * have started a scan and not have already deleted it.
- */
- if (F_ISSET(&t->bt_cursor, CURS_INIT) &&
- !F_ISSET(&t->bt_cursor,
- CURS_ACQUIRE | CURS_AFTER | CURS_BEFORE))
- break;
- /* FALLTHROUGH */
- default:
- errno = EINVAL;
- return (RET_ERROR);
- }
-
- /*
- * If the key/data pair won't fit on a page, store it on overflow
- * pages. Only put the key on the overflow page if the pair are
- * still too big after moving the data to an overflow page.
- *
- * XXX
- * If the insert fails later on, the overflow pages aren't recovered.
- */
- dflags = 0;
- if (key->size + data->size > t->bt_ovflsize) {
- if (key->size > t->bt_ovflsize) {
-storekey: if (__ovfl_put(t, key, &pg) == RET_ERROR)
- return (RET_ERROR);
- tkey.data = kb;
- tkey.size = NOVFLSIZE;
- memmove(kb, &pg, sizeof(pgno_t));
- memmove(kb + sizeof(pgno_t),
- &key->size, sizeof(u_int32_t));
- dflags |= P_BIGKEY;
- key = &tkey;
- }
- if (key->size + data->size > t->bt_ovflsize) {
- if (__ovfl_put(t, data, &pg) == RET_ERROR)
- return (RET_ERROR);
- tdata.data = db;
- tdata.size = NOVFLSIZE;
- memmove(db, &pg, sizeof(pgno_t));
- memmove(db + sizeof(pgno_t),
- &data->size, sizeof(u_int32_t));
- dflags |= P_BIGDATA;
- data = &tdata;
- }
- if (key->size + data->size > t->bt_ovflsize)
- goto storekey;
- }
-
- /* Replace the cursor. */
- if (flags == R_CURSOR) {
- if ((h = mpool_get(t->bt_mp, t->bt_cursor.pg.pgno, 0)) == NULL)
- return (RET_ERROR);
- index = t->bt_cursor.pg.index;
- goto delete;
- }
-
- /*
- * Find the key to delete, or, the location at which to insert.
- * Bt_fast and __bt_search both pin the returned page.
- */
- if (t->bt_order == NOT || (e = bt_fast(t, key, data, &exact)) == NULL)
- if ((e = __bt_search(t, key, &exact)) == NULL)
- return (RET_ERROR);
- h = e->page;
- index = e->index;
-
- /*
- * Add the key/data pair to the tree. If an identical key is already
- * in the tree, and R_NOOVERWRITE is set, an error is returned. If
- * R_NOOVERWRITE is not set, the key is either added (if duplicates are
- * permitted) or an error is returned.
- */
- switch (flags) {
- case R_NOOVERWRITE:
- if (!exact)
- break;
- mpool_put(t->bt_mp, h, 0);
- return (RET_SPECIAL);
- default:
- if (!exact || !F_ISSET(t, B_NODUPS))
- break;
- /*
- * !!!
- * Note, the delete may empty the page, so we need to put a
- * new entry into the page immediately.
- */
-delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) {
- mpool_put(t->bt_mp, h, 0);
- return (RET_ERROR);
- }
- break;
- }
-
- /*
- * If not enough room, or the user has put a ceiling on the number of
- * keys permitted in the page, split the page. The split code will
- * insert the key and data and unpin the current page. If inserting
- * into the offset array, shift the pointers up.
- */
- nbytes = NBLEAFDBT(key->size, data->size);
- if (h->upper - h->lower < nbytes + sizeof(indx_t)) {
- if ((status = __bt_split(t, h, key,
- data, dflags, nbytes, index)) != RET_SUCCESS)
- return (status);
- goto success;
- }
-
- if (index < (nxtindex = NEXTINDEX(h)))
- memmove(h->linp + index + 1, h->linp + index,
- (nxtindex - index) * sizeof(indx_t));
- h->lower += sizeof(indx_t);
-
- h->linp[index] = h->upper -= nbytes;
- dest = (char *)h + h->upper;
- WR_BLEAF(dest, key, data, dflags);
-
- /* If the cursor is on this page, adjust it as necessary. */
- if (F_ISSET(&t->bt_cursor, CURS_INIT) &&
- !F_ISSET(&t->bt_cursor, CURS_ACQUIRE) &&
- t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index >= index)
- ++t->bt_cursor.pg.index;
-
- if (t->bt_order == NOT)
- if (h->nextpg == P_INVALID) {
- if (index == NEXTINDEX(h) - 1) {
- t->bt_order = FORWARD;
- t->bt_last.index = index;
- t->bt_last.pgno = h->pgno;
- }
- } else if (h->prevpg == P_INVALID) {
- if (index == 0) {
- t->bt_order = BACK;
- t->bt_last.index = 0;
- t->bt_last.pgno = h->pgno;
- }
- }
-
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
-
-success:
- if (flags == R_SETCURSOR)
- __bt_setcur(t, e->page->pgno, e->index);
-
- F_SET(t, B_MODIFIED);
- return (RET_SUCCESS);
-}
-
-#ifdef STATISTICS
-u_long bt_cache_hit, bt_cache_miss;
-#endif
-
-/*
- * BT_FAST -- Do a quick check for sorted data.
- *
- * Parameters:
- * t: tree
- * key: key to insert
- *
- * Returns:
- * EPG for new record or NULL if not found.
- */
-static EPG *
-bt_fast(t, key, data, exactp)
- BTREE *t;
- const DBT *key, *data;
- int *exactp;
-{
- PAGE *h;
- u_int32_t nbytes;
- int cmp;
-
- if ((h = mpool_get(t->bt_mp, t->bt_last.pgno, 0)) == NULL) {
- t->bt_order = NOT;
- return (NULL);
- }
- t->bt_cur.page = h;
- t->bt_cur.index = t->bt_last.index;
-
- /*
- * If won't fit in this page or have too many keys in this page,
- * have to search to get split stack.
- */
- nbytes = NBLEAFDBT(key->size, data->size);
- if (h->upper - h->lower < nbytes + sizeof(indx_t))
- goto miss;
-
- if (t->bt_order == FORWARD) {
- if (t->bt_cur.page->nextpg != P_INVALID)
- goto miss;
- if (t->bt_cur.index != NEXTINDEX(h) - 1)
- goto miss;
- if ((cmp = __bt_cmp(t, key, &t->bt_cur)) < 0)
- goto miss;
- t->bt_last.index = cmp ? ++t->bt_cur.index : t->bt_cur.index;
- } else {
- if (t->bt_cur.page->prevpg != P_INVALID)
- goto miss;
- if (t->bt_cur.index != 0)
- goto miss;
- if ((cmp = __bt_cmp(t, key, &t->bt_cur)) > 0)
- goto miss;
- t->bt_last.index = 0;
- }
- *exactp = cmp == 0;
-#ifdef STATISTICS
- ++bt_cache_hit;
-#endif
- return (&t->bt_cur);
-
-miss:
-#ifdef STATISTICS
- ++bt_cache_miss;
-#endif
- t->bt_order = NOT;
- mpool_put(t->bt_mp, h, 0);
- return (NULL);
-}
diff --git a/lib/libc/db/btree/bt_search.c b/lib/libc/db/btree/bt_search.c
deleted file mode 100644
index 485afcb..0000000
--- a/lib/libc/db/btree/bt_search.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_search.c 8.8 (Berkeley) 7/31/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <stdio.h>
-
-#include <db.h>
-#include "btree.h"
-
-static int __bt_snext __P((BTREE *, PAGE *, const DBT *, int *));
-static int __bt_sprev __P((BTREE *, PAGE *, const DBT *, int *));
-
-/*
- * __bt_search --
- * Search a btree for a key.
- *
- * Parameters:
- * t: tree to search
- * key: key to find
- * exactp: pointer to exact match flag
- *
- * Returns:
- * The EPG for matching record, if any, or the EPG for the location
- * of the key, if it were inserted into the tree, is entered into
- * the bt_cur field of the tree. A pointer to the field is returned.
- */
-EPG *
-__bt_search(t, key, exactp)
- BTREE *t;
- const DBT *key;
- int *exactp;
-{
- PAGE *h;
- indx_t base, index, lim;
- pgno_t pg;
- int cmp;
-
- BT_CLR(t);
- for (pg = P_ROOT;;) {
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (NULL);
-
- /* Do a binary search on the current page. */
- t->bt_cur.page = h;
- for (base = 0, lim = NEXTINDEX(h); lim; lim >>= 1) {
- t->bt_cur.index = index = base + (lim >> 1);
- if ((cmp = __bt_cmp(t, key, &t->bt_cur)) == 0) {
- if (h->flags & P_BLEAF) {
- *exactp = 1;
- return (&t->bt_cur);
- }
- goto next;
- }
- if (cmp > 0) {
- base = index + 1;
- --lim;
- }
- }
-
- /*
- * If it's a leaf page, we're almost done. If no duplicates
- * are allowed, or we have an exact match, we're done. Else,
- * it's possible that there were matching keys on this page,
- * which later deleted, and we're on a page with no matches
- * while there are matches on other pages. If at the start or
- * end of a page, check the adjacent page.
- */
- if (h->flags & P_BLEAF) {
- if (!F_ISSET(t, B_NODUPS)) {
- if (base == 0 &&
- h->prevpg != P_INVALID &&
- __bt_sprev(t, h, key, exactp))
- return (&t->bt_cur);
- if (base == NEXTINDEX(h) &&
- h->nextpg != P_INVALID &&
- __bt_snext(t, h, key, exactp))
- return (&t->bt_cur);
- }
- *exactp = 0;
- t->bt_cur.index = base;
- return (&t->bt_cur);
- }
-
- /*
- * No match found. Base is the smallest index greater than
- * key and may be zero or a last + 1 index. If it's non-zero,
- * decrement by one, and record the internal page which should
- * be a parent page for the key. If a split later occurs, the
- * inserted page will be to the right of the saved page.
- */
- index = base ? base - 1 : base;
-
-next: BT_PUSH(t, h->pgno, index);
- pg = GETBINTERNAL(h, index)->pgno;
- mpool_put(t->bt_mp, h, 0);
- }
-}
-
-/*
- * __bt_snext --
- * Check for an exact match after the key.
- *
- * Parameters:
- * t: tree
- * h: current page
- * key: key
- * exactp: pointer to exact match flag
- *
- * Returns:
- * If an exact match found.
- */
-static int
-__bt_snext(t, h, key, exactp)
- BTREE *t;
- PAGE *h;
- const DBT *key;
- int *exactp;
-{
- EPG e;
-
- /*
- * Get the next page. The key is either an exact
- * match, or not as good as the one we already have.
- */
- if ((e.page = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL)
- return (0);
- e.index = 0;
- if (__bt_cmp(t, key, &e) == 0) {
- mpool_put(t->bt_mp, h, 0);
- t->bt_cur = e;
- *exactp = 1;
- return (1);
- }
- mpool_put(t->bt_mp, e.page, 0);
- return (0);
-}
-
-/*
- * __bt_sprev --
- * Check for an exact match before the key.
- *
- * Parameters:
- * t: tree
- * h: current page
- * key: key
- * exactp: pointer to exact match flag
- *
- * Returns:
- * If an exact match found.
- */
-static int
-__bt_sprev(t, h, key, exactp)
- BTREE *t;
- PAGE *h;
- const DBT *key;
- int *exactp;
-{
- EPG e;
-
- /*
- * Get the previous page. The key is either an exact
- * match, or not as good as the one we already have.
- */
- if ((e.page = mpool_get(t->bt_mp, h->prevpg, 0)) == NULL)
- return (0);
- e.index = NEXTINDEX(e.page) - 1;
- if (__bt_cmp(t, key, &e) == 0) {
- mpool_put(t->bt_mp, h, 0);
- t->bt_cur = e;
- *exactp = 1;
- return (1);
- }
- mpool_put(t->bt_mp, e.page, 0);
- return (0);
-}
diff --git a/lib/libc/db/btree/bt_seq.c b/lib/libc/db/btree/bt_seq.c
deleted file mode 100644
index 76e6275..0000000
--- a/lib/libc/db/btree/bt_seq.c
+++ /dev/null
@@ -1,460 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_seq.c 8.7 (Berkeley) 7/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <db.h>
-#include "btree.h"
-
-static int __bt_first __P((BTREE *, const DBT *, EPG *, int *));
-static int __bt_seqadv __P((BTREE *, EPG *, int));
-static int __bt_seqset __P((BTREE *, EPG *, DBT *, int));
-
-/*
- * Sequential scan support.
- *
- * The tree can be scanned sequentially, starting from either end of the
- * tree or from any specific key. A scan request before any scanning is
- * done is initialized as starting from the least node.
- */
-
-/*
- * __bt_seq --
- * Btree sequential scan interface.
- *
- * Parameters:
- * dbp: pointer to access method
- * key: key for positioning and return value
- * data: data return value
- * flags: R_CURSOR, R_FIRST, R_LAST, R_NEXT, R_PREV.
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
- */
-int
-__bt_seq(dbp, key, data, flags)
- const DB *dbp;
- DBT *key, *data;
- u_int flags;
-{
- BTREE *t;
- EPG e;
- int status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /*
- * If scan unitialized as yet, or starting at a specific record, set
- * the scan to a specific key. Both __bt_seqset and __bt_seqadv pin
- * the page the cursor references if they're successful.
- */
- switch (flags) {
- case R_NEXT:
- case R_PREV:
- if (F_ISSET(&t->bt_cursor, CURS_INIT)) {
- status = __bt_seqadv(t, &e, flags);
- break;
- }
- /* FALLTHROUGH */
- case R_FIRST:
- case R_LAST:
- case R_CURSOR:
- status = __bt_seqset(t, &e, key, flags);
- break;
- default:
- errno = EINVAL;
- return (RET_ERROR);
- }
-
- if (status == RET_SUCCESS) {
- __bt_setcur(t, e.page->pgno, e.index);
-
- status =
- __bt_ret(t, &e, key, &t->bt_rkey, data, &t->bt_rdata, 0);
-
- /*
- * If the user is doing concurrent access, we copied the
- * key/data, toss the page.
- */
- if (F_ISSET(t, B_DB_LOCK))
- mpool_put(t->bt_mp, e.page, 0);
- else
- t->bt_pinned = e.page;
- }
- return (status);
-}
-
-/*
- * __bt_seqset --
- * Set the sequential scan to a specific key.
- *
- * Parameters:
- * t: tree
- * ep: storage for returned key
- * key: key for initial scan position
- * flags: R_CURSOR, R_FIRST, R_LAST, R_NEXT, R_PREV
- *
- * Side effects:
- * Pins the page the cursor references.
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
- */
-static int
-__bt_seqset(t, ep, key, flags)
- BTREE *t;
- EPG *ep;
- DBT *key;
- int flags;
-{
- PAGE *h;
- pgno_t pg;
- int exact;
-
- /*
- * Find the first, last or specific key in the tree and point the
- * cursor at it. The cursor may not be moved until a new key has
- * been found.
- */
- switch (flags) {
- case R_CURSOR: /* Keyed scan. */
- /*
- * Find the first instance of the key or the smallest key
- * which is greater than or equal to the specified key.
- */
- if (key->data == NULL || key->size == 0) {
- errno = EINVAL;
- return (RET_ERROR);
- }
- return (__bt_first(t, key, ep, &exact));
- case R_FIRST: /* First record. */
- case R_NEXT:
- /* Walk down the left-hand side of the tree. */
- for (pg = P_ROOT;;) {
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (RET_ERROR);
-
- /* Check for an empty tree. */
- if (NEXTINDEX(h) == 0) {
- mpool_put(t->bt_mp, h, 0);
- return (RET_SPECIAL);
- }
-
- if (h->flags & (P_BLEAF | P_RLEAF))
- break;
- pg = GETBINTERNAL(h, 0)->pgno;
- mpool_put(t->bt_mp, h, 0);
- }
- ep->page = h;
- ep->index = 0;
- break;
- case R_LAST: /* Last record. */
- case R_PREV:
- /* Walk down the right-hand side of the tree. */
- for (pg = P_ROOT;;) {
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (RET_ERROR);
-
- /* Check for an empty tree. */
- if (NEXTINDEX(h) == 0) {
- mpool_put(t->bt_mp, h, 0);
- return (RET_SPECIAL);
- }
-
- if (h->flags & (P_BLEAF | P_RLEAF))
- break;
- pg = GETBINTERNAL(h, NEXTINDEX(h) - 1)->pgno;
- mpool_put(t->bt_mp, h, 0);
- }
-
- ep->page = h;
- ep->index = NEXTINDEX(h) - 1;
- break;
- }
- return (RET_SUCCESS);
-}
-
-/*
- * __bt_seqadvance --
- * Advance the sequential scan.
- *
- * Parameters:
- * t: tree
- * flags: R_NEXT, R_PREV
- *
- * Side effects:
- * Pins the page the new key/data record is on.
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
- */
-static int
-__bt_seqadv(t, ep, flags)
- BTREE *t;
- EPG *ep;
- int flags;
-{
- CURSOR *c;
- PAGE *h;
- indx_t index;
- pgno_t pg;
- int exact;
-
- /*
- * There are a couple of states that we can be in. The cursor has
- * been initialized by the time we get here, but that's all we know.
- */
- c = &t->bt_cursor;
-
- /*
- * The cursor was deleted where there weren't any duplicate records,
- * so the key was saved. Find out where that key would go in the
- * current tree. It doesn't matter if the returned key is an exact
- * match or not -- if it's an exact match, the record was added after
- * the delete so we can just return it. If not, as long as there's
- * a record there, return it.
- */
- if (F_ISSET(c, CURS_ACQUIRE))
- return (__bt_first(t, &c->key, ep, &exact));
-
- /* Get the page referenced by the cursor. */
- if ((h = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL)
- return (RET_ERROR);
-
- /*
- * Find the next/previous record in the tree and point the cursor at
- * it. The cursor may not be moved until a new key has been found.
- */
- switch (flags) {
- case R_NEXT: /* Next record. */
- /*
- * The cursor was deleted in duplicate records, and moved
- * forward to a record that has yet to be returned. Clear
- * that flag, and return the record.
- */
- if (F_ISSET(c, CURS_AFTER))
- goto usecurrent;
- index = c->pg.index;
- if (++index == NEXTINDEX(h)) {
- pg = h->nextpg;
- mpool_put(t->bt_mp, h, 0);
- if (pg == P_INVALID)
- return (RET_SPECIAL);
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (RET_ERROR);
- index = 0;
- }
- break;
- case R_PREV: /* Previous record. */
- /*
- * The cursor was deleted in duplicate records, and moved
- * backward to a record that has yet to be returned. Clear
- * that flag, and return the record.
- */
- if (F_ISSET(c, CURS_BEFORE)) {
-usecurrent: F_CLR(c, CURS_AFTER | CURS_BEFORE);
- ep->page = h;
- ep->index = c->pg.index;
- return (RET_SUCCESS);
- }
- index = c->pg.index;
- if (index == 0) {
- pg = h->prevpg;
- mpool_put(t->bt_mp, h, 0);
- if (pg == P_INVALID)
- return (RET_SPECIAL);
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (RET_ERROR);
- index = NEXTINDEX(h) - 1;
- } else
- --index;
- break;
- }
-
- ep->page = h;
- ep->index = index;
- return (RET_SUCCESS);
-}
-
-/*
- * __bt_first --
- * Find the first entry.
- *
- * Parameters:
- * t: the tree
- * key: the key
- * erval: return EPG
- * exactp: pointer to exact match flag
- *
- * Returns:
- * The first entry in the tree greater than or equal to key,
- * or RET_SPECIAL if no such key exists.
- */
-static int
-__bt_first(t, key, erval, exactp)
- BTREE *t;
- const DBT *key;
- EPG *erval;
- int *exactp;
-{
- PAGE *h;
- EPG *ep, save;
- pgno_t pg;
-
- /*
- * Find any matching record; __bt_search pins the page.
- *
- * If it's an exact match and duplicates are possible, walk backwards
- * in the tree until we find the first one. Otherwise, make sure it's
- * a valid key (__bt_search may return an index just past the end of a
- * page) and return it.
- */
- if ((ep = __bt_search(t, key, exactp)) == NULL)
- return (0);
- if (*exactp) {
- if (F_ISSET(t, B_NODUPS)) {
- *erval = *ep;
- return (RET_SUCCESS);
- }
-
- /*
- * Walk backwards, as long as the entry matches and there are
- * keys left in the tree. Save a copy of each match in case
- * we go too far.
- */
- save = *ep;
- h = ep->page;
- do {
- if (save.page->pgno != ep->page->pgno) {
- mpool_put(t->bt_mp, save.page, 0);
- save = *ep;
- } else
- save.index = ep->index;
-
- /*
- * Don't unpin the page the last (or original) match
- * was on, but make sure it's unpinned if an error
- * occurs.
- */
- if (ep->index == 0) {
- if (h->prevpg == P_INVALID)
- break;
- if (h->pgno != save.page->pgno)
- mpool_put(t->bt_mp, h, 0);
- if ((h = mpool_get(t->bt_mp,
- h->prevpg, 0)) == NULL) {
- if (h->pgno == save.page->pgno)
- mpool_put(t->bt_mp,
- save.page, 0);
- return (RET_ERROR);
- }
- ep->page = h;
- ep->index = NEXTINDEX(h);
- }
- --ep->index;
- } while (__bt_cmp(t, key, ep) == 0);
-
- /*
- * Reach here with the last page that was looked at pinned,
- * which may or may not be the same as the last (or original)
- * match page. If it's not useful, release it.
- */
- if (h->pgno != save.page->pgno)
- mpool_put(t->bt_mp, h, 0);
-
- *erval = save;
- return (RET_SUCCESS);
- }
-
- /* If at the end of a page, find the next entry. */
- if (ep->index == NEXTINDEX(ep->page)) {
- h = ep->page;
- pg = h->nextpg;
- mpool_put(t->bt_mp, h, 0);
- if (pg == P_INVALID)
- return (RET_SPECIAL);
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (RET_ERROR);
- ep->index = 0;
- ep->page = h;
- }
- *erval = *ep;
- return (RET_SUCCESS);
-}
-
-/*
- * __bt_setcur --
- * Set the cursor to an entry in the tree.
- *
- * Parameters:
- * t: the tree
- * pgno: page number
- * index: page index
- */
-void
-__bt_setcur(t, pgno, index)
- BTREE *t;
- pgno_t pgno;
- u_int index;
-{
- /* Lose any already deleted key. */
- if (t->bt_cursor.key.data != NULL) {
- free(t->bt_cursor.key.data);
- t->bt_cursor.key.size = 0;
- t->bt_cursor.key.data = NULL;
- }
- F_CLR(&t->bt_cursor, CURS_ACQUIRE | CURS_AFTER | CURS_BEFORE);
-
- /* Update the cursor. */
- t->bt_cursor.pg.pgno = pgno;
- t->bt_cursor.pg.index = index;
- F_SET(&t->bt_cursor, CURS_INIT);
-}
diff --git a/lib/libc/db/btree/bt_split.c b/lib/libc/db/btree/bt_split.c
deleted file mode 100644
index 1646d82..0000000
--- a/lib/libc/db/btree/bt_split.c
+++ /dev/null
@@ -1,827 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_split.c 8.9 (Berkeley) 7/26/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <db.h>
-#include "btree.h"
-
-static int bt_broot __P((BTREE *, PAGE *, PAGE *, PAGE *));
-static PAGE *bt_page
- __P((BTREE *, PAGE *, PAGE **, PAGE **, indx_t *, size_t));
-static int bt_preserve __P((BTREE *, pgno_t));
-static PAGE *bt_psplit
- __P((BTREE *, PAGE *, PAGE *, PAGE *, indx_t *, size_t));
-static PAGE *bt_root
- __P((BTREE *, PAGE *, PAGE **, PAGE **, indx_t *, size_t));
-static int bt_rroot __P((BTREE *, PAGE *, PAGE *, PAGE *));
-static recno_t rec_total __P((PAGE *));
-
-#ifdef STATISTICS
-u_long bt_rootsplit, bt_split, bt_sortsplit, bt_pfxsaved;
-#endif
-
-/*
- * __BT_SPLIT -- Split the tree.
- *
- * Parameters:
- * t: tree
- * sp: page to split
- * key: key to insert
- * data: data to insert
- * flags: BIGKEY/BIGDATA flags
- * ilen: insert length
- * skip: index to leave open
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__bt_split(t, sp, key, data, flags, ilen, argskip)
- BTREE *t;
- PAGE *sp;
- const DBT *key, *data;
- int flags;
- size_t ilen;
- u_int32_t argskip;
-{
- BINTERNAL *bi;
- BLEAF *bl, *tbl;
- DBT a, b;
- EPGNO *parent;
- PAGE *h, *l, *r, *lchild, *rchild;
- indx_t nxtindex;
- u_int16_t skip;
- u_int32_t n, nbytes, nksize;
- int parentsplit;
- char *dest;
-
- /*
- * Split the page into two pages, l and r. The split routines return
- * a pointer to the page into which the key should be inserted and with
- * skip set to the offset which should be used. Additionally, l and r
- * are pinned.
- */
- skip = argskip;
- h = sp->pgno == P_ROOT ?
- bt_root(t, sp, &l, &r, &skip, ilen) :
- bt_page(t, sp, &l, &r, &skip, ilen);
- if (h == NULL)
- return (RET_ERROR);
-
- /*
- * Insert the new key/data pair into the leaf page. (Key inserts
- * always cause a leaf page to split first.)
- */
- h->linp[skip] = h->upper -= ilen;
- dest = (char *)h + h->upper;
- if (F_ISSET(t, R_RECNO))
- WR_RLEAF(dest, data, flags)
- else
- WR_BLEAF(dest, key, data, flags)
-
- /* If the root page was split, make it look right. */
- if (sp->pgno == P_ROOT &&
- (F_ISSET(t, R_RECNO) ?
- bt_rroot(t, sp, l, r) : bt_broot(t, sp, l, r)) == RET_ERROR)
- goto err2;
-
- /*
- * Now we walk the parent page stack -- a LIFO stack of the pages that
- * were traversed when we searched for the page that split. Each stack
- * entry is a page number and a page index offset. The offset is for
- * the page traversed on the search. We've just split a page, so we
- * have to insert a new key into the parent page.
- *
- * If the insert into the parent page causes it to split, may have to
- * continue splitting all the way up the tree. We stop if the root
- * splits or the page inserted into didn't have to split to hold the
- * new key. Some algorithms replace the key for the old page as well
- * as the new page. We don't, as there's no reason to believe that the
- * first key on the old page is any better than the key we have, and,
- * in the case of a key being placed at index 0 causing the split, the
- * key is unavailable.
- *
- * There are a maximum of 5 pages pinned at any time. We keep the left
- * and right pages pinned while working on the parent. The 5 are the
- * two children, left parent and right parent (when the parent splits)
- * and the root page or the overflow key page when calling bt_preserve.
- * This code must make sure that all pins are released other than the
- * root page or overflow page which is unlocked elsewhere.
- */
- while ((parent = BT_POP(t)) != NULL) {
- lchild = l;
- rchild = r;
-
- /* Get the parent page. */
- if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
- goto err2;
-
- /*
- * The new key goes ONE AFTER the index, because the split
- * was to the right.
- */
- skip = parent->index + 1;
-
- /*
- * Calculate the space needed on the parent page.
- *
- * Prefix trees: space hack when inserting into BINTERNAL
- * pages. Retain only what's needed to distinguish between
- * the new entry and the LAST entry on the page to its left.
- * If the keys compare equal, retain the entire key. Note,
- * we don't touch overflow keys, and the entire key must be
- * retained for the next-to-left most key on the leftmost
- * page of each level, or the search will fail. Applicable
- * ONLY to internal pages that have leaf pages as children.
- * Further reduction of the key between pairs of internal
- * pages loses too much information.
- */
- switch (rchild->flags & P_TYPE) {
- case P_BINTERNAL:
- bi = GETBINTERNAL(rchild, 0);
- nbytes = NBINTERNAL(bi->ksize);
- break;
- case P_BLEAF:
- bl = GETBLEAF(rchild, 0);
- nbytes = NBINTERNAL(bl->ksize);
- if (t->bt_pfx && !(bl->flags & P_BIGKEY) &&
- (h->prevpg != P_INVALID || skip > 1)) {
- tbl = GETBLEAF(lchild, NEXTINDEX(lchild) - 1);
- a.size = tbl->ksize;
- a.data = tbl->bytes;
- b.size = bl->ksize;
- b.data = bl->bytes;
- nksize = t->bt_pfx(&a, &b);
- n = NBINTERNAL(nksize);
- if (n < nbytes) {
-#ifdef STATISTICS
- bt_pfxsaved += nbytes - n;
-#endif
- nbytes = n;
- } else
- nksize = 0;
- } else
- nksize = 0;
- break;
- case P_RINTERNAL:
- case P_RLEAF:
- nbytes = NRINTERNAL;
- break;
- default:
- abort();
- }
-
- /* Split the parent page if necessary or shift the indices. */
- if (h->upper - h->lower < nbytes + sizeof(indx_t)) {
- sp = h;
- h = h->pgno == P_ROOT ?
- bt_root(t, h, &l, &r, &skip, nbytes) :
- bt_page(t, h, &l, &r, &skip, nbytes);
- if (h == NULL)
- goto err1;
- parentsplit = 1;
- } else {
- if (skip < (nxtindex = NEXTINDEX(h)))
- memmove(h->linp + skip + 1, h->linp + skip,
- (nxtindex - skip) * sizeof(indx_t));
- h->lower += sizeof(indx_t);
- parentsplit = 0;
- }
-
- /* Insert the key into the parent page. */
- switch (rchild->flags & P_TYPE) {
- case P_BINTERNAL:
- h->linp[skip] = h->upper -= nbytes;
- dest = (char *)h + h->linp[skip];
- memmove(dest, bi, nbytes);
- ((BINTERNAL *)dest)->pgno = rchild->pgno;
- break;
- case P_BLEAF:
- h->linp[skip] = h->upper -= nbytes;
- dest = (char *)h + h->linp[skip];
- WR_BINTERNAL(dest, nksize ? nksize : bl->ksize,
- rchild->pgno, bl->flags & P_BIGKEY);
- memmove(dest, bl->bytes, nksize ? nksize : bl->ksize);
- if (bl->flags & P_BIGKEY &&
- bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR)
- goto err1;
- break;
- case P_RINTERNAL:
- /*
- * Update the left page count. If split
- * added at index 0, fix the correct page.
- */
- if (skip > 0)
- dest = (char *)h + h->linp[skip - 1];
- else
- dest = (char *)l + l->linp[NEXTINDEX(l) - 1];
- ((RINTERNAL *)dest)->nrecs = rec_total(lchild);
- ((RINTERNAL *)dest)->pgno = lchild->pgno;
-
- /* Update the right page count. */
- h->linp[skip] = h->upper -= nbytes;
- dest = (char *)h + h->linp[skip];
- ((RINTERNAL *)dest)->nrecs = rec_total(rchild);
- ((RINTERNAL *)dest)->pgno = rchild->pgno;
- break;
- case P_RLEAF:
- /*
- * Update the left page count. If split
- * added at index 0, fix the correct page.
- */
- if (skip > 0)
- dest = (char *)h + h->linp[skip - 1];
- else
- dest = (char *)l + l->linp[NEXTINDEX(l) - 1];
- ((RINTERNAL *)dest)->nrecs = NEXTINDEX(lchild);
- ((RINTERNAL *)dest)->pgno = lchild->pgno;
-
- /* Update the right page count. */
- h->linp[skip] = h->upper -= nbytes;
- dest = (char *)h + h->linp[skip];
- ((RINTERNAL *)dest)->nrecs = NEXTINDEX(rchild);
- ((RINTERNAL *)dest)->pgno = rchild->pgno;
- break;
- default:
- abort();
- }
-
- /* Unpin the held pages. */
- if (!parentsplit) {
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- break;
- }
-
- /* If the root page was split, make it look right. */
- if (sp->pgno == P_ROOT &&
- (F_ISSET(t, R_RECNO) ?
- bt_rroot(t, sp, l, r) : bt_broot(t, sp, l, r)) == RET_ERROR)
- goto err1;
-
- mpool_put(t->bt_mp, lchild, MPOOL_DIRTY);
- mpool_put(t->bt_mp, rchild, MPOOL_DIRTY);
- }
-
- /* Unpin the held pages. */
- mpool_put(t->bt_mp, l, MPOOL_DIRTY);
- mpool_put(t->bt_mp, r, MPOOL_DIRTY);
-
- /* Clear any pages left on the stack. */
- return (RET_SUCCESS);
-
- /*
- * If something fails in the above loop we were already walking back
- * up the tree and the tree is now inconsistent. Nothing much we can
- * do about it but release any memory we're holding.
- */
-err1: mpool_put(t->bt_mp, lchild, MPOOL_DIRTY);
- mpool_put(t->bt_mp, rchild, MPOOL_DIRTY);
-
-err2: mpool_put(t->bt_mp, l, 0);
- mpool_put(t->bt_mp, r, 0);
- __dbpanic(t->bt_dbp);
- return (RET_ERROR);
-}
-
-/*
- * BT_PAGE -- Split a non-root page of a btree.
- *
- * Parameters:
- * t: tree
- * h: root page
- * lp: pointer to left page pointer
- * rp: pointer to right page pointer
- * skip: pointer to index to leave open
- * ilen: insert length
- *
- * Returns:
- * Pointer to page in which to insert or NULL on error.
- */
-static PAGE *
-bt_page(t, h, lp, rp, skip, ilen)
- BTREE *t;
- PAGE *h, **lp, **rp;
- indx_t *skip;
- size_t ilen;
-{
- PAGE *l, *r, *tp;
- pgno_t npg;
-
-#ifdef STATISTICS
- ++bt_split;
-#endif
- /* Put the new right page for the split into place. */
- if ((r = __bt_new(t, &npg)) == NULL)
- return (NULL);
- r->pgno = npg;
- r->lower = BTDATAOFF;
- r->upper = t->bt_psize;
- r->nextpg = h->nextpg;
- r->prevpg = h->pgno;
- r->flags = h->flags & P_TYPE;
-
- /*
- * If we're splitting the last page on a level because we're appending
- * a key to it (skip is NEXTINDEX()), it's likely that the data is
- * sorted. Adding an empty page on the side of the level is less work
- * and can push the fill factor much higher than normal. If we're
- * wrong it's no big deal, we'll just do the split the right way next
- * time. It may look like it's equally easy to do a similar hack for
- * reverse sorted data, that is, split the tree left, but it's not.
- * Don't even try.
- */
- if (h->nextpg == P_INVALID && *skip == NEXTINDEX(h)) {
-#ifdef STATISTICS
- ++bt_sortsplit;
-#endif
- h->nextpg = r->pgno;
- r->lower = BTDATAOFF + sizeof(indx_t);
- *skip = 0;
- *lp = h;
- *rp = r;
- return (r);
- }
-
- /* Put the new left page for the split into place. */
- if ((l = (PAGE *)malloc(t->bt_psize)) == NULL) {
- mpool_put(t->bt_mp, r, 0);
- return (NULL);
- }
-#ifdef PURIFY
- memset(l, 0xff, t->bt_psize);
-#endif
- l->pgno = h->pgno;
- l->nextpg = r->pgno;
- l->prevpg = h->prevpg;
- l->lower = BTDATAOFF;
- l->upper = t->bt_psize;
- l->flags = h->flags & P_TYPE;
-
- /* Fix up the previous pointer of the page after the split page. */
- if (h->nextpg != P_INVALID) {
- if ((tp = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL) {
- free(l);
- /* XXX mpool_free(t->bt_mp, r->pgno); */
- return (NULL);
- }
- tp->prevpg = r->pgno;
- mpool_put(t->bt_mp, tp, MPOOL_DIRTY);
- }
-
- /*
- * Split right. The key/data pairs aren't sorted in the btree page so
- * it's simpler to copy the data from the split page onto two new pages
- * instead of copying half the data to the right page and compacting
- * the left page in place. Since the left page can't change, we have
- * to swap the original and the allocated left page after the split.
- */
- tp = bt_psplit(t, h, l, r, skip, ilen);
-
- /* Move the new left page onto the old left page. */
- memmove(h, l, t->bt_psize);
- if (tp == l)
- tp = h;
- free(l);
-
- *lp = h;
- *rp = r;
- return (tp);
-}
-
-/*
- * BT_ROOT -- Split the root page of a btree.
- *
- * Parameters:
- * t: tree
- * h: root page
- * lp: pointer to left page pointer
- * rp: pointer to right page pointer
- * skip: pointer to index to leave open
- * ilen: insert length
- *
- * Returns:
- * Pointer to page in which to insert or NULL on error.
- */
-static PAGE *
-bt_root(t, h, lp, rp, skip, ilen)
- BTREE *t;
- PAGE *h, **lp, **rp;
- indx_t *skip;
- size_t ilen;
-{
- PAGE *l, *r, *tp;
- pgno_t lnpg, rnpg;
-
-#ifdef STATISTICS
- ++bt_split;
- ++bt_rootsplit;
-#endif
- /* Put the new left and right pages for the split into place. */
- if ((l = __bt_new(t, &lnpg)) == NULL ||
- (r = __bt_new(t, &rnpg)) == NULL)
- return (NULL);
- l->pgno = lnpg;
- r->pgno = rnpg;
- l->nextpg = r->pgno;
- r->prevpg = l->pgno;
- l->prevpg = r->nextpg = P_INVALID;
- l->lower = r->lower = BTDATAOFF;
- l->upper = r->upper = t->bt_psize;
- l->flags = r->flags = h->flags & P_TYPE;
-
- /* Split the root page. */
- tp = bt_psplit(t, h, l, r, skip, ilen);
-
- *lp = l;
- *rp = r;
- return (tp);
-}
-
-/*
- * BT_RROOT -- Fix up the recno root page after it has been split.
- *
- * Parameters:
- * t: tree
- * h: root page
- * l: left page
- * r: right page
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-static int
-bt_rroot(t, h, l, r)
- BTREE *t;
- PAGE *h, *l, *r;
-{
- char *dest;
-
- /* Insert the left and right keys, set the header information. */
- h->linp[0] = h->upper = t->bt_psize - NRINTERNAL;
- dest = (char *)h + h->upper;
- WR_RINTERNAL(dest,
- l->flags & P_RLEAF ? NEXTINDEX(l) : rec_total(l), l->pgno);
-
- h->linp[1] = h->upper -= NRINTERNAL;
- dest = (char *)h + h->upper;
- WR_RINTERNAL(dest,
- r->flags & P_RLEAF ? NEXTINDEX(r) : rec_total(r), r->pgno);
-
- h->lower = BTDATAOFF + 2 * sizeof(indx_t);
-
- /* Unpin the root page, set to recno internal page. */
- h->flags &= ~P_TYPE;
- h->flags |= P_RINTERNAL;
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
-
- return (RET_SUCCESS);
-}
-
-/*
- * BT_BROOT -- Fix up the btree root page after it has been split.
- *
- * Parameters:
- * t: tree
- * h: root page
- * l: left page
- * r: right page
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-static int
-bt_broot(t, h, l, r)
- BTREE *t;
- PAGE *h, *l, *r;
-{
- BINTERNAL *bi;
- BLEAF *bl;
- u_int32_t nbytes;
- char *dest;
-
- /*
- * If the root page was a leaf page, change it into an internal page.
- * We copy the key we split on (but not the key's data, in the case of
- * a leaf page) to the new root page.
- *
- * The btree comparison code guarantees that the left-most key on any
- * level of the tree is never used, so it doesn't need to be filled in.
- */
- nbytes = NBINTERNAL(0);
- h->linp[0] = h->upper = t->bt_psize - nbytes;
- dest = (char *)h + h->upper;
- WR_BINTERNAL(dest, 0, l->pgno, 0);
-
- switch (h->flags & P_TYPE) {
- case P_BLEAF:
- bl = GETBLEAF(r, 0);
- nbytes = NBINTERNAL(bl->ksize);
- h->linp[1] = h->upper -= nbytes;
- dest = (char *)h + h->upper;
- WR_BINTERNAL(dest, bl->ksize, r->pgno, 0);
- memmove(dest, bl->bytes, bl->ksize);
-
- /*
- * If the key is on an overflow page, mark the overflow chain
- * so it isn't deleted when the leaf copy of the key is deleted.
- */
- if (bl->flags & P_BIGKEY &&
- bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR)
- return (RET_ERROR);
- break;
- case P_BINTERNAL:
- bi = GETBINTERNAL(r, 0);
- nbytes = NBINTERNAL(bi->ksize);
- h->linp[1] = h->upper -= nbytes;
- dest = (char *)h + h->upper;
- memmove(dest, bi, nbytes);
- ((BINTERNAL *)dest)->pgno = r->pgno;
- break;
- default:
- abort();
- }
-
- /* There are two keys on the page. */
- h->lower = BTDATAOFF + 2 * sizeof(indx_t);
-
- /* Unpin the root page, set to btree internal page. */
- h->flags &= ~P_TYPE;
- h->flags |= P_BINTERNAL;
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
-
- return (RET_SUCCESS);
-}
-
-/*
- * BT_PSPLIT -- Do the real work of splitting the page.
- *
- * Parameters:
- * t: tree
- * h: page to be split
- * l: page to put lower half of data
- * r: page to put upper half of data
- * pskip: pointer to index to leave open
- * ilen: insert length
- *
- * Returns:
- * Pointer to page in which to insert.
- */
-static PAGE *
-bt_psplit(t, h, l, r, pskip, ilen)
- BTREE *t;
- PAGE *h, *l, *r;
- indx_t *pskip;
- size_t ilen;
-{
- BINTERNAL *bi;
- BLEAF *bl;
- CURSOR *c;
- RLEAF *rl;
- PAGE *rval;
- void *src;
- indx_t full, half, nxt, off, skip, top, used;
- u_int32_t nbytes;
- int bigkeycnt, isbigkey;
-
- /*
- * Split the data to the left and right pages. Leave the skip index
- * open. Additionally, make some effort not to split on an overflow
- * key. This makes internal page processing faster and can save
- * space as overflow keys used by internal pages are never deleted.
- */
- bigkeycnt = 0;
- skip = *pskip;
- full = t->bt_psize - BTDATAOFF;
- half = full / 2;
- used = 0;
- for (nxt = off = 0, top = NEXTINDEX(h); nxt < top; ++off) {
- if (skip == off) {
- nbytes = ilen;
- isbigkey = 0; /* XXX: not really known. */
- } else
- switch (h->flags & P_TYPE) {
- case P_BINTERNAL:
- src = bi = GETBINTERNAL(h, nxt);
- nbytes = NBINTERNAL(bi->ksize);
- isbigkey = bi->flags & P_BIGKEY;
- break;
- case P_BLEAF:
- src = bl = GETBLEAF(h, nxt);
- nbytes = NBLEAF(bl);
- isbigkey = bl->flags & P_BIGKEY;
- break;
- case P_RINTERNAL:
- src = GETRINTERNAL(h, nxt);
- nbytes = NRINTERNAL;
- isbigkey = 0;
- break;
- case P_RLEAF:
- src = rl = GETRLEAF(h, nxt);
- nbytes = NRLEAF(rl);
- isbigkey = 0;
- break;
- default:
- abort();
- }
-
- /*
- * If the key/data pairs are substantial fractions of the max
- * possible size for the page, it's possible to get situations
- * where we decide to try and copy too much onto the left page.
- * Make sure that doesn't happen.
- */
- if (skip <= off && used + nbytes >= full) {
- --off;
- break;
- }
-
- /* Copy the key/data pair, if not the skipped index. */
- if (skip != off) {
- ++nxt;
-
- l->linp[off] = l->upper -= nbytes;
- memmove((char *)l + l->upper, src, nbytes);
- }
-
- used += nbytes;
- if (used >= half) {
- if (!isbigkey || bigkeycnt == 3)
- break;
- else
- ++bigkeycnt;
- }
- }
-
- /*
- * Off is the last offset that's valid for the left page.
- * Nxt is the first offset to be placed on the right page.
- */
- l->lower += (off + 1) * sizeof(indx_t);
-
- /*
- * If splitting the page that the cursor was on, the cursor has to be
- * adjusted to point to the same record as before the split. If the
- * cursor is at or past the skipped slot, the cursor is incremented by
- * one. If the cursor is on the right page, it is decremented by the
- * number of records split to the left page.
- */
- c = &t->bt_cursor;
- if (F_ISSET(c, CURS_INIT) && c->pg.pgno == h->pgno) {
- if (c->pg.index >= skip)
- ++c->pg.index;
- if (c->pg.index < nxt) /* Left page. */
- c->pg.pgno = l->pgno;
- else { /* Right page. */
- c->pg.pgno = r->pgno;
- c->pg.index -= nxt;
- }
- }
-
- /*
- * If the skipped index was on the left page, just return that page.
- * Otherwise, adjust the skip index to reflect the new position on
- * the right page.
- */
- if (skip <= off) {
- skip = 0;
- rval = l;
- } else {
- rval = r;
- *pskip -= nxt;
- }
-
- for (off = 0; nxt < top; ++off) {
- if (skip == nxt) {
- ++off;
- skip = 0;
- }
- switch (h->flags & P_TYPE) {
- case P_BINTERNAL:
- src = bi = GETBINTERNAL(h, nxt);
- nbytes = NBINTERNAL(bi->ksize);
- break;
- case P_BLEAF:
- src = bl = GETBLEAF(h, nxt);
- nbytes = NBLEAF(bl);
- break;
- case P_RINTERNAL:
- src = GETRINTERNAL(h, nxt);
- nbytes = NRINTERNAL;
- break;
- case P_RLEAF:
- src = rl = GETRLEAF(h, nxt);
- nbytes = NRLEAF(rl);
- break;
- default:
- abort();
- }
- ++nxt;
- r->linp[off] = r->upper -= nbytes;
- memmove((char *)r + r->upper, src, nbytes);
- }
- r->lower += off * sizeof(indx_t);
-
- /* If the key is being appended to the page, adjust the index. */
- if (skip == top)
- r->lower += sizeof(indx_t);
-
- return (rval);
-}
-
-/*
- * BT_PRESERVE -- Mark a chain of pages as used by an internal node.
- *
- * Chains of indirect blocks pointed to by leaf nodes get reclaimed when the
- * record that references them gets deleted. Chains pointed to by internal
- * pages never get deleted. This routine marks a chain as pointed to by an
- * internal page.
- *
- * Parameters:
- * t: tree
- * pg: page number of first page in the chain.
- *
- * Returns:
- * RET_SUCCESS, RET_ERROR.
- */
-static int
-bt_preserve(t, pg)
- BTREE *t;
- pgno_t pg;
-{
- PAGE *h;
-
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- return (RET_ERROR);
- h->flags |= P_PRESERVE;
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- return (RET_SUCCESS);
-}
-
-/*
- * REC_TOTAL -- Return the number of recno entries below a page.
- *
- * Parameters:
- * h: page
- *
- * Returns:
- * The number of recno entries below a page.
- *
- * XXX
- * These values could be set by the bt_psplit routine. The problem is that the
- * entry has to be popped off of the stack etc. or the values have to be passed
- * all the way back to bt_split/bt_rroot and it's not very clean.
- */
-static recno_t
-rec_total(h)
- PAGE *h;
-{
- recno_t recs;
- indx_t nxt, top;
-
- for (recs = 0, nxt = 0, top = NEXTINDEX(h); nxt < top; ++nxt)
- recs += GETRINTERNAL(h, nxt)->nrecs;
- return (recs);
-}
diff --git a/lib/libc/db/btree/bt_utils.c b/lib/libc/db/btree/bt_utils.c
deleted file mode 100644
index 9c1438e..0000000
--- a/lib/libc/db/btree/bt_utils.c
+++ /dev/null
@@ -1,260 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bt_utils.c 8.8 (Berkeley) 7/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <db.h>
-#include "btree.h"
-
-/*
- * __bt_ret --
- * Build return key/data pair.
- *
- * Parameters:
- * t: tree
- * e: key/data pair to be returned
- * key: user's key structure (NULL if not to be filled in)
- * rkey: memory area to hold key
- * data: user's data structure (NULL if not to be filled in)
- * rdata: memory area to hold data
- * copy: always copy the key/data item
- *
- * Returns:
- * RET_SUCCESS, RET_ERROR.
- */
-int
-__bt_ret(t, e, key, rkey, data, rdata, copy)
- BTREE *t;
- EPG *e;
- DBT *key, *rkey, *data, *rdata;
- int copy;
-{
- BLEAF *bl;
- void *p;
-
- bl = GETBLEAF(e->page, e->index);
-
- /*
- * We must copy big keys/data to make them contigous. Otherwise,
- * leave the page pinned and don't copy unless the user specified
- * concurrent access.
- */
- if (key == NULL)
- goto dataonly;
-
- if (bl->flags & P_BIGKEY) {
- if (__ovfl_get(t, bl->bytes,
- &key->size, &rkey->data, &rkey->size))
- return (RET_ERROR);
- key->data = rkey->data;
- } else if (copy || F_ISSET(t, B_DB_LOCK)) {
- if (bl->ksize > rkey->size) {
- p = (void *)(rkey->data == NULL ?
- malloc(bl->ksize) : realloc(rkey->data, bl->ksize));
- if (p == NULL)
- return (RET_ERROR);
- rkey->data = p;
- rkey->size = bl->ksize;
- }
- memmove(rkey->data, bl->bytes, bl->ksize);
- key->size = bl->ksize;
- key->data = rkey->data;
- } else {
- key->size = bl->ksize;
- key->data = bl->bytes;
- }
-
-dataonly:
- if (data == NULL)
- return (RET_SUCCESS);
-
- if (bl->flags & P_BIGDATA) {
- if (__ovfl_get(t, bl->bytes + bl->ksize,
- &data->size, &rdata->data, &rdata->size))
- return (RET_ERROR);
- data->data = rdata->data;
- } else if (copy || F_ISSET(t, B_DB_LOCK)) {
- /* Use +1 in case the first record retrieved is 0 length. */
- if (bl->dsize + 1 > rdata->size) {
- p = (void *)(rdata->data == NULL ?
- malloc(bl->dsize + 1) :
- realloc(rdata->data, bl->dsize + 1));
- if (p == NULL)
- return (RET_ERROR);
- rdata->data = p;
- rdata->size = bl->dsize + 1;
- }
- memmove(rdata->data, bl->bytes + bl->ksize, bl->dsize);
- data->size = bl->dsize;
- data->data = rdata->data;
- } else {
- data->size = bl->dsize;
- data->data = bl->bytes + bl->ksize;
- }
-
- return (RET_SUCCESS);
-}
-
-/*
- * __BT_CMP -- Compare a key to a given record.
- *
- * Parameters:
- * t: tree
- * k1: DBT pointer of first arg to comparison
- * e: pointer to EPG for comparison
- *
- * Returns:
- * < 0 if k1 is < record
- * = 0 if k1 is = record
- * > 0 if k1 is > record
- */
-int
-__bt_cmp(t, k1, e)
- BTREE *t;
- const DBT *k1;
- EPG *e;
-{
- BINTERNAL *bi;
- BLEAF *bl;
- DBT k2;
- PAGE *h;
- void *bigkey;
-
- /*
- * The left-most key on internal pages, at any level of the tree, is
- * guaranteed by the following code to be less than any user key.
- * This saves us from having to update the leftmost key on an internal
- * page when the user inserts a new key in the tree smaller than
- * anything we've yet seen.
- */
- h = e->page;
- if (e->index == 0 && h->prevpg == P_INVALID && !(h->flags & P_BLEAF))
- return (1);
-
- bigkey = NULL;
- if (h->flags & P_BLEAF) {
- bl = GETBLEAF(h, e->index);
- if (bl->flags & P_BIGKEY)
- bigkey = bl->bytes;
- else {
- k2.data = bl->bytes;
- k2.size = bl->ksize;
- }
- } else {
- bi = GETBINTERNAL(h, e->index);
- if (bi->flags & P_BIGKEY)
- bigkey = bi->bytes;
- else {
- k2.data = bi->bytes;
- k2.size = bi->ksize;
- }
- }
-
- if (bigkey) {
- if (__ovfl_get(t, bigkey,
- &k2.size, &t->bt_rdata.data, &t->bt_rdata.size))
- return (RET_ERROR);
- k2.data = t->bt_rdata.data;
- }
- return ((*t->bt_cmp)(k1, &k2));
-}
-
-/*
- * __BT_DEFCMP -- Default comparison routine.
- *
- * Parameters:
- * a: DBT #1
- * b: DBT #2
- *
- * Returns:
- * < 0 if a is < b
- * = 0 if a is = b
- * > 0 if a is > b
- */
-int
-__bt_defcmp(a, b)
- const DBT *a, *b;
-{
- register size_t len;
- register u_char *p1, *p2;
-
- /*
- * XXX
- * If a size_t doesn't fit in an int, this routine can lose.
- * What we need is a integral type which is guaranteed to be
- * larger than a size_t, and there is no such thing.
- */
- len = MIN(a->size, b->size);
- for (p1 = a->data, p2 = b->data; len--; ++p1, ++p2)
- if (*p1 != *p2)
- return ((int)*p1 - (int)*p2);
- return ((int)a->size - (int)b->size);
-}
-
-/*
- * __BT_DEFPFX -- Default prefix routine.
- *
- * Parameters:
- * a: DBT #1
- * b: DBT #2
- *
- * Returns:
- * Number of bytes needed to distinguish b from a.
- */
-size_t
-__bt_defpfx(a, b)
- const DBT *a, *b;
-{
- register u_char *p1, *p2;
- register size_t cnt, len;
-
- cnt = 1;
- len = MIN(a->size, b->size);
- for (p1 = a->data, p2 = b->data; len--; ++p1, ++p2, ++cnt)
- if (*p1 != *p2)
- return (cnt);
-
- /* a->size must be <= b->size, or they wouldn't be in this order. */
- return (a->size < b->size ? a->size + 1 : a->size);
-}
diff --git a/lib/libc/db/btree/btree.h b/lib/libc/db/btree/btree.h
deleted file mode 100644
index 36d35c9..0000000
--- a/lib/libc/db/btree/btree.h
+++ /dev/null
@@ -1,383 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)btree.h 8.11 (Berkeley) 8/17/94
- */
-
-/* Macros to set/clear/test flags. */
-#define F_SET(p, f) (p)->flags |= (f)
-#define F_CLR(p, f) (p)->flags &= ~(f)
-#define F_ISSET(p, f) ((p)->flags & (f))
-
-#include <mpool.h>
-
-#define DEFMINKEYPAGE (2) /* Minimum keys per page */
-#define MINCACHE (5) /* Minimum cached pages */
-#define MINPSIZE (512) /* Minimum page size */
-
-/*
- * Page 0 of a btree file contains a copy of the meta-data. This page is also
- * used as an out-of-band page, i.e. page pointers that point to nowhere point
- * to page 0. Page 1 is the root of the btree.
- */
-#define P_INVALID 0 /* Invalid tree page number. */
-#define P_META 0 /* Tree metadata page number. */
-#define P_ROOT 1 /* Tree root page number. */
-
-/*
- * There are five page layouts in the btree: btree internal pages (BINTERNAL),
- * btree leaf pages (BLEAF), recno internal pages (RINTERNAL), recno leaf pages
- * (RLEAF) and overflow pages. All five page types have a page header (PAGE).
- * This implementation requires that values within structures NOT be padded.
- * (ANSI C permits random padding.) If your compiler pads randomly you'll have
- * to do some work to get this package to run.
- */
-typedef struct _page {
- pgno_t pgno; /* this page's page number */
- pgno_t prevpg; /* left sibling */
- pgno_t nextpg; /* right sibling */
-
-#define P_BINTERNAL 0x01 /* btree internal page */
-#define P_BLEAF 0x02 /* leaf page */
-#define P_OVERFLOW 0x04 /* overflow page */
-#define P_RINTERNAL 0x08 /* recno internal page */
-#define P_RLEAF 0x10 /* leaf page */
-#define P_TYPE 0x1f /* type mask */
-#define P_PRESERVE 0x20 /* never delete this chain of pages */
- u_int32_t flags;
-
- indx_t lower; /* lower bound of free space on page */
- indx_t upper; /* upper bound of free space on page */
- indx_t linp[1]; /* indx_t-aligned VAR. LENGTH DATA */
-} PAGE;
-
-/* First and next index. */
-#define BTDATAOFF \
- (sizeof(pgno_t) + sizeof(pgno_t) + sizeof(pgno_t) + \
- sizeof(u_int32_t) + sizeof(indx_t) + sizeof(indx_t))
-#define NEXTINDEX(p) (((p)->lower - BTDATAOFF) / sizeof(indx_t))
-
-/*
- * For pages other than overflow pages, there is an array of offsets into the
- * rest of the page immediately following the page header. Each offset is to
- * an item which is unique to the type of page. The h_lower offset is just
- * past the last filled-in index. The h_upper offset is the first item on the
- * page. Offsets are from the beginning of the page.
- *
- * If an item is too big to store on a single page, a flag is set and the item
- * is a { page, size } pair such that the page is the first page of an overflow
- * chain with size bytes of item. Overflow pages are simply bytes without any
- * external structure.
- *
- * The page number and size fields in the items are pgno_t-aligned so they can
- * be manipulated without copying. (This presumes that 32 bit items can be
- * manipulated on this system.)
- */
-#define LALIGN(n) (((n) + sizeof(pgno_t) - 1) & ~(sizeof(pgno_t) - 1))
-#define NOVFLSIZE (sizeof(pgno_t) + sizeof(u_int32_t))
-
-/*
- * For the btree internal pages, the item is a key. BINTERNALs are {key, pgno}
- * pairs, such that the key compares less than or equal to all of the records
- * on that page. For a tree without duplicate keys, an internal page with two
- * consecutive keys, a and b, will have all records greater than or equal to a
- * and less than b stored on the page associated with a. Duplicate keys are
- * somewhat special and can cause duplicate internal and leaf page records and
- * some minor modifications of the above rule.
- */
-typedef struct _binternal {
- u_int32_t ksize; /* key size */
- pgno_t pgno; /* page number stored on */
-#define P_BIGDATA 0x01 /* overflow data */
-#define P_BIGKEY 0x02 /* overflow key */
- u_char flags;
- char bytes[1]; /* data */
-} BINTERNAL;
-
-/* Get the page's BINTERNAL structure at index indx. */
-#define GETBINTERNAL(pg, indx) \
- ((BINTERNAL *)((char *)(pg) + (pg)->linp[indx]))
-
-/* Get the number of bytes in the entry. */
-#define NBINTERNAL(len) \
- LALIGN(sizeof(u_int32_t) + sizeof(pgno_t) + sizeof(u_char) + (len))
-
-/* Copy a BINTERNAL entry to the page. */
-#define WR_BINTERNAL(p, size, pgno, flags) { \
- *(u_int32_t *)p = size; \
- p += sizeof(u_int32_t); \
- *(pgno_t *)p = pgno; \
- p += sizeof(pgno_t); \
- *(u_char *)p = flags; \
- p += sizeof(u_char); \
-}
-
-/*
- * For the recno internal pages, the item is a page number with the number of
- * keys found on that page and below.
- */
-typedef struct _rinternal {
- recno_t nrecs; /* number of records */
- pgno_t pgno; /* page number stored below */
-} RINTERNAL;
-
-/* Get the page's RINTERNAL structure at index indx. */
-#define GETRINTERNAL(pg, indx) \
- ((RINTERNAL *)((char *)(pg) + (pg)->linp[indx]))
-
-/* Get the number of bytes in the entry. */
-#define NRINTERNAL \
- LALIGN(sizeof(recno_t) + sizeof(pgno_t))
-
-/* Copy a RINTERAL entry to the page. */
-#define WR_RINTERNAL(p, nrecs, pgno) { \
- *(recno_t *)p = nrecs; \
- p += sizeof(recno_t); \
- *(pgno_t *)p = pgno; \
-}
-
-/* For the btree leaf pages, the item is a key and data pair. */
-typedef struct _bleaf {
- u_int32_t ksize; /* size of key */
- u_int32_t dsize; /* size of data */
- u_char flags; /* P_BIGDATA, P_BIGKEY */
- char bytes[1]; /* data */
-} BLEAF;
-
-/* Get the page's BLEAF structure at index indx. */
-#define GETBLEAF(pg, indx) \
- ((BLEAF *)((char *)(pg) + (pg)->linp[indx]))
-
-/* Get the number of bytes in the entry. */
-#define NBLEAF(p) NBLEAFDBT((p)->ksize, (p)->dsize)
-
-/* Get the number of bytes in the user's key/data pair. */
-#define NBLEAFDBT(ksize, dsize) \
- LALIGN(sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(u_char) + \
- (ksize) + (dsize))
-
-/* Copy a BLEAF entry to the page. */
-#define WR_BLEAF(p, key, data, flags) { \
- *(u_int32_t *)p = key->size; \
- p += sizeof(u_int32_t); \
- *(u_int32_t *)p = data->size; \
- p += sizeof(u_int32_t); \
- *(u_char *)p = flags; \
- p += sizeof(u_char); \
- memmove(p, key->data, key->size); \
- p += key->size; \
- memmove(p, data->data, data->size); \
-}
-
-/* For the recno leaf pages, the item is a data entry. */
-typedef struct _rleaf {
- u_int32_t dsize; /* size of data */
- u_char flags; /* P_BIGDATA */
- char bytes[1];
-} RLEAF;
-
-/* Get the page's RLEAF structure at index indx. */
-#define GETRLEAF(pg, indx) \
- ((RLEAF *)((char *)(pg) + (pg)->linp[indx]))
-
-/* Get the number of bytes in the entry. */
-#define NRLEAF(p) NRLEAFDBT((p)->dsize)
-
-/* Get the number of bytes from the user's data. */
-#define NRLEAFDBT(dsize) \
- LALIGN(sizeof(u_int32_t) + sizeof(u_char) + (dsize))
-
-/* Copy a RLEAF entry to the page. */
-#define WR_RLEAF(p, data, flags) { \
- *(u_int32_t *)p = data->size; \
- p += sizeof(u_int32_t); \
- *(u_char *)p = flags; \
- p += sizeof(u_char); \
- memmove(p, data->data, data->size); \
-}
-
-/*
- * A record in the tree is either a pointer to a page and an index in the page
- * or a page number and an index. These structures are used as a cursor, stack
- * entry and search returns as well as to pass records to other routines.
- *
- * One comment about searches. Internal page searches must find the largest
- * record less than key in the tree so that descents work. Leaf page searches
- * must find the smallest record greater than key so that the returned index
- * is the record's correct position for insertion.
- */
-typedef struct _epgno {
- pgno_t pgno; /* the page number */
- indx_t index; /* the index on the page */
-} EPGNO;
-
-typedef struct _epg {
- PAGE *page; /* the (pinned) page */
- indx_t index; /* the index on the page */
-} EPG;
-
-/*
- * About cursors. The cursor (and the page that contained the key/data pair
- * that it referenced) can be deleted, which makes things a bit tricky. If
- * there are no duplicates of the cursor key in the tree (i.e. B_NODUPS is set
- * or there simply aren't any duplicates of the key) we copy the key that it
- * referenced when it's deleted, and reacquire a new cursor key if the cursor
- * is used again. If there are duplicates keys, we move to the next/previous
- * key, and set a flag so that we know what happened. NOTE: if duplicate (to
- * the cursor) keys are added to the tree during this process, it is undefined
- * if they will be returned or not in a cursor scan.
- *
- * The flags determine the possible states of the cursor:
- *
- * CURS_INIT The cursor references *something*.
- * CURS_ACQUIRE The cursor was deleted, and a key has been saved so that
- * we can reacquire the right position in the tree.
- * CURS_AFTER, CURS_BEFORE
- * The cursor was deleted, and now references a key/data pair
- * that has not yet been returned, either before or after the
- * deleted key/data pair.
- * XXX
- * This structure is broken out so that we can eventually offer multiple
- * cursors as part of the DB interface.
- */
-typedef struct _cursor {
- EPGNO pg; /* B: Saved tree reference. */
- DBT key; /* B: Saved key, or key.data == NULL. */
- recno_t rcursor; /* R: recno cursor (1-based) */
-
-#define CURS_ACQUIRE 0x01 /* B: Cursor needs to be reacquired. */
-#define CURS_AFTER 0x02 /* B: Unreturned cursor after key. */
-#define CURS_BEFORE 0x04 /* B: Unreturned cursor before key. */
-#define CURS_INIT 0x08 /* RB: Cursor initialized. */
- u_int8_t flags;
-} CURSOR;
-
-/*
- * The metadata of the tree. The nrecs field is used only by the RECNO code.
- * This is because the btree doesn't really need it and it requires that every
- * put or delete call modify the metadata.
- */
-typedef struct _btmeta {
- u_int32_t magic; /* magic number */
- u_int32_t version; /* version */
- u_int32_t psize; /* page size */
- u_int32_t free; /* page number of first free page */
- u_int32_t nrecs; /* R: number of records */
-
-#define SAVEMETA (B_NODUPS | R_RECNO)
- u_int32_t flags; /* bt_flags & SAVEMETA */
-} BTMETA;
-
-/* The in-memory btree/recno data structure. */
-typedef struct _btree {
- MPOOL *bt_mp; /* memory pool cookie */
-
- DB *bt_dbp; /* pointer to enclosing DB */
-
- EPG bt_cur; /* current (pinned) page */
- PAGE *bt_pinned; /* page pinned across calls */
-
- CURSOR bt_cursor; /* cursor */
-
-#define BT_PUSH(t, p, i) { \
- t->bt_sp->pgno = p; \
- t->bt_sp->index = i; \
- ++t->bt_sp; \
-}
-#define BT_POP(t) (t->bt_sp == t->bt_stack ? NULL : --t->bt_sp)
-#define BT_CLR(t) (t->bt_sp = t->bt_stack)
- EPGNO bt_stack[50]; /* stack of parent pages */
- EPGNO *bt_sp; /* current stack pointer */
-
- DBT bt_rkey; /* returned key */
- DBT bt_rdata; /* returned data */
-
- int bt_fd; /* tree file descriptor */
-
- pgno_t bt_free; /* next free page */
- u_int32_t bt_psize; /* page size */
- indx_t bt_ovflsize; /* cut-off for key/data overflow */
- int bt_lorder; /* byte order */
- /* sorted order */
- enum { NOT, BACK, FORWARD } bt_order;
- EPGNO bt_last; /* last insert */
-
- /* B: key comparison function */
- int (*bt_cmp) __P((const DBT *, const DBT *));
- /* B: prefix comparison function */
- size_t (*bt_pfx) __P((const DBT *, const DBT *));
- /* R: recno input function */
- int (*bt_irec) __P((struct _btree *, recno_t));
-
- FILE *bt_rfp; /* R: record FILE pointer */
- int bt_rfd; /* R: record file descriptor */
-
- caddr_t bt_cmap; /* R: current point in mapped space */
- caddr_t bt_smap; /* R: start of mapped space */
- caddr_t bt_emap; /* R: end of mapped space */
- size_t bt_msize; /* R: size of mapped region. */
-
- recno_t bt_nrecs; /* R: number of records */
- size_t bt_reclen; /* R: fixed record length */
- u_char bt_bval; /* R: delimiting byte/pad character */
-
-/*
- * NB:
- * B_NODUPS and R_RECNO are stored on disk, and may not be changed.
- */
-#define B_INMEM 0x00001 /* in-memory tree */
-#define B_METADIRTY 0x00002 /* need to write metadata */
-#define B_MODIFIED 0x00004 /* tree modified */
-#define B_NEEDSWAP 0x00008 /* if byte order requires swapping */
-#define B_RDONLY 0x00010 /* read-only tree */
-
-#define B_NODUPS 0x00020 /* no duplicate keys permitted */
-#define R_RECNO 0x00080 /* record oriented tree */
-
-#define R_CLOSEFP 0x00040 /* opened a file pointer */
-#define R_EOF 0x00100 /* end of input file reached. */
-#define R_FIXLEN 0x00200 /* fixed length records */
-#define R_MEMMAPPED 0x00400 /* memory mapped file. */
-#define R_INMEM 0x00800 /* in-memory file */
-#define R_MODIFIED 0x01000 /* modified file */
-#define R_RDONLY 0x02000 /* read-only file */
-
-#define B_DB_LOCK 0x04000 /* DB_LOCK specified. */
-#define B_DB_SHMEM 0x08000 /* DB_SHMEM specified. */
-#define B_DB_TXN 0x10000 /* DB_TXN specified. */
- u_int32_t flags;
-} BTREE;
-
-#include "extern.h"
diff --git a/lib/libc/db/btree/extern.h b/lib/libc/db/btree/extern.h
deleted file mode 100644
index ebd9c54..0000000
--- a/lib/libc/db/btree/extern.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)extern.h 8.10 (Berkeley) 7/20/94
- */
-
-int __bt_close __P((DB *));
-int __bt_cmp __P((BTREE *, const DBT *, EPG *));
-int __bt_crsrdel __P((BTREE *, EPGNO *));
-int __bt_defcmp __P((const DBT *, const DBT *));
-size_t __bt_defpfx __P((const DBT *, const DBT *));
-int __bt_delete __P((const DB *, const DBT *, u_int));
-int __bt_dleaf __P((BTREE *, const DBT *, PAGE *, u_int));
-int __bt_fd __P((const DB *));
-int __bt_free __P((BTREE *, PAGE *));
-int __bt_get __P((const DB *, const DBT *, DBT *, u_int));
-PAGE *__bt_new __P((BTREE *, pgno_t *));
-void __bt_pgin __P((void *, pgno_t, void *));
-void __bt_pgout __P((void *, pgno_t, void *));
-int __bt_push __P((BTREE *, pgno_t, int));
-int __bt_put __P((const DB *dbp, DBT *, const DBT *, u_int));
-int __bt_ret __P((BTREE *, EPG *, DBT *, DBT *, DBT *, DBT *, int));
-EPG *__bt_search __P((BTREE *, const DBT *, int *));
-int __bt_seq __P((const DB *, DBT *, DBT *, u_int));
-void __bt_setcur __P((BTREE *, pgno_t, u_int));
-int __bt_split __P((BTREE *, PAGE *,
- const DBT *, const DBT *, int, size_t, u_int32_t));
-int __bt_sync __P((const DB *, u_int));
-
-int __ovfl_delete __P((BTREE *, void *));
-int __ovfl_get __P((BTREE *, void *, size_t *, void **, size_t *));
-int __ovfl_put __P((BTREE *, const DBT *, pgno_t *));
-
-#ifdef DEBUG
-void __bt_dnpage __P((DB *, pgno_t));
-void __bt_dpage __P((PAGE *));
-void __bt_dump __P((DB *));
-#endif
-#ifdef STATISTICS
-void __bt_stat __P((DB *));
-#endif
diff --git a/lib/libc/db/changelog b/lib/libc/db/changelog
deleted file mode 100644
index 1540ca8..0000000
--- a/lib/libc/db/changelog
+++ /dev/null
@@ -1,103 +0,0 @@
-1.84 -> 1.85
- recno: #ifdef out use of mmap, it's not portable enough.
-
-1.83 -> 1.84 Thu Aug 18 15:46:07 EDT 1994
- recno: Rework fixed-length records so that closing and reopening
- the file now works. Pad short records on input. Never do
- signed comparison in recno input reading functions.
-
-1.82 -> 1.83 Tue Jul 26 15:33:44 EDT 1994
- btree: Rework cursor deletion code yet again; bugs with
- deleting empty pages that only contained the cursor
- record.
-
-1.81 -> 1.82 Sat Jul 16 11:01:50 EDT 1994
- btree: Fix bugs introduced by new cursor/deletion code.
- Replace return kbuf/dbuf with real DBT's.
-
-1.80 -> 1.81
- btree: Fix bugs introduced by new cursor/deletion code.
- all: Add #defines for Purify.
-
-1.79 -> 1.80 Wed Jul 13 22:41:54 EDT 1994
- btree Change deletion to coalesce empty pages. This is a major
- change, cursors and duplicate pages all had to be reworked.
- Return to a fixed stack.
- recno: Affected by cursor changes. New cursor structures should
- permit multiple cursors in the future.
-
-1.78 -> 1.79 Mon Jun 20 17:36:47 EDT 1994
- all: Minor cleanups of 1.78 for porting reasons; only
- major change was inlining check of NULL pointer
- so that __fix_realloc goes away.
-
-1.77 -> 1.78 Thu Jun 16 19:06:43 EDT 1994
- all: Move "standard" size typedef's into db.h.
-
-1.76 -> 1.77 Thu Jun 16 16:48:38 EDT 1994
- hash: Delete __init_ routine, has special meaning to OSF 2.0.
-
-1.74 -> 1.76
- all: Finish up the port to the Alpha.
-
-1.73 -> 1.74
- recno: Don't put the record if rec_search fails, in rec_rdelete.
- Create fixed-length intermediate records past "end" of DB
- correctly.
- Realloc bug when reading in fixed records.
- all: First cut at port to Alpha (64-bit architecture) using
- 4.4BSD basic integral types typedef's.
- Cast allocation pointers to shut up old compilers.
- Rework PORT directory into OS/machine directories.
-
-1.72 -> 1.73
- btree: If enough duplicate records were inserted and then deleted
- that internal pages had references to empty pages of the
- duplicate keys, the search function ended up on the wrong
- page.
-
-1.7 -> 1.72 12 Oct 1993
- hash: Support NET/2 hash formats.
-
-1.7 -> 1.71 16 Sep 1993
- btree/recno:
- Fix bug in internal search routines that caused
- return of invalid pointers.
-
-1.6 -> 1.7 07 Sep 1993
- hash: Fixed big key overflow bugs.
- test: Portability hacks, rewrite test script, Makefile.
- btree/recno:
- Stop copying non-overflow key/data pairs.
- PORT: Break PORT directory up into per architecture/OS
- subdirectories.
-
-1.5 -> 1.6 06 Jun 1993
- hash: In PAIRFITS, the first comparison should look at (P)[2].
- The hash_realloc function was walking off the end of memory.
- The overflow page number was wrong when bumping splitpoint.
-
-1.4 -> 1.5 23 May 1993
- hash: Set hash default fill factor dynamically.
- recno: Fixed bug in sorted page splits.
- Add page size parameter support.
- Allow recno to specify the name of the underlying btree;
- used for vi recovery.
- btree/recno:
- Support 64K pages.
- btree/hash/recno:
- Provide access to an underlying file descriptor.
- Change sync routines to take a flag argument, recno
- uses this to sync out the underlying btree.
-
-1.3 -> 1.4 10 May 1993
- recno: Delete the R_CURSORLOG flag from the recno interface.
- Zero-length record fix for non-mmap reads.
- Try and make SIZE_T_MAX test in open portable.
-
-1.2 -> 1.3 01 May 1993
- btree: Ignore user byte-order setting when reading already
- existing database. Fixes to byte-order conversions.
-
-1.1 -> 1.2 15 Apr 1993
- No bug fixes, only compatibility hacks.
diff --git a/lib/libc/db/db/Makefile.inc b/lib/libc/db/db/Makefile.inc
deleted file mode 100644
index a10f0fc..0000000
--- a/lib/libc/db/db/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id$
-
-.PATH: ${.CURDIR}/../libc/db/db
-
-SRCS+= db.c
diff --git a/lib/libc/db/db/db.c b/lib/libc/db/db/db.c
deleted file mode 100644
index a18f056..0000000
--- a/lib/libc/db/db/db.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)db.c 8.4 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stddef.h>
-#include <stdio.h>
-
-#include <db.h>
-
-DB *
-dbopen(fname, flags, mode, type, openinfo)
- const char *fname;
- int flags, mode;
- DBTYPE type;
- const void *openinfo;
-{
-
-#define DB_FLAGS (DB_LOCK | DB_SHMEM | DB_TXN)
-#define USE_OPEN_FLAGS \
- (O_CREAT | O_EXCL | O_EXLOCK | O_NONBLOCK | O_RDONLY | \
- O_RDWR | O_SHLOCK | O_TRUNC)
-
- if ((flags & ~(USE_OPEN_FLAGS | DB_FLAGS)) == 0)
- switch (type) {
- case DB_BTREE:
- return (__bt_open(fname, flags & USE_OPEN_FLAGS,
- mode, openinfo, flags & DB_FLAGS));
- case DB_HASH:
- return (__hash_open(fname, flags & USE_OPEN_FLAGS,
- mode, openinfo, flags & DB_FLAGS));
- case DB_RECNO:
- return (__rec_open(fname, flags & USE_OPEN_FLAGS,
- mode, openinfo, flags & DB_FLAGS));
- }
- errno = EINVAL;
- return (NULL);
-}
-
-static int
-__dberr()
-{
- return (RET_ERROR);
-}
-
-/*
- * __DBPANIC -- Stop.
- *
- * Parameters:
- * dbp: pointer to the DB structure.
- */
-void
-__dbpanic(dbp)
- DB *dbp;
-{
- /* The only thing that can succeed is a close. */
- dbp->del = (int (*)())__dberr;
- dbp->fd = (int (*)())__dberr;
- dbp->get = (int (*)())__dberr;
- dbp->put = (int (*)())__dberr;
- dbp->seq = (int (*)())__dberr;
- dbp->sync = (int (*)())__dberr;
-}
diff --git a/lib/libc/db/docs/hash.usenix.ps b/lib/libc/db/docs/hash.usenix.ps
deleted file mode 100644
index c884778..0000000
--- a/lib/libc/db/docs/hash.usenix.ps
+++ /dev/null
@@ -1,12209 +0,0 @@
-%!PS-Adobe-1.0
-%%Creator: utopia:margo (& Seltzer,608-13E,8072,)
-%%Title: stdin (ditroff)
-%%CreationDate: Tue Dec 11 15:06:45 1990
-%%EndComments
-% @(#)psdit.pro 1.3 4/15/88
-% lib/psdit.pro -- prolog for psdit (ditroff) files
-% Copyright (c) 1984, 1985 Adobe Systems Incorporated. All Rights Reserved.
-% last edit: shore Sat Nov 23 20:28:03 1985
-% RCSID: $Header: psdit.pro,v 2.1 85/11/24 12:19:43 shore Rel $
-
-% Changed by Edward Wang (edward@ucbarpa.berkeley.edu) to handle graphics,
-% 17 Feb, 87.
-
-/$DITroff 140 dict def $DITroff begin
-/fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def
-/xi{0 72 11 mul translate 72 resolution div dup neg scale 0 0 moveto
- /fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def F
- /pagesave save def}def
-/PB{save /psv exch def currentpoint translate
- resolution 72 div dup neg scale 0 0 moveto}def
-/PE{psv restore}def
-/arctoobig 90 def /arctoosmall .05 def
-/m1 matrix def /m2 matrix def /m3 matrix def /oldmat matrix def
-/tan{dup sin exch cos div}def
-/point{resolution 72 div mul}def
-/dround {transform round exch round exch itransform}def
-/xT{/devname exch def}def
-/xr{/mh exch def /my exch def /resolution exch def}def
-/xp{}def
-/xs{docsave restore end}def
-/xt{}def
-/xf{/fontname exch def /slotno exch def fontnames slotno get fontname eq not
- {fonts slotno fontname findfont put fontnames slotno fontname put}if}def
-/xH{/fontheight exch def F}def
-/xS{/fontslant exch def F}def
-/s{/fontsize exch def /fontheight fontsize def F}def
-/f{/fontnum exch def F}def
-/F{fontheight 0 le{/fontheight fontsize def}if
- fonts fontnum get fontsize point 0 0 fontheight point neg 0 0 m1 astore
- fontslant 0 ne{1 0 fontslant tan 1 0 0 m2 astore m3 concatmatrix}if
- makefont setfont .04 fontsize point mul 0 dround pop setlinewidth}def
-/X{exch currentpoint exch pop moveto show}def
-/N{3 1 roll moveto show}def
-/Y{exch currentpoint pop exch moveto show}def
-/S{show}def
-/ditpush{}def/ditpop{}def
-/AX{3 -1 roll currentpoint exch pop moveto 0 exch ashow}def
-/AN{4 2 roll moveto 0 exch ashow}def
-/AY{3 -1 roll currentpoint pop exch moveto 0 exch ashow}def
-/AS{0 exch ashow}def
-/MX{currentpoint exch pop moveto}def
-/MY{currentpoint pop exch moveto}def
-/MXY{moveto}def
-/cb{pop}def % action on unknown char -- nothing for now
-/n{}def/w{}def
-/p{pop showpage pagesave restore /pagesave save def}def
-/Dt{/Dlinewidth exch def}def 1 Dt
-/Ds{/Ddash exch def}def -1 Ds
-/Di{/Dstipple exch def}def 1 Di
-/Dsetlinewidth{2 Dlinewidth mul setlinewidth}def
-/Dsetdash{Ddash 4 eq{[8 12]}{Ddash 16 eq{[32 36]}
- {Ddash 20 eq{[32 12 8 12]}{[]}ifelse}ifelse}ifelse 0 setdash}def
-/Dstroke{gsave Dsetlinewidth Dsetdash 1 setlinecap stroke grestore
- currentpoint newpath moveto}def
-/Dl{rlineto Dstroke}def
-/arcellipse{/diamv exch def /diamh exch def oldmat currentmatrix pop
- currentpoint translate 1 diamv diamh div scale /rad diamh 2 div def
- currentpoint exch rad add exch rad -180 180 arc oldmat setmatrix}def
-/Dc{dup arcellipse Dstroke}def
-/De{arcellipse Dstroke}def
-/Da{/endv exch def /endh exch def /centerv exch def /centerh exch def
- /cradius centerv centerv mul centerh centerh mul add sqrt def
- /eradius endv endv mul endh endh mul add sqrt def
- /endang endv endh atan def
- /startang centerv neg centerh neg atan def
- /sweep startang endang sub dup 0 lt{360 add}if def
- sweep arctoobig gt
- {/midang startang sweep 2 div sub def /midrad cradius eradius add 2 div def
- /midh midang cos midrad mul def /midv midang sin midrad mul def
- midh neg midv neg endh endv centerh centerv midh midv Da
- Da}
- {sweep arctoosmall ge
- {/controldelt 1 sweep 2 div cos sub 3 sweep 2 div sin mul div 4 mul def
- centerv neg controldelt mul centerh controldelt mul
- endv neg controldelt mul centerh add endh add
- endh controldelt mul centerv add endv add
- centerh endh add centerv endv add rcurveto Dstroke}
- {centerh endh add centerv endv add rlineto Dstroke}
- ifelse}
- ifelse}def
-/Dpatterns[
-[%cf[widthbits]
-[8<0000000000000010>]
-[8<0411040040114000>]
-[8<0204081020408001>]
-[8<0000103810000000>]
-[8<6699996666999966>]
-[8<0000800100001008>]
-[8<81c36666c3810000>]
-[8<0f0e0c0800000000>]
-[8<0000000000000010>]
-[8<0411040040114000>]
-[8<0204081020408001>]
-[8<0000001038100000>]
-[8<6699996666999966>]
-[8<0000800100001008>]
-[8<81c36666c3810000>]
-[8<0f0e0c0800000000>]
-[8<0042660000246600>]
-[8<0000990000990000>]
-[8<0804020180402010>]
-[8<2418814242811824>]
-[8<6699996666999966>]
-[8<8000000008000000>]
-[8<00001c3e363e1c00>]
-[8<0000000000000000>]
-[32<00000040000000c00000004000000040000000e0000000000000000000000000>]
-[32<00000000000060000000900000002000000040000000f0000000000000000000>]
-[32<000000000000000000e0000000100000006000000010000000e0000000000000>]
-[32<00000000000000002000000060000000a0000000f00000002000000000000000>]
-[32<0000000e0000000000000000000000000000000f000000080000000e00000001>]
-[32<0000090000000600000000000000000000000000000007000000080000000e00>]
-[32<00010000000200000004000000040000000000000000000000000000000f0000>]
-[32<0900000006000000090000000600000000000000000000000000000006000000>]]
-[%ug
-[8<0000020000000000>]
-[8<0000020000002000>]
-[8<0004020000002000>]
-[8<0004020000402000>]
-[8<0004060000402000>]
-[8<0004060000406000>]
-[8<0006060000406000>]
-[8<0006060000606000>]
-[8<00060e0000606000>]
-[8<00060e000060e000>]
-[8<00070e000060e000>]
-[8<00070e000070e000>]
-[8<00070e020070e000>]
-[8<00070e020070e020>]
-[8<04070e020070e020>]
-[8<04070e024070e020>]
-[8<04070e064070e020>]
-[8<04070e064070e060>]
-[8<06070e064070e060>]
-[8<06070e066070e060>]
-[8<06070f066070e060>]
-[8<06070f066070f060>]
-[8<060f0f066070f060>]
-[8<060f0f0660f0f060>]
-[8<060f0f0760f0f060>]
-[8<060f0f0760f0f070>]
-[8<0e0f0f0760f0f070>]
-[8<0e0f0f07e0f0f070>]
-[8<0e0f0f0fe0f0f070>]
-[8<0e0f0f0fe0f0f0f0>]
-[8<0f0f0f0fe0f0f0f0>]
-[8<0f0f0f0ff0f0f0f0>]
-[8<1f0f0f0ff0f0f0f0>]
-[8<1f0f0f0ff1f0f0f0>]
-[8<1f0f0f8ff1f0f0f0>]
-[8<1f0f0f8ff1f0f0f8>]
-[8<9f0f0f8ff1f0f0f8>]
-[8<9f0f0f8ff9f0f0f8>]
-[8<9f0f0f9ff9f0f0f8>]
-[8<9f0f0f9ff9f0f0f9>]
-[8<9f8f0f9ff9f0f0f9>]
-[8<9f8f0f9ff9f8f0f9>]
-[8<9f8f1f9ff9f8f0f9>]
-[8<9f8f1f9ff9f8f1f9>]
-[8<bf8f1f9ff9f8f1f9>]
-[8<bf8f1f9ffbf8f1f9>]
-[8<bf8f1fdffbf8f1f9>]
-[8<bf8f1fdffbf8f1fd>]
-[8<ff8f1fdffbf8f1fd>]
-[8<ff8f1fdffff8f1fd>]
-[8<ff8f1ffffff8f1fd>]
-[8<ff8f1ffffff8f1ff>]
-[8<ff9f1ffffff8f1ff>]
-[8<ff9f1ffffff9f1ff>]
-[8<ff9f9ffffff9f1ff>]
-[8<ff9f9ffffff9f9ff>]
-[8<ffbf9ffffff9f9ff>]
-[8<ffbf9ffffffbf9ff>]
-[8<ffbfdffffffbf9ff>]
-[8<ffbfdffffffbfdff>]
-[8<ffffdffffffbfdff>]
-[8<ffffdffffffffdff>]
-[8<fffffffffffffdff>]
-[8<ffffffffffffffff>]]
-[%mg
-[8<8000000000000000>]
-[8<0822080080228000>]
-[8<0204081020408001>]
-[8<40e0400000000000>]
-[8<66999966>]
-[8<8001000010080000>]
-[8<81c36666c3810000>]
-[8<f0e0c08000000000>]
-[16<07c00f801f003e007c00f800f001e003c007800f001f003e007c00f801f003e0>]
-[16<1f000f8007c003e001f000f8007c003e001f800fc007e003f001f8007c003e00>]
-[8<c3c300000000c3c3>]
-[16<0040008001000200040008001000200040008000000100020004000800100020>]
-[16<0040002000100008000400020001800040002000100008000400020001000080>]
-[16<1fc03fe07df0f8f8f07de03fc01f800fc01fe03ff07df8f87df03fe01fc00f80>]
-[8<80>]
-[8<8040201000000000>]
-[8<84cc000048cc0000>]
-[8<9900009900000000>]
-[8<08040201804020100800020180002010>]
-[8<2418814242811824>]
-[8<66999966>]
-[8<8000000008000000>]
-[8<70f8d8f870000000>]
-[8<0814224180402010>]
-[8<aa00440a11a04400>]
-[8<018245aa45820100>]
-[8<221c224180808041>]
-[8<88000000>]
-[8<0855800080550800>]
-[8<2844004482440044>]
-[8<0810204080412214>]
-[8<00>]]]def
-/Dfill{
- transform /maxy exch def /maxx exch def
- transform /miny exch def /minx exch def
- minx maxx gt{/minx maxx /maxx minx def def}if
- miny maxy gt{/miny maxy /maxy miny def def}if
- Dpatterns Dstipple 1 sub get exch 1 sub get
- aload pop /stip exch def /stipw exch def /stiph 128 def
- /imatrix[stipw 0 0 stiph 0 0]def
- /tmatrix[stipw 0 0 stiph 0 0]def
- /minx minx cvi stiph idiv stiph mul def
- /miny miny cvi stipw idiv stipw mul def
- gsave eoclip 0 setgray
- miny stiph maxy{
- tmatrix exch 5 exch put
- minx stipw maxx{
- tmatrix exch 4 exch put tmatrix setmatrix
- stipw stiph true imatrix {stip} imagemask
- }for
- }for
- grestore
-}def
-/Dp{Dfill Dstroke}def
-/DP{Dfill currentpoint newpath moveto}def
-end
-
-/ditstart{$DITroff begin
- /nfonts 60 def % NFONTS makedev/ditroff dependent!
- /fonts[nfonts{0}repeat]def
- /fontnames[nfonts{()}repeat]def
-/docsave save def
-}def
-
-% character outcalls
-/oc{
- /pswid exch def /cc exch def /name exch def
- /ditwid pswid fontsize mul resolution mul 72000 div def
- /ditsiz fontsize resolution mul 72 div def
- ocprocs name known{ocprocs name get exec}{name cb}ifelse
-}def
-/fractm [.65 0 0 .6 0 0] def
-/fraction{
- /fden exch def /fnum exch def gsave /cf currentfont def
- cf fractm makefont setfont 0 .3 dm 2 copy neg rmoveto
- fnum show rmoveto currentfont cf setfont(\244)show setfont fden show
- grestore ditwid 0 rmoveto
-}def
-/oce{grestore ditwid 0 rmoveto}def
-/dm{ditsiz mul}def
-/ocprocs 50 dict def ocprocs begin
-(14){(1)(4)fraction}def
-(12){(1)(2)fraction}def
-(34){(3)(4)fraction}def
-(13){(1)(3)fraction}def
-(23){(2)(3)fraction}def
-(18){(1)(8)fraction}def
-(38){(3)(8)fraction}def
-(58){(5)(8)fraction}def
-(78){(7)(8)fraction}def
-(sr){gsave 0 .06 dm rmoveto(\326)show oce}def
-(is){gsave 0 .15 dm rmoveto(\362)show oce}def
-(->){gsave 0 .02 dm rmoveto(\256)show oce}def
-(<-){gsave 0 .02 dm rmoveto(\254)show oce}def
-(==){gsave 0 .05 dm rmoveto(\272)show oce}def
-(uc){gsave currentpoint 400 .009 dm mul add translate
- 8 -8 scale ucseal oce}def
-end
-
-% an attempt at a PostScript FONT to implement ditroff special chars
-% this will enable us to
-% cache the little buggers
-% generate faster, more compact PS out of psdit
-% confuse everyone (including myself)!
-50 dict dup begin
-/FontType 3 def
-/FontName /DIThacks def
-/FontMatrix [.001 0 0 .001 0 0] def
-/FontBBox [-260 -260 900 900] def% a lie but ...
-/Encoding 256 array def
-0 1 255{Encoding exch /.notdef put}for
-Encoding
- dup 8#040/space put %space
- dup 8#110/rc put %right ceil
- dup 8#111/lt put %left top curl
- dup 8#112/bv put %bold vert
- dup 8#113/lk put %left mid curl
- dup 8#114/lb put %left bot curl
- dup 8#115/rt put %right top curl
- dup 8#116/rk put %right mid curl
- dup 8#117/rb put %right bot curl
- dup 8#120/rf put %right floor
- dup 8#121/lf put %left floor
- dup 8#122/lc put %left ceil
- dup 8#140/sq put %square
- dup 8#141/bx put %box
- dup 8#142/ci put %circle
- dup 8#143/br put %box rule
- dup 8#144/rn put %root extender
- dup 8#145/vr put %vertical rule
- dup 8#146/ob put %outline bullet
- dup 8#147/bu put %bullet
- dup 8#150/ru put %rule
- dup 8#151/ul put %underline
- pop
-/DITfd 100 dict def
-/BuildChar{0 begin
- /cc exch def /fd exch def
- /charname fd /Encoding get cc get def
- /charwid fd /Metrics get charname get def
- /charproc fd /CharProcs get charname get def
- charwid 0 fd /FontBBox get aload pop setcachedevice
- 2 setlinejoin 40 setlinewidth
- newpath 0 0 moveto gsave charproc grestore
- end}def
-/BuildChar load 0 DITfd put
-/CharProcs 50 dict def
-CharProcs begin
-/space{}def
-/.notdef{}def
-/ru{500 0 rls}def
-/rn{0 840 moveto 500 0 rls}def
-/vr{0 800 moveto 0 -770 rls}def
-/bv{0 800 moveto 0 -1000 rls}def
-/br{0 840 moveto 0 -1000 rls}def
-/ul{0 -140 moveto 500 0 rls}def
-/ob{200 250 rmoveto currentpoint newpath 200 0 360 arc closepath stroke}def
-/bu{200 250 rmoveto currentpoint newpath 200 0 360 arc closepath fill}def
-/sq{80 0 rmoveto currentpoint dround newpath moveto
- 640 0 rlineto 0 640 rlineto -640 0 rlineto closepath stroke}def
-/bx{80 0 rmoveto currentpoint dround newpath moveto
- 640 0 rlineto 0 640 rlineto -640 0 rlineto closepath fill}def
-/ci{500 360 rmoveto currentpoint newpath 333 0 360 arc
- 50 setlinewidth stroke}def
-
-/lt{0 -200 moveto 0 550 rlineto currx 800 2cx s4 add exch s4 a4p stroke}def
-/lb{0 800 moveto 0 -550 rlineto currx -200 2cx s4 add exch s4 a4p stroke}def
-/rt{0 -200 moveto 0 550 rlineto currx 800 2cx s4 sub exch s4 a4p stroke}def
-/rb{0 800 moveto 0 -500 rlineto currx -200 2cx s4 sub exch s4 a4p stroke}def
-/lk{0 800 moveto 0 300 -300 300 s4 arcto pop pop 1000 sub
- 0 300 4 2 roll s4 a4p 0 -200 lineto stroke}def
-/rk{0 800 moveto 0 300 s2 300 s4 arcto pop pop 1000 sub
- 0 300 4 2 roll s4 a4p 0 -200 lineto stroke}def
-/lf{0 800 moveto 0 -1000 rlineto s4 0 rls}def
-/rf{0 800 moveto 0 -1000 rlineto s4 neg 0 rls}def
-/lc{0 -200 moveto 0 1000 rlineto s4 0 rls}def
-/rc{0 -200 moveto 0 1000 rlineto s4 neg 0 rls}def
-end
-
-/Metrics 50 dict def Metrics begin
-/.notdef 0 def
-/space 500 def
-/ru 500 def
-/br 0 def
-/lt 416 def
-/lb 416 def
-/rt 416 def
-/rb 416 def
-/lk 416 def
-/rk 416 def
-/rc 416 def
-/lc 416 def
-/rf 416 def
-/lf 416 def
-/bv 416 def
-/ob 350 def
-/bu 350 def
-/ci 750 def
-/bx 750 def
-/sq 750 def
-/rn 500 def
-/ul 500 def
-/vr 0 def
-end
-
-DITfd begin
-/s2 500 def /s4 250 def /s3 333 def
-/a4p{arcto pop pop pop pop}def
-/2cx{2 copy exch}def
-/rls{rlineto stroke}def
-/currx{currentpoint pop}def
-/dround{transform round exch round exch itransform} def
-end
-end
-/DIThacks exch definefont pop
-ditstart
-(psc)xT
-576 1 1 xr
-1(Times-Roman)xf 1 f
-2(Times-Italic)xf 2 f
-3(Times-Bold)xf 3 f
-4(Times-BoldItalic)xf 4 f
-5(Helvetica)xf 5 f
-6(Helvetica-Bold)xf 6 f
-7(Courier)xf 7 f
-8(Courier-Bold)xf 8 f
-9(Symbol)xf 9 f
-10(DIThacks)xf 10 f
-10 s
-1 f
-xi
-%%EndProlog
-
-%%Page: 1 1
-10 s 10 xH 0 xS 1 f
-3 f
-22 s
-1249 626(A)N
-1420(N)X
-1547(ew)X
-1796(H)X
-1933(ashing)X
-2467(P)X
-2574(ackage)X
-3136(for)X
-3405(U)X
-3532(N)X
-3659(IX)X
-2 f
-20 s
-3855 562(1)N
-1 f
-12 s
-1607 779(Margo)N
-1887(Seltzer)X
-9 f
-2179(-)X
-1 f
-2256(University)X
-2686(of)X
-2790(California,)X
-3229(Berkeley)X
-2015 875(Ozan)N
-2242(Yigit)X
-9 f
-2464(-)X
-1 f
-2541(York)X
-2762(University)X
-3 f
-2331 1086(ABSTRACT)N
-1 f
-10 s
-1152 1222(UNIX)N
-1385(support)X
-1657(of)X
-1756(disk)X
-1921(oriented)X
-2216(hashing)X
-2497(was)X
-2654(originally)X
-2997(provided)X
-3314(by)X
-2 f
-3426(dbm)X
-1 f
-3595([ATT79])X
-3916(and)X
-1152 1310(subsequently)N
-1595(improved)X
-1927(upon)X
-2112(in)X
-2 f
-2199(ndbm)X
-1 f
-2402([BSD86].)X
-2735(In)X
-2826(AT&T)X
-3068(System)X
-3327(V,)X
-3429(in-memory)X
-3809(hashed)X
-1152 1398(storage)N
-1420(and)X
-1572(access)X
-1814(support)X
-2090(was)X
-2251(added)X
-2479(in)X
-2577(the)X
-2 f
-2711(hsearch)X
-1 f
-3000(library)X
-3249(routines)X
-3542([ATT85].)X
-3907(The)X
-1152 1486(result)N
-1367(is)X
-1457(a)X
-1530(system)X
-1789(with)X
-1968(two)X
-2125(incompatible)X
-2580(hashing)X
-2865(schemes,)X
-3193(each)X
-3377(with)X
-3555(its)X
-3666(own)X
-3840(set)X
-3965(of)X
-1152 1574(shortcomings.)N
-1152 1688(This)N
-1316(paper)X
-1517(presents)X
-1802(the)X
-1922(design)X
-2152(and)X
-2289(performance)X
-2717(characteristics)X
-3198(of)X
-3286(a)X
-3343(new)X
-3498(hashing)X
-3768(package)X
-1152 1776(providing)N
-1483(a)X
-1539(superset)X
-1822(of)X
-1909(the)X
-2027(functionality)X
-2456(provided)X
-2761(by)X
-2 f
-2861(dbm)X
-1 f
-3019(and)X
-2 f
-3155(hsearch)X
-1 f
-3409(.)X
-3469(The)X
-3614(new)X
-3768(package)X
-1152 1864(uses)N
-1322(linear)X
-1537(hashing)X
-1818(to)X
-1912(provide)X
-2189(ef\256cient)X
-2484(support)X
-2755(of)X
-2853(both)X
-3026(memory)X
-3324(based)X
-3538(and)X
-3685(disk)X
-3849(based)X
-1152 1952(hash)N
-1319(tables)X
-1526(with)X
-1688(performance)X
-2115(superior)X
-2398(to)X
-2480(both)X
-2 f
-2642(dbm)X
-1 f
-2800(and)X
-2 f
-2936(hsearch)X
-1 f
-3210(under)X
-3413(most)X
-3588(conditions.)X
-3 f
-1380 2128(Introduction)N
-1 f
-892 2260(Current)N
-1196(UNIX)X
-1456(systems)X
-1768(offer)X
-1984(two)X
-2163(forms)X
-2409(of)X
-720 2348(hashed)N
-973(data)X
-1137(access.)X
-2 f
-1413(Dbm)X
-1 f
-1599(and)X
-1745(its)X
-1850(derivatives)X
-2231(provide)X
-720 2436(keyed)N
-939(access)X
-1171(to)X
-1259(disk)X
-1418(resident)X
-1698(data)X
-1858(while)X
-2 f
-2062(hsearch)X
-1 f
-2342(pro-)X
-720 2524(vides)N
-929(access)X
-1175(for)X
-1309(memory)X
-1616(resident)X
-1910(data.)X
-2124(These)X
-2356(two)X
-720 2612(access)N
-979(methods)X
-1302(are)X
-1453(incompatible)X
-1923(in)X
-2037(that)X
-2209(memory)X
-720 2700(resident)N
-1011(hash)X
-1195(tables)X
-1419(may)X
-1593(not)X
-1731(be)X
-1843(stored)X
-2075(on)X
-2191(disk)X
-2360(and)X
-720 2788(disk)N
-884(resident)X
-1169(tables)X
-1387(cannot)X
-1632(be)X
-1739(read)X
-1909(into)X
-2063(memory)X
-2360(and)X
-720 2876(accessed)N
-1022(using)X
-1215(the)X
-1333(in-memory)X
-1709(routines.)X
-2 f
-892 2990(Dbm)N
-1 f
-1091(has)X
-1241(several)X
-1512(shortcomings.)X
-2026(Since)X
-2247(data)X
-2423(is)X
-720 3078(assumed)N
-1032(to)X
-1130(be)X
-1242(disk)X
-1411(resident,)X
-1721(each)X
-1905(access)X
-2146(requires)X
-2440(a)X
-720 3166(system)N
-963(call,)X
-1120(and)X
-1257(almost)X
-1491(certainly,)X
-1813(a)X
-1869(disk)X
-2022(operation.)X
-2365(For)X
-720 3254(extremely)N
-1072(large)X
-1264(databases,)X
-1623(where)X
-1851(caching)X
-2131(is)X
-2214(unlikely)X
-720 3342(to)N
-810(be)X
-914(effective,)X
-1244(this)X
-1386(is)X
-1466(acceptable,)X
-1853(however,)X
-2177(when)X
-2378(the)X
-720 3430(database)N
-1022(is)X
-1100(small)X
-1298(\(i.e.)X
-1447(the)X
-1569(password)X
-1896(\256le\),)X
-2069(performance)X
-720 3518(improvements)N
-1204(can)X
-1342(be)X
-1443(obtained)X
-1744(through)X
-2018(caching)X
-2293(pages)X
-720 3606(of)N
-818(the)X
-947(database)X
-1255(in)X
-1348(memory.)X
-1685(In)X
-1782(addition,)X
-2 f
-2094(dbm)X
-1 f
-2262(cannot)X
-720 3694(store)N
-902(data)X
-1062(items)X
-1261(whose)X
-1492(total)X
-1660(key)X
-1802(and)X
-1943(data)X
-2102(size)X
-2252(exceed)X
-720 3782(the)N
-850(page)X
-1034(size)X
-1191(of)X
-1290(the)X
-1420(hash)X
-1599(table.)X
-1827(Similarly,)X
-2176(if)X
-2257(two)X
-2409(or)X
-720 3870(more)N
-907(keys)X
-1076(produce)X
-1357(the)X
-1477(same)X
-1664(hash)X
-1833(value)X
-2029(and)X
-2166(their)X
-2334(total)X
-720 3958(size)N
-876(exceeds)X
-1162(the)X
-1291(page)X
-1474(size,)X
-1650(the)X
-1779(table)X
-1966(cannot)X
-2210(store)X
-2396(all)X
-720 4046(the)N
-838(colliding)X
-1142(keys.)X
-892 4160(The)N
-1050(in-memory)X
-2 f
-1439(hsearch)X
-1 f
-1725(routines)X
-2015(have)X
-2199(different)X
-720 4248(shortcomings.)N
-1219(First,)X
-1413(the)X
-1539(notion)X
-1771(of)X
-1865(a)X
-1928(single)X
-2146(hash)X
-2320(table)X
-720 4336(is)N
-807(embedded)X
-1171(in)X
-1266(the)X
-1397(interface,)X
-1732(preventing)X
-2108(an)X
-2217(applica-)X
-720 4424(tion)N
-902(from)X
-1116(accessing)X
-1482(multiple)X
-1806(tables)X
-2050(concurrently.)X
-720 4512(Secondly,)N
-1063(the)X
-1186(routine)X
-1438(to)X
-1525(create)X
-1743(a)X
-1804(hash)X
-1976(table)X
-2157(requires)X
-2440(a)X
-720 4600(parameter)N
-1066(which)X
-1286(declares)X
-1573(the)X
-1694(size)X
-1842(of)X
-1932(the)X
-2053(hash)X
-2223(table.)X
-2422(If)X
-720 4688(this)N
-856(size)X
-1001(is)X
-1074(set)X
-1183(too)X
-1305(low,)X
-1465(performance)X
-1892(degradation)X
-2291(or)X
-2378(the)X
-720 4776(inability)N
-1008(to)X
-1092(add)X
-1230(items)X
-1425(to)X
-1509(the)X
-1628(table)X
-1805(may)X
-1964(result.)X
-2223(In)X
-2311(addi-)X
-720 4864(tion,)N
-2 f
-910(hsearch)X
-1 f
-1210(requires)X
-1515(that)X
-1681(the)X
-1825(application)X
-2226(allocate)X
-720 4952(memory)N
-1037(for)X
-1181(the)X
-1329(key)X
-1495(and)X
-1661(data)X
-1845(items.)X
-2108(Lastly,)X
-2378(the)X
-2 f
-720 5040(hsearch)N
-1 f
-1013(routines)X
-1310(provide)X
-1594(no)X
-1713(interface)X
-2034(to)X
-2135(store)X
-2329(hash)X
-720 5128(tables)N
-927(on)X
-1027(disk.)X
-16 s
-720 5593 MXY
-864 0 Dl
-2 f
-8 s
-760 5648(1)N
-1 f
-9 s
-5673(UNIX)Y
-990(is)X
-1056(a)X
-1106(registered)X
-1408(trademark)X
-1718(of)X
-1796(AT&T.)X
-10 s
-2878 2128(The)N
-3032(goal)X
-3199(of)X
-3295(our)X
-3431(work)X
-3625(was)X
-3779(to)X
-3870(design)X
-4108(and)X
-4253(imple-)X
-2706 2216(ment)N
-2900(a)X
-2970(new)X
-3138(package)X
-3436(that)X
-3590(provides)X
-3899(a)X
-3968(superset)X
-4264(of)X
-4364(the)X
-2706 2304(functionality)N
-3144(of)X
-3240(both)X
-2 f
-3411(dbm)X
-1 f
-3578(and)X
-2 f
-3723(hsearch)X
-1 f
-3977(.)X
-4045(The)X
-4198(package)X
-2706 2392(had)N
-2871(to)X
-2982(overcome)X
-3348(the)X
-3495(interface)X
-3826(shortcomings)X
-4306(cited)X
-2706 2480(above)N
-2930(and)X
-3078(its)X
-3185(implementation)X
-3719(had)X
-3867(to)X
-3961(provide)X
-4238(perfor-)X
-2706 2568(mance)N
-2942(equal)X
-3142(or)X
-3235(superior)X
-3524(to)X
-3612(that)X
-3758(of)X
-3851(the)X
-3975(existing)X
-4253(imple-)X
-2706 2656(mentations.)N
-3152(In)X
-3274(order)X
-3498(to)X
-3614(provide)X
-3913(a)X
-4003(compact)X
-4329(disk)X
-2706 2744(representation,)N
-3224(graceful)X
-3531(table)X
-3729(growth,)X
-4018(and)X
-4176(expected)X
-2706 2832(constant)N
-3033(time)X
-3234(performance,)X
-3720(we)X
-3873(selected)X
-4191(Litwin's)X
-2706 2920(linear)N
-2923(hashing)X
-3206(algorithm)X
-3551([LAR88,)X
-3872(LIT80].)X
-4178(We)X
-4324(then)X
-2706 3008(enhanced)N
-3037(the)X
-3161(algorithm)X
-3498(to)X
-3586(handle)X
-3826(page)X
-4004(over\257ows)X
-4346(and)X
-2706 3096(large)N
-2900(key)X
-3049(handling)X
-3362(with)X
-3537(a)X
-3606(single)X
-3830(mechanism,)X
-4248(named)X
-2706 3184(buddy-in-waiting.)N
-3 f
-2975 3338(Existing)N
-3274(UNIX)X
-3499(Hashing)X
-3802(Techniques)X
-1 f
-2878 3470(Over)N
-3076(the)X
-3210(last)X
-3357(decade,)X
-3637(several)X
-3901(dynamic)X
-4213(hashing)X
-2706 3558(schemes)N
-3000(have)X
-3174(been)X
-3348(developed)X
-3700(for)X
-3816(the)X
-3936(UNIX)X
-4159(timeshar-)X
-2706 3646(ing)N
-2856(system,)X
-3146(starting)X
-3433(with)X
-3622(the)X
-3767(inclusion)X
-4107(of)X
-2 f
-4221(dbm)X
-1 f
-4359(,)X
-4426(a)X
-2706 3734(minimal)N
-3008(database)X
-3321(library)X
-3571(written)X
-3834(by)X
-3950(Ken)X
-4120(Thompson)X
-2706 3822([THOM90],)N
-3141(in)X
-3248(the)X
-3391(Seventh)X
-3694(Edition)X
-3974(UNIX)X
-4220(system.)X
-2706 3910(Since)N
-2916(then,)X
-3106(an)X
-3214(extended)X
-3536(version)X
-3804(of)X
-3903(the)X
-4032(same)X
-4228(library,)X
-2 f
-2706 3998(ndbm)N
-1 f
-2884(,)X
-2933(and)X
-3078(a)X
-3142(public-domain)X
-3637(clone)X
-3839(of)X
-3934(the)X
-4060(latter,)X
-2 f
-4273(sdbm)X
-1 f
-4442(,)X
-2706 4086(have)N
-2902(been)X
-3098(developed.)X
-3491(Another)X
-3797 0.1645(interface-compatible)AX
-2706 4174(library)N
-2 f
-2950(gdbm)X
-1 f
-3128(,)X
-3178(was)X
-3333(recently)X
-3622(made)X
-3826(available)X
-4145(as)X
-4241(part)X
-4395(of)X
-2706 4262(the)N
-2829(Free)X
-2997(Software)X
-3312(Foundation's)X
-3759(\(FSF\))X
-3970(software)X
-4271(distri-)X
-2706 4350(bution.)N
-2878 4464(All)N
-3017(of)X
-3121(these)X
-3323(implementations)X
-3893(are)X
-4029(based)X
-4248(on)X
-4364(the)X
-2706 4552(idea)N
-2871(of)X
-2969(revealing)X
-3299(just)X
-3445(enough)X
-3711(bits)X
-3856(of)X
-3953(a)X
-4019(hash)X
-4196(value)X
-4400(to)X
-2706 4640(locate)N
-2920(a)X
-2978(page)X
-3151(in)X
-3234(a)X
-3291(single)X
-3503(access.)X
-3770(While)X
-2 f
-3987(dbm/ndbm)X
-1 f
-4346(and)X
-2 f
-2706 4728(sdbm)N
-1 f
-2908(map)X
-3079(the)X
-3210(hash)X
-3390(value)X
-3597(directly)X
-3874(to)X
-3968(a)X
-4036(disk)X
-4201(address,)X
-2 f
-2706 4816(gdbm)N
-1 f
-2921(uses)X
-3096(the)X
-3231(hash)X
-3414(value)X
-3624(to)X
-3722(index)X
-3936(into)X
-4096(a)X
-2 f
-4168(directory)X
-1 f
-2706 4904([ENB88])N
-3020(containing)X
-3378(disk)X
-3531(addresses.)X
-2878 5018(The)N
-2 f
-3033(hsearch)X
-1 f
-3317(routines)X
-3605(in)X
-3697(System)X
-3962(V)X
-4049(are)X
-4177(designed)X
-2706 5106(to)N
-2804(provide)X
-3085(memory-resident)X
-3669(hash)X
-3852(tables.)X
-4115(Since)X
-4328(data)X
-2706 5194(access)N
-2948(does)X
-3131(not)X
-3269(require)X
-3533(disk)X
-3702(access,)X
-3964(simple)X
-4213(hashing)X
-2706 5282(schemes)N
-3010(which)X
-3238(may)X
-3408(require)X
-3667(multiple)X
-3964(probes)X
-4209(into)X
-4364(the)X
-2706 5370(table)N
-2889(are)X
-3015(used.)X
-3209(A)X
-3294(more)X
-3486(interesting)X
-3851(version)X
-4114(of)X
-2 f
-4208(hsearch)X
-1 f
-2706 5458(is)N
-2784(a)X
-2845(public)X
-3070(domain)X
-3335(library,)X
-2 f
-3594(dynahash)X
-1 f
-3901(,)X
-3945(that)X
-4089(implements)X
-2706 5546(Larson's)N
-3036(in-memory)X
-3440(adaptation)X
-3822([LAR88])X
-4164(of)X
-4279(linear)X
-2706 5634(hashing)N
-2975([LIT80].)X
-3 f
-720 5960(USENIX)N
-9 f
-1042(-)X
-3 f
-1106(Winter)X
-1371('91)X
-9 f
-1498(-)X
-3 f
-1562(Dallas,)X
-1815(TX)X
-1 f
-4424(1)X
-
-2 p
-%%Page: 2 2
-10 s 10 xH 0 xS 1 f
-3 f
-432 258(A)N
-510(New)X
-682(Hashing)X
-985(Package)X
-1290(for)X
-1413(UNIX)X
-3663(Seltzer)X
-3920(&)X
-4007(Yigit)X
-2 f
-1074 538(dbm)N
-1 f
-1232(and)X
-2 f
-1368(ndbm)X
-1 f
-604 670(The)N
-2 f
-760(dbm)X
-1 f
-928(and)X
-2 f
-1074(ndbm)X
-1 f
-1282(library)X
-1526(implementations)X
-2089(are)X
-432 758(based)N
-667(on)X
-799(the)X
-949(same)X
-1166(algorithm)X
-1529(by)X
-1661(Ken)X
-1846(Thompson)X
-432 846([THOM90,)N
-824(TOR88,)X
-1113(WAL84],)X
-1452(but)X
-1582(differ)X
-1789(in)X
-1879(their)X
-2054(pro-)X
-432 934(grammatic)N
-801(interfaces.)X
-1160(The)X
-1311(latter)X
-1502(is)X
-1581(a)X
-1643(modi\256ed)X
-1952(version)X
-432 1022(of)N
-533(the)X
-665(former)X
-918(which)X
-1148(adds)X
-1328(support)X
-1601(for)X
-1728(multiple)X
-2027(data-)X
-432 1110(bases)N
-634(to)X
-724(be)X
-828(open)X
-1011(concurrently.)X
-1484(The)X
-1636(discussion)X
-1996(of)X
-2090(the)X
-432 1198(algorithm)N
-774(that)X
-925(follows)X
-1196(is)X
-1280(applicable)X
-1640(to)X
-1732(both)X
-2 f
-1904(dbm)X
-1 f
-2072(and)X
-2 f
-432 1286(ndbm)N
-1 f
-610(.)X
-604 1400(The)N
-760(basic)X
-956(structure)X
-1268(of)X
-2 f
-1366(dbm)X
-1 f
-1535(calls)X
-1712(for)X
-1836(\256xed-sized)X
-432 1488(disk)N
-612(blocks)X
-868(\(buckets\))X
-1214(and)X
-1377(an)X
-2 f
-1499(access)X
-1 f
-1755(function)X
-2068(that)X
-432 1576(maps)N
-623(a)X
-681(key)X
-819(to)X
-902(a)X
-959(bucket.)X
-1234(The)X
-1380(interface)X
-1683(routines)X
-1962(use)X
-2090(the)X
-2 f
-432 1664(access)N
-1 f
-673(function)X
-970(to)X
-1062(obtain)X
-1292(the)X
-1420(appropriate)X
-1816(bucket)X
-2060(in)X
-2152(a)X
-432 1752(single)N
-643(disk)X
-796(access.)X
-604 1866(Within)N
-869(the)X
-2 f
-1010(access)X
-1 f
-1263(function,)X
-1593(a)X
-1672(bit-randomizing)X
-432 1954(hash)N
-610(function)X
-2 f
-8 s
-877 1929(2)N
-1 f
-10 s
-940 1954(is)N
-1024(used)X
-1202(to)X
-1294(convert)X
-1565(a)X
-1631(key)X
-1777(into)X
-1931(a)X
-1997(32-bit)X
-432 2042(hash)N
-605(value.)X
-825(Out)X
-971(of)X
-1064(these)X
-1254(32)X
-1359(bits,)X
-1519(only)X
-1686(as)X
-1778(many)X
-1981(bits)X
-2121(as)X
-432 2130(necessary)N
-773(are)X
-900(used)X
-1075(to)X
-1165(determine)X
-1514(the)X
-1639(particular)X
-1974(bucket)X
-432 2218(on)N
-533(which)X
-750(a)X
-807(key)X
-944(resides.)X
-1228(An)X
-1347(in-memory)X
-1724(bitmap)X
-1967(is)X
-2041(used)X
-432 2306(to)N
-533(determine)X
-893(how)X
-1070(many)X
-1287(bits)X
-1441(are)X
-1579(required.)X
-1905(Each)X
-2104(bit)X
-432 2394(indicates)N
-746(whether)X
-1033(its)X
-1136(associated)X
-1494(bucket)X
-1736(has)X
-1871(been)X
-2051(split)X
-432 2482(yet)N
-562(\(a)X
-657(0)X
-728(indicating)X
-1079(that)X
-1230(the)X
-1359(bucket)X
-1604(has)X
-1742(not)X
-1875(yet)X
-2004(split\).)X
-432 2570(The)N
-590(use)X
-730(of)X
-830(the)X
-961(hash)X
-1141(function)X
-1441(and)X
-1590(the)X
-1720(bitmap)X
-1974(is)X
-2059(best)X
-432 2658(described)N
-769(by)X
-878(stepping)X
-1177(through)X
-1454(database)X
-1759(creation)X
-2046(with)X
-432 2746(multiple)N
-718(invocations)X
-1107(of)X
-1194(a)X
-2 f
-1250(store)X
-1 f
-1430(operation.)X
-604 2860(Initially,)N
-906(the)X
-1033(hash)X
-1209(table)X
-1394(contains)X
-1690(a)X
-1755(single)X
-1974(bucket)X
-432 2948(\(bucket)N
-711(0\),)X
-836(the)X
-972(bit)X
-1094(map)X
-1270(contains)X
-1575(a)X
-1649(single)X
-1878(bit)X
-2000(\(bit)X
-2148(0)X
-432 3036(corresponding)N
-913(to)X
-997(bucket)X
-1233(0\),)X
-1342(and)X
-1480(0)X
-1542(bits)X
-1699(of)X
-1788(a)X
-1846(hash)X
-2014(value)X
-432 3124(are)N
-560(examined)X
-901(to)X
-992(determine)X
-1342(where)X
-1568(a)X
-1633(key)X
-1778(is)X
-1860(placed)X
-2099(\(in)X
-432 3212(bucket)N
-670(0\).)X
-801(When)X
-1017(bucket)X
-1255(0)X
-1319(is)X
-1396(full,)X
-1551(its)X
-1650(bit)X
-1758(in)X
-1844(the)X
-1966(bitmap)X
-432 3300(\(bit)N
-564(0\))X
-652(is)X
-726(set,)X
-856(and)X
-993(its)X
-1089(contents)X
-1377(are)X
-1497(split)X
-1655(between)X
-1943(buckets)X
-432 3388(0)N
-499(and)X
-641(1,)X
-727(by)X
-833(considering)X
-1233(the)X
-1357(0)X
-2 f
-7 s
-3356(th)Y
-10 s
-1 f
-1480 3388(bit)N
-1590(\(the)X
-1741(lowest)X
-1976(bit)X
-2086(not)X
-432 3476(previously)N
-800(examined\))X
-1169(of)X
-1266(the)X
-1393(hash)X
-1569(value)X
-1772(for)X
-1895(each)X
-2072(key)X
-432 3564(within)N
-668(the)X
-798(bucket.)X
-1064(Given)X
-1292(a)X
-1359(well-designed)X
-1840(hash)X
-2018(func-)X
-432 3652(tion,)N
-613(approximately)X
-1112(half)X
-1273(of)X
-1376(the)X
-1510(keys)X
-1693(will)X
-1853(have)X
-2041(hash)X
-432 3740(values)N
-666(with)X
-837(the)X
-964(0)X
-2 f
-7 s
-3708(th)Y
-10 s
-1 f
-1090 3740(bit)N
-1203(set.)X
-1341(All)X
-1471(such)X
-1646(keys)X
-1821(and)X
-1965(associ-)X
-432 3828(ated)N
-586(data)X
-740(are)X
-859(moved)X
-1097(to)X
-1179(bucket)X
-1413(1,)X
-1493(and)X
-1629(the)X
-1747(rest)X
-1883(remain)X
-2126(in)X
-432 3916(bucket)N
-666(0.)X
-604 4030(After)N
-804(this)X
-949(split,)X
-1135(the)X
-1262(\256le)X
-1393(now)X
-1560(contains)X
-1856(two)X
-2005(buck-)X
-432 4118(ets,)N
-562(and)X
-699(the)X
-818(bitmap)X
-1061(contains)X
-1349(three)X
-1530(bits:)X
-1687(the)X
-1805(0)X
-2 f
-7 s
-4086(th)Y
-10 s
-1 f
-1922 4118(bit)N
-2026(is)X
-2099(set)X
-432 4206(to)N
-525(indicate)X
-810(a)X
-876(bucket)X
-1120(0)X
-1190(split)X
-1357(when)X
-1561(no)X
-1671(bits)X
-1816(of)X
-1913(the)X
-2041(hash)X
-432 4294(value)N
-648(are)X
-789(considered,)X
-1199(and)X
-1357(two)X
-1519(more)X
-1726(unset)X
-1937(bits)X
-2094(for)X
-432 4382(buckets)N
-706(0)X
-775(and)X
-920(1.)X
-1029(The)X
-1183(placement)X
-1542(of)X
-1638(an)X
-1742(incoming)X
-2072(key)X
-432 4470(now)N
-604(requires)X
-897(examination)X
-1327(of)X
-1428(the)X
-1560(0)X
-2 f
-7 s
-4438(th)Y
-10 s
-1 f
-1691 4470(bit)N
-1809(of)X
-1910(the)X
-2041(hash)X
-432 4558(value,)N
-667(and)X
-824(the)X
-963(key)X
-1119(is)X
-1212(placed)X
-1462(either)X
-1685(in)X
-1787(bucket)X
-2041(0)X
-2121(or)X
-432 4646(bucket)N
-674(1.)X
-782(If)X
-864(either)X
-1075(bucket)X
-1317(0)X
-1385(or)X
-1480(bucket)X
-1722(1)X
-1790(\256lls)X
-1937(up,)X
-2064(it)X
-2135(is)X
-432 4734(split)N
-598(as)X
-693(before,)X
-947(its)X
-1050(bit)X
-1162(is)X
-1243(set)X
-1360(in)X
-1450(the)X
-1576(bitmap,)X
-1846(and)X
-1990(a)X
-2054(new)X
-432 4822(set)N
-541(of)X
-628(unset)X
-817(bits)X
-952(are)X
-1071(added)X
-1283(to)X
-1365(the)X
-1483(bitmap.)X
-604 4936(Each)N
-791(time)X
-959(we)X
-1079(consider)X
-1376(a)X
-1437(new)X
-1596(bit)X
-1705(\(bit)X
-1841(n\),)X
-1953(we)X
-2072(add)X
-432 5024(2)N
-2 f
-7 s
-4992(n)Y
-9 f
-509(+)X
-1 f
-540(1)X
-10 s
-595 5024(bits)N
-737(to)X
-826(the)X
-951(bitmap)X
-1199(and)X
-1341(obtain)X
-1567(2)X
-2 f
-7 s
-4992(n)Y
-9 f
-1644(+)X
-1 f
-1675(1)X
-10 s
-1729 5024(more)N
-1920(address-)X
-432 5112(able)N
-595(buckets)X
-869(in)X
-960(the)X
-1087(\256le.)X
-1258(As)X
-1376(a)X
-1441(result,)X
-1668(the)X
-1795(bitmap)X
-2045(con-)X
-432 5200(tains)N
-618(the)X
-751(previous)X
-1062(2)X
-2 f
-7 s
-5168(n)Y
-9 f
-1139(+)X
-1 f
-1170(1)X
-2 f
-10 s
-9 f
-5200(-)Y
-1 f
-1242(1)X
-1317(bits)X
-1467(\(1)X
-2 f
-9 f
-1534(+)X
-1 f
-1578(2)X
-2 f
-9 f
-(+)S
-1 f
-1662(4)X
-2 f
-9 f
-(+)S
-1 f
-1746(...)X
-2 f
-9 f
-(+)S
-1 f
-1850(2)X
-2 f
-7 s
-5168(n)Y
-10 s
-1 f
-1931 5200(\))N
-1992(which)X
-432 5288(trace)N
-649(the)X
-807(entire)X
-2 f
-1050(split)X
-1247(history)X
-1 f
-1529(of)X
-1656(the)X
-1813(addressable)X
-16 s
-432 5433 MXY
-864 0 Dl
-2 f
-8 s
-472 5488(2)N
-1 f
-9 s
-523 5513(This)N
-670(bit-randomizing)X
-1153(property)X
-1416(is)X
-1482(important)X
-1780(to)X
-1854(obtain)X
-2052(radi-)X
-432 5593(cally)N
-599(different)X
-874(hash)X
-1033(values)X
-1244(for)X
-1355(nearly)X
-1562(identical)X
-1836(keys,)X
-2012(which)X
-432 5673(in)N
-506(turn)X
-640(avoids)X
-846(clustering)X
-1148(of)X
-1226(such)X
-1376(keys)X
-1526(in)X
-1600(a)X
-1650(single)X
-1840(bucket.)X
-10 s
-2418 538(buckets.)N
-2590 652(Given)N
-2809(a)X
-2868(key)X
-3007(and)X
-3146(the)X
-3267(bitmap)X
-3512(created)X
-3768(by)X
-3871(this)X
-4009(algo-)X
-2418 740(rithm,)N
-2638(we)X
-2759(\256rst)X
-2910(examine)X
-3209(bit)X
-3320(0)X
-3386(of)X
-3479(the)X
-3603(bitmap)X
-3851(\(the)X
-4002(bit)X
-4112(to)X
-2418 828(consult)N
-2673(when)X
-2871(0)X
-2934(bits)X
-3072(of)X
-3162(the)X
-3283(hash)X
-3453(value)X
-3650(are)X
-3772(being)X
-3973(exam-)X
-2418 916(ined\).)N
-2631(If)X
-2713(it)X
-2785(is)X
-2866(set)X
-2982(\(indicating)X
-3356(that)X
-3503(the)X
-3628(bucket)X
-3869(split\),)X
-4080(we)X
-2418 1004(begin)N
-2617(considering)X
-3012(the)X
-3131(bits)X
-3267(of)X
-3355(the)X
-3473(32-bit)X
-3684(hash)X
-3851(value.)X
-4085(As)X
-2418 1092(bit)N
-2525(n)X
-2587(is)X
-2662(revealed,)X
-2977(a)X
-3035(mask)X
-3226(equal)X
-3422(to)X
-3506(2)X
-2 f
-7 s
-1060(n)Y
-9 f
-3583(+)X
-1 f
-3614(1)X
-2 f
-10 s
-9 f
-1092(-)Y
-1 f
-3686(1)X
-3748(will)X
-3894(yield)X
-4076(the)X
-2418 1180(current)N
-2675(bucket)X
-2918(address.)X
-3228(Adding)X
-3496(2)X
-2 f
-7 s
-1148(n)Y
-9 f
-3573(+)X
-1 f
-3604(1)X
-2 f
-10 s
-9 f
-1180(-)Y
-1 f
-3676(1)X
-3744(to)X
-3834(the)X
-3960(bucket)X
-2418 1268(address)N
-2701(identi\256es)X
-3035(which)X
-3272(bit)X
-3397(in)X
-3500(the)X
-3639(bitmap)X
-3902(must)X
-4098(be)X
-2418 1356(checked.)N
-2743(We)X
-2876(continue)X
-3173(revealing)X
-3493(bits)X
-3628(of)X
-3715(the)X
-3833(hash)X
-4000(value)X
-2418 1444(until)N
-2591(all)X
-2698(set)X
-2814(bits)X
-2955(in)X
-3043(the)X
-3167(bitmap)X
-3415(are)X
-3540(exhausted.)X
-3907(The)X
-4058(fol-)X
-2418 1532(lowing)N
-2682(algorithm,)X
-3055(a)X
-3133(simpli\256cation)X
-3614(of)X
-3723(the)X
-3863(algorithm)X
-2418 1620(due)N
-2565(to)X
-2658(Ken)X
-2823(Thompson)X
-3196([THOM90,)X
-3590(TOR88],)X
-3908(uses)X
-4076(the)X
-2418 1708(hash)N
-2625(value)X
-2839(and)X
-2995(the)X
-3133(bitmap)X
-3395(to)X
-3497(calculate)X
-3823(the)X
-3960(bucket)X
-2418 1796(address)N
-2679(as)X
-2766(discussed)X
-3093(above.)X
-0(Courier)xf 0 f
-1 f
-0 f
-8 s
-2418 2095(hash)N
-2608(=)X
-2684 -0.4038(calchash\(key\);)AX
-2418 2183(mask)N
-2608(=)X
-2684(0;)X
-2418 2271(while)N
-2646 -0.4018(\(isbitset\(\(hash)AX
-3254(&)X
-3330(mask\))X
-3558(+)X
-3634(mask\)\))X
-2706 2359(mask)N
-2896(=)X
-2972(\(mask)X
-3200(<<)X
-3314(1\))X
-3428(+)X
-3504(1;)X
-2418 2447(bucket)N
-2684(=)X
-2760(hash)X
-2950(&)X
-3026(mask;)X
-2 f
-10 s
-3211 2812(sdbm)N
-1 f
-2590 2944(The)N
-2 f
-2738(sdbm)X
-1 f
-2930(library)X
-3167(is)X
-3243(a)X
-3302(public-domain)X
-3791(clone)X
-3987(of)X
-4076(the)X
-2 f
-2418 3032(ndbm)N
-1 f
-2638(library,)X
-2914(developed)X
-3286(by)X
-3408(Ozan)X
-3620(Yigit)X
-3826(to)X
-3929(provide)X
-2 f
-2418 3120(ndbm)N
-1 f
-2596('s)X
-2692(functionality)X
-3139(under)X
-3359(some)X
-3565(versions)X
-3869(of)X
-3973(UNIX)X
-2418 3208(that)N
-2559(exclude)X
-2830(it)X
-2894(for)X
-3008(licensing)X
-3317(reasons)X
-3578([YIG89].)X
-3895(The)X
-4040(pro-)X
-2418 3296(grammer)N
-2735(interface,)X
-3064(and)X
-3207(the)X
-3332(basic)X
-3524(structure)X
-3832(of)X
-2 f
-3926(sdbm)X
-1 f
-4121(is)X
-2418 3384(identical)N
-2733(to)X
-2 f
-2834(ndbm)X
-1 f
-3051(but)X
-3192(internal)X
-3476(details)X
-3723(of)X
-3828(the)X
-2 f
-3964(access)X
-1 f
-2418 3472(function,)N
-2726(such)X
-2894(as)X
-2982(the)X
-3101(calculation)X
-3474(of)X
-3561(the)X
-3679(bucket)X
-3913(address,)X
-2418 3560(and)N
-2563(the)X
-2690(use)X
-2825(of)X
-2920(different)X
-3225(hash)X
-3400(functions)X
-3726(make)X
-3928(the)X
-4054(two)X
-2418 3648(incompatible)N
-2856(at)X
-2934(the)X
-3052(database)X
-3349(level.)X
-2590 3762(The)N
-2 f
-2740(sdbm)X
-1 f
-2934(library)X
-3173(is)X
-3251(based)X
-3458(on)X
-3562(a)X
-3622(simpli\256ed)X
-3965(imple-)X
-2418 3850(mentation)N
-2778(of)X
-2885(Larson's)X
-3206(1978)X
-2 f
-3406(dynamic)X
-3717(hashing)X
-1 f
-4009(algo-)X
-2418 3938(rithm)N
-2616(including)X
-2943(the)X
-2 f
-3066(re\256nements)X
-3461(and)X
-3605(variations)X
-1 f
-3953(of)X
-4044(sec-)X
-2418 4026(tion)N
-2562(5)X
-2622([LAR78].)X
-2956(Larson's)X
-3257(original)X
-3526(algorithm)X
-3857(calls)X
-4024(for)X
-4138(a)X
-2418 4114(forest)N
-2635(of)X
-2736(binary)X
-2975(hash)X
-3156(trees)X
-3341(that)X
-3494(are)X
-3626(accessed)X
-3941(by)X
-4054(two)X
-2418 4202(hash)N
-2586(functions.)X
-2925(The)X
-3071(\256rst)X
-3216(hash)X
-3384(function)X
-3672(selects)X
-3907(a)X
-3964(partic-)X
-2418 4290(ular)N
-2571(tree)X
-2720(within)X
-2952(the)X
-3078(forest.)X
-3309(The)X
-3462(second)X
-3713(hash)X
-3887(function,)X
-2418 4378(which)N
-2659(is)X
-2757(required)X
-3070(to)X
-3177(be)X
-3297(a)X
-3377(boolean)X
-3675(pseudo-random)X
-2418 4466(number)N
-2687(generator)X
-3015(that)X
-3159(is)X
-3236(seeded)X
-3479(by)X
-3583(the)X
-3705(key,)X
-3865(is)X
-3942(used)X
-4112(to)X
-2418 4554(traverse)N
-2733(the)X
-2890(tree)X
-3070(until)X
-3275(internal)X
-3579(\(split\))X
-3829(nodes)X
-4075(are)X
-2418 4642(exhausted)N
-2763(and)X
-2903(an)X
-3003(external)X
-3286(\(non-split\))X
-3648(node)X
-3827(is)X
-3903(reached.)X
-2418 4730(The)N
-2571(bucket)X
-2813(addresses)X
-3149(are)X
-3276(stored)X
-3500(directly)X
-3772(in)X
-3861(the)X
-3986(exter-)X
-2418 4818(nal)N
-2536(nodes.)X
-2590 4932(Larson's)N
-2903(re\256nements)X
-3309(are)X
-3440(based)X
-3655(on)X
-3767(the)X
-3897(observa-)X
-2418 5020(tion)N
-2570(that)X
-2718(the)X
-2844(nodes)X
-3059(can)X
-3199(be)X
-3303(represented)X
-3702(by)X
-3809(a)X
-3872(single)X
-4090(bit)X
-2418 5108(that)N
-2569(is)X
-2653(set)X
-2773(for)X
-2898(internal)X
-3174(nodes)X
-3392(and)X
-3539(not)X
-3672(set)X
-3791(for)X
-3915(external)X
-2418 5196(nodes,)N
-2652(resulting)X
-2959(in)X
-3048(a)X
-3111(radix)X
-3303(search)X
-3536(trie.)X
-3709(Figure)X
-3944(1)X
-4010(illus-)X
-2418 5284(trates)N
-2621(this.)X
-2804(Nodes)X
-3037(A)X
-3123(and)X
-3267(B)X
-3348(are)X
-3475(internal)X
-3748(\(split\))X
-3967(nodes,)X
-2418 5372(thus)N
-2573(having)X
-2813(no)X
-2915(bucket)X
-3151(addresses)X
-3480(associated)X
-3831(with)X
-3994(them.)X
-2418 5460(Instead,)N
-2693(the)X
-2814(external)X
-3096(nodes)X
-3306(\(C,)X
-3429(D,)X
-3530(and)X
-3669(E\))X
-3768(each)X
-3938(need)X
-4112(to)X
-2418 5548(refer)N
-2594(to)X
-2679(a)X
-2738(bucket)X
-2975(address.)X
-3279(These)X
-3494(bucket)X
-3731(addresses)X
-4062(can)X
-2418 5636(be)N
-2529(stored)X
-2760(in)X
-2857(the)X
-2990(trie)X
-3132(itself)X
-3327(where)X
-3559(the)X
-3691(subtries)X
-3974(would)X
-3 f
-432 5960(2)N
-2970(USENIX)X
-9 f
-3292(-)X
-3 f
-3356(Winter)X
-3621('91)X
-9 f
-3748(-)X
-3 f
-3812(Dallas,)X
-4065(TX)X
-
-3 p
-%%Page: 3 3
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-720 258(Seltzer)N
-977(&)X
-1064(Yigit)X
-3278(A)X
-3356(New)X
-3528(Hashing)X
-3831(Package)X
-4136(for)X
-4259(UNIX)X
-1 f
-720 538(live)N
-862(if)X
-933(they)X
-1092(existed)X
-1340([KNU68].)X
-1709(For)X
-1841(example,)X
-2154(if)X
-2224(nodes)X
-2432(F)X
-720 626(and)N
-858(G)X
-938(were)X
-1117(the)X
-1237(children)X
-1522(of)X
-1610(node)X
-1787(C,)X
-1881(the)X
-2000(bucket)X
-2235(address)X
-720 714(L00)N
-886(could)X
-1101(reside)X
-1330(in)X
-1429(the)X
-1563(bits)X
-1714(that)X
-1870(will)X
-2030(eventually)X
-2400(be)X
-720 802(used)N
-887(to)X
-969(store)X
-1145(nodes)X
-1352(F)X
-1416(and)X
-1552(G)X
-1630(and)X
-1766(all)X
-1866(their)X
-2033(children.)X
-10 f
-720 890 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-3 f
-1894 2247(L1)N
-784 1925(A)N
-1431(E)X
-1106 2247(D)N
-1428 1281(C)N
-1109 1603(B)N
-1884 1930(L01)N
-1879 1286(L00)N
-1221 1814(1)N
-903 2131(1)N
-1221 1402(0)N
-903 1714(0)N
-1 Dt
-1397 1821 MXY
--8 -32 Dl
--5 19 Dl
--20 6 Dl
-33 7 Dl
--187 -182 Dl
-1397 1322 MXY
--33 7 Dl
-20 6 Dl
-5 19 Dl
-8 -32 Dl
--187 182 Dl
-1069 1639 MXY
--32 7 Dl
-20 6 Dl
-5 19 Dl
-7 -32 Dl
--186 182 Dl
-1374 1891 MXY
-185 Dc
-1779 2133 MXY
-0 161 Dl
-322 0 Dl
-0 -161 Dl
--322 0 Dl
-1811 MY
-0 161 Dl
-322 0 Dl
-0 -161 Dl
--322 0 Dl
-1166 MY
-0 161 Dl
-322 0 Dl
-0 -161 Dl
--322 0 Dl
-1052 2213 MXY
-185 Dc
-1569 MY
-185 Dc
-720 1881 MXY
-185 Dc
-1779 2213 MXY
--28 -17 Dl
-10 17 Dl
--10 18 Dl
-28 -18 Dl
--543 0 Dl
-1769 1891 MXY
--28 -18 Dl
-10 18 Dl
--10 18 Dl
-28 -18 Dl
--201 0 Dl
-1364 1247 MXY
-185 Dc
-1769 MX
--28 -18 Dl
-10 18 Dl
--10 18 Dl
-28 -18 Dl
--201 0 Dl
-1064 2143 MXY
--7 -32 Dl
--5 19 Dl
--20 6 Dl
-32 7 Dl
--181 -181 Dl
-3 Dt
--1 Ds
-8 s
-720 2482(Figure)N
-925(1:)X
-1 f
-1002(Radix)X
-1179(search)X
-1365(trie)X
-1474(with)X
-1612(internal)X
-1831(nodes)X
-2004(A)X
-2074(and)X
-2189(B,)X
-2271(external)X
-720 2570(nodes)N
-891(C,)X
-972(D,)X
-1056(and)X
-1170(E,)X
-1247(and)X
-1361(bucket)X
-1553(addresses)X
-1819(stored)X
-1997(in)X
-2069(the)X
-2168(unused)X
-2370(por-)X
-720 2658(tion)N
-836(of)X
-905(the)X
-999(trie.)X
-10 s
-10 f
-720 2922 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-1 f
-892 3124(Further)N
-1153(simpli\256cations)X
-1647(of)X
-1738(the)X
-1860(above)X
-2076([YIG89])X
-2377(are)X
-720 3212(possible.)N
-1038(Using)X
-1265(a)X
-1337(single)X
-1564(radix)X
-1765(trie)X
-1908(to)X
-2006(avoid)X
-2219(the)X
-2352(\256rst)X
-720 3300(hash)N
-904(function,)X
-1227(replacing)X
-1562(the)X
-1696(pseudo-random)X
-2231(number)X
-720 3388(generator)N
-1052(with)X
-1222(a)X
-1286(well)X
-1452(designed,)X
-1785(bit-randomizing)X
-2329(hash)X
-720 3476(function,)N
-1053(and)X
-1215(using)X
-1434(the)X
-1578(portion)X
-1855(of)X
-1967(the)X
-2110(hash)X
-2302(value)X
-720 3564(exposed)N
-1021(during)X
-1268(the)X
-1404(trie)X
-1549(traversal)X
-1864(as)X
-1969(a)X
-2042(direct)X
-2262(bucket)X
-720 3652(address)N
-990(results)X
-1228(in)X
-1319(an)X
-2 f
-1424(access)X
-1 f
-1663(function)X
-1959(that)X
-2108(works)X
-2333(very)X
-720 3740(similar)N
-974(to)X
-1068(Thompson's)X
-1499(algorithm)X
-1841(above.)X
-2084(The)X
-2240(follow-)X
-720 3828(ing)N
-847(algorithm)X
-1183(uses)X
-1346(the)X
-1469(hash)X
-1641(value)X
-1840(to)X
-1927(traverse)X
-2206(a)X
-2266(linear-)X
-720 3916(ized)N
-874(radix)X
-1059(trie)X
-2 f
-8 s
-1166 3891(3)N
-1 f
-10 s
-1218 3916(starting)N
-1478(at)X
-1556(the)X
-1674(0)X
-2 f
-7 s
-3884(th)Y
-10 s
-1 f
-1791 3916(bit.)N
-0 f
-8 s
-720 4215(tbit)N
-910(=)X
-986(0;)X
-1296(/*)X
-1410(radix)X
-1638(trie)X
-1828(index)X
-2056(*/)X
-720 4303(hbit)N
-910(=)X
-986(0;)X
-1296(/*)X
-1410(hash)X
-1600(bit)X
-1752(index)X
-2056(*/)X
-720 4391(mask)N
-910(=)X
-986(0;)X
-720 4479(hash)N
-910(=)X
-986 -0.4038(calchash\(key\);)AX
-720 4655(for)N
-872(\(mask)X
-1100(=)X
-1176(0;)X
-910 4743 -0.4018(isbitset\(tbit\);)AN
-910 4831(mask)N
-1100(=)X
-1176(\(mask)X
-1404(<<)X
-1518(1\))X
-1632(+)X
-1708(1\))X
-1008 4919(if)N
-1122(\(hash)X
-1350(&)X
-1426(\(1)X
-1540(<<)X
-1654 -0.4219(hbit++\)\)\))AX
-1160 5007(/*)N
-1274(right)X
-1502(son)X
-1692(*/)X
-1160 5095(tbit)N
-1350(=)X
-1426(2)X
-1502(*)X
-1578(tbit)X
-1768(+)X
-1844(2;)X
-1008 5183(else)N
-1 f
-16 s
-720 5353 MXY
-864 0 Dl
-2 f
-8 s
-760 5408(3)N
-1 f
-9 s
-818 5433(A)N
-896(linearized)X
-1206(radix)X
-1380(trie)X
-1502(is)X
-1576(merely)X
-1802(an)X
-1895(array)X
-2068(representation)X
-720 5513(of)N
-800(the)X
-908(radix)X
-1076(search)X
-1280(trie)X
-1396(described)X
-1692(above.)X
-1920(The)X
-2052(children)X
-2308(of)X
-2388(the)X
-720 5593(node)N
-885(with)X
-1038(index)X
-1223(i)X
-1267(can)X
-1391(be)X
-1483(found)X
-1675(at)X
-1751(the)X
-1863(nodes)X
-2055(indexed)X
-2307(2*i+1)X
-720 5673(and)N
-842(2*i+2.)X
-0 f
-8 s
-3146 538(/*)N
-3260(left)X
-3450(son)X
-3678(*/)X
-3146 626(tbit)N
-3336(=)X
-3412(2)X
-3488(*)X
-3564(tbit)X
-3754(+)X
-3830(1;)X
-2706 802(bucket)N
-2972(=)X
-3048(hash)X
-3238(&)X
-3314(mask;)X
-2 f
-10 s
-3495 1167(gdbm)N
-1 f
-2878 1299(The)N
-3027(gdbm)X
-3233(\(GNU)X
-3458(data)X
-3616(base)X
-3783(manager\))X
-4111(library)X
-4349(is)X
-4426(a)X
-2706 1387(UNIX)N
-2933(database)X
-3236(manager)X
-3539(written)X
-3792(by)X
-3897(Philip)X
-4112(A.)X
-4215(Nelson,)X
-2706 1475(and)N
-2848(made)X
-3048(available)X
-3364(as)X
-3457(a)X
-3518(part)X
-3668(of)X
-3760(the)X
-3883(FSF)X
-4040(software)X
-4342(dis-)X
-2706 1563(tribution.)N
-3052(The)X
-3207(gdbm)X
-3419(library)X
-3663(provides)X
-3969(the)X
-4097(same)X
-4292(func-)X
-2706 1651(tionality)N
-3028(of)X
-3151(the)X
-2 f
-3304(dbm)X
-1 f
-3442(/)X
-2 f
-3464(ndbm)X
-1 f
-3697(libraries)X
-4015([NEL90])X
-4360(but)X
-2706 1739(attempts)N
-3018(to)X
-3121(avoid)X
-3340(some)X
-3550(of)X
-3658(their)X
-3846(shortcomings.)X
-4337(The)X
-2706 1827(gdbm)N
-2918(library)X
-3162(allows)X
-3401(for)X
-3525(arbitrary-length)X
-4059(data,)X
-4242(and)X
-4387(its)X
-2706 1915(database)N
-3027(is)X
-3124(a)X
-3203(singular,)X
-3524(non-sparse)X
-2 f
-8 s
-3872 1890(4)N
-1 f
-10 s
-3947 1915(\256le.)N
-4112(The)X
-4280(gdbm)X
-2706 2003(library)N
-2947(also)X
-3103(includes)X
-2 f
-3396(dbm)X
-1 f
-3560(and)X
-2 f
-3702(ndbm)X
-1 f
-3906(compatible)X
-4288(inter-)X
-2706 2091(faces.)N
-2878 2205(The)N
-3025(gdbm)X
-3229(library)X
-3465(is)X
-3540(based)X
-3745(on)X
-2 f
-3847(extensible)X
-4189(hashing)X
-1 f
-4442(,)X
-2706 2293(a)N
-2766(dynamic)X
-3066(hashing)X
-3339(algorithm)X
-3674(by)X
-3778(Fagin)X
-3984(et)X
-4066(al)X
-4148([FAG79].)X
-2706 2381(This)N
-2881(algorithm)X
-3225(differs)X
-3467(from)X
-3655(the)X
-3785(previously)X
-4155(discussed)X
-2706 2469(algorithms)N
-3069(in)X
-3152(that)X
-3293(it)X
-3358(uses)X
-3517(a)X
-2 f
-3574(directory)X
-1 f
-3889(that)X
-4030(is)X
-4103(a)X
-4159(collapsed)X
-2706 2557(representation)N
-3192([ENB88])X
-3517(of)X
-3615(the)X
-3744(radix)X
-3940(search)X
-4177(trie)X
-4315(used)X
-2706 2645(by)N
-2 f
-2806(sdbm)X
-1 f
-2975(.)X
-10 f
-2706 2733 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-3 f
-7 s
-3572 3761(L1)N
-1 Dt
-3485 3738 MXY
--20 -13 Dl
-7 13 Dl
--7 13 Dl
-20 -13 Dl
--400 0 Dl
-3180 3027 MXY
-136 Dc
-2706 3494 MXY
-136 Dc
-2950 3264 MXY
-136 Dc
-3738 MY
-136 Dc
-3485 2968 MXY
-0 118 Dl
-238 0 Dl
-0 -118 Dl
--238 0 Dl
-3442 MY
-0 119 Dl
-238 0 Dl
-0 -119 Dl
--238 0 Dl
-3679 MY
-0 119 Dl
-238 0 Dl
-0 -119 Dl
--238 0 Dl
-3187 3501 MXY
-136 Dc
-2963 3316 MXY
--24 5 Dl
-15 4 Dl
-4 15 Dl
-5 -24 Dl
--137 134 Dl
-3204 3083 MXY
--24 5 Dl
-15 4 Dl
-3 14 Dl
-6 -23 Dl
--137 133 Dl
-3204 3450 MXY
--6 -24 Dl
--3 14 Dl
--15 5 Dl
-24 5 Dl
--137 -134 Dl
-2842 3369(0)N
-3075 3139(0)N
-2842 3676(1)N
-3075 3443(1)N
-3562 3054(L00)N
-3565 3528(L01)N
-4197 2968 MXY
-0 118 Dl
-237 0 Dl
-0 -118 Dl
--237 0 Dl
-3205 MY
-0 119 Dl
-237 0 Dl
-0 -119 Dl
--237 0 Dl
-3561 MY
-0 118 Dl
-237 0 Dl
-0 -118 Dl
--237 0 Dl
-3960 2909 MXY
-0 237 Dl
-118 0 Dl
-0 -237 Dl
--118 0 Dl
-3146 MY
-0 237 Dl
-118 0 Dl
-0 -237 Dl
--118 0 Dl
-3383 MY
-0 237 Dl
-118 0 Dl
-0 -237 Dl
--118 0 Dl
-3620 MY
-0 237 Dl
-118 0 Dl
-0 -237 Dl
--118 0 Dl
-4197 3027 MXY
--21 -13 Dl
-8 13 Dl
--8 13 Dl
-21 -13 Dl
--119 0 Dl
-4197 3264 MXY
--21 -13 Dl
-8 13 Dl
--8 13 Dl
-21 -13 Dl
--119 0 Dl
-3501 MY
-59 0 Dl
-0 89 Dl
-4078 3738 MXY
-59 0 Dl
-0 -88 Dl
-4197 3590 MXY
--21 -13 Dl
-8 13 Dl
--8 13 Dl
-21 -13 Dl
--60 0 Dl
-4197 3650 MXY
--21 -13 Dl
-8 13 Dl
--8 13 Dl
-21 -13 Dl
--60 0 Dl
-3991 3050(00)N
-3991 3287(01)N
-3991 3524(10)N
-3991 3761(11)N
-4269 3050(L00)N
-4269 3287(L01)N
-4283 3643(L1)N
-3485 3501 MXY
--20 -13 Dl
-7 13 Dl
--7 13 Dl
-20 -13 Dl
--155 0 Dl
-3485 3027 MXY
--20 -13 Dl
-7 13 Dl
--7 13 Dl
-20 -13 Dl
--163 0 Dl
-2967 3687 MXY
--5 -24 Dl
--4 14 Dl
--15 4 Dl
-24 6 Dl
--141 -141 Dl
-3 Dt
--1 Ds
-8 s
-2706 4033(Figure)N
-2903(2:)X
-1 f
-2972(A)X
-3034(radix)X
-3181(search)X
-3359(trie)X
-3460(and)X
-3568(a)X
-3612(directory)X
-3858(representing)X
-4189(the)X
-4283(trie.)X
-10 s
-10 f
-2706 4209 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-1 f
-2878 4411(In)N
-2968(this)X
-3106(algorithm,)X
-3460(a)X
-3519(directory)X
-3832(consists)X
-4108(of)X
-4198(a)X
-4256(search)X
-2706 4499(trie)N
-2847(of)X
-2947(depth)X
-2 f
-3158(n)X
-1 f
-3211(,)X
-3264(containing)X
-3635(2)X
-2 f
-7 s
-4467(n)Y
-10 s
-1 f
-3749 4499(bucket)N
-3996(addresses)X
-4337(\(i.e.)X
-2706 4587(each)N
-2897(element)X
-3194(of)X
-3304(the)X
-3445(trie)X
-3594(is)X
-3689(a)X
-3767(bucket)X
-4023(address\).)X
-4373(To)X
-2706 4675(access)N
-2935(the)X
-3056(hash)X
-3226(table,)X
-3425(a)X
-3483(32-bit)X
-3696(hash)X
-3865(value)X
-4061(is)X
-4136(calculated)X
-2706 4763(and)N
-2 f
-2861(n)X
-1 f
-2953(bits)X
-3107(of)X
-3213(the)X
-3350(value)X
-3563(are)X
-3701(used)X
-3886(to)X
-3986(index)X
-4202(into)X
-4364(the)X
-2706 4851(directory)N
-3018(to)X
-3102(obtain)X
-3324(a)X
-3382(bucket)X
-3618(address.)X
-3921(It)X
-3992(is)X
-4067(important)X
-4400(to)X
-2706 4939(note)N
-2866(that)X
-3008(multiple)X
-3296(entries)X
-3532(of)X
-3620(this)X
-3756(directory)X
-4067(may)X
-4226(contain)X
-2706 5027(the)N
-2833(same)X
-3026(bucket)X
-3268(address)X
-3537(as)X
-3632(a)X
-3696(result)X
-3902(of)X
-3997(directory)X
-4315(dou-)X
-2706 5115(bling)N
-2903(during)X
-3145(bucket)X
-3392(splitting.)X
-3706(Figure)X
-3948(2)X
-4021(illustrates)X
-4364(the)X
-2706 5203(relationship)N
-3126(between)X
-3436(a)X
-3513(typical)X
-3772(\(skewed\))X
-4108(search)X
-4355(trie)X
-2706 5291(and)N
-2850(its)X
-2953(directory)X
-3271(representation.)X
-3774(The)X
-3927(formation)X
-4270(of)X
-4364(the)X
-2706 5379(directory)N
-3016(shown)X
-3245(in)X
-3327(the)X
-3445(\256gure)X
-3652(is)X
-3725(as)X
-3812(follows.)X
-16 s
-2706 5593 MXY
-864 0 Dl
-2 f
-8 s
-2746 5648(4)N
-1 f
-9 s
-2796 5673(It)N
-2858(does)X
-3008(not)X
-3118(contain)X
-3348(holes.)X
-3 f
-10 s
-720 5960(USENIX)N
-9 f
-1042(-)X
-3 f
-1106(Winter)X
-1371('91)X
-9 f
-1498(-)X
-3 f
-1562(Dallas,)X
-1815(TX)X
-4424(3)X
-
-4 p
-%%Page: 4 4
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-432 258(A)N
-510(New)X
-682(Hashing)X
-985(Package)X
-1290(for)X
-1413(UNIX)X
-3663(Seltzer)X
-3920(&)X
-4007(Yigit)X
-1 f
-604 538(Initially,)N
-937(there)X
-1158(is)X
-1271(one)X
-1446(slot)X
-1620(in)X
-1741(the)X
-1898(directory)X
-432 626(addressing)N
-802(a)X
-865(single)X
-1083(bucket.)X
-1364(The)X
-1515(depth)X
-1719(of)X
-1812(the)X
-1936(trie)X
-2069(is)X
-2148(0)X
-432 714(and)N
-577(0)X
-646(bits)X
-790(of)X
-886(each)X
-1063(hash)X
-1239(value)X
-1442(are)X
-1570(examined)X
-1910(to)X
-2000(deter-)X
-432 802(mine)N
-624(in)X
-718(which)X
-946(bucket)X
-1192(to)X
-1286(place)X
-1488(a)X
-1556(key;)X
-1726(all)X
-1837(keys)X
-2015(go)X
-2126(in)X
-432 890(bucket)N
-682(0.)X
-797(When)X
-1024(this)X
-1174(bucket)X
-1423(is)X
-1511(full,)X
-1677(its)X
-1787(contents)X
-2089(are)X
-432 978(divided)N
-698(between)X
-992(L0)X
-1107(and)X
-1249(L1)X
-1363(as)X
-1455(was)X
-1605(done)X
-1786(in)X
-1873(the)X
-1996(previ-)X
-432 1066(ously)N
-664(discussed)X
-1030(algorithms.)X
-1471(After)X
-1700(this)X
-1874(split,)X
-2090(the)X
-432 1154(address)N
-710(of)X
-814(the)X
-948(second)X
-1207(bucket)X
-1457(must)X
-1648(be)X
-1760(stored)X
-1992(in)X
-2090(the)X
-432 1242(directory.)N
-796(To)X
-939(accommodate)X
-1438(the)X
-1589(new)X
-1776(address,)X
-2090(the)X
-432 1330(directory)N
-752(is)X
-835(split)X
-2 f
-8 s
-972 1305(5)N
-1 f
-10 s
-1330(,)Y
-1054(by)X
-1163(doubling)X
-1476(it,)X
-1569(thus)X
-1731(increasing)X
-2090(the)X
-432 1418(depth)N
-630(of)X
-717(the)X
-835(directory)X
-1145(by)X
-1245(one.)X
-604 1532(After)N
-813(this)X
-967(split,)X
-1163(a)X
-1237(single)X
-1466(bit)X
-1588(of)X
-1693(the)X
-1829(hash)X
-2014(value)X
-432 1620(needs)N
-663(to)X
-773(be)X
-896(examined)X
-1255(to)X
-1364(decide)X
-1621(whether)X
-1927(the)X
-2072(key)X
-432 1708(belongs)N
-711(to)X
-803(L0)X
-922(or)X
-1019(L1.)X
-1158(Once)X
-1358(one)X
-1504(of)X
-1601(these)X
-1795(buckets)X
-2069(\256lls)X
-432 1796(\(L0)N
-578(for)X
-702(example\),)X
-1051(it)X
-1125(is)X
-1208(split)X
-1375(as)X
-1472(before,)X
-1728(and)X
-1873(the)X
-2000(direc-)X
-432 1884(tory)N
-585(is)X
-662(split)X
-823(again)X
-1021(to)X
-1107(make)X
-1305(room)X
-1498(for)X
-1615(the)X
-1736(address)X
-2000(of)X
-2090(the)X
-432 1972(third)N
-618(bucket.)X
-927(This)X
-1104(splitting)X
-1400(causes)X
-1645(the)X
-1778(addresses)X
-2121(of)X
-432 2060(the)N
-567(non-splitting)X
-1012(bucket)X
-1263(\(L1\))X
-1443(to)X
-1541(be)X
-1653(duplicated.)X
-2063(The)X
-432 2148(directory)N
-766(now)X
-948(has)X
-1099(four)X
-1277(entries,)X
-1555(a)X
-1635(depth)X
-1857(of)X
-1968(2,)X
-2072(and)X
-432 2236(indexes)N
-700(the)X
-821(buckets)X
-1089(L00,)X
-1261(L01)X
-1413(and)X
-1552(L1,)X
-1684(as)X
-1774(shown)X
-2006(in)X
-2090(the)X
-432 2324(Figure)N
-661(2.)X
-604 2438(The)N
-756(crucial)X
-1002(part)X
-1154(of)X
-1247(the)X
-1371(algorithm)X
-1708(is)X
-1787(the)X
-1911(observa-)X
-432 2526(tion)N
-580(that)X
-724(L1)X
-837(is)X
-914(addressed)X
-1255(twice)X
-1453(in)X
-1539(the)X
-1661(directory.)X
-1995(If)X
-2073(this)X
-432 2614(bucket)N
-679(were)X
-869(to)X
-964(split)X
-1134(now,)X
-1324(the)X
-1454(directory)X
-1776(already)X
-2045(con-)X
-432 2702(tains)N
-611(room)X
-808(to)X
-898(hold)X
-1067(the)X
-1192(address)X
-1460(of)X
-1554(the)X
-1679(new)X
-1840(bucket.)X
-2121(In)X
-432 2790(general,)N
-711(the)X
-831(relationship)X
-1231(between)X
-1521(the)X
-1641(directory)X
-1953(and)X
-2090(the)X
-432 2878(number)N
-704(of)X
-798(bucket)X
-1039(addresses)X
-1374(contained)X
-1713(therein)X
-1962(is)X
-2041(used)X
-432 2966(to)N
-517(decide)X
-750(when)X
-947(to)X
-1031(split)X
-1190(the)X
-1310(directory.)X
-1662(Each)X
-1845(bucket)X
-2081(has)X
-432 3054(a)N
-505(depth,)X
-740(\()X
-2 f
-767(n)X
-7 s
-3070(b)Y
-10 s
-1 f
-848 3054(\),)N
-932(associated)X
-1299(with)X
-1478(it)X
-1558(and)X
-1710(appears)X
-1992(in)X
-2090(the)X
-432 3142(directory)N
-744(exactly)X
-998(2)X
-2 f
-7 s
-3106(n)Y
-9 f
-1075(-)X
-2 f
-1106(n)X
-4 s
-3110(b)Y
-7 s
-1 f
-10 s
-1181 3142(times.)N
-1396(When)X
-1610(a)X
-1668(bucket)X
-1904(splits,)X
-2113(its)X
-432 3230(depth)N
-638(increases)X
-961(by)X
-1069(one.)X
-1253(The)X
-1406(directory)X
-1724(must)X
-1907(split)X
-2072(any)X
-432 3318(time)N
-602(a)X
-665(bucket's)X
-964(depth)X
-1169(exceeds)X
-1451(the)X
-1576(depth)X
-1781(of)X
-1875(the)X
-2000(direc-)X
-432 3406(tory.)N
-630(The)X
-784(following)X
-1123(code)X
-1303(fragment)X
-1621(helps)X
-1818(to)X
-1908(illustrate)X
-432 3494(the)N
-554(extendible)X
-912(hashing)X
-1185(algorithm)X
-1520([FAG79])X
-1838(for)X
-1955(access-)X
-432 3582(ing)N
-554(individual)X
-898(buckets)X
-1163(and)X
-1299(maintaining)X
-1701(the)X
-1819(directory.)X
-0 f
-8 s
-432 3881(hash)N
-622(=)X
-698 -0.4038(calchash\(key\);)AX
-432 3969(mask)N
-622(=)X
-698 -0.4018(maskvec[depth];)AX
-432 4145(bucket)N
-698(=)X
-774 -0.4038(directory[hash)AX
-1344(&)X
-1420(mask];)X
-432 4321(/*)N
-546(Key)X
-698 -0.4219(Insertion)AX
-1078(*/)X
-432 4409(if)N
-546 -0.4038(\(store\(bucket,)AX
-1116(key,)X
-1306(data\))X
-1534(==)X
-1648(FAIL\))X
-1876({)X
-720 4497(newbl)N
-948(=)X
-1024 -0.4167(getpage\(\);)AX
-720 4585 -0.4000(bucket->depth++;)AN
-720 4673 -0.4091(newbl->depth)AN
-1214(=)X
-1290 -0.4038(bucket->depth;)AX
-720 4761(if)N
-834 -0.4038(\(bucket->depth)AX
-1404(>)X
-1480(depth\))X
-1746({)X
-1008 4849(/*)N
-1122(double)X
-1388 -0.4219(directory)AX
-1768(*/)X
-1008 4937(depth++;)N
-1 f
-16 s
-432 5033 MXY
-864 0 Dl
-2 f
-8 s
-472 5088(5)N
-1 f
-9 s
-534 5113(This)N
-692(decision)X
-962(to)X
-1048(split)X
-1202(the)X
-1319(directory)X
-1608(is)X
-1685(based)X
-1878(on)X
-1979(a)X
-2040(com-)X
-432 5193(parison)N
-666(of)X
-748(the)X
-858(depth)X
-1040(of)X
-1121(the)X
-1230(page)X
-1387(being)X
-1568(split)X
-1713(and)X
-1838(the)X
-1947(depth)X
-2128(of)X
-432 5273(the)N
-543(trie.)X
-698(In)X
-781(Figure)X
-992(2,)X
-1069(the)X
-1180(depths)X
-1390(of)X
-1472(both)X
-1622(L00)X
-1760(and)X
-1886(L01)X
-2024(are)X
-2134(2,)X
-432 5353(whereas)N
-689(the)X
-798(depth)X
-979(of)X
-1060(L1)X
-1161(is)X
-1230(1.)X
-1323(Therefore,)X
-1646(if)X
-1710(L1)X
-1810(were)X
-1970(to)X
-2046(split,)X
-432 5433(the)N
-543(directory)X
-826(would)X
-1029(not)X
-1144(need)X
-1303(to)X
-1382(split.)X
-1565(In)X
-1648(reality,)X
-1872(a)X
-1926(bucket)X
-2140(is)X
-432 5513(allocated)N
-727(for)X
-846(the)X
-969(directory)X
-1264(at)X
-1351(the)X
-1474(time)X
-1637(of)X
-1732(\256le)X
-1858(creation)X
-2124(so)X
-432 5593(although)N
-707(the)X
-818(directory)X
-1100(splits)X
-1274(logically,)X
-1566(physical)X
-1828(splits)X
-2002(do)X
-2096(not)X
-432 5673(occur)N
-610(until)X
-760(the)X
-866(\256le)X
-976(becomes)X
-1246(quite)X
-1408(large.)X
-0 f
-8 s
-2994 538 -0.4219(directory)AN
-3374(=)X
-3450 -0.3971(double\(directory\);)AX
-2706 626(})N
-2706 714 -0.3958(splitbucket\(bucket,)AN
-3466(newbl\))X
-2706 802(...)N
-2418 890(})N
-2 f
-10 s
-3169 1255(hsearch)N
-1 f
-2590 1387(Since)N
-2 f
-2807(hsearch)X
-1 f
-3100(does)X
-3286(not)X
-3427(have)X
-3617(to)X
-3717(translate)X
-4027(hash)X
-2418 1475(values)N
-2659(into)X
-2819(disk)X
-2988(addresses,)X
-3352(it)X
-3432(can)X
-3579(use)X
-3721(much)X
-3934(simpler)X
-2418 1563(algorithms)N
-2808(than)X
-2994(those)X
-3211(de\256ned)X
-3495(above.)X
-3775(System)X
-4058(V's)X
-2 f
-2418 1651(hsearch)N
-1 f
-2708(constructs)X
-3069(a)X
-3141(\256xed-size)X
-3489(hash)X
-3671(table)X
-3862(\(speci\256ed)X
-2418 1739(by)N
-2519(the)X
-2637(user)X
-2791(at)X
-2869(table)X
-3045(creation\).)X
-3391(By)X
-3504(default,)X
-3767(a)X
-3823(multiplica-)X
-2418 1827(tive)N
-2570(hash)X
-2748(function)X
-3046(based)X
-3260(on)X
-3371(that)X
-3522(described)X
-3861(in)X
-3954(Knuth,)X
-2418 1915(Volume)N
-2710(3,)X
-2804(section)X
-3065(6.4)X
-3199([KNU68])X
-3541(is)X
-3628(used)X
-3809(to)X
-3905(obtain)X
-4138(a)X
-2418 2003(primary)N
-2694(bucket)X
-2930(address.)X
-3233(If)X
-3309(this)X
-3446(bucket)X
-3681(is)X
-3755(full,)X
-3907(a)X
-3964(secon-)X
-2418 2091(dary)N
-2593(multiplicative)X
-3069(hash)X
-3248(value)X
-3454(is)X
-3538(computed)X
-3885(to)X
-3978(de\256ne)X
-2418 2179(the)N
-2542(probe)X
-2751(interval.)X
-3062(The)X
-3213(probe)X
-3422(interval)X
-3693(is)X
-3772(added)X
-3989(to)X
-4076(the)X
-2418 2267(original)N
-2712(bucket)X
-2971(address)X
-3257(\(modulo)X
-3573(the)X
-3716(table)X
-3916(size\))X
-4112(to)X
-2418 2355(obtain)N
-2658(a)X
-2734(new)X
-2908(bucket)X
-3162(address.)X
-3483(This)X
-3665(process)X
-3946(repeats)X
-2418 2443(until)N
-2588(an)X
-2688(empty)X
-2911(bucket)X
-3148(is)X
-3224(found.)X
-3474(If)X
-3551(no)X
-3654(bucket)X
-3891(is)X
-3967(found,)X
-2418 2531(an)N
-2514(insertion)X
-2814(fails)X
-2972(with)X
-3134(a)X
-3190(``table)X
-3420(full'')X
-3605(condition.)X
-2590 2645(The)N
-2768(basic)X
-2986(algorithm)X
-3350(may)X
-3541(be)X
-3670(modi\256ed)X
-4006(by)X
-4138(a)X
-2418 2733(number)N
-2705(of)X
-2813(compile)X
-3112(time)X
-3295(options)X
-3571(available)X
-3902(to)X
-4005(those)X
-2418 2821(users)N
-2604(with)X
-2767(AT&T)X
-3006(source)X
-3237(code.)X
-3450(First,)X
-3637(the)X
-3756(package)X
-4040(pro-)X
-2418 2909(vides)N
-2638(two)X
-2809(options)X
-3094(for)X
-3238(hash)X
-3435(functions.)X
-3803(Users)X
-4036(may)X
-2418 2997(specify)N
-2690(their)X
-2877(own)X
-3055(hash)X
-3242(function)X
-3549(by)X
-3669(compiling)X
-4032(with)X
-2418 3085(``USCR'')N
-2757(de\256ned)X
-3016(and)X
-3155(declaring)X
-3477(and)X
-3616(de\256ning)X
-3901(the)X
-4022(vari-)X
-2418 3173(able)N
-2 f
-2578(hcompar)X
-1 f
-2863(,)X
-2909(a)X
-2971(function)X
-3263(taking)X
-3488(two)X
-3633(string)X
-3840(arguments)X
-2418 3261(and)N
-2560(returning)X
-2880(an)X
-2982(integer.)X
-3271(Users)X
-3480(may)X
-3643(also)X
-3797(request)X
-4054(that)X
-2418 3349(hash)N
-2587(values)X
-2814(be)X
-2912(computed)X
-3250(simply)X
-3489(by)X
-3590(taking)X
-3811(the)X
-3930(modulo)X
-2418 3437(of)N
-2521(key)X
-2673(\(using)X
-2909(division)X
-3201(rather)X
-3424(than)X
-3597(multiplication)X
-4080(for)X
-2418 3525(hash)N
-2589(value)X
-2787(calculation\).)X
-3230(If)X
-3308(this)X
-3447(technique)X
-3783(is)X
-3859(used,)X
-4049(col-)X
-2418 3613(lisions)N
-2651(are)X
-2775(resolved)X
-3072(by)X
-3176(scanning)X
-3485(sequentially)X
-3896(from)X
-4076(the)X
-2418 3701(selected)N
-2702(bucket)X
-2941(\(linear)X
-3176(probing\).)X
-3517(This)X
-3684(option)X
-3913(is)X
-3991(avail-)X
-2418 3789(able)N
-2572(by)X
-2672(de\256ning)X
-2954(the)X
-3072(variable)X
-3351(``DIV'')X
-3622(at)X
-3700(compile)X
-3978(time.)X
-2590 3903(A)N
-2720(second)X
-3015(option,)X
-3311(based)X
-3565(on)X
-3716(an)X
-3863(algorithm)X
-2418 3991(discovered)N
-2787(by)X
-2888(Richard)X
-3163(P.)X
-3248(Brent,)X
-3466(rearranges)X
-3822(the)X
-3940(table)X
-4116(at)X
-2418 4079(the)N
-2549(time)X
-2724(of)X
-2824(insertion)X
-3137(in)X
-3232(order)X
-3434(to)X
-3528(speed)X
-3743(up)X
-3855(retrievals.)X
-2418 4167(The)N
-2571(basic)X
-2764(idea)X
-2926(is)X
-3007(to)X
-3097(shorten)X
-3361(long)X
-3531(probe)X
-3741(sequences)X
-4094(by)X
-2418 4255(lengthening)N
-2833(short)X
-3030(probe)X
-3249(sequences.)X
-3651(Once)X
-3857(the)X
-3991(probe)X
-2418 4343(chain)N
-2613(has)X
-2741(exceeded)X
-3062(some)X
-3252(threshold)X
-3571(\(Brent)X
-3796(suggests)X
-4087(2\),)X
-2418 4431(we)N
-2541(attempt)X
-2809(to)X
-2899(shuf\257e)X
-3145(any)X
-3289(colliding)X
-3601(keys)X
-3776(\(keys)X
-3978(which)X
-2418 4519(appeared)N
-2734(in)X
-2821(the)X
-2944(probe)X
-3152(sequence)X
-3471(of)X
-3562(the)X
-3684(new)X
-3842(key\).)X
-4049(The)X
-2418 4607(details)N
-2652(of)X
-2744(this)X
-2884(key)X
-3025(shuf\257ing)X
-3333(can)X
-3469(be)X
-3569(found)X
-3780(in)X
-3866([KNU68])X
-2418 4695(and)N
-2576([BRE73].)X
-2946(This)X
-3129(algorithm)X
-3481(may)X
-3660(be)X
-3777(obtained)X
-4094(by)X
-2418 4783(de\256ning)N
-2700(the)X
-2818(variable)X
-3097(``BRENT'')X
-3487(at)X
-3565(compile)X
-3843(time.)X
-2590 4897(A)N
-2698(third)X
-2899(set)X
-3038(of)X
-3154(options,)X
-3458(obtained)X
-3783(by)X
-3912(de\256ning)X
-2418 4985(``CHAINED'',)N
-2943(use)X
-3086(linked)X
-3321(lists)X
-3484(to)X
-3581(resolve)X
-3848(collisions.)X
-2418 5073(Either)N
-2647(of)X
-2747(the)X
-2878(primary)X
-3164(hash)X
-3343(function)X
-3642(described)X
-3982(above)X
-2418 5161(may)N
-2584(be)X
-2688(used,)X
-2882(but)X
-3011(all)X
-3118(collisions)X
-3451(are)X
-3577(resolved)X
-3876(by)X
-3983(build-)X
-2418 5249(ing)N
-2554(a)X
-2623(linked)X
-2856(list)X
-2986(of)X
-3086(entries)X
-3333(from)X
-3522(the)X
-3653(primary)X
-3940(bucket.)X
-2418 5337(By)N
-2542(default,)X
-2816(new)X
-2981(entries)X
-3226(will)X
-3381(be)X
-3488(added)X
-3711(to)X
-3804(a)X
-3871(bucket)X
-4116(at)X
-2418 5425(the)N
-2541(beginning)X
-2886(of)X
-2978(the)X
-3101(bucket)X
-3339(chain.)X
-3577(However,)X
-3916(compile)X
-2418 5513(options)N
-2706(``SORTUP'')X
-3173(or)X
-3293(``SORTDOWN'')X
-3908(may)X
-4098(be)X
-2418 5601(speci\256ed)N
-2723(to)X
-2805(order)X
-2995(the)X
-3113(hash)X
-3280(chains)X
-3505(within)X
-3729(each)X
-3897(bucket.)X
-3 f
-432 5960(4)N
-2970(USENIX)X
-9 f
-3292(-)X
-3 f
-3356(Winter)X
-3621('91)X
-9 f
-3748(-)X
-3 f
-3812(Dallas,)X
-4065(TX)X
-
-5 p
-%%Page: 5 5
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-720 258(Seltzer)N
-977(&)X
-1064(Yigit)X
-3278(A)X
-3356(New)X
-3528(Hashing)X
-3831(Package)X
-4136(for)X
-4259(UNIX)X
-2 f
-1444 538(dynahash)N
-1 f
-892 670(The)N
-2 f
-1054(dynahash)X
-1 f
-1398(library,)X
-1669(written)X
-1932(by)X
-2048(Esmond)X
-2346(Pitt,)X
-720 758(implements)N
-1183(Larson's)X
-1554(linear)X
-1827(hashing)X
-2165(algorithm)X
-720 846([LAR88])N
-1097(with)X
-1302(an)X
-2 f
-1440(hsearch)X
-1 f
-1756(compatible)X
-2174(interface.)X
-720 934(Intuitively,)N
-1099(a)X
-1161(hash)X
-1334(table)X
-1516(begins)X
-1751(as)X
-1844(a)X
-1905(single)X
-2121(bucket)X
-2360(and)X
-720 1022(grows)N
-941(in)X
-1028(generations,)X
-1443(where)X
-1665(a)X
-1725(generation)X
-2088(corresponds)X
-720 1110(to)N
-815(a)X
-884(doubling)X
-1201(in)X
-1296(the)X
-1427(size)X
-1585(of)X
-1685(the)X
-1815(hash)X
-1994(table.)X
-2222(The)X
-2379(0)X
-2 f
-7 s
-1078(th)Y
-10 s
-1 f
-720 1198(generation)N
-1085(occurs)X
-1321(as)X
-1414(the)X
-1538(table)X
-1719(grows)X
-1940(from)X
-2121(one)X
-2262(bucket)X
-720 1286(to)N
-814(two.)X
-1006(In)X
-1105(the)X
-1235(next)X
-1405(generation)X
-1776(the)X
-1906(table)X
-2093(grows)X
-2320(from)X
-720 1374(two)N
-862(to)X
-946(four.)X
-1122(During)X
-1371(each)X
-1541(generation,)X
-1921(every)X
-2121(bucket)X
-2356(that)X
-720 1462(existed)N
-967(at)X
-1045(the)X
-1163(beginning)X
-1503(of)X
-1590(the)X
-1708(generation)X
-2067(is)X
-2140(split.)X
-892 1576(The)N
-1041(table)X
-1221(starts)X
-1414(as)X
-1505(a)X
-1565(single)X
-1780(bucket)X
-2018(\(numbered)X
-2389(0\),)X
-720 1664(the)N
-839(current)X
-1088(split)X
-1245(bucket)X
-1479(is)X
-1552(set)X
-1661(to)X
-1743(bucket)X
-1977(0,)X
-2057(and)X
-2193(the)X
-2311(max-)X
-720 1752(imum)N
-933(split)X
-1097(point)X
-1288(is)X
-1368(set)X
-1483(to)X
-1571(twice)X
-1771(the)X
-1895(current)X
-2149(split)X
-2312(point)X
-720 1840(\(0\).)N
-863(When)X
-1084(it)X
-1157(is)X
-1239(time)X
-1410(for)X
-1532(a)X
-1596(bucket)X
-1838(to)X
-1928(split,)X
-2113(the)X
-2239(keys)X
-2414(in)X
-720 1928(the)N
-872(current)X
-1154(split)X
-1345(bucket)X
-1612(are)X
-1764(divided)X
-2057(between)X
-2378(the)X
-720 2016(current)N
-981(split)X
-1151(bucket)X
-1397(and)X
-1545(a)X
-1613(new)X
-1779(bucket)X
-2025(whose)X
-2262(bucket)X
-720 2104(number)N
-1000(is)X
-1088(equal)X
-1297(to)X
-1394(1)X
-1469(+)X
-1549(current)X
-1812(split)X
-1984(bucket)X
-2232(+)X
-2311(max-)X
-720 2192(imum)N
-927(split)X
-1085(point.)X
-1310(We)X
-1442(can)X
-1574(determine)X
-1915(which)X
-2131(keys)X
-2298(move)X
-720 2280(to)N
-807(the)X
-929(new)X
-1087(bucket)X
-1325(by)X
-1429(examining)X
-1791(the)X
-2 f
-1913(n)X
-7 s
-1962 2248(th)N
-10 s
-1 f
-2043 2280(bit)N
-2151(of)X
-2242(a)X
-2302(key's)X
-720 2368(hash)N
-899(value)X
-1105(where)X
-1334(n)X
-1406(is)X
-1491(the)X
-1620(generation)X
-1990(number.)X
-2306(After)X
-720 2456(the)N
-846(bucket)X
-1088(at)X
-1174(the)X
-1300(maximum)X
-1651(split)X
-1815(point)X
-2006(has)X
-2140(been)X
-2319(split,)X
-720 2544(the)N
-839(generation)X
-1198(number)X
-1463(is)X
-1536(incremented,)X
-1973(the)X
-2091(current)X
-2339(split)X
-720 2632(point)N
-908(is)X
-985(set)X
-1098(back)X
-1274(to)X
-1360(zero,)X
-1543(and)X
-1683(the)X
-1805(maximum)X
-2152(split)X
-2312(point)X
-720 2720(is)N
-815(set)X
-946(to)X
-1050(the)X
-1190(number)X
-1477(of)X
-1586(the)X
-1725(last)X
-1877(bucket)X
-2132(in)X
-2235(the)X
-2374(\256le)X
-720 2808(\(which)N
-971(is)X
-1052(equal)X
-1253(to)X
-1342(twice)X
-1543(the)X
-1668(old)X
-1797(maximum)X
-2148(split)X
-2312(point)X
-720 2896(plus)N
-873(1\).)X
-892 3010(To)N
-1031(facilitate)X
-1361(locating)X
-1668(keys,)X
-1884(we)X
-2027(maintain)X
-2356(two)X
-720 3098(masks.)N
-989(The)X
-1143(low)X
-1291(mask)X
-1488(is)X
-1569(equal)X
-1771(to)X
-1861(the)X
-1987(maximum)X
-2339(split)X
-720 3186(bucket)N
-967(and)X
-1116(the)X
-1247(high)X
-1422(mask)X
-1624(is)X
-1710(equal)X
-1917(to)X
-2011(the)X
-2141(next)X
-2311(max-)X
-720 3274(imum)N
-931(split)X
-1093(bucket.)X
-1372(To)X
-1486(locate)X
-1703(a)X
-1764(speci\256c)X
-2033(key,)X
-2193(we)X
-2311(com-)X
-720 3362(pute)N
-881(a)X
-940(32-bit)X
-1154(hash)X
-1324(value)X
-1520(using)X
-1715(a)X
-1773(bit-randomizing)X
-2311(algo-)X
-720 3450(rithm)N
-932(such)X
-1118(as)X
-1224(the)X
-1361(one)X
-1516(described)X
-1862(in)X
-1962([LAR88].)X
-2334(This)X
-720 3538(hash)N
-893(value)X
-1093(is)X
-1172(then)X
-1336(masked)X
-1607(with)X
-1775(the)X
-1898(high)X
-2065(mask.)X
-2299(If)X
-2378(the)X
-720 3626(resulting)N
-1026(number)X
-1297(is)X
-1376(greater)X
-1626(than)X
-1790(the)X
-1913(maximum)X
-2262(bucket)X
-720 3714(in)N
-823(the)X
-962(table)X
-1159(\(current)X
-1455(split)X
-1633(bucket)X
-1888(+)X
-1974(maximum)X
-2339(split)X
-720 3802(point\),)N
-962(the)X
-1091(hash)X
-1269(value)X
-1474(is)X
-1558(masked)X
-1834(with)X
-2007(the)X
-2136(low)X
-2287(mask.)X
-720 3890(In)N
-825(either)X
-1046(case,)X
-1242(the)X
-1377(result)X
-1592(of)X
-1696(the)X
-1831(mask)X
-2037(is)X
-2127(the)X
-2262(bucket)X
-720 3978(number)N
-989(for)X
-1107(the)X
-1229(given)X
-1431(key.)X
-1611(The)X
-1759(algorithm)X
-2093(below)X
-2312(illus-)X
-720 4066(trates)N
-914(this)X
-1049(process.)X
-0 f
-8 s
-720 4365(h)N
-796(=)X
-872 -0.4038(calchash\(key\);)AX
-720 4453(bucket)N
-986(=)X
-1062(h)X
-1138(&)X
-1214 -0.4167(high_mask;)AX
-720 4541(if)N
-834(\()X
-910(bucket)X
-1176(>)X
-1252 -0.4167(max_bucket)AX
-1670(\))X
-1008 4629(bucket)N
-1274(=)X
-1350(h)X
-1426(&)X
-1502 -0.4219(low_mask;)AX
-720 4717 -0.4018(return\(bucket\);)AN
-1 f
-10 s
-892 5042(In)N
-1013(order)X
-1237(to)X
-1353(decide)X
-1617(when)X
-1845(to)X
-1961(split)X
-2152(a)X
-2242(bucket,)X
-2 f
-720 5130(dynahash)N
-1 f
-1050(uses)X
-2 f
-1210(controlled)X
-1561(splitting)X
-1 f
-1822(.)X
-1884(A)X
-1964(hash)X
-2133(table)X
-2311(has)X
-2440(a)X
-720 5218(\256ll)N
-837(factor)X
-1054(which)X
-1279(is)X
-1361(expressed)X
-1707(in)X
-1798(terms)X
-2004(of)X
-2099(the)X
-2225(average)X
-720 5306(number)N
-990(of)X
-1082(keys)X
-1253(in)X
-1339(each)X
-1511(bucket.)X
-1789(Each)X
-1974(time)X
-2140(the)X
-2262(table's)X
-720 5394(total)N
-885(number)X
-1153(of)X
-1243(keys)X
-1413(divided)X
-1676(by)X
-1778(its)X
-1875(number)X
-2142(of)X
-2231(buckets)X
-720 5482(exceeds)N
-995(this)X
-1130(\256ll)X
-1238(factor,)X
-1466(a)X
-1522(bucket)X
-1756(is)X
-1829(split.)X
-2878 538(Since)N
-3079(the)X
-2 f
-3200(hsearch)X
-1 f
-3477(create)X
-3693(interface)X
-3998(\()X
-2 f
-4025(hcreate)X
-1 f
-4266(\))X
-4315(calls)X
-2706 626(for)N
-2842(an)X
-2960(estimate)X
-3269(of)X
-3378(the)X
-3518(\256nal)X
-3702(size)X
-3869(of)X
-3978(the)X
-4118(hash)X
-4306(table)X
-2706 714(\()N
-2 f
-2733(nelem)X
-1 f
-2925(\),)X
-2 f
-3007(dynahash)X
-1 f
-3349(uses)X
-3522(this)X
-3672(information)X
-4085(to)X
-4182(initialize)X
-2706 802(the)N
-2848(table.)X
-3088(The)X
-3257(initial)X
-3486(number)X
-3774(of)X
-3884(buckets)X
-4172(is)X
-4268(set)X
-4400(to)X
-2 f
-2706 890(nelem)N
-1 f
-2926(rounded)X
-3217(to)X
-3306(the)X
-3431(next)X
-3596(higher)X
-3828(power)X
-4056(of)X
-4150(two.)X
-4337(The)X
-2706 978(current)N
-2958(split)X
-3118(point)X
-3305(is)X
-3381(set)X
-3493(to)X
-3578(0)X
-3641(and)X
-3780(the)X
-3901(maximum)X
-4248(bucket)X
-2706 1066(and)N
-2842(maximum)X
-3186(split)X
-3343(point)X
-3527(are)X
-3646(set)X
-3755(to)X
-3837(this)X
-3972(rounded)X
-4255(value.)X
-3 f
-3148 1220(The)N
-3301(New)X
-3473(Implementation)X
-1 f
-2878 1352(Our)N
-3042(implementation)X
-3583(is)X
-3675(also)X
-3842(based)X
-4063(on)X
-4181(Larson's)X
-2706 1440(linear)N
-2939(hashing)X
-3238([LAR88])X
-3582(algorithm)X
-3943(as)X
-4060(well)X
-4248(as)X
-4364(the)X
-2 f
-2706 1528(dynahash)N
-1 f
-3047(implementation.)X
-3623(The)X
-2 f
-3782(dbm)X
-1 f
-3954(family)X
-4197(of)X
-4297(algo-)X
-2706 1616(rithms)N
-2942(decide)X
-3184(dynamically)X
-3612(which)X
-3840(bucket)X
-4085(to)X
-4178(split)X
-4346(and)X
-2706 1704(when)N
-2914(to)X
-3010(split)X
-3180(it)X
-3257(\(when)X
-3491(it)X
-3568(over\257ows\))X
-3944(while)X
-2 f
-4155(dynahash)X
-1 f
-2706 1792(splits)N
-2933(in)X
-3054(a)X
-3149(prede\256ned)X
-3547(order)X
-3776(\(linearly\))X
-4134(and)X
-4309(at)X
-4426(a)X
-2706 1880(prede\256ned)N
-3116(time)X
-3328(\(when)X
-3599(the)X
-3767(table)X
-3993(\256ll)X
-4151(factor)X
-4409(is)X
-2706 1968(exceeded\).)N
-3121(We)X
-3280(use)X
-3434(a)X
-3517(hybrid)X
-3773(of)X
-3887(these)X
-4099(techniques.)X
-2706 2056(Splits)N
-2913(occur)X
-3118(in)X
-3206(the)X
-3330(prede\256ned)X
-3695(order)X
-3891(of)X
-3984(linear)X
-4193(hashing,)X
-2706 2144(but)N
-2845(the)X
-2980(time)X
-3159(at)X
-3253(which)X
-3485(pages)X
-3704(are)X
-3839(split)X
-4012(is)X
-4101(determined)X
-2706 2232(both)N
-2869(by)X
-2970(page)X
-3143(over\257ows)X
-3480(\()X
-2 f
-3507(uncontrolled)X
-3937(splitting)X
-1 f
-4198(\))X
-4246(and)X
-4382(by)X
-2706 2320(exceeding)N
-3052(the)X
-3170(\256ll)X
-3278(factor)X
-3486(\()X
-2 f
-3513(controlled)X
-3862(splitting)X
-1 f
-4123(\))X
-2878 2434(A)N
-2962(hash)X
-3135(table)X
-3317(is)X
-3395(parameterized)X
-3876(by)X
-3981(both)X
-4148(its)X
-4248(bucket)X
-2706 2522(size)N
-2904(\()X
-2 f
-2931(bsize)X
-1 f
-(\))S
-3191(and)X
-3380(\256ll)X
-3541(factor)X
-3801(\()X
-2 f
-3828(ffactor)X
-1 f
-4041(\).)X
-4180(Whereas)X
-2 f
-2706 2610(dynahash's)N
-1 f
-3095(buckets)X
-3364(can)X
-3500(be)X
-3599(represented)X
-3993(as)X
-4083(a)X
-4142(linked)X
-4365(list)X
-2706 2698(of)N
-2798(elements)X
-3108(in)X
-3195(memory,)X
-3507(our)X
-3639(package)X
-3928(needs)X
-4136(to)X
-4222(support)X
-2706 2786(disk)N
-2874(access,)X
-3135(and)X
-3286(must)X
-3476(represent)X
-3806(buckets)X
-4086(in)X
-4183(terms)X
-4395(of)X
-2706 2874(pages.)N
-2955(The)X
-2 f
-3106(bsize)X
-1 f
-3291(is)X
-3369(the)X
-3492(size)X
-3642(\(in)X
-3756(bytes\))X
-3977(of)X
-4069(these)X
-4259(pages.)X
-2706 2962(As)N
-2833(in)X
-2933(linear)X
-3154(hashing,)X
-3461(the)X
-3597(number)X
-3879(of)X
-3983(buckets)X
-4265(in)X
-4364(the)X
-2706 3050(table)N
-2906(is)X
-3003(equal)X
-3221(to)X
-3327(the)X
-3469(number)X
-3758(of)X
-3869(keys)X
-4060(in)X
-4165(the)X
-4306(table)X
-2706 3138(divided)N
-2988(by)X
-2 f
-3110(ffactor)X
-1 f
-3323(.)X
-2 f
-8 s
-3113(6)Y
-1 f
-10 s
-3417 3138(The)N
-3584(controlled)X
-3950(splitting)X
-4252(occurs)X
-2706 3226(each)N
-2878(time)X
-3044(the)X
-3166(number)X
-3435(of)X
-3526(keys)X
-3697(in)X
-3783(the)X
-3905(table)X
-4085(exceeds)X
-4364(the)X
-2706 3314(\256ll)N
-2814(factor)X
-3022(multiplied)X
-3370(by)X
-3470(the)X
-3588(number)X
-3853(of)X
-3940(buckets.)X
-2878 3428(Inserting)N
-3187(keys)X
-3358(and)X
-3498(splitting)X
-3783(buckets)X
-4051(is)X
-4127(performed)X
-2706 3516(precisely)N
-3018(as)X
-3107(described)X
-3437(previously)X
-3796(for)X
-2 f
-3911(dynahash)X
-1 f
-4218(.)X
-4279(How-)X
-2706 3604(ever,)N
-2897(since)X
-3094(buckets)X
-3371(are)X
-3502(now)X
-3671(comprised)X
-4036(of)X
-4134(pages,)X
-4368(we)X
-2706 3692(must)N
-2883(be)X
-2981(prepared)X
-3284(to)X
-3367(handle)X
-3602(cases)X
-3793(where)X
-4011(the)X
-4130(size)X
-4276(of)X
-4364(the)X
-2706 3780(keys)N
-2873(and)X
-3009(data)X
-3163(in)X
-3245(a)X
-3301(bucket)X
-3535(exceed)X
-3779(the)X
-3897(bucket)X
-4131(size.)X
-3 f
-3318 3934(Over\257ow)N
-3654(Pages)X
-1 f
-2878 4066(There)N
-3095(are)X
-3223(two)X
-3372(cases)X
-3571(where)X
-3797(a)X
-3862(key)X
-4007(may)X
-4174(not)X
-4305(\256t)X
-4400(in)X
-2706 4154(its)N
-2802(designated)X
-3166(bucket.)X
-3441(In)X
-3529(the)X
-3647(\256rst)X
-3791(case,)X
-3970(the)X
-4088(total)X
-4250(size)X
-4395(of)X
-2706 4242(the)N
-2833(key)X
-2978(and)X
-3123(data)X
-3286(may)X
-3453(exceed)X
-3706(the)X
-3833(bucket)X
-4076(size.)X
-4269(In)X
-4364(the)X
-2706 4330(second,)N
-3008(addition)X
-3328(of)X
-3453(a)X
-3547(new)X
-3739(key)X
-3913(could)X
-4149(cause)X
-4386(an)X
-2706 4418(over\257ow,)N
-3068(but)X
-3227(the)X
-3382(bucket)X
-3652(in)X
-3770(question)X
-4097(is)X
-4206(not)X
-4364(yet)X
-2706 4506(scheduled)N
-3049(to)X
-3133(be)X
-3230(split.)X
-3428(In)X
-3516(existing)X
-3790(implementations,)X
-4364(the)X
-2706 4594(second)N
-2953(case)X
-3115(never)X
-3317(arises)X
-3523(\(since)X
-3738(buckets)X
-4006(are)X
-4128(split)X
-4288(when)X
-2706 4682(they)N
-2871(over\257ow\))X
-3210(and)X
-3352(the)X
-3476(\256rst)X
-3626(case)X
-3791(is)X
-3870(not)X
-3998(handled)X
-4278(at)X
-4362(all.)X
-2706 4770(Although)N
-3036(large)X
-3225(key/data)X
-3525(pair)X
-3678(handling)X
-3986(is)X
-4066(dif\256cult)X
-4346(and)X
-2706 4858(expensive,)N
-3083(it)X
-3163(is)X
-3252(essential.)X
-3604(In)X
-3706(a)X
-3777(linear)X
-3995(hashed)X
-4253(imple-)X
-2706 4946(mentation,)N
-3087(over\257ow)X
-3413(pages)X
-3636(are)X
-3775(required)X
-4083(for)X
-4217(buckets)X
-2706 5034(which)N
-2935(over\257ow)X
-3253(before)X
-3492(they)X
-3662(are)X
-3793(split,)X
-3982(so)X
-4085(we)X
-4211(can)X
-4355(use)X
-2706 5122(the)N
-2833(same)X
-3027(mechanism)X
-3421(for)X
-3544(large)X
-3734(key/data)X
-4035(pairs)X
-4220(that)X
-4368(we)X
-2706 5210(use)N
-2837(for)X
-2955(over\257ow)X
-3264(pages.)X
-3511(Logically,)X
-3862(we)X
-3980(chain)X
-4177(over\257ow)X
-16 s
-2706 5353 MXY
-864 0 Dl
-2 f
-8 s
-2746 5408(6)N
-1 f
-9 s
-2801 5433(This)N
-2952(is)X
-3023(not)X
-3138(strictly)X
-3361(true.)X
-3532(The)X
-3667(\256le)X
-3782(does)X
-3937(not)X
-4052(contract)X
-4306(when)X
-2706 5513(keys)N
-2861(are)X
-2972(deleted,)X
-3221(so)X
-3308(the)X
-3419(number)X
-3662(of)X
-3744(buckets)X
-3986(is)X
-4056(actually)X
-4306(equal)X
-2706 5593(to)N
-2782(the)X
-2890(maximum)X
-3202(number)X
-3441(of)X
-3520(keys)X
-3671(ever)X
-3814(present)X
-4041(in)X
-4116(the)X
-4223(table)X
-4382(di-)X
-2706 5673(vided)N
-2884(by)X
-2974(the)X
-3080(\256ll)X
-3178(factor.)X
-3 f
-10 s
-720 5960(USENIX)N
-9 f
-1042(-)X
-3 f
-1106(Winter)X
-1371('91)X
-9 f
-1498(-)X
-3 f
-1562(Dallas,)X
-1815(TX)X
-4424(5)X
-
-6 p
-%%Page: 6 6
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-432 258(A)N
-510(New)X
-682(Hashing)X
-985(Package)X
-1290(for)X
-1413(UNIX)X
-3663(Seltzer)X
-3920(&)X
-4007(Yigit)X
-1 f
-432 538(pages)N
-639(to)X
-725(the)X
-847(buckets)X
-1116(\(also)X
-1296(called)X
-1512(primary)X
-1789(pages\).)X
-2062(In)X
-2152(a)X
-432 626(memory)N
-730(based)X
-943(representation,)X
-1448(over\257ow)X
-1763(pages)X
-1976(do)X
-2086(not)X
-432 714(pose)N
-628(any)X
-792(special)X
-1063(problems)X
-1409(because)X
-1712(we)X
-1854(can)X
-2014(chain)X
-432 802(over\257ow)N
-776(pages)X
-1017(to)X
-1137(primary)X
-1449(pages)X
-1690(using)X
-1921(memory)X
-432 890(pointers.)N
-776(However,)X
-1137(mapping)X
-1463(these)X
-1674(over\257ow)X
-2005(pages)X
-432 978(into)N
-584(a)X
-648(disk)X
-809(\256le)X
-939(is)X
-1019(more)X
-1211(of)X
-1305(a)X
-1368(challenge,)X
-1723(since)X
-1915(we)X
-2036(need)X
-432 1066(to)N
-547(be)X
-675(able)X
-861(to)X
-975(address)X
-1268(both)X
-1462(bucket)X
-1728(pages,)X
-1983(whose)X
-432 1154(numbers)N
-729(are)X
-849(growing)X
-1137(linearly,)X
-1422(and)X
-1558(some)X
-1747(indeterminate)X
-432 1242(number)N
-715(of)X
-820(over\257ow)X
-1143(pages)X
-1364(without)X
-1646(reorganizing)X
-2090(the)X
-432 1330(\256le.)N
-604 1444(One)N
-789(simple)X
-1053(solution)X
-1361(would)X
-1612(be)X
-1739(to)X
-1852(allocate)X
-2152(a)X
-432 1532(separate)N
-737(\256le)X
-880(for)X
-1015(over\257ow)X
-1341(pages.)X
-1604(The)X
-1769(disadvantage)X
-432 1620(with)N
-605(such)X
-783(a)X
-850(technique)X
-1193(is)X
-1276(that)X
-1426(it)X
-1500(requires)X
-1789(an)X
-1895(extra)X
-2086(\256le)X
-432 1708(descriptor,)N
-794(an)X
-891(extra)X
-1073(system)X
-1316(call)X
-1453(on)X
-1554(open)X
-1731(and)X
-1867(close,)X
-2072(and)X
-432 1796(logically)N
-739(associating)X
-1122(two)X
-1269(independent)X
-1687(\256les.)X
-1886(For)X
-2023(these)X
-432 1884(reasons,)N
-728(we)X
-857(wanted)X
-1123(to)X
-1219(map)X
-1391(both)X
-1567(primary)X
-1855(pages)X
-2072(and)X
-432 1972(over\257ow)N
-737(pages)X
-940(into)X
-1084(the)X
-1202(same)X
-1387(\256le)X
-1509(space.)X
-604 2086(The)N
-799(buddy-in-waiting)X
-1425(algorithm)X
-1806(provides)X
-2152(a)X
-432 2174(mechanism)N
-851(to)X
-966(support)X
-1259(multiple)X
-1578(pages)X
-1814(per)X
-1970(logical)X
-432 2262(bucket)N
-685(while)X
-902(retaining)X
-1226(the)X
-1362(simple)X
-1613(split)X
-1788(sequence)X
-2121(of)X
-432 2350(linear)N
-681(hashing.)X
-1015(Over\257ow)X
-1383(pages)X
-1631(are)X
-1795(preallocated)X
-432 2438(between)N
-781(generations)X
-1232(of)X
-1379(primary)X
-1713(pages.)X
-1996(These)X
-432 2526(over\257ow)N
-759(pages)X
-984(are)X
-1125(used)X
-1314(by)X
-1436(any)X
-1594(bucket)X
-1850(containing)X
-432 2614(more)N
-646(keys)X
-842(than)X
-1029(\256t)X
-1144(on)X
-1273(the)X
-1420(primary)X
-1723(page)X
-1924(and)X
-2089(are)X
-432 2702(reclaimed,)N
-808(if)X
-896(possible,)X
-1217(when)X
-1430(the)X
-1567(bucket)X
-1819(later)X
-2000(splits.)X
-432 2790(Figure)N
-687(3)X
-773(depicts)X
-1045(the)X
-1188(layout)X
-1433(of)X
-1545(primary)X
-1844(pages)X
-2072(and)X
-432 2878(over\257ow)N
-752(pages)X
-970(within)X
-1209(the)X
-1342(same)X
-1542(\256le.)X
-1699(Over\257ow)X
-2036(page)X
-432 2966(use)N
-586(information)X
-1011(is)X
-1111(recorded)X
-1440(in)X
-1548(bitmaps)X
-1847(which)X
-2089(are)X
-432 3054(themselves)N
-819(stored)X
-1046(on)X
-1157(over\257ow)X
-1472(pages.)X
-1725(The)X
-1880(addresses)X
-432 3142(of)N
-520(the)X
-639(bitmap)X
-882(pages)X
-1086(and)X
-1223(the)X
-1342(number)X
-1608(of)X
-1695(pages)X
-1898(allocated)X
-432 3230(at)N
-515(each)X
-688(split)X
-850(point)X
-1039(are)X
-1163(stored)X
-1384(in)X
-1470(the)X
-1592(\256le)X
-1718(header.)X
-1997(Using)X
-432 3318(this)N
-577(information,)X
-1005(both)X
-1177(over\257ow)X
-1492(addresses)X
-1829(and)X
-1974(bucket)X
-432 3406(addresses)N
-764(can)X
-900(be)X
-999(mapped)X
-1276(to)X
-1361(disk)X
-1517(addresses)X
-1848(by)X
-1951(the)X
-2072(fol-)X
-432 3494(lowing)N
-674(calculation:)X
-0 f
-8 s
-432 3793(int)N
-736(bucket;)X
-1192(/*)X
-1306(bucket)X
-1572(address)X
-1876(*/)X
-432 3881(u_short)N
-736(oaddr;)X
-1192(/*)X
-1306(OVERFLOW)X
-1648(address)X
-1952(*/)X
-432 3969(int)N
-736 -0.4125(nhdr_pages;)AX
-1192(/*)X
-1306(npages)X
-1572(in)X
-1686 -112.4062(\256le)AX
-1838(header)X
-2104(*/)X
-432 4057(int)N
-736 -0.4125(spares[32];)AX
-1192(/*)X
-1306(npages)X
-1572(at)X
-1686(each)X
-1876(split)X
-2104(*/)X
-432 4145(int)N
-736(log2\(\);)X
-1198(/*)X
-1312(ceil\(log)X
-1654(base)X
-1844(2\))X
-1958(*/)X
-432 4321(#DEFINE)N
-736 -0.3929(BUCKET_TO_PAGE\(bucket\))AX
-1610(\\)X
-584 4409(bucket)N
-850(+)X
-926 -0.4167(nhdr_pages)AX
-1344(+)X
-1420(\\)X
-584 4497 -0.3894(\(bucket?spares[logs2\(bucket)AN
-1648(+)X
-1724(1\)-1]:0\))X
-432 4673(#DEFINE)N
-736 -0.3947(OADDR_TO_PAGE\(oaddr\))AX
-1534(\\)X
-584 4761 -0.3984(BUCKET_TO_PAGE\(\(1)AN
-1268(<<)X
-1382 -0.4091(\(oaddr>>11\)\))AX
-1876(-)X
-1952(1\))X
-2066(+)X
-2142(\\)X
-584 4849(oaddr)N
-812(&)X
-888(0x7ff;)X
-1 f
-10 s
-604 5262(An)N
-728(over\257ow)X
-1039(page)X
-1217(is)X
-1295(addressed)X
-1637(by)X
-1742(its)X
-1842(split)X
-2004(point,)X
-432 5350(identifying)N
-858(the)X
-1031(generations)X
-1476(between)X
-1819(which)X
-2090(the)X
-432 5438(over\257ow)N
-740(page)X
-915(is)X
-991(allocated,)X
-1324(and)X
-1463(its)X
-1561(page)X
-1736(number,)X
-2023(iden-)X
-432 5526(tifying)N
-665(the)X
-783(particular)X
-1111(page)X
-1283(within)X
-1507(the)X
-1625(split)X
-1782(point.)X
-1986(In)X
-2073(this)X
-432 5614(implementation,)N
-983(offsets)X
-1225(within)X
-1457(pages)X
-1668(are)X
-1795(16)X
-1903(bits)X
-2046(long)X
-432 5702(\(limiting)N
-732(the)X
-851(maximum)X
-1196(page)X
-1368(size)X
-1513(to)X
-1595(32K\),)X
-1800(so)X
-1891(we)X
-2005(select)X
-2418 538(an)N
-2535(over\257ow)X
-2860(page)X
-3052(addressing)X
-3435(algorithm)X
-3786(that)X
-3946(can)X
-4098(be)X
-2418 626(expressed)N
-2760(in)X
-2847(16)X
-2952(bits)X
-3091(and)X
-3231(which)X
-3451(allows)X
-3684(quick)X
-3886(retrieval.)X
-2418 714(The)N
-2568(top)X
-2695(\256ve)X
-2840(bits)X
-2980(indicate)X
-3258(the)X
-3380(split)X
-3541(point)X
-3729(and)X
-3869(the)X
-3991(lower)X
-2418 802(eleven)N
-2650(indicate)X
-2926(the)X
-3046(page)X
-3220(number)X
-3487(within)X
-3713(the)X
-3832(split)X
-3990(point.)X
-2418 890(Since)N
-2633(\256ve)X
-2789(bits)X
-2940(are)X
-3075(reserved)X
-3384(for)X
-3514(the)X
-3648(split)X
-3821(point,)X
-4041(\256les)X
-2418 978(may)N
-2578(split)X
-2737(32)X
-2839(times)X
-3034(yielding)X
-3318(a)X
-3376(maximum)X
-3721(\256le)X
-3844(size)X
-3990(of)X
-4078(2)X
-7 s
-946(32)Y
-10 s
-2418 1066(buckets)N
-2698(and)X
-2849(32)X
-2 f
-(*)S
-1 f
-2982(2)X
-7 s
-1034(11)Y
-10 s
-3113 1066(over\257ow)N
-3433(pages.)X
-3691(The)X
-3850(maximum)X
-2418 1154(page)N
-2597(size)X
-2749(is)X
-2829(2)X
-7 s
-1122(15)Y
-10 s
-1154(,)Y
-2971(yielding)X
-3259(a)X
-3321(maximum)X
-3671(\256le)X
-3799(size)X
-3950(greater)X
-2418 1242(than)N
-2601(131,000)X
-2906(GB)X
-3061(\(on)X
-3212(\256le)X
-3358(systems)X
-3655(supporting)X
-4041(\256les)X
-2418 1330(larger)N
-2626(than)X
-2784(4GB\).)X
-10 f
-2418 1418 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-1 Dt
-4014 2275 MXY
-0 133 Dl
-3881 2275 MXY
-0 133 Dl
-3748 2275 MXY
-0 133 Dl
-3083 2275 MXY
-0 133 Dl
-5 s
-1 f
-3523 2475(2/3)N
-3390(2/2)X
-3257(2/1)X
-2859(1/2)X
-2726(1/1)X
-5 Dt
-3814 1743 MXY
-0 133 Dl
-3282 1743 MXY
-0 133 Dl
-3017 1743 MXY
-0 133 Dl
-2884 1743 MXY
-0 133 Dl
-1 Dt
-3681 1743 MXY
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-3548 MX
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-3415 MX
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-3282 MX
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-3150 MX
-0 133 Dl
-132 0 Dl
-0 -133 Dl
--132 0 Dl
-3017 MX
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-2884 MX
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-3 f
-8 s
-3017 2601(Over\257ow)N
-3285(Addresses)X
-3515 2833(Over\257ow)N
-3783(Pages)X
-2850(Buckets)X
-1 Di
-3349 2740 MXY
- 3349 2740 lineto
- 3482 2740 lineto
- 3482 2873 lineto
- 3349 2873 lineto
- 3349 2740 lineto
-closepath 3 3349 2740 3482 2873 Dp
-2684 MX
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-5 Dt
-4146 2275 MXY
-0 133 Dl
-3216 2275 MXY
-0 133 Dl
-2684 2275 MXY
-0 133 Dl
-2551 2275 MXY
-0 133 Dl
-1 f
-3798 1963(3)N
-3266 1980(2)N
-3001(1)X
-2868(0)X
-1 Dt
-2751 1743 MXY
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-3548 2275 MXY
--15 -22 Dl
-2 16 Dl
--13 11 Dl
-26 -5 Dl
--282 -117 Dl
-3432 2275 MXY
--10 -25 Dl
--2 16 Dl
--15 8 Dl
-27 1 Dl
--166 -117 Dl
-3282 2275 MXY
-12 -25 Dl
--14 10 Dl
--15 -6 Dl
-17 21 Dl
--16 -117 Dl
-2884 2275 MXY
-26 7 Dl
--12 -12 Dl
-3 -16 Dl
--17 21 Dl
-382 -117 Dl
-2751 2275 MXY
-25 9 Dl
--11 -12 Dl
-5 -17 Dl
--19 20 Dl
-515 -117 Dl
-3 f
-3070 2152(Over\257ow)N
-3338(Pages)X
-3482 2275 MXY
- 3482 2275 lineto
- 3615 2275 lineto
- 3615 2408 lineto
- 3482 2408 lineto
- 3482 2275 lineto
-closepath 3 3482 2275 3615 2408 Dp
-3349 MX
- 3349 2275 lineto
- 3482 2275 lineto
- 3482 2408 lineto
- 3349 2408 lineto
- 3349 2275 lineto
-closepath 3 3349 2275 3482 2408 Dp
-3216 MX
- 3216 2275 lineto
- 3349 2275 lineto
- 3349 2408 lineto
- 3216 2408 lineto
- 3216 2275 lineto
-closepath 3 3216 2275 3349 2408 Dp
-2817 MX
- 2817 2275 lineto
- 2950 2275 lineto
- 2950 2408 lineto
- 2817 2408 lineto
- 2817 2275 lineto
-closepath 3 2817 2275 2950 2408 Dp
-2684 MX
- 2684 2275 lineto
- 2817 2275 lineto
- 2817 2408 lineto
- 2684 2408 lineto
- 2684 2275 lineto
-closepath 3 2684 2275 2817 2408 Dp
-3615 MX
-0 133 Dl
-531 0 Dl
-0 -133 Dl
--531 0 Dl
-2950 MX
-0 133 Dl
-266 0 Dl
-0 -133 Dl
--266 0 Dl
-2551 MX
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-3798 1726 MXY
--21 -18 Dl
-6 16 Dl
--10 13 Dl
-25 -11 Dl
--599 -99 Dl
-3266 1726 MXY
--1 -27 Dl
--7 15 Dl
--17 1 Dl
-25 11 Dl
--67 -99 Dl
-3033 1726 MXY
-27 1 Dl
--14 -8 Dl
--1 -17 Dl
--12 24 Dl
-166 -99 Dl
-2900 1726 MXY
-27 7 Dl
--13 -11 Dl
-3 -17 Dl
--17 21 Dl
-299 -99 Dl
-3058 1621(Split)N
-3203(Points)X
-2418 2275 MXY
-0 133 Dl
-133 0 Dl
-0 -133 Dl
--133 0 Dl
-3 Dt
--1 Ds
-3137(Figure)Y
-2619(3:)X
-1 f
-2691(Split)X
-2832(points)X
-3008(occur)X
-3168(between)X
-3399(generations)X
-3712(and)X
-3823(are)X
-3919(numbered)X
-2418 3225(from)N
-2560(0.)X
-2642(In)X
-2713(this)X
-2824(\256gure)X
-2991(there)X
-3136(are)X
-3231(two)X
-3345(over\257ow)X
-3590(pages)X
-3753(allocated)X
-4000(at)X
-4063(split)X
-2418 3313(point)N
-2566(1)X
-2614(and)X
-2722(three)X
-2865(allocated)X
-3111(at)X
-3173(split)X
-3300(point)X
-3448(2.)X
-10 s
-10 f
-2418 3489 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-3 f
-2949 3731(Buffer)N
-3192(Management)X
-1 f
-2590 3863(The)N
-2744(hash)X
-2920(table)X
-3105(is)X
-3187(stored)X
-3412(in)X
-3502(memory)X
-3797(as)X
-3892(a)X
-3956(logical)X
-2418 3951(array)N
-2633(of)X
-2749(bucket)X
-3012(pointers.)X
-3359(Physically,)X
-3761(the)X
-3907(array)X
-4121(is)X
-2418 4039(arranged)N
-2728(in)X
-2818(segments)X
-3144(of)X
-3239(256)X
-3387(pointers.)X
-3713(Initially,)X
-4013(there)X
-2418 4127(is)N
-2530(space)X
-2767(to)X
-2887(allocate)X
-3195(256)X
-3373(segments.)X
-3769(Reallocation)X
-2418 4215(occurs)N
-2651(when)X
-2847(the)X
-2967(number)X
-3234(of)X
-3323(buckets)X
-3590(exceeds)X
-3867(32K)X
-4027(\(256)X
-2418 4303(*)N
-2508(256\).)X
-2745(Primary)X
-3053(pages)X
-3286(may)X
-3473(be)X
-3598(accessed)X
-3929(directly)X
-2418 4391(through)N
-2711(the)X
-2853(array)X
-3062(by)X
-3185(bucket)X
-3442(number)X
-3730(and)X
-3889(over\257ow)X
-2418 4479(pages)N
-2628(are)X
-2754 0.4028(referenced)AX
-3122(logically)X
-3429(by)X
-3536(their)X
-3710(over\257ow)X
-4022(page)X
-2418 4567(address.)N
-2726(For)X
-2864(small)X
-3063(hash)X
-3236(tables,)X
-3469(it)X
-3539(is)X
-3618(desirable)X
-3934(to)X
-4022(keep)X
-2418 4655(all)N
-2525(pages)X
-2735(in)X
-2823(main)X
-3009(memory)X
-3302(while)X
-3506(on)X
-3612(larger)X
-3826(tables,)X
-4059(this)X
-2418 4743(is)N
-2523(probably)X
-2860(impossible.)X
-3298(To)X
-3438(satisfy)X
-3698(both)X
-3891(of)X
-4009(these)X
-2418 4831(requirements,)N
-2900(the)X
-3041(package)X
-3348(includes)X
-3658(buffer)X
-3897(manage-)X
-2418 4919(ment)N
-2598(with)X
-2760(LRU)X
-2940(\(least)X
-3134(recently)X
-3413(used\))X
-3607(replacement.)X
-2590 5033(By)N
-2730(default,)X
-3020(the)X
-3165(package)X
-3475(allocates)X
-3802(up)X
-3928(to)X
-4036(64K)X
-2418 5121(bytes)N
-2616(of)X
-2712(buffered)X
-3014(pages.)X
-3246(All)X
-3377(pages)X
-3589(in)X
-3680(the)X
-3807(buffer)X
-4032(pool)X
-2418 5209(are)N
-2542(linked)X
-2766(in)X
-2852(LRU)X
-3036(order)X
-3230(to)X
-3316(facilitate)X
-3621(fast)X
-3761(replacement.)X
-2418 5297(Whereas)N
-2724(ef\256cient)X
-3011(access)X
-3241(to)X
-3327(primary)X
-3605(pages)X
-3812(is)X
-3889(provided)X
-2418 5385(by)N
-2521(the)X
-2642(bucket)X
-2879(array,)X
-3087(ef\256cient)X
-3372(access)X
-3600(to)X
-3684(over\257ow)X
-3991(pages)X
-2418 5473(is)N
-2501(provided)X
-2816(by)X
-2926(linking)X
-3182(over\257ow)X
-3497(page)X
-3679(buffers)X
-3936(to)X
-4027(their)X
-2418 5561(predecessor)N
-2827(page)X
-3008(\(either)X
-3247(the)X
-3374(primary)X
-3657(page)X
-3838(or)X
-3933(another)X
-2418 5649(over\257ow)N
-2742(page\).)X
-3000(This)X
-3181(means)X
-3425(that)X
-3584(an)X
-3699(over\257ow)X
-4022(page)X
-3 f
-432 5960(6)N
-2970(USENIX)X
-9 f
-3292(-)X
-3 f
-3356(Winter)X
-3621('91)X
-9 f
-3748(-)X
-3 f
-3812(Dallas,)X
-4065(TX)X
-
-7 p
-%%Page: 7 7
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-720 258(Seltzer)N
-977(&)X
-1064(Yigit)X
-3278(A)X
-3356(New)X
-3528(Hashing)X
-3831(Package)X
-4136(for)X
-4259(UNIX)X
-1 f
-720 538(cannot)N
-955(be)X
-1052(present)X
-1305(in)X
-1388(the)X
-1507(buffer)X
-1724(pool)X
-1886(if)X
-1955(its)X
-2050(primary)X
-2324(page)X
-720 626(is)N
-804(not)X
-937(present.)X
-1240(This)X
-1413(does)X
-1591(not)X
-1724(impact)X
-1972(performance)X
-2409(or)X
-720 714(functionality,)N
-1209(because)X
-1524(an)X
-1660(over\257ow)X
-2005(page)X
-2217(will)X
-2400(be)X
-720 802(accessed)N
-1048(only)X
-1236(after)X
-1430(its)X
-1550(predecessor)X
-1975(page)X
-2172(has)X
-2324(been)X
-720 890(accessed.)N
-1068(Figure)X
-1303(4)X
-1369(depicts)X
-1622(the)X
-1746(data)X
-1905(structures)X
-2242(used)X
-2414(to)X
-720 978(manage)N
-990(the)X
-1108(buffer)X
-1325(pool.)X
-892 1092(The)N
-1040(in-memory)X
-1419(bucket)X
-1656(array)X
-1845(contains)X
-2134(pointers)X
-2414(to)X
-720 1180(buffer)N
-975(header)X
-1248(structures)X
-1617(which)X
-1870(represent)X
-2222(primary)X
-720 1268(pages.)N
-968(Buffer)X
-1203(headers)X
-1474(contain)X
-1735(modi\256ed)X
-2043(bits,)X
-2202(the)X
-2324(page)X
-720 1356(address)N
-995(of)X
-1096(the)X
-1228(buffer,)X
-1479(a)X
-1548(pointer)X
-1808(to)X
-1903(the)X
-2034(actual)X
-2259(buffer,)X
-720 1444(and)N
-875(a)X
-950(pointer)X
-1216(to)X
-1317(the)X
-1454(buffer)X
-1690(header)X
-1944(for)X
-2077(an)X
-2191(over\257ow)X
-720 1532(page)N
-901(if)X
-979(it)X
-1052(exists,)X
-1283(in)X
-1374(addition)X
-1665(to)X
-1756(the)X
-1883(LRU)X
-2072(links.)X
-2296(If)X
-2378(the)X
-720 1620(buffer)N
-950(corresponding)X
-1442(to)X
-1537(a)X
-1606(particular)X
-1947(bucket)X
-2194(is)X
-2280(not)X
-2414(in)X
-720 1708(memory,)N
-1048(its)X
-1164(pointer)X
-1432(is)X
-1526(NULL.)X
-1801(In)X
-1909(effect,)X
-2154(pages)X
-2377(are)X
-720 1796(linked)N
-950(in)X
-1042(three)X
-1233(ways.)X
-1468(Using)X
-1689(the)X
-1817(buffer)X
-2043(headers,)X
-2338(they)X
-720 1884(are)N
-851(linked)X
-1083(physically)X
-1444(through)X
-1725(the)X
-1854(LRU)X
-2045(links)X
-2231(and)X
-2378(the)X
-720 1972(over\257ow)N
-1036(links.)X
-1241(Using)X
-1462(the)X
-1590(pages)X
-1803(themselves,)X
-2209(they)X
-2377(are)X
-720 2060(linked)N
-943(logically)X
-1246(through)X
-1518(the)X
-1639(over\257ow)X
-1946(addresses)X
-2276(on)X
-2378(the)X
-720 2148(page.)N
-948(Since)X
-1162(over\257ow)X
-1482(pages)X
-1700(are)X
-1834(accessed)X
-2151(only)X
-2328(after)X
-720 2236(their)N
-904(predecessor)X
-1321(pages,)X
-1560(they)X
-1734(are)X
-1869(removed)X
-2186(from)X
-2378(the)X
-720 2324(buffer)N
-937(pool)X
-1099(when)X
-1293(their)X
-1460(primary)X
-1734(is)X
-1807(removed.)X
-10 f
-720 2412 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-1 Dt
-2309 3177 MXY
-24 15 Dl
--8 -15 Dl
-8 -15 Dl
--24 15 Dl
-52 0 Dl
-789 3160 MXY
--35 0 Dl
-0 -156 Dl
-1607 0 Dl
-0 173 Dl
-789 3091 MXY
--24 -15 Dl
-9 15 Dl
--9 15 Dl
-24 -15 Dl
--69 0 Dl
-2309 3125 MXY
-104 0 Dl
-0 -155 Dl
--1693 0 Dl
-0 121 Dl
-927 3160 MXY
-24 15 Dl
--9 -15 Dl
-9 -15 Dl
--24 15 Dl
-553 0 Dl
-1618 3177 MXY
-8 27 Dl
-4 -17 Dl
-16 -6 Dl
--28 -4 Dl
-138 121 Dl
-1895 3315 MXY
-28 3 Dl
--15 -9 Dl
-1 -18 Dl
--14 24 Dl
-276 -138 Dl
-3108 MY
--28 -3 Dl
-15 10 Dl
--1 17 Dl
-14 -24 Dl
--276 138 Dl
-1756 3229 MXY
--8 -27 Dl
--3 17 Dl
--16 6 Dl
-27 4 Dl
--138 -121 Dl
-1480 MX
--24 -15 Dl
-9 15 Dl
--9 15 Dl
-24 -15 Dl
--553 0 Dl
-3 f
-5 s
-1083 3073(LRU)N
-1178(chain)X
-4 Ds
-1402 3851 MXY
- 1402 3851 lineto
- 1471 3851 lineto
- 1471 3920 lineto
- 1402 3920 lineto
- 1402 3851 lineto
-closepath 19 1402 3851 1471 3920 Dp
-1445 3747(Over\257ow)N
-1613(Address)X
-1549 3609 MXY
-0 69 Dl
-1756 MX
--23 -15 Dl
-8 15 Dl
--8 15 Dl
-23 -15 Dl
--207 0 Dl
--1 Ds
-3 Dt
-1756 3419 MXY
--6 -28 Dl
--4 17 Dl
--17 5 Dl
-27 6 Dl
--138 -138 Dl
-2240 3471 MXY
-15 -24 Dl
--15 9 Dl
--15 -9 Dl
-15 24 Dl
-0 -138 Dl
-1826 3609 MXY
-15 -24 Dl
--15 9 Dl
--16 -9 Dl
-16 24 Dl
-0 -138 Dl
-1549 MX
-15 -24 Dl
--15 9 Dl
--15 -9 Dl
-15 24 Dl
-0 -138 Dl
-858 3471 MXY
-15 -24 Dl
--15 9 Dl
--15 -9 Dl
-15 24 Dl
-0 -138 Dl
-2240 3056 MXY
-15 -24 Dl
--15 9 Dl
--15 -9 Dl
-15 24 Dl
-0 -138 Dl
-1549 3056 MXY
-15 -24 Dl
--15 9 Dl
--15 -9 Dl
-15 24 Dl
-0 -138 Dl
-858 3056 MXY
-15 -24 Dl
--15 9 Dl
--15 -9 Dl
-15 24 Dl
-0 -138 Dl
-1 Dt
-2171 3471 MXY
- 2171 3471 lineto
- 2448 3471 lineto
- 2448 3609 lineto
- 2171 3609 lineto
- 2171 3471 lineto
-closepath 19 2171 3471 2448 3609 Dp
-1756 3609 MXY
- 1756 3609 lineto
- 2033 3609 lineto
- 2033 3747 lineto
- 1756 3747 lineto
- 1756 3609 lineto
-closepath 3 1756 3609 2033 3747 Dp
-1480 3471 MXY
- 1480 3471 lineto
- 1756 3471 lineto
- 1756 3609 lineto
- 1480 3609 lineto
- 1480 3471 lineto
-closepath 19 1480 3471 1756 3609 Dp
-789 MX
- 789 3471 lineto
- 1065 3471 lineto
- 1065 3609 lineto
- 789 3609 lineto
- 789 3471 lineto
-closepath 19 789 3471 1065 3609 Dp
-962 3903(Buffer)N
-1083(Header)X
-849 3851 MXY
- 849 3851 lineto
- 918 3851 lineto
- 918 3920 lineto
- 849 3920 lineto
- 849 3851 lineto
-closepath 14 849 3851 918 3920 Dp
-1756 3194 MXY
- 1756 3194 lineto
- 1895 3194 lineto
- 1895 3471 lineto
- 1756 3471 lineto
- 1756 3194 lineto
-closepath 14 1756 3194 1895 3471 Dp
-2171 3056 MXY
- 2171 3056 lineto
- 2309 3056 lineto
- 2309 3333 lineto
- 2171 3333 lineto
- 2171 3056 lineto
-closepath 14 2171 3056 2309 3333 Dp
-1480 MX
- 1480 3056 lineto
- 1618 3056 lineto
- 1618 3333 lineto
- 1480 3333 lineto
- 1480 3056 lineto
-closepath 14 1480 3056 1618 3333 Dp
-789 MX
- 789 3056 lineto
- 927 3056 lineto
- 927 3333 lineto
- 789 3333 lineto
- 789 3056 lineto
-closepath 14 789 3056 927 3333 Dp
-2780 MY
-0 138 Dl
-138 0 Dl
-0 -138 Dl
--138 0 Dl
-927 MX
-0 138 Dl
-138 0 Dl
-0 -138 Dl
--138 0 Dl
-1065 MX
-0 138 Dl
-138 0 Dl
-0 -138 Dl
--138 0 Dl
-1203 MX
-0 138 Dl
-139 0 Dl
-0 -138 Dl
--139 0 Dl
-1342 MX
-0 138 Dl
-138 0 Dl
-0 -138 Dl
--138 0 Dl
-1480 MX
-0 138 Dl
-138 0 Dl
-0 -138 Dl
--138 0 Dl
-1618 MX
-0 138 Dl
-138 0 Dl
-0 -138 Dl
--138 0 Dl
-1756 MX
-0 138 Dl
-139 0 Dl
-0 -138 Dl
--139 0 Dl
-1895 MX
-0 138 Dl
-138 0 Dl
-0 -138 Dl
--138 0 Dl
-2033 MX
-0 138 Dl
-138 0 Dl
-0 -138 Dl
--138 0 Dl
-2171 MX
-0 138 Dl
-138 0 Dl
-0 -138 Dl
--138 0 Dl
-2309 MX
-0 138 Dl
-139 0 Dl
-0 -138 Dl
--139 0 Dl
-13 s
-1048 2720(In)N
-1173(Memory)X
-1580(Bucket)X
-1918(Array)X
-867 3584(B0)N
-1558(B5)X
-2223(B10)X
-1788 3722(O1/1)N
-5 s
-1515 3903(Primay)N
-1651(Buffer)X
-4 Ds
-1990 3851 MXY
- 1990 3851 lineto
- 2059 3851 lineto
- 2059 3920 lineto
- 1990 3920 lineto
- 1990 3851 lineto
-closepath 3 1990 3851 2059 3920 Dp
-2102 3903(Over\257ow)N
-2270(Buffer)X
-3 Dt
--1 Ds
-8 s
-720 4184(Figure)N
-922(4:)X
-1 f
-996(Three)X
-1164(primary)X
-1386(pages)X
-1551(\(B0,)X
-1683(B5,)X
-1794(B10\))X
-1942(are)X
-2039(accessed)X
-2281(directly)X
-720 4272(from)N
-862(the)X
-958(bucket)X
-1146(array.)X
-1326(The)X
-1443(one)X
-1553(over\257ow)X
-1798(page)X
-1935(\(O1/1\))X
-2122(is)X
-2182(linked)X
-2359(phy-)X
-720 4360(sically)N
-915(from)X
-1067(its)X
-1155(primary)X
-1384(page's)X
-1577(buffer)X
-1759(header)X
-1955(as)X
-2035(well)X
-2172(as)X
-2252(logically)X
-720 4448(from)N
-860(its)X
-937(predecessor)X
-1253(page)X
-1389(buffer)X
-1560(\(B5\).)X
-10 s
-10 f
-720 4624 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-3 f
-1191 4954(Table)N
-1406(Parameterization)X
-1 f
-892 5086(When)N
-1107(a)X
-1166(hash)X
-1336(table)X
-1515(is)X
-1590(created,)X
-1865(the)X
-1985(bucket)X
-2221(size,)X
-2388(\256ll)X
-720 5174(factor,)N
-953(initial)X
-1164(number)X
-1434(of)X
-1526(elements,)X
-1856(number)X
-2125(of)X
-2216(bytes)X
-2409(of)X
-720 5262(main)N
-919(memory)X
-1225(used)X
-1411(for)X
-1543(caching,)X
-1851(and)X
-2005(a)X
-2079(user-de\256ned)X
-720 5350(hash)N
-892(function)X
-1184(may)X
-1347(be)X
-1448(speci\256ed.)X
-1797(The)X
-1946(bucket)X
-2184(size)X
-2333(\(and)X
-720 5438(page)N
-906(size)X
-1064(for)X
-1191(over\257ow)X
-1509(pages\))X
-1752(defaults)X
-2039(to)X
-2134(256)X
-2287(bytes.)X
-720 5526(For)N
-858(tables)X
-1072(with)X
-1241(large)X
-1429(data)X
-1590(items,)X
-1810(it)X
-1881(may)X
-2046(be)X
-2149(preferable)X
-720 5614(to)N
-803(increase)X
-1088(the)X
-1207(page)X
-1380(size,)X
-1545(and,)X
-1701(conversely,)X
-2089(applications)X
-720 5702(storing)N
-1002(small)X
-1235(items)X
-1467(exclusively)X
-1891(in)X
-2012(memory)X
-2338(may)X
-2706 538(bene\256t)N
-2966(from)X
-3164(a)X
-3242(smaller)X
-3520(bucket)X
-3776(size.)X
-3983(A)X
-4082(bucket)X
-4337(size)X
-2706 626(smaller)N
-2962(than)X
-3120(64)X
-3220(bytes)X
-3409(is)X
-3482(not)X
-3604(recommended.)X
-2878 740(The)N
-3031(\256ll)X
-3147(factor)X
-3363(indicates)X
-3676(a)X
-3740(desired)X
-4000(density)X
-4258(within)X
-2706 828(the)N
-2833(hash)X
-3009(table.)X
-3234(It)X
-3312(is)X
-3394(an)X
-3499(approximation)X
-3995(of)X
-4091(the)X
-4217(number)X
-2706 916(of)N
-2815(keys)X
-3004(allowed)X
-3300(to)X
-3404(accumulate)X
-3811(in)X
-3914(any)X
-4071(one)X
-4228(bucket,)X
-2706 1004(determining)N
-3119(when)X
-3319(the)X
-3442(hash)X
-3614(table)X
-3795(grows.)X
-4056(Its)X
-4161(default)X
-4409(is)X
-2706 1092(eight.)N
-2953(If)X
-3054(the)X
-3199(user)X
-3380(knows)X
-3636(the)X
-3781(average)X
-4079(size)X
-4251(of)X
-4364(the)X
-2706 1180(key/data)N
-3008(pairs)X
-3194(being)X
-3402(stored)X
-3627(in)X
-3718(the)X
-3845(table,)X
-4050(near)X
-4218(optimal)X
-2706 1268(bucket)N
-2943(sizes)X
-3122(and)X
-3261(\256ll)X
-3372(factors)X
-3614(may)X
-3775(be)X
-3874(selected)X
-4155(by)X
-4257(apply-)X
-2706 1356(ing)N
-2828(the)X
-2946(equation:)X
-0 f
-8 s
-2706 1655(\(1\))N
-2994 -0.3938(\(\(average_pair_length)AX
-3830(+)X
-3906(4\))X
-4020(*)X
-3032 1743(ffactor\))N
-3374(>=)X
-3488(bsize)X
-1 f
-10 s
-2706 2042(For)N
-2859(highly)X
-3104(time)X
-3287(critical)X
-3551(applications,)X
-3999(experimenting)X
-2706 2130(with)N
-2919(different)X
-3266(bucket)X
-3550(sizes)X
-3776(and)X
-3962(\256ll)X
-4120(factors)X
-4409(is)X
-2706 2218(encouraged.)N
-2878 2332(Figures)N
-3144(5a,b,)X
-3326(and)X
-3468(c)X
-3530(illustrate)X
-3836(the)X
-3960(effects)X
-4200(of)X
-4292(vary-)X
-2706 2420(ing)N
-2841(page)X
-3026(sizes)X
-3215(and)X
-3363(\256ll)X
-3483(factors)X
-3734(for)X
-3860(the)X
-3990(same)X
-4187(data)X
-4353(set.)X
-2706 2508(The)N
-2864(data)X
-3031(set)X
-3152(consisted)X
-3482(of)X
-3581(24474)X
-3813(keys)X
-3992(taken)X
-4198(from)X
-4386(an)X
-2706 2596(online)N
-2931(dictionary.)X
-3301(The)X
-3451(data)X
-3609(value)X
-3807(for)X
-3925(each)X
-4097(key)X
-4237(was)X
-4386(an)X
-2706 2684(ASCII)N
-2938(string)X
-3143(for)X
-3260(an)X
-3359(integer)X
-3605(from)X
-3784(1)X
-3847(to)X
-3931(24474)X
-4153(inclusive.)X
-2706 2772(The)N
-2867(test)X
-3013(run)X
-3155(consisted)X
-3488(of)X
-3590(creating)X
-3884(a)X
-3955(new)X
-4124(hash)X
-4306(table)X
-2706 2860(\(where)N
-2966(the)X
-3100(ultimate)X
-3398(size)X
-3559(of)X
-3662(the)X
-3796(table)X
-3987(was)X
-4147(known)X
-4400(in)X
-2706 2948(advance\),)N
-3054(entering)X
-3354(each)X
-3539(key/data)X
-3848(pair)X
-4010(into)X
-4171(the)X
-4306(table)X
-2706 3036(and)N
-2849(then)X
-3014(retrieving)X
-3353(each)X
-3528(key/data)X
-3827(pair)X
-3979(from)X
-4162(the)X
-4286(table.)X
-2706 3124(Each)N
-2898(of)X
-2996(the)X
-3125(graphs)X
-3369(shows)X
-3599(the)X
-3727(timings)X
-3996(resulting)X
-4306(from)X
-2706 3212(varying)N
-2973(the)X
-3093(pagesize)X
-3392(from)X
-3570(128)X
-3712(bytes)X
-3903(to)X
-3986(1M)X
-4118(and)X
-4255(the)X
-4374(\256ll)X
-2706 3300(factor)N
-2929(from)X
-3120(1)X
-3195(to)X
-3292(128.)X
-3486(For)X
-3631(each)X
-3813(run,)X
-3974(the)X
-4106(buffer)X
-4337(size)X
-2706 3388(was)N
-2874(set)X
-3006(at)X
-3106(1M.)X
-3299(The)X
-3466(tests)X
-3650(were)X
-3849(all)X
-3971(run)X
-4120(on)X
-4242(an)X
-4360(HP)X
-2706 3476(9000/370)N
-3077(\(33.3)X
-3312(Mhz)X
-3527(MC68030\),)X
-3966(with)X
-4176(16M)X
-4395(of)X
-2706 3564(memory,)N
-3042(64K)X
-3228(physically)X
-3605(addressed)X
-3970(cache,)X
-4222(and)X
-4386(an)X
-2706 3652(HP7959S)N
-3055(disk)X
-3231(drive,)X
-3459(running)X
-3751(4.3BSD-Reno)X
-4244(single-)X
-2706 3740(user.)N
-2878 3854(Both)N
-3066(system)X
-3321(time)X
-3496(\(Figure)X
-3764(5a\))X
-3899(and)X
-4047(elapsed)X
-4320(time)X
-2706 3942(\(Figure)N
-2966(5b\))X
-3097(show)X
-3290(that)X
-3434(for)X
-3552(all)X
-3655(bucket)X
-3892(sizes,)X
-4091(the)X
-4212(greatest)X
-2706 4030(performance)N
-3137(gains)X
-3329(are)X
-3451(made)X
-3648(by)X
-3751(increasing)X
-4104(the)X
-4225(\256ll)X
-4336(fac-)X
-2706 4118(tor)N
-2822(until)X
-2995(equation)X
-3298(1)X
-3365(is)X
-3445(satis\256ed.)X
-3774(The)X
-3925(user)X
-4085(time)X
-4253(shown)X
-2706 4206(in)N
-2791(Figure)X
-3023(5c)X
-3122(gives)X
-3314(a)X
-3373(more)X
-3561(detailed)X
-3838(picture)X
-4083(of)X
-4172(how)X
-4332(per-)X
-2706 4294(formance)N
-3054(varies.)X
-3330(The)X
-3499(smaller)X
-3778(bucket)X
-4035(sizes)X
-4234(require)X
-2706 4382(fewer)N
-2921(keys)X
-3099(per)X
-3233(page)X
-3416(to)X
-3509(satisfy)X
-3749(equation)X
-4056(1)X
-4127(and)X
-4274(there-)X
-2706 4470(fore)N
-2860(incur)X
-3049(fewer)X
-3257(collisions.)X
-3607(However,)X
-3946(when)X
-4144(the)X
-4265(buffer)X
-2706 4558(pool)N
-2884(size)X
-3045(is)X
-3134(\256xed,)X
-3349(smaller)X
-3620(pages)X
-3838(imply)X
-4059(more)X
-4259(pages.)X
-2706 4646(An)N
-2830(increased)X
-3160(number)X
-3430(of)X
-3522(pages)X
-3730(means)X
-3960(more)X
-2 f
-4150(malloc\(3\))X
-1 f
-2706 4734(calls)N
-2879(and)X
-3021(more)X
-3212(overhead)X
-3533(in)X
-3621(the)X
-3745(hash)X
-3918(package's)X
-4265(buffer)X
-2706 4822(manager)N
-3003(to)X
-3085(manage)X
-3355(the)X
-3473(additional)X
-3813(pages.)X
-2878 4936(The)N
-3028(tradeoff)X
-3308(works)X
-3529(out)X
-3655(most)X
-3834(favorably)X
-4166(when)X
-4364(the)X
-2706 5024(page)N
-2886(size)X
-3039(is)X
-3120(256)X
-3268(and)X
-3412(the)X
-3538(\256ll)X
-3654(factor)X
-3870(is)X
-3950(8.)X
-4057(Similar)X
-4319(con-)X
-2706 5112(clusions)N
-3009(were)X
-3207(obtained)X
-3524(if)X
-3614(the)X
-3753(test)X
-3905(was)X
-4071(run)X
-4218(without)X
-2706 5200(knowing)N
-3007(the)X
-3126(\256nal)X
-3289(table)X
-3466(size)X
-3612(in)X
-3695(advance.)X
-4020(If)X
-4095(the)X
-4214(\256le)X
-4337(was)X
-2706 5288(closed)N
-2942(and)X
-3088(written)X
-3345(to)X
-3437(disk,)X
-3620(the)X
-3748(conclusions)X
-4156(were)X
-4343(still)X
-2706 5376(the)N
-2832(same.)X
-3065(However,)X
-3408(rereading)X
-3740(the)X
-3865(\256le)X
-3994(from)X
-4177(disk)X
-4337(was)X
-2706 5464(slightly)N
-2983(faster)X
-3199(if)X
-3285(a)X
-3358(larger)X
-3583(bucket)X
-3834(size)X
-3996(and)X
-4149(\256ll)X
-4274(factor)X
-2706 5552(were)N
-2898(used)X
-3079(\(1K)X
-3238(bucket)X
-3486(size)X
-3645(and)X
-3795(32)X
-3909(\256ll)X
-4031(factor\).)X
-4320(This)X
-2706 5640(follows)N
-2987(intuitively)X
-3356(from)X
-3553(the)X
-3691(improved)X
-4038(ef\256ciency)X
-4395(of)X
-3 f
-720 5960(USENIX)N
-9 f
-1042(-)X
-3 f
-1106(Winter)X
-1371('91)X
-9 f
-1498(-)X
-3 f
-1562(Dallas,)X
-1815(TX)X
-4424(7)X
-
-8 p
-%%Page: 8 8
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-432 258(A)N
-510(New)X
-682(Hashing)X
-985(Package)X
-1290(for)X
-1413(UNIX)X
-3663(Seltzer)X
-3920(&)X
-4007(Yigit)X
-1 f
-432 538(performing)N
-830(1K)X
-965(reads)X
-1172(from)X
-1365(the)X
-1500(disk)X
-1670(rather)X
-1894(than)X
-2068(256)X
-432 626(byte)N
-609(reads.)X
-857(In)X
-962(general,)X
-1257(performance)X
-1702(for)X
-1834(disk)X
-2005(based)X
-432 714(tables)N
-639(is)X
-712(best)X
-861(when)X
-1055(the)X
-1173(page)X
-1345(size)X
-1490(is)X
-1563(approximately)X
-2046(1K.)X
-10 f
-432 802 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-619 2380 MXY
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-629 2437 MXY
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-648 2504 MXY
--12 25 Dl
-24 0 Dl
--12 -25 Dl
-686 2515 MXY
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-762 2516 MXY
--12 24 Dl
-25 0 Dl
--13 -24 Dl
-916 2515 MXY
--13 24 Dl
-25 0 Dl
--12 -24 Dl
-1222 2516 MXY
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-1834 2515 MXY
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-1 Dt
-619 2392 MXY
-10 57 Dl
-19 67 Dl
-38 11 Dl
-76 1 Dl
-154 -1 Dl
-306 1 Dl
-612 -1 Dl
-8 s
-1 f
-1628 2522(128)N
-3 Dt
-607 2245 MXY
-24 Dc
-617 2375 MXY
-23 Dc
-635 2442 MXY
-24 Dc
-674 2525 MXY
-23 Dc
-750 2529 MXY
-24 Dc
-904 2527 MXY
-23 Dc
-1210 MX
-23 Dc
-1822 2528 MXY
-23 Dc
-20 Ds
-1 Dt
-619 2245 MXY
-10 130 Dl
-19 67 Dl
-38 83 Dl
-76 4 Dl
-154 -2 Dl
-306 0 Dl
-612 1 Dl
-678 2482(256)N
--1 Ds
-3 Dt
-619 2127 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-629 2191 MXY
-0 25 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-648 2334 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-686 2409 MXY
-0 25 Dl
-0 -13 Dl
-12 0 Dl
--24 0 Dl
-762 2516 MXY
-0 25 Dl
-0 -12 Dl
-13 0 Dl
--25 0 Dl
-916 2516 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--25 0 Dl
-1222 2515 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-1834 2515 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-5 Dt
-619 2139 MXY
-10 65 Dl
-19 142 Dl
-38 75 Dl
-76 108 Dl
-154 -1 Dl
-306 -1 Dl
-612 0 Dl
-694 2401(512)N
-3 Dt
-631 2064 MXY
--24 24 Dl
-12 -12 Dl
--12 -12 Dl
-24 24 Dl
-641 2077 MXY
--24 25 Dl
-12 -12 Dl
--12 -13 Dl
-24 25 Dl
-660 2132 MXY
--24 24 Dl
-12 -12 Dl
--12 -12 Dl
-24 24 Dl
-698 2292 MXY
--24 24 Dl
-12 -12 Dl
--12 -12 Dl
-24 24 Dl
-775 2382 MXY
--25 24 Dl
-12 -12 Dl
--12 -12 Dl
-25 24 Dl
-928 2516 MXY
--25 24 Dl
-13 -12 Dl
--13 -12 Dl
-25 24 Dl
-1234 2516 MXY
--24 25 Dl
-12 -12 Dl
--12 -13 Dl
-24 25 Dl
-1846 2516 MXY
--24 24 Dl
-12 -12 Dl
--12 -12 Dl
-24 24 Dl
-16 Ds
-1 Dt
-619 2076 MXY
-10 14 Dl
-19 54 Dl
-38 160 Dl
-76 90 Dl
-154 134 Dl
-306 1 Dl
-612 -1 Dl
-694 2257(1024)N
--1 Ds
-3 Dt
-619 1877 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-629 1855 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-648 1838 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-686 1860 MXY
-12 -25 Dl
--24 0 Dl
-12 25 Dl
-762 1923 MXY
-13 -24 Dl
--25 0 Dl
-12 24 Dl
-916 2087 MXY
-12 -24 Dl
--25 0 Dl
-13 24 Dl
-1222 2256 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-1834 2541 MXY
-12 -25 Dl
--24 0 Dl
-12 25 Dl
-619 1865 MXY
-10 -22 Dl
-19 -17 Dl
-38 21 Dl
-76 64 Dl
-154 164 Dl
-306 169 Dl
-612 285 Dl
-1645 2427(4096)N
-619 1243 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-629 1196 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-648 1146 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-686 1174 MXY
-0 25 Dl
-0 -13 Dl
-12 0 Dl
--24 0 Dl
-762 1249 MXY
-0 24 Dl
-0 -12 Dl
-13 0 Dl
--25 0 Dl
-916 1371 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--25 0 Dl
-1222 1680 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-1834 1999 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-619 1255 MXY
-10 -47 Dl
-19 -50 Dl
-38 28 Dl
-76 75 Dl
-154 122 Dl
-306 309 Dl
-612 319 Dl
-1741 1934(8192)N
-5 Dt
-609 2531 MXY
-1225 0 Dl
-609 MX
-0 -1553 Dl
-2531 MY
-0 16 Dl
-4 Ds
-1 Dt
-2531 MY
-0 -1553 Dl
-593 2625(0)N
--1 Ds
-5 Dt
-916 2531 MXY
-0 16 Dl
-4 Ds
-1 Dt
-2531 MY
-0 -1553 Dl
-884 2625(32)N
--1 Ds
-5 Dt
-1222 2531 MXY
-0 16 Dl
-4 Ds
-1 Dt
-2531 MY
-0 -1553 Dl
-1190 2625(64)N
--1 Ds
-5 Dt
-1528 2531 MXY
-0 16 Dl
-4 Ds
-1 Dt
-2531 MY
-0 -1553 Dl
-1496 2625(96)N
--1 Ds
-5 Dt
-1834 2531 MXY
-0 16 Dl
-4 Ds
-1 Dt
-2531 MY
-0 -1553 Dl
-1786 2625(128)N
--1 Ds
-5 Dt
-609 2531 MXY
--16 0 Dl
-4 Ds
-1 Dt
-609 MX
-1225 0 Dl
-545 2558(0)N
--1 Ds
-5 Dt
-609 2013 MXY
--16 0 Dl
-4 Ds
-1 Dt
-609 MX
-1225 0 Dl
-481 2040(100)N
--1 Ds
-5 Dt
-609 1496 MXY
--16 0 Dl
-4 Ds
-1 Dt
-609 MX
-1225 0 Dl
-481 1523(200)N
--1 Ds
-5 Dt
-609 978 MXY
--16 0 Dl
-4 Ds
-1 Dt
-609 MX
-1225 0 Dl
-481 1005(300)N
-1088 2724(Fill)N
-1194(Factor)X
-422 1611(S)N
-426 1667(e)N
-426 1724(c)N
-424 1780(o)N
-424 1837(n)N
-424 1893(d)N
-428 1949(s)N
-3 Dt
--1 Ds
-3 f
-432 2882(Figure)N
-636(5a:)X
-1 f
-744(System)X
-956(Time)X
-1113(for)X
-1209(dictionary)X
-1490(data)X
-1618(set)X
-1711(with)X
-1847(1M)X
-1958(of)X
-2033(buffer)X
-432 2970(space)N
-594(and)X
-707(varying)X
-923(bucket)X
-1114(sizes)X
-1259(and)X
-1372(\256ll)X
-1465(factors.)X
-1675(Each)X
-1823(line)X
-1940(is)X
-2004(labeled)X
-432 3058(with)N
-562(its)X
-639(bucket)X
-825(size.)X
-10 s
-10 f
-432 3234 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-8 s
-1 f
-428 4381(s)N
-424 4325(d)N
-424 4269(n)N
-424 4212(o)N
-426 4156(c)N
-426 4099(e)N
-422 4043(S)N
-1116 5156(Fill)N
-1222(Factor)X
-506 3437(3200)N
-4 Ds
-1 Dt
-666 3410 MXY
-1168 0 Dl
--1 Ds
-5 Dt
-666 MX
--16 0 Dl
-506 3825(2400)N
-4 Ds
-1 Dt
-666 3799 MXY
-1168 0 Dl
--1 Ds
-5 Dt
-666 MX
--16 0 Dl
-506 4214(1600)N
-4 Ds
-1 Dt
-666 4186 MXY
-1168 0 Dl
--1 Ds
-5 Dt
-666 MX
--16 0 Dl
-538 4602(800)N
-4 Ds
-1 Dt
-666 4575 MXY
-1168 0 Dl
--1 Ds
-5 Dt
-666 MX
--16 0 Dl
-602 4990(0)N
-4 Ds
-1 Dt
-666 4963 MXY
-1168 0 Dl
--1 Ds
-5 Dt
-666 MX
--16 0 Dl
-1786 5057(128)N
-4 Ds
-1 Dt
-1834 4963 MXY
-0 -1553 Dl
--1 Ds
-5 Dt
-4963 MY
-0 16 Dl
-1510 5057(96)N
-4 Ds
-1 Dt
-1542 4963 MXY
-0 -1553 Dl
--1 Ds
-5 Dt
-4963 MY
-0 16 Dl
-1218 5057(64)N
-4 Ds
-1 Dt
-1250 4963 MXY
-0 -1553 Dl
--1 Ds
-5 Dt
-4963 MY
-0 16 Dl
-926 5057(32)N
-4 Ds
-1 Dt
-958 4963 MXY
-0 -1553 Dl
--1 Ds
-5 Dt
-4963 MY
-0 16 Dl
-650 5057(0)N
-4 Ds
-1 Dt
-666 4963 MXY
-0 -1553 Dl
--1 Ds
-5 Dt
-4963 MY
-0 16 Dl
-4963 MY
-0 -1553 Dl
-4963 MY
-1168 0 Dl
-1741 4752(8192)N
-3 Dt
-675 3732 MXY
-9 -172 Dl
-18 -118 Dl
-37 128 Dl
-73 -121 Dl
-146 623 Dl
-292 497 Dl
-584 245 Dl
-4802 MY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-1250 4557 MXY
-0 25 Dl
-0 -13 Dl
-12 0 Dl
--24 0 Dl
-958 4060 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-812 3437 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-739 3558 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-702 3430 MXY
-0 25 Dl
-0 -13 Dl
-13 0 Dl
--25 0 Dl
-684 3548 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-675 3720 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-1637 4912(4096)N
-675 4307 MXY
-9 -58 Dl
-18 30 Dl
-37 89 Dl
-73 144 Dl
-146 235 Dl
-292 122 Dl
-584 89 Dl
-4970 MY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-1250 4881 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-958 4759 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-812 4524 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-739 4380 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-702 4291 MXY
-13 -24 Dl
--25 0 Dl
-12 24 Dl
-684 4261 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-675 4319 MXY
-12 -24 Dl
--24 0 Dl
-12 24 Dl
-734 4662(1024)N
-16 Ds
-1 Dt
-675 4352 MXY
-9 60 Dl
-18 134 Dl
-37 266 Dl
-73 117 Dl
-146 30 Dl
-292 0 Dl
-584 -1 Dl
--1 Ds
-3 Dt
-1846 4946 MXY
--24 24 Dl
-12 -12 Dl
--12 -12 Dl
-24 24 Dl
-1262 4946 MXY
--24 25 Dl
-12 -12 Dl
--12 -13 Dl
-24 25 Dl
-970 4947 MXY
--24 24 Dl
-12 -12 Dl
--12 -12 Dl
-24 24 Dl
-824 4917 MXY
--24 24 Dl
-12 -12 Dl
--12 -12 Dl
-24 24 Dl
-751 4800 MXY
--24 24 Dl
-12 -12 Dl
--12 -12 Dl
-24 24 Dl
-715 4534 MXY
--25 25 Dl
-12 -13 Dl
--12 -12 Dl
-25 25 Dl
-696 4400 MXY
--24 24 Dl
-12 -12 Dl
--12 -12 Dl
-24 24 Dl
-687 4339 MXY
--24 25 Dl
-12 -12 Dl
--12 -13 Dl
-24 25 Dl
-718 4792(512)N
-5 Dt
-675 4422 MXY
-9 137 Dl
-18 278 Dl
-37 105 Dl
-73 18 Dl
-146 -1 Dl
-292 0 Dl
-584 -1 Dl
-3 Dt
-4946 MY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-1250 4946 MXY
-0 25 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-958 4947 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-812 4948 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-739 4930 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-702 4824 MXY
-0 25 Dl
-0 -12 Dl
-13 0 Dl
--25 0 Dl
-684 4547 MXY
-0 24 Dl
-0 -12 Dl
-12 0 Dl
--24 0 Dl
-675 4410 MXY
-0 25 Dl
-0 -13 Dl
-12 0 Dl
--24 0 Dl
-750 4921(256)N
-20 Ds
-1 Dt
-675 4597 MXY
-9 246 Dl
-18 106 Dl
-37 10 Dl
-73 0 Dl
-146 0 Dl
-292 0 Dl
-584 -1 Dl
--1 Ds
-3 Dt
-1822 MX
-23 Dc
-1238 4959 MXY
-23 Dc
-946 MX
-23 Dc
-800 MX
-23 Dc
-727 MX
-23 Dc
-691 4949 MXY
-23 Dc
-672 4843 MXY
-24 Dc
-663 4597 MXY
-24 Dc
-1395 4961(128)N
-1 Dt
-675 4855 MXY
-9 93 Dl
-18 10 Dl
-37 1 Dl
-73 0 Dl
-146 -1 Dl
-292 0 Dl
-584 0 Dl
-3 Dt
-4946 MY
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-1250 MX
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-958 MX
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-812 MX
--12 25 Dl
-24 0 Dl
--12 -25 Dl
-739 4947 MXY
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-702 4946 MXY
--12 24 Dl
-25 0 Dl
--13 -24 Dl
-684 4936 MXY
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-675 4843 MXY
--12 24 Dl
-24 0 Dl
--12 -24 Dl
-3 Dt
--1 Ds
-3 f
-432 5314(Figure)N
-634(5b:)X
-1 f
-744(Elapsed)X
-967(Time)X
-1123(for)X
-1218(dictionary)X
-1498(data)X
-1625(set)X
-1717(with)X
-1851(1M)X
-1960(of)X
-2033(buffer)X
-432 5402(space)N
-593(and)X
-705(varying)X
-920(bucket)X
-1110(sizes)X
-1254(and)X
-1366(\256ll)X
-1457(factors.)X
-1681(Each)X
-1827(line)X
-1942(is)X
-2004(labeled)X
-432 5490(with)N
-562(its)X
-639(bucket)X
-825(size.)X
-10 s
-2590 538(If)N
-2677(an)X
-2785(approximation)X
-3284(of)X
-3383(the)X
-3513(number)X
-3790(of)X
-3889(elements)X
-2418 626(ultimately)N
-2773(to)X
-2866(be)X
-2973(stored)X
-3200(in)X
-3293(the)X
-3422(hash)X
-3599(table)X
-3785(is)X
-3868(known)X
-4116(at)X
-2418 714(the)N
-2564(time)X
-2754(of)X
-2869(creation,)X
-3196(the)X
-3342(hash)X
-3536(package)X
-3847(takes)X
-4059(this)X
-2418 802(number)N
-2688(as)X
-2779(a)X
-2839(parameter)X
-3185(and)X
-3325(uses)X
-3487(it)X
-3555(to)X
-3641(hash)X
-3812(entries)X
-4050(into)X
-2418 890(the)N
-2541(full)X
-2677(sized)X
-2867(table)X
-3048(rather)X
-3261(than)X
-3424(growing)X
-3716(the)X
-3838(table)X
-4018(from)X
-2418 978(a)N
-2477(single)X
-2691(bucket.)X
-2968(If)X
-3044(this)X
-3181(number)X
-3448(is)X
-3523(not)X
-3647(known,)X
-3907(the)X
-4027(hash)X
-2418 1066(table)N
-2632(starts)X
-2859(with)X
-3059(a)X
-3153(single)X
-3402(bucket)X
-3674(and)X
-3848(gracefully)X
-2418 1154(expands)N
-2707(as)X
-2800(elements)X
-3111(are)X
-3236(added,)X
-3474(although)X
-3780(a)X
-3842(slight)X
-4044(per-)X
-2418 1242(formance)N
-2747(degradation)X
-3151(may)X
-3313(be)X
-3413(noticed.)X
-3713(Figure)X
-3946(6)X
-4010(illus-)X
-2418 1330(trates)N
-2625(the)X
-2756(difference)X
-3116(in)X
-3211(performance)X
-3651(between)X
-3952(storing)X
-2418 1418(keys)N
-2588(in)X
-2673(a)X
-2732(\256le)X
-2857(when)X
-3054(the)X
-3174(ultimate)X
-3458(size)X
-3605(is)X
-3680(known)X
-3920(\(the)X
-4067(left)X
-2418 1506(bars)N
-2581(in)X
-2672(each)X
-2849(set\),)X
-3014(compared)X
-3360(to)X
-3450(building)X
-3744(the)X
-3870(\256le)X
-4000(when)X
-2418 1594(the)N
-2550(ultimate)X
-2846(size)X
-3005(is)X
-3091(unknown)X
-3422(\(the)X
-3580(right)X
-3764(bars)X
-3931(in)X
-4026(each)X
-2418 1682(set\).)N
-2609(Once)X
-2814(the)X
-2947(\256ll)X
-3069(factor)X
-3291(is)X
-3378(suf\256ciently)X
-3772(high)X
-3948(for)X
-4076(the)X
-2418 1770(page)N
-2596(size)X
-2747(\(8\),)X
-2887(growing)X
-3180(the)X
-3304(table)X
-3486(dynamically)X
-3908(does)X
-4081(lit-)X
-2418 1858(tle)N
-2518(to)X
-2600(degrade)X
-2875(performance.)X
-10 f
-2418 1946 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-9 s
-1 f
-2413 3238(s)N
-2409 3173(d)N
-2409 3108(n)N
-2409 3043(o)N
-2411 2979(c)N
-2411 2914(e)N
-2407 2849(S)N
-3143 4129(Fill)N
-3261(Factor)X
-2448 2152(15)N
-4 Ds
-1 Dt
-2557 2122 MXY
-1473 0 Dl
--1 Ds
-5 Dt
-2557 MX
--19 0 Dl
-2448 2747(10)N
-4 Ds
-1 Dt
-2557 2717 MXY
-1473 0 Dl
--1 Ds
-5 Dt
-2557 MX
--19 0 Dl
-2484 3343(5)N
-4 Ds
-1 Dt
-2557 3313 MXY
-1473 0 Dl
--1 Ds
-5 Dt
-2557 MX
--19 0 Dl
-2484 3938(0)N
-4 Ds
-1 Dt
-2557 3908 MXY
-1473 0 Dl
--1 Ds
-5 Dt
-2557 MX
--19 0 Dl
-3976 4015(128)N
-4 Ds
-1 Dt
-4030 3908 MXY
-0 -1786 Dl
--1 Ds
-5 Dt
-3908 MY
-0 19 Dl
-3626 4015(96)N
-4 Ds
-1 Dt
-3662 3908 MXY
-0 -1786 Dl
--1 Ds
-5 Dt
-3908 MY
-0 19 Dl
-3258 4015(64)N
-4 Ds
-1 Dt
-3294 3908 MXY
-0 -1786 Dl
--1 Ds
-5 Dt
-3908 MY
-0 19 Dl
-2889 4015(32)N
-4 Ds
-1 Dt
-2925 3908 MXY
-0 -1786 Dl
--1 Ds
-5 Dt
-3908 MY
-0 19 Dl
-2539 4015(0)N
-4 Ds
-1 Dt
-2557 3908 MXY
-0 -1786 Dl
--1 Ds
-5 Dt
-3908 MY
-0 19 Dl
-3908 MY
-0 -1786 Dl
-3908 MY
-1473 0 Dl
-4053 2378(8192)N
-3 Dt
-2569 2277 MXY
-11 0 Dl
-23 48 Dl
-46 -167 Dl
-92 35 Dl
-184 12 Dl
-369 143 Dl
-736 0 Dl
-2334 MY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-3294 2334 MXY
-0 28 Dl
-0 -14 Dl
-13 0 Dl
--27 0 Dl
-2925 2192 MXY
-0 27 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2741 2180 MXY
-0 27 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2649 2144 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2603 2311 MXY
-0 27 Dl
-0 -13 Dl
-14 0 Dl
--28 0 Dl
-2580 2263 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2569 2263 MXY
-0 28 Dl
-0 -14 Dl
-13 0 Dl
--27 0 Dl
-4053 2591(4096)N
-2569 2348 MXY
-11 -11 Dl
-23 -96 Dl
-46 71 Dl
-92 72 Dl
-184 226 Dl
-369 48 Dl
-736 -60 Dl
-2612 MY
-14 -28 Dl
--28 0 Dl
-14 28 Dl
-3294 2672 MXY
-13 -28 Dl
--27 0 Dl
-14 28 Dl
-2925 2624 MXY
-14 -28 Dl
--28 0 Dl
-14 28 Dl
-2741 2398 MXY
-14 -28 Dl
--28 0 Dl
-14 28 Dl
-2649 2326 MXY
-14 -27 Dl
--28 0 Dl
-14 27 Dl
-2603 2255 MXY
-14 -28 Dl
--28 0 Dl
-14 28 Dl
-2580 2350 MXY
-14 -27 Dl
--28 0 Dl
-14 27 Dl
-2569 2362 MXY
-13 -28 Dl
--27 0 Dl
-14 28 Dl
-4053 2681(1024)N
-16 Ds
-1 Dt
-2569 2300 MXY
-11 48 Dl
-23 96 Dl
-46 95 Dl
-92 274 Dl
-184 202 Dl
-369 -155 Dl
-736 -190 Dl
--1 Ds
-3 Dt
-4044 2656 MXY
--28 28 Dl
-14 -14 Dl
--14 -14 Dl
-28 28 Dl
-3307 2846 MXY
--27 28 Dl
-14 -14 Dl
--14 -14 Dl
-27 28 Dl
-2939 3001 MXY
--28 28 Dl
-14 -14 Dl
--14 -14 Dl
-28 28 Dl
-2755 2799 MXY
--28 28 Dl
-14 -14 Dl
--14 -14 Dl
-28 28 Dl
-2663 2525 MXY
--28 28 Dl
-14 -14 Dl
--14 -14 Dl
-28 28 Dl
-2617 2430 MXY
--28 28 Dl
-14 -14 Dl
--14 -14 Dl
-28 28 Dl
-2594 2334 MXY
--28 28 Dl
-14 -14 Dl
--14 -14 Dl
-28 28 Dl
-2582 2287 MXY
--27 27 Dl
-14 -14 Dl
--14 -13 Dl
-27 27 Dl
-4053 2851(512)N
-5 Dt
-2569 2372 MXY
-11 -24 Dl
-23 405 Dl
-46 83 Dl
-92 227 Dl
-184 -72 Dl
-369 -119 Dl
-736 -107 Dl
-3 Dt
-2751 MY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-3294 2858 MXY
-0 28 Dl
-0 -14 Dl
-13 0 Dl
--27 0 Dl
-2925 2977 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2741 3049 MXY
-0 27 Dl
-0 -13 Dl
-14 0 Dl
--28 0 Dl
-2649 2823 MXY
-0 27 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2603 2739 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2580 2334 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2569 2358 MXY
-0 28 Dl
-0 -14 Dl
-13 0 Dl
--27 0 Dl
-4053 2795(256)N
-20 Ds
-1 Dt
-2569 2456 MXY
-11 285 Dl
-23 95 Dl
-46 251 Dl
-92 -60 Dl
-184 -84 Dl
-369 -107 Dl
-736 -71 Dl
--1 Ds
-3 Dt
-4016 MX
-27 Dc
-3280 2836 MXY
-27 Dc
-2912 2943 MXY
-27 Dc
-2728 3027 MXY
-27 Dc
-2635 3087 MXY
-28 Dc
-2589 2836 MXY
-28 Dc
-2566 2741 MXY
-27 Dc
-2554 2456 MXY
-28 Dc
-4053 2741(128)N
-1 Dt
-2569 2729 MXY
-11 203 Dl
-23 131 Dl
-46 -60 Dl
-92 -119 Dl
-184 -60 Dl
-369 -83 Dl
-736 -12 Dl
-3 Dt
-2716 MY
--14 27 Dl
-28 0 Dl
--14 -27 Dl
-3294 2727 MXY
--14 28 Dl
-27 0 Dl
--13 -28 Dl
-2925 2811 MXY
--14 27 Dl
-28 0 Dl
--14 -27 Dl
-2741 2870 MXY
--14 28 Dl
-28 0 Dl
--14 -28 Dl
-2649 2989 MXY
--14 28 Dl
-28 0 Dl
--14 -28 Dl
-2603 3049 MXY
--14 27 Dl
-28 0 Dl
--14 -27 Dl
-2580 2918 MXY
--14 28 Dl
-28 0 Dl
--14 -28 Dl
-2569 2716 MXY
--14 27 Dl
-27 0 Dl
--13 -27 Dl
-3 Dt
--1 Ds
-3 f
-8 s
-2418 4286(Figure)N
-2628(5c:)X
-1 f
-2738(User)X
-2887(Time)X
-3051(for)X
-3154(dictionary)X
-3442(data)X
-3577(set)X
-3677(with)X
-3820(1M)X
-3938(of)X
-4019(buffer)X
-2418 4374(space)N
-2579(and)X
-2691(varying)X
-2906(bucket)X
-3096(sizes)X
-3240(and)X
-3352(\256ll)X
-3443(factors.)X
-3667(Each)X
-3813(line)X
-3928(is)X
-3990(labeled)X
-2418 4462(with)N
-2548(its)X
-2625(bucket)X
-2811(size.)X
-10 s
-10 f
-2418 4638 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-1 f
-2590 4840(Since)N
-2796(no)X
-2904(known)X
-3150(hash)X
-3325(function)X
-3620(performs)X
-3938(equally)X
-2418 4928(well)N
-2589(on)X
-2702(all)X
-2815(possible)X
-3110(data,)X
-3297(the)X
-3428(user)X
-3595(may)X
-3766(\256nd)X
-3923(that)X
-4076(the)X
-2418 5016(built-in)N
-2678(hash)X
-2849(function)X
-3140(does)X
-3311(poorly)X
-3544(on)X
-3648(a)X
-3708(particular)X
-4040(data)X
-2418 5104(set.)N
-2548(In)X
-2636(this)X
-2771(case,)X
-2950(a)X
-3006(hash)X
-3173(function,)X
-3480(taking)X
-3700(two)X
-3840(arguments)X
-2418 5192(\(a)N
-2507(pointer)X
-2760(to)X
-2848(a)X
-2910(byte)X
-3074(string)X
-3282(and)X
-3424(a)X
-3486(length\))X
-3739(and)X
-3880(returning)X
-2418 5280(an)N
-2517(unsigned)X
-2829(long)X
-2993(to)X
-3077(be)X
-3175(used)X
-3344(as)X
-3433(the)X
-3553(hash)X
-3722(value,)X
-3938(may)X
-4098(be)X
-2418 5368(speci\256ed)N
-2731(at)X
-2817(hash)X
-2992(table)X
-3176(creation)X
-3463(time.)X
-3673(When)X
-3893(an)X
-3996(exist-)X
-2418 5456(ing)N
-2570(hash)X
-2767(table)X
-2973(is)X
-3076(opened)X
-3358(and)X
-3524(a)X
-3609(hash)X
-3805(function)X
-4121(is)X
-2418 5544(speci\256ed,)N
-2752(the)X
-2879(hash)X
-3054(package)X
-3346(will)X
-3498(try)X
-3615(to)X
-3705(determine)X
-4054(that)X
-2418 5632(the)N
-2546(hash)X
-2723(function)X
-3020(supplied)X
-3321(is)X
-3404(the)X
-3532(one)X
-3678(with)X
-3850(which)X
-4076(the)X
-2418 5720(table)N
-2630(was)X
-2811(created.)X
-3139(There)X
-3382(are)X
-3536(a)X
-3627(variety)X
-3905(of)X
-4027(hash)X
-3 f
-432 5960(8)N
-2970(USENIX)X
-9 f
-3292(-)X
-3 f
-3356(Winter)X
-3621('91)X
-9 f
-3748(-)X
-3 f
-3812(Dallas,)X
-4065(TX)X
-
-9 p
-%%Page: 9 9
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-720 258(Seltzer)N
-977(&)X
-1064(Yigit)X
-3278(A)X
-3356(New)X
-3528(Hashing)X
-3831(Package)X
-4136(for)X
-4259(UNIX)X
-1 f
-720 538(functions)N
-1065(provided)X
-1397(with)X
-1586(the)X
-1731(package.)X
-2082(The)X
-2253(default)X
-720 626(function)N
-1014(for)X
-1135(the)X
-1260(package)X
-1551(is)X
-1631(the)X
-1755(one)X
-1897(which)X
-2119(offered)X
-2378(the)X
-720 714(best)N
-875(performance)X
-1308(in)X
-1396(terms)X
-1600(of)X
-1693(cycles)X
-1920(executed)X
-2232(per)X
-2360(call)X
-720 802(\(it)N
-827(did)X
-965(not)X
-1103(produce)X
-1398(the)X
-1531(fewest)X
-1776(collisions)X
-2117(although)X
-2432(it)X
-720 890(was)N
-866(within)X
-1091(a)X
-1148(small)X
-1341(percentage)X
-1710(of)X
-1797(the)X
-1915(function)X
-2202(that)X
-2342(pro-)X
-720 978(duced)N
-947(the)X
-1080(fewest)X
-1324(collisions\).)X
-1731(Again,)X
-1981(in)X
-2077(time)X
-2253(critical)X
-720 1066(applications,)N
-1152(users)X
-1342(are)X
-1466(encouraged)X
-1862(to)X
-1949(experiment)X
-2334(with)X
-720 1154(a)N
-783(variety)X
-1032(of)X
-1125(hash)X
-1298(functions)X
-1622(to)X
-1710(achieve)X
-1982(optimal)X
-2252(perfor-)X
-720 1242(mance.)N
-10 f
-720 1330 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-3 f
-7 s
-1038 2925(Full)N
-1149(size)X
-1251(table)X
-1384(\(left\))X
-1547 2718(Fill)N
-1643(Factor)X
-2268 2662(64)N
-1964(32)X
-1674(16)X
-1384(8)X
-1093(4)X
-4 Ds
-1 Dt
-900 2280 MXY
-1548 0 Dl
-900 1879 MXY
-1548 0 Dl
-900 1506 MXY
-1548 0 Dl
-1563 2902 MXY
-111 0 Dl
--1 Ds
-900 MX
-110 0 Dl
-1425 2828(System)N
-983(User)X
-1895 2778 MXY
- 1895 2778 lineto
- 1950 2778 lineto
- 1950 2833 lineto
- 1895 2833 lineto
- 1895 2778 lineto
-closepath 21 1895 2778 1950 2833 Dp
-1342 MX
- 1342 2778 lineto
- 1397 2778 lineto
- 1397 2833 lineto
- 1342 2833 lineto
- 1342 2778 lineto
-closepath 14 1342 2778 1397 2833 Dp
-900 MX
- 900 2778 lineto
- 955 2778 lineto
- 955 2833 lineto
- 900 2833 lineto
- 900 2778 lineto
-closepath 3 900 2778 955 2833 Dp
-5 Dt
-2283 2211 MXY
-96 0 Dl
-1992 MX
-97 0 Dl
-1702 MX
-97 0 Dl
-1411 2252 MXY
-97 0 Dl
-4 Ds
-1 Dt
-2283 2211 MXY
- 2283 2211 lineto
- 2379 2211 lineto
- 2379 2252 lineto
- 2283 2252 lineto
- 2283 2211 lineto
-closepath 14 2283 2211 2379 2252 Dp
-1992 MX
- 1992 2211 lineto
- 2089 2211 lineto
- 2089 2252 lineto
- 1992 2252 lineto
- 1992 2211 lineto
-closepath 14 1992 2211 2089 2252 Dp
-1702 MX
- 1702 2211 lineto
- 1799 2211 lineto
- 1799 2252 lineto
- 1702 2252 lineto
- 1702 2211 lineto
-closepath 14 1702 2211 1799 2252 Dp
-1411 2252 MXY
- 1411 2252 lineto
- 1508 2252 lineto
- 1508 2294 lineto
- 1411 2294 lineto
- 1411 2252 lineto
-closepath 14 1411 2252 1508 2294 Dp
-2283 MX
- 2283 2252 lineto
- 2379 2252 lineto
- 2379 2612 lineto
- 2283 2612 lineto
- 2283 2252 lineto
-closepath 3 2283 2252 2379 2612 Dp
-1992 MX
- 1992 2252 lineto
- 2089 2252 lineto
- 2089 2612 lineto
- 1992 2612 lineto
- 1992 2252 lineto
-closepath 3 1992 2252 2089 2612 Dp
-1702 MX
- 1702 2252 lineto
- 1799 2252 lineto
- 1799 2612 lineto
- 1702 2612 lineto
- 1702 2252 lineto
-closepath 3 1702 2252 1799 2612 Dp
-1411 2294 MXY
- 1411 2294 lineto
- 1508 2294 lineto
- 1508 2612 lineto
- 1411 2612 lineto
- 1411 2294 lineto
-closepath 3 1411 2294 1508 2612 Dp
--1 Ds
-2158 2238 MXY
- 2158 2238 lineto
- 2255 2238 lineto
- 2255 2252 lineto
- 2158 2252 lineto
- 2158 2238 lineto
-closepath 21 2158 2238 2255 2252 Dp
-1868 MX
- 1868 2238 lineto
- 1965 2238 lineto
- 1965 2280 lineto
- 1868 2280 lineto
- 1868 2238 lineto
-closepath 21 1868 2238 1965 2280 Dp
-1577 MX
- 1577 2238 lineto
- 1674 2238 lineto
- 1674 2308 lineto
- 1577 2308 lineto
- 1577 2238 lineto
-closepath 21 1577 2238 1674 2308 Dp
-1287 2308 MXY
- 1287 2308 lineto
- 1287 2280 lineto
- 1384 2280 lineto
- 1384 2308 lineto
- 1287 2308 lineto
-closepath 21 1287 2280 1384 2308 Dp
-2158 2280 MXY
- 2158 2280 lineto
- 2158 2252 lineto
- 2255 2252 lineto
- 2255 2280 lineto
- 2158 2280 lineto
-closepath 14 2158 2252 2255 2280 Dp
-1868 2308 MXY
- 1868 2308 lineto
- 1868 2280 lineto
- 1965 2280 lineto
- 1965 2308 lineto
- 1868 2308 lineto
-closepath 14 1868 2280 1965 2308 Dp
-1577 2335 MXY
- 1577 2335 lineto
- 1577 2308 lineto
- 1674 2308 lineto
- 1674 2335 lineto
- 1577 2335 lineto
-closepath 14 1577 2308 1674 2335 Dp
-1287 2363 MXY
- 1287 2363 lineto
- 1287 2308 lineto
- 1384 2308 lineto
- 1384 2363 lineto
- 1287 2363 lineto
-closepath 14 1287 2308 1384 2363 Dp
-2158 2280 MXY
- 2158 2280 lineto
- 2255 2280 lineto
- 2255 2612 lineto
- 2158 2612 lineto
- 2158 2280 lineto
-closepath 3 2158 2280 2255 2612 Dp
-1868 2308 MXY
- 1868 2308 lineto
- 1965 2308 lineto
- 1965 2612 lineto
- 1868 2612 lineto
- 1868 2308 lineto
-closepath 3 1868 2308 1965 2612 Dp
-1577 2335 MXY
- 1577 2335 lineto
- 1674 2335 lineto
- 1674 2612 lineto
- 1577 2612 lineto
- 1577 2335 lineto
-closepath 3 1577 2335 1674 2612 Dp
-1287 2363 MXY
- 1287 2363 lineto
- 1384 2363 lineto
- 1384 2612 lineto
- 1287 2612 lineto
- 1287 2363 lineto
-closepath 3 1287 2363 1384 2612 Dp
-4 Ds
-1121 2066 MXY
- 1121 2066 lineto
- 1218 2066 lineto
- 1224 2080 lineto
- 1127 2080 lineto
- 1121 2066 lineto
-closepath 21 1121 2066 1224 2080 Dp
-2080 MY
- 1121 2080 lineto
- 1218 2080 lineto
- 1218 2273 lineto
- 1121 2273 lineto
- 1121 2080 lineto
-closepath 14 1121 2080 1218 2273 Dp
-2273 MY
- 1121 2273 lineto
- 1218 2273 lineto
- 1218 2612 lineto
- 1121 2612 lineto
- 1121 2273 lineto
-closepath 3 1121 2273 1218 2612 Dp
--1 Ds
-997 1589 MXY
- 997 1589 lineto
- 1093 1589 lineto
- 1093 1644 lineto
- 997 1644 lineto
- 997 1589 lineto
-closepath 21 997 1589 1093 1644 Dp
-1644 MY
- 997 1644 lineto
- 1093 1644 lineto
- 1093 2280 lineto
- 997 2280 lineto
- 997 1644 lineto
-closepath 14 997 1644 1093 2280 Dp
-2280 MY
- 997 2280 lineto
- 1093 2280 lineto
- 1093 2612 lineto
- 997 2612 lineto
- 997 2280 lineto
-closepath 3 997 2280 1093 2612 Dp
-10 s
-719 2093(s)N
-712 2037(d)N
-712 1982(n)N
-714 1927(o)N
-716 1872(c)N
-716 1816(e)N
-712 1761(S)N
-804 2286(10)N
-804 1899(20)N
-804 1540(30)N
-3 Dt
-900 1506 MXY
-0 1106 Dl
-1548 0 Dl
-7 s
-1978 2828(Elapsed)N
-1701 2925(Dynamically)N
-2018(grown)X
-2184(table)X
-2317(\(right\))X
-3 Dt
--1 Ds
-8 s
-720 3180(Figure)N
-934(6:)X
-1 f
-1020(The)X
-1152(total)X
-1299(regions)X
-1520(indicate)X
-1755(the)X
-1865(difference)X
-2154(between)X
-2398(the)X
-720 3268(elapsed)N
-931(time)X
-1065(and)X
-1177(the)X
-1275(sum)X
-1402(of)X
-1475(the)X
-1573(system)X
-1771(and)X
-1883(user)X
-2008(time.)X
-2173(The)X
-2291(left)X
-2395(bar)X
-720 3356(of)N
-798(each)X
-939(set)X
-1035(depicts)X
-1241(the)X
-1344(timing)X
-1537(of)X
-1615(the)X
-1718(test)X
-1831(run)X
-1940(when)X
-2102(the)X
-2204(number)X
-2423(of)X
-720 3444(entries)N
-910(is)X
-973(known)X
-1167(in)X
-1237(advance.)X
-1496(The)X
-1614(right)X
-1754(bars)X
-1879(depict)X
-2054(the)X
-2151(timing)X
-2338(when)X
-720 3532(the)N
-814(\256le)X
-912(is)X
-971(grown)X
-1150(from)X
-1290(a)X
-1334(single)X
-1503(bucket.)X
-10 s
-10 f
-720 3708 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-1 f
-892 3910(Since)N
-1131(this)X
-1307(hashing)X
-1617(package)X
-1942(provides)X
-2279(buffer)X
-720 3998(management,)N
-1188(the)X
-1323(amount)X
-1600(of)X
-1704(space)X
-1920(allocated)X
-2247(for)X
-2378(the)X
-720 4086(buffer)N
-948(pool)X
-1121(may)X
-1290(be)X
-1397(speci\256ed)X
-1713(by)X
-1824(the)X
-1953(user.)X
-2157(Using)X
-2378(the)X
-720 4174(same)N
-910(data)X
-1069(set)X
-1183(and)X
-1324(test)X
-1459(procedure)X
-1805(as)X
-1896(used)X
-2067(to)X
-2153(derive)X
-2378(the)X
-720 4262(graphs)N
-962(in)X
-1052(Figures)X
-1320(5a-c,)X
-1507(Figure)X
-1744(7)X
-1812(shows)X
-2039(the)X
-2164(impact)X
-2409(of)X
-720 4350(varying)N
-997(the)X
-1126(size)X
-1282(of)X
-1380(the)X
-1509(buffer)X
-1737(pool.)X
-1950(The)X
-2106(bucket)X
-2351(size)X
-720 4438(was)N
-873(set)X
-989(to)X
-1078(256)X
-1225(bytes)X
-1421(and)X
-1564(the)X
-1689(\256ll)X
-1804(factor)X
-2019(was)X
-2171(set)X
-2287(to)X
-2376(16.)X
-720 4526(The)N
-869(buffer)X
-1090(pool)X
-1256(size)X
-1404(was)X
-1552(varied)X
-1776(from)X
-1955(0)X
-2018(\(the)X
-2166(minimum)X
-720 4614(number)N
-986(of)X
-1074(pages)X
-1277(required)X
-1565(to)X
-1647(be)X
-1743(buffered\))X
-2063(to)X
-2145(1M.)X
-2316(With)X
-720 4702(1M)N
-854(of)X
-944(buffer)X
-1164(space,)X
-1386(the)X
-1507(package)X
-1794(performed)X
-2151(no)X
-2253(I/O)X
-2382(for)X
-720 4790(this)N
-871(data)X
-1040(set.)X
-1204(As)X
-1328(Figure)X
-1572(7)X
-1647(illustrates,)X
-2013(increasing)X
-2378(the)X
-720 4878(buffer)N
-944(pool)X
-1113(size)X
-1265(can)X
-1404(have)X
-1583(a)X
-1646(dramatic)X
-1954(affect)X
-2165(on)X
-2271(result-)X
-720 4966(ing)N
-842(performance.)X
-2 f
-8 s
-1269 4941(7)N
-1 f
-16 s
-720 5353 MXY
-864 0 Dl
-2 f
-8 s
-760 5408(7)N
-1 f
-9 s
-826 5433(Some)N
-1024(allocators)X
-1338(are)X
-1460(extremely)X
-1782(inef\256cient)X
-2107(at)X
-2192(allocating)X
-720 5513(memory.)N
-1029(If)X
-1110(you)X
-1251(\256nd)X
-1396(that)X
-1536(applications)X
-1916(are)X
-2036(running)X
-2292(out)X
-2416(of)X
-720 5593(memory)N
-1005(before)X
-1234(you)X
-1386(think)X
-1578(they)X
-1746(should,)X
-2000(try)X
-2124(varying)X
-2388(the)X
-720 5673(pagesize)N
-986(to)X
-1060(get)X
-1166(better)X
-1348(utilization)X
-1658(from)X
-1816(the)X
-1922(memory)X
-2180(allocator.)X
-10 s
-2830 1975 MXY
-0 -28 Dl
-28 0 Dl
-0 28 Dl
--28 0 Dl
-2853 2004 MXY
-0 -27 Dl
-28 0 Dl
-0 27 Dl
--28 0 Dl
-2876 2016 MXY
-0 -27 Dl
-27 0 Dl
-0 27 Dl
--27 0 Dl
-2922 1998 MXY
-0 -27 Dl
-27 0 Dl
-0 27 Dl
--27 0 Dl
-2967 2025 MXY
-0 -28 Dl
-28 0 Dl
-0 28 Dl
--28 0 Dl
-3013 2031 MXY
-0 -28 Dl
-28 0 Dl
-0 28 Dl
--28 0 Dl
-3059 MX
-0 -28 Dl
-27 0 Dl
-0 28 Dl
--27 0 Dl
-3196 2052 MXY
-0 -28 Dl
-27 0 Dl
-0 28 Dl
--27 0 Dl
-3561 2102 MXY
-0 -28 Dl
-28 0 Dl
-0 28 Dl
--28 0 Dl
-4292 2105 MXY
-0 -28 Dl
-27 0 Dl
-0 28 Dl
--27 0 Dl
-4 Ds
-1 Dt
-2844 1961 MXY
-23 30 Dl
-23 12 Dl
-45 -18 Dl
-46 26 Dl
-46 6 Dl
-45 0 Dl
-137 21 Dl
-366 50 Dl
-730 3 Dl
-9 s
-4227 2158(User)N
--1 Ds
-3 Dt
-2830 1211 MXY
-27 Dc
-2853 1261 MXY
-27 Dc
-2876 1267 MXY
-27 Dc
-2921 1341 MXY
-27 Dc
-2967 1385 MXY
-27 Dc
-3013 1450 MXY
-27 Dc
-3059 1497 MXY
-27 Dc
-3196 1686 MXY
-27 Dc
-3561 2109 MXY
-27 Dc
-4292 2295 MXY
-27 Dc
-20 Ds
-1 Dt
-2844 1211 MXY
-23 50 Dl
-23 6 Dl
-45 74 Dl
-46 44 Dl
-46 65 Dl
-45 47 Dl
-137 189 Dl
-366 423 Dl
-730 186 Dl
-4181 2270(System)N
--1 Ds
-3 Dt
-2844 583 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2867 672 MXY
-0 27 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-2890 701 MXY
-0 28 Dl
-0 -14 Dl
-13 0 Dl
--27 0 Dl
-2935 819 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--27 0 Dl
-2981 849 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-3027 908 MXY
-0 27 Dl
-0 -13 Dl
-14 0 Dl
--28 0 Dl
-3072 1026 MXY
-0 27 Dl
-0 -13 Dl
-14 0 Dl
--27 0 Dl
-3209 1292 MXY
-0 27 Dl
-0 -14 Dl
-14 0 Dl
--27 0 Dl
-3575 1823 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--28 0 Dl
-4305 2059 MXY
-0 28 Dl
-0 -14 Dl
-14 0 Dl
--27 0 Dl
-5 Dt
-2844 597 MXY
-23 88 Dl
-23 30 Dl
-45 118 Dl
-46 30 Dl
-46 59 Dl
-45 118 Dl
-137 265 Dl
-366 532 Dl
-730 236 Dl
-4328 2103(Total)N
-2844 2310 MXY
-1461 0 Dl
-2844 MX
-0 -1772 Dl
-2310 MY
-0 18 Dl
-4 Ds
-1 Dt
-2310 MY
-0 -1772 Dl
-2826 2416(0)N
--1 Ds
-5 Dt
-3209 2310 MXY
-0 18 Dl
-4 Ds
-1 Dt
-2310 MY
-0 -1772 Dl
-3155 2416(256)N
--1 Ds
-5 Dt
-3575 2310 MXY
-0 18 Dl
-4 Ds
-1 Dt
-2310 MY
-0 -1772 Dl
-3521 2416(512)N
--1 Ds
-5 Dt
-3940 2310 MXY
-0 18 Dl
-4 Ds
-1 Dt
-2310 MY
-0 -1772 Dl
-3886 2416(768)N
--1 Ds
-5 Dt
-4305 2310 MXY
-0 18 Dl
-4 Ds
-1 Dt
-2310 MY
-0 -1772 Dl
-4233 2416(1024)N
--1 Ds
-5 Dt
-2844 2310 MXY
--18 0 Dl
-4 Ds
-1 Dt
-2844 MX
-1461 0 Dl
-2771 2340(0)N
--1 Ds
-5 Dt
-2844 2014 MXY
--18 0 Dl
-2844 1719 MXY
--18 0 Dl
-4 Ds
-1 Dt
-2844 MX
-1461 0 Dl
-2735 1749(20)N
--1 Ds
-5 Dt
-2844 1423 MXY
--18 0 Dl
-2844 1128 MXY
--18 0 Dl
-4 Ds
-1 Dt
-2844 MX
-1461 0 Dl
-2735 1158(40)N
--1 Ds
-5 Dt
-2844 833 MXY
--18 0 Dl
-2844 538 MXY
--18 0 Dl
-4 Ds
-1 Dt
-2844 MX
-1461 0 Dl
-2735 568(60)N
-3239 2529(Buffer)N
-3445(Pool)X
-3595(Size)X
-3737(\(in)X
-3835(K\))X
-2695 1259(S)N
-2699 1324(e)N
-2699 1388(c)N
-2697 1452(o)N
-2697 1517(n)N
-2697 1581(d)N
-2701 1645(s)N
-3 Dt
--1 Ds
-3 f
-8 s
-2706 2773(Figure)N
-2908(7:)X
-1 f
-2982(User)X
-3123(time)X
-3258(is)X
-3322(virtually)X
-3560(insensitive)X
-3854(to)X
-3924(the)X
-4022(amount)X
-4234(of)X
-4307(buffer)X
-2706 2861(pool)N
-2852(available,)X
-3130(however,)X
-3396(both)X
-3541(system)X
-3750(time)X
-3895(and)X
-4018(elapsed)X
-4240(time)X
-4385(are)X
-2706 2949(inversely)N
-2960(proportional)X
-3296(to)X
-3366(the)X
-3464(size)X
-3583(of)X
-3656(the)X
-3753(buffer)X
-3927(pool.)X
-4092(Even)X
-4242(for)X
-4335(large)X
-2706 3037(data)N
-2831(sets)X
-2946(where)X
-3120(one)X
-3230(expects)X
-3439(few)X
-3552(collisions,)X
-3832(specifying)X
-4116(a)X
-4162(large)X
-4307(buffer)X
-2706 3125(pool)N
-2836(dramatically)X
-3171(improves)X
-3425(performance.)X
-10 s
-10 f
-2706 3301 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-3 f
-3175 3543(Enhanced)N
-3536(Functionality)X
-1 f
-2878 3675(This)N
-3046(hashing)X
-3320(package)X
-3609(provides)X
-3910(a)X
-3971(set)X
-4085(of)X
-4177(compati-)X
-2706 3763(bility)N
-2895(routines)X
-3174(to)X
-3257(implement)X
-3620(the)X
-2 f
-3739(ndbm)X
-1 f
-3937(interface.)X
-4279(How-)X
-2706 3851(ever,)N
-2893(when)X
-3095(the)X
-3220(native)X
-3443(interface)X
-3752(is)X
-3832(used,)X
-4026(the)X
-4151(following)X
-2706 3939(additional)N
-3046(functionality)X
-3475(is)X
-3548(provided:)X
-10 f
-2798 4071(g)N
-1 f
-2946(Inserts)X
-3197(never)X
-3413(fail)X
-3556(because)X
-3847(too)X
-3985(many)X
-4199(keys)X
-2946 4159(hash)N
-3113(to)X
-3195(the)X
-3313(same)X
-3498(value.)X
-10 f
-2798 4247(g)N
-1 f
-2946(Inserts)X
-3187(never)X
-3393(fail)X
-3527(because)X
-3808(key)X
-3950(and/or)X
-4181(asso-)X
-2946 4335(ciated)N
-3158(data)X
-3312(is)X
-3385(too)X
-3507(large)X
-10 f
-2798 4423(g)N
-1 f
-2946(Hash)X
-3131(functions)X
-3449(may)X
-3607(be)X
-3703(user-speci\256ed.)X
-10 f
-2798 4511(g)N
-1 f
-2946(Multiple)X
-3268(pages)X
-3498(may)X
-3683(be)X
-3806(cached)X
-4077(in)X
-4186(main)X
-2946 4599(memory.)N
-2706 4731(It)N
-2801(also)X
-2976(provides)X
-3298(a)X
-3380(set)X
-3514(of)X
-3626(compatibility)X
-4097(routines)X
-4400(to)X
-2706 4819(implement)N
-3087(the)X
-2 f
-3224(hsearch)X
-1 f
-3516(interface.)X
-3876(Again,)X
-4130(the)X
-4266(native)X
-2706 4907(interface)N
-3008(offers)X
-3216(enhanced)X
-3540(functionality:)X
-10 f
-2798 5039(g)N
-1 f
-2946(Files)X
-3121(may)X
-3279(grow)X
-3464(beyond)X
-2 f
-3720(nelem)X
-1 f
-3932(elements.)X
-10 f
-2798 5127(g)N
-1 f
-2946(Multiple)X
-3247(hash)X
-3420(tables)X
-3632(may)X
-3795(be)X
-3896(accessed)X
-4203(con-)X
-2946 5215(currently.)N
-10 f
-2798 5303(g)N
-1 f
-2946(Hash)X
-3134(tables)X
-3344(may)X
-3505(be)X
-3604(stored)X
-3823(and)X
-3962(accessed)X
-4266(on)X
-2946 5391(disk.)N
-10 f
-2798 5479(g)N
-1 f
-2946(Hash)X
-3155(functions)X
-3497(may)X
-3679(be)X
-3799(user-speci\256ed)X
-4288(at)X
-2946 5567(runtime.)N
-3 f
-720 5960(USENIX)N
-9 f
-1042(-)X
-3 f
-1106(Winter)X
-1371('91)X
-9 f
-1498(-)X
-3 f
-1562(Dallas,)X
-1815(TX)X
-4424(9)X
-
-10 p
-%%Page: 10 10
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-432 258(A)N
-510(New)X
-682(Hashing)X
-985(Package)X
-1290(for)X
-1413(UNIX)X
-3663(Seltzer)X
-3920(&)X
-4007(Yigit)X
-459 538(Relative)N
-760(Performance)X
-1227(of)X
-1314(the)X
-1441(New)X
-1613(Implementation)X
-1 f
-604 670(The)N
-761(performance)X
-1200(testing)X
-1445(of)X
-1544(the)X
-1674(new)X
-1840(package)X
-2135(is)X
-432 758(divided)N
-711(into)X
-874(two)X
-1033(test)X
-1183(suites.)X
-1424(The)X
-1588(\256rst)X
-1751(suite)X
-1941(of)X
-2046(tests)X
-432 846(requires)N
-727(that)X
-882(the)X
-1015(tables)X
-1237(be)X
-1348(read)X
-1522(from)X
-1713(and)X
-1864(written)X
-2126(to)X
-432 934(disk.)N
-640(In)X
-742(these)X
-942(tests,)X
-1139(the)X
-1272(basis)X
-1467(for)X
-1595(comparison)X
-2003(is)X
-2090(the)X
-432 1022(4.3BSD-Reno)N
-908(version)X
-1169(of)X
-2 f
-1260(ndbm)X
-1 f
-1438(.)X
-1502(Based)X
-1722(on)X
-1826(the)X
-1948(designs)X
-432 1110(of)N
-2 f
-521(sdbm)X
-1 f
-712(and)X
-2 f
-850(gdbm)X
-1 f
-1028(,)X
-1070(they)X
-1230(are)X
-1351(expected)X
-1659(to)X
-1743(perform)X
-2024(simi-)X
-432 1198(larly)N
-605(to)X
-2 f
-693(ndbm)X
-1 f
-871(,)X
-917(and)X
-1059(we)X
-1179(do)X
-1285(not)X
-1413(show)X
-1608(their)X
-1781(performance)X
-432 1286(numbers.)N
-800(The)X
-977(second)X
-1252(suite)X
-1454(contains)X
-1772(the)X
-1921(memory)X
-432 1374(resident)N
-712(test)X
-849(which)X
-1071(does)X
-1243(not)X
-1370(require)X
-1623(that)X
-1768(the)X
-1891(\256les)X
-2049(ever)X
-432 1462(be)N
-533(written)X
-784(to)X
-870(disk,)X
-1047(only)X
-1213(that)X
-1357(hash)X
-1528(tables)X
-1739(may)X
-1901(be)X
-2001(mani-)X
-432 1550(pulated)N
-692(in)X
-778(main)X
-961(memory.)X
-1291(In)X
-1381(this)X
-1519(test,)X
-1673(we)X
-1790(compare)X
-2090(the)X
-432 1638(performance)N
-859(to)X
-941(that)X
-1081(of)X
-1168(the)X
-2 f
-1286(hsearch)X
-1 f
-1560(routines.)X
-604 1752(For)N
-760(both)X
-947(suites,)X
-1194(two)X
-1358(different)X
-1679(databases)X
-2031(were)X
-432 1840(used.)N
-656(The)X
-818(\256rst)X
-979(is)X
-1069(the)X
-1204(dictionary)X
-1566(database)X
-1880(described)X
-432 1928(previously.)N
-836(The)X
-987(second)X
-1236(was)X
-1386(constructed)X
-1781(from)X
-1962(a)X
-2023(pass-)X
-432 2016(word)N
-647(\256le)X
-799(with)X
-990(approximately)X
-1502(300)X
-1671(accounts.)X
-2041(Two)X
-432 2104(records)N
-700(were)X
-887(constructed)X
-1287(for)X
-1411(each)X
-1589(account.)X
-1909(The)X
-2064(\256rst)X
-432 2192(used)N
-604(the)X
-727(logname)X
-1028(as)X
-1120(the)X
-1243(key)X
-1384(and)X
-1525(the)X
-1648(remainder)X
-1999(of)X
-2090(the)X
-432 2280(password)N
-768(entry)X
-965(for)X
-1091(the)X
-1221(data.)X
-1427(The)X
-1584(second)X
-1839(was)X
-1996(keyed)X
-432 2368(by)N
-541(uid)X
-672(and)X
-817(contained)X
-1157(the)X
-1283(entire)X
-1494(password)X
-1825(entry)X
-2018(as)X
-2113(its)X
-432 2456(data)N
-589(\256eld.)X
-794(The)X
-942(tests)X
-1107(were)X
-1287(all)X
-1389(run)X
-1518(on)X
-1620(the)X
-1740(HP)X
-1864(9000)X
-2046(with)X
-432 2544(the)N
-574(same)X
-783(con\256guration)X
-1254(previously)X
-1636(described.)X
-2027(Each)X
-432 2632(test)N
-576(was)X
-734(run)X
-874(\256ve)X
-1027(times)X
-1232(and)X
-1380(the)X
-1510(timing)X
-1750(results)X
-1991(of)X
-2090(the)X
-432 2720(runs)N
-602(were)X
-791(averaged.)X
-1154(The)X
-1311(variance)X
-1616(across)X
-1849(the)X
-1979(5)X
-2050(runs)X
-432 2808(was)N
-591(approximately)X
-1088(1%)X
-1229(of)X
-1330(the)X
-1462(average)X
-1746(yielding)X
-2041(95%)X
-432 2896(con\256dence)N
-800(intervals)X
-1096(of)X
-1183(approximately)X
-1666(2%.)X
-3 f
-1021 3050(Disk)N
-1196(Based)X
-1420(Tests)X
-1 f
-604 3182(In)N
-693(these)X
-880(tests,)X
-1064(we)X
-1180(use)X
-1308(a)X
-1365(bucket)X
-1600(size)X
-1746(of)X
-1834(1024)X
-2015(and)X
-2152(a)X
-432 3270(\256ll)N
-540(factor)X
-748(of)X
-835(32.)X
-3 f
-432 3384(create)N
-663(test)X
-1 f
-547 3498(The)N
-703(keys)X
-881(are)X
-1011(entered)X
-1279(into)X
-1433(the)X
-1561(hash)X
-1738(table,)X
-1944(and)X
-2090(the)X
-547 3586(\256le)N
-669(is)X
-742(\257ushed)X
-993(to)X
-1075(disk.)X
-3 f
-432 3700(read)N
-608(test)X
-1 f
-547 3814(A)N
-640(lookup)X
-897(is)X
-984(performed)X
-1353(for)X
-1481(each)X
-1663(key)X
-1813(in)X
-1909(the)X
-2041(hash)X
-547 3902(table.)N
-3 f
-432 4016(verify)N
-653(test)X
-1 f
-547 4130(A)N
-640(lookup)X
-897(is)X
-984(performed)X
-1353(for)X
-1481(each)X
-1663(key)X
-1813(in)X
-1909(the)X
-2041(hash)X
-547 4218(table,)N
-759(and)X
-911(the)X
-1045(data)X
-1215(returned)X
-1519(is)X
-1608(compared)X
-1961(against)X
-547 4306(that)N
-687(originally)X
-1018(stored)X
-1234(in)X
-1316(the)X
-1434(hash)X
-1601(table.)X
-3 f
-432 4420(sequential)N
-798(retrieve)X
-1 f
-547 4534(All)N
-674(keys)X
-846(are)X
-970(retrieved)X
-1281(in)X
-1367(sequential)X
-1716(order)X
-1910(from)X
-2090(the)X
-547 4622(hash)N
-724(table.)X
-950(The)X
-2 f
-1105(ndbm)X
-1 f
-1313(interface)X
-1625(allows)X
-1863(sequential)X
-547 4710(retrieval)N
-848(of)X
-948(the)X
-1079(keys)X
-1259(from)X
-1448(the)X
-1578(database,)X
-1907(but)X
-2041(does)X
-547 4798(not)N
-701(return)X
-945(the)X
-1094(data)X
-1279(associated)X
-1660(with)X
-1853(each)X
-2052(key.)X
-547 4886(Therefore,)N
-929(we)X
-1067(compare)X
-1388(the)X
-1530(performance)X
-1980(of)X
-2090(the)X
-547 4974(new)N
-703(package)X
-989(to)X
-1073(two)X
-1215(different)X
-1514(runs)X
-1674(of)X
-2 f
-1763(ndbm)X
-1 f
-1941(.)X
-2002(In)X
-2090(the)X
-547 5062(\256rst)N
-697(case,)X
-2 f
-882(ndbm)X
-1 f
-1086(returns)X
-1335(only)X
-1503(the)X
-1627(keys)X
-1800(while)X
-2003(in)X
-2090(the)X
-547 5150(second,)N
-2 f
-823(ndbm)X
-1 f
-1034(returns)X
-1290(both)X
-1465(the)X
-1596(keys)X
-1776(and)X
-1924(the)X
-2054(data)X
-547 5238(\(requiring)N
-894(a)X
-956(second)X
-1204(call)X
-1345(to)X
-1432(the)X
-1555(library\).)X
-1861(There)X
-2074(is)X
-2152(a)X
-547 5326(single)N
-764(run)X
-897(for)X
-1017(the)X
-1141(new)X
-1300(library)X
-1539(since)X
-1729(it)X
-1798(returns)X
-2046(both)X
-547 5414(the)N
-665(key)X
-801(and)X
-937(the)X
-1055(data.)X
-3 f
-3014 538(In-Memory)N
-3431(Test)X
-1 f
-2590 670(This)N
-2757(test)X
-2892(uses)X
-3054(a)X
-3114(bucket)X
-3352(size)X
-3501(of)X
-3592(256)X
-3736(and)X
-3876(a)X
-3936(\256ll)X
-4048(fac-)X
-2418 758(tor)N
-2527(of)X
-2614(8.)X
-3 f
-2418 872(create/read)N
-2827(test)X
-1 f
-2533 986(In)N
-2627(this)X
-2769(test,)X
-2927(a)X
-2989(hash)X
-3162(table)X
-3344(is)X
-3423(created)X
-3682(by)X
-3788(inserting)X
-4094(all)X
-2533 1074(the)N
-2660(key/data)X
-2961(pairs.)X
-3186(Then)X
-3380(a)X
-3445(keyed)X
-3666(retrieval)X
-3963(is)X
-4044(per-)X
-2533 1162(formed)N
-2801(for)X
-2931(each)X
-3115(pair,)X
-3295(and)X
-3446(the)X
-3579(hash)X
-3761(table)X
-3952(is)X
-4040(des-)X
-2533 1250(troyed.)N
-3 f
-2938 1404(Performance)N
-3405(Results)X
-1 f
-2590 1536(Figures)N
-2866(8a)X
-2978(and)X
-3130(8b)X
-3246(show)X
-3451(the)X
-3585(user)X
-3755(time,)X
-3952(system)X
-2418 1624(time,)N
-2608(and)X
-2752(elapsed)X
-3021(time)X
-3191(for)X
-3312(each)X
-3487(test)X
-3625(for)X
-3746(both)X
-3915(the)X
-4040(new)X
-2418 1712(implementation)N
-2951(and)X
-3098(the)X
-3227(old)X
-3360(implementation)X
-3893(\()X
-2 f
-3920(hsearch)X
-1 f
-2418 1800(or)N
-2 f
-2528(ndbm)X
-1 f
-2706(,)X
-2769(whichever)X
-3147(is)X
-3243(appropriate\))X
-3678(as)X
-3787(well)X
-3967(as)X
-4076(the)X
-2418 1888(improvement.)N
-2929(The)X
-3098(improvement)X
-3569(is)X
-3666(expressed)X
-4027(as)X
-4138(a)X
-2418 1976(percentage)N
-2787(of)X
-2874(the)X
-2992(old)X
-3114(running)X
-3383(time:)X
-0 f
-8 s
-2418 2275(%)N
-2494(=)X
-2570(100)X
-2722(*)X
-2798 -0.4219(\(old_time)AX
-3178(-)X
-3254 -0.4219(new_time\))AX
-3634(/)X
-3710(old_time)X
-1 f
-10 s
-2590 2600(In)N
-2700(nearly)X
-2944(all)X
-3067(cases,)X
-3299(the)X
-3439(new)X
-3615(routines)X
-3915(perform)X
-2418 2688(better)N
-2628(than)X
-2793(the)X
-2918(old)X
-3047(routines)X
-3332(\(both)X
-2 f
-3527(hsearch)X
-1 f
-3807(and)X
-2 f
-3949(ndbm)X
-1 f
-4127(\).)X
-2418 2776(Although)N
-2755(the)X
-3 f
-2888(create)X
-1 f
-3134(tests)X
-3311(exhibit)X
-3567(superior)X
-3864(user)X
-4032(time)X
-2418 2864(performance,)N
-2869(the)X
-2991(test)X
-3126(time)X
-3292(is)X
-3369(dominated)X
-3731(by)X
-3834(the)X
-3955(cost)X
-4107(of)X
-2418 2952(writing)N
-2677(the)X
-2803(actual)X
-3023(\256le)X
-3153(to)X
-3243(disk.)X
-3444(For)X
-3583(the)X
-3709(large)X
-3897(database)X
-2418 3040(\(the)N
-2564(dictionary\),)X
-2957(this)X
-3093(completely)X
-3470(overwhelmed)X
-3927(the)X
-4045(sys-)X
-2418 3128(tem)N
-2570(time.)X
-2783(However,)X
-3129(for)X
-3254(the)X
-3383(small)X
-3587(data)X
-3752(base,)X
-3946(we)X
-4071(see)X
-2418 3216(that)N
-2569(differences)X
-2958(in)X
-3051(both)X
-3224(user)X
-3389(and)X
-3536(system)X
-3788(time)X
-3960(contri-)X
-2418 3304(bute)N
-2576(to)X
-2658(the)X
-2776(superior)X
-3059(performance)X
-3486(of)X
-3573(the)X
-3691(new)X
-3845(package.)X
-2590 3418(The)N
-3 f
-2764(read)X
-1 f
-2920(,)X
-3 f
-2989(verify)X
-1 f
-3190(,)X
-3259(and)X
-3 f
-3424(sequential)X
-1 f
-3818(results)X
-4075(are)X
-2418 3506(deceptive)N
-2758(for)X
-2883(the)X
-3012(small)X
-3216(database)X
-3524(since)X
-3720(the)X
-3849(entire)X
-4063(test)X
-2418 3594(ran)N
-2551(in)X
-2643(under)X
-2856(a)X
-2922(second.)X
-3215(However,)X
-3560(on)X
-3669(the)X
-3796(larger)X
-4013(data-)X
-2418 3682(base)N
-2590(the)X
-3 f
-2716(read)X
-1 f
-2900(and)X
-3 f
-3044(verify)X
-1 f
-3273(tests)X
-3443(bene\256t)X
-3689(from)X
-3873(the)X
-3999(cach-)X
-2418 3770(ing)N
-2546(of)X
-2639(buckets)X
-2910(in)X
-2998(the)X
-3122(new)X
-3282(package)X
-3571(to)X
-3658(improve)X
-3950(perfor-)X
-2418 3858(mance)N
-2666(by)X
-2784(over)X
-2965(80%.)X
-3169(Since)X
-3384(the)X
-3519(\256rst)X
-3 f
-3680(sequential)X
-1 f
-4063(test)X
-2418 3946(does)N
-2598(not)X
-2733(require)X
-2 f
-2994(ndbm)X
-1 f
-3205(to)X
-3299(return)X
-3523(the)X
-3653(data)X
-3819(values,)X
-4076(the)X
-2418 4034(user)N
-2573(time)X
-2735(is)X
-2808(lower)X
-3011(than)X
-3169(for)X
-3283(the)X
-3401(new)X
-3555(package.)X
-3879(However)X
-2418 4122(when)N
-2613(we)X
-2728(require)X
-2977(both)X
-3139(packages)X
-3454(to)X
-3536(return)X
-3748(data,)X
-3922(the)X
-4040(new)X
-2418 4210(package)N
-2702(excels)X
-2923(in)X
-3005(all)X
-3105(three)X
-3286(timings.)X
-2590 4324(The)N
-2773(small)X
-3003(database)X
-3337(runs)X
-3532(so)X
-3660(quickly)X
-3957(in)X
-4076(the)X
-2418 4412(memory-resident)N
-3000(case)X
-3173(that)X
-3326(the)X
-3457(results)X
-3699(are)X
-3831(uninterest-)X
-2418 4500(ing.)N
-2589(However,)X
-2933(for)X
-3056(the)X
-3183(larger)X
-3400(database)X
-3706(the)X
-3833(new)X
-3995(pack-)X
-2418 4588(age)N
-2567(pays)X
-2751(a)X
-2824(small)X
-3033(penalty)X
-3305(in)X
-3403(system)X
-3661(time)X
-3839(because)X
-4130(it)X
-2418 4676(limits)N
-2636(its)X
-2748(main)X
-2944(memory)X
-3247(utilization)X
-3607(and)X
-3759(swaps)X
-3991(pages)X
-2418 4764(out)N
-2550(to)X
-2642(temporary)X
-3002(storage)X
-3264(in)X
-3356(the)X
-3484(\256le)X
-3616(system)X
-3868(while)X
-4076(the)X
-2 f
-2418 4852(hsearch)N
-1 f
-2698(package)X
-2988(requires)X
-3273(that)X
-3419(the)X
-3543(application)X
-3924(allocate)X
-2418 4940(enough)N
-2692(space)X
-2909(for)X
-3041(all)X
-3159(key/data)X
-3468(pair.)X
-3670(However,)X
-4022(even)X
-2418 5028(with)N
-2600(the)X
-2738(system)X
-3000(time)X
-3182(penalty,)X
-3477(the)X
-3614(resulting)X
-3933(elapsed)X
-2418 5116(time)N
-2580(improves)X
-2898(by)X
-2998(over)X
-3161(50%.)X
-3 f
-432 5960(10)N
-2970(USENIX)X
-9 f
-3292(-)X
-3 f
-3356(Winter)X
-3621('91)X
-9 f
-3748(-)X
-3 f
-3812(Dallas,)X
-4065(TX)X
-
-11 p
-%%Page: 11 11
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-720 258(Seltzer)N
-977(&)X
-1064(Yigit)X
-3278(A)X
-3356(New)X
-3528(Hashing)X
-3831(Package)X
-4136(for)X
-4259(UNIX)X
-1 f
-10 f
-908 454(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2 f
-1379 546(hash)N
-1652(ndbm)X
-1950(%change)X
-1 f
-10 f
-908 550(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-948 642(CREATE)N
-10 f
-908 646(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-1125 738(user)N
-1424(6.4)X
-1671(12.2)X
-2073(48)X
-1157 826(sys)N
-1384(32.5)X
-1671(34.7)X
-2113(6)X
-3 f
-1006 914(elapsed)N
-10 f
-1310 922(c)N
-890(c)Y
-810(c)Y
-730(c)Y
-3 f
-1384 914(90.4)N
-10 f
-1581 922(c)N
-890(c)Y
-810(c)Y
-730(c)Y
-3 f
-1671 914(99.6)N
-10 f
-1883 922(c)N
-890(c)Y
-810(c)Y
-730(c)Y
-3 f
-2113 914(9)N
-1 f
-10 f
-908 910(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-908 926(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-948 1010(READ)N
-10 f
-908 1014(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-1125 1106(user)N
-1424(3.4)X
-1711(6.1)X
-2073(44)X
-1157 1194(sys)N
-1424(1.2)X
-1671(15.3)X
-2073(92)X
-3 f
-1006 1282(elapsed)N
-10 f
-1310 1290(c)N
-1258(c)Y
-1178(c)Y
-1098(c)Y
-3 f
-1424 1282(4.0)N
-10 f
-1581 1290(c)N
-1258(c)Y
-1178(c)Y
-1098(c)Y
-3 f
-1671 1282(21.2)N
-10 f
-1883 1290(c)N
-1258(c)Y
-1178(c)Y
-1098(c)Y
-3 f
-2073 1282(81)N
-1 f
-10 f
-908 1278(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-908 1294(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-948 1378(VERIFY)N
-10 f
-908 1382(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-1125 1474(user)N
-1424(3.5)X
-1711(6.3)X
-2073(44)X
-1157 1562(sys)N
-1424(1.2)X
-1671(15.3)X
-2073(92)X
-3 f
-1006 1650(elapsed)N
-10 f
-1310 1658(c)N
-1626(c)Y
-1546(c)Y
-1466(c)Y
-3 f
-1424 1650(4.0)N
-10 f
-1581 1658(c)N
-1626(c)Y
-1546(c)Y
-1466(c)Y
-3 f
-1671 1650(21.2)N
-10 f
-1883 1658(c)N
-1626(c)Y
-1546(c)Y
-1466(c)Y
-3 f
-2073 1650(81)N
-1 f
-10 f
-908 1646(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-908 1662(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-948 1746(SEQUENTIAL)N
-10 f
-908 1750(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-1125 1842(user)N
-1424(2.7)X
-1711(1.9)X
-2046(-42)X
-1157 1930(sys)N
-1424(0.7)X
-1711(3.9)X
-2073(82)X
-3 f
-1006 2018(elapsed)N
-10 f
-1310 2026(c)N
-1994(c)Y
-1914(c)Y
-1834(c)Y
-3 f
-1424 2018(3.0)N
-10 f
-1581 2026(c)N
-1994(c)Y
-1914(c)Y
-1834(c)Y
-3 f
-1711 2018(5.0)N
-10 f
-1883 2026(c)N
-1994(c)Y
-1914(c)Y
-1834(c)Y
-3 f
-2073 2018(40)N
-1 f
-10 f
-908 2014(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-908 2030(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-948 2114(SEQUENTIAL)N
-1467(\(with)X
-1656(data)X
-1810(retrieval\))X
-10 f
-908 2118(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-1125 2210(user)N
-1424(2.7)X
-1711(8.2)X
-2073(67)X
-1157 2298(sys)N
-1424(0.7)X
-1711(4.3)X
-2073(84)X
-3 f
-1006 2386(elapsed)N
-1424(3.0)X
-1671(12.0)X
-2073(75)X
-1 f
-10 f
-908 2390(i)N
-927(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-899 2394(c)N
-2378(c)Y
-2298(c)Y
-2218(c)Y
-2138(c)Y
-2058(c)Y
-1978(c)Y
-1898(c)Y
-1818(c)Y
-1738(c)Y
-1658(c)Y
-1578(c)Y
-1498(c)Y
-1418(c)Y
-1338(c)Y
-1258(c)Y
-1178(c)Y
-1098(c)Y
-1018(c)Y
-938(c)Y
-858(c)Y
-778(c)Y
-698(c)Y
-618(c)Y
-538(c)Y
-1310 2394(c)N
-2362(c)Y
-2282(c)Y
-2202(c)Y
-1581 2394(c)N
-2362(c)Y
-2282(c)Y
-2202(c)Y
-1883 2394(c)N
-2362(c)Y
-2282(c)Y
-2202(c)Y
-2278 2394(c)N
-2378(c)Y
-2298(c)Y
-2218(c)Y
-2138(c)Y
-2058(c)Y
-1978(c)Y
-1898(c)Y
-1818(c)Y
-1738(c)Y
-1658(c)Y
-1578(c)Y
-1498(c)Y
-1418(c)Y
-1338(c)Y
-1258(c)Y
-1178(c)Y
-1098(c)Y
-1018(c)Y
-938(c)Y
-858(c)Y
-778(c)Y
-698(c)Y
-618(c)Y
-538(c)Y
-905 2574(i)N
-930(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2 f
-1318 2666(hash)N
-1585(hsearch)X
-1953(%change)X
-1 f
-10 f
-905 2670(i)N
-930(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-945 2762(CREATE/READ)N
-10 f
-905 2766(i)N
-930(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-1064 2858(user)N
-1343(6.6)X
-1642(17.2)X
-2096(62)X
-1096 2946(sys)N
-1343(1.1)X
-1682(0.3)X
-2029(-266)X
-3 f
-945 3034(elapsed)N
-1343(7.8)X
-1642(17.0)X
-2096(54)X
-1 f
-10 f
-905 3038(i)N
-930(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-896 3050(c)N
-2978(c)Y
-2898(c)Y
-2818(c)Y
-2738(c)Y
-2658(c)Y
-1249 3034(c)N
-3010(c)Y
-2930(c)Y
-2850(c)Y
-1520 3034(c)N
-3010(c)Y
-2930(c)Y
-2850(c)Y
-1886 3034(c)N
-3010(c)Y
-2930(c)Y
-2850(c)Y
-2281 3050(c)N
-2978(c)Y
-2898(c)Y
-2818(c)Y
-2738(c)Y
-2658(c)Y
-3 f
-720 3174(Figure)N
-967(8a:)X
-1 f
-1094(Timing)X
-1349(results)X
-1578(for)X
-1692(the)X
-1810(dictionary)X
-2155(database.)X
-10 f
-720 3262 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-3 f
-1407 3504(Conclusion)N
-1 f
-892 3636(This)N
-1063(paper)X
-1271(has)X
-1407(presented)X
-1744(the)X
-1871(design,)X
-2129(implemen-)X
-720 3724(tation)N
-928(and)X
-1070(performance)X
-1503(of)X
-1596(a)X
-1658(new)X
-1818(hashing)X
-2093(package)X
-2382(for)X
-720 3812(UNIX.)N
-993(The)X
-1150(new)X
-1316(package)X
-1612(provides)X
-1919(a)X
-1986(superset)X
-2280(of)X
-2378(the)X
-720 3900(functionality)N
-1159(of)X
-1255(existing)X
-1537(hashing)X
-1815(packages)X
-2139(and)X
-2284(incor-)X
-720 3988(porates)N
-975(additional)X
-1318(features)X
-1596(such)X
-1766(as)X
-1855(large)X
-2038(key)X
-2176(handling,)X
-720 4076(user)N
-876(de\256ned)X
-1134(hash)X
-1302(functions,)X
-1641(multiple)X
-1928(hash)X
-2096(tables,)X
-2324(vari-)X
-720 4164(able)N
-894(sized)X
-1099(pages,)X
-1342(and)X
-1498(linear)X
-1721(hashing.)X
-2050(In)X
-2156(nearly)X
-2396(all)X
-720 4252(cases,)N
-954(the)X
-1096(new)X
-1274(package)X
-1582(provides)X
-1902(improved)X
-2252(perfor-)X
-720 4340(mance)N
-974(on)X
-1098(the)X
-1240(order)X
-1454(of)X
-1565(50-80%)X
-1863(for)X
-2001(the)X
-2142(workloads)X
-720 4428(shown.)N
-990(Applications)X
-1420(such)X
-1588(as)X
-1676(the)X
-1794(loader,)X
-2035(compiler,)X
-2360(and)X
-720 4516(mail,)N
-921(which)X
-1156(currently)X
-1485(implement)X
-1866(their)X
-2051(own)X
-2227(hashing)X
-720 4604(routines,)N
-1032(should)X
-1279(be)X
-1389(modi\256ed)X
-1706(to)X
-1801(use)X
-1941(the)X
-2072(generic)X
-2342(rou-)X
-720 4692(tines.)N
-892 4806(This)N
-1087(hashing)X
-1389(package)X
-1705(is)X
-1810(one)X
-1978(access)X
-2236(method)X
-720 4894(which)N
-953(is)X
-1043(part)X
-1205(of)X
-1309(a)X
-1382(generic)X
-1656(database)X
-1970(access)X
-2212(package)X
-720 4982(being)N
-955(developed)X
-1342(at)X
-1457(the)X
-1612(University)X
-2007(of)X
-2131(California,)X
-720 5070(Berkeley.)N
-1089(It)X
-1177(will)X
-1340(include)X
-1614(a)X
-1688(btree)X
-1887(access)X
-2131(method)X
-2409(as)X
-720 5158(well)N
-916(as)X
-1041(\256xed)X
-1259(and)X
-1433(variable)X
-1750(length)X
-2007(record)X
-2270(access)X
-720 5246(methods)N
-1024(in)X
-1119(addition)X
-1414(to)X
-1509(the)X
-1640(hashed)X
-1896(support)X
-2168(presented)X
-720 5334(here.)N
-948(All)X
-1099(of)X
-1215(the)X
-1361(access)X
-1615(methods)X
-1934(are)X
-2081(based)X
-2312(on)X
-2440(a)X
-720 5422(key/data)N
-1037(pair)X
-1207(interface)X
-1533(and)X
-1693(appear)X
-1952(identical)X
-2272(to)X
-2378(the)X
-720 5510(application)N
-1121(layer,)X
-1347(allowing)X
-1671(application)X
-2071(implementa-)X
-720 5598(tions)N
-906(to)X
-999(be)X
-1106(largely)X
-1360(independent)X
-1783(of)X
-1881(the)X
-2010(database)X
-2318(type.)X
-720 5686(The)N
-873(package)X
-1165(is)X
-1246(expected)X
-1560(to)X
-1650(be)X
-1754(an)X
-1858(integral)X
-2131(part)X
-2284(of)X
-2378(the)X
-2706 538(4.4BSD)N
-3006(system,)X
-3293(with)X
-3479(various)X
-3759(standard)X
-4075(applications)X
-2706 626(such)N
-2879(as)X
-2972(more\(1\),)X
-3277(sort\(1\))X
-3517(and)X
-3659(vi\(1\))X
-3841(based)X
-4050(on)X
-4156(it.)X
-4266(While)X
-2706 714(the)N
-2833(current)X
-3089(design)X
-3326(does)X
-3501(not)X
-3631(support)X
-3899(multi-user)X
-4256(access)X
-2706 802(or)N
-2804(transactions,)X
-3238(they)X
-3407(could)X
-3616(be)X
-3723(incorporated)X
-4159(relatively)X
-2706 890(easily.)N
-10 f
-2894 938(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2 f
-3365 1030(hash)N
-3638(ndbm)X
-3936(%change)X
-1 f
-10 f
-2894 1034(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2934 1126(CREATE)N
-10 f
-2894 1130(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-3111 1222(user)N
-3390(0.2)X
-3677(0.4)X
-4079(50)X
-3143 1310(sys)N
-3390(0.1)X
-3677(1.0)X
-4079(90)X
-3 f
-2992 1398(elapsed)N
-10 f
-3296 1406(c)N
-1374(c)Y
-1294(c)Y
-1214(c)Y
-3 f
-3390 1398(0)N
-10 f
-3567 1406(c)N
-1374(c)Y
-1294(c)Y
-1214(c)Y
-3 f
-3677 1398(3.2)N
-10 f
-3869 1406(c)N
-1374(c)Y
-1294(c)Y
-1214(c)Y
-3 f
-4039 1398(100)N
-1 f
-10 f
-2894 1394(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2894 1410(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2934 1494(READ)N
-10 f
-2894 1498(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-3111 1590(user)N
-3390(0.1)X
-3677(0.1)X
-4119(0)X
-3143 1678(sys)N
-3390(0.1)X
-3677(0.4)X
-4079(75)X
-3 f
-2992 1766(elapsed)N
-10 f
-3296 1774(c)N
-1742(c)Y
-1662(c)Y
-1582(c)Y
-3 f
-3390 1766(0.0)N
-10 f
-3567 1774(c)N
-1742(c)Y
-1662(c)Y
-1582(c)Y
-3 f
-3677 1766(0.0)N
-10 f
-3869 1774(c)N
-1742(c)Y
-1662(c)Y
-1582(c)Y
-3 f
-4119 1766(0)N
-1 f
-10 f
-2894 1762(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2894 1778(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2934 1862(VERIFY)N
-10 f
-2894 1866(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-3111 1958(user)N
-3390(0.1)X
-3677(0.2)X
-4079(50)X
-3143 2046(sys)N
-3390(0.1)X
-3677(0.3)X
-4079(67)X
-3 f
-2992 2134(elapsed)N
-10 f
-3296 2142(c)N
-2110(c)Y
-2030(c)Y
-1950(c)Y
-3 f
-3390 2134(0.0)N
-10 f
-3567 2142(c)N
-2110(c)Y
-2030(c)Y
-1950(c)Y
-3 f
-3677 2134(0.0)N
-10 f
-3869 2142(c)N
-2110(c)Y
-2030(c)Y
-1950(c)Y
-3 f
-4119 2134(0)N
-1 f
-10 f
-2894 2130(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2894 2146(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2934 2230(SEQUENTIAL)N
-10 f
-2894 2234(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-3111 2326(user)N
-3390(0.1)X
-3677(0.0)X
-4012(-100)X
-3143 2414(sys)N
-3390(0.1)X
-3677(0.1)X
-4119(0)X
-3 f
-2992 2502(elapsed)N
-10 f
-3296 2510(c)N
-2478(c)Y
-2398(c)Y
-2318(c)Y
-3 f
-3390 2502(0.0)N
-10 f
-3567 2510(c)N
-2478(c)Y
-2398(c)Y
-2318(c)Y
-3 f
-3677 2502(0.0)N
-10 f
-3869 2510(c)N
-2478(c)Y
-2398(c)Y
-2318(c)Y
-3 f
-4119 2502(0)N
-1 f
-10 f
-2894 2498(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2894 2514(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2934 2598(SEQUENTIAL)N
-3453(\(with)X
-3642(data)X
-3796(retrieval\))X
-10 f
-2894 2602(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-3111 2694(user)N
-3390(0.1)X
-3677(0.1)X
-4119(0)X
-3143 2782(sys)N
-3390(0.1)X
-3677(0.1)X
-4119(0)X
-3 f
-2992 2870(elapsed)N
-3390(0.0)X
-3677(0.0)X
-4119(0)X
-1 f
-10 f
-2894 2874(i)N
-2913(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2885 2878(c)N
-2862(c)Y
-2782(c)Y
-2702(c)Y
-2622(c)Y
-2542(c)Y
-2462(c)Y
-2382(c)Y
-2302(c)Y
-2222(c)Y
-2142(c)Y
-2062(c)Y
-1982(c)Y
-1902(c)Y
-1822(c)Y
-1742(c)Y
-1662(c)Y
-1582(c)Y
-1502(c)Y
-1422(c)Y
-1342(c)Y
-1262(c)Y
-1182(c)Y
-1102(c)Y
-1022(c)Y
-3296 2878(c)N
-2846(c)Y
-2766(c)Y
-2686(c)Y
-3567 2878(c)N
-2846(c)Y
-2766(c)Y
-2686(c)Y
-3869 2878(c)N
-2846(c)Y
-2766(c)Y
-2686(c)Y
-4264 2878(c)N
-2862(c)Y
-2782(c)Y
-2702(c)Y
-2622(c)Y
-2542(c)Y
-2462(c)Y
-2382(c)Y
-2302(c)Y
-2222(c)Y
-2142(c)Y
-2062(c)Y
-1982(c)Y
-1902(c)Y
-1822(c)Y
-1742(c)Y
-1662(c)Y
-1582(c)Y
-1502(c)Y
-1422(c)Y
-1342(c)Y
-1262(c)Y
-1182(c)Y
-1102(c)Y
-1022(c)Y
-2891 3058(i)N
-2916(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2 f
-3304 3150(hash)N
-3571(hsearch)X
-3939(%change)X
-1 f
-10 f
-2891 3154(i)N
-2916(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2931 3246(CREATE/READ)N
-10 f
-2891 3250(i)N
-2916(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-3050 3342(user)N
-3329(0.3)X
-3648(0.4)X
-4048(25)X
-3082 3430(sys)N
-3329(0.0)X
-3648(0.0)X
-4088(0)X
-3 f
-2931 3518(elapsed)N
-3329(0.0)X
-3648(0.0)X
-4088(0)X
-1 f
-10 f
-2891 3522(i)N
-2916(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2882 3534(c)N
-3462(c)Y
-3382(c)Y
-3302(c)Y
-3222(c)Y
-3142(c)Y
-3235 3518(c)N
-3494(c)Y
-3414(c)Y
-3334(c)Y
-3506 3518(c)N
-3494(c)Y
-3414(c)Y
-3334(c)Y
-3872 3518(c)N
-3494(c)Y
-3414(c)Y
-3334(c)Y
-4267 3534(c)N
-3462(c)Y
-3382(c)Y
-3302(c)Y
-3222(c)Y
-3142(c)Y
-3 f
-2706 3658(Figure)N
-2953(8b:)X
-1 f
-3084(Timing)X
-3339(results)X
-3568(for)X
-3682(the)X
-3800(password)X
-4123(database.)X
-10 f
-2706 3746 -0.0930(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)AN
-3 f
-3396 3988(References)N
-1 f
-2706 4120([ATT79])N
-3058(AT&T,)X
-3358(DBM\(3X\),)X
-2 f
-3773(Unix)X
-3990(Programmer's)X
-2878 4208(Manual,)N
-3194(Seventh)X
-3491(Edition,)X
-3793(Volume)X
-4085(1)X
-1 f
-(,)S
-4192(January,)X
-2878 4296(1979.)N
-2706 4472([ATT85])N
-3027(AT&T,)X
-3296(HSEARCH\(BA_LIB\),)X
-2 f
-4053(Unix)X
-4239(System)X
-2878 4560(User's)N
-3112(Manual,)X
-3401(System)X
-3644(V.3)X
-1 f
-3753(,)X
-3793(pp.)X
-3913(506-508,)X
-4220(1985.)X
-2706 4736([BRE73])N
-3025(Brent,)X
-3253(Richard)X
-3537(P.,)X
-3651(``Reducing)X
-4041(the)X
-4168(Retrieval)X
-2878 4824(Time)N
-3071(of)X
-3162(Scatter)X
-3409(Storage)X
-3678(Techniques'',)X
-2 f
-4146(Commun-)X
-2878 4912(ications)N
-3175(of)X
-3281(the)X
-3422(ACM)X
-1 f
-3591(,)X
-3654(Volume)X
-3955(16,)X
-4098(No.)X
-4259(2,)X
-4362(pp.)X
-2878 5000(105-109,)N
-3185(February,)X
-3515(1973.)X
-2706 5176([BSD86])N
-3055(NDBM\(3\),)X
-2 f
-3469(4.3BSD)X
-3775(Unix)X
-3990(Programmer's)X
-2878 5264(Manual)N
-3155(Reference)X
-3505(Guide)X
-1 f
-3701(,)X
-3749(University)X
-4114(of)X
-4208(Califor-)X
-2878 5352(nia,)N
-3016(Berkeley,)X
-3346(1986.)X
-2706 5528([ENB88])N
-3025(Enbody,)X
-3319(R.)X
-3417(J.,)X
-3533(Du,)X
-3676(H.)X
-3779(C.,)X
-3897(``Dynamic)X
-4270(Hash-)X
-2878 5616(ing)N
-3034(Schemes'',)X
-2 f
-3427(ACM)X
-3630(Computing)X
-4019(Surveys)X
-1 f
-4269(,)X
-4322(Vol.)X
-2878 5704(20,)N
-2998(No.)X
-3136(2,)X
-3216(pp.)X
-3336(85-113,)X
-3603(June)X
-3770(1988.)X
-3 f
-720 5960(USENIX)N
-9 f
-1042(-)X
-3 f
-1106(Winter)X
-1371('91)X
-9 f
-1498(-)X
-3 f
-1562(Dallas,)X
-1815(TX)X
-4384(11)X
-
-12 p
-%%Page: 12 12
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-432 258(A)N
-510(New)X
-682(Hashing)X
-985(Package)X
-1290(for)X
-1413(UNIX)X
-3663(Seltzer)X
-3920(&)X
-4007(Yigit)X
-1 f
-432 538([FAG79])N
-776(Ronald)X
-1057(Fagin,)X
-1308(Jurg)X
-1495(Nievergelt,)X
-1903(Nicholas)X
-604 626(Pippenger,)N
-1003(H.)X
-1135(Raymond)X
-1500(Strong,)X
-1787(``Extendible)X
-604 714(Hashing)N
-901(--)X
-985(A)X
-1073(Fast)X
-1236(Access)X
-1493(Method)X
-1771(for)X
-1894(Dynamic)X
-604 802(Files'',)N
-2 f
-855(ACM)X
-1046(Transactions)X
-1485(on)X
-1586(Database)X
-1914(Systems)X
-1 f
-2168(,)X
-604 890(Volume)N
-882(4,)X
-962(No.)X
-1100(3.,)X
-1200(September)X
-1563(1979,)X
-1763(pp)X
-1863(315-34)X
-432 1066([KNU68],)N
-802(Knuth,)X
-1064(D.E.,)X
-2 f
-1273(The)X
-1434(Art)X
-1577(of)X
-1680(Computer)X
-2041(Pro-)X
-604 1154(gramming)N
-971(Vol.)X
-1140(3:)X
-1245(Sorting)X
-1518(and)X
-1676(Searching)X
-1 f
-2001(,)X
-2058(sec-)X
-604 1242(tions)N
-779(6.3-6.4,)X
-1046(pp)X
-1146(481-550.)X
-432 1418([LAR78])N
-747(Larson,)X
-1011(Per-Ake,)X
-1319(``Dynamic)X
-1687(Hashing'',)X
-2 f
-2048(BIT)X
-1 f
-(,)S
-604 1506(Vol.)N
-764(18,)X
-884(1978,)X
-1084(pp.)X
-1204(184-201.)X
-432 1682([LAR88])N
-752(Larson,)X
-1021(Per-Ake,)X
-1335(``Dynamic)X
-1709(Hash)X
-1900(Tables'',)X
-2 f
-604 1770(Communications)N
-1183(of)X
-1281(the)X
-1415(ACM)X
-1 f
-1584(,)X
-1640(Volume)X
-1934(31,)X
-2070(No.)X
-604 1858(4.,)N
-704(April)X
-893(1988,)X
-1093(pp)X
-1193(446-457.)X
-432 2034([LIT80])N
-731(Witold,)X
-1013(Litwin,)X
-1286(``Linear)X
-1590(Hashing:)X
-1939(A)X
-2036(New)X
-604 2122(Tool)N
-786(for)X
-911(File)X
-1065(and)X
-1211(Table)X
-1424(Addressing'',)X
-2 f
-1893(Proceed-)X
-604 2210(ings)N
-761(of)X
-847(the)X
-969(6th)X
-1095(International)X
-1540(Conference)X
-1933(on)X
-2036(Very)X
-604 2298(Large)N
-815(Databases)X
-1 f
-1153(,)X
-1193(1980.)X
-432 2474([NEL90])N
-743(Nelson,)X
-1011(Philip)X
-1222(A.,)X
-2 f
-1341(Gdbm)X
-1558(1.4)X
-1679(source)X
-1913(distribu-)X
-604 2562(tion)N
-748(and)X
-888(README)X
-1 f
-1209(,)X
-1249(August)X
-1500(1990.)X
-432 2738([THOM90])N
-840(Ken)X
-1011(Thompson,)X
-1410(private)X
-1670(communication,)X
-604 2826(Nov.)N
-782(1990.)X
-432 3002([TOR87])N
-790(Torek,)X
-1066(C.,)X
-1222(``Re:)X
-1470(dbm.a)X
-1751(and)X
-1950(ndbm.a)X
-604 3090(archives'',)N
-2 f
-966(USENET)X
-1279(newsgroup)X
-1650(comp.unix)X
-1 f
-2002(1987.)X
-432 3266([TOR88])N
-760(Torek,)X
-1006(C.,)X
-1133(``Re:)X
-1351(questions)X
-1686(regarding)X
-2027(data-)X
-604 3354(bases)N
-826(created)X
-1106(with)X
-1295(dbm)X
-1484(and)X
-1647(ndbm)X
-1876(routines'')X
-2 f
-604 3442(USENET)N
-937(newsgroup)X
-1328(comp.unix.questions)X
-1 f
-1982(,)X
-2041(June)X
-604 3530(1988.)N
-432 3706([WAL84])N
-773(Wales,)X
-1018(R.,)X
-1135(``Discussion)X
-1564(of)X
-1655("dbm")X
-1887(data)X
-2045(base)X
-604 3794(system'',)N
-2 f
-973(USENET)X
-1339(newsgroup)X
-1762(unix.wizards)X
-1 f
-2168(,)X
-604 3882(January,)N
-894(1984.)X
-432 4058([YIG89])N
-751(Ozan)X
-963(S.)X
-1069(Yigit,)X
-1294(``How)X
-1545(to)X
-1648(Roll)X
-1826(Your)X
-2032(Own)X
-604 4146(Dbm/Ndbm'',)N
-2 f
-1087(unpublished)X
-1504(manuscript)X
-1 f
-(,)S
-1910(Toronto,)X
-604 4234(July,)N
-777(1989)X
-3 f
-432 5960(12)N
-2970(USENIX)X
-9 f
-3292(-)X
-3 f
-3356(Winter)X
-3621('91)X
-9 f
-3748(-)X
-3 f
-3812(Dallas,)X
-4065(TX)X
-
-13 p
-%%Page: 13 13
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-720 258(Seltzer)N
-977(&)X
-1064(Yigit)X
-3278(A)X
-3356(New)X
-3528(Hashing)X
-3831(Package)X
-4136(for)X
-4259(UNIX)X
-1 f
-720 538(Margo)N
-960(I.)X
-1033(Seltzer)X
-1282(is)X
-1361(a)X
-1423(Ph.D.)X
-1631(student)X
-1887(in)X
-1974(the)X
-2097(Department)X
-720 626(of)N
-823(Electrical)X
-1167(Engineering)X
-1595(and)X
-1747(Computer)X
-2102(Sciences)X
-2418(at)X
-720 714(the)N
-850(University)X
-1220(of)X
-1318(California,)X
-1694(Berkeley.)X
-2055(Her)X
-2207(research)X
-720 802(interests)N
-1017(include)X
-1283(\256le)X
-1415(systems,)X
-1718(databases,)X
-2076(and)X
-2221(transac-)X
-720 890(tion)N
-896(processing)X
-1291(systems.)X
-1636(She)X
-1807(spent)X
-2027(several)X
-2306(years)X
-720 978(working)N
-1026(at)X
-1123(startup)X
-1380(companies)X
-1762(designing)X
-2112(and)X
-2267(imple-)X
-720 1066(menting)N
-1048(\256le)X
-1216(systems)X
-1535(and)X
-1716(transaction)X
-2133(processing)X
-720 1154(software)N
-1026(and)X
-1170(designing)X
-1509(microprocessors.)X
-2103(Ms.)X
-2253(Seltzer)X
-720 1242(received)N
-1057(her)X
-1223(AB)X
-1397(in)X
-1522(Applied)X
-1843(Mathematics)X
-2320(from)X
-720 1330 0.1953(Harvard/Radcliffe)AN
-1325(College)X
-1594(in)X
-1676(1983.)X
-720 1444(In)N
-810(her)X
-936(spare)X
-1129(time,)X
-1313(Margo)X
-1549(can)X
-1683(usually)X
-1936(be)X
-2034(found)X
-2243(prepar-)X
-720 1532(ing)N
-868(massive)X
-1171(quantities)X
-1527(of)X
-1639(food)X
-1831(for)X
-1970(hungry)X
-2242(hoards,)X
-720 1620(studying)N
-1022(Japanese,)X
-1355(or)X
-1449(playing)X
-1716(soccer)X
-1948(with)X
-2116(an)X
-2218(exciting)X
-720 1708(Bay)N
-912(Area)X
-1132(Women's)X
-1507(Soccer)X
-1788(team,)X
-2026(the)X
-2186(Berkeley)X
-720 1796(Bruisers.)N
-720 1910(Ozan)N
-915(\()X
-3 f
-942(Oz)X
-1 f
-1040(\))X
-1092(Yigit)X
-1281(is)X
-1358(currently)X
-1672(a)X
-1732(software)X
-2033(engineer)X
-2334(with)X
-720 1998(the)N
-886(Communications)X
-1499(Research)X
-1861(and)X
-2044(Development)X
-720 2086(group,)N
-948(Computing)X
-1328(Services,)X
-1641(York)X
-1826(University.)X
-2224(His)X
-2355(for-)X
-720 2174(mative)N
-967(years)X
-1166(were)X
-1352(also)X
-1510(spent)X
-1708(at)X
-1795(York,)X
-2009(where)X
-2234(he)X
-2338(held)X
-720 2262(system)N
-985(programmer)X
-1425(and)X
-1583(administrator)X
-2052(positions)X
-2382(for)X
-720 2350(various)N
-995(mixtures)X
-1314(of)X
-1420(of)X
-1526(UNIX)X
-1765(systems)X
-2056(starting)X
-2334(with)X
-720 2438(Berkeley)N
-1031(4.1)X
-1151(in)X
-1233(1982,)X
-1433(while)X
-1631(at)X
-1709(the)X
-1827(same)X
-2012(time)X
-2174(obtaining)X
-720 2526(a)N
-776(degree)X
-1011(in)X
-1093(Computer)X
-1433(Science.)X
-720 2640(In)N
-813(his)X
-931(copious)X
-1205(free)X
-1356(time,)X
-1543(Oz)X
-1662(enjoys)X
-1896(working)X
-2188(on)X
-2293(what-)X
-720 2728(ever)N
-890(software)X
-1197(looks)X
-1400(interesting,)X
-1788(which)X
-2014(often)X
-2209(includes)X
-720 2816(language)N
-1044(interpreters,)X
-1464(preprocessors,)X
-1960(and)X
-2110(lately,)X
-2342(pro-)X
-720 2904(gram)N
-905(generators)X
-1260(and)X
-1396(expert)X
-1617(systems.)X
-720 3018(Oz)N
-836(has)X
-964(authored)X
-1266(several)X
-1515(public-domain)X
-2003(software)X
-2301(tools,)X
-720 3106(including)N
-1069(an)X
-1191(nroff-like)X
-1545(text)X
-1711(formatter)X
-2 f
-2056(proff)X
-1 f
-2257(that)X
-2423(is)X
-720 3194(apparently)N
-1083(still)X
-1226(used)X
-1397(in)X
-1483(some)X
-1676(basement)X
-2002(PCs.)X
-2173(His)X
-2307(latest)X
-720 3282(obsessions)N
-1143(include)X
-1460(the)X
-1639(incredible)X
-2040(programming)X
-720 3370(language)N
-1030(Scheme,)X
-1324(and)X
-1460(Chinese)X
-1738(Brush)X
-1949(painting.)X
-3 f
-720 5960(USENIX)N
-9 f
-1042(-)X
-3 f
-1106(Winter)X
-1371('91)X
-9 f
-1498(-)X
-3 f
-1562(Dallas,)X
-1815(TX)X
-4384(13)X
-
-14 p
-%%Page: 14 14
-0(Courier)xf 0 f
-10 s 10 xH 0 xS 0 f
-3 f
-432 5960(14)N
-2970(USENIX)X
-9 f
-3292(-)X
-3 f
-3356(Winter)X
-3621('91)X
-9 f
-3748(-)X
-3 f
-3812(Dallas,)X
-4065(TX)X
-
-14 p
-%%Trailer
-xt
-
-xs
diff --git a/lib/libc/db/docs/libtp.usenix.ps b/lib/libc/db/docs/libtp.usenix.ps
deleted file mode 100644
index ea821a9..0000000
--- a/lib/libc/db/docs/libtp.usenix.ps
+++ /dev/null
@@ -1,12340 +0,0 @@
-%!PS-Adobe-1.0
-%%Creator: utopia:margo (& Seltzer,608-13E,8072,)
-%%Title: stdin (ditroff)
-%%CreationDate: Thu Dec 12 15:32:11 1991
-%%EndComments
-% @(#)psdit.pro 1.3 4/15/88
-% lib/psdit.pro -- prolog for psdit (ditroff) files
-% Copyright (c) 1984, 1985 Adobe Systems Incorporated. All Rights Reserved.
-% last edit: shore Sat Nov 23 20:28:03 1985
-% RCSID: $Header: psdit.pro,v 2.1 85/11/24 12:19:43 shore Rel $
-
-% Changed by Edward Wang (edward@ucbarpa.berkeley.edu) to handle graphics,
-% 17 Feb, 87.
-
-/$DITroff 140 dict def $DITroff begin
-/fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def
-/xi{0 72 11 mul translate 72 resolution div dup neg scale 0 0 moveto
- /fontnum 1 def /fontsize 10 def /fontheight 10 def /fontslant 0 def F
- /pagesave save def}def
-/PB{save /psv exch def currentpoint translate
- resolution 72 div dup neg scale 0 0 moveto}def
-/PE{psv restore}def
-/arctoobig 90 def /arctoosmall .05 def
-/m1 matrix def /m2 matrix def /m3 matrix def /oldmat matrix def
-/tan{dup sin exch cos div}def
-/point{resolution 72 div mul}def
-/dround {transform round exch round exch itransform}def
-/xT{/devname exch def}def
-/xr{/mh exch def /my exch def /resolution exch def}def
-/xp{}def
-/xs{docsave restore end}def
-/xt{}def
-/xf{/fontname exch def /slotno exch def fontnames slotno get fontname eq not
- {fonts slotno fontname findfont put fontnames slotno fontname put}if}def
-/xH{/fontheight exch def F}def
-/xS{/fontslant exch def F}def
-/s{/fontsize exch def /fontheight fontsize def F}def
-/f{/fontnum exch def F}def
-/F{fontheight 0 le{/fontheight fontsize def}if
- fonts fontnum get fontsize point 0 0 fontheight point neg 0 0 m1 astore
- fontslant 0 ne{1 0 fontslant tan 1 0 0 m2 astore m3 concatmatrix}if
- makefont setfont .04 fontsize point mul 0 dround pop setlinewidth}def
-/X{exch currentpoint exch pop moveto show}def
-/N{3 1 roll moveto show}def
-/Y{exch currentpoint pop exch moveto show}def
-/S{show}def
-/ditpush{}def/ditpop{}def
-/AX{3 -1 roll currentpoint exch pop moveto 0 exch ashow}def
-/AN{4 2 roll moveto 0 exch ashow}def
-/AY{3 -1 roll currentpoint pop exch moveto 0 exch ashow}def
-/AS{0 exch ashow}def
-/MX{currentpoint exch pop moveto}def
-/MY{currentpoint pop exch moveto}def
-/MXY{moveto}def
-/cb{pop}def % action on unknown char -- nothing for now
-/n{}def/w{}def
-/p{pop showpage pagesave restore /pagesave save def}def
-/Dt{/Dlinewidth exch def}def 1 Dt
-/Ds{/Ddash exch def}def -1 Ds
-/Di{/Dstipple exch def}def 1 Di
-/Dsetlinewidth{2 Dlinewidth mul setlinewidth}def
-/Dsetdash{Ddash 4 eq{[8 12]}{Ddash 16 eq{[32 36]}
- {Ddash 20 eq{[32 12 8 12]}{[]}ifelse}ifelse}ifelse 0 setdash}def
-/Dstroke{gsave Dsetlinewidth Dsetdash 1 setlinecap stroke grestore
- currentpoint newpath moveto}def
-/Dl{rlineto Dstroke}def
-/arcellipse{/diamv exch def /diamh exch def oldmat currentmatrix pop
- currentpoint translate 1 diamv diamh div scale /rad diamh 2 div def
- currentpoint exch rad add exch rad -180 180 arc oldmat setmatrix}def
-/Dc{dup arcellipse Dstroke}def
-/De{arcellipse Dstroke}def
-/Da{/endv exch def /endh exch def /centerv exch def /centerh exch def
- /cradius centerv centerv mul centerh centerh mul add sqrt def
- /eradius endv endv mul endh endh mul add sqrt def
- /endang endv endh atan def
- /startang centerv neg centerh neg atan def
- /sweep startang endang sub dup 0 lt{360 add}if def
- sweep arctoobig gt
- {/midang startang sweep 2 div sub def /midrad cradius eradius add 2 div def
- /midh midang cos midrad mul def /midv midang sin midrad mul def
- midh neg midv neg endh endv centerh centerv midh midv Da
- Da}
- {sweep arctoosmall ge
- {/controldelt 1 sweep 2 div cos sub 3 sweep 2 div sin mul div 4 mul def
- centerv neg controldelt mul centerh controldelt mul
- endv neg controldelt mul centerh add endh add
- endh controldelt mul centerv add endv add
- centerh endh add centerv endv add rcurveto Dstroke}
- {centerh endh add centerv endv add rlineto Dstroke}
- ifelse}
- ifelse}def
-/Dpatterns[
-[%cf[widthbits]
-[8<0000000000000010>]
-[8<0411040040114000>]
-[8<0204081020408001>]
-[8<0000103810000000>]
-[8<6699996666999966>]
-[8<0000800100001008>]
-[8<81c36666c3810000>]
-[8<0f0e0c0800000000>]
-[8<0000000000000010>]
-[8<0411040040114000>]
-[8<0204081020408001>]
-[8<0000001038100000>]
-[8<6699996666999966>]
-[8<0000800100001008>]
-[8<81c36666c3810000>]
-[8<0f0e0c0800000000>]
-[8<0042660000246600>]
-[8<0000990000990000>]
-[8<0804020180402010>]
-[8<2418814242811824>]
-[8<6699996666999966>]
-[8<8000000008000000>]
-[8<00001c3e363e1c00>]
-[8<0000000000000000>]
-[32<00000040000000c00000004000000040000000e0000000000000000000000000>]
-[32<00000000000060000000900000002000000040000000f0000000000000000000>]
-[32<000000000000000000e0000000100000006000000010000000e0000000000000>]
-[32<00000000000000002000000060000000a0000000f00000002000000000000000>]
-[32<0000000e0000000000000000000000000000000f000000080000000e00000001>]
-[32<0000090000000600000000000000000000000000000007000000080000000e00>]
-[32<00010000000200000004000000040000000000000000000000000000000f0000>]
-[32<0900000006000000090000000600000000000000000000000000000006000000>]]
-[%ug
-[8<0000020000000000>]
-[8<0000020000002000>]
-[8<0004020000002000>]
-[8<0004020000402000>]
-[8<0004060000402000>]
-[8<0004060000406000>]
-[8<0006060000406000>]
-[8<0006060000606000>]
-[8<00060e0000606000>]
-[8<00060e000060e000>]
-[8<00070e000060e000>]
-[8<00070e000070e000>]
-[8<00070e020070e000>]
-[8<00070e020070e020>]
-[8<04070e020070e020>]
-[8<04070e024070e020>]
-[8<04070e064070e020>]
-[8<04070e064070e060>]
-[8<06070e064070e060>]
-[8<06070e066070e060>]
-[8<06070f066070e060>]
-[8<06070f066070f060>]
-[8<060f0f066070f060>]
-[8<060f0f0660f0f060>]
-[8<060f0f0760f0f060>]
-[8<060f0f0760f0f070>]
-[8<0e0f0f0760f0f070>]
-[8<0e0f0f07e0f0f070>]
-[8<0e0f0f0fe0f0f070>]
-[8<0e0f0f0fe0f0f0f0>]
-[8<0f0f0f0fe0f0f0f0>]
-[8<0f0f0f0ff0f0f0f0>]
-[8<1f0f0f0ff0f0f0f0>]
-[8<1f0f0f0ff1f0f0f0>]
-[8<1f0f0f8ff1f0f0f0>]
-[8<1f0f0f8ff1f0f0f8>]
-[8<9f0f0f8ff1f0f0f8>]
-[8<9f0f0f8ff9f0f0f8>]
-[8<9f0f0f9ff9f0f0f8>]
-[8<9f0f0f9ff9f0f0f9>]
-[8<9f8f0f9ff9f0f0f9>]
-[8<9f8f0f9ff9f8f0f9>]
-[8<9f8f1f9ff9f8f0f9>]
-[8<9f8f1f9ff9f8f1f9>]
-[8<bf8f1f9ff9f8f1f9>]
-[8<bf8f1f9ffbf8f1f9>]
-[8<bf8f1fdffbf8f1f9>]
-[8<bf8f1fdffbf8f1fd>]
-[8<ff8f1fdffbf8f1fd>]
-[8<ff8f1fdffff8f1fd>]
-[8<ff8f1ffffff8f1fd>]
-[8<ff8f1ffffff8f1ff>]
-[8<ff9f1ffffff8f1ff>]
-[8<ff9f1ffffff9f1ff>]
-[8<ff9f9ffffff9f1ff>]
-[8<ff9f9ffffff9f9ff>]
-[8<ffbf9ffffff9f9ff>]
-[8<ffbf9ffffffbf9ff>]
-[8<ffbfdffffffbf9ff>]
-[8<ffbfdffffffbfdff>]
-[8<ffffdffffffbfdff>]
-[8<ffffdffffffffdff>]
-[8<fffffffffffffdff>]
-[8<ffffffffffffffff>]]
-[%mg
-[8<8000000000000000>]
-[8<0822080080228000>]
-[8<0204081020408001>]
-[8<40e0400000000000>]
-[8<66999966>]
-[8<8001000010080000>]
-[8<81c36666c3810000>]
-[8<f0e0c08000000000>]
-[16<07c00f801f003e007c00f800f001e003c007800f001f003e007c00f801f003e0>]
-[16<1f000f8007c003e001f000f8007c003e001f800fc007e003f001f8007c003e00>]
-[8<c3c300000000c3c3>]
-[16<0040008001000200040008001000200040008000000100020004000800100020>]
-[16<0040002000100008000400020001800040002000100008000400020001000080>]
-[16<1fc03fe07df0f8f8f07de03fc01f800fc01fe03ff07df8f87df03fe01fc00f80>]
-[8<80>]
-[8<8040201000000000>]
-[8<84cc000048cc0000>]
-[8<9900009900000000>]
-[8<08040201804020100800020180002010>]
-[8<2418814242811824>]
-[8<66999966>]
-[8<8000000008000000>]
-[8<70f8d8f870000000>]
-[8<0814224180402010>]
-[8<aa00440a11a04400>]
-[8<018245aa45820100>]
-[8<221c224180808041>]
-[8<88000000>]
-[8<0855800080550800>]
-[8<2844004482440044>]
-[8<0810204080412214>]
-[8<00>]]]def
-/Dfill{
- transform /maxy exch def /maxx exch def
- transform /miny exch def /minx exch def
- minx maxx gt{/minx maxx /maxx minx def def}if
- miny maxy gt{/miny maxy /maxy miny def def}if
- Dpatterns Dstipple 1 sub get exch 1 sub get
- aload pop /stip exch def /stipw exch def /stiph 128 def
- /imatrix[stipw 0 0 stiph 0 0]def
- /tmatrix[stipw 0 0 stiph 0 0]def
- /minx minx cvi stiph idiv stiph mul def
- /miny miny cvi stipw idiv stipw mul def
- gsave eoclip 0 setgray
- miny stiph maxy{
- tmatrix exch 5 exch put
- minx stipw maxx{
- tmatrix exch 4 exch put tmatrix setmatrix
- stipw stiph true imatrix {stip} imagemask
- }for
- }for
- grestore
-}def
-/Dp{Dfill Dstroke}def
-/DP{Dfill currentpoint newpath moveto}def
-end
-
-/ditstart{$DITroff begin
- /nfonts 60 def % NFONTS makedev/ditroff dependent!
- /fonts[nfonts{0}repeat]def
- /fontnames[nfonts{()}repeat]def
-/docsave save def
-}def
-
-% character outcalls
-/oc{
- /pswid exch def /cc exch def /name exch def
- /ditwid pswid fontsize mul resolution mul 72000 div def
- /ditsiz fontsize resolution mul 72 div def
- ocprocs name known{ocprocs name get exec}{name cb}ifelse
-}def
-/fractm [.65 0 0 .6 0 0] def
-/fraction{
- /fden exch def /fnum exch def gsave /cf currentfont def
- cf fractm makefont setfont 0 .3 dm 2 copy neg rmoveto
- fnum show rmoveto currentfont cf setfont(\244)show setfont fden show
- grestore ditwid 0 rmoveto
-}def
-/oce{grestore ditwid 0 rmoveto}def
-/dm{ditsiz mul}def
-/ocprocs 50 dict def ocprocs begin
-(14){(1)(4)fraction}def
-(12){(1)(2)fraction}def
-(34){(3)(4)fraction}def
-(13){(1)(3)fraction}def
-(23){(2)(3)fraction}def
-(18){(1)(8)fraction}def
-(38){(3)(8)fraction}def
-(58){(5)(8)fraction}def
-(78){(7)(8)fraction}def
-(sr){gsave 0 .06 dm rmoveto(\326)show oce}def
-(is){gsave 0 .15 dm rmoveto(\362)show oce}def
-(->){gsave 0 .02 dm rmoveto(\256)show oce}def
-(<-){gsave 0 .02 dm rmoveto(\254)show oce}def
-(==){gsave 0 .05 dm rmoveto(\272)show oce}def
-(uc){gsave currentpoint 400 .009 dm mul add translate
- 8 -8 scale ucseal oce}def
-end
-
-% an attempt at a PostScript FONT to implement ditroff special chars
-% this will enable us to
-% cache the little buggers
-% generate faster, more compact PS out of psdit
-% confuse everyone (including myself)!
-50 dict dup begin
-/FontType 3 def
-/FontName /DIThacks def
-/FontMatrix [.001 0 0 .001 0 0] def
-/FontBBox [-260 -260 900 900] def% a lie but ...
-/Encoding 256 array def
-0 1 255{Encoding exch /.notdef put}for
-Encoding
- dup 8#040/space put %space
- dup 8#110/rc put %right ceil
- dup 8#111/lt put %left top curl
- dup 8#112/bv put %bold vert
- dup 8#113/lk put %left mid curl
- dup 8#114/lb put %left bot curl
- dup 8#115/rt put %right top curl
- dup 8#116/rk put %right mid curl
- dup 8#117/rb put %right bot curl
- dup 8#120/rf put %right floor
- dup 8#121/lf put %left floor
- dup 8#122/lc put %left ceil
- dup 8#140/sq put %square
- dup 8#141/bx put %box
- dup 8#142/ci put %circle
- dup 8#143/br put %box rule
- dup 8#144/rn put %root extender
- dup 8#145/vr put %vertical rule
- dup 8#146/ob put %outline bullet
- dup 8#147/bu put %bullet
- dup 8#150/ru put %rule
- dup 8#151/ul put %underline
- pop
-/DITfd 100 dict def
-/BuildChar{0 begin
- /cc exch def /fd exch def
- /charname fd /Encoding get cc get def
- /charwid fd /Metrics get charname get def
- /charproc fd /CharProcs get charname get def
- charwid 0 fd /FontBBox get aload pop setcachedevice
- 2 setlinejoin 40 setlinewidth
- newpath 0 0 moveto gsave charproc grestore
- end}def
-/BuildChar load 0 DITfd put
-/CharProcs 50 dict def
-CharProcs begin
-/space{}def
-/.notdef{}def
-/ru{500 0 rls}def
-/rn{0 840 moveto 500 0 rls}def
-/vr{0 800 moveto 0 -770 rls}def
-/bv{0 800 moveto 0 -1000 rls}def
-/br{0 840 moveto 0 -1000 rls}def
-/ul{0 -140 moveto 500 0 rls}def
-/ob{200 250 rmoveto currentpoint newpath 200 0 360 arc closepath stroke}def
-/bu{200 250 rmoveto currentpoint newpath 200 0 360 arc closepath fill}def
-/sq{80 0 rmoveto currentpoint dround newpath moveto
- 640 0 rlineto 0 640 rlineto -640 0 rlineto closepath stroke}def
-/bx{80 0 rmoveto currentpoint dround newpath moveto
- 640 0 rlineto 0 640 rlineto -640 0 rlineto closepath fill}def
-/ci{500 360 rmoveto currentpoint newpath 333 0 360 arc
- 50 setlinewidth stroke}def
-
-/lt{0 -200 moveto 0 550 rlineto currx 800 2cx s4 add exch s4 a4p stroke}def
-/lb{0 800 moveto 0 -550 rlineto currx -200 2cx s4 add exch s4 a4p stroke}def
-/rt{0 -200 moveto 0 550 rlineto currx 800 2cx s4 sub exch s4 a4p stroke}def
-/rb{0 800 moveto 0 -500 rlineto currx -200 2cx s4 sub exch s4 a4p stroke}def
-/lk{0 800 moveto 0 300 -300 300 s4 arcto pop pop 1000 sub
- 0 300 4 2 roll s4 a4p 0 -200 lineto stroke}def
-/rk{0 800 moveto 0 300 s2 300 s4 arcto pop pop 1000 sub
- 0 300 4 2 roll s4 a4p 0 -200 lineto stroke}def
-/lf{0 800 moveto 0 -1000 rlineto s4 0 rls}def
-/rf{0 800 moveto 0 -1000 rlineto s4 neg 0 rls}def
-/lc{0 -200 moveto 0 1000 rlineto s4 0 rls}def
-/rc{0 -200 moveto 0 1000 rlineto s4 neg 0 rls}def
-end
-
-/Metrics 50 dict def Metrics begin
-/.notdef 0 def
-/space 500 def
-/ru 500 def
-/br 0 def
-/lt 416 def
-/lb 416 def
-/rt 416 def
-/rb 416 def
-/lk 416 def
-/rk 416 def
-/rc 416 def
-/lc 416 def
-/rf 416 def
-/lf 416 def
-/bv 416 def
-/ob 350 def
-/bu 350 def
-/ci 750 def
-/bx 750 def
-/sq 750 def
-/rn 500 def
-/ul 500 def
-/vr 0 def
-end
-
-DITfd begin
-/s2 500 def /s4 250 def /s3 333 def
-/a4p{arcto pop pop pop pop}def
-/2cx{2 copy exch}def
-/rls{rlineto stroke}def
-/currx{currentpoint pop}def
-/dround{transform round exch round exch itransform} def
-end
-end
-/DIThacks exch definefont pop
-ditstart
-(psc)xT
-576 1 1 xr
-1(Times-Roman)xf 1 f
-2(Times-Italic)xf 2 f
-3(Times-Bold)xf 3 f
-4(Times-BoldItalic)xf 4 f
-5(Helvetica)xf 5 f
-6(Helvetica-Bold)xf 6 f
-7(Courier)xf 7 f
-8(Courier-Bold)xf 8 f
-9(Symbol)xf 9 f
-10(DIThacks)xf 10 f
-10 s
-1 f
-xi
-%%EndProlog
-
-%%Page: 1 1
-10 s 10 xH 0 xS 1 f
-3 f
-14 s
-1205 1206(LIBTP:)N
-1633(Portable,)X
-2100(M)X
-2206(odular)X
-2551(Transactions)X
-3202(for)X
-3374(UNIX)X
-1 f
-11 s
-3661 1162(1)N
-2 f
-12 s
-2182 1398(Margo)N
-2467(Seltzer)X
-2171 1494(Michael)N
-2511(Olson)X
-1800 1590(University)N
-2225(of)X
-2324(California,)X
-2773(Berkeley)X
-3 f
-2277 1878(Abstract)N
-1 f
-10 s
-755 2001(Transactions)N
-1198(provide)X
-1475(a)X
-1543(useful)X
-1771(programming)X
-2239(paradigm)X
-2574(for)X
-2700(maintaining)X
-3114(logical)X
-3364(consistency,)X
-3790(arbitrating)X
-4156(con-)X
-555 2091(current)N
-808(access,)X
-1059(and)X
-1200(managing)X
-1540(recovery.)X
-1886(In)X
-1977(traditional)X
-2330(UNIX)X
-2555(systems,)X
-2852(the)X
-2974(only)X
-3140(easy)X
-3307(way)X
-3465(of)X
-3556(using)X
-3753(transactions)X
-4160(is)X
-4237(to)X
-555 2181(purchase)N
-876(a)X
-947(database)X
-1258(system.)X
-1554(Such)X
-1748(systems)X
-2035(are)X
-2168(often)X
-2367(slow,)X
-2572(costly,)X
-2817(and)X
-2967(may)X
-3139(not)X
-3275(provide)X
-3554(the)X
-3686(exact)X
-3890(functionality)X
-555 2271(desired.)N
-848(This)X
-1011(paper)X
-1210(presents)X
-1493(the)X
-1611(design,)X
-1860(implementation,)X
-2402(and)X
-2538(performance)X
-2965(of)X
-3052(LIBTP,)X
-3314(a)X
-3370(simple,)X
-3623(non-proprietary)X
-4147(tran-)X
-555 2361(saction)N
-809(library)X
-1050(using)X
-1249(the)X
-1373(4.4BSD)X
-1654(database)X
-1957(access)X
-2189(routines)X
-2473(\()X
-3 f
-2500(db)X
-1 f
-2588(\(3\)\).)X
-2775(On)X
-2899(a)X
-2961(conventional)X
-3401(transaction)X
-3779(processing)X
-4148(style)X
-555 2451(benchmark,)N
-959(its)X
-1061(performance)X
-1495(is)X
-1575(approximately)X
-2065(85%)X
-2239(that)X
-2386(of)X
-2480(the)X
-2604(database)X
-2907(access)X
-3139(routines)X
-3423(without)X
-3693(transaction)X
-4071(protec-)X
-555 2541(tion,)N
-725(200%)X
-938(that)X
-1084(of)X
-1177(using)X
-3 f
-1376(fsync)X
-1 f
-1554(\(2\))X
-1674(to)X
-1761(commit)X
-2030(modi\256cations)X
-2490(to)X
-2577(disk,)X
-2755(and)X
-2896(125%)X
-3108(that)X
-3253(of)X
-3345(a)X
-3406(commercial)X
-3810(relational)X
-4138(data-)X
-555 2631(base)N
-718(system.)X
-3 f
-555 2817(1.)N
-655(Introduction)X
-1 f
-755 2940(Transactions)N
-1186(are)X
-1306(used)X
-1474(in)X
-1557(database)X
-1855(systems)X
-2129(to)X
-2212(enable)X
-2443(concurrent)X
-2807(users)X
-2992(to)X
-3074(apply)X
-3272(multi-operation)X
-3790(updates)X
-4055(without)X
-555 3030(violating)N
-863(the)X
-985(integrity)X
-1280(of)X
-1371(the)X
-1493(database.)X
-1814(They)X
-2003(provide)X
-2271(the)X
-2392(properties)X
-2736(of)X
-2826(atomicity,)X
-3171(consistency,)X
-3588(isolation,)X
-3906(and)X
-4045(durabil-)X
-555 3120(ity.)N
-701(By)X
-816(atomicity,)X
-1160(we)X
-1276(mean)X
-1472(that)X
-1614(the)X
-1734(set)X
-1845(of)X
-1934(updates)X
-2200(comprising)X
-2581(a)X
-2638(transaction)X
-3011(must)X
-3187(be)X
-3284(applied)X
-3541(as)X
-3629(a)X
-3686(single)X
-3898(unit;)X
-4085(that)X
-4226(is,)X
-555 3210(they)N
-714(must)X
-890(either)X
-1094(all)X
-1195(be)X
-1292(applied)X
-1549(to)X
-1632(the)X
-1751(database)X
-2049(or)X
-2137(all)X
-2238(be)X
-2335(absent.)X
-2601(Consistency)X
-3013(requires)X
-3293(that)X
-3434(a)X
-3491(transaction)X
-3864(take)X
-4019(the)X
-4138(data-)X
-555 3300(base)N
-725(from)X
-908(one)X
-1051(logically)X
-1358(consistent)X
-1704(state)X
-1877(to)X
-1965(another.)X
-2272(The)X
-2423(property)X
-2721(of)X
-2814(isolation)X
-3115(requires)X
-3400(that)X
-3546(concurrent)X
-3916(transactions)X
-555 3390(yield)N
-750(results)X
-994(which)X
-1225(are)X
-1358(indistinguishable)X
-1938(from)X
-2128(the)X
-2260(results)X
-2503(which)X
-2733(would)X
-2967(be)X
-3077(obtained)X
-3387(by)X
-3501(running)X
-3784(the)X
-3916(transactions)X
-555 3480(sequentially.)N
-1002(Finally,)X
-1268(durability)X
-1599(requires)X
-1878(that)X
-2018(once)X
-2190(transactions)X
-2593(have)X
-2765(been)X
-2937(committed,)X
-3319(their)X
-3486(results)X
-3715(must)X
-3890(be)X
-3986(preserved)X
-555 3570(across)N
-776(system)X
-1018(failures)X
-1279([TPCB90].)X
-755 3693(Although)N
-1080(these)X
-1268(properties)X
-1612(are)X
-1734(most)X
-1912(frequently)X
-2265(discussed)X
-2595(in)X
-2680(the)X
-2801(context)X
-3060(of)X
-3150(databases,)X
-3501(they)X
-3661(are)X
-3782(useful)X
-4000(program-)X
-555 3783(ming)N
-750(paradigms)X
-1114(for)X
-1238(more)X
-1433(general)X
-1700(purpose)X
-1984(applications.)X
-2441(There)X
-2659(are)X
-2788(several)X
-3046(different)X
-3353(situations)X
-3689(where)X
-3916(transactions)X
-555 3873(can)N
-687(be)X
-783(used)X
-950(to)X
-1032(replace)X
-1285(current)X
-1533(ad-hoc)X
-1772(mechanisms.)X
-755 3996(One)N
-910(situation)X
-1206(is)X
-1280(when)X
-1475(multiple)X
-1762(\256les)X
-1916(or)X
-2004(parts)X
-2181(of)X
-2269(\256les)X
-2422(need)X
-2594(to)X
-2676(be)X
-2772(updated)X
-3046(in)X
-3128(an)X
-3224(atomic)X
-3462(fashion.)X
-3758(For)X
-3889(example,)X
-4201(the)X
-555 4086(traditional)N
-907(UNIX)X
-1131(\256le)X
-1256(system)X
-1501(uses)X
-1661(ordering)X
-1955(constraints)X
-2324(to)X
-2408(achieve)X
-2676(recoverability)X
-3144(in)X
-3228(the)X
-3348(face)X
-3505(of)X
-3594(crashes.)X
-3893(When)X
-4107(a)X
-4165(new)X
-555 4176(\256le)N
-678(is)X
-752(created,)X
-1026(its)X
-1122(inode)X
-1321(is)X
-1395(written)X
-1642(to)X
-1724(disk)X
-1877(before)X
-2103(the)X
-2221(new)X
-2375(\256le)X
-2497(is)X
-2570(added)X
-2782(to)X
-2864(the)X
-2982(directory)X
-3292(structure.)X
-3633(This)X
-3795(guarantees)X
-4159(that,)X
-555 4266(if)N
-627(the)X
-748(system)X
-993(crashes)X
-1253(between)X
-1544(the)X
-1665(two)X
-1808(I/O's,)X
-2016(the)X
-2137(directory)X
-2450(does)X
-2620(not)X
-2744(contain)X
-3002(a)X
-3060 0.4531(reference)AX
-3383(to)X
-3467(an)X
-3565(invalid)X
-3809(inode.)X
-4049(In)X
-4138(actu-)X
-555 4356(ality,)N
-741(the)X
-863(desired)X
-1119(effect)X
-1326(is)X
-1402(that)X
-1545(these)X
-1733(two)X
-1876(updates)X
-2144(have)X
-2319(the)X
-2440(transactional)X
-2873(property)X
-3168(of)X
-3258(atomicity)X
-3583(\(either)X
-3816(both)X
-3981(writes)X
-4200(are)X
-555 4446(visible)N
-790(or)X
-879(neither)X
-1124(is\).)X
-1266(Rather)X
-1501(than)X
-1660(building)X
-1947(special)X
-2191(purpose)X
-2466(recovery)X
-2769(mechanisms)X
-3186(into)X
-3331(the)X
-3450(\256le)X
-3573(system)X
-3816(or)X
-3904(related)X
-4144(tools)X
-555 4536(\()N
-2 f
-582(e.g.)X
-3 f
-726(fsck)X
-1 f
-864(\(8\)\),)X
-1033(one)X
-1177(could)X
-1383(use)X
-1518(general)X
-1783(purpose)X
-2064(transaction)X
-2443(recovery)X
-2752(protocols)X
-3077(after)X
-3252(system)X
-3501(failure.)X
-3778(Any)X
-3943(application)X
-555 4626(that)N
-705(needs)X
-918(to)X
-1010(keep)X
-1192(multiple,)X
-1508(related)X
-1757(\256les)X
-1920(\(or)X
-2044(directories\))X
-2440(consistent)X
-2790(should)X
-3032(do)X
-3141(so)X
-3241(using)X
-3443(transactions.)X
-3895(Source)X
-4147(code)X
-555 4716(control)N
-805(systems,)X
-1101(such)X
-1271(as)X
-1361(RCS)X
-1534(and)X
-1673(SCCS,)X
-1910(should)X
-2146(use)X
-2276(transaction)X
-2651(semantics)X
-2990(to)X
-3075(allow)X
-3276(the)X
-3397(``checking)X
-3764(in'')X
-3903(of)X
-3992(groups)X
-4232(of)X
-555 4806(related)N
-801(\256les.)X
-1001(In)X
-1095(this)X
-1237(way,)X
-1418(if)X
-1493(the)X
-1617 0.2841(``check-in'')AX
-2028(fails,)X
-2212(the)X
-2336(transaction)X
-2714(may)X
-2878(be)X
-2980(aborted,)X
-3267(backing)X
-3547(out)X
-3675(the)X
-3799(partial)X
-4030(``check-)X
-555 4896(in'')N
-691(leaving)X
-947(the)X
-1065(source)X
-1295(repository)X
-1640(in)X
-1722(a)X
-1778(consistent)X
-2118(state.)X
-755 5019(A)N
-842(second)X
-1094(situation)X
-1398(where)X
-1624(transactions)X
-2036(can)X
-2177(be)X
-2282(used)X
-2458(to)X
-2549(replace)X
-2811(current)X
-3068(ad-hoc)X
-3316(mechanisms)X
-3741(is)X
-3822(in)X
-3912(applications)X
-555 5109(where)N
-776(concurrent)X
-1144(updates)X
-1413(to)X
-1499(a)X
-1559(shared)X
-1793(\256le)X
-1919(are)X
-2042(desired,)X
-2318(but)X
-2444(there)X
-2629(is)X
-2706(logical)X
-2948(consistency)X
-3345(of)X
-3435(the)X
-3556(data)X
-3713(which)X
-3932(needs)X
-4138(to)X
-4223(be)X
-555 5199(preserved.)N
-928(For)X
-1059(example,)X
-1371(when)X
-1565(the)X
-1683(password)X
-2006(\256le)X
-2128(is)X
-2201(updated,)X
-2495(\256le)X
-2617(locking)X
-2877(is)X
-2950(used)X
-3117(to)X
-3199(disallow)X
-3490(concurrent)X
-3854(access.)X
-4120(Tran-)X
-555 5289(saction)N
-804(semantics)X
-1142(on)X
-1244(the)X
-1364(password)X
-1689(\256les)X
-1844(would)X
-2066(allow)X
-2266(concurrent)X
-2632(updates,)X
-2919(while)X
-3119(preserving)X
-3479(the)X
-3598(logical)X
-3837(consistency)X
-4232(of)X
-555 5379(the)N
-681(password)X
-1012(database.)X
-1357(Similarly,)X
-1702(UNIX)X
-1930(utilities)X
-2196(which)X
-2419(rewrite)X
-2674(\256les)X
-2834(face)X
-2996(a)X
-3059(potential)X
-3366(race)X
-3528(condition)X
-3857(between)X
-4152(their)X
-555 5469(rewriting)N
-871(a)X
-929(\256le)X
-1053(and)X
-1191(another)X
-1453(process)X
-1715(reading)X
-1977(the)X
-2096(\256le.)X
-2259(For)X
-2391(example,)X
-2704(the)X
-2823(compiler)X
-3129(\(more)X
-3342(precisely,)X
-3673(the)X
-3792(assembler\))X
-4161(may)X
-8 s
-10 f
-555 5541(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)N
-5 s
-1 f
-727 5619(1)N
-8 s
-763 5644(To)N
-850(appear)X
-1035(in)X
-1101(the)X
-2 f
-1195(Proceedings)X
-1530(of)X
-1596(the)X
-1690(1992)X
-1834(Winter)X
-2024(Usenix)X
-1 f
-2201(,)X
-2233(San)X
-2345(Francisco,)X
-2625(CA,)X
-2746(January)X
-2960(1992.)X
-
-2 p
-%%Page: 2 2
-8 s 8 xH 0 xS 1 f
-10 s
-3 f
-1 f
-555 630(have)N
-737(to)X
-829(rewrite)X
-1087(a)X
-1152(\256le)X
-1283(to)X
-1374(which)X
-1599(it)X
-1672(has)X
-1808(write)X
-2002(permission)X
-2382(in)X
-2473(a)X
-2538(directory)X
-2857(to)X
-2948(which)X
-3173(it)X
-3246(does)X
-3422(not)X
-3553(have)X
-3734(write)X
-3928(permission.)X
-555 720(While)N
-779(the)X
-904(``.o'')X
-1099(\256le)X
-1228(is)X
-1308(being)X
-1513(written,)X
-1787(another)X
-2055(utility)X
-2272(such)X
-2446(as)X
-3 f
-2540(nm)X
-1 f
-2651(\(1\))X
-2772(or)X
-3 f
-2866(ar)X
-1 f
-2942(\(1\))X
-3063(may)X
-3228(read)X
-3394(the)X
-3519(\256le)X
-3648(and)X
-3791(produce)X
-4077(invalid)X
-555 810(results)N
-790(since)X
-981(the)X
-1105(\256le)X
-1233(has)X
-1366(not)X
-1494(been)X
-1672(completely)X
-2054(written.)X
-2347(Currently,)X
-2700(some)X
-2895(utilities)X
-3160(use)X
-3293(special)X
-3542(purpose)X
-3821(code)X
-3998(to)X
-4085(handle)X
-555 900(such)N
-722(cases)X
-912(while)X
-1110(others)X
-1326(ignore)X
-1551(the)X
-1669(problem)X
-1956(and)X
-2092(force)X
-2278(users)X
-2463(to)X
-2545(live)X
-2685(with)X
-2847(the)X
-2965(consequences.)X
-755 1023(In)N
-845(this)X
-983(paper,)X
-1205(we)X
-1322(present)X
-1577(a)X
-1635(simple)X
-1870(library)X
-2106(which)X
-2324(provides)X
-2622(transaction)X
-2996(semantics)X
-3334(\(atomicity,)X
-3705(consistency,)X
-4121(isola-)X
-555 1113(tion,)N
-720(and)X
-857(durability\).)X
-1236(The)X
-1382(4.4BSD)X
-1658(database)X
-1956(access)X
-2182(methods)X
-2473(have)X
-2645(been)X
-2817(modi\256ed)X
-3121(to)X
-3203(use)X
-3330(this)X
-3465(library,)X
-3719(optionally)X
-4063(provid-)X
-555 1203(ing)N
-682(shared)X
-917(buffer)X
-1139(management)X
-1574(between)X
-1867(applications,)X
-2298(locking,)X
-2582(and)X
-2722(transaction)X
-3098(semantics.)X
-3478(Any)X
-3640(UNIX)X
-3865(program)X
-4161(may)X
-555 1293(transaction)N
-930(protect)X
-1176(its)X
-1274(data)X
-1430(by)X
-1532(requesting)X
-1888(transaction)X
-2262(protection)X
-2609(with)X
-2773(the)X
-3 f
-2893(db)X
-1 f
-2981(\(3\))X
-3097(library)X
-3333(or)X
-3422(by)X
-3524(adding)X
-3764(appropriate)X
-4152(calls)X
-555 1383(to)N
-646(the)X
-773(transaction)X
-1154(manager,)X
-1480(buffer)X
-1706(manager,)X
-2032(lock)X
-2199(manager,)X
-2525(and)X
-2670(log)X
-2801(manager.)X
-3147(The)X
-3301(library)X
-3543(routines)X
-3829(may)X
-3995(be)X
-4099(linked)X
-555 1473(into)N
-708(the)X
-834(host)X
-995(application)X
-1379(and)X
-1523(called)X
-1743(by)X
-1851(subroutine)X
-2217(interface,)X
-2547(or)X
-2642(they)X
-2808(may)X
-2974(reside)X
-3194(in)X
-3284(a)X
-3348(separate)X
-3640(server)X
-3865(process.)X
-4174(The)X
-555 1563(server)N
-772(architecture)X
-1172(provides)X
-1468(for)X
-1582(network)X
-1865(access)X
-2091(and)X
-2227(better)X
-2430(protection)X
-2775(mechanisms.)X
-3 f
-555 1749(2.)N
-655(Related)X
-938(Work)X
-1 f
-755 1872(There)N
-1000(has)X
-1164(been)X
-1373(much)X
-1608(discussion)X
-1998(in)X
-2117(recent)X
-2371(years)X
-2597(about)X
-2831(new)X
-3021(transaction)X
-3429(models)X
-3716(and)X
-3888(architectures)X
-555 1962 0.1172([SPEC88][NODI90][CHEN91][MOHA91].)AN
-2009(Much)X
-2220(of)X
-2310(this)X
-2448(work)X
-2636(focuses)X
-2900(on)X
-3003(new)X
-3160(ways)X
-3348(to)X
-3433(model)X
-3656(transactions)X
-4062(and)X
-4201(the)X
-555 2052(interactions)N
-953(between)X
-1245(them,)X
-1449(while)X
-1651(the)X
-1772(work)X
-1960(presented)X
-2291(here)X
-2453(focuses)X
-2717(on)X
-2820(the)X
-2941(implementation)X
-3466(and)X
-3605(performance)X
-4035(of)X
-4125(tradi-)X
-555 2142(tional)N
-757(transaction)X
-1129(techniques)X
-1492(\(write-ahead)X
-1919(logging)X
-2183(and)X
-2319(two-phase)X
-2669(locking\))X
-2956(on)X
-3056(a)X
-3112(standard)X
-3404(operating)X
-3727(system)X
-3969(\(UNIX\).)X
-755 2265(Such)N
-947(traditional)X
-1308(operating)X
-1643(systems)X
-1928(are)X
-2059(often)X
-2256(criticized)X
-2587(for)X
-2713(their)X
-2892(inability)X
-3190(to)X
-3283(perform)X
-3573(transaction)X
-3956(processing)X
-555 2355(adequately.)N
-971([STON81])X
-1342(cites)X
-1517(three)X
-1706(main)X
-1894(areas)X
-2088(of)X
-2183(inadequate)X
-2559(support:)X
-2849(buffer)X
-3074(management,)X
-3532(the)X
-3658(\256le)X
-3788(system,)X
-4058(and)X
-4201(the)X
-555 2445(process)N
-823(structure.)X
-1191(These)X
-1410(arguments)X
-1771(are)X
-1897(summarized)X
-2316(in)X
-2405(table)X
-2587(one.)X
-2769(Fortunately,)X
-3184(much)X
-3388(has)X
-3521(changed)X
-3815(since)X
-4006(1981.)X
-4232(In)X
-555 2535(the)N
-683(area)X
-848(of)X
-945(buffer)X
-1172(management,)X
-1632(most)X
-1817(UNIX)X
-2048(systems)X
-2331(provide)X
-2606(the)X
-2734(ability)X
-2968(to)X
-3060(memory)X
-3357(map)X
-3525(\256les,)X
-3708(thus)X
-3870(obviating)X
-4201(the)X
-555 2625(need)N
-734(for)X
-855(a)X
-918(copy)X
-1101(between)X
-1396(kernel)X
-1624(and)X
-1766(user)X
-1926(space.)X
-2171(If)X
-2251(a)X
-2313(database)X
-2616(system)X
-2864(is)X
-2943(going)X
-3151(to)X
-3239(use)X
-3372(the)X
-3496(\256le)X
-3624(system)X
-3872(buffer)X
-4095(cache,)X
-555 2715(then)N
-719(a)X
-781(system)X
-1029(call)X
-1171(is)X
-1250(required.)X
-1584(However,)X
-1924(if)X
-1998(buffering)X
-2322(is)X
-2400(provided)X
-2710(at)X
-2793(user)X
-2952(level)X
-3133(using)X
-3331(shared)X
-3566(memory,)X
-3878(as)X
-3970(in)X
-4057(LIBTP,)X
-555 2805(buffer)N
-776(management)X
-1210(is)X
-1287(only)X
-1452(as)X
-1542(slow)X
-1716(as)X
-1806(access)X
-2035(to)X
-2120(shared)X
-2353(memory)X
-2643(and)X
-2782(any)X
-2921(replacement)X
-3337(algorithm)X
-3671(may)X
-3832(be)X
-3931(used.)X
-4121(Since)X
-555 2895(multiple)N
-849(processes)X
-1185(can)X
-1325(access)X
-1559(the)X
-1685(shared)X
-1923(data,)X
-2105(prefetching)X
-2499(may)X
-2665(be)X
-2769(accomplished)X
-3238(by)X
-3346(separate)X
-3638(processes)X
-3973(or)X
-4067(threads)X
-555 2985(whose)N
-782(sole)X
-932(purpose)X
-1207(is)X
-1281(to)X
-1364(prefetch)X
-1649(pages)X
-1853(and)X
-1990(wait)X
-2149(on)X
-2250(them.)X
-2471(There)X
-2680(is)X
-2754(still)X
-2894(no)X
-2995(way)X
-3150(to)X
-3233(enforce)X
-3496(write)X
-3682(ordering)X
-3975(other)X
-4161(than)X
-555 3075(keeping)N
-829(pages)X
-1032(in)X
-1114(user)X
-1268(memory)X
-1555(and)X
-1691(using)X
-1884(the)X
-3 f
-2002(fsync)X
-1 f
-2180(\(3\))X
-2294(system)X
-2536(call)X
-2672(to)X
-2754(perform)X
-3033(synchronous)X
-3458(writes.)X
-755 3198(In)N
-845(the)X
-966(area)X
-1124(of)X
-1214(\256le)X
-1339(systems,)X
-1635(the)X
-1756(fast)X
-1895(\256le)X
-2020(system)X
-2265(\(FFS\))X
-2474([MCKU84])X
-2871(allows)X
-3103(allocation)X
-3442(in)X
-3527(units)X
-3704(up)X
-3806(to)X
-3890(64KBytes)X
-4232(as)X
-555 3288(opposed)N
-846(to)X
-932(the)X
-1054(4KByte)X
-1327(and)X
-1466(8KByte)X
-1738(\256gures)X
-1979(quoted)X
-2220(in)X
-2305([STON81].)X
-2711(The)X
-2859(measurements)X
-3341(in)X
-3426(this)X
-3564(paper)X
-3766(were)X
-3946(taken)X
-4143(from)X
-555 3378(an)N
-655(8KByte)X
-928(FFS,)X
-1104(but)X
-1230(as)X
-1320(LIBTP)X
-1565(runs)X
-1726(exclusively)X
-2114(in)X
-2199(user)X
-2356(space,)X
-2578(there)X
-2762(is)X
-2838(nothing)X
-3105(to)X
-3190(prevent)X
-3454(it)X
-3521(from)X
-3700(being)X
-3901(run)X
-4031(on)X
-4134(other)X
-555 3468(UNIX)N
-776(compatible)X
-1152(\256le)X
-1274(systems)X
-1547(\(e.g.)X
-1710(log-structured)X
-2180([ROSE91],)X
-2558(extent-based,)X
-3004(or)X
-3091(multi-block)X
-3484([SELT91]\).)X
-755 3591(Finally,)N
-1029(with)X
-1199(regard)X
-1433(to)X
-1523(the)X
-1648(process)X
-1916(structure,)X
-2244(neither)X
-2494(context)X
-2757(switch)X
-2993(time)X
-3162(nor)X
-3296(scheduling)X
-3670(around)X
-3920(semaphores)X
-555 3681(seems)N
-785(to)X
-881(affect)X
-1099(the)X
-1231(system)X
-1487(performance.)X
-1968(However,)X
-2317(the)X
-2449(implementation)X
-2984(of)X
-3084(semaphores)X
-3496(can)X
-3641(impact)X
-3892(performance)X
-555 3771(tremendously.)N
-1051(This)X
-1213(is)X
-1286(discussed)X
-1613(in)X
-1695(more)X
-1880(detail)X
-2078(in)X
-2160(section)X
-2407(4.3.)X
-755 3894(The)N
-908(Tuxedo)X
-1181(system)X
-1431(from)X
-1615(AT&T)X
-1861(is)X
-1941(a)X
-2004(transaction)X
-2383(manager)X
-2687(which)X
-2910(coordinates)X
-3307(distributed)X
-3676(transaction)X
-4055(commit)X
-555 3984(from)N
-738(a)X
-801(variety)X
-1051(of)X
-1145(different)X
-1449(local)X
-1632(transaction)X
-2011(managers.)X
-2386(At)X
-2493(this)X
-2634(time,)X
-2822(LIBTP)X
-3070(does)X
-3243(not)X
-3371(have)X
-3549(its)X
-3650(own)X
-3814(mechanism)X
-4205(for)X
-555 4074(distributed)N
-942(commit)X
-1231(processing,)X
-1639(but)X
-1786(could)X
-2009(be)X
-2130(used)X
-2322(as)X
-2434(a)X
-2515(local)X
-2716(transaction)X
-3113(agent)X
-3331(by)X
-3455(systems)X
-3752(such)X
-3943(as)X
-4054(Tuxedo)X
-555 4164([ANDR89].)N
-10 f
-863 4393(i)N
-870(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-903 4483(Buffer)N
-1133(Management)X
-10 f
-1672(g)X
-1 f
-1720(Data)X
-1892(must)X
-2067(be)X
-2163(copied)X
-2397(between)X
-2685(kernel)X
-2906(space)X
-3105(and)X
-3241(user)X
-3395(space.)X
-10 f
-1672 4573(g)N
-1 f
-1720(Buffer)X
-1950(pool)X
-2112(access)X
-2338(is)X
-2411(too)X
-2533(slow.)X
-10 f
-1672 4663(g)N
-1 f
-1720(There)X
-1928(is)X
-2001(no)X
-2101(way)X
-2255(to)X
-2337(request)X
-2589(prefetch.)X
-10 f
-1672 4753(g)N
-1 f
-1720(Replacement)X
-2159(is)X
-2232(usually)X
-2483(LRU)X
-2663(which)X
-2879(may)X
-3037(be)X
-3133(suboptimal)X
-3508(for)X
-3622(databases.)X
-10 f
-1672 4843(g)N
-1 f
-1720(There)X
-1928(is)X
-2001(no)X
-2101(way)X
-2255(to)X
-2337(guarantee)X
-2670(write)X
-2855(ordering.)X
-10 f
-863 4853(i)N
-870(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-903 4943(File)N
-1047(System)X
-10 f
-1672(g)X
-1 f
-1720(Allocation)X
-2078(is)X
-2151(done)X
-2327(in)X
-2409(small)X
-2602(blocks)X
-2831(\(usually)X
-3109(4K)X
-3227(or)X
-3314(8K\).)X
-10 f
-1672 5033(g)N
-1 f
-1720(Logical)X
-1985(organization)X
-2406(of)X
-2493(\256les)X
-2646(is)X
-2719(redundantly)X
-3122(expressed.)X
-10 f
-863 5043(i)N
-870(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-903 5133(Process)N
-1168(Structure)X
-10 f
-1672(g)X
-1 f
-1720(Context)X
-1993(switching)X
-2324(and)X
-2460(message)X
-2752(passing)X
-3012(are)X
-3131(too)X
-3253(slow.)X
-10 f
-1672 5223(g)N
-1 f
-1720(A)X
-1798(process)X
-2059(may)X
-2217(be)X
-2313(descheduled)X
-2730(while)X
-2928(holding)X
-3192(a)X
-3248(semaphore.)X
-10 f
-863 5233(i)N
-870(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-863(c)X
-5193(c)Y
-5113(c)Y
-5033(c)Y
-4953(c)Y
-4873(c)Y
-4793(c)Y
-4713(c)Y
-4633(c)Y
-4553(c)Y
-4473(c)Y
-3990 5233(c)N
-5193(c)Y
-5113(c)Y
-5033(c)Y
-4953(c)Y
-4873(c)Y
-4793(c)Y
-4713(c)Y
-4633(c)Y
-4553(c)Y
-4473(c)Y
-3 f
-1156 5446(Table)N
-1371(One:)X
-1560(Shortcomings)X
-2051(of)X
-2138(UNIX)X
-2363(transaction)X
-2770(support)X
-3056(cited)X
-3241(in)X
-3327([STON81].)X
-
-3 p
-%%Page: 3 3
-10 s 10 xH 0 xS 3 f
-1 f
-755 630(The)N
-901(transaction)X
-1274(architecture)X
-1675(presented)X
-2004(in)X
-2087([YOUN91])X
-2474(is)X
-2548(very)X
-2712(similar)X
-2955(to)X
-3038(that)X
-3179(implemented)X
-3618(in)X
-3701(the)X
-3820(LIBTP.)X
-4103(While)X
-555 720([YOUN91])N
-947(presents)X
-1236(a)X
-1298(model)X
-1524(for)X
-1644(providing)X
-1981(transaction)X
-2359(services,)X
-2663(this)X
-2803(paper)X
-3007(focuses)X
-3273(on)X
-3378(the)X
-3501(implementation)X
-4028(and)X
-4169(per-)X
-555 810(formance)N
-881(of)X
-970(a)X
-1028(particular)X
-1358(system.)X
-1642(In)X
-1731(addition,)X
-2034(we)X
-2149(provide)X
-2415(detailed)X
-2690(comparisons)X
-3116(with)X
-3279(alternative)X
-3639(solutions:)X
-3970(traditional)X
-555 900(UNIX)N
-776(services)X
-1055(and)X
-1191(commercial)X
-1590(database)X
-1887(management)X
-2317(systems.)X
-3 f
-555 1086(3.)N
-655(Architecture)X
-1 f
-755 1209(The)N
-906(library)X
-1146(is)X
-1224(designed)X
-1534(to)X
-1621(provide)X
-1891(well)X
-2054(de\256ned)X
-2315(interfaces)X
-2653(to)X
-2740(the)X
-2863(services)X
-3147(required)X
-3440(for)X
-3559(transaction)X
-3936(processing.)X
-555 1299(These)N
-777(services)X
-1066(are)X
-1195(recovery,)X
-1527(concurrency)X
-1955(control,)X
-2232(and)X
-2378(the)X
-2506(management)X
-2946(of)X
-3043(shared)X
-3283(data.)X
-3487(First)X
-3663(we)X
-3787(will)X
-3941(discuss)X
-4201(the)X
-555 1389(design)N
-795(tradeoffs)X
-1112(in)X
-1205(the)X
-1334(selection)X
-1650(of)X
-1748(recovery,)X
-2081(concurrency)X
-2510(control,)X
-2787(and)X
-2933(buffer)X
-3160(management)X
-3600(implementations,)X
-4183(and)X
-555 1479(then)N
-713(we)X
-827(will)X
-971(present)X
-1223(the)X
-1341(overall)X
-1584(library)X
-1818(architecture)X
-2218(and)X
-2354(module)X
-2614(descriptions.)X
-3 f
-555 1665(3.1.)N
-715(Design)X
-966(Tradeoffs)X
-1 f
-3 f
-555 1851(3.1.1.)N
-775(Crash)X
-1004(Recovery)X
-1 f
-755 1974(The)N
-909(recovery)X
-1220(protocol)X
-1516(is)X
-1598(responsible)X
-1992(for)X
-2115(providing)X
-2455(the)X
-2582(transaction)X
-2963(semantics)X
-3308(discussed)X
-3644(earlier.)X
-3919(There)X
-4136(are)X
-4263(a)X
-555 2064(wide)N
-739(range)X
-946(of)X
-1041(recovery)X
-1351(protocols)X
-1677(available)X
-1995([HAER83],)X
-2395(but)X
-2525(we)X
-2647(can)X
-2786(crudely)X
-3054(divide)X
-3281(them)X
-3468(into)X
-3619(two)X
-3766(main)X
-3953(categories.)X
-555 2154(The)N
-706(\256rst)X
-856(category)X
-1159(records)X
-1422(all)X
-1528(modi\256cations)X
-1989(to)X
-2077(the)X
-2201(database)X
-2504(in)X
-2592(a)X
-2653(separate)X
-2942(\256le,)X
-3089(and)X
-3230(uses)X
-3393(this)X
-3533(\256le)X
-3660(\(log\))X
-3841(to)X
-3928(back)X
-4105(out)X
-4232(or)X
-555 2244(reapply)N
-825(these)X
-1019(modi\256cations)X
-1483(if)X
-1561(a)X
-1626(transaction)X
-2007(aborts)X
-2232(or)X
-2328(the)X
-2455(system)X
-2706(crashes.)X
-3012(We)X
-3153(call)X
-3298(this)X
-3442(set)X
-3560(the)X
-3 f
-3687(logging)X
-3963(protocols)X
-1 f
-4279(.)X
-555 2334(The)N
-703(second)X
-949(category)X
-1249(avoids)X
-1481(the)X
-1602(use)X
-1732(of)X
-1822(a)X
-1881(log)X
-2006(by)X
-2109(carefully)X
-2418(controlling)X
-2792(when)X
-2989(data)X
-3146(are)X
-3268(written)X
-3518(to)X
-3603(disk.)X
-3799(We)X
-3934(call)X
-4073(this)X
-4210(set)X
-555 2424(the)N
-3 f
-673(non-logging)X
-1096(protocols)X
-1 f
-1412(.)X
-755 2547(Non-logging)N
-1185(protocols)X
-1504(hold)X
-1666(dirty)X
-1837(buffers)X
-2085(in)X
-2167(main)X
-2347(memory)X
-2634(or)X
-2721(temporary)X
-3071(\256les)X
-3224(until)X
-3390(commit)X
-3654(and)X
-3790(then)X
-3948(force)X
-4134(these)X
-555 2637(pages)N
-769(to)X
-862(disk)X
-1026(at)X
-1115(transaction)X
-1498(commit.)X
-1813(While)X
-2040(we)X
-2165(can)X
-2308(use)X
-2446(temporary)X
-2807(\256les)X
-2971(to)X
-3064(hold)X
-3237(dirty)X
-3418(pages)X
-3631(that)X
-3781(may)X
-3949(need)X
-4131(to)X
-4223(be)X
-555 2727(evicted)N
-810(from)X
-988(memory)X
-1277(during)X
-1508(a)X
-1566(long-running)X
-2006(transaction,)X
-2400(the)X
-2520(only)X
-2684(user-level)X
-3023(mechanism)X
-3410(to)X
-3494(force)X
-3682(pages)X
-3887(to)X
-3971(disk)X
-4126(is)X
-4201(the)X
-3 f
-555 2817(fsync)N
-1 f
-733(\(2\))X
-850(system)X
-1095(call.)X
-1274(Unfortunately,)X
-3 f
-1767(fsync)X
-1 f
-1945(\(2\))X
-2062(is)X
-2138(an)X
-2237(expensive)X
-2581(system)X
-2826(call)X
-2965(in)X
-3050(that)X
-3193(it)X
-3260(forces)X
-3480(all)X
-3583(pages)X
-3789(of)X
-3879(a)X
-3938(\256le)X
-4062(to)X
-4146(disk,)X
-555 2907(and)N
-691(transactions)X
-1094(that)X
-1234(manage)X
-1504(more)X
-1689(than)X
-1847(one)X
-1983(\256le)X
-2105(must)X
-2280(issue)X
-2460(one)X
-2596(call)X
-2732(per)X
-2855(\256le.)X
-755 3030(In)N
-853(addition,)X
-3 f
-1166(fsync)X
-1 f
-1344(\(2\))X
-1469(provides)X
-1776(no)X
-1887(way)X
-2051(to)X
-2143(control)X
-2400(the)X
-2528(order)X
-2728(in)X
-2820(which)X
-3046(dirty)X
-3227(pages)X
-3440(are)X
-3569(written)X
-3826(to)X
-3918(disk.)X
-4121(Since)X
-555 3120(non-logging)N
-976(protocols)X
-1304(must)X
-1489(sometimes)X
-1861(order)X
-2061(writes)X
-2287(carefully)X
-2603([SULL92],)X
-2987(they)X
-3155(are)X
-3284(dif\256cult)X
-3567(to)X
-3659(implement)X
-4030(on)X
-4139(Unix)X
-555 3210(systems.)N
-868(As)X
-977(a)X
-1033(result,)X
-1251(we)X
-1365(have)X
-1537(chosen)X
-1780(to)X
-1862(implement)X
-2224(a)X
-2280(logging)X
-2544(protocol.)X
-755 3333(Logging)N
-1050(protocols)X
-1372(may)X
-1534(be)X
-1634(categorized)X
-2029(based)X
-2236(on)X
-2340(how)X
-2502(information)X
-2904(is)X
-2981(logged)X
-3223(\(physically)X
-3602(or)X
-3692(logically\))X
-4022(and)X
-4161(how)X
-555 3423(much)N
-767(is)X
-854(logged)X
-1106(\(before)X
-1373(images,)X
-1654(after)X
-1836(images)X
-2097(or)X
-2198(both\).)X
-2441(In)X
-3 f
-2542(physical)X
-2855(logging)X
-1 f
-3103(,)X
-3157(images)X
-3417(of)X
-3517(complete)X
-3844(physical)X
-4144(units)X
-555 3513(\(pages)N
-786(or)X
-874(buffers\))X
-1150(are)X
-1270(recorded,)X
-1593(while)X
-1792(in)X
-3 f
-1875(logical)X
-2118(logging)X
-1 f
-2387(a)X
-2444(description)X
-2820(of)X
-2907(the)X
-3025(operation)X
-3348(is)X
-3421(recorded.)X
-3763(Therefore,)X
-4121(while)X
-555 3603(we)N
-675(may)X
-839(record)X
-1071(entire)X
-1280(pages)X
-1489(in)X
-1577(a)X
-1639(physical)X
-1932(log,)X
-2080(we)X
-2200(need)X
-2378(only)X
-2546(record)X
-2777(the)X
-2900(records)X
-3162(being)X
-3365(modi\256ed)X
-3674(in)X
-3761(a)X
-3822(logical)X
-4065(log.)X
-4232(In)X
-555 3693(fact,)N
-718(physical)X
-1006(logging)X
-1271(can)X
-1404(be)X
-1501(thought)X
-1766(of)X
-1854(as)X
-1942(a)X
-1999(special)X
-2243(case)X
-2403(of)X
-2491(logical)X
-2730(logging,)X
-3015(since)X
-3201(the)X
-3320 0.3125(``records'')AX
-3686(that)X
-3827(we)X
-3942(log)X
-4065(in)X
-4148(logi-)X
-555 3783(cal)N
-673(logging)X
-941(might)X
-1151(be)X
-1251(physical)X
-1542(pages.)X
-1789(Since)X
-1991(logical)X
-2233(logging)X
-2501(is)X
-2578(both)X
-2743(more)X
-2931(space-ef\256cient)X
-3423(and)X
-3562(more)X
-3750(general,)X
-4030(we)X
-4147(have)X
-555 3873(chosen)N
-798(it)X
-862(for)X
-976(our)X
-1103(logging)X
-1367(protocol.)X
-755 3996(In)N
-3 f
-843(before-image)X
-1315(logging)X
-1 f
-1563(,)X
-1604(we)X
-1719(log)X
-1842(a)X
-1899(copy)X
-2076(of)X
-2164(the)X
-2283(data)X
-2438(before)X
-2665(the)X
-2784(update,)X
-3039(while)X
-3238(in)X
-3 f
-3321(after-image)X
-3739(logging)X
-1 f
-3987(,)X
-4027(we)X
-4141(log)X
-4263(a)X
-555 4086(copy)N
-740(of)X
-836(the)X
-963(data)X
-1126(after)X
-1303(the)X
-1429(update.)X
-1711(If)X
-1793(we)X
-1915(log)X
-2045(only)X
-2215(before-images,)X
-2723(then)X
-2889(there)X
-3078(is)X
-3159(suf\256cient)X
-3485(information)X
-3891(in)X
-3981(the)X
-4107(log)X
-4237(to)X
-555 4176(allow)N
-761(us)X
-860(to)X
-3 f
-950(undo)X
-1 f
-1150(the)X
-1276(transaction)X
-1656(\(go)X
-1791(back)X
-1971(to)X
-2061(the)X
-2187(state)X
-2361(represented)X
-2759(by)X
-2866(the)X
-2991(before-image\).)X
-3514(However,)X
-3876(if)X
-3952(the)X
-4077(system)X
-555 4266(crashes)N
-814(and)X
-952(a)X
-1010(committed)X
-1374(transaction's)X
-1806(changes)X
-2087(have)X
-2261(not)X
-2385(reached)X
-2658(the)X
-2778(disk,)X
-2953(we)X
-3068(have)X
-3241(no)X
-3342(means)X
-3568(to)X
-3 f
-3651(redo)X
-1 f
-3828(the)X
-3947(transaction)X
-555 4356(\(reapply)N
-849(the)X
-973(updates\).)X
-1311(Therefore,)X
-1675(logging)X
-1945(only)X
-2113(before-images)X
-2599(necessitates)X
-3004(forcing)X
-3262(dirty)X
-3439(pages)X
-3648(at)X
-3732(commit)X
-4002(time.)X
-4210(As)X
-555 4446(mentioned)N
-913(above,)X
-1145(forcing)X
-1397(pages)X
-1600(at)X
-1678(commit)X
-1942(is)X
-2015(considered)X
-2383(too)X
-2505(costly.)X
-755 4569(If)N
-834(we)X
-953(log)X
-1080(only)X
-1247(after-images,)X
-1694(then)X
-1857(there)X
-2043(is)X
-2121(suf\256cient)X
-2444(information)X
-2847(in)X
-2934(the)X
-3057(log)X
-3184(to)X
-3271(allow)X
-3474(us)X
-3570(to)X
-3657(redo)X
-3825(the)X
-3947(transaction)X
-555 4659(\(go)N
-687(forward)X
-967(to)X
-1054(the)X
-1177(state)X
-1348(represented)X
-1743(by)X
-1847(the)X
-1969(after-image\),)X
-2411(but)X
-2537(we)X
-2655(do)X
-2759(not)X
-2885(have)X
-3061(the)X
-3183(information)X
-3585(required)X
-3877(to)X
-3963(undo)X
-4147(tran-)X
-555 4749(sactions)N
-845(which)X
-1073(aborted)X
-1346(after)X
-1526(dirty)X
-1709(pages)X
-1924(were)X
-2113(written)X
-2372(to)X
-2466(disk.)X
-2670(Therefore,)X
-3039(logging)X
-3314(only)X
-3487(after-images)X
-3920(necessitates)X
-555 4839(holding)N
-819(all)X
-919(dirty)X
-1090(buffers)X
-1338(in)X
-1420(main)X
-1600(memory)X
-1887(until)X
-2053(commit)X
-2317(or)X
-2404(writing)X
-2655(them)X
-2835(to)X
-2917(a)X
-2973(temporary)X
-3323(\256le.)X
-755 4962(Since)N
-956(neither)X
-1202(constraint)X
-1541(\(forcing)X
-1823(pages)X
-2029(on)X
-2132(commit)X
-2399(or)X
-2489(buffering)X
-2811(pages)X
-3016(until)X
-3184(commit\))X
-3477(was)X
-3624(feasible,)X
-3916(we)X
-4032(chose)X
-4237(to)X
-555 5052(log)N
-683(both)X
-851(before)X
-1083(and)X
-1225(after)X
-1399(images.)X
-1672(The)X
-1823(only)X
-1991(remaining)X
-2342(consideration)X
-2800(is)X
-2879(when)X
-3079(changes)X
-3363(get)X
-3486(written)X
-3738(to)X
-3825(disk.)X
-4023(Changes)X
-555 5142(affect)N
-764(both)X
-931(data)X
-1090(pages)X
-1298(and)X
-1438(the)X
-1560(log.)X
-1726(If)X
-1804(the)X
-1926(changed)X
-2218(data)X
-2376(page)X
-2552(is)X
-2629(written)X
-2880(before)X
-3110(the)X
-3232(log)X
-3358(page,)X
-3554(and)X
-3694(the)X
-3816(system)X
-4062(crashes)X
-555 5232(before)N
-787(the)X
-911(log)X
-1039(page)X
-1217(is)X
-1296(written,)X
-1569(the)X
-1693(log)X
-1820(will)X
-1969(contain)X
-2230(insuf\256cient)X
-2615(information)X
-3018(to)X
-3105(undo)X
-3290(the)X
-3413(change.)X
-3706(This)X
-3873(violates)X
-4147(tran-)X
-555 5322(saction)N
-803(semantics,)X
-1160(since)X
-1346(some)X
-1536(changed)X
-1825(data)X
-1980(pages)X
-2184(may)X
-2343(not)X
-2466(have)X
-2638(been)X
-2810(written,)X
-3077(and)X
-3213(the)X
-3331(database)X
-3628(cannot)X
-3862(be)X
-3958(restored)X
-4237(to)X
-555 5412(its)N
-650(pre-transaction)X
-1152(state.)X
-755 5535(The)N
-914(log)X
-1050(record)X
-1290(describing)X
-1658(an)X
-1768(update)X
-2016(must)X
-2205(be)X
-2315(written)X
-2576(to)X
-2672(stable)X
-2893(storage)X
-3159(before)X
-3398(the)X
-3529(modi\256ed)X
-3846(page.)X
-4071(This)X
-4246(is)X
-3 f
-555 5625(write-ahead)N
-992(logging)X
-1 f
-1240(.)X
-1307(If)X
-1388(log)X
-1517(records)X
-1781(are)X
-1907(safely)X
-2126(written)X
-2380(to)X
-2469(disk,)X
-2649(data)X
-2810(pages)X
-3020(may)X
-3185(be)X
-3288(written)X
-3542(at)X
-3627(any)X
-3770(time)X
-3939(afterwards.)X
-555 5715(This)N
-721(means)X
-950(that)X
-1094(the)X
-1216(only)X
-1382(\256le)X
-1508(that)X
-1652(ever)X
-1815(needs)X
-2022(to)X
-2108(be)X
-2208(forced)X
-2438(to)X
-2524(disk)X
-2681(is)X
-2758(the)X
-2880(log.)X
-3046(Since)X
-3248(the)X
-3370(log)X
-3495(is)X
-3571(append-only,)X
-4015(modi\256ed)X
-
-4 p
-%%Page: 4 4
-10 s 10 xH 0 xS 1 f
-3 f
-1 f
-555 630(pages)N
-760(always)X
-1005(appear)X
-1242(at)X
-1322(the)X
-1442(end)X
-1580(and)X
-1718(may)X
-1878(be)X
-1976(written)X
-2224(to)X
-2307(disk)X
-2461(ef\256ciently)X
-2807(in)X
-2890(any)X
-3027(\256le)X
-3150(system)X
-3393(that)X
-3534(favors)X
-3756(sequential)X
-4102(order-)X
-555 720(ing)N
-677(\()X
-2 f
-704(e.g.)X
-1 f
-820(,)X
-860(FFS,)X
-1032(log-structured)X
-1502(\256le)X
-1624(system,)X
-1886(or)X
-1973(an)X
-2069(extent-based)X
-2495(system\).)X
-3 f
-555 906(3.1.2.)N
-775(Concurrency)X
-1245(Control)X
-1 f
-755 1029(The)N
-918(concurrency)X
-1354(control)X
-1619(protocol)X
-1923(is)X
-2013(responsible)X
-2415(for)X
-2546(maintaining)X
-2965(consistency)X
-3376(in)X
-3475(the)X
-3610(presence)X
-3929(of)X
-4033(multiple)X
-555 1119(accesses.)N
-897(There)X
-1114(are)X
-1242(several)X
-1499(alternative)X
-1867(solutions)X
-2183(such)X
-2358(as)X
-2453(locking,)X
-2741(optimistic)X
-3088(concurrency)X
-3514(control)X
-3769([KUNG81],)X
-4183(and)X
-555 1209(timestamp)N
-912(ordering)X
-1208([BERN80].)X
-1619(Since)X
-1821(optimistic)X
-2164(methods)X
-2459(and)X
-2599(timestamp)X
-2956(ordering)X
-3252(are)X
-3374(generally)X
-3696(more)X
-3884(complex)X
-4183(and)X
-555 1299(restrict)N
-804(concurrency)X
-1228(without)X
-1498(eliminating)X
-1888(starvation)X
-2230(or)X
-2323(deadlocks,)X
-2690(we)X
-2810(chose)X
-3018(two-phase)X
-3373(locking)X
-3638(\(2PL\).)X
-3890(Strict)X
-4088(2PL)X
-4246(is)X
-555 1389(suboptimal)N
-935(for)X
-1054(certain)X
-1297(data)X
-1455(structures)X
-1791(such)X
-1962(as)X
-2053(B-trees)X
-2309(because)X
-2588(it)X
-2656(can)X
-2792(limit)X
-2966(concurrency,)X
-3408(so)X
-3503(we)X
-3621(use)X
-3752(a)X
-3812(special)X
-4059(locking)X
-555 1479(protocol)N
-842(based)X
-1045(on)X
-1145(one)X
-1281(described)X
-1609(in)X
-1691([LEHM81].)X
-755 1602(The)N
-901(B-tree)X
-1123(locking)X
-1384(protocol)X
-1672(we)X
-1787(implemented)X
-2226(releases)X
-2502(locks)X
-2691(at)X
-2769(internal)X
-3034(nodes)X
-3241(in)X
-3323(the)X
-3441(tree)X
-3582(as)X
-3669(it)X
-3733(descends.)X
-4083(A)X
-4161(lock)X
-555 1692(on)N
-658(an)X
-757(internal)X
-1025(page)X
-1200(is)X
-1276(always)X
-1522(released)X
-1808(before)X
-2036(a)X
-2094(lock)X
-2254(on)X
-2356(its)X
-2453(child)X
-2635(is)X
-2710(obtained)X
-3008(\(that)X
-3177(is,)X
-3272(locks)X
-3463(are)X
-3584(not)X
-3 f
-3708(coupled)X
-1 f
-3996([BAY77])X
-555 1782(during)N
-786(descent\).)X
-1116(When)X
-1330(a)X
-1388(leaf)X
-1531(\(or)X
-1647(internal\))X
-1941(page)X
-2115(is)X
-2190(split,)X
-2369(a)X
-2427(write)X
-2614(lock)X
-2774(is)X
-2849(acquired)X
-3148(on)X
-3250(the)X
-3370(parent)X
-3593(before)X
-3821(the)X
-3941(lock)X
-4100(on)X
-4201(the)X
-555 1872(just-split)N
-855(page)X
-1028(is)X
-1102(released)X
-1387(\(locks)X
-1604(are)X
-3 f
-1724(coupled)X
-1 f
-2011(during)X
-2241(ascent\).)X
-2530(Write)X
-2734(locks)X
-2924(on)X
-3025(internal)X
-3291(pages)X
-3495(are)X
-3615(released)X
-3899(immediately)X
-555 1962(after)N
-723(the)X
-841(page)X
-1013(is)X
-1086(updated,)X
-1380(but)X
-1502(locks)X
-1691(on)X
-1791(leaf)X
-1932(pages)X
-2135(are)X
-2254(held)X
-2412(until)X
-2578(the)X
-2696(end)X
-2832(of)X
-2919(the)X
-3037(transaction.)X
-755 2085(Since)N
-964(locks)X
-1164(are)X
-1294(released)X
-1589(during)X
-1828(descent,)X
-2119(the)X
-2247(structure)X
-2558(of)X
-2655(the)X
-2783(tree)X
-2934(may)X
-3102(change)X
-3360(above)X
-3582(a)X
-3648(node)X
-3834(being)X
-4042(used)X
-4219(by)X
-555 2175(some)N
-752(process.)X
-1061(If)X
-1143(that)X
-1291(process)X
-1560(must)X
-1743(later)X
-1914(ascend)X
-2161(the)X
-2287(tree)X
-2435(because)X
-2717(of)X
-2811(a)X
-2874(page)X
-3053(split,)X
-3237(any)X
-3380(such)X
-3554(change)X
-3809(must)X
-3991(not)X
-4120(cause)X
-555 2265(confusion.)N
-938(We)X
-1077(use)X
-1211(the)X
-1336(technique)X
-1675(described)X
-2010(in)X
-2099([LEHM81])X
-2487(which)X
-2710(exploits)X
-2989(the)X
-3113(ordering)X
-3411(of)X
-3504(data)X
-3664(on)X
-3770(a)X
-3832(B-tree)X
-4059(page)X
-4237(to)X
-555 2355(guarantee)N
-888(that)X
-1028(no)X
-1128(process)X
-1389(ever)X
-1548(gets)X
-1697(lost)X
-1832(as)X
-1919(a)X
-1975(result)X
-2173(of)X
-2260(internal)X
-2525(page)X
-2697(updates)X
-2962(made)X
-3156(by)X
-3256(other)X
-3441(processes.)X
-755 2478(If)N
-836(a)X
-899(transaction)X
-1278(that)X
-1425(updates)X
-1697(a)X
-1760(B-tree)X
-1988(aborts,)X
-2231(the)X
-2356(user-visible)X
-2757(changes)X
-3043(to)X
-3131(the)X
-3255(tree)X
-3402(must)X
-3583(be)X
-3685(rolled)X
-3898(back.)X
-4116(How-)X
-555 2568(ever,)N
-735(changes)X
-1015(to)X
-1097(the)X
-1215(internal)X
-1480(nodes)X
-1687(of)X
-1774(the)X
-1892(tree)X
-2033(need)X
-2205(not)X
-2327(be)X
-2423(rolled)X
-2630(back,)X
-2822(since)X
-3007(these)X
-3192(pages)X
-3395(contain)X
-3651(no)X
-3751(user-visible)X
-4145(data.)X
-555 2658(When)N
-771(rolling)X
-1008(back)X
-1184(a)X
-1244(transaction,)X
-1640(we)X
-1758(roll)X
-1893(back)X
-2069(all)X
-2173(leaf)X
-2318(page)X
-2494(updates,)X
-2783(but)X
-2909(no)X
-3013(internal)X
-3281(insertions)X
-3615(or)X
-3705(page)X
-3880(splits.)X
-4111(In)X
-4201(the)X
-555 2748(worst)N
-759(case,)X
-944(this)X
-1085(will)X
-1235(leave)X
-1431(a)X
-1493(leaf)X
-1640(page)X
-1818(less)X
-1964(than)X
-2128(half)X
-2279(full.)X
-2456(This)X
-2624(may)X
-2788(cause)X
-2993(poor)X
-3166(space)X
-3371(utilization,)X
-3741(but)X
-3869(does)X
-4042(not)X
-4170(lose)X
-555 2838(user)N
-709(data.)X
-755 2961(Holding)N
-1038(locks)X
-1228(on)X
-1329(leaf)X
-1471(pages)X
-1675(until)X
-1842(transaction)X
-2215(commit)X
-2480(guarantees)X
-2845(that)X
-2986(no)X
-3087(other)X
-3273(process)X
-3535(can)X
-3668(insert)X
-3866(or)X
-3953(delete)X
-4165(data)X
-555 3051(that)N
-711(has)X
-854(been)X
-1042(touched)X
-1332(by)X
-1448(this)X
-1598(process.)X
-1914(Rolling)X
-2188(back)X
-2375(insertions)X
-2721(and)X
-2872(deletions)X
-3196(on)X
-3311(leaf)X
-3467(pages)X
-3685(guarantees)X
-4064(that)X
-4219(no)X
-555 3141(aborted)N
-819(updates)X
-1087(are)X
-1209(ever)X
-1371(visible)X
-1607(to)X
-1692(other)X
-1880(transactions.)X
-2326(Leaving)X
-2612(page)X
-2787(splits)X
-2978(intact)X
-3179(permits)X
-3442(us)X
-3536(to)X
-3621(release)X
-3867(internal)X
-4134(write)X
-555 3231(locks)N
-744(early.)X
-965(Thus)X
-1145(transaction)X
-1517(semantics)X
-1853(are)X
-1972(preserved,)X
-2325(and)X
-2461(locks)X
-2650(are)X
-2769(held)X
-2927(for)X
-3041(shorter)X
-3284(periods.)X
-755 3354(The)N
-901(extra)X
-1083(complexity)X
-1464(introduced)X
-1828(by)X
-1929(this)X
-2065(locking)X
-2326(protocol)X
-2614(appears)X
-2881(substantial,)X
-3264(but)X
-3387(it)X
-3452(is)X
-3525(important)X
-3856(for)X
-3970(multi-user)X
-555 3444(execution.)N
-950(The)X
-1118(bene\256ts)X
-1410(of)X
-1520(non-two-phase)X
-2040(locking)X
-2323(on)X
-2446(B-trees)X
-2721(are)X
-2863(well)X
-3044(established)X
-3443(in)X
-3548(the)X
-3689(database)X
-4009(literature)X
-555 3534([BAY77],)N
-899([LEHM81].)X
-1320(If)X
-1394(a)X
-1450(process)X
-1711(held)X
-1869(locks)X
-2058(until)X
-2224(it)X
-2288(committed,)X
-2670(then)X
-2828(a)X
-2884(long-running)X
-3322(update)X
-3556(could)X
-3754(lock)X
-3912(out)X
-4034(all)X
-4134(other)X
-555 3624(transactions)N
-967(by)X
-1076(preventing)X
-1448(any)X
-1593(other)X
-1787(process)X
-2057(from)X
-2241(locking)X
-2509(the)X
-2635(root)X
-2792(page)X
-2972(of)X
-3067(the)X
-3193(tree.)X
-3382(The)X
-3535(B-tree)X
-3764(locking)X
-4032(protocol)X
-555 3714(described)N
-884(above)X
-1096(guarantees)X
-1460(that)X
-1600(locks)X
-1789(on)X
-1889(internal)X
-2154(pages)X
-2357(are)X
-2476(held)X
-2634(for)X
-2748(extremely)X
-3089(short)X
-3269(periods,)X
-3545(thereby)X
-3806(increasing)X
-4156(con-)X
-555 3804(currency.)N
-3 f
-555 3990(3.1.3.)N
-775(Management)X
-1245(of)X
-1332(Shared)X
-1596(Data)X
-1 f
-755 4113(Database)N
-1075(systems)X
-1353(permit)X
-1587(many)X
-1790(users)X
-1980(to)X
-2067(examine)X
-2364(and)X
-2505(update)X
-2744(the)X
-2866(same)X
-3055(data)X
-3213(concurrently.)X
-3683(In)X
-3774(order)X
-3968(to)X
-4054(provide)X
-555 4203(this)N
-702(concurrent)X
-1078(access)X
-1316(and)X
-1464(enforce)X
-1738(the)X
-1868(write-ahead)X
-2280(logging)X
-2556(protocol)X
-2855(described)X
-3195(in)X
-3289(section)X
-3548(3.1.1,)X
-3759(we)X
-3884(use)X
-4022(a)X
-4089(shared)X
-555 4293(memory)N
-848(buffer)X
-1071(manager.)X
-1414(Not)X
-1559(only)X
-1726(does)X
-1898(this)X
-2038(provide)X
-2308(the)X
-2431(guarantees)X
-2800(we)X
-2919(require,)X
-3192(but)X
-3319(a)X
-3380(user-level)X
-3722(buffer)X
-3944(manager)X
-4246(is)X
-555 4383(frequently)N
-916(faster)X
-1126(than)X
-1295(using)X
-1498(the)X
-1626(\256le)X
-1758(system)X
-2010(buffer)X
-2237(cache.)X
-2491(Reads)X
-2717(or)X
-2814(writes)X
-3040(involving)X
-3376(the)X
-3504(\256le)X
-3636(system)X
-3888(buffer)X
-4115(cache)X
-555 4473(often)N
-746(require)X
-1000(copying)X
-1284(data)X
-1444(between)X
-1738(user)X
-1898(and)X
-2040(kernel)X
-2266(space)X
-2470(while)X
-2673(a)X
-2734(user-level)X
-3076(buffer)X
-3298(manager)X
-3600(can)X
-3737(return)X
-3954(pointers)X
-4237(to)X
-555 4563(data)N
-709(pages)X
-912(directly.)X
-1217(Additionally,)X
-1661(if)X
-1730(more)X
-1915(than)X
-2073(one)X
-2209(process)X
-2470(uses)X
-2628(the)X
-2746(same)X
-2931(page,)X
-3123(then)X
-3281(fewer)X
-3485(copies)X
-3710(may)X
-3868(be)X
-3964(required.)X
-3 f
-555 4749(3.2.)N
-715(Module)X
-997(Architecture)X
-1 f
-755 4872(The)N
-913(preceding)X
-1262(sections)X
-1552(described)X
-1892(modules)X
-2195(for)X
-2321(managing)X
-2669(the)X
-2799(transaction)X
-3183(log,)X
-3337(locks,)X
-3558(and)X
-3706(a)X
-3774(cache)X
-3990(of)X
-4089(shared)X
-555 4962(buffers.)N
-847(In)X
-938(addition,)X
-1244(we)X
-1362(need)X
-1538(to)X
-1624(provide)X
-1893(functionality)X
-2326(for)X
-2444(transaction)X
-2 f
-2819(begin)X
-1 f
-2997(,)X
-2 f
-3040(commit)X
-1 f
-3276(,)X
-3319(and)X
-2 f
-3458(abort)X
-1 f
-3654(processing,)X
-4040(necessi-)X
-555 5052(tating)N
-769(a)X
-837(transaction)X
-1221(manager.)X
-1570(In)X
-1669(order)X
-1871(to)X
-1965(arbitrate)X
-2265(concurrent)X
-2641(access)X
-2879(to)X
-2973(locks)X
-3173(and)X
-3320(buffers,)X
-3599(we)X
-3724(include)X
-3991(a)X
-4058(process)X
-555 5142(management)N
-995(module)X
-1264(which)X
-1489(manages)X
-1799(a)X
-1864(collection)X
-2209(of)X
-2305(semaphores)X
-2713(used)X
-2889(to)X
-2980(block)X
-3187(and)X
-3332(release)X
-3585(processes.)X
-3962(Finally,)X
-4237(in)X
-555 5232(order)N
-752(to)X
-841(provide)X
-1113(a)X
-1176(simple,)X
-1436(standard)X
-1735(interface)X
-2044(we)X
-2165(have)X
-2344(modi\256ed)X
-2655(the)X
-2780(database)X
-3084(access)X
-3317(routines)X
-3602(\()X
-3 f
-3629(db)X
-1 f
-3717(\(3\)\).)X
-3904(For)X
-4041(the)X
-4165(pur-)X
-555 5322(poses)N
-758(of)X
-850(this)X
-990(paper)X
-1194(we)X
-1313(call)X
-1453(the)X
-1575(modi\256ed)X
-1883(package)X
-2171(the)X
-3 f
-2293(Record)X
-2567(Manager)X
-1 f
-2879(.)X
-2943(Figure)X
-3176(one)X
-3316(shows)X
-3540(the)X
-3662(main)X
-3846(interfaces)X
-4183(and)X
-555 5412(architecture)N
-955(of)X
-1042(LIBTP.)X
-
-5 p
-%%Page: 5 5
-10 s 10 xH 0 xS 1 f
-3 f
-1 f
-11 s
-1851 1520(log_commit)N
-2764 2077(buf_unpin)N
-2764 1987(buf_get)N
-3633 1408(buf_unpin)N
-3633 1319(buf_pin)N
-3633 1230(buf_get)N
-3 f
-17 s
-1163 960(Txn)N
-1430(M)X
-1559(anager)X
-2582(Record)X
-3040(M)X
-3169(anager)X
-1 Dt
-2363 726 MXY
-0 355 Dl
-1426 0 Dl
-0 -355 Dl
--1426 0 Dl
-3255 1616 MXY
-0 535 Dl
-534 0 Dl
-0 -535 Dl
--534 0 Dl
-2185 MX
-0 535 Dl
-535 0 Dl
-0 -535 Dl
--535 0 Dl
-1116 MX
-0 535 Dl
-534 0 Dl
-0 -535 Dl
--534 0 Dl
-726 MY
-0 355 Dl
-891 0 Dl
-0 -355 Dl
--891 0 Dl
-1 f
-11 s
-2207 1297(lock)N
-2564 1386(log)N
-865(unlock_all)X
-1851 1609(log_unroll)N
-1650 2508 MXY
-0 178 Dl
-1605 0 Dl
-0 -178 Dl
--1605 0 Dl
-1294 1616 MXY
-19 -30 Dl
--19 11 Dl
--20 -11 Dl
-20 30 Dl
-0 -535 Dl
-2319 2508 MXY
--22 -30 Dl
-4 23 Dl
--18 14 Dl
-36 -7 Dl
--936 -357 Dl
-3277 2455(sleep_on)N
-1405 1616 MXY
-36 4 Dl
--18 -13 Dl
-1 -22 Dl
--19 31 Dl
-1070 -535 Dl
-2631 2508 MXY
-36 6 Dl
--18 -14 Dl
-3 -22 Dl
--21 30 Dl
-891 -357 Dl
-1426 2455(sleep_on)N
-3255 1884 MXY
--31 -20 Dl
-11 20 Dl
--11 19 Dl
-31 -19 Dl
--535 0 Dl
-1554 2366(wake)N
-3277(wake)X
-2185 1884 MXY
--31 -20 Dl
-12 20 Dl
--12 19 Dl
-31 -19 Dl
--356 0 Dl
-0 -803 Dl
-3 f
-17 s
-1236 1851(Lock)N
-1118 2030(M)N
-1247(anager)X
-2339 1851(Log)N
-2187 2030(M)N
-2316(anager)X
-3333 1851(Buffer)N
-3257 2030(M)N
-3386(anager)X
-3522 1616 MXY
-20 -30 Dl
--20 11 Dl
--20 -11 Dl
-20 30 Dl
-0 -535 Dl
-1950 2654(Process)N
-2424(M)X
-2553(anager)X
-2542 1616 MXY
-19 -30 Dl
--19 11 Dl
--20 -11 Dl
-20 30 Dl
-0 -535 Dl
-1 f
-11 s
-2207 1364(unlock)N
-2452 2508 MXY
-20 -31 Dl
--20 11 Dl
--19 -11 Dl
-19 31 Dl
-0 -357 Dl
-2497 2322(sleep_on)N
-2497 2233(wake)N
-3 Dt
--1 Ds
-3 f
-10 s
-1790 2830(Figure)N
-2037(1:)X
-2144(Library)X
-2435(module)X
-2708(interfaces.)X
-1 f
-10 f
-555 3010(h)N
-579(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)X
-3 f
-555 3286(3.2.1.)N
-775(The)X
-928(Log)X
-1081(Manager)X
-1 f
-755 3409(The)N
-3 f
-907(Log)X
-1067(Manager)X
-1 f
-1406(enforces)X
-1706(the)X
-1831(write-ahead)X
-2238(logging)X
-2509(protocol.)X
-2843(Its)X
-2949(primitive)X
-3268(operations)X
-3628(are)X
-2 f
-3753(log)X
-1 f
-3855(,)X
-2 f
-3901(log_commit)X
-1 f
-4279(,)X
-2 f
-555 3499(log_read)N
-1 f
-844(,)X
-2 f
-889(log_roll)X
-1 f
-1171(and)X
-2 f
-1312(log_unroll)X
-1 f
-1649(.)X
-1714(The)X
-2 f
-1864(log)X
-1 f
-1991(call)X
-2132(performs)X
-2447(a)X
-2508(buffered)X
-2806(write)X
-2996(of)X
-3088(the)X
-3211(speci\256ed)X
-3520(log)X
-3646(record)X
-3876(and)X
-4016(returns)X
-4263(a)X
-555 3589(unique)N
-809(log)X
-947(sequence)X
-1278(number)X
-1559(\(LSN\).)X
-1840(This)X
-2017(LSN)X
-2203(may)X
-2376(then)X
-2549(be)X
-2660(used)X
-2842(to)X
-2939(retrieve)X
-3220(a)X
-3291(record)X
-3532(from)X
-3723(the)X
-3856(log)X
-3993(using)X
-4201(the)X
-2 f
-555 3679(log_read)N
-1 f
-865(call.)X
-1042(The)X
-2 f
-1188(log)X
-1 f
-1311(interface)X
-1614(knows)X
-1844(very)X
-2008(little)X
-2175(about)X
-2374(the)X
-2493(internal)X
-2759(format)X
-2993(of)X
-3080(the)X
-3198(log)X
-3320(records)X
-3577(it)X
-3641(receives.)X
-3965(Rather,)X
-4219(all)X
-555 3769(log)N
-681(records)X
-942(are)X
-1065 0.4028(referenced)AX
-1430(by)X
-1534(a)X
-1594(header)X
-1833(structure,)X
-2158(a)X
-2218(log)X
-2344(record)X
-2574(type,)X
-2756(and)X
-2896(a)X
-2956(character)X
-3276(buffer)X
-3497(containing)X
-3859(the)X
-3981(data)X
-4138(to)X
-4223(be)X
-555 3859(logged.)N
-834(The)X
-980(log)X
-1103(record)X
-1330(type)X
-1489(is)X
-1563(used)X
-1731(to)X
-1814(call)X
-1951(the)X
-2070(appropriate)X
-2457(redo)X
-2621(and)X
-2758(undo)X
-2939(routines)X
-3217(during)X
-2 f
-3446(abort)X
-1 f
-3639(and)X
-2 f
-3775(commit)X
-1 f
-4031(process-)X
-555 3949(ing.)N
-721(While)X
-941(we)X
-1059(have)X
-1235(used)X
-1406(the)X
-3 f
-1528(Log)X
-1684(Manager)X
-1 f
-2019(to)X
-2104(provide)X
-2372(before)X
-2601(and)X
-2740(after)X
-2911(image)X
-3130(logging,)X
-3417(it)X
-3484(may)X
-3645(also)X
-3797(be)X
-3896(used)X
-4066(for)X
-4183(any)X
-555 4039(of)N
-642(the)X
-760(logging)X
-1024(algorithms)X
-1386(discussed.)X
-755 4162(The)N
-2 f
-905(log_commit)X
-1 f
-1308(operation)X
-1636(behaves)X
-1920(exactly)X
-2177(like)X
-2322(the)X
-2 f
-2445(log)X
-1 f
-2572(operation)X
-2900(but)X
-3026(guarantees)X
-3394(that)X
-3538(the)X
-3660(log)X
-3786(has)X
-3917(been)X
-4093(forced)X
-555 4252(to)N
-643(disk)X
-802(before)X
-1034(returning.)X
-1394(A)X
-1478(discussion)X
-1837(of)X
-1930(our)X
-2063(commit)X
-2333(strategy)X
-2613(appears)X
-2884(in)X
-2971(the)X
-3094(implementation)X
-3621(section)X
-3873(\(section)X
-4152(4.2\).)X
-2 f
-555 4342(Log_unroll)N
-1 f
-935(reads)X
-1126(log)X
-1249(records)X
-1507(from)X
-1684(the)X
-1803(log,)X
-1946(following)X
-2278(backward)X
-2611(transaction)X
-2983(pointers)X
-3261(and)X
-3397(calling)X
-3635(the)X
-3753(appropriate)X
-4139(undo)X
-555 4432(routines)N
-839(to)X
-927(implement)X
-1295(transaction)X
-1673(abort.)X
-1904(In)X
-1997(a)X
-2059(similar)X
-2307(manner,)X
-2 f
-2594(log_roll)X
-1 f
-2877(reads)X
-3073(log)X
-3201(records)X
-3464(sequentially)X
-3877(forward,)X
-4178(cal-)X
-555 4522(ling)N
-699(the)X
-817(appropriate)X
-1203(redo)X
-1366(routines)X
-1644(to)X
-1726(recover)X
-1988(committed)X
-2350(transactions)X
-2753(after)X
-2921(a)X
-2977(system)X
-3219(crash.)X
-3 f
-555 4708(3.2.2.)N
-775(The)X
-928(Buffer)X
-1171(Manager)X
-1 f
-755 4831(The)N
-3 f
-912(Buffer)X
-1167(Manager)X
-1 f
-1511(uses)X
-1681(a)X
-1749(pool)X
-1923(of)X
-2022(shared)X
-2264(memory)X
-2563(to)X
-2657(provide)X
-2934(a)X
-3002(least-recently-used)X
-3641(\(LRU\))X
-3886(block)X
-4095(cache.)X
-555 4921(Although)N
-886(the)X
-1013(current)X
-1270(library)X
-1513(provides)X
-1818(an)X
-1923(LRU)X
-2112(cache,)X
-2345(it)X
-2418(would)X
-2647(be)X
-2752(simple)X
-2994(to)X
-3085(add)X
-3229(alternate)X
-3534(replacement)X
-3955(policies)X
-4232(as)X
-555 5011(suggested)N
-903(by)X
-1015([CHOU85])X
-1408(or)X
-1507(to)X
-1601(provide)X
-1878(multiple)X
-2176(buffer)X
-2405(pools)X
-2610(with)X
-2784(different)X
-3092(policies.)X
-3412(Transactions)X
-3853(request)X
-4116(pages)X
-555 5101(from)N
-736(the)X
-859(buffer)X
-1081(manager)X
-1383(and)X
-1524(keep)X
-1701(them)X
-3 f
-1886(pinned)X
-1 f
-2145(to)X
-2232(ensure)X
-2466(that)X
-2610(they)X
-2772(are)X
-2895(not)X
-3021(written)X
-3272(to)X
-3358(disk)X
-3515(while)X
-3717(they)X
-3879(are)X
-4002(in)X
-4088(a)X
-4148(logi-)X
-555 5191(cally)N
-732(inconsistent)X
-1135(state.)X
-1343(When)X
-1556(page)X
-1729(replacement)X
-2143(is)X
-2217(necessary,)X
-2571(the)X
-3 f
-2689(Buffer)X
-2932(Manager)X
-1 f
-3264(\256nds)X
-3439(an)X
-3535(unpinned)X
-3853(page)X
-4025(and)X
-4161(then)X
-555 5281(checks)N
-794(with)X
-956(the)X
-3 f
-1074(Log)X
-1227(Manager)X
-1 f
-1559(to)X
-1641(ensure)X
-1871(that)X
-2011(the)X
-2129(write-ahead)X
-2529(protocol)X
-2816(is)X
-2889(enforced.)X
-3 f
-555 5467(3.2.3.)N
-775(The)X
-928(Lock)X
-1121(Manager)X
-1 f
-755 5590(The)N
-3 f
-901(Lock)X
-1095(Manager)X
-1 f
-1428(supports)X
-1720(general)X
-1978(purpose)X
-2253(locking)X
-2514(\(single)X
-2753(writer,)X
-2986(multiple)X
-3273(readers\))X
-3553(which)X
-3769(is)X
-3842(currently)X
-4152(used)X
-555 5680(to)N
-638(provide)X
-904(two-phase)X
-1254(locking)X
-1514(and)X
-1650(high)X
-1812(concurrency)X
-2230(B-tree)X
-2451(locking.)X
-2751(However,)X
-3086(the)X
-3204(general)X
-3461(purpose)X
-3735(nature)X
-3956(of)X
-4043(the)X
-4161(lock)X
-
-6 p
-%%Page: 6 6
-10 s 10 xH 0 xS 1 f
-3 f
-1 f
-555 630(manager)N
-857(provides)X
-1158(the)X
-1281(ability)X
-1510(to)X
-1597(support)X
-1862(a)X
-1923(variety)X
-2171(of)X
-2263(locking)X
-2528(protocols.)X
-2890(Currently,)X
-3241(all)X
-3345(locks)X
-3538(are)X
-3661(issued)X
-3885(at)X
-3967(the)X
-4089(granu-)X
-555 720(larity)N
-747(of)X
-837(a)X
-896(page)X
-1071(\(the)X
-1219(size)X
-1367(of)X
-1457(a)X
-1516(buffer)X
-1736(in)X
-1821(the)X
-1942(buffer)X
-2161(pool\))X
-2352(which)X
-2570(is)X
-2645(identi\256ed)X
-2969(by)X
-3071(two)X
-3213(4-byte)X
-3440(integers)X
-3716(\(a)X
-3801(\256le)X
-3925(id)X
-4009(and)X
-4147(page)X
-555 810(number\).)N
-898(This)X
-1071(provides)X
-1378(the)X
-1507(necessary)X
-1851(information)X
-2259(to)X
-2351(extend)X
-2595(the)X
-3 f
-2723(Lock)X
-2926(Manager)X
-1 f
-3268(to)X
-3360(perform)X
-3649(hierarchical)X
-4059(locking)X
-555 900([GRAY76].)N
-982(The)X
-1133(current)X
-1387(implementation)X
-1915(does)X
-2088(not)X
-2216(support)X
-2482(locks)X
-2677(at)X
-2760(other)X
-2950(granularities)X
-3376(and)X
-3517(does)X
-3689(not)X
-3816(promote)X
-4108(locks;)X
-555 990(these)N
-740(are)X
-859(obvious)X
-1132(future)X
-1344(additions)X
-1657(to)X
-1739(the)X
-1857(system.)X
-755 1113(If)N
-831(an)X
-929(incoming)X
-1253(lock)X
-1413(request)X
-1667(cannot)X
-1903(be)X
-2001(granted,)X
-2284(the)X
-2404(requesting)X
-2760(process)X
-3023(is)X
-3098(queued)X
-3352(for)X
-3467(the)X
-3586(lock)X
-3745(and)X
-3882(descheduled.)X
-555 1203(When)N
-769(a)X
-827(lock)X
-987(is)X
-1062(released,)X
-1368(the)X
-1488(wait)X
-1647(queue)X
-1860(is)X
-1934(traversed)X
-2250(and)X
-2387(any)X
-2524(newly)X
-2741(compatible)X
-3118(locks)X
-3308(are)X
-3428(granted.)X
-3730(Locks)X
-3947(are)X
-4067(located)X
-555 1293(via)N
-680(a)X
-743(\256le)X
-872(and)X
-1015(page)X
-1194(hash)X
-1368(table)X
-1551(and)X
-1694(are)X
-1820(chained)X
-2097(both)X
-2266(by)X
-2373(object)X
-2595(and)X
-2737(by)X
-2843(transaction,)X
-3241(facilitating)X
-3614(rapid)X
-3805(traversal)X
-4108(of)X
-4201(the)X
-555 1383(lock)N
-713(table)X
-889(during)X
-1118(transaction)X
-1490(commit)X
-1754(and)X
-1890(abort.)X
-755 1506(The)N
-907(primary)X
-1188(interfaces)X
-1528(to)X
-1617(the)X
-1742(lock)X
-1907(manager)X
-2211(are)X
-2 f
-2337(lock)X
-1 f
-2471(,)X
-2 f
-2518(unlock)X
-1 f
-2732(,)X
-2779(and)X
-2 f
-2922(lock_unlock_all)X
-1 f
-3434(.)X
-2 f
-3500(Lock)X
-1 f
-3682(obtains)X
-3939(a)X
-4001(new)X
-4161(lock)X
-555 1596(for)N
-680(a)X
-747(speci\256c)X
-1023(object.)X
-1290(There)X
-1509(are)X
-1638(also)X
-1797(two)X
-1947(variants)X
-2231(of)X
-2328(the)X
-2 f
-2456(lock)X
-1 f
-2620(request,)X
-2 f
-2902(lock_upgrade)X
-1 f
-3373(and)X
-2 f
-3519(lock_downgrade)X
-1 f
-4053(,)X
-4103(which)X
-555 1686(allow)N
-755(the)X
-875(caller)X
-1076(to)X
-1160(atomically)X
-1519(trade)X
-1701(a)X
-1758(lock)X
-1917(of)X
-2005(one)X
-2142(type)X
-2301(for)X
-2416(a)X
-2473(lock)X
-2632(of)X
-2720(another.)X
-2 f
-3022(Unlock)X
-1 f
-3275(releases)X
-3551(a)X
-3608(speci\256c)X
-3874(mode)X
-4073(of)X
-4161(lock)X
-555 1776(on)N
-655(a)X
-711(speci\256c)X
-976(object.)X
-2 f
-1232(Lock_unlock_all)X
-1 f
-1786(releases)X
-2061(all)X
-2161(the)X
-2279(locks)X
-2468(associated)X
-2818(with)X
-2980(a)X
-3036(speci\256c)X
-3301(transaction.)X
-3 f
-555 1962(3.2.4.)N
-775(The)X
-928(Process)X
-1207(Manager)X
-1 f
-755 2085(The)N
-3 f
-900(Process)X
-1179(Manager)X
-1 f
-1511(acts)X
-1656(as)X
-1743(a)X
-1799(user-level)X
-2136(scheduler)X
-2464(to)X
-2546(make)X
-2740(processes)X
-3068(wait)X
-3226(on)X
-3326(unavailable)X
-3716(locks)X
-3905(and)X
-4041(pending)X
-555 2175(buffer)N
-778(cache)X
-988(I/O.)X
-1161(For)X
-1297(each)X
-1470(process,)X
-1756(a)X
-1817(semaphore)X
-2190(is)X
-2268(maintained)X
-2649(upon)X
-2834(which)X
-3055(that)X
-3200(process)X
-3466(waits)X
-3660(when)X
-3859(it)X
-3928(needs)X
-4136(to)X
-4223(be)X
-555 2265(descheduled.)N
-1014(When)X
-1228(a)X
-1286(process)X
-1549(needs)X
-1754(to)X
-1838(be)X
-1936(run,)X
-2084(its)X
-2180(semaphore)X
-2549(is)X
-2623(cleared,)X
-2897(and)X
-3034(the)X
-3153(operating)X
-3477(system)X
-3720(reschedules)X
-4116(it.)X
-4201(No)X
-555 2355(sophisticated)N
-1002(scheduling)X
-1378(algorithm)X
-1718(is)X
-1799(applied;)X
-2085(if)X
-2162(the)X
-2288(lock)X
-2454(for)X
-2576(which)X
-2800(a)X
-2864(process)X
-3133(was)X
-3286(waiting)X
-3554(becomes)X
-3863(available,)X
-4201(the)X
-555 2445(process)N
-824(is)X
-905(made)X
-1107(runnable.)X
-1456(It)X
-1533(would)X
-1761(have)X
-1941(been)X
-2121(possible)X
-2411(to)X
-2501(change)X
-2757(the)X
-2883(kernel's)X
-3170(process)X
-3439(scheduler)X
-3775(to)X
-3865(interact)X
-4134(more)X
-555 2535(ef\256ciently)N
-900(with)X
-1062(the)X
-1180(lock)X
-1338(manager,)X
-1655(but)X
-1777(doing)X
-1979(so)X
-2070(would)X
-2290(have)X
-2462(compromised)X
-2918(our)X
-3045(commitment)X
-3469(to)X
-3551(a)X
-3607(user-level)X
-3944(package.)X
-3 f
-555 2721(3.2.5.)N
-775(The)X
-928(Transaction)X
-1361(Manager)X
-1 f
-755 2844(The)N
-3 f
-901(Transaction)X
-1335(Manager)X
-1 f
-1668(provides)X
-1965(the)X
-2084(standard)X
-2377(interface)X
-2680(of)X
-2 f
-2768(txn_begin)X
-1 f
-3084(,)X
-2 f
-3125(txn_commit)X
-1 f
-3499(,)X
-3540(and)X
-2 f
-3676(txn_abort)X
-1 f
-3987(.)X
-4047(It)X
-4116(keeps)X
-555 2934(track)N
-742(of)X
-835(all)X
-941(active)X
-1159(transactions,)X
-1588(assigns)X
-1845(unique)X
-2089(transaction)X
-2467(identi\256ers,)X
-2833(and)X
-2974(directs)X
-3213(the)X
-3336(abort)X
-3526(and)X
-3667(commit)X
-3936(processing.)X
-555 3024(When)N
-772(a)X
-2 f
-833(txn_begin)X
-1 f
-1174(is)X
-1252(issued,)X
-1497(the)X
-3 f
-1620(Transaction)X
-2058(Manager)X
-1 f
-2395(assigns)X
-2651(the)X
-2773(next)X
-2935(available)X
-3249(transaction)X
-3625(identi\256er,)X
-3958(allocates)X
-4263(a)X
-555 3114(per-process)N
-948(transaction)X
-1322(structure)X
-1625(in)X
-1709(shared)X
-1941(memory,)X
-2249(increments)X
-2622(the)X
-2741(count)X
-2940(of)X
-3028(active)X
-3241(transactions,)X
-3665(and)X
-3802(returns)X
-4046(the)X
-4165(new)X
-555 3204(transaction)N
-937(identi\256er)X
-1256(to)X
-1348(the)X
-1476(calling)X
-1724(process.)X
-2034(The)X
-2188(in-memory)X
-2573(transaction)X
-2954(structure)X
-3264(contains)X
-3560(a)X
-3625(pointer)X
-3881(into)X
-4034(the)X
-4161(lock)X
-555 3294(table)N
-734(for)X
-851(locks)X
-1043(held)X
-1204(by)X
-1307(this)X
-1445(transaction,)X
-1840(the)X
-1961(last)X
-2095(log)X
-2220(sequence)X
-2538(number,)X
-2826(a)X
-2885(transaction)X
-3260(state)X
-3430(\()X
-2 f
-3457(idle)X
-1 f
-(,)S
-2 f
-3620(running)X
-1 f
-3873(,)X
-2 f
-3915(aborting)X
-1 f
-4190(,)X
-4232(or)X
-2 f
-555 3384(committing\))N
-1 f
-942(,)X
-982(an)X
-1078(error)X
-1255(code,)X
-1447(and)X
-1583(a)X
-1639(semaphore)X
-2007(identi\256er.)X
-755 3507(At)N
-859(commit,)X
-1147(the)X
-3 f
-1269(Transaction)X
-1706(Manager)X
-1 f
-2042(calls)X
-2 f
-2213(log_commit)X
-1 f
-2615(to)X
-2700(record)X
-2929(the)X
-3050(end)X
-3189(of)X
-3279(transaction)X
-3654(and)X
-3793(to)X
-3878(\257ush)X
-4056(the)X
-4177(log.)X
-555 3597(Then)N
-743(it)X
-810(directs)X
-1047(the)X
-3 f
-1168(Lock)X
-1364(Manager)X
-1 f
-1699(to)X
-1784(release)X
-2031(all)X
-2134(locks)X
-2325(associated)X
-2677(with)X
-2841(the)X
-2961(given)X
-3161(transaction.)X
-3575(If)X
-3651(a)X
-3709(transaction)X
-4083(aborts,)X
-555 3687(the)N
-3 f
-680(Transaction)X
-1120(Manager)X
-1 f
-1459(calls)X
-1633(on)X
-2 f
-1739(log_unroll)X
-1 f
-2102(to)X
-2190(read)X
-2355(the)X
-2479(transaction's)X
-2915(log)X
-3043(records)X
-3306(and)X
-3448(undo)X
-3634(any)X
-3776(modi\256cations)X
-4237(to)X
-555 3777(the)N
-673(database.)X
-1010(As)X
-1119(in)X
-1201(the)X
-1319(commit)X
-1583(case,)X
-1762(it)X
-1826(then)X
-1984(calls)X
-2 f
-2151(lock_unlock_all)X
-1 f
-2683(to)X
-2765(release)X
-3009(the)X
-3127(transaction's)X
-3557(locks.)X
-3 f
-555 3963(3.2.6.)N
-775(The)X
-928(Record)X
-1198(Manager)X
-1 f
-755 4086(The)N
-3 f
-919(Record)X
-1208(Manager)X
-1 f
-1559(supports)X
-1869(the)X
-2006(abstraction)X
-2397(of)X
-2503(reading)X
-2783(and)X
-2938(writing)X
-3208(records)X
-3484(to)X
-3585(a)X
-3660(database.)X
-3996(We)X
-4147(have)X
-555 4176(modi\256ed)N
-861(the)X
-981(the)X
-1101(database)X
-1399(access)X
-1626(routines)X
-3 f
-1905(db)X
-1 f
-1993(\(3\))X
-2108([BSD91])X
-2418(to)X
-2501(call)X
-2638(the)X
-2757(log,)X
-2900(lock,)X
-3079(and)X
-3216(buffer)X
-3434(managers.)X
-3803(In)X
-3891(order)X
-4082(to)X
-4165(pro-)X
-555 4266(vide)N
-718(functionality)X
-1152(to)X
-1239(perform)X
-1523(undo)X
-1708(and)X
-1849(redo,)X
-2037(the)X
-3 f
-2160(Record)X
-2434(Manager)X
-1 f
-2770(de\256nes)X
-3021(a)X
-3081(collection)X
-3421(of)X
-3512(log)X
-3638(record)X
-3868(types)X
-4061(and)X
-4201(the)X
-555 4356(associated)N
-920(undo)X
-1115(and)X
-1266(redo)X
-1444(routines.)X
-1777(The)X
-3 f
-1937(Log)X
-2105(Manager)X
-1 f
-2452(performs)X
-2777(a)X
-2848(table)X
-3039(lookup)X
-3296(on)X
-3411(the)X
-3543(record)X
-3783(type)X
-3955(to)X
-4051(call)X
-4201(the)X
-555 4446(appropriate)N
-951(routines.)X
-1299(For)X
-1440(example,)X
-1762(the)X
-1890(B-tree)X
-2121(access)X
-2356(method)X
-2625(requires)X
-2913(two)X
-3062(log)X
-3193(record)X
-3428(types:)X
-3648(insert)X
-3855(and)X
-4000(delete.)X
-4241(A)X
-555 4536(replace)N
-808(operation)X
-1131(is)X
-1204(implemented)X
-1642(as)X
-1729(a)X
-1785(delete)X
-1997(followed)X
-2302(by)X
-2402(an)X
-2498(insert)X
-2696(and)X
-2832(is)X
-2905(logged)X
-3143(accordingly.)X
-3 f
-555 4722(3.3.)N
-715(Application)X
-1134(Architectures)X
-1 f
-755 4845(The)N
-907(structure)X
-1215(of)X
-1309(LIBTP)X
-1558(allows)X
-1794(application)X
-2177(designers)X
-2507(to)X
-2596(trade)X
-2784(off)X
-2905(performance)X
-3339(and)X
-3481(protection.)X
-3872(Since)X
-4076(a)X
-4138(large)X
-555 4935(portion)N
-810(of)X
-901(LIBTP's)X
-1205(functionality)X
-1638(is)X
-1715(provided)X
-2024(by)X
-2128(managing)X
-2468(structures)X
-2804(in)X
-2889(shared)X
-3122(memory,)X
-3432(its)X
-3530(structures)X
-3865(are)X
-3987(subject)X
-4237(to)X
-555 5025(corruption)N
-926(by)X
-1043(applications)X
-1467(when)X
-1678(the)X
-1813(library)X
-2064(is)X
-2154(linked)X
-2391(directly)X
-2673(with)X
-2852(the)X
-2987(application.)X
-3420(For)X
-3568(this)X
-3720(reason,)X
-3987(LIBTP)X
-4246(is)X
-555 5115(designed)N
-864(to)X
-950(allow)X
-1152(compilation)X
-1558(into)X
-1706(a)X
-1766(separate)X
-2053(server)X
-2273(process)X
-2537(which)X
-2756(may)X
-2917(be)X
-3016(accessed)X
-3321(via)X
-3442(a)X
-3501(socket)X
-3729(interface.)X
-4094(In)X
-4184(this)X
-555 5205(way)N
-712(LIBTP's)X
-1015(data)X
-1172(structures)X
-1507(are)X
-1629(protected)X
-1951(from)X
-2130(application)X
-2509(code,)X
-2704(but)X
-2829(communication)X
-3349(overhead)X
-3666(is)X
-3741(increased.)X
-4107(When)X
-555 5295(applications)N
-975(are)X
-1107(trusted,)X
-1377(LIBTP)X
-1631(may)X
-1801(be)X
-1909(compiled)X
-2239(directly)X
-2516(into)X
-2672(the)X
-2802(application)X
-3190(providing)X
-3533(improved)X
-3872(performance.)X
-555 5385(Figures)N
-815(two)X
-955(and)X
-1091(three)X
-1272(show)X
-1461(the)X
-1579(two)X
-1719(alternate)X
-2016(application)X
-2392(architectures.)X
-755 5508(There)N
-964(are)X
-1084(potentially)X
-1447(two)X
-1588(modes)X
-1818(in)X
-1901(which)X
-2118(one)X
-2255(might)X
-2462(use)X
-2590(LIBTP)X
-2833(in)X
-2916(a)X
-2972(server)X
-3189(based)X
-3392(architecture.)X
-3832(In)X
-3919(the)X
-4037(\256rst,)X
-4201(the)X
-555 5598(server)N
-778(would)X
-1004(provide)X
-1275(the)X
-1399(capability)X
-1741(to)X
-1829(respond)X
-2109(to)X
-2197(requests)X
-2486(to)X
-2574(each)X
-2747(of)X
-2839(the)X
-2962(low)X
-3107(level)X
-3288(modules)X
-3584(\(lock,)X
-3794(log,)X
-3941(buffer,)X
-4183(and)X
-555 5688(transaction)N
-944(managers\).)X
-1356(Unfortunately,)X
-1863(the)X
-1998(performance)X
-2442(of)X
-2546(such)X
-2730(a)X
-2803(system)X
-3062(is)X
-3152(likely)X
-3371(to)X
-3470(be)X
-3583(blindingly)X
-3947(slow)X
-4134(since)X
-
-7 p
-%%Page: 7 7
-10 s 10 xH 0 xS 1 f
-3 f
-1 f
-1 Dt
-1864 1125 MXY
-15 -26 Dl
--15 10 Dl
--14 -10 Dl
-14 26 Dl
-0 -266 Dl
-1315 1125 MXY
-15 -26 Dl
--15 10 Dl
--14 -10 Dl
-14 26 Dl
-0 -266 Dl
-3 Dt
-1133 1125 MXY
-0 798 Dl
-931 0 Dl
-0 -798 Dl
--931 0 Dl
-1 Dt
-1266 1257 MXY
-0 133 Dl
-665 0 Dl
-0 -133 Dl
--665 0 Dl
-3 f
-8 s
-1513 1351(driver)N
-1502 1617(LIBTP)N
-1266 1390 MXY
-0 400 Dl
-665 0 Dl
-0 -400 Dl
--665 0 Dl
-3 Dt
-1133 726 MXY
-0 133 Dl
-931 0 Dl
-0 -133 Dl
--931 0 Dl
-1 f
-1029 1098(txn_abort)N
-964 1015(txn_commit)N
-1018 932(txn_begin)N
-1910 1015(db_ops)N
-3 f
-1308 820(Application)N
-1645(Program)X
-1398 1218(Server)N
-1594(Process)X
-1 f
-1390 986(socket)N
-1569(interface)X
-1 Dt
-1848 967 MXY
--23 -14 Dl
-8 14 Dl
--8 15 Dl
-23 -15 Dl
--50 0 Dl
-1324 MX
-23 15 Dl
--9 -15 Dl
-9 -14 Dl
--23 14 Dl
-50 0 Dl
-3 Dt
-2862 859 MXY
-0 1064 Dl
-932 0 Dl
-0 -1064 Dl
--932 0 Dl
-1 Dt
-3178 1390 MXY
-24 -12 Dl
--17 0 Dl
--8 -15 Dl
-1 27 Dl
-150 -265 Dl
-3494 1390 MXY
-0 -27 Dl
--8 15 Dl
--16 1 Dl
-24 11 Dl
--166 -265 Dl
-3 f
-3232 1617(LIBTP)N
-2995 1390 MXY
-0 400 Dl
-666 0 Dl
-0 -400 Dl
--666 0 Dl
-992 MY
-0 133 Dl
-666 0 Dl
-0 -133 Dl
--666 0 Dl
-3168 1086(Application)N
-1 f
-2939 1201(txn_begin)N
-2885 1284(txn_commit)N
-2950 1368(txn_abort)N
-3465 1284(db_ops)N
-3 f
-3155 766(Single)N
-3339(Process)X
-3 Dt
--1 Ds
-811 2100(Figure)N
-1023(2:)X
-1107(Server)X
-1318(Architecture.)X
-1 f
-1727(In)X
-1811(this)X
-1934(con\256guration,)X
-811 2190(the)N
-916(library)X
-1113(is)X
-1183(loaded)X
-1380(into)X
-1507(a)X
-1562(server)X
-1744(process)X
-1962(which)X
-2145(is)X
-2214(ac-)X
-811 2280(cessed)N
-993(via)X
-1087(a)X
-1131(socket)X
-1310(interface.)X
-3 f
-2563 2100(Figure)N
-2803(3:)X
-2914(Single)X
-3140(Process)X
-3403(Architecture.)X
-1 f
-3839(In)X
-3950(this)X
-2563 2190(con\256guration,)N
-2948(the)X
-3053(library)X
-3250(routines)X
-3483(are)X
-3587(loaded)X
-3784(as)X
-3864(part)X
-3990(of)X
-2563 2280(the)N
-2657(application)X
-2957(and)X
-3065(accessed)X
-3303(via)X
-3397(a)X
-3441(subroutine)X
-3727(interface.)X
-10 s
-10 f
-555 2403(h)N
-579(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)X
-1 f
-555 2679(modifying)N
-909(a)X
-966(piece)X
-1157(of)X
-1245(data)X
-1400(would)X
-1621(require)X
-1870(three)X
-2051(or)X
-2138(possibly)X
-2424(four)X
-2578(separate)X
-2862(communications:)X
-3433(one)X
-3569(to)X
-3651(lock)X
-3809(the)X
-3927(data,)X
-4101(one)X
-4237(to)X
-555 2769(obtain)N
-781(the)X
-905(data,)X
-1085(one)X
-1227(to)X
-1315(log)X
-1443(the)X
-1567(modi\256cation,)X
-2017(and)X
-2159(possibly)X
-2451(one)X
-2593(to)X
-2681(transmit)X
-2969(the)X
-3093(modi\256ed)X
-3403(data.)X
-3583(Figure)X
-3817(four)X
-3976(shows)X
-4201(the)X
-555 2859(relative)N
-826(performance)X
-1263(for)X
-1387(retrieving)X
-1728(a)X
-1793(single)X
-2013(record)X
-2248(using)X
-2450(the)X
-2577(record)X
-2812(level)X
-2997(call)X
-3142(versus)X
-3376(using)X
-3578(the)X
-3705(lower)X
-3917(level)X
-4102(buffer)X
-555 2949(management)N
-987(and)X
-1125(locking)X
-1387(calls.)X
-1616(The)X
-1763(2:1)X
-1887(ratio)X
-2056(observed)X
-2367(in)X
-2450(the)X
-2569(single)X
-2781(process)X
-3043(case)X
-3203(re\257ects)X
-3456(the)X
-3575(additional)X
-3916(overhead)X
-4232(of)X
-555 3039(parsing)N
-819(eight)X
-1006(commands)X
-1380(rather)X
-1595(than)X
-1760(one)X
-1903(while)X
-2108(the)X
-2233(3:1)X
-2362(ratio)X
-2536(observed)X
-2853(in)X
-2942(the)X
-3067(client/server)X
-3491(architecture)X
-3898(re\257ects)X
-4157(both)X
-555 3129(the)N
-679(parsing)X
-941(and)X
-1083(the)X
-1207(communication)X
-1731(overheard.)X
-2118(Although)X
-2445(there)X
-2631(may)X
-2794(be)X
-2895(applications)X
-3307(which)X
-3528(could)X
-3731(tolerate)X
-3997(such)X
-4169(per-)X
-555 3219(formance,)N
-904(it)X
-973(seems)X
-1194(far)X
-1309(more)X
-1499(feasible)X
-1774(to)X
-1861(support)X
-2126(a)X
-2187(higher)X
-2417(level)X
-2597(interface,)X
-2923(such)X
-3094(as)X
-3185(that)X
-3329(provided)X
-3638(by)X
-3742(a)X
-3802(query)X
-4009(language)X
-555 3309(\()N
-2 f
-582(e.g.)X
-1 f
-718(SQL)X
-889([SQL86]\).)X
-755 3432(Although)N
-1081(LIBTP)X
-1327(does)X
-1498(not)X
-1624(have)X
-1800(an)X
-1900(SQL)X
-2075(parser,)X
-2316(we)X
-2433(have)X
-2608(built)X
-2777(a)X
-2836(server)X
-3056(application)X
-3435(using)X
-3631(the)X
-3752(toolkit)X
-3983(command)X
-555 3522(language)N
-882(\(TCL\))X
-1124([OUST90].)X
-1544(The)X
-1706(server)X
-1940(supports)X
-2248(a)X
-2321(command)X
-2674(line)X
-2831(interface)X
-3150(similar)X
-3409(to)X
-3508(the)X
-3643(subroutine)X
-4017(interface)X
-555 3612(de\256ned)N
-811(in)X
-3 f
-893(db)X
-1 f
-981(\(3\).)X
-1135(Since)X
-1333(it)X
-1397(is)X
-1470(based)X
-1673(on)X
-1773(TCL,)X
-1964(it)X
-2028(provides)X
-2324(control)X
-2571(structures)X
-2903(as)X
-2990(well.)X
-3 f
-555 3798(4.)N
-655(Implementation)X
-1 f
-3 f
-555 3984(4.1.)N
-715(Locking)X
-1014(and)X
-1162(Deadlock)X
-1502(Detection)X
-1 f
-755 4107(LIBTP)N
-1007(uses)X
-1175(two-phase)X
-1535(locking)X
-1805(for)X
-1929(user)X
-2093(data.)X
-2297(Strictly)X
-2562(speaking,)X
-2897(the)X
-3024(two)X
-3173(phases)X
-3416(in)X
-3507(two-phase)X
-3866(locking)X
-4135(are)X
-4263(a)X
-3 f
-555 4197(grow)N
-1 f
-756(phase,)X
-986(during)X
-1221(which)X
-1443(locks)X
-1638(are)X
-1763(acquired,)X
-2086(and)X
-2228(a)X
-3 f
-2290(shrink)X
-1 f
-2537(phase,)X
-2766(during)X
-3001(which)X
-3223(locks)X
-3418(are)X
-3543(released.)X
-3873(No)X
-3997(lock)X
-4161(may)X
-555 4287(ever)N
-720(be)X
-822(acquired)X
-1124(during)X
-1358(the)X
-1481(shrink)X
-1706(phase.)X
-1954(The)X
-2104(grow)X
-2294(phase)X
-2502(lasts)X
-2669(until)X
-2840(the)X
-2963(\256rst)X
-3112(release,)X
-3381(which)X
-3602(marks)X
-3823(the)X
-3946(start)X
-4109(of)X
-4201(the)X
-555 4377(shrink)N
-780(phase.)X
-1028(In)X
-1120(practice,)X
-1420(the)X
-1543(grow)X
-1733(phase)X
-1941(lasts)X
-2108(for)X
-2227(the)X
-2350(duration)X
-2642(of)X
-2734(a)X
-2795(transaction)X
-3172(in)X
-3259(LIBTP)X
-3506(and)X
-3647(in)X
-3734(commercial)X
-4138(data-)X
-555 4467(base)N
-721(systems.)X
-1037(The)X
-1184(shrink)X
-1406(phase)X
-1611(takes)X
-1798(place)X
-1990(during)X
-2221(transaction)X
-2595(commit)X
-2861(or)X
-2950(abort.)X
-3177(This)X
-3341(means)X
-3568(that)X
-3710(locks)X
-3901(are)X
-4022(acquired)X
-555 4557(on)N
-655(demand)X
-929(during)X
-1158(the)X
-1276(lifetime)X
-1545(of)X
-1632(a)X
-1688(transaction,)X
-2080(and)X
-2216(held)X
-2374(until)X
-2540(commit)X
-2804(time,)X
-2986(at)X
-3064(which)X
-3280(point)X
-3464(all)X
-3564(locks)X
-3753(are)X
-3872(released.)X
-755 4680(If)N
-832(multiple)X
-1121(transactions)X
-1527(are)X
-1649(active)X
-1864(concurrently,)X
-2313(deadlocks)X
-2657(can)X
-2792(occur)X
-2994(and)X
-3133(must)X
-3311(be)X
-3410(detected)X
-3701(and)X
-3840(resolved.)X
-4174(The)X
-555 4770(lock)N
-715(table)X
-893(can)X
-1027(be)X
-1125(thought)X
-1391(of)X
-1480(as)X
-1569(a)X
-1627(representation)X
-2104(of)X
-2193(a)X
-2251(directed)X
-2532(graph.)X
-2777(The)X
-2924(nodes)X
-3133(in)X
-3216(the)X
-3335(graph)X
-3539(are)X
-3659(transactions.)X
-4103(Edges)X
-555 4860(represent)N
-878(the)X
-3 f
-1004(waits-for)X
-1 f
-1340(relation)X
-1613(between)X
-1909(transactions;)X
-2342(if)X
-2419(transaction)X
-2 f
-2799(A)X
-1 f
-2876(is)X
-2957(waiting)X
-3225(for)X
-3347(a)X
-3411(lock)X
-3577(held)X
-3743(by)X
-3851(transaction)X
-2 f
-4230(B)X
-1 f
-4279(,)X
-555 4950(then)N
-716(a)X
-775(directed)X
-1057(edge)X
-1232(exists)X
-1437(from)X
-2 f
-1616(A)X
-1 f
-1687(to)X
-2 f
-1771(B)X
-1 f
-1842(in)X
-1926(the)X
-2046(graph.)X
-2291(A)X
-2371(deadlock)X
-2683(exists)X
-2887(if)X
-2958(a)X
-3016(cycle)X
-3208(appears)X
-3476(in)X
-3560(the)X
-3680(graph.)X
-3925(By)X
-4040(conven-)X
-555 5040(tion,)N
-719(no)X
-819(transaction)X
-1191(ever)X
-1350(waits)X
-1539(for)X
-1653(a)X
-1709(lock)X
-1867(it)X
-1931(already)X
-2188(holds,)X
-2401(so)X
-2492(re\257exive)X
-2793(edges)X
-2996(are)X
-3115(impossible.)X
-755 5163(A)N
-836(distinguished)X
-1285(process)X
-1549(monitors)X
-1856(the)X
-1977(lock)X
-2138(table,)X
-2337(searching)X
-2668(for)X
-2785(cycles.)X
-3048(The)X
-3195(frequency)X
-3539(with)X
-3703(which)X
-3921(this)X
-4058(process)X
-555 5253(runs)N
-716(is)X
-792(user-settable;)X
-1243(for)X
-1360(the)X
-1481(multi-user)X
-1833(tests)X
-1998(discussed)X
-2328(in)X
-2413(section)X
-2663(5.1.2,)X
-2866(it)X
-2933(has)X
-3063(been)X
-3238(set)X
-3350(to)X
-3435(wake)X
-3628(up)X
-3731(every)X
-3932(second,)X
-4197(but)X
-555 5343(more)N
-742(sophisticated)X
-1182(schedules)X
-1516(are)X
-1636(certainly)X
-1938(possible.)X
-2261(When)X
-2474(a)X
-2531(cycle)X
-2722(is)X
-2796(detected,)X
-3105(one)X
-3242(of)X
-3330(the)X
-3449(transactions)X
-3853(in)X
-3936(the)X
-4055(cycle)X
-4246(is)X
-555 5433(nominated)N
-917(and)X
-1057(aborted.)X
-1362(When)X
-1578(the)X
-1700(transaction)X
-2076(aborts,)X
-2315(it)X
-2382(rolls)X
-2547(back)X
-2722(its)X
-2820(changes)X
-3102(and)X
-3241(releases)X
-3519(its)X
-3617(locks,)X
-3829(thereby)X
-4093(break-)X
-555 5523(ing)N
-677(the)X
-795(cycle)X
-985(in)X
-1067(the)X
-1185(graph.)X
-
-8 p
-%%Page: 8 8
-10 s 10 xH 0 xS 1 f
-3 f
-1 f
-4 Ds
-1 Dt
-1866 865 MXY
-1338 0 Dl
-1866 1031 MXY
-1338 0 Dl
-1866 1199 MXY
-1338 0 Dl
-1866 1366 MXY
-1338 0 Dl
-1866 1533 MXY
-1338 0 Dl
-1866 1701 MXY
-1338 0 Dl
--1 Ds
-5 Dt
-1866 1868 MXY
-1338 0 Dl
-1 Dt
-1 Di
-2981 MX
- 2981 1868 lineto
- 2981 1575 lineto
- 3092 1575 lineto
- 3092 1868 lineto
- 2981 1868 lineto
-closepath 21 2981 1575 3092 1868 Dp
-2646 MX
- 2646 1868 lineto
- 2646 949 lineto
- 2758 949 lineto
- 2758 1868 lineto
- 2646 1868 lineto
-closepath 14 2646 949 2758 1868 Dp
-2312 MX
- 2312 1868 lineto
- 2312 1701 lineto
- 2423 1701 lineto
- 2423 1868 lineto
- 2312 1868 lineto
-closepath 3 2312 1701 2423 1868 Dp
-1977 MX
- 1977 1868 lineto
- 1977 1512 lineto
- 2089 1512 lineto
- 2089 1868 lineto
- 1977 1868 lineto
-closepath 19 1977 1512 2089 1868 Dp
-3 f
-2640 2047(Client/Server)N
-1957(Single)X
-2185(Process)X
-7 s
-2957 1957(record)N
-2570(component)X
-2289(record)X
-1890(components)X
-1733 1724(.1)N
-1733 1556(.2)N
-1733 1389(.3)N
-1733 1222(.4)N
-1733 1055(.5)N
-1733 889(.6)N
-1590 726(Elapsed)N
-1794(Time)X
-1613 782(\(in)N
-1693(seconds\))X
-3 Dt
--1 Ds
-8 s
-555 2255(Figure)N
-756(4:)X
-829(Comparison)X
-1187(of)X
-1260(High)X
-1416(and)X
-1540(Low)X
-1681(Level)X
-1850(Interfaces.)X
-1 f
-2174(Elapsed)X
-2395(time)X
-2528(in)X
-2597(seconds)X
-2818(to)X
-2887(perform)X
-3111(a)X
-3158(single)X
-3330(record)X
-3511(retrieval)X
-3742(from)X
-3885(a)X
-3932(command)X
-4203(line)X
-555 2345(\(rather)N
-751(than)X
-888(a)X
-943(procedural)X
-1241(interface\))X
-1510(is)X
-1579(shown)X
-1772(on)X
-1862(the)X
-1966(y)X
-2024(axis.)X
-2185(The)X
-2310(``component'')X
-2704(numbers)X
-2950(re\257ect)X
-3135(the)X
-3239(timings)X
-3458(when)X
-3622(the)X
-3726(record)X
-3914(is)X
-3983(retrieved)X
-4235(by)X
-555 2435(separate)N
-785(calls)X
-924(to)X
-996(the)X
-1096(lock)X
-1228(manager)X
-1469(and)X
-1583(buffer)X
-1760(manager)X
-2001(while)X
-2165(the)X
-2264(``record'')X
-2531(timings)X
-2745(were)X
-2889(obtained)X
-3130(by)X
-3215(using)X
-3375(a)X
-3424(single)X
-3598(call)X
-3711(to)X
-3782(the)X
-3881(record)X
-4064(manager.)X
-555 2525(The)N
-674(2:1)X
-776(ratio)X
-913(observed)X
-1163(for)X
-1257(the)X
-1355(single)X
-1528(process)X
-1739(case)X
-1868(is)X
-1930(a)X
-1977(re\257ection)X
-2237(of)X
-2309(the)X
-2406(parsing)X
-2613(overhead)X
-2865(for)X
-2958(executing)X
-3225(eight)X
-3372(separate)X
-3599(commands)X
-3895(rather)X
-4062(than)X
-4191(one.)X
-555 2615(The)N
-673(additional)X
-948(factor)X
-1115(of)X
-1187(one)X
-1298(re\257ected)X
-1536(in)X
-1605(the)X
-1702(3:1)X
-1803(ratio)X
-1939(for)X
-2031(the)X
-2127(client/server)X
-2460(architecture)X
-2794(is)X
-2855(due)X
-2965(to)X
-3033(the)X
-3129(communication)X
-3545(overhead.)X
-3828(The)X
-3945(true)X
-4062(ratios)X
-4222(are)X
-555 2705(actually)N
-775(worse)X
-945(since)X
-1094(the)X
-1190(component)X
-1492(timings)X
-1703(do)X
-1785(not)X
-1884(re\257ect)X
-2060(the)X
-2155(search)X
-2334(times)X
-2490(within)X
-2671(each)X
-2804(page)X
-2941(or)X
-3011(the)X
-3106(time)X
-3237(required)X
-3466(to)X
-3533(transmit)X
-3760(the)X
-3855(page)X
-3992(between)X
-4221(the)X
-555 2795(two)N
-667(processes.)X
-10 s
-10 f
-555 2885(h)N
-579(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)X
-3 f
-555 3161(4.2.)N
-715(Group)X
-961(Commit)X
-1 f
-755 3284(Since)N
-959(the)X
-1083(log)X
-1211(must)X
-1392(be)X
-1494(\257ushed)X
-1751(to)X
-1839(disk)X
-1997(at)X
-2080(commit)X
-2349(time,)X
-2536(disk)X
-2694(bandwidth)X
-3057(fundamentally)X
-3545(limits)X
-3751(the)X
-3874(rate)X
-4020(at)X
-4103(which)X
-555 3374(transactions)N
-959(complete.)X
-1314(Since)X
-1513(most)X
-1688(transactions)X
-2091(write)X
-2276(only)X
-2438(a)X
-2494(few)X
-2635(small)X
-2828(records)X
-3085(to)X
-3167(the)X
-3285(log,)X
-3427(the)X
-3545(last)X
-3676(page)X
-3848(of)X
-3935(the)X
-4053(log)X
-4175(will)X
-555 3464(be)N
-658(\257ushed)X
-916(once)X
-1095(by)X
-1202(every)X
-1408(transaction)X
-1787(which)X
-2010(writes)X
-2233(to)X
-2322(it.)X
-2433(In)X
-2527(the)X
-2652(naive)X
-2853(implementation,)X
-3402(these)X
-3593(\257ushes)X
-3841(would)X
-4067(happen)X
-555 3554(serially.)N
-755 3677(LIBTP)N
-1008(uses)X
-3 f
-1177(group)X
-1412(commit)X
-1 f
-1702([DEWI84])X
-2077(in)X
-2170(order)X
-2371(to)X
-2464(amortize)X
-2775(the)X
-2903(cost)X
-3062(of)X
-3159(one)X
-3305(synchronous)X
-3740(disk)X
-3903(write)X
-4098(across)X
-555 3767(multiple)N
-851(transactions.)X
-1304(Group)X
-1539(commit)X
-1812(provides)X
-2117(a)X
-2182(way)X
-2345(for)X
-2468(a)X
-2533(group)X
-2749(of)X
-2845(transactions)X
-3257(to)X
-3348(commit)X
-3621(simultaneously.)X
-4174(The)X
-555 3857(\256rst)N
-709(several)X
-967(transactions)X
-1380(to)X
-1472(commit)X
-1745(write)X
-1939(their)X
-2115(changes)X
-2403(to)X
-2494(the)X
-2621(in-memory)X
-3006(log)X
-3137(page,)X
-3338(then)X
-3505(sleep)X
-3699(on)X
-3808(a)X
-3873(distinguished)X
-555 3947(semaphore.)N
-966(Later,)X
-1179(a)X
-1238(committing)X
-1629(transaction)X
-2004(\257ushes)X
-2249(the)X
-2370(page)X
-2545(to)X
-2630(disk,)X
-2805(and)X
-2943(wakes)X
-3166(up)X
-3268(all)X
-3370(its)X
-3467(sleeping)X
-3756(peers.)X
-3988(The)X
-4135(point)X
-555 4037(at)N
-635(which)X
-853(changes)X
-1134(are)X
-1255(actually)X
-1531(written)X
-1780(is)X
-1855(determined)X
-2238(by)X
-2340(three)X
-2523(thresholds.)X
-2914(The)X
-3061(\256rst)X
-3207(is)X
-3281(the)X
-2 f
-3400(group)X
-3612(threshold)X
-1 f
-3935(and)X
-4072(de\256nes)X
-555 4127(the)N
-674(minimum)X
-1005(number)X
-1271(of)X
-1359(transactions)X
-1763(which)X
-1979(must)X
-2154(be)X
-2250(active)X
-2462(in)X
-2544(the)X
-2662(system)X
-2904(before)X
-3130(transactions)X
-3533(are)X
-3652(forced)X
-3878(to)X
-3960(participate)X
-555 4217(in)N
-646(a)X
-711(group)X
-927(commit.)X
-1240(The)X
-1394(second)X
-1646(is)X
-1728(the)X
-2 f
-1855(wait)X
-2021(threshold)X
-1 f
-2352(which)X
-2577(is)X
-2658(expressed)X
-3003(as)X
-3098(the)X
-3224(percentage)X
-3601(of)X
-3696(active)X
-3916(transactions)X
-555 4307(waiting)N
-826(to)X
-919(be)X
-1026(committed.)X
-1439(The)X
-1595(last)X
-1737(is)X
-1821(the)X
-2 f
-1950(logdelay)X
-2257(threshold)X
-1 f
-2590(which)X
-2816(indicates)X
-3131(how)X
-3299(much)X
-3507(un\257ushed)X
-3848(log)X
-3980(should)X
-4223(be)X
-555 4397(allowed)N
-829(to)X
-911(accumulate)X
-1297(before)X
-1523(a)X
-1579(waiting)X
-1839(transaction's)X
-2289(commit)X
-2553(record)X
-2779(is)X
-2852(\257ushed.)X
-755 4520(Group)N
-981(commit)X
-1246(can)X
-1379(substantially)X
-1803(improve)X
-2090(performance)X
-2517(for)X
-2631(high-concurrency)X
-3218(environments.)X
-3714(If)X
-3788(only)X
-3950(a)X
-4006(few)X
-4147(tran-)X
-555 4610(sactions)N
-836(are)X
-957(running,)X
-1248(it)X
-1314(is)X
-1389(unlikely)X
-1673(to)X
-1757(improve)X
-2046(things)X
-2263(at)X
-2343(all.)X
-2485(The)X
-2632(crossover)X
-2962(point)X
-3148(is)X
-3223(the)X
-3343(point)X
-3529(at)X
-3609(which)X
-3827(the)X
-3947(transaction)X
-555 4700(commit)N
-823(rate)X
-968(is)X
-1045(limited)X
-1295(by)X
-1399(the)X
-1521(bandwidth)X
-1883(of)X
-1974(the)X
-2096(device)X
-2330(on)X
-2434(which)X
-2654(the)X
-2776(log)X
-2902(resides.)X
-3189(If)X
-3267(processes)X
-3599(are)X
-3722(trying)X
-3937(to)X
-4023(\257ush)X
-4201(the)X
-555 4790(log)N
-677(faster)X
-876(than)X
-1034(the)X
-1152(log)X
-1274(disk)X
-1427(can)X
-1559(accept)X
-1785(data,)X
-1959(then)X
-2117(group)X
-2324(commit)X
-2588(will)X
-2732(increase)X
-3016(the)X
-3134(commit)X
-3398(rate.)X
-3 f
-555 4976(4.3.)N
-715(Kernel)X
-971(Intervention)X
-1418(for)X
-1541(Synchronization)X
-1 f
-755 5099(Since)N
-954(LIBTP)X
-1197(uses)X
-1356(data)X
-1511(in)X
-1594(shared)X
-1825(memory)X
-2113(\()X
-2 f
-2140(e.g.)X
-1 f
-2277(the)X
-2395(lock)X
-2553(table)X
-2729(and)X
-2865(buffer)X
-3082(pool\))X
-3271(it)X
-3335(must)X
-3510(be)X
-3606(possible)X
-3888(for)X
-4002(a)X
-4058(process)X
-555 5189(to)N
-640(acquire)X
-900(exclusive)X
-1226(access)X
-1454(to)X
-1538(shared)X
-1770(data)X
-1926(in)X
-2010(order)X
-2202(to)X
-2286(prevent)X
-2549(corruption.)X
-2945(In)X
-3034(addition,)X
-3338(the)X
-3458(process)X
-3721(manager)X
-4020(must)X
-4197(put)X
-555 5279(processes)N
-886(to)X
-971(sleep)X
-1159(when)X
-1356(the)X
-1477(lock)X
-1638(or)X
-1728(buffer)X
-1948(they)X
-2109(request)X
-2364(is)X
-2440(in)X
-2525(use)X
-2655(by)X
-2758(some)X
-2950(other)X
-3138(process.)X
-3441(In)X
-3530(the)X
-3650(LIBTP)X
-3894(implementa-)X
-555 5385(tion)N
-705(under)X
-914(Ultrix)X
-1131(4.0)X
-7 s
-5353(2)Y
-10 s
-5385(,)Y
-1305(we)X
-1424(use)X
-1556(System)X
-1816(V)X
-1899(semaphores)X
-2303(to)X
-2390(provide)X
-2660(this)X
-2800(synchronization.)X
-3377(Semaphores)X
-3794(implemented)X
-4237(in)X
-555 5475(this)N
-701(fashion)X
-968(turn)X
-1128(out)X
-1261(to)X
-1354(be)X
-1461(an)X
-1568(expensive)X
-1920(choice)X
-2161(for)X
-2285(synchronization,)X
-2847(because)X
-3132(each)X
-3310(access)X
-3546(traps)X
-3732(to)X
-3824(the)X
-3952(kernel)X
-4183(and)X
-8 s
-10 f
-555 5547(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)N
-5 s
-1 f
-727 5625(2)N
-8 s
-763 5650(Ultrix)N
-932(and)X
-1040(DEC)X
-1184(are)X
-1277(trademarks)X
-1576(of)X
-1645(Digital)X
-1839(Equipment)X
-2136(Corporation.)X
-
-9 p
-%%Page: 9 9
-8 s 8 xH 0 xS 1 f
-10 s
-3 f
-1 f
-555 630(executes)N
-852(atomically)X
-1210(there.)X
-755 753(On)N
-878(architectures)X
-1314(that)X
-1459(support)X
-1724(atomic)X
-1967(test-and-set,)X
-2382(a)X
-2443(much)X
-2646(better)X
-2854(choice)X
-3089(would)X
-3314(be)X
-3415(to)X
-3502(attempt)X
-3767(to)X
-3854(obtain)X
-4079(a)X
-4139(spin-)X
-555 843(lock)N
-714(with)X
-877(a)X
-934(test-and-set,)X
-1345(and)X
-1482(issue)X
-1663(a)X
-1720(system)X
-1963(call)X
-2100(only)X
-2263(if)X
-2333(the)X
-2452(spinlock)X
-2744(is)X
-2818(unavailable.)X
-3249(Since)X
-3447(virtually)X
-3738(all)X
-3838(semaphores)X
-4237(in)X
-555 933(LIBTP)N
-801(are)X
-924(uncontested)X
-1330(and)X
-1469(are)X
-1591(held)X
-1752(for)X
-1869(very)X
-2035(short)X
-2218(periods)X
-2477(of)X
-2567(time,)X
-2752(this)X
-2890(would)X
-3113(improve)X
-3403(performance.)X
-3873(For)X
-4007(example,)X
-555 1023(processes)N
-885(must)X
-1062(acquire)X
-1321(exclusive)X
-1646(access)X
-1874(to)X
-1958(buffer)X
-2177(pool)X
-2341(metadata)X
-2653(in)X
-2737(order)X
-2929(to)X
-3013(\256nd)X
-3159(and)X
-3297(pin)X
-3421(a)X
-3479(buffer)X
-3698(in)X
-3781(shared)X
-4012(memory.)X
-555 1113(This)N
-721(semaphore)X
-1093(is)X
-1170(requested)X
-1502(most)X
-1681(frequently)X
-2034(in)X
-2119(LIBTP.)X
-2404(However,)X
-2742(once)X
-2917(it)X
-2984(is)X
-3060(acquired,)X
-3380(only)X
-3545(a)X
-3604(few)X
-3748(instructions)X
-4144(must)X
-555 1203(be)N
-656(executed)X
-966(before)X
-1196(it)X
-1264(is)X
-1341(released.)X
-1669(On)X
-1791(one)X
-1931(architecture)X
-2335(for)X
-2453(which)X
-2673(we)X
-2791(were)X
-2972(able)X
-3130(to)X
-3216(gather)X
-3441(detailed)X
-3719(pro\256ling)X
-4018(informa-)X
-555 1293(tion,)N
-729(the)X
-857(cost)X
-1015(of)X
-1111(the)X
-1238(semaphore)X
-1615(calls)X
-1791(accounted)X
-2146(for)X
-2269(25%)X
-2445(of)X
-2541(the)X
-2668(total)X
-2839(time)X
-3010(spent)X
-3208(updating)X
-3517(the)X
-3644(metadata.)X
-4003(This)X
-4174(was)X
-555 1383(fairly)N
-749(consistent)X
-1089(across)X
-1310(most)X
-1485(of)X
-1572(the)X
-1690(critical)X
-1933(sections.)X
-755 1506(In)N
-848(an)X
-950(attempt)X
-1216(to)X
-1304(quantify)X
-1597(the)X
-1720(overhead)X
-2040(of)X
-2132(kernel)X
-2358(synchronization,)X
-2915(we)X
-3034(ran)X
-3162(tests)X
-3329(on)X
-3434(a)X
-3495(version)X
-3756(of)X
-3848(4.3BSD-Reno)X
-555 1596(which)N
-786(had)X
-937(been)X
-1123(modi\256ed)X
-1441(to)X
-1537(support)X
-1811(binary)X
-2050(semaphore)X
-2432(facilities)X
-2742(similar)X
-2998(to)X
-3094(those)X
-3297(described)X
-3639(in)X
-3735([POSIX91].)X
-4174(The)X
-555 1686(hardware)N
-880(platform)X
-1181(consisted)X
-1504(of)X
-1595(an)X
-1695(HP300)X
-1941(\(33MHz)X
-2237(MC68030\))X
-2612(workstation)X
-3014(with)X
-3180(16MBytes)X
-3537(of)X
-3628(main)X
-3812(memory,)X
-4123(and)X
-4263(a)X
-555 1776(600MByte)N
-920(HP7959)X
-1205(SCSI)X
-1396(disk)X
-1552(\(17)X
-1682(ms)X
-1798(average)X
-2072(seek)X
-2237(time\).)X
-2468(We)X
-2602(ran)X
-2727(three)X
-2910(sets)X
-3052(of)X
-3141(comparisons)X
-3568(which)X
-3786(are)X
-3907(summarized)X
-555 1866(in)N
-645(\256gure)X
-860(\256ve.)X
-1028(In)X
-1123(each)X
-1299(comparison)X
-1701(we)X
-1823(ran)X
-1954(two)X
-2102(tests,)X
-2292(one)X
-2436(using)X
-2637(hardware)X
-2965(spinlocks)X
-3295(and)X
-3438(the)X
-3563(other)X
-3755(using)X
-3955(kernel)X
-4183(call)X
-555 1956(synchronization.)N
-1135(Since)X
-1341(the)X
-1467(test)X
-1606(was)X
-1758(run)X
-1892(single-user,)X
-2291(none)X
-2474(of)X
-2568(the)X
-2693(the)X
-2818(locks)X
-3014(were)X
-3198(contested.)X
-3568(In)X
-3662(the)X
-3787(\256rst)X
-3938(two)X
-4085(sets)X
-4232(of)X
-555 2046(tests,)N
-743(we)X
-863(ran)X
-992(the)X
-1116(full)X
-1253(transaction)X
-1631(processing)X
-2000(benchmark)X
-2383(described)X
-2717(in)X
-2805(section)X
-3058(5.1.)X
-3223(In)X
-3315(one)X
-3456(case)X
-3620(we)X
-3739(ran)X
-3867(with)X
-4034(both)X
-4201(the)X
-555 2136(database)N
-854(and)X
-992(log)X
-1116(on)X
-1218(the)X
-1338(same)X
-1525(disk)X
-1680(\(1)X
-1769(Disk\))X
-1969(and)X
-2107(in)X
-2191(the)X
-2311(second,)X
-2576(we)X
-2692(ran)X
-2817(with)X
-2981(the)X
-3101(database)X
-3400(and)X
-3538(log)X
-3661(on)X
-3762(separate)X
-4047(disks)X
-4232(\(2)X
-555 2226(Disk\).)N
-800(In)X
-894(the)X
-1019(last)X
-1157(test,)X
-1315(we)X
-1436(wanted)X
-1695(to)X
-1784(create)X
-2004(a)X
-2067(CPU)X
-2249(bound)X
-2476(environment,)X
-2928(so)X
-3026(we)X
-3146(used)X
-3319(a)X
-3381(database)X
-3684(small)X
-3883(enough)X
-4145(to)X
-4233(\256t)X
-555 2316(completely)N
-941(in)X
-1033(the)X
-1161(cache)X
-1375(and)X
-1521(issued)X
-1751(read-only)X
-2089(transactions.)X
-2541(The)X
-2695(results)X
-2933(in)X
-3024(\256gure)X
-3240(\256ve)X
-3389(express)X
-3659(the)X
-3786(kernel)X
-4016(call)X
-4161(syn-)X
-555 2406(chronization)N
-980(performance)X
-1411(as)X
-1502(a)X
-1562(percentage)X
-1935(of)X
-2026(the)X
-2148(spinlock)X
-2443(performance.)X
-2914(For)X
-3049(example,)X
-3365(in)X
-3451(the)X
-3573(1)X
-3637(disk)X
-3794(case,)X
-3977(the)X
-4098(kernel)X
-555 2496(call)N
-697(implementation)X
-1225(achieved)X
-1537(4.4)X
-1662(TPS)X
-1824(\(transactions)X
-2259(per)X
-2387(second\))X
-2662(while)X
-2865(the)X
-2988(semaphore)X
-3361(implementation)X
-3888(achieved)X
-4199(4.6)X
-555 2586(TPS,)N
-735(and)X
-874(the)X
-995(relative)X
-1259(performance)X
-1689(of)X
-1779(the)X
-1900(kernel)X
-2123(synchronization)X
-2657(is)X
-2732(96%)X
-2901(that)X
-3043(of)X
-3132(the)X
-3252(spinlock)X
-3545(\(100)X
-3714(*)X
-3776(4.4)X
-3898(/)X
-3942(4.6\).)X
-4111(There)X
-555 2676(are)N
-674(two)X
-814(striking)X
-1078(observations)X
-1503(from)X
-1679(these)X
-1864(results:)X
-10 f
-635 2799(g)N
-1 f
-755(even)X
-927(when)X
-1121(the)X
-1239(system)X
-1481(is)X
-1554(disk)X
-1707(bound,)X
-1947(the)X
-2065(CPU)X
-2240(cost)X
-2389(of)X
-2476(synchronization)X
-3008(is)X
-3081(noticeable,)X
-3451(and)X
-10 f
-635 2922(g)N
-1 f
-755(when)X
-949(we)X
-1063(are)X
-1182(CPU)X
-1357(bound,)X
-1597(the)X
-1715(difference)X
-2062(is)X
-2135(dramatic)X
-2436(\(67%\).)X
-3 f
-555 3108(4.4.)N
-715(Transaction)X
-1148(Protected)X
-1499(Access)X
-1747(Methods)X
-1 f
-755 3231(The)N
-903(B-tree)X
-1127(and)X
-1266(\256xed)X
-1449(length)X
-1671(recno)X
-1872(\(record)X
-2127(number\))X
-2421(access)X
-2649(methods)X
-2942(have)X
-3116(been)X
-3290(modi\256ed)X
-3596(to)X
-3680(provide)X
-3947(transaction)X
-555 3321(protection.)N
-941(Whereas)X
-1244(the)X
-1363(previously)X
-1722(published)X
-2054(interface)X
-2357(to)X
-2440(the)X
-2559(access)X
-2786(routines)X
-3065(had)X
-3202(separate)X
-3487(open)X
-3664(calls)X
-3832(for)X
-3946(each)X
-4114(of)X
-4201(the)X
-10 f
-555 3507(h)N
-579(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)X
-1 Dt
-2978 5036 MXY
- 2978 5036 lineto
- 2978 4662 lineto
- 3093 4662 lineto
- 3093 5036 lineto
- 2978 5036 lineto
-closepath 21 2978 4662 3093 5036 Dp
-2518 MX
- 2518 5036 lineto
- 2518 3960 lineto
- 2633 3960 lineto
- 2633 5036 lineto
- 2518 5036 lineto
-closepath 3 2518 3960 2633 5036 Dp
-2059 MX
- 2059 5036 lineto
- 2059 3946 lineto
- 2174 3946 lineto
- 2174 5036 lineto
- 2059 5036 lineto
-closepath 1 2059 3946 2174 5036 Dp
-3 f
-7 s
-2912 5141(Read-only)N
-1426 3767(of)N
-1487(Spinlock)X
-1710(Throughput)X
-1480 3710(Throughput)N
-1786(as)X
-1850(a)X
-1892(%)X
-11 s
-1670 4843(20)N
-1670 4614(40)N
-1670 4384(60)N
-1670 4155(80)N
-1648 3925(100)N
-7 s
-2041 5141(1)N
-2083(Disk)X
-2490(2)X
-2532(Disks)X
-5 Dt
-1829 5036 MXY
-1494 0 Dl
-4 Ds
-1 Dt
-1829 4806 MXY
-1494 0 Dl
-1829 4577 MXY
-1494 0 Dl
-1829 4347 MXY
-1494 0 Dl
-1829 4118 MXY
-1494 0 Dl
-1829 3888 MXY
-1494 0 Dl
-3 Dt
--1 Ds
-8 s
-555 5360(Figure)N
-753(5:)X
-823(Kernel)X
-1028(Overhead)X
-1315(for)X
-1413(System)X
-1625(Call)X
-1756(Synchronization.)X
-1 f
-2254(The)X
-2370(performance)X
-2708(of)X
-2778(the)X
-2873(kernel)X
-3049(call)X
-3158(synchronization)X
-3583(is)X
-3643(expressed)X
-3911(as)X
-3980(a)X
-4024(percentage)X
-555 5450(of)N
-625(the)X
-720(spinlock)X
-954(synchronization)X
-1379(performance.)X
-1749(In)X
-1819(disk)X
-1943(bound)X
-2120(cases)X
-2271(\(1)X
-2341(Disk)X
-2479(and)X
-2588(2)X
-2637(Disks\),)X
-2837(we)X
-2928(see)X
-3026(that)X
-3139(4-6%)X
-3294(of)X
-3364(the)X
-3459(performance)X
-3797(is)X
-3857(lost)X
-3966(due)X
-4074(to)X
-4140(kernel)X
-555 5540(calls)N
-688(while)X
-846(in)X
-912(the)X
-1006(CPU)X
-1147(bound)X
-1323(case,)X
-1464(we)X
-1554(have)X
-1690(lost)X
-1799(67%)X
-1932(of)X
-2001(the)X
-2095(performance)X
-2432(due)X
-2540(to)X
-2606(kernel)X
-2781(calls.)X
-
-10 p
-%%Page: 10 10
-8 s 8 xH 0 xS 1 f
-10 s
-3 f
-1 f
-555 630(access)N
-781(methods,)X
-1092(we)X
-1206(now)X
-1364(have)X
-1536(an)X
-1632(integrated)X
-1973(open)X
-2149(call)X
-2285(with)X
-2447(the)X
-2565(following)X
-2896(calling)X
-3134(conventions:)X
-7 f
-715 753(DB)N
-859(*dbopen)X
-1243(\(const)X
-1579(char)X
-1819(*file,)X
-2155(int)X
-2347(flags,)X
-2683(int)X
-2875(mode,)X
-3163(DBTYPE)X
-3499(type,)X
-1291 843(int)N
-1483(dbflags,)X
-1915(const)X
-2203(void)X
-2443(*openinfo\))X
-1 f
-555 966(where)N
-2 f
-774(\256le)X
-1 f
-894(is)X
-969(the)X
-1089(name)X
-1285(of)X
-1374(the)X
-1494(\256le)X
-1618(being)X
-1818(opened,)X
-2 f
-2092(\257ags)X
-1 f
-2265(and)X
-2 f
-2402(mode)X
-1 f
-2597(are)X
-2717(the)X
-2836(standard)X
-3129(arguments)X
-3484(to)X
-3 f
-3567(open)X
-1 f
-3731(\(2\),)X
-2 f
-3866(type)X
-1 f
-4021(is)X
-4095(one)X
-4232(of)X
-555 1056(the)N
-680(access)X
-913(method)X
-1180(types,)X
-2 f
-1396(db\257ags)X
-1 f
-1654(indicates)X
-1966(the)X
-2091(mode)X
-2296(of)X
-2390(the)X
-2515(buffer)X
-2739(pool)X
-2907(and)X
-3049(transaction)X
-3427(protection,)X
-3798(and)X
-2 f
-3940(openinfo)X
-1 f
-4246(is)X
-555 1146(the)N
-681(access)X
-915(method)X
-1183(speci\256c)X
-1456(information.)X
-1902(Currently,)X
-2257(the)X
-2383(possible)X
-2673(values)X
-2906(for)X
-2 f
-3028(db\257ags)X
-1 f
-3287(are)X
-3414(DB_SHARED)X
-3912(and)X
-4055(DB_TP)X
-555 1236(indicating)N
-895(that)X
-1035(buffers)X
-1283(should)X
-1516(be)X
-1612(kept)X
-1770(in)X
-1852(a)X
-1908(shared)X
-2138(buffer)X
-2355(pool)X
-2517(and)X
-2653(that)X
-2793(the)X
-2911(\256le)X
-3033(should)X
-3266(be)X
-3362(transaction)X
-3734(protected.)X
-755 1359(The)N
-900(modi\256cations)X
-1355(required)X
-1643(to)X
-1725(add)X
-1861(transaction)X
-2233(protection)X
-2578(to)X
-2660(an)X
-2756(access)X
-2982(method)X
-3242(are)X
-3361(quite)X
-3541(simple)X
-3774(and)X
-3910(localized.)X
-715 1482(1.)N
-795(Replace)X
-1074(\256le)X
-2 f
-1196(open)X
-1 f
-1372(with)X
-2 f
-1534(buf_open)X
-1 f
-1832(.)X
-715 1572(2.)N
-795(Replace)X
-1074(\256le)X
-2 f
-1196(read)X
-1 f
-1363(and)X
-2 f
-1499(write)X
-1 f
-1683(calls)X
-1850(with)X
-2012(buffer)X
-2229(manager)X
-2526(calls)X
-2693(\()X
-2 f
-2720(buf_get)X
-1 f
-(,)S
-2 f
-3000(buf_unpin)X
-1 f
-3324(\).)X
-715 1662(3.)N
-795(Precede)X
-1070(buffer)X
-1287(manager)X
-1584(calls)X
-1751(with)X
-1913(an)X
-2009(appropriate)X
-2395(\(read)X
-2581(or)X
-2668(write\))X
-2880(lock)X
-3038(call.)X
-715 1752(4.)N
-795(Before)X
-1034(updates,)X
-1319(issue)X
-1499(a)X
-1555(logging)X
-1819(operation.)X
-715 1842(5.)N
-795(After)X
-985(data)X
-1139(have)X
-1311(been)X
-1483(accessed,)X
-1805(release)X
-2049(the)X
-2167(buffer)X
-2384(manager)X
-2681(pin.)X
-715 1932(6.)N
-795(Provide)X
-1064(undo/redo)X
-1409(code)X
-1581(for)X
-1695(each)X
-1863(type)X
-2021(of)X
-2108(log)X
-2230(record)X
-2456(de\256ned.)X
-555 2071(The)N
-702(following)X
-1035(code)X
-1209(fragments)X
-1552(show)X
-1743(how)X
-1903(to)X
-1987(transaction)X
-2361(protect)X
-2606(several)X
-2856(updates)X
-3123(to)X
-3206(a)X
-3263(B-tree.)X
-7 s
-3484 2039(3)N
-10 s
-3533 2071(In)N
-3621(the)X
-3740(unprotected)X
-4140(case,)X
-555 2161(an)N
-652(open)X
-829(call)X
-966(is)X
-1040(followed)X
-1346(by)X
-1447(a)X
-1504(read)X
-1664(call)X
-1801(to)X
-1884(obtain)X
-2105(the)X
-2224(meta-data)X
-2562(for)X
-2677(the)X
-2796(B-tree.)X
-3058(Instead,)X
-3331(we)X
-3446(issue)X
-3627(an)X
-3724(open)X
-3901(to)X
-3984(the)X
-4102(buffer)X
-555 2251(manager)N
-852(to)X
-934(obtain)X
-1154(a)X
-1210(\256le)X
-1332(id)X
-1414(and)X
-1550(a)X
-1606(buffer)X
-1823(request)X
-2075(to)X
-2157(obtain)X
-2377(the)X
-2495(meta-data)X
-2832(as)X
-2919(shown)X
-3148(below.)X
-7 f
-715 2374(char)N
-955(*path;)X
-715 2464(int)N
-907(fid,)X
-1147(flags,)X
-1483(len,)X
-1723(mode;)X
-715 2644(/*)N
-859(Obtain)X
-1195(a)X
-1291(file)X
-1531(id)X
-1675(with)X
-1915(which)X
-2203(to)X
-2347(access)X
-2683(the)X
-2875(buffer)X
-3211(pool)X
-3451(*/)X
-715 2734(fid)N
-907(=)X
-1003(buf_open\(path,)X
-1723(flags,)X
-2059(mode\);)X
-715 2914(/*)N
-859(Read)X
-1099(the)X
-1291(meta)X
-1531(data)X
-1771(\(page)X
-2059(0\))X
-2203(for)X
-2395(the)X
-2587(B-tree)X
-2923(*/)X
-715 3004(if)N
-859(\(tp_lock\(fid,)X
-1531(0,)X
-1675(READ_LOCK\)\))X
-1003 3094(return)N
-1339(error;)X
-715 3184(meta_data_ptr)N
-1387(=)X
-1483(buf_get\(fid,)X
-2107(0,)X
-2251(BF_PIN,)X
-2635(&len\);)X
-1 f
-555 3307(The)N
-714(BF_PIN)X
-1014(argument)X
-1350(to)X
-2 f
-1445(buf_get)X
-1 f
-1718(indicates)X
-2036(that)X
-2189(we)X
-2316(wish)X
-2500(to)X
-2595(leave)X
-2798(this)X
-2946(page)X
-3131(pinned)X
-3382(in)X
-3477(memory)X
-3777(so)X
-3881(that)X
-4034(it)X
-4111(is)X
-4197(not)X
-555 3397(swapped)N
-862(out)X
-990(while)X
-1194(we)X
-1314(are)X
-1439(accessing)X
-1772(it.)X
-1881(The)X
-2031(last)X
-2167(argument)X
-2495(to)X
-2 f
-2582(buf_get)X
-1 f
-2847(returns)X
-3095(the)X
-3218(number)X
-3488(of)X
-3580(bytes)X
-3774(on)X
-3879(the)X
-4002(page)X
-4179(that)X
-555 3487(were)N
-732(valid)X
-912(so)X
-1003(that)X
-1143(the)X
-1261(access)X
-1487(method)X
-1747(may)X
-1905(initialize)X
-2205(the)X
-2323(page)X
-2495(if)X
-2564(necessary.)X
-755 3610(Next,)N
-955(consider)X
-1251(inserting)X
-1555(a)X
-1615(record)X
-1845(on)X
-1949(a)X
-2009(particular)X
-2341(page)X
-2517(of)X
-2608(a)X
-2668(B-tree.)X
-2932(In)X
-3022(the)X
-3143(unprotected)X
-3545(case,)X
-3727(we)X
-3844(read)X
-4006(the)X
-4127(page,)X
-555 3700(call)N
-2 f
-693(_bt_insertat)X
-1 f
-1079(,)X
-1121(and)X
-1258(write)X
-1444(the)X
-1563(page.)X
-1776(Instead,)X
-2049(we)X
-2164(lock)X
-2323(the)X
-2442(page,)X
-2635(request)X
-2888(the)X
-3007(buffer,)X
-3245(log)X
-3368(the)X
-3487(change,)X
-3756(modify)X
-4008(the)X
-4127(page,)X
-555 3790(and)N
-691(release)X
-935(the)X
-1053(buffer.)X
-7 f
-715 3913(int)N
-907(fid,)X
-1147(len,)X
-1387(pageno;)X
-1867(/*)X
-2011(Identifies)X
-2539(the)X
-2731(buffer)X
-3067(*/)X
-715 4003(int)N
-907(index;)X
-1867(/*)X
-2011(Location)X
-2443(at)X
-2587(which)X
-2875(to)X
-3019(insert)X
-3355(the)X
-3547(new)X
-3739(pair)X
-3979(*/)X
-715 4093(DBT)N
-907(*keyp,)X
-1243(*datap;)X
-1867(/*)X
-2011(Key/Data)X
-2443(pair)X
-2683(to)X
-2827(be)X
-2971(inserted)X
-3403(*/)X
-715 4183(DATUM)N
-1003(*d;)X
-1867(/*)X
-2011(Key/data)X
-2443(structure)X
-2923(to)X
-3067(insert)X
-3403(*/)X
-715 4363(/*)N
-859(Lock)X
-1099(and)X
-1291(request)X
-1675(the)X
-1867(buffer)X
-2203(*/)X
-715 4453(if)N
-859(\(tp_lock\(fid,)X
-1531(pageno,)X
-1915(WRITE_LOCK\)\))X
-1003 4543(return)N
-1339(error;)X
-715 4633(buffer_ptr)N
-1243(=)X
-1339(buf_get\(fid,)X
-1963(pageno,)X
-2347(BF_PIN,)X
-2731(&len\);)X
-715 4813(/*)N
-859(Log)X
-1051(and)X
-1243(perform)X
-1627(the)X
-1819(update)X
-2155(*/)X
-715 4903(log_insdel\(BTREE_INSERT,)N
-1915(fid,)X
-2155(pageno,)X
-2539(keyp,)X
-2827(datap\);)X
-715 4993(_bt_insertat\(buffer_ptr,)N
-1915(d,)X
-2059(index\);)X
-715 5083(buf_unpin\(buffer_ptr\);)N
-1 f
-555 5206(Succinctly,)N
-942(the)X
-1068(algorithm)X
-1407(for)X
-1529(turning)X
-1788(unprotected)X
-2195(code)X
-2375(into)X
-2527(protected)X
-2854(code)X
-3034(is)X
-3115(to)X
-3205(replace)X
-3466(read)X
-3633(operations)X
-3995(with)X
-2 f
-4165(lock)X
-1 f
-555 5296(and)N
-2 f
-691(buf_get)X
-1 f
-951(operations)X
-1305(and)X
-1441(write)X
-1626(operations)X
-1980(with)X
-2 f
-2142(log)X
-1 f
-2264(and)X
-2 f
-2400(buf_unpin)X
-1 f
-2744(operations.)X
-8 s
-10 f
-555 5458(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)N
-5 s
-1 f
-727 5536(3)N
-8 s
-766 5561(The)N
-884(following)X
-1152(code)X
-1291(fragments)X
-1565(are)X
-1661(examples,)X
-1937(but)X
-2038(do)X
-2120(not)X
-2220(de\256ne)X
-2394(the)X
-2490(\256nal)X
-2622(interface.)X
-2894(The)X
-3011(\256nal)X
-3143(interface)X
-3383(will)X
-3501(be)X
-3579(determined)X
-3884(after)X
-4018(LIBTP)X
-4214(has)X
-555 5633(been)N
-691(fully)X
-828(integrated)X
-1099(with)X
-1229(the)X
-1323(most)X
-1464(recent)X
-3 f
-1635(db)X
-1 f
-1707(\(3\))X
-1797(release)X
-1989(from)X
-2129(the)X
-2223(Computer)X
-2495(Systems)X
-2725(Research)X
-2974(Group)X
-3153(at)X
-3215(University)X
-3501(of)X
-3570(California,)X
-3861(Berkeley.)X
-
-11 p
-%%Page: 11 11
-8 s 8 xH 0 xS 1 f
-10 s
-3 f
-555 630(5.)N
-655(Performance)X
-1 f
-755 753(In)N
-845(this)X
-983(section,)X
-1253(we)X
-1370(present)X
-1625(the)X
-1746(results)X
-1978(of)X
-2067(two)X
-2209(very)X
-2374(different)X
-2673(benchmarks.)X
-3103(The)X
-3250(\256rst)X
-3396(is)X
-3471(an)X
-3569(online)X
-3791(transaction)X
-4165(pro-)X
-555 843(cessing)N
-824(benchmark,)X
-1234(similar)X
-1489(to)X
-1584(the)X
-1715(standard)X
-2020(TPCB,)X
-2272(but)X
-2407(has)X
-2547(been)X
-2732(adapted)X
-3015(to)X
-3110(run)X
-3250(in)X
-3345(a)X
-3414(desktop)X
-3696(environment.)X
-4174(The)X
-555 933(second)N
-798(emulates)X
-1103(a)X
-1159(computer-aided)X
-1683(design)X
-1912(environment)X
-2337(and)X
-2473(provides)X
-2769(more)X
-2954(complex)X
-3250(query)X
-3453(processing.)X
-3 f
-555 1119(5.1.)N
-715(Transaction)X
-1148(Processing)X
-1533(Benchmark)X
-1 f
-755 1242(For)N
-887(this)X
-1023(section,)X
-1291(all)X
-1392(performance)X
-1820(numbers)X
-2117(shown)X
-2346(except)X
-2576(for)X
-2690(the)X
-2808(commercial)X
-3207(database)X
-3504(system)X
-3746(were)X
-3923(obtained)X
-4219(on)X
-555 1332(a)N
-614(DECstation)X
-1009(5000/200)X
-1333(with)X
-1497(32MBytes)X
-1852(of)X
-1941(memory)X
-2230(running)X
-2501(Ultrix)X
-2714(V4.0,)X
-2914(accessing)X
-3244(a)X
-3302(DEC)X
-3484(RZ57)X
-3688(1GByte)X
-3959(disk)X
-4114(drive.)X
-555 1422(The)N
-720(commercial)X
-1139(relational)X
-1482(database)X
-1799(system)X
-2061(tests)X
-2242(were)X
-2438(run)X
-2584(on)X
-2703(a)X
-2778(comparable)X
-3192(machine,)X
-3523(a)X
-3598(Sparcstation)X
-4033(1+)X
-4157(with)X
-555 1512(32MBytes)N
-915(memory)X
-1209(and)X
-1352(a)X
-1415(1GByte)X
-1691(external)X
-1976(disk)X
-2135(drive.)X
-2366(The)X
-2517(database,)X
-2840(binaries)X
-3120(and)X
-3262(log)X
-3390(resided)X
-3648(on)X
-3754(the)X
-3878(same)X
-4069(device.)X
-555 1602(Reported)N
-869(times)X
-1062(are)X
-1181(the)X
-1299(means)X
-1524(of)X
-1611(\256ve)X
-1751(tests)X
-1913(and)X
-2049(have)X
-2221(standard)X
-2513(deviations)X
-2862(within)X
-3086(two)X
-3226(percent)X
-3483(of)X
-3570(the)X
-3688(mean.)X
-755 1725(The)N
-905(test)X
-1041(database)X
-1343(was)X
-1493(con\256gured)X
-1861(according)X
-2203(to)X
-2290(the)X
-2413(TPCB)X
-2637(scaling)X
-2889(rules)X
-3070(for)X
-3189(a)X
-3250(10)X
-3355(transaction)X
-3732(per)X
-3860(second)X
-4108(\(TPS\))X
-555 1815(system)N
-817(with)X
-999(1,000,000)X
-1359(account)X
-1649(records,)X
-1946(100)X
-2106(teller)X
-2311(records,)X
-2607(and)X
-2762(10)X
-2881(branch)X
-3139(records.)X
-3455(Where)X
-3709(TPS)X
-3885(numbers)X
-4200(are)X
-555 1905(reported,)N
-865(we)X
-981(are)X
-1102(running)X
-1373(a)X
-1431(modi\256ed)X
-1737(version)X
-1995(of)X
-2084(the)X
-2203(industry)X
-2486(standard)X
-2779(transaction)X
-3152(processing)X
-3516(benchmark,)X
-3914(TPCB.)X
-4174(The)X
-555 1995(TPCB)N
-780(benchmark)X
-1163(simulates)X
-1491(a)X
-1553(withdrawal)X
-1940(performed)X
-2301(by)X
-2407(a)X
-2469(hypothetical)X
-2891(teller)X
-3082(at)X
-3166(a)X
-3228(hypothetical)X
-3650(bank.)X
-3872(The)X
-4022(database)X
-555 2085(consists)N
-831(of)X
-921(relations)X
-1220(\(\256les\))X
-1430(for)X
-1547(accounts,)X
-1871(branches,)X
-2200(tellers,)X
-2439(and)X
-2578(history.)X
-2863(For)X
-2997(each)X
-3168(transaction,)X
-3563(the)X
-3684(account,)X
-3976(teller,)X
-4183(and)X
-555 2175(branch)N
-795(balances)X
-1093(must)X
-1269(be)X
-1366(updated)X
-1641(to)X
-1724(re\257ect)X
-1946(the)X
-2065(withdrawal)X
-2447(and)X
-2584(a)X
-2640(history)X
-2882(record)X
-3108(is)X
-3181(written)X
-3428(which)X
-3644(contains)X
-3931(the)X
-4049(account)X
-555 2265(id,)N
-657(branch)X
-896(id,)X
-998(teller)X
-1183(id,)X
-1285(and)X
-1421(the)X
-1539(amount)X
-1799(of)X
-1886(the)X
-2004(withdrawal)X
-2385([TPCB90].)X
-755 2388(Our)N
-914(implementation)X
-1450(of)X
-1551(the)X
-1683(benchmark)X
-2074(differs)X
-2317(from)X
-2506(the)X
-2637(speci\256cation)X
-3075(in)X
-3170(several)X
-3431(aspects.)X
-3736(The)X
-3894(speci\256cation)X
-555 2478(requires)N
-840(that)X
-985(the)X
-1108(database)X
-1410(keep)X
-1587(redundant)X
-1933(logs)X
-2091(on)X
-2196(different)X
-2498(devices,)X
-2784(but)X
-2911(we)X
-3030(use)X
-3162(a)X
-3223(single)X
-3439(log.)X
-3606(Furthermore,)X
-4052(all)X
-4157(tests)X
-555 2568(were)N
-734(run)X
-863(on)X
-965(a)X
-1023(single,)X
-1256(centralized)X
-1631(system)X
-1875(so)X
-1968(there)X
-2151(is)X
-2226(no)X
-2328(notion)X
-2553(of)X
-2641(remote)X
-2885(accesses.)X
-3219(Finally,)X
-3486(we)X
-3601(calculated)X
-3948(throughput)X
-555 2658(by)N
-662(dividing)X
-955(the)X
-1080(total)X
-1249(elapsed)X
-1517(time)X
-1686(by)X
-1793(the)X
-1918(number)X
-2190(of)X
-2284(transactions)X
-2694(processed)X
-3038(rather)X
-3253(than)X
-3418(by)X
-3525(computing)X
-3894(the)X
-4018(response)X
-555 2748(time)N
-717(for)X
-831(each)X
-999(transaction.)X
-755 2871(The)N
-912(performance)X
-1351(comparisons)X
-1788(focus)X
-1993(on)X
-2104(traditional)X
-2464(Unix)X
-2655(techniques)X
-3029(\(unprotected,)X
-3486(using)X
-3 f
-3690(\257ock)X
-1 f
-3854(\(2\))X
-3979(and)X
-4126(using)X
-3 f
-555 2961(fsync)N
-1 f
-733(\(2\)\))X
-884(and)X
-1030(a)X
-1096(commercial)X
-1504(relational)X
-1836(database)X
-2142(system.)X
-2433(Well-behaved)X
-2913(applications)X
-3329(using)X
-3 f
-3531(\257ock)X
-1 f
-3695(\(2\))X
-3818(are)X
-3946(guaranteed)X
-555 3051(that)N
-704(concurrent)X
-1077(processes')X
-1441(updates)X
-1715(do)X
-1824(not)X
-1955(interact)X
-2225(with)X
-2396(one)X
-2541(another,)X
-2831(but)X
-2962(no)X
-3070(guarantees)X
-3442(about)X
-3648(atomicity)X
-3978(are)X
-4105(made.)X
-555 3141(That)N
-731(is,)X
-833(if)X
-911(the)X
-1038(system)X
-1289(crashes)X
-1555(in)X
-1646(mid-transaction,)X
-2198(only)X
-2369(parts)X
-2554(of)X
-2649(that)X
-2797(transaction)X
-3177(will)X
-3329(be)X
-3433(re\257ected)X
-3738(in)X
-3828(the)X
-3954 0.3125(after-crash)AX
-555 3231(state)N
-725(of)X
-815(the)X
-936(database.)X
-1276(The)X
-1424(use)X
-1554(of)X
-3 f
-1643(fsync)X
-1 f
-1821(\(2\))X
-1937(at)X
-2017(transaction)X
-2391(commit)X
-2657(time)X
-2821(provides)X
-3119(guarantees)X
-3485(of)X
-3574(durability)X
-3907(after)X
-4077(system)X
-555 3321(failure.)N
-825(However,)X
-1160(there)X
-1341(is)X
-1414(no)X
-1514(mechanism)X
-1899(to)X
-1981(perform)X
-2260(transaction)X
-2632(abort.)X
-3 f
-555 3507(5.1.1.)N
-775(Single-User)X
-1191(Tests)X
-1 f
-755 3630(These)N
-978(tests)X
-1151(compare)X
-1459(LIBTP)X
-1712(in)X
-1804(a)X
-1870(variety)X
-2123(of)X
-2220(con\256gurations)X
-2708(to)X
-2800(traditional)X
-3159(UNIX)X
-3390(solutions)X
-3708(and)X
-3854(a)X
-3920(commercial)X
-555 3720(relational)N
-884(database)X
-1187(system)X
-1435(\(RDBMS\).)X
-1814(To)X
-1929(demonstrate)X
-2347(the)X
-2471(server)X
-2694(architecture)X
-3100(we)X
-3220(built)X
-3392(a)X
-3454(front)X
-3636(end)X
-3777(test)X
-3913(process)X
-4179(that)X
-555 3810(uses)N
-732(TCL)X
-922([OUST90])X
-1304(to)X
-1405(parse)X
-1614(database)X
-1930(access)X
-2175(commands)X
-2561(and)X
-2716(call)X
-2870(the)X
-3006(database)X
-3321(access)X
-3565(routines.)X
-3901(In)X
-4006(one)X
-4160(case)X
-555 3900(\(SERVER\),)N
-956(frontend)X
-1249(and)X
-1386(backend)X
-1675(processes)X
-2004(were)X
-2181(created)X
-2434(which)X
-2650(communicated)X
-3142(via)X
-3260(an)X
-3356(IP)X
-3447(socket.)X
-3712(In)X
-3799(the)X
-3917(second)X
-4160(case)X
-555 3990(\(TCL\),)N
-802(a)X
-860(single)X
-1073(process)X
-1336(read)X
-1497(queries)X
-1751(from)X
-1929(standard)X
-2223(input,)X
-2429(parsed)X
-2660(them,)X
-2861(and)X
-2998(called)X
-3211(the)X
-3330(database)X
-3628(access)X
-3855(routines.)X
-4174(The)X
-555 4080(performance)N
-987(difference)X
-1338(between)X
-1630(the)X
-1752(TCL)X
-1927(and)X
-2067(SERVER)X
-2397(tests)X
-2563(quanti\256es)X
-2898(the)X
-3020(communication)X
-3542(overhead)X
-3861(of)X
-3952(the)X
-4074(socket.)X
-555 4170(The)N
-732(RDBMS)X
-1063(implementation)X
-1617(used)X
-1816(embedded)X
-2198(SQL)X
-2401(in)X
-2515(C)X
-2620(with)X
-2814(stored)X
-3062(database)X
-3391(procedures.)X
-3835(Therefore,)X
-4224(its)X
-555 4260(con\256guration)N
-1003(is)X
-1076(a)X
-1132(hybrid)X
-1361(of)X
-1448(the)X
-1566(single)X
-1777(process)X
-2038(architecture)X
-2438(and)X
-2574(the)X
-2692(server)X
-2909(architecture.)X
-3349(The)X
-3494(graph)X
-3697(in)X
-3779(\256gure)X
-3986(six)X
-4099(shows)X
-555 4350(a)N
-611(comparison)X
-1005(of)X
-1092(the)X
-1210(following)X
-1541(six)X
-1654(con\256gurations:)X
-1126 4506(LIBTP)N
-1552(Uses)X
-1728(the)X
-1846(LIBTP)X
-2088(library)X
-2322(in)X
-2404(a)X
-2460(single)X
-2671(application.)X
-1126 4596(TCL)N
-1552(Uses)X
-1728(the)X
-1846(LIBTP)X
-2088(library)X
-2322(in)X
-2404(a)X
-2460(single)X
-2671(application,)X
-3067(requires)X
-3346(query)X
-3549(parsing.)X
-1126 4686(SERVER)N
-1552(Uses)X
-1728(the)X
-1846(LIBTP)X
-2088(library)X
-2322(in)X
-2404(a)X
-2460(server)X
-2677(con\256guration,)X
-3144(requires)X
-3423(query)X
-3626(parsing.)X
-1126 4776(NOTP)N
-1552(Uses)X
-1728(no)X
-1828(locking,)X
-2108(logging,)X
-2392(or)X
-2479(concurrency)X
-2897(control.)X
-1126 4866(FLOCK)N
-1552(Uses)X
-3 f
-1728(\257ock)X
-1 f
-1892(\(2\))X
-2006(for)X
-2120(concurrency)X
-2538(control)X
-2785(and)X
-2921(nothing)X
-3185(for)X
-3299(durability.)X
-1126 4956(FSYNC)N
-1552(Uses)X
-3 f
-1728(fsync)X
-1 f
-1906(\(2\))X
-2020(for)X
-2134(durability)X
-2465(and)X
-2601(nothing)X
-2865(for)X
-2979(concurrency)X
-3397(control.)X
-1126 5046(RDBMS)N
-1552(Uses)X
-1728(a)X
-1784(commercial)X
-2183(relational)X
-2506(database)X
-2803(system.)X
-755 5235(The)N
-902(results)X
-1133(show)X
-1324(that)X
-1466(LIBTP,)X
-1730(both)X
-1894(in)X
-1978(the)X
-2098(procedural)X
-2464(and)X
-2602(parsed)X
-2834(environments,)X
-3312(is)X
-3387(competitive)X
-3787(with)X
-3951(a)X
-4009(commer-)X
-555 5325(cial)N
-692(system)X
-935(\(comparing)X
-1326(LIBTP,)X
-1589(TCL,)X
-1781(and)X
-1917(RDBMS\).)X
-2263(Compared)X
-2617(to)X
-2699(existing)X
-2972(UNIX)X
-3193(solutions,)X
-3521(LIBTP)X
-3763(is)X
-3836(approximately)X
-555 5415(15%)N
-738(slower)X
-988(than)X
-1162(using)X
-3 f
-1371(\257ock)X
-1 f
-1535(\(2\))X
-1665(or)X
-1768(no)X
-1884(protection)X
-2245(but)X
-2383(over)X
-2562(80%)X
-2745(better)X
-2964(than)X
-3137(using)X
-3 f
-3345(fsync)X
-1 f
-3523(\(2\))X
-3652(\(comparing)X
-4057(LIBTP,)X
-555 5505(FLOCK,)N
-857(NOTP,)X
-1106(and)X
-1242(FSYNC\).)X
-
-12 p
-%%Page: 12 12
-10 s 10 xH 0 xS 1 f
-3 f
-8 s
-3500 2184(RDBMS)N
-1 Dt
-3553 2085 MXY
- 3553 2085 lineto
- 3676 2085 lineto
- 3676 1351 lineto
- 3553 1351 lineto
- 3553 2085 lineto
-closepath 16 3553 1351 3676 2085 Dp
-2018 2184(SERVER)N
-1720 1168 MXY
-0 917 Dl
-122 0 Dl
-0 -917 Dl
--122 0 Dl
-1715 2184(TCL)N
-2087 1534 MXY
- 2087 1534 lineto
- 2209 1534 lineto
- 2209 2085 lineto
- 2087 2085 lineto
- 2087 1534 lineto
-closepath 12 2087 1534 2209 2085 Dp
-3187 MX
- 3187 1534 lineto
- 3309 1534 lineto
- 3309 2085 lineto
- 3187 2085 lineto
- 3187 1534 lineto
-closepath 19 3187 1534 3309 2085 Dp
-3142 2184(FSYNC)N
-2425(NOTP)X
-2453 955 MXY
- 2453 955 lineto
- 2576 955 lineto
- 2576 2085 lineto
- 2453 2085 lineto
- 2453 955 lineto
-closepath 21 2453 955 2576 2085 Dp
-2820 1000 MXY
- 2820 1000 lineto
- 2942 1000 lineto
- 2942 2085 lineto
- 2820 2085 lineto
- 2820 1000 lineto
-closepath 14 2820 1000 2942 2085 Dp
-5 Dt
-1231 2085 MXY
-2567 0 Dl
-4 Ds
-1 Dt
-1231 1840 MXY
-2567 0 Dl
-1231 1596 MXY
-2567 0 Dl
-1231 1351 MXY
-2567 0 Dl
-1231 1108 MXY
-2567 0 Dl
-1231 863 MXY
-2567 0 Dl
-11 s
-1087 1877(2)N
-1087 1633(4)N
-1087 1388(6)N
-1087 1145(8)N
-1065 900(10)N
-1028 763(TPS)N
--1 Ds
-1353 2085 MXY
- 1353 2085 lineto
- 1353 1151 lineto
- 1476 1151 lineto
- 1476 2085 lineto
- 1353 2085 lineto
-closepath 3 1353 1151 1476 2085 Dp
-8 s
-1318 2184(LIBTP)N
-2767(FLOCK)X
-3 Dt
--1 Ds
-10 s
-1597 2399(Figure)N
-1844(6:)X
-1931(Single-User)X
-2347(Performance)X
-2814(Comparison.)X
-1 f
-10 f
-555 2579(h)N
-579(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)X
-3 f
-555 2855(5.1.2.)N
-775(Multi-User)X
-1174(Tests)X
-1 f
-755 2978(While)N
-975(the)X
-1097(single-user)X
-1473(tests)X
-1639(form)X
-1819(a)X
-1878(basis)X
-2061(for)X
-2178(comparing)X
-2544(LIBTP)X
-2789(to)X
-2874(other)X
-3062(systems,)X
-3358(our)X
-3488(goal)X
-3649(in)X
-3734(multi-user)X
-4086(testing)X
-555 3068(was)N
-714(to)X
-810(analyze)X
-1089(its)X
-1197(scalability.)X
-1579(To)X
-1701(this)X
-1849(end,)X
-2018(we)X
-2145(have)X
-2330(run)X
-2470(the)X
-2601(benchmark)X
-2991(in)X
-3086(three)X
-3280(modes,)X
-3542(the)X
-3673(normal)X
-3933(disk)X
-4099(bound)X
-555 3158(con\256guration)N
-1010(\(\256gure)X
-1252(seven\),)X
-1510(a)X
-1573(CPU)X
-1755(bound)X
-1982(con\256guration)X
-2436(\(\256gure)X
-2677(eight,)X
-2884(READ-ONLY\),)X
-3426(and)X
-3569(lock)X
-3734(contention)X
-4099(bound)X
-555 3248(\(\256gure)N
-796(eight,)X
-1003(NO_FSYNC\).)X
-1510(Since)X
-1715(the)X
-1840(normal)X
-2094(con\256guration)X
-2548(is)X
-2628(completely)X
-3011(disk)X
-3171(bound)X
-3398(\(each)X
-3600(transaction)X
-3978(requires)X
-4263(a)X
-555 3354(random)N
-823(read,)X
-1005(a)X
-1064(random)X
-1332(write,)X
-1540(and)X
-1679(a)X
-1738(sequential)X
-2086(write)X
-7 s
-2251 3322(4)N
-10 s
-3354(\))Y
-2329(we)X
-2446(expect)X
-2679(to)X
-2764(see)X
-2890(little)X
-3059(performance)X
-3489(improvement)X
-3939(as)X
-4028(the)X
-4148(mul-)X
-555 3444(tiprogramming)N
-1064(level)X
-1249(increases.)X
-1613(In)X
-1709(fact,)X
-1879(\256gure)X
-2095(seven)X
-2307(reveals)X
-2564(that)X
-2713(we)X
-2836(are)X
-2964(able)X
-3127(to)X
-3218(overlap)X
-3487(CPU)X
-3670(and)X
-3814(disk)X
-3975(utilization)X
-555 3534(slightly)N
-825(producing)X
-1181(approximately)X
-1674(a)X
-1740(10%)X
-1917(performance)X
-2354(improvement)X
-2811(with)X
-2983(two)X
-3133(processes.)X
-3511(After)X
-3711(that)X
-3861(point,)X
-4075(perfor-)X
-555 3624(mance)N
-785(drops)X
-983(off,)X
-1117(and)X
-1253(at)X
-1331(a)X
-1387(multi-programming)X
-2038(level)X
-2214(of)X
-2301(4,)X
-2381(we)X
-2495(are)X
-2614(performing)X
-2995(worse)X
-3207(than)X
-3365(in)X
-3447(the)X
-3565(single)X
-3776(process)X
-4037(case.)X
-755 3747(Similar)N
-1021(behavior)X
-1333(was)X
-1489(reported)X
-1787(on)X
-1897(the)X
-2025(commercial)X
-2434(relational)X
-2767(database)X
-3074(system)X
-3326(using)X
-3529(the)X
-3657(same)X
-3852(con\256guration.)X
-555 3837(The)N
-707(important)X
-1045(conclusion)X
-1419(to)X
-1508(draw)X
-1696(from)X
-1879(this)X
-2021(is)X
-2101(that)X
-2248(you)X
-2395(cannot)X
-2636(attain)X
-2841(good)X
-3028(multi-user)X
-3384(scaling)X
-3638(on)X
-3745(a)X
-3808(badly)X
-4013(balanced)X
-555 3927(system.)N
-839(If)X
-915(multi-user)X
-1266(performance)X
-1695(on)X
-1797(applications)X
-2205(of)X
-2293(this)X
-2429(sort)X
-2570(is)X
-2644(important,)X
-2996(one)X
-3133(must)X
-3309(have)X
-3482(a)X
-3539(separate)X
-3824(logging)X
-4089(device)X
-555 4017(and)N
-697(horizontally)X
-1110(partition)X
-1407(the)X
-1531(database)X
-1834(to)X
-1921(allow)X
-2124(a)X
-2185(suf\256ciently)X
-2570(high)X
-2737(degree)X
-2977(of)X
-3069(multiprogramming)X
-3698(that)X
-3843(group)X
-4055(commit)X
-555 4107(can)N
-687(amortize)X
-988(the)X
-1106(cost)X
-1255(of)X
-1342(log)X
-1464(\257ushing.)X
-755 4230(By)N
-871(using)X
-1067(a)X
-1126(very)X
-1292(small)X
-1488(database)X
-1788(\(one)X
-1954(that)X
-2097(can)X
-2232(be)X
-2331(entirely)X
-2599(cached)X
-2846(in)X
-2930(main)X
-3112(memory\))X
-3428(and)X
-3566(read-only)X
-3896(transactions,)X
-555 4320(we)N
-670(generated)X
-1004(a)X
-1061(CPU)X
-1236(bound)X
-1456(environment.)X
-1921(By)X
-2034(using)X
-2227(the)X
-2345(same)X
-2530(small)X
-2723(database,)X
-3040(the)X
-3158(complete)X
-3472(TPCB)X
-3691(transaction,)X
-4083(and)X
-4219(no)X
-3 f
-555 4410(fsync)N
-1 f
-733(\(2\))X
-862(on)X
-977(the)X
-1110(log)X
-1247(at)X
-1340(commit,)X
-1639(we)X
-1768(created)X
-2036(a)X
-2107(lock)X
-2280(contention)X
-2652(bound)X
-2886(environment.)X
-3365(The)X
-3524(small)X
-3731(database)X
-4042(used)X
-4223(an)X
-555 4500(account)N
-828(\256le)X
-953(containing)X
-1314(only)X
-1479(1000)X
-1662(records)X
-1922(rather)X
-2133(than)X
-2294(the)X
-2415(full)X
-2549(1,000,000)X
-2891(records)X
-3150(and)X
-3288(ran)X
-3413(enough)X
-3671(transactions)X
-4076(to)X
-4160(read)X
-555 4590(the)N
-677(entire)X
-883(database)X
-1183(into)X
-1330(the)X
-1451(buffer)X
-1671(pool)X
-1836(\(2000\))X
-2073(before)X
-2302(beginning)X
-2645(measurements.)X
-3147(The)X
-3295(read-only)X
-3626(transaction)X
-4001(consisted)X
-555 4680(of)N
-646(three)X
-831(database)X
-1132(reads)X
-1326(\(from)X
-1533(the)X
-1655(1000)X
-1839(record)X
-2069(account)X
-2343(\256le,)X
-2489(the)X
-2611(100)X
-2754(record)X
-2983(teller)X
-3171(\256le,)X
-3316(and)X
-3455(the)X
-3576(10)X
-3679(record)X
-3908(branch)X
-4150(\256le\).)X
-555 4770(Since)N
-759(no)X
-865(data)X
-1025(were)X
-1208(modi\256ed)X
-1518(and)X
-1660(no)X
-1766(history)X
-2014(records)X
-2277(were)X
-2460(written,)X
-2733(no)X
-2839(log)X
-2966(records)X
-3228(were)X
-3410(written.)X
-3702(For)X
-3838(the)X
-3961(contention)X
-555 4860(bound)N
-780(con\256guration,)X
-1252(we)X
-1371(used)X
-1543(the)X
-1666(normal)X
-1918(TPCB)X
-2142(transaction)X
-2519(\(against)X
-2798(the)X
-2920(small)X
-3117(database\))X
-3445(and)X
-3585(disabled)X
-3876(the)X
-3998(log)X
-4124(\257ush.)X
-555 4950(Figure)N
-784(eight)X
-964(shows)X
-1184(both)X
-1346(of)X
-1433(these)X
-1618(results.)X
-755 5073(The)N
-902(read-only)X
-1231(test)X
-1363(indicates)X
-1669(that)X
-1810(we)X
-1925(barely)X
-2147(scale)X
-2329(at)X
-2408(all)X
-2509(in)X
-2592(the)X
-2711(CPU)X
-2887(bound)X
-3108(case.)X
-3308(The)X
-3454(explanation)X
-3849(for)X
-3964(that)X
-4105(is)X
-4179(that)X
-555 5163(even)N
-735(with)X
-905(a)X
-969(single)X
-1188(process,)X
-1477(we)X
-1599(are)X
-1726(able)X
-1888(to)X
-1978(drive)X
-2171(the)X
-2297(CPU)X
-2480(utilization)X
-2832(to)X
-2922(96%.)X
-3137(As)X
-3254(a)X
-3317(result,)X
-3542(that)X
-3689(gives)X
-3885(us)X
-3983(very)X
-4153(little)X
-555 5253(room)N
-753(for)X
-876(improvement,)X
-1352(and)X
-1497(it)X
-1570(takes)X
-1764(a)X
-1829(multiprogramming)X
-2462(level)X
-2647(of)X
-2743(four)X
-2906(to)X
-2997(approach)X
-3321(100%)X
-3537(CPU)X
-3721(saturation.)X
-4106(In)X
-4201(the)X
-555 5343(case)N
-718(where)X
-939(we)X
-1057(do)X
-1161(perform)X
-1444(writes,)X
-1684(we)X
-1802(are)X
-1925(interested)X
-2261(in)X
-2347(detecting)X
-2665(when)X
-2863(lock)X
-3025(contention)X
-3387(becomes)X
-3691(a)X
-3750(dominant)X
-4075(perfor-)X
-555 5433(mance)N
-787(factor.)X
-1037(Contention)X
-1414(will)X
-1560(cause)X
-1761(two)X
-1903(phenomena;)X
-2317(we)X
-2433(will)X
-2579(see)X
-2704(transactions)X
-3109(queueing)X
-3425(behind)X
-3665(frequently)X
-4017(accessed)X
-555 5523(data,)N
-731(and)X
-869(we)X
-985(will)X
-1131(see)X
-1256(transaction)X
-1629(abort)X
-1815(rates)X
-1988(increasing)X
-2339(due)X
-2476(to)X
-2559(deadlock.)X
-2910(Given)X
-3127(that)X
-3268(the)X
-3387(branch)X
-3627(\256le)X
-3750(contains)X
-4038(only)X
-4201(ten)X
-8 s
-10 f
-555 5595(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)N
-5 s
-1 f
-727 5673(4)N
-8 s
-763 5698(Although)N
-1021(the)X
-1115(log)X
-1213(is)X
-1272(written)X
-1469(sequentially,)X
-1810(we)X
-1900(do)X
-1980(not)X
-2078(get)X
-2172(the)X
-2266(bene\256t)X
-2456(of)X
-2525(sequentiality)X
-2868(since)X
-3015(the)X
-3109(log)X
-3207(and)X
-3315(database)X
-3550(reside)X
-3718(on)X
-3798(the)X
-3892(same)X
-4039(disk.)X
-
-13 p
-%%Page: 13 13
-8 s 8 xH 0 xS 1 f
-10 s
-3 f
-1 f
-3187 2051 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3286 2028 MXY
-0 17 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3384 1926 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3483 1910 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3581 1910 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3680 1832 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3778 1909 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3877 1883 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3975 1679 MXY
-0 17 Dl
-0 -8 Dl
-9 0 Dl
--18 0 Dl
-4074 1487 MXY
-0 17 Dl
-0 -8 Dl
-9 0 Dl
--18 0 Dl
-5 Dt
-3187 2060 MXY
-99 -24 Dl
-98 -101 Dl
-99 -16 Dl
-98 0 Dl
-99 -78 Dl
-98 77 Dl
-99 -26 Dl
-98 -204 Dl
-99 -192 Dl
-3 f
-6 s
-4088 1516(SMALL)N
-3 Dt
-3187 2051 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3286 2051 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3384 2041 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3483 1990 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3581 1843 MXY
-0 17 Dl
-0 -8 Dl
-9 0 Dl
--18 0 Dl
-3680 1578 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3778 1496 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3877 1430 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-3975 1269 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-4074 1070 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-1 Dt
-3187 2060 MXY
-99 0 Dl
-98 -10 Dl
-99 -51 Dl
-98 -147 Dl
-99 -265 Dl
-98 -82 Dl
-99 -66 Dl
-98 -161 Dl
-99 -199 Dl
-4088 1099(LARGE)N
-5 Dt
-3089 2060 MXY
-985 0 Dl
-3089 MX
-0 -1174 Dl
-4 Ds
-1 Dt
-3581 2060 MXY
-0 -1174 Dl
-4074 2060 MXY
-0 -1174 Dl
-3089 1825 MXY
-985 0 Dl
-9 s
-2993 1855(25)N
-3089 1591 MXY
-985 0 Dl
-2993 1621(50)N
-3089 1356 MXY
-985 0 Dl
-2993 1386(75)N
-3089 1121 MXY
-985 0 Dl
-2957 1151(100)N
-3089 886 MXY
-985 0 Dl
-2957 916(125)N
-3281 2199(Multiprogramming)N
-3071 2152(0)N
-3569(5)X
-4038(10)X
-2859 787(Aborts)N
-3089(per)X
-3211(500)X
-2901 847(transactions)N
--1 Ds
-3 Dt
-2037 1342 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-2125 1358 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-2213 1341 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0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Dl
-88 -11 Dl
-88 77 Dl
-88 24 Dl
-2759 1997(NO-FSYNC)N
-5 Dt
-1949 2060 MXY
-879 0 Dl
-1949 MX
-0 -1174 Dl
-4 Ds
-1 Dt
-2388 2060 MXY
-0 -1174 Dl
-2828 2060 MXY
-0 -1174 Dl
-1949 1825 MXY
-879 0 Dl
-9 s
-1842 1855(40)N
-1949 1591 MXY
-879 0 Dl
-1842 1621(80)N
-1949 1356 MXY
-879 0 Dl
-1806 1386(120)N
-1949 1121 MXY
-879 0 Dl
-1806 1151(160)N
-1949 886 MXY
-879 0 Dl
-1806 916(200)N
-2088 2199(Multiprogramming)N
-1844 863(in)N
-1922(TPS)X
-1761 792(Throughput)N
-1931 2121(0)N
-2370 2133(5)N
-2792(10)X
-6 s
-1679 1833(LIBTP)N
--1 Ds
-3 Dt
-837 1019 MXY
-0 17 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-929 878 MXY
-0 17 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-1021 939 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-1113 1043 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-1205 1314 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-1297 1567 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-1389 1665 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-1481 1699 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-1573 1828 MXY
-0 18 Dl
-0 -9 Dl
-9 0 Dl
--18 0 Dl
-1665 1804 MXY
-0 18 Dl
-0 -9 Dl
-8 0 Dl
--17 0 Dl
-5 Dt
-837 1027 MXY
-92 -141 Dl
-92 62 Dl
-92 104 Dl
-92 271 Dl
-92 253 Dl
-92 98 Dl
-92 34 Dl
-92 129 Dl
-92 -24 Dl
-745 2060 MXY
-920 0 Dl
-745 MX
-0 -1174 Dl
-4 Ds
-1 Dt
-1205 2060 MXY
-0 -1174 Dl
-1665 2060 MXY
-0 -1174 Dl
-745 1766 MXY
-920 0 Dl
-9 s
-673 1796(3)N
-745 1473 MXY
-920 0 Dl
-673 1503(5)N
-745 1180 MXY
-920 0 Dl
-673 1210(8)N
-745 886 MXY
-920 0 Dl
-637 916(10)N
-905 2199(Multiprogramming)N
-622 851(in)N
-700(TPS)X
-575 792(Throughput)N
-733 2152(0)N
-1196(5)X
-1629(10)X
-3 Dt
--1 Ds
-8 s
-655 2441(Figure)N
-872(7:)X
-960(Multi-user)X
-1286(Performance.)X
-1 f
-655 2531(Since)N
-825(the)X
-931(con\256guration)X
-1300(is)X
-1371(completely)X
-655 2621(disk)N
-790(bound,)X
-994(we)X
-1096(see)X
-1204(only)X
-1345(a)X
-1400(small)X
-1566(im-)X
-655 2711(provement)N
-964(by)X
-1064(adding)X
-1274(a)X
-1337(second)X
-1549(pro-)X
-655 2801(cess.)N
-849(Adding)X
-1081(any)X
-1213(more)X
-1383(concurrent)X
-655 2891(processes)N
-935(causes)X
-1137(performance)X
-1493(degra-)X
-655 2981(dation.)N
-3 f
-1927 2441(Figure)N
-2149(8:)X
-2243(Multi-user)X
-2574(Performance)X
-1927 2531(on)N
-2021(a)X
-2079(small)X
-2251(database.)X
-1 f
-2551(With)X
-2704(one)X
-2821(pro-)X
-1927 2621(cess,)N
-2075(we)X
-2174(are)X
-2276(driving)X
-2486(the)X
-2589(CPU)X
-2739(at)X
-2810(96%)X
-1927 2711(utilization)N
-2215(leaving)X
-2430(little)X
-2575(room)X
-2737(for)X
-2838(im-)X
-1927 2801(provement)N
-2238(as)X
-2328(the)X
-2443(multiprogramming)X
-1927 2891(level)N
-2091(increases.)X
-2396(In)X
-2489(the)X
-2607(NO-FSYNC)X
-1927 2981(case,)N
-2076(lock)X
-2209(contention)X
-2502(degrades)X
-2751(perfor-)X
-1927 3071(mance)N
-2117(as)X
-2194(soon)X
-2339(as)X
-2416(a)X
-2468(second)X
-2669(process)X
-2884(is)X
-1927 3161(added.)N
-3 f
-3199 2441(Figure)N
-3405(9:)X
-3482(Abort)X
-3669(rates)X
-3827(on)X
-3919(the)X
-4028(TPCB)X
-3199 2531(Benchmark.)N
-1 f
-3589(The)X
-3726(abort)X
-3895(rate)X
-4028(climbs)X
-3199 2621(more)N
-3366(quickly)X
-3594(for)X
-3704(the)X
-3818(large)X
-3980(database)X
-3199 2711(test)N
-3324(since)X
-3491(processes)X
-3771(are)X
-3884(descheduled)X
-3199 2801(more)N
-3409(frequently,)X
-3766(allowing)X
-4068(more)X
-3199 2891(processes)N
-3459(to)X
-3525(vie)X
-3619(for)X
-3709(the)X
-3803(same)X
-3950(locks.)X
-10 s
-10 f
-555 3284(h)N
-579(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)X
-1 f
-555 3560(records,)N
-835(we)X
-952(expect)X
-1185(contention)X
-1546(to)X
-1631(become)X
-1904(a)X
-1963(factor)X
-2174(quickly)X
-2437(and)X
-2576(the)X
-2697(NO-FSYNC)X
-3120(line)X
-3263(in)X
-3348(\256gure)X
-3557(eight)X
-3739(demonstrates)X
-4184(this)X
-555 3650(dramatically.)N
-1022(Each)X
-1209(additional)X
-1555(process)X
-1822(causes)X
-2058(both)X
-2226(more)X
-2417(waiting)X
-2682(and)X
-2823(more)X
-3013(deadlocking.)X
-3470(Figure)X
-3704(nine)X
-3867(shows)X
-4092(that)X
-4237(in)X
-555 3740(the)N
-681(small)X
-882(database)X
-1187(case)X
-1353(\(SMALL\),)X
-1725(waiting)X
-1992(is)X
-2072(the)X
-2197(dominant)X
-2526(cause)X
-2732(of)X
-2826(declining)X
-3151(performance)X
-3585(\(the)X
-3737(number)X
-4009(of)X
-4103(aborts)X
-555 3830(increases)N
-878(less)X
-1026(steeply)X
-1281(than)X
-1447(the)X
-1573(performance)X
-2008(drops)X
-2214(off)X
-2336(in)X
-2426(\256gure)X
-2641(eight\),)X
-2876(while)X
-3082(in)X
-3172(the)X
-3298(large)X
-3487(database)X
-3792(case)X
-3958(\(LARGE\),)X
-555 3920(deadlocking)N
-967(contributes)X
-1343(more)X
-1528(to)X
-1610(the)X
-1728(declining)X
-2046(performance.)X
-755 4043(Deadlocks)N
-1116(are)X
-1237(more)X
-1424(likely)X
-1628(to)X
-1712(occur)X
-1913(in)X
-1997(the)X
-2116(LARGE)X
-2404(test)X
-2536(than)X
-2695(in)X
-2778(the)X
-2897(SMALL)X
-3189(test)X
-3321(because)X
-3597(there)X
-3779(are)X
-3899(more)X
-4085(oppor-)X
-555 4133(tunities)N
-814(to)X
-900(wait.)X
-1082(In)X
-1173(the)X
-1295(SMALL)X
-1590(case,)X
-1773(processes)X
-2105(never)X
-2307(do)X
-2410(I/O)X
-2540(and)X
-2679(are)X
-2801(less)X
-2944(likely)X
-3149(to)X
-3234(be)X
-3333(descheduled)X
-3753(during)X
-3985(a)X
-4044(transac-)X
-555 4223(tion.)N
-740(In)X
-828(the)X
-947(LARGE)X
-1235(case,)X
-1415(processes)X
-1744(will)X
-1889(frequently)X
-2240(be)X
-2337(descheduled)X
-2755(since)X
-2941(they)X
-3100(have)X
-3273(to)X
-3356(perform)X
-3636(I/O.)X
-3804(This)X
-3967(provides)X
-4263(a)X
-555 4313(window)N
-837(where)X
-1058(a)X
-1118(second)X
-1365(process)X
-1630(can)X
-1766(request)X
-2022(locks)X
-2215(on)X
-2318(already)X
-2578(locked)X
-2815(pages,)X
-3041(thus)X
-3197(increasing)X
-3550(the)X
-3671(likelihood)X
-4018(of)X
-4108(build-)X
-555 4403(ing)N
-677(up)X
-777(long)X
-939(chains)X
-1164(of)X
-1251(waiting)X
-1511(processes.)X
-1879(Eventually,)X
-2266(this)X
-2401(leads)X
-2586(to)X
-2668(deadlock.)X
-3 f
-555 4589(5.2.)N
-715(The)X
-868(OO1)X
-1052(Benchmark)X
-1 f
-755 4712(The)N
-903(TPCB)X
-1125(benchmark)X
-1505(described)X
-1836(in)X
-1921(the)X
-2042(previous)X
-2341(section)X
-2591(measures)X
-2913(performance)X
-3343(under)X
-3549(a)X
-3608(conventional)X
-4044(transac-)X
-555 4802(tion)N
-706(processing)X
-1076(workload.)X
-1446(Other)X
-1656(application)X
-2039(domains,)X
-2357(such)X
-2531(as)X
-2625(computer-aided)X
-3156(design,)X
-3412(have)X
-3591(substantially)X
-4022(different)X
-555 4892(access)N
-786(patterns.)X
-1105(In)X
-1197(order)X
-1392(to)X
-1479(measure)X
-1772(the)X
-1895(performance)X
-2327(of)X
-2418(LIBTP)X
-2664(under)X
-2871(workloads)X
-3229(of)X
-3320(this)X
-3459(type,)X
-3641(we)X
-3759(implemented)X
-4201(the)X
-555 4982(OO1)N
-731(benchmark)X
-1108(described)X
-1436(in)X
-1518([CATT91].)X
-755 5105(The)N
-908(database)X
-1213(models)X
-1472(a)X
-1535(set)X
-1651(of)X
-1745(electronics)X
-2120(components)X
-2534(with)X
-2703(connections)X
-3113(among)X
-3358(them.)X
-3585(One)X
-3746(table)X
-3929(stores)X
-4143(parts)X
-555 5195(and)N
-696(another)X
-962(stores)X
-1174(connections.)X
-1622(There)X
-1835(are)X
-1959(three)X
-2145(connections)X
-2552(originating)X
-2927(at)X
-3009(any)X
-3149(given)X
-3351(part.)X
-3540(Ninety)X
-3782(percent)X
-4043(of)X
-4134(these)X
-555 5285(connections)N
-960(are)X
-1081(to)X
-1165(nearby)X
-1406(parts)X
-1584(\(those)X
-1802(with)X
-1966(nearby)X
-2 f
-2207(ids)X
-1 f
-2300(\))X
-2348(to)X
-2431(model)X
-2652(the)X
-2771(spatial)X
-3001(locality)X
-3262(often)X
-3448(exhibited)X
-3767(in)X
-3850(CAD)X
-4040(applica-)X
-555 5375(tions.)N
-779(Ten)X
-933(percent)X
-1198(of)X
-1293(the)X
-1419(connections)X
-1830(are)X
-1957(randomly)X
-2292(distributed)X
-2662(among)X
-2908(all)X
-3016(other)X
-3209(parts)X
-3393(in)X
-3483(the)X
-3609(database.)X
-3954(Every)X
-4174(part)X
-555 5465(appears)N
-829(exactly)X
-1089(three)X
-1278(times)X
-1479(in)X
-1569(the)X
-2 f
-1695(from)X
-1 f
-1874(\256eld)X
-2043(of)X
-2137(a)X
-2200(connection)X
-2579(record,)X
-2832(and)X
-2975(zero)X
-3141(or)X
-3235(more)X
-3427(times)X
-3627(in)X
-3716(the)X
-2 f
-3841(to)X
-1 f
-3930(\256eld.)X
-4139(Parts)X
-555 5555(have)N
-2 f
-727(x)X
-1 f
-783(and)X
-2 f
-919(y)X
-1 f
-975(locations)X
-1284(set)X
-1393(randomly)X
-1720(in)X
-1802(an)X
-1898(appropriate)X
-2284(range.)X
-
-14 p
-%%Page: 14 14
-10 s 10 xH 0 xS 1 f
-3 f
-1 f
-755 630(The)N
-900(intent)X
-1102(of)X
-1189(OO1)X
-1365(is)X
-1438(to)X
-1520(measure)X
-1808(the)X
-1926(overall)X
-2169(cost)X
-2318(of)X
-2405(a)X
-2461(query)X
-2664(mix)X
-2808(characteristic)X
-3257(of)X
-3344(engineering)X
-3743(database)X
-4040(applica-)X
-555 720(tions.)N
-770(There)X
-978(are)X
-1097(three)X
-1278(tests:)X
-10 f
-635 843(g)N
-2 f
-755(Lookup)X
-1 f
-1022(generates)X
-1353(1,000)X
-1560(random)X
-1832(part)X
-2 f
-1984(ids)X
-1 f
-2077(,)X
-2124(fetches)X
-2378(the)X
-2502(corresponding)X
-2987(parts)X
-3169(from)X
-3351(the)X
-3475(database,)X
-3798(and)X
-3940(calls)X
-4113(a)X
-4175(null)X
-755 933(procedure)N
-1097(in)X
-1179(the)X
-1297(host)X
-1450(programming)X
-1906(language)X
-2216(with)X
-2378(the)X
-2496(parts')X
-2 f
-2699(x)X
-1 f
-2755(and)X
-2 f
-2891(y)X
-1 f
-2947(positions.)X
-10 f
-635 1056(g)N
-2 f
-755(Traverse)X
-1 f
-1067(retrieves)X
-1371(a)X
-1434(random)X
-1706(part)X
-1858(from)X
-2041(the)X
-2166(database)X
-2470(and)X
-2613(follows)X
-2880(connections)X
-3290(from)X
-3473(it)X
-3544(to)X
-3632(other)X
-3823(parts.)X
-4045(Each)X
-4232(of)X
-755 1146(those)N
-947(parts)X
-1126(is)X
-1202(retrieved,)X
-1531(and)X
-1670(all)X
-1773(connections)X
-2179(from)X
-2358(it)X
-2424(followed.)X
-2771(This)X
-2935(procedure)X
-3279(is)X
-3354(repeated)X
-3649(depth-\256rst)X
-4000(for)X
-4116(seven)X
-755 1236(hops)N
-930(from)X
-1110(the)X
-1232(original)X
-1505(part,)X
-1674(for)X
-1792(a)X
-1852(total)X
-2018(of)X
-2109(3280)X
-2293(parts.)X
-2513(Backward)X
-2862(traversal)X
-3162(also)X
-3314(exists,)X
-3539(and)X
-3678(follows)X
-3941(all)X
-4044(connec-)X
-755 1326(tions)N
-930(into)X
-1074(a)X
-1130(given)X
-1328(part)X
-1473(to)X
-1555(their)X
-1722(origin.)X
-10 f
-635 1449(g)N
-2 f
-755(Insert)X
-1 f
-962(adds)X
-1129(100)X
-1269(new)X
-1423(parts)X
-1599(and)X
-1735(their)X
-1902(connections.)X
-755 1572(The)N
-913(benchmark)X
-1303(is)X
-1389(single-user,)X
-1794(but)X
-1929(multi-user)X
-2291(access)X
-2530(controls)X
-2821(\(locking)X
-3120(and)X
-3268(transaction)X
-3652(protection\))X
-4036(must)X
-4223(be)X
-555 1662(enforced.)N
-898(It)X
-968(is)X
-1042(designed)X
-1348(to)X
-1431(be)X
-1528(run)X
-1656(on)X
-1757(a)X
-1814(database)X
-2112(with)X
-2275(20,000)X
-2516(parts,)X
-2713(and)X
-2850(on)X
-2951(one)X
-3087(with)X
-3249(200,000)X
-3529(parts.)X
-3745(Because)X
-4033(we)X
-4147(have)X
-555 1752(insuf\256cient)N
-935(disk)X
-1088(space)X
-1287(for)X
-1401(the)X
-1519(larger)X
-1727(database,)X
-2044(we)X
-2158(report)X
-2370(results)X
-2599(only)X
-2761(for)X
-2875(the)X
-2993(20,000)X
-3233(part)X
-3378(database.)X
-3 f
-555 1938(5.2.1.)N
-775(Implementation)X
-1 f
-755 2061(The)N
-920(LIBTP)X
-1182(implementation)X
-1724(of)X
-1831(OO1)X
-2027(uses)X
-2205(the)X
-2342(TCL)X
-2532([OUST90])X
-2914(interface)X
-3235(described)X
-3582(earlier.)X
-3867(The)X
-4031(backend)X
-555 2151(accepts)N
-813(commands)X
-1181(over)X
-1345(an)X
-1442(IP)X
-1534(socket)X
-1760(and)X
-1897(performs)X
-2208(the)X
-2327(requested)X
-2656(database)X
-2954(actions.)X
-3242(The)X
-3387(frontend)X
-3679(opens)X
-3886(and)X
-4022(executes)X
-555 2241(a)N
-618(TCL)X
-796(script.)X
-1041(This)X
-1210(script)X
-1415(contains)X
-1709(database)X
-2013(accesses)X
-2313(interleaved)X
-2697(with)X
-2866(ordinary)X
-3165(program)X
-3463(control)X
-3716(statements.)X
-4120(Data-)X
-555 2331(base)N
-718(commands)X
-1085(are)X
-1204(submitted)X
-1539(to)X
-1621(the)X
-1739(backend)X
-2027(and)X
-2163(results)X
-2392(are)X
-2511(bound)X
-2731(to)X
-2813(program)X
-3105(variables.)X
-755 2454(The)N
-903(parts)X
-1082(table)X
-1261(was)X
-1409(stored)X
-1628(as)X
-1718(a)X
-1776(B-tree)X
-1999(indexed)X
-2275(by)X
-2 f
-2377(id)X
-1 f
-2439(.)X
-2501(The)X
-2648(connection)X
-3022(table)X
-3200(was)X
-3347(stored)X
-3565(as)X
-3654(a)X
-3712(set)X
-3823(of)X
-3912(\256xed-length)X
-555 2544(records)N
-824(using)X
-1029(the)X
-1159(4.4BSD)X
-1446(recno)X
-1657(access)X
-1895(method.)X
-2207(In)X
-2306(addition,)X
-2620(two)X
-2771(B-tree)X
-3003(indices)X
-3261(were)X
-3449(maintained)X
-3836(on)X
-3947(connection)X
-555 2634(table)N
-732(entries.)X
-1007(One)X
-1162(index)X
-1360(mapped)X
-1634(the)X
-2 f
-1752(from)X
-1 f
-1923(\256eld)X
-2085(to)X
-2167(a)X
-2223(connection)X
-2595(record)X
-2821(number,)X
-3106(and)X
-3242(the)X
-3360(other)X
-3545(mapped)X
-3819(the)X
-2 f
-3937(to)X
-1 f
-4019(\256eld)X
-4181(to)X
-4263(a)X
-555 2724(connection)N
-932(record)X
-1163(number.)X
-1473(These)X
-1690(indices)X
-1941(support)X
-2205(fast)X
-2345(lookups)X
-2622(on)X
-2726(connections)X
-3133(in)X
-3219(both)X
-3385(directions.)X
-3765(For)X
-3900(the)X
-4022(traversal)X
-555 2814(tests,)N
-743(the)X
-867(frontend)X
-1165(does)X
-1338(an)X
-1439(index)X
-1642(lookup)X
-1889(to)X
-1976(discover)X
-2273(the)X
-2396(connected)X
-2747(part's)X
-2 f
-2955(id)X
-1 f
-3017(,)X
-3062(and)X
-3203(then)X
-3366(does)X
-3538(another)X
-3804(lookup)X
-4051(to)X
-4138(fetch)X
-555 2904(the)N
-673(part)X
-818(itself.)X
-3 f
-555 3090(5.2.2.)N
-775(Performance)X
-1242(Measurements)X
-1766(for)X
-1889(OO1)X
-1 f
-755 3213(We)N
-888(compare)X
-1186(LIBTP's)X
-1487(OO1)X
-1664(performance)X
-2092(to)X
-2174(that)X
-2314(reported)X
-2602(in)X
-2684([CATT91].)X
-3087(Those)X
-3303(results)X
-3532(were)X
-3709(collected)X
-4019(on)X
-4119(a)X
-4175(Sun)X
-555 3303(3/280)N
-759(\(25)X
-888(MHz)X
-1075(MC68020\))X
-1448(with)X
-1612(16)X
-1714(MBytes)X
-1989(of)X
-2078(memory)X
-2367(and)X
-2505(two)X
-2647(Hitachi)X
-2904(892MByte)X
-3267(disks)X
-3452(\(15)X
-3580(ms)X
-3694(average)X
-3966(seek)X
-4130(time\))X
-555 3393(behind)N
-793(an)X
-889(SMD-4)X
-1149(controller.)X
-1521(Frontends)X
-1861(ran)X
-1984(on)X
-2084(an)X
-2180(8MByte)X
-2462(Sun)X
-2606(3/260.)X
-755 3516(In)N
-844(order)X
-1036(to)X
-1120(measure)X
-1410(performance)X
-1839(on)X
-1941(a)X
-1999(machine)X
-2293(of)X
-2382(roughly)X
-2653(equivalent)X
-3009(processor)X
-3339(power,)X
-3582(we)X
-3698(ran)X
-3822(one)X
-3959(set)X
-4069(of)X
-4157(tests)X
-555 3606(on)N
-666(a)X
-733(standalone)X
-1107(MC68030-based)X
-1671(HP300)X
-1923(\(33MHz)X
-2225(MC68030\).)X
-2646(The)X
-2801(database)X
-3108(was)X
-3263(stored)X
-3489(on)X
-3599(a)X
-3665(300MByte)X
-4037(HP7959)X
-555 3696(SCSI)N
-744(disk)X
-898(\(17)X
-1026(ms)X
-1139(average)X
-1410(seek)X
-1573(time\).)X
-1802(Since)X
-2000(this)X
-2135(machine)X
-2427(is)X
-2500(not)X
-2622(connected)X
-2968(to)X
-3050(a)X
-3106(network,)X
-3409(we)X
-3523(ran)X
-3646(local)X
-3822(tests)X
-3984(where)X
-4201(the)X
-555 3786(frontend)N
-855(and)X
-999(backend)X
-1295(run)X
-1430(on)X
-1538(the)X
-1664(same)X
-1856(machine.)X
-2195(We)X
-2334(compare)X
-2638(these)X
-2830(measurements)X
-3316(with)X
-3485(Cattell's)X
-3783(local)X
-3966(Sun)X
-4117(3/280)X
-555 3876(numbers.)N
-755 3999(Because)N
-1051(the)X
-1177(benchmark)X
-1562(requires)X
-1849(remote)X
-2100(access,)X
-2354(we)X
-2476(ran)X
-2607(another)X
-2876(set)X
-2993(of)X
-3088(tests)X
-3258(on)X
-3365(a)X
-3428(DECstation)X
-3828(5000/200)X
-4157(with)X
-555 4089(32M)N
-732(of)X
-825(memory)X
-1118(running)X
-1393(Ultrix)X
-1610(V4.0)X
-1794(and)X
-1936(a)X
-1998(DEC)X
-2184(1GByte)X
-2459(RZ57)X
-2666(SCSI)X
-2859(disk.)X
-3057(We)X
-3194(compare)X
-3496(the)X
-3619(local)X
-3800(performance)X
-4232(of)X
-555 4179(OO1)N
-734(on)X
-837(the)X
-958(DECstation)X
-1354(to)X
-1439(its)X
-1536(remote)X
-1781(performance.)X
-2250(For)X
-2383(the)X
-2503(remote)X
-2748(case,)X
-2929(we)X
-3045(ran)X
-3170(the)X
-3290(frontend)X
-3584(on)X
-3686(a)X
-3744(DECstation)X
-4139(3100)X
-555 4269(with)N
-717(16)X
-817(MBytes)X
-1090(of)X
-1177(main)X
-1357(memory.)X
-755 4392(The)N
-900(databases)X
-1228(tested)X
-1435(in)X
-1517([CATT91])X
-1880(are)X
-10 f
-635 4515(g)N
-1 f
-755(INDEX,)X
-1045(a)X
-1101(highly-optimized)X
-1672(access)X
-1898(method)X
-2158(package)X
-2442(developed)X
-2792(at)X
-2870(Sun)X
-3014(Microsystems.)X
-10 f
-635 4638(g)N
-1 f
-755(OODBMS,)X
-1137(a)X
-1193(beta)X
-1347(release)X
-1591(of)X
-1678(a)X
-1734(commercial)X
-2133(object-oriented)X
-2639(database)X
-2936(management)X
-3366(system.)X
-10 f
-635 4761(g)N
-1 f
-755(RDBMS,)X
-1076(a)X
-1133(UNIX-based)X
-1565(commercial)X
-1965(relational)X
-2289(data)X
-2444(manager)X
-2742(at)X
-2821(production)X
-3189(release.)X
-3474(The)X
-3620(OO1)X
-3797(implementation)X
-755 4851(used)N
-922(embedded)X
-1272(SQL)X
-1443(in)X
-1525(C.)X
-1638(Stored)X
-1867(procedures)X
-2240(were)X
-2417(de\256ned)X
-2673(to)X
-2755(reduce)X
-2990(client-server)X
-3412(traf\256c.)X
-755 4974(Table)N
-974(two)X
-1130(shows)X
-1366(the)X
-1500(measurements)X
-1995(from)X
-2187([CATT91])X
-2566(and)X
-2718(LIBTP)X
-2976(for)X
-3106(a)X
-3178(local)X
-3370(test)X
-3517(on)X
-3632(the)X
-3765(MC680x0-based)X
-555 5064(hardware.)N
-915(All)X
-1037(caches)X
-1272(are)X
-1391(cleared)X
-1644(before)X
-1870(each)X
-2038(test.)X
-2209(All)X
-2331(times)X
-2524(are)X
-2643(in)X
-2725(seconds.)X
-755 5187(Table)N
-960(two)X
-1102(shows)X
-1324(that)X
-1466(LIBTP)X
-1710(outperforms)X
-2123(the)X
-2242(commercial)X
-2642(relational)X
-2966(system,)X
-3229(but)X
-3352(is)X
-3426(slower)X
-3661(than)X
-3820(OODBMS)X
-4183(and)X
-555 5277(INDEX.)N
-872(Since)X
-1077(the)X
-1202(caches)X
-1444(were)X
-1628(cleared)X
-1888(at)X
-1973(the)X
-2098(start)X
-2263(of)X
-2356(each)X
-2530(test,)X
-2687(disk)X
-2846(throughput)X
-3223(is)X
-3302(critical)X
-3551(in)X
-3639(this)X
-3780(test.)X
-3957(The)X
-4108(single)X
-555 5367(SCSI)N
-749(HP)X
-877(drive)X
-1068(used)X
-1241(by)X
-1347(LIBTP)X
-1595(is)X
-1674(approximately)X
-2163(13%)X
-2336(slower)X
-2576(than)X
-2739(the)X
-2862(disks)X
-3051(used)X
-3223(in)X
-3310([CATT91])X
-3678(which)X
-3899(accounts)X
-4205(for)X
-555 5457(part)N
-700(of)X
-787(the)X
-905(difference.)X
-755 5580(OODBMS)N
-1118(and)X
-1255(INDEX)X
-1525(outperform)X
-1906(LIBTP)X
-2148(most)X
-2323(dramatically)X
-2744(on)X
-2844(traversal.)X
-3181(This)X
-3343(is)X
-3416(because)X
-3691(we)X
-3805(use)X
-3932(index)X
-4130(look-)X
-555 5670(ups)N
-689(to)X
-774(\256nd)X
-921(connections,)X
-1347(whereas)X
-1634(the)X
-1755(other)X
-1942(two)X
-2084(systems)X
-2359(use)X
-2488(a)X
-2546(link)X
-2692(access)X
-2920(method.)X
-3222(The)X
-3369(index)X
-3569(requires)X
-3850(us)X
-3943(to)X
-4027(examine)X
-
-15 p
-%%Page: 15 15
-10 s 10 xH 0 xS 1 f
-3 f
-1 f
-10 f
-555 679(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)N
-2 f
-606 769(Measure)N
-1 f
-1019(INDEX)X
-1389(OODBMS)X
-1851(RDBMS)X
-2250(LIBTP)X
-10 f
-555 771(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)N
-555 787(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)N
-1 f
-595 869(Lookup)N
-1114(5.4)X
-1490(12.9)X
-1950(27)X
-2291(27.2)X
-595 959(Traversal)N
-1074(13)X
-1530(9.8)X
-1950(90)X
-2291(47.3)X
-595 1049(Insert)N
-1114(7.4)X
-1530(1.5)X
-1950(22)X
-2331(9.7)X
-10 f
-555 1059(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)N
-555(c)X
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-959 1059(c)N
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-1329 1059(c)N
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-1791 1059(c)N
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-2190 1059(c)N
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-2512 1059(c)N
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-2618 679(i)N
-2629(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2 f
-2829 769(Measure)N
-3401(Cache)X
-3726(Local)X
-4028(Remote)X
-1 f
-10 f
-2618 771(i)N
-2629(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2618 787(i)N
-2629(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2658 869(Lookup)N
-3401(cold)X
-3747(15.7)X
-4078(20.6)X
-3401 959(warm)N
-3787(7.8)X
-4078(12.4)X
-10 f
-2618 969(i)N
-2629(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2658 1059(Forward)N
-2950(traversal)X
-3401(cold)X
-3747(28.4)X
-4078(52.6)X
-3401 1149(warm)N
-3747(23.5)X
-4078(47.4)X
-10 f
-2618 1159(i)N
-2629(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2658 1249(Backward)N
-3004(traversal)X
-3401(cold)X
-3747(24.2)X
-4078(47.4)X
-3401 1339(warm)N
-3747(24.3)X
-4078(47.6)X
-10 f
-2618 1349(i)N
-2629(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-1 f
-2658 1439(Insert)N
-3401(cold)X
-3787(7.5)X
-4078(10.3)X
-3401 1529(warm)N
-3787(6.7)X
-4078(10.9)X
-10 f
-2618 1539(i)N
-2629(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii)X
-2618(c)X
-1479(c)Y
-1399(c)Y
-1319(c)Y
-1239(c)Y
-1159(c)Y
-1079(c)Y
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-3341 1539(c)N
-1479(c)Y
-1399(c)Y
-1319(c)Y
-1239(c)Y
-1159(c)Y
-1079(c)Y
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-3666 1539(c)N
-1479(c)Y
-1399(c)Y
-1319(c)Y
-1239(c)Y
-1159(c)Y
-1079(c)Y
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-3968 1539(c)N
-1479(c)Y
-1399(c)Y
-1319(c)Y
-1239(c)Y
-1159(c)Y
-1079(c)Y
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-4309 1539(c)N
-1479(c)Y
-1399(c)Y
-1319(c)Y
-1239(c)Y
-1159(c)Y
-1079(c)Y
-999(c)Y
-919(c)Y
-839(c)Y
-759(c)Y
-3 f
-587 1785(Table)N
-823(2:)X
-931(Local)X
-1163(MC680x0)X
-1538(Performance)X
-2026(of)X
-2133(Several)X
-587 1875(Systems)N
-883(on)X
-987(OO1.)X
-2667 1785(Table)N
-2909(3:)X
-3023(Local)X
-3260(vs.)X
-3397(Remote)X
-3707(Performance)X
-4200(of)X
-2667 1875(LIBTP)N
-2926(on)X
-3030(OO1.)X
-1 f
-10 f
-555 1998(h)N
-579(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)X
-1 f
-555 2274(two)N
-696(disk)X
-850(pages,)X
-1074(but)X
-1197(the)X
-1316(links)X
-1492(require)X
-1741(only)X
-1904(one,)X
-2061(regardless)X
-2408(of)X
-2496(database)X
-2794(size.)X
-2980(Cattell)X
-3214(reports)X
-3458(that)X
-3599(lookups)X
-3873(using)X
-4067(B-trees)X
-555 2364(instead)N
-808(of)X
-901(links)X
-1082(makes)X
-1313(traversal)X
-1616(take)X
-1776(twice)X
-1976(as)X
-2069(long)X
-2237(in)X
-2325(INDEX.)X
-2641(Adding)X
-2907(a)X
-2969(link)X
-3119(access)X
-3351(method)X
-3617(to)X
-3 f
-3704(db)X
-1 f
-3792(\(3\))X
-3911(or)X
-4003(using)X
-4201(the)X
-555 2454(existing)N
-828(hash)X
-995(method)X
-1255(would)X
-1475(apparently)X
-1834(be)X
-1930(a)X
-1986(good)X
-2166(idea.)X
-755 2577(Both)N
-936(OODBMS)X
-1304(and)X
-1446(INDEX)X
-1722(issue)X
-1908 0.1944(coarser-granularity)AX
-2545(locks)X
-2739(than)X
-2902(LIBTP.)X
-3189(This)X
-3356(limits)X
-3562(concurrency)X
-3985(for)X
-4104(multi-)X
-555 2667(user)N
-711(applications,)X
-1140(but)X
-1264(helps)X
-1455(single-user)X
-1829(applications.)X
-2278(In)X
-2367(addition,)X
-2671(the)X
-2791(fact)X
-2934(that)X
-3076(LIBTP)X
-3319(releases)X
-3595(B-tree)X
-3817(locks)X
-4007(early)X
-4189(is)X
-4263(a)X
-555 2757(drawback)N
-896(in)X
-986(OO1.)X
-1210(Since)X
-1416(there)X
-1605(is)X
-1686(no)X
-1793(concurrency)X
-2218(in)X
-2307(the)X
-2432(benchmark,)X
-2836(high-concurrency)X
-3430(strategies)X
-3760(only)X
-3929(show)X
-4125(up)X
-4232(as)X
-555 2847(increased)N
-882(locking)X
-1145(overhead.)X
-1503(Finally,)X
-1772(the)X
-1892(architecture)X
-2294(of)X
-2383(the)X
-2503(LIBTP)X
-2747(implementation)X
-3271(was)X
-3418(substantially)X
-3844(different)X
-4143(from)X
-555 2937(that)N
-702(of)X
-796(either)X
-1006(OODBMS)X
-1375(or)X
-1469(INDEX.)X
-1786(Both)X
-1968(of)X
-2062(those)X
-2258(systems)X
-2538(do)X
-2645(the)X
-2770(searches)X
-3070(in)X
-3159(the)X
-3284(user's)X
-3503(address)X
-3771(space,)X
-3997(and)X
-4139(issue)X
-555 3027(requests)N
-844(for)X
-964(pages)X
-1173(to)X
-1260(the)X
-1383(server)X
-1605(process.)X
-1911(Pages)X
-2123(are)X
-2247(cached)X
-2496(in)X
-2583(the)X
-2706(client,)X
-2929(and)X
-3070(many)X
-3273(queries)X
-3530(can)X
-3667(be)X
-3768(satis\256ed)X
-4055(without)X
-555 3117(contacting)N
-910(the)X
-1029(server)X
-1247(at)X
-1326(all.)X
-1467(LIBTP)X
-1710(submits)X
-1979(all)X
-2080(the)X
-2199(queries)X
-2452(to)X
-2535(the)X
-2653(server)X
-2870(process,)X
-3151(and)X
-3287(receives)X
-3571(database)X
-3868(records)X
-4125(back;)X
-555 3207(it)N
-619(does)X
-786(no)X
-886(client)X
-1084(caching.)X
-755 3330(The)N
-911(RDBMS)X
-1221(architecture)X
-1632(is)X
-1716(much)X
-1925(closer)X
-2148(to)X
-2241(that)X
-2392(of)X
-2490(LIBTP.)X
-2783(A)X
-2872(server)X
-3100(process)X
-3372(receives)X
-3667(queries)X
-3930(and)X
-4076(returns)X
-555 3420(results)N
-786(to)X
-870(a)X
-928(client.)X
-1168(The)X
-1315(timing)X
-1545(results)X
-1776(in)X
-1860(table)X
-2038(two)X
-2180(clearly)X
-2421(show)X
-2612(that)X
-2754(the)X
-2874(conventional)X
-3309(database)X
-3607(client/server)X
-4025(model)X
-4246(is)X
-555 3510(expensive.)N
-941(LIBTP)X
-1188(outperforms)X
-1605(the)X
-1728(RDBMS)X
-2032(on)X
-2136(traversal)X
-2437(and)X
-2577(insertion.)X
-2921(We)X
-3057(speculate)X
-3380(that)X
-3524(this)X
-3663(is)X
-3740(due)X
-3880(in)X
-3966(part)X
-4115(to)X
-4201(the)X
-555 3600(overhead)N
-870(of)X
-957(query)X
-1160(parsing,)X
-1436(optimization,)X
-1880(and)X
-2016(repeated)X
-2309(interpretation)X
-2761(of)X
-2848(the)X
-2966(plan)X
-3124(tree)X
-3265(in)X
-3347(the)X
-3465(RDBMS')X
-3791(query)X
-3994(executor.)X
-755 3723(Table)N
-962(three)X
-1147(shows)X
-1371(the)X
-1492(differences)X
-1873(between)X
-2164(local)X
-2343(and)X
-2482(remote)X
-2728(execution)X
-3063(of)X
-3153(LIBTP's)X
-3456(OO1)X
-3635(implementation)X
-4160(on)X
-4263(a)X
-555 3813(DECstation.)N
-989(We)X
-1122(measured)X
-1451(performance)X
-1879(with)X
-2042(a)X
-2099(populated)X
-2436(\(warm\))X
-2694(cache)X
-2899(and)X
-3036(an)X
-3133(empty)X
-3354(\(cold\))X
-3567(cache.)X
-3812(Reported)X
-4126(times)X
-555 3903(are)N
-681(the)X
-806(means)X
-1037(of)X
-1130(twenty)X
-1374(tests,)X
-1562(and)X
-1704(are)X
-1829(in)X
-1917(seconds.)X
-2237(Standard)X
-2548(deviations)X
-2903(were)X
-3086(within)X
-3316(seven)X
-3525(percent)X
-3788(of)X
-3881(the)X
-4005(mean)X
-4205(for)X
-555 3993(remote,)N
-818(and)X
-954(two)X
-1094(percent)X
-1351(of)X
-1438(the)X
-1556(mean)X
-1750(for)X
-1864(local.)X
-755 4116(The)N
-914(20ms)X
-1121(overhead)X
-1450(of)X
-1551(TCP/IP)X
-1824(on)X
-1938(an)X
-2048(Ethernet)X
-2354(entirely)X
-2633(accounts)X
-2948(for)X
-3076(the)X
-3207(difference)X
-3567(in)X
-3662(speed.)X
-3918(The)X
-4076(remote)X
-555 4206(traversal)N
-857(times)X
-1055(are)X
-1179(nearly)X
-1405(double)X
-1648(the)X
-1771(local)X
-1952(times)X
-2150(because)X
-2430(we)X
-2549(do)X
-2653(index)X
-2855(lookups)X
-3132(and)X
-3272(part)X
-3421(fetches)X
-3673(in)X
-3759(separate)X
-4047(queries.)X
-555 4296(It)N
-629(would)X
-854(make)X
-1053(sense)X
-1252(to)X
-1339(do)X
-1444(indexed)X
-1723(searches)X
-2021(on)X
-2126(the)X
-2248(server,)X
-2489(but)X
-2615(we)X
-2733(were)X
-2914(unwilling)X
-3244(to)X
-3330(hard-code)X
-3676(knowledge)X
-4052(of)X
-4143(OO1)X
-555 4386(indices)N
-803(into)X
-948(our)X
-1075(LIBTP)X
-1317(TCL)X
-1488(server.)X
-1745(Cold)X
-1920(and)X
-2056(warm)X
-2259(insertion)X
-2559(times)X
-2752(are)X
-2871(identical)X
-3167(since)X
-3352(insertions)X
-3683(do)X
-3783(not)X
-3905(bene\256t)X
-4143(from)X
-555 4476(caching.)N
-755 4599(One)N
-915(interesting)X
-1279(difference)X
-1632(shown)X
-1867(by)X
-1973(table)X
-2155(three)X
-2342(is)X
-2421(the)X
-2545(cost)X
-2700(of)X
-2793(forward)X
-3074(versus)X
-3305(backward)X
-3644(traversal.)X
-3987(When)X
-4205(we)X
-555 4689(built)N
-725(the)X
-847(database,)X
-1168(we)X
-1285(inserted)X
-1562(parts)X
-1741(in)X
-1826(part)X
-2 f
-1974(id)X
-1 f
-2059(order.)X
-2292(We)X
-2427(built)X
-2596(the)X
-2717(indices)X
-2967(at)X
-3048(the)X
-3169(same)X
-3357(time.)X
-3562(Therefore,)X
-3923(the)X
-4044(forward)X
-555 4779(index)N
-757(had)X
-897(keys)X
-1068(inserted)X
-1346(in)X
-1432(order,)X
-1646(while)X
-1848(the)X
-1970(backward)X
-2307(index)X
-2509(had)X
-2649(keys)X
-2820(inserted)X
-3098(more)X
-3286(randomly.)X
-3656(In-order)X
-3943(insertion)X
-4246(is)X
-555 4885(pessimal)N
-858(for)X
-975(B-tree)X
-1199(indices,)X
-1469(so)X
-1563(the)X
-1684(forward)X
-1962(index)X
-2163(is)X
-2239(much)X
-2440(larger)X
-2651(than)X
-2812(the)X
-2933(backward)X
-3269(one)X
-7 s
-3385 4853(5)N
-10 s
-4885(.)Y
-3476(This)X
-3640(larger)X
-3850(size)X
-3997(shows)X
-4219(up)X
-555 4975(as)N
-642(extra)X
-823(disk)X
-976(reads)X
-1166(in)X
-1248(the)X
-1366(cold)X
-1524(benchmark.)X
-3 f
-555 5161(6.)N
-655(Conclusions)X
-1 f
-755 5284(LIBTP)N
-1006(provides)X
-1311(the)X
-1438(basic)X
-1632(building)X
-1927(blocks)X
-2165(to)X
-2256(support)X
-2525(transaction)X
-2906(protection.)X
-3300(In)X
-3396(comparison)X
-3799(with)X
-3970(traditional)X
-555 5374(Unix)N
-746(libraries)X
-1040(and)X
-1187(commercial)X
-1597(systems,)X
-1900(it)X
-1974(offers)X
-2192(a)X
-2258(variety)X
-2511(of)X
-2608(tradeoffs.)X
-2964(Using)X
-3185(complete)X
-3509(transaction)X
-3891(protection)X
-4246(is)X
-555 5464(more)N
-747(complicated)X
-1166(than)X
-1331(simply)X
-1575(adding)X
-3 f
-1820(fsync)X
-1 f
-1998(\(2\))X
-2119(and)X
-3 f
-2262(\257ock)X
-1 f
-2426(\(2\))X
-2547(calls)X
-2721(to)X
-2810(code,)X
-3008(but)X
-3136(it)X
-3206(is)X
-3285(faster)X
-3490(in)X
-3578(some)X
-3773(cases)X
-3969(and)X
-4111(offers)X
-8 s
-10 f
-555 5536(hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh)N
-5 s
-1 f
-727 5614(5)N
-8 s
-763 5639(The)N
-878(next)X
-1004(release)X
-1196(of)X
-1265(the)X
-1359(4.4BSD)X
-1580(access)X
-1758(method)X
-1966(will)X
-2082(automatically)X
-2446(detect)X
-2614(and)X
-2722(compensate)X
-3039(for)X
-3129(in-order)X
-3350(insertion,)X
-3606(eliminating)X
-3914(this)X
-4023(problem.)X
-
-16 p
-%%Page: 16 16
-8 s 8 xH 0 xS 1 f
-10 s
-3 f
-1 f
-555 630(stricter)N
-801(guarantees)X
-1168(\(atomicity,)X
-1540(consistency,)X
-1957(isolation,)X
-2275(and)X
-2414(durability\).)X
-2815(If)X
-2892(the)X
-3013(data)X
-3170(to)X
-3255(be)X
-3354(protected)X
-3676(are)X
-3798(already)X
-4058(format-)X
-555 720(ted)N
-675(\()X
-2 f
-702(i.e.)X
-1 f
-821(use)X
-949(one)X
-1086(of)X
-1174(the)X
-1293(database)X
-1591(access)X
-1818(methods\),)X
-2157(then)X
-2316(adding)X
-2555(transaction)X
-2928(protection)X
-3274(requires)X
-3554(no)X
-3655(additional)X
-3996(complex-)X
-555 810(ity,)N
-679(but)X
-801(incurs)X
-1017(a)X
-1073(performance)X
-1500(penalty)X
-1756(of)X
-1843(approximately)X
-2326(15%.)X
-755 933(In)N
-844(comparison)X
-1240(with)X
-1404(commercial)X
-1805(database)X
-2104(systems,)X
-2399(the)X
-2519(tradeoffs)X
-2827(are)X
-2948(more)X
-3135(complex.)X
-3473(LIBTP)X
-3717(does)X
-3886(not)X
-4009(currently)X
-555 1023(support)N
-825(a)X
-891(standard)X
-1193(query)X
-1406(language.)X
-1766(The)X
-1921(TCL-based)X
-2312(server)X
-2539(process)X
-2810(allows)X
-3049(a)X
-3115(certain)X
-3364(ease)X
-3533(of)X
-3630(use)X
-3767(which)X
-3993(would)X
-4223(be)X
-555 1113(enhanced)N
-882(with)X
-1047(a)X
-1106(more)X
-1294(user-friendly)X
-1732(interface)X
-2037(\()X
-2 f
-2064(e.g.)X
-1 f
-2203(a)X
-2261(windows)X
-2572(based)X
-2777(query-by-form)X
-3272(application\),)X
-3697(for)X
-3813(which)X
-4031(we)X
-4147(have)X
-555 1203(a)N
-620(working)X
-916(prototype.)X
-1292(When)X
-1513(accesses)X
-1815(do)X
-1924(not)X
-2055(require)X
-2312(sophisticated)X
-2758(query)X
-2969(processing,)X
-3360(the)X
-3486(TCL)X
-3665(interface)X
-3975(is)X
-4056(an)X
-4160(ade-)X
-555 1293(quate)N
-756(solution.)X
-1080(What)X
-1281(LIBTP)X
-1529(fails)X
-1693(to)X
-1781(provide)X
-2052(in)X
-2140(functionality,)X
-2595(it)X
-2665(makes)X
-2896(up)X
-3002(for)X
-3122(in)X
-3210(performance)X
-3643(and)X
-3785(\257exibility.)X
-4161(Any)X
-555 1383(application)N
-931(may)X
-1089(make)X
-1283(use)X
-1410(of)X
-1497(its)X
-1592(record)X
-1818(interface)X
-2120(or)X
-2207(the)X
-2325(more)X
-2510(primitive)X
-2823(log,)X
-2965(lock,)X
-3143(and)X
-3279(buffer)X
-3496(calls.)X
-755 1506(Future)N
-987(work)X
-1175(will)X
-1322(focus)X
-1519(on)X
-1621(overcoming)X
-2026(some)X
-2217(of)X
-2306(the)X
-2426(areas)X
-2614(in)X
-2698(which)X
-2916(LIBTP)X
-3160(is)X
-3235(currently)X
-3547(de\256cient)X
-3845(and)X
-3983(extending)X
-555 1596(its)N
-652(transaction)X
-1026(model.)X
-1288(The)X
-1435(addition)X
-1719(of)X
-1808(an)X
-1905(SQL)X
-2077(parser)X
-2295(and)X
-2432(forms)X
-2640(front)X
-2817(end)X
-2954(will)X
-3099(improve)X
-3387(the)X
-3506(system's)X
-3807(ease)X
-3967(of)X
-4055(use)X
-4183(and)X
-555 1686(make)N
-750(it)X
-815(more)X
-1001(competitive)X
-1400(with)X
-1563(commercial)X
-1963(systems.)X
-2277(In)X
-2365(the)X
-2484(long)X
-2647(term,)X
-2835(we)X
-2950(would)X
-3170(like)X
-3310(to)X
-3392(add)X
-3528(generalized)X
-3919(hierarchical)X
-555 1776(locking,)N
-836(nested)X
-1062(transactions,)X
-1486(parallel)X
-1748(transactions,)X
-2171(passing)X
-2431(of)X
-2518(transactions)X
-2921(between)X
-3209(processes,)X
-3557(and)X
-3693(distributed)X
-4055(commit)X
-555 1866(handling.)N
-900(In)X
-992(the)X
-1115(short)X
-1300(term,)X
-1492(the)X
-1614(next)X
-1776(step)X
-1929(is)X
-2006(to)X
-2092(integrate)X
-2397(LIBTP)X
-2643(with)X
-2809(the)X
-2931(most)X
-3110(recent)X
-3331(release)X
-3579(of)X
-3670(the)X
-3792(database)X
-4093(access)X
-555 1956(routines)N
-833(and)X
-969(make)X
-1163(it)X
-1227(freely)X
-1435(available)X
-1745(via)X
-1863(anonymous)X
-2252(ftp.)X
-3 f
-555 2142(7.)N
-655(Acknowledgements)X
-1 f
-755 2265(We)N
-888(would)X
-1109(like)X
-1250(to)X
-1332(thank)X
-1530(John)X
-1701(Wilkes)X
-1948(and)X
-2084(Carl)X
-2242(Staelin)X
-2484(of)X
-2571(Hewlett-Packard)X
-3131(Laboratories)X
-3557(and)X
-3693(Jon)X
-3824(Krueger.)X
-4148(John)X
-555 2355(and)N
-694(Carl)X
-855(provided)X
-1162(us)X
-1255(with)X
-1419(an)X
-1517(extra)X
-1700(disk)X
-1855(for)X
-1971(the)X
-2091(HP)X
-2215(testbed)X
-2464(less)X
-2606(than)X
-2766(24)X
-2868(hours)X
-3068(after)X
-3238(we)X
-3354(requested)X
-3684(it.)X
-3770(Jon)X
-3903(spent)X
-4094(count-)X
-555 2445(less)N
-699(hours)X
-901(helping)X
-1164(us)X
-1258(understand)X
-1633(the)X
-1754(intricacies)X
-2107(of)X
-2197(commercial)X
-2599(database)X
-2899(products)X
-3198(and)X
-3337(their)X
-3507(behavior)X
-3811(under)X
-4017(a)X
-4076(variety)X
-555 2535(of)N
-642(system)X
-884(con\256gurations.)X
-3 f
-555 2721(8.)N
-655(References)X
-1 f
-555 2901([ANDR89])N
-942(Andrade,)X
-1265(J.,)X
-1361(Carges,)X
-1629(M.,)X
-1765(Kovach,)X
-2060(K.,)X
-2183(``Building)X
-2541(an)X
-2642(On-Line)X
-2939(Transaction)X
-3343(Processing)X
-3715(System)X
-3975(On)X
-4098(UNIX)X
-727 2991(System)N
-982(V'',)X
-2 f
-1134(CommUNIXations)X
-1 f
-1725(,)X
-1765 0.2188(November/December)AX
-2477(1989.)X
-555 3171([BAY77])N
-878(Bayer,)X
-1110(R.,)X
-1223(Schkolnick,)X
-1623(M.,)X
-1754(``Concurrency)X
-2243(of)X
-2330(Operations)X
-2702(on)X
-2802(B-Trees'',)X
-2 f
-3155(Acta)X
-3322(Informatica)X
-1 f
-3700(,)X
-3740(1977.)X
-555 3351([BERN80])N
-936(Bernstein,)X
-1297(P.,)X
-1415(Goodman,)X
-1785(N.,)X
-1917(``Timestamp)X
-2365(Based)X
-2595(Algorithms)X
-2992(for)X
-3119(Concurrency)X
-3567(Control)X
-3844(in)X
-3939(Distributed)X
-727 3441(Database)N
-1042(Systems'',)X
-2 f
-1402(Proceedings)X
-1823(6th)X
-1945(International)X
-2387(Conference)X
-2777(on)X
-2877(Very)X
-3049(Large)X
-3260(Data)X
-3440(Bases)X
-1 f
-3627(,)X
-3667(October)X
-3946(1980.)X
-555 3621([BSD91])N
-864(DB\(3\),)X
-2 f
-1109(4.4BSD)X
-1376(Unix)X
-1552(Programmer's)X
-2044(Manual)X
-2313(Reference)X
-2655(Guide)X
-1 f
-2851(,)X
-2891(University)X
-3249(of)X
-3336(California,)X
-3701(Berkeley,)X
-4031(1991.)X
-555 3801([CATT91])N
-923(Cattell,)X
-1181(R.G.G.,)X
-1455(``An)X
-1632(Engineering)X
-2049(Database)X
-2369(Benchmark'',)X
-2 f
-2838(The)X
-2983(Benchmark)X
-3373(Handbook)X
-3731(for)X
-3848(Database)X
-4179(and)X
-727 3891(Transaction)N
-1133(Processing)X
-1509(Systems)X
-1 f
-1763(,)X
-1803(J.)X
-1874(Gray,)X
-2075(editor,)X
-2302(Morgan)X
-2576(Kaufman)X
-2895(1991.)X
-555 4071([CHEN91])N
-929(Cheng,)X
-1180(E.,)X
-1291(Chang,)X
-1542(E.,)X
-1653(Klein,)X
-1872(J.,)X
-1964(Lee,)X
-2126(D.,)X
-2245(Lu,)X
-2375(E.,)X
-2485(Lutgardo,)X
-2820(A.,)X
-2939(Obermarck,)X
-3342(R.,)X
-3456(``An)X
-3629(Open)X
-3824(and)X
-3961(Extensible)X
-727 4161(Event-Based)N
-1157(Transaction)X
-1556(Manager'',)X
-2 f
-1936(Proceedings)X
-2357(1991)X
-2537(Summer)X
-2820(Usenix)X
-1 f
-3043(,)X
-3083(Nashville,)X
-3430(TN,)X
-3577(June)X
-3744(1991.)X
-555 4341([CHOU85])N
-943(Chou,)X
-1163(H.,)X
-1288(DeWitt,)X
-1570(D.,)X
-1694(``An)X
-1872(Evaluation)X
-2245(of)X
-2338(Buffer)X
-2574(Management)X
-3019(Strategies)X
-3361(for)X
-3481(Relational)X
-3836(Database)X
-4157(Sys-)X
-727 4431(tems'',)N
-2 f
-972(Proceedings)X
-1393(of)X
-1475(the)X
-1593(11th)X
-1755(International)X
-2197(Conference)X
-2587(on)X
-2687(Very)X
-2859(Large)X
-3070(Databases)X
-1 f
-3408(,)X
-3448(1985.)X
-555 4611([DEWI84])N
-925(DeWitt,)X
-1207(D.,)X
-1331(Katz,)X
-1529(R.,)X
-1648(Olken,)X
-1890(F.,)X
-2000(Shapiro,)X
-2295(L.,)X
-2410(Stonebraker,)X
-2843(M.,)X
-2979(Wood,)X
-3220(D.,)X
-3343(``Implementation)X
-3929(Techniques)X
-727 4701(for)N
-841(Main)X
-1030(Memory)X
-1326(Database)X
-1641(Systems'',)X
-2 f
-2001(Proceedings)X
-2422(of)X
-2504(SIGMOD)X
-1 f
-2812(,)X
-2852(pp.)X
-2972(1-8,)X
-3119(June)X
-3286(1984.)X
-555 4881([GRAY76])N
-944(Gray,)X
-1153(J.,)X
-1252(Lorie,)X
-1474(R.,)X
-1595(Putzolu,)X
-1887(F.,)X
-1999(and)X
-2143(Traiger,)X
-2428(I.,)X
-2522(``Granularity)X
-2973(of)X
-3067(locks)X
-3263(and)X
-3406(degrees)X
-3679(of)X
-3773(consistency)X
-4174(in)X
-4263(a)X
-727 4971(large)N
-909(shared)X
-1140(data)X
-1295(base'',)X
-2 f
-1533(Modeling)X
-1861(in)X
-1944(Data)X
-2125(Base)X
-2301(Management)X
-2740(Systems)X
-1 f
-2994(,)X
-3034(Elsevier)X
-3317(North)X
-3524(Holland,)X
-3822(New)X
-3994(York,)X
-4199(pp.)X
-727 5061(365-394.)N
-555 5241([HAER83])N
-931(Haerder,)X
-1235(T.)X
-1348(Reuter,)X
-1606(A.)X
-1728(``Principles)X
-2126(of)X
-2217(Transaction-Oriented)X
-2928(Database)X
-3246(Recovery'',)X
-2 f
-3651(Computing)X
-4029(Surveys)X
-1 f
-4279(,)X
-727 5331(15\(4\);)N
-943(237-318,)X
-1250(1983.)X
-555 5511([KUNG81])N
-943(Kung,)X
-1162(H.)X
-1261(T.,)X
-1371(Richardson,)X
-1777(J.,)X
-1869(``On)X
-2042(Optimistic)X
-2400(Methods)X
-2701(for)X
-2816(Concurrency)X
-3252(Control'',)X
-2 f
-3591(ACM)X
-3781(Transactions)X
-4219(on)X
-727 5601(Database)N
-1054(Systems)X
-1 f
-1328(6\(2\);)X
-1504(213-226,)X
-1811(1981.)X
-
-17 p
-%%Page: 17 17
-10 s 10 xH 0 xS 1 f
-3 f
-1 f
-555 630([LEHM81])N
-939(Lehman,)X
-1245(P.,)X
-1352(Yao,)X
-1529(S.,)X
-1636(``Ef\256cient)X
-1989(Locking)X
-2279(for)X
-2396(Concurrent)X
-2780(Operations)X
-3155(on)X
-3258(B-trees'',)X
-2 f
-3587(ACM)X
-3779(Transactions)X
-4219(on)X
-727 720(Database)N
-1054(Systems)X
-1 f
-1308(,)X
-1348(6\(4\),)X
-1522(December)X
-1873(1981.)X
-555 900([MOHA91])N
-964(Mohan,)X
-1241(C.,)X
-1364(Pirahesh,)X
-1690(H.,)X
-1818(``ARIES-RRH:)X
-2366(Restricted)X
-2721(Repeating)X
-3076(of)X
-3173(History)X
-3442(in)X
-3533(the)X
-3660(ARIES)X
-3920(Transaction)X
-727 990(Recovery)N
-1055(Method'',)X
-2 f
-1398(Proceedings)X
-1819(7th)X
-1941(International)X
-2383(Conference)X
-2773(on)X
-2873(Data)X
-3053(Engineering)X
-1 f
-3449(,)X
-3489(Kobe,)X
-3703(Japan,)X
-3926(April)X
-4115(1991.)X
-555 1170([NODI90])N
-914(Nodine,)X
-1194(M.,)X
-1328(Zdonik,)X
-1602(S.,)X
-1709(``Cooperative)X
-2178(Transaction)X
-2580(Hierarchies:)X
-2996(A)X
-3077(Transaction)X
-3479(Model)X
-3711(to)X
-3796(Support)X
-4072(Design)X
-727 1260(Applications'',)N
-2 f
-1242(Proceedings)X
-1675(16th)X
-1849(International)X
-2303(Conference)X
-2704(on)X
-2815(Very)X
-2998(Large)X
-3220(Data)X
-3411(Bases)X
-1 f
-3598(,)X
-3649(Brisbane,)X
-3985(Australia,)X
-727 1350(August)N
-978(1990.)X
-555 1530([OUST90])N
-923(Ousterhout,)X
-1324(J.,)X
-1420(``Tcl:)X
-1648(An)X
-1771(Embeddable)X
-2197(Command)X
-2555(Language'',)X
-2 f
-2971(Proceedings)X
-3396(1990)X
-3580(Winter)X
-3822(Usenix)X
-1 f
-4045(,)X
-4089(Wash-)X
-727 1620(ington,)N
-971(D.C.,)X
-1162(January)X
-1432(1990.)X
-555 1800([POSIX91])N
-955(``Unapproved)X
-1441(Draft)X
-1645(for)X
-1773(Realtime)X
-2096(Extension)X
-2450(for)X
-2578(Portable)X
-2879(Operating)X
-3234(Systems'',)X
-3608(Draft)X
-3812(11,)X
-3946(October)X
-4239(7,)X
-727 1890(1991,)N
-927(IEEE)X
-1121(Computer)X
-1461(Society.)X
-555 2070([ROSE91])N
-925(Rosenblum,)X
-1341(M.,)X
-1484(Ousterhout,)X
-1892(J.,)X
-1995(``The)X
-2206(Design)X
-2464(and)X
-2611(Implementation)X
-3149(of)X
-3247(a)X
-3314(Log-Structured)X
-3835(File)X
-3990(System'',)X
-2 f
-727 2160(Proceedings)N
-1148(of)X
-1230(the)X
-1348(13th)X
-1510(Symposium)X
-1895(on)X
-1995(Operating)X
-2344(Systems)X
-2618(Principles)X
-1 f
-2947(,)X
-2987(1991.)X
-555 2340([SELT91])N
-904(Seltzer,)X
-1171(M.,)X
-1306(Stonebraker,)X
-1738(M.,)X
-1873(``Read)X
-2116(Optimized)X
-2478(File)X
-2626(Systems:)X
-2938(A)X
-3020(Performance)X
-3454(Evaluation'',)X
-2 f
-3898(Proceedings)X
-727 2430(7th)N
-849(Annual)X
-1100(International)X
-1542(Conference)X
-1932(on)X
-2032(Data)X
-2212(Engineering)X
-1 f
-2608(,)X
-2648(Kobe,)X
-2862(Japan,)X
-3085(April)X
-3274(1991.)X
-555 2610([SPEC88])N
-907(Spector,)X
-1200(Rausch,)X
-1484(Bruell,)X
-1732(``Camelot:)X
-2107(A)X
-2192(Flexible,)X
-2501(Distributed)X
-2888(Transaction)X
-3294(Processing)X
-3668(System'',)X
-2 f
-4004(Proceed-)X
-727 2700(ings)N
-880(of)X
-962(Spring)X
-1195(COMPCON)X
-1606(1988)X
-1 f
-(,)S
-1806(February)X
-2116(1988.)X
-555 2880([SQL86])N
-862(American)X
-1201(National)X
-1499(Standards)X
-1836(Institute,)X
-2139(``Database)X
-2509(Language)X
-2847(SQL'',)X
-3093(ANSI)X
-3301(X3.135-1986)X
-3747(\(ISO)X
-3924(9075\),)X
-4152(May)X
-727 2970(1986.)N
-555 3150([STON81])N
-919(Stonebraker,)X
-1348(M.,)X
-1480(``Operating)X
-1876(System)X
-2132(Support)X
-2406(for)X
-2520(Database)X
-2835(Management'',)X
-2 f
-3348(Communications)X
-3910(of)X
-3992(the)X
-4110(ACM)X
-1 f
-4279(,)X
-727 3240(1981.)N
-555 3420([SULL92])N
-925(Sullivan,)X
-1247(M.,)X
-1394(Olson,)X
-1641(M.,)X
-1788(``An)X
-1976(Index)X
-2195(Implementation)X
-2737(Supporting)X
-3127(Fast)X
-3295(Recovery)X
-3638(for)X
-3767(the)X
-3900(POSTGRES)X
-727 3510(Storage)N
-1014(System'',)X
-1365(to)X
-1469(appear)X
-1726(in)X
-2 f
-1830(Proceedings)X
-2272(8th)X
-2415(Annual)X
-2687(International)X
-3150(Conference)X
-3561(on)X
-3682(Data)X
-3883(Engineering)X
-1 f
-4279(,)X
-727 3600(Tempe,)N
-990(Arizona,)X
-1289(February)X
-1599(1992.)X
-555 3780([TPCB90])N
-914(Transaction)X
-1319(Processing)X
-1692(Performance)X
-2129(Council,)X
-2428(``TPC)X
-2653(Benchmark)X
-3048(B'',)X
-3200(Standard)X
-3510(Speci\256cation,)X
-3973(Waterside)X
-727 3870(Associates,)N
-1110(Fremont,)X
-1421(CA.,)X
-1592(1990.)X
-555 4050([YOUN91])N
-947(Young,)X
-1211(M.)X
-1328(W.,)X
-1470(Thompson,)X
-1858(D.)X
-1962(S.,)X
-2072(Jaffe,)X
-2274(E.,)X
-2388(``A)X
-2525(Modular)X
-2826(Architecture)X
-3253(for)X
-3372(Distributed)X
-3757(Transaction)X
-4161(Pro-)X
-727 4140(cessing'',)N
-2 f
-1057(Proceedings)X
-1478(1991)X
-1658(Winter)X
-1896(Usenix)X
-1 f
-2119(,)X
-2159(Dallas,)X
-2404(TX,)X
-2551(January)X
-2821(1991.)X
-3 f
-755 4263(Margo)N
-1008(I.)X
-1080(Seltzer)X
-1 f
-1338(is)X
-1411(a)X
-1467(Ph.D.)X
-1669(student)X
-1920(in)X
-2002(the)X
-2120(Department)X
-2519(of)X
-2606(Electrical)X
-2934(Engineering)X
-3346(and)X
-3482(Computer)X
-3822(Sciences)X
-4123(at)X
-4201(the)X
-555 4353(University)N
-919(of)X
-1012(California,)X
-1383(Berkeley.)X
-1739(Her)X
-1886(research)X
-2181(interests)X
-2474(include)X
-2735(\256le)X
-2862(systems,)X
-3160(databases,)X
-3513(and)X
-3654(transaction)X
-4031(process-)X
-555 4443(ing)N
-686(systems.)X
-1008(She)X
-1157(spent)X
-1355(several)X
-1612(years)X
-1811(working)X
-2107(at)X
-2194(startup)X
-2441(companies)X
-2813(designing)X
-3153(and)X
-3298(implementing)X
-3771(\256le)X
-3902(systems)X
-4183(and)X
-555 4533(transaction)N
-929(processing)X
-1294(software)X
-1592(and)X
-1729(designing)X
-2061(microprocessors.)X
-2648(Ms.)X
-2791(Seltzer)X
-3035(received)X
-3329(her)X
-3453(AB)X
-3585(in)X
-3668(Applied)X
-3947(Mathemat-)X
-555 4623(ics)N
-664(from)X
-840 0.1953(Harvard/Radcliffe)AX
-1445(College)X
-1714(in)X
-1796(1983.)X
-755 4746(In)N
-845(her)X
-971(spare)X
-1163(time,)X
-1347(Margo)X
-1583(can)X
-1717(usually)X
-1970(be)X
-2068(found)X
-2277(preparing)X
-2607(massive)X
-2887(quantities)X
-3220(of)X
-3309(food)X
-3478(for)X
-3594(hungry)X
-3843(hordes,)X
-4099(study-)X
-555 4836(ing)N
-677(Japanese,)X
-1003(or)X
-1090(playing)X
-1350(soccer)X
-1576(with)X
-1738(an)X
-1834(exciting)X
-2112(Bay)X
-2261(Area)X
-2438(Women's)X
-2770(Soccer)X
-3009(team,)X
-3205(the)X
-3323(Berkeley)X
-3633(Bruisers.)X
-3 f
-755 5049(Michael)N
-1056(A.)X
-1159(Olson)X
-1 f
-1383(is)X
-1461(a)X
-1522(Master's)X
-1828(student)X
-2084(in)X
-2170(the)X
-2292(Department)X
-2695(of)X
-2786(Electrical)X
-3118(Engineering)X
-3534(and)X
-3674(Computer)X
-4018(Sciences)X
-555 5139(at)N
-645(the)X
-774(University)X
-1143(of)X
-1241(California,)X
-1617(Berkeley.)X
-1978(His)X
-2120(primary)X
-2405(interests)X
-2703(are)X
-2833(database)X
-3141(systems)X
-3425(and)X
-3572(mass)X
-3763(storage)X
-4026(systems.)X
-555 5229(Mike)N
-759(spent)X
-963(two)X
-1118(years)X
-1323(working)X
-1625(for)X
-1754(a)X
-1825(commercial)X
-2239(database)X
-2551(system)X
-2808(vendor)X
-3066(before)X
-3307(joining)X
-3567(the)X
-3699(Postgres)X
-4004(Research)X
-555 5319(Group)N
-780(at)X
-858(Berkeley)X
-1168(in)X
-1250(1988.)X
-1470(He)X
-1584(received)X
-1877(his)X
-1990(B.A.)X
-2161(in)X
-2243(Computer)X
-2583(Science)X
-2853(from)X
-3029(Berkeley)X
-3339(in)X
-3421(May)X
-3588(1991.)X
-755 5442(Mike)N
-945(only)X
-1108(recently)X
-1388(transferred)X
-1758(into)X
-1903(Sin)X
-2030(City,)X
-2208(but)X
-2330(is)X
-2403(rapidly)X
-2650(adopting)X
-2950(local)X
-3126(customs)X
-3408(and)X
-3544(coloration.)X
-3929(In)X
-4016(his)X
-4129(spare)X
-555 5532(time,)N
-742(he)X
-843(organizes)X
-1176(informal)X
-1477(Friday)X
-1711(afternoon)X
-2043(study)X
-2240(groups)X
-2482(to)X
-2568(discuss)X
-2823(recent)X
-3044(technical)X
-3358(and)X
-3498(economic)X
-3834(developments.)X
-555 5622(Among)N
-815(his)X
-928(hobbies)X
-1197(are)X
-1316(Charles)X
-1581(Dickens,)X
-1884(Red)X
-2033(Rock,)X
-2242(and)X
-2378(speaking)X
-2683(Dutch)X
-2899(to)X
-2981(anyone)X
-3233(who)X
-3391(will)X
-3535(permit)X
-3764(it.)X
-
-17 p
-%%Trailer
-xt
-
-xs
-
diff --git a/lib/libc/db/hash/Makefile.inc b/lib/libc/db/hash/Makefile.inc
deleted file mode 100644
index 080a1a2..0000000
--- a/lib/libc/db/hash/Makefile.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id$
-
-.PATH: ${.CURDIR}/../libc/db/hash
-
-SRCS+= hash.c hash_bigkey.c hash_buf.c hash_func.c hash_log2.c \
- hash_page.c hsearch.c ndbm.c
diff --git a/lib/libc/db/hash/README b/lib/libc/db/hash/README
deleted file mode 100644
index f29ccf7..0000000
--- a/lib/libc/db/hash/README
+++ /dev/null
@@ -1,72 +0,0 @@
-# @(#)README 8.1 (Berkeley) 6/4/93
-
-This package implements a superset of the hsearch and dbm/ndbm libraries.
-
-Test Programs:
- All test programs which need key/data pairs expect them entered
- with key and data on separate lines
-
- tcreat3.c
- Takes
- bucketsize (bsize),
- fill factor (ffactor), and
- initial number of elements (nelem).
- Creates a hash table named hashtest containing the
- keys/data pairs entered from standard in.
- thash4.c
- Takes
- bucketsize (bsize),
- fill factor (ffactor),
- initial number of elements (nelem)
- bytes of cache (ncached), and
- file from which to read data (fname)
- Creates a table from the key/data pairs on standard in and
- then does a read of each key/data in fname
- tdel.c
- Takes
- bucketsize (bsize), and
- fill factor (ffactor).
- file from which to read data (fname)
- Reads each key/data pair from fname and deletes the
- key from the hash table hashtest
- tseq.c
- Reads the key/data pairs in the file hashtest and writes them
- to standard out.
- tread2.c
- Takes
- butes of cache (ncached).
- Reads key/data pairs from standard in and looks them up
- in the file hashtest.
- tverify.c
- Reads key/data pairs from standard in, looks them up
- in the file hashtest, and verifies that the data is
- correct.
-
-NOTES:
-
-The file search.h is provided for using the hsearch compatible interface
-on BSD systems. On System V derived systems, search.h should appear in
-/usr/include.
-
-The man page ../man/db.3 explains the interface to the hashing system.
-The file hash.ps is a postscript copy of a paper explaining
-the history, implementation, and performance of the hash package.
-
-"bugs" or idiosyncracies
-
-If you have a lot of overflows, it is possible to run out of overflow
-pages. Currently, this will cause a message to be printed on stderr.
-Eventually, this will be indicated by a return error code.
-
-If you are using the ndbm interface and exit without flushing or closing the
-file, you may lose updates since the package buffers all writes. Also,
-the db interface only creates a single database file. To avoid overwriting
-the user's original file, the suffix ".db" is appended to the file name
-passed to dbm_open. Additionally, if your code "knows" about the historic
-.dir and .pag files, it will break.
-
-There is a fundamental difference between this package and the old hsearch.
-Hsearch requires the user to maintain the keys and data in the application's
-allocated memory while hash takes care of all storage management. The down
-side is that the byte strings passed in the ENTRY structure must be null
-terminated (both the keys and the data).
diff --git a/lib/libc/db/hash/extern.h b/lib/libc/db/hash/extern.h
deleted file mode 100644
index 3167e6d..0000000
--- a/lib/libc/db/hash/extern.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)extern.h 8.4 (Berkeley) 6/16/94
- */
-
-BUFHEAD *__add_ovflpage __P((HTAB *, BUFHEAD *));
-int __addel __P((HTAB *, BUFHEAD *, const DBT *, const DBT *));
-int __big_delete __P((HTAB *, BUFHEAD *));
-int __big_insert __P((HTAB *, BUFHEAD *, const DBT *, const DBT *));
-int __big_keydata __P((HTAB *, BUFHEAD *, DBT *, DBT *, int));
-int __big_return __P((HTAB *, BUFHEAD *, int, DBT *, int));
-int __big_split __P((HTAB *, BUFHEAD *, BUFHEAD *, BUFHEAD *,
- int, u_int32_t, SPLIT_RETURN *));
-int __buf_free __P((HTAB *, int, int));
-void __buf_init __P((HTAB *, int));
-u_int32_t __call_hash __P((HTAB *, char *, int));
-int __delpair __P((HTAB *, BUFHEAD *, int));
-int __expand_table __P((HTAB *));
-int __find_bigpair __P((HTAB *, BUFHEAD *, int, char *, int));
-u_int16_t __find_last_page __P((HTAB *, BUFHEAD **));
-void __free_ovflpage __P((HTAB *, BUFHEAD *));
-BUFHEAD *__get_buf __P((HTAB *, u_int32_t, BUFHEAD *, int));
-int __get_page __P((HTAB *, char *, u_int32_t, int, int, int));
-int __ibitmap __P((HTAB *, int, int, int));
-u_int32_t __log2 __P((u_int32_t));
-int __put_page __P((HTAB *, char *, u_int32_t, int, int));
-void __reclaim_buf __P((HTAB *, BUFHEAD *));
-int __split_page __P((HTAB *, u_int32_t, u_int32_t));
-
-/* Default hash routine. */
-extern u_int32_t (*__default_hash) __P((const void *, size_t));
-
-#ifdef HASH_STATISTICS
-extern int hash_accesses, hash_collisions, hash_expansions, hash_overflows;
-#endif
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
deleted file mode 100644
index 7d000dc..0000000
--- a/lib/libc/db/hash/hash.c
+++ /dev/null
@@ -1,1001 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#ifdef DEBUG
-#include <assert.h>
-#endif
-
-#include <db.h>
-#include "hash.h"
-#include "page.h"
-#include "extern.h"
-
-static int alloc_segs __P((HTAB *, int));
-static int flush_meta __P((HTAB *));
-static int hash_access __P((HTAB *, ACTION, DBT *, DBT *));
-static int hash_close __P((DB *));
-static int hash_delete __P((const DB *, const DBT *, u_int32_t));
-static int hash_fd __P((const DB *));
-static int hash_get __P((const DB *, const DBT *, DBT *, u_int32_t));
-static int hash_put __P((const DB *, DBT *, const DBT *, u_int32_t));
-static void *hash_realloc __P((SEGMENT **, int, int));
-static int hash_seq __P((const DB *, DBT *, DBT *, u_int32_t));
-static int hash_sync __P((const DB *, u_int32_t));
-static int hdestroy __P((HTAB *));
-static HTAB *init_hash __P((HTAB *, const char *, HASHINFO *));
-static int init_htab __P((HTAB *, int));
-#if BYTE_ORDER == LITTLE_ENDIAN
-static void swap_header __P((HTAB *));
-static void swap_header_copy __P((HASHHDR *, HASHHDR *));
-#endif
-
-/* Fast arithmetic, relying on powers of 2, */
-#define MOD(x, y) ((x) & ((y) - 1))
-
-#define RETURN_ERROR(ERR, LOC) { save_errno = ERR; goto LOC; }
-
-/* Return values */
-#define SUCCESS (0)
-#define ERROR (-1)
-#define ABNORMAL (1)
-
-#ifdef HASH_STATISTICS
-int hash_accesses, hash_collisions, hash_expansions, hash_overflows;
-#endif
-
-/************************** INTERFACE ROUTINES ***************************/
-/* OPEN/CLOSE */
-
-extern DB *
-__hash_open(file, flags, mode, info, dflags)
- const char *file;
- int flags, mode, dflags;
- const HASHINFO *info; /* Special directives for create */
-{
- HTAB *hashp;
- struct stat statbuf;
- DB *dbp;
- int bpages, hdrsize, new_table, nsegs, save_errno;
-
- if ((flags & O_ACCMODE) == O_WRONLY) {
- errno = EINVAL;
- return (NULL);
- }
-
- if (!(hashp = (HTAB *)calloc(1, sizeof(HTAB))))
- return (NULL);
- hashp->fp = -1;
-
- /*
- * Even if user wants write only, we need to be able to read
- * the actual file, so we need to open it read/write. But, the
- * field in the hashp structure needs to be accurate so that
- * we can check accesses.
- */
- hashp->flags = flags;
-
- new_table = 0;
- if (!file || (flags & O_TRUNC) ||
- (stat(file, &statbuf) && (errno == ENOENT))) {
- if (errno == ENOENT)
- errno = 0; /* Just in case someone looks at errno */
- new_table = 1;
- }
- if (file) {
- if ((hashp->fp = open(file, flags, mode)) == -1)
- RETURN_ERROR(errno, error0);
-
- /* if the .db file is empty, and we had permission to create
- a new .db file, then reinitialize the database */
- if ((flags & O_CREAT) &&
- fstat(hashp->fp, &statbuf) == 0 && statbuf.st_size == 0)
- new_table = 1;
-
- (void)fcntl(hashp->fp, F_SETFD, 1);
- }
- if (new_table) {
- if (!(hashp = init_hash(hashp, file, (HASHINFO *)info)))
- RETURN_ERROR(errno, error1);
- } else {
- /* Table already exists */
- if (info && info->hash)
- hashp->hash = info->hash;
- else
- hashp->hash = __default_hash;
-
- hdrsize = read(hashp->fp, &hashp->hdr, sizeof(HASHHDR));
-#if BYTE_ORDER == LITTLE_ENDIAN
- swap_header(hashp);
-#endif
- if (hdrsize == -1)
- RETURN_ERROR(errno, error1);
- if (hdrsize != sizeof(HASHHDR))
- RETURN_ERROR(EFTYPE, error1);
- /* Verify file type, versions and hash function */
- if (hashp->MAGIC != HASHMAGIC)
- RETURN_ERROR(EFTYPE, error1);
-#define OLDHASHVERSION 1
- if (hashp->VERSION != HASHVERSION &&
- hashp->VERSION != OLDHASHVERSION)
- RETURN_ERROR(EFTYPE, error1);
- if (hashp->hash(CHARKEY, sizeof(CHARKEY)) != hashp->H_CHARKEY)
- RETURN_ERROR(EFTYPE, error1);
- /*
- * Figure out how many segments we need. Max_Bucket is the
- * maximum bucket number, so the number of buckets is
- * max_bucket + 1.
- */
- nsegs = (hashp->MAX_BUCKET + 1 + hashp->SGSIZE - 1) /
- hashp->SGSIZE;
- hashp->nsegs = 0;
- if (alloc_segs(hashp, nsegs))
- /*
- * If alloc_segs fails, table will have been destroyed
- * and errno will have been set.
- */
- return (NULL);
- /* Read in bitmaps */
- bpages = (hashp->SPARES[hashp->OVFL_POINT] +
- (hashp->BSIZE << BYTE_SHIFT) - 1) >>
- (hashp->BSHIFT + BYTE_SHIFT);
-
- hashp->nmaps = bpages;
- (void)memset(&hashp->mapp[0], 0, bpages * sizeof(u_int32_t *));
- }
-
- /* Initialize Buffer Manager */
- if (info && info->cachesize)
- __buf_init(hashp, info->cachesize);
- else
- __buf_init(hashp, DEF_BUFSIZE);
-
- hashp->new_file = new_table;
- hashp->save_file = file && (hashp->flags & O_RDWR);
- hashp->cbucket = -1;
- if (!(dbp = (DB *)malloc(sizeof(DB)))) {
- save_errno = errno;
- hdestroy(hashp);
- errno = save_errno;
- return (NULL);
- }
- dbp->internal = hashp;
- dbp->close = hash_close;
- dbp->del = hash_delete;
- dbp->fd = hash_fd;
- dbp->get = hash_get;
- dbp->put = hash_put;
- dbp->seq = hash_seq;
- dbp->sync = hash_sync;
- dbp->type = DB_HASH;
-
-#ifdef DEBUG
- (void)fprintf(stderr,
-"%s\n%s%x\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%d\n%s%x\n%s%x\n%s%d\n%s%d\n",
- "init_htab:",
- "TABLE POINTER ", hashp,
- "BUCKET SIZE ", hashp->BSIZE,
- "BUCKET SHIFT ", hashp->BSHIFT,
- "DIRECTORY SIZE ", hashp->DSIZE,
- "SEGMENT SIZE ", hashp->SGSIZE,
- "SEGMENT SHIFT ", hashp->SSHIFT,
- "FILL FACTOR ", hashp->FFACTOR,
- "MAX BUCKET ", hashp->MAX_BUCKET,
- "OVFL POINT ", hashp->OVFL_POINT,
- "LAST FREED ", hashp->LAST_FREED,
- "HIGH MASK ", hashp->HIGH_MASK,
- "LOW MASK ", hashp->LOW_MASK,
- "NSEGS ", hashp->nsegs,
- "NKEYS ", hashp->NKEYS);
-#endif
-#ifdef HASH_STATISTICS
- hash_overflows = hash_accesses = hash_collisions = hash_expansions = 0;
-#endif
- return (dbp);
-
-error1:
- if (hashp != NULL)
- (void)close(hashp->fp);
-
-error0:
- free(hashp);
- errno = save_errno;
- return (NULL);
-}
-
-static int
-hash_close(dbp)
- DB *dbp;
-{
- HTAB *hashp;
- int retval;
-
- if (!dbp)
- return (ERROR);
-
- hashp = (HTAB *)dbp->internal;
- retval = hdestroy(hashp);
- free(dbp);
- return (retval);
-}
-
-static int
-hash_fd(dbp)
- const DB *dbp;
-{
- HTAB *hashp;
-
- if (!dbp)
- return (ERROR);
-
- hashp = (HTAB *)dbp->internal;
- if (hashp->fp == -1) {
- errno = ENOENT;
- return (-1);
- }
- return (hashp->fp);
-}
-
-/************************** LOCAL CREATION ROUTINES **********************/
-static HTAB *
-init_hash(hashp, file, info)
- HTAB *hashp;
- const char *file;
- HASHINFO *info;
-{
- struct stat statbuf;
- int nelem;
-
- nelem = 1;
- hashp->NKEYS = 0;
- hashp->LORDER = BYTE_ORDER;
- hashp->BSIZE = DEF_BUCKET_SIZE;
- hashp->BSHIFT = DEF_BUCKET_SHIFT;
- hashp->SGSIZE = DEF_SEGSIZE;
- hashp->SSHIFT = DEF_SEGSIZE_SHIFT;
- hashp->DSIZE = DEF_DIRSIZE;
- hashp->FFACTOR = DEF_FFACTOR;
- hashp->hash = __default_hash;
- memset(hashp->SPARES, 0, sizeof(hashp->SPARES));
- memset(hashp->BITMAPS, 0, sizeof (hashp->BITMAPS));
-
- /* Fix bucket size to be optimal for file system */
- if (file != NULL) {
- if (stat(file, &statbuf))
- return (NULL);
- hashp->BSIZE = statbuf.st_blksize;
- hashp->BSHIFT = __log2(hashp->BSIZE);
- }
-
- if (info) {
- if (info->bsize) {
- /* Round pagesize up to power of 2 */
- hashp->BSHIFT = __log2(info->bsize);
- hashp->BSIZE = 1 << hashp->BSHIFT;
- if (hashp->BSIZE > MAX_BSIZE) {
- errno = EINVAL;
- return (NULL);
- }
- }
- if (info->ffactor)
- hashp->FFACTOR = info->ffactor;
- if (info->hash)
- hashp->hash = info->hash;
- if (info->nelem)
- nelem = info->nelem;
- if (info->lorder) {
- if (info->lorder != BIG_ENDIAN &&
- info->lorder != LITTLE_ENDIAN) {
- errno = EINVAL;
- return (NULL);
- }
- hashp->LORDER = info->lorder;
- }
- }
- /* init_htab should destroy the table and set errno if it fails */
- if (init_htab(hashp, nelem))
- return (NULL);
- else
- return (hashp);
-}
-/*
- * This calls alloc_segs which may run out of memory. Alloc_segs will destroy
- * the table and set errno, so we just pass the error information along.
- *
- * Returns 0 on No Error
- */
-static int
-init_htab(hashp, nelem)
- HTAB *hashp;
- int nelem;
-{
- register int nbuckets, nsegs;
- int l2;
-
- /*
- * Divide number of elements by the fill factor and determine a
- * desired number of buckets. Allocate space for the next greater
- * power of two number of buckets.
- */
- nelem = (nelem - 1) / hashp->FFACTOR + 1;
-
- l2 = __log2(MAX(nelem, 2));
- nbuckets = 1 << l2;
-
- hashp->SPARES[l2] = l2 + 1;
- hashp->SPARES[l2 + 1] = l2 + 1;
- hashp->OVFL_POINT = l2;
- hashp->LAST_FREED = 2;
-
- /* First bitmap page is at: splitpoint l2 page offset 1 */
- if (__ibitmap(hashp, OADDR_OF(l2, 1), l2 + 1, 0))
- return (-1);
-
- hashp->MAX_BUCKET = hashp->LOW_MASK = nbuckets - 1;
- hashp->HIGH_MASK = (nbuckets << 1) - 1;
- hashp->HDRPAGES = ((MAX(sizeof(HASHHDR), MINHDRSIZE) - 1) >>
- hashp->BSHIFT) + 1;
-
- nsegs = (nbuckets - 1) / hashp->SGSIZE + 1;
- nsegs = 1 << __log2(nsegs);
-
- if (nsegs > hashp->DSIZE)
- hashp->DSIZE = nsegs;
- return (alloc_segs(hashp, nsegs));
-}
-
-/********************** DESTROY/CLOSE ROUTINES ************************/
-
-/*
- * Flushes any changes to the file if necessary and destroys the hashp
- * structure, freeing all allocated space.
- */
-static int
-hdestroy(hashp)
- HTAB *hashp;
-{
- int i, save_errno;
-
- save_errno = 0;
-
-#ifdef HASH_STATISTICS
- (void)fprintf(stderr, "hdestroy: accesses %ld collisions %ld\n",
- hash_accesses, hash_collisions);
- (void)fprintf(stderr, "hdestroy: expansions %ld\n",
- hash_expansions);
- (void)fprintf(stderr, "hdestroy: overflows %ld\n",
- hash_overflows);
- (void)fprintf(stderr, "keys %ld maxp %d segmentcount %d\n",
- hashp->NKEYS, hashp->MAX_BUCKET, hashp->nsegs);
-
- for (i = 0; i < NCACHED; i++)
- (void)fprintf(stderr,
- "spares[%d] = %d\n", i, hashp->SPARES[i]);
-#endif
- /*
- * Call on buffer manager to free buffers, and if required,
- * write them to disk.
- */
- if (__buf_free(hashp, 1, hashp->save_file))
- save_errno = errno;
- if (hashp->dir) {
- free(*hashp->dir); /* Free initial segments */
- /* Free extra segments */
- while (hashp->exsegs--)
- free(hashp->dir[--hashp->nsegs]);
- free(hashp->dir);
- }
- if (flush_meta(hashp) && !save_errno)
- save_errno = errno;
- /* Free Bigmaps */
- for (i = 0; i < hashp->nmaps; i++)
- if (hashp->mapp[i])
- free(hashp->mapp[i]);
-
- if (hashp->fp != -1)
- (void)close(hashp->fp);
-
- free(hashp);
-
- if (save_errno) {
- errno = save_errno;
- return (ERROR);
- }
- return (SUCCESS);
-}
-/*
- * Write modified pages to disk
- *
- * Returns:
- * 0 == OK
- * -1 ERROR
- */
-static int
-hash_sync(dbp, flags)
- const DB *dbp;
- u_int32_t flags;
-{
- HTAB *hashp;
-
- if (flags != 0) {
- errno = EINVAL;
- return (ERROR);
- }
-
- if (!dbp)
- return (ERROR);
-
- hashp = (HTAB *)dbp->internal;
- if (!hashp->save_file)
- return (0);
- if (__buf_free(hashp, 0, 1) || flush_meta(hashp))
- return (ERROR);
- hashp->new_file = 0;
- return (0);
-}
-
-/*
- * Returns:
- * 0 == OK
- * -1 indicates that errno should be set
- */
-static int
-flush_meta(hashp)
- HTAB *hashp;
-{
- HASHHDR *whdrp;
-#if BYTE_ORDER == LITTLE_ENDIAN
- HASHHDR whdr;
-#endif
- int fp, i, wsize;
-
- if (!hashp->save_file)
- return (0);
- hashp->MAGIC = HASHMAGIC;
- hashp->VERSION = HASHVERSION;
- hashp->H_CHARKEY = hashp->hash(CHARKEY, sizeof(CHARKEY));
-
- fp = hashp->fp;
- whdrp = &hashp->hdr;
-#if BYTE_ORDER == LITTLE_ENDIAN
- whdrp = &whdr;
- swap_header_copy(&hashp->hdr, whdrp);
-#endif
- if ((lseek(fp, (off_t)0, SEEK_SET) == -1) ||
- ((wsize = write(fp, whdrp, sizeof(HASHHDR))) == -1))
- return (-1);
- else
- if (wsize != sizeof(HASHHDR)) {
- errno = EFTYPE;
- hashp->error = errno;
- return (-1);
- }
- for (i = 0; i < NCACHED; i++)
- if (hashp->mapp[i])
- if (__put_page(hashp, (char *)hashp->mapp[i],
- hashp->BITMAPS[i], 0, 1))
- return (-1);
- return (0);
-}
-
-/*******************************SEARCH ROUTINES *****************************/
-/*
- * All the access routines return
- *
- * Returns:
- * 0 on SUCCESS
- * 1 to indicate an external ERROR (i.e. key not found, etc)
- * -1 to indicate an internal ERROR (i.e. out of memory, etc)
- */
-static int
-hash_get(dbp, key, data, flag)
- const DB *dbp;
- const DBT *key;
- DBT *data;
- u_int32_t flag;
-{
- HTAB *hashp;
-
- hashp = (HTAB *)dbp->internal;
- if (flag) {
- hashp->error = errno = EINVAL;
- return (ERROR);
- }
- return (hash_access(hashp, HASH_GET, (DBT *)key, data));
-}
-
-static int
-hash_put(dbp, key, data, flag)
- const DB *dbp;
- DBT *key;
- const DBT *data;
- u_int32_t flag;
-{
- HTAB *hashp;
-
- hashp = (HTAB *)dbp->internal;
- if (flag && flag != R_NOOVERWRITE) {
- hashp->error = errno = EINVAL;
- return (ERROR);
- }
- if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
- hashp->error = errno = EPERM;
- return (ERROR);
- }
- return (hash_access(hashp, flag == R_NOOVERWRITE ?
- HASH_PUTNEW : HASH_PUT, (DBT *)key, (DBT *)data));
-}
-
-static int
-hash_delete(dbp, key, flag)
- const DB *dbp;
- const DBT *key;
- u_int32_t flag; /* Ignored */
-{
- HTAB *hashp;
-
- hashp = (HTAB *)dbp->internal;
- if (flag && flag != R_CURSOR) {
- hashp->error = errno = EINVAL;
- return (ERROR);
- }
- if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
- hashp->error = errno = EPERM;
- return (ERROR);
- }
- return (hash_access(hashp, HASH_DELETE, (DBT *)key, NULL));
-}
-
-/*
- * Assume that hashp has been set in wrapper routine.
- */
-static int
-hash_access(hashp, action, key, val)
- HTAB *hashp;
- ACTION action;
- DBT *key, *val;
-{
- register BUFHEAD *rbufp;
- BUFHEAD *bufp, *save_bufp;
- register u_int16_t *bp;
- register int n, ndx, off, size;
- register char *kp;
- u_int16_t pageno;
-
-#ifdef HASH_STATISTICS
- hash_accesses++;
-#endif
-
- off = hashp->BSIZE;
- size = key->size;
- kp = (char *)key->data;
- rbufp = __get_buf(hashp, __call_hash(hashp, kp, size), NULL, 0);
- if (!rbufp)
- return (ERROR);
- save_bufp = rbufp;
-
- /* Pin the bucket chain */
- rbufp->flags |= BUF_PIN;
- for (bp = (u_int16_t *)rbufp->page, n = *bp++, ndx = 1; ndx < n;)
- if (bp[1] >= REAL_KEY) {
- /* Real key/data pair */
- if (size == off - *bp &&
- memcmp(kp, rbufp->page + *bp, size) == 0)
- goto found;
- off = bp[1];
-#ifdef HASH_STATISTICS
- hash_collisions++;
-#endif
- bp += 2;
- ndx += 2;
- } else if (bp[1] == OVFLPAGE) {
- rbufp = __get_buf(hashp, *bp, rbufp, 0);
- if (!rbufp) {
- save_bufp->flags &= ~BUF_PIN;
- return (ERROR);
- }
- /* FOR LOOP INIT */
- bp = (u_int16_t *)rbufp->page;
- n = *bp++;
- ndx = 1;
- off = hashp->BSIZE;
- } else if (bp[1] < REAL_KEY) {
- if ((ndx =
- __find_bigpair(hashp, rbufp, ndx, kp, size)) > 0)
- goto found;
- if (ndx == -2) {
- bufp = rbufp;
- if (!(pageno =
- __find_last_page(hashp, &bufp))) {
- ndx = 0;
- rbufp = bufp;
- break; /* FOR */
- }
- rbufp = __get_buf(hashp, pageno, bufp, 0);
- if (!rbufp) {
- save_bufp->flags &= ~BUF_PIN;
- return (ERROR);
- }
- /* FOR LOOP INIT */
- bp = (u_int16_t *)rbufp->page;
- n = *bp++;
- ndx = 1;
- off = hashp->BSIZE;
- } else {
- save_bufp->flags &= ~BUF_PIN;
- return (ERROR);
- }
- }
-
- /* Not found */
- switch (action) {
- case HASH_PUT:
- case HASH_PUTNEW:
- if (__addel(hashp, rbufp, key, val)) {
- save_bufp->flags &= ~BUF_PIN;
- return (ERROR);
- } else {
- save_bufp->flags &= ~BUF_PIN;
- return (SUCCESS);
- }
- case HASH_GET:
- case HASH_DELETE:
- default:
- save_bufp->flags &= ~BUF_PIN;
- return (ABNORMAL);
- }
-
-found:
- switch (action) {
- case HASH_PUTNEW:
- save_bufp->flags &= ~BUF_PIN;
- return (ABNORMAL);
- case HASH_GET:
- bp = (u_int16_t *)rbufp->page;
- if (bp[ndx + 1] < REAL_KEY) {
- if (__big_return(hashp, rbufp, ndx, val, 0))
- return (ERROR);
- } else {
- val->data = (u_char *)rbufp->page + (int)bp[ndx + 1];
- val->size = bp[ndx] - bp[ndx + 1];
- }
- break;
- case HASH_PUT:
- if ((__delpair(hashp, rbufp, ndx)) ||
- (__addel(hashp, rbufp, key, val))) {
- save_bufp->flags &= ~BUF_PIN;
- return (ERROR);
- }
- break;
- case HASH_DELETE:
- if (__delpair(hashp, rbufp, ndx))
- return (ERROR);
- break;
- default:
- abort();
- }
- save_bufp->flags &= ~BUF_PIN;
- return (SUCCESS);
-}
-
-static int
-hash_seq(dbp, key, data, flag)
- const DB *dbp;
- DBT *key, *data;
- u_int32_t flag;
-{
- register u_int32_t bucket;
- register BUFHEAD *bufp;
- HTAB *hashp;
- u_int16_t *bp, ndx;
-
- hashp = (HTAB *)dbp->internal;
- if (flag && flag != R_FIRST && flag != R_NEXT) {
- hashp->error = errno = EINVAL;
- return (ERROR);
- }
-#ifdef HASH_STATISTICS
- hash_accesses++;
-#endif
- if ((hashp->cbucket < 0) || (flag == R_FIRST)) {
- hashp->cbucket = 0;
- hashp->cndx = 1;
- hashp->cpage = NULL;
- }
-
- for (bp = NULL; !bp || !bp[0]; ) {
- if (!(bufp = hashp->cpage)) {
- for (bucket = hashp->cbucket;
- bucket <= hashp->MAX_BUCKET;
- bucket++, hashp->cndx = 1) {
- bufp = __get_buf(hashp, bucket, NULL, 0);
- if (!bufp)
- return (ERROR);
- hashp->cpage = bufp;
- bp = (u_int16_t *)bufp->page;
- if (bp[0])
- break;
- }
- hashp->cbucket = bucket;
- if (hashp->cbucket > hashp->MAX_BUCKET) {
- hashp->cbucket = -1;
- return (ABNORMAL);
- }
- } else
- bp = (u_int16_t *)hashp->cpage->page;
-
-#ifdef DEBUG
- assert(bp);
- assert(bufp);
-#endif
- while (bp[hashp->cndx + 1] == OVFLPAGE) {
- bufp = hashp->cpage =
- __get_buf(hashp, bp[hashp->cndx], bufp, 0);
- if (!bufp)
- return (ERROR);
- bp = (u_int16_t *)(bufp->page);
- hashp->cndx = 1;
- }
- if (!bp[0]) {
- hashp->cpage = NULL;
- ++hashp->cbucket;
- }
- }
- ndx = hashp->cndx;
- if (bp[ndx + 1] < REAL_KEY) {
- if (__big_keydata(hashp, bufp, key, data, 1))
- return (ERROR);
- } else {
- key->data = (u_char *)hashp->cpage->page + bp[ndx];
- key->size = (ndx > 1 ? bp[ndx - 1] : hashp->BSIZE) - bp[ndx];
- data->data = (u_char *)hashp->cpage->page + bp[ndx + 1];
- data->size = bp[ndx] - bp[ndx + 1];
- ndx += 2;
- if (ndx > bp[0]) {
- hashp->cpage = NULL;
- hashp->cbucket++;
- hashp->cndx = 1;
- } else
- hashp->cndx = ndx;
- }
- return (SUCCESS);
-}
-
-/********************************* UTILITIES ************************/
-
-/*
- * Returns:
- * 0 ==> OK
- * -1 ==> Error
- */
-extern int
-__expand_table(hashp)
- HTAB *hashp;
-{
- u_int32_t old_bucket, new_bucket;
- int dirsize, new_segnum, spare_ndx;
-
-#ifdef HASH_STATISTICS
- hash_expansions++;
-#endif
- new_bucket = ++hashp->MAX_BUCKET;
- old_bucket = (hashp->MAX_BUCKET & hashp->LOW_MASK);
-
- new_segnum = new_bucket >> hashp->SSHIFT;
-
- /* Check if we need a new segment */
- if (new_segnum >= hashp->nsegs) {
- /* Check if we need to expand directory */
- if (new_segnum >= hashp->DSIZE) {
- /* Reallocate directory */
- dirsize = hashp->DSIZE * sizeof(SEGMENT *);
- if (!hash_realloc(&hashp->dir, dirsize, dirsize << 1))
- return (-1);
- hashp->DSIZE = dirsize << 1;
- }
- if ((hashp->dir[new_segnum] =
- (SEGMENT)calloc(hashp->SGSIZE, sizeof(SEGMENT))) == NULL)
- return (-1);
- hashp->exsegs++;
- hashp->nsegs++;
- }
- /*
- * If the split point is increasing (MAX_BUCKET's log base 2
- * * increases), we need to copy the current contents of the spare
- * split bucket to the next bucket.
- */
- spare_ndx = __log2(hashp->MAX_BUCKET + 1);
- if (spare_ndx > hashp->OVFL_POINT) {
- hashp->SPARES[spare_ndx] = hashp->SPARES[hashp->OVFL_POINT];
- hashp->OVFL_POINT = spare_ndx;
- }
-
- if (new_bucket > hashp->HIGH_MASK) {
- /* Starting a new doubling */
- hashp->LOW_MASK = hashp->HIGH_MASK;
- hashp->HIGH_MASK = new_bucket | hashp->LOW_MASK;
- }
- /* Relocate records to the new bucket */
- return (__split_page(hashp, old_bucket, new_bucket));
-}
-
-/*
- * If realloc guarantees that the pointer is not destroyed if the realloc
- * fails, then this routine can go away.
- */
-static void *
-hash_realloc(p_ptr, oldsize, newsize)
- SEGMENT **p_ptr;
- int oldsize, newsize;
-{
- register void *p;
-
- if ( (p = malloc(newsize)) ) {
- memmove(p, *p_ptr, oldsize);
- memset((char *)p + oldsize, 0, newsize - oldsize);
- free(*p_ptr);
- *p_ptr = p;
- }
- return (p);
-}
-
-extern u_int32_t
-__call_hash(hashp, k, len)
- HTAB *hashp;
- char *k;
- int len;
-{
- int n, bucket;
-
- n = hashp->hash(k, len);
- bucket = n & hashp->HIGH_MASK;
- if (bucket > hashp->MAX_BUCKET)
- bucket = bucket & hashp->LOW_MASK;
- return (bucket);
-}
-
-/*
- * Allocate segment table. On error, destroy the table and set errno.
- *
- * Returns 0 on success
- */
-static int
-alloc_segs(hashp, nsegs)
- HTAB *hashp;
- int nsegs;
-{
- register int i;
- register SEGMENT store;
-
- int save_errno;
-
- if ((hashp->dir =
- (SEGMENT *)calloc(hashp->DSIZE, sizeof(SEGMENT *))) == NULL) {
- save_errno = errno;
- (void)hdestroy(hashp);
- errno = save_errno;
- return (-1);
- }
- /* Allocate segments */
- if ((store =
- (SEGMENT)calloc(nsegs << hashp->SSHIFT, sizeof(SEGMENT))) == NULL) {
- save_errno = errno;
- (void)hdestroy(hashp);
- errno = save_errno;
- return (-1);
- }
- for (i = 0; i < nsegs; i++, hashp->nsegs++)
- hashp->dir[i] = &store[i << hashp->SSHIFT];
- return (0);
-}
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-/*
- * Hashp->hdr needs to be byteswapped.
- */
-static void
-swap_header_copy(srcp, destp)
- HASHHDR *srcp, *destp;
-{
- int i;
-
- P_32_COPY(srcp->magic, destp->magic);
- P_32_COPY(srcp->version, destp->version);
- P_32_COPY(srcp->lorder, destp->lorder);
- P_32_COPY(srcp->bsize, destp->bsize);
- P_32_COPY(srcp->bshift, destp->bshift);
- P_32_COPY(srcp->dsize, destp->dsize);
- P_32_COPY(srcp->ssize, destp->ssize);
- P_32_COPY(srcp->sshift, destp->sshift);
- P_32_COPY(srcp->ovfl_point, destp->ovfl_point);
- P_32_COPY(srcp->last_freed, destp->last_freed);
- P_32_COPY(srcp->max_bucket, destp->max_bucket);
- P_32_COPY(srcp->high_mask, destp->high_mask);
- P_32_COPY(srcp->low_mask, destp->low_mask);
- P_32_COPY(srcp->ffactor, destp->ffactor);
- P_32_COPY(srcp->nkeys, destp->nkeys);
- P_32_COPY(srcp->hdrpages, destp->hdrpages);
- P_32_COPY(srcp->h_charkey, destp->h_charkey);
- for (i = 0; i < NCACHED; i++) {
- P_32_COPY(srcp->spares[i], destp->spares[i]);
- P_16_COPY(srcp->bitmaps[i], destp->bitmaps[i]);
- }
-}
-
-static void
-swap_header(hashp)
- HTAB *hashp;
-{
- HASHHDR *hdrp;
- int i;
-
- hdrp = &hashp->hdr;
-
- M_32_SWAP(hdrp->magic);
- M_32_SWAP(hdrp->version);
- M_32_SWAP(hdrp->lorder);
- M_32_SWAP(hdrp->bsize);
- M_32_SWAP(hdrp->bshift);
- M_32_SWAP(hdrp->dsize);
- M_32_SWAP(hdrp->ssize);
- M_32_SWAP(hdrp->sshift);
- M_32_SWAP(hdrp->ovfl_point);
- M_32_SWAP(hdrp->last_freed);
- M_32_SWAP(hdrp->max_bucket);
- M_32_SWAP(hdrp->high_mask);
- M_32_SWAP(hdrp->low_mask);
- M_32_SWAP(hdrp->ffactor);
- M_32_SWAP(hdrp->nkeys);
- M_32_SWAP(hdrp->hdrpages);
- M_32_SWAP(hdrp->h_charkey);
- for (i = 0; i < NCACHED; i++) {
- M_32_SWAP(hdrp->spares[i]);
- M_16_SWAP(hdrp->bitmaps[i]);
- }
-}
-#endif
diff --git a/lib/libc/db/hash/hash.h b/lib/libc/db/hash/hash.h
deleted file mode 100644
index 504a9b6..0000000
--- a/lib/libc/db/hash/hash.h
+++ /dev/null
@@ -1,293 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)hash.h 8.3 (Berkeley) 5/31/94
- */
-
-/* Operations */
-typedef enum {
- HASH_GET, HASH_PUT, HASH_PUTNEW, HASH_DELETE, HASH_FIRST, HASH_NEXT
-} ACTION;
-
-/* Buffer Management structures */
-typedef struct _bufhead BUFHEAD;
-
-struct _bufhead {
- BUFHEAD *prev; /* LRU links */
- BUFHEAD *next; /* LRU links */
- BUFHEAD *ovfl; /* Overflow page buffer header */
- u_int32_t addr; /* Address of this page */
- char *page; /* Actual page data */
- char flags;
-#define BUF_MOD 0x0001
-#define BUF_DISK 0x0002
-#define BUF_BUCKET 0x0004
-#define BUF_PIN 0x0008
-};
-
-#define IS_BUCKET(X) ((X) & BUF_BUCKET)
-
-typedef BUFHEAD **SEGMENT;
-
-/* Hash Table Information */
-typedef struct hashhdr { /* Disk resident portion */
- int magic; /* Magic NO for hash tables */
- int version; /* Version ID */
- u_int32_t lorder; /* Byte Order */
- int bsize; /* Bucket/Page Size */
- int bshift; /* Bucket shift */
- int dsize; /* Directory Size */
- int ssize; /* Segment Size */
- int sshift; /* Segment shift */
- int ovfl_point; /* Where overflow pages are being
- * allocated */
- int last_freed; /* Last overflow page freed */
- int max_bucket; /* ID of Maximum bucket in use */
- int high_mask; /* Mask to modulo into entire table */
- int low_mask; /* Mask to modulo into lower half of
- * table */
- int ffactor; /* Fill factor */
- int nkeys; /* Number of keys in hash table */
- int hdrpages; /* Size of table header */
- int h_charkey; /* value of hash(CHARKEY) */
-#define NCACHED 32 /* number of bit maps and spare
- * points */
- int spares[NCACHED];/* spare pages for overflow */
- u_int16_t bitmaps[NCACHED]; /* address of overflow page
- * bitmaps */
-} HASHHDR;
-
-typedef struct htab { /* Memory resident data structure */
- HASHHDR hdr; /* Header */
- int nsegs; /* Number of allocated segments */
- int exsegs; /* Number of extra allocated
- * segments */
- u_int32_t /* Hash function */
- (*hash)__P((const void *, size_t));
- int flags; /* Flag values */
- int fp; /* File pointer */
- char *tmp_buf; /* Temporary Buffer for BIG data */
- char *tmp_key; /* Temporary Buffer for BIG keys */
- BUFHEAD *cpage; /* Current page */
- int cbucket; /* Current bucket */
- int cndx; /* Index of next item on cpage */
- int error; /* Error Number -- for DBM
- * compatability */
- int new_file; /* Indicates if fd is backing store
- * or no */
- int save_file; /* Indicates whether we need to flush
- * file at
- * exit */
- u_int32_t *mapp[NCACHED]; /* Pointers to page maps */
- int nmaps; /* Initial number of bitmaps */
- int nbufs; /* Number of buffers left to
- * allocate */
- BUFHEAD bufhead; /* Header of buffer lru list */
- SEGMENT *dir; /* Hash Bucket directory */
-} HTAB;
-
-/*
- * Constants
- */
-#define MAX_BSIZE 65536 /* 2^16 */
-#define MIN_BUFFERS 6
-#define MINHDRSIZE 512
-#define DEF_BUFSIZE 65536 /* 64 K */
-#define DEF_BUCKET_SIZE 4096
-#define DEF_BUCKET_SHIFT 12 /* log2(BUCKET) */
-#define DEF_SEGSIZE 256
-#define DEF_SEGSIZE_SHIFT 8 /* log2(SEGSIZE) */
-#define DEF_DIRSIZE 256
-#define DEF_FFACTOR 65536
-#define MIN_FFACTOR 4
-#define SPLTMAX 8
-#define CHARKEY "%$sniglet^&"
-#define NUMKEY 1038583
-#define BYTE_SHIFT 3
-#define INT_TO_BYTE 2
-#define INT_BYTE_SHIFT 5
-#define ALL_SET ((u_int32_t)0xFFFFFFFF)
-#define ALL_CLEAR 0
-
-#define PTROF(X) ((BUFHEAD *)((ptrdiff_t)(X)&~0x3))
-#define ISMOD(X) ((u_int32_t)(ptrdiff_t)(X)&0x1)
-#define DOMOD(X) ((X) = (char *)((ptrdiff_t)(X)|0x1))
-#define ISDISK(X) ((u_int32_t)(ptrdiff_t)(X)&0x2)
-#define DODISK(X) ((X) = (char *)((ptrdiff_t)(X)|0x2))
-
-#define BITS_PER_MAP 32
-
-/* Given the address of the beginning of a big map, clear/set the nth bit */
-#define CLRBIT(A, N) ((A)[(N)/BITS_PER_MAP] &= ~(1<<((N)%BITS_PER_MAP)))
-#define SETBIT(A, N) ((A)[(N)/BITS_PER_MAP] |= (1<<((N)%BITS_PER_MAP)))
-#define ISSET(A, N) ((A)[(N)/BITS_PER_MAP] & (1<<((N)%BITS_PER_MAP)))
-
-/* Overflow management */
-/*
- * Overflow page numbers are allocated per split point. At each doubling of
- * the table, we can allocate extra pages. So, an overflow page number has
- * the top 5 bits indicate which split point and the lower 11 bits indicate
- * which page at that split point is indicated (pages within split points are
- * numberered starting with 1).
- */
-
-#define SPLITSHIFT 11
-#define SPLITMASK 0x7FF
-#define SPLITNUM(N) (((u_int32_t)(N)) >> SPLITSHIFT)
-#define OPAGENUM(N) ((N) & SPLITMASK)
-#define OADDR_OF(S,O) ((u_int32_t)((u_int32_t)(S) << SPLITSHIFT) + (O))
-
-#define BUCKET_TO_PAGE(B) \
- (B) + hashp->HDRPAGES + ((B) ? hashp->SPARES[__log2((B)+1)-1] : 0)
-#define OADDR_TO_PAGE(B) \
- BUCKET_TO_PAGE ( (1 << SPLITNUM((B))) -1 ) + OPAGENUM((B));
-
-/*
- * page.h contains a detailed description of the page format.
- *
- * Normally, keys and data are accessed from offset tables in the top of
- * each page which point to the beginning of the key and data. There are
- * four flag values which may be stored in these offset tables which indicate
- * the following:
- *
- *
- * OVFLPAGE Rather than a key data pair, this pair contains
- * the address of an overflow page. The format of
- * the pair is:
- * OVERFLOW_PAGE_NUMBER OVFLPAGE
- *
- * PARTIAL_KEY This must be the first key/data pair on a page
- * and implies that page contains only a partial key.
- * That is, the key is too big to fit on a single page
- * so it starts on this page and continues on the next.
- * The format of the page is:
- * KEY_OFF PARTIAL_KEY OVFL_PAGENO OVFLPAGE
- *
- * KEY_OFF -- offset of the beginning of the key
- * PARTIAL_KEY -- 1
- * OVFL_PAGENO - page number of the next overflow page
- * OVFLPAGE -- 0
- *
- * FULL_KEY This must be the first key/data pair on the page. It
- * is used in two cases.
- *
- * Case 1:
- * There is a complete key on the page but no data
- * (because it wouldn't fit). The next page contains
- * the data.
- *
- * Page format it:
- * KEY_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE
- *
- * KEY_OFF -- offset of the beginning of the key
- * FULL_KEY -- 2
- * OVFL_PAGENO - page number of the next overflow page
- * OVFLPAGE -- 0
- *
- * Case 2:
- * This page contains no key, but part of a large
- * data field, which is continued on the next page.
- *
- * Page format it:
- * DATA_OFF FULL_KEY OVFL_PAGENO OVFL_PAGE
- *
- * KEY_OFF -- offset of the beginning of the data on
- * this page
- * FULL_KEY -- 2
- * OVFL_PAGENO - page number of the next overflow page
- * OVFLPAGE -- 0
- *
- * FULL_KEY_DATA
- * This must be the first key/data pair on the page.
- * There are two cases:
- *
- * Case 1:
- * This page contains a key and the beginning of the
- * data field, but the data field is continued on the
- * next page.
- *
- * Page format is:
- * KEY_OFF FULL_KEY_DATA OVFL_PAGENO DATA_OFF
- *
- * KEY_OFF -- offset of the beginning of the key
- * FULL_KEY_DATA -- 3
- * OVFL_PAGENO - page number of the next overflow page
- * DATA_OFF -- offset of the beginning of the data
- *
- * Case 2:
- * This page contains the last page of a big data pair.
- * There is no key, only the tail end of the data
- * on this page.
- *
- * Page format is:
- * DATA_OFF FULL_KEY_DATA <OVFL_PAGENO> <OVFLPAGE>
- *
- * DATA_OFF -- offset of the beginning of the data on
- * this page
- * FULL_KEY_DATA -- 3
- * OVFL_PAGENO - page number of the next overflow page
- * OVFLPAGE -- 0
- *
- * OVFL_PAGENO and OVFLPAGE are optional (they are
- * not present if there is no next page).
- */
-
-#define OVFLPAGE 0
-#define PARTIAL_KEY 1
-#define FULL_KEY 2
-#define FULL_KEY_DATA 3
-#define REAL_KEY 4
-
-/* Short hands for accessing structure */
-#define BSIZE hdr.bsize
-#define BSHIFT hdr.bshift
-#define DSIZE hdr.dsize
-#define SGSIZE hdr.ssize
-#define SSHIFT hdr.sshift
-#define LORDER hdr.lorder
-#define OVFL_POINT hdr.ovfl_point
-#define LAST_FREED hdr.last_freed
-#define MAX_BUCKET hdr.max_bucket
-#define FFACTOR hdr.ffactor
-#define HIGH_MASK hdr.high_mask
-#define LOW_MASK hdr.low_mask
-#define NKEYS hdr.nkeys
-#define HDRPAGES hdr.hdrpages
-#define SPARES hdr.spares
-#define BITMAPS hdr.bitmaps
-#define VERSION hdr.version
-#define MAGIC hdr.magic
-#define NEXT_FREE hdr.next_free
-#define H_CHARKEY hdr.h_charkey
diff --git a/lib/libc/db/hash/hash_bigkey.c b/lib/libc/db/hash/hash_bigkey.c
deleted file mode 100644
index 0cee07e..0000000
--- a/lib/libc/db/hash/hash_bigkey.c
+++ /dev/null
@@ -1,667 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_bigkey.c 8.3 (Berkeley) 5/31/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * PACKAGE: hash
- * DESCRIPTION:
- * Big key/data handling for the hashing package.
- *
- * ROUTINES:
- * External
- * __big_keydata
- * __big_split
- * __big_insert
- * __big_return
- * __big_delete
- * __find_last_page
- * Internal
- * collect_key
- * collect_data
- */
-
-#include <sys/param.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef DEBUG
-#include <assert.h>
-#endif
-
-#include <db.h>
-#include "hash.h"
-#include "page.h"
-#include "extern.h"
-
-static int collect_key __P((HTAB *, BUFHEAD *, int, DBT *, int));
-static int collect_data __P((HTAB *, BUFHEAD *, int, int));
-
-/*
- * Big_insert
- *
- * You need to do an insert and the key/data pair is too big
- *
- * Returns:
- * 0 ==> OK
- *-1 ==> ERROR
- */
-extern int
-__big_insert(hashp, bufp, key, val)
- HTAB *hashp;
- BUFHEAD *bufp;
- const DBT *key, *val;
-{
- register u_int16_t *p;
- int key_size, n, val_size;
- u_int16_t space, move_bytes, off;
- char *cp, *key_data, *val_data;
-
- cp = bufp->page; /* Character pointer of p. */
- p = (u_int16_t *)cp;
-
- key_data = (char *)key->data;
- key_size = key->size;
- val_data = (char *)val->data;
- val_size = val->size;
-
- /* First move the Key */
- for (space = FREESPACE(p) - BIGOVERHEAD; key_size;
- space = FREESPACE(p) - BIGOVERHEAD) {
- move_bytes = MIN(space, key_size);
- off = OFFSET(p) - move_bytes;
- memmove(cp + off, key_data, move_bytes);
- key_size -= move_bytes;
- key_data += move_bytes;
- n = p[0];
- p[++n] = off;
- p[0] = ++n;
- FREESPACE(p) = off - PAGE_META(n);
- OFFSET(p) = off;
- p[n] = PARTIAL_KEY;
- bufp = __add_ovflpage(hashp, bufp);
- if (!bufp)
- return (-1);
- n = p[0];
- if (!key_size)
- if (FREESPACE(p)) {
- move_bytes = MIN(FREESPACE(p), val_size);
- off = OFFSET(p) - move_bytes;
- p[n] = off;
- memmove(cp + off, val_data, move_bytes);
- val_data += move_bytes;
- val_size -= move_bytes;
- p[n - 2] = FULL_KEY_DATA;
- FREESPACE(p) = FREESPACE(p) - move_bytes;
- OFFSET(p) = off;
- } else
- p[n - 2] = FULL_KEY;
- p = (u_int16_t *)bufp->page;
- cp = bufp->page;
- bufp->flags |= BUF_MOD;
- }
-
- /* Now move the data */
- for (space = FREESPACE(p) - BIGOVERHEAD; val_size;
- space = FREESPACE(p) - BIGOVERHEAD) {
- move_bytes = MIN(space, val_size);
- /*
- * Here's the hack to make sure that if the data ends on the
- * same page as the key ends, FREESPACE is at least one.
- */
- if (space == val_size && val_size == val->size)
- move_bytes--;
- off = OFFSET(p) - move_bytes;
- memmove(cp + off, val_data, move_bytes);
- val_size -= move_bytes;
- val_data += move_bytes;
- n = p[0];
- p[++n] = off;
- p[0] = ++n;
- FREESPACE(p) = off - PAGE_META(n);
- OFFSET(p) = off;
- if (val_size) {
- p[n] = FULL_KEY;
- bufp = __add_ovflpage(hashp, bufp);
- if (!bufp)
- return (-1);
- cp = bufp->page;
- p = (u_int16_t *)cp;
- } else
- p[n] = FULL_KEY_DATA;
- bufp->flags |= BUF_MOD;
- }
- return (0);
-}
-
-/*
- * Called when bufp's page contains a partial key (index should be 1)
- *
- * All pages in the big key/data pair except bufp are freed. We cannot
- * free bufp because the page pointing to it is lost and we can't get rid
- * of its pointer.
- *
- * Returns:
- * 0 => OK
- *-1 => ERROR
- */
-extern int
-__big_delete(hashp, bufp)
- HTAB *hashp;
- BUFHEAD *bufp;
-{
- register BUFHEAD *last_bfp, *rbufp;
- u_int16_t *bp, pageno;
- int key_done, n;
-
- rbufp = bufp;
- last_bfp = NULL;
- bp = (u_int16_t *)bufp->page;
- pageno = 0;
- key_done = 0;
-
- while (!key_done || (bp[2] != FULL_KEY_DATA)) {
- if (bp[2] == FULL_KEY || bp[2] == FULL_KEY_DATA)
- key_done = 1;
-
- /*
- * If there is freespace left on a FULL_KEY_DATA page, then
- * the data is short and fits entirely on this page, and this
- * is the last page.
- */
- if (bp[2] == FULL_KEY_DATA && FREESPACE(bp))
- break;
- pageno = bp[bp[0] - 1];
- rbufp->flags |= BUF_MOD;
- rbufp = __get_buf(hashp, pageno, rbufp, 0);
- if (last_bfp)
- __free_ovflpage(hashp, last_bfp);
- last_bfp = rbufp;
- if (!rbufp)
- return (-1); /* Error. */
- bp = (u_int16_t *)rbufp->page;
- }
-
- /*
- * If we get here then rbufp points to the last page of the big
- * key/data pair. Bufp points to the first one -- it should now be
- * empty pointing to the next page after this pair. Can't free it
- * because we don't have the page pointing to it.
- */
-
- /* This is information from the last page of the pair. */
- n = bp[0];
- pageno = bp[n - 1];
-
- /* Now, bp is the first page of the pair. */
- bp = (u_int16_t *)bufp->page;
- if (n > 2) {
- /* There is an overflow page. */
- bp[1] = pageno;
- bp[2] = OVFLPAGE;
- bufp->ovfl = rbufp->ovfl;
- } else
- /* This is the last page. */
- bufp->ovfl = NULL;
- n -= 2;
- bp[0] = n;
- FREESPACE(bp) = hashp->BSIZE - PAGE_META(n);
- OFFSET(bp) = hashp->BSIZE - 1;
-
- bufp->flags |= BUF_MOD;
- if (rbufp)
- __free_ovflpage(hashp, rbufp);
- if (last_bfp != rbufp)
- __free_ovflpage(hashp, last_bfp);
-
- hashp->NKEYS--;
- return (0);
-}
-/*
- * Returns:
- * 0 = key not found
- * -1 = get next overflow page
- * -2 means key not found and this is big key/data
- * -3 error
- */
-extern int
-__find_bigpair(hashp, bufp, ndx, key, size)
- HTAB *hashp;
- BUFHEAD *bufp;
- int ndx;
- char *key;
- int size;
-{
- register u_int16_t *bp;
- register char *p;
- int ksize;
- u_int16_t bytes;
- char *kkey;
-
- bp = (u_int16_t *)bufp->page;
- p = bufp->page;
- ksize = size;
- kkey = key;
-
- for (bytes = hashp->BSIZE - bp[ndx];
- bytes <= size && bp[ndx + 1] == PARTIAL_KEY;
- bytes = hashp->BSIZE - bp[ndx]) {
- if (memcmp(p + bp[ndx], kkey, bytes))
- return (-2);
- kkey += bytes;
- ksize -= bytes;
- bufp = __get_buf(hashp, bp[ndx + 2], bufp, 0);
- if (!bufp)
- return (-3);
- p = bufp->page;
- bp = (u_int16_t *)p;
- ndx = 1;
- }
-
- if (bytes != ksize || memcmp(p + bp[ndx], kkey, bytes)) {
-#ifdef HASH_STATISTICS
- ++hash_collisions;
-#endif
- return (-2);
- } else
- return (ndx);
-}
-
-/*
- * Given the buffer pointer of the first overflow page of a big pair,
- * find the end of the big pair
- *
- * This will set bpp to the buffer header of the last page of the big pair.
- * It will return the pageno of the overflow page following the last page
- * of the pair; 0 if there isn't any (i.e. big pair is the last key in the
- * bucket)
- */
-extern u_int16_t
-__find_last_page(hashp, bpp)
- HTAB *hashp;
- BUFHEAD **bpp;
-{
- BUFHEAD *bufp;
- u_int16_t *bp, pageno;
- int n;
-
- bufp = *bpp;
- bp = (u_int16_t *)bufp->page;
- for (;;) {
- n = bp[0];
-
- /*
- * This is the last page if: the tag is FULL_KEY_DATA and
- * either only 2 entries OVFLPAGE marker is explicit there
- * is freespace on the page.
- */
- if (bp[2] == FULL_KEY_DATA &&
- ((n == 2) || (bp[n] == OVFLPAGE) || (FREESPACE(bp))))
- break;
-
- pageno = bp[n - 1];
- bufp = __get_buf(hashp, pageno, bufp, 0);
- if (!bufp)
- return (0); /* Need to indicate an error! */
- bp = (u_int16_t *)bufp->page;
- }
-
- *bpp = bufp;
- if (bp[0] > 2)
- return (bp[3]);
- else
- return (0);
-}
-
-/*
- * Return the data for the key/data pair that begins on this page at this
- * index (index should always be 1).
- */
-extern int
-__big_return(hashp, bufp, ndx, val, set_current)
- HTAB *hashp;
- BUFHEAD *bufp;
- int ndx;
- DBT *val;
- int set_current;
-{
- BUFHEAD *save_p;
- u_int16_t *bp, len, off, save_addr;
- char *tp;
-
- bp = (u_int16_t *)bufp->page;
- while (bp[ndx + 1] == PARTIAL_KEY) {
- bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
- if (!bufp)
- return (-1);
- bp = (u_int16_t *)bufp->page;
- ndx = 1;
- }
-
- if (bp[ndx + 1] == FULL_KEY) {
- bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
- if (!bufp)
- return (-1);
- bp = (u_int16_t *)bufp->page;
- save_p = bufp;
- save_addr = save_p->addr;
- off = bp[1];
- len = 0;
- } else
- if (!FREESPACE(bp)) {
- /*
- * This is a hack. We can't distinguish between
- * FULL_KEY_DATA that contains complete data or
- * incomplete data, so we require that if the data
- * is complete, there is at least 1 byte of free
- * space left.
- */
- off = bp[bp[0]];
- len = bp[1] - off;
- save_p = bufp;
- save_addr = bufp->addr;
- bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
- if (!bufp)
- return (-1);
- bp = (u_int16_t *)bufp->page;
- } else {
- /* The data is all on one page. */
- tp = (char *)bp;
- off = bp[bp[0]];
- val->data = (u_char *)tp + off;
- val->size = bp[1] - off;
- if (set_current) {
- if (bp[0] == 2) { /* No more buckets in
- * chain */
- hashp->cpage = NULL;
- hashp->cbucket++;
- hashp->cndx = 1;
- } else {
- hashp->cpage = __get_buf(hashp,
- bp[bp[0] - 1], bufp, 0);
- if (!hashp->cpage)
- return (-1);
- hashp->cndx = 1;
- if (!((u_int16_t *)
- hashp->cpage->page)[0]) {
- hashp->cbucket++;
- hashp->cpage = NULL;
- }
- }
- }
- return (0);
- }
-
- val->size = collect_data(hashp, bufp, (int)len, set_current);
- if (val->size == -1)
- return (-1);
- if (save_p->addr != save_addr) {
- /* We are pretty short on buffers. */
- errno = EINVAL; /* OUT OF BUFFERS */
- return (-1);
- }
- memmove(hashp->tmp_buf, (save_p->page) + off, len);
- val->data = (u_char *)hashp->tmp_buf;
- return (0);
-}
-/*
- * Count how big the total datasize is by recursing through the pages. Then
- * allocate a buffer and copy the data as you recurse up.
- */
-static int
-collect_data(hashp, bufp, len, set)
- HTAB *hashp;
- BUFHEAD *bufp;
- int len, set;
-{
- register u_int16_t *bp;
- register char *p;
- BUFHEAD *xbp;
- u_int16_t save_addr;
- int mylen, totlen;
-
- p = bufp->page;
- bp = (u_int16_t *)p;
- mylen = hashp->BSIZE - bp[1];
- save_addr = bufp->addr;
-
- if (bp[2] == FULL_KEY_DATA) { /* End of Data */
- totlen = len + mylen;
- if (hashp->tmp_buf)
- free(hashp->tmp_buf);
- if ((hashp->tmp_buf = (char *)malloc(totlen)) == NULL)
- return (-1);
- if (set) {
- hashp->cndx = 1;
- if (bp[0] == 2) { /* No more buckets in chain */
- hashp->cpage = NULL;
- hashp->cbucket++;
- } else {
- hashp->cpage =
- __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
- if (!hashp->cpage)
- return (-1);
- else if (!((u_int16_t *)hashp->cpage->page)[0]) {
- hashp->cbucket++;
- hashp->cpage = NULL;
- }
- }
- }
- } else {
- xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
- if (!xbp || ((totlen =
- collect_data(hashp, xbp, len + mylen, set)) < 1))
- return (-1);
- }
- if (bufp->addr != save_addr) {
- errno = EINVAL; /* Out of buffers. */
- return (-1);
- }
- memmove(&hashp->tmp_buf[len], (bufp->page) + bp[1], mylen);
- return (totlen);
-}
-
-/*
- * Fill in the key and data for this big pair.
- */
-extern int
-__big_keydata(hashp, bufp, key, val, set)
- HTAB *hashp;
- BUFHEAD *bufp;
- DBT *key, *val;
- int set;
-{
- key->size = collect_key(hashp, bufp, 0, val, set);
- if (key->size == -1)
- return (-1);
- key->data = (u_char *)hashp->tmp_key;
- return (0);
-}
-
-/*
- * Count how big the total key size is by recursing through the pages. Then
- * collect the data, allocate a buffer and copy the key as you recurse up.
- */
-static int
-collect_key(hashp, bufp, len, val, set)
- HTAB *hashp;
- BUFHEAD *bufp;
- int len;
- DBT *val;
- int set;
-{
- BUFHEAD *xbp;
- char *p;
- int mylen, totlen;
- u_int16_t *bp, save_addr;
-
- p = bufp->page;
- bp = (u_int16_t *)p;
- mylen = hashp->BSIZE - bp[1];
-
- save_addr = bufp->addr;
- totlen = len + mylen;
- if (bp[2] == FULL_KEY || bp[2] == FULL_KEY_DATA) { /* End of Key. */
- if (hashp->tmp_key != NULL)
- free(hashp->tmp_key);
- if ((hashp->tmp_key = (char *)malloc(totlen)) == NULL)
- return (-1);
- if (__big_return(hashp, bufp, 1, val, set))
- return (-1);
- } else {
- xbp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
- if (!xbp || ((totlen =
- collect_key(hashp, xbp, totlen, val, set)) < 1))
- return (-1);
- }
- if (bufp->addr != save_addr) {
- errno = EINVAL; /* MIS -- OUT OF BUFFERS */
- return (-1);
- }
- memmove(&hashp->tmp_key[len], (bufp->page) + bp[1], mylen);
- return (totlen);
-}
-
-/*
- * Returns:
- * 0 => OK
- * -1 => error
- */
-extern int
-__big_split(hashp, op, np, big_keyp, addr, obucket, ret)
- HTAB *hashp;
- BUFHEAD *op; /* Pointer to where to put keys that go in old bucket */
- BUFHEAD *np; /* Pointer to new bucket page */
- /* Pointer to first page containing the big key/data */
- BUFHEAD *big_keyp;
- int addr; /* Address of big_keyp */
- u_int32_t obucket;/* Old Bucket */
- SPLIT_RETURN *ret;
-{
- register BUFHEAD *tmpp;
- register u_int16_t *tp;
- BUFHEAD *bp;
- DBT key, val;
- u_int32_t change;
- u_int16_t free_space, n, off;
-
- bp = big_keyp;
-
- /* Now figure out where the big key/data goes */
- if (__big_keydata(hashp, big_keyp, &key, &val, 0))
- return (-1);
- change = (__call_hash(hashp, key.data, key.size) != obucket);
-
- if ( (ret->next_addr = __find_last_page(hashp, &big_keyp)) ) {
- if (!(ret->nextp =
- __get_buf(hashp, ret->next_addr, big_keyp, 0)))
- return (-1);;
- } else
- ret->nextp = NULL;
-
- /* Now make one of np/op point to the big key/data pair */
-#ifdef DEBUG
- assert(np->ovfl == NULL);
-#endif
- if (change)
- tmpp = np;
- else
- tmpp = op;
-
- tmpp->flags |= BUF_MOD;
-#ifdef DEBUG1
- (void)fprintf(stderr,
- "BIG_SPLIT: %d->ovfl was %d is now %d\n", tmpp->addr,
- (tmpp->ovfl ? tmpp->ovfl->addr : 0), (bp ? bp->addr : 0));
-#endif
- tmpp->ovfl = bp; /* one of op/np point to big_keyp */
- tp = (u_int16_t *)tmpp->page;
-#ifdef DEBUG
- assert(FREESPACE(tp) >= OVFLSIZE);
-#endif
- n = tp[0];
- off = OFFSET(tp);
- free_space = FREESPACE(tp);
- tp[++n] = (u_int16_t)addr;
- tp[++n] = OVFLPAGE;
- tp[0] = n;
- OFFSET(tp) = off;
- FREESPACE(tp) = free_space - OVFLSIZE;
-
- /*
- * Finally, set the new and old return values. BIG_KEYP contains a
- * pointer to the last page of the big key_data pair. Make sure that
- * big_keyp has no following page (2 elements) or create an empty
- * following page.
- */
-
- ret->newp = np;
- ret->oldp = op;
-
- tp = (u_int16_t *)big_keyp->page;
- big_keyp->flags |= BUF_MOD;
- if (tp[0] > 2) {
- /*
- * There may be either one or two offsets on this page. If
- * there is one, then the overflow page is linked on normally
- * and tp[4] is OVFLPAGE. If there are two, tp[4] contains
- * the second offset and needs to get stuffed in after the
- * next overflow page is added.
- */
- n = tp[4];
- free_space = FREESPACE(tp);
- off = OFFSET(tp);
- tp[0] -= 2;
- FREESPACE(tp) = free_space + OVFLSIZE;
- OFFSET(tp) = off;
- tmpp = __add_ovflpage(hashp, big_keyp);
- if (!tmpp)
- return (-1);
- tp[4] = n;
- } else
- tmpp = big_keyp;
-
- if (change)
- ret->newp = tmpp;
- else
- ret->oldp = tmpp;
- return (0);
-}
diff --git a/lib/libc/db/hash/hash_buf.c b/lib/libc/db/hash/hash_buf.c
deleted file mode 100644
index 92e1f93..0000000
--- a/lib/libc/db/hash/hash_buf.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_buf.c 8.5 (Berkeley) 7/15/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * PACKAGE: hash
- *
- * DESCRIPTION:
- * Contains buffer management
- *
- * ROUTINES:
- * External
- * __buf_init
- * __get_buf
- * __buf_free
- * __reclaim_buf
- * Internal
- * newbuf
- */
-
-#include <sys/param.h>
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifdef DEBUG
-#include <assert.h>
-#endif
-
-#include <db.h>
-#include "hash.h"
-#include "page.h"
-#include "extern.h"
-
-static BUFHEAD *newbuf __P((HTAB *, u_int32_t, BUFHEAD *));
-
-/* Unlink B from its place in the lru */
-#define BUF_REMOVE(B) { \
- (B)->prev->next = (B)->next; \
- (B)->next->prev = (B)->prev; \
-}
-
-/* Insert B after P */
-#define BUF_INSERT(B, P) { \
- (B)->next = (P)->next; \
- (B)->prev = (P); \
- (P)->next = (B); \
- (B)->next->prev = (B); \
-}
-
-#define MRU hashp->bufhead.next
-#define LRU hashp->bufhead.prev
-
-#define MRU_INSERT(B) BUF_INSERT((B), &hashp->bufhead)
-#define LRU_INSERT(B) BUF_INSERT((B), LRU)
-
-/*
- * We are looking for a buffer with address "addr". If prev_bp is NULL, then
- * address is a bucket index. If prev_bp is not NULL, then it points to the
- * page previous to an overflow page that we are trying to find.
- *
- * CAVEAT: The buffer header accessed via prev_bp's ovfl field may no longer
- * be valid. Therefore, you must always verify that its address matches the
- * address you are seeking.
- */
-extern BUFHEAD *
-__get_buf(hashp, addr, prev_bp, newpage)
- HTAB *hashp;
- u_int32_t addr;
- BUFHEAD *prev_bp;
- int newpage; /* If prev_bp set, indicates a new overflow page. */
-{
- register BUFHEAD *bp;
- register u_int32_t is_disk_mask;
- register int is_disk, segment_ndx;
- SEGMENT segp;
-
- is_disk = 0;
- is_disk_mask = 0;
- if (prev_bp) {
- bp = prev_bp->ovfl;
- if (!bp || (bp->addr != addr))
- bp = NULL;
- if (!newpage)
- is_disk = BUF_DISK;
- } else {
- /* Grab buffer out of directory */
- segment_ndx = addr & (hashp->SGSIZE - 1);
-
- /* valid segment ensured by __call_hash() */
- segp = hashp->dir[addr >> hashp->SSHIFT];
-#ifdef DEBUG
- assert(segp != NULL);
-#endif
- bp = PTROF(segp[segment_ndx]);
- is_disk_mask = ISDISK(segp[segment_ndx]);
- is_disk = is_disk_mask || !hashp->new_file;
- }
-
- if (!bp) {
- bp = newbuf(hashp, addr, prev_bp);
- if (!bp ||
- __get_page(hashp, bp->page, addr, !prev_bp, is_disk, 0))
- return (NULL);
- if (!prev_bp)
- segp[segment_ndx] =
- (BUFHEAD *)((ptrdiff_t)bp | is_disk_mask);
- } else {
- BUF_REMOVE(bp);
- MRU_INSERT(bp);
- }
- return (bp);
-}
-
-/*
- * We need a buffer for this page. Either allocate one, or evict a resident
- * one (if we have as many buffers as we're allowed) and put this one in.
- *
- * If newbuf finds an error (returning NULL), it also sets errno.
- */
-static BUFHEAD *
-newbuf(hashp, addr, prev_bp)
- HTAB *hashp;
- u_int32_t addr;
- BUFHEAD *prev_bp;
-{
- register BUFHEAD *bp; /* The buffer we're going to use */
- register BUFHEAD *xbp; /* Temp pointer */
- register BUFHEAD *next_xbp;
- SEGMENT segp;
- int segment_ndx;
- u_int16_t oaddr, *shortp;
-
- oaddr = 0;
- bp = LRU;
- /*
- * If LRU buffer is pinned, the buffer pool is too small. We need to
- * allocate more buffers.
- */
- if (hashp->nbufs || (bp->flags & BUF_PIN)) {
- /* Allocate a new one */
- if ((bp = (BUFHEAD *)malloc(sizeof(BUFHEAD))) == NULL)
- return (NULL);
-#ifdef PURIFY
- memset(bp, 0xff, sizeof(BUFHEAD));
-#endif
- if ((bp->page = (char *)malloc(hashp->BSIZE)) == NULL) {
- free(bp);
- return (NULL);
- }
-#ifdef PURIFY
- memset(bp->page, 0xff, hashp->BSIZE);
-#endif
- if (hashp->nbufs)
- hashp->nbufs--;
- } else {
- /* Kick someone out */
- BUF_REMOVE(bp);
- /*
- * If this is an overflow page with addr 0, it's already been
- * flushed back in an overflow chain and initialized.
- */
- if ((bp->addr != 0) || (bp->flags & BUF_BUCKET)) {
- /*
- * Set oaddr before __put_page so that you get it
- * before bytes are swapped.
- */
- shortp = (u_int16_t *)bp->page;
- if (shortp[0])
- oaddr = shortp[shortp[0] - 1];
- if ((bp->flags & BUF_MOD) && __put_page(hashp, bp->page,
- bp->addr, (int)IS_BUCKET(bp->flags), 0))
- return (NULL);
- /*
- * Update the pointer to this page (i.e. invalidate it).
- *
- * If this is a new file (i.e. we created it at open
- * time), make sure that we mark pages which have been
- * written to disk so we retrieve them from disk later,
- * rather than allocating new pages.
- */
- if (IS_BUCKET(bp->flags)) {
- segment_ndx = bp->addr & (hashp->SGSIZE - 1);
- segp = hashp->dir[bp->addr >> hashp->SSHIFT];
-#ifdef DEBUG
- assert(segp != NULL);
-#endif
-
- if (hashp->new_file &&
- ((bp->flags & BUF_MOD) ||
- ISDISK(segp[segment_ndx])))
- segp[segment_ndx] = (BUFHEAD *)BUF_DISK;
- else
- segp[segment_ndx] = NULL;
- }
- /*
- * Since overflow pages can only be access by means of
- * their bucket, free overflow pages associated with
- * this bucket.
- */
- for (xbp = bp; xbp->ovfl;) {
- next_xbp = xbp->ovfl;
- xbp->ovfl = 0;
- xbp = next_xbp;
-
- /* Check that ovfl pointer is up date. */
- if (IS_BUCKET(xbp->flags) ||
- (oaddr != xbp->addr))
- break;
-
- shortp = (u_int16_t *)xbp->page;
- if (shortp[0])
- /* set before __put_page */
- oaddr = shortp[shortp[0] - 1];
- if ((xbp->flags & BUF_MOD) && __put_page(hashp,
- xbp->page, xbp->addr, 0, 0))
- return (NULL);
- xbp->addr = 0;
- xbp->flags = 0;
- BUF_REMOVE(xbp);
- LRU_INSERT(xbp);
- }
- }
- }
-
- /* Now assign this buffer */
- bp->addr = addr;
-#ifdef DEBUG1
- (void)fprintf(stderr, "NEWBUF1: %d->ovfl was %d is now %d\n",
- bp->addr, (bp->ovfl ? bp->ovfl->addr : 0), 0);
-#endif
- bp->ovfl = NULL;
- if (prev_bp) {
- /*
- * If prev_bp is set, this is an overflow page, hook it in to
- * the buffer overflow links.
- */
-#ifdef DEBUG1
- (void)fprintf(stderr, "NEWBUF2: %d->ovfl was %d is now %d\n",
- prev_bp->addr, (prev_bp->ovfl ? bp->ovfl->addr : 0),
- (bp ? bp->addr : 0));
-#endif
- prev_bp->ovfl = bp;
- bp->flags = 0;
- } else
- bp->flags = BUF_BUCKET;
- MRU_INSERT(bp);
- return (bp);
-}
-
-extern void
-__buf_init(hashp, nbytes)
- HTAB *hashp;
- int nbytes;
-{
- BUFHEAD *bfp;
- int npages;
-
- bfp = &(hashp->bufhead);
- npages = (nbytes + hashp->BSIZE - 1) >> hashp->BSHIFT;
- npages = MAX(npages, MIN_BUFFERS);
-
- hashp->nbufs = npages;
- bfp->next = bfp;
- bfp->prev = bfp;
- /*
- * This space is calloc'd so these are already null.
- *
- * bfp->ovfl = NULL;
- * bfp->flags = 0;
- * bfp->page = NULL;
- * bfp->addr = 0;
- */
-}
-
-extern int
-__buf_free(hashp, do_free, to_disk)
- HTAB *hashp;
- int do_free, to_disk;
-{
- BUFHEAD *bp;
-
- /* Need to make sure that buffer manager has been initialized */
- if (!LRU)
- return (0);
- for (bp = LRU; bp != &hashp->bufhead;) {
- /* Check that the buffer is valid */
- if (bp->addr || IS_BUCKET(bp->flags)) {
- if (to_disk && (bp->flags & BUF_MOD) &&
- __put_page(hashp, bp->page,
- bp->addr, IS_BUCKET(bp->flags), 0))
- return (-1);
- }
- /* Check if we are freeing stuff */
- if (do_free) {
- if (bp->page)
- free(bp->page);
- BUF_REMOVE(bp);
- free(bp);
- bp = LRU;
- } else
- bp = bp->prev;
- }
- return (0);
-}
-
-extern void
-__reclaim_buf(hashp, bp)
- HTAB *hashp;
- BUFHEAD *bp;
-{
- bp->ovfl = 0;
- bp->addr = 0;
- bp->flags = 0;
- BUF_REMOVE(bp);
- LRU_INSERT(bp);
-}
diff --git a/lib/libc/db/hash/hash_func.c b/lib/libc/db/hash/hash_func.c
deleted file mode 100644
index a5ec434..0000000
--- a/lib/libc/db/hash/hash_func.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_func.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <db.h>
-#include "hash.h"
-#include "page.h"
-#include "extern.h"
-
-static u_int32_t hash1 __P((const void *, size_t));
-static u_int32_t hash2 __P((const void *, size_t));
-static u_int32_t hash3 __P((const void *, size_t));
-static u_int32_t hash4 __P((const void *, size_t));
-
-/* Global default hash function */
-u_int32_t (*__default_hash) __P((const void *, size_t)) = hash4;
-
-/*
- * HASH FUNCTIONS
- *
- * Assume that we've already split the bucket to which this key hashes,
- * calculate that bucket, and check that in fact we did already split it.
- *
- * This came from ejb's hsearch.
- */
-
-#define PRIME1 37
-#define PRIME2 1048583
-
-static u_int32_t
-hash1(keyarg, len)
- const void *keyarg;
- register size_t len;
-{
- register const u_char *key;
- register u_int32_t h;
-
- /* Convert string to integer */
- for (key = keyarg, h = 0; len--;)
- h = h * PRIME1 ^ (*key++ - ' ');
- h %= PRIME2;
- return (h);
-}
-
-/*
- * Phong's linear congruential hash
- */
-#define dcharhash(h, c) ((h) = 0x63c63cd9*(h) + 0x9c39c33d + (c))
-
-static u_int32_t
-hash2(keyarg, len)
- const void *keyarg;
- size_t len;
-{
- register const u_char *e, *key;
- register u_int32_t h;
- register u_char c;
-
- key = keyarg;
- e = key + len;
- for (h = 0; key != e;) {
- c = *key++;
- if (!c && key > e)
- break;
- dcharhash(h, c);
- }
- return (h);
-}
-
-/*
- * This is INCREDIBLY ugly, but fast. We break the string up into 8 byte
- * units. On the first time through the loop we get the "leftover bytes"
- * (strlen % 8). On every other iteration, we perform 8 HASHC's so we handle
- * all 8 bytes. Essentially, this saves us 7 cmp & branch instructions. If
- * this routine is heavily used enough, it's worth the ugly coding.
- *
- * OZ's original sdbm hash
- */
-static u_int32_t
-hash3(keyarg, len)
- const void *keyarg;
- register size_t len;
-{
- register const u_char *key;
- register size_t loop;
- register u_int32_t h;
-
-#define HASHC h = *key++ + 65599 * h
-
- h = 0;
- key = keyarg;
- if (len > 0) {
- loop = (len + 8 - 1) >> 3;
-
- switch (len & (8 - 1)) {
- case 0:
- do {
- HASHC;
- /* FALLTHROUGH */
- case 7:
- HASHC;
- /* FALLTHROUGH */
- case 6:
- HASHC;
- /* FALLTHROUGH */
- case 5:
- HASHC;
- /* FALLTHROUGH */
- case 4:
- HASHC;
- /* FALLTHROUGH */
- case 3:
- HASHC;
- /* FALLTHROUGH */
- case 2:
- HASHC;
- /* FALLTHROUGH */
- case 1:
- HASHC;
- } while (--loop);
- }
- }
- return (h);
-}
-
-/* Hash function from Chris Torek. */
-static u_int32_t
-hash4(keyarg, len)
- const void *keyarg;
- register size_t len;
-{
- register const u_char *key;
- register size_t loop;
- register u_int32_t h;
-
-#define HASH4a h = (h << 5) - h + *key++;
-#define HASH4b h = (h << 5) + h + *key++;
-#define HASH4 HASH4b
-
- h = 0;
- key = keyarg;
- if (len > 0) {
- loop = (len + 8 - 1) >> 3;
-
- switch (len & (8 - 1)) {
- case 0:
- do {
- HASH4;
- /* FALLTHROUGH */
- case 7:
- HASH4;
- /* FALLTHROUGH */
- case 6:
- HASH4;
- /* FALLTHROUGH */
- case 5:
- HASH4;
- /* FALLTHROUGH */
- case 4:
- HASH4;
- /* FALLTHROUGH */
- case 3:
- HASH4;
- /* FALLTHROUGH */
- case 2:
- HASH4;
- /* FALLTHROUGH */
- case 1:
- HASH4;
- } while (--loop);
- }
- }
- return (h);
-}
diff --git a/lib/libc/db/hash/hash_log2.c b/lib/libc/db/hash/hash_log2.c
deleted file mode 100644
index c8c56bf..0000000
--- a/lib/libc/db/hash/hash_log2.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_log2.c 8.2 (Berkeley) 5/31/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <db.h>
-
-u_int32_t
-__log2(num)
- u_int32_t num;
-{
- register u_int32_t i, limit;
-
- limit = 1;
- for (i = 0; limit < num; limit = limit << 1, i++);
- return (i);
-}
diff --git a/lib/libc/db/hash/hash_page.c b/lib/libc/db/hash/hash_page.c
deleted file mode 100644
index 2c05090..0000000
--- a/lib/libc/db/hash/hash_page.c
+++ /dev/null
@@ -1,944 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/16/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * PACKAGE: hashing
- *
- * DESCRIPTION:
- * Page manipulation for hashing package.
- *
- * ROUTINES:
- *
- * External
- * __get_page
- * __add_ovflpage
- * Internal
- * overflow_page
- * open_temp
- */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#ifdef DEBUG
-#include <assert.h>
-#endif
-
-#include <db.h>
-#include "hash.h"
-#include "page.h"
-#include "extern.h"
-
-static u_int32_t *fetch_bitmap __P((HTAB *, int));
-static u_int32_t first_free __P((u_int32_t));
-static int open_temp __P((HTAB *));
-static u_int16_t overflow_page __P((HTAB *));
-static void putpair __P((char *, const DBT *, const DBT *));
-static void squeeze_key __P((u_int16_t *, const DBT *, const DBT *));
-static int ugly_split
- __P((HTAB *, u_int32_t, BUFHEAD *, BUFHEAD *, int, int));
-
-#define PAGE_INIT(P) { \
- ((u_int16_t *)(P))[0] = 0; \
- ((u_int16_t *)(P))[1] = hashp->BSIZE - 3 * sizeof(u_int16_t); \
- ((u_int16_t *)(P))[2] = hashp->BSIZE; \
-}
-
-/*
- * This is called AFTER we have verified that there is room on the page for
- * the pair (PAIRFITS has returned true) so we go right ahead and start moving
- * stuff on.
- */
-static void
-putpair(p, key, val)
- char *p;
- const DBT *key, *val;
-{
- register u_int16_t *bp, n, off;
-
- bp = (u_int16_t *)p;
-
- /* Enter the key first. */
- n = bp[0];
-
- off = OFFSET(bp) - key->size;
- memmove(p + off, key->data, key->size);
- bp[++n] = off;
-
- /* Now the data. */
- off -= val->size;
- memmove(p + off, val->data, val->size);
- bp[++n] = off;
-
- /* Adjust page info. */
- bp[0] = n;
- bp[n + 1] = off - ((n + 3) * sizeof(u_int16_t));
- bp[n + 2] = off;
-}
-
-/*
- * Returns:
- * 0 OK
- * -1 error
- */
-extern int
-__delpair(hashp, bufp, ndx)
- HTAB *hashp;
- BUFHEAD *bufp;
- register int ndx;
-{
- register u_int16_t *bp, newoff;
- register int n;
- u_int16_t pairlen;
-
- bp = (u_int16_t *)bufp->page;
- n = bp[0];
-
- if (bp[ndx + 1] < REAL_KEY)
- return (__big_delete(hashp, bufp));
- if (ndx != 1)
- newoff = bp[ndx - 1];
- else
- newoff = hashp->BSIZE;
- pairlen = newoff - bp[ndx + 1];
-
- if (ndx != (n - 1)) {
- /* Hard Case -- need to shuffle keys */
- register int i;
- register char *src = bufp->page + (int)OFFSET(bp);
- register char *dst = src + (int)pairlen;
- memmove(dst, src, bp[ndx + 1] - OFFSET(bp));
-
- /* Now adjust the pointers */
- for (i = ndx + 2; i <= n; i += 2) {
- if (bp[i + 1] == OVFLPAGE) {
- bp[i - 2] = bp[i];
- bp[i - 1] = bp[i + 1];
- } else {
- bp[i - 2] = bp[i] + pairlen;
- bp[i - 1] = bp[i + 1] + pairlen;
- }
- }
- }
- /* Finally adjust the page data */
- bp[n] = OFFSET(bp) + pairlen;
- bp[n - 1] = bp[n + 1] + pairlen + 2 * sizeof(u_int16_t);
- bp[0] = n - 2;
- hashp->NKEYS--;
-
- bufp->flags |= BUF_MOD;
- return (0);
-}
-/*
- * Returns:
- * 0 ==> OK
- * -1 ==> Error
- */
-extern int
-__split_page(hashp, obucket, nbucket)
- HTAB *hashp;
- u_int32_t obucket, nbucket;
-{
- register BUFHEAD *new_bufp, *old_bufp;
- register u_int16_t *ino;
- register char *np;
- DBT key, val;
- int n, ndx, retval;
- u_int16_t copyto, diff, off, moved;
- char *op;
-
- copyto = (u_int16_t)hashp->BSIZE;
- off = (u_int16_t)hashp->BSIZE;
- old_bufp = __get_buf(hashp, obucket, NULL, 0);
- if (old_bufp == NULL)
- return (-1);
- new_bufp = __get_buf(hashp, nbucket, NULL, 0);
- if (new_bufp == NULL)
- return (-1);
-
- old_bufp->flags |= (BUF_MOD | BUF_PIN);
- new_bufp->flags |= (BUF_MOD | BUF_PIN);
-
- ino = (u_int16_t *)(op = old_bufp->page);
- np = new_bufp->page;
-
- moved = 0;
-
- for (n = 1, ndx = 1; n < ino[0]; n += 2) {
- if (ino[n + 1] < REAL_KEY) {
- retval = ugly_split(hashp, obucket, old_bufp, new_bufp,
- (int)copyto, (int)moved);
- old_bufp->flags &= ~BUF_PIN;
- new_bufp->flags &= ~BUF_PIN;
- return (retval);
-
- }
- key.data = (u_char *)op + ino[n];
- key.size = off - ino[n];
-
- if (__call_hash(hashp, key.data, key.size) == obucket) {
- /* Don't switch page */
- diff = copyto - off;
- if (diff) {
- copyto = ino[n + 1] + diff;
- memmove(op + copyto, op + ino[n + 1],
- off - ino[n + 1]);
- ino[ndx] = copyto + ino[n] - ino[n + 1];
- ino[ndx + 1] = copyto;
- } else
- copyto = ino[n + 1];
- ndx += 2;
- } else {
- /* Switch page */
- val.data = (u_char *)op + ino[n + 1];
- val.size = ino[n] - ino[n + 1];
- putpair(np, &key, &val);
- moved += 2;
- }
-
- off = ino[n + 1];
- }
-
- /* Now clean up the page */
- ino[0] -= moved;
- FREESPACE(ino) = copyto - sizeof(u_int16_t) * (ino[0] + 3);
- OFFSET(ino) = copyto;
-
-#ifdef DEBUG3
- (void)fprintf(stderr, "split %d/%d\n",
- ((u_int16_t *)np)[0] / 2,
- ((u_int16_t *)op)[0] / 2);
-#endif
- /* unpin both pages */
- old_bufp->flags &= ~BUF_PIN;
- new_bufp->flags &= ~BUF_PIN;
- return (0);
-}
-
-/*
- * Called when we encounter an overflow or big key/data page during split
- * handling. This is special cased since we have to begin checking whether
- * the key/data pairs fit on their respective pages and because we may need
- * overflow pages for both the old and new pages.
- *
- * The first page might be a page with regular key/data pairs in which case
- * we have a regular overflow condition and just need to go on to the next
- * page or it might be a big key/data pair in which case we need to fix the
- * big key/data pair.
- *
- * Returns:
- * 0 ==> success
- * -1 ==> failure
- */
-static int
-ugly_split(hashp, obucket, old_bufp, new_bufp, copyto, moved)
- HTAB *hashp;
- u_int32_t obucket; /* Same as __split_page. */
- BUFHEAD *old_bufp, *new_bufp;
- int copyto; /* First byte on page which contains key/data values. */
- int moved; /* Number of pairs moved to new page. */
-{
- register BUFHEAD *bufp; /* Buffer header for ino */
- register u_int16_t *ino; /* Page keys come off of */
- register u_int16_t *np; /* New page */
- register u_int16_t *op; /* Page keys go on to if they aren't moving */
-
- BUFHEAD *last_bfp; /* Last buf header OVFL needing to be freed */
- DBT key, val;
- SPLIT_RETURN ret;
- u_int16_t n, off, ov_addr, scopyto;
- char *cino; /* Character value of ino */
-
- bufp = old_bufp;
- ino = (u_int16_t *)old_bufp->page;
- np = (u_int16_t *)new_bufp->page;
- op = (u_int16_t *)old_bufp->page;
- last_bfp = NULL;
- scopyto = (u_int16_t)copyto; /* ANSI */
-
- n = ino[0] - 1;
- while (n < ino[0]) {
- if (ino[2] < REAL_KEY && ino[2] != OVFLPAGE) {
- if (__big_split(hashp, old_bufp,
- new_bufp, bufp, bufp->addr, obucket, &ret))
- return (-1);
- old_bufp = ret.oldp;
- if (!old_bufp)
- return (-1);
- op = (u_int16_t *)old_bufp->page;
- new_bufp = ret.newp;
- if (!new_bufp)
- return (-1);
- np = (u_int16_t *)new_bufp->page;
- bufp = ret.nextp;
- if (!bufp)
- return (0);
- cino = (char *)bufp->page;
- ino = (u_int16_t *)cino;
- last_bfp = ret.nextp;
- } else if (ino[n + 1] == OVFLPAGE) {
- ov_addr = ino[n];
- /*
- * Fix up the old page -- the extra 2 are the fields
- * which contained the overflow information.
- */
- ino[0] -= (moved + 2);
- FREESPACE(ino) =
- scopyto - sizeof(u_int16_t) * (ino[0] + 3);
- OFFSET(ino) = scopyto;
-
- bufp = __get_buf(hashp, ov_addr, bufp, 0);
- if (!bufp)
- return (-1);
-
- ino = (u_int16_t *)bufp->page;
- n = 1;
- scopyto = hashp->BSIZE;
- moved = 0;
-
- if (last_bfp)
- __free_ovflpage(hashp, last_bfp);
- last_bfp = bufp;
- }
- /* Move regular sized pairs of there are any */
- off = hashp->BSIZE;
- for (n = 1; (n < ino[0]) && (ino[n + 1] >= REAL_KEY); n += 2) {
- cino = (char *)ino;
- key.data = (u_char *)cino + ino[n];
- key.size = off - ino[n];
- val.data = (u_char *)cino + ino[n + 1];
- val.size = ino[n] - ino[n + 1];
- off = ino[n + 1];
-
- if (__call_hash(hashp, key.data, key.size) == obucket) {
- /* Keep on old page */
- if (PAIRFITS(op, (&key), (&val)))
- putpair((char *)op, &key, &val);
- else {
- old_bufp =
- __add_ovflpage(hashp, old_bufp);
- if (!old_bufp)
- return (-1);
- op = (u_int16_t *)old_bufp->page;
- putpair((char *)op, &key, &val);
- }
- old_bufp->flags |= BUF_MOD;
- } else {
- /* Move to new page */
- if (PAIRFITS(np, (&key), (&val)))
- putpair((char *)np, &key, &val);
- else {
- new_bufp =
- __add_ovflpage(hashp, new_bufp);
- if (!new_bufp)
- return (-1);
- np = (u_int16_t *)new_bufp->page;
- putpair((char *)np, &key, &val);
- }
- new_bufp->flags |= BUF_MOD;
- }
- }
- }
- if (last_bfp)
- __free_ovflpage(hashp, last_bfp);
- return (0);
-}
-
-/*
- * Add the given pair to the page
- *
- * Returns:
- * 0 ==> OK
- * 1 ==> failure
- */
-extern int
-__addel(hashp, bufp, key, val)
- HTAB *hashp;
- BUFHEAD *bufp;
- const DBT *key, *val;
-{
- register u_int16_t *bp, *sop;
- int do_expand;
-
- bp = (u_int16_t *)bufp->page;
- do_expand = 0;
- while (bp[0] && (bp[2] < REAL_KEY || bp[bp[0]] < REAL_KEY))
- /* Exception case */
- if (bp[2] == FULL_KEY_DATA && bp[0] == 2)
- /* This is the last page of a big key/data pair
- and we need to add another page */
- break;
- else if (bp[2] < REAL_KEY && bp[bp[0]] != OVFLPAGE) {
- bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
- if (!bufp)
- return (-1);
- bp = (u_int16_t *)bufp->page;
- } else
- /* Try to squeeze key on this page */
- if (FREESPACE(bp) > PAIRSIZE(key, val)) {
- squeeze_key(bp, key, val);
- return (0);
- } else {
- bufp = __get_buf(hashp, bp[bp[0] - 1], bufp, 0);
- if (!bufp)
- return (-1);
- bp = (u_int16_t *)bufp->page;
- }
-
- if (PAIRFITS(bp, key, val))
- putpair(bufp->page, key, val);
- else {
- do_expand = 1;
- bufp = __add_ovflpage(hashp, bufp);
- if (!bufp)
- return (-1);
- sop = (u_int16_t *)bufp->page;
-
- if (PAIRFITS(sop, key, val))
- putpair((char *)sop, key, val);
- else
- if (__big_insert(hashp, bufp, key, val))
- return (-1);
- }
- bufp->flags |= BUF_MOD;
- /*
- * If the average number of keys per bucket exceeds the fill factor,
- * expand the table.
- */
- hashp->NKEYS++;
- if (do_expand ||
- (hashp->NKEYS / (hashp->MAX_BUCKET + 1) > hashp->FFACTOR))
- return (__expand_table(hashp));
- return (0);
-}
-
-/*
- *
- * Returns:
- * pointer on success
- * NULL on error
- */
-extern BUFHEAD *
-__add_ovflpage(hashp, bufp)
- HTAB *hashp;
- BUFHEAD *bufp;
-{
- register u_int16_t *sp;
- u_int16_t ndx, ovfl_num;
-#ifdef DEBUG1
- int tmp1, tmp2;
-#endif
- sp = (u_int16_t *)bufp->page;
-
- /* Check if we are dynamically determining the fill factor */
- if (hashp->FFACTOR == DEF_FFACTOR) {
- hashp->FFACTOR = sp[0] >> 1;
- if (hashp->FFACTOR < MIN_FFACTOR)
- hashp->FFACTOR = MIN_FFACTOR;
- }
- bufp->flags |= BUF_MOD;
- ovfl_num = overflow_page(hashp);
-#ifdef DEBUG1
- tmp1 = bufp->addr;
- tmp2 = bufp->ovfl ? bufp->ovfl->addr : 0;
-#endif
- if (!ovfl_num || !(bufp->ovfl = __get_buf(hashp, ovfl_num, bufp, 1)))
- return (NULL);
- bufp->ovfl->flags |= BUF_MOD;
-#ifdef DEBUG1
- (void)fprintf(stderr, "ADDOVFLPAGE: %d->ovfl was %d is now %d\n",
- tmp1, tmp2, bufp->ovfl->addr);
-#endif
- ndx = sp[0];
- /*
- * Since a pair is allocated on a page only if there's room to add
- * an overflow page, we know that the OVFL information will fit on
- * the page.
- */
- sp[ndx + 4] = OFFSET(sp);
- sp[ndx + 3] = FREESPACE(sp) - OVFLSIZE;
- sp[ndx + 1] = ovfl_num;
- sp[ndx + 2] = OVFLPAGE;
- sp[0] = ndx + 2;
-#ifdef HASH_STATISTICS
- hash_overflows++;
-#endif
- return (bufp->ovfl);
-}
-
-/*
- * Returns:
- * 0 indicates SUCCESS
- * -1 indicates FAILURE
- */
-extern int
-__get_page(hashp, p, bucket, is_bucket, is_disk, is_bitmap)
- HTAB *hashp;
- char *p;
- u_int32_t bucket;
- int is_bucket, is_disk, is_bitmap;
-{
- register int fd, page, size;
- int rsize;
- u_int16_t *bp;
-
- fd = hashp->fp;
- size = hashp->BSIZE;
-
- if ((fd == -1) || !is_disk) {
- PAGE_INIT(p);
- return (0);
- }
- if (is_bucket)
- page = BUCKET_TO_PAGE(bucket);
- else
- page = OADDR_TO_PAGE(bucket);
- if ((lseek(fd, (off_t)page << hashp->BSHIFT, SEEK_SET) == -1) ||
- ((rsize = read(fd, p, size)) == -1))
- return (-1);
- bp = (u_int16_t *)p;
- if (!rsize)
- bp[0] = 0; /* We hit the EOF, so initialize a new page */
- else
- if (rsize != size) {
- errno = EFTYPE;
- return (-1);
- }
- if (!is_bitmap && !bp[0]) {
- PAGE_INIT(p);
- } else
- if (hashp->LORDER != BYTE_ORDER) {
- register int i, max;
-
- if (is_bitmap) {
- max = hashp->BSIZE >> 2; /* divide by 4 */
- for (i = 0; i < max; i++)
- M_32_SWAP(((int *)p)[i]);
- } else {
- M_16_SWAP(bp[0]);
- max = bp[0] + 2;
- for (i = 1; i <= max; i++)
- M_16_SWAP(bp[i]);
- }
- }
- return (0);
-}
-
-/*
- * Write page p to disk
- *
- * Returns:
- * 0 ==> OK
- * -1 ==>failure
- */
-extern int
-__put_page(hashp, p, bucket, is_bucket, is_bitmap)
- HTAB *hashp;
- char *p;
- u_int32_t bucket;
- int is_bucket, is_bitmap;
-{
- register int fd, page, size;
- int wsize;
-
- size = hashp->BSIZE;
- if ((hashp->fp == -1) && open_temp(hashp))
- return (-1);
- fd = hashp->fp;
-
- if (hashp->LORDER != BYTE_ORDER) {
- register int i;
- register int max;
-
- if (is_bitmap) {
- max = hashp->BSIZE >> 2; /* divide by 4 */
- for (i = 0; i < max; i++)
- M_32_SWAP(((int *)p)[i]);
- } else {
- max = ((u_int16_t *)p)[0] + 2;
- for (i = 0; i <= max; i++)
- M_16_SWAP(((u_int16_t *)p)[i]);
- }
- }
- if (is_bucket)
- page = BUCKET_TO_PAGE(bucket);
- else
- page = OADDR_TO_PAGE(bucket);
- if ((lseek(fd, (off_t)page << hashp->BSHIFT, SEEK_SET) == -1) ||
- ((wsize = write(fd, p, size)) == -1))
- /* Errno is set */
- return (-1);
- if (wsize != size) {
- errno = EFTYPE;
- return (-1);
- }
- return (0);
-}
-
-#define BYTE_MASK ((1 << INT_BYTE_SHIFT) -1)
-/*
- * Initialize a new bitmap page. Bitmap pages are left in memory
- * once they are read in.
- */
-extern int
-__ibitmap(hashp, pnum, nbits, ndx)
- HTAB *hashp;
- int pnum, nbits, ndx;
-{
- u_int32_t *ip;
- int clearbytes, clearints;
-
- if ((ip = (u_int32_t *)malloc(hashp->BSIZE)) == NULL)
- return (1);
- hashp->nmaps++;
- clearints = ((nbits - 1) >> INT_BYTE_SHIFT) + 1;
- clearbytes = clearints << INT_TO_BYTE;
- (void)memset((char *)ip, 0, clearbytes);
- (void)memset(((char *)ip) + clearbytes, 0xFF,
- hashp->BSIZE - clearbytes);
- ip[clearints - 1] = ALL_SET << (nbits & BYTE_MASK);
- SETBIT(ip, 0);
- hashp->BITMAPS[ndx] = (u_int16_t)pnum;
- hashp->mapp[ndx] = ip;
- return (0);
-}
-
-static u_int32_t
-first_free(map)
- u_int32_t map;
-{
- register u_int32_t i, mask;
-
- mask = 0x1;
- for (i = 0; i < BITS_PER_MAP; i++) {
- if (!(mask & map))
- return (i);
- mask = mask << 1;
- }
- return (i);
-}
-
-static u_int16_t
-overflow_page(hashp)
- HTAB *hashp;
-{
- register u_int32_t *freep;
- register int max_free, offset, splitnum;
- u_int16_t addr;
- int bit, first_page, free_bit, free_page, i, in_use_bits, j;
-#ifdef DEBUG2
- int tmp1, tmp2;
-#endif
- splitnum = hashp->OVFL_POINT;
- max_free = hashp->SPARES[splitnum];
-
- free_page = (max_free - 1) >> (hashp->BSHIFT + BYTE_SHIFT);
- free_bit = (max_free - 1) & ((hashp->BSIZE << BYTE_SHIFT) - 1);
-
- /* Look through all the free maps to find the first free block */
- first_page = hashp->LAST_FREED >>(hashp->BSHIFT + BYTE_SHIFT);
- for ( i = first_page; i <= free_page; i++ ) {
- if (!(freep = (u_int32_t *)hashp->mapp[i]) &&
- !(freep = fetch_bitmap(hashp, i)))
- return (0);
- if (i == free_page)
- in_use_bits = free_bit;
- else
- in_use_bits = (hashp->BSIZE << BYTE_SHIFT) - 1;
-
- if (i == first_page) {
- bit = hashp->LAST_FREED &
- ((hashp->BSIZE << BYTE_SHIFT) - 1);
- j = bit / BITS_PER_MAP;
- bit = bit & ~(BITS_PER_MAP - 1);
- } else {
- bit = 0;
- j = 0;
- }
- for (; bit <= in_use_bits; j++, bit += BITS_PER_MAP)
- if (freep[j] != ALL_SET)
- goto found;
- }
-
- /* No Free Page Found */
- hashp->LAST_FREED = hashp->SPARES[splitnum];
- hashp->SPARES[splitnum]++;
- offset = hashp->SPARES[splitnum] -
- (splitnum ? hashp->SPARES[splitnum - 1] : 0);
-
-#define OVMSG "HASH: Out of overflow pages. Increase page size\n"
- if (offset > SPLITMASK) {
- if (++splitnum >= NCACHED) {
- (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1);
- return (0);
- }
- hashp->OVFL_POINT = splitnum;
- hashp->SPARES[splitnum] = hashp->SPARES[splitnum-1];
- hashp->SPARES[splitnum-1]--;
- offset = 1;
- }
-
- /* Check if we need to allocate a new bitmap page */
- if (free_bit == (hashp->BSIZE << BYTE_SHIFT) - 1) {
- free_page++;
- if (free_page >= NCACHED) {
- (void)write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1);
- return (0);
- }
- /*
- * This is tricky. The 1 indicates that you want the new page
- * allocated with 1 clear bit. Actually, you are going to
- * allocate 2 pages from this map. The first is going to be
- * the map page, the second is the overflow page we were
- * looking for. The init_bitmap routine automatically, sets
- * the first bit of itself to indicate that the bitmap itself
- * is in use. We would explicitly set the second bit, but
- * don't have to if we tell init_bitmap not to leave it clear
- * in the first place.
- */
- if (__ibitmap(hashp,
- (int)OADDR_OF(splitnum, offset), 1, free_page))
- return (0);
- hashp->SPARES[splitnum]++;
-#ifdef DEBUG2
- free_bit = 2;
-#endif
- offset++;
- if (offset > SPLITMASK) {
- if (++splitnum >= NCACHED) {
- (void)write(STDERR_FILENO, OVMSG,
- sizeof(OVMSG) - 1);
- return (0);
- }
- hashp->OVFL_POINT = splitnum;
- hashp->SPARES[splitnum] = hashp->SPARES[splitnum-1];
- hashp->SPARES[splitnum-1]--;
- offset = 0;
- }
- } else {
- /*
- * Free_bit addresses the last used bit. Bump it to address
- * the first available bit.
- */
- free_bit++;
- SETBIT(freep, free_bit);
- }
-
- /* Calculate address of the new overflow page */
- addr = OADDR_OF(splitnum, offset);
-#ifdef DEBUG2
- (void)fprintf(stderr, "OVERFLOW_PAGE: ADDR: %d BIT: %d PAGE %d\n",
- addr, free_bit, free_page);
-#endif
- return (addr);
-
-found:
- bit = bit + first_free(freep[j]);
- SETBIT(freep, bit);
-#ifdef DEBUG2
- tmp1 = bit;
- tmp2 = i;
-#endif
- /*
- * Bits are addressed starting with 0, but overflow pages are addressed
- * beginning at 1. Bit is a bit addressnumber, so we need to increment
- * it to convert it to a page number.
- */
- bit = 1 + bit + (i * (hashp->BSIZE << BYTE_SHIFT));
- if (bit >= hashp->LAST_FREED)
- hashp->LAST_FREED = bit - 1;
-
- /* Calculate the split number for this page */
- for (i = 0; (i < splitnum) && (bit > hashp->SPARES[i]); i++);
- offset = (i ? bit - hashp->SPARES[i - 1] : bit);
- if (offset >= SPLITMASK)
- return (0); /* Out of overflow pages */
- addr = OADDR_OF(i, offset);
-#ifdef DEBUG2
- (void)fprintf(stderr, "OVERFLOW_PAGE: ADDR: %d BIT: %d PAGE %d\n",
- addr, tmp1, tmp2);
-#endif
-
- /* Allocate and return the overflow page */
- return (addr);
-}
-
-/*
- * Mark this overflow page as free.
- */
-extern void
-__free_ovflpage(hashp, obufp)
- HTAB *hashp;
- BUFHEAD *obufp;
-{
- register u_int16_t addr;
- u_int32_t *freep;
- int bit_address, free_page, free_bit;
- u_int16_t ndx;
-
- addr = obufp->addr;
-#ifdef DEBUG1
- (void)fprintf(stderr, "Freeing %d\n", addr);
-#endif
- ndx = (((u_int16_t)addr) >> SPLITSHIFT);
- bit_address =
- (ndx ? hashp->SPARES[ndx - 1] : 0) + (addr & SPLITMASK) - 1;
- if (bit_address < hashp->LAST_FREED)
- hashp->LAST_FREED = bit_address;
- free_page = (bit_address >> (hashp->BSHIFT + BYTE_SHIFT));
- free_bit = bit_address & ((hashp->BSIZE << BYTE_SHIFT) - 1);
-
- if (!(freep = hashp->mapp[free_page]))
- freep = fetch_bitmap(hashp, free_page);
-#ifdef DEBUG
- /*
- * This had better never happen. It means we tried to read a bitmap
- * that has already had overflow pages allocated off it, and we
- * failed to read it from the file.
- */
- if (!freep)
- assert(0);
-#endif
- CLRBIT(freep, free_bit);
-#ifdef DEBUG2
- (void)fprintf(stderr, "FREE_OVFLPAGE: ADDR: %d BIT: %d PAGE %d\n",
- obufp->addr, free_bit, free_page);
-#endif
- __reclaim_buf(hashp, obufp);
-}
-
-/*
- * Returns:
- * 0 success
- * -1 failure
- */
-static int
-open_temp(hashp)
- HTAB *hashp;
-{
- sigset_t set, oset;
- static char namestr[] = "_hashXXXXXX";
-
- /* Block signals; make sure file goes away at process exit. */
- (void)sigfillset(&set);
- (void)sigprocmask(SIG_BLOCK, &set, &oset);
- if ((hashp->fp = mkstemp(namestr)) != -1) {
- (void)unlink(namestr);
- (void)fcntl(hashp->fp, F_SETFD, 1);
- }
- (void)sigprocmask(SIG_SETMASK, &oset, (sigset_t *)NULL);
- return (hashp->fp != -1 ? 0 : -1);
-}
-
-/*
- * We have to know that the key will fit, but the last entry on the page is
- * an overflow pair, so we need to shift things.
- */
-static void
-squeeze_key(sp, key, val)
- u_int16_t *sp;
- const DBT *key, *val;
-{
- register char *p;
- u_int16_t free_space, n, off, pageno;
-
- p = (char *)sp;
- n = sp[0];
- free_space = FREESPACE(sp);
- off = OFFSET(sp);
-
- pageno = sp[n - 1];
- off -= key->size;
- sp[n - 1] = off;
- memmove(p + off, key->data, key->size);
- off -= val->size;
- sp[n] = off;
- memmove(p + off, val->data, val->size);
- sp[0] = n + 2;
- sp[n + 1] = pageno;
- sp[n + 2] = OVFLPAGE;
- FREESPACE(sp) = free_space - PAIRSIZE(key, val);
- OFFSET(sp) = off;
-}
-
-static u_int32_t *
-fetch_bitmap(hashp, ndx)
- HTAB *hashp;
- int ndx;
-{
- if (ndx >= hashp->nmaps)
- return (NULL);
- if ((hashp->mapp[ndx] = (u_int32_t *)malloc(hashp->BSIZE)) == NULL)
- return (NULL);
- if (__get_page(hashp,
- (char *)hashp->mapp[ndx], hashp->BITMAPS[ndx], 0, 1, 1)) {
- free(hashp->mapp[ndx]);
- return (NULL);
- }
- return (hashp->mapp[ndx]);
-}
-
-#ifdef DEBUG4
-int
-print_chain(addr)
- int addr;
-{
- BUFHEAD *bufp;
- short *bp, oaddr;
-
- (void)fprintf(stderr, "%d ", addr);
- bufp = __get_buf(hashp, addr, NULL, 0);
- bp = (short *)bufp->page;
- while (bp[0] && ((bp[bp[0]] == OVFLPAGE) ||
- ((bp[0] > 2) && bp[2] < REAL_KEY))) {
- oaddr = bp[bp[0] - 1];
- (void)fprintf(stderr, "%d ", (int)oaddr);
- bufp = __get_buf(hashp, (int)oaddr, bufp, 0);
- bp = (short *)bufp->page;
- }
- (void)fprintf(stderr, "\n");
-}
-#endif
diff --git a/lib/libc/db/hash/hsearch.c b/lib/libc/db/hash/hsearch.c
deleted file mode 100644
index 6185330..0000000
--- a/lib/libc/db/hash/hsearch.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hsearch.c 8.4 (Berkeley) 7/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <fcntl.h>
-#include <string.h>
-
-#include <db.h>
-#include "search.h"
-
-static DB *dbp = NULL;
-static ENTRY retval;
-
-extern int
-hcreate(nel)
- u_int nel;
-{
- HASHINFO info;
-
- info.nelem = nel;
- info.bsize = 256;
- info.ffactor = 8;
- info.cachesize = 0;
- info.hash = NULL;
- info.lorder = 0;
- dbp = (DB *)__hash_open(NULL, O_CREAT | O_RDWR, 0600, &info, 0);
- return (dbp != NULL);
-}
-
-extern ENTRY *
-hsearch(item, action)
- ENTRY item;
- ACTION action;
-{
- DBT key, val;
- int status;
-
- if (!dbp)
- return (NULL);
- key.data = (u_char *)item.key;
- key.size = strlen(item.key) + 1;
-
- if (action == ENTER) {
- val.data = (u_char *)item.data;
- val.size = strlen(item.data) + 1;
- status = (dbp->put)(dbp, &key, &val, R_NOOVERWRITE);
- if (status)
- return (NULL);
- } else {
- /* FIND */
- status = (dbp->get)(dbp, &key, &val, 0);
- if (status)
- return (NULL);
- else
- item.data = (char *)val.data;
- }
- retval.key = item.key;
- retval.data = item.data;
- return (&retval);
-}
-
-extern void
-hdestroy()
-{
- if (dbp) {
- (void)(dbp->close)(dbp);
- dbp = NULL;
- }
-}
diff --git a/lib/libc/db/hash/ndbm.c b/lib/libc/db/hash/ndbm.c
deleted file mode 100644
index 2e8165d..0000000
--- a/lib/libc/db/hash/ndbm.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ndbm.c 8.4 (Berkeley) 7/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * This package provides a dbm compatible interface to the new hashing
- * package described in db(3).
- */
-
-#include <sys/param.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-
-#include <ndbm.h>
-#include "hash.h"
-
-/*
- * Returns:
- * *DBM on success
- * NULL on failure
- */
-extern DBM *
-dbm_open(file, flags, mode)
- const char *file;
- int flags, mode;
-{
- HASHINFO info;
- char path[MAXPATHLEN];
-
- info.bsize = 4096;
- info.ffactor = 40;
- info.nelem = 1;
- info.cachesize = 0;
- info.hash = NULL;
- info.lorder = 0;
-
- if( strlen(file) >= sizeof(path) - strlen(DBM_SUFFIX)) {
- errno = ENAMETOOLONG;
- return(NULL);
- }
- (void)strcpy(path, file);
- (void)strcat(path, DBM_SUFFIX);
- return ((DBM *)__hash_open(path, flags, mode, &info, 0));
-}
-
-extern void
-dbm_close(db)
- DBM *db;
-{
- (void)(db->close)(db);
-}
-
-/*
- * Returns:
- * DATUM on success
- * NULL on failure
- */
-extern datum
-dbm_fetch(db, key)
- DBM *db;
- datum key;
-{
- datum retdata;
- int status;
- DBT dbtkey, dbtretdata;
-
- dbtkey.data = key.dptr;
- dbtkey.size = key.dsize;
- status = (db->get)(db, &dbtkey, &dbtretdata, 0);
- if (status) {
- dbtretdata.data = NULL;
- dbtretdata.size = 0;
- }
- retdata.dptr = dbtretdata.data;
- retdata.dsize = dbtretdata.size;
- return (retdata);
-}
-
-/*
- * Returns:
- * DATUM on success
- * NULL on failure
- */
-extern datum
-dbm_firstkey(db)
- DBM *db;
-{
- int status;
- datum retkey;
- DBT dbtretkey, dbtretdata;
-
- status = (db->seq)(db, &dbtretkey, &dbtretdata, R_FIRST);
- if (status)
- dbtretkey.data = NULL;
- retkey.dptr = dbtretkey.data;
- retkey.dsize = dbtretkey.size;
- return (retkey);
-}
-
-/*
- * Returns:
- * DATUM on success
- * NULL on failure
- */
-extern datum
-dbm_nextkey(db)
- DBM *db;
-{
- int status;
- datum retkey;
- DBT dbtretkey, dbtretdata;
-
- status = (db->seq)(db, &dbtretkey, &dbtretdata, R_NEXT);
- if (status)
- dbtretkey.data = NULL;
- retkey.dptr = dbtretkey.data;
- retkey.dsize = dbtretkey.size;
- return (retkey);
-}
-
-/*
- * Returns:
- * 0 on success
- * <0 failure
- */
-extern int
-dbm_delete(db, key)
- DBM *db;
- datum key;
-{
- int status;
- DBT dbtkey;
-
- dbtkey.data = key.dptr;
- dbtkey.size = key.dsize;
- status = (db->del)(db, &dbtkey, 0);
- if (status)
- return (-1);
- else
- return (0);
-}
-
-/*
- * Returns:
- * 0 on success
- * <0 failure
- * 1 if DBM_INSERT and entry exists
- */
-extern int
-dbm_store(db, key, data, flags)
- DBM *db;
- datum key, data;
- int flags;
-{
- DBT dbtkey, dbtdata;
-
- dbtkey.data = key.dptr;
- dbtkey.size = key.dsize;
- dbtdata.data = data.dptr;
- dbtdata.size = data.dsize;
- return ((db->put)(db, &dbtkey, &dbtdata,
- (flags == DBM_INSERT) ? R_NOOVERWRITE : 0));
-}
-
-extern int
-dbm_error(db)
- DBM *db;
-{
- HTAB *hp;
-
- hp = (HTAB *)db->internal;
- return (hp->error);
-}
-
-extern int
-dbm_clearerr(db)
- DBM *db;
-{
- HTAB *hp;
-
- hp = (HTAB *)db->internal;
- hp->error = 0;
- return (0);
-}
-
-extern int
-dbm_dirfno(db)
- DBM *db;
-{
- return(((HTAB *)db->internal)->fp);
-}
diff --git a/lib/libc/db/hash/page.h b/lib/libc/db/hash/page.h
deleted file mode 100644
index 0fc0d5a..0000000
--- a/lib/libc/db/hash/page.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)page.h 8.2 (Berkeley) 5/31/94
- */
-
-/*
- * Definitions for hashing page file format.
- */
-
-/*
- * routines dealing with a data page
- *
- * page format:
- * +------------------------------+
- * p | n | keyoff | datoff | keyoff |
- * +------------+--------+--------+
- * | datoff | free | ptr | --> |
- * +--------+---------------------+
- * | F R E E A R E A |
- * +--------------+---------------+
- * | <---- - - - | data |
- * +--------+-----+----+----------+
- * | key | data | key |
- * +--------+----------+----------+
- *
- * Pointer to the free space is always: p[p[0] + 2]
- * Amount of free space on the page is: p[p[0] + 1]
- */
-
-/*
- * How many bytes required for this pair?
- * 2 shorts in the table at the top of the page + room for the
- * key and room for the data
- *
- * We prohibit entering a pair on a page unless there is also room to append
- * an overflow page. The reason for this it that you can get in a situation
- * where a single key/data pair fits on a page, but you can't append an
- * overflow page and later you'd have to split the key/data and handle like
- * a big pair.
- * You might as well do this up front.
- */
-
-#define PAIRSIZE(K,D) (2*sizeof(u_int16_t) + (K)->size + (D)->size)
-#define BIGOVERHEAD (4*sizeof(u_int16_t))
-#define KEYSIZE(K) (4*sizeof(u_int16_t) + (K)->size);
-#define OVFLSIZE (2*sizeof(u_int16_t))
-#define FREESPACE(P) ((P)[(P)[0]+1])
-#define OFFSET(P) ((P)[(P)[0]+2])
-#define PAIRFITS(P,K,D) \
- (((P)[2] >= REAL_KEY) && \
- (PAIRSIZE((K),(D)) + OVFLSIZE) <= FREESPACE((P)))
-#define PAGE_META(N) (((N)+3) * sizeof(u_int16_t))
-
-typedef struct {
- BUFHEAD *newp;
- BUFHEAD *oldp;
- BUFHEAD *nextp;
- u_int16_t next_addr;
-} SPLIT_RETURN;
diff --git a/lib/libc/db/hash/search.h b/lib/libc/db/hash/search.h
deleted file mode 100644
index 4d3b914..0000000
--- a/lib/libc/db/hash/search.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)search.h 8.1 (Berkeley) 6/4/93
- */
-
-/* Backward compatibility to hsearch interface. */
-typedef struct entry {
- char *key;
- char *data;
-} ENTRY;
-
-typedef enum {
- FIND, ENTER
-} ACTION;
-
-int hcreate __P((unsigned int));
-void hdestroy __P((void));
-ENTRY *hsearch __P((ENTRY, ACTION));
diff --git a/lib/libc/db/man/Makefile.inc b/lib/libc/db/man/Makefile.inc
deleted file mode 100644
index 2c70dd07..0000000
--- a/lib/libc/db/man/Makefile.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.6 1997/10/16 14:26:09 bde Exp $
-
-.PATH: ${.CURDIR}/../libc/db/man
-
-.if ${LIB} == "c"
-MAN3+= btree.3 dbopen.3 hash.3 mpool.3 recno.3
-
-MLINKS+= dbopen.3 db.3
-.endif
diff --git a/lib/libc/db/man/btree.3 b/lib/libc/db/man/btree.3
deleted file mode 100644
index 8284b21..0000000
--- a/lib/libc/db/man/btree.3
+++ /dev/null
@@ -1,233 +0,0 @@
-.\" Copyright (c) 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)btree.3 8.4 (Berkeley) 8/18/94
-.\"
-.TH BTREE 3 "August 18, 1994"
-.\".UC 7
-.SH NAME
-btree \- btree database access method
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <db.h>
-.ft R
-.fi
-.SH DESCRIPTION
-The routine
-.IR dbopen
-is the library interface to database files.
-One of the supported file formats is btree files.
-The general description of the database access methods is in
-.IR dbopen (3),
-this manual page describes only the btree specific information.
-.PP
-The btree data structure is a sorted, balanced tree structure storing
-associated key/data pairs.
-.PP
-The btree access method specific data structure provided to
-.I dbopen
-is defined in the <db.h> include file as follows:
-.PP
-typedef struct {
-.RS
-u_long flags;
-.br
-u_int cachesize;
-.br
-int maxkeypage;
-.br
-int minkeypage;
-.br
-u_int psize;
-.br
-int (*compare)(const DBT *key1, const DBT *key2);
-.br
-size_t (*prefix)(const DBT *key1, const DBT *key2);
-.br
-int lorder;
-.RE
-} BTREEINFO;
-.PP
-The elements of this structure are as follows:
-.TP
-flags
-The flag value is specified by
-.IR or 'ing
-any of the following values:
-.RS
-.TP
-R_DUP
-Permit duplicate keys in the tree, i.e. permit insertion if the key to be
-inserted already exists in the tree.
-The default behavior, as described in
-.IR dbopen (3),
-is to overwrite a matching key when inserting a new key or to fail if
-the R_NOOVERWRITE flag is specified.
-The R_DUP flag is overridden by the R_NOOVERWRITE flag, and if the
-R_NOOVERWRITE flag is specified, attempts to insert duplicate keys into
-the tree will fail.
-.IP
-If the database contains duplicate keys, the order of retrieval of
-key/data pairs is undefined if the
-.I get
-routine is used, however,
-.I seq
-routine calls with the R_CURSOR flag set will always return the logical
-``first'' of any group of duplicate keys.
-.RE
-.TP
-cachesize
-A suggested maximum size (in bytes) of the memory cache.
-This value is
-.B only
-advisory, and the access method will allocate more memory rather than fail.
-Since every search examines the root page of the tree, caching the most
-recently used pages substantially improves access time.
-In addition, physical writes are delayed as long as possible, so a moderate
-cache can reduce the number of I/O operations significantly.
-Obviously, using a cache increases (but only increases) the likelihood of
-corruption or lost data if the system crashes while a tree is being modified.
-If
-.I cachesize
-is 0 (no size is specified) a default cache is used.
-.TP
-maxkeypage
-The maximum number of keys which will be stored on any single page.
-Not currently implemented.
-.\" The maximum number of keys which will be stored on any single page.
-.\" Because of the way the btree data structure works,
-.\" .I maxkeypage
-.\" must always be greater than or equal to 2.
-.\" If
-.\" .I maxkeypage
-.\" is 0 (no maximum number of keys is specified) the page fill factor is
-.\" made as large as possible (which is almost invariably what is wanted).
-.TP
-minkeypage
-The minimum number of keys which will be stored on any single page.
-This value is used to determine which keys will be stored on overflow
-pages, i.e. if a key or data item is longer than the pagesize divided
-by the minkeypage value, it will be stored on overflow pages instead
-of in the page itself.
-If
-.I minkeypage
-is 0 (no minimum number of keys is specified) a value of 2 is used.
-.TP
-psize
-Page size is the size (in bytes) of the pages used for nodes in the tree.
-The minimum page size is 512 bytes and the maximum page size is 64K.
-If
-.I psize
-is 0 (no page size is specified) a page size is chosen based on the
-underlying file system I/O block size.
-.TP
-compare
-Compare is the key comparison function.
-It must return an integer less than, equal to, or greater than zero if the
-first key argument is considered to be respectively less than, equal to,
-or greater than the second key argument.
-The same comparison function must be used on a given tree every time it
-is opened.
-If
-.I compare
-is NULL (no comparison function is specified), the keys are compared
-lexically, with shorter keys considered less than longer keys.
-.TP
-prefix
-Prefix is the prefix comparison function.
-If specified, this routine must return the number of bytes of the second key
-argument which are necessary to determine that it is greater than the first
-key argument.
-If the keys are equal, the key length should be returned.
-Note, the usefulness of this routine is very data dependent, but, in some
-data sets can produce significantly reduced tree sizes and search times.
-If
-.I prefix
-is NULL (no prefix function is specified),
-.B and
-no comparison function is specified, a default lexical comparison routine
-is used.
-If
-.I prefix
-is NULL and a comparison routine is specified, no prefix comparison is
-done.
-.TP
-lorder
-The byte order for integers in the stored database metadata.
-The number should represent the order as an integer; for example,
-big endian order would be the number 4,321.
-If
-.I lorder
-is 0 (no order is specified) the current host order is used.
-.PP
-If the file already exists (and the O_TRUNC flag is not specified), the
-values specified for the parameters flags, lorder and psize are ignored
-in favor of the values used when the tree was created.
-.PP
-Forward sequential scans of a tree are from the least key to the greatest.
-.PP
-Space freed up by deleting key/data pairs from the tree is never reclaimed,
-although it is normally made available for reuse.
-This means that the btree storage structure is grow-only.
-The only solutions are to avoid excessive deletions, or to create a fresh
-tree periodically from a scan of an existing one.
-.PP
-Searches, insertions, and deletions in a btree will all complete in
-O lg base N where base is the average fill factor.
-Often, inserting ordered data into btrees results in a low fill factor.
-This implementation has been modified to make ordered insertion the best
-case, resulting in a much better than normal page fill factor.
-.SH ERRORS
-The
-.I btree
-access method routines may fail and set
-.I errno
-for any of the errors specified for the library routine
-.IR dbopen (3).
-.SH "SEE ALSO"
-.IR dbopen (3),
-.IR hash (3),
-.IR mpool (3),
-.IR recno (3)
-.sp
-.IR "The Ubiquitous B-tree" ,
-Douglas Comer, ACM Comput. Surv. 11, 2 (June 1979), 121-138.
-.sp
-.IR "Prefix B-trees" ,
-Bayer and Unterauer, ACM Transactions on Database Systems, Vol. 2, 1
-(March 1977), 11-26.
-.sp
-.IR "The Art of Computer Programming Vol. 3: Sorting and Searching" ,
-D.E. Knuth, 1968, pp 471-480.
-.SH BUGS
-Only big and little endian byte order is supported.
diff --git a/lib/libc/db/man/dbopen.3 b/lib/libc/db/man/dbopen.3
deleted file mode 100644
index f06a4ef..0000000
--- a/lib/libc/db/man/dbopen.3
+++ /dev/null
@@ -1,476 +0,0 @@
-.\" Copyright (c) 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)dbopen.3 8.5 (Berkeley) 1/2/94
-.\"
-.TH DBOPEN 3 "January 2, 1994"
-.UC 7
-.SH NAME
-dbopen \- database access methods
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <limits.h>
-#include <db.h>
-
-DB *
-dbopen(const char *file, int flags, int mode, DBTYPE type,
-.ti +5
-const void *openinfo);
-.ft R
-.fi
-.SH DESCRIPTION
-.IR Dbopen
-is the library interface to database files.
-The supported file formats are btree, hashed and UNIX file oriented.
-The btree format is a representation of a sorted, balanced tree structure.
-The hashed format is an extensible, dynamic hashing scheme.
-The flat-file format is a byte stream file with fixed or variable length
-records.
-The formats and file format specific information are described in detail
-in their respective manual pages
-.IR btree (3),
-.IR hash (3)
-and
-.IR recno (3).
-.PP
-Dbopen opens
-.I file
-for reading and/or writing.
-Files never intended to be preserved on disk may be created by setting
-the file parameter to NULL.
-.PP
-The
-.I flags
-and
-.I mode arguments
-are as specified to the
-.IR open (2)
-routine, however, only the O_CREAT, O_EXCL, O_EXLOCK, O_NONBLOCK,
-O_RDONLY, O_RDWR, O_SHLOCK and O_TRUNC flags are meaningful.
-(Note, opening a database file O_WRONLY is not possible.)
-.\"Three additional options may be specified by
-.\".IR or 'ing
-.\"them into the
-.\".I flags
-.\"argument.
-.\".TP
-.\"DB_LOCK
-.\"Do the necessary locking in the database to support concurrent access.
-.\"If concurrent access isn't needed or the database is read-only this
-.\"flag should not be set, as it tends to have an associated performance
-.\"penalty.
-.\".TP
-.\"DB_SHMEM
-.\"Place the underlying memory pool used by the database in shared
-.\"memory.
-.\"Necessary for concurrent access.
-.\".TP
-.\"DB_TXN
-.\"Support transactions in the database.
-.\"The DB_LOCK and DB_SHMEM flags must be set as well.
-.PP
-The
-.I type
-argument is of type DBTYPE (as defined in the <db.h> include file) and
-may be set to DB_BTREE, DB_HASH or DB_RECNO.
-.PP
-The
-.I openinfo
-argument is a pointer to an access method specific structure described
-in the access method's manual page.
-If
-.I openinfo
-is NULL, each access method will use defaults appropriate for the system
-and the access method.
-.PP
-.I Dbopen
-returns a pointer to a DB structure on success and NULL on error.
-The DB structure is defined in the <db.h> include file, and contains at
-least the following fields:
-.sp
-.nf
-typedef struct {
-.RS
-DBTYPE type;
-int (*close)(const DB *db);
-int (*del)(const DB *db, const DBT *key, u_int flags);
-int (*fd)(const DB *db);
-int (*get)(const DB *db, DBT *key, DBT *data, u_int flags);
-int (*put)(const DB *db, DBT *key, const DBT *data,
-.ti +5
-u_int flags);
-int (*sync)(const DB *db, u_int flags);
-int (*seq)(const DB *db, DBT *key, DBT *data, u_int flags);
-.RE
-} DB;
-.fi
-.PP
-These elements describe a database type and a set of functions performing
-various actions.
-These functions take a pointer to a structure as returned by
-.IR dbopen ,
-and sometimes one or more pointers to key/data structures and a flag value.
-.TP
-type
-The type of the underlying access method (and file format).
-.TP
-close
-A pointer to a routine to flush any cached information to disk, free any
-allocated resources, and close the underlying file(s).
-Since key/data pairs may be cached in memory, failing to sync the file
-with a
-.I close
-or
-.I sync
-function may result in inconsistent or lost information.
-.I Close
-routines return -1 on error (setting
-.IR errno )
-and 0 on success.
-.TP
-del
-A pointer to a routine to remove key/data pairs from the database.
-.IP
-The parameter
-.I flag
-may be set to the following value:
-.RS
-.TP
-R_CURSOR
-Delete the record referenced by the cursor.
-The cursor must have previously been initialized.
-.RE
-.IP
-.I Delete
-routines return -1 on error (setting
-.IR errno ),
-0 on success, and 1 if the specified
-.I key
-was not in the file.
-.TP
-fd
-A pointer to a routine which returns a file descriptor representative
-of the underlying database.
-A file descriptor referencing the same file will be returned to all
-processes which call
-.I dbopen
-with the same
-.I file
-name.
-This file descriptor may be safely used as an argument to the
-.IR fcntl (2)
-and
-.IR flock (2)
-locking functions.
-The file descriptor is not necessarily associated with any of the
-underlying files used by the access method.
-No file descriptor is available for in memory databases.
-.I Fd
-routines return -1 on error (setting
-.IR errno ),
-and the file descriptor on success.
-.TP
-get
-A pointer to a routine which is the interface for keyed retrieval from
-the database.
-The address and length of the data associated with the specified
-.I key
-are returned in the structure referenced by
-.IR data .
-.I Get
-routines return -1 on error (setting
-.IR errno ),
-0 on success, and 1 if the
-.I key
-was not in the file.
-.TP
-put
-A pointer to a routine to store key/data pairs in the database.
-.IP
-The parameter
-.I flag
-may be set to one of the following values:
-.RS
-.TP
-R_CURSOR
-Replace the key/data pair referenced by the cursor.
-The cursor must have previously been initialized.
-.TP
-R_IAFTER
-Append the data immediately after the data referenced by
-.IR key ,
-creating a new key/data pair.
-The record number of the appended key/data pair is returned in the
-.I key
-structure.
-(Applicable only to the DB_RECNO access method.)
-.TP
-R_IBEFORE
-Insert the data immediately before the data referenced by
-.IR key ,
-creating a new key/data pair.
-The record number of the inserted key/data pair is returned in the
-.I key
-structure.
-(Applicable only to the DB_RECNO access method.)
-.TP
-R_NOOVERWRITE
-Enter the new key/data pair only if the key does not previously exist.
-.TP
-R_SETCURSOR
-Store the key/data pair, setting or initializing the position of the
-cursor to reference it.
-(Applicable only to the DB_BTREE and DB_RECNO access methods.)
-.RE
-.IP
-R_SETCURSOR is available only for the DB_BTREE and DB_RECNO access
-methods because it implies that the keys have an inherent order
-which does not change.
-.IP
-R_IAFTER and R_IBEFORE are available only for the DB_RECNO
-access method because they each imply that the access method is able to
-create new keys.
-This is only true if the keys are ordered and independent, record numbers
-for example.
-.IP
-The default behavior of the
-.I put
-routines is to enter the new key/data pair, replacing any previously
-existing key.
-.IP
-.I Put
-routines return -1 on error (setting
-.IR errno ),
-0 on success, and 1 if the R_NOOVERWRITE
-.I flag
-was set and the key already exists in the file.
-.TP
-seq
-A pointer to a routine which is the interface for sequential
-retrieval from the database.
-The address and length of the key are returned in the structure
-referenced by
-.IR key ,
-and the address and length of the data are returned in the
-structure referenced
-by
-.IR data .
-.IP
-Sequential key/data pair retrieval may begin at any time, and the
-position of the ``cursor'' is not affected by calls to the
-.IR del ,
-.IR get ,
-.IR put ,
-or
-.I sync
-routines.
-Modifications to the database during a sequential scan will be reflected
-in the scan, i.e. records inserted behind the cursor will not be returned
-while records inserted in front of the cursor will be returned.
-.IP
-The flag value
-.B must
-be set to one of the following values:
-.RS
-.TP
-R_CURSOR
-The data associated with the specified key is returned.
-This differs from the
-.I get
-routines in that it sets or initializes the cursor to the location of
-the key as well.
-(Note, for the DB_BTREE access method, the returned key is not necessarily an
-exact match for the specified key.
-The returned key is the smallest key greater than or equal to the specified
-key, permitting partial key matches and range searches.)
-.TP
-R_FIRST
-The first key/data pair of the database is returned, and the cursor
-is set or initialized to reference it.
-.TP
-R_LAST
-The last key/data pair of the database is returned, and the cursor
-is set or initialized to reference it.
-(Applicable only to the DB_BTREE and DB_RECNO access methods.)
-.TP
-R_NEXT
-Retrieve the key/data pair immediately after the cursor.
-If the cursor is not yet set, this is the same as the R_FIRST flag.
-.TP
-R_PREV
-Retrieve the key/data pair immediately before the cursor.
-If the cursor is not yet set, this is the same as the R_LAST flag.
-(Applicable only to the DB_BTREE and DB_RECNO access methods.)
-.RE
-.IP
-R_LAST and R_PREV are available only for the DB_BTREE and DB_RECNO
-access methods because they each imply that the keys have an inherent
-order which does not change.
-.IP
-.I Seq
-routines return -1 on error (setting
-.IR errno ),
-0 on success and 1 if there are no key/data pairs less than or greater
-than the specified or current key.
-If the DB_RECNO access method is being used, and if the database file
-is a character special file and no complete key/data pairs are currently
-available, the
-.I seq
-routines return 2.
-.TP
-sync
-A pointer to a routine to flush any cached information to disk.
-If the database is in memory only, the
-.I sync
-routine has no effect and will always succeed.
-.IP
-The flag value may be set to the following value:
-.RS
-.TP
-R_RECNOSYNC
-If the DB_RECNO access method is being used, this flag causes
-the sync routine to apply to the btree file which underlies the
-recno file, not the recno file itself.
-(See the
-.I bfname
-field of the
-.IR recno (3)
-manual page for more information.)
-.RE
-.IP
-.I Sync
-routines return -1 on error (setting
-.IR errno )
-and 0 on success.
-.SH "KEY/DATA PAIRS"
-Access to all file types is based on key/data pairs.
-Both keys and data are represented by the following data structure:
-.PP
-typedef struct {
-.RS
-void *data;
-.br
-size_t size;
-.RE
-} DBT;
-.PP
-The elements of the DBT structure are defined as follows:
-.TP
-data
-A pointer to a byte string.
-.TP
-size
-The length of the byte string.
-.PP
-Key and data byte strings may reference strings of essentially unlimited
-length although any two of them must fit into available memory at the same
-time.
-It should be noted that the access methods provide no guarantees about
-byte string alignment.
-.SH ERRORS
-The
-.I dbopen
-routine may fail and set
-.I errno
-for any of the errors specified for the library routines
-.IR open (2)
-and
-.IR malloc (3)
-or the following:
-.TP
-[EFTYPE]
-A file is incorrectly formatted.
-.TP
-[EINVAL]
-A parameter has been specified (hash function, pad byte etc.) that is
-incompatible with the current file specification or which is not
-meaningful for the function (for example, use of the cursor without
-prior initialization) or there is a mismatch between the version
-number of file and the software.
-.PP
-The
-.I close
-routines may fail and set
-.I errno
-for any of the errors specified for the library routines
-.IR close (2),
-.IR read (2),
-.IR write (2),
-.IR free (3),
-or
-.IR fsync (2).
-.PP
-The
-.IR del ,
-.IR get ,
-.I put
-and
-.I seq
-routines may fail and set
-.I errno
-for any of the errors specified for the library routines
-.IR read (2),
-.IR write (2),
-.IR free (3)
-or
-.IR malloc (3).
-.PP
-The
-.I fd
-routines will fail and set
-.I errno
-to ENOENT for in memory databases.
-.PP
-The
-.I sync
-routines may fail and set
-.I errno
-for any of the errors specified for the library routine
-.IR fsync (2).
-.SH "SEE ALSO"
-.IR btree (3),
-.IR hash (3),
-.IR mpool (3),
-.IR recno (3)
-.sp
-.IR "LIBTP: Portable, Modular Transactions for UNIX" ,
-Margo Seltzer, Michael Olson, USENIX proceedings, Winter 1992.
-.SH BUGS
-The typedef DBT is a mnemonic for ``data base thang'', and was used
-because noone could think of a reasonable name that wasn't already used.
-.PP
-The file descriptor interface is a kluge and will be deleted in a
-future version of the interface.
-.PP
-None of the access methods provide any form of concurrent access,
-locking, or transactions.
diff --git a/lib/libc/db/man/hash.3 b/lib/libc/db/man/hash.3
deleted file mode 100644
index d408b5d..0000000
--- a/lib/libc/db/man/hash.3
+++ /dev/null
@@ -1,159 +0,0 @@
-.\" Copyright (c) 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)hash.3 8.6 (Berkeley) 8/18/94
-.\"
-.TH HASH 3 "August 18, 1994"
-.UC 7
-.SH NAME
-hash \- hash database access method
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <db.h>
-.ft R
-.fi
-.SH DESCRIPTION
-The routine
-.IR dbopen
-is the library interface to database files.
-One of the supported file formats is hash files.
-The general description of the database access methods is in
-.IR dbopen (3),
-this manual page describes only the hash specific information.
-.PP
-The hash data structure is an extensible, dynamic hashing scheme.
-.PP
-The access method specific data structure provided to
-.I dbopen
-is defined in the <db.h> include file as follows:
-.sp
-typedef struct {
-.RS
-u_int bsize;
-.br
-u_int ffactor;
-.br
-u_int nelem;
-.br
-u_int cachesize;
-.br
-u_int32_t (*hash)(const void *, size_t);
-.br
-int lorder;
-.RE
-} HASHINFO;
-.PP
-The elements of this structure are as follows:
-.TP
-bsize
-.I Bsize
-defines the hash table bucket size, and is, by default, 256 bytes.
-It may be preferable to increase the page size for disk-resident tables
-and tables with large data items.
-.TP
-ffactor
-.I Ffactor
-indicates a desired density within the hash table.
-It is an approximation of the number of keys allowed to accumulate in any
-one bucket, determining when the hash table grows or shrinks.
-The default value is 8.
-.TP
-nelem
-.I Nelem
-is an estimate of the final size of the hash table.
-If not set or set too low, hash tables will expand gracefully as keys
-are entered, although a slight performance degradation may be noticed.
-The default value is 1.
-.TP
-cachesize
-A suggested maximum size, in bytes, of the memory cache.
-This value is
-.B only
-advisory, and the access method will allocate more memory rather
-than fail.
-.TP
-hash
-.I Hash
-is a user defined hash function.
-Since no hash function performs equally well on all possible data, the
-user may find that the built-in hash function does poorly on a particular
-data set.
-User specified hash functions must take two arguments (a pointer to a byte
-string and a length) and return a 32-bit quantity to be used as the hash
-value.
-.TP
-lorder
-The byte order for integers in the stored database metadata.
-The number should represent the order as an integer; for example,
-big endian order would be the number 4,321.
-If
-.I lorder
-is 0 (no order is specified) the current host order is used.
-If the file already exists, the specified value is ignored and the
-value specified when the tree was created is used.
-.PP
-If the file already exists (and the O_TRUNC flag is not specified), the
-values specified for the parameters bsize, ffactor, lorder and nelem are
-ignored and the values specified when the tree was created are used.
-.PP
-If a hash function is specified,
-.I hash_open
-will attempt to determine if the hash function specified is the same as
-the one with which the database was created, and will fail if it is not.
-.PP
-Backward compatible interfaces to the older
-.I dbm
-and
-.I ndbm
-routines are provided, however these interfaces are not compatible with
-previous file formats.
-.SH ERRORS
-The
-.I hash
-access method routines may fail and set
-.I errno
-for any of the errors specified for the library routine
-.IR dbopen (3).
-.SH "SEE ALSO"
-.IR btree (3),
-.IR dbopen (3),
-.IR mpool (3),
-.IR recno (3)
-.sp
-.IR "Dynamic Hash Tables" ,
-Per-Ake Larson, Communications of the ACM, April 1988.
-.sp
-.IR "A New Hash Package for UNIX" ,
-Margo Seltzer, USENIX Proceedings, Winter 1991.
-.SH BUGS
-Only big and little endian byte order is supported.
diff --git a/lib/libc/db/man/mpool.3 b/lib/libc/db/man/mpool.3
deleted file mode 100644
index e625dc4..0000000
--- a/lib/libc/db/man/mpool.3
+++ /dev/null
@@ -1,220 +0,0 @@
-.\" Copyright (c) 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mpool.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.TH MPOOL 3 "June 4, 1993"
-.UC 7
-.SH NAME
-mpool \- shared memory buffer pool
-.SH SYNOPSIS
-.nf
-.ft B
-#include <db.h>
-#include <mpool.h>
-
-MPOOL *
-mpool_open (DBT *key, int fd, pgno_t pagesize, pgno_t maxcache);
-
-void
-mpool_filter (MPOOL *mp, void (*pgin)(void *, pgno_t, void *),
-.ti +5
-void (*pgout)(void *, pgno_t, void *), void *pgcookie);
-
-void *
-mpool_new (MPOOL *mp, pgno_t *pgnoaddr);
-
-void *
-mpool_get (MPOOL *mp, pgno_t pgno, u_int flags);
-
-int
-mpool_put (MPOOL *mp, void *pgaddr, u_int flags);
-
-int
-mpool_sync (MPOOL *mp);
-
-int
-mpool_close (MPOOL *mp);
-.ft R
-.fi
-.SH DESCRIPTION
-.IR Mpool
-is the library interface intended to provide page oriented buffer management
-of files.
-The buffers may be shared between processes.
-.PP
-The function
-.I mpool_open
-initializes a memory pool.
-The
-.I key
-argument is the byte string used to negotiate between multiple
-processes wishing to share buffers.
-If the file buffers are mapped in shared memory, all processes using
-the same key will share the buffers.
-If
-.I key
-is NULL, the buffers are mapped into private memory.
-The
-.I fd
-argument is a file descriptor for the underlying file, which must be seekable.
-If
-.I key
-is non-NULL and matches a file already being mapped, the
-.I fd
-argument is ignored.
-.PP
-The
-.I pagesize
-argument is the size, in bytes, of the pages into which the file is broken up.
-The
-.I maxcache
-argument is the maximum number of pages from the underlying file to cache
-at any one time.
-This value is not relative to the number of processes which share a file's
-buffers, but will be the largest value specified by any of the processes
-sharing the file.
-.PP
-The
-.I mpool_filter
-function is intended to make transparent input and output processing of the
-pages possible.
-If the
-.I pgin
-function is specified, it is called each time a buffer is read into the memory
-pool from the backing file.
-If the
-.I pgout
-function is specified, it is called each time a buffer is written into the
-backing file.
-Both functions are called with the
-.I pgcookie
-pointer, the page number and a pointer to the page to being read or written.
-.PP
-The function
-.I mpool_new
-takes an MPOOL pointer and an address as arguments.
-If a new page can be allocated, a pointer to the page is returned and
-the page number is stored into the
-.I pgnoaddr
-address.
-Otherwise, NULL is returned and errno is set.
-.PP
-The function
-.I mpool_get
-takes a MPOOL pointer and a page number as arguments.
-If the page exists, a pointer to the page is returned.
-Otherwise, NULL is returned and errno is set.
-The flags parameter is not currently used.
-.PP
-The function
-.I mpool_put
-unpins the page referenced by
-.IR pgaddr .
-.I Pgaddr
-must be an address previously returned by
-.I mpool_get
-or
-.IR mpool_new .
-The flag value is specified by
-.IR or 'ing
-any of the following values:
-.TP
-MPOOL_DIRTY
-The page has been modified and needs to be written to the backing file.
-.PP
-.I Mpool_put
-returns 0 on success and -1 if an error occurs.
-.PP
-The function
-.I mpool_sync
-writes all modified pages associated with the MPOOL pointer to the
-backing file.
-.I Mpool_sync
-returns 0 on success and -1 if an error occurs.
-.PP
-The
-.I mpool_close
-function free's up any allocated memory associated with the memory pool
-cookie.
-Modified pages are
-.B not
-written to the backing file.
-.I Mpool_close
-returns 0 on success and -1 if an error occurs.
-.SH ERRORS
-The
-.I mpool_open
-function may fail and set
-.I errno
-for any of the errors specified for the library routine
-.IR malloc (3).
-.PP
-The
-.I mpool_get
-function may fail and set
-.I errno
-for the following:
-.TP 15
-[EINVAL]
-The requested record doesn't exist.
-.PP
-The
-.I mpool_new
-and
-.I mpool_get
-functions may fail and set
-.I errno
-for any of the errors specified for the library routines
-.IR read (2) ,
-.IR write (2) ,
-and
-.IR malloc (3).
-.PP
-The
-.I mpool_sync
-function may fail and set
-.I errno
-for any of the errors specified for the library routine
-.IR write (2).
-.PP
-The
-.I mpool_close
-function may fail and set
-.I errno
-for any of the errors specified for the library routine
-.IR free (3).
-.SH "SEE ALSO"
-.IR dbopen (3),
-.IR btree (3),
-.IR hash (3),
-.IR recno (3)
diff --git a/lib/libc/db/man/recno.3 b/lib/libc/db/man/recno.3
deleted file mode 100644
index bb5f353..0000000
--- a/lib/libc/db/man/recno.3
+++ /dev/null
@@ -1,216 +0,0 @@
-.\" Copyright (c) 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)recno.3 8.5 (Berkeley) 8/18/94
-.\"
-.TH RECNO 3 "August 18, 1994"
-.UC 7
-.SH NAME
-recno \- record number database access method
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <db.h>
-.ft R
-.fi
-.SH DESCRIPTION
-The routine
-.IR dbopen
-is the library interface to database files.
-One of the supported file formats is record number files.
-The general description of the database access methods is in
-.IR dbopen (3),
-this manual page describes only the recno specific information.
-.PP
-The record number data structure is either variable or fixed-length
-records stored in a flat-file format, accessed by the logical record
-number.
-The existence of record number five implies the existence of records
-one through four, and the deletion of record number one causes
-record number five to be renumbered to record number four, as well
-as the cursor, if positioned after record number one, to shift down
-one record.
-.PP
-The recno access method specific data structure provided to
-.I dbopen
-is defined in the <db.h> include file as follows:
-.PP
-typedef struct {
-.RS
-u_long flags;
-.br
-u_int cachesize;
-.br
-u_int psize;
-.br
-int lorder;
-.br
-size_t reclen;
-.br
-u_char bval;
-.br
-char *bfname;
-.RE
-} RECNOINFO;
-.PP
-The elements of this structure are defined as follows:
-.TP
-flags
-The flag value is specified by
-.IR or 'ing
-any of the following values:
-.RS
-.TP
-R_FIXEDLEN
-The records are fixed-length, not byte delimited.
-The structure element
-.I reclen
-specifies the length of the record, and the structure element
-.I bval
-is used as the pad character.
-Any records, inserted into the database, that are less than
-.I reclen
-bytes long are automatically padded.
-.TP
-R_NOKEY
-In the interface specified by
-.IR dbopen ,
-the sequential record retrieval fills in both the caller's key and
-data structures.
-If the R_NOKEY flag is specified, the
-.I cursor
-routines are not required to fill in the key structure.
-This permits applications to retrieve records at the end of files without
-reading all of the intervening records.
-.TP
-R_SNAPSHOT
-This flag requires that a snapshot of the file be taken when
-.I dbopen
-is called, instead of permitting any unmodified records to be read from
-the original file.
-.RE
-.TP
-cachesize
-A suggested maximum size, in bytes, of the memory cache.
-This value is
-.B only
-advisory, and the access method will allocate more memory rather than fail.
-If
-.I cachesize
-is 0 (no size is specified) a default cache is used.
-.TP
-psize
-The recno access method stores the in-memory copies of its records
-in a btree.
-This value is the size (in bytes) of the pages used for nodes in that tree.
-If
-.I psize
-is 0 (no page size is specified) a page size is chosen based on the
-underlying file system I/O block size.
-See
-.IR btree (3)
-for more information.
-.TP
-lorder
-The byte order for integers in the stored database metadata.
-The number should represent the order as an integer; for example,
-big endian order would be the number 4,321.
-If
-.I lorder
-is 0 (no order is specified) the current host order is used.
-.TP
-reclen
-The length of a fixed-length record.
-.TP
-bval
-The delimiting byte to be used to mark the end of a record for
-variable-length records, and the pad character for fixed-length
-records.
-If no value is specified, newlines (``\en'') are used to mark the end
-of variable-length records and fixed-length records are padded with
-spaces.
-.TP
-bfname
-The recno access method stores the in-memory copies of its records
-in a btree.
-If bfname is non-NULL, it specifies the name of the btree file,
-as if specified as the file name for a dbopen of a btree file.
-.PP
-The data part of the key/data pair used by the recno access method
-is the same as other access methods.
-The key is different.
-The
-.I data
-field of the key should be a pointer to a memory location of type
-.IR recno_t ,
-as defined in the <db.h> include file.
-This type is normally the largest unsigned integral type available to
-the implementation.
-The
-.I size
-field of the key should be the size of that type.
-.PP
-Because there can be no meta-data associated with the underlying
-recno access method files, any changes made to the default values
-(e.g. fixed record length or byte separator value) must be explicitly
-specified each time the file is opened.
-.PP
-In the interface specified by
-.IR dbopen ,
-using the
-.I put
-interface to create a new record will cause the creation of multiple,
-empty records if the record number is more than one greater than the
-largest record currently in the database.
-.SH ERRORS
-The
-.I recno
-access method routines may fail and set
-.I errno
-for any of the errors specified for the library routine
-.IR dbopen (3)
-or the following:
-.TP
-[EINVAL]
-An attempt was made to add a record to a fixed-length database that
-was too large to fit.
-.SH "SEE ALSO"
-.IR btree (3),
-.IR dbopen (3),
-.IR hash (3),
-.IR mpool (3)
-.sp
-.IR "Document Processing in a Relational Database System" ,
-Michael Stonebraker, Heidi Stettner, Joseph Kalash, Antonin Guttman,
-Nadene Lynn, Memorandum No. UCB/ERL M82/32, May 1982.
-.SH BUGS
-Only big and little endian byte order is supported.
diff --git a/lib/libc/db/mpool/Makefile.inc b/lib/libc/db/mpool/Makefile.inc
deleted file mode 100644
index c8f2949..0000000
--- a/lib/libc/db/mpool/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id$
-
-.PATH: ${.CURDIR}/../libc/db/mpool
-
-SRCS+= mpool.c
diff --git a/lib/libc/db/mpool/README b/lib/libc/db/mpool/README
deleted file mode 100644
index 0f01fbc..0000000
--- a/lib/libc/db/mpool/README
+++ /dev/null
@@ -1,7 +0,0 @@
-# @(#)README 8.1 (Berkeley) 6/4/93
-
-These are the current memory pool routines.
-They aren't ready for prime time, yet, and
-the interface is expected to change.
-
---keith
diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c
deleted file mode 100644
index a61041e..0000000
--- a/lib/libc/db/mpool/mpool.c
+++ /dev/null
@@ -1,463 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mpool.c 8.5 (Berkeley) 7/26/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/queue.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <db.h>
-
-#define __MPOOLINTERFACE_PRIVATE
-#include <mpool.h>
-
-static BKT *mpool_bkt __P((MPOOL *));
-static BKT *mpool_look __P((MPOOL *, pgno_t));
-static int mpool_write __P((MPOOL *, BKT *));
-
-/*
- * mpool_open --
- * Initialize a memory pool.
- */
-MPOOL *
-mpool_open(key, fd, pagesize, maxcache)
- void *key;
- int fd;
- pgno_t pagesize, maxcache;
-{
- struct stat sb;
- MPOOL *mp;
- int entry;
-
- /*
- * Get information about the file.
- *
- * XXX
- * We don't currently handle pipes, although we should.
- */
- if (fstat(fd, &sb))
- return (NULL);
- if (!S_ISREG(sb.st_mode)) {
- errno = ESPIPE;
- return (NULL);
- }
-
- /* Allocate and initialize the MPOOL cookie. */
- if ((mp = (MPOOL *)calloc(1, sizeof(MPOOL))) == NULL)
- return (NULL);
- CIRCLEQ_INIT(&mp->lqh);
- for (entry = 0; entry < HASHSIZE; ++entry)
- CIRCLEQ_INIT(&mp->hqh[entry]);
- mp->maxcache = maxcache;
- mp->npages = sb.st_size / pagesize;
- mp->pagesize = pagesize;
- mp->fd = fd;
- return (mp);
-}
-
-/*
- * mpool_filter --
- * Initialize input/output filters.
- */
-void
-mpool_filter(mp, pgin, pgout, pgcookie)
- MPOOL *mp;
- void (*pgin) __P((void *, pgno_t, void *));
- void (*pgout) __P((void *, pgno_t, void *));
- void *pgcookie;
-{
- mp->pgin = pgin;
- mp->pgout = pgout;
- mp->pgcookie = pgcookie;
-}
-
-/*
- * mpool_new --
- * Get a new page of memory.
- */
-void *
-mpool_new(mp, pgnoaddr)
- MPOOL *mp;
- pgno_t *pgnoaddr;
-{
- struct _hqh *head;
- BKT *bp;
-
- if (mp->npages == MAX_PAGE_NUMBER) {
- (void)fprintf(stderr, "mpool_new: page allocation overflow.\n");
- abort();
- }
-#ifdef STATISTICS
- ++mp->pagenew;
-#endif
- /*
- * Get a BKT from the cache. Assign a new page number, attach
- * it to the head of the hash chain, the tail of the lru chain,
- * and return.
- */
- if ((bp = mpool_bkt(mp)) == NULL)
- return (NULL);
- *pgnoaddr = bp->pgno = mp->npages++;
- bp->flags = MPOOL_PINNED;
-
- head = &mp->hqh[HASHKEY(bp->pgno)];
- CIRCLEQ_INSERT_HEAD(head, bp, hq);
- CIRCLEQ_INSERT_TAIL(&mp->lqh, bp, q);
- return (bp->page);
-}
-
-/*
- * mpool_get
- * Get a page.
- */
-void *
-mpool_get(mp, pgno, flags)
- MPOOL *mp;
- pgno_t pgno;
- u_int flags; /* XXX not used? */
-{
- struct _hqh *head;
- BKT *bp;
- off_t off;
- int nr;
-
- /* Check for attempt to retrieve a non-existent page. */
- if (pgno >= mp->npages) {
- errno = EINVAL;
- return (NULL);
- }
-
-#ifdef STATISTICS
- ++mp->pageget;
-#endif
-
- /* Check for a page that is cached. */
- if ((bp = mpool_look(mp, pgno)) != NULL) {
-#ifdef DEBUG
- if (bp->flags & MPOOL_PINNED) {
- (void)fprintf(stderr,
- "mpool_get: page %d already pinned\n", bp->pgno);
- abort();
- }
-#endif
- /*
- * Move the page to the head of the hash chain and the tail
- * of the lru chain.
- */
- head = &mp->hqh[HASHKEY(bp->pgno)];
- CIRCLEQ_REMOVE(head, bp, hq);
- CIRCLEQ_INSERT_HEAD(head, bp, hq);
- CIRCLEQ_REMOVE(&mp->lqh, bp, q);
- CIRCLEQ_INSERT_TAIL(&mp->lqh, bp, q);
-
- /* Return a pinned page. */
- bp->flags |= MPOOL_PINNED;
- return (bp->page);
- }
-
- /* Get a page from the cache. */
- if ((bp = mpool_bkt(mp)) == NULL)
- return (NULL);
-
- /* Read in the contents. */
-#ifdef STATISTICS
- ++mp->pageread;
-#endif
- off = mp->pagesize * pgno;
- if (lseek(mp->fd, off, SEEK_SET) != off)
- return (NULL);
- if ((nr = read(mp->fd, bp->page, mp->pagesize)) != mp->pagesize) {
- if (nr >= 0)
- errno = EFTYPE;
- return (NULL);
- }
-
- /* Set the page number, pin the page. */
- bp->pgno = pgno;
- bp->flags = MPOOL_PINNED;
-
- /*
- * Add the page to the head of the hash chain and the tail
- * of the lru chain.
- */
- head = &mp->hqh[HASHKEY(bp->pgno)];
- CIRCLEQ_INSERT_HEAD(head, bp, hq);
- CIRCLEQ_INSERT_TAIL(&mp->lqh, bp, q);
-
- /* Run through the user's filter. */
- if (mp->pgin != NULL)
- (mp->pgin)(mp->pgcookie, bp->pgno, bp->page);
-
- return (bp->page);
-}
-
-/*
- * mpool_put
- * Return a page.
- */
-int
-mpool_put(mp, page, flags)
- MPOOL *mp;
- void *page;
- u_int flags;
-{
- BKT *bp;
-
-#ifdef STATISTICS
- ++mp->pageput;
-#endif
- bp = (BKT *)((char *)page - sizeof(BKT));
-#ifdef DEBUG
- if (!(bp->flags & MPOOL_PINNED)) {
- (void)fprintf(stderr,
- "mpool_put: page %d not pinned\n", bp->pgno);
- abort();
- }
-#endif
- bp->flags &= ~MPOOL_PINNED;
- bp->flags |= flags & MPOOL_DIRTY;
- return (RET_SUCCESS);
-}
-
-/*
- * mpool_close
- * Close the buffer pool.
- */
-int
-mpool_close(mp)
- MPOOL *mp;
-{
- BKT *bp;
-
- /* Free up any space allocated to the lru pages. */
- while ((bp = mp->lqh.cqh_first) != (void *)&mp->lqh) {
- CIRCLEQ_REMOVE(&mp->lqh, mp->lqh.cqh_first, q);
- free(bp);
- }
-
- /* Free the MPOOL cookie. */
- free(mp);
- return (RET_SUCCESS);
-}
-
-/*
- * mpool_sync
- * Sync the pool to disk.
- */
-int
-mpool_sync(mp)
- MPOOL *mp;
-{
- BKT *bp;
-
- /* Walk the lru chain, flushing any dirty pages to disk. */
- for (bp = mp->lqh.cqh_first;
- bp != (void *)&mp->lqh; bp = bp->q.cqe_next)
- if (bp->flags & MPOOL_DIRTY &&
- mpool_write(mp, bp) == RET_ERROR)
- return (RET_ERROR);
-
- /* Sync the file descriptor. */
- return (fsync(mp->fd) ? RET_ERROR : RET_SUCCESS);
-}
-
-/*
- * mpool_bkt
- * Get a page from the cache (or create one).
- */
-static BKT *
-mpool_bkt(mp)
- MPOOL *mp;
-{
- struct _hqh *head;
- BKT *bp;
-
- /* If under the max cached, always create a new page. */
- if (mp->curcache < mp->maxcache)
- goto new;
-
- /*
- * If the cache is max'd out, walk the lru list for a buffer we
- * can flush. If we find one, write it (if necessary) and take it
- * off any lists. If we don't find anything we grow the cache anyway.
- * The cache never shrinks.
- */
- for (bp = mp->lqh.cqh_first;
- bp != (void *)&mp->lqh; bp = bp->q.cqe_next)
- if (!(bp->flags & MPOOL_PINNED)) {
- /* Flush if dirty. */
- if (bp->flags & MPOOL_DIRTY &&
- mpool_write(mp, bp) == RET_ERROR)
- return (NULL);
-#ifdef STATISTICS
- ++mp->pageflush;
-#endif
- /* Remove from the hash and lru queues. */
- head = &mp->hqh[HASHKEY(bp->pgno)];
- CIRCLEQ_REMOVE(head, bp, hq);
- CIRCLEQ_REMOVE(&mp->lqh, bp, q);
-#ifdef DEBUG
- { void *spage;
- spage = bp->page;
- memset(bp, 0xff, sizeof(BKT) + mp->pagesize);
- bp->page = spage;
- }
-#endif
- return (bp);
- }
-
-new: if ((bp = (BKT *)malloc(sizeof(BKT) + mp->pagesize)) == NULL)
- return (NULL);
-#ifdef STATISTICS
- ++mp->pagealloc;
-#endif
-#if defined(DEBUG) || defined(PURIFY)
- memset(bp, 0xff, sizeof(BKT) + mp->pagesize);
-#endif
- bp->page = (char *)bp + sizeof(BKT);
- ++mp->curcache;
- return (bp);
-}
-
-/*
- * mpool_write
- * Write a page to disk.
- */
-static int
-mpool_write(mp, bp)
- MPOOL *mp;
- BKT *bp;
-{
- off_t off;
-
-#ifdef STATISTICS
- ++mp->pagewrite;
-#endif
-
- /* Run through the user's filter. */
- if (mp->pgout)
- (mp->pgout)(mp->pgcookie, bp->pgno, bp->page);
-
- off = mp->pagesize * bp->pgno;
- if (lseek(mp->fd, off, SEEK_SET) != off)
- return (RET_ERROR);
- if (write(mp->fd, bp->page, mp->pagesize) != mp->pagesize)
- return (RET_ERROR);
-
- bp->flags &= ~MPOOL_DIRTY;
- return (RET_SUCCESS);
-}
-
-/*
- * mpool_look
- * Lookup a page in the cache.
- */
-static BKT *
-mpool_look(mp, pgno)
- MPOOL *mp;
- pgno_t pgno;
-{
- struct _hqh *head;
- BKT *bp;
-
- head = &mp->hqh[HASHKEY(pgno)];
- for (bp = head->cqh_first; bp != (void *)head; bp = bp->hq.cqe_next)
- if (bp->pgno == pgno) {
-#ifdef STATISTICS
- ++mp->cachehit;
-#endif
- return (bp);
- }
-#ifdef STATISTICS
- ++mp->cachemiss;
-#endif
- return (NULL);
-}
-
-#ifdef STATISTICS
-/*
- * mpool_stat
- * Print out cache statistics.
- */
-void
-mpool_stat(mp)
- MPOOL *mp;
-{
- BKT *bp;
- int cnt;
- char *sep;
-
- (void)fprintf(stderr, "%lu pages in the file\n", mp->npages);
- (void)fprintf(stderr,
- "page size %lu, cacheing %lu pages of %lu page max cache\n",
- mp->pagesize, mp->curcache, mp->maxcache);
- (void)fprintf(stderr, "%lu page puts, %lu page gets, %lu page new\n",
- mp->pageput, mp->pageget, mp->pagenew);
- (void)fprintf(stderr, "%lu page allocs, %lu page flushes\n",
- mp->pagealloc, mp->pageflush);
- if (mp->cachehit + mp->cachemiss)
- (void)fprintf(stderr,
- "%.0f%% cache hit rate (%lu hits, %lu misses)\n",
- ((double)mp->cachehit / (mp->cachehit + mp->cachemiss))
- * 100, mp->cachehit, mp->cachemiss);
- (void)fprintf(stderr, "%lu page reads, %lu page writes\n",
- mp->pageread, mp->pagewrite);
-
- sep = "";
- cnt = 0;
- for (bp = mp->lqh.cqh_first;
- bp != (void *)&mp->lqh; bp = bp->q.cqe_next) {
- (void)fprintf(stderr, "%s%d", sep, bp->pgno);
- if (bp->flags & MPOOL_DIRTY)
- (void)fprintf(stderr, "d");
- if (bp->flags & MPOOL_PINNED)
- (void)fprintf(stderr, "P");
- if (++cnt == 10) {
- sep = "\n";
- cnt = 0;
- } else
- sep = ", ";
-
- }
- (void)fprintf(stderr, "\n");
-}
-#endif
diff --git a/lib/libc/db/mpool/mpool.libtp b/lib/libc/db/mpool/mpool.libtp
deleted file mode 100644
index dbb0469..0000000
--- a/lib/libc/db/mpool/mpool.libtp
+++ /dev/null
@@ -1,746 +0,0 @@
-/******************************************************************************
-
-VERSION $Id$
-PACKAGE: User Level Shared Memory Manager
-
-DESCRIPTION:
- This package provides a buffer pool interface implemented as
- a collection of file pages mapped into shared memory.
-
- Based on Mark's buffer manager
-
-ROUTINES:
- External
- buf_alloc
- buf_flags
- buf_get
- buf_init
- buf_last
- buf_open
- buf_pin
- buf_sync
- buf_unpin
- Internal
- bf_assign_buf
- bf_fid_to_fd
- bf_newbuf
- bf_put_page
-
-
-******************************************************************************/
-#include <sys/types.h>
-#include <assert.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <errno.h>
-#include "list.h"
-#include "user.h"
-#include "txn_sys.h"
-#include "buf.h"
-#include "semkeys.h"
-#include "error.h"
-
-/*
- we need to translate between some type of file id that the user
- process passes and a file descriptor. For now, it's a nop.
-*/
-#define GET_MASTER get_sem ( buf_spinlock )
-#define RELEASE_MASTER release_sem ( buf_spinlock )
-
-#define LRUID *buf_lru
-#define LRUP (bufhdr_table+*buf_lru)
-#define MRU bufhdr_table[*buf_lru].lru.prev
-
-/* Global indicator that you have started reusing buffers */
-int do_statistics = 0;
-/*
- Process Statics (pointers into shared memory)
-*/
-static BUF_T *buf_table = 0;
-static BUFHDR_T *bufhdr_table;
-static int *buf_hash_table;
-static int *buf_lru; /* LRU is the free list */
-static int buf_spinlock;
-static FINFO_T *buf_fids;
-static int *buf_sp; /* Pointer to string free space */
-static char *buf_strings;
-
-/* Process Local FID->FD table */
-static int fds[NUM_FILE_ENTRIES];
-
-/* Static routines */
-static BUFHDR_T *bf_assign_buf();
-static int bf_fid_to_fd();
-static BUFHDR_T *bf_newbuf();
-static int bf_put_page();
-
-/*
- Return 0 on success
- 1 on failure
-*/
-extern int
-buf_init ( )
-{
- ADDR_T buf_region;
- BUFHDR_T *bhp;
- int i;
- int ref_count;
- int *spinlockp;
-
- /*
- Initialize Process local structures
- */
- for ( i = 0; i < NUM_FILE_ENTRIES; i++ ) {
- fds[i] = -1;
- }
-
- buf_region = attach_region ( BUF_REGION_NAME, BUF_REGION_NUM,
- BUF_REGION_SIZE, &ref_count );
- if ( !buf_region ) {
- return (1);
- }
- error_log3 ( "Buf Region: ADDR: %d ID: %d SIZE: %d\n", buf_region,
- BUF_REGION_NUM, BUF_REGION_SIZE );
-
- buf_table = (BUF_T *)buf_region;
- bufhdr_table = (BUFHDR_T *)(buf_table + NUM_BUFS);
- buf_hash_table = (int *)(bufhdr_table + NUM_BUFS);
- buf_lru = buf_hash_table + NUMTABLE_ENTRIES;
- spinlockp = buf_lru + 1;
- buf_fids = (FINFO_T *)(spinlockp+1);
- buf_sp = (int *)(buf_fids + NUM_FILE_ENTRIES);
- buf_strings = (char *)(buf_sp + 1);
-
- /* Create locking spinlock (gets creating holding the lock) */
- buf_spinlock = create_sem ( BUF_SPIN_NAME, BUF_SPIN_NUM, ref_count <= 1 );
- if ( buf_spinlock < 0 ) {
- return(1);
- }
- if ( ref_count <= 1 ) {
- *spinlockp = buf_spinlock;
-
- /* Now initialize the buffer manager */
-
- /* 1. Free list */
- *buf_lru = 0;
-
- /* 2. Buffer headers */
- for ( i = 0, bhp = bufhdr_table; i < NUM_BUFS; bhp++, i++ ) {
- bhp->lru.next = i+1;
- bhp->lru.prev = i-1;
- bhp->flags = 0; /* All Flags off */
- bhp->refcount = 0;
- bhp->wait_proc = -1; /* No sleepers */
- LISTPE_INIT ( hash, bhp, i ); /* Hash chains */
- }
- bufhdr_table[0].lru.prev = NUM_BUFS-1;
- bufhdr_table[NUM_BUFS-1].lru.next = 0;
-
- /* 3. Hash Table */
- for ( i = 0; i < NUMTABLE_ENTRIES; i++ ) {
- buf_hash_table[i] = NUM_BUFS;
- }
-
- /* 4. File ID Table */
- for ( i = 0; i < NUM_FILE_ENTRIES; i++ ) {
- buf_fids[i].offset = -1;
- buf_fids[i].npages = -1;
- buf_fids[i].refcount = 0;
- }
-
- /* 5. Free String Pointer */
- *buf_sp = (FILE_NAME_LEN*NUM_FILE_ENTRIES);
- if (RELEASE_MASTER) {
- return(1);
- }
- error_log0 ( "Initialized buffer region\n" );
- }
- return (0);
-}
-
-extern void
-buf_exit()
-{
- int ref;
- int i;
-
- /* Flush Buffer Pool on Exit */
- for ( i = 0; i < NUM_FILE_ENTRIES; i++ ) {
- if ( fds[i] != -1 ) {
- close ( fds[i] );
- }
- }
- if ( buf_table ) {
- detach_region ( buf_table, BUF_REGION_NUM, BUF_REGION_SIZE, &ref );
- }
- return;
-}
-
-/*
- We need an empty buffer. Find the LRU unpinned NON-Dirty page.
-*/
-static BUFHDR_T *
-bf_newbuf()
-{
- int fd;
- int lruid;
- int nbytes;
- int ndx;
- BUFHDR_T *bhp;
-
- lruid = LRUID;
- for ( bhp = LRUP;
- bhp->flags & (BUF_PINNED|BUF_IO_IN_PROGRESS);
- bhp = LISTP_NEXTP (bufhdr_table, lru, bhp ) ) {
-
- if ( bhp->lru.next == lruid ) {
- /* OUT OF BUFFERS */
- error_log1 ( "All buffers are pinned. %s\n",
- "Unable to grant buffer request" );
- return(NULL);
- }
- }
- /* BHP can be used */
- if ( bhp->flags & BUF_DIRTY ) {
- do_statistics = 1;
- /*
- MIS Check for log flushed appropriately
- */
- fd = bf_fid_to_fd(bhp->id.file_id);
- if ( fd == -1 ) {
- error_log1 ("Invalid fid %d\n", bhp->id.file_id);
- return(NULL);
- }
- if ( bf_put_page(fd, bhp) < 0 ) {
- return(NULL);
- }
- }
- /* Update Hash Pointers */
- ndx = BUF_HASH ( bhp->id.file_id, bhp->id.obj_id );
- LISTP_REMOVE(bufhdr_table, hash, bhp);
- if ( buf_hash_table[ndx] == (bhp-bufhdr_table) ) {
- if ( bhp->hash.next != (bhp-bufhdr_table) ) {
- buf_hash_table[ndx] = bhp->hash.next;
- } else {
- buf_hash_table[ndx] = NUM_BUFS;
- }
- }
- INIT_BUF(bhp);
-
- return(bhp);
-}
-/*
- buf_alloc
-
- Add a page to a file and return a buffer for it.
-
-*/
-ADDR_T
-buf_alloc ( fid, new_pageno )
-int fid;
-int *new_pageno;
-{
- BUFHDR_T *bhp;
- int fd;
- int len;
- int ndx;
- OBJ_T fobj;
-
- if (GET_MASTER) {
- return(NULL);
- }
- if ( buf_fids[fid].npages == -1 ) {
- /* initialize npages field */
- fd = bf_fid_to_fd ( fid );
- }
- assert (fid < NUM_FILE_ENTRIES);
-
- *new_pageno = buf_fids[fid].npages;
- if ( *new_pageno == -1 ) {
- RELEASE_MASTER;
- return ( NULL );
- }
- buf_fids[fid].npages++;
- ndx = BUF_HASH ( fid, *new_pageno );
- fobj.file_id = fid;
- fobj.obj_id = *new_pageno;
- bhp = bf_assign_buf ( ndx, &fobj, BF_PIN|BF_DIRTY|BF_EMPTY, &len );
- if ( RELEASE_MASTER ) {
- /* Memory leak */
- return(NULL);
- }
- if ( bhp ) {
- return ((ADDR_T)(buf_table+(bhp-bufhdr_table)));
- } else {
- return ( NULL );
- }
-}
-
-
-/*
- Buffer Flags
- BF_DIRTY Mark page as dirty
- BF_EMPTY Don't initialize page, just get buffer
- BF_PIN Retrieve with pin
-
-MIS
-Might want to add a flag that sets an LSN for this buffer is the
-DIRTY flag is set
-
-Eventually, you may want a flag that indicates the I/O and lock
-request should be shipped off together, but not for now.
-*/
-extern ADDR_T
-buf_get ( file_id, page_id, flags, len )
-int file_id;
-int page_id;
-u_long flags;
-int *len; /* Number of bytes read into buffer */
-{
- BUFHDR_T *bhp;
- int bufid;
- int fd;
- int ndx;
- int next_bufid;
- int stat;
- OBJ_T fobj;
-
- ndx = BUF_HASH ( file_id, page_id );
- fobj.file_id = (long) file_id;
- fobj.obj_id = (long) page_id;
- if ( GET_MASTER ) {
- return(NULL);
- }
- /*
- This could be a for loop, but we lose speed
- by making all the cases general purpose so we
- optimize for the no-collision case.
- */
- bufid = buf_hash_table[ndx];
- if ( bufid < NUM_BUFS ) {
- for ( bhp = bufhdr_table+bufid;
- !OBJ_EQ (bhp->id, fobj) || !(bhp->flags & BUF_VALID);
- bhp = LISTP_NEXTP ( bufhdr_table, hash, bhp ) ) {
-
- if ( bhp->hash.next == bufid ) {
- goto not_found;
- }
- }
-/* found */
- if ( flags & BF_PIN ) {
- bhp->flags |= BUF_PINNED;
- bhp->refcount++;
-#ifdef PIN_DEBUG
- fprintf(stderr, "buf_get: %X PINNED (%d)\n",
- buf_table + (bhp-bufhdr_table), bhp->refcount);
-#endif
- }
- if ( flags & BF_DIRTY ) {
- bhp->flags |= BUF_DIRTY;
- }
-
- while ( bhp->flags & BUF_IO_IN_PROGRESS ) {
- /* MIS -- eventually err check here */
-#ifdef DEBUG
- printf("About to sleep on %d (me: %d\n)\n", bhp->wait_proc,
- my_txnp - txn_table);
-#endif
-#ifdef WAIT_STATS
- buf_waits++;
-#endif
- stat = proc_sleep_on ( &(bhp->wait_proc), buf_spinlock );
- if ( stat ) {
- /* Memory leak */
- return(NULL);
- }
- if (!( bhp->flags & BUF_IO_IN_PROGRESS) &&
- (!OBJ_EQ (bhp->id, fobj) || !(bhp->flags & BUF_VALID))) {
- if (RELEASE_MASTER)
- return(NULL);
- return(buf_get ( file_id, page_id, flags, len ));
- }
- }
- MAKE_MRU( bhp );
- *len = BUFSIZE;
- } else {
-not_found:
- /* If you get here, the page isn't in the hash table */
- bhp = bf_assign_buf ( ndx, &fobj, flags, len );
- }
- /* Common code between found and not found */
-
- if ( bhp && bhp->flags & BUF_NEWPAGE ) {
- *len = 0;
- }
- if (RELEASE_MASTER){
- /* Memory leak */
- return(NULL);
- }
- if ( bhp ) {
- return ((ADDR_T)(buf_table+(bhp-bufhdr_table)));
- } else {
- return ( NULL );
- }
-}
-
-/*
- MIS - do I want to add file links to buffer pool?
-*/
-extern int
-buf_sync ( fid, close )
-int fid;
-int close; /* should we dec refcount and possibly
- invalidate all the buffers */
-{
- int i;
- int fd;
- int invalidate;
- BUFHDR_T *bhp;
-
- if ( (fd = bf_fid_to_fd ( fid )) < 0 ) {
- return(1);
- }
- if (GET_MASTER) {
- return(1);
- }
- invalidate = (buf_fids[fid].refcount == 1 && close);
- if ( invalidate )
- for ( bhp = bufhdr_table, i = 0; i < NUM_BUFS; bhp++, i++ ) {
- if (bhp->id.file_id == fid) {
- if ((bhp->flags & BF_DIRTY) && (bf_put_page( fd, bhp ) < 0)) {
- return(1);
- }
- bhp->id.file_id = -1;
- }
- }
- if (invalidate || close)
- buf_fids[fid].refcount--;
-
- if (RELEASE_MASTER) {
- return(1);
- }
- return(0);
-
-
-}
-
-extern int
-buf_flags ( addr, set_flags, unset_flags )
-ADDR_T addr;
-u_long set_flags;
-u_long unset_flags;
-{
- int bufid;
- BUFHDR_T *bhp;
-
-#ifdef PIN_DEBUG
- fprintf(stderr, "buf_flags: %X setting %s%s%s%s%s releasing %s%s%s%s%s\n",
- addr,
- set_flags&BUF_DIRTY ? "DIRTY " : "",
- set_flags&BUF_VALID ? "VALID " : "",
- set_flags&BUF_PINNED ? "PINNED " : "",
- set_flags&BUF_IO_ERROR ? "IO_ERROR " : "",
- set_flags&BUF_IO_IN_PROGRESS ? "IO_IN_PROG " : "",
- set_flags&BUF_NEWPAGE ? "NEWPAGE " : "",
- unset_flags&BUF_DIRTY ? "DIRTY " : "",
- unset_flags&BUF_VALID ? "VALID " : "",
- unset_flags&BUF_PINNED ? "PINNED " : "",
- unset_flags&BUF_IO_ERROR ? "IO_ERROR " : "",
- unset_flags&BUF_IO_IN_PROGRESS ? "IO_IN_PROG " : "",
- unset_flags&BUF_NEWPAGE ? "NEWPAGE " : "" );
-#endif
- if (!ADDR_OK(addr)) {
- error_log1 ( "buf_pin: Invalid Buffer Address %x\n", addr );
- return(1);
- }
- bufid = ((BUF_T *)addr) - buf_table;
- assert ( bufid < NUM_BUFS);
- bhp = &bufhdr_table[bufid];
- if (GET_MASTER) {
- return(1);
- }
- bhp->flags |= set_flags;
- if ( set_flags & BUF_PINNED ) {
- bhp->refcount++;
- }
- if ( set_flags & BUF_DIRTY ) {
- unset_flags |= BUF_NEWPAGE;
- }
-
- if ( unset_flags & BUF_PINNED ) {
- bhp->refcount--;
- if ( bhp->refcount ) {
- /* Turn off pin bit so it doesn't get unset */
- unset_flags &= ~BUF_PINNED;
- }
- }
- bhp->flags &= ~unset_flags;
- MAKE_MRU(bhp);
- if (RELEASE_MASTER) {
- return(1);
- }
- return(0);
-}
-
-/*
- Take a string name and produce an fid.
-
- returns -1 on error
-
- MIS -- this is a potential problem -- you keep actual names
- here -- what if people run from different directories?
-*/
-extern int
-buf_name_lookup ( fname )
-char *fname;
-{
- int i;
- int fid;
- int ndx;
-
- fid = -1;
- if (GET_MASTER) {
- return(-1);
- }
- for ( i = 0; i < NUM_FILE_ENTRIES; i++ ) {
- if ( buf_fids[i].offset == -1 ) {
- fid = i;
- } else {
- if (!strcmp (fname, buf_strings+buf_fids[i].offset)) {
- if (RELEASE_MASTER) {
- return(-1);
- }
- buf_fids[i].refcount++;
- return(i);
- }
- }
- }
- if ( fid == -1 ) {
- error_log0 ( "No more file ID's\n" );
- } else {
- ndx = *buf_sp - strlen(fname) - 1;
- if ( ndx < 0 ) {
- error_log0 ( "Out of string space\n" );
- fid = -1;
- } else {
- *buf_sp = ndx;
- strcpy ( buf_strings+ndx, fname );
- buf_fids[fid].offset = ndx;
- }
- buf_fids[fid].refcount = 1;
- }
- if (RELEASE_MASTER) {
- return(-1);
- }
- return(fid);
-}
-
-static int
-bf_fid_to_fd ( fid )
-int fid;
-{
- struct stat sbuf;
-
- assert ( (fid < NUM_FILE_ENTRIES) && (buf_fids[fid].offset != -1) );
- if ( fds[fid] != -1 ) {
- return(fds[fid]);
-
- }
- fds[fid] = open ( buf_strings+buf_fids[fid].offset, O_RDWR|O_CREAT,
- 0666 );
- if ( fds[fid] < 0 ) {
- error_log3 ( "Error Opening File %s FID: %d FD: %d. Errno = %d\n",
- buf_strings+buf_fids[fid].offset, fid, fds[fid],
- errno );
- return(-1);
- }
- error_log3 ( "Opening File %s FID: %d FD: %d\n",
- buf_strings+buf_fids[fid].offset, fid, fds[fid] );
- if ( buf_fids[fid].npages == -1 ) {
- /* Initialize the npages field */
- if ( fstat ( fds[fid], &sbuf ) ) {
- error_log3 ( "Error Fstating %s FID: %d. Errno = %d\n",
- buf_strings+buf_fids[fid].offset, fid, errno );
- } else {
- buf_fids[fid].npages = ( sbuf.st_size / BUFSIZE );
- }
- }
-
- return ( fds[fid] );
-}
-
-static int
-bf_put_page ( fd, bhp )
-int fd;
-BUFHDR_T *bhp;
-{
- int nbytes;
-
- assert ( (bhp-bufhdr_table) < NUM_BUFS );
- if ( lseek ( fd, bhp->id.obj_id << BUFSHIFT, L_SET ) < 0 ) {
- return(-1);
- }
- bhp->flags |= BUF_IO_IN_PROGRESS;
- if (RELEASE_MASTER) {
- return(-1);
- }
- nbytes = write(fd, buf_table[bhp-bufhdr_table], BUFSIZE);
- if (GET_MASTER) {
- return(-2);
- }
- if ( nbytes < 0 ) {
- error_log1 ("Write failed with error code %d\n", errno);
- return(-1);
- } else if ( nbytes != BUFSIZE ) {
- error_log1 ("Short write: %d bytes of %d\n", nbytes, BUFSIZE );
- }
- bhp->flags &= ~(BUF_DIRTY|BUF_IO_IN_PROGRESS);
- return (0);
-}
-
-static BUFHDR_T *
-bf_assign_buf ( ndx, obj, flags, len )
-int ndx;
-OBJ_T *obj;
-u_long flags;
-int *len; /* Number of bytes read */
-{
- BUFHDR_T *bhp;
- int fd;
-
- assert ( obj->file_id < NUM_FILE_ENTRIES );
- bhp = bf_newbuf();
- if ( !bhp ) {
- return(NULL);
- }
- OBJ_ASSIGN ( (*obj), bhp->id );
- if ( buf_hash_table[ndx] >= NUM_BUFS ) {
- buf_hash_table[ndx] = bhp-bufhdr_table;
- } else {
- LISTPE_INSERT ( bufhdr_table, hash, bhp, buf_hash_table[ndx] );
- }
-
- bhp->flags |= BUF_VALID;
- if ( flags & BF_PIN ) {
- bhp->flags |= BUF_PINNED;
- bhp->refcount++;
-#ifdef PIN_DEBUG
- fprintf(stderr, "bf_assign_buf: %X PINNED (%d)\n",
- buf_table + (bhp-bufhdr_table), bhp->refcount);
-#endif
- }
- fd = bf_fid_to_fd(obj->file_id);
- if ( fd == -1 ) {
- error_log1 ("Invalid fid %d\n", obj->file_id);
- bhp->flags |= ~BUF_IO_ERROR;
- return(NULL);
- }
- if ( obj->obj_id >= buf_fids[obj->file_id].npages) {
- buf_fids[obj->file_id].npages = obj->obj_id+1;
- *len = 0;
- } else if ( flags & BF_EMPTY ) {
- *len = 0;
- } else {
- bhp->flags |= BUF_IO_IN_PROGRESS;
- if (RELEASE_MASTER) {
- return(NULL);
- }
- if ( lseek ( fd, obj->obj_id << BUFSHIFT, L_SET ) < -1 ) {
- error_log2 ("Unable to perform seek on file: %d to page %d",
- obj->file_id, obj->obj_id );
- bhp->flags &= ~BUF_IO_IN_PROGRESS;
- bhp->flags |= ~BUF_IO_ERROR;
- return(NULL);
- }
- *len = read(fd, buf_table[bhp-bufhdr_table], BUFSIZE);
- if ( *len < 0 ) {
- error_log2 ("Unable to perform read on file: %d to page %d",
- obj->file_id, obj->obj_id );
- bhp->flags &= ~BUF_IO_IN_PROGRESS;
- bhp->flags |= ~BUF_IO_ERROR;
- return(NULL);
- }
- if (GET_MASTER) {
- return(NULL);
- }
- bhp->flags &= ~BUF_IO_IN_PROGRESS;
- if ( bhp->wait_proc != -1 ) {
- /* wake up waiter and anyone waiting on it */
-#ifdef DEBUG
- printf("Waking transaction %d due to completed I/O\n",
- bhp->wait_proc);
-#endif
- proc_wake_id ( bhp->wait_proc );
- bhp->wait_proc = -1;
- }
- MAKE_MRU(bhp);
- }
-
- if ( flags & BF_DIRTY ) {
- bhp->flags |= BUF_DIRTY;
- } else if ( *len < BUFSIZE ) {
- bhp->flags |= BUF_NEWPAGE;
- }
- return ( bhp );
-}
-
-int
-buf_last ( fid )
-int fid;
-{
- int val;
-
- if (GET_MASTER) {
- return(-1);
- }
- assert ( fid < NUM_FILE_ENTRIES );
- if ( buf_fids[fid].npages == -1 ) {
- /* initialize npages field */
- (void) bf_fid_to_fd ( fid );
- }
- val = buf_fids[fid].npages;
- if ( val ) {
- val--; /* Convert to page number */
- }
- if (RELEASE_MASTER) {
- return(-1);
- }
- return(val);
-}
-
-#ifdef DEBUG
-extern void
-buf_dump ( id, all )
-int id;
-int all;
-{
- int i;
- BUFHDR_T *bhp;
-
- printf ( "LRU + %d\n", *buf_lru );
- if ( all ) {
- printf("ID\tFID\tPID\tLNEXT\tLPREV\tHNEXT\tHPREV\tSLEEP\tFLAG\tREFS\n");
- for ( bhp = bufhdr_table, i = 0; i < NUM_BUFS; bhp++, i++ ) {
- printf ( "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%x\t%d\n", i,
- bhp->id.file_id, bhp->id.obj_id,
- bhp->lru.next, bhp->lru.prev,
- bhp->hash.next, bhp->hash.prev,
- bhp->wait_proc, bhp->flags, bhp->refcount );
- }
- } else {
- if ( id >= NUM_BUFS ) {
- printf ( "Buffer ID (%d) too high\n", id );
- return;
- }
- bhp = bufhdr_table+id;
- printf ( "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%x\t%d\n", i,
- bhp->id.file_id, bhp->id.obj_id,
- bhp->lru.next, bhp->lru.prev,
- bhp->hash.next, bhp->hash.prev,
- bhp->wait_proc, bhp->flags, bhp->refcount );
- }
- return;
-}
-#endif
-
diff --git a/lib/libc/db/recno/Makefile.inc b/lib/libc/db/recno/Makefile.inc
deleted file mode 100644
index 5241fa5..0000000
--- a/lib/libc/db/recno/Makefile.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id$
-
-.PATH: ${.CURDIR}/../libc/db/recno
-
-SRCS+= rec_close.c rec_delete.c rec_get.c rec_open.c rec_put.c rec_search.c \
- rec_seq.c rec_utils.c
diff --git a/lib/libc/db/recno/extern.h b/lib/libc/db/recno/extern.h
deleted file mode 100644
index feed434..0000000
--- a/lib/libc/db/recno/extern.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)extern.h 8.3 (Berkeley) 6/4/94
- */
-
-#include "../btree/extern.h"
-
-int __rec_close __P((DB *));
-int __rec_delete __P((const DB *, const DBT *, u_int));
-int __rec_dleaf __P((BTREE *, PAGE *, u_int32_t));
-int __rec_fd __P((const DB *));
-int __rec_fmap __P((BTREE *, recno_t));
-int __rec_fout __P((BTREE *));
-int __rec_fpipe __P((BTREE *, recno_t));
-int __rec_get __P((const DB *, const DBT *, DBT *, u_int));
-int __rec_iput __P((BTREE *, recno_t, const DBT *, u_int));
-int __rec_put __P((const DB *dbp, DBT *, const DBT *, u_int));
-int __rec_ret __P((BTREE *, EPG *, recno_t, DBT *, DBT *));
-EPG *__rec_search __P((BTREE *, recno_t, enum SRCHOP));
-int __rec_seq __P((const DB *, DBT *, DBT *, u_int));
-int __rec_sync __P((const DB *, u_int));
-int __rec_vmap __P((BTREE *, recno_t));
-int __rec_vout __P((BTREE *));
-int __rec_vpipe __P((BTREE *, recno_t));
diff --git a/lib/libc/db/recno/rec_close.c b/lib/libc/db/recno/rec_close.c
deleted file mode 100644
index 1c124de..0000000
--- a/lib/libc/db/recno/rec_close.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rec_close.c 8.6 (Berkeley) 8/18/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/mman.h>
-
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include <db.h>
-#include "recno.h"
-
-/*
- * __REC_CLOSE -- Close a recno tree.
- *
- * Parameters:
- * dbp: pointer to access method
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__rec_close(dbp)
- DB *dbp;
-{
- BTREE *t;
- int status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- if (__rec_sync(dbp, 0) == RET_ERROR)
- return (RET_ERROR);
-
- /* Committed to closing. */
- status = RET_SUCCESS;
- if (F_ISSET(t, R_MEMMAPPED) && munmap(t->bt_smap, t->bt_msize))
- status = RET_ERROR;
-
- if (!F_ISSET(t, R_INMEM))
- if (F_ISSET(t, R_CLOSEFP)) {
- if (fclose(t->bt_rfp))
- status = RET_ERROR;
- } else
- if (close(t->bt_rfd))
- status = RET_ERROR;
-
- if (__bt_close(dbp) == RET_ERROR)
- status = RET_ERROR;
-
- return (status);
-}
-
-/*
- * __REC_SYNC -- sync the recno tree to disk.
- *
- * Parameters:
- * dbp: pointer to access method
- *
- * Returns:
- * RET_SUCCESS, RET_ERROR.
- */
-int
-__rec_sync(dbp, flags)
- const DB *dbp;
- u_int flags;
-{
- struct iovec iov[2];
- BTREE *t;
- DBT data, key;
- off_t off;
- recno_t scursor, trec;
- int status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- if (flags == R_RECNOSYNC)
- return (__bt_sync(dbp, 0));
-
- if (F_ISSET(t, R_RDONLY | R_INMEM) || !F_ISSET(t, R_MODIFIED))
- return (RET_SUCCESS);
-
- /* Read any remaining records into the tree. */
- if (!F_ISSET(t, R_EOF) && t->bt_irec(t, MAX_REC_NUMBER) == RET_ERROR)
- return (RET_ERROR);
-
- /* Rewind the file descriptor. */
- if (lseek(t->bt_rfd, (off_t)0, SEEK_SET) != 0)
- return (RET_ERROR);
-
- /* Save the cursor. */
- scursor = t->bt_cursor.rcursor;
-
- key.size = sizeof(recno_t);
- key.data = &trec;
-
- if (F_ISSET(t, R_FIXLEN)) {
- /*
- * We assume that fixed length records are all fixed length.
- * Any that aren't are either EINVAL'd or corrected by the
- * record put code.
- */
- status = (dbp->seq)(dbp, &key, &data, R_FIRST);
- while (status == RET_SUCCESS) {
- if (write(t->bt_rfd, data.data, data.size) != data.size)
- return (RET_ERROR);
- status = (dbp->seq)(dbp, &key, &data, R_NEXT);
- }
- } else {
- iov[1].iov_base = (char *)&t->bt_bval;
- iov[1].iov_len = 1;
-
- status = (dbp->seq)(dbp, &key, &data, R_FIRST);
- while (status == RET_SUCCESS) {
- iov[0].iov_base = data.data;
- iov[0].iov_len = data.size;
- if (writev(t->bt_rfd, iov, 2) != data.size + 1)
- return (RET_ERROR);
- status = (dbp->seq)(dbp, &key, &data, R_NEXT);
- }
- }
-
- /* Restore the cursor. */
- t->bt_cursor.rcursor = scursor;
-
- if (status == RET_ERROR)
- return (RET_ERROR);
- if ((off = lseek(t->bt_rfd, (off_t)0, SEEK_CUR)) == -1)
- return (RET_ERROR);
- if (ftruncate(t->bt_rfd, off))
- return (RET_ERROR);
- F_CLR(t, R_MODIFIED);
- return (RET_SUCCESS);
-}
diff --git a/lib/libc/db/recno/rec_delete.c b/lib/libc/db/recno/rec_delete.c
deleted file mode 100644
index a16593d..0000000
--- a/lib/libc/db/recno/rec_delete.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rec_delete.c 8.7 (Berkeley) 7/14/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <db.h>
-#include "recno.h"
-
-static int rec_rdelete __P((BTREE *, recno_t));
-
-/*
- * __REC_DELETE -- Delete the item(s) referenced by a key.
- *
- * Parameters:
- * dbp: pointer to access method
- * key: key to delete
- * flags: R_CURSOR if deleting what the cursor references
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
- */
-int
-__rec_delete(dbp, key, flags)
- const DB *dbp;
- const DBT *key;
- u_int flags;
-{
- BTREE *t;
- recno_t nrec;
- int status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- switch(flags) {
- case 0:
- if ((nrec = *(recno_t *)key->data) == 0)
- goto einval;
- if (nrec > t->bt_nrecs)
- return (RET_SPECIAL);
- --nrec;
- status = rec_rdelete(t, nrec);
- break;
- case R_CURSOR:
- if (!F_ISSET(&t->bt_cursor, CURS_INIT))
- goto einval;
- if (t->bt_nrecs == 0)
- return (RET_SPECIAL);
- status = rec_rdelete(t, t->bt_cursor.rcursor - 1);
- if (status == RET_SUCCESS)
- --t->bt_cursor.rcursor;
- break;
- default:
-einval: errno = EINVAL;
- return (RET_ERROR);
- }
-
- if (status == RET_SUCCESS)
- F_SET(t, B_MODIFIED | R_MODIFIED);
- return (status);
-}
-
-/*
- * REC_RDELETE -- Delete the data matching the specified key.
- *
- * Parameters:
- * tree: tree
- * nrec: record to delete
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
- */
-static int
-rec_rdelete(t, nrec)
- BTREE *t;
- recno_t nrec;
-{
- EPG *e;
- PAGE *h;
- int status;
-
- /* Find the record; __rec_search pins the page. */
- if ((e = __rec_search(t, nrec, SDELETE)) == NULL)
- return (RET_ERROR);
-
- /* Delete the record. */
- h = e->page;
- status = __rec_dleaf(t, h, e->index);
- if (status != RET_SUCCESS) {
- mpool_put(t->bt_mp, h, 0);
- return (status);
- }
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- return (RET_SUCCESS);
-}
-
-/*
- * __REC_DLEAF -- Delete a single record from a recno leaf page.
- *
- * Parameters:
- * t: tree
- * index: index on current page to delete
- *
- * Returns:
- * RET_SUCCESS, RET_ERROR.
- */
-int
-__rec_dleaf(t, h, index)
- BTREE *t;
- PAGE *h;
- u_int32_t index;
-{
- RLEAF *rl;
- indx_t *ip, cnt, offset;
- u_int32_t nbytes;
- char *from;
- void *to;
-
- /*
- * Delete a record from a recno leaf page. Internal records are never
- * deleted from internal pages, regardless of the records that caused
- * them to be added being deleted. Pages made empty by deletion are
- * not reclaimed. They are, however, made available for reuse.
- *
- * Pack the remaining entries at the end of the page, shift the indices
- * down, overwriting the deleted record and its index. If the record
- * uses overflow pages, make them available for reuse.
- */
- to = rl = GETRLEAF(h, index);
- if (rl->flags & P_BIGDATA && __ovfl_delete(t, rl->bytes) == RET_ERROR)
- return (RET_ERROR);
- nbytes = NRLEAF(rl);
-
- /*
- * Compress the key/data pairs. Compress and adjust the [BR]LEAF
- * offsets. Reset the headers.
- */
- from = (char *)h + h->upper;
- memmove(from + nbytes, from, (char *)to - from);
- h->upper += nbytes;
-
- offset = h->linp[index];
- for (cnt = &h->linp[index] - (ip = &h->linp[0]); cnt--; ++ip)
- if (ip[0] < offset)
- ip[0] += nbytes;
- for (cnt = &h->linp[NEXTINDEX(h)] - ip; --cnt; ++ip)
- ip[0] = ip[1] < offset ? ip[1] + nbytes : ip[1];
- h->lower -= sizeof(indx_t);
- --t->bt_nrecs;
- return (RET_SUCCESS);
-}
diff --git a/lib/libc/db/recno/rec_get.c b/lib/libc/db/recno/rec_get.c
deleted file mode 100644
index 47dd773..0000000
--- a/lib/libc/db/recno/rec_get.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rec_get.c 8.9 (Berkeley) 8/18/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <db.h>
-#include "recno.h"
-
-/*
- * __REC_GET -- Get a record from the btree.
- *
- * Parameters:
- * dbp: pointer to access method
- * key: key to find
- * data: data to return
- * flag: currently unused
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key not found.
- */
-int
-__rec_get(dbp, key, data, flags)
- const DB *dbp;
- const DBT *key;
- DBT *data;
- u_int flags;
-{
- BTREE *t;
- EPG *e;
- recno_t nrec;
- int status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /* Get currently doesn't take any flags, and keys of 0 are illegal. */
- if (flags || (nrec = *(recno_t *)key->data) == 0) {
- errno = EINVAL;
- return (RET_ERROR);
- }
-
- /*
- * If we haven't seen this record yet, try to find it in the
- * original file.
- */
- if (nrec > t->bt_nrecs) {
- if (F_ISSET(t, R_EOF | R_INMEM))
- return (RET_SPECIAL);
- if ((status = t->bt_irec(t, nrec)) != RET_SUCCESS)
- return (status);
- }
-
- --nrec;
- if ((e = __rec_search(t, nrec, SEARCH)) == NULL)
- return (RET_ERROR);
-
- status = __rec_ret(t, e, 0, NULL, data);
- if (F_ISSET(t, B_DB_LOCK))
- mpool_put(t->bt_mp, e->page, 0);
- else
- t->bt_pinned = e->page;
- return (status);
-}
-
-/*
- * __REC_FPIPE -- Get fixed length records from a pipe.
- *
- * Parameters:
- * t: tree
- * cnt: records to read
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__rec_fpipe(t, top)
- BTREE *t;
- recno_t top;
-{
- DBT data;
- recno_t nrec;
- size_t len;
- int ch;
- u_char *p;
-
- if (t->bt_rdata.size < t->bt_reclen) {
- t->bt_rdata.data = t->bt_rdata.data == NULL ?
- malloc(t->bt_reclen) :
- realloc(t->bt_rdata.data, t->bt_reclen);
- if (t->bt_rdata.data == NULL)
- return (RET_ERROR);
- t->bt_rdata.size = t->bt_reclen;
- }
- data.data = t->bt_rdata.data;
- data.size = t->bt_reclen;
-
- for (nrec = t->bt_nrecs; nrec < top;) {
- len = t->bt_reclen;
- for (p = t->bt_rdata.data;; *p++ = ch)
- if ((ch = getc(t->bt_rfp)) == EOF || !--len) {
- if (ch != EOF)
- *p = ch;
- if (len != 0)
- memset(p, t->bt_bval, len);
- if (__rec_iput(t,
- nrec, &data, 0) != RET_SUCCESS)
- return (RET_ERROR);
- ++nrec;
- break;
- }
- if (ch == EOF)
- break;
- }
- if (nrec < top) {
- F_SET(t, R_EOF);
- return (RET_SPECIAL);
- }
- return (RET_SUCCESS);
-}
-
-/*
- * __REC_VPIPE -- Get variable length records from a pipe.
- *
- * Parameters:
- * t: tree
- * cnt: records to read
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__rec_vpipe(t, top)
- BTREE *t;
- recno_t top;
-{
- DBT data;
- recno_t nrec;
- indx_t len;
- size_t sz;
- int bval, ch;
- u_char *p;
-
- bval = t->bt_bval;
- for (nrec = t->bt_nrecs; nrec < top; ++nrec) {
- for (p = t->bt_rdata.data,
- sz = t->bt_rdata.size;; *p++ = ch, --sz) {
- if ((ch = getc(t->bt_rfp)) == EOF || ch == bval) {
- data.data = t->bt_rdata.data;
- data.size = p - (u_char *)t->bt_rdata.data;
- if (ch == EOF && data.size == 0)
- break;
- if (__rec_iput(t, nrec, &data, 0)
- != RET_SUCCESS)
- return (RET_ERROR);
- break;
- }
- if (sz == 0) {
- len = p - (u_char *)t->bt_rdata.data;
- t->bt_rdata.size += (sz = 256);
- t->bt_rdata.data = t->bt_rdata.data == NULL ?
- malloc(t->bt_rdata.size) :
- realloc(t->bt_rdata.data, t->bt_rdata.size);
- if (t->bt_rdata.data == NULL)
- return (RET_ERROR);
- p = (u_char *)t->bt_rdata.data + len;
- }
- }
- if (ch == EOF)
- break;
- }
- if (nrec < top) {
- F_SET(t, R_EOF);
- return (RET_SPECIAL);
- }
- return (RET_SUCCESS);
-}
-
-/*
- * __REC_FMAP -- Get fixed length records from a file.
- *
- * Parameters:
- * t: tree
- * cnt: records to read
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__rec_fmap(t, top)
- BTREE *t;
- recno_t top;
-{
- DBT data;
- recno_t nrec;
- u_char *sp, *ep, *p;
- size_t len;
-
- if (t->bt_rdata.size < t->bt_reclen) {
- t->bt_rdata.data = t->bt_rdata.data == NULL ?
- malloc(t->bt_reclen) :
- realloc(t->bt_rdata.data, t->bt_reclen);
- if (t->bt_rdata.data == NULL)
- return (RET_ERROR);
- t->bt_rdata.size = t->bt_reclen;
- }
- data.data = t->bt_rdata.data;
- data.size = t->bt_reclen;
-
- sp = (u_char *)t->bt_cmap;
- ep = (u_char *)t->bt_emap;
- for (nrec = t->bt_nrecs; nrec < top; ++nrec) {
- if (sp >= ep) {
- F_SET(t, R_EOF);
- return (RET_SPECIAL);
- }
- len = t->bt_reclen;
- for (p = t->bt_rdata.data;
- sp < ep && len > 0; *p++ = *sp++, --len);
- if (len != 0)
- memset(p, t->bt_bval, len);
- if (__rec_iput(t, nrec, &data, 0) != RET_SUCCESS)
- return (RET_ERROR);
- }
- t->bt_cmap = (caddr_t)sp;
- return (RET_SUCCESS);
-}
-
-/*
- * __REC_VMAP -- Get variable length records from a file.
- *
- * Parameters:
- * t: tree
- * cnt: records to read
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__rec_vmap(t, top)
- BTREE *t;
- recno_t top;
-{
- DBT data;
- u_char *sp, *ep;
- recno_t nrec;
- int bval;
-
- sp = (u_char *)t->bt_cmap;
- ep = (u_char *)t->bt_emap;
- bval = t->bt_bval;
-
- for (nrec = t->bt_nrecs; nrec < top; ++nrec) {
- if (sp >= ep) {
- F_SET(t, R_EOF);
- return (RET_SPECIAL);
- }
- for (data.data = sp; sp < ep && *sp != bval; ++sp);
- data.size = sp - (u_char *)data.data;
- if (__rec_iput(t, nrec, &data, 0) != RET_SUCCESS)
- return (RET_ERROR);
- ++sp;
- }
- t->bt_cmap = (caddr_t)sp;
- return (RET_SUCCESS);
-}
diff --git a/lib/libc/db/recno/rec_open.c b/lib/libc/db/recno/rec_open.c
deleted file mode 100644
index 8f8eff2..0000000
--- a/lib/libc/db/recno/rec_open.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rec_open.c 8.10 (Berkeley) 9/1/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include <db.h>
-#include "recno.h"
-
-DB *
-__rec_open(fname, flags, mode, openinfo, dflags)
- const char *fname;
- int flags, mode, dflags;
- const RECNOINFO *openinfo;
-{
- BTREE *t;
- BTREEINFO btopeninfo;
- DB *dbp;
- PAGE *h;
- struct stat sb;
- int rfd, sverrno;
-
- /* Open the user's file -- if this fails, we're done. */
- if (fname != NULL && (rfd = open(fname, flags, mode)) < 0)
- return (NULL);
-
- /* Create a btree in memory (backed by disk). */
- dbp = NULL;
- if (openinfo) {
- if (openinfo->flags & ~(R_FIXEDLEN | R_NOKEY | R_SNAPSHOT))
- goto einval;
- btopeninfo.flags = 0;
- btopeninfo.cachesize = openinfo->cachesize;
- btopeninfo.maxkeypage = 0;
- btopeninfo.minkeypage = 0;
- btopeninfo.psize = openinfo->psize;
- btopeninfo.compare = NULL;
- btopeninfo.prefix = NULL;
- btopeninfo.lorder = openinfo->lorder;
- dbp = __bt_open(openinfo->bfname,
- O_RDWR, S_IRUSR | S_IWUSR, &btopeninfo, dflags);
- } else
- dbp = __bt_open(NULL, O_RDWR, S_IRUSR | S_IWUSR, NULL, dflags);
- if (dbp == NULL)
- goto err;
-
- /*
- * Some fields in the tree structure are recno specific. Fill them
- * in and make the btree structure look like a recno structure. We
- * don't change the bt_ovflsize value, it's close enough and slightly
- * bigger.
- */
- t = dbp->internal;
- if (openinfo) {
- if (openinfo->flags & R_FIXEDLEN) {
- F_SET(t, R_FIXLEN);
- t->bt_reclen = openinfo->reclen;
- if (t->bt_reclen == 0)
- goto einval;
- }
- t->bt_bval = openinfo->bval;
- } else
- t->bt_bval = '\n';
-
- F_SET(t, R_RECNO);
- if (fname == NULL)
- F_SET(t, R_EOF | R_INMEM);
- else
- t->bt_rfd = rfd;
-
- if (fname != NULL) {
- /*
- * In 4.4BSD, stat(2) returns true for ISSOCK on pipes.
- * Unfortunately, that's not portable, so we use lseek
- * and check the errno values.
- */
- errno = 0;
- if (lseek(rfd, (off_t)0, SEEK_CUR) == -1 && errno == ESPIPE) {
- switch (flags & O_ACCMODE) {
- case O_RDONLY:
- F_SET(t, R_RDONLY);
- break;
- default:
- goto einval;
- }
-slow: if ((t->bt_rfp = fdopen(rfd, "r")) == NULL)
- goto err;
- F_SET(t, R_CLOSEFP);
- t->bt_irec =
- F_ISSET(t, R_FIXLEN) ? __rec_fpipe : __rec_vpipe;
- } else {
- switch (flags & O_ACCMODE) {
- case O_RDONLY:
- F_SET(t, R_RDONLY);
- break;
- case O_RDWR:
- break;
- default:
- goto einval;
- }
-
- if (fstat(rfd, &sb))
- goto err;
- /*
- * Kluge -- we'd like to test to see if the file is too
- * big to mmap. Since, we don't know what size or type
- * off_t's or size_t's are, what the largest unsigned
- * integral type is, or what random insanity the local
- * C compiler will perpetrate, doing the comparison in
- * a portable way is flatly impossible. Hope that mmap
- * fails if the file is too large.
- */
- if (sb.st_size == 0)
- F_SET(t, R_EOF);
- else {
-#ifdef MMAP_NOT_AVAILABLE
- /*
- * XXX
- * Mmap doesn't work correctly on many current
- * systems. In particular, it can fail subtly,
- * with cache coherency problems. Don't use it
- * for now.
- */
- t->bt_msize = sb.st_size;
- if ((t->bt_smap = mmap(NULL, t->bt_msize,
- PROT_READ, MAP_PRIVATE, rfd,
- (off_t)0)) == MAP_FAILED)
- goto slow;
- t->bt_cmap = t->bt_smap;
- t->bt_emap = t->bt_smap + sb.st_size;
- t->bt_irec = F_ISSET(t, R_FIXLEN) ?
- __rec_fmap : __rec_vmap;
- F_SET(t, R_MEMMAPPED);
-#else
- goto slow;
-#endif
- }
- }
- }
-
- /* Use the recno routines. */
- dbp->close = __rec_close;
- dbp->del = __rec_delete;
- dbp->fd = __rec_fd;
- dbp->get = __rec_get;
- dbp->put = __rec_put;
- dbp->seq = __rec_seq;
- dbp->sync = __rec_sync;
-
- /* If the root page was created, reset the flags. */
- if ((h = mpool_get(t->bt_mp, P_ROOT, 0)) == NULL)
- goto err;
- if ((h->flags & P_TYPE) == P_BLEAF) {
- F_CLR(h, P_TYPE);
- F_SET(h, P_RLEAF);
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- } else
- mpool_put(t->bt_mp, h, 0);
-
- if (openinfo && openinfo->flags & R_SNAPSHOT &&
- !F_ISSET(t, R_EOF | R_INMEM) &&
- t->bt_irec(t, MAX_REC_NUMBER) == RET_ERROR)
- goto err;
- return (dbp);
-
-einval: errno = EINVAL;
-err: sverrno = errno;
- if (dbp != NULL)
- (void)__bt_close(dbp);
- if (fname != NULL)
- (void)close(rfd);
- errno = sverrno;
- return (NULL);
-}
-
-int
-__rec_fd(dbp)
- const DB *dbp;
-{
- BTREE *t;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /* In-memory database can't have a file descriptor. */
- if (F_ISSET(t, R_INMEM)) {
- errno = ENOENT;
- return (-1);
- }
- return (t->bt_rfd);
-}
diff --git a/lib/libc/db/recno/rec_put.c b/lib/libc/db/recno/rec_put.c
deleted file mode 100644
index 1afae0d..0000000
--- a/lib/libc/db/recno/rec_put.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rec_put.c 8.7 (Berkeley) 8/18/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <db.h>
-#include "recno.h"
-
-/*
- * __REC_PUT -- Add a recno item to the tree.
- *
- * Parameters:
- * dbp: pointer to access method
- * key: key
- * data: data
- * flag: R_CURSOR, R_IAFTER, R_IBEFORE, R_NOOVERWRITE
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key is
- * already in the tree and R_NOOVERWRITE specified.
- */
-int
-__rec_put(dbp, key, data, flags)
- const DB *dbp;
- DBT *key;
- const DBT *data;
- u_int flags;
-{
- BTREE *t;
- DBT fdata, tdata;
- recno_t nrec;
- int status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- /*
- * If using fixed-length records, and the record is long, return
- * EINVAL. If it's short, pad it out. Use the record data return
- * memory, it's only short-term.
- */
- if (F_ISSET(t, R_FIXLEN) && data->size != t->bt_reclen) {
- if (data->size > t->bt_reclen)
- goto einval;
-
- if (t->bt_rdata.size < t->bt_reclen) {
- t->bt_rdata.data = t->bt_rdata.data == NULL ?
- malloc(t->bt_reclen) :
- realloc(t->bt_rdata.data, t->bt_reclen);
- if (t->bt_rdata.data == NULL)
- return (RET_ERROR);
- t->bt_rdata.size = t->bt_reclen;
- }
- memmove(t->bt_rdata.data, data->data, data->size);
- memset((char *)t->bt_rdata.data + data->size,
- t->bt_bval, t->bt_reclen - data->size);
- fdata.data = t->bt_rdata.data;
- fdata.size = t->bt_reclen;
- } else {
- fdata.data = data->data;
- fdata.size = data->size;
- }
-
- switch (flags) {
- case R_CURSOR:
- if (!F_ISSET(&t->bt_cursor, CURS_INIT))
- goto einval;
- nrec = t->bt_cursor.rcursor;
- break;
- case R_SETCURSOR:
- if ((nrec = *(recno_t *)key->data) == 0)
- goto einval;
- break;
- case R_IAFTER:
- if ((nrec = *(recno_t *)key->data) == 0) {
- nrec = 1;
- flags = R_IBEFORE;
- }
- break;
- case 0:
- case R_IBEFORE:
- if ((nrec = *(recno_t *)key->data) == 0)
- goto einval;
- break;
- case R_NOOVERWRITE:
- if ((nrec = *(recno_t *)key->data) == 0)
- goto einval;
- if (nrec <= t->bt_nrecs)
- return (RET_SPECIAL);
- break;
- default:
-einval: errno = EINVAL;
- return (RET_ERROR);
- }
-
- /*
- * Make sure that records up to and including the put record are
- * already in the database. If skipping records, create empty ones.
- */
- if (nrec > t->bt_nrecs) {
- if (!F_ISSET(t, R_EOF | R_INMEM) &&
- t->bt_irec(t, nrec) == RET_ERROR)
- return (RET_ERROR);
- if (nrec > t->bt_nrecs + 1) {
- if (F_ISSET(t, R_FIXLEN)) {
- if ((tdata.data =
- (void *)malloc(t->bt_reclen)) == NULL)
- return (RET_ERROR);
- tdata.size = t->bt_reclen;
- memset(tdata.data, t->bt_bval, tdata.size);
- } else {
- tdata.data = NULL;
- tdata.size = 0;
- }
- while (nrec > t->bt_nrecs + 1)
- if (__rec_iput(t,
- t->bt_nrecs, &tdata, 0) != RET_SUCCESS)
- return (RET_ERROR);
- if (F_ISSET(t, R_FIXLEN))
- free(tdata.data);
- }
- }
-
- if ((status = __rec_iput(t, nrec - 1, &fdata, flags)) != RET_SUCCESS)
- return (status);
-
- if (flags == R_SETCURSOR)
- t->bt_cursor.rcursor = nrec;
-
- F_SET(t, R_MODIFIED);
- return (__rec_ret(t, NULL, nrec, key, NULL));
-}
-
-/*
- * __REC_IPUT -- Add a recno item to the tree.
- *
- * Parameters:
- * t: tree
- * nrec: record number
- * data: data
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS
- */
-int
-__rec_iput(t, nrec, data, flags)
- BTREE *t;
- recno_t nrec;
- const DBT *data;
- u_int flags;
-{
- DBT tdata;
- EPG *e;
- PAGE *h;
- indx_t index, nxtindex;
- pgno_t pg;
- u_int32_t nbytes;
- int dflags, status;
- char *dest, db[NOVFLSIZE];
-
- /*
- * If the data won't fit on a page, store it on indirect pages.
- *
- * XXX
- * If the insert fails later on, these pages aren't recovered.
- */
- if (data->size > t->bt_ovflsize) {
- if (__ovfl_put(t, data, &pg) == RET_ERROR)
- return (RET_ERROR);
- tdata.data = db;
- tdata.size = NOVFLSIZE;
- *(pgno_t *)db = pg;
- *(u_int32_t *)(db + sizeof(pgno_t)) = data->size;
- dflags = P_BIGDATA;
- data = &tdata;
- } else
- dflags = 0;
-
- /* __rec_search pins the returned page. */
- if ((e = __rec_search(t, nrec,
- nrec > t->bt_nrecs || flags == R_IAFTER || flags == R_IBEFORE ?
- SINSERT : SEARCH)) == NULL)
- return (RET_ERROR);
-
- h = e->page;
- index = e->index;
-
- /*
- * Add the specified key/data pair to the tree. The R_IAFTER and
- * R_IBEFORE flags insert the key after/before the specified key.
- *
- * Pages are split as required.
- */
- switch (flags) {
- case R_IAFTER:
- ++index;
- break;
- case R_IBEFORE:
- break;
- default:
- if (nrec < t->bt_nrecs &&
- __rec_dleaf(t, h, index) == RET_ERROR) {
- mpool_put(t->bt_mp, h, 0);
- return (RET_ERROR);
- }
- break;
- }
-
- /*
- * If not enough room, split the page. The split code will insert
- * the key and data and unpin the current page. If inserting into
- * the offset array, shift the pointers up.
- */
- nbytes = NRLEAFDBT(data->size);
- if (h->upper - h->lower < nbytes + sizeof(indx_t)) {
- status = __bt_split(t, h, NULL, data, dflags, nbytes, index);
- if (status == RET_SUCCESS)
- ++t->bt_nrecs;
- return (status);
- }
-
- if (index < (nxtindex = NEXTINDEX(h)))
- memmove(h->linp + index + 1, h->linp + index,
- (nxtindex - index) * sizeof(indx_t));
- h->lower += sizeof(indx_t);
-
- h->linp[index] = h->upper -= nbytes;
- dest = (char *)h + h->upper;
- WR_RLEAF(dest, data, dflags);
-
- ++t->bt_nrecs;
- F_SET(t, B_MODIFIED);
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
-
- return (RET_SUCCESS);
-}
diff --git a/lib/libc/db/recno/rec_search.c b/lib/libc/db/recno/rec_search.c
deleted file mode 100644
index acc109e..0000000
--- a/lib/libc/db/recno/rec_search.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rec_search.c 8.4 (Berkeley) 7/14/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <stdio.h>
-
-#include <db.h>
-#include "recno.h"
-
-/*
- * __REC_SEARCH -- Search a btree for a key.
- *
- * Parameters:
- * t: tree to search
- * recno: key to find
- * op: search operation
- *
- * Returns:
- * EPG for matching record, if any, or the EPG for the location of the
- * key, if it were inserted into the tree.
- *
- * Returns:
- * The EPG for matching record, if any, or the EPG for the location
- * of the key, if it were inserted into the tree, is entered into
- * the bt_cur field of the tree. A pointer to the field is returned.
- */
-EPG *
-__rec_search(t, recno, op)
- BTREE *t;
- recno_t recno;
- enum SRCHOP op;
-{
- register indx_t index;
- register PAGE *h;
- EPGNO *parent;
- RINTERNAL *r;
- pgno_t pg;
- indx_t top;
- recno_t total;
- int sverrno;
-
- BT_CLR(t);
- for (pg = P_ROOT, total = 0;;) {
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
- goto err;
- if (h->flags & P_RLEAF) {
- t->bt_cur.page = h;
- t->bt_cur.index = recno - total;
- return (&t->bt_cur);
- }
- for (index = 0, top = NEXTINDEX(h);;) {
- r = GETRINTERNAL(h, index);
- if (++index == top || total + r->nrecs > recno)
- break;
- total += r->nrecs;
- }
-
- BT_PUSH(t, pg, index - 1);
-
- pg = r->pgno;
- switch (op) {
- case SDELETE:
- --GETRINTERNAL(h, (index - 1))->nrecs;
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- break;
- case SINSERT:
- ++GETRINTERNAL(h, (index - 1))->nrecs;
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- break;
- case SEARCH:
- mpool_put(t->bt_mp, h, 0);
- break;
- }
-
- }
- /* Try and recover the tree. */
-err: sverrno = errno;
- if (op != SEARCH)
- while ((parent = BT_POP(t)) != NULL) {
- if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
- break;
- if (op == SINSERT)
- --GETRINTERNAL(h, parent->index)->nrecs;
- else
- ++GETRINTERNAL(h, parent->index)->nrecs;
- mpool_put(t->bt_mp, h, MPOOL_DIRTY);
- }
- errno = sverrno;
- return (NULL);
-}
diff --git a/lib/libc/db/recno/rec_seq.c b/lib/libc/db/recno/rec_seq.c
deleted file mode 100644
index f80992c..0000000
--- a/lib/libc/db/recno/rec_seq.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)rec_seq.c 8.3 (Berkeley) 7/14/94";
-#endif /* not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <db.h>
-#include "recno.h"
-
-/*
- * __REC_SEQ -- Recno sequential scan interface.
- *
- * Parameters:
- * dbp: pointer to access method
- * key: key for positioning and return value
- * data: data return value
- * flags: R_CURSOR, R_FIRST, R_LAST, R_NEXT, R_PREV.
- *
- * Returns:
- * RET_ERROR, RET_SUCCESS or RET_SPECIAL if there's no next key.
- */
-int
-__rec_seq(dbp, key, data, flags)
- const DB *dbp;
- DBT *key, *data;
- u_int flags;
-{
- BTREE *t;
- EPG *e;
- recno_t nrec;
- int status;
-
- t = dbp->internal;
-
- /* Toss any page pinned across calls. */
- if (t->bt_pinned != NULL) {
- mpool_put(t->bt_mp, t->bt_pinned, 0);
- t->bt_pinned = NULL;
- }
-
- switch(flags) {
- case R_CURSOR:
- if ((nrec = *(recno_t *)key->data) == 0)
- goto einval;
- break;
- case R_NEXT:
- if (F_ISSET(&t->bt_cursor, CURS_INIT)) {
- nrec = t->bt_cursor.rcursor + 1;
- break;
- }
- /* FALLTHROUGH */
- case R_FIRST:
- nrec = 1;
- break;
- case R_PREV:
- if (F_ISSET(&t->bt_cursor, CURS_INIT)) {
- if ((nrec = t->bt_cursor.rcursor - 1) == 0)
- return (RET_SPECIAL);
- break;
- }
- /* FALLTHROUGH */
- case R_LAST:
- if (!F_ISSET(t, R_EOF | R_INMEM) &&
- t->bt_irec(t, MAX_REC_NUMBER) == RET_ERROR)
- return (RET_ERROR);
- nrec = t->bt_nrecs;
- break;
- default:
-einval: errno = EINVAL;
- return (RET_ERROR);
- }
-
- if (t->bt_nrecs == 0 || nrec > t->bt_nrecs) {
- if (!F_ISSET(t, R_EOF | R_INMEM) &&
- (status = t->bt_irec(t, nrec)) != RET_SUCCESS)
- return (status);
- if (t->bt_nrecs == 0 || nrec > t->bt_nrecs)
- return (RET_SPECIAL);
- }
-
- if ((e = __rec_search(t, nrec - 1, SEARCH)) == NULL)
- return (RET_ERROR);
-
- F_SET(&t->bt_cursor, CURS_INIT);
- t->bt_cursor.rcursor = nrec;
-
- status = __rec_ret(t, e, nrec, key, data);
- if (F_ISSET(t, B_DB_LOCK))
- mpool_put(t->bt_mp, e->page, 0);
- else
- t->bt_pinned = e->page;
- return (status);
-}
diff --git a/lib/libc/db/recno/rec_utils.c b/lib/libc/db/recno/rec_utils.c
deleted file mode 100644
index baea3fa..0000000
--- a/lib/libc/db/recno/rec_utils.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rec_utils.c 8.6 (Berkeley) 7/16/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <db.h>
-#include "recno.h"
-
-/*
- * __rec_ret --
- * Build return data.
- *
- * Parameters:
- * t: tree
- * e: key/data pair to be returned
- * nrec: record number
- * key: user's key structure
- * data: user's data structure
- *
- * Returns:
- * RET_SUCCESS, RET_ERROR.
- */
-int
-__rec_ret(t, e, nrec, key, data)
- BTREE *t;
- EPG *e;
- recno_t nrec;
- DBT *key, *data;
-{
- RLEAF *rl;
- void *p;
-
- if (key == NULL)
- goto dataonly;
-
- /* We have to copy the key, it's not on the page. */
- if (sizeof(recno_t) > t->bt_rkey.size) {
- p = (void *)(t->bt_rkey.data == NULL ?
- malloc(sizeof(recno_t)) :
- realloc(t->bt_rkey.data, sizeof(recno_t)));
- if (p == NULL)
- return (RET_ERROR);
- t->bt_rkey.data = p;
- t->bt_rkey.size = sizeof(recno_t);
- }
- memmove(t->bt_rkey.data, &nrec, sizeof(recno_t));
- key->size = sizeof(recno_t);
- key->data = t->bt_rkey.data;
-
-dataonly:
- if (data == NULL)
- return (RET_SUCCESS);
-
- /*
- * We must copy big keys/data to make them contigous. Otherwise,
- * leave the page pinned and don't copy unless the user specified
- * concurrent access.
- */
- rl = GETRLEAF(e->page, e->index);
- if (rl->flags & P_BIGDATA) {
- if (__ovfl_get(t, rl->bytes,
- &data->size, &t->bt_rdata.data, &t->bt_rdata.size))
- return (RET_ERROR);
- data->data = t->bt_rdata.data;
- } else if (F_ISSET(t, B_DB_LOCK)) {
- /* Use +1 in case the first record retrieved is 0 length. */
- if (rl->dsize + 1 > t->bt_rdata.size) {
- p = (void *)(t->bt_rdata.data == NULL ?
- malloc(rl->dsize + 1) :
- realloc(t->bt_rdata.data, rl->dsize + 1));
- if (p == NULL)
- return (RET_ERROR);
- t->bt_rdata.data = p;
- t->bt_rdata.size = rl->dsize + 1;
- }
- memmove(t->bt_rdata.data, rl->bytes, rl->dsize);
- data->size = rl->dsize;
- data->data = t->bt_rdata.data;
- } else {
- data->size = rl->dsize;
- data->data = rl->bytes;
- }
- return (RET_SUCCESS);
-}
diff --git a/lib/libc/db/recno/recno.h b/lib/libc/db/recno/recno.h
deleted file mode 100644
index bec772c..0000000
--- a/lib/libc/db/recno/recno.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)recno.h 8.1 (Berkeley) 6/4/93
- */
-
-enum SRCHOP { SDELETE, SINSERT, SEARCH}; /* Rec_search operation. */
-
-#include "../btree/btree.h"
-#include "extern.h"
diff --git a/lib/libc/db/test/Makefile b/lib/libc/db/test/Makefile
deleted file mode 100644
index a5dd08a..0000000
--- a/lib/libc/db/test/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# @(#)Makefile 8.15 (Berkeley) 7/28/94
-
-PROG= dbtest
-OBJS= dbtest.o strerror.o
-
-# Uncomment the STAT line get hash and btree statistical use info. This
-# also forces ld to load the btree debug functions for use by gdb, which
-# is useful. The db library has to be compiled with -DSTATISTICS as well.
-INC= -I${PORTDIR}/include -I${PORTDIR}
-OORG= -g
-#STAT= -DSTATISTICS
-CFLAGS= -D__DBINTERFACE_PRIVATE -DDEBUG ${STAT} ${OORG} ${INC}
-
-dbtest: ${OBJS} ${PORTDIR}/libdb.a
- ${CC} -o $@ ${OBJS} ${PORTDIR}/libdb.a
-
-strerror.o: ${PORTDIR}/clib/strerror.c
- ${CC} -c ${PORTDIR}/clib/strerror.c
-
-clean:
- rm -f dbtest.core gmon.out ${OBJS} ${PROG} t1 t2 t3
-
-${OBJS}: Makefile
diff --git a/lib/libc/db/test/README b/lib/libc/db/test/README
deleted file mode 100644
index 0c0cd13..0000000
--- a/lib/libc/db/test/README
+++ /dev/null
@@ -1,74 +0,0 @@
-# @(#)README 8.8 (Berkeley) 7/31/94
-
-To build this portably, try something like:
-
- make PORTDIR="../PORT/MACH"
-
-where MACH is the machine, i.e. "sunos.4.1.1".
-
-To run the tests, enter "sh run.test". If your system dictionary isn't
-in /usr/share/dict/words, edit run.test to reflect the correct place.
-
-Fairly large files (the command files) are built in this directory during
-the test runs, and even larger files (the database files) are created in
-"/var/tmp". If the latter directory doesn't exist, set the environmental
-variable TMPDIR to a directory where the files can be built.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-The script file consists of lines with an initial character which is
-the command for that line, or an initial character indicating a key
-or data entry for a previous command.
-
-Legal command characters are as follows:
-
-c: compare a record
- + must be followed by [kK][dD]; the data value in the database
- associated with the specified key is compared to the specified
- data value.
-e: echo a string
- + writes out the rest of the line into the output file; if the
- last character is not a carriage-return, a newline is appended.
-f: set the flags for the next command
- + no value zero's the flags
-g: do a get command
- + must be followed by [kK]
- + writes out the retrieved data DBT.
-o [r]: dump [reverse]
- + dump the database out, if 'r' is set, in reverse order.
-p: do a put command
- + must be followed by [kK][dD]
-r: do a del command
- + must be followed by [kK] unless R_CURSOR flag set.
-S: sync the database
-s: do a seq command
- + must be followed by [kK] if R_CURSOR flag set.
- + writes out the retrieved data DBT.
-
-Legal key/data characters are as follows:
-
-D [file]: data file
- + set the current data value to the contents of the file
-d [data]:
- + set the current key value to the contents of the line.
-K [file]: key file
- + set the current key value to the contents of the file
-k [data]:
- + set the current key value to the contents of the line.
-
-Blank lines, lines with leading white space, and lines with leading
-hash marks (#) are ignored.
-
-Options to dbtest are as follows:
-
- -d: Set the DB_LOCK flag.
- -f: Use the file argument as the database file.
- -i: Use the rest of the argument to set elements in the info
- structure. If the type is btree, then "-i cachesize=10240"
- will set BTREEINFO.cachesize to 10240.
- -o: The rest of the argument is the output file instead of
- using stdout.
- -s: Don't delete the database file before opening it, i.e.
- use the database file from a previous run.
-
-Dbtest requires two arguments, the type of access "hash", "recno"
-or "btree", and the script name or "-" to indicate stdin.
diff --git a/lib/libc/db/test/btree.tests/main.c b/lib/libc/db/test/btree.tests/main.c
deleted file mode 100644
index 39c1da0..0000000
--- a/lib/libc/db/test/btree.tests/main.c
+++ /dev/null
@@ -1,765 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Olson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <fcntl.h>
-#include <db.h>
-#include <errno.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include "btree.h"
-
-typedef struct cmd_table {
- char *cmd;
- int nargs;
- int rconv;
- void (*func) __P((DB *, char **));
- char *usage, *descrip;
-} cmd_table;
-
-int stopstop;
-DB *globaldb;
-
-void append __P((DB *, char **));
-void bstat __P((DB *, char **));
-void cursor __P((DB *, char **));
-void delcur __P((DB *, char **));
-void delete __P((DB *, char **));
-void dump __P((DB *, char **));
-void first __P((DB *, char **));
-void get __P((DB *, char **));
-void help __P((DB *, char **));
-void iafter __P((DB *, char **));
-void ibefore __P((DB *, char **));
-void icursor __P((DB *, char **));
-void insert __P((DB *, char **));
-void keydata __P((DBT *, DBT *));
-void last __P((DB *, char **));
-void list __P((DB *, char **));
-void load __P((DB *, char **));
-void mstat __P((DB *, char **));
-void next __P((DB *, char **));
-int parse __P((char *, char **, int));
-void previous __P((DB *, char **));
-void show __P((DB *, char **));
-void usage __P((void));
-void user __P((DB *));
-
-cmd_table commands[] = {
- "?", 0, 0, help, "help", NULL,
- "a", 2, 1, append, "append key def", "append key with data def",
- "b", 0, 0, bstat, "bstat", "stat btree",
- "c", 1, 1, cursor, "cursor word", "move cursor to word",
- "delc", 0, 0, delcur, "delcur", "delete key the cursor references",
- "dele", 1, 1, delete, "delete word", "delete word",
- "d", 0, 0, dump, "dump", "dump database",
- "f", 0, 0, first, "first", "move cursor to first record",
- "g", 1, 1, get, "get key", "locate key",
- "h", 0, 0, help, "help", "print command summary",
- "ia", 2, 1, iafter, "iafter key data", "insert data after key",
- "ib", 2, 1, ibefore, "ibefore key data", "insert data before key",
- "ic", 2, 1, icursor, "icursor key data", "replace cursor",
- "in", 2, 1, insert, "insert key def", "insert key with data def",
- "la", 0, 0, last, "last", "move cursor to last record",
- "li", 1, 1, list, "list file", "list to a file",
- "loa", 1, 0, load, "load file", NULL,
- "loc", 1, 1, get, "get key", NULL,
- "m", 0, 0, mstat, "mstat", "stat memory pool",
- "n", 0, 0, next, "next", "move cursor forward one record",
- "p", 0, 0, previous, "previous", "move cursor back one record",
- "q", 0, 0, NULL, "quit", "quit",
- "sh", 1, 0, show, "show page", "dump a page",
- { NULL },
-};
-
-int recno; /* use record numbers */
-char *dict = "words"; /* default dictionary */
-char *progname;
-
-int
-main(argc, argv)
- int argc;
- char **argv;
-{
- int c;
- DB *db;
- BTREEINFO b;
-
- progname = *argv;
-
- b.flags = 0;
- b.cachesize = 0;
- b.maxkeypage = 0;
- b.minkeypage = 0;
- b.psize = 0;
- b.compare = NULL;
- b.prefix = NULL;
- b.lorder = 0;
-
- while ((c = getopt(argc, argv, "bc:di:lp:ru")) != EOF) {
- switch (c) {
- case 'b':
- b.lorder = BIG_ENDIAN;
- break;
- case 'c':
- b.cachesize = atoi(optarg);
- break;
- case 'd':
- b.flags |= R_DUP;
- break;
- case 'i':
- dict = optarg;
- break;
- case 'l':
- b.lorder = LITTLE_ENDIAN;
- break;
- case 'p':
- b.psize = atoi(optarg);
- break;
- case 'r':
- recno = 1;
- break;
- case 'u':
- b.flags = 0;
- break;
- default:
- usage();
- }
- }
- argc -= optind;
- argv += optind;
-
- if (recno)
- db = dbopen(*argv == NULL ? NULL : *argv, O_RDWR,
- 0, DB_RECNO, NULL);
- else
- db = dbopen(*argv == NULL ? NULL : *argv, O_CREAT|O_RDWR,
- 0600, DB_BTREE, &b);
-
- if (db == NULL) {
- (void)fprintf(stderr, "dbopen: %s\n", strerror(errno));
- exit(1);
- }
- globaldb = db;
- user(db);
- exit(0);
- /* NOTREACHED */
-}
-
-void
-user(db)
- DB *db;
-{
- FILE *ifp;
- int argc, i, last;
- char *lbuf, *argv[4], buf[512];
-
- if ((ifp = fopen("/dev/tty", "r")) == NULL) {
- (void)fprintf(stderr,
- "/dev/tty: %s\n", strerror(errno));
- exit(1);
- }
- for (last = 0;;) {
- (void)printf("> ");
- (void)fflush(stdout);
- if ((lbuf = fgets(&buf[0], 512, ifp)) == NULL)
- break;
- if (lbuf[0] == '\n') {
- i = last;
- goto uselast;
- }
- lbuf[strlen(lbuf) - 1] = '\0';
-
- if (lbuf[0] == 'q')
- break;
-
- argc = parse(lbuf, &argv[0], 3);
- if (argc == 0)
- continue;
-
- for (i = 0; commands[i].cmd != NULL; i++)
- if (strncmp(commands[i].cmd, argv[0],
- strlen(commands[i].cmd)) == 0)
- break;
-
- if (commands[i].cmd == NULL) {
- (void)fprintf(stderr,
- "%s: command unknown ('help' for help)\n", lbuf);
- continue;
- }
-
- if (commands[i].nargs != argc - 1) {
- (void)fprintf(stderr, "usage: %s\n", commands[i].usage);
- continue;
- }
-
- if (recno && commands[i].rconv) {
- static recno_t nlong;
- nlong = atoi(argv[1]);
- argv[1] = (char *)&nlong;
- }
-uselast: last = i;
- (*commands[i].func)(db, argv);
- }
- if ((db->sync)(db) == RET_ERROR)
- perror("dbsync");
- else if ((db->close)(db) == RET_ERROR)
- perror("dbclose");
-}
-
-int
-parse(lbuf, argv, maxargc)
- char *lbuf, **argv;
- int maxargc;
-{
- int argc = 0;
- char *c;
-
- c = lbuf;
- while (isspace(*c))
- c++;
- while (*c != '\0' && argc < maxargc) {
- *argv++ = c;
- argc++;
- while (!isspace(*c) && *c != '\0') {
- c++;
- }
- while (isspace(*c))
- *c++ = '\0';
- }
- return (argc);
-}
-
-void
-append(db, argv)
- DB *db;
- char **argv;
-{
- DBT key, data;
- int status;
-
- if (!recno) {
- (void)fprintf(stderr,
- "append only available for recno db's.\n");
- return;
- }
- key.data = argv[1];
- key.size = sizeof(recno_t);
- data.data = argv[2];
- data.size = strlen(data.data);
- status = (db->put)(db, &key, &data, R_APPEND);
- switch (status) {
- case RET_ERROR:
- perror("append/put");
- break;
- case RET_SPECIAL:
- (void)printf("%s (duplicate key)\n", argv[1]);
- break;
- case RET_SUCCESS:
- break;
- }
-}
-
-void
-cursor(db, argv)
- DB *db;
- char **argv;
-{
- DBT data, key;
- int status;
-
- key.data = argv[1];
- if (recno)
- key.size = sizeof(recno_t);
- else
- key.size = strlen(argv[1]) + 1;
- status = (*db->seq)(db, &key, &data, R_CURSOR);
- switch (status) {
- case RET_ERROR:
- perror("cursor/seq");
- break;
- case RET_SPECIAL:
- (void)printf("key not found\n");
- break;
- case RET_SUCCESS:
- keydata(&key, &data);
- break;
- }
-}
-
-void
-delcur(db, argv)
- DB *db;
- char **argv;
-{
- int status;
-
- status = (*db->del)(db, NULL, R_CURSOR);
-
- if (status == RET_ERROR)
- perror("delcur/del");
-}
-
-void
-delete(db, argv)
- DB *db;
- char **argv;
-{
- DBT key;
- int status;
-
- key.data = argv[1];
- if (recno)
- key.size = sizeof(recno_t);
- else
- key.size = strlen(argv[1]) + 1;
-
- status = (*db->del)(db, &key, 0);
- switch (status) {
- case RET_ERROR:
- perror("delete/del");
- break;
- case RET_SPECIAL:
- (void)printf("key not found\n");
- break;
- case RET_SUCCESS:
- break;
- }
-}
-
-void
-dump(db, argv)
- DB *db;
- char **argv;
-{
- __bt_dump(db);
-}
-
-void
-first(db, argv)
- DB *db;
- char **argv;
-{
- DBT data, key;
- int status;
-
- status = (*db->seq)(db, &key, &data, R_FIRST);
-
- switch (status) {
- case RET_ERROR:
- perror("first/seq");
- break;
- case RET_SPECIAL:
- (void)printf("no more keys\n");
- break;
- case RET_SUCCESS:
- keydata(&key, &data);
- break;
- }
-}
-
-void
-get(db, argv)
- DB *db;
- char **argv;
-{
- DBT data, key;
- int status;
-
- key.data = argv[1];
- if (recno)
- key.size = sizeof(recno_t);
- else
- key.size = strlen(argv[1]) + 1;
-
- status = (*db->get)(db, &key, &data, 0);
-
- switch (status) {
- case RET_ERROR:
- perror("get/get");
- break;
- case RET_SPECIAL:
- (void)printf("key not found\n");
- break;
- case RET_SUCCESS:
- keydata(&key, &data);
- break;
- }
-}
-
-void
-help(db, argv)
- DB *db;
- char **argv;
-{
- int i;
-
- for (i = 0; commands[i].cmd; i++)
- if (commands[i].descrip)
- (void)printf("%s: %s\n",
- commands[i].usage, commands[i].descrip);
-}
-
-void
-iafter(db, argv)
- DB *db;
- char **argv;
-{
- DBT key, data;
- int status;
-
- if (!recno) {
- (void)fprintf(stderr,
- "iafter only available for recno db's.\n");
- return;
- }
- key.data = argv[1];
- key.size = sizeof(recno_t);
- data.data = argv[2];
- data.size = strlen(data.data);
- status = (db->put)(db, &key, &data, R_IAFTER);
- switch (status) {
- case RET_ERROR:
- perror("iafter/put");
- break;
- case RET_SPECIAL:
- (void)printf("%s (duplicate key)\n", argv[1]);
- break;
- case RET_SUCCESS:
- break;
- }
-}
-
-void
-ibefore(db, argv)
- DB *db;
- char **argv;
-{
- DBT key, data;
- int status;
-
- if (!recno) {
- (void)fprintf(stderr,
- "ibefore only available for recno db's.\n");
- return;
- }
- key.data = argv[1];
- key.size = sizeof(recno_t);
- data.data = argv[2];
- data.size = strlen(data.data);
- status = (db->put)(db, &key, &data, R_IBEFORE);
- switch (status) {
- case RET_ERROR:
- perror("ibefore/put");
- break;
- case RET_SPECIAL:
- (void)printf("%s (duplicate key)\n", argv[1]);
- break;
- case RET_SUCCESS:
- break;
- }
-}
-
-void
-icursor(db, argv)
- DB *db;
- char **argv;
-{
- int status;
- DBT data, key;
-
- key.data = argv[1];
- if (recno)
- key.size = sizeof(recno_t);
- else
- key.size = strlen(argv[1]) + 1;
- data.data = argv[2];
- data.size = strlen(argv[2]) + 1;
-
- status = (*db->put)(db, &key, &data, R_CURSOR);
- switch (status) {
- case RET_ERROR:
- perror("icursor/put");
- break;
- case RET_SPECIAL:
- (void)printf("%s (duplicate key)\n", argv[1]);
- break;
- case RET_SUCCESS:
- break;
- }
-}
-
-void
-insert(db, argv)
- DB *db;
- char **argv;
-{
- int status;
- DBT data, key;
-
- key.data = argv[1];
- if (recno)
- key.size = sizeof(recno_t);
- else
- key.size = strlen(argv[1]) + 1;
- data.data = argv[2];
- data.size = strlen(argv[2]) + 1;
-
- status = (*db->put)(db, &key, &data, R_NOOVERWRITE);
- switch (status) {
- case RET_ERROR:
- perror("insert/put");
- break;
- case RET_SPECIAL:
- (void)printf("%s (duplicate key)\n", argv[1]);
- break;
- case RET_SUCCESS:
- break;
- }
-}
-
-void
-last(db, argv)
- DB *db;
- char **argv;
-{
- DBT data, key;
- int status;
-
- status = (*db->seq)(db, &key, &data, R_LAST);
-
- switch (status) {
- case RET_ERROR:
- perror("last/seq");
- break;
- case RET_SPECIAL:
- (void)printf("no more keys\n");
- break;
- case RET_SUCCESS:
- keydata(&key, &data);
- break;
- }
-}
-
-void
-list(db, argv)
- DB *db;
- char **argv;
-{
- DBT data, key;
- FILE *fp;
- int status;
-
- if ((fp = fopen(argv[1], "w")) == NULL) {
- (void)fprintf(stderr, "%s: %s\n", argv[1], strerror(errno));
- return;
- }
- status = (*db->seq)(db, &key, &data, R_FIRST);
- while (status == RET_SUCCESS) {
- (void)fprintf(fp, "%s\n", key.data);
- status = (*db->seq)(db, &key, &data, R_NEXT);
- }
- if (status == RET_ERROR)
- perror("list/seq");
-}
-
-DB *BUGdb;
-void
-load(db, argv)
- DB *db;
- char **argv;
-{
- register char *p, *t;
- FILE *fp;
- DBT data, key;
- recno_t cnt;
- size_t len;
- int status;
- char *lp, buf[16 * 1024];
-
- BUGdb = db;
- if ((fp = fopen(argv[1], "r")) == NULL) {
- (void)fprintf(stderr, "%s: %s\n", argv[1], strerror(errno));
- return;
- }
- (void)printf("loading %s...\n", argv[1]);
-
- for (cnt = 1; (lp = fgetline(fp, &len)) != NULL; ++cnt) {
- if (recno) {
- key.data = &cnt;
- key.size = sizeof(recno_t);
- data.data = lp;
- data.size = len + 1;
- } else {
- key.data = lp;
- key.size = len + 1;
- for (p = lp + len - 1, t = buf; p >= lp; *t++ = *p--);
- *t = '\0';
- data.data = buf;
- data.size = len + 1;
- }
-
- status = (*db->put)(db, &key, &data, R_NOOVERWRITE);
- switch (status) {
- case RET_ERROR:
- perror("load/put");
- exit(1);
- case RET_SPECIAL:
- if (recno)
- (void)fprintf(stderr,
- "duplicate: %ld {%s}\n", cnt, data.data);
- else
- (void)fprintf(stderr,
- "duplicate: %ld {%s}\n", cnt, key.data);
- exit(1);
- case RET_SUCCESS:
- break;
- }
- }
- (void)fclose(fp);
-}
-
-void
-next(db, argv)
- DB *db;
- char **argv;
-{
- DBT data, key;
- int status;
-
- status = (*db->seq)(db, &key, &data, R_NEXT);
-
- switch (status) {
- case RET_ERROR:
- perror("next/seq");
- break;
- case RET_SPECIAL:
- (void)printf("no more keys\n");
- break;
- case RET_SUCCESS:
- keydata(&key, &data);
- break;
- }
-}
-
-void
-previous(db, argv)
- DB *db;
- char **argv;
-{
- DBT data, key;
- int status;
-
- status = (*db->seq)(db, &key, &data, R_PREV);
-
- switch (status) {
- case RET_ERROR:
- perror("previous/seq");
- break;
- case RET_SPECIAL:
- (void)printf("no more keys\n");
- break;
- case RET_SUCCESS:
- keydata(&key, &data);
- break;
- }
-}
-
-void
-show(db, argv)
- DB *db;
- char **argv;
-{
- BTREE *t;
- PAGE *h;
- pgno_t pg;
-
- pg = atoi(argv[1]);
- t = db->internal;
- if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) {
- (void)printf("getpage of %ld failed\n", pg);
- return;
- }
- if (pg == 0)
- __bt_dmpage(h);
- else
- __bt_dpage(h);
- mpool_put(t->bt_mp, h, 0);
-}
-
-void
-bstat(db, argv)
- DB *db;
- char **argv;
-{
- (void)printf("BTREE\n");
- __bt_stat(db);
-}
-
-void
-mstat(db, argv)
- DB *db;
- char **argv;
-{
- (void)printf("MPOOL\n");
- mpool_stat(((BTREE *)db->internal)->bt_mp);
-}
-
-void
-keydata(key, data)
- DBT *key, *data;
-{
- if (!recno && key->size > 0)
- (void)printf("%s/", key->data);
- if (data->size > 0)
- (void)printf("%s", data->data);
- (void)printf("\n");
-}
-
-void
-usage()
-{
- (void)fprintf(stderr,
- "usage: %s [-bdlu] [-c cache] [-i file] [-p page] [file]\n",
- progname);
- exit (1);
-}
diff --git a/lib/libc/db/test/dbtest.c b/lib/libc/db/test/dbtest.c
deleted file mode 100644
index 4341b4c..0000000
--- a/lib/libc/db/test/dbtest.c
+++ /dev/null
@@ -1,753 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1992, 1993, 1994\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)dbtest.c 8.17 (Berkeley) 9/1/94";
-#endif /* not lint */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <db.h>
-
-enum S { COMMAND, COMPARE, GET, PUT, REMOVE, SEQ, SEQFLAG, KEY, DATA };
-
-void compare __P((DBT *, DBT *));
-DBTYPE dbtype __P((char *));
-void dump __P((DB *, int));
-void err __P((const char *, ...));
-void get __P((DB *, DBT *));
-void getdata __P((DB *, DBT *, DBT *));
-void put __P((DB *, DBT *, DBT *));
-void rem __P((DB *, DBT *));
-char *sflags __P((int));
-void synk __P((DB *));
-void *rfile __P((char *, size_t *));
-void seq __P((DB *, DBT *));
-u_int setflags __P((char *));
-void *setinfo __P((DBTYPE, char *));
-void usage __P((void));
-void *xmalloc __P((char *, size_t));
-
-DBTYPE type; /* Database type. */
-void *infop; /* Iflags. */
-u_long lineno; /* Current line in test script. */
-u_int flags; /* Current DB flags. */
-int ofd = STDOUT_FILENO; /* Standard output fd. */
-
-DB *XXdbp; /* Global for gdb. */
-int XXlineno; /* Fast breakpoint for gdb. */
-
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- extern int optind;
- extern char *optarg;
- enum S command, state;
- DB *dbp;
- DBT data, key, keydata;
- size_t len;
- int ch, oflags, sflag;
- char *fname, *infoarg, *p, *t, buf[8 * 1024];
-
- infoarg = NULL;
- fname = NULL;
- oflags = O_CREAT | O_RDWR;
- sflag = 0;
- while ((ch = getopt(argc, argv, "f:i:lo:s")) != EOF)
- switch (ch) {
- case 'f':
- fname = optarg;
- break;
- case 'i':
- infoarg = optarg;
- break;
- case 'l':
- oflags |= DB_LOCK;
- break;
- case 'o':
- if ((ofd = open(optarg,
- O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
- err("%s: %s", optarg, strerror(errno));
- break;
- case 's':
- sflag = 1;
- break;
- case '?':
- default:
- usage();
- }
- argc -= optind;
- argv += optind;
-
- if (argc != 2)
- usage();
-
- /* Set the type. */
- type = dbtype(*argv++);
-
- /* Open the descriptor file. */
- if (strcmp(*argv, "-") && freopen(*argv, "r", stdin) == NULL)
- err("%s: %s", *argv, strerror(errno));
-
- /* Set up the db structure as necessary. */
- if (infoarg == NULL)
- infop = NULL;
- else
- for (p = strtok(infoarg, ",\t "); p != NULL;
- p = strtok(0, ",\t "))
- if (*p != '\0')
- infop = setinfo(type, p);
-
- /*
- * Open the DB. Delete any preexisting copy, you almost never
- * want it around, and it often screws up tests.
- */
- if (fname == NULL) {
- p = getenv("TMPDIR");
- if (p == NULL)
- p = "/var/tmp";
- (void)sprintf(buf, "%s/__dbtest", p);
- fname = buf;
- (void)unlink(buf);
- } else if (!sflag)
- (void)unlink(fname);
-
- if ((dbp = dbopen(fname,
- oflags, S_IRUSR | S_IWUSR, type, infop)) == NULL)
- err("dbopen: %s", strerror(errno));
- XXdbp = dbp;
-
- state = COMMAND;
- for (lineno = 1;
- (p = fgets(buf, sizeof(buf), stdin)) != NULL; ++lineno) {
- /* Delete the newline, displaying the key/data is easier. */
- if (ofd == STDOUT_FILENO && (t = strchr(p, '\n')) != NULL)
- *t = '\0';
- if ((len = strlen(buf)) == 0 || isspace(*p) || *p == '#')
- continue;
-
- /* Convenient gdb break point. */
- if (XXlineno == lineno)
- XXlineno = 1;
- switch (*p) {
- case 'c': /* compare */
- if (state != COMMAND)
- err("line %lu: not expecting command", lineno);
- state = KEY;
- command = COMPARE;
- break;
- case 'e': /* echo */
- if (state != COMMAND)
- err("line %lu: not expecting command", lineno);
- /* Don't display the newline, if CR at EOL. */
- if (p[len - 2] == '\r')
- --len;
- if (write(ofd, p + 1, len - 1) != len - 1 ||
- write(ofd, "\n", 1) != 1)
- err("write: %s", strerror(errno));
- break;
- case 'g': /* get */
- if (state != COMMAND)
- err("line %lu: not expecting command", lineno);
- state = KEY;
- command = GET;
- break;
- case 'p': /* put */
- if (state != COMMAND)
- err("line %lu: not expecting command", lineno);
- state = KEY;
- command = PUT;
- break;
- case 'r': /* remove */
- if (state != COMMAND)
- err("line %lu: not expecting command", lineno);
- if (flags == R_CURSOR) {
- rem(dbp, &key);
- state = COMMAND;
- } else {
- state = KEY;
- command = REMOVE;
- }
- break;
- case 'S': /* sync */
- if (state != COMMAND)
- err("line %lu: not expecting command", lineno);
- synk(dbp);
- state = COMMAND;
- break;
- case 's': /* seq */
- if (state != COMMAND)
- err("line %lu: not expecting command", lineno);
- if (flags == R_CURSOR) {
- state = KEY;
- command = SEQ;
- } else
- seq(dbp, &key);
- break;
- case 'f':
- flags = setflags(p + 1);
- break;
- case 'D': /* data file */
- if (state != DATA)
- err("line %lu: not expecting data", lineno);
- data.data = rfile(p + 1, &data.size);
- goto ldata;
- case 'd': /* data */
- if (state != DATA)
- err("line %lu: not expecting data", lineno);
- data.data = xmalloc(p + 1, len - 1);
- data.size = len - 1;
-ldata: switch (command) {
- case COMPARE:
- compare(&keydata, &data);
- break;
- case PUT:
- put(dbp, &key, &data);
- break;
- default:
- err("line %lu: command doesn't take data",
- lineno);
- }
- if (type != DB_RECNO)
- free(key.data);
- free(data.data);
- state = COMMAND;
- break;
- case 'K': /* key file */
- if (state != KEY)
- err("line %lu: not expecting a key", lineno);
- if (type == DB_RECNO)
- err("line %lu: 'K' not available for recno",
- lineno);
- key.data = rfile(p + 1, &key.size);
- goto lkey;
- case 'k': /* key */
- if (state != KEY)
- err("line %lu: not expecting a key", lineno);
- if (type == DB_RECNO) {
- static recno_t recno;
- recno = atoi(p + 1);
- key.data = &recno;
- key.size = sizeof(recno);
- } else {
- key.data = xmalloc(p + 1, len - 1);
- key.size = len - 1;
- }
-lkey: switch (command) {
- case COMPARE:
- getdata(dbp, &key, &keydata);
- state = DATA;
- break;
- case GET:
- get(dbp, &key);
- if (type != DB_RECNO)
- free(key.data);
- state = COMMAND;
- break;
- case PUT:
- state = DATA;
- break;
- case REMOVE:
- rem(dbp, &key);
- if ((type != DB_RECNO) && (flags != R_CURSOR))
- free(key.data);
- state = COMMAND;
- break;
- case SEQ:
- seq(dbp, &key);
- if ((type != DB_RECNO) && (flags != R_CURSOR))
- free(key.data);
- state = COMMAND;
- break;
- default:
- err("line %lu: command doesn't take a key",
- lineno);
- }
- break;
- case 'o':
- dump(dbp, p[1] == 'r');
- break;
- default:
- err("line %lu: %s: unknown command character",
- lineno, p);
- }
- }
-#ifdef STATISTICS
- /*
- * -l must be used (DB_LOCK must be set) for this to be
- * used, otherwise a page will be locked and it will fail.
- */
- if (type == DB_BTREE && oflags & DB_LOCK)
- __bt_stat(dbp);
-#endif
- if (dbp->close(dbp))
- err("db->close: %s", strerror(errno));
- (void)close(ofd);
- exit(0);
-}
-
-#define NOOVERWRITE "put failed, would overwrite key\n"
-
-void
-compare(db1, db2)
- DBT *db1, *db2;
-{
- register size_t len;
- register u_char *p1, *p2;
-
- if (db1->size != db2->size)
- printf("compare failed: key->data len %lu != data len %lu\n",
- db1->size, db2->size);
-
- len = MIN(db1->size, db2->size);
- for (p1 = db1->data, p2 = db2->data; len--;)
- if (*p1++ != *p2++) {
- printf("compare failed at offset %d\n",
- p1 - (u_char *)db1->data);
- break;
- }
-}
-
-void
-get(dbp, kp)
- DB *dbp;
- DBT *kp;
-{
- DBT data;
-
- switch (dbp->get(dbp, kp, &data, flags)) {
- case 0:
- (void)write(ofd, data.data, data.size);
- if (ofd == STDOUT_FILENO)
- (void)write(ofd, "\n", 1);
- break;
- case -1:
- err("line %lu: get: %s", lineno, strerror(errno));
- /* NOTREACHED */
- case 1:
-#define NOSUCHKEY "get failed, no such key\n"
- if (ofd != STDOUT_FILENO)
- (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1);
- else
- (void)fprintf(stderr, "%d: %.*s: %s",
- lineno, MIN(kp->size, 20), kp->data, NOSUCHKEY);
-#undef NOSUCHKEY
- break;
- }
-}
-
-void
-getdata(dbp, kp, dp)
- DB *dbp;
- DBT *kp, *dp;
-{
- switch (dbp->get(dbp, kp, dp, flags)) {
- case 0:
- return;
- case -1:
- err("line %lu: getdata: %s", lineno, strerror(errno));
- /* NOTREACHED */
- case 1:
- err("line %lu: getdata failed, no such key", lineno);
- /* NOTREACHED */
- }
-}
-
-void
-put(dbp, kp, dp)
- DB *dbp;
- DBT *kp, *dp;
-{
- switch (dbp->put(dbp, kp, dp, flags)) {
- case 0:
- break;
- case -1:
- err("line %lu: put: %s", lineno, strerror(errno));
- /* NOTREACHED */
- case 1:
- (void)write(ofd, NOOVERWRITE, sizeof(NOOVERWRITE) - 1);
- break;
- }
-}
-
-void
-rem(dbp, kp)
- DB *dbp;
- DBT *kp;
-{
- switch (dbp->del(dbp, kp, flags)) {
- case 0:
- break;
- case -1:
- err("line %lu: rem: %s", lineno, strerror(errno));
- /* NOTREACHED */
- case 1:
-#define NOSUCHKEY "rem failed, no such key\n"
- if (ofd != STDOUT_FILENO)
- (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1);
- else if (flags != R_CURSOR)
- (void)fprintf(stderr, "%d: %.*s: %s",
- lineno, MIN(kp->size, 20), kp->data, NOSUCHKEY);
- else
- (void)fprintf(stderr,
- "%d: rem of cursor failed\n", lineno);
-#undef NOSUCHKEY
- break;
- }
-}
-
-void
-synk(dbp)
- DB *dbp;
-{
- switch (dbp->sync(dbp, flags)) {
- case 0:
- break;
- case -1:
- err("line %lu: synk: %s", lineno, strerror(errno));
- /* NOTREACHED */
- }
-}
-
-void
-seq(dbp, kp)
- DB *dbp;
- DBT *kp;
-{
- DBT data;
-
- switch (dbp->seq(dbp, kp, &data, flags)) {
- case 0:
- (void)write(ofd, data.data, data.size);
- if (ofd == STDOUT_FILENO)
- (void)write(ofd, "\n", 1);
- break;
- case -1:
- err("line %lu: seq: %s", lineno, strerror(errno));
- /* NOTREACHED */
- case 1:
-#define NOSUCHKEY "seq failed, no such key\n"
- if (ofd != STDOUT_FILENO)
- (void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1);
- else if (flags == R_CURSOR)
- (void)fprintf(stderr, "%d: %.*s: %s",
- lineno, MIN(kp->size, 20), kp->data, NOSUCHKEY);
- else
- (void)fprintf(stderr,
- "%d: seq (%s) failed\n", lineno, sflags(flags));
-#undef NOSUCHKEY
- break;
- }
-}
-
-void
-dump(dbp, rev)
- DB *dbp;
- int rev;
-{
- DBT key, data;
- int flags, nflags;
-
- if (rev) {
- flags = R_LAST;
- nflags = R_PREV;
- } else {
- flags = R_FIRST;
- nflags = R_NEXT;
- }
- for (;; flags = nflags)
- switch (dbp->seq(dbp, &key, &data, flags)) {
- case 0:
- (void)write(ofd, data.data, data.size);
- if (ofd == STDOUT_FILENO)
- (void)write(ofd, "\n", 1);
- break;
- case 1:
- goto done;
- case -1:
- err("line %lu: (dump) seq: %s",
- lineno, strerror(errno));
- /* NOTREACHED */
- }
-done: return;
-}
-
-u_int
-setflags(s)
- char *s;
-{
- char *p, *index();
-
- for (; isspace(*s); ++s);
- if (*s == '\n' || *s == '\0')
- return (0);
- if ((p = index(s, '\n')) != NULL)
- *p = '\0';
- if (!strcmp(s, "R_CURSOR")) return (R_CURSOR);
- if (!strcmp(s, "R_FIRST")) return (R_FIRST);
- if (!strcmp(s, "R_IAFTER")) return (R_IAFTER);
- if (!strcmp(s, "R_IBEFORE")) return (R_IBEFORE);
- if (!strcmp(s, "R_LAST")) return (R_LAST);
- if (!strcmp(s, "R_NEXT")) return (R_NEXT);
- if (!strcmp(s, "R_NOOVERWRITE")) return (R_NOOVERWRITE);
- if (!strcmp(s, "R_PREV")) return (R_PREV);
- if (!strcmp(s, "R_SETCURSOR")) return (R_SETCURSOR);
-
- err("line %lu: %s: unknown flag", lineno, s);
- /* NOTREACHED */
-}
-
-char *
-sflags(flags)
- int flags;
-{
- switch (flags) {
- case R_CURSOR: return ("R_CURSOR");
- case R_FIRST: return ("R_FIRST");
- case R_IAFTER: return ("R_IAFTER");
- case R_IBEFORE: return ("R_IBEFORE");
- case R_LAST: return ("R_LAST");
- case R_NEXT: return ("R_NEXT");
- case R_NOOVERWRITE: return ("R_NOOVERWRITE");
- case R_PREV: return ("R_PREV");
- case R_SETCURSOR: return ("R_SETCURSOR");
- }
-
- return ("UNKNOWN!");
-}
-
-DBTYPE
-dbtype(s)
- char *s;
-{
- if (!strcmp(s, "btree"))
- return (DB_BTREE);
- if (!strcmp(s, "hash"))
- return (DB_HASH);
- if (!strcmp(s, "recno"))
- return (DB_RECNO);
- err("%s: unknown type (use btree, hash or recno)", s);
- /* NOTREACHED */
-}
-
-void *
-setinfo(type, s)
- DBTYPE type;
- char *s;
-{
- static BTREEINFO ib;
- static HASHINFO ih;
- static RECNOINFO rh;
- char *eq, *index();
-
- if ((eq = index(s, '=')) == NULL)
- err("%s: illegal structure set statement", s);
- *eq++ = '\0';
- if (!isdigit(*eq))
- err("%s: structure set statement must be a number", s);
-
- switch (type) {
- case DB_BTREE:
- if (!strcmp("flags", s)) {
- ib.flags = atoi(eq);
- return (&ib);
- }
- if (!strcmp("cachesize", s)) {
- ib.cachesize = atoi(eq);
- return (&ib);
- }
- if (!strcmp("maxkeypage", s)) {
- ib.maxkeypage = atoi(eq);
- return (&ib);
- }
- if (!strcmp("minkeypage", s)) {
- ib.minkeypage = atoi(eq);
- return (&ib);
- }
- if (!strcmp("lorder", s)) {
- ib.lorder = atoi(eq);
- return (&ib);
- }
- if (!strcmp("psize", s)) {
- ib.psize = atoi(eq);
- return (&ib);
- }
- break;
- case DB_HASH:
- if (!strcmp("bsize", s)) {
- ih.bsize = atoi(eq);
- return (&ih);
- }
- if (!strcmp("ffactor", s)) {
- ih.ffactor = atoi(eq);
- return (&ih);
- }
- if (!strcmp("nelem", s)) {
- ih.nelem = atoi(eq);
- return (&ih);
- }
- if (!strcmp("cachesize", s)) {
- ih.cachesize = atoi(eq);
- return (&ih);
- }
- if (!strcmp("lorder", s)) {
- ih.lorder = atoi(eq);
- return (&ih);
- }
- break;
- case DB_RECNO:
- if (!strcmp("flags", s)) {
- rh.flags = atoi(eq);
- return (&rh);
- }
- if (!strcmp("cachesize", s)) {
- rh.cachesize = atoi(eq);
- return (&rh);
- }
- if (!strcmp("lorder", s)) {
- rh.lorder = atoi(eq);
- return (&rh);
- }
- if (!strcmp("reclen", s)) {
- rh.reclen = atoi(eq);
- return (&rh);
- }
- if (!strcmp("bval", s)) {
- rh.bval = atoi(eq);
- return (&rh);
- }
- if (!strcmp("psize", s)) {
- rh.psize = atoi(eq);
- return (&rh);
- }
- break;
- }
- err("%s: unknown structure value", s);
- /* NOTREACHED */
-}
-
-void *
-rfile(name, lenp)
- char *name;
- size_t *lenp;
-{
- struct stat sb;
- void *p;
- int fd;
- char *np, *index();
-
- for (; isspace(*name); ++name);
- if ((np = index(name, '\n')) != NULL)
- *np = '\0';
- if ((fd = open(name, O_RDONLY, 0)) < 0 ||
- fstat(fd, &sb))
- err("%s: %s\n", name, strerror(errno));
-#ifdef NOT_PORTABLE
- if (sb.st_size > (off_t)SIZE_T_MAX)
- err("%s: %s\n", name, strerror(E2BIG));
-#endif
- if ((p = (void *)malloc((u_int)sb.st_size)) == NULL)
- err("%s", strerror(errno));
- (void)read(fd, p, (int)sb.st_size);
- *lenp = sb.st_size;
- (void)close(fd);
- return (p);
-}
-
-void *
-xmalloc(text, len)
- char *text;
- size_t len;
-{
- void *p;
-
- if ((p = (void *)malloc(len)) == NULL)
- err("%s", strerror(errno));
- memmove(p, text, len);
- return (p);
-}
-
-void
-usage()
-{
- (void)fprintf(stderr,
- "usage: dbtest [-l] [-f file] [-i info] [-o file] type script\n");
- exit(1);
-}
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-void
-#if __STDC__
-err(const char *fmt, ...)
-#else
-err(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- (void)fprintf(stderr, "dbtest: ");
- (void)vfprintf(stderr, fmt, ap);
- va_end(ap);
- (void)fprintf(stderr, "\n");
- exit(1);
- /* NOTREACHED */
-}
diff --git a/lib/libc/db/test/hash.tests/driver2.c b/lib/libc/db/test/hash.tests/driver2.c
deleted file mode 100644
index 896820c..0000000
--- a/lib/libc/db/test/hash.tests/driver2.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1991, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)driver2.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/*
- * Test driver, to try to tackle the large ugly-split problem.
- */
-
-#include <sys/file.h>
-#include <stdio.h>
-#include "ndbm.h"
-
-int my_hash(key, len)
- char *key;
- int len;
-{
- return(17); /* So I'm cruel... */
-}
-
-main(argc, argv)
- int argc;
-{
- DB *db;
- DBT key, content;
- char keybuf[2049];
- char contentbuf[2049];
- char buf[256];
- int i;
- HASHINFO info;
-
- info.bsize = 1024;
- info.ffactor = 5;
- info.nelem = 1;
- info.cachesize = NULL;
-#ifdef HASH_ID_PROGRAM_SPECIFIED
- info.hash_id = HASH_ID_PROGRAM_SPECIFIED;
- info.hash_func = my_hash;
-#else
- info.hash = my_hash;
-#endif
- info.lorder = 0;
- if (!(db = dbopen("bigtest", O_RDWR | O_CREAT, 0644, DB_HASH, &info))) {
- sprintf(buf, "dbopen: failed on file bigtest");
- perror(buf);
- exit(1);
- }
- srandom(17);
- key.data = keybuf;
- content.data = contentbuf;
- bzero(keybuf, sizeof(keybuf));
- bzero(contentbuf, sizeof(contentbuf));
- for (i=1; i <= 500; i++) {
- key.size = 128 + (random()&1023);
- content.size = 128 + (random()&1023);
-/* printf("%d: Key size %d, data size %d\n", i, key.size,
- content.size); */
- sprintf(keybuf, "Key #%d", i);
- sprintf(contentbuf, "Contents #%d", i);
- if ((db->put)(db, &key, &content, R_NOOVERWRITE)) {
- sprintf(buf, "dbm_store #%d", i);
- perror(buf);
- }
- }
- if ((db->close)(db)) {
- perror("closing hash file");
- exit(1);
- }
- exit(0);
-}
-
-
-
diff --git a/lib/libc/db/test/hash.tests/makedb.sh b/lib/libc/db/test/hash.tests/makedb.sh
deleted file mode 100644
index f28e281..0000000
--- a/lib/libc/db/test/hash.tests/makedb.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-#
-# @(#)makedb.sh 8.1 (Berkeley) 6/4/93
-
-awk '{i++; print $0; print i;}' /usr/share/dict/words > WORDS
-ls /bin /usr/bin /usr/ucb /etc | egrep '^(...|....|.....|......)$' | \
-sort | uniq | \
-awk '{
- printf "%s\n", $0
- for (i = 0; i < 1000; i++)
- printf "%s+", $0
- printf "\n"
-}' > LONG.DATA
diff --git a/lib/libc/db/test/hash.tests/tcreat3.c b/lib/libc/db/test/hash.tests/tcreat3.c
deleted file mode 100644
index 31211c5..0000000
--- a/lib/libc/db/test/hash.tests/tcreat3.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1991, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)tcreat3.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <stdio.h>
-#include <db.h>
-
-#define INITIAL 25000
-#define MAXWORDS 25000 /* # of elements in search table */
-
-char wp1[8192];
-char wp2[8192];
-main(argc, argv)
-char **argv;
-{
- DBT item, key;
- DB *dbp;
- HASHINFO ctl;
- FILE *fp;
- int trash;
-
- int i = 0;
-
- argv++;
- ctl.hash = NULL;
- ctl.bsize = atoi(*argv++);
- ctl.ffactor = atoi(*argv++);
- ctl.nelem = atoi(*argv++);
- ctl.lorder = 0;
- if (!(dbp = dbopen( "hashtest",
- O_CREAT|O_TRUNC|O_RDWR, 0600, DB_HASH, &ctl))){
- /* create table */
- fprintf(stderr, "cannot create: hash table (size %d)\n",
- INITIAL);
- exit(1);
- }
-
- key.data = wp1;
- item.data = wp2;
- while ( fgets(wp1, 8192, stdin) &&
- fgets(wp2, 8192, stdin) &&
- i++ < MAXWORDS) {
-/*
-* put info in structure, and structure in the item
-*/
- key.size = strlen(wp1);
- item.size = strlen(wp2);
-
-/*
- * enter key/data pair into the table
- */
- if ((dbp->put)(dbp, &key, &item, R_NOOVERWRITE) != NULL) {
- fprintf(stderr, "cannot enter: key %s\n",
- item.data);
- exit(1);
- }
- }
-
- (dbp->close)(dbp);
- exit(0);
-}
diff --git a/lib/libc/db/test/hash.tests/tdel.c b/lib/libc/db/test/hash.tests/tdel.c
deleted file mode 100644
index fb99431..0000000
--- a/lib/libc/db/test/hash.tests/tdel.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1991, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)tdel.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <db.h>
-#include <stdio.h>
-
-#define INITIAL 25000
-#define MAXWORDS 25000 /* # of elements in search table */
-
-/* Usage: thash pagesize fillfactor file */
-char wp1[8192];
-char wp2[8192];
-main(argc, argv)
-char **argv;
-{
- DBT item, key;
- DB *dbp;
- HASHINFO ctl;
- FILE *fp;
- int stat;
-
- int i = 0;
-
- argv++;
- ctl.nelem = INITIAL;
- ctl.hash = NULL;
- ctl.bsize = atoi(*argv++);
- ctl.ffactor = atoi(*argv++);
- ctl.cachesize = 1024 * 1024; /* 1 MEG */
- ctl.lorder = 0;
- argc -= 2;
- if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) {
- /* create table */
- fprintf(stderr, "cannot create: hash table size %d)\n",
- INITIAL);
- exit(1);
- }
-
- key.data = wp1;
- item.data = wp2;
- while ( fgets(wp1, 8192, stdin) &&
- fgets(wp2, 8192, stdin) &&
- i++ < MAXWORDS) {
-/*
-* put info in structure, and structure in the item
-*/
- key.size = strlen(wp1);
- item.size = strlen(wp2);
-
-/*
- * enter key/data pair into the table
- */
- if ((dbp->put)(dbp, &key, &item, R_NOOVERWRITE) != NULL) {
- fprintf(stderr, "cannot enter: key %s\n",
- item.data);
- exit(1);
- }
- }
-
- if ( --argc ) {
- fp = fopen ( argv[0], "r");
- i = 0;
- while ( fgets(wp1, 8192, fp) &&
- fgets(wp2, 8192, fp) &&
- i++ < MAXWORDS) {
- key.size = strlen(wp1);
- stat = (dbp->del)(dbp, &key, 0);
- if (stat) {
- fprintf ( stderr, "Error retrieving %s\n", key.data );
- exit(1);
- }
- }
- fclose(fp);
- }
- (dbp->close)(dbp);
- exit(0);
-}
diff --git a/lib/libc/db/test/hash.tests/testit b/lib/libc/db/test/hash.tests/testit
deleted file mode 100644
index 039457a..0000000
--- a/lib/libc/db/test/hash.tests/testit
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/bin/csh -f
-#
-# @(#)testit 8.1 (Berkeley) 6/4/93
-#
-
-echo ""
-echo "PAGE FILL "
-set name=WORDS
- set i = 256
- foreach j ( 11 14 21 )
- thash4 $i $j 25000 65536 $name < $name
- end
- set i = 512
- foreach j ( 21 28 43 )
- thash4 $i $j 25000 65536 $name < $name
- end
- set i = 1024
- foreach j ( 43 57 85 )
- thash4 $i $j 25000 65536 $name < $name
- end
- set i = 2048
- foreach j ( 85 114 171 )
- thash4 $i $j 25000 65536 $name < $name
- end
- set i = 4096
- foreach j ( 171 228 341 )
- thash4 $i $j 25000 65536 $name < $name
- end
- set i = 8192
- foreach j ( 341 455 683 )
- thash4 $i $j 25000 65536 $name < $name
- end
- echo "PAGE FILL "
- set i = 256
- foreach j ( 11 14 21 )
- echo "$i"_"$j"
- tcreat3 $i $j 25000 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
- set i = 512
- foreach j ( 21 28 43 )
- echo "$i"_"$j"
- tcreat3 $i $j 25000 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
- set i = 1024
- foreach j ( 43 57 85 )
- echo "$i"_"$j"
- tcreat3 $i $j 25000 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
- set i = 2048
- foreach j ( 85 114 171 )
- echo "$i"_"$j"
- tcreat3 $i $j 25000 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
- set i = 4096
- foreach j ( 171 228 341 )
- echo "$i"_"$j"
- tcreat3 $i $j 25000 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
- set i = 8192
- foreach j ( 341 455 683 )
- echo "$i"_"$j"
- tcreat3 $i $j 25000 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
-set name=LONG.DATA
- set i = 1024
- foreach j ( 1 2 4 )
- echo thash4 $i $j 600 65536 $name
- thash4 $i $j 600 65536 $name < $name
- end
-
- set i = 2048
- foreach j ( 1 2 4 )
- echo thash4 $i $j 600 65536 $name
- thash4 $i $j 600 65536 $name < $name
- end
- set i = 4096
- foreach j ( 1 2 4 )
- echo thash4 $i $j 600 65536 $name
- thash4 $i $j 600 65536 $name < $name
- end
- set i = 8192
- foreach j ( 2 4 8 )
- echo thash4 $i $j 600 65536 $name
- thash4 $i $j 600 65536 $name < $name
- end
- echo "PAGE FILL "
- set i = 1024
- foreach j ( 1 2 4 )
- echo "$i"_"$j"
- tcreat3 $i $j 600 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
- set i = 2048
- foreach j ( 1 2 4 )
- echo "$i"_"$j"
- tcreat3 $i $j 600 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
- set i = 4096
- foreach j ( 1 2 4 )
- echo "$i"_"$j"
- tcreat3 $i $j 600 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
- set i = 8192
- foreach j ( 2 4 8 )
- echo "$i"_"$j"
- tcreat3 $i $j 600 $name < $name
- tread2 65536 < $name
- tverify $name < $name
- tseq > /dev/null
- tdel $i $j $name < $name
- end
-driver2
diff --git a/lib/libc/db/test/hash.tests/thash4.c b/lib/libc/db/test/hash.tests/thash4.c
deleted file mode 100644
index 952dccb..0000000
--- a/lib/libc/db/test/hash.tests/thash4.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1991, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)thash4.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <sys/timeb.h>
-#include <stdio.h>
-#include <errno.h>
-#include <db.h>
-
-#define INITIAL 25000
-#define MAXWORDS 25000 /* # of elements in search table */
-
-/* Usage: thash pagesize fillfactor file */
-char wp1[8192];
-char wp2[8192];
-main(argc, argv)
-char **argv;
-{
- DBT item, key, res;
- DB *dbp;
- HASHINFO ctl;
- FILE *fp;
- int stat;
- time_t t;
-
- int i = 0;
-
- argv++;
- ctl.hash = NULL;
- ctl.bsize = atoi(*argv++);
- ctl.ffactor = atoi(*argv++);
- ctl.nelem = atoi(*argv++);
- ctl.cachesize = atoi(*argv++);
- ctl.lorder = 0;
- if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) {
- /* create table */
- fprintf(stderr, "cannot create: hash table size %d)\n",
- INITIAL);
- fprintf(stderr, "\terrno: %d\n", errno);
- exit(1);
- }
-
- key.data = wp1;
- item.data = wp2;
- while ( fgets(wp1, 8192, stdin) &&
- fgets(wp2, 8192, stdin) &&
- i++ < MAXWORDS) {
-/*
-* put info in structure, and structure in the item
-*/
- key.size = strlen(wp1);
- item.size = strlen(wp2);
-
-/*
- * enter key/data pair into the table
- */
- if ((dbp->put)(dbp, &key, &item, R_NOOVERWRITE) != NULL) {
- fprintf(stderr, "cannot enter: key %s\n",
- item.data);
- fprintf(stderr, "\terrno: %d\n", errno);
- exit(1);
- }
- }
-
- if ( --argc ) {
- fp = fopen ( argv[0], "r");
- i = 0;
- while ( fgets(wp1, 256, fp) &&
- fgets(wp2, 8192, fp) &&
- i++ < MAXWORDS) {
-
- key.size = strlen(wp1);
- stat = (dbp->get)(dbp, &key, &res, 0);
- if (stat < 0 ) {
- fprintf ( stderr, "Error retrieving %s\n", key.data );
- fprintf(stderr, "\terrno: %d\n", errno);
- exit(1);
- } else if ( stat > 0 ) {
- fprintf ( stderr, "%s not found\n", key.data );
- fprintf(stderr, "\terrno: %d\n", errno);
- exit(1);
- }
- }
- fclose(fp);
- }
- dbp->close(dbp);
- exit(0);
-}
diff --git a/lib/libc/db/test/hash.tests/tread2.c b/lib/libc/db/test/hash.tests/tread2.c
deleted file mode 100644
index 8f01556..0000000
--- a/lib/libc/db/test/hash.tests/tread2.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1991, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)tread2.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <stdio.h>
-#include <db.h>
-
-#define INITIAL 25000
-#define MAXWORDS 25000 /* # of elements in search table */
-
-typedef struct { /* info to be stored */
- int num, siz;
-} info;
-
-char wp1[8192];
-char wp2[8192];
-main(argc, argv)
-char **argv;
-{
- DBT item, key, res;
- DB *dbp;
- HASHINFO ctl;
- int stat;
-
- int i = 0;
-
- ctl.nelem = INITIAL;
- ctl.hash = NULL;
- ctl.bsize = 64;
- ctl.ffactor = 1;
- ctl.cachesize = atoi(*argv++);
- ctl.lorder = 0;
- if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, &ctl))) {
- /* create table */
- fprintf(stderr, "cannot open: hash table\n" );
- exit(1);
- }
-
- key.data = wp1;
- item.data = wp2;
- while ( fgets(wp1, 8192, stdin) &&
- fgets(wp2, 8192, stdin) &&
- i++ < MAXWORDS) {
-/*
-* put info in structure, and structure in the item
-*/
- key.size = strlen(wp1);
- item.size = strlen(wp2);
-
- stat = (dbp->get)(dbp, &key, &res,0);
- if (stat < 0) {
- fprintf ( stderr, "Error retrieving %s\n", key.data );
- exit(1);
- } else if ( stat > 0 ) {
- fprintf ( stderr, "%s not found\n", key.data );
- exit(1);
- }
- }
- (dbp->close)(dbp);
- exit(0);
-}
diff --git a/lib/libc/db/test/hash.tests/tseq.c b/lib/libc/db/test/hash.tests/tseq.c
deleted file mode 100644
index f41c172..0000000
--- a/lib/libc/db/test/hash.tests/tseq.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1991, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)tseq.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <stdio.h>
-#include <db.h>
-
-#define INITIAL 25000
-#define MAXWORDS 25000 /* # of elements in search table */
-
-
-char wp[8192];
-char cp[8192];
-main(argc, argv)
-char **argv;
-{
- DBT item, key, res;
- DB *dbp;
- FILE *fp;
- int stat;
-
- if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, NULL))) {
- /* create table */
- fprintf(stderr, "cannot open: hash table\n" );
- exit(1);
- }
-
-/*
-* put info in structure, and structure in the item
-*/
- for ( stat = (dbp->seq) (dbp, &res, &item, 1 );
- stat == 0;
- stat = (dbp->seq) (dbp, &res, &item, 0 ) ) {
-
- bcopy ( res.data, wp, res.size );
- wp[res.size] = 0;
- bcopy ( item.data, cp, item.size );
- cp[item.size] = 0;
-
- printf ( "%s %s\n", wp, cp );
- }
- (dbp->close)(dbp);
- exit(0);
-}
diff --git a/lib/libc/db/test/hash.tests/tverify.c b/lib/libc/db/test/hash.tests/tverify.c
deleted file mode 100644
index ac5d2f9..0000000
--- a/lib/libc/db/test/hash.tests/tverify.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Margo Seltzer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1991, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)tverify.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <stdio.h>
-#include <db.h>
-
-#define INITIAL 25000
-#define MAXWORDS 25000 /* # of elements in search table */
-
-typedef struct { /* info to be stored */
- int num, siz;
-} info;
-
-char wp1[8192];
-char wp2[8192];
-main(argc, argv)
-char **argv;
-{
- DBT key, res;
- DB *dbp;
- HASHINFO ctl;
- int trash;
- int stat;
-
- int i = 0;
-
- ctl.nelem = INITIAL;
- ctl.hash = NULL;
- ctl.bsize = 64;
- ctl.ffactor = 1;
- ctl.cachesize = 1024 * 1024; /* 1 MEG */
- ctl.lorder = 0;
- if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, &ctl))) {
- /* create table */
- fprintf(stderr, "cannot open: hash table\n" );
- exit(1);
- }
-
- key.data = wp1;
- while ( fgets(wp1, 8192, stdin) &&
- fgets(wp2, 8192, stdin) &&
- i++ < MAXWORDS) {
-/*
-* put info in structure, and structure in the item
-*/
- key.size = strlen(wp1);
-
- stat = (dbp->get)(dbp, &key, &res,0);
- if (stat < 0) {
- fprintf ( stderr, "Error retrieving %s\n", key.data );
- exit(1);
- } else if ( stat > 0 ) {
- fprintf ( stderr, "%s not found\n", key.data );
- exit(1);
- }
- if ( memcmp ( res.data, wp2, res.size ) ) {
- fprintf ( stderr, "data for %s is incorrect. Data was %s. Should have been %s\n", key.data, res.data, wp2 );
- }
- }
- (dbp->close)(dbp);
- exit(0);
-}
diff --git a/lib/libc/db/test/run.test b/lib/libc/db/test/run.test
deleted file mode 100644
index 52b74c3..0000000
--- a/lib/libc/db/test/run.test
+++ /dev/null
@@ -1,705 +0,0 @@
-#!/bin/sh -
-#
-# @(#)run.test 8.10 (Berkeley) 7/26/94
-#
-
-# db regression tests
-main()
-{
-
- PROG=./dbtest
- TMP1=t1
- TMP2=t2
- TMP3=t3
-
- if [ -f /usr/share/dict/words ]; then
- DICT=/usr/share/dict/words
- elif [ -f /usr/dict/words ]; then
- DICT=/usr/dict/words
- else
- echo 'run.test: no dictionary'
- exit 1
- fi
-
- if [ $# -eq 0 ]; then
- for t in 1 2 3 4 5 6 7 8 9 10 11 12 13 20; do
- test$t
- done
- else
- while [ $# -gt 0 ]
- do case "$1" in
- test*)
- $1;;
- [0-9]*)
- test$1;;
- btree)
- for t in 1 2 3 7 8 9 10 12 13; do
- test$t
- done;;
- hash)
- for t in 1 2 3 8 13 20; do
- test$t
- done;;
- recno)
- for t in 1 2 3 4 5 6 7 10 11; do
- test$t
- done;;
- *)
- echo "run.test: unknown test $1"
- echo "usage: run.test test# | type"
- exit 1
- esac
- shift
- done
- fi
- rm -f $TMP1 $TMP2 $TMP3
- exit 0
-}
-
-# Take the first hundred entries in the dictionary, and make them
-# be key/data pairs.
-test1()
-{
- echo "Test 1: btree, hash: small key, small data pairs"
- sed 200q $DICT > $TMP1
- for type in btree hash; do
- rm -f $TMP2 $TMP3
- for i in `sed 200q $DICT`; do
- echo p
- echo k$i
- echo d$i
- echo g
- echo k$i
- done > $TMP2
- $PROG -o $TMP3 $type $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test1: type $type: failed"
- exit 1
- fi
- done
- echo "Test 1: recno: small key, small data pairs"
- rm -f $TMP2 $TMP3
- sed 200q $DICT |
- awk '{
- ++i;
- printf("p\nk%d\nd%s\ng\nk%d\n", i, $0, i);
- }' > $TMP2
- $PROG -o $TMP3 recno $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test1: type recno: failed"
- exit 1
- fi
-}
-
-# Take the first 200 entries in the dictionary, and give them
-# each a medium size data entry.
-test2()
-{
- echo "Test 2: btree, hash: small key, medium data pairs"
- mdata=abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
- echo $mdata |
- awk '{ for (i = 1; i < 201; ++i) print $0 }' > $TMP1
- for type in hash btree; do
- rm -f $TMP2 $TMP3
- for i in `sed 200q $DICT`; do
- echo p
- echo k$i
- echo d$mdata
- echo g
- echo k$i
- done > $TMP2
- $PROG -o $TMP3 $type $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test2: type $type: failed"
- exit 1
- fi
- done
- echo "Test 2: recno: small key, medium data pairs"
- rm -f $TMP2 $TMP3
- echo $mdata |
- awk '{ for (i = 1; i < 201; ++i)
- printf("p\nk%d\nd%s\ng\nk%d\n", i, $0, i);
- }' > $TMP2
- $PROG -o $TMP3 recno $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test2: type recno: failed"
- exit 1
- fi
-}
-
-# Insert the programs in /bin with their paths as their keys.
-test3()
-{
- echo "Test 3: hash: small key, big data pairs"
- rm -f $TMP1
- (find /bin -type f -print | xargs cat) > $TMP1
- for type in hash; do
- rm -f $TMP2 $TMP3
- for i in `find /bin -type f -print`; do
- echo p
- echo k$i
- echo D$i
- echo g
- echo k$i
- done > $TMP2
- $PROG -o $TMP3 $type $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test3: $type: failed"
- exit 1
- fi
- done
- echo "Test 3: btree: small key, big data pairs"
- for psize in 512 16384 65536; do
- echo " page size $psize"
- for type in btree; do
- rm -f $TMP2 $TMP3
- for i in `find /bin -type f -print`; do
- echo p
- echo k$i
- echo D$i
- echo g
- echo k$i
- done > $TMP2
- $PROG -i psize=$psize -o $TMP3 $type $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test3: $type: page size $psize: failed"
- exit 1
- fi
- done
- done
- echo "Test 3: recno: big data pairs"
- rm -f $TMP2 $TMP3
- find /bin -type f -print |
- awk '{
- ++i;
- printf("p\nk%d\nD%s\ng\nk%d\n", i, $0, i);
- }' > $TMP2
- for psize in 512 16384 65536; do
- echo " page size $psize"
- $PROG -i psize=$psize -o $TMP3 recno $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test3: recno: page size $psize: failed"
- exit 1
- fi
- done
-}
-
-# Do random recno entries.
-test4()
-{
- echo "Test 4: recno: random entries"
- echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" |
- awk '{
- for (i = 37; i <= 37 + 88 * 17; i += 17) {
- if (i % 41)
- s = substr($0, 1, i % 41);
- else
- s = substr($0, 1);
- printf("input key %d: %s\n", i, s);
- }
- for (i = 1; i <= 15; ++i) {
- if (i % 41)
- s = substr($0, 1, i % 41);
- else
- s = substr($0, 1);
- printf("input key %d: %s\n", i, s);
- }
- for (i = 19234; i <= 19234 + 61 * 27; i += 27) {
- if (i % 41)
- s = substr($0, 1, i % 41);
- else
- s = substr($0, 1);
- printf("input key %d: %s\n", i, s);
- }
- exit
- }' > $TMP1
- rm -f $TMP2 $TMP3
- cat $TMP1 |
- awk 'BEGIN {
- i = 37;
- incr = 17;
- }
- {
- printf("p\nk%d\nd%s\n", i, $0);
- if (i == 19234 + 61 * 27)
- exit;
- if (i == 37 + 88 * 17) {
- i = 1;
- incr = 1;
- } else if (i == 15) {
- i = 19234;
- incr = 27;
- } else
- i += incr;
- }
- END {
- for (i = 37; i <= 37 + 88 * 17; i += 17)
- printf("g\nk%d\n", i);
- for (i = 1; i <= 15; ++i)
- printf("g\nk%d\n", i);
- for (i = 19234; i <= 19234 + 61 * 27; i += 27)
- printf("g\nk%d\n", i);
- }' > $TMP2
- $PROG -o $TMP3 recno $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test4: type recno: failed"
- exit 1
- fi
-}
-
-# Do reverse order recno entries.
-test5()
-{
- echo "Test 5: recno: reverse order entries"
- echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" |
- awk ' {
- for (i = 1500; i; --i) {
- if (i % 34)
- s = substr($0, 1, i % 34);
- else
- s = substr($0, 1);
- printf("input key %d: %s\n", i, s);
- }
- exit;
- }' > $TMP1
- rm -f $TMP2 $TMP3
- cat $TMP1 |
- awk 'BEGIN {
- i = 1500;
- }
- {
- printf("p\nk%d\nd%s\n", i, $0);
- --i;
- }
- END {
- for (i = 1500; i; --i)
- printf("g\nk%d\n", i);
- }' > $TMP2
- $PROG -o $TMP3 recno $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test5: type recno: failed"
- exit 1
- fi
-}
-
-# Do alternating order recno entries.
-test6()
-{
- echo "Test 6: recno: alternating order entries"
- echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" |
- awk ' {
- for (i = 1; i < 1200; i += 2) {
- if (i % 34)
- s = substr($0, 1, i % 34);
- else
- s = substr($0, 1);
- printf("input key %d: %s\n", i, s);
- }
- for (i = 2; i < 1200; i += 2) {
- if (i % 34)
- s = substr($0, 1, i % 34);
- else
- s = substr($0, 1);
- printf("input key %d: %s\n", i, s);
- }
- exit;
- }' > $TMP1
- rm -f $TMP2 $TMP3
- cat $TMP1 |
- awk 'BEGIN {
- i = 1;
- even = 0;
- }
- {
- printf("p\nk%d\nd%s\n", i, $0);
- i += 2;
- if (i >= 1200) {
- if (even == 1)
- exit;
- even = 1;
- i = 2;
- }
- }
- END {
- for (i = 1; i < 1200; ++i)
- printf("g\nk%d\n", i);
- }' > $TMP2
- $PROG -o $TMP3 recno $TMP2
- sort -o $TMP1 $TMP1
- sort -o $TMP3 $TMP3
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test6: type recno: failed"
- exit 1
- fi
-}
-
-# Delete cursor record
-test7()
-{
- echo "Test 7: btree, recno: delete cursor record"
- echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" |
- awk '{
- for (i = 1; i <= 120; ++i)
- printf("%05d: input key %d: %s\n", i, i, $0);
- printf("%05d: input key %d: %s\n", 120, 120, $0);
- printf("seq failed, no such key\n");
- printf("%05d: input key %d: %s\n", 1, 1, $0);
- printf("%05d: input key %d: %s\n", 2, 2, $0);
- exit;
- }' > $TMP1
- rm -f $TMP2 $TMP3
-
- for type in btree recno; do
- cat $TMP1 |
- awk '{
- if (i == 120)
- exit;
- printf("p\nk%d\nd%s\n", ++i, $0);
- }
- END {
- printf("fR_NEXT\n");
- for (i = 1; i <= 120; ++i)
- printf("s\n");
- printf("fR_CURSOR\ns\nk120\n");
- printf("r\n");
- printf("fR_NEXT\ns\n");
- printf("fR_CURSOR\ns\nk1\n");
- printf("r\n");
- printf("fR_FIRST\ns\n");
- }' > $TMP2
- $PROG -o $TMP3 recno $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test7: type $type: failed"
- exit 1
- fi
- done
-}
-
-# Make sure that overflow pages are reused.
-test8()
-{
- echo "Test 8: btree, hash: repeated small key, big data pairs"
- rm -f $TMP1
- echo "" |
- awk 'BEGIN {
- for (i = 1; i <= 10; ++i) {
- printf("p\nkkey1\nD/bin/sh\n");
- printf("p\nkkey2\nD/bin/csh\n");
- if (i % 8 == 0) {
- printf("c\nkkey2\nD/bin/csh\n");
- printf("c\nkkey1\nD/bin/sh\n");
- printf("e\t%d of 10 (comparison)\n", i);
- } else
- printf("e\t%d of 10 \n", i);
- printf("r\nkkey1\nr\nkkey2\n");
- }
- }' > $TMP1
- $PROG btree $TMP1
-# $PROG hash $TMP1
- # No explicit test for success.
-}
-
-# Test btree duplicate keys
-test9()
-{
- echo "Test 9: btree: duplicate keys"
- echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" |
- awk '{
- for (i = 1; i <= 543; ++i)
- printf("%05d: input key %d: %s\n", i, i, $0);
- exit;
- }' > $TMP1
- rm -f $TMP2 $TMP3
-
- for type in btree; do
- cat $TMP1 |
- awk '{
- if (i++ % 2)
- printf("p\nkduplicatekey\nd%s\n", $0);
- else
- printf("p\nkunique%dkey\nd%s\n", i, $0);
- }
- END {
- printf("o\n");
- }' > $TMP2
- $PROG -iflags=1 -o $TMP3 $type $TMP2
- sort -o $TMP3 $TMP3
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test9: type $type: failed"
- exit 1
- fi
- done
-}
-
-# Test use of cursor flags without initialization
-test10()
-{
- echo "Test 10: btree, recno: test cursor flag use"
- echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" |
- awk '{
- for (i = 1; i <= 20; ++i)
- printf("%05d: input key %d: %s\n", i, i, $0);
- exit;
- }' > $TMP1
- rm -f $TMP2 $TMP3
-
- # Test that R_CURSOR doesn't succeed before cursor initialized
- for type in btree recno; do
- cat $TMP1 |
- awk '{
- if (i == 10)
- exit;
- printf("p\nk%d\nd%s\n", ++i, $0);
- }
- END {
- printf("fR_CURSOR\nr\n");
- printf("eR_CURSOR SHOULD HAVE FAILED\n");
- }' > $TMP2
- $PROG -o $TMP3 $type $TMP2 > /dev/null 2>&1
- if [ -s $TMP3 ] ; then
- echo "Test 10: delete: R_CURSOR SHOULD HAVE FAILED"
- exit 1
- fi
- done
- for type in btree recno; do
- cat $TMP1 |
- awk '{
- if (i == 10)
- exit;
- printf("p\nk%d\nd%s\n", ++i, $0);
- }
- END {
- printf("fR_CURSOR\np\nk1\ndsome data\n");
- printf("eR_CURSOR SHOULD HAVE FAILED\n");
- }' > $TMP2
- $PROG -o $TMP3 $type $TMP2 > /dev/null 2>&1
- if [ -s $TMP3 ] ; then
- echo "Test 10: put: R_CURSOR SHOULD HAVE FAILED"
- exit 1
- fi
- done
-}
-
-# Test insert in reverse order.
-test11()
-{
- echo "Test 11: recno: reverse order insert"
- echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" |
- awk '{
- for (i = 1; i <= 779; ++i)
- printf("%05d: input key %d: %s\n", i, i, $0);
- exit;
- }' > $TMP1
- rm -f $TMP2 $TMP3
-
- for type in recno; do
- cat $TMP1 |
- awk '{
- if (i == 0) {
- i = 1;
- printf("p\nk1\nd%s\n", $0);
- printf("%s\n", "fR_IBEFORE");
- } else
- printf("p\nk1\nd%s\n", $0);
- }
- END {
- printf("or\n");
- }' > $TMP2
- $PROG -o $TMP3 $type $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test11: type $type: failed"
- exit 1
- fi
- done
-}
-
-# Take the first 20000 entries in the dictionary, reverse them, and give
-# them each a small size data entry. Use a small page size to make sure
-# the btree split code gets hammered.
-test12()
-{
- echo "Test 12: btree: lots of keys, small page size"
- mdata=abcdefghijklmnopqrstuvwxy
- echo $mdata |
- awk '{ for (i = 1; i < 20001; ++i) print $0 }' > $TMP1
- for type in btree; do
- rm -f $TMP2 $TMP3
- for i in `sed 20000q $DICT | rev`; do
- echo p
- echo k$i
- echo d$mdata
- echo g
- echo k$i
- done > $TMP2
- $PROG -i psize=512 -o $TMP3 $type $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test12: type $type: failed"
- exit 1
- fi
- done
-}
-
-# Test different byte orders.
-test13()
-{
- echo "Test 13: btree, hash: differing byte orders"
- sed 50q $DICT > $TMP1
- for order in 1234 4321; do
- for type in btree hash; do
- rm -f byte.file $TMP2 $TMP3
- for i in `sed 50q $DICT`; do
- echo p
- echo k$i
- echo d$i
- echo g
- echo k$i
- done > $TMP2
- $PROG -ilorder=$order -f byte.file -o $TMP3 $type $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test13: $type/$order put failed"
- exit 1
- fi
- for i in `sed 50q $DICT`; do
- echo g
- echo k$i
- done > $TMP2
- $PROG -s \
- -ilorder=$order -f byte.file -o $TMP3 $type $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test13: $type/$order get failed"
- exit 1
- fi
- done
- done
- rm -f byte.file
-}
-
-# Try a variety of bucketsizes and fill factors for hashing
-test20()
-{
- echo\
- "Test 20: hash: bucketsize, fill factor; nelem 25000 cachesize 65536"
- echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" |
- awk '{
- for (i = 1; i <= 10000; ++i) {
- if (i % 34)
- s = substr($0, 1, i % 34);
- else
- s = substr($0, 1);
- printf("%s\n", s);
- }
- exit;
- }' > $TMP1
- sed 10000q $DICT |
- awk 'BEGIN {
- ds="abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg"
- }
- {
- if (++i % 34)
- s = substr(ds, 1, i % 34);
- else
- s = substr(ds, 1);
- printf("p\nk%s\nd%s\n", $0, s);
- }' > $TMP2
- sed 10000q $DICT |
- awk '{
- ++i;
- printf("g\nk%s\n", $0);
- }' >> $TMP2
- bsize=256
- for ffactor in 11 14 21; do
- echo " bucketsize $bsize, fill factor $ffactor"
- $PROG -o$TMP3 \
- -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\
- hash $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test20: type hash:\
-bsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed"
- exit 1
- fi
- done
- bsize=512
- for ffactor in 21 28 43; do
- echo " bucketsize $bsize, fill factor $ffactor"
- $PROG -o$TMP3 \
- -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\
- hash $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test20: type hash:\
-bsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed"
- exit 1
- fi
- done
- bsize=1024
- for ffactor in 43 57 85; do
- echo " bucketsize $bsize, fill factor $ffactor"
- $PROG -o$TMP3 \
- -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\
- hash $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test20: type hash:\
-bsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed"
- exit 1
- fi
- done
- bsize=2048
- for ffactor in 85 114 171; do
- echo " bucketsize $bsize, fill factor $ffactor"
- $PROG -o$TMP3 \
- -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\
- hash $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test20: type hash:\
-bsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed"
- exit 1
- fi
- done
- bsize=4096
- for ffactor in 171 228 341; do
- echo " bucketsize $bsize, fill factor $ffactor"
- $PROG -o$TMP3 \
- -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\
- hash $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test20: type hash:\
-bsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed"
- exit 1
- fi
- done
- bsize=8192
- for ffactor in 341 455 683; do
- echo " bucketsize $bsize, fill factor $ffactor"
- $PROG -o$TMP3 \
- -ibsize=$bsize,ffactor=$ffactor,nelem=25000,cachesize=65536\
- hash $TMP2
- if (cmp -s $TMP1 $TMP3) ; then :
- else
- echo "test20: type hash:\
-bsize=$bsize ffactor=$ffactor nelem=25000 cachesize=65536 failed"
- exit 1
- fi
- done
-}
-
-main $*
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
deleted file mode 100644
index e0b087f..0000000
--- a/lib/libc/gen/Makefile.inc
+++ /dev/null
@@ -1,129 +0,0 @@
-# @(#)Makefile.inc 8.6 (Berkeley) 5/4/95
-# $Id: Makefile.inc,v 1.40 1997/10/15 16:15:24 bde Exp $
-
-# machine-independent gen sources
-.PATH: ${.CURDIR}/../libc/${MACHINE}/gen ${.CURDIR}/../libc/gen
-
-SRCS+= _rand48.c alarm.c arc4random.c assert.c \
- clock.c closedir.c config.c confstr.c \
- crypt.c ctermid.c daemon.c devname.c disklabel.c \
- drand48.c erand48.c err.c errlst.c \
- exec.c fnmatch.c fstab.c fts.c getbootfile.c getbsize.c \
- getcap.c getcwd.c getdomainname.c getgrent.c getgrouplist.c \
- gethostname.c getloadavg.c getlogin.c getmntinfo.c getnetgrent.c \
- getosreldate.c getpagesize.c getpass.c getpwent.c getttyent.c \
- getusershell.c getvfsbyname.c getvfsent.c glob.c \
- initgroups.c isatty.c jrand48.c lcong48.c \
- lrand48.c mrand48.c msgctl.c \
- msgget.c msgrcv.c msgsnd.c nice.c \
- nlist.c nrand48.c ntp_gettime.c opendir.c \
- pause.c popen.c psignal.c pwcache.c raise.c readdir.c rewinddir.c \
- scandir.c seed48.c seekdir.c semconfig.c semctl.c semget.c semop.c \
- setdomainname.c sethostname.c setjmperr.c setmode.c shmat.c \
- shmctl.c shmdt.c shmget.c siginterrupt.c siglist.c signal.c \
- sigsetops.c sleep.c srand48.c stringlist.c \
- sysconf.c sysctl.c sysctlbyname.c \
- syslog.c telldir.c termios.c time.c times.c timezone.c ttyname.c \
- ttyslot.c ualarm.c uname.c unvis.c usleep.c utime.c valloc.c vis.c \
- wait.c wait3.c waitpid.c
-
-# machine-dependent gen sources
-.include "${.CURDIR}/../libc/${MACHINE}/gen/Makefile.inc"
-
-.if defined(BINFORMAT) && ${BINFORMAT} == elf
-CFLAGS+=-D_NLIST_DO_ELF
-.endif
-
-.if (${MACHINE} == "tahoe" || ${MACHINE} == "vax")
-errlst.o errlst.po:
- ${CC} -S ${CFLAGS} ${.IMPSRC}
- ed - < ${.CURDIR}/../libc/${MACHINE}/:errfix errlst.s
- ${AS} -o ${.TARGET} errlst.s
- rm -f errlst.s
-.endif
-
-.if ${LIB} == "c"
-MAN3+= alarm.3 arc4random.3 clock.3 config_open.3 \
- confstr.3 crypt.3 ctermid.3 daemon.3 \
- devname.3 directory.3 err.3 exec.3 fnmatch.3 frexp.3 fts.3 \
- getbootfile.3 getbsize.3 getcap.3 getcwd.3 \
- getdiskbyname.3 getdomainname.3 getfsent.3 \
- getgrent.3 getgrouplist.3 gethostname.3 getloadavg.3 \
- getmntinfo.3 getnetgrent.3 getpagesize.3 getpass.3 getpwent.3 \
- getttyent.3 getusershell.3 getvfsbyname.3 getvfsent.3 \
- glob.3 initgroups.3 isinf.3 \
- ldexp.3 modf.3 msgctl.3 msgget.3 msgrcv.3 msgsnd.3 \
- nice.3 nlist.3 pause.3 popen.3 psignal.3 pwcache.3 \
- raise.3 rand48.3 scandir.3 setjmp.3 setmode.3 siginterrupt.3 \
- signal.3 sigsetops.3 sleep.3 stringlist.3 \
- sysconf.3 sysctl.3 syslog.3 tcgetpgrp.3 \
- tcsendbreak.3 tcsetattr.3 tcsetpgrp.3 time.3 times.3 timezone.3 \
- ttyname.3 tzset.3 ualarm.3 uname.3 unvis.3 usleep.3 utime.3 \
- valloc.3 vis.3
-
-MLINKS+=arc4random.3 arc4random_addrandom.3 arc4random.3 arc4random_stir.3
-MLINKS+=config_open.3 config_close.3 config_open.3 config_next.3 \
- config_open.3 config_skip.3
-MLINKS+=crypt.3 des_cipher.3 crypt.3 des_setkey.3 crypt.3 encrypt.3 \
- crypt.3 setkey.3
-MLINKS+=directory.3 closedir.3 directory.3 dirfd.3 directory.3 opendir.3 \
- directory.3 readdir.3 directory.3 rewinddir.3 directory.3 seekdir.3 \
- directory.3 telldir.3
-MLINKS+=exec.3 execl.3 exec.3 execle.3 exec.3 execlp.3 exec.3 exect.3 \
- exec.3 execv.3 exec.3 execvp.3
-MLINKS+=err.3 err_set_exit.3 err.3 err_set_file.3 err.3 errx.3 err.3 verr.3 \
- err.3 verrx.3 err.3 vwarn.3 err.3 vwarnx.3 err.3 warn.3 err.3 warnx.3
-MLINKS+=isinf.3 isnan.3
-MLINKS+=getcap.3 cgetcap.3 getcap.3 cgetclose.3 getcap.3 cgetent.3 \
- getcap.3 cgetfirst.3 getcap.3 cgetmatch.3 getcap.3 cgetnext.3 \
- getcap.3 cgetnum.3 getcap.3 cgetset.3 getcap.3 cgetstr.3 \
- getcap.3 cgetustr.3
-MLINKS+=getcwd.3 getwd.3
-MLINKS+=getdomainname.3 setdomainname.3
-MLINKS+=getfsent.3 endfsent.3 getfsent.3 getfsfile.3 getfsent.3 getfsspec.3 \
- getfsent.3 getfstype.3 getfsent.3 setfsent.3
-MLINKS+=getgrent.3 endgrent.3 getgrent.3 getgrgid.3 getgrent.3 getgrnam.3 \
- getgrent.3 setgrent.3 getgrent.3 setgroupent.3
-MLINKS+=gethostname.3 sethostname.3
-MLINKS+=getnetgrent.3 endnetgrent.3 getnetgrent.3 innetgr.3 \
- getnetgrent.3 setnetgrent.3
-MLINKS+=getpwent.3 endpwent.3 getpwent.3 getpwnam.3 getpwent.3 getpwuid.3 \
- getpwent.3 setpassent.3 getpwent.3 setpwent.3 getpwent.3 setpwfile.3
-MLINKS+=getttyent.3 endttyent.3 getttyent.3 getttynam.3 \
- getttyent.3 isdialuptty.3 getttyent.3 isnetworktty.3 \
- getttyent.3 setttyent.3
-MLINKS+=getvfsent.3 endvfsent.3 getvfsent.3 getvfsbytype.3 \
- getvfsent.3 setvfsent.3 getvfsent.3 vfsisloadable.3 \
- getvfsent.3 vfsload.3
-MLINKS+=getusershell.3 endusershell.3 getusershell.3 setusershell.3
-MLINKS+=glob.3 globfree.3
-MLINKS+=popen.3 pclose.3
-MLINKS+=psignal.3 sys_siglist.3 psignal.3 sys_signame.3
-MLINKS+=pwcache.3 group_from_gid.3 pwcache.3 user_from_uid.3
-MLINKS+=rand48.3 _rand48.3 rand48.3 drand48.3 rand48.3 erand48.3 \
- rand48.3 jrand48.3 rand48.3 lcong48.3 rand48.3 lrand48.3 \
- rand48.3 mrand48.3 rand48.3 nrand48.3 rand48.3 seed48.3 \
- rand48.3 srand48.3
-MLINKS+=scandir.3 alphasort.3
-MLINKS+=setjmp.3 _longjmp.3 setjmp.3 _setjmp.3 setjmp.3 longjmp.3 \
- setjmp.3 longjmperr.3 setjmp.3 longjmperror.3 \
- setjmp.3 sigsetjmp.3 setjmp.3 siglongjmp.3
-MLINKS+=setmode.3 getmode.3
-MLINKS+=sigsetops.3 sigaddset.3 sigsetops.3 sigdelset.3 \
- sigsetops.3 sigemptyset.3 sigsetops.3 sigfillset.3 \
- sigsetops.3 sigismember.3
-MLINKS+=sysctl.3 sysctlbyname.3
-MLINKS+=syslog.3 closelog.3 syslog.3 openlog.3 syslog.3 setlogmask.3 \
- syslog.3 vsyslog.3
-MLINKS+=tcsendbreak.3 tcdrain.3 tcsendbreak.3 tcflush.3 tcsendbreak.3 tcflow.3
-MLINKS+=tcsetattr.3 tcgetattr.3 tcsetattr.3 cfgetispeed.3 \
- tcsetattr.3 cfgetospeed.3 tcsetattr.3 cfmakeraw.3 \
- tcsetattr.3 cfsetispeed.3 tcsetattr.3 cfsetospeed.3 \
- tcsetattr.3 cfsetspeed.3
-MLINKS+=ttyname.3 isatty.3 ttyname.3 ttyslot.3
-MLINKS+=tzset.3 tzsetwall.3
-MLINKS+=vis.3 strvis.3 vis.3 strvisx.3
-MLINKS+=unvis.3 strunvis.3
-MLINKS+=fts.3 fts_children.3 fts.3 fts_close.3 fts.3 fts_open.3 \
- fts.3 fts_read.3 fts.3 fts_set.3
-.endif
diff --git a/lib/libc/gen/__xuname.c b/lib/libc/gen/__xuname.c
deleted file mode 100644
index 25431d4..0000000
--- a/lib/libc/gen/__xuname.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*-
- * Copyright (c) 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char sccsid[] = "From: @(#)uname.c 8.1 (Berkeley) 1/4/94";*/
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-#include <sys/utsname.h>
-#include <errno.h>
-
-int
-uname(name)
- struct utsname *name;
-{
- int mib[2], rval;
- size_t len;
- char *p;
- int oerrno;
-
- rval = 0;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_OSTYPE;
- len = sizeof(name->sysname);
- oerrno = errno;
- if (sysctl(mib, 2, &name->sysname, &len, NULL, 0) == -1) {
- if(errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->sysname[sizeof(name->sysname) - 1] = '\0';
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_HOSTNAME;
- len = sizeof(name->nodename);
- oerrno = errno;
- if (sysctl(mib, 2, &name->nodename, &len, NULL, 0) == -1) {
- if(errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->nodename[sizeof(name->nodename) - 1] = '\0';
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_OSRELEASE;
- len = sizeof(name->release);
- oerrno = errno;
- if (sysctl(mib, 2, &name->release, &len, NULL, 0) == -1) {
- if(errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->release[sizeof(name->release) - 1] = '\0';
-
- /* The version may have newlines in it, turn them into spaces. */
- mib[0] = CTL_KERN;
- mib[1] = KERN_VERSION;
- len = sizeof(name->version);
- oerrno = errno;
- if (sysctl(mib, 2, &name->version, &len, NULL, 0) == -1) {
- if (errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->version[sizeof(name->version) - 1] = '\0';
- for (p = name->version; len--; ++p) {
- if (*p == '\n' || *p == '\t') {
- if (len > 1)
- *p = ' ';
- else
- *p = '\0';
- }
- }
-
- mib[0] = CTL_HW;
- mib[1] = HW_MACHINE;
- len = sizeof(name->machine);
- oerrno = errno;
- if (sysctl(mib, 2, &name->machine, &len, NULL, 0) == -1) {
- if (errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->machine[sizeof(name->machine) - 1] = '\0';
- return (rval);
-}
diff --git a/lib/libc/gen/_rand48.c b/lib/libc/gen/_rand48.c
deleted file mode 100644
index 990e2c8..0000000
--- a/lib/libc/gen/_rand48.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-unsigned short _rand48_seed[3] = {
- RAND48_SEED_0,
- RAND48_SEED_1,
- RAND48_SEED_2
-};
-unsigned short _rand48_mult[3] = {
- RAND48_MULT_0,
- RAND48_MULT_1,
- RAND48_MULT_2
-};
-unsigned short _rand48_add = RAND48_ADD;
-
-void
-_dorand48(unsigned short xseed[3])
-{
- unsigned long accu;
- unsigned short temp[2];
-
- accu = (unsigned long) _rand48_mult[0] * (unsigned long) xseed[0] +
- (unsigned long) _rand48_add;
- temp[0] = (unsigned short) accu; /* lower 16 bits */
- accu >>= sizeof(unsigned short) * 8;
- accu += (unsigned long) _rand48_mult[0] * (unsigned long) xseed[1] +
- (unsigned long) _rand48_mult[1] * (unsigned long) xseed[0];
- temp[1] = (unsigned short) accu; /* middle 16 bits */
- accu >>= sizeof(unsigned short) * 8;
- accu += _rand48_mult[0] * xseed[2] + _rand48_mult[1] * xseed[1] + _rand48_mult[2] * xseed[0];
- xseed[0] = temp[0];
- xseed[1] = temp[1];
- xseed[2] = (unsigned short) accu;
-}
diff --git a/lib/libc/gen/alarm.3 b/lib/libc/gen/alarm.3
deleted file mode 100644
index 5e47a15..0000000
--- a/lib/libc/gen/alarm.3
+++ /dev/null
@@ -1,95 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)alarm.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt ALARM 3
-.Os BSD 4
-.Sh NAME
-.Nm alarm
-.Nd set signal timer alarm
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft unsigned int
-.Fn alarm "unsigned int seconds"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is made obsolete by setitimer(2).
-.Ef
-.Pp
-The
-.Fn alarm
-function sets a timer to deliver the signal
-.Dv SIGALRM
-to the calling process after the specified number of
-.Fa seconds .
-If an alarm has already been set with
-.Fn alarm
-but has not been delivered, another call to
-.Fn alarm
-will supersede the prior call.
-The request
-.Fn alarm "0"
-voids the current
-alarm and the signal SIGALRM will not be delivered.
-.Pp
-Due to
-.Xr setitimer 2
-restriction the maximum number of
-.Ar seconds
-allowed is 100000000.
-.Sh RETURN VALUES
-.Pp
-The return value of
-.Fn alarm
-is the amount of time left on the timer from a previous call to
-.Fn alarm .
-If no alarm is currently set, the return value is 0.
-.Sh SEE ALSO
-.Xr setitimer 2 ,
-.Xr sigaction 2 ,
-.Xr sigpause 2 ,
-.Xr sigvec 2 ,
-.Xr signal 3 ,
-.Xr sleep 3 ,
-.Xr ualarm 3 ,
-.Xr usleep 3
-.\" .Sh STANDARDS
-.\" The
-.\" .Fn alarm
-.\" function conforms to
-.\" .St -p1003.1-90 .
-.Sh HISTORY
-An
-.Fn alarm
-function appeared in
-.At v7 .
diff --git a/lib/libc/gen/alarm.c b/lib/libc/gen/alarm.c
deleted file mode 100644
index 7a7dc68..0000000
--- a/lib/libc/gen/alarm.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)alarm.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Backwards compatible alarm.
- */
-#include <sys/time.h>
-#include <unistd.h>
-
-unsigned int
-alarm(secs)
- unsigned int secs;
-{
- struct itimerval it, oitv;
- register struct itimerval *itp = &it;
-
- timerclear(&itp->it_interval);
- itp->it_value.tv_sec = secs;
- itp->it_value.tv_usec = 0;
- if (setitimer(ITIMER_REAL, itp, &oitv) < 0)
- return (-1);
- if (oitv.it_value.tv_usec)
- oitv.it_value.tv_sec++;
- return (oitv.it_value.tv_sec);
-}
diff --git a/lib/libc/gen/arc4random.3 b/lib/libc/gen/arc4random.3
deleted file mode 100644
index 25c6d4d..0000000
--- a/lib/libc/gen/arc4random.3
+++ /dev/null
@@ -1,83 +0,0 @@
-.\" $OpenBSD: arc4random.3,v 1.2 1997/04/27 22:40:25 angelos Exp $
-.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Niels Provos.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" Manual page, using -mandoc macros
-.\"
-.Dd April 15, 1997
-.Dt ARC4RANDOM 3
-.Os
-.Sh NAME
-.Nm arc4random,
-.Nm arc4random_stir,
-.Nm arc4random_addrandom
-.Nd arc4 random number generator.
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft u_int32_t
-.Fn arc4random "void"
-.Ft void
-.Fn arc4random_stir "void"
-.Ft void
-.Fn arc4random_addrandom "unsigned char *dat" "int datlen"
-.Sh DESCRIPTION
-The
-.Fn arc4random
-function uses the key stream generator employed by the
-arc4 cipher, which uses 8*8 8 bit S-Boxes. The S-Boxes
-can be in about
-.if t 2\u\s71700\s10\d
-.if n (2**1700)
-states.
-.Pp
-The
-.Fn arc4random_stir
-function reads data from
-.Pa /dev/urandom
-and uses it to permutate the S-Boxes via
-.Fn arc4random_addrandom .
-.Pp
-There is no need to call
-.Fn arc4random_stir
-before using
-.Fn arc4random ,
-since
-.Fn arc4random
-automatically initalizes itself.
-.Sh SEE ALSO
-.Xr rand 3 ,
-.Xr random 3 ,
-.Xr srandomdev 3
-.Sh HISTORY
-.Pa RC4
-has been designed by RSA Data Security, Inc. It was posted anonymously
-to the USENET and was confirmed to be equivalent by several sources who
-had access to the original cipher. Since
-.Pa RC4
-used to be a trade secret, the cipher is now refered to as
-.Pa ARC4 .
diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c
deleted file mode 100644
index b9f8a48..0000000
--- a/lib/libc/gen/arc4random.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/* $Id: arc4random.c,v 1.1 1996/12/28 06:33:01 dm Exp $ */
-
-/*
- * Arc4 random number generator for OpenBSD.
- * Copyright 1996 David Mazieres <dm@lcs.mit.edu>.
- *
- * Modification and redistribution in source and binary forms is
- * permitted provided that due credit is given to the author and the
- * OpenBSD project (for instance by leaving this copyright notice
- * intact).
- */
-
-/*
- * This code is derived from section 17.1 of Applied Cryptography,
- * second edition, which describes a stream cipher allegedly
- * compatible with RSA Labs "RC4" cipher (the actual description of
- * which is a trade secret). The same algorithm is used as a stream
- * cipher called "arcfour" in Tatu Ylonen's ssh package.
- *
- * Here the stream cipher has been modified always to include the time
- * when initializing the state. That makes it impossible to
- * regenerate the same random sequence twice, so this can't be used
- * for encryption, but will generate good random numbers.
- *
- * RC4 is a registered trademark of RSA Laboratories.
- */
-
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-struct arc4_stream {
- u_int8_t i;
- u_int8_t j;
- u_int8_t s[256];
-};
-
-static int rs_initialized;
-static struct arc4_stream rs;
-
-static inline void
-arc4_init(as)
- struct arc4_stream *as;
-{
- int n;
-
- for (n = 0; n < 256; n++)
- as->s[n] = n;
- as->i = 0;
- as->j = 0;
-}
-
-static inline void
-arc4_addrandom(as, dat, datlen)
- struct arc4_stream *as;
- u_char *dat;
- int datlen;
-{
- int n;
- u_int8_t si;
-
- as->i--;
- for (n = 0; n < 256; n++) {
- as->i = (as->i + 1);
- si = as->s[as->i];
- as->j = (as->j + si + dat[n % datlen]);
- as->s[as->i] = as->s[as->j];
- as->s[as->j] = si;
- }
-}
-
-static void
-arc4_stir(as)
- struct arc4_stream *as;
-{
- int fd;
- struct {
- struct timeval tv;
- pid_t pid;
- u_int8_t rnd[128 - sizeof(struct timeval) - sizeof(pid_t)];
- } rdat;
-
- gettimeofday(&rdat.tv, NULL);
- rdat.pid = getpid();
- fd = open("/dev/urandom", O_RDONLY, 0);
- if (fd >= 0) {
- (void) read(fd, rdat.rnd, sizeof(rdat.rnd));
- close(fd);
- }
- /* fd < 0? Ah, what the heck. We'll just take whatever was on the
- * stack... */
-
- arc4_addrandom(as, (void *) &rdat, sizeof(rdat));
-}
-
-static inline u_int8_t
-arc4_getbyte(as)
- struct arc4_stream *as;
-{
- u_int8_t si, sj;
-
- as->i = (as->i + 1);
- si = as->s[as->i];
- as->j = (as->j + si);
- sj = as->s[as->j];
- as->s[as->i] = sj;
- as->s[as->j] = si;
- return (as->s[(si + sj) & 0xff]);
-}
-
-static inline u_int32_t
-arc4_getword(as)
- struct arc4_stream *as;
-{
- u_int32_t val;
- val = arc4_getbyte(as) << 24;
- val |= arc4_getbyte(as) << 16;
- val |= arc4_getbyte(as) << 8;
- val |= arc4_getbyte(as);
- return val;
-}
-
-void
-arc4random_stir()
-{
- if (!rs_initialized) {
- arc4_init(&rs);
- rs_initialized = 1;
- }
- arc4_stir(&rs);
-}
-
-void
-arc4random_addrandom(dat, datlen)
- u_char *dat;
- int datlen;
-{
- if (!rs_initialized)
- arc4random_stir();
- arc4_addrandom(&rs, dat, datlen);
-}
-
-u_int32_t
-arc4random()
-{
- if (!rs_initialized)
- arc4random_stir();
- return arc4_getword(&rs);
-}
-
-#if 0
-/*-------- Test code for i386 --------*/
-#include <stdio.h>
-#include <machine/pctr.h>
-int
-main(int argc, char **argv)
-{
- const int iter = 1000000;
- int i;
- pctrval v;
-
- v = rdtsc();
- for (i = 0; i < iter; i++)
- arc4random();
- v = rdtsc() - v;
- v /= iter;
-
- printf("%qd cycles\n", v);
-}
-#endif
diff --git a/lib/libc/gen/assert.c b/lib/libc/gen/assert.c
deleted file mode 100644
index eb2748c..0000000
--- a/lib/libc/gen/assert.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)assert.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-void
-__assert(file, line, failedexpr)
- const char *file, *failedexpr;
- int line;
-{
- (void)fprintf(stderr,
- "assertion \"%s\" failed: file \"%s\", line %d\n",
- failedexpr, file, line);
- abort();
- /* NOTREACHED */
-}
diff --git a/lib/libc/gen/clock.3 b/lib/libc/gen/clock.3
deleted file mode 100644
index 0e5ad06..0000000
--- a/lib/libc/gen/clock.3
+++ /dev/null
@@ -1,68 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)clock.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt CLOCK 3
-.Os
-.Sh NAME
-.Nm clock
-.Nd determine processor time used
-.Sh SYNOPSIS
-.Fd #include <time.h>
-.Ft clock_t
-.Fn clock void
-.Sh DESCRIPTION
-The
-.Fn clock
-function
-determines the amount of processor time used since the invocation of the
-calling process, measured in
-.Dv CLOCKS_PER_SEC Ns 's
-of a second.
-.Sh RETURN VALUES
-The
-.Fn clock
-function returns the amount of time used unless an error occurs, in which
-case the return value is \-1.
-.Sh SEE ALSO
-.Xr getrusage 2 ,
-.Xr clocks 7
-.Sh STANDARDS
-The
-.Fn clock
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/gen/clock.c b/lib/libc/gen/clock.c
deleted file mode 100644
index fe867c2..0000000
--- a/lib/libc/gen/clock.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)clock.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-/*
- * Convert usec to clock ticks; could do (usec * CLOCKS_PER_SEC) / 1000000,
- * but this would overflow if we switch to nanosec.
- */
-#define CONVTCK(r) ((r).tv_sec * CLOCKS_PER_SEC \
- + (r).tv_usec / (1000000 / CLOCKS_PER_SEC))
-
-clock_t
-clock()
-{
- struct rusage ru;
-
- if (getrusage(RUSAGE_SELF, &ru))
- return ((clock_t) -1);
- return((clock_t)((CONVTCK(ru.ru_utime) + CONVTCK(ru.ru_stime))));
-}
diff --git a/lib/libc/gen/closedir.c b/lib/libc/gen/closedir.c
deleted file mode 100644
index 6c46e70..0000000
--- a/lib/libc/gen/closedir.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)closedir.c 8.1 (Berkeley) 6/10/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-extern void _reclaim_telldir __P(( const DIR * ));
-
-/*
- * close a directory.
- */
-int
-closedir(dirp)
- register DIR *dirp;
-{
- int fd;
-
- seekdir(dirp, dirp->dd_rewind); /* free seekdir storage */
- fd = dirp->dd_fd;
- dirp->dd_fd = -1;
- dirp->dd_loc = 0;
- free((void *)dirp->dd_buf);
- free((void *)dirp);
- _reclaim_telldir(dirp);
- return(close(fd));
-}
diff --git a/lib/libc/gen/config.c b/lib/libc/gen/config.c
deleted file mode 100644
index 2d1ed44..0000000
--- a/lib/libc/gen/config.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * This file contains four procedures used to read config-files.
- *
- * char * config_open(const char *filename,int contlines)
- * Will open the named file, read it into a private malloc'ed area,
- * and close the file again.
- * All lines where the first !isspace() char is '#' are deleted.
- * If contlines are non-zero lines where the first char is isspace()
- * will be joined to the preceeding line.
- * In case of trouble the name of the offending system call will be
- * returned. On success NULL is returned.
- *
- * void config_close()
- * This will free the internal malloc'ed area.
- *
- * char * config_next()
- * This will return a pointer to the next entry in the area. NULL is
- * returned at "end of file". The return value is '\0' terminated, and
- * can be modified, but the contents must be copied somewhere else for
- * permanent use.
- *
- * char * config_skip(char **p)
- * This will pick out the next word from the string. The return-value
- * points to the word found, and *p is advanced past the word. NULL is
- * returned at "end of string".
- *
- * Many programs have a n*100 bytes config-file and N*1000 bytes of source
- * to read it. Doing pointer-aerobics on files that small is a waste of
- * time, and bashing around with getchar/ungetc isn't much better. These
- * routines implement a simple algorithm and syntax.
- *
- * config_skip consider a contiguous string of !isspace() chars a word.
- *
- * 13nov1994 Poul-Henning Kamp phk@login.dknet.dk
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <string.h>
-
-static char *file_buf;
-static char *ptr;
-
-char *
-config_open(const char *filename, int contlines)
-{
- int fd;
- struct stat st;
- char *p, *q;
-
- if ((fd = open(filename, O_RDONLY)) < 0)
- return "open";
- if (fstat(fd, &st) < 0) {
- close(fd);
- return "fstat";
- }
- if (file_buf)
- free(file_buf);
- file_buf = malloc(st.st_size + 2);
- if (!file_buf) {
- close(fd);
- return "malloc";
- }
- if (st.st_size != read(fd, file_buf, st.st_size)) {
- free(file_buf);
- file_buf = (char *) 0;
- close(fd);
- return "read";
- }
- close(fd);
- file_buf[st.st_size] = '\n';
- file_buf[st.st_size + 1] = '\0';
-
- /*
- * /^[ \t]*#[^\n]*$/d
- *
- * Delete all lines where the first !isspace() char is '#'
- */
-
- ptr = file_buf;
- for (p = ptr; *p;) {
- for (q = p; *q != '\n' && isspace(*q); q++)
- continue;
- if (*q == '#') {
- p = strchr(p, '\n');
- if (p)
- p++;
- } else {
- q = strchr(p, '\n');
- q++;
- memcpy(ptr, p, q - p);
- ptr += q - p;
- p = q;
- }
- }
- *ptr = '\0';
- ptr = file_buf;
-
- if (!contlines)
- return 0;
-
- /* Join all lines starting with a isspace() char to the preceeding
- * line */
-
- for (p = ptr; *p;) {
- q = strchr(p, '\n');
- if (isspace(*(q + 1)))
- *q = ' ';
- p = q + 1;
- }
-
- return 0;
-}
-
-void
-config_close(void)
-{
- if (file_buf)
- free(file_buf);
- ptr = file_buf = 0;
-}
-
-/*
- * Get next entry. config_open did all the weird stuff, so just return
- * the next line.
- */
-
-char *
-config_next(void)
-{
- char *p;
-
- /* We might be done already ! */
- if (!ptr || !*ptr)
- return 0;
-
- while (isspace(*ptr))
- ptr++;
- p = ptr;
- ptr = strchr(p, '\n');
- if (ptr) {
- *ptr = '\0';
- ptr++;
- }
- return p;
-}
-
-/*
- * Return next word
- */
-
-char *
-config_skip(char **p)
-{
- char *q, *r;
-
- if (!*p || !**p)
- return 0;
- for (q = *p; isspace(*q); q++);
- if (!*q)
- return 0;
- for (r = q; *r && !isspace(*r); r++);
- if (*r)
- *r++ = '\0';
- *p = r;
- return q;
-}
diff --git a/lib/libc/gen/config_open.3 b/lib/libc/gen/config_open.3
deleted file mode 100644
index a2ef707..0000000
--- a/lib/libc/gen/config_open.3
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" ----------------------------------------------------------------------------
-.\" "THE BEER-WARE LICENSE" (Revision 42):
-.\" <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
-.\" can do whatever you want with this stuff. If we meet some day, and you think
-.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
-.\" ----------------------------------------------------------------------------
-.\"
-.\" $Id$
-.\"
-.Dd November 13, 1994
-.Dt config_open 3
-.Os FreeBSD
-.Sh NAME
-.Nm config_open ,
-.Nm config_close ,
-.Nm config_next ,
-.Nm config_skip
-.Nd read config files
-.Sh SYNOPSIS
-.Ft char *
-.Fn config_open "const char *filename" "int contlines"
-.Ft void
-.Fn config_close
-.Ft char *
-.Fn config_next
-.Ft char *
-.Fn config_skip "char **string"
-.Sh DESCRIPTION
-These functions are used to read config files with the following syntax:
-.Bl -bullet -compact
-.It
-All lines where the first
-.Sq !isspace()
-is '#' are comments which are discarded.
-.It
-If continuation-lines are enabled, any line starting with a
-.Sq isspace()
-character is joined to the preceding line and blank lines are discarded.
-.It
-An entry starts at the first
-.Sq !isspace()
-character and ends at the first
-.Sq Li \en
-.Li .
-.El
-.Pp
-.Fn config_open
-will open the specified
-.Fa filename
-and read it into a private malloced area, and close the file again. If
-.Fa contlines
-is non-zero, continuation lines will be allowed.
-In case of trouble, the name of the system-call causing the trouble will
-be returned. If successful,
-.Fn config_open
-returns NULL.
-.Pp
-.Fn config_close
-will free the malloced area.
-.Pp
-.Fn config_next
-returns the next entry in the area. NULL is returned to indicate End-of-file.
-The returned string is null-terminated.
-.Pp
-.Fn config_skip
-returns the next word from the string
-.Fa *string
-.Li .
-.Fa *string
-will be advanced to point to the next word.
-NULL is returned to indicate the end of the string.
-.Sh AUTHOR
-Poul-Henning Kamp <phk@login.dknet.dk>
diff --git a/lib/libc/gen/confstr.3 b/lib/libc/gen/confstr.3
deleted file mode 100644
index 90115e3..0000000
--- a/lib/libc/gen/confstr.3
+++ /dev/null
@@ -1,125 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)confstr.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt CONFSTR 3
-.Os BSD 4
-.Sh NAME
-.Nm confstr
-.Nd get string-valued configurable variables
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft size_t
-.Fn confstr "int name" "char *buf" "size_t len"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is obsoleted by
-.Xr sysctl 3 .
-.Ef
-.Pp
-The
-.Fn confstr
-function provides a method for applications to get configuration
-defined string values.
-.Pp
-The
-.Fa name
-argument specifies the system variable to be queried.
-Symbolic constants for each name value are found in the include file
-.Li <unistd.h> .
-The
-.Fa len
-argument specifies the size of the buffer referenced by the
-argument
-.Fa buf .
-If
-.Fa len
-is non-zero,
-.Fa buf
-is a non-null pointer, and
-.Fa name
-has a value, up to
-.Fa len
-\- 1 bytes of the value are copied into the buffer
-.Fa buf .
-The copied value is always null terminated.
-.Pp
-The available values are as follows:
-.Pp
-.Bl -tag -width "123456"
-.Pp
-.It Li _CS_PATH
-Return a value for the
-.Ev PATH
-environment variable that finds all the standard utilities.
-.El
-.Sh RETURN VALUES
-If the call to
-.Fn confstr
-is not successful, \-1 is returned and
-.Va errno
-is set appropriately.
-Otherwise, if the variable does not have a configuration defined value,
-0 is returned and
-.Va errno
-is not modified.
-Otherwise, the buffer size needed to hold the entire configuration-defined
-value is returned.
-If this size is greater than the argument
-.Fa len ,
-the string in
-.Fa buf
-was truncated.
-.Sh ERRORS
-The
-.Fn confstr
-function may fail and set
-.Va error
-for any of the errors specified for the library functions
-.Xr malloc 3
-and
-.Xr sysctl 3 .
-.Pp
-In addition, the following errors may be reported:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The value of the
-.Fa name
-argument is invalid.
-.Sh SEE ALSO
-.Xr sysctl 3
-.Sh HISTORY
-The
-.Fn confstr
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/confstr.c b/lib/libc/gen/confstr.c
deleted file mode 100644
index 0a7078e..0000000
--- a/lib/libc/gen/confstr.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)confstr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-#include <errno.h>
-#include <paths.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-size_t
-confstr(name, buf, len)
- int name;
- char *buf;
- size_t len;
-{
- size_t tlen;
- int mib[2], sverrno;
- char *p;
-
- switch (name) {
- case _CS_PATH:
- mib[0] = CTL_USER;
- mib[1] = USER_CS_PATH;
- if (sysctl(mib, 2, NULL, &tlen, NULL, 0) == -1)
- return (-1);
- if (len != 0 && buf != NULL) {
- if ((p = malloc(tlen)) == NULL)
- return (-1);
- if (sysctl(mib, 2, p, &tlen, NULL, 0) == -1) {
- sverrno = errno;
- free(p);
- errno = sverrno;
- return (-1);
- }
- /*
- * POSIX 1003.2 requires partial return of
- * the string -- that should be *real* useful.
- */
- (void)strncpy(buf, p, len - 1);
- buf[len - 1] = '\0';
- free(p);
- }
- return (tlen + 1);
- default:
- errno = EINVAL;
- return (0);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/gen/crypt.3 b/lib/libc/gen/crypt.3
deleted file mode 100644
index 0f97a70..0000000
--- a/lib/libc/gen/crypt.3
+++ /dev/null
@@ -1,296 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)crypt.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt CRYPT 3
-.Os
-.Sh NAME
-.Nm crypt ,
-.Nm setkey ,
-.Nm encrypt ,
-.Nm des_setkey ,
-.Nm des_cipher
-.Nd DES encryption
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft char *
-.Fn crypt "const char *key" "const char *setting"
-.Ft int
-.Fn setkey "const char *key"
-.Ft int
-.Fn encrypt "char *block" "int flag"
-.Ft int
-.Fn des_setkey "const char *key"
-.Ft int
-.Fn des_cipher "const char *in" "char *out" "long salt" "int count"
-.Sh DESCRIPTION
-The
-.Fn crypt
-function
-performs password encryption.
-It is derived from the
-.Tn NBS
-Data Encryption Standard.
-Additional code has been added to deter
-key search attempts.
-The first argument to
-.Nm crypt
-is
-a
-.Dv NUL Ns -terminated
-string (normally a password typed by a user).
-The second is a character array, 9 bytes in length, consisting of an
-underscore (``_'') followed by 4 bytes of iteration count and 4 bytes
-of salt.
-Both the iteration
-.Fa count
-and the
-.Fa salt
-are encoded with 6 bits per character, least significant bits first.
-The values 0 to 63 are encoded by the characters ``./0-9A-Za-z'',
-respectively.
-.Pp
-The
-.Fa salt
-is used to induce disorder in to the
-.Tn DES
-algorithm
-in one of 16777216
-possible ways
-(specifically, if bit
-.Em i
-of the
-.Ar salt
-is set then bits
-.Em i
-and
-.Em i+24
-are swapped in the
-.Tn DES
-``E'' box output).
-The
-.Ar key
-is divided into groups of 8 characters (a short final group is null-padded)
-and the low-order 7 bits of each character (56 bits per group) are
-used to form the DES key as follows: the first group of 56 bits becomes the
-initial DES key.
-For each additional group, the XOR of the group bits and the encryption of
-the DES key with itself becomes the next DES key.
-Then the final DES key is used to perform
-.Ar count
-cumulative encryptions of a 64-bit constant.
-The value returned is a
-.Dv NUL Ns -terminated
-string, 20 bytes in length, consisting
-of the
-.Ar setting
-followed by the encoded 64-bit encryption.
-.Pp
-For compatibility with historical versions of
-.Xr crypt 3 ,
-the
-.Ar setting
-may consist of 2 bytes of salt, encoded as above, in which case an
-iteration
-.Ar count
-of 25 is used, fewer perturbations of
-.Tn DES
-are available, at most 8
-characters of
-.Ar key
-are used, and the returned value is a
-.Dv NUL Ns -terminated
-string 13 bytes in length.
-.Pp
-The
-functions,
-.Fn encrypt ,
-.Fn setkey ,
-.Fn des_setkey
-and
-.Fn des_cipher
-allow limited access to the
-.Tn DES
-algorithm itself.
-The
-.Ar key
-argument to
-.Fn setkey
-is a 64 character array of
-binary values (numeric 0 or 1).
-A 56-bit key is derived from this array by dividing the array
-into groups of 8 and ignoring the last bit in each group.
-.Pp
-The
-.Fn encrypt
-argument
-.Fa block
-is also a 64 character array of
-binary values.
-If the value of
-.Fa flag
-is 0,
-the argument
-.Fa block
-is encrypted, otherwise it
-is decrypted.
-The encryption or decryption is returned in the original
-array
-.Fa block
-after using the
-key specified
-by
-.Fn setkey
-to process it.
-.Pp
-The
-.Fn des_setkey
-and
-.Fn des_cipher
-functions are faster but less portable than
-.Fn setkey
-and
-.Fn encrypt .
-The argument to
-.Fn des_setkey
-is a character array of length 8.
-The
-.Em least
-significant bit in each character is ignored and the next 7 bits of each
-character are concatenated to yield a 56-bit key.
-The function
-.Fn des_cipher
-encrypts (or decrypts if
-.Fa count
-is negative) the 64-bits stored in the 8 characters at
-.Fa in
-using
-.Xr abs 3
-of
-.Fa count
-iterations of
-.Tn DES
-and stores the 64-bit result in the 8 characters at
-.Fa out .
-The
-.Fa salt
-specifies perturbations to
-.Tn DES
-as described above.
-.Pp
-The function
-.Fn crypt
-returns a pointer to the encrypted value on success and NULL on failure.
-The functions
-.Fn setkey ,
-.Fn encrypt ,
-.Fn des_setkey ,
-and
-.Fn des_cipher
-return 0 on success and 1 on failure.
-Historically, the functions
-.Fn setkey
-and
-.Fn encrypt
-did not return any value.
-They have been provided return values primarily to distinguish
-implementations where hardware support is provided but not
-available or where the DES encryption is not available due to the
-usual political silliness.
-.Pp
-Use of
-.Fn crypt
-requires linking with the
-.Nm libcrypt
-library. The
-.Fn setkey ,
-.Fn encrypt ,
-.Fn des_setkey
-and
-.Fn des_cipher
-can be found in the
-.Nm libcipher
-library (the standard C library,
-.Nm libc ,
-only contains stubs to these routines).
-.Sh SEE ALSO
-.Xr login 1 ,
-.Xr passwd 1 ,
-.Xr getpass 3 ,
-.Xr passwd 5
-.Rs
-.%T "Mathematical Cryptology for Computer Scientists and Mathematicians"
-.%A Wayne Patterson
-.%D 1987
-.%N ISBN 0-8476-7438-X
-.Re
-.Rs
-.%T "Password Security: A Case History"
-.%A R. Morris
-.%A Ken Thompson
-.%J "Communications of the ACM"
-.%V vol. 22
-.%P pp. 594-597
-.%D Nov. 1979
-.Re
-.Rs
-.%T "DES will be Totally Insecure within Ten Years"
-.%A M.E. Hellman
-.%J "IEEE Spectrum"
-.%V vol. 16
-.%P pp. 32-39
-.%D July 1979
-.Re
-.Sh HISTORY
-A rotor-based
-.Fn crypt
-function appeared in
-.At v6 .
-The current style
-.Fn crypt
-first appeared in
-.At v7 .
-.Sh BUGS
-Dropping the
-.Em least
-significant bit in each character of the argument to
-.Fn des_setkey
-is ridiculous.
-.Pp
-The
-.Fn crypt
-function leaves its result in an internal static object and returns
-a pointer to that object.
-Subsequent calls to
-.Fn crypt
-will modify the same object.
diff --git a/lib/libc/gen/crypt.c b/lib/libc/gen/crypt.c
deleted file mode 100644
index c1417b8..0000000
--- a/lib/libc/gen/crypt.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Tom Truscott.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/* from static char sccsid[] = "@(#)crypt.c 5.11 (Berkeley) 6/25/91"; */
-static char rcsid[] = "$Header: /home/ncvs/src/lib/libc/gen/crypt.c,v 1.3 1995/05/30 05:40:10 rgrimes Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-
-/*
- * UNIX password, and DES, encryption.
- *
- * since this is non-exportable, this is just a dummy. if you want real
- * encryption, make sure you've got libcrypt.a around.
- */
-
-__warn_references(des_setkey,
- "WARNING! des_setkey(3) not present in the system!");
-
-int
-des_setkey(key)
- register const char *key;
-{
- fprintf(stderr, "WARNING! des_setkey(3) not present in the system!\n");
- return (0);
-}
-
-__warn_references(des_cipher,
- "WARNING! des_cipher(3) not present in the system!");
-
-int
-des_cipher(in, out, salt, num_iter)
- const char *in;
- char *out;
- long salt;
- int num_iter;
-{
- fprintf(stderr, "WARNING! des_cipher(3) not present in the system!\n");
- bcopy(in, out, 8);
- return (0);
-}
-
-__warn_references(setkey,
- "WARNING! setkey(3) not present in the system!");
-
-int
-setkey(key)
- register const char *key;
-{
- fprintf(stderr, "WARNING! setkey(3) not present in the system!\n");
- return (0);
-}
-
-__warn_references(encrypt,
- "WARNING! encrypt(3) not present in the system!");
-
-int
-encrypt(block, flag)
- register char *block;
- int flag;
-{
- fprintf(stderr, "WARNING! encrypt(3) not present in the system!\n");
- return (0);
-}
diff --git a/lib/libc/gen/ctermid.3 b/lib/libc/gen/ctermid.3
deleted file mode 100644
index 2e3e9e6..0000000
--- a/lib/libc/gen/ctermid.3
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ctermid.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt CTERMID 3
-.Os
-.Sh NAME
-.Nm ctermid
-.Nd generate terminal pathname
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft char *
-.Fn ctermid "char *buf"
-.Sh DESCRIPTION
-The
-.Fn ctermid
-function generates a string, that, when used as a pathname, refers to
-the current controlling terminal of the calling process.
-.Pp
-If
-.Ar buf
-is the
-.Dv NULL
-pointer, a pointer to a static area is returned.
-Otherwise, the pathname is copied into the memory referenced by
-.Ar buf .
-The argument
-.Ar buf
-is assumed to be at least
-.Dv L_ctermid
-(as defined in the include
-file
-.Aq Pa stdio.h )
-bytes long.
-.Pp
-The current implementation simply returns
-.Ql /dev/tty .
-.Sh RETURN VALUES
-Upon successful completion, a
-.Pf non- Dv NULL
-pointer is returned.
-Otherwise, a
-.Dv NULL
-pointer is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The current implementation detects no error conditions.
-.Sh SEE ALSO
-.Xr ttyname 3
-.Sh STANDARDS
-The
-.Fn ctermid
-function conforms to
-.St -p1003.1-88 .
-.Sh BUGS
-By default the
-.Fn ctermid
-function
-writes all information to an internal static object.
-Subsequent calls to
-.Fn ctermid
-will modify the same object.
diff --git a/lib/libc/gen/ctermid.c b/lib/libc/gen/ctermid.c
deleted file mode 100644
index 262d6df..0000000
--- a/lib/libc/gen/ctermid.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ctermid.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <paths.h>
-#include <string.h>
-
-char *
-ctermid(s)
- char *s;
-{
- static char def[] = _PATH_TTY;
-
- if (s) {
- bcopy(def, s, sizeof(_PATH_TTY));
- return(s);
- }
- return(def);
-}
diff --git a/lib/libc/gen/daemon.3 b/lib/libc/gen/daemon.3
deleted file mode 100644
index afbbee2..0000000
--- a/lib/libc/gen/daemon.3
+++ /dev/null
@@ -1,78 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)daemon.3 8.1 (Berkeley) 6/9/93
-.Dd June 9, 1993
-.Dt DAEMON 3
-.Os
-.Sh NAME
-.Nm daemon
-.Nd run in the background
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft int
-.Fn daemon "int nochdir" "int noclose"
-.Sh DESCRIPTION
-.Pp
-The
-.Fn daemon
-function is for programs wishing to detach themselves from the
-controlling terminal and run in the background as system daemons.
-.Pp
-Unless the argument
-.Fa nochdir
-is non-zero,
-.Fn daemon
-changes the current working directory to the root (``/'').
-.Pp
-Unless the argument
-.Fa noclose
-is non-zero,
-.Fn daemon
-will redirect standard input, standard output and standard error
-to ``/dev/null''.
-.Sh ERRORS
-If an error occurs,
-.Fn daemon
-returns -1 and sets the global variable
-.Va errno
-to any of the errors specified for the library functions
-.Xr fork 2
-and
-.Xr setsid 2 .
-.Sh SEE ALSO
-.Xr fork 2 ,
-.Xr setsid 2
-.Sh HISTORY
-The
-.Fn daemon
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/daemon.c b/lib/libc/gen/daemon.c
deleted file mode 100644
index 6b3409c..0000000
--- a/lib/libc/gen/daemon.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)daemon.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <fcntl.h>
-#include <paths.h>
-#include <unistd.h>
-
-int
-daemon(nochdir, noclose)
- int nochdir, noclose;
-{
- int fd;
-
- switch (fork()) {
- case -1:
- return (-1);
- case 0:
- break;
- default:
- _exit(0);
- }
-
- if (setsid() == -1)
- return (-1);
-
- if (!nochdir)
- (void)chdir("/");
-
- if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
- (void)dup2(fd, STDIN_FILENO);
- (void)dup2(fd, STDOUT_FILENO);
- (void)dup2(fd, STDERR_FILENO);
- if (fd > 2)
- (void)close (fd);
- }
- return (0);
-}
diff --git a/lib/libc/gen/devname.3 b/lib/libc/gen/devname.3
deleted file mode 100644
index 8f9ad92..0000000
--- a/lib/libc/gen/devname.3
+++ /dev/null
@@ -1,68 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)devname.3 8.2 (Berkeley) 4/29/95
-.\"
-.Dd April 29, 1995
-.Dt DEVNAME 3
-.Os BSD 4.4
-.Sh NAME
-.Nm devname
-.Nd get device name
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft char *
-.Fn devname "dev_t dev" "mode_t type"
-.Sh DESCRIPTION
-The
-.Fn devname
-function returns a pointer to the name of the block or character
-device in
-.Dq Pa /dev
-with a device number of
-.Fa dev ,
-and a file type matching the one encoded in
-.Fa type
-which must be one of S_IFBLK or S_IFCHR.
-If no device matches the specified values, or no information is
-available, NULL is returned.
-.Pp
-The traditional display for applications when no device is
-found is the string
-.Dq ?? .
-.Sh SEE ALSO
-.Xr stat 2 ,
-.Xr dev_mkdb 8
-.Sh HISTORY
-The
-.Fn devname
-function call appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/devname.c b/lib/libc/gen/devname.c
deleted file mode 100644
index 39178fe..0000000
--- a/lib/libc/gen/devname.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)devname.c 8.2 (Berkeley) 4/29/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <db.h>
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <paths.h>
-#include <stdio.h>
-#include <string.h>
-
-char *
-devname(dev, type)
- dev_t dev;
- mode_t type;
-{
- struct {
- mode_t type;
- dev_t dev;
- } bkey;
- static DB *db;
- static int failure;
- DBT data, key;
-
- if (!db && !failure &&
- !(db = dbopen(_PATH_DEVDB, O_RDONLY, 0, DB_HASH, NULL))) {
- warn("warning: %s", _PATH_DEVDB);
- failure = 1;
- }
- if (failure)
- return (NULL);
-
- /*
- * Keys are a mode_t followed by a dev_t. The former is the type of
- * the file (mode & S_IFMT), the latter is the st_rdev field. Be
- * sure to clear any padding that may be found in bkey.
- */
- memset(&bkey, 0, sizeof(bkey));
- bkey.dev = dev;
- bkey.type = type;
- key.data = &bkey;
- key.size = sizeof(bkey);
- return ((db->get)(db, &key, &data, 0) ? NULL : (char *)data.data);
-}
diff --git a/lib/libc/gen/directory.3 b/lib/libc/gen/directory.3
deleted file mode 100644
index 0abbe5f..0000000
--- a/lib/libc/gen/directory.3
+++ /dev/null
@@ -1,183 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)directory.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt DIRECTORY 3
-.Os BSD 4.2
-.Sh NAME
-.Nm opendir ,
-.Nm readdir ,
-.Nm telldir ,
-.Nm seekdir ,
-.Nm rewinddir ,
-.Nm closedir ,
-.Nm dirfd
-.Nd directory operations
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <dirent.h>
-.Ft DIR *
-.Fn opendir "const char *filename"
-.Ft struct dirent *
-.Fn readdir "DIR *dirp"
-.Ft long
-.Fn telldir "const DIR *dirp"
-.Ft void
-.Fn seekdir "DIR *dirp" "long loc"
-.Ft void
-.Fn rewinddir "DIR *dirp"
-.Ft int
-.Fn closedir "DIR *dirp"
-.Ft int
-.Fn dirfd "DIR *dirp"
-.Sh DESCRIPTION
-The
-.Fn opendir
-function
-opens the directory named by
-.Fa filename ,
-associates a
-.Em directory stream
-with it
-and
-returns a pointer to be used to identify the
-.Em directory stream
-in subsequent operations. The pointer
-.Dv NULL
-is returned if
-.Fa filename
-cannot be accessed, or if it cannot
-.Xr malloc 3
-enough memory to hold the whole thing.
-.Pp
-The
-.Fn readdir
-function
-returns a pointer to the next directory entry. It returns
-.Dv NULL
-upon reaching the end of the directory or detecting an invalid
-.Fn seekdir
-operation.
-.Pp
-The
-.Fn telldir
-function
-returns the current location associated with the named
-.Em directory stream .
-.Pp
-The
-.Fn seekdir
-function
-sets the position of the next
-.Fn readdir
-operation on the
-.Em directory stream .
-The new position reverts to the one associated with the
-.Em directory stream
-when the
-.Fn telldir
-operation was performed. Values returned by
-.Fn telldir
-are good only for the lifetime of the
-.Dv DIR
-pointer,
-.Fa dirp ,
-from which they are derived.
-If the directory is closed and then reopened, the
-.Fn telldir
-value may be invalidated due to undetected directory compaction.
-It is safe to use a previous
-.Fn telldir
-value immediately after a call to
-.Fn opendir
-and before any calls to
-.Fn readdir .
-.Pp
-The
-.Fn rewinddir
-function
-resets the position of the named
-.Em directory stream
-to the beginning of the directory.
-.Pp
-The
-.Fn closedir
-function
-closes the named
-.Em directory stream
-and frees the structure associated with the
-.Fa dirp
-pointer,
-returning 0 on success.
-On failure, \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Pp
-The
-.Fn dirfd
-function
-returns the integer file descriptor associated with the named
-.Em directory stream ,
-see
-.Xr open 2 .
-.Pp
-Sample code which searches a directory for entry ``name'' is:
-.Bd -literal -offset indent
-len = strlen(name);
-dirp = opendir(".");
-while ((dp = readdir(dirp)) != NULL)
- if (dp->d_namlen == len && !strcmp(dp->d_name, name)) {
- (void)closedir(dirp);
- return FOUND;
- }
-(void)closedir(dirp);
-return NOT_FOUND;
-.Ed
-.Sh SEE ALSO
-.Xr close 2 ,
-.Xr lseek 2 ,
-.Xr open 2 ,
-.Xr read 2 ,
-.Xr dir 5
-.Sh HISTORY
-The
-.Fn opendir ,
-.Fn readdir ,
-.Fn telldir ,
-.Fn seekdir ,
-.Fn rewinddir ,
-.Fn closedir ,
-and
-.Fn dirfd
-functions appeared in
-.Bx 4.2 .
diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c
deleted file mode 100644
index b5cef89..0000000
--- a/lib/libc/gen/disklabel.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 1983, 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)disklabel.c 8.2 (Berkeley) 5/3/95";
-#endif
-static const char rcsid[] =
- "$Id: disklabel.c,v 1.5 1997/02/22 14:58:01 peter Exp $";
-#endif /* not lint */
-
-#include <sys/param.h>
-#define DKTYPENAMES
-#include <sys/disklabel.h>
-#include <ufs/ufs/dinode.h>
-#include <ufs/ffs/fs.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-
-static int gettype __P((char *, char **));
-
-struct disklabel *
-getdiskbyname(name)
- const char *name;
-{
- static struct disklabel disk;
- register struct disklabel *dp = &disk;
- register struct partition *pp;
- char *buf;
- char *db_array[2] = { _PATH_DISKTAB, 0 };
- char *cp, *cq; /* can't be register */
- char p, max, psize[3], pbsize[3],
- pfsize[3], poffset[3], ptype[3];
- u_int32_t *dx;
-
- if (cgetent(&buf, db_array, (char *) name) < 0)
- return NULL;
-
- bzero((char *)&disk, sizeof(disk));
- /*
- * typename
- */
- cq = dp->d_typename;
- cp = buf;
- while (cq < dp->d_typename + sizeof(dp->d_typename) - 1 &&
- (*cq = *cp) && *cq != '|' && *cq != ':')
- cq++, cp++;
- *cq = '\0';
- /*
- * boot name (optional) xxboot, bootxx
- */
- cgetstr(buf, "b0", &dp->d_boot0);
- cgetstr(buf, "b1", &dp->d_boot1);
-
- if (cgetstr(buf, "ty", &cq) > 0 && strcmp(cq, "removable") == 0)
- dp->d_flags |= D_REMOVABLE;
- else if (cq && strcmp(cq, "simulated") == 0)
- dp->d_flags |= D_RAMDISK;
- if (cgetcap(buf, "sf", ':') != NULL)
- dp->d_flags |= D_BADSECT;
-
-#define getnumdflt(field, dname, dflt) \
- { long f; (field) = (cgetnum(buf, dname, &f) == -1) ? (dflt) : f; }
-
- getnumdflt(dp->d_secsize, "se", DEV_BSIZE);
- cgetnum(buf, "nt",(long *) &dp->d_ntracks);
- cgetnum(buf, "ns",(long *) &dp->d_nsectors);
- cgetnum(buf, "nc",(long *) &dp->d_ncylinders);
-
- if (cgetstr(buf, "dt", &cq) > 0)
- dp->d_type = gettype(cq, dktypenames);
- else
- getnumdflt(dp->d_type, "dt", 0);
- getnumdflt(dp->d_secpercyl, "sc", dp->d_nsectors * dp->d_ntracks);
- getnumdflt(dp->d_secperunit, "su", dp->d_secpercyl * dp->d_ncylinders);
- getnumdflt(dp->d_rpm, "rm", 3600);
- getnumdflt(dp->d_interleave, "il", 1);
- getnumdflt(dp->d_trackskew, "sk", 0);
- getnumdflt(dp->d_cylskew, "cs", 0);
- getnumdflt(dp->d_headswitch, "hs", 0);
- getnumdflt(dp->d_trkseek, "ts", 0);
- getnumdflt(dp->d_bbsize, "bs", BBSIZE);
- getnumdflt(dp->d_sbsize, "sb", SBSIZE);
- strcpy(psize, "px");
- strcpy(pbsize, "bx");
- strcpy(pfsize, "fx");
- strcpy(poffset, "ox");
- strcpy(ptype, "tx");
- max = 'a' - 1;
- pp = &dp->d_partitions[0];
- for (p = 'a'; p < 'a' + MAXPARTITIONS; p++, pp++) {
- psize[1] = pbsize[1] = pfsize[1] = poffset[1] = ptype[1] = p;
- if (cgetnum(buf, psize,(long *) &pp->p_size) == -1)
- pp->p_size = 0;
- else {
- cgetnum(buf, poffset, (long *) &pp->p_offset);
- getnumdflt(pp->p_fsize, pfsize, 0);
- if (pp->p_fsize) {
- long bsize;
-
- if (cgetnum(buf, pbsize, &bsize) == 0)
- pp->p_frag = bsize / pp->p_fsize;
- else
- pp->p_frag = 8;
- }
- getnumdflt(pp->p_fstype, ptype, 0);
- if (pp->p_fstype == 0 && cgetstr(buf, ptype, &cq) > 0)
- pp->p_fstype = gettype(cq, fstypenames);
- max = p;
- }
- }
- dp->d_npartitions = max + 1 - 'a';
- (void)strcpy(psize, "dx");
- dx = dp->d_drivedata;
- for (p = '0'; p < '0' + NDDATA; p++, dx++) {
- psize[1] = p;
- getnumdflt(*dx, psize, 0);
- }
- dp->d_magic = DISKMAGIC;
- dp->d_magic2 = DISKMAGIC;
- free(buf);
- return (dp);
-}
-
-static int
-gettype(t, names)
- char *t;
- char **names;
-{
- register char **nm;
-
- for (nm = names; *nm; nm++)
- if (strcasecmp(t, *nm) == 0)
- return (nm - names);
- if (isdigit(*t))
- return (atoi(t));
- return (0);
-}
diff --git a/lib/libc/gen/drand48.c b/lib/libc/gen/drand48.c
deleted file mode 100644
index cec04a6..0000000
--- a/lib/libc/gen/drand48.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-extern unsigned short _rand48_seed[3];
-
-double
-drand48(void)
-{
- return erand48(_rand48_seed);
-}
diff --git a/lib/libc/gen/erand48.c b/lib/libc/gen/erand48.c
deleted file mode 100644
index 286904c..0000000
--- a/lib/libc/gen/erand48.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-double
-erand48(unsigned short xseed[3])
-{
- _dorand48(xseed);
- return ldexp((double) xseed[0], -48) +
- ldexp((double) xseed[1], -32) +
- ldexp((double) xseed[2], -16);
-}
diff --git a/lib/libc/gen/err.3 b/lib/libc/gen/err.3
deleted file mode 100644
index aa340f6..0000000
--- a/lib/libc/gen/err.3
+++ /dev/null
@@ -1,147 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)err.3 8.1 (Berkeley) 6/9/93
-.\" $Id: err.3,v 1.6 1997/02/22 14:58:02 peter Exp $
-.\"
-.Dd April 13, 1995
-.Dt ERR 3
-.Os BSD 4
-.Sh NAME
-.Nm err ,
-.Nm verr ,
-.Nm errx ,
-.Nm verrx ,
-.Nm warn ,
-.Nm vwarn ,
-.Nm warnx ,
-.Nm vwarnx ,
-.Nm err_set_file ,
-.Nm err_set_exit
-.Nd formatted error messages
-.Sh SYNOPSIS
-.Fd #include <err.h>
-.Ft void
-.Fn err "int eval" "const char *fmt" "..."
-.Ft void
-.Fn errx "int eval" "const char *fmt" "..."
-.Ft void
-.Fn warn "const char *fmt" "..."
-.Ft void
-.Fn warnx "const char *fmt" "..."
-.Ft void
-.Fn err_set_file "void *fp"
-.Ft void
-.Fn err_set_exit "void (*exitf)(int)"
-.Fd #include <stdarg.h>
-.Ft void
-.Fn verr "int eval" "const char *fmt" "va_list args"
-.Ft void
-.Fn verrx "int eval" "const char *fmt" "va_list args"
-.Ft void
-.Fn vwarn "const char *fmt" "va_list args"
-.Ft void
-.Fn vwarnx "const char *fmt" "va_list args"
-.Sh DESCRIPTION
-The
-.Fn err
-and
-.Fn warn
-family of functions display a formatted error message on the standard
-error output, or on another file specified using the
-.Fn err_set_file
-function.
-In all cases, the last component of the program name, a colon character,
-and a space are output.
-If the
-.Va fmt
-argument is not NULL, the formatted error message, a colon character,
-and a space are output.
-In the case of the
-.Fn err ,
-.Fn verr ,
-.Fn warn ,
-and
-.Fn vwarn
-functions, the error message string affiliated with the current value of
-the global variable
-.Va errno
-is output.
-In all cases, the output is followed by a newline character.
-.Pp
-The
-.Fn err ,
-.Fn verr ,
-.Fn errx ,
-and
-.Fn verrx
-functions do not return, but exit with the value of the argument
-.Fa eval .
-The
-.Fn err_set_exit
-function can be used to specify a function which is called before
-.Xr exit 3
-to perform any necessary cleanup; passing a null function pointer for
-.Va exitf
-resets the hook to do nothing.
-.Sh EXAMPLES
-Display the current errno information string and exit:
-.Bd -literal -offset indent
-if ((p = malloc(size)) == NULL)
- err(1, NULL);
-if ((fd = open(file_name, O_RDONLY, 0)) == -1)
- err(1, "%s", file_name);
-.Ed
-.Pp
-Display an error message and exit:
-.Bd -literal -offset indent
-if (tm.tm_hour < START_TIME)
- errx(1, "too early, wait until %s", start_time_string);
-.Ed
-.Pp
-Warn of an error:
-.Bd -literal -offset indent
-if ((fd = open(raw_device, O_RDONLY, 0)) == -1)
- warnx("%s: %s: trying the block device",
- raw_device, strerror(errno));
-if ((fd = open(block_device, O_RDONLY, 0)) == -1)
- err(1, "%s", block_device);
-.Ed
-.Sh SEE ALSO
-.Xr exit 3 ,
-.Xr strerror 3
-.Sh HISTORY
-The
-.Fn err
-and
-.Fn warn
-functions first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c
deleted file mode 100644
index bf7d347..0000000
--- a/lib/libc/gen/err.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)err.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <err.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-extern char *__progname; /* Program name, from crt0. */
-
-static FILE *err_file; /* file to use for error output */
-static void (*err_exit)(int);
-
-void
-err_set_file(void *fp)
-{
- if (fp)
- err_file = fp;
- else
- err_file = stderr;
-}
-
-void
-err_set_exit(void (*ef)(int))
-{
- err_exit = ef;
-}
-
-void
-#ifdef __STDC__
-err(int eval, const char *fmt, ...)
-#else
-err(eval, fmt, va_alist)
- int eval;
- const char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- verr(eval, fmt, ap);
- va_end(ap);
-}
-
-void
-verr(eval, fmt, ap)
- int eval;
- const char *fmt;
- va_list ap;
-{
- int sverrno;
-
- sverrno = errno;
- if (! err_file)
- err_set_file((FILE *)0);
- (void)fprintf(err_file, "%s: ", __progname);
- if (fmt != NULL) {
- (void)vfprintf(err_file, fmt, ap);
- (void)fprintf(err_file, ": ");
- }
- (void)fprintf(err_file, "%s\n", strerror(sverrno));
- if(err_exit)
- err_exit(eval);
- exit(eval);
-}
-
-void
-#if __STDC__
-errx(int eval, const char *fmt, ...)
-#else
-errx(eval, fmt, va_alist)
- int eval;
- const char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- verrx(eval, fmt, ap);
- va_end(ap);
-}
-
-void
-verrx(eval, fmt, ap)
- int eval;
- const char *fmt;
- va_list ap;
-{
- if (! err_file)
- err_set_file((FILE *)0);
- (void)fprintf(err_file, "%s: ", __progname);
- if (fmt != NULL)
- (void)vfprintf(err_file, fmt, ap);
- (void)fprintf(err_file, "\n");
- if (err_exit)
- err_exit(eval);
- exit(eval);
-}
-
-void
-#if __STDC__
-warn(const char *fmt, ...)
-#else
-warn(fmt, va_alist)
- const char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- vwarn(fmt, ap);
- va_end(ap);
-}
-
-void
-vwarn(fmt, ap)
- const char *fmt;
- va_list ap;
-{
- int sverrno;
-
- sverrno = errno;
- if (! err_file)
- err_set_file((FILE *)0);
- (void)fprintf(err_file, "%s: ", __progname);
- if (fmt != NULL) {
- (void)vfprintf(err_file, fmt, ap);
- (void)fprintf(err_file, ": ");
- }
- (void)fprintf(err_file, "%s\n", strerror(sverrno));
-}
-
-void
-#ifdef __STDC__
-warnx(const char *fmt, ...)
-#else
-warnx(fmt, va_alist)
- const char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- vwarnx(fmt, ap);
- va_end(ap);
-}
-
-void
-vwarnx(fmt, ap)
- const char *fmt;
- va_list ap;
-{
- if (! err_file)
- err_set_file((FILE *)0);
- (void)fprintf(err_file, "%s: ", __progname);
- if (fmt != NULL)
- (void)vfprintf(err_file, fmt, ap);
- (void)fprintf(err_file, "\n");
-}
diff --git a/lib/libc/gen/errlst.c b/lib/libc/gen/errlst.c
deleted file mode 100644
index cd7e719..0000000
--- a/lib/libc/gen/errlst.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 1982, 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)errlst.c 8.2 (Berkeley) 11/16/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-
-const char *const sys_errlist[] = {
- "Undefined error: 0", /* 0 - ENOERROR */
- "Operation not permitted", /* 1 - EPERM */
- "No such file or directory", /* 2 - ENOENT */
- "No such process", /* 3 - ESRCH */
- "Interrupted system call", /* 4 - EINTR */
- "Input/output error", /* 5 - EIO */
- "Device not configured", /* 6 - ENXIO */
- "Argument list too long", /* 7 - E2BIG */
- "Exec format error", /* 8 - ENOEXEC */
- "Bad file descriptor", /* 9 - EBADF */
- "No child processes", /* 10 - ECHILD */
- "Resource deadlock avoided", /* 11 - EDEADLK */
- "Cannot allocate memory", /* 12 - ENOMEM */
- "Permission denied", /* 13 - EACCES */
- "Bad address", /* 14 - EFAULT */
- "Block device required", /* 15 - ENOTBLK */
- "Device busy", /* 16 - EBUSY */
- "File exists", /* 17 - EEXIST */
- "Cross-device link", /* 18 - EXDEV */
- "Operation not supported by device", /* 19 - ENODEV */
- "Not a directory", /* 20 - ENOTDIR */
- "Is a directory", /* 21 - EISDIR */
- "Invalid argument", /* 22 - EINVAL */
- "Too many open files in system", /* 23 - ENFILE */
- "Too many open files", /* 24 - EMFILE */
- "Inappropriate ioctl for device", /* 25 - ENOTTY */
- "Text file busy", /* 26 - ETXTBSY */
- "File too large", /* 27 - EFBIG */
- "No space left on device", /* 28 - ENOSPC */
- "Illegal seek", /* 29 - ESPIPE */
- "Read-only file system", /* 30 - EROFS */
- "Too many links", /* 31 - EMLINK */
- "Broken pipe", /* 32 - EPIPE */
-
-/* math software */
- "Numerical argument out of domain", /* 33 - EDOM */
- "Result too large", /* 34 - ERANGE */
-
-/* non-blocking and interrupt i/o */
- "Resource temporarily unavailable", /* 35 - EAGAIN */
- /* 35 - EWOULDBLOCK */
- "Operation now in progress", /* 36 - EINPROGRESS */
- "Operation already in progress", /* 37 - EALREADY */
-
-/* ipc/network software -- argument errors */
- "Socket operation on non-socket", /* 38 - ENOTSOCK */
- "Destination address required", /* 39 - EDESTADDRREQ */
- "Message too long", /* 40 - EMSGSIZE */
- "Protocol wrong type for socket", /* 41 - EPROTOTYPE */
- "Protocol not available", /* 42 - ENOPROTOOPT */
- "Protocol not supported", /* 43 - EPROTONOSUPPORT */
- "Socket type not supported", /* 44 - ESOCKTNOSUPPORT */
- "Operation not supported", /* 45 - EOPNOTSUPP */
- "Protocol family not supported", /* 46 - EPFNOSUPPORT */
- /* 47 - EAFNOSUPPORT */
- "Address family not supported by protocol family",
- "Address already in use", /* 48 - EADDRINUSE */
- "Can't assign requested address", /* 49 - EADDRNOTAVAIL */
-
-/* ipc/network software -- operational errors */
- "Network is down", /* 50 - ENETDOWN */
- "Network is unreachable", /* 51 - ENETUNREACH */
- "Network dropped connection on reset", /* 52 - ENETRESET */
- "Software caused connection abort", /* 53 - ECONNABORTED */
- "Connection reset by peer", /* 54 - ECONNRESET */
- "No buffer space available", /* 55 - ENOBUFS */
- "Socket is already connected", /* 56 - EISCONN */
- "Socket is not connected", /* 57 - ENOTCONN */
- "Can't send after socket shutdown", /* 58 - ESHUTDOWN */
- "Too many references: can't splice", /* 59 - ETOOMANYREFS */
- "Operation timed out", /* 60 - ETIMEDOUT */
- "Connection refused", /* 61 - ECONNREFUSED */
-
- "Too many levels of symbolic links", /* 62 - ELOOP */
- "File name too long", /* 63 - ENAMETOOLONG */
-
-/* should be rearranged */
- "Host is down", /* 64 - EHOSTDOWN */
- "No route to host", /* 65 - EHOSTUNREACH */
- "Directory not empty", /* 66 - ENOTEMPTY */
-
-/* quotas & mush */
- "Too many processes", /* 67 - EPROCLIM */
- "Too many users", /* 68 - EUSERS */
- "Disc quota exceeded", /* 69 - EDQUOT */
-
-/* Network File System */
- "Stale NFS file handle", /* 70 - ESTALE */
- "Too many levels of remote in path", /* 71 - EREMOTE */
- "RPC struct is bad", /* 72 - EBADRPC */
- "RPC version wrong", /* 73 - ERPCMISMATCH */
- "RPC prog. not avail", /* 74 - EPROGUNAVAIL */
- "Program version wrong", /* 75 - EPROGMISMATCH */
- "Bad procedure for program", /* 76 - EPROCUNAVAIL */
-
- "No locks available", /* 77 - ENOLCK */
- "Function not implemented", /* 78 - ENOSYS */
- "Inappropriate file type or format", /* 79 - EFTYPE */
-};
-int errno;
-const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);
diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3
deleted file mode 100644
index 66541ad..0000000
--- a/lib/libc/gen/exec.3
+++ /dev/null
@@ -1,291 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)exec.3 8.3 (Berkeley) 1/24/94
-.\" $Id$
-.\"
-.Dd January 24, 1994
-.Dt EXEC 3
-.Os
-.Sh NAME
-.Nm execl ,
-.Nm execlp ,
-.Nm execle ,
-.Nm exect ,
-.Nm execv ,
-.Nm execvp
-.Nd execute a file
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Vt extern char **environ;
-.Ft int
-.Fn execl "const char *path" "const char *arg" ...
-.Ft int
-.Fn execlp "const char *file" "const char *arg" ...
-.Ft int
-.Fn execle "const char *path" "const char *arg" ...
-.Ft int
-.Fn exect "const char *path" "char *const argv[]" "char *const envp[]"
-.Ft int
-.Fn execv "const char *path" "char *const argv[]"
-.Ft int
-.Fn execvp "const char *file" "char *const argv[]"
-.Sh DESCRIPTION
-The
-.Nm exec
-family of functions replaces the current process image with a
-new process image.
-The functions described in this manual page are front-ends for the function
-.Xr execve 2 .
-(See the manual page for
-.Xr execve 2
-for detailed information about the replacement of the current process.)
-.Pp
-The initial argument for these functions is the pathname of a file which
-is to be executed.
-.Pp
-The
-.Fa "const char *arg"
-and subsequent ellipses in the
-.Fn execl ,
-.Fn execlp ,
-and
-.Fn execle
-functions can be thought of as
-.Em arg0 ,
-.Em arg1 ,
-\&...,
-.Em argn .
-Together they describe a list of one or more pointers to null-terminated
-strings that represent the argument list available to the executed program.
-The first argument, by convention, should point to the file name associated
-with the file being executed.
-The list of arguments
-.Em must
-be terminated by a
-.Dv NULL
-pointer.
-.Pp
-The
-.Fn exect ,
-.Fn execv ,
-and
-.Fn execvp
-functions provide an array of pointers to null-terminated strings that
-represent the argument list available to the new program.
-The first argument, by convention, should point to the file name associated
-with the file begin executed.
-The array of pointers
-.Sy must
-be terminated by a
-.Dv NULL
-pointer.
-.Pp
-The
-.Fn execle
-and
-.Fn exect
-functions also specify the environment of the executed process by following
-the
-.Dv NULL
-pointer that terminates the list of arguments in the parameter list
-or the pointer to the argv array with an additional parameter.
-This additional parameter is an array of pointers to null-terminated strings
-and
-.Em must
-be terminated by a
-.Dv NULL
-pointer.
-The other functions take the environment for the new process image from the
-external variable
-.Va environ
-in the current process.
-.Pp
-Some of these functions have special semantics.
-.Pp
-The functions
-.Fn execlp
-and
-.Fn execvp
-will duplicate the actions of the shell in searching for an executable file
-if the specified file name does not contain a slash
-.Dq Li /
-character.
-The search path is the path specified in the environment by
-.Dq Ev PATH
-variable.
-If this variable isn't specified, the default path
-.Dq Ev /bin:/usr/bin:
-is
-used.
-In addition, certain errors are treated specially.
-.Pp
-If an error is ambiguous (for simplicity, we shall consider all
-errors except
-.Er ENOEXEC
-as being ambiguous here, although only the critical error
-.Er EACCES
-is really ambiguous),
-then these functions will act as if they stat the file to determine
-whether the file exists and has suitable execute permissions.
-If it does, they will return immediately with the global variable
-.Va errno
-restored to the value set by
-.Fn execve .
-Otherwise, the search will be continued.
-If the search completes without performing a successful
-.Fn execve
-or terminating due to an error,
-these functions will return with the global variable
-.Va errno
-set to
-.Er EACCES
-or
-.Er ENOENT
-according to whether at least one file with suitable execute permissions
-was found.
-.Pp
-If the header of a file isn't recognized (the attempted
-.Fn execve
-returned
-.Er ENOEXEC ) ,
-these functions will execute the shell with the path of
-the file as its first argument.
-(If this attempt fails, no further searching is done.)
-.Pp
-The function
-.Fn exect
-executes a file with the program tracing facilities enabled (see
-.Xr ptrace 2 ) .
-.Sh RETURN VALUES
-If any of the
-.Fn exec
-functions returns, an error will have occurred.
-The return value is \-1, and the global variable
-.Va errno
-will be set to indicate the error.
-.Sh FILES
-.Bl -tag -width /bin/sh -compact
-.It Pa /bin/sh
-The shell.
-.El
-.Sh ERRORS
-.Fn Execl ,
-.Fn execle ,
-.Fn execlp
-and
-.Fn execvp
-may fail and set
-.Va errno
-for any of the errors specified for the library functions
-.Xr execve 2
-and
-.Xr malloc 3 .
-.Pp
-.Fn Exect
-and
-.Fn execv
-may fail and set
-.Va errno
-for any of the errors specified for the library function
-.Xr execve 2 .
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr execve 2 ,
-.Xr fork 2 ,
-.Xr ktrace 2 ,
-.Xr ptrace 2 ,
-.Xr environ 7 .
-.Sh COMPATIBILITY
-Historically, the default path for the
-.Fn execlp
-and
-.Fn execvp
-functions was
-.Dq Pa :/bin:/usr/bin .
-This was changed to place the current directory last to enhance system
-security.
-.Pp
-The behavior of
-.Fn execlp
-and
-.Fn execvp
-when errors occur while attempting to execute the file is not quite historic
-practice, and has not traditionally been documented and is not specified
-by the
-.Tn POSIX
-standard.
-.Pp
-Traditionally, the functions
-.Fn execlp
-and
-.Fn execvp
-ignored all errors except for the ones described above and
-.Er ETXTBSY ,
-upon which they retried after sleeping for several seconds, and
-.Er ENOMEM
-and
-.Er E2BIG ,
-upon which they returned.
-They now return for
-.Er ETXTBSY ,
-and determine existence and executability more carefully.
-In particular,
-.Er EACCES
-for inaccessible directories in the path prefix is no longer
-confused with
-.Er EACCES
-for files with unsuitable execute permissions.
-In
-.Bx 4.4 ,
-they returned upon all errors except
-.Er EACCES ,
-.Er ENOENT ,
-.Er ENOEXEC
-and
-.Er ETXTBSY .
-This was inferior to the traditional error handling,
-since it it breaks the ignoring of errors for path prefixes
-and only improves the handling of the unusual ambiguous error
-.Er EFAULT
-and the unusual error
-.Er EIO .
-The behaviour was changed to match the behaviour of
-.Xr sh 1 .
-.Sh STANDARDS
-.Fn Execl ,
-.Fn execv ,
-.Fn execle ,
-.Fn execlp
-and
-.Fn execvp
-conform to
-.St -p1003.1-88 .
diff --git a/lib/libc/gen/exec.c b/lib/libc/gen/exec.c
deleted file mode 100644
index 3b77ee9..0000000
--- a/lib/libc/gen/exec.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id: exec.c,v 1.6 1997/10/14 07:23:16 bde Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <paths.h>
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-extern char **environ;
-
-static char **
-buildargv(ap, arg, envpp)
- va_list ap;
- const char *arg;
- char ***envpp;
-{
- register char **argv, **nargv;
- register int memsize, off;
-
- argv = NULL;
- for (off = memsize = 0;; ++off) {
- if (off >= memsize) {
- memsize += 50; /* Starts out at 0. */
- memsize *= 2; /* Ramp up fast. */
- nargv = realloc(argv, memsize * sizeof(char *));
- if (nargv == NULL) {
- free(argv);
- return (NULL);
- }
- argv = nargv;
- if (off == 0) {
- argv[0] = (char *)arg;
- off = 1;
- }
- }
- if (!(argv[off] = va_arg(ap, char *)))
- break;
- }
- /* Get environment pointer if user supposed to provide one. */
- if (envpp)
- *envpp = va_arg(ap, char **);
- return (argv);
-}
-
-int
-#if __STDC__
-execl(const char *name, const char *arg, ...)
-#else
-execl(name, arg, va_alist)
- const char *name;
- const char *arg;
- va_dcl
-#endif
-{
- va_list ap;
- int sverrno;
- char **argv;
-
-#if __STDC__
- va_start(ap, arg);
-#else
- va_start(ap);
-#endif
- if ( (argv = buildargv(ap, arg, NULL)) )
- (void)execve(name, argv, environ);
- va_end(ap);
- sverrno = errno;
- free(argv);
- errno = sverrno;
- return (-1);
-}
-
-int
-#if __STDC__
-execle(const char *name, const char *arg, ...)
-#else
-execle(name, arg, va_alist)
- const char *name;
- const char *arg;
- va_dcl
-#endif
-{
- va_list ap;
- int sverrno;
- char **argv, **envp;
-
-#if __STDC__
- va_start(ap, arg);
-#else
- va_start(ap);
-#endif
- if ( (argv = buildargv(ap, arg, &envp)) )
- (void)execve(name, argv, envp);
- va_end(ap);
- sverrno = errno;
- free(argv);
- errno = sverrno;
- return (-1);
-}
-
-int
-#if __STDC__
-execlp(const char *name, const char *arg, ...)
-#else
-execlp(name, arg, va_alist)
- const char *name;
- const char *arg;
- va_dcl
-#endif
-{
- va_list ap;
- int sverrno;
- char **argv;
-
-#if __STDC__
- va_start(ap, arg);
-#else
- va_start(ap);
-#endif
- if ( (argv = buildargv(ap, arg, NULL)) )
- (void)execvp(name, argv);
- va_end(ap);
- sverrno = errno;
- free(argv);
- errno = sverrno;
- return (-1);
-}
-
-int
-execv(name, argv)
- const char *name;
- char * const *argv;
-{
- (void)execve(name, argv, environ);
- return (-1);
-}
-
-int
-execvp(name, argv)
- const char *name;
- char * const *argv;
-{
- char **memp;
- register int cnt, lp, ln;
- register char *p;
- int eacces, save_errno;
- char *bp, *cur, *path, buf[MAXPATHLEN];
- struct stat sb;
-
- eacces = 0;
-
- /* If it's an absolute or relative path name, it's easy. */
- if (index(name, '/')) {
- bp = (char *)name;
- cur = path = NULL;
- goto retry;
- }
- bp = buf;
-
- /* If it's an empty path name, fail in the usual POSIX way. */
- if (*name == '\0') {
- errno = ENOENT;
- return (-1);
- }
-
- /* Get the path we're searching. */
- if (!(path = getenv("PATH")))
- path = _PATH_DEFPATH;
- cur = path = strdup(path);
-
- while ( (p = strsep(&cur, ":")) ) {
- /*
- * It's a SHELL path -- double, leading and trailing colons
- * mean the current directory.
- */
- if (!*p) {
- p = ".";
- lp = 1;
- } else
- lp = strlen(p);
- ln = strlen(name);
-
- /*
- * If the path is too long complain. This is a possible
- * security issue; given a way to make the path too long
- * the user may execute the wrong program.
- */
- if (lp + ln + 2 > sizeof(buf)) {
- (void)write(STDERR_FILENO, "execvp: ", 8);
- (void)write(STDERR_FILENO, p, lp);
- (void)write(STDERR_FILENO, ": path too long\n", 16);
- continue;
- }
- bcopy(p, buf, lp);
- buf[lp] = '/';
- bcopy(name, buf + lp + 1, ln);
- buf[lp + ln + 1] = '\0';
-
-retry: (void)execve(bp, argv, environ);
- switch(errno) {
- case E2BIG:
- goto done;
- case ELOOP:
- case ENAMETOOLONG:
- case ENOENT:
- break;
- case ENOEXEC:
- for (cnt = 0; argv[cnt]; ++cnt)
- ;
- memp = malloc((cnt + 2) * sizeof(char *));
- if (memp == NULL)
- goto done;
- memp[0] = "sh";
- memp[1] = bp;
- bcopy(argv + 1, memp + 2, cnt * sizeof(char *));
- (void)execve(_PATH_BSHELL, memp, environ);
- free(memp);
- goto done;
- case ENOMEM:
- goto done;
- case ENOTDIR:
- break;
- case ETXTBSY:
- /*
- * We used to retry here, but sh(1) doesn't.
- */
- goto done;
- default:
- /*
- * EACCES may be for an inaccessible directory or
- * a non-executable file. Call stat() to decide
- * which. This also handles ambiguities for EFAULT
- * and EIO, and undocumented errors like ESTALE.
- * We hope that the race for a stat() is unimportant.
- */
- save_errno = errno;
- if (stat(bp, &sb) != 0)
- break;
- if (save_errno == EACCES) {
- eacces = 1;
- continue;
- }
- errno = save_errno;
- goto done;
- }
- }
- if (eacces)
- errno = EACCES;
- else
- errno = ENOENT;
-done: if (path)
- free(path);
- return (-1);
-}
diff --git a/lib/libc/gen/fnmatch.3 b/lib/libc/gen/fnmatch.3
deleted file mode 100644
index 1da91a8..0000000
--- a/lib/libc/gen/fnmatch.3
+++ /dev/null
@@ -1,142 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Guido van Rossum.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fnmatch.3 8.3 (Berkeley) 4/28/95
-.\"
-.Dd April 28, 1995
-.Dt FNMATCH 3
-.Os
-.Sh NAME
-.Nm fnmatch
-.Nd match filename or pathname
-.Sh SYNOPSIS
-.Fd #include <fnmatch.h>
-.Ft int
-.Fn fnmatch "const char *pattern" "const char *string" "int flags"
-.Sh DESCRIPTION
-The
-.Fn fnmatch
-function
-matches patterns according to the rules used by the shell.
-It checks the string specified by the
-.Fa string
-argument to see if it matches the pattern specified by the
-.Fa pattern
-argument.
-.Pp
-The
-.Fa flags
-argument modifies the interpretation of
-.Fa pattern
-and
-.Fa string .
-The value of
-.Fa flags
-is the bitwise inclusive
-.Tn OR
-of any of the following
-constants, which are defined in the include file
-.Pa fnmatch.h .
-.Bl -tag -width FNM_PATHNAME
-.It Dv FNM_NOESCAPE
-Normally, every occurrence of a backslash
-.Pq Ql \e
-followed by a character in
-.Fa pattern
-is replaced by that character.
-This is done to negate any special meaning for the character.
-If the
-.Dv FNM_NOESCAPE
-flag is set, a backslash character is treated as an ordinary character.
-.It Dv FNM_PATHNAME
-Slash characters in
-.Fa string
-must be explicitly matched by slashes in
-.Fa pattern .
-If this flag is not set, then slashes are treated as regular characters.
-.It Dv FNM_PERIOD
-Leading periods in
-.Fa string
-must be explicitly matched by periods in
-.Fa pattern .
-If this flag is not set, then leading periods are treated as regular
-characters.
-The definition of ``leading'' is related to the specification of
-.Dv FNM_PATHNAME.
-A period is always ``leading'' if it is the first character in
-.Ar string .
-Additionally, if
-.Dv FNM_PATHNAME
-is set,
-a period is ``leading'' if it immediately follows a slash.
-.It Dv FNM_LEADING_DIR
-Ignore
-.Nm /*
-rest after successful
-.Fa pattern
-matching.
-.It Dv FNM_CASEFOLD
-Ignore case distinctions in both the
-.Fa pattern
-and the
-.Fa string .
-.El
-.Sh RETURN VALUES
-The
-.Fn fnmatch
-function returns zero if
-.Fa string
-matches the pattern specified by
-.Fa pattern ,
-otherwise, it returns the value
-.Dv FNM_NOMATCH .
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr glob 3 ,
-.Xr regex 3
-.Sh STANDARDS
-The
-.Fn fnmatch
-function conforms to
-.St -p1003.2 .
-.Sh HISTORY
-The
-.Fn fnmatch
-function first appeared in
-.Bx 4.4 .
-.Sh BUGS
-The pattern
-.Ql *
-matches the empty string, even if
-.Dv FNM_PATHNAME
-is specified.
diff --git a/lib/libc/gen/fnmatch.c b/lib/libc/gen/fnmatch.c
deleted file mode 100644
index c3312b4..0000000
--- a/lib/libc/gen/fnmatch.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
- * Compares a filename or pathname to a pattern.
- */
-
-#include <ctype.h>
-#include <fnmatch.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "collate.h"
-
-#define EOS '\0'
-
-#define RANGE_MATCH 1
-#define RANGE_NOMATCH 0
-#define RANGE_ERROR (-1)
-
-static int rangematch __P((const char *, char, int, char **));
-
-int
-fnmatch(pattern, string, flags)
- const char *pattern, *string;
- int flags;
-{
- const char *stringstart;
- char *newp;
- char c, test;
-
- for (stringstart = string;;)
- switch (c = *pattern++) {
- case EOS:
- if ((flags & FNM_LEADING_DIR) && *string == '/')
- return (0);
- return (*string == EOS ? 0 : FNM_NOMATCH);
- case '?':
- if (*string == EOS)
- return (FNM_NOMATCH);
- if (*string == '/' && (flags & FNM_PATHNAME))
- return (FNM_NOMATCH);
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
- ++string;
- break;
- case '*':
- c = *pattern;
- /* Collapse multiple stars. */
- while (c == '*')
- c = *++pattern;
-
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
-
- /* Optimize for pattern with * at end or before /. */
- if (c == EOS)
- if (flags & FNM_PATHNAME)
- return ((flags & FNM_LEADING_DIR) ||
- strchr(string, '/') == NULL ?
- 0 : FNM_NOMATCH);
- else
- return (0);
- else if (c == '/' && flags & FNM_PATHNAME) {
- if ((string = strchr(string, '/')) == NULL)
- return (FNM_NOMATCH);
- break;
- }
-
- /* General case, use recursion. */
- while ((test = *string) != EOS) {
- if (!fnmatch(pattern, string, flags & ~FNM_PERIOD))
- return (0);
- if (test == '/' && flags & FNM_PATHNAME)
- break;
- ++string;
- }
- return (FNM_NOMATCH);
- case '[':
- if (*string == EOS)
- return (FNM_NOMATCH);
- if (*string == '/' && (flags & FNM_PATHNAME))
- return (FNM_NOMATCH);
- if (*string == '.' && (flags & FNM_PERIOD) &&
- (string == stringstart ||
- ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
- return (FNM_NOMATCH);
-
- switch (rangematch(pattern, *string, flags, &newp)) {
- case RANGE_ERROR:
- goto norm;
- case RANGE_MATCH:
- pattern = newp;
- break;
- case RANGE_NOMATCH:
- return (FNM_NOMATCH);
- }
- ++string;
- break;
- case '\\':
- if (!(flags & FNM_NOESCAPE)) {
- if ((c = *pattern++) == EOS) {
- c = '\\';
- --pattern;
- }
- }
- /* FALLTHROUGH */
- default:
- norm:
- if (c == *string)
- ;
- else if ((flags & FNM_CASEFOLD) &&
- (tolower((unsigned char)c) ==
- tolower((unsigned char)*string)))
- ;
- else
- return (FNM_NOMATCH);
- string++;
- break;
- }
- /* NOTREACHED */
-}
-
-static int
-rangematch(pattern, test, flags, newp)
- const char *pattern;
- char test;
- int flags;
- char **newp;
-{
- int negate, ok;
- char c, c2;
-
- /*
- * A bracket expression starting with an unquoted circumflex
- * character produces unspecified results (IEEE 1003.2-1992,
- * 3.13.2). This implementation treats it like '!', for
- * consistency with the regular expression syntax.
- * J.T. Conklin (conklin@ngai.kaleida.com)
- */
- if ( (negate = (*pattern == '!' || *pattern == '^')) )
- ++pattern;
-
- if (flags & FNM_CASEFOLD)
- test = tolower((unsigned char)test);
-
- /*
- * A right bracket shall lose its special meaning and represent
- * itself in a bracket expression if it occurs first in the list.
- * -- POSIX.2 2.8.3.2
- */
- ok = 0;
- c = *pattern++;
- do {
- if (c == '\\' && !(flags & FNM_NOESCAPE))
- c = *pattern++;
- if (c == EOS)
- return (RANGE_ERROR);
-
- if (c == '/' && (flags & FNM_PATHNAME))
- return (RANGE_NOMATCH);
-
- if (flags & FNM_CASEFOLD)
- c = tolower((unsigned char)c);
-
- if (*pattern == '-'
- && (c2 = *(pattern+1)) != EOS && c2 != ']') {
- pattern += 2;
- if (c2 == '\\' && !(flags & FNM_NOESCAPE))
- c2 = *pattern++;
- if (c2 == EOS)
- return (RANGE_ERROR);
-
- if (flags & FNM_CASEFOLD)
- c2 = tolower((unsigned char)c2);
-
- if (__collate_load_error ?
- c <= test && test <= c2 :
- __collate_range_cmp(c, test) <= 0
- && __collate_range_cmp(test, c2) <= 0
- )
- ok = 1;
- } else if (c == test)
- ok = 1;
- } while ((c = *pattern++) != ']');
-
- *newp = (char *)pattern;
- return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH);
-}
diff --git a/lib/libc/gen/frexp.3 b/lib/libc/gen/frexp.3
deleted file mode 100644
index 58c25fc..0000000
--- a/lib/libc/gen/frexp.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)frexp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FREXP 3
-.Os
-.Sh NAME
-.Nm frexp
-.Nd convert floating-point number to fractional and integral components
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn frexp "double value" "int *exp"
-.Sh DESCRIPTION
-The
-.Fn frexp
-function breaks a floating-point number into a normalized
-fraction and an integral power of 2.
-It stores the integer in the
-.Em int
-object pointed to by
-.Fa exp .
-.Sh RETURN VALUES
-The
-.Fn frexp
-function returns the value
-.Em x ,
-such that
-.Em x
-is a
-.Em double
-with magnitude in the interval
-.Bq 1/2 , 1
-or zero, and
-.Fa value
-equals
-.Em x
-times 2 raised to the power
-.Fa *exp .
-If
-.Fa value
-is zero, both parts of the result are zero.
-.Sh SEE ALSO
-.Xr ldexp 3 ,
-.Xr math 3 ,
-.Xr modf 3
-.Sh STANDARDS
-The
-.Fn frexp
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c
deleted file mode 100644
index a526068..0000000
--- a/lib/libc/gen/fstab.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 1980, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fstab.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <fstab.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-static FILE *_fs_fp;
-static struct fstab _fs_fstab;
-static int LineNo = 0;
-
-static void error __P((int));
-static int fstabscan __P((void));
-
-static int
-fstabscan()
-{
- char *cp, *p;
-#define MAXLINELENGTH 1024
- static char line[MAXLINELENGTH];
- char subline[MAXLINELENGTH];
- int typexx;
-
- for (;;) {
-
- if (!(p = fgets(line, sizeof(line), _fs_fp)))
- return(0);
-/* OLD_STYLE_FSTAB */
- ++LineNo;
- if (*line == '#' || *line == '\n')
- continue;
- if (!strpbrk(p, " \t")) {
- _fs_fstab.fs_spec = strsep(&p, ":\n");
- _fs_fstab.fs_file = strsep(&p, ":\n");
- _fs_fstab.fs_type = strsep(&p, ":\n");
- if (_fs_fstab.fs_type) {
- if (!strcmp(_fs_fstab.fs_type, FSTAB_XX))
- continue;
- _fs_fstab.fs_mntops = _fs_fstab.fs_type;
- _fs_fstab.fs_vfstype =
- strcmp(_fs_fstab.fs_type, FSTAB_SW) ?
- "ufs" : "swap";
- if ((cp = strsep(&p, ":\n")) != NULL) {
- _fs_fstab.fs_freq = atoi(cp);
- if ((cp = strsep(&p, ":\n")) != NULL) {
- _fs_fstab.fs_passno = atoi(cp);
- return(1);
- }
- }
- }
- goto bad;
- }
-/* OLD_STYLE_FSTAB */
- while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
- ;
- _fs_fstab.fs_spec = cp;
- if (!_fs_fstab.fs_spec || *_fs_fstab.fs_spec == '#')
- continue;
- while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
- ;
- _fs_fstab.fs_file = cp;
- while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
- ;
- _fs_fstab.fs_vfstype = cp;
- while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
- ;
- _fs_fstab.fs_mntops = cp;
- if (_fs_fstab.fs_mntops == NULL)
- goto bad;
- _fs_fstab.fs_freq = 0;
- _fs_fstab.fs_passno = 0;
- while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
- ;
- if (cp != NULL) {
- _fs_fstab.fs_freq = atoi(cp);
- while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
- ;
- if (cp != NULL)
- _fs_fstab.fs_passno = atoi(cp);
- }
- strcpy(subline, _fs_fstab.fs_mntops);
- p = subline;
- for (typexx = 0, cp = strsep(&p, ","); cp;
- cp = strsep(&p, ",")) {
- if (strlen(cp) != 2)
- continue;
- if (!strcmp(cp, FSTAB_RW)) {
- _fs_fstab.fs_type = FSTAB_RW;
- break;
- }
- if (!strcmp(cp, FSTAB_RQ)) {
- _fs_fstab.fs_type = FSTAB_RQ;
- break;
- }
- if (!strcmp(cp, FSTAB_RO)) {
- _fs_fstab.fs_type = FSTAB_RO;
- break;
- }
- if (!strcmp(cp, FSTAB_SW)) {
- _fs_fstab.fs_type = FSTAB_SW;
- break;
- }
- if (!strcmp(cp, FSTAB_XX)) {
- _fs_fstab.fs_type = FSTAB_XX;
- typexx++;
- break;
- }
- }
- if (typexx)
- continue;
- if (cp != NULL)
- return(1);
-
-bad: /* no way to distinguish between EOF and syntax error */
- error(EFTYPE);
- }
- /* NOTREACHED */
-}
-
-struct fstab *
-getfsent()
-{
- if ((!_fs_fp && !setfsent()) || !fstabscan())
- return((struct fstab *)NULL);
- return(&_fs_fstab);
-}
-
-struct fstab *
-getfsspec(name)
- register const char *name;
-{
- if (setfsent())
- while (fstabscan())
- if (!strcmp(_fs_fstab.fs_spec, name))
- return(&_fs_fstab);
- return((struct fstab *)NULL);
-}
-
-struct fstab *
-getfsfile(name)
- register const char *name;
-{
- if (setfsent())
- while (fstabscan())
- if (!strcmp(_fs_fstab.fs_file, name))
- return(&_fs_fstab);
- return((struct fstab *)NULL);
-}
-
-int
-setfsent()
-{
- if (_fs_fp) {
- rewind(_fs_fp);
- LineNo = 0;
- return(1);
- }
- if ((_fs_fp = fopen(_PATH_FSTAB, "r")) != NULL) {
- LineNo = 0;
- return(1);
- }
- error(errno);
- return(0);
-}
-
-void
-endfsent()
-{
- if (_fs_fp) {
- (void)fclose(_fs_fp);
- _fs_fp = NULL;
- }
-}
-
-static void
-error(err)
- int err;
-{
- char *p;
- char num[30];
-
- (void)write(STDERR_FILENO, "fstab: ", 7);
- (void)write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1);
- (void)write(STDERR_FILENO, ":", 1);
- sprintf(num, "%d: ", LineNo);
- (void)write(STDERR_FILENO, num, strlen(num));
- p = strerror(err);
- (void)write(STDERR_FILENO, p, strlen(p));
- (void)write(STDERR_FILENO, "\n", 1);
-}
diff --git a/lib/libc/gen/ftok.3 b/lib/libc/gen/ftok.3
deleted file mode 100644
index 03b586d..0000000
--- a/lib/libc/gen/ftok.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: ftok.3,v 1.7 1997/02/22 15:06:08 peter Exp $
-.Dd June 24, 1994
-.Os
-.Dt ftok 3
-.Sh NAME
-.Nm ftok
-.Nd create IPC identifier from path name
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Ft key_t
-.Fn ftok "const char *path" "int id"
-.Sh DESCRIPTION
-.Bf -symbolic
-This function is available from the compatibility library, libcompat.
-.Ef
-The
-.Fn ftok
-function attempts to create a unique key suitable for use with the
-.Xr msgget 3 ,
-.Xr semget 2
-and
-.Xr shmget 2
-functions given the
-.Fa path
-of an existing file and a user-selectable
-.Fa id .
-.Pp
-The specified
-.Fa path
-must specify an existing file that is accessible to the calling process
-or the call will fail. Also, note that links to files will return the
-same key, given the same
-.Fa id .
-.Sh RETURN VALUES
-The
-.Fn ftok
-function will return -1 if
-.Fa path
-does not exist or if it cannot be accessed by the calling process.
-.Sh SEE ALSO
-.Xr semget 2 ,
-.Xr shmget 2 ,
-.Xr msgget 3
-.Sh HISTORY
-The
-.Fn ftok
-function originates with System V and is typically used by programs
-that use the System V IPC routines.
-.Sh AUTHOR
-.Bl -tag
-Thorsten Lockert <tholo@sigmasoft.com>
-.El
-.Sh BUGS
-The returned key is computed based on the device minor number and inode of the
-specified
-.Fa path
-in combination with the lower 8 bits of the given
-.Fa id .
-Thus it is quite possible for the routine to return duplicate keys.
diff --git a/lib/libc/gen/ftok.c b/lib/libc/gen/ftok.c
deleted file mode 100644
index 4f59725..0000000
--- a/lib/libc/gen/ftok.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ipc.h>
-
-key_t
-ftok(path, id)
- const char *path;
- char id;
-{
- struct stat st;
-
- if (stat(path, &st) < 0)
- return (key_t)-1;
-
- return (key_t) (id << 24 | (st.st_dev & 0xff) << 16 | (st.st_ino & 0xffff));
-}
diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c
deleted file mode 100644
index 73832e5..0000000
--- a/lib/libc/gen/fts-compat.c
+++ /dev/null
@@ -1,1039 +0,0 @@
-/* $OpenBSD: fts.c,v 1.9 1997/08/02 00:13:49 millert Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <fts.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-static FTSENT *fts_alloc __P((FTS *, char *, int));
-static FTSENT *fts_build __P((FTS *, int));
-static void fts_lfree __P((FTSENT *));
-static void fts_load __P((FTS *, FTSENT *));
-static size_t fts_maxarglen __P((char * const *));
-static void fts_padjust __P((FTS *, void *));
-static int fts_palloc __P((FTS *, size_t));
-static FTSENT *fts_sort __P((FTS *, FTSENT *, int));
-static u_short fts_stat __P((FTS *, FTSENT *, int));
-static int fts_safe_changedir __P((FTS *, FTSENT *, int));
-
-#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
-
-#define CLR(opt) (sp->fts_options &= ~(opt))
-#define ISSET(opt) (sp->fts_options & (opt))
-#define SET(opt) (sp->fts_options |= (opt))
-
-#define CHDIR(sp, path) (!ISSET(FTS_NOCHDIR) && chdir(path))
-#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd))
-
-/* fts_build flags */
-#define BCHILD 1 /* fts_children */
-#define BNAMES 2 /* fts_children, names only */
-#define BREAD 3 /* fts_read */
-
-FTS *
-fts_open(argv, options, compar)
- char * const *argv;
- register int options;
- int (*compar) __P((const FTSENT **, const FTSENT **));
-{
- register FTS *sp;
- register FTSENT *p, *root;
- register int nitems;
- FTSENT *parent, *tmp;
- int len;
-
- /* Options check. */
- if (options & ~FTS_OPTIONMASK) {
- errno = EINVAL;
- return (NULL);
- }
-
- /* Allocate/initialize the stream */
- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
- return (NULL);
- memset(sp, 0, sizeof(FTS));
- sp->fts_compar = compar;
- sp->fts_options = options;
-
- /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
- if (ISSET(FTS_LOGICAL))
- SET(FTS_NOCHDIR);
-
- /*
- * Start out with 1K of path space, and enough, in any case,
- * to hold the user's paths.
- */
- if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
- goto mem1;
-
- /* Allocate/initialize root's parent. */
- if ((parent = fts_alloc(sp, "", 0)) == NULL)
- goto mem2;
- parent->fts_level = FTS_ROOTPARENTLEVEL;
-
- /* Allocate/initialize root(s). */
- for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) {
- /* Don't allow zero-length paths. */
- if ((len = strlen(*argv)) == 0) {
- errno = ENOENT;
- goto mem3;
- }
-
- p = fts_alloc(sp, *argv, len);
- p->fts_level = FTS_ROOTLEVEL;
- p->fts_parent = parent;
- p->fts_accpath = p->fts_name;
- p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
-
- /* Command-line "." and ".." are real directories. */
- if (p->fts_info == FTS_DOT)
- p->fts_info = FTS_D;
-
- /*
- * If comparison routine supplied, traverse in sorted
- * order; otherwise traverse in the order specified.
- */
- if (compar) {
- p->fts_link = root;
- root = p;
- } else {
- p->fts_link = NULL;
- if (root == NULL)
- tmp = root = p;
- else {
- tmp->fts_link = p;
- tmp = p;
- }
- }
- }
- if (compar && nitems > 1)
- root = fts_sort(sp, root, nitems);
-
- /*
- * Allocate a dummy pointer and make fts_read think that we've just
- * finished the node before the root(s); set p->fts_info to FTS_INIT
- * so that everything about the "current" node is ignored.
- */
- if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
- goto mem3;
- sp->fts_cur->fts_link = root;
- sp->fts_cur->fts_info = FTS_INIT;
-
- /*
- * If using chdir(2), grab a file descriptor pointing to dot to insure
- * that we can get back here; this could be avoided for some paths,
- * but almost certainly not worth the effort. Slashes, symbolic links,
- * and ".." are all fairly nasty problems. Note, if we can't get the
- * descriptor we run anyway, just more slowly.
- */
- if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
- SET(FTS_NOCHDIR);
-
- return (sp);
-
-mem3: fts_lfree(root);
- free(parent);
-mem2: free(sp->fts_path);
-mem1: free(sp);
- return (NULL);
-}
-
-static void
-fts_load(sp, p)
- FTS *sp;
- register FTSENT *p;
-{
- register int len;
- register char *cp;
-
- /*
- * Load the stream structure for the next traversal. Since we don't
- * actually enter the directory until after the preorder visit, set
- * the fts_accpath field specially so the chdir gets done to the right
- * place and the user can access the first node. From fts_open it's
- * known that the path will fit.
- */
- len = p->fts_pathlen = p->fts_namelen;
- memmove(sp->fts_path, p->fts_name, len + 1);
- if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
- len = strlen(++cp);
- memmove(p->fts_name, cp, len + 1);
- p->fts_namelen = len;
- }
- p->fts_accpath = p->fts_path = sp->fts_path;
- sp->fts_dev = p->fts_dev;
-}
-
-int
-fts_close(sp)
- FTS *sp;
-{
- register FTSENT *freep, *p;
- int saved_errno;
-
- /*
- * This still works if we haven't read anything -- the dummy structure
- * points to the root list, so we step through to the end of the root
- * list which has a valid parent pointer.
- */
- if (sp->fts_cur) {
- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
- freep = p;
- p = p->fts_link ? p->fts_link : p->fts_parent;
- free(freep);
- }
- free(p);
- }
-
- /* Free up child linked list, sort array, path buffer. */
- if (sp->fts_child)
- fts_lfree(sp->fts_child);
- if (sp->fts_array)
- free(sp->fts_array);
- free(sp->fts_path);
-
- /* Return to original directory, save errno if necessary. */
- if (!ISSET(FTS_NOCHDIR)) {
- saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
- (void)close(sp->fts_rfd);
- }
-
- /* Free up the stream pointer. */
- free(sp);
-
- /* Set errno and return. */
- if (!ISSET(FTS_NOCHDIR) && saved_errno) {
- errno = saved_errno;
- return (-1);
- }
- return (0);
-}
-
-/*
- * Special case of "/" at the end of the path so that slashes aren't
- * appended which would cause paths to be written as "....//foo".
- */
-#define NAPPEND(p) \
- (p->fts_path[p->fts_pathlen - 1] == '/' \
- ? p->fts_pathlen - 1 : p->fts_pathlen)
-
-FTSENT *
-fts_read(sp)
- register FTS *sp;
-{
- register FTSENT *p, *tmp;
- register int instr;
- register char *t;
- int saved_errno;
-
- /* If finished or unrecoverable error, return NULL. */
- if (sp->fts_cur == NULL || ISSET(FTS_STOP))
- return (NULL);
-
- /* Set current node pointer. */
- p = sp->fts_cur;
-
- /* Save and zero out user instructions. */
- instr = p->fts_instr;
- p->fts_instr = FTS_NOINSTR;
-
- /* Any type of file may be re-visited; re-stat and re-turn. */
- if (instr == FTS_AGAIN) {
- p->fts_info = fts_stat(sp, p, 0);
- return (p);
- }
-
- /*
- * Following a symlink -- SLNONE test allows application to see
- * SLNONE and recover. If indirecting through a symlink, have
- * keep a pointer to current location. If unable to get that
- * pointer, follow fails.
- */
- if (instr == FTS_FOLLOW &&
- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
- p->fts_info = fts_stat(sp, p, 1);
- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
- if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
- p->fts_errno = errno;
- p->fts_info = FTS_ERR;
- } else
- p->fts_flags |= FTS_SYMFOLLOW;
- return (p);
- }
-
- /* Directory in pre-order. */
- if (p->fts_info == FTS_D) {
- /* If skipped or crossed mount point, do post-order visit. */
- if (instr == FTS_SKIP ||
- (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
- if (p->fts_flags & FTS_SYMFOLLOW)
- (void)close(p->fts_symfd);
- if (sp->fts_child) {
- fts_lfree(sp->fts_child);
- sp->fts_child = NULL;
- }
- p->fts_info = FTS_DP;
- return (p);
- }
-
- /* Rebuild if only read the names and now traversing. */
- if (sp->fts_child && ISSET(FTS_NAMEONLY)) {
- CLR(FTS_NAMEONLY);
- fts_lfree(sp->fts_child);
- sp->fts_child = NULL;
- }
-
- /*
- * Cd to the subdirectory.
- *
- * If have already read and now fail to chdir, whack the list
- * to make the names come out right, and set the parent errno
- * so the application will eventually get an error condition.
- * Set the FTS_DONTCHDIR flag so that when we logically change
- * directories back to the parent we don't do a chdir.
- *
- * If haven't read do so. If the read fails, fts_build sets
- * FTS_STOP or the fts_info field of the node.
- */
- if (sp->fts_child) {
- if (fts_safe_changedir(sp, p, -1)) {
- p->fts_errno = errno;
- p->fts_flags |= FTS_DONTCHDIR;
- for (p = sp->fts_child; p; p = p->fts_link)
- p->fts_accpath =
- p->fts_parent->fts_accpath;
- }
- } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
- if (ISSET(FTS_STOP))
- return (NULL);
- return (p);
- }
- p = sp->fts_child;
- sp->fts_child = NULL;
- goto name;
- }
-
- /* Move to the next node on this level. */
-next: tmp = p;
- if ((p = p->fts_link)) {
- free(tmp);
-
- /*
- * If reached the top, return to the original directory, and
- * load the paths for the next root.
- */
- if (p->fts_level == FTS_ROOTLEVEL) {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
- fts_load(sp, p);
- return (sp->fts_cur = p);
- }
-
- /*
- * User may have called fts_set on the node. If skipped,
- * ignore. If followed, get a file descriptor so we can
- * get back if necessary.
- */
- if (p->fts_instr == FTS_SKIP)
- goto next;
- if (p->fts_instr == FTS_FOLLOW) {
- p->fts_info = fts_stat(sp, p, 1);
- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
- if ((p->fts_symfd =
- open(".", O_RDONLY, 0)) < 0) {
- p->fts_errno = errno;
- p->fts_info = FTS_ERR;
- } else
- p->fts_flags |= FTS_SYMFOLLOW;
- p->fts_instr = FTS_NOINSTR;
- }
-
-name: t = sp->fts_path + NAPPEND(p->fts_parent);
- *t++ = '/';
- memmove(t, p->fts_name, p->fts_namelen + 1);
- return (sp->fts_cur = p);
- }
-
- /* Move up to the parent node. */
- p = tmp->fts_parent;
- free(tmp);
-
- if (p->fts_level == FTS_ROOTPARENTLEVEL) {
- /*
- * Done; free everything up and set errno to 0 so the user
- * can distinguish between error and EOF.
- */
- free(p);
- errno = 0;
- return (sp->fts_cur = NULL);
- }
-
- /* Nul terminate the pathname. */
- sp->fts_path[p->fts_pathlen] = '\0';
-
- /*
- * Return to the parent directory. If at a root node or came through
- * a symlink, go back through the file descriptor. Otherwise, cd up
- * one directory.
- */
- if (p->fts_level == FTS_ROOTLEVEL) {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
- } else if (p->fts_flags & FTS_SYMFOLLOW) {
- if (FCHDIR(sp, p->fts_symfd)) {
- saved_errno = errno;
- (void)close(p->fts_symfd);
- errno = saved_errno;
- SET(FTS_STOP);
- return (NULL);
- }
- (void)close(p->fts_symfd);
- } else if (!(p->fts_flags & FTS_DONTCHDIR)) {
- if (CHDIR(sp, "..")) {
- SET(FTS_STOP);
- return (NULL);
- }
- }
- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
- return (sp->fts_cur = p);
-}
-
-/*
- * Fts_set takes the stream as an argument although it's not used in this
- * implementation; it would be necessary if anyone wanted to add global
- * semantics to fts using fts_set. An error return is allowed for similar
- * reasons.
- */
-/* ARGSUSED */
-int
-fts_set(sp, p, instr)
- FTS *sp;
- FTSENT *p;
- int instr;
-{
- if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
- instr != FTS_NOINSTR && instr != FTS_SKIP) {
- errno = EINVAL;
- return (1);
- }
- p->fts_instr = instr;
- return (0);
-}
-
-FTSENT *
-fts_children(sp, instr)
- register FTS *sp;
- int instr;
-{
- register FTSENT *p;
- int fd;
-
- if (instr && instr != FTS_NAMEONLY) {
- errno = EINVAL;
- return (NULL);
- }
-
- /* Set current node pointer. */
- p = sp->fts_cur;
-
- /*
- * Errno set to 0 so user can distinguish empty directory from
- * an error.
- */
- errno = 0;
-
- /* Fatal errors stop here. */
- if (ISSET(FTS_STOP))
- return (NULL);
-
- /* Return logical hierarchy of user's arguments. */
- if (p->fts_info == FTS_INIT)
- return (p->fts_link);
-
- /*
- * If not a directory being visited in pre-order, stop here. Could
- * allow FTS_DNR, assuming the user has fixed the problem, but the
- * same effect is available with FTS_AGAIN.
- */
- if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
- return (NULL);
-
- /* Free up any previous child list. */
- if (sp->fts_child)
- fts_lfree(sp->fts_child);
-
- if (instr == FTS_NAMEONLY) {
- SET(FTS_NAMEONLY);
- instr = BNAMES;
- } else
- instr = BCHILD;
-
- /*
- * If using chdir on a relative path and called BEFORE fts_read does
- * its chdir to the root of a traversal, we can lose -- we need to
- * chdir into the subdirectory, and we don't know where the current
- * directory is, so we can't get back so that the upcoming chdir by
- * fts_read will work.
- */
- if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
- ISSET(FTS_NOCHDIR))
- return (sp->fts_child = fts_build(sp, instr));
-
- if ((fd = open(".", O_RDONLY, 0)) < 0)
- return (NULL);
- sp->fts_child = fts_build(sp, instr);
- if (fchdir(fd))
- return (NULL);
- (void)close(fd);
- return (sp->fts_child);
-}
-
-/*
- * This is the tricky part -- do not casually change *anything* in here. The
- * idea is to build the linked list of entries that are used by fts_children
- * and fts_read. There are lots of special cases.
- *
- * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is
- * set and it's a physical walk (so that symbolic links can't be directories),
- * we can do things quickly. First, if it's a 4.4BSD file system, the type
- * of the file is in the directory entry. Otherwise, we assume that the number
- * of subdirectories in a node is equal to the number of links to the parent.
- * The former skips all stat calls. The latter skips stat calls in any leaf
- * directories and for any files after the subdirectories in the directory have
- * been found, cutting the stat calls by about 2/3.
- */
-static FTSENT *
-fts_build(sp, type)
- register FTS *sp;
- int type;
-{
- register struct dirent *dp;
- register FTSENT *p, *head;
- register int nitems;
- FTSENT *cur, *tail;
- DIR *dirp;
- void *adjaddr;
- int cderrno, descend, len, level, maxlen, nlinks, oflag, saved_errno;
- char *cp;
-
- /* Set current node pointer. */
- cur = sp->fts_cur;
-
- /*
- * Open the directory for reading. If this fails, we're done.
- * If being called from fts_read, set the fts_info field.
- */
-#ifdef FTS_WHITEOUT
- if (ISSET(FTS_WHITEOUT))
- oflag = DTF_NODUP|DTF_REWIND;
- else
- oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND;
-#else
-#define __opendir2(path, flag) opendir(path)
-#endif
- if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
- if (type == BREAD) {
- cur->fts_info = FTS_DNR;
- cur->fts_errno = errno;
- }
- return (NULL);
- }
-
- /*
- * Nlinks is the number of possible entries of type directory in the
- * directory if we're cheating on stat calls, 0 if we're not doing
- * any stat calls at all, -1 if we're doing stats on everything.
- */
- if (type == BNAMES)
- nlinks = 0;
- else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL))
- nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2);
- else
- nlinks = -1;
-
-#ifdef notdef
- (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink);
- (void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n",
- ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT));
-#endif
- /*
- * If we're going to need to stat anything or we want to descend
- * and stay in the directory, chdir. If this fails we keep going,
- * but set a flag so we don't chdir after the post-order visit.
- * We won't be able to stat anything, but we can still return the
- * names themselves. Note, that since fts_read won't be able to
- * chdir into the directory, it will have to return different path
- * names than before, i.e. "a/b" instead of "b". Since the node
- * has already been visited in pre-order, have to wait until the
- * post-order visit to return the error. There is a special case
- * here, if there was nothing to stat then it's not an error to
- * not be able to stat. This is all fairly nasty. If a program
- * needed sorted entries or stat information, they had better be
- * checking FTS_NS on the returned nodes.
- */
- cderrno = 0;
- if (nlinks || type == BREAD)
- if (fts_safe_changedir(sp, cur, dirfd(dirp))) {
- if (nlinks && type == BREAD)
- cur->fts_errno = errno;
- cur->fts_flags |= FTS_DONTCHDIR;
- descend = 0;
- cderrno = errno;
- (void)closedir(dirp);
- dirp = NULL;
- } else
- descend = 1;
- else
- descend = 0;
-
- /*
- * Figure out the max file name length that can be stored in the
- * current path -- the inner loop allocates more path as necessary.
- * We really wouldn't have to do the maxlen calculations here, we
- * could do them in fts_read before returning the path, but it's a
- * lot easier here since the length is part of the dirent structure.
- *
- * If not changing directories set a pointer so that can just append
- * each new name into the path.
- */
- maxlen = sp->fts_pathlen - cur->fts_pathlen - 1;
- len = NAPPEND(cur);
- if (ISSET(FTS_NOCHDIR)) {
- cp = sp->fts_path + len;
- *cp++ = '/';
- }
-
- level = cur->fts_level + 1;
-
- /* Read the directory, attaching each entry to the `link' pointer. */
- adjaddr = NULL;
- for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
- if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
- continue;
-
- if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_namlen)) == NULL)
- goto mem1;
- if (dp->d_namlen > maxlen) {
- if (fts_palloc(sp, (size_t)dp->d_namlen)) {
- /*
- * No more memory for path or structures. Save
- * errno, free up the current structure and the
- * structures already allocated.
- */
-mem1: saved_errno = errno;
- if (p)
- free(p);
- fts_lfree(head);
- (void)closedir(dirp);
- errno = saved_errno;
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- return (NULL);
- }
- adjaddr = sp->fts_path;
- maxlen = sp->fts_pathlen - sp->fts_cur->fts_pathlen - 1;
- }
-
- p->fts_pathlen = len + dp->d_namlen + 1;
- p->fts_parent = sp->fts_cur;
- p->fts_level = level;
-
-#ifdef FTS_WHITEOUT
- if (dp->d_type == DT_WHT)
- p->fts_flags |= FTS_ISW;
-#endif
-
- if (cderrno) {
- if (nlinks) {
- p->fts_info = FTS_NS;
- p->fts_errno = cderrno;
- } else
- p->fts_info = FTS_NSOK;
- p->fts_accpath = cur->fts_accpath;
- } else if (nlinks == 0
-#ifdef DT_DIR
- || (nlinks > 0 &&
- dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
-#endif
- ) {
- p->fts_accpath =
- ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
- p->fts_info = FTS_NSOK;
- } else {
- /* Build a file name for fts_stat to stat. */
- if (ISSET(FTS_NOCHDIR)) {
- p->fts_accpath = p->fts_path;
- memmove(cp, p->fts_name, p->fts_namelen + 1);
- } else
- p->fts_accpath = p->fts_name;
- /* Stat it. */
- p->fts_info = fts_stat(sp, p, 0);
-
- /* Decrement link count if applicable. */
- if (nlinks > 0 && (p->fts_info == FTS_D ||
- p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
- --nlinks;
- }
-
- /* We walk in directory order so "ls -f" doesn't get upset. */
- p->fts_link = NULL;
- if (head == NULL)
- head = tail = p;
- else {
- tail->fts_link = p;
- tail = p;
- }
- ++nitems;
- }
- if (dirp)
- (void)closedir(dirp);
-
- /*
- * If had to realloc the path, adjust the addresses for the rest
- * of the tree.
- */
- if (adjaddr)
- fts_padjust(sp, adjaddr);
-
- /*
- * If not changing directories, reset the path back to original
- * state.
- */
- if (ISSET(FTS_NOCHDIR)) {
- if (len == sp->fts_pathlen)
- --cp;
- *cp = '\0';
- }
-
- /*
- * If descended after called from fts_children or after called from
- * fts_read and nothing found, get back. At the root level we use
- * the saved fd; if one of fts_open()'s arguments is a relative path
- * to an empty directory, we wind up here with no other way back. If
- * can't get back, we're done.
- */
- if (descend && (type == BCHILD || !nitems) &&
- (cur->fts_level == FTS_ROOTLEVEL ?
- FCHDIR(sp, sp->fts_rfd) : CHDIR(sp, ".."))) {
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- return (NULL);
- }
-
- /* If didn't find anything, return NULL. */
- if (!nitems) {
- if (type == BREAD)
- cur->fts_info = FTS_DP;
- return (NULL);
- }
-
- /* Sort the entries. */
- if (sp->fts_compar && nitems > 1)
- head = fts_sort(sp, head, nitems);
- return (head);
-}
-
-static u_short
-fts_stat(sp, p, follow)
- FTS *sp;
- register FTSENT *p;
- int follow;
-{
- register FTSENT *t;
- register dev_t dev;
- register ino_t ino;
- struct stat *sbp, sb;
- int saved_errno;
-
- /* If user needs stat info, stat buffer already allocated. */
- sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-
-#ifdef FTS_WHITEOUT
- /* check for whiteout */
- if (p->fts_flags & FTS_ISW) {
- if (sbp != &sb) {
- memset(sbp, '\0', sizeof (*sbp));
- sbp->st_mode = S_IFWHT;
- }
- return (FTS_W);
- }
-#endif
-
- /*
- * If doing a logical walk, or application requested FTS_FOLLOW, do
- * a stat(2). If that fails, check for a non-existent symlink. If
- * fail, set the errno from the stat call.
- */
- if (ISSET(FTS_LOGICAL) || follow) {
- if (stat(p->fts_accpath, sbp)) {
- saved_errno = errno;
- if (!lstat(p->fts_accpath, sbp)) {
- errno = 0;
- return (FTS_SLNONE);
- }
- p->fts_errno = saved_errno;
- goto err;
- }
- } else if (lstat(p->fts_accpath, sbp)) {
- p->fts_errno = errno;
-err: memset(sbp, 0, sizeof(struct stat));
- return (FTS_NS);
- }
-
- if (S_ISDIR(sbp->st_mode)) {
- /*
- * Set the device/inode. Used to find cycles and check for
- * crossing mount points. Also remember the link count, used
- * in fts_build to limit the number of stat calls. It is
- * understood that these fields are only referenced if fts_info
- * is set to FTS_D.
- */
- dev = p->fts_dev = sbp->st_dev;
- ino = p->fts_ino = sbp->st_ino;
- p->fts_nlink = sbp->st_nlink;
-
- if (ISDOT(p->fts_name))
- return (FTS_DOT);
-
- /*
- * Cycle detection is done by brute force when the directory
- * is first encountered. If the tree gets deep enough or the
- * number of symbolic links to directories is high enough,
- * something faster might be worthwhile.
- */
- for (t = p->fts_parent;
- t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
- if (ino == t->fts_ino && dev == t->fts_dev) {
- p->fts_cycle = t;
- return (FTS_DC);
- }
- return (FTS_D);
- }
- if (S_ISLNK(sbp->st_mode))
- return (FTS_SL);
- if (S_ISREG(sbp->st_mode))
- return (FTS_F);
- return (FTS_DEFAULT);
-}
-
-static FTSENT *
-fts_sort(sp, head, nitems)
- FTS *sp;
- FTSENT *head;
- register int nitems;
-{
- register FTSENT **ap, *p;
-
- /*
- * Construct an array of pointers to the structures and call qsort(3).
- * Reassemble the array in the order returned by qsort. If unable to
- * sort for memory reasons, return the directory entries in their
- * current order. Allocate enough space for the current needs plus
- * 40 so don't realloc one entry at a time.
- */
- if (nitems > sp->fts_nitems) {
- sp->fts_nitems = nitems + 40;
- if ((sp->fts_array = realloc(sp->fts_array,
- (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
- sp->fts_nitems = 0;
- return (head);
- }
- }
- for (ap = sp->fts_array, p = head; p; p = p->fts_link)
- *ap++ = p;
- qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
- for (head = *(ap = sp->fts_array); --nitems; ++ap)
- ap[0]->fts_link = ap[1];
- ap[0]->fts_link = NULL;
- return (head);
-}
-
-static FTSENT *
-fts_alloc(sp, name, namelen)
- FTS *sp;
- char *name;
- register int namelen;
-{
- register FTSENT *p;
- size_t len;
-
- /*
- * The file name is a variable length array and no stat structure is
- * necessary if the user has set the nostat bit. Allocate the FTSENT
- * structure, the file name and the stat structure in one chunk, but
- * be careful that the stat structure is reasonably aligned. Since the
- * fts_name field is declared to be of size 1, the fts_name pointer is
- * namelen + 2 before the first possible address of the stat structure.
- */
- len = sizeof(FTSENT) + namelen;
- if (!ISSET(FTS_NOSTAT))
- len += sizeof(struct stat) + ALIGNBYTES;
- if ((p = malloc(len)) == NULL)
- return (NULL);
-
- /* Copy the name plus the trailing NULL. */
- memmove(p->fts_name, name, namelen + 1);
-
- if (!ISSET(FTS_NOSTAT))
- p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
- p->fts_namelen = namelen;
- p->fts_path = sp->fts_path;
- p->fts_errno = 0;
- p->fts_flags = 0;
- p->fts_instr = FTS_NOINSTR;
- p->fts_number = 0;
- p->fts_pointer = NULL;
- return (p);
-}
-
-static void
-fts_lfree(head)
- register FTSENT *head;
-{
- register FTSENT *p;
-
- /* Free a linked list of structures. */
- while ((p = head)) {
- head = head->fts_link;
- free(p);
- }
-}
-
-/*
- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
- * though the kernel won't resolve them. Add the size (not just what's needed)
- * plus 256 bytes so don't realloc the path 2 bytes at a time.
- */
-static int
-fts_palloc(sp, more)
- FTS *sp;
- size_t more;
-{
- sp->fts_pathlen += more + 256;
- sp->fts_path = realloc(sp->fts_path, (size_t)sp->fts_pathlen);
- return (sp->fts_path == NULL);
-}
-
-/*
- * When the path is realloc'd, have to fix all of the pointers in structures
- * already returned.
- */
-static void
-fts_padjust(sp, addr)
- FTS *sp;
- void *addr;
-{
- FTSENT *p;
-
-#define ADJUST(p) { \
- (p)->fts_accpath = \
- (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
- (p)->fts_path = addr; \
-}
- /* Adjust the current set of children. */
- for (p = sp->fts_child; p; p = p->fts_link)
- ADJUST(p);
-
- /* Adjust the rest of the tree. */
- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
- ADJUST(p);
- p = p->fts_link ? p->fts_link : p->fts_parent;
- }
-}
-
-static size_t
-fts_maxarglen(argv)
- char * const *argv;
-{
- size_t len, max;
-
- for (max = 0; *argv; ++argv)
- if ((len = strlen(*argv)) > max)
- max = len;
- return (max);
-}
-
-/*
- * Change to dir specified by fd or p->fts_accpath without getting
- * tricked by someone changing the world out from underneath us.
- * Assumes p->fts_dev and p->fts_ino are filled in.
- */
-static int
-fts_safe_changedir(sp, p, fd)
- FTS *sp;
- FTSENT *p;
- int fd;
-{
- int ret, oerrno, newfd;
- struct stat sb;
-
- newfd = fd;
- if (ISSET(FTS_NOCHDIR))
- return (0);
- if (fd < 0 && (newfd = open(p->fts_accpath, O_RDONLY, 0)) < 0)
- return (-1);
- if (fstat(newfd, &sb)) {
- ret = -1;
- goto bail;
- }
- if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
- errno = ENOENT; /* disinformation */
- ret = -1;
- goto bail;
- }
- ret = fchdir(newfd);
-bail:
- oerrno = errno;
- if (fd < 0)
- (void)close(newfd);
- errno = oerrno;
- return (ret);
-}
diff --git a/lib/libc/gen/fts-compat.h b/lib/libc/gen/fts-compat.h
deleted file mode 100644
index 4fa4a3a..0000000
--- a/lib/libc/gen/fts-compat.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fts.h 8.3 (Berkeley) 8/14/94
- */
-
-#ifndef _FTS_H_
-#define _FTS_H_
-
-typedef struct {
- struct _ftsent *fts_cur; /* current node */
- struct _ftsent *fts_child; /* linked list of children */
- struct _ftsent **fts_array; /* sort array */
- dev_t fts_dev; /* starting device # */
- char *fts_path; /* path for this descent */
- int fts_rfd; /* fd for root */
- int fts_pathlen; /* sizeof(path) */
- int fts_nitems; /* elements in the sort array */
- int (*fts_compar)(); /* compare function */
-
-#define FTS_COMFOLLOW 0x001 /* follow command line symlinks */
-#define FTS_LOGICAL 0x002 /* logical walk */
-#define FTS_NOCHDIR 0x004 /* don't change directories */
-#define FTS_NOSTAT 0x008 /* don't get stat info */
-#define FTS_PHYSICAL 0x010 /* physical walk */
-#define FTS_SEEDOT 0x020 /* return dot and dot-dot */
-#define FTS_XDEV 0x040 /* don't cross devices */
-#define FTS_WHITEOUT 0x080 /* return whiteout information */
-#define FTS_OPTIONMASK 0x0ff /* valid user option mask */
-
-#define FTS_NAMEONLY 0x100 /* (private) child names only */
-#define FTS_STOP 0x200 /* (private) unrecoverable error */
- int fts_options; /* fts_open options, global flags */
-} FTS;
-
-typedef struct _ftsent {
- struct _ftsent *fts_cycle; /* cycle node */
- struct _ftsent *fts_parent; /* parent directory */
- struct _ftsent *fts_link; /* next file in directory */
- long fts_number; /* local numeric value */
- void *fts_pointer; /* local address value */
- char *fts_accpath; /* access path */
- char *fts_path; /* root path */
- int fts_errno; /* errno for this node */
- int fts_symfd; /* fd for symlink */
- u_short fts_pathlen; /* strlen(fts_path) */
- u_short fts_namelen; /* strlen(fts_name) */
-
- ino_t fts_ino; /* inode */
- dev_t fts_dev; /* device */
- nlink_t fts_nlink; /* link count */
-
-#define FTS_ROOTPARENTLEVEL -1
-#define FTS_ROOTLEVEL 0
- short fts_level; /* depth (-1 to N) */
-
-#define FTS_D 1 /* preorder directory */
-#define FTS_DC 2 /* directory that causes cycles */
-#define FTS_DEFAULT 3 /* none of the above */
-#define FTS_DNR 4 /* unreadable directory */
-#define FTS_DOT 5 /* dot or dot-dot */
-#define FTS_DP 6 /* postorder directory */
-#define FTS_ERR 7 /* error; errno is set */
-#define FTS_F 8 /* regular file */
-#define FTS_INIT 9 /* initialized only */
-#define FTS_NS 10 /* stat(2) failed */
-#define FTS_NSOK 11 /* no stat(2) requested */
-#define FTS_SL 12 /* symbolic link */
-#define FTS_SLNONE 13 /* symbolic link without target */
-#define FTS_W 14 /* whiteout object */
- u_short fts_info; /* user flags for FTSENT structure */
-
-#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
-#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
-#define FTS_ISW 0x04 /* this is a whiteout object */
- u_short fts_flags; /* private flags for FTSENT structure */
-
-#define FTS_AGAIN 1 /* read node again */
-#define FTS_FOLLOW 2 /* follow symbolic link */
-#define FTS_NOINSTR 3 /* no instructions */
-#define FTS_SKIP 4 /* discard node */
- u_short fts_instr; /* fts_set() instructions */
-
- struct stat *fts_statp; /* stat(2) information */
- char fts_name[1]; /* file name */
-} FTSENT;
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-FTSENT *fts_children __P((FTS *, int));
-int fts_close __P((FTS *));
-FTS *fts_open __P((char * const *, int,
- int (*)(const FTSENT **, const FTSENT **)));
-FTSENT *fts_read __P((FTS *));
-int fts_set __P((FTS *, FTSENT *, int));
-__END_DECLS
-
-#endif /* !_FTS_H_ */
diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3
deleted file mode 100644
index 7813665..0000000
--- a/lib/libc/gen/fts.3
+++ /dev/null
@@ -1,749 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fts.3 8.5 (Berkeley) 4/16/94
-.\" $Id$
-.\"
-.Dd April 16, 1994
-.Dt FTS 3
-.Os
-.Sh NAME
-.Nm fts
-.Nd traverse a file hierarchy
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/stat.h>
-.Fd #include <fts.h>
-.Ft FTS *
-.Fn fts_open "char * const *path_argv" "int options" "int (*compar)(const FTSENT **, const FTSENT **)"
-.Ft FTSENT *
-.Fn fts_read "FTS *ftsp"
-.Ft FTSENT *
-.Fn fts_children "FTS *ftsp" "int options"
-.Ft int
-.Fn fts_set "FTS *ftsp" "FTSENT *f" "int options"
-.Ft int
-.Fn fts_close "FTS *ftsp"
-.Sh DESCRIPTION
-The
-.Nm fts
-functions are provided for traversing
-.Tn UNIX
-file hierarchies.
-A simple overview is that the
-.Fn fts_open
-function returns a ``handle'' on a file hierarchy, which is then supplied to
-the other
-.Nm fts
-functions.
-The function
-.Fn fts_read
-returns a pointer to a structure describing one of the files in the file
-hierarchy.
-The function
-.Fn fts_children
-returns a pointer to a linked list of structures, each of which describes
-one of the files contained in a directory in the hierarchy.
-In general, directories are visited two distinguishable times; in pre-order
-(before any of their descendants are visited) and in post-order (after all
-of their descendants have been visited).
-Files are visited once.
-It is possible to walk the hierarchy ``logically'' (ignoring symbolic links)
-or physically (visiting symbolic links), order the walk of the hierarchy or
-prune and/or re-visit portions of the hierarchy.
-.Pp
-Two structures are defined (and typedef'd) in the include file
-.Aq Pa fts.h .
-The first is
-.Fa FTS ,
-the structure that represents the file hierarchy itself.
-The second is
-.Fa FTSENT ,
-the structure that represents a file in the file
-hierarchy.
-Normally, an
-.Fa FTSENT
-structure is returned for every file in the file
-hierarchy.
-In this manual page, ``file'' and
-.Dq Fa FTSENT No structure
-are generally
-interchangeable.
-The
-.Fa FTSENT
-structure contains at least the following fields, which are
-described in greater detail below:
-.Bd -literal
-typedef struct _ftsent {
- u_short fts_info; /* flags for FTSENT structure */
- char *fts_accpath; /* access path */
- char *fts_path; /* root path */
- short fts_pathlen; /* strlen(fts_path) */
- char *fts_name; /* file name */
- short fts_namelen; /* strlen(fts_name) */
- short fts_level; /* depth (\-1 to N) */
- int fts_errno; /* file errno */
- long fts_number; /* local numeric value */
- void *fts_pointer; /* local address value */
- struct ftsent *fts_parent; /* parent directory */
- struct ftsent *fts_link; /* next file structure */
- struct ftsent *fts_cycle; /* cycle structure */
- struct stat *fts_statp; /* stat(2) information */
-} FTSENT;
-.Ed
-.Pp
-These fields are defined as follows:
-.Bl -tag -width "fts_namelen"
-.It Fa fts_info
-One of the following values describing the returned
-.Fa FTSENT
-structure and
-the file it represents.
-With the exception of directories without errors
-.Pq Dv FTS_D ,
-all of these
-entries are terminal, that is, they will not be revisited, nor will any
-of their descendants be visited.
-.Bl -tag -width FTS_DEFAULT
-.It Dv FTS_D
-A directory being visited in pre-order.
-.It Dv FTS_DC
-A directory that causes a cycle in the tree.
-(The
-.Fa fts_cycle
-field of the
-.Fa FTSENT
-structure will be filled in as well.)
-.It Dv FTS_DEFAULT
-Any
-.Fa FTSENT
-structure that represents a file type not explicitly described
-by one of the other
-.Fa fts_info
-values.
-.It Dv FTS_DNR
-A directory which cannot be read.
-This is an error return, and the
-.Fa fts_errno
-field will be set to indicate what caused the error.
-.It Dv FTS_DOT
-A file named
-.Ql \&.
-or
-.Ql ..
-which was not specified as a file name to
-.Fn fts_open
-(see
-.Dv FTS_SEEDOT ) .
-.It Dv FTS_DP
-A directory being visited in post-order.
-The contents of the
-.Fa FTSENT
-structure will be unchanged from when
-it was returned in pre-order, i.e. with the
-.Fa fts_info
-field set to
-.Dv FTS_D .
-.It Dv FTS_ERR
-This is an error return, and the
-.Fa fts_errno
-field will be set to indicate what caused the error.
-.It Dv FTS_F
-A regular file.
-.It Dv FTS_NS
-A file for which no
-.Xr stat 2
-information was available.
-The contents of the
-.Fa fts_statp
-field are undefined.
-This is an error return, and the
-.Fa fts_errno
-field will be set to indicate what caused the error.
-.It Dv FTS_NSOK
-A file for which no
-.Xr stat 2
-information was requested.
-The contents of the
-.Fa fts_statp
-field are undefined.
-.It Dv FTS_SL
-A symbolic link.
-.It Dv FTS_SLNONE
-A symbolic link with a non-existent target.
-The contents of the
-.Fa fts_statp
-field reference the file characteristic information for the symbolic link
-itself.
-.El
-.It Fa fts_accpath
-A path for accessing the file from the current directory.
-.It Fa fts_path
-The path for the file relative to the root of the traversal.
-This path contains the path specified to
-.Fn fts_open
-as a prefix.
-.It Fa fts_pathlen
-The length of the string referenced by
-.Fa fts_path .
-.It Fa fts_name
-The name of the file.
-.It Fa fts_namelen
-The length of the string referenced by
-.Fa fts_name .
-.It Fa fts_level
-The depth of the traversal, numbered from \-1 to N, where this file
-was found.
-The
-.Fa FTSENT
-structure representing the parent of the starting point (or root)
-of the traversal is numbered \-1, and the
-.Fa FTSENT
-structure for the root
-itself is numbered 0.
-.It Fa fts_errno
-Upon return of a
-.Fa FTSENT
-structure from the
-.Fn fts_children
-or
-.Fn fts_read
-functions, with its
-.Fa fts_info
-field set to
-.Dv FTS_DNR ,
-.Dv FTS_ERR
-or
-.Dv FTS_NS ,
-the
-.Fa fts_errno
-field contains the value of the external variable
-.Va errno
-specifying the cause of the error.
-Otherwise, the contents of the
-.Fa fts_errno
-field are undefined.
-.It Fa fts_number
-This field is provided for the use of the application program and is
-not modified by the
-.Nm fts
-functions.
-It is initialized to 0.
-.It Fa fts_pointer
-This field is provided for the use of the application program and is
-not modified by the
-.Nm fts
-functions.
-It is initialized to
-.Dv NULL .
-.It Fa fts_parent
-A pointer to the
-.Fa FTSENT
-structure referencing the file in the hierarchy
-immediately above the current file, i.e. the directory of which this
-file is a member.
-A parent structure for the initial entry point is provided as well,
-however, only the
-.Fa fts_level ,
-.Fa fts_number
-and
-.Fa fts_pointer
-fields are guaranteed to be initialized.
-.It Fa fts_link
-Upon return from the
-.Fn fts_children
-function, the
-.Fa fts_link
-field points to the next structure in the NULL-terminated linked list of
-directory members.
-Otherwise, the contents of the
-.Fa fts_link
-field are undefined.
-.It Fa fts_cycle
-If a directory causes a cycle in the hierarchy (see
-.Dv FTS_DC ) ,
-either because
-of a hard link between two directories, or a symbolic link pointing to a
-directory, the
-.Fa fts_cycle
-field of the structure will point to the
-.Fa FTSENT
-structure in the hierarchy that references the same file as the current
-.Fa FTSENT
-structure.
-Otherwise, the contents of the
-.Fa fts_cycle
-field are undefined.
-.It Fa fts_statp
-A pointer to
-.Xr stat 2
-information for the file.
-.El
-.Pp
-A single buffer is used for all of the paths of all of the files in the
-file hierarchy.
-Therefore, the
-.Fa fts_path
-and
-.Fa fts_accpath
-fields are guaranteed to be
-.Dv NULL Ns -terminated
-.Em only
-for the file most recently returned by
-.Fn fts_read .
-To use these fields to reference any files represented by other
-.Fa FTSENT
-structures will require that the path buffer be modified using the
-information contained in that
-.Fa FTSENT
-structure's
-.Fa fts_pathlen
-field.
-Any such modifications should be undone before further calls to
-.Fn fts_read
-are attempted.
-The
-.Fa fts_name
-field is always
-.Dv NULL Ns -terminated.
-.Sh FTS_OPEN
-The
-.Fn fts_open
-function takes a pointer to an array of character pointers naming one
-or more paths which make up a logical file hierarchy to be traversed.
-The array must be terminated by a
-.Dv NULL
-pointer.
-.Pp
-There are
-a number of options, at least one of which (either
-.Dv FTS_LOGICAL
-or
-.Dv FTS_PHYSICAL )
-must be specified.
-The options are selected by
-.Em or Ns 'ing
-the following values:
-.Bl -tag -width "FTS_PHYSICAL"
-.It Dv FTS_COMFOLLOW
-This option causes any symbolic link specified as a root path to be
-followed immediately whether or not
-.Dv FTS_LOGICAL
-is also specified.
-.It Dv FTS_LOGICAL
-This option causes the
-.Nm fts
-routines to return
-.Fa FTSENT
-structures for the targets of symbolic links
-instead of the symbolic links themselves.
-If this option is set, the only symbolic links for which
-.Fa FTSENT
-structures
-are returned to the application are those referencing non-existent files.
-Either
-.Dv FTS_LOGICAL
-or
-.Dv FTS_PHYSICAL
-.Em must
-be provided to the
-.Fn fts_open
-function.
-.It Dv FTS_NOCHDIR
-As a performance optimization, the
-.Nm fts
-functions change directories as they walk the file hierarchy.
-This has the side-effect that an application cannot rely on being
-in any particular directory during the traversal.
-The
-.Dv FTS_NOCHDIR
-option turns off this optimization, and the
-.Nm fts
-functions will not change the current directory.
-Note that applications should not themselves change their current directory
-and try to access files unless
-.Dv FTS_NOCHDIR
-is specified and absolute
-pathnames were provided as arguments to
-.Fn fts_open .
-.It Dv FTS_NOSTAT
-By default, returned
-.Fa FTSENT
-structures reference file characteristic information (the
-.Fa statp
-field) for each file visited.
-This option relaxes that requirement as a performance optimization,
-allowing the
-.Nm fts
-functions to set the
-.Fa fts_info
-field to
-.Dv FTS_NSOK
-and leave the contents of the
-.Fa statp
-field undefined.
-.It Dv FTS_PHYSICAL
-This option causes the
-.Nm fts
-routines to return
-.Fa FTSENT
-structures for symbolic links themselves instead
-of the target files they point to.
-If this option is set,
-.Fa FTSENT
-structures for all symbolic links in the
-hierarchy are returned to the application.
-Either
-.Dv FTS_LOGICAL
-or
-.Dv FTS_PHYSICAL
-.Em must
-be provided to the
-.Fn fts_open
-function.
-.It Dv FTS_SEEDOT
-By default, unless they are specified as path arguments to
-.Fn fts_open ,
-any files named
-.Ql \&.
-or
-.Ql ..
-encountered in the file hierarchy are ignored.
-This option causes the
-.Nm fts
-routines to return
-.Fa FTSENT
-structures for them.
-.It Dv FTS_XDEV
-This option prevents
-.Nm fts
-from descending into directories that have a different device number
-than the file from which the descent began.
-.El
-.Pp
-The argument
-.Fn compar
-specifies a user-defined function which may be used to order the traversal
-of the hierarchy.
-It
-takes two pointers to pointers to
-.Fa FTSENT
-structures as arguments and
-should return a negative value, zero, or a positive value to indicate
-if the file referenced by its first argument comes before, in any order
-with respect to, or after, the file referenced by its second argument.
-The
-.Fa fts_accpath ,
-.Fa fts_path
-and
-.Fa fts_pathlen
-fields of the
-.Fa FTSENT
-structures may
-.Em never
-be used in this comparison.
-If the
-.Fa fts_info
-field is set to
-.Dv FTS_NS
-or
-.Dv FTS_NSOK ,
-the
-.Fa fts_statp
-field may not either.
-If the
-.Fn compar
-argument is
-.Dv NULL ,
-the directory traversal order is in the order listed in
-.Fa path_argv
-for the root paths, and in the order listed in the directory for
-everything else.
-.Sh FTS_READ
-The
-.Fn fts_read
-function returns a pointer to an
-.Fa FTSENT
-structure describing a file in
-the hierarchy.
-Directories (that are readable and do not cause cycles) are visited at
-least twice, once in pre-order and once in post-order.
-All other files are visited at least once.
-(Hard links between directories that do not cause cycles or symbolic
-links to symbolic links may cause files to be visited more than once,
-or directories more than twice.)
-.Pp
-If all the members of the hierarchy have been returned,
-.Fn fts_read
-returns
-.Dv NULL
-and sets the external variable
-.Va errno
-to 0.
-If an error unrelated to a file in the hierarchy occurs,
-.Fn fts_read
-returns
-.Dv NULL
-and sets
-.Va errno
-appropriately.
-If an error related to a returned file occurs, a pointer to an
-.Fa FTSENT
-structure is returned, and
-.Va errno
-may or may not have been set (see
-.Fa fts_info ) .
-.Pp
-The
-.Fa FTSENT
-structures returned by
-.Fn fts_read
-may be overwritten after a call to
-.Fn fts_close
-on the same file hierarchy stream, or, after a call to
-.Fn fts_read
-on the same file hierarchy stream unless they represent a file of type
-directory, in which case they will not be overwritten until after a call to
-.Fn fts_read
-after the
-.Fa FTSENT
-structure has been returned by the function
-.Fn fts_read
-in post-order.
-.Sh FTS_CHILDREN
-The
-.Fn fts_children
-function returns a pointer to an
-.Fa FTSENT
-structure describing the first entry in a NULL-terminated linked list of
-the files in the directory represented by the
-.Fa FTSENT
-structure most recently returned by
-.Fn fts_read .
-The list is linked through the
-.Fa fts_link
-field of the
-.Fa FTSENT
-structure, and is ordered by the user-specified comparison function, if any.
-Repeated calls to
-.Fn fts_children
-will recreate this linked list.
-.Pp
-As a special case, if
-.Fn fts_read
-has not yet been called for a hierarchy,
-.Fn fts_children
-will return a pointer to the files in the logical directory specified to
-.Fn fts_open ,
-i.e. the arguments specified to
-.Fn fts_open .
-Otherwise, if the
-.Fa FTSENT
-structure most recently returned by
-.Fn fts_read
-is not a directory being visited in pre-order,
-or the directory does not contain any files,
-.Fn fts_children
-returns
-.Dv NULL
-and sets
-.Va errno
-to zero.
-If an error occurs,
-.Fn fts_children
-returns
-.Dv NULL
-and sets
-.Va errno
-appropriately.
-.Pp
-The
-.Fa FTSENT
-structures returned by
-.Fn fts_children
-may be overwritten after a call to
-.Fn fts_children ,
-.Fn fts_close
-or
-.Fn fts_read
-on the same file hierarchy stream.
-.Pp
-.Em Option
-may be set to the following value:
-.Bl -tag -width FTS_NAMEONLY
-.It Dv FTS_NAMEONLY
-Only the names of the files are needed.
-The contents of all the fields in the returned linked list of structures
-are undefined with the exception of the
-.Fa fts_name
-and
-.Fa fts_namelen
-fields.
-.El
-.Sh FTS_SET
-The function
-.Fn fts_set
-allows the user application to determine further processing for the
-file
-.Fa f
-of the stream
-.Fa ftsp .
-The
-.Fn fts_set
-function
-returns 0 on success, and \-1 if an error occurs.
-.Em Option
-must be set to one of the following values:
-.Bl -tag -width FTS_PHYSICAL
-.It Dv FTS_AGAIN
-Re-visit the file; any file type may be re-visited.
-The next call to
-.Fn fts_read
-will return the referenced file.
-The
-.Fa fts_stat
-and
-.Fa fts_info
-fields of the structure will be reinitialized at that time,
-but no other fields will have been changed.
-This option is meaningful only for the most recently returned
-file from
-.Fn fts_read .
-Normal use is for post-order directory visits, where it causes the
-directory to be re-visited (in both pre and post-order) as well as all
-of its descendants.
-.It Dv FTS_FOLLOW
-The referenced file must be a symbolic link.
-If the referenced file is the one most recently returned by
-.Fn fts_read ,
-the next call to
-.Fn fts_read
-returns the file with the
-.Fa fts_info
-and
-.Fa fts_statp
-fields reinitialized to reflect the target of the symbolic link instead
-of the symbolic link itself.
-If the file is one of those most recently returned by
-.Fn fts_children ,
-the
-.Fa fts_info
-and
-.Fa fts_statp
-fields of the structure, when returned by
-.Fn fts_read ,
-will reflect the target of the symbolic link instead of the symbolic link
-itself.
-In either case, if the target of the symbolic link does not exist the
-fields of the returned structure will be unchanged and the
-.Fa fts_info
-field will be set to
-.Dv FTS_SLNONE .
-.Pp
-If the target of the link is a directory, the pre-order return, followed
-by the return of all of its descendants, followed by a post-order return,
-is done.
-.It Dv FTS_SKIP
-No descendants of this file are visited.
-The file may be one of those most recently returned by either
-.Fn fts_children
-or
-.Fn fts_read .
-.El
-.Sh FTS_CLOSE
-The
-.Fn fts_close
-function closes a file hierarchy stream
-.Fa ftsp
-and restores the current directory to the directory from which
-.Fn fts_open
-was called to open
-.Fa ftsp .
-The
-.Fn fts_close
-function
-returns 0 on success, and \-1 if an error occurs.
-.Sh ERRORS
-The function
-.Fn fts_open
-may fail and set
-.Va errno
-for any of the errors specified for the library functions
-.Xr open 2
-and
-.Xr malloc 3 .
-.Pp
-The function
-.Fn fts_close
-may fail and set
-.Va errno
-for any of the errors specified for the library functions
-.Xr chdir 2
-and
-.Xr close 2 .
-.Pp
-The functions
-.Fn fts_read
-and
-.Fn fts_children
-may fail and set
-.Va errno
-for any of the errors specified for the library functions
-.Xr chdir 2 ,
-.Xr malloc 3 ,
-.Xr opendir 3 ,
-.Xr readdir 3
-and
-.Xr stat 2 .
-.Pp
-In addition,
-.Fn fts_children ,
-.Fn fts_open
-and
-.Fn fts_set
-may fail and set
-.Va errno
-as follows:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The options were invalid.
-.El
-.Sh SEE ALSO
-.Xr find 1 ,
-.Xr chdir 2 ,
-.Xr stat 2 ,
-.Xr qsort 3
-.Sh STANDARDS
-The
-.Nm fts
-utility is expected to be included in a future
-.St -p1003.1-88
-revision.
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
deleted file mode 100644
index 73832e5..0000000
--- a/lib/libc/gen/fts.c
+++ /dev/null
@@ -1,1039 +0,0 @@
-/* $OpenBSD: fts.c,v 1.9 1997/08/02 00:13:49 millert Exp $ */
-
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <fts.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-static FTSENT *fts_alloc __P((FTS *, char *, int));
-static FTSENT *fts_build __P((FTS *, int));
-static void fts_lfree __P((FTSENT *));
-static void fts_load __P((FTS *, FTSENT *));
-static size_t fts_maxarglen __P((char * const *));
-static void fts_padjust __P((FTS *, void *));
-static int fts_palloc __P((FTS *, size_t));
-static FTSENT *fts_sort __P((FTS *, FTSENT *, int));
-static u_short fts_stat __P((FTS *, FTSENT *, int));
-static int fts_safe_changedir __P((FTS *, FTSENT *, int));
-
-#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
-
-#define CLR(opt) (sp->fts_options &= ~(opt))
-#define ISSET(opt) (sp->fts_options & (opt))
-#define SET(opt) (sp->fts_options |= (opt))
-
-#define CHDIR(sp, path) (!ISSET(FTS_NOCHDIR) && chdir(path))
-#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd))
-
-/* fts_build flags */
-#define BCHILD 1 /* fts_children */
-#define BNAMES 2 /* fts_children, names only */
-#define BREAD 3 /* fts_read */
-
-FTS *
-fts_open(argv, options, compar)
- char * const *argv;
- register int options;
- int (*compar) __P((const FTSENT **, const FTSENT **));
-{
- register FTS *sp;
- register FTSENT *p, *root;
- register int nitems;
- FTSENT *parent, *tmp;
- int len;
-
- /* Options check. */
- if (options & ~FTS_OPTIONMASK) {
- errno = EINVAL;
- return (NULL);
- }
-
- /* Allocate/initialize the stream */
- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
- return (NULL);
- memset(sp, 0, sizeof(FTS));
- sp->fts_compar = compar;
- sp->fts_options = options;
-
- /* Logical walks turn on NOCHDIR; symbolic links are too hard. */
- if (ISSET(FTS_LOGICAL))
- SET(FTS_NOCHDIR);
-
- /*
- * Start out with 1K of path space, and enough, in any case,
- * to hold the user's paths.
- */
- if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
- goto mem1;
-
- /* Allocate/initialize root's parent. */
- if ((parent = fts_alloc(sp, "", 0)) == NULL)
- goto mem2;
- parent->fts_level = FTS_ROOTPARENTLEVEL;
-
- /* Allocate/initialize root(s). */
- for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) {
- /* Don't allow zero-length paths. */
- if ((len = strlen(*argv)) == 0) {
- errno = ENOENT;
- goto mem3;
- }
-
- p = fts_alloc(sp, *argv, len);
- p->fts_level = FTS_ROOTLEVEL;
- p->fts_parent = parent;
- p->fts_accpath = p->fts_name;
- p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
-
- /* Command-line "." and ".." are real directories. */
- if (p->fts_info == FTS_DOT)
- p->fts_info = FTS_D;
-
- /*
- * If comparison routine supplied, traverse in sorted
- * order; otherwise traverse in the order specified.
- */
- if (compar) {
- p->fts_link = root;
- root = p;
- } else {
- p->fts_link = NULL;
- if (root == NULL)
- tmp = root = p;
- else {
- tmp->fts_link = p;
- tmp = p;
- }
- }
- }
- if (compar && nitems > 1)
- root = fts_sort(sp, root, nitems);
-
- /*
- * Allocate a dummy pointer and make fts_read think that we've just
- * finished the node before the root(s); set p->fts_info to FTS_INIT
- * so that everything about the "current" node is ignored.
- */
- if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
- goto mem3;
- sp->fts_cur->fts_link = root;
- sp->fts_cur->fts_info = FTS_INIT;
-
- /*
- * If using chdir(2), grab a file descriptor pointing to dot to insure
- * that we can get back here; this could be avoided for some paths,
- * but almost certainly not worth the effort. Slashes, symbolic links,
- * and ".." are all fairly nasty problems. Note, if we can't get the
- * descriptor we run anyway, just more slowly.
- */
- if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
- SET(FTS_NOCHDIR);
-
- return (sp);
-
-mem3: fts_lfree(root);
- free(parent);
-mem2: free(sp->fts_path);
-mem1: free(sp);
- return (NULL);
-}
-
-static void
-fts_load(sp, p)
- FTS *sp;
- register FTSENT *p;
-{
- register int len;
- register char *cp;
-
- /*
- * Load the stream structure for the next traversal. Since we don't
- * actually enter the directory until after the preorder visit, set
- * the fts_accpath field specially so the chdir gets done to the right
- * place and the user can access the first node. From fts_open it's
- * known that the path will fit.
- */
- len = p->fts_pathlen = p->fts_namelen;
- memmove(sp->fts_path, p->fts_name, len + 1);
- if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
- len = strlen(++cp);
- memmove(p->fts_name, cp, len + 1);
- p->fts_namelen = len;
- }
- p->fts_accpath = p->fts_path = sp->fts_path;
- sp->fts_dev = p->fts_dev;
-}
-
-int
-fts_close(sp)
- FTS *sp;
-{
- register FTSENT *freep, *p;
- int saved_errno;
-
- /*
- * This still works if we haven't read anything -- the dummy structure
- * points to the root list, so we step through to the end of the root
- * list which has a valid parent pointer.
- */
- if (sp->fts_cur) {
- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
- freep = p;
- p = p->fts_link ? p->fts_link : p->fts_parent;
- free(freep);
- }
- free(p);
- }
-
- /* Free up child linked list, sort array, path buffer. */
- if (sp->fts_child)
- fts_lfree(sp->fts_child);
- if (sp->fts_array)
- free(sp->fts_array);
- free(sp->fts_path);
-
- /* Return to original directory, save errno if necessary. */
- if (!ISSET(FTS_NOCHDIR)) {
- saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
- (void)close(sp->fts_rfd);
- }
-
- /* Free up the stream pointer. */
- free(sp);
-
- /* Set errno and return. */
- if (!ISSET(FTS_NOCHDIR) && saved_errno) {
- errno = saved_errno;
- return (-1);
- }
- return (0);
-}
-
-/*
- * Special case of "/" at the end of the path so that slashes aren't
- * appended which would cause paths to be written as "....//foo".
- */
-#define NAPPEND(p) \
- (p->fts_path[p->fts_pathlen - 1] == '/' \
- ? p->fts_pathlen - 1 : p->fts_pathlen)
-
-FTSENT *
-fts_read(sp)
- register FTS *sp;
-{
- register FTSENT *p, *tmp;
- register int instr;
- register char *t;
- int saved_errno;
-
- /* If finished or unrecoverable error, return NULL. */
- if (sp->fts_cur == NULL || ISSET(FTS_STOP))
- return (NULL);
-
- /* Set current node pointer. */
- p = sp->fts_cur;
-
- /* Save and zero out user instructions. */
- instr = p->fts_instr;
- p->fts_instr = FTS_NOINSTR;
-
- /* Any type of file may be re-visited; re-stat and re-turn. */
- if (instr == FTS_AGAIN) {
- p->fts_info = fts_stat(sp, p, 0);
- return (p);
- }
-
- /*
- * Following a symlink -- SLNONE test allows application to see
- * SLNONE and recover. If indirecting through a symlink, have
- * keep a pointer to current location. If unable to get that
- * pointer, follow fails.
- */
- if (instr == FTS_FOLLOW &&
- (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
- p->fts_info = fts_stat(sp, p, 1);
- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
- if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
- p->fts_errno = errno;
- p->fts_info = FTS_ERR;
- } else
- p->fts_flags |= FTS_SYMFOLLOW;
- return (p);
- }
-
- /* Directory in pre-order. */
- if (p->fts_info == FTS_D) {
- /* If skipped or crossed mount point, do post-order visit. */
- if (instr == FTS_SKIP ||
- (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
- if (p->fts_flags & FTS_SYMFOLLOW)
- (void)close(p->fts_symfd);
- if (sp->fts_child) {
- fts_lfree(sp->fts_child);
- sp->fts_child = NULL;
- }
- p->fts_info = FTS_DP;
- return (p);
- }
-
- /* Rebuild if only read the names and now traversing. */
- if (sp->fts_child && ISSET(FTS_NAMEONLY)) {
- CLR(FTS_NAMEONLY);
- fts_lfree(sp->fts_child);
- sp->fts_child = NULL;
- }
-
- /*
- * Cd to the subdirectory.
- *
- * If have already read and now fail to chdir, whack the list
- * to make the names come out right, and set the parent errno
- * so the application will eventually get an error condition.
- * Set the FTS_DONTCHDIR flag so that when we logically change
- * directories back to the parent we don't do a chdir.
- *
- * If haven't read do so. If the read fails, fts_build sets
- * FTS_STOP or the fts_info field of the node.
- */
- if (sp->fts_child) {
- if (fts_safe_changedir(sp, p, -1)) {
- p->fts_errno = errno;
- p->fts_flags |= FTS_DONTCHDIR;
- for (p = sp->fts_child; p; p = p->fts_link)
- p->fts_accpath =
- p->fts_parent->fts_accpath;
- }
- } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
- if (ISSET(FTS_STOP))
- return (NULL);
- return (p);
- }
- p = sp->fts_child;
- sp->fts_child = NULL;
- goto name;
- }
-
- /* Move to the next node on this level. */
-next: tmp = p;
- if ((p = p->fts_link)) {
- free(tmp);
-
- /*
- * If reached the top, return to the original directory, and
- * load the paths for the next root.
- */
- if (p->fts_level == FTS_ROOTLEVEL) {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
- fts_load(sp, p);
- return (sp->fts_cur = p);
- }
-
- /*
- * User may have called fts_set on the node. If skipped,
- * ignore. If followed, get a file descriptor so we can
- * get back if necessary.
- */
- if (p->fts_instr == FTS_SKIP)
- goto next;
- if (p->fts_instr == FTS_FOLLOW) {
- p->fts_info = fts_stat(sp, p, 1);
- if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
- if ((p->fts_symfd =
- open(".", O_RDONLY, 0)) < 0) {
- p->fts_errno = errno;
- p->fts_info = FTS_ERR;
- } else
- p->fts_flags |= FTS_SYMFOLLOW;
- p->fts_instr = FTS_NOINSTR;
- }
-
-name: t = sp->fts_path + NAPPEND(p->fts_parent);
- *t++ = '/';
- memmove(t, p->fts_name, p->fts_namelen + 1);
- return (sp->fts_cur = p);
- }
-
- /* Move up to the parent node. */
- p = tmp->fts_parent;
- free(tmp);
-
- if (p->fts_level == FTS_ROOTPARENTLEVEL) {
- /*
- * Done; free everything up and set errno to 0 so the user
- * can distinguish between error and EOF.
- */
- free(p);
- errno = 0;
- return (sp->fts_cur = NULL);
- }
-
- /* Nul terminate the pathname. */
- sp->fts_path[p->fts_pathlen] = '\0';
-
- /*
- * Return to the parent directory. If at a root node or came through
- * a symlink, go back through the file descriptor. Otherwise, cd up
- * one directory.
- */
- if (p->fts_level == FTS_ROOTLEVEL) {
- if (FCHDIR(sp, sp->fts_rfd)) {
- SET(FTS_STOP);
- return (NULL);
- }
- } else if (p->fts_flags & FTS_SYMFOLLOW) {
- if (FCHDIR(sp, p->fts_symfd)) {
- saved_errno = errno;
- (void)close(p->fts_symfd);
- errno = saved_errno;
- SET(FTS_STOP);
- return (NULL);
- }
- (void)close(p->fts_symfd);
- } else if (!(p->fts_flags & FTS_DONTCHDIR)) {
- if (CHDIR(sp, "..")) {
- SET(FTS_STOP);
- return (NULL);
- }
- }
- p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
- return (sp->fts_cur = p);
-}
-
-/*
- * Fts_set takes the stream as an argument although it's not used in this
- * implementation; it would be necessary if anyone wanted to add global
- * semantics to fts using fts_set. An error return is allowed for similar
- * reasons.
- */
-/* ARGSUSED */
-int
-fts_set(sp, p, instr)
- FTS *sp;
- FTSENT *p;
- int instr;
-{
- if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
- instr != FTS_NOINSTR && instr != FTS_SKIP) {
- errno = EINVAL;
- return (1);
- }
- p->fts_instr = instr;
- return (0);
-}
-
-FTSENT *
-fts_children(sp, instr)
- register FTS *sp;
- int instr;
-{
- register FTSENT *p;
- int fd;
-
- if (instr && instr != FTS_NAMEONLY) {
- errno = EINVAL;
- return (NULL);
- }
-
- /* Set current node pointer. */
- p = sp->fts_cur;
-
- /*
- * Errno set to 0 so user can distinguish empty directory from
- * an error.
- */
- errno = 0;
-
- /* Fatal errors stop here. */
- if (ISSET(FTS_STOP))
- return (NULL);
-
- /* Return logical hierarchy of user's arguments. */
- if (p->fts_info == FTS_INIT)
- return (p->fts_link);
-
- /*
- * If not a directory being visited in pre-order, stop here. Could
- * allow FTS_DNR, assuming the user has fixed the problem, but the
- * same effect is available with FTS_AGAIN.
- */
- if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
- return (NULL);
-
- /* Free up any previous child list. */
- if (sp->fts_child)
- fts_lfree(sp->fts_child);
-
- if (instr == FTS_NAMEONLY) {
- SET(FTS_NAMEONLY);
- instr = BNAMES;
- } else
- instr = BCHILD;
-
- /*
- * If using chdir on a relative path and called BEFORE fts_read does
- * its chdir to the root of a traversal, we can lose -- we need to
- * chdir into the subdirectory, and we don't know where the current
- * directory is, so we can't get back so that the upcoming chdir by
- * fts_read will work.
- */
- if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
- ISSET(FTS_NOCHDIR))
- return (sp->fts_child = fts_build(sp, instr));
-
- if ((fd = open(".", O_RDONLY, 0)) < 0)
- return (NULL);
- sp->fts_child = fts_build(sp, instr);
- if (fchdir(fd))
- return (NULL);
- (void)close(fd);
- return (sp->fts_child);
-}
-
-/*
- * This is the tricky part -- do not casually change *anything* in here. The
- * idea is to build the linked list of entries that are used by fts_children
- * and fts_read. There are lots of special cases.
- *
- * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is
- * set and it's a physical walk (so that symbolic links can't be directories),
- * we can do things quickly. First, if it's a 4.4BSD file system, the type
- * of the file is in the directory entry. Otherwise, we assume that the number
- * of subdirectories in a node is equal to the number of links to the parent.
- * The former skips all stat calls. The latter skips stat calls in any leaf
- * directories and for any files after the subdirectories in the directory have
- * been found, cutting the stat calls by about 2/3.
- */
-static FTSENT *
-fts_build(sp, type)
- register FTS *sp;
- int type;
-{
- register struct dirent *dp;
- register FTSENT *p, *head;
- register int nitems;
- FTSENT *cur, *tail;
- DIR *dirp;
- void *adjaddr;
- int cderrno, descend, len, level, maxlen, nlinks, oflag, saved_errno;
- char *cp;
-
- /* Set current node pointer. */
- cur = sp->fts_cur;
-
- /*
- * Open the directory for reading. If this fails, we're done.
- * If being called from fts_read, set the fts_info field.
- */
-#ifdef FTS_WHITEOUT
- if (ISSET(FTS_WHITEOUT))
- oflag = DTF_NODUP|DTF_REWIND;
- else
- oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND;
-#else
-#define __opendir2(path, flag) opendir(path)
-#endif
- if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) {
- if (type == BREAD) {
- cur->fts_info = FTS_DNR;
- cur->fts_errno = errno;
- }
- return (NULL);
- }
-
- /*
- * Nlinks is the number of possible entries of type directory in the
- * directory if we're cheating on stat calls, 0 if we're not doing
- * any stat calls at all, -1 if we're doing stats on everything.
- */
- if (type == BNAMES)
- nlinks = 0;
- else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL))
- nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2);
- else
- nlinks = -1;
-
-#ifdef notdef
- (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink);
- (void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n",
- ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT));
-#endif
- /*
- * If we're going to need to stat anything or we want to descend
- * and stay in the directory, chdir. If this fails we keep going,
- * but set a flag so we don't chdir after the post-order visit.
- * We won't be able to stat anything, but we can still return the
- * names themselves. Note, that since fts_read won't be able to
- * chdir into the directory, it will have to return different path
- * names than before, i.e. "a/b" instead of "b". Since the node
- * has already been visited in pre-order, have to wait until the
- * post-order visit to return the error. There is a special case
- * here, if there was nothing to stat then it's not an error to
- * not be able to stat. This is all fairly nasty. If a program
- * needed sorted entries or stat information, they had better be
- * checking FTS_NS on the returned nodes.
- */
- cderrno = 0;
- if (nlinks || type == BREAD)
- if (fts_safe_changedir(sp, cur, dirfd(dirp))) {
- if (nlinks && type == BREAD)
- cur->fts_errno = errno;
- cur->fts_flags |= FTS_DONTCHDIR;
- descend = 0;
- cderrno = errno;
- (void)closedir(dirp);
- dirp = NULL;
- } else
- descend = 1;
- else
- descend = 0;
-
- /*
- * Figure out the max file name length that can be stored in the
- * current path -- the inner loop allocates more path as necessary.
- * We really wouldn't have to do the maxlen calculations here, we
- * could do them in fts_read before returning the path, but it's a
- * lot easier here since the length is part of the dirent structure.
- *
- * If not changing directories set a pointer so that can just append
- * each new name into the path.
- */
- maxlen = sp->fts_pathlen - cur->fts_pathlen - 1;
- len = NAPPEND(cur);
- if (ISSET(FTS_NOCHDIR)) {
- cp = sp->fts_path + len;
- *cp++ = '/';
- }
-
- level = cur->fts_level + 1;
-
- /* Read the directory, attaching each entry to the `link' pointer. */
- adjaddr = NULL;
- for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
- if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
- continue;
-
- if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_namlen)) == NULL)
- goto mem1;
- if (dp->d_namlen > maxlen) {
- if (fts_palloc(sp, (size_t)dp->d_namlen)) {
- /*
- * No more memory for path or structures. Save
- * errno, free up the current structure and the
- * structures already allocated.
- */
-mem1: saved_errno = errno;
- if (p)
- free(p);
- fts_lfree(head);
- (void)closedir(dirp);
- errno = saved_errno;
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- return (NULL);
- }
- adjaddr = sp->fts_path;
- maxlen = sp->fts_pathlen - sp->fts_cur->fts_pathlen - 1;
- }
-
- p->fts_pathlen = len + dp->d_namlen + 1;
- p->fts_parent = sp->fts_cur;
- p->fts_level = level;
-
-#ifdef FTS_WHITEOUT
- if (dp->d_type == DT_WHT)
- p->fts_flags |= FTS_ISW;
-#endif
-
- if (cderrno) {
- if (nlinks) {
- p->fts_info = FTS_NS;
- p->fts_errno = cderrno;
- } else
- p->fts_info = FTS_NSOK;
- p->fts_accpath = cur->fts_accpath;
- } else if (nlinks == 0
-#ifdef DT_DIR
- || (nlinks > 0 &&
- dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
-#endif
- ) {
- p->fts_accpath =
- ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
- p->fts_info = FTS_NSOK;
- } else {
- /* Build a file name for fts_stat to stat. */
- if (ISSET(FTS_NOCHDIR)) {
- p->fts_accpath = p->fts_path;
- memmove(cp, p->fts_name, p->fts_namelen + 1);
- } else
- p->fts_accpath = p->fts_name;
- /* Stat it. */
- p->fts_info = fts_stat(sp, p, 0);
-
- /* Decrement link count if applicable. */
- if (nlinks > 0 && (p->fts_info == FTS_D ||
- p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
- --nlinks;
- }
-
- /* We walk in directory order so "ls -f" doesn't get upset. */
- p->fts_link = NULL;
- if (head == NULL)
- head = tail = p;
- else {
- tail->fts_link = p;
- tail = p;
- }
- ++nitems;
- }
- if (dirp)
- (void)closedir(dirp);
-
- /*
- * If had to realloc the path, adjust the addresses for the rest
- * of the tree.
- */
- if (adjaddr)
- fts_padjust(sp, adjaddr);
-
- /*
- * If not changing directories, reset the path back to original
- * state.
- */
- if (ISSET(FTS_NOCHDIR)) {
- if (len == sp->fts_pathlen)
- --cp;
- *cp = '\0';
- }
-
- /*
- * If descended after called from fts_children or after called from
- * fts_read and nothing found, get back. At the root level we use
- * the saved fd; if one of fts_open()'s arguments is a relative path
- * to an empty directory, we wind up here with no other way back. If
- * can't get back, we're done.
- */
- if (descend && (type == BCHILD || !nitems) &&
- (cur->fts_level == FTS_ROOTLEVEL ?
- FCHDIR(sp, sp->fts_rfd) : CHDIR(sp, ".."))) {
- cur->fts_info = FTS_ERR;
- SET(FTS_STOP);
- return (NULL);
- }
-
- /* If didn't find anything, return NULL. */
- if (!nitems) {
- if (type == BREAD)
- cur->fts_info = FTS_DP;
- return (NULL);
- }
-
- /* Sort the entries. */
- if (sp->fts_compar && nitems > 1)
- head = fts_sort(sp, head, nitems);
- return (head);
-}
-
-static u_short
-fts_stat(sp, p, follow)
- FTS *sp;
- register FTSENT *p;
- int follow;
-{
- register FTSENT *t;
- register dev_t dev;
- register ino_t ino;
- struct stat *sbp, sb;
- int saved_errno;
-
- /* If user needs stat info, stat buffer already allocated. */
- sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
-
-#ifdef FTS_WHITEOUT
- /* check for whiteout */
- if (p->fts_flags & FTS_ISW) {
- if (sbp != &sb) {
- memset(sbp, '\0', sizeof (*sbp));
- sbp->st_mode = S_IFWHT;
- }
- return (FTS_W);
- }
-#endif
-
- /*
- * If doing a logical walk, or application requested FTS_FOLLOW, do
- * a stat(2). If that fails, check for a non-existent symlink. If
- * fail, set the errno from the stat call.
- */
- if (ISSET(FTS_LOGICAL) || follow) {
- if (stat(p->fts_accpath, sbp)) {
- saved_errno = errno;
- if (!lstat(p->fts_accpath, sbp)) {
- errno = 0;
- return (FTS_SLNONE);
- }
- p->fts_errno = saved_errno;
- goto err;
- }
- } else if (lstat(p->fts_accpath, sbp)) {
- p->fts_errno = errno;
-err: memset(sbp, 0, sizeof(struct stat));
- return (FTS_NS);
- }
-
- if (S_ISDIR(sbp->st_mode)) {
- /*
- * Set the device/inode. Used to find cycles and check for
- * crossing mount points. Also remember the link count, used
- * in fts_build to limit the number of stat calls. It is
- * understood that these fields are only referenced if fts_info
- * is set to FTS_D.
- */
- dev = p->fts_dev = sbp->st_dev;
- ino = p->fts_ino = sbp->st_ino;
- p->fts_nlink = sbp->st_nlink;
-
- if (ISDOT(p->fts_name))
- return (FTS_DOT);
-
- /*
- * Cycle detection is done by brute force when the directory
- * is first encountered. If the tree gets deep enough or the
- * number of symbolic links to directories is high enough,
- * something faster might be worthwhile.
- */
- for (t = p->fts_parent;
- t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
- if (ino == t->fts_ino && dev == t->fts_dev) {
- p->fts_cycle = t;
- return (FTS_DC);
- }
- return (FTS_D);
- }
- if (S_ISLNK(sbp->st_mode))
- return (FTS_SL);
- if (S_ISREG(sbp->st_mode))
- return (FTS_F);
- return (FTS_DEFAULT);
-}
-
-static FTSENT *
-fts_sort(sp, head, nitems)
- FTS *sp;
- FTSENT *head;
- register int nitems;
-{
- register FTSENT **ap, *p;
-
- /*
- * Construct an array of pointers to the structures and call qsort(3).
- * Reassemble the array in the order returned by qsort. If unable to
- * sort for memory reasons, return the directory entries in their
- * current order. Allocate enough space for the current needs plus
- * 40 so don't realloc one entry at a time.
- */
- if (nitems > sp->fts_nitems) {
- sp->fts_nitems = nitems + 40;
- if ((sp->fts_array = realloc(sp->fts_array,
- (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
- sp->fts_nitems = 0;
- return (head);
- }
- }
- for (ap = sp->fts_array, p = head; p; p = p->fts_link)
- *ap++ = p;
- qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
- for (head = *(ap = sp->fts_array); --nitems; ++ap)
- ap[0]->fts_link = ap[1];
- ap[0]->fts_link = NULL;
- return (head);
-}
-
-static FTSENT *
-fts_alloc(sp, name, namelen)
- FTS *sp;
- char *name;
- register int namelen;
-{
- register FTSENT *p;
- size_t len;
-
- /*
- * The file name is a variable length array and no stat structure is
- * necessary if the user has set the nostat bit. Allocate the FTSENT
- * structure, the file name and the stat structure in one chunk, but
- * be careful that the stat structure is reasonably aligned. Since the
- * fts_name field is declared to be of size 1, the fts_name pointer is
- * namelen + 2 before the first possible address of the stat structure.
- */
- len = sizeof(FTSENT) + namelen;
- if (!ISSET(FTS_NOSTAT))
- len += sizeof(struct stat) + ALIGNBYTES;
- if ((p = malloc(len)) == NULL)
- return (NULL);
-
- /* Copy the name plus the trailing NULL. */
- memmove(p->fts_name, name, namelen + 1);
-
- if (!ISSET(FTS_NOSTAT))
- p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
- p->fts_namelen = namelen;
- p->fts_path = sp->fts_path;
- p->fts_errno = 0;
- p->fts_flags = 0;
- p->fts_instr = FTS_NOINSTR;
- p->fts_number = 0;
- p->fts_pointer = NULL;
- return (p);
-}
-
-static void
-fts_lfree(head)
- register FTSENT *head;
-{
- register FTSENT *p;
-
- /* Free a linked list of structures. */
- while ((p = head)) {
- head = head->fts_link;
- free(p);
- }
-}
-
-/*
- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
- * though the kernel won't resolve them. Add the size (not just what's needed)
- * plus 256 bytes so don't realloc the path 2 bytes at a time.
- */
-static int
-fts_palloc(sp, more)
- FTS *sp;
- size_t more;
-{
- sp->fts_pathlen += more + 256;
- sp->fts_path = realloc(sp->fts_path, (size_t)sp->fts_pathlen);
- return (sp->fts_path == NULL);
-}
-
-/*
- * When the path is realloc'd, have to fix all of the pointers in structures
- * already returned.
- */
-static void
-fts_padjust(sp, addr)
- FTS *sp;
- void *addr;
-{
- FTSENT *p;
-
-#define ADJUST(p) { \
- (p)->fts_accpath = \
- (char *)addr + ((p)->fts_accpath - (p)->fts_path); \
- (p)->fts_path = addr; \
-}
- /* Adjust the current set of children. */
- for (p = sp->fts_child; p; p = p->fts_link)
- ADJUST(p);
-
- /* Adjust the rest of the tree. */
- for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
- ADJUST(p);
- p = p->fts_link ? p->fts_link : p->fts_parent;
- }
-}
-
-static size_t
-fts_maxarglen(argv)
- char * const *argv;
-{
- size_t len, max;
-
- for (max = 0; *argv; ++argv)
- if ((len = strlen(*argv)) > max)
- max = len;
- return (max);
-}
-
-/*
- * Change to dir specified by fd or p->fts_accpath without getting
- * tricked by someone changing the world out from underneath us.
- * Assumes p->fts_dev and p->fts_ino are filled in.
- */
-static int
-fts_safe_changedir(sp, p, fd)
- FTS *sp;
- FTSENT *p;
- int fd;
-{
- int ret, oerrno, newfd;
- struct stat sb;
-
- newfd = fd;
- if (ISSET(FTS_NOCHDIR))
- return (0);
- if (fd < 0 && (newfd = open(p->fts_accpath, O_RDONLY, 0)) < 0)
- return (-1);
- if (fstat(newfd, &sb)) {
- ret = -1;
- goto bail;
- }
- if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
- errno = ENOENT; /* disinformation */
- ret = -1;
- goto bail;
- }
- ret = fchdir(newfd);
-bail:
- oerrno = errno;
- if (fd < 0)
- (void)close(newfd);
- errno = oerrno;
- return (ret);
-}
diff --git a/lib/libc/gen/getbootfile.3 b/lib/libc/gen/getbootfile.3
deleted file mode 100644
index 3c2e783..0000000
--- a/lib/libc/gen/getbootfile.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)gethostname.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd September 23, 1994
-.Dt GETBOOTFILE 3
-.Os
-.Sh NAME
-.Nm getbootfile
-.Nd get kernel boot file name
-.Sh SYNOPSIS
-.Fd #include <paths.h>
-.Ft const char *
-.Fn getbootfile void
-.Sh DESCRIPTION
-The
-.Fn getbootfile
-function retrieves the full pathname of the file from which the
-current kernel was loaded, and returns a static pointer to the name.
-A read/write interface to this information is available via the
-.Xr sysctl 3
-MIB variable
-.Dq Li kern.bootfile .
-.Sh RETURN VALUES
-If the call succeeds a string giving the pathname is returned. If it
-fails, a a null pointer is returned and an error code is
-placed in the global location
-.Va errno .
-.Sh SEE ALSO
-.Xr sysctl 3
-.Sh BUGS
-If the boot blocks have not been modified to pass this information into
-the kernel at boot time, the static string
-.Dq Pa /kernel
-is returned instead of the real boot file.
-.Sh HISTORY
-The
-.Fn getbootfile
-function call appeared in
-.Fx 2.0 .
diff --git a/lib/libc/gen/getbootfile.c b/lib/libc/gen/getbootfile.c
deleted file mode 100644
index 5b293a7..0000000
--- a/lib/libc/gen/getbootfile.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char sccsid[] = "From: @(#)gethostname.c 8.1 (Berkeley) 6/4/93";*/
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-const char *
-getbootfile(void)
-{
- static char name[MAXPATHLEN];
- size_t size = sizeof name;
- int mib[2];
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_BOOTFILE;
- if (sysctl(mib, 2, name, &size, NULL, 0) == -1)
- return ("/kernel");
- return (name);
-}
diff --git a/lib/libc/gen/getbsize.3 b/lib/libc/gen/getbsize.3
deleted file mode 100644
index 48ef7ac..0000000
--- a/lib/libc/gen/getbsize.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getbsize.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETBSIZE 3
-.Os BSD 4.4
-.Sh NAME
-.Nm getbsize
-.Nd get user block size
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft char *
-.Fn getbsize "int *headerlenp" "long *blocksizep"
-.Sh DESCRIPTION
-The
-.Fn getbsize
-function determines the user's preferred block size based on the value of the
-.Dq BLOCKSIZE
-environment variable; see
-.Xr environ 7
-for details on its use and format.
-.Pp
-The
-.Fn getbsize
-function returns a pointer to a null-terminated string describing
-the block size, something like
-.Dq 1K-blocks .
-The memory referenced by
-.Fa headerlenp
-is filled in with the length of the string (not including the
-terminating null).
-The memory referenced by
-.Fa blocksizep
-is filled in with block size, in bytes.
-.Pp
-If the user's block size is unreasonable, a warning message is
-written to standard error and the returned information reflects
-a block size of 512 bytes.
-.Sh SEE ALSO
-.Xr df 1 ,
-.Xr du 1 ,
-.Xr ls 1 ,
-.Xr systat 1 ,
-.Xr environ 7
-.Sh HISTORY
-The
-.Fn getbsize
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/getbsize.c b/lib/libc/gen/getbsize.c
deleted file mode 100644
index fc7b123..0000000
--- a/lib/libc/gen/getbsize.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)getbsize.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <err.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-char *
-getbsize(headerlenp, blocksizep)
- int *headerlenp;
- long *blocksizep;
-{
- static char header[20];
- long n, max, mul, blocksize;
- char *ep, *p, *form;
-
-#define KB (1024L)
-#define MB (1024L * 1024L)
-#define GB (1024L * 1024L * 1024L)
-#define MAXB GB /* No tera, peta, nor exa. */
- form = "";
- if ((p = getenv("BLOCKSIZE")) != NULL && *p != '\0') {
- if ((n = strtol(p, &ep, 10)) < 0)
- goto underflow;
- if (n == 0)
- n = 1;
- if (*ep && ep[1])
- goto fmterr;
- switch (*ep) {
- case 'G': case 'g':
- form = "G";
- max = MAXB / GB;
- mul = GB;
- break;
- case 'K': case 'k':
- form = "K";
- max = MAXB / KB;
- mul = KB;
- break;
- case 'M': case 'm':
- form = "M";
- max = MAXB / MB;
- mul = MB;
- break;
- case '\0':
- max = MAXB;
- mul = 1;
- break;
- default:
-fmterr: warnx("%s: unknown blocksize", p);
- n = 512;
- mul = 1;
- break;
- }
- if (n > max) {
- warnx("maximum blocksize is %dG", MAXB / GB);
- n = max;
- }
- if ((blocksize = n * mul) < 512) {
-underflow: warnx("minimum blocksize is 512");
- form = "";
- blocksize = n = 512;
- }
- } else
- blocksize = n = 512;
-
- (void)snprintf(header, sizeof(header), "%d%s-blocks", n, form);
- *headerlenp = strlen(header);
- *blocksizep = blocksize;
- return (header);
-}
diff --git a/lib/libc/gen/getcap.3 b/lib/libc/gen/getcap.3
deleted file mode 100644
index 55507a4..0000000
--- a/lib/libc/gen/getcap.3
+++ /dev/null
@@ -1,528 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Casey Leedom of Lawrence Livermore National Laboratory.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getcap.3 8.4 (Berkeley) 5/13/94
-.\"
-.Dd May 13, 1994
-.Dt GETCAP 3
-.Os
-.Sh NAME
-.Nm cgetent ,
-.Nm cgetset ,
-.Nm cgetmatch ,
-.Nm cgetcap ,
-.Nm cgetnum ,
-.Nm cgetstr ,
-.Nm cgetustr ,
-.Nm cgetfirst ,
-.Nm cgetnext ,
-.Nm cgetclose
-.Nd capability database access routines
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft int
-.Fn cgetent "char **buf" "char **db_array" "char *name"
-.Ft int
-.Fn cgetset "char *ent"
-.Ft int
-.Fn cgetmatch "char *buf" "char *name"
-.Ft char *
-.Fn cgetcap "char *buf" "char *cap" "int type"
-.Ft int
-.Fn cgetnum "char *buf" "char *cap" "long *num"
-.Ft int
-.Fn cgetstr "char *buf" "char *cap" "char **str"
-.Ft int
-.Fn cgetustr "char *buf" "char *cap" "char **str"
-.Ft int
-.Fn cgetfirst "char **buf" "char **db_array"
-.Ft int
-.Fn cgetnext "char **buf" "char **db_array"
-.Ft int
-.Fn cgetclose "void"
-.Sh DESCRIPTION
-.Fn Cgetent
-extracts the capability
-.Fa name
-from the database specified by the
-.Dv NULL
-terminated file array
-.Fa db_array
-and returns a pointer to a
-.Xr malloc Ns \&'d
-copy of it in
-.Fa buf .
-The
-.Fn cgetent
-function will first look for files ending in
-.Nm .db
-(see
-.Xr cap_mkdb 1)
-before accessing the ASCII file.
-.Fa Buf
-must be retained through all subsequent calls to
-.Fn cgetmatch ,
-.Fn cgetcap ,
-.Fn cgetnum ,
-.Fn cgetstr ,
-and
-.Fn cgetustr ,
-but may then be
-.Xr free 3 Ns \&'d.
-On success 0 is returned, 1 if the returned
-record contains an unresolved
-.Nm tc
-expansion,
-\-1 if the requested record couldn't be found,
-\-2 if a system error was encountered (couldn't open/read a file, etc.) also
-setting
-.Va errno ,
-and \-3 if a potential reference loop is detected (see
-.Ic tc=
-comments below).
-.Pp
-The
-.Fn cgetset
-function enables the addition of a character buffer containing a single capability
-record entry
-to the capability database.
-Conceptually, the entry is added as the first ``file'' in the database, and
-is therefore searched first on the call to
-.Fn cgetent .
-The entry is passed in
-.Fa ent .
-If
-.Fa ent
-is
-.Dv NULL ,
-the current entry is removed from the database.
-A call to
-.Fn cgetset
-must precede the database traversal. It must be called before the
-.Fn cgetent
-call. If a sequential access is being performed (see below), it must be called
-before the first sequential access call (
-.Fn cgetfirst
-or
-.Fn cgetnext
-), or be directly preceded by a
-.Fn cgetclose
-call.
-On success 0 is returned and \-1 on failure.
-.Pp
-The
-.Fn cgetmatch
-function will return 0 if
-.Fa name
-is one of the names of the capability record
-.Fa buf ,
-\-1 if
-not.
-.Pp
-The
-.Fn cgetcap
-function searches the capability record
-.Fa buf
-for the capability
-.Fa cap
-with type
-.Fa type .
-A
-.Fa type
-is specified using any single character. If a colon (`:') is used, an
-untyped capability will be searched for (see below for explanation of
-types). A pointer to the value of
-.Fa cap
-in
-.Fa buf
-is returned on success,
-.Dv NULL
-if the requested capability couldn't be
-found. The end of the capability value is signaled by a `:' or
-.Tn ASCII
-.Dv NUL
-(see below for capability database syntax).
-.Pp
-The
-.Fn cgetnum
-function retrieves the value of the numeric capability
-.Fa cap
-from the capability record pointed to by
-.Fa buf .
-The numeric value is returned in the
-.Ft long
-pointed to by
-.Fa num .
-0 is returned on success, \-1 if the requested numeric capability couldn't
-be found.
-.Pp
-The
-.Fn cgetstr
-function retrieves the value of the string capability
-.Fa cap
-from the capability record pointed to by
-.Fa buf .
-A pointer to a decoded,
-.Dv NUL
-terminated,
-.Xr malloc Ns \&'d
-copy of the string is returned in the
-.Ft char *
-pointed to by
-.Fa str .
-The number of characters in the decoded string not including the trailing
-.Dv NUL
-is returned on success, \-1 if the requested string capability couldn't
-be found, \-2 if a system error was encountered (storage allocation
-failure).
-.Pp
-The
-.Fn cgetustr
-function is identical to
-.Fn cgetstr
-except that it does not expand special characters, but rather returns each
-character of the capability string literally.
-.Pp
-The
-.Fn cgetfirst
-and
-.Fn cgetnext
-functions comprise a function group that provides for sequential
-access of the
-.Dv NULL
-pointer terminated array of file names,
-.Fa db_array .
-The
-.Fn cgetfirst
-function returns the first record in the database and resets the access
-to the first record.
-The
-.Fn cgetnext
-function returns the next record in the database with respect to the
-record returned by the previous
-.Fn cgetfirst
-or
-.Fn cgetnext
-call. If there is no such previous call, the first record in the database is
-returned.
-Each record is returned in a
-.Xr malloc Ns \&'d
-copy pointed to by
-.Fa buf .
-.Ic Tc
-expansion is done (see
-.Ic tc=
-comments below).
-Upon completion of the database 0 is returned, 1 is returned upon successful
-return of record with possibly more remaining (we haven't reached the end of
-the database yet), 2 is returned if the record contains an unresolved
-.Nm tc
-expansion, \-1 is returned if an system error occurred, and \-2
-is returned if a potential reference loop is detected (see
-.Ic tc=
-comments below).
-Upon completion of database (0 return) the database is closed.
-.Pp
-The
-.Fn cgetclose
-function closes the sequential access and frees any memory and file descriptors
-being used. Note that it does not erase the buffer pushed by a call to
-.Fn cgetset .
-.Sh CAPABILITY DATABASE SYNTAX
-Capability databases are normally
-.Tn ASCII
-and may be edited with standard
-text editors. Blank lines and lines beginning with a `#' are comments
-and are ignored. Lines ending with a `\|\e' indicate that the next line
-is a continuation of the current line; the `\|\e' and following newline
-are ignored. Long lines are usually continued onto several physical
-lines by ending each line except the last with a `\|\e'.
-.Pp
-Capability databases consist of a series of records, one per logical
-line. Each record contains a variable number of `:'-separated fields
-(capabilities). Empty fields consisting entirely of white space
-characters (spaces and tabs) are ignored.
-.Pp
-The first capability of each record specifies its names, separated by `|'
-characters. These names are used to reference records in the database.
-By convention, the last name is usually a comment and is not intended as
-a lookup tag. For example, the
-.Em vt100
-record from the
-.Nm termcap
-database begins:
-.Pp
-.Dl "d0\||\|vt100\||\|vt100-am\||\|vt100am\||\|dec vt100:"
-.Pp
-giving four names that can be used to access the record.
-.Pp
-The remaining non-empty capabilities describe a set of (name, value)
-bindings, consisting of a names optionally followed by a typed values:
-.Bl -column "nameTvalue"
-.It name Ta "typeless [boolean] capability"
-.Em name No "is present [true]"
-.It name Ns Em \&T Ns value Ta capability
-.Pq Em name , \&T
-has value
-.Em value
-.It name@ Ta "no capability" Em name No exists
-.It name Ns Em T Ns \&@ Ta capability
-.Pq Em name , T
-does not exist
-.El
-.Pp
-Names consist of one or more characters. Names may contain any character
-except `:', but it's usually best to restrict them to the printable
-characters and avoid use of graphics like `#', `=', `%', `@', etc. Types
-are single characters used to separate capability names from their
-associated typed values. Types may be any character except a `:'.
-Typically, graphics like `#', `=', `%', etc. are used. Values may be any
-number of characters and may contain any character except `:'.
-.Sh CAPABILITY DATABASE SEMANTICS
-Capability records describe a set of (name, value) bindings. Names may
-have multiple values bound to them. Different values for a name are
-distinguished by their
-.Fa types .
-The
-.Fn cgetcap
-function will return a pointer to a value of a name given the capability
-name and the type of the value.
-.Pp
-The types `#' and `=' are conventionally used to denote numeric and
-string typed values, but no restriction on those types is enforced. The
-functions
-.Fn cgetnum
-and
-.Fn cgetstr
-can be used to implement the traditional syntax and semantics of `#'
-and `='.
-Typeless capabilities are typically used to denote boolean objects with
-presence or absence indicating truth and false values respectively.
-This interpretation is conveniently represented by:
-.Pp
-.Dl "(getcap(buf, name, ':') != NULL)"
-.Pp
-A special capability,
-.Ic tc= name ,
-is used to indicate that the record specified by
-.Fa name
-should be substituted for the
-.Ic tc
-capability.
-.Ic Tc
-capabilities may interpolate records which also contain
-.Ic tc
-capabilities and more than one
-.Ic tc
-capability may be used in a record. A
-.Ic tc
-expansion scope (i.e., where the argument is searched for) contains the
-file in which the
-.Ic tc
-is declared and all subsequent files in the file array.
-.Pp
-When a database is searched for a capability record, the first matching
-record in the search is returned. When a record is scanned for a
-capability, the first matching capability is returned; the capability
-.Ic :nameT@:
-will hide any following definition of a value of type
-.Em T
-for
-.Fa name ;
-and the capability
-.Ic :name@:
-will prevent any following values of
-.Fa name
-from being seen.
-.Pp
-These features combined with
-.Ic tc
-capabilities can be used to generate variations of other databases and
-records by either adding new capabilities, overriding definitions with new
-definitions, or hiding following definitions via `@' capabilities.
-.Sh EXAMPLES
-.Bd -unfilled -offset indent
-example\||\|an example of binding multiple values to names:\e
- :foo%bar:foo^blah:foo@:\e
- :abc%xyz:abc^frap:abc$@:\e
- :tc=more:
-.Ed
-.Pp
-The capability foo has two values bound to it (bar of type `%' and blah of
-type `^') and any other value bindings are hidden. The capability abc
-also has two values bound but only a value of type `$' is prevented from
-being defined in the capability record more.
-.Pp
-.Bd -unfilled -offset indent
-file1:
- new\||\|new_record\||\|a modification of "old":\e
- :fript=bar:who-cares@:tc=old:blah:tc=extensions:
-file2:
- old\||\|old_record\||\|an old database record:\e
- :fript=foo:who-cares:glork#200:
-.Ed
-.Pp
-The records are extracted by calling
-.Fn cgetent
-with file1 preceding file2.
-In the capability record new in file1, fript=bar overrides the definition
-of fript=foo interpolated from the capability record old in file2,
-who-cares@ prevents the definition of any who-cares definitions in old
-from being seen, glork#200 is inherited from old, and blah and anything
-defined by the record extensions is added to those definitions in old.
-Note that the position of the fript=bar and who-cares@ definitions before
-tc=old is important here. If they were after, the definitions in old
-would take precedence.
-.Sh CGETNUM AND CGETSTR SYNTAX AND SEMANTICS
-Two types are predefined by
-.Fn cgetnum
-and
-.Fn cgetstr :
-.Bl -column "nameXnumber"
-.Sm off
-.It Em name No \&# Em number Ta numeric
-capability
-.Em name
-has value
-.Em number
-.It Em name No = Em string Ta "string capability"
-.Em name
-has value
-.Em string
-.It Em name No \&#@ Ta "the numeric capability"
-.Em name
-does not exist
-.It Em name No \&=@ Ta "the string capability"
-.Em name
-does not exist
-.El
-.Pp
-Numeric capability values may be given in one of three numeric bases.
-If the number starts with either
-.Ql 0x
-or
-.Ql 0X
-it is interpreted as a hexadecimal number (both upper and lower case a-f
-may be used to denote the extended hexadecimal digits).
-Otherwise, if the number starts with a
-.Ql 0
-it is interpreted as an octal number.
-Otherwise the number is interpreted as a decimal number.
-.Pp
-String capability values may contain any character. Non-printable
-.Dv ASCII
-codes, new lines, and colons may be conveniently represented by the use
-of escape sequences:
-.Bl -column "\e\|X,X\e\|X" "(ASCII octal nnn)"
-^X ('X' & 037) control-X
-\e\|b, \e\|B (ASCII 010) backspace
-\e\|t, \e\|T (ASCII 011) tab
-\e\|n, \e\|N (ASCII 012) line feed (newline)
-\e\|f, \e\|F (ASCII 014) form feed
-\e\|r, \e\|R (ASCII 015) carriage return
-\e\|e, \e\|E (ASCII 027) escape
-\e\|c, \e\|C (:) colon
-\e\|\e (\e\|) back slash
-\e\|^ (^) caret
-\e\|nnn (ASCII octal nnn)
-.El
-.Pp
-A `\|\e' may be followed by up to three octal digits directly specifies
-the numeric code for a character. The use of
-.Tn ASCII
-.Dv NUL Ns s ,
-while easily
-encoded, causes all sorts of problems and must be used with care since
-.Dv NUL Ns s
-are typically used to denote the end of strings; many applications
-use `\e\|200' to represent a
-.Dv NUL .
-.Sh DIAGNOSTICS
-.Fn Cgetent ,
-.Fn cgetset ,
-.Fn cgetmatch ,
-.Fn cgetnum ,
-.Fn cgetstr ,
-.Fn cgetustr ,
-.Fn cgetfirst ,
-and
-.Fn cgetnext
-return a value greater than or equal to 0 on success and a value less
-than 0 on failure.
-The
-.Fn cgetcap
-function returns a character pointer on success and a
-.Dv NULL
-on failure.
-.Pp
-The
-.Fn cgetent ,
-and
-.Fn cgetseq
-functions may fail and set
-.Va errno
-for any of the errors specified for the library functions:
-.Xr fopen 2 ,
-.Xr fclose 2 ,
-.Xr open 2 ,
-and
-.Xr close 2 .
-.Pp
-The
-.Fn cgetent ,
-.Fn cgetset ,
-.Fn cgetstr ,
-and
-.Fn cgetustr
-may fail and set
-.Va errno
-as follows:
-.Bl -tag -width Er
-.It Bq Er ENOMEM
-No memory to allocate.
-.El
-.Sh SEE ALSO
-.Xr cap_mkdb 1 ,
-.Xr malloc 3
-.Sh BUGS
-Colons (`:') can't be used in names, types, or values.
-.Pp
-There are no checks for
-.Ic tc= name
-loops in
-.Fn cgetent .
-.Pp
-The buffer added to the database by a call to
-.Fn cgetset
-is not unique to the database but is rather prepended to any database used.
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c
deleted file mode 100644
index 0295984..0000000
--- a/lib/libc/gen/getcap.c
+++ /dev/null
@@ -1,1049 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Casey Leedom of Lawrence Livermore National Laboratory.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <ctype.h>
-#include <db.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#define BFRAG 1024
-#define BSIZE 1024
-#define ESC ('[' & 037) /* ASCII ESC */
-#define MAX_RECURSION 32 /* maximum getent recursion */
-#define SFRAG 100 /* cgetstr mallocs in SFRAG chunks */
-
-#define RECOK (char)0
-#define TCERR (char)1
-#define SHADOW (char)2
-
-static size_t topreclen; /* toprec length */
-static char *toprec; /* Additional record specified by cgetset() */
-static int gottoprec; /* Flag indicating retrieval of toprecord */
-
-static int cdbget __P((DB *, char **, char *));
-static int getent __P((char **, u_int *, char **, int, char *, int, char *));
-static int nfcmp __P((char *, char *));
-
-/*
- * Cgetset() allows the addition of a user specified buffer to be added
- * to the database array, in effect "pushing" the buffer on top of the
- * virtual database. 0 is returned on success, -1 on failure.
- */
-int
-cgetset(ent)
- char *ent;
-{
- if (ent == NULL) {
- if (toprec)
- free(toprec);
- toprec = NULL;
- topreclen = 0;
- return (0);
- }
- topreclen = strlen(ent);
- if ((toprec = malloc (topreclen + 1)) == NULL) {
- errno = ENOMEM;
- return (-1);
- }
- gottoprec = 0;
- (void)strcpy(toprec, ent);
- return (0);
-}
-
-/*
- * Cgetcap searches the capability record buf for the capability cap with
- * type `type'. A pointer to the value of cap is returned on success, NULL
- * if the requested capability couldn't be found.
- *
- * Specifying a type of ':' means that nothing should follow cap (:cap:).
- * In this case a pointer to the terminating ':' or NUL will be returned if
- * cap is found.
- *
- * If (cap, '@') or (cap, terminator, '@') is found before (cap, terminator)
- * return NULL.
- */
-char *
-cgetcap(buf, cap, type)
- char *buf, *cap;
- int type;
-{
- register char *bp, *cp;
-
- bp = buf;
- for (;;) {
- /*
- * Skip past the current capability field - it's either the
- * name field if this is the first time through the loop, or
- * the remainder of a field whose name failed to match cap.
- */
- for (;;)
- if (*bp == '\0')
- return (NULL);
- else
- if (*bp++ == ':')
- break;
-
- /*
- * Try to match (cap, type) in buf.
- */
- for (cp = cap; *cp == *bp && *bp != '\0'; cp++, bp++)
- continue;
- if (*cp != '\0')
- continue;
- if (*bp == '@')
- return (NULL);
- if (type == ':') {
- if (*bp != '\0' && *bp != ':')
- continue;
- return(bp);
- }
- if (*bp != type)
- continue;
- bp++;
- return (*bp == '@' ? NULL : bp);
- }
- /* NOTREACHED */
-}
-
-/*
- * Cgetent extracts the capability record name from the NULL terminated file
- * array db_array and returns a pointer to a malloc'd copy of it in buf.
- * Buf must be retained through all subsequent calls to cgetcap, cgetnum,
- * cgetflag, and cgetstr, but may then be free'd. 0 is returned on success,
- * -1 if the requested record couldn't be found, -2 if a system error was
- * encountered (couldn't open/read a file, etc.), and -3 if a potential
- * reference loop is detected.
- */
-int
-cgetent(buf, db_array, name)
- char **buf, **db_array, *name;
-{
- u_int dummy;
-
- return (getent(buf, &dummy, db_array, -1, name, 0, NULL));
-}
-
-/*
- * Getent implements the functions of cgetent. If fd is non-negative,
- * *db_array has already been opened and fd is the open file descriptor. We
- * do this to save time and avoid using up file descriptors for tc=
- * recursions.
- *
- * Getent returns the same success/failure codes as cgetent. On success, a
- * pointer to a malloc'ed capability record with all tc= capabilities fully
- * expanded and its length (not including trailing ASCII NUL) are left in
- * *cap and *len.
- *
- * Basic algorithm:
- * + Allocate memory incrementally as needed in chunks of size BFRAG
- * for capability buffer.
- * + Recurse for each tc=name and interpolate result. Stop when all
- * names interpolated, a name can't be found, or depth exceeds
- * MAX_RECURSION.
- */
-static int
-getent(cap, len, db_array, fd, name, depth, nfield)
- char **cap, **db_array, *name, *nfield;
- u_int *len;
- int fd, depth;
-{
- DB *capdbp;
- register char *r_end, *rp, **db_p;
- int myfd, eof, foundit, retval, clen;
- char *record, *cbuf;
- int tc_not_resolved;
- char pbuf[_POSIX_PATH_MAX];
-
- /*
- * Return with ``loop detected'' error if we've recursed more than
- * MAX_RECURSION times.
- */
- if (depth > MAX_RECURSION)
- return (-3);
-
- /*
- * Check if we have a top record from cgetset().
- */
- if (depth == 0 && toprec != NULL && cgetmatch(toprec, name) == 0) {
- if ((record = malloc (topreclen + BFRAG)) == NULL) {
- errno = ENOMEM;
- return (-2);
- }
- (void)strcpy(record, toprec);
- myfd = 0;
- db_p = db_array;
- rp = record + topreclen + 1;
- r_end = rp + BFRAG;
- goto tc_exp;
- }
- /*
- * Allocate first chunk of memory.
- */
- if ((record = malloc(BFRAG)) == NULL) {
- errno = ENOMEM;
- return (-2);
- }
- r_end = record + BFRAG;
- foundit = 0;
- /*
- * Loop through database array until finding the record.
- */
-
- for (db_p = db_array; *db_p != NULL; db_p++) {
- eof = 0;
-
- /*
- * Open database if not already open.
- */
-
- if (fd >= 0) {
- (void)lseek(fd, (off_t)0, SEEK_SET);
- myfd = 0;
- } else {
- (void)snprintf(pbuf, sizeof(pbuf), "%s.db", *db_p);
- if ((capdbp = dbopen(pbuf, O_RDONLY, 0, DB_HASH, 0))
- != NULL) {
- free(record);
- retval = cdbget(capdbp, &record, name);
- if (retval < 0) {
- /* no record available */
- (void)capdbp->close(capdbp);
- return (retval);
- }
- /* save the data; close frees it */
- clen = strlen(record);
- cbuf = malloc(clen + 1);
- memcpy(cbuf, record, clen + 1);
- if (capdbp->close(capdbp) < 0) {
- free(cbuf);
- return (-2);
- }
- *len = clen;
- *cap = cbuf;
- return (retval);
- } else {
- fd = open(*db_p, O_RDONLY, 0);
- if (fd < 0) {
- /* No error on unfound file. */
- if (errno == ENOENT)
- continue;
- free(record);
- return (-2);
- }
- myfd = 1;
- }
- }
- /*
- * Find the requested capability record ...
- */
- {
- char buf[BUFSIZ];
- register char *b_end, *bp;
- register int c;
-
- /*
- * Loop invariants:
- * There is always room for one more character in record.
- * R_end always points just past end of record.
- * Rp always points just past last character in record.
- * B_end always points just past last character in buf.
- * Bp always points at next character in buf.
- */
- b_end = buf;
- bp = buf;
- for (;;) {
-
- /*
- * Read in a line implementing (\, newline)
- * line continuation.
- */
- rp = record;
- for (;;) {
- if (bp >= b_end) {
- int n;
-
- n = read(fd, buf, sizeof(buf));
- if (n <= 0) {
- if (myfd)
- (void)close(fd);
- if (n < 0) {
- free(record);
- return (-2);
- } else {
- fd = -1;
- eof = 1;
- break;
- }
- }
- b_end = buf+n;
- bp = buf;
- }
-
- c = *bp++;
- if (c == '\n') {
- if (rp > record && *(rp-1) == '\\') {
- rp--;
- continue;
- } else
- break;
- }
- *rp++ = c;
-
- /*
- * Enforce loop invariant: if no room
- * left in record buffer, try to get
- * some more.
- */
- if (rp >= r_end) {
- u_int pos;
- size_t newsize;
-
- pos = rp - record;
- newsize = r_end - record + BFRAG;
- record = realloc(record, newsize);
- if (record == NULL) {
- errno = ENOMEM;
- if (myfd)
- (void)close(fd);
- return (-2);
- }
- r_end = record + newsize;
- rp = record + pos;
- }
- }
- /* loop invariant let's us do this */
- *rp++ = '\0';
-
- /*
- * If encountered eof check next file.
- */
- if (eof)
- break;
-
- /*
- * Toss blank lines and comments.
- */
- if (*record == '\0' || *record == '#')
- continue;
-
- /*
- * See if this is the record we want ...
- */
- if (cgetmatch(record, name) == 0) {
- if (nfield == NULL || !nfcmp(nfield, record)) {
- foundit = 1;
- break; /* found it! */
- }
- }
- }
- }
- if (foundit)
- break;
- }
-
- if (!foundit)
- return (-1);
-
- /*
- * Got the capability record, but now we have to expand all tc=name
- * references in it ...
- */
-tc_exp: {
- register char *newicap, *s;
- register int newilen;
- u_int ilen;
- int diff, iret, tclen;
- char *icap, *scan, *tc, *tcstart, *tcend;
-
- /*
- * Loop invariants:
- * There is room for one more character in record.
- * R_end points just past end of record.
- * Rp points just past last character in record.
- * Scan points at remainder of record that needs to be
- * scanned for tc=name constructs.
- */
- scan = record;
- tc_not_resolved = 0;
- for (;;) {
- if ((tc = cgetcap(scan, "tc", '=')) == NULL)
- break;
-
- /*
- * Find end of tc=name and stomp on the trailing `:'
- * (if present) so we can use it to call ourselves.
- */
- s = tc;
- for (;;)
- if (*s == '\0')
- break;
- else
- if (*s++ == ':') {
- *(s - 1) = '\0';
- break;
- }
- tcstart = tc - 3;
- tclen = s - tcstart;
- tcend = s;
-
- iret = getent(&icap, &ilen, db_p, fd, tc, depth+1,
- NULL);
- newicap = icap; /* Put into a register. */
- newilen = ilen;
- if (iret != 0) {
- /* an error */
- if (iret < -1) {
- if (myfd)
- (void)close(fd);
- free(record);
- return (iret);
- }
- if (iret == 1)
- tc_not_resolved = 1;
- /* couldn't resolve tc */
- if (iret == -1) {
- *(s - 1) = ':';
- scan = s - 1;
- tc_not_resolved = 1;
- continue;
-
- }
- }
- /* not interested in name field of tc'ed record */
- s = newicap;
- for (;;)
- if (*s == '\0')
- break;
- else
- if (*s++ == ':')
- break;
- newilen -= s - newicap;
- newicap = s;
-
- /* make sure interpolated record is `:'-terminated */
- s += newilen;
- if (*(s-1) != ':') {
- *s = ':'; /* overwrite NUL with : */
- newilen++;
- }
-
- /*
- * Make sure there's enough room to insert the
- * new record.
- */
- diff = newilen - tclen;
- if (diff >= r_end - rp) {
- u_int pos, tcpos, tcposend;
- size_t newsize;
-
- pos = rp - record;
- newsize = r_end - record + diff + BFRAG;
- tcpos = tcstart - record;
- tcposend = tcend - record;
- record = realloc(record, newsize);
- if (record == NULL) {
- errno = ENOMEM;
- if (myfd)
- (void)close(fd);
- free(icap);
- return (-2);
- }
- r_end = record + newsize;
- rp = record + pos;
- tcstart = record + tcpos;
- tcend = record + tcposend;
- }
-
- /*
- * Insert tc'ed record into our record.
- */
- s = tcstart + newilen;
- bcopy(tcend, s, rp - tcend);
- bcopy(newicap, tcstart, newilen);
- rp += diff;
- free(icap);
-
- /*
- * Start scan on `:' so next cgetcap works properly
- * (cgetcap always skips first field).
- */
- scan = s-1;
- }
-
- }
- /*
- * Close file (if we opened it), give back any extra memory, and
- * return capability, length and success.
- */
- if (myfd)
- (void)close(fd);
- *len = rp - record - 1; /* don't count NUL */
- if (r_end > rp)
- if ((record =
- realloc(record, (size_t)(rp - record))) == NULL) {
- errno = ENOMEM;
- return (-2);
- }
-
- *cap = record;
- if (tc_not_resolved)
- return (1);
- return (0);
-}
-
-static int
-cdbget(capdbp, bp, name)
- DB *capdbp;
- char **bp, *name;
-{
- DBT key, data;
-
- key.data = name;
- key.size = strlen(name);
-
- for (;;) {
- /* Get the reference. */
- switch(capdbp->get(capdbp, &key, &data, 0)) {
- case -1:
- return (-2);
- case 1:
- return (-1);
- }
-
- /* If not an index to another record, leave. */
- if (((char *)data.data)[0] != SHADOW)
- break;
-
- key.data = (char *)data.data + 1;
- key.size = data.size - 1;
- }
-
- *bp = (char *)data.data + 1;
- return (((char *)(data.data))[0] == TCERR ? 1 : 0);
-}
-
-/*
- * Cgetmatch will return 0 if name is one of the names of the capability
- * record buf, -1 if not.
- */
-int
-cgetmatch(buf, name)
- char *buf, *name;
-{
- register char *np, *bp;
-
- /*
- * Start search at beginning of record.
- */
- bp = buf;
- for (;;) {
- /*
- * Try to match a record name.
- */
- np = name;
- for (;;)
- if (*np == '\0')
- if (*bp == '|' || *bp == ':' || *bp == '\0')
- return (0);
- else
- break;
- else
- if (*bp++ != *np++)
- break;
-
- /*
- * Match failed, skip to next name in record.
- */
- bp--; /* a '|' or ':' may have stopped the match */
- for (;;)
- if (*bp == '\0' || *bp == ':')
- return (-1); /* match failed totally */
- else
- if (*bp++ == '|')
- break; /* found next name */
- }
-}
-
-
-
-
-
-int
-cgetfirst(buf, db_array)
- char **buf, **db_array;
-{
- (void)cgetclose();
- return (cgetnext(buf, db_array));
-}
-
-static FILE *pfp;
-static int slash;
-static char **dbp;
-
-int
-cgetclose()
-{
- if (pfp != NULL) {
- (void)fclose(pfp);
- pfp = NULL;
- }
- dbp = NULL;
- gottoprec = 0;
- slash = 0;
- return(0);
-}
-
-/*
- * Cgetnext() gets either the first or next entry in the logical database
- * specified by db_array. It returns 0 upon completion of the database, 1
- * upon returning an entry with more remaining, and -1 if an error occurs.
- */
-int
-cgetnext(bp, db_array)
- register char **bp;
- char **db_array;
-{
- size_t len;
- int status, i, done;
- char *cp, *line, *rp, *np, buf[BSIZE], nbuf[BSIZE];
- u_int dummy;
-
- if (dbp == NULL)
- dbp = db_array;
-
- if (pfp == NULL && (pfp = fopen(*dbp, "r")) == NULL) {
- (void)cgetclose();
- return (-1);
- }
- for(;;) {
- if (toprec && !gottoprec) {
- gottoprec = 1;
- line = toprec;
- } else {
- line = fgetln(pfp, &len);
- if (line == NULL && pfp) {
- (void)fclose(pfp);
- if (ferror(pfp)) {
- (void)cgetclose();
- return (-1);
- } else {
- if (*++dbp == NULL) {
- (void)cgetclose();
- return (0);
- } else if ((pfp =
- fopen(*dbp, "r")) == NULL) {
- (void)cgetclose();
- return (-1);
- } else
- continue;
- }
- } else
- line[len - 1] = '\0';
- if (len == 1) {
- slash = 0;
- continue;
- }
- if (isspace(*line) ||
- *line == ':' || *line == '#' || slash) {
- if (line[len - 2] == '\\')
- slash = 1;
- else
- slash = 0;
- continue;
- }
- if (line[len - 2] == '\\')
- slash = 1;
- else
- slash = 0;
- }
-
-
- /*
- * Line points to a name line.
- */
- i = 0;
- done = 0;
- np = nbuf;
- for (;;) {
- for (cp = line; *cp != '\0'; cp++) {
- if (*cp == ':') {
- *np++ = ':';
- done = 1;
- break;
- }
- if (*cp == '\\')
- break;
- *np++ = *cp;
- }
- if (done) {
- *np = '\0';
- break;
- } else { /* name field extends beyond the line */
- line = fgetln(pfp, &len);
- if (line == NULL && pfp) {
- (void)fclose(pfp);
- if (ferror(pfp)) {
- (void)cgetclose();
- return (-1);
- }
- } else
- line[len - 1] = '\0';
- }
- }
- rp = buf;
- for(cp = nbuf; *cp != '\0'; cp++)
- if (*cp == '|' || *cp == ':')
- break;
- else
- *rp++ = *cp;
-
- *rp = '\0';
- /*
- * XXX
- * Last argument of getent here should be nbuf if we want true
- * sequential access in the case of duplicates.
- * With NULL, getent will return the first entry found
- * rather than the duplicate entry record. This is a
- * matter of semantics that should be resolved.
- */
- status = getent(bp, &dummy, db_array, -1, buf, 0, NULL);
- if (status == -2 || status == -3)
- (void)cgetclose();
-
- return (status + 1);
- }
- /* NOTREACHED */
-}
-
-/*
- * Cgetstr retrieves the value of the string capability cap from the
- * capability record pointed to by buf. A pointer to a decoded, NUL
- * terminated, malloc'd copy of the string is returned in the char *
- * pointed to by str. The length of the string not including the trailing
- * NUL is returned on success, -1 if the requested string capability
- * couldn't be found, -2 if a system error was encountered (storage
- * allocation failure).
- */
-int
-cgetstr(buf, cap, str)
- char *buf, *cap;
- char **str;
-{
- register u_int m_room;
- register char *bp, *mp;
- int len;
- char *mem;
-
- /*
- * Find string capability cap
- */
- bp = cgetcap(buf, cap, '=');
- if (bp == NULL)
- return (-1);
-
- /*
- * Conversion / storage allocation loop ... Allocate memory in
- * chunks SFRAG in size.
- */
- if ((mem = malloc(SFRAG)) == NULL) {
- errno = ENOMEM;
- return (-2); /* couldn't even allocate the first fragment */
- }
- m_room = SFRAG;
- mp = mem;
-
- while (*bp != ':' && *bp != '\0') {
- /*
- * Loop invariants:
- * There is always room for one more character in mem.
- * Mp always points just past last character in mem.
- * Bp always points at next character in buf.
- */
- if (*bp == '^') {
- bp++;
- if (*bp == ':' || *bp == '\0')
- break; /* drop unfinished escape */
- if (*bp == '?') {
- *mp++ = '\177';
- bp++;
- } else
- *mp++ = *bp++ & 037;
- } else if (*bp == '\\') {
- bp++;
- if (*bp == ':' || *bp == '\0')
- break; /* drop unfinished escape */
- if ('0' <= *bp && *bp <= '7') {
- register int n, i;
-
- n = 0;
- i = 3; /* maximum of three octal digits */
- do {
- n = n * 8 + (*bp++ - '0');
- } while (--i && '0' <= *bp && *bp <= '7');
- *mp++ = n;
- }
- else switch (*bp++) {
- case 'b': case 'B':
- *mp++ = '\b';
- break;
- case 't': case 'T':
- *mp++ = '\t';
- break;
- case 'n': case 'N':
- *mp++ = '\n';
- break;
- case 'f': case 'F':
- *mp++ = '\f';
- break;
- case 'r': case 'R':
- *mp++ = '\r';
- break;
- case 'e': case 'E':
- *mp++ = ESC;
- break;
- case 'c': case 'C':
- *mp++ = ':';
- break;
- default:
- /*
- * Catches '\', '^', and
- * everything else.
- */
- *mp++ = *(bp-1);
- break;
- }
- } else
- *mp++ = *bp++;
- m_room--;
-
- /*
- * Enforce loop invariant: if no room left in current
- * buffer, try to get some more.
- */
- if (m_room == 0) {
- size_t size = mp - mem;
-
- if ((mem = realloc(mem, size + SFRAG)) == NULL)
- return (-2);
- m_room = SFRAG;
- mp = mem + size;
- }
- }
- *mp++ = '\0'; /* loop invariant let's us do this */
- m_room--;
- len = mp - mem - 1;
-
- /*
- * Give back any extra memory and return value and success.
- */
- if (m_room != 0)
- if ((mem = realloc(mem, (size_t)(mp - mem))) == NULL)
- return (-2);
- *str = mem;
- return (len);
-}
-
-/*
- * Cgetustr retrieves the value of the string capability cap from the
- * capability record pointed to by buf. The difference between cgetustr()
- * and cgetstr() is that cgetustr does not decode escapes but rather treats
- * all characters literally. A pointer to a NUL terminated malloc'd
- * copy of the string is returned in the char pointed to by str. The
- * length of the string not including the trailing NUL is returned on success,
- * -1 if the requested string capability couldn't be found, -2 if a system
- * error was encountered (storage allocation failure).
- */
-int
-cgetustr(buf, cap, str)
- char *buf, *cap, **str;
-{
- register u_int m_room;
- register char *bp, *mp;
- int len;
- char *mem;
-
- /*
- * Find string capability cap
- */
- if ((bp = cgetcap(buf, cap, '=')) == NULL)
- return (-1);
-
- /*
- * Conversion / storage allocation loop ... Allocate memory in
- * chunks SFRAG in size.
- */
- if ((mem = malloc(SFRAG)) == NULL) {
- errno = ENOMEM;
- return (-2); /* couldn't even allocate the first fragment */
- }
- m_room = SFRAG;
- mp = mem;
-
- while (*bp != ':' && *bp != '\0') {
- /*
- * Loop invariants:
- * There is always room for one more character in mem.
- * Mp always points just past last character in mem.
- * Bp always points at next character in buf.
- */
- *mp++ = *bp++;
- m_room--;
-
- /*
- * Enforce loop invariant: if no room left in current
- * buffer, try to get some more.
- */
- if (m_room == 0) {
- size_t size = mp - mem;
-
- if ((mem = realloc(mem, size + SFRAG)) == NULL)
- return (-2);
- m_room = SFRAG;
- mp = mem + size;
- }
- }
- *mp++ = '\0'; /* loop invariant let's us do this */
- m_room--;
- len = mp - mem - 1;
-
- /*
- * Give back any extra memory and return value and success.
- */
- if (m_room != 0)
- if ((mem = realloc(mem, (size_t)(mp - mem))) == NULL)
- return (-2);
- *str = mem;
- return (len);
-}
-
-/*
- * Cgetnum retrieves the value of the numeric capability cap from the
- * capability record pointed to by buf. The numeric value is returned in
- * the long pointed to by num. 0 is returned on success, -1 if the requested
- * numeric capability couldn't be found.
- */
-int
-cgetnum(buf, cap, num)
- char *buf, *cap;
- long *num;
-{
- register long n;
- register int base, digit;
- register char *bp;
-
- /*
- * Find numeric capability cap
- */
- bp = cgetcap(buf, cap, '#');
- if (bp == NULL)
- return (-1);
-
- /*
- * Look at value and determine numeric base:
- * 0x... or 0X... hexadecimal,
- * else 0... octal,
- * else decimal.
- */
- if (*bp == '0') {
- bp++;
- if (*bp == 'x' || *bp == 'X') {
- bp++;
- base = 16;
- } else
- base = 8;
- } else
- base = 10;
-
- /*
- * Conversion loop ...
- */
- n = 0;
- for (;;) {
- if ('0' <= *bp && *bp <= '9')
- digit = *bp - '0';
- else if ('a' <= *bp && *bp <= 'f')
- digit = 10 + *bp - 'a';
- else if ('A' <= *bp && *bp <= 'F')
- digit = 10 + *bp - 'A';
- else
- break;
-
- if (digit >= base)
- break;
-
- n = n * base + digit;
- bp++;
- }
-
- /*
- * Return value and success.
- */
- *num = n;
- return (0);
-}
-
-
-/*
- * Compare name field of record.
- */
-static int
-nfcmp(nf, rec)
- char *nf, *rec;
-{
- char *cp, tmp;
- int ret;
-
- for (cp = rec; *cp != ':'; cp++)
- ;
-
- tmp = *(cp + 1);
- *(cp + 1) = '\0';
- ret = strcmp(nf, rec);
- *(cp + 1) = tmp;
-
- return (ret);
-}
diff --git a/lib/libc/gen/getcwd.3 b/lib/libc/gen/getcwd.3
deleted file mode 100644
index 55d5087..0000000
--- a/lib/libc/gen/getcwd.3
+++ /dev/null
@@ -1,156 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getcwd.3 8.2 (Berkeley) 12/11/93
-.\" $Id$
-.\"
-.Dd November 24, 1997
-.Dt GETCWD 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getcwd ,
-.Nm getwd
-.Nd get working directory pathname
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft char *
-.Fn getcwd "char *buf" "size_t size"
-.Ft char *
-.Fn getwd "char *buf"
-.Sh DESCRIPTION
-The
-.Fn getcwd
-function copies the absolute pathname of the current working directory
-into the memory referenced by
-.Fa buf
-and returns a pointer to
-.Fa buf .
-The
-.Fa size
-argument is the size, in bytes, of the array referenced by
-.Fa buf .
-.Pp
-If
-.Fa buf
-is
-.Dv NULL ,
-space is allocated as necessary to store the pathname.
-This space may later be
-.Xr free 3 Ns 'd.
-.Pp
-The function
-.Fn getwd
-is a compatibility routine which calls
-.Fn getcwd
-with its
-.Fa buf
-argument and a size of
-.Dv MAXPATHLEN
-(as defined in the include
-file
-.Aq Pa sys/param.h ) .
-Obviously,
-.Fa buf
-should be at least
-.Dv MAXPATHLEN
-bytes in length.
-.Pp
-These routines have traditionally been used by programs to save the
-name of a working directory for the purpose of returning to it.
-A much faster and less error-prone method of accomplishing this is to
-open the current directory
-.Pq Ql \&.
-and use the
-.Xr fchdir 2
-function to return.
-.Sh RETURN VALUES
-Upon successful completion, a pointer to the pathname is returned.
-Otherwise a
-.Dv NULL
-pointer is returned and the global variable
-.Va errno
-is set to indicate the error.
-In addition,
-.Fn getwd
-copies the error message associated with
-.Va errno
-into the memory referenced by
-.Fa buf .
-.Sh ERRORS
-The
-.Fn getcwd
-function
-will fail if:
-.Bl -tag -width [EACCES]
-.It Bq Er EACCES
-Read or search permission was denied for a component of the pathname.
-.It Bq Er EINVAL
-The
-.Fa size
-argument is zero.
-.It Bq Er ENOENT
-A component of the pathname no longer exists.
-.It Bq Er ENOMEM
-Insufficient memory is available.
-.It Bq Er ERANGE
-The
-.Fa size
-argument is greater than zero but smaller than the length of the pathname
-plus 1.
-.El
-.Sh SEE ALSO
-.Xr chdir 2 ,
-.Xr fchdir 2 ,
-.Xr malloc 3 ,
-.Xr strerror 3
-.Sh STANDARDS
-The
-.Fn getcwd
-function
-conforms to
-.St -ansiC .
-The ability to specify a
-.Dv NULL
-pointer and have
-.Fn getcwd
-allocate memory as necessary is an extension.
-.Sh HISTORY
-The
-.Fn getwd
-function appeared in
-.Bx 4.0 .
-.Sh BUGS
-The
-.Fn getwd
-function
-does not do sufficient error checking and is not able to return very
-long, but valid, paths.
-It is provided for compatibility.
diff --git a/lib/libc/gen/getcwd.c b/lib/libc/gen/getcwd.c
deleted file mode 100644
index 344a418..0000000
--- a/lib/libc/gen/getcwd.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Copyright (c) 1989, 1991, 1993, 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getcwd.c 8.5 (Berkeley) 2/7/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <signal.h>
-
-#define ISDOT(dp) \
- (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
- (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
-
-static int have__getcwd = 1; /* 0 = no, 1 = perhaps, 2 = yes */
-
-char *
-getcwd(pt, size)
- char *pt;
- size_t size;
-{
- register struct dirent *dp;
- register DIR *dir = NULL;
- register dev_t dev;
- register ino_t ino;
- register int first;
- register char *bpt, *bup;
- struct stat s;
- dev_t root_dev;
- ino_t root_ino;
- size_t ptsize, upsize;
- int save_errno;
- char *ept, *eup, *up, c;
-
- /*
- * If no buffer specified by the user, allocate one as necessary.
- * If a buffer is specified, the size has to be non-zero. The path
- * is built from the end of the buffer backwards.
- */
- if (pt) {
- ptsize = 0;
- if (!size) {
- errno = EINVAL;
- return (NULL);
- }
- if (size == 1) {
- errno = ERANGE;
- return (NULL);
- }
- ept = pt + size;
- } else {
- if ((pt = malloc(ptsize = 1024 - 4)) == NULL)
- return (NULL);
- ept = pt + ptsize;
- }
- if (have__getcwd) {
- struct sigaction sa, osa;
- int sigsys_installed = 0;
- int ret;
-
- if (have__getcwd == 1) { /* unsure? */
- bzero(&sa, sizeof(sa));
- sa.sa_handler = SIG_IGN;
- if (sigaction(SIGSYS, &sa, &osa) >= 0)
- sigsys_installed = 1;
- }
- ret = __getcwd(pt, ept - pt);
- if (sigsys_installed == 1) {
- int oerrno = errno;
- sigaction(SIGSYS, &osa, NULL);
- errno = oerrno;
- }
- /* XXX a bogus syscall seems to return EINVAL(!) */
- if (ret < 0 && (errno == ENOSYS || errno == EINVAL))
- have__getcwd = 0;
- else if (have__getcwd == 1)
- have__getcwd = 2; /* yep, remember we have it */
- if (ret == 0) {
- if (*pt != '/') {
- bpt = pt;
- ept = pt + strlen(pt) - 1;
- while (bpt < ept) {
- c = *bpt;
- *bpt++ = *ept;
- *ept-- = c;
- }
- }
- return (pt);
- }
- }
- bpt = ept - 1;
- *bpt = '\0';
-
- /*
- * Allocate bytes (1024 - malloc space) for the string of "../"'s.
- * Should always be enough (it's 340 levels). If it's not, allocate
- * as necessary. Special case the first stat, it's ".", not "..".
- */
- if ((up = malloc(upsize = 1024 - 4)) == NULL)
- goto err;
- eup = up + MAXPATHLEN;
- bup = up;
- up[0] = '.';
- up[1] = '\0';
-
- /* Save root values, so know when to stop. */
- if (stat("/", &s))
- goto err;
- root_dev = s.st_dev;
- root_ino = s.st_ino;
-
- errno = 0; /* XXX readdir has no error return. */
-
- for (first = 1;; first = 0) {
- /* Stat the current level. */
- if (lstat(up, &s))
- goto err;
-
- /* Save current node values. */
- ino = s.st_ino;
- dev = s.st_dev;
-
- /* Check for reaching root. */
- if (root_dev == dev && root_ino == ino) {
- *--bpt = '/';
- /*
- * It's unclear that it's a requirement to copy the
- * path to the beginning of the buffer, but it's always
- * been that way and stuff would probably break.
- */
- bcopy(bpt, pt, ept - bpt);
- free(up);
- return (pt);
- }
-
- /*
- * Build pointer to the parent directory, allocating memory
- * as necessary. Max length is 3 for "../", the largest
- * possible component name, plus a trailing NULL.
- */
- if (bup + 3 + MAXNAMLEN + 1 >= eup) {
- if ((up = realloc(up, upsize *= 2)) == NULL)
- goto err;
- bup = up;
- eup = up + upsize;
- }
- *bup++ = '.';
- *bup++ = '.';
- *bup = '\0';
-
- /* Open and stat parent directory. */
- if (!(dir = opendir(up)) || fstat(dirfd(dir), &s))
- goto err;
-
- /* Add trailing slash for next directory. */
- *bup++ = '/';
- *bup = '\0';
-
- /*
- * If it's a mount point, have to stat each element because
- * the inode number in the directory is for the entry in the
- * parent directory, not the inode number of the mounted file.
- */
- save_errno = 0;
- if (s.st_dev == dev) {
- for (;;) {
- if (!(dp = readdir(dir)))
- goto notfound;
- if (dp->d_fileno == ino)
- break;
- }
- } else
- for (;;) {
- if (!(dp = readdir(dir)))
- goto notfound;
- if (ISDOT(dp))
- continue;
- bcopy(dp->d_name, bup, dp->d_namlen + 1);
-
- /* Save the first error for later. */
- if (lstat(up, &s)) {
- if (!save_errno)
- save_errno = errno;
- errno = 0;
- continue;
- }
- if (s.st_dev == dev && s.st_ino == ino)
- break;
- }
-
- /*
- * Check for length of the current name, preceding slash,
- * leading slash.
- */
- if (bpt - pt < dp->d_namlen + (first ? 1 : 2)) {
- size_t len, off;
-
- if (!ptsize) {
- errno = ERANGE;
- goto err;
- }
- off = bpt - pt;
- len = ept - bpt;
- if ((pt = realloc(pt, ptsize *= 2)) == NULL)
- goto err;
- bpt = pt + off;
- ept = pt + ptsize;
- bcopy(bpt, ept - len, len);
- bpt = ept - len;
- }
- if (!first)
- *--bpt = '/';
- bpt -= dp->d_namlen;
- bcopy(dp->d_name, bpt, dp->d_namlen);
- (void) closedir(dir);
- dir = NULL;
-
- /* Truncate any file name. */
- *bup = '\0';
- }
-
-notfound:
- /*
- * If readdir set errno, use it, not any saved error; otherwise,
- * didn't find the current directory in its parent directory, set
- * errno to ENOENT.
- */
- if (!errno)
- errno = save_errno ? save_errno : ENOENT;
- /* FALLTHROUGH */
-err:
- if (ptsize)
- free(pt);
- if (dir)
- (void) closedir(dir);
- free(up);
- return (NULL);
-}
diff --git a/lib/libc/gen/getdiskbyname.3 b/lib/libc/gen/getdiskbyname.3
deleted file mode 100644
index 14841aa..0000000
--- a/lib/libc/gen/getdiskbyname.3
+++ /dev/null
@@ -1,64 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getdiskbyname.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETDISKBYNAME 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getdiskbyname
-.Nd get generic disk description by its name
-.Sh SYNOPSIS
-.Fd #include <sys/disklabel.h>
-.Ft struct disklabel *
-.Fn getdiskbyname "const char *name"
-.Sh DESCRIPTION
-The
-.Fn getdiskbyname
-function
-takes a disk name (e.g.
-.Ql rm03 )
-and returns a prototype disk label
-describing its geometry information and the standard
-disk partition tables. All information is obtained from
-the
-.Xr disktab 5
-file.
-.Sh SEE ALSO
-.Xr disklabel 5 ,
-.Xr disktab 5 ,
-.Xr disklabel 8
-.Sh HISTORY
-The
-.Fn getdiskbyname
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libc/gen/getdomainname.3 b/lib/libc/gen/getdomainname.3
deleted file mode 100644
index 75214d2..0000000
--- a/lib/libc/gen/getdomainname.3
+++ /dev/null
@@ -1,99 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)gethostname.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd May 6, 1994
-.Dt GETDOMAINNAME 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getdomainname ,
-.Nm setdomainname
-.Nd get/set domain name of current host
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn getdomainname "char *name" "int namelen"
-.Ft int
-.Fn setdomainname "const char *name" "int namelen"
-.Sh DESCRIPTION
-.Fn Getdomainname
-returns the standard domain name for the current processor, as
-previously set by
-.Fn setdomainname .
-The parameter
-.Fa namelen
-specifies the size of the
-.Fa name
-array. The returned name is null-terminated unless insufficient
-space is provided.
-.Pp
-.Fn Setdomainname
-sets the domain name of the host machine to be
-.Fa name ,
-which has length
-.Fa namelen .
-This call is restricted to the super-user and
-is normally used only when the system is bootstrapped.
-.Sh RETURN VALUES
-If the call succeeds a value of 0 is returned. If the call
-fails, a value of -1 is returned and an error code is
-placed in the global location
-.Va errno .
-.Sh ERRORS
-The following errors may be returned by these calls:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-The
-.Fa name
-or
-.Fa namelen
-parameter gave an
-invalid address.
-.It Bq Er EPERM
-The caller tried to set the hostname and was not the super-user.
-.El
-.Sh SEE ALSO
-.Xr gethostid 3 ,
-.Xr gethostname 3 ,
-.Xr sysctl 3
-.Sh BUGS
-Domain names are limited to
-.Dv MAXHOSTNAMELEN
-(from
-.Ao Pa sys/param.h Ac )
-characters, currently 256.
-.Sh HISTORY
-The
-.Fn getdomainname
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/gen/getdomainname.c b/lib/libc/gen/getdomainname.c
deleted file mode 100644
index ba04803..0000000
--- a/lib/libc/gen/getdomainname.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*
-static char sccsid[] = "From: @(#)gethostname.c 8.1 (Berkeley) 6/4/93";
-*/
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-#include <unistd.h>
-
-int
-getdomainname(name, namelen)
- char *name;
- int namelen;
-{
- int mib[2];
- size_t size;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_NISDOMAINNAME;
- size = namelen;
- if (sysctl(mib, 2, name, &size, NULL, 0) == -1)
- return (-1);
- return (0);
-}
diff --git a/lib/libc/gen/getfsent.3 b/lib/libc/gen/getfsent.3
deleted file mode 100644
index 17f3d77..0000000
--- a/lib/libc/gen/getfsent.3
+++ /dev/null
@@ -1,150 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getfsent.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETFSENT 3
-.Os BSD 4
-.Sh NAME
-.Nm getfsent ,
-.Nm getfsspec ,
-.Nm getfsfile ,
-.Nm setfsent ,
-.Nm endfsent
-.Nd get file system descriptor file entry
-.Sh SYNOPSIS
-.Fd #include <fstab.h>
-.Ft struct fstab *
-.Fn getfsent void
-.Ft struct fstab *
-.Fn getfsspec "const char *spec"
-.Ft struct fstab *
-.Fn getfsfile "const char *file"
-.Ft int
-.Fn setfsent void
-.Ft void
-.Fn endfsent void
-.Sh DESCRIPTION
-The
-.Fn getfsent ,
-.Fn getfsspec ,
-and
-.Fn getfsfile
-functions
-each return a pointer to an object with the following structure
-containing the broken-out fields of a line in the file system
-description file,
-.Aq Pa fstab.h .
-.Bd -literal -offset indent
-struct fstab {
- char *fs_spec; /* block special device name */
- char *fs_file; /* file system path prefix */
- char *fs_vfstype; /* File system type, ufs, nfs */
- char *fs_mntops; /* Mount options ala -o */
- char *fs_type; /* FSTAB_* from fs_mntops */
- int fs_freq; /* dump frequency, in days */
- int fs_passno; /* pass number on parallel fsck */
-};
-.Ed
-.Pp
-The fields have meanings described in
-.Xr fstab 5 .
-.Pp
-The
-.Fn setfsent
-function
-opens the file (closing any previously opened file) or rewinds it
-if it is already open.
-.Pp
-The
-.Fn endfsent
-function
-closes the file.
-.Pp
-The
-.Fn getfsspec
-and
-.Fn getfsfile
-functions
-search the entire file (opening it if necessary) for a matching special
-file name or file system file name.
-.Pp
-For programs wishing to read the entire database,
-.Fn getfsent
-reads the next entry (opening the file if necessary).
-.Pp
-All entries in the file with a type field equivalent to
-.Dv FSTAB_XX
-are ignored.
-.Sh RETURN VALUES
-The
-.Fn getfsent ,
-.Fn getfsspec ,
-and
-.Fn getfsfile
-functions
-return a
-.Dv NULL
-pointer on
-.Dv EOF
-or error.
-The
-.Fn setfsent
-function
-returns 0 on failure, 1 on success.
-The
-.Fn endfsent
-function
-returns nothing.
-.Sh FILES
-.Bl -tag -width /etc/fstab -compact
-.It Pa /etc/fstab
-.El
-.Sh SEE ALSO
-.Xr fstab 5
-.Sh HISTORY
-The
-.Fn getfsent
-function appeared in
-.Bx 4.0 ;
-the
-.Fn endfsent ,
-.Fn getfsfile ,
-.Fn getfsspec ,
-and
-.Fn setfsent
-functions appeared in
-.Bx 4.3 .
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
diff --git a/lib/libc/gen/getgrent.3 b/lib/libc/gen/getgrent.3
deleted file mode 100644
index a9f226a..0000000
--- a/lib/libc/gen/getgrent.3
+++ /dev/null
@@ -1,205 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)getgrent.3 8.2 (Berkeley) 4/19/94
-.\" $Id: getgrent.3,v 1.9 1997/02/22 14:58:07 peter Exp $
-.\"
-.Dd September 29, 1994
-.Dt GETGRENT 3
-.Os
-.Sh NAME
-.Nm getgrent ,
-.Nm getgrnam ,
-.Nm getgrgid ,
-.Nm setgroupent ,
-.\" .Nm setgrfile ,
-.Nm setgrent ,
-.Nm endgrent
-.Nd group database operations
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <grp.h>
-.Ft struct group *
-.Fn getgrent void
-.Ft struct group *
-.Fn getgrnam "const char *name"
-.Ft struct group *
-.Fn getgrgid "gid_t gid"
-.Ft int
-.Fn setgroupent "int stayopen"
-.\" .Ft void
-.\" .Fn setgrfile "const char *name"
-.Ft int
-.Fn setgrent void
-.Ft void
-.Fn endgrent void
-.Sh DESCRIPTION
-These functions operate on the group database file
-.Pa /etc/group
-which is described
-in
-.Xr group 5 .
-Each line of the database is defined by the structure
-.Ar group
-found in the include
-file
-.Aq Pa grp.h :
-.Bd -literal -offset indent
-struct group {
- char *gr_name; /* group name */
- char *gr_passwd; /* group password */
- int gr_gid; /* group id */
- char **gr_mem; /* group members */
-};
-.Ed
-.Pp
-The functions
-.Fn getgrnam
-and
-.Fn getgrgid
-search the group database for the given group name pointed to by
-.Ar name
-or the group id pointed to by
-.Ar gid ,
-respectively, returning the first one encountered. Identical group
-names or group gids may result in undefined behavior.
-.Pp
-The
-.Fn getgrent
-function
-sequentially reads the group database and is intended for programs
-that wish to step through the complete list of groups.
-.Pp
-All three routines will open the group file for reading, if necessary.
-.Pp
-The
-.Fn setgroupent
-function
-opens the file, or rewinds it if it is already open. If
-.Fa stayopen
-is non-zero, file descriptors are left open, significantly speeding
-functions subsequent calls. This functionality is unnecessary for
-.Fn getgrent
-as it doesn't close its file descriptors by default. It should also
-be noted that it is dangerous for long-running programs to use this
-functionality as the group file may be updated.
-.Pp
-The
-.Fn setgrent
-function
-is identical to
-.Fn setgroupent
-with an argument of zero.
-.Pp
-The
-.Fn endgrent
-function
-closes any open files.
-.Sh YP/NIS INTERACTION
-When the
-.Xr yp 4
-group database is enabled, the
-.Fn getgrnam
-and
-.Fn getgrgid
-functions use the YP maps
-.Dq Li group.byname
-and
-.Dq Li group.bygid ,
-respectively, if the requested group is not found in the local
-.Pa /etc/group
-file. The
-.Fn getgrent
-function will step through the YP map
-.Dq Li group.byname
-if the entire map is enabled as described in
-.Xr group 5 .
-.Sh RETURN VALUES
-The functions
-.Fn getgrent ,
-.Fn getgrnam ,
-and
-.Fn getgrgid ,
-return a pointer to the group entry if successful; if end-of-file
-is reached or an error occurs a null pointer is returned.
-The functions
-.Fn setgroupent
-and
-.Fn setgrent
-return the value 1 if successful, otherwise the value
-0 is returned.
-The functions
-.Fn endgrent
-and
-.Fn setgrfile
-have no return value.
-.Sh FILES
-.Bl -tag -width /etc/group -compact
-.It Pa /etc/group
-group database file
-.El
-.Sh SEE ALSO
-.Xr getpwent 3 ,
-.Xr yp 4 ,
-.Xr group 5
-.Sh HISTORY
-The functions
-.Fn endgrent ,
-.Fn getgrent ,
-.Fn getgrnam ,
-.Fn getgrgid ,
-and
-.Fn setgrent
-appeared in
-.At v7 .
-The functions
-.Fn setgrfile
-and
-.Fn setgroupent
-appeared in
-.Bx 4.3 Reno .
-.Sh COMPATIBILITY
-The historic function
-.Fn setgrfile ,
-which allowed the specification of alternate password databases, has
-been deprecated and is no longer available.
-.Sh BUGS
-The functions
-.Fn getgrent ,
-.Fn getgrnam ,
-.Fn getgrgid ,
-.Fn setgroupent
-and
-.Fn setgrent
-leave their results in an internal static object and return
-a pointer to that object. Subsequent calls to
-the same function
-will modify the same object.
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c
deleted file mode 100644
index 26069c6..0000000
--- a/lib/libc/gen/getgrent.c
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <grp.h>
-
-static FILE *_gr_fp;
-static struct group _gr_group;
-static int _gr_stayopen;
-static int grscan(), start_gr();
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-static int _gr_stepping_yp;
-static int _gr_yp_enabled;
-static int _getypgroup(struct group *, const char *, char *);
-static int _nextypgroup(struct group *);
-#endif
-
-/* initial size for malloc and increase steps for realloc */
-#define MAXGRP 64
-#define MAXLINELENGTH 256
-
-static char **members; /* list of group members */
-static int maxgrp; /* current length of **mebers */
-static char *line; /* temp buffer for group line */
-static int maxlinelength; /* current length of *line */
-
-/*
- * Lines longer than MAXLINELENGTHLIMIT will be count as an error.
- * <= 0 disable check for maximum line length
- * 256K is enough for 64,000 uids
- */
-#define MAXLINELENGTHLIMIT (256 * 1024)
-#define GROUP_IGNORE_COMMENTS 1 /* allow comments in /etc/group */
-
-struct group *
-getgrent()
-{
- if (!_gr_fp && !start_gr()) {
- return NULL;
- }
-
-#ifdef YP
- if (_gr_stepping_yp) {
- if (_nextypgroup(&_gr_group))
- return(&_gr_group);
- }
-tryagain:
-#endif
-
- if (!grscan(0, 0, NULL))
- return(NULL);
-#ifdef YP
- if(_gr_group.gr_name[0] == '+' && _gr_group.gr_name[1]) {
- _getypgroup(&_gr_group, &_gr_group.gr_name[1],
- "group.byname");
- } else if(_gr_group.gr_name[0] == '+') {
- if (!_nextypgroup(&_gr_group))
- goto tryagain;
- else
- return(&_gr_group);
- }
-#endif
- return(&_gr_group);
-}
-
-struct group *
-getgrnam(name)
- const char *name;
-{
- int rval;
-
- if (!start_gr())
- return(NULL);
-#ifdef YP
- tryagain:
-#endif
- rval = grscan(1, 0, name);
-#ifdef YP
- if(rval == -1 && (_gr_yp_enabled < 0 || (_gr_yp_enabled &&
- _gr_group.gr_name[0] == '+'))) {
- if (!(rval = _getypgroup(&_gr_group, name, "group.byname")))
- goto tryagain;
- }
-#endif
- if (!_gr_stayopen)
- endgrent();
- return(rval ? &_gr_group : NULL);
-}
-
-struct group *
-#ifdef __STDC__
-getgrgid(gid_t gid)
-#else
-getgrgid(gid)
- gid_t gid;
-#endif
-{
- int rval;
-
- if (!start_gr())
- return(NULL);
-#ifdef YP
- tryagain:
-#endif
- rval = grscan(1, gid, NULL);
-#ifdef YP
- if(rval == -1 && _gr_yp_enabled) {
- char buf[16];
- snprintf(buf, sizeof buf, "%d", (unsigned)gid);
- if (!(rval = _getypgroup(&_gr_group, buf, "group.bygid")))
- goto tryagain;
- }
-#endif
- if (!_gr_stayopen)
- endgrent();
- return(rval ? &_gr_group : NULL);
-}
-
-static int
-start_gr()
-{
- if (_gr_fp) {
- rewind(_gr_fp);
- return(1);
- }
- _gr_fp = fopen(_PATH_GROUP, "r");
- if(!_gr_fp) return 0;
-#ifdef YP
- /*
- * This is a disgusting hack, used to determine when YP is enabled.
- * This would be easier if we had a group database to go along with
- * the password database.
- */
- {
- char *line;
- size_t linelen;
- _gr_yp_enabled = 0;
- while((line = fgetln(_gr_fp, &linelen)) != NULL) {
- if(line[0] == '+') {
- if(line[1] && line[1] != ':' && !_gr_yp_enabled) {
- _gr_yp_enabled = 1;
- } else {
- _gr_yp_enabled = -1;
- break;
- }
- }
- }
- rewind(_gr_fp);
- }
-#endif
-
- if (maxlinelength == 0) {
- if ((line = (char *)malloc(sizeof(char) *
- MAXLINELENGTH)) == NULL)
- return(0);
- maxlinelength += MAXLINELENGTH;
- }
-
- if (maxgrp == 0) {
- if ((members = (char **)malloc(sizeof(char **) *
- MAXGRP)) == NULL)
- return(0);
- maxgrp += MAXGRP;
- }
-
- return 1;
-}
-
-int
-setgrent()
-{
- return(setgroupent(0));
-}
-
-int
-setgroupent(stayopen)
- int stayopen;
-{
- if (!start_gr())
- return(0);
- _gr_stayopen = stayopen;
-#ifdef YP
- _gr_stepping_yp = 0;
-#endif
- return(1);
-}
-
-void
-endgrent()
-{
-#ifdef YP
- _gr_stepping_yp = 0;
-#endif
- if (_gr_fp) {
- (void)fclose(_gr_fp);
- _gr_fp = NULL;
- }
-}
-
-static int
-grscan(search, gid, name)
- register int search, gid;
- register char *name;
-{
- register char *cp, **m;
- char *bp;
-
-
-#ifdef YP
- int _ypfound;
-#endif
- for (;;) {
-#ifdef YP
- _ypfound = 0;
-#endif
- if (fgets(line, maxlinelength, _gr_fp) == NULL)
- return(0);
-
- if (!index(line, '\n')) {
- do {
- if (feof(_gr_fp))
- return(0);
-
- /* don't allocate infinite memory */
- if (MAXLINELENGTHLIMIT > 0 &&
- maxlinelength >= MAXLINELENGTHLIMIT)
- return(0);
-
- if ((line = (char *)realloc(line,
- sizeof(char) *
- (maxlinelength + MAXLINELENGTH))) == NULL)
- return(0);
-
- if (fgets(line + maxlinelength - 1,
- MAXLINELENGTH + 1, _gr_fp) == NULL)
- return(0);
-
- maxlinelength += MAXLINELENGTH;
- } while (!index(line + maxlinelength -
- MAXLINELENGTH - 1, '\n'));
- }
-
-#ifdef GROUP_IGNORE_COMMENTS
- /*
- * Ignore comments: ^[ \t]*#
- */
- for (cp = line; *cp != '\0'; cp++)
- if (*cp != ' ' && *cp != '\t')
- break;
- if (*cp == '#' || *cp == '\0')
- continue;
-#endif
-
- bp = line;
-
- if ((_gr_group.gr_name = strsep(&bp, ":\n")) == NULL)
- break;
-#ifdef YP
- /*
- * XXX We need to be careful to avoid proceeding
- * past this point under certain circumstances or
- * we risk dereferencing null pointers down below.
- */
- if (_gr_group.gr_name[0] == '+') {
- if (strlen(_gr_group.gr_name) == 1) {
- switch(search) {
- case 0:
- return(1);
- case 1:
- return(-1);
- default:
- return(0);
- }
- } else {
- cp = &_gr_group.gr_name[1];
- if (search && name != NULL)
- if (strcmp(cp, name))
- continue;
- if (!_getypgroup(&_gr_group, cp,
- "group.byname"))
- continue;
- if (search && name == NULL)
- if (gid != _gr_group.gr_gid)
- continue;
- /* We're going to override -- tell the world. */
- _ypfound++;
- }
- }
-#else
- if (_gr_group.gr_name[0] == '+')
- continue;
-#endif /* YP */
- if (search && name) {
- if(strcmp(_gr_group.gr_name, name)) {
- continue;
- }
- }
-#ifdef YP
- if ((cp = strsep(&bp, ":\n")) == NULL)
- if (_ypfound)
- return(1);
- else
- break;
- if (strlen(cp) || !_ypfound)
- _gr_group.gr_passwd = cp;
-#else
- if ((_gr_group.gr_passwd = strsep(&bp, ":\n")) == NULL)
- break;
-#endif
- if (!(cp = strsep(&bp, ":\n")))
-#ifdef YP
- if (_ypfound)
- return(1);
- else
-#endif
- continue;
-#ifdef YP
- /*
- * Hurm. Should we be doing this? We allow UIDs to
- * be overridden -- what about GIDs?
- */
- if (!_ypfound)
-#endif
- _gr_group.gr_gid = atoi(cp);
- if (search && name == NULL && _gr_group.gr_gid != gid)
- continue;
- cp = NULL;
- if (bp == NULL) /* !!! Must check for this! */
- break;
-#ifdef YP
- if ((cp = strsep(&bp, ":\n")) == NULL)
- break;
-
- if (!strlen(cp) && _ypfound)
- return(1);
- else
- members[0] = NULL;
- bp = cp;
- cp = NULL;
-#endif
- for (m = members; ; bp++) {
- if (m == (members + maxgrp - 1)) {
- if ((members = (char **)
- realloc(members,
- sizeof(char **) *
- (maxgrp + MAXGRP))) == NULL)
- return(0);
- m = members + maxgrp - 1;
- maxgrp += MAXGRP;
- }
- if (*bp == ',') {
- if (cp) {
- *bp = '\0';
- *m++ = cp;
- cp = NULL;
- }
- } else if (*bp == '\0' || *bp == '\n' || *bp == ' ') {
- if (cp) {
- *bp = '\0';
- *m++ = cp;
- }
- break;
- } else if (cp == NULL)
- cp = bp;
-
- }
- _gr_group.gr_mem = members;
- *m = NULL;
- return(1);
- }
- /* NOTREACHED */
- return (0);
-}
-
-#ifdef YP
-
-static int
-_gr_breakout_yp(struct group *gr, char *result)
-{
- char *s, *cp;
- char **m;
-
- /*
- * XXX If 's' ends up being a NULL pointer, punt on this group.
- * It means the NIS group entry is badly formatted and should
- * be skipped.
- */
- if ((s = strsep(&result, ":")) == NULL) return 0; /* name */
- gr->gr_name = s;
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* password */
- gr->gr_passwd = s;
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* gid */
- gr->gr_gid = atoi(s);
-
- if ((s = result) == NULL) return 0;
- cp = 0;
-
- for (m = members; ; s++) {
- if (m == members + maxgrp - 1) {
- if ((members = (char **)realloc(members,
- sizeof(char **) * (maxgrp + MAXGRP))) == NULL)
- return(0);
- m = members + maxgrp - 1;
- maxgrp += MAXGRP;
- }
- if (*s == ',') {
- if (cp) {
- *s = '\0';
- *m++ = cp;
- cp = NULL;
- }
- } else if (*s == '\0' || *s == '\n' || *s == ' ') {
- if (cp) {
- *s = '\0';
- *m++ = cp;
- }
- break;
- } else if (cp == NULL) {
- cp = s;
- }
- }
- _gr_group.gr_mem = members;
- *m = NULL;
-
- return 1;
-}
-
-static char *_gr_yp_domain;
-
-static int
-_getypgroup(struct group *gr, const char *name, char *map)
-{
- char *result, *s;
- static char resultbuf[YPMAXRECORD + 2];
- int resultlen;
-
- if(!_gr_yp_domain) {
- if(yp_get_default_domain(&_gr_yp_domain))
- return 0;
- }
-
- if(yp_match(_gr_yp_domain, map, name, strlen(name),
- &result, &resultlen))
- return 0;
-
- s = strchr(result, '\n');
- if(s) *s = '\0';
-
- if(resultlen >= sizeof resultbuf) return 0;
- strncpy(resultbuf, result, resultlen);
- resultbuf[resultlen] = '\0';
- free(result);
- return(_gr_breakout_yp(gr, resultbuf));
-
-}
-
-
-static int
-_nextypgroup(struct group *gr)
-{
- static char *key;
- static int keylen;
- char *lastkey, *result;
- static char resultbuf[YPMAXRECORD + 2];
- int resultlen;
- int rv;
-
- if(!_gr_yp_domain) {
- if(yp_get_default_domain(&_gr_yp_domain))
- return 0;
- }
-
- if(!_gr_stepping_yp) {
- if(key) free(key);
- rv = yp_first(_gr_yp_domain, "group.byname",
- &key, &keylen, &result, &resultlen);
- if(rv) {
- return 0;
- }
- _gr_stepping_yp = 1;
- goto unpack;
- } else {
-tryagain:
- lastkey = key;
- rv = yp_next(_gr_yp_domain, "group.byname", key, keylen,
- &key, &keylen, &result, &resultlen);
- free(lastkey);
-unpack:
- if(rv) {
- _gr_stepping_yp = 0;
- return 0;
- }
-
- if(resultlen > sizeof(resultbuf)) {
- free(result);
- goto tryagain;
- }
-
- strncpy(resultbuf, result, resultlen);
- resultbuf[resultlen] = '\0';
- free(result);
- if((result = strchr(resultbuf, '\n')) != NULL)
- *result = '\0';
- if (_gr_breakout_yp(gr, resultbuf))
- return(1);
- else
- goto tryagain;
- }
-}
-
-#endif /* YP */
diff --git a/lib/libc/gen/getgrouplist.3 b/lib/libc/gen/getgrouplist.3
deleted file mode 100644
index 0d04a27..0000000
--- a/lib/libc/gen/getgrouplist.3
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getgrouplist.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt GETGROUPLIST 3
-.Os
-.Sh NAME
-.Nm getgrouplist
-.Nd calculate group access list
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn getgrouplist "const char *name" "int basegid" "int *groups" "int *ngroups"
-.Sh DESCRIPTION
-The
-.Fn getgrouplist
-function reads through the group file and calculates
-the group access list for the user specified in
-.Fa name .
-The
-.Fa basegid
-is automatically included in the groups list.
-Typically this value is given as
-the group number from the password file.
-.Pp
-The resulting group list is returned in the integer array pointed to by
-.Fa groups .
-The caller specifies the size of the
-.Fa groups
-array in the integer pointed to by
-.Fa ngroups ;
-the actual number of groups found is returned in
-.Fa ngroups .
-.Sh RETURN VALUES
-The
-.Fn getgrouplist
-function
-returns \-1 if the size of the group list is too small to
-hold all the user's groups.
-Here, the group array will be filled with as many groups as will fit.
-.Sh FILES
-.Bl -tag -width /etc/group -compact
-.It Pa /etc/group
-group membership list
-.El
-.Sh SEE ALSO
-.Xr setgroups 2 ,
-.Xr initgroups 3
-.Sh HISTORY
-The
-.Fn getgrouplist
-function first appeared in
-.Bx 4.4 .
-.Sh BUGS
-The
-.Fn getgrouplist
-function
-uses the routines based on
-.Xr getgrent 3 .
-If the invoking program uses any of these routines,
-the group structure will
-be overwritten in the call to
-.Fn getgrouplist .
diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c
deleted file mode 100644
index 31f90b4..0000000
--- a/lib/libc/gen/getgrouplist.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getgrouplist.c 8.2 (Berkeley) 12/8/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * get credential
- */
-#include <sys/types.h>
-#include <string.h>
-#include <grp.h>
-
-int
-getgrouplist(uname, agroup, groups, grpcnt)
- const char *uname;
- int agroup;
- register int *groups;
- int *grpcnt;
-{
- register struct group *grp;
- register int i, ngroups;
- int ret, maxgroups;
-
- ret = 0;
- ngroups = 0;
- maxgroups = *grpcnt;
- /*
- * When installing primary group, duplicate it;
- * the first element of groups is the effective gid
- * and will be overwritten when a setgid file is executed.
- */
- groups[ngroups++] = agroup;
- if (maxgroups > 1)
- groups[ngroups++] = agroup;
- /*
- * Scan the group file to find additional groups.
- */
- setgrent();
- while (grp = getgrent()) {
- for (i = 0; i < ngroups; i++) {
- if (grp->gr_gid == groups[i])
- goto skip;
- }
- for (i = 0; grp->gr_mem[i]; i++) {
- if (!strcmp(grp->gr_mem[i], uname)) {
- if (ngroups >= maxgroups) {
- ret = -1;
- break;
- }
- groups[ngroups++] = grp->gr_gid;
- break;
- }
- }
-skip:
- }
- endgrent();
- *grpcnt = ngroups;
- return (ret);
-}
diff --git a/lib/libc/gen/gethostname.3 b/lib/libc/gen/gethostname.3
deleted file mode 100644
index 84241f0..0000000
--- a/lib/libc/gen/gethostname.3
+++ /dev/null
@@ -1,97 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)gethostname.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETHOSTNAME 3
-.Os BSD 4.2
-.Sh NAME
-.Nm gethostname ,
-.Nm sethostname
-.Nd get/set name of current host
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn gethostname "char *name" "int namelen"
-.Ft int
-.Fn sethostname "const char *name" "int namelen"
-.Sh DESCRIPTION
-.Fn Gethostname
-returns the standard host name for the current processor, as
-previously set by
-.Fn sethostname .
-The parameter
-.Fa namelen
-specifies the size of the
-.Fa name
-array. The returned name is null-terminated unless insufficient
-space is provided.
-.Pp
-.Fn Sethostname
-sets the name of the host machine to be
-.Fa name ,
-which has length
-.Fa namelen .
-This call is restricted to the super-user and
-is normally used only when the system is bootstrapped.
-.Sh RETURN VALUES
-If the call succeeds a value of 0 is returned. If the call
-fails, a value of -1 is returned and an error code is
-placed in the global location
-.Va errno .
-.Sh ERRORS
-The following errors may be returned by these calls:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-The
-.Fa name
-or
-.Fa namelen
-parameter gave an
-invalid address.
-.It Bq Er EPERM
-The caller tried to set the hostname and was not the super-user.
-.El
-.Sh SEE ALSO
-.Xr gethostid 3 ,
-.Xr sysctl 3
-.Sh BUGS
-Host names are limited to
-.Dv MAXHOSTNAMELEN
-(from
-.Ao Pa sys/param.h Ac )
-characters, currently 256.
-.Sh HISTORY
-The
-.Fn gethostname
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/gen/gethostname.c b/lib/libc/gen/gethostname.c
deleted file mode 100644
index 64bd64d..0000000
--- a/lib/libc/gen/gethostname.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-int
-gethostname(name, namelen)
- char *name;
- int namelen;
-{
- int mib[2];
- size_t size;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_HOSTNAME;
- size = namelen;
- if (sysctl(mib, 2, name, &size, NULL, 0) == -1)
- return (-1);
- return (0);
-}
diff --git a/lib/libc/gen/getloadavg.3 b/lib/libc/gen/getloadavg.3
deleted file mode 100644
index fa5b571..0000000
--- a/lib/libc/gen/getloadavg.3
+++ /dev/null
@@ -1,65 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getloadavg.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETLOADAVG 3
-.Os
-.Sh NAME
-.Nm getloadavg
-.Nd get system load averages
-.Sh SYNOPSIS
-.Ft int
-.Fn getloadavg "double loadavg[]" "int nelem"
-.Sh DESCRIPTION
-The
-.Fn getloadavg
-function returns the number of processes in the system run queue
-averaged over various periods of time.
-Up to
-.Fa nelem
-samples are retrieved and assigned to successive elements of
-.Fa loadavg Ns Bq .
-The system imposes a maximum of 3 samples, representing averages
-over the last 1, 5, and 15 minutes, respectively.
-.Sh DIAGNOSTICS
-If the load average was unobtainable, \-1 is returned; otherwise,
-the number of samples actually retrieved is returned.
-.Sh SEE ALSO
-.Xr uptime 1 ,
-.Xr kvm_getloadavg 3 ,
-.Xr sysctl 3
-.Sh HISTORY
-The
-.Fn getloadavg
-function appeared in
-.Bx 4.3 Reno .
diff --git a/lib/libc/gen/getloadavg.c b/lib/libc/gen/getloadavg.c
deleted file mode 100644
index 811dbda..0000000
--- a/lib/libc/gen/getloadavg.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getloadavg.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/sysctl.h>
-#include <vm/vm_param.h>
-
-#include <stdlib.h>
-
-/*
- * getloadavg() -- Get system load averages.
- *
- * Put `nelem' samples into `loadavg' array.
- * Return number of samples retrieved, or -1 on error.
- */
-int
-getloadavg(loadavg, nelem)
- double loadavg[];
- int nelem;
-{
- struct loadavg loadinfo;
- int i, mib[2];
- size_t size;
-
- mib[0] = CTL_VM;
- mib[1] = VM_LOADAVG;
- size = sizeof(loadinfo);
- if (sysctl(mib, 2, &loadinfo, &size, NULL, 0) < 0)
- return (-1);
-
- nelem = MIN(nelem, sizeof(loadinfo.ldavg) / sizeof(fixpt_t));
- for (i = 0; i < nelem; i++)
- loadavg[i] = (double) loadinfo.ldavg[i] / loadinfo.fscale;
- return (nelem);
-}
diff --git a/lib/libc/gen/getlogin.c b/lib/libc/gen/getlogin.c
deleted file mode 100644
index 5829539..0000000
--- a/lib/libc/gen/getlogin.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getlogin.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <pwd.h>
-#include <utmp.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-int _logname_valid; /* known to setlogin() */
-
-char *
-getlogin()
-{
- static char logname[MAXLOGNAME];
-
- if (_logname_valid == 0) {
- if (_getlogin(logname, sizeof(logname)) < 0)
- return ((char *)NULL);
- _logname_valid = 1;
- }
- return (*logname ? logname : (char *)NULL);
-}
diff --git a/lib/libc/gen/getmntinfo.3 b/lib/libc/gen/getmntinfo.3
deleted file mode 100644
index e92755b..0000000
--- a/lib/libc/gen/getmntinfo.3
+++ /dev/null
@@ -1,109 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getmntinfo.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt GETMNTINFO 3
-.Os
-.Sh NAME
-.Nm getmntinfo
-.Nd get information about mounted file systems
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/ucred.h>
-.Fd #include <sys/mount.h>
-.Ft int
-.Fn getmntinfo "struct statfs **mntbufp" "int flags"
-.Sh DESCRIPTION
-The
-.Fn getmntinfo
-function
-returns an array of
-.Fn statfs
-structures describing each currently mounted file system (see
-.Xr statfs 2 ) .
-.Pp
-The
-.Fn getmntinfo
-function
-passes its
-.Fa flags
-parameter transparently to
-.Xr getfsstat 2 .
-.Sh RETURN VALUES
-On successful completion,
-.Fn getmntinfo
-returns a count of the number of elements in the array.
-The pointer to the array is stored into
-.Fa mntbufp .
-.Pp
-If an error occurs, zero is returned and the external variable
-.Va errno
-is set to indicate the error.
-Although the pointer
-.Fa mntbufp
-will be unmodified, any information previously returned by
-.Fn getmntinfo
-will be lost.
-.Sh ERRORS
-The
-.Fn getmntinfo
-function
-may fail and set errno for any of the errors specified for the library
-routines
-.Xr getfsstat 2
-or
-.Xr malloc 3 .
-.Sh SEE ALSO
-.Xr getfsstat 2 ,
-.Xr mount 2 ,
-.Xr statfs 2 ,
-.Xr mount 8
-.Sh HISTORY
-The
-.Fn getmntinfo
-function first appeared in
-.Bx 4.4 .
-.Sh BUGS
-The
-.Fn getmntinfo
-function writes the array of structures to an internal static object
-and returns
-a pointer to that object. Subsequent calls to
-.Fn getmntinfo
-will modify the same object.
-.Pp
-The memory allocated by
-.Fn getmntinfo
-cannot be
-.Xr free 3 Ns 'd
-by the application.
diff --git a/lib/libc/gen/getmntinfo.c b/lib/libc/gen/getmntinfo.c
deleted file mode 100644
index 6e167a3..0000000
--- a/lib/libc/gen/getmntinfo.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getmntinfo.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/ucred.h>
-#include <sys/mount.h>
-#include <stdlib.h>
-
-/*
- * Return information about mounted filesystems.
- */
-int
-getmntinfo(mntbufp, flags)
- struct statfs **mntbufp;
- int flags;
-{
- static struct statfs *mntbuf;
- static int mntsize;
- static long bufsize;
-
- if (mntsize <= 0 && (mntsize = getfsstat(0, 0, MNT_NOWAIT)) < 0)
- return (0);
- if (bufsize > 0 && (mntsize = getfsstat(mntbuf, bufsize, flags)) < 0)
- return (0);
- while (bufsize <= mntsize * sizeof(struct statfs)) {
- if (mntbuf)
- free(mntbuf);
- bufsize = (mntsize + 1) * sizeof(struct statfs);
- if ((mntbuf = (struct statfs *)malloc(bufsize)) == 0)
- return (0);
- if ((mntsize = getfsstat(mntbuf, bufsize, flags)) < 0)
- return (0);
- }
- *mntbufp = mntbuf;
- return (mntsize);
-}
diff --git a/lib/libc/gen/getnetgrent.3 b/lib/libc/gen/getnetgrent.3
deleted file mode 100644
index 38da3c0..0000000
--- a/lib/libc/gen/getnetgrent.3
+++ /dev/null
@@ -1,128 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getnetgrent.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETNETGRENT 3
-.Os
-.Sh NAME
-.Nm getnetgrent ,
-.Nm innetgr ,
-.Nm setnetgrent ,
-.Nm endnetgrent
-.Nd netgroup database operations
-.Sh SYNOPSIS
-.Ft int
-.Fn getnetgrent "char **host" "char **user" "char **domain"
-.Ft int
-.Fn innetgr "const char *netgroup" "const char *host" "const char *user" "const char *domain"
-.Ft void
-.Fn setnetgrent "const char *netgroup"
-.Ft void
-.Fn endnetgrent void
-.Sh DESCRIPTION
-These functions operate on the netgroup database file
-.Pa /etc/netgroup
-which is described
-in
-.Xr netgroup 5 .
-The database defines a set of netgroups, each made up of one or more triples:
-.Bd -literal -offset indent
-(host, user, domain)
-.Ed
-that defines a combination of host, user and domain.
-Any of the three fields may be specified as ``wildcards'' that match any
-string.
-.Pp
-The function
-.Fn getnetgrent
-sets the three pointer arguments to the strings of the next member of the
-current netgroup.
-If any of the string pointers are
-.Sy (char *)0
-that field is considered a wildcard.
-.Pp
-The functions
-.Fn setnetgrent
-and
-.Fn endnetgrent
-set the current netgroup and terminate the current netgroup respectively.
-If
-.Fn setnetgrent
-is called with a different netgroup than the previous call, an implicit
-.Fn endnetgrent
-is implied.
-.Fn Setnetgrent
-also sets the offset to the first member of the netgroup.
-.Pp
-The function
-.Fn innetgr
-searches for a match of all fields within the specified group.
-If any of the
-.Sy host ,
-.Sy user ,
-or
-.Sy domain
-arguments are
-.Sy (char *)0
-those fields will match any string value in the netgroup member.
-.Sh RETURN VALUES
-The function
-.Fn getnetgrent
-returns 0 for ``no more netgroup members'' and 1 otherwise.
-The function
-.Fn innetgr
-returns 1 for a successful match and 0 otherwise.
-The functions
-.Fn setnetgrent
-and
-.Fn endnetgrent
-have no return value.
-.Sh FILES
-.Bl -tag -width /etc/netgroup -compact
-.It Pa /etc/netgroup
-netgroup database file
-.El
-.Sh SEE ALSO
-.Xr netgroup 5
-.Sh COMPATIBILITY
-The netgroup members have three string fields to maintain compatibility
-with other vendor implementations, however it is not obvious what use the
-.Sy domain
-string has within BSD.
-.Sh BUGS
-The function
-.Fn getnetgrent
-returns pointers to dynamically allocated data areas that are freed when
-the function
-.Fn endnetgrent
-is called.
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c
deleted file mode 100644
index cc04f2f..0000000
--- a/lib/libc/gen/getnetgrent.c
+++ /dev/null
@@ -1,632 +0,0 @@
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getnetgrent.c 8.2 (Berkeley) 4/27/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#ifdef YP
-/*
- * Notes:
- * We want to be able to use NIS netgroups properly while retaining
- * the ability to use a local /etc/netgroup file. Unfortunately, you
- * can't really do both at the same time - at least, not efficiently.
- * NetBSD deals with this problem by creating a netgroup database
- * using Berkeley DB (just like the password database) that allows
- * for lookups using netgroup, netgroup.byuser or netgroup.byhost
- * searches. This is a neat idea, but I don't have time to implement
- * something like that now. (I think ultimately it would be nice
- * if we DB-fied the group and netgroup stuff all in one shot, but
- * for now I'm satisfied just to have something that works well
- * without requiring massive code changes.)
- *
- * Therefore, to still permit the use of the local file and maintain
- * optimum NIS performance, we allow for the following conditions:
- *
- * - If /etc/netgroup does not exist and NIS is turned on, we use
- * NIS netgroups only.
- *
- * - If /etc/netgroup exists but is empty, we use NIS netgroups
- * only.
- *
- * - If /etc/netgroup exists and contains _only_ a '+', we use
- * NIS netgroups only.
- *
- * - If /etc/netgroup exists, contains locally defined netgroups
- * and a '+', we use a mixture of NIS and the local entries.
- * This method should return the same NIS data as just using
- * NIS alone, but it will be slower if the NIS netgroup database
- * is large (innetgr() in particular will suffer since extra
- * processing has to be done in order to determine memberships
- * using just the raw netgroup data).
- *
- * - If /etc/netgroup exists and contains only locally defined
- * netgroup entries, we use just those local entries and ignore
- * NIS (this is the original, pre-NIS behavior).
- */
-
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <sys/errno.h>
-static char *_netgr_yp_domain;
-int _use_only_yp;
-static int _netgr_yp_enabled;
-static int _yp_innetgr;
-#endif
-
-#ifndef _PATH_NETGROUP
-#define _PATH_NETGROUP "/etc/netgroup"
-#endif
-
-/*
- * Static Variables and functions used by setnetgrent(), getnetgrent() and
- * endnetgrent().
- * There are two linked lists:
- * - linelist is just used by setnetgrent() to parse the net group file via.
- * parse_netgrp()
- * - netgrp is the list of entries for the current netgroup
- */
-struct linelist {
- struct linelist *l_next; /* Chain ptr. */
- int l_parsed; /* Flag for cycles */
- char *l_groupname; /* Name of netgroup */
- char *l_line; /* Netgroup entrie(s) to be parsed */
-};
-
-struct netgrp {
- struct netgrp *ng_next; /* Chain ptr */
- char *ng_str[3]; /* Field pointers, see below */
-};
-#define NG_HOST 0 /* Host name */
-#define NG_USER 1 /* User name */
-#define NG_DOM 2 /* and Domain name */
-
-static struct linelist *linehead = (struct linelist *)0;
-static struct netgrp *nextgrp = (struct netgrp *)0;
-static struct {
- struct netgrp *gr;
- char *grname;
-} grouphead = {
- (struct netgrp *)0,
- (char *)0,
-};
-static FILE *netf = (FILE *)0;
-static int parse_netgrp();
-static struct linelist *read_for_group();
-void setnetgrent(), endnetgrent();
-int getnetgrent(), innetgr();
-
-#define LINSIZ 1024 /* Length of netgroup file line */
-
-/*
- * setnetgrent()
- * Parse the netgroup file looking for the netgroup and build the list
- * of netgrp structures. Let parse_netgrp() and read_for_group() do
- * most of the work.
- */
-void
-setnetgrent(group)
- char *group;
-{
-#ifdef YP
- struct stat _yp_statp;
- char _yp_plus;
-#endif
-
- /* Sanity check */
-
- if (group == NULL || !strlen(group))
- return;
-
- if (grouphead.gr == (struct netgrp *)0 ||
- strcmp(group, grouphead.grname)) {
- endnetgrent();
-#ifdef YP
- /* Presumed guilty until proven innocent. */
- _use_only_yp = 0;
- /*
- * If /etc/netgroup doesn't exist or is empty,
- * use NIS exclusively.
- */
- if (((stat(_PATH_NETGROUP, &_yp_statp) < 0) &&
- errno == ENOENT) || _yp_statp.st_size == 0)
- _use_only_yp = _netgr_yp_enabled = 1;
- if ((netf = fopen(_PATH_NETGROUP,"r")) != NULL ||_use_only_yp){
- /*
- * Icky: grab the first character of the netgroup file
- * and turn on NIS if it's a '+'. rewind the stream
- * afterwards so we don't goof up read_for_group() later.
- */
- if (netf) {
- fscanf(netf, "%c", &_yp_plus);
- rewind(netf);
- if (_yp_plus == '+')
- _use_only_yp = _netgr_yp_enabled = 1;
- }
- /*
- * If we were called specifically for an innetgr()
- * lookup and we're in NIS-only mode, short-circuit
- * parse_netgroup() and cut directly to the chase.
- */
- if (_use_only_yp && _yp_innetgr) {
- /* dohw! */
- if (netf != NULL)
- fclose(netf);
- return;
- }
-#else
- if (netf = fopen(_PATH_NETGROUP, "r")) {
-#endif
- if (parse_netgrp(group))
- endnetgrent();
- else {
- grouphead.grname = (char *)
- malloc(strlen(group) + 1);
- strcpy(grouphead.grname, group);
- }
- if (netf)
- fclose(netf);
- }
- }
- nextgrp = grouphead.gr;
-}
-
-/*
- * Get the next netgroup off the list.
- */
-int
-getnetgrent(hostp, userp, domp)
- char **hostp, **userp, **domp;
-{
-#ifdef YP
- _yp_innetgr = 0;
-#endif
-
- if (nextgrp) {
- *hostp = nextgrp->ng_str[NG_HOST];
- *userp = nextgrp->ng_str[NG_USER];
- *domp = nextgrp->ng_str[NG_DOM];
- nextgrp = nextgrp->ng_next;
- return (1);
- }
- return (0);
-}
-
-/*
- * endnetgrent() - cleanup
- */
-void
-endnetgrent()
-{
- register struct linelist *lp, *olp;
- register struct netgrp *gp, *ogp;
-
- lp = linehead;
- while (lp) {
- olp = lp;
- lp = lp->l_next;
- free(olp->l_groupname);
- free(olp->l_line);
- free((char *)olp);
- }
- linehead = (struct linelist *)0;
- if (grouphead.grname) {
- free(grouphead.grname);
- grouphead.grname = (char *)0;
- }
- gp = grouphead.gr;
- while (gp) {
- ogp = gp;
- gp = gp->ng_next;
- if (ogp->ng_str[NG_HOST])
- free(ogp->ng_str[NG_HOST]);
- if (ogp->ng_str[NG_USER])
- free(ogp->ng_str[NG_USER]);
- if (ogp->ng_str[NG_DOM])
- free(ogp->ng_str[NG_DOM]);
- free((char *)ogp);
- }
- grouphead.gr = (struct netgrp *)0;
-#ifdef YP
- _netgr_yp_enabled = 0;
-#endif
-}
-
-#ifdef YP
-static int _listmatch(list, group, len)
- char *list, *group;
- int len;
-{
- char *ptr = list, *cptr;
- int glen = strlen(group);
-
- /* skip possible leading whitespace */
- while(isspace(*ptr))
- ptr++;
-
- while (ptr < list + len) {
- cptr = ptr;
- while(*ptr != ',' && !isspace(*ptr))
- ptr++;
- if (strncmp(cptr, group, glen) == 0 && glen == (ptr - cptr))
- return(1);
- while(*ptr == ',' || isspace(*ptr))
- ptr++;
- }
-
- return(0);
-}
-
-static int _buildkey(key, str, dom, rotation)
-char *key, *str, *dom;
-int *rotation;
-{
- (*rotation)++;
- if (*rotation > 4)
- return(0);
- switch(*rotation) {
- case(1): sprintf((char *)key, "%s.%s", str, dom ? dom : "*");
- break;
- case(2): sprintf((char *)key, "%s.*", str);
- break;
- case(3): sprintf((char *)key, "*.%s", dom ? dom : "*");
- break;
- case(4): sprintf((char *)key, "*.*");
- break;
- }
- return(1);
-}
-#endif
-
-/*
- * Search for a match in a netgroup.
- */
-int
-innetgr(group, host, user, dom)
- const char *group, *host, *user, *dom;
-{
- char *hst, *usr, *dm;
-#ifdef YP
- char *result;
- int resultlen;
- int rv;
-#endif
- /* Sanity check */
-
- if (group == NULL || !strlen(group))
- return (0);
-
-#ifdef YP
- _yp_innetgr = 1;
-#endif
- setnetgrent(group);
-#ifdef YP
- _yp_innetgr = 0;
- /*
- * If we're in NIS-only mode, do the search using
- * NIS 'reverse netgroup' lookups.
- */
- if (_use_only_yp) {
- char _key[MAXHOSTNAMELEN];
- int rot = 0, y = 0;
-
- if(yp_get_default_domain(&_netgr_yp_domain))
- return(0);
- while(_buildkey(_key, user ? user : host, dom, &rot)) {
- y = yp_match(_netgr_yp_domain, user? "netgroup.byuser":
- "netgroup.byhost", _key, strlen(_key), &result,
- &resultlen);
- if (y) {
- /*
- * If we get an error other than 'no
- * such key in map' then something is
- * wrong and we should stop the search.
- */
- if (y != YPERR_KEY)
- break;
- } else {
- rv = _listmatch(result, group, resultlen);
- free(result);
- if (rv)
- return(1);
- else
- return(0);
- }
- }
- /*
- * Couldn't match using NIS-exclusive mode. If the error
- * was YPERR_MAP, then the failure happened because there
- * was no netgroup.byhost or netgroup.byuser map. The odds
- * are we are talking to an Sun NIS+ server in YP emulation
- * mode; if this is the case, then we have to do the check
- * the 'old-fashioned' way by grovelling through the netgroup
- * map and resolving memberships on the fly.
- */
- if (y != YPERR_MAP)
- return(0);
- }
-
- setnetgrent(group);
-#endif /* YP */
-
- while (getnetgrent(&hst, &usr, &dm))
- if ((host == NULL || hst == NULL || !strcmp(host, hst)) &&
- (user == NULL || usr == NULL || !strcmp(user, usr)) &&
- ( dom == NULL || dm == NULL || !strcmp(dom, dm))) {
- endnetgrent();
- return (1);
- }
- endnetgrent();
- return (0);
-}
-
-/*
- * Parse the netgroup file setting up the linked lists.
- */
-static int
-parse_netgrp(group)
- char *group;
-{
- register char *spos, *epos;
- register int len, strpos;
-#ifdef DEBUG
- register int fields;
-#endif
- char *pos, *gpos;
- struct netgrp *grp;
- struct linelist *lp = linehead;
-
- /*
- * First, see if the line has already been read in.
- */
- while (lp) {
- if (!strcmp(group, lp->l_groupname))
- break;
- lp = lp->l_next;
- }
- if (lp == (struct linelist *)0 &&
- (lp = read_for_group(group)) == (struct linelist *)0)
- return (1);
- if (lp->l_parsed) {
-#ifdef DEBUG
- /*
- * This error message is largely superflous since the
- * code handles the error condition sucessfully, and
- * spewing it out from inside libc can actually hose
- * certain programs.
- */
- fprintf(stderr, "Cycle in netgroup %s\n", lp->l_groupname);
-#endif
- return (1);
- } else
- lp->l_parsed = 1;
- pos = lp->l_line;
- /* Watch for null pointer dereferences, dammit! */
- while (pos != NULL && *pos != '\0') {
- if (*pos == '(') {
- grp = (struct netgrp *)malloc(sizeof (struct netgrp));
- bzero((char *)grp, sizeof (struct netgrp));
- grp->ng_next = grouphead.gr;
- grouphead.gr = grp;
- pos++;
- gpos = strsep(&pos, ")");
-#ifdef DEBUG
- fields = 0;
-#endif
- for (strpos = 0; strpos < 3; strpos++) {
- if ((spos = strsep(&gpos, ","))) {
-#ifdef DEBUG
- fields++;
-#endif
- while (*spos == ' ' || *spos == '\t')
- spos++;
- if ((epos = strpbrk(spos, " \t"))) {
- *epos = '\0';
- len = epos - spos;
- } else
- len = strlen(spos);
- if (len > 0) {
- grp->ng_str[strpos] = (char *)
- malloc(len + 1);
- bcopy(spos, grp->ng_str[strpos],
- len + 1);
- }
- } else {
- /*
- * All other systems I've tested
- * return NULL for empty netgroup
- * fields. It's up to user programs
- * to handle the NULLs appropriately.
- */
- grp->ng_str[strpos] = NULL;
- }
- }
-#ifdef DEBUG
- /*
- * Note: on other platforms, malformed netgroup
- * entries are not normally flagged. While we
- * can catch bad entries and report them, we should
- * stay silent by default for compatibility's sake.
- */
- if (fields < 3)
- fprintf(stderr, "Bad entry (%s%s%s%s%s) in netgroup \"%s\"\n",
- grp->ng_str[NG_HOST] == NULL ? "" : grp->ng_str[NG_HOST],
- grp->ng_str[NG_USER] == NULL ? "" : ",",
- grp->ng_str[NG_USER] == NULL ? "" : grp->ng_str[NG_USER],
- grp->ng_str[NG_DOM] == NULL ? "" : ",",
- grp->ng_str[NG_DOM] == NULL ? "" : grp->ng_str[NG_DOM],
- lp->l_groupname);
-#endif
- } else {
- spos = strsep(&pos, ", \t");
- if (parse_netgrp(spos))
- continue;
- }
- if (pos == NULL)
- break;
- while (*pos == ' ' || *pos == ',' || *pos == '\t')
- pos++;
- }
- return (0);
-}
-
-/*
- * Read the netgroup file and save lines until the line for the netgroup
- * is found. Return 1 if eof is encountered.
- */
-static struct linelist *
-read_for_group(group)
- char *group;
-{
- register char *pos, *spos, *linep, *olinep;
- register int len, olen;
- int cont;
- struct linelist *lp;
- char line[LINSIZ + 2];
-#ifdef YP
- char *result;
- int resultlen;
-
- while (_netgr_yp_enabled || fgets(line, LINSIZ, netf) != NULL) {
- if (_netgr_yp_enabled) {
- if(!_netgr_yp_domain)
- if(yp_get_default_domain(&_netgr_yp_domain))
- continue;
- if (yp_match(_netgr_yp_domain, "netgroup", group,
- strlen(group), &result, &resultlen)) {
- free(result);
- if (_use_only_yp)
- return ((struct linelist *)0);
- else {
- _netgr_yp_enabled = 0;
- continue;
- }
- }
- snprintf(line, LINSIZ, "%s %s", group, result);
- free(result);
- }
-#else
- while (fgets(line, LINSIZ, netf) != NULL) {
-#endif
- pos = (char *)&line;
-#ifdef YP
- if (*pos == '+') {
- _netgr_yp_enabled = 1;
- continue;
- }
-#endif
- if (*pos == '#')
- continue;
- while (*pos == ' ' || *pos == '\t')
- pos++;
- spos = pos;
- while (*pos != ' ' && *pos != '\t' && *pos != '\n' &&
- *pos != '\0')
- pos++;
- len = pos - spos;
- while (*pos == ' ' || *pos == '\t')
- pos++;
- if (*pos != '\n' && *pos != '\0') {
- lp = (struct linelist *)malloc(sizeof (*lp));
- lp->l_parsed = 0;
- lp->l_groupname = (char *)malloc(len + 1);
- bcopy(spos, lp->l_groupname, len);
- *(lp->l_groupname + len) = '\0';
- len = strlen(pos);
- olen = 0;
-
- /*
- * Loop around handling line continuations.
- */
- do {
- if (*(pos + len - 1) == '\n')
- len--;
- if (*(pos + len - 1) == '\\') {
- len--;
- cont = 1;
- } else
- cont = 0;
- if (len > 0) {
- linep = (char *)malloc(olen + len + 1);
- if (olen > 0) {
- bcopy(olinep, linep, olen);
- free(olinep);
- }
- bcopy(pos, linep + olen, len);
- olen += len;
- *(linep + olen) = '\0';
- olinep = linep;
- }
- if (cont) {
- if (fgets(line, LINSIZ, netf)) {
- pos = line;
- len = strlen(pos);
- } else
- cont = 0;
- }
- } while (cont);
- lp->l_line = linep;
- lp->l_next = linehead;
- linehead = lp;
-
- /*
- * If this is the one we wanted, we are done.
- */
- if (!strcmp(lp->l_groupname, group))
- return (lp);
- }
- }
-#ifdef YP
- /*
- * Yucky. The recursive nature of this whole mess might require
- * us to make more than one pass through the netgroup file.
- * This might be best left outside the #ifdef YP, but YP is
- * defined by default anyway, so I'll leave it like this
- * until I know better.
- */
- rewind(netf);
-#endif
- return ((struct linelist *)0);
-}
diff --git a/lib/libc/gen/getosreldate.c b/lib/libc/gen/getosreldate.c
deleted file mode 100644
index 808e16b..0000000
--- a/lib/libc/gen/getosreldate.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/* From:
-static char sccsid[] = "@(#)gethostid.c 8.1 (Berkeley) 6/2/93";
-*/
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-#if __STDC__
-int
-getosreldate(void)
-#else
-int
-getosreldate()
-#endif
-{
- int mib[2];
- size_t size;
- int value;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_OSRELDATE;
- size = sizeof value;
- if (sysctl(mib, 2, &value, &size, NULL, 0) == -1)
- return (-1);
- return (value);
-}
diff --git a/lib/libc/gen/getpagesize.3 b/lib/libc/gen/getpagesize.3
deleted file mode 100644
index 51dbcd1..0000000
--- a/lib/libc/gen/getpagesize.3
+++ /dev/null
@@ -1,60 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getpagesize.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETPAGESIZE 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getpagesize
-.Nd get system page size
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn getpagesize void
-.Sh DESCRIPTION
-.Fn Getpagesize
-returns the number of bytes in a page.
-Page granularity is the granularity of many of the memory
-management calls.
-.Pp
-The page size is a system
-page size and may not be the same as the underlying
-hardware page size.
-.Sh SEE ALSO
-.Xr pagesize 1 ,
-.Xr sbrk 2
-.Sh HISTORY
-The
-.Fn getpagesze
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/gen/getpagesize.c b/lib/libc/gen/getpagesize.c
deleted file mode 100644
index 556ff9e..0000000
--- a/lib/libc/gen/getpagesize.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getpagesize.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-/*
- * This is unlikely to change over the running time of any
- * program, so we cache the result to save some syscalls.
- */
-
-int
-getpagesize()
-{
- int mib[2];
- static int value;
- size_t size;
-
- if (!value) {
- mib[0] = CTL_HW;
- mib[1] = HW_PAGESIZE;
- size = sizeof value;
- if (sysctl(mib, 2, &value, &size, NULL, 0) == -1)
- return (-1);
- }
- return (value);
-}
diff --git a/lib/libc/gen/getpass.3 b/lib/libc/gen/getpass.3
deleted file mode 100644
index c1fb0e6..0000000
--- a/lib/libc/gen/getpass.3
+++ /dev/null
@@ -1,94 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getpass.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETPASS 3
-.Os
-.Sh NAME
-.Nm getpass
-.Nd get a password
-.Sh SYNOPSIS
-.Fd #include <pwd.h>
-.Fd #include <unistd.h>
-.Ft char *
-.Fn getpass "const char *prompt"
-.Sh DESCRIPTION
-The
-.Fn getpass
-function displays a prompt to, and reads in a password from,
-.Pa /dev/tty .
-If this file is not accessible,
-.Fn getpass
-displays the prompt on the standard error output and reads from the standard
-input.
-.Pp
-The password may be up to _PASSWORD_LEN (currently 128)
-characters in length.
-Any additional
-characters and the terminating newline character are discarded.
-.Pp
-The
-.Fn getpass
-function turns off character echoing while reading the password.
-.Pp
-.Sh RETURN VALUES
-The
-.Fn getpass
-function returns a pointer to the null terminated password.
-.Sh FILES
-.Bl -tag -width /dev/tty -compact
-.It Pa /dev/tty
-.El
-.Sh SEE ALSO
-.Xr crypt 3
-.Sh HISTORY
-A
-.Fn getpass
-function appeared in
-.At v7 .
-.Sh BUGS
-The
-.Fn getpass
-function leaves its result in an internal static object and returns
-a pointer to that object.
-Subsequent calls to
-.Fn getpass
-will modify the same object.
-.Pp
-The calling process should zero the password as soon as possible to
-avoid leaving the cleartext password visible in the process's address
-space.
-.Pp
-Upon receipt of a SIGTSTP, the input buffer will be flushed, so any
-partially typed password must be retyped when the process
-continues.
diff --git a/lib/libc/gen/getpass.c b/lib/libc/gen/getpass.c
deleted file mode 100644
index b053d34..0000000
--- a/lib/libc/gen/getpass.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getpass.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/termios.h>
-#include <signal.h>
-
-#include <paths.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <unistd.h>
-
-static struct termios oterm, term;
-static sig_t ointhandler, oquithandler, otstphandler, oconthandler;
-static FILE *fp;
-
-static void
-sighandler(int signo)
-{
- /* restore tty state */
- (void)tcsetattr(fileno(fp), TCSAFLUSH|TCSASOFT, &oterm);
-
- /* restore old sig handlers */
- (void)signal(SIGINT, ointhandler);
- (void)signal(SIGQUIT, oquithandler);
- (void)signal(SIGTSTP, otstphandler);
-
- /* resend us this signal */
- (void)kill(getpid(), signo);
-}
-
-/* ARGSUSED */
-static void
-sigconthandler(int signo)
-{
- /* re-install our signal handlers */
- ointhandler = signal(SIGINT, sighandler);
- oquithandler = signal(SIGQUIT, sighandler);
- otstphandler = signal(SIGTSTP, sighandler);
-
- /* turn off echo again */
- (void)tcsetattr(fileno(fp), TCSAFLUSH|TCSASOFT, &term);
-}
-
-
-char *
-getpass(prompt)
- const char *prompt;
-{
- register int ch;
- register char *p;
- FILE *outfp;
- static char buf[_PASSWORD_LEN + 1];
-
- /*
- * read and write to /dev/tty if possible; else read from
- * stdin and write to stderr.
- */
- if ((outfp = fp = fopen(_PATH_TTY, "w+")) == NULL) {
- outfp = stderr;
- fp = stdin;
- }
-
- ointhandler = signal(SIGINT, sighandler);
- oquithandler = signal(SIGQUIT, sighandler);
- otstphandler = signal(SIGTSTP, sighandler);
- oconthandler = signal(SIGCONT, sigconthandler);
-
- (void)tcgetattr(fileno(fp), &oterm);
- term = oterm;
- term.c_lflag &= ~ECHO;
- (void)tcsetattr(fileno(fp), TCSAFLUSH|TCSASOFT, &term);
- (void)fputs(prompt, outfp);
- rewind(outfp); /* implied flush */
- for (p = buf; (ch = getc(fp)) != EOF && ch != '\n';)
- if (p < buf + _PASSWORD_LEN)
- *p++ = ch;
- *p = '\0';
- (void)write(fileno(outfp), "\n", 1);
- (void)tcsetattr(fileno(fp), TCSAFLUSH|TCSASOFT, &oterm);
-
- /* restore old sig handlers */
- (void)signal(SIGINT, ointhandler);
- (void)signal(SIGQUIT, oquithandler);
- (void)signal(SIGTSTP, otstphandler);
- (void)signal(SIGCONT, oconthandler);
-
- if (fp != stdin)
- (void)fclose(fp);
- return(buf);
-}
diff --git a/lib/libc/gen/getpwent.3 b/lib/libc/gen/getpwent.3
deleted file mode 100644
index 6badc19..0000000
--- a/lib/libc/gen/getpwent.3
+++ /dev/null
@@ -1,218 +0,0 @@
-.\" Copyright (c) 1988, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)getpwent.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd September 20, 1994
-.Dt GETPWENT 3
-.Os
-.Sh NAME
-.Nm getpwent ,
-.Nm getpwnam ,
-.Nm getpwuid ,
-.Nm setpassent ,
-.Nm setpwent ,
-.Nm endpwent
-.Nd password database operations
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <pwd.h>
-.Ft struct passwd *
-.Fn getpwent void
-.Ft struct passwd *
-.Fn getpwnam "const char *login"
-.Ft struct passwd *
-.Fn getpwuid "uid_t uid"
-.Ft int
-.Fn setpassent "int stayopen"
-.Ft int
-.Fn setpwent void
-.Ft void
-.Fn endpwent void
-.Sh DESCRIPTION
-These functions
-operate on the password database file
-which is described
-in
-.Xr passwd 5 .
-Each entry in the database is defined by the structure
-.Ar passwd
-found in the include
-file
-.Aq Pa pwd.h :
-.Bd -literal -offset indent
-struct passwd {
- char *pw_name; /* user name */
- char *pw_passwd; /* encrypted password */
- int pw_uid; /* user uid */
- int pw_gid; /* user gid */
- time_t pw_change; /* password change time */
- char *pw_class; /* user access class */
- char *pw_gecos; /* Honeywell login info */
- char *pw_dir; /* home directory */
- char *pw_shell; /* default shell */
- time_t pw_expire; /* account expiration */
- int pw_fields; /* internal: fields filled in */
-};
-.Ed
-.Pp
-The functions
-.Fn getpwnam
-and
-.Fn getpwuid
-search the password database for the given login name or user uid,
-respectively, always returning the first one encountered.
-.Pp
-The
-.Fn getpwent
-function
-sequentially reads the password database and is intended for programs
-that wish to process the complete list of users.
-.Pp
-The
-.Fn setpassent
-function
-accomplishes two purposes.
-First, it causes
-.Fn getpwent
-to ``rewind'' to the beginning of the database.
-Additionally, if
-.Fa stayopen
-is non-zero, file descriptors are left open, significantly speeding
-up subsequent accesses for all of the routines.
-(This latter functionality is unnecessary for
-.Fn getpwent
-as it doesn't close its file descriptors by default.)
-.Pp
-It is dangerous for long-running programs to keep the file descriptors
-open as the database will become out of date if it is updated while the
-program is running.
-.Pp
-The
-.Fn setpwent
-function
-is identical to
-.Fn setpassent
-with an argument of zero.
-.Pp
-The
-.Fn endpwent
-function
-closes any open files.
-.Pp
-These routines have been written to ``shadow'' the password file, e.g.
-allow only certain programs to have access to the encrypted password.
-If the process which calls them has an effective uid of 0, the encrypted
-password will be returned, otherwise, the password field of the returned
-structure will point to the string
-.Ql * .
-.Sh YP/NIS INTERACTION
-When the
-.Xr yp 4
-password database is enabled, the
-.Fn getpwnam
-and
-.Fn getpwuid
-functions use the YP maps
-.Dq Li passwd.byname
-and
-.Dq Li passwd.byuid ,
-respectively, if the requested password entry is not found in the
-local database. The
-.Fn getpwent
-function will step through the YP map
-.Dq Li passwd.byname
-if the entire map is enabled as described in
-.Xr passwd 5 .
-.Sh RETURN VALUES
-The functions
-.Fn getpwent ,
-.Fn getpwnam ,
-and
-.Fn getpwuid ,
-return a valid pointer to a passwd structure on success
-and a null pointer if end-of-file is reached or an error occurs.
-The functions
-.Fn setpassent
-and
-.Fn setpwent
-return 0 on failure and 1 on success.
-The
-.Fn endpwent
-function
-has no return value.
-.Sh FILES
-.Bl -tag -width /etc/master.passwd -compact
-.It Pa /etc/pwd.db
-The insecure password database file
-.It Pa /etc/spwd.db
-The secure password database file
-.It Pa /etc/master.passwd
-The current password file
-.It Pa /etc/passwd
-A Version 7 format password file
-.El
-.Sh SEE ALSO
-.Xr getlogin 2 ,
-.Xr getgrent 3 ,
-.Xr yp 4 ,
-.Xr passwd 5 ,
-.Xr pwd_mkdb 8 ,
-.Xr vipw 8
-.Sh HISTORY
-The
-.Fn getpwent ,
-.Fn getpwnam ,
-.Fn getpwuid ,
-.Fn setpwent,
-and
-.Fn endpwent
-functions appeared in
-.At v7 .
-The
-.Fn setpassent
-function appeared in
-.Bx 4.3 Reno .
-.Sh COMPATIBILITY
-The historic function
-.Xr setpwfile 3 ,
-which allowed the specification of alternate password databases,
-has been deprecated and is no longer available.
-.Sh BUGS
-The functions
-.Fn getpwent ,
-.Fn getpwnam ,
-and
-.Fn getpwuid ,
-leave their results in an internal static object and return
-a pointer to that object. Subsequent calls to
-the same function
-will modify the same object.
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
deleted file mode 100644
index dfe5d34..0000000
--- a/lib/libc/gen/getpwent.c
+++ /dev/null
@@ -1,835 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getpwent.c 8.2 (Berkeley) 4/27/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <sys/param.h>
-#include <fcntl.h>
-#include <db.h>
-#include <syslog.h>
-#include <pwd.h>
-#include <utmp.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <grp.h>
-
-extern void setnetgrent __P(( char * ));
-extern int getnetgrent __P(( char **, char **, char ** ));
-extern int innetgr __P(( const char *, const char *, const char *, const char * ));
-
-/*
- * The lookup techniques and data extraction code here must be kept
- * in sync with that in `pwd_mkdb'.
- */
-
-static struct passwd _pw_passwd; /* password structure */
-static DB *_pw_db; /* password database */
-static int _pw_keynum; /* key counter */
-static int _pw_stayopen; /* keep fd's open */
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-
-static struct passwd _pw_copy;
-static DBT empty = { NULL, 0 };
-static DB *_ypcache = (DB *)NULL;
-static int _yp_exclusions = 0;
-static int _yp_enabled; /* set true when yp enabled */
-static int _pw_stepping_yp; /* set true when stepping thru map */
-static char _ypnam[YPMAXRECORD];
-#define YP_HAVE_MASTER 2
-#define YP_HAVE_ADJUNCT 1
-#define YP_HAVE_NONE 0
-static int _gotmaster;
-static char *_pw_yp_domain;
-static inline int unwind __P(( char * ));
-static inline void _ypinitdb __P(( void ));
-static int _havemaster __P((char *));
-static int _getyppass __P((struct passwd *, const char *, const char * ));
-static int _nextyppass __P((struct passwd *));
-#endif
-static int __hashpw(), __initdb();
-
-struct passwd *
-getpwent()
-{
- DBT key;
- char bf[sizeof(_pw_keynum) + 1];
- int rv;
-
- if (!_pw_db && !__initdb())
- return((struct passwd *)NULL);
-
-#ifdef YP
- if(_pw_stepping_yp) {
- _pw_passwd = _pw_copy;
- if (unwind((char *)&_ypnam))
- return(&_pw_passwd);
- }
-#endif
-tryagain:
-
- ++_pw_keynum;
- bf[0] = _PW_KEYBYNUM;
- bcopy((char *)&_pw_keynum, bf + 1, sizeof(_pw_keynum));
- key.data = (u_char *)bf;
- key.size = sizeof(_pw_keynum) + 1;
- rv = __hashpw(&key);
- if(!rv) return (struct passwd *)NULL;
-#ifdef YP
- if(_pw_passwd.pw_name[0] == '+' || _pw_passwd.pw_name[0] == '-') {
- bzero((char *)&_ypnam, sizeof(_ypnam));
- bcopy(_pw_passwd.pw_name, _ypnam,
- strlen(_pw_passwd.pw_name));
- _pw_copy = _pw_passwd;
- if (unwind((char *)&_ypnam) == 0)
- goto tryagain;
- else
- return(&_pw_passwd);
- }
-#else
- /* Ignore YP password file entries when YP is disabled. */
- if(_pw_passwd.pw_name[0] == '+' || _pw_passwd.pw_name[0] == '-') {
- goto tryagain;
- }
-#endif
- return(&_pw_passwd);
-}
-
-struct passwd *
-getpwnam(name)
- const char *name;
-{
- DBT key;
- int len, rval;
- char bf[UT_NAMESIZE + 2];
-
- if (!_pw_db && !__initdb())
- return((struct passwd *)NULL);
-
- bf[0] = _PW_KEYBYNAME;
- len = strlen(name);
- bcopy(name, bf + 1, MIN(len, UT_NAMESIZE));
- key.data = (u_char *)bf;
- key.size = len + 1;
- rval = __hashpw(&key);
-
-#ifdef YP
- if (!rval && _yp_enabled)
- rval = _getyppass(&_pw_passwd, name, "passwd.byname");
-#endif
- /*
- * Prevent login attempts when YP is not enabled but YP entries
- * are in /etc/master.passwd.
- */
- if (rval && (_pw_passwd.pw_name[0] == '+'||
- _pw_passwd.pw_name[0] == '-')) rval = 0;
-
- endpwent();
- return(rval ? &_pw_passwd : (struct passwd *)NULL);
-}
-
-struct passwd *
-getpwuid(uid)
- uid_t uid;
-{
- DBT key;
- int keyuid, rval;
- char bf[sizeof(keyuid) + 1];
-
- if (!_pw_db && !__initdb())
- return((struct passwd *)NULL);
-
- bf[0] = _PW_KEYBYUID;
- keyuid = uid;
- bcopy(&keyuid, bf + 1, sizeof(keyuid));
- key.data = (u_char *)bf;
- key.size = sizeof(keyuid) + 1;
- rval = __hashpw(&key);
-
-#ifdef YP
- if (!rval && _yp_enabled) {
- char ypbuf[16]; /* big enough for 32-bit uids and then some */
- snprintf(ypbuf, sizeof ypbuf, "%u", (unsigned)uid);
- rval = _getyppass(&_pw_passwd, ypbuf, "passwd.byuid");
- }
-#endif
- /*
- * Prevent login attempts when YP is not enabled but YP entries
- * are in /etc/master.passwd.
- */
- if (rval && (_pw_passwd.pw_name[0] == '+'||
- _pw_passwd.pw_name[0] == '-')) rval = 0;
-
- endpwent();
- return(rval ? &_pw_passwd : (struct passwd *)NULL);
-}
-
-int
-setpassent(stayopen)
- int stayopen;
-{
- _pw_keynum = 0;
-#ifdef YP
- _pw_stepping_yp = 0;
-#endif
- _pw_stayopen = stayopen;
- return(1);
-}
-
-int
-setpwent()
-{
- _pw_keynum = 0;
-#ifdef YP
- _pw_stepping_yp = 0;
-#endif
- _pw_stayopen = 0;
- return(1);
-}
-
-void
-endpwent()
-{
- _pw_keynum = 0;
-#ifdef YP
- _pw_stepping_yp = 0;
-#endif
- if (_pw_db) {
- (void)(_pw_db->close)(_pw_db);
- _pw_db = (DB *)NULL;
- }
-#ifdef YP
- if (_ypcache) {
- (void)(_ypcache->close)(_ypcache);
- _ypcache = (DB *)NULL;
- _yp_exclusions = 0;
- }
-#endif
-}
-
-static int
-__initdb()
-{
- static int warned;
- char *p;
-
- p = (geteuid()) ? _PATH_MP_DB : _PATH_SMP_DB;
- _pw_db = dbopen(p, O_RDONLY, 0, DB_HASH, NULL);
- if (_pw_db) {
-#ifdef YP
- DBT key, data;
- char buf[] = { _PW_KEYYPENABLED };
- key.data = buf;
- key.size = 1;
- if ((_pw_db->get)(_pw_db, &key, &data, 0)) {
- _yp_enabled = 0;
- } else {
- _yp_enabled = (int)*((char *)data.data) - 2;
- /* Don't even bother with this if we aren't root. */
- if (!geteuid()) {
- if (!_pw_yp_domain)
- if (yp_get_default_domain(&_pw_yp_domain))
- return(1);
- _gotmaster = _havemaster(_pw_yp_domain);
- } else _gotmaster = YP_HAVE_NONE;
- if (!_ypcache)
- _ypinitdb();
- }
-#endif
- return(1);
- }
- if (!warned++)
- syslog(LOG_ERR, "%s: %m", p);
- return(0);
-}
-
-static int
-__hashpw(key)
- DBT *key;
-{
- register char *p, *t;
- static u_int max;
- static char *line;
- DBT data;
-
- if ((_pw_db->get)(_pw_db, key, &data, 0))
- return(0);
- p = (char *)data.data;
-
- /* Increase buffer size for long lines if necessary. */
- if (data.size > max) {
- max = data.size + 1024;
- if (!(line = realloc(line, max)))
- return(0);
- }
-
- /* THIS CODE MUST MATCH THAT IN pwd_mkdb. */
- t = line;
-#define EXPAND(e) e = t; while ( (*t++ = *p++) );
-#define SCALAR(v) memmove(&(v), p, sizeof v); p += sizeof v
- EXPAND(_pw_passwd.pw_name);
- EXPAND(_pw_passwd.pw_passwd);
- SCALAR(_pw_passwd.pw_uid);
- SCALAR(_pw_passwd.pw_gid);
- SCALAR(_pw_passwd.pw_change);
- EXPAND(_pw_passwd.pw_class);
- EXPAND(_pw_passwd.pw_gecos);
- EXPAND(_pw_passwd.pw_dir);
- EXPAND(_pw_passwd.pw_shell);
- SCALAR(_pw_passwd.pw_expire);
- bcopy(p, (char *)&_pw_passwd.pw_fields, sizeof _pw_passwd.pw_fields);
- p += sizeof _pw_passwd.pw_fields;
- return(1);
-}
-
-#ifdef YP
-
-/*
- * Create a DB hash database in memory. Bet you didn't know you
- * could do a dbopen() will a NULL filename, did you.
- */
-static inline void _ypinitdb()
-{
- if (_ypcache == (DB *)NULL)
- _ypcache = dbopen(NULL, O_RDWR, 600, DB_HASH, NULL);
- return;
-}
-
-/*
- * See if a user is in the blackballed list.
- */
-static inline int lookup(name)
- char *name;
-{
- DBT key;
-
- if (!_yp_exclusions)
- return(0);
-
- key.data = name;
- key.size = strlen(name);
-
- if ((_ypcache->get)(_ypcache, &key, &empty, 0)) {
- return(0);
- }
-
- return(1);
-}
-
-/*
- * Store a blackballed user in an in-core hash database.
- */
-static inline void store(key)
- char *key;
-{
- DBT lkey;
-/*
- if (lookup(key))
- return;
-*/
-
- _yp_exclusions = 1;
-
- lkey.data = key;
- lkey.size = strlen(key);
-
- (void)(_ypcache->put)(_ypcache, &lkey, &empty, R_NOOVERWRITE);
-}
-
-/*
- * Parse the + entries in the password database and do appropriate
- * NIS lookups. While ugly to look at, this is optimized to do only
- * as many lookups as are absolutely necessary in any given case.
- * Basically, the getpwent() function will feed us + and - lines
- * as they appear in the database. For + lines, we do netgroup/group
- * and user lookups to find all usernames that match the rule and
- * extract them from the NIS passwd maps. For - lines, we save the
- * matching names in a database and a) exlude them, and b) make sure
- * we don't consider them when processing other + lines that appear
- * later.
- */
-static inline int unwind(grp)
- char *grp;
-{
- char *user, *host, *domain;
- static int latch = 0;
- static struct group *gr = NULL;
- int rv = 0;
-
- if (grp[0] == '+') {
- if (strlen(grp) == 1) {
- return(_nextyppass(&_pw_passwd));
- }
- if (grp[1] == '@') {
- _pw_stepping_yp = 1;
-grpagain:
- if (gr != NULL) {
- if (*gr->gr_mem != NULL) {
- if (lookup(*gr->gr_mem)) {
- gr->gr_mem++;
- goto grpagain;
- }
- rv = _getyppass(&_pw_passwd,
- *gr->gr_mem,
- "passwd.byname");
- gr->gr_mem++;
- return(rv);
- } else {
- endgrent();
- latch = 0;
- gr = NULL;
- return(0);
- }
- }
- if (!latch) {
- setnetgrent(grp+2);
- latch++;
- }
-again:
- if (getnetgrent(&host, &user, &domain) == 0) {
- if ((gr = getgrnam(grp+2)) != NULL)
- goto grpagain;
- latch = 0;
- _pw_stepping_yp = 0;
- return(0);
- } else {
- if (lookup(user))
- goto again;
- if (_getyppass(&_pw_passwd, user,
- "passwd.byname"))
- return(1);
- else
- goto again;
- }
- } else {
- if (lookup(grp+1))
- return(0);
- return(_getyppass(&_pw_passwd, grp+1, "passwd.byname"));
- }
- } else {
- if (grp[1] == '@') {
- setnetgrent(grp+2);
- rv = 0;
- while(getnetgrent(&host, &user, &domain) != 0) {
- store(user);
- rv++;
- }
- if (!rv && (gr = getgrnam(grp+2)) != NULL) {
- while(gr->gr_mem) {
- store(gr->gr_mem);
- gr->gr_mem++;
- }
- }
- } else {
- store(grp+1);
- }
- }
- return(0);
-}
-
-/*
- * See if a user is a member of a particular group.
- */
-static inline int ingr(grp, name)
- char *grp;
- char *name;
-{
- register struct group *gr;
-
- if ((gr = getgrnam(grp)) == NULL)
- return(0);
-
- while(*gr->gr_mem) {
- if (!strcmp(*gr->gr_mem, name)) {
- endgrent();
- return(1);
- }
- gr->gr_mem++;
- }
-
- endgrent();
- return(0);
-}
-
-/*
- * Check a user against the +@netgroup/-@netgroup lines listed in
- * the local password database. Also checks +user/-user lines.
- * If no netgroup exists that matches +@netgroup/-@netgroup,
- * try searching regular groups with the same name.
- */
-static inline int verf(name)
- char *name;
-{
- DBT key;
- char bf[sizeof(_pw_keynum) + 1];
- int keynum = 0;
-
-again:
- ++keynum;
- bf[0] = _PW_KEYYPBYNUM;
- bcopy((char *)&keynum, bf + 1, sizeof(keynum));
- key.data = (u_char *)bf;
- key.size = sizeof(keynum) + 1;
- if (!__hashpw(&key)) {
- /* Try again using old format */
- bf[0] = _PW_KEYBYNUM;
- bcopy((char *)&keynum, bf + 1, sizeof(keynum));
- key.data = (u_char *)bf;
- if (!__hashpw(&key))
- return(0);
- }
- if (_pw_passwd.pw_name[0] != '+' && (_pw_passwd.pw_name[0] != '-'))
- goto again;
- if (_pw_passwd.pw_name[0] == '+') {
- if (strlen(_pw_passwd.pw_name) == 1) /* Wildcard */
- return(1);
- if (_pw_passwd.pw_name[1] == '@') {
- if ((innetgr(_pw_passwd.pw_name+2, NULL, name,
- _pw_yp_domain) ||
- ingr(_pw_passwd.pw_name+2, name)) && !lookup(name))
- return(1);
- else
- goto again;
- } else {
- if (!strcmp(name, _pw_passwd.pw_name+1) &&
- !lookup(name))
- return(1);
- else
- goto again;
- }
- }
- if (_pw_passwd.pw_name[0] == '-') {
- /* Note that a minus wildcard is a no-op. */
- if (_pw_passwd.pw_name[1] == '@') {
- if (innetgr(_pw_passwd.pw_name+2, NULL, name,
- _pw_yp_domain) ||
- ingr(_pw_passwd.pw_name+2, name)) {
- store(name);
- return(0);
- } else
- goto again;
- } else {
- if (!strcmp(name, _pw_passwd.pw_name+1)) {
- store(name);
- return(0);
- } else
- goto again;
- }
-
- }
- return(0);
-}
-
-static char * _get_adjunct_pw(name)
- char *name;
-{
- static char adjunctbuf[YPMAXRECORD+2];
- int rval;
- char *result;
- int resultlen;
- char *map = "passwd.adjunct.byname";
- char *s;
-
- if ((rval = yp_match(_pw_yp_domain, map, name, strlen(name),
- &result, &resultlen)))
- return(NULL);
-
- strncpy(adjunctbuf, result, resultlen);
- adjunctbuf[resultlen] = '\0';
- free(result);
- result = (char *)&adjunctbuf;
-
- /* Don't care about the name. */
- if ((s = strsep(&result, ":")) == NULL)
- return (NULL); /* name */
- if ((s = strsep(&result, ":")) == NULL)
- return (NULL); /* password */
-
- return(s);
-}
-
-static int
-_pw_breakout_yp(struct passwd *pw, char *res, int resultlen, int master)
-{
- char *s, *result;
- static char resbuf[YPMAXRECORD+2];
-
- /*
- * Be triple, ultra super-duper paranoid: reject entries
- * that start with a + or -. yp_mkdb and /var/yp/Makefile
- * are _both_ supposed to strip these out, but you never
- * know.
- */
- if (*res == '+' || *res == '-')
- return 0;
-
- /*
- * The NIS protocol definition limits the size of an NIS
- * record to YPMAXRECORD bytes. We need to do a copy to
- * a static buffer here since the memory pointed to by
- * res will be free()ed when this function returns.
- */
- strncpy((char *)&resbuf, res, resultlen);
- resbuf[resultlen] = '\0';
- result = (char *)&resbuf;
-
- /*
- * XXX Sanity check: make sure all fields are valid (no NULLs).
- * If we find a badly formatted entry, we punt.
- */
- if ((s = strsep(&result, ":")) == NULL) return 0; /* name */
- /*
- * We don't care what pw_fields says: we _always_ want the
- * username returned to us by NIS.
- */
- pw->pw_name = s;
- pw->pw_fields |= _PWF_NAME;
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* password */
- if(!(pw->pw_fields & _PWF_PASSWD)) {
- /* SunOS passwd.adjunct hack */
- if (master == YP_HAVE_ADJUNCT && strstr(s, "##") != NULL) {
- char *realpw;
- realpw = _get_adjunct_pw(pw->pw_name);
- if (realpw == NULL)
- pw->pw_passwd = s;
- else
- pw->pw_passwd = realpw;
- } else {
- pw->pw_passwd = s;
- }
- pw->pw_fields |= _PWF_PASSWD;
- }
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* uid */
- if(!(pw->pw_fields & _PWF_UID)) {
- pw->pw_uid = atoi(s);
- pw->pw_fields |= _PWF_UID;
- }
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* gid */
- if(!(pw->pw_fields & _PWF_GID)) {
- pw->pw_gid = atoi(s);
- pw->pw_fields |= _PWF_GID;
- }
-
- if (master == YP_HAVE_MASTER) {
- if ((s = strsep(&result, ":")) == NULL) return 0; /* class */
- if(!(pw->pw_fields & _PWF_CLASS)) {
- pw->pw_class = s;
- pw->pw_fields |= _PWF_CLASS;
- }
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* change */
- if(!(pw->pw_fields & _PWF_CHANGE)) {
- pw->pw_change = atol(s);
- pw->pw_fields |= _PWF_CHANGE;
- }
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* expire */
- if(!(pw->pw_fields & _PWF_EXPIRE)) {
- pw->pw_expire = atol(s);
- pw->pw_fields |= _PWF_EXPIRE;
- }
- }
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* gecos */
- if(!(pw->pw_fields & _PWF_GECOS)) {
- pw->pw_gecos = s;
- pw->pw_fields |= _PWF_GECOS;
- }
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* dir */
- if(!(pw->pw_fields & _PWF_DIR)) {
- pw->pw_dir = s;
- pw->pw_fields |= _PWF_DIR;
- }
-
- if ((s = strsep(&result, ":")) == NULL) return 0; /* shell */
- if(!(pw->pw_fields & _PWF_SHELL)) {
- pw->pw_shell = s;
- pw->pw_fields |= _PWF_SHELL;
- }
-
- /* Be consistent. */
- if ((s = strchr(pw->pw_shell, '\n'))) *s = '\0';
-
- return 1;
-}
-
-static int
-_havemaster(char *_yp_domain)
-{
- int order;
- int rval;
-
- if (!(rval = yp_order(_yp_domain, "master.passwd.byname", &order)))
- return(YP_HAVE_MASTER);
-
- /*
- * NIS+ in YP compat mode doesn't support
- * YPPROC_ORDER -- no point in continuing.
- */
- if (rval == YPERR_YPERR)
- return(YP_HAVE_NONE);
-
- /* master.passwd doesn't exist -- try passwd.adjunct */
- if (rval == YPERR_MAP) {
- rval = yp_order(_yp_domain, "passwd.adjunct.byname", &order);
- if (!rval)
- return(YP_HAVE_ADJUNCT);
- }
-
- return (YP_HAVE_NONE);
-}
-
-static int
-_getyppass(struct passwd *pw, const char *name, const char *map)
-{
- char *result, *s;
- int resultlen;
- int rv;
- char mastermap[YPMAXRECORD];
-
- if(!_pw_yp_domain) {
- if(yp_get_default_domain(&_pw_yp_domain))
- return 0;
- }
-
- sprintf(mastermap,"%s",map);
-
- if (_gotmaster == YP_HAVE_MASTER)
- sprintf(mastermap,"master.%s", map);
-
- if(yp_match(_pw_yp_domain, (char *)&mastermap, name, strlen(name),
- &result, &resultlen))
- return 0;
-
- if (!_pw_stepping_yp) {
- s = strchr(result, ':');
- if (s) {
- *s = '\0';
- } else {
- /* Must be a malformed entry if no colons. */
- free(result);
- return(0);
- }
-
- if (!verf(result)) {
- *s = ':';
- free(result);
- return(0);
- }
-
- *s = ':'; /* Put back the colon we previously replaced with a NUL. */
- }
-
- rv = _pw_breakout_yp(pw, result, resultlen, _gotmaster);
- free(result);
- return(rv);
-}
-
-static int
-_nextyppass(struct passwd *pw)
-{
- static char *key;
- static int keylen;
- char *lastkey, *result, *s;
- int resultlen;
- int rv;
- char *map = "passwd.byname";
-
- if(!_pw_yp_domain) {
- if(yp_get_default_domain(&_pw_yp_domain))
- return 0;
- }
-
- if (_gotmaster == YP_HAVE_MASTER)
- map = "master.passwd.byname";
-
- if(!_pw_stepping_yp) {
- if(key) free(key);
- rv = yp_first(_pw_yp_domain, map,
- &key, &keylen, &result, &resultlen);
- if(rv) {
- return 0;
- }
- _pw_stepping_yp = 1;
- goto unpack;
- } else {
-tryagain:
- lastkey = key;
- rv = yp_next(_pw_yp_domain, map, key, keylen,
- &key, &keylen, &result, &resultlen);
- free(lastkey);
-unpack:
- if(rv) {
- _pw_stepping_yp = 0;
- return 0;
- }
-
- s = strchr(result, ':');
- if (s) {
- *s = '\0';
- } else {
- /* Must be a malformed entry if no colons. */
- free(result);
- goto tryagain;
- }
-
- if (lookup(result)) {
- *s = ':';
- free(result);
- goto tryagain;
- }
-
- *s = ':'; /* Put back the colon we previously replaced with a NUL. */
- if (_pw_breakout_yp(pw, result, resultlen, _gotmaster)) {
- free(result);
- return(1);
- } else {
- free(result);
- goto tryagain;
- }
- }
-}
-
-#endif /* YP */
diff --git a/lib/libc/gen/getttyent.3 b/lib/libc/gen/getttyent.3
deleted file mode 100644
index 7d2e7ba..0000000
--- a/lib/libc/gen/getttyent.3
+++ /dev/null
@@ -1,209 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getttyent.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd November 17, 1996
-.Dt GETTTYENT 3
-.Os BSD 4.3
-.Sh NAME
-.Nm getttyent ,
-.Nm getttynam ,
-.Nm setttyent ,
-.Nm endttyent
-.Nd get ttys file entry
-.Nm isdialuptty ,
-.Nm isnetworktty
-.Nd determine tty type from ttys file entry
-.Sh SYNOPSIS
-.Fd #include <ttyent.h>
-.Ft struct ttyent *
-.Fn getttyent void
-.Ft struct ttyent *
-.Fn getttynam "const char *name"
-.Ft int
-.Fn setttyent void
-.Ft int
-.Fn endttyent void
-.Ft int
-.Fn isdialuptty "const char *name"
-.Ft int
-.Fn isnetworktty "const char *name"
-.Sh DESCRIPTION
-The
-.Fn getttyent ,
-and
-.Fn getttynam
-functions
-each return a pointer to an object, with the following structure,
-containing the broken-out fields of a line from the tty description
-file.
-.Bd -literal
-struct ttyent {
- char *ty_name; /* terminal device name */
- char *ty_getty; /* command to execute, usually getty */
- char *ty_type; /* terminal type for termcap */
-#define TTY_ON 0x01 /* enable logins (start ty_getty program) */
-#define TTY_SECURE 0x02 /* allow uid of 0 to login */
-#define TTY_DIALUP 0x04 /* is a dialup tty */
-#define TTY_NETWORK 0x08 /* is a network tty */
- int ty_status; /* status flags */
- char *ty_window; /* command to start up window manager */
- char *ty_comment; /* comment field */
- char *ty_group; /* tty group name */
-};
-.Ed
-.Pp
-The fields are as follows:
-.Bl -tag -width ty_comment
-.It Fa ty_name
-The name of the character-special file.
-.It Fa ty_getty
-The name of the command invoked by
-.Xr init 8
-to initialize tty line characteristics.
-.It Fa ty_type
-The name of the default terminal type connected to this tty line.
-.It Fa ty_status
-A mask of bit fields which indicate various actions allowed on this
-tty line.
-The possible flags are as follows:
-.Bl -tag -width TTY_NETWORK
-.It Dv TTY_ON
-Enables logins (i.e.,
-.Xr init 8
-will start the command referenced by
-.Fa ty_getty
-on this entry).
-.It Dv TTY_SECURE
-Allow users with a uid of 0 to login on this terminal.
-.It Dv TTY_DIALUP
-Identifies a tty as a dialin line.
-If this flag is set, then
-.Fn isdialuptty
-will return a non-zero value.
-.It Dv TTY_NETWORK
-Identifies a tty used for network connections.
-If this flag is set, then
-.Fn isnetworktty
-will return a non-zero value.
-.El
-.It Fa ty_window
-The command to execute for a window system associated with the line.
-.It Fa ty_group
-A group name to which the tty belongs.
-If no group is specified in the ttys description file,
-then the tty is placed in an anonymous group called "none".
-.It Fa ty_comment
-Any trailing comment field, with any leading hash marks (``#'') or
-whitespace removed.
-.El
-.Pp
-If any of the fields pointing to character strings are unspecified,
-they are returned as null pointers.
-The field
-.Fa ty_status
-will be zero if no flag values are specified.
-.Pp
-See
-.Xr ttys 5
-for a more complete discussion of the meaning and usage of the
-fields.
-.Pp
-The
-.Fn getttyent
-function
-reads the next line from the ttys file, opening the file if necessary.
-The
-.Fn setttyent
-function
-rewinds the file if open, or opens the file if it is unopened.
-The
-.Fn endttyent
-function
-closes any open files.
-.Pp
-The
-.Fn getttynam
-function
-searches from the beginning of the file until a matching
-.Fa name
-is found
-(or until
-.Dv EOF
-is encountered).
-.Sh RETURN VALUES
-The routines
-.Fn getttyent
-and
-.Fn getttynam
-return a null pointer on
-.Dv EOF
-or error.
-The
-.Fn setttyent
-function
-and
-.Fn endttyent
-return 0 on failure and 1 on success.
-.Pp
-The routines
-.Fn isdialuptty
-and
-.Fn isnetworktty
-return non-zero if the dialup or network flag is set for the
-tty entry relating to the tty named by the parameter, and
-zero otherwise.
-.Sh FILES
-.Bl -tag -width /etc/ttys -compact
-.It Pa /etc/ttys
-.El
-.Sh SEE ALSO
-.Xr login 1 ,
-.Xr ttyslot 3 ,
-.Xr gettytab 5 ,
-.Xr termcap 5 ,
-.Xr ttys 5 ,
-.Xr getty 8 ,
-.Xr init 8
-.Sh HISTORY
-The
-.Fn getttyent ,
-.Fn getttynam ,
-.Fn setttyent ,
-and
-.Fn endttyent
-functions appeared in
-.Bx 4.3 .
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
diff --git a/lib/libc/gen/getttyent.c b/lib/libc/gen/getttyent.c
deleted file mode 100644
index ac3e138..0000000
--- a/lib/libc/gen/getttyent.c
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getttyent.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <ttyent.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-
-static char zapchar;
-static FILE *tf;
-static size_t lbsize;
-static char *line;
-
-#define MALLOCCHUNK 100
-
-static char *skip __P((char *));
-static char *value __P((char *));
-
-struct ttyent *
-getttynam(tty)
- const char *tty;
-{
- register struct ttyent *t;
-
- if (strncmp(tty, "/dev/", 5) == 0)
- tty += 5;
- setttyent();
- while ( (t = getttyent()) )
- if (!strcmp(tty, t->ty_name))
- break;
- endttyent();
- return (t);
-}
-
-struct ttyent *
-getttyent()
-{
- static struct ttyent tty;
- register char *p;
- register int c;
- size_t i;
-
- if (!tf && !setttyent())
- return (NULL);
- for (;;) {
- if (!fgets(p = line, lbsize, tf))
- return (NULL);
- /* extend buffer if line was too big, and retry */
- while (!index(p, '\n')) {
- i = strlen(p);
- lbsize += MALLOCCHUNK;
- if ((p = realloc(line, lbsize)) == NULL) {
- (void)endttyent();
- return (NULL);
- }
- line = p;
- if (!fgets(&line[i], lbsize - i, tf))
- return (NULL);
- }
- while (isspace(*p))
- ++p;
- if (*p && *p != '#')
- break;
- }
-
-#define scmp(e) !strncmp(p, e, sizeof(e) - 1) && isspace(p[sizeof(e) - 1])
-#define vcmp(e) !strncmp(p, e, sizeof(e) - 1) && p[sizeof(e) - 1] == '='
-
- zapchar = 0;
- tty.ty_name = p;
- p = skip(p);
- if (!*(tty.ty_getty = p))
- tty.ty_getty = tty.ty_type = NULL;
- else {
- p = skip(p);
- if (!*(tty.ty_type = p))
- tty.ty_type = NULL;
- else {
- /* compatibility kludge: handle network/dialup specially */
- if (scmp(_TTYS_DIALUP))
- tty.ty_status |= TTY_DIALUP;
- else if (scmp(_TTYS_NETWORK))
- tty.ty_status |= TTY_NETWORK;
- p = skip(p);
- }
- }
- tty.ty_status = 0;
- tty.ty_window = NULL;
- tty.ty_group = _TTYS_NOGROUP;
-
- for (; *p; p = skip(p)) {
- if (scmp(_TTYS_OFF))
- tty.ty_status &= ~TTY_ON;
- else if (scmp(_TTYS_ON))
- tty.ty_status |= TTY_ON;
- else if (scmp(_TTYS_SECURE))
- tty.ty_status |= TTY_SECURE;
- else if (scmp(_TTYS_INSECURE))
- tty.ty_status &= ~TTY_SECURE;
- else if (scmp(_TTYS_DIALUP))
- tty.ty_status |= TTY_DIALUP;
- else if (scmp(_TTYS_NETWORK))
- tty.ty_status |= TTY_NETWORK;
- else if (vcmp(_TTYS_WINDOW))
- tty.ty_window = value(p);
- else if (vcmp(_TTYS_GROUP))
- tty.ty_group = value(p);
- else
- break;
- }
-
- if (zapchar == '#' || *p == '#')
- while ((c = *++p) == ' ' || c == '\t')
- ;
- tty.ty_comment = p;
- if (*p == 0)
- tty.ty_comment = 0;
- if ( (p = index(p, '\n')) )
- *p = '\0';
- return (&tty);
-}
-
-#define QUOTED 1
-
-/*
- * Skip over the current field, removing quotes, and return a pointer to
- * the next field.
- */
-static char *
-skip(p)
- register char *p;
-{
- register char *t;
- register int c, q;
-
- for (q = 0, t = p; (c = *p) != '\0'; p++) {
- if (c == '"') {
- q ^= QUOTED; /* obscure, but nice */
- continue;
- }
- if (q == QUOTED && *p == '\\' && *(p+1) == '"')
- p++;
- *t++ = *p;
- if (q == QUOTED)
- continue;
- if (c == '#') {
- zapchar = c;
- *p = 0;
- break;
- }
- if (c == '\t' || c == ' ' || c == '\n') {
- zapchar = c;
- *p++ = 0;
- while ((c = *p) == '\t' || c == ' ' || c == '\n')
- p++;
- break;
- }
- }
- *--t = '\0';
- return (p);
-}
-
-static char *
-value(p)
- register char *p;
-{
-
- return ((p = index(p, '=')) ? ++p : NULL);
-}
-
-int
-setttyent()
-{
-
- if (line == NULL) {
- if ((line = malloc(MALLOCCHUNK)) == NULL)
- return (0);
- lbsize = MALLOCCHUNK;
- }
- if (tf) {
- rewind(tf);
- return (1);
- } else if ( (tf = fopen(_PATH_TTYS, "r")) )
- return (1);
- return (0);
-}
-
-int
-endttyent()
-{
- int rval;
-
- /*
- * NB: Don't free `line' because getttynam()
- * may still be referencing it
- */
- if (tf) {
- rval = (fclose(tf) != EOF);
- tf = NULL;
- return (rval);
- }
- return (1);
-}
-
-static int
-isttystat(tty, flag)
- const char *tty;
- int flag;
-{
- register struct ttyent *t;
-
- return ((t = getttynam(tty)) == NULL) ? 0 : !!(t->ty_status & flag);
-}
-
-
-int
-isdialuptty(tty)
- const char *tty;
-{
-
- return isttystat(tty, TTY_DIALUP);
-}
-
-int isnettty(tty)
- const char *tty;
-{
-
- return isttystat(tty, TTY_NETWORK);
-}
diff --git a/lib/libc/gen/getusershell.3 b/lib/libc/gen/getusershell.3
deleted file mode 100644
index 223caef..0000000
--- a/lib/libc/gen/getusershell.3
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getusershell.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETUSERSHELL 3
-.Os BSD 4.3
-.Sh NAME
-.Nm getusershell ,
-.Nm setusershell ,
-.Nm endusershell
-.Nd get legal user shells
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft char *
-.Fn getusershell void
-.Ft void
-.Fn setusershell void
-.Ft void
-.Fn endusershell void
-.Sh DESCRIPTION
-The
-.Fn getusershell
-function
-returns a pointer to a legal user shell as defined by the
-system manager in the file
-.Pa /etc/shells .
-If
-.Pa /etc/shells
-is unreadable or does not exist,
-.Fn getusershell
-behaves as if
-.Pa /bin/sh
-and
-.Pa /bin/csh
-were listed in the file.
-.Pp
-The
-.Fn getusershell
-function
-reads the next
-line (opening the file if necessary);
-.Fn setusershell
-rewinds the file;
-.Fn endusershell
-closes it.
-.Sh FILES
-.Bl -tag -width /etc/shells -compact
-.It Pa /etc/shells
-.El
-.Sh DIAGNOSTICS
-The routine
-.Fn getusershell
-returns a null pointer (0) on
-.Dv EOF .
-.Sh SEE ALSO
-.Xr shells 5
-.Sh HISTORY
-The
-.Fn getusershell
-function appeared in
-.Bx 4.3 .
-.Sh BUGS
-The
-.Fn getusershell
-function leaves its result in an internal static object and returns
-a pointer to that object. Subsequent calls to
-.Fn getusershell
-will modify the same object.
diff --git a/lib/libc/gen/getusershell.c b/lib/libc/gen/getusershell.c
deleted file mode 100644
index 408f9f3..0000000
--- a/lib/libc/gen/getusershell.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getusershell.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <paths.h>
-
-/*
- * Local shells should NOT be added here. They should be added in
- * /etc/shells.
- */
-
-static char *okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL };
-static char **curshell, **shells, *strings;
-static char **initshells __P((void));
-
-/*
- * Get a list of shells from _PATH_SHELLS, if it exists.
- */
-char *
-getusershell()
-{
- char *ret;
-
- if (curshell == NULL)
- curshell = initshells();
- ret = *curshell;
- if (ret != NULL)
- curshell++;
- return (ret);
-}
-
-void
-endusershell()
-{
-
- if (shells != NULL)
- free(shells);
- shells = NULL;
- if (strings != NULL)
- free(strings);
- strings = NULL;
- curshell = NULL;
-}
-
-void
-setusershell()
-{
-
- curshell = initshells();
-}
-
-static char **
-initshells()
-{
- register char **sp, *cp;
- register FILE *fp;
- struct stat statb;
-
- if (shells != NULL)
- free(shells);
- shells = NULL;
- if (strings != NULL)
- free(strings);
- strings = NULL;
- if ((fp = fopen(_PATH_SHELLS, "r")) == NULL)
- return (okshells);
- if (fstat(fileno(fp), &statb) == -1) {
- (void)fclose(fp);
- return (okshells);
- }
- if ((strings = malloc((u_int)statb.st_size)) == NULL) {
- (void)fclose(fp);
- return (okshells);
- }
- shells = calloc((unsigned)statb.st_size / 3, sizeof (char *));
- if (shells == NULL) {
- (void)fclose(fp);
- free(strings);
- strings = NULL;
- return (okshells);
- }
- sp = shells;
- cp = strings;
- while (fgets(cp, MAXPATHLEN + 1, fp) != NULL) {
- while (*cp != '#' && *cp != '/' && *cp != '\0')
- cp++;
- if (*cp == '#' || *cp == '\0')
- continue;
- *sp++ = cp;
- while (!isspace(*cp) && *cp != '#' && *cp != '\0')
- cp++;
- *cp++ = '\0';
- }
- *sp = NULL;
- (void)fclose(fp);
- return (shells);
-}
diff --git a/lib/libc/gen/getvfsbyname.3 b/lib/libc/gen/getvfsbyname.3
deleted file mode 100644
index db6152f..0000000
--- a/lib/libc/gen/getvfsbyname.3
+++ /dev/null
@@ -1,97 +0,0 @@
-.\" Copyright (c) 1995
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kvm_getvfsbyname.3 8.3 (Berkeley) 5/4/95
-.\"
-.Dd May 4, 1995
-.Dt GETVFSBYNAME 3
-.Os
-.Sh NAME
-.Nm getvfsbyname
-.Nd get information about a filesystem
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/mount.h>
-.Ft int
-.Fn getvfsbyname "const char *name" "struct vfsconf *vfc"
-.Sh DESCRIPTION
-The
-.Fn getvfsbyname
-function provides access to information about a
-filesystem module that is configured in the kernel.
-If successful,
-the requested filesystem
-.Fa vfsconf
-is returned in the location pointed to by
-.Fa vfc .
-The fields in a
-.Dq Li struct vfsconf
-are defined as follows:
-.Pp
-.Bl -tag -compact -width vfc_refcount
-.It vfc_name
-the name of the filesystem
-.It vfc_typenum
-the filesystem type number assigned by the kernel
-.It vfc_refcount
-the number of active mount points using the filesystem
-.It vfc_flags
-flag bits that are used to initialize a new mount point
-using the filesystem
-.El
-.Sh RETURN VALUES
-If the call to
-.Nm getvfsbyname
-is successful, 0 is returned.
-Otherwise \-1 is returned and
-.Va errno
-is set appropriately.
-.Sh ERRORS
-The following errors may be reported:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-The
-.Fa vfc
-pointer contains an invalid address.
-.It Bq Er ENOENT
-The
-.Fa name
-specifies a filesystem that is unknown or not configured in the kernel.
-.Sh SEE ALSO
-.Xr sysctl 1 ,
-.Xr mount 2 ,
-.Xr sysctl 3 ,
-.Xr mount 8
-.Sh HISTORY
-A variant of the
-.Fn getvfsbyname
-function first appeared in
-.Fx 2.0 .
diff --git a/lib/libc/gen/getvfsbyname.c b/lib/libc/gen/getvfsbyname.c
deleted file mode 100644
index ae63bfe..0000000
--- a/lib/libc/gen/getvfsbyname.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)kvm_getvfsbyname.c 8.1 (Berkeley) 4/3/95";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* not lint */
-
-#define _NEW_VFSCONF
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <sys/sysctl.h>
-#include <errno.h>
-#include <kvm.h>
-
-/*
- * Given a filesystem name, determine if it is resident in the kernel,
- * and if it is resident, return its vfsconf structure.
- */
-getvfsbyname(fsname, vfcp)
- const char *fsname;
- struct vfsconf *vfcp;
-{
- int name[4], maxtypenum, cnt;
- size_t buflen;
-
- name[0] = CTL_VFS;
- name[1] = VFS_GENERIC;
- name[2] = VFS_MAXTYPENUM;
- buflen = 4;
- if (sysctl(name, 3, &maxtypenum, &buflen, (void *)0, (size_t)0) < 0)
- return (-1);
- name[2] = VFS_CONF;
- buflen = sizeof *vfcp;
- for (cnt = 0; cnt < maxtypenum; cnt++) {
- name[3] = cnt;
- if (sysctl(name, 4, vfcp, &buflen, (void *)0, (size_t)0) < 0) {
- if (errno != EOPNOTSUPP)
- return (-1);
- continue;
- }
- if (!strcmp(fsname, vfcp->vfc_name))
- return (0);
- }
- errno = ENOENT;
- return (-1);
-}
diff --git a/lib/libc/gen/getvfsent.3 b/lib/libc/gen/getvfsent.3
deleted file mode 100644
index 756fec4..0000000
--- a/lib/libc/gen/getvfsent.3
+++ /dev/null
@@ -1,228 +0,0 @@
-.\" $Id: getvfsent.3,v 1.8 1997/02/28 06:22:28 mpp Exp $
-.\" Written by Garrett A. Wollman, September 1994.
-.\" This manual page is in the public domain.
-.\"
-.Dd September 24, 1994
-.Dt GETVFSBYNAME 3
-.Os
-.Sh NAME
-.Nm getvfsbyname ,
-.Nm getvfsbytype ,
-.Nm getvfsent ,
-.Nm setvfsent ,
-.Nm endvfsent ,
-.Nm vfsisloadable ,
-.Nm vfsload
-.Nd manage virtual filesystem modules
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/mount.h>
-.Ft struct vfsconf *
-.Fn getvfsbyname "const char *name"
-.Ft struct vfsconf *
-.Fn getvfsbytype "int type"
-.Ft struct vfsconf *
-.Fn getvfsent "void"
-.Ft void
-.Fn setvfsent "int cachelist"
-.Ft void
-.Fn endvfsent "void"
-.Ft int
-.Fn vfsisloadable "const char *name"
-.Ft int
-.Fn vfsload "const char *name"
-.Sh DESCRIPTION
-The
-.Fn getvfsbyname ,
-.Fn getvfsbytype ,
-and
-.Fn getvfsent
-functions provide convenient access to a list of installed virtual
-filesystem modules managed by the kernel.
-.Fn getvfsbyname
-and
-.Fn getvfsbytype
-provide direct access to a single filesystem's information;
-.Fn getvfsent
-steps through the list of filesystems one at a time. All three
-functions return a null pointer when no data is available. The fields
-in a
-.Dq Li struct vfsconf
-are as follows:
-.Pp
-.Bl -tag -compact -width vfc_refcount
-.It vfc_name
-the name of the filesystem
-.It vfc_index
-the filesystem type number assigned by the kernel and used in calls to
-.Xr mount 2
-.It vfc_refcount
-the number of references to this filesystem
-(usually the number of mounts, but one greater for filesystems which
-cannot be unloaded or which are statically linked into the kernel)
-.It vfc_flags
-flag bits, of which none are currently defined
-.El
-.Pp
-The
-.Fn setvfsent
-and
-.Fn endvfsent
-functions are used to control caching of the filesystem list, which is
-obtained in toto from the kernel via
-.Xr sysctl 3 .
-If the
-.Fa cachelist
-parameter to
-.Fn setvfsent
-is non-zero, the list will be retrieved only once, upon the first call
-to one of the retrieval functions, until
-.Fn endvfsent
-is called to clear the cache. In general,
-.Fn setvfsent 1
-should be called by programs using the
-.Fn getvfsent
-function, and
-.Fn setvfsent 0
-(which is also the default state)
-should be called by programs using the
-.Fn vfsload
-function.
-.Pp
-The
-.Fn vfsisloadable
-function returns a non-zero value if a later call to
-.Fn vfsload name
-is likely to succeed. We say ``likely'' because the conditions
-checked by
-.Fn vfsisloadable
-are only a small subset of the conditions necessary for
-.Fn vfsload
-to succeed. In particular,
-.Fn vfsisloadable
-checks that
-.Pa /dev/lkm
-is present and can be opened for writing, and that
-.Pa Ns Fa name Ns _mod.o
-can be found in one of the directories designated for LKMs.
-.Pp
-The
-.Fn vfsload
-function attempts to load a kernel module implementing filesystem
-.Fa name .
-It returns zero if the filesystem module was successfully located and
-loaded, or non-zero otherwise. It should only be called in the
-following circumstances:
-.Bl -enum
-.It
-.Fn getvfsbyname name
-has been called and returned a null pointer.
-.It
-.Fn vfsisloadable name
-has been called and returned a non-zero value.
-.It
-sufficient temporary file space is available
-.Em and writable
-in one of
-.No Ns \&${ Ns Ev TMPDIR Ns \&} ,
-.Pa /var/tmp ,
-or
-.Pa /tmp .
-.El
-.Pp
-Here is an example, taken from the source to
-.Xr mount_cd9660 8 :
-.Bd -literal -offset indent
-
-struct vfsconf *vfc;
-
-/* setup code here */
-
-vfc = getvfsbyname("cd9660");
-if(!vfc && vfsisloadable("cd9660")) {
- if(vfsload("cd9660"))
- err(1, "vfsload(cd9660)");
- endvfsent(); /* flush cache */
- vfc = getvfsbyname("cd9660");
-}
-
-mount(vfc ? vfc->vfc_index : MOUNT_CD9660, /* more arguments */
-
-.Ed
-The odd conditional in the call to
-.Xr mount 2
-is present for compatibility with old, non-LKM cognizant kernels, and
-will be removed (along with all vestiges of
-.Dv MOUNT_* )
-in a future release.
-.Sh RETURN VALUES
-The
-.Fn getvfsbyname ,
-.Fn getvfsbytype ,
-and
-.Fn getvfsent
-routines all return a pointer to the same static data structure when
-they succeed, and return a null pointer when they fail. On failure,
-.Va errno
-may be set to one of the values documented for
-.Xr sysctl 3
-or
-.Xr malloc 3 ,
-if a failure of that function was the cause; otherwise
-.Va errno
-will be unmodified.
-.Pp
-The
-.Fn vfsload
-function returns a non-zero value on failure, or zero on success. If
-.Fn vfsload
-fails,
-.Va errno
-may be set to one of the values documented for
-.Xr fork 2 ,
-.Xr waitpid 2 ,
-.Xr chdir 2 ,
-or
-.Xr execlp 3 ,
-or the return status of the
-.Xr modload 8
-program, which is not currently particularly useful but eventually
-will be. In addition, if
-.Xr modload 8
-exits on a signal,
-.Fn vfsload
-will fail and set
-.Va errno
-to
-.Er EINVAL .
-.Sh ENVIRONMENT
-.Bl -tag -compact -width TMPDIRx
-.It Ev TMPDIR
-location for temporary file created by
-.Xr modload 8
-on behalf of
-.Fn vfsload .
-.It Ev LKMDIR
-alternate directory for
-.Fn vfsisloadable
-and
-.Fn vfsload
-to search for loadable modules.
-.Sh SEE ALSO
-.Xr mount 2 ,
-.Xr modload 8 ,
-.Xr mount 8
-.Sh BUGS
-The return value of the
-.Xr modload 8
-command isn't particularly useful when interpreted as an
-.Va errno
-value (or anything else, for that matter).
-.Sh AUTHOR
-The loadable filesystem support was written by Garrett A. Wollman,
-based on generic loadable kernel module support by Terry Lambert.
-.Sh HISTORY
-The
-.Fn getvfsbyname
-family of functions first appeared in
-.Fx 2.0 .
diff --git a/lib/libc/gen/getvfsent.c b/lib/libc/gen/getvfsent.c
deleted file mode 100644
index c4ce2cc..0000000
--- a/lib/libc/gen/getvfsent.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * getvfsent.c - get a listing of installed filesystems
- * Written September 1994 by Garrett A. Wollman
- * This file is in the public domain.
- */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/mount.h>
-#include <sys/sysctl.h>
-#include <unistd.h>
-#include <sys/file.h>
-#include <sys/wait.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <paths.h>
-
-#define _PATH_MODLOAD "/sbin/modload" /* XXX should be in header file */
-
-static struct vfsconf *_vfslist = 0;
-static struct vfsconf _vfsconf;
-static size_t _vfslistlen = 0;
-static int _vfs_keeplist = 0;
-static int _vfs_index = 0;
-
-static int
-initvfs(void)
-{
- int mib[2] = { CTL_VFS, VFS_VFSCONF };
- size_t size = 0;
- int rv;
-
- rv = sysctl(mib, 2, (void *)0, &size, (void *)0, (size_t)0);
- if(rv < 0)
- return 0;
-
- if(_vfslist)
- free(_vfslist);
- _vfslist = malloc(size);
- if(!_vfslist)
- return 0;
-
- rv = sysctl(mib, 2, _vfslist, &size, (void *)0, (size_t)0);
- if(rv < 0) {
- free(_vfslist);
- _vfslist = 0;
- return 0;
- }
-
- _vfslistlen = size / sizeof _vfslist[0];
- return 1;
-}
-
-struct vfsconf *
-getvfsent(void)
-{
- if(!_vfslist && !initvfs()) {
- return 0;
- }
-
- do {
- if(_vfs_index >= _vfslistlen) {
- return 0;
- }
-
- _vfsconf = _vfslist[_vfs_index++];
- } while(!_vfsconf.vfc_vfsops);
-
- if(!_vfs_keeplist) {
- free(_vfslist);
- _vfslist = 0;
- }
- return &_vfsconf;
-}
-
-struct vfsconf *
-getvfsbyname(const char *name)
-{
- int i;
-
- if(!_vfslist && !initvfs()) {
- return 0;
- }
-
- for(i = 0; i < _vfslistlen; i++) {
- if( ! strcmp(_vfslist[i].vfc_name, name) )
- break;
- }
-
- if(i < _vfslistlen) {
- _vfsconf = _vfslist[i];
- }
-
- if(!_vfs_keeplist) {
- free(_vfslist);
- _vfslist = 0;
- }
-
- if(i < _vfslistlen) {
- return &_vfsconf;
- } else {
- return 0;
- }
-}
-
-struct vfsconf *
-getvfsbytype(int type)
-{
- int i;
-
- if(!_vfslist && !initvfs()) {
- return 0;
- }
-
- for(i = 0; i < _vfslistlen; i++) {
- if(_vfslist[i].vfc_index == type)
- break;
- }
-
- if(i < _vfslistlen) {
- _vfsconf = _vfslist[i];
- }
-
- if(!_vfs_keeplist) {
- free(_vfslist);
- _vfslist = 0;
- }
-
- if(i < _vfslistlen) {
- return &_vfsconf;
- } else {
- return 0;
- }
-}
-
-void
-setvfsent(int keep)
-{
- if(_vfslist && !keep) {
- free(_vfslist);
- _vfslist = 0;
- }
-
- _vfs_keeplist = keep;
- _vfs_index = 0;
-}
-
-void
-endvfsent(void)
-{
- if(_vfslist) {
- free(_vfslist);
- _vfslist = 0;
- }
-
- _vfs_index = 0;
-}
-
-static const char *vfs_lkmdirs[] = {
- "/lkm",
- "/usr/lkm",
- 0,
- 0
-};
-#define NLKMDIRS ((sizeof vfs_lkmdirs) / (sizeof vfs_lkmdirs[0]))
-
-static const char *
-vfspath(const char *name)
-{
- static char pnbuf[MAXPATHLEN];
- char *userdir = getenv("LKMDIR");
- int i;
-
- if(userdir && getuid() == geteuid() && getuid() == 0) {
- vfs_lkmdirs[NLKMDIRS - 2] = userdir;
- }
-
- for(i = 0; vfs_lkmdirs[i]; i++) {
- snprintf(pnbuf, sizeof pnbuf, "%s/%s_mod.o", vfs_lkmdirs[i], name);
- if( ! access(pnbuf, R_OK) )
- return pnbuf;
- }
-
- return 0;
-}
-
-int
-vfsisloadable(const char *name)
-{
- int fd;
-
- fd = open("/dev/lkm", O_RDWR, 0);
- if(fd < 0) {
- return 0;
- }
- close(fd);
-
- return !!vfspath(name);
-}
-
-int
-vfsload(const char *name)
-{
- const char *path = vfspath(name);
- char name_mod[sizeof("_mod") + strlen(name)];
- pid_t pid;
- int status;
-
- if(!path) {
- errno = ENOENT;
- return -1;
- }
-
- pid = fork();
- if(pid < 0)
- return -1;
-
- if(pid > 0) {
- waitpid(pid, &status, 0);
- if(WIFEXITED(status)) {
- errno = WEXITSTATUS(status);
- return errno ? -1 : 0;
- }
- errno = EINVAL; /* not enough errno values, >sigh< */
- return -1;
- }
-
- status = -1;
- unsetenv("TMPDIR");
- if(status) {
- status = chdir(_PATH_VARTMP);
- }
- if(status) {
- status = chdir(_PATH_TMP);
- }
- if(status) {
- exit(errno);
- }
-
- snprintf(name_mod, sizeof name_mod, "%s%s", name, "_mod");
- status = execl(_PATH_MODLOAD, "modload", "-e", name_mod, "-o",
- name_mod, "-u", "-q", path, (const char *)0);
-
- exit(status ? errno : 0);
-}
-
diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3
deleted file mode 100644
index 50fd91a..0000000
--- a/lib/libc/gen/glob.3
+++ /dev/null
@@ -1,446 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Guido van Rossum.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)glob.3 8.3 (Berkeley) 4/16/94
-.\"
-.Dd April 16, 1994
-.Dt GLOB 3
-.Os
-.Sh NAME
-.Nm glob ,
-.Nm globfree
-.Nd generate pathnames matching a pattern
-.Sh SYNOPSIS
-.Fd #include <glob.h>
-.Ft int
-.Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob"
-.Ft void
-.Fn globfree "glob_t *pglob"
-.Sh DESCRIPTION
-The
-.Fn glob
-function
-is a pathname generator that implements the rules for file name pattern
-matching used by the shell.
-.Pp
-The include file
-.Pa glob.h
-defines the structure type
-.Fa glob_t ,
-which contains at least the following fields:
-.Bd -literal
-typedef struct {
- int gl_pathc; /* count of total paths so far */
- int gl_matchc; /* count of paths matching pattern */
- int gl_offs; /* reserved at beginning of gl_pathv */
- int gl_flags; /* returned flags */
- char **gl_pathv; /* list of paths matching pattern */
-} glob_t;
-.Ed
-.Pp
-The argument
-.Fa pattern
-is a pointer to a pathname pattern to be expanded.
-The
-.Fn glob
-argument
-matches all accessible pathnames against the pattern and creates
-a list of the pathnames that match.
-In order to have access to a pathname,
-.Fn glob
-requires search permission on every component of a path except the last
-and read permission on each directory of any filename component of
-.Fa pattern
-that contains any of the special characters
-.Ql * ,
-.Ql ?
-or
-.Ql [ .
-.Pp
-The
-.Fn glob
-argument
-stores the number of matched pathnames into the
-.Fa gl_pathc
-field, and a pointer to a list of pointers to pathnames into the
-.Fa gl_pathv
-field.
-The first pointer after the last pathname is
-.Dv NULL .
-If the pattern does not match any pathnames, the returned number of
-matched paths is set to zero.
-.Pp
-It is the caller's responsibility to create the structure pointed to by
-.Fa pglob .
-The
-.Fn glob
-function allocates other space as needed, including the memory pointed
-to by
-.Fa gl_pathv .
-.Pp
-The argument
-.Fa flags
-is used to modify the behavior of
-.Fn glob .
-The value of
-.Fa flags
-is the bitwise inclusive
-.Tn OR
-of any of the following
-values defined in
-.Pa glob.h :
-.Bl -tag -width GLOB_ALTDIRFUNC
-.It Dv GLOB_APPEND
-Append pathnames generated to the ones from a previous call (or calls)
-to
-.Fn glob .
-The value of
-.Fa gl_pathc
-will be the total matches found by this call and the previous call(s).
-The pathnames are appended to, not merged with the pathnames returned by
-the previous call(s).
-Between calls, the caller must not change the setting of the
-.Dv GLOB_DOOFFS
-flag, nor change the value of
-.Fa gl_offs
-when
-.Dv GLOB_DOOFFS
-is set, nor (obviously) call
-.Fn globfree
-for
-.Fa pglob .
-.It Dv GLOB_DOOFFS
-Make use of the
-.Fa gl_offs
-field.
-If this flag is set,
-.Fa gl_offs
-is used to specify how many
-.Dv NULL
-pointers to prepend to the beginning
-of the
-.Fa gl_pathv
-field.
-In other words,
-.Fa gl_pathv
-will point to
-.Fa gl_offs
-.Dv NULL
-pointers,
-followed by
-.Fa gl_pathc
-pathname pointers, followed by a
-.Dv NULL
-pointer.
-.It Dv GLOB_ERR
-Causes
-.Fn glob
-to return when it encounters a directory that it cannot open or read.
-Ordinarily,
-.Fn glob
-continues to find matches.
-.It Dv GLOB_MARK
-Each pathname that is a directory that matches
-.Fa pattern
-has a slash
-appended.
-.It Dv GLOB_NOCHECK
-If
-.Fa pattern
-does not match any pathname, then
-.Fn glob
-returns a list
-consisting of only
-.Fa pattern ,
-with the number of total pathnames is set to 1, and the number of matched
-pathnames set to 0.
-If
-.Dv GLOB_QUOTE
-is set, its effect is present in the pattern returned.
-.It Dv GLOB_NOSORT
-By default, the pathnames are sorted in ascending
-.Tn ASCII
-order;
-this flag prevents that sorting (speeding up
-.Fn glob ) .
-.El
-.Pp
-The following values may also be included in
-.Fa flags ,
-however, they are non-standard extensions to
-.St -p1003.2 .
-.Bl -tag -width GLOB_ALTDIRFUNC
-.It Dv GLOB_ALTDIRFUNC
-The following additional fields in the pglob structure have been
-initialized with alternate functions for glob to use to open, read,
-and close directories and to get stat information on names found
-in those directories.
-.Bd -literal
-void *(*gl_opendir)(const char * name);
-struct dirent *(*gl_readdir)(void *);
-void (*gl_closedir)(void *);
-int (*gl_lstat)(const char *name, struct stat *st);
-int (*gl_stat)(const char *name, struct stat *st);
-.Ed
-.Pp
-This extension is provided to allow programs such as
-.Xr restore 8
-to provide globbing from directories stored on tape.
-.It Dv GLOB_BRACE
-Pre-process the pattern string to expand
-.Ql {pat,pat,...}
-strings like
-.Xr csh 1 .
-The pattern
-.Ql {}
-is left unexpanded for historical reasons (and
-.Xr csh 1
-does the same thing to
-ease typing
-of
-.Xr find 1
-patterns).
-.It Dv GLOB_MAGCHAR
-Set by the
-.Fn glob
-function if the pattern included globbing characters.
-See the description of the usage of the
-.Fa gl_matchc
-structure member for more details.
-.It Dv GLOB_NOMAGIC
-Is the same as
-.Dv GLOB_NOCHECK
-but it only appends the
-.Fa pattern
-if it does not contain any of the special characters ``*'', ``?'' or ``[''.
-.Dv GLOB_NOMAGIC
-is provided to simplify implementing the historic
-.Xr csh 1
-globbing behavior and should probably not be used anywhere else.
-.It Dv GLOB_QUOTE
-Use the backslash
-.Pq Ql \e
-character for quoting: every occurrence of
-a backslash followed by a character in the pattern is replaced by that
-character, avoiding any special interpretation of the character.
-.It Dv GLOB_TILDE
-Expand patterns that start with
-.Ql ~
-to user name home directories.
-.El
-.Pp
-If, during the search, a directory is encountered that cannot be opened
-or read and
-.Fa errfunc
-is
-.Pf non- Dv NULL ,
-.Fn glob
-calls
-.Fa (*errfunc)(path, errno) .
-This may be unintuitive: a pattern like
-.Ql */Makefile
-will try to
-.Xr stat 2
-.Ql foo/Makefile
-even if
-.Ql foo
-is not a directory, resulting in a
-call to
-.Fa errfunc .
-The error routine can suppress this action by testing for
-.Dv ENOENT
-and
-.Dv ENOTDIR ;
-however, the
-.Dv GLOB_ERR
-flag will still cause an immediate
-return when this happens.
-.Pp
-If
-.Fa errfunc
-returns non-zero,
-.Fn glob
-stops the scan and returns
-.Dv GLOB_ABEND
-after setting
-.Fa gl_pathc
-and
-.Fa gl_pathv
-to reflect any paths already matched.
-This also happens if an error is encountered and
-.Dv GLOB_ERR
-is set in
-.Fa flags ,
-regardless of the return value of
-.Fa errfunc ,
-if called.
-If
-.Dv GLOB_ERR
-is not set and either
-.Fa errfunc
-is
-.Dv NULL
-or
-.Fa errfunc
-returns zero, the error is ignored.
-.Pp
-The
-.Fn globfree
-function frees any space associated with
-.Fa pglob
-from a previous call(s) to
-.Fn glob .
-.Sh RETURN VALUES
-On successful completion,
-.Fn glob
-returns zero.
-In addition the fields of
-.Fa pglob
-contain the values described below:
-.Bl -tag -width GLOB_NOCHECK
-.It Fa gl_pathc
-contains the total number of matched pathnames so far.
-This includes other matches from previous invocations of
-.Fn glob
-if
-.Dv GLOB_APPEND
-was specified.
-.It Fa gl_matchc
-contains the number of matched pathnames in the current invocation of
-.Fn glob .
-.It Fa gl_flags
-contains a copy of the
-.Fa flags
-parameter with the bit
-.Dv GLOB_MAGCHAR
-set if
-.Fa pattern
-contained any of the special characters ``*'', ``?'' or ``['', cleared
-if not.
-.It Fa gl_pathv
-contains a pointer to a
-.Dv NULL Ns -terminated
-list of matched pathnames.
-However, if
-.Fa gl_pathc
-is zero, the contents of
-.Fa gl_pathv
-are undefined.
-.El
-.Pp
-If
-.Fn glob
-terminates due to an error, it sets errno and returns one of the
-following non-zero constants, which are defined in the include
-file
-.Aq Pa glob.h :
-.Bl -tag -width GLOB_NOCHECK
-.It Dv GLOB_NOSPACE
-An attempt to allocate memory failed.
-.It Dv GLOB_ABEND
-The scan was stopped because an error was encountered and either
-.Dv GLOB_ERR
-was set or
-.Fa (*errfunc)()
-returned non-zero.
-.El
-.Pp
-The arguments
-.Fa pglob\->gl_pathc
-and
-.Fa pglob\->gl_pathv
-are still set as specified above.
-.Sh EXAMPLE
-A rough equivalent of
-.Ql "ls -l *.c *.h"
-can be obtained with the
-following code:
-.Bd -literal -offset indent
-glob_t g;
-
-g.gl_offs = 2;
-glob("*.c", GLOB_DOOFFS, NULL, &g);
-glob("*.h", GLOB_DOOFFS | GLOB_APPEND, NULL, &g);
-g.gl_pathv[0] = "ls";
-g.gl_pathv[1] = "-l";
-execvp("ls", g.gl_pathv);
-.Ed
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr fnmatch 3 ,
-.Xr regexp 3
-.Sh STANDARDS
-The
-.Fn glob
-function is expected to be
-.St -p1003.2
-compatible with the exception
-that the flags
-.Dv GLOB_ALTDIRFUNC,
-.Dv GLOB_BRACE
-.Dv GLOB_MAGCHAR,
-.Dv GLOB_NOMAGIC,
-.Dv GLOB_QUOTE,
-and
-.Dv GLOB_TILDE,
-and the fields
-.Fa gl_matchc
-and
-.Fa gl_flags
-should not be used by applications striving for strict
-.Tn POSIX
-conformance.
-.Sh HISTORY
-The
-.Fn glob
-and
-.Fn globfree
-functions first appeared in
-.Bx 4.4 .
-.Sh BUGS
-Patterns longer than
-.Dv MAXPATHLEN
-may cause unchecked errors.
-.Pp
-The
-.Fn glob
-argument
-may fail and set errno for any of the errors specified for the
-library routines
-.Xr stat 2 ,
-.Xr closedir 3 ,
-.Xr opendir 3 ,
-.Xr readdir 3 ,
-.Xr malloc 3 ,
-and
-.Xr free 3 .
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c
deleted file mode 100644
index df3cbc2..0000000
--- a/lib/libc/gen/glob.c
+++ /dev/null
@@ -1,860 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Guido van Rossum.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * glob(3) -- a superset of the one defined in POSIX 1003.2.
- *
- * The [!...] convention to negate a range is supported (SysV, Posix, ksh).
- *
- * Optional extra services, controlled by flags not defined by POSIX:
- *
- * GLOB_QUOTE:
- * Escaping convention: \ inhibits any special meaning the following
- * character might have (except \ at end of string is retained).
- * GLOB_MAGCHAR:
- * Set in gl_flags if pattern contained a globbing character.
- * GLOB_NOMAGIC:
- * Same as GLOB_NOCHECK, but it will only append pattern if it did
- * not contain any magic characters. [Used in csh style globbing]
- * GLOB_ALTDIRFUNC:
- * Use alternately specified directory access functions.
- * GLOB_TILDE:
- * expand ~user/foo to the /home/dir/of/user/foo
- * GLOB_BRACE:
- * expand {1,2}{a,b} to 1a 1b 2a 2b
- * gl_matchc:
- * Number of matches in the current invocation of glob.
- */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <ctype.h>
-#include <dirent.h>
-#include <errno.h>
-#include <glob.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "collate.h"
-
-#define DOLLAR '$'
-#define DOT '.'
-#define EOS '\0'
-#define LBRACKET '['
-#define NOT '!'
-#define QUESTION '?'
-#define QUOTE '\\'
-#define RANGE '-'
-#define RBRACKET ']'
-#define SEP '/'
-#define STAR '*'
-#define TILDE '~'
-#define UNDERSCORE '_'
-#define LBRACE '{'
-#define RBRACE '}'
-#define SLASH '/'
-#define COMMA ','
-
-#ifndef DEBUG
-
-#define M_QUOTE 0x8000
-#define M_PROTECT 0x4000
-#define M_MASK 0xffff
-#define M_ASCII 0x00ff
-
-typedef u_short Char;
-
-#else
-
-#define M_QUOTE 0x80
-#define M_PROTECT 0x40
-#define M_MASK 0xff
-#define M_ASCII 0x7f
-
-typedef char Char;
-
-#endif
-
-
-#define CHAR(c) ((Char)((c)&M_ASCII))
-#define META(c) ((Char)((c)|M_QUOTE))
-#define M_ALL META('*')
-#define M_END META(']')
-#define M_NOT META('!')
-#define M_ONE META('?')
-#define M_RNG META('-')
-#define M_SET META('[')
-#define ismeta(c) (((c)&M_QUOTE) != 0)
-
-
-static int compare __P((const void *, const void *));
-static void g_Ctoc __P((const Char *, char *));
-static int g_lstat __P((Char *, struct stat *, glob_t *));
-static DIR *g_opendir __P((Char *, glob_t *));
-static Char *g_strchr __P((Char *, int));
-#ifdef notdef
-static Char *g_strcat __P((Char *, const Char *));
-#endif
-static int g_stat __P((Char *, struct stat *, glob_t *));
-static int glob0 __P((const Char *, glob_t *));
-static int glob1 __P((Char *, glob_t *));
-static int glob2 __P((Char *, Char *, Char *, glob_t *));
-static int glob3 __P((Char *, Char *, Char *, Char *, glob_t *));
-static int globextend __P((const Char *, glob_t *));
-static const Char * globtilde __P((const Char *, Char *, size_t, glob_t *));
-static int globexp1 __P((const Char *, glob_t *));
-static int globexp2 __P((const Char *, const Char *, glob_t *, int *));
-static int match __P((Char *, Char *, Char *));
-#ifdef DEBUG
-static void qprintf __P((const char *, Char *));
-#endif
-
-int
-glob(pattern, flags, errfunc, pglob)
- const char *pattern;
- int flags, (*errfunc) __P((const char *, int));
- glob_t *pglob;
-{
- const u_char *patnext;
- int c;
- Char *bufnext, *bufend, patbuf[MAXPATHLEN+1];
-
- patnext = (u_char *) pattern;
- if (!(flags & GLOB_APPEND)) {
- pglob->gl_pathc = 0;
- pglob->gl_pathv = NULL;
- if (!(flags & GLOB_DOOFFS))
- pglob->gl_offs = 0;
- }
- pglob->gl_flags = flags & ~GLOB_MAGCHAR;
- pglob->gl_errfunc = errfunc;
- pglob->gl_matchc = 0;
-
- bufnext = patbuf;
- bufend = bufnext + MAXPATHLEN;
- if (flags & GLOB_QUOTE) {
- /* Protect the quoted characters. */
- while (bufnext < bufend && (c = *patnext++) != EOS)
- if (c == QUOTE) {
- if ((c = *patnext++) == EOS) {
- c = QUOTE;
- --patnext;
- }
- *bufnext++ = c | M_PROTECT;
- }
- else
- *bufnext++ = c;
- }
- else
- while (bufnext < bufend && (c = *patnext++) != EOS)
- *bufnext++ = c;
- *bufnext = EOS;
-
- if (flags & GLOB_BRACE)
- return globexp1(patbuf, pglob);
- else
- return glob0(patbuf, pglob);
-}
-
-/*
- * Expand recursively a glob {} pattern. When there is no more expansion
- * invoke the standard globbing routine to glob the rest of the magic
- * characters
- */
-static int globexp1(pattern, pglob)
- const Char *pattern;
- glob_t *pglob;
-{
- const Char* ptr = pattern;
- int rv;
-
- /* Protect a single {}, for find(1), like csh */
- if (pattern[0] == LBRACE && pattern[1] == RBRACE && pattern[2] == EOS)
- return glob0(pattern, pglob);
-
- while ((ptr = (const Char *) g_strchr((Char *) ptr, LBRACE)) != NULL)
- if (!globexp2(ptr, pattern, pglob, &rv))
- return rv;
-
- return glob0(pattern, pglob);
-}
-
-
-/*
- * Recursive brace globbing helper. Tries to expand a single brace.
- * If it succeeds then it invokes globexp1 with the new pattern.
- * If it fails then it tries to glob the rest of the pattern and returns.
- */
-static int globexp2(ptr, pattern, pglob, rv)
- const Char *ptr, *pattern;
- glob_t *pglob;
- int *rv;
-{
- int i;
- Char *lm, *ls;
- const Char *pe, *pm, *pl;
- Char patbuf[MAXPATHLEN + 1];
-
- /* copy part up to the brace */
- for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++)
- continue;
- ls = lm;
-
- /* Find the balanced brace */
- for (i = 0, pe = ++ptr; *pe; pe++)
- if (*pe == LBRACKET) {
- /* Ignore everything between [] */
- for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++)
- continue;
- if (*pe == EOS) {
- /*
- * We could not find a matching RBRACKET.
- * Ignore and just look for RBRACE
- */
- pe = pm;
- }
- }
- else if (*pe == LBRACE)
- i++;
- else if (*pe == RBRACE) {
- if (i == 0)
- break;
- i--;
- }
-
- /* Non matching braces; just glob the pattern */
- if (i != 0 || *pe == EOS) {
- *rv = glob0(patbuf, pglob);
- return 0;
- }
-
- for (i = 0, pl = pm = ptr; pm <= pe; pm++)
- switch (*pm) {
- case LBRACKET:
- /* Ignore everything between [] */
- for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
- continue;
- if (*pm == EOS) {
- /*
- * We could not find a matching RBRACKET.
- * Ignore and just look for RBRACE
- */
- pm = pl;
- }
- break;
-
- case LBRACE:
- i++;
- break;
-
- case RBRACE:
- if (i) {
- i--;
- break;
- }
- /* FALLTHROUGH */
- case COMMA:
- if (i && *pm == COMMA)
- break;
- else {
- /* Append the current string */
- for (lm = ls; (pl < pm); *lm++ = *pl++)
- continue;
- /*
- * Append the rest of the pattern after the
- * closing brace
- */
- for (pl = pe + 1; (*lm++ = *pl++) != EOS;)
- continue;
-
- /* Expand the current pattern */
-#ifdef DEBUG
- qprintf("globexp2:", patbuf);
-#endif
- *rv = globexp1(patbuf, pglob);
-
- /* move after the comma, to the next string */
- pl = pm + 1;
- }
- break;
-
- default:
- break;
- }
- *rv = 0;
- return 0;
-}
-
-
-
-/*
- * expand tilde from the passwd file.
- */
-static const Char *
-globtilde(pattern, patbuf, patbuf_len, pglob)
- const Char *pattern;
- Char *patbuf;
- size_t patbuf_len;
- glob_t *pglob;
-{
- struct passwd *pwd;
- char *h;
- const Char *p;
- Char *b, *eb;
-
- if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE))
- return pattern;
-
- /*
- * Copy up to the end of the string or /
- */
- eb = &patbuf[patbuf_len - 1];
- for (p = pattern + 1, h = (char *) patbuf;
- h < (char *)eb && *p && *p != SLASH; *h++ = *p++)
- continue;
-
- *h = EOS;
-
- if (((char *) patbuf)[0] == EOS) {
- /*
- * handle a plain ~ or ~/ by expanding $HOME first (iff
- * we're not running setuid or setgid) and then trying
- * the password file
- */
- if (issetugid() != 0 || (h = getenv("HOME")) == NULL) {
- if (((h = getlogin()) != NULL &&
- (pwd = getpwnam(h)) != NULL) ||
- (pwd = getpwuid(getuid())) != NULL)
- h = pwd->pw_dir;
- else
- return pattern;
- }
- }
- else {
- /*
- * Expand a ~user
- */
- if ((pwd = getpwnam((char*) patbuf)) == NULL)
- return pattern;
- else
- h = pwd->pw_dir;
- }
-
- /* Copy the home directory */
- for (b = patbuf; b < eb && *h; *b++ = *h++)
- continue;
-
- /* Append the rest of the pattern */
- while (b < eb && (*b++ = *p++) != EOS)
- continue;
- *b = EOS;
-
- return patbuf;
-}
-
-
-/*
- * The main glob() routine: compiles the pattern (optionally processing
- * quotes), calls glob1() to do the real pattern matching, and finally
- * sorts the list (unless unsorted operation is requested). Returns 0
- * if things went well, nonzero if errors occurred. It is not an error
- * to find no matches.
- */
-static int
-glob0(pattern, pglob)
- const Char *pattern;
- glob_t *pglob;
-{
- const Char *qpatnext;
- int c, err, oldpathc;
- Char *bufnext, patbuf[MAXPATHLEN+1];
-
- qpatnext = globtilde(pattern, patbuf, sizeof(patbuf) / sizeof(Char),
- pglob);
- oldpathc = pglob->gl_pathc;
- bufnext = patbuf;
-
- /* We don't need to check for buffer overflow any more. */
- while ((c = *qpatnext++) != EOS) {
- switch (c) {
- case LBRACKET:
- c = *qpatnext;
- if (c == NOT)
- ++qpatnext;
- if (*qpatnext == EOS ||
- g_strchr((Char *) qpatnext+1, RBRACKET) == NULL) {
- *bufnext++ = LBRACKET;
- if (c == NOT)
- --qpatnext;
- break;
- }
- *bufnext++ = M_SET;
- if (c == NOT)
- *bufnext++ = M_NOT;
- c = *qpatnext++;
- do {
- *bufnext++ = CHAR(c);
- if (*qpatnext == RANGE &&
- (c = qpatnext[1]) != RBRACKET) {
- *bufnext++ = M_RNG;
- *bufnext++ = CHAR(c);
- qpatnext += 2;
- }
- } while ((c = *qpatnext++) != RBRACKET);
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_END;
- break;
- case QUESTION:
- pglob->gl_flags |= GLOB_MAGCHAR;
- *bufnext++ = M_ONE;
- break;
- case STAR:
- pglob->gl_flags |= GLOB_MAGCHAR;
- /* collapse adjacent stars to one,
- * to avoid exponential behavior
- */
- if (bufnext == patbuf || bufnext[-1] != M_ALL)
- *bufnext++ = M_ALL;
- break;
- default:
- *bufnext++ = CHAR(c);
- break;
- }
- }
- *bufnext = EOS;
-#ifdef DEBUG
- qprintf("glob0:", patbuf);
-#endif
-
- if ((err = glob1(patbuf, pglob)) != 0)
- return(err);
-
- /*
- * If there was no match we are going to append the pattern
- * if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified
- * and the pattern did not contain any magic characters
- * GLOB_NOMAGIC is there just for compatibility with csh.
- */
- if (pglob->gl_pathc == oldpathc &&
- ((pglob->gl_flags & GLOB_NOCHECK) ||
- ((pglob->gl_flags & GLOB_NOMAGIC) &&
- !(pglob->gl_flags & GLOB_MAGCHAR))))
- return(globextend(pattern, pglob));
- else if (!(pglob->gl_flags & GLOB_NOSORT))
- qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
- pglob->gl_pathc - oldpathc, sizeof(char *), compare);
- return(0);
-}
-
-static int
-compare(p, q)
- const void *p, *q;
-{
- return(strcmp(*(char **)p, *(char **)q));
-}
-
-static int
-glob1(pattern, pglob)
- Char *pattern;
- glob_t *pglob;
-{
- Char pathbuf[MAXPATHLEN+1];
-
- /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */
- if (*pattern == EOS)
- return(0);
- return(glob2(pathbuf, pathbuf, pattern, pglob));
-}
-
-/*
- * The functions glob2 and glob3 are mutually recursive; there is one level
- * of recursion for each segment in the pattern that contains one or more
- * meta characters.
- */
-static int
-glob2(pathbuf, pathend, pattern, pglob)
- Char *pathbuf, *pathend, *pattern;
- glob_t *pglob;
-{
- struct stat sb;
- Char *p, *q;
- int anymeta;
-
- /*
- * Loop over pattern segments until end of pattern or until
- * segment with meta character found.
- */
- for (anymeta = 0;;) {
- if (*pattern == EOS) { /* End of pattern? */
- *pathend = EOS;
- if (g_lstat(pathbuf, &sb, pglob))
- return(0);
-
- if (((pglob->gl_flags & GLOB_MARK) &&
- pathend[-1] != SEP) && (S_ISDIR(sb.st_mode)
- || (S_ISLNK(sb.st_mode) &&
- (g_stat(pathbuf, &sb, pglob) == 0) &&
- S_ISDIR(sb.st_mode)))) {
- *pathend++ = SEP;
- *pathend = EOS;
- }
- ++pglob->gl_matchc;
- return(globextend(pathbuf, pglob));
- }
-
- /* Find end of next segment, copy tentatively to pathend. */
- q = pathend;
- p = pattern;
- while (*p != EOS && *p != SEP) {
- if (ismeta(*p))
- anymeta = 1;
- *q++ = *p++;
- }
-
- if (!anymeta) { /* No expansion, do next segment. */
- pathend = q;
- pattern = p;
- while (*pattern == SEP)
- *pathend++ = *pattern++;
- } else /* Need expansion, recurse. */
- return(glob3(pathbuf, pathend, pattern, p, pglob));
- }
- /* NOTREACHED */
-}
-
-static int
-glob3(pathbuf, pathend, pattern, restpattern, pglob)
- Char *pathbuf, *pathend, *pattern, *restpattern;
- glob_t *pglob;
-{
- register struct dirent *dp;
- DIR *dirp;
- int err;
- char buf[MAXPATHLEN];
-
- /*
- * The readdirfunc declaration can't be prototyped, because it is
- * assigned, below, to two functions which are prototyped in glob.h
- * and dirent.h as taking pointers to differently typed opaque
- * structures.
- */
- struct dirent *(*readdirfunc)();
-
- *pathend = EOS;
- errno = 0;
-
- if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
- /* TODO: don't call for ENOENT or ENOTDIR? */
- if (pglob->gl_errfunc) {
- g_Ctoc(pathbuf, buf);
- if (pglob->gl_errfunc(buf, errno) ||
- pglob->gl_flags & GLOB_ERR)
- return (GLOB_ABEND);
- }
- return(0);
- }
-
- err = 0;
-
- /* Search directory for matching names. */
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- readdirfunc = pglob->gl_readdir;
- else
- readdirfunc = readdir;
- while ((dp = (*readdirfunc)(dirp))) {
- register u_char *sc;
- register Char *dc;
-
- /* Initial DOT must be matched literally. */
- if (dp->d_name[0] == DOT && *pattern != DOT)
- continue;
- for (sc = (u_char *) dp->d_name, dc = pathend;
- (*dc++ = *sc++) != EOS;)
- continue;
- if (!match(pathend, pattern, restpattern)) {
- *pathend = EOS;
- continue;
- }
- err = glob2(pathbuf, --dc, restpattern, pglob);
- if (err)
- break;
- }
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- (*pglob->gl_closedir)(dirp);
- else
- closedir(dirp);
- return(err);
-}
-
-
-/*
- * Extend the gl_pathv member of a glob_t structure to accomodate a new item,
- * add the new item, and update gl_pathc.
- *
- * This assumes the BSD realloc, which only copies the block when its size
- * crosses a power-of-two boundary; for v7 realloc, this would cause quadratic
- * behavior.
- *
- * Return 0 if new item added, error code if memory couldn't be allocated.
- *
- * Invariant of the glob_t structure:
- * Either gl_pathc is zero and gl_pathv is NULL; or gl_pathc > 0 and
- * gl_pathv points to (gl_offs + gl_pathc + 1) items.
- */
-static int
-globextend(path, pglob)
- const Char *path;
- glob_t *pglob;
-{
- register char **pathv;
- register int i;
- u_int newsize;
- char *copy;
- const Char *p;
-
- newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
- pathv = pglob->gl_pathv ?
- realloc((char *)pglob->gl_pathv, newsize) :
- malloc(newsize);
- if (pathv == NULL)
- return(GLOB_NOSPACE);
-
- if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) {
- /* first time around -- clear initial gl_offs items */
- pathv += pglob->gl_offs;
- for (i = pglob->gl_offs; --i >= 0; )
- *--pathv = NULL;
- }
- pglob->gl_pathv = pathv;
-
- for (p = path; *p++;)
- continue;
- if ((copy = malloc(p - path)) != NULL) {
- g_Ctoc(path, copy);
- pathv[pglob->gl_offs + pglob->gl_pathc++] = copy;
- }
- pathv[pglob->gl_offs + pglob->gl_pathc] = NULL;
- return(copy == NULL ? GLOB_NOSPACE : 0);
-}
-
-/*
- * pattern matching function for filenames. Each occurrence of the *
- * pattern causes a recursion level.
- */
-static int
-match(name, pat, patend)
- register Char *name, *pat, *patend;
-{
- int ok, negate_range;
- Char c, k;
-
- while (pat < patend) {
- c = *pat++;
- switch (c & M_MASK) {
- case M_ALL:
- if (pat == patend)
- return(1);
- do
- if (match(name, pat, patend))
- return(1);
- while (*name++ != EOS);
- return(0);
- case M_ONE:
- if (*name++ == EOS)
- return(0);
- break;
- case M_SET:
- ok = 0;
- if ((k = *name++) == EOS)
- return(0);
- if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS)
- ++pat;
- while (((c = *pat++) & M_MASK) != M_END)
- if ((*pat & M_MASK) == M_RNG) {
- if (__collate_load_error ?
- CHAR(c) <= CHAR(k) && CHAR(k) <= CHAR(pat[1]) :
- __collate_range_cmp(CHAR(c), CHAR(k)) <= 0
- && __collate_range_cmp(CHAR(k), CHAR(pat[1])) <= 0
- )
- ok = 1;
- pat += 2;
- } else if (c == k)
- ok = 1;
- if (ok == negate_range)
- return(0);
- break;
- default:
- if (*name++ != c)
- return(0);
- break;
- }
- }
- return(*name == EOS);
-}
-
-/* Free allocated data belonging to a glob_t structure. */
-void
-globfree(pglob)
- glob_t *pglob;
-{
- register int i;
- register char **pp;
-
- if (pglob->gl_pathv != NULL) {
- pp = pglob->gl_pathv + pglob->gl_offs;
- for (i = pglob->gl_pathc; i--; ++pp)
- if (*pp)
- free(*pp);
- free(pglob->gl_pathv);
- }
-}
-
-static DIR *
-g_opendir(str, pglob)
- register Char *str;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- if (!*str)
- strcpy(buf, ".");
- else
- g_Ctoc(str, buf);
-
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_opendir)(buf));
-
- return(opendir(buf));
-}
-
-static int
-g_lstat(fn, sb, pglob)
- register Char *fn;
- struct stat *sb;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- g_Ctoc(fn, buf);
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_lstat)(buf, sb));
- return(lstat(buf, sb));
-}
-
-static int
-g_stat(fn, sb, pglob)
- register Char *fn;
- struct stat *sb;
- glob_t *pglob;
-{
- char buf[MAXPATHLEN];
-
- g_Ctoc(fn, buf);
- if (pglob->gl_flags & GLOB_ALTDIRFUNC)
- return((*pglob->gl_stat)(buf, sb));
- return(stat(buf, sb));
-}
-
-static Char *
-g_strchr(str, ch)
- Char *str;
- int ch;
-{
- do {
- if (*str == ch)
- return (str);
- } while (*str++);
- return (NULL);
-}
-
-#ifdef notdef
-static Char *
-g_strcat(dst, src)
- Char *dst;
- const Char* src;
-{
- Char *sdst = dst;
-
- while (*dst++)
- continue;
- --dst;
- while((*dst++ = *src++) != EOS)
- continue;
-
- return (sdst);
-}
-#endif
-
-static void
-g_Ctoc(str, buf)
- register const Char *str;
- char *buf;
-{
- register char *dc;
-
- for (dc = buf; (*dc++ = *str++) != EOS;)
- continue;
-}
-
-#ifdef DEBUG
-static void
-qprintf(str, s)
- const char *str;
- register Char *s;
-{
- register Char *p;
-
- (void)printf("%s:\n", str);
- for (p = s; *p; p++)
- (void)printf("%c", CHAR(*p));
- (void)printf("\n");
- for (p = s; *p; p++)
- (void)printf("%c", *p & M_PROTECT ? '"' : ' ');
- (void)printf("\n");
- for (p = s; *p; p++)
- (void)printf("%c", ismeta(*p) ? '_' : ' ');
- (void)printf("\n");
-}
-#endif
diff --git a/lib/libc/gen/initgroups.3 b/lib/libc/gen/initgroups.3
deleted file mode 100644
index 474265d..0000000
--- a/lib/libc/gen/initgroups.3
+++ /dev/null
@@ -1,83 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)initgroups.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt INITGROUPS 3
-.Os BSD 4.2
-.Sh NAME
-.Nm initgroups
-.Nd initialize group access list
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn initgroups "const char *name" "int basegid"
-.Sh DESCRIPTION
-The
-.Fn initgroups
-function
-uses the
-.Xr getgrouplist 3
-function to calculate the group access list for the user
-specified in
-.Fa name .
-This group list is then setup for the current process using
-.Xr setgroups 2 .
-The
-.Fa basegid
-is automatically included in the groups list.
-Typically this value is given as
-the group number from the password file.
-.Sh RETURN VALUES
-The
-.Fn initgroups
-function
-returns \-1 if it was not invoked by the super-user.
-.Sh SEE ALSO
-.Xr setgroups 2 ,
-.Xr getgrouplist 3
-.Sh HISTORY
-The
-.Fn initgroups
-function appeared in
-.Bx 4.2 .
-.Sh BUGS
-The
-.Fn getgrouplist
-function called by
-.Fn initgroups
-uses the routines based on
-.Xr getgrent 3 .
-If the invoking program uses any of these routines,
-the group structure will
-be overwritten in the call to
-.Fn initgroups .
diff --git a/lib/libc/gen/initgroups.c b/lib/libc/gen/initgroups.c
deleted file mode 100644
index b1ddd86..0000000
--- a/lib/libc/gen/initgroups.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)initgroups.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-
-#include <stdio.h>
-#include <err.h>
-#include <unistd.h>
-
-int
-initgroups(uname, agroup)
- const char *uname;
- int agroup;
-{
- int groups[NGROUPS], ngroups;
-
- ngroups = NGROUPS;
- if (getgrouplist(uname, agroup, groups, &ngroups) < 0)
- warnx("%s is in too many groups, using first %d",
- uname, ngroups);
- if (setgroups(ngroups, groups) < 0) {
- warn("setgroups");
- return (-1);
- }
- return (0);
-}
diff --git a/lib/libc/gen/isatty.c b/lib/libc/gen/isatty.c
deleted file mode 100644
index c8356c7..0000000
--- a/lib/libc/gen/isatty.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)isatty.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <termios.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-int
-isatty(fd)
- int fd;
-{
- int retval;
- struct termios t;
-
-#ifdef _THREAD_SAFE
- if (_thread_fd_lock(fd, FD_READ, NULL,__FILE__,__LINE__) == 0) {
-#endif
- retval = (tcgetattr(fd, &t) != -1);
-#ifdef _THREAD_SAFE
- _thread_fd_unlock(fd, FD_READ);
- } else {
- retval = 0;
- }
-#endif
- return(retval);
-}
diff --git a/lib/libc/gen/isinf.3 b/lib/libc/gen/isinf.3
deleted file mode 100644
index 02ca3c5..0000000
--- a/lib/libc/gen/isinf.3
+++ /dev/null
@@ -1,72 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isinf.3 8.2 (Berkeley) 1/29/94
-.\"
-.Dd January 29, 1994
-.Dt ISINF 3
-.Os
-.Sh NAME
-.Nm isinf ,
-.Nm isnan
-.Nd test for infinity or not-a-number
-.Sh SYNOPSIS
-.Ft int
-.Fn isinf double
-.Ft int
-.Fn isnan double
-.Sh DESCRIPTION
-The
-.Fn isninf
-function
-returns 1 if the number is
-.Dq \\*(If ,
-otherwise 0.
-.Pp
-The
-.Fn isnan
-function
-returns 1 if the number is
-.Dq not-a-number ,
-otherwise 0.
-.Sh SEE ALSO
-.Xr math 3
-.Rs
-.%T "IEEE Standard for Binary Floating-Point Arithmetic"
-.%Q ANSI
-.%R Std 754-1985
-.Re
-.Sh BUGS
-Neither the
-.Tn VAX
-nor the Tahoe floating point have distinguished values
-for either infinity or not-a-number.
-These routines always return 0 on those architectures.
diff --git a/lib/libc/gen/jrand48.c b/lib/libc/gen/jrand48.c
deleted file mode 100644
index 051d5a6..0000000
--- a/lib/libc/gen/jrand48.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-long
-jrand48(unsigned short xseed[3])
-{
- _dorand48(xseed);
- return ((long) xseed[2] << 16) + (long) xseed[1];
-}
diff --git a/lib/libc/gen/lcong48.c b/lib/libc/gen/lcong48.c
deleted file mode 100644
index f13826b..0000000
--- a/lib/libc/gen/lcong48.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-extern unsigned short _rand48_seed[3];
-extern unsigned short _rand48_mult[3];
-extern unsigned short _rand48_add;
-
-void
-lcong48(unsigned short p[7])
-{
- _rand48_seed[0] = p[0];
- _rand48_seed[1] = p[1];
- _rand48_seed[2] = p[2];
- _rand48_mult[0] = p[3];
- _rand48_mult[1] = p[4];
- _rand48_mult[2] = p[5];
- _rand48_add = p[6];
-}
diff --git a/lib/libc/gen/ldexp.3 b/lib/libc/gen/ldexp.3
deleted file mode 100644
index 0307ad1..0000000
--- a/lib/libc/gen/ldexp.3
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ldexp.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt LDEXP 3
-.Os
-.Sh NAME
-.Nm ldexp
-.Nd multiply floating-point number by integral power of 2
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn ldexp "double x" "int exp"
-.Sh DESCRIPTION
-The
-.Fn ldexp
-function multiplies a floating-point number by an integral
-power of 2.
-.Sh RETURN VALUES
-The
-.Fn ldexp
-function returns the value of
-.Fa x
-times 2 raised to the power
-.Fa exp .
-.Pp
-If the resultant value would cause an overflow,
-the global variable
-.Va errno
-is set to
-.Er ERANGE
-and the value
-.Dv HUGE
-is returned.
-.Sh SEE ALSO
-.Xr frexp 3 ,
-.Xr math 3 ,
-.Xr modf 3
-.Sh STANDARDS
-The
-.Fn ldexp
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/gen/lrand48.c b/lib/libc/gen/lrand48.c
deleted file mode 100644
index a3d0111..0000000
--- a/lib/libc/gen/lrand48.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-extern unsigned short _rand48_seed[3];
-
-long
-lrand48(void)
-{
- _dorand48(_rand48_seed);
- return ((long) _rand48_seed[2] << 15) + ((long) _rand48_seed[1] >> 1);
-}
diff --git a/lib/libc/gen/modf.3 b/lib/libc/gen/modf.3
deleted file mode 100644
index 22b4c4c..0000000
--- a/lib/libc/gen/modf.3
+++ /dev/null
@@ -1,72 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)modf.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MODF 3
-.Os
-.Sh NAME
-.Nm modf
-.Nd extract signed integral and fractional values from floating-point number
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn modf "double value" "double *iptr"
-.Sh DESCRIPTION
-The
-.Fn modf
-function breaks the argument
-.Fa value
-into integral and fractional parts, each of which has the
-same sign as the argument.
-It stores the integral part as a
-.Em double
-in the object pointed to by
-.Fa iptr .
-.Sh RETURN VALUES
-The
-.Fn modf
-function returns the signed fractional part of
-.Fa value .
-.Sh SEE ALSO
-.Xr frexp 3 ,
-.Xr ldexp 3 ,
-.Xr math 3
-.Sh STANDARDS
-The
-.Fn modf
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/gen/mrand48.c b/lib/libc/gen/mrand48.c
deleted file mode 100644
index b23db51..0000000
--- a/lib/libc/gen/mrand48.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-extern unsigned short _rand48_seed[3];
-
-long
-mrand48(void)
-{
- _dorand48(_rand48_seed);
- return ((long) _rand48_seed[2] << 16) + (long) _rand48_seed[1];
-}
diff --git a/lib/libc/gen/msgctl.3 b/lib/libc/gen/msgctl.3
deleted file mode 100644
index 130b1f2..0000000
--- a/lib/libc/gen/msgctl.3
+++ /dev/null
@@ -1,209 +0,0 @@
-.\" $NetBSD: msgctl.2,v 1.1 1995/10/16 23:49:15 jtc Exp $
-.\"
-.\" Copyright (c) 1995 Frank van der Linden
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed for the NetBSD Project
-.\" by Frank van der Linden
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id$
-.\"/
-.Dd November 24, 1997
-.Dt MSGCTL 3
-.Os FreeBSD
-.Sh NAME
-.Nm msgctl
-.Nd message control operations
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/msg.h>
-.Ft int
-.Fn msgctl "int msqid" "int cmd" "struct msqid_ds *buf"
-.Sh DESCRIPTION
-The
-.Fn msgctl
-system call performs some control operations on the message queue specified
-by
-.Fa msqid .
-
-Each message queue has a data structure associated with it, parts of which
-may be altered by
-.Fn msgctl
-and parts of which determine the actions of
-.Fn msgctl .
-The data structure is defined in
-.Aq Pa sys/msg.h
-and contains (amongst others) the following members:
-.Bd -literal
-struct msqid_ds {
- struct ipc_perm msg_perm; /* msg queue permission bits */
- struct msg *msg_first; /* first message in the queue */
- struct msg *msg_last; /* last message in the queue */
- u_long msg_cbytes; /* number of bytes in use on the queue */
- u_long msg_qnum; /* number of msgs in the queue */
- u_long msg_qbytes; /* max # of bytes on the queue */
- pid_t msg_lspid; /* pid of last msgsnd() */
- pid_t msg_lrpid; /* pid of last msgrcv() */
- time_t msg_stime; /* time of last msgsnd() */
- long msg_pad1;
- time_t msg_rtime; /* time of last msgrcv() */
- long msg_pad2;
- time_t msg_ctime; /* time of last msgctl() */
- long msg_pad3;
- long msg_pad4[4];
-};
-.Ed
-.Pp
-The
-.Bf -literal
-ipc_perm
-.Ef
-structure used inside the
-.Bf -literal
-shmid_ds
-.Ef
-structure is defined in
-.Aq Pa sys/ipc.h
-and looks like this:
-.Bd -literal
-struct ipc_perm {
- ushort cuid; /* creator user id */
- ushort cgid; /* creator group id */
- ushort uid; /* user id */
- ushort gid; /* group id */
- ushort mode; /* r/w permission */
- ushort seq; /* sequence # (to generate unique msg/sem/shm id) */
- key_t key; /* user specified msg/sem/shm key */
-};
-.Ed
-.Pp
-The operation to be performed by
-.Fn msgctl
-is specified in
-.Fa cmd
-and is one of:
-.Bl -tag -width IPC_RMIDX
-.It Dv IPC_STAT
-Gather information about the message queue and place it in the
-structure pointed to by
-.Fa buf .
-.It Dv IPC_SET
-Set the value of the
-.Va msg_perm.uid ,
-.Va msg_perm.gid ,
-.Va msg_perm.mode
-and
-.Va msg_qbytes
-fields in the structure associated with
-.Fa msqid .
-The values are taken from the corresponding fields in the structure
-pointed to by
-.Fa buf .
-This operation can only be executed by the super-user, or a process that
-has an effective user id equal to either
-.Va msg_perm.cuid
-or
-.Va msg_perm.uid
-in the data structure associated with the message queue.
-The value of
-.Va msg_qbytes
-can only be increased by the super-user. Values for
-.Va msg_qbytes
-that exceed the system limit (MSGMNB from
-.Aq Pa sys/msg.h )
-are silently truncated to that limit.
-
-.It Dv IPC_RMID
-Remove the message queue specified by
-.Fa msqid
-and destroy the data associated with it. Only the super-user or a process
-with an effective uid equal to the
-.Va msg_perm.cuid
-or
-.Va msg_perm.uid
-values in the data structure associated with the queue can do this.
-.El
-
-The permission to read from or write to a message queue (see
-.Xr msgsnd 3
-and
-.Xr msgrcv 3 )
-is determined by the
-.Va msg_perm.mode
-field in the same way as is
-done with files (see
-.Xr chmod 2 ),
-but the effective uid can match either the
-.Va msg_perm.cuid
-field or the
-.Va msg_perm.uid
-field, and the
-effective gid can match either
-.Va msg_perm.cgid
-or
-.Va msg_perm.gid .
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise, -1 is
-returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn msgctl
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EPERM
-.Fa cmd
-is equal to IPC_SET or IPC_RMID and the caller is not the super-user, nor does
-the effective uid match either the
-.Va msg_perm.uid
-or
-.Va msg_perm.cuid
-fields of the data structure associated with the message queue.
-
-An attempt is made to increase the value of
-.Va msg_qbytes
-through IPC_SET
-but the caller is not the super-user.
-.It Bq Er EACCES
-The command is IPC_STAT
-and the caller has no read permission for this message queue.
-.It Bq Er EINVAL
-.Fa msqid
-is not a valid message queue identifier.
-
-.Va cmd
-is not a valid command.
-.It Bq Er EFAULT
-.Fa buf
-specifies an invalid address.
-.El
-.Sh SEE ALSO
-.Xr msgget 3 ,
-.Xr msgrcv 3 ,
-.Xr msgsnd 3
-.Sh HISTORY
-Message queues appeared in the first release of AT&T Unix System V.
diff --git a/lib/libc/gen/msgctl.c b/lib/libc/gen/msgctl.c
deleted file mode 100644
index 7b74c51e..0000000
--- a/lib/libc/gen/msgctl.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-
-#if __STDC__
-int msgctl(int msqid, int cmd, struct msqid_ds *buf)
-#else
-int msgctl(msqid,cmd,buf)
- int msqid;
- int cmd;
- caddr_t buf;
-#endif
-{
- return (msgsys(0, msqid, cmd, buf));
-}
diff --git a/lib/libc/gen/msgget.3 b/lib/libc/gen/msgget.3
deleted file mode 100644
index 72a07e4..0000000
--- a/lib/libc/gen/msgget.3
+++ /dev/null
@@ -1,134 +0,0 @@
-.\" $NetBSD: msgget.2,v 1.1 1995/10/16 23:49:19 jtc Exp $
-.\"
-.\" Copyright (c) 1995 Frank van der Linden
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed for the NetBSD Project
-.\" by Frank van der Linden
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"/
-.Dd August 17, 1995
-.Dt MSGGET 3
-.Os FreeBSD
-.Sh NAME
-.Nm msgget
-.Nd get message queue
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/msg.h>
-.Ft int
-.Fn msgget "key_t key" "int msgflg"
-.Sh DESCRIPTION
-.Fn msgget
-returns the message queue identifier associated with
-.Fa key .
-A message queue identifier is a unique integer greater than zero.
-.Pp
-A message queue is created if either
-.Fa key
-is equal to
-.Dv IPC_PRIVATE ,
-or
-.Fa key
-does not have a message queue identifier associated with it, and the
-.Dv IPC_CREAT
-bit is set in
-.Fa msgflg.
-.Pp
-If a new message queue is created, the data structure associated with it (the
-.Va msqid_ds
-structure, see
-.Xr msgctl 3 )
-is initialized as follows:
-.Bl -bullet
-.It
-.Va msg_perm.cuid
-and
-.Va msg_perm.uid
-are set to the effective uid of the calling process.
-.It
-.Va msg_perm.gid
-and
-.Va msg_perm.cgid
-are set to the effective gid of the calling process.
-.It
-.Va msg_perm.mode
-is set to the lower 9 bits of
-.Fa msgflg .
-.It
-.Va msg_cbytes ,
-.Va msg_qnum ,
-.Va msg_lspid ,
-.Va msg_lrpid ,
-.Va msg_rtime ,
-and
-.Va msg_stime
-are set to 0.
-.It
-.Va msg_qbytes
-is set to the system wide maximum value for the number of bytes in a queue
-.Pf ( Dv MSGMNB ) .
-.It
-.Va msg_ctime
-is set to the current time.
-.El
-.Sh RETURN VALUES
-Upon successful completion a positive message queue identifier is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Bl -tag -width Er
-.It Bq Er EACESS
-A message queue is already associated with
-.Fa key
-and the caller has no permission to access it.
-.It Bq Er EEXIST
-Both
-.Dv IPC_CREAT
-and
-.Dv IPC_EXCL
-are set in
-.Fa msgflg ,
-and a message queue is already associated with
-.Fa key .
-.It Bq Er ENOSPC
-A new message queue could not be created because the system limit for
-the number of message queues has been reached.
-.It Bq Er ENOENT
-.Dv IPC_CREAT
-was not set in
-.Fa msgflg
-and no message queue associated with
-.Fa key
-was found.
-.El
-.Sh SEE ALSO
-.Xr msgctl 3 ,
-.Xr msgrcv 3 ,
-.Xr msgsnd 3
-.Sh HISTORY
-Message queues appeared in the first release of AT&T Unix System V.
diff --git a/lib/libc/gen/msgget.c b/lib/libc/gen/msgget.c
deleted file mode 100644
index 3e146b0..0000000
--- a/lib/libc/gen/msgget.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-
-#if __STDC__
-int msgget(key_t key, int msgflg)
-#else
-int msgget(key,msgflg)
- key_t key;
- int msgflg;
-#endif
-{
- return (msgsys(1, key, msgflg));
-}
diff --git a/lib/libc/gen/msgrcv.3 b/lib/libc/gen/msgrcv.3
deleted file mode 100644
index ff09309..0000000
--- a/lib/libc/gen/msgrcv.3
+++ /dev/null
@@ -1,209 +0,0 @@
-.\" $NetBSD: msgrcv.2,v 1.1 1995/10/16 23:49:20 jtc Exp $
-.\"
-.\" Copyright (c) 1995 Frank van der Linden
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed for the NetBSD Project
-.\" by Frank van der Linden
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\" $Id$
-.\"
-.\"/
-.Dd November 24, 1997
-.Dt MSGRCV 3
-.Os FreeBSD
-.Sh NAME
-.Nm msgrcv
-.Nd receive a message from a message queue
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/msg.h>
-.Ft int
-.Fn msgrcv "int msqid" "void *msgp" "size_t msgsz" "long msgtyp" "int msgflg"
-.Sh DESCRIPTION
-The
-.Fn msgrcv
-function receives a message from the message queue specified in
-.Fa msqid ,
-and places it into the structure pointed to by
-.Fa msgp .
-This structure should consist of the following members:
-.Bd -literal
- long mtype; /* message type */
- char mtext[1]; /* body of message */
-.Ed
-.Pp
-.Va mtype
-is an integer greater than 0 that can be used for selecting messages,
-.Va mtext
-is an array of bytes, with a size up to that of the system limit
-.Pf ( Dv MSGMAX ) .
-.Pp
-The value of
-.Fa msgtyp
-has one of the following meanings:
-.Bl -bullet
-.It
-.Fa msgtyp
-is greater than 0. The first message of type
-.Fa msgtyp
-will be received.
-.It
-.Fa msgtyp
-is equal to 0. The first message on the queue will be received.
-.It
-.Fa msgtyp
-is less than 0. The first message of the lowest message type that is
-less than or equal to the absolute value of
-.Fa msgtyp
-will be received.
-.El
-.Pp
-.Fa msgsz
-specifies the maximum length of the requested message. If the received
-message has a length greater than
-.Fa msgsz
-it will be silently truncated if the
-.Dv MSG_NOERROR
-flag is set in
-.Fa msgflg ,
-otherwise an error will be returned.
-.Pp
-If no matching message is present on the message queue specified by
-.Fa msqid ,
-the behavior of
-.Fn msgrcv
-depends on whether the
-.Dv IPC_NOWAIT
-flag is set in
-.Fa msgflg
-or not. If
-.Dv IPC_NOWAIT
-is set,
-.Fn msgrcv
-will immediately return a value of -1, and set
-.Va errno
-to
-.Er EAGAIN .
-If
-.Dv IPC_NOWAIT
-is not set, the calling process will be blocked
-until:
-.Bl -bullet
-.It
-A message of the requested type becomes available on the message queue.
-.It
-The message queue is removed, in which case -1 will be returned, and
-.Va errno
-set to
-.Er EINVAL .
-.It
-A signal is received and caught. -1 is returned, and
-.Va errno
-set to
-.Er EINTR .
-.El
-.Pp
-If a message is successfully received, the data structure associated with
-.Fa msqid
-is updated as follows:
-.Bl -bullet
-.It
-.Va msg_cbytes
-is decremented by the size of the message.
-.It
-.Va msg_lrpid
-is set to the pid of the caller.
-.It
-.Va msg_lrtime
-is set to the current time.
-.It
-.Va msg_qnum
-is decremented by 1.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn msgrcv
-returns the number of bytes received into the
-.Va mtext
-field of the structure pointed to by
-.Fa msgp .
-Otherwise, -1 is returned, and
-.Va errno
-set to indicate the error.
-.Sh ERRORS
-.Fn msgrcv
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa msqid
-is not a valid message queue identifier.
-.Pp
-The message queue was removed while
-.Fn msgrcv
-was waiting for a message of the requested type to become available on it.
-.Pp
-.Fa msgsz
-is less than 0.
-.It Bq Er E2BIG
-A matching message was received, but its size was greater than
-.Fa msgsz
-and the
-.Dv MSG_NOERROR
-flag was not set in
-.Fa msgflg .
-.It Bq Er EACCES
-The calling process does not have read access to the message queue.
-.It Bq Er EFAULT
-.Fa msgp
-points to an invalid address.
-.It Bq Er EINTR
-The system call was interrupted by the delivery of a signal.
-.It Bq Er EAGAIN
-There is no message of the requested type available on the message queue,
-and
-.Dv IPC_NOWAIT
-is set in
-.Fa msgflg .
-.Sh SEE ALSO
-.Xr msgctl 3 ,
-.Xr msgget 3 ,
-.Xr msgsnd 3
-.Sh BUGS
-.Tn NetBSD
-and
-.Tn FreeBSD
-do not define the
-.Er EIDRM
-error value, which should be used in
-the case of a removed message queue, nor the
-.Er ENOMSG
-value, which
-should be used when no suitable message is available and
-.Dv IPC_NOWAIT
-is set.
-.Sh HISTORY
-Message queues appeared in the first release of
-AT&T Unix System V.
diff --git a/lib/libc/gen/msgrcv.c b/lib/libc/gen/msgrcv.c
deleted file mode 100644
index 5c1e387..0000000
--- a/lib/libc/gen/msgrcv.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-
-#if __STDC__
-int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)
-#else
-int msgrcv(msqid, msgp, msgsz, msgtyp, msgflg)
- int msqid;
- void *msgp;
- size_t msgsz;
- long msgtyp;
- int msgflg;
-#endif
-{
- return (msgsys(3, msqid, msgp, msgsz, msgtyp, msgflg));
-}
diff --git a/lib/libc/gen/msgsnd.3 b/lib/libc/gen/msgsnd.3
deleted file mode 100644
index 551bd02..0000000
--- a/lib/libc/gen/msgsnd.3
+++ /dev/null
@@ -1,161 +0,0 @@
-.\" $NetBSD: msgsnd.2,v 1.1 1995/10/16 23:49:24 jtc Exp $
-.\"
-.\" Copyright (c) 1995 Frank van der Linden
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed for the NetBSD Project
-.\" by Frank van der Linden
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\" $Id$
-.\"
-.\"/
-.Dd November 24, 1997
-.Dt MSGSND 3
-.Os FreeBSD
-.Sh NAME
-.Nm msgsnd
-.Nd send a message to a message queue
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/msg.h>
-.Ft int
-.Fn msgsnd "int msqid" "void *msgp" "size_t msgsz" "int msgflg"
-.Sh DESCRIPTION
-The
-.Fn msgsnd
-function sends a message from the message queue specified in
-.Fa msqid .
-.Fa msgp
-points to a structure containing the message. This structure should
-consist of the following members:
-.Bd -literal
- long mtype; /* message type */
- char mtext[1]; /* body of message */
-.Ed
-.Pp
-.Va mtype
-is an integer greater than 0 that can be used for selecting messages (see
-.Xr msgrcv 3 ) ,
-.Va mtext
-is an array of bytes, with a size up to that of the system limit
-.Pf ( Dv MSGMAX ) .
-.Pp
-If the number of bytes already on the message queue plus
-.Fa msgsz
-is bigger than the maximum number of bytes on the message queue
-.Pf ( Va msg_qbytes ,
-see
-.Xr msgctl 3 ) ,
-or the number of messages on all queues system-wide is already equal to
-the system limit,
-.Fa msgflg
-determines the action of
-.Fn msgsnd .
-If
-.Fa msgflg
-has
-.Dv IPC_NOWAIT
-mask set in it, the call will return immediately. If
-.Fa msgflg
-does not have
-.Dv IPC_NOWAIT
-set in it, the call will block until:
-.Bl -bullet
-.It
-The condition which caused the call to block does no longer exist.
-The message will be sent.
-.It
-The message queue is removed, in which case -1 will be returned, and
-.Va errno
-is set to
-.Er EINVAL .
-.It
-The caller catches a signal. The call returns with
-.Va errno
-set to
-.Er EINTR .
-.El
-.Pp
-After a successful call, the data structure associated with the message
-queue is updated in the following way:
-.Bl -bullet
-.It
-.Va msg_cbytes
-is incremented by the size of the message.
-.It
-.Va msg_qnum
-is incremented by 1.
-.It
-.Va msg_lspid
-is set to the pid of the calling process.
-.It
-.Va msg_stime
-is set to the current time.
-.El
-.Sh RETURN VALUES
-Upon successful completion, 0 is returned. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn msgsnd
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa msqid
-is not a valid message queue identifier
-.Pp
-The message queue was removed while
-.Fn msgsnd
-was waiting for a resource to become available in order to deliver the
-message.
-.Pp
-.Fa msgsz
-is less than 0, or greater than
-.Va msg_qbytes .
-.It Bq Er EACCES
-The calling process does not have write access to the message queue.
-.It Bq Er EAGAIN
-There was no space for this message either on the queue, or in the whole
-system, and
-.Dv IPC_NOWAIT
-was set in
-.Fa msgflg .
-.It Bq Er EFAULT
-.Fa msgp
-points to an invalid address.
-.It Bq Er EINTR
-The system call was interrupted by the delivery of a signal.
-.El
-.Sh BUGS
-.Tn NetBSD
-and
-.Tn FreeBSD
-do not define the
-.Er EIDRM
-error value, which should be used
-in the case of a removed message queue.
-.Sh HISTORY
-Message queues appeared in the first release of AT&T Unix System V.
diff --git a/lib/libc/gen/msgsnd.c b/lib/libc/gen/msgsnd.c
deleted file mode 100644
index a620915..0000000
--- a/lib/libc/gen/msgsnd.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-
-#if __STDC__
-int msgsnd(int msqid, void *msgp, size_t msgsz, int msgflg)
-#else
-int msgsnd(msqid, msgp, msgsz, msgflg)
- int msqid;
- void *msgp;
- size_t msgsz;
- int msgflg;
-#endif
-{
- return (msgsys(2, msqid, msgp, msgsz, msgflg));
-}
diff --git a/lib/libc/gen/nice.3 b/lib/libc/gen/nice.3
deleted file mode 100644
index 8179250..0000000
--- a/lib/libc/gen/nice.3
+++ /dev/null
@@ -1,68 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)nice.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt NICE 3
-.Os BSD 4
-.Sh NAME
-.Nm nice
-.Nd set program scheduling priority
-.Sh SYNOPSIS
-.Ft int
-.Fn nice "int incr"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is obsoleted by setpriority(2).
-.Ef
-.Pp
-The
-.Fn nice
-function obtains the scheduling priority of the process
-from the system and sets it to the priority value specified in
-.Fa incr .
-The priority is a value in the range -20 to 20.
-The default priority is 0; lower priorities cause more favorable scheduling.
-Only the super-user may lower priorities.
-.Pp
-Children inherit the priority of their parent processes via
-.Xr fork 2 .
-.Sh SEE ALSO
-.Xr nice 1 ,
-.Xr fork 2 ,
-.Xr setpriority 2 ,
-.Xr renice 8
-.Sh HISTORY
-A
-.Fn nice
-syscall appeared in
-.At v6 .
diff --git a/lib/libc/gen/nice.c b/lib/libc/gen/nice.c
deleted file mode 100644
index 8b37c06..0000000
--- a/lib/libc/gen/nice.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)nice.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <unistd.h>
-
-/*
- * Backwards compatible nice.
- */
-int
-nice(incr)
- int incr;
-{
- int prio;
- extern int errno;
-
- errno = 0;
- prio = getpriority(PRIO_PROCESS, 0);
- if (prio == -1 && errno)
- return (-1);
- return (setpriority(PRIO_PROCESS, 0, prio + incr));
-}
diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3
deleted file mode 100644
index 981a4c8..0000000
--- a/lib/libc/gen/nlist.3
+++ /dev/null
@@ -1,78 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)nlist.3 8.3 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt NLIST 3
-.Os BSD 4
-.Sh NAME
-.Nm nlist
-.Nd retrieve symbol table name list from an executable file
-.Sh SYNOPSIS
-.Fd #include <nlist.h>
-.Ft int
-.Fn nlist "const char *filename" "struct nlist *nl"
-.Sh DESCRIPTION
-The
-.Fn nlist
-function
-retrieves name list entries from the symbol table of an
-executable file (see
-.Xr a.out 5 ) .
-The argument
-.Fa \&nl
-is set to reference the
-beginning of the list.
-The list is preened of binary and invalid data;
-if an entry in the
-name list is valid, the
-.Fa n_type
-and
-.Fa n_value
-for the entry are copied into the list
-referenced by
-.Fa \&nl .
-No other data is copied.
-The last entry in the list is always
-.Dv NULL .
-.Sh RETURN VALUES
-The number of invalid entries is returned if successful; otherwise,
-if the file
-.Fa filename
-does not exist or is not executable, the returned value is \-1.
-.Sh SEE ALSO
-.Xr a.out 5
-.Sh HISTORY
-A
-.Fn nlist
-function appeared in
-.At v6 .
diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c
deleted file mode 100644
index 3100a12..0000000
--- a/lib/libc/gen/nlist.c
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/file.h>
-
-#include <errno.h>
-#include <a.out.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-#define _NLIST_DO_AOUT
-
-#ifdef _NLIST_DO_ELF
-#include <elf.h>
-#endif
-
-int __fdnlist __P((int, struct nlist *));
-int __aout_fdnlist __P((int, struct nlist *));
-int __elf_fdnlist __P((int, struct nlist *));
-
-int
-nlist(name, list)
- const char *name;
- struct nlist *list;
-{
- int fd, n;
-
- fd = open(name, O_RDONLY, 0);
- if (fd < 0)
- return (-1);
- n = __fdnlist(fd, list);
- (void)close(fd);
- return (n);
-}
-
-static struct nlist_handlers {
- int (*fn) __P((int fd, struct nlist *list));
-} nlist_fn[] = {
-#ifdef _NLIST_DO_AOUT
- { __aout_fdnlist },
-#endif
-#ifdef _NLIST_DO_ELF
- { __elf_fdnlist },
-#endif
-};
-
-int
-__fdnlist(fd, list)
- register int fd;
- register struct nlist *list;
-{
- int n = -1, i;
-
- for (i = 0; i < sizeof(nlist_fn) / sizeof(nlist_fn[0]); i++) {
- n = (nlist_fn[i].fn)(fd, list);
- if (n != -1)
- break;
- }
- return (n);
-}
-
-#define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0)
-
-#ifdef _NLIST_DO_AOUT
-int
-__aout_fdnlist(fd, list)
- register int fd;
- register struct nlist *list;
-{
- register struct nlist *p, *symtab;
- register caddr_t strtab, a_out_mmap;
- register off_t stroff, symoff;
- register u_long symsize;
- register int nent;
- struct exec * exec;
- struct stat st;
-
- /* check that file is at least as large as struct exec! */
- if ((fstat(fd, &st) < 0) || (st.st_size < sizeof(struct exec)))
- return (-1);
-
- /* Check for files too large to mmap. */
- if (st.st_size > SIZE_T_MAX) {
- errno = EFBIG;
- return (-1);
- }
-
- /*
- * Map the whole a.out file into our address space.
- * We then find the string table withing this area.
- * We do not just mmap the string table, as it probably
- * does not start at a page boundary - we save ourselves a
- * lot of nastiness by mmapping the whole file.
- *
- * This gives us an easy way to randomly access all the strings,
- * without making the memory allocation permanent as with
- * malloc/free (i.e., munmap will return it to the system).
- */
- a_out_mmap = mmap(NULL, (size_t)st.st_size, PROT_READ, MAP_PRIVATE, fd, (off_t)0);
- if (a_out_mmap == MAP_FAILED)
- return (-1);
-
- exec = (struct exec *)a_out_mmap;
- if (N_BADMAG(*exec)) {
- munmap(a_out_mmap, (size_t)st.st_size);
- return (-1);
- }
-
- symoff = N_SYMOFF(*exec);
- symsize = exec->a_syms;
- stroff = symoff + symsize;
-
- /* find the string table in our mmapped area */
- strtab = a_out_mmap + stroff;
- symtab = (struct nlist *)(a_out_mmap + symoff);
-
- /*
- * clean out any left-over information for all valid entries.
- * Type and value defined to be 0 if not found; historical
- * versions cleared other and desc as well. Also figure out
- * the largest string length so don't read any more of the
- * string table than we have to.
- *
- * XXX clearing anything other than n_type and n_value violates
- * the semantics given in the man page.
- */
- nent = 0;
- for (p = list; !ISLAST(p); ++p) {
- p->n_type = 0;
- p->n_other = 0;
- p->n_desc = 0;
- p->n_value = 0;
- ++nent;
- }
-
- while (symsize > 0) {
- register int soff;
-
- symsize-= sizeof(struct nlist);
- soff = symtab->n_un.n_strx;
-
-
- if (soff != 0 && (symtab->n_type & N_STAB) == 0)
- for (p = list; !ISLAST(p); p++)
- if (!strcmp(&strtab[soff], p->n_un.n_name)) {
- p->n_value = symtab->n_value;
- p->n_type = symtab->n_type;
- p->n_desc = symtab->n_desc;
- p->n_other = symtab->n_other;
- if (--nent <= 0)
- break;
- }
- symtab++;
- }
- munmap(a_out_mmap, (size_t)st.st_size);
- return (nent);
-}
-#endif
-
-#ifdef _NLIST_DO_ELF
-/*
- * __elf_is_okay__ - Determine if ehdr really
- * is ELF and valid for the target platform.
- *
- * WARNING: This is NOT a ELF ABI function and
- * as such it's use should be restricted.
- */
-int
-__elf_is_okay__(ehdr)
- register Elf32_Ehdr *ehdr;
-{
- register int retval = 0;
- /*
- * We need to check magic, class size, endianess,
- * and version before we look at the rest of the
- * Elf32_Ehdr structure. These few elements are
- * represented in a machine independant fashion.
- */
- if (IS_ELF(*ehdr) &&
- ehdr->e_ident[EI_CLASS] == ELF_TARG_CLASS &&
- ehdr->e_ident[EI_DATA] == ELF_TARG_DATA &&
- ehdr->e_ident[EI_VERSION] == ELF_TARG_VER) {
-
- /* Now check the machine dependant header */
- if (ehdr->e_machine == ELF_TARG_MACH &&
- ehdr->e_version == ELF_TARG_VER)
- retval = 1;
- }
- return retval;
-}
-
-int
-__elf_fdnlist(fd, list)
- register int fd;
- register struct nlist *list;
-{
- register struct nlist *p;
- register caddr_t strtab;
- register Elf32_Off symoff = 0, symstroff = 0;
- register Elf32_Word symsize = 0, symstrsize = 0;
- register Elf32_Sword nent, cc, i;
- Elf32_Sym sbuf[1024];
- Elf32_Sym *s;
- Elf32_Ehdr ehdr;
- Elf32_Shdr *shdr = NULL;
- Elf32_Word shdr_size;
- struct stat st;
-
- /* Make sure obj is OK */
- if (lseek(fd, (off_t)0, SEEK_SET) == -1 ||
- read(fd, &ehdr, sizeof(Elf32_Ehdr)) != sizeof(Elf32_Ehdr) ||
- !__elf_is_okay__(&ehdr) ||
- fstat(fd, &st) < 0)
- return (-1);
-
- /* calculate section header table size */
- shdr_size = ehdr.e_shentsize * ehdr.e_shnum;
-
- /* Make sure it's not too big to mmap */
- if (shdr_size > SIZE_T_MAX) {
- errno = EFBIG;
- return (-1);
- }
-
- /* mmap section header table */
- shdr = (Elf32_Shdr *)mmap(NULL, (size_t)shdr_size,
- PROT_READ, 0, fd, (off_t) ehdr.e_shoff);
- if (shdr == (Elf32_Shdr *)-1)
- return (-1);
-
- /*
- * Find the symbol table entry and it's corresponding
- * string table entry. Version 1.1 of the ABI states
- * that there is only one symbol table but that this
- * could change in the future.
- */
- for (i = 0; i < ehdr.e_shnum; i++) {
- if (shdr[i].sh_type == SHT_SYMTAB) {
- symoff = shdr[i].sh_offset;
- symsize = shdr[i].sh_size;
- symstroff = shdr[shdr[i].sh_link].sh_offset;
- symstrsize = shdr[shdr[i].sh_link].sh_size;
- break;
- }
- }
-
- /* Flush the section header table */
- munmap((caddr_t)shdr, shdr_size);
-
- /* Check for files too large to mmap. */
- if (symstrsize > SIZE_T_MAX) {
- errno = EFBIG;
- return (-1);
- }
- /*
- * Map string table into our address space. This gives us
- * an easy way to randomly access all the strings, without
- * making the memory allocation permanent as with malloc/free
- * (i.e., munmap will return it to the system).
- */
- strtab = mmap(NULL, (size_t)symstrsize, PROT_READ, 0, fd,
- (off_t) symstroff);
- if (strtab == (char *)-1)
- return (-1);
-
- /*
- * clean out any left-over information for all valid entries.
- * Type and value defined to be 0 if not found; historical
- * versions cleared other and desc as well. Also figure out
- * the largest string length so don't read any more of the
- * string table than we have to.
- *
- * XXX clearing anything other than n_type and n_value violates
- * the semantics given in the man page.
- */
- nent = 0;
- for (p = list; !ISLAST(p); ++p) {
- p->n_type = 0;
- p->n_other = 0;
- p->n_desc = 0;
- p->n_value = 0;
- ++nent;
- }
-
- /* Don't process any further if object is stripped. */
- /* ELFism - dunno if stripped by looking at header */
- if (symoff == 0)
- goto done;
-
- if (lseek(fd, (off_t) symoff, SEEK_SET) == -1) {
- nent = -1;
- goto done;
- }
-
- while (symsize > 0) {
- cc = MIN(symsize, sizeof(sbuf));
- if (read(fd, sbuf, cc) != cc)
- break;
- symsize -= cc;
- for (s = sbuf; cc > 0; ++s, cc -= sizeof(*s)) {
- register int soff = s->st_name;
-
- if (soff == 0)
- continue;
- for (p = list; !ISLAST(p); p++) {
- if ((p->n_un.n_name[0] == '_' &&
- !strcmp(&strtab[soff], p->n_un.n_name+1))
- || !strcmp(&strtab[soff], p->n_un.n_name)) {
- p->n_value = s->st_value;
-
- /* XXX - type conversion */
- /* is pretty rude. */
- switch(ELF32_ST_TYPE(s->st_info)) {
- case STT_NOTYPE:
- p->n_type = N_UNDF;
- break;
- case STT_OBJECT:
- p->n_type = N_DATA;
- break;
- case STT_FUNC:
- p->n_type = N_TEXT;
- break;
- case STT_FILE:
- p->n_type = N_FN;
- break;
- }
- if (ELF32_ST_BIND(s->st_info) ==
- STB_LOCAL)
- p->n_type = N_EXT;
- p->n_desc = 0;
- p->n_other = 0;
- if (--nent <= 0)
- break;
- }
- }
- }
- }
- done:
- munmap(strtab, symstrsize);
-
- return (nent);
-}
-#endif /* _NLIST_DO_ELF */
diff --git a/lib/libc/gen/nrand48.c b/lib/libc/gen/nrand48.c
deleted file mode 100644
index 6c54065..0000000
--- a/lib/libc/gen/nrand48.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-long
-nrand48(unsigned short xseed[3])
-{
- _dorand48(xseed);
- return ((long) xseed[2] << 15) + ((long) xseed[1] >> 1);
-}
diff --git a/lib/libc/gen/ntp_gettime.c b/lib/libc/gen/ntp_gettime.c
deleted file mode 100644
index 1f18337..0000000
--- a/lib/libc/gen/ntp_gettime.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-#include <sys/time.h>
-#include <sys/timex.h>
-
-int
-ntp_gettime(struct ntptimeval *ntv)
-{
- int mib[3];
- struct ntptimeval tv;
- size_t size = sizeof tv;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_NTP_PLL;
- mib[2] = NTP_PLL_GETTIME;
- if (sysctl(mib, 3, &tv, &size, NULL, 0) == -1)
- return TIME_ERROR;
- if(ntv) *ntv = tv;
- return tv.time_state;
-}
-
diff --git a/lib/libc/gen/opendir.c b/lib/libc/gen/opendir.c
deleted file mode 100644
index 119791f..0000000
--- a/lib/libc/gen/opendir.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)opendir.c 8.8 (Berkeley) 5/1/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * Open a directory.
- */
-DIR *
-opendir(name)
- const char *name;
-{
-
- return (__opendir2(name, DTF_HIDEW|DTF_NODUP));
-}
-
-DIR *
-__opendir2(name, flags)
- const char *name;
- int flags;
-{
- DIR *dirp;
- int fd;
- int incr;
- int saved_errno;
- int unionstack;
- struct stat statb;
-
- /*
- * stat() before open() because opening of special files may be
- * harmful. fstat() after open because the file may have changed.
- */
- if (stat(name, &statb) != 0)
- return (NULL);
- if (!S_ISDIR(statb.st_mode)) {
- errno = ENOTDIR;
- return (NULL);
- }
- if ((fd = open(name, O_RDONLY | O_NONBLOCK)) == -1)
- return (NULL);
- dirp = NULL;
- if (fstat(fd, &statb) != 0)
- goto fail;
- if (!S_ISDIR(statb.st_mode)) {
- errno = ENOTDIR;
- goto fail;
- }
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 ||
- (dirp = malloc(sizeof(DIR))) == NULL)
- goto fail;
-
- /*
- * Use the system page size if that is a multiple of DIRBLKSIZ.
- * Hopefully this can be a big win someday by allowing page
- * trades to user space to be done by getdirentries().
- */
- incr = getpagesize();
- if ((incr % DIRBLKSIZ) != 0)
- incr = DIRBLKSIZ;
-
- /*
- * Determine whether this directory is the top of a union stack.
- */
- if (flags & DTF_NODUP) {
- struct statfs sfb;
-
- if (fstatfs(fd, &sfb) < 0)
- goto fail;
- unionstack = !strcmp(sfb.f_fstypename, "union");
- } else {
- unionstack = 0;
- }
-
- if (unionstack) {
- int len = 0;
- int space = 0;
- char *buf = 0;
- char *ddptr = 0;
- char *ddeptr;
- int n;
- struct dirent **dpv;
-
- /*
- * The strategy here is to read all the directory
- * entries into a buffer, sort the buffer, and
- * remove duplicate entries by setting the inode
- * number to zero.
- */
-
- do {
- /*
- * Always make at least DIRBLKSIZ bytes
- * available to getdirentries
- */
- if (space < DIRBLKSIZ) {
- space += incr;
- len += incr;
- buf = realloc(buf, len);
- if (buf == NULL)
- goto fail;
- ddptr = buf + (len - space);
- }
-
- n = getdirentries(fd, ddptr, space, &dirp->dd_seek);
- if (n > 0) {
- ddptr += n;
- space -= n;
- }
- } while (n > 0);
-
- ddeptr = ddptr;
- flags |= __DTF_READALL;
-
- /*
- * Re-open the directory.
- * This has the effect of rewinding back to the
- * top of the union stack and is needed by
- * programs which plan to fchdir to a descriptor
- * which has also been read -- see fts.c.
- */
- if (flags & DTF_REWIND) {
- (void) close(fd);
- if ((fd = open(name, O_RDONLY)) == -1) {
- saved_errno = errno;
- free(buf);
- free(dirp);
- errno = saved_errno;
- return (NULL);
- }
- }
-
- /*
- * There is now a buffer full of (possibly) duplicate
- * names.
- */
- dirp->dd_buf = buf;
-
- /*
- * Go round this loop twice...
- *
- * Scan through the buffer, counting entries.
- * On the second pass, save pointers to each one.
- * Then sort the pointers and remove duplicate names.
- */
- for (dpv = 0;;) {
- n = 0;
- ddptr = buf;
- while (ddptr < ddeptr) {
- struct dirent *dp;
-
- dp = (struct dirent *) ddptr;
- if ((int)dp & 03)
- break;
- if ((dp->d_reclen <= 0) ||
- (dp->d_reclen > (ddeptr + 1 - ddptr)))
- break;
- ddptr += dp->d_reclen;
- if (dp->d_fileno) {
- if (dpv)
- dpv[n] = dp;
- n++;
- }
- }
-
- if (dpv) {
- struct dirent *xp;
-
- /*
- * This sort must be stable.
- */
- mergesort(dpv, n, sizeof(*dpv), alphasort);
-
- dpv[n] = NULL;
- xp = NULL;
-
- /*
- * Scan through the buffer in sort order,
- * zapping the inode number of any
- * duplicate names.
- */
- for (n = 0; dpv[n]; n++) {
- struct dirent *dp = dpv[n];
-
- if ((xp == NULL) ||
- strcmp(dp->d_name, xp->d_name)) {
- xp = dp;
- } else {
- dp->d_fileno = 0;
- }
- if (dp->d_type == DT_WHT &&
- (flags & DTF_HIDEW))
- dp->d_fileno = 0;
- }
-
- free(dpv);
- break;
- } else {
- dpv = malloc((n+1) * sizeof(struct dirent *));
- if (dpv == NULL)
- break;
- }
- }
-
- dirp->dd_len = len;
- dirp->dd_size = ddptr - dirp->dd_buf;
- } else {
- dirp->dd_len = incr;
- dirp->dd_buf = malloc(dirp->dd_len);
- if (dirp->dd_buf == NULL)
- goto fail;
- dirp->dd_seek = 0;
- flags &= ~DTF_REWIND;
- }
-
- dirp->dd_loc = 0;
- dirp->dd_fd = fd;
- dirp->dd_flags = flags;
-
- /*
- * Set up seek point for rewinddir.
- */
- dirp->dd_rewind = telldir(dirp);
-
- return (dirp);
-
-fail:
- saved_errno = errno;
- free(dirp);
- (void) close(fd);
- errno = saved_errno;
- return (NULL);
-}
diff --git a/lib/libc/gen/pause.3 b/lib/libc/gen/pause.3
deleted file mode 100644
index 962c6cb..0000000
--- a/lib/libc/gen/pause.3
+++ /dev/null
@@ -1,84 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)pause.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt PAUSE 3
-.Os BSD 4
-.Sh NAME
-.Nm pause
-.Nd stop until signal
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn pause void
-.Sh DESCRIPTION
-.Sy Pause is made obsolete by
-.Xr sigsuspend 2 .
-.Pp
-The
-.Fn pause
-function
-forces a process to pause until
-a signal is received from either the
-.Xr kill 2
-function
-or an interval timer.
-(See
-.Xr setitimer 2 . )
-Upon termination of a signal handler started during a
-.Fn pause ,
-the
-.Fn pause
-call will return.
-.Sh RETURN VALUES
-Always returns \-1.
-.Sh ERRORS
-The
-.Fn pause
-function
-always returns:
-.Bl -tag -width [EINTR]
-.It Bq Er EINTR
-The call was interrupted.
-.El
-.Sh SEE ALSO
-.Xr kill 2 ,
-.Xr select 2 ,
-.Xr sigsuspend 2
-.Sh HISTORY
-A
-.Fn pause
-syscall
-appeared in
-.At v6 .
diff --git a/lib/libc/gen/pause.c b/lib/libc/gen/pause.c
deleted file mode 100644
index 9cbe467..0000000
--- a/lib/libc/gen/pause.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)pause.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <signal.h>
-#include <unistd.h>
-
-/*
- * Backwards compatible pause.
- */
-int
-pause()
-{
-
- return sigpause(sigblock(0L));
-}
diff --git a/lib/libc/gen/popen.3 b/lib/libc/gen/popen.3
deleted file mode 100644
index 2d2856b..0000000
--- a/lib/libc/gen/popen.3
+++ /dev/null
@@ -1,192 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)popen.3 8.2 (Berkeley) 5/3/95
-.\"
-.Dd May 3, 1995
-.Dt POPEN 3
-.Os
-.Sh NAME
-.Nm popen ,
-.Nm pclose
-.Nd process
-.Tn I/O
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft FILE *
-.Fn popen "const char *command" "const char *type"
-.Ft int
-.Fn pclose "FILE *stream"
-.Sh DESCRIPTION
-The
-.Fn popen
-function
-.Dq opens
-a process by creating a bidirectional pipe
-forking,
-and invoking the shell.
-Historically,
-.Nm popen
-was implemented with a unidirectional pipe;
-hence many implementations of
-.Nm popen
-only allow the
-.Fa type
-argument to specify reading or writing, not both.
-Since
-.Nm popen
-is now implemented using a bidirectional pipe, the
-.Fa type
-argument may request a bidirectional data flow.
-The
-.Fa type
-argument is a pointer to a null-terminated string
-which must be
-.Ql r
-for reading,
-.Ql w
-for writing, or
-.Ql r+
-for reading and writing.
-.Pp
-The
-.Fa command
-argument is a pointer to a null-terminated string
-containing a shell command line.
-This command is passed to
-.Pa /bin/sh
-using the
-.Fl c
-flag; interpretation, if any, is performed by the shell.
-.Pp
-The return value from
-.Fn popen
-is a normal standard
-.Tn I/O
-stream in all respects
-save that it must be closed with
-.Fn pclose
-rather than
-.Fn fclose .
-Writing to such a stream
-writes to the standard input of the command;
-the command's standard output is the same as that of the process that called
-.Fn popen ,
-unless this is altered by the command itself.
-Conversely, reading from a
-.Dq popened
-stream reads the command's standard output, and
-the command's standard input is the same as that of the process that called
-.Fn popen .
-.Pp
-Note that output
-.Fn popen
-streams are fully buffered by default.
-.Pp
-The
-.Fn pclose
-function waits for the associated process to terminate
-and returns the exit status of the command
-as returned by
-.Fn wait4 .
-.Sh RETURN VALUE
-The
-.Fn popen
-function returns
-.Dv NULL
-if the
-.Xr fork 2
-or
-.Xr pipe 2
-calls fail,
-or if it cannot allocate memory.
-.Pp
-The
-.Fn pclose
-function
-returns \-1 if
-.Fa stream
-is not associated with a
-.Dq popened
-command, if
-.Fa stream
-already
-.Dq pclosed ,
-or if
-.Xr wait4
-returns an error.
-.Sh ERRORS
-The
-.Fn popen
-function does not reliably set
-.Va errno .
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr fork 2 ,
-.Xr pipe 2 ,
-.Xr wait4 2 ,
-.Xr fclose 3 ,
-.Xr fflush 3 ,
-.Xr fopen 3 ,
-.Xr stdio 3 ,
-.Xr system 3
-.Sh BUGS
-Since the standard input of a command opened for reading
-shares its seek offset with the process that called
-.Fn popen ,
-if the original process has done a buffered read,
-the command's input position may not be as expected.
-Similarly, the output from a command opened for writing
-may become intermingled with that of the original process.
-The latter can be avoided by calling
-.Xr fflush 3
-before
-.Fn popen .
-.Pp
-Failure to execute the shell
-is indistinguishable from the shell's failure to execute command,
-or an immediate exit of the command.
-The only hint is an exit status of 127.
-.Pp
-The
-.Fn popen
-argument
-always calls
-.Xr sh 1 ,
-never calls
-.Xr csh 1 .
-.Sh HISTORY
-A
-.Fn popen
-and a
-.Fn pclose
-function appeared in
-.At v7 .
diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c
deleted file mode 100644
index 8cb7950..0000000
--- a/lib/libc/gen/popen.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software written by Ken Arnold and
- * published in UNIX Review, Vol. 6, No. 8.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)popen.c 8.3 (Berkeley) 5/3/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/wait.h>
-
-#include <signal.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-
-static struct pid {
- struct pid *next;
- FILE *fp;
- pid_t pid;
-} *pidlist;
-
-FILE *
-popen(command, type)
- const char *command, *type;
-{
- struct pid *cur;
- FILE *iop;
- int pdes[2], pid, twoway;
-
- /*
- * Lite2 introduced two-way popen() pipes using socketpair().
- * FreeBSD's pipe() is bidirectional, so we use that.
- */
- if (strchr(type, '+')) {
- twoway = 1;
- type = "r+";
- } else {
- twoway = 0;
- if ((*type != 'r' && *type != 'w') || type[1])
- return (NULL);
- }
- if (pipe(pdes) < 0)
- return (NULL);
-
- if ((cur = malloc(sizeof(struct pid))) == NULL) {
- (void)close(pdes[0]);
- (void)close(pdes[1]);
- return (NULL);
- }
-
- switch (pid = vfork()) {
- case -1: /* Error. */
- (void)close(pdes[0]);
- (void)close(pdes[1]);
- free(cur);
- return (NULL);
- /* NOTREACHED */
- case 0: /* Child. */
- if (*type == 'r') {
- /*
- * The dup2() to STDIN_FILENO is repeated to avoid
- * writing to pdes[1], which might corrupt the
- * parent's copy. This isn't good enough in
- * general, since the _exit() is no return, so
- * the compiler is free to corrupt all the local
- * variables.
- */
- (void) close(pdes[0]);
- if (pdes[1] != STDOUT_FILENO) {
- (void)dup2(pdes[1], STDOUT_FILENO);
- (void)close(pdes[1]);
- if (twoway)
- (void)dup2(STDOUT_FILENO, STDIN_FILENO);
- } else if (twoway && (pdes[1] != STDIN_FILENO))
- (void)dup2(pdes[1], STDIN_FILENO);
- } else {
- if (pdes[0] != STDIN_FILENO) {
- (void)dup2(pdes[0], STDIN_FILENO);
- (void)close(pdes[0]);
- }
- (void)close(pdes[1]);
- }
- execl(_PATH_BSHELL, "sh", "-c", command, NULL);
- _exit(127);
- /* NOTREACHED */
- }
-
- /* Parent; assume fdopen can't fail. */
- if (*type == 'r') {
- iop = fdopen(pdes[0], type);
- (void)close(pdes[1]);
- } else {
- iop = fdopen(pdes[1], type);
- (void)close(pdes[0]);
- }
-
- /* Link into list of file descriptors. */
- cur->fp = iop;
- cur->pid = pid;
- cur->next = pidlist;
- pidlist = cur;
-
- return (iop);
-}
-
-/*
- * pclose --
- * Pclose returns -1 if stream is not associated with a `popened' command,
- * if already `pclosed', or waitpid returns an error.
- */
-int
-pclose(iop)
- FILE *iop;
-{
- register struct pid *cur, *last;
- int omask;
- int pstat;
- pid_t pid;
-
- /* Find the appropriate file pointer. */
- for (last = NULL, cur = pidlist; cur; last = cur, cur = cur->next)
- if (cur->fp == iop)
- break;
- if (cur == NULL)
- return (-1);
-
- (void)fclose(iop);
-
- do {
- pid = waitpid(cur->pid, &pstat, 0);
- } while (pid == -1 && errno == EINTR);
-
- /* Remove the entry from the linked list. */
- if (last == NULL)
- pidlist = cur->next;
- else
- last->next = cur->next;
- free(cur);
-
- return (pid == -1 ? -1 : pstat);
-}
diff --git a/lib/libc/gen/psignal.3 b/lib/libc/gen/psignal.3
deleted file mode 100644
index 773759c..0000000
--- a/lib/libc/gen/psignal.3
+++ /dev/null
@@ -1,92 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)psignal.3 8.2 (Berkeley) 2/27/95
-.\"
-.Dd February 27, 1995
-.Dt PSIGNAL 3
-.Os BSD 4.2
-.Sh NAME
-.Nm psignal ,
-.Nm sys_siglist ,
-.Nm sys_signame
-.Nd system signal messages
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft void
-.Fn psignal "unsigned sig" "const char *s"
-.Vt extern const char * const sys_siglist[];
-.Vt extern const char * const sys_signame[];
-.Sh DESCRIPTION
-The
-.Fn psignal
-function locates the descriptive message
-string for the given signal number
-.Fa sig
-and writes it to the standard error.
-.Pp
-If the argument
-.Fa s
-is
-.Pf non- Dv NULL
-it is written to the standard error file descriptor
-prior to the message string,
-immediately followed by a colon and a space.
-If the signal number is not recognized
-.Pq Xr sigaction 2 ,
-the string
-.Dq "Unknown signal
-is produced.
-.Pp
-The message strings can be accessed directly
-through the external array
-.Va sys_siglist ,
-indexed by recognized signal numbers.
-The external array
-.Va sys_signame
-is used similarly and
-contains short, lower-case abbreviations for signals
-which are useful for recognizing signal names
-in user input.
-The defined variable
-.Dv NSIG
-contains a count of the strings in
-.Va sys_siglist
-and
-.Va sys_signame .
-.Sh SEE ALSO
-.Xr sigaction 2 ,
-.Xr perror 3
-.Sh HISTORY
-The
-.Fn psignal
-function appeared in
-.Bx 4.2 .
diff --git a/lib/libc/gen/psignal.c b/lib/libc/gen/psignal.c
deleted file mode 100644
index b7e7ab6..0000000
--- a/lib/libc/gen/psignal.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)psignal.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Print the name of the signal indicated
- * along with the supplied message.
- */
-#include <signal.h>
-#include <string.h>
-#include <unistd.h>
-
-void
-psignal(sig, s)
- unsigned int sig;
- const char *s;
-{
- register const char *c;
- register int n;
-
- if (sig < NSIG)
- c = sys_siglist[sig];
- else
- c = "Unknown signal";
- n = strlen(s);
- if (n) {
- (void)write(STDERR_FILENO, s, n);
- (void)write(STDERR_FILENO, ": ", 2);
- }
- (void)write(STDERR_FILENO, c, strlen(c));
- (void)write(STDERR_FILENO, "\n", 1);
-}
diff --git a/lib/libc/gen/pw_scan.c b/lib/libc/gen/pw_scan.c
deleted file mode 100644
index d474786..0000000
--- a/lib/libc/gen/pw_scan.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)pw_scan.c 8.3 (Berkeley) 4/2/94";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* not lint */
-
-/*
- * This module is used to "verify" password entries by chpass(1) and
- * pwd_mkdb(8).
- */
-
-#include <sys/param.h>
-
-#include <err.h>
-#include <fcntl.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include "pw_scan.h"
-
-int
-pw_scan(bp, pw)
- char *bp;
- struct passwd *pw;
-{
- long id;
- int root;
- char *p, *sh;
-
- pw->pw_fields = 0;
- if (!(pw->pw_name = strsep(&bp, ":"))) /* login */
- goto fmt;
- root = !strcmp(pw->pw_name, "root");
- if(pw->pw_name[0] && (pw->pw_name[0] != '+' || pw->pw_name[1] == '\0'))
- pw->pw_fields |= _PWF_NAME;
-
- if (!(pw->pw_passwd = strsep(&bp, ":"))) /* passwd */
- goto fmt;
- if(pw->pw_passwd[0]) pw->pw_fields |= _PWF_PASSWD;
-
- if (!(p = strsep(&bp, ":"))) /* uid */
- goto fmt;
- if(p[0]) pw->pw_fields |= _PWF_UID;
- id = atol(p);
- if (root && id) {
- warnx("root uid should be 0");
- return (0);
- }
- if (id > USHRT_MAX) {
- warnx("%s > max uid value (%d)", p, USHRT_MAX);
- /*return (0);*/ /* THIS SHOULD NOT BE FATAL! */
- }
- pw->pw_uid = id;
-
- if (!(p = strsep(&bp, ":"))) /* gid */
- goto fmt;
- if(p[0]) pw->pw_fields |= _PWF_GID;
- id = atol(p);
- if (id > USHRT_MAX) {
- warnx("%s > max gid value (%d)", p, USHRT_MAX);
- /* return (0); This should not be fatal! */
- }
- pw->pw_gid = id;
-
- pw->pw_class = strsep(&bp, ":"); /* class */
- if(pw->pw_class[0]) pw->pw_fields |= _PWF_CLASS;
-
- if (!(p = strsep(&bp, ":"))) /* change */
- goto fmt;
- if(p[0]) pw->pw_fields |= _PWF_CHANGE;
- pw->pw_change = atol(p);
-
- if (!(p = strsep(&bp, ":"))) /* expire */
- goto fmt;
- if(p[0]) pw->pw_fields |= _PWF_EXPIRE;
- pw->pw_expire = atol(p);
-
- if (!(pw->pw_gecos = strsep(&bp, ":"))) /* gecos */
- goto fmt;
- if(pw->pw_gecos[0]) pw->pw_fields |= _PWF_GECOS;
-
- if (!(pw->pw_dir = strsep(&bp, ":"))) /* directory */
- goto fmt;
- if(pw->pw_dir[0]) pw->pw_fields |= _PWF_DIR;
-
- if (!(pw->pw_shell = strsep(&bp, ":"))) /* shell */
- goto fmt;
-
- p = pw->pw_shell;
- if (root && *p) /* empty == /bin/sh */
- for (setusershell();;) {
- if (!(sh = getusershell())) {
- warnx("warning, unknown root shell");
- break;
- }
- if (!strcmp(p, sh))
- break;
- }
- if(p[0]) pw->pw_fields |= _PWF_SHELL;
-
- if ((p = strsep(&bp, ":"))) { /* too many */
-fmt: warnx("corrupted entry");
- return (0);
- }
- return (1);
-}
diff --git a/lib/libc/gen/pw_scan.h b/lib/libc/gen/pw_scan.h
deleted file mode 100644
index d1d4bc1..0000000
--- a/lib/libc/gen/pw_scan.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * Copyright (c) 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)pw_scan.h 8.1 (Berkeley) 4/1/94
- */
-
-extern int pw_scan __P((char *, struct passwd *));
diff --git a/lib/libc/gen/pwcache.3 b/lib/libc/gen/pwcache.3
deleted file mode 100644
index e44b5ef..0000000
--- a/lib/libc/gen/pwcache.3
+++ /dev/null
@@ -1,94 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)pwcache.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt PWCACHE 3
-.Os
-.Sh NAME
-.Nm pwcache
-.Nd cache password and group entries
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft char *
-.Fn user_from_uid "unsigned long uid" "int nouser"
-.Ft char *
-.Fn group_from_gid "unsigned long gid" "int nogroup"
-.Sh DESCRIPTION
-.Pp
-The
-.Fn user_from_uid
-function returns the user name associated with the argument
-.Fa uid .
-The user name is cached so that multiple calls with the same
-.Fa uid
-do not require additional calls to
-.Xr getpwuid 3 .
-If there is no user associated with the
-.Fa uid ,
-a pointer is returned
-to a string representation of the
-.Fa uid ,
-unless the argument
-.Fa nouser
-is non-zero, in which case a
-.Dv NULL
-pointer is returned.
-.Pp
-The
-.Fn group_from_gid
-function returns the group name associated with the argument
-.Fa gid .
-The group name is cached so that multiple calls with the same
-.Fa gid
-do not require additional calls to
-.Xr getgrgid 3 .
-If there is no group associated with the
-.Fa gid ,
-a pointer is returned
-to a string representation of the
-.Fa gid ,
-unless the argument
-.Fa nogroup
-is non-zero, in which case a
-.Dv NULL
-pointer is returned.
-.Sh SEE ALSO
-.Xr getgrgid 3 ,
-.Xr getpwuid 3
-.Sh HISTORY
-The
-.Fn user_from_uid
-and
-.Fn group_from_gid
-functions first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/pwcache.c b/lib/libc/gen/pwcache.c
deleted file mode 100644
index aea7f55..0000000
--- a/lib/libc/gen/pwcache.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)pwcache.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <grp.h>
-#include <string.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <utmp.h>
-
-#define NCACHE 64 /* power of 2 */
-#define MASK (NCACHE - 1) /* bits to store with */
-
-char *
-user_from_uid(uid, nouser)
- uid_t uid;
- int nouser;
-{
- static struct ncache {
- uid_t uid;
- int found;
- char name[UT_NAMESIZE + 1];
- } c_uid[NCACHE];
- static int pwopen;
- register struct passwd *pw;
- register struct ncache *cp;
-
- cp = c_uid + (uid & MASK);
- if (cp->uid != uid || !*cp->name) {
- if (pwopen == 0) {
- setpassent(1);
- pwopen = 1;
- }
- pw = getpwuid(uid);
- cp->uid = uid;
- if (pw != NULL) {
- cp->found = 1;
- (void)strncpy(cp->name, pw->pw_name, UT_NAMESIZE);
- cp->name[UT_NAMESIZE] = '\0';
- } else {
- cp->found = 0;
- (void)snprintf(cp->name, UT_NAMESIZE, "%u", uid);
- if (nouser)
- return (NULL);
- }
- }
- return ((nouser && !cp->found) ? NULL : cp->name);
-}
-
-char *
-group_from_gid(gid, nogroup)
- gid_t gid;
- int nogroup;
-{
- static struct ncache {
- gid_t gid;
- int found;
- char name[UT_NAMESIZE + 1];
- } c_gid[NCACHE];
- static int gropen;
- struct group *gr;
- struct ncache *cp;
-
- cp = c_gid + (gid & MASK);
- if (cp->gid != gid || !*cp->name) {
- if (gropen == 0) {
- setgroupent(1);
- gropen = 1;
- }
- gr = getgrgid(gid);
- cp->gid = gid;
- if (gr != NULL) {
- cp->found = 1;
- (void)strncpy(cp->name, gr->gr_name, UT_NAMESIZE);
- cp->name[UT_NAMESIZE] = '\0';
- } else {
- cp->found = 0;
- (void)snprintf(cp->name, UT_NAMESIZE, "%u", gid);
- if (nogroup)
- return (NULL);
- }
- }
- return ((nogroup && !cp->found) ? NULL : cp->name);
-}
diff --git a/lib/libc/gen/raise.3 b/lib/libc/gen/raise.3
deleted file mode 100644
index 9df3124..0000000
--- a/lib/libc/gen/raise.3
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)raise.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt RAISE 3
-.Os
-.Sh NAME
-.Nm raise
-.Nd send a signal to the current process
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft int
-.Fn raise "int sig"
-.Sh DESCRIPTION
-The
-.Fn raise
-function sends the signal
-.Fa sig
-to the current process.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn raise
-function
-may fail and set
-.Va errno
-for any of the errors specified for the
-library functions
-.Xr getpid 2
-and
-.Xr kill 2 .
-.Sh SEE ALSO
-.Xr kill 2
-.Sh STANDARDS
-The
-.Fn raise
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/gen/raise.c b/lib/libc/gen/raise.c
deleted file mode 100644
index 2562c81..0000000
--- a/lib/libc/gen/raise.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)raise.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <signal.h>
-#include <unistd.h>
-
-int
-raise(s)
- int s;
-{
- return(kill(getpid(), s));
-}
diff --git a/lib/libc/gen/rand48.3 b/lib/libc/gen/rand48.3
deleted file mode 100644
index 356f2f3..0000000
--- a/lib/libc/gen/rand48.3
+++ /dev/null
@@ -1,160 +0,0 @@
-\" Copyright (c) 1993 Martin Birgmeier
-.\" All rights reserved.
-.\"
-.\" You may redistribute unmodified or modified versions of this source
-.\" code provided that the above copyright notice and this and the
-.\" following conditions are retained.
-.\"
-.\" This software is provided ``as is'', and comes with no warranties
-.\" of any kind. I shall in no event be liable for anything that happens
-.\" to anyone/anything when using this software.
-.\"
-.\" @(#)rand48.3 V1.0 MB 8 Oct 1993
-.\"
-.Dd October 8, 1993
-.Dt RAND48 3
-.Os FreeBSD
-.Sh NAME
-.Nm drand48 ,
-.Nm erand48 ,
-.Nm lrand48 ,
-.Nm nrand48 ,
-.Nm mrand48 ,
-.Nm jrand48 ,
-.Nm srand48 ,
-.Nm seed48 ,
-.Nm lcong48
-.Nd pseudo random number generators and initialization routines
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft double
-.Fn drand48 void
-.Ft double
-.Fn erand48 "unsigned short xseed[3]"
-.Ft long
-.Fn lrand48 void
-.Ft long
-.Fn nrand48 "unsigned short xseed[3]"
-.Ft long
-.Fn mrand48 void
-.Ft long
-.Fn jrand48 "unsigned short xseed[3]"
-.Ft void
-.Fn srand48 "long seed"
-.Ft "unsigned short *"
-.Fn seed48 "unsigned short xseed[3]"
-.Ft void
-.Fn lcong48 "unsigned short p[7]"
-.Sh DESCRIPTION
-The
-.Fn rand48
-family of functions generates pseudo-random numbers using a linear
-congruential algorithm working on integers 48 bits in size. The
-particular formula employed is
-r(n+1) = (a * r(n) + c) mod m
-where the default values are
-for the multiplicand a = 0xfdeece66d = 25214903917 and
-the addend c = 0xb = 11. The modulo is always fixed at m = 2 ** 48.
-r(n) is called the seed of the random number generator.
-.Pp
-For all the six generator routines described next, the first
-computational step is to perform a single iteration of the algorithm.
-.Pp
-.Fn drand48
-and
-.Fn erand48
-return values of type double. The full 48 bits of r(n+1) are
-loaded into the mantissa of the returned value, with the exponent set
-such that the values produced lie in the interval [0.0, 1.0).
-.Pp
-.Fn lrand48
-and
-.Fn nrand48
-return values of type long in the range
-[0, 2**31-1]. The high-order (31) bits of
-r(n+1) are loaded into the lower bits of the returned value, with
-the topmost (sign) bit set to zero.
-.Pp
-.Fn mrand48
-and
-.Fn jrand48
-return values of type long in the range
-[-2**31, 2**31-1]. The high-order (32) bits of
-r(n+1) are loaded into the returned value.
-.Pp
-.Fn drand48 ,
-.Fn lrand48 ,
-and
-.Fn mrand48
-use an internal buffer to store r(n). For these functions
-the initial value of r(0) = 0x1234abcd330e = 20017429951246.
-.Pp
-On the other hand,
-.Fn erand48 ,
-.Fn nrand48 ,
-and
-.Fn jrand48
-use a user-supplied buffer to store the seed r(n),
-which consists of an array of 3 shorts, where the zeroth member
-holds the least significant bits.
-.Pp
-All functions share the same multiplicand and addend.
-.Pp
-.Fn srand48
-is used to initialize the internal buffer r(n) of
-.Fn drand48 ,
-.Fn lrand48 ,
-and
-.Fn mrand48
-such that the 32 bits of the seed value are copied into the upper 32 bits
-of r(n), with the lower 16 bits of r(n) arbitrarily being set to 0x330e.
-Additionally, the constant multiplicand and addend of the algorithm are
-reset to the default values given above.
-.Pp
-.Fn seed48
-also initializes the internal buffer r(n) of
-.Fn drand48 ,
-.Fn lrand48 ,
-and
-.Fn mrand48 ,
-but here all 48 bits of the seed can be specified in an array of 3 shorts,
-where the zeroth member specifies the lowest bits. Again,
-the constant multiplicand and addend of the algorithm are
-reset to the default values given above.
-.Fn seed48
-returns a pointer to an array of 3 shorts which contains the old seed.
-This array is statically allocated, thus its contents are lost after
-each new call to
-.Fn seed48 .
-.Pp
-Finally,
-.Fn lcong48
-allows full control over the multiplicand and addend used in
-.Fn drand48 ,
-.Fn erand48 ,
-.Fn lrand48 ,
-.Fn nrand48 ,
-.Fn mrand48 ,
-and
-.Fn jrand48 ,
-and the seed used in
-.Fn drand48 ,
-.Fn lrand48 ,
-and
-.Fn mrand48 .
-An array of 7 shorts is passed as parameter; the first three shorts are
-used to initialize the seed; the second three are used to initialize the
-multiplicand; and the last short is used to initialize the addend.
-It is thus not possible to use values greater than 0xffff as the addend.
-.Pp
-Note that all three methods of seeding the random number generator
-always also set the multiplicand and addend for any of the six
-generator calls.
-.Pp
-For a more powerful random number generator, see
-.Xr random 3
-.Sh AUTHOR
-Martin Birgmeier
-.Sh SEE ALSO
-.Xr rand 3 ,
-.Xr random 3 .
diff --git a/lib/libc/gen/rand48.h b/lib/libc/gen/rand48.h
deleted file mode 100644
index 5b9f87d..0000000
--- a/lib/libc/gen/rand48.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#ifndef _RAND48_H_
-#define _RAND48_H_
-
-#include <math.h>
-#include <stdlib.h>
-
-void _dorand48 __P((unsigned short[3]));
-
-#define RAND48_SEED_0 (0x330e)
-#define RAND48_SEED_1 (0xabcd)
-#define RAND48_SEED_2 (0x1234)
-#define RAND48_MULT_0 (0xe66d)
-#define RAND48_MULT_1 (0xdeec)
-#define RAND48_MULT_2 (0x0005)
-#define RAND48_ADD (0x000b)
-
-#endif /* _RAND48_H_ */
diff --git a/lib/libc/gen/readdir.c b/lib/libc/gen/readdir.c
deleted file mode 100644
index 2e97661..0000000
--- a/lib/libc/gen/readdir.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)readdir.c 8.3 (Berkeley) 9/29/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <dirent.h>
-
-/*
- * get next entry in a directory.
- */
-struct dirent *
-readdir(dirp)
- register DIR *dirp;
-{
- register struct dirent *dp;
-
- for (;;) {
- if (dirp->dd_loc >= dirp->dd_size) {
- if (dirp->dd_flags & __DTF_READALL)
- return (NULL);
- dirp->dd_loc = 0;
- }
- if (dirp->dd_loc == 0 && !(dirp->dd_flags & __DTF_READALL)) {
- dirp->dd_size = getdirentries(dirp->dd_fd,
- dirp->dd_buf, dirp->dd_len, &dirp->dd_seek);
- if (dirp->dd_size <= 0)
- return (NULL);
- }
- dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
- if ((int)dp & 03) /* bogus pointer check */
- return (NULL);
- if (dp->d_reclen <= 0 ||
- dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc)
- return (NULL);
- dirp->dd_loc += dp->d_reclen;
- if (dp->d_ino == 0)
- continue;
- if (dp->d_type == DT_WHT && (dirp->dd_flags & DTF_HIDEW))
- continue;
- return (dp);
- }
-}
diff --git a/lib/libc/gen/rewinddir.c b/lib/libc/gen/rewinddir.c
deleted file mode 100644
index 2076ddd..0000000
--- a/lib/libc/gen/rewinddir.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rewinddir.c 8.1 (Berkeley) 6/8/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <dirent.h>
-
-extern void _seekdir __P(( DIR *, long ));
-
-void
-rewinddir(dirp)
- DIR *dirp;
-{
-
- _seekdir(dirp, dirp->dd_rewind);
- dirp->dd_rewind = telldir(dirp);
-}
diff --git a/lib/libc/gen/scandir.3 b/lib/libc/gen/scandir.3
deleted file mode 100644
index 49e15d1..0000000
--- a/lib/libc/gen/scandir.3
+++ /dev/null
@@ -1,106 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)scandir.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SCANDIR 3
-.Os BSD 4.2
-.Sh NAME
-.Nm scandir ,
-.Nm alphasort
-.Nd scan a directory
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <dirent.h>
-.Ft int
-.Fn scandir "const char *dirname" "struct dirent ***namelist" "int \\*(lp*select\\*(rp\\*(lpstruct dirent *\\*(rp" "int \\*(lp*compar\\*(rp\\*(lpconst void *, const void *\\*(rp"
-.Ft int
-.Fn alphasort "const void *d1" "const void *d2"
-.Sh DESCRIPTION
-The
-.Fn scandir
-function
-reads the directory
-.Fa dirname
-and builds an array of pointers to directory
-entries using
-.Xr malloc 3 .
-It returns the number of entries in the array.
-A pointer to the array of directory entries is stored in the location
-referenced by
-.Fa namelist .
-.Pp
-The
-.Fa select
-parameter is a pointer to a user supplied subroutine which is called by
-.Fn scandir
-to select which entries are to be included in the array.
-The select routine is passed a
-pointer to a directory entry and should return a non-zero
-value if the directory entry is to be included in the array.
-If
-.Fa select
-is null, then all the directory entries will be included.
-.Pp
-The
-.Fa compar
-parameter is a pointer to a user supplied subroutine which is passed to
-.Xr qsort 3
-to sort the completed array.
-If this pointer is null, the array is not sorted.
-.Pp
-The
-.Fn alphasort
-function
-is a routine which can be used for the
-.Fa compar
-parameter to sort the array alphabetically.
-.Pp
-The memory allocated for the array can be deallocated with
-.Xr free 3 ,
-by freeing each pointer in the array and then the array itself.
-.Sh DIAGNOSTICS
-Returns \-1 if the directory cannot be opened for reading or if
-.Xr malloc 3
-cannot allocate enough memory to hold all the data structures.
-.Sh SEE ALSO
-.Xr directory 3 ,
-.Xr malloc 3 ,
-.Xr qsort 3 ,
-.Xr dir 5
-.Sh HISTORY
-The
-.Fn scandir
-and
-.Fn alphasort
-functions appeared in
-.Bx 4.2 .
diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c
deleted file mode 100644
index e6e8408..0000000
--- a/lib/libc/gen/scandir.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)scandir.c 8.3 (Berkeley) 1/2/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Scan the directory dirname calling select to make a list of selected
- * directory entries then sort using qsort and compare routine dcomp.
- * Returns the number of entries and a pointer to a list of pointers to
- * struct dirent (through namelist). Returns -1 if there were any errors.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <string.h>
-
-/*
- * The DIRSIZ macro is the minimum record length which will hold the directory
- * entry. This requires the amount of space in struct dirent without the
- * d_name field, plus enough space for the name and a terminating nul byte
- * (dp->d_namlen + 1), rounded up to a 4 byte boundary.
- */
-#undef DIRSIZ
-#define DIRSIZ(dp) \
- ((sizeof(struct dirent) - sizeof(dp)->d_name) + \
- (((dp)->d_namlen + 1 + 3) &~ 3))
-
-int
-scandir(dirname, namelist, select, dcomp)
- const char *dirname;
- struct dirent ***namelist;
- int (*select) __P((struct dirent *));
- int (*dcomp) __P((const void *, const void *));
-{
- register struct dirent *d, *p, **names;
- register size_t nitems;
- struct stat stb;
- long arraysz;
- DIR *dirp;
-
- if ((dirp = opendir(dirname)) == NULL)
- return(-1);
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1);
-
- /*
- * estimate the array size by taking the size of the directory file
- * and dividing it by a multiple of the minimum size entry.
- */
- arraysz = (stb.st_size / 24);
- names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
-
- nitems = 0;
- while ((d = readdir(dirp)) != NULL) {
- if (select != NULL && !(*select)(d))
- continue; /* just selected names */
- /*
- * Make a minimum size copy of the data
- */
- p = (struct dirent *)malloc(DIRSIZ(d));
- if (p == NULL)
- return(-1);
- p->d_fileno = d->d_fileno;
- p->d_type = d->d_type;
- p->d_reclen = d->d_reclen;
- p->d_namlen = d->d_namlen;
- bcopy(d->d_name, p->d_name, p->d_namlen + 1);
- /*
- * Check to make sure the array has space left and
- * realloc the maximum size.
- */
- if (++nitems >= arraysz) {
- if (fstat(dirp->dd_fd, &stb) < 0)
- return(-1); /* just might have grown */
- arraysz = stb.st_size / 12;
- names = (struct dirent **)realloc((char *)names,
- arraysz * sizeof(struct dirent *));
- if (names == NULL)
- return(-1);
- }
- names[nitems-1] = p;
- }
- closedir(dirp);
- if (nitems && dcomp != NULL)
- qsort(names, nitems, sizeof(struct dirent *), dcomp);
- *namelist = names;
- return(nitems);
-}
-
-/*
- * Alphabetic order comparison routine for those who want it.
- */
-int
-alphasort(d1, d2)
- const void *d1;
- const void *d2;
-{
- return(strcmp((*(struct dirent **)d1)->d_name,
- (*(struct dirent **)d2)->d_name));
-}
diff --git a/lib/libc/gen/seed48.c b/lib/libc/gen/seed48.c
deleted file mode 100644
index 258c4ba..0000000
--- a/lib/libc/gen/seed48.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-extern unsigned short _rand48_seed[3];
-extern unsigned short _rand48_mult[3];
-extern unsigned short _rand48_add;
-
-unsigned short *
-seed48(unsigned short xseed[3])
-{
- static unsigned short sseed[3];
-
- sseed[0] = _rand48_seed[0];
- sseed[1] = _rand48_seed[1];
- sseed[2] = _rand48_seed[2];
- _rand48_seed[0] = xseed[0];
- _rand48_seed[1] = xseed[1];
- _rand48_seed[2] = xseed[2];
- _rand48_mult[0] = RAND48_MULT_0;
- _rand48_mult[1] = RAND48_MULT_1;
- _rand48_mult[2] = RAND48_MULT_2;
- _rand48_add = RAND48_ADD;
- return sseed;
-}
diff --git a/lib/libc/gen/seekdir.c b/lib/libc/gen/seekdir.c
deleted file mode 100644
index 1934bcc..0000000
--- a/lib/libc/gen/seekdir.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)seekdir.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <dirent.h>
-
-extern void _seekdir __P(( DIR *, long ));
-
-/*
- * Seek to an entry in a directory.
- * _seekdir is in telldir.c so that it can share opaque data structures.
- */
-void
-seekdir(dirp, loc)
- DIR *dirp;
- long loc;
-{
-
- _seekdir(dirp, loc);
-}
diff --git a/lib/libc/gen/semconfig.c b/lib/libc/gen/semconfig.c
deleted file mode 100644
index cf5399b..0000000
--- a/lib/libc/gen/semconfig.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-
-#if __STDC__
-int semconfig(int cmd, int p1, int p2, int p3)
-#else
-int semconfig(cmd, p1, p2, p3)
- int cmd, p1, p2, p3;
-#endif
-{
- return (semsys(3, cmd, p1, p2, p3));
-}
diff --git a/lib/libc/gen/semctl.c b/lib/libc/gen/semctl.c
deleted file mode 100644
index 313a1db..0000000
--- a/lib/libc/gen/semctl.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-
-#if __STDC__
-int semctl(int semid, int semnum, int cmd, union semun semun)
-#else
-int semctl(semid, int semnum, cmd, semun)
- int semid, semnum;
- int cmd;
- union semun semun;
-#endif
-{
- return (semsys(0, semid, semnum, cmd, &semun));
-}
diff --git a/lib/libc/gen/semget.c b/lib/libc/gen/semget.c
deleted file mode 100644
index 81c6a86..0000000
--- a/lib/libc/gen/semget.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-
-#if __STDC__
-int semget(key_t key, int nsems, int semflg)
-#else
-int semget(key, nsems, semflg)
- key_t key;
- int nsems;
- int semflg;
-#endif
-{
- return (semsys(1, key, nsems, semflg));
-}
diff --git a/lib/libc/gen/semop.c b/lib/libc/gen/semop.c
deleted file mode 100644
index 0b97c6a..0000000
--- a/lib/libc/gen/semop.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-
-#if __STDC__
-int semop(int semid, struct sembuf *sops, unsigned nsops)
-#else
-int semop(semid, sops, nsops)
- int semid;
- struct sembuf *sops;
- unsigned nsops;
-#endif
-{
- return (semsys(2, semid, sops, nsops, 0));
-}
diff --git a/lib/libc/gen/setdomainname.c b/lib/libc/gen/setdomainname.c
deleted file mode 100644
index b7021a5..0000000
--- a/lib/libc/gen/setdomainname.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*
-static char sccsid[] = "From: @(#)sethostname.c 8.1 (Berkeley) 6/4/93";
-*/
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-#include <unistd.h>
-
-int
-setdomainname(const char *name, int namelen)
-{
- int mib[2];
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_NISDOMAINNAME;
- if (sysctl(mib, 2, NULL, NULL, (void *)name, namelen) == -1)
- return (-1);
- return (0);
-}
diff --git a/lib/libc/gen/setflags.c b/lib/libc/gen/setflags.c
deleted file mode 100644
index 1f22f5a..0000000
--- a/lib/libc/gen/setflags.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)stat_flags.c 8.1 (Berkeley) 5/31/93";
-#else
-static const char rcsid[] =
- "$Id: stat_flags.c,v 1.8 1997/08/07 22:28:25 steve Exp $";
-#endif
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <stddef.h>
-#include <string.h>
-
-#define SAPPEND(s) { \
- if (prefix != NULL) \
- (void)strcat(string, prefix); \
- (void)strcat(string, s); \
- prefix = ","; \
-}
-
-/*
- * flags_to_string --
- * Convert stat flags to a comma-separated string. If no flags
- * are set, return the default string.
- */
-char *
-flags_to_string(flags, def)
- u_long flags;
- char *def;
-{
- static char string[128];
- char *prefix;
-
- string[0] = '\0';
- prefix = NULL;
- if (flags & UF_APPEND)
- SAPPEND("uappnd");
- if (flags & UF_IMMUTABLE)
- SAPPEND("uchg");
-#ifdef UF_NOUNLINK
- if (flags & UF_NOUNLINK)
- SAPPEND("uunlnk");
-#endif
- if (flags & UF_NODUMP)
- SAPPEND("nodump");
- if (flags & UF_OPAQUE)
- SAPPEND("opaque");
- if (flags & SF_APPEND)
- SAPPEND("sappnd");
- if (flags & SF_ARCHIVED)
- SAPPEND("arch");
- if (flags & SF_IMMUTABLE)
- SAPPEND("schg");
-#ifdef SF_NOUNLINK
- if (flags & SF_NOUNLINK)
- SAPPEND("sunlnk");
-#endif
- return (prefix == NULL && def != NULL ? def : string);
-}
-
-#define TEST(a, b, f) { \
- if (!memcmp(a, b, sizeof(b))) { \
- if (clear) { \
- if (clrp) \
- *clrp |= (f); \
- } else if (setp) \
- *setp |= (f); \
- break; \
- } \
-}
-
-/*
- * string_to_flags --
- * Take string of arguments and return stat flags. Return 0 on
- * success, 1 on failure. On failure, stringp is set to point
- * to the offending token.
- */
-int
-string_to_flags(stringp, setp, clrp)
- char **stringp;
- u_long *setp, *clrp;
-{
- int clear;
- char *string, *p;
-
- clear = 0;
- if (setp)
- *setp = 0;
- if (clrp)
- *clrp = 0;
- string = *stringp;
- while ((p = strsep(&string, "\t ,")) != NULL) {
- *stringp = p;
- if (*p == '\0')
- continue;
- if (p[0] == 'n' && p[1] == 'o') {
- clear = 1;
- p += 2;
- }
- switch (p[0]) {
- case 'a':
- TEST(p, "arch", SF_ARCHIVED);
- TEST(p, "archived", SF_ARCHIVED);
- return (1);
- case 'd':
- clear = !clear;
- TEST(p, "dump", UF_NODUMP);
- return (1);
- case 'o':
- TEST(p, "opaque", UF_OPAQUE);
- return (1);
- case 's':
- TEST(p, "sappnd", SF_APPEND);
- TEST(p, "sappend", SF_APPEND);
- TEST(p, "schg", SF_IMMUTABLE);
- TEST(p, "schange", SF_IMMUTABLE);
- TEST(p, "simmutable", SF_IMMUTABLE);
-#ifdef SF_NOUNLINK
- TEST(p, "sunlnk", SF_NOUNLINK);
- TEST(p, "sunlink", SF_NOUNLINK);
-#endif
- return (1);
- case 'u':
- TEST(p, "uappnd", UF_APPEND);
- TEST(p, "uappend", UF_APPEND);
- TEST(p, "uchg", UF_IMMUTABLE);
- TEST(p, "uchange", UF_IMMUTABLE);
- TEST(p, "uimmutable", UF_IMMUTABLE);
-#ifdef UF_NOUNLINK
- TEST(p, "uunlnk", UF_NOUNLINK);
- TEST(p, "uunlink", UF_NOUNLINK);
-#endif
- /* FALLTHROUGH */
- default:
- return (1);
- }
- }
- return (0);
-}
diff --git a/lib/libc/gen/setflagsbyname.c b/lib/libc/gen/setflagsbyname.c
deleted file mode 100644
index 1f22f5a..0000000
--- a/lib/libc/gen/setflagsbyname.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)stat_flags.c 8.1 (Berkeley) 5/31/93";
-#else
-static const char rcsid[] =
- "$Id: stat_flags.c,v 1.8 1997/08/07 22:28:25 steve Exp $";
-#endif
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <stddef.h>
-#include <string.h>
-
-#define SAPPEND(s) { \
- if (prefix != NULL) \
- (void)strcat(string, prefix); \
- (void)strcat(string, s); \
- prefix = ","; \
-}
-
-/*
- * flags_to_string --
- * Convert stat flags to a comma-separated string. If no flags
- * are set, return the default string.
- */
-char *
-flags_to_string(flags, def)
- u_long flags;
- char *def;
-{
- static char string[128];
- char *prefix;
-
- string[0] = '\0';
- prefix = NULL;
- if (flags & UF_APPEND)
- SAPPEND("uappnd");
- if (flags & UF_IMMUTABLE)
- SAPPEND("uchg");
-#ifdef UF_NOUNLINK
- if (flags & UF_NOUNLINK)
- SAPPEND("uunlnk");
-#endif
- if (flags & UF_NODUMP)
- SAPPEND("nodump");
- if (flags & UF_OPAQUE)
- SAPPEND("opaque");
- if (flags & SF_APPEND)
- SAPPEND("sappnd");
- if (flags & SF_ARCHIVED)
- SAPPEND("arch");
- if (flags & SF_IMMUTABLE)
- SAPPEND("schg");
-#ifdef SF_NOUNLINK
- if (flags & SF_NOUNLINK)
- SAPPEND("sunlnk");
-#endif
- return (prefix == NULL && def != NULL ? def : string);
-}
-
-#define TEST(a, b, f) { \
- if (!memcmp(a, b, sizeof(b))) { \
- if (clear) { \
- if (clrp) \
- *clrp |= (f); \
- } else if (setp) \
- *setp |= (f); \
- break; \
- } \
-}
-
-/*
- * string_to_flags --
- * Take string of arguments and return stat flags. Return 0 on
- * success, 1 on failure. On failure, stringp is set to point
- * to the offending token.
- */
-int
-string_to_flags(stringp, setp, clrp)
- char **stringp;
- u_long *setp, *clrp;
-{
- int clear;
- char *string, *p;
-
- clear = 0;
- if (setp)
- *setp = 0;
- if (clrp)
- *clrp = 0;
- string = *stringp;
- while ((p = strsep(&string, "\t ,")) != NULL) {
- *stringp = p;
- if (*p == '\0')
- continue;
- if (p[0] == 'n' && p[1] == 'o') {
- clear = 1;
- p += 2;
- }
- switch (p[0]) {
- case 'a':
- TEST(p, "arch", SF_ARCHIVED);
- TEST(p, "archived", SF_ARCHIVED);
- return (1);
- case 'd':
- clear = !clear;
- TEST(p, "dump", UF_NODUMP);
- return (1);
- case 'o':
- TEST(p, "opaque", UF_OPAQUE);
- return (1);
- case 's':
- TEST(p, "sappnd", SF_APPEND);
- TEST(p, "sappend", SF_APPEND);
- TEST(p, "schg", SF_IMMUTABLE);
- TEST(p, "schange", SF_IMMUTABLE);
- TEST(p, "simmutable", SF_IMMUTABLE);
-#ifdef SF_NOUNLINK
- TEST(p, "sunlnk", SF_NOUNLINK);
- TEST(p, "sunlink", SF_NOUNLINK);
-#endif
- return (1);
- case 'u':
- TEST(p, "uappnd", UF_APPEND);
- TEST(p, "uappend", UF_APPEND);
- TEST(p, "uchg", UF_IMMUTABLE);
- TEST(p, "uchange", UF_IMMUTABLE);
- TEST(p, "uimmutable", UF_IMMUTABLE);
-#ifdef UF_NOUNLINK
- TEST(p, "uunlnk", UF_NOUNLINK);
- TEST(p, "uunlink", UF_NOUNLINK);
-#endif
- /* FALLTHROUGH */
- default:
- return (1);
- }
- }
- return (0);
-}
diff --git a/lib/libc/gen/sethostname.c b/lib/libc/gen/sethostname.c
deleted file mode 100644
index 6c3adc3..0000000
--- a/lib/libc/gen/sethostname.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)sethostname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-#if __STDC__
-int
-sethostname(const char *name, int namelen)
-#else
-int
-sethostname(name, namelen)
- char *name;
- int namelen;
-#endif
-{
- int mib[2];
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_HOSTNAME;
- if (sysctl(mib, 2, NULL, NULL, (void *)name, namelen) == -1)
- return (-1);
- return (0);
-}
diff --git a/lib/libc/gen/setjmp.3 b/lib/libc/gen/setjmp.3
deleted file mode 100644
index 3b5d89e..0000000
--- a/lib/libc/gen/setjmp.3
+++ /dev/null
@@ -1,173 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setjmp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SETJMP 3
-.Os BSD 4
-.Sh NAME
-.Nm sigsetjmp ,
-.Nm siglongjmp ,
-.Nm setjmp ,
-.Nm longjmp ,
-.Nm _setjmp ,
-.Nm _longjmp ,
-.Nm longjmperror
-.Nd non-local jumps
-.Sh SYNOPSIS
-.Fd #include <setjmp.h>
-.Ft int
-.Fn sigsetjmp "sigjmp_buf env" "int savemask"
-.Ft void
-.Fn siglongjmp "sigjmp_buf env" "int val"
-.Ft int
-.Fn setjmp "jmp_buf env"
-.Ft void
-.Fn longjmp "jmp_buf env" "int val"
-.Ft int
-.Fn _setjmp "jmp_buf env"
-.Ft void
-.Fn _longjmp "jmp_buf env" "int val"
-.Ft void
-.Fn longjmperror void
-.Sh DESCRIPTION
-The
-.Fn sigsetjmp ,
-.Fn setjmp ,
-and
-.Fn _setjmp
-functions save their calling environment in
-.Fa env .
-Each of these functions returns 0.
-.Pp
-The corresponding
-.Fn longjmp
-functions restore the environment saved by their most recent respective
-invocations
-of the
-.Fn setjmp
-function.
-They then return so that program execution continues as if the corresponding
-invocation of the
-.Fn setjmp
-call had just returned the value specified by
-.Fa val ,
-instead of 0.
-.Pp
-Pairs of calls may be intermixed, i.e. both
-.Fn sigsetjmp
-and
-.Fn siglongjmp
-and
-.Fn setjmp
-and
-.Fn longjmp
-combinations may be used in the same program, however, individual
-calls may not, e.g. the
-.Fa env
-argument to
-.Fn setjmp
-may not be passed to
-.Fn siglongjmp .
-.Pp
-The
-.Fn longjmp
-routines may not be called after the routine which called the
-.Fn setjmp
-routines returns.
-.Pp
-All accessible objects have values as of the time
-.Fn longjmp
-routine was called, except that the values of objects of automatic storage
-invocation duration that do not have the
-.Em volatile
-type and have been changed between the
-.Fn setjmp
-invocation and
-.Fn longjmp
-call are indeterminate.
-.Pp
-The
-.Fn setjmp Ns / Ns Fn longjmp
-pairs save and restore the signal mask while
-.Fn _setjmp Ns / Ns Fn _longjmp
-pairs save and restore only the register set and the stack.
-(See
-.Fn sigprocmask 2 . )
-.Pp
-The
-.Fn sigsetjmp Ns / Ns Fn siglongjmp
-function
-pairs save and restore the signal mask if the argument
-.Fa savemask
-is non-zero, otherwise only the register set and the stack are saved.
-.Sh ERRORS
-If the contents of the
-.Fa env
-are corrupted, or correspond to an environment that has already returned,
-the
-.Fn longjmp
-routine calls the routine
-.Fn longjmperror 3 .
-If
-.Fn longjmperror
-returns the program is aborted (see
-.Xr abort 3 ) .
-The default version of
-.Fn longjmperror
-prints the message
-.Dq Li longjmp botch
-to standard error and returns.
-User programs wishing to exit more gracefully should write their own
-versions of
-.Fn longjmperror .
-.Sh SEE ALSO
-.Xr sigaction 2 ,
-.Xr sigaltstack 2 ,
-.Xr signal 3
-.Sh STANDARDS
-The
-.Fn setjmp
-and
-.Fn longjmp
-functions conform to
-.St -ansiC .
-The
-.Fn sigsetjmp
-and
-.Fn siglongjmp
-functions conform to
-.St -p1003.1-88 .
diff --git a/lib/libc/gen/setjmperr.c b/lib/libc/gen/setjmperr.c
deleted file mode 100644
index 26f83b5..0000000
--- a/lib/libc/gen/setjmperr.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1980, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setjmperr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * This routine is called from longjmp() when an error occurs.
- * Programs that wish to exit gracefully from this error may
- * write their own versions.
- * If this routine returns, the program is aborted.
- */
-
-#include <setjmp.h>
-#include <unistd.h>
-
-void
-longjmperror()
-{
-#define ERRMSG "longjmp botch.\n"
- (void)write(STDERR_FILENO, ERRMSG, sizeof(ERRMSG) - 1);
-}
diff --git a/lib/libc/gen/setmode.3 b/lib/libc/gen/setmode.3
deleted file mode 100644
index 4c85b30..0000000
--- a/lib/libc/gen/setmode.3
+++ /dev/null
@@ -1,106 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setmode.3 8.2 (Berkeley) 4/28/95
-.\"
-.Dd April 28, 1995
-.Dt SETMODE 3
-.Os
-.Sh NAME
-.Nm getmode ,
-.Nm setmode
-.Nd modify mode bits
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft mode_t
-.Fn getmode "const void *set" "mode_t mode"
-.Ft void *
-.Fn setmode "const char *mode_str"
-.Sh DESCRIPTION
-The
-.Fn getmode
-function
-returns a copy of the file permission bits
-.Fa mode
-as altered by the values pointed to by
-.Fa set .
-While only the mode bits are altered, other parts of the file mode
-may be examined.
-.Pp
-The
-.Fn setmode
-function
-takes an absolute (octal) or symbolic value, as described in
-.Xr chmod 1 ,
-as an argument
-and returns a pointer to mode values to be supplied to
-.Fn getmode .
-Because some of the symbolic values are relative to the file
-creation mask,
-.Fn setmode
-may call
-.Xr umask 2 .
-If this occurs, the file creation mask will be restored before
-.Fn setmode
-returns.
-If the calling program changes the value of its file creation mask
-after calling
-.Fn setmode ,
-.Fn setmode
-must be called again if
-.Fn getmode
-is to modify future file modes correctly.
-.Pp
-If the mode passed to
-.Fn setmode
-is invalid,
-.Fn setmode
-returns
-.Dv NULL .
-.Sh ERRORS
-The
-.Fn setmode
-function
-may fail and set errno for any of the errors specified for the library
-routine
-.Xr malloc 3 .
-.Sh SEE ALSO
-.Xr chmod 1 ,
-.Xr stat 2 ,
-.Xr umask 2 ,
-.Xr malloc 3
-.Sh HISTORY
-The
-.Fn getmode
-and
-.Fn setmode
-functions first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/setmode.c b/lib/libc/gen/setmode.c
deleted file mode 100644
index c69d775..0000000
--- a/lib/libc/gen/setmode.c
+++ /dev/null
@@ -1,453 +0,0 @@
-/*
- * Copyright (c) 1989, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Dave Borman at Cray Research, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setmode.c 8.2 (Berkeley) 3/25/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <signal.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-#ifdef SETMODE_DEBUG
-#include <stdio.h>
-#endif
-
-#define SET_LEN 6 /* initial # of bitcmd struct to malloc */
-#define SET_LEN_INCR 4 /* # of bitcmd structs to add as needed */
-
-typedef struct bitcmd {
- char cmd;
- char cmd2;
- mode_t bits;
-} BITCMD;
-
-#define CMD2_CLR 0x01
-#define CMD2_SET 0x02
-#define CMD2_GBITS 0x04
-#define CMD2_OBITS 0x08
-#define CMD2_UBITS 0x10
-
-static BITCMD *addcmd __P((BITCMD *, int, int, int, u_int));
-static void compress_mode __P((BITCMD *));
-#ifdef SETMODE_DEBUG
-static void dumpmode __P((BITCMD *));
-#endif
-
-/*
- * Given the old mode and an array of bitcmd structures, apply the operations
- * described in the bitcmd structures to the old mode, and return the new mode.
- * Note that there is no '=' command; a strict assignment is just a '-' (clear
- * bits) followed by a '+' (set bits).
- */
-mode_t
-getmode(bbox, omode)
- void *bbox;
- mode_t omode;
-{
- register BITCMD *set;
- register mode_t clrval, newmode, value;
-
- set = (BITCMD *)bbox;
- newmode = omode;
- for (value = 0;; set++)
- switch(set->cmd) {
- /*
- * When copying the user, group or other bits around, we "know"
- * where the bits are in the mode so that we can do shifts to
- * copy them around. If we don't use shifts, it gets real
- * grundgy with lots of single bit checks and bit sets.
- */
- case 'u':
- value = (newmode & S_IRWXU) >> 6;
- goto common;
-
- case 'g':
- value = (newmode & S_IRWXG) >> 3;
- goto common;
-
- case 'o':
- value = newmode & S_IRWXO;
-common: if (set->cmd2 & CMD2_CLR) {
- clrval =
- (set->cmd2 & CMD2_SET) ? S_IRWXO : value;
- if (set->cmd2 & CMD2_UBITS)
- newmode &= ~((clrval<<6) & set->bits);
- if (set->cmd2 & CMD2_GBITS)
- newmode &= ~((clrval<<3) & set->bits);
- if (set->cmd2 & CMD2_OBITS)
- newmode &= ~(clrval & set->bits);
- }
- if (set->cmd2 & CMD2_SET) {
- if (set->cmd2 & CMD2_UBITS)
- newmode |= (value<<6) & set->bits;
- if (set->cmd2 & CMD2_GBITS)
- newmode |= (value<<3) & set->bits;
- if (set->cmd2 & CMD2_OBITS)
- newmode |= value & set->bits;
- }
- break;
-
- case '+':
- newmode |= set->bits;
- break;
-
- case '-':
- newmode &= ~set->bits;
- break;
-
- case 'X':
- if (omode & (S_IFDIR|S_IXUSR|S_IXGRP|S_IXOTH))
- newmode |= set->bits;
- break;
-
- case '\0':
- default:
-#ifdef SETMODE_DEBUG
- (void)printf("getmode:%04o -> %04o\n", omode, newmode);
-#endif
- return (newmode);
- }
-}
-
-#define ADDCMD(a, b, c, d) \
- if (set >= endset) { \
- register BITCMD *newset; \
- setlen += SET_LEN_INCR; \
- newset = realloc(saveset, sizeof(BITCMD) * setlen); \
- if (!saveset) \
- return (NULL); \
- set = newset + (set - saveset); \
- saveset = newset; \
- endset = newset + (setlen - 2); \
- } \
- set = addcmd(set, (a), (b), (c), (d))
-
-#define STANDARD_BITS (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO)
-
-void *
-setmode(p)
- register char *p;
-{
- register int perm, who;
- register char op;
- BITCMD *set, *saveset, *endset;
- sigset_t sigset, sigoset;
- mode_t mask;
- int equalopdone=0, permXbits, setlen;
-
- if (!*p)
- return (NULL);
-
- /*
- * Get a copy of the mask for the permissions that are mask relative.
- * Flip the bits, we want what's not set. Since it's possible that
- * the caller is opening files inside a signal handler, protect them
- * as best we can.
- */
- sigfillset(&sigset);
- (void)sigprocmask(SIG_BLOCK, &sigset, &sigoset);
- (void)umask(mask = umask(0));
- mask = ~mask;
- (void)sigprocmask(SIG_SETMASK, &sigoset, NULL);
-
- setlen = SET_LEN + 2;
-
- if ((set = malloc((u_int)(sizeof(BITCMD) * setlen))) == NULL)
- return (NULL);
- saveset = set;
- endset = set + (setlen - 2);
-
- /*
- * If an absolute number, get it and return; disallow non-octal digits
- * or illegal bits.
- */
- if (isdigit(*p)) {
- perm = (mode_t)strtol(p, NULL, 8);
- if (perm & ~(STANDARD_BITS|S_ISTXT)) {
- free(saveset);
- return (NULL);
- }
- while (*++p)
- if (*p < '0' || *p > '7') {
- free(saveset);
- return (NULL);
- }
- ADDCMD('=', (STANDARD_BITS|S_ISTXT), perm, mask);
- return (saveset);
- }
-
- /*
- * Build list of structures to set/clear/copy bits as described by
- * each clause of the symbolic mode.
- */
- for (;;) {
- /* First, find out which bits might be modified. */
- for (who = 0;; ++p) {
- switch (*p) {
- case 'a':
- who |= STANDARD_BITS;
- break;
- case 'u':
- who |= S_ISUID|S_IRWXU;
- break;
- case 'g':
- who |= S_ISGID|S_IRWXG;
- break;
- case 'o':
- who |= S_IRWXO;
- break;
- default:
- goto getop;
- }
- }
-
-getop: if ((op = *p++) != '+' && op != '-' && op != '=') {
- free(saveset);
- return (NULL);
- }
- if (op == '=')
- equalopdone = 0;
-
- who &= ~S_ISTXT;
- for (perm = 0, permXbits = 0;; ++p) {
- switch (*p) {
- case 'r':
- perm |= S_IRUSR|S_IRGRP|S_IROTH;
- break;
- case 's':
- /* If only "other" bits ignore set-id. */
- if (who & ~S_IRWXO)
- perm |= S_ISUID|S_ISGID;
- break;
- case 't':
- /* If only "other" bits ignore sticky. */
- if (who & ~S_IRWXO) {
- who |= S_ISTXT;
- perm |= S_ISTXT;
- }
- break;
- case 'w':
- perm |= S_IWUSR|S_IWGRP|S_IWOTH;
- break;
- case 'X':
- permXbits = S_IXUSR|S_IXGRP|S_IXOTH;
- break;
- case 'x':
- perm |= S_IXUSR|S_IXGRP|S_IXOTH;
- break;
- case 'u':
- case 'g':
- case 'o':
- /*
- * When ever we hit 'u', 'g', or 'o', we have
- * to flush out any partial mode that we have,
- * and then do the copying of the mode bits.
- */
- if (perm) {
- ADDCMD(op, who, perm, mask);
- perm = 0;
- }
- if (op == '=')
- equalopdone = 1;
- if (op == '+' && permXbits) {
- ADDCMD('X', who, permXbits, mask);
- permXbits = 0;
- }
- ADDCMD(*p, who, op, mask);
- break;
-
- default:
- /*
- * Add any permissions that we haven't already
- * done.
- */
- if (perm || (op == '=' && !equalopdone)) {
- if (op == '=')
- equalopdone = 1;
- ADDCMD(op, who, perm, mask);
- perm = 0;
- }
- if (permXbits) {
- ADDCMD('X', who, permXbits, mask);
- permXbits = 0;
- }
- goto apply;
- }
- }
-
-apply: if (!*p)
- break;
- if (*p != ',')
- goto getop;
- ++p;
- }
- set->cmd = 0;
-#ifdef SETMODE_DEBUG
- (void)printf("Before compress_mode()\n");
- dumpmode(saveset);
-#endif
- compress_mode(saveset);
-#ifdef SETMODE_DEBUG
- (void)printf("After compress_mode()\n");
- dumpmode(saveset);
-#endif
- return (saveset);
-}
-
-static BITCMD *
-addcmd(set, op, who, oparg, mask)
- BITCMD *set;
- register int oparg, who;
- register int op;
- u_int mask;
-{
- switch (op) {
- case '=':
- set->cmd = '-';
- set->bits = who ? who : STANDARD_BITS;
- set++;
-
- op = '+';
- /* FALLTHROUGH */
- case '+':
- case '-':
- case 'X':
- set->cmd = op;
- set->bits = (who ? who : mask) & oparg;
- break;
-
- case 'u':
- case 'g':
- case 'o':
- set->cmd = op;
- if (who) {
- set->cmd2 = ((who & S_IRUSR) ? CMD2_UBITS : 0) |
- ((who & S_IRGRP) ? CMD2_GBITS : 0) |
- ((who & S_IROTH) ? CMD2_OBITS : 0);
- set->bits = ~0;
- } else {
- set->cmd2 = CMD2_UBITS | CMD2_GBITS | CMD2_OBITS;
- set->bits = mask;
- }
-
- if (oparg == '+')
- set->cmd2 |= CMD2_SET;
- else if (oparg == '-')
- set->cmd2 |= CMD2_CLR;
- else if (oparg == '=')
- set->cmd2 |= CMD2_SET|CMD2_CLR;
- break;
- }
- return (set + 1);
-}
-
-#ifdef SETMODE_DEBUG
-static void
-dumpmode(set)
- register BITCMD *set;
-{
- for (; set->cmd; ++set)
- (void)printf("cmd: '%c' bits %04o%s%s%s%s%s%s\n",
- set->cmd, set->bits, set->cmd2 ? " cmd2:" : "",
- set->cmd2 & CMD2_CLR ? " CLR" : "",
- set->cmd2 & CMD2_SET ? " SET" : "",
- set->cmd2 & CMD2_UBITS ? " UBITS" : "",
- set->cmd2 & CMD2_GBITS ? " GBITS" : "",
- set->cmd2 & CMD2_OBITS ? " OBITS" : "");
-}
-#endif
-
-/*
- * Given an array of bitcmd structures, compress by compacting consecutive
- * '+', '-' and 'X' commands into at most 3 commands, one of each. The 'u',
- * 'g' and 'o' commands continue to be separate. They could probably be
- * compacted, but it's not worth the effort.
- */
-static void
-compress_mode(set)
- register BITCMD *set;
-{
- register BITCMD *nset;
- register int setbits, clrbits, Xbits, op;
-
- for (nset = set;;) {
- /* Copy over any 'u', 'g' and 'o' commands. */
- while ((op = nset->cmd) != '+' && op != '-' && op != 'X') {
- *set++ = *nset++;
- if (!op)
- return;
- }
-
- for (setbits = clrbits = Xbits = 0;; nset++) {
- if ((op = nset->cmd) == '-') {
- clrbits |= nset->bits;
- setbits &= ~nset->bits;
- Xbits &= ~nset->bits;
- } else if (op == '+') {
- setbits |= nset->bits;
- clrbits &= ~nset->bits;
- Xbits &= ~nset->bits;
- } else if (op == 'X')
- Xbits |= nset->bits & ~setbits;
- else
- break;
- }
- if (clrbits) {
- set->cmd = '-';
- set->cmd2 = 0;
- set->bits = clrbits;
- set++;
- }
- if (setbits) {
- set->cmd = '+';
- set->cmd2 = 0;
- set->bits = setbits;
- set++;
- }
- if (Xbits) {
- set->cmd = 'X';
- set->cmd2 = 0;
- set->bits = Xbits;
- set++;
- }
- }
-}
diff --git a/lib/libc/gen/setproctitle.3 b/lib/libc/gen/setproctitle.3
deleted file mode 100644
index c3f2031..0000000
--- a/lib/libc/gen/setproctitle.3
+++ /dev/null
@@ -1,113 +0,0 @@
-.\" Copyright (c) 1995 Peter Wemm <peter@freebsd.org>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" this list of conditions, and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" Peter Wemm.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id: setproctitle.3,v 1.8 1997/04/17 23:31:47 danny Exp $
-.\"
-.\" The following requests are required for all man pages.
-.Dd December 16, 1995
-.Os FreeBSD
-.Dt SETPROCTITLE 3
-.Sh NAME
-.Nm setproctitle
-.Nd set the process title for
-.Xr ps 1
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <libutil.h>
-.Ft void
-.Fn setproctitle "const char *fmt" "..."
-.Pp
-Link with
-.Va -lutil
-on the
-.Xr cc 1
-command line.
-.Sh DESCRIPTION
-The
-.Fn setproctitle
-library routine sets the process title that appears on the
-.Xr ps 1
-command.
-.Pp
-The title is set from the executable's name, followed by the
-result of a
-.Xr printf 3
-style expansion of the arguments as specified by the
-.Va fmt
-argument.
-.Pp
-If
-.Va fmt
-is NULL, the process title is reset to simply the name of the executable.
-.\" The following requests should be uncommented and used where appropriate.
-.\" This next request is for sections 2 and 3 function return values only.
-.\" .Sh RETURN VALUES
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" .Sh ENVIRONMENT
-.\" .Sh FILES
-.Sh EXAMPLES
-To set the title on a daemon to indicate its activity:
-.Bd -literal -offset indent
-setproctitle("talking to %s", inet_ntoa(addr));
-.Ed
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" (command return values (to shell) and fprintf/stderr type diagnostics)
-.\" .Sh DIAGNOSTICS
-.\" The next request is for sections 2 and 3 error and signal handling only.
-.\" .Sh ERRORS
-.Sh SEE ALSO
-.Xr ps 1 ,
-.Xr w 1 ,
-.Xr kvm 3 ,
-.Xr kvm_getargv 3 ,
-.Xr printf 3
-.Sh STANDARDS
-.Fn setproctitle
-is implicitly non-standard. Other methods of causing the
-.Xr ps 1
-command line to change, including copying over the argv[0] string are
-also implicitly non-portable. It is preferable to use an operating system
-supplied
-.Fn setproctitle
-if present.
-.Pp
-Unfortunately, it is possible that there are other calling conventions
-to other versions of
-.Fn setproctitle ,
-although none have been found by the author as yet. This is believed to be
-the predominant convention.
-.Pp
-It is thought that the implementation is compatible with other systems,
-including
-.Tn NetBSD
-and
-.Tn BSD/OS .
-.Sh HISTORY
-.Fn setproctitle
-first appeared in
-.Fx 2.2 .
-Other operating systems have
-similar functions.
-.Sh AUTHORS
-.Sy "Peter Wemm <peter@FreeBSD.org>"
-stole the idea from the
-.Sy "Sendmail 8.7.3"
-source code by
-.Sy "Eric Allman <eric@sendmail.org>" .
-.\" .Sh BUGS
diff --git a/lib/libc/gen/setproctitle.c b/lib/libc/gen/setproctitle.c
deleted file mode 100644
index ba21d1c..0000000
--- a/lib/libc/gen/setproctitle.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 1995 Peter Wemm <peter@freebsd.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Absolutely no warranty of function or purpose is made by the author
- * Peter Wemm.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/exec.h>
-#include <sys/sysctl.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/pmap.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-/*
- * Older FreeBSD 2.0, 2.1 and 2.2 had different ps_strings structures and
- * in different locations.
- * 1: old_ps_strings at the very top of the stack.
- * 2: old_ps_strings at SPARE_USRSPACE below the top of the stack.
- * 3: ps_strings at the very top of the stack.
- * This attempts to support a kernel built in the #2 and #3 era.
- */
-
-struct old_ps_strings {
- char *old_ps_argvstr;
- int old_ps_nargvstr;
- char *old_ps_envstr;
- int old_ps_nenvstr;
-};
-#define OLD_PS_STRINGS ((struct old_ps_strings *) \
- (USRSTACK - SPARE_USRSPACE - sizeof(struct old_ps_strings)))
-
-#if defined(__STDC__) /* from other parts of sendmail */
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-
-#define SPT_BUFSIZE 2048 /* from other parts of sendmail */
-extern char * __progname; /* is this defined in a .h anywhere? */
-
-void
-#if defined(__STDC__)
-setproctitle(const char *fmt, ...)
-#else
-setproctitle(fmt, va_alist)
- const char *fmt;
- va_dcl
-#endif
-{
- static char buf[SPT_BUFSIZE];
- static char *ps_argv[2];
- va_list ap;
- int mib[2];
- struct ps_strings *ps_strings;
- size_t len;
-
-#if defined(__STDC__)
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
-
- buf[sizeof(buf) - 1] = '\0';
- if (fmt) {
-
- /* print program name heading for grep */
- (void) snprintf(buf, sizeof(buf) - 1, "%s: ", __progname);
-
- /*
- * can't use return from sprintf, as that is the count of how
- * much it wanted to write, not how much it actually did.
- */
-
- len = strlen(buf);
-
- /* print the argument string */
- (void) vsnprintf(buf + len, sizeof(buf) - 1 - len, fmt, ap);
- } else {
- /* Idea from NetBSD - reset the title on fmt == NULL */
- strncpy(buf, __progname, sizeof(buf) - 1);
- }
-
- va_end(ap);
-
- ps_strings = NULL;
- mib[0] = CTL_KERN;
- mib[1] = KERN_PS_STRINGS;
- len = sizeof(ps_strings);
- if (sysctl(mib, 2, &ps_strings, &len, NULL, 0) < 0 ||
- ps_strings == NULL)
- ps_strings = PS_STRINGS;
-
- /* PS_STRINGS points to zeroed memory on a style #2 kernel */
- if (ps_strings->ps_argvstr) {
- /* style #3 */
- ps_argv[0] = buf;
- ps_argv[1] = NULL;
- ps_strings->ps_nargvstr = 1;
- ps_strings->ps_argvstr = ps_argv;
- } else {
- /* style #2 */
- OLD_PS_STRINGS->old_ps_nargvstr = 1;
- OLD_PS_STRINGS->old_ps_argvstr = buf;
- }
-}
diff --git a/lib/libc/gen/shmat.c b/lib/libc/gen/shmat.c
deleted file mode 100644
index 1cd0779..0000000
--- a/lib/libc/gen/shmat.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-
-#if __STDC__
-void *shmat(int shmid, void *shmaddr, int shmflg)
-#else
-void *shmat(shmid, shmaddr, shmflg)
- int shmid;
- void *shmaddr;
- int shmflg;
-#endif
-{
- return ((void *)shmsys(0, shmid, shmaddr, shmflg));
-}
diff --git a/lib/libc/gen/shmctl.c b/lib/libc/gen/shmctl.c
deleted file mode 100644
index b0585fd..0000000
--- a/lib/libc/gen/shmctl.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-
-#if __STDC__
-int shmctl(int shmid, int cmd, struct shmid_ds *buf)
-#else
-int shmctl(shmid, cmd, buf)
- int shmid;
- int cmd;
- struct shmid_ds *buf;
-#endif
-{
- return (shmsys(4, shmid, cmd, buf));
-}
diff --git a/lib/libc/gen/shmdt.c b/lib/libc/gen/shmdt.c
deleted file mode 100644
index feae3d1..0000000
--- a/lib/libc/gen/shmdt.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-
-#if __STDC__
-int shmdt(void *shmaddr)
-#else
-int shmdt(shmaddr)
- void *shmaddr;
-#endif
-{
- return (shmsys(2, shmaddr));
-}
diff --git a/lib/libc/gen/shmget.c b/lib/libc/gen/shmget.c
deleted file mode 100644
index 0119511..0000000
--- a/lib/libc/gen/shmget.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-
-#if __STDC__
-int shmget(key_t key, int size, int shmflg)
-#else
-int shmget(key, size, shmflg)
- key_t key;
- int size;
- int shmflg;
-#endif
-{
- return (shmsys(3, key, size, shmflg));
-}
diff --git a/lib/libc/gen/siginterrupt.3 b/lib/libc/gen/siginterrupt.3
deleted file mode 100644
index 6693b79..0000000
--- a/lib/libc/gen/siginterrupt.3
+++ /dev/null
@@ -1,111 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)siginterrupt.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SIGINTERRUPT 3
-.Os BSD 4.3
-.Sh NAME
-.Nm siginterrupt
-.Nd allow signals to interrupt system calls
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft int
-.Fn siginterrupt "int sig" "int flag"
-.Sh DESCRIPTION
-The
-.Fn siginterrupt
-function
-is used to change the system call restart
-behavior when a system call is interrupted by the specified signal.
-If the flag is false (0), then system calls will be restarted if
-they are interrupted by the specified signal
-and no data has been transferred yet.
-System call restart has been the default behavior since
-.Bx 4.2 ,
-and is the default behaviour for
-.Xr signal 3
-on
-.Tn FreeBSD .
-.Pp
-If the flag is true (1),
-then restarting of system calls is disabled.
-If a system call is interrupted by the specified signal
-and no data has been transferred,
-the system call will return \-1 with the global variable
-.Va errno
-set to
-.Dv EINTR .
-Interrupted system calls that have started transferring
-data will return the amount of data actually transferred.
-System call interrupt is the signal behavior found on
-.Bx 4.1
-and
-.At V
-systems.
-.Pp
-Note that the new
-.Bx 4.2
-signal handling semantics are not
-altered in any other way.
-Most notably, signal handlers always remain installed until
-explicitly changed by a subsequent
-.Xr sigaction 2
-call, and the signal mask operates as documented in
-.Xr sigaction 2 .
-Programs may switch between restartable and interruptible
-system call operation as often as desired in the execution of a program.
-.Pp
-Issuing a
-.Fn siginterrupt 3
-call during the execution of a signal handler will cause
-the new action to take place on the next signal to be caught.
-.Sh NOTES
-This library routine uses an extension of the
-.Xr sigaction 2
-system call that is not available in
-.Bx 4.2 ,
-hence it should not be used if backward compatibility is needed.
-.Sh RETURN VALUES
-A 0 value indicates that the call succeeded.
-A \-1 value indicates that an invalid signal number has been supplied.
-.Sh SEE ALSO
-.Xr sigaction 2 ,
-.Xr sigblock 2 ,
-.Xr sigpause 2 ,
-.Xr sigsetmask 2 ,
-.Xr signal 3
-.Sh HISTORY
-The
-.Fn siginterrupt
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libc/gen/siginterrupt.c b/lib/libc/gen/siginterrupt.c
deleted file mode 100644
index 06960ab..0000000
--- a/lib/libc/gen/siginterrupt.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)siginterrupt.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <signal.h>
-
-/*
- * Set signal state to prevent restart of system calls
- * after an instance of the indicated signal.
- */
-int
-siginterrupt(sig, flag)
- int sig, flag;
-{
- extern sigset_t _sigintr;
- struct sigaction sa;
- int ret;
-
- if ((ret = sigaction(sig, (struct sigaction *)0, &sa)) < 0)
- return (ret);
- if (flag) {
- sigaddset(&_sigintr, sig);
- sa.sa_flags &= ~SA_RESTART;
- } else {
- sigdelset(&_sigintr, sig);
- sa.sa_flags |= SA_RESTART;
- }
- return (sigaction(sig, &sa, (struct sigaction *)0));
-}
diff --git a/lib/libc/gen/siglist.c b/lib/libc/gen/siglist.c
deleted file mode 100644
index be6334d..0000000
--- a/lib/libc/gen/siglist.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)siglist.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <signal.h>
-
-const char *const sys_signame[NSIG] = {
- "Signal 0",
- "hup", /* SIGHUP */
- "int", /* SIGINT */
- "quit", /* SIGQUIT */
- "ill", /* SIGILL */
- "trap", /* SIGTRAP */
- "abrt", /* SIGABRT */
- "emt", /* SIGEMT */
- "fpe", /* SIGFPE */
- "kill", /* SIGKILL */
- "bus", /* SIGBUS */
- "segv", /* SIGSEGV */
- "sys", /* SIGSYS */
- "pipe", /* SIGPIPE */
- "alrm", /* SIGALRM */
- "term", /* SIGTERM */
- "urg", /* SIGURG */
- "stop", /* SIGSTOP */
- "tstp", /* SIGTSTP */
- "cont", /* SIGCONT */
- "chld", /* SIGCHLD */
- "ttin", /* SIGTTIN */
- "ttou", /* SIGTTOU */
- "io", /* SIGIO */
- "xcpu", /* SIGXCPU */
- "xfsz", /* SIGXFSZ */
- "vtalrm", /* SIGVTALRM */
- "prof", /* SIGPROF */
- "winch", /* SIGWINCH */
- "info", /* SIGINFO */
- "usr1", /* SIGUSR1 */
- "usr2", /* SIGUSR2 */
-};
-
-const char *const sys_siglist[NSIG] = {
- "Signal 0",
- "Hangup", /* SIGHUP */
- "Interrupt", /* SIGINT */
- "Quit", /* SIGQUIT */
- "Illegal instruction", /* SIGILL */
- "Trace/BPT trap", /* SIGTRAP */
- "Abort trap", /* SIGABRT */
- "EMT trap", /* SIGEMT */
- "Floating point exception", /* SIGFPE */
- "Killed", /* SIGKILL */
- "Bus error", /* SIGBUS */
- "Segmentation fault", /* SIGSEGV */
- "Bad system call", /* SIGSYS */
- "Broken pipe", /* SIGPIPE */
- "Alarm clock", /* SIGALRM */
- "Terminated", /* SIGTERM */
- "Urgent I/O condition", /* SIGURG */
- "Suspended (signal)", /* SIGSTOP */
- "Suspended", /* SIGTSTP */
- "Continued", /* SIGCONT */
- "Child exited", /* SIGCHLD */
- "Stopped (tty input)", /* SIGTTIN */
- "Stopped (tty output)", /* SIGTTOU */
- "I/O possible", /* SIGIO */
- "Cputime limit exceeded", /* SIGXCPU */
- "Filesize limit exceeded", /* SIGXFSZ */
- "Virtual timer expired", /* SIGVTALRM */
- "Profiling timer expired", /* SIGPROF */
- "Window size changes", /* SIGWINCH */
- "Information request", /* SIGINFO */
- "User defined signal 1", /* SIGUSR1 */
- "User defined signal 2" /* SIGUSR2 */
-};
diff --git a/lib/libc/gen/signal.3 b/lib/libc/gen/signal.3
deleted file mode 100644
index aadea35..0000000
--- a/lib/libc/gen/signal.3
+++ /dev/null
@@ -1,227 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)signal.3 8.3 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt SIGNAL 3
-.Os BSD 4
-.Sh NAME
-.Nm signal
-.Nd simplified software signal facilities
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.\" The following is Quite Ugly, but syntactically correct. Don't try to
-.\" fix it.
-.Ft void \*(lp*
-.Fn signal "int sig" "void \*(lp*func\*(rp\*(lpint\*(rp\*(rp\*(rp\*(lpint"
-
-or in FreeBSD's equivalent but easier to read typedef'd version:
-.Ft typedef "void \*(lp*sig_t\*(rp \*(lpint\*(rp"
-.Ft sig_t
-.Fn signal "int sig" "sig_t func"
-.Sh DESCRIPTION
-This
-.Fn signal
-facility
-is a simplified interface to the more general
-.Xr sigaction 2
-facility.
-.Pp
-Signals allow the manipulation of a process from outside its
-domain as well as allowing the process to manipulate itself or
-copies of itself (children). There are two general types of signals:
-those that cause termination of a process and those that do not.
-Signals which cause termination of a program might result from
-an irrecoverable error or might be the result of a user at a terminal
-typing the `interrupt' character.
-Signals are used when a process is stopped because it wishes to access
-its control terminal while in the background (see
-.Xr tty 4 ) .
-Signals are optionally generated
-when a process resumes after being stopped,
-when the status of child processes changes,
-or when input is ready at the control terminal.
-Most signals result in the termination of the process receiving them
-if no action
-is taken; some signals instead cause the process receiving them
-to be stopped, or are simply discarded if the process has not
-requested otherwise.
-Except for the
-.Dv SIGKILL
-and
-.Dv SIGSTOP
-signals, the
-.Fn signal
-function allows for a signal to be caught, to be ignored, or to generate
-an interrupt.
-These signals are defined in the file
-.Aq Pa signal.h :
-.Bl -column SIGVTALARMXX "create core imagexxx"
-.It Sy " Name " " Default Action " " Description"
-.It Dv SIGHUP No " terminate process" " terminal line hangup"
-.It Dv SIGINT No " terminate process" " interrupt program"
-.It Dv SIGQUIT No " create core image" " quit program"
-.It Dv SIGILL No " create core image" " illegal instruction"
-.It Dv SIGTRAP No " create core image" " trace trap"
-.It Dv SIGABRT No " create core image" Xr abort 2
-call (formerly
-.Dv SIGIOT )
-.It Dv SIGEMT No " create core image" " emulate instruction executed"
-.It Dv SIGFPE No " create core image" " floating-point exception"
-.It Dv SIGKILL No " terminate process" " kill program"
-.It Dv SIGBUS No " create core image" " bus error"
-.It Dv SIGSEGV No " create core image" " segmentation violation"
-.It Dv SIGSYS No " create core image" " non-existent system call invoked"
-.It Dv SIGPIPE No " terminate process" " write on a pipe with no reader"
-.It Dv SIGALRM No " terminate process" " real-time timer expired"
-.It Dv SIGTERM No " terminate process" " software termination signal"
-.It Dv SIGURG No " discard signal" " urgent condition present on socket"
-.It Dv SIGSTOP No " stop process" " stop (cannot be caught or ignored)"
-.It Dv SIGTSTP No " stop process" " stop signal generated from keyboard"
-.It Dv SIGCONT No " discard signal" " continue after stop"
-.It Dv SIGCHLD No " discard signal" " child status has changed"
-.It Dv SIGTTIN No " stop process" " background read attempted from control terminal"
-.It Dv SIGTTOU No " stop process" " background write attempted to control terminal"
-.It Dv SIGIO No " discard signal" Tn " I/O"
-is possible on a descriptor (see
-.Xr fcntl 2 )
-.It Dv SIGXCPU No " terminate process" " cpu time limit exceeded (see"
-.Xr setrlimit 2 )
-.It Dv SIGXFSZ No " terminate process" " file size limit exceeded (see"
-.Xr setrlimit 2 )
-.It Dv SIGVTALRM No " terminate process" " virtual time alarm (see"
-.Xr setitimer 2 )
-.It Dv SIGPROF No " terminate process" " profiling timer alarm (see"
-.Xr setitimer 2 )
-.It Dv SIGWINCH No " discard signal" " Window size change"
-.It Dv SIGINFO No " discard signal" " status request from keyboard"
-.It Dv SIGUSR1 No " terminate process" " User defined signal 1"
-.It Dv SIGUSR2 No " terminate process" " User defined signal 2"
-.El
-.Pp
-The
-.Fa sig
-parameter specifies which signal was received.
-The
-.Fa func
-procedure allows a user to choose the action upon receipt of a signal.
-To set the default action of the signal to occur as listed above,
-.Fa func
-should be
-.Dv SIG_DFL .
-A
-.Dv SIG_DFL
-resets the default action.
-To ignore the signal
-.Fa func
-should be
-.Dv SIG_IGN .
-This will cause subsequent instances of the signal to be ignored
-and pending instances to be discarded. If
-.Dv SIG_IGN
-is not used,
-further occurrences of the signal are
-automatically blocked and
-.Fa func
-is called.
-.Pp
-The handled signal is unblocked when the
-function returns and
-the process continues from where it left off when the signal occurred.
-.Bf -symbolic
-Unlike previous signal facilities, the handler
-func() remains installed after a signal has been delivered.
-.Ef
-.Pp
-For some system calls, if a signal is caught while the call is
-executing and the call is prematurely terminated,
-the call is automatically restarted.
-(The handler is installed using the
-.Dv SA_RESTART
-flag with
-.Xr sigaction 2 . )
-The affected system calls include
-.Xr read 2 ,
-.Xr write 2 ,
-.Xr sendto 2 ,
-.Xr recvfrom 2 ,
-.Xr sendmsg 2
-and
-.Xr recvmsg 2
-on a communications channel or a low speed device
-and during a
-.Xr ioctl 2
-or
-.Xr wait 2 .
-However, calls that have already committed are not restarted,
-but instead return a partial success (for example, a short read count).
-.Pp
-When a process which has installed signal handlers forks,
-the child process inherits the signals.
-All caught signals may be reset to their default action by a call
-to the
-.Xr execve 2
-function;
-ignored signals remain ignored.
-.Sh RETURN VALUES
-The previous action is returned on a successful call.
-Otherwise, \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Signal
-will fail and no action will take place if one of the
-following occur:
-.Bl -tag -width [EINVAL]
-.It Bq Er EINVAL
-.Em Sig
-is not a valid signal number.
-.It Bq Er EINVAL
-An attempt is made to ignore or supply a handler for
-.Dv SIGKILL
-or
-.Ev SIGSTOP .
-.Sh SEE ALSO
-.Xr kill 1 ,
-.Xr kill 2 ,
-.Xr ptrace 2 ,
-.Xr sigaction 2 ,
-.Xr sigaltstack 2 ,
-.Xr sigprocmask 2 ,
-.Xr sigsuspend 2 ,
-.Xr setjmp 3 ,
-.Xr tty 4
-.Sh HISTORY
-This
-.Nm signal
-facility appeared in
-.Bx 4.0 .
diff --git a/lib/libc/gen/signal.c b/lib/libc/gen/signal.c
deleted file mode 100644
index c4057f5..0000000
--- a/lib/libc/gen/signal.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1985, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)signal.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Almost backwards compatible signal.
- */
-#include <signal.h>
-
-sigset_t _sigintr; /* shared with siginterrupt */
-
-sig_t
-signal(s, a)
- int s;
- sig_t a;
-{
- struct sigaction sa, osa;
-
- sa.sa_handler = a;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0;
- if (!sigismember(&_sigintr, s))
- sa.sa_flags |= SA_RESTART;
- if (sigaction(s, &sa, &osa) < 0)
- return (SIG_ERR);
- return (osa.sa_handler);
-}
diff --git a/lib/libc/gen/sigsetops.3 b/lib/libc/gen/sigsetops.3
deleted file mode 100644
index 97b3316..0000000
--- a/lib/libc/gen/sigsetops.3
+++ /dev/null
@@ -1,113 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigsetops.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SIGSETOPS 3
-.Os
-.Sh NAME
-.Nm sigemptyset ,
-.Nm sigfillset ,
-.Nm sigaddset ,
-.Nm sigdelset ,
-.Nm sigismember
-.Nd manipulate signal sets
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft int
-.Fn sigemptyset "sigset_t *set"
-.Ft int
-.Fn sigfillset "sigset_t *set"
-.Ft int
-.Fn sigaddset "sigset_t *set" "int signo"
-.Ft int
-.Fn sigdelset "sigset_t *set" "int signo"
-.Ft int
-.Fn sigismember "const sigset_t *set" "int signo"
-.Sh DESCRIPTION
-These functions manipulate signal sets stored in a
-.Fa sigset_t .
-Either
-.Fn sigemptyset
-or
-.Fn sigfillset
-must be called for every object of type
-.Fa sigset_t
-before any other use of the object.
-.Pp
-The
-.Fn sigemptyset
-function initializes a signal set to be empty.
-.Pp
-The
-.Fn sigfillset
-function initializes a signal set to contain all signals.
-.Pp
-The
-.Fn sigaddset
-function adds the specified signal
-.Fa signo
-to the signal set.
-.Pp
-The
-.Fn sigdelset
-function deletes the specified signal
-.Fa signo
-from the signal set.
-.Pp
-The
-.Fn sigismember
-function returns whether a specified signal
-.Fa signo
-is contained in the signal set.
-.Pp
-These functions
-are provided as macros in the include file <signal.h>.
-Actual functions are available
-if their names are undefined (with #undef
-.Em name ) .
-.Sh RETURN VALUES
-The
-.Fn sigismember
-function returns 1
-if the signal is a member of the set,
-0 otherwise.
-The other functions return 0.
-.Sh ERRORS
-Currently no errors are detected.
-.Sh SEE ALSO
-.Xr kill 2 ,
-.Xr sigaction 2 ,
-.Xr sigsuspend 2
-.Sh STANDARDS
-These functions are defined by
-.St -p1003.1-88 .
diff --git a/lib/libc/gen/sigsetops.c b/lib/libc/gen/sigsetops.c
deleted file mode 100644
index 7ac903b..0000000
--- a/lib/libc/gen/sigsetops.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sigsetops.c 8.1 (Berkeley) 6/4/93
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)sigsetops.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <signal.h>
-
-#undef sigemptyset
-#undef sigfillset
-#undef sigaddset
-#undef sigdelset
-#undef sigismember
-
-int
-sigemptyset(set)
- sigset_t *set;
-{
- *set = 0;
- return (0);
-}
-
-int
-sigfillset(set)
- sigset_t *set;
-{
- *set = ~(sigset_t)0;
- return (0);
-}
-
-int
-sigaddset(set, signo)
- sigset_t *set;
- int signo;
-{
- *set |= sigmask(signo);
- return (0);
-}
-
-int
-sigdelset(set, signo)
- sigset_t *set;
- int signo;
-{
- *set &= ~sigmask(signo);
- return (0);
-}
-
-int
-sigismember(set, signo)
- const sigset_t *set;
- int signo;
-{
- return ((*set & sigmask(signo)) != 0);
-}
diff --git a/lib/libc/gen/sleep.3 b/lib/libc/gen/sleep.3
deleted file mode 100644
index fa1057e..0000000
--- a/lib/libc/gen/sleep.3
+++ /dev/null
@@ -1,90 +0,0 @@
-.\" Copyright (c) 1986, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sleep.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SLEEP 3
-.Os
-.Sh NAME
-.Nm sleep
-.Nd suspend process execution for interval of seconds
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft u_int
-.Fn sleep "u_int seconds"
-.Sh DESCRIPTION
-The
-.Fn sleep
-function
-suspends execution of the calling process
-for
-.Fa seconds
-of time.
-System activity or time spent in processing the
-call may lengthen the sleep by a second.
-.Pp
-If a timer is already running on the process its state is unaltered by
-this
-.Fn sleep
-implementation.
-If the value
-.Fa seconds
-is more than or equal to the remaining clock time for the running timer,
-the sleep time is set to
-the remaining clock time.
-.Pp
-This function is implemented using
-.Xr nanosleep 2
-by pausing for
-.Fa seconds
-of time or until any signal occurse.
-.Sh RETURN VALUES
-The
-.Fn sleep
-function returns the number of seconds remaining to complete the operation. If
-sleep is interrupted or cannot allocate a timer it may will return the value
-needed to be passed to a subsequent sleep to complete the necessary delay.
-.Fn sleep
-repeatedly until it returns zero may busy-wait until a timer
-is available.
-.Sh SEE ALSO
-.Xr nanosleep 2 ,
-.Xr setitimer 2 ,
-.Xr alarm 3 ,
-.Xr signal 3 ,
-.Xr ualarm 3 ,
-.Xr usleep 3
-.Sh HISTORY
-A
-.Fn sleep
-function appeared in
-.At v7 .
diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c
deleted file mode 100644
index 5789647..0000000
--- a/lib/libc/gen/sleep.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)sleep.c 8.1 (Berkeley) 6/4/93";
-#endif
-static char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <limits.h>
-#include <time.h>
-#include <unistd.h>
-
-unsigned int
-sleep(seconds)
- unsigned int seconds;
-{
- struct timespec time_to_sleep;
- struct timespec time_remaining;
-
- /*
- * Avoid overflow when `seconds' is huge. This assumes that
- * the maximum value for a time_t is >= LONG_MAX.
- */
- if (seconds > LONG_MAX)
- return (seconds - LONG_MAX + sleep(LONG_MAX));
-
- time_to_sleep.tv_sec = seconds;
- time_to_sleep.tv_nsec = 0;
- if (nanosleep(&time_to_sleep, &time_remaining) != -1)
- return (0);
- if (errno != EINTR)
- return (seconds); /* best guess */
- return (time_remaining.tv_sec +
- (time_remaining.tv_nsec != 0)); /* round up */
-}
diff --git a/lib/libc/gen/srand48.c b/lib/libc/gen/srand48.c
deleted file mode 100644
index fd369a0..0000000
--- a/lib/libc/gen/srand48.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1993 Martin Birgmeier
- * All rights reserved.
- *
- * You may redistribute unmodified or modified versions of this source
- * code provided that the above copyright notice and this and the
- * following conditions are retained.
- *
- * This software is provided ``as is'', and comes with no warranties
- * of any kind. I shall in no event be liable for anything that happens
- * to anyone/anything when using this software.
- */
-
-#include "rand48.h"
-
-extern unsigned short _rand48_seed[3];
-extern unsigned short _rand48_mult[3];
-extern unsigned short _rand48_add;
-
-void
-srand48(long seed)
-{
- _rand48_seed[0] = RAND48_SEED_0;
- _rand48_seed[1] = (unsigned short) seed;
- _rand48_seed[2] = (unsigned short) (seed >> 16);
- _rand48_mult[0] = RAND48_MULT_0;
- _rand48_mult[1] = RAND48_MULT_1;
- _rand48_mult[2] = RAND48_MULT_2;
- _rand48_add = RAND48_ADD;
-}
diff --git a/lib/libc/gen/stringlist.3 b/lib/libc/gen/stringlist.3
deleted file mode 100644
index 5023c5c..0000000
--- a/lib/libc/gen/stringlist.3
+++ /dev/null
@@ -1,120 +0,0 @@
-.\" $NetBSD: stringlist.3,v 1.2 1997/04/09 08:59:25 kleink Exp $
-.\"
-.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation 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 BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd February 24, 1997
-.Os NetBSD 1.3
-.Dt STRINGLIST 3
-.Sh NAME
-.Nm stringlist ,
-.Nm sl_init ,
-.Nm sl_add ,
-.Nm sl_free ,
-.Nm sl_find
-.Nd stringlist manipulation functions
-.Sh SYNOPSIS
-.Fd #include <stringlist.h>
-.Ft StringList *
-.Fn sl_init
-.Ft void
-.Fn sl_add "StringList *sl" "char *item"
-.Ft void
-.Fn sl_free "StringList *sl" "int freeall"
-.Ft char *
-.Fn sl_find "StringList *sl" "char *item"
-.Sh DESCRIPTION
-The
-.Nm
-functions manipulate stringlists, which are lists of
-strings that extend automatically if necessary.
-.Pp
-The
-.Ar StringList
-structure has the following definition:
-.Bd -literal -offset indent
-typedef struct _stringlist {
- char **sl_str;
- size_t sl_max;
- size_t sl_cur;
-} StringList;
-.Ed
-.Pp
-.Bl -tag -width "sl_str" -offset indent
-.It Ar sl_str
-a pointer to the base of the array containing the list.
-.It Ar sl_max
-the size of
-.Ar sl_str .
-.It Ar sl_cur
-the offset in
-.Ar sl_str
-of the current element.
-.El
-.Pp
-The following stringlist manipulation functions are available:
-.Bl -tag -width "sl_init()"
-.It Fn sl_init
-Create a stringlist.
-Returns a pointer to a
-.Ar StringList .
-.It Fn sl_free
-Releases memory occupied by
-.Ar sl
-and the
-.Ar sl->sl_str
-array.
-If
-.Ar freeall
-is non-zero, then each of the items within
-.Ar sl->sl_str
-is released as well.
-.It Fn sl_add
-Add
-.Ar item
-to
-.Ar sl->sl_str
-at
-.Ar sl->sl_cur ,
-extending the size of
-.Ar sl->sl_str
-.It Fn sl_find
-Find
-.Ar item
-in
-.Ar sl ,
-returning NULL if it's not found.
-.El
-.Sh SEE ALSO
-.Xr free 3 ,
-.Xr malloc 3
diff --git a/lib/libc/gen/stringlist.c b/lib/libc/gen/stringlist.c
deleted file mode 100644
index 57c4d91..0000000
--- a/lib/libc/gen/stringlist.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* $NetBSD: stringlist.c,v 1.2 1997/01/17 07:26:20 lukem Exp $ */
-
-/*
- * Copyright (c) 1994 Christos Zoulas
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Christos Zoulas.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$NetBSD: stringlist.c,v 1.2 1997/01/17 07:26:20 lukem Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include <err.h>
-#include <stdlib.h>
-#include <stringlist.h>
-
-#define _SL_CHUNKSIZE 20
-
-/*
- * sl_init(): Initialize a string list
- */
-StringList *
-sl_init()
-{
- StringList *sl = malloc(sizeof(StringList));
- if (sl == NULL)
- err(1, "stringlist: %m");
-
- sl->sl_cur = 0;
- sl->sl_max = _SL_CHUNKSIZE;
- sl->sl_str = malloc(sl->sl_max * sizeof(char *));
- if (sl->sl_str == NULL)
- err(1, "stringlist: %m");
- return sl;
-}
-
-
-/*
- * sl_add(): Add an item to the string list
- */
-void
-sl_add(sl, name)
- StringList *sl;
- char *name;
-{
- if (sl->sl_cur == sl->sl_max - 1) {
- sl->sl_max += _SL_CHUNKSIZE;
- sl->sl_str = realloc(sl->sl_str, sl->sl_max * sizeof(char *));
- if (sl->sl_str == NULL)
- err(1, "stringlist: %m");
- }
- sl->sl_str[sl->sl_cur++] = name;
-}
-
-
-/*
- * sl_free(): Free a stringlist
- */
-void
-sl_free(sl, all)
- StringList *sl;
- int all;
-{
- size_t i;
-
- if (sl == NULL)
- return;
- if (sl->sl_str) {
- if (all)
- for (i = 0; i < sl->sl_cur; i++)
- free(sl->sl_str[i]);
- free(sl->sl_str);
- }
- free(sl);
-}
-
-
-/*
- * sl_find(): Find a name in the string list
- */
-char *
-sl_find(sl, name)
- StringList *sl;
- char *name;
-{
- size_t i;
-
- for (i = 0; i < sl->sl_cur; i++)
- if (strcmp(sl->sl_str[i], name) == 0)
- return sl->sl_str[i];
-
- return NULL;
-}
diff --git a/lib/libc/gen/strtofflags.c b/lib/libc/gen/strtofflags.c
deleted file mode 100644
index 1f22f5a..0000000
--- a/lib/libc/gen/strtofflags.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)stat_flags.c 8.1 (Berkeley) 5/31/93";
-#else
-static const char rcsid[] =
- "$Id: stat_flags.c,v 1.8 1997/08/07 22:28:25 steve Exp $";
-#endif
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <stddef.h>
-#include <string.h>
-
-#define SAPPEND(s) { \
- if (prefix != NULL) \
- (void)strcat(string, prefix); \
- (void)strcat(string, s); \
- prefix = ","; \
-}
-
-/*
- * flags_to_string --
- * Convert stat flags to a comma-separated string. If no flags
- * are set, return the default string.
- */
-char *
-flags_to_string(flags, def)
- u_long flags;
- char *def;
-{
- static char string[128];
- char *prefix;
-
- string[0] = '\0';
- prefix = NULL;
- if (flags & UF_APPEND)
- SAPPEND("uappnd");
- if (flags & UF_IMMUTABLE)
- SAPPEND("uchg");
-#ifdef UF_NOUNLINK
- if (flags & UF_NOUNLINK)
- SAPPEND("uunlnk");
-#endif
- if (flags & UF_NODUMP)
- SAPPEND("nodump");
- if (flags & UF_OPAQUE)
- SAPPEND("opaque");
- if (flags & SF_APPEND)
- SAPPEND("sappnd");
- if (flags & SF_ARCHIVED)
- SAPPEND("arch");
- if (flags & SF_IMMUTABLE)
- SAPPEND("schg");
-#ifdef SF_NOUNLINK
- if (flags & SF_NOUNLINK)
- SAPPEND("sunlnk");
-#endif
- return (prefix == NULL && def != NULL ? def : string);
-}
-
-#define TEST(a, b, f) { \
- if (!memcmp(a, b, sizeof(b))) { \
- if (clear) { \
- if (clrp) \
- *clrp |= (f); \
- } else if (setp) \
- *setp |= (f); \
- break; \
- } \
-}
-
-/*
- * string_to_flags --
- * Take string of arguments and return stat flags. Return 0 on
- * success, 1 on failure. On failure, stringp is set to point
- * to the offending token.
- */
-int
-string_to_flags(stringp, setp, clrp)
- char **stringp;
- u_long *setp, *clrp;
-{
- int clear;
- char *string, *p;
-
- clear = 0;
- if (setp)
- *setp = 0;
- if (clrp)
- *clrp = 0;
- string = *stringp;
- while ((p = strsep(&string, "\t ,")) != NULL) {
- *stringp = p;
- if (*p == '\0')
- continue;
- if (p[0] == 'n' && p[1] == 'o') {
- clear = 1;
- p += 2;
- }
- switch (p[0]) {
- case 'a':
- TEST(p, "arch", SF_ARCHIVED);
- TEST(p, "archived", SF_ARCHIVED);
- return (1);
- case 'd':
- clear = !clear;
- TEST(p, "dump", UF_NODUMP);
- return (1);
- case 'o':
- TEST(p, "opaque", UF_OPAQUE);
- return (1);
- case 's':
- TEST(p, "sappnd", SF_APPEND);
- TEST(p, "sappend", SF_APPEND);
- TEST(p, "schg", SF_IMMUTABLE);
- TEST(p, "schange", SF_IMMUTABLE);
- TEST(p, "simmutable", SF_IMMUTABLE);
-#ifdef SF_NOUNLINK
- TEST(p, "sunlnk", SF_NOUNLINK);
- TEST(p, "sunlink", SF_NOUNLINK);
-#endif
- return (1);
- case 'u':
- TEST(p, "uappnd", UF_APPEND);
- TEST(p, "uappend", UF_APPEND);
- TEST(p, "uchg", UF_IMMUTABLE);
- TEST(p, "uchange", UF_IMMUTABLE);
- TEST(p, "uimmutable", UF_IMMUTABLE);
-#ifdef UF_NOUNLINK
- TEST(p, "uunlnk", UF_NOUNLINK);
- TEST(p, "uunlink", UF_NOUNLINK);
-#endif
- /* FALLTHROUGH */
- default:
- return (1);
- }
- }
- return (0);
-}
diff --git a/lib/libc/gen/sysconf.3 b/lib/libc/gen/sysconf.3
deleted file mode 100644
index aca1a432..0000000
--- a/lib/libc/gen/sysconf.3
+++ /dev/null
@@ -1,186 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sysconf.3 8.3 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt SYSCONF 3
-.Os BSD 4
-.Sh NAME
-.Nm sysconf
-.Nd get configurable system variables
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft long
-.Fn sysconf "int name"
-.Sh DESCRIPTION
-.Pp
-This interface is defined by
-.St -p1003.1-88 .
-A far more complete interface is available using
-.Xr sysctl 3 .
-.Pp
-The
-.Fn sysconf
-function provides a method for applications to determine the current
-value of a configurable system limit or option variable.
-The
-.Fa name
-argument specifies the system variable to be queried.
-Symbolic constants for each name value are found in the include file
-.Li <unistd.h> .
-.Pp
-The available values are as follows:
-.Pp
-.Bl -tag -width "123456"
-.Pp
-.It Li _SC_ARG_MAX
-The maximum bytes of argument to
-.Xr execve 2 .
-.It Li _SC_CHILD_MAX
-The maximum number of simultaneous processes per user id.
-.It Li _SC_CLK_TCK
-The frequency of the statistics clock in ticks per second.
-.It Li _SC_NGROUPS_MAX
-The maximum number of supplemental groups.
-.It Li _SC_OPEN_MAX
-The maximum number of open files per user id.
-.It Li _SC_STREAM_MAX
-The minimum maximum number of streams that a process may have open
-at any one time.
-.It Li _SC_TZNAME_MAX
-The minimum maximum number of types supported for the name of a
-timezone.
-.It Li _SC_JOB_CONTROL
-Return 1 if job control is available on this system, otherwise \-1.
-.It Li _SC_SAVED_IDS
-Returns 1 if saved set-group and saved set-user ID is available,
-otherwise \-1.
-.It Li _SC_VERSION
-The version of ISO/IEC 9945 (POSIX 1003.1) with which the system
-attempts to comply.
-.It Li _SC_BC_BASE_MAX
-The maximum ibase/obase values in the
-.Xr bc 1
-utility.
-.It Li _SC_BC_DIM_MAX
-The maximum array size in the
-.Xr bc 1
-utility.
-.It Li _SC_BC_SCALE_MAX
-The maximum scale value in the
-.Xr bc 1
-utility.
-.It Li _SC_BC_STRING_MAX
-The maximum string length in the
-.Xr bc 1
-utility.
-.It Li _SC_COLL_WEIGHTS_MAX
-The maximum number of weights that can be assigned to any entry of
-the LC_COLLATE order keyword in the locale definition file.
-.It Li _SC_EXPR_NEST_MAX
-The maximum number of expressions that can be nested within
-parenthesis by the
-.Xr expr 1
-utility.
-.It Li _SC_LINE_MAX
-The maximum length in bytes of a text-processing utility's input
-line.
-.It Li _SC_RE_DUP_MAX
-The maximum number of repeated occurrences of a regular expression
-permitted when using interval notation.
-.It Li _SC_2_VERSION
-The version of POSIX 1003.2 with which the system attempts to comply.
-.It Li _SC_2_C_BIND
-Return 1 if the system's C-language development facilities support the
-C-Language Bindings Option, otherwise \-1.
-.It Li _SC_2_C_DEV
-Return 1 if the system supports the C-Language Development Utilities Option,
-otherwise \-1.
-.It Li _SC_2_CHAR_TERM
-Return 1 if the system supports at least one terminal type capable of
-all operations described in POSIX 1003.2, otherwise \-1.
-.It Li _SC_2_FORT_DEV
-Return 1 if the system supports the FORTRAN Development Utilities Option,
-otherwise \-1.
-.It Li _SC_2_FORT_RUN
-Return 1 if the system supports the FORTRAN Runtime Utilities Option,
-otherwise \-1.
-.It Li _SC_2_LOCALEDEF
-Return 1 if the system supports the creation of locales, otherwise \-1.
-.It Li _SC_2_SW_DEV
-Return 1 if the system supports the Software Development Utilities Option,
-otherwise \-1.
-.It Li _SC_2_UPE
-Return 1 if the system supports the User Portability Utilities Option,
-otherwise \-1.
-.El
-.Sh RETURN VALUES
-If the call to
-.Fn sysconf
-is not successful, \-1 is returned and
-.Va errno
-is set appropriately.
-Otherwise, if the variable is associated with functionality that is not
-supported, \-1 is returned and
-.Va errno
-is not modified.
-Otherwise, the current variable value is returned.
-.Sh ERRORS
-The
-.Fn sysconf
-function may fail and set
-.Va errno
-for any of the errors specified for the library functions
-.Xr sysctl 3 .
-In addition, the following error may be reported:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The value of the
-.Fa name
-argument is invalid.
-.Sh SEE ALSO
-.Xr sysctl 3
-.Sh BUGS
-The value for _SC_STREAM_MAX is a minimum maximum, and required to be
-the same as ANSI C's FOPEN_MAX, so the returned value is a ridiculously
-small and misleading number.
-.Sh STANDARDS
-Except for the fact that values returned by
-.Fn sysconf
-may change over the lifetime of the calling process,
-this function conforms to
-.St -p1003.1-88 .
-.Sh HISTORY
-The
-.Fn sysconf
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c
deleted file mode 100644
index 16a3efa..0000000
--- a/lib/libc/gen/sysconf.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Sean Eric Fagan of Cygnus Support.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)sysconf.c 8.2 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
-#include <sys/resource.h>
-
-#include <errno.h>
-#include <time.h>
-#include <unistd.h>
-
-/*
- * sysconf --
- * get configurable system variables.
- *
- * XXX
- * POSIX 1003.1 (ISO/IEC 9945-1, 4.8.1.3) states that the variable values
- * not change during the lifetime of the calling process. This would seem
- * to require that any change to system limits kill all running processes.
- * A workaround might be to cache the values when they are first retrieved
- * and then simply return the cached value on subsequent calls. This is
- * less useful than returning up-to-date values, however.
- */
-long
-sysconf(name)
- int name;
-{
- struct rlimit rl;
- size_t len;
- int mib[2], value;
-
- len = sizeof(value);
-
- switch (name) {
-/* 1003.1 */
- case _SC_ARG_MAX:
- mib[0] = CTL_KERN;
- mib[1] = KERN_ARGMAX;
- break;
- case _SC_CHILD_MAX:
- return (getrlimit(RLIMIT_NPROC, &rl) ? -1 : rl.rlim_cur);
- case _SC_CLK_TCK:
- return (CLK_TCK);
- case _SC_JOB_CONTROL:
- mib[0] = CTL_KERN;
- mib[1] = KERN_JOB_CONTROL;
- goto yesno;
- case _SC_NGROUPS_MAX:
- mib[0] = CTL_KERN;
- mib[1] = KERN_NGROUPS;
- break;
- case _SC_OPEN_MAX:
- return (getrlimit(RLIMIT_NOFILE, &rl) ? -1 : rl.rlim_cur);
- case _SC_STREAM_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_STREAM_MAX;
- break;
- case _SC_TZNAME_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_TZNAME_MAX;
- break;
- case _SC_SAVED_IDS:
- mib[0] = CTL_KERN;
- mib[1] = KERN_SAVED_IDS;
- goto yesno;
- case _SC_VERSION:
- mib[0] = CTL_KERN;
- mib[1] = KERN_POSIX1;
- break;
-
-/* 1003.2 */
- case _SC_BC_BASE_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_BC_BASE_MAX;
- break;
- case _SC_BC_DIM_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_BC_DIM_MAX;
- break;
- case _SC_BC_SCALE_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_BC_SCALE_MAX;
- break;
- case _SC_BC_STRING_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_BC_STRING_MAX;
- break;
- case _SC_COLL_WEIGHTS_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_COLL_WEIGHTS_MAX;
- break;
- case _SC_EXPR_NEST_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_EXPR_NEST_MAX;
- break;
- case _SC_LINE_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_LINE_MAX;
- break;
- case _SC_RE_DUP_MAX:
- mib[0] = CTL_USER;
- mib[1] = USER_RE_DUP_MAX;
- break;
- case _SC_2_VERSION:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_VERSION;
- break;
- case _SC_2_C_BIND:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_C_BIND;
- goto yesno;
- case _SC_2_C_DEV:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_C_DEV;
- goto yesno;
- case _SC_2_CHAR_TERM:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_CHAR_TERM;
- goto yesno;
- case _SC_2_FORT_DEV:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_FORT_DEV;
- goto yesno;
- case _SC_2_FORT_RUN:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_FORT_RUN;
- goto yesno;
- case _SC_2_LOCALEDEF:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_LOCALEDEF;
- goto yesno;
- case _SC_2_SW_DEV:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_SW_DEV;
- goto yesno;
- case _SC_2_UPE:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_UPE;
-yesno: if (sysctl(mib, 2, &value, &len, NULL, 0) == -1)
- return (-1);
- if (value == 0)
- return (-1);
- return (value);
- break;
- default:
- errno = EINVAL;
- return (-1);
- }
- return (sysctl(mib, 2, &value, &len, NULL, 0) == -1 ? -1 : value);
-}
diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3
deleted file mode 100644
index 3fae192..0000000
--- a/lib/libc/gen/sysctl.3
+++ /dev/null
@@ -1,697 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95
-.\"
-.Dd May 9, 1995
-.Dt SYSCTL 3
-.Os
-.Sh NAME
-.Nm sysctl ,
-.Nm sysctlbyname
-.Nd get or set system information
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/sysctl.h>
-.Ft int
-.Fn sysctl "int *name" "u_int namelen" "void *oldp" "size_t *oldlenp" "void *newp" "size_t newlen"
-.Fn sysctlbyname "const char *name" "void *oldp" "size_t *oldlenp" "void *newp" "size_t newlen"
-.Sh DESCRIPTION
-The
-.Fn sysctl
-function retrieves system information and allows processes with
-appropriate privileges to set system information.
-The information available from
-.Fn sysctl
-consists of integers, strings, and tables.
-Information may be retrieved and set from the command interface
-using the
-.Xr sysctl 8
-utility.
-.Pp
-Unless explicitly noted below,
-.Fn sysctl
-returns a consistent snapshot of the data requested.
-Consistency is obtained by locking the destination
-buffer into memory so that the data may be copied out without blocking.
-Calls to
-.Fn sysctl
-are serialized to avoid deadlock.
-.Pp
-The state is described using a ``Management Information Base'' (MIB)
-style name, listed in
-.Fa name ,
-which is a
-.Fa namelen
-length array of integers.
-.Pp
-The
-.Fn sysctlbyname
-function accepts an ascii representation of the name and internally
-looks up the integer name vector. Apart from that, it behaves the same
-as the standard
-.Fn sysctl
-function.
-.Pp
-The information is copied into the buffer specified by
-.Fa oldp .
-The size of the buffer is given by the location specified by
-.Fa oldlenp
-before the call,
-and that location gives the amount of data copied after a successful call
-and after a call that returns with the error code ENOMEM.
-If the amount of data available is greater
-than the size of the buffer supplied,
-the call supplies as much data as fits in the buffer provided
-and returns with the error code ENOMEM.
-If the old value is not desired,
-.Fa oldp
-and
-.Fa oldlenp
-should be set to NULL.
-.Pp
-The size of the available data can be determined by calling
-.Fn sysctl
-with a NULL parameter for
-.Fa oldp .
-The size of the available data will be returned in the location pointed to by
-.Fa oldlenp .
-For some operations, the amount of space may change often.
-For these operations,
-the system attempts to round up so that the returned size is
-large enough for a call to return the data shortly thereafter.
-.Pp
-To set a new value,
-.Fa newp
-is set to point to a buffer of length
-.Fa newlen
-from which the requested value is to be taken.
-If a new value is not to be set,
-.Fa newp
-should be set to NULL and
-.Fa newlen
-set to 0.
-.Pp
-The top level names are defined with a CTL_ prefix in
-.Pa <sys/sysctl.h> ,
-and are as follows.
-The next and subsequent levels down are found in the include files
-listed here, and described in separate sections below.
-.Pp
-.Bl -column CTLXMACHDEPXXX "Next level namesXXXXXX" -offset indent
-.It Sy Pa Name Next level names Description
-.It CTL\_DEBUG sys/sysctl.h Debugging
-.It CTL\_VFS sys/mount.h Filesystem
-.It CTL\_HW sys/sysctl.h Generic CPU, I/O
-.It CTL\_KERN sys/sysctl.h High kernel limits
-.It CTL\_MACHDEP sys/sysctl.h Machine dependent
-.It CTL\_NET sys/socket.h Networking
-.It CTL\_USER sys/sysctl.h User-level
-.It CTL\_VM vm/vm_param.h Virtual memory
-.El
-.Pp
-For example, the following retrieves the maximum number of processes allowed
-in the system:
-.Pp
-.Bd -literal -offset indent -compact
-int mib[2], maxproc;
-size_t len;
-
-mib[0] = CTL_KERN;
-mib[1] = KERN_MAXPROC;
-len = sizeof(maxproc);
-sysctl(mib, 2, &maxproc, &len, NULL, 0);
-.Ed
-.Pp
-To retrieve the standard search path for the system utilities:
-.Pp
-.Bd -literal -offset indent -compact
-int mib[2];
-size_t len;
-char *p;
-
-mib[0] = CTL_USER;
-mib[1] = USER_CS_PATH;
-sysctl(mib, 2, NULL, &len, NULL, 0);
-p = malloc(len);
-sysctl(mib, 2, p, &len, NULL, 0);
-.Ed
-.Sh CTL_DEBUG
-The debugging variables vary from system to system.
-A debugging variable may be added or deleted without need to recompile
-.Fn sysctl
-to know about it.
-Each time it runs,
-.Fn sysctl
-gets the list of debugging variables from the kernel and
-displays their current values.
-The system defines twenty
-.Ns ( Va struct ctldebug )
-variables named
-.Nm debug0
-through
-.Nm debug19 .
-They are declared as separate variables so that they can be
-individually initialized at the location of their associated variable.
-The loader prevents multiple use of the same variable by issuing errors
-if a variable is initialized in more than one place.
-For example, to export the variable
-.Nm dospecialcheck
-as a debugging variable, the following declaration would be used:
-.Bd -literal -offset indent -compact
-int dospecialcheck = 1;
-struct ctldebug debug5 = { "dospecialcheck", &dospecialcheck };
-.Ed
-.Sh CTL_VFS
-A distinguished second level name, VFS_GENERIC,
-is used to get general information about all filesystems.
-One of its third level identifiers is VFS_MAXTYPENUM
-that gives the highest valid filesystem type number.
-Its other third level identifier is VFS_CONF that
-returns configuration information about the filesystem
-type given as a fourth level identifier (see
-.Xr getvfsbyname 3
-as an example of its use).
-The remaining second level identifiers are the
-filesystem type number returned by a
-.Xr statfs 2
-call or from VFS_CONF.
-The third level identifiers available for each filesystem
-are given in the header file that defines the mount
-argument structure for that filesystem.
-.Sh CTL_HW
-The string and integer information available for the CTL_HW level
-is detailed below.
-The changeable column shows whether a process with appropriate
-privilege may change the value.
-.Bl -column "Second level nameXXXXXX" integerXXX -offset indent
-.It Sy Pa Second level name Type Changeable
-.It HW\_MACHINE string no
-.It HW\_MODEL string no
-.It HW\_NCPU integer no
-.It HW\_BYTEORDER integer no
-.It HW\_PHYSMEM integer no
-.It HW\_USERMEM integer no
-.It HW\_PAGESIZE integer no
-.It HW\_FLOATINGPOINT integer no
-.It HW\_MACHINE\_ARCH string no
-.\".It HW\_DISKNAMES integer no
-.\".It HW\_DISKSTATS integer no
-.El
-.Pp
-.Bl -tag -width "123456"
-.It Li HW_MACHINE
-The machine class.
-.It Li HW_MODEL
-The machine model
-.It Li HW_NCPU
-The number of cpus.
-.ne 1i
-.It Li HW_BYTEORDER
-The byteorder (4,321, or 1,234).
-.It Li HW_PHYSMEM
-The bytes of physical memory.
-.It Li HW_USERMEM
-The bytes of non-kernel memory.
-.It Li HW_PAGESIZE
-The software page size.
-.It Li HW_FLOATINGPOINT
-Nonzero if the floating point support is in hardware.
-.It Li HW_MACHINE_ARCH
-The machine dependent architecture type.
-.\".It Fa HW_DISKNAMES
-.\".It Fa HW_DISKSTATS
-.El
-.Sh CTL_KERN
-The string and integer information available for the CTL_KERN level
-is detailed below.
-The changeable column shows whether a process with appropriate
-privilege may change the value.
-The types of data currently available are process information,
-system vnodes, the open file entries, routing table entries,
-virtual memory statistics, load average history, and clock rate
-information.
-.Bl -column "KERNXMAXFILESPERPROCXXX" "struct clockrateXXX" -offset indent
-.It Sy Pa Second level name Type Changeable
-.It KERN\_ARGMAX integer no
-.It KERN\_BOOTFILE string yes
-.It KERN\_BOOTTIME struct timeval no
-.It KERN\_CLOCKRATE struct clockinfo no
-.It KERN\_FILE struct file no
-.It KERN\_HOSTID integer yes
-.It KERN\_HOSTNAME string yes
-.It KERN\_JOB\_CONTROL integer no
-.It KERN\_MAXFILES integer yes
-.It KERN\_MAXFILESPERPROC integer yes
-.It KERN\_MAXPROC integer yes
-.It KERN\_MAXPROCPERUID integer yes
-.It KERN\_MAXVNODES integer yes
-.It KERN\_NGROUPS integer no
-.It KERN\_NISDOMAINNAME string yes
-.It KERN\_OSRELDATE integer no
-.It KERN\_OSRELEASE string no
-.It KERN\_OSREV integer no
-.It KERN\_OSTYPE string no
-.It KERN\_POSIX1 integer no
-.It KERN\_PROC struct proc no
-.It KERN\_PROF node not applicable
-.It KERN\_SAVED\_IDS integer no
-.It KERN\_SECURELVL integer raise only
-.It KERN\_UPDATEINTERVAL integer no
-.It KERN\_VERSION string no
-.It KERN\_VNODE struct vnode no
-.El
-.ne 1i
-.Pp
-.Bl -tag -width "123456"
-.It Li KERN_ARGMAX
-The maximum bytes of argument to
-.Xr execve 2 .
-.It Li KERN_BOOTFILE
-The full pathname of the file from which the kernel was loaded.
-.It Li KERN_BOOTTIME
-A
-.Va struct timeval
-structure is returned.
-This structure contains the time that the system was booted.
-.It Li KERN_CLOCKRATE
-A
-.Va struct clockinfo
-structure is returned.
-This structure contains the clock, statistics clock and profiling clock
-frequencies, the number of micro-seconds per hz tick and the skew rate.
-.It Li KERN_FILE
-Return the entire file table.
-The returned data consists of a single
-.Va struct filehead
-followed by an array of
-.Va struct file ,
-whose size depends on the current number of such objects in the system.
-.It Li KERN_HOSTID
-Get or set the host id.
-.It Li KERN_HOSTNAME
-Get or set the hostname.
-.It Li KERN_JOB_CONTROL
-Return 1 if job control is available on this system, otherwise 0.
-.It Li KERN_MAXFILES
-The maximum number of files that may be open in the system.
-.It Li KERN_MAXFILESPERPROC
-The maximum number of files that may be open for a single process.
-This limit only applies to processes with an effective uid of nonzero
-at the time of the open request.
-Files that have already been opened are not affected if the limit
-or the effective uid is changed.
-.It Li KERN_MAXPROC
-The maximum number of concurrent processes the system will allow.
-.It Li KERN_MAXPROCPERUID
-The maximum number of concurrent processes the system will allow
-for a single effective uid.
-This limit only applies to processes with an effective uid of nonzero
-at the time of a fork request.
-Processes that have already been started are not affected if the limit
-is changed.
-.It Li KERN_MAXVNODES
-The maximum number of vnodes available on the system.
-.It Li KERN_NGROUPS
-The maximum number of supplemental groups.
-.It Li KERN_NISDOMAINNAME
-The name of the current YP/NIS domain.
-.It Li KERN_OSRELDATE
-The system release date in YYYYMM format
-(January 1996 is encoded as 199601).
-.It Li KERN_OSRELEASE
-The system release string.
-.It Li KERN_OSREV
-The system revision string.
-.It Li KERN_OSTYPE
-The system type string.
-.It Li KERN_POSIX1
-The version of ISO/IEC 9945 (POSIX 1003.1) with which the system
-attempts to comply.
-.It Li KERN_PROC
-Return the entire process table, or a subset of it.
-An array of
-.Va struct kinfo_proc
-structures is returned,
-whose size depends on the current number of such objects in the system.
-The third and fourth level names are as follows:
-.Bl -column "Third level nameXXXXXX" "Fourth level is:XXXXXX" -offset indent
-.It Pa Third level name Fourth level is:
-.It KERN\_PROC\_ALL None
-.It KERN\_PROC\_PID A process ID
-.It KERN\_PROC\_PGRP A process group
-.It KERN\_PROC\_TTY A tty device
-.It KERN\_PROC\_UID A user ID
-.It KERN\_PROC\_RUID A real user ID
-.El
-.It Li KERN_PROF
-Return profiling information about the kernel.
-If the kernel is not compiled for profiling,
-attempts to retrieve any of the KERN_PROF values will
-fail with EOPNOTSUPP.
-The third level names for the string and integer profiling information
-is detailed below.
-The changeable column shows whether a process with appropriate
-privilege may change the value.
-.Bl -column "GPROFXGMONPARAMXXX" "struct gmonparamXXX" -offset indent
-.It Sy Pa Third level name Type Changeable
-.It GPROF\_STATE integer yes
-.It GPROF\_COUNT u_short[\|] yes
-.It GPROF\_FROMS u_short[\|] yes
-.It GPROF\_TOS struct tostruct yes
-.It GPROF\_GMONPARAM struct gmonparam no
-.El
-.Pp
-The variables are as follows:
-.Bl -tag -width "123456"
-.It Li GPROF_STATE
-Returns GMON_PROF_ON or GMON_PROF_OFF to show that profiling
-is running or stopped.
-.It Li GPROF_COUNT
-Array of statistical program counter counts.
-.It Li GPROF_FROMS
-Array indexed by program counter of call-from points.
-.It Li GPROF_TOS
-Array of
-.Va struct tostruct
-describing destination of calls and their counts.
-.It Li GPROF_GMONPARAM
-Structure giving the sizes of the above arrays.
-.El
-.ne 1i
-.It Li KERN_SAVED_IDS
-Returns 1 if saved set-group and saved set-user ID is available.
-.It Li KERN_SECURELVL
-The system security level.
-This level may be raised by processes with appropriate privilege.
-It may only be lowered by process 1.
-.It Li KERN_VERSION
-The system version string.
-.It Li KERN_VNODE
-Return the entire vnode table.
-Note, the vnode table is not necessarily a consistent snapshot of
-the system.
-The returned data consists of an array whose size depends on the
-current number of such objects in the system.
-Each element of the array contains the kernel address of a vnode
-.Va struct vnode *
-followed by the vnode itself
-.Va struct vnode .
-.It Li KERN_UPDATEINTERVAL
-The interval between
-.Xr sync 2
-calls in the
-.Xr update 4
-process.
-.El
-.Sh CTL_MACHDEP
-The set of variables defined is architecture dependent.
-The following variables are defined for the i386 architecture.
-.Bl -column "CONSOLE_DEVICEXXX" "struct bootinfoXXX" -offset indent
-.It Sy Pa Second level name Type Changeable
-.It Li CPU_CONSDEV dev_t no
-.It Li CPU_ADJKERNTZ int yes
-.It Li CPU_DISRTCSET int yes
-.It Li CPU_BOOTINFO struct bootinfo no
-.It Li CPU_WALLCLOCK int yes
-.El
-.Sh CTL_NET
-The string and integer information available for the CTL_NET level
-is detailed below.
-The changeable column shows whether a process with appropriate
-privilege may change the value.
-.Bl -column "Second level nameXXXXXX" "routing messagesXXX" -offset indent
-.It Sy Pa Second level name Type Changeable
-.It PF\_ROUTE routing messages no
-.It PF\_INET internet values yes
-.El
-.Pp
-.Bl -tag -width "123456"
-.It Li PF_ROUTE
-Return the entire routing table or a subset of it.
-The data is returned as a sequence of routing messages (see
-.Xr route 4
-for the header file, format and meaning).
-The length of each message is contained in the message header.
-.Pp
-The third level name is a protocol number, which is currently always 0.
-The fourth level name is an address family, which may be set to 0 to
-select all address families.
-The fifth and sixth level names are as follows:
-.Bl -column "Fifth level nameXXXXXX" "Sixth level is:XXX" -offset indent
-.It Pa Fifth level name Sixth level is:
-.It NET\_RT\_FLAGS rtflags
-.It NET\_RT\_DUMP None
-.It NET\_RT\_IFLIST None
-.El
-.It Li PF_INET
-Get or set various global information about the internet protocols.
-The third level name is the protocol.
-The fourth level name is the variable name.
-The currently defined protocols and names are:
-.ne 1i
-.Bl -column "Protocol nameXXXXXX" "Variable nameXXX" "integerXXX" -offset indent
-.It Pa Protocol name Variable name Type Changeable
-.It ip forwarding integer yes
-.It ip redirect integer yes
-.It ip ttl integer yes
-.It icmp maskrepl integer yes
-.It udp checksum integer yes
-.El
-.Pp
-The variables are as follows:
-.Bl -tag -width "123456"
-.It Li ip.forwarding
-Returns 1 when IP forwarding is enabled for the host,
-meaning that the host is acting as a router.
-.It Li ip.redirect
-Returns 1 when ICMP redirects may be sent by the host.
-This option is ignored unless the host is routing IP packets,
-and should normally be enabled on all systems.
-.It Li ip.ttl
-The maximum time-to-live (hop count) value for an IP packet sourced by
-the system.
-This value applies to normal transport protocols, not to ICMP.
-.It Li icmp.maskrepl
-Returns 1 if ICMP network mask requests are to be answered.
-.It Li udp.checksum
-Returns 1 when UDP checksums are being computed and checked.
-Disabling UDP checksums is strongly discouraged.
-.El
-.Sh CTL_USER
-The string and integer information available for the CTL_USER level
-is detailed below.
-The changeable column shows whether a process with appropriate
-privilege may change the value.
-.Bl -column "USER_COLL_WEIGHTS_MAXXXX" "integerXXX" -offset indent
-.It Sy Pa Second level name Type Changeable
-.It USER\_BC\_BASE\_MAX integer no
-.It USER\_BC\_DIM\_MAX integer no
-.It USER\_BC\_SCALE\_MAX integer no
-.It USER\_BC\_STRING\_MAX integer no
-.It USER\_COLL\_WEIGHTS\_MAX integer no
-.It USER\_CS\_PATH string no
-.It USER\_EXPR\_NEST\_MAX integer no
-.It USER\_LINE\_MAX integer no
-.It USER\_POSIX2\_CHAR\_TERM integer no
-.It USER\_POSIX2\_C\_BIND integer no
-.It USER\_POSIX2\_C\_DEV integer no
-.It USER\_POSIX2\_FORT\_DEV integer no
-.It USER\_POSIX2\_FORT\_RUN integer no
-.It USER\_POSIX2\_LOCALEDEF integer no
-.It USER\_POSIX2\_SW\_DEV integer no
-.It USER\_POSIX2\_UPE integer no
-.It USER\_POSIX2\_VERSION integer no
-.It USER\_RE\_DUP\_MAX integer no
-.It USER\_STREAM\_MAX integer no
-.It USER\_TZNAME\_MAX integer no
-.El
-.Bl -tag -width "123456"
-.Pp
-.It Li USER_BC_BASE_MAX
-The maximum ibase/obase values in the
-.Xr bc 1
-utility.
-.It Li USER_BC_DIM_MAX
-The maximum array size in the
-.Xr bc 1
-utility.
-.It Li USER_BC_SCALE_MAX
-The maximum scale value in the
-.Xr bc 1
-utility.
-.It Li USER_BC_STRING_MAX
-The maximum string length in the
-.Xr bc 1
-utility.
-.It Li USER_COLL_WEIGHTS_MAX
-The maximum number of weights that can be assigned to any entry of
-the LC_COLLATE order keyword in the locale definition file.
-.It Li USER_CS_PATH
-Return a value for the
-.Ev PATH
-environment variable that finds all the standard utilities.
-.It Li USER_EXPR_NEST_MAX
-The maximum number of expressions that can be nested within
-parenthesis by the
-.Xr expr 1
-utility.
-.It Li USER_LINE_MAX
-The maximum length in bytes of a text-processing utility's input
-line.
-.It Li USER_POSIX2_CHAR_TERM
-Return 1 if the system supports at least one terminal type capable of
-all operations described in POSIX 1003.2, otherwise 0.
-.It Li USER_POSIX2_C_BIND
-Return 1 if the system's C-language development facilities support the
-C-Language Bindings Option, otherwise 0.
-.It Li USER_POSIX2_C_DEV
-Return 1 if the system supports the C-Language Development Utilities Option,
-otherwise 0.
-.It Li USER_POSIX2_FORT_DEV
-Return 1 if the system supports the FORTRAN Development Utilities Option,
-otherwise 0.
-.It Li USER_POSIX2_FORT_RUN
-Return 1 if the system supports the FORTRAN Runtime Utilities Option,
-otherwise 0.
-.It Li USER_POSIX2_LOCALEDEF
-Return 1 if the system supports the creation of locales, otherwise 0.
-.It Li USER_POSIX2_SW_DEV
-Return 1 if the system supports the Software Development Utilities Option,
-otherwise 0.
-.It Li USER_POSIX2_UPE
-Return 1 if the system supports the User Portability Utilities Option,
-otherwise 0.
-.It Li USER_POSIX2_VERSION
-The version of POSIX 1003.2 with which the system attempts to comply.
-.It Li USER_RE_DUP_MAX
-The maximum number of repeated occurrences of a regular expression
-permitted when using interval notation.
-.ne 1i
-.It Li USER_STREAM_MAX
-The minimum maximum number of streams that a process may have open
-at any one time.
-.It Li USER_TZNAME_MAX
-The minimum maximum number of types supported for the name of a
-timezone.
-.El
-.Sh CTL_VM
-The string and integer information available for the CTL_VM level
-is detailed below.
-The changeable column shows whether a process with appropriate
-privilege may change the value.
-.Bl -column "Second level nameXXXXXX" "struct loadavgXXX" -offset indent
-.It Sy Pa Second level name Type Changeable
-.It VM\_LOADAVG struct loadavg no
-.It VM\_METER struct vmtotal no
-.El
-.Pp
-.Bl -tag -width "123456"
-.It Li VM_LOADAVG
-Return the load average history.
-The returned data consists of a
-.Va struct loadavg .
-.It Li VM_METER
-Return the system wide virtual memory statistics.
-The returned data consists of a
-.Va struct vmtotal .
-.El
-.Sh RETURN VALUES
-If the call to
-.Fn sysctl
-is successful, the number of bytes copied out is returned.
-Otherwise \-1 is returned and
-.Va errno
-is set appropriately.
-.Sh ERRORS
-The following errors may be reported:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-The buffer
-.Fa name ,
-.Fa oldp ,
-.Fa newp ,
-or length pointer
-.Fa oldlenp
-contains an invalid address.
-.It Bq Er EINVAL
-The
-.Fa name
-array is less than two or greater than CTL_MAXNAME.
-.It Bq Er EINVAL
-A non-null
-.Fa newp
-is given and its specified length in
-.Fa newlen
-is too large or too small.
-.It Bq Er ENOMEM
-The length pointed to by
-.Fa oldlenp
-is too short to hold the requested value.
-.It Bq Er ENOTDIR
-The
-.Fa name
-array specifies an intermediate rather than terminal name.
-.It Bq Er EOPNOTSUPP
-The
-.Fa name
-array specifies a value that is unknown.
-.It Bq Er EPERM
-An attempt is made to set a read-only value.
-.It Bq Er EPERM
-A process without appropriate privilege attempts to set a value.
-.El
-.Sh FILES
-.Bl -tag -width <netinet/icmpXvar.h> -compact
-.It Pa <sys/sysctl.h>
-definitions for top level identifiers, second level kernel and hardware
-identifiers, and user level identifiers
-.It Pa <sys/socket.h>
-definitions for second level network identifiers
-.It Pa <sys/gmon.h>
-definitions for third level profiling identifiers
-.It Pa <vm/vm_param.h>
-definitions for second level virtual memory identifiers
-.It Pa <netinet/in.h>
-definitions for third level Internet identifiers and
-fourth level IP identifiers
-.It Pa <netinet/icmp_var.h>
-definitions for fourth level ICMP identifiers
-.It Pa <netinet/udp_var.h>
-definitions for fourth level UDP identifiers
-.El
-.Sh SEE ALSO
-.Xr sysctl 8
-.Sh HISTORY
-The
-.Fn sysctl
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/sysctl.c b/lib/libc/gen/sysctl.c
deleted file mode 100644
index cb7448a..0000000
--- a/lib/libc/gen/sysctl.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)sysctl.c 8.2 (Berkeley) 1/4/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-#include <errno.h>
-#include <limits.h>
-#include <paths.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-
-int
-sysctl(name, namelen, oldp, oldlenp, newp, newlen)
- int *name;
- u_int namelen;
- void *oldp, *newp;
- size_t *oldlenp, newlen;
-{
- if (name[0] != CTL_USER)
- return (__sysctl(name, namelen, oldp, oldlenp, newp, newlen));
-
- if (newp != NULL) {
- errno = EPERM;
- return (-1);
- }
- if (namelen != 2) {
- errno = EINVAL;
- return (-1);
- }
-
- switch (name[1]) {
- case USER_CS_PATH:
- if (oldp && *oldlenp < sizeof(_PATH_STDPATH))
- return (ENOMEM);
- *oldlenp = sizeof(_PATH_STDPATH);
- if (oldp != NULL)
- memmove(oldp, _PATH_STDPATH, sizeof(_PATH_STDPATH));
- return (0);
- }
-
- if (oldp && *oldlenp < sizeof(int))
- return (ENOMEM);
- *oldlenp = sizeof(int);
- if (oldp == NULL)
- return (0);
-
- switch (name[1]) {
- case USER_BC_BASE_MAX:
- *(int *)oldp = BC_BASE_MAX;
- return (0);
- case USER_BC_DIM_MAX:
- *(int *)oldp = BC_DIM_MAX;
- return (0);
- case USER_BC_SCALE_MAX:
- *(int *)oldp = BC_SCALE_MAX;
- return (0);
- case USER_BC_STRING_MAX:
- *(int *)oldp = BC_STRING_MAX;
- return (0);
- case USER_COLL_WEIGHTS_MAX:
- *(int *)oldp = COLL_WEIGHTS_MAX;
- return (0);
- case USER_EXPR_NEST_MAX:
- *(int *)oldp = EXPR_NEST_MAX;
- return (0);
- case USER_LINE_MAX:
- *(int *)oldp = LINE_MAX;
- return (0);
- case USER_RE_DUP_MAX:
- *(int *)oldp = RE_DUP_MAX;
- return (0);
- case USER_POSIX2_VERSION:
- *(int *)oldp = _POSIX2_VERSION;
- return (0);
- case USER_POSIX2_C_BIND:
-#ifdef POSIX2_C_BIND
- *(int *)oldp = 1;
-#else
- *(int *)oldp = 0;
-#endif
- return (0);
- case USER_POSIX2_C_DEV:
-#ifdef POSIX2_C_DEV
- *(int *)oldp = 1;
-#else
- *(int *)oldp = 0;
-#endif
- return (0);
- case USER_POSIX2_CHAR_TERM:
-#ifdef POSIX2_CHAR_TERM
- *(int *)oldp = 1;
-#else
- *(int *)oldp = 0;
-#endif
- return (0);
- case USER_POSIX2_FORT_DEV:
-#ifdef POSIX2_FORT_DEV
- *(int *)oldp = 1;
-#else
- *(int *)oldp = 0;
-#endif
- return (0);
- case USER_POSIX2_FORT_RUN:
-#ifdef POSIX2_FORT_RUN
- *(int *)oldp = 1;
-#else
- *(int *)oldp = 0;
-#endif
- return (0);
- case USER_POSIX2_LOCALEDEF:
-#ifdef POSIX2_LOCALEDEF
- *(int *)oldp = 1;
-#else
- *(int *)oldp = 0;
-#endif
- return (0);
- case USER_POSIX2_SW_DEV:
-#ifdef POSIX2_SW_DEV
- *(int *)oldp = 1;
-#else
- *(int *)oldp = 0;
-#endif
- return (0);
- case USER_POSIX2_UPE:
-#ifdef POSIX2_UPE
- *(int *)oldp = 1;
-#else
- *(int *)oldp = 0;
-#endif
- return (0);
- case USER_STREAM_MAX:
- *(int *)oldp = FOPEN_MAX;
- return (0);
- case USER_TZNAME_MAX:
- *(int *)oldp = NAME_MAX;
- return (0);
- default:
- errno = EINVAL;
- return (-1);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/gen/sysctlbyname.c b/lib/libc/gen/sysctlbyname.c
deleted file mode 100644
index 9c4f346..0000000
--- a/lib/libc/gen/sysctlbyname.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id: sysctlbyname.c,v 1.1 1997/05/30 20:53:13 phk Exp $
- *
- */
-#include <sys/types.h>
-#include <sys/sysctl.h>
-
-int
-sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp,
- size_t newlen)
-{
- int name2oid_oid[2];
- int real_oid[CTL_MAXNAME+2];
- int error, oidlen;
-
- name2oid_oid[0] = 0; /* This is magic & undocumented! */
- name2oid_oid[1] = 3;
-
- oidlen = sizeof(real_oid);
- error = sysctl(name2oid_oid, 2, real_oid, &oidlen, (void *)name,
- strlen(name));
- if (error < 0)
- return error;
- oidlen /= sizeof (int);
- error = sysctl(real_oid, oidlen, oldp, oldlenp, newp, newlen);
- return (error);
-}
-
diff --git a/lib/libc/gen/syslog.3 b/lib/libc/gen/syslog.3
deleted file mode 100644
index ab1bd9d..0000000
--- a/lib/libc/gen/syslog.3
+++ /dev/null
@@ -1,269 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)syslog.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SYSLOG 3
-.Os BSD 4.2
-.Sh NAME
-.Nm syslog ,
-.Nm vsyslog ,
-.Nm openlog ,
-.Nm closelog ,
-.Nm setlogmask
-.Nd control system log
-.Sh SYNOPSIS
-.Fd #include <syslog.h>
-.Fd #include <varargs.h>
-.Ft void
-.Fn syslog "int priority" "const char *message" "..."
-.Ft void
-.Fn vsyslog "int priority" "const char *message" "va_list args"
-.Ft void
-.Fn openlog "const char *ident" "int logopt" "int facility"
-.Ft void
-.Fn closelog void
-.Ft int
-.Fn setlogmask "int maskpri"
-.Sh DESCRIPTION
-The
-.Fn syslog
-function
-writes
-.Fa message
-to the system message logger.
-The message is then written to the system console, log files,
-logged-in users, or forwarded to other machines as appropriate. (See
-.Xr syslogd 8 . )
-.Pp
-The message is identical to a
-.Xr printf 3
-format string, except that
-.Ql %m
-is replaced by the current error
-message. (As denoted by the global variable
-.Va errno ;
-see
-.Xr strerror 3 . )
-A trailing newline is added if none is present.
-.Pp
-The
-.Fn vsyslog
-function
-is an alternate form in which the arguments have already been captured
-using the variable-length argument facilities of
-.Xr varargs 3 .
-.Pp
-The message is tagged with
-.Fa priority .
-Priorities are encoded as a
-.Fa facility
-and a
-.Em level .
-The facility describes the part of the system
-generating the message.
-The level is selected from the following
-.Em ordered
-(high to low) list:
-.Bl -tag -width LOG_AUTHPRIV
-.It Dv LOG_EMERG
-A panic condition.
-This is normally broadcast to all users.
-.It Dv LOG_ALERT
-A condition that should be corrected immediately, such as a corrupted
-system database.
-.It Dv LOG_CRIT
-Critical conditions, e.g., hard device errors.
-.It Dv LOG_ERR
-Errors.
-.It Dv LOG_WARNING
-Warning messages.
-.It Dv LOG_NOTICE
-Conditions that are not error conditions,
-but should possibly be handled specially.
-.It Dv LOG_INFO
-Informational messages.
-.It Dv LOG_DEBUG
-Messages that contain information
-normally of use only when debugging a program.
-.El
-.Pp
-The
-.Fn openlog
-function
-provides for more specialized processing of the messages sent
-by
-.Fn syslog
-and
-.Fn vsyslog .
-The parameter
-.Fa ident
-is a string that will be prepended to every message.
-The
-.Fa logopt
-argument
-is a bit field specifying logging options, which is formed by
-.Tn OR Ns 'ing
-one or more of the following values:
-.Bl -tag -width LOG_AUTHPRIV
-.It Dv LOG_CONS
-If
-.Fn syslog
-cannot pass the message to
-.Xr syslogd 8
-it will attempt to write the message to the console
-.Pq Dq Pa /dev/console.
-.It Dv LOG_NDELAY
-Open the connection to
-.Xr syslogd 8
-immediately.
-Normally the open is delayed until the first message is logged.
-Useful for programs that need to manage the order in which file
-descriptors are allocated.
-.It Dv LOG_PERROR
-Write the message to standard error output as well to the system log.
-.It Dv LOG_PID
-Log the process id with each message: useful for identifying
-instantiations of daemons.
-.El
-.Pp
-The
-.Fa facility
-parameter encodes a default facility to be assigned to all messages
-that do not have an explicit facility encoded:
-.Bl -tag -width LOG_AUTHPRIV
-.It Dv LOG_AUTH
-The authorization system:
-.Xr login 1 ,
-.Xr su 1 ,
-.Xr getty 8 ,
-etc.
-.It Dv LOG_AUTHPRIV
-The same as
-.Dv LOG_AUTH ,
-but logged to a file readable only by
-selected individuals.
-.It Dv LOG_CRON
-The cron daemon:
-.Xr cron 8 .
-.It Dv LOG_DAEMON
-System daemons, such as
-.Xr routed 8 ,
-that are not provided for explicitly by other facilities.
-.It Dv LOG_FTP
-The file transfer protocol daemon:
-.Xr ftpd 8 .
-.It Dv LOG_KERN
-Messages generated by the kernel.
-These cannot be generated by any user processes.
-.It Dv LOG_LPR
-The line printer spooling system:
-.Xr lpr 1 ,
-.Xr lpc 8 ,
-.Xr lpd 8 ,
-etc.
-.It Dv LOG_MAIL
-The mail system.
-.It Dv LOG_NEWS
-The network news system.
-.It Dv LOG_SYSLOG
-Messages generated internally by
-.Xr syslogd 8 .
-.It Dv LOG_USER
-Messages generated by random user processes.
-This is the default facility identifier if none is specified.
-.It Dv LOG_UUCP
-The uucp system.
-.It Dv LOG_LOCAL0
-Reserved for local use.
-Similarly for
-.Dv LOG_LOCAL1
-through
-.Dv LOG_LOCAL7 .
-.El
-.Pp
-The
-.Fn closelog
-function
-can be used to close the log file.
-.Pp
-The
-.Fn setlogmask
-function
-sets the log priority mask to
-.Fa maskpri
-and returns the previous mask.
-Calls to
-.Fn syslog
-with a priority not set in
-.Fa maskpri
-are rejected.
-The mask for an individual priority
-.Fa pri
-is calculated by the macro
-.Fn LOG_MASK pri ;
-the mask for all priorities up to and including
-.Fa toppri
-is given by the macro
-.Fn LOG_UPTO toppri ; .
-The default allows all priorities to be logged.
-.Sh RETURN VALUES
-The routines
-.Fn closelog ,
-.Fn openlog ,
-.Fn syslog
-and
-.Fn vsyslog
-return no value.
-.Pp
-The routine
-.Fn setlogmask
-always returns the previous log mask level.
-.Sh EXAMPLES
-.Bd -literal -offset indent -compact
-syslog(LOG_ALERT, "who: internal error 23");
-
-openlog("ftpd", LOG_PID | LOG_NDELAY, LOG_FTP);
-
-setlogmask(LOG_UPTO(LOG_ERR));
-
-syslog(LOG_INFO, "Connection from host %d", CallingHost);
-
-syslog(LOG_INFO|LOG_LOCAL2, "foobar error: %m");
-.Ed
-.Sh SEE ALSO
-.Xr logger 1 ,
-.Xr syslogd 8
-.Sh HISTORY
-These
-functions appeared in
-.Bx 4.2 .
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c
deleted file mode 100644
index 0eb721e..0000000
--- a/lib/libc/gen/syslog.c
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Copyright (c) 1983, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*
-static char sccsid[] = "@(#)syslog.c 8.5 (Berkeley) 4/29/95";
-*/
-static const char rcsid[] =
- "$Id: syslog.c,v 1.12 1997/03/11 11:52:33 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/syslog.h>
-#include <sys/uio.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <paths.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-static int LogFile = -1; /* fd for log */
-static int connected; /* have done connect */
-static int opened; /* have done openlog() */
-static int LogStat = 0; /* status bits, set by openlog() */
-static const char *LogTag = NULL; /* string to tag the entry with */
-static int LogFacility = LOG_USER; /* default facility code */
-static int LogMask = 0xff; /* mask of priorities to be logged */
-extern char *__progname; /* Program name, from crt0. */
-
-static void disconnectlog __P((void)); /* disconnect from syslogd */
-static void connectlog __P((void)); /* (re)connect to syslogd */
-
-/*
- * Format of the magic cookie passed through the stdio hook
- */
-struct bufcookie {
- char *base; /* start of buffer */
- int left;
-};
-
-/*
- * stdio write hook for writing to a static string buffer
- * XXX: Maybe one day, dynamically allocate it so that the line length
- * is `unlimited'.
- */
-static
-int writehook(cookie, buf, len)
- void *cookie; /* really [struct bufcookie *] */
- char *buf; /* characters to copy */
- int len; /* length to copy */
-{
- struct bufcookie *h; /* private `handle' */
-
- h = (struct bufcookie *)cookie;
- if (len > h->left) {
- /* clip in case of wraparound */
- len = h->left;
- }
- if (len > 0) {
- (void)memcpy(h->base, buf, len); /* `write' it. */
- h->base += len;
- h->left -= len;
- }
- return 0;
-}
-
-/*
- * syslog, vsyslog --
- * print message on log file; output is intended for syslogd(8).
- */
-void
-#if __STDC__
-syslog(int pri, const char *fmt, ...)
-#else
-syslog(pri, fmt, va_alist)
- int pri;
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- vsyslog(pri, fmt, ap);
- va_end(ap);
-}
-
-void
-vsyslog(pri, fmt, ap)
- int pri;
- register const char *fmt;
- va_list ap;
-{
- register int cnt;
- register char ch, *p;
- time_t now;
- int fd, saved_errno;
- char *stdp, tbuf[2048], fmt_cpy[1024];
- FILE *fp, *fmt_fp;
- struct bufcookie tbuf_cookie;
- struct bufcookie fmt_cookie;
-
-#define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID
- /* Check for invalid bits. */
- if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) {
- syslog(INTERNALLOG,
- "syslog: unknown facility/priority: %x", pri);
- pri &= LOG_PRIMASK|LOG_FACMASK;
- }
-
- /* Check priority against setlogmask values. */
- if (!(LOG_MASK(LOG_PRI(pri)) & LogMask))
- return;
-
- saved_errno = errno;
-
- /* Set default facility if none specified. */
- if ((pri & LOG_FACMASK) == 0)
- pri |= LogFacility;
-
- /* Create the primary stdio hook */
- tbuf_cookie.base = tbuf;
- tbuf_cookie.left = sizeof(tbuf);
- fp = fwopen(&tbuf_cookie, writehook);
- if (fp == NULL)
- return;
-
- /* Build the message. */
- (void)time(&now);
- (void)fprintf(fp, "<%d>", pri);
- (void)fprintf(fp, "%.15s ", ctime(&now) + 4);
- if (LogStat & LOG_PERROR) {
- /* Transfer to string buffer */
- (void)fflush(fp);
- stdp = tbuf + (sizeof(tbuf) - tbuf_cookie.left);
- }
- if (LogTag == NULL)
- LogTag = __progname;
- if (LogTag != NULL)
- (void)fprintf(fp, "%s", LogTag);
- if (LogStat & LOG_PID)
- (void)fprintf(fp, "[%d]", getpid());
- if (LogTag != NULL) {
- (void)fprintf(fp, ": ");
- }
-
- /* Check to see if we can skip expanding the %m */
- if (strstr(fmt, "%m")) {
-
- /* Create the second stdio hook */
- fmt_cookie.base = fmt_cpy;
- fmt_cookie.left = sizeof(fmt_cpy) - 1;
- fmt_fp = fwopen(&fmt_cookie, writehook);
- if (fmt_fp == NULL) {
- fclose(fp);
- return;
- }
-
- /* Substitute error message for %m. */
- for ( ; (ch = *fmt); ++fmt)
- if (ch == '%' && fmt[1] == 'm') {
- ++fmt;
- fputs(strerror(saved_errno), fmt_fp);
- } else
- fputc(ch, fmt_fp);
-
- /* Null terminate if room */
- fputc(0, fmt_fp);
- fclose(fmt_fp);
-
- /* Guarantee null termination */
- fmt_cpy[sizeof(fmt_cpy) - 1] = '\0';
-
- fmt = fmt_cpy;
- }
-
- (void)vfprintf(fp, fmt, ap);
- (void)fclose(fp);
-
- cnt = sizeof(tbuf) - tbuf_cookie.left;
-
- /* Output to stderr if requested. */
- if (LogStat & LOG_PERROR) {
- struct iovec iov[2];
- register struct iovec *v = iov;
-
- v->iov_base = stdp;
- v->iov_len = cnt - (stdp - tbuf);
- ++v;
- v->iov_base = "\n";
- v->iov_len = 1;
- (void)writev(STDERR_FILENO, iov, 2);
- }
-
- /* Get connected, output the message to the local logger. */
- if (!opened)
- openlog(LogTag, LogStat | LOG_NDELAY, 0);
- connectlog();
- if (send(LogFile, tbuf, cnt, 0) >= 0)
- return;
-
- /*
- * If the send() failed, the odds are syslogd was restarted.
- * Make one (only) attempt to reconnect to /dev/log.
- */
- disconnectlog();
- connectlog();
- if (send(LogFile, tbuf, cnt, 0) >= 0)
- return;
-
- /*
- * Output the message to the console; don't worry about blocking,
- * if console blocks everything will. Make sure the error reported
- * is the one from the syslogd failure.
- */
- if (LogStat & LOG_CONS &&
- (fd = open(_PATH_CONSOLE, O_WRONLY, 0)) >= 0) {
- struct iovec iov[2];
- register struct iovec *v = iov;
-
- p = strchr(tbuf, '>') + 1;
- v->iov_base = p;
- v->iov_len = cnt - (p - tbuf);
- ++v;
- v->iov_base = "\r\n";
- v->iov_len = 2;
- (void)writev(fd, iov, 2);
- (void)close(fd);
- }
-}
-static void
-disconnectlog()
-{
- /*
- * If the user closed the FD and opened another in the same slot,
- * that's their problem. They should close it before calling on
- * system services.
- */
- if (LogFile != -1) {
- close(LogFile);
- LogFile = -1;
- }
- connected = 0; /* retry connect */
-}
-
-static void
-connectlog()
-{
- struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */
-
- if (LogFile == -1) {
- if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1)
- return;
- (void)fcntl(LogFile, F_SETFD, 1);
- }
- if (LogFile != -1 && !connected) {
- SyslogAddr.sa_len = sizeof(SyslogAddr);
- SyslogAddr.sa_family = AF_UNIX;
- (void)strncpy(SyslogAddr.sa_data, _PATH_LOG,
- sizeof(SyslogAddr.sa_data));
- connected = connect(LogFile, &SyslogAddr,
- sizeof(SyslogAddr)) != -1;
-
- if (!connected) {
- /*
- * Try the old "/dev/log" path, for backward
- * compatibility.
- */
- (void)strncpy(SyslogAddr.sa_data, _PATH_OLDLOG,
- sizeof(SyslogAddr.sa_data));
- connected = connect(LogFile, &SyslogAddr,
- sizeof(SyslogAddr)) != -1;
- }
-
- if (!connected) {
- (void)close(LogFile);
- LogFile = -1;
- }
- }
-}
-
-void
-openlog(ident, logstat, logfac)
- const char *ident;
- int logstat, logfac;
-{
- if (ident != NULL)
- LogTag = ident;
- LogStat = logstat;
- if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0)
- LogFacility = logfac;
-
- if (LogStat & LOG_NDELAY) /* open immediately */
- connectlog();
-
- opened = 1; /* ident and facility has been set */
-}
-
-void
-closelog()
-{
- (void)close(LogFile);
- LogFile = -1;
- connected = 0;
-}
-
-/* setlogmask -- set the log mask level */
-int
-setlogmask(pmask)
- int pmask;
-{
- int omask;
-
- omask = LogMask;
- if (pmask != 0)
- LogMask = pmask;
- return (omask);
-}
diff --git a/lib/libc/gen/tcgetpgrp.3 b/lib/libc/gen/tcgetpgrp.3
deleted file mode 100644
index 045c569..0000000
--- a/lib/libc/gen/tcgetpgrp.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)tcgetpgrp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TCGETPGRP 3
-.Os
-.Sh NAME
-.Nm tcgetpgrp
-.Nd get foreground process group ID
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <unistd.h>
-.Ft pid_t
-.Fn tcgetpgrp "int fd"
-.Sh DESCRIPTION
-The
-.Fn tcgetpgrp
-function returns the value of the process group ID of the foreground
-process group associated with the terminal device.
-If there is no foreground process group,
-.Fn tcgetpgrp
-returns an invalid process ID.
-.Sh ERRORS
-If an error occurs,
-.Fn tcgetpgrp
-returns -1 and the global variable
-.Va errno
-is set to indicate the error, as follows:
-.Bl -tag -width Er
-.It Bq Er EBADF
-The
-.Fa fd
-argument is not a valid file descriptor.
-.It Bq Er ENOTTY
-The calling process does not have a controlling terminal or the
-underlying terminal device represented by
-.Fa fd
-is not the controlling terminal.
-.El
-.Sh SEE ALSO
-.Xr setpgid 2 ,
-.Xr setsid 2 ,
-.Xr tcsetpgrp 3
-.Sh STANDARDS
-The
-.Fn tcgetpgrp
-function is expected to be compliant with the
-.St -p1003.1-88
-specification.
diff --git a/lib/libc/gen/tcsendbreak.3 b/lib/libc/gen/tcsendbreak.3
deleted file mode 100644
index 1e80265..0000000
--- a/lib/libc/gen/tcsendbreak.3
+++ /dev/null
@@ -1,154 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)tcsendbreak.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TCSENDBREAK 3
-.Os
-.Sh NAME
-.Nm tcsendbreak ,
-.Nm tcdrain ,
-.Nm tcflush ,
-.Nm tcflow
-.Nd line control functions
-.Sh SYNOPSIS
-.Fd #include <termios.h>
-.Ft int
-.Fn tcdrain "int fd"
-.Ft int
-.Fn tcflow "int fd" "int action"
-.Ft int
-.Fn tcflush "int fd" "int action"
-.Ft int
-.Fn tcsendbreak "int fd" "int len"
-.Sh DESCRIPTION
-The
-.Fn tcdrain
-function waits until all output written to the terminal referenced by
-.Fa fd
-has been transmitted to the terminal.
-.Pp
-The
-.Fn tcflow
-function suspends transmission of data to or the reception of data from
-the terminal referenced by
-.Fa fd
-depending on the value of
-.Fa action .
-The value of
-.Fa action
-must be one of the following:
-.Bl -tag -width "TCIOFF"
-.It Fa TCOOFF
-Suspend output.
-.It Fa TCOON
-Restart suspended output.
-.It Fa TCIOFF
-Transmit a STOP character, which is intended to cause the terminal to stop
-transmitting data to the system.
-(See the description of IXOFF in the
-.Ql Input Modes
-section of
-.Xr termios 4 ).
-.It Fa TCION
-Transmit a START character, which is intended to cause the terminal to start
-transmitting data to the system.
-(See the description of IXOFF in the
-.Ql Input Modes
-section of
-.Xr termios 4 ).
-.El
-.Pp
-The
-.Fn tcflush
-function discards any data written to the terminal referenced by
-.Fa fd
-which has not been transmitted to the terminal, or any data received
-from the terminal but not yet read, depending on the value of
-.Fa action .
-The value of
-.Fa action
-must be one of the following:
-.Bl -tag -width "TCIOFLUSH"
-.It Fa TCIFLUSH
-Flush data received but not read.
-.It Fa TCOFLUSH
-Flush data written but not transmitted.
-.It Fa TCIOFLUSH
-Flush both data received but not read and data written but not transmitted.
-.El
-.Pp
-The
-.Fn tcsendbreak
-function transmits a continuous stream of zero-valued bits for four-tenths
-of a second to the terminal referenced by
-.Fa fd .
-The
-.Fa len
-parameter is ignored in this implementation.
-.Sh RETURN VALUES
-Upon successful completion, all of these functions return a value of zero.
-.Sh ERRORS
-If any error occurs, a value of -1 is returned and the global variable
-.Va errno
-is set to indicate the error, as follows:
-.Bl -tag -width Er
-.It Bq Er EBADF
-The
-.Fa fd
-argument is not a valid file descriptor.
-.It Bq Er EINVAL
-The
-.Fa action
-argument is not a proper value.
-.It Bq Er ENOTTY
-The file associated with
-.Fa fd
-is not a terminal.
-.It Bq Er EINTR
-A signal interrupted the
-.Fn tcdrain
-function.
-.El
-.Sh SEE ALSO
-.Xr tcsetattr 3 ,
-.Xr termios 4
-.Sh STANDARDS
-The
-.Fn tcsendbreak ,
-.Fn tcdrain ,
-.Fn tcflush
-and
-.Fn tcflow
-functions are expected to be compliant with the
-.St -p1003.1-88
-specification.
diff --git a/lib/libc/gen/tcsetattr.3 b/lib/libc/gen/tcsetattr.3
deleted file mode 100644
index 05dbe08..0000000
--- a/lib/libc/gen/tcsetattr.3
+++ /dev/null
@@ -1,330 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)tcsetattr.3 8.3 (Berkeley) 1/2/94
-.\"
-.Dd January 2, 1994
-.Dt TCSETATTR 3
-.Os
-.Sh NAME
-.Nm cfgetispeed ,
-.Nm cfsetispeed ,
-.Nm cfgetospeed ,
-.Nm cfsetospeed ,
-.Nm cfsetspeed ,
-.Nm cfmakeraw ,
-.Nm tcgetattr ,
-.Nm tcsetattr
-.Nd manipulating the termios structure
-.Sh SYNOPSIS
-.Fd #include <termios.h>
-.Ft speed_t
-.Fn cfgetispeed "const struct termios *t"
-.Ft int
-.Fn cfsetispeed "struct termios *t" "speed_t speed"
-.Ft speed_t
-.Fn cfgetospeed "const struct termios *t"
-.Ft int
-.Fn cfsetospeed "struct termios *t" "speed_t speed"
-.Ft int
-.Fn cfsetspeed "struct termios *t" "speed_t speed"
-.Ft void
-.Fn cfmakeraw "struct termios *t"
-.Ft int
-.Fn tcgetattr "int fd" "struct termios *t"
-.Ft int
-.Fn tcsetattr "int fd" "int action" "const struct termios *t"
-.Sh DESCRIPTION
-The
-.Fn cfmakeraw ,
-.Fn tcgetattr
-and
-.Fn tcsetattr
-functions are provided for getting and setting the termios structure.
-.Pp
-The
-.Fn cfgetispeed ,
-.Fn cfsetispeed ,
-.Fn cfgetospeed ,
-.Fn cfsetospeed
-and
-.Fn cfsetspeed
-functions are provided for getting and setting the baud rate values in
-the termios structure.
-The effects of the functions on the terminal as described below
-do not become effective, nor are all errors detected, until the
-.Fn tcsetattr
-function is called.
-Certain values for baud rates set in the termios structure and passed to
-.Fn tcsetattr
-have special meanings.
-These are discussed in the portion of the manual page that describes the
-.Fn tcsetattr
-function.
-.Sh GETTING AND SETTING THE BAUD RATE
-The input and output baud rates are found in the termios structure.
-The unsigned integer
-.Li speed_t
-is typdef'd in the include file
-.Aq Pa termios.h .
-The value of the integer corresponds directly to the baud rate being
-represented, however, the following symbolic values are defined.
-.Bd -literal
-#define B0 0
-#define B50 50
-#define B75 75
-#define B110 110
-#define B134 134
-#define B150 150
-#define B200 200
-#define B300 300
-#define B600 600
-#define B1200 1200
-#define B1800 1800
-#define B2400 2400
-#define B4800 4800
-#define B9600 9600
-#define B19200 19200
-#define B38400 38400
-#ifndef _POSIX_SOURCE
-#define EXTA 19200
-#define EXTB 38400
-#endif /*_POSIX_SOURCE */
-.Ed
-.Pp
-The
-.Fn cfgetispeed
-function returns the input baud rate in the termios structure referenced by
-.Fa tp .
-.Pp
-The
-.Fn cfsetispeed
-function sets the input baud rate in the termios structure referenced by
-.Fa tp
-to
-.Fa speed .
-.Pp
-The
-.Fn cfgetospeed
-function returns the output baud rate in the termios structure referenced by
-.Fa tp .
-.Pp
-The
-.Fn cfsetospeed
-function sets the output baud rate in the termios structure referenced by
-.Fa tp
-to
-.Fa speed .
-.Pp
-The
-.Fn cfsetspeed
-function sets both the input and output baud rate in the termios structure
-referenced by
-.Fa tp
-to
-.Fa speed .
-.Pp
-Upon successful completion, the functions
-.Fn cfsetispeed ,
-.Fn cfsetospeed ,
-and
-.Fn cfsetspeed
-return a value of 0.
-Otherwise, a value of -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh GETTING AND SETTING THE TERMIOS STATE
-This section describes the functions that are used to control the general
-terminal interface.
-Unless otherwise noted for a specific command, these functions are restricted
-from use by background processes.
-Attempts to perform these operations shall cause the process group to be sent
-a SIGTTOU signal.
-If the calling process is blocking or ignoring SIGTTOU signals, the process
-is allowed to perform the operation and the SIGTTOU signal is not sent.
-.Pp
-In all the functions, although
-.Fa fd
-is an open file descriptor, the functions affect the underlying terminal
-file, not just the open file description associated with the particular
-file descriptor.
-.Pp
-The
-.Fn cfmakeraw
-function sets the flags stored in the termios structure to a state disabling
-all input and output processing, giving a
-.Dq raw I/O path.
-It should be noted that there is no function to reverse this effect.
-This is because there are a variety of processing options that could be
-re-enabled and the correct method is for an application to snapshot the
-current terminal state using the function
-.Fn tcgetattr ,
-setting raw mode with
-.Fn cfmakeraw
-and the subsequent
-.Fn tcsetattr ,
-and then using another
-.Fn tcsetattr
-with the saved state to revert to the previous terminal state.
-.Pp
-The
-.Fn tcgetattr
-function copies the parameters associated with the terminal referenced
-by
-.Fa fd
-in the termios structure referenced by
-.Fa tp .
-This function is allowed from a background process, however, the terminal
-attributes may be subsequently changed by a foreground process.
-.Pp
-The
-.Fn tcsetattr
-function sets the parameters associated with the terminal from the
-termios structure referenced by
-.Fa tp .
-The
-.Fa action
-field is created by
-.Em or Ns 'ing
-the following values, as specified in the include file
-.Aq Pa termios.h .
-.Bl -tag -width "TCSADRAIN"
-.It Fa TCSANOW
-The change occurs immediately.
-.It Fa TCSADRAIN
-The change occurs after all output written to
-.Fa fd
-has been transmitted to the terminal.
-This value of
-.Fa action
-should be used when changing parameters that affect output.
-.It Fa TCSAFLUSH
-The change occurs after all output written to
-.Fa fd
-has been transmitted to the terminal.
-Additionally, any input that has been received but not read is discarded.
-.It Fa TCSASOFT
-If this value is
-.Em or Ns 'ed
-into the
-.Fa action
-value, the values of the
-.Em c_cflag ,
-.Em c_ispeed ,
-and
-.Em c_ospeed
-fields are ignored.
-.El
-.Pp
-The 0 baud rate is used to terminate the connection.
-If 0 is specified as the output speed to the function
-.Fn tcsetattr ,
-modem control will no longer be asserted on the terminal, disconnecting
-the terminal.
-.Pp
-If zero is specified as the input speed to the function
-.Fn tcsetattr ,
-the input baud rate will be set to the same value as that specified by
-the output baud rate.
-.Pp
-If
-.Fn tcsetattr
-is unable to make any of the requested changes, it returns -1 and
-sets errno.
-Otherwise, it makes all of the requested changes it can.
-If the specified input and output baud rates differ and are a combination
-that is not supported, neither baud rate is changed.
-.Pp
-Upon successful completion, the functions
-.Fn tcgetattr
-and
-.Fn tcsetattr
-return a value of 0.
-Otherwise, they
-return -1 and the global variable
-.Va errno
-is set to indicate the error, as follows:
-.Bl -tag -width Er
-.It Bq Er EBADF
-The
-.Fa fd
-argument to
-.Fn tcgetattr
-or
-.Fn tcsetattr
-was not a valid file descriptor.
-.It Bq Er EINTR
-The
-.Fn tcsetattr
-function was interrupted by a signal.
-.It Bq Er EINVAL
-The
-.Fa action
-argument to the
-.Fn tcsetattr
-function was not valid, or an attempt was made to change an attribute
-represented in the termios structure to an unsupported value.
-.It Bq Er ENOTTY
-The file associated with the
-.Fa fd
-argument to
-.Fn tcgetattr
-or
-.Fn tcsetattr
-is not a terminal.
-.El
-.Sh SEE ALSO
-.Xr tcsendbreak 3 ,
-.Xr termios 4
-.Sh STANDARDS
-The
-.Fn cfgetispeed ,
-.Fn cfsetispeed ,
-.Fn cfgetospeed ,
-.Fn cfsetospeed ,
-.Fn tcgetattr
-and
-.Fn tcsetattr
-functions are expected to be compliant with the
-.St -p1003.1-88
-specification.
-The
-.Fn cfmakeraw
-and
-.Fn cfsetspeed
-functions,
-as well as the
-.Li TCSASOFT
-option to the
-.Fn tcsetattr
-function are extensions to the
-.St -p1003.1-88
-specification.
diff --git a/lib/libc/gen/tcsetpgrp.3 b/lib/libc/gen/tcsetpgrp.3
deleted file mode 100644
index 684ec4c..0000000
--- a/lib/libc/gen/tcsetpgrp.3
+++ /dev/null
@@ -1,100 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)tcsetpgrp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TCSETPGRP 3
-.Os
-.Sh NAME
-.Nm tcsetpgrp
-.Nd set foreground process group ID
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <unistd.h>
-.Ft int
-.Fn tcsetpgrp "int fd" "pid_t pgrp_id"
-.Sh DESCRIPTION
-If the process has a controlling terminal, the
-.Nm tcsetpgrp
-function sets the foreground process group ID associated with the
-terminal device to
-.Fa pgrp_id .
-The terminal device associated with
-.Fa fd
-must be the controlling terminal of the calling process and the
-controlling terminal must be currently associated with the session
-of the calling process.
-The value of
-.Fa pgrp_id
-must be the same as the process group ID of a process in the same
-session as the calling process.
-.Pp
-Upon successful completion,
-.Nm tcsetpgrp
-returns a value of zero.
-.Sh ERRORS
-If an error occurs,
-.Nm tcgetpgrp
-returns -1 and the global variable
-.Va errno
-is set to indicate the error, as follows:
-.Bl -tag -width Er
-.It Bq Er EBADF
-The
-.Fa fd
-argument is not a valid file descriptor.
-.It Bq Er EINVAL
-An invalid value of
-.Fa pgrp_id
-was specified.
-.It Bq Er ENOTTY
-The calling process does not have a controlling terminal, or the file
-represented by
-.Fa fd
-is not the controlling terminal, or the controlling terminal is no
-longer associated with the session of the calling process.
-.It Bq Er EPERM
-The
-.Fa pgrp_id
-argument does not match the process group ID of a process in the same
-session as the calling process.
-.El
-.Sh SEE ALSO
-.Xr setpgid 2 ,
-.Xr setsid 2 ,
-.Xr tcgetpgrp 3
-.Sh STANDARDS
-The
-.Nm tcsetpgprp
-function is expected to be compliant with the
-.St -p1003.1-88
-specification.
diff --git a/lib/libc/gen/telldir.c b/lib/libc/gen/telldir.c
deleted file mode 100644
index ab23d9d..0000000
--- a/lib/libc/gen/telldir.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)telldir.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/*
- * The option SINGLEUSE may be defined to say that a telldir
- * cookie may be used only once before it is freed. This option
- * is used to avoid having memory usage grow without bound.
- */
-#define SINGLEUSE
-
-/*
- * One of these structures is malloced to describe the current directory
- * position each time telldir is called. It records the current magic
- * cookie returned by getdirentries and the offset within the buffer
- * associated with that return value.
- */
-struct ddloc {
- struct ddloc *loc_next;/* next structure in list */
- long loc_index; /* key associated with structure */
- long loc_seek; /* magic cookie returned by getdirentries */
- long loc_loc; /* offset of entry in buffer */
- const DIR* loc_dirp; /* directory which used this entry */
-};
-
-#define NDIRHASH 32 /* Num of hash lists, must be a power of 2 */
-#define LOCHASH(i) ((i)&(NDIRHASH-1))
-
-static long dd_loccnt; /* Index of entry for sequential readdir's */
-static struct ddloc *dd_hash[NDIRHASH]; /* Hash list heads for ddlocs */
-
-/*
- * return a pointer into a directory
- */
-long
-telldir(dirp)
- const DIR *dirp;
-{
- register int index;
- register struct ddloc *lp;
-
- if ((lp = (struct ddloc *)malloc(sizeof(struct ddloc))) == NULL)
- return (-1);
- index = dd_loccnt++;
- lp->loc_index = index;
- lp->loc_seek = dirp->dd_seek;
- lp->loc_loc = dirp->dd_loc;
- lp->loc_dirp = dirp;
- lp->loc_next = dd_hash[LOCHASH(index)];
- dd_hash[LOCHASH(index)] = lp;
- return (index);
-}
-
-/*
- * seek to an entry in a directory.
- * Only values returned by "telldir" should be passed to seekdir.
- */
-void
-_seekdir(dirp, loc)
- register DIR *dirp;
- long loc;
-{
- register struct ddloc *lp;
- register struct ddloc **prevlp;
- struct dirent *dp;
-
- prevlp = &dd_hash[LOCHASH(loc)];
- lp = *prevlp;
- while (lp != NULL) {
- if (lp->loc_index == loc)
- break;
- prevlp = &lp->loc_next;
- lp = lp->loc_next;
- }
- if (lp == NULL)
- return;
- if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek)
- goto found;
- (void) lseek(dirp->dd_fd, (off_t)lp->loc_seek, SEEK_SET);
- dirp->dd_seek = lp->loc_seek;
- dirp->dd_loc = 0;
- while (dirp->dd_loc < lp->loc_loc) {
- dp = readdir(dirp);
- if (dp == NULL)
- break;
- }
-found:
-#ifdef SINGLEUSE
- *prevlp = lp->loc_next;
- free((caddr_t)lp);
-#endif
-}
-
-/*
- * Reclaim memory for telldir cookies which weren't used.
- */
-void
-_reclaim_telldir(dirp)
- register const DIR *dirp;
-{
- register struct ddloc *lp;
- register struct ddloc **prevlp;
- int i;
-
- for (i = 0; i < NDIRHASH; i++) {
- prevlp = &dd_hash[i];
- lp = *prevlp;
- while (lp != NULL) {
- if (lp->loc_dirp == dirp) {
- *prevlp = lp->loc_next;
- free((caddr_t)lp);
- lp = *prevlp;
- continue;
- }
- prevlp = &lp->loc_next;
- lp = lp->loc_next;
- }
- }
-}
diff --git a/lib/libc/gen/termios.c b/lib/libc/gen/termios.c
deleted file mode 100644
index 5264a2d..0000000
--- a/lib/libc/gen/termios.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)termios.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-
-#include <errno.h>
-#include <termios.h>
-#include <unistd.h>
-
-int
-tcgetattr(fd, t)
- int fd;
- struct termios *t;
-{
-
- return (ioctl(fd, TIOCGETA, t));
-}
-
-int
-tcsetattr(fd, opt, t)
- int fd, opt;
- const struct termios *t;
-{
- struct termios localterm;
-
- if (opt & TCSASOFT) {
- localterm = *t;
- localterm.c_cflag |= CIGNORE;
- t = &localterm;
- }
- switch (opt & ~TCSASOFT) {
- case TCSANOW:
- return (ioctl(fd, TIOCSETA, t));
- case TCSADRAIN:
- return (ioctl(fd, TIOCSETAW, t));
- case TCSAFLUSH:
- return (ioctl(fd, TIOCSETAF, t));
- default:
- errno = EINVAL;
- return (-1);
- }
-}
-
-int
-#if __STDC__
-tcsetpgrp(int fd, pid_t pgrp)
-#else
-tcsetpgrp(fd, pgrp)
- int fd;
- pid_t pgrp;
-#endif
-{
- int s;
-
- s = pgrp;
- return (ioctl(fd, TIOCSPGRP, &s));
-}
-
-pid_t
-tcgetpgrp(fd)
- int fd;
-{
- int s;
-
- if (ioctl(fd, TIOCGPGRP, &s) < 0)
- return ((pid_t)-1);
-
- return ((pid_t)s);
-}
-
-speed_t
-cfgetospeed(t)
- const struct termios *t;
-{
-
- return (t->c_ospeed);
-}
-
-speed_t
-cfgetispeed(t)
- const struct termios *t;
-{
-
- return (t->c_ispeed);
-}
-
-int
-cfsetospeed(t, speed)
- struct termios *t;
- speed_t speed;
-{
-
- t->c_ospeed = speed;
- return (0);
-}
-
-int
-cfsetispeed(t, speed)
- struct termios *t;
- speed_t speed;
-{
-
- t->c_ispeed = speed;
- return (0);
-}
-
-int
-cfsetspeed(t, speed)
- struct termios *t;
- speed_t speed;
-{
-
- t->c_ispeed = t->c_ospeed = speed;
- return (0);
-}
-
-/*
- * Make a pre-existing termios structure into "raw" mode: character-at-a-time
- * mode with no characters interpreted, 8-bit data path.
- */
-void
-cfmakeraw(t)
- struct termios *t;
-{
-
- t->c_iflag &= ~(IMAXBEL|IXOFF|INPCK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IGNPAR);
- t->c_iflag |= IGNBRK;
- t->c_oflag &= ~OPOST;
- t->c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|ICANON|ISIG|IEXTEN|NOFLSH|TOSTOP|PENDIN);
- t->c_cflag &= ~(CSIZE|PARENB);
- t->c_cflag |= CS8|CREAD;
- t->c_cc[VMIN] = 1;
- t->c_cc[VTIME] = 0;
-}
-
-int
-tcsendbreak(fd, len)
- int fd, len;
-{
- struct timeval sleepytime;
-
- sleepytime.tv_sec = 0;
- sleepytime.tv_usec = 400000;
- if (ioctl(fd, TIOCSBRK, 0) == -1)
- return (-1);
- (void)select(0, 0, 0, 0, &sleepytime);
- if (ioctl(fd, TIOCCBRK, 0) == -1)
- return (-1);
- return (0);
-}
-
-int
-tcdrain(fd)
- int fd;
-{
-
- return (ioctl(fd, TIOCDRAIN, 0));
-}
-
-int
-tcflush(fd, which)
- int fd, which;
-{
- int com;
-
- switch (which) {
- case TCIFLUSH:
- com = FREAD;
- break;
- case TCOFLUSH:
- com = FWRITE;
- break;
- case TCIOFLUSH:
- com = FREAD | FWRITE;
- break;
- default:
- errno = EINVAL;
- return (-1);
- }
- return (ioctl(fd, TIOCFLUSH, &com));
-}
-
-int
-tcflow(fd, action)
- int fd, action;
-{
- struct termios term;
- u_char c;
-
- switch (action) {
- case TCOOFF:
- return (ioctl(fd, TIOCSTOP, 0));
- case TCOON:
- return (ioctl(fd, TIOCSTART, 0));
- case TCION:
- case TCIOFF:
- if (tcgetattr(fd, &term) == -1)
- return (-1);
- c = term.c_cc[action == TCIOFF ? VSTOP : VSTART];
- if (c != _POSIX_VDISABLE && write(fd, &c, sizeof(c)) == -1)
- return (-1);
- return (0);
- default:
- errno = EINVAL;
- return (-1);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/gen/time.3 b/lib/libc/gen/time.3
deleted file mode 100644
index ecf767d..0000000
--- a/lib/libc/gen/time.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)time.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TIME 3
-.Os BSD 4
-.Sh NAME
-.Nm time
-.Nd get time of day
-.Sh SYNOPSIS
-.Fd #include <time.h>
-.Ft time_t
-.Fn time "time_t *tloc"
-.Sh DESCRIPTION
-The
-.Fn time
-function
-returns the value of time in seconds since 0 hours, 0 minutes,
-0 seconds, January 1, 1970, Coordinated Universal Time.
-.Pp
-A copy of the time value may be saved to the area indicated by the
-pointer
-.Fa tloc .
-If
-.Fa tloc
-is a NULL pointer, no value is stored.
-.Pp
-Upon successful completion,
-.Fn time
-returns the value of time.
-Otherwise a value of
-.Po
-.Po Fa time_t Pc \-1
-.Pc
-is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The following error codes may be set in
-.Va errno :
-.Bl -tag -width [EFAULT]
-.It Bq Er EFAULT
-An argument address referenced invalid memory.
-.Sh SEE ALSO
-.Xr gettimeofday 2 ,
-.Xr ctime 3
-.Sh HISTORY
-A
-.Fn time
-function appeared in
-.At v6 .
diff --git a/lib/libc/gen/time.c b/lib/libc/gen/time.c
deleted file mode 100644
index 044d3a2..0000000
--- a/lib/libc/gen/time.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)time.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-time_t
-time(t)
- time_t *t;
-{
- struct timeval tt;
-
- if (gettimeofday(&tt, (struct timezone *)0) < 0)
- return(-1);
- if (t)
- *t = tt.tv_sec;
- return(tt.tv_sec);
-}
diff --git a/lib/libc/gen/times.3 b/lib/libc/gen/times.3
deleted file mode 100644
index 4bf6689..0000000
--- a/lib/libc/gen/times.3
+++ /dev/null
@@ -1,137 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)times.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TIMES 3
-.Os BSD 4
-.Sh NAME
-.Nm times
-.Nd process times
-.Sh SYNOPSIS
-.Fd #include <sys/times.h>
-.Ft clock_t
-.Fn times "struct tms *tp"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is obsoleted by getrusage(2)
-and gettimeofday(3).
-.Ef
-.Pp
-The
-.Fn times
-function returns the value of time in
-.Dv CLK_TCK Ns 's
-of a second since
-0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal
-Time.
-.Pp
-It also fills in the structure pointed to by
-.Fa tp
-with time-accounting information.
-.Pp
-The
-.Fa tms
-structure is defined as follows:
-.Bd -literal -offset indent
-typedef struct {
- clock_t tms_utime;
- clock_t tms_stime;
- clock_t tms_cutime;
- clock_t tms_cstime;
-}
-.Ed
-.Pp
-The elements of this structure are defined as follows:
-.Bl -tag -width tms_cutime
-.It Fa tms_utime
-The
-.Tn CPU
-time charged for the execution of user instructions.
-.It Fa tms_stime
-The
-.Tn CPU
-time charged for execution by the system on behalf of
-the process.
-.It Fa tms_cutime
-The sum of the
-.Fa tms_utime s
-and
-.Fa tms_cutime s
-of the child processes.
-.It Fa tms_cstime
-The sum of the
-.Fa tms_stime Ns s
-and
-.Fa tms_cstime Ns s
-of the child processes.
-.El
-.Pp
-All times are in
-.Dv CLK_TCK Ns 's
-of a second.
-.Pp
-The times of a terminated child process are included in the
-.Fa tms_cutime
-and
-.Fa tms_cstime
-elements of the parent when one of the
-.Xr wait 2
-functions returns the process ID of the terminated child to the parent.
-If an error occurs,
-.Fn times
-returns the value
-.Pq (clock_t)\-1 ,
-and sets errno to indicate the error.
-.Sh ERRORS
-The
-.Fn times
-function
-may fail and set the global variable
-.Va errno
-for any of the errors specified for the library
-routines
-.Xr getrusage 2
-and
-.Xr gettimeofday 2 .
-.Sh SEE ALSO
-.Xr time 1 ,
-.Xr getrusage 2 ,
-.Xr gettimeofday 2 ,
-.Xr wait 2 ,
-.Xr clocks 7
-.Sh STANDARDS
-The
-.Fn times
-function
-conforms to
-.St -p1003.1-88 .
diff --git a/lib/libc/gen/times.c b/lib/libc/gen/times.c
deleted file mode 100644
index c145d0a..0000000
--- a/lib/libc/gen/times.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)times.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/times.h>
-#include <sys/resource.h>
-
-/*
- * Convert usec to clock ticks; could do (usec * CLK_TCK) / 1000000,
- * but this would overflow if we switch to nanosec.
- */
-#define CONVTCK(r) (r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK))
-
-clock_t
-times(tp)
- register struct tms *tp;
-{
- struct rusage ru;
- struct timeval t;
-
- if (getrusage(RUSAGE_SELF, &ru) < 0)
- return ((clock_t)-1);
- tp->tms_utime = CONVTCK(ru.ru_utime);
- tp->tms_stime = CONVTCK(ru.ru_stime);
- if (getrusage(RUSAGE_CHILDREN, &ru) < 0)
- return ((clock_t)-1);
- tp->tms_cutime = CONVTCK(ru.ru_utime);
- tp->tms_cstime = CONVTCK(ru.ru_stime);
- if (gettimeofday(&t, (struct timezone *)0))
- return ((clock_t)-1);
- return ((clock_t)(CONVTCK(t)));
-}
diff --git a/lib/libc/gen/timezone.3 b/lib/libc/gen/timezone.3
deleted file mode 100644
index d7ac13c..0000000
--- a/lib/libc/gen/timezone.3
+++ /dev/null
@@ -1,67 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)timezone.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt TIMEZONE 3
-.Os
-.Sh NAME
-.Nm timezone
-.Nd return the timezone abbreviation
-.Sh SYNOPSIS
-.Ft char *
-.Fn timezone "int zone" "int dst"
-.Sh DESCRIPTION
-.ft B
-This interface is for compatibility only; it is impossible to reliably
-map timezone's arguments to a time zone abbreviation.
-See ctime(3).
-.ft P
-.Pp
-The
-.Fn timezone
-function returns a pointer to a time zone abbreviation for the specified
-.Ar zone
-and
-.Ar dst
-values.
-.Ar Zone
-is the number of minutes west of GMT and
-.Ar dst
-is non-zero if daylight savings time is in effect.
-.Sh SEE ALSO
-.Xr ctime 3
-.Sh HISTORY
-A
-.Fn timezone
-function appeared in
-.At v7 .
diff --git a/lib/libc/gen/timezone.c b/lib/libc/gen/timezone.c
deleted file mode 100644
index fe3ce23..0000000
--- a/lib/libc/gen/timezone.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)timezone.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#define TZ_MAX_CHARS 255
-
-char *_tztab();
-
-/*
- * timezone --
- * The arguments are the number of minutes of time you are westward
- * from Greenwich and whether DST is in effect. It returns a string
- * giving the name of the local timezone. Should be replaced, in the
- * application code, by a call to localtime.
- */
-
-static char czone[TZ_MAX_CHARS]; /* space for zone name */
-
-char *
-timezone(zone, dst)
- int zone,
- dst;
-{
- register char *beg,
- *end;
-
- if ( (beg = getenv("TZNAME")) ) { /* set in environment */
- if ( (end = index(beg, ',')) ) {/* "PST,PDT" */
- if (dst)
- return(++end);
- *end = '\0';
- (void)strncpy(czone,beg,sizeof(czone) - 1);
- czone[sizeof(czone) - 1] = '\0';
- *end = ',';
- return(czone);
- }
- return(beg);
- }
- return(_tztab(zone,dst)); /* default: table or created zone */
-}
-
-static struct zone {
- int offset;
- char *stdzone;
- char *dlzone;
-} zonetab[] = {
- {-1*60, "MET", "MET DST"}, /* Middle European */
- {-2*60, "EET", "EET DST"}, /* Eastern European */
- {4*60, "AST", "ADT"}, /* Atlantic */
- {5*60, "EST", "EDT"}, /* Eastern */
- {6*60, "CST", "CDT"}, /* Central */
- {7*60, "MST", "MDT"}, /* Mountain */
- {8*60, "PST", "PDT"}, /* Pacific */
-#ifdef notdef
- /* there's no way to distinguish this from WET */
- {0, "GMT", 0}, /* Greenwich */
-#endif
- {0*60, "WET", "WET DST"}, /* Western European */
- {-10*60,"EST", "EST"}, /* Aust: Eastern */
- {-10*60+30,"CST", "CST"}, /* Aust: Central */
- {-8*60, "WST", 0}, /* Aust: Western */
- {-1}
-};
-
-/*
- * _tztab --
- * check static tables or create a new zone name; broken out so that
- * we can make a guess as to what the zone is if the standard tables
- * aren't in place in /etc. DO NOT USE THIS ROUTINE OUTSIDE OF THE
- * STANDARD LIBRARY.
- */
-char *
-_tztab(zone,dst)
- register int zone;
- int dst;
-{
- register struct zone *zp;
- register char sign;
-
- for (zp = zonetab; zp->offset != -1;++zp) /* static tables */
- if (zp->offset == zone) {
- if (dst && zp->dlzone)
- return(zp->dlzone);
- if (!dst && zp->stdzone)
- return(zp->stdzone);
- }
-
- if (zone < 0) { /* create one */
- zone = -zone;
- sign = '+';
- }
- else
- sign = '-';
- (void)sprintf(czone,"GMT%c%d:%02d",sign,zone / 60,zone % 60);
- return(czone);
-}
diff --git a/lib/libc/gen/ttyname.3 b/lib/libc/gen/ttyname.3
deleted file mode 100644
index 7476a9f..0000000
--- a/lib/libc/gen/ttyname.3
+++ /dev/null
@@ -1,126 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ttyname.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TTYNAME 3
-.Os
-.Sh NAME
-.Nm ttyname ,
-.Nm isatty ,
-.Nm ttyslot
-.Nd get name of associated terminal (tty) from file descriptor
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft char *
-.Fn ttyname "int fd"
-.Ft int
-.Fn isatty "int fd"
-.Ft int
-.Fn ttyslot void
-.Sh DESCRIPTION
-These functions operate on the system file descriptors for terminal
-type devices. These descriptors are not related to the standard
-.Tn I/O
-.Dv FILE
-typedef, but refer to the special device files found in
-.Pa /dev
-and named
-.Pa /dev/tty Ns Em xx
-and for which an entry exists
-in the initialization file
-.Pa /etc/ttys.
-(See
-.Xr ttys 5 . )
-.Pp
-The
-.Fn isatty
-function
-determines if the file descriptor
-.Fa fd
-refers to a valid
-terminal type device.
-.Pp
-The
-.Fn ttyname
-function
-gets the related device name of
-a file descriptor for which
-.Fn isatty
-is true
-.Pp
-The
-.Fn ttyslot
-function
-fetches the current process' control terminal number from the
-.Xr ttys 5
-file entry.
-.Sh RETURN VALUES
-The
-.Fn ttyname
-function
-returns the null terminated name if the device is found and
-.Fn isatty
-is true; otherwise
-a
-.Dv NULL
-pointer is returned.
-.Pp
-The
-.Fn ttyslot
-function
-returns the unit number of the device file if found; otherwise
-the value zero is returned.
-.Sh FILES
-.Bl -tag -width /etc/ttys -compact
-.It Pa /dev/\(**
-.It Pa /etc/ttys
-.El
-.Sh SEE ALSO
-.Xr ioctl 2 ,
-.Xr ttys 5
-.Sh HISTORY
-A
-.Fn isatty ,
-.Fn ttyname ,
-and
-.Fn ttyslot
-function
-appeared in
-.At v7 .
-.Sh BUGS
-The
-.Fn ttyname
-function leaves its result in an internal static object and returns
-a pointer to that object. Subsequent calls to
-.Fn ttyname
-will modify the same object.
diff --git a/lib/libc/gen/ttyname.c b/lib/libc/gen/ttyname.c
deleted file mode 100644
index b2f3f79..0000000
--- a/lib/libc/gen/ttyname.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ttyname.c 8.2 (Berkeley) 1/27/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <termios.h>
-#include <unistd.h>
-#include <db.h>
-#include <string.h>
-#include <paths.h>
-
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-static struct pthread_mutex _ttyname_lockd = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t ttyname_lock = &_ttyname_lockd;
-static pthread_key_t ttyname_key;
-static int ttyname_init = 0;
-
-char *
-ttyname(int fd)
-{
- char *ret;
-
- if (_thread_fd_lock(fd, FD_READ, NULL, __FILE__, __LINE__) == 0) {
- ret = __ttyname_basic(fd);
- _thread_fd_unlock(fd, FD_READ);
- } else {
- ret = NULL;
- }
-
- return (ret);
-}
-
-char *
-__ttyname_r_basic(int fd, char *buf, size_t len)
-{
- register struct dirent *dirp;
- register DIR *dp;
- struct stat dsb;
- struct stat sb;
- char *rval;
- int minlen;
-
- rval = NULL;
-
- /* Must be a terminal. */
- if (!isatty(fd))
- return (rval);
- /* Must be a character device. */
- if (_thread_sys_fstat(fd, &sb) || !S_ISCHR(sb.st_mode))
- return (rval);
- /* Must have enough room */
- if (len <= sizeof(_PATH_DEV))
- return (rval);
-
- if ((dp = opendir(_PATH_DEV)) != NULL) {
- memcpy(buf, _PATH_DEV, sizeof(_PATH_DEV));
- for (rval = NULL; (dirp = readdir(dp)) != NULL;) {
- if (dirp->d_fileno != sb.st_ino)
- continue;
- minlen = (len - (sizeof(_PATH_DEV) - 1)) < (dirp->d_namlen + 1) ?
- (len - (sizeof(_PATH_DEV) - 1)) : (dirp->d_namlen + 1);
- memcpy(buf + sizeof(_PATH_DEV) - 1, dirp->d_name, minlen);
- if (stat(buf, &dsb) || sb.st_dev != dsb.st_dev ||
- sb.st_ino != dsb.st_ino)
- continue;
- rval = buf;
- break;
- }
- (void) closedir(dp);
- }
- return (rval);
-}
-
-char *
-__ttyname_basic(int fd)
-{
- char *buf;
-
- pthread_mutex_lock(&ttyname_lock);
- if (ttyname_init == 0) {
- if (pthread_key_create(&ttyname_key, free)) {
- pthread_mutex_unlock(&ttyname_lock);
- return (NULL);
- }
- ttyname_init = 1;
- }
- pthread_mutex_unlock(&ttyname_lock);
-
- /* Must have thread specific data field to put data */
- if ((buf = pthread_getspecific(ttyname_key)) != 0) {
- return (NULL);
- } else if (buf == NULL) {
- if ((buf = malloc(sizeof(_PATH_DEV) + MAXNAMLEN)) != NULL) {
- if (pthread_setspecific(ttyname_key, buf) != 0) {
- free(buf);
- return (NULL);
- }
- } else {
- return (NULL);
- }
- }
- return (__ttyname_r_basic(fd, buf, sizeof(_PATH_DEV) + MAXNAMLEN));
-}
-
-char *
-ttyname_r(int fd, char *buf, size_t len)
-{
- char *ret;
-
- if (_thread_fd_lock(fd, FD_READ, NULL, __FILE__, __LINE__) == 0) {
- ret = __ttyname_r_basic(fd, buf, len);
- _thread_fd_unlock(fd, FD_READ);
- } else {
- ret = NULL;
- }
- return (ret);
-}
-#else
-static char buf[sizeof(_PATH_DEV) + MAXNAMLEN] = _PATH_DEV;
-static char *oldttyname __P((int, struct stat *));
-
-char *
-ttyname(fd)
- int fd;
-{
- struct stat sb;
- struct termios ttyb;
- DB *db;
- DBT data, key;
- struct {
- mode_t type;
- dev_t dev;
- } bkey;
-
- /* Must be a terminal. */
- if (tcgetattr(fd, &ttyb) < 0)
- return (NULL);
- /* Must be a character device. */
- if (fstat(fd, &sb) || !S_ISCHR(sb.st_mode))
- return (NULL);
-
- if ( (db = dbopen(_PATH_DEVDB, O_RDONLY, 0, DB_HASH, NULL)) ) {
- memset(&bkey, 0, sizeof(bkey));
- bkey.type = S_IFCHR;
- bkey.dev = sb.st_rdev;
- key.data = &bkey;
- key.size = sizeof(bkey);
- if (!(db->get)(db, &key, &data, 0)) {
- bcopy(data.data,
- buf + sizeof(_PATH_DEV) - 1, data.size);
- (void)(db->close)(db);
- return (buf);
- }
- (void)(db->close)(db);
- }
- return (oldttyname(fd, &sb));
-}
-
-static char *
-oldttyname(fd, sb)
- int fd;
- struct stat *sb;
-{
- register struct dirent *dirp;
- register DIR *dp;
- struct stat dsb;
-
- if ((dp = opendir(_PATH_DEV)) == NULL)
- return (NULL);
-
- while ( (dirp = readdir(dp)) ) {
- if (dirp->d_fileno != sb->st_ino)
- continue;
- bcopy(dirp->d_name, buf + sizeof(_PATH_DEV) - 1,
- dirp->d_namlen + 1);
- if (stat(buf, &dsb) || sb->st_dev != dsb.st_dev ||
- sb->st_ino != dsb.st_ino)
- continue;
- (void)closedir(dp);
- return (buf);
- }
- (void)closedir(dp);
- return (NULL);
-}
-#endif
diff --git a/lib/libc/gen/ttyslot.c b/lib/libc/gen/ttyslot.c
deleted file mode 100644
index 2f72ebb..0000000
--- a/lib/libc/gen/ttyslot.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ttyslot.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <ttyent.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-int
-ttyslot()
-{
- register struct ttyent *ttyp;
- register int slot;
- register char *p;
- int cnt;
- char *name;
-
- setttyent();
- for (cnt = 0; cnt < 3; ++cnt)
- if ( (name = ttyname(cnt)) ) {
- if ( (p = rindex(name, '/')) )
- ++p;
- else
- p = name;
- for (slot = 1; (ttyp = getttyent()); ++slot)
- if (!strcmp(ttyp->ty_name, p)) {
- endttyent();
- return(slot);
- }
- break;
- }
- endttyent();
- return(0);
-}
diff --git a/lib/libc/gen/tzset.3 b/lib/libc/gen/tzset.3
deleted file mode 100644
index 3c5b276..0000000
--- a/lib/libc/gen/tzset.3
+++ /dev/null
@@ -1,325 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Arthur Olson.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)tzset.3 8.2 (Berkeley) 11/17/93
-.\"
-.Dd November 17, 1993
-.Dt TZSET 3
-.Os
-.Sh NAME
-.Nm tzset ,
-.Nm tzsetwall
-.Nd initialize time conversion information
-.Sh SYNOPSIS
-.Fd #include <time.h>
-.Ft void
-.Fn tzset void
-.Ft void
-.Fn tzsetwall void
-.Sh DESCRIPTION
-The
-.Fn tzset
-function
-initializes time conversion information used by the library routine
-.Xr localtime 3 .
-The environment variable
-.Ev TZ
-specifies how this is done.
-.Pp
-If
-.Ev TZ
-does not appear in the environment, the best available approximation to
-local wall clock time, as specified by the
-.Xr tzfile 5 Ns -format
-file
-.Pa /etc/localtime
-is used.
-.Pp
-If
-.Ev TZ
-appears in the environment but its value is a null string, Coordinated
-Universal Time
-.Pq Tn UTC
-is used (without leap second correction).
-.Pp
-If
-.Ev TZ
-appears in the environment and its value begins with a colon
-.Pq Ql \: ,
-the rest of its value is used as a pathname of a
-.Xr tzfile 5 Ns -format
-file from which to read the time conversion information.
-If the first character of the pathname is a slash
-.Pq Ql /
-it is used as
-an absolute pathname; otherwise, it is used as a pathname relative to
-the system time conversion information directory.
-.Pp
-If its value does not begin with a colon, it is first used as the pathname
-of a file (as described above) from which to read the time conversion
-information.
-If that file cannot be read, the value is then interpreted as a direct
-specification (the format is described below) of the time conversion
-information.
-.Pp
-If the
-.Ev TZ
-environment variable does not specify a
-.Xr tzfile 5 Ns -format
-file and cannot be interpreted as a direct specification,
-.Tn UTC
-is used.
-.Pp
-The
-.Fn tzsetwall
-function
-sets things up so that
-.Xr localtime
-returns the best available approximation of local wall clock time.
-.Sh SPECIFICATION FORMAT
-When
-.Ev TZ
-is used directly as a specification of the time conversion information,
-it must have the following syntax (spaces inserted for clarity):
-.Bd -filled -offset indent
-.Em std offset Bo
-.Em dst Bo
-.Em offset
-.Bc
-.Bo
-.No , Em rule
-.Bc
-.Bc
-.Ed
-.Pp
-Where:
-.Bl -tag -width std_and_dst -offset indent
-.It Em std No and Em dst
-Three or more bytes that are the designation for the standard
-.Pq Em std
-or summer
-.Pq Em dst
-time zone. Only
-.Em std
-is required; if
-.Em dst
-is missing, then summer time does not apply in this locale.
-Upper and lowercase letters are explicitly allowed. Any characters
-except a leading colon
-.Pq Ql : ,
-digits, comma
-.Pq Ql \&, ,
-minus
-.Pq Ql \- ,
-plus
-.Pq Ql + ,
-and
-.Tn ASCII
-.Dv NUL
-are allowed.
-.It Em offset
-Indicates the value one must add to the local time to arrive at
-Coordinated Universal Time. The
-.Em offset
-has the form:
-.Bd -unfilled -offset indent
-.Em hh Bo
-.Pf \&: Em mm
-.Bo
-.Pf \&: Em ss
-.Bc
-.Bc
-.Ed
-.Pp
-The minutes
-.Pq Em mm
-and seconds
-.Pq Em ss
-are optional. The hour
-.Pq Em hh
-is required and may be a single digit. The
-.Em offset
-following
-.Em std
-is required. If no
-.Em offset
-follows
-.Em dst ,
-summer time is assumed to be one hour ahead of standard time. One or
-more digits may be used; the value is always interpreted as a decimal
-number. The hour must be between zero and 24, and the minutes (and
-seconds) \(em if present \(em between zero and 59. If preceded by a
-.Pq Ql \-
-the time zone shall be east of the Prime Meridian; otherwise it shall be
-west (which may be indicated by an optional preceding
-.Pq Ql + ) .
-.It Em rule
-Indicates when to change to and back from summer time. The
-.Em rule
-has the form:
-.Bd -filled -offset indent
-.Em date/time,date/time
-.Ed
-.Pp
-where the first
-.Em date
-describes when the change from standard to summer time occurs and the
-second
-.Em date
-describes when the change back happens. Each
-.Em time
-field describes when, in current local time, the change to the other
-time is made.
-.Pp
-The format of
-.Em date
-is one of the following:
-.Bl -tag -width "M.m.n.d"
-.It Sy J Em n
-The Julian day
-.Em n
-(1 \*(Le
-.Em n
-\*(Le 365).
-Leap days are not counted; that is, in all years \(em including leap
-years \(em February 28 is day 59 and March 1 is day 60. It is
-impossible to explicitly refer to the occasional February 29.
-.It Em n
-The zero-based Julian day
-(0 \*(Le
-.Em n
-\*(Le 365 ) .
-Leap days are counted, and it is possible to refer to February 29.
-.It Sy M Em m.n.d
-The
-.Em d Ns 'th
-day (0 \*(Le
-.Em d
-\*(Le 6 )
-of week
-.Em n
-of month
-.Em m
-of the year
-(1 \*(Le
-.Em n
-\*(Le 5),
-(1 \*(Le
-.Em m
-\*(Le 12),
-where week 5 means
-.Do
-the last
-.Em d
-day in month
-.Em m
-.Dc
-which may occur in either the fourth or the fifth week). Week 1 is the
-first week in which the
-.Em d Ns 'th
-day occurs. Day zero is Sunday.
-.Pp
-The
-.Em time
-has the same format as
-.Em offset
-except that no leading sign
-.Pq Ql \-
-or
-.Pq Ql +
-is allowed. The default, if
-.Em time
-is not given, is
-.Sy 02:00:00 .
-.El
-.Pp
-If no
-.Em rule
-is present in the
-.Ev TZ
-specification, the rules specified
-by the
-.Xr tzfile 5 Ns -format
-file
-.Em posixrules
-in the system time conversion information directory are used, with the
-standard and summer time offsets from
-.Tn UTC
-replaced by those specified by
-the
-.Em offset
-values in
-.Ev TZ .
-.El
-.Pp
-For compatibility with System V Release 3.1, a semicolon
-.Pq Ql ;
-may be used to separate the
-.Em rule
-from the rest of the specification.
-.Sh FILES
-.Bl -tag -width /usr/share/zoneinfo/posixrules -compact
-.It Pa /etc/localtime
-local time zone file
-.It Pa /usr/share/zoneinfo
-time zone directory
-.It Pa /usr/share/zoneinfo/posixrules
-rules for
-.Tn POSIX Ns -style
-.Tn TZ Ns 's
-.It Pa /usr/share/zoneinfo/GMT for
-.Tn UTC
-leap seconds
-.El
-.Pp
-If the file
-.Pa /usr/share/zoneinfo/GMT
-does not exist,
-.Tn UTC
-leap seconds are loaded from
-.Pa /usr/share/zoneinfo/posixrules .
-.Sh SEE ALSO
-.Xr date 1 ,
-.Xr gettimeofday 2 ,
-.Xr ctime 3 ,
-.Xr getenv 3 ,
-.Xr time 3 ,
-.Xr tzfile 5
-.Sh HISTORY
-The
-.Fn tzset
-and
-.Fn tzsetwall
-functions first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/ualarm.3 b/lib/libc/gen/ualarm.3
deleted file mode 100644
index e6b14f5..0000000
--- a/lib/libc/gen/ualarm.3
+++ /dev/null
@@ -1,99 +0,0 @@
-.\" Copyright (c) 1986, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)ualarm.3 8.2 (Berkeley) 4/19/94
-.\" $Id: ualarm.3,v 1.7 1997/08/14 07:44:56 ache Exp $
-.\"
-.Dd April 19, 1994
-.Dt UALARM 3
-.Os BSD 4.3
-.Sh NAME
-.Nm ualarm
-.Nd schedule signal after specified time
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft u_int
-.Fn ualarm "u_int microseconds" "u_int interval"
-.Sh DESCRIPTION
-.Bf -symbolic
-This is a simplified interface to setitimer(2).
-.Ef
-.Pp
-The
-.Fn ualarm
-function
-waits a count of
-.Ar microseconds
-before asserting the terminating signal
-.Dv SIGALRM .
-System activity or time used in processing the call may cause a slight
-delay.
-.Pp
-If the
-.Fa interval
-argument is non-zero, the
-.Dv SIGALRM
-signal will be sent
-to the process every
-.Fa interval
-microseconds after the timer expires (e.g. after
-.Fa value
-microseconds have passed).
-.Pp
-Due to
-.Xr setitimer 2
-restriction the maximum number of
-.Ar microseconds
-and
-.Ar interval
-is limited to 100000000000000
-(in case this value fit in the unsigned integer).
-.Sh RETURN VALUES
-When the signal has successfully been caught,
-.Fn ualarm
-returns the amount of time left on the clock.
-.Sh NOTES
-.Pp
-A microsecond is 0.000001 seconds.
-.Sh SEE ALSO
-.Xr getitimer 2 ,
-.Xr setitimer 2 ,
-.Xr sigpause 2 ,
-.Xr sigvec 2 ,
-.Xr alarm 3 ,
-.Xr signal 3 ,
-.Xr sleep 3 ,
-.Xr usleep 3
-.Sh HISTORY
-The
-.Fn ualarm
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libc/gen/ualarm.c b/lib/libc/gen/ualarm.c
deleted file mode 100644
index ec49a2d..0000000
--- a/lib/libc/gen/ualarm.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ualarm.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/time.h>
-#include <unistd.h>
-
-#define USPS 1000000 /* # of microseconds in a second */
-
-/*
- * Generate a SIGALRM signal in ``usecs'' microseconds.
- * If ``reload'' is non-zero, keep generating SIGALRM
- * every ``reload'' microseconds after the first signal.
- */
-unsigned
-ualarm(usecs, reload)
- register unsigned usecs;
- register unsigned reload;
-{
- struct itimerval new, old;
-
- new.it_interval.tv_usec = reload % USPS;
- new.it_interval.tv_sec = reload / USPS;
-
- new.it_value.tv_usec = usecs % USPS;
- new.it_value.tv_sec = usecs / USPS;
-
- if (setitimer(ITIMER_REAL, &new, &old) == 0)
- return (old.it_value.tv_sec * USPS + old.it_value.tv_usec);
- /* else */
- return (-1);
-}
diff --git a/lib/libc/gen/uname.3 b/lib/libc/gen/uname.3
deleted file mode 100644
index 8155289..0000000
--- a/lib/libc/gen/uname.3
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" Copyright (c) 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)uname.3 8.1 (Berkeley) 1/4/94
-.\"
-.Dd January 4, 1994
-.Dt UNAME 3
-.Os
-.Sh NAME
-.Nm uname
-.Nd get system identification
-.Sh SYNOPSIS
-.Fd #include <sys/utsname.h>
-.Ft int
-.Fn uname "struct utsname *name"
-.Sh DESCRIPTION
-The
-.Fn uname
-function stores nul-terminated strings of information identifying
-the current system into the structure referenced by
-.Fa name .
-.Pp
-The
-.Li utsname
-structure is defined in the
-.Li <sys/utsname.h>
-header file, and contains the following members:
-.Bl -tag -width nodenameXXXX -offset indent
-.It sysname
-Name of the operating system implementation.
-.It nodename
-Network name of this machine.
-.It release
-Release level of the operating system.
-.It version
-Version level of the operating system.
-.It machine
-Machine hardware platform.
-.El
-.Sh RETURN VALUES
-If
-.Fn uname
-is successful, 0 is returned, otherwise, -1 is returned and
-.Va errno
-is set appropriately.
-.Sh ERRORS
-The
-.Fn uname
-function may fail and set
-.Va errno
-for any of the errors specified for the library functions
-.Xr sysctl 3 .
-.Sh SEE ALSO
-.Xr uname 1 ,
-.Xr sysctl 3
-.Sh STANDARDS
-The
-.Fn uname
-function conforms to
-.St -p1003.1-88 .
-.Sh HISTORY
-The
-.Fn uname
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/uname.c b/lib/libc/gen/uname.c
deleted file mode 100644
index 25431d4..0000000
--- a/lib/libc/gen/uname.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*-
- * Copyright (c) 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char sccsid[] = "From: @(#)uname.c 8.1 (Berkeley) 1/4/94";*/
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/sysctl.h>
-#include <sys/utsname.h>
-#include <errno.h>
-
-int
-uname(name)
- struct utsname *name;
-{
- int mib[2], rval;
- size_t len;
- char *p;
- int oerrno;
-
- rval = 0;
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_OSTYPE;
- len = sizeof(name->sysname);
- oerrno = errno;
- if (sysctl(mib, 2, &name->sysname, &len, NULL, 0) == -1) {
- if(errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->sysname[sizeof(name->sysname) - 1] = '\0';
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_HOSTNAME;
- len = sizeof(name->nodename);
- oerrno = errno;
- if (sysctl(mib, 2, &name->nodename, &len, NULL, 0) == -1) {
- if(errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->nodename[sizeof(name->nodename) - 1] = '\0';
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_OSRELEASE;
- len = sizeof(name->release);
- oerrno = errno;
- if (sysctl(mib, 2, &name->release, &len, NULL, 0) == -1) {
- if(errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->release[sizeof(name->release) - 1] = '\0';
-
- /* The version may have newlines in it, turn them into spaces. */
- mib[0] = CTL_KERN;
- mib[1] = KERN_VERSION;
- len = sizeof(name->version);
- oerrno = errno;
- if (sysctl(mib, 2, &name->version, &len, NULL, 0) == -1) {
- if (errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->version[sizeof(name->version) - 1] = '\0';
- for (p = name->version; len--; ++p) {
- if (*p == '\n' || *p == '\t') {
- if (len > 1)
- *p = ' ';
- else
- *p = '\0';
- }
- }
-
- mib[0] = CTL_HW;
- mib[1] = HW_MACHINE;
- len = sizeof(name->machine);
- oerrno = errno;
- if (sysctl(mib, 2, &name->machine, &len, NULL, 0) == -1) {
- if (errno == ENOMEM)
- errno = oerrno;
- else
- rval = -1;
- }
- name->machine[sizeof(name->machine) - 1] = '\0';
- return (rval);
-}
diff --git a/lib/libc/gen/unvis.3 b/lib/libc/gen/unvis.3
deleted file mode 100644
index 833e13c..0000000
--- a/lib/libc/gen/unvis.3
+++ /dev/null
@@ -1,163 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)unvis.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt UNVIS 3
-.Os
-.Sh NAME
-.Nm unvis ,
-.Nm strunvis
-.Nd decode a visual representation of characters
-.Sh SYNOPSIS
-.Fd #include <vis.h>
-.Ft int
-.Fn unvis "char *cp" "int c" "int *astate" "int flag"
-.Ft int
-.Fn strunvis "char *dst" "const char *src"
-.Sh DESCRIPTION
-The
-.Fn unvis
-and
-.Fn strunvis
-functions
-are used to decode a visual representation of characters, as produced
-by the
-.Xr vis 3
-function, back into
-the original form. Unvis is called with successive characters in
-.Ar c
-until a valid
-sequence is recognized, at which time the decoded character is
-available at the character pointed to by
-.Ar cp .
-Strunvis decodes the
-characters pointed to by
-.Ar src
-into the buffer pointed to by
-.Ar dst .
-.Pp
-The
-.Fn strunvis
-function
-simply copies
-.Ar src
-to
-.Ar dst ,
-decoding any escape sequences along the way,
-and returns the number of characters placed into
-.Ar dst ,
-or \-1 if an
-invalid escape sequence was detected. The size of
-.Ar dst
-should be
-equal to the size of
-.Ar src
-(that is, no expansion takes place during
-decoding).
-.Pp
-The
-.Fn unvis
-function
-implements a state machine that can be used to decode an arbitrary
-stream of bytes. All state associated with the bytes being decoded
-is stored outside the
-.Fn unvis
-function (that is, a pointer to the state is passed in), so
-calls decoding different streams can be freely intermixed. To
-start decoding a stream of bytes, first initialize an integer
-to zero. Call
-.Fn unvis
-with each successive byte, along with a pointer
-to this integer, and a pointer to a destination character.
-The
-.Fn unvis
-function
-has several return codes that must be handled properly. They are:
-.Bl -tag -width UNVIS_VALIDPUSH
-.It Li \&0 (zero)
-Another character is necessary; nothing has been recognized yet.
-.It Dv UNVIS_VALID
-A valid character has been recognized and is available at the location
-pointed to by cp.
-.It Dv UNVIS_VALIDPUSH
-A valid character has been recognized and is available at the location
-pointed to by cp; however, the character currently passed in should
-be passed in again.
-.It Dv UNVIS_NOCHAR
-A valid sequence was detected, but no character was produced. This
-return code is necessary to indicate a logical break between characters.
-.It Dv UNVIS_SYNBAD
-An invalid escape sequence was detected, or the decoder is in an
-unknown state. The decoder is placed into the starting state.
-.El
-.Pp
-When all bytes in the stream have been processed, call
-.Fn unvis
-one more time with flag set to
-.Dv UNVIS_END
-to extract any remaining character (the character passed in is ignored).
-.Pp
-The following code fragment illustrates a proper use of
-.Fn unvis .
-.Bd -literal -offset indent
-int state = 0;
-char out;
-
-while ((ch = getchar()) != EOF) {
-again:
- switch(unvis(&out, ch, &state, 0)) {
- case 0:
- case UNVIS_NOCHAR:
- break;
- case UNVIS_VALID:
- (void) putchar(out);
- break;
- case UNVIS_VALIDPUSH:
- (void) putchar(out);
- goto again;
- case UNVIS_SYNBAD:
- (void)fprintf(stderr, "bad sequence!\n");
- exit(1);
- }
-}
-if (unvis(&out, (char)0, &state, UNVIS_END) == UNVIS_VALID)
- (void) putchar(out);
-.Ed
-.Sh SEE ALSO
-.Xr vis 1
-.Sh HISTORY
-The
-.Nm unvis
-function
-first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/gen/unvis.c b/lib/libc/gen/unvis.c
deleted file mode 100644
index 32405df..0000000
--- a/lib/libc/gen/unvis.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <vis.h>
-
-/*
- * decode driven by state machine
- */
-#define S_GROUND 0 /* haven't seen escape char */
-#define S_START 1 /* start decoding special sequence */
-#define S_META 2 /* metachar started (M) */
-#define S_META1 3 /* metachar more, regular char (-) */
-#define S_CTRL 4 /* control char started (^) */
-#define S_OCTAL2 5 /* octal digit 2 */
-#define S_OCTAL3 6 /* octal digit 3 */
-
-#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
-
-/*
- * unvis - decode characters previously encoded by vis
- */
-int
-unvis(cp, c, astate, flag)
- char *cp;
- int c, *astate, flag;
-{
-
- if (flag & UNVIS_END) {
- if (*astate == S_OCTAL2 || *astate == S_OCTAL3) {
- *astate = S_GROUND;
- return (UNVIS_VALID);
- }
- return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD);
- }
-
- switch (*astate) {
-
- case S_GROUND:
- *cp = 0;
- if (c == '\\') {
- *astate = S_START;
- return (0);
- }
- *cp = c;
- return (UNVIS_VALID);
-
- case S_START:
- switch(c) {
- case '\\':
- *cp = c;
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- *cp = (c - '0');
- *astate = S_OCTAL2;
- return (0);
- case 'M':
- *cp = 0200;
- *astate = S_META;
- return (0);
- case '^':
- *astate = S_CTRL;
- return (0);
- case 'n':
- *cp = '\n';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'r':
- *cp = '\r';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'b':
- *cp = '\b';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'a':
- *cp = '\007';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'v':
- *cp = '\v';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 't':
- *cp = '\t';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'f':
- *cp = '\f';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 's':
- *cp = ' ';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case 'E':
- *cp = '\033';
- *astate = S_GROUND;
- return (UNVIS_VALID);
- case '\n':
- /*
- * hidden newline
- */
- *astate = S_GROUND;
- return (UNVIS_NOCHAR);
- case '$':
- /*
- * hidden marker
- */
- *astate = S_GROUND;
- return (UNVIS_NOCHAR);
- }
- *astate = S_GROUND;
- return (UNVIS_SYNBAD);
-
- case S_META:
- if (c == '-')
- *astate = S_META1;
- else if (c == '^')
- *astate = S_CTRL;
- else {
- *astate = S_GROUND;
- return (UNVIS_SYNBAD);
- }
- return (0);
-
- case S_META1:
- *astate = S_GROUND;
- *cp |= c;
- return (UNVIS_VALID);
-
- case S_CTRL:
- if (c == '?')
- *cp |= 0177;
- else
- *cp |= c & 037;
- *astate = S_GROUND;
- return (UNVIS_VALID);
-
- case S_OCTAL2: /* second possible octal digit */
- if (isoctal(c)) {
- /*
- * yes - and maybe a third
- */
- *cp = (*cp << 3) + (c - '0');
- *astate = S_OCTAL3;
- return (0);
- }
- /*
- * no - done with current sequence, push back passed char
- */
- *astate = S_GROUND;
- return (UNVIS_VALIDPUSH);
-
- case S_OCTAL3: /* third possible octal digit */
- *astate = S_GROUND;
- if (isoctal(c)) {
- *cp = (*cp << 3) + (c - '0');
- return (UNVIS_VALID);
- }
- /*
- * we were done, push back passed char
- */
- return (UNVIS_VALIDPUSH);
-
- default:
- /*
- * decoder in unknown state - (probably uninitialized)
- */
- *astate = S_GROUND;
- return (UNVIS_SYNBAD);
- }
-}
-
-/*
- * strunvis - decode src into dst
- *
- * Number of chars decoded into dst is returned, -1 on error.
- * Dst is null terminated.
- */
-
-int
-strunvis(dst, src)
- register char *dst;
- register const char *src;
-{
- register char c;
- char *start = dst;
- int state = 0;
-
- while ( (c = *src++) ) {
- again:
- switch (unvis(dst, c, &state, 0)) {
- case UNVIS_VALID:
- dst++;
- break;
- case UNVIS_VALIDPUSH:
- dst++;
- goto again;
- case 0:
- case UNVIS_NOCHAR:
- break;
- default:
- return (-1);
- }
- }
- if (unvis(dst, c, &state, UNVIS_END) == UNVIS_VALID)
- dst++;
- *dst = '\0';
- return (dst - start);
-}
diff --git a/lib/libc/gen/usleep.3 b/lib/libc/gen/usleep.3
deleted file mode 100644
index a56c56b..0000000
--- a/lib/libc/gen/usleep.3
+++ /dev/null
@@ -1,99 +0,0 @@
-.\" Copyright (c) 1986, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)usleep.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt USLEEP 3
-.Os BSD 4.3
-.Sh NAME
-.Nm usleep
-.Nd suspend execution for interval of microseconds
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn usleep "u_int microseconds"
-.Sh DESCRIPTION
-The
-.Fn usleep
-function
-suspends execution of the calling process
-for
-.Fa microseconds
-of time.
-System activity or time spent in processing the
-call may lengthen the sleep slightly.
-.Pp
-If a timer is already running on the process its state is unaltered by
-this
-.Fn usleep
-implementation.
-If the value
-.Fa microseconds
-is more than or equal to the remaining clock time for the running timer,
-the sleep time is set to
-the remaining clock time.
-.Pp
-This function is implemented using
-.Xr nanosleep 2
-by pausing for
-.Fa microseconds
-of time or until any signal occurse.
-.Sh RETURN VALUES
-The
-.Fn usleep
-function returns 0 on successful completion. Otherwise, it returns -1
-and sets
-.Va errno
-to indicate the error.
-.Sh ERRORS
-The
-.Fn usleep
-function
-will fail if:
-.Bl -tag -width [EINTR]
-.It Bq Er EINTR
-Some signal occurse.
-.Sh NOTES
-.Pp
-A microsecond is 0.000001 seconds.
-.Sh SEE ALSO
-.Xr nanosleep 2 ,
-.Xr setitimer 2 ,
-.Xr alarm 3 ,
-.Xr signal 3 ,
-.Xr sleep 3 ,
-.Xr ualarm 3
-.Sh HISTORY
-The
-.Fn usleep
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c
deleted file mode 100644
index 4abe291..0000000
--- a/lib/libc/gen/usleep.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)usleep.c 8.1 (Berkeley) 6/4/93";
-#endif
-static char rcsid[] =
- "$Id: usleep.c,v 1.21 1997/10/22 12:04:49 ache Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <time.h>
-#include <unistd.h>
-
-int
-usleep(useconds)
- unsigned int useconds;
-{
- struct timespec time_to_sleep;
-
- time_to_sleep.tv_nsec = (useconds % 1000000) * 1000;
- time_to_sleep.tv_sec = useconds / 1000000;
- return (nanosleep(&time_to_sleep, NULL));
-}
diff --git a/lib/libc/gen/utime.3 b/lib/libc/gen/utime.3
deleted file mode 100644
index 785a945..0000000
--- a/lib/libc/gen/utime.3
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)utime.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt UTIME 3
-.Os BSD 4
-.Sh NAME
-.Nm utime
-.Nd set file times
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <utime.h>
-.Ft int
-.Fn utime "const char *file" "const struct utimbuf *timep"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is obsoleted by utimes(2) .
-.Ef
-.Pp
-The
-.Fn utime
-function sets the access and modification times of the named file from
-the structures in the argument array
-.Fa timep .
-.Pp
-If the times are specified (the
-.Fa timep
-argument is
-.Pf non- Dv NULL )
-the caller must be the owner of the file or be the super-user.
-.Pp
-If the times are not specified (the
-.Fa timep
-argument is
-.Dv NULL )
-the caller must be the owner of the file, have permission to write
-the file, or be the super-user.
-.Sh ERRORS
-The
-.Fn utime
-function may fail and set
-.Va errno
-for any of the errors specified for the library function
-.Xr utimes 2 .
-.Sh SEE ALSO
-.Xr stat 2 ,
-.Xr utimes 2
-.Sh HISTORY
-A
-.Fn utime
-function appeared in
-.At v7 .
-.Sh STANDARDS
-The
-.Fn utime
-function conforms to
-.St -p1003.1-88 .
diff --git a/lib/libc/gen/utime.c b/lib/libc/gen/utime.c
deleted file mode 100644
index a561fd6..0000000
--- a/lib/libc/gen/utime.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)utime.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/time.h>
-
-#include <utime.h>
-
-int
-utime(path, times)
- const char *path;
- const struct utimbuf *times;
-{
- struct timeval tv[2], *tvp;
-
- if (times) {
- tv[0].tv_sec = times->actime;
- tv[1].tv_sec = times->modtime;
- tv[0].tv_usec = tv[1].tv_usec = 0;
- tvp = tv;
- } else
- tvp = NULL;
- return (utimes(path, tvp));
-}
diff --git a/lib/libc/gen/valloc.3 b/lib/libc/gen/valloc.3
deleted file mode 100644
index ee32438..0000000
--- a/lib/libc/gen/valloc.3
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)valloc.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt VALLOC 3
-.Os BSD 3
-.Sh NAME
-.Nm valloc
-.Nd aligned memory allocation function
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft void *
-.Fn valloc "size_t size"
-.Sh DESCRIPTION
-.Bf -symbolic
-Valloc is obsoleted by the current version of malloc(3),
-which aligns page-sized and larger allocations.
-.Ef
-.Pp
-The
-.Fn valloc
-function
-allocates
-.Fa size
-bytes aligned on a page boundary.
-It is implemented by calling
-.Xr malloc 3
-with a slightly larger request, saving the true beginning of the block
-allocated, and returning a properly aligned pointer.
-.Sh RETURN VALUES
-The
-.Fn valloc
-function returns
-a pointer to the allocated space if successful; otherwise
-a null pointer is returned
-.Sh HISTORY
-The
-.Fn valloc
-function appeared in
-.Bx 3.0 .
-.Sh BUGS
-A
-.Em vfree
-function
-has not been implemented.
diff --git a/lib/libc/gen/valloc.c b/lib/libc/gen/valloc.c
deleted file mode 100644
index ec6e2e8..0000000
--- a/lib/libc/gen/valloc.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1980, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)valloc.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-#include <unistd.h>
-
-void *
-valloc(i)
- size_t i;
-{
- int valsiz = getpagesize(), j;
- void *cp = malloc(i + (valsiz-1));
-
- j = ((int)cp + (valsiz-1)) &~ (valsiz-1);
- return ((void *)j);
-}
diff --git a/lib/libc/gen/vis.3 b/lib/libc/gen/vis.3
deleted file mode 100644
index f749573..0000000
--- a/lib/libc/gen/vis.3
+++ /dev/null
@@ -1,265 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)vis.3 8.1 (Berkeley) 6/9/93
-.\" $Id: vis.3,v 1.6 1997/02/22 14:58:21 peter Exp $
-.\"
-.Dd July 25, 1996
-.Dt VIS 3
-.Os
-.Sh NAME
-.Nm vis
-.Nd visually encode characters
-.Sh SYNOPSIS
-.Fd #include <vis.h>
-.Ft char *
-.Fn vis "char *dst" "int c" "int flag" "int nextc"
-.Ft int
-.Fn strvis "char *dst" "const char *src" "int flag"
-.Ft int
-.Fn strvisx "char *dst" "const char *src" "size_t len" "int flag"
-.Sh DESCRIPTION
-The
-.Fn vis
-function
-copies into
-.Fa dst
-a string which represents the character
-.Fa c .
-If
-.Fa c
-needs no encoding, it is copied in unaltered. The string is
-null terminated, and a pointer to the end of the string is
-returned. The maximum length of any encoding is four
-characters (not including the trailing
-.Dv NUL ) ;
-thus, when
-encoding a set of characters into a buffer, the size of the buffer should
-be four times the number of characters encoded, plus one for the trailing
-.Dv NUL .
-The flag parameter is used for altering the default range of
-characters considered for encoding and for altering the visual
-representation.
-The additional character,
-.Fa nextc ,
-is only used when selecting the
-.Dv VIS_CSTYLE
-encoding format (explained below).
-.Pp
-The
-.Fn strvis
-and
-.Fn strvisx
-functions copy into
-.Fa dst
-a visual representation of
-the string
-.Fa src .
-The
-.Fn strvis
-function encodes characters from
-.Fa src
-up to the
-first
-.Dv NUL .
-The
-.Fn strvisx
-function encodes exactly
-.Fa len
-characters from
-.Fa src
-(this
-is useful for encoding a block of data that may contain
-.Dv NUL Ns 's).
-Both forms
-.Dv NUL
-terminate
-.Fa dst .
-The size of
-.Fa dst
-must be four times the number
-of characters encoded from
-.Fa src
-(plus one for the
-.Dv NUL ) .
-Both
-forms return the number of characters in dst (not including
-the trailing
-.Dv NUL ) .
-.Pp
-The encoding is a unique, invertible representation composed entirely of
-graphic characters; it can be decoded back into the original form using
-the
-.Xr unvis 3
-or
-.Xr strunvis 3
-functions.
-.Pp
-There are two parameters that can be controlled: the range of
-characters that are encoded, and the type
-of representation used.
-By default, all non-graphic characters.
-except space, tab, and newline are encoded.
-(See
-.Xr isgraph 3 . )
-The following flags
-alter this:
-.Bl -tag -width VIS_WHITEX
-.It Dv VIS_SP
-Also encode space.
-.It Dv VIS_TAB
-Also encode tab.
-.It Dv VIS_NL
-Also encode newline.
-.It Dv VIS_WHITE
-Synonym for
-.Dv VIS_SP
-\&|
-.Dv VIS_TAB
-\&|
-.Dv VIS_NL .
-.It Dv VIS_SAFE
-Only encode "unsafe" characters. Unsafe means control
-characters which may cause common terminals to perform
-unexpected functions. Currently this form allows space,
-tab, newline, backspace, bell, and return - in addition
-to all graphic characters - unencoded.
-.El
-.Pp
-There are three forms of encoding.
-All forms use the backslash character
-.Ql \e
-to introduce a special
-sequence; two backslashes are used to represent a real backslash.
-These are the visual formats:
-.Bl -tag -width VIS_CSTYLE
-.It (default)
-Use an
-.Ql M
-to represent meta characters (characters with the 8th
-bit set), and use carat
-.Ql ^
-to represent control characters see
-.Pf ( Xr iscntrl 3 ) .
-The following formats are used:
-.Bl -tag -width xxxxx
-.It Dv \e^C
-Represents the control character
-.Ql C .
-Spans characters
-.Ql \e000
-through
-.Ql \e037 ,
-and
-.Ql \e177
-(as
-.Ql \e^? ) .
-.It Dv \eM-C
-Represents character
-.Ql C
-with the 8th bit set.
-Spans characters
-.Ql \e241
-through
-.Ql \e376 .
-.It Dv \eM^C
-Represents control character
-.Ql C
-with the 8th bit set.
-Spans characters
-.Ql \e200
-through
-.Ql \e237 ,
-and
-.Ql \e377
-(as
-.Ql \eM^? ) .
-.It Dv \e040
-Represents
-.Tn ASCII
-space.
-.It Dv \e240
-Represents Meta-space.
-.El
-.Pp
-.It Dv VIS_CSTYLE
-Use C-style backslash sequences to represent standard non-printable
-characters.
-The following sequences are used to represent the indicated characters:
-.Bd -unfilled -offset indent
-.Li \ea Tn - BEL No (007)
-.Li \eb Tn - BS No (010)
-.Li \ef Tn - NP No (014)
-.Li \en Tn - NL No (012)
-.Li \er Tn - CR No (015)
-.Li \et Tn - HT No (011)
-.Li \ev Tn - VT No (013)
-.Li \e0 Tn - NUL No (000)
-.Ed
-.Pp
-When using this format, the nextc parameter is looked at to determine
-if a
-.Dv NUL
-character can be encoded as
-.Ql \e0
-instead of
-.Ql \e000 .
-If
-.Fa nextc
-is an octal digit, the latter representation is used to
-avoid ambiguity.
-.It Dv VIS_OCTAL
-Use a three digit octal sequence. The form is
-.Ql \eddd
-where
-.Em d
-represents an octal digit.
-.El
-.Pp
-There is one additional flag,
-.Dv VIS_NOSLASH ,
-which inhibits the
-doubling of backslashes and the backslash before the default
-format (that is, control characters are represented by
-.Ql ^C
-and
-meta characters as
-.Ql M-C ) .
-With this flag set, the encoding is
-ambiguous and non-invertible.
-.Sh SEE ALSO
-.Xr unvis 1 ,
-.Xr strunvis 3 ,
-.Xr unvis 3
-.Sh HISTORY
-These functions first appeared in
-.Bx 4.4 .
-
diff --git a/lib/libc/gen/vis.c b/lib/libc/gen/vis.c
deleted file mode 100644
index 61aa836..0000000
--- a/lib/libc/gen/vis.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)vis.c 8.1 (Berkeley) 7/19/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <limits.h>
-#include <ctype.h>
-#include <vis.h>
-
-#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
-
-/*
- * vis - visually encode characters
- */
-char *
-vis(dst, c, flag, nextc)
- register char *dst;
- int c, nextc;
- register int flag;
-{
- c = (unsigned char)c;
- if (isgraph(c) ||
- ((flag & VIS_SP) == 0 && c == ' ') ||
- ((flag & VIS_TAB) == 0 && c == '\t') ||
- ((flag & VIS_NL) == 0 && c == '\n') ||
- ((flag & VIS_SAFE) && (c == '\b' || c == '\007' || c == '\r'))) {
- *dst++ = c;
- if (c == '\\' && (flag & VIS_NOSLASH) == 0)
- *dst++ = '\\';
- *dst = '\0';
- return (dst);
- }
-
- if (flag & VIS_CSTYLE) {
- switch(c) {
- case '\n':
- *dst++ = '\\';
- *dst++ = 'n';
- goto done;
- case '\r':
- *dst++ = '\\';
- *dst++ = 'r';
- goto done;
- case '\b':
- *dst++ = '\\';
- *dst++ = 'b';
- goto done;
-#if __STDC__
- case '\a':
-#else
- case '\007':
-#endif
- *dst++ = '\\';
- *dst++ = 'a';
- goto done;
- case '\v':
- *dst++ = '\\';
- *dst++ = 'v';
- goto done;
- case '\t':
- *dst++ = '\\';
- *dst++ = 't';
- goto done;
- case '\f':
- *dst++ = '\\';
- *dst++ = 'f';
- goto done;
- case ' ':
- *dst++ = '\\';
- *dst++ = 's';
- goto done;
- case '\0':
- *dst++ = '\\';
- *dst++ = '0';
- if (isoctal(nextc)) {
- *dst++ = '0';
- *dst++ = '0';
- }
- goto done;
- }
- }
- if (((c & 0177) == ' ') || (flag & VIS_OCTAL)) {
- *dst++ = '\\';
- *dst++ = ((u_char)c >> 6 & 07) + '0';
- *dst++ = ((u_char)c >> 3 & 07) + '0';
- *dst++ = ((u_char)c & 07) + '0';
- goto done;
- }
- if ((flag & VIS_NOSLASH) == 0)
- *dst++ = '\\';
- if (c & 0200) {
- c &= 0177;
- *dst++ = 'M';
- }
- if (iscntrl(c)) {
- *dst++ = '^';
- if (c == 0177)
- *dst++ = '?';
- else
- *dst++ = c + '@';
- } else {
- *dst++ = '-';
- *dst++ = c;
- }
-done:
- *dst = '\0';
- return (dst);
-}
-
-/*
- * strvis, strvisx - visually encode characters from src into dst
- *
- * Dst must be 4 times the size of src to account for possible
- * expansion. The length of dst, not including the trailing NULL,
- * is returned.
- *
- * Strvisx encodes exactly len bytes from src into dst.
- * This is useful for encoding a block of data.
- */
-int
-strvis(dst, src, flag)
- register char *dst;
- register const char *src;
- int flag;
-{
- register char c;
- char *start;
-
- for (start = dst; (c = *src); )
- dst = vis(dst, c, flag, *++src);
- *dst = '\0';
- return (dst - start);
-}
-
-int
-strvisx(dst, src, len, flag)
- register char *dst;
- register const char *src;
- register size_t len;
- int flag;
-{
- int c;
- char *start;
-
- for (start = dst; len > 1; len--) {
- c = *src;
- dst = vis(dst, c, flag, *++src);
- }
- if (len)
- dst = vis(dst, *src, flag, '\0');
- *dst = '\0';
-
- return (dst - start);
-}
diff --git a/lib/libc/gen/wait.c b/lib/libc/gen/wait.c
deleted file mode 100644
index 0bf5e8b..0000000
--- a/lib/libc/gen/wait.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)wait.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/wait.h>
-#include <sys/resource.h>
-
-pid_t
-wait(istat)
- int *istat;
-{
- return (wait4(WAIT_ANY, istat, 0, (struct rusage *)0));
-}
diff --git a/lib/libc/gen/wait3.c b/lib/libc/gen/wait3.c
deleted file mode 100644
index c8d8f9e..0000000
--- a/lib/libc/gen/wait3.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)wait3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/wait.h>
-#include <sys/resource.h>
-
-pid_t
-wait3(istat, options, rup)
- int *istat;
- int options;
- struct rusage *rup;
-{
- return (wait4(WAIT_ANY, istat, options, rup));
-}
diff --git a/lib/libc/gen/waitpid.c b/lib/libc/gen/waitpid.c
deleted file mode 100644
index 7af6a63..0000000
--- a/lib/libc/gen/waitpid.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)waitpid.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/wait.h>
-#include <sys/resource.h>
-
-pid_t
-#if __STDC__
-waitpid(pid_t pid, int *istat, int options)
-#else
-waitpid(pid, istat, options)
- pid_t pid;
- int *istat;
- int options;
-#endif
-{
- return (wait4(pid, istat, options, (struct rusage *)0));
-}
diff --git a/lib/libc/gmon/Makefile.inc b/lib/libc/gmon/Makefile.inc
deleted file mode 100644
index b83c767..0000000
--- a/lib/libc/gmon/Makefile.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.5 1997/10/15 16:15:29 bde Exp $
-
-# gmon sources
-.PATH: ${.CURDIR}/../libc/gmon
-
-SRCS+= gmon.c mcount.c
-
-.if ${LIB} == "c"
-MAN3+= moncontrol.3
-
-MLINKS+=moncontrol.3 monstartup.3
-.endif
-
-# mcount cannot be compiled with profiling
-mcount.po: mcount.o
- cp mcount.o mcount.po
diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c
deleted file mode 100644
index 81e36dd..0000000
--- a/lib/libc/gmon/gmon.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/*-
- * Copyright (c) 1983, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && defined(LIBC_SCCS)
-static char sccsid[] = "@(#)gmon.c 8.1 (Berkeley) 6/4/93";
-#endif
-
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/gmon.h>
-#include <sys/sysctl.h>
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#if defined(__ELF__)
-extern char *minbrk asm (".minbrk");
-#else
-extern char *minbrk asm ("minbrk");
-#endif
-
-struct gmonparam _gmonparam = { GMON_PROF_OFF };
-
-static int s_scale;
-/* see profil(2) where this is describe (incorrectly) */
-#define SCALE_1_TO_1 0x10000L
-
-#define ERR(s) write(2, s, sizeof(s))
-
-void moncontrol __P((int));
-static int hertz __P((void));
-
-void
-monstartup(lowpc, highpc)
- u_long lowpc;
- u_long highpc;
-{
- register int o;
- char *cp;
- struct gmonparam *p = &_gmonparam;
-
- /*
- * round lowpc and highpc to multiples of the density we're using
- * so the rest of the scaling (here and in gprof) stays in ints.
- */
- p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER));
- p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER));
- p->textsize = p->highpc - p->lowpc;
- p->kcountsize = p->textsize / HISTFRACTION;
- p->hashfraction = HASHFRACTION;
- p->fromssize = p->textsize / HASHFRACTION;
- p->tolimit = p->textsize * ARCDENSITY / 100;
- if (p->tolimit < MINARCS)
- p->tolimit = MINARCS;
- else if (p->tolimit > MAXARCS)
- p->tolimit = MAXARCS;
- p->tossize = p->tolimit * sizeof(struct tostruct);
-
- cp = sbrk(p->kcountsize + p->fromssize + p->tossize);
- if (cp == (char *)-1) {
- ERR("monstartup: out of memory\n");
- return;
- }
-#ifdef notdef
- bzero(cp, p->kcountsize + p->fromssize + p->tossize);
-#endif
- p->tos = (struct tostruct *)cp;
- cp += p->tossize;
- p->kcount = (u_short *)cp;
- cp += p->kcountsize;
- p->froms = (u_short *)cp;
-
- minbrk = sbrk(0);
- p->tos[0].link = 0;
-
- o = p->highpc - p->lowpc;
- if (p->kcountsize < o) {
-#ifndef hp300
- s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
-#else /* avoid floating point */
- int quot = o / p->kcountsize;
-
- if (quot >= 0x10000)
- s_scale = 1;
- else if (quot >= 0x100)
- s_scale = 0x10000 / quot;
- else if (o >= 0x800000)
- s_scale = 0x1000000 / (o / (p->kcountsize >> 8));
- else
- s_scale = 0x1000000 / ((o << 8) / p->kcountsize);
-#endif
- } else
- s_scale = SCALE_1_TO_1;
-
- moncontrol(1);
-}
-
-void
-_mcleanup()
-{
- int fd;
- int fromindex;
- int endfrom;
- u_long frompc;
- int toindex;
- struct rawarc rawarc;
- struct gmonparam *p = &_gmonparam;
- struct gmonhdr gmonhdr, *hdr;
- struct clockinfo clockinfo;
- int mib[2];
- size_t size;
-#ifdef DEBUG
- int log, len;
- char buf[200];
-#endif
-
- if (p->state == GMON_PROF_ERROR)
- ERR("_mcleanup: tos overflow\n");
-
- size = sizeof(clockinfo);
- mib[0] = CTL_KERN;
- mib[1] = KERN_CLOCKRATE;
- if (sysctl(mib, 2, &clockinfo, &size, NULL, 0) < 0) {
- /*
- * Best guess
- */
- clockinfo.profhz = hertz();
- } else if (clockinfo.profhz == 0) {
- if (clockinfo.hz != 0)
- clockinfo.profhz = clockinfo.hz;
- else
- clockinfo.profhz = hertz();
- }
-
- moncontrol(0);
- fd = open("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
- if (fd < 0) {
- perror("mcount: gmon.out");
- return;
- }
-#ifdef DEBUG
- log = open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664);
- if (log < 0) {
- perror("mcount: gmon.log");
- return;
- }
- len = sprintf(buf, "[mcleanup1] kcount 0x%x ssiz %d\n",
- p->kcount, p->kcountsize);
- write(log, buf, len);
-#endif
- hdr = (struct gmonhdr *)&gmonhdr;
- hdr->lpc = p->lowpc;
- hdr->hpc = p->highpc;
- hdr->ncnt = p->kcountsize + sizeof(gmonhdr);
- hdr->version = GMONVERSION;
- hdr->profrate = clockinfo.profhz;
- write(fd, (char *)hdr, sizeof *hdr);
- write(fd, p->kcount, p->kcountsize);
- endfrom = p->fromssize / sizeof(*p->froms);
- for (fromindex = 0; fromindex < endfrom; fromindex++) {
- if (p->froms[fromindex] == 0)
- continue;
-
- frompc = p->lowpc;
- frompc += fromindex * p->hashfraction * sizeof(*p->froms);
- for (toindex = p->froms[fromindex]; toindex != 0;
- toindex = p->tos[toindex].link) {
-#ifdef DEBUG
- len = sprintf(buf,
- "[mcleanup2] frompc 0x%x selfpc 0x%x count %d\n" ,
- frompc, p->tos[toindex].selfpc,
- p->tos[toindex].count);
- write(log, buf, len);
-#endif
- rawarc.raw_frompc = frompc;
- rawarc.raw_selfpc = p->tos[toindex].selfpc;
- rawarc.raw_count = p->tos[toindex].count;
- write(fd, &rawarc, sizeof rawarc);
- }
- }
- close(fd);
-}
-
-/*
- * Control profiling
- * profiling is what mcount checks to see if
- * all the data structures are ready.
- */
-void
-moncontrol(mode)
- int mode;
-{
- struct gmonparam *p = &_gmonparam;
-
- if (mode) {
- /* start */
- profil((char *)p->kcount, p->kcountsize, (int)p->lowpc,
- s_scale);
- p->state = GMON_PROF_ON;
- } else {
- /* stop */
- profil((char *)0, 0, 0, 0);
- p->state = GMON_PROF_OFF;
- }
-}
-
-/*
- * discover the tick frequency of the machine
- * if something goes wrong, we return 0, an impossible hertz.
- */
-static int
-hertz()
-{
- struct itimerval tim;
-
- tim.it_interval.tv_sec = 0;
- tim.it_interval.tv_usec = 1;
- tim.it_value.tv_sec = 0;
- tim.it_value.tv_usec = 0;
- setitimer(ITIMER_REAL, &tim, 0);
- setitimer(ITIMER_REAL, 0, &tim);
- if (tim.it_interval.tv_usec < 2)
- return(0);
- return (1000000 / tim.it_interval.tv_usec);
-}
-
-
diff --git a/lib/libc/gmon/mcount.c b/lib/libc/gmon/mcount.c
deleted file mode 100644
index a48e558..0000000
--- a/lib/libc/gmon/mcount.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/*-
- * Copyright (c) 1983, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(KERNEL) && defined(LIBC_SCCS)
-#if 0
-static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif
-
-#include <sys/param.h>
-#include <sys/gmon.h>
-#ifdef KERNEL
-#include <sys/systm.h>
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/pmap.h>
-void bintr __P((void));
-void btrap __P((void));
-void eintr __P((void));
-void user __P((void));
-#endif
-
-/*
- * mcount is called on entry to each function compiled with the profiling
- * switch set. _mcount(), which is declared in a machine-dependent way
- * with _MCOUNT_DECL, does the actual work and is either inlined into a
- * C routine or called by an assembly stub. In any case, this magic is
- * taken care of by the MCOUNT definition in <machine/profile.h>.
- *
- * _mcount updates data structures that represent traversals of the
- * program's call graph edges. frompc and selfpc are the return
- * address and function address that represents the given call graph edge.
- *
- * Note: the original BSD code used the same variable (frompcindex) for
- * both frompcindex and frompc. Any reasonable, modern compiler will
- * perform this optimization.
- */
-_MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
- register fptrint_t frompc, selfpc;
-{
-#ifdef GUPROF
- u_int delta;
-#endif
- register fptrdiff_t frompci;
- register u_short *frompcindex;
- register struct tostruct *top, *prevtop;
- register struct gmonparam *p;
- register long toindex;
-#ifdef KERNEL
- MCOUNT_DECL(s)
-#endif
-
- p = &_gmonparam;
-#ifndef GUPROF /* XXX */
- /*
- * check that we are profiling
- * and that we aren't recursively invoked.
- */
- if (p->state != GMON_PROF_ON)
- return;
-#endif
-#ifdef KERNEL
- MCOUNT_ENTER(s);
-#else
- p->state = GMON_PROF_BUSY;
-#endif
- frompci = frompc - p->lowpc;
-
-#ifdef KERNEL
- /*
- * When we are called from an exception handler, frompci may be
- * for a user address. Convert such frompci's to the index of
- * user() to merge all user counts.
- */
- if (frompci >= p->textsize) {
- if (frompci + p->lowpc
- >= (fptrint_t)(VM_MAXUSER_ADDRESS + UPAGES * PAGE_SIZE))
- goto done;
- frompci = (fptrint_t)user - p->lowpc;
- if (frompci >= p->textsize)
- goto done;
- }
-#endif /* KERNEL */
-
-#ifdef GUPROF
- if (p->state != GMON_PROF_HIRES)
- goto skip_guprof_stuff;
- /*
- * Look at the clock and add the count of clock cycles since the
- * clock was last looked at to a counter for frompc. This
- * solidifies the count for the function containing frompc and
- * effectively starts another clock for the current function.
- * The count for the new clock will be solidified when another
- * function call is made or the function returns.
- *
- * We use the usual sampling counters since they can be located
- * efficiently. 4-byte counters are usually necessary.
- *
- * There are many complications for subtracting the profiling
- * overheads from the counts for normal functions and adding
- * them to the counts for mcount(), mexitcount() and cputime().
- * We attempt to handle fractional cycles, but the overheads
- * are usually underestimated because they are calibrated for
- * a simpler than usual setup.
- */
- delta = cputime() - p->mcount_overhead;
- p->cputime_overhead_resid += p->cputime_overhead_frac;
- p->mcount_overhead_resid += p->mcount_overhead_frac;
- if ((int)delta < 0)
- *p->mcount_count += delta + p->mcount_overhead
- - p->cputime_overhead;
- else if (delta != 0) {
- if (p->cputime_overhead_resid >= CALIB_SCALE) {
- p->cputime_overhead_resid -= CALIB_SCALE;
- ++*p->cputime_count;
- --delta;
- }
- if (delta != 0) {
- if (p->mcount_overhead_resid >= CALIB_SCALE) {
- p->mcount_overhead_resid -= CALIB_SCALE;
- ++*p->mcount_count;
- --delta;
- }
- KCOUNT(p, frompci) += delta;
- }
- *p->mcount_count += p->mcount_overhead_sub;
- }
- *p->cputime_count += p->cputime_overhead;
-skip_guprof_stuff:
-#endif /* GUPROF */
-
-#ifdef KERNEL
- /*
- * When we are called from an exception handler, frompc is faked
- * to be for where the exception occurred. We've just solidified
- * the count for there. Now convert frompci to the index of btrap()
- * for trap handlers and bintr() for interrupt handlers to make
- * exceptions appear in the call graph as calls from btrap() and
- * bintr() instead of calls from all over.
- */
- if ((fptrint_t)selfpc >= (fptrint_t)btrap
- && (fptrint_t)selfpc < (fptrint_t)eintr) {
- if ((fptrint_t)selfpc >= (fptrint_t)bintr)
- frompci = (fptrint_t)bintr - p->lowpc;
- else
- frompci = (fptrint_t)btrap - p->lowpc;
- }
-#endif /* KERNEL */
-
- /*
- * check that frompc is a reasonable pc value.
- * for example: signal catchers get called from the stack,
- * not from text space. too bad.
- */
- if (frompci >= p->textsize)
- goto done;
-
- frompcindex = &p->froms[frompci / (p->hashfraction * sizeof(*p->froms))];
- toindex = *frompcindex;
- if (toindex == 0) {
- /*
- * first time traversing this arc
- */
- toindex = ++p->tos[0].link;
- if (toindex >= p->tolimit)
- /* halt further profiling */
- goto overflow;
-
- *frompcindex = toindex;
- top = &p->tos[toindex];
- top->selfpc = selfpc;
- top->count = 1;
- top->link = 0;
- goto done;
- }
- top = &p->tos[toindex];
- if (top->selfpc == selfpc) {
- /*
- * arc at front of chain; usual case.
- */
- top->count++;
- goto done;
- }
- /*
- * have to go looking down chain for it.
- * top points to what we are looking at,
- * prevtop points to previous top.
- * we know it is not at the head of the chain.
- */
- for (; /* goto done */; ) {
- if (top->link == 0) {
- /*
- * top is end of the chain and none of the chain
- * had top->selfpc == selfpc.
- * so we allocate a new tostruct
- * and link it to the head of the chain.
- */
- toindex = ++p->tos[0].link;
- if (toindex >= p->tolimit)
- goto overflow;
-
- top = &p->tos[toindex];
- top->selfpc = selfpc;
- top->count = 1;
- top->link = *frompcindex;
- *frompcindex = toindex;
- goto done;
- }
- /*
- * otherwise, check the next arc on the chain.
- */
- prevtop = top;
- top = &p->tos[top->link];
- if (top->selfpc == selfpc) {
- /*
- * there it is.
- * increment its count
- * move it to the head of the chain.
- */
- top->count++;
- toindex = prevtop->link;
- prevtop->link = top->link;
- top->link = *frompcindex;
- *frompcindex = toindex;
- goto done;
- }
-
- }
-done:
-#ifdef KERNEL
- MCOUNT_EXIT(s);
-#else
- p->state = GMON_PROF_ON;
-#endif
- return;
-overflow:
- p->state = GMON_PROF_ERROR;
-#ifdef KERNEL
- MCOUNT_EXIT(s);
-#endif
- return;
-}
-
-/*
- * Actual definition of mcount function. Defined in <machine/profile.h>,
- * which is included by <sys/gmon.h>.
- */
-MCOUNT
-
-#ifdef GUPROF
-void
-mexitcount(selfpc)
- fptrint_t selfpc;
-{
- struct gmonparam *p;
- fptrint_t selfpcdiff;
-
- p = &_gmonparam;
- selfpcdiff = selfpc - (fptrint_t)p->lowpc;
- if (selfpcdiff < p->textsize) {
- u_int delta;
-
- /*
- * Solidify the count for the current function.
- */
- delta = cputime() - p->mexitcount_overhead;
- p->cputime_overhead_resid += p->cputime_overhead_frac;
- p->mexitcount_overhead_resid += p->mexitcount_overhead_frac;
- if ((int)delta < 0)
- *p->mexitcount_count += delta + p->mexitcount_overhead
- - p->cputime_overhead;
- else if (delta != 0) {
- if (p->cputime_overhead_resid >= CALIB_SCALE) {
- p->cputime_overhead_resid -= CALIB_SCALE;
- ++*p->cputime_count;
- --delta;
- }
- if (delta != 0) {
- if (p->mexitcount_overhead_resid
- >= CALIB_SCALE) {
- p->mexitcount_overhead_resid
- -= CALIB_SCALE;
- ++*p->mexitcount_count;
- --delta;
- }
- KCOUNT(p, selfpcdiff) += delta;
- }
- *p->mexitcount_count += p->mexitcount_overhead_sub;
- }
- *p->cputime_count += p->cputime_overhead;
- }
-}
-#endif /* GUPROF */
diff --git a/lib/libc/gmon/moncontrol.3 b/lib/libc/gmon/moncontrol.3
deleted file mode 100644
index 92993cd..0000000
--- a/lib/libc/gmon/moncontrol.3
+++ /dev/null
@@ -1,105 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)moncontrol.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MONCONTROL 3
-.Os BSD 4
-.Sh NAME
-.Nm moncontrol ,
-.Nm monstartup
-.Nd control execution profile
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Ft int
-.Fn moncontrol "int mode"
-.Ft int
-.Fn monstartup "u_long *lowpc" "u_long *highpc"
-.Sh DESCRIPTION
-An executable program compiled using the
-.Fl pg
-option to
-.Xr cc 1
-automatically includes calls to collect statistics for the
-.Xr gprof 1
-call-graph execution profiler.
-In typical operation, profiling begins at program startup
-and ends when the program calls exit.
-When the program exits, the profiling data are written to the file
-.Em gmon.out ,
-then
-.Xr gprof 1
-can be used to examine the results.
-.Pp
-.Fn moncontrol
-selectively controls profiling within a program.
-When the program starts, profiling begins.
-To stop the collection of histogram ticks and call counts use
-.Fn moncontrol 0 ;
-to resume the collection of histogram ticks and call counts use
-.Fn moncontrol 1 .
-This feature allows the cost of particular operations to be measured.
-Note that an output file will be produced on program exit
-regardless of the state of
-.Fn moncontrol .
-.Pp
-Programs that are not loaded with
-.Fl pg
-may selectively collect profiling statistics by calling
-.Fn monstartup
-with the range of addresses to be profiled.
-.Fa lowpc
-and
-.Fa highpc
-specify the address range that is to be sampled;
-the lowest address sampled is that of
-.Fa lowpc
-and the highest is just below
-.Fa highpc .
-Only functions in that range that have been compiled with the
-.Fl pg
-option to
-.Xr cc 1
-will appear in the call graph part of the output;
-however, all functions in that address range will
-have their execution time measured.
-Profiling begins on return from
-.Fn monstartup .
-.Sh FILES
-.Bl -tag -width Pa -compact
-.It Pa gmon.out execution data file
-.El
-.Sh SEE ALSO
-.Xr cc 1 ,
-.Xr gprof 1 ,
-.Xr profil 2 ,
-.Xr clocks 7
diff --git a/lib/libc/i386/DEFS.h b/lib/libc/i386/DEFS.h
deleted file mode 100644
index fbc11bc..0000000
--- a/lib/libc/i386/DEFS.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)DEFS.h 5.1 (Berkeley) 4/23/90
- *
- * $Id: DEFS.h,v 1.6 1997/02/22 14:58:29 peter Exp $
- */
-
-#include <machine/asm.h>
diff --git a/lib/libc/i386/SYS.h b/lib/libc/i386/SYS.h
deleted file mode 100644
index 593b2ed..0000000
--- a/lib/libc/i386/SYS.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)SYS.h 5.5 (Berkeley) 5/7/91
- *
- * $Id: SYS.h,v 1.10 1997/02/22 14:58:30 peter Exp $
- */
-
-#include <sys/syscall.h>
-#include "DEFS.h"
-
-#define SYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
- ENTRY(x); lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
-#define RSYSCALL(x) SYSCALL(x); ret
-
-#define PSEUDO(x,y) ENTRY(x); lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
-/* gas messes up offset -- although we don't currently need it, do for BCS */
-#define LCALL(x,y) .byte 0x9a ; .long y; .word x
-
-/*
- * Design note:
- *
- * The macros PSYSCALL() and PRSYSCALL() are intended for use where a
- * syscall needs to be renamed in the threaded library. When building
- * a normal library, they default to the traditional SYSCALL() and
- * RSYSCALL(). This avoids the need to #ifdef _THREAD_SAFE everywhere
- * that the renamed function needs to be called.
- */
-#ifdef _THREAD_SAFE
-/*
- * For the thread_safe versions, we prepend _thread_sys_ to the function
- * name so that the 'C' wrapper can go around the real name.
- */
-#define PSYSCALL(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
- ENTRY(__CONCAT(_thread_sys_,x)); \
- lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b
-#define PRSYSCALL(x) PSYSCALL(x); ret
-#define PPSEUDO(x,y) ENTRY(__CONCAT(_thread_sys_,x)); \
- lea __CONCAT(SYS_,y), %eax; KERNCALL; ret
-#else
-/*
- * The non-threaded library defaults to traditional syscalls where
- * the function name matches the syscall name.
- */
-#define PSYSCALL(x) SYSCALL(x)
-#define PRSYSCALL(x) RSYSCALL(x)
-#define PPSEUDO(x,y) PSEUDO(x,y)
-#endif
-
-#ifdef __ELF__
-#define KERNCALL int $0x80 /* Faster */
-#else
-#define KERNCALL LCALL(7,0) /* The old way */
-#endif
diff --git a/lib/libc/i386/gen/Makefile.inc b/lib/libc/i386/gen/Makefile.inc
deleted file mode 100644
index 5932d08..0000000
--- a/lib/libc/i386/gen/Makefile.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.8 1997/02/22 14:58:33 peter Exp $
-
-SRCS+= _setjmp.S alloca.S fabs.S frexp.c infinity.c isinf.c ldexp.c modf.S \
- setjmp.S sigsetjmp.S
diff --git a/lib/libc/i386/gen/_setjmp.S b/lib/libc/i386/gen/_setjmp.S
deleted file mode 100644
index 62259ce..0000000
--- a/lib/libc/i386/gen/_setjmp.S
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/*
- * C library -- _setjmp, _longjmp
- *
- * _longjmp(a,v)
- * will generate a "return(v)" from the last call to
- * _setjmp(a)
- * by restoring registers from the environment 'a'.
- * The previous signal state is NOT restored.
- */
-
-#include "DEFS.h"
-
-#ifdef _THREAD_SAFE
-ENTRY(__thread_sys_setjmp)
-#else
-ENTRY(_setjmp)
-#endif
- movl 4(%esp),%eax
- movl 0(%esp),%edx
- movl %edx, 0(%eax) /* rta */
- movl %ebx, 4(%eax)
- movl %esp, 8(%eax)
- movl %ebp,12(%eax)
- movl %esi,16(%eax)
- movl %edi,20(%eax)
- fnstcw 28(%eax)
- xorl %eax,%eax
- ret
-
-#ifdef _THREAD_SAFE
-ENTRY(__thread_sys_longjmp)
-#else
-ENTRY(_longjmp)
-#endif
- movl 4(%esp),%edx
- movl 8(%esp),%eax
- movl 0(%edx),%ecx
- movl 4(%edx),%ebx
- movl 8(%edx),%esp
- movl 12(%edx),%ebp
- movl 16(%edx),%esi
- movl 20(%edx),%edi
- fninit
- fldcw 28(%edx)
- testl %eax,%eax
- jnz 1f
- incl %eax
-1: movl %ecx,0(%esp)
- ret
diff --git a/lib/libc/i386/gen/alloca.S b/lib/libc/i386/gen/alloca.S
deleted file mode 100644
index f76b37b..0000000
--- a/lib/libc/i386/gen/alloca.S
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/* like alloc, but automatic automatic free in return */
-
-#include "DEFS.h"
-
-ENTRY(alloca)
- popl %edx /* pop return addr */
- popl %eax /* pop amount to allocate */
- movl %esp,%ecx
- addl $3,%eax /* round up to next word */
- andl $0xfffffffc,%eax
- subl %eax,%esp
- movl %esp,%eax /* base of newly allocated space */
- pushl 8(%ecx) /* copy possible saved registers */
- pushl 4(%ecx)
- pushl 0(%ecx)
- pushl %eax /* dummy to pop at callsite */
- jmp %edx /* "return" */
diff --git a/lib/libc/i386/gen/fabs.S b/lib/libc/i386/gen/fabs.S
deleted file mode 100644
index 5ae5370..0000000
--- a/lib/libc/i386/gen/fabs.S
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-ENTRY(fabs)
- fldl 4(%esp)
- fabs
- ret
diff --git a/lib/libc/i386/gen/frexp.c b/lib/libc/i386/gen/frexp.c
deleted file mode 100644
index aba4802..0000000
--- a/lib/libc/i386/gen/frexp.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static const char rcsid[] = "$Id$";
-#endif /* LIBC_RCS and not lint */
-
-#include <sys/types.h>
-#include <math.h>
-
-double
-frexp(value, eptr)
- double value;
- int *eptr;
-{
- union {
- double v;
- struct {
- u_int u_mant2 : 32;
- u_int u_mant1 : 20;
- u_int u_exp : 11;
- u_int u_sign : 1;
- } s;
- } u;
-
- if (value) {
- u.v = value;
- *eptr = u.s.u_exp - 1022;
- u.s.u_exp = 1022;
- return(u.v);
- } else {
- *eptr = 0;
- return((double)0);
- }
-}
diff --git a/lib/libc/i386/gen/infinity.c b/lib/libc/i386/gen/infinity.c
deleted file mode 100644
index e46f676..0000000
--- a/lib/libc/i386/gen/infinity.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * infinity.c
- * $Id$
- */
-
-#include <math.h>
-
-/* bytes for +Infinity on a 387 */
-char __infinity[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f };
diff --git a/lib/libc/i386/gen/isinf.c b/lib/libc/i386/gen/isinf.c
deleted file mode 100644
index a796dcf..0000000
--- a/lib/libc/i386/gen/isinf.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static const char rcsid[] = "$Id$";
-#endif /* LIBC_RCS and not lint */
-
-#include <sys/types.h>
-
-int
-isnan(d)
- double d;
-{
- register struct IEEEdp {
- u_int manl : 32;
- u_int manh : 20;
- u_int exp : 11;
- u_int sign : 1;
- } *p = (struct IEEEdp *)&d;
-
- return(p->exp == 2047 && (p->manh || p->manl));
-}
-
-int
-isinf(d)
- double d;
-{
- register struct IEEEdp {
- u_int manl : 32;
- u_int manh : 20;
- u_int exp : 11;
- u_int sign : 1;
- } *p = (struct IEEEdp *)&d;
-
- return(p->exp == 2047 && !p->manh && !p->manl);
-}
diff --git a/lib/libc/i386/gen/ldexp.c b/lib/libc/i386/gen/ldexp.c
deleted file mode 100644
index 8b63f52..0000000
--- a/lib/libc/i386/gen/ldexp.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static const char rcsid[] = "$Id$";
-#endif /* LIBC_RCS and not lint */
-
-/*
- * ldexp(value, exp): return value * (2 ** exp).
- *
- * Written by Sean Eric Fagan (sef@kithrup.COM)
- * Sun Mar 11 20:27:09 PST 1990
- */
-
-/*
- * We do the conversion in C to let gcc optimize it away, if possible.
- * The "fxch ; fstp" stuff is because value is still on the stack
- * (stupid 8087!).
- */
-double
-ldexp (double value, int exp)
-{
- double temp, texp, temp2;
- texp = exp;
-#ifdef __GNUC__
-#if __GNUC__ >= 2
- asm ("fscale "
- : "=u" (temp2), "=t" (temp)
- : "0" (texp), "1" (value));
-#else
- asm ("fscale ; fxch %%st(1) ; fstp%L1 %1 "
- : "=f" (temp), "=0" (temp2)
- : "0" (texp), "f" (value));
-#endif
-#else
-error unknown asm
-#endif
- return (temp);
-}
diff --git a/lib/libc/i386/gen/modf.S b/lib/libc/i386/gen/modf.S
deleted file mode 100644
index b457097..0000000
--- a/lib/libc/i386/gen/modf.S
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS 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. */
-
-#include "DEFS.h"
-
-ENTRY(modf)
- pushl %ebp
- movl %esp,%ebp
- subl $16,%esp
- fnstcw -12(%ebp)
- movw -12(%ebp),%dx
- orw $3072,%dx
- movw %dx,-16(%ebp)
- fldcw -16(%ebp)
- fldl 8(%ebp)
- frndint
- fstpl -8(%ebp)
- fldcw -12(%ebp)
- movl 16(%ebp),%eax
- movl -8(%ebp),%edx
- movl -4(%ebp),%ecx
- movl %edx,(%eax)
- movl %ecx,4(%eax)
- fldl 8(%ebp)
- fsubl -8(%ebp)
- jmp L1
-L1:
- leave
- ret
diff --git a/lib/libc/i386/gen/setjmp.S b/lib/libc/i386/gen/setjmp.S
deleted file mode 100644
index 6525a16..0000000
--- a/lib/libc/i386/gen/setjmp.S
+++ /dev/null
@@ -1,113 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/*
- * C library -- _setjmp, _longjmp
- *
- * longjmp(a,v)
- * will generate a "return(v)" from the last call to
- * setjmp(a)
- * by restoring registers from the environment 'a'.
- * The previous signal state is restored.
- */
-
-#include "DEFS.h"
-#include "SYS.h"
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_setjmp)
-#else
-ENTRY(setjmp)
-#endif
- PIC_PROLOGUE
- pushl $0
-#ifdef _THREAD_SAFE
- call PIC_PLT(CNAME(_thread_sys_sigblock))
-#else
- call PIC_PLT(CNAME(sigblock))
-#endif
- popl %edx
- PIC_EPILOGUE
- movl 4(%esp),%ecx
- movl 0(%esp),%edx
- movl %edx, 0(%ecx)
- movl %ebx, 4(%ecx)
- movl %esp, 8(%ecx)
- movl %ebp,12(%ecx)
- movl %esi,16(%ecx)
- movl %edi,20(%ecx)
- movl %eax,24(%ecx)
- fnstcw 28(%ecx)
- xorl %eax,%eax
- ret
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_longjmp)
-#else
-ENTRY(longjmp)
-#endif
- movl 4(%esp),%edx
- PIC_PROLOGUE
- pushl 24(%edx)
-#ifdef _THREAD_SAFE
- call PIC_PLT(CNAME(_thread_sys_sigsetmask))
-#else
- call PIC_PLT(CNAME(sigsetmask)) /* XXX this is not reentrant */
-#endif
- popl %eax
- PIC_EPILOGUE
- movl 4(%esp),%edx
- movl 8(%esp),%eax
- movl 0(%edx),%ecx
- movl 4(%edx),%ebx
- movl 8(%edx),%esp
- movl 12(%edx),%ebp
- movl 16(%edx),%esi
- movl 20(%edx),%edi
- fninit
- fldcw 28(%edx)
- testl %eax,%eax
- jnz 1f
- incl %eax
-1: movl %ecx,0(%esp)
- ret
diff --git a/lib/libc/i386/gen/sigsetjmp.S b/lib/libc/i386/gen/sigsetjmp.S
deleted file mode 100644
index 1220598..0000000
--- a/lib/libc/i386/gen/sigsetjmp.S
+++ /dev/null
@@ -1,125 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-#include "SYS.h"
-
-/*-
- * TODO:
- * Rename sigsetjmp to __sigsetjmp and siglongjmp to __siglongjmp,
- * remove the other *jmp functions and define everything in terms
- * of the renamed functions. This requires compiler support for
- * the renamed functions (introduced in gcc-2.5.3; previous versions
- * only supported *jmp with 0 or 1 leading underscores).
- *
- * Use sigprocmask() instead of sigblock() and sigsetmask(), and
- * check for and handle errors.
- *
- * Restore _all_ the registers and the signal mask atomically. Can
- * use sigreturn() if sigreturn() works.
- */
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_sigsetjmp)
-#else
-ENTRY(sigsetjmp)
-#endif
- movl 8(%esp),%eax
- movl 4(%esp),%ecx
- movl %eax,32(%ecx)
- testl %eax,%eax
- jz 2f
- PIC_PROLOGUE
- pushl $0
-#ifdef _THREAD_SAFE
- call PIC_PLT(CNAME(_thread_sys_sigblock))
-#else
- call PIC_PLT(CNAME(sigblock))
-#endif
- addl $4,%esp
- PIC_EPILOGUE
- movl 4(%esp),%ecx
- movl %eax,24(%ecx)
-2: movl 0(%esp),%edx
- movl %edx, 0(%ecx)
- movl %ebx, 4(%ecx)
- movl %esp, 8(%ecx)
- movl %ebp,12(%ecx)
- movl %esi,16(%ecx)
- movl %edi,20(%ecx)
- fnstcw 28(%ecx)
- xorl %eax,%eax
- ret
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_siglongjmp)
-#else
-ENTRY(siglongjmp)
-#endif
- movl 4(%esp),%edx
- cmpl $0,32(%edx)
- jz 2f
- PIC_PROLOGUE
- pushl 24(%edx)
-#ifdef _THREAD_SAFE
- call PIC_PLT(CNAME(_thread_sys_sigsetmask))
-#else
- call PIC_PLT(CNAME(sigsetmask))
-#endif
- addl $4,%esp
- PIC_EPILOGUE
-2: movl 4(%esp),%edx
- movl 8(%esp),%eax
- movl 0(%edx),%ecx
- movl 4(%edx),%ebx
- movl 8(%edx),%esp
- movl 12(%edx),%ebp
- movl 16(%edx),%esi
- movl 20(%edx),%edi
- fninit
- fldcw 28(%edx)
- testl %eax,%eax
- jnz 1f
- incl %eax
-1: movl %ecx,0(%esp)
- ret
diff --git a/lib/libc/i386/net/Makefile.inc b/lib/libc/i386/net/Makefile.inc
deleted file mode 100644
index dff7fd1..0000000
--- a/lib/libc/i386/net/Makefile.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id$
-
-SRCS+= htonl.S htons.S ntohl.S ntohs.S
diff --git a/lib/libc/i386/net/htonl.S b/lib/libc/i386/net/htonl.S
deleted file mode 100644
index 095c40a..0000000
--- a/lib/libc/i386/net/htonl.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/* netorder = htonl(hostorder) */
-
-#include "DEFS.h"
-
-ENTRY(htonl)
- movl 4(%esp),%eax
- xchgb %al,%ah
- roll $16,%eax
- xchgb %al,%ah
- ret
diff --git a/lib/libc/i386/net/htons.S b/lib/libc/i386/net/htons.S
deleted file mode 100644
index 238dfc2..0000000
--- a/lib/libc/i386/net/htons.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/* netorder = htons(hostorder) */
-
-#include "DEFS.h"
-
-ENTRY(htons)
- movzwl 4(%esp),%eax
- xchgb %al,%ah
- ret
diff --git a/lib/libc/i386/net/ntohl.S b/lib/libc/i386/net/ntohl.S
deleted file mode 100644
index 5af5008..0000000
--- a/lib/libc/i386/net/ntohl.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/* hostorder = ntohl(netorder) */
-
-#include "DEFS.h"
-
-ENTRY(ntohl)
- movl 4(%esp),%eax
- xchgb %al,%ah
- roll $16,%eax
- xchgb %al,%ah
- ret
diff --git a/lib/libc/i386/net/ntohs.S b/lib/libc/i386/net/ntohs.S
deleted file mode 100644
index 4bed4a2..0000000
--- a/lib/libc/i386/net/ntohs.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-/* hostorder = ntohs(netorder) */
-
-#include "DEFS.h"
-
-ENTRY(ntohs)
- movzwl 4(%esp),%eax
- xchgb %al,%ah
- ret
diff --git a/lib/libc/i386/stdlib/Makefile.inc b/lib/libc/i386/stdlib/Makefile.inc
deleted file mode 100644
index 16a9039..0000000
--- a/lib/libc/i386/stdlib/Makefile.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.5 1997/02/22 14:58:55 peter Exp $
-
-MDSRCS+=abs.S div.S labs.S ldiv.S
diff --git a/lib/libc/i386/stdlib/abs.S b/lib/libc/i386/stdlib/abs.S
deleted file mode 100644
index 4915d16..0000000
--- a/lib/libc/i386/stdlib/abs.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-ENTRY(abs)
- movl 4(%esp),%eax
- testl %eax,%eax
- jns 1f
- negl %eax
-1: ret
diff --git a/lib/libc/i386/stdlib/div.S b/lib/libc/i386/stdlib/div.S
deleted file mode 100644
index b2a9901..0000000
--- a/lib/libc/i386/stdlib/div.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-ENTRY(div)
- movl 4(%esp),%eax
- movl 8(%esp),%ecx
- cdq
- idiv %ecx
- movl %eax,4(%esp)
- movl %edx,8(%esp)
- ret
diff --git a/lib/libc/i386/stdlib/labs.S b/lib/libc/i386/stdlib/labs.S
deleted file mode 100644
index 5c5afe1..0000000
--- a/lib/libc/i386/stdlib/labs.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-ENTRY(labs)
- movl 4(%esp),%eax
- testl %eax,%eax
- jns 1f
- negl %eax
-1: ret
diff --git a/lib/libc/i386/stdlib/ldiv.S b/lib/libc/i386/stdlib/ldiv.S
deleted file mode 100644
index 38cdf3f..0000000
--- a/lib/libc/i386/stdlib/ldiv.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-ENTRY(ldiv)
- movl 4(%esp),%eax
- movl 8(%esp),%ecx
- cdq
- idiv %ecx
- movl %eax,4(%esp)
- movl %edx,8(%esp)
- ret
diff --git a/lib/libc/i386/string/Makefile.inc b/lib/libc/i386/string/Makefile.inc
deleted file mode 100644
index 0a3ccdb..0000000
--- a/lib/libc/i386/string/Makefile.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.7 1997/04/20 12:46:11 bde Exp $
-
-MDSRCS+=bcmp.S bcopy.S bzero.S ffs.S index.S memchr.S memcmp.S memcpy.S \
- memmove.S memset.S rindex.S strcat.S strchr.S strcmp.S strcpy.S \
- strlen.S strncmp.S strrchr.S swab.S
diff --git a/lib/libc/i386/string/bcmp.S b/lib/libc/i386/string/bcmp.S
deleted file mode 100644
index 1c0c934..0000000
--- a/lib/libc/i386/string/bcmp.S
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * bcmp (void *b1, void *b2, size_t len)
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(bcmp)
- pushl %edi
- pushl %esi
- movl 12(%esp),%edi
- movl 16(%esp),%esi
- xorl %eax,%eax /* clear return value */
- cld /* set compare direction forward */
-
- movl 20(%esp),%ecx /* compare by words */
- shrl $2,%ecx
- repe
- cmpsl
- jne L1
-
- movl 20(%esp),%ecx /* compare remainder by bytes */
- andl $3,%ecx
- repe
- cmpsb
- je L2
-
-L1: incl %eax
-L2: popl %esi
- popl %edi
- ret
diff --git a/lib/libc/i386/string/bcopy.S b/lib/libc/i386/string/bcopy.S
deleted file mode 100644
index d2a571e..0000000
--- a/lib/libc/i386/string/bcopy.S
+++ /dev/null
@@ -1,103 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from locore.s.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <machine/asm.h>
-
- RCSID("$NetBSD: bcopy.S,v 1.6 1996/11/12 00:50:06 jtc Exp $")
-
- /*
- * (ov)bcopy (src,dst,cnt)
- * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800
- */
-
-#ifdef MEMCOPY
-ENTRY(memcpy)
-#else
-#ifdef MEMMOVE
-ENTRY(memmove)
-#else
-ENTRY(bcopy)
-#endif
-#endif
- pushl %esi
- pushl %edi
-#if defined(MEMCOPY) || defined(MEMMOVE)
- movl 12(%esp),%edi
- movl 16(%esp),%esi
-#else
- movl 12(%esp),%esi
- movl 16(%esp),%edi
-#endif
- movl 20(%esp),%ecx
- movl %edi,%eax
- subl %esi,%eax
- cmpl %ecx,%eax /* overlapping? */
- jb 1f
- cld /* nope, copy forwards. */
- shrl $2,%ecx /* copy by words */
- rep
- movsl
- movl 20(%esp),%ecx
- andl $3,%ecx /* any bytes left? */
- rep
- movsb
-#if defined(MEMCOPY) || defined(MEMMOVE)
- movl 12(%esp),%eax
-#endif
- popl %edi
- popl %esi
- ret
-1:
- addl %ecx,%edi /* copy backwards. */
- addl %ecx,%esi
- std
- andl $3,%ecx /* any fractional bytes? */
- decl %edi
- decl %esi
- rep
- movsb
- movl 20(%esp),%ecx /* copy remainder by words */
- shrl $2,%ecx
- subl $3,%esi
- subl $3,%edi
- rep
- movsl
-#if defined(MEMCOPY) || defined(MEMMOVE)
- movl 12(%esp),%eax
-#endif
- popl %edi
- popl %esi
- cld
- ret
diff --git a/lib/libc/i386/string/bzero.S b/lib/libc/i386/string/bzero.S
deleted file mode 100644
index 8cc8f9f..0000000
--- a/lib/libc/i386/string/bzero.S
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * bzero (void *b, size_t len)
- * write len zero bytes to the string b.
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(bzero)
- pushl %edi
- pushl %ebx
- movl 12(%esp),%edi
- movl 16(%esp),%ecx
-
- cld /* set fill direction forward */
- xorl %eax,%eax /* set fill data to 0 */
-
- /*
- * if the string is too short, it's really not worth the overhead
- * of aligning to word boundries, etc. So we jump to a plain
- * unaligned set.
- */
- cmpl $0x0f,%ecx
- jle L1
-
- movl %edi,%edx /* compute misalignment */
- negl %edx
- andl $3,%edx
- movl %ecx,%ebx
- subl %edx,%ebx
-
- movl %edx,%ecx /* zero until word aligned */
- rep
- stosb
-
- movl %ebx,%ecx /* zero by words */
- shrl $2,%ecx
- rep
- stosl
-
- movl %ebx,%ecx
- andl $3,%ecx /* zero remainder by bytes */
-L1: rep
- stosb
-
- popl %ebx
- popl %edi
- ret
diff --git a/lib/libc/i386/string/ffs.S b/lib/libc/i386/string/ffs.S
deleted file mode 100644
index 084115b..0000000
--- a/lib/libc/i386/string/ffs.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * ffs(value)
- * finds the first bit set in value and returns the index of
- * that bit. Bits are numbered starting from 1, starting at the
- * rightmost bit. A return value of 0 means that the argument
- * was zero.
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(ffs)
- bsfl 4(%esp),%eax
- jz L1 /* ZF is set if all bits are 0 */
- incl %eax /* bits numbered from 1, not 0 */
- ret
-
- .align 2
-L1: xorl %eax,%eax /* clear result */
- ret
diff --git a/lib/libc/i386/string/index.S b/lib/libc/i386/string/index.S
deleted file mode 100644
index 0a6c6a3..0000000
--- a/lib/libc/i386/string/index.S
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * index(s, c)
- * return a pointer to the first occurance of the character c in
- * string s, or NULL if c does not occur in the string.
- *
- * %edx - pointer iterating through string
- * %eax - pointer to first occurance of 'c'
- * %cl - character we're comparing against
- * %bl - character at %edx
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(index)
- pushl %ebx
- movl 8(%esp),%eax
- movb 12(%esp),%cl
- .align 2,0x90
-L1:
- movb (%eax),%bl
- cmpb %bl,%cl /* found char??? */
- je L2
- incl %eax
- testb %bl,%bl /* null terminator??? */
- jne L1
- xorl %eax,%eax
-L2:
- popl %ebx
- ret
diff --git a/lib/libc/i386/string/memchr.S b/lib/libc/i386/string/memchr.S
deleted file mode 100644
index cc2dc76..0000000
--- a/lib/libc/i386/string/memchr.S
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * memchr (b, c, len)
- * locates the first occurance of c in string b.
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(memchr)
- pushl %edi
- movl 8(%esp),%edi /* string address */
- movl 12(%esp),%eax /* set character to search for */
- movl 16(%esp),%ecx /* set length of search */
- testl %esp,%esp /* clear Z flag, for len == 0 */
- cld /* set search forward */
- repne /* search! */
- scasb
- jnz L1 /* scan failed, return null */
- leal -1(%edi),%eax /* adjust result of scan */
- popl %edi
- ret
- .align 2,0x90
-L1: xorl %eax,%eax
- popl %edi
- ret
diff --git a/lib/libc/i386/string/memcmp.S b/lib/libc/i386/string/memcmp.S
deleted file mode 100644
index a362533..0000000
--- a/lib/libc/i386/string/memcmp.S
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * memcmp (void *b1, void *b2, size_t len)
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(memcmp)
- pushl %edi
- pushl %esi
- movl 12(%esp),%edi
- movl 16(%esp),%esi
- cld /* set compare direction forward */
-
- movl 20(%esp),%ecx /* compare by words */
- shrl $2,%ecx
- repe
- cmpsl
- jne L5 /* do we match so far? */
-
- movl 20(%esp),%ecx /* compare remainder by bytes */
- andl $3,%ecx
- repe
- cmpsb
- jne L6 /* do we match? */
-
- xorl %eax,%eax /* we match, return zero */
- popl %esi
- popl %edi
- ret
-
-L5: movl $4,%ecx /* We know that one of the next */
- subl %ecx,%edi /* four pairs of bytes do not */
- subl %ecx,%esi /* match. */
- repe
- cmpsb
-L6: movzbl -1(%edi),%eax /* Perform unsigned comparison */
- movzbl -1(%esi),%edx
- subl %edx,%eax
- popl %esi
- popl %edi
- ret
diff --git a/lib/libc/i386/string/memcpy.S b/lib/libc/i386/string/memcpy.S
deleted file mode 100644
index 1617c71..0000000
--- a/lib/libc/i386/string/memcpy.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MEMCOPY
-#include "bcopy.S"
diff --git a/lib/libc/i386/string/memmove.S b/lib/libc/i386/string/memmove.S
deleted file mode 100644
index f5a94ed..0000000
--- a/lib/libc/i386/string/memmove.S
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MEMMOVE
-#include "bcopy.S"
diff --git a/lib/libc/i386/string/memset.S b/lib/libc/i386/string/memset.S
deleted file mode 100644
index 5db1661..0000000
--- a/lib/libc/i386/string/memset.S
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * memset(void *b, int c, size_t len)
- * write len bytes of value c (converted to an unsigned char) to
- * the string b.
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(memset)
- pushl %edi
- pushl %ebx
- movl 12(%esp),%edi
- movzbl 16(%esp),%eax /* unsigned char, zero extend */
- movl 20(%esp),%ecx
- pushl %edi /* push address of buffer */
-
- cld /* set fill direction forward */
-
- /*
- * if the string is too short, it's really not worth the overhead
- * of aligning to word boundries, etc. So we jump to a plain
- * unaligned set.
- */
- cmpl $0x0f,%ecx
- jle L1
-
- movb %al,%ah /* copy char to all bytes in word */
- movl %eax,%edx
- sall $16,%eax
- orl %edx,%eax
-
- movl %edi,%edx /* compute misalignment */
- negl %edx
- andl $3,%edx
- movl %ecx,%ebx
- subl %edx,%ebx
-
- movl %edx,%ecx /* set until word aligned */
- rep
- stosb
-
- movl %ebx,%ecx
- shrl $2,%ecx /* set by words */
- rep
- stosl
-
- movl %ebx,%ecx /* set remainder by bytes */
- andl $3,%ecx
-L1: rep
- stosb
-
- popl %eax /* pop address of buffer */
- popl %ebx
- popl %edi
- ret
diff --git a/lib/libc/i386/string/rindex.S b/lib/libc/i386/string/rindex.S
deleted file mode 100644
index 6e023d1..0000000
--- a/lib/libc/i386/string/rindex.S
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * rindex(s, c)
- * return a pointer to the last occurance of the character c in
- * string s, or NULL if c does not occur in the string.
- *
- * %edx - pointer iterating through string
- * %eax - pointer to last occurance of 'c'
- * %cl - character we're comparing against
- * %bl - character at %edx
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(rindex)
- pushl %ebx
- movl 8(%esp),%edx
- movb 12(%esp),%cl
- xorl %eax,%eax /* init pointer to null */
- .align 2,0x90
-L1:
- movb (%edx),%bl
- cmpb %bl,%cl
- jne L2
- movl %edx,%eax
-L2:
- incl %edx
- testb %bl,%bl /* null terminator??? */
- jne L1
- popl %ebx
- ret
diff --git a/lib/libc/i386/string/strcat.S b/lib/libc/i386/string/strcat.S
deleted file mode 100644
index 9ec6053..0000000
--- a/lib/libc/i386/string/strcat.S
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * strcat(s, append)
- * append a copy of the null-terminated string "append" to the end
- * of the null-terminated string s, then add a terminating `\0'.
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-/*
- * I've unrolled the loop eight times: large enough to make a
- * significant difference, and small enough not to totally trash the
- * cashe.
- */
-
-ENTRY(strcat)
- pushl %edi /* save edi */
- movl 8(%esp),%edi /* dst address */
- movl 12(%esp),%edx /* src address */
- pushl %edi /* push destination address */
-
- cld /* set search forward */
- xorl %eax,%eax /* set search for null terminator */
- movl $-1,%ecx /* set search for lots of characters */
- repne /* search! */
- scasb
-
- leal -1(%edi),%ecx /* correct dst address */
-
- .align 2,0x90
-L1: movb (%edx),%al /* unroll loop, but not too much */
- movb %al,(%ecx)
- testb %al,%al
- je L2
- movb 1(%edx),%al
- movb %al,1(%ecx)
- testb %al,%al
- je L2
- movb 2(%edx),%al
- movb %al,2(%ecx)
- testb %al,%al
- je L2
- movb 3(%edx),%al
- movb %al,3(%ecx)
- testb %al,%al
- je L2
- movb 4(%edx),%al
- movb %al,4(%ecx)
- testb %al,%al
- je L2
- movb 5(%edx),%al
- movb %al,5(%ecx)
- testb %al,%al
- je L2
- movb 6(%edx),%al
- movb %al,6(%ecx)
- testb %al,%al
- je L2
- movb 7(%edx),%al
- movb %al,7(%ecx)
- addl $8,%edx
- addl $8,%ecx
- testb %al,%al
- jne L1
-L2: popl %eax /* pop destination address */
- popl %edi /* restore edi */
- ret
diff --git a/lib/libc/i386/string/strchr.S b/lib/libc/i386/string/strchr.S
deleted file mode 100644
index a483edd..0000000
--- a/lib/libc/i386/string/strchr.S
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * strchr(s, c)
- * return a pointer to the first occurance of the character c in
- * string s, or NULL if c does not occur in the string.
- *
- * %edx - pointer iterating through string
- * %eax - pointer to first occurance of 'c'
- * %cl - character we're comparing against
- * %bl - character at %edx
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(strchr)
- pushl %ebx
- movl 8(%esp),%eax
- movb 12(%esp),%cl
- .align 2,0x90
-L1:
- movb (%eax),%bl
- cmpb %bl,%cl /* found char??? */
- je L2
- incl %eax
- testb %bl,%bl /* null terminator??? */
- jne L1
- xorl %eax,%eax
-L2:
- popl %ebx
- ret
diff --git a/lib/libc/i386/string/strcmp.S b/lib/libc/i386/string/strcmp.S
deleted file mode 100644
index ecdb0b0..0000000
--- a/lib/libc/i386/string/strcmp.S
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * strcmp(s1, s2)
- * return an integer greater than, equal to, or less than 0,
- * according as string s1 is greater than, equal to, or less
- * than the string s2.
- *
- * %eax - pointer to s1
- * %edx - pointer to s2
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-/*
- * I've unrolled the loop eight times: large enough to make a
- * significant difference, and small enough not to totally trash the
- * cashe.
- */
-
-ENTRY(strcmp)
- movl 0x04(%esp),%eax
- movl 0x08(%esp),%edx
- jmp L2 /* Jump into the loop! */
-
- .align 2,0x90
-L1: incl %eax
- incl %edx
-L2: movb (%eax),%cl
- testb %cl,%cl
- je L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- je L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- je L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- je L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- je L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- je L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- je L3
- cmpb %cl,(%edx)
- jne L3
- incl %eax
- incl %edx
- movb (%eax),%cl
- testb %cl,%cl
- je L3
- cmpb %cl,(%edx)
- je L1
- .align 2, 0x90
-L3: movzbl (%eax),%eax /* unsigned comparison */
- movzbl (%edx),%edx
- subl %edx,%eax
- ret
diff --git a/lib/libc/i386/string/strcpy.S b/lib/libc/i386/string/strcpy.S
deleted file mode 100644
index d8e673a..0000000
--- a/lib/libc/i386/string/strcpy.S
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * strcpy (dst, src)
- * copy the string src to dst.
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-/*
- * I've unrolled the loop eight times: large enough to make a
- * significant difference, and small enough not to totally trash the
- * cashe.
- */
-
-ENTRY(strcpy)
- movl 4(%esp),%ecx /* dst address */
- movl 8(%esp),%edx /* src address */
- pushl %ecx /* push dst address */
-
- .align 2,0x90
-L1: movb (%edx),%al /* unroll loop, but not too much */
- movb %al,(%ecx)
- testb %al,%al
- je L2
- movb 1(%edx),%al
- movb %al,1(%ecx)
- testb %al,%al
- je L2
- movb 2(%edx),%al
- movb %al,2(%ecx)
- testb %al,%al
- je L2
- movb 3(%edx),%al
- movb %al,3(%ecx)
- testb %al,%al
- je L2
- movb 4(%edx),%al
- movb %al,4(%ecx)
- testb %al,%al
- je L2
- movb 5(%edx),%al
- movb %al,5(%ecx)
- testb %al,%al
- je L2
- movb 6(%edx),%al
- movb %al,6(%ecx)
- testb %al,%al
- je L2
- movb 7(%edx),%al
- movb %al,7(%ecx)
- addl $8,%edx
- addl $8,%ecx
- testb %al,%al
- jne L1
-L2: popl %eax /* pop dst address */
- ret
diff --git a/lib/libc/i386/string/strlen.S b/lib/libc/i386/string/strlen.S
deleted file mode 100644
index 93190cf..0000000
--- a/lib/libc/i386/string/strlen.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * strlen (s)
- * compute the length of the string s.
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(strlen)
- pushl %edi
- movl 8(%esp),%edi /* string address */
- cld /* set search forward */
- xorl %eax,%eax /* set search for null terminator */
- movl $-1,%ecx /* set search for lots of characters */
- repne /* search! */
- scasb
- notl %ecx /* get length by taking complement */
- leal -1(%ecx),%eax /* and subtracting one */
- popl %edi
- ret
diff --git a/lib/libc/i386/string/strncmp.S b/lib/libc/i386/string/strncmp.S
deleted file mode 100644
index 62686dc..0000000
--- a/lib/libc/i386/string/strncmp.S
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * strncmp(s1, s2, n)
- * return an integer greater than, equal to, or less than 0,
- * according as the first n characters of string s1 is greater
- * than, equal to, or less than the string s2.
- *
- * %eax - pointer to s1
- * %ecx - pointer to s2
- * %edx - length
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-/*
- * I've unrolled the loop eight times: large enough to make a
- * significant difference, and small enough not to totally trash the
- * cache.
- *
- * TODO: change all the jz's back to je for consistency.
- */
-
-ENTRY(strncmp)
- pushl %ebx
- movl 8(%esp),%eax
- movl 12(%esp),%ecx
- movl 16(%esp),%edx
- testl %edx,%edx
- jmp L2 /* Jump into the loop! */
-
- .align 2,0x90
-L1: incl %eax
- incl %ecx
- decl %edx
-L2: jz L4 /* strings are equal */
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
-/*
- * XXX it might be best to move the next 4 instructions to the end of the
- * unrolled part of the loop. The unrolled part would then be
- * movb n(%eax),%bl; testb %bl, %bl; je L3; cmpb n(%ecx); jne L3
- * or maybe better
- * movb n(%eax),%bl; cmpb n(%ecx); jne L3; testb %bl,%bl; je return_0
- * for n = 0, 1, ..., 8. The end of the loop would be
- * L1: addl $8,%eax; addl $8,%ecx; subl $8,%edx; cmpl $8,%edx; jae Lx
- * where residual counts of 0 to 7 are handled at Lx. However, this would
- * be slower for short strings. Cache effects are probably not so
- * important because we are only handling a byte at a time.
- */
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- jne L3
-
- incl %eax
- incl %ecx
- decl %edx
- jz L4
- movb (%eax),%bl
- testb %bl,%bl
- jz L3
- cmpb %bl,(%ecx)
- je L1
-
- .align 2,0x90
-L3: movzbl (%eax),%eax /* unsigned comparison */
- movzbl (%ecx),%ecx
- subl %ecx,%eax
- popl %ebx
- ret
- .align 2,0x90
-L4: xorl %eax,%eax
- popl %ebx
- ret
diff --git a/lib/libc/i386/string/strrchr.S b/lib/libc/i386/string/strrchr.S
deleted file mode 100644
index 0cc08d7..0000000
--- a/lib/libc/i386/string/strrchr.S
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1993 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "DEFS.h"
-
-/*
- * strrchr(s, c)
- * return a pointer to the last occurance of the character c in
- * string s, or NULL if c does not occur in the string.
- *
- * %edx - pointer iterating through string
- * %eax - pointer to last occurance of 'c'
- * %cl - character we're comparing against
- * %bl - character at %edx
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(strrchr)
- pushl %ebx
- movl 8(%esp),%edx
- movb 12(%esp),%cl
- xorl %eax,%eax /* init pointer to null */
- .align 2,0x90
-L1:
- movb (%edx),%bl
- cmpb %bl,%cl
- jne L2
- movl %edx,%eax
-L2:
- incl %edx
- testb %bl,%bl /* null terminator??? */
- jne L1
- popl %ebx
- ret
diff --git a/lib/libc/i386/string/swab.S b/lib/libc/i386/string/swab.S
deleted file mode 100644
index 717b7a2..0000000
--- a/lib/libc/i386/string/swab.S
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif
-
-#include "DEFS.h"
-
-/*
- * void
- * swab (const void *src, void *dst, size_t len)
- * copy len bytes from src to dst, swapping adjacent bytes
- *
- * On the i486, this code is negligibly faster than the code generated
- * by gcc at about half the size. If my i386 databook is correct, it
- * should be considerably faster than the gcc code on a i386.
- *
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-ENTRY(swab)
- pushl %esi
- pushl %edi
- movl 12(%esp),%esi
- movl 16(%esp),%edi
- movl 20(%esp),%ecx
-
- cld # set direction forward
-
- shrl $1,%ecx
- testl $7,%ecx # copy first group of 1 to 7 words
- jz L2 # while swaping alternate bytes.
- .align 2,0x90
-L1: lodsw
- rorw $8,%ax
- stosw
- decl %ecx
- testl $7,%ecx
- jnz L1
-
-L2: shrl $3,%ecx # copy remainder 8 words at a time
- jz L4 # while swapping alternate bytes.
- .align 2,0x90
-L3: lodsw
- rorw $8,%ax
- stosw
- lodsw
- rorw $8,%ax
- stosw
- lodsw
- rorw $8,%ax
- stosw
- lodsw
- rorw $8,%ax
- stosw
- lodsw
- rorw $8,%ax
- stosw
- lodsw
- rorw $8,%ax
- stosw
- lodsw
- rorw $8,%ax
- stosw
- lodsw
- rorw $8,%ax
- stosw
- decl %ecx
- jnz L3
-
-L4: popl %edi
- popl %esi
- ret
diff --git a/lib/libc/i386/sys/Makefile.inc b/lib/libc/i386/sys/Makefile.inc
deleted file mode 100644
index b65e4f5..0000000
--- a/lib/libc/i386/sys/Makefile.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-# from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp
-# $Id: Makefile.inc,v 1.6 1997/10/16 14:26:13 bde Exp $
-
-SRCS+= i386_get_ldt.c i386_set_ldt.c
-
-.if ${LIB} == "c"
-MAN2+= i386_get_ldt.2
-
-MLINKS+=i386_get_ldt.2 i386_set_ldt.2
-.endif
diff --git a/lib/libc/i386/sys/Ovfork.S b/lib/libc/i386/sys/Ovfork.S
deleted file mode 100644
index e4ed257..0000000
--- a/lib/libc/i386/sys/Ovfork.S
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "DEFS.h"
-#include "SYS.h"
-
-/*
- * pid = vfork();
- *
- * %edx == 0 in parent process, %edx == 1 in child process.
- * %eax == pid of child in parent, %eax == pid of parent in child.
- *
- */
-
-ENTRY(vfork)
- popl %ecx /* my rta into ecx */
- lea SYS_vfork,%eax
- KERNCALL
- jb verror
-vforkok:
- cmpl $0,%edx /* child process? */
- jne child /* yes */
- jmp parent
-#ifdef _THREAD_SAFE
- /*
- * Threaded version using __error().
- */
- .globl CNAME(__error)
- .type CNAME(__error),@function
-verror:
- pushl %eax
-#ifdef PIC
- call PIC_PLT(CNAME(__error))
-#else
- call CNAME(__error)
-#endif
- popl %ecx
- movl %ecx,(%eax)
- movl $-1,%eax
- movl $-1,%edx
-#else /* !_THREAD_SAFE */
- /*
- * Non-threaded version using global errno.
- */
- .globl CNAME(errno)
-verror:
-#ifdef PIC
- PIC_PROLOGUE
- movl PIC_GOT(CNAME(errno)), %edx
- movl %eax,(%edx)
- PIC_EPILOGUE
-#else
- movl %eax,CNAME(errno)
-#endif
- movl $-1,%eax
-#endif /* !_THREAD_SAFE */
- jmp %ecx
-child:
- movl $0,%eax
-parent:
- jmp %ecx
diff --git a/lib/libc/i386/sys/brk.S b/lib/libc/i386/sys/brk.S
deleted file mode 100644
index 4fdf0c6..0000000
--- a/lib/libc/i386/sys/brk.S
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
- .globl HIDENAME(curbrk)
- .globl HIDENAME(minbrk)
-ENTRY(_brk)
- jmp ok
-
-ENTRY(brk)
-#ifdef PIC
- movl 4(%esp),%eax
- PIC_PROLOGUE
- movl PIC_GOT(HIDENAME(curbrk)),%edx # set up GOT addressing
- movl PIC_GOT(HIDENAME(minbrk)),%ecx #
- PIC_EPILOGUE
- cmpl %eax,(%ecx)
- jbe ok
- movl (%ecx),%eax
- movl %eax,4(%esp)
-ok:
- lea SYS_break,%eax
- KERNCALL
- jb err
- movl 4(%esp),%eax
- movl %eax,(%edx)
- movl $0,%eax
- ret
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
-
-#else
-
- movl 4(%esp),%eax
- cmpl %eax,HIDENAME(minbrk)
- jbe ok
- movl HIDENAME(minbrk),%eax
- movl %eax,4(%esp)
-ok:
- lea SYS_break,%eax
- KERNCALL
- jb err
- movl 4(%esp),%eax
- movl %eax,HIDENAME(curbrk)
- movl $0,%eax
- ret
-err:
- jmp HIDENAME(cerror)
-#endif
diff --git a/lib/libc/i386/sys/cerror.S b/lib/libc/i386/sys/cerror.S
deleted file mode 100644
index 2d8f935..0000000
--- a/lib/libc/i386/sys/cerror.S
+++ /dev/null
@@ -1,87 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
- .globl HIDENAME(cerror)
-
-#ifdef _THREAD_SAFE
- /*
- * Threaded version using __error().
- */
- .globl CNAME(__error)
- .type CNAME(__error),@function
-HIDENAME(cerror):
- pushl %eax
-#ifdef PIC
- /* The caller must execute the PIC prologue before jumping to cerror. */
- call PIC_PLT(CNAME(__error))
- popl %ecx
- PIC_EPILOGUE
-#else
- call CNAME(__error)
- popl %ecx
-#endif
- movl %ecx,(%eax)
- movl $-1,%eax
- movl $-1,%edx
- ret
-
-#else /* _THREAD_SAFE */
- /*
- * Non-threaded version using global errno.
- */
- .globl CNAME(errno)
-HIDENAME(cerror):
-#ifdef PIC
- /* The caller must execute the PIC prologue before jumping to cerror. */
- movl PIC_GOT(CNAME(errno)),%ecx
- movl %eax,(%ecx)
- PIC_EPILOGUE
-#else
- movl %eax,CNAME(errno)
-#endif
- movl $-1,%eax
- movl $-1,%edx
- ret
-#endif /* _THREAD_SAFE */
diff --git a/lib/libc/i386/sys/exect.S b/lib/libc/i386/sys/exect.S
deleted file mode 100644
index af0d2ee..0000000
--- a/lib/libc/i386/sys/exect.S
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-#include <machine/psl.h>
-
-ENTRY(exect)
- lea SYS_execve,%eax
- pushf
- popl %edx
- orl $ PSL_T,%edx
- pushl %edx
- popf
- KERNCALL
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */
diff --git a/lib/libc/i386/sys/fork.S b/lib/libc/i386/sys/fork.S
deleted file mode 100644
index ab908a9..0000000
--- a/lib/libc/i386/sys/fork.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-PSYSCALL(fork)
- cmpl $0,%edx /* parent, since %edx == 0 in parent, 1 in child */
- je 1f
- movl $0,%eax
-1:
- ret /* pid = fork(); */
diff --git a/lib/libc/i386/sys/i386_get_ldt.2 b/lib/libc/i386/sys/i386_get_ldt.2
deleted file mode 100644
index ddf6e0c..0000000
--- a/lib/libc/i386/sys/i386_get_ldt.2
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" Copyright (c) 1980, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)fork.2 6.5 (Berkeley) 3/10/91
-.\" $Id$
-.\"
-.Dd September 20, 1993
-.Dt I386_GET_LDT 2
-.Os FreeBSD
-.Sh NAME
-.Nm i386_get_ldt ,
-.Nm i386_set_ldt
-.Nd manage i386 per-process Local Descriptor Table entries
-.Sh SYNOPSIS
-.Fd #include <machine/segments.h>
-.Fd #include <machine/sysarch.h>
-.Ft int
-.Fn i386_get_ldt "int start_sel" "union descriptor *descs" "int num_sels"
-.Ft int
-.Fn i386_set_ldt "int start_sel" "union descriptor *descs" "int num_sels"
-.Sh DESCRIPTION
-.Fn i386_get_ldt
-will return the list of i386 descriptors that the process has in its
-LDT.
-.Fn i386_set_ldt
-will set a list of i386 descriptors for the current process in its
-LDT.
-Both routines accept a starting selector number
-.Fa start_sel
-, an array of memory that
-will contain the descriptors to be set or returned
-.Fa descs
-, and the number of entries to set or return
-.Fa num_sels .
-.Pp
-The argument
-.Fa descs
-can be either segment_descriptor or gate_descriptor and are defined in
-.Fd <i386/segments.h> .
-These structures are defined by the architecure
-as disjoint bit-fields, so care must be taken in constructing them.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn i386_get_ldt
-returns the number of descriptors currently in the LDT.
-.Fn i386_set_ldt
-returns the first selector set.
-Otherwise, a value of -1 is returned and the global
-variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn i386_get_ldt
-and
-.Fn i386_set_ldt
-will fail if:
-.Bl -tag -width [EINVAL]
-.It Bq Er EINVAL
-An inappropriate parameter was used for
-.Fa start_sel
-or
-.Fa num_sels .
-.It Bq Er EACESS
-The caller attempted to use a descriptor that would
-circumvent protection or cause a failure.
-.El
-.Sh REFERENCES
-i386 Microprocessor Programmer's Reference Manual, Intel
-.Sh WARNING
-You can really hose your process using this.
diff --git a/lib/libc/i386/sys/i386_get_ldt.c b/lib/libc/i386/sys/i386_get_ldt.c
deleted file mode 100644
index 628052b..0000000
--- a/lib/libc/i386/sys/i386_get_ldt.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1993 John Brezak
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static const char rcsid[] = "$Id$";
-#endif /* LIBC_RCS and not lint */
-
-#include <sys/cdefs.h>
-#include <machine/segments.h>
-#include <machine/sysarch.h>
-
-struct parms {
- int start;
- union descriptor *descs;
- int num;
-};
-
-int
-i386_get_ldt(int start, union descriptor *descs, int num)
-{
- struct parms p;
-
- p.start = start;
- p.descs = descs;
- p.num = num;
-
- return sysarch(I386_GET_LDT, (char *)&p);
-}
diff --git a/lib/libc/i386/sys/i386_set_ldt.c b/lib/libc/i386/sys/i386_set_ldt.c
deleted file mode 100644
index 6a54b30..0000000
--- a/lib/libc/i386/sys/i386_set_ldt.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1993 John Brezak
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static const char rcsid[] = "$Id$";
-#endif /* LIBC_RCS and not lint */
-
-#include <sys/cdefs.h>
-#include <machine/segments.h>
-#include <machine/sysarch.h>
-
-struct parms {
- int start;
- union descriptor *descs;
- int num;
-};
-
-int
-i386_set_ldt(int start, union descriptor *descs, int num)
-{
- struct parms p;
-
- p.start = start;
- p.descs = descs;
- p.num = num;
-
- return sysarch(I386_SET_LDT, (char *)&p);
-}
diff --git a/lib/libc/i386/sys/pipe.S b/lib/libc/i386/sys/pipe.S
deleted file mode 100644
index 637b86f..0000000
--- a/lib/libc/i386/sys/pipe.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-PSYSCALL(pipe)
- movl 4(%esp),%ecx
- movl %eax,(%ecx)
- movl %edx,4(%ecx)
- movl $0,%eax
- ret
diff --git a/lib/libc/i386/sys/ptrace.S b/lib/libc/i386/sys/ptrace.S
deleted file mode 100644
index 018a02c..0000000
--- a/lib/libc/i386/sys/ptrace.S
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-ENTRY(ptrace)
- xorl %eax,%eax
-#ifdef PIC
- PIC_PROLOGUE
- movl PIC_GOT(CNAME(errno)),%edx
- movl %eax,(%edx)
- PIC_EPILOGUE
-#else
- movl %eax,CNAME(errno)
-#endif
- lea SYS_ptrace,%eax
- KERNCALL
- jb err
- ret
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
diff --git a/lib/libc/i386/sys/reboot.S b/lib/libc/i386/sys/reboot.S
deleted file mode 100644
index 70049b2..0000000
--- a/lib/libc/i386/sys/reboot.S
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-SYSCALL(reboot)
- iret
diff --git a/lib/libc/i386/sys/rfork.S b/lib/libc/i386/sys/rfork.S
deleted file mode 100644
index 189d399..0000000
--- a/lib/libc/i386/sys/rfork.S
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-PSYSCALL(rfork)
- cmpl $0,%edx /* parent, since %edx == 0 in parent, 1 in child */
- je 1f
- movl $0,%eax
-1:
- ret /* pid = rfork(); */
diff --git a/lib/libc/i386/sys/sbrk.S b/lib/libc/i386/sys/sbrk.S
deleted file mode 100644
index a3afd89..0000000
--- a/lib/libc/i386/sys/sbrk.S
+++ /dev/null
@@ -1,95 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
- .globl CNAME(end)
- .globl HIDENAME(minbrk)
- .globl HIDENAME(curbrk)
-
- .data
-HIDENAME(minbrk): .long CNAME(end)
-HIDENAME(curbrk): .long CNAME(end)
- .text
-
-ENTRY(sbrk)
-#ifdef PIC
- movl 4(%esp),%ecx
- PIC_PROLOGUE
- movl PIC_GOT(HIDENAME(curbrk)),%edx
- movl (%edx),%eax
- PIC_EPILOGUE
- testl %ecx,%ecx
- jz back
- addl %eax,4(%esp)
- lea SYS_break,%eax
- KERNCALL
- jb err
- PIC_PROLOGUE
- movl PIC_GOT(HIDENAME(curbrk)),%edx
- movl (%edx),%eax
- addl %ecx,(%edx)
- PIC_EPILOGUE
-back:
- ret
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
-
-#else /* !PIC */
-
- movl 4(%esp),%ecx
- movl HIDENAME(curbrk),%eax
- testl %ecx,%ecx
- jz back
- addl %eax,4(%esp)
- lea SYS_break,%eax
- KERNCALL
- jb err
- movl HIDENAME(curbrk),%eax
- addl %ecx,HIDENAME(curbrk)
-back:
- ret
-err:
- jmp HIDENAME(cerror)
-#endif /* PIC */
diff --git a/lib/libc/i386/sys/setlogin.S b/lib/libc/i386/sys/setlogin.S
deleted file mode 100644
index 7bcf3bd..0000000
--- a/lib/libc/i386/sys/setlogin.S
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* LIBC_RCS and not lint */
-
-#include "SYS.h"
-
-.globl CNAME(_logname_valid) /* in getlogin() */
-
-SYSCALL(setlogin)
-#ifdef PIC
- PIC_PROLOGUE
- pushl %eax
- movl PIC_GOT(CNAME(_logname_valid)),%eax
- movl $0,(%eax)
- popl %eax
- PIC_EPILOGUE
-#else
- movl $0,CNAME(_logname_valid)
-#endif
- ret /* setlogin(name) */
diff --git a/lib/libc/i386/sys/sigpending.S b/lib/libc/i386/sys/sigpending.S
deleted file mode 100644
index 2ce0df8..0000000
--- a/lib/libc/i386/sys/sigpending.S
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-PSYSCALL(sigpending)
- movl 4(%esp),%ecx # fetch pointer to...
- movl %eax,(%ecx) # store old mask
- xorl %eax,%eax
- ret
diff --git a/lib/libc/i386/sys/sigprocmask.S b/lib/libc/i386/sys/sigprocmask.S
deleted file mode 100644
index 6dbc8c9..0000000
--- a/lib/libc/i386/sys/sigprocmask.S
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_sigprocmask)
-#else
-ENTRY(sigprocmask)
-#endif
- movl 8(%esp),%ecx # fetch new sigset pointer
- cmpl $0,%ecx # check new sigset pointer
- jne 1f # if not null, indirect
-/* movl $0,8(%esp) # null mask pointer: block empty set */
- movl $1,4(%esp) # SIG_BLOCK
- jmp 2f
-1: movl (%ecx),%ecx # fetch indirect ...
- movl %ecx,8(%esp) # to new mask arg
-2: lea SYS_sigprocmask,%eax
- KERNCALL
- jb err
- movl 12(%esp),%ecx # fetch old mask requested
- cmpl $0,%ecx # test if old mask requested
- je out
- movl %eax,(%ecx) # store old mask
-out:
- xorl %eax,%eax
- ret
diff --git a/lib/libc/i386/sys/sigreturn.S b/lib/libc/i386/sys/sigreturn.S
deleted file mode 100644
index 65deb40..0000000
--- a/lib/libc/i386/sys/sigreturn.S
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-/*
- * NOTE: If the profiling ENTRY() code ever changes any registers, they
- * must be saved. On FreeBSD, this is not the case.
- */
-
-PSYSCALL(sigreturn)
- ret
diff --git a/lib/libc/i386/sys/sigsuspend.S b/lib/libc/i386/sys/sigsuspend.S
deleted file mode 100644
index 660eabf..0000000
--- a/lib/libc/i386/sys/sigsuspend.S
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-err:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
-
-#ifdef _THREAD_SAFE
-ENTRY(_thread_sys_sigsuspend)
-#else
-ENTRY(sigsuspend)
-#endif
- movl 4(%esp),%eax # fetch mask arg
- movl (%eax),%eax # indirect to mask arg
- movl %eax,4(%esp)
- lea SYS_sigsuspend,%eax
- KERNCALL
- jb err
- xorl %eax,%eax # shouldn t happen
- ret
diff --git a/lib/libc/i386/sys/syscall.S b/lib/libc/i386/sys/syscall.S
deleted file mode 100644
index 711a770..0000000
--- a/lib/libc/i386/sys/syscall.S
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#if defined(SYSLIBC_RCS) && !defined(lint)
- .text
- .asciz "$Id$"
-#endif /* SYSLIBC_RCS and not lint */
-
-#include "SYS.h"
-
-ENTRY(syscall)
- pop %ecx /* rta */
- pop %eax /* syscall number */
- push %ecx
- KERNCALL
- push %ecx /* need to push a word to keep stack frame intact
- upon return; the word must be the return address. */
- jb 1f
- ret
-1:
- PIC_PROLOGUE
- jmp PIC_PLT(HIDENAME(cerror))
diff --git a/lib/libc/locale/Makefile.inc b/lib/libc/locale/Makefile.inc
deleted file mode 100644
index 87a41f6..0000000
--- a/lib/libc/locale/Makefile.inc
+++ /dev/null
@@ -1,26 +0,0 @@
-# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.10 1997/10/15 16:15:34 bde Exp $
-
-# locale sources
-.PATH: ${.CURDIR}/../libc/${MACHINE}/locale ${.CURDIR}/../libc/locale
-
-SRCS+= ansi.c collate.c collcmp.c ctype.c euc.c frune.c isctype.c lconv.c \
- localeconv.c mbrune.c mskanji.c nomacros.c none.c rune.c runetype.c \
- setinvalidrune.c setlocale.c setrunelocale.c table.c tolower.c \
- toupper.c utf2.c
-
-.if ${LIB} == "c"
-MAN3+= ctype.3 isalnum.3 isalpha.3 isascii.3 isblank.3 iscntrl.3 \
- isdigit.3 isgraph.3 islower.3 isprint.3 ispunct.3 isspace.3 \
- isupper.3 isxdigit.3 mbrune.3 multibyte.3 rune.3 setlocale.3 \
- toascii.3 tolower.3 toupper.3
-MAN4+= euc.4 utf2.4
-
-MLINKS+=mbrune.3 mbmb.3 mbrune.3 mbrrune.3
-MLINKS+=multibyte.3 mblen.3 multibyte.3 mbstowcs.3 multibyte.3 mbtowc.3 \
- multibyte.3 wcstombs.3 multibyte.3 wctomb.3
-MLINKS+=rune.3 fgetrune.3 rune.3 fputrune.3 rune.3 fungetrune.3 \
- rune.3 setinvalidrune.3 rune.3 setrunelocale.3 rune.3 sgetrune.3 \
- rune.3 sputrune.3
-MLINKS+=setlocale.3 localeconv.3
-.endif
diff --git a/lib/libc/locale/ansi.c b/lib/libc/locale/ansi.c
deleted file mode 100644
index a5a3362..0000000
--- a/lib/libc/locale/ansi.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ansi.c 8.1 (Berkeley) 6/27/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-#include <limits.h>
-#include <stddef.h>
-#include <rune.h>
-
-int
-mblen(s, n)
- const char *s;
- size_t n;
-{
- char const *e;
-
- if (s == 0 || *s == 0)
- return (0); /* No support for state dependent encodings. */
-
- if (sgetrune(s, n, &e) == _INVALID_RUNE)
- return (s - e);
- return (e - s);
-}
-
-int
-mbtowc(pwc, s, n)
- wchar_t *pwc;
- const char *s;
- size_t n;
-{
- char const *e;
- rune_t r;
-
- if (s == 0 || *s == 0)
- return (0); /* No support for state dependent encodings. */
-
- if ((r = sgetrune(s, n, &e)) == _INVALID_RUNE)
- return (s - e);
- if (pwc)
- *pwc = r;
- return (e - s);
-}
-
-int
-wctomb(s, wchar)
- char *s;
- wchar_t wchar;
-{
- char *e;
-
- if (s == 0)
- return (0); /* No support for state dependent encodings. */
-
- if (wchar == 0) {
- *s = 0;
- return (1);
- }
-
- sputrune(wchar, s, MB_CUR_MAX, &e);
- return (e ? e - s : -1);
-}
-
-size_t
-mbstowcs(pwcs, s, n)
- wchar_t *pwcs;
- const char *s;
- size_t n;
-{
- char const *e;
- int cnt = 0;
-
- if (!pwcs || !s)
- return (-1);
-
- while (n-- > 0) {
- *pwcs = sgetrune(s, MB_LEN_MAX, &e);
- if (*pwcs == _INVALID_RUNE)
- return (-1);
- if (*pwcs++ == 0)
- break;
- s = e;
- ++cnt;
- }
- return (cnt);
-}
-
-size_t
-wcstombs(s, pwcs, n)
- char *s;
- const wchar_t *pwcs;
- size_t n;
-{
- char *e;
- int cnt = 0;
-
- if (!pwcs || !s)
- return (-1);
-
- while (n > 0) {
- if (*pwcs == 0) {
- *s = 0;
- break;
- }
- if (!sputrune(*pwcs++, s, n, &e))
- return (-1); /* encoding error */
- if (!e) /* too long */
- return (cnt);
- cnt += e - s;
- n -= e - s;
- s = e;
- }
- return (cnt);
-}
diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c
deleted file mode 100644
index d1f03e7..0000000
--- a/lib/libc/locale/collate.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*-
- * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
- * at Electronni Visti IA, Kiev, Ukraine.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <rune.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sysexits.h>
-#include "collate.h"
-#include "setlocale.h"
-
-int __collate_load_error = 1;
-char __collate_version[STR_LEN];
-u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
-struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1];
-struct __collate_st_chain_pri __collate_chain_pri_table[TABLE_SIZE];
-
-#define FREAD(a, b, c, d) \
- do { \
- if(fread(a, b, c, d) != c) { \
- fclose(d); \
- return -1; \
- } \
- } while(0)
-
-void __collate_err(int ex, const char *f) __dead2;
-
-int
-__collate_load_tables(encoding)
- char *encoding;
-{
- char buf[PATH_MAX];
- FILE *fp;
- int save_load_error;
-
- save_load_error = __collate_load_error;
- __collate_load_error = 1;
- if (!encoding) {
- __collate_load_error = save_load_error;
- return -1;
- }
- if (!strcmp(encoding, "C") || !strcmp(encoding, "POSIX"))
- return 0;
- if (!_PathLocale) {
- __collate_load_error = save_load_error;
- return -1;
- }
- /* Range checking not needed, encoding has fixed size */
- (void) strcpy(buf, _PathLocale);
- (void) strcat(buf, "/");
- (void) strcat(buf, encoding);
- (void) strcat(buf, "/LC_COLLATE");
- if ((fp = fopen(buf, "r")) == NULL) {
- __collate_load_error = save_load_error;
- return -1;
- }
- FREAD(__collate_version, sizeof(__collate_version), 1, fp);
- if (strcmp(__collate_version, COLLATE_VERSION) != 0) {
- fclose(fp);
- return -1;
- }
- FREAD(__collate_substitute_table, sizeof(__collate_substitute_table),
- 1, fp);
- FREAD(__collate_char_pri_table, sizeof(__collate_char_pri_table), 1,
- fp);
- FREAD(__collate_chain_pri_table, sizeof(__collate_chain_pri_table), 1,
- fp);
- fclose(fp);
- __collate_load_error = 0;
- return 0;
-}
-
-u_char *
-__collate_substitute(s)
- const u_char *s;
-{
- int dest_len = 0, len = 0;
- int delta = strlen(s);
- u_char *dest_str = NULL;
-
- if(s == NULL || *s == '\0')
- return __collate_strdup("");
- while(*s) {
- len += strlen(__collate_substitute_table[*s]);
- while(dest_len <= len) {
- if(!dest_str)
- dest_str = calloc(dest_len = delta, 1);
- else
- dest_str = realloc(dest_str, dest_len += delta);
- if(dest_str == NULL)
- __collate_err(EX_OSERR, __FUNCTION__);
- }
- strcat(dest_str, __collate_substitute_table[*s++]);
- }
- return dest_str;
-}
-
-void
-__collate_lookup(t, len, prim, sec)
- u_char *t;
- int *len, *prim, *sec;
-{
- struct __collate_st_chain_pri *p2;
-
- *len = 1;
- *prim = *sec = 0;
- for(p2 = __collate_chain_pri_table; p2->str[0]; p2++) {
- if(strncmp(t, p2->str, strlen(p2->str)) == 0) {
- *len = strlen(p2->str);
- *prim = p2->prim;
- *sec = p2->sec;
- return;
- }
- }
- *prim = __collate_char_pri_table[*t].prim;
- *sec = __collate_char_pri_table[*t].sec;
-}
-
-u_char *
-__collate_strdup(s)
- u_char *s;
-{
- u_char *t = strdup(s);
-
- if (t == NULL)
- __collate_err(EX_OSERR, __FUNCTION__);
- return t;
-}
-
-void
-__collate_err(int ex, const char *f)
-{
- extern char *__progname; /* Program name, from crt0. */
- const char *s;
- int serrno = errno;
-
- s = __progname;
- write(STDERR_FILENO, s, strlen(s));
- write(STDERR_FILENO, ": ", 2);
- s = f;
- write(STDERR_FILENO, s, strlen(s));
- write(STDERR_FILENO, ": ", 2);
- s = strerror(serrno);
- write(STDERR_FILENO, s, strlen(s));
- write(STDERR_FILENO, "\n", 1);
- exit(ex);
-}
-
-#ifdef COLLATE_DEBUG
-void
-__collate_print_tables()
-{
- int i;
- struct __collate_st_chain_pri *p2;
-
- printf("Substitute table:\n");
- for (i = 0; i < UCHAR_MAX + 1; i++)
- if (i != *__collate_substitute_table[i])
- printf("\t'%c' --> \"%s\"\n", i,
- __collate_substitute_table[i]);
- printf("Chain priority table:\n");
- for (p2 = __collate_chain_pri_table; p2->str[0]; p2++)
- printf("\t\"%s\" : %d %d\n\n", p2->str, p2->prim, p2->sec);
- printf("Char priority table:\n");
- for (i = 0; i < UCHAR_MAX + 1; i++)
- printf("\t'%c' : %d %d\n", i, __collate_char_pri_table[i].prim,
- __collate_char_pri_table[i].sec);
-}
-#endif
diff --git a/lib/libc/locale/collate.h b/lib/libc/locale/collate.h
deleted file mode 100644
index 638b4be..0000000
--- a/lib/libc/locale/collate.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
- * at Electronni Visti IA, Kiev, Ukraine.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#ifndef COLLATE_H_INCLUDED
-#define COLLATE_H_INCLUDED
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <limits.h>
-
-#define STR_LEN 10
-#define TABLE_SIZE 100
-#define COLLATE_VERSION "1.0\n"
-
-struct __collate_st_char_pri {
- int prim, sec;
-};
-struct __collate_st_chain_pri {
- u_char str[STR_LEN];
- int prim, sec;
-};
-
-extern int __collate_load_error;
-extern char __collate_version[STR_LEN];
-extern u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
-extern struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1];
-extern struct __collate_st_chain_pri __collate_chain_pri_table[TABLE_SIZE];
-
-__BEGIN_DECLS
-u_char *__collate_strdup __P((u_char *));
-u_char *__collate_substitute __P((const u_char *));
-int __collate_load_tables __P((char *));
-void __collate_lookup __P((u_char *, int *, int *, int *));
-int __collate_range_cmp __P((int, int));
-#ifdef COLLATE_DEBUG
-void __collate_print_tables __P((void));
-#endif
-__END_DECLS
-
-#endif /* not COLLATE_H_INCLUDED */
diff --git a/lib/libc/locale/collcmp.c b/lib/libc/locale/collcmp.c
deleted file mode 100644
index 520f800..0000000
--- a/lib/libc/locale/collcmp.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 1996 by Andrey A. Chernov, Moscow, Russia.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: collcmp.c,v 1.10 1997/02/22 14:59:54 peter Exp $
- */
-
-#define ASCII_COMPATIBLE_COLLATE /* see usr.bin/colldef/data */
-
-#include <string.h>
-#include "collate.h"
-#ifndef ASCII_COMPATIBLE_COLLATE
-#include <ctype.h>
-#endif
-
-/*
- * Compare two characters converting collate information
- * into ASCII-compatible range, it allows to handle
- * "[a-z]"-type ranges with national characters.
- */
-
-int __collate_range_cmp (c1, c2)
- int c1, c2;
-{
- static char s1[2], s2[2];
- int ret;
-#ifndef ASCII_COMPATIBLE_COLLATE
- int as1, as2, al1, al2;
-#endif
-
- c1 &= UCHAR_MAX;
- c2 &= UCHAR_MAX;
- if (c1 == c2)
- return (0);
-
-#ifndef ASCII_COMPATIBLE_COLLATE
- as1 = isascii(c1);
- as2 = isascii(c2);
- al1 = isalpha(c1);
- al2 = isalpha(c2);
-
- if (as1 || as2 || al1 || al2) {
- if ((as1 && as2) || (!al1 && !al2))
- return (c1 - c2);
- if (al1 && !al2) {
- if (isupper(c1))
- return ('A' - c2);
- else
- return ('a' - c2);
- } else if (al2 && !al1) {
- if (isupper(c2))
- return (c1 - 'A');
- else
- return (c1 - 'a');
- }
- }
-#endif
- s1[0] = c1;
- s2[0] = c2;
- if ((ret = strcoll(s1, s2)) != 0)
- return (ret);
- return (c1 - c2);
-}
diff --git a/lib/libc/locale/ctype.3 b/lib/libc/locale/ctype.3
deleted file mode 100644
index 1493cc3..0000000
--- a/lib/libc/locale/ctype.3
+++ /dev/null
@@ -1,120 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ctype.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt CTYPE 3
-.Os
-.Sh NAME
-.Nm isalnum ,
-.Nm isalpha ,
-.Nm isascii ,
-.Nm isblank ,
-.Nm iscntrl ,
-.Nm isdigit ,
-.Nm isgraph ,
-.Nm islower ,
-.Nm isprint ,
-.Nm ispunct ,
-.Nm isspace ,
-.Nm isupper ,
-.Nm isxdigit ,
-.Nm toascii
-.Nm tolower ,
-.Nm toupper ,
-.Nd character classification macros
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isalnum "int c"
-.Ft int
-.Fn isalpha "int c"
-.Ft int
-.Fn isascii "int c"
-.Ft int
-.Fn iscntrl "int c"
-.Ft int
-.Fn isdigit "int c"
-.Ft int
-.Fn isgraph "int c"
-.Ft int
-.Fn islower "int c"
-.Ft int
-.Fn isprint "int c"
-.Ft int
-.Fn ispunct "int c"
-.Ft int
-.Fn isspace "int c"
-.Ft int
-.Fn isupper "int c"
-.Ft int
-.Fn isxdigit "int c"
-.Ft int
-.Fn toascii "int c"
-.Ft int
-.Fn tolower "int c"
-.Ft int
-.Fn toupper "int c"
-.Sh DESCRIPTION
-The above functions perform character tests and conversions on the integer
-.Ar c .
-They are available as macros, defined in the include file
-.Aq Pa ctype.h ,
-or as true functions in the C library.
-See the specific manual pages for more information.
-.Sh SEE ALSO
-.Xr isalnum 3 ,
-.Xr isalpha 3 ,
-.Xr isascii 3 ,
-.Xr isblank 3 ,
-.Xr iscntrl 3 ,
-.Xr isdigit 3 ,
-.Xr isgraph 3 ,
-.Xr islower 3 ,
-.Xr isprint 3 ,
-.Xr ispunct 3 ,
-.Xr isspace 3 ,
-.Xr isupper 3 ,
-.Xr isxdigit 3 ,
-.Xr toascii 3 ,
-.Xr tolower 3 ,
-.Xr toupper 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-These functions, except for
-.Fn isblank ,
-.Fn toupper ,
-.Fn tolower
-and
-.Fn toascii ,
-conform to
-.St -ansiC .
diff --git a/lib/libc/locale/ctype.c b/lib/libc/locale/ctype.c
deleted file mode 100644
index 0418b1a..0000000
--- a/lib/libc/locale/ctype.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ctype.c 8.2 (Berkeley) 1/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#define _U 0x01
-#define _L 0x02
-#define _N 0x04
-#define _S 0x08
-#define _P 0x10
-#define _C 0x20
-#define _X 0x40
-#define _B 0x80
-
-char __ctype[1 + 256] = {
- 0,
- _C, _C, _C, _C, _C, _C, _C, _C,
- _C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C,
- _C, _C, _C, _C, _C, _C, _C, _C,
- _C, _C, _C, _C, _C, _C, _C, _C,
- _S|_B, _P, _P, _P, _P, _P, _P, _P,
- _P, _P, _P, _P, _P, _P, _P, _P,
- _N, _N, _N, _N, _N, _N, _N, _N,
- _N, _N, _P, _P, _P, _P, _P, _P,
- _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U,
- _U, _U, _U, _U, _U, _U, _U, _U,
- _U, _U, _U, _U, _U, _U, _U, _U,
- _U, _U, _U, _P, _P, _P, _P, _P,
- _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L,
- _L, _L, _L, _L, _L, _L, _L, _L,
- _L, _L, _L, _L, _L, _L, _L, _L,
- _L, _L, _L, _P, _P, _P, _P, _C
-};
-
-char *_ctype_ = __ctype; /* Backward compatibility. */
diff --git a/lib/libc/locale/euc.4 b/lib/libc/locale/euc.4
deleted file mode 100644
index ffcf6d8..0000000
--- a/lib/libc/locale/euc.4
+++ /dev/null
@@ -1,241 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Paul Borman at Krystal Technologies.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)euc.4 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt EUC 4
-.Os
-.Sh NAME
-.Nm euc
-.Nd EUC encoding of runes
-.Sh SYNOPSIS
-.Nm ENCODING
-.Qq EUC
-.Pp
-.Nm VARIABLE
-.Ar len1
-.Ar mask1
-.Ar len2
-.Ar mask2
-.Ar len3
-.Ar mask3
-.Ar len4
-.Ar mask4
-.Ar mask
-.Sh DESCRIPTION
-The
-.Nm EUC
-encoding is provided for compatibility with
-.Ux
-based systems.
-See
-.Xr mklocale 1
-for a complete description of the
-.Ev LC_CTYPE
-source file format.
-.Pp
-.Nm EUC
-implements a system of 4 multibyte codesets.
-A multibyte character in the first codeset consists of
-.Ar len1
-bytes starting with a byte in the range of 0x00 to 0x7f.
-To allow use of ASCII,
-.Ar len1
-is always 1.
-A multibyte character in the second codeset consists of
-.Ar len2
-bytes starting with a byte in the range of 0x80-0xff excluding 0x8e and 0x8f.
-A multibyte character in the third codeset consists of
-.Ar len3
-bytes starting with the byte 0x8e.
-A multibyte character in the fourth codeset consists of
-.Ar len4
-bytes starting with the byte 0x8f.
-.Pp
-The
-.Ev rune_t
-encoding of
-.Nm EUC
-multibyte characters is dependent on the
-.Ar len
-and
-.Ar mask
-arguments.
-First, the bytes are moved into a
-.Ev rune_t
-as follows:
-.Bd -literal
-byte0 << ((\fIlen\fPN-1) * 8) | byte1 << ((\fIlen\fPN-2) * 8) | ... | byte\fIlen\fPN-1
-.Ed
-.Pp
-The result is then ANDed with
-.Ar ~mask
-and ORed with
-.Ar maskN .
-Codesets 2 and 3 are special in that the leading byte (0x8e or 0x8f) is
-first removed and the
-.Ar lenN
-argument is reduced by 1.
-.Pp
-For example, the Japanese locale has the following
-.Ev VARIABLE
-line:
-.Bd -literal
-VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080
-.Ed
-.Pp
-Codeset 1 consists of the values 0x0000 - 0x007f.
-.Pp
-Codeset 2 consists of the values who have the bits 0x8080 set.
-.Pp
-Codeset 3 consists of the values 0x0080 - 0x00ff.
-.Pp
-Codeset 4 consists of the values 0x8000 - 0xff7f excluding the values
-which have the 0x0080 bit set.
-.Pp
-Notice that the global
-.Ar mask
-is set to 0x8080, this implies that from those 2 bits the codeset can
-be determined.
-.Sh "EXAMPLE - Japanese Locale"
-This is a complete example of an
-.Ev LC_CTYPE
-source file for the Japanese locale
-.Bd -literal
-/*
- * Japanese LOCALE_CTYPE definitions using EUC of JIS character sets
- */
-
-ENCODING "EUC"
-
-/* JIS JIS JIS */
-/* X201 X208 X201 */
-/* 00-7f 84-fe */
-
-VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080
-
-/*
- * Code Set 1
- */
-ALPHA 'A' - 'Z' 'a' - 'z'
-CONTROL 0x00 - 0x1f 0x7f
-DIGIT '0' - '9'
-GRAPH 0x21 - 0x7e
-LOWER 'a' - 'z'
-PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e
-SPACE 0x09 - 0x0d 0x20
-UPPER 'A' - 'Z'
-XDIGIT 'a' - 'f' 'A' - 'F'
-BLANK ' ' '\t'
-PRINT 0x20 - 0x7e
-
-MAPLOWER < 'A' - 'Z' : 'a' > < 'a' - 'z' : 'a' >
-MAPUPPER < 'A' - 'Z' : 'A' > < 'a' - 'z' : 'A' >
-TODIGIT < '0' - '9' : 0 >
-TODIGIT < 'A' - 'F' : 10 > < 'a' - 'f' : 10 >
-
-/*
- * Code Set 2
- */
-
-SPACE 0xa1a1
-PHONOGRAM 0xa1bc
-SPECIAL 0xa1a2 - 0xa1fe
-PUNCT 0xa1a2 - 0xa1f8 /* A few too many in here... */
-
-SPECIAL 0xa2a1 - 0xa2ae 0xa2ba - 0xa2c1 0xa2ca - 0xa2d0 0xa2dc - 0xa2ea
-SPECIAL 0xa2f2 - 0xa2f9 0xa2fe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- 0xf0fe 0xf1a1 - 0xf1fe
-IDEOGRAM 0xf2a1 - 0xf2fe 0xf3a1 - 0xf3fe 0xf4a1 - 0xf4a4
-/*
- * This is for Code Set 3, half-width kana
- */
-SPECIAL 0xa1 - 0xdf
-PHONOGRAM 0xa1 - 0xdf
-CONTROL 0x84 - 0x97 0x9b - 0x9f 0xe0 - 0xfe
-.Ed
-.Sh "SEE ALSO"
-.Xr mklocale 1 ,
-.Xr setlocale 3
diff --git a/lib/libc/locale/euc.5 b/lib/libc/locale/euc.5
deleted file mode 100644
index ffcf6d8..0000000
--- a/lib/libc/locale/euc.5
+++ /dev/null
@@ -1,241 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Paul Borman at Krystal Technologies.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)euc.4 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt EUC 4
-.Os
-.Sh NAME
-.Nm euc
-.Nd EUC encoding of runes
-.Sh SYNOPSIS
-.Nm ENCODING
-.Qq EUC
-.Pp
-.Nm VARIABLE
-.Ar len1
-.Ar mask1
-.Ar len2
-.Ar mask2
-.Ar len3
-.Ar mask3
-.Ar len4
-.Ar mask4
-.Ar mask
-.Sh DESCRIPTION
-The
-.Nm EUC
-encoding is provided for compatibility with
-.Ux
-based systems.
-See
-.Xr mklocale 1
-for a complete description of the
-.Ev LC_CTYPE
-source file format.
-.Pp
-.Nm EUC
-implements a system of 4 multibyte codesets.
-A multibyte character in the first codeset consists of
-.Ar len1
-bytes starting with a byte in the range of 0x00 to 0x7f.
-To allow use of ASCII,
-.Ar len1
-is always 1.
-A multibyte character in the second codeset consists of
-.Ar len2
-bytes starting with a byte in the range of 0x80-0xff excluding 0x8e and 0x8f.
-A multibyte character in the third codeset consists of
-.Ar len3
-bytes starting with the byte 0x8e.
-A multibyte character in the fourth codeset consists of
-.Ar len4
-bytes starting with the byte 0x8f.
-.Pp
-The
-.Ev rune_t
-encoding of
-.Nm EUC
-multibyte characters is dependent on the
-.Ar len
-and
-.Ar mask
-arguments.
-First, the bytes are moved into a
-.Ev rune_t
-as follows:
-.Bd -literal
-byte0 << ((\fIlen\fPN-1) * 8) | byte1 << ((\fIlen\fPN-2) * 8) | ... | byte\fIlen\fPN-1
-.Ed
-.Pp
-The result is then ANDed with
-.Ar ~mask
-and ORed with
-.Ar maskN .
-Codesets 2 and 3 are special in that the leading byte (0x8e or 0x8f) is
-first removed and the
-.Ar lenN
-argument is reduced by 1.
-.Pp
-For example, the Japanese locale has the following
-.Ev VARIABLE
-line:
-.Bd -literal
-VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080
-.Ed
-.Pp
-Codeset 1 consists of the values 0x0000 - 0x007f.
-.Pp
-Codeset 2 consists of the values who have the bits 0x8080 set.
-.Pp
-Codeset 3 consists of the values 0x0080 - 0x00ff.
-.Pp
-Codeset 4 consists of the values 0x8000 - 0xff7f excluding the values
-which have the 0x0080 bit set.
-.Pp
-Notice that the global
-.Ar mask
-is set to 0x8080, this implies that from those 2 bits the codeset can
-be determined.
-.Sh "EXAMPLE - Japanese Locale"
-This is a complete example of an
-.Ev LC_CTYPE
-source file for the Japanese locale
-.Bd -literal
-/*
- * Japanese LOCALE_CTYPE definitions using EUC of JIS character sets
- */
-
-ENCODING "EUC"
-
-/* JIS JIS JIS */
-/* X201 X208 X201 */
-/* 00-7f 84-fe */
-
-VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080
-
-/*
- * Code Set 1
- */
-ALPHA 'A' - 'Z' 'a' - 'z'
-CONTROL 0x00 - 0x1f 0x7f
-DIGIT '0' - '9'
-GRAPH 0x21 - 0x7e
-LOWER 'a' - 'z'
-PUNCT 0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e
-SPACE 0x09 - 0x0d 0x20
-UPPER 'A' - 'Z'
-XDIGIT 'a' - 'f' 'A' - 'F'
-BLANK ' ' '\t'
-PRINT 0x20 - 0x7e
-
-MAPLOWER < 'A' - 'Z' : 'a' > < 'a' - 'z' : 'a' >
-MAPUPPER < 'A' - 'Z' : 'A' > < 'a' - 'z' : 'A' >
-TODIGIT < '0' - '9' : 0 >
-TODIGIT < 'A' - 'F' : 10 > < 'a' - 'f' : 10 >
-
-/*
- * Code Set 2
- */
-
-SPACE 0xa1a1
-PHONOGRAM 0xa1bc
-SPECIAL 0xa1a2 - 0xa1fe
-PUNCT 0xa1a2 - 0xa1f8 /* A few too many in here... */
-
-SPECIAL 0xa2a1 - 0xa2ae 0xa2ba - 0xa2c1 0xa2ca - 0xa2d0 0xa2dc - 0xa2ea
-SPECIAL 0xa2f2 - 0xa2f9 0xa2fe
-
-DIGIT 0xa3b0 - 0xa3b9
-UPPER 0xa3c1 - 0xa3da /* Romaji */
-LOWER 0xa3e1 - 0xa3fa /* Romaji */
-MAPLOWER < 0xa3c1 - 0xa3da : 0xa3e1 > /* English */
-MAPLOWER < 0xa3e1 - 0xa3fa : 0xa3e1 > /* English */
-MAPUPPER < 0xa3c1 - 0xa3da : 0xa3c1 >
-MAPUPPER < 0xa3e1 - 0xa3fa : 0xa3c1 >
-
-XDIGIT 0xa3c1 - 0xa3c6 0xa3e1 - 0xa3e6
-
-TODIGIT < 0xa3b0 - 0xa3b9 : 0 >
-TODIGIT < 0xa3c1 - 0xa3c6 : 10 > < 0xa3e1 - 0xa3e6 : 10 >
-
-PHONOGRAM 0xa4a1 - 0xa4f3
-PHONOGRAM 0xa5a1 - 0xa5f6
-
-UPPER 0xa6a1 - 0xa6b8 /* Greek */
-LOWER 0xa6c1 - 0xa6d8 /* Greek */
-MAPLOWER < 0xa6a1 - 0xa6b8 : 0xa6c1 > < 0xa6c1 - 0xa6d8 : 0xa6c1 >
-MAPUPPER < 0xa6a1 - 0xa6b8 : 0xa6a1 > < 0xa6c1 - 0xa6d8 : 0xa6a1 >
-
-UPPER 0xa7a1 - 0xa7c1 /* Cyrillic */
-LOWER 0xa7d1 - 0xa7f1 /* Cyrillic */
-MAPLOWER < 0xa7a1 - 0xa7c1 : 0xa7d1 > < 0xa7d1 - 0xa7f1 : 0xa7d1 >
-MAPUPPER < 0xa7a1 - 0xa7c1 : 0xa7a1 > < 0xa7d1 - 0xa7f1 : 0xa7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xe4a1 - 0xe4fe 0xe5a1 - 0xe5fe
-IDEOGRAM 0xe6a1 - 0xe6fe 0xe7a1 - 0xe7fe 0xe8a1 - 0xe8fe
-IDEOGRAM 0xe9a1 - 0xe9fe 0xeaa1 - 0xeafe 0xeba1 - 0xebfe
-IDEOGRAM 0xeca1 - 0xecfe 0xeda1 - 0xedfe 0xeea1 - 0xeefe
-IDEOGRAM 0xefa1 - 0xeffe 0xf0a1 - 0xf0fe 0xf1a1 - 0xf1fe
-IDEOGRAM 0xf2a1 - 0xf2fe 0xf3a1 - 0xf3fe 0xf4a1 - 0xf4a4
-/*
- * This is for Code Set 3, half-width kana
- */
-SPECIAL 0xa1 - 0xdf
-PHONOGRAM 0xa1 - 0xdf
-CONTROL 0x84 - 0x97 0x9b - 0x9f 0xe0 - 0xfe
-.Ed
-.Sh "SEE ALSO"
-.Xr mklocale 1 ,
-.Xr setlocale 3
diff --git a/lib/libc/locale/euc.c b/lib/libc/locale/euc.c
deleted file mode 100644
index bc33ff6..0000000
--- a/lib/libc/locale/euc.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef XPG4
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)euc.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <rune.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-rune_t _EUC_sgetrune __P((const char *, size_t, char const **));
-int _EUC_sputrune __P((rune_t, char *, size_t, char **));
-
-typedef struct {
- int count[4];
- rune_t bits[4];
- rune_t mask;
-} _EucInfo;
-
-int
-_EUC_init(rl)
- _RuneLocale *rl;
-{
- _EucInfo *ei;
- int x;
- char *v, *e;
-
- rl->sgetrune = _EUC_sgetrune;
- rl->sputrune = _EUC_sputrune;
-
- if (!rl->variable) {
- free(rl);
- return (EFTYPE);
- }
- v = (char *) rl->variable;
-
- while (*v == ' ' || *v == '\t')
- ++v;
-
- if ((ei = malloc(sizeof(_EucInfo))) == NULL) {
- free(rl);
- return (ENOMEM);
- }
- for (x = 0; x < 4; ++x) {
- ei->count[x] = (int) strtol(v, &e, 0);
- if (v == e || !(v = e)) {
- free(rl);
- free(ei);
- return (EFTYPE);
- }
- while (*v == ' ' || *v == '\t')
- ++v;
- ei->bits[x] = (int) strtol(v, &e, 0);
- if (v == e || !(v = e)) {
- free(rl);
- free(ei);
- return (EFTYPE);
- }
- while (*v == ' ' || *v == '\t')
- ++v;
- }
- ei->mask = (int)strtol(v, &e, 0);
- if (v == e || !(v = e)) {
- free(rl);
- free(ei);
- return (EFTYPE);
- }
- if (sizeof(_EucInfo) <= rl->variable_len) {
- memcpy(rl->variable, ei, sizeof(_EucInfo));
- free(ei);
- } else {
- rl->variable = &ei;
- }
- rl->variable_len = sizeof(_EucInfo);
- _CurrentRuneLocale = rl;
- __mb_cur_max = 3;
- return (0);
-}
-
-#define CEI ((_EucInfo *)(_CurrentRuneLocale->variable))
-
-#define _SS2 0x008e
-#define _SS3 0x008f
-
-static inline int
-_euc_set(c)
- u_int c;
-{
- c &= 0xff;
-
- return ((c & 0x80) ? c == _SS3 ? 3 : c == _SS2 ? 2 : 1 : 0);
-}
-rune_t
-_EUC_sgetrune(string, n, result)
- const char *string;
- size_t n;
- char const **result;
-{
- rune_t rune = 0;
- int len, set;
-
- if (n < 1 || (len = CEI->count[set = _euc_set(*string)]) > n) {
- if (result)
- *result = string;
- return (_INVALID_RUNE);
- }
- switch (set) {
- case 3:
- case 2:
- --len;
- ++string;
- /* FALLTHROUGH */
- case 1:
- case 0:
- while (len-- > 0)
- rune = (rune << 8) | ((u_int)(*string++) & 0xff);
- break;
- }
- if (result)
- *result = string;
- return ((rune & ~CEI->mask) | CEI->bits[set]);
-}
-
-int
-_EUC_sputrune(c, string, n, result)
- rune_t c;
- char *string, **result;
- size_t n;
-{
- rune_t m = c & CEI->mask;
- rune_t nm = c & ~m;
- int i, len;
-
- if (m == CEI->bits[1]) {
-CodeSet1:
- /* Codeset 1: The first byte must have 0x80 in it. */
- i = len = CEI->count[1];
- if (n >= len) {
- if (result)
- *result = string + len;
- while (i-- > 0)
- *string++ = (nm >> (i << 3)) | 0x80;
- } else
- if (result)
- *result = (char *) 0;
- } else {
- if (m == CEI->bits[0]) {
- i = len = CEI->count[0];
- if (n < len) {
- if (result)
- *result = NULL;
- return (len);
- }
- } else
- if (m == CEI->bits[2]) {
- i = len = CEI->count[2];
- if (n < len) {
- if (result)
- *result = NULL;
- return (len);
- }
- *string++ = _SS2;
- --i;
- } else
- if (m == CEI->bits[3]) {
- i = len = CEI->count[3];
- if (n < len) {
- if (result)
- *result = NULL;
- return (len);
- }
- *string++ = _SS3;
- --i;
- } else
- goto CodeSet1; /* Bletch */
- while (i-- > 0)
- *string++ = (nm >> (i << 3)) & 0xff;
- if (result)
- *result = string;
- }
- return (len);
-}
-#endif /* XPG4 */
diff --git a/lib/libc/locale/frune.c b/lib/libc/locale/frune.c
deleted file mode 100644
index 443d3ba..0000000
--- a/lib/libc/locale/frune.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)frune.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <limits.h>
-#include <rune.h>
-#include <stddef.h>
-#include <stdio.h>
-
-long
-fgetrune(fp)
- FILE *fp;
-{
- rune_t r;
- int c, len;
- char buf[MB_LEN_MAX];
- char const *result;
-
- len = 0;
- do {
- if ((c = getc(fp)) == EOF) {
- if (len)
- break;
- return (EOF);
- }
- buf[len++] = c;
-
- if ((r = sgetrune(buf, len, &result)) != _INVALID_RUNE)
- return (r);
- } while (result == buf && len < MB_LEN_MAX);
-
- while (--len > 0)
- ungetc(buf[len], fp);
- return (_INVALID_RUNE);
-}
-
-int
-fungetrune(r, fp)
- rune_t r;
- FILE* fp;
-{
- int len;
- char buf[MB_LEN_MAX];
-
- len = sputrune(r, buf, MB_LEN_MAX, 0);
- while (len-- > 0)
- if (ungetc(buf[len], fp) == EOF)
- return (EOF);
- return (0);
-}
-
-int
-fputrune(r, fp)
- rune_t r;
- FILE *fp;
-{
- int i, len;
- char buf[MB_LEN_MAX];
-
- len = sputrune(r, buf, MB_LEN_MAX, 0);
-
- for (i = 0; i < len; ++i)
- if (putc(buf[i], fp) == EOF)
- return (EOF);
-
- return (0);
-}
diff --git a/lib/libc/locale/isalnum.3 b/lib/libc/locale/isalnum.3
deleted file mode 100644
index 67e1e85..0000000
--- a/lib/libc/locale/isalnum.3
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isalnum.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISALNUM 3
-.Os
-.Sh NAME
-.Nm isalnum
-.Nd alphanumeric character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isalnum "int c"
-.Sh DESCRIPTION
-The
-.Fn isalnum
-function tests for any character for which
-.Xr isalpha 3
-or
-.Xr isdigit 3
-is true.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''
-.It \&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''
-.It \&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''
-.It \&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''
-.It \&113\ ``K'' \t114\ ``L'' \t115\ ``M'' \t116\ ``N'' \t117\ ``O''
-.It \&120\ ``P'' \t121\ ``Q'' \t122\ ``R'' \t123\ ``S'' \t124\ ``T''
-.It \&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''
-.It \&132\ ``Z'' \t141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d''
-.It \&145\ ``e'' \t146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i''
-.It \&152\ ``j'' \t153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n''
-.It \&157\ ``o'' \t160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s''
-.It \&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''
-.It \&171\ ``y'' \t172\ ``z''
-.El
-.Sh RETURN VALUES
-The
-.Fn isalnum
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr isalpha 3 ,
-.Xr isdigit 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn isalnum
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/isalpha.3 b/lib/libc/locale/isalpha.3
deleted file mode 100644
index a747d19..0000000
--- a/lib/libc/locale/isalpha.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isalpha.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISALPHA 3
-.Os
-.Sh NAME
-.Nm isalpha
-.Nd alphabetic character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isalpha "int c"
-.Sh DESCRIPTION
-The
-.Fn isalpha
-function tests for any character for which
-.Xr isupper 3
-or
-.Xr islower 3
-is true.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''
-.It \&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''
-.It \&113\ ``K'' \t114\ ``L'' \t115\ ``M'' \t116\ ``N'' \t117\ ``O''
-.It \&120\ ``P'' \t121\ ``Q'' \t122\ ``R'' \t123\ ``S'' \t124\ ``T''
-.It \&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''
-.It \&132\ ``Z'' \t141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d''
-.It \&145\ ``e'' \t146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i''
-.It \&152\ ``j'' \t153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n''
-.It \&157\ ``o'' \t160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s''
-.It \&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''
-.It \&171\ ``y'' \t172\ ``z''
-.El
-.Sh RETURN VALUES
-The
-.Fn isalpha
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr islower 3 ,
-.Xr isupper 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn isalpha
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/isascii.3 b/lib/libc/locale/isascii.3
deleted file mode 100644
index 0688c9c..0000000
--- a/lib/libc/locale/isascii.3
+++ /dev/null
@@ -1,58 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isascii.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt ISASCII 3
-.Os
-.Sh NAME
-.Nm isascii
-.Nd test for ASCII character
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isascii "int c"
-.Sh DESCRIPTION
-The
-.Fn isascii
-function tests for an
-.Tn ASCII
-character, which is any character with a value less than or
-equal to 0177.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn isascii
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/isblank.3 b/lib/libc/locale/isblank.3
deleted file mode 100644
index 7be87bb..0000000
--- a/lib/libc/locale/isblank.3
+++ /dev/null
@@ -1,55 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isblank.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISBLANK 3
-.Os
-.Sh NAME
-.Nm isblank
-.Nd space or tab character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isblank "int c"
-.Sh DESCRIPTION
-The
-.Fn isblank
-function tests for a space or tab character.
-.Sh RETURN VALUES
-The
-.Fn isblank
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
diff --git a/lib/libc/locale/iscntrl.3 b/lib/libc/locale/iscntrl.3
deleted file mode 100644
index 5bc3a5a..0000000
--- a/lib/libc/locale/iscntrl.3
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)iscntrl.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISCNTRL 3
-.Os
-.Sh NAME
-.Nm iscntrl
-.Nd control character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn iscntrl "int c"
-.Sh DESCRIPTION
-The
-.Fn iscntrl
-function tests for any control character.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&000\ nul \t001\ soh \t002\ stx \t003\ etx \t004\ eot
-.It \&005\ enq \t006\ ack \t007\ bel \t010\ bs \t011\ ht
-.It \&012\ nl \t013\ vt \t014\ np \t015\ cr \t016\ so
-.It \&017\ si \t020\ dle \t021\ dc1 \t022\ dc2 \t023\ dc3
-.It \&024\ dc4 \t025\ nak \t026\ syn \t027\ etb \t030\ can
-.It \&031\ em \t032\ sub \t033\ esc \t034\ fs \t035\ gs
-.It \&036\ rs \t037\ us \t177\ del
-.El
-.Sh RETURN VALUES
-The
-.Fn iscntrl
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn iscntrl
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/isctype.c b/lib/libc/locale/isctype.c
deleted file mode 100644
index 4d51813..0000000
--- a/lib/libc/locale/isctype.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- * (c) UNIX System Laboratories, Inc.
- * All or some portions of this file are derived from material licensed
- * to the University of California by American Telephone and Telegraph
- * Co. or Unix System Laboratories, Inc. and are reproduced herein with
- * the permission of UNIX System Laboratories, Inc.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)isctype.c 8.3 (Berkeley) 2/24/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <ctype.h>
-
-#undef isalnum
-int
-isalnum(c)
- int c;
-{
- return (__istype((c), _A|_D));
-}
-
-#undef isalpha
-int
-isalpha(c)
- int c;
-{
- return (__istype((c), _A));
-}
-
-#undef isascii
-int
-isascii(c)
- int c;
-{
- return (((c) & ~0x7F) == 0);
-}
-
-#undef isblank
-int
-isblank(c)
- int c;
-{
- return (__istype((c), _B));
-}
-
-#undef iscntrl
-int
-iscntrl(c)
- int c;
-{
- return (__istype((c), _C));
-}
-
-#undef isdigit
-int
-isdigit(c)
- int c;
-{
- return (__isctype((c), _D));
-}
-
-#undef isgraph
-int
-isgraph(c)
- int c;
-{
- return (__istype((c), _G));
-}
-
-#undef islower
-int
-islower(c)
- int c;
-{
- return (__istype((c), _L));
-}
-
-#undef isprint
-int
-isprint(c)
- int c;
-{
- return (__istype((c), _R));
-}
-
-#undef ispunct
-int
-ispunct(c)
- int c;
-{
- return (__istype((c), _P));
-}
-
-#undef isspace
-int
-isspace(c)
- int c;
-{
- return (__istype((c), _S));
-}
-
-#undef isupper
-int
-isupper(c)
- int c;
-{
- return (__istype((c), _U));
-}
-
-#undef isxdigit
-int
-isxdigit(c)
- int c;
-{
- return (__isctype((c), _X));
-}
-
-#undef toascii
-int
-toascii(c)
- int c;
-{
- return ((c) & 0x7F);
-}
-
-#undef tolower
-int
-tolower(c)
- int c;
-{
- return (__tolower(c));
-}
-
-#undef toupper
-int
-toupper(c)
- int c;
-{
- return (__toupper(c));
-}
-
-#undef digittoint
-int
-digittoint(c)
- int c;
-{
- return (__maskrune((c), 0xFF));
-}
diff --git a/lib/libc/locale/isdigit.3 b/lib/libc/locale/isdigit.3
deleted file mode 100644
index 781a418..0000000
--- a/lib/libc/locale/isdigit.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isdigit.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISDIGIT 3
-.Os
-.Sh NAME
-.Nm isdigit
-.Nd decimal-digit character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isdigit "int c"
-.Sh DESCRIPTION
-The
-.Fn isdigit
-function tests for any decimal-digit character.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''
-.It \&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''
-.El
-.Sh RETURN VALUES
-The
-.Fn isdigit
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn isdigit
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/isgraph.3 b/lib/libc/locale/isgraph.3
deleted file mode 100644
index 4ef232a..0000000
--- a/lib/libc/locale/isgraph.3
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isgraph.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt ISGRAPH 3
-.Os
-.Sh NAME
-.Nm isgraph
-.Nd printing character test (space character exclusive)
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isgraph "int c"
-.Sh DESCRIPTION
-The
-.Fn isgraph
-function tests for any printing character except space.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&041\ ``!'' \t042\ ``"'' \t043\ ``#'' \t044\ ``$'' \t045\ ``%''
-.It \&046\ ``&'' \t047\ ``''' \t050\ ``('' \t051\ ``)'' \t052\ ``*''
-.It \&053\ ``+'' \t054\ ``,'' \t055\ ``-'' \t056\ ``.'' \t057\ ``/''
-.It \&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''
-.It \&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''
-.It \&072\ ``:'' \t073\ ``;'' \t074\ ``<'' \t075\ ``='' \t076\ ``>''
-.It \&077\ ``?'' \t100\ ``@'' \t101\ ``A'' \t102\ ``B'' \t103\ ``C''
-.It \&104\ ``D'' \t105\ ``E'' \t106\ ``F'' \t107\ ``G'' \t110\ ``H''
-.It \&111\ ``I'' \t112\ ``J'' \t113\ ``K'' \t114\ ``L'' \t115\ ``M''
-.It \&116\ ``N'' \t117\ ``O'' \t120\ ``P'' \t121\ ``Q'' \t122\ ``R''
-.It \&123\ ``S'' \t124\ ``T'' \t125\ ``U'' \t126\ ``V'' \t127\ ``W''
-.It \&130\ ``X'' \t131\ ``Y'' \t132\ ``Z'' \t133\ ``['' \t134\ ``\''
-.It \&135\ ``]'' \t136\ ``^'' \t137\ ``_'' \t140\ ```'' \t141\ ``a''
-.It \&142\ ``b'' \t143\ ``c'' \t144\ ``d'' \t145\ ``e'' \t146\ ``f''
-.It \&147\ ``g'' \t150\ ``h'' \t151\ ``i'' \t152\ ``j'' \t153\ ``k''
-.It \&154\ ``l'' \t155\ ``m'' \t156\ ``n'' \t157\ ``o'' \t160\ ``p''
-.It \&161\ ``q'' \t162\ ``r'' \t163\ ``s'' \t164\ ``t'' \t165\ ``u''
-.It \&166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y'' \t172\ ``z''
-.It \&173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''
-.El
-.Sh RETURN VALUES
-The
-.Fn isgraph
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn isgraph
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/islower.3 b/lib/libc/locale/islower.3
deleted file mode 100644
index 0c354d2..0000000
--- a/lib/libc/locale/islower.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)islower.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISLOWER 3
-.Os
-.Sh NAME
-.Nm islower
-.Nd lower-case character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn islower "int c"
-.Sh DESCRIPTION
-The
-.Fn islower
-function tests for any lower-case letters.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d'' \t145\ ``e''
-.It \&146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i'' \t152\ ``j''
-.It \&153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n'' \t157\ ``o''
-.It \&160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s'' \t164\ ``t''
-.It \&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''
-.It \&172\ ``z''
-.El
-.Sh RETURN VALUES
-The
-.Fn islower
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn islower
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/isprint.3 b/lib/libc/locale/isprint.3
deleted file mode 100644
index 8b84dbf..0000000
--- a/lib/libc/locale/isprint.3
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isprint.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISPRINT 3
-.Os
-.Sh NAME
-.Nm isprint
-.Nd printing character test (space character inclusive)
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isprint "int c"
-.Sh DESCRIPTION
-The
-.Fn isprint
-function tests for any printing character including space (' ').
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&040\ sp \t041\ ``!'' \t042\ ``"'' \t043\ ``#'' \t044\ ``$''
-.It \&045\ ``%'' \t046\ ``&'' \t047\ ``''' \t050\ ``('' \t051\ ``)''
-.It \&052\ ``*'' \t053\ ``+'' \t054\ ``,'' \t055\ ``-'' \t056\ ``.''
-.It \&057\ ``/'' \t060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3''
-.It \&064\ ``4'' \t065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8''
-.It \&071\ ``9'' \t072\ ``:'' \t073\ ``;'' \t074\ ``<'' \t075\ ``=''
-.It \&076\ ``>'' \t077\ ``?'' \t100\ ``@'' \t101\ ``A'' \t102\ ``B''
-.It \&103\ ``C'' \t104\ ``D'' \t105\ ``E'' \t106\ ``F'' \t107\ ``G''
-.It \&110\ ``H'' \t111\ ``I'' \t112\ ``J'' \t113\ ``K'' \t114\ ``L''
-.It \&115\ ``M'' \t116\ ``N'' \t117\ ``O'' \t120\ ``P'' \t121\ ``Q''
-.It \&122\ ``R'' \t123\ ``S'' \t124\ ``T'' \t125\ ``U'' \t126\ ``V''
-.It \&127\ ``W'' \t130\ ``X'' \t131\ ``Y'' \t132\ ``Z'' \t133\ ``[''
-.It \&134\ ``\'' \t135\ ``]'' \t136\ ``^'' \t137\ ``_'' \t140\ ```''
-.It \&141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d'' \t145\ ``e''
-.It \&146\ ``f'' \t147\ ``g'' \t150\ ``h'' \t151\ ``i'' \t152\ ``j''
-.It \&153\ ``k'' \t154\ ``l'' \t155\ ``m'' \t156\ ``n'' \t157\ ``o''
-.It \&160\ ``p'' \t161\ ``q'' \t162\ ``r'' \t163\ ``s'' \t164\ ``t''
-.It \&165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y''
-.It \&172\ ``z'' \t173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''
-.El
-.Sh RETURN VALUES
-The
-.Fn isprint
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn isprint
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/ispunct.3 b/lib/libc/locale/ispunct.3
deleted file mode 100644
index 3895d6b..0000000
--- a/lib/libc/locale/ispunct.3
+++ /dev/null
@@ -1,78 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ispunct.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISPUNCT 3
-.Os
-.Sh NAME
-.Nm ispunct
-.Nd punctuation character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn ispunct "int c"
-.Sh DESCRIPTION
-The
-.Fn ispunct
-function tests for any printing character except for space (' ') or a
-character for which
-.Xr isalnum 3
-is true.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&041\ ``!'' \t042\ ``"'' \t043\ ``#'' \t044\ ``$'' \t045\ ``%''
-.It \&046\ ``&'' \t047\ ``''' \t050\ ``('' \t051\ ``)'' \t052\ ``*''
-.It \&053\ ``+'' \t054\ ``,'' \t055\ ``-'' \t056\ ``.'' \t057\ ``/''
-.It \&072\ ``:'' \t073\ ``;'' \t074\ ``<'' \t075\ ``='' \t076\ ``>''
-.It \&077\ ``?'' \t100\ ``@'' \t133\ ``['' \t134\ ``\e\|'' \t135\ ``]''
-.It \&136\ ``^'' \t137\ ``_'' \t140\ ```'' \t173\ ``{'' \t174\ ``|''
-.It \&175\ ``}'' \t176\ ``~''
-.El
-.Sh RETURN VALUES
-The
-.Fn ispunct
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn ispunct
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/isspace.3 b/lib/libc/locale/isspace.3
deleted file mode 100644
index bd38107..0000000
--- a/lib/libc/locale/isspace.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isspace.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISSPACE 3
-.Os
-.Sh NAME
-.Nm isspace
-.Nd white-space character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isspace "int c"
-.Sh DESCRIPTION
-The
-.Fn isspace
-function tests for the standard white-space characters.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&011\ ht \t012\ nl \t013\ vt \t014\ np \t015\ cr
-.It \&040\ sp
-.El
-.Sh RETURN VALUES
-The
-.Fn isspace
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn isspace
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/isupper.3 b/lib/libc/locale/isupper.3
deleted file mode 100644
index 633c1e0..0000000
--- a/lib/libc/locale/isupper.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isupper.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISUPPER 3
-.Os
-.Sh NAME
-.Nm isupper
-.Nd upper-case character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isupper "int c"
-.Sh DESCRIPTION
-The
-.Fn isupper
-function tests for any upper-case letter.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''
-.It \&106\ ``F'' \t107\ ``G'' \t110\ ``H'' \t111\ ``I'' \t112\ ``J''
-.It \&113\ ``K'' \t114\ ``L'' \t115\ ``M'' \t116\ ``N'' \t117\ ``O''
-.It \&120\ ``P'' \t121\ ``Q'' \t122\ ``R'' \t123\ ``S'' \t124\ ``T''
-.It \&125\ ``U'' \t126\ ``V'' \t127\ ``W'' \t130\ ``X'' \t131\ ``Y''
-.It \&132\ ``Z''
-.El
-.Sh RETURN VALUES
-The
-.Fn isupper
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn isupper
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/isxdigit.3 b/lib/libc/locale/isxdigit.3
deleted file mode 100644
index cee6cc7..0000000
--- a/lib/libc/locale/isxdigit.3
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)isxdigit.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISXDIGIT 3
-.Os
-.Sh NAME
-.Nm isxdigit
-.Nd hexadecimal-digit character test
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn isxdigit "int c"
-.Sh DESCRIPTION
-The
-.Fn isxdigit
-function tests for any hexadecimal-digit character.
-In the ASCII character set, this includes the following characters:
-.Pp
-.Bl -column \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__ \&000_``0''__
-.It \&060\ ``0'' \t061\ ``1'' \t062\ ``2'' \t063\ ``3'' \t064\ ``4''
-.It \&065\ ``5'' \t066\ ``6'' \t067\ ``7'' \t070\ ``8'' \t071\ ``9''
-.It \&101\ ``A'' \t102\ ``B'' \t103\ ``C'' \t104\ ``D'' \t105\ ``E''
-.It \&106\ ``F'' \t141\ ``a'' \t142\ ``b'' \t143\ ``c'' \t144\ ``d''
-.It \&145\ ``e'' \t146\ ``f''
-.El
-.Sh RETURN VALUES
-The
-.Fn isxdigit
-function returns zero if the character tests false and
-returns non-zero if the character tests true.
-.Sh SEE ALSO
-.Xr ctype 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn isxdigit
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/lconv.c b/lib/libc/locale/lconv.c
deleted file mode 100644
index f1212b0a..0000000
--- a/lib/libc/locale/lconv.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)lconv.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <limits.h>
-#include <locale.h>
-
-static char empty[] = "";
-
-/*
- * Default (C) locale conversion.
- */
-static struct lconv C_lconv = {
- ".", /* decimal_point */
- empty, /* thousands_sep */
- empty, /* grouping */
- empty, /* int_curr_symbol */
- empty, /* currency_symbol */
- empty, /* mon_decimal_point */
- empty, /* mon_thousands_sep */
- empty, /* mon_grouping */
- empty, /* positive_sign */
- empty, /* negative_sign */
- CHAR_MAX, /* int_frac_digits */
- CHAR_MAX, /* frac_digits */
- CHAR_MAX, /* p_cs_precedes */
- CHAR_MAX, /* p_sep_by_space */
- CHAR_MAX, /* n_cs_precedes */
- CHAR_MAX, /* n_sep_by_space */
- CHAR_MAX, /* p_sign_posn */
- CHAR_MAX, /* n_sign_posn */
-};
-
-/*
- * Current locale conversion.
- */
-struct lconv *__lconv = &C_lconv;
diff --git a/lib/libc/locale/localeconv.c b/lib/libc/locale/localeconv.c
deleted file mode 100644
index f3172af..0000000
--- a/lib/libc/locale/localeconv.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)localeconv.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <locale.h>
-
-/*
- * Return the current locale conversion.
- */
-struct lconv *
-localeconv()
-{
- extern struct lconv *__lconv;
-
- return (__lconv);
-}
diff --git a/lib/libc/locale/mbrune.3 b/lib/libc/locale/mbrune.3
deleted file mode 100644
index 72001f5..0000000
--- a/lib/libc/locale/mbrune.3
+++ /dev/null
@@ -1,157 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Paul Borman at Krystal Technologies.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mbrune.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt MBRUNE 3
-.Os
-.Sh NAME
-.Nm mbrune ,
-.Nm mbrrune ,
-.Nm mbmb
-.Nd multibyte rune support for C
-.Sh SYNOPSIS
-.Fd #include <rune.h>
-.Ft char *
-.Fn mbrune "const char *string" "rune_t rune"
-.Ft char *
-.Fn mbrrune "const char *string" "rune_t rune"
-.Ft char *
-.Fn mbmb "const char *string" "char *pattern"
-.Sh DESCRIPTION
-These routines provide the corresponding functionality of
-.Fn strchr ,
-.Fn strrchr
-and
-.Fn strstr
-for multibyte strings.
-.Pp
-The
-.Fn mbrune
-function locates the first occurrence of
-.Fn rune
-in the string pointed to by
-.Ar string .
-The terminating
-.Dv NUL
-character is considered part of the string.
-If
-.Fa rune
-is
-.Ql \e0 ,
-.Fn mbrune
-locates the terminating
-.Ql \e0 .
-.Pp
-The
-.Fn mbrrune
-function
-locates the last occurrence of
-.Fa rune
-in the string
-.Fa string .
-If
-.Fa rune
-is
-.Ql \e0 ,
-.Fn mbrune
-locates the terminating
-.Ql \e0 .
-.Pp
-The
-.Fn mbmb
-function locates the first occurrence of the null-terminated string
-.Fa pattern
-in the null-terminated string
-.Fa string.
-If
-.Fa pattern
-is the empty string,
-.Fn mbmb
-returns
-.Fa string ;
-if
-.Fa pattern
-occurs nowhere in
-.Fa string ,
-.Fn mbmb
-returns
-.Dv NULL ;
-otherwise
-.Fn mbmb
-returns a pointer to the first character of the first occurrence of
-.Fa pattern .
-.Sh RETURN VALUES
-The function
-.Fn mbrune
-returns a pointer to the located character, or
-.Dv NULL
-if the character does not appear in the string.
-.Pp
-The
-.Fn mbrrune
-function
-returns a pointer to the character, or
-.Dv NULL
-if the character does not appear in the string.
-.Pp
-The
-.Fn mbmb
-function
-returns a pointer to the
-.Fa pattern ,
-or
-.Dv NULL
-if the
-.Fa pattern
-does not appear in the string.
-.Sh "SEE ALSO
-.Xr mbrune 3 ,
-.Xr rune 3 ,
-.Xr setlocale 3 ,
-.Xr euc 4 ,
-.Xr utf2 4
-.Sh HISTORY
-The
-.Fn mbrune ,
-.Fn mbrrune ,
-and
-.Fn mbmb
-functions
-first appeared in Plan 9 from Bell Labs as
-.Fn utfrune ,
-.Fn utfrrune ,
-and
-.Fn utfutf .
diff --git a/lib/libc/locale/mbrune.c b/lib/libc/locale/mbrune.c
deleted file mode 100644
index 92efe83..0000000
--- a/lib/libc/locale/mbrune.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mbrune.c 8.1 (Berkeley) 6/27/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <limits.h>
-#include <rune.h>
-#include <stddef.h>
-#include <string.h>
-
-char *
-mbrune(string, c)
- const char *string;
- rune_t c;
-{
- char const *result;
- rune_t r;
-
- while ((r = sgetrune(string, MB_LEN_MAX, &result))) {
- if (r == c)
- return ((char *)string);
- string = result == string ? string + 1 : result;
- }
-
- return (c == *string ? (char *)string : NULL);
-}
-
-char *
-mbrrune(string, c)
- const char *string;
- rune_t c;
-{
- const char *last = 0;
- char const *result;
- rune_t r;
-
- while ((r = sgetrune(string, MB_LEN_MAX, &result))) {
- if (r == c)
- last = string;
- string = result == string ? string + 1 : result;
- }
- return (c == *string ? (char *)string : (char *)last);
-}
-
-char *
-mbmb(string, pattern)
- const char *string;
- char *pattern;
-{
- rune_t first, r;
- size_t plen, slen;
- char const *result;
-
- plen = strlen(pattern);
- slen = strlen(string);
- if (plen > slen)
- return (0);
-
- first = sgetrune(pattern, plen, &result);
- if (result == string)
- return (0);
-
- while (slen >= plen && (r = sgetrune(string, slen, &result))) {
- if (r == first) {
- if (strncmp(string, pattern, slen) == 0)
- return ((char *) string);
- }
- if (result == string) {
- --slen;
- ++string;
- } else {
- slen -= result - string;
- string = result;
- }
- }
- return (0);
-}
diff --git a/lib/libc/locale/mskanji.c b/lib/libc/locale/mskanji.c
deleted file mode 100644
index bce27fe..0000000
--- a/lib/libc/locale/mskanji.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * ja_JP.SJIS locale table for BSD4.4/rune
- * version 1.0
- * (C) Sin'ichiro MIYATANI / Phase One, Inc
- * May 12, 1995
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Phase One, Inc.
- * 4. The name of Phase One, Inc. may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef XPG4
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mskanji.c 1.0 (Phase One) 5/5/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <rune.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-rune_t _MSKanji_sgetrune __P((const char *, size_t, char const **));
-int _MSKanji_sputrune __P((rune_t, char *, size_t, char **));
-
-int
-_MSKanji_init(rl)
- _RuneLocale *rl;
-{
- rl->sgetrune = _MSKanji_sgetrune;
- rl->sputrune = _MSKanji_sputrune;
-
- _CurrentRuneLocale = rl;
- __mb_cur_max = 2;
- return (0);
-}
-
-rune_t
-_MSKanji_sgetrune(string, n, result)
- const char *string;
- size_t n;
- char const **result;
-{
- rune_t rune = 0;
-
- if (n < 1 ) {
- rune = _INVALID_RUNE;
- } else {
- rune = *( string++ ) & 0xff;
- if ( ( rune > 0x80 && rune < 0xa0 )
- || ( rune >= 0xe0 && rune < 0xfa ) ) {
- if ( n < 2 ) {
- rune = (rune_t)_INVALID_RUNE;
- --string;
- } else {
- rune = ( rune << 8 ) | ( *( string++ ) & 0xff );
- }
- }
- }
- if (result) *result = string;
- return rune;
-}
-
-int
-_MSKanji_sputrune(c, string, n, result)
- rune_t c;
- char *string, **result;
- size_t n;
-{
- int len, i;
-
- len = ( c > 0x100 ) ? 2 : 1;
- if ( n < len ) {
- if ( result ) *result = (char *) 0;
- } else {
- if ( result ) *result = string + len;
- for ( i = len; i-- > 0; ) {
- *( string++ ) = c >> ( i << 3 );
- }
- }
- return len;
-}
-#endif /* XPG4 */
diff --git a/lib/libc/locale/multibyte.3 b/lib/libc/locale/multibyte.3
deleted file mode 100644
index 6eb9c70..0000000
--- a/lib/libc/locale/multibyte.3
+++ /dev/null
@@ -1,241 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Donn Seeley of BSDI.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)multibyte.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MULTIBYTE 3
-.Os
-.Sh NAME
-.Nm mblen ,
-.Nm mbstowcs ,
-.Nm mbtowc ,
-.Nm wcstombs ,
-.Nm wctomb
-.Nd multibyte character support for C
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft int
-.Fn mblen "const char *mbchar" "size_t nbytes"
-.Ft size_t
-.Fn mbstowcs "wchar_t *wcstring" "const char *mbstring" "size_t nwchars"
-.Ft int
-.Fn mbtowc "wchar_t *wcharp" "const char *mbchar" "size_t nbytes"
-.Ft size_t
-.Fn wcstombs "char *mbstring" "const wchar_t *wcstring" "size_t nbytes"
-.Ft int
-.Fn wctomb "char *mbchar" "wchar_t wchar"
-.Sh DESCRIPTION
-The basic elements of some written natural languages such as Chinese
-cannot be represented uniquely with single C
-.Va char Ns s .
-The C standard supports two different ways of dealing with
-extended natural language encodings,
-.Em wide
-characters and
-.Em multibyte
-characters.
-Wide characters are an internal representation
-which allows each basic element to map
-to a single object of type
-.Va wchar_t .
-Multibyte characters are used for input and output
-and code each basic element as a sequence of C
-.Va char Ns s .
-Individual basic elements may map into one or more
-.Pq up to Dv MB_CHAR_MAX
-bytes in a multibyte character.
-.Pp
-The current locale
-.Pq Xr setlocale 3
-governs the interpretation of wide and multibyte characters.
-The locale category
-.Dv LC_CTYPE
-specifically controls this interpretation.
-The
-.Va wchar_t
-type is wide enough to hold the largest value
-in the wide character representations for all locales.
-.Pp
-Multibyte strings may contain
-.Sq shift
-indicators to switch to and from
-particular modes within the given representation.
-If explicit bytes are used to signal shifting,
-these are not recognized as separate characters
-but are lumped with a neighboring character.
-There is always a distinguished
-.Sq initial
-shift state.
-The
-.Fn mbstowcs
-and
-.Fn wcstombs
-functions assume that multibyte strings are interpreted
-starting from the initial shift state.
-The
-.Fn mblen ,
-.Fn mbtowc
-and
-.Fn wctomb
-functions maintain static shift state internally.
-A call with a null
-.Fa mbchar
-pointer returns nonzero if the current locale requires shift states,
-zero otherwise;
-if shift states are required, the shift state is reset to the initial state.
-The internal shift states are undefined after a call to
-.Fn setlocale
-with the
-.Dv LC_CTYPE
-or
-.Dv LC_ALL
-categories.
-.Pp
-For convenience in processing,
-the wide character with value 0
-.Pq the null wide character
-is recognized as the wide character string terminator,
-and the character with value 0
-.Pq the null byte
-is recognized as the multibyte character string terminator.
-Null bytes are not permitted within multibyte characters.
-.Pp
-The
-.Fn mblen
-function computes the length in bytes
-of a multibyte character
-.Fa mbchar .
-Up to
-.Fa nbytes
-bytes are examined.
-.Pp
-The
-.Fn mbtowc
-function converts a multibyte character
-.Fa mbchar
-into a wide character and stores the result
-in the object pointed to by
-.Fa wcharp.
-Up to
-.Fa nbytes
-bytes are examined.
-.Pp
-The
-.Fn wctomb
-function converts a wide character
-.Fa wchar
-into a multibyte character and stores
-the result in
-.Fa mbchar .
-The object pointed to by
-.Fa mbchar
-must be large enough to accommodate the multibyte character.
-.Pp
-The
-.Fn mbstowcs
-function converts a multibyte character string
-.Fa mbstring
-into a wide character string
-.Fa wcstring .
-No more than
-.Fa nwchars
-wide characters are stored.
-A terminating null wide character is appended if there is room.
-.Pp
-The
-.Fn wcstombs
-function converts a wide character string
-.Fa wcstring
-into a multibyte character string
-.Fa mbstring .
-Up to
-.Fa nbytes
-bytes are stored in
-.Fa mbstring .
-Partial multibyte characters at the end of the string are not stored.
-The multibyte character string is null terminated if there is room.
-.Sh "RETURN VALUES
-If multibyte characters are not supported in the current locale,
-all of these functions will return \-1 if characters can be processed,
-otherwise 0.
-.Pp
-If
-.Fa mbchar
-is
-.Dv NULL ,
-the
-.Fn mblen ,
-.Fn mbtowc
-and
-.Fn wctomb
-functions return nonzero if shift states are supported,
-zero otherwise.
-If
-.Fa mbchar
-is valid,
-then these functions return
-the number of bytes processed in
-.Fa mbchar ,
-or \-1 if no multibyte character
-could be recognized or converted.
-.Pp
-The
-.Fn mbstowcs
-function returns the number of wide characters converted,
-not counting any terminating null wide character.
-The
-.Fn wcstombs
-function returns the number of bytes converted,
-not counting any terminating null byte.
-If any invalid multibyte characters are encountered,
-both functions return \-1.
-.Sh "SEE ALSO
-.Xr mbrune 3 ,
-.Xr rune 3 ,
-.Xr setlocale 3 ,
-.Xr euc 4 ,
-.Xr utf2 4
-.Sh STANDARDS
-The
-.Fn mblen ,
-.Fn mbstowcs ,
-.Fn mbtowc ,
-.Fn wcstombs
-and
-.Fn wctomb
-functions conform to
-.St -ansiC .
-.Sh BUGS
-The current implementation does not support shift states.
diff --git a/lib/libc/locale/nomacros.c b/lib/libc/locale/nomacros.c
deleted file mode 100644
index 45c0db7..0000000
--- a/lib/libc/locale/nomacros.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Tell <ctype.h> to generate extern versions of all its inline
- * functions. The extern versions get called if the system doesn't
- * support inlines or the user defines _DONT_USE_CTYPE_INLINE_
- * before including <ctype.h>.
- */
-#define _EXTERNALIZE_CTYPE_INLINES_
-
-#include <ctype.h>
diff --git a/lib/libc/locale/none.c b/lib/libc/locale/none.c
deleted file mode 100644
index 41f70ae..0000000
--- a/lib/libc/locale/none.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)none.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-#include <stdio.h>
-#include <rune.h>
-#include <errno.h>
-#include <stdlib.h>
-
-rune_t _none_sgetrune __P((const char *, size_t, char const **));
-int _none_sputrune __P((rune_t, char *, size_t, char **));
-
-int
-_none_init(rl)
- _RuneLocale *rl;
-{
- rl->sgetrune = _none_sgetrune;
- rl->sputrune = _none_sputrune;
- _CurrentRuneLocale = rl;
- __mb_cur_max = 1;
- return(0);
-}
-
-rune_t
-_none_sgetrune(string, n, result)
- const char *string;
- size_t n;
- char const **result;
-{
- if (n < 1) {
- if (result)
- *result = string;
- return(_INVALID_RUNE);
- }
- if (result)
- *result = string + 1;
- return(*string & 0xff);
-}
-
-int
-_none_sputrune(c, string, n, result)
- rune_t c;
- char *string, **result;
- size_t n;
-{
- if (n >= 1) {
- if (string)
- *string = c;
- if (result)
- *result = string + 1;
- } else if (result)
- *result = (char *)0;
- return(1);
-}
diff --git a/lib/libc/locale/rune.3 b/lib/libc/locale/rune.3
deleted file mode 100644
index 5ba1604..0000000
--- a/lib/libc/locale/rune.3
+++ /dev/null
@@ -1,270 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Paul Borman at Krystal Technologies.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)rune.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt RUNE 3
-.Os
-.Sh NAME
-.Nm setrunelocale ,
-.Nm setinvalidrune ,
-.Nm sgetrune ,
-.Nm sputrune
-.Nd rune support for C
-.Sh SYNOPSIS
-.Fd #include <rune.h>
-.Fd #include <errno.h>
-.Ft int
-.Fn setrunelocale "char *locale"
-.Ft void
-.Fn setinvalidrune "rune_t rune"
-.Ft rune_t
-.Fn sgetrune "const char *string" "size_t n" "char const **result"
-.Ft int
-.Fn sputrune "rune_t rune" "char *string" "size_t n" "char **result"
-.Pp
-.Fd #include <stdio.h>
-.Ft long
-.Fn fgetrune "FILE *stream"
-.Ft int
-.Fn fungetrune "rune_t rune" "FILE *stream"
-.Ft int
-.Fn fputrune "rune_t rune" "FILE *stream"
-.Sh DESCRIPTION
-The
-.Fn setrunelocale
-controls the type of encoding used to represent runes as multibyte strings
-as well as the properties of the runes as defined in
-.Aq Pa ctype.h .
-The
-.Fa locale
-argument indicates which locale to load.
-If the locale is successfully loaded,
-.Dv 0
-is returned, otherwise an errno value is returned to indicate the
-type of error.
-.Pp
-The
-.Fn setinvalidrune
-function sets the value of the global value
-.Ev _INVALID_RUNE
-to be
-.Fa rune.
-.Pp
-The
-.Fn sgetrune
-function tries to read a single multibyte character from
-.Fa string ,
-which is at most
-.Fa n
-bytes long.
-If
-.Fn sgetrune
-is successful, the rune is returned.
-If
-.Fa result
-is not
-.Dv NULL ,
-.Fa *result
-will point to the first byte which was not converted in
-.Fa string.
-If the first
-.Fa n
-bytes of
-.Fa string
-do not describe a full multibyte character,
-.Ev _INVALID_RUNE
-is returned and
-.Fa *result
-will point to
-.Fa string.
-If there is an encoding error at the start of
-.Fa string ,
-.Ev _INVALID_RUNE
-is returned and
-.Fa *result
-will point to the second character of
-.Fa string.
-.Pp
-the
-.Fn sputrune
-function tries to encode
-.Fa rune
-as a multibyte string and store it at
-.Fa string ,
-but no more than
-.Fa n
-bytes will be stored.
-If
-.Fa result
-is not
-.Dv NULL ,
-.Fa *result
-will be set to point to the first byte in string following the new
-multibyte character.
-If
-.Fa string
-is
-.Dv NULL ,
-.Fa *result
-will point to
-.Dv "(char *)0 +"
-.Fa x ,
-where
-.Fa x
-is the number of bytes that would be needed to store the multibyte value.
-If the multibyte character would consist of more than
-.Fa n
-bytes and
-.Fa result
-is not
-.Dv NULL ,
-.Fa *result
-will be set to
-.Dv NULL.
-In all cases,
-.Fn sputrune
-will return the number of bytes which would be needed to store
-.Fa rune
-as a multibyte character.
-.Pp
-The
-.Fn fgetrune
-function operates the same as
-.Fn sgetrune
-with the exception that it attempts to read enough bytes from
-.Fa stream
-to decode a single rune. It returns either
-.Ev EOF
-on end of file,
-.Ev _INVALID_RUNE
-on an encoding error, or the rune decoded if all went well.
-.Pp
-The
-.Fn fungetrune
-function pushes the multibyte encoding, as provided by
-.Fn sputrune ,
-of
-.Fa rune
-onto
-.Fa stream
-such that the next
-.Fn fgetrune
-call will return
-.Fa rune .
-It returns
-.Ev EOF
-if it fails and
-.Dv 0
-on success.
-.Pp
-The
-.Fn fputrune
-function writes the multibyte encoding of
-.Fa rune ,
-as provided by
-.Fn sputrune ,
-onto
-.Fa stream .
-It returns
-.Ev EOF
-on failure and
-.Dv 0
-on success.
-.Sh RETURN VALUES
-The
-.Fn setrunelocale
-function returns one of the following values:
-.Bl -tag -width WWWWWWWW
-.It Dv 0
-.Fa setrunelocale was successful.
-.It Ev EFAULT
-.Fa locale
-was
-.Dv NULL .
-.It Ev ENOENT
-The locale could not be found.
-.It Ev EFTYPE
-The file found was not a valid file.
-.It Ev EINVAL
-The encoding indicated by the locale was unknown.
-.El
-.Pp
-The
-.Fn sgetrune
-function either returns the rune read or
-.Ev _INVALID_RUNE .
-The
-.Fn sputrune
-function returns the number of bytes needed to store
-.Fa rune
-as a multibyte string.
-.Sh FILES
-.Bl -tag -width /usr/share/locale/locale/LC_CTYPE -compact
-.It Pa $PATH_LOCALE/ Ns Em locale Ns /LC_CTYPE
-.It Pa /usr/share/locale/ Ns Em locale Ns /LC_CTYPE
-binary LC_CTYPE file for the locale
-.Em locale .
-.El
-.Sh "SEE ALSO
-.Xr mbrune 3 ,
-.Xr setlocale 3 ,
-.Xr euc 4 ,
-.Xr utf2 4
-.Sh NOTE
-The ANSI C type
-.Ev wchar_t
-is the same as
-.Ev rune_t .
-.Ev Rune_t
-was chosen to accent the purposeful choice of not basing the
-system with the ANSI C
-primitives, which were, shall we say, less aesthetic.
-.Sh HISTORY
-These functions first appeared in
-.Bx 4.4 .
-.Pp
-The
-.Fn setrunelocale
-function and the other non-ANSI rune functions were inspired by
-.Nm Plan 9 from Bell Labs
-as a much more sane alternative to the ANSI multibyte and
-wide character support.
-.\"They were conceived at the San Diego 1993 Summer USENIX conference by
-.\"Paul Borman of Krystal Technologies, Keith Bostic of CSRG and Andrew Hume
-.\"of Bell Labs.
-.Pp
-All of the ANSI multibyte and wide character
-support functions are built using the rune functions.
diff --git a/lib/libc/locale/rune.c b/lib/libc/locale/rune.c
deleted file mode 100644
index bc4d07c..0000000
--- a/lib/libc/locale/rune.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rune.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <rune.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-_RuneLocale *
-_Read_RuneMagi(fp)
- FILE *fp;
-{
- char *data;
- void *lastp;
- _RuneLocale *rl;
- _RuneEntry *rr;
- struct stat sb;
- int x;
-
- if (fstat(fileno(fp), &sb) < 0)
- return(0);
-
- if (sb.st_size < sizeof(_RuneLocale))
- return(0);
-
- if ((data = malloc(sb.st_size)) == NULL)
- return(0);
-
- rewind(fp); /* Someone might have read the magic number once already */
-
- if (fread(data, sb.st_size, 1, fp) != 1) {
- free(data);
- return(0);
- }
-
- rl = (_RuneLocale *)data;
- lastp = data + sb.st_size;
-
- rl->variable = rl + 1;
-
- if (memcmp(rl->magic, _RUNE_MAGIC_1, sizeof(rl->magic))) {
- free(data);
- return(0);
- }
-
- rl->invalid_rune = ntohl(rl->invalid_rune);
- rl->variable_len = ntohl(rl->variable_len);
- rl->runetype_ext.nranges = ntohl(rl->runetype_ext.nranges);
- rl->maplower_ext.nranges = ntohl(rl->maplower_ext.nranges);
- rl->mapupper_ext.nranges = ntohl(rl->mapupper_ext.nranges);
-
- for (x = 0; x < _CACHED_RUNES; ++x) {
- rl->runetype[x] = ntohl(rl->runetype[x]);
- rl->maplower[x] = ntohl(rl->maplower[x]);
- rl->mapupper[x] = ntohl(rl->mapupper[x]);
- }
-
- rl->runetype_ext.ranges = (_RuneEntry *)rl->variable;
- rl->variable = rl->runetype_ext.ranges + rl->runetype_ext.nranges;
- if (rl->variable > lastp) {
- free(data);
- return(0);
- }
-
- rl->maplower_ext.ranges = (_RuneEntry *)rl->variable;
- rl->variable = rl->maplower_ext.ranges + rl->maplower_ext.nranges;
- if (rl->variable > lastp) {
- free(data);
- return(0);
- }
-
- rl->mapupper_ext.ranges = (_RuneEntry *)rl->variable;
- rl->variable = rl->mapupper_ext.ranges + rl->mapupper_ext.nranges;
- if (rl->variable > lastp) {
- free(data);
- return(0);
- }
-
- for (x = 0; x < rl->runetype_ext.nranges; ++x) {
- rr = rl->runetype_ext.ranges;
-
- rr[x].min = ntohl(rr[x].min);
- rr[x].max = ntohl(rr[x].max);
- if ((rr[x].map = ntohl(rr[x].map)) == 0) {
- int len = rr[x].max - rr[x].min + 1;
- rr[x].types = rl->variable;
- rl->variable = rr[x].types + len;
- if (rl->variable > lastp) {
- free(data);
- return(0);
- }
- while (len-- > 0)
- rr[x].types[len] = ntohl(rr[x].types[len]);
- } else
- rr[x].types = 0;
- }
-
- for (x = 0; x < rl->maplower_ext.nranges; ++x) {
- rr = rl->maplower_ext.ranges;
-
- rr[x].min = ntohl(rr[x].min);
- rr[x].max = ntohl(rr[x].max);
- rr[x].map = ntohl(rr[x].map);
- }
-
- for (x = 0; x < rl->mapupper_ext.nranges; ++x) {
- rr = rl->mapupper_ext.ranges;
-
- rr[x].min = ntohl(rr[x].min);
- rr[x].max = ntohl(rr[x].max);
- rr[x].map = ntohl(rr[x].map);
- }
- if (((char *)rl->variable) + rl->variable_len > (char *)lastp) {
- free(data);
- return(0);
- }
-
- /*
- * Go out and zero pointers that should be zero.
- */
- if (!rl->variable_len)
- rl->variable = 0;
-
- if (!rl->runetype_ext.nranges)
- rl->runetype_ext.ranges = 0;
-
- if (!rl->maplower_ext.nranges)
- rl->maplower_ext.ranges = 0;
-
- if (!rl->mapupper_ext.nranges)
- rl->mapupper_ext.ranges = 0;
-
- return(rl);
-}
diff --git a/lib/libc/locale/runetype.c b/lib/libc/locale/runetype.c
deleted file mode 100644
index 282f806..0000000
--- a/lib/libc/locale/runetype.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <stdio.h>
-#include <rune.h>
-
-unsigned long
-___runetype(c)
- _BSD_CT_RUNE_T_ c;
-{
-#ifdef XPG4
- int x;
- _RuneRange *rr = &_CurrentRuneLocale->runetype_ext;
- _RuneEntry *re = rr->ranges;
-
- if (c < 0 || c == EOF)
- return(0L);
-
- for (x = 0; x < rr->nranges; ++x, ++re) {
- if (c < re->min)
- return(0L);
- if (c <= re->max) {
- if (re->types)
- return(re->types[c - re->min]);
- else
- return(re->map);
- }
- }
-#endif
- return(0L);
-}
diff --git a/lib/libc/locale/setinvalidrune.c b/lib/libc/locale/setinvalidrune.c
deleted file mode 100644
index 45a2a47..0000000
--- a/lib/libc/locale/setinvalidrune.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <rune.h>
-
-void
-setinvalidrune(ir)
- rune_t ir;
-{
- _INVALID_RUNE = ir;
-}
diff --git a/lib/libc/locale/setlocale.3 b/lib/libc/locale/setlocale.3
deleted file mode 100644
index 18db811..0000000
--- a/lib/libc/locale/setlocale.3
+++ /dev/null
@@ -1,330 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Donn Seeley at BSDI.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setlocale.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt SETLOCALE 3
-.Os
-.Sh NAME
-.Nm setlocale ,
-.Nm localeconv
-.Nd natural language formatting for C
-.Sh SYNOPSIS
-.Fd #include <locale.h>
-.Ft char *
-.Fn setlocale "int category" "const char *locale"
-.Ft struct lconv *
-.Fn localeconv "void"
-.Sh DESCRIPTION
-The
-.Fn setlocale
-function sets the C library's notion
-of natural language formatting style
-for particular sets of routines.
-Each such style is called a
-.Sq locale
-and is invoked using an appropriate name passed as a C string.
-The
-.Fn localeconv
-routine returns the current locale's parameters
-for formatting numbers.
-.Pp
-The
-.Fn setlocale
-function recognizes several categories of routines.
-These are the categories and the sets of routines they select:
-.Pp
-.Bl -tag -width LC_MONETARY
-.It Dv LC_ALL
-Set the entire locale generically.
-.It Dv LC_COLLATE
-Set a locale for string collation routines.
-This controls alphabetic ordering in
-.Fn strcoll
-and
-.Fn strxfrm .
-.It Dv LC_CTYPE
-Set a locale for the
-.Xr ctype 3 ,
-.Xr mbrune 3 ,
-.Xr multibyte 3
-and
-.Xr rune 3
-functions.
-This controls recognition of upper and lower case,
-alphabetic or non-alphabetic characters,
-and so on. The real work is done by the
-.Fn setrunelocale
-function.
-.It Dv LC_MONETARY
-Set a locale for formatting monetary values;
-this affects the
-.Fn localeconv
-function.
-.It Dv LC_NUMERIC
-Set a locale for formatting numbers.
-This controls the formatting of decimal points
-in input and output of floating point numbers
-in functions such as
-.Fn printf
-and
-.Fn scanf ,
-as well as values returned by
-.Fn localeconv .
-.It Dv LC_TIME
-Set a locale for formatting dates and times using the
-.Fn strftime
-function.
-.El
-.Pp
-Only three locales are defined by default,
-the empty string
-.Li "\&""\|""
-which denotes the native environment, and the
-.Li "\&""C""
-and
-.LI "\&""POSIX""
-locales, which denote the C language environment.
-A
-.Fa locale
-argument of
-.Dv NULL
-causes
-.Fn setlocale
-to return the current locale.
-By default, C programs start in the
-.Li "\&""C""
-locale.
-The only function in the library that sets the locale is
-.Fn setlocale ;
-the locale is never changed as a side effect of some other routine.
-.Pp
-The
-.Fn localeconv
-function returns a pointer to a structure
-which provides parameters for formatting numbers,
-especially currency values:
-.Bd -literal -offset indent
-struct lconv {
- char *decimal_point;
- char *thousands_sep;
- char *grouping;
- 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;
-};
-.Ed
-.Pp
-The individual fields have the following meanings:
-.Pp
-.Bl -tag -width mon_decimal_point
-.It Fa decimal_point
-The decimal point character, except for currency values.
-.It Fa thousands_sep
-The separator between groups of digits
-before the decimal point, except for currency values.
-.It Fa grouping
-The sizes of the groups of digits, except for currency values.
-This is a pointer to a vector of integers, each of size
-.Va char ,
-representing group size from low order digit groups
-to high order (right to left).
-The list may be terminated with 0 or
-.Dv CHAR_MAX .
-If the list is terminated with 0,
-the last group size before the 0 is repeated to account for all the digits.
-If the list is terminated with
-.Dv CHAR_MAX ,
-no more grouping is performed.
-.It Fa int_curr_symbol
-The standardized international currency symbol.
-.It Fa currency_symbol
-The local currency symbol.
-.It Fa mon_decimal_point
-The decimal point character for currency values.
-.It Fa mon_thousands_sep
-The separator for digit groups in currency values.
-.It Fa mon_grouping
-Like
-.Fa grouping
-but for currency values.
-.It Fa positive_sign
-The character used to denote nonnegative currency values,
-usually the empty string.
-.It Fa negative_sign
-The character used to denote negative currency values,
-usually a minus sign.
-.It Fa int_frac_digits
-The number of digits after the decimal point
-in an international-style currency value.
-.It Fa frac_digits
-The number of digits after the decimal point
-in the local style for currency values.
-.It Fa p_cs_precedes
-1 if the currency symbol precedes the currency value
-for nonnegative values, 0 if it follows.
-.It Fa p_sep_by_space
-1 if a space is inserted between the currency symbol
-and the currency value for nonnegative values, 0 otherwise.
-.It Fa n_cs_precedes
-Like
-.Fa p_cs_precedes
-but for negative values.
-.It Fa n_sep_by_space
-Like
-.Fa p_sep_by_space
-but for negative values.
-.It Fa p_sign_posn
-The location of the
-.Fa positive_sign
-with respect to a nonnegative quantity and the
-.Fa currency_symbol ,
-coded as follows:
-.Bl -tag -width 3n -compact
-.It Li 0
-Parentheses around the entire string.
-.It Li 1
-Before the string.
-.It Li 2
-After the string.
-.It Li 3
-Just before
-.Fa currency_symbol .
-.It Li 4
-Just after
-.Fa currency_symbol .
-.El
-.It Fa n_sign_posn
-Like
-.Fa p_sign_posn
-but for negative currency values.
-.El
-.Pp
-Unless mentioned above,
-an empty string as a value for a field
-indicates a zero length result or
-a value that is not in the current locale.
-A
-.Dv CHAR_MAX
-result similarly denotes an unavailable value.
-.Sh "RETURN VALUES
-The
-.Fn setlocale
-function returns
-.Dv NULL
-and fails to change the locale
-if the given combination of
-.Fa category
-and
-.Fa locale
-makes no sense.
-The
-.Fn localeconv
-function returns a pointer to a static object
-which may be altered by later calls to
-.Fn setlocale
-or
-.Fn localeconv .
-.Sh FILES
-.Bl -tag -width /usr/share/locale/locale/category -compact
-.It Pa $PATH_LOCALE/ Ns Em locale/category
-.It Pa /usr/share/locale/ Ns Em locale/category
-locale file for the locale
-.Em locale
-and the category
-.Em category .
-.El
-.Sh "SEE ALSO
-.Xr colldef 1 ,
-.Xr mklocale 1 ,
-.Xr ctype 3 ,
-.Xr mbrune 3 ,
-.Xr multibyte 3 ,
-.Xr rune 3 ,
-.Xr strcoll 3 ,
-.Xr strxfrm 3 ,
-.Xr euc 4 ,
-.Xr utf2 4
-.Sh STANDARDS
-The
-.Fn setlocale
-and
-.Fn localeconv
-functions conform to
-.St -ansiC .
-.Sh HISTORY
-The
-.Fn setlocale
-and
-.Fn localeconv
-functions first appeared in
-.Bx 4.4 .
-.Sh BUGS
-The current implementation supports only the
-.Li "\&""C""
-and
-.Li "\&""POSIX""
-locales for all but the
-.Dv LC_COLLATE ,
-.Dv LC_CTYPE ,
-and
-.Dv LC_TIME
-categories.
-.Pp
-In spite of the gnarly currency support in
-.Fn localeconv ,
-the standards don't include any functions
-for generalized currency formatting.
-.Pp
-Use of
-.Dv LC_MONETARY
-could lead to misleading results until we have a real time currency
-conversion function.
-.Dv LC_NUMERIC
-and
-.Dv LC_TIME
-are personal choices and should not be wrapped up with the other categories.
diff --git a/lib/libc/locale/setlocale.c b/lib/libc/locale/setlocale.c
deleted file mode 100644
index 4b7a1b1..0000000
--- a/lib/libc/locale/setlocale.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: setlocale.c,v 1.20 1997/02/22 14:59:56 peter Exp $
- */
-
-#ifdef LIBC_RCS
-static const char rcsid[] =
- "$Id: setlocale.c,v 1.20 1997/02/22 14:59:56 peter Exp $";
-#endif
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setlocale.c 8.1 (Berkeley) 7/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <limits.h>
-#include <locale.h>
-#include <rune.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include "collate.h"
-#include "setlocale.h"
-
-/*
- * Category names for getenv()
- */
-static char *categories[_LC_LAST] = {
- "LC_ALL",
- "LC_COLLATE",
- "LC_CTYPE",
- "LC_MONETARY",
- "LC_NUMERIC",
- "LC_TIME",
-};
-
-/*
- * Current locales for each category
- */
-static char current_categories[_LC_LAST][ENCODING_LEN + 1] = {
- "C",
- "C",
- "C",
- "C",
- "C",
- "C",
-};
-
-/*
- * The locales we are going to try and load
- */
-static char new_categories[_LC_LAST][ENCODING_LEN + 1];
-static char saved_categories[_LC_LAST][ENCODING_LEN + 1];
-
-static char current_locale_string[_LC_LAST * (ENCODING_LEN + 1/*"/"*/ + 1)];
-
-static char *currentlocale __P((void));
-static char *loadlocale __P((int));
-static int stub_load_locale __P((const char *));
-
-extern int __time_load_locale __P((const char *)); /* strftime.c */
-
-#ifdef XPG4
-extern int _xpg4_setrunelocale __P((char *));
-#endif
-
-char *
-setlocale(category, locale)
- int category;
- const char *locale;
-{
- int i, j, len;
- char *env, *r;
-
- if (category < LC_ALL || category >= _LC_LAST)
- return (NULL);
-
- if (!locale)
- return (category != LC_ALL ?
- current_categories[category] : currentlocale());
-
- /*
- * Default to the current locale for everything.
- */
- for (i = 1; i < _LC_LAST; ++i)
- (void)strcpy(new_categories[i], current_categories[i]);
-
- /*
- * Now go fill up new_categories from the locale argument
- */
- if (!*locale) {
- env = getenv(categories[category]);
-
- if (category != LC_ALL && (!env || !*env))
- env = getenv(categories[LC_ALL]);
-
- if (!env || !*env)
- env = getenv("LANG");
-
- if (!env || !*env)
- env = "C";
-
- (void) strncpy(new_categories[category], env, ENCODING_LEN);
- new_categories[category][ENCODING_LEN] = '\0';
- if (category == LC_ALL) {
- for (i = 1; i < _LC_LAST; ++i) {
- if (!(env = getenv(categories[i])) || !*env)
- env = new_categories[LC_ALL];
- (void)strncpy(new_categories[i], env, ENCODING_LEN);
- new_categories[i][ENCODING_LEN] = '\0';
- }
- }
- } else if (category != LC_ALL) {
- (void)strncpy(new_categories[category], locale, ENCODING_LEN);
- new_categories[category][ENCODING_LEN] = '\0';
- } else {
- if ((r = strchr(locale, '/')) == NULL) {
- for (i = 1; i < _LC_LAST; ++i) {
- (void)strncpy(new_categories[i], locale, ENCODING_LEN);
- new_categories[i][ENCODING_LEN] = '\0';
- }
- } else {
- for (i = 1; r[1] == '/'; ++r);
- if (!r[1])
- return (NULL); /* Hmm, just slashes... */
- do {
- len = r - locale > ENCODING_LEN ? ENCODING_LEN : r - locale;
- (void)strncpy(new_categories[i], locale, len);
- new_categories[i][len] = '\0';
- i++;
- locale = r;
- while (*locale == '/')
- ++locale;
- while (*++r && *r != '/');
- } while (*locale);
- while (i < _LC_LAST)
- (void)strcpy(new_categories[i],
- new_categories[i-1]);
- }
- }
-
- if (category)
- return (loadlocale(category));
-
- for (i = 1; i < _LC_LAST; ++i) {
- (void)strcpy(saved_categories[i], current_categories[i]);
- if (loadlocale(i) == NULL) {
- for (j = 1; j < i; j++) {
- (void)strcpy(new_categories[j],
- saved_categories[j]);
- /* XXX can fail too */
- (void)loadlocale(j);
- }
- return (NULL);
- }
- }
- return (currentlocale());
-}
-
-static char *
-currentlocale()
-{
- int i;
-
- (void)strcpy(current_locale_string, current_categories[1]);
-
- for (i = 2; i < _LC_LAST; ++i)
- if (strcmp(current_categories[1], current_categories[i])) {
- (void) strcpy(current_locale_string, current_categories[1]);
- (void) strcat(current_locale_string, "/");
- (void) strcat(current_locale_string, current_categories[2]);
- (void) strcat(current_locale_string, "/");
- (void) strcat(current_locale_string, current_categories[3]);
- (void) strcat(current_locale_string, "/");
- (void) strcat(current_locale_string, current_categories[4]);
- (void) strcat(current_locale_string, "/");
- (void) strcat(current_locale_string, current_categories[5]);
- break;
- }
- return (current_locale_string);
-}
-
-static char *
-loadlocale(category)
- int category;
-{
- char *ret;
- char *new = new_categories[category];
- char *old = current_categories[category];
-
- if (_PathLocale == NULL) {
- char *p = getenv("PATH_LOCALE");
-
- if (p != NULL && !issetugid()) {
- if (strlen(p) + 1/*"/"*/ + ENCODING_LEN +
- 1/*"/"*/ + CATEGORY_LEN >= PATH_MAX)
- return (NULL);
- _PathLocale = strdup(p);
- if (_PathLocale == NULL)
- return (NULL);
- } else
- _PathLocale = _PATH_LOCALE;
- }
-
- if (strcmp(new, old) == 0)
- return (old);
-
- if (category == LC_CTYPE) {
-#ifdef XPG4
- ret = _xpg4_setrunelocale(new) ? NULL : new;
-#else
- ret = setrunelocale(new) ? NULL : new;
-#endif
- if (!ret) {
-#ifdef XPG4
- (void)_xpg4_setrunelocale(old);
-#else
- (void)setrunelocale(old);
-#endif
- } else
- (void)strcpy(old, new);
- return (ret);
- }
-
- if (category == LC_COLLATE) {
- ret = (__collate_load_tables(new) < 0) ? NULL : new;
- if (!ret)
- (void)__collate_load_tables(old);
- else
- (void)strcpy(old, new);
- return (ret);
- }
-
- if (category == LC_TIME) {
- ret = (__time_load_locale(new) < 0) ? NULL : new;
- if (!ret)
- (void)__time_load_locale(old);
- else
- (void)strcpy(old, new);
- return (ret);
- }
-
- if (category == LC_MONETARY || category == LC_NUMERIC) {
- ret = stub_load_locale(new) ? NULL : new;
- if (!ret)
- (void)stub_load_locale(old);
- else
- (void)strcpy(old, new);
- return (ret);
- }
-
- /* Just in case...*/
- return (NULL);
-}
-
-static int
-stub_load_locale(encoding)
-const char *encoding;
-{
- char name[PATH_MAX];
- struct stat st;
-
- if (!encoding)
- return(1);
- /*
- * The "C" and "POSIX" locale are always here.
- */
- if (!strcmp(encoding, "C") || !strcmp(encoding, "POSIX"))
- return(0);
- if (!_PathLocale)
- return(1);
- /* Range checking not needed, encoding has fixed size */
- strcpy(name, _PathLocale);
- strcat(name, "/");
- strcat(name, encoding);
-#if 0
- /*
- * Some day we will actually look at this file.
- */
-#endif
- return (stat(name, &st) != 0 || !S_ISDIR(st.st_mode));
-}
diff --git a/lib/libc/locale/setlocale.h b/lib/libc/locale/setlocale.h
deleted file mode 100644
index f3b2a22..0000000
--- a/lib/libc/locale/setlocale.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _SETLOCALE_H
-#define _SETLOCALE_H
-/*
- * Copyright (C) 1997 by Andrey A. Chernov, Moscow, Russia.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define ENCODING_LEN 31
-#define CATEGORY_LEN 11
-
-extern char *_PathLocale;
-
-#endif /* SETLOCALE_H */
diff --git a/lib/libc/locale/setrunelocale.c b/lib/libc/locale/setrunelocale.c
deleted file mode 100644
index 2d94e75..0000000
--- a/lib/libc/locale/setrunelocale.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <rune.h>
-#include <errno.h>
-#include <limits.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "setlocale.h"
-
-extern int _none_init __P((_RuneLocale *));
-#ifdef XPG4
-extern int _UTF2_init __P((_RuneLocale *));
-extern int _EUC_init __P((_RuneLocale *));
-extern int _MSKanji_init __P((_RuneLocale *));
-extern int _xpg4_setrunelocale __P((char *));
-#endif
-extern _RuneLocale *_Read_RuneMagi __P((FILE *));
-
-#ifdef XPG4
-int
-setrunelocale(encoding)
- char *encoding;
-{
- return _xpg4_setrunelocale(encoding);
-}
-#endif
-
-int
-#ifndef XPG4
-setrunelocale(encoding)
-#else
-_xpg4_setrunelocale(encoding)
-#endif
- char *encoding;
-{
- FILE *fp;
- char name[PATH_MAX];
- _RuneLocale *rl;
-
- if (!encoding || strlen(encoding) > ENCODING_LEN)
- return(EFAULT);
-
- /*
- * The "C" and "POSIX" locale are always here.
- */
- if (!strcmp(encoding, "C") || !strcmp(encoding, "POSIX")) {
- _CurrentRuneLocale = &_DefaultRuneLocale;
- return(0);
- }
-
- if (_PathLocale == NULL) {
- char *p = getenv("PATH_LOCALE");
-
- if (p != NULL && !issetugid()) {
- if (strlen(p) + 1/*"/"*/ + ENCODING_LEN +
- 1/*"/"*/ + CATEGORY_LEN >= PATH_MAX)
- return(EFAULT);
- _PathLocale = strdup(p);
- if (_PathLocale == NULL)
- return (errno);
- } else
- _PathLocale = _PATH_LOCALE;
- }
- /* Range checking not needed, encoding length already checked above */
- (void) strcpy(name, _PathLocale);
- (void) strcat(name, "/");
- (void) strcat(name, encoding);
- (void) strcat(name, "/LC_CTYPE");
-
- if ((fp = fopen(name, "r")) == NULL)
- return(ENOENT);
-
- if ((rl = _Read_RuneMagi(fp)) == 0) {
- fclose(fp);
- return(EFTYPE);
- }
- fclose(fp);
-
-#ifdef XPG4
- if (!rl->encoding[0] || !strcmp(rl->encoding, "UTF2"))
- return(_UTF2_init(rl));
-#else
- if (!rl->encoding[0])
- return(EINVAL);
-#endif
- else if (!strcmp(rl->encoding, "NONE"))
- return(_none_init(rl));
-#ifdef XPG4
- else if (!strcmp(rl->encoding, "EUC"))
- return(_EUC_init(rl));
- else if (!strcmp(rl->encoding, "MSKanji"))
- return(_MSKanji_init(rl));
-#endif
- else
- return(EINVAL);
-}
-
diff --git a/lib/libc/locale/table.c b/lib/libc/locale/table.c
deleted file mode 100644
index 00f80d7..0000000
--- a/lib/libc/locale/table.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: table.c,v 1.10 1997/05/13 11:19:26 ache Exp $
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/27/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <ctype.h>
-#include <rune.h>
-
-extern rune_t _none_sgetrune __P((const char *, size_t, char const **));
-extern int _none_sputrune __P((rune_t, char *, size_t, char **));
-extern int _none_init __P((char *, char **));
-
-_RuneLocale _DefaultRuneLocale = {
- _RUNE_MAGIC_1,
- "none",
- _none_sgetrune,
- _none_sputrune,
- 0xFFFD,
-
- { /*00*/ _C, _C, _C, _C,
- _C, _C, _C, _C,
- /*08*/ _C, _C|_S|_B, _C|_S, _C|_S,
- _C|_S, _C|_S, _C, _C,
- /*10*/ _C, _C, _C, _C,
- _C, _C, _C, _C,
- /*18*/ _C, _C, _C, _C,
- _C, _C, _C, _C,
- /*20*/ _S|_B|_R, _P|_R|_G, _P|_R|_G, _P|_R|_G,
- _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G,
- /*28*/ _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G,
- _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G,
- /*30*/ _D|_R|_G|_X|0, _D|_R|_G|_X|1, _D|_R|_G|_X|2, _D|_R|_G|_X|3,
- _D|_R|_G|_X|4, _D|_R|_G|_X|5, _D|_R|_G|_X|6, _D|_R|_G|_X|7,
- /*38*/ _D|_R|_G|_X|8, _D|_R|_G|_X|9, _P|_R|_G, _P|_R|_G,
- _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G,
- /*40*/ _P|_R|_G, _U|_X|_R|_G|_A|10, _U|_X|_R|_G|_A|11, _U|_X|_R|_G|_A|12,
- _U|_X|_R|_G|_A|13, _U|_X|_R|_G|_A|14, _U|_X|_R|_G|_A|15, _U|_R|_G|_A,
- /*48*/ _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A,
- _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A,
- /*50*/ _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A,
- _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A,
- /*58*/ _U|_R|_G|_A, _U|_R|_G|_A, _U|_R|_G|_A, _P|_R|_G,
- _P|_R|_G, _P|_R|_G, _P|_R|_G, _P|_R|_G,
- /*60*/ _P|_R|_G, _L|_X|_R|_G|_A|10, _L|_X|_R|_G|_A|11, _L|_X|_R|_G|_A|12,
- _L|_X|_R|_G|_A|13, _L|_X|_R|_G|_A|14, _L|_X|_R|_G|_A|15, _L|_R|_G|_A,
- /*68*/ _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A,
- _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A,
- /*70*/ _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A,
- _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A,
- /*78*/ _L|_R|_G|_A, _L|_R|_G|_A, _L|_R|_G|_A, _P|_R|_G,
- _P|_R|_G, _P|_R|_G, _P|_R|_G, _C,
- },
- { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
- 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
- 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
- 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
- 0x40, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
- 0x60, 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 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e1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
- 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
- 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
- 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
- },
-};
-
-_RuneLocale *_CurrentRuneLocale = &_DefaultRuneLocale;
-
-int __mb_cur_max = 1;
-
-char *_PathLocale;
diff --git a/lib/libc/locale/toascii.3 b/lib/libc/locale/toascii.3
deleted file mode 100644
index 788d2f2..0000000
--- a/lib/libc/locale/toascii.3
+++ /dev/null
@@ -1,69 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)toascii.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TOASCII 3
-.Os
-.Sh NAME
-.Nm toascii
-.Nd convert a byte to 7-bit ASCII
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn toascii "int c"
-.Sh DESCRIPTION
-The
-.Fn toascii
-function strips all but the low 7 bits from a letter,
-including parity or other marker bits.
-.Sh RETURN VALUES
-The
-.Fn toascii
-function always returns a valid ASCII character.
-.Sh SEE ALSO
-.Xr isalnum 3 ,
-.Xr isalpha 3 ,
-.Xr isascii 3 ,
-.Xr iscntrl 3 ,
-.Xr isdigit 3 ,
-.Xr isgraph 3 ,
-.Xr islower 3 ,
-.Xr isprint 3 ,
-.Xr ispunct 3 ,
-.Xr isspace 3 ,
-.Xr isupper 3 ,
-.Xr isxdigit 3 ,
-.Xr stdio 3 ,
-.Xr tolower 3 ,
-.Xr toupper 3 ,
-.Xr ascii 7
diff --git a/lib/libc/locale/tolower.3 b/lib/libc/locale/tolower.3
deleted file mode 100644
index 3f98965..0000000
--- a/lib/libc/locale/tolower.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)tolower.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TOLOWER 3
-.Os
-.Sh NAME
-.Nm tolower
-.Nd upper case to lower case letter conversion
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn tolower "int c"
-.Sh DESCRIPTION
-The
-.Fn tolower
-function converts an upper-case letter to the corresponding lower-case
-letter.
-.Sh RETURN VALUES
-If the argument is an upper-case letter, the
-.Fn tolower
-function returns the corresponding lower-case letter if there is
-one; otherwise the argument is returned unchanged.
-.\" In the
-.\" .Em ``C''
-.\" locale,
-.\" .Fn tolower
-.\" maps only the characters for which
-.\" .Xr isupper
-.\" is true to the corresponding characters for which
-.\" .Xr islower
-.\" is true.
-.Sh SEE ALSO
-.Xr isalnum 3 ,
-.Xr isalpha 3 ,
-.Xr isascii 3 ,
-.Xr iscntrl 3 ,
-.Xr isdigit 3 ,
-.Xr isgraph 3 ,
-.Xr islower 3 ,
-.Xr isprint 3 ,
-.Xr ispunct 3 ,
-.Xr isspace 3 ,
-.Xr isupper 3 ,
-.Xr isxdigit 3 ,
-.Xr stdio 3 ,
-.Xr toascii 3 ,
-.Xr toupper 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn tolower
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/tolower.c b/lib/libc/locale/tolower.c
deleted file mode 100644
index 65d5175..0000000
--- a/lib/libc/locale/tolower.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <stdio.h>
-#include <rune.h>
-
-_BSD_CT_RUNE_T_
-___tolower(c)
- _BSD_CT_RUNE_T_ c;
-{
-#ifdef XPG4
- int x;
- _RuneRange *rr = &_CurrentRuneLocale->maplower_ext;
- _RuneEntry *re = rr->ranges;
-
- if (c < 0 || c == EOF)
- return(c);
-
- for (x = 0; x < rr->nranges; ++x, ++re) {
- if (c < re->min)
- return(c);
- if (c <= re->max)
- return(re->map + c - re->min);
- }
-#endif
- return(c);
-}
diff --git a/lib/libc/locale/toupper.3 b/lib/libc/locale/toupper.3
deleted file mode 100644
index 2802637..0000000
--- a/lib/libc/locale/toupper.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)toupper.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TOUPPER 3
-.Os
-.Sh NAME
-.Nm toupper
-.Nd lower case to upper case letter conversion
-.Sh SYNOPSIS
-.Fd #include <ctype.h>
-.Ft int
-.Fn toupper "int c"
-.Sh DESCRIPTION
-The
-.Fn toupper
-function converts a lower-case letter to the corresponding
-upper-case letter.
-.SH RETURN VALUES
-If the argument is a lower-case letter, the
-.Fn toupper
-function returns the corresponding upper-case letter if there is
-one; otherwise the argument is returned unchanged.
-.\" In the
-.\" .Em ``C''
-.\" locale,
-.\" .Fn toupper
-.\" maps only the characters for which
-.\" .Xr islower
-.\" is true to the corresponding characters for which
-.\" .Xr isupper
-.\" is true.
-.Sh SEE ALSO
-.Xr isalnum 3 ,
-.Xr isalpha 3 ,
-.Xr isascii 3 ,
-.Xr iscntrl 3 ,
-.Xr isdigit 3 ,
-.Xr isgraph 3 ,
-.Xr islower 3 ,
-.Xr isprint 3 ,
-.Xr ispunct 3 ,
-.Xr isspace 3 ,
-.Xr isupper 3 ,
-.Xr isxdigit 3 ,
-.Xr stdio 3 ,
-.Xr toascii 3 ,
-.Xr tolower 3 ,
-.Xr ascii 7
-.Sh STANDARDS
-The
-.Fn toupper
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/locale/toupper.c b/lib/libc/locale/toupper.c
deleted file mode 100644
index d2e4480..0000000
--- a/lib/libc/locale/toupper.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <stdio.h>
-#include <rune.h>
-
-_BSD_CT_RUNE_T_
-___toupper(c)
- _BSD_CT_RUNE_T_ c;
-{
-#ifdef XPG4
- int x;
- _RuneRange *rr = &_CurrentRuneLocale->mapupper_ext;
- _RuneEntry *re = rr->ranges;
-
- if (c < 0 || c == EOF)
- return(c);
-
- for (x = 0; x < rr->nranges; ++x, ++re) {
- if (c < re->min)
- return(c);
- if (c <= re->max)
- return(re->map + c - re->min);
- }
-#endif
- return(c);
-}
diff --git a/lib/libc/locale/utf2.4 b/lib/libc/locale/utf2.4
deleted file mode 100644
index e8fe7c8..0000000
--- a/lib/libc/locale/utf2.4
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Paul Borman at Krystal Technologies.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)utf2.4 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt UTF2 4
-.Os
-.Sh NAME
-.Nm utf2
-.Nd "Universal character set Transformation Format encoding of runes
-.Sh SYNOPSIS
-.Nm ENCODING
-.Qq UTF2
-.Sh DESCRIPTION
-The
-.Nm UTF2
-encoding is based on a proposed X-Open multibyte
-\s-1FSS-UCS-TF\s+1 (File System Safe Universal Character Set Transformation Format) encoding as used in
-.Nm Plan 9 from Bell Labs.
-Although it is capable of representing more than 16 bits,
-the current implementation is limited to 16 bits as defined by the
-Unicode Standard.
-.Pp
-.Nm UTF2
-representation is backwards compatible with ASCII, so 0x00-0x7f refer to the
-ASCII character set. The multibyte encoding of runes between 0x0080 and 0xffff
-consist entirely of bytes whose high order bit is set. The actual
-encoding is represented by the following table:
-.Bd -literal
-[0x0000 - 0x007f] [00000000.0bbbbbbb] -> 0bbbbbbb
-[0x0080 - 0x07ff] [00000bbb.bbbbbbbb] -> 110bbbbb, 10bbbbbb
-[0x0800 - 0xffff] [bbbbbbbb.bbbbbbbb] -> 1110bbbb, 10bbbbbb, 10bbbbbb
-.Ed
-.Pp
-If more than a single representation of a value exists (for example,
-0x00; 0xC0 0x80; 0xE0 0x80 0x80) the shortest representation is always
-used (but the longer ones will be correctly decoded).
-.Pp
-The final three encodings provided by X-Open:
-.Bd -literal
-[00000000.000bbbbb.bbbbbbbb.bbbbbbbb] ->
- 11110bbb, 10bbbbbb, 10bbbbbb, 10bbbbbb
-
-[000000bb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
- 111110bb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb
-
-[0bbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
- 1111110b, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb
-.Ed
-.Pp
-which provides for the entire proposed ISO-10646 31 bit standard are currently
-not implemented.
-.Sh "SEE ALSO"
-.Xr mklocale 1 ,
-.Xr setlocale 3
diff --git a/lib/libc/locale/utf2.5 b/lib/libc/locale/utf2.5
deleted file mode 100644
index e8fe7c8..0000000
--- a/lib/libc/locale/utf2.5
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Paul Borman at Krystal Technologies.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)utf2.4 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt UTF2 4
-.Os
-.Sh NAME
-.Nm utf2
-.Nd "Universal character set Transformation Format encoding of runes
-.Sh SYNOPSIS
-.Nm ENCODING
-.Qq UTF2
-.Sh DESCRIPTION
-The
-.Nm UTF2
-encoding is based on a proposed X-Open multibyte
-\s-1FSS-UCS-TF\s+1 (File System Safe Universal Character Set Transformation Format) encoding as used in
-.Nm Plan 9 from Bell Labs.
-Although it is capable of representing more than 16 bits,
-the current implementation is limited to 16 bits as defined by the
-Unicode Standard.
-.Pp
-.Nm UTF2
-representation is backwards compatible with ASCII, so 0x00-0x7f refer to the
-ASCII character set. The multibyte encoding of runes between 0x0080 and 0xffff
-consist entirely of bytes whose high order bit is set. The actual
-encoding is represented by the following table:
-.Bd -literal
-[0x0000 - 0x007f] [00000000.0bbbbbbb] -> 0bbbbbbb
-[0x0080 - 0x07ff] [00000bbb.bbbbbbbb] -> 110bbbbb, 10bbbbbb
-[0x0800 - 0xffff] [bbbbbbbb.bbbbbbbb] -> 1110bbbb, 10bbbbbb, 10bbbbbb
-.Ed
-.Pp
-If more than a single representation of a value exists (for example,
-0x00; 0xC0 0x80; 0xE0 0x80 0x80) the shortest representation is always
-used (but the longer ones will be correctly decoded).
-.Pp
-The final three encodings provided by X-Open:
-.Bd -literal
-[00000000.000bbbbb.bbbbbbbb.bbbbbbbb] ->
- 11110bbb, 10bbbbbb, 10bbbbbb, 10bbbbbb
-
-[000000bb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
- 111110bb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb
-
-[0bbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb] ->
- 1111110b, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb, 10bbbbbb
-.Ed
-.Pp
-which provides for the entire proposed ISO-10646 31 bit standard are currently
-not implemented.
-.Sh "SEE ALSO"
-.Xr mklocale 1 ,
-.Xr setlocale 3
diff --git a/lib/libc/locale/utf2.c b/lib/libc/locale/utf2.c
deleted file mode 100644
index c46dd93..0000000
--- a/lib/libc/locale/utf2.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Paul Borman at Krystal Technologies.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifdef XPG4
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)utf2.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <rune.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-rune_t _UTF2_sgetrune __P((const char *, size_t, char const **));
-int _UTF2_sputrune __P((rune_t, char *, size_t, char **));
-
-static _utf_count[16] = {
- 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 2, 2, 3, 0,
-};
-
-int
-_UTF2_init(rl)
- _RuneLocale *rl;
-{
- rl->sgetrune = _UTF2_sgetrune;
- rl->sputrune = _UTF2_sputrune;
- _CurrentRuneLocale = rl;
- __mb_cur_max = 3;
- return (0);
-}
-
-rune_t
-_UTF2_sgetrune(string, n, result)
- const char *string;
- size_t n;
- char const **result;
-{
- int c;
-
- if (n < 1 || (c = _utf_count[(*string >> 4) & 0xf]) > n) {
- if (result)
- *result = string;
- return (_INVALID_RUNE);
- }
- switch (c) {
- case 1:
- if (result)
- *result = string + 1;
- return (*string & 0xff);
- case 2:
- if ((string[1] & 0xC0) != 0x80)
- goto encoding_error;
- if (result)
- *result = string + 2;
- return (((string[0] & 0x1F) << 6) | (string[1] & 0x3F));
- case 3:
- if ((string[1] & 0xC0) != 0x80 || (string[2] & 0xC0) != 0x80)
- goto encoding_error;
- if (result)
- *result = string + 3;
- return (((string[0] & 0x1F) << 12) | ((string[1] & 0x3F) << 6)
- | (string[2] & 0x3F));
- default:
-encoding_error: if (result)
- *result = string + 1;
- return (_INVALID_RUNE);
- }
-}
-
-int
-_UTF2_sputrune(c, string, n, result)
- rune_t c;
- char *string, **result;
- size_t n;
-{
- if (c & 0xF800) {
- if (n >= 3) {
- if (string) {
- string[0] = 0xE0 | ((c >> 12) & 0x0F);
- string[1] = 0x80 | ((c >> 6) & 0x3F);
- string[2] = 0x80 | ((c) & 0x3F);
- }
- if (result)
- *result = string + 3;
- } else
- if (result)
- *result = NULL;
-
- return (3);
- } else
- if (c & 0x0780) {
- if (n >= 2) {
- if (string) {
- string[0] = 0xC0 | ((c >> 6) & 0x1F);
- string[1] = 0x80 | ((c) & 0x3F);
- }
- if (result)
- *result = string + 2;
- } else
- if (result)
- *result = NULL;
- return (2);
- } else {
- if (n >= 1) {
- if (string)
- string[0] = c;
- if (result)
- *result = string + 1;
- } else
- if (result)
- *result = NULL;
- return (1);
- }
-}
-#endif /* XPG4 */
diff --git a/lib/libc/net/Makefile.inc b/lib/libc/net/Makefile.inc
deleted file mode 100644
index c7381db..0000000
--- a/lib/libc/net/Makefile.inc
+++ /dev/null
@@ -1,54 +0,0 @@
-# from @(#)Makefile.inc 8.2 (Berkeley) 9/5/93
-# $Id: Makefile.inc,v 1.24 1997/10/15 16:15:41 bde Exp $
-
-# machine-independent net sources
-.PATH: ${.CURDIR}/../libc/${MACHINE}/net ${.CURDIR}/../libc/net
-
-SRCS+= addr2ascii.c ascii2addr.c base64.c ether_addr.c \
- gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c \
- getnetbydns.c getnetbyht.c getnetbynis.c getnetnamadr.c \
- getproto.c getprotoent.c getprotoname.c getservbyname.c \
- getservbyport.c getservent.c herror.c inet_addr.c inet_lnaof.c \
- inet_makeaddr.c inet_net_ntop.c inet_net_pton.c inet_neta.c \
- inet_netof.c inet_network.c inet_ntoa.c inet_ntop.c \
- inet_pton.c linkaddr.c map_v4v6.c ns_addr.c ns_ntoa.c nsap_addr.c \
- rcmd.c recv.c res_comp.c res_data.c res_debug.c \
- res_init.c res_mkquery.c res_query.c res_send.c res_stubs.c \
- send.c
-# not supported: iso_addr.c
-
-# machine-dependent net sources
-.include "${.CURDIR}/../libc/${MACHINE}/net/Makefile.inc"
-
-.if ${LIB} == "c"
-MAN3+= addr2ascii.3 byteorder.3 ethers.3 gethostbyname.3 \
- getnetent.3 getprotoent.3 getservent.3 \
- inet.3 linkaddr.3 rcmd.3 resolver.3
-# not installed: iso_addr.3 ns.3
-
-MLINKS+=addr2ascii.3 ascii2addr.3
-MLINKS+=byteorder.3 htonl.3 byteorder.3 htons.3 byteorder.3 ntohl.3 \
- byteorder.3 ntohs.3
-MLINKS+=ethers.3 ether_aton.3 ethers.3 ether_hostton.3 ethers.3 ether_line.3 \
- ethers.3 ether_ntoa.3 ethers.3 ether_ntohost.3
-MLINKS+=gethostbyname.3 endhostent.3 gethostbyname.3 gethostbyaddr.3 \
- gethostbyname.3 gethostbyname2.3 gethostbyname.3 gethostent.3 \
- gethostbyname.3 herror.3 gethostbyname.3 hstrerror.3 \
- gethostbyname.3 sethostent.3
-MLINKS+=getnetent.3 endnetent.3 getnetent.3 getnetbyaddr.3 \
- getnetent.3 getnetbyname.3 getnetent.3 setnetent.3
-MLINKS+=getprotoent.3 endprotoent.3 getprotoent.3 getprotobyname.3 \
- getprotoent.3 getprotobynumber.3 getprotoent.3 setprotoent.3
-MLINKS+=getservent.3 endservent.3 getservent.3 getservbyname.3 \
- getservent.3 getservbyport.3 getservent.3 setservent.3
-MLINKS+=inet.3 addr.3 inet.3 inet_addr.3 inet.3 inet_aton.3 \
- inet.3 inet_lnaof.3 inet.3 inet_makeaddr.3 inet.3 inet_netof.3 \
- inet.3 inet_network.3 inet.3 inet_ntoa.3 inet.3 network.3 \
- inet.3 ntoa.3
-MLINKS+=linkaddr.3 link_addr.3 linkaddr.3 link_ntoa.3
-#MLINKS+=ns.3 ns_addr.3 ns.3 ns_ntoa.3
-MLINKS+=rcmd.3 iruserok.3 rcmd.3 rresvport.3 rcmd.3 ruserok.3
-MLINKS+=resolver.3 dn_comp.3 resolver.3 dn_expand.3 resolver.3 res_init.3 \
- resolver.3 res_mkquery.3 resolver.3 res_query.3 \
- resolver.3 res_search.3 resolver.3 res_send.3
-.endif
diff --git a/lib/libc/net/addr2ascii.3 b/lib/libc/net/addr2ascii.3
deleted file mode 100644
index 282acac..0000000
--- a/lib/libc/net/addr2ascii.3
+++ /dev/null
@@ -1,215 +0,0 @@
-.\"
-.\" Copyright 1996 Massachusetts Institute of Technology
-.\"
-.\" Permission to use, copy, modify, and distribute this software and
-.\" its documentation for any purpose and without fee is hereby
-.\" granted, provided that both the above copyright notice and this
-.\" permission notice appear in all copies, that both the above
-.\" copyright notice and this permission notice appear in all
-.\" supporting documentation, and that the name of M.I.T. not be used
-.\" in advertising or publicity pertaining to distribution of the
-.\" software without specific, written prior permission. M.I.T. makes
-.\" no representations about the suitability of this software for any
-.\" purpose. It is provided "as is" without express or implied
-.\" warranty.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
-.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
-.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
-.\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $ANA: addr2ascii.3,v 1.1 1996/06/13 18:41:46 wollman Exp $
-.\"
-.Dd June 13, 1996
-.Dt ADDR2ASCII 3
-.Os
-.Sh NAME
-.Nm addr2ascii ,
-.Nm ascii2addr
-.Nd Generic address formatting routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <netinet/in.h>
-.Fd #include <arpa/inet.h>
-.Ft "char *"
-.Fn addr2ascii "int af" "const void *addrp" "int len" "char *buf"
-.Ft int
-.Fn ascii2addr "int af" "const char *ascii" "void *result"
-.Sh DESCRIPTION
-The routines
-.Fn addr2ascii
-and
-.Fn ascii2addr
-are used to convert network addresses between binary form and a
-printable form appropriate to the address family. Both functions take
-an
-.Fa af
-argument, specifying the address family to be used in the conversion
-process.
-(Currently, only the
-.Dv AF_INET
-and
-.Dv AF_LINK
-address families are supported.)
-.Pp
-The
-.Fn addr2ascii
-function
-is used to convert binary, network-format addresses into printable
-form. In addition to
-.Fa af ,
-there are three other arguments. The
-.Fa addrp
-argument is a pointer to the network address to be converted.
-The
-.Fa len
-argument is the length of the address. The
-.Fa buf
-argument is an optional pointer to a caller-allocated buffer to hold
-the result; if a null pointer is passed,
-.Fn addr2ascii
-uses a statically-allocated buffer.
-.Pp
-The
-.Fn ascii2addr
-function performs the inverse operation to
-.Fn addr2ascii .
-In addition to
-.Fa af ,
-it takes two parameters,
-.Fa ascii
-and
-.Fa result .
-The
-.Fa ascii
-parameter is a pointer to the string which is to be converted into
-binary. The
-.Fa result
-parameter is a pointer to an appropriate network address structure for
-the specified family.
-.Pp
-The following gives the appropriate structure to use for binary
-addresses in the specified family:
-.Pp
-.Bl -tag -width AF_INETxxxx -compact
-.It Dv AF_INET
-.Li struct in_addr
-.Pq in Aq Pa netinet/in.h
-.It Dv AF_LINK
-.Li struct sockaddr_dl
-.Pq in Aq Pa net/if_dl.h
-.\" .It Dv AF_INET6
-.\" .Li struct in6_addr
-.\" .Pq in Aq Pa netinet6/in6.h
-.El
-.Sh RETURN VALUES
-The
-.Fn addr2ascii
-function returns the address of the buffer it was passed, or a static
-buffer if the a null pointer was passed; on failure, it returns a null
-pointer.
-The
-.Fn ascii2addr
-function returns the length of the binary address in bytes, or -1 on
-failure.
-.Sh EXAMPLES
-The
-.Xr inet 3
-functions
-.Fn inet_ntoa
-and
-.Fn inet_aton
-could be implemented thusly:
-.Bd -literal -offset indent
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-char *
-inet_ntoa(struct in_addr addr)
-{
- return addr2ascii(AF_INET, &addr, sizeof addr, 0);
-}
-
-int
-inet_aton(const char *ascii, struct in_addr *addr)
-{
- return (ascii2addr(AF_INET, ascii, addr)
- == sizeof(*addr));
-}
-.Ed
-.Pp
-In actuality, this cannot be done because
-.Fn addr2ascii
-and
-.Fn ascii2addr
-are implemented in terms of the
-.Xr inet 3
-functions, rather than the other way around.
-.Sh ERRORS
-When a failure is returned,
-.Li errno
-is set to one of the following values:
-.Bl -tag -width [EPROTONOSUPPORT]
-.It Bq Er ENAMETOOLONG
-The
-.Fn addr2ascii
-routine was passed a
-.Fa len
-parameter which was inappropriate for the address family given by
-.Fa af .
-.It Bq Er EPROTONOSUPPORT
-Either routine was passed an
-.Fa af
-parameter other than
-.Dv AF_INET
-or
-.Dv AF_LINK .
-.It Bq Er EINVAL
-The string passed to
-.Fn ascii2addr
-was improperly formatted for address family
-.Fa af .
-.El
-.Sh SEE ALSO
-.Xr inet 3 ,
-.Xr linkaddr 3 ,
-.Xr inet 4
-.Sh HISTORY
-An interface close to this one was originally suggested by Craig
-Partridge. This particular interface originally apppeared in the
-.Tn INRIA
-.Tn IPv6
-implementation.
-.Sh AUTHOR
-Code and documentation by Garrett A. Wollman, MIT Laboratory for
-Computer Science.
-.Sh BUGS
-The original implementations supported IPv6. This support should
-eventually be resurrected. The
-.Tn NRL
-implementation also included support for the
-.Dv AF_ISO
-and
-.Dv AF_NS
-address families.
-.Pp
-The genericity of this interface is somewhat questionable. A truly
-generic interface would provide a means for determining the length of
-the buffer to be used so that it could be dynamically allocated, and
-would always require a
-.Dq Li "struct sockaddr"
-to hold the binary address. Unfortunately, this is incompatible with existing
-practice. This limitation means that a routine for printing network
-addresses from arbitrary address families must still have internal
-knowledge of the maximum buffer length needed and the appropriate part
-of the address to use as the binary address.
diff --git a/lib/libc/net/addr2ascii.c b/lib/libc/net/addr2ascii.c
deleted file mode 100644
index 5bee3ea..0000000
--- a/lib/libc/net/addr2ascii.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 1996 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $ANA: addr2ascii.c,v 1.1 1996/06/13 18:41:46 wollman Exp $
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <string.h>
-
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*-
- * Convert a network address from binary to printable numeric format.
- * This API is copied from INRIA's IPv6 implementation, but it is a
- * bit bogus in two ways:
- *
- * 1) There is no value in passing both an address family and
- * an address length; either one should imply the other,
- * or we should be passing sockaddrs instead.
- * 2) There should by contrast be /added/ a length for the buffer
- * that we pass in, so that programmers are spared the need to
- * manually calculate (read: ``guess'') the maximum length.
- *
- * Flash: the API is also the same in the NRL implementation, and seems to
- * be some sort of standard, so we appear to be stuck with both the bad
- * naming and the poor choice of arguments.
- */
-char *
-addr2ascii(af, addrp, len, buf)
- int af;
- const void *addrp;
- int len; /* should be size_t XXX */
- char *buf; /* XXX should pass length of buffer */
-{
- static char staticbuf[64]; /* 64 for AF_LINK > 16 for AF_INET */
-
- if (!buf)
- buf = staticbuf;
-
- switch(af) {
- case AF_INET:
- if (len != sizeof(struct in_addr)) {
- errno = ENAMETOOLONG;
- return 0;
- }
- strcpy(buf, inet_ntoa(*(const struct in_addr *)addrp));
- break;
-
- case AF_LINK:
- if (len != sizeof(struct sockaddr_dl)) {
- errno = ENAMETOOLONG;
- return 0;
- }
- strcpy(buf, link_ntoa((const struct sockaddr_dl *)addrp));
- break;
-
- default:
- errno = EPROTONOSUPPORT;
- return 0;
- }
- return buf;
-}
diff --git a/lib/libc/net/ascii2addr.c b/lib/libc/net/ascii2addr.c
deleted file mode 100644
index 0b5bab4..0000000
--- a/lib/libc/net/ascii2addr.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 1996 Massachusetts Institute of Technology
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose and without fee is hereby
- * granted, provided that both the above copyright notice and this
- * permission notice appear in all copies, that both the above
- * copyright notice and this permission notice appear in all
- * supporting documentation, and that the name of M.I.T. not be used
- * in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. M.I.T. makes
- * no representations about the suitability of this software for any
- * purpose. It is provided "as is" without express or implied
- * warranty.
- *
- * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS
- * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
- * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $ANA: ascii2addr.c,v 1.2 1996/06/13 18:46:02 wollman Exp $
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <string.h>
-
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-int
-ascii2addr(af, ascii, result)
- int af;
- const char *ascii;
- void *result;
-{
- struct in_addr *ina;
- char strbuf[4*sizeof("123")]; /* long enough for V4 only */
-
- switch(af) {
- case AF_INET:
- ina = result;
- strbuf[0] = '\0';
- strncat(strbuf, ascii, (sizeof strbuf)-1);
- if (inet_aton(strbuf, ina))
- return sizeof(struct in_addr);
- errno = EINVAL;
- break;
-
- case AF_LINK:
- link_addr(ascii, result);
- /* oops... no way to detect failure */
- return sizeof(struct sockaddr_dl);
-
- default:
- errno = EPROTONOSUPPORT;
- break;
- }
-
- return -1;
-}
diff --git a/lib/libc/net/base64.c b/lib/libc/net/base64.c
deleted file mode 100644
index 868826a..0000000
--- a/lib/libc/net/base64.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- */
-
-/*
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <resolv.h>
-#include <stdio.h>
-
-#if defined(BSD) && (BSD >= 199103) && defined(AF_INET6)
-# include <stdlib.h>
-# include <string.h>
-#else
-# include "../conf/portability.h"
-#endif
-
-#define Assert(Cond) if (!(Cond)) abort()
-
-static const char Base64[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-static const char Pad64 = '=';
-
-/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
- The following encoding technique is taken from RFC 1521 by Borenstein
- and Freed. It is reproduced here in a slightly edited form for
- convenience.
-
- A 65-character subset of US-ASCII is used, enabling 6 bits to be
- represented per printable character. (The extra 65th character, "=",
- is used to signify a special processing function.)
-
- The encoding process represents 24-bit groups of input bits as output
- strings of 4 encoded characters. Proceeding from left to right, a
- 24-bit input group is formed by concatenating 3 8-bit input groups.
- These 24 bits are then treated as 4 concatenated 6-bit groups, each
- of which is translated into a single digit in the base64 alphabet.
-
- Each 6-bit group is used as an index into an array of 64 printable
- characters. The character referenced by the index is placed in the
- output string.
-
- Table 1: The Base64 Alphabet
-
- Value Encoding Value Encoding Value Encoding Value Encoding
- 0 A 17 R 34 i 51 z
- 1 B 18 S 35 j 52 0
- 2 C 19 T 36 k 53 1
- 3 D 20 U 37 l 54 2
- 4 E 21 V 38 m 55 3
- 5 F 22 W 39 n 56 4
- 6 G 23 X 40 o 57 5
- 7 H 24 Y 41 p 58 6
- 8 I 25 Z 42 q 59 7
- 9 J 26 a 43 r 60 8
- 10 K 27 b 44 s 61 9
- 11 L 28 c 45 t 62 +
- 12 M 29 d 46 u 63 /
- 13 N 30 e 47 v
- 14 O 31 f 48 w (pad) =
- 15 P 32 g 49 x
- 16 Q 33 h 50 y
-
- Special processing is performed if fewer than 24 bits are available
- at the end of the data being encoded. A full encoding quantum is
- always completed at the end of a quantity. When fewer than 24 input
- bits are available in an input group, zero bits are added (on the
- right) to form an integral number of 6-bit groups. Padding at the
- end of the data is performed using the '=' character.
-
- Since all base64 input is an integral number of octets, only the
- -------------------------------------------------
- following cases can arise:
-
- (1) the final quantum of encoding input is an integral
- multiple of 24 bits; here, the final unit of encoded
- output will be an integral multiple of 4 characters
- with no "=" padding,
- (2) the final quantum of encoding input is exactly 8 bits;
- here, the final unit of encoded output will be two
- characters followed by two "=" padding characters, or
- (3) the final quantum of encoding input is exactly 16 bits;
- here, the final unit of encoded output will be three
- characters followed by one "=" padding character.
- */
-
-int
-b64_ntop(src, srclength, target, targsize)
- u_char const *src;
- size_t srclength;
- char *target;
- size_t targsize;
-{
- size_t datalength = 0;
- u_char input[3];
- u_char output[4];
- int i;
-
- while (2 < srclength) {
- input[0] = *src++;
- input[1] = *src++;
- input[2] = *src++;
- srclength -= 3;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- output[3] = input[2] & 0x3f;
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
- Assert(output[3] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Base64[output[3]];
- }
-
- /* Now we worry about padding. */
- if (0 != srclength) {
- /* Get what's left. */
- input[0] = input[1] = input[2] = '\0';
- for (i = 0; i < srclength; i++)
- input[i] = *src++;
-
- output[0] = input[0] >> 2;
- output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
- output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
- Assert(output[0] < 64);
- Assert(output[1] < 64);
- Assert(output[2] < 64);
-
- if (datalength + 4 > targsize)
- return (-1);
- target[datalength++] = Base64[output[0]];
- target[datalength++] = Base64[output[1]];
- if (srclength == 1)
- target[datalength++] = Pad64;
- else
- target[datalength++] = Base64[output[2]];
- target[datalength++] = Pad64;
- }
- if (datalength >= targsize)
- return (-1);
- target[datalength] = '\0'; /* Returned value doesn't count \0. */
- return (datalength);
-}
-
-/* skips all whitespace anywhere.
- converts characters, four at a time, starting at (or after)
- src from base - 64 numbers into three 8 bit bytes in the target area.
- it returns the number of data bytes stored at the target, or -1 on error.
- */
-
-int
-b64_pton(src, target, targsize)
- char const *src;
- u_char *target;
- size_t targsize;
-{
- int tarindex, state, ch;
- char *pos;
-
- state = 0;
- tarindex = 0;
-
- while ((ch = *src++) != '\0') {
- if (isspace(ch)) /* Skip whitespace anywhere. */
- continue;
-
- if (ch == Pad64)
- break;
-
- pos = strchr(Base64, ch);
- if (pos == 0) /* A non-base64 character. */
- return (-1);
-
- switch (state) {
- case 0:
- if (target) {
- if (tarindex >= targsize)
- return (-1);
- target[tarindex] = (pos - Base64) << 2;
- }
- state = 1;
- break;
- case 1:
- if (target) {
- if (tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 4;
- target[tarindex+1] = ((pos - Base64) & 0x0f)
- << 4 ;
- }
- tarindex++;
- state = 2;
- break;
- case 2:
- if (target) {
- if (tarindex + 1 >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64) >> 2;
- target[tarindex+1] = ((pos - Base64) & 0x03)
- << 6;
- }
- tarindex++;
- state = 3;
- break;
- case 3:
- if (target) {
- if (tarindex >= targsize)
- return (-1);
- target[tarindex] |= (pos - Base64);
- }
- tarindex++;
- state = 0;
- break;
- default:
- abort();
- }
- }
-
- /*
- * We are done decoding Base-64 chars. Let's see if we ended
- * on a byte boundary, and/or with erroneous trailing characters.
- */
-
- if (ch == Pad64) { /* We got a pad char. */
- ch = *src++; /* Skip it, get next. */
- switch (state) {
- case 0: /* Invalid = in first position */
- case 1: /* Invalid = in second position */
- return (-1);
-
- case 2: /* Valid, means one byte of info */
- /* Skip any number of spaces. */
- for (NULL; ch != '\0'; ch = *src++)
- if (!isspace(ch))
- break;
- /* Make sure there is another trailing = sign. */
- if (ch != Pad64)
- return (-1);
- ch = *src++; /* Skip the = */
- /* Fall through to "single trailing =" case. */
- /* FALLTHROUGH */
-
- case 3: /* Valid, means two bytes of info */
- /*
- * We know this char is an =. Is there anything but
- * whitespace after it?
- */
- for (NULL; ch != '\0'; ch = *src++)
- if (!isspace(ch))
- return (-1);
-
- /*
- * Now make sure for cases 2 and 3 that the "extra"
- * bits that slopped past the last full byte were
- * zeros. If we don't check them, they become a
- * subliminal channel.
- */
- if (target && target[tarindex] != 0)
- return (-1);
- }
- } else {
- /*
- * We ended by seeing the end of the string. Make sure we
- * have no partial bytes lying around.
- */
- if (state != 0)
- return (-1);
- }
-
- return (tarindex);
-}
diff --git a/lib/libc/net/byteorder.3 b/lib/libc/net/byteorder.3
deleted file mode 100644
index 666521b..0000000
--- a/lib/libc/net/byteorder.3
+++ /dev/null
@@ -1,76 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)byteorder.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt BYTEORDER 3
-.Os BSD 4.2
-.Sh NAME
-.Nm htonl ,
-.Nm htons ,
-.Nm ntohl ,
-.Nm ntohs
-.Nd convert values between host and network byte order
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Ft u_long
-.Fn htonl "u_long hostlong"
-.Ft u_short
-.Fn htons "u_short hostshort"
-.Ft u_long
-.Fn ntohl "u_long netlong"
-.Ft u_short
-.Fn ntohs "u_short netshort"
-.Sh DESCRIPTION
-These routines convert 16 and 32 bit quantities between network
-byte order and host byte order.
-On machines which have a byte order which is the same as the network
-order, routines are defined as null macros.
-.Pp
-These routines are most often used in conjunction with Internet
-addresses and ports as returned by
-.Xr gethostbyname 3
-and
-.Xr getservent 3 .
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr getservent 3
-.Sh HISTORY
-The
-.Nm byteorder
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-On the
-.Tn VAX
-bytes are handled backwards from most everyone else in
-the world. This is not expected to be fixed in the near future.
diff --git a/lib/libc/net/ether_addr.c b/lib/libc/net/ether_addr.c
deleted file mode 100644
index 9b7a9ab..0000000
--- a/lib/libc/net/ether_addr.c
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 1995
- * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Bill Paul.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * ethernet address conversion and lookup routines
- *
- * Written by Bill Paul <wpaul@ctr.columbia.edu>
- * Center for Telecommunications Research
- * Columbia University, New York City
- *
- * $Id$
- */
-
-
-#include <stdio.h>
-#include <paths.h>
-#include <sys/types.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/ethernet.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#ifndef _PATH_ETHERS
-#define _PATH_ETHERS "/etc/ethers"
-#endif
-
-/*
- * Parse a string of text containing an ethernet address and hostname
- * and separate it into its component parts.
- */
-int ether_line(l, e, hostname)
- char *l;
- struct ether_addr *e;
- char *hostname;
-{
- int i, o[6];
-
- i = sscanf(l, "%x:%x:%x:%x:%x:%x %s", &o[0], &o[1], &o[2],
- &o[3], &o[4], &o[5],
- hostname);
- if (i != 7)
- return (i);
-
- for (i=0; i<6; i++)
- e->octet[i] = o[i];
- return (0);
-}
-
-/*
- * Convert an ASCII representation of an ethernet address to
- * binary form.
- */
-struct ether_addr *ether_aton(a)
- char *a;
-{
- int i;
- static struct ether_addr o;
- unsigned int o0, o1, o2, o3, o4, o5;
-
- i = sscanf(a, "%x:%x:%x:%x:%x:%x", &o0, &o1, &o2, &o3, &o4, &o5);
-
- if (i != 6)
- return (NULL);
-
- o.octet[0]=o0;
- o.octet[1]=o1;
- o.octet[2]=o2;
- o.octet[3]=o3;
- o.octet[4]=o4;
- o.octet[5]=o5;
-
- return ((struct ether_addr *)&o);
-}
-
-/*
- * Convert a binary representation of an ethernet address to
- * an ASCII string.
- */
-char *ether_ntoa(n)
- struct ether_addr *n;
-{
- int i;
- static char a[18];
-
- i = sprintf(a,"%x:%x:%x:%x:%x:%x",n->octet[0],n->octet[1],n->octet[2],
- n->octet[3],n->octet[4],n->octet[5]);
- if (i < 11)
- return (NULL);
- return ((char *)&a);
-}
-
-/*
- * Map an ethernet address to a hostname. Use either /etc/ethers or
- * NIS/YP.
- */
-
-int ether_ntohost(hostname, e)
- char *hostname;
- struct ether_addr *e;
-{
- FILE *fp;
- char buf[BUFSIZ + 2];
- struct ether_addr local_ether;
- char local_host[MAXHOSTNAMELEN];
-#ifdef YP
- char *result;
- int resultlen;
- char *ether_a;
- char *yp_domain;
-#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
- return (1);
-
- while (fgets(buf,BUFSIZ,fp)) {
- if (buf[0] == '#')
- continue;
-#ifdef YP
- if (buf[0] == '+') {
- if (yp_get_default_domain(&yp_domain))
- continue;
- ether_a = ether_ntoa(e);
- if (yp_match(yp_domain, "ethers.byaddr", ether_a,
- strlen(ether_a), &result, &resultlen)) {
- continue;
- }
- strncpy(buf, result, resultlen);
- buf[resultlen] = '\0';
- free(result);
- }
-#endif
- if (!ether_line(buf, &local_ether, local_host)) {
- if (!bcmp((char *)&local_ether.octet[0],
- (char *)&e->octet[0], 6)) {
- /* We have a match */
- strcpy(hostname, local_host);
- fclose(fp);
- return(0);
- }
- }
- }
- fclose(fp);
- return (1);
-}
-
-/*
- * Map a hostname to an ethernet address using /etc/ethers or
- * NIS/YP.
- */
-int ether_hostton(hostname, e)
- char *hostname;
- struct ether_addr *e;
-{
- FILE *fp;
- char buf[BUFSIZ + 2];
- struct ether_addr local_ether;
- char local_host[MAXHOSTNAMELEN];
-#ifdef YP
- char *result;
- int resultlen;
- char *yp_domain;
-#endif
- if ((fp = fopen(_PATH_ETHERS, "r")) == NULL)
- return (1);
-
- while (fgets(buf,BUFSIZ,fp)) {
- if (buf[0] == '#')
- continue;
-#ifdef YP
- if (buf[0] == '+') {
- if (yp_get_default_domain(&yp_domain))
- continue;
- if (yp_match(yp_domain, "ethers.byname", hostname,
- strlen(hostname), &result, &resultlen)) {
- continue;
- }
- strncpy(buf, result, resultlen);
- buf[resultlen] = '\0';
- free(result);
- }
-#endif
- if (!ether_line(buf, &local_ether, local_host)) {
- if (!strcmp(hostname, local_host)) {
- /* We have a match */
- bcopy((char *)&local_ether.octet[0],
- (char *)&e->octet[0], 6);
- fclose(fp);
- return(0);
- }
- }
- }
- fclose(fp);
- return (1);
-}
diff --git a/lib/libc/net/ethers.3 b/lib/libc/net/ethers.3
deleted file mode 100644
index afea483..0000000
--- a/lib/libc/net/ethers.3
+++ /dev/null
@@ -1,193 +0,0 @@
-.\" Copyright (c) 1995
-.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Bill Paul.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id$
-.\"
-.Dd April 12, 1995
-.Dt ETHERS 3
-.Os FreeBSD 2.1
-.Sh NAME
-.Nm ethers ,
-.Nm ether_line ,
-.Nm ether_aton ,
-.Nm ether_ntoa ,
-.Nm ether_ntohost ,
-.Nm ether_hostton
-.Nd Ethernet address conversion and lookup routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <net/ethernet.h>
-.Ft int
-.Fn ether_line "char *l" "struct ether_addr *e" "char *hostname"
-.Ft struct ether_addr *
-.Fn ether_aton "char *a"
-.Ft char *
-.Fn ether_ntoa "struct ether_addr *n"
-.Ft int
-.Fn ether_ntohost "char *hostname" "struct ether_addr *e"
-.Ft int
-.Fn ether_hostton "char *hostname" "struct ether_addr *e"
-.Sh DESCRIPTION
-These functions operate on ethernet addresses using an
-.Ar ether_addr
-structure, which is defined in the header file
-.Aq Pa netinet/if_ether.h :
-.Bd -literal -offset indent
-/*
- * The number of bytes in an ethernet (MAC) address.
- */
-#define ETHER_ADDR_LEN 6
-
-/*
- * Structure of a 48-bit Ethernet address.
- */
-struct ether_addr {
- u_char octet[ETHER_ADDR_LEN];
-};
-.Ed
-.Pp
-The function
-.Fn ether_line
-scans
-.Ar l ,
-an
-.Tn ASCII
-string in
-.Xr ethers 5
-format and sets
-.Ar e
-to the ethernet address specified in the string and
-.Ar h
-to the hostname. This function is used to parse lines from
-.Pa /etc/ethers
-into their component parts.
-.Pp
-The
-.Fn ether_aton
-function converts an
-.Tn ASCII
-representation of an ethernet address into an
-.Ar ether_addr
-structure. Likewise,
-.Fn ether_ntoa
-converts an ethernet address specified as an
-.Ar ether_addr
-structure into an
-.Tn ASCII
-string.
-.Pp
-The
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions map ethernet addresses to their corresponding hostnames
-as specified in the
-.Pa /etc/ethers
-database.
-.Fn ether_ntohost
-converts from ethernet address to hostname, and
-.Fn ether_hostton
-converts from hostname to ethernet address.
-.Sh RETURN VALUES
-.Fn ether_line
-returns zero on success and non-zero if it was unable to parse
-any part of the supplied line
-.Ar l .
-It returns the extracted ethernet address in the supplied
-.Ar ether_addr
-structure
-.Ar e
-and the hostname in the supplied string
-.Ar h .
-.Pp
-On success,
-.Fn ether_ntoa
-returns a pointer to a string containing an
-.Tn ASCII
-representation of an ethernet address. If it is unable to convert
-the supplied
-.Ar ether_addr
-structure, it returns a
-.Dv NULL
-pointer. Likewise,
-.Fn ether_aton
-returns a pointer to an
-.Ar ether_addr
-structure on success and a
-.Dv NULL
-pointer on failure.
-.Pp
-The
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions both return zero on success or non-zero if they were
-unable to find a match in the
-.Pa /etc/ethers
-database.
-.Sh NOTES
-The user must insure that the hostname strings passed to the
-the
-.Fn ether_line ,
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions are large enough to contain the returned hostnames.
-.Sh NIS INTERACTION
-If the
-.Pa /etc/ethers
-contains a line with a single + in it, the
-.Fn ether_ntohost
-and
-.Fn ether_hostton
-functions will attempt to consult the NIS
-.Pa ethers.byname
-and
-.Pa ethers.byaddr
-maps in addition to the data in the
-.Pa /etc/ethers
-file.
-.Sh SEE ALSO
-.Xr yp 4 ,
-.Xr ethers 5
-.Sh BUGS
-.Pp
-The
-.Fn ether_aton
-and
-.Fn ether_ntoa
-functions returns values that are stored in static memory areas
-which may be overwritten the next time they are called.
-.Sh HISTORY
-This particular implementation of the
-.Nm ethers
-library functions were written for and first appeared in
-.Fx 2.1 .
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
deleted file mode 100644
index 4d13e2e..0000000
--- a/lib/libc/net/gethostbydns.c
+++ /dev/null
@@ -1,736 +0,0 @@
-/*
- * ++Copyright++ 1985, 1988, 1993
- * -
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char fromrcsid[] = "From: Id: gethnamaddr.c,v 8.21 1997/06/01 20:34:37 vixie Exp";
-static char rcsid[] = "$Id: gethostbydns.c,v 1.21 1997/03/12 11:02:00 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <syslog.h>
-
-#include "res_config.h"
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-static const char AskedForGot[] =
- "gethostby*.gethostanswer: asked for \"%s\", got \"%s\"";
-
-static char *h_addr_ptrs[MAXADDRS + 1];
-
-static struct hostent host;
-static char *host_aliases[MAXALIASES];
-static char hostbuf[8*1024];
-static u_char host_addr[16]; /* IPv4 or IPv6 */
-
-#ifdef RESOLVSORT
-static void addrsort __P((char **, int));
-#endif
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-typedef union {
- int32_t al;
- char ac;
-} align;
-
-extern int h_errno;
-int _dns_ttl_;
-
-#ifdef DEBUG
-static void
-dprintf(msg, num)
- char *msg;
- int num;
-{
- if (_res.options & RES_DEBUG) {
- int save = errno;
-
- printf(msg, num);
- errno = save;
- }
-}
-#else
-# define dprintf(msg, num) /*nada*/
-#endif
-
-static struct hostent *
-gethostanswer(answer, anslen, qname, qtype)
- const querybuf *answer;
- int anslen;
- const char *qname;
- int qtype;
-{
- register const HEADER *hp;
- register const u_char *cp;
- register int n;
- const u_char *eom;
- char *bp, **ap, **hap;
- int type, class, buflen, ancount, qdcount;
- int haveanswer, had_error;
- int toobig = 0;
- char tbuf[MAXDNAME];
- const char *tname;
- int (*name_ok) __P((const char *));
-
- tname = qname;
- host.h_name = NULL;
- eom = answer->buf + anslen;
- switch (qtype) {
- case T_A:
- case T_AAAA:
- name_ok = res_hnok;
- break;
- case T_PTR:
- name_ok = res_dnok;
- break;
- default:
- h_errno = NO_RECOVERY;
- return (NULL); /* XXX should be abort(); */
- }
- /*
- * find first satisfactory answer
- */
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount);
- qdcount = ntohs(hp->qdcount);
- bp = hostbuf;
- buflen = sizeof hostbuf;
- cp = answer->buf + HFIXEDSZ;
- if (qdcount != 1) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- cp += n + QFIXEDSZ;
- if (qtype == T_A || qtype == T_AAAA) {
- /* res_send() has already verified that the query name is the
- * same as the one we sent; this just gets the expanded name
- * (i.e., with the succeeding search-domain tacked on).
- */
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- h_errno = NO_RECOVERY;
- return (NULL);
- }
- host.h_name = bp;
- bp += n;
- buflen -= n;
- /* The qname can be abbreviated, but h_name is now absolute. */
- qname = host.h_name;
- }
- ap = host_aliases;
- *ap = NULL;
- host.h_aliases = host_aliases;
- hap = h_addr_ptrs;
- *hap = NULL;
- host.h_addr_list = h_addr_ptrs;
- haveanswer = 0;
- had_error = 0;
- _dns_ttl_ = -1;
- while (ancount-- > 0 && cp < eom && !had_error) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !(*name_ok)(bp)) {
- had_error++;
- continue;
- }
- cp += n; /* name */
- type = _getshort(cp);
- cp += INT16SZ; /* type */
- class = _getshort(cp);
- cp += INT16SZ; /* class */
- if (qtype == T_A && type == T_A)
- _dns_ttl_ = _getlong(cp);
- cp += INT32SZ; /* TTL */
- n = _getshort(cp);
- cp += INT16SZ; /* len */
- if (class != C_IN) {
- /* XXX - debug? syslog? */
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if ((qtype == T_A || qtype == T_AAAA) && type == T_CNAME) {
- if (ap >= &host_aliases[MAXALIASES-1])
- continue;
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if ((n < 0) || !(*name_ok)(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- /* Store alias. */
- *ap++ = bp;
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- bp += n;
- buflen -= n;
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- host.h_name = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (qtype == T_PTR && type == T_CNAME) {
- n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf);
- if (n < 0 || !res_dnok(tbuf)) {
- had_error++;
- continue;
- }
- cp += n;
- /* Get canonical name. */
- n = strlen(tbuf) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN) {
- had_error++;
- continue;
- }
- strcpy(bp, tbuf);
- tname = bp;
- bp += n;
- buflen -= n;
- continue;
- }
- if (type != qtype) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostby*.gethostanswer: asked for \"%s %s %s\", got type \"%s\"",
- qname, p_class(C_IN), p_type(qtype),
- p_type(type));
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- switch (type) {
- case T_PTR:
- if (strcasecmp(tname, bp) != 0) {
- syslog(LOG_NOTICE|LOG_AUTH,
- AskedForGot, qname, bp);
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_hnok(bp)) {
- had_error++;
- break;
- }
-#if MULTI_PTRS_ARE_ALIASES
- cp += n;
- if (!haveanswer)
- host.h_name = bp;
- else if (ap < &host_aliases[MAXALIASES-1])
- *ap++ = bp;
- else
- n = -1;
- if (n != -1) {
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- break;
- }
- bp += n;
- buflen -= n;
- }
- break;
-#else
- host.h_name = bp;
- if (_res.options & RES_USE_INET6) {
- n = strlen(bp) + 1; /* for the \0 */
- if (n >= MAXHOSTNAMELEN) {
- had_error++;
- break;
- }
- bp += n;
- buflen -= n;
- _map_v4v6_hostent(&host, &bp, &buflen);
- }
- h_errno = NETDB_SUCCESS;
- return (&host);
-#endif
- case T_A:
- case T_AAAA:
- if (strcasecmp(host.h_name, bp) != 0) {
- syslog(LOG_NOTICE|LOG_AUTH,
- AskedForGot, host.h_name, bp);
- cp += n;
- continue; /* XXX - had_error++ ? */
- }
- if (n != host.h_length) {
- cp += n;
- continue;
- }
- if (!haveanswer) {
- register int nn;
-
- host.h_name = bp;
- nn = strlen(bp) + 1; /* for the \0 */
- bp += nn;
- buflen -= nn;
- }
-
- bp += sizeof(align) - ((u_long)bp % sizeof(align));
-
- if (bp + n >= &hostbuf[sizeof hostbuf]) {
- dprintf("size (%d) too big\n", n);
- had_error++;
- continue;
- }
- if (hap >= &h_addr_ptrs[MAXADDRS-1]) {
- if (!toobig++)
- dprintf("Too many addresses (%d)\n",
- MAXADDRS);
- cp += n;
- continue;
- }
- bcopy(cp, *hap++ = bp, n);
- bp += n;
- buflen -= n;
- cp += n;
- break;
- default:
- dprintf("Impossible condition (type=%d)\n", type);
- h_errno = NO_RECOVERY;
- return (NULL);
- /* BIND has abort() here, too risky on bad data */
- }
- if (!had_error)
- haveanswer++;
- }
- if (haveanswer) {
- *ap = NULL;
- *hap = NULL;
-# if defined(RESOLVSORT)
- /*
- * Note: we sort even if host can take only one address
- * in its return structures - should give it the "best"
- * address in that case, not some random one
- */
- if (_res.nsort && haveanswer > 1 && qtype == T_A)
- addrsort(h_addr_ptrs, haveanswer);
-# endif /*RESOLVSORT*/
- if (!host.h_name) {
- n = strlen(qname) + 1; /* for the \0 */
- if (n > buflen || n >= MAXHOSTNAMELEN)
- goto no_recovery;
- strcpy(bp, qname);
- host.h_name = bp;
- bp += n;
- buflen -= n;
- }
- if (_res.options & RES_USE_INET6)
- _map_v4v6_hostent(&host, &bp, &buflen);
- h_errno = NETDB_SUCCESS;
- return (&host);
- }
- no_recovery:
- h_errno = NO_RECOVERY;
- return (NULL);
-}
-
-struct hostent *
-__dns_getanswer(answer, anslen, qname, qtype)
- const char *answer;
- int anslen;
- const char *qname;
- int qtype;
-{
- switch(qtype) {
- case T_AAAA:
- host.h_addrtype = AF_INET6;
- host.h_length = IN6ADDRSZ;
- break;
- case T_A:
- default:
- host.h_addrtype = AF_INET;
- host.h_length = INADDRSZ;
- break;
- }
-
- return(gethostanswer((const querybuf *)answer, anslen, qname, qtype));
-}
-
-struct hostent *
-_gethostbydnsname(name, af)
- const char *name;
- int af;
-{
- querybuf buf;
- register const char *cp;
- char *bp;
- int n, size, type, len;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
-
- switch (af) {
- case AF_INET:
- size = INADDRSZ;
- type = T_A;
- break;
- case AF_INET6:
- size = IN6ADDRSZ;
- type = T_AAAA;
- break;
- default:
- h_errno = NETDB_INTERNAL;
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-
- host.h_addrtype = af;
- host.h_length = size;
-
- /*
- * if there aren't any dots, it could be a user-level alias.
- * this is also done in res_query() since we are not the only
- * function that looks up host names.
- */
- if (!strchr(name, '.') && (cp = __hostalias(name)))
- name = cp;
-
- /*
- * disallow names consisting only of digits/dots, unless
- * they end in a dot.
- */
- if (isdigit(name[0]))
- for (cp = name;; ++cp) {
- if (!*cp) {
- if (*--cp == '.')
- break;
- /*
- * All-numeric, no dot at the end.
- * Fake up a hostent as if we'd actually
- * done a lookup.
- */
- if (inet_pton(af, name, host_addr) <= 0) {
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- strncpy(hostbuf, name, MAXDNAME);
- hostbuf[MAXDNAME] = '\0';
- bp = hostbuf + MAXDNAME;
- len = sizeof hostbuf - MAXDNAME;
- host.h_name = hostbuf;
- host.h_aliases = host_aliases;
- host_aliases[0] = NULL;
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- if (_res.options & RES_USE_INET6)
- _map_v4v6_hostent(&host, &bp, &len);
- h_errno = NETDB_SUCCESS;
- return (&host);
- }
- if (!isdigit(*cp) && *cp != '.')
- break;
- }
- if ((isxdigit(name[0]) && strchr(name, ':') != NULL) ||
- name[0] == ':')
- for (cp = name;; ++cp) {
- if (!*cp) {
- if (*--cp == '.')
- break;
- /*
- * All-IPv6-legal, no dot at the end.
- * Fake up a hostent as if we'd actually
- * done a lookup.
- */
- if (inet_pton(af, name, host_addr) <= 0) {
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- strncpy(hostbuf, name, MAXDNAME);
- hostbuf[MAXDNAME] = '\0';
- bp = hostbuf + MAXDNAME;
- len = sizeof hostbuf - MAXDNAME;
- host.h_name = hostbuf;
- host.h_aliases = host_aliases;
- host_aliases[0] = NULL;
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- h_errno = NETDB_SUCCESS;
- return (&host);
- }
- if (!isxdigit(*cp) && *cp != ':' && *cp != '.')
- break;
- }
-
- if ((n = res_search(name, C_IN, type, buf.buf, sizeof(buf))) < 0) {
- dprintf("res_search failed (%d)\n", n);
- return (NULL);
- }
- return (gethostanswer(&buf, n, name, type));
-}
-
-struct hostent *
-_gethostbydnsaddr(addr, len, af)
- const char *addr; /* XXX should have been def'd as u_char! */
- int len, af;
-{
- const u_char *uaddr = (const u_char *)addr;
- static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
- static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 };
- int n, size;
- querybuf buf;
- register struct hostent *hp;
- char qbuf[MAXDNAME+1], *qp;
-#ifdef SUNSECURITY
- register struct hostent *rhp;
- char **haddr;
- u_long old_options;
- char hname2[MAXDNAME+1];
-#endif /*SUNSECURITY*/
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- if (af == AF_INET6 && len == IN6ADDRSZ &&
- (!bcmp(uaddr, mapped, sizeof mapped) ||
- !bcmp(uaddr, tunnelled, sizeof tunnelled))) {
- /* Unmap. */
- addr += sizeof mapped;
- uaddr += sizeof mapped;
- af = AF_INET;
- len = INADDRSZ;
- }
- switch (af) {
- case AF_INET:
- size = INADDRSZ;
- break;
- case AF_INET6:
- size = IN6ADDRSZ;
- break;
- default:
- errno = EAFNOSUPPORT;
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- if (size != len) {
- errno = EINVAL;
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- switch (af) {
- case AF_INET:
- (void) sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa",
- (uaddr[3] & 0xff),
- (uaddr[2] & 0xff),
- (uaddr[1] & 0xff),
- (uaddr[0] & 0xff));
- break;
- case AF_INET6:
- qp = qbuf;
- for (n = IN6ADDRSZ - 1; n >= 0; n--) {
- qp += SPRINTF((qp, "%x.%x.",
- uaddr[n] & 0xf,
- (uaddr[n] >> 4) & 0xf));
- }
- strcpy(qp, "ip6.int");
- break;
- default:
- abort();
- }
- n = res_query(qbuf, C_IN, T_PTR, (u_char *)buf.buf, sizeof buf.buf);
- if (n < 0) {
- dprintf("res_query failed (%d)\n", n);
- return (NULL);
- }
- if (!(hp = gethostanswer(&buf, n, qbuf, T_PTR)))
- return (NULL); /* h_errno was set by gethostanswer() */
-#ifdef SUNSECURITY
- if (af == AF_INET) {
- /*
- * turn off search as the name should be absolute,
- * 'localhost' should be matched by defnames
- */
- strncpy(hname2, hp->h_name, MAXDNAME);
- hname2[MAXDNAME] = '\0';
- old_options = _res.options;
- _res.options &= ~RES_DNSRCH;
- _res.options |= RES_DEFNAMES;
- if (!(rhp = gethostbyname(hname2))) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostbyaddr: No A record for %s (verifying [%s])",
- hname2, inet_ntoa(*((struct in_addr *)addr)));
- _res.options = old_options;
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- _res.options = old_options;
- for (haddr = rhp->h_addr_list; *haddr; haddr++)
- if (!memcmp(*haddr, addr, INADDRSZ))
- break;
- if (!*haddr) {
- syslog(LOG_NOTICE|LOG_AUTH,
- "gethostbyaddr: A record of %s != PTR record [%s]",
- hname2, inet_ntoa(*((struct in_addr *)addr)));
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- }
-#endif /*SUNSECURITY*/
- hp->h_addrtype = af;
- hp->h_length = len;
- bcopy(addr, host_addr, len);
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- if (af == AF_INET && (_res.options & RES_USE_INET6)) {
- _map_v4v6_address((char*)host_addr, (char*)host_addr);
- hp->h_addrtype = AF_INET6;
- hp->h_length = IN6ADDRSZ;
- }
- h_errno = NETDB_SUCCESS;
- return (hp);
-}
-
-#ifdef RESOLVSORT
-static void
-addrsort(ap, num)
- char **ap;
- int num;
-{
- int i, j;
- char **p;
- short aval[MAXADDRS];
- int needsort = 0;
-
- p = ap;
- for (i = 0; i < num; i++, p++) {
- for (j = 0 ; (unsigned)j < _res.nsort; j++)
- if (_res.sort_list[j].addr.s_addr ==
- (((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
- break;
- aval[i] = j;
- if (needsort == 0 && i > 0 && j < aval[i-1])
- needsort = i;
- }
- if (!needsort)
- return;
-
- while (needsort < num) {
- for (j = needsort - 1; j >= 0; j--) {
- if (aval[j] > aval[j+1]) {
- char *hp;
-
- i = aval[j];
- aval[j] = aval[j+1];
- aval[j+1] = i;
-
- hp = ap[j];
- ap[j] = ap[j+1];
- ap[j+1] = hp;
-
- } else
- break;
- }
- needsort++;
- }
-}
-#endif
-void
-_sethostdnsent(stayopen)
- int stayopen;
-{
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
- return;
- if (stayopen)
- _res.options |= RES_STAYOPEN | RES_USEVC;
-}
-
-void
-_endhostdnsent()
-{
- _res.options &= ~(RES_STAYOPEN | RES_USEVC);
- res_close();
-}
diff --git a/lib/libc/net/gethostbyht.c b/lib/libc/net/gethostbyht.c
deleted file mode 100644
index cf12f57..0000000
--- a/lib/libc/net/gethostbyht.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/*-
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id: gethostbyht.c,v 1.9 1997/02/22 15:00:07 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/nameser.h> /* XXX */
-#include <resolv.h> /* XXX */
-
-#define MAXALIASES 35
-
-static struct hostent host;
-static char *host_aliases[MAXALIASES];
-static char hostbuf[BUFSIZ+1];
-static FILE *hostf = NULL;
-static u_char host_addr[16]; /* IPv4 or IPv6 */
-static char *h_addr_ptrs[2];
-static int stayopen = 0;
-
-void
-_sethosthtent(f)
- int f;
-{
- if (!hostf)
- hostf = fopen(_PATH_HOSTS, "r" );
- else
- rewind(hostf);
- stayopen = f;
-}
-
-void
-_endhosthtent()
-{
- if (hostf && !stayopen) {
- (void) fclose(hostf);
- hostf = NULL;
- }
-}
-
-struct hostent *
-gethostent()
-{
- char *p;
- register char *cp, **q;
- int af, len;
-
- if (!hostf && !(hostf = fopen(_PATH_HOSTS, "r" ))) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- again:
- if (!(p = fgets(hostbuf, sizeof hostbuf, hostf))) {
- h_errno = HOST_NOT_FOUND;
- return (NULL);
- }
- if (*p == '#')
- goto again;
- if (!(cp = strpbrk(p, "#\n")))
- goto again;
- *cp = '\0';
- if (!(cp = strpbrk(p, " \t")))
- goto again;
- *cp++ = '\0';
- if (inet_pton(AF_INET6, p, host_addr) > 0) {
- af = AF_INET6;
- len = IN6ADDRSZ;
- } else if (inet_pton(AF_INET, p, host_addr) > 0) {
- if (_res.options & RES_USE_INET6) {
- _map_v4v6_address((char*)host_addr, (char*)host_addr);
- af = AF_INET6;
- len = IN6ADDRSZ;
- } else {
- af = AF_INET;
- len = INADDRSZ;
- }
- } else {
- goto again;
- }
- h_addr_ptrs[0] = (char *)host_addr;
- h_addr_ptrs[1] = NULL;
- host.h_addr_list = h_addr_ptrs;
- host.h_length = len;
- host.h_addrtype = af;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- host.h_name = cp;
- q = host.h_aliases = host_aliases;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- if ((cp = strpbrk(cp, " \t")) != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- h_errno = NETDB_SUCCESS;
- return (&host);
-}
-
-struct hostent *
-_gethostbyhtname(name, af)
- const char *name;
- int af;
-{
- register struct hostent *p;
- register char **cp;
-
- sethostent(0);
- while ((p = gethostent()) != NULL) {
- if (p->h_addrtype != af)
- continue;
- if (strcasecmp(p->h_name, name) == 0)
- break;
- for (cp = p->h_aliases; *cp != 0; cp++)
- if (strcasecmp(*cp, name) == 0)
- goto found;
- }
-found:
- endhostent();
- return (p);
-}
-
-struct hostent *
-_gethostbyhtaddr(addr, len, af)
- const char *addr;
- int len, af;
-{
- register struct hostent *p;
-
- sethostent(0);
- while ((p = gethostent()) != NULL)
- if (p->h_addrtype == af && !bcmp(p->h_addr, addr, len))
- break;
- endhostent();
- return (p);
-}
diff --git a/lib/libc/net/gethostbyname.3 b/lib/libc/net/gethostbyname.3
deleted file mode 100644
index e520e33..0000000
--- a/lib/libc/net/gethostbyname.3
+++ /dev/null
@@ -1,305 +0,0 @@
-.\" Copyright (c) 1983, 1987, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
-.\" $Id$
-.\"
-.Dd May 25, 1995
-.Dt GETHOSTBYNAME 3
-.Os BSD 4.2
-.Sh NAME
-.Nm gethostbyname ,
-.Nm gethostbyname2 ,
-.Nm gethostbyaddr ,
-.Nm gethostent ,
-.Nm sethostent ,
-.Nm endhostent ,
-.Nm herror ,
-.Nm hstrerror
-.Nd get network host entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Fd extern int h_errno;
-.Ft struct hostent *
-.Fn gethostbyname "const char *name"
-.Ft struct hostent *
-.Fn gethostbyname2 "const char *name" "int af"
-.Ft struct hostent *
-.Fn gethostbyaddr "const char *addr" "int len" "int type"
-.Ft struct hostent *
-.Fn gethostent void
-.Ft void
-.Fn sethostent "int stayopen"
-.Ft void
-.Fn endhostent void
-.Ft void
-.Fn herror "const char *string"
-.Ft const char *
-.Fn hstrerror "int err"
-.Sh DESCRIPTION
-The
-.Fn gethostbyname ,
-.Fn gethostbyname2
-and
-.Fn gethostbyaddr
-functions
-each return a pointer to an object with the
-following structure describing an internet host
-referenced by name or by address, respectively.
-This structure contains either the information obtained from the name server,
-.Xr named 8 ,
-or broken-out fields from a line in
-.Pa /etc/hosts .
-If the local name server is not running these routines do a lookup in
-.Pa /etc/hosts .
-.Bd -literal
-struct hostent {
- char *h_name; /* official name of host */
- char **h_aliases; /* alias list */
- int h_addrtype; /* host address type */
- int h_length; /* length of address */
- char **h_addr_list; /* list of addresses from name server */
-};
-#define h_addr h_addr_list[0] /* address, for backward compatibility */
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width h_addr_list
-.It Fa h_name
-Official name of the host.
-.It Fa h_aliases
-A NULL-terminated array of alternate names for the host.
-.It Fa h_addrtype
-The type of address being returned; usually
-.Dv AF_INET .
-.It Fa h_length
-The length, in bytes, of the address.
-.It Fa h_addr_list
-A NULL-terminated array of network addresses for the host.
-Host addresses are returned in network byte order.
-.It Fa h_addr
-The first address in
-.Fa h_addr_list ;
-this is for backward compatibility.
-.El
-.Pp
-When using the nameserver,
-.Fn gethostbyname
-and
-.Fn gethostbyname
-will search for the named host in the current domain and its parents
-unless the name ends in a dot.
-If the name contains no dot, and if the environment variable
-.Dq Ev HOSTALIASES
-contains the name of an alias file, the alias file will first be searched
-for an alias matching the input name.
-See
-.Xr hostname 7
-for the domain search procedure and the alias file format.
-.Pp
-The
-.Fn gethostbyname2
-function is an evolution of
-.Fn gethostbyname
-which is intended to allow lookups in address families other than
-.Dv AF_INET ,
-for example
-.Dv AF_INET6 .
-Currently the
-.Fa af
-argument must be specified as
-.Dv AF_INET
-else the fuction will return
-.Dv NULL
-after having set
-.Va h_errno
-to
-.Dv NETDB_INTERNAL
-.Pp
-The
-.Fn sethostent
-function
-may be used to request the use of a connected
-.Tn TCP
-socket for queries.
-If the
-.Fa stayopen
-flag is non-zero,
-this sets the option to send all queries to the name server using
-.Tn TCP
-and to retain the connection after each call to
-.Fn gethostbyname ,
-.Fn gethostbyname2
-or
-.Fn gethostbyaddr .
-Otherwise, queries are performed using
-.Tn UDP
-datagrams.
-.Pp
-The
-.Fn endhostent
-function
-closes the
-.Tn TCP
-connection.
-.Pp
-The
-.Fn herror
-function writes a message to the diagnostic output consisting of the
-string parameter
-.Fa s ,
-the constant string ": ", and a message corresponding to the value of
-.Va h_errno .
-.Pp
-The
-.Fn hstrerror
-function returns a string which is the message text corresponding to the
-value of the
-.Fa err
-parameter.
-.Sh FILES
-.Bl -tag -width /etc/resolv.conf -compact
-.It Pa /etc/hosts
-.It Pa /etc/host.conf
-.It Pa /etc/resolv.conf
-.El
-.Sh DIAGNOSTICS
-Error return status from
-.Fn gethostbyname ,
-.Fn gethostbyname2
-and
-.Fn gethostbyaddr
-is indicated by return of a null pointer.
-The external integer
-.Va h_errno
-may then be checked to see whether this is a temporary failure
-or an invalid or unknown host.
-The routine
-.Fn herror
-can be used to print an error message describing the failure.
-If its argument
-.Fa string
-is
-.Pf non Dv -NULL ,
-it is printed, followed by a colon and a space.
-The error message is printed with a trailing newline.
-.Pp
-The variable
-.Va h_errno
-can have the following values:
-.Bl -tag -width HOST_NOT_FOUND
-.It Dv HOST_NOT_FOUND
-No such host is known.
-.It Dv TRY_AGAIN
-This is usually a temporary error
-and means that the local server did not receive
-a response from an authoritative server.
-A retry at some later time may succeed.
-.It Dv NO_RECOVERY
-Some unexpected server failure was encountered.
-This is a non-recoverable error.
-.It Dv NO_DATA
-The requested name is valid but does not have an IP address;
-this is not a temporary error.
-This means that the name is known to the name server but there is no address
-associated with this name.
-Another type of request to the name server using this domain name
-will result in an answer;
-for example, a mail-forwarder may be registered for this domain.
-.El
-.Sh SEE ALSO
-.Xr resolver 3 ,
-.Xr hosts 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Sh CAVEAT
-The
-.Fn gethostent
-function
-is defined, and
-.Fn sethostent
-and
-.Fn endhostent
-are redefined,
-when
-.Xr libc 3
-is built to use only the routines to lookup in
-.Pa /etc/hosts
-and not the name server.
-.Pp
-The
-.Fn gethostent
-function
-reads the next line of
-.Pa /etc/hosts ,
-opening the file if necessary.
-.Pp
-The
-.Fn sethostent
-function
-opens and/or rewinds the file
-.Pa /etc/hosts .
-If the
-.Fa stayopen
-argument is non-zero,
-the file will not be closed after each call to
-.Fn gethostbyname ,
-.Fn gethostbyname2
-or
-.Fn gethostbyaddr .
-.Pp
-The
-.Fn endhostent
-function
-closes the file.
-.Sh HISTORY
-The
-.Fn herror
-function appeared in
-.Bx 4.3 .
-The
-.Fn endhostent ,
-.Fn gethostbyaddr ,
-.Fn gethostbyname ,
-.Fn gethostent ,
-and
-.Fn sethostent
-functions appeared in
-.Bx 4.2 .
-The
-.Fn gethostbyname2
-function first appeared in bind-4.9.4.
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Only the Internet
-address format is currently understood.
diff --git a/lib/libc/net/gethostbynis.c b/lib/libc/net/gethostbynis.c
deleted file mode 100644
index 45dbe5a..0000000
--- a/lib/libc/net/gethostbynis.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id$";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-#ifdef YP
-static char *host_aliases[MAXALIASES];
-static char hostaddr[MAXADDRS];
-static char *host_addrs[2];
-#endif /* YP */
-
-static struct hostent *
-_gethostbynis(name, map, af)
- const char *name;
- char *map;
- int af;
-{
-#ifdef YP
- register char *cp, **q;
- char *result;
- int resultlen;
- static struct hostent h;
- static char *domain = (char *)NULL;
- static char ypbuf[YPMAXRECORD + 2];
-
- switch(af) {
- case AF_INET:
- break;
- default:
- case AF_INET6:
- errno = EAFNOSUPPORT;
- return NULL;
- }
-
- if (domain == (char *)NULL)
- if (yp_get_default_domain (&domain))
- return ((struct hostent *)NULL);
-
- if (yp_match(domain, map, name, strlen(name), &result, &resultlen))
- return ((struct hostent *)NULL);
-
- /* avoid potential memory leak */
- bcopy((char *)result, (char *)&ypbuf, resultlen);
- ypbuf[resultlen] = '\0';
- free(result);
- result = (char *)&ypbuf;
-
- if ((cp = index(result, '\n')))
- *cp = '\0';
-
- cp = strpbrk(result, " \t");
- *cp++ = '\0';
- h.h_addr_list = host_addrs;
- h.h_addr = hostaddr;
- *((u_long *)h.h_addr) = inet_addr(result);
- h.h_length = sizeof(u_long);
- h.h_addrtype = AF_INET;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- h.h_name = cp;
- q = h.h_aliases = host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&h);
-#else
- return (NULL);
-#endif /* YP */
-}
-
-struct hostent *
-_gethostbynisname(name, af)
- const char *name;
- int af;
-{
- return _gethostbynis(name, "hosts.byname", af);
-}
-
-struct hostent *
-_gethostbynisaddr(addr, len, af)
- const char *addr;
- int len;
- int af;
-{
- return _gethostbynis(inet_ntoa(*(struct in_addr *)addr),"hosts.byaddr", af);
-}
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c
deleted file mode 100644
index 9415a53..0000000
--- a/lib/libc/net/gethostnamadr.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id: gethostnamadr.c,v 1.12 1997/02/22 15:00:09 peter Exp $";
-static char rcsid[] = "$Id: gethostnamadr.c,v 1.12 1997/02/22 15:00:09 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/nameser.h> /* XXX hack for _res */
-#include <resolv.h> /* XXX hack for _res */
-
-#define _PATH_HOSTCONF "/etc/host.conf"
-
-enum service_type {
- SERVICE_NONE = 0,
- SERVICE_BIND,
- SERVICE_HOSTS,
- SERVICE_NIS };
-#define SERVICE_MAX SERVICE_NIS
-
-static struct {
- const char *name;
- enum service_type type;
-} service_names[] = {
- { "hosts", SERVICE_HOSTS },
- { "/etc/hosts", SERVICE_HOSTS },
- { "hosttable", SERVICE_HOSTS },
- { "htable", SERVICE_HOSTS },
- { "bind", SERVICE_BIND },
- { "dns", SERVICE_BIND },
- { "domain", SERVICE_BIND },
- { "yp", SERVICE_NIS },
- { "yellowpages", SERVICE_NIS },
- { "nis", SERVICE_NIS },
- { 0, SERVICE_NONE }
-};
-
-static enum service_type service_order[SERVICE_MAX + 1];
-static int service_done = 0;
-
-static enum service_type
-get_service_name(const char *name) {
- int i;
- for(i = 0; service_names[i].type != SERVICE_NONE; i++) {
- if(!strcasecmp(name, service_names[i].name)) {
- return service_names[i].type;
- }
- }
- return SERVICE_NONE;
-}
-
-static void
-init_services()
-{
- char *cp, *p, buf[BUFSIZ];
- register int cc = 0;
- FILE *fd;
-
- if ((fd = (FILE *)fopen(_PATH_HOSTCONF, "r")) == NULL) {
- /* make some assumptions */
- service_order[0] = SERVICE_BIND;
- service_order[1] = SERVICE_HOSTS;
- service_order[2] = SERVICE_NONE;
- } else {
- while (fgets(buf, BUFSIZ, fd) != NULL && cc < SERVICE_MAX) {
- if(buf[0] == '#')
- continue;
-
- p = buf;
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- if (cp == NULL)
- continue;
- do {
- if (isalpha(cp[0])) {
- service_order[cc] = get_service_name(cp);
- if(service_order[cc] != SERVICE_NONE)
- cc++;
- }
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- } while(cp != NULL && cc < SERVICE_MAX);
- }
- service_order[cc] = SERVICE_NONE;
- fclose(fd);
- }
- service_done = 1;
-}
-
-struct hostent *
-gethostbyname(const char *name)
-{
- struct hostent *hp;
-
- if (_res.options & RES_USE_INET6) { /* XXX */
- hp = gethostbyname2(name, AF_INET6); /* XXX */
- if (hp) /* XXX */
- return (hp); /* XXX */
- } /* XXX */
- return (gethostbyname2(name, AF_INET));
-}
-
-struct hostent *
-gethostbyname2(const char *name, int type)
-{
- struct hostent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return NULL;
- case SERVICE_HOSTS:
- hp = _gethostbyhtname(name, type);
- break;
- case SERVICE_BIND:
- hp = _gethostbydnsname(name, type);
- break;
- case SERVICE_NIS:
- hp = _gethostbynisname(name, type);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-struct hostent *
-gethostbyaddr(const char *addr, int len, int type)
-{
- struct hostent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return 0;
- case SERVICE_HOSTS:
- hp = _gethostbyhtaddr(addr, len, type);
- break;
- case SERVICE_BIND:
- hp = _gethostbydnsaddr(addr, len, type);
- break;
- case SERVICE_NIS:
- hp = _gethostbynisaddr(addr, len, type);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-#ifdef _THREAD_SAFE
-struct hostent_data;
-
-/*
- * Temporary function (not thread safe)
- */
-int gethostbyaddr_r(const char *addr, int len, int type,
- struct hostent *result, struct hostent_data *buffer)
-{
- struct hostent *hp;
- int ret;
- if ((hp = gethostbyaddr(addr, len, type)) == NULL) {
- ret = -1;
- } else {
- memcpy(result, hp, sizeof(struct hostent));
- ret = 0;
- }
- return(ret);
-}
-#endif
-
-void
-sethostent(stayopen)
- int stayopen;
-{
- _sethosthtent(stayopen);
- _sethostdnsent(stayopen);
-}
-
-void
-endhostent()
-{
- _endhosthtent();
- _endhostdnsent();
-}
diff --git a/lib/libc/net/getnetbydns.c b/lib/libc/net/getnetbydns.c
deleted file mode 100644
index bacdb67..0000000
--- a/lib/libc/net/getnetbydns.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/*-
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-/* Portions Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
- * Dep. Matematica Universidade de Coimbra, Portugal, Europe
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id: getnetbydns.c,v 1.11 1997/06/27 08:22:01 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <syslog.h>
-
-#include "res_config.h"
-
-extern int h_errno;
-
-#define BYADDR 0
-#define BYNAME 1
-#define MAXALIASES 35
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-} querybuf;
-
-typedef union {
- long al;
- char ac;
-} align;
-
-static struct netent *
-getnetanswer(answer, anslen, net_i)
- querybuf *answer;
- int anslen;
- int net_i;
-{
-
- register HEADER *hp;
- register u_char *cp;
- register int n;
- u_char *eom;
- int type, class, buflen, ancount, qdcount, haveanswer, i, nchar;
- char aux1[MAXHOSTNAMELEN], aux2[MAXHOSTNAMELEN], ans[MAXHOSTNAMELEN];
- char *in, *st, *pauxt, *bp, **ap;
- char *paux1 = &aux1[0], *paux2 = &aux2[0], flag = 0;
-static struct netent net_entry;
-static char *net_aliases[MAXALIASES], netbuf[PACKETSZ];
-
- /*
- * find first satisfactory answer
- *
- * answer --> +------------+ ( MESSAGE )
- * | Header |
- * +------------+
- * | Question | the question for the name server
- * +------------+
- * | Answer | RRs answering the question
- * +------------+
- * | Authority | RRs pointing toward an authority
- * | Additional | RRs holding additional information
- * +------------+
- */
- eom = answer->buf + anslen;
- hp = &answer->hdr;
- ancount = ntohs(hp->ancount); /* #/records in the answer section */
- qdcount = ntohs(hp->qdcount); /* #/entries in the question section */
- bp = netbuf;
- buflen = sizeof(netbuf);
- cp = answer->buf + HFIXEDSZ;
- if (!qdcount) {
- if (hp->aa)
- h_errno = HOST_NOT_FOUND;
- else
- h_errno = TRY_AGAIN;
- return (NULL);
- }
- while (qdcount-- > 0)
- cp += __dn_skipname(cp, eom) + QFIXEDSZ;
- ap = net_aliases;
- *ap = NULL;
- net_entry.n_aliases = net_aliases;
- haveanswer = 0;
- while (--ancount >= 0 && cp < eom) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_dnok(bp))
- break;
- cp += n;
- ans[0] = '\0';
- (void)strncpy(&ans[0], bp, sizeof(ans) - 1);
- ans[sizeof(ans) - 1] = '\0';
- GETSHORT(type, cp);
- GETSHORT(class, cp);
- cp += INT32SZ; /* TTL */
- GETSHORT(n, cp);
- if (class == C_IN && type == T_PTR) {
- n = dn_expand(answer->buf, eom, cp, bp, buflen);
- if ((n < 0) || !res_hnok(bp)) {
- cp += n;
- return (NULL);
- }
- cp += n;
- *ap++ = bp;
- bp += strlen(bp) + 1;
- net_entry.n_addrtype =
- (class == C_IN) ? AF_INET : AF_UNSPEC;
- haveanswer++;
- }
- }
- if (haveanswer) {
- *ap = NULL;
- switch (net_i) {
- case BYADDR:
- net_entry.n_name = *net_entry.n_aliases;
- net_entry.n_net = 0L;
- break;
- case BYNAME:
- in = *net_entry.n_aliases;
- net_entry.n_name = &ans[0];
- aux2[0] = '\0';
- for (i = 0; i < 4; i++) {
- for (st = in, nchar = 0;
- *st != '.';
- st++, nchar++)
- ;
- if (nchar != 1 || *in != '0' || flag) {
- flag = 1;
- (void)strncpy(paux1,
- (i==0) ? in : in-1,
- (i==0) ?nchar : nchar+1);
- paux1[(i==0) ? nchar : nchar+1] = '\0';
- pauxt = paux2;
- paux2 = strcat(paux1, paux2);
- paux1 = pauxt;
- }
- in = ++st;
- }
- net_entry.n_net = inet_network(paux2);
- break;
- }
- net_entry.n_aliases++;
- return (&net_entry);
- }
- h_errno = TRY_AGAIN;
- return (NULL);
-}
-
-struct netent *
-_getnetbydnsaddr(net, net_type)
- register unsigned long net;
- register int net_type;
-{
- unsigned int netbr[4];
- int nn, anslen;
- querybuf buf;
- char qbuf[MAXDNAME];
- unsigned long net2;
- struct netent *net_entry;
-
- if (net_type != AF_INET)
- return (NULL);
-
- for (nn = 4, net2 = net; net2; net2 >>= 8)
- netbr[--nn] = net2 & 0xff;
- switch (nn) {
- case 3: /* Class A */
- sprintf(qbuf, "0.0.0.%u.in-addr.arpa", netbr[3]);
- break;
- case 2: /* Class B */
- sprintf(qbuf, "0.0.%u.%u.in-addr.arpa", netbr[3], netbr[2]);
- break;
- case 1: /* Class C */
- sprintf(qbuf, "0.%u.%u.%u.in-addr.arpa", netbr[3], netbr[2],
- netbr[1]);
- break;
- case 0: /* Class D - E */
- sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa", netbr[3], netbr[2],
- netbr[1], netbr[0]);
- break;
- }
- anslen = res_query(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
- if (anslen < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf("res_query failed\n");
-#endif
- return (NULL);
- }
- net_entry = getnetanswer(&buf, anslen, BYADDR);
- if (net_entry) {
- unsigned u_net = net; /* maybe net should be unsigned ? */
-
- /* Strip trailing zeros */
- while ((u_net & 0xff) == 0 && u_net != 0)
- u_net >>= 8;
- net_entry->n_net = u_net;
- return (net_entry);
- }
- return (NULL);
-}
-
-struct netent *
-_getnetbydnsname(net)
- register const char *net;
-{
- int anslen;
- querybuf buf;
- char qbuf[MAXDNAME];
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- strncpy(qbuf, net, sizeof(qbuf) - 1);
- qbuf[sizeof(qbuf) - 1] = '\0';
- anslen = res_search(qbuf, C_IN, T_PTR, (u_char *)&buf, sizeof(buf));
- if (anslen < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf("res_query failed\n");
-#endif
- return (NULL);
- }
- return getnetanswer(&buf, anslen, BYNAME);
-}
-
-void
-_setnetdnsent(stayopen)
- int stayopen;
-{
- if (stayopen)
- _res.options |= RES_STAYOPEN | RES_USEVC;
-}
-
-void
-_endnetdnsent()
-{
- _res.options &= ~(RES_STAYOPEN | RES_USEVC);
- res_close();
-}
diff --git a/lib/libc/net/getnetbyht.c b/lib/libc/net/getnetbyht.c
deleted file mode 100644
index f7b7b10..0000000
--- a/lib/libc/net/getnetbyht.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* Portions Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
- * Dep. Matematica Universidade de Coimbra, Portugal, Europe
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * from getnetent.c 1.1 (Coimbra) 93/06/02
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getnetent.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: getnetent.c,v 8.4 1997/06/01 20:34:37 vixie Exp";
-static chat rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-
-#define MAXALIASES 35
-
-static FILE *netf;
-static char line[BUFSIZ+1];
-static struct netent net;
-static char *net_aliases[MAXALIASES];
-static int _net_stayopen;
-
-void
-_setnethtent(f)
- int f;
-{
-
- if (netf == NULL)
- netf = fopen(_PATH_NETWORKS, "r" );
- else
- rewind(netf);
- _net_stayopen |= f;
-}
-
-void
-_endnethtent()
-{
-
- if (netf) {
- fclose(netf);
- netf = NULL;
- }
- _net_stayopen = 0;
-}
-
-struct netent *
-getnetent()
-{
- char *p;
- register char *cp, **q;
-
- if (netf == NULL && (netf = fopen(_PATH_NETWORKS, "r" )) == NULL)
- return (NULL);
-again:
- p = fgets(line, sizeof line, netf);
- if (p == NULL)
- return (NULL);
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- net.n_name = p;
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- while (*cp == ' ' || *cp == '\t')
- cp++;
- p = strpbrk(cp, " \t");
- if (p != NULL)
- *p++ = '\0';
- net.n_net = inet_network(cp);
- net.n_addrtype = AF_INET;
- q = net.n_aliases = net_aliases;
- if (p != NULL)
- cp = p;
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &net_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&net);
-}
-
-struct netent *
-_getnetbyhtname(name)
- register const char *name;
-{
- register struct netent *p;
- register char **cp;
-
- setnetent(_net_stayopen);
- while ( (p = getnetent()) ) {
- if (strcasecmp(p->n_name, name) == 0)
- break;
- for (cp = p->n_aliases; *cp != 0; cp++)
- if (strcasecmp(*cp, name) == 0)
- goto found;
- }
-found:
- if (!_net_stayopen)
- endnetent();
- return (p);
-}
-
-struct netent *
-_getnetbyhtaddr(net, type)
- register unsigned long net;
- register int type;
-{
- register struct netent *p;
-
- setnetent(_net_stayopen);
- while ( (p = getnetent()) )
- if (p->n_addrtype == type && p->n_net == net)
- break;
- if (!_net_stayopen)
- endnetent();
- return (p);
-}
diff --git a/lib/libc/net/getnetbynis.c b/lib/libc/net/getnetbynis.c
deleted file mode 100644
index 0549016..0000000
--- a/lib/libc/net/getnetbynis.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id$";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-#include <arpa/nameser.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-#define MAXALIASES 35
-#define MAXADDRS 35
-
-#ifdef YP
-static char *host_aliases[MAXALIASES];
-#endif /* YP */
-
-static struct netent *
-_getnetbynis(name, map, af)
- const char *name;
- char *map;
- int af;
-{
-#ifdef YP
- register char *cp, **q;
- static char *result;
- int resultlen;
- static struct netent h;
- static char *domain = (char *)NULL;
- static char ypbuf[YPMAXRECORD + 2];
-
- switch(af) {
- case AF_INET:
- break;
- default:
- case AF_INET6:
- errno = EAFNOSUPPORT;
- return NULL;
- }
-
- if (domain == (char *)NULL)
- if (yp_get_default_domain (&domain))
- return (NULL);
-
- if (yp_match(domain, map, name, strlen(name), &result, &resultlen))
- return (NULL);
-
- bcopy((char *)result, (char *)&ypbuf, resultlen);
- ypbuf[resultlen] = '\0';
- free(result);
- result = (char *)&ypbuf;
-
- if ((cp = index(result, '\n')))
- *cp = '\0';
-
- cp = strpbrk(result, " \t");
- *cp++ = '\0';
- h.n_name = result;
-
- while (*cp == ' ' || *cp == '\t')
- cp++;
-
- h.n_net = inet_network(cp);
- h.n_addrtype = AF_INET;
-
- q = h.n_aliases = host_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &host_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&h);
-#else
- return (NULL);
-#endif
-}
-
-struct netent *
-_getnetbynisname(name)
- const char *name;
-{
- return _getnetbynis(name, "networks.byname", AF_INET);
-}
-
-struct netent *
-_getnetbynisaddr(addr, af)
- unsigned long addr;
- int af;
-{
- char *str, *cp;
- unsigned long net2;
- int nn;
- unsigned int netbr[4];
- char buf[MAXDNAME];
-
- if (af != AF_INET) {
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-
- for (nn = 4, net2 = addr; net2; net2 >>= 8) {
- netbr[--nn] = net2 & 0xff;
- }
-
- switch (nn) {
- case 3: /* Class A */
- sprintf(buf, "%u", netbr[3]);
- break;
- case 2: /* Class B */
- sprintf(buf, "%u.%u", netbr[2], netbr[3]);
- break;
- case 1: /* Class C */
- sprintf(buf, "%u.%u.%u", netbr[1], netbr[2], netbr[3]);
- break;
- case 0: /* Class D - E */
- sprintf(buf, "%u.%u.%u.%u", netbr[0], netbr[1],
- netbr[2], netbr[3]);
- break;
- }
-
- str = (char *)&buf;
- cp = str + (strlen(str) - 2);
-
- while(!strcmp(cp, ".0")) {
- *cp = '\0';
- cp = str + (strlen(str) - 2);
- }
-
- return _getnetbynis(str, "networks.byaddr", af);
-}
diff --git a/lib/libc/net/getnetent.3 b/lib/libc/net/getnetent.3
deleted file mode 100644
index 8fb13c0..0000000
--- a/lib/libc/net/getnetent.3
+++ /dev/null
@@ -1,158 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getnetent.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETNETENT 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getnetent ,
-.Nm getnetbyaddr ,
-.Nm getnetbyname ,
-.Nm setnetent ,
-.Nm endnetent
-.Nd get network entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Ft struct netent *
-.Fn getnetent void
-.Ft struct netent *
-.Fn getnetbyname "const char *name"
-.Ft struct netent *
-.Fn getnetbyaddr "unsigned long net" "int type"
-.Ft void
-.Fn setnetent "int stayopen"
-.Ft void
-.Fn endnetent void
-.Sh DESCRIPTION
-The
-.Fn getnetent ,
-.Fn getnetbyname ,
-and
-.Fn getnetbyaddr
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network data base,
-.Pa /etc/networks .
-.Bd -literal -offset indent
-struct netent {
- char *n_name; /* official name of net */
- char **n_aliases; /* alias list */
- int n_addrtype; /* net number type */
- unsigned long n_net; /* net number */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width n_addrtype
-.It Fa n_name
-The official name of the network.
-.It Fa n_aliases
-A zero terminated list of alternate names for the network.
-.It Fa n_addrtype
-The type of the network number returned; currently only AF_INET.
-.It Fa n_net
-The network number. Network numbers are returned in machine byte
-order.
-.El
-.Pp
-The
-.Fn getnetent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setnetent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getnetbyname
-or
-.Fn getnetbyaddr .
-.Pp
-The
-.Fn endnetent
-function
-closes the file.
-.Pp
-The
-.Fn getnetbyname
-function
-and
-.Fn getnetbyaddr
-sequentially search from the beginning
-of the file until a matching
-net name or
-net address and type is found,
-or until
-.Dv EOF
-is encountered. The
-.Fa type
-must be
-.Dv AF_INET .
-Network numbers are supplied in host order.
-.Sh FILES
-.Bl -tag -width /etc/networks -compact
-.It Pa /etc/networks
-.El
-.Sh DIAGNOSTICS
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh SEE ALSO
-.Xr networks 5
-.Pp
-.%T RFC 1101
-.Sh HISTORY
-The
-.Fn getnetent ,
-.Fn getnetbyaddr ,
-.Fn getnetbyname ,
-.Fn setnetent ,
-and
-.Fn endnetent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-The data space used by
-these functions is static; if future use requires the data, it should be
-copied before any subsequent calls to these functions overwrite it.
-Only Internet network
-numbers are currently understood.
-Expecting network numbers to fit
-in no more than 32 bits is probably
-naive.
diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c
deleted file mode 100644
index c964cff..0000000
--- a/lib/libc/net/getnetnamadr.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*-
- * Copyright (c) 1994, Garrett Wollman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: getnetnamadr.c,v 1.9 1997/02/22 15:00:12 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-#include <string.h>
-
-#ifndef _PATH_NETCONF
-#define _PATH_NETCONF "/etc/host.conf"
-#endif
-
-enum service_type {
- SERVICE_NONE = 0,
- SERVICE_BIND,
- SERVICE_TABLE,
- SERVICE_NIS };
-#define SERVICE_MAX SERVICE_NIS
-
-static struct {
- const char *name;
- enum service_type type;
-} service_names[] = {
- { "hosts", SERVICE_TABLE },
- { "/etc/hosts", SERVICE_TABLE },
- { "hosttable", SERVICE_TABLE },
- { "htable", SERVICE_TABLE },
- { "bind", SERVICE_BIND },
- { "dns", SERVICE_BIND },
- { "domain", SERVICE_BIND },
- { "yp", SERVICE_NIS },
- { "yellowpages", SERVICE_NIS },
- { "nis", SERVICE_NIS },
- { 0, SERVICE_NONE }
-};
-
-static enum service_type service_order[SERVICE_MAX + 1];
-static int service_done = 0;
-
-static enum service_type
-get_service_name(const char *name) {
- int i;
- for(i = 0; service_names[i].type != SERVICE_NONE; i++) {
- if(!strcasecmp(name, service_names[i].name)) {
- return service_names[i].type;
- }
- }
- return SERVICE_NONE;
-}
-
-static void
-init_services()
-{
- char *cp, *p, buf[BUFSIZ];
- register int cc = 0;
- FILE *fd;
-
- if ((fd = (FILE *)fopen(_PATH_NETCONF, "r")) == NULL) {
- /* make some assumptions */
- service_order[0] = SERVICE_TABLE;
- service_order[1] = SERVICE_NONE;
- } else {
- while (fgets(buf, BUFSIZ, fd) != NULL && cc < SERVICE_MAX) {
- if(buf[0] == '#')
- continue;
-
- p = buf;
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- if (cp == NULL)
- continue;
- do {
- if (isalpha(cp[0])) {
- service_order[cc] = get_service_name(cp);
- if(service_order[cc] != SERVICE_NONE)
- cc++;
- }
- while ((cp = strsep(&p, "\n \t,:;")) != NULL && *cp == '\0')
- ;
- } while(cp != NULL && cc < SERVICE_MAX);
- }
- service_order[cc] = SERVICE_NONE;
- fclose(fd);
- }
- service_done = 1;
-}
-
-struct netent *
-getnetbyname(const char *name)
-{
- struct netent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return NULL;
- case SERVICE_TABLE:
- hp = _getnetbyhtname(name);
- break;
- case SERVICE_BIND:
- hp = _getnetbydnsname(name);
- break;
- case SERVICE_NIS:
- hp = _getnetbynisname(name);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-struct netent *
-getnetbyaddr(addr, af)
- u_long addr;
- int af;
-{
- struct netent *hp = 0;
- int nserv = 0;
-
- if (!service_done)
- init_services();
-
- while (!hp) {
- switch (service_order[nserv]) {
- case SERVICE_NONE:
- return 0;
- case SERVICE_TABLE:
- hp = _getnetbyhtaddr(addr, af);
- break;
- case SERVICE_BIND:
- hp = _getnetbydnsaddr(addr, af);
- break;
- case SERVICE_NIS:
- hp = _getnetbynisaddr(addr, af);
- break;
- }
- nserv++;
- }
- return hp;
-}
-
-void
-setnetent(stayopen)
- int stayopen;
-{
- _setnethtent(stayopen);
- _setnetdnsent(stayopen);
-}
-
-void
-endnetent()
-{
- _endnethtent();
- _endnetdnsent();
-}
diff --git a/lib/libc/net/getproto.c b/lib/libc/net/getproto.c
deleted file mode 100644
index 46f46d3..0000000
--- a/lib/libc/net/getproto.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getproto.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobynumber(proto)
- register int proto;
-{
- register struct protoent *p;
-
- setprotoent(_proto_stayopen);
- while ( (p = getprotoent()) )
- if (p->p_proto == proto)
- break;
- if (!_proto_stayopen)
- endprotoent();
- return (p);
-}
diff --git a/lib/libc/net/getprotoent.3 b/lib/libc/net/getprotoent.3
deleted file mode 100644
index dbf3d1a..0000000
--- a/lib/libc/net/getprotoent.3
+++ /dev/null
@@ -1,146 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getprotoent.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETPROTOENT 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getprotoent ,
-.Nm getprotobynumber ,
-.Nm getprotobyname ,
-.Nm setprotoent ,
-.Nm endprotoent
-.Nd get protocol entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Ft struct protoent *
-.Fn getprotoent void
-.Ft struct protoent *
-.Fn getprotobyname "const char *name"
-.Ft struct protoent *
-.Fn getprotobynumber "int proto"
-.Ft void
-.Fn setprotoent "int stayopen"
-.Ft void
-.Fn endprotoent void
-.Sh DESCRIPTION
-The
-.Fn getprotoent ,
-.Fn getprotobyname ,
-and
-.Fn getprotobynumber
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network protocol data base,
-.Pa /etc/protocols .
-.Bd -literal -offset indent
-.Pp
-struct protoent {
- char *p_name; /* official name of protocol */
- char **p_aliases; /* alias list */
- int p_proto; /* protocol number */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width p_aliases
-.It Fa p_name
-The official name of the protocol.
-.It Fa p_aliases
-A zero terminated list of alternate names for the protocol.
-.It Fa p_proto
-The protocol number.
-.El
-.Pp
-The
-.Fn getprotoent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setprotoent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getprotobyname
-or
-.Fn getprotobynumber .
-.Pp
-The
-.Fn endprotoent
-function
-closes the file.
-.Pp
-The
-.Fn getprotobyname
-function
-and
-.Fn getprotobynumber
-sequentially search from the beginning
-of the file until a matching
-protocol name or
-protocol number is found,
-or until
-.Dv EOF
-is encountered.
-.Sh RETURN VALUES
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh FILES
-.Bl -tag -width /etc/protocols -compact
-.It Pa /etc/protocols
-.El
-.Sh SEE ALSO
-.Xr protocols 5
-.Sh HISTORY
-The
-.Fn getprotoent ,
-.Fn getprotobynumber ,
-.Fn getprotobyname ,
-.Fn setprotoent ,
-and
-.Fn endprotoent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-These functions use a static data space;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Only the Internet
-protocols are currently understood.
diff --git a/lib/libc/net/getprotoent.c b/lib/libc/net/getprotoent.c
deleted file mode 100644
index c10ae33..0000000
--- a/lib/libc/net/getprotoent.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoent.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define MAXALIASES 35
-
-static FILE *protof = NULL;
-static char line[BUFSIZ+1];
-static struct protoent proto;
-static char *proto_aliases[MAXALIASES];
-int _proto_stayopen;
-
-void
-setprotoent(f)
- int f;
-{
- if (protof == NULL)
- protof = fopen(_PATH_PROTOCOLS, "r" );
- else
- rewind(protof);
- _proto_stayopen |= f;
-}
-
-void
-endprotoent()
-{
- if (protof) {
- fclose(protof);
- protof = NULL;
- }
- _proto_stayopen = 0;
-}
-
-struct protoent *
-getprotoent()
-{
- char *p;
- register char *cp, **q;
-
- if (protof == NULL && (protof = fopen(_PATH_PROTOCOLS, "r" )) == NULL)
- return (NULL);
-again:
- if ((p = fgets(line, BUFSIZ, protof)) == NULL)
- return (NULL);
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- proto.p_name = p;
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- while (*cp == ' ' || *cp == '\t')
- cp++;
- p = strpbrk(cp, " \t");
- if (p != NULL)
- *p++ = '\0';
- proto.p_proto = atoi(cp);
- q = proto.p_aliases = proto_aliases;
- if (p != NULL) {
- cp = p;
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &proto_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- }
- *q = NULL;
- return (&proto);
-}
diff --git a/lib/libc/net/getprotoname.c b/lib/libc/net/getprotoname.c
deleted file mode 100644
index 0832acf..0000000
--- a/lib/libc/net/getprotoname.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getprotoname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _proto_stayopen;
-
-struct protoent *
-getprotobyname(name)
- register const char *name;
-{
- register struct protoent *p;
- register char **cp;
-
- setprotoent(_proto_stayopen);
- while ( (p = getprotoent()) ) {
- if (strcmp(p->p_name, name) == 0)
- break;
- for (cp = p->p_aliases; *cp != 0; cp++)
- if (strcmp(*cp, name) == 0)
- goto found;
- }
-found:
- if (!_proto_stayopen)
- endprotoent();
- return (p);
-}
diff --git a/lib/libc/net/getservbyname.c b/lib/libc/net/getservbyname.c
deleted file mode 100644
index 124f5ac..0000000
--- a/lib/libc/net/getservbyname.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyname.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyname(name, proto)
- const char *name, *proto;
-{
- register struct servent *p;
- register char **cp;
-
-#ifdef YP
- extern char *___getservbyname_yp;
- extern char *___getservbyproto_yp;
-
- ___getservbyname_yp = (char *)name;
- ___getservbyproto_yp = (char *)proto;
-#endif
-
- setservent(_serv_stayopen);
- while ( (p = getservent()) ) {
- if (strcmp(name, p->s_name) == 0)
- goto gotname;
- for (cp = p->s_aliases; *cp; cp++)
- if (strcmp(name, *cp) == 0)
- goto gotname;
- continue;
-gotname:
- if (proto == 0 || strcmp(p->s_proto, proto) == 0)
- break;
- }
- if (!_serv_stayopen)
- endservent();
-
-#ifdef YP
- ___getservbyname_yp = NULL;
- ___getservbyproto_yp = NULL;
-#endif
-
- return (p);
-}
diff --git a/lib/libc/net/getservbyport.c b/lib/libc/net/getservbyport.c
deleted file mode 100644
index ef9a2e8..0000000
--- a/lib/libc/net/getservbyport.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservbyport.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <netdb.h>
-#include <string.h>
-
-extern int _serv_stayopen;
-
-struct servent *
-getservbyport(port, proto)
- int port;
- const char *proto;
-{
- register struct servent *p;
-
-#ifdef YP
- extern int ___getservbyport_yp;
- extern char *___getservbyproto_yp;
-
- ___getservbyport_yp = port;
- ___getservbyproto_yp = (char *)proto;
-#endif
-
- setservent(_serv_stayopen);
- while ( (p = getservent()) ) {
- if (p->s_port != port)
- continue;
- if (proto == 0 || strcmp(p->s_proto, proto) == 0)
- break;
- }
- if (!_serv_stayopen)
- endservent();
-
-#ifdef YP
- ___getservbyport_yp = 0;
- ___getservbyproto_yp = NULL;
-#endif
-
- return (p);
-}
diff --git a/lib/libc/net/getservent.3 b/lib/libc/net/getservent.3
deleted file mode 100644
index 79c18a3..0000000
--- a/lib/libc/net/getservent.3
+++ /dev/null
@@ -1,156 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)getservent.3 8.3 (Berkeley) 1/12/94
-.\" $Id$
-.\"
-.Dd July 9, 1995
-.Dt GETSERVENT 3
-.Os BSD 4.2
-.Sh NAME
-.Nm getservent ,
-.Nm getservbyport ,
-.Nm getservbyname ,
-.Nm setservent ,
-.Nm endservent
-.Nd get service entry
-.Sh SYNOPSIS
-.Fd #include <netdb.h>
-.Ft struct servent *
-.Fn getservent
-.Ft struct servent *
-.Fn getservbyname "const char *name" "const char *proto"
-.Ft struct servent *
-.Fn getservbyport "int port" "const char *proto"
-.Ft void
-.Fn setservent "int stayopen"
-.Ft void
-.Fn endservent void
-.Sh DESCRIPTION
-The
-.Fn getservent ,
-.Fn getservbyname ,
-and
-.Fn getservbyport
-functions
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network services data base,
-.Pa /etc/services .
-.Bd -literal -offset indent
-struct servent {
- char *s_name; /* official name of service */
- char **s_aliases; /* alias list */
- int s_port; /* port service resides at */
- char *s_proto; /* protocol to use */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width s_aliases
-.It Fa s_name
-The official name of the service.
-.It Fa s_aliases
-A zero terminated list of alternate names for the service.
-.It Fa s_port
-The port number at which the service resides.
-Port numbers are returned in network byte order.
-.It Fa s_proto
-The name of the protocol to use when contacting the
-service.
-.El
-.Pp
-The
-.Fn getservent
-function
-reads the next line of the file, opening the file if necessary.
-.Pp
-The
-.Fn setservent
-function
-opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getservbyname
-or
-.Fn getservbyport .
-.Pp
-The
-.Fn endservent
-function
-closes the file.
-.Pp
-The
-.Fn getservbyname
-and
-.Fn getservbyport
-functions
-sequentially search from the beginning
-of the file until a matching
-protocol name or
-port number is found,
-or until
-.Dv EOF
-is encountered.
-If a protocol name is also supplied (non-
-.Dv NULL ) ,
-searches must also match the protocol.
-.ne 1i
-.Sh FILES
-.Bl -tag -width /etc/services -compact
-.It Pa /etc/services
-.El
-.Sh DIAGNOSTICS
-Null pointer
-(0) returned on
-.Dv EOF
-or error.
-.Sh SEE ALSO
-.Xr getprotoent 3 ,
-.Xr services 5
-.Sh HISTORY
-The
-.Fn getservent ,
-.Fn getservbyport ,
-.Fn getservbyname ,
-.Fn setservent ,
-and
-.Fn endservent
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-These functions use static data storage;
-if the data is needed for future use, it should be
-copied before any subsequent calls overwrite it.
-Expecting port numbers to fit in a 32 bit
-quantity is probably naive.
diff --git a/lib/libc/net/getservent.c b/lib/libc/net/getservent.c
deleted file mode 100644
index cd4449f..0000000
--- a/lib/libc/net/getservent.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getservent.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-static int serv_stepping_yp = 0;
-extern int _yp_check __P(( char ** ));
-#endif
-
-
-#define MAXALIASES 35
-
-static FILE *servf = NULL;
-static char line[BUFSIZ+1];
-static struct servent serv;
-static char *serv_aliases[MAXALIASES];
-int _serv_stayopen;
-
-#ifdef YP
-char *___getservbyname_yp = NULL;
-char *___getservbyproto_yp = NULL;
-int ___getservbyport_yp = 0;
-static char *yp_domain = NULL;
-
-static int
-_getservbyport_yp(line)
- char *line;
-{
- char *result;
- int resultlen;
- char buf[YPMAXRECORD + 2];
- int rv;
-
- snprintf(buf, sizeof(buf), "%d/%s", ntohs(___getservbyport_yp),
- ___getservbyproto_yp);
-
- ___getservbyport_yp = 0;
- ___getservbyproto_yp = NULL;
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- /*
- * We have to be a little flexible here. Ideally you're supposed
- * to have both a services.byname and a services.byport map, but
- * some systems have only services.byname. FreeBSD cheats a little
- * by putting the services.byport information in the same map as
- * services.byname so that either case will work. We allow for both
- * possibilities here: if there is no services.byport map, we try
- * services.byname instead.
- */
- if ((rv = yp_match(yp_domain, "services.byport", buf, strlen(buf),
- &result, &resultlen))) {
- if (rv == YPERR_MAP) {
- if (yp_match(yp_domain, "services.byname", buf,
- strlen(buf), &result, &resultlen))
- return(0);
- } else
- return(0);
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
- return(1);
-}
-
-static int
-_getservbyname_yp(line)
- char *line;
-{
- char *result;
- int resultlen;
- char buf[YPMAXRECORD + 2];
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- snprintf(buf, sizeof(buf), "%s/%s", ___getservbyname_yp,
- ___getservbyproto_yp);
-
- ___getservbyname_yp = 0;
- ___getservbyproto_yp = NULL;
-
- if (yp_match(yp_domain, "services.byname", buf, strlen(buf),
- &result, &resultlen)) {
- return(0);
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
- return(1);
-}
-
-static int
-_getservent_yp(line)
- char *line;
-{
- static char *key = NULL;
- static int keylen;
- char *lastkey, *result;
- int resultlen;
- int rv;
-
- if(!yp_domain) {
- if(yp_get_default_domain(&yp_domain))
- return (0);
- }
-
- if (!serv_stepping_yp) {
- if (key)
- free(key);
- if ((rv = yp_first(yp_domain, "services.byname", &key, &keylen,
- &result, &resultlen))) {
- serv_stepping_yp = 0;
- return(0);
- }
- serv_stepping_yp = 1;
- } else {
- lastkey = key;
- rv = yp_next(yp_domain, "services.byname", key, keylen, &key,
- &keylen, &result, &resultlen);
- free(lastkey);
- if (rv) {
- serv_stepping_yp = 0;
- return (0);
- }
- }
-
- /* getservent() expects lines terminated with \n -- make it happy */
- snprintf(line, BUFSIZ, "%.*s\n", resultlen, result);
-
- free(result);
-
- return(1);
-}
-#endif
-
-void
-setservent(f)
- int f;
-{
- if (servf == NULL)
- servf = fopen(_PATH_SERVICES, "r" );
- else
- rewind(servf);
- _serv_stayopen |= f;
-}
-
-void
-endservent()
-{
- if (servf) {
- fclose(servf);
- servf = NULL;
- }
- _serv_stayopen = 0;
-}
-
-struct servent *
-getservent()
-{
- char *p;
- register char *cp, **q;
-
-#ifdef YP
- if (serv_stepping_yp && _getservent_yp(line)) {
- p = (char *)&line;
- goto unpack;
- }
-tryagain:
-#endif
- if (servf == NULL && (servf = fopen(_PATH_SERVICES, "r" )) == NULL)
- return (NULL);
-again:
- if ((p = fgets(line, BUFSIZ, servf)) == NULL)
- return (NULL);
-#ifdef YP
- if (*p == '+' && _yp_check(NULL)) {
- if (___getservbyname_yp != NULL) {
- if (!_getservbyname_yp(line))
- goto tryagain;
- }
- else if (___getservbyport_yp != 0) {
- if (!_getservbyport_yp(line))
- goto tryagain;
- }
- else if (!_getservent_yp(line))
- goto tryagain;
- }
-unpack:
-#endif
- if (*p == '#')
- goto again;
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- goto again;
- *cp = '\0';
- serv.s_name = p;
- p = strpbrk(p, " \t");
- if (p == NULL)
- goto again;
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- cp = strpbrk(p, ",/");
- if (cp == NULL)
- goto again;
- *cp++ = '\0';
- serv.s_port = htons((u_short)atoi(p));
- serv.s_proto = cp;
- q = serv.s_aliases = serv_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &serv_aliases[MAXALIASES - 1])
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&serv);
-}
diff --git a/lib/libc/net/herror.c b/lib/libc/net/herror.c
deleted file mode 100644
index f22f519..0000000
--- a/lib/libc/net/herror.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*-
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)herror.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <string.h>
-
-const char *h_errlist[] = {
- "Resolver Error 0 (no error)",
- "Unknown host", /* 1 HOST_NOT_FOUND */
- "Host name lookup failure", /* 2 TRY_AGAIN */
- "Unknown server error", /* 3 NO_RECOVERY */
- "No address associated with name", /* 4 NO_ADDRESS */
-};
-int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
-
-extern int h_errno;
-
-/*
- * herror --
- * print the error indicated by the h_errno value.
- */
-void
-herror(s)
- const char *s;
-{
- struct iovec iov[4];
- register struct iovec *v = iov;
-
- if (s && *s) {
- v->iov_base = (char *)s;
- v->iov_len = strlen(s);
- v++;
- v->iov_base = ": ";
- v->iov_len = 2;
- v++;
- }
- v->iov_base = (char *)hstrerror(h_errno);
- v->iov_len = strlen(v->iov_base);
- v++;
- v->iov_base = "\n";
- v->iov_len = 1;
- writev(STDERR_FILENO, iov, (v - iov) + 1);
-}
-
-const char *
-hstrerror(err)
- int err;
-{
- if (err < 0)
- return ("Resolver internal error");
- else if (err < h_nerr)
- return (h_errlist[err]);
- return ("Unknown resolver error");
-}
diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3
deleted file mode 100644
index 6ad1bc6..0000000
--- a/lib/libc/net/inet.3
+++ /dev/null
@@ -1,210 +0,0 @@
-.\" Copyright (c) 1983, 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)inet.3 8.1 (Berkeley) 6/4/93
-.\" $Id: inet.3,v 1.5 1997/02/22 15:00:15 peter Exp $
-.\"
-.Dd June 17, 1996
-.Dt INET 3
-.Os BSD 4.2
-.Sh NAME
-.Nm inet_aton ,
-.Nm inet_addr ,
-.Nm inet_network ,
-.Nm inet_ntoa ,
-.Nm inet_makeaddr ,
-.Nm inet_lnaof ,
-.Nm inet_netof
-.Nd Internet address manipulation routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <netinet/in.h>
-.Fd #include <arpa/inet.h>
-.Ft int
-.Fn inet_aton "const char *cp" "struct in_addr *pin"
-.Ft unsigned long
-.Fn inet_addr "const char *cp"
-.Ft unsigned long
-.Fn inet_network "const char *cp"
-.Ft char *
-.Fn inet_ntoa "struct in_addr in"
-.Ft struct in_addr
-.Fn inet_makeaddr "unsigned long net" "unsigned long lna"
-.Ft unsigned long
-.Fn inet_lnaof "struct in_addr in"
-.Ft unsigned long
-.Fn inet_netof "struct in_addr in"
-.Sh DESCRIPTION
-The routines
-.Fn inet_aton ,
-.Fn inet_addr
-and
-.Fn inet_network
-interpret character strings representing
-numbers expressed in the Internet standard
-.Ql \&.
-notation.
-The
-.Fn inet_aton
-routine interprets the specified character string as an Internet address,
-placing the address into the structure provided.
-It returns 1 if the string was successfully interpreted,
-or 0 if the string is invalid.
-The
-.Fn inet_addr
-and
-.Fn inet_network
-functions return numbers suitable for use
-as Internet addresses and Internet network
-numbers, respectively.
-The routine
-.Fn inet_ntoa
-takes an Internet address and returns an
-.Tn ASCII
-string representing the address in
-.Ql \&.
-notation. The routine
-.Fn inet_makeaddr
-takes an Internet network number and a local
-network address and constructs an Internet address
-from it. The routines
-.Fn inet_netof
-and
-.Fn inet_lnaof
-break apart Internet host addresses, returning
-the network number and local network address part,
-respectively.
-.Pp
-All Internet addresses are returned in network
-order (bytes ordered from left to right).
-All network numbers and local address parts are
-returned as machine format integer values.
-.Sh INTERNET ADDRESSES
-Values specified using the
-.Ql \&.
-notation take one
-of the following forms:
-.Bd -literal -offset indent
-a.b.c.d
-a.b.c
-a.b
-a
-.Ed
-.Pp
-When four parts are specified, each is interpreted
-as a byte of data and assigned, from left to right,
-to the four bytes of an Internet address. Note
-that when an Internet address is viewed as a 32-bit
-integer quantity on the
-.Tn VAX
-the bytes referred to
-above appear as
-.Dq Li d.c.b.a .
-That is,
-.Tn VAX
-bytes are
-ordered from right to left.
-.Pp
-When a three part address is specified, the last
-part is interpreted as a 16-bit quantity and placed
-in the right-most two bytes of the network address.
-This makes the three part address format convenient
-for specifying Class B network addresses as
-.Dq Li 128.net.host .
-.Pp
-When a two part address is supplied, the last part
-is interpreted as a 24-bit quantity and placed in
-the right most three bytes of the network address.
-This makes the two part address format convenient
-for specifying Class A network addresses as
-.Dq Li net.host .
-.Pp
-When only one part is given, the value is stored
-directly in the network address without any byte
-rearrangement.
-.Pp
-All numbers supplied as
-.Dq parts
-in a
-.Ql \&.
-notation
-may be decimal, octal, or hexadecimal, as specified
-in the C language (i.e., a leading 0x or 0X implies
-hexadecimal; otherwise, a leading 0 implies octal;
-otherwise, the number is interpreted as decimal).
-.Pp
-The
-.Fn inet_aton
-and
-.Fn inet_ntoa
-functions are semi-deprecated in favor of the
-.Xr addr2ascii 3
-family. However, since those functions are not yet widely implemented,
-portable programs cannot rely on their presence and will continue
-to use the
-.Xr inet 3
-functions for some time.
-.Sh DIAGNOSTICS
-The constant
-.Dv INADDR_NONE
-is returned by
-.Fn inet_addr
-and
-.Fn inet_network
-for malformed requests.
-.Sh SEE ALSO
-.Xr addr2ascii 3 ,
-.Xr gethostbyname 3 ,
-.Xr getnetent 3 ,
-.Xr hosts 5 ,
-.Xr networks 5
-.Sh HISTORY
-These
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-The value
-.Dv INADDR_NONE
-(0xffffffff) is a valid broadcast address, but
-.Fn inet_addr
-cannot return that value without indicating failure.
-The newer
-.Fn inet_aton
-function does not share this problem.
-The problem of host byte ordering versus network byte ordering is
-confusing.
-The string returned by
-.Fn inet_ntoa
-resides in a static memory area.
-.Pp
-Inet_addr should return a
-.Fa struct in_addr .
diff --git a/lib/libc/net/inet_addr.c b/lib/libc/net/inet_addr.c
deleted file mode 100644
index a1ac899..0000000
--- a/lib/libc/net/inet_addr.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * ++Copyright++ 1983, 1990, 1993
- * -
- * Copyright (c) 1983, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ctype.h>
-
-/*
- * Ascii internet address interpretation routine.
- * The value returned is in network order.
- */
-u_long
-inet_addr(cp)
- register const char *cp;
-{
- struct in_addr val;
-
- if (inet_aton(cp, &val))
- return (val.s_addr);
- return (INADDR_NONE);
-}
-
-/*
- * Check whether "cp" is a valid ascii representation
- * of an Internet address and convert to a binary address.
- * Returns 1 if the address is valid, 0 if not.
- * This replaces inet_addr, the return value from which
- * cannot distinguish between failure and a local broadcast address.
- */
-int
-inet_aton(cp, addr)
- register const char *cp;
- struct in_addr *addr;
-{
- register u_long val;
- register int base, n;
- register char c;
- u_int parts[4];
- register u_int *pp = parts;
-
- c = *cp;
- for (;;) {
- /*
- * Collect number up to ``.''.
- * Values are specified as for C:
- * 0x=hex, 0=octal, isdigit=decimal.
- */
- if (!isdigit(c))
- return (0);
- val = 0; base = 10;
- if (c == '0') {
- c = *++cp;
- if (c == 'x' || c == 'X')
- base = 16, c = *++cp;
- else
- base = 8;
- }
- for (;;) {
- if (isascii(c) && isdigit(c)) {
- val = (val * base) + (c - '0');
- c = *++cp;
- } else if (base == 16 && isascii(c) && isxdigit(c)) {
- val = (val << 4) |
- (c + 10 - (islower(c) ? 'a' : 'A'));
- c = *++cp;
- } else
- break;
- }
- if (c == '.') {
- /*
- * Internet format:
- * a.b.c.d
- * a.b.c (with c treated as 16 bits)
- * a.b (with b treated as 24 bits)
- */
- if (pp >= parts + 3)
- return (0);
- *pp++ = val;
- c = *++cp;
- } else
- break;
- }
- /*
- * Check for trailing characters.
- */
- if (c != '\0' && (!isascii(c) || !isspace(c)))
- return (0);
- /*
- * Concoct the address according to
- * the number of parts specified.
- */
- n = pp - parts + 1;
- switch (n) {
-
- case 0:
- return (0); /* initial nondigit */
-
- case 1: /* a -- 32 bits */
- break;
-
- case 2: /* a.b -- 8.24 bits */
- if (val > 0xffffff)
- return (0);
- val |= parts[0] << 24;
- break;
-
- case 3: /* a.b.c -- 8.8.16 bits */
- if (val > 0xffff)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16);
- break;
-
- case 4: /* a.b.c.d -- 8.8.8.8 bits */
- if (val > 0xff)
- return (0);
- val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
- break;
- }
- if (addr)
- addr->s_addr = htonl(val);
- return (1);
-}
diff --git a/lib/libc/net/inet_lnaof.c b/lib/libc/net/inet_lnaof.c
deleted file mode 100644
index 406be30..0000000
--- a/lib/libc/net/inet_lnaof.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Return the local network address portion of an
- * internet address; handles class a/b/c network
- * number formats.
- */
-u_long
-inet_lnaof(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return ((i)&IN_CLASSA_HOST);
- else if (IN_CLASSB(i))
- return ((i)&IN_CLASSB_HOST);
- else
- return ((i)&IN_CLASSC_HOST);
-}
diff --git a/lib/libc/net/inet_makeaddr.c b/lib/libc/net/inet_makeaddr.c
deleted file mode 100644
index 7976188..0000000
--- a/lib/libc/net/inet_makeaddr.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_makeaddr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Formulate an Internet address from network + host. Used in
- * building addresses stored in the ifnet structure.
- */
-struct in_addr
-inet_makeaddr(net, host)
- u_long net, host;
-{
- u_long addr;
-
- if (net < 128)
- addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
- else if (net < 65536)
- addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
- else if (net < 16777216L)
- addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
- else
- addr = net | host;
- addr = htonl(addr);
- return (*(struct in_addr *)&addr);
-}
diff --git a/lib/libc/net/inet_net_ntop.c b/lib/libc/net/inet_net_ntop.c
deleted file mode 100644
index 4c7893d..0000000
--- a/lib/libc/net/inet_net_ntop.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_net_ntop.c,v 8.2 1996/08/08 06:54:44 vixie Exp";
-static const char rcsid[] = "$Id$";
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-static char * inet_net_ntop_ipv4 __P((const u_char *src, int bits,
- char *dst, size_t size));
-
-/*
- * char *
- * inet_net_ntop(af, src, bits, dst, size)
- * convert network number from network to presentation format.
- * generates CIDR style result always.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * author:
- * Paul Vixie (ISC), July 1996
- */
-char *
-inet_net_ntop(af, src, bits, dst, size)
- int af;
- const void *src;
- int bits;
- char *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_net_ntop_ipv4(src, bits, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (NULL);
- }
-}
-
-/*
- * static char *
- * inet_net_ntop_ipv4(src, bits, dst, size)
- * convert IPv4 network number from network to presentation format.
- * generates CIDR style result always.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * note:
- * network byte order assumed. this means 192.5.5.240/28 has
- * 0x11110000 in its fourth octet.
- * author:
- * Paul Vixie (ISC), July 1996
- */
-static char *
-inet_net_ntop_ipv4(src, bits, dst, size)
- const u_char *src;
- int bits;
- char *dst;
- size_t size;
-{
- char *odst = dst;
- char *t;
- u_int m;
- int b;
-
- if (bits < 0 || bits > 32) {
- errno = EINVAL;
- return (NULL);
- }
- if (bits == 0) {
- if (size < sizeof "0")
- goto emsgsize;
- *dst++ = '0';
- *dst = '\0';
- }
-
- /* Format whole octets. */
- for (b = bits / 8; b > 0; b--) {
- if (size < sizeof "255.")
- goto emsgsize;
- t = dst;
- dst += SPRINTF((dst, "%u", *src++));
- if (b > 1) {
- *dst++ = '.';
- *dst = '\0';
- }
- size -= (size_t)(dst - t);
- }
-
- /* Format partial octet. */
- b = bits % 8;
- if (b > 0) {
- if (size < sizeof ".255")
- goto emsgsize;
- t = dst;
- if (dst != odst)
- *dst++ = '.';
- m = ((1 << b) - 1) << (8 - b);
- dst += SPRINTF((dst, "%u", *src & m));
- size -= (size_t)(dst - t);
- }
-
- /* Format CIDR /width. */
- if (size < sizeof "/32")
- goto emsgsize;
- dst += SPRINTF((dst, "/%u", bits));
- return (odst);
-
- emsgsize:
- errno = EMSGSIZE;
- return (NULL);
-}
diff --git a/lib/libc/net/inet_net_pton.c b/lib/libc/net/inet_net_pton.c
deleted file mode 100644
index 6fd6a06..0000000
--- a/lib/libc/net/inet_net_pton.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_net_pton.c,v 8.3 1996/11/11 06:36:52 vixie Exp";
-static const char rcsid[] = "$Id$";
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-static int inet_net_pton_ipv4 __P((const char *src, u_char *dst,
- size_t size));
-
-/*
- * static int
- * inet_net_pton(af, src, dst, size)
- * convert network number from presentation to network format.
- * accepts hex octets, hex strings, decimal octets, and /CIDR.
- * "size" is in bytes and describes "dst".
- * return:
- * number of bits, either imputed classfully or specified with /CIDR,
- * or -1 if some failure occurred (check errno). ENOENT means it was
- * not a valid network specification.
- * author:
- * Paul Vixie (ISC), June 1996
- */
-int
-inet_net_pton(af, src, dst, size)
- int af;
- const char *src;
- void *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_net_pton_ipv4(src, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (-1);
- }
-}
-
-/*
- * static int
- * inet_net_pton_ipv4(src, dst, size)
- * convert IPv4 network number from presentation to network format.
- * accepts hex octets, hex strings, decimal octets, and /CIDR.
- * "size" is in bytes and describes "dst".
- * return:
- * number of bits, either imputed classfully or specified with /CIDR,
- * or -1 if some failure occurred (check errno). ENOENT means it was
- * not an IPv4 network specification.
- * note:
- * network byte order assumed. this means 192.5.5.240/28 has
- * 0x11110000 in its fourth octet.
- * author:
- * Paul Vixie (ISC), June 1996
- */
-static int
-inet_net_pton_ipv4(src, dst, size)
- const char *src;
- u_char *dst;
- size_t size;
-{
- static const char
- xdigits[] = "0123456789abcdef",
- digits[] = "0123456789";
- int n, ch, tmp, dirty, bits;
- const u_char *odst = dst;
-
- ch = *src++;
- if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
- && isascii(src[1]) && isxdigit(src[1])) {
- /* Hexadecimal: Eat nybble string. */
- if (size <= 0)
- goto emsgsize;
- *dst = 0, dirty = 0;
- src++; /* skip x or X. */
- while ((ch = *src++) != '\0' &&
- isascii(ch) && isxdigit(ch)) {
- if (isupper(ch))
- ch = tolower(ch);
- n = strchr(xdigits, ch) - xdigits;
- assert(n >= 0 && n <= 15);
- *dst |= n;
- if (!dirty++)
- *dst <<= 4;
- else if (size-- > 0)
- *++dst = 0, dirty = 0;
- else
- goto emsgsize;
- }
- if (dirty)
- size--;
- } else if (isascii(ch) && isdigit(ch)) {
- /* Decimal: eat dotted digit string. */
- for (;;) {
- tmp = 0;
- do {
- n = strchr(digits, ch) - digits;
- assert(n >= 0 && n <= 9);
- tmp *= 10;
- tmp += n;
- if (tmp > 255)
- goto enoent;
- } while ((ch = *src++) != '\0' &&
- isascii(ch) && isdigit(ch));
- if (size-- <= 0)
- goto emsgsize;
- *dst++ = (u_char) tmp;
- if (ch == '\0' || ch == '/')
- break;
- if (ch != '.')
- goto enoent;
- ch = *src++;
- if (!isascii(ch) || !isdigit(ch))
- goto enoent;
- }
- } else
- goto enoent;
-
- bits = -1;
- if (ch == '/' && isascii(src[0]) && isdigit(src[0]) && dst > odst) {
- /* CIDR width specifier. Nothing can follow it. */
- ch = *src++; /* Skip over the /. */
- bits = 0;
- do {
- n = strchr(digits, ch) - digits;
- assert(n >= 0 && n <= 9);
- bits *= 10;
- bits += n;
- } while ((ch = *src++) != '\0' &&
- isascii(ch) && isdigit(ch));
- if (ch != '\0')
- goto enoent;
- if (bits > 32)
- goto emsgsize;
- }
-
- /* Firey death and destruction unless we prefetched EOS. */
- if (ch != '\0')
- goto enoent;
-
- /* If nothing was written to the destination, we found no address. */
- if (dst == odst)
- goto enoent;
- /* If no CIDR spec was given, infer width from net class. */
- if (bits == -1) {
- if (*odst >= 240) /* Class E */
- bits = 32;
- else if (*odst >= 224) /* Class D */
- bits = 4;
- else if (*odst >= 192) /* Class C */
- bits = 24;
- else if (*odst >= 128) /* Class B */
- bits = 16;
- else /* Class A */
- bits = 8;
- /* If imputed mask is narrower than specified octets, widen. */
- if (bits >= 8 && bits < ((dst - odst) * 8))
- bits = (dst - odst) * 8;
- }
- /* Extend network to cover the actual mask. */
- while (bits > ((dst - odst) * 8)) {
- if (size-- <= 0)
- goto emsgsize;
- *dst++ = '\0';
- }
- return (bits);
-
- enoent:
- errno = ENOENT;
- return (-1);
-
- emsgsize:
- errno = EMSGSIZE;
- return (-1);
-}
diff --git a/lib/libc/net/inet_neta.c b/lib/libc/net/inet_neta.c
deleted file mode 100644
index 15a1c70..0000000
--- a/lib/libc/net/inet_neta.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char orig_rcsid[] = "From Id: inet_neta.c,v 8.2 1996/08/08 06:54:44 vixie Exp";
-static const char rcsid[] = "$Id$";
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <errno.h>
-#include <stdio.h>
-
-#ifdef SPRINTF_CHAR
-# define SPRINTF(x) strlen(sprintf/**/x)
-#else
-# define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-/*
- * char *
- * inet_neta(src, dst, size)
- * format a u_long network number into presentation format.
- * return:
- * pointer to dst, or NULL if an error occurred (check errno).
- * note:
- * format of ``src'' is as for inet_network().
- * author:
- * Paul Vixie (ISC), July 1996
- */
-char *
-inet_neta(src, dst, size)
- u_long src;
- char *dst;
- size_t size;
-{
- char *odst = dst;
- char *tp;
-
- while (src & 0xffffffff) {
- u_char b = (src & 0xff000000) >> 24;
-
- src <<= 8;
- if (b) {
- if (size < sizeof "255.")
- goto emsgsize;
- tp = dst;
- dst += SPRINTF((dst, "%u", b));
- if (src != 0L) {
- *dst++ = '.';
- *dst = '\0';
- }
- size -= (size_t)(dst - tp);
- }
- }
- if (dst == odst) {
- if (size < sizeof "0.0.0.0")
- goto emsgsize;
- strcpy(dst, "0.0.0.0");
- }
- return (odst);
-
- emsgsize:
- errno = EMSGSIZE;
- return (NULL);
-}
diff --git a/lib/libc/net/inet_netof.c b/lib/libc/net/inet_netof.c
deleted file mode 100644
index d6de694..0000000
--- a/lib/libc/net/inet_netof.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * Return the network number from an internet
- * address; handles class a/b/c network #'s.
- */
-u_long
-inet_netof(in)
- struct in_addr in;
-{
- register u_long i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);
- else if (IN_CLASSB(i))
- return (((i)&IN_CLASSB_NET) >> IN_CLASSB_NSHIFT);
- else
- return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
-}
diff --git a/lib/libc/net/inet_network.c b/lib/libc/net/inet_network.c
deleted file mode 100644
index 6da2e8b..0000000
--- a/lib/libc/net/inet_network.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <ctype.h>
-
-/*
- * Internet network address interpretation routine.
- * The library routines call this routine to interpret
- * network numbers.
- */
-u_long
-inet_network(cp)
- register const char *cp;
-{
- register u_long val, base, n;
- register char c;
- u_long parts[4], *pp = parts;
- register int i;
-
-again:
- val = 0; base = 10;
- if (*cp == '0')
- base = 8, cp++;
- if (*cp == 'x' || *cp == 'X')
- base = 16, cp++;
- while ( (c = *cp) ) {
- if (isdigit(c)) {
- val = (val * base) + (c - '0');
- cp++;
- continue;
- }
- if (base == 16 && isxdigit(c)) {
- val = (val << 4) + (c + 10 - (islower(c) ? 'a' : 'A'));
- cp++;
- continue;
- }
- break;
- }
- if (*cp == '.') {
- if (pp >= parts + 3)
- return (INADDR_NONE);
- *pp++ = val, cp++;
- goto again;
- }
- if (*cp && !isspace(*cp))
- return (INADDR_NONE);
- *pp++ = val;
- n = pp - parts;
- for (val = 0, i = 0; i < n; i++) {
- val <<= 8;
- val |= parts[i] & 0xff;
- }
- return (val);
-}
diff --git a/lib/libc/net/inet_ntoa.c b/lib/libc/net/inet_ntoa.c
deleted file mode 100644
index a37b1db..0000000
--- a/lib/libc/net/inet_ntoa.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Convert network-format internet address
- * to base 256 d.d.d.d representation.
- */
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <stdio.h>
-
-char *
-inet_ntoa(in)
- struct in_addr in;
-{
- static char b[18];
- register char *p;
-
- p = (char *)&in;
-#define UC(b) (((int)b)&0xff)
- (void)snprintf(b, sizeof(b),
- "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
- return (b);
-}
diff --git a/lib/libc/net/inet_ntop.c b/lib/libc/net/inet_ntop.c
deleted file mode 100644
index 36dcb32..0000000
--- a/lib/libc/net/inet_ntop.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <string.h>
-#include <errno.h>
-#include <stdio.h>
-
-#define SPRINTF(x) ((size_t)sprintf x)
-
-/*
- * WARNING: Don't even consider trying to compile this on a system where
- * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
- */
-
-static const char *inet_ntop4 __P((const u_char *src, char *dst, size_t size));
-static const char *inet_ntop6 __P((const u_char *src, char *dst, size_t size));
-
-/* char *
- * inet_ntop(af, src, dst, size)
- * convert a network format address to presentation format.
- * return:
- * pointer to presentation format address (`dst'), or NULL (see errno).
- * author:
- * Paul Vixie, 1996.
- */
-const char *
-inet_ntop(af, src, dst, size)
- int af;
- const void *src;
- char *dst;
- size_t size;
-{
- switch (af) {
- case AF_INET:
- return (inet_ntop4(src, dst, size));
- case AF_INET6:
- return (inet_ntop6(src, dst, size));
- default:
- errno = EAFNOSUPPORT;
- return (NULL);
- }
- /* NOTREACHED */
-}
-
-/* const char *
- * inet_ntop4(src, dst, size)
- * format an IPv4 address, more or less like inet_ntoa()
- * return:
- * `dst' (as a const)
- * notes:
- * (1) uses no statics
- * (2) takes a u_char* not an in_addr as input
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop4(src, dst, size)
- const u_char *src;
- char *dst;
- size_t size;
-{
- static const char fmt[] = "%u.%u.%u.%u";
- char tmp[sizeof "255.255.255.255"];
-
- if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) > size) {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
-
-/* const char *
- * inet_ntop6(src, dst, size)
- * convert IPv6 binary address into presentation (printable) format
- * author:
- * Paul Vixie, 1996.
- */
-static const char *
-inet_ntop6(src, dst, size)
- const u_char *src;
- char *dst;
- size_t size;
-{
- /*
- * Note that int32_t and int16_t need only be "at least" large enough
- * to contain a value of the specified size. On some systems, like
- * Crays, there is no such thing as an integer variable with 16 bits.
- * Keep this in mind if you think this function should have been coded
- * to use pointer overlays. All the world's not a VAX.
- */
- char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
- struct { int base, len; } best, cur;
- u_int words[IN6ADDRSZ / INT16SZ];
- int i;
-
- /*
- * Preprocess:
- * Copy the input (bytewise) array into a wordwise array.
- * Find the longest run of 0x00's in src[] for :: shorthanding.
- */
- memset(words, '\0', sizeof words);
- for (i = 0; i < IN6ADDRSZ; i++)
- words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
- best.base = -1;
- cur.base = -1;
- for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
- if (words[i] == 0) {
- if (cur.base == -1)
- cur.base = i, cur.len = 1;
- else
- cur.len++;
- } else {
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- cur.base = -1;
- }
- }
- }
- if (cur.base != -1) {
- if (best.base == -1 || cur.len > best.len)
- best = cur;
- }
- if (best.base != -1 && best.len < 2)
- best.base = -1;
-
- /*
- * Format the result.
- */
- tp = tmp;
- for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
- /* Are we inside the best run of 0x00's? */
- if (best.base != -1 && i >= best.base &&
- i < (best.base + best.len)) {
- if (i == best.base)
- *tp++ = ':';
- continue;
- }
- /* Are we following an initial run of 0x00s or any real hex? */
- if (i != 0)
- *tp++ = ':';
- /* Is this address an encapsulated IPv4? */
- if (i == 6 && best.base == 0 &&
- (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
- if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
- return (NULL);
- tp += strlen(tp);
- break;
- }
- tp += SPRINTF((tp, "%x", words[i]));
- }
- /* Was it a trailing run of 0x00's? */
- if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
- *tp++ = ':';
- *tp++ = '\0';
-
- /*
- * Check for overflow, copy, and we're done.
- */
- if ((size_t)(tp - tmp) > size) {
- errno = ENOSPC;
- return (NULL);
- }
- strcpy(dst, tmp);
- return (dst);
-}
diff --git a/lib/libc/net/inet_pton.c b/lib/libc/net/inet_pton.c
deleted file mode 100644
index 054ff7d..0000000
--- a/lib/libc/net/inet_pton.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/* Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <string.h>
-#include <errno.h>
-
-/*
- * WARNING: Don't even consider trying to compile this on a system where
- * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
- */
-
-static int inet_pton4 __P((const char *src, u_char *dst));
-static int inet_pton6 __P((const char *src, u_char *dst));
-
-/* int
- * inet_pton(af, src, dst)
- * convert from presentation format (which usually means ASCII printable)
- * to network format (which is usually some kind of binary format).
- * return:
- * 1 if the address was valid for the specified address family
- * 0 if the address wasn't valid (`dst' is untouched in this case)
- * -1 if some other error occurred (`dst' is untouched in this case, too)
- * author:
- * Paul Vixie, 1996.
- */
-int
-inet_pton(af, src, dst)
- int af;
- const char *src;
- void *dst;
-{
- switch (af) {
- case AF_INET:
- return (inet_pton4(src, dst));
- case AF_INET6:
- return (inet_pton6(src, dst));
- default:
- errno = EAFNOSUPPORT;
- return (-1);
- }
- /* NOTREACHED */
-}
-
-/* int
- * inet_pton4(src, dst)
- * like inet_aton() but without all the hexadecimal and shorthand.
- * return:
- * 1 if `src' is a valid dotted quad, else 0.
- * notice:
- * does not touch `dst' unless it's returning 1.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton4(src, dst)
- const char *src;
- u_char *dst;
-{
- static const char digits[] = "0123456789";
- int saw_digit, octets, ch;
- u_char tmp[INADDRSZ], *tp;
-
- saw_digit = 0;
- octets = 0;
- *(tp = tmp) = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr(digits, ch)) != NULL) {
- u_int new = *tp * 10 + (pch - digits);
-
- if (new > 255)
- return (0);
- *tp = new;
- if (! saw_digit) {
- if (++octets > 4)
- return (0);
- saw_digit = 1;
- }
- } else if (ch == '.' && saw_digit) {
- if (octets == 4)
- return (0);
- *++tp = 0;
- saw_digit = 0;
- } else
- return (0);
- }
- if (octets < 4)
- return (0);
-
- memcpy(dst, tmp, INADDRSZ);
- return (1);
-}
-
-/* int
- * inet_pton6(src, dst)
- * convert presentation level address to network order binary form.
- * return:
- * 1 if `src' is a valid [RFC1884 2.2] address, else 0.
- * notice:
- * (1) does not touch `dst' unless it's returning 1.
- * (2) :: in a full address is silently ignored.
- * credit:
- * inspired by Mark Andrews.
- * author:
- * Paul Vixie, 1996.
- */
-static int
-inet_pton6(src, dst)
- const char *src;
- u_char *dst;
-{
- static const char xdigits_l[] = "0123456789abcdef",
- xdigits_u[] = "0123456789ABCDEF";
- u_char tmp[IN6ADDRSZ], *tp, *endp, *colonp;
- const char *xdigits, *curtok;
- int ch, saw_xdigit;
- u_int val;
-
- memset((tp = tmp), '\0', IN6ADDRSZ);
- endp = tp + IN6ADDRSZ;
- colonp = NULL;
- /* Leading :: requires some special handling. */
- if (*src == ':')
- if (*++src != ':')
- return (0);
- curtok = src;
- saw_xdigit = 0;
- val = 0;
- while ((ch = *src++) != '\0') {
- const char *pch;
-
- if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL)
- pch = strchr((xdigits = xdigits_u), ch);
- if (pch != NULL) {
- val <<= 4;
- val |= (pch - xdigits);
- if (val > 0xffff)
- return (0);
- saw_xdigit = 1;
- continue;
- }
- if (ch == ':') {
- curtok = src;
- if (!saw_xdigit) {
- if (colonp)
- return (0);
- colonp = tp;
- continue;
- }
- if (tp + INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- saw_xdigit = 0;
- val = 0;
- continue;
- }
- if (ch == '.' && ((tp + INADDRSZ) <= endp) &&
- inet_pton4(curtok, tp) > 0) {
- tp += INADDRSZ;
- saw_xdigit = 0;
- break; /* '\0' was seen by inet_pton4(). */
- }
- return (0);
- }
- if (saw_xdigit) {
- if (tp + INT16SZ > endp)
- return (0);
- *tp++ = (u_char) (val >> 8) & 0xff;
- *tp++ = (u_char) val & 0xff;
- }
- if (colonp != NULL) {
- /*
- * Since some memmove()'s erroneously fail to handle
- * overlapping regions, we'll do the shift by hand.
- */
- const int n = tp - colonp;
- int i;
-
- for (i = 1; i <= n; i++) {
- endp[- i] = colonp[n - i];
- colonp[n - i] = 0;
- }
- tp = endp;
- }
- if (tp != endp)
- return (0);
- memcpy(dst, tmp, IN6ADDRSZ);
- return (1);
-}
diff --git a/lib/libc/net/iso_addr.3 b/lib/libc/net/iso_addr.3
deleted file mode 100644
index 0565373..0000000
--- a/lib/libc/net/iso_addr.3
+++ /dev/null
@@ -1,110 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)iso_addr.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ISO_ADDR 3
-.Os
-.Sh NAME
-.Nm iso_addr ,
-.Nm iso_ntoa
-.Nd "elementary network address conversion routines for Open System Interconnection
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netiso/iso.h>
-.Ft struct iso_addr *
-.Fn iso_addr "char *cp"
-.Ft char *
-.Fn iso_ntoa "struct iso_addr *isoa"
-.Sh DESCRIPTION
-The routine
-.Fn iso_addr
-interprets character strings representing
-.Tn OSI
-addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn iso_ntoa
-takes
-.Tn OSI
-addresses and returns
-.Tn ASCII
-strings representing NSAPs (network service
-access points) in a
-notation inverse to that accepted by
-.Fn iso_addr .
-.Pp
-Unfortunately, no universal standard exists for representing
-.Tn OSI
-network addresses.
-.Pp
-The format employed by
-.Fn iso_addr
-is a sequence of hexadecimal
-.Dq digits
-(optionally separated by periods),
-of the form:
-.Bd -filled -offset indent
-<hex digits>.<hex digits>.<hex digits>
-.Ed
-.Pp
-Each pair of hexadecimal digits represents a byte
-with the leading digit indicating the higher-ordered bits.
-A period following an even number of bytes has no
-effect (but may be used to increase legibility).
-A period following an odd number of bytes has the
-effect of causing the byte of address being translated
-to have its higher order bits filled with zeros.
-.Sh RETURN VALUES
-.Fn iso_ntoa
-always returns a null terminated string.
-.Fn iso_addr
-always returns a pointer to a struct iso_addr.
-(See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr iso 4
-.Sh HISTORY
-The
-.Fn iso_addr
-and
-.Fn iso_ntoa
-functions appeared in
-.Bx 4.3 Reno .
-.Sh BUGS
-The returned values
-reside in a static memory area.
-.Pp
-The function
-.Fn iso_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
diff --git a/lib/libc/net/iso_addr.c b/lib/libc/net/iso_addr.c
deleted file mode 100644
index 8829497..0000000
--- a/lib/libc/net/iso_addr.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)iso_addr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <netiso/iso.h>
-#include <string.h>
-
-/* States*/
-#define VIRGIN 0
-#define GOTONE 1
-#define GOTTWO 2
-/* Inputs */
-#define DIGIT (4*0)
-#define END (4*1)
-#define DELIM (4*2)
-
-struct iso_addr *
-iso_addr(addr)
- register const char *addr;
-{
- static struct iso_addr out_addr;
- register char *cp = out_addr.isoa_genaddr;
- char *cplim = cp + sizeof(out_addr.isoa_genaddr);
- register int byte = 0, state = VIRGIN, new;
-
- bzero((char *)&out_addr, sizeof(out_addr));
- do {
- if ((*addr >= '0') && (*addr <= '9')) {
- new = *addr - '0';
- } else if ((*addr >= 'a') && (*addr <= 'f')) {
- new = *addr - 'a' + 10;
- } else if ((*addr >= 'A') && (*addr <= 'F')) {
- new = *addr - 'A' + 10;
- } else if (*addr == 0)
- state |= END;
- else
- state |= DELIM;
- addr++;
- switch (state /* | INPUT */) {
- case GOTTWO | DIGIT:
- *cp++ = byte; /*FALLTHROUGH*/
- case VIRGIN | DIGIT:
- state = GOTONE; byte = new; continue;
- case GOTONE | DIGIT:
- state = GOTTWO; byte = new + (byte << 4); continue;
- default: /* | DELIM */
- state = VIRGIN; *cp++ = byte; byte = 0; continue;
- case GOTONE | END:
- case GOTTWO | END:
- *cp++ = byte; /* FALLTHROUGH */
- case VIRGIN | END:
- break;
- }
- break;
- } while (cp < cplim);
- out_addr.isoa_len = cp - out_addr.isoa_genaddr;
- return (&out_addr);
-}
-
-static char hexlist[] = "0123456789abcdef";
-
-char *
-iso_ntoa(isoa)
- const struct iso_addr *isoa;
-{
- static char tmpbuf[sizeof(isoa->isoa_genaddr)*3];
- const u_char *binary;
- char *cp;
- int i;
-
- binary = isoa->isoa_genaddr;
- cp = tmpbuf;
-
- for (i = 0; i < isoa->isoa_len; i++) {
- *cp++ = hexlist[*binary >> 4];
- *cp++ = hexlist[*binary++ & 0xf];
-
- if ((((i % 2) == 0) && ((i + 1) < isoa->isoa_len)))
- *cp++ = '.';
- }
- *cp = '\0';
- return tmpbuf;
-}
diff --git a/lib/libc/net/linkaddr.3 b/lib/libc/net/linkaddr.3
deleted file mode 100644
index 6999add..0000000
--- a/lib/libc/net/linkaddr.3
+++ /dev/null
@@ -1,138 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Donn Seeley at BSDI.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)linkaddr.3 8.1 (Berkeley) 7/28/93
-.\" $Id$
-.\"
-.Dd June 17, 1996
-.Dt LINK_ADDR 3
-.Os BSD 4.4
-.Sh NAME
-.Nm link_addr ,
-.Nm link_ntoa
-.Nd elementary address specification routines for link level access
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Fd #include <net/if_dl.h>
-.Ft void
-.Fn link_addr "const char *addr" "struct sockaddr_dl *sdl"
-.Ft char *
-.Fn link_ntoa "const struct sockaddr_dl *sdl"
-.Sh DESCRIPTION
-The routine
-.Fn link_addr
-interprets character strings representing
-link-level addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn link_ntoa
-takes
-a link-level
-address and returns an
-.Tn ASCII
-string representing some of the information present,
-including the link level address itself, and the interface name
-or number, if present.
-This facility is experimental and is
-still subject to change.
-.Pp
-For
-.Fn link_addr ,
-the string
-.Fa addr
-may contain
-an optional network interface identifier of the form
-.Dq "name unit-number" ,
-suitable for the first argument to
-.Xr ifconfig 8 ,
-followed in all cases by a colon and
-an interface address in the form of
-groups of hexadecimal digits
-separated by periods.
-Each group represents a byte of address;
-address bytes are filled left to right from
-low order bytes through high order bytes.
-.Pp
-.\" A regular expression may make this format clearer:
-.\" .Bd -literal -offset indent
-.\" ([a-z]+[0-9]+:)?[0-9a-f]+(\e.[0-9a-f]+)*
-.\" .Ed
-.\" .Pp
-Thus
-.Li le0:8.0.9.13.d.30
-represents an ethernet address
-to be transmitted on the first Lance ethernet interface.
-.Pp
-The direct use of these functions is deprecated in favor of the
-.Xr addr2ascii 3
-interface; however, portable programs cannot rely on the latter as it is
-not yet widely implemented.
-.Sh RETURN VALUES
-.Fn link_ntoa
-always returns a null terminated string.
-.Fn link_addr
-has no return value.
-(See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr addr2ascii 3
-.\" .Xr iso 4
-.Sh HISTORY
-The
-.Fn link_addr
-and
-.Fn link_ntoa
-functions appeared in
-.Bx 4.3 Reno .
-.Sh BUGS
-The returned values for link_ntoa
-reside in a static memory area.
-.Pp
-The function
-.Fn link_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
-.Pp
-If the
-.Va sdl_len
-field of the link socket address
-.Fa sdl
-is 0,
-.Fn link_ntoa
-will not insert a colon before the interface address bytes.
-If this translated address is given to
-.Fn link_addr
-without inserting an initial colon,
-the latter will not interpret it correctly.
diff --git a/lib/libc/net/linkaddr.c b/lib/libc/net/linkaddr.c
deleted file mode 100644
index 68eed3d..0000000
--- a/lib/libc/net/linkaddr.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)linkaddr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <net/if_dl.h>
-#include <string.h>
-
-/* States*/
-#define NAMING 0
-#define GOTONE 1
-#define GOTTWO 2
-#define RESET 3
-/* Inputs */
-#define DIGIT (4*0)
-#define END (4*1)
-#define DELIM (4*2)
-#define LETTER (4*3)
-
-void
-link_addr(addr, sdl)
- register const char *addr;
- register struct sockaddr_dl *sdl;
-{
- register char *cp = sdl->sdl_data;
- char *cplim = sdl->sdl_len + (char *)sdl;
- register int byte = 0, state = NAMING, new;
-
- bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
- sdl->sdl_family = AF_LINK;
- do {
- state &= ~LETTER;
- if ((*addr >= '0') && (*addr <= '9')) {
- new = *addr - '0';
- } else if ((*addr >= 'a') && (*addr <= 'f')) {
- new = *addr - 'a' + 10;
- } else if ((*addr >= 'A') && (*addr <= 'F')) {
- new = *addr - 'A' + 10;
- } else if (*addr == 0) {
- state |= END;
- } else if (state == NAMING &&
- (((*addr >= 'A') && (*addr <= 'Z')) ||
- ((*addr >= 'a') && (*addr <= 'z'))))
- state |= LETTER;
- else
- state |= DELIM;
- addr++;
- switch (state /* | INPUT */) {
- case NAMING | DIGIT:
- case NAMING | LETTER:
- *cp++ = addr[-1];
- continue;
- case NAMING | DELIM:
- state = RESET;
- sdl->sdl_nlen = cp - sdl->sdl_data;
- continue;
- case GOTTWO | DIGIT:
- *cp++ = byte;
- /* FALLTHROUGH */
- case RESET | DIGIT:
- state = GOTONE;
- byte = new;
- continue;
- case GOTONE | DIGIT:
- state = GOTTWO;
- byte = new + (byte << 4);
- continue;
- default: /* | DELIM */
- state = RESET;
- *cp++ = byte;
- byte = 0;
- continue;
- case GOTONE | END:
- case GOTTWO | END:
- *cp++ = byte;
- /* FALLTHROUGH */
- case RESET | END:
- break;
- }
- break;
- } while (cp < cplim);
- sdl->sdl_alen = cp - LLADDR(sdl);
- new = cp - (char *)sdl;
- if (new > sizeof(*sdl))
- sdl->sdl_len = new;
- return;
-}
-
-static char hexlist[] = "0123456789abcdef";
-
-char *
-link_ntoa(sdl)
- register const struct sockaddr_dl *sdl;
-{
- static char obuf[64];
- register char *out = obuf;
- register int i;
- register u_char *in = (u_char *)LLADDR(sdl);
- u_char *inlim = in + sdl->sdl_alen;
- int firsttime = 1;
-
- if (sdl->sdl_nlen) {
- bcopy(sdl->sdl_data, obuf, sdl->sdl_nlen);
- out += sdl->sdl_nlen;
- if (sdl->sdl_alen)
- *out++ = ':';
- }
- while (in < inlim) {
- if (firsttime)
- firsttime = 0;
- else
- *out++ = '.';
- i = *in++;
- if (i > 0xf) {
- out[1] = hexlist[i & 0xf];
- i >>= 4;
- out[0] = hexlist[i];
- out += 2;
- } else
- *out++ = hexlist[i];
- }
- *out = 0;
- return (obuf);
-}
diff --git a/lib/libc/net/map_v4v6.c b/lib/libc/net/map_v4v6.c
deleted file mode 100644
index 0f8658e..0000000
--- a/lib/libc/net/map_v4v6.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * ++Copyright++ 1985, 1988, 1993
- * -
- * Copyright (c) 1985, 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <syslog.h>
-
-typedef union {
- int32_t al;
- char ac;
-} align;
-
-void
-_map_v4v6_address(src, dst)
- const char *src;
- char *dst;
-{
- u_char *p = (u_char *)dst;
- char tmp[INADDRSZ];
- int i;
-
- /* Stash a temporary copy so our caller can update in place. */
- bcopy(src, tmp, INADDRSZ);
- /* Mark this ipv6 addr as a mapped ipv4. */
- for (i = 0; i < 10; i++)
- *p++ = 0x00;
- *p++ = 0xff;
- *p++ = 0xff;
- /* Retrieve the saved copy and we're done. */
- bcopy(tmp, (void*)p, INADDRSZ);
-}
-
-void
-_map_v4v6_hostent(hp, bpp, lenp)
- struct hostent *hp;
- char **bpp;
- int *lenp;
-{
- char **ap;
-
- if (hp->h_addrtype != AF_INET || hp->h_length != INADDRSZ)
- return;
- hp->h_addrtype = AF_INET6;
- hp->h_length = IN6ADDRSZ;
- for (ap = hp->h_addr_list; *ap; ap++) {
- int i = sizeof(align) - ((u_long)*bpp % sizeof(align));
-
- if (*lenp < (i + IN6ADDRSZ)) {
- /* Out of memory. Truncate address list here. XXX */
- *ap = NULL;
- return;
- }
- *bpp += i;
- *lenp -= i;
- _map_v4v6_address(*ap, *bpp);
- *ap = *bpp;
- *bpp += IN6ADDRSZ;
- *lenp -= IN6ADDRSZ;
- }
-}
diff --git a/lib/libc/net/ns.3 b/lib/libc/net/ns.3
deleted file mode 100644
index e621ad2..0000000
--- a/lib/libc/net/ns.3
+++ /dev/null
@@ -1,131 +0,0 @@
-.\" Copyright (c) 1986, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ns.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt NS 3
-.Os BSD 4.3
-.Sh NAME
-.Nm ns_addr ,
-.Nm ns_ntoa
-.Nd Xerox
-.Tn NS Ns (tm)
-address conversion routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netns/ns.h>
-.Ft struct ns_addr
-.Fn ns_addr "char *cp"
-.Ft char *
-.Fn ns_ntoa "struct ns_addr ns"
-.Sh DESCRIPTION
-The routine
-.Fn ns_addr
-interprets character strings representing
-.Tn XNS
-addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn ns_ntoa
-takes
-.Tn XNS
-addresses and returns
-.Tn ASCII
-strings representing the address in a
-notation in common use in the Xerox Development Environment:
-.Bd -filled -offset indent
-<network number>.<host number>.<port number>
-.Ed
-.Pp
-Trailing zero fields are suppressed, and each number is printed in hexadecimal,
-in a format suitable for input to
-.Fn ns_addr .
-Any fields lacking super-decimal digits will have a
-trailing
-.Ql H
-appended.
-.Pp
-Unfortunately, no universal standard exists for representing
-.Tn XNS
-addresses.
-An effort has been made to insure that
-.Fn ns_addr
-be compatible with most formats in common use.
-It will first separate an address into 1 to 3 fields using a single delimiter
-chosen from
-period
-.Ql \&. ,
-colon
-.Ql \&:
-or pound-sign
-.Ql \&# .
-Each field is then examined for byte separators (colon or period).
-If there are byte separators, each subfield separated is taken to be
-a small hexadecimal number, and the entirety is taken as a network-byte-ordered
-quantity to be zero extended in the high-network-order bytes.
-Next, the field is inspected for hyphens, in which case
-the field is assumed to be a number in decimal notation
-with hyphens separating the millenia.
-Next, the field is assumed to be a number:
-It is interpreted
-as hexadecimal if there is a leading
-.Ql 0x
-(as in C),
-a trailing
-.Ql H
-(as in Mesa), or there are any super-decimal digits present.
-It is interpreted as octal is there is a leading
-.Ql 0
-and there are no super-octal digits.
-Otherwise, it is converted as a decimal number.
-.Sh RETURN VALUES
-None. (See
-.Sx BUGS . )
-.Sh SEE ALSO
-.Xr hosts 5 ,
-.Xr networks 5
-.Sh HISTORY
-The
-.Fn ns_addr
-and
-.Fn ns_toa
-functions appeared in
-.Bx 4.3 .
-.Sh BUGS
-The string returned by
-.Fn ns_ntoa
-resides in a static memory area.
-The function
-.Fn ns_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
diff --git a/lib/libc/net/ns_addr.c b/lib/libc/net/ns_addr.c
deleted file mode 100644
index 3446e08..0000000
--- a/lib/libc/net/ns_addr.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * J.Q. Johnson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ns_addr.c 8.1 (Berkeley) 6/7/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netns/ns.h>
-#include <stdio.h>
-#include <string.h>
-
-static struct ns_addr addr, zero_addr;
-
-static void Field(), cvtbase();
-
-struct ns_addr
-ns_addr(name)
- const char *name;
-{
- char separator;
- char *hostname, *socketname, *cp;
- char buf[50];
-
- (void)strncpy(buf, name, sizeof(buf) - 1);
- buf[sizeof(buf) - 1] = '\0';
-
- /*
- * First, figure out what he intends as a field separtor.
- * Despite the way this routine is written, the prefered
- * form 2-272.AA001234H.01777, i.e. XDE standard.
- * Great efforts are made to insure backward compatability.
- */
- if ((hostname = strchr(buf, '#')) != NULL)
- separator = '#';
- else {
- hostname = strchr(buf, '.');
- if ((cp = strchr(buf, ':')) &&
- ((hostname && cp < hostname) || (hostname == 0))) {
- hostname = cp;
- separator = ':';
- } else
- separator = '.';
- }
- if (hostname)
- *hostname++ = 0;
-
- addr = zero_addr;
- Field(buf, addr.x_net.c_net, 4);
- if (hostname == 0)
- return (addr); /* No separator means net only */
-
- socketname = strchr(hostname, separator);
- if (socketname) {
- *socketname++ = 0;
- Field(socketname, (u_char *)&addr.x_port, 2);
- }
-
- Field(hostname, addr.x_host.c_host, 6);
-
- return (addr);
-}
-
-static void
-Field(buf, out, len)
- char *buf;
- u_char *out;
- int len;
-{
- register char *bp = buf;
- int i, ibase, base16 = 0, base10 = 0, clen = 0;
- int hb[6], *hp;
- char *fmt;
-
- /*
- * first try 2-273#2-852-151-014#socket
- */
- if ((*buf != '-') &&
- (1 < (i = sscanf(buf, "%d-%d-%d-%d-%d",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4])))) {
- cvtbase(1000L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0.0.AA.0.5E.E6#socket
- */
- if (1 < (i = sscanf(buf,"%x.%x.%x.%x.%x.%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0:0:AA:0:5E:E6#socket
- */
- if (1 < (i = sscanf(buf,"%x:%x:%x:%x:%x:%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * This is REALLY stretching it but there was a
- * comma notation separting shorts -- definitely non standard
- */
- if (1 < (i = sscanf(buf,"%x,%x,%x",
- &hb[0], &hb[1], &hb[2]))) {
- hb[0] = htons(hb[0]); hb[1] = htons(hb[1]);
- hb[2] = htons(hb[2]);
- cvtbase(65536L, 256, hb, i, out, len);
- return;
- }
-
- /* Need to decide if base 10, 16 or 8 */
- while (*bp) switch (*bp++) {
-
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '-':
- break;
-
- case '8': case '9':
- base10 = 1;
- break;
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- base16 = 1;
- break;
-
- case 'x': case 'X':
- *--bp = '0';
- base16 = 1;
- break;
-
- case 'h': case 'H':
- base16 = 1;
- /* fall into */
-
- default:
- *--bp = 0; /* Ends Loop */
- }
- if (base16) {
- fmt = "%3x";
- ibase = 4096;
- } else if (base10 == 0 && *buf == '0') {
- fmt = "%3o";
- ibase = 512;
- } else {
- fmt = "%3d";
- ibase = 1000;
- }
-
- for (bp = buf; *bp++; ) clen++;
- if (clen == 0) clen++;
- if (clen > 18) clen = 18;
- i = ((clen - 1) / 3) + 1;
- bp = clen + buf - 3;
- hp = hb + i - 1;
-
- while (hp > hb) {
- (void)sscanf(bp, fmt, hp);
- bp[0] = 0;
- hp--;
- bp -= 3;
- }
- (void)sscanf(buf, fmt, hp);
- cvtbase((long)ibase, 256, hb, i, out, len);
-}
-
-static void
-cvtbase(oldbase,newbase,input,inlen,result,reslen)
- long oldbase;
- int newbase;
- int input[];
- int inlen;
- unsigned char result[];
- int reslen;
-{
- int d, e;
- long sum;
-
- e = 1;
- while (e > 0 && reslen > 0) {
- d = 0; e = 0; sum = 0;
- /* long division: input=input/newbase */
- while (d < inlen) {
- sum = sum*oldbase + (long) input[d];
- e += (sum > 0);
- input[d++] = sum / newbase;
- sum %= newbase;
- }
- result[--reslen] = sum; /* accumulate remainder */
- }
- for (d=0; d < reslen; d++)
- result[d] = 0;
-}
diff --git a/lib/libc/net/ns_ntoa.c b/lib/libc/net/ns_ntoa.c
deleted file mode 100644
index 0f01f0b..0000000
--- a/lib/libc/net/ns_ntoa.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ns_ntoa.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netns/ns.h>
-#include <stdio.h>
-
-char *
-ns_ntoa(addr)
- struct ns_addr addr;
-{
- static char obuf[40];
- union { union ns_net net_e; u_long long_e; } net;
- u_short port = htons(addr.x_port);
- register char *cp;
- char *cp2;
- register u_char *up = addr.x_host.c_host;
- u_char *uplim = up + 6;
- static char *spectHex();
-
- net.net_e = addr.x_net;
- sprintf(obuf, "%lx", ntohl(net.long_e));
- cp = spectHex(obuf);
- cp2 = cp + 1;
- while (*up==0 && up < uplim) up++;
- if (up == uplim) {
- if (port) {
- sprintf(cp, ".0");
- cp += 2;
- }
- } else {
- sprintf(cp, ".%x", *up++);
- while (up < uplim) {
- while (*cp) cp++;
- sprintf(cp, "%02x", *up++);
- }
- cp = spectHex(cp2);
- }
- if (port) {
- sprintf(cp, ".%x", port);
- spectHex(cp + 1);
- }
- return (obuf);
-}
-
-static char *
-spectHex(p0)
- char *p0;
-{
- int ok = 0;
- int nonzero = 0;
- register char *p = p0;
- for (; *p; p++) switch (*p) {
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- *p += ('A' - 'a');
- /* fall into . . . */
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- ok = 1;
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- nonzero = 1;
- }
- if (nonzero && !ok) { *p++ = 'H'; *p = 0; }
- return (p);
-}
diff --git a/lib/libc/net/nsap_addr.c b/lib/libc/net/nsap_addr.c
deleted file mode 100644
index b0c6433..0000000
--- a/lib/libc/net/nsap_addr.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <ctype.h>
-#include <resolv.h>
-
-static char
-xtob(c)
- register int c;
-{
- return (c - (((c >= '0') && (c <= '9')) ? '0' : '7'));
-}
-
-u_int
-inet_nsap_addr(ascii, binary, maxlen)
- const char *ascii;
- u_char *binary;
- int maxlen;
-{
- register u_char c, nib;
- u_int len = 0;
-
- while ((c = *ascii++) != '\0' && len < maxlen) {
- if (c == '.' || c == '+' || c == '/')
- continue;
- if (!isascii(c))
- return (0);
- if (islower(c))
- c = toupper(c);
- if (isxdigit(c)) {
- nib = xtob(c);
- if ((c = *ascii++) != '\0') {
- c = toupper(c);
- if (isxdigit(c)) {
- *binary++ = (nib << 4) | xtob(c);
- len++;
- } else
- return (0);
- }
- else
- return (0);
- }
- else
- return (0);
- }
- return (len);
-}
-
-char *
-inet_nsap_ntoa(binlen, binary, ascii)
- int binlen;
- register const u_char *binary;
- register char *ascii;
-{
- register int nib;
- int i;
- static char tmpbuf[255*3];
- char *start;
-
- if (ascii)
- start = ascii;
- else {
- ascii = tmpbuf;
- start = tmpbuf;
- }
-
- if (binlen > 255)
- binlen = 255;
-
- for (i = 0; i < binlen; i++) {
- nib = *binary >> 4;
- *ascii++ = nib + (nib < 10 ? '0' : '7');
- nib = *binary++ & 0x0f;
- *ascii++ = nib + (nib < 10 ? '0' : '7');
- if (((i % 2) == 0 && (i + 1) < binlen))
- *ascii++ = '.';
- }
- *ascii = '\0';
- return (start);
-}
diff --git a/lib/libc/net/rcmd.3 b/lib/libc/net/rcmd.3
deleted file mode 100644
index e25057f..0000000
--- a/lib/libc/net/rcmd.3
+++ /dev/null
@@ -1,204 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)rcmd.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd February 15, 1996
-.Dt RCMD 3
-.Os BSD 4.2
-.Sh NAME
-.Nm rcmd ,
-.Nm rresvport ,
-.Nm iruserok ,
-.Nm ruserok
-.Nd routines for returning a stream to a remote command
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn rcmd "char **ahost" "int inport" "const char *locuser" "const char *remuser" "const char *cmd" "int *fd2p"
-.Ft int
-.Fn rresvport "int *port"
-.Ft int
-.Fn iruserok "u_long raddr" "int superuser" "const char *ruser" "const char *luser"
-.Ft int
-.Fn ruserok "const char *rhost" "int superuser" "const char *ruser" "const char *luser"
-.Sh DESCRIPTION
-The
-.Fn rcmd
-function
-is used by the super-user to execute a command on
-a remote machine using an authentication scheme based
-on reserved port numbers.
-The
-.Fn rresvport
-function
-returns a descriptor to a socket
-with an address in the privileged port space.
-The
-.Fn ruserok
-function
-is used by servers
-to authenticate clients requesting service with
-.Fn rcmd .
-All three functions are present in the same file and are used
-by the
-.Xr rshd 8
-server (among others).
-.Pp
-The
-.Fn rcmd
-function
-looks up the host
-.Fa *ahost
-using
-.Xr gethostbyname 3 ,
-returning \-1 if the host does not exist.
-Otherwise
-.Fa *ahost
-is set to the standard name of the host
-and a connection is established to a server
-residing at the well-known Internet port
-.Fa inport .
-.Pp
-If the connection succeeds,
-a socket in the Internet domain of type
-.Dv SOCK_STREAM
-is returned to the caller, and given to the remote
-command as
-.Em stdin
-and
-.Em stdout .
-If
-.Fa fd2p
-is non-zero, then an auxiliary channel to a control
-process will be set up, and a descriptor for it will be placed
-in
-.Fa *fd2p .
-The control process will return diagnostic
-output from the command (unit 2) on this channel, and will also
-accept bytes on this channel as being
-.Tn UNIX
-signal numbers, to be
-forwarded to the process group of the command.
-If
-.Fa fd2p
-is 0, then the
-.Em stderr
-(unit 2 of the remote
-command) will be made the same as the
-.Em stdout
-and no
-provision is made for sending arbitrary signals to the remote process,
-although you may be able to get its attention by using out-of-band data.
-.Pp
-The protocol is described in detail in
-.Xr rshd 8 .
-.Pp
-The
-.Fn rresvport
-function is used to obtain a socket with a privileged
-address bound to it. This socket is suitable for use
-by
-.Fn rcmd
-and several other functions. Privileged Internet ports are those
-in the range 0 to 1023. Only the super-user
-is allowed to bind an address of this sort to a socket.
-.Pp
-The
-.Fn iruserok
-and
-.Fn ruserok
-functions take a remote host's IP address or name, as returned by the
-.Xr gethostbyname 3
-routines, two user names and a flag indicating whether the local user's
-name is that of the super-user.
-Then, if the user is
-.Em NOT
-the super-user, it checks the
-.Pa /etc/hosts.equiv
-file.
-If that lookup is not done, or is unsuccessful, the
-.Pa .rhosts
-in the local user's home directory is checked to see if the request for
-service is allowed.
-.Pp
-If this file does not exist, is not a regular file, is owned by anyone
-other than the user or the super-user, or is writable by anyone other
-than the owner, the check automatically fails.
-Zero is returned if the machine name is listed in the
-.Dq Pa hosts.equiv
-file, or the host and remote user name are found in the
-.Dq Pa .rhosts
-file; otherwise
-.Fn iruserok
-and
-.Fn ruserok
-return \-1.
-If the local domain (as obtained from
-.Xr gethostname 3 )
-is the same as the remote domain, only the machine name need be specified.
-.Pp
-The
-.Fn iruserok
-function is strongly preferred for security reasons.
-It requires trusting the local DNS at most, while the
-.Fn ruserok
-function requires trusting the entire DNS, which can be spoofed.
-.Sh DIAGNOSTICS
-The
-.Fn rcmd
-function
-returns a valid socket descriptor on success.
-It returns \-1 on error and prints a diagnostic message on the standard error.
-.Pp
-The
-.Fn rresvport
-function
-returns a valid, bound socket descriptor on success.
-It returns \-1 on error with the global value
-.Va errno
-set according to the reason for failure.
-The error code
-.Dv EAGAIN
-is overloaded to mean ``All network ports in use.''
-.Sh SEE ALSO
-.Xr rlogin 1 ,
-.Xr rsh 1 ,
-.Xr intro 2 ,
-.Xr rexec 3 ,
-.Xr rexecd 8 ,
-.Xr rlogind 8 ,
-.Xr rshd 8
-.Sh HISTORY
-These
-functions appeared in
-.Bx 4.2 .
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c
deleted file mode 100644
index ff108d9..0000000
--- a/lib/libc/net/rcmd.c
+++ /dev/null
@@ -1,518 +0,0 @@
-/*
- * Copyright (c) 1983, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <signal.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#ifdef YP
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-extern int innetgr __P(( const char *, const char *, const char *, const char * ));
-
-#define max(a, b) ((a > b) ? a : b)
-
-int __ivaliduser __P((FILE *, u_long, const char *, const char *));
-static int __icheckhost __P((u_long, char *));
-
-int
-rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
- char **ahost;
- u_short rport;
- const char *locuser, *remuser, *cmd;
- int *fd2p;
-{
- struct hostent *hp;
- struct sockaddr_in sin, from;
- fd_set reads;
- long oldmask;
- pid_t pid;
- int s, lport, timo;
- char c;
-
- pid = getpid();
- hp = gethostbyname(*ahost);
- if (hp == NULL) {
- herror(*ahost);
- return (-1);
- }
- *ahost = hp->h_name;
- oldmask = sigblock(sigmask(SIGURG));
- for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
- s = rresvport(&lport);
- if (s < 0) {
- if (errno == EAGAIN)
- (void)fprintf(stderr,
- "rcmd: socket: All ports in use\n");
- else
- (void)fprintf(stderr, "rcmd: socket: %s\n",
- strerror(errno));
- sigsetmask(oldmask);
- return (-1);
- }
- fcntl(s, F_SETOWN, pid);
- bzero(&sin, sizeof sin);
- sin.sin_len = sizeof(struct sockaddr_in);
- sin.sin_family = hp->h_addrtype;
- sin.sin_port = rport;
- bcopy(hp->h_addr_list[0], &sin.sin_addr, MIN(hp->h_length, sizeof sin.sin_addr));
- if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
- break;
- (void)close(s);
- if (errno == EADDRINUSE) {
- lport--;
- continue;
- }
- if (errno == ECONNREFUSED && timo <= 16) {
- (void)sleep(timo);
- timo *= 2;
- continue;
- }
- if (hp->h_addr_list[1] != NULL) {
- int oerrno = errno;
-
- (void)fprintf(stderr, "connect to address %s: ",
- inet_ntoa(sin.sin_addr));
- errno = oerrno;
- perror(0);
- hp->h_addr_list++;
- bcopy(hp->h_addr_list[0], &sin.sin_addr, MIN(hp->h_length, sizeof sin.sin_addr));
- (void)fprintf(stderr, "Trying %s...\n",
- inet_ntoa(sin.sin_addr));
- continue;
- }
- (void)fprintf(stderr, "%s: %s\n", hp->h_name, strerror(errno));
- sigsetmask(oldmask);
- return (-1);
- }
- lport--;
- if (fd2p == 0) {
- write(s, "", 1);
- lport = 0;
- } else {
- char num[8];
- int s2 = rresvport(&lport), s3;
- int len = sizeof(from);
- int nfds;
-
- if (s2 < 0)
- goto bad;
- listen(s2, 1);
- (void)snprintf(num, sizeof(num), "%d", lport);
- if (write(s, num, strlen(num)+1) != strlen(num)+1) {
- (void)fprintf(stderr,
- "rcmd: write (setting up stderr): %s\n",
- strerror(errno));
- (void)close(s2);
- goto bad;
- }
- nfds = max(s, s2)+1;
- if(nfds > FD_SETSIZE) {
- fprintf(stderr, "rcmd: too many files\n");
- (void)close(s2);
- goto bad;
- }
-again:
- FD_ZERO(&reads);
- FD_SET(s, &reads);
- FD_SET(s2, &reads);
- errno = 0;
- if (select(nfds, &reads, 0, 0, 0) < 1 || !FD_ISSET(s2, &reads)){
- if (errno != 0)
- (void)fprintf(stderr,
- "rcmd: select (setting up stderr): %s\n",
- strerror(errno));
- else
- (void)fprintf(stderr,
- "select: protocol failure in circuit setup\n");
- (void)close(s2);
- goto bad;
- }
- s3 = accept(s2, (struct sockaddr *)&from, &len);
- /*
- * XXX careful for ftp bounce attacks. If discovered, shut them
- * down and check for the real auxiliary channel to connect.
- */
- if (from.sin_family == AF_INET && from.sin_port == htons(20)) {
- close(s3);
- goto again;
- }
- (void)close(s2);
- if (s3 < 0) {
- (void)fprintf(stderr,
- "rcmd: accept: %s\n", strerror(errno));
- lport = 0;
- goto bad;
- }
- *fd2p = s3;
- from.sin_port = ntohs((u_short)from.sin_port);
- if (from.sin_family != AF_INET ||
- from.sin_port >= IPPORT_RESERVED ||
- from.sin_port < IPPORT_RESERVED / 2) {
- (void)fprintf(stderr,
- "socket: protocol failure in circuit setup.\n");
- goto bad2;
- }
- }
- (void)write(s, locuser, strlen(locuser)+1);
- (void)write(s, remuser, strlen(remuser)+1);
- (void)write(s, cmd, strlen(cmd)+1);
- if (read(s, &c, 1) != 1) {
- (void)fprintf(stderr,
- "rcmd: %s: %s\n", *ahost, strerror(errno));
- goto bad2;
- }
- if (c != 0) {
- while (read(s, &c, 1) == 1) {
- (void)write(STDERR_FILENO, &c, 1);
- if (c == '\n')
- break;
- }
- goto bad2;
- }
- sigsetmask(oldmask);
- return (s);
-bad2:
- if (lport)
- (void)close(*fd2p);
-bad:
- (void)close(s);
- sigsetmask(oldmask);
- return (-1);
-}
-
-int
-rresvport(alport)
- int *alport;
-{
- struct sockaddr_in sin;
- int s;
-
- bzero(&sin, sizeof sin);
- sin.sin_len = sizeof(struct sockaddr_in);
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = INADDR_ANY;
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (s < 0)
- return (-1);
-#if 0 /* compat_exact_traditional_rresvport_semantics */
- sin.sin_port = htons((u_short)*alport);
- if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
- return (s);
- if (errno != EADDRINUSE) {
- (void)close(s);
- return (-1);
- }
-#endif
- sin.sin_port = 0;
- if (bindresvport(s, &sin) == -1) {
- (void)close(s);
- return (-1);
- }
- *alport = (int)ntohs(sin.sin_port);
- return (s);
-}
-
-int __check_rhosts_file = 1;
-char *__rcmd_errstr;
-
-int
-ruserok(rhost, superuser, ruser, luser)
- const char *rhost, *ruser, *luser;
- int superuser;
-{
- struct hostent *hp;
- u_long addr;
- char **ap;
-
- if ((hp = gethostbyname(rhost)) == NULL)
- return (-1);
- for (ap = hp->h_addr_list; *ap; ++ap) {
- bcopy(*ap, &addr, sizeof(addr));
- if (iruserok(addr, superuser, ruser, luser) == 0)
- return (0);
- }
- return (-1);
-}
-
-/*
- * New .rhosts strategy: We are passed an ip address. We spin through
- * hosts.equiv and .rhosts looking for a match. When the .rhosts only
- * has ip addresses, we don't have to trust a nameserver. When it
- * contains hostnames, we spin through the list of addresses the nameserver
- * gives us and look for a match.
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-iruserok(raddr, superuser, ruser, luser)
- u_long raddr;
- int superuser;
- const char *ruser, *luser;
-{
- register char *cp;
- struct stat sbuf;
- struct passwd *pwd;
- FILE *hostf;
- uid_t uid;
- int first;
- char pbuf[MAXPATHLEN];
-
- first = 1;
- hostf = superuser ? NULL : fopen(_PATH_HEQUIV, "r");
-again:
- if (hostf) {
- if (__ivaliduser(hostf, raddr, luser, ruser) == 0) {
- (void)fclose(hostf);
- return (0);
- }
- (void)fclose(hostf);
- }
- if (first == 1 && (__check_rhosts_file || superuser)) {
- first = 0;
- if ((pwd = getpwnam(luser)) == NULL)
- return (-1);
- (void)strcpy(pbuf, pwd->pw_dir);
- (void)strcat(pbuf, "/.rhosts");
-
- /*
- * Change effective uid while opening .rhosts. If root and
- * reading an NFS mounted file system, can't read files that
- * are protected read/write owner only.
- */
- uid = geteuid();
- (void)seteuid(pwd->pw_uid);
- hostf = fopen(pbuf, "r");
- (void)seteuid(uid);
-
- if (hostf == NULL)
- return (-1);
- /*
- * If not a regular file, or is owned by someone other than
- * user or root or if writeable by anyone but the owner, quit.
- */
- cp = NULL;
- if (lstat(pbuf, &sbuf) < 0)
- cp = ".rhosts lstat failed";
- else if (!S_ISREG(sbuf.st_mode))
- cp = ".rhosts not regular file";
- else if (fstat(fileno(hostf), &sbuf) < 0)
- cp = ".rhosts fstat failed";
- else if (sbuf.st_uid && sbuf.st_uid != pwd->pw_uid)
- cp = "bad .rhosts owner";
- else if (sbuf.st_mode & (S_IWGRP|S_IWOTH))
- cp = ".rhosts writeable by other than owner";
- /* If there were any problems, quit. */
- if (cp) {
- __rcmd_errstr = cp;
- (void)fclose(hostf);
- return (-1);
- }
- goto again;
- }
- return (-1);
-}
-
-/*
- * XXX
- * Don't make static, used by lpd(8).
- *
- * Returns 0 if ok, -1 if not ok.
- */
-int
-__ivaliduser(hostf, raddr, luser, ruser)
- FILE *hostf;
- u_long raddr;
- const char *luser, *ruser;
-{
- register char *user, *p;
- int ch;
- char buf[MAXHOSTNAMELEN + 128]; /* host + login */
- char hname[MAXHOSTNAMELEN];
- struct hostent *hp;
- /* Presumed guilty until proven innocent. */
- int userok = 0, hostok = 0;
-#ifdef YP
- char *ypdomain;
-
- if (yp_get_default_domain(&ypdomain))
- ypdomain = NULL;
-#else
-#define ypdomain NULL
-#endif
- /* We need to get the damn hostname back for netgroup matching. */
- if ((hp = gethostbyaddr((char *)&raddr, sizeof(u_long),
- AF_INET)) == NULL)
- return (-1);
- strncpy(hname, hp->h_name, sizeof(hname));
- hname[sizeof(hname) - 1] = '\0';
-
- while (fgets(buf, sizeof(buf), hostf)) {
- p = buf;
- /* Skip lines that are too long. */
- if (strchr(p, '\n') == NULL) {
- while ((ch = getc(hostf)) != '\n' && ch != EOF);
- continue;
- }
- if (*p == '\n' || *p == '#') {
- /* comment... */
- continue;
- }
- while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') {
- *p = isupper(*p) ? tolower(*p) : *p;
- p++;
- }
- if (*p == ' ' || *p == '\t') {
- *p++ = '\0';
- while (*p == ' ' || *p == '\t')
- p++;
- user = p;
- while (*p != '\n' && *p != ' ' &&
- *p != '\t' && *p != '\0')
- p++;
- } else
- user = p;
- *p = '\0';
- /*
- * Do +/- and +@/-@ checking. This looks really nasty,
- * but it matches SunOS's behavior so far as I can tell.
- */
- switch(buf[0]) {
- case '+':
- if (!buf[1]) { /* '+' matches all hosts */
- hostok = 1;
- break;
- }
- if (buf[1] == '@') /* match a host by netgroup */
- hostok = innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain);
- else /* match a host by addr */
- hostok = __icheckhost(raddr,(char *)&buf[1]);
- break;
- case '-': /* reject '-' hosts and all their users */
- if (buf[1] == '@') {
- if (innetgr((char *)&buf[2],
- (char *)&hname, NULL, ypdomain))
- return(-1);
- } else {
- if (__icheckhost(raddr,(char *)&buf[1]))
- return(-1);
- }
- break;
- default: /* if no '+' or '-', do a simple match */
- hostok = __icheckhost(raddr, buf);
- break;
- }
- switch(*user) {
- case '+':
- if (!*(user+1)) { /* '+' matches all users */
- userok = 1;
- break;
- }
- if (*(user+1) == '@') /* match a user by netgroup */
- userok = innetgr(user+2, NULL, ruser, ypdomain);
- else /* match a user by direct specification */
- userok = !(strcmp(ruser, user+1));
- break;
- case '-': /* if we matched a hostname, */
- if (hostok) { /* check for user field rejections */
- if (!*(user+1))
- return(-1);
- if (*(user+1) == '@') {
- if (innetgr(user+2, NULL,
- ruser, ypdomain))
- return(-1);
- } else {
- if (!strcmp(ruser, user+1))
- return(-1);
- }
- }
- break;
- default: /* no rejections: try to match the user */
- if (hostok)
- userok = !(strcmp(ruser,*user ? user : luser));
- break;
- }
- if (hostok && userok)
- return(0);
- }
- return (-1);
-}
-
-/*
- * Returns "true" if match, 0 if no match.
- */
-static int
-__icheckhost(raddr, lhost)
- u_long raddr;
- register char *lhost;
-{
- register struct hostent *hp;
- register u_long laddr;
- register char **pp;
-
- /* Try for raw ip address first. */
- if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1)
- return (raddr == laddr);
-
- /* Better be a hostname. */
- if ((hp = gethostbyname(lhost)) == NULL)
- return (0);
-
- /* Spin through ip addresses. */
- for (pp = hp->h_addr_list; *pp; ++pp)
- if (!bcmp(&raddr, *pp, sizeof(u_long)))
- return (1);
-
- /* No match. */
- return (0);
-}
diff --git a/lib/libc/net/recv.c b/lib/libc/net/recv.c
deleted file mode 100644
index 65ec9d4..0000000
--- a/lib/libc/net/recv.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)recv.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <stddef.h>
-
-ssize_t
-recv(s, buf, len, flags)
- int s, flags;
- size_t len;
- void *buf;
-{
- return (recvfrom(s, buf, len, flags, NULL, 0));
-}
diff --git a/lib/libc/net/res_comp.c b/lib/libc/net/res_comp.c
deleted file mode 100644
index 86fd4ae..0000000
--- a/lib/libc/net/res_comp.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- * ++Copyright++ 1985, 1993
- * -
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_comp.c,v 8.12 1997/06/01 20:34:37 vixie Exp";
-static char rcsid[] = "$Id: res_comp.c,v 1.11 1997/06/13 19:21:54 ache Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <resolv.h>
-#include <ctype.h>
-
-#include <unistd.h>
-#include <string.h>
-
-static int dn_find __P((u_char *exp_dn, u_char *msg,
- u_char **dnptrs, u_char **lastdnptr));
-
-/*
- * Expand compressed domain name 'comp_dn' to full domain name.
- * 'msg' is a pointer to the begining of the message,
- * 'eomorig' points to the first location after the message,
- * 'exp_dn' is a pointer to a buffer of size 'length' for the result.
- * Return size of compressed name or -1 if there was an error.
- */
-int
-dn_expand(msg, eomorig, comp_dn, exp_dn, length)
- const u_char *msg, *eomorig, *comp_dn;
- char *exp_dn;
- int length;
-{
- register const u_char *cp;
- register char *dn;
- register int n, c;
- char *eom;
- int len = -1, checked = 0, octets = 0;
-
- dn = exp_dn;
- cp = comp_dn;
- eom = exp_dn + length;
- /*
- * fetch next label in domain name
- */
- while ( (n = *cp++) ) {
- /*
- * Check for indirection
- */
- switch (n & INDIR_MASK) {
- case 0:
- octets += (n + 1);
- if (octets > MAXCDNAME)
- return (-1);
- if (dn != exp_dn) {
- if (dn >= eom)
- return (-1);
- *dn++ = '.';
- }
- if (dn+n >= eom)
- return (-1);
- checked += n + 1;
- while (--n >= 0) {
- if (((c = *cp++) == '.') || (c == '\\')) {
- if (dn + n + 2 >= eom)
- return (-1);
- *dn++ = '\\';
- }
- *dn++ = c;
- if (cp >= eomorig) /* out of range */
- return (-1);
- }
- break;
-
- case INDIR_MASK:
- if (len < 0)
- len = cp - comp_dn + 1;
- cp = msg + (((n & 0x3f) << 8) | (*cp & 0xff));
- if (cp < msg || cp >= eomorig) /* out of range */
- return (-1);
- checked += 2;
- /*
- * Check for loops in the compressed name;
- * if we've looked at the whole message,
- * there must be a loop.
- */
- if (checked >= eomorig - msg)
- return (-1);
- break;
-
- default:
- return (-1); /* flag error */
- }
- }
- *dn = '\0';
- if (len < 0)
- len = cp - comp_dn;
- return (len);
-}
-
-/*
- * Compress domain name 'exp_dn' into 'comp_dn'.
- * Return the size of the compressed name or -1.
- * 'length' is the size of the array pointed to by 'comp_dn'.
- * 'dnptrs' is a list of pointers to previous compressed names. dnptrs[0]
- * is a pointer to the beginning of the message. The list ends with NULL.
- * 'lastdnptr' is a pointer to the end of the arrary pointed to
- * by 'dnptrs'. Side effect is to update the list of pointers for
- * labels inserted into the message as we compress the name.
- * If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr'
- * is NULL, we don't update the list.
- */
-int
-dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr)
- const char *exp_dn;
- u_char *comp_dn, **dnptrs, **lastdnptr;
- int length;
-{
- register u_char *cp, *dn;
- register int c, l;
- u_char **cpp, **lpp, *sp, *eob;
- u_char *msg;
-
- dn = (u_char *)exp_dn;
- cp = comp_dn;
- if (length > MAXCDNAME)
- length = MAXCDNAME;
- eob = cp + length;
- lpp = cpp = NULL;
- if (dnptrs != NULL) {
- if ((msg = *dnptrs++) != NULL) {
- for (cpp = dnptrs; *cpp != NULL; cpp++)
- ;
- lpp = cpp; /* end of list to search */
- }
- } else
- msg = NULL;
- for (c = *dn++; c != '\0'; ) {
- /* look to see if we can use pointers */
- if (msg != NULL) {
- if ((l = dn_find(dn-1, msg, dnptrs, lpp)) >= 0) {
- if (cp+1 >= eob)
- return (-1);
- *cp++ = (l >> 8) | INDIR_MASK;
- *cp++ = l % 256;
- return (cp - comp_dn);
- }
- /* not found, save it */
- if (lastdnptr != NULL && cpp < lastdnptr-1) {
- *cpp++ = cp;
- *cpp = NULL;
- }
- }
- sp = cp++; /* save ptr to length byte */
- do {
- if (c == '.') {
- c = *dn++;
- break;
- }
- if (c == '\\') {
- if ((c = *dn++) == '\0')
- break;
- }
- if (cp >= eob) {
- if (msg != NULL)
- *lpp = NULL;
- return (-1);
- }
- *cp++ = c;
- } while ((c = *dn++) != '\0');
- /* catch trailing '.'s but not '..' */
- if ((l = cp - sp - 1) == 0 && c == '\0') {
- cp--;
- break;
- }
- if (l <= 0 || l > MAXLABEL) {
- if (msg != NULL)
- *lpp = NULL;
- return (-1);
- }
- *sp = l;
- }
- if (cp >= eob) {
- if (msg != NULL)
- *lpp = NULL;
- return (-1);
- }
- *cp++ = '\0';
- return (cp - comp_dn);
-}
-
-/*
- * Skip over a compressed domain name. Return the size or -1.
- */
-int
-__dn_skipname(comp_dn, eom)
- const u_char *comp_dn, *eom;
-{
- register const u_char *cp;
- register int n;
-
- cp = comp_dn;
- while (cp < eom && (n = *cp++)) {
- /*
- * check for indirection
- */
- switch (n & INDIR_MASK) {
- case 0: /* normal case, n == len */
- cp += n;
- continue;
- case INDIR_MASK: /* indirection */
- cp++;
- break;
- default: /* illegal type */
- return (-1);
- }
- break;
- }
- if (cp > eom)
- return (-1);
- return (cp - comp_dn);
-}
-
-static int
-mklower(ch)
- register int ch;
-{
- if (isascii(ch) && isupper(ch))
- return (tolower(ch));
- return (ch);
-}
-
-/*
- * Search for expanded name from a list of previously compressed names.
- * Return the offset from msg if found or -1.
- * dnptrs is the pointer to the first name on the list,
- * not the pointer to the start of the message.
- */
-static int
-dn_find(exp_dn, msg, dnptrs, lastdnptr)
- u_char *exp_dn, *msg;
- u_char **dnptrs, **lastdnptr;
-{
- register u_char *dn, *cp, **cpp;
- register int n;
- u_char *sp;
-
- for (cpp = dnptrs; cpp < lastdnptr; cpp++) {
- dn = exp_dn;
- sp = cp = *cpp;
- while ( (n = *cp++) ) {
- /*
- * check for indirection
- */
- switch (n & INDIR_MASK) {
- case 0: /* normal case, n == len */
- while (--n >= 0) {
- if (*dn == '.')
- goto next;
- if (*dn == '\\')
- dn++;
- if (mklower(*dn++) != mklower(*cp++))
- goto next;
- }
- if ((n = *dn++) == '\0' && *cp == '\0')
- return (sp - msg);
- if (n == '.')
- continue;
- goto next;
-
- case INDIR_MASK: /* indirection */
- cp = msg + (((n & 0x3f) << 8) | *cp);
- break;
-
- default: /* illegal type */
- return (-1);
- }
- }
- if (*dn == '\0')
- return (sp - msg);
- next: ;
- }
- return (-1);
-}
-
-/*
- * Verify that a domain name uses an acceptable character set.
- */
-
-/*
- * Note the conspicuous absence of ctype macros in these definitions. On
- * non-ASCII hosts, we can't depend on string literals or ctype macros to
- * tell us anything about network-format data. The rest of the BIND system
- * is not careful about this, but for some reason, we're doing it right here.
- */
-#define PERIOD 0x2e
-#define hyphenchar(c) ((c) == 0x2d)
-#define bslashchar(c) ((c) == 0x5c)
-#define periodchar(c) ((c) == PERIOD)
-#define asterchar(c) ((c) == 0x2a)
-#define alphachar(c) (((c) >= 0x41 && (c) <= 0x5a) \
- || ((c) >= 0x61 && (c) <= 0x7a))
-#define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
-
-#define borderchar(c) (alphachar(c) || digitchar(c))
-#define middlechar(c) (borderchar(c) || hyphenchar(c))
-#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
-
-int
-res_hnok(dn)
- const char *dn;
-{
- int ppch = '\0', pch = PERIOD, ch = *dn++;
-
- while (ch != '\0') {
- int nch = *dn++;
-
- if (periodchar(ch)) {
- NULL;
- } else if (periodchar(pch)) {
- if (!borderchar(ch))
- return (0);
- } else if (periodchar(nch) || nch == '\0') {
- if (!borderchar(ch))
- return (0);
- } else {
- if (!middlechar(ch))
- return (0);
- }
- ppch = pch, pch = ch, ch = nch;
- }
- return (1);
-}
-
-/*
- * hostname-like (A, MX, WKS) owners can have "*" as their first label
- * but must otherwise be as a host name.
- */
-int
-res_ownok(dn)
- const char *dn;
-{
- if (asterchar(dn[0])) {
- if (periodchar(dn[1]))
- return (res_hnok(dn+2));
- if (dn[1] == '\0')
- return (1);
- }
- return (res_hnok(dn));
-}
-
-/*
- * SOA RNAMEs and RP RNAMEs can have any printable character in their first
- * label, but the rest of the name has to look like a host name.
- */
-int
-res_mailok(dn)
- const char *dn;
-{
- int ch, escaped = 0;
-
- /* "." is a valid missing representation */
- if (*dn == '\0')
- return(1);
-
- /* otherwise <label>.<hostname> */
- while ((ch = *dn++) != '\0') {
- if (!domainchar(ch))
- return (0);
- if (!escaped && periodchar(ch))
- break;
- if (escaped)
- escaped = 0;
- else if (bslashchar(ch))
- escaped = 1;
- }
- if (periodchar(ch))
- return (res_hnok(dn));
- return(0);
-}
-
-/*
- * This function is quite liberal, since RFC 1034's character sets are only
- * recommendations.
- */
-int
-res_dnok(dn)
- const char *dn;
-{
- int ch;
-
- while ((ch = *dn++) != '\0')
- if (!domainchar(ch))
- return (0);
- return (1);
-}
-
-/*
- * Routines to insert/extract short/long's.
- */
-
-u_int16_t
-_getshort(msgp)
- register const u_char *msgp;
-{
- register u_int16_t u;
-
- GETSHORT(u, msgp);
- return (u);
-}
-
-u_int32_t
-_getlong(msgp)
- register const u_char *msgp;
-{
- register u_int32_t u;
-
- GETLONG(u, msgp);
- return (u);
-}
-
-void
-#if defined(__STDC__) || defined(__cplusplus)
-__putshort(register u_int16_t s, register u_char *msgp) /* must match proto */
-#else
-__putshort(s, msgp)
- register u_int16_t s;
- register u_char *msgp;
-#endif
-{
- PUTSHORT(s, msgp);
-}
-
-void
-__putlong(l, msgp)
- register u_int32_t l;
- register u_char *msgp;
-{
- PUTLONG(l, msgp);
-}
diff --git a/lib/libc/net/res_config.h b/lib/libc/net/res_config.h
deleted file mode 100644
index f29246a..0000000
--- a/lib/libc/net/res_config.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#define DEBUG 1 /* enable debugging code (needed for dig) */
-#undef ALLOW_T_UNSPEC /* enable the "unspec" RR type for old athena */
-#define RESOLVSORT /* allow sorting of addresses in gethostbyname */
-#define RFC1535 /* comply with RFC1535 (STRONGLY reccomended by vixie)*/
-#undef USELOOPBACK /* res_init() bind to localhost */
-#undef SUNSECURITY /* verify gethostbyaddr() calls - WE DONT NEED IT */
-#define MULTI_PTRS_ARE_ALIASES 1 /* fold multiple PTR records into aliases */
-#define CHECK_SRVR_ADDR 1 /* confirm that the server requested sent the reply */
diff --git a/lib/libc/net/res_data.c b/lib/libc/net/res_data.c
deleted file mode 100644
index df0e0dd..0000000
--- a/lib/libc/net/res_data.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * ++Copyright++ 1995
- * -
- * Copyright (c) 1995
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-const char *_res_opcodes[] = {
- "QUERY",
- "IQUERY",
- "CQUERYM",
- "CQUERYU", /* experimental */
- "NOTIFY", /* experimental */
- "5",
- "6",
- "7",
- "8",
- "UPDATEA",
- "UPDATED",
- "UPDATEDA",
- "UPDATEM",
- "UPDATEMA",
- "ZONEINIT",
- "ZONEREF",
-};
-
-const char *_res_resultcodes[] = {
- "NOERROR",
- "FORMERR",
- "SERVFAIL",
- "NXDOMAIN",
- "NOTIMP",
- "REFUSED",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12",
- "13",
- "14",
- "NOCHANGE",
-};
diff --git a/lib/libc/net/res_debug.c b/lib/libc/net/res_debug.c
deleted file mode 100644
index 06b8b42..0000000
--- a/lib/libc/net/res_debug.c
+++ /dev/null
@@ -1,1520 +0,0 @@
-/*
- * ++Copyright++ 1985, 1990, 1993
- * -
- * Copyright (c) 1985, 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * Portions Copyright (c) 1995 by International Business Machines, Inc.
- *
- * International Business Machines, Inc. (hereinafter called IBM) grants
- * permission under its copyrights to use, copy, modify, and distribute this
- * Software with or without fee, provided that the above copyright notice and
- * all paragraphs of this notice appear in all copies, and that the name of IBM
- * not be used in connection with the marketing of any product incorporating
- * the Software or modifications thereof, without specific, written prior
- * permission.
- *
- * To the extent it has a right to do so, IBM grants an immunity from suit
- * under its patents, if any, for the use, sale or manufacture of products to
- * the extent that such products are used for performing Domain Name System
- * dynamic updates in TCP/IP networks by means of the Software. No immunity is
- * granted for any product per se or for any other function of any product.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
- * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
- * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_debug.c,v 8.20 1997/06/01 20:34:37 vixie Exp";
-static char rcsid[] = "$Id: res_debug.c,v 1.13 1997/02/22 15:00:31 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include "res_config.h"
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-
-#include <ctype.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <time.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-extern const char *_res_opcodes[];
-extern const char *_res_resultcodes[];
-
-/* XXX: we should use getservbyport() instead. */
-static const char *
-dewks(wks)
- int wks;
-{
- static char nbuf[20];
-
- switch (wks) {
- case 5: return "rje";
- case 7: return "echo";
- case 9: return "discard";
- case 11: return "systat";
- case 13: return "daytime";
- case 15: return "netstat";
- case 17: return "qotd";
- case 19: return "chargen";
- case 20: return "ftp-data";
- case 21: return "ftp";
- case 23: return "telnet";
- case 25: return "smtp";
- case 37: return "time";
- case 39: return "rlp";
- case 42: return "name";
- case 43: return "whois";
- case 53: return "domain";
- case 57: return "apts";
- case 59: return "apfs";
- case 67: return "bootps";
- case 68: return "bootpc";
- case 69: return "tftp";
- case 77: return "rje";
- case 79: return "finger";
- case 87: return "link";
- case 95: return "supdup";
- case 100: return "newacct";
- case 101: return "hostnames";
- case 102: return "iso-tsap";
- case 103: return "x400";
- case 104: return "x400-snd";
- case 105: return "csnet-ns";
- case 109: return "pop-2";
- case 111: return "sunrpc";
- case 113: return "auth";
- case 115: return "sftp";
- case 117: return "uucp-path";
- case 119: return "nntp";
- case 121: return "erpc";
- case 123: return "ntp";
- case 133: return "statsrv";
- case 136: return "profile";
- case 144: return "NeWS";
- case 161: return "snmp";
- case 162: return "snmp-trap";
- case 170: return "print-srv";
- default: (void) sprintf(nbuf, "%d", wks); return (nbuf);
- }
-}
-
-/* XXX: we should use getprotobynumber() instead. */
-static const char *
-deproto(protonum)
- int protonum;
-{
- static char nbuf[20];
-
- switch (protonum) {
- case 1: return "icmp";
- case 2: return "igmp";
- case 3: return "ggp";
- case 5: return "st";
- case 6: return "tcp";
- case 7: return "ucl";
- case 8: return "egp";
- case 9: return "igp";
- case 11: return "nvp-II";
- case 12: return "pup";
- case 16: return "chaos";
- case 17: return "udp";
- default: (void) sprintf(nbuf, "%d", protonum); return (nbuf);
- }
-}
-
-static const u_char *
-do_rrset(msg, len, cp, cnt, pflag, file, hs)
- int cnt, pflag, len;
- const u_char *cp, *msg;
- const char *hs;
- FILE *file;
-{
- int n;
- int sflag;
-
- /*
- * Print answer records.
- */
- sflag = (_res.pfcode & pflag);
- if ((n = ntohs(cnt)) != 0) {
- if ((!_res.pfcode) ||
- ((sflag) && (_res.pfcode & RES_PRF_HEAD1)))
- fprintf(file, hs);
- while (--n >= 0) {
- if ((!_res.pfcode) || sflag) {
- cp = p_rr(cp, msg, file);
- } else {
- unsigned int dlen;
- cp += __dn_skipname(cp, cp + MAXCDNAME);
- cp += INT16SZ;
- cp += INT16SZ;
- cp += INT32SZ;
- dlen = _getshort((u_char*)cp);
- cp += INT16SZ;
- cp += dlen;
- }
- if ((cp - msg) > len)
- return (NULL);
- }
- if ((!_res.pfcode) ||
- ((sflag) && (_res.pfcode & RES_PRF_HEAD1)))
- putc('\n', file);
- }
- return (cp);
-}
-
-void
-__p_query(msg)
- const u_char *msg;
-{
- __fp_query(msg, stdout);
-}
-
-/*
- * Print the current options.
- * This is intended to be primarily a debugging routine.
- */
-void
-__fp_resstat(statp, file)
- struct __res_state *statp;
- FILE *file;
-{
- register u_long mask;
-
- fprintf(file, ";; res options:");
- if (!statp)
- statp = &_res;
- for (mask = 1; mask != 0; mask <<= 1)
- if (statp->options & mask)
- fprintf(file, " %s", p_option(mask));
- putc('\n', file);
-}
-
-/*
- * Print the contents of a query.
- * This is intended to be primarily a debugging routine.
- */
-void
-__fp_nquery(msg, len, file)
- const u_char *msg;
- int len;
- FILE *file;
-{
- register const u_char *cp, *endMark;
- register const HEADER *hp;
- register int n;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
- return;
-
-#define TruncTest(x) if (x > endMark) goto trunc
-#define ErrorTest(x) if (x == NULL) goto error
-
- /*
- * Print header fields.
- */
- hp = (HEADER *)msg;
- cp = msg + HFIXEDSZ;
- endMark = msg + len;
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || hp->rcode) {
- fprintf(file, ";; ->>HEADER<<- opcode: %s, status: %s, id: %d",
- _res_opcodes[hp->opcode],
- _res_resultcodes[hp->rcode],
- ntohs(hp->id));
- putc('\n', file);
- }
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX))
- putc(';', file);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD2)) {
- fprintf(file, "; flags:");
- if (hp->qr)
- fprintf(file, " qr");
- if (hp->aa)
- fprintf(file, " aa");
- if (hp->tc)
- fprintf(file, " tc");
- if (hp->rd)
- fprintf(file, " rd");
- if (hp->ra)
- fprintf(file, " ra");
- if (hp->unused)
- fprintf(file, " UNUSED-BIT-ON");
- if (hp->ad)
- fprintf(file, " ad");
- if (hp->cd)
- fprintf(file, " cd");
- }
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD1)) {
- fprintf(file, "; Ques: %d", ntohs(hp->qdcount));
- fprintf(file, ", Ans: %d", ntohs(hp->ancount));
- fprintf(file, ", Auth: %d", ntohs(hp->nscount));
- fprintf(file, ", Addit: %d", ntohs(hp->arcount));
- }
- if ((!_res.pfcode) || (_res.pfcode &
- (RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) {
- putc('\n',file);
- }
- /*
- * Print question records.
- */
- if ((n = ntohs(hp->qdcount)) != 0) {
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
- fprintf(file, ";; QUESTIONS:\n");
- while (--n >= 0) {
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
- fprintf(file, ";;\t");
- TruncTest(cp);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
- cp = p_cdnname(cp, msg, len, file);
- else {
- int n;
- char name[MAXDNAME];
-
- if ((n = dn_expand(msg, msg+len, cp, name,
- sizeof name)) < 0)
- cp = NULL;
- else
- cp += n;
- }
- ErrorTest(cp);
- TruncTest(cp);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
- fprintf(file, ", type = %s",
- __p_type(_getshort((u_char*)cp)));
- cp += INT16SZ;
- TruncTest(cp);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
- fprintf(file, ", class = %s\n",
- __p_class(_getshort((u_char*)cp)));
- cp += INT16SZ;
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
- putc('\n', file);
- }
- }
- /*
- * Print authoritative answer records
- */
- TruncTest(cp);
- cp = do_rrset(msg, len, cp, hp->ancount, RES_PRF_ANS, file,
- ";; ANSWERS:\n");
- ErrorTest(cp);
-
- /*
- * print name server records
- */
- TruncTest(cp);
- cp = do_rrset(msg, len, cp, hp->nscount, RES_PRF_AUTH, file,
- ";; AUTHORITY RECORDS:\n");
- ErrorTest(cp);
-
- TruncTest(cp);
- /*
- * print additional records
- */
- cp = do_rrset(msg, len, cp, hp->arcount, RES_PRF_ADD, file,
- ";; ADDITIONAL RECORDS:\n");
- ErrorTest(cp);
- return;
- trunc:
- fprintf(file, "\n;; ...truncated\n");
- return;
- error:
- fprintf(file, "\n;; ...malformed\n");
-}
-
-void
-__fp_query(msg, file)
- const u_char *msg;
- FILE *file;
-{
- fp_nquery(msg, PACKETSZ, file);
-}
-
-const u_char *
-__p_cdnname(cp, msg, len, file)
- const u_char *cp, *msg;
- int len;
- FILE *file;
-{
- char name[MAXDNAME];
- int n;
-
- if ((n = dn_expand(msg, msg + len, cp, name, sizeof name)) < 0)
- return (NULL);
- if (name[0] == '\0')
- putc('.', file);
- else
- fputs(name, file);
- return (cp + n);
-}
-
-const u_char *
-__p_cdname(cp, msg, file)
- const u_char *cp, *msg;
- FILE *file;
-{
- return (p_cdnname(cp, msg, PACKETSZ, file));
-}
-
-
-/* Return a fully-qualified domain name from a compressed name (with
- length supplied). */
-
-const u_char *
-__p_fqnname(cp, msg, msglen, name, namelen)
- const u_char *cp, *msg;
- int msglen;
- char *name;
- int namelen;
-{
- int n, newlen;
-
- if ((n = dn_expand(msg, cp + msglen, cp, name, namelen)) < 0)
- return (NULL);
- newlen = strlen (name);
- if (newlen == 0 || name[newlen - 1] != '.')
- if (newlen+1 >= namelen) /* Lack space for final dot */
- return (NULL);
- else
- strcpy(name + newlen, ".");
- return (cp + n);
-}
-
-/* XXX: the rest of these functions need to become length-limited, too. (vix)
- */
-
-const u_char *
-__p_fqname(cp, msg, file)
- const u_char *cp, *msg;
- FILE *file;
-{
- char name[MAXDNAME];
- const u_char *n;
-
- n = __p_fqnname(cp, msg, MAXCDNAME, name, sizeof name);
- if (n == NULL)
- return (NULL);
- fputs(name, file);
- return (n);
-}
-
-/*
- * Print resource record fields in human readable form.
- */
-const u_char *
-__p_rr(cp, msg, file)
- const u_char *cp, *msg;
- FILE *file;
-{
- int type, class, dlen, n, c;
- struct in_addr inaddr;
- const u_char *cp1, *cp2;
- u_int32_t tmpttl, t;
- int lcnt;
- u_int16_t keyflags;
- char rrname[MAXDNAME]; /* The fqdn of this RR */
- char base64_key[MAX_KEY_BASE64];
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (NULL);
- }
- cp = __p_fqnname(cp, msg, MAXCDNAME, rrname, sizeof rrname);
- if (!cp)
- return (NULL); /* compression error */
- fputs(rrname, file);
-
- type = _getshort((u_char*)cp);
- cp += INT16SZ;
- class = _getshort((u_char*)cp);
- cp += INT16SZ;
- tmpttl = _getlong((u_char*)cp);
- cp += INT32SZ;
- dlen = _getshort((u_char*)cp);
- cp += INT16SZ;
- cp1 = cp;
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_TTLID))
- fprintf(file, "\t%lu", (u_long)tmpttl);
- if ((!_res.pfcode) || (_res.pfcode & RES_PRF_CLASS))
- fprintf(file, "\t%s", __p_class(class));
- fprintf(file, "\t%s", __p_type(type));
- /*
- * Print type specific data, if appropriate
- */
- switch (type) {
- case T_A:
- switch (class) {
- case C_IN:
- case C_HS:
- bcopy(cp, (char *)&inaddr, INADDRSZ);
- if (dlen == 4) {
- fprintf(file, "\t%s", inet_ntoa(inaddr));
- cp += dlen;
- } else if (dlen == 7) {
- char *address;
- u_char protocol;
- u_short port;
-
- address = inet_ntoa(inaddr);
- cp += INADDRSZ;
- protocol = *(u_char*)cp;
- cp += sizeof (u_char);
- port = _getshort((u_char*)cp);
- cp += INT16SZ;
- fprintf(file, "\t%s\t; proto %d, port %d",
- address, protocol, port);
- }
- break;
- default:
- cp += dlen;
- }
- break;
- case T_CNAME:
- case T_MB:
- case T_MG:
- case T_MR:
- case T_NS:
- case T_PTR:
- putc('\t', file);
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- break;
-
- case T_HINFO:
- case T_ISDN:
- cp2 = cp + dlen;
- (void) fputs("\t\"", file);
- if ((n = (unsigned char) *cp++) != 0) {
- for (c = n; c > 0 && cp < cp2; c--) {
- if (strchr("\n\"\\", *cp))
- (void) putc('\\', file);
- (void) putc(*cp++, file);
- }
- }
- putc('"', file);
- if (cp < cp2 && (n = (unsigned char) *cp++) != 0) {
- (void) fputs ("\t\"", file);
- for (c = n; c > 0 && cp < cp2; c--) {
- if (strchr("\n\"\\", *cp))
- (void) putc('\\', file);
- (void) putc(*cp++, file);
- }
- putc('"', file);
- } else if (type == T_HINFO) {
- (void) fputs("\"?\"", file);
- fprintf(file, "\n;; *** Warning *** OS-type missing");
- }
- break;
-
- case T_SOA:
- putc('\t', file);
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- putc(' ', file);
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- fputs(" (\n", file);
- t = _getlong((u_char*)cp); cp += INT32SZ;
- fprintf(file, "\t\t\t%lu\t; serial\n", (u_long)t);
- t = _getlong((u_char*)cp); cp += INT32SZ;
- fprintf(file, "\t\t\t%lu\t; refresh (%s)\n",
- (u_long)t, __p_time(t));
- t = _getlong((u_char*)cp); cp += INT32SZ;
- fprintf(file, "\t\t\t%lu\t; retry (%s)\n",
- (u_long)t, __p_time(t));
- t = _getlong((u_char*)cp); cp += INT32SZ;
- fprintf(file, "\t\t\t%lu\t; expire (%s)\n",
- (u_long)t, __p_time(t));
- t = _getlong((u_char*)cp); cp += INT32SZ;
- fprintf(file, "\t\t\t%lu )\t; minimum (%s)",
- (u_long)t, __p_time(t));
- break;
-
- case T_MX:
- case T_AFSDB:
- case T_RT:
- fprintf(file, "\t%d ", _getshort((u_char*)cp));
- cp += INT16SZ;
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- break;
-
- case T_PX:
- fprintf(file, "\t%d ", _getshort((u_char*)cp));
- cp += INT16SZ;
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- putc(' ', file);
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- break;
-
- case T_X25:
- cp2 = cp + dlen;
- (void) fputs("\t\"", file);
- if ((n = (unsigned char) *cp++) != 0) {
- for (c = n; c > 0 && cp < cp2; c--) {
- if (strchr("\n\"\\", *cp))
- (void) putc('\\', file);
- (void) putc(*cp++, file);
- }
- }
- putc('"', file);
- break;
-
- case T_TXT:
- (void) putc('\t', file);
- cp2 = cp1 + dlen;
- while (cp < cp2) {
- putc('"', file);
- if ((n = (unsigned char) *cp++) != '\0') {
- for (c = n; c > 0 && cp < cp2; c--) {
- if (strchr("\n\"\\", *cp))
- (void) putc('\\', file);
- (void) putc(*cp++, file);
- }
- }
- putc('"', file);
- if (cp < cp2)
- putc(' ', file);
- }
- break;
-
- case T_NSAP:
- (void) fprintf(file, "\t%s", inet_nsap_ntoa(dlen, cp, NULL));
- cp += dlen;
- break;
-
- case T_AAAA: {
- char t[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
-
- fprintf(file, "\t%s", inet_ntop(AF_INET6, cp, t, sizeof t));
- cp += dlen;
- break;
- }
-
- case T_LOC: {
- char t[255];
-
- fprintf(file, "\t%s", loc_ntoa(cp, t));
- cp += dlen;
- break;
- }
-
- case T_NAPTR: {
- u_int order, preference;
-
- order = _getshort(cp); cp += INT16SZ;
- preference = _getshort(cp); cp += INT16SZ;
- fprintf(file, "\t%u %u ",order, preference);
- /* Flags */
- n = *cp++;
- fprintf(file,"\"%.*s\" ", (int)n, cp);
- cp += n;
- /* Service */
- n = *cp++;
- fprintf(file,"\"%.*s\" ", (int)n, cp);
- cp += n;
- /* Regexp */
- n = *cp++;
- fprintf(file,"\"%.*s\" ", (int)n, cp);
- cp += n;
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- break;
- }
-
- case T_SRV: {
- u_int priority, weight, port;
-
- priority = _getshort(cp); cp += INT16SZ;
- weight = _getshort(cp); cp += INT16SZ;
- port = _getshort(cp); cp += INT16SZ;
- fprintf(file, "\t%u %u %u ", priority, weight, port);
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- break;
- }
-
- case T_MINFO:
- case T_RP:
- putc('\t', file);
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- putc(' ', file);
- if ((cp = p_fqname(cp, msg, file)) == NULL)
- return (NULL);
- break;
-
- case T_UINFO:
- putc('\t', file);
- fputs((char *)cp, file);
- cp += dlen;
- break;
-
- case T_UID:
- case T_GID:
- if (dlen == 4) {
- fprintf(file, "\t%u", _getlong((u_char*)cp));
- cp += INT32SZ;
- }
- break;
-
- case T_WKS:
- if (dlen < INT32SZ + 1)
- break;
- bcopy(cp, (char *)&inaddr, INADDRSZ);
- cp += INT32SZ;
- fprintf(file, "\t%s %s ( ",
- inet_ntoa(inaddr),
- deproto((int) *cp));
- cp += sizeof (u_char);
- n = 0;
- lcnt = 0;
- while (cp < cp1 + dlen) {
- c = *cp++;
- do {
- if (c & 0200) {
- if (lcnt == 0) {
- fputs("\n\t\t\t", file);
- lcnt = 5;
- }
- fputs(dewks(n), file);
- putc(' ', file);
- lcnt--;
- }
- c <<= 1;
- } while (++n & 07);
- }
- putc(')', file);
- break;
-
- case T_KEY:
- putc('\t', file);
- keyflags = _getshort(cp);
- cp += 2;
- fprintf(file,"0x%04x", keyflags ); /* flags */
- fprintf(file," %u", *cp++); /* protocol */
- fprintf(file," %u (", *cp++); /* algorithm */
-
- n = b64_ntop(cp, (cp1 + dlen) - cp,
- base64_key, sizeof base64_key);
- for (c = 0; c < n; ++c) {
- if (0 == (c & 0x3F))
- fprintf(file, "\n\t");
- putc(base64_key[c], file); /* public key data */
- }
-
- fprintf(file, " )");
- if (n < 0)
- fprintf(file, "\t; BAD BASE64");
- fflush(file);
- cp = cp1 + dlen;
- break;
-
- case T_SIG:
- type = _getshort((u_char*)cp);
- cp += INT16SZ;
- fprintf(file, " %s", p_type(type));
- fprintf(file, "\t%d", *cp++); /* algorithm */
- /* Check label value and print error if wrong. */
- n = *cp++;
- c = dn_count_labels (rrname);
- if (n != c)
- fprintf(file, "\t; LABELS WRONG (%d should be %d)\n\t",
- n, c);
- /* orig ttl */
- n = _getlong((u_char*)cp);
- if (n != tmpttl)
- fprintf(file, " %u", n);
- cp += INT32SZ;
- /* sig expire */
- fprintf(file, " (\n\t%s",
- __p_secstodate(_getlong((u_char*)cp)));
- cp += INT32SZ;
- /* time signed */
- fprintf(file, " %s", __p_secstodate(_getlong((u_char*)cp)));
- cp += INT32SZ;
- /* sig footprint */
- fprintf(file," %u ", _getshort((u_char*)cp));
- cp += INT16SZ;
- /* signer's name */
- cp = p_fqname(cp, msg, file);
- n = b64_ntop(cp, (cp1 + dlen) - cp,
- base64_key, sizeof base64_key);
- for (c = 0; c < n; c++) {
- if (0 == (c & 0x3F))
- fprintf (file, "\n\t");
- putc(base64_key[c], file); /* signature */
- }
- /* Clean up... */
- fprintf(file, " )");
- if (n < 0)
- fprintf(file, "\t; BAD BASE64");
- fflush(file);
- cp = cp1+dlen;
- break;
-
-#ifdef ALLOW_T_UNSPEC
- case T_UNSPEC:
- {
- int NumBytes = 8;
- u_char *DataPtr;
- int i;
-
- if (dlen < NumBytes) NumBytes = dlen;
- fprintf(file, "\tFirst %d bytes of hex data:",
- NumBytes);
- for (i = 0, DataPtr = cp; i < NumBytes; i++, DataPtr++)
- fprintf(file, " %x", *DataPtr);
- cp += dlen;
- }
- break;
-#endif /* ALLOW_T_UNSPEC */
-
- default:
- fprintf(file, "\t?%d?", type);
- cp += dlen;
- }
-#if 0
- fprintf(file, "\t; dlen=%d, ttl %s\n", dlen, __p_time(tmpttl));
-#else
- putc('\n', file);
-#endif
- if (cp - cp1 != dlen) {
- fprintf(file, ";; packet size error (found %d, dlen was %d)\n",
- cp - cp1, dlen);
- cp = NULL;
- }
- return (cp);
-}
-
-/*
- * Names of RR classes and qclasses. Classes and qclasses are the same, except
- * that C_ANY is a qclass but not a class. (You can ask for records of class
- * C_ANY, but you can't have any records of that class in the database.)
- */
-const struct res_sym __p_class_syms[] = {
- {C_IN, "IN"},
- {C_CHAOS, "CHAOS"},
- {C_HS, "HS"},
- {C_HS, "HESIOD"},
- {C_ANY, "ANY"},
- {C_IN, (char *)0}
-};
-
-/*
- * Names of RR types and qtypes. Types and qtypes are the same, except
- * that T_ANY is a qtype but not a type. (You can ask for records of type
- * T_ANY, but you can't have any records of that type in the database.)
- */
-const struct res_sym __p_type_syms[] = {
- {T_A, "A", "address"},
- {T_NS, "NS", "name server"},
- {T_MD, "MD", "mail destination (deprecated)"},
- {T_MF, "MF", "mail forwarder (deprecated)"},
- {T_CNAME, "CNAME", "canonical name"},
- {T_SOA, "SOA", "start of authority"},
- {T_MB, "MB", "mailbox"},
- {T_MG, "MG", "mail group member"},
- {T_MR, "MR", "mail rename"},
- {T_NULL, "NULL", "null"},
- {T_WKS, "WKS", "well-known service (deprecated)"},
- {T_PTR, "PTR", "domain name pointer"},
- {T_HINFO, "HINFO", "host information"},
- {T_MINFO, "MINFO", "mailbox information"},
- {T_MX, "MX", "mail exchanger"},
- {T_TXT, "TXT", "text"},
- {T_RP, "RP", "responsible person"},
- {T_AFSDB, "AFSDB", "DCE or AFS server"},
- {T_X25, "X25", "X25 address"},
- {T_ISDN, "ISDN", "ISDN address"},
- {T_RT, "RT", "router"},
- {T_NSAP, "NSAP", "nsap address"},
- {T_NSAP_PTR, "NSAP_PTR", "domain name pointer"},
- {T_SIG, "SIG", "signature"},
- {T_KEY, "KEY", "key"},
- {T_PX, "PX", "mapping information"},
- {T_GPOS, "GPOS", "geographical position (withdrawn)"},
- {T_AAAA, "AAAA", "IPv6 address"},
- {T_LOC, "LOC", "location"},
- {T_NXT, "NXT", "next valid name (unimplemented)"},
- {T_EID, "EID", "endpoint identifier (unimplemented)"},
- {T_NIMLOC, "NIMLOC", "NIMROD locator (unimplemented)"},
- {T_SRV, "SRV", "server selection"},
- {T_ATMA, "ATMA", "ATM address (unimplemented)"},
- {T_IXFR, "IXFR", "incremental zone transfer"},
- {T_AXFR, "AXFR", "zone transfer"},
- {T_MAILB, "MAILB", "mailbox-related data (deprecated)"},
- {T_MAILA, "MAILA", "mail agent (deprecated)"},
- {T_UINFO, "UINFO", "user information (nonstandard)"},
- {T_UID, "UID", "user ID (nonstandard)"},
- {T_GID, "GID", "group ID (nonstandard)"},
- {T_NAPTR, "NAPTR", "URN Naming Authority"},
-#ifdef ALLOW_T_UNSPEC
- {T_UNSPEC, "UNSPEC", "unspecified data (nonstandard)"},
-#endif /* ALLOW_T_UNSPEC */
- {T_ANY, "ANY", "\"any\""},
- {0, NULL, NULL}
-};
-
-int
-__sym_ston(syms, name, success)
- const struct res_sym *syms;
- char *name;
- int *success;
-{
- for (NULL; syms->name != 0; syms++) {
- if (strcasecmp (name, syms->name) == 0) {
- if (success)
- *success = 1;
- return (syms->number);
- }
- }
- if (success)
- *success = 0;
- return (syms->number); /* The default value. */
-}
-
-const char *
-__sym_ntos(syms, number, success)
- const struct res_sym *syms;
- int number;
- int *success;
-{
- static char unname[20];
-
- for (NULL; syms->name != 0; syms++) {
- if (number == syms->number) {
- if (success)
- *success = 1;
- return (syms->name);
- }
- }
-
- sprintf (unname, "%d", number);
- if (success)
- *success = 0;
- return (unname);
-}
-
-
-const char *
-__sym_ntop(syms, number, success)
- const struct res_sym *syms;
- int number;
- int *success;
-{
- static char unname[20];
-
- for (NULL; syms->name != 0; syms++) {
- if (number == syms->number) {
- if (success)
- *success = 1;
- return (syms->humanname);
- }
- }
- sprintf(unname, "%d", number);
- if (success)
- *success = 0;
- return (unname);
-}
-
-/*
- * Return a string for the type
- */
-const char *
-__p_type(type)
- int type;
-{
- return (__sym_ntos (__p_type_syms, type, (int *)0));
-}
-
-/*
- * Return a mnemonic for class
- */
-const char *
-__p_class(class)
- int class;
-{
- return (__sym_ntos (__p_class_syms, class, (int *)0));
-}
-
-/*
- * Return a mnemonic for an option
- */
-const char *
-__p_option(option)
- u_long option;
-{
- static char nbuf[40];
-
- switch (option) {
- case RES_INIT: return "init";
- case RES_DEBUG: return "debug";
- case RES_AAONLY: return "aaonly(unimpl)";
- case RES_USEVC: return "usevc";
- case RES_PRIMARY: return "primry(unimpl)";
- case RES_IGNTC: return "igntc";
- case RES_RECURSE: return "recurs";
- case RES_DEFNAMES: return "defnam";
- case RES_STAYOPEN: return "styopn";
- case RES_DNSRCH: return "dnsrch";
- case RES_INSECURE1: return "insecure1";
- case RES_INSECURE2: return "insecure2";
- default: sprintf(nbuf, "?0x%lx?", (u_long)option);
- return (nbuf);
- }
-}
-
-/*
- * Return a mnemonic for a time to live
- */
-const char *
-p_time(value)
- u_int32_t value;
-{
- static char nbuf[40];
- int secs, mins, hours, days;
- register char *p;
-
- if (value == 0) {
- strcpy(nbuf, "0 secs");
- return (nbuf);
- }
-
- secs = value % 60;
- value /= 60;
- mins = value % 60;
- value /= 60;
- hours = value % 24;
- value /= 24;
- days = value;
- value = 0;
-
-#define PLURALIZE(x) x, (x == 1) ? "" : "s"
- p = nbuf;
- if (days) {
- (void)sprintf(p, "%d day%s", PLURALIZE(days));
- while (*++p);
- }
- if (hours) {
- if (days)
- *p++ = ' ';
- (void)sprintf(p, "%d hour%s", PLURALIZE(hours));
- while (*++p);
- }
- if (mins) {
- if (days || hours)
- *p++ = ' ';
- (void)sprintf(p, "%d min%s", PLURALIZE(mins));
- while (*++p);
- }
- if (secs || ! (days || hours || mins)) {
- if (days || hours || mins)
- *p++ = ' ';
- (void)sprintf(p, "%d sec%s", PLURALIZE(secs));
- }
- return (nbuf);
-}
-
-/*
- * routines to convert between on-the-wire RR format and zone file format.
- * Does not contain conversion to/from decimal degrees; divide or multiply
- * by 60*60*1000 for that.
- */
-
-static unsigned int poweroften[10] = {1, 10, 100, 1000, 10000, 100000,
- 1000000,10000000,100000000,1000000000};
-
-/* takes an XeY precision/size value, returns a string representation. */
-static const char *
-precsize_ntoa(prec)
- u_int8_t prec;
-{
- static char retbuf[sizeof "90000000.00"];
- unsigned long val;
- int mantissa, exponent;
-
- mantissa = (int)((prec >> 4) & 0x0f) % 10;
- exponent = (int)((prec >> 0) & 0x0f) % 10;
-
- val = mantissa * poweroften[exponent];
-
- (void) sprintf(retbuf, "%ld.%.2ld", val/100, val%100);
- return (retbuf);
-}
-
-/* converts ascii size/precision X * 10**Y(cm) to 0xXY. moves pointer. */
-static u_int8_t
-precsize_aton(strptr)
- char **strptr;
-{
- u_int8_t retval = 0;
- char *cp;
- int exponent = 0;
- int mantissa = 0;
-
- cp = *strptr;
- while (isdigit(*cp)) {
- if (mantissa == 0)
- mantissa = *cp - '0';
- else
- exponent++;
- cp++;
- }
-
- if (*cp == '.') {
- cp++;
- if (isdigit(*cp)) {
- if (mantissa == 0)
- mantissa = *cp - '0';
- else
- exponent++;
- cp++;
-
- if (isdigit(*cp)) {
- if (mantissa == 0)
- mantissa = *cp - '0';
- else
- exponent++;
- cp++;
- }
- else
- exponent++;
- }
- }
- else
- exponent += 2;
-
- if (mantissa == 0)
- exponent = 0;
- retval = (mantissa << 4) | exponent;
- *strptr = cp;
- return (retval);
-}
-
-/* converts ascii lat/lon to unsigned encoded 32-bit number. moves pointer. */
-static u_int32_t
-latlon2ul(latlonstrptr,which)
- char **latlonstrptr;
- int *which;
-{
- register char *cp;
- u_int32_t retval;
- int deg = 0, min = 0, secs = 0, secsfrac = 0;
-
- cp = *latlonstrptr;
-
- while (isdigit(*cp))
- deg = deg * 10 + (*cp++ - '0');
-
- while (isspace(*cp))
- cp++;
-
- if (!(isdigit(*cp)))
- goto fndhemi;
-
- while (isdigit(*cp))
- min = min * 10 + (*cp++ - '0');
-
- while (isspace(*cp))
- cp++;
-
- if (!(isdigit(*cp)))
- goto fndhemi;
-
- while (isdigit(*cp))
- secs = secs * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* decimal seconds */
- cp++;
- if (isdigit(*cp)) {
- secsfrac = (*cp++ - '0') * 100;
- if (isdigit(*cp)) {
- secsfrac += (*cp++ - '0') * 10;
- if (isdigit(*cp)) {
- secsfrac += (*cp++ - '0');
- }
- }
- }
- }
-
- while (!isspace(*cp)) /* if any trailing garbage */
- cp++;
-
- while (isspace(*cp))
- cp++;
-
- fndhemi:
- switch (*cp) {
- case 'N': case 'n':
- case 'E': case 'e':
- retval = ((unsigned)1<<31)
- + (((((deg * 60) + min) * 60) + secs) * 1000)
- + secsfrac;
- break;
- case 'S': case 's':
- case 'W': case 'w':
- retval = ((unsigned)1<<31)
- - (((((deg * 60) + min) * 60) + secs) * 1000)
- - secsfrac;
- break;
- default:
- retval = 0; /* invalid value -- indicates error */
- break;
- }
-
- switch (*cp) {
- case 'N': case 'n':
- case 'S': case 's':
- *which = 1; /* latitude */
- break;
- case 'E': case 'e':
- case 'W': case 'w':
- *which = 2; /* longitude */
- break;
- default:
- *which = 0; /* error */
- break;
- }
-
- cp++; /* skip the hemisphere */
-
- while (!isspace(*cp)) /* if any trailing garbage */
- cp++;
-
- while (isspace(*cp)) /* move to next field */
- cp++;
-
- *latlonstrptr = cp;
-
- return (retval);
-}
-
-/* converts a zone file representation in a string to an RDATA on-the-wire
- * representation. */
-int
-loc_aton(ascii, binary)
- const char *ascii;
- u_char *binary;
-{
- const char *cp, *maxcp;
- u_char *bcp;
-
- u_int32_t latit = 0, longit = 0, alt = 0;
- u_int32_t lltemp1 = 0, lltemp2 = 0;
- int altmeters = 0, altfrac = 0, altsign = 1;
- u_int8_t hp = 0x16; /* default = 1e6 cm = 10000.00m = 10km */
- u_int8_t vp = 0x13; /* default = 1e3 cm = 10.00m */
- u_int8_t siz = 0x12; /* default = 1e2 cm = 1.00m */
- int which1 = 0, which2 = 0;
-
- cp = ascii;
- maxcp = cp + strlen(ascii);
-
- lltemp1 = latlon2ul(&cp, &which1);
-
- lltemp2 = latlon2ul(&cp, &which2);
-
- switch (which1 + which2) {
- case 3: /* 1 + 2, the only valid combination */
- if ((which1 == 1) && (which2 == 2)) { /* normal case */
- latit = lltemp1;
- longit = lltemp2;
- } else if ((which1 == 2) && (which2 == 1)) { /* reversed */
- longit = lltemp1;
- latit = lltemp2;
- } else { /* some kind of brokenness */
- return (0);
- }
- break;
- default: /* we didn't get one of each */
- return (0);
- }
-
- /* altitude */
- if (*cp == '-') {
- altsign = -1;
- cp++;
- }
-
- if (*cp == '+')
- cp++;
-
- while (isdigit(*cp))
- altmeters = altmeters * 10 + (*cp++ - '0');
-
- if (*cp == '.') { /* decimal meters */
- cp++;
- if (isdigit(*cp)) {
- altfrac = (*cp++ - '0') * 10;
- if (isdigit(*cp)) {
- altfrac += (*cp++ - '0');
- }
- }
- }
-
- alt = (10000000 + (altsign * (altmeters * 100 + altfrac)));
-
- while (!isspace(*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace(*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- siz = precsize_aton(&cp);
-
- while (!isspace(*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace(*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- hp = precsize_aton(&cp);
-
- while (!isspace(*cp) && (cp < maxcp)) /* if trailing garbage or m */
- cp++;
-
- while (isspace(*cp) && (cp < maxcp))
- cp++;
-
- if (cp >= maxcp)
- goto defaults;
-
- vp = precsize_aton(&cp);
-
- defaults:
-
- bcp = binary;
- *bcp++ = (u_int8_t) 0; /* version byte */
- *bcp++ = siz;
- *bcp++ = hp;
- *bcp++ = vp;
- PUTLONG(latit,bcp);
- PUTLONG(longit,bcp);
- PUTLONG(alt,bcp);
-
- return (16); /* size of RR in octets */
-}
-
-/* takes an on-the-wire LOC RR and formats it in a human readable format. */
-const char *
-loc_ntoa(binary, ascii)
- const u_char *binary;
- char *ascii;
-{
- static char *error = "?";
- register const u_char *cp = binary;
-
- int latdeg, latmin, latsec, latsecfrac;
- int longdeg, longmin, longsec, longsecfrac;
- char northsouth, eastwest;
- int altmeters, altfrac, altsign;
-
- const int referencealt = 100000 * 100;
-
- int32_t latval, longval, altval;
- u_int32_t templ;
- u_int8_t sizeval, hpval, vpval, versionval;
-
- char *sizestr, *hpstr, *vpstr;
-
- versionval = *cp++;
-
- if (versionval) {
- sprintf(ascii, "; error: unknown LOC RR version");
- return (ascii);
- }
-
- sizeval = *cp++;
-
- hpval = *cp++;
- vpval = *cp++;
-
- GETLONG(templ, cp);
- latval = (templ - ((unsigned)1<<31));
-
- GETLONG(templ, cp);
- longval = (templ - ((unsigned)1<<31));
-
- GETLONG(templ, cp);
- if (templ < referencealt) { /* below WGS 84 spheroid */
- altval = referencealt - templ;
- altsign = -1;
- } else {
- altval = templ - referencealt;
- altsign = 1;
- }
-
- if (latval < 0) {
- northsouth = 'S';
- latval = -latval;
- } else
- northsouth = 'N';
-
- latsecfrac = latval % 1000;
- latval = latval / 1000;
- latsec = latval % 60;
- latval = latval / 60;
- latmin = latval % 60;
- latval = latval / 60;
- latdeg = latval;
-
- if (longval < 0) {
- eastwest = 'W';
- longval = -longval;
- } else
- eastwest = 'E';
-
- longsecfrac = longval % 1000;
- longval = longval / 1000;
- longsec = longval % 60;
- longval = longval / 60;
- longmin = longval % 60;
- longval = longval / 60;
- longdeg = longval;
-
- altfrac = altval % 100;
- altmeters = (altval / 100) * altsign;
-
- if ((sizestr = strdup(precsize_ntoa(sizeval))) == NULL)
- sizestr = error;
- if ((hpstr = strdup(precsize_ntoa(hpval))) == NULL)
- hpstr = error;
- if ((vpstr = strdup(precsize_ntoa(vpval))) == NULL)
- vpstr = error;
-
- sprintf(ascii,
- "%d %.2d %.2d.%.3d %c %d %.2d %.2d.%.3d %c %d.%.2dm %sm %sm %sm",
- latdeg, latmin, latsec, latsecfrac, northsouth,
- longdeg, longmin, longsec, longsecfrac, eastwest,
- altmeters, altfrac, sizestr, hpstr, vpstr);
-
- if (sizestr != error)
- free(sizestr);
- if (hpstr != error)
- free(hpstr);
- if (vpstr != error)
- free(vpstr);
-
- return (ascii);
-}
-
-
-/* Return the number of DNS hierarchy levels in the name. */
-int
-__dn_count_labels(name)
- char *name;
-{
- int i, len, count;
-
- len = strlen(name);
-
- for(i = 0, count = 0; i < len; i++) {
- if (name[i] == '.')
- count++;
- }
-
- /* don't count initial wildcard */
- if (name[0] == '*')
- if (count)
- count--;
-
- /* don't count the null label for root. */
- /* if terminating '.' not found, must adjust */
- /* count to include last label */
- if (len > 0 && name[len-1] != '.')
- count++;
- return (count);
-}
-
-
-/*
- * Make dates expressed in seconds-since-Jan-1-1970 easy to read.
- * SIG records are required to be printed like this, by the Secure DNS RFC.
- */
-char *
-__p_secstodate (secs)
- unsigned long secs;
-{
- static char output[15]; /* YYYYMMDDHHMMSS and null */
- time_t clock = secs;
- struct tm *time;
-
- time = gmtime(&clock);
- time->tm_year += 1900;
- time->tm_mon += 1;
- sprintf(output, "%04d%02d%02d%02d%02d%02d",
- time->tm_year, time->tm_mon, time->tm_mday,
- time->tm_hour, time->tm_min, time->tm_sec);
- return (output);
-}
diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c
deleted file mode 100644
index bf12280..0000000
--- a/lib/libc/net/res_init.c
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * ++Copyright++ 1985, 1989, 1993
- * -
- * Copyright (c) 1985, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static char orig_rcsid[] = "From: Id: res_init.c,v 8.8 1997/06/01 20:34:37 vixie Exp";
-static char rcsid[] = "$Id: res_init.c,v 1.13 1997/06/27 08:22:03 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "res_config.h"
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <ctype.h>
-#include <resolv.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-static void res_setoptions __P((char *, char *));
-
-#ifdef RESOLVSORT
-static const char sort_mask[] = "/&";
-#define ISSORTMASK(ch) (strchr(sort_mask, ch) != NULL)
-static u_int32_t net_mask __P((struct in_addr));
-#endif
-
-/*
- * Resolver state default settings.
- */
-
-struct __res_state _res
-# if defined(__BIND_RES_TEXT)
- = { RES_TIMEOUT, } /* Motorola, et al. */
-# endif
- ;
-
-/*
- * Set up default settings. If the configuration file exist, the values
- * there will have precedence. Otherwise, the server address is set to
- * INADDR_ANY and the default domain name comes from the gethostname().
- *
- * An interrim version of this code (BIND 4.9, pre-4.4BSD) used 127.0.0.1
- * rather than INADDR_ANY ("0.0.0.0") as the default name server address
- * since it was noted that INADDR_ANY actually meant ``the first interface
- * you "ifconfig"'d at boot time'' and if this was a SLIP or PPP interface,
- * it had to be "up" in order for you to reach your own name server. It
- * was later decided that since the recommended practice is to always
- * install local static routes through 127.0.0.1 for all your network
- * interfaces, that we could solve this problem without a code change.
- *
- * The configuration file should always be used, since it is the only way
- * to specify a default domain. If you are running a server on your local
- * machine, you should say "nameserver 0.0.0.0" or "nameserver 127.0.0.1"
- * in the configuration file.
- *
- * Return 0 if completes successfully, -1 on error
- */
-int
-res_init()
-{
- register FILE *fp;
- register char *cp, **pp;
- register int n;
- char buf[MAXDNAME];
- int nserv = 0; /* number of nameserver records read from file */
- int haveenv = 0;
- int havesearch = 0;
-#ifdef RESOLVSORT
- int nsort = 0;
- char *net;
-#endif
-#ifndef RFC1535
- int dots;
-#endif
-
- /*
- * These three fields used to be statically initialized. This made
- * it hard to use this code in a shared library. It is necessary,
- * now that we're doing dynamic initialization here, that we preserve
- * the old semantics: if an application modifies one of these three
- * fields of _res before res_init() is called, res_init() will not
- * alter them. Of course, if an application is setting them to
- * _zero_ before calling res_init(), hoping to override what used
- * to be the static default, we can't detect it and unexpected results
- * will follow. Zero for any of these fields would make no sense,
- * so one can safely assume that the applications were already getting
- * unexpected results.
- *
- * _res.options is tricky since some apps were known to diddle the bits
- * before res_init() was first called. We can't replicate that semantic
- * with dynamic initialization (they may have turned bits off that are
- * set in RES_DEFAULT). Our solution is to declare such applications
- * "broken". They could fool us by setting RES_INIT but none do (yet).
- */
- if (!_res.retrans)
- _res.retrans = RES_TIMEOUT;
- if (!_res.retry)
- _res.retry = 4;
- if (!(_res.options & RES_INIT))
- _res.options = RES_DEFAULT;
-
- /*
- * This one used to initialize implicitly to zero, so unless the app
- * has set it to something in particular, we can randomize it now.
- */
- if (!_res.id)
- _res.id = res_randomid();
-
-#ifdef USELOOPBACK
- _res.nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
-#else
- _res.nsaddr.sin_addr.s_addr = INADDR_ANY;
-#endif
- _res.nsaddr.sin_family = AF_INET;
- _res.nsaddr.sin_port = htons(NAMESERVER_PORT);
- _res.nscount = 1;
- _res.ndots = 1;
- _res.pfcode = 0;
-
- /* Allow user to override the local domain definition */
- if ((cp = getenv("LOCALDOMAIN")) != NULL) {
- (void)strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- haveenv++;
-
- /*
- * Set search list to be blank-separated strings
- * from rest of env value. Permits users of LOCALDOMAIN
- * to still have a search list, and anyone to set the
- * one that they want to use as an individual (even more
- * important now that the rfc1535 stuff restricts searches)
- */
- cp = _res.defdname;
- pp = _res.dnsrch;
- *pp++ = cp;
- for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) {
- if (*cp == '\n') /* silly backwards compat */
- break;
- else if (*cp == ' ' || *cp == '\t') {
- *cp = 0;
- n = 1;
- } else if (n) {
- *pp++ = cp;
- n = 0;
- havesearch = 1;
- }
- }
- /* null terminate last domain if there are excess */
- while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n')
- cp++;
- *cp = '\0';
- *pp++ = 0;
- }
-
-#define MATCH(line, name) \
- (!strncmp(line, name, sizeof(name) - 1) && \
- (line[sizeof(name) - 1] == ' ' || \
- line[sizeof(name) - 1] == '\t'))
-
- if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
- /* read the config file */
- while (fgets(buf, sizeof(buf), fp) != NULL) {
- /* skip comments */
- if (*buf == ';' || *buf == '#')
- continue;
- /* read default domain name */
- if (MATCH(buf, "domain")) {
- if (haveenv) /* skip if have from environ */
- continue;
- cp = buf + sizeof("domain") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp == '\0') || (*cp == '\n'))
- continue;
- strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- if ((cp = strpbrk(_res.defdname, " \t\n")) != NULL)
- *cp = '\0';
- havesearch = 0;
- continue;
- }
- /* set search list */
- if (MATCH(buf, "search")) {
- if (haveenv) /* skip if have from environ */
- continue;
- cp = buf + sizeof("search") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp == '\0') || (*cp == '\n'))
- continue;
- strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1);
- if ((cp = strchr(_res.defdname, '\n')) != NULL)
- *cp = '\0';
- /*
- * Set search list to be blank-separated strings
- * on rest of line.
- */
- cp = _res.defdname;
- pp = _res.dnsrch;
- *pp++ = cp;
- for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) {
- if (*cp == ' ' || *cp == '\t') {
- *cp = 0;
- n = 1;
- } else if (n) {
- *pp++ = cp;
- n = 0;
- }
- }
- /* null terminate last domain if there are excess */
- while (*cp != '\0' && *cp != ' ' && *cp != '\t')
- cp++;
- *cp = '\0';
- *pp++ = 0;
- havesearch = 1;
- continue;
- }
- /* read nameservers to query */
- if (MATCH(buf, "nameserver") && nserv < MAXNS) {
- struct in_addr a;
-
- cp = buf + sizeof("nameserver") - 1;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if ((*cp != '\0') && (*cp != '\n') && inet_aton(cp, &a)) {
- _res.nsaddr_list[nserv].sin_addr = a;
- _res.nsaddr_list[nserv].sin_family = AF_INET;
- _res.nsaddr_list[nserv].sin_port =
- htons(NAMESERVER_PORT);
- nserv++;
- }
- continue;
- }
-#ifdef RESOLVSORT
- if (MATCH(buf, "sortlist")) {
- struct in_addr a;
-
- cp = buf + sizeof("sortlist") - 1;
- while (nsort < MAXRESOLVSORT) {
- while (*cp == ' ' || *cp == '\t')
- cp++;
- if (*cp == '\0' || *cp == '\n' || *cp == ';')
- break;
- net = cp;
- while (*cp && !ISSORTMASK(*cp) && *cp != ';' &&
- isascii(*cp) && !isspace(*cp))
- cp++;
- n = *cp;
- *cp = 0;
- if (inet_aton(net, &a)) {
- _res.sort_list[nsort].addr = a;
- if (ISSORTMASK(n)) {
- *cp++ = n;
- net = cp;
- while (*cp && *cp != ';' &&
- isascii(*cp) && !isspace(*cp))
- cp++;
- n = *cp;
- *cp = 0;
- if (inet_aton(net, &a)) {
- _res.sort_list[nsort].mask = a.s_addr;
- } else {
- _res.sort_list[nsort].mask =
- net_mask(_res.sort_list[nsort].addr);
- }
- } else {
- _res.sort_list[nsort].mask =
- net_mask(_res.sort_list[nsort].addr);
- }
- nsort++;
- }
- *cp = n;
- }
- continue;
- }
-#endif
- if (MATCH(buf, "options")) {
- res_setoptions(buf + sizeof("options") - 1, "conf");
- continue;
- }
- }
- if (nserv > 1)
- _res.nscount = nserv;
-#ifdef RESOLVSORT
- _res.nsort = nsort;
-#endif
- (void) fclose(fp);
- }
- if (_res.defdname[0] == 0 &&
- gethostname(buf, sizeof(_res.defdname) - 1) == 0 &&
- (cp = strchr(buf, '.')) != NULL)
- strcpy(_res.defdname, cp + 1);
-
- /* find components of local domain that might be searched */
- if (havesearch == 0) {
- pp = _res.dnsrch;
- *pp++ = _res.defdname;
- *pp = NULL;
-
-#ifndef RFC1535
- dots = 0;
- for (cp = _res.defdname; *cp; cp++)
- dots += (*cp == '.');
-
- cp = _res.defdname;
- while (pp < _res.dnsrch + MAXDFLSRCH) {
- if (dots < LOCALDOMAINPARTS)
- break;
- cp = strchr(cp, '.') + 1; /* we know there is one */
- *pp++ = cp;
- dots--;
- }
- *pp = NULL;
-#ifdef DEBUG
- if (_res.options & RES_DEBUG) {
- printf(";; res_init()... default dnsrch list:\n");
- for (pp = _res.dnsrch; *pp; pp++)
- printf(";;\t%s\n", *pp);
- printf(";;\t..END..\n");
- }
-#endif /* DEBUG */
-#endif /* !RFC1535 */
- }
-
- if ((cp = getenv("RES_OPTIONS")) != NULL)
- res_setoptions(cp, "env");
- _res.options |= RES_INIT;
- return (0);
-}
-
-static void
-res_setoptions(options, source)
- char *options, *source;
-{
- char *cp = options;
- int i;
-
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_setoptions(\"%s\", \"%s\")...\n",
- options, source);
-#endif
- while (*cp) {
- /* skip leading and inner runs of spaces */
- while (*cp == ' ' || *cp == '\t')
- cp++;
- /* search for and process individual options */
- if (!strncmp(cp, "ndots:", sizeof("ndots:") - 1)) {
- i = atoi(cp + sizeof("ndots:") - 1);
- if (i <= RES_MAXNDOTS)
- _res.ndots = i;
- else
- _res.ndots = RES_MAXNDOTS;
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";;\tndots=%d\n", _res.ndots);
-#endif
- } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
-#ifdef DEBUG
- if (!(_res.options & RES_DEBUG)) {
- printf(";; res_setoptions(\"%s\", \"%s\")..\n",
- options, source);
- _res.options |= RES_DEBUG;
- }
- printf(";;\tdebug\n");
-#endif
- } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
- _res.options |= RES_USE_INET6;
- } else if (!strncmp(cp, "no_tld_query", sizeof("no_tld_query") - 1)) {
- _res.options |= RES_NOTLDQUERY;
- } else {
- /* XXX - print a warning here? */
- }
- /* skip to next run of spaces */
- while (*cp && *cp != ' ' && *cp != '\t')
- cp++;
- }
-}
-
-#ifdef RESOLVSORT
-/* XXX - should really support CIDR which means explicit masks always. */
-static u_int32_t
-net_mask(in) /* XXX - should really use system's version of this */
- struct in_addr in;
-{
- register u_int32_t i = ntohl(in.s_addr);
-
- if (IN_CLASSA(i))
- return (htonl(IN_CLASSA_NET));
- else if (IN_CLASSB(i))
- return (htonl(IN_CLASSB_NET));
- return (htonl(IN_CLASSC_NET));
-}
-#endif
-
-u_int
-res_randomid()
-{
- struct timeval now;
-
- gettimeofday(&now, NULL);
- return (0xffff & (now.tv_sec ^ now.tv_usec ^ getpid()));
-}
diff --git a/lib/libc/net/res_mkquery.c b/lib/libc/net/res_mkquery.c
deleted file mode 100644
index cfc9d33..0000000
--- a/lib/libc/net/res_mkquery.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * ++Copyright++ 1985, 1993
- * -
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_mkquery.c,v 8.5 1996/08/27 08:33:28 vixie Exp ";
-static char rcsid[] = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-
-#include "res_config.h"
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <string.h>
-
-
-/*
- * Form all types of queries.
- * Returns the size of the result or -1.
- */
-int
-res_mkquery(op, dname, class, type, data, datalen, newrr_in, buf, buflen)
- int op; /* opcode of query */
- const char *dname; /* domain name */
- int class, type; /* class and type of query */
- const u_char *data; /* resource record data */
- int datalen; /* length of data */
- const u_char *newrr_in; /* new rr for modify or append */
- u_char *buf; /* buffer to put query */
- int buflen; /* size of buffer */
-{
- register HEADER *hp;
- register u_char *cp;
- register int n;
- u_char *dnptrs[20], **dpp, **lastdnptr;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_mkquery(%d, %s, %d, %d)\n",
- op, dname, class, type);
-#endif
- /*
- * Initialize header fields.
- */
- if ((buf == NULL) || (buflen < HFIXEDSZ))
- return (-1);
- bzero(buf, HFIXEDSZ);
- hp = (HEADER *) buf;
- hp->id = htons(++_res.id);
- hp->opcode = op;
- hp->rd = (_res.options & RES_RECURSE) != 0;
- hp->rcode = NOERROR;
- cp = buf + HFIXEDSZ;
- buflen -= HFIXEDSZ;
- dpp = dnptrs;
- *dpp++ = buf;
- *dpp++ = NULL;
- lastdnptr = dnptrs + sizeof dnptrs / sizeof dnptrs[0];
- /*
- * perform opcode specific processing
- */
- switch (op) {
- case QUERY: /*FALLTHROUGH*/
- case NS_NOTIFY_OP:
- if ((buflen -= QFIXEDSZ) < 0)
- return (-1);
- if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
- return (-1);
- cp += n;
- buflen -= n;
- __putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- hp->qdcount = htons(1);
- if (op == QUERY || data == NULL)
- break;
- /*
- * Make an additional record for completion domain.
- */
- buflen -= RRFIXEDSZ;
- n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr);
- if (n < 0)
- return (-1);
- cp += n;
- buflen -= n;
- __putshort(T_NULL, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(0, cp);
- cp += INT16SZ;
- hp->arcount = htons(1);
- break;
-
- case IQUERY:
- /*
- * Initialize answer section
- */
- if (buflen < 1 + RRFIXEDSZ + datalen)
- return (-1);
- *cp++ = '\0'; /* no domain name */
- __putshort(type, cp);
- cp += INT16SZ;
- __putshort(class, cp);
- cp += INT16SZ;
- __putlong(0, cp);
- cp += INT32SZ;
- __putshort(datalen, cp);
- cp += INT16SZ;
- if (datalen) {
- bcopy(data, cp, datalen);
- cp += datalen;
- }
- hp->ancount = htons(1);
- break;
-
- default:
- return (-1);
- }
- return (cp - buf);
-}
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c
deleted file mode 100644
index 3716e63..0000000
--- a/lib/libc/net/res_query.c
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * ++Copyright++ 1988, 1993
- * -
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid = "From: Id: res_query.c,v 8.10 1997/06/01 20:34:37 vixie Exp";
-static char rcsid[] = "$Id: res_query.c,v 1.14 1997/06/27 08:22:03 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "res_config.h"
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if PACKETSZ > 1024
-#define MAXPACKET PACKETSZ
-#else
-#define MAXPACKET 1024
-#endif
-
-const char *hostalias __P((const char *));
-int h_errno;
-
-/*
- * Formulate a normal query, send, and await answer.
- * Returned answer is placed in supplied buffer "answer".
- * Perform preliminary check of answer, returning success only
- * if no error is indicated and the answer count is nonzero.
- * Return the size of the response on success, -1 on error.
- * Error number is left in h_errno.
- *
- * Caller must parse answer and determine whether it answers the question.
- */
-int
-res_query(name, class, type, answer, anslen)
- const char *name; /* domain name */
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer buffer */
-{
- u_char buf[MAXPACKET];
- register HEADER *hp = (HEADER *) answer;
- int n;
-
- hp->rcode = NOERROR; /* default */
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query(%s, %d, %d)\n", name, class, type);
-#endif
-
- n = res_mkquery(QUERY, name, class, type, NULL, 0, NULL,
- buf, sizeof(buf));
- if (n <= 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: mkquery failed\n");
-#endif
- h_errno = NO_RECOVERY;
- return (n);
- }
- n = res_send(buf, n, answer, anslen);
- if (n < 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_query: send error\n");
-#endif
- h_errno = TRY_AGAIN;
- return (n);
- }
-
- if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; rcode = %d, ancount=%d\n", hp->rcode,
- ntohs(hp->ancount));
-#endif
- switch (hp->rcode) {
- case NXDOMAIN:
- h_errno = HOST_NOT_FOUND;
- break;
- case SERVFAIL:
- h_errno = TRY_AGAIN;
- break;
- case NOERROR:
- h_errno = NO_DATA;
- break;
- case FORMERR:
- case NOTIMP:
- case REFUSED:
- default:
- h_errno = NO_RECOVERY;
- break;
- }
- return (-1);
- }
- return (n);
-}
-
-/*
- * Formulate a normal query, send, and retrieve answer in supplied buffer.
- * Return the size of the response on success, -1 on error.
- * If enabled, implement search rules until answer or unrecoverable failure
- * is detected. Error code, if any, is left in h_errno.
- */
-int
-res_search(name, class, type, answer, anslen)
- const char *name; /* domain name */
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer */
-{
- register const char *cp, * const *domain;
- HEADER *hp = (HEADER *) answer;
- u_int dots;
- int trailing_dot, ret, saved_herrno;
- int got_nodata = 0, got_servfail = 0, tried_as_is = 0;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
- errno = 0;
- h_errno = HOST_NOT_FOUND; /* default, if we never query */
- dots = 0;
- for (cp = name; *cp; cp++)
- dots += (*cp == '.');
- trailing_dot = 0;
- if (cp > name && *--cp == '.')
- trailing_dot++;
-
- /*
- * if there aren't any dots, it could be a user-level alias
- */
- if (!dots && (cp = __hostalias(name)) != NULL)
- return (res_query(cp, class, type, answer, anslen));
-
- /*
- * If there are dots in the name already, let's just give it a try
- * 'as is'. The threshold can be set with the "ndots" option.
- */
- saved_herrno = -1;
- if (dots >= _res.ndots) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
- if (ret > 0)
- return (ret);
- saved_herrno = h_errno;
- tried_as_is++;
- }
-
- /*
- * We do at least one level of search if
- * - there is no dot and RES_DEFNAME is set, or
- * - there is at least one dot, there is no trailing dot,
- * and RES_DNSRCH is set.
- */
- if ((!dots && (_res.options & RES_DEFNAMES)) ||
- (dots && !trailing_dot && (_res.options & RES_DNSRCH))) {
- int done = 0;
-
- for (domain = (const char * const *)_res.dnsrch;
- *domain && !done;
- domain++) {
-
- ret = res_querydomain(name, *domain, class, type,
- answer, anslen);
- if (ret > 0)
- return (ret);
-
- /*
- * If no server present, give up.
- * If name isn't found in this domain,
- * keep trying higher domains in the search list
- * (if that's enabled).
- * On a NO_DATA error, keep trying, otherwise
- * a wildcard entry of another type could keep us
- * from finding this entry higher in the domain.
- * If we get some other error (negative answer or
- * server failure), then stop searching up,
- * but try the input name below in case it's
- * fully-qualified.
- */
- if (errno == ECONNREFUSED) {
- h_errno = TRY_AGAIN;
- return (-1);
- }
-
- switch (h_errno) {
- case NO_DATA:
- got_nodata++;
- /* FALLTHROUGH */
- case HOST_NOT_FOUND:
- /* keep trying */
- break;
- case TRY_AGAIN:
- if (hp->rcode == SERVFAIL) {
- /* try next search element, if any */
- got_servfail++;
- break;
- }
- /* FALLTHROUGH */
- default:
- /* anything else implies that we're done */
- done++;
- }
-
- /* if we got here for some reason other than DNSRCH,
- * we only wanted one iteration of the loop, so stop.
- */
- if (!(_res.options & RES_DNSRCH))
- done++;
- }
- }
-
- /* if we have not already tried the name "as is", do that now.
- * note that we do this regardless of how many dots were in the
- * name or whether it ends with a dot unless NOTLDQUERY is set.
- */
- if (!tried_as_is && (dots || !(_res.options & RES_NOTLDQUERY))) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
- if (ret > 0)
- return (ret);
- }
-
- /* if we got here, we didn't satisfy the search.
- * if we did an initial full query, return that query's h_errno
- * (note that we wouldn't be here if that query had succeeded).
- * else if we ever got a nodata, send that back as the reason.
- * else send back meaningless h_errno, that being the one from
- * the last DNSRCH we did.
- */
- if (saved_herrno != -1)
- h_errno = saved_herrno;
- else if (got_nodata)
- h_errno = NO_DATA;
- else if (got_servfail)
- h_errno = TRY_AGAIN;
- return (-1);
-}
-
-/*
- * Perform a call on res_query on the concatenation of name and domain,
- * removing a trailing dot from name if domain is NULL.
- */
-int
-res_querydomain(name, domain, class, type, answer, anslen)
- const char *name, *domain;
- int class, type; /* class and type of query */
- u_char *answer; /* buffer to put answer */
- int anslen; /* size of answer */
-{
- char nbuf[MAXDNAME];
- const char *longname = nbuf;
- int n, d;
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
- return (-1);
- }
-#ifdef DEBUG
- if (_res.options & RES_DEBUG)
- printf(";; res_querydomain(%s, %s, %d, %d)\n",
- name, domain?domain:"<Nil>", class, type);
-#endif
- if (domain == NULL) {
- /*
- * Check for trailing '.';
- * copy without '.' if present.
- */
- n = strlen(name);
- if (n >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- n--;
- if (n >= 0 && name[n] == '.') {
- strncpy(nbuf, name, n);
- nbuf[n] = '\0';
- } else
- longname = name;
- } else {
- n = strlen(name);
- d = strlen(domain);
- if (n + d + 1 >= MAXDNAME) {
- h_errno = NO_RECOVERY;
- return (-1);
- }
- sprintf(nbuf, "%s.%s", name, domain);
- }
- return (res_query(longname, class, type, answer, anslen));
-}
-
-const char *
-hostalias(name)
- register const char *name;
-{
- register char *cp1, *cp2;
- FILE *fp;
- char *file;
- char buf[BUFSIZ];
- static char abuf[MAXDNAME];
-
- if (_res.options & RES_NOALIASES)
- return (NULL);
- /* XXX issetguid() would be better here, but we don't have that. */
- if (getuid() != geteuid() || getgid() != getegid())
- return (NULL);
- file = getenv("HOSTALIASES");
- if (file == NULL || (fp = fopen(file, "r")) == NULL)
- return (NULL);
- setbuf(fp, NULL);
- buf[sizeof(buf) - 1] = '\0';
- while (fgets(buf, sizeof(buf), fp)) {
- for (cp1 = buf; *cp1 && !isspace(*cp1); ++cp1)
- ;
- if (!*cp1)
- break;
- *cp1 = '\0';
- if (!strcasecmp(buf, name)) {
- while (isspace(*++cp1))
- ;
- if (!*cp1)
- break;
- for (cp2 = cp1 + 1; *cp2 && !isspace(*cp2); ++cp2)
- ;
- abuf[sizeof(abuf) - 1] = *cp2 = '\0';
- strncpy(abuf, cp1, sizeof(abuf) - 1);
- fclose(fp);
- return (abuf);
- }
- }
- fclose(fp);
- return (NULL);
-}
diff --git a/lib/libc/net/res_send.c b/lib/libc/net/res_send.c
deleted file mode 100644
index 70a5c17..0000000
--- a/lib/libc/net/res_send.c
+++ /dev/null
@@ -1,810 +0,0 @@
-/*
- * ++Copyright++ 1985, 1989, 1993
- * -
- * Copyright (c) 1985, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * -
- * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies, and that
- * the name of Digital Equipment Corporation not be used in advertising or
- * publicity pertaining to distribution of the document or software without
- * specific, written prior permission.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
- * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
- * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, 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.
- * -
- * --Copyright--
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static char orig_rcsid[] = "From: Id: res_send.c,v 8.13 1997/06/01 20:34:37 vixie Exp";
-static char rcsid[] = "$Id: res_send.c,v 1.19 1997/09/14 09:44:34 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Send query to name server and wait for reply.
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "res_config.h"
-#include <arpa/nameser.h>
-
-#include <stdio.h>
-#include <netdb.h>
-#include <errno.h>
-#include <resolv.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <poll.h>
-
-static int use_poll = 1; /* adapt to poll() syscall availability */
- /* 0 = not present, 1 = try it, 2 = exists */
-
-static int s = -1; /* socket used for communications */
-static int connected = 0; /* is the socket connected */
-static int vc = 0; /* is the socket a virtual ciruit? */
-
-#define CAN_RECONNECT 1
-
-#ifndef DEBUG
-# define Dprint(cond, args) /*empty*/
-# define DprintQ(cond, args, query, size) /*empty*/
-# define Aerror(file, string, error, address) /*empty*/
-# define Perror(file, string, error) /*empty*/
-#else
-# define Dprint(cond, args) if (cond) {fprintf args;} else {}
-# define DprintQ(cond, args, query, size) if (cond) {\
- fprintf args;\
- __fp_nquery(query, size, stdout);\
- } else {}
- static void
- Aerror(file, string, error, address)
- FILE *file;
- char *string;
- int error;
- struct sockaddr_in address;
- {
- int save = errno;
-
- if (_res.options & RES_DEBUG) {
- fprintf(file, "res_send: %s ([%s].%u): %s\n",
- string,
- inet_ntoa(address.sin_addr),
- ntohs(address.sin_port),
- strerror(error));
- }
- errno = save;
- }
- static void
- Perror(file, string, error)
- FILE *file;
- char *string;
- int error;
- {
- int save = errno;
-
- if (_res.options & RES_DEBUG) {
- fprintf(file, "res_send: %s: %s\n",
- string, strerror(error));
- }
- errno = save;
- }
-#endif
-
-static res_send_qhook Qhook = NULL;
-static res_send_rhook Rhook = NULL;
-
-void
-res_send_setqhook(hook)
- res_send_qhook hook;
-{
-
- Qhook = hook;
-}
-
-void
-res_send_setrhook(hook)
- res_send_rhook hook;
-{
-
- Rhook = hook;
-}
-
-/* int
- * res_isourserver(ina)
- * looks up "ina" in _res.ns_addr_list[]
- * returns:
- * 0 : not found
- * >0 : found
- * author:
- * paul vixie, 29may94
- */
-int
-res_isourserver(inp)
- const struct sockaddr_in *inp;
-{
- struct sockaddr_in ina;
- register int ns, ret;
-
- ina = *inp;
- ret = 0;
- for (ns = 0; ns < _res.nscount; ns++) {
- register const struct sockaddr_in *srv = &_res.nsaddr_list[ns];
-
- if (srv->sin_family == ina.sin_family &&
- srv->sin_port == ina.sin_port &&
- (srv->sin_addr.s_addr == INADDR_ANY ||
- srv->sin_addr.s_addr == ina.sin_addr.s_addr)) {
- ret++;
- break;
- }
- }
- return (ret);
-}
-
-/* int
- * res_nameinquery(name, type, class, buf, eom)
- * look for (name,type,class) in the query section of packet (buf,eom)
- * returns:
- * -1 : format error
- * 0 : not found
- * >0 : found
- * author:
- * paul vixie, 29may94
- */
-int
-res_nameinquery(name, type, class, buf, eom)
- const char *name;
- register int type, class;
- const u_char *buf, *eom;
-{
- register const u_char *cp = buf + HFIXEDSZ;
- int qdcount = ntohs(((HEADER*)buf)->qdcount);
-
- while (qdcount-- > 0) {
- char tname[MAXDNAME+1];
- register int n, ttype, tclass;
-
- n = dn_expand(buf, eom, cp, tname, sizeof tname);
- if (n < 0)
- return (-1);
- cp += n;
- ttype = _getshort(cp); cp += INT16SZ;
- tclass = _getshort(cp); cp += INT16SZ;
- if (ttype == type &&
- tclass == class &&
- strcasecmp(tname, name) == 0)
- return (1);
- }
- return (0);
-}
-
-/* int
- * res_queriesmatch(buf1, eom1, buf2, eom2)
- * is there a 1:1 mapping of (name,type,class)
- * in (buf1,eom1) and (buf2,eom2)?
- * returns:
- * -1 : format error
- * 0 : not a 1:1 mapping
- * >0 : is a 1:1 mapping
- * author:
- * paul vixie, 29may94
- */
-int
-res_queriesmatch(buf1, eom1, buf2, eom2)
- const u_char *buf1, *eom1;
- const u_char *buf2, *eom2;
-{
- register const u_char *cp = buf1 + HFIXEDSZ;
- int qdcount = ntohs(((HEADER*)buf1)->qdcount);
-
- if (qdcount != ntohs(((HEADER*)buf2)->qdcount))
- return (0);
- while (qdcount-- > 0) {
- char tname[MAXDNAME+1];
- register int n, ttype, tclass;
-
- n = dn_expand(buf1, eom1, cp, tname, sizeof tname);
- if (n < 0)
- return (-1);
- cp += n;
- ttype = _getshort(cp); cp += INT16SZ;
- tclass = _getshort(cp); cp += INT16SZ;
- if (!res_nameinquery(tname, ttype, tclass, buf2, eom2))
- return (0);
- }
- return (1);
-}
-
-int
-res_send(buf, buflen, ans, anssiz)
- const u_char *buf;
- int buflen;
- u_char *ans;
- int anssiz;
-{
- HEADER *hp = (HEADER *) buf;
- HEADER *anhp = (HEADER *) ans;
- int gotsomewhere, connreset, terrno, try, v_circuit, resplen, ns;
- register int n;
- u_int badns; /* XXX NSMAX can't exceed #/bits in this var */
-
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- /* errno should have been set by res_init() in this case. */
- return (-1);
- }
- DprintQ((_res.options & RES_DEBUG) || (_res.pfcode & RES_PRF_QUERY),
- (stdout, ";; res_send()\n"), buf, buflen);
- v_circuit = (_res.options & RES_USEVC) || buflen > PACKETSZ;
- gotsomewhere = 0;
- connreset = 0;
- terrno = ETIMEDOUT;
- badns = 0;
-
- /*
- * Send request, RETRY times, or until successful
- */
- for (try = 0; try < _res.retry; try++) {
- for (ns = 0; ns < _res.nscount; ns++) {
- struct sockaddr_in *nsap = &_res.nsaddr_list[ns];
- same_ns:
- if (badns & (1 << ns)) {
- res_close();
- goto next_ns;
- }
-
- if (Qhook) {
- int done = 0, loops = 0;
-
- do {
- res_sendhookact act;
-
- act = (*Qhook)(&nsap, &buf, &buflen,
- ans, anssiz, &resplen);
- switch (act) {
- case res_goahead:
- done = 1;
- break;
- case res_nextns:
- res_close();
- goto next_ns;
- case res_done:
- return (resplen);
- case res_modified:
- /* give the hook another try */
- if (++loops < 42) /*doug adams*/
- break;
- /*FALLTHROUGH*/
- case res_error:
- /*FALLTHROUGH*/
- default:
- return (-1);
- }
- } while (!done);
- }
-
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; Querying server (# %d) address = %s\n",
- ns + 1, inet_ntoa(nsap->sin_addr)));
-
- if (v_circuit) {
- int truncated;
- struct iovec iov[2];
- u_short len;
- u_char *cp;
-
- /*
- * Use virtual circuit;
- * at most one attempt per server.
- */
- try = _res.retry;
- truncated = 0;
- if ((s < 0) || (!vc)) {
- if (s >= 0)
- res_close();
-
- s = socket(PF_INET, SOCK_STREAM, 0);
- if (s < 0) {
- terrno = errno;
- Perror(stderr, "socket(vc)", errno);
- return (-1);
- }
- errno = 0;
- if (connect(s, (struct sockaddr *)nsap,
- sizeof(struct sockaddr)) < 0) {
- terrno = errno;
- Aerror(stderr, "connect/vc",
- errno, *nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- vc = 1;
- }
- /*
- * Send length & message
- */
- putshort((u_short)buflen, (u_char*)&len);
- iov[0].iov_base = (caddr_t)&len;
- iov[0].iov_len = INT16SZ;
- iov[1].iov_base = (caddr_t)buf;
- iov[1].iov_len = buflen;
- if (writev(s, iov, 2) != (INT16SZ + buflen)) {
- terrno = errno;
- Perror(stderr, "write failed", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- /*
- * Receive length & response
- */
-read_len:
- cp = ans;
- len = INT16SZ;
- while ((n = read(s, (char *)cp, (int)len)) > 0) {
- cp += n;
- if ((len -= n) <= 0)
- break;
- }
- if (n <= 0) {
- terrno = errno;
- Perror(stderr, "read failed", errno);
- res_close();
- /*
- * A long running process might get its TCP
- * connection reset if the remote server was
- * restarted. Requery the server instead of
- * trying a new one. When there is only one
- * server, this means that a query might work
- * instead of failing. We only allow one reset
- * per query to prevent looping.
- */
- if (terrno == ECONNRESET && !connreset) {
- connreset = 1;
- res_close();
- goto same_ns;
- }
- res_close();
- goto next_ns;
- }
- resplen = _getshort(ans);
- if (resplen > anssiz) {
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; response truncated\n")
- );
- truncated = 1;
- len = anssiz;
- } else
- len = resplen;
- cp = ans;
- while (len != 0 &&
- (n = read(s, (char *)cp, (int)len)) > 0) {
- cp += n;
- len -= n;
- }
- if (n <= 0) {
- terrno = errno;
- Perror(stderr, "read(vc)", errno);
- res_close();
- goto next_ns;
- }
- if (truncated) {
- /*
- * Flush rest of answer
- * so connection stays in synch.
- */
- anhp->tc = 1;
- len = resplen - anssiz;
- while (len != 0) {
- char junk[PACKETSZ];
-
- n = (len > sizeof(junk)
- ? sizeof(junk)
- : len);
- if ((n = read(s, junk, n)) > 0)
- len -= n;
- else
- break;
- }
- }
- /*
- * The calling applicating has bailed out of
- * a previous call and failed to arrange to have
- * the circuit closed or the server has got
- * itself confused. Anyway drop the packet and
- * wait for the correct one.
- */
- if (hp->id != anhp->id) {
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; old answer (unexpected):\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto read_len;
- }
- } else {
- /*
- * Use datagrams.
- */
- struct pollfd pfd;
- int msec;
- struct timeval timeout;
- fd_set dsmask, *dsmaskp;
- int dsmasklen;
- struct sockaddr_in from;
- int fromlen;
-
- if ((s < 0) || vc) {
- if (vc)
- res_close();
- s = socket(PF_INET, SOCK_DGRAM, 0);
- if (s < 0) {
-#if !CAN_RECONNECT
- bad_dg_sock:
-#endif
- terrno = errno;
- Perror(stderr, "socket(dg)", errno);
- return (-1);
- }
- connected = 0;
- }
- /*
- * On a 4.3BSD+ machine (client and server,
- * actually), sending to a nameserver datagram
- * port with no nameserver will cause an
- * ICMP port unreachable message to be returned.
- * If our datagram socket is "connected" to the
- * server, we get an ECONNREFUSED error on the next
- * socket operation, and select returns if the
- * error message is received. We can thus detect
- * the absence of a nameserver without timing out.
- * If we have sent queries to at least two servers,
- * however, we don't want to remain connected,
- * as we wish to receive answers from the first
- * server to respond.
- */
- if (_res.nscount == 1 || (try == 0 && ns == 0)) {
- /*
- * Connect only if we are sure we won't
- * receive a response from another server.
- */
- if (!connected) {
- if (connect(s, (struct sockaddr *)nsap,
- sizeof(struct sockaddr)
- ) < 0) {
- Aerror(stderr,
- "connect(dg)",
- errno, *nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- connected = 1;
- }
- if (send(s, (char*)buf, buflen, 0) != buflen) {
- Perror(stderr, "send", errno);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- } else {
- /*
- * Disconnect if we want to listen
- * for responses from more than one server.
- */
- if (connected) {
-#if CAN_RECONNECT
- struct sockaddr_in no_addr;
-
- no_addr.sin_family = AF_INET;
- no_addr.sin_addr.s_addr = INADDR_ANY;
- no_addr.sin_port = 0;
- (void) connect(s,
- (struct sockaddr *)
- &no_addr,
- sizeof(no_addr));
-#else
- int s1 = socket(PF_INET, SOCK_DGRAM,0);
- if (s1 < 0)
- goto bad_dg_sock;
- (void) dup2(s1, s);
- (void) close(s1);
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; new DG socket\n"))
-#endif
- connected = 0;
- errno = 0;
- }
- if (sendto(s, (char*)buf, buflen, 0,
- (struct sockaddr *)nsap,
- sizeof(struct sockaddr))
- != buflen) {
- Aerror(stderr, "sendto", errno, *nsap);
- badns |= (1 << ns);
- res_close();
- goto next_ns;
- }
- }
-
- /*
- * Wait for reply
- */
- othersyscall:
- if (use_poll) {
- msec = (_res.retrans << try) * 1000;
- if (try > 0)
- msec /= _res.nscount;
- if (msec <= 0)
- msec = 1000;
- } else {
- timeout.tv_sec = (_res.retrans << try);
- if (try > 0)
- timeout.tv_sec /= _res.nscount;
- if ((long) timeout.tv_sec <= 0)
- timeout.tv_sec = 1;
- }
- wait:
- if (use_poll) {
- struct sigaction sa, osa;
- int sigsys_installed = 0;
-
- pfd.fd = s;
- pfd.events = POLLIN;
- if (use_poll == 1) {
- bzero(&sa, sizeof(sa));
- sa.sa_handler = SIG_IGN;
- if (sigaction(SIGSYS, &sa, &osa) >= 0)
- sigsys_installed = 1;
- }
- n = poll(&pfd, 1, msec);
- if (sigsys_installed == 1) {
- int oerrno = errno;
- sigaction(SIGSYS, &osa, NULL);
- errno = oerrno;
- }
- /* XXX why does nosys() return EINVAL? */
- if (n < 0 && (errno == ENOSYS ||
- errno == EINVAL)) {
- use_poll = 0;
- goto othersyscall;
- } else if (use_poll == 1)
- use_poll = 2;
- if (n < 0) {
- if (errno == EINTR)
- goto wait;
- Perror(stderr, "poll", errno);
- res_close();
- goto next_ns;
- }
- } else {
- dsmasklen = howmany(s + 1, NFDBITS) *
- sizeof(fd_mask);
- if (dsmasklen > sizeof(fd_set)) {
- dsmaskp = (fd_set *)malloc(dsmasklen);
- if (dsmaskp == NULL) {
- res_close();
- goto next_ns;
- }
- } else
- dsmaskp = &dsmask;
- /* only zero what we need */
- bzero((char *)dsmaskp, dsmasklen);
- FD_SET(s, dsmaskp);
- n = select(s + 1, dsmaskp, (fd_set *)NULL,
- (fd_set *)NULL, &timeout);
- if (dsmaskp != &dsmask)
- free(dsmaskp);
- }
-
- if (n == 0) {
- /*
- * timeout
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; timeout\n"));
- gotsomewhere = 1;
- res_close();
- goto next_ns;
- }
- errno = 0;
- fromlen = sizeof(struct sockaddr_in);
- resplen = recvfrom(s, (char*)ans, anssiz, 0,
- (struct sockaddr *)&from, &fromlen);
- if (resplen <= 0) {
- Perror(stderr, "recvfrom", errno);
- res_close();
- goto next_ns;
- }
- gotsomewhere = 1;
- if (hp->id != anhp->id) {
- /*
- * response from old query, ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; old answer:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
-#if CHECK_SRVR_ADDR
- if (!(_res.options & RES_INSECURE1) &&
- !res_isourserver(&from)) {
- /*
- * response from wrong server? ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; not our server:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
-#endif
- if (!(_res.options & RES_INSECURE2) &&
- !res_queriesmatch(buf, buf + buflen,
- ans, ans + anssiz)) {
- /*
- * response contains wrong query? ignore it.
- * XXX - potential security hazard could
- * be detected here.
- */
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ";; wrong query name:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- goto wait;
- }
- if (anhp->rcode == SERVFAIL ||
- anhp->rcode == NOTIMP ||
- anhp->rcode == REFUSED) {
- DprintQ(_res.options & RES_DEBUG,
- (stdout, "server rejected query:\n"),
- ans, (resplen>anssiz)?anssiz:resplen);
- badns |= (1 << ns);
- res_close();
- /* don't retry if called from dig */
- if (!_res.pfcode)
- goto next_ns;
- }
- if (!(_res.options & RES_IGNTC) && anhp->tc) {
- /*
- * get rest of answer;
- * use TCP with same server.
- */
- Dprint(_res.options & RES_DEBUG,
- (stdout, ";; truncated answer\n"));
- v_circuit = 1;
- res_close();
- goto same_ns;
- }
- } /*if vc/dg*/
- Dprint((_res.options & RES_DEBUG) ||
- ((_res.pfcode & RES_PRF_REPLY) &&
- (_res.pfcode & RES_PRF_HEAD1)),
- (stdout, ";; got answer:\n"));
- DprintQ((_res.options & RES_DEBUG) ||
- (_res.pfcode & RES_PRF_REPLY),
- (stdout, ""),
- ans, (resplen>anssiz)?anssiz:resplen);
- /*
- * If using virtual circuits, we assume that the first server
- * is preferred over the rest (i.e. it is on the local
- * machine) and only keep that one open.
- * If we have temporarily opened a virtual circuit,
- * or if we haven't been asked to keep a socket open,
- * close the socket.
- */
- if ((v_circuit && (!(_res.options & RES_USEVC) || ns != 0)) ||
- !(_res.options & RES_STAYOPEN)) {
- res_close();
- }
- if (Rhook) {
- int done = 0, loops = 0;
-
- do {
- res_sendhookact act;
-
- act = (*Rhook)(nsap, buf, buflen,
- ans, anssiz, &resplen);
- switch (act) {
- case res_goahead:
- case res_done:
- done = 1;
- break;
- case res_nextns:
- res_close();
- goto next_ns;
- case res_modified:
- /* give the hook another try */
- if (++loops < 42) /*doug adams*/
- break;
- /*FALLTHROUGH*/
- case res_error:
- /*FALLTHROUGH*/
- default:
- return (-1);
- }
- } while (!done);
-
- }
- return (resplen);
- next_ns: ;
- } /*foreach ns*/
- } /*foreach retry*/
- res_close();
- if (!v_circuit)
- if (!gotsomewhere)
- errno = ECONNREFUSED; /* no nameservers found */
- else
- errno = ETIMEDOUT; /* no answer obtained */
- else
- errno = terrno;
- return (-1);
-}
-
-/*
- * This routine is for closing the socket if a virtual circuit is used and
- * the program wants to close it. This provides support for endhostent()
- * which expects to close the socket.
- *
- * This routine is not expected to be user visible.
- */
-void
-res_close()
-{
- if (s >= 0) {
- (void) close(s);
- s = -1;
- connected = 0;
- vc = 0;
- }
-}
diff --git a/lib/libc/net/res_stubs.c b/lib/libc/net/res_stubs.c
deleted file mode 100644
index e156608..0000000
--- a/lib/libc/net/res_stubs.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 1996 Peter Wemm <peter@freebsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: res_stubs.c,v 1.5 1997/02/22 15:00:36 peter Exp $
- */
-
-/*
- * This file is for FreeBSD-3.0 that has a bind-4.9.5-P1 derived
- * resolver in the libc. It provides aliases for functions that
- * have moved since 4.9.4-P1.
- *
- * I'll save everybody the trouble and say it now: *THIS IS A HACK*!
- *
- * Yes, many of these are private functions to the resolver, but some are
- * needed as there is no other way to provide the functionality and they've
- * turned up all over the place. :-(
- */
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-__weak_reference(__sym_ston, sym_ston);
-__weak_reference(__sym_ntos, sym_ntos);
-__weak_reference(__sym_ntop, sym_ntop);
-__weak_reference(__fp_resstat, fp_resstat);
-__weak_reference(__p_query, p_query);
-__weak_reference(__p_fqnname, p_fqnname);
-__weak_reference(__p_secstodate, p_secstodate);
-__weak_reference(__dn_count_labels, dn_count_labels);
-__weak_reference(__dn_comp, dn_comp);
-__weak_reference(__res_close, _res_close);
-#ifdef BIND_RES_POSIX3
-__weak_reference(__dn_expand, dn_expand);
-__weak_reference(__res_init, res_init);
-__weak_reference(__res_query, res_query);
-__weak_reference(__res_search, res_search);
-__weak_reference(__res_querydomain, res_querydomain);
-__weak_reference(__res_mkquery, res_mkquery);
-__weak_reference(__res_send, res_send);
-#else
-__weak_reference(res_send, __res_send);
-#endif
diff --git a/lib/libc/net/resolver.3 b/lib/libc/net/resolver.3
deleted file mode 100644
index 6d210c3..0000000
--- a/lib/libc/net/resolver.3
+++ /dev/null
@@ -1,351 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)resolver.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt RESOLVER 3
-.Os BSD 4.3
-.Sh NAME
-.Nm res_query ,
-.Nm res_search ,
-.Nm res_mkquery ,
-.Nm res_send ,
-.Nm res_init ,
-.Nm dn_comp ,
-.Nm dn_expand
-.Nd resolver routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netinet/in.h>
-.Fd #include <arpa/nameser.h>
-.Fd #include <resolv.h>
-.Ft int
-.Fo res_query
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fo res_search
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "u_char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fo res_mkquery
-.Fa "int op"
-.Fa "const char *dname"
-.Fa "int class"
-.Fa "int type"
-.Fa "const u_char *data"
-.Fa "int datalen"
-.Fa "const u_char *newrr_in"
-.Fa "u_char *buf"
-.Fa "int buflen"
-.Fc
-.Ft int
-.Fo res_send
-.Fa "const char *msg"
-.Fa "int msglen"
-.Fa "char *answer"
-.Fa "int anslen"
-.Fc
-.Ft int
-.Fn res_init
-.Fo dn_comp
-.Fa "const char *exp_dn"
-.Fa "char *comp_dn"
-.Fa "int length"
-.Fa "char **dnptrs"
-.Fa "char **lastdnptr"
-.Fc
-.Ft int
-.Fo dn_expand
-.Fa "const u_char *msg"
-.Fa "const u_char *eomorig"
-.Fa "const u_char *comp_dn"
-.Fa "char *exp_dn"
-.Fa "int length"
-.Fc
-.Sh DESCRIPTION
-These routines are used for making, sending and interpreting
-query and reply messages with Internet domain name servers.
-.Pp
-Global configuration and state information that is used by the
-resolver routines is kept in the structure
-.Em _res .
-Most of the values have reasonable defaults and can be ignored.
-Options
-stored in
-.Em _res.options
-are defined in
-.Pa resolv.h
-and are as follows.
-Options are stored as a simple bit mask containing the bitwise ``or''
-of the options enabled.
-.Bl -tag -width RES_DEFNAMES
-.It Dv RES_INIT
-True if the initial name server address and default domain name are
-initialized (i.e.,
-.Fn res_init
-has been called).
-.It Dv RES_DEBUG
-Print debugging messages.
-.It Dv RES_AAONLY
-Accept authoritative answers only.
-With this option,
-.Fn res_send
-should continue until it finds an authoritative answer or finds an error.
-Currently this is not implemented.
-.It Dv RES_USEVC
-Use
-.Tn TCP
-connections for queries instead of
-.Tn UDP
-datagrams.
-.It Dv RES_STAYOPEN
-Used with
-.Dv RES_USEVC
-to keep the
-.Tn TCP
-connection open between
-queries.
-This is useful only in programs that regularly do many queries.
-.Tn UDP
-should be the normal mode used.
-.It Dv RES_IGNTC
-Unused currently (ignore truncation errors, i.e., don't retry with
-.Tn TCP ) .
-.It Dv RES_RECURSE
-Set the recursion-desired bit in queries.
-This is the default.
-.Pf ( Fn res_send
-does not do iterative queries and expects the name server
-to handle recursion.)
-.It Dv RES_DEFNAMES
-If set,
-.Fn res_search
-will append the default domain name to single-component names
-(those that do not contain a dot).
-This option is enabled by default.
-.It Dv RES_DNSRCH
-If this option is set,
-.Fn res_search
-will search for host names in the current domain and in parent domains; see
-.Xr hostname 7 .
-This is used by the standard host lookup routine
-.Xr gethostbyname 3 .
-This option is enabled by default.
-.It Dv RES_NOALIASES
-This option turns off the user level aliasing feature controlled by the
-.Dq Ev HOSTALIASES
-environment variable. Network daemons should set this option.
-.El
-.Pp
-The
-.Fn res_init
-routine
-reads the configuration file (if any; see
-.Xr resolver 5 )
-to get the default domain name,
-search list and
-the Internet address of the local name server(s).
-If no server is configured, the host running
-the resolver is tried.
-The current domain name is defined by the hostname
-if not specified in the configuration file;
-it can be overridden by the environment variable
-.Ev LOCALDOMAIN .
-This environment variable may contain several blank-separated
-tokens if you wish to override the
-.Em "search list"
-on a per-process basis. This is similar to the
-.Em search
-command in the configuration file.
-Another environment variable (
-.Dq Ev RES_OPTIONS
-can be set to
-override certain internal resolver options which are otherwise
-set by changing fields in the
-.Em _res
-structure or are inherited from the configuration file's
-.Em options
-command. The syntax of the
-.Dq Ev RES_OPTIONS
-environment variable is explained in
-.Xr resolver 5 .
-Initialization normally occurs on the first call
-to one of the following routines.
-.Pp
-The
-.Fn res_query
-function provides an interface to the server query mechanism.
-It constructs a query, sends it to the local server,
-awaits a response, and makes preliminary checks on the reply.
-The query requests information of the specified
-.Fa type
-and
-.Fa class
-for the specified fully-qualified domain name
-.Fa dname .
-The reply message is left in the
-.Fa answer
-buffer with length
-.Fa anslen
-supplied by the caller.
-.Pp
-The
-.Fn res_search
-routine makes a query and awaits a response like
-.Fn res_query ,
-but in addition, it implements the default and search rules
-controlled by the
-.Dv RES_DEFNAMES
-and
-.Dv RES_DNSRCH
-options.
-It returns the first successful reply.
-.Pp
-The remaining routines are lower-level routines used by
-.Fn res_query .
-The
-.Fn res_mkquery
-function
-constructs a standard query message and places it in
-.Fa buf .
-It returns the size of the query, or \-1 if the query is
-larger than
-.Fa buflen .
-The query type
-.Fa op
-is usually
-.Dv QUERY ,
-but can be any of the query types defined in
-.Aq Pa arpa/nameser.h .
-The domain name for the query is given by
-.Fa dname .
-.Fa Newrr
-is currently unused but is intended for making update messages.
-.Pp
-The
-.Fn res_send
-routine
-sends a pre-formatted query and returns an answer.
-It will call
-.Fn res_init
-if
-.Dv RES_INIT
-is not set, send the query to the local name server, and
-handle timeouts and retries.
-The length of the reply message is returned, or
-\-1 if there were errors.
-.Pp
-The
-.Fn dn_comp
-function
-compresses the domain name
-.Fa exp_dn
-and stores it in
-.Fa comp_dn .
-The size of the compressed name is returned or \-1 if there were errors.
-The size of the array pointed to by
-.Fa comp_dn
-is given by
-.Fa length .
-The compression uses
-an array of pointers
-.Fa dnptrs
-to previously-compressed names in the current message.
-The first pointer points to
-to the beginning of the message and the list ends with
-.Dv NULL .
-The limit to the array is specified by
-.Fa lastdnptr .
-A side effect of
-.Fn dn_comp
-is to update the list of pointers for
-labels inserted into the message
-as the name is compressed.
-If
-.Em dnptr
-is
-.Dv NULL, names are not compressed.
-If
-.Fa lastdnptr
-is
-.Dv NULL ,
-the list of labels is not updated.
-.Pp
-The
-.Fn dn_expand
-entry
-expands the compressed domain name
-.Fa comp_dn
-to a full domain name
-The compressed name is contained in a query or reply message;
-.Fa msg
-is a pointer to the beginning of the message.
-The uncompressed name is placed in the buffer indicated by
-.Fa exp_dn
-which is of size
-.Fa length .
-The size of compressed name is returned or \-1 if there was an error.
-.Sh FILES
-.Bl -tag -width Pa
-/etc/resolv.conf
-The configuration file
-see
-.Xr resolver 5 .
-.El
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr resolver 5 ,
-.Xr hostname 7 ,
-.Xr named 8
-.Pp
-.%T RFC1032 ,
-.%T RFC1033 ,
-.%T RFC1034 ,
-.%T RFC1035 ,
-.%T RFC974
-.Rs
-.%T "Name Server Operations Guide for BIND"
-.Re
-.Sh HISTORY
-The
-.Nm
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libc/net/send.c b/lib/libc/net/send.c
deleted file mode 100644
index 81151c4..0000000
--- a/lib/libc/net/send.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)send.c 8.2 (Berkeley) 2/21/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <stddef.h>
-
-ssize_t
-send(s, msg, len, flags)
- int s, flags;
- size_t len;
- const void *msg;
-{
- return (sendto(s, msg, len, flags, NULL, 0));
-}
diff --git a/lib/libc/nls/Makefile.inc b/lib/libc/nls/Makefile.inc
deleted file mode 100644
index 8bbca27..0000000
--- a/lib/libc/nls/Makefile.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-# from $NetBSD: Makefile.inc,v 1.7 1995/02/27 13:06:20 cgd Exp $
-# $Id: Makefile.inc,v 1.3 1997/05/03 03:50:01 jb Exp $
-
-.PATH: ${.CURDIR}/../libc/nls
-
-SRCS+= catclose.c catgets.c catopen.c msgcat.c
-
-.if ${LIB} == "c"
-MAN3+= catclose.3 catgets.3 catopen.3
-.endif
diff --git a/lib/libc/nls/catclose.3 b/lib/libc/nls/catclose.3
deleted file mode 100644
index e4757bd..0000000
--- a/lib/libc/nls/catclose.3
+++ /dev/null
@@ -1,54 +0,0 @@
-.\" $Id$
-.\"
-.\" Copyright (c) 1994 Winning Strategies, Inc.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Winning Strategies, Inc.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd May 29, 1994
-.Dt CATCLOSE 3
-.Os
-.Sh NAME
-.Nm catclose
-.Nd close message catalog
-.Sh SYNOPSIS
-.Fd #include <nl_types.h>
-.Ft int
-.Fn catclose "nl_catd catd"
-.Sh DESCRIPTION
-The
-.Fn catclose
-function closes the message catalog specified by the argument
-.Fa catd .
-.Sh SEE ALSO
-.Xr catgets 3 ,
-.Xr catopen 3
-.Sh STANDARDS
-The
-.Fn catclose
-function conforms to
-.St -xpg3 .
-
diff --git a/lib/libc/nls/catclose.c b/lib/libc/nls/catclose.c
deleted file mode 100644
index 341f664..0000000
--- a/lib/libc/nls/catclose.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* $Id$ */
-
-/*
- * Written by J.T. Conklin, 10/05/94
- * Public domain.
- */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_catclose,catclose);
-#else
-
-#include <nl_types.h>
-
-extern int _catclose __P((nl_catd));
-
-int
-catclose(catd)
- nl_catd catd;
-{
- return _catclose(catd);
-}
-
-#endif
diff --git a/lib/libc/nls/catgets.3 b/lib/libc/nls/catgets.3
deleted file mode 100644
index b50f8a4..0000000
--- a/lib/libc/nls/catgets.3
+++ /dev/null
@@ -1,66 +0,0 @@
-.\" $Id$
-.\"
-.\" Copyright (c) 1994 Winning Strategies, Inc.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Winning Strategies, Inc.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd May 29, 1994
-.Dt CATGETS 3
-.Os
-.Sh NAME
-.Nm catgets
-.Nd retrieve string from message catalog
-.Sh SYNOPSIS
-.Fd #include <nl_types.h>
-.Ft char *
-.Fn catgets "nl_catd catd" "int set_id" "int msg_id" "char *s"
-.Sh DESCRIPTION
-The
-.Fn catgets
-function attempts to retrieve message
-.Fa msg_id
-of set
-.Fa set_id
-from the message catalog referenced by the descriptor
-.Fa catd .
-The argument
-.Fa s
-points to a default message which is returned if the function
-is unable to retrieve the specified message.
-.Sh RETURN VALUE
-If the specified message was retrieved successfully,
-.Fn catgets
-returns a pointer to an internal buffer containing the message string;
-otherwise it returns
-.Fa s .
-.Sh SEE ALSO
-.Xr catclose 3 ,
-.Xr catopen 3
-.Sh STANDARDS
-The
-.Fn catgets
-function conforms to \fBxpg3\fR.
diff --git a/lib/libc/nls/catgets.c b/lib/libc/nls/catgets.c
deleted file mode 100644
index c29cf64..0000000
--- a/lib/libc/nls/catgets.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* $Id$ */
-
-/*
- * Written by J.T. Conklin, 10/05/94
- * Public domain.
- */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_catgets,catgets);
-#else
-
-#include <nl_types.h>
-
-extern char * _catgets __P((nl_catd, int, int, char *));
-
-char *
-catgets(catd, set_id, msg_id, s)
- nl_catd catd;
- int set_id;
- int msg_id;
- char *s;
-{
- return _catgets(catd, set_id, msg_id, s);
-}
-
-#endif
diff --git a/lib/libc/nls/catopen.3 b/lib/libc/nls/catopen.3
deleted file mode 100644
index a792ebd..0000000
--- a/lib/libc/nls/catopen.3
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" $Id$
-.\"
-.\" Copyright (c) 1994 Winning Strategies, Inc.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Winning Strategies, Inc.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd May 29, 1994
-.Dt CATOPEN 3
-.Os
-.Sh NAME
-.Nm catopen
-.Nd open message catalog
-.Sh SYNOPSIS
-.Fd #include <nl_types.h>
-.Ft nl_catd
-.Fn catopen "const char *name" "int oflag"
-.Sh DESCRIPTION
-The
-.Fn catopen
-function opens the message catalog specified by
-.Fa name
-and returns a message catalog descriptor.
-If
-.Fa name
-contains a
-.Sq /
-then
-.Fa name
-specifies the full pathname for the message catalog, otherwise the value
-of the environment variable
-.Ev NLSPATH
-is used with
-.Fa name
-substituted for %N.
-.Pp
-The
-.Fa oflag
-argument is reserved for future use and should be set to zero.
-.Sh RETURN VALUE
-Upon successful completion,
-.Fn catopen
-returns a message catalog descriptor.
-Otherwise, (nl_catd) -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Bl -tag -width Er
-.It Bq Er ENOMEM
-Insufficient memory is available.
-.El
-.Sh SEE ALSO
-.Xr catclose 3 ,
-.Xr catgets 3
-.Sh STANDARDS
-The
-.Fn catopen
-function conforms to
-.St -xpg3 .
diff --git a/lib/libc/nls/catopen.c b/lib/libc/nls/catopen.c
deleted file mode 100644
index 5dfb727..0000000
--- a/lib/libc/nls/catopen.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* $Id$ */
-
-/*
- * Written by J.T. Conklin, 10/05/94
- * Public domain.
- */
-
-#include <sys/cdefs.h>
-
-#ifdef __indr_reference
-__indr_reference(_catopen,catopen);
-#else
-
-#include <nl_types.h>
-
-extern nl_catd _catopen __P((__const char *, int));
-
-nl_catd
-catopen(name, oflag)
- __const char *name;
- int oflag;
-{
- return _catopen(name, oflag);
-}
-
-#endif
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c
deleted file mode 100644
index c90cefb..0000000
--- a/lib/libc/nls/msgcat.c
+++ /dev/null
@@ -1,428 +0,0 @@
-/* $Id: msgcat.c,v 1.10 1997/05/10 04:28:17 ache Exp $ */
-
-/***********************************************************
-Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-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 Alfalfa's name not be used in
-advertising or publicity pertaining to distribution of the software
-without specific, written prior permission.
-
-ALPHALPHA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-ALPHALPHA 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.
-
-If you make any modifications, bugfixes or other changes to this software
-we'd appreciate it if you could send a copy to us so we can keep things
-up-to-date. Many thanks.
- Kee Hinckley
- Alfalfa Software, Inc.
- 267 Allston St., #3
- Cambridge, MA 02139 USA
- nazgul@alfalfa.com
-
-******************************************************************/
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$NetBSD: msgcat.c,v 1.11 1995/02/27 13:06:51 cgd Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-/* Edit History
-
-03/06/91 4 schulert remove working directory from nlspath
-01/18/91 2 hamilton #if not rescanned
-01/12/91 3 schulert conditionally use prototypes
-11/03/90 1 hamilton Alphalpha->Alfalfa & OmegaMail->Poste
-10/15/90 2 schulert > #include <unistd.h> if MIPS
-08/13/90 1 schulert move from ua to omu
-*/
-
-/*
- * We need a better way of handling errors than printing text. I need
- * to add an error handling routine.
- */
-
-#include "nl_types.h"
-#include "msgcat.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifndef True
-# define True ~0
-# define False 0
-#endif
-
-/* take care of sysv diffs */
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 1024
-#endif
-
-#ifndef FD_CLOEXEC
-#define FD_CLOEXEC 1
-#endif
-
-#define NLERR ((nl_catd) -1)
-
-static nl_catd loadCat();
-static nl_catd loadSet();
-
-nl_catd _catopen( name, type)
-__const char *name;
-int type;
-{
- char path[MAXPATHLEN];
- __const char *catpath = NULL;
- char *nlspath;
- char *lang;
- long len;
- char *base, *cptr, *pathP;
- struct stat sbuf;
-
- if (!name || !*name) return(NLERR);
-
- if (strchr(name, '/')) {
- catpath = name;
- if (stat(catpath, &sbuf)) return(0);
- } else {
- if ((lang = (char *) getenv("LANG")) == NULL)
- lang = "C";
- if ((nlspath = (char *) getenv("NLSPATH")) == NULL || issetugid())
- nlspath = "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L";
-
- len = strlen(nlspath);
- base = cptr = (char *) malloc(len + 2);
- if (!base) return(NLERR);
- strcpy(cptr, nlspath);
- cptr[len] = ':';
- cptr[len+1] = '\0';
-
- for (nlspath = cptr; *cptr; ++cptr) {
- if (*cptr == ':') {
- *cptr = '\0';
- for (pathP = path; *nlspath; ++nlspath) {
- if (*nlspath == '%') {
- if (*(nlspath + 1) == 'L') {
- ++nlspath;
- strcpy(pathP, lang);
- pathP += strlen(lang);
- } else if (*(nlspath + 1) == 'N') {
- ++nlspath;
- strcpy(pathP, name);
- pathP += strlen(name);
- } else *(pathP++) = *nlspath;
- } else *(pathP++) = *nlspath;
- }
- *pathP = '\0';
- if (stat(path, &sbuf) == 0) {
- catpath = path;
- break;
- }
- nlspath = cptr+1;
- }
- }
- free(base);
-
- if (!catpath) return(0);
- }
-
- return(loadCat(catpath, type));
-}
-
-/*
- * We've got an odd situation here. The odds are real good that the
- * number we are looking for is almost the same as the index. We could
- * use the index, check the difference and do something intelligent, but
- * I haven't quite figured out what's intelligent.
- *
- * Here's a start.
- * Take an id N. If there are > N items in the list, then N cannot
- * be more than N items from the start, since otherwise there would
- * have to be duplicate items. So we can safely set the top to N+1
- * (after taking into account that ids start at 1, and arrays at 0)
- *
- * Let's say we are at position P, and we are looking for N, but have
- * V. If N > V, then the furthest away that N could be is
- * P + (N-V). So we can safely set hi to P+(N-V)+1. For example:
- * We are looking for 10, but have 8
- * 8 ? ? ? ?
- * >=9 >=10 >=11
- *
- */
-static MCSetT *MCGetSet( cat, setId)
-MCCatT *cat;
-int setId;
-{
- MCSetT *set;
- long lo, hi, cur, dir;
-
- if (!cat || setId <= 0) return(NULL);
-
- lo = 0;
- if (setId - 1 < cat->numSets) {
- cur = setId - 1;
- hi = setId;
- } else {
- hi = cat->numSets;
- cur = (hi - lo) / 2;
- }
-
- while (True) {
- set = cat->sets + cur;
- if (set->setId == setId) break;
- if (set->setId < setId) {
- lo = cur+1;
- if (hi > cur + (setId - set->setId) + 1) hi = cur+(setId-set->setId)+1;
- dir = 1;
- } else {
- hi = cur;
- dir = -1;
- }
- if (lo >= hi) return(NULL);
- if (hi - lo == 1) cur += dir;
- else cur += ((hi - lo) / 2) * dir;
- }
- if (set->invalid) loadSet(cat, set);
- return(set);
-}
-
-
-static MCMsgT *MCGetMsg( set, msgId)
-MCSetT *set;
-int msgId;
-{
- MCMsgT *msg;
- long lo, hi, cur, dir;
-
- if (!set || set->invalid || msgId <= 0) return(NULL);
-
- lo = 0;
- if (msgId - 1 < set->numMsgs) {
- cur = msgId - 1;
- hi = msgId;
- } else {
- hi = set->numMsgs;
- cur = (hi - lo) / 2;
- }
-
- while (True) {
- msg = set->u.msgs + cur;
- if (msg->msgId == msgId) break;
- if (msg->msgId < msgId) {
- lo = cur+1;
- if (hi > cur + (msgId - msg->msgId) + 1) hi = cur+(msgId-msg->msgId)+1;
- dir = 1;
- } else {
- hi = cur;
- dir = -1;
- }
- if (lo >= hi) return(NULL);
- if (hi - lo == 1) cur += dir;
- else cur += ((hi - lo) / 2) * dir;
- }
- return(msg);
-}
-
-char *_catgets( catd, setId, msgId, dflt)
-nl_catd catd;
-int setId;
-int msgId;
-char *dflt;
-{
- MCMsgT *msg;
- MCCatT *cat = (MCCatT *) catd;
- char *cptr;
-
- msg = MCGetMsg(MCGetSet(cat, setId), msgId);
- if (msg) cptr = msg->msg.str;
- else cptr = dflt;
- return(cptr);
-}
-
-
-int _catclose( catd)
-nl_catd catd;
-{
- MCCatT *cat = (MCCatT *) catd;
- MCSetT *set;
- int i;
-
- if (!cat) return -1;
-
- if (cat->loadType != MCLoadAll) close(cat->fd);
- for (i = 0; i < cat->numSets; ++i) {
- set = cat->sets + i;
- if (!set->invalid) {
- free(set->data.str);
- free(set->u.msgs);
- }
- }
- free(cat->sets);
- free(cat);
-
- return 0;
-}
-
-/*
- * Internal routines
- */
-
-/* Note that only malloc failures are allowed to return an error */
-#define ERRNAME "Message Catalog System"
-#define CORRUPT() {fprintf(stderr, "%s: corrupt file.\n", ERRNAME); free(cat); return(0);}
-#define NOSPACE() {fprintf(stderr, "%s: no more memory.\n", ERRNAME); free(cat); return(NLERR);}
-
-static nl_catd loadCat( catpath, type)
-__const char *catpath;
-int type;
-{
- MCHeaderT header;
- MCCatT *cat;
- MCSetT *set;
- long i, j;
- off_t nextSet;
-
- cat = (MCCatT *) malloc(sizeof(MCCatT));
- if (!cat) return(NLERR);
- cat->loadType = type;
-
- if ((cat->fd = open(catpath, O_RDONLY)) < 0) {
- free(cat);
- return(0);
- }
-
- (void)fcntl(cat->fd, F_SETFD, FD_CLOEXEC);
-
- if (read(cat->fd, &header, sizeof(header)) != sizeof(header)) CORRUPT();
-
- if (strncmp(header.magic, MCMagic, MCMagicLen) != 0) CORRUPT();
-
- if (header.majorVer != MCMajorVer) {
- free(cat);
- fprintf(stderr, "%s: %s is version %ld, we need %ld.\n", ERRNAME,
- catpath, header.majorVer, MCMajorVer);
- return(0);
- }
-
- if (header.numSets <= 0) {
- free(cat);
- fprintf(stderr, "%s: %s has %ld sets!\n", ERRNAME, catpath,
- header.numSets);
- return(0);
- }
-
- cat->numSets = header.numSets;
- cat->sets = (MCSetT *) malloc(sizeof(MCSetT) * header.numSets);
- if (!cat->sets) NOSPACE();
-
- nextSet = header.firstSet;
- for (i = 0; i < cat->numSets; ++i) {
- if (lseek(cat->fd, nextSet, 0) == -1) {
- for (j = 0; j < i; j++) {
- set = cat->sets + j;
- if (!set->invalid) {
- free(set->data.str);
- free(set->u.msgs);
- }
- }
- free(cat->sets);
- CORRUPT();
- }
-
- /* read in the set header */
- set = cat->sets + i;
- if (read(cat->fd, set, sizeof(*set)) != sizeof(*set)) {
- for (j = 0; j < i; j++) {
- set = cat->sets + j;
- if (!set->invalid) {
- free(set->data.str);
- free(set->u.msgs);
- }
- }
- free(cat->sets);
- CORRUPT();
- }
-
- /* if it's invalid, skip over it (and backup 'i') */
-
- if (set->invalid) {
- --i;
- nextSet = set->nextSet;
- continue;
- }
-
- if (cat->loadType == MCLoadAll) {
- nl_catd res;
-
- if ((res = loadSet(cat, set)) <= 0) {
- for (j = 0; j < i; j++) {
- set = cat->sets + j;
- if (!set->invalid) {
- free(set->data.str);
- free(set->u.msgs);
- }
- }
- free(cat->sets);
- if (res == -1) NOSPACE();
- CORRUPT();
- }
- } else set->invalid = True;
- nextSet = set->nextSet;
- }
- if (cat->loadType == MCLoadAll) {
- close(cat->fd);
- cat->fd = -1;
- }
- return((nl_catd) cat);
-}
-
-static nl_catd loadSet( cat, set)
-MCCatT *cat;
-MCSetT *set;
-{
- MCMsgT *msg;
- int i;
-
- /* Get the data */
- if (lseek(cat->fd, set->data.off, 0) == -1) return(0);
- if ((set->data.str = (char *) malloc(set->dataLen)) == NULL) return(-1);
- if (read(cat->fd, set->data.str, set->dataLen) != set->dataLen) {
- free(set->data.str); return(0);
- }
-
- /* Get the messages */
- if (lseek(cat->fd, set->u.firstMsg, 0) == -1) {
- free(set->data.str); return(0);
- }
- if ((set->u.msgs = (MCMsgT *) malloc(sizeof(MCMsgT) * set->numMsgs)) == NULL) {
- free(set->data.str); return(-1);
- }
-
- for (i = 0; i < set->numMsgs; ++i) {
- msg = set->u.msgs + i;
- if (read(cat->fd, msg, sizeof(*msg)) != sizeof(*msg)) {
- free(set->u.msgs); free(set->data.str); return(0);
- }
- if (msg->invalid) {
- --i;
- continue;
- }
- msg->msg.str = (char *) (set->data.str + msg->msg.off);
- }
- set->invalid = False;
- return(1);
-}
diff --git a/lib/libc/nls/msgcat.h b/lib/libc/nls/msgcat.h
deleted file mode 100644
index 9df7a82..0000000
--- a/lib/libc/nls/msgcat.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/* $Id$ */
-
-/* -*-c++-*- */
-
-#ifndef __msgcath
-
-
-/***********************************************************
-Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-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 Alfalfa's name not be used in
-advertising or publicity pertaining to distribution of the software
-without specific, written prior permission.
-
-ALPHALPHA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-ALPHALPHA 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.
-
-If you make any modifications, bugfixes or other changes to this software
-we'd appreciate it if you could send a copy to us so we can keep things
-up-to-date. Many thanks.
- Kee Hinckley
- Alfalfa Software, Inc.
- 267 Allston St., #3
- Cambridge, MA 02139 USA
- nazgul@alfalfa.com
-
-******************************************************************/
-
-
-#include <sys/types.h>
-
-/*
- * On disk data structures
- */
-
-/* Edit History
-
-02/25/91 2 nazgul Byte order flags, upped the version number
-11/03/90 1 hamilton Alphalpha->Alfalfa & OmegaMail->Poste
-08/13/90 1 schulert move from ua to omu
-*/
-
-/* For or'd constants */
-#define MCMakeId(s,m) (unsigned long) ( ((unsigned short)s << (sizeof(short)*8)) \
- | (unsigned short)m )
-#define MCSetId(id) (unsigned int) ( id >> (sizeof(short) * 8) )
-#define MCMsgId(id) (unsigned int) ( (id << (sizeof(short) * 8)) \
- >> (sizeof(short) * 8) )
-#undef S
-#undef UI
-#undef UL
-
-#define MCMagicLen 8
-#define MCMagic "*nazgul*"
-#define MCLastMsg 0
-#define MCLastSet 0
-
-#define MCMajorVer 1L
-#define MCMinorVer 0
-
-/*
- * Critical note here. Sets and Messages *MUST* be stored in ascending
- * order. There are stored that way (by specification) in the original
- * data file, however in the process of merging in new stuff you might
- * mix that up. Don't! The catget stuff does a binary search and will
- * totally lose it if these aren't in order (not contiguous mind you, just
- * in order. If this turns out to be a major problem this could be enhanced
- * by adding a 'sorted' flag to the db, and sorting msgs and sets at load
- * time if things aren't sorted, but I'd like not to have to do that.
- */
-
-/*
- * I have tried here to define data structures which can be used
- * while the catalog is on disk, and at runtime.
- * This is rather dangerous of course, but I think it can be done without
- * overly increasing the memory usage, and it makes loading and storing
- * somewhat simpler and less prone to accidents. I have also tried to
- * define on disk data structures which can be updated in place, so that
- * with a very large catalog (e.g. all system errors) you don't have to
- * load everything in memory in order to add or update one set. With
- * this in mind there are "invalid" flags which allow items to be
- * invalidated and thus not loaded at runtime. Note however that although
- * I pay attention to these when I load the DB, I do not currently use
- * them in gencat (it just reads everything into memory), so there is
- * no guarantee that this will all work.
- */
-
-/* These should be publicly available */
-
-#define MCLoadBySet 0 /* Load entire sets as they are used */
-#define MCLoadAll 1 /* Load entire DB on catopen */
-
-/*
- * MCOffsetT - Union to handle both disk and runtime pointers
- */
-typedef union {
- off_t off;
- char *str;
- void *ptr;
- struct _MCMsgT *msg;
- struct _MCSetT *set;
-} MCOffsetT;
-
-/*
- * MCMsgT - Message structure (disk and runtime)
- */
-typedef struct _MCMsgT {
- long msgId; /* Id of this message */
- MCOffsetT msg; /* Relative offset on disk or pointer in memory */
- long invalid; /* Valid on disk, loaded in memory */
-} MCMsgT;
-
-/*
- * MCSetT - Set structure (disk and runtime)
- */
-typedef struct _MCSetT {
- long setId; /* Id of this set */
- off_t nextSet; /* Offset of next set on disk */
- union {
- off_t firstMsg; /* Offset to first Msg (while on disk) */
- MCMsgT *msgs; /* Pointer to array of msgs (in mem, loaded) */
- } u;
- MCOffsetT data; /* Offset to data, or pointer to data */
- long dataLen; /* Length of data area on disk */
- long numMsgs; /* Number of messages */
- long invalid; /* Valid on disk, loaded in memory */
-} MCSetT;
-
-/*
- * MCCatT - Runtime catalog pointer
- */
-typedef struct {
- long loadType; /* How to load the messages (see MSLoadType) */
- int fd; /* File descriptor of catalog (if load-on-demand) */
- long numSets; /* Number of sets */
- MCSetT *sets; /* Pointer to the sets */
- off_t firstSet; /* Offset of first set on disk */
-} MCCatT;
-
-/*
- * MCHeaderT - Disk file header
- */
-typedef struct {
- char magic[MCMagicLen]; /* Magic cookie "*nazgul*" */
- long majorVer; /* ++ on incompatible changes */
- long minorVer; /* ++ on compatible changes */
- long flags; /* Informational flags */
- long numSets; /* Number of valid Sets */
- off_t firstSet; /* Offset of first set on disk */
-} MCHeaderT;
-
-/* Some flags */
-#define MC68KByteOrder 0x01
-#define MCn86ByteOrder 0x02
-
-
-
-
-#endif
diff --git a/lib/libc/quad/Makefile.inc b/lib/libc/quad/Makefile.inc
deleted file mode 100644
index 3e84f42..0000000
--- a/lib/libc/quad/Makefile.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.5 1997/05/03 03:50:02 jb Exp $
-
-# Quad support, if needed
-.PATH: ${.CURDIR}/../libc/${MACHINE}/quad ${.CURDIR}/../libc/quad
-
-.if ${MACHINE} == "i386"
-
-SRCS+= cmpdi2.c divdi3.c moddi3.c qdivrem.c ucmpdi2.c udivdi3.c umoddi3.c
-
-.else
-
-SRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c fixdfdi.c \
- fixsfdi.c fixunsdfdi.c fixunssfdi.c floatdidf.c floatdisf.c \
- floatunsdidf.c iordi3.c lshldi3.c lshrdi3.c moddi3.c muldi3.c \
- negdi2.c notdi2.c qdivrem.c subdi3.c ucmpdi2.c udivdi3.c umoddi3.c \
- xordi3.c
-
-.endif
diff --git a/lib/libc/quad/TESTS/Makefile b/lib/libc/quad/TESTS/Makefile
deleted file mode 100644
index 3d37abf..0000000
--- a/lib/libc/quad/TESTS/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/4/93
-
-all: mul divrem
-
-MUL= mul.c ../muldi3.c
-mul: ${MUL}
- gcc -g -DSPARC_XXX ${MUL} -o $@
-
-DIVREM= divrem.c ../qdivrem.c
-divrem: ${DIVREM}
- gcc -g -DSPARC_XXX ${DIVREM} -o $@
diff --git a/lib/libc/quad/TESTS/divrem.c b/lib/libc/quad/TESTS/divrem.c
deleted file mode 100644
index 73be605..0000000
--- a/lib/libc/quad/TESTS/divrem.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1992, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)divrem.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <stdio.h>
-
-main()
-{
- union { long long q; unsigned long v[2]; } a, b, q, r;
- char buf[300];
- extern long long __qdivrem(unsigned long long, unsigned long long,
- unsigned long long *);
-
- for (;;) {
- printf("> ");
- if (fgets(buf, sizeof buf, stdin) == NULL)
- break;
- if (sscanf(buf, "%lu:%lu %lu:%lu",
- &a.v[0], &a.v[1], &b.v[0], &b.v[1]) != 4 &&
- sscanf(buf, "0x%lx:%lx 0x%lx:%lx",
- &a.v[0], &a.v[1], &b.v[0], &b.v[1]) != 4) {
- printf("eh?\n");
- continue;
- }
- q.q = __qdivrem(a.q, b.q, &r.q);
- printf("%lx:%lx /%% %lx:%lx => q=%lx:%lx r=%lx:%lx\n",
- a.v[0], a.v[1], b.v[0], b.v[1],
- q.v[0], q.v[1], r.v[0], r.v[1]);
- printf(" = %lX%08lX / %lX%08lX => %lX%08lX\n\
- = %lX%08lX %% %lX%08lX => %lX%08lX\n",
- a.v[0], a.v[1], b.v[0], b.v[1], q.v[0], q.v[1],
- a.v[0], a.v[1], b.v[0], b.v[1], r.v[0], r.v[1]);
- }
- exit(0);
-}
diff --git a/lib/libc/quad/TESTS/mul.c b/lib/libc/quad/TESTS/mul.c
deleted file mode 100644
index 1ab00f1..0000000
--- a/lib/libc/quad/TESTS/mul.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1992, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)mul.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <stdio.h>
-
-main()
-{
- union { long long q; unsigned long v[2]; } a, b, m;
- char buf[300];
- extern long long __muldi3(long long, long long);
-
- for (;;) {
- printf("> ");
- if (fgets(buf, sizeof buf, stdin) == NULL)
- break;
- if (sscanf(buf, "%lu:%lu %lu:%lu",
- &a.v[0], &a.v[1], &b.v[0], &b.v[1]) != 4 &&
- sscanf(buf, "0x%lx:%lx 0x%lx:%lx",
- &a.v[0], &a.v[1], &b.v[0], &b.v[1]) != 4) {
- printf("eh?\n");
- continue;
- }
- m.q = __muldi3(a.q, b.q);
- printf("%lx:%lx * %lx:%lx => %lx:%lx\n",
- a.v[0], a.v[1], b.v[0], b.v[1], m.v[0], m.v[1]);
- printf(" = %lX%08lX * %lX%08lX => %lX%08lX\n",
- a.v[0], a.v[1], b.v[0], b.v[1], m.v[0], m.v[1]);
- }
- exit(0);
-}
diff --git a/lib/libc/quad/adddi3.c b/lib/libc/quad/adddi3.c
deleted file mode 100644
index d10da47..0000000
--- a/lib/libc/quad/adddi3.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)adddi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Add two quads. This is trivial since a one-bit carry from a single
- * u_long addition x+y occurs if and only if the sum x+y is less than
- * either x or y (the choice to compare with x or y is arbitrary).
- */
-quad_t
-__adddi3(a, b)
- quad_t a, b;
-{
- union uu aa, bb, sum;
-
- aa.q = a;
- bb.q = b;
- sum.ul[L] = aa.ul[L] + bb.ul[L];
- sum.ul[H] = aa.ul[H] + bb.ul[H] + (sum.ul[L] < bb.ul[L]);
- return (sum.q);
-}
diff --git a/lib/libc/quad/anddi3.c b/lib/libc/quad/anddi3.c
deleted file mode 100644
index 5ae45ac..0000000
--- a/lib/libc/quad/anddi3.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)anddi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Return a & b, in quad.
- */
-quad_t
-__anddi3(a, b)
- quad_t a, b;
-{
- union uu aa, bb;
-
- aa.q = a;
- bb.q = b;
- aa.ul[0] &= bb.ul[0];
- aa.ul[1] &= bb.ul[1];
- return (aa.q);
-}
diff --git a/lib/libc/quad/ashldi3.c b/lib/libc/quad/ashldi3.c
deleted file mode 100644
index 72501ad..0000000
--- a/lib/libc/quad/ashldi3.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ashldi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Shift a (signed) quad value left (arithmetic shift left).
- * This is the same as logical shift left!
- */
-quad_t
-__ashldi3(a, shift)
- quad_t a;
- qshift_t shift;
-{
- union uu aa;
-
- aa.q = a;
- if (shift >= LONG_BITS) {
- aa.ul[H] = shift >= QUAD_BITS ? 0 :
- aa.ul[L] << (shift - LONG_BITS);
- aa.ul[L] = 0;
- } else if (shift > 0) {
- aa.ul[H] = (aa.ul[H] << shift) |
- (aa.ul[L] >> (LONG_BITS - shift));
- aa.ul[L] <<= shift;
- }
- return (aa.q);
-}
diff --git a/lib/libc/quad/ashrdi3.c b/lib/libc/quad/ashrdi3.c
deleted file mode 100644
index 9ffa5ed..0000000
--- a/lib/libc/quad/ashrdi3.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ashrdi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Shift a (signed) quad value right (arithmetic shift right).
- */
-quad_t
-__ashrdi3(a, shift)
- quad_t a;
- qshift_t shift;
-{
- union uu aa;
-
- aa.q = a;
- if (shift >= LONG_BITS) {
- long s;
-
- /*
- * Smear bits rightward using the machine's right-shift
- * method, whether that is sign extension or zero fill,
- * to get the `sign word' s. Note that shifting by
- * LONG_BITS is undefined, so we shift (LONG_BITS-1),
- * then 1 more, to get our answer.
- */
- s = (aa.sl[H] >> (LONG_BITS - 1)) >> 1;
- aa.ul[L] = shift >= QUAD_BITS ? s :
- aa.sl[H] >> (shift - LONG_BITS);
- aa.ul[H] = s;
- } else if (shift > 0) {
- aa.ul[L] = (aa.ul[L] >> shift) |
- (aa.ul[H] << (LONG_BITS - shift));
- aa.sl[H] >>= shift;
- }
- return (aa.q);
-}
diff --git a/lib/libc/quad/cmpdi2.c b/lib/libc/quad/cmpdi2.c
deleted file mode 100644
index f6e4bdd..0000000
--- a/lib/libc/quad/cmpdi2.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)cmpdi2.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Return 0, 1, or 2 as a <, =, > b respectively.
- * Both a and b are considered signed---which means only the high word is
- * signed.
- */
-int
-__cmpdi2(a, b)
- quad_t a, b;
-{
- union uu aa, bb;
-
- aa.q = a;
- bb.q = b;
- return (aa.sl[H] < bb.sl[H] ? 0 : aa.sl[H] > bb.sl[H] ? 2 :
- aa.ul[L] < bb.ul[L] ? 0 : aa.ul[L] > bb.ul[L] ? 2 : 1);
-}
diff --git a/lib/libc/quad/divdi3.c b/lib/libc/quad/divdi3.c
deleted file mode 100644
index da7b2fc..0000000
--- a/lib/libc/quad/divdi3.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)divdi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Divide two signed quads.
- * ??? if -1/2 should produce -1 on this machine, this code is wrong
- */
-quad_t
-__divdi3(a, b)
- quad_t a, b;
-{
- u_quad_t ua, ub, uq;
- int neg;
-
- if (a < 0)
- ua = -(u_quad_t)a, neg = 1;
- else
- ua = a, neg = 0;
- if (b < 0)
- ub = -(u_quad_t)b, neg ^= 1;
- else
- ub = b;
- uq = __qdivrem(ua, ub, (u_quad_t *)0);
- return (neg ? -uq : uq);
-}
diff --git a/lib/libc/quad/fixdfdi.c b/lib/libc/quad/fixdfdi.c
deleted file mode 100644
index 6d57550..0000000
--- a/lib/libc/quad/fixdfdi.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fixdfdi.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Convert double to (signed) quad.
- * We clamp anything that is out of range.
- */
-quad_t
-__fixdfdi(x)
- double x;
-{
- if (x < 0)
- if (x <= QUAD_MIN)
- return (QUAD_MIN);
- else
- return ((quad_t)-(u_quad_t)-x);
- else
- if (x >= QUAD_MAX)
- return (QUAD_MAX);
- else
- return ((quad_t)(u_quad_t)x);
-}
diff --git a/lib/libc/quad/fixsfdi.c b/lib/libc/quad/fixsfdi.c
deleted file mode 100644
index 448109f..0000000
--- a/lib/libc/quad/fixsfdi.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fixsfdi.c 5.1 (Berkeley) 7/7/92";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Convert float to (signed) quad.
- * We clamp anything that is out of range.
- *
- * N.B.: must use new ANSI syntax (sorry).
- */
-long long
-__fixsfdi(float x)
-{
- if (x < 0)
- if (x <= QUAD_MIN)
- return (QUAD_MIN);
- else
- return ((quad_t)-(u_quad_t)-x);
- else
- if (x >= QUAD_MAX)
- return (QUAD_MAX);
- else
- return ((quad_t)(u_quad_t)x);
-}
diff --git a/lib/libc/quad/fixunsdfdi.c b/lib/libc/quad/fixunsdfdi.c
deleted file mode 100644
index 601790f..0000000
--- a/lib/libc/quad/fixunsdfdi.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fixunsdfdi.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-#define ONE_FOURTH (1 << (LONG_BITS - 2))
-#define ONE_HALF (ONE_FOURTH * 2.0)
-#define ONE (ONE_FOURTH * 4.0)
-
-/*
- * Convert double to (unsigned) quad.
- * Not sure what to do with negative numbers---for now, anything out
- * of range becomes UQUAD_MAX.
- */
-u_quad_t
-__fixunsdfdi(x)
- double x;
-{
- double toppart;
- union uu t;
-
- if (x < 0)
- return (UQUAD_MAX); /* ??? should be 0? ERANGE??? */
-#ifdef notdef /* this falls afoul of a GCC bug */
- if (x >= UQUAD_MAX)
- return (UQUAD_MAX);
-#else /* so we wire in 2^64-1 instead */
- if (x >= 18446744073709551615.0)
- return (UQUAD_MAX);
-#endif
- /*
- * Get the upper part of the result. Note that the divide
- * may round up; we want to avoid this if possible, so we
- * subtract `1/2' first.
- */
- toppart = (x - ONE_HALF) / ONE;
- /*
- * Now build a u_quad_t out of the top part. The difference
- * between x and this is the bottom part (this may introduce
- * a few fuzzy bits, but what the heck). With any luck this
- * difference will be nonnegative: x should wind up in the
- * range [0..ULONG_MAX]. For paranoia, we assume [LONG_MIN..
- * 2*ULONG_MAX] instead.
- */
- t.ul[H] = (unsigned long)toppart;
- t.ul[L] = 0;
- x -= (double)t.uq;
- if (x < 0) {
- t.ul[H]--;
- x += ULONG_MAX;
- }
- if (x > ULONG_MAX) {
- t.ul[H]++;
- x -= ULONG_MAX;
- }
- t.ul[L] = (u_long)x;
- return (t.uq);
-}
diff --git a/lib/libc/quad/fixunssfdi.c b/lib/libc/quad/fixunssfdi.c
deleted file mode 100644
index 9405ce7..0000000
--- a/lib/libc/quad/fixunssfdi.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fixunssfdi.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-#define ONE_FOURTH (1 << (LONG_BITS - 2))
-#define ONE_HALF (ONE_FOURTH * 2.0)
-#define ONE (ONE_FOURTH * 4.0)
-
-/*
- * Convert float to (unsigned) quad. We do most of our work in double,
- * out of sheer paranoia.
- *
- * Not sure what to do with negative numbers---for now, anything out
- * of range becomes UQUAD_MAX.
- *
- * N.B.: must use new ANSI syntax (sorry).
- */
-u_quad_t
-__fixunssfdi(float f)
-{
- double x, toppart;
- union uu t;
-
- if (f < 0)
- return (UQUAD_MAX); /* ??? should be 0? ERANGE??? */
-#ifdef notdef /* this falls afoul of a GCC bug */
- if (f >= UQUAD_MAX)
- return (UQUAD_MAX);
-#else /* so we wire in 2^64-1 instead */
- if (f >= 18446744073709551615.0)
- return (UQUAD_MAX);
-#endif
- x = f;
- /*
- * Get the upper part of the result. Note that the divide
- * may round up; we want to avoid this if possible, so we
- * subtract `1/2' first.
- */
- toppart = (x - ONE_HALF) / ONE;
- /*
- * Now build a u_quad_t out of the top part. The difference
- * between x and this is the bottom part (this may introduce
- * a few fuzzy bits, but what the heck). With any luck this
- * difference will be nonnegative: x should wind up in the
- * range [0..ULONG_MAX]. For paranoia, we assume [LONG_MIN..
- * 2*ULONG_MAX] instead.
- */
- t.ul[H] = (unsigned long)toppart;
- t.ul[L] = 0;
- x -= (double)t.uq;
- if (x < 0) {
- t.ul[H]--;
- x += ULONG_MAX;
- }
- if (x > ULONG_MAX) {
- t.ul[H]++;
- x -= ULONG_MAX;
- }
- t.ul[L] = (u_long)x;
- return (t.uq);
-}
diff --git a/lib/libc/quad/floatdidf.c b/lib/libc/quad/floatdidf.c
deleted file mode 100644
index 7b90f6e..0000000
--- a/lib/libc/quad/floatdidf.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)floatdidf.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Convert (signed) quad to double.
- */
-double
-__floatdidf(x)
- quad_t x;
-{
- double d;
- union uu u;
- int neg;
-
- /*
- * Get an unsigned number first, by negating if necessary.
- */
- if (x < 0)
- u.q = -x, neg = 1;
- else
- u.q = x, neg = 0;
-
- /*
- * Now u.ul[H] has the factor of 2^32 (or whatever) and u.ul[L]
- * has the units. Ideally we could just set d, add LONG_BITS to
- * its exponent, and then add the units, but this is portable
- * code and does not know how to get at an exponent. Machine-
- * specific code may be able to do this more efficiently.
- */
- d = (double)u.ul[H] * ((1 << (LONG_BITS - 2)) * 4.0);
- d += u.ul[L];
-
- return (neg ? -d : d);
-}
diff --git a/lib/libc/quad/floatdisf.c b/lib/libc/quad/floatdisf.c
deleted file mode 100644
index 7772218..0000000
--- a/lib/libc/quad/floatdisf.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)floatdisf.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Convert (signed) quad to float.
- */
-float
-__floatdisf(x)
- quad_t x;
-{
- float f;
- union uu u;
- int neg;
-
- /*
- * Get an unsigned number first, by negating if necessary.
- */
- if (x < 0)
- u.q = -x, neg = 1;
- else
- u.q = x, neg = 0;
-
- /*
- * Now u.ul[H] has the factor of 2^32 (or whatever) and u.ul[L]
- * has the units. Ideally we could just set f, add LONG_BITS to
- * its exponent, and then add the units, but this is portable
- * code and does not know how to get at an exponent. Machine-
- * specific code may be able to do this more efficiently.
- *
- * Using double here may be excessive paranoia.
- */
- f = (double)u.ul[H] * ((1 << (LONG_BITS - 2)) * 4.0);
- f += u.ul[L];
-
- return (neg ? -f : f);
-}
diff --git a/lib/libc/quad/floatunsdidf.c b/lib/libc/quad/floatunsdidf.c
deleted file mode 100644
index 2fb6401..0000000
--- a/lib/libc/quad/floatunsdidf.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)floatunsdidf.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Convert (unsigned) quad to double.
- * This is exactly like floatdidf.c except that negatives never occur.
- */
-double
-__floatunsdidf(x)
- u_quad_t x;
-{
- double d;
- union uu u;
-
- u.uq = x;
- d = (double)u.ul[H] * ((1 << (LONG_BITS - 2)) * 4.0);
- d += u.ul[L];
- return (d);
-}
diff --git a/lib/libc/quad/iordi3.c b/lib/libc/quad/iordi3.c
deleted file mode 100644
index e225005..0000000
--- a/lib/libc/quad/iordi3.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)iordi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Return a | b, in quad.
- */
-quad_t
-__iordi3(a, b)
- quad_t a, b;
-{
- union uu aa, bb;
-
- aa.q = a;
- bb.q = b;
- aa.ul[0] |= bb.ul[0];
- aa.ul[1] |= bb.ul[1];
- return (aa.q);
-}
diff --git a/lib/libc/quad/lshldi3.c b/lib/libc/quad/lshldi3.c
deleted file mode 100644
index 0af6051..0000000
--- a/lib/libc/quad/lshldi3.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)lshldi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Shift an (unsigned) quad value left (logical shift left).
- * This is the same as arithmetic shift left!
- */
-quad_t
-__lshldi3(a, shift)
- quad_t a;
- qshift_t shift;
-{
- union uu aa;
-
- aa.q = a;
- if (shift >= LONG_BITS) {
- aa.ul[H] = shift >= QUAD_BITS ? 0 :
- aa.ul[L] << (shift - LONG_BITS);
- aa.ul[L] = 0;
- } else if (shift > 0) {
- aa.ul[H] = (aa.ul[H] << shift) |
- (aa.ul[L] >> (LONG_BITS - shift));
- aa.ul[L] <<= shift;
- }
- return (aa.q);
-}
diff --git a/lib/libc/quad/lshrdi3.c b/lib/libc/quad/lshrdi3.c
deleted file mode 100644
index add2eda..0000000
--- a/lib/libc/quad/lshrdi3.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)lshrdi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Shift an (unsigned) quad value right (logical shift right).
- */
-quad_t
-__lshrdi3(a, shift)
- quad_t a;
- qshift_t shift;
-{
- union uu aa;
-
- aa.q = a;
- if (shift >= LONG_BITS) {
- aa.ul[L] = shift >= QUAD_BITS ? 0 :
- aa.ul[H] >> (shift - LONG_BITS);
- aa.ul[H] = 0;
- } else if (shift > 0) {
- aa.ul[L] = (aa.ul[L] >> shift) |
- (aa.ul[H] << (LONG_BITS - shift));
- aa.ul[H] >>= shift;
- }
- return (aa.q);
-}
diff --git a/lib/libc/quad/moddi3.c b/lib/libc/quad/moddi3.c
deleted file mode 100644
index f31c6e8..0000000
--- a/lib/libc/quad/moddi3.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)moddi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Return remainder after dividing two signed quads.
- *
- * XXX
- * If -1/2 should produce -1 on this machine, this code is wrong.
- */
-quad_t
-__moddi3(a, b)
- quad_t a, b;
-{
- u_quad_t ua, ub, ur;
- int neg;
-
- if (a < 0)
- ua = -(u_quad_t)a, neg = 1;
- else
- ua = a, neg = 0;
- if (b < 0)
- ub = -(u_quad_t)b, neg ^= 1;
- else
- ub = b;
- (void)__qdivrem(ua, ub, &ur);
- return (neg ? -ur : ur);
-}
diff --git a/lib/libc/quad/muldi3.c b/lib/libc/quad/muldi3.c
deleted file mode 100644
index 5e2331f..0000000
--- a/lib/libc/quad/muldi3.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)muldi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Multiply two quads.
- *
- * Our algorithm is based on the following. Split incoming quad values
- * u and v (where u,v >= 0) into
- *
- * u = 2^n u1 * u0 (n = number of bits in `u_long', usu. 32)
- *
- * and
- *
- * v = 2^n v1 * v0
- *
- * Then
- *
- * uv = 2^2n u1 v1 + 2^n u1 v0 + 2^n v1 u0 + u0 v0
- * = 2^2n u1 v1 + 2^n (u1 v0 + v1 u0) + u0 v0
- *
- * Now add 2^n u1 v1 to the first term and subtract it from the middle,
- * and add 2^n u0 v0 to the last term and subtract it from the middle.
- * This gives:
- *
- * uv = (2^2n + 2^n) (u1 v1) +
- * (2^n) (u1 v0 - u1 v1 + u0 v1 - u0 v0) +
- * (2^n + 1) (u0 v0)
- *
- * Factoring the middle a bit gives us:
- *
- * uv = (2^2n + 2^n) (u1 v1) + [u1v1 = high]
- * (2^n) (u1 - u0) (v0 - v1) + [(u1-u0)... = mid]
- * (2^n + 1) (u0 v0) [u0v0 = low]
- *
- * The terms (u1 v1), (u1 - u0) (v0 - v1), and (u0 v0) can all be done
- * in just half the precision of the original. (Note that either or both
- * of (u1 - u0) or (v0 - v1) may be negative.)
- *
- * This algorithm is from Knuth vol. 2 (2nd ed), section 4.3.3, p. 278.
- *
- * Since C does not give us a `long * long = quad' operator, we split
- * our input quads into two longs, then split the two longs into two
- * shorts. We can then calculate `short * short = long' in native
- * arithmetic.
- *
- * Our product should, strictly speaking, be a `long quad', with 128
- * bits, but we are going to discard the upper 64. In other words,
- * we are not interested in uv, but rather in (uv mod 2^2n). This
- * makes some of the terms above vanish, and we get:
- *
- * (2^n)(high) + (2^n)(mid) + (2^n + 1)(low)
- *
- * or
- *
- * (2^n)(high + mid + low) + low
- *
- * Furthermore, `high' and `mid' can be computed mod 2^n, as any factor
- * of 2^n in either one will also vanish. Only `low' need be computed
- * mod 2^2n, and only because of the final term above.
- */
-static quad_t __lmulq(u_long, u_long);
-
-quad_t
-__muldi3(a, b)
- quad_t a, b;
-{
- union uu u, v, low, prod;
- register u_long high, mid, udiff, vdiff;
- register int negall, negmid;
-#define u1 u.ul[H]
-#define u0 u.ul[L]
-#define v1 v.ul[H]
-#define v0 v.ul[L]
-
- /*
- * Get u and v such that u, v >= 0. When this is finished,
- * u1, u0, v1, and v0 will be directly accessible through the
- * longword fields.
- */
- if (a >= 0)
- u.q = a, negall = 0;
- else
- u.q = -a, negall = 1;
- if (b >= 0)
- v.q = b;
- else
- v.q = -b, negall ^= 1;
-
- if (u1 == 0 && v1 == 0) {
- /*
- * An (I hope) important optimization occurs when u1 and v1
- * are both 0. This should be common since most numbers
- * are small. Here the product is just u0*v0.
- */
- prod.q = __lmulq(u0, v0);
- } else {
- /*
- * Compute the three intermediate products, remembering
- * whether the middle term is negative. We can discard
- * any upper bits in high and mid, so we can use native
- * u_long * u_long => u_long arithmetic.
- */
- low.q = __lmulq(u0, v0);
-
- if (u1 >= u0)
- negmid = 0, udiff = u1 - u0;
- else
- negmid = 1, udiff = u0 - u1;
- if (v0 >= v1)
- vdiff = v0 - v1;
- else
- vdiff = v1 - v0, negmid ^= 1;
- mid = udiff * vdiff;
-
- high = u1 * v1;
-
- /*
- * Assemble the final product.
- */
- prod.ul[H] = high + (negmid ? -mid : mid) + low.ul[L] +
- low.ul[H];
- prod.ul[L] = low.ul[L];
- }
- return (negall ? -prod.q : prod.q);
-#undef u1
-#undef u0
-#undef v1
-#undef v0
-}
-
-/*
- * Multiply two 2N-bit longs to produce a 4N-bit quad, where N is half
- * the number of bits in a long (whatever that is---the code below
- * does not care as long as quad.h does its part of the bargain---but
- * typically N==16).
- *
- * We use the same algorithm from Knuth, but this time the modulo refinement
- * does not apply. On the other hand, since N is half the size of a long,
- * we can get away with native multiplication---none of our input terms
- * exceeds (ULONG_MAX >> 1).
- *
- * Note that, for u_long l, the quad-precision result
- *
- * l << N
- *
- * splits into high and low longs as HHALF(l) and LHUP(l) respectively.
- */
-static quad_t
-__lmulq(u_long u, u_long v)
-{
- u_long u1, u0, v1, v0, udiff, vdiff, high, mid, low;
- u_long prodh, prodl, was;
- union uu prod;
- int neg;
-
- u1 = HHALF(u);
- u0 = LHALF(u);
- v1 = HHALF(v);
- v0 = LHALF(v);
-
- low = u0 * v0;
-
- /* This is the same small-number optimization as before. */
- if (u1 == 0 && v1 == 0)
- return (low);
-
- if (u1 >= u0)
- udiff = u1 - u0, neg = 0;
- else
- udiff = u0 - u1, neg = 1;
- if (v0 >= v1)
- vdiff = v0 - v1;
- else
- vdiff = v1 - v0, neg ^= 1;
- mid = udiff * vdiff;
-
- high = u1 * v1;
-
- /* prod = (high << 2N) + (high << N); */
- prodh = high + HHALF(high);
- prodl = LHUP(high);
-
- /* if (neg) prod -= mid << N; else prod += mid << N; */
- if (neg) {
- was = prodl;
- prodl -= LHUP(mid);
- prodh -= HHALF(mid) + (prodl > was);
- } else {
- was = prodl;
- prodl += LHUP(mid);
- prodh += HHALF(mid) + (prodl < was);
- }
-
- /* prod += low << N */
- was = prodl;
- prodl += LHUP(low);
- prodh += HHALF(low) + (prodl < was);
- /* ... + low; */
- if ((prodl += low) < low)
- prodh++;
-
- /* return 4N-bit product */
- prod.ul[H] = prodh;
- prod.ul[L] = prodl;
- return (prod.q);
-}
diff --git a/lib/libc/quad/negdi2.c b/lib/libc/quad/negdi2.c
deleted file mode 100644
index bb8670d..0000000
--- a/lib/libc/quad/negdi2.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)negdi2.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Return -a (or, equivalently, 0 - a), in quad. See subdi3.c.
- */
-quad_t
-__negdi2(a)
- quad_t a;
-{
- union uu aa, res;
-
- aa.q = a;
- res.ul[L] = -aa.ul[L];
- res.ul[H] = -aa.ul[H] - (res.ul[L] > 0);
- return (res.q);
-}
diff --git a/lib/libc/quad/notdi2.c b/lib/libc/quad/notdi2.c
deleted file mode 100644
index d624733..0000000
--- a/lib/libc/quad/notdi2.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)notdi2.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Return ~a. For some reason gcc calls this `one's complement' rather
- * than `not'.
- */
-quad_t
-__one_cmpldi2(a)
- quad_t a;
-{
- union uu aa;
-
- aa.q = a;
- aa.ul[0] = ~aa.ul[0];
- aa.ul[1] = ~aa.ul[1];
- return (aa.q);
-}
diff --git a/lib/libc/quad/qdivrem.c b/lib/libc/quad/qdivrem.c
deleted file mode 100644
index 56f91ec..0000000
--- a/lib/libc/quad/qdivrem.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)qdivrem.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Multiprecision divide. This algorithm is from Knuth vol. 2 (2nd ed),
- * section 4.3.1, pp. 257--259.
- */
-
-#include "quad.h"
-
-#define B (1 << HALF_BITS) /* digit base */
-
-/* Combine two `digits' to make a single two-digit number. */
-#define COMBINE(a, b) (((u_long)(a) << HALF_BITS) | (b))
-
-/* select a type for digits in base B: use unsigned short if they fit */
-#if ULONG_MAX == 0xffffffff && USHRT_MAX >= 0xffff
-typedef unsigned short digit;
-#else
-typedef u_long digit;
-#endif
-
-/*
- * Shift p[0]..p[len] left `sh' bits, ignoring any bits that
- * `fall out' the left (there never will be any such anyway).
- * We may assume len >= 0. NOTE THAT THIS WRITES len+1 DIGITS.
- */
-static void
-shl(register digit *p, register int len, register int sh)
-{
- register int i;
-
- for (i = 0; i < len; i++)
- p[i] = LHALF(p[i] << sh) | (p[i + 1] >> (HALF_BITS - sh));
- p[i] = LHALF(p[i] << sh);
-}
-
-/*
- * __qdivrem(u, v, rem) returns u/v and, optionally, sets *rem to u%v.
- *
- * We do this in base 2-sup-HALF_BITS, so that all intermediate products
- * fit within u_long. As a consequence, the maximum length dividend and
- * divisor are 4 `digits' in this base (they are shorter if they have
- * leading zeros).
- */
-u_quad_t
-__qdivrem(uq, vq, arq)
- u_quad_t uq, vq, *arq;
-{
- union uu tmp;
- digit *u, *v, *q;
- register digit v1, v2;
- u_long qhat, rhat, t;
- int m, n, d, j, i;
- digit uspace[5], vspace[5], qspace[5];
-
- /*
- * Take care of special cases: divide by zero, and u < v.
- */
- if (vq == 0) {
- /* divide by zero. */
- static volatile const unsigned int zero = 0;
-
- tmp.ul[H] = tmp.ul[L] = 1 / zero;
- if (arq)
- *arq = uq;
- return (tmp.q);
- }
- if (uq < vq) {
- if (arq)
- *arq = uq;
- return (0);
- }
- u = &uspace[0];
- v = &vspace[0];
- q = &qspace[0];
-
- /*
- * Break dividend and divisor into digits in base B, then
- * count leading zeros to determine m and n. When done, we
- * will have:
- * u = (u[1]u[2]...u[m+n]) sub B
- * v = (v[1]v[2]...v[n]) sub B
- * v[1] != 0
- * 1 < n <= 4 (if n = 1, we use a different division algorithm)
- * m >= 0 (otherwise u < v, which we already checked)
- * m + n = 4
- * and thus
- * m = 4 - n <= 2
- */
- tmp.uq = uq;
- u[0] = 0;
- u[1] = HHALF(tmp.ul[H]);
- u[2] = LHALF(tmp.ul[H]);
- u[3] = HHALF(tmp.ul[L]);
- u[4] = LHALF(tmp.ul[L]);
- tmp.uq = vq;
- v[1] = HHALF(tmp.ul[H]);
- v[2] = LHALF(tmp.ul[H]);
- v[3] = HHALF(tmp.ul[L]);
- v[4] = LHALF(tmp.ul[L]);
- for (n = 4; v[1] == 0; v++) {
- if (--n == 1) {
- u_long rbj; /* r*B+u[j] (not root boy jim) */
- digit q1, q2, q3, q4;
-
- /*
- * Change of plan, per exercise 16.
- * r = 0;
- * for j = 1..4:
- * q[j] = floor((r*B + u[j]) / v),
- * r = (r*B + u[j]) % v;
- * We unroll this completely here.
- */
- t = v[2]; /* nonzero, by definition */
- q1 = u[1] / t;
- rbj = COMBINE(u[1] % t, u[2]);
- q2 = rbj / t;
- rbj = COMBINE(rbj % t, u[3]);
- q3 = rbj / t;
- rbj = COMBINE(rbj % t, u[4]);
- q4 = rbj / t;
- if (arq)
- *arq = rbj % t;
- tmp.ul[H] = COMBINE(q1, q2);
- tmp.ul[L] = COMBINE(q3, q4);
- return (tmp.q);
- }
- }
-
- /*
- * By adjusting q once we determine m, we can guarantee that
- * there is a complete four-digit quotient at &qspace[1] when
- * we finally stop.
- */
- for (m = 4 - n; u[1] == 0; u++)
- m--;
- for (i = 4 - m; --i >= 0;)
- q[i] = 0;
- q += 4 - m;
-
- /*
- * Here we run Program D, translated from MIX to C and acquiring
- * a few minor changes.
- *
- * D1: choose multiplier 1 << d to ensure v[1] >= B/2.
- */
- d = 0;
- for (t = v[1]; t < B / 2; t <<= 1)
- d++;
- if (d > 0) {
- shl(&u[0], m + n, d); /* u <<= d */
- shl(&v[1], n - 1, d); /* v <<= d */
- }
- /*
- * D2: j = 0.
- */
- j = 0;
- v1 = v[1]; /* for D3 -- note that v[1..n] are constant */
- v2 = v[2]; /* for D3 */
- do {
- register digit uj0, uj1, uj2;
-
- /*
- * D3: Calculate qhat (\^q, in TeX notation).
- * Let qhat = min((u[j]*B + u[j+1])/v[1], B-1), and
- * let rhat = (u[j]*B + u[j+1]) mod v[1].
- * While rhat < B and v[2]*qhat > rhat*B+u[j+2],
- * decrement qhat and increase rhat correspondingly.
- * Note that if rhat >= B, v[2]*qhat < rhat*B.
- */
- uj0 = u[j + 0]; /* for D3 only -- note that u[j+...] change */
- uj1 = u[j + 1]; /* for D3 only */
- uj2 = u[j + 2]; /* for D3 only */
- if (uj0 == v1) {
- qhat = B;
- rhat = uj1;
- goto qhat_too_big;
- } else {
- u_long n = COMBINE(uj0, uj1);
- qhat = n / v1;
- rhat = n % v1;
- }
- while (v2 * qhat > COMBINE(rhat, uj2)) {
- qhat_too_big:
- qhat--;
- if ((rhat += v1) >= B)
- break;
- }
- /*
- * D4: Multiply and subtract.
- * The variable `t' holds any borrows across the loop.
- * We split this up so that we do not require v[0] = 0,
- * and to eliminate a final special case.
- */
- for (t = 0, i = n; i > 0; i--) {
- t = u[i + j] - v[i] * qhat - t;
- u[i + j] = LHALF(t);
- t = (B - HHALF(t)) & (B - 1);
- }
- t = u[j] - t;
- u[j] = LHALF(t);
- /*
- * D5: test remainder.
- * There is a borrow if and only if HHALF(t) is nonzero;
- * in that (rare) case, qhat was too large (by exactly 1).
- * Fix it by adding v[1..n] to u[j..j+n].
- */
- if (HHALF(t)) {
- qhat--;
- for (t = 0, i = n; i > 0; i--) { /* D6: add back. */
- t += u[i + j] + v[i];
- u[i + j] = LHALF(t);
- t = HHALF(t);
- }
- u[j] = LHALF(u[j] + t);
- }
- q[j] = qhat;
- } while (++j <= m); /* D7: loop on j. */
-
- /*
- * If caller wants the remainder, we have to calculate it as
- * u[m..m+n] >> d (this is at most n digits and thus fits in
- * u[m+1..m+n], but we may need more source digits).
- */
- if (arq) {
- if (d) {
- for (i = m + n; i > m; --i)
- u[i] = (u[i] >> d) |
- LHALF(u[i - 1] << (HALF_BITS - d));
- u[i] = 0;
- }
- tmp.ul[H] = COMBINE(uspace[1], uspace[2]);
- tmp.ul[L] = COMBINE(uspace[3], uspace[4]);
- *arq = tmp.q;
- }
-
- tmp.ul[H] = COMBINE(qspace[1], qspace[2]);
- tmp.ul[L] = COMBINE(qspace[3], qspace[4]);
- return (tmp.q);
-}
diff --git a/lib/libc/quad/quad.h b/lib/libc/quad/quad.h
deleted file mode 100644
index 873a1f6..0000000
--- a/lib/libc/quad/quad.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)quad.h 8.1 (Berkeley) 6/4/93
- * $Id$
- */
-
-/*
- * Quad arithmetic.
- *
- * This library makes the following assumptions:
- *
- * - The type long long (aka quad_t) exists.
- *
- * - A quad variable is exactly twice as long as `long'.
- *
- * - The machine's arithmetic is two's complement.
- *
- * This library can provide 128-bit arithmetic on a machine with 128-bit
- * quads and 64-bit longs, for instance, or 96-bit arithmetic on machines
- * with 48-bit longs.
- */
-
-#include <sys/types.h>
-#include <limits.h>
-
-/*
- * Depending on the desired operation, we view a `long long' (aka quad_t) in
- * one or more of the following formats.
- */
-union uu {
- quad_t q; /* as a (signed) quad */
- quad_t uq; /* as an unsigned quad */
- long sl[2]; /* as two signed longs */
- u_long ul[2]; /* as two unsigned longs */
-};
-
-/*
- * Define high and low longwords.
- */
-#define H _QUAD_HIGHWORD
-#define L _QUAD_LOWWORD
-
-/*
- * Total number of bits in a quad_t and in the pieces that make it up.
- * These are used for shifting, and also below for halfword extraction
- * and assembly.
- */
-#define QUAD_BITS (sizeof(quad_t) * CHAR_BIT)
-#define LONG_BITS (sizeof(long) * CHAR_BIT)
-#define HALF_BITS (sizeof(long) * CHAR_BIT / 2)
-
-/*
- * Extract high and low shortwords from longword, and move low shortword of
- * longword to upper half of long, i.e., produce the upper longword of
- * ((quad_t)(x) << (number_of_bits_in_long/2)). (`x' must actually be u_long.)
- *
- * These are used in the multiply code, to split a longword into upper
- * and lower halves, and to reassemble a product as a quad_t, shifted left
- * (sizeof(long)*CHAR_BIT/2).
- */
-#define HHALF(x) ((x) >> HALF_BITS)
-#define LHALF(x) ((x) & ((1 << HALF_BITS) - 1))
-#define LHUP(x) ((x) << HALF_BITS)
-
-quad_t __divdi3 __P((quad_t a, quad_t b));
-quad_t __moddi3 __P((quad_t a, quad_t b));
-u_quad_t __qdivrem __P((u_quad_t u, u_quad_t v, u_quad_t *rem));
-u_quad_t __udivdi3 __P((u_quad_t a, u_quad_t b));
-u_quad_t __umoddi3 __P((u_quad_t a, u_quad_t b));
-
-/*
- * XXX
- * Compensate for gcc 1 vs gcc 2. Gcc 1 defines ?sh?di3's second argument
- * as u_quad_t, while gcc 2 correctly uses int. Unfortunately, we still use
- * both compilers.
- */
-#if __GNUC__ >= 2
-typedef unsigned int qshift_t;
-#else
-typedef u_quad_t qshift_t;
-#endif
diff --git a/lib/libc/quad/subdi3.c b/lib/libc/quad/subdi3.c
deleted file mode 100644
index e976345..0000000
--- a/lib/libc/quad/subdi3.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)subdi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Subtract two quad values. This is trivial since a one-bit carry
- * from a single u_long difference x-y occurs if and only if (x-y) > x.
- */
-quad_t
-__subdi3(a, b)
- quad_t a, b;
-{
- union uu aa, bb, diff;
-
- aa.q = a;
- bb.q = b;
- diff.ul[L] = aa.ul[L] - bb.ul[L];
- diff.ul[H] = aa.ul[H] - bb.ul[H] - (diff.ul[L] > aa.ul[L]);
- return (diff.q);
-}
diff --git a/lib/libc/quad/ucmpdi2.c b/lib/libc/quad/ucmpdi2.c
deleted file mode 100644
index e5dfc43..0000000
--- a/lib/libc/quad/ucmpdi2.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ucmpdi2.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Return 0, 1, or 2 as a <, =, > b respectively.
- * Neither a nor b are considered signed.
- */
-int
-__ucmpdi2(a, b)
- u_quad_t a, b;
-{
- union uu aa, bb;
-
- aa.uq = a;
- bb.uq = b;
- return (aa.ul[H] < bb.ul[H] ? 0 : aa.ul[H] > bb.ul[H] ? 2 :
- aa.ul[L] < bb.ul[L] ? 0 : aa.ul[L] > bb.ul[L] ? 2 : 1);
-}
diff --git a/lib/libc/quad/udivdi3.c b/lib/libc/quad/udivdi3.c
deleted file mode 100644
index 8ddd559..0000000
--- a/lib/libc/quad/udivdi3.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)udivdi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Divide two unsigned quads.
- */
-u_quad_t
-__udivdi3(a, b)
- u_quad_t a, b;
-{
-
- return (__qdivrem(a, b, (u_quad_t *)0));
-}
diff --git a/lib/libc/quad/umoddi3.c b/lib/libc/quad/umoddi3.c
deleted file mode 100644
index 2a85f76..0000000
--- a/lib/libc/quad/umoddi3.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)umoddi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Return remainder after dividing two unsigned quads.
- */
-u_quad_t
-__umoddi3(a, b)
- u_quad_t a, b;
-{
- u_quad_t r;
-
- (void)__qdivrem(a, b, &r);
- return (r);
-}
diff --git a/lib/libc/quad/xordi3.c b/lib/libc/quad/xordi3.c
deleted file mode 100644
index e3a8588..0000000
--- a/lib/libc/quad/xordi3.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
- * contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)xordi3.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include "quad.h"
-
-/*
- * Return a ^ b, in quad.
- */
-quad_t
-__xordi3(a, b)
- quad_t a, b;
-{
- union uu aa, bb;
-
- aa.q = a;
- bb.q = b;
- aa.ul[0] ^= bb.ul[0];
- aa.ul[1] ^= bb.ul[1];
- return (aa.q);
-}
diff --git a/lib/libc/regex/COPYRIGHT b/lib/libc/regex/COPYRIGHT
deleted file mode 100644
index 574f6bc..0000000
--- a/lib/libc/regex/COPYRIGHT
+++ /dev/null
@@ -1,56 +0,0 @@
-Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
-This software is not subject to any license of the American Telephone
-and Telegraph Company or of the Regents of the University of California.
-
-Permission is granted to anyone to use this software for any purpose on
-any computer system, and to alter it and redistribute it, subject
-to the following restrictions:
-
-1. The author is not responsible for the consequences of use of this
- software, no matter how awful, even if they arise from flaws in it.
-
-2. The origin of this software must not be misrepresented, either by
- explicit claim or by omission. Since few users ever read sources,
- credits must appear in the documentation.
-
-3. Altered versions must be plainly marked as such, and must not be
- misrepresented as being the original software. Since few users
- ever read sources, credits must appear in the documentation.
-
-4. This notice may not be removed or altered.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-/*-
- * Copyright (c) 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)COPYRIGHT 8.1 (Berkeley) 3/16/94
- */
diff --git a/lib/libc/regex/Makefile.inc b/lib/libc/regex/Makefile.inc
deleted file mode 100644
index 12af2a8..0000000
--- a/lib/libc/regex/Makefile.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-# from @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.3 1997/05/03 03:50:02 jb Exp $
-
-# regex sources
-.PATH: ${.CURDIR}/../libc/regex
-
-CFLAGS+=-DPOSIX_MISTAKE
-
-SRCS+= regcomp.c regerror.c regexec.c regfree.c
-
-.if ${LIB} == "c"
-MAN3+= regex.3
-MAN7+= re_format.7
-
-MLINKS+=regex.3 regcomp.3 regex.3 regexec.3 regex.3 regerror.3
-MLINKS+=regexec.3 regfree.3
-.endif
diff --git a/lib/libc/regex/WHATSNEW b/lib/libc/regex/WHATSNEW
deleted file mode 100644
index f4301d3..0000000
--- a/lib/libc/regex/WHATSNEW
+++ /dev/null
@@ -1,94 +0,0 @@
-# @(#)WHATSNEW 8.3 (Berkeley) 3/18/94
-
-New in alpha3.4: The complex bug alluded to below has been fixed (in a
-slightly kludgey temporary way that may hurt efficiency a bit; this is
-another "get it out the door for 4.4" release). The tests at the end of
-the tests file have accordingly been uncommented. The primary sign of
-the bug was that something like a?b matching ab matched b rather than ab.
-(The bug was essentially specific to this exact situation, else it would
-have shown up earlier.)
-
-New in alpha3.3: The definition of word boundaries has been altered
-slightly, to more closely match the usual programming notion that "_"
-is an alphabetic. Stuff used for pre-ANSI systems is now in a subdir,
-and the makefile no longer alludes to it in mysterious ways. The
-makefile has generally been cleaned up some. Fixes have been made
-(again!) so that the regression test will run without -DREDEBUG, at
-the cost of weaker checking. A workaround for a bug in some folks'
-<assert.h> has been added. And some more things have been added to
-tests, including a couple right at the end which are commented out
-because the code currently flunks them (complex bug; fix coming).
-Plus the usual minor cleanup.
-
-New in alpha3.2: Assorted bits of cleanup and portability improvement
-(the development base is now a BSDI system using GCC instead of an ancient
-Sun system, and the newer compiler exposed some glitches). Fix for a
-serious bug that affected REs using many [] (including REG_ICASE REs
-because of the way they are implemented), *sometimes*, depending on
-memory-allocation patterns. The header-file prototypes no longer name
-the parameters, avoiding possible name conflicts. The possibility that
-some clot has defined CHAR_MIN as (say) `-128' instead of `(-128)' is
-now handled gracefully. "uchar" is no longer used as an internal type
-name (too many people have the same idea). Still the same old lousy
-performance, alas.
-
-New in alpha3.1: Basically nothing, this release is just a bookkeeping
-convenience. Stay tuned.
-
-New in alpha3.0: Performance is no better, alas, but some fixes have been
-made and some functionality has been added. (This is basically the "get
-it out the door in time for 4.4" release.) One bug fix: regfree() didn't
-free the main internal structure (how embarrassing). It is now possible
-to put NULs in either the RE or the target string, using (resp.) a new
-REG_PEND flag and the old REG_STARTEND flag. The REG_NOSPEC flag to
-regcomp() makes all characters ordinary, so you can match a literal
-string easily (this will become more useful when performance improves!).
-There are now primitives to match beginnings and ends of words, although
-the syntax is disgusting and so is the implementation. The REG_ATOI
-debugging interface has changed a bit. And there has been considerable
-internal cleanup of various kinds.
-
-New in alpha2.3: Split change list out of README, and moved flags notes
-into Makefile. Macro-ized the name of regex(7) in regex(3), since it has
-to change for 4.4BSD. Cleanup work in engine.c, and some new regression
-tests to catch tricky cases thereof.
-
-New in alpha2.2: Out-of-date manpages updated. Regerror() acquires two
-small extensions -- REG_ITOA and REG_ATOI -- which avoid debugging kludges
-in my own test program and might be useful to others for similar purposes.
-The regression test will now compile (and run) without REDEBUG. The
-BRE \$ bug is fixed. Most uses of "uchar" are gone; it's all chars now.
-Char/uchar parameters are now written int/unsigned, to avoid possible
-portability problems with unpromoted parameters. Some unsigned casts have
-been introduced to minimize portability problems with shifting into sign
-bits.
-
-New in alpha2.1: Lots of little stuff, cleanup and fixes. The one big
-thing is that regex.h is now generated, using mkh, rather than being
-supplied in the distribution; due to circularities in dependencies,
-you have to build regex.h explicitly by "make h". The two known bugs
-have been fixed (and the regression test now checks for them), as has a
-problem with assertions not being suppressed in the absence of REDEBUG.
-No performance work yet.
-
-New in alpha2: Backslash-anything is an ordinary character, not an
-error (except, of course, for the handful of backslashed metacharacters
-in BREs), which should reduce script breakage. The regression test
-checks *where* null strings are supposed to match, and has generally
-been tightened up somewhat. Small bug fixes in parameter passing (not
-harmful, but technically errors) and some other areas. Debugging
-invoked by defining REDEBUG rather than not defining NDEBUG.
-
-New in alpha+3: full prototyping for internal routines, using a little
-helper program, mkh, which extracts prototypes given in stylized comments.
-More minor cleanup. Buglet fix: it's CHAR_BIT, not CHAR_BITS. Simple
-pre-screening of input when a literal string is known to be part of the
-RE; this does wonders for performance.
-
-New in alpha+2: minor bits of cleanup. Notably, the number "32" for the
-word width isn't hardwired into regexec.c any more, the public header
-file prototypes the functions if __STDC__ is defined, and some small typos
-in the manpages have been fixed.
-
-New in alpha+1: improvements to the manual pages, and an important
-extension, the REG_STARTEND option to regexec().
diff --git a/lib/libc/regex/cclass.h b/lib/libc/regex/cclass.h
deleted file mode 100644
index 581909c..0000000
--- a/lib/libc/regex/cclass.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)cclass.h 8.3 (Berkeley) 3/20/94
- */
-
-
-typedef enum {CALNUM, CALPHA, CBLANK, CCNTRL, CDIGIT, CGRAPH,
- CLOWER, CPRINT, CPUNCT, CSPACE, CUPPER, CXDIGIT} citype;
-
-/* character-class table */
-static struct cclass {
- char *name;
- citype fidx;
-} cclasses[] = {
- {"alnum", CALNUM},
- {"alpha", CALPHA},
- {"blank", CBLANK},
- {"cntrl", CCNTRL},
- {"digit", CDIGIT},
- {"graph", CGRAPH},
- {"lower", CLOWER},
- {"print", CPRINT},
- {"punct", CPUNCT},
- {"space", CSPACE},
- {"upper", CUPPER},
- {"xdigit", CXDIGIT},
- {NULL, }
-};
diff --git a/lib/libc/regex/cname.h b/lib/libc/regex/cname.h
deleted file mode 100644
index 72bbe5e..0000000
--- a/lib/libc/regex/cname.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)cname.h 8.3 (Berkeley) 3/20/94
- */
-
-/* character-name table */
-static struct cname {
- char *name;
- char code;
-} cnames[] = {
- {"NUL", '\0'},
- {"SOH", '\001'},
- {"STX", '\002'},
- {"ETX", '\003'},
- {"EOT", '\004'},
- {"ENQ", '\005'},
- {"ACK", '\006'},
- {"BEL", '\007'},
- {"alert", '\007'},
- {"BS", '\010'},
- {"backspace", '\b'},
- {"HT", '\011'},
- {"tab", '\t'},
- {"LF", '\012'},
- {"newline", '\n'},
- {"VT", '\013'},
- {"vertical-tab", '\v'},
- {"FF", '\014'},
- {"form-feed", '\f'},
- {"CR", '\015'},
- {"carriage-return", '\r'},
- {"SO", '\016'},
- {"SI", '\017'},
- {"DLE", '\020'},
- {"DC1", '\021'},
- {"DC2", '\022'},
- {"DC3", '\023'},
- {"DC4", '\024'},
- {"NAK", '\025'},
- {"SYN", '\026'},
- {"ETB", '\027'},
- {"CAN", '\030'},
- {"EM", '\031'},
- {"SUB", '\032'},
- {"ESC", '\033'},
- {"IS4", '\034'},
- {"FS", '\034'},
- {"IS3", '\035'},
- {"GS", '\035'},
- {"IS2", '\036'},
- {"RS", '\036'},
- {"IS1", '\037'},
- {"US", '\037'},
- {"space", ' '},
- {"exclamation-mark", '!'},
- {"quotation-mark", '"'},
- {"number-sign", '#'},
- {"dollar-sign", '$'},
- {"percent-sign", '%'},
- {"ampersand", '&'},
- {"apostrophe", '\''},
- {"left-parenthesis", '('},
- {"right-parenthesis", ')'},
- {"asterisk", '*'},
- {"plus-sign", '+'},
- {"comma", ','},
- {"hyphen", '-'},
- {"hyphen-minus", '-'},
- {"period", '.'},
- {"full-stop", '.'},
- {"slash", '/'},
- {"solidus", '/'},
- {"zero", '0'},
- {"one", '1'},
- {"two", '2'},
- {"three", '3'},
- {"four", '4'},
- {"five", '5'},
- {"six", '6'},
- {"seven", '7'},
- {"eight", '8'},
- {"nine", '9'},
- {"colon", ':'},
- {"semicolon", ';'},
- {"less-than-sign", '<'},
- {"equals-sign", '='},
- {"greater-than-sign", '>'},
- {"question-mark", '?'},
- {"commercial-at", '@'},
- {"left-square-bracket", '['},
- {"backslash", '\\'},
- {"reverse-solidus", '\\'},
- {"right-square-bracket",']'},
- {"circumflex", '^'},
- {"circumflex-accent", '^'},
- {"underscore", '_'},
- {"low-line", '_'},
- {"grave-accent", '`'},
- {"left-brace", '{'},
- {"left-curly-bracket", '{'},
- {"vertical-line", '|'},
- {"right-brace", '}'},
- {"right-curly-bracket", '}'},
- {"tilde", '~'},
- {"DEL", '\177'},
- {NULL, 0}
-};
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c
deleted file mode 100644
index be569b1..0000000
--- a/lib/libc/regex/engine.c
+++ /dev/null
@@ -1,1092 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)engine.c 8.5 (Berkeley) 3/20/94
- */
-
-/*
- * The matching engine and friends. This file is #included by regexec.c
- * after suitable #defines of a variety of macros used herein, so that
- * different state representations can be used without duplicating masses
- * of code.
- */
-
-#ifdef SNAMES
-#define matcher smatcher
-#define fast sfast
-#define slow sslow
-#define dissect sdissect
-#define backref sbackref
-#define step sstep
-#define print sprint
-#define at sat
-#define match smat
-#endif
-#ifdef LNAMES
-#define matcher lmatcher
-#define fast lfast
-#define slow lslow
-#define dissect ldissect
-#define backref lbackref
-#define step lstep
-#define print lprint
-#define at lat
-#define match lmat
-#endif
-
-/* another structure passed up and down to avoid zillions of parameters */
-struct match {
- struct re_guts *g;
- int eflags;
- regmatch_t *pmatch; /* [nsub+1] (0 element unused) */
- char *offp; /* offsets work from here */
- char *beginp; /* start of string -- virtual NUL precedes */
- char *endp; /* end of string -- virtual NUL here */
- char *coldp; /* can be no match starting before here */
- char **lastpos; /* [nplus+1] */
- STATEVARS;
- states st; /* current states */
- states fresh; /* states for a fresh start */
- states tmp; /* temporary */
- states empty; /* empty set of states */
-};
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === engine.c === */
-static int matcher __P((struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags));
-static char *dissect __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
-static char *backref __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev));
-static char *fast __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
-static char *slow __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
-static states step __P((struct re_guts *g, sopno start, sopno stop, states bef, int ch, states aft));
-#define BOL (OUT+1)
-#define EOL (BOL+1)
-#define BOLEOL (BOL+2)
-#define NOTHING (BOL+3)
-#define BOW (BOL+4)
-#define EOW (BOL+5)
-#define CODEMAX (BOL+5) /* highest code used */
-#define NONCHAR(c) ((c) > CHAR_MAX)
-#define NNONCHAR (CODEMAX-CHAR_MAX)
-#ifdef REDEBUG
-static void print __P((struct match *m, char *caption, states st, int ch, FILE *d));
-#endif
-#ifdef REDEBUG
-static void at __P((struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst));
-#endif
-#ifdef REDEBUG
-static char *pchar __P((int ch));
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-
-#ifdef REDEBUG
-#define SP(t, s, c) print(m, t, s, c, stdout)
-#define AT(t, p1, p2, s1, s2) at(m, t, p1, p2, s1, s2)
-#define NOTE(str) { if (m->eflags&REG_TRACE) printf("=%s\n", (str)); }
-#else
-#define SP(t, s, c) /* nothing */
-#define AT(t, p1, p2, s1, s2) /* nothing */
-#define NOTE(s) /* nothing */
-#endif
-
-/*
- - matcher - the actual matching engine
- == static int matcher(register struct re_guts *g, char *string, \
- == size_t nmatch, regmatch_t pmatch[], int eflags);
- */
-static int /* 0 success, REG_NOMATCH failure */
-matcher(g, string, nmatch, pmatch, eflags)
-register struct re_guts *g;
-char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
- register char *endp;
- register int i;
- struct match mv;
- register struct match *m = &mv;
- register char *dp;
- register const sopno gf = g->firststate+1; /* +1 for OEND */
- register const sopno gl = g->laststate;
- char *start;
- char *stop;
-
- /* simplify the situation where possible */
- if (g->cflags&REG_NOSUB)
- nmatch = 0;
- if (eflags&REG_STARTEND) {
- start = string + pmatch[0].rm_so;
- stop = string + pmatch[0].rm_eo;
- } else {
- start = string;
- stop = start + strlen(start);
- }
- if (stop < start)
- return(REG_INVARG);
-
- /* prescreening; this does wonders for this rather slow code */
- if (g->must != NULL) {
- for (dp = start; dp < stop; dp++)
- if (*dp == g->must[0] && stop - dp >= g->mlen &&
- memcmp(dp, g->must, (size_t)g->mlen) == 0)
- break;
- if (dp == stop) /* we didn't find g->must */
- return(REG_NOMATCH);
- }
-
- /* match struct setup */
- m->g = g;
- m->eflags = eflags;
- m->pmatch = NULL;
- m->lastpos = NULL;
- m->offp = string;
- m->beginp = start;
- m->endp = stop;
- STATESETUP(m, 4);
- SETUP(m->st);
- SETUP(m->fresh);
- SETUP(m->tmp);
- SETUP(m->empty);
- CLEAR(m->empty);
-
- /* this loop does only one repetition except for backrefs */
- for (;;) {
- endp = fast(m, start, stop, gf, gl);
- if (endp == NULL) { /* a miss */
- STATETEARDOWN(m);
- return(REG_NOMATCH);
- }
- if (nmatch == 0 && !g->backrefs)
- break; /* no further info needed */
-
- /* where? */
- assert(m->coldp != NULL);
- for (;;) {
- NOTE("finding start");
- endp = slow(m, m->coldp, stop, gf, gl);
- if (endp != NULL)
- break;
- assert(m->coldp < m->endp);
- m->coldp++;
- }
- if (nmatch == 1 && !g->backrefs)
- break; /* no further info needed */
-
- /* oh my, he wants the subexpressions... */
- if (m->pmatch == NULL)
- m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) *
- sizeof(regmatch_t));
- if (m->pmatch == NULL) {
- STATETEARDOWN(m);
- return(REG_ESPACE);
- }
- for (i = 1; i <= m->g->nsub; i++)
- m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
- if (!g->backrefs && !(m->eflags&REG_BACKR)) {
- NOTE("dissecting");
- dp = dissect(m, m->coldp, endp, gf, gl);
- } else {
- if (g->nplus > 0 && m->lastpos == NULL)
- m->lastpos = (char **)malloc((g->nplus+1) *
- sizeof(char *));
- if (g->nplus > 0 && m->lastpos == NULL) {
- free(m->pmatch);
- STATETEARDOWN(m);
- return(REG_ESPACE);
- }
- NOTE("backref dissect");
- dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
- }
- if (dp != NULL)
- break;
-
- /* uh-oh... we couldn't find a subexpression-level match */
- assert(g->backrefs); /* must be back references doing it */
- assert(g->nplus == 0 || m->lastpos != NULL);
- for (;;) {
- if (dp != NULL || endp <= m->coldp)
- break; /* defeat */
- NOTE("backoff");
- endp = slow(m, m->coldp, endp-1, gf, gl);
- if (endp == NULL)
- break; /* defeat */
- /* try it on a shorter possibility */
-#ifndef NDEBUG
- for (i = 1; i <= m->g->nsub; i++) {
- assert(m->pmatch[i].rm_so == -1);
- assert(m->pmatch[i].rm_eo == -1);
- }
-#endif
- NOTE("backoff dissect");
- dp = backref(m, m->coldp, endp, gf, gl, (sopno)0);
- }
- assert(dp == NULL || dp == endp);
- if (dp != NULL) /* found a shorter one */
- break;
-
- /* despite initial appearances, there is no match here */
- NOTE("false alarm");
- start = m->coldp + 1; /* recycle starting later */
- assert(start <= stop);
- }
-
- /* fill in the details if requested */
- if (nmatch > 0) {
- pmatch[0].rm_so = m->coldp - m->offp;
- pmatch[0].rm_eo = endp - m->offp;
- }
- if (nmatch > 1) {
- assert(m->pmatch != NULL);
- for (i = 1; i < nmatch; i++)
- if (i <= m->g->nsub)
- pmatch[i] = m->pmatch[i];
- else {
- pmatch[i].rm_so = -1;
- pmatch[i].rm_eo = -1;
- }
- }
-
- if (m->pmatch != NULL)
- free((char *)m->pmatch);
- if (m->lastpos != NULL)
- free((char *)m->lastpos);
- STATETEARDOWN(m);
- return(0);
-}
-
-/*
- - dissect - figure out what matched what, no back references
- == static char *dissect(register struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* == stop (success) always */
-dissect(m, start, stop, startst, stopst)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- register int i;
- register sopno ss; /* start sop of current subRE */
- register sopno es; /* end sop of current subRE */
- register char *sp; /* start of string matched by it */
- register char *stp; /* string matched by it cannot pass here */
- register char *rest; /* start of rest of string */
- register char *tail; /* string unmatched by rest of RE */
- register sopno ssub; /* start sop of subsubRE */
- register sopno esub; /* end sop of subsubRE */
- register char *ssp; /* start of string matched by subsubRE */
- register char *sep; /* end of string matched by subsubRE */
- register char *oldssp; /* previous ssp */
- register char *dp;
-
- AT("diss", start, stop, startst, stopst);
- sp = start;
- for (ss = startst; ss < stopst; ss = es) {
- /* identify end of subRE */
- es = ss;
- switch (OP(m->g->strip[es])) {
- case OPLUS_:
- case OQUEST_:
- es += OPND(m->g->strip[es]);
- break;
- case OCH_:
- while (OP(m->g->strip[es]) != O_CH)
- es += OPND(m->g->strip[es]);
- break;
- }
- es++;
-
- /* figure out what it matched */
- switch (OP(m->g->strip[ss])) {
- case OEND:
- assert(nope);
- break;
- case OCHAR:
- sp++;
- break;
- case OBOL:
- case OEOL:
- case OBOW:
- case OEOW:
- break;
- case OANY:
- case OANYOF:
- sp++;
- break;
- case OBACK_:
- case O_BACK:
- assert(nope);
- break;
- /* cases where length of match is hard to find */
- case OQUEST_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = es - 1;
- /* did innards match? */
- if (slow(m, sp, rest, ssub, esub) != NULL) {
- dp = dissect(m, sp, rest, ssub, esub);
- assert(dp == rest);
- } else /* no */
- assert(sp == rest);
- sp = rest;
- break;
- case OPLUS_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = es - 1;
- ssp = sp;
- oldssp = ssp;
- for (;;) { /* find last match of innards */
- sep = slow(m, ssp, rest, ssub, esub);
- if (sep == NULL || sep == ssp)
- break; /* failed or matched null */
- oldssp = ssp; /* on to next try */
- ssp = sep;
- }
- if (sep == NULL) {
- /* last successful match */
- sep = ssp;
- ssp = oldssp;
- }
- assert(sep == rest); /* must exhaust substring */
- assert(slow(m, ssp, sep, ssub, esub) == rest);
- dp = dissect(m, ssp, sep, ssub, esub);
- assert(dp == sep);
- sp = rest;
- break;
- case OCH_:
- stp = stop;
- for (;;) {
- /* how long could this one be? */
- rest = slow(m, sp, stp, ss, es);
- assert(rest != NULL); /* it did match */
- /* could the rest match the rest? */
- tail = slow(m, rest, stop, es, stopst);
- if (tail == stop)
- break; /* yes! */
- /* no -- try a shorter match for this one */
- stp = rest - 1;
- assert(stp >= sp); /* it did work */
- }
- ssub = ss + 1;
- esub = ss + OPND(m->g->strip[ss]) - 1;
- assert(OP(m->g->strip[esub]) == OOR1);
- for (;;) { /* find first matching branch */
- if (slow(m, sp, rest, ssub, esub) == rest)
- break; /* it matched all of it */
- /* that one missed, try next one */
- assert(OP(m->g->strip[esub]) == OOR1);
- esub++;
- assert(OP(m->g->strip[esub]) == OOR2);
- ssub = esub + 1;
- esub += OPND(m->g->strip[esub]);
- if (OP(m->g->strip[esub]) == OOR2)
- esub--;
- else
- assert(OP(m->g->strip[esub]) == O_CH);
- }
- dp = dissect(m, sp, rest, ssub, esub);
- assert(dp == rest);
- sp = rest;
- break;
- case O_PLUS:
- case O_QUEST:
- case OOR1:
- case OOR2:
- case O_CH:
- assert(nope);
- break;
- case OLPAREN:
- i = OPND(m->g->strip[ss]);
- assert(0 < i && i <= m->g->nsub);
- m->pmatch[i].rm_so = sp - m->offp;
- break;
- case ORPAREN:
- i = OPND(m->g->strip[ss]);
- assert(0 < i && i <= m->g->nsub);
- m->pmatch[i].rm_eo = sp - m->offp;
- break;
- default: /* uh oh */
- assert(nope);
- break;
- }
- }
-
- assert(sp == stop);
- return(sp);
-}
-
-/*
- - backref - figure out what matched what, figuring in back references
- == static char *backref(register struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst, sopno lev);
- */
-static char * /* == stop (success) or NULL (failure) */
-backref(m, start, stop, startst, stopst, lev)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-sopno lev; /* PLUS nesting level */
-{
- register int i;
- register sopno ss; /* start sop of current subRE */
- register char *sp; /* start of string matched by it */
- register sopno ssub; /* start sop of subsubRE */
- register sopno esub; /* end sop of subsubRE */
- register char *ssp; /* start of string matched by subsubRE */
- register char *dp;
- register size_t len;
- register int hard;
- register sop s;
- register regoff_t offsave;
- register cset *cs;
-
- AT("back", start, stop, startst, stopst);
- sp = start;
-
- /* get as far as we can with easy stuff */
- hard = 0;
- for (ss = startst; !hard && ss < stopst; ss++)
- switch (OP(s = m->g->strip[ss])) {
- case OCHAR:
- if (sp == stop || *sp++ != (char)OPND(s))
- return(NULL);
- break;
- case OANY:
- if (sp == stop)
- return(NULL);
- sp++;
- break;
- case OANYOF:
- cs = &m->g->sets[OPND(s)];
- if (sp == stop || !CHIN(cs, *sp++))
- return(NULL);
- break;
- case OBOL:
- if ( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
- (sp < m->endp && *(sp-1) == '\n' &&
- (m->g->cflags&REG_NEWLINE)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OEOL:
- if ( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
- (sp < m->endp && *sp == '\n' &&
- (m->g->cflags&REG_NEWLINE)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OBOW:
- if (( (sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
- (sp < m->endp && *(sp-1) == '\n' &&
- (m->g->cflags&REG_NEWLINE)) ||
- (sp > m->beginp &&
- !ISWORD(*(sp-1))) ) &&
- (sp < m->endp && ISWORD(*sp)) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case OEOW:
- if (( (sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
- (sp < m->endp && *sp == '\n' &&
- (m->g->cflags&REG_NEWLINE)) ||
- (sp < m->endp && !ISWORD(*sp)) ) &&
- (sp > m->beginp && ISWORD(*(sp-1))) )
- { /* yes */ }
- else
- return(NULL);
- break;
- case O_QUEST:
- break;
- case OOR1: /* matches null but needs to skip */
- ss++;
- s = m->g->strip[ss];
- do {
- assert(OP(s) == OOR2);
- ss += OPND(s);
- } while (OP(s = m->g->strip[ss]) != O_CH);
- /* note that the ss++ gets us past the O_CH */
- break;
- default: /* have to make a choice */
- hard = 1;
- break;
- }
- if (!hard) { /* that was it! */
- if (sp != stop)
- return(NULL);
- return(sp);
- }
- ss--; /* adjust for the for's final increment */
-
- /* the hard stuff */
- AT("hard", sp, stop, ss, stopst);
- s = m->g->strip[ss];
- switch (OP(s)) {
- case OBACK_: /* the vilest depths */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- if (m->pmatch[i].rm_eo == -1)
- return(NULL);
- assert(m->pmatch[i].rm_so != -1);
- len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so;
- assert(stop - m->beginp >= len);
- if (sp > stop - len)
- return(NULL); /* not enough left to match */
- ssp = m->offp + m->pmatch[i].rm_so;
- if (memcmp(sp, ssp, len) != 0)
- return(NULL);
- while (m->g->strip[ss] != SOP(O_BACK, i))
- ss++;
- return(backref(m, sp+len, stop, ss+1, stopst, lev));
- break;
- case OQUEST_: /* to null or not */
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp); /* not */
- return(backref(m, sp, stop, ss+OPND(s)+1, stopst, lev));
- break;
- case OPLUS_:
- assert(m->lastpos != NULL);
- assert(lev+1 <= m->g->nplus);
- m->lastpos[lev+1] = sp;
- return(backref(m, sp, stop, ss+1, stopst, lev+1));
- break;
- case O_PLUS:
- if (sp == m->lastpos[lev]) /* last pass matched null */
- return(backref(m, sp, stop, ss+1, stopst, lev-1));
- /* try another pass */
- m->lastpos[lev] = sp;
- dp = backref(m, sp, stop, ss-OPND(s)+1, stopst, lev);
- if (dp == NULL)
- return(backref(m, sp, stop, ss+1, stopst, lev-1));
- else
- return(dp);
- break;
- case OCH_: /* find the right one, if any */
- ssub = ss + 1;
- esub = ss + OPND(s) - 1;
- assert(OP(m->g->strip[esub]) == OOR1);
- for (;;) { /* find first matching branch */
- dp = backref(m, sp, stop, ssub, esub, lev);
- if (dp != NULL)
- return(dp);
- /* that one missed, try next one */
- if (OP(m->g->strip[esub]) == O_CH)
- return(NULL); /* there is none */
- esub++;
- assert(OP(m->g->strip[esub]) == OOR2);
- ssub = esub + 1;
- esub += OPND(m->g->strip[esub]);
- if (OP(m->g->strip[esub]) == OOR2)
- esub--;
- else
- assert(OP(m->g->strip[esub]) == O_CH);
- }
- break;
- case OLPAREN: /* must undo assignment if rest fails */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- offsave = m->pmatch[i].rm_so;
- m->pmatch[i].rm_so = sp - m->offp;
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp);
- m->pmatch[i].rm_so = offsave;
- return(NULL);
- break;
- case ORPAREN: /* must undo assignment if rest fails */
- i = OPND(s);
- assert(0 < i && i <= m->g->nsub);
- offsave = m->pmatch[i].rm_eo;
- m->pmatch[i].rm_eo = sp - m->offp;
- dp = backref(m, sp, stop, ss+1, stopst, lev);
- if (dp != NULL)
- return(dp);
- m->pmatch[i].rm_eo = offsave;
- return(NULL);
- break;
- default: /* uh oh */
- assert(nope);
- break;
- }
-
- /* "can't happen" */
- assert(nope);
- /* NOTREACHED */
- return "shut up gcc";
-}
-
-/*
- - fast - step through the string at top speed
- == static char *fast(register struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* where tentative match ended, or NULL */
-fast(m, start, stop, startst, stopst)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- register states st = m->st;
- register states fresh = m->fresh;
- register states tmp = m->tmp;
- register char *p = start;
- register int c = (start == m->beginp) ? OUT : *(start-1);
- register int lastc; /* previous c */
- register int flagch;
- register int i;
- register char *coldp; /* last p after which no match was underway */
-
- CLEAR(st);
- SET1(st, startst);
- st = step(m->g, startst, stopst, st, NOTHING, st);
- ASSIGN(fresh, st);
- SP("start", st, *p);
- coldp = NULL;
- for (;;) {
- /* next character */
- lastc = c;
- c = (p == m->endp) ? OUT : *p;
- if (EQ(st, fresh))
- coldp = p;
-
- /* is there an EOL and/or BOL between lastc and c? */
- flagch = '\0';
- i = 0;
- if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
- (lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
- flagch = BOL;
- i = m->g->nbol;
- }
- if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
- (c == OUT && !(m->eflags&REG_NOTEOL)) ) {
- flagch = (flagch == BOL) ? BOLEOL : EOL;
- i += m->g->neol;
- }
- if (i != 0) {
- for (; i > 0; i--)
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("boleol", st, c);
- }
-
- /* how about a word boundary? */
- if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
- (c != OUT && ISWORD(c)) ) {
- flagch = BOW;
- }
- if ( (lastc != OUT && ISWORD(lastc)) &&
- (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
- flagch = EOW;
- }
- if (flagch == BOW || flagch == EOW) {
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("boweow", st, c);
- }
-
- /* are we done? */
- if (ISSET(st, stopst) || p == stop)
- break; /* NOTE BREAK OUT */
-
- /* no, we must deal with this character */
- ASSIGN(tmp, st);
- ASSIGN(st, fresh);
- assert(c != OUT);
- st = step(m->g, startst, stopst, tmp, c, st);
- SP("aft", st, c);
- assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
- p++;
- }
-
- assert(coldp != NULL);
- m->coldp = coldp;
- if (ISSET(st, stopst))
- return(p+1);
- else
- return(NULL);
-}
-
-/*
- - slow - step through the string more deliberately
- == static char *slow(register struct match *m, char *start, \
- == char *stop, sopno startst, sopno stopst);
- */
-static char * /* where it ended */
-slow(m, start, stop, startst, stopst)
-register struct match *m;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- register states st = m->st;
- register states empty = m->empty;
- register states tmp = m->tmp;
- register char *p = start;
- register int c = (start == m->beginp) ? OUT : *(start-1);
- register int lastc; /* previous c */
- register int flagch;
- register int i;
- register char *matchp; /* last p at which a match ended */
-
- AT("slow", start, stop, startst, stopst);
- CLEAR(st);
- SET1(st, startst);
- SP("sstart", st, *p);
- st = step(m->g, startst, stopst, st, NOTHING, st);
- matchp = NULL;
- for (;;) {
- /* next character */
- lastc = c;
- c = (p == m->endp) ? OUT : *p;
-
- /* is there an EOL and/or BOL between lastc and c? */
- flagch = '\0';
- i = 0;
- if ( (lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
- (lastc == OUT && !(m->eflags&REG_NOTBOL)) ) {
- flagch = BOL;
- i = m->g->nbol;
- }
- if ( (c == '\n' && m->g->cflags&REG_NEWLINE) ||
- (c == OUT && !(m->eflags&REG_NOTEOL)) ) {
- flagch = (flagch == BOL) ? BOLEOL : EOL;
- i += m->g->neol;
- }
- if (i != 0) {
- for (; i > 0; i--)
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("sboleol", st, c);
- }
-
- /* how about a word boundary? */
- if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
- (c != OUT && ISWORD(c)) ) {
- flagch = BOW;
- }
- if ( (lastc != OUT && ISWORD(lastc)) &&
- (flagch == EOL || (c != OUT && !ISWORD(c))) ) {
- flagch = EOW;
- }
- if (flagch == BOW || flagch == EOW) {
- st = step(m->g, startst, stopst, st, flagch, st);
- SP("sboweow", st, c);
- }
-
- /* are we done? */
- if (ISSET(st, stopst))
- matchp = p;
- if (EQ(st, empty) || p == stop)
- break; /* NOTE BREAK OUT */
-
- /* no, we must deal with this character */
- ASSIGN(tmp, st);
- ASSIGN(st, empty);
- assert(c != OUT);
- st = step(m->g, startst, stopst, tmp, c, st);
- SP("saft", st, c);
- assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
- p++;
- }
-
- return(matchp);
-}
-
-
-/*
- - step - map set of states reachable before char to set reachable after
- == static states step(register struct re_guts *g, sopno start, sopno stop, \
- == register states bef, int ch, register states aft);
- == #define BOL (OUT+1)
- == #define EOL (BOL+1)
- == #define BOLEOL (BOL+2)
- == #define NOTHING (BOL+3)
- == #define BOW (BOL+4)
- == #define EOW (BOL+5)
- == #define CODEMAX (BOL+5) // highest code used
- == #define NONCHAR(c) ((c) > CHAR_MAX)
- == #define NNONCHAR (CODEMAX-CHAR_MAX)
- */
-static states
-step(g, start, stop, bef, ch, aft)
-register struct re_guts *g;
-sopno start; /* start state within strip */
-sopno stop; /* state after stop state within strip */
-register states bef; /* states reachable before */
-int ch; /* character or NONCHAR code */
-register states aft; /* states already known reachable after */
-{
- register cset *cs;
- register sop s;
- register sopno pc;
- register onestate here; /* note, macros know this name */
- register sopno look;
- register int i;
-
- for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) {
- s = g->strip[pc];
- switch (OP(s)) {
- case OEND:
- assert(pc == stop-1);
- break;
- case OCHAR:
- /* only characters can match */
- assert(!NONCHAR(ch) || ch != (char)OPND(s));
- if (ch == (char)OPND(s))
- FWD(aft, bef, 1);
- break;
- case OBOL:
- if (ch == BOL || ch == BOLEOL)
- FWD(aft, bef, 1);
- break;
- case OEOL:
- if (ch == EOL || ch == BOLEOL)
- FWD(aft, bef, 1);
- break;
- case OBOW:
- if (ch == BOW)
- FWD(aft, bef, 1);
- break;
- case OEOW:
- if (ch == EOW)
- FWD(aft, bef, 1);
- break;
- case OANY:
- if (!NONCHAR(ch))
- FWD(aft, bef, 1);
- break;
- case OANYOF:
- cs = &g->sets[OPND(s)];
- if (!NONCHAR(ch) && CHIN(cs, ch))
- FWD(aft, bef, 1);
- break;
- case OBACK_: /* ignored here */
- case O_BACK:
- FWD(aft, aft, 1);
- break;
- case OPLUS_: /* forward, this is just an empty */
- FWD(aft, aft, 1);
- break;
- case O_PLUS: /* both forward and back */
- FWD(aft, aft, 1);
- i = ISSETBACK(aft, OPND(s));
- BACK(aft, aft, OPND(s));
- if (!i && ISSETBACK(aft, OPND(s))) {
- /* oho, must reconsider loop body */
- pc -= OPND(s) + 1;
- INIT(here, pc);
- }
- break;
- case OQUEST_: /* two branches, both forward */
- FWD(aft, aft, 1);
- FWD(aft, aft, OPND(s));
- break;
- case O_QUEST: /* just an empty */
- FWD(aft, aft, 1);
- break;
- case OLPAREN: /* not significant here */
- case ORPAREN:
- FWD(aft, aft, 1);
- break;
- case OCH_: /* mark the first two branches */
- FWD(aft, aft, 1);
- assert(OP(g->strip[pc+OPND(s)]) == OOR2);
- FWD(aft, aft, OPND(s));
- break;
- case OOR1: /* done a branch, find the O_CH */
- if (ISSTATEIN(aft, here)) {
- for (look = 1;
- OP(s = g->strip[pc+look]) != O_CH;
- look += OPND(s))
- assert(OP(s) == OOR2);
- FWD(aft, aft, look);
- }
- break;
- case OOR2: /* propagate OCH_'s marking */
- FWD(aft, aft, 1);
- if (OP(g->strip[pc+OPND(s)]) != O_CH) {
- assert(OP(g->strip[pc+OPND(s)]) == OOR2);
- FWD(aft, aft, OPND(s));
- }
- break;
- case O_CH: /* just empty */
- FWD(aft, aft, 1);
- break;
- default: /* ooooops... */
- assert(nope);
- break;
- }
- }
-
- return(aft);
-}
-
-#ifdef REDEBUG
-/*
- - print - print a set of states
- == #ifdef REDEBUG
- == static void print(struct match *m, char *caption, states st, \
- == int ch, FILE *d);
- == #endif
- */
-static void
-print(m, caption, st, ch, d)
-struct match *m;
-char *caption;
-states st;
-int ch;
-FILE *d;
-{
- register struct re_guts *g = m->g;
- register int i;
- register int first = 1;
-
- if (!(m->eflags&REG_TRACE))
- return;
-
- fprintf(d, "%s", caption);
- if (ch != '\0')
- fprintf(d, " %s", pchar(ch));
- for (i = 0; i < g->nstates; i++)
- if (ISSET(st, i)) {
- fprintf(d, "%s%d", (first) ? "\t" : ", ", i);
- first = 0;
- }
- fprintf(d, "\n");
-}
-
-/*
- - at - print current situation
- == #ifdef REDEBUG
- == static void at(struct match *m, char *title, char *start, char *stop, \
- == sopno startst, sopno stopst);
- == #endif
- */
-static void
-at(m, title, start, stop, startst, stopst)
-struct match *m;
-char *title;
-char *start;
-char *stop;
-sopno startst;
-sopno stopst;
-{
- if (!(m->eflags&REG_TRACE))
- return;
-
- printf("%s %s-", title, pchar(*start));
- printf("%s ", pchar(*stop));
- printf("%ld-%ld\n", (long)startst, (long)stopst);
-}
-
-#ifndef PCHARDONE
-#define PCHARDONE /* never again */
-/*
- - pchar - make a character printable
- == #ifdef REDEBUG
- == static char *pchar(int ch);
- == #endif
- *
- * Is this identical to regchar() over in debug.c? Well, yes. But a
- * duplicate here avoids having a debugging-capable regexec.o tied to
- * a matching debug.o, and this is convenient. It all disappears in
- * the non-debug compilation anyway, so it doesn't matter much.
- */
-static char * /* -> representation */
-pchar(ch)
-int ch;
-{
- static char pbuf[10];
-
- if (isprint((uch)ch) || ch == ' ')
- sprintf(pbuf, "%c", ch);
- else
- sprintf(pbuf, "\\%o", ch);
- return(pbuf);
-}
-#endif
-#endif
-
-#undef matcher
-#undef fast
-#undef slow
-#undef dissect
-#undef backref
-#undef step
-#undef print
-#undef at
-#undef match
diff --git a/lib/libc/regex/re_format.7 b/lib/libc/regex/re_format.7
deleted file mode 100644
index db2f634..0000000
--- a/lib/libc/regex/re_format.7
+++ /dev/null
@@ -1,269 +0,0 @@
-.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
-.\" Copyright (c) 1992, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Henry Spencer.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)re_format.7 8.3 (Berkeley) 3/20/94
-.\"
-.TH RE_FORMAT 7 "March 20, 1994"
-.SH NAME
-re_format \- POSIX 1003.2 regular expressions
-.SH DESCRIPTION
-Regular expressions (``RE''s),
-as defined in POSIX 1003.2, come in two forms:
-modern REs (roughly those of
-.IR egrep ;
-1003.2 calls these ``extended'' REs)
-and obsolete REs (roughly those of
-.IR ed ;
-1003.2 ``basic'' REs).
-Obsolete REs mostly exist for backward compatibility in some old programs;
-they will be discussed at the end.
-1003.2 leaves some aspects of RE syntax and semantics open;
-`\(dg' marks decisions on these aspects that
-may not be fully portable to other 1003.2 implementations.
-.PP
-A (modern) RE is one\(dg or more non-empty\(dg \fIbranches\fR,
-separated by `|'.
-It matches anything that matches one of the branches.
-.PP
-A branch is one\(dg or more \fIpieces\fR, concatenated.
-It matches a match for the first, followed by a match for the second, etc.
-.PP
-A piece is an \fIatom\fR possibly followed
-by a single\(dg `*', `+', `?', or \fIbound\fR.
-An atom followed by `*' matches a sequence of 0 or more matches of the atom.
-An atom followed by `+' matches a sequence of 1 or more matches of the atom.
-An atom followed by `?' matches a sequence of 0 or 1 matches of the atom.
-.PP
-A \fIbound\fR is `{' followed by an unsigned decimal integer,
-possibly followed by `,'
-possibly followed by another unsigned decimal integer,
-always followed by `}'.
-The integers must lie between 0 and RE_DUP_MAX (255\(dg) inclusive,
-and if there are two of them, the first may not exceed the second.
-An atom followed by a bound containing one integer \fIi\fR
-and no comma matches
-a sequence of exactly \fIi\fR matches of the atom.
-An atom followed by a bound
-containing one integer \fIi\fR and a comma matches
-a sequence of \fIi\fR or more matches of the atom.
-An atom followed by a bound
-containing two integers \fIi\fR and \fIj\fR matches
-a sequence of \fIi\fR through \fIj\fR (inclusive) matches of the atom.
-.PP
-An atom is a regular expression enclosed in `()' (matching a match for the
-regular expression),
-an empty set of `()' (matching the null string)\(dg,
-a \fIbracket expression\fR (see below), `.'
-(matching any single character), `^' (matching the null string at the
-beginning of a line), `$' (matching the null string at the
-end of a line), a `\e' followed by one of the characters
-`^.[$()|*+?{\e'
-(matching that character taken as an ordinary character),
-a `\e' followed by any other character\(dg
-(matching that character taken as an ordinary character,
-as if the `\e' had not been present\(dg),
-or a single character with no other significance (matching that character).
-A `{' followed by a character other than a digit is an ordinary
-character, not the beginning of a bound\(dg.
-It is illegal to end an RE with `\e'.
-.PP
-A \fIbracket expression\fR is a list of characters enclosed in `[]'.
-It normally matches any single character from the list (but see below).
-If the list begins with `^',
-it matches any single character
-(but see below) \fInot\fR from the rest of the list.
-If two characters in the list are separated by `\-', this is shorthand
-for the full \fIrange\fR of characters between those two (inclusive) in the
-collating sequence,
-e.g. `[0-9]' in ASCII matches any decimal digit.
-It is illegal\(dg for two ranges to share an
-endpoint, e.g. `a-c-e'.
-Ranges are very collating-sequence-dependent,
-and portable programs should avoid relying on them.
-.PP
-To include a literal `]' in the list, make it the first character
-(following a possible `^').
-To include a literal `\-', make it the first or last character,
-or the second endpoint of a range.
-To use a literal `\-' as the first endpoint of a range,
-enclose it in `[.' and `.]' to make it a collating element (see below).
-With the exception of these and some combinations using `[' (see next
-paragraphs), all other special characters, including `\e', lose their
-special significance within a bracket expression.
-.PP
-Within a bracket expression, a collating element (a character,
-a multi-character sequence that collates as if it were a single character,
-or a collating-sequence name for either)
-enclosed in `[.' and `.]' stands for the
-sequence of characters of that collating element.
-The sequence is a single element of the bracket expression's list.
-A bracket expression containing a multi-character collating element
-can thus match more than one character,
-e.g. if the collating sequence includes a `ch' collating element,
-then the RE `[[.ch.]]*c' matches the first five characters
-of `chchcc'.
-.PP
-Within a bracket expression, a collating element enclosed in `[=' and
-`=]' is an equivalence class, standing for the sequences of characters
-of all collating elements equivalent to that one, including itself.
-(If there are no other equivalent collating elements,
-the treatment is as if the enclosing delimiters were `[.' and `.]'.)
-For example, if o and \o'o^' are the members of an equivalence class,
-then `[[=o=]]', `[[=\o'o^'=]]', and `[o\o'o^']' are all synonymous.
-An equivalence class may not\(dg be an endpoint
-of a range.
-.PP
-Within a bracket expression, the name of a \fIcharacter class\fR enclosed
-in `[:' and `:]' stands for the list of all characters belonging to that
-class.
-Standard character class names are:
-.PP
-.RS
-.nf
-.ta 3c 6c 9c
-alnum digit punct
-alpha graph space
-blank lower upper
-cntrl print xdigit
-.fi
-.RE
-.PP
-These stand for the character classes defined in
-.IR ctype (3).
-A locale may provide others.
-A character class may not be used as an endpoint of a range.
-.PP
-There are two special cases\(dg of bracket expressions:
-the bracket expressions `[[:<:]]' and `[[:>:]]' match the null string at
-the beginning and end of a word respectively.
-A word is defined as a sequence of
-word characters
-which is neither preceded nor followed by
-word characters.
-A word character is an
-.I alnum
-character (as defined by
-.IR ctype (3))
-or an underscore.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-.PP
-In the event that an RE could match more than one substring of a given
-string,
-the RE matches the one starting earliest in the string.
-If the RE could match more than one substring starting at that point,
-it matches the longest.
-Subexpressions also match the longest possible substrings, subject to
-the constraint that the whole match be as long as possible,
-with subexpressions starting earlier in the RE taking priority over
-ones starting later.
-Note that higher-level subexpressions thus take priority over
-their lower-level component subexpressions.
-.PP
-Match lengths are measured in characters, not collating elements.
-A null string is considered longer than no match at all.
-For example,
-`bb*' matches the three middle characters of `abbbc',
-`(wee|week)(knights|nights)' matches all ten characters of `weeknights',
-when `(.*).*' is matched against `abc' the parenthesized subexpression
-matches all three characters, and
-when `(a*)*' is matched against `bc' both the whole RE and the parenthesized
-subexpression match the null string.
-.PP
-If case-independent matching is specified,
-the effect is much as if all case distinctions had vanished from the
-alphabet.
-When an alphabetic that exists in multiple cases appears as an
-ordinary character outside a bracket expression, it is effectively
-transformed into a bracket expression containing both cases,
-e.g. `x' becomes `[xX]'.
-When it appears inside a bracket expression, all case counterparts
-of it are added to the bracket expression, so that (e.g.) `[x]'
-becomes `[xX]' and `[^x]' becomes `[^xX]'.
-.PP
-No particular limit is imposed on the length of REs\(dg.
-Programs intended to be portable should not employ REs longer
-than 256 bytes,
-as an implementation can refuse to accept such REs and remain
-POSIX-compliant.
-.PP
-Obsolete (``basic'') regular expressions differ in several respects.
-`|', `+', and `?' are ordinary characters and there is no equivalent
-for their functionality.
-The delimiters for bounds are `\e{' and `\e}',
-with `{' and `}' by themselves ordinary characters.
-The parentheses for nested subexpressions are `\e(' and `\e)',
-with `(' and `)' by themselves ordinary characters.
-`^' is an ordinary character except at the beginning of the
-RE or\(dg the beginning of a parenthesized subexpression,
-`$' is an ordinary character except at the end of the
-RE or\(dg the end of a parenthesized subexpression,
-and `*' is an ordinary character if it appears at the beginning of the
-RE or the beginning of a parenthesized subexpression
-(after a possible leading `^').
-Finally, there is one new type of atom, a \fIback reference\fR:
-`\e' followed by a non-zero decimal digit \fId\fR
-matches the same sequence of characters
-matched by the \fId\fRth parenthesized subexpression
-(numbering subexpressions by the positions of their opening parentheses,
-left to right),
-so that (e.g.) `\e([bc]\e)\e1' matches `bb' or `cc' but not `bc'.
-.SH SEE ALSO
-regex(3)
-.PP
-POSIX 1003.2, section 2.8 (Regular Expression Notation).
-.SH BUGS
-Having two kinds of REs is a botch.
-.PP
-The current 1003.2 spec says that `)' is an ordinary character in
-the absence of an unmatched `(';
-this was an unintentional result of a wording error,
-and change is likely.
-Avoid relying on it.
-.PP
-Back references are a dreadful botch,
-posing major problems for efficient implementations.
-They are also somewhat vaguely defined
-(does
-`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?).
-Avoid using them.
-.PP
-1003.2's specification of case-independent matching is vague.
-The ``one case implies all cases'' definition given above
-is current consensus among implementors as to the right interpretation.
-.PP
-The syntax for word boundaries is incredibly ugly.
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
deleted file mode 100644
index 8bb1355..0000000
--- a/lib/libc/regex/regcomp.c
+++ /dev/null
@@ -1,1777 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regcomp.c 8.5 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <regex.h>
-
-#include "collate.h"
-
-#include "utils.h"
-#include "regex2.h"
-
-#include "cclass.h"
-#include "cname.h"
-
-/*
- * parse structure, passed up and down to avoid global variables and
- * other clumsinesses
- */
-struct parse {
- char *next; /* next character in RE */
- char *end; /* end of string (-> NUL normally) */
- int error; /* has an error been seen? */
- sop *strip; /* malloced strip */
- sopno ssize; /* malloced strip size (allocated) */
- sopno slen; /* malloced strip length (used) */
- int ncsalloc; /* number of csets allocated */
- struct re_guts *g;
-# define NPAREN 10 /* we need to remember () 1-9 for back refs */
- sopno pbegin[NPAREN]; /* -> ( ([0] unused) */
- sopno pend[NPAREN]; /* -> ) ([0] unused) */
-};
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regcomp.c === */
-static void p_ere __P((struct parse *p, int stop));
-static void p_ere_exp __P((struct parse *p));
-static void p_str __P((struct parse *p));
-static void p_bre __P((struct parse *p, int end1, int end2));
-static int p_simp_re __P((struct parse *p, int starordinary));
-static int p_count __P((struct parse *p));
-static void p_bracket __P((struct parse *p));
-static void p_b_term __P((struct parse *p, cset *cs));
-static void p_b_cclass __P((struct parse *p, cset *cs));
-static void p_b_eclass __P((struct parse *p, cset *cs));
-static char p_b_symbol __P((struct parse *p));
-static char p_b_coll_elem __P((struct parse *p, int endc));
-static char othercase __P((int ch));
-static void bothcases __P((struct parse *p, int ch));
-static void ordinary __P((struct parse *p, int ch));
-static void nonnewline __P((struct parse *p));
-static void repeat __P((struct parse *p, sopno start, int from, int to));
-static int seterr __P((struct parse *p, int e));
-static cset *allocset __P((struct parse *p));
-static void freeset __P((struct parse *p, cset *cs));
-static int freezeset __P((struct parse *p, cset *cs));
-static int firstch __P((struct parse *p, cset *cs));
-static int nch __P((struct parse *p, cset *cs));
-static void mcadd __P((struct parse *p, cset *cs, char *cp));
-#if used
-static void mcsub __P((cset *cs, char *cp));
-static int mcin __P((cset *cs, char *cp));
-static char *mcfind __P((cset *cs, char *cp));
-#endif
-static void mcinvert __P((struct parse *p, cset *cs));
-static void mccase __P((struct parse *p, cset *cs));
-static int isinsets __P((struct re_guts *g, int c));
-static int samesets __P((struct re_guts *g, int c1, int c2));
-static void categorize __P((struct parse *p, struct re_guts *g));
-static sopno dupl __P((struct parse *p, sopno start, sopno finish));
-static void doemit __P((struct parse *p, sop op, size_t opnd));
-static void doinsert __P((struct parse *p, sop op, size_t opnd, sopno pos));
-static void dofwd __P((struct parse *p, sopno pos, sop value));
-static void enlarge __P((struct parse *p, sopno size));
-static void stripsnug __P((struct parse *p, struct re_guts *g));
-static void findmust __P((struct parse *p, struct re_guts *g));
-static sopno pluscount __P((struct parse *p, struct re_guts *g));
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-
-static char nuls[10]; /* place to point scanner in event of error */
-
-/*
- * macros for use with parse structure
- * BEWARE: these know that the parse structure is named `p' !!!
- */
-#define PEEK() (*p->next)
-#define PEEK2() (*(p->next+1))
-#define MORE() (p->next < p->end)
-#define MORE2() (p->next+1 < p->end)
-#define SEE(c) (MORE() && PEEK() == (c))
-#define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
-#define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0)
-#define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
-#define NEXT() (p->next++)
-#define NEXT2() (p->next += 2)
-#define NEXTn(n) (p->next += (n))
-#define GETNEXT() (*p->next++)
-#define SETERROR(e) seterr(p, (e))
-#define REQUIRE(co, e) ((co) || SETERROR(e))
-#define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e))
-#define MUSTEAT(c, e) (REQUIRE(MORE() && GETNEXT() == (c), e))
-#define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e))
-#define EMIT(op, sopnd) doemit(p, (sop)(op), (size_t)(sopnd))
-#define INSERT(op, pos) doinsert(p, (sop)(op), HERE()-(pos)+1, pos)
-#define AHEAD(pos) dofwd(p, pos, HERE()-(pos))
-#define ASTERN(sop, pos) EMIT(sop, HERE()-pos)
-#define HERE() (p->slen)
-#define THERE() (p->slen - 1)
-#define THERETHERE() (p->slen - 2)
-#define DROP(n) (p->slen -= (n))
-
-#ifndef NDEBUG
-static int never = 0; /* for use in asserts; shuts lint up */
-#else
-#define never 0 /* some <assert.h>s have bugs too */
-#endif
-
-/*
- - regcomp - interface for parser and compilation
- = extern int regcomp(regex_t *, const char *, int);
- = #define REG_BASIC 0000
- = #define REG_EXTENDED 0001
- = #define REG_ICASE 0002
- = #define REG_NOSUB 0004
- = #define REG_NEWLINE 0010
- = #define REG_NOSPEC 0020
- = #define REG_PEND 0040
- = #define REG_DUMP 0200
- */
-int /* 0 success, otherwise REG_something */
-regcomp(preg, pattern, cflags)
-regex_t *preg;
-const char *pattern;
-int cflags;
-{
- struct parse pa;
- register struct re_guts *g;
- register struct parse *p = &pa;
- register int i;
- register size_t len;
-#ifdef REDEBUG
-# define GOODFLAGS(f) (f)
-#else
-# define GOODFLAGS(f) ((f)&~REG_DUMP)
-#endif
-
- cflags = GOODFLAGS(cflags);
- if ((cflags&REG_EXTENDED) && (cflags&REG_NOSPEC))
- return(REG_INVARG);
-
- if (cflags&REG_PEND) {
- if (preg->re_endp < pattern)
- return(REG_INVARG);
- len = preg->re_endp - pattern;
- } else
- len = strlen((char *)pattern);
-
- /* do the mallocs early so failure handling is easy */
- g = (struct re_guts *)malloc(sizeof(struct re_guts) +
- (NC-1)*sizeof(cat_t));
- if (g == NULL)
- return(REG_ESPACE);
- p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */
- p->strip = (sop *)malloc(p->ssize * sizeof(sop));
- p->slen = 0;
- if (p->strip == NULL) {
- free((char *)g);
- return(REG_ESPACE);
- }
-
- /* set things up */
- p->g = g;
- p->next = (char *)pattern; /* convenience; we do not modify it */
- p->end = p->next + len;
- p->error = 0;
- p->ncsalloc = 0;
- for (i = 0; i < NPAREN; i++) {
- p->pbegin[i] = 0;
- p->pend[i] = 0;
- }
- g->csetsize = NC;
- g->sets = NULL;
- g->setbits = NULL;
- g->ncsets = 0;
- g->cflags = cflags;
- g->iflags = 0;
- g->nbol = 0;
- g->neol = 0;
- g->must = NULL;
- g->mlen = 0;
- g->nsub = 0;
- g->ncategories = 1; /* category 0 is "everything else" */
- g->categories = &g->catspace[-(CHAR_MIN)];
- (void) memset((char *)g->catspace, 0, NC*sizeof(cat_t));
- g->backrefs = 0;
-
- /* do it */
- EMIT(OEND, 0);
- g->firststate = THERE();
- if (cflags&REG_EXTENDED)
- p_ere(p, OUT);
- else if (cflags&REG_NOSPEC)
- p_str(p);
- else
- p_bre(p, OUT, OUT);
- EMIT(OEND, 0);
- g->laststate = THERE();
-
- /* tidy up loose ends and fill things in */
- categorize(p, g);
- stripsnug(p, g);
- findmust(p, g);
- g->nplus = pluscount(p, g);
- g->magic = MAGIC2;
- preg->re_nsub = g->nsub;
- preg->re_g = g;
- preg->re_magic = MAGIC1;
-#ifndef REDEBUG
- /* not debugging, so can't rely on the assert() in regexec() */
- if (g->iflags&BAD)
- SETERROR(REG_ASSERT);
-#endif
-
- /* win or lose, we're done */
- if (p->error != 0) /* lose */
- regfree(preg);
- return(p->error);
-}
-
-/*
- - p_ere - ERE parser top level, concatenation and alternation
- == static void p_ere(register struct parse *p, int stop);
- */
-static void
-p_ere(p, stop)
-register struct parse *p;
-int stop; /* character this ERE should end at */
-{
- register char c;
- register sopno prevback;
- register sopno prevfwd;
- register sopno conc;
- register int first = 1; /* is this the first alternative? */
-
- for (;;) {
- /* do a bunch of concatenated expressions */
- conc = HERE();
- while (MORE() && (c = PEEK()) != '|' && c != stop)
- p_ere_exp(p);
- (void)REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */
-
- if (!EAT('|'))
- break; /* NOTE BREAK OUT */
-
- if (first) {
- INSERT(OCH_, conc); /* offset is wrong */
- prevfwd = conc;
- prevback = conc;
- first = 0;
- }
- ASTERN(OOR1, prevback);
- prevback = THERE();
- AHEAD(prevfwd); /* fix previous offset */
- prevfwd = HERE();
- EMIT(OOR2, 0); /* offset is very wrong */
- }
-
- if (!first) { /* tail-end fixups */
- AHEAD(prevfwd);
- ASTERN(O_CH, prevback);
- }
-
- assert(!MORE() || SEE(stop));
-}
-
-/*
- - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op
- == static void p_ere_exp(register struct parse *p);
- */
-static void
-p_ere_exp(p)
-register struct parse *p;
-{
- register char c;
- register sopno pos;
- register int count;
- register int count2;
- register sopno subno;
- int wascaret = 0;
-
- assert(MORE()); /* caller should have ensured this */
- c = GETNEXT();
-
- pos = HERE();
- switch (c) {
- case '(':
- (void)REQUIRE(MORE(), REG_EPAREN);
- p->g->nsub++;
- subno = p->g->nsub;
- if (subno < NPAREN)
- p->pbegin[subno] = HERE();
- EMIT(OLPAREN, subno);
- if (!SEE(')'))
- p_ere(p, ')');
- if (subno < NPAREN) {
- p->pend[subno] = HERE();
- assert(p->pend[subno] != 0);
- }
- EMIT(ORPAREN, subno);
- (void)MUSTEAT(')', REG_EPAREN);
- break;
-#ifndef POSIX_MISTAKE
- case ')': /* happens only if no current unmatched ( */
- /*
- * You may ask, why the ifndef? Because I didn't notice
- * this until slightly too late for 1003.2, and none of the
- * other 1003.2 regular-expression reviewers noticed it at
- * all. So an unmatched ) is legal POSIX, at least until
- * we can get it fixed.
- */
- SETERROR(REG_EPAREN);
- break;
-#endif
- case '^':
- EMIT(OBOL, 0);
- p->g->iflags |= USEBOL;
- p->g->nbol++;
- wascaret = 1;
- break;
- case '$':
- EMIT(OEOL, 0);
- p->g->iflags |= USEEOL;
- p->g->neol++;
- break;
- case '|':
- SETERROR(REG_EMPTY);
- break;
- case '*':
- case '+':
- case '?':
- SETERROR(REG_BADRPT);
- break;
- case '.':
- if (p->g->cflags&REG_NEWLINE)
- nonnewline(p);
- else
- EMIT(OANY, 0);
- break;
- case '[':
- p_bracket(p);
- break;
- case '\\':
- (void)REQUIRE(MORE(), REG_EESCAPE);
- c = GETNEXT();
- ordinary(p, c);
- break;
- case '{': /* okay as ordinary except if digit follows */
- (void)REQUIRE(!MORE() || !isdigit(PEEK()), REG_BADRPT);
- /* FALLTHROUGH */
- default:
- ordinary(p, c);
- break;
- }
-
- if (!MORE())
- return;
- c = PEEK();
- /* we call { a repetition if followed by a digit */
- if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit(PEEK2())) ))
- return; /* no repetition, we're done */
- NEXT();
-
- (void)REQUIRE(!wascaret, REG_BADRPT);
- switch (c) {
- case '*': /* implemented as +? */
- /* this case does not require the (y|) trick, noKLUDGE */
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- INSERT(OQUEST_, pos);
- ASTERN(O_QUEST, pos);
- break;
- case '+':
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- break;
- case '?':
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, pos); /* offset slightly wrong */
- ASTERN(OOR1, pos); /* this one's right */
- AHEAD(pos); /* fix the OCH_ */
- EMIT(OOR2, 0); /* offset very wrong... */
- AHEAD(THERE()); /* ...so fix it */
- ASTERN(O_CH, THERETHERE());
- break;
- case '{':
- count = p_count(p);
- if (EAT(',')) {
- if (isdigit(PEEK())) {
- count2 = p_count(p);
- (void)REQUIRE(count <= count2, REG_BADBR);
- } else /* single number with comma */
- count2 = INFINITY;
- } else /* just a single number */
- count2 = count;
- repeat(p, pos, count, count2);
- if (!EAT('}')) { /* error heuristics */
- while (MORE() && PEEK() != '}')
- NEXT();
- (void)REQUIRE(MORE(), REG_EBRACE);
- SETERROR(REG_BADBR);
- }
- break;
- }
-
- if (!MORE())
- return;
- c = PEEK();
- if (!( c == '*' || c == '+' || c == '?' ||
- (c == '{' && MORE2() && isdigit(PEEK2())) ) )
- return;
- SETERROR(REG_BADRPT);
-}
-
-/*
- - p_str - string (no metacharacters) "parser"
- == static void p_str(register struct parse *p);
- */
-static void
-p_str(p)
-register struct parse *p;
-{
- (void)REQUIRE(MORE(), REG_EMPTY);
- while (MORE())
- ordinary(p, GETNEXT());
-}
-
-/*
- - p_bre - BRE parser top level, anchoring and concatenation
- == static void p_bre(register struct parse *p, register int end1, \
- == register int end2);
- * Giving end1 as OUT essentially eliminates the end1/end2 check.
- *
- * This implementation is a bit of a kludge, in that a trailing $ is first
- * taken as an ordinary character and then revised to be an anchor. The
- * only undesirable side effect is that '$' gets included as a character
- * category in such cases. This is fairly harmless; not worth fixing.
- * The amount of lookahead needed to avoid this kludge is excessive.
- */
-static void
-p_bre(p, end1, end2)
-register struct parse *p;
-register int end1; /* first terminating character */
-register int end2; /* second terminating character */
-{
- register sopno start = HERE();
- register int first = 1; /* first subexpression? */
- register int wasdollar = 0;
-
- if (EAT('^')) {
- EMIT(OBOL, 0);
- p->g->iflags |= USEBOL;
- p->g->nbol++;
- }
- while (MORE() && !SEETWO(end1, end2)) {
- wasdollar = p_simp_re(p, first);
- first = 0;
- }
- if (wasdollar) { /* oops, that was a trailing anchor */
- DROP(1);
- EMIT(OEOL, 0);
- p->g->iflags |= USEEOL;
- p->g->neol++;
- }
-
- (void)REQUIRE(HERE() != start, REG_EMPTY); /* require nonempty */
-}
-
-/*
- - p_simp_re - parse a simple RE, an atom possibly followed by a repetition
- == static int p_simp_re(register struct parse *p, int starordinary);
- */
-static int /* was the simple RE an unbackslashed $? */
-p_simp_re(p, starordinary)
-register struct parse *p;
-int starordinary; /* is a leading * an ordinary character? */
-{
- register int c;
- register int count;
- register int count2;
- register sopno pos;
- register int i;
- register sopno subno;
-# define BACKSL (1<<CHAR_BIT)
-
- pos = HERE(); /* repetion op, if any, covers from here */
-
- assert(MORE()); /* caller should have ensured this */
- c = GETNEXT();
- if (c == '\\') {
- (void)REQUIRE(MORE(), REG_EESCAPE);
- c = BACKSL | (unsigned char)GETNEXT();
- }
- switch (c) {
- case '.':
- if (p->g->cflags&REG_NEWLINE)
- nonnewline(p);
- else
- EMIT(OANY, 0);
- break;
- case '[':
- p_bracket(p);
- break;
- case BACKSL|'{':
- SETERROR(REG_BADRPT);
- break;
- case BACKSL|'(':
- p->g->nsub++;
- subno = p->g->nsub;
- if (subno < NPAREN)
- p->pbegin[subno] = HERE();
- EMIT(OLPAREN, subno);
- /* the MORE here is an error heuristic */
- if (MORE() && !SEETWO('\\', ')'))
- p_bre(p, '\\', ')');
- if (subno < NPAREN) {
- p->pend[subno] = HERE();
- assert(p->pend[subno] != 0);
- }
- EMIT(ORPAREN, subno);
- (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN);
- break;
- case BACKSL|')': /* should not get here -- must be user */
- case BACKSL|'}':
- SETERROR(REG_EPAREN);
- break;
- case BACKSL|'1':
- case BACKSL|'2':
- case BACKSL|'3':
- case BACKSL|'4':
- case BACKSL|'5':
- case BACKSL|'6':
- case BACKSL|'7':
- case BACKSL|'8':
- case BACKSL|'9':
- i = (c&~BACKSL) - '0';
- assert(i < NPAREN);
- if (p->pend[i] != 0) {
- assert(i <= p->g->nsub);
- EMIT(OBACK_, i);
- assert(p->pbegin[i] != 0);
- assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
- assert(OP(p->strip[p->pend[i]]) == ORPAREN);
- (void) dupl(p, p->pbegin[i]+1, p->pend[i]);
- EMIT(O_BACK, i);
- } else
- SETERROR(REG_ESUBREG);
- p->g->backrefs = 1;
- break;
- case '*':
- (void)REQUIRE(starordinary, REG_BADRPT);
- /* FALLTHROUGH */
- default:
- ordinary(p, c &~ BACKSL);
- break;
- }
-
- if (EAT('*')) { /* implemented as +? */
- /* this case does not require the (y|) trick, noKLUDGE */
- INSERT(OPLUS_, pos);
- ASTERN(O_PLUS, pos);
- INSERT(OQUEST_, pos);
- ASTERN(O_QUEST, pos);
- } else if (EATTWO('\\', '{')) {
- count = p_count(p);
- if (EAT(',')) {
- if (MORE() && isdigit(PEEK())) {
- count2 = p_count(p);
- (void)REQUIRE(count <= count2, REG_BADBR);
- } else /* single number with comma */
- count2 = INFINITY;
- } else /* just a single number */
- count2 = count;
- repeat(p, pos, count, count2);
- if (!EATTWO('\\', '}')) { /* error heuristics */
- while (MORE() && !SEETWO('\\', '}'))
- NEXT();
- (void)REQUIRE(MORE(), REG_EBRACE);
- SETERROR(REG_BADBR);
- }
- } else if (c == (unsigned char)'$') /* $ (but not \$) ends it */
- return(1);
-
- return(0);
-}
-
-/*
- - p_count - parse a repetition count
- == static int p_count(register struct parse *p);
- */
-static int /* the value */
-p_count(p)
-register struct parse *p;
-{
- register int count = 0;
- register int ndigits = 0;
-
- while (MORE() && isdigit(PEEK()) && count <= DUPMAX) {
- count = count*10 + (GETNEXT() - '0');
- ndigits++;
- }
-
- (void)REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR);
- return(count);
-}
-
-/*
- - p_bracket - parse a bracketed character list
- == static void p_bracket(register struct parse *p);
- *
- * Note a significant property of this code: if the allocset() did SETERROR,
- * no set operations are done.
- */
-static void
-p_bracket(p)
-register struct parse *p;
-{
- register cset *cs = allocset(p);
- register int invert = 0;
-
- /* Dept of Truly Sickening Special-Case Kludges */
- if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]", 6) == 0) {
- EMIT(OBOW, 0);
- NEXTn(6);
- return;
- }
- if (p->next + 5 < p->end && strncmp(p->next, "[:>:]]", 6) == 0) {
- EMIT(OEOW, 0);
- NEXTn(6);
- return;
- }
-
- if (EAT('^'))
- invert++; /* make note to invert set at end */
- if (EAT(']'))
- CHadd(cs, ']');
- else if (EAT('-'))
- CHadd(cs, '-');
- while (MORE() && PEEK() != ']' && !SEETWO('-', ']'))
- p_b_term(p, cs);
- if (EAT('-'))
- CHadd(cs, '-');
- (void)MUSTEAT(']', REG_EBRACK);
-
- if (p->error != 0) /* don't mess things up further */
- return;
-
- if (p->g->cflags&REG_ICASE) {
- register int i;
- register int ci;
-
- for (i = p->g->csetsize - 1; i >= 0; i--)
- if (CHIN(cs, i) && isalpha(i)) {
- ci = othercase(i);
- if (ci != i)
- CHadd(cs, ci);
- }
- if (cs->multis != NULL)
- mccase(p, cs);
- }
- if (invert) {
- register int i;
-
- for (i = p->g->csetsize - 1; i >= 0; i--)
- if (CHIN(cs, i))
- CHsub(cs, i);
- else
- CHadd(cs, i);
- if (p->g->cflags&REG_NEWLINE)
- CHsub(cs, '\n');
- if (cs->multis != NULL)
- mcinvert(p, cs);
- }
-
- assert(cs->multis == NULL); /* xxx */
-
- if (nch(p, cs) == 1) { /* optimize singleton sets */
- ordinary(p, firstch(p, cs));
- freeset(p, cs);
- } else
- EMIT(OANYOF, freezeset(p, cs));
-}
-
-/*
- - p_b_term - parse one term of a bracketed character list
- == static void p_b_term(register struct parse *p, register cset *cs);
- */
-static void
-p_b_term(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register char c;
- register char start, finish;
- register int i;
-
- /* classify what we've got */
- switch ((MORE()) ? PEEK() : '\0') {
- case '[':
- c = (MORE2()) ? PEEK2() : '\0';
- break;
- case '-':
- SETERROR(REG_ERANGE);
- return; /* NOTE RETURN */
- break;
- default:
- c = '\0';
- break;
- }
-
- switch (c) {
- case ':': /* character class */
- NEXT2();
- (void)REQUIRE(MORE(), REG_EBRACK);
- c = PEEK();
- (void)REQUIRE(c != '-' && c != ']', REG_ECTYPE);
- p_b_cclass(p, cs);
- (void)REQUIRE(MORE(), REG_EBRACK);
- (void)REQUIRE(EATTWO(':', ']'), REG_ECTYPE);
- break;
- case '=': /* equivalence class */
- NEXT2();
- (void)REQUIRE(MORE(), REG_EBRACK);
- c = PEEK();
- (void)REQUIRE(c != '-' && c != ']', REG_ECOLLATE);
- p_b_eclass(p, cs);
- (void)REQUIRE(MORE(), REG_EBRACK);
- (void)REQUIRE(EATTWO('=', ']'), REG_ECOLLATE);
- break;
- default: /* symbol, ordinary character, or range */
-/* xxx revision needed for multichar stuff */
- start = p_b_symbol(p);
- if (SEE('-') && MORE2() && PEEK2() != ']') {
- /* range */
- NEXT();
- if (EAT('-'))
- finish = '-';
- else
- finish = p_b_symbol(p);
- } else
- finish = start;
- if (start == finish)
- CHadd(cs, start);
- else {
- if (__collate_load_error) {
- (void)REQUIRE((uch)start <= (uch)finish, REG_ERANGE);
- for (i = (uch)start; i <= (uch)finish; i++)
- CHadd(cs, i);
- } else {
- (void)REQUIRE(__collate_range_cmp(start, finish) <= 0, REG_ERANGE);
- for (i = CHAR_MIN; i <= CHAR_MAX; i++) {
- if ( __collate_range_cmp(start, i) <= 0
- && __collate_range_cmp(i, finish) <= 0
- )
- CHadd(cs, i);
- }
- }
- }
- break;
- }
-}
-
-/*
- - p_b_cclass - parse a character-class name and deal with it
- == static void p_b_cclass(register struct parse *p, register cset *cs);
- */
-static void
-p_b_cclass(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register int c;
- register char *sp = p->next;
- register struct cclass *cp;
- register size_t len;
-
- while (MORE() && isalpha((uch)PEEK()))
- NEXT();
- len = p->next - sp;
- for (cp = cclasses; cp->name != NULL; cp++)
- if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
- break;
- if (cp->name == NULL) {
- /* oops, didn't find it */
- SETERROR(REG_ECTYPE);
- return;
- }
-
- switch (cp->fidx) {
- case CALNUM:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isalnum((uch)c))
- CHadd(cs, c);
- break;
- case CALPHA:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isalpha((uch)c))
- CHadd(cs, c);
- break;
- case CBLANK:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isblank((uch)c))
- CHadd(cs, c);
- break;
- case CCNTRL:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (iscntrl((uch)c))
- CHadd(cs, c);
- break;
- case CDIGIT:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isdigit((uch)c))
- CHadd(cs, c);
- break;
- case CGRAPH:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isgraph((uch)c))
- CHadd(cs, c);
- break;
- case CLOWER:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (islower((uch)c))
- CHadd(cs, c);
- break;
- case CPRINT:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isprint((uch)c))
- CHadd(cs, c);
- break;
- case CPUNCT:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (ispunct((uch)c))
- CHadd(cs, c);
- break;
- case CSPACE:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isspace((uch)c))
- CHadd(cs, c);
- break;
- case CUPPER:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isupper((uch)c))
- CHadd(cs, c);
- break;
- case CXDIGIT:
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (isxdigit((uch)c))
- CHadd(cs, c);
- break;
- }
-#if 0
- for (u = cp->multis; *u != '\0'; u += strlen(u) + 1)
- MCadd(p, cs, u);
-#endif
-}
-
-/*
- - p_b_eclass - parse an equivalence-class name and deal with it
- == static void p_b_eclass(register struct parse *p, register cset *cs);
- *
- * This implementation is incomplete. xxx
- */
-static void
-p_b_eclass(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register char c;
-
- c = p_b_coll_elem(p, '=');
- CHadd(cs, c);
-}
-
-/*
- - p_b_symbol - parse a character or [..]ed multicharacter collating symbol
- == static char p_b_symbol(register struct parse *p);
- */
-static char /* value of symbol */
-p_b_symbol(p)
-register struct parse *p;
-{
- register char value;
-
- (void)REQUIRE(MORE(), REG_EBRACK);
- if (!EATTWO('[', '.'))
- return(GETNEXT());
-
- /* collating symbol */
- value = p_b_coll_elem(p, '.');
- (void)REQUIRE(EATTWO('.', ']'), REG_ECOLLATE);
- return(value);
-}
-
-/*
- - p_b_coll_elem - parse a collating-element name and look it up
- == static char p_b_coll_elem(register struct parse *p, int endc);
- */
-static char /* value of collating element */
-p_b_coll_elem(p, endc)
-register struct parse *p;
-int endc; /* name ended by endc,']' */
-{
- register char *sp = p->next;
- register struct cname *cp;
- register int len;
-
- while (MORE() && !SEETWO(endc, ']'))
- NEXT();
- if (!MORE()) {
- SETERROR(REG_EBRACK);
- return(0);
- }
- len = p->next - sp;
- for (cp = cnames; cp->name != NULL; cp++)
- if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
- return(cp->code); /* known name */
- if (len == 1)
- return(*sp); /* single character */
- SETERROR(REG_ECOLLATE); /* neither */
- return(0);
-}
-
-/*
- - othercase - return the case counterpart of an alphabetic
- == static char othercase(int ch);
- */
-static char /* if no counterpart, return ch */
-othercase(ch)
-int ch;
-{
- ch = (unsigned char)ch;
- assert(isalpha(ch));
- if (isupper(ch))
- return(tolower(ch));
- else if (islower(ch))
- return(toupper(ch));
- else /* peculiar, but could happen */
- return(ch);
-}
-
-/*
- - bothcases - emit a dualcase version of a two-case character
- == static void bothcases(register struct parse *p, int ch);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-bothcases(p, ch)
-register struct parse *p;
-int ch;
-{
- register char *oldnext = p->next;
- register char *oldend = p->end;
- char bracket[3];
-
- ch = (unsigned char)ch;
- assert(othercase(ch) != ch); /* p_bracket() would recurse */
- p->next = bracket;
- p->end = bracket+2;
- bracket[0] = ch;
- bracket[1] = ']';
- bracket[2] = '\0';
- p_bracket(p);
- assert(p->next == bracket+2);
- p->next = oldnext;
- p->end = oldend;
-}
-
-/*
- - ordinary - emit an ordinary character
- == static void ordinary(register struct parse *p, register int ch);
- */
-static void
-ordinary(p, ch)
-register struct parse *p;
-register int ch;
-{
- register cat_t *cap = p->g->categories;
-
- if ((p->g->cflags&REG_ICASE) && isalpha((unsigned char)ch) && othercase(ch) != ch)
- bothcases(p, ch);
- else {
- EMIT(OCHAR, (unsigned char)ch);
- if (cap[ch] == 0)
- cap[ch] = p->g->ncategories++;
- }
-}
-
-/*
- - nonnewline - emit REG_NEWLINE version of OANY
- == static void nonnewline(register struct parse *p);
- *
- * Boy, is this implementation ever a kludge...
- */
-static void
-nonnewline(p)
-register struct parse *p;
-{
- register char *oldnext = p->next;
- register char *oldend = p->end;
- char bracket[4];
-
- p->next = bracket;
- p->end = bracket+3;
- bracket[0] = '^';
- bracket[1] = '\n';
- bracket[2] = ']';
- bracket[3] = '\0';
- p_bracket(p);
- assert(p->next == bracket+3);
- p->next = oldnext;
- p->end = oldend;
-}
-
-/*
- - repeat - generate code for a bounded repetition, recursively if needed
- == static void repeat(register struct parse *p, sopno start, int from, int to);
- */
-static void
-repeat(p, start, from, to)
-register struct parse *p;
-sopno start; /* operand from here to end of strip */
-int from; /* repeated from this number */
-int to; /* to this number of times (maybe INFINITY) */
-{
- register sopno finish = HERE();
-# define N 2
-# define INF 3
-# define REP(f, t) ((f)*8 + (t))
-# define MAP(n) (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)
- register sopno copy;
-
- if (p->error != 0) /* head off possible runaway recursion */
- return;
-
- assert(from <= to);
-
- switch (REP(MAP(from), MAP(to))) {
- case REP(0, 0): /* must be user doing this */
- DROP(finish-start); /* drop the operand */
- break;
- case REP(0, 1): /* as x{1,1}? */
- case REP(0, N): /* as x{1,n}? */
- case REP(0, INF): /* as x{1,}? */
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, start); /* offset is wrong... */
- repeat(p, start+1, 1, to);
- ASTERN(OOR1, start);
- AHEAD(start); /* ... fix it */
- EMIT(OOR2, 0);
- AHEAD(THERE());
- ASTERN(O_CH, THERETHERE());
- break;
- case REP(1, 1): /* trivial case */
- /* done */
- break;
- case REP(1, N): /* as x?x{1,n-1} */
- /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
- INSERT(OCH_, start);
- ASTERN(OOR1, start);
- AHEAD(start);
- EMIT(OOR2, 0); /* offset very wrong... */
- AHEAD(THERE()); /* ...so fix it */
- ASTERN(O_CH, THERETHERE());
- copy = dupl(p, start+1, finish+1);
- assert(copy == finish+4);
- repeat(p, copy, 1, to-1);
- break;
- case REP(1, INF): /* as x+ */
- INSERT(OPLUS_, start);
- ASTERN(O_PLUS, start);
- break;
- case REP(N, N): /* as xx{m-1,n-1} */
- copy = dupl(p, start, finish);
- repeat(p, copy, from-1, to-1);
- break;
- case REP(N, INF): /* as xx{n-1,INF} */
- copy = dupl(p, start, finish);
- repeat(p, copy, from-1, to);
- break;
- default: /* "can't happen" */
- SETERROR(REG_ASSERT); /* just in case */
- break;
- }
-}
-
-/*
- - seterr - set an error condition
- == static int seterr(register struct parse *p, int e);
- */
-static int /* useless but makes type checking happy */
-seterr(p, e)
-register struct parse *p;
-int e;
-{
- if (p->error == 0) /* keep earliest error condition */
- p->error = e;
- p->next = nuls; /* try to bring things to a halt */
- p->end = nuls;
- return(0); /* make the return value well-defined */
-}
-
-/*
- - allocset - allocate a set of characters for []
- == static cset *allocset(register struct parse *p);
- */
-static cset *
-allocset(p)
-register struct parse *p;
-{
- register int no = p->g->ncsets++;
- register size_t nc;
- register size_t nbytes;
- register cset *cs;
- register size_t css = (size_t)p->g->csetsize;
- register int i;
-
- if (no >= p->ncsalloc) { /* need another column of space */
- p->ncsalloc += CHAR_BIT;
- nc = p->ncsalloc;
- assert(nc % CHAR_BIT == 0);
- nbytes = nc / CHAR_BIT * css;
- if (p->g->sets == NULL)
- p->g->sets = (cset *)malloc(nc * sizeof(cset));
- else
- p->g->sets = (cset *)realloc((char *)p->g->sets,
- nc * sizeof(cset));
- if (p->g->setbits == NULL)
- p->g->setbits = (uch *)malloc(nbytes);
- else {
- p->g->setbits = (uch *)realloc((char *)p->g->setbits,
- nbytes);
- /* xxx this isn't right if setbits is now NULL */
- for (i = 0; i < no; i++)
- p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT);
- }
- if (p->g->sets != NULL && p->g->setbits != NULL)
- (void) memset((char *)p->g->setbits + (nbytes - css),
- 0, css);
- else {
- no = 0;
- SETERROR(REG_ESPACE);
- /* caller's responsibility not to do set ops */
- }
- }
-
- assert(p->g->sets != NULL); /* xxx */
- cs = &p->g->sets[no];
- cs->ptr = p->g->setbits + css*((no)/CHAR_BIT);
- cs->mask = 1 << ((no) % CHAR_BIT);
- cs->hash = 0;
- cs->smultis = 0;
- cs->multis = NULL;
-
- return(cs);
-}
-
-/*
- - freeset - free a now-unused set
- == static void freeset(register struct parse *p, register cset *cs);
- */
-static void
-freeset(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register int i;
- register cset *top = &p->g->sets[p->g->ncsets];
- register size_t css = (size_t)p->g->csetsize;
-
- for (i = 0; i < css; i++)
- CHsub(cs, i);
- if (cs == top-1) /* recover only the easy case */
- p->g->ncsets--;
-}
-
-/*
- - freezeset - final processing on a set of characters
- == static int freezeset(register struct parse *p, register cset *cs);
- *
- * The main task here is merging identical sets. This is usually a waste
- * of time (although the hash code minimizes the overhead), but can win
- * big if REG_ICASE is being used. REG_ICASE, by the way, is why the hash
- * is done using addition rather than xor -- all ASCII [aA] sets xor to
- * the same value!
- */
-static int /* set number */
-freezeset(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register short h = cs->hash;
- register int i;
- register cset *top = &p->g->sets[p->g->ncsets];
- register cset *cs2;
- register size_t css = (size_t)p->g->csetsize;
-
- /* look for an earlier one which is the same */
- for (cs2 = &p->g->sets[0]; cs2 < top; cs2++)
- if (cs2->hash == h && cs2 != cs) {
- /* maybe */
- for (i = 0; i < css; i++)
- if (!!CHIN(cs2, i) != !!CHIN(cs, i))
- break; /* no */
- if (i == css)
- break; /* yes */
- }
-
- if (cs2 < top) { /* found one */
- freeset(p, cs);
- cs = cs2;
- }
-
- return((int)(cs - p->g->sets));
-}
-
-/*
- - firstch - return first character in a set (which must have at least one)
- == static int firstch(register struct parse *p, register cset *cs);
- */
-static int /* character; there is no "none" value */
-firstch(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register int i;
- register size_t css = (size_t)p->g->csetsize;
-
- for (i = 0; i < css; i++)
- if (CHIN(cs, i))
- return((unsigned char)i);
- assert(never);
- return(0); /* arbitrary */
-}
-
-/*
- - nch - number of characters in a set
- == static int nch(register struct parse *p, register cset *cs);
- */
-static int
-nch(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- register int i;
- register size_t css = (size_t)p->g->csetsize;
- register int n = 0;
-
- for (i = 0; i < css; i++)
- if (CHIN(cs, i))
- n++;
- return(n);
-}
-
-/*
- - mcadd - add a collating element to a cset
- == static void mcadd(register struct parse *p, register cset *cs, \
- == register char *cp);
- */
-static void
-mcadd(p, cs, cp)
-register struct parse *p;
-register cset *cs;
-register char *cp;
-{
- register size_t oldend = cs->smultis;
-
- cs->smultis += strlen(cp) + 1;
- if (cs->multis == NULL)
- cs->multis = malloc(cs->smultis);
- else
- cs->multis = realloc(cs->multis, cs->smultis);
- if (cs->multis == NULL) {
- SETERROR(REG_ESPACE);
- return;
- }
-
- (void) strcpy(cs->multis + oldend - 1, cp);
- cs->multis[cs->smultis - 1] = '\0';
-}
-
-#if used
-/*
- - mcsub - subtract a collating element from a cset
- == static void mcsub(register cset *cs, register char *cp);
- */
-static void
-mcsub(cs, cp)
-register cset *cs;
-register char *cp;
-{
- register char *fp = mcfind(cs, cp);
- register size_t len = strlen(fp);
-
- assert(fp != NULL);
- (void) memmove(fp, fp + len + 1,
- cs->smultis - (fp + len + 1 - cs->multis));
- cs->smultis -= len;
-
- if (cs->smultis == 0) {
- free(cs->multis);
- cs->multis = NULL;
- return;
- }
-
- cs->multis = realloc(cs->multis, cs->smultis);
- assert(cs->multis != NULL);
-}
-
-/*
- - mcin - is a collating element in a cset?
- == static int mcin(register cset *cs, register char *cp);
- */
-static int
-mcin(cs, cp)
-register cset *cs;
-register char *cp;
-{
- return(mcfind(cs, cp) != NULL);
-}
-
-/*
- - mcfind - find a collating element in a cset
- == static char *mcfind(register cset *cs, register char *cp);
- */
-static char *
-mcfind(cs, cp)
-register cset *cs;
-register char *cp;
-{
- register char *p;
-
- if (cs->multis == NULL)
- return(NULL);
- for (p = cs->multis; *p != '\0'; p += strlen(p) + 1)
- if (strcmp(cp, p) == 0)
- return(p);
- return(NULL);
-}
-#endif
-
-/*
- - mcinvert - invert the list of collating elements in a cset
- == static void mcinvert(register struct parse *p, register cset *cs);
- *
- * This would have to know the set of possibilities. Implementation
- * is deferred.
- */
-static void
-mcinvert(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- assert(cs->multis == NULL); /* xxx */
-}
-
-/*
- - mccase - add case counterparts of the list of collating elements in a cset
- == static void mccase(register struct parse *p, register cset *cs);
- *
- * This would have to know the set of possibilities. Implementation
- * is deferred.
- */
-static void
-mccase(p, cs)
-register struct parse *p;
-register cset *cs;
-{
- assert(cs->multis == NULL); /* xxx */
-}
-
-/*
- - isinsets - is this character in any sets?
- == static int isinsets(register struct re_guts *g, int c);
- */
-static int /* predicate */
-isinsets(g, c)
-register struct re_guts *g;
-int c;
-{
- register uch *col;
- register int i;
- register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- register unsigned uc = (unsigned char)c;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc] != 0)
- return(1);
- return(0);
-}
-
-/*
- - samesets - are these two characters in exactly the same sets?
- == static int samesets(register struct re_guts *g, int c1, int c2);
- */
-static int /* predicate */
-samesets(g, c1, c2)
-register struct re_guts *g;
-int c1;
-int c2;
-{
- register uch *col;
- register int i;
- register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT;
- register unsigned uc1 = (unsigned char)c1;
- register unsigned uc2 = (unsigned char)c2;
-
- for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize)
- if (col[uc1] != col[uc2])
- return(0);
- return(1);
-}
-
-/*
- - categorize - sort out character categories
- == static void categorize(struct parse *p, register struct re_guts *g);
- */
-static void
-categorize(p, g)
-struct parse *p;
-register struct re_guts *g;
-{
- register cat_t *cats = g->categories;
- register int c;
- register int c2;
- register cat_t cat;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- for (c = CHAR_MIN; c <= CHAR_MAX; c++)
- if (cats[c] == 0 && isinsets(g, c)) {
- cat = g->ncategories++;
- cats[c] = cat;
- for (c2 = c+1; c2 <= CHAR_MAX; c2++)
- if (cats[c2] == 0 && samesets(g, c, c2))
- cats[c2] = cat;
- }
-}
-
-/*
- - dupl - emit a duplicate of a bunch of sops
- == static sopno dupl(register struct parse *p, sopno start, sopno finish);
- */
-static sopno /* start of duplicate */
-dupl(p, start, finish)
-register struct parse *p;
-sopno start; /* from here */
-sopno finish; /* to this less one */
-{
- register sopno ret = HERE();
- register sopno len = finish - start;
-
- assert(finish >= start);
- if (len == 0)
- return(ret);
- enlarge(p, p->ssize + len); /* this many unexpected additions */
- assert(p->ssize >= p->slen + len);
- (void) memcpy((char *)(p->strip + p->slen),
- (char *)(p->strip + start), (size_t)len*sizeof(sop));
- p->slen += len;
- return(ret);
-}
-
-/*
- - doemit - emit a strip operator
- == static void doemit(register struct parse *p, sop op, size_t opnd);
- *
- * It might seem better to implement this as a macro with a function as
- * hard-case backup, but it's just too big and messy unless there are
- * some changes to the data structures. Maybe later.
- */
-static void
-doemit(p, op, opnd)
-register struct parse *p;
-sop op;
-size_t opnd;
-{
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- /* deal with oversize operands ("can't happen", more or less) */
- assert(opnd < 1<<OPSHIFT);
-
- /* deal with undersized strip */
- if (p->slen >= p->ssize)
- enlarge(p, (p->ssize+1) / 2 * 3); /* +50% */
- assert(p->slen < p->ssize);
-
- /* finally, it's all reduced to the easy case */
- p->strip[p->slen++] = SOP(op, opnd);
-}
-
-/*
- - doinsert - insert a sop into the strip
- == static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos);
- */
-static void
-doinsert(p, op, opnd, pos)
-register struct parse *p;
-sop op;
-size_t opnd;
-sopno pos;
-{
- register sopno sn;
- register sop s;
- register int i;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- sn = HERE();
- EMIT(op, opnd); /* do checks, ensure space */
- assert(HERE() == sn+1);
- s = p->strip[sn];
-
- /* adjust paren pointers */
- assert(pos > 0);
- for (i = 1; i < NPAREN; i++) {
- if (p->pbegin[i] >= pos) {
- p->pbegin[i]++;
- }
- if (p->pend[i] >= pos) {
- p->pend[i]++;
- }
- }
-
- memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos],
- (HERE()-pos-1)*sizeof(sop));
- p->strip[pos] = s;
-}
-
-/*
- - dofwd - complete a forward reference
- == static void dofwd(register struct parse *p, sopno pos, sop value);
- */
-static void
-dofwd(p, pos, value)
-register struct parse *p;
-register sopno pos;
-sop value;
-{
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- assert(value < 1<<OPSHIFT);
- p->strip[pos] = OP(p->strip[pos]) | value;
-}
-
-/*
- - enlarge - enlarge the strip
- == static void enlarge(register struct parse *p, sopno size);
- */
-static void
-enlarge(p, size)
-register struct parse *p;
-register sopno size;
-{
- register sop *sp;
-
- if (p->ssize >= size)
- return;
-
- sp = (sop *)realloc(p->strip, size*sizeof(sop));
- if (sp == NULL) {
- SETERROR(REG_ESPACE);
- return;
- }
- p->strip = sp;
- p->ssize = size;
-}
-
-/*
- - stripsnug - compact the strip
- == static void stripsnug(register struct parse *p, register struct re_guts *g);
- */
-static void
-stripsnug(p, g)
-register struct parse *p;
-register struct re_guts *g;
-{
- g->nstates = p->slen;
- g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop));
- if (g->strip == NULL) {
- SETERROR(REG_ESPACE);
- g->strip = p->strip;
- }
-}
-
-/*
- - findmust - fill in must and mlen with longest mandatory literal string
- == static void findmust(register struct parse *p, register struct re_guts *g);
- *
- * This algorithm could do fancy things like analyzing the operands of |
- * for common subsequences. Someday. This code is simple and finds most
- * of the interesting cases.
- *
- * Note that must and mlen got initialized during setup.
- */
-static void
-findmust(p, g)
-struct parse *p;
-register struct re_guts *g;
-{
- register sop *scan;
- sop *start;
- register sop *newstart;
- register sopno newlen;
- register sop s;
- register char *cp;
- register sopno i;
-
- /* avoid making error situations worse */
- if (p->error != 0)
- return;
-
- /* find the longest OCHAR sequence in strip */
- newlen = 0;
- scan = g->strip + 1;
- do {
- s = *scan++;
- switch (OP(s)) {
- case OCHAR: /* sequence member */
- if (newlen == 0) /* new sequence */
- newstart = scan - 1;
- newlen++;
- break;
- case OPLUS_: /* things that don't break one */
- case OLPAREN:
- case ORPAREN:
- break;
- case OQUEST_: /* things that must be skipped */
- case OCH_:
- scan--;
- do {
- scan += OPND(s);
- s = *scan;
- /* assert() interferes w debug printouts */
- if (OP(s) != O_QUEST && OP(s) != O_CH &&
- OP(s) != OOR2) {
- g->iflags |= BAD;
- return;
- }
- } while (OP(s) != O_QUEST && OP(s) != O_CH);
- /* fallthrough */
- default: /* things that break a sequence */
- if (newlen > g->mlen) { /* ends one */
- start = newstart;
- g->mlen = newlen;
- }
- newlen = 0;
- break;
- }
- } while (OP(s) != OEND);
-
- if (g->mlen == 0) /* there isn't one */
- return;
-
- /* turn it into a character string */
- g->must = malloc((size_t)g->mlen + 1);
- if (g->must == NULL) { /* argh; just forget it */
- g->mlen = 0;
- return;
- }
- cp = g->must;
- scan = start;
- for (i = g->mlen; i > 0; i--) {
- while (OP(s = *scan++) != OCHAR)
- continue;
- assert(cp < g->must + g->mlen);
- *cp++ = (char)OPND(s);
- }
- assert(cp == g->must + g->mlen);
- *cp++ = '\0'; /* just on general principles */
-}
-
-/*
- - pluscount - count + nesting
- == static sopno pluscount(register struct parse *p, register struct re_guts *g);
- */
-static sopno /* nesting depth */
-pluscount(p, g)
-struct parse *p;
-register struct re_guts *g;
-{
- register sop *scan;
- register sop s;
- register sopno plusnest = 0;
- register sopno maxnest = 0;
-
- if (p->error != 0)
- return(0); /* there may not be an OEND */
-
- scan = g->strip + 1;
- do {
- s = *scan++;
- switch (OP(s)) {
- case OPLUS_:
- plusnest++;
- break;
- case O_PLUS:
- if (plusnest > maxnest)
- maxnest = plusnest;
- plusnest--;
- break;
- }
- } while (OP(s) != OEND);
- if (plusnest != 0)
- g->iflags |= BAD;
- return(maxnest);
-}
diff --git a/lib/libc/regex/regerror.c b/lib/libc/regex/regerror.c
deleted file mode 100644
index 1ed6771..0000000
--- a/lib/libc/regex/regerror.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regerror.c 8.4 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <regex.h>
-
-#include "utils.h"
-
-/* ========= begin header generated by ./mkh ========= */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* === regerror.c === */
-static char *regatoi __P((const regex_t *preg, char *localbuf));
-
-#ifdef __cplusplus
-}
-#endif
-/* ========= end header generated by ./mkh ========= */
-/*
- = #define REG_NOMATCH 1
- = #define REG_BADPAT 2
- = #define REG_ECOLLATE 3
- = #define REG_ECTYPE 4
- = #define REG_EESCAPE 5
- = #define REG_ESUBREG 6
- = #define REG_EBRACK 7
- = #define REG_EPAREN 8
- = #define REG_EBRACE 9
- = #define REG_BADBR 10
- = #define REG_ERANGE 11
- = #define REG_ESPACE 12
- = #define REG_BADRPT 13
- = #define REG_EMPTY 14
- = #define REG_ASSERT 15
- = #define REG_INVARG 16
- = #define REG_ATOI 255 // convert name to number (!)
- = #define REG_ITOA 0400 // convert number to name (!)
- */
-static struct rerr {
- int code;
- char *name;
- char *explain;
-} rerrs[] = {
- {REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match"},
- {REG_BADPAT, "REG_BADPAT", "invalid regular expression"},
- {REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element"},
- {REG_ECTYPE, "REG_ECTYPE", "invalid character class"},
- {REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)"},
- {REG_ESUBREG, "REG_ESUBREG", "invalid backreference number"},
- {REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced"},
- {REG_EPAREN, "REG_EPAREN", "parentheses not balanced"},
- {REG_EBRACE, "REG_EBRACE", "braces not balanced"},
- {REG_BADBR, "REG_BADBR", "invalid repetition count(s)"},
- {REG_ERANGE, "REG_ERANGE", "invalid character range"},
- {REG_ESPACE, "REG_ESPACE", "out of memory"},
- {REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid"},
- {REG_EMPTY, "REG_EMPTY", "empty (sub)expression"},
- {REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug"},
- {REG_INVARG, "REG_INVARG", "invalid argument to regex routine"},
- {0, "", "*** unknown regexp error code ***"}
-};
-
-/*
- - regerror - the interface to error numbers
- = extern size_t regerror(int, const regex_t *, char *, size_t);
- */
-/* ARGSUSED */
-size_t
-regerror(errcode, preg, errbuf, errbuf_size)
-int errcode;
-const regex_t *preg;
-char *errbuf;
-size_t errbuf_size;
-{
- register struct rerr *r;
- register size_t len;
- register int target = errcode &~ REG_ITOA;
- register char *s;
- char convbuf[50];
-
- if (errcode == REG_ATOI)
- s = regatoi(preg, convbuf);
- else {
- for (r = rerrs; r->code != 0; r++)
- if (r->code == target)
- break;
-
- if (errcode&REG_ITOA) {
- if (r->code != 0)
- (void) strcpy(convbuf, r->name);
- else
- sprintf(convbuf, "REG_0x%x", target);
- assert(strlen(convbuf) < sizeof(convbuf));
- s = convbuf;
- } else
- s = r->explain;
- }
-
- len = strlen(s) + 1;
- if (errbuf_size > 0) {
- if (errbuf_size > len)
- (void) strcpy(errbuf, s);
- else {
- (void) strncpy(errbuf, s, errbuf_size-1);
- errbuf[errbuf_size-1] = '\0';
- }
- }
-
- return(len);
-}
-
-/*
- - regatoi - internal routine to implement REG_ATOI
- == static char *regatoi(const regex_t *preg, char *localbuf);
- */
-static char *
-regatoi(preg, localbuf)
-const regex_t *preg;
-char *localbuf;
-{
- register struct rerr *r;
-
- for (r = rerrs; r->code != 0; r++)
- if (strcmp(r->name, preg->re_endp) == 0)
- break;
- if (r->code == 0)
- return("0");
-
- sprintf(localbuf, "%d", r->code);
- return(localbuf);
-}
diff --git a/lib/libc/regex/regex.3 b/lib/libc/regex/regex.3
deleted file mode 100644
index a107eea..0000000
--- a/lib/libc/regex/regex.3
+++ /dev/null
@@ -1,540 +0,0 @@
-.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
-.\" Copyright (c) 1992, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Henry Spencer.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)regex.3 8.4 (Berkeley) 3/20/94
-.\"
-.TH REGEX 3 "March 20, 1994"
-.de ZR
-.\" one other place knows this name: the SEE ALSO section
-.IR re_format (7) \\$1
-..
-.SH NAME
-regcomp, regexec, regerror, regfree \- regular-expression library
-.SH SYNOPSIS
-.ft B
-.\".na
-#include <sys/types.h>
-.br
-#include <regex.h>
-.HP 10
-int regcomp(regex_t\ *preg, const\ char\ *pattern, int\ cflags);
-.HP
-int\ regexec(const\ regex_t\ *preg, const\ char\ *string,
-size_t\ nmatch, regmatch_t\ pmatch[], int\ eflags);
-.HP
-size_t\ regerror(int\ errcode, const\ regex_t\ *preg,
-char\ *errbuf, size_t\ errbuf_size);
-.HP
-void\ regfree(regex_t\ *preg);
-.\".ad
-.ft
-.SH DESCRIPTION
-These routines implement POSIX 1003.2 regular expressions (``RE''s);
-see
-.ZR .
-.I Regcomp
-compiles an RE written as a string into an internal form,
-.I regexec
-matches that internal form against a string and reports results,
-.I regerror
-transforms error codes from either into human-readable messages,
-and
-.I regfree
-frees any dynamically-allocated storage used by the internal form
-of an RE.
-.PP
-The header
-.I <regex.h>
-declares two structure types,
-.I regex_t
-and
-.IR regmatch_t ,
-the former for compiled internal forms and the latter for match reporting.
-It also declares the four functions,
-a type
-.IR regoff_t ,
-and a number of constants with names starting with ``REG_''.
-.PP
-.I Regcomp
-compiles the regular expression contained in the
-.I pattern
-string,
-subject to the flags in
-.IR cflags ,
-and places the results in the
-.I regex_t
-structure pointed to by
-.IR preg .
-.I Cflags
-is the bitwise OR of zero or more of the following flags:
-.IP REG_EXTENDED \w'REG_EXTENDED'u+2n
-Compile modern (``extended'') REs,
-rather than the obsolete (``basic'') REs that
-are the default.
-.IP REG_BASIC
-This is a synonym for 0,
-provided as a counterpart to REG_EXTENDED to improve readability.
-.IP REG_NOSPEC
-Compile with recognition of all special characters turned off.
-All characters are thus considered ordinary,
-so the ``RE'' is a literal string.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-REG_EXTENDED and REG_NOSPEC may not be used
-in the same call to
-.IR regcomp .
-.IP REG_ICASE
-Compile for matching that ignores upper/lower case distinctions.
-See
-.ZR .
-.IP REG_NOSUB
-Compile for matching that need only report success or failure,
-not what was matched.
-.IP REG_NEWLINE
-Compile for newline-sensitive matching.
-By default, newline is a completely ordinary character with no special
-meaning in either REs or strings.
-With this flag,
-`[^' bracket expressions and `.' never match newline,
-a `^' anchor matches the null string after any newline in the string
-in addition to its normal function,
-and the `$' anchor matches the null string before any newline in the
-string in addition to its normal function.
-.IP REG_PEND
-The regular expression ends,
-not at the first NUL,
-but just before the character pointed to by the
-.I re_endp
-member of the structure pointed to by
-.IR preg .
-The
-.I re_endp
-member is of type
-.IR const\ char\ * .
-This flag permits inclusion of NULs in the RE;
-they are considered ordinary characters.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-.PP
-When successful,
-.I regcomp
-returns 0 and fills in the structure pointed to by
-.IR preg .
-One member of that structure
-(other than
-.IR re_endp )
-is publicized:
-.IR re_nsub ,
-of type
-.IR size_t ,
-contains the number of parenthesized subexpressions within the RE
-(except that the value of this member is undefined if the
-REG_NOSUB flag was used).
-If
-.I regcomp
-fails, it returns a non-zero error code;
-see DIAGNOSTICS.
-.PP
-.I Regexec
-matches the compiled RE pointed to by
-.I preg
-against the
-.IR string ,
-subject to the flags in
-.IR eflags ,
-and reports results using
-.IR nmatch ,
-.IR pmatch ,
-and the returned value.
-The RE must have been compiled by a previous invocation of
-.IR regcomp .
-The compiled form is not altered during execution of
-.IR regexec ,
-so a single compiled RE can be used simultaneously by multiple threads.
-.PP
-By default,
-the NUL-terminated string pointed to by
-.I string
-is considered to be the text of an entire line, minus any terminating
-newline.
-The
-.I eflags
-argument is the bitwise OR of zero or more of the following flags:
-.IP REG_NOTBOL \w'REG_STARTEND'u+2n
-The first character of
-the string
-is not the beginning of a line, so the `^' anchor should not match before it.
-This does not affect the behavior of newlines under REG_NEWLINE.
-.IP REG_NOTEOL
-The NUL terminating
-the string
-does not end a line, so the `$' anchor should not match before it.
-This does not affect the behavior of newlines under REG_NEWLINE.
-.IP REG_STARTEND
-The string is considered to start at
-\fIstring\fR\ + \fIpmatch\fR[0].\fIrm_so\fR
-and to have a terminating NUL located at
-\fIstring\fR\ + \fIpmatch\fR[0].\fIrm_eo\fR
-(there need not actually be a NUL at that location),
-regardless of the value of
-.IR nmatch .
-See below for the definition of
-.IR pmatch
-and
-.IR nmatch .
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-Note that a non-zero \fIrm_so\fR does not imply REG_NOTBOL;
-REG_STARTEND affects only the location of the string,
-not how it is matched.
-.PP
-See
-.ZR
-for a discussion of what is matched in situations where an RE or a
-portion thereof could match any of several substrings of
-.IR string .
-.PP
-Normally,
-.I regexec
-returns 0 for success and the non-zero code REG_NOMATCH for failure.
-Other non-zero error codes may be returned in exceptional situations;
-see DIAGNOSTICS.
-.PP
-If REG_NOSUB was specified in the compilation of the RE,
-or if
-.I nmatch
-is 0,
-.I regexec
-ignores the
-.I pmatch
-argument (but see below for the case where REG_STARTEND is specified).
-Otherwise,
-.I pmatch
-points to an array of
-.I nmatch
-structures of type
-.IR regmatch_t .
-Such a structure has at least the members
-.I rm_so
-and
-.IR rm_eo ,
-both of type
-.I regoff_t
-(a signed arithmetic type at least as large as an
-.I off_t
-and a
-.IR ssize_t ),
-containing respectively the offset of the first character of a substring
-and the offset of the first character after the end of the substring.
-Offsets are measured from the beginning of the
-.I string
-argument given to
-.IR regexec .
-An empty substring is denoted by equal offsets,
-both indicating the character following the empty substring.
-.PP
-The 0th member of the
-.I pmatch
-array is filled in to indicate what substring of
-.I string
-was matched by the entire RE.
-Remaining members report what substring was matched by parenthesized
-subexpressions within the RE;
-member
-.I i
-reports subexpression
-.IR i ,
-with subexpressions counted (starting at 1) by the order of their opening
-parentheses in the RE, left to right.
-Unused entries in the array\(emcorresponding either to subexpressions that
-did not participate in the match at all, or to subexpressions that do not
-exist in the RE (that is, \fIi\fR\ > \fIpreg\fR\->\fIre_nsub\fR)\(emhave both
-.I rm_so
-and
-.I rm_eo
-set to \-1.
-If a subexpression participated in the match several times,
-the reported substring is the last one it matched.
-(Note, as an example in particular, that when the RE `(b*)+' matches `bbb',
-the parenthesized subexpression matches each of the three `b's and then
-an infinite number of empty strings following the last `b',
-so the reported substring is one of the empties.)
-.PP
-If REG_STARTEND is specified,
-.I pmatch
-must point to at least one
-.I regmatch_t
-(even if
-.I nmatch
-is 0 or REG_NOSUB was specified),
-to hold the input offsets for REG_STARTEND.
-Use for output is still entirely controlled by
-.IR nmatch ;
-if
-.I nmatch
-is 0 or REG_NOSUB was specified,
-the value of
-.IR pmatch [0]
-will not be changed by a successful
-.IR regexec .
-.PP
-.I Regerror
-maps a non-zero
-.I errcode
-from either
-.I regcomp
-or
-.I regexec
-to a human-readable, printable message.
-If
-.I preg
-is non-NULL,
-the error code should have arisen from use of
-the
-.I regex_t
-pointed to by
-.IR preg ,
-and if the error code came from
-.IR regcomp ,
-it should have been the result from the most recent
-.I regcomp
-using that
-.IR regex_t .
-.RI ( Regerror
-may be able to supply a more detailed message using information
-from the
-.IR regex_t .)
-.I Regerror
-places the NUL-terminated message into the buffer pointed to by
-.IR errbuf ,
-limiting the length (including the NUL) to at most
-.I errbuf_size
-bytes.
-If the whole message won't fit,
-as much of it as will fit before the terminating NUL is supplied.
-In any case,
-the returned value is the size of buffer needed to hold the whole
-message (including terminating NUL).
-If
-.I errbuf_size
-is 0,
-.I errbuf
-is ignored but the return value is still correct.
-.PP
-If the
-.I errcode
-given to
-.I regerror
-is first ORed with REG_ITOA,
-the ``message'' that results is the printable name of the error code,
-e.g. ``REG_NOMATCH'',
-rather than an explanation thereof.
-If
-.I errcode
-is REG_ATOI,
-then
-.I preg
-shall be non-NULL and the
-.I re_endp
-member of the structure it points to
-must point to the printable name of an error code;
-in this case, the result in
-.I errbuf
-is the decimal digits of
-the numeric value of the error code
-(0 if the name is not recognized).
-REG_ITOA and REG_ATOI are intended primarily as debugging facilities;
-they are extensions,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-Be warned also that they are considered experimental and changes are possible.
-.PP
-.I Regfree
-frees any dynamically-allocated storage associated with the compiled RE
-pointed to by
-.IR preg .
-The remaining
-.I regex_t
-is no longer a valid compiled RE
-and the effect of supplying it to
-.I regexec
-or
-.I regerror
-is undefined.
-.PP
-None of these functions references global variables except for tables
-of constants;
-all are safe for use from multiple threads if the arguments are safe.
-.SH IMPLEMENTATION CHOICES
-There are a number of decisions that 1003.2 leaves up to the implementor,
-either by explicitly saying ``undefined'' or by virtue of them being
-forbidden by the RE grammar.
-This implementation treats them as follows.
-.PP
-See
-.ZR
-for a discussion of the definition of case-independent matching.
-.PP
-There is no particular limit on the length of REs,
-except insofar as memory is limited.
-Memory usage is approximately linear in RE size, and largely insensitive
-to RE complexity, except for bounded repetitions.
-See BUGS for one short RE using them
-that will run almost any system out of memory.
-.PP
-A backslashed character other than one specifically given a magic meaning
-by 1003.2 (such magic meanings occur only in obsolete [``basic''] REs)
-is taken as an ordinary character.
-.PP
-Any unmatched [ is a REG_EBRACK error.
-.PP
-Equivalence classes cannot begin or end bracket-expression ranges.
-The endpoint of one range cannot begin another.
-.PP
-RE_DUP_MAX, the limit on repetition counts in bounded repetitions, is 255.
-.PP
-A repetition operator (?, *, +, or bounds) cannot follow another
-repetition operator.
-A repetition operator cannot begin an expression or subexpression
-or follow `^' or `|'.
-.PP
-`|' cannot appear first or last in a (sub)expression or after another `|',
-i.e. an operand of `|' cannot be an empty subexpression.
-An empty parenthesized subexpression, `()', is legal and matches an
-empty (sub)string.
-An empty string is not a legal RE.
-.PP
-A `{' followed by a digit is considered the beginning of bounds for a
-bounded repetition, which must then follow the syntax for bounds.
-A `{' \fInot\fR followed by a digit is considered an ordinary character.
-.PP
-`^' and `$' beginning and ending subexpressions in obsolete (``basic'')
-REs are anchors, not ordinary characters.
-.SH SEE ALSO
-grep(1), re_format(7)
-.PP
-POSIX 1003.2, sections 2.8 (Regular Expression Notation)
-and
-B.5 (C Binding for Regular Expression Matching).
-.SH DIAGNOSTICS
-Non-zero error codes from
-.I regcomp
-and
-.I regexec
-include the following:
-.PP
-.nf
-.ta \w'REG_ECOLLATE'u+3n
-REG_NOMATCH regexec() failed to match
-REG_BADPAT invalid regular expression
-REG_ECOLLATE invalid collating element
-REG_ECTYPE invalid character class
-REG_EESCAPE \e applied to unescapable character
-REG_ESUBREG invalid backreference number
-REG_EBRACK brackets [ ] not balanced
-REG_EPAREN parentheses ( ) not balanced
-REG_EBRACE braces { } not balanced
-REG_BADBR invalid repetition count(s) in { }
-REG_ERANGE invalid character range in [ ]
-REG_ESPACE ran out of memory
-REG_BADRPT ?, *, or + operand invalid
-REG_EMPTY empty (sub)expression
-REG_ASSERT ``can't happen''\(emyou found a bug
-REG_INVARG invalid argument, e.g. negative-length string
-.fi
-.SH HISTORY
-Originally written by Henry Spencer.
-Altered for inclusion in the
-.Bx 4.4
-distribution.
-.SH BUGS
-This is an alpha release with known defects.
-Please report problems.
-.PP
-There is one known functionality bug.
-The implementation of internationalization is incomplete:
-the locale is always assumed to be the default one of 1003.2,
-and only the collating elements etc. of that locale are available.
-.PP
-The back-reference code is subtle and doubts linger about its correctness
-in complex cases.
-.PP
-.I Regexec
-performance is poor.
-This will improve with later releases.
-.I Nmatch
-exceeding 0 is expensive;
-.I nmatch
-exceeding 1 is worse.
-.I Regexec
-is largely insensitive to RE complexity \fIexcept\fR that back
-references are massively expensive.
-RE length does matter; in particular, there is a strong speed bonus
-for keeping RE length under about 30 characters,
-with most special characters counting roughly double.
-.PP
-.I Regcomp
-implements bounded repetitions by macro expansion,
-which is costly in time and space if counts are large
-or bounded repetitions are nested.
-An RE like, say,
-`((((a{1,100}){1,100}){1,100}){1,100}){1,100}'
-will (eventually) run almost any existing machine out of swap space.
-.PP
-There are suspected problems with response to obscure error conditions.
-Notably,
-certain kinds of internal overflow,
-produced only by truly enormous REs or by multiply nested bounded repetitions,
-are probably not handled well.
-.PP
-Due to a mistake in 1003.2, things like `a)b' are legal REs because `)' is
-a special character only in the presence of a previous unmatched `('.
-This can't be fixed until the spec is fixed.
-.PP
-The standard's definition of back references is vague.
-For example, does
-`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?
-Until the standard is clarified,
-behavior in such cases should not be relied on.
-.PP
-The implementation of word-boundary matching is a bit of a kludge,
-and bugs may lurk in combinations of word-boundary matching and anchoring.
diff --git a/lib/libc/regex/regex2.h b/lib/libc/regex/regex2.h
deleted file mode 100644
index 9560e05..0000000
--- a/lib/libc/regex/regex2.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regex2.h 8.4 (Berkeley) 3/20/94
- */
-
-/*
- * First, the stuff that ends up in the outside-world include file
- = typedef off_t regoff_t;
- = typedef struct {
- = int re_magic;
- = size_t re_nsub; // number of parenthesized subexpressions
- = const char *re_endp; // end pointer for REG_PEND
- = struct re_guts *re_g; // none of your business :-)
- = } regex_t;
- = typedef struct {
- = regoff_t rm_so; // start of match
- = regoff_t rm_eo; // end of match
- = } regmatch_t;
- */
-/*
- * internals of regex_t
- */
-#define MAGIC1 ((('r'^0200)<<8) | 'e')
-
-/*
- * The internal representation is a *strip*, a sequence of
- * operators ending with an endmarker. (Some terminology etc. is a
- * historical relic of earlier versions which used multiple strips.)
- * Certain oddities in the representation are there to permit running
- * the machinery backwards; in particular, any deviation from sequential
- * flow must be marked at both its source and its destination. Some
- * fine points:
- *
- * - OPLUS_ and O_PLUS are *inside* the loop they create.
- * - OQUEST_ and O_QUEST are *outside* the bypass they create.
- * - OCH_ and O_CH are *outside* the multi-way branch they create, while
- * OOR1 and OOR2 are respectively the end and the beginning of one of
- * the branches. Note that there is an implicit OOR2 following OCH_
- * and an implicit OOR1 preceding O_CH.
- *
- * In state representations, an operator's bit is on to signify a state
- * immediately *preceding* "execution" of that operator.
- */
-typedef unsigned long sop; /* strip operator */
-typedef long sopno;
-#define OPRMASK 0xf8000000
-#define OPDMASK 0x07ffffff
-#define OPSHIFT ((unsigned)27)
-#define OP(n) ((n)&OPRMASK)
-#define OPND(n) ((n)&OPDMASK)
-#define SOP(op, opnd) ((op)|(opnd))
-/* operators meaning operand */
-/* (back, fwd are offsets) */
-#define OEND (1<<OPSHIFT) /* endmarker - */
-#define OCHAR (2<<OPSHIFT) /* character unsigned char */
-#define OBOL (3<<OPSHIFT) /* left anchor - */
-#define OEOL (4<<OPSHIFT) /* right anchor - */
-#define OANY (5<<OPSHIFT) /* . - */
-#define OANYOF (6<<OPSHIFT) /* [...] set number */
-#define OBACK_ (7<<OPSHIFT) /* begin \d paren number */
-#define O_BACK (8<<OPSHIFT) /* end \d paren number */
-#define OPLUS_ (9<<OPSHIFT) /* + prefix fwd to suffix */
-#define O_PLUS (10<<OPSHIFT) /* + suffix back to prefix */
-#define OQUEST_ (11<<OPSHIFT) /* ? prefix fwd to suffix */
-#define O_QUEST (12<<OPSHIFT) /* ? suffix back to prefix */
-#define OLPAREN (13<<OPSHIFT) /* ( fwd to ) */
-#define ORPAREN (14<<OPSHIFT) /* ) back to ( */
-#define OCH_ (15<<OPSHIFT) /* begin choice fwd to OOR2 */
-#define OOR1 (16<<OPSHIFT) /* | pt. 1 back to OOR1 or OCH_ */
-#define OOR2 (17<<OPSHIFT) /* | pt. 2 fwd to OOR2 or O_CH */
-#define O_CH (18<<OPSHIFT) /* end choice back to OOR1 */
-#define OBOW (19<<OPSHIFT) /* begin word - */
-#define OEOW (20<<OPSHIFT) /* end word - */
-
-/*
- * Structure for [] character-set representation. Character sets are
- * done as bit vectors, grouped 8 to a byte vector for compactness.
- * The individual set therefore has both a pointer to the byte vector
- * and a mask to pick out the relevant bit of each byte. A hash code
- * simplifies testing whether two sets could be identical.
- *
- * This will get trickier for multicharacter collating elements. As
- * preliminary hooks for dealing with such things, we also carry along
- * a string of multi-character elements, and decide the size of the
- * vectors at run time.
- */
-typedef struct {
- uch *ptr; /* -> uch [csetsize] */
- uch mask; /* bit within array */
- short hash; /* hash code */
- size_t smultis;
- char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
-} cset;
-/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
-#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (uch)(c))
-#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (uch)(c))
-#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask)
-#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal fns */
-#define MCsub(p, cs, cp) mcsub(p, cs, cp)
-#define MCin(p, cs, cp) mcin(p, cs, cp)
-
-/* stuff for character categories */
-typedef unsigned char cat_t;
-
-/*
- * main compiled-expression structure
- */
-struct re_guts {
- int magic;
-# define MAGIC2 ((('R'^0200)<<8)|'E')
- sop *strip; /* malloced area for strip */
- int csetsize; /* number of bits in a cset vector */
- int ncsets; /* number of csets in use */
- cset *sets; /* -> cset [ncsets] */
- uch *setbits; /* -> uch[csetsize][ncsets/CHAR_BIT] */
- int cflags; /* copy of regcomp() cflags argument */
- sopno nstates; /* = number of sops */
- sopno firststate; /* the initial OEND (normally 0) */
- sopno laststate; /* the final OEND */
- int iflags; /* internal flags */
-# define USEBOL 01 /* used ^ */
-# define USEEOL 02 /* used $ */
-# define BAD 04 /* something wrong */
- int nbol; /* number of ^ used */
- int neol; /* number of $ used */
- int ncategories; /* how many character categories */
- cat_t *categories; /* ->catspace[-CHAR_MIN] */
- char *must; /* match must contain this string */
- int mlen; /* length of must */
- size_t nsub; /* copy of re_nsub */
- int backrefs; /* does it use back references? */
- sopno nplus; /* how deep does it nest +s? */
- /* catspace must be last */
- cat_t catspace[1]; /* actually [NC] */
-};
-
-/* misc utilities */
-#define OUT (CHAR_MAX+1) /* a non-character value */
-#define ISWORD(c) (isalnum((uch)(c)) || (c) == '_')
diff --git a/lib/libc/regex/regexec.c b/lib/libc/regex/regexec.c
deleted file mode 100644
index 3890b61..0000000
--- a/lib/libc/regex/regexec.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regexec.c 8.3 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regexec.c 8.3 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * the outer shell of regexec()
- *
- * This file includes engine.c *twice*, after muchos fiddling with the
- * macros that code uses. This lets the same code operate on two different
- * representations for state sets.
- */
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <ctype.h>
-#include <regex.h>
-
-#include "utils.h"
-#include "regex2.h"
-
-static int nope = 0; /* for use in asserts; shuts lint up */
-
-/* macros for manipulating states, small version */
-#define states long
-#define states1 states /* for later use in regexec() decision */
-#define CLEAR(v) ((v) = 0)
-#define SET0(v, n) ((v) &= ~(1 << (n)))
-#define SET1(v, n) ((v) |= 1 << (n))
-#define ISSET(v, n) ((v) & (1 << (n)))
-#define ASSIGN(d, s) ((d) = (s))
-#define EQ(a, b) ((a) == (b))
-#define STATEVARS int dummy /* dummy version */
-#define STATESETUP(m, n) /* nothing */
-#define STATETEARDOWN(m) /* nothing */
-#define SETUP(v) ((v) = 0)
-#define onestate int
-#define INIT(o, n) ((o) = (unsigned)1 << (n))
-#define INC(o) ((o) <<= 1)
-#define ISSTATEIN(v, o) ((v) & (o))
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define FWD(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) << (n))
-#define BACK(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) >> (n))
-#define ISSETBACK(v, n) ((v) & ((unsigned)here >> (n)))
-/* function names */
-#define SNAMES /* engine.c looks after details */
-
-#include "engine.c"
-
-/* now undo things */
-#undef states
-#undef CLEAR
-#undef SET0
-#undef SET1
-#undef ISSET
-#undef ASSIGN
-#undef EQ
-#undef STATEVARS
-#undef STATESETUP
-#undef STATETEARDOWN
-#undef SETUP
-#undef onestate
-#undef INIT
-#undef INC
-#undef ISSTATEIN
-#undef FWD
-#undef BACK
-#undef ISSETBACK
-#undef SNAMES
-
-/* macros for manipulating states, large version */
-#define states char *
-#define CLEAR(v) memset(v, 0, m->g->nstates)
-#define SET0(v, n) ((v)[n] = 0)
-#define SET1(v, n) ((v)[n] = 1)
-#define ISSET(v, n) ((v)[n])
-#define ASSIGN(d, s) memcpy(d, s, m->g->nstates)
-#define EQ(a, b) (memcmp(a, b, m->g->nstates) == 0)
-#define STATEVARS int vn; char *space
-#define STATESETUP(m, nv) { (m)->space = malloc((nv)*(m)->g->nstates); \
- if ((m)->space == NULL) return(REG_ESPACE); \
- (m)->vn = 0; }
-#define STATETEARDOWN(m) { free((m)->space); }
-#define SETUP(v) ((v) = &m->space[m->vn++ * m->g->nstates])
-#define onestate int
-#define INIT(o, n) ((o) = (n))
-#define INC(o) ((o)++)
-#define ISSTATEIN(v, o) ((v)[o])
-/* some abbreviations; note that some of these know variable names! */
-/* do "if I'm here, I can also be there" etc without branches */
-#define FWD(dst, src, n) ((dst)[here+(n)] |= (src)[here])
-#define BACK(dst, src, n) ((dst)[here-(n)] |= (src)[here])
-#define ISSETBACK(v, n) ((v)[here - (n)])
-/* function names */
-#define LNAMES /* flag */
-
-#include "engine.c"
-
-/*
- - regexec - interface for matching
- = extern int regexec(const regex_t *, const char *, size_t, \
- = regmatch_t [], int);
- = #define REG_NOTBOL 00001
- = #define REG_NOTEOL 00002
- = #define REG_STARTEND 00004
- = #define REG_TRACE 00400 // tracing of execution
- = #define REG_LARGE 01000 // force large representation
- = #define REG_BACKR 02000 // force use of backref code
- *
- * We put this here so we can exploit knowledge of the state representation
- * when choosing which matcher to call. Also, by this point the matchers
- * have been prototyped.
- */
-int /* 0 success, REG_NOMATCH failure */
-regexec(preg, string, nmatch, pmatch, eflags)
-const regex_t *preg;
-const char *string;
-size_t nmatch;
-regmatch_t pmatch[];
-int eflags;
-{
- register struct re_guts *g = preg->re_g;
-#ifdef REDEBUG
-# define GOODFLAGS(f) (f)
-#else
-# define GOODFLAGS(f) ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))
-#endif
-
- if (preg->re_magic != MAGIC1 || g->magic != MAGIC2)
- return(REG_BADPAT);
- assert(!(g->iflags&BAD));
- if (g->iflags&BAD) /* backstop for no-debug case */
- return(REG_BADPAT);
- eflags = GOODFLAGS(eflags);
-
- if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags&REG_LARGE))
- return(smatcher(g, (char *)string, nmatch, pmatch, eflags));
- else
- return(lmatcher(g, (char *)string, nmatch, pmatch, eflags));
-}
diff --git a/lib/libc/regex/regfree.c b/lib/libc/regex/regfree.c
deleted file mode 100644
index 580fb75..0000000
--- a/lib/libc/regex/regfree.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)regfree.c 8.3 (Berkeley) 3/20/94
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regfree.c 8.3 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <regex.h>
-
-#include "utils.h"
-#include "regex2.h"
-
-/*
- - regfree - free everything
- = extern void regfree(regex_t *);
- */
-void
-regfree(preg)
-regex_t *preg;
-{
- register struct re_guts *g;
-
- if (preg->re_magic != MAGIC1) /* oops */
- return; /* nice to complain, but hard */
-
- g = preg->re_g;
- if (g == NULL || g->magic != MAGIC2) /* oops again */
- return;
- preg->re_magic = 0; /* mark it invalid */
- g->magic = 0; /* mark it invalid */
-
- if (g->strip != NULL)
- free((char *)g->strip);
- if (g->sets != NULL)
- free((char *)g->sets);
- if (g->setbits != NULL)
- free((char *)g->setbits);
- if (g->must != NULL)
- free(g->must);
- free((char *)g);
-}
diff --git a/lib/libc/regex/utils.h b/lib/libc/regex/utils.h
deleted file mode 100644
index d804d8d..0000000
--- a/lib/libc/regex/utils.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994 Henry Spencer.
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Henry Spencer.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)utils.h 8.3 (Berkeley) 3/20/94
- */
-
-/* utility definitions */
-#define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */
-#define INFINITY (DUPMAX + 1)
-#define NC (CHAR_MAX - CHAR_MIN + 1)
-typedef unsigned char uch;
-
-/* switch off assertions (if not already off) if no REDEBUG */
-#ifndef REDEBUG
-#ifndef NDEBUG
-#define NDEBUG /* no assertions please */
-#endif
-#endif
-#include <assert.h>
-
-/* for old systems with bcopy() but no memmove() */
-#ifdef USEBCOPY
-#define memmove(d, s, c) bcopy(s, d, c)
-#endif
diff --git a/lib/libc/rpc/DISCLAIMER b/lib/libc/rpc/DISCLAIMER
deleted file mode 100644
index 1a66d5f..0000000
--- a/lib/libc/rpc/DISCLAIMER
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
diff --git a/lib/libc/rpc/Makefile.inc b/lib/libc/rpc/Makefile.inc
deleted file mode 100644
index 7574e4d..0000000
--- a/lib/libc/rpc/Makefile.inc
+++ /dev/null
@@ -1,119 +0,0 @@
-# @(#)Makefile 5.11 (Berkeley) 9/6/90
-# $Id$
-
-.PATH: ${.CURDIR}/../libc/rpc ${.CURDIR}/.
-
-SRCS+= auth_des.c auth_none.c auth_time.c auth_unix.c \
- authdes_prot.c authunix_prot.c bindresvport.c \
- clnt_generic.c clnt_perror.c clnt_raw.c clnt_simple.c clnt_tcp.c \
- clnt_udp.c clnt_unix.c crypt_client.c des_crypt.c des_soft.c \
- get_myaddress.c getpublickey.c getrpcent.c getrpcport.c \
- key_call.c key_prot_xdr.c netname.c netnamer.c \
- pmap_clnt.c pmap_getmaps.c pmap_getport.c pmap_prot.c \
- pmap_prot2.c pmap_rmt.c rpc_callmsg.c rpc_commondata.c \
- rpc_dtablesize.c rpc_prot.c rpcdname.c rtime.c \
- svc.c svc_auth.c svc_auth_des.c svc_auth_unix.c \
- svc_raw.c svc_run.c svc_simple.c \
- svc_tcp.c svc_udp.c svc_unix.c
-
-# generated sources
-SRCS+= crypt_clnt.c crypt_xdr.c
-
-CFLAGS+= -DBROKEN_DES
-
-CLEANFILES+= crypt_clnt.c crypt_xdr.c crypt.h
-
-RPCDIR= ${DESTDIR}/usr/include/rpcsvc
-RPCGEN= rpcgen -C
-
-crypt_clnt.c: ${RPCDIR}/crypt.x crypt.h
- ${RPCGEN} -l -o ${.TARGET} ${RPCDIR}/crypt.x
-
-crypt_xdr.c: ${RPCDIR}/crypt.x crypt.h
- ${RPCGEN} -c -o ${.TARGET} ${RPCDIR}/crypt.x
-
-crypt.h: ${RPCDIR}/crypt.x
- ${RPCGEN} -h -o ${.TARGET} ${RPCDIR}/crypt.x
-
-.if ${LIB} == "c"
-#
-# XXX -- rstat.1 and rstat_svc.8 shouldn't really be here
-# but there's no rstat command, don't know why, so I'm
-# leaving them here in case they're needed sometime later.
-# Paul.
-#
-
-# MAN1+= rstat.1
-MAN3+= bindresvport.3 des_crypt.3 getrpcent.3 getrpcport.3 publickey.3 rpc.3 \
- rpc_secure.3 rtime.3
-MAN5+= publickey.5 rpc.5
-MAN8+= rstat_svc.8
-
-MLINKS+= getrpcent.3 endrpcent.3 \
- getrpcent.3 getrpcbyname.3 \
- getrpcent.3 getrpcbynumber.3 \
- getrpcent.3 setrpcent.3 \
- rpc.3 auth_destroy.3 \
- rpc.3 authnone_create.3 \
- rpc.3 authunix_create.3 \
- rpc.3 authunix_create_default.3 \
- rpc.3 callrpc.3 \
- rpc.3 clnt_broadcast.3 \
- rpc.3 clnt_call.3 \
- rpc.3 clnt_control.3 \
- rpc.3 clnt_create.3 \
- rpc.3 clnt_destroy.3 \
- rpc.3 clnt_freeres.3 \
- rpc.3 clnt_geterr.3 \
- rpc.3 clnt_pcreateerror.3 \
- rpc.3 clnt_perrno.3 \
- rpc.3 clnt_perror.3 \
- rpc.3 clnt_spcreateerror.3 \
- rpc.3 clnt_sperrno.3 \
- rpc.3 clnt_sperror.3 \
- rpc.3 clntraw_create.3 \
- rpc.3 clnttcp_create.3 \
- rpc.3 clntudp_bufcreate.3 \
- rpc.3 clntudp_create.3 \
- rpc.3 get_myaddress.3 \
- rpc.3 pmap_getmaps.3 \
- rpc.3 pmap_getport.3 \
- rpc.3 pmap_rmtcall.3 \
- rpc.3 pmap_set.3 \
- rpc.3 pmap_unset.3 \
- rpc.3 regsterrpc.3 \
- rpc.3 rpc_createerr.3 \
- rpc.3 svc_destroy.3 \
- rpc.3 svc_fds.3 \
- rpc.3 svc_fdset.3 \
- rpc.3 svc_getargs.3 \
- rpc.3 svc_getcaller.3 \
- rpc.3 svc_getreg.3 \
- rpc.3 svc_getregset.3 \
- rpc.3 svc_register.3 \
- rpc.3 svc_run.3 \
- rpc.3 svc_sendreply.3 \
- rpc.3 svc_unregister.3 \
- rpc.3 svcerr_auth.3 \
- rpc.3 svcerr_decode.3 \
- rpc.3 svcerr_noproc.3 \
- rpc.3 svcerr_noprog.3 \
- rpc.3 svcerr_progvers.3 \
- rpc.3 svcerr_systemerr.3 \
- rpc.3 svcerr_weakauth.3 \
- rpc.3 svcfd_create.3 \
- rpc.3 svcraw_create.3 \
- rpc.3 svctcp_create.3 \
- rpc.3 svcudp_bufcreate.3 \
- rpc.3 xdr_accepted_reply.3 \
- rpc.3 xdr_authunix_parms.3 \
- rpc.3 xdr_callhdr.3 \
- rpc.3 xdr_callmsg.3 \
- rpc.3 xdr_opaque_auth.3 \
- rpc.3 xdr_pmap.3 \
- rpc.3 xdr_pmaplist.3 \
- rpc.3 xdr_rejected_reply.3 \
- rpc.3 xdr_replymsg.3 \
- rpc.3 xprt_register.3 \
- rpc.3 xprt_unregister.3
-.endif
diff --git a/lib/libc/rpc/PSD.doc/nfs.rfc.ms b/lib/libc/rpc/PSD.doc/nfs.rfc.ms
deleted file mode 100644
index 0c9a899..0000000
--- a/lib/libc/rpc/PSD.doc/nfs.rfc.ms
+++ /dev/null
@@ -1,1372 +0,0 @@
-.\"
-.\" Must use -- tbl -- with this one
-.\"
-.\" @(#)nfs.rfc.ms 2.2 88/08/05 4.0 RPCSRC
-.de BT
-.if \\n%=1 .tl ''- % -''
-..
-.ND
-.\" prevent excess underlining in nroff
-.if n .fp 2 R
-.OH 'Network File System: Version 2 Protocol Specification''Page %'
-.EH 'Page %''Network File System: Version 2 Protocol Specification'
-.if \\n%=1 .bp
-.SH
-\&Network File System: Version 2 Protocol Specification
-.IX NFS "" "" "" PAGE MAJOR
-.IX "Network File System" "" "" "" PAGE MAJOR
-.IX NFS "version-2 protocol specification"
-.IX "Network File System" "version-2 protocol specification"
-.LP
-.NH 0
-\&Status of this Standard
-.LP
-Note: This document specifies a protocol that Sun Microsystems, Inc.,
-and others are using. It specifies it in standard ARPA RFC form.
-.NH 1
-\&Introduction
-.IX NFS introduction
-.LP
-The Sun Network Filesystem (NFS) protocol provides transparent remote
-access to shared filesystems over local area networks. The NFS
-protocol is designed to be machine, operating system, network architecture,
-and transport protocol independent. This independence is
-achieved through the use of Remote Procedure Call (RPC) primitives
-built on top of an External Data Representation (XDR). Implementations
-exist for a variety of machines, from personal computers to
-supercomputers.
-.LP
-The supporting mount protocol allows the server to hand out remote
-access privileges to a restricted set of clients. It performs the
-operating system-specific functions that allow, for example, to
-attach remote directory trees to some local file system.
-.NH 2
-\&Remote Procedure Call
-.IX "Remote Procedure Call"
-.LP
-Sun's remote procedure call specification provides a procedure-
-oriented interface to remote services. Each server supplies a
-program that is a set of procedures. NFS is one such "program".
-The combination of host address, program number, and procedure
-number specifies one remote service procedure. RPC does not depend
-on services provided by specific protocols, so it can be used with
-any underlying transport protocol. See the
-.I "Remote Procedure Calls: Protocol Specification"
-chapter of this manual.
-.NH 2
-\&External Data Representation
-.IX "External Data Representation"
-.LP
-The External Data Representation (XDR) standard provides a common
-way of representing a set of data types over a network.
-The NFS
-Protocol Specification is written using the RPC data description
-language.
-For more information, see the
-.I " External Data Representation Standard: Protocol Specification."
-Sun provides implementations of XDR and
-RPC, but NFS does not require their use. Any software that
-provides equivalent functionality can be used, and if the encoding
-is exactly the same it can interoperate with other implementations
-of NFS.
-.NH 2
-\&Stateless Servers
-.IX "stateless servers"
-.IX servers stateless
-.LP
-The NFS protocol is stateless. That is, a server does not need to
-maintain any extra state information about any of its clients in
-order to function correctly. Stateless servers have a distinct
-advantage over stateful servers in the event of a failure. With
-stateless servers, a client need only retry a request until the
-server responds; it does not even need to know that the server has
-crashed, or the network temporarily went down. The client of a
-stateful server, on the other hand, needs to either detect a server
-crash and rebuild the server's state when it comes back up, or
-cause client operations to fail.
-.LP
-This may not sound like an important issue, but it affects the
-protocol in some unexpected ways. We feel that it is worth a bit
-of extra complexity in the protocol to be able to write very simple
-servers that do not require fancy crash recovery.
-.LP
-On the other hand, NFS deals with objects such as files and
-directories that inherently have state -- what good would a file be
-if it did not keep its contents intact? The goal is to not
-introduce any extra state in the protocol itself. Another way to
-simplify recovery is by making operations "idempotent" whenever
-possible (so that they can potentially be repeated).
-.NH 1
-\&NFS Protocol Definition
-.IX NFS "protocol definition"
-.IX NFS protocol
-.LP
-Servers have been known to change over time, and so can the
-protocol that they use. So RPC provides a version number with each
-RPC request. This RFC describes version two of the NFS protocol.
-Even in the second version, there are various obsolete procedures
-and parameters, which will be removed in later versions. An RFC
-for version three of the NFS protocol is currently under
-preparation.
-.NH 2
-\&File System Model
-.IX filesystem model
-.LP
-NFS assumes a file system that is hierarchical, with directories as
-all but the bottom-level files. Each entry in a directory (file,
-directory, device, etc.) has a string name. Different operating
-systems may have restrictions on the depth of the tree or the names
-used, as well as using different syntax to represent the "pathname",
-which is the concatenation of all the "components" (directory and
-file names) in the name. A "file system" is a tree on a single
-server (usually a single disk or physical partition) with a specified
-"root". Some operating systems provide a "mount" operation to make
-all file systems appear as a single tree, while others maintain a
-"forest" of file systems. Files are unstructured streams of
-uninterpreted bytes. Version 3 of NFS uses a slightly more general
-file system model.
-.LP
-NFS looks up one component of a pathname at a time. It may not be
-obvious why it does not just take the whole pathname, traipse down
-the directories, and return a file handle when it is done. There are
-several good reasons not to do this. First, pathnames need
-separators between the directory components, and different operating
-systems use different separators. We could define a Network Standard
-Pathname Representation, but then every pathname would have to be
-parsed and converted at each end. Other issues are discussed in
-\fINFS Implementation Issues\fP below.
-.LP
-Although files and directories are similar objects in many ways,
-different procedures are used to read directories and files. This
-provides a network standard format for representing directories. The
-same argument as above could have been used to justify a procedure
-that returns only one directory entry per call. The problem is
-efficiency. Directories can contain many entries, and a remote call
-to return each would be just too slow.
-.NH 2
-\&RPC Information
-.IX NFS "RPC information"
-.IP \fIAuthentication\fP
-The NFS service uses
-.I AUTH_UNIX ,
-.I AUTH_DES ,
-or
-.I AUTH_SHORT
-style
-authentication, except in the NULL procedure where
-.I AUTH_NONE
-is also allowed.
-.IP "\fITransport Protocols\fP"
-NFS currently is supported on UDP/IP only.
-.IP "\fIPort Number\fP"
-The NFS protocol currently uses the UDP port number 2049. This is
-not an officially assigned port, so later versions of the protocol
-use the \*QPortmapping\*U facility of RPC.
-.NH 2
-\&Sizes of XDR Structures
-.IX "XDR structure sizes"
-.LP
-These are the sizes, given in decimal bytes, of various XDR
-structures used in the protocol:
-.DS
-/* \fIThe maximum number of bytes of data in a READ or WRITE request\fP */
-const MAXDATA = 8192;
-
-/* \fIThe maximum number of bytes in a pathname argument\fP */
-const MAXPATHLEN = 1024;
-
-/* \fIThe maximum number of bytes in a file name argument\fP */
-const MAXNAMLEN = 255;
-
-/* \fIThe size in bytes of the opaque "cookie" passed by READDIR\fP */
-const COOKIESIZE = 4;
-
-/* \fIThe size in bytes of the opaque file handle\fP */
-const FHSIZE = 32;
-.DE
-.NH 2
-\&Basic Data Types
-.IX "NFS data types"
-.IX NFS "basic data types"
-.LP
-The following XDR definitions are basic structures and types used
-in other structures described further on.
-.KS
-.NH 3
-\&stat
-.IX "NFS data types" stat "" \fIstat\fP
-.DS
-enum stat {
- NFS_OK = 0,
- NFSERR_PERM=1,
- NFSERR_NOENT=2,
- NFSERR_IO=5,
- NFSERR_NXIO=6,
- NFSERR_ACCES=13,
- NFSERR_EXIST=17,
- NFSERR_NODEV=19,
- NFSERR_NOTDIR=20,
- NFSERR_ISDIR=21,
- NFSERR_FBIG=27,
- NFSERR_NOSPC=28,
- NFSERR_ROFS=30,
- NFSERR_NAMETOOLONG=63,
- NFSERR_NOTEMPTY=66,
- NFSERR_DQUOT=69,
- NFSERR_STALE=70,
- NFSERR_WFLUSH=99
-};
-.DE
-.KE
-.LP
-The
-.I stat
-type is returned with every procedure's results. A
-value of
-.I NFS_OK
-indicates that the call completed successfully and
-the results are valid. The other values indicate some kind of
-error occurred on the server side during the servicing of the
-procedure. The error values are derived from UNIX error numbers.
-.IP \fBNFSERR_PERM\fP:
-Not owner. The caller does not have correct ownership
-to perform the requested operation.
-.IP \fBNFSERR_NOENT\fP:
-No such file or directory. The file or directory
-specified does not exist.
-.IP \fBNFSERR_IO\fP:
-Some sort of hard error occurred when the operation was
-in progress. This could be a disk error, for example.
-.IP \fBNFSERR_NXIO\fP:
-No such device or address.
-.IP \fBNFSERR_ACCES\fP:
-Permission denied. The caller does not have the
-correct permission to perform the requested operation.
-.IP \fBNFSERR_EXIST\fP:
-File exists. The file specified already exists.
-.IP \fBNFSERR_NODEV\fP:
-No such device.
-.IP \fBNFSERR_NOTDIR\fP:
-Not a directory. The caller specified a
-non-directory in a directory operation.
-.IP \fBNFSERR_ISDIR\fP:
-Is a directory. The caller specified a directory in
-a non- directory operation.
-.IP \fBNFSERR_FBIG\fP:
-File too large. The operation caused a file to grow
-beyond the server's limit.
-.IP \fBNFSERR_NOSPC\fP:
-No space left on device. The operation caused the
-server's filesystem to reach its limit.
-.IP \fBNFSERR_ROFS\fP:
-Read-only filesystem. Write attempted on a read-only filesystem.
-.IP \fBNFSERR_NAMETOOLONG\fP:
-File name too long. The file name in an operation was too long.
-.IP \fBNFSERR_NOTEMPTY\fP:
-Directory not empty. Attempted to remove a
-directory that was not empty.
-.IP \fBNFSERR_DQUOT\fP:
-Disk quota exceeded. The client's disk quota on the
-server has been exceeded.
-.IP \fBNFSERR_STALE\fP:
-The "fhandle" given in the arguments was invalid.
-That is, the file referred to by that file handle no longer exists,
-or access to it has been revoked.
-.IP \fBNFSERR_WFLUSH\fP:
-The server's write cache used in the
-.I WRITECACHE
-call got flushed to disk.
-.LP
-.KS
-.NH 3
-\&ftype
-.IX "NFS data types" ftype "" \fIftype\fP
-.DS
-enum ftype {
- NFNON = 0,
- NFREG = 1,
- NFDIR = 2,
- NFBLK = 3,
- NFCHR = 4,
- NFLNK = 5
-};
-.DE
-.KE
-The enumeration
-.I ftype
-gives the type of a file. The type
-.I NFNON
-indicates a non-file,
-.I NFREG
-is a regular file,
-.I NFDIR
-is a directory,
-.I NFBLK
-is a block-special device,
-.I NFCHR
-is a character-special device, and
-.I NFLNK
-is a symbolic link.
-.KS
-.NH 3
-\&fhandle
-.IX "NFS data types" fhandle "" \fIfhandle\fP
-.DS
-typedef opaque fhandle[FHSIZE];
-.DE
-.KE
-The
-.I fhandle
-is the file handle passed between the server and the client.
-All file operations are done using file handles to refer to a file or
-directory. The file handle can contain whatever information the server
-needs to distinguish an individual file.
-.KS
-.NH 3
-\&timeval
-.IX "NFS data types" timeval "" \fItimeval\fP
-.DS
-struct timeval {
- unsigned int seconds;
- unsigned int useconds;
-};
-.DE
-.KE
-The
-.I timeval
-structure is the number of seconds and microseconds
-since midnight January 1, 1970, Greenwich Mean Time. It is used to
-pass time and date information.
-.KS
-.NH 3
-\&fattr
-.IX "NFS data types" fattr "" \fIfattr\fP
-.DS
-struct fattr {
- ftype type;
- unsigned int mode;
- unsigned int nlink;
- unsigned int uid;
- unsigned int gid;
- unsigned int size;
- unsigned int blocksize;
- unsigned int rdev;
- unsigned int blocks;
- unsigned int fsid;
- unsigned int fileid;
- timeval atime;
- timeval mtime;
- timeval ctime;
-};
-.DE
-.KE
-The
-.I fattr
-structure contains the attributes of a file; "type" is the type of
-the file; "nlink" is the number of hard links to the file (the number
-of different names for the same file); "uid" is the user
-identification number of the owner of the file; "gid" is the group
-identification number of the group of the file; "size" is the size in
-bytes of the file; "blocksize" is the size in bytes of a block of the
-file; "rdev" is the device number of the file if it is type
-.I NFCHR
-or
-.I NFBLK ;
-"blocks" is the number of blocks the file takes up on disk; "fsid" is
-the file system identifier for the filesystem containing the file;
-"fileid" is a number that uniquely identifies the file within its
-filesystem; "atime" is the time when the file was last accessed for
-either read or write; "mtime" is the time when the file data was last
-modified (written); and "ctime" is the time when the status of the
-file was last changed. Writing to the file also changes "ctime" if
-the size of the file changes.
-.LP
-"mode" is the access mode encoded as a set of bits. Notice that the
-file type is specified both in the mode bits and in the file type.
-This is really a bug in the protocol and will be fixed in future
-versions. The descriptions given below specify the bit positions
-using octal numbers.
-.TS
-box tab (&) ;
-cfI cfI
-lfL l .
-Bit&Description
-_
-0040000&This is a directory; "type" field should be NFDIR.
-0020000&This is a character special file; "type" field should be NFCHR.
-0060000&This is a block special file; "type" field should be NFBLK.
-0100000&This is a regular file; "type" field should be NFREG.
-0120000&This is a symbolic link file; "type" field should be NFLNK.
-0140000&This is a named socket; "type" field should be NFNON.
-0004000&Set user id on execution.
-0002000&Set group id on execution.
-0001000&Save swapped text even after use.
-0000400&Read permission for owner.
-0000200&Write permission for owner.
-0000100&Execute and search permission for owner.
-0000040&Read permission for group.
-0000020&Write permission for group.
-0000010&Execute and search permission for group.
-0000004&Read permission for others.
-0000002&Write permission for others.
-0000001&Execute and search permission for others.
-.TE
-.KS
-Notes:
-.IP
-The bits are the same as the mode bits returned by the
-.I stat(2)
-system call in the UNIX system. The file type is specified both in
-the mode bits and in the file type. This is fixed in future
-versions.
-.IP
-The "rdev" field in the attributes structure is an operating system
-specific device specifier. It will be removed and generalized in
-the next revision of the protocol.
-.KE
-.LP
-.KS
-.NH 3
-\&sattr
-.IX "NFS data types" sattr "" \fIsattr\fP
-.DS
-struct sattr {
- unsigned int mode;
- unsigned int uid;
- unsigned int gid;
- unsigned int size;
- timeval atime;
- timeval mtime;
-};
-.DE
-.KE
-The
-.I sattr
-structure contains the file attributes which can be set
-from the client. The fields are the same as for
-.I fattr
-above. A "size" of zero means the file should be truncated.
-A value of -1 indicates a field that should be ignored.
-.LP
-.KS
-.NH 3
-\&filename
-.IX "NFS data types" filename "" \fIfilename\fP
-.DS
-typedef string filename<MAXNAMLEN>;
-.DE
-.KE
-The type
-.I filename
-is used for passing file names or pathname components.
-.LP
-.KS
-.NH 3
-\&path
-.IX "NFS data types" path "" \fIpath\fP
-.DS
-typedef string path<MAXPATHLEN>;
-.DE
-.KE
-The type
-.I path
-is a pathname. The server considers it as a string
-with no internal structure, but to the client it is the name of a
-node in a filesystem tree.
-.LP
-.KS
-.NH 3
-\&attrstat
-.IX "NFS data types" attrstat "" \fIattrstat\fP
-.DS
-union attrstat switch (stat status) {
- case NFS_OK:
- fattr attributes;
- default:
- void;
-};
-.DE
-.KE
-The
-.I attrstat
-structure is a common procedure result. It contains
-a "status" and, if the call succeeded, it also contains the
-attributes of the file on which the operation was done.
-.LP
-.KS
-.NH 3
-\&diropargs
-.IX "NFS data types" diropargs "" \fIdiropargs\fP
-.DS
-struct diropargs {
- fhandle dir;
- filename name;
-};
-.DE
-.KE
-The
-.I diropargs
-structure is used in directory operations. The
-"fhandle" "dir" is the directory in which to find the file "name".
-A directory operation is one in which the directory is affected.
-.LP
-.KS
-.NH 3
-\&diropres
-.IX "NFS data types" diropres "" \fIdiropres\fP
-.DS
-union diropres switch (stat status) {
- case NFS_OK:
- struct {
- fhandle file;
- fattr attributes;
- } diropok;
- default:
- void;
-};
-.DE
-.KE
-The results of a directory operation are returned in a
-.I diropres
-structure. If the call succeeded, a new file handle "file" and the
-"attributes" associated with that file are returned along with the
-"status".
-.NH 2
-\&Server Procedures
-.IX "NFS server procedures" "" "" "" PAGE MAJOR
-.LP
-The protocol definition is given as a set of procedures with
-arguments and results defined using the RPC language. A brief
-description of the function of each procedure should provide enough
-information to allow implementation.
-.LP
-All of the procedures in the NFS protocol are assumed to be
-synchronous. When a procedure returns to the client, the client
-can assume that the operation has completed and any data associated
-with the request is now on stable storage. For example, a client
-.I WRITE
-request may cause the server to update data blocks,
-filesystem information blocks (such as indirect blocks), and file
-attribute information (size and modify times). When the
-.I WRITE
-returns to the client, it can assume that the write is safe, even
-in case of a server crash, and it can discard the data written.
-This is a very important part of the statelessness of the server.
-If the server waited to flush data from remote requests, the client
-would have to save those requests so that it could resend them in
-case of a server crash.
-.ie t .DS
-.el .DS L
-
-.ft I
-/*
-* Remote file service routines
-*/
-.ft CW
-program NFS_PROGRAM {
- version NFS_VERSION {
- void NFSPROC_NULL(void) = 0;
- attrstat NFSPROC_GETATTR(fhandle) = 1;
- attrstat NFSPROC_SETATTR(sattrargs) = 2;
- void NFSPROC_ROOT(void) = 3;
- diropres NFSPROC_LOOKUP(diropargs) = 4;
- readlinkres NFSPROC_READLINK(fhandle) = 5;
- readres NFSPROC_READ(readargs) = 6;
- void NFSPROC_WRITECACHE(void) = 7;
- attrstat NFSPROC_WRITE(writeargs) = 8;
- diropres NFSPROC_CREATE(createargs) = 9;
- stat NFSPROC_REMOVE(diropargs) = 10;
- stat NFSPROC_RENAME(renameargs) = 11;
- stat NFSPROC_LINK(linkargs) = 12;
- stat NFSPROC_SYMLINK(symlinkargs) = 13;
- diropres NFSPROC_MKDIR(createargs) = 14;
- stat NFSPROC_RMDIR(diropargs) = 15;
- readdirres NFSPROC_READDIR(readdirargs) = 16;
- statfsres NFSPROC_STATFS(fhandle) = 17;
- } = 2;
-} = 100003;
-.DE
-.KS
-.NH 3
-\&Do Nothing
-.IX "NFS server procedures" NFSPROC_NULL() "" \fINFSPROC_NULL()\fP
-.DS
-void
-NFSPROC_NULL(void) = 0;
-.DE
-.KE
-This procedure does no work. It is made available in all RPC
-services to allow server response testing and timing.
-.KS
-.NH 3
-\&Get File Attributes
-.IX "NFS server procedures" NFSPROC_GETATTR() "" \fINFSPROC_GETATTR()\fP
-.DS
-attrstat
-NFSPROC_GETATTR (fhandle) = 1;
-.DE
-.KE
-If the reply status is
-.I NFS_OK ,
-then the reply attributes contains
-the attributes for the file given by the input fhandle.
-.KS
-.NH 3
-\&Set File Attributes
-.IX "NFS server procedures" NFSPROC_SETATTR() "" \fINFSPROC_SETATTR()\fP
-.DS
-struct sattrargs {
- fhandle file;
- sattr attributes;
- };
-
-attrstat
-NFSPROC_SETATTR (sattrargs) = 2;
-.DE
-.KE
-The "attributes" argument contains fields which are either -1 or
-are the new value for the attributes of "file". If the reply
-status is
-.I NFS_OK ,
-then the reply attributes have the attributes of
-the file after the "SETATTR" operation has completed.
-.LP
-Note: The use of -1 to indicate an unused field in "attributes" is
-changed in the next version of the protocol.
-.KS
-.NH 3
-\&Get Filesystem Root
-.IX "NFS server procedures" NFSPROC_ROOT "" \fINFSPROC_ROOT\fP
-.DS
-void
-NFSPROC_ROOT(void) = 3;
-.DE
-.KE
-Obsolete. This procedure is no longer used because finding the
-root file handle of a filesystem requires moving pathnames between
-client and server. To do this right we would have to define a
-network standard representation of pathnames. Instead, the
-function of looking up the root file handle is done by the
-.I MNTPROC_MNT()
-procedure. (See the
-.I "Mount Protocol Definition"
-later in this chapter for details).
-.KS
-.NH 3
-\&Look Up File Name
-.IX "NFS server procedures" NFSPROC_LOOKUP() "" \fINFSPROC_LOOKUP()\fP
-.DS
-diropres
-NFSPROC_LOOKUP(diropargs) = 4;
-.DE
-.KE
-If the reply "status" is
-.I NFS_OK ,
-then the reply "file" and reply
-"attributes" are the file handle and attributes for the file "name"
-in the directory given by "dir" in the argument.
-.KS
-.NH 3
-\&Read From Symbolic Link
-.IX "NFS server procedures" NFSPROC_READLINK() "" \fINFSPROC_READLINK()\fP
-.DS
-union readlinkres switch (stat status) {
- case NFS_OK:
- path data;
- default:
- void;
-};
-
-readlinkres
-NFSPROC_READLINK(fhandle) = 5;
-.DE
-.KE
-If "status" has the value
-.I NFS_OK ,
-then the reply "data" is the data in
-the symbolic link given by the file referred to by the fhandle argument.
-.LP
-Note: since NFS always parses pathnames on the client, the
-pathname in a symbolic link may mean something different (or be
-meaningless) on a different client or on the server if a different
-pathname syntax is used.
-.KS
-.NH 3
-\&Read From File
-.IX "NFS server procedures" NFSPROC_READ "" \fINFSPROC_READ\fP
-.DS
-struct readargs {
- fhandle file;
- unsigned offset;
- unsigned count;
- unsigned totalcount;
-};
-
-union readres switch (stat status) {
- case NFS_OK:
- fattr attributes;
- opaque data<NFS_MAXDATA>;
- default:
- void;
-};
-
-readres
-NFSPROC_READ(readargs) = 6;
-.DE
-.KE
-Returns up to "count" bytes of "data" from the file given by
-"file", starting at "offset" bytes from the beginning of the file.
-The first byte of the file is at offset zero. The file attributes
-after the read takes place are returned in "attributes".
-.LP
-Note: The argument "totalcount" is unused, and is removed in the
-next protocol revision.
-.KS
-.NH 3
-\&Write to Cache
-.IX "NFS server procedures" NFSPROC_WRITECACHE() "" \fINFSPROC_WRITECACHE()\fP
-.DS
-void
-NFSPROC_WRITECACHE(void) = 7;
-.DE
-.KE
-To be used in the next protocol revision.
-.KS
-.NH 3
-\&Write to File
-.IX "NFS server procedures" NFSPROC_WRITE() "" \fINFSPROC_WRITE()\fP
-.DS
-struct writeargs {
- fhandle file;
- unsigned beginoffset;
- unsigned offset;
- unsigned totalcount;
- opaque data<NFS_MAXDATA>;
-};
-
-attrstat
-NFSPROC_WRITE(writeargs) = 8;
-.DE
-.KE
-Writes "data" beginning "offset" bytes from the beginning of
-"file". The first byte of the file is at offset zero. If the
-reply "status" is NFS_OK, then the reply "attributes" contains the
-attributes of the file after the write has completed. The write
-operation is atomic. Data from this call to
-.I WRITE
-will not be mixed with data from another client's calls.
-.LP
-Note: The arguments "beginoffset" and "totalcount" are ignored and
-are removed in the next protocol revision.
-.KS
-.NH 3
-\&Create File
-.IX "NFS server procedures" NFSPROC_CREATE() "" \fINFSPROC_CREATE()\fP
-.DS
-struct createargs {
- diropargs where;
- sattr attributes;
-};
-
-diropres
-NFSPROC_CREATE(createargs) = 9;
-.DE
-.KE
-The file "name" is created in the directory given by "dir". The
-initial attributes of the new file are given by "attributes". A
-reply "status" of NFS_OK indicates that the file was created, and
-reply "file" and reply "attributes" are its file handle and
-attributes. Any other reply "status" means that the operation
-failed and no file was created.
-.LP
-Note: This routine should pass an exclusive create flag, meaning
-"create the file only if it is not already there".
-.KS
-.NH 3
-\&Remove File
-.IX "NFS server procedures" NFSPROC_REMOVE() "" \fINFSPROC_REMOVE()\fP
-.DS
-stat
-NFSPROC_REMOVE(diropargs) = 10;
-.DE
-.KE
-The file "name" is removed from the directory given by "dir". A
-reply of NFS_OK means the directory entry was removed.
-.LP
-Note: possibly non-idempotent operation.
-.KS
-.NH 3
-\&Rename File
-.IX "NFS server procedures" NFSPROC_RENAME() "" \fINFSPROC_RENAME()\fP
-.DS
-struct renameargs {
- diropargs from;
- diropargs to;
-};
-
-stat
-NFSPROC_RENAME(renameargs) = 11;
-.DE
-.KE
-The existing file "from.name" in the directory given by "from.dir"
-is renamed to "to.name" in the directory given by "to.dir". If the
-reply is
-.I NFS_OK ,
-the file was renamed. The
-RENAME
-operation is
-atomic on the server; it cannot be interrupted in the middle.
-.LP
-Note: possibly non-idempotent operation.
-.KS
-.NH 3
-\&Create Link to File
-.IX "NFS server procedures" NFSPROC_LINK() "" \fINFSPROC_LINK()\fP
-.DS
-struct linkargs {
- fhandle from;
- diropargs to;
-};
-
-stat
-NFSPROC_LINK(linkargs) = 12;
-.DE
-.KE
-Creates the file "to.name" in the directory given by "to.dir",
-which is a hard link to the existing file given by "from". If the
-return value is
-.I NFS_OK ,
-a link was created. Any other return value
-indicates an error, and the link was not created.
-.LP
-A hard link should have the property that changes to either of the
-linked files are reflected in both files. When a hard link is made
-to a file, the attributes for the file should have a value for
-"nlink" that is one greater than the value before the link.
-.LP
-Note: possibly non-idempotent operation.
-.KS
-.NH 3
-\&Create Symbolic Link
-.IX "NFS server procedures" NFSPROC_SYMLINK() "" \fINFSPROC_SYMLINK()\fP
-.DS
-struct symlinkargs {
- diropargs from;
- path to;
- sattr attributes;
-};
-
-stat
-NFSPROC_SYMLINK(symlinkargs) = 13;
-.DE
-.KE
-Creates the file "from.name" with ftype
-.I NFLNK
-in the directory
-given by "from.dir". The new file contains the pathname "to" and
-has initial attributes given by "attributes". If the return value
-is
-.I NFS_OK ,
-a link was created. Any other return value indicates an
-error, and the link was not created.
-.LP
-A symbolic link is a pointer to another file. The name given in
-"to" is not interpreted by the server, only stored in the newly
-created file. When the client references a file that is a symbolic
-link, the contents of the symbolic link are normally transparently
-reinterpreted as a pathname to substitute. A
-.I READLINK
-operation returns the data to the client for interpretation.
-.LP
-Note: On UNIX servers the attributes are never used, since
-symbolic links always have mode 0777.
-.KS
-.NH 3
-\&Create Directory
-.IX "NFS server procedures" NFSPROC_MKDIR() "" \fINFSPROC_MKDIR()\fP
-.DS
-diropres
-NFSPROC_MKDIR (createargs) = 14;
-.DE
-.KE
-The new directory "where.name" is created in the directory given by
-"where.dir". The initial attributes of the new directory are given
-by "attributes". A reply "status" of NFS_OK indicates that the new
-directory was created, and reply "file" and reply "attributes" are
-its file handle and attributes. Any other reply "status" means
-that the operation failed and no directory was created.
-.LP
-Note: possibly non-idempotent operation.
-.KS
-.NH 3
-\&Remove Directory
-.IX "NFS server procedures" NFSPROC_RMDIR() "" \fINFSPROC_RMDIR()\fP
-.DS
-stat
-NFSPROC_RMDIR(diropargs) = 15;
-.DE
-.KE
-The existing empty directory "name" in the directory given by "dir"
-is removed. If the reply is
-.I NFS_OK ,
-the directory was removed.
-.LP
-Note: possibly non-idempotent operation.
-.KS
-.NH 3
-\&Read From Directory
-.IX "NFS server procedures" NFSPROC_READDIR() "" \fINFSPROC_READDIR()\fP
-.DS
-struct readdirargs {
- fhandle dir;
- nfscookie cookie;
- unsigned count;
-};
-
-struct entry {
- unsigned fileid;
- filename name;
- nfscookie cookie;
- entry *nextentry;
-};
-
-union readdirres switch (stat status) {
- case NFS_OK:
- struct {
- entry *entries;
- bool eof;
- } readdirok;
- default:
- void;
-};
-
-readdirres
-NFSPROC_READDIR (readdirargs) = 16;
-.DE
-.KE
-Returns a variable number of directory entries, with a total size
-of up to "count" bytes, from the directory given by "dir". If the
-returned value of "status" is
-.I NFS_OK ,
-then it is followed by a
-variable number of "entry"s. Each "entry" contains a "fileid"
-which consists of a unique number to identify the file within a
-filesystem, the "name" of the file, and a "cookie" which is an
-opaque pointer to the next entry in the directory. The cookie is
-used in the next
-.I READDIR
-call to get more entries starting at a
-given point in the directory. The special cookie zero (all bits
-zero) can be used to get the entries starting at the beginning of
-the directory. The "fileid" field should be the same number as the
-"fileid" in the the attributes of the file. (See the
-.I "Basic Data Types"
-section.)
-The "eof" flag has a value of
-.I TRUE
-if there are no more entries in the directory.
-.KS
-.NH 3
-\&Get Filesystem Attributes
-.IX "NFS server procedures" NFSPROC_STATFS() "" \fINFSPROC_STATFS()\fP
-.DS
-union statfsres (stat status) {
- case NFS_OK:
- struct {
- unsigned tsize;
- unsigned bsize;
- unsigned blocks;
- unsigned bfree;
- unsigned bavail;
- } info;
- default:
- void;
-};
-
-statfsres
-NFSPROC_STATFS(fhandle) = 17;
-.DE
-.KE
-If the reply "status" is
-.I NFS_OK ,
-then the reply "info" gives the
-attributes for the filesystem that contains file referred to by the
-input fhandle. The attribute fields contain the following values:
-.IP tsize:
-The optimum transfer size of the server in bytes. This is
-the number of bytes the server would like to have in the
-data part of READ and WRITE requests.
-.IP bsize:
-The block size in bytes of the filesystem.
-.IP blocks:
-The total number of "bsize" blocks on the filesystem.
-.IP bfree:
-The number of free "bsize" blocks on the filesystem.
-.IP bavail:
-The number of "bsize" blocks available to non-privileged users.
-.LP
-Note: This call does not work well if a filesystem has variable
-size blocks.
-.NH 1
-\&NFS Implementation Issues
-.IX NFS implementation
-.LP
-The NFS protocol is designed to be operating system independent, but
-since this version was designed in a UNIX environment, many
-operations have semantics similar to the operations of the UNIX file
-system. This section discusses some of the implementation-specific
-semantic issues.
-.NH 2
-\&Server/Client Relationship
-.IX NFS "server/client relationship"
-.LP
-The NFS protocol is designed to allow servers to be as simple and
-general as possible. Sometimes the simplicity of the server can be a
-problem, if the client wants to implement complicated filesystem
-semantics.
-.LP
-For example, some operating systems allow removal of open files. A
-process can open a file and, while it is open, remove it from the
-directory. The file can be read and written as long as the process
-keeps it open, even though the file has no name in the filesystem.
-It is impossible for a stateless server to implement these semantics.
-The client can do some tricks such as renaming the file on remove,
-and only removing it on close. We believe that the server provides
-enough functionality to implement most file system semantics on the
-client.
-.LP
-Every NFS client can also potentially be a server, and remote and
-local mounted filesystems can be freely intermixed. This leads to
-some interesting problems when a client travels down the directory
-tree of a remote filesystem and reaches the mount point on the server
-for another remote filesystem. Allowing the server to follow the
-second remote mount would require loop detection, server lookup, and
-user revalidation. Instead, we decided not to let clients cross a
-server's mount point. When a client does a LOOKUP on a directory on
-which the server has mounted a filesystem, the client sees the
-underlying directory instead of the mounted directory. A client can
-do remote mounts that match the server's mount points to maintain the
-server's view.
-.LP
-.NH 2
-\&Pathname Interpretation
-.IX NFS "pathname interpretation"
-.LP
-There are a few complications to the rule that pathnames are always
-parsed on the client. For example, symbolic links could have
-different interpretations on different clients. Another common
-problem for non-UNIX implementations is the special interpretation of
-the pathname ".." to mean the parent of a given directory. The next
-revision of the protocol uses an explicit flag to indicate the parent
-instead.
-.NH 2
-\&Permission Issues
-.IX NFS "permission issues"
-.LP
-The NFS protocol, strictly speaking, does not define the permission
-checking used by servers. However, it is expected that a server
-will do normal operating system permission checking using
-.I AUTH_UNIX
-style authentication as the basis of its protection mechanism. The
-server gets the client's effective "uid", effective "gid", and groups
-on each call and uses them to check permission. There are various
-problems with this method that can been resolved in interesting ways.
-.LP
-Using "uid" and "gid" implies that the client and server share the
-same "uid" list. Every server and client pair must have the same
-mapping from user to "uid" and from group to "gid". Since every
-client can also be a server, this tends to imply that the whole
-network shares the same "uid/gid" space.
-.I AUTH_DES
-(and the next
-revision of the NFS protocol) uses string names instead of numbers,
-but there are still complex problems to be solved.
-.LP
-Another problem arises due to the usually stateful open operation.
-Most operating systems check permission at open time, and then check
-that the file is open on each read and write request. With stateless
-servers, the server has no idea that the file is open and must do
-permission checking on each read and write call. On a local
-filesystem, a user can open a file and then change the permissions so
-that no one is allowed to touch it, but will still be able to write
-to the file because it is open. On a remote filesystem, by contrast,
-the write would fail. To get around this problem, the server's
-permission checking algorithm should allow the owner of a file to
-access it regardless of the permission setting.
-.LP
-A similar problem has to do with paging in from a file over the
-network. The operating system usually checks for execute permission
-before opening a file for demand paging, and then reads blocks from
-the open file. The file may not have read permission, but after it
-is opened it doesn't matter. An NFS server can not tell the
-difference between a normal file read and a demand page-in read. To
-make this work, the server allows reading of files if the "uid" given
-in the call has execute or read permission on the file.
-.LP
-In most operating systems, a particular user (on the user ID zero)
-has access to all files no matter what permission and ownership they
-have. This "super-user" permission may not be allowed on the server,
-since anyone who can become super-user on their workstation could
-gain access to all remote files. The UNIX server by default maps
-user id 0 to -2 before doing its access checking. This works except
-for NFS root filesystems, where super-user access cannot be avoided.
-.NH 2
-\&Setting RPC Parameters
-.IX NFS "setting RPC parameters"
-.LP
-Various file system parameters and options should be set at mount
-time. The mount protocol is described in the appendix below. For
-example, "Soft" mounts as well as "Hard" mounts are usually both
-provided. Soft mounted file systems return errors when RPC
-operations fail (after a given number of optional retransmissions),
-while hard mounted file systems continue to retransmit forever.
-Clients and servers may need to keep caches of recent operations to
-help avoid problems with non-idempotent operations.
-.NH 1
-\&Mount Protocol Definition
-.IX "mount protocol" "" "" "" PAGE MAJOR
-.sp 1
-.NH 2
-\&Introduction
-.IX "mount protocol" introduction
-.LP
-The mount protocol is separate from, but related to, the NFS
-protocol. It provides operating system specific services to get the
-NFS off the ground -- looking up server path names, validating user
-identity, and checking access permissions. Clients use the mount
-protocol to get the first file handle, which allows them entry into a
-remote filesystem.
-.LP
-The mount protocol is kept separate from the NFS protocol to make it
-easy to plug in new access checking and validation methods without
-changing the NFS server protocol.
-.LP
-Notice that the protocol definition implies stateful servers because
-the server maintains a list of client's mount requests. The mount
-list information is not critical for the correct functioning of
-either the client or the server. It is intended for advisory use
-only, for example, to warn possible clients when a server is going
-down.
-.LP
-Version one of the mount protocol is used with version two of the NFS
-protocol. The only connecting point is the
-.I fhandle
-structure, which is the same for both protocols.
-.NH 2
-\&RPC Information
-.IX "mount protocol" "RPC information"
-.IP \fIAuthentication\fP
-The mount service uses
-.I AUTH_UNIX
-and
-.I AUTH_DES
-style authentication only.
-.IP "\fITransport Protocols\fP"
-The mount service is currently supported on UDP/IP only.
-.IP "\fIPort Number\fP"
-Consult the server's portmapper, described in the chapter
-.I "Remote Procedure Calls: Protocol Specification",
-to find the port number on which the mount service is registered.
-.NH 2
-\&Sizes of XDR Structures
-.IX "mount protocol" "XDR structure sizes"
-.LP
-These are the sizes, given in decimal bytes, of various XDR
-structures used in the protocol:
-.DS
-/* \fIThe maximum number of bytes in a pathname argument\fP */
-const MNTPATHLEN = 1024;
-
-/* \fIThe maximum number of bytes in a name argument\fP */
-const MNTNAMLEN = 255;
-
-/* \fIThe size in bytes of the opaque file handle\fP */
-const FHSIZE = 32;
-.DE
-.NH 2
-\&Basic Data Types
-.IX "mount protocol" "basic data types"
-.IX "mount data types"
-.LP
-This section presents the data types used by the mount protocol.
-In many cases they are similar to the types used in NFS.
-.KS
-.NH 3
-\&fhandle
-.IX "mount data types" fhandle "" \fIfhandle\fP
-.DS
-typedef opaque fhandle[FHSIZE];
-.DE
-.KE
-The type
-.I fhandle
-is the file handle that the server passes to the
-client. All file operations are done using file handles to refer
-to a file or directory. The file handle can contain whatever
-information the server needs to distinguish an individual file.
-.LP
-This is the same as the "fhandle" XDR definition in version 2 of
-the NFS protocol; see
-.I "Basic Data Types"
-in the definition of the NFS protocol, above.
-.KS
-.NH 3
-\&fhstatus
-.IX "mount data types" fhstatus "" \fIfhstatus\fP
-.DS
-union fhstatus switch (unsigned status) {
- case 0:
- fhandle directory;
- default:
- void;
-};
-.DE
-.KE
-The type
-.I fhstatus
-is a union. If a "status" of zero is returned,
-the call completed successfully, and a file handle for the
-"directory" follows. A non-zero status indicates some sort of
-error. In this case the status is a UNIX error number.
-.KS
-.NH 3
-\&dirpath
-.IX "mount data types" dirpath "" \fIdirpath\fP
-.DS
-typedef string dirpath<MNTPATHLEN>;
-.DE
-.KE
-The type
-.I dirpath
-is a server pathname of a directory.
-.KS
-.NH 3
-\&name
-.IX "mount data types" name "" \fIname\fP
-.DS
-typedef string name<MNTNAMLEN>;
-.DE
-.KE
-The type
-.I name
-is an arbitrary string used for various names.
-.NH 2
-\&Server Procedures
-.IX "mount server procedures"
-.LP
-The following sections define the RPC procedures supplied by a
-mount server.
-.ie t .DS
-.el .DS L
-.ft I
-/*
-* Protocol description for the mount program
-*/
-.ft CW
-
-program MOUNTPROG {
-.ft I
-/*
-* Version 1 of the mount protocol used with
-* version 2 of the NFS protocol.
-*/
-.ft CW
- version MOUNTVERS {
- void MOUNTPROC_NULL(void) = 0;
- fhstatus MOUNTPROC_MNT(dirpath) = 1;
- mountlist MOUNTPROC_DUMP(void) = 2;
- void MOUNTPROC_UMNT(dirpath) = 3;
- void MOUNTPROC_UMNTALL(void) = 4;
- exportlist MOUNTPROC_EXPORT(void) = 5;
- } = 1;
-} = 100005;
-.DE
-.KS
-.NH 3
-\&Do Nothing
-.IX "mount server procedures" MNTPROC_NULL() "" \fIMNTPROC_NULL()\fP
-.DS
-void
-MNTPROC_NULL(void) = 0;
-.DE
-.KE
-This procedure does no work. It is made available in all RPC
-services to allow server response testing and timing.
-.KS
-.NH 3
-\&Add Mount Entry
-.IX "mount server procedures" MNTPROC_MNT() "" \fIMNTPROC_MNT()\fP
-.DS
-fhstatus
-MNTPROC_MNT(dirpath) = 1;
-.DE
-.KE
-If the reply "status" is 0, then the reply "directory" contains the
-file handle for the directory "dirname". This file handle may be
-used in the NFS protocol. This procedure also adds a new entry to
-the mount list for this client mounting "dirname".
-.KS
-.NH 3
-\&Return Mount Entries
-.IX "mount server procedures" MNTPROC_DUMP() "" \fIMNTPROC_DUMP()\fP
-.DS
-struct *mountlist {
- name hostname;
- dirpath directory;
- mountlist nextentry;
-};
-
-mountlist
-MNTPROC_DUMP(void) = 2;
-.DE
-.KE
-Returns the list of remote mounted filesystems. The "mountlist"
-contains one entry for each "hostname" and "directory" pair.
-.KS
-.NH 3
-\&Remove Mount Entry
-.IX "mount server procedures" MNTPROC_UMNT() "" \fIMNTPROC_UMNT()\fP
-.DS
-void
-MNTPROC_UMNT(dirpath) = 3;
-.DE
-.KE
-Removes the mount list entry for the input "dirpath".
-.KS
-.NH 3
-\&Remove All Mount Entries
-.IX "mount server procedures" MNTPROC_UMNTALL() "" \fIMNTPROC_UMNTALL()\fP
-.DS
-void
-MNTPROC_UMNTALL(void) = 4;
-.DE
-.KE
-Removes all of the mount list entries for this client.
-.KS
-.NH 3
-\&Return Export List
-.IX "mount server procedures" MNTPROC_EXPORT() "" \fIMNTPROC_EXPORT()\fP
-.DS
-struct *groups {
- name grname;
- groups grnext;
-};
-
-struct *exportlist {
- dirpath filesys;
- groups groups;
- exportlist next;
-};
-
-exportlist
-MNTPROC_EXPORT(void) = 5;
-.DE
-.KE
-Returns a variable number of export list entries. Each entry
-contains a filesystem name and a list of groups that are allowed to
-import it. The filesystem name is in "filesys", and the group name
-is in the list "groups".
-.LP
-Note: The exportlist should contain
-more information about the status of the filesystem, such as a
-read-only flag.
diff --git a/lib/libc/rpc/PSD.doc/rpc.prog.ms b/lib/libc/rpc/PSD.doc/rpc.prog.ms
deleted file mode 100644
index 3b02447..0000000
--- a/lib/libc/rpc/PSD.doc/rpc.prog.ms
+++ /dev/null
@@ -1,2684 +0,0 @@
-.\"
-.\" Must use -- tbl and pic -- with this one
-.\"
-.\" @(#)rpc.prog.ms 2.3 88/08/11 4.0 RPCSRC
-.de BT
-.if \\n%=1 .tl ''- % -''
-..
-.IX "Network Programming" "" "" "" PAGE MAJOR
-.nr OF 0
-.ND
-.\" prevent excess underlining in nroff
-.if n .fp 2 R
-.OH 'Remote Procedure Call Programming Guide''Page %'
-.EH 'Page %''Remote Procedure Call Programming Guide'
-.SH
-\&Remote Procedure Call Programming Guide
-.nr OF 1
-.IX "RPC Programming Guide"
-.LP
-This document assumes a working knowledge of network theory. It is
-intended for programmers who wish to write network applications using
-remote procedure calls (explained below), and who want to understand
-the RPC mechanisms usually hidden by the
-.I rpcgen(1)
-protocol compiler.
-.I rpcgen
-is described in detail in the previous chapter, the
-.I "\fBrpcgen\fP \fIProgramming Guide\fP".
-.SH
-Note:
-.I
-.IX rpcgen "" \fIrpcgen\fP
-Before attempting to write a network application, or to convert an
-existing non-network application to run over the network, you may want to
-understand the material in this chapter. However, for most applications,
-you can circumvent the need to cope with the details presented here by using
-.I rpcgen .
-The
-.I "Generating XDR Routines"
-section of that chapter contains the complete source for a working RPC
-service\(ema remote directory listing service which uses
-.I rpcgen
-to generate XDR routines as well as client and server stubs.
-.LP
-.LP
-What are remote procedure calls? Simply put, they are the high-level
-communications paradigm used in the operating system.
-RPC presumes the existence of
-low-level networking mechanisms (such as TCP/IP and UDP/IP), and upon them
-it implements a logical client to server communications system designed
-specifically for the support of network applications. With RPC, the client
-makes a procedure call to send a data packet to the server. When the
-packet arrives, the server calls a dispatch routine, performs whatever
-service is requested, sends back the reply, and the procedure call returns
-to the client.
-.NH 0
-\&Layers of RPC
-.IX "layers of RPC"
-.IX "RPC" "layers"
-.LP
-The RPC interface can be seen as being divided into three layers.\**
-.FS
-For a complete specification of the routines in the remote procedure
-call Library, see the
-.I rpc(3N)
-manual page.
-.FE
-.LP
-.I "The Highest Layer:"
-.IX RPC "The Highest Layer"
-The highest layer is totally transparent to the operating system,
-machine and network upon which is is run. It's probably best to
-think of this level as a way of
-.I using
-RPC, rather than as
-a \fIpart of\fP RPC proper. Programmers who write RPC routines
-should (almost) always make this layer available to others by way
-of a simple C front end that entirely hides the networking.
-.LP
-To illustrate, at this level a program can simply make a call to
-.I rnusers (),
-a C routine which returns the number of users on a remote machine.
-The user is not explicitly aware of using RPC \(em they simply
-call a procedure, just as they would call
-.I malloc() .
-.LP
-.I "The Middle Layer:"
-.IX RPC "The Middle Layer"
-The middle layer is really \*QRPC proper.\*U Here, the user doesn't
-need to consider details about sockets, the UNIX system, or other low-level
-implementation mechanisms. They simply make remote procedure calls
-to routines on other machines. The selling point here is simplicity.
-It's this layer that allows RPC to pass the \*Qhello world\*U test \(em
-simple things should be simple. The middle-layer routines are used
-for most applications.
-.LP
-RPC calls are made with the system routines
-.I registerrpc()
-.I callrpc()
-and
-.I svc_run ().
-The first two of these are the most fundamental:
-.I registerrpc()
-obtains a unique system-wide procedure-identification number, and
-.I callrpc()
-actually executes a remote procedure call. At the middle level, a
-call to
-.I rnusers()
-is implemented by way of these two routines.
-.LP
-The middle layer is unfortunately rarely used in serious programming
-due to its inflexibility (simplicity). It does not allow timeout
-specifications or the choice of transport. It allows no UNIX
-process control or flexibility in case of errors. It doesn't support
-multiple kinds of call authentication. The programmer rarely needs
-all these kinds of control, but one or two of them is often necessary.
-.LP
-.I "The Lowest Layer:"
-.IX RPC "The Lowest Layer"
-The lowest layer does allow these details to be controlled by the
-programmer, and for that reason it is often necessary. Programs
-written at this level are also most efficient, but this is rarely a
-real issue \(em since RPC clients and servers rarely generate
-heavy network loads.
-.LP
-Although this document only discusses the interface to C,
-remote procedure calls can be made from any language.
-Even though this document discusses RPC
-when it is used to communicate
-between processes on different machines,
-it works just as well for communication
-between different processes on the same machine.
-.br
-.KS
-.NH 2
-\&The RPC Paradigm
-.IX RPC paradigm
-.LP
-Here is a diagram of the RPC paradigm:
-.LP
-\fBFigure 1-1\fI Network Communication with the Remote Reocedure Call\fR
-.LP
-.PS
-L1: arrow down 1i "client " rjust "program " rjust
-L2: line right 1.5i "\fIcallrpc\fP" "function"
-move up 1.5i; line dotted down 6i; move up 4.5i
-arrow right 1i
-L3: arrow down 1i "invoke " rjust "service " rjust
-L4: arrow right 1.5i "call" "service"
-L5: arrow down 1i " service" ljust " executes" ljust
-L6: arrow left 1.5i "\fIreturn\fP" "answer"
-L7: arrow down 1i "request " rjust "completed " rjust
-L8: line left 1i
-arrow left 1.5i "\fIreturn\fP" "reply"
-L9: arrow down 1i "program " rjust "continues " rjust
-line dashed down from L2 to L9
-line dashed down from L4 to L7
-line dashed up 1i from L3 "service " rjust "daemon " rjust
-arrow dashed down 1i from L8
-move right 1i from L3
-box invis "Machine B"
-move left 1.2i from L2; move down
-box invis "Machine A"
-.PE
-.KE
-.KS
-.NH 1
-\&Higher Layers of RPC
-.NH 2
-\&Highest Layer
-.IX "highest layer of RPC"
-.IX RPC "highest layer"
-.LP
-Imagine you're writing a program that needs to know
-how many users are logged into a remote machine.
-You can do this by calling the RPC library routine
-.I rnusers()
-as illustrated below:
-.ie t .DS
-.el .DS L
-.ft CW
-#include <stdio.h>
-
-main(argc, argv)
- int argc;
- char **argv;
-{
- int num;
-
- if (argc != 2) {
- fprintf(stderr, "usage: rnusers hostname\en");
- exit(1);
- }
- if ((num = rnusers(argv[1])) < 0) {
- fprintf(stderr, "error: rnusers\en");
- exit(-1);
- }
- printf("%d users on %s\en", num, argv[1]);
- exit(0);
-}
-.DE
-.KE
-RPC library routines such as
-.I rnusers()
-are in the RPC services library
-.I librpcsvc.a
-Thus, the program above should be compiled with
-.DS
-.ft CW
-% cc \fIprogram.c -lrpcsvc\fP
-.DE
-.I rnusers (),
-like the other RPC library routines, is documented in section 3R
-of the
-.I "System Interface Manual for the Sun Workstation" ,
-the same section which documents the standard Sun RPC services.
-.IX "RPC Services"
-See the
-.I intro(3R)
-manual page for an explanation of the documentation strategy
-for these services and their RPC protocols.
-.LP
-Here are some of the RPC service library routines available to the
-C programmer:
-.LP
-\fBTable 3-3\fI RPC Service Library Routines\RP
-.TS
-box tab (&) ;
-cfI cfI
-lfL l .
-Routine&Description
-_
-.sp.5
-rnusers&Return number of users on remote machine
-rusers&Return information about users on remote machine
-havedisk&Determine if remote machine has disk
-rstats&Get performance data from remote kernel
-rwall&Write to specified remote machines
-yppasswd&Update user password in Yellow Pages
-.TE
-.LP
-Other RPC services \(em for example
-.I ether()
-.I mount
-.I rquota()
-and
-.I spray
-\(em are not available to the C programmer as library routines.
-They do, however,
-have RPC program numbers so they can be invoked with
-.I callrpc()
-which will be discussed in the next section. Most of them also
-have compilable
-.I rpcgen(1)
-protocol description files. (The
-.I rpcgen
-protocol compiler radically simplifies the process of developing
-network applications.
-See the \fBrpcgen\fI Programming Guide\fR
-for detailed information about
-.I rpcgen
-and
-.I rpcgen
-protocol description files).
-.KS
-.NH 2
-\&Intermediate Layer
-.IX "intermediate layer of RPC"
-.IX "RPC" "intermediate layer"
-.LP
-The simplest interface, which explicitly makes RPC calls, uses the
-functions
-.I callrpc()
-and
-.I registerrpc()
-Using this method, the number of remote users can be gotten as follows:
-.ie t .DS
-.el .DS L
-#include <stdio.h>
-#include <rpc/rpc.h>
-#include <utmp.h>
-#include <rpcsvc/rusers.h>
-
-main(argc, argv)
- int argc;
- char **argv;
-{
- unsigned long nusers;
- int stat;
-
- if (argc != 2) {
- fprintf(stderr, "usage: nusers hostname\en");
- exit(-1);
- }
- if (stat = callrpc(argv[1],
- RUSERSPROG, RUSERSVERS, RUSERSPROC_NUM,
- xdr_void, 0, xdr_u_long, &nusers) != 0) {
- clnt_perrno(stat);
- exit(1);
- }
- printf("%d users on %s\en", nusers, argv[1]);
- exit(0);
-}
-.DE
-.KE
-Each RPC procedure is uniquely defined by a program number,
-version number, and procedure number. The program number
-specifies a group of related remote procedures, each of
-which has a different procedure number. Each program also
-has a version number, so when a minor change is made to a
-remote service (adding a new procedure, for example), a new
-program number doesn't have to be assigned. When you want
-to call a procedure to find the number of remote users, you
-look up the appropriate program, version and procedure numbers
-in a manual, just as you look up the name of a memory allocator
-when you want to allocate memory.
-.LP
-The simplest way of making remote procedure calls is with the the RPC
-library routine
-.I callrpc()
-It has eight parameters. The first is the name of the remote server
-machine. The next three parameters are the program, version, and procedure
-numbers\(emtogether they identify the procedure to be called.
-The fifth and sixth parameters are an XDR filter and an argument to
-be encoded and passed to the remote procedure.
-The final two parameters are a filter for decoding the results
-returned by the remote procedure and a pointer to the place where
-the procedure's results are to be stored. Multiple arguments and
-results are handled by embedding them in structures. If
-.I callrpc()
-completes successfully, it returns zero; else it returns a nonzero
-value. The return codes (of type
-.IX "enum clnt_stat (in RPC programming)" "" "\fIenum clnt_stat\fP (in RPC programming)"
-cast into an integer) are found in
-.I <rpc/clnt.h> .
-.LP
-Since data types may be represented differently on different machines,
-.I callrpc()
-needs both the type of the RPC argument, as well as
-a pointer to the argument itself (and similarly for the result). For
-.I RUSERSPROC_NUM ,
-the return value is an
-.I "unsigned long"
-so
-.I callrpc()
-has
-.I xdr_u_long()
-as its first return parameter, which says
-that the result is of type
-.I "unsigned long"
-and
-.I &nusers
-as its second return parameter,
-which is a pointer to where the long result will be placed. Since
-.I RUSERSPROC_NUM
-takes no argument, the argument parameter of
-.I callrpc()
-is
-.I xdr_void ().
-.LP
-After trying several times to deliver a message, if
-.I callrpc()
-gets no answer, it returns with an error code.
-The delivery mechanism is UDP,
-which stands for User Datagram Protocol.
-Methods for adjusting the number of retries
-or for using a different protocol require you to use the lower
-layer of the RPC library, discussed later in this document.
-The remote server procedure
-corresponding to the above might look like this:
-.ie t .DS
-.el .DS L
-.ft CW
-.ft CW
-char *
-nuser(indata)
- char *indata;
-{
- unsigned long nusers;
-
-.ft I
- /*
- * Code here to compute the number of users
- * and place result in variable \fInusers\fP.
- */
-.ft CW
- return((char *)&nusers);
-}
-.DE
-.LP
-It takes one argument, which is a pointer to the input
-of the remote procedure call (ignored in our example),
-and it returns a pointer to the result.
-In the current version of C,
-character pointers are the generic pointers,
-so both the input argument and the return value are cast to
-.I "char *" .
-.LP
-Normally, a server registers all of the RPC calls it plans
-to handle, and then goes into an infinite loop waiting to service requests.
-In this example, there is only a single procedure
-to register, so the main body of the server would look like this:
-.ie t .DS
-.el .DS L
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h>
-#include <utmp.h>
-#include <rpcsvc/rusers.h>
-
-char *nuser();
-
-main()
-{
- registerrpc(RUSERSPROG, RUSERSVERS, RUSERSPROC_NUM,
- nuser, xdr_void, xdr_u_long);
- svc_run(); /* \fINever returns\fP */
- fprintf(stderr, "Error: svc_run returned!\en");
- exit(1);
-}
-.DE
-.LP
-The
-.I registerrpc()
-routine registers a C procedure as corresponding to a
-given RPC procedure number. The first three parameters,
-.I RUSERPROG ,
-.I RUSERSVERS ,
-and
-.I RUSERSPROC_NUM
-are the program, version, and procedure numbers
-of the remote procedure to be registered;
-.I nuser()
-is the name of the local procedure that implements the remote
-procedure; and
-.I xdr_void()
-and
-.I xdr_u_long()
-are the XDR filters for the remote procedure's arguments and
-results, respectively. (Multiple arguments or multiple results
-are passed as structures).
-.LP
-Only the UDP transport mechanism can use
-.I registerrpc()
-thus, it is always safe in conjunction with calls generated by
-.I callrpc() .
-.SH
-.IX "UDP 8K warning"
-Warning: the UDP transport mechanism can only deal with
-arguments and results less than 8K bytes in length.
-.LP
-.LP
-After registering the local procedure, the server program's
-main procedure calls
-.I svc_run (),
-the RPC library's remote procedure dispatcher. It is this
-function that calls the remote procedures in response to RPC
-call messages. Note that the dispatcher takes care of decoding
-remote procedure arguments and encoding results, using the XDR
-filters specified when the remote procedure was registered.
-.NH 2
-\&Assigning Program Numbers
-.IX "program number assignment"
-.IX "assigning program numbers"
-.LP
-Program numbers are assigned in groups of
-.I 0x20000000
-according to the following chart:
-.DS
-.ft CW
- 0x0 - 0x1fffffff \fRDefined by Sun\fP
-0x20000000 - 0x3fffffff \fRDefined by user\fP
-0x40000000 - 0x5fffffff \fRTransient\fP
-0x60000000 - 0x7fffffff \fRReserved\fP
-0x80000000 - 0x9fffffff \fRReserved\fP
-0xa0000000 - 0xbfffffff \fRReserved\fP
-0xc0000000 - 0xdfffffff \fRReserved\fP
-0xe0000000 - 0xffffffff \fRReserved\fP
-.ft R
-.DE
-Sun Microsystems administers the first group of numbers, which
-should be identical for all Sun customers. If a customer
-develops an application that might be of general interest, that
-application should be given an assigned number in the first
-range. The second group of numbers is reserved for specific
-customer applications. This range is intended primarily for
-debugging new programs. The third group is reserved for
-applications that generate program numbers dynamically. The
-final groups are reserved for future use, and should not be
-used.
-.LP
-To register a protocol specification, send a request by network
-mail to
-.I rpc@sun
-or write to:
-.DS
-RPC Administrator
-Sun Microsystems
-2550 Garcia Ave.
-Mountain View, CA 94043
-.DE
-Please include a compilable
-.I rpcgen
-\*Q.x\*U file describing your protocol.
-You will be given a unique program number in return.
-.IX RPC administration
-.IX administration "of RPC"
-.LP
-The RPC program numbers and protocol specifications
-of standard Sun RPC services can be
-found in the include files in
-.I "/usr/include/rpcsvc" .
-These services, however, constitute only a small subset
-of those which have been registered. The complete list of
-registered programs, as of the time when this manual was
-printed, is:
-.LP
-\fBTable 3-2\fI RPC Registered Programs\fR
-.TS H
-box tab (&) ;
-lfBI lfBI lfBI
-lfL lfL lfI .
-RPC Number&Program&Description
-_
-.TH
-.sp.5
-100000&PMAPPROG&portmapper
-100001&RSTATPROG&remote stats
-100002&RUSERSPROG&remote users
-100003&NFSPROG&nfs
-100004&YPPROG&Yellow Pages
-100005&MOUNTPROG&mount demon
-100006&DBXPROG&remote dbx
-100007&YPBINDPROG&yp binder
-100008&WALLPROG&shutdown msg
-100009&YPPASSWDPROG&yppasswd server
-100010&ETHERSTATPROG&ether stats
-100011&RQUOTAPROG&disk quotas
-100012&SPRAYPROG&spray packets
-100013&IBM3270PROG&3270 mapper
-100014&IBMRJEPROG&RJE mapper
-100015&SELNSVCPROG&selection service
-100016&RDATABASEPROG&remote database access
-100017&REXECPROG&remote execution
-100018&ALICEPROG&Alice Office Automation
-100019&SCHEDPROG&scheduling service
-100020&LOCKPROG&local lock manager
-100021&NETLOCKPROG&network lock manager
-100022&X25PROG&x.25 inr protocol
-100023&STATMON1PROG&status monitor 1
-100024&STATMON2PROG&status monitor 2
-100025&SELNLIBPROG&selection library
-100026&BOOTPARAMPROG&boot parameters service
-100027&MAZEPROG&mazewars game
-100028&YPUPDATEPROG&yp update
-100029&KEYSERVEPROG&key server
-100030&SECURECMDPROG&secure login
-100031&NETFWDIPROG&nfs net forwarder init
-100032&NETFWDTPROG&nfs net forwarder trans
-100033&SUNLINKMAP_PROG&sunlink MAP
-100034&NETMONPROG&network monitor
-100035&DBASEPROG&lightweight database
-100036&PWDAUTHPROG&password authorization
-100037&TFSPROG&translucent file svc
-100038&NSEPROG&nse server
-100039&NSE_ACTIVATE_PROG&nse activate daemon
-.sp .2i
-150001&PCNFSDPROG&pc passwd authorization
-.sp .2i
-200000&PYRAMIDLOCKINGPROG&Pyramid-locking
-200001&PYRAMIDSYS5&Pyramid-sys5
-200002&CADDS_IMAGE&CV cadds_image
-.sp .2i
-300001&ADT_RFLOCKPROG&ADT file locking
-.TE
-.NH 2
-\&Passing Arbitrary Data Types
-.IX "arbitrary data types"
-.LP
-In the previous example, the RPC call passes a single
-.I "unsigned long"
-RPC can handle arbitrary data structures, regardless of
-different machines' byte orders or structure layout conventions,
-by always converting them to a network standard called
-.I "External Data Representation"
-(XDR) before
-sending them over the wire.
-The process of converting from a particular machine representation
-to XDR format is called
-.I serializing ,
-and the reverse process is called
-.I deserializing .
-The type field parameters of
-.I callrpc()
-and
-.I registerrpc()
-can be a built-in procedure like
-.I xdr_u_long()
-in the previous example, or a user supplied one.
-XDR has these built-in type routines:
-.IX RPC "built-in routines"
-.DS
-.ft CW
-xdr_int() xdr_u_int() xdr_enum()
-xdr_long() xdr_u_long() xdr_bool()
-xdr_short() xdr_u_short() xdr_wrapstring()
-xdr_char() xdr_u_char()
-.DE
-Note that the routine
-.I xdr_string()
-exists, but cannot be used with
-.I callrpc()
-and
-.I registerrpc (),
-which only pass two parameters to their XDR routines.
-.I xdr_wrapstring()
-has only two parameters, and is thus OK. It calls
-.I xdr_string ().
-.LP
-As an example of a user-defined type routine,
-if you wanted to send the structure
-.DS
-.ft CW
-struct simple {
- int a;
- short b;
-} simple;
-.DE
-then you would call
-.I callrpc()
-as
-.DS
-.ft CW
-callrpc(hostname, PROGNUM, VERSNUM, PROCNUM,
- xdr_simple, &simple ...);
-.DE
-where
-.I xdr_simple()
-is written as:
-.ie t .DS
-.el .DS L
-.ft CW
-#include <rpc/rpc.h>
-
-xdr_simple(xdrsp, simplep)
- XDR *xdrsp;
- struct simple *simplep;
-{
- if (!xdr_int(xdrsp, &simplep->a))
- return (0);
- if (!xdr_short(xdrsp, &simplep->b))
- return (0);
- return (1);
-}
-.DE
-.LP
-An XDR routine returns nonzero (true in the sense of C) if it
-completes successfully, and zero otherwise.
-A complete description of XDR is in the
-.I "XDR Protocol Specification"
-section of this manual, only few implementation examples are
-given here.
-.LP
-In addition to the built-in primitives,
-there are also the prefabricated building blocks:
-.DS
-.ft CW
-xdr_array() xdr_bytes() xdr_reference()
-xdr_vector() xdr_union() xdr_pointer()
-xdr_string() xdr_opaque()
-.DE
-To send a variable array of integers,
-you might package them up as a structure like this
-.DS
-.ft CW
-struct varintarr {
- int *data;
- int arrlnth;
-} arr;
-.DE
-and make an RPC call such as
-.DS
-.ft CW
-callrpc(hostname, PROGNUM, VERSNUM, PROCNUM,
- xdr_varintarr, &arr...);
-.DE
-with
-.I xdr_varintarr()
-defined as:
-.ie t .DS
-.el .DS L
-.ft CW
-xdr_varintarr(xdrsp, arrp)
- XDR *xdrsp;
- struct varintarr *arrp;
-{
- return (xdr_array(xdrsp, &arrp->data, &arrp->arrlnth,
- MAXLEN, sizeof(int), xdr_int));
-}
-.DE
-This routine takes as parameters the XDR handle,
-a pointer to the array, a pointer to the size of the array,
-the maximum allowable array size,
-the size of each array element,
-and an XDR routine for handling each array element.
-.KS
-.LP
-If the size of the array is known in advance, one can use
-.I xdr_vector (),
-which serializes fixed-length arrays.
-.ie t .DS
-.el .DS L
-.ft CW
-int intarr[SIZE];
-
-xdr_intarr(xdrsp, intarr)
- XDR *xdrsp;
- int intarr[];
-{
- int i;
-
- return (xdr_vector(xdrsp, intarr, SIZE, sizeof(int),
- xdr_int));
-}
-.DE
-.KE
-.LP
-XDR always converts quantities to 4-byte multiples when serializing.
-Thus, if either of the examples above involved characters
-instead of integers, each character would occupy 32 bits.
-That is the reason for the XDR routine
-.I xdr_bytes()
-which is like
-.I xdr_array()
-except that it packs characters;
-.I xdr_bytes()
-has four parameters, similar to the first four parameters of
-.I xdr_array ().
-For null-terminated strings, there is also the
-.I xdr_string()
-routine, which is the same as
-.I xdr_bytes()
-without the length parameter.
-On serializing it gets the string length from
-.I strlen (),
-and on deserializing it creates a null-terminated string.
-.LP
-Here is a final example that calls the previously written
-.I xdr_simple()
-as well as the built-in functions
-.I xdr_string()
-and
-.I xdr_reference (),
-which chases pointers:
-.ie t .DS
-.el .DS L
-.ft CW
-struct finalexample {
- char *string;
- struct simple *simplep;
-} finalexample;
-
-xdr_finalexample(xdrsp, finalp)
- XDR *xdrsp;
- struct finalexample *finalp;
-{
-
- if (!xdr_string(xdrsp, &finalp->string, MAXSTRLEN))
- return (0);
- if (!xdr_reference(xdrsp, &finalp->simplep,
- sizeof(struct simple), xdr_simple);
- return (0);
- return (1);
-}
-.DE
-Note that we could as easily call
-.I xdr_simple()
-here instead of
-.I xdr_reference ().
-.NH 1
-\&Lowest Layer of RPC
-.IX "lowest layer of RPC"
-.IX "RPC" "lowest layer"
-.LP
-In the examples given so far,
-RPC takes care of many details automatically for you.
-In this section, we'll show you how you can change the defaults
-by using lower layers of the RPC library.
-It is assumed that you are familiar with sockets
-and the system calls for dealing with them.
-.LP
-There are several occasions when you may need to use lower layers of
-RPC. First, you may need to use TCP, since the higher layer uses UDP,
-which restricts RPC calls to 8K bytes of data. Using TCP permits calls
-to send long streams of data.
-For an example, see the
-.I TCP
-section below. Second, you may want to allocate and free memory
-while serializing or deserializing with XDR routines.
-There is no call at the higher level to let
-you free memory explicitly.
-For more explanation, see the
-.I "Memory Allocation with XDR"
-section below.
-Third, you may need to perform authentication
-on either the client or server side, by supplying
-credentials or verifying them.
-See the explanation in the
-.I Authentication
-section below.
-.NH 2
-\&More on the Server Side
-.IX RPC "server side"
-.LP
-The server for the
-.I nusers()
-program shown below does the same thing as the one using
-.I registerrpc()
-above, but is written using a lower layer of the RPC package:
-.ie t .DS
-.el .DS L
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h>
-#include <utmp.h>
-#include <rpcsvc/rusers.h>
-
-main()
-{
- SVCXPRT *transp;
- int nuser();
-
- transp = svcudp_create(RPC_ANYSOCK);
- if (transp == NULL){
- fprintf(stderr, "can't create an RPC server\en");
- exit(1);
- }
- pmap_unset(RUSERSPROG, RUSERSVERS);
- if (!svc_register(transp, RUSERSPROG, RUSERSVERS,
- nuser, IPPROTO_UDP)) {
- fprintf(stderr, "can't register RUSER service\en");
- exit(1);
- }
- svc_run(); /* \fINever returns\fP */
- fprintf(stderr, "should never reach this point\en");
-}
-
-nuser(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
-{
- unsigned long nusers;
-
- switch (rqstp->rq_proc) {
- case NULLPROC:
- if (!svc_sendreply(transp, xdr_void, 0))
- fprintf(stderr, "can't reply to RPC call\en");
- return;
- case RUSERSPROC_NUM:
-.ft I
- /*
- * Code here to compute the number of users
- * and assign it to the variable \fInusers\fP
- */
-.ft CW
- if (!svc_sendreply(transp, xdr_u_long, &nusers))
- fprintf(stderr, "can't reply to RPC call\en");
- return;
- default:
- svcerr_noproc(transp);
- return;
- }
-}
-.DE
-.LP
-First, the server gets a transport handle, which is used
-for receiving and replying to RPC messages.
-.I registerrpc()
-uses
-.I svcudp_create()
-to get a UDP handle.
-If you require a more reliable protocol, call
-.I svctcp_create()
-instead.
-If the argument to
-.I svcudp_create()
-is
-.I RPC_ANYSOCK
-the RPC library creates a socket
-on which to receive and reply to RPC calls. Otherwise,
-.I svcudp_create()
-expects its argument to be a valid socket number.
-If you specify your own socket, it can be bound or unbound.
-If it is bound to a port by the user, the port numbers of
-.I svcudp_create()
-and
-.I clnttcp_create()
-(the low-level client routine) must match.
-.LP
-If the user specifies the
-.I RPC_ANYSOCK
-argument, the RPC library routines will open sockets.
-Otherwise they will expect the user to do so. The routines
-.I svcudp_create()
-and
-.I clntudp_create()
-will cause the RPC library routines to
-.I bind()
-their socket if it is not bound already.
-.LP
-A service may choose to register its port number with the
-local portmapper service. This is done is done by specifying
-a non-zero protocol number in
-.I svc_register ().
-Incidently, a client can discover the server's port number by
-consulting the portmapper on their server's machine. This can
-be done automatically by specifying a zero port number in
-.I clntudp_create()
-or
-.I clnttcp_create ().
-.LP
-After creating an
-.I SVCXPRT ,
-the next step is to call
-.I pmap_unset()
-so that if the
-.I nusers()
-server crashed earlier,
-any previous trace of it is erased before restarting.
-More precisely,
-.I pmap_unset()
-erases the entry for
-.I RUSERSPROG
-from the port mapper's tables.
-.LP
-Finally, we associate the program number for
-.I nusers()
-with the procedure
-.I nuser ().
-The final argument to
-.I svc_register()
-is normally the protocol being used,
-which, in this case, is
-.I IPPROTO_UDP
-Notice that unlike
-.I registerrpc (),
-there are no XDR routines involved
-in the registration process.
-Also, registration is done on the program,
-rather than procedure, level.
-.LP
-The user routine
-.I nuser()
-must call and dispatch the appropriate XDR routines
-based on the procedure number.
-Note that
-two things are handled by
-.I nuser()
-that
-.I registerrpc()
-handles automatically.
-The first is that procedure
-.I NULLPROC
-(currently zero) returns with no results.
-This can be used as a simple test
-for detecting if a remote program is running.
-Second, there is a check for invalid procedure numbers.
-If one is detected,
-.I svcerr_noproc()
-is called to handle the error.
-.KS
-.LP
-The user service routine serializes the results and returns
-them to the RPC caller via
-.I svc_sendreply()
-Its first parameter is the
-.I SVCXPRT
-handle, the second is the XDR routine,
-and the third is a pointer to the data to be returned.
-Not illustrated above is how a server
-handles an RPC program that receives data.
-As an example, we can add a procedure
-.I RUSERSPROC_BOOL
-which has an argument
-.I nusers (),
-and returns
-.I TRUE
-or
-.I FALSE
-depending on whether there are nusers logged on.
-It would look like this:
-.ie t .DS
-.el .DS L
-.ft CW
-case RUSERSPROC_BOOL: {
- int bool;
- unsigned nuserquery;
-
- if (!svc_getargs(transp, xdr_u_int, &nuserquery) {
- svcerr_decode(transp);
- return;
- }
-.ft I
- /*
- * Code to set \fInusers\fP = number of users
- */
-.ft CW
- if (nuserquery == nusers)
- bool = TRUE;
- else
- bool = FALSE;
- if (!svc_sendreply(transp, xdr_bool, &bool)) {
- fprintf(stderr, "can't reply to RPC call\en");
- return (1);
- }
- return;
-}
-.DE
-.KE
-.LP
-The relevant routine is
-.I svc_getargs()
-which takes an
-.I SVCXPRT
-handle, the XDR routine,
-and a pointer to where the input is to be placed as arguments.
-.NH 2
-\&Memory Allocation with XDR
-.IX "memory allocation with XDR"
-.IX XDR "memory allocation"
-.LP
-XDR routines not only do input and output,
-they also do memory allocation.
-This is why the second parameter of
-.I xdr_array()
-is a pointer to an array, rather than the array itself.
-If it is
-.I NULL ,
-then
-.I xdr_array()
-allocates space for the array and returns a pointer to it,
-putting the size of the array in the third argument.
-As an example, consider the following XDR routine
-.I xdr_chararr1()
-which deals with a fixed array of bytes with length
-.I SIZE .
-.ie t .DS
-.el .DS L
-.ft CW
-xdr_chararr1(xdrsp, chararr)
- XDR *xdrsp;
- char chararr[];
-{
- char *p;
- int len;
-
- p = chararr;
- len = SIZE;
- return (xdr_bytes(xdrsp, &p, &len, SIZE));
-}
-.DE
-If space has already been allocated in
-.I chararr ,
-it can be called from a server like this:
-.ie t .DS
-.el .DS L
-.ft CW
-char chararr[SIZE];
-
-svc_getargs(transp, xdr_chararr1, chararr);
-.DE
-If you want XDR to do the allocation,
-you would have to rewrite this routine in the following way:
-.ie t .DS
-.el .DS L
-.ft CW
-xdr_chararr2(xdrsp, chararrp)
- XDR *xdrsp;
- char **chararrp;
-{
- int len;
-
- len = SIZE;
- return (xdr_bytes(xdrsp, charrarrp, &len, SIZE));
-}
-.DE
-Then the RPC call might look like this:
-.ie t .DS
-.el .DS L
-.ft CW
-char *arrptr;
-
-arrptr = NULL;
-svc_getargs(transp, xdr_chararr2, &arrptr);
-.ft I
-/*
- * Use the result here
- */
-.ft CW
-svc_freeargs(transp, xdr_chararr2, &arrptr);
-.DE
-Note that, after being used, the character array can be freed with
-.I svc_freeargs()
-.I svc_freeargs()
-will not attempt to free any memory if the variable indicating it
-is NULL. For example, in the the routine
-.I xdr_finalexample (),
-given earlier, if
-.I finalp->string
-was NULL, then it would not be freed. The same is true for
-.I finalp->simplep .
-.LP
-To summarize, each XDR routine is responsible
-for serializing, deserializing, and freeing memory.
-When an XDR routine is called from
-.I callrpc()
-the serializing part is used.
-When called from
-.I svc_getargs()
-the deserializer is used.
-And when called from
-.I svc_freeargs()
-the memory deallocator is used. When building simple examples like those
-in this section, a user doesn't have to worry
-about the three modes.
-See the
-.I "External Data Representation: Sun Technical Notes"
-for examples of more sophisticated XDR routines that determine
-which of the three modes they are in and adjust their behavior accordingly.
-.KS
-.NH 2
-\&The Calling Side
-.IX RPC "calling side"
-.LP
-When you use
-.I callrpc()
-you have no control over the RPC delivery
-mechanism or the socket used to transport the data.
-To illustrate the layer of RPC that lets you adjust these
-parameters, consider the following code to call the
-.I nusers
-service:
-.ie t .DS
-.el .DS L
-.ft CW
-.vs 11
-#include <stdio.h>
-#include <rpc/rpc.h>
-#include <utmp.h>
-#include <rpcsvc/rusers.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netdb.h>
-
-main(argc, argv)
- int argc;
- char **argv;
-{
- struct hostent *hp;
- struct timeval pertry_timeout, total_timeout;
- struct sockaddr_in server_addr;
- int sock = RPC_ANYSOCK;
- register CLIENT *client;
- enum clnt_stat clnt_stat;
- unsigned long nusers;
-
- if (argc != 2) {
- fprintf(stderr, "usage: nusers hostname\en");
- exit(-1);
- }
- if ((hp = gethostbyname(argv[1])) == NULL) {
- fprintf(stderr, "can't get addr for %s\en",argv[1]);
- exit(-1);
- }
- pertry_timeout.tv_sec = 3;
- pertry_timeout.tv_usec = 0;
- bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr,
- hp->h_length);
- server_addr.sin_family = AF_INET;
- server_addr.sin_port = 0;
- if ((client = clntudp_create(&server_addr, RUSERSPROG,
- RUSERSVERS, pertry_timeout, &sock)) == NULL) {
- clnt_pcreateerror("clntudp_create");
- exit(-1);
- }
- total_timeout.tv_sec = 20;
- total_timeout.tv_usec = 0;
- clnt_stat = clnt_call(client, RUSERSPROC_NUM, xdr_void,
- 0, xdr_u_long, &nusers, total_timeout);
- if (clnt_stat != RPC_SUCCESS) {
- clnt_perror(client, "rpc");
- exit(-1);
- }
- clnt_destroy(client);
- close(sock);
- exit(0);
-}
-.vs
-.DE
-.KE
-The low-level version of
-.I callrpc()
-is
-.I clnt_call()
-which takes a
-.I CLIENT
-pointer rather than a host name. The parameters to
-.I clnt_call()
-are a
-.I CLIENT
-pointer, the procedure number,
-the XDR routine for serializing the argument,
-a pointer to the argument,
-the XDR routine for deserializing the return value,
-a pointer to where the return value will be placed,
-and the time in seconds to wait for a reply.
-.LP
-The
-.I CLIENT
-pointer is encoded with the transport mechanism.
-.I callrpc()
-uses UDP, thus it calls
-.I clntudp_create()
-to get a
-.I CLIENT
-pointer. To get TCP (Transmission Control Protocol), you would use
-.I clnttcp_create() .
-.LP
-The parameters to
-.I clntudp_create()
-are the server address, the program number, the version number,
-a timeout value (between tries), and a pointer to a socket.
-The final argument to
-.I clnt_call()
-is the total time to wait for a response.
-Thus, the number of tries is the
-.I clnt_call()
-timeout divided by the
-.I clntudp_create()
-timeout.
-.LP
-Note that the
-.I clnt_destroy()
-call
-always deallocates the space associated with the
-.I CLIENT
-handle. It closes the socket associated with the
-.I CLIENT
-handle, however, only if the RPC library opened it. It the
-socket was opened by the user, it stays open. This makes it
-possible, in cases where there are multiple client handles
-using the same socket, to destroy one handle without closing
-the socket that other handles are using.
-.LP
-To make a stream connection, the call to
-.I clntudp_create()
-is replaced with a call to
-.I clnttcp_create() .
-.DS
-.ft CW
-clnttcp_create(&server_addr, prognum, versnum, &sock,
- inputsize, outputsize);
-.DE
-There is no timeout argument; instead, the receive and send buffer
-sizes must be specified. When the
-.I clnttcp_create()
-call is made, a TCP connection is established.
-All RPC calls using that
-.I CLIENT
-handle would use this connection.
-The server side of an RPC call using TCP has
-.I svcudp_create()
-replaced by
-.I svctcp_create() .
-.DS
-.ft CW
-transp = svctcp_create(RPC_ANYSOCK, 0, 0);
-.DE
-The last two arguments to
-.I svctcp_create()
-are send and receive sizes respectively. If `0' is specified for
-either of these, the system chooses a reasonable default.
-.KS
-.NH 1
-\&Other RPC Features
-.IX "RPC" "miscellaneous features"
-.IX "miscellaneous RPC features"
-.LP
-This section discusses some other aspects of RPC
-that are occasionally useful.
-.NH 2
-\&Select on the Server Side
-.IX RPC select() RPC \fIselect()\fP
-.IX select() "" \fIselect()\fP "on the server side"
-.LP
-Suppose a process is processing RPC requests
-while performing some other activity.
-If the other activity involves periodically updating a data structure,
-the process can set an alarm signal before calling
-.I svc_run()
-But if the other activity
-involves waiting on a a file descriptor, the
-.I svc_run()
-call won't work.
-The code for
-.I svc_run()
-is as follows:
-.ie t .DS
-.el .DS L
-.ft CW
-.vs 11
-void
-svc_run()
-{
- fd_set readfds;
- int dtbsz = getdtablesize();
-
- for (;;) {
- readfds = svc_fds;
- switch (select(dtbsz, &readfds, NULL,NULL,NULL)) {
-
- case -1:
- if (errno == EINTR)
- continue;
- perror("select");
- return;
- case 0:
- break;
- default:
- svc_getreqset(&readfds);
- }
- }
-}
-.vs
-.DE
-.KE
-.LP
-You can bypass
-.I svc_run()
-and call
-.I svc_getreqset()
-yourself.
-All you need to know are the file descriptors
-of the socket(s) associated with the programs you are waiting on.
-Thus you can have your own
-.I select()
-.IX select() "" \fIselect()\fP
-that waits on both the RPC socket,
-and your own descriptors. Note that
-.I svc_fds()
-is a bit mask of all the file descriptors that RPC is using for
-services. It can change everytime that
-.I any
-RPC library routine is called, because descriptors are constantly
-being opened and closed, for example for TCP connections.
-.NH 2
-\&Broadcast RPC
-.IX "broadcast RPC"
-.IX RPC "broadcast"
-.LP
-The
-.I portmapper
-is a daemon that converts RPC program numbers
-into DARPA protocol port numbers; see the
-.I portmap
-man page. You can't do broadcast RPC without the portmapper.
-Here are the main differences between
-broadcast RPC and normal RPC calls:
-.IP 1.
-Normal RPC expects one answer, whereas
-broadcast RPC expects many answers
-(one or more answer from each responding machine).
-.IP 2.
-Broadcast RPC can only be supported by packet-oriented (connectionless)
-transport protocols like UPD/IP.
-.IP 3.
-The implementation of broadcast RPC
-treats all unsuccessful responses as garbage by filtering them out.
-Thus, if there is a version mismatch between the
-broadcaster and a remote service,
-the user of broadcast RPC never knows.
-.IP 4.
-All broadcast messages are sent to the portmap port.
-Thus, only services that register themselves with their portmapper
-are accessible via the broadcast RPC mechanism.
-.IP 5.
-Broadcast requests are limited in size to the MTU (Maximum Transfer
-Unit) of the local network. For Ethernet, the MTU is 1500 bytes.
-.KS
-.NH 3
-\&Broadcast RPC Synopsis
-.IX "broadcast RPC" synopsis
-.IX "RPC" "broadcast synopsis"
-.ie t .DS
-.el .DS L
-.ft CW
-#include <rpc/pmap_clnt.h>
- . . .
-enum clnt_stat clnt_stat;
- . . .
-clnt_stat = clnt_broadcast(prognum, versnum, procnum,
- inproc, in, outproc, out, eachresult)
- u_long prognum; /* \fIprogram number\fP */
- u_long versnum; /* \fIversion number\fP */
- u_long procnum; /* \fIprocedure number\fP */
- xdrproc_t inproc; /* \fIxdr routine for args\fP */
- caddr_t in; /* \fIpointer to args\fP */
- xdrproc_t outproc; /* \fIxdr routine for results\fP */
- caddr_t out; /* \fIpointer to results\fP */
- bool_t (*eachresult)();/* \fIcall with each result gotten\fP */
-.DE
-.KE
-The procedure
-.I eachresult()
-is called each time a valid result is obtained.
-It returns a boolean that indicates
-whether or not the user wants more responses.
-.ie t .DS
-.el .DS L
-.ft CW
-bool_t done;
- . . .
-done = eachresult(resultsp, raddr)
- caddr_t resultsp;
- struct sockaddr_in *raddr; /* \fIAddr of responding machine\fP */
-.DE
-If
-.I done
-is
-.I TRUE ,
-then broadcasting stops and
-.I clnt_broadcast()
-returns successfully.
-Otherwise, the routine waits for another response.
-The request is rebroadcast
-after a few seconds of waiting.
-If no responses come back,
-the routine returns with
-.I RPC_TIMEDOUT .
-.NH 2
-\&Batching
-.IX "batching"
-.IX RPC "batching"
-.LP
-The RPC architecture is designed so that clients send a call message,
-and wait for servers to reply that the call succeeded.
-This implies that clients do not compute
-while servers are processing a call.
-This is inefficient if the client does not want or need
-an acknowledgement for every message sent.
-It is possible for clients to continue computing
-while waiting for a response,
-using RPC batch facilities.
-.LP
-RPC messages can be placed in a \*Qpipeline\*U of calls
-to a desired server; this is called batching.
-Batching assumes that:
-1) each RPC call in the pipeline requires no response from the server,
-and the server does not send a response message; and
-2) the pipeline of calls is transported on a reliable
-byte stream transport such as TCP/IP.
-Since the server does not respond to every call,
-the client can generate new calls in parallel
-with the server executing previous calls.
-Furthermore, the TCP/IP implementation can buffer up
-many call messages, and send them to the server in one
-.I write()
-system call. This overlapped execution
-greatly decreases the interprocess communication overhead of
-the client and server processes,
-and the total elapsed time of a series of calls.
-.LP
-Since the batched calls are buffered,
-the client should eventually do a nonbatched call
-in order to flush the pipeline.
-.LP
-A contrived example of batching follows.
-Assume a string rendering service (like a window system)
-has two similar calls: one renders a string and returns void results,
-while the other renders a string and remains silent.
-The service (using the TCP/IP transport) may look like:
-.ie t .DS
-.el .DS L
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h>
-#include <suntool/windows.h>
-
-void windowdispatch();
-
-main()
-{
- SVCXPRT *transp;
-
- transp = svctcp_create(RPC_ANYSOCK, 0, 0);
- if (transp == NULL){
- fprintf(stderr, "can't create an RPC server\en");
- exit(1);
- }
- pmap_unset(WINDOWPROG, WINDOWVERS);
- if (!svc_register(transp, WINDOWPROG, WINDOWVERS,
- windowdispatch, IPPROTO_TCP)) {
- fprintf(stderr, "can't register WINDOW service\en");
- exit(1);
- }
- svc_run(); /* \fINever returns\fP */
- fprintf(stderr, "should never reach this point\en");
-}
-
-void
-windowdispatch(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
-{
- char *s = NULL;
-
- switch (rqstp->rq_proc) {
- case NULLPROC:
- if (!svc_sendreply(transp, xdr_void, 0))
- fprintf(stderr, "can't reply to RPC call\en");
- return;
- case RENDERSTRING:
- if (!svc_getargs(transp, xdr_wrapstring, &s)) {
- fprintf(stderr, "can't decode arguments\en");
-.ft I
- /*
- * Tell caller he screwed up
- */
-.ft CW
- svcerr_decode(transp);
- break;
- }
-.ft I
- /*
- * Code here to render the string \fIs\fP
- */
-.ft CW
- if (!svc_sendreply(transp, xdr_void, NULL))
- fprintf(stderr, "can't reply to RPC call\en");
- break;
- case RENDERSTRING_BATCHED:
- if (!svc_getargs(transp, xdr_wrapstring, &s)) {
- fprintf(stderr, "can't decode arguments\en");
-.ft I
- /*
- * We are silent in the face of protocol errors
- */
-.ft CW
- break;
- }
-.ft I
- /*
- * Code here to render string s, but send no reply!
- */
-.ft CW
- break;
- default:
- svcerr_noproc(transp);
- return;
- }
-.ft I
- /*
- * Now free string allocated while decoding arguments
- */
-.ft CW
- svc_freeargs(transp, xdr_wrapstring, &s);
-}
-.DE
-Of course the service could have one procedure
-that takes the string and a boolean
-to indicate whether or not the procedure should respond.
-.LP
-In order for a client to take advantage of batching,
-the client must perform RPC calls on a TCP-based transport
-and the actual calls must have the following attributes:
-1) the result's XDR routine must be zero
-.I NULL ),
-and 2) the RPC call's timeout must be zero.
-.KS
-.LP
-Here is an example of a client that uses batching to render a
-bunch of strings; the batching is flushed when the client gets
-a null string (EOF):
-.ie t .DS
-.el .DS L
-.ft CW
-.vs 11
-#include <stdio.h>
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netdb.h>
-#include <suntool/windows.h>
-
-main(argc, argv)
- int argc;
- char **argv;
-{
- struct hostent *hp;
- struct timeval pertry_timeout, total_timeout;
- struct sockaddr_in server_addr;
- int sock = RPC_ANYSOCK;
- register CLIENT *client;
- enum clnt_stat clnt_stat;
- char buf[1000], *s = buf;
-
- if ((client = clnttcp_create(&server_addr,
- WINDOWPROG, WINDOWVERS, &sock, 0, 0)) == NULL) {
- perror("clnttcp_create");
- exit(-1);
- }
- total_timeout.tv_sec = 0;
- total_timeout.tv_usec = 0;
- while (scanf("%s", s) != EOF) {
- clnt_stat = clnt_call(client, RENDERSTRING_BATCHED,
- xdr_wrapstring, &s, NULL, NULL, total_timeout);
- if (clnt_stat != RPC_SUCCESS) {
- clnt_perror(client, "batched rpc");
- exit(-1);
- }
- }
-
- /* \fINow flush the pipeline\fP */
-
- total_timeout.tv_sec = 20;
- clnt_stat = clnt_call(client, NULLPROC, xdr_void, NULL,
- xdr_void, NULL, total_timeout);
- if (clnt_stat != RPC_SUCCESS) {
- clnt_perror(client, "rpc");
- exit(-1);
- }
- clnt_destroy(client);
- exit(0);
-}
-.vs
-.DE
-.KE
-Since the server sends no message,
-the clients cannot be notified of any of the failures that may occur.
-Therefore, clients are on their own when it comes to handling errors.
-.LP
-The above example was completed to render
-all of the (2000) lines in the file
-.I /etc/termcap .
-The rendering service did nothing but throw the lines away.
-The example was run in the following four configurations:
-1) machine to itself, regular RPC;
-2) machine to itself, batched RPC;
-3) machine to another, regular RPC; and
-4) machine to another, batched RPC.
-The results are as follows:
-1) 50 seconds;
-2) 16 seconds;
-3) 52 seconds;
-4) 10 seconds.
-Running
-.I fscanf()
-on
-.I /etc/termcap
-only requires six seconds.
-These timings show the advantage of protocols
-that allow for overlapped execution,
-though these protocols are often hard to design.
-.NH 2
-\&Authentication
-.IX "authentication"
-.IX "RPC" "authentication"
-.LP
-In the examples presented so far,
-the caller never identified itself to the server,
-and the server never required an ID from the caller.
-Clearly, some network services, such as a network filesystem,
-require stronger security than what has been presented so far.
-.LP
-In reality, every RPC call is authenticated by
-the RPC package on the server, and similarly,
-the RPC client package generates and sends authentication parameters.
-Just as different transports (TCP/IP or UDP/IP)
-can be used when creating RPC clients and servers,
-different forms of authentication can be associated with RPC clients;
-the default authentication type used as a default is type
-.I none .
-.LP
-The authentication subsystem of the RPC package is open ended.
-That is, numerous types of authentication are easy to support.
-.NH 3
-\&UNIX Authentication
-.IX "UNIX Authentication"
-.IP "\fIThe Client Side\fP"
-.LP
-When a caller creates a new RPC client handle as in:
-.DS
-.ft CW
-clnt = clntudp_create(address, prognum, versnum,
- wait, sockp)
-.DE
-the appropriate transport instance defaults
-the associate authentication handle to be
-.DS
-.ft CW
-clnt->cl_auth = authnone_create();
-.DE
-The RPC client can choose to use
-.I UNIX
-style authentication by setting
-.I clnt\->cl_auth
-after creating the RPC client handle:
-.DS
-.ft CW
-clnt->cl_auth = authunix_create_default();
-.DE
-This causes each RPC call associated with
-.I clnt
-to carry with it the following authentication credentials structure:
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * UNIX style credentials.
- */
-.ft CW
-struct authunix_parms {
- u_long aup_time; /* \fIcredentials creation time\fP */
- char *aup_machname; /* \fIhost name where client is\fP */
- int aup_uid; /* \fIclient's UNIX effective uid\fP */
- int aup_gid; /* \fIclient's current group id\fP */
- u_int aup_len; /* \fIelement length of aup_gids\fP */
- int *aup_gids; /* \fIarray of groups user is in\fP */
-};
-.DE
-These fields are set by
-.I authunix_create_default()
-by invoking the appropriate system calls.
-Since the RPC user created this new style of authentication,
-the user is responsible for destroying it with:
-.DS
-.ft CW
-auth_destroy(clnt->cl_auth);
-.DE
-This should be done in all cases, to conserve memory.
-.sp
-.IP "\fIThe Server Side\fP"
-.LP
-Service implementors have a harder time dealing with authentication issues
-since the RPC package passes the service dispatch routine a request
-that has an arbitrary authentication style associated with it.
-Consider the fields of a request handle passed to a service dispatch routine:
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * An RPC Service request
- */
-.ft CW
-struct svc_req {
- u_long rq_prog; /* \fIservice program number\fP */
- u_long rq_vers; /* \fIservice protocol vers num\fP */
- u_long rq_proc; /* \fIdesired procedure number\fP */
- struct opaque_auth rq_cred; /* \fIraw credentials from wire\fP */
- caddr_t rq_clntcred; /* \fIcredentials (read only)\fP */
-};
-.DE
-The
-.I rq_cred
-is mostly opaque, except for one field of interest:
-the style or flavor of authentication credentials:
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * Authentication info. Mostly opaque to the programmer.
- */
-.ft CW
-struct opaque_auth {
- enum_t oa_flavor; /* \fIstyle of credentials\fP */
- caddr_t oa_base; /* \fIaddress of more auth stuff\fP */
- u_int oa_length; /* \fInot to exceed \fIMAX_AUTH_BYTES */
-};
-.DE
-.IX RPC guarantees
-The RPC package guarantees the following
-to the service dispatch routine:
-.IP 1.
-That the request's
-.I rq_cred
-is well formed. Thus the service implementor may inspect the request's
-.I rq_cred.oa_flavor
-to determine which style of authentication the caller used.
-The service implementor may also wish to inspect the other fields of
-.I rq_cred
-if the style is not one of the styles supported by the RPC package.
-.IP 2.
-That the request's
-.I rq_clntcred
-field is either
-.I NULL
-or points to a well formed structure
-that corresponds to a supported style of authentication credentials.
-Remember that only
-.I unix
-style is currently supported, so (currently)
-.I rq_clntcred
-could be cast to a pointer to an
-.I authunix_parms
-structure. If
-.I rq_clntcred
-is
-.I NULL ,
-the service implementor may wish to inspect the other (opaque) fields of
-.I rq_cred
-in case the service knows about a new type of authentication
-that the RPC package does not know about.
-.LP
-Our remote users service example can be extended so that
-it computes results for all users except UID 16:
-.ie t .DS
-.el .DS L
-.ft CW
-.vs 11
-nuser(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
-{
- struct authunix_parms *unix_cred;
- int uid;
- unsigned long nusers;
-
-.ft I
- /*
- * we don't care about authentication for null proc
- */
-.ft CW
- if (rqstp->rq_proc == NULLPROC) {
- if (!svc_sendreply(transp, xdr_void, 0)) {
- fprintf(stderr, "can't reply to RPC call\en");
- return (1);
- }
- return;
- }
-.ft I
- /*
- * now get the uid
- */
-.ft CW
- switch (rqstp->rq_cred.oa_flavor) {
- case AUTH_UNIX:
- unix_cred =
- (struct authunix_parms *)rqstp->rq_clntcred;
- uid = unix_cred->aup_uid;
- break;
- case AUTH_NULL:
- default:
- svcerr_weakauth(transp);
- return;
- }
- switch (rqstp->rq_proc) {
- case RUSERSPROC_NUM:
-.ft I
- /*
- * make sure caller is allowed to call this proc
- */
-.ft CW
- if (uid == 16) {
- svcerr_systemerr(transp);
- return;
- }
-.ft I
- /*
- * Code here to compute the number of users
- * and assign it to the variable \fInusers\fP
- */
-.ft CW
- if (!svc_sendreply(transp, xdr_u_long, &nusers)) {
- fprintf(stderr, "can't reply to RPC call\en");
- return (1);
- }
- return;
- default:
- svcerr_noproc(transp);
- return;
- }
-}
-.vs
-.DE
-A few things should be noted here.
-First, it is customary not to check
-the authentication parameters associated with the
-.I NULLPROC
-(procedure number zero).
-Second, if the authentication parameter's type is not suitable
-for your service, you should call
-.I svcerr_weakauth() .
-And finally, the service protocol itself should return status
-for access denied; in the case of our example, the protocol
-does not have such a status, so we call the service primitive
-.I svcerr_systemerr()
-instead.
-.LP
-The last point underscores the relation between
-the RPC authentication package and the services;
-RPC deals only with
-.I authentication
-and not with individual services'
-.I "access control" .
-The services themselves must implement their own access control policies
-and reflect these policies as return statuses in their protocols.
-.NH 2
-\&DES Authentication
-.IX RPC DES
-.IX RPC authentication
-.LP
-UNIX authentication is quite easy to defeat. Instead of using
-.I authunix_create_default (),
-one can call
-.I authunix_create()
-and then modify the RPC authentication handle it returns by filling in
-whatever user ID and hostname they wish the server to think they have.
-DES authentication is thus recommended for people who want more security
-than UNIX authentication offers.
-.LP
-The details of the DES authentication protocol are complicated and
-are not explained here.
-See
-.I "Remote Procedure Calls: Protocol Specification"
-for the details.
-.LP
-In order for DES authentication to work, the
-.I keyserv(8c)
-daemon must be running on both the server and client machines. The
-users on these machines need public keys assigned by the network
-administrator in the
-.I publickey(5)
-database. And, they need to have decrypted their secret keys
-using their login password. This automatically happens when one
-logs in using
-.I login(1) ,
-or can be done manually using
-.I keylogin(1) .
-The
-.I "Network Services"
-chapter
-./" XXX
-explains more how to setup secure networking.
-.sp
-.IP "\fIClient Side\fP"
-.LP
-If a client wishes to use DES authentication, it must set its
-authentication handle appropriately. Here is an example:
-.DS
-cl->cl_auth =
- authdes_create(servername, 60, &server_addr, NULL);
-.DE
-The first argument is the network name or \*Qnetname\*U of the owner of
-the server process. Typically, server processes are root processes
-and their netname can be derived using the following call:
-.DS
-char servername[MAXNETNAMELEN];
-
-host2netname(servername, rhostname, NULL);
-.DE
-Here,
-.I rhostname
-is the hostname of the machine the server process is running on.
-.I host2netname()
-fills in
-.I servername
-to contain this root process's netname. If the
-server process was run by a regular user, one could use the call
-.I user2netname()
-instead. Here is an example for a server process with the same user
-ID as the client:
-.DS
-char servername[MAXNETNAMELEN];
-
-user2netname(servername, getuid(), NULL);
-.DE
-The last argument to both of these calls,
-.I user2netname()
-and
-.I host2netname (),
-is the name of the naming domain where the server is located. The
-.I NULL
-used here means \*Quse the local domain name.\*U
-.LP
-The second argument to
-.I authdes_create()
-is a lifetime for the credential. Here it is set to sixty
-seconds. What that means is that the credential will expire 60
-seconds from now. If some mischievous user tries to reuse the
-credential, the server RPC subsystem will recognize that it has
-expired and not grant any requests. If the same mischievous user
-tries to reuse the credential within the sixty second lifetime,
-he will still be rejected because the server RPC subsystem
-remembers which credentials it has already seen in the near past,
-and will not grant requests to duplicates.
-.LP
-The third argument to
-.I authdes_create()
-is the address of the host to synchronize with. In order for DES
-authentication to work, the server and client must agree upon the
-time. Here we pass the address of the server itself, so the
-client and server will both be using the same time: the server's
-time. The argument can be
-.I NULL ,
-which means \*Qdon't bother synchronizing.\*U You should only do this
-if you are sure the client and server are already synchronized.
-.LP
-The final argument to
-.I authdes_create()
-is the address of a DES encryption key to use for encrypting
-timestamps and data. If this argument is
-.I NULL ,
-as it is in this example, a random key will be chosen. The client
-may find out the encryption key being used by consulting the
-.I ah_key
-field of the authentication handle.
-.sp
-.IP "\fIServer Side\fP"
-.LP
-The server side is a lot simpler than the client side. Here is the
-previous example rewritten to use
-.I AUTH_DES
-instead of
-.I AUTH_UNIX :
-.ie t .DS
-.el .DS L
-.ft CW
-.vs 11
-#include <sys/time.h>
-#include <rpc/auth_des.h>
- . . .
- . . .
-nuser(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
-{
- struct authdes_cred *des_cred;
- int uid;
- int gid;
- int gidlen;
- int gidlist[10];
-.ft I
- /*
- * we don't care about authentication for null proc
- */
-.ft CW
-
- if (rqstp->rq_proc == NULLPROC) {
- /* \fIsame as before\fP */
- }
-
-.ft I
- /*
- * now get the uid
- */
-.ft CW
- switch (rqstp->rq_cred.oa_flavor) {
- case AUTH_DES:
- des_cred =
- (struct authdes_cred *) rqstp->rq_clntcred;
- if (! netname2user(des_cred->adc_fullname.name,
- &uid, &gid, &gidlen, gidlist))
- {
- fprintf(stderr, "unknown user: %s\n",
- des_cred->adc_fullname.name);
- svcerr_systemerr(transp);
- return;
- }
- break;
- case AUTH_NULL:
- default:
- svcerr_weakauth(transp);
- return;
- }
-
-.ft I
- /*
- * The rest is the same as before
- */
-.ft CW
-.vs
-.DE
-Note the use of the routine
-.I netname2user (),
-the inverse of
-.I user2netname ():
-it takes a network ID and converts to a unix ID.
-.I netname2user ()
-also supplies the group IDs which we don't use in this example,
-but which may be useful to other UNIX programs.
-.NH 2
-\&Using Inetd
-.IX inetd "" "using \fIinetd\fP"
-.LP
-An RPC server can be started from
-.I inetd
-The only difference from the usual code is that the service
-creation routine should be called in the following form:
-.ie t .DS
-.el .DS L
-.ft CW
-transp = svcudp_create(0); /* \fIFor UDP\fP */
-transp = svctcp_create(0,0,0); /* \fIFor listener TCP sockets\fP */
-transp = svcfd_create(0,0,0); /* \fIFor connected TCP sockets\fP */
-.DE
-since
-.I inet
-passes a socket as file descriptor 0.
-Also,
-.I svc_register()
-should be called as
-.ie t .DS
-.el .DS L
-.ft CW
-svc_register(transp, PROGNUM, VERSNUM, service, 0);
-.DE
-with the final flag as 0,
-since the program would already be registered by
-.I inetd
-Remember that if you want to exit
-from the server process and return control to
-.I inet
-you need to explicitly exit, since
-.I svc_run()
-never returns.
-.LP
-The format of entries in
-.I /etc/inetd.conf
-for RPC services is in one of the following two forms:
-.ie t .DS
-.el .DS L
-.ft CW
-p_name/version dgram rpc/udp wait/nowait user server args
-p_name/version stream rpc/tcp wait/nowait user server args
-.DE
-where
-.I p_name
-is the symbolic name of the program as it appears in
-.I rpc(5) ,
-.I server
-is the program implementing the server,
-and
-.I program
-and
-.I version
-are the program and version numbers of the service.
-For more information, see
-.I inetd.conf(5) .
-.LP
-If the same program handles multiple versions,
-then the version number can be a range,
-as in this example:
-.ie t .DS
-.el .DS L
-.ft CW
-rstatd/1-2 dgram rpc/udp wait root /usr/etc/rpc.rstatd
-.DE
-.NH 1
-\&More Examples
-.sp 1
-.NH 2
-\&Versions
-.IX "versions"
-.IX "RPC" "versions"
-.LP
-By convention, the first version number of program
-.I PROG
-is
-.I PROGVERS_ORIG
-and the most recent version is
-.I PROGVERS
-Suppose there is a new version of the
-.I user
-program that returns an
-.I "unsigned short"
-rather than a
-.I long .
-If we name this version
-.I RUSERSVERS_SHORT
-then a server that wants to support both versions
-would do a double register.
-.ie t .DS
-.el .DS L
-.ft CW
-if (!svc_register(transp, RUSERSPROG, RUSERSVERS_ORIG,
- nuser, IPPROTO_TCP)) {
- fprintf(stderr, "can't register RUSER service\en");
- exit(1);
-}
-if (!svc_register(transp, RUSERSPROG, RUSERSVERS_SHORT,
- nuser, IPPROTO_TCP)) {
- fprintf(stderr, "can't register RUSER service\en");
- exit(1);
-}
-.DE
-Both versions can be handled by the same C procedure:
-.ie t .DS
-.el .DS L
-.ft CW
-.vs 11
-nuser(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
-{
- unsigned long nusers;
- unsigned short nusers2;
-
- switch (rqstp->rq_proc) {
- case NULLPROC:
- if (!svc_sendreply(transp, xdr_void, 0)) {
- fprintf(stderr, "can't reply to RPC call\en");
- return (1);
- }
- return;
- case RUSERSPROC_NUM:
-.ft I
- /*
- * Code here to compute the number of users
- * and assign it to the variable \fInusers\fP
- */
-.ft CW
- nusers2 = nusers;
- switch (rqstp->rq_vers) {
- case RUSERSVERS_ORIG:
- if (!svc_sendreply(transp, xdr_u_long,
- &nusers)) {
- fprintf(stderr,"can't reply to RPC call\en");
- }
- break;
- case RUSERSVERS_SHORT:
- if (!svc_sendreply(transp, xdr_u_short,
- &nusers2)) {
- fprintf(stderr,"can't reply to RPC call\en");
- }
- break;
- }
- default:
- svcerr_noproc(transp);
- return;
- }
-}
-.vs
-.DE
-.KS
-.NH 2
-\&TCP
-.IX "TCP"
-.LP
-Here is an example that is essentially
-.I rcp.
-The initiator of the RPC
-.I snd
-call takes its standard input and sends it to the server
-.I rcv
-which prints it on standard output.
-The RPC call uses TCP.
-This also illustrates an XDR procedure that behaves differently
-on serialization than on deserialization.
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
- * The xdr routine:
- * on decode, read from wire, write onto fp
- * on encode, read from fp, write onto wire
- */
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h>
-
-xdr_rcp(xdrs, fp)
- XDR *xdrs;
- FILE *fp;
-{
- unsigned long size;
- char buf[BUFSIZ], *p;
-
- if (xdrs->x_op == XDR_FREE)/* nothing to free */
- return 1;
- while (1) {
- if (xdrs->x_op == XDR_ENCODE) {
- if ((size = fread(buf, sizeof(char), BUFSIZ,
- fp)) == 0 && ferror(fp)) {
- fprintf(stderr, "can't fread\en");
- return (1);
- }
- }
- p = buf;
- if (!xdr_bytes(xdrs, &p, &size, BUFSIZ))
- return 0;
- if (size == 0)
- return 1;
- if (xdrs->x_op == XDR_DECODE) {
- if (fwrite(buf, sizeof(char), size,
- fp) != size) {
- fprintf(stderr, "can't fwrite\en");
- return (1);
- }
- }
- }
-}
-.vs
-.DE
-.KE
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
- * The sender routines
- */
-.ft CW
-#include <stdio.h>
-#include <netdb.h>
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-
-main(argc, argv)
- int argc;
- char **argv;
-{
- int xdr_rcp();
- int err;
-
- if (argc < 2) {
- fprintf(stderr, "usage: %s servername\en", argv[0]);
- exit(-1);
- }
- if ((err = callrpctcp(argv[1], RCPPROG, RCPPROC,
- RCPVERS, xdr_rcp, stdin, xdr_void, 0) != 0)) {
- clnt_perrno(err);
- fprintf(stderr, "can't make RPC call\en");
- exit(1);
- }
- exit(0);
-}
-
-callrpctcp(host, prognum, procnum, versnum,
- inproc, in, outproc, out)
- char *host, *in, *out;
- xdrproc_t inproc, outproc;
-{
- struct sockaddr_in server_addr;
- int socket = RPC_ANYSOCK;
- enum clnt_stat clnt_stat;
- struct hostent *hp;
- register CLIENT *client;
- struct timeval total_timeout;
-
- if ((hp = gethostbyname(host)) == NULL) {
- fprintf(stderr, "can't get addr for '%s'\en", host);
- return (-1);
- }
- bcopy(hp->h_addr, (caddr_t)&server_addr.sin_addr,
- hp->h_length);
- server_addr.sin_family = AF_INET;
- server_addr.sin_port = 0;
- if ((client = clnttcp_create(&server_addr, prognum,
- versnum, &socket, BUFSIZ, BUFSIZ)) == NULL) {
- perror("rpctcp_create");
- return (-1);
- }
- total_timeout.tv_sec = 20;
- total_timeout.tv_usec = 0;
- clnt_stat = clnt_call(client, procnum,
- inproc, in, outproc, out, total_timeout);
- clnt_destroy(client);
- return (int)clnt_stat;
-}
-.vs
-.DE
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
- * The receiving routines
- */
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h>
-
-main()
-{
- register SVCXPRT *transp;
- int rcp_service(), xdr_rcp();
-
- if ((transp = svctcp_create(RPC_ANYSOCK,
- BUFSIZ, BUFSIZ)) == NULL) {
- fprintf("svctcp_create: error\en");
- exit(1);
- }
- pmap_unset(RCPPROG, RCPVERS);
- if (!svc_register(transp,
- RCPPROG, RCPVERS, rcp_service, IPPROTO_TCP)) {
- fprintf(stderr, "svc_register: error\en");
- exit(1);
- }
- svc_run(); /* \fInever returns\fP */
- fprintf(stderr, "svc_run should never return\en");
-}
-
-rcp_service(rqstp, transp)
- register struct svc_req *rqstp;
- register SVCXPRT *transp;
-{
- switch (rqstp->rq_proc) {
- case NULLPROC:
- if (svc_sendreply(transp, xdr_void, 0) == 0) {
- fprintf(stderr, "err: rcp_service");
- return (1);
- }
- return;
- case RCPPROC_FP:
- if (!svc_getargs(transp, xdr_rcp, stdout)) {
- svcerr_decode(transp);
- return;
- }
- if (!svc_sendreply(transp, xdr_void, 0)) {
- fprintf(stderr, "can't reply\en");
- return;
- }
- return (0);
- default:
- svcerr_noproc(transp);
- return;
- }
-}
-.vs
-.DE
-.NH 2
-\&Callback Procedures
-.IX RPC "callback procedures"
-.LP
-Occasionally, it is useful to have a server become a client,
-and make an RPC call back to the process which is its client.
-An example is remote debugging,
-where the client is a window system program,
-and the server is a debugger running on the remote machine.
-Most of the time,
-the user clicks a mouse button at the debugging window,
-which converts this to a debugger command,
-and then makes an RPC call to the server
-(where the debugger is actually running),
-telling it to execute that command.
-However, when the debugger hits a breakpoint, the roles are reversed,
-and the debugger wants to make an rpc call to the window program,
-so that it can inform the user that a breakpoint has been reached.
-.LP
-In order to do an RPC callback,
-you need a program number to make the RPC call on.
-Since this will be a dynamically generated program number,
-it should be in the transient range,
-.I "0x40000000 - 0x5fffffff" .
-The routine
-.I gettransient()
-returns a valid program number in the transient range,
-and registers it with the portmapper.
-It only talks to the portmapper running on the same machine as the
-.I gettransient()
-routine itself. The call to
-.I pmap_set()
-is a test and set operation,
-in that it indivisibly tests whether a program number
-has already been registered,
-and if it has not, then reserves it. On return, the
-.I sockp
-argument will contain a socket that can be used
-as the argument to an
-.I svcudp_create()
-or
-.I svctcp_create()
-call.
-.ie t .DS
-.el .DS L
-.ft CW
-.vs 11
-#include <stdio.h>
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-
-gettransient(proto, vers, sockp)
- int proto, vers, *sockp;
-{
- static int prognum = 0x40000000;
- int s, len, socktype;
- struct sockaddr_in addr;
-
- switch(proto) {
- case IPPROTO_UDP:
- socktype = SOCK_DGRAM;
- break;
- case IPPROTO_TCP:
- socktype = SOCK_STREAM;
- break;
- default:
- fprintf(stderr, "unknown protocol type\en");
- return 0;
- }
- if (*sockp == RPC_ANYSOCK) {
- if ((s = socket(AF_INET, socktype, 0)) < 0) {
- perror("socket");
- return (0);
- }
- *sockp = s;
- }
- else
- s = *sockp;
- addr.sin_addr.s_addr = 0;
- addr.sin_family = AF_INET;
- addr.sin_port = 0;
- len = sizeof(addr);
-.ft I
- /*
- * may be already bound, so don't check for error
- */
-.ft CW
- bind(s, &addr, len);
- if (getsockname(s, &addr, &len)< 0) {
- perror("getsockname");
- return (0);
- }
- while (!pmap_set(prognum++, vers, proto,
- ntohs(addr.sin_port))) continue;
- return (prognum-1);
-}
-.vs
-.DE
-.SH
-Note:
-.I
-The call to
-.I ntohs()
-is necessary to ensure that the port number in
-.I "addr.sin_port" ,
-which is in
-.I network
-byte order, is passed in
-.I host
-byte order (as
-.I pmap_set()
-expects). See the
-.I byteorder(3N)
-man page for more details on the conversion of network
-addresses from network to host byte order.
-.KS
-.LP
-The following pair of programs illustrate how to use the
-.I gettransient()
-routine.
-The client makes an RPC call to the server,
-passing it a transient program number.
-Then the client waits around to receive a callback
-from the server at that program number.
-The server registers the program
-.I EXAMPLEPROG
-so that it can receive the RPC call
-informing it of the callback program number.
-Then at some random time (on receiving an
-.I ALRM
-signal in this example), it sends a callback RPC call,
-using the program number it received earlier.
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
- * client
- */
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h>
-
-int callback();
-char hostname[256];
-
-main()
-{
- int x, ans, s;
- SVCXPRT *xprt;
-
- gethostname(hostname, sizeof(hostname));
- s = RPC_ANYSOCK;
- x = gettransient(IPPROTO_UDP, 1, &s);
- fprintf(stderr, "client gets prognum %d\en", x);
- if ((xprt = svcudp_create(s)) == NULL) {
- fprintf(stderr, "rpc_server: svcudp_create\en");
- exit(1);
- }
-.ft I
- /* protocol is 0 - gettransient does registering
- */
-.ft CW
- (void)svc_register(xprt, x, 1, callback, 0);
- ans = callrpc(hostname, EXAMPLEPROG, EXAMPLEVERS,
- EXAMPLEPROC_CALLBACK, xdr_int, &x, xdr_void, 0);
- if ((enum clnt_stat) ans != RPC_SUCCESS) {
- fprintf(stderr, "call: ");
- clnt_perrno(ans);
- fprintf(stderr, "\en");
- }
- svc_run();
- fprintf(stderr, "Error: svc_run shouldn't return\en");
-}
-
-callback(rqstp, transp)
- register struct svc_req *rqstp;
- register SVCXPRT *transp;
-{
- switch (rqstp->rq_proc) {
- case 0:
- if (!svc_sendreply(transp, xdr_void, 0)) {
- fprintf(stderr, "err: exampleprog\en");
- return (1);
- }
- return (0);
- case 1:
- if (!svc_getargs(transp, xdr_void, 0)) {
- svcerr_decode(transp);
- return (1);
- }
- fprintf(stderr, "client got callback\en");
- if (!svc_sendreply(transp, xdr_void, 0)) {
- fprintf(stderr, "err: exampleprog");
- return (1);
- }
- }
-}
-.vs
-.DE
-.KE
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
- * server
- */
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h>
-#include <sys/signal.h>
-
-char *getnewprog();
-char hostname[256];
-int docallback();
-int pnum; /* \fIprogram number for callback routine\fP */
-
-main()
-{
- gethostname(hostname, sizeof(hostname));
- registerrpc(EXAMPLEPROG, EXAMPLEVERS,
- EXAMPLEPROC_CALLBACK, getnewprog, xdr_int, xdr_void);
- fprintf(stderr, "server going into svc_run\en");
- signal(SIGALRM, docallback);
- alarm(10);
- svc_run();
- fprintf(stderr, "Error: svc_run shouldn't return\en");
-}
-
-char *
-getnewprog(pnump)
- char *pnump;
-{
- pnum = *(int *)pnump;
- return NULL;
-}
-
-docallback()
-{
- int ans;
-
- ans = callrpc(hostname, pnum, 1, 1, xdr_void, 0,
- xdr_void, 0);
- if (ans != 0) {
- fprintf(stderr, "server: ");
- clnt_perrno(ans);
- fprintf(stderr, "\en");
- }
-}
-.vs
-.DE
diff --git a/lib/libc/rpc/PSD.doc/rpc.rfc.ms b/lib/libc/rpc/PSD.doc/rpc.rfc.ms
deleted file mode 100644
index af9c2df..0000000
--- a/lib/libc/rpc/PSD.doc/rpc.rfc.ms
+++ /dev/null
@@ -1,1302 +0,0 @@
-.\"
-.\" Must use -- tbl -- with this one
-.\"
-.\" @(#)rpc.rfc.ms 2.2 88/08/05 4.0 RPCSRC
-.de BT
-.if \\n%=1 .tl ''- % -''
-..
-.ND
-.\" prevent excess underlining in nroff
-.if n .fp 2 R
-.OH 'Remote Procedure Calls: Protocol Specification''Page %'
-.EH 'Page %''Remote Procedure Calls: Protocol Specification'
-.if \\n%=1 .bp
-.SH
-\&Remote Procedure Calls: Protocol Specification
-.LP
-.NH 0
-\&Status of this Memo
-.LP
-Note: This chapter specifies a protocol that Sun Microsystems, Inc.,
-and others are using.
-It has been designated RFC1050 by the ARPA Network
-Information Center.
-.LP
-.NH 1
-\&Introduction
-.LP
-This chapter specifies a message protocol used in implementing
-Sun's Remote Procedure Call (RPC) package. (The message protocol is
-specified with the External Data Representation (XDR) language.
-See the
-.I "External Data Representation Standard: Protocol Specification"
-for the details. Here, we assume that the reader is familiar
-with XDR and do not attempt to justify it or its uses). The paper
-by Birrell and Nelson [1] is recommended as an excellent background
-to and justification of RPC.
-.NH 2
-\&Terminology
-.LP
-This chapter discusses servers, services, programs, procedures,
-clients, and versions. A server is a piece of software where network
-services are implemented. A network service is a collection of one
-or more remote programs. A remote program implements one or more
-remote procedures; the procedures, their parameters, and results are
-documented in the specific program's protocol specification (see the
-\fIPort Mapper Program Protocol\fP\, below, for an example). Network
-clients are pieces of software that initiate remote procedure calls
-to services. A server may support more than one version of a remote
-program in order to be forward compatible with changing protocols.
-.LP
-For example, a network file service may be composed of two programs.
-One program may deal with high-level applications such as file system
-access control and locking. The other may deal with low-level file
-IO and have procedures like "read" and "write". A client machine of
-the network file service would call the procedures associated with
-the two programs of the service on behalf of some user on the client
-machine.
-.NH 2
-\&The RPC Model
-.LP
-The remote procedure call model is similar to the local procedure
-call model. In the local case, the caller places arguments to a
-procedure in some well-specified location (such as a result
-register). It then transfers control to the procedure, and
-eventually gains back control. At that point, the results of the
-procedure are extracted from the well-specified location, and the
-caller continues execution.
-.LP
-The remote procedure call is similar, in that one thread of control
-logically winds through two processes\(emone is the caller's process,
-the other is a server's process. That is, the caller process sends a
-call message to the server process and waits (blocks) for a reply
-message. The call message contains the procedure's parameters, among
-other things. The reply message contains the procedure's results,
-among other things. Once the reply message is received, the results
-of the procedure are extracted, and caller's execution is resumed.
-.LP
-On the server side, a process is dormant awaiting the arrival of a
-call message. When one arrives, the server process extracts the
-procedure's parameters, computes the results, sends a reply message,
-and then awaits the next call message.
-.LP
-Note that in this model, only one of the two processes is active at
-any given time. However, this model is only given as an example.
-The RPC protocol makes no restrictions on the concurrency model
-implemented, and others are possible. For example, an implementation
-may choose to have RPC calls be asynchronous, so that the client may
-do useful work while waiting for the reply from the server. Another
-possibility is to have the server create a task to process an
-incoming request, so that the server can be free to receive other
-requests.
-.NH 2
-\&Transports and Semantics
-.LP
-The RPC protocol is independent of transport protocols. That is, RPC
-does not care how a message is passed from one process to another.
-The protocol deals only with specification and interpretation of
-messages.
-.LP
-It is important to point out that RPC does not try to implement any
-kind of reliability and that the application must be aware of the
-type of transport protocol underneath RPC. If it knows it is running
-on top of a reliable transport such as TCP/IP[6], then most of the
-work is already done for it. On the other hand, if it is running on
-top of an unreliable transport such as UDP/IP[7], it must implement
-is own retransmission and time-out policy as the RPC layer does not
-provide this service.
-.LP
-Because of transport independence, the RPC protocol does not attach
-specific semantics to the remote procedures or their execution.
-Semantics can be inferred from (but should be explicitly specified
-by) the underlying transport protocol. For example, consider RPC
-running on top of an unreliable transport such as UDP/IP. If an
-application retransmits RPC messages after short time-outs, the only
-thing it can infer if it receives no reply is that the procedure was
-executed zero or more times. If it does receive a reply, then it can
-infer that the procedure was executed at least once.
-.LP
-A server may wish to remember previously granted requests from a
-client and not regrant them in order to insure some degree of
-execute-at-most-once semantics. A server can do this by taking
-advantage of the transaction ID that is packaged with every RPC
-request. The main use of this transaction is by the client RPC layer
-in matching replies to requests. However, a client application may
-choose to reuse its previous transaction ID when retransmitting a
-request. The server application, knowing this fact, may choose to
-remember this ID after granting a request and not regrant requests
-with the same ID in order to achieve some degree of
-execute-at-most-once semantics. The server is not allowed to examine
-this ID in any other way except as a test for equality.
-.LP
-On the other hand, if using a reliable transport such as TCP/IP, the
-application can infer from a reply message that the procedure was
-executed exactly once, but if it receives no reply message, it cannot
-assume the remote procedure was not executed. Note that even if a
-connection-oriented protocol like TCP is used, an application still
-needs time-outs and reconnection to handle server crashes.
-.LP
-There are other possibilities for transports besides datagram- or
-connection-oriented protocols. For example, a request-reply protocol
-such as VMTP[2] is perhaps the most natural transport for RPC.
-.SH
-.I
-NOTE: At Sun, RPC is currently implemented on top of both TCP/IP
-and UDP/IP transports.
-.LP
-.NH 2
-\&Binding and Rendezvous Independence
-.LP
-The act of binding a client to a service is NOT part of the remote
-procedure call specification. This important and necessary function
-is left up to some higher-level software. (The software may use RPC
-itself\(emsee the \fIPort Mapper Program Protocol\fP\, below).
-.LP
-Implementors should think of the RPC protocol as the jump-subroutine
-instruction ("JSR") of a network; the loader (binder) makes JSR
-useful, and the loader itself uses JSR to accomplish its task.
-Likewise, the network makes RPC useful, using RPC to accomplish this
-task.
-.NH 2
-\&Authentication
-.LP
-The RPC protocol provides the fields necessary for a client to
-identify itself to a service and vice-versa. Security and access
-control mechanisms can be built on top of the message authentication.
-Several different authentication protocols can be supported. A field
-in the RPC header indicates which protocol is being used. More
-information on specific authentication protocols can be found in the
-\fIAuthentication Protocols\fP\,
-below.
-.KS
-.NH 1
-\&RPC Protocol Requirements
-.LP
-The RPC protocol must provide for the following:
-.IP 1.
-Unique specification of a procedure to be called.
-.IP 2.
-Provisions for matching response messages to request messages.
-.KE
-.IP 3.
-Provisions for authenticating the caller to service and vice-versa.
-.LP
-Besides these requirements, features that detect the following are
-worth supporting because of protocol roll-over errors, implementation
-bugs, user error, and network administration:
-.IP 1.
-RPC protocol mismatches.
-.IP 2.
-Remote program protocol version mismatches.
-.IP 3.
-Protocol errors (such as misspecification of a procedure's parameters).
-.IP 4.
-Reasons why remote authentication failed.
-.IP 5.
-Any other reasons why the desired procedure was not called.
-.NH 2
-\&Programs and Procedures
-.LP
-The RPC call message has three unsigned fields: remote program
-number, remote program version number, and remote procedure number.
-The three fields uniquely identify the procedure to be called.
-Program numbers are administered by some central authority (like
-Sun). Once an implementor has a program number, he can implement his
-remote program; the first implementation would most likely have the
-version number of 1. Because most new protocols evolve into better,
-stable, and mature protocols, a version field of the call message
-identifies which version of the protocol the caller is using.
-Version numbers make speaking old and new protocols through the same
-server process possible.
-.LP
-The procedure number identifies the procedure to be called. These
-numbers are documented in the specific program's protocol
-specification. For example, a file service's protocol specification
-may state that its procedure number 5 is "read" and procedure number
-12 is "write".
-.LP
-Just as remote program protocols may change over several versions,
-the actual RPC message protocol could also change. Therefore, the
-call message also has in it the RPC version number, which is always
-equal to two for the version of RPC described here.
-.LP
-The reply message to a request message has enough information to
-distinguish the following error conditions:
-.IP 1.
-The remote implementation of RPC does speak protocol version 2.
-The lowest and highest supported RPC version numbers are returned.
-.IP 2.
-The remote program is not available on the remote system.
-.IP 3.
-The remote program does not support the requested version number.
-The lowest and highest supported remote program version numbers are
-returned.
-.IP 4.
-The requested procedure number does not exist. (This is usually a
-caller side protocol or programming error.)
-.IP 5.
-The parameters to the remote procedure appear to be garbage from the
-server's point of view. (Again, this is usually caused by a
-disagreement about the protocol between client and service.)
-.NH 2
-\&Authentication
-.LP
-Provisions for authentication of caller to service and vice-versa are
-provided as a part of the RPC protocol. The call message has two
-authentication fields, the credentials and verifier. The reply
-message has one authentication field, the response verifier. The RPC
-protocol specification defines all three fields to be the following
-opaque type:
-.DS
-.ft CW
-.vs 11
-enum auth_flavor {
- AUTH_NULL = 0,
- AUTH_UNIX = 1,
- AUTH_SHORT = 2,
- AUTH_DES = 3
- /* \fIand more to be defined\fP */
-};
-
-struct opaque_auth {
- auth_flavor flavor;
- opaque body<400>;
-};
-.DE
-.LP
-In simple English, any
-.I opaque_auth
-structure is an
-.I auth_flavor
-enumeration followed by bytes which are opaque to the RPC protocol
-implementation.
-.LP
-The interpretation and semantics of the data contained within the
-authentication fields is specified by individual, independent
-authentication protocol specifications. (See
-\fIAuthentication Protocols\fP\,
-below, for definitions of the various authentication protocols.)
-.LP
-If authentication parameters were rejected, the response message
-contains information stating why they were rejected.
-.NH 2
-\&Program Number Assignment
-.LP
-Program numbers are given out in groups of
-.I 0x20000000
-(decimal 536870912) according to the following chart:
-.TS
-box tab (&) ;
-lfI lfI
-rfL cfI .
-Program Numbers&Description
-_
-.sp .5
-0 - 1fffffff&Defined by Sun
-20000000 - 3fffffff&Defined by user
-40000000 - 5fffffff&Transient
-60000000 - 7fffffff&Reserved
-80000000 - 9fffffff&Reserved
-a0000000 - bfffffff&Reserved
-c0000000 - dfffffff&Reserved
-e0000000 - ffffffff&Reserved
-.TE
-.LP
-The first group is a range of numbers administered by Sun
-Microsystems and should be identical for all sites. The second range
-is for applications peculiar to a particular site. This range is
-intended primarily for debugging new programs. When a site develops
-an application that might be of general interest, that application
-should be given an assigned number in the first range. The third
-group is for applications that generate program numbers dynamically.
-The final groups are reserved for future use, and should not be used.
-.NH 2
-\&Other Uses of the RPC Protocol
-.LP
-The intended use of this protocol is for calling remote procedures.
-That is, each call message is matched with a response message.
-However, the protocol itself is a message-passing protocol with which
-other (non-RPC) protocols can be implemented. Sun currently uses, or
-perhaps abuses, the RPC message protocol for the following two
-(non-RPC) protocols: batching (or pipelining) and broadcast RPC.
-These two protocols are discussed but not defined below.
-.NH 3
-\&Batching
-.LP
-Batching allows a client to send an arbitrarily large sequence of
-call messages to a server; batching typically uses reliable byte
-stream protocols (like TCP/IP) for its transport. In the case of
-batching, the client never waits for a reply from the server, and the
-server does not send replies to batch requests. A sequence of batch
-calls is usually terminated by a legitimate RPC in order to flush the
-pipeline (with positive acknowledgement).
-.NH 3
-\&Broadcast RPC
-.LP
-In broadcast RPC-based protocols, the client sends a broadcast packet
-to the network and waits for numerous replies. Broadcast RPC uses
-unreliable, packet-based protocols (like UDP/IP) as its transports.
-Servers that support broadcast protocols only respond when the
-request is successfully processed, and are silent in the face of
-errors. Broadcast RPC uses the Port Mapper RPC service to achieve
-its semantics. See the \fIPort Mapper Program Protocol\fP\, below,
-for more information.
-.KS
-.NH 1
-\&The RPC Message Protocol
-.LP
-This section defines the RPC message protocol in the XDR data
-description language. The message is defined in a top-down style.
-.ie t .DS
-.el .DS L
-.ft CW
-enum msg_type {
- CALL = 0,
- REPLY = 1
-};
-
-.ft I
-/*
-* A reply to a call message can take on two forms:
-* The message was either accepted or rejected.
-*/
-.ft CW
-enum reply_stat {
- MSG_ACCEPTED = 0,
- MSG_DENIED = 1
-};
-
-.ft I
-/*
-* Given that a call message was accepted, the following is the
-* status of an attempt to call a remote procedure.
-*/
-.ft CW
-enum accept_stat {
- SUCCESS = 0, /* \fIRPC executed successfully \fP*/
- PROG_UNAVAIL = 1, /* \fIremote hasn't exported program \fP*/
- PROG_MISMATCH = 2, /* \fIremote can't support version # \fP*/
- PROC_UNAVAIL = 3, /* \fIprogram can't support procedure \fP*/
- GARBAGE_ARGS = 4 /* \fIprocedure can't decode params \fP*/
-};
-.DE
-.ie t .DS
-.el .DS L
-.ft I
-/*
-* Reasons why a call message was rejected:
-*/
-.ft CW
-enum reject_stat {
- RPC_MISMATCH = 0, /* \fIRPC version number != 2 \fP*/
- AUTH_ERROR = 1 /* \fIremote can't authenticate caller \fP*/
-};
-
-.ft I
-/*
-* Why authentication failed:
-*/
-.ft CW
-enum auth_stat {
- AUTH_BADCRED = 1, /* \fIbad credentials \fP*/
- AUTH_REJECTEDCRED = 2, /* \fIclient must begin new session \fP*/
- AUTH_BADVERF = 3, /* \fIbad verifier \fP*/
- AUTH_REJECTEDVERF = 4, /* \fIverifier expired or replayed \fP*/
- AUTH_TOOWEAK = 5 /* \fIrejected for security reasons \fP*/
-};
-.DE
-.KE
-.ie t .DS
-.el .DS L
-.ft I
-/*
-* The RPC message:
-* All messages start with a transaction identifier, xid,
-* followed by a two-armed discriminated union. The union's
-* discriminant is a msg_type which switches to one of the two
-* types of the message. The xid of a \fIREPLY\fP message always
-* matches that of the initiating \fICALL\fP message. NB: The xid
-* field is only used for clients matching reply messages with
-* call messages or for servers detecting retransmissions; the
-* service side cannot treat this id as any type of sequence
-* number.
-*/
-.ft CW
-struct rpc_msg {
- unsigned int xid;
- union switch (msg_type mtype) {
- case CALL:
- call_body cbody;
- case REPLY:
- reply_body rbody;
- } body;
-};
-.DE
-.ie t .DS
-.el .DS L
-.ft I
-/*
-* Body of an RPC request call:
-* In version 2 of the RPC protocol specification, rpcvers must
-* be equal to 2. The fields prog, vers, and proc specify the
-* remote program, its version number, and the procedure within
-* the remote program to be called. After these fields are two
-* authentication parameters: cred (authentication credentials)
-* and verf (authentication verifier). The two authentication
-* parameters are followed by the parameters to the remote
-* procedure, which are specified by the specific program
-* protocol.
-*/
-.ft CW
-struct call_body {
- unsigned int rpcvers; /* \fImust be equal to two (2) \fP*/
- unsigned int prog;
- unsigned int vers;
- unsigned int proc;
- opaque_auth cred;
- opaque_auth verf;
- /* \fIprocedure specific parameters start here \fP*/
-};
-.DE
-.ie t .DS
-.el .DS L
-.ft I
-/*
-* Body of a reply to an RPC request:
-* The call message was either accepted or rejected.
-*/
-.ft CW
-union reply_body switch (reply_stat stat) {
- case MSG_ACCEPTED:
- accepted_reply areply;
- case MSG_DENIED:
- rejected_reply rreply;
-} reply;
-.DE
-.ie t .DS
-.el .DS L
-.ft I
-/*
-* Reply to an RPC request that was accepted by the server:
-* there could be an error even though the request was accepted.
-* The first field is an authentication verifier that the server
-* generates in order to validate itself to the caller. It is
-* followed by a union whose discriminant is an enum
-* accept_stat. The \fISUCCESS\fP arm of the union is protocol
-* specific. The \fIPROG_UNAVAIL\fP, \fIPROC_UNAVAIL\fP, and \fIGARBAGE_ARGP\fP
-* arms of the union are void. The \fIPROG_MISMATCH\fP arm specifies
-* the lowest and highest version numbers of the remote program
-* supported by the server.
-*/
-.ft CW
-struct accepted_reply {
- opaque_auth verf;
- union switch (accept_stat stat) {
- case SUCCESS:
- opaque results[0];
- /* \fIprocedure-specific results start here\fP */
- case PROG_MISMATCH:
- struct {
- unsigned int low;
- unsigned int high;
- } mismatch_info;
- default:
-.ft I
- /*
- * Void. Cases include \fIPROG_UNAVAIL, PROC_UNAVAIL\fP,
- * and \fIGARBAGE_ARGS\fP.
- */
-.ft CW
- void;
- } reply_data;
-};
-.DE
-.ie t .DS
-.el .DS L
-.ft I
-/*
-* Reply to an RPC request that was rejected by the server:
-* The request can be rejected for two reasons: either the
-* server is not running a compatible version of the RPC
-* protocol (\fIRPC_MISMATCH\fP), or the server refuses to
-* authenticate the caller (\fIAUTH_ERROR\fP). In case of an RPC
-* version mismatch, the server returns the lowest and highest
-* supported RPC version numbers. In case of refused
-* authentication, failure status is returned.
-*/
-.ft CW
-union rejected_reply switch (reject_stat stat) {
- case RPC_MISMATCH:
- struct {
- unsigned int low;
- unsigned int high;
- } mismatch_info;
- case AUTH_ERROR:
- auth_stat stat;
-};
-.DE
-.NH 1
-\&Authentication Protocols
-.LP
-As previously stated, authentication parameters are opaque, but
-open-ended to the rest of the RPC protocol. This section defines
-some "flavors" of authentication implemented at (and supported by)
-Sun. Other sites are free to invent new authentication types, with
-the same rules of flavor number assignment as there is for program
-number assignment.
-.NH 2
-\&Null Authentication
-.LP
-Often calls must be made where the caller does not know who he is or
-the server does not care who the caller is. In this case, the flavor
-value (the discriminant of the \fIopaque_auth\fP's union) of the RPC
-message's credentials, verifier, and response verifier is
-.I AUTH_NULL .
-The bytes of the opaque_auth's body are undefined.
-It is recommended that the opaque length be zero.
-.NH 2
-\&UNIX Authentication
-.LP
-The caller of a remote procedure may wish to identify himself as he
-is identified on a UNIX system. The value of the credential's
-discriminant of an RPC call message is
-.I AUTH_UNIX .
-The bytes of
-the credential's opaque body encode the following structure:
-.DS
-.ft CW
-struct auth_unix {
- unsigned int stamp;
- string machinename<255>;
- unsigned int uid;
- unsigned int gid;
- unsigned int gids<10>;
-};
-.DE
-The
-.I stamp
-is an arbitrary ID which the caller machine may
-generate. The
-.I machinename
-is the name of the caller's machine (like "krypton"). The
-.I uid
-is the caller's effective user ID. The
-.I gid
-is the caller's effective group ID. The
-.I gids
-is a
-counted array of groups which contain the caller as a member. The
-verifier accompanying the credentials should be of
-.I AUTH_NULL
-(defined above).
-.LP
-The value of the discriminant of the response verifier received in
-the reply message from the server may be
-.I AUTH_NULL
-or
-.I AUTH_SHORT .
-In the case of
-.I AUTH_SHORT ,
-the bytes of the response verifier's string encode an opaque
-structure. This new opaque structure may now be passed to the server
-instead of the original
-.I AUTH_UNIX
-flavor credentials. The server keeps a cache which maps shorthand
-opaque structures (passed back by way of an
-.I AUTH_SHORT
-style response verifier) to the original credentials of the caller.
-The caller can save network bandwidth and server cpu cycles by using
-the new credentials.
-.LP
-The server may flush the shorthand opaque structure at any time. If
-this happens, the remote procedure call message will be rejected due
-to an authentication error. The reason for the failure will be
-.I AUTH_REJECTEDCRED .
-At this point, the caller may wish to try the original
-.I AUTH_UNIX
-style of credentials.
-.KS
-.NH 2
-\&DES Authentication
-.LP
-UNIX authentication suffers from two major problems:
-.IP 1.
-The naming is too UNIX-system oriented.
-.IP 2.
-There is no verifier, so credentials can easily be faked.
-.LP
-DES authentication attempts to fix these two problems.
-.KE
-.NH 3
-\&Naming
-.LP
-The first problem is handled by addressing the caller by a simple
-string of characters instead of by an operating system specific
-integer. This string of characters is known as the "netname" or
-network name of the caller. The server is not allowed to interpret
-the contents of the caller's name in any other way except to
-identify the caller. Thus, netnames should be unique for every
-caller in the internet.
-.LP
-It is up to each operating system's implementation of DES
-authentication to generate netnames for its users that insure this
-uniqueness when they call upon remote servers. Operating systems
-already know how to distinguish users local to their systems. It is
-usually a simple matter to extend this mechanism to the network.
-For example, a UNIX user at Sun with a user ID of 515 might be
-assigned the following netname: "unix.515@sun.com". This netname
-contains three items that serve to insure it is unique. Going
-backwards, there is only one naming domain called "sun.com" in the
-internet. Within this domain, there is only one UNIX user with
-user ID 515. However, there may be another user on another
-operating system, for example VMS, within the same naming domain
-that, by coincidence, happens to have the same user ID. To insure
-that these two users can be distinguished we add the operating
-system name. So one user is "unix.515@sun.com" and the other is
-"vms.515@sun.com".
-.LP
-The first field is actually a naming method rather than an
-operating system name. It just happens that today there is almost
-a one-to-one correspondence between naming methods and operating
-systems. If the world could agree on a naming standard, the first
-field could be the name of that standard, instead of an operating
-system name.
-.LP
-.NH 3
-\&DES Authentication Verifiers
-.LP
-Unlike UNIX authentication, DES authentication does have a verifier
-so the server can validate the client's credential (and
-vice-versa). The contents of this verifier is primarily an
-encrypted timestamp. The server can decrypt this timestamp, and if
-it is close to what the real time is, then the client must have
-encrypted it correctly. The only way the client could encrypt it
-correctly is to know the "conversation key" of the RPC session. And
-if the client knows the conversation key, then it must be the real
-client.
-.LP
-The conversation key is a DES [5] key which the client generates
-and notifies the server of in its first RPC call. The conversation
-key is encrypted using a public key scheme in this first
-transaction. The particular public key scheme used in DES
-authentication is Diffie-Hellman [3] with 192-bit keys. The
-details of this encryption method are described later.
-.LP
-The client and the server need the same notion of the current time
-in order for all of this to work. If network time synchronization
-cannot be guaranteed, then client can synchronize with the server
-before beginning the conversation, perhaps by consulting the
-Internet Time Server (TIME[4]).
-.LP
-The way a server determines if a client timestamp is valid is
-somewhat complicated. For any other transaction but the first, the
-server just checks for two things:
-.IP 1.
-the timestamp is greater than the one previously seen from the
-same client.
-.IP 2.
-the timestamp has not expired.
-.LP
-A timestamp is expired if the server's time is later than the sum
-of the client's timestamp plus what is known as the client's
-"window". The "window" is a number the client passes (encrypted)
-to the server in its first transaction. You can think of it as a
-lifetime for the credential.
-.LP
-This explains everything but the first transaction. In the first
-transaction, the server checks only that the timestamp has not
-expired. If this was all that was done though, then it would be
-quite easy for the client to send random data in place of the
-timestamp with a fairly good chance of succeeding. As an added
-check, the client sends an encrypted item in the first transaction
-known as the "window verifier" which must be equal to the window
-minus 1, or the server will reject the credential.
-.LP
-The client too must check the verifier returned from the server to
-be sure it is legitimate. The server sends back to the client the
-encrypted timestamp it received from the client, minus one second.
-If the client gets anything different than this, it will reject it.
-.LP
-.NH 3
-\&Nicknames and Clock Synchronization
-.LP
-After the first transaction, the server's DES authentication
-subsystem returns in its verifier to the client an integer
-"nickname" which the client may use in its further transactions
-instead of passing its netname, encrypted DES key and window every
-time. The nickname is most likely an index into a table on the
-server which stores for each client its netname, decrypted DES key
-and window.
-.LP
-Though they originally were synchronized, the client's and server's
-clocks can get out of sync again. When this happens the client RPC
-subsystem most likely will get back
-.I RPC_AUTHERROR
-at which point it should resynchronize.
-.LP
-A client may still get the
-.I RPC_AUTHERROR
-error even though it is
-synchronized with the server. The reason is that the server's
-nickname table is a limited size, and it may flush entries whenever
-it wants. A client should resend its original credential in this
-case and the server will give it a new nickname. If a server
-crashes, the entire nickname table gets flushed, and all clients
-will have to resend their original credentials.
-.KS
-.NH 3
-\&DES Authentication Protocol (in XDR language)
-.ie t .DS
-.el .DS L
-.ft I
-/*
-* There are two kinds of credentials: one in which the client uses
-* its full network name, and one in which it uses its "nickname"
-* (just an unsigned integer) given to it by the server. The
-* client must use its fullname in its first transaction with the
-* server, in which the server will return to the client its
-* nickname. The client may use its nickname in all further
-* transactions with the server. There is no requirement to use the
-* nickname, but it is wise to use it for performance reasons.
-*/
-.ft CW
-enum authdes_namekind {
- ADN_FULLNAME = 0,
- ADN_NICKNAME = 1
-};
-
-.ft I
-/*
-* A 64-bit block of encrypted DES data
-*/
-.ft CW
-typedef opaque des_block[8];
-
-.ft I
-/*
-* Maximum length of a network user's name
-*/
-.ft CW
-const MAXNETNAMELEN = 255;
-
-.ft I
-/*
-* A fullname contains the network name of the client, an encrypted
-* conversation key and the window. The window is actually a
-* lifetime for the credential. If the time indicated in the
-* verifier timestamp plus the window has past, then the server
-* should expire the request and not grant it. To insure that
-* requests are not replayed, the server should insist that
-* timestamps are greater than the previous one seen, unless it is
-* the first transaction. In the first transaction, the server
-* checks instead that the window verifier is one less than the
-* window.
-*/
-.ft CW
-struct authdes_fullname {
-string name<MAXNETNAMELEN>; /* \fIname of client \f(CW*/
-des_block key; /* \fIPK encrypted conversation key \f(CW*/
-unsigned int window; /* \fIencrypted window \f(CW*/
-};
-
-.ft I
-/*
-* A credential is either a fullname or a nickname
-*/
-.ft CW
-union authdes_cred switch (authdes_namekind adc_namekind) {
- case ADN_FULLNAME:
- authdes_fullname adc_fullname;
- case ADN_NICKNAME:
- unsigned int adc_nickname;
-};
-
-.ft I
-/*
-* A timestamp encodes the time since midnight, January 1, 1970.
-*/
-.ft CW
-struct timestamp {
- unsigned int seconds; /* \fIseconds \fP*/
- unsigned int useconds; /* \fIand microseconds \fP*/
-};
-
-.ft I
-/*
-* Verifier: client variety
-* The window verifier is only used in the first transaction. In
-* conjunction with a fullname credential, these items are packed
-* into the following structure before being encrypted:
-*
-* \f(CWstruct {\fP
-* \f(CWadv_timestamp; \fP-- one DES block
-* \f(CWadc_fullname.window; \fP-- one half DES block
-* \f(CWadv_winverf; \fP-- one half DES block
-* \f(CW}\fP
-* This structure is encrypted using CBC mode encryption with an
-* input vector of zero. All other encryptions of timestamps use
-* ECB mode encryption.
-*/
-.ft CW
-struct authdes_verf_clnt {
- timestamp adv_timestamp; /* \fIencrypted timestamp \fP*/
- unsigned int adv_winverf; /* \fIencrypted window verifier \fP*/
-};
-
-.ft I
-/*
-* Verifier: server variety
-* The server returns (encrypted) the same timestamp the client
-* gave it minus one second. It also tells the client its nickname
-* to be used in future transactions (unencrypted).
-*/
-.ft CW
-struct authdes_verf_svr {
-timestamp adv_timeverf; /* \fIencrypted verifier \fP*/
-unsigned int adv_nickname; /* \fInew nickname for client \fP*/
-};
-.DE
-.KE
-.NH 3
-\&Diffie-Hellman Encryption
-.LP
-In this scheme, there are two constants,
-.I BASE
-and
-.I MODULUS .
-The
-particular values Sun has chosen for these for the DES
-authentication protocol are:
-.ie t .DS
-.el .DS L
-.ft CW
-const BASE = 3;
-const MODULUS =
- "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b"; /* \fIhex \fP*/
-.DE
-.ft R
-The way this scheme works is best explained by an example. Suppose
-there are two people "A" and "B" who want to send encrypted
-messages to each other. So, A and B both generate "secret" keys at
-random which they do not reveal to anyone. Let these keys be
-represented as SK(A) and SK(B). They also publish in a public
-directory their "public" keys. These keys are computed as follows:
-.ie t .DS
-.el .DS L
-.ft CW
-PK(A) = ( BASE ** SK(A) ) mod MODULUS
-PK(B) = ( BASE ** SK(B) ) mod MODULUS
-.DE
-.ft R
-The "**" notation is used here to represent exponentiation. Now,
-both A and B can arrive at the "common" key between them,
-represented here as CK(A, B), without revealing their secret keys.
-.LP
-A computes:
-.ie t .DS
-.el .DS L
-.ft CW
-CK(A, B) = ( PK(B) ** SK(A)) mod MODULUS
-.DE
-.ft R
-while B computes:
-.ie t .DS
-.el .DS L
-.ft CW
-CK(A, B) = ( PK(A) ** SK(B)) mod MODULUS
-.DE
-.ft R
-These two can be shown to be equivalent:
-.ie t .DS
-.el .DS L
-.ft CW
-(PK(B) ** SK(A)) mod MODULUS = (PK(A) ** SK(B)) mod MODULUS
-.DE
-.ft R
-We drop the "mod MODULUS" parts and assume modulo arithmetic to
-simplify things:
-.ie t .DS
-.el .DS L
-.ft CW
-PK(B) ** SK(A) = PK(A) ** SK(B)
-.DE
-.ft R
-Then, replace PK(B) by what B computed earlier and likewise for
-PK(A).
-.ie t .DS
-.el .DS L
-.ft CW
-((BASE ** SK(B)) ** SK(A) = (BASE ** SK(A)) ** SK(B)
-.DE
-.ft R
-which leads to:
-.ie t .DS
-.el .DS L
-.ft CW
-BASE ** (SK(A) * SK(B)) = BASE ** (SK(A) * SK(B))
-.DE
-.ft R
-This common key CK(A, B) is not used to encrypt the timestamps used
-in the protocol. Rather, it is used only to encrypt a conversation
-key which is then used to encrypt the timestamps. The reason for
-doing this is to use the common key as little as possible, for fear
-that it could be broken. Breaking the conversation key is a far
-less serious offense, since conversations are relatively
-short-lived.
-.LP
-The conversation key is encrypted using 56-bit DES keys, yet the
-common key is 192 bits. To reduce the number of bits, 56 bits are
-selected from the common key as follows. The middle-most 8-bytes
-are selected from the common key, and then parity is added to the
-lower order bit of each byte, producing a 56-bit key with 8 bits of
-parity.
-.KS
-.NH 1
-\&Record Marking Standard
-.LP
-When RPC messages are passed on top of a byte stream protocol (like
-TCP/IP), it is necessary, or at least desirable, to delimit one
-message from another in order to detect and possibly recover from
-user protocol errors. This is called record marking (RM). Sun uses
-this RM/TCP/IP transport for passing RPC messages on TCP streams.
-One RPC message fits into one RM record.
-.LP
-A record is composed of one or more record fragments. A record
-fragment is a four-byte header followed by 0 to (2**31) - 1 bytes of
-fragment data. The bytes encode an unsigned binary number; as with
-XDR integers, the byte order is from highest to lowest. The number
-encodes two values\(ema boolean which indicates whether the fragment
-is the last fragment of the record (bit value 1 implies the fragment
-is the last fragment) and a 31-bit unsigned binary value which is the
-length in bytes of the fragment's data. The boolean value is the
-highest-order bit of the header; the length is the 31 low-order bits.
-(Note that this record specification is NOT in XDR standard form!)
-.KE
-.KS
-.NH 1
-\&The RPC Language
-.LP
-Just as there was a need to describe the XDR data-types in a formal
-language, there is also need to describe the procedures that operate
-on these XDR data-types in a formal language as well. We use the RPC
-Language for this purpose. It is an extension to the XDR language.
-The following example is used to describe the essence of the
-language.
-.NH 2
-\&An Example Service Described in the RPC Language
-.LP
-Here is an example of the specification of a simple ping program.
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
-* Simple ping program
-*/
-.ft CW
-program PING_PROG {
- /* \fILatest and greatest version\fP */
- version PING_VERS_PINGBACK {
- void
- PINGPROC_NULL(void) = 0;
-
-.ft I
- /*
- * Ping the caller, return the round-trip time
- * (in microseconds). Returns -1 if the operation
- * timed out.
- */
-.ft CW
- int
- PINGPROC_PINGBACK(void) = 1;
-} = 2;
-
-.ft I
-/*
-* Original version
-*/
-.ft CW
-version PING_VERS_ORIG {
- void
- PINGPROC_NULL(void) = 0;
- } = 1;
-} = 1;
-
-const PING_VERS = 2; /* \fIlatest version \fP*/
-.vs
-.DE
-.KE
-.LP
-The first version described is
-.I PING_VERS_PINGBACK
-with two procedures,
-.I PINGPROC_NULL
-and
-.I PINGPROC_PINGBACK .
-.I PINGPROC_NULL
-takes no arguments and returns no results, but it is useful for
-computing round-trip times from the client to the server and back
-again. By convention, procedure 0 of any RPC protocol should have
-the same semantics, and never require any kind of authentication.
-The second procedure is used for the client to have the server do a
-reverse ping operation back to the client, and it returns the amount
-of time (in microseconds) that the operation used. The next version,
-.I PING_VERS_ORIG ,
-is the original version of the protocol
-and it does not contain
-.I PINGPROC_PINGBACK
-procedure. It is useful
-for compatibility with old client programs, and as this program
-matures it may be dropped from the protocol entirely.
-.KS
-.NH 2
-\&The RPC Language Specification
-.LP
-The RPC language is identical to the XDR language, except for the
-added definition of a
-.I program-def
-described below.
-.DS
-.ft CW
-program-def:
- "program" identifier "{"
- version-def
- version-def *
- "}" "=" constant ";"
-
-version-def:
- "version" identifier "{"
- procedure-def
- procedure-def *
- "}" "=" constant ";"
-
-procedure-def:
- type-specifier identifier "(" type-specifier ")"
- "=" constant ";"
-.DE
-.KE
-.NH 2
-\&Syntax Notes
-.IP 1.
-The following keywords are added and cannot be used as
-identifiers: "program" and "version";
-.IP 2.
-A version name cannot occur more than once within the scope of
-a program definition. Nor can a version number occur more than once
-within the scope of a program definition.
-.IP 3.
-A procedure name cannot occur more than once within the scope
-of a version definition. Nor can a procedure number occur more than
-once within the scope of version definition.
-.IP 4.
-Program identifiers are in the same name space as constant and
-type identifiers.
-.IP 5.
-Only unsigned constants can be assigned to programs, versions
-and procedures.
-.NH 1
-\&Port Mapper Program Protocol
-.LP
-The port mapper program maps RPC program and version numbers to
-transport-specific port numbers. This program makes dynamic binding
-of remote programs possible.
-.LP
-This is desirable because the range of reserved port numbers is very
-small and the number of potential remote programs is very large. By
-running only the port mapper on a reserved port, the port numbers of
-other remote programs can be ascertained by querying the port mapper.
-.LP
-The port mapper also aids in broadcast RPC. A given RPC program will
-usually have different port number bindings on different machines, so
-there is no way to directly broadcast to all of these programs. The
-port mapper, however, does have a fixed port number. So, to
-broadcast to a given program, the client actually sends its message
-to the port mapper located at the broadcast address. Each port
-mapper that picks up the broadcast then calls the local service
-specified by the client. When the port mapper gets the reply from
-the local service, it sends the reply on back to the client.
-.KS
-.NH 2
-\&Port Mapper Protocol Specification (in RPC Language)
-.ie t .DS
-.el .DS L
-.ft CW
-.vs 11
-const PMAP_PORT = 111; /* \fIportmapper port number \fP*/
-
-.ft I
-/*
-* A mapping of (program, version, protocol) to port number
-*/
-.ft CW
-struct mapping {
- unsigned int prog;
- unsigned int vers;
- unsigned int prot;
- unsigned int port;
-};
-
-.ft I
-/*
-* Supported values for the "prot" field
-*/
-.ft CW
-const IPPROTO_TCP = 6; /* \fIprotocol number for TCP/IP \fP*/
-const IPPROTO_UDP = 17; /* \fIprotocol number for UDP/IP \fP*/
-
-.ft I
-/*
-* A list of mappings
-*/
-.ft CW
-struct *pmaplist {
- mapping map;
- pmaplist next;
-};
-.vs
-.DE
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
-* Arguments to callit
-*/
-.ft CW
-struct call_args {
- unsigned int prog;
- unsigned int vers;
- unsigned int proc;
- opaque args<>;
-};
-
-.ft I
-/*
-* Results of callit
-*/
-.ft CW
-struct call_result {
- unsigned int port;
- opaque res<>;
-};
-.vs
-.DE
-.KE
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
-* Port mapper procedures
-*/
-.ft CW
-program PMAP_PROG {
- version PMAP_VERS {
- void
- PMAPPROC_NULL(void) = 0;
-
- bool
- PMAPPROC_SET(mapping) = 1;
-
- bool
- PMAPPROC_UNSET(mapping) = 2;
-
- unsigned int
- PMAPPROC_GETPORT(mapping) = 3;
-
- pmaplist
- PMAPPROC_DUMP(void) = 4;
-
- call_result
- PMAPPROC_CALLIT(call_args) = 5;
- } = 2;
-} = 100000;
-.vs
-.DE
-.NH 2
-\&Port Mapper Operation
-.LP
-The portmapper program currently supports two protocols (UDP/IP and
-TCP/IP). The portmapper is contacted by talking to it on assigned
-port number 111 (SUNRPC [8]) on either of these protocols. The
-following is a description of each of the portmapper procedures:
-.IP \fBPMAPPROC_NULL:\fP
-This procedure does no work. By convention, procedure zero of any
-protocol takes no parameters and returns no results.
-.IP \fBPMAPPROC_SET:\fP
-When a program first becomes available on a machine, it registers
-itself with the port mapper program on the same machine. The program
-passes its program number "prog", version number "vers", transport
-protocol number "prot", and the port "port" on which it awaits
-service request. The procedure returns a boolean response whose
-value is
-.I TRUE
-if the procedure successfully established the mapping and
-.I FALSE
-otherwise. The procedure refuses to establish
-a mapping if one already exists for the tuple "(prog, vers, prot)".
-.IP \fBPMAPPROC_UNSET:\fP
-When a program becomes unavailable, it should unregister itself with
-the port mapper program on the same machine. The parameters and
-results have meanings identical to those of
-.I PMAPPROC_SET .
-The protocol and port number fields of the argument are ignored.
-.IP \fBPMAPPROC_GETPORT:\fP
-Given a program number "prog", version number "vers", and transport
-protocol number "prot", this procedure returns the port number on
-which the program is awaiting call requests. A port value of zeros
-means the program has not been registered. The "port" field of the
-argument is ignored.
-.IP \fBPMAPPROC_DUMP:\fP
-This procedure enumerates all entries in the port mapper's database.
-The procedure takes no parameters and returns a list of program,
-version, protocol, and port values.
-.IP \fBPMAPPROC_CALLIT:\fP
-This procedure allows a caller to call another remote procedure on
-the same machine without knowing the remote procedure's port number.
-It is intended for supporting broadcasts to arbitrary remote programs
-via the well-known port mapper's port. The parameters "prog",
-"vers", "proc", and the bytes of "args" are the program number,
-version number, procedure number, and parameters of the remote
-procedure.
-.LP
-.B Note:
-.RS
-.IP 1.
-This procedure only sends a response if the procedure was
-successfully executed and is silent (no response) otherwise.
-.IP 2.
-The port mapper communicates with the remote program using UDP/IP
-only.
-.RE
-.LP
-The procedure returns the remote program's port number, and the bytes
-of results are the results of the remote procedure.
-.bp
-.NH 1
-\&References
-.LP
-[1] Birrell, Andrew D. & Nelson, Bruce Jay; "Implementing Remote
-Procedure Calls"; XEROX CSL-83-7, October 1983.
-.LP
-[2] Cheriton, D.; "VMTP: Versatile Message Transaction Protocol",
-Preliminary Version 0.3; Stanford University, January 1987.
-.LP
-[3] Diffie & Hellman; "New Directions in Cryptography"; IEEE
-Transactions on Information Theory IT-22, November 1976.
-.LP
-[4] Harrenstien, K.; "Time Server", RFC 738; Information Sciences
-Institute, October 1977.
-.LP
-[5] National Bureau of Standards; "Data Encryption Standard"; Federal
-Information Processing Standards Publication 46, January 1977.
-.LP
-[6] Postel, J.; "Transmission Control Protocol - DARPA Internet
-Program Protocol Specification", RFC 793; Information Sciences
-Institute, September 1981.
-.LP
-[7] Postel, J.; "User Datagram Protocol", RFC 768; Information Sciences
-Institute, August 1980.
-.LP
-[8] Reynolds, J. & Postel, J.; "Assigned Numbers", RFC 923; Information
-Sciences Institute, October 1984.
diff --git a/lib/libc/rpc/PSD.doc/rpcgen.ms b/lib/libc/rpc/PSD.doc/rpcgen.ms
deleted file mode 100644
index b4e50e5..0000000
--- a/lib/libc/rpc/PSD.doc/rpcgen.ms
+++ /dev/null
@@ -1,1299 +0,0 @@
-.\"
-.\" Must use -- tbl -- for this one
-.\"
-.\" @(#)rpcgen.ms 2.2 88/08/04 4.0 RPCSRC
-.de BT
-.if \\n%=1 .tl ''- % -''
-..
-.ND
-.\" prevent excess underlining in nroff
-.if n .fp 2 R
-.OH '\fBrpcgen\fP Programming Guide''Page %'
-.EH 'Page %''\fBrpcgen\fP Programming Guide'
-.if \\n%=1 .bp
-.SH
-\&\fBrpcgen\fP Programming Guide
-.NH 0
-\&The \fBrpcgen\fP Protocol Compiler
-.IX rpcgen "" \fIrpcgen\fP "" PAGE MAJOR
-.LP
-.IX RPC "" "" \fIrpcgen\fP
-The details of programming applications to use Remote Procedure Calls
-can be overwhelming. Perhaps most daunting is the writing of the XDR
-routines necessary to convert procedure arguments and results into
-their network format and vice-versa.
-.LP
-Fortunately,
-.I rpcgen(1)
-exists to help programmers write RPC applications simply and directly.
-.I rpcgen
-does most of the dirty work, allowing programmers to debug
-the main features of their application, instead of requiring them to
-spend most of their time debugging their network interface code.
-.LP
-.I rpcgen
-is a compiler. It accepts a remote program interface definition written
-in a language, called RPC Language, which is similar to C. It produces a C
-language output which includes stub versions of the client routines, a
-server skeleton, XDR filter routines for both parameters and results, and a
-header file that contains common definitions. The client stubs interface
-with the RPC library and effectively hide the network from their callers.
-The server stub similarly hides the network from the server procedures that
-are to be invoked by remote clients.
-.I rpcgen 's
-output files can be compiled and linked in the usual way. The developer
-writes server procedures\(emin any language that observes Sun calling
-conventions\(emand links them with the server skeleton produced by
-.I rpcgen
-to get an executable server program. To use a remote program, a programmer
-writes an ordinary main program that makes local procedure calls to the
-client stubs produced by
-.I rpcgen .
-Linking this program with
-.I rpcgen 's
-stubs creates an executable program. (At present the main program must be
-written in C).
-.I rpcgen
-options can be used to suppress stub generation and to specify the transport
-to be used by the server stub.
-.LP
-Like all compilers,
-.I rpcgen
-reduces development time
-that would otherwise be spent coding and debugging low-level routines.
-All compilers, including
-.I rpcgen ,
-do this at a small cost in efficiency
-and flexibility. However, many compilers allow escape hatches for
-programmers to mix low-level code with high-level code.
-.I rpcgen
-is no exception. In speed-critical applications, hand-written routines
-can be linked with the
-.I rpcgen
-output without any difficulty. Also, one may proceed by using
-.I rpcgen
-output as a starting point, and then rewriting it as necessary.
-(If you need a discussion of RPC programming without
-.I rpcgen ,
-see the
-.I "Remote Procedure Call Programming Guide)\.
-.NH 1
-\&Converting Local Procedures into Remote Procedures
-.IX rpcgen "local procedures" \fIrpcgen\fP
-.IX rpcgen "remote procedures" \fIrpcgen\fP
-.LP
-Assume an application that runs on a single machine, one which we want
-to convert to run over the network. Here we will demonstrate such a
-conversion by way of a simple example\(ema program that prints a
-message to the console:
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * printmsg.c: print a message on the console
- */
-.ft CW
-#include <stdio.h>
-
-main(argc, argv)
- int argc;
- char *argv[];
-{
- char *message;
-
- if (argc < 2) {
- fprintf(stderr, "usage: %s <message>\en", argv[0]);
- exit(1);
- }
- message = argv[1];
-
- if (!printmessage(message)) {
- fprintf(stderr, "%s: couldn't print your message\en",
- argv[0]);
- exit(1);
- }
- printf("Message Delivered!\en");
- exit(0);
-}
-.ft I
-/*
- * Print a message to the console.
- * Return a boolean indicating whether the message was actually printed.
- */
-.ft CW
-printmessage(msg)
- char *msg;
-{
- FILE *f;
-
- f = fopen("/dev/console", "w");
- if (f == NULL) {
- return (0);
- }
- fprintf(f, "%s\en", msg);
- fclose(f);
- return(1);
-}
-.DE
-.LP
-And then, of course:
-.ie t .DS
-.el .DS L
-.ft CW
-example% \fBcc printmsg.c -o printmsg\fP
-example% \fBprintmsg "Hello, there."\fP
-Message delivered!
-example%
-.DE
-.LP
-If
-.I printmessage()
-was turned into a remote procedure,
-then it could be called from anywhere in the network.
-Ideally, one would just like to stick a keyword like
-.I remote
-in front of a
-procedure to turn it into a remote procedure. Unfortunately,
-we have to live within the constraints of the C language, since
-it existed long before RPC did. But even without language
-support, it's not very difficult to make a procedure remote.
-.LP
-In general, it's necessary to figure out what the types are for
-all procedure inputs and outputs. In this case, we have a
-procedure
-.I printmessage()
-which takes a string as input, and returns an integer
-as output. Knowing this, we can write a protocol specification in RPC
-language that describes the remote version of
-.I printmessage ().
-Here it is:
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * msg.x: Remote message printing protocol
- */
-.ft CW
-
-program MESSAGEPROG {
- version MESSAGEVERS {
- int PRINTMESSAGE(string) = 1;
- } = 1;
-} = 99;
-.DE
-.LP
-Remote procedures are part of remote programs, so we actually declared
-an entire remote program here which contains the single procedure
-.I PRINTMESSAGE .
-This procedure was declared to be in version 1 of the
-remote program. No null procedure (procedure 0) is necessary because
-.I rpcgen
-generates it automatically.
-.LP
-Notice that everything is declared with all capital letters. This is
-not required, but is a good convention to follow.
-.LP
-Notice also that the argument type is \*Qstring\*U and not \*Qchar *\*U. This
-is because a \*Qchar *\*U in C is ambiguous. Programmers usually intend it
-to mean a null-terminated string of characters, but it could also
-represent a pointer to a single character or a pointer to an array of
-characters. In RPC language, a null-terminated string is
-unambiguously called a \*Qstring\*U.
-.LP
-There are just two more things to write. First, there is the remote
-procedure itself. Here's the definition of a remote procedure
-to implement the
-.I PRINTMESSAGE
-procedure we declared above:
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
- * msg_proc.c: implementation of the remote procedure "printmessage"
- */
-.ft CW
-
-#include <stdio.h>
-#include <rpc/rpc.h> /* \fIalways needed\fP */
-#include "msg.h" /* \fIneed this too: msg.h will be generated by rpcgen\fP */
-
-.ft I
-/*
- * Remote verson of "printmessage"
- */
-.ft CW
-int *
-printmessage_1(msg)
- char **msg;
-{
- static int result; /* \fImust be static!\fP */
- FILE *f;
-
- f = fopen("/dev/console", "w");
- if (f == NULL) {
- result = 0;
- return (&result);
- }
- fprintf(f, "%s\en", *msg);
- fclose(f);
- result = 1;
- return (&result);
-}
-.vs
-.DE
-.LP
-Notice here that the declaration of the remote procedure
-.I printmessage_1()
-differs from that of the local procedure
-.I printmessage()
-in three ways:
-.IP 1.
-It takes a pointer to a string instead of a string itself. This
-is true of all remote procedures: they always take pointers to their
-arguments rather than the arguments themselves.
-.IP 2.
-It returns a pointer to an integer instead of an integer itself. This is
-also generally true of remote procedures: they always return a pointer
-to their results.
-.IP 3.
-It has an \*Q_1\*U appended to its name. In general, all remote
-procedures called by
-.I rpcgen
-are named by the following rule: the name in the program definition
-(here
-.I PRINTMESSAGE )
-is converted to all
-lower-case letters, an underbar (\*Q_\*U) is appended to it, and
-finally the version number (here 1) is appended.
-.LP
-The last thing to do is declare the main client program that will call
-the remote procedure. Here it is:
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * rprintmsg.c: remote version of "printmsg.c"
- */
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h> /* \fIalways needed\fP */
-#include "msg.h" /* \fIneed this too: msg.h will be generated by rpcgen\fP */
-
-main(argc, argv)
- int argc;
- char *argv[];
-{
- CLIENT *cl;
- int *result;
- char *server;
- char *message;
-
- if (argc < 3) {
- fprintf(stderr, "usage: %s host message\en", argv[0]);
- exit(1);
- }
-
-.ft I
- /*
- * Save values of command line arguments
- */
-.ft CW
- server = argv[1];
- message = argv[2];
-
-.ft I
- /*
- * Create client "handle" used for calling \fIMESSAGEPROG\fP on the
- * server designated on the command line. We tell the RPC package
- * to use the "tcp" protocol when contacting the server.
- */
-.ft CW
- cl = clnt_create(server, MESSAGEPROG, MESSAGEVERS, "tcp");
- if (cl == NULL) {
-.ft I
- /*
- * Couldn't establish connection with server.
- * Print error message and die.
- */
-.ft CW
- clnt_pcreateerror(server);
- exit(1);
- }
-
-.ft I
- /*
- * Call the remote procedure "printmessage" on the server
- */
-.ft CW
- result = printmessage_1(&message, cl);
- if (result == NULL) {
-.ft I
- /*
- * An error occurred while calling the server.
- * Print error message and die.
- */
-.ft CW
- clnt_perror(cl, server);
- exit(1);
- }
-
-.ft I
- /*
- * Okay, we successfully called the remote procedure.
- */
-.ft CW
- if (*result == 0) {
-.ft I
- /*
- * Server was unable to print our message.
- * Print error message and die.
- */
-.ft CW
- fprintf(stderr, "%s: %s couldn't print your message\en",
- argv[0], server);
- exit(1);
- }
-
-.ft I
- /*
- * The message got printed on the server's console
- */
-.ft CW
- printf("Message delivered to %s!\en", server);
-}
-.DE
-There are two things to note here:
-.IP 1.
-.IX "client handle, used by rpcgen" "" "client handle, used by \fIrpcgen\fP"
-First a client \*Qhandle\*U is created using the RPC library routine
-.I clnt_create ().
-This client handle will be passed to the stub routines
-which call the remote procedure.
-.IP 2.
-The remote procedure
-.I printmessage_1()
-is called exactly the same way as it is declared in
-.I msg_proc.c
-except for the inserted client handle as the first argument.
-.LP
-Here's how to put all of the pieces together:
-.ie t .DS
-.el .DS L
-.ft CW
-example% \fBrpcgen msg.x\fP
-example% \fBcc rprintmsg.c msg_clnt.c -o rprintmsg\fP
-example% \fBcc msg_proc.c msg_svc.c -o msg_server\fP
-.DE
-Two programs were compiled here: the client program
-.I rprintmsg
-and the server program
-.I msg_server .
-Before doing this though,
-.I rpcgen
-was used to fill in the missing pieces.
-.LP
-Here is what
-.I rpcgen
-did with the input file
-.I msg.x :
-.IP 1.
-It created a header file called
-.I msg.h
-that contained
-.I #define 's
-for
-.I MESSAGEPROG ,
-.I MESSAGEVERS
-and
-.I PRINTMESSAGE
-for use in the other modules.
-.IP 2.
-It created client \*Qstub\*U routines in the
-.I msg_clnt.c
-file. In this case there is only one, the
-.I printmessage_1()
-that was referred to from the
-.I printmsg
-client program. The name of the output file for
-client stub routines is always formed in this way: if the name of the
-input file is
-.I FOO.x ,
-the client stubs output file is called
-.I FOO_clnt.c .
-.IP 3.
-It created the server program which calls
-.I printmessage_1()
-in
-.I msg_proc.c .
-This server program is named
-.I msg_svc.c .
-The rule for naming the server output file is similar to the
-previous one: for an input file called
-.I FOO.x ,
-the output server file is named
-.I FOO_svc.c .
-.LP
-Now we're ready to have some fun. First, copy the server to a
-remote machine and run it. For this example, the
-machine is called \*Qmoon\*U. Server processes are run in the
-background, because they never exit.
-.ie t .DS
-.el .DS L
-.ft CW
-moon% \fBmsg_server &\fP
-.DE
-Then on our local machine (\*Qsun\*U) we can print a message on \*Qmoon\*Us
-console.
-.ie t .DS
-.el .DS L
-.ft CW
-sun% \fBprintmsg moon "Hello, moon."\fP
-.DE
-The message will get printed to \*Qmoon\*Us console. You can print a
-message on anybody's console (including your own) with this program if
-you are able to copy the server to their machine and run it.
-.NH 1
-\&Generating XDR Routines
-.IX RPC "generating XDR routines"
-.LP
-The previous example only demonstrated the automatic generation of
-client and server RPC code.
-.I rpcgen
-may also be used to generate XDR routines, that is, the routines
-necessary to convert local data
-structures into network format and vice-versa. This example presents
-a complete RPC service\(ema remote directory listing service, which uses
-.I rpcgen
-not only to generate stub routines, but also to generate the XDR
-routines. Here is the protocol description file:
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * dir.x: Remote directory listing protocol
- */
-.ft CW
-const MAXNAMELEN = 255; /* \fImaximum length of a directory entry\fP */
-
-typedef string nametype<MAXNAMELEN>; /* \fIa directory entry\fP */
-
-typedef struct namenode *namelist; /* \fIa link in the listing\fP */
-
-.ft I
-/*
- * A node in the directory listing
- */
-.ft CW
-struct namenode {
- nametype name; /* \fIname of directory entry\fP */
- namelist next; /* \fInext entry\fP */
-};
-
-.ft I
-/*
- * The result of a READDIR operation.
- */
-.ft CW
-union readdir_res switch (int errno) {
-case 0:
- namelist list; /* \fIno error: return directory listing\fP */
-default:
- void; /* \fIerror occurred: nothing else to return\fP */
-};
-
-.ft I
-/*
- * The directory program definition
- */
-.ft CW
-program DIRPROG {
- version DIRVERS {
- readdir_res
- READDIR(nametype) = 1;
- } = 1;
-} = 76;
-.DE
-.SH
-Note:
-.I
-Types (like
-.I readdir_res
-in the example above) can be defined using
-the \*Qstruct\*U, \*Qunion\*U and \*Qenum\*U keywords, but those keywords
-should not be used in subsequent declarations of variables of those types.
-For example, if you define a union \*Qfoo\*U, you should declare using
-only \*Qfoo\*U and not \*Qunion foo\*U. In fact,
-.I rpcgen
-compiles
-RPC unions into C structures and it is an error to declare them using the
-\*Qunion\*U keyword.
-.LP
-Running
-.I rpcgen
-on
-.I dir.x
-creates four output files. Three are the same as before: header file,
-client stub routines and server skeleton. The fourth are the XDR routines
-necessary for converting the data types we declared into XDR format and
-vice-versa. These are output in the file
-.I dir_xdr.c .
-.LP
-Here is the implementation of the
-.I READDIR
-procedure.
-.ie t .DS
-.el .DS L
-.vs 11
-.ft I
-/*
- * dir_proc.c: remote readdir implementation
- */
-.ft CW
-#include <rpc/rpc.h>
-#include <sys/dir.h>
-#include "dir.h"
-
-extern int errno;
-extern char *malloc();
-extern char *strdup();
-
-readdir_res *
-readdir_1(dirname)
- nametype *dirname;
-{
- DIR *dirp;
- struct direct *d;
- namelist nl;
- namelist *nlp;
- static readdir_res res; /* \fImust be static\fP! */
-
-.ft I
- /*
- * Open directory
- */
-.ft CW
- dirp = opendir(*dirname);
- if (dirp == NULL) {
- res.errno = errno;
- return (&res);
- }
-
-.ft I
- /*
- * Free previous result
- */
-.ft CW
- xdr_free(xdr_readdir_res, &res);
-
-.ft I
- /*
- * Collect directory entries.
- * Memory allocated here will be freed by \fIxdr_free\fP
- * next time \fIreaddir_1\fP is called
- */
-.ft CW
- nlp = &res.readdir_res_u.list;
- while (d = readdir(dirp)) {
- nl = *nlp = (namenode *) malloc(sizeof(namenode));
- nl->name = strdup(d->d_name);
- nlp = &nl->next;
- }
- *nlp = NULL;
-
-.ft I
- /*
- * Return the result
- */
-.ft CW
- res.errno = 0;
- closedir(dirp);
- return (&res);
-}
-.vs
-.DE
-Finally, there is the client side program to call the server:
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * rls.c: Remote directory listing client
- */
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h> /* \fIalways need this\fP */
-#include "dir.h" /* \fIwill be generated by rpcgen\fI */
-
-extern int errno;
-
-main(argc, argv)
- int argc;
- char *argv[];
-{
- CLIENT *cl;
- char *server;
- char *dir;
- readdir_res *result;
- namelist nl;
-
-
- if (argc != 3) {
- fprintf(stderr, "usage: %s host directory\en",
- argv[0]);
- exit(1);
- }
-
-.ft I
- /*
- * Remember what our command line arguments refer to
- */
-.ft CW
- server = argv[1];
- dir = argv[2];
-
-.ft I
- /*
- * Create client "handle" used for calling \fIMESSAGEPROG\fP on the
- * server designated on the command line. We tell the RPC package
- * to use the "tcp" protocol when contacting the server.
- */
-.ft CW
- cl = clnt_create(server, DIRPROG, DIRVERS, "tcp");
- if (cl == NULL) {
-.ft I
- /*
- * Couldn't establish connection with server.
- * Print error message and die.
- */
-.ft CW
- clnt_pcreateerror(server);
- exit(1);
- }
-
-.ft I
- /*
- * Call the remote procedure \fIreaddir\fP on the server
- */
-.ft CW
- result = readdir_1(&dir, cl);
- if (result == NULL) {
-.ft I
- /*
- * An error occurred while calling the server.
- * Print error message and die.
- */
-.ft CW
- clnt_perror(cl, server);
- exit(1);
- }
-
-.ft I
- /*
- * Okay, we successfully called the remote procedure.
- */
-.ft CW
- if (result->errno != 0) {
-.ft I
- /*
- * A remote system error occurred.
- * Print error message and die.
- */
-.ft CW
- errno = result->errno;
- perror(dir);
- exit(1);
- }
-
-.ft I
- /*
- * Successfully got a directory listing.
- * Print it out.
- */
-.ft CW
- for (nl = result->readdir_res_u.list; nl != NULL;
- nl = nl->next) {
- printf("%s\en", nl->name);
- }
- exit(0);
-}
-.DE
-Compile everything, and run.
-.DS
-.ft CW
-sun% \fBrpcgen dir.x\fP
-sun% \fBcc rls.c dir_clnt.c dir_xdr.c -o rls\fP
-sun% \fBcc dir_svc.c dir_proc.c dir_xdr.c -o dir_svc\fP
-
-sun% \fBdir_svc &\fP
-
-moon% \fBrls sun /usr/pub\fP
-\&.
-\&..
-ascii
-eqnchar
-greek
-kbd
-marg8
-tabclr
-tabs
-tabs4
-moon%
-.DE
-.LP
-.IX "debugging with rpcgen" "" "debugging with \fIrpcgen\fP"
-A final note about
-.I rpcgen :
-The client program and the server procedure can be tested together
-as a single program by simply linking them with each other rather
-than with the client and server stubs. The procedure calls will be
-executed as ordinary local procedure calls and the program can be
-debugged with a local debugger such as
-.I dbx .
-When the program is working, the client program can be linked to
-the client stub produced by
-.I rpcgen
-and the server procedures can be linked to the server stub produced
-by
-.I rpcgen .
-.SH
-.I NOTE :
-\fIIf you do this, you may want to comment out calls to RPC library
-routines, and have client-side routines call server routines
-directly.\fP
-.LP
-.NH 1
-\&The C-Preprocessor
-.IX rpcgen "C-preprocessor" \fIrpcgen\fP
-.LP
-The C-preprocessor is run on all input files before they are
-compiled, so all the preprocessor directives are legal within a \*Q.x\*U
-file. Four symbols may be defined, depending upon which output file is
-getting generated. The symbols are:
-.TS
-box tab (&);
-lfI lfI
-lfL l .
-Symbol&Usage
-_
-RPC_HDR&for header-file output
-RPC_XDR&for XDR routine output
-RPC_SVC&for server-skeleton output
-RPC_CLNT&for client stub output
-.TE
-.LP
-Also,
-.I rpcgen
-does a little preprocessing of its own. Any line that
-begins with a percent sign is passed directly into the output file,
-without any interpretation of the line. Here is a simple example that
-demonstrates the preprocessing features.
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * time.x: Remote time protocol
- */
-.ft CW
-program TIMEPROG {
- version TIMEVERS {
- unsigned int TIMEGET(void) = 1;
- } = 1;
-} = 44;
-
-#ifdef RPC_SVC
-%int *
-%timeget_1()
-%{
-% static int thetime;
-%
-% thetime = time(0);
-% return (&thetime);
-%}
-#endif
-.DE
-The '%' feature is not generally recommended, as there is no guarantee
-that the compiler will stick the output where you intended.
-.NH 1
-\&\fBrpcgen\fP Programming Notes
-.IX rpcgen "other operations" \fIrpcgen\fP
-.sp
-.NH 2
-\&Timeout Changes
-.IX rpcgen "timeout changes" \fIrpcgen\fP
-.LP
-RPC sets a default timeout of 25 seconds for RPC calls when
-.I clnt_create()
-is used. This timeout may be changed using
-.I clnt_control()
-Here is a small code fragment to demonstrate use of
-.I clnt_control ():
-.ID
-struct timeval tv;
-CLIENT *cl;
-.sp .5
-cl = clnt_create("somehost", SOMEPROG, SOMEVERS, "tcp");
-if (cl == NULL) {
- exit(1);
-}
-tv.tv_sec = 60; /* \fIchange timeout to 1 minute\fP */
-tv.tv_usec = 0;
-clnt_control(cl, CLSET_TIMEOUT, &tv);
-.DE
-.NH 2
-\&Handling Broadcast on the Server Side
-.IX "broadcast RPC"
-.IX rpcgen "broadcast RPC" \fIrpcgen\fP
-.LP
-When a procedure is known to be called via broadcast RPC,
-it is usually wise for the server to not reply unless it can provide
-some useful information to the client. This prevents the network
-from getting flooded by useless replies.
-.LP
-To prevent the server from replying, a remote procedure can
-return NULL as its result, and the server code generated by
-.I rpcgen
-will detect this and not send out a reply.
-.LP
-Here is an example of a procedure that replies only if it
-thinks it is an NFS server:
-.ID
-void *
-reply_if_nfsserver()
-{
- char notnull; /* \fIjust here so we can use its address\fP */
-.sp .5
- if (access("/etc/exports", F_OK) < 0) {
- return (NULL); /* \fIprevent RPC from replying\fP */
- }
-.ft I
- /*
- * return non-null pointer so RPC will send out a reply
- */
-.ft L
- return ((void *)&notnull);
-}
-.DE
-Note that if procedure returns type \*Qvoid *\*U, they must return a non-NULL
-pointer if they want RPC to reply for them.
-.NH 2
-\&Other Information Passed to Server Procedures
-.LP
-Server procedures will often want to know more about an RPC call
-than just its arguments. For example, getting authentication information
-is important to procedures that want to implement some level of security.
-This extra information is actually supplied to the server procedure as a
-second argument. Here is an example to demonstrate its use. What we've
-done here is rewrite the previous
-.I printmessage_1()
-procedure to only allow root users to print a message to the console.
-.ID
-int *
-printmessage_1(msg, rq)
- char **msg;
- struct svc_req *rq;
-{
- static in result; /* \fIMust be static\fP */
- FILE *f;
- struct suthunix_parms *aup;
-.sp .5
- aup = (struct authunix_parms *)rq->rq_clntcred;
- if (aup->aup_uid != 0) {
- result = 0;
- return (&result);
- }
-.sp
-.ft I
- /*
- * Same code as before.
- */
-.ft L
-}
-.DE
-.NH 1
-\&RPC Language
-.IX RPCL
-.IX rpcgen "RPC Language" \fIrpcgen\fP
-.LP
-RPC language is an extension of XDR language. The sole extension is
-the addition of the
-.I program
-type. For a complete description of the XDR language syntax, see the
-.I "External Data Representation Standard: Protocol Specification"
-chapter. For a description of the RPC extensions to the XDR language,
-see the
-.I "Remote Procedure Calls: Protocol Specification"
-chapter.
-.LP
-However, XDR language is so close to C that if you know C, you know most
-of it already. We describe here the syntax of the RPC language,
-showing a few examples along the way. We also show how the various
-RPC and XDR type definitions get compiled into C type definitions in
-the output header file.
-.KS
-.NH 2
-Definitions
-\&
-.IX rpcgen definitions \fIrpcgen\fP
-.LP
-An RPC language file consists of a series of definitions.
-.DS L
-.ft CW
- definition-list:
- definition ";"
- definition ";" definition-list
-.DE
-.KE
-It recognizes five types of definitions.
-.DS L
-.ft CW
- definition:
- enum-definition
- struct-definition
- union-definition
- typedef-definition
- const-definition
- program-definition
-.DE
-.NH 2
-Structures
-\&
-.IX rpcgen structures \fIrpcgen\fP
-.LP
-An XDR struct is declared almost exactly like its C counterpart. It
-looks like the following:
-.DS L
-.ft CW
- struct-definition:
- "struct" struct-ident "{"
- declaration-list
- "}"
-
- declaration-list:
- declaration ";"
- declaration ";" declaration-list
-.DE
-As an example, here is an XDR structure to a two-dimensional
-coordinate, and the C structure that it gets compiled into in the
-output header file.
-.DS
-.ft CW
- struct coord { struct coord {
- int x; --> int x;
- int y; int y;
- }; };
- typedef struct coord coord;
-.DE
-The output is identical to the input, except for the added
-.I typedef
-at the end of the output. This allows one to use \*Qcoord\*U instead of
-\*Qstruct coord\*U when declaring items.
-.NH 2
-Unions
-\&
-.IX rpcgen unions \fIrpcgen\fP
-.LP
-XDR unions are discriminated unions, and look quite different from C
-unions. They are more analogous to Pascal variant records than they
-are to C unions.
-.DS L
-.ft CW
- union-definition:
- "union" union-ident "switch" "(" declaration ")" "{"
- case-list
- "}"
-
- case-list:
- "case" value ":" declaration ";"
- "default" ":" declaration ";"
- "case" value ":" declaration ";" case-list
-.DE
-Here is an example of a type that might be returned as the result of a
-\*Qread data\*U operation. If there is no error, return a block of data.
-Otherwise, don't return anything.
-.DS L
-.ft CW
- union read_result switch (int errno) {
- case 0:
- opaque data[1024];
- default:
- void;
- };
-.DE
-It gets compiled into the following:
-.DS L
-.ft CW
- struct read_result {
- int errno;
- union {
- char data[1024];
- } read_result_u;
- };
- typedef struct read_result read_result;
-.DE
-Notice that the union component of the output struct has the name as
-the type name, except for the trailing \*Q_u\*U.
-.NH 2
-Enumerations
-\&
-.IX rpcgen enumerations \fIrpcgen\fP
-.LP
-XDR enumerations have the same syntax as C enumerations.
-.DS L
-.ft CW
- enum-definition:
- "enum" enum-ident "{"
- enum-value-list
- "}"
-
- enum-value-list:
- enum-value
- enum-value "," enum-value-list
-
- enum-value:
- enum-value-ident
- enum-value-ident "=" value
-.DE
-Here is a short example of an XDR enum, and the C enum that it gets
-compiled into.
-.DS L
-.ft CW
- enum colortype { enum colortype {
- RED = 0, RED = 0,
- GREEN = 1, --> GREEN = 1,
- BLUE = 2 BLUE = 2,
- }; };
- typedef enum colortype colortype;
-.DE
-.NH 2
-Typedef
-\&
-.IX rpcgen typedef \fIrpcgen\fP
-.LP
-XDR typedefs have the same syntax as C typedefs.
-.DS L
-.ft CW
- typedef-definition:
- "typedef" declaration
-.DE
-Here is an example that defines a
-.I fname_type
-used for declaring
-file name strings that have a maximum length of 255 characters.
-.DS L
-.ft CW
-typedef string fname_type<255>; --> typedef char *fname_type;
-.DE
-.NH 2
-Constants
-\&
-.IX rpcgen constants \fIrpcgen\fP
-.LP
-XDR constants symbolic constants that may be used wherever a
-integer constant is used, for example, in array size specifications.
-.DS L
-.ft CW
- const-definition:
- "const" const-ident "=" integer
-.DE
-For example, the following defines a constant
-.I DOZEN
-equal to 12.
-.DS L
-.ft CW
- const DOZEN = 12; --> #define DOZEN 12
-.DE
-.NH 2
-Programs
-\&
-.IX rpcgen programs \fIrpcgen\fP
-.LP
-RPC programs are declared using the following syntax:
-.DS L
-.ft CW
- program-definition:
- "program" program-ident "{"
- version-list
- "}" "=" value
-
- version-list:
- version ";"
- version ";" version-list
-
- version:
- "version" version-ident "{"
- procedure-list
- "}" "=" value
-
- procedure-list:
- procedure ";"
- procedure ";" procedure-list
-
- procedure:
- type-ident procedure-ident "(" type-ident ")" "=" value
-.DE
-For example, here is the time protocol, revisited:
-.ie t .DS
-.el .DS L
-.ft I
-/*
- * time.x: Get or set the time. Time is represented as number of seconds
- * since 0:00, January 1, 1970.
- */
-.ft CW
-program TIMEPROG {
- version TIMEVERS {
- unsigned int TIMEGET(void) = 1;
- void TIMESET(unsigned) = 2;
- } = 1;
-} = 44;
-.DE
-This file compiles into #defines in the output header file:
-.ie t .DS
-.el .DS L
-.ft CW
-#define TIMEPROG 44
-#define TIMEVERS 1
-#define TIMEGET 1
-#define TIMESET 2
-.DE
-.NH 2
-Declarations
-\&
-.IX rpcgen declarations \fIrpcgen\fP
-.LP
-In XDR, there are only four kinds of declarations.
-.DS L
-.ft CW
- declaration:
- simple-declaration
- fixed-array-declaration
- variable-array-declaration
- pointer-declaration
-.DE
-\fB1) Simple declarations\fP are just like simple C declarations.
-.DS L
-.ft CW
- simple-declaration:
- type-ident variable-ident
-.DE
-Example:
-.DS L
-.ft CW
- colortype color; --> colortype color;
-.DE
-\fB2) Fixed-length Array Declarations\fP are just like C array declarations:
-.DS L
-.ft CW
- fixed-array-declaration:
- type-ident variable-ident "[" value "]"
-.DE
-Example:
-.DS L
-.ft CW
- colortype palette[8]; --> colortype palette[8];
-.DE
-\fB3) Variable-Length Array Declarations\fP have no explicit syntax
-in C, so XDR invents its own using angle-brackets.
-.DS L
-.ft CW
-variable-array-declaration:
- type-ident variable-ident "<" value ">"
- type-ident variable-ident "<" ">"
-.DE
-The maximum size is specified between the angle brackets. The size may
-be omitted, indicating that the array may be of any size.
-.DS L
-.ft CW
- int heights<12>; /* \fIat most 12 items\fP */
- int widths<>; /* \fIany number of items\fP */
-.DE
-Since variable-length arrays have no explicit syntax in C, these
-declarations are actually compiled into \*Qstruct\*Us. For example, the
-\*Qheights\*U declaration gets compiled into the following struct:
-.DS L
-.ft CW
- struct {
- u_int heights_len; /* \fI# of items in array\fP */
- int *heights_val; /* \fIpointer to array\fP */
- } heights;
-.DE
-Note that the number of items in the array is stored in the \*Q_len\*U
-component and the pointer to the array is stored in the \*Q_val\*U
-component. The first part of each of these component's names is the
-same as the name of the declared XDR variable.
-.LP
-\fB4) Pointer Declarations\fP are made in
-XDR exactly as they are in C. You can't
-really send pointers over the network, but you can use XDR pointers
-for sending recursive data types such as lists and trees. The type is
-actually called \*Qoptional-data\*U, not \*Qpointer\*U, in XDR language.
-.DS L
-.ft CW
- pointer-declaration:
- type-ident "*" variable-ident
-.DE
-Example:
-.DS L
-.ft CW
- listitem *next; --> listitem *next;
-.DE
-.NH 2
-\&Special Cases
-.IX rpcgen "special cases" \fIrpcgen\fP
-.LP
-There are a few exceptions to the rules described above.
-.LP
-.B Booleans:
-C has no built-in boolean type. However, the RPC library does a
-boolean type called
-.I bool_t
-that is either
-.I TRUE
-or
-.I FALSE .
-Things declared as type
-.I bool
-in XDR language are compiled into
-.I bool_t
-in the output header file.
-.LP
-Example:
-.DS L
-.ft CW
- bool married; --> bool_t married;
-.DE
-.B Strings:
-C has no built-in string type, but instead uses the null-terminated
-\*Qchar *\*U convention. In XDR language, strings are declared using the
-\*Qstring\*U keyword, and compiled into \*Qchar *\*Us in the output header
-file. The maximum size contained in the angle brackets specifies the
-maximum number of characters allowed in the strings (not counting the
-.I NULL
-character). The maximum size may be left off, indicating a string
-of arbitrary length.
-.LP
-Examples:
-.DS L
-.ft CW
- string name<32>; --> char *name;
- string longname<>; --> char *longname;
-.DE
-.B "Opaque Data:"
-Opaque data is used in RPC and XDR to describe untyped data, that is,
-just sequences of arbitrary bytes. It may be declared either as a
-fixed or variable length array.
-.DS L
-Examples:
-.ft CW
- opaque diskblock[512]; --> char diskblock[512];
-
- opaque filedata<1024>; --> struct {
- u_int filedata_len;
- char *filedata_val;
- } filedata;
-.DE
-.B Voids:
-In a void declaration, the variable is not named. The declaration is
-just \*Qvoid\*U and nothing else. Void declarations can only occur in two
-places: union definitions and program definitions (as the argument or
-result of a remote procedure).
diff --git a/lib/libc/rpc/PSD.doc/xdr.nts.ms b/lib/libc/rpc/PSD.doc/xdr.nts.ms
deleted file mode 100644
index 6c2d482..0000000
--- a/lib/libc/rpc/PSD.doc/xdr.nts.ms
+++ /dev/null
@@ -1,1966 +0,0 @@
-.\"
-.\" Must use -- eqn -- with this one
-.\"
-.\" @(#)xdr.nts.ms 2.2 88/08/05 4.0 RPCSRC
-.EQ
-delim $$
-.EN
-.de BT
-.if \\n%=1 .tl ''- % -''
-..
-.ND
-.\" prevent excess underlining in nroff
-.if n .fp 2 R
-.OH 'External Data Representation: Sun Technical Notes''Page %'
-.EH 'Page %''External Data Representation: Sun Technical Notes'
-.if \\n%=1 .bp
-.SH
-\&External Data Representation: Sun Technical Notes
-.IX XDR "Sun technical notes"
-.LP
-This chapter contains technical notes on Sun's implementation of the
-External Data Representation (XDR) standard, a set of library routines
-that allow a C programmer to describe arbitrary data structures in a
-machinex-independent fashion.
-For a formal specification of the XDR
-standard, see the
-.I "External Data Representation Standard: Protocol Specification".
-XDR is the backbone of Sun's Remote Procedure Call package, in the
-sense that data for remote procedure calls is transmitted using the
-standard. XDR library routines should be used to transmit data
-that is accessed (read or written) by more than one type of machine.\**
-.FS
-.IX XDR "system routines"
-For a compete specification of the system External Data Representation
-routines, see the
-.I xdr(3N)
-manual page.
-.FE
-.LP
-This chapter contains a short tutorial overview of the XDR library
-routines, a guide to accessing currently available XDR streams, and
-information on defining new streams and data types. XDR was designed
-to work across different languages, operating systems, and machine
-architectures. Most users (particularly RPC users) will only need
-the information in the
-.I "Number Filters",
-.I "Floating Point Filters",
-and
-.I "Enumeration Filters"
-sections.
-Programmers wishing to implement RPC and XDR on new machines
-will be interested in the rest of the chapter, as well as the
-.I "External Data Representaiton Standard: Protocol Specification",
-which will be their primary reference.
-.SH
-Note:
-.I
-.I rpcgen
-can be used to write XDR routines even in cases where no RPC calls are
-being made.
-.LP
-On Sun systems,
-C programs that want to use XDR routines
-must include the file
-.I <rpc/rpc.h> ,
-which contains all the necessary interfaces to the XDR system.
-Since the C library
-.I libc.a
-contains all the XDR routines,
-compile as normal.
-.DS
-example% \fBcc\0\fIprogram\fP.c\fI
-.DE
-.ne 3i
-.NH 0
-\&Justification
-.IX XDR justification
-.LP
-Consider the following two programs,
-.I writer :
-.ie t .DS
-.el .DS L
-.ft CW
-#include <stdio.h>
-.sp.5
-main() /* \fIwriter.c\fP */
-{
- long i;
-.sp.5
- for (i = 0; i < 8; i++) {
- if (fwrite((char *)&i, sizeof(i), 1, stdout) != 1) {
- fprintf(stderr, "failed!\en");
- exit(1);
- }
- }
- exit(0);
-}
-.DE
-and
-.I reader :
-.ie t .DS
-.el .DS L
-.ft CW
-#include <stdio.h>
-.sp.5
-main() /* \fIreader.c\fP */
-{
- long i, j;
-.sp.5
- for (j = 0; j < 8; j++) {
- if (fread((char *)&i, sizeof (i), 1, stdin) != 1) {
- fprintf(stderr, "failed!\en");
- exit(1);
- }
- printf("%ld ", i);
- }
- printf("\en");
- exit(0);
-}
-.DE
-The two programs appear to be portable, because (a) they pass
-.I lint
-checking, and (b) they exhibit the same behavior when executed
-on two different hardware architectures, a Sun and a VAX.
-.LP
-Piping the output of the
-.I writer
-program to the
-.I reader
-program gives identical results on a Sun or a VAX.
-.DS
-.ft CW
-sun% \fBwriter | reader\fP
-0 1 2 3 4 5 6 7
-sun%
-
-
-vax% \fBwriter | reader\fP
-0 1 2 3 4 5 6 7
-vax%
-.DE
-With the advent of local area networks and 4.2BSD came the concept
-of \*Qnetwork pipes\*U \(em a process produces data on one machine,
-and a second process consumes data on another machine.
-A network pipe can be constructed with
-.I writer
-and
-.I reader .
-Here are the results if the first produces data on a Sun,
-and the second consumes data on a VAX.
-.DS
-.ft CW
-sun% \fBwriter | rsh vax reader\fP
-0 16777216 33554432 50331648 67108864 83886080 100663296
-117440512
-sun%
-.DE
-Identical results can be obtained by executing
-.I writer
-on the VAX and
-.I reader
-on the Sun. These results occur because the byte ordering
-of long integers differs between the VAX and the Sun,
-even though word size is the same.
-Note that $16777216$ is $2 sup 24$ \(em
-when four bytes are reversed, the 1 winds up in the 24th bit.
-.LP
-Whenever data is shared by two or more machine types, there is
-a need for portable data. Programs can be made data-portable by
-replacing the
-.I read()
-and
-.I write()
-calls with calls to an XDR library routine
-.I xdr_long() ,
-a filter that knows the standard representation
-of a long integer in its external form.
-Here are the revised versions of
-.I writer :
-.ie t .DS
-.el .DS L
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h> /* \fIxdr is a sub-library of rpc\fP */
-.sp.5
-main() /* \fIwriter.c\fP */
-{
- XDR xdrs;
- long i;
-.sp.5
- xdrstdio_create(&xdrs, stdout, XDR_ENCODE);
- for (i = 0; i < 8; i++) {
- if (!xdr_long(&xdrs, &i)) {
- fprintf(stderr, "failed!\en");
- exit(1);
- }
- }
- exit(0);
-}
-.DE
-and
-.I reader :
-.ie t .DS
-.el .DS L
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h> /* \fIxdr is a sub-library of rpc\fP */
-.sp.5
-main() /* \fIreader.c\fP */
-{
- XDR xdrs;
- long i, j;
-.sp.5
- xdrstdio_create(&xdrs, stdin, XDR_DECODE);
- for (j = 0; j < 8; j++) {
- if (!xdr_long(&xdrs, &i)) {
- fprintf(stderr, "failed!\en");
- exit(1);
- }
- printf("%ld ", i);
- }
- printf("\en");
- exit(0);
-}
-.DE
-The new programs were executed on a Sun,
-on a VAX, and from a Sun to a VAX;
-the results are shown below.
-.DS
-.ft CW
-sun% \fBwriter | reader\fP
-0 1 2 3 4 5 6 7
-sun%
-
-vax% \fBwriter | reader\fP
-0 1 2 3 4 5 6 7
-vax%
-
-sun% \fBwriter | rsh vax reader\fP
-0 1 2 3 4 5 6 7
-sun%
-.DE
-.SH
-Note:
-.I
-.IX XDR "portable data"
-Integers are just the tip of the portable-data iceberg. Arbitrary
-data structures present portability problems, particularly with
-respect to alignment and pointers. Alignment on word boundaries
-may cause the size of a structure to vary from machine to machine.
-And pointers, which are very convenient to use, have no meaning
-outside the machine where they are defined.
-.LP
-.NH 1
-\&A Canonical Standard
-.IX XDR "canonical standard"
-.LP
-XDR's approach to standardizing data representations is
-.I canonical .
-That is, XDR defines a single byte order (Big Endian), a single
-floating-point representation (IEEE), and so on. Any program running on
-any machine can use XDR to create portable data by translating its
-local representation to the XDR standard representations; similarly, any
-program running on any machine can read portable data by translating the
-XDR standard representaions to its local equivalents. The single standard
-completely decouples programs that create or send portable data from those
-that use or receive portable data. The advent of a new machine or a new
-language has no effect upon the community of existing portable data creators
-and users. A new machine joins this community by being \*Qtaught\*U how to
-convert the standard representations and its local representations; the
-local representations of other machines are irrelevant. Conversely, to
-existing programs running on other machines, the local representations of
-the new machine are also irrelevant; such programs can immediately read
-portable data produced by the new machine because such data conforms to the
-canonical standards that they already understand.
-.LP
-There are strong precedents for XDR's canonical approach. For example,
-TCP/IP, UDP/IP, XNS, Ethernet, and, indeed, all protocols below layer five
-of the ISO model, are canonical protocols. The advantage of any canonical
-approach is simplicity; in the case of XDR, a single set of conversion
-routines is written once and is never touched again. The canonical approach
-has a disadvantage, but it is unimportant in real-world data transfer
-applications. Suppose two Little-Endian machines are transferring integers
-according to the XDR standard. The sending machine converts the integers
-from Little-Endian byte order to XDR (Big-Endian) byte order; the receiving
-machine performs the reverse conversion. Because both machines observe the
-same byte order, their conversions are unnecessary. The point, however, is
-not necessity, but cost as compared to the alternative.
-.LP
-The time spent converting to and from a canonical representation is
-insignificant, especially in networking applications. Most of the time
-required to prepare a data structure for transfer is not spent in conversion
-but in traversing the elements of the data structure. To transmit a tree,
-for example, each leaf must be visited and each element in a leaf record must
-be copied to a buffer and aligned there; storage for the leaf may have to be
-deallocated as well. Similarly, to receive a tree, storage must be
-allocated for each leaf, data must be moved from the buffer to the leaf and
-properly aligned, and pointers must be constructed to link the leaves
-together. Every machine pays the cost of traversing and copying data
-structures whether or not conversion is required. In networking
-applications, communications overhead\(emthe time required to move the data
-down through the sender's protocol layers, across the network and up through
-the receiver's protocol layers\(emdwarfs conversion overhead.
-.NH 1
-\&The XDR Library
-.IX "XDR" "library"
-.LP
-The XDR library not only solves data portability problems, it also
-allows you to write and read arbitrary C constructs in a consistent,
-specified, well-documented manner. Thus, it can make sense to use the
-library even when the data is not shared among machines on a network.
-.LP
-The XDR library has filter routines for
-strings (null-terminated arrays of bytes),
-structures, unions, and arrays, to name a few.
-Using more primitive routines,
-you can write your own specific XDR routines
-to describe arbitrary data structures,
-including elements of arrays, arms of unions,
-or objects pointed at from other structures.
-The structures themselves may contain arrays of arbitrary elements,
-or pointers to other structures.
-.LP
-Let's examine the two programs more closely.
-There is a family of XDR stream creation routines
-in which each member treats the stream of bits differently.
-In our example, data is manipulated using standard I/O routines,
-so we use
-.I xdrstdio_create ().
-.IX xdrstdio_create() "" "\fIxdrstdio_create()\fP"
-The parameters to XDR stream creation routines
-vary according to their function.
-In our example,
-.I xdrstdio_create()
-takes a pointer to an XDR structure that it initializes,
-a pointer to a
-.I FILE
-that the input or output is performed on, and the operation.
-The operation may be
-.I XDR_ENCODE
-for serializing in the
-.I writer
-program, or
-.I XDR_DECODE
-for deserializing in the
-.I reader
-program.
-.LP
-Note: RPC users never need to create XDR streams;
-the RPC system itself creates these streams,
-which are then passed to the users.
-.LP
-The
-.I xdr_long()
-.IX xdr_long() "" "\fIxdr_long()\fP"
-primitive is characteristic of most XDR library
-primitives and all client XDR routines.
-First, the routine returns
-.I FALSE
-(0) if it fails, and
-.I TRUE
-(1) if it succeeds.
-Second, for each data type,
-.I xxx ,
-there is an associated XDR routine of the form:
-.DS
-.ft CW
-xdr_xxx(xdrs, xp)
- XDR *xdrs;
- xxx *xp;
-{
-}
-.DE
-In our case,
-.I xxx
-is long, and the corresponding XDR routine is
-a primitive,
-.I xdr_long() .
-The client could also define an arbitrary structure
-.I xxx
-in which case the client would also supply the routine
-.I xdr_xxx (),
-describing each field by calling XDR routines
-of the appropriate type.
-In all cases the first parameter,
-.I xdrs
-can be treated as an opaque handle,
-and passed to the primitive routines.
-.LP
-XDR routines are direction independent;
-that is, the same routines are called to serialize or deserialize data.
-This feature is critical to software engineering of portable data.
-The idea is to call the same routine for either operation \(em
-this almost guarantees that serialized data can also be deserialized.
-One routine is used by both producer and consumer of networked data.
-This is implemented by always passing the address
-of an object rather than the object itself \(em
-only in the case of deserialization is the object modified.
-This feature is not shown in our trivial example,
-but its value becomes obvious when nontrivial data structures
-are passed among machines.
-If needed, the user can obtain the
-direction of the XDR operation.
-See the
-.I "XDR Operation Directions"
-section below for details.
-.LP
-Let's look at a slightly more complicated example.
-Assume that a person's gross assets and liabilities
-are to be exchanged among processes.
-Also assume that these values are important enough
-to warrant their own data type:
-.ie t .DS
-.el .DS L
-.ft CW
-struct gnumbers {
- long g_assets;
- long g_liabilities;
-};
-.DE
-The corresponding XDR routine describing this structure would be:
-.ie t .DS
-.el .DS L
-.ft CW
-bool_t /* \fITRUE is success, FALSE is failure\fP */
-xdr_gnumbers(xdrs, gp)
- XDR *xdrs;
- struct gnumbers *gp;
-{
- if (xdr_long(xdrs, &gp->g_assets) &&
- xdr_long(xdrs, &gp->g_liabilities))
- return(TRUE);
- return(FALSE);
-}
-.DE
-Note that the parameter
-.I xdrs
-is never inspected or modified;
-it is only passed on to the subcomponent routines.
-It is imperative to inspect the return value of each XDR routine call,
-and to give up immediately and return
-.I FALSE
-if the subroutine fails.
-.LP
-This example also shows that the type
-.I bool_t
-is declared as an integer whose only values are
-.I TRUE
-(1) and
-.I FALSE
-(0). This document uses the following definitions:
-.ie t .DS
-.el .DS L
-.ft CW
-#define bool_t int
-#define TRUE 1
-#define FALSE 0
-.DE
-.LP
-Keeping these conventions in mind,
-.I xdr_gnumbers()
-can be rewritten as follows:
-.ie t .DS
-.el .DS L
-.ft CW
-xdr_gnumbers(xdrs, gp)
- XDR *xdrs;
- struct gnumbers *gp;
-{
- return(xdr_long(xdrs, &gp->g_assets) &&
- xdr_long(xdrs, &gp->g_liabilities));
-}
-.DE
-This document uses both coding styles.
-.NH 1
-\&XDR Library Primitives
-.IX "library primitives for XDR"
-.IX XDR "library primitives"
-.LP
-This section gives a synopsis of each XDR primitive.
-It starts with basic data types and moves on to constructed data types.
-Finally, XDR utilities are discussed.
-The interface to these primitives
-and utilities is defined in the include file
-.I <rpc/xdr.h> ,
-automatically included by
-.I <rpc/rpc.h> .
-.NH 2
-\&Number Filters
-.IX "XDR library" "number filters"
-.LP
-The XDR library provides primitives to translate between numbers
-and their corresponding external representations.
-Primitives cover the set of numbers in:
-.DS
-.ft CW
-[signed, unsigned] * [short, int, long]
-.DE
-.ne 2i
-Specifically, the eight primitives are:
-.DS
-.ft CW
-bool_t xdr_char(xdrs, cp)
- XDR *xdrs;
- char *cp;
-.sp.5
-bool_t xdr_u_char(xdrs, ucp)
- XDR *xdrs;
- unsigned char *ucp;
-.sp.5
-bool_t xdr_int(xdrs, ip)
- XDR *xdrs;
- int *ip;
-.sp.5
-bool_t xdr_u_int(xdrs, up)
- XDR *xdrs;
- unsigned *up;
-.sp.5
-bool_t xdr_long(xdrs, lip)
- XDR *xdrs;
- long *lip;
-.sp.5
-bool_t xdr_u_long(xdrs, lup)
- XDR *xdrs;
- u_long *lup;
-.sp.5
-bool_t xdr_short(xdrs, sip)
- XDR *xdrs;
- short *sip;
-.sp.5
-bool_t xdr_u_short(xdrs, sup)
- XDR *xdrs;
- u_short *sup;
-.DE
-The first parameter,
-.I xdrs ,
-is an XDR stream handle.
-The second parameter is the address of the number
-that provides data to the stream or receives data from it.
-All routines return
-.I TRUE
-if they complete successfully, and
-.I FALSE
-otherwise.
-.NH 2
-\&Floating Point Filters
-.IX "XDR library" "floating point filters"
-.LP
-The XDR library also provides primitive routines
-for C's floating point types:
-.DS
-.ft CW
-bool_t xdr_float(xdrs, fp)
- XDR *xdrs;
- float *fp;
-.sp.5
-bool_t xdr_double(xdrs, dp)
- XDR *xdrs;
- double *dp;
-.DE
-The first parameter,
-.I xdrs
-is an XDR stream handle.
-The second parameter is the address
-of the floating point number that provides data to the stream
-or receives data from it.
-Both routines return
-.I TRUE
-if they complete successfully, and
-.I FALSE
-otherwise.
-.LP
-Note: Since the numbers are represented in IEEE floating point,
-routines may fail when decoding a valid IEEE representation
-into a machine-specific representation, or vice-versa.
-.NH 2
-\&Enumeration Filters
-.IX "XDR library" "enumeration filters"
-.LP
-The XDR library provides a primitive for generic enumerations.
-The primitive assumes that a C
-.I enum
-has the same representation inside the machine as a C integer.
-The boolean type is an important instance of the
-.I enum .
-The external representation of a boolean is always
-.I TRUE
-(1) or
-.I FALSE
-(0).
-.DS
-.ft CW
-#define bool_t int
-#define FALSE 0
-#define TRUE 1
-.sp.5
-#define enum_t int
-.sp.5
-bool_t xdr_enum(xdrs, ep)
- XDR *xdrs;
- enum_t *ep;
-.sp.5
-bool_t xdr_bool(xdrs, bp)
- XDR *xdrs;
- bool_t *bp;
-.DE
-The second parameters
-.I ep
-and
-.I bp
-are addresses of the associated type that provides data to, or
-receives data from, the stream
-.I xdrs .
-.NH 2
-\&No Data
-.IX "XDR library" "no data"
-.LP
-Occasionally, an XDR routine must be supplied to the RPC system,
-even when no data is passed or required.
-The library provides such a routine:
-.DS
-.ft CW
-bool_t xdr_void(); /* \fIalways returns TRUE\fP */
-.DE
-.NH 2
-\&Constructed Data Type Filters
-.IX "XDR library" "constructed data type filters"
-.LP
-Constructed or compound data type primitives
-require more parameters and perform more complicated functions
-then the primitives discussed above.
-This section includes primitives for
-strings, arrays, unions, and pointers to structures.
-.LP
-Constructed data type primitives may use memory management.
-In many cases, memory is allocated when deserializing data with
-.I XDR_DECODE
-Therefore, the XDR package must provide means to deallocate memory.
-This is done by an XDR operation,
-.I XDR_FREE
-To review, the three XDR directional operations are
-.I XDR_ENCODE ,
-.I XDR_DECODE
-and
-.I XDR_FREE .
-.NH 3
-\&Strings
-.IX "XDR library" "strings"
-.LP
-In C, a string is defined as a sequence of bytes
-terminated by a null byte,
-which is not considered when calculating string length.
-However, when a string is passed or manipulated,
-a pointer to it is employed.
-Therefore, the XDR library defines a string to be a
-.I "char *"
-and not a sequence of characters.
-The external representation of a string is drastically different
-from its internal representation.
-Externally, strings are represented as
-sequences of ASCII characters,
-while internally, they are represented with character pointers.
-Conversion between the two representations
-is accomplished with the routine
-.I xdr_string ():
-.IX xdr_string() "" \fIxdr_string()\fP
-.DS
-.ft CW
-bool_t xdr_string(xdrs, sp, maxlength)
- XDR *xdrs;
- char **sp;
- u_int maxlength;
-.DE
-The first parameter
-.I xdrs
-is the XDR stream handle.
-The second parameter
-.I sp
-is a pointer to a string (type
-.I "char **" .
-The third parameter
-.I maxlength
-specifies the maximum number of bytes allowed during encoding or decoding.
-its value is usually specified by a protocol. For example, a protocol
-specification may say that a file name may be no longer than 255 characters.
-.LP
-The routine returns
-.I FALSE
-if the number of characters exceeds
-.I maxlength ,
-and
-.I TRUE
-if it doesn't.
-.SH
-Keep
-.I maxlength
-small. If it is too big you can blow the heap, since
-.I xdr_string()
-will call
-.I malloc()
-for space.
-.LP
-The behavior of
-.I xdr_string()
-.IX xdr_string() "" \fIxdr_string()\fP
-is similar to the behavior of other routines
-discussed in this section. The direction
-.I XDR_ENCODE
-is easiest to understand. The parameter
-.I sp
-points to a string of a certain length;
-if the string does not exceed
-.I maxlength ,
-the bytes are serialized.
-.LP
-The effect of deserializing a string is subtle.
-First the length of the incoming string is determined;
-it must not exceed
-.I maxlength .
-Next
-.I sp
-is dereferenced; if the the value is
-.I NULL ,
-then a string of the appropriate length is allocated and
-.I *sp
-is set to this string.
-If the original value of
-.I *sp
-is non-null, then the XDR package assumes
-that a target area has been allocated,
-which can hold strings no longer than
-.I maxlength .
-In either case, the string is decoded into the target area.
-The routine then appends a null character to the string.
-.LP
-In the
-.I XDR_FREE
-operation, the string is obtained by dereferencing
-.I sp .
-If the string is not
-.I NULL ,
-it is freed and
-.I *sp
-is set to
-.I NULL .
-In this operation,
-.I xdr_string()
-ignores the
-.I maxlength
-parameter.
-.NH 3
-\&Byte Arrays
-.IX "XDR library" "byte arrays"
-.LP
-Often variable-length arrays of bytes are preferable to strings.
-Byte arrays differ from strings in the following three ways:
-1) the length of the array (the byte count) is explicitly
-located in an unsigned integer,
-2) the byte sequence is not terminated by a null character, and
-3) the external representation of the bytes is the same as their
-internal representation.
-The primitive
-.I xdr_bytes()
-.IX xdr_bytes() "" \fIxdr_bytes()\fP
-converts between the internal and external
-representations of byte arrays:
-.DS
-.ft CW
-bool_t xdr_bytes(xdrs, bpp, lp, maxlength)
- XDR *xdrs;
- char **bpp;
- u_int *lp;
- u_int maxlength;
-.DE
-The usage of the first, second and fourth parameters
-are identical to the first, second and third parameters of
-.I xdr_string (),
-respectively.
-The length of the byte area is obtained by dereferencing
-.I lp
-when serializing;
-.I *lp
-is set to the byte length when deserializing.
-.NH 3
-\&Arrays
-.IX "XDR library" "arrays"
-.LP
-The XDR library package provides a primitive
-for handling arrays of arbitrary elements.
-The
-.I xdr_bytes()
-routine treats a subset of generic arrays,
-in which the size of array elements is known to be 1,
-and the external description of each element is built-in.
-The generic array primitive,
-.I xdr_array() ,
-.IX xdr_array() "" \fIxdr_array()\fP
-requires parameters identical to those of
-.I xdr_bytes()
-plus two more:
-the size of array elements,
-and an XDR routine to handle each of the elements.
-This routine is called to encode or decode
-each element of the array.
-.DS
-.ft CW
-bool_t
-xdr_array(xdrs, ap, lp, maxlength, elementsiz, xdr_element)
- XDR *xdrs;
- char **ap;
- u_int *lp;
- u_int maxlength;
- u_int elementsiz;
- bool_t (*xdr_element)();
-.DE
-The parameter
-.I ap
-is the address of the pointer to the array.
-If
-.I *ap
-is
-.I NULL
-when the array is being deserialized,
-XDR allocates an array of the appropriate size and sets
-.I *ap
-to that array.
-The element count of the array is obtained from
-.I *lp
-when the array is serialized;
-.I *lp
-is set to the array length when the array is deserialized.
-The parameter
-.I maxlength
-is the maximum number of elements that the array is allowed to have;
-.I elementsiz
-is the byte size of each element of the array
-(the C function
-.I sizeof()
-can be used to obtain this value).
-The
-.I xdr_element()
-.IX xdr_element() "" \fIxdr_element()\fP
-routine is called to serialize, deserialize, or free
-each element of the array.
-.br
-.LP
-Before defining more constructed data types, it is appropriate to
-present three examples.
-.LP
-.I "Example A:"
-.br
-A user on a networked machine can be identified by
-(a) the machine name, such as
-.I krypton :
-see the
-.I gethostname
-man page; (b) the user's UID: see the
-.I geteuid
-man page; and (c) the group numbers to which the user belongs:
-see the
-.I getgroups
-man page. A structure with this information and its associated
-XDR routine could be coded like this:
-.ie t .DS
-.el .DS L
-.ft CW
-struct netuser {
- char *nu_machinename;
- int nu_uid;
- u_int nu_glen;
- int *nu_gids;
-};
-#define NLEN 255 /* \fImachine names < 256 chars\fP */
-#define NGRPS 20 /* \fIuser can't be in > 20 groups\fP */
-.sp.5
-bool_t
-xdr_netuser(xdrs, nup)
- XDR *xdrs;
- struct netuser *nup;
-{
- return(xdr_string(xdrs, &nup->nu_machinename, NLEN) &&
- xdr_int(xdrs, &nup->nu_uid) &&
- xdr_array(xdrs, &nup->nu_gids, &nup->nu_glen,
- NGRPS, sizeof (int), xdr_int));
-}
-.DE
-.LP
-.I "Example B:"
-.br
-A party of network users could be implemented
-as an array of
-.I netuser
-structure.
-The declaration and its associated XDR routines
-are as follows:
-.ie t .DS
-.el .DS L
-.ft CW
-struct party {
- u_int p_len;
- struct netuser *p_nusers;
-};
-#define PLEN 500 /* \fImax number of users in a party\fP */
-.sp.5
-bool_t
-xdr_party(xdrs, pp)
- XDR *xdrs;
- struct party *pp;
-{
- return(xdr_array(xdrs, &pp->p_nusers, &pp->p_len, PLEN,
- sizeof (struct netuser), xdr_netuser));
-}
-.DE
-.LP
-.I "Example C:"
-.br
-The well-known parameters to
-.I main ,
-.I argc
-and
-.I argv
-can be combined into a structure.
-An array of these structures can make up a history of commands.
-The declarations and XDR routines might look like:
-.ie t .DS
-.el .DS L
-.ft CW
-struct cmd {
- u_int c_argc;
- char **c_argv;
-};
-#define ALEN 1000 /* \fIargs cannot be > 1000 chars\fP */
-#define NARGC 100 /* \fIcommands cannot have > 100 args\fP */
-
-struct history {
- u_int h_len;
- struct cmd *h_cmds;
-};
-#define NCMDS 75 /* \fIhistory is no more than 75 commands\fP */
-
-bool_t
-xdr_wrap_string(xdrs, sp)
- XDR *xdrs;
- char **sp;
-{
- return(xdr_string(xdrs, sp, ALEN));
-}
-.DE
-.ie t .DS
-.el .DS L
-.ft CW
-bool_t
-xdr_cmd(xdrs, cp)
- XDR *xdrs;
- struct cmd *cp;
-{
- return(xdr_array(xdrs, &cp->c_argv, &cp->c_argc, NARGC,
- sizeof (char *), xdr_wrap_string));
-}
-.DE
-.ie t .DS
-.el .DS L
-.ft CW
-bool_t
-xdr_history(xdrs, hp)
- XDR *xdrs;
- struct history *hp;
-{
- return(xdr_array(xdrs, &hp->h_cmds, &hp->h_len, NCMDS,
- sizeof (struct cmd), xdr_cmd));
-}
-.DE
-The most confusing part of this example is that the routine
-.I xdr_wrap_string()
-is needed to package the
-.I xdr_string()
-routine, because the implementation of
-.I xdr_array()
-only passes two parameters to the array element description routine;
-.I xdr_wrap_string()
-supplies the third parameter to
-.I xdr_string ().
-.LP
-By now the recursive nature of the XDR library should be obvious.
-Let's continue with more constructed data types.
-.NH 3
-\&Opaque Data
-.IX "XDR library" "opaque data"
-.LP
-In some protocols, handles are passed from a server to client.
-The client passes the handle back to the server at some later time.
-Handles are never inspected by clients;
-they are obtained and submitted.
-That is to say, handles are opaque.
-The
-.I xdr_opaque()
-.IX xdr_opaque() "" \fIxdr_opaque()\fP
-primitive is used for describing fixed sized, opaque bytes.
-.DS
-.ft CW
-bool_t xdr_opaque(xdrs, p, len)
- XDR *xdrs;
- char *p;
- u_int len;
-.DE
-The parameter
-.I p
-is the location of the bytes;
-.I len
-is the number of bytes in the opaque object.
-By definition, the actual data
-contained in the opaque object are not machine portable.
-.NH 3
-\&Fixed Sized Arrays
-.IX "XDR library" "fixed sized arrays"
-.LP
-The XDR library provides a primitive,
-.I xdr_vector (),
-for fixed-length arrays.
-.ie t .DS
-.el .DS L
-.ft CW
-#define NLEN 255 /* \fImachine names must be < 256 chars\fP */
-#define NGRPS 20 /* \fIuser belongs to exactly 20 groups\fP */
-.sp.5
-struct netuser {
- char *nu_machinename;
- int nu_uid;
- int nu_gids[NGRPS];
-};
-.sp.5
-bool_t
-xdr_netuser(xdrs, nup)
- XDR *xdrs;
- struct netuser *nup;
-{
- int i;
-.sp.5
- if (!xdr_string(xdrs, &nup->nu_machinename, NLEN))
- return(FALSE);
- if (!xdr_int(xdrs, &nup->nu_uid))
- return(FALSE);
- if (!xdr_vector(xdrs, nup->nu_gids, NGRPS, sizeof(int),
- xdr_int)) {
- return(FALSE);
- }
- return(TRUE);
-}
-.DE
-.NH 3
-\&Discriminated Unions
-.IX "XDR library" "discriminated unions"
-.LP
-The XDR library supports discriminated unions.
-A discriminated union is a C union and an
-.I enum_t
-value that selects an \*Qarm\*U of the union.
-.DS
-.ft CW
-struct xdr_discrim {
- enum_t value;
- bool_t (*proc)();
-};
-.sp.5
-bool_t xdr_union(xdrs, dscmp, unp, arms, defaultarm)
- XDR *xdrs;
- enum_t *dscmp;
- char *unp;
- struct xdr_discrim *arms;
- bool_t (*defaultarm)(); /* \fImay equal NULL\fP */
-.DE
-First the routine translates the discriminant of the union located at
-.I *dscmp .
-The discriminant is always an
-.I enum_t .
-Next the union located at
-.I *unp
-is translated.
-The parameter
-.I arms
-is a pointer to an array of
-.I xdr_discrim
-structures.
-Each structure contains an ordered pair of
-.I [value,proc] .
-If the union's discriminant is equal to the associated
-.I value ,
-then the
-.I proc
-is called to translate the union.
-The end of the
-.I xdr_discrim
-structure array is denoted by a routine of value
-.I NULL
-(0). If the discriminant is not found in the
-.I arms
-array, then the
-.I defaultarm
-procedure is called if it is non-null;
-otherwise the routine returns
-.I FALSE .
-.LP
-.I "Example D:"
-Suppose the type of a union may be integer,
-character pointer (a string), or a
-.I gnumbers
-structure.
-Also, assume the union and its current type
-are declared in a structure.
-The declaration is:
-.ie t .DS
-.el .DS L
-.ft CW
-enum utype { INTEGER=1, STRING=2, GNUMBERS=3 };
-.sp.5
-struct u_tag {
- enum utype utype; /* \fIthe union's discriminant\fP */
- union {
- int ival;
- char *pval;
- struct gnumbers gn;
- } uval;
-};
-.DE
-The following constructs and XDR procedure (de)serialize
-the discriminated union:
-.ie t .DS
-.el .DS L
-.ft CW
-struct xdr_discrim u_tag_arms[4] = {
- { INTEGER, xdr_int },
- { GNUMBERS, xdr_gnumbers }
- { STRING, xdr_wrap_string },
- { __dontcare__, NULL }
- /* \fIalways terminate arms with a NULL xdr_proc\fP */
-}
-.sp.5
-bool_t
-xdr_u_tag(xdrs, utp)
- XDR *xdrs;
- struct u_tag *utp;
-{
- return(xdr_union(xdrs, &utp->utype, &utp->uval,
- u_tag_arms, NULL));
-}
-.DE
-The routine
-.I xdr_gnumbers()
-was presented above in
-.I "The XDR Library"
-section.
-.I xdr_wrap_string()
-was presented in example C.
-The default
-.I arm
-parameter to
-.I xdr_union()
-(the last parameter) is
-.I NULL
-in this example. Therefore the value of the union's discriminant
-may legally take on only values listed in the
-.I u_tag_arms
-array. This example also demonstrates that
-the elements of the arm's array do not need to be sorted.
-.LP
-It is worth pointing out that the values of the discriminant
-may be sparse, though in this example they are not.
-It is always good
-practice to assign explicitly integer values to each element of the
-discriminant's type.
-This practice both documents the external
-representation of the discriminant and guarantees that different
-C compilers emit identical discriminant values.
-.LP
-Exercise: Implement
-.I xdr_union()
-using the other primitives in this section.
-.NH 3
-\&Pointers
-.IX "XDR library" "pointers"
-.LP
-In C it is often convenient to put pointers
-to another structure within a structure.
-The
-.I xdr_reference()
-.IX xdr_reference() "" \fIxdr_reference()\fP
-primitive makes it easy to serialize, deserialize, and free
-these referenced structures.
-.DS
-.ft CW
-bool_t xdr_reference(xdrs, pp, size, proc)
- XDR *xdrs;
- char **pp;
- u_int ssize;
- bool_t (*proc)();
-.DE
-.LP
-Parameter
-.I pp
-is the address of
-the pointer to the structure;
-parameter
-.I ssize
-is the size in bytes of the structure (use the C function
-.I sizeof()
-to obtain this value); and
-.I proc
-is the XDR routine that describes the structure.
-When decoding data, storage is allocated if
-.I *pp
-is
-.I NULL .
-.LP
-There is no need for a primitive
-.I xdr_struct()
-to describe structures within structures,
-because pointers are always sufficient.
-.LP
-Exercise: Implement
-.I xdr_reference()
-using
-.I xdr_array ().
-Warning:
-.I xdr_reference()
-and
-.I xdr_array()
-are NOT interchangeable external representations of data.
-.LP
-.I "Example E:"
-Suppose there is a structure containing a person's name
-and a pointer to a
-.I gnumbers
-structure containing the person's gross assets and liabilities.
-The construct is:
-.DS
-.ft CW
-struct pgn {
- char *name;
- struct gnumbers *gnp;
-};
-.DE
-The corresponding XDR routine for this structure is:
-.DS
-.ft CW
-bool_t
-xdr_pgn(xdrs, pp)
- XDR *xdrs;
- struct pgn *pp;
-{
- if (xdr_string(xdrs, &pp->name, NLEN) &&
- xdr_reference(xdrs, &pp->gnp,
- sizeof(struct gnumbers), xdr_gnumbers))
- return(TRUE);
- return(FALSE);
-}
-.DE
-.IX "pointer semantics and XDR"
-.I "Pointer Semantics and XDR"
-.LP
-In many applications, C programmers attach double meaning to
-the values of a pointer. Typically the value
-.I NULL
-(or zero) means data is not needed,
-yet some application-specific interpretation applies.
-In essence, the C programmer is encoding
-a discriminated union efficiently
-by overloading the interpretation of the value of a pointer.
-For instance, in example E a
-.I NULL
-pointer value for
-.I gnp
-could indicate that
-the person's assets and liabilities are unknown.
-That is, the pointer value encodes two things:
-whether or not the data is known;
-and if it is known, where it is located in memory.
-Linked lists are an extreme example of the use
-of application-specific pointer interpretation.
-.LP
-The primitive
-.I xdr_reference()
-.IX xdr_reference() "" \fIxdr_reference()\fP
-cannot and does not attach any special
-meaning to a null-value pointer during serialization.
-That is, passing an address of a pointer whose value is
-.I NULL
-to
-.I xdr_reference()
-when serialing data will most likely cause a memory fault and, on the UNIX
-system, a core dump.
-.LP
-.I xdr_pointer()
-correctly handles
-.I NULL
-pointers. For more information about its use, see
-the
-.I "Linked Lists"
-topics below.
-.LP
-.I Exercise:
-After reading the section on
-.I "Linked Lists" ,
-return here and extend example E so that
-it can correctly deal with
-.I NULL
-pointer values.
-.LP
-.I Exercise:
-Using the
-.I xdr_union (),
-.I xdr_reference()
-and
-.I xdr_void()
-primitives, implement a generic pointer handling primitive
-that implicitly deals with
-.I NULL
-pointers. That is, implement
-.I xdr_pointer ().
-.NH 2
-\&Non-filter Primitives
-.IX "XDR" "non-filter primitives"
-.LP
-XDR streams can be manipulated with
-the primitives discussed in this section.
-.DS
-.ft CW
-u_int xdr_getpos(xdrs)
- XDR *xdrs;
-.sp.5
-bool_t xdr_setpos(xdrs, pos)
- XDR *xdrs;
- u_int pos;
-.sp.5
-xdr_destroy(xdrs)
- XDR *xdrs;
-.DE
-The routine
-.I xdr_getpos()
-.IX xdr_getpos() "" \fIxdr_getpos()\fP
-returns an unsigned integer
-that describes the current position in the data stream.
-Warning: In some XDR streams, the returned value of
-.I xdr_getpos()
-is meaningless;
-the routine returns a \-1 in this case
-(though \-1 should be a legitimate value).
-.LP
-The routine
-.I xdr_setpos()
-.IX xdr_setpos() "" \fIxdr_setpos()\fP
-sets a stream position to
-.I pos .
-Warning: In some XDR streams, setting a position is impossible;
-in such cases,
-.I xdr_setpos()
-will return
-.I FALSE .
-This routine will also fail if the requested position is out-of-bounds.
-The definition of bounds varies from stream to stream.
-.LP
-The
-.I xdr_destroy()
-.IX xdr_destroy() "" \fIxdr_destroy()\fP
-primitive destroys the XDR stream.
-Usage of the stream
-after calling this routine is undefined.
-.NH 2
-\&XDR Operation Directions
-.IX XDR "operation directions"
-.IX "direction of XDR operations"
-.LP
-At times you may wish to optimize XDR routines by taking
-advantage of the direction of the operation \(em
-.I XDR_ENCODE
-.I XDR_DECODE
-or
-.I XDR_FREE
-The value
-.I xdrs->x_op
-always contains the direction of the XDR operation.
-Programmers are not encouraged to take advantage of this information.
-Therefore, no example is presented here. However, an example in the
-.I "Linked Lists"
-topic below, demonstrates the usefulness of the
-.I xdrs->x_op
-field.
-.NH 2
-\&XDR Stream Access
-.IX "XDR" "stream access"
-.LP
-An XDR stream is obtained by calling the appropriate creation routine.
-These creation routines take arguments that are tailored to the
-specific properties of the stream.
-.LP
-Streams currently exist for (de)serialization of data to or from
-standard I/O
-.I FILE
-streams, TCP/IP connections and UNIX files, and memory.
-.NH 3
-\&Standard I/O Streams
-.IX "XDR" "standard I/O streams"
-.LP
-XDR streams can be interfaced to standard I/O using the
-.I xdrstdio_create()
-.IX xdrstdio_create() "" \fIxdrstdio_create()\fP
-routine as follows:
-.DS
-.ft CW
-#include <stdio.h>
-#include <rpc/rpc.h> /* \fIxdr streams part of rpc\fP */
-.sp.5
-void
-xdrstdio_create(xdrs, fp, x_op)
- XDR *xdrs;
- FILE *fp;
- enum xdr_op x_op;
-.DE
-The routine
-.I xdrstdio_create()
-initializes an XDR stream pointed to by
-.I xdrs .
-The XDR stream interfaces to the standard I/O library.
-Parameter
-.I fp
-is an open file, and
-.I x_op
-is an XDR direction.
-.NH 3
-\&Memory Streams
-.IX "XDR" "memory streams"
-.LP
-Memory streams allow the streaming of data into or out of
-a specified area of memory:
-.DS
-.ft CW
-#include <rpc/rpc.h>
-.sp.5
-void
-xdrmem_create(xdrs, addr, len, x_op)
- XDR *xdrs;
- char *addr;
- u_int len;
- enum xdr_op x_op;
-.DE
-The routine
-.I xdrmem_create()
-.IX xdrmem_create() "" \fIxdrmem_create()\fP
-initializes an XDR stream in local memory.
-The memory is pointed to by parameter
-.I addr ;
-parameter
-.I len
-is the length in bytes of the memory.
-The parameters
-.I xdrs
-and
-.I x_op
-are identical to the corresponding parameters of
-.I xdrstdio_create ().
-Currently, the UDP/IP implementation of RPC uses
-.I xdrmem_create ().
-Complete call or result messages are built in memory before calling the
-.I sendto()
-system routine.
-.NH 3
-\&Record (TCP/IP) Streams
-.IX "XDR" "record (TCP/IP) streams"
-.LP
-A record stream is an XDR stream built on top of
-a record marking standard that is built on top of the
-UNIX file or 4.2 BSD connection interface.
-.DS
-.ft CW
-#include <rpc/rpc.h> /* \fIxdr streams part of rpc\fP */
-.sp.5
-xdrrec_create(xdrs,
- sendsize, recvsize, iohandle, readproc, writeproc)
- XDR *xdrs;
- u_int sendsize, recvsize;
- char *iohandle;
- int (*readproc)(), (*writeproc)();
-.DE
-The routine
-.I xdrrec_create()
-provides an XDR stream interface that allows for a bidirectional,
-arbitrarily long sequence of records.
-The contents of the records are meant to be data in XDR form.
-The stream's primary use is for interfacing RPC to TCP connections.
-However, it can be used to stream data into or out of normal
-UNIX files.
-.LP
-The parameter
-.I xdrs
-is similar to the corresponding parameter described above.
-The stream does its own data buffering similar to that of standard I/O.
-The parameters
-.I sendsize
-and
-.I recvsize
-determine the size in bytes of the output and input buffers, respectively;
-if their values are zero (0), then predetermined defaults are used.
-When a buffer needs to be filled or flushed, the routine
-.I readproc()
-or
-.I writeproc()
-is called, respectively.
-The usage and behavior of these
-routines are similar to the UNIX system calls
-.I read()
-and
-.I write ().
-However,
-the first parameter to each of these routines is the opaque parameter
-.I iohandle .
-The other two parameters
-.I buf ""
-and
-.I nbytes )
-and the results
-(byte count) are identical to the system routines.
-If
-.I xxx
-is
-.I readproc()
-or
-.I writeproc (),
-then it has the following form:
-.DS
-.ft CW
-.ft I
-/*
- * returns the actual number of bytes transferred.
- * -1 is an error
- */
-.ft CW
-int
-xxx(iohandle, buf, len)
- char *iohandle;
- char *buf;
- int nbytes;
-.DE
-The XDR stream provides means for delimiting records in the byte stream.
-The implementation details of delimiting records in a stream are
-discussed in the
-.I "Advanced Topics"
-topic below.
-The primitives that are specific to record streams are as follows:
-.DS
-.ft CW
-bool_t
-xdrrec_endofrecord(xdrs, flushnow)
- XDR *xdrs;
- bool_t flushnow;
-.sp.5
-bool_t
-xdrrec_skiprecord(xdrs)
- XDR *xdrs;
-.sp.5
-bool_t
-xdrrec_eof(xdrs)
- XDR *xdrs;
-.DE
-The routine
-.I xdrrec_endofrecord()
-.IX xdrrec_endofrecord() "" \fIxdrrec_endofrecord()\fP
-causes the current outgoing data to be marked as a record.
-If the parameter
-.I flushnow
-is
-.I TRUE ,
-then the stream's
-.I writeproc
-will be called; otherwise,
-.I writeproc
-will be called when the output buffer has been filled.
-.LP
-The routine
-.I xdrrec_skiprecord()
-.IX xdrrec_skiprecord() "" \fIxdrrec_skiprecord()\fP
-causes an input stream's position to be moved past
-the current record boundary and onto the
-beginning of the next record in the stream.
-.LP
-If there is no more data in the stream's input buffer,
-then the routine
-.I xdrrec_eof()
-.IX xdrrec_eof() "" \fIxdrrec_eof()\fP
-returns
-.I TRUE .
-That is not to say that there is no more data
-in the underlying file descriptor.
-.NH 2
-\&XDR Stream Implementation
-.IX "XDR" "stream implementation"
-.IX "stream implementation in XDR"
-.LP
-This section provides the abstract data types needed
-to implement new instances of XDR streams.
-.NH 3
-\&The XDR Object
-.IX "XDR" "object"
-.LP
-The following structure defines the interface to an XDR stream:
-.ie t .DS
-.el .DS L
-.ft CW
-enum xdr_op { XDR_ENCODE=0, XDR_DECODE=1, XDR_FREE=2 };
-.sp.5
-typedef struct {
- enum xdr_op x_op; /* \fIoperation; fast added param\fP */
- struct xdr_ops {
- bool_t (*x_getlong)(); /* \fIget long from stream\fP */
- bool_t (*x_putlong)(); /* \fIput long to stream\fP */
- bool_t (*x_getbytes)(); /* \fIget bytes from stream\fP */
- bool_t (*x_putbytes)(); /* \fIput bytes to stream\fP */
- u_int (*x_getpostn)(); /* \fIreturn stream offset\fP */
- bool_t (*x_setpostn)(); /* \fIreposition offset\fP */
- caddr_t (*x_inline)(); /* \fIptr to buffered data\fP */
- VOID (*x_destroy)(); /* \fIfree private area\fP */
- } *x_ops;
- caddr_t x_public; /* \fIusers' data\fP */
- caddr_t x_private; /* \fIpointer to private data\fP */
- caddr_t x_base; /* \fIprivate for position info\fP */
- int x_handy; /* \fIextra private word\fP */
-} XDR;
-.DE
-The
-.I x_op
-field is the current operation being performed on the stream.
-This field is important to the XDR primitives,
-but should not affect a stream's implementation.
-That is, a stream's implementation should not depend
-on this value.
-The fields
-.I x_private ,
-.I x_base ,
-and
-.I x_handy
-are private to the particular
-stream's implementation.
-The field
-.I x_public
-is for the XDR client and should never be used by
-the XDR stream implementations or the XDR primitives.
-.I x_getpostn() ,
-.I x_setpostn()
-and
-.I x_destroy()
-are macros for accessing operations. The operation
-.I x_inline()
-takes two parameters:
-an XDR *, and an unsigned integer, which is a byte count.
-The routine returns a pointer to a piece of
-the stream's internal buffer.
-The caller can then use the buffer segment for any purpose.
-From the stream's point of view, the bytes in the
-buffer segment have been consumed or put.
-The routine may return
-.I NULL
-if it cannot return a buffer segment of the requested size.
-(The
-.I x_inline()
-routine is for cycle squeezers.
-Use of the resulting buffer is not data-portable.
-Users are encouraged not to use this feature.)
-.LP
-The operations
-.I x_getbytes()
-and
-.I x_putbytes()
-blindly get and put sequences of bytes
-from or to the underlying stream;
-they return
-.I TRUE
-if they are successful, and
-.I FALSE
-otherwise. The routines have identical parameters (replace
-.I xxx ):
-.DS
-.ft CW
-bool_t
-xxxbytes(xdrs, buf, bytecount)
- XDR *xdrs;
- char *buf;
- u_int bytecount;
-.DE
-The operations
-.I x_getlong()
-and
-.I x_putlong()
-receive and put
-long numbers from and to the data stream.
-It is the responsibility of these routines
-to translate the numbers between the machine representation
-and the (standard) external representation.
-The UNIX primitives
-.I htonl()
-and
-.I ntohl()
-can be helpful in accomplishing this.
-The higher-level XDR implementation assumes that
-signed and unsigned long integers contain the same number of bits,
-and that nonnegative integers
-have the same bit representations as unsigned integers.
-The routines return
-.I TRUE
-if they succeed, and
-.I FALSE
-otherwise. They have identical parameters:
-.DS
-.ft CW
-bool_t
-xxxlong(xdrs, lp)
- XDR *xdrs;
- long *lp;
-.DE
-Implementors of new XDR streams must make an XDR structure
-(with new operation routines) available to clients,
-using some kind of create routine.
-.NH 1
-\&Advanced Topics
-.IX XDR "advanced topics"
-.LP
-This section describes techniques for passing data structures that
-are not covered in the preceding sections. Such structures include
-linked lists (of arbitrary lengths). Unlike the simpler examples
-covered in the earlier sections, the following examples are written
-using both the XDR C library routines and the XDR data description
-language.
-The
-.I "External Data Representation Standard: Protocol Specification"
-describes this
-language in complete detail.
-.NH 2
-\&Linked Lists
-.IX XDR "linked lists"
-.LP
-The last example in the
-.I Pointers
-topic earlier in this chapter
-presented a C data structure and its associated XDR
-routines for a individual's gross assets and liabilities.
-The example is duplicated below:
-.ie t .DS
-.el .DS L
-.ft CW
-struct gnumbers {
- long g_assets;
- long g_liabilities;
-};
-.sp.5
-bool_t
-xdr_gnumbers(xdrs, gp)
- XDR *xdrs;
- struct gnumbers *gp;
-{
- if (xdr_long(xdrs, &(gp->g_assets)))
- return(xdr_long(xdrs, &(gp->g_liabilities)));
- return(FALSE);
-}
-.DE
-.LP
-Now assume that we wish to implement a linked list of such information.
-A data structure could be constructed as follows:
-.ie t .DS
-.el .DS L
-.ft CW
-struct gnumbers_node {
- struct gnumbers gn_numbers;
- struct gnumbers_node *gn_next;
-};
-.sp .5
-typedef struct gnumbers_node *gnumbers_list;
-.DE
-.LP
-The head of the linked list can be thought of as the data object;
-that is, the head is not merely a convenient shorthand for a
-structure. Similarly the
-.I gn_next
-field is used to indicate whether or not the object has terminated.
-Unfortunately, if the object continues, the
-.I gn_next
-field is also the address of where it continues. The link addresses
-carry no useful information when the object is serialized.
-.LP
-The XDR data description of this linked list is described by the
-recursive declaration of
-.I gnumbers_list :
-.ie t .DS
-.el .DS L
-.ft CW
-struct gnumbers {
- int g_assets;
- int g_liabilities;
-};
-.sp .5
-struct gnumbers_node {
- gnumbers gn_numbers;
- gnumbers_node *gn_next;
-};
-.DE
-.LP
-In this description, the boolean indicates whether there is more data
-following it. If the boolean is
-.I FALSE ,
-then it is the last data field of the structure. If it is
-.I TRUE ,
-then it is followed by a gnumbers structure and (recursively) by a
-.I gnumbers_list .
-Note that the C declaration has no boolean explicitly declared in it
-(though the
-.I gn_next
-field implicitly carries the information), while the XDR data
-description has no pointer explicitly declared in it.
-.LP
-Hints for writing the XDR routines for a
-.I gnumbers_list
-follow easily from the XDR description above. Note how the primitive
-.I xdr_pointer()
-is used to implement the XDR union above.
-.ie t .DS
-.el .DS L
-.ft CW
-bool_t
-xdr_gnumbers_node(xdrs, gn)
- XDR *xdrs;
- gnumbers_node *gn;
-{
- return(xdr_gnumbers(xdrs, &gn->gn_numbers) &&
- xdr_gnumbers_list(xdrs, &gp->gn_next));
-}
-.sp .5
-bool_t
-xdr_gnumbers_list(xdrs, gnp)
- XDR *xdrs;
- gnumbers_list *gnp;
-{
- return(xdr_pointer(xdrs, gnp,
- sizeof(struct gnumbers_node),
- xdr_gnumbers_node));
-}
-.DE
-.LP
-The unfortunate side effect of XDR'ing a list with these routines
-is that the C stack grows linearly with respect to the number of
-node in the list. This is due to the recursion. The following
-routine collapses the above two mutually recursive into a single,
-non-recursive one.
-.ie t .DS
-.el .DS L
-.ft CW
-bool_t
-xdr_gnumbers_list(xdrs, gnp)
- XDR *xdrs;
- gnumbers_list *gnp;
-{
- bool_t more_data;
- gnumbers_list *nextp;
-.sp .5
- for (;;) {
- more_data = (*gnp != NULL);
- if (!xdr_bool(xdrs, &more_data)) {
- return(FALSE);
- }
- if (! more_data) {
- break;
- }
- if (xdrs->x_op == XDR_FREE) {
- nextp = &(*gnp)->gn_next;
- }
- if (!xdr_reference(xdrs, gnp,
- sizeof(struct gnumbers_node), xdr_gnumbers)) {
-
- return(FALSE);
- }
- gnp = (xdrs->x_op == XDR_FREE) ?
- nextp : &(*gnp)->gn_next;
- }
- *gnp = NULL;
- return(TRUE);
-}
-.DE
-.LP
-The first task is to find out whether there is more data or not,
-so that this boolean information can be serialized. Notice that
-this statement is unnecessary in the
-.I XDR_DECODE
-case, since the value of more_data is not known until we
-deserialize it in the next statement.
-.LP
-The next statement XDR's the more_data field of the XDR union.
-Then if there is truly no more data, we set this last pointer to
-.I NULL
-to indicate the end of the list, and return
-.I TRUE
-because we are done. Note that setting the pointer to
-.I NULL
-is only important in the
-.I XDR_DECODE
-case, since it is already
-.I NULL
-in the
-.I XDR_ENCODE
-and
-XDR_FREE
-cases.
-.LP
-Next, if the direction is
-.I XDR_FREE ,
-the value of
-.I nextp
-is set to indicate the location of the next pointer in the list.
-We do this now because we need to dereference gnp to find the
-location of the next item in the list, and after the next
-statement the storage pointed to by
-.I gnp
-will be freed up and no be longer valid. We can't do this for all
-directions though, because in the
-.I XDR_DECODE
-direction the value of
-.I gnp
-won't be set until the next statement.
-.LP
-Next, we XDR the data in the node using the primitive
-.I xdr_reference ().
-.I xdr_reference()
-is like
-.I xdr_pointer()
-which we used before, but it does not
-send over the boolean indicating whether there is more data.
-We use it instead of
-.I xdr_pointer()
-because we have already XDR'd this information ourselves. Notice
-that the xdr routine passed is not the same type as an element
-in the list. The routine passed is
-.I xdr_gnumbers (),
-for XDR'ing gnumbers, but each element in the list is actually of
-type
-.I gnumbers_node .
-We don't pass
-.I xdr_gnumbers_node()
-because it is recursive, and instead use
-.I xdr_gnumbers()
-which XDR's all of the non-recursive part. Note that this trick
-will work only if the
-.I gn_numbers
-field is the first item in each element, so that their addresses
-are identical when passed to
-.I xdr_reference ().
-.LP
-Finally, we update
-.I gnp
-to point to the next item in the list. If the direction is
-.I XDR_FREE ,
-we set it to the previously saved value, otherwise we can
-dereference
-.I gnp
-to get the proper value. Though harder to understand than the
-recursive version, this non-recursive routine is far less likely
-to blow the C stack. It will also run more efficiently since
-a lot of procedure call overhead has been removed. Most lists
-are small though (in the hundreds of items or less) and the
-recursive version should be sufficient for them.
-.EQ
-delim off
-.EN
diff --git a/lib/libc/rpc/PSD.doc/xdr.rfc.ms b/lib/libc/rpc/PSD.doc/xdr.rfc.ms
deleted file mode 100644
index d4baff5..0000000
--- a/lib/libc/rpc/PSD.doc/xdr.rfc.ms
+++ /dev/null
@@ -1,1058 +0,0 @@
-.\"
-.\" Must use -- tbl -- with this one
-.\"
-.\" @(#)xdr.rfc.ms 2.2 88/08/05 4.0 RPCSRC
-.de BT
-.if \\n%=1 .tl ''- % -''
-..
-.ND
-.\" prevent excess underlining in nroff
-.if n .fp 2 R
-.OH 'External Data Representation Standard''Page %'
-.EH 'Page %''External Data Representation Standard'
-.IX "External Data Representation"
-.if \\n%=1 .bp
-.SH
-\&External Data Representation Standard: Protocol Specification
-.IX XDR RFC
-.IX XDR "protocol specification"
-.LP
-.NH 0
-\&Status of this Standard
-.nr OF 1
-.IX XDR "RFC status"
-.LP
-Note: This chapter specifies a protocol that Sun Microsystems, Inc., and
-others are using. It has been designated RFC1014 by the ARPA Network
-Information Center.
-.NH 1
-Introduction
-\&
-.LP
-XDR is a standard for the description and encoding of data. It is
-useful for transferring data between different computer
-architectures, and has been used to communicate data between such
-diverse machines as the Sun Workstation, VAX, IBM-PC, and Cray.
-XDR fits into the ISO presentation layer, and is roughly analogous in
-purpose to X.409, ISO Abstract Syntax Notation. The major difference
-between these two is that XDR uses implicit typing, while X.409 uses
-explicit typing.
-.LP
-XDR uses a language to describe data formats. The language can only
-be used only to describe data; it is not a programming language.
-This language allows one to describe intricate data formats in a
-concise manner. The alternative of using graphical representations
-(itself an informal language) quickly becomes incomprehensible when
-faced with complexity. The XDR language itself is similar to the C
-language [1], just as Courier [4] is similar to Mesa. Protocols such
-as Sun RPC (Remote Procedure Call) and the NFS (Network File System)
-use XDR to describe the format of their data.
-.LP
-The XDR standard makes the following assumption: that bytes (or
-octets) are portable, where a byte is defined to be 8 bits of data.
-A given hardware device should encode the bytes onto the various
-media in such a way that other hardware devices may decode the bytes
-without loss of meaning. For example, the Ethernet standard
-suggests that bytes be encoded in "little-endian" style [2], or least
-significant bit first.
-.NH 2
-\&Basic Block Size
-.IX XDR "basic block size"
-.IX XDR "block size"
-.LP
-The representation of all items requires a multiple of four bytes (or
-32 bits) of data. The bytes are numbered 0 through n-1. The bytes
-are read or written to some byte stream such that byte m always
-precedes byte m+1. If the n bytes needed to contain the data are not
-a multiple of four, then the n bytes are followed by enough (0 to 3)
-residual zero bytes, r, to make the total byte count a multiple of 4.
-.LP
-We include the familiar graphic box notation for illustration and
-comparison. In most illustrations, each box (delimited by a plus
-sign at the 4 corners and vertical bars and dashes) depicts a byte.
-Ellipses (...) between boxes show zero or more additional bytes where
-required.
-.ie t .DS
-.el .DS L
-\fIA Block\fP
-
-\f(CW+--------+--------+...+--------+--------+...+--------+
-| byte 0 | byte 1 |...|byte n-1| 0 |...| 0 |
-+--------+--------+...+--------+--------+...+--------+
-|<-----------n bytes---------->|<------r bytes------>|
-|<-----------n+r (where (n+r) mod 4 = 0)>----------->|\fP
-
-.DE
-.NH 1
-\&XDR Data Types
-.IX XDR "data types"
-.IX "XDR data types"
-.LP
-Each of the sections that follow describes a data type defined in the
-XDR standard, shows how it is declared in the language, and includes
-a graphic illustration of its encoding.
-.LP
-For each data type in the language we show a general paradigm
-declaration. Note that angle brackets (< and >) denote
-variable length sequences of data and square brackets ([ and ]) denote
-fixed-length sequences of data. "n", "m" and "r" denote integers.
-For the full language specification and more formal definitions of
-terms such as "identifier" and "declaration", refer to
-.I "The XDR Language Specification" ,
-below.
-.LP
-For some data types, more specific examples are included.
-A more extensive example of a data description is in
-.I "An Example of an XDR Data Description"
-below.
-.NH 2
-\&Integer
-.IX XDR integer
-.LP
-An XDR signed integer is a 32-bit datum that encodes an integer in
-the range [-2147483648,2147483647]. The integer is represented in
-two's complement notation. The most and least significant bytes are
-0 and 3, respectively. Integers are declared as follows:
-.ie t .DS
-.el .DS L
-\fIInteger\fP
-
-\f(CW(MSB) (LSB)
-+-------+-------+-------+-------+
-|byte 0 |byte 1 |byte 2 |byte 3 |
-+-------+-------+-------+-------+
-<------------32 bits------------>\fP
-.DE
-.NH 2
-\&Unsigned Integer
-.IX XDR "unsigned integer"
-.IX XDR "integer, unsigned"
-.LP
-An XDR unsigned integer is a 32-bit datum that encodes a nonnegative
-integer in the range [0,4294967295]. It is represented by an
-unsigned binary number whose most and least significant bytes are 0
-and 3, respectively. An unsigned integer is declared as follows:
-.ie t .DS
-.el .DS L
-\fIUnsigned Integer\fP
-
-\f(CW(MSB) (LSB)
-+-------+-------+-------+-------+
-|byte 0 |byte 1 |byte 2 |byte 3 |
-+-------+-------+-------+-------+
-<------------32 bits------------>\fP
-.DE
-.NH 2
-\&Enumeration
-.IX XDR enumeration
-.LP
-Enumerations have the same representation as signed integers.
-Enumerations are handy for describing subsets of the integers.
-Enumerated data is declared as follows:
-.ft CW
-.DS
-enum { name-identifier = constant, ... } identifier;
-.DE
-For example, the three colors red, yellow, and blue could be
-described by an enumerated type:
-.DS
-.ft CW
-enum { RED = 2, YELLOW = 3, BLUE = 5 } colors;
-.DE
-It is an error to encode as an enum any other integer than those that
-have been given assignments in the enum declaration.
-.NH 2
-\&Boolean
-.IX XDR boolean
-.LP
-Booleans are important enough and occur frequently enough to warrant
-their own explicit type in the standard. Booleans are declared as
-follows:
-.DS
-.ft CW
-bool identifier;
-.DE
-This is equivalent to:
-.DS
-.ft CW
-enum { FALSE = 0, TRUE = 1 } identifier;
-.DE
-.NH 2
-\&Hyper Integer and Unsigned Hyper Integer
-.IX XDR "hyper integer"
-.IX XDR "integer, hyper"
-.LP
-The standard also defines 64-bit (8-byte) numbers called hyper
-integer and unsigned hyper integer. Their representations are the
-obvious extensions of integer and unsigned integer defined above.
-They are represented in two's complement notation. The most and
-least significant bytes are 0 and 7, respectively. Their
-declarations:
-.ie t .DS
-.el .DS L
-\fIHyper Integer\fP
-\fIUnsigned Hyper Integer\fP
-
-\f(CW(MSB) (LSB)
-+-------+-------+-------+-------+-------+-------+-------+-------+
-|byte 0 |byte 1 |byte 2 |byte 3 |byte 4 |byte 5 |byte 6 |byte 7 |
-+-------+-------+-------+-------+-------+-------+-------+-------+
-<----------------------------64 bits---------------------------->\fP
-.DE
-.NH 2
-\&Floating-point
-.IX XDR "integer, floating point"
-.IX XDR "floating-point integer"
-.LP
-The standard defines the floating-point data type "float" (32 bits or
-4 bytes). The encoding used is the IEEE standard for normalized
-single-precision floating-point numbers [3]. The following three
-fields describe the single-precision floating-point number:
-.RS
-.IP \fBS\fP:
-The sign of the number. Values 0 and 1 represent positive and
-negative, respectively. One bit.
-.IP \fBE\fP:
-The exponent of the number, base 2. 8 bits are devoted to this
-field. The exponent is biased by 127.
-.IP \fBF\fP:
-The fractional part of the number's mantissa, base 2. 23 bits
-are devoted to this field.
-.RE
-.LP
-Therefore, the floating-point number is described by:
-.DS
-(-1)**S * 2**(E-Bias) * 1.F
-.DE
-It is declared as follows:
-.ie t .DS
-.el .DS L
-\fISingle-Precision Floating-Point\fP
-
-\f(CW+-------+-------+-------+-------+
-|byte 0 |byte 1 |byte 2 |byte 3 |
-S| E | F |
-+-------+-------+-------+-------+
-1|<- 8 ->|<-------23 bits------>|
-<------------32 bits------------>\fP
-.DE
-Just as the most and least significant bytes of a number are 0 and 3,
-the most and least significant bits of a single-precision floating-
-point number are 0 and 31. The beginning bit (and most significant
-bit) offsets of S, E, and F are 0, 1, and 9, respectively. Note that
-these numbers refer to the mathematical positions of the bits, and
-NOT to their actual physical locations (which vary from medium to
-medium).
-.LP
-The IEEE specifications should be consulted concerning the encoding
-for signed zero, signed infinity (overflow), and denormalized numbers
-(underflow) [3]. According to IEEE specifications, the "NaN" (not a
-number) is system dependent and should not be used externally.
-.NH 2
-\&Double-precision Floating-point
-.IX XDR "integer, double-precision floating point"
-.IX XDR "double-precision floating-point integer"
-.LP
-The standard defines the encoding for the double-precision floating-
-point data type "double" (64 bits or 8 bytes). The encoding used is
-the IEEE standard for normalized double-precision floating-point
-numbers [3]. The standard encodes the following three fields, which
-describe the double-precision floating-point number:
-.RS
-.IP \fBS\fP:
-The sign of the number. Values 0 and 1 represent positive and
-negative, respectively. One bit.
-.IP \fBE\fP:
-The exponent of the number, base 2. 11 bits are devoted to this
-field. The exponent is biased by 1023.
-.IP \fBF\fP:
-The fractional part of the number's mantissa, base 2. 52 bits
-are devoted to this field.
-.RE
-.LP
-Therefore, the floating-point number is described by:
-.DS
-(-1)**S * 2**(E-Bias) * 1.F
-.DE
-It is declared as follows:
-.ie t .DS
-.el .DS L
-\fIDouble-Precision Floating-Point\fP
-
-\f(CW+------+------+------+------+------+------+------+------+
-|byte 0|byte 1|byte 2|byte 3|byte 4|byte 5|byte 6|byte 7|
-S| E | F |
-+------+------+------+------+------+------+------+------+
-1|<--11-->|<-----------------52 bits------------------->|
-<-----------------------64 bits------------------------->\fP
-.DE
-Just as the most and least significant bytes of a number are 0 and 3,
-the most and least significant bits of a double-precision floating-
-point number are 0 and 63. The beginning bit (and most significant
-bit) offsets of S, E , and F are 0, 1, and 12, respectively. Note
-that these numbers refer to the mathematical positions of the bits,
-and NOT to their actual physical locations (which vary from medium to
-medium).
-.LP
-The IEEE specifications should be consulted concerning the encoding
-for signed zero, signed infinity (overflow), and denormalized numbers
-(underflow) [3]. According to IEEE specifications, the "NaN" (not a
-number) is system dependent and should not be used externally.
-.NH 2
-\&Fixed-length Opaque Data
-.IX XDR "fixed-length opaque data"
-.IX XDR "opaque data, fixed length"
-.LP
-At times, fixed-length uninterpreted data needs to be passed among
-machines. This data is called "opaque" and is declared as follows:
-.DS
-.ft CW
-opaque identifier[n];
-.DE
-where the constant n is the (static) number of bytes necessary to
-contain the opaque data. If n is not a multiple of four, then the n
-bytes are followed by enough (0 to 3) residual zero bytes, r, to make
-the total byte count of the opaque object a multiple of four.
-.ie t .DS
-.el .DS L
-\fIFixed-Length Opaque\fP
-
-\f(CW0 1 ...
-+--------+--------+...+--------+--------+...+--------+
-| byte 0 | byte 1 |...|byte n-1| 0 |...| 0 |
-+--------+--------+...+--------+--------+...+--------+
-|<-----------n bytes---------->|<------r bytes------>|
-|<-----------n+r (where (n+r) mod 4 = 0)------------>|\fP
-.DE
-.NH 2
-\&Variable-length Opaque Data
-.IX XDR "variable-length opaque data"
-.IX XDR "opaque data, variable length"
-.LP
-The standard also provides for variable-length (counted) opaque data,
-defined as a sequence of n (numbered 0 through n-1) arbitrary bytes
-to be the number n encoded as an unsigned integer (as described
-below), and followed by the n bytes of the sequence.
-.LP
-Byte m of the sequence always precedes byte m+1 of the sequence, and
-byte 0 of the sequence always follows the sequence's length (count).
-enough (0 to 3) residual zero bytes, r, to make the total byte count
-a multiple of four. Variable-length opaque data is declared in the
-following way:
-.DS
-.ft CW
-opaque identifier<m>;
-.DE
-or
-.DS
-.ft CW
-opaque identifier<>;
-.DE
-The constant m denotes an upper bound of the number of bytes that the
-sequence may contain. If m is not specified, as in the second
-declaration, it is assumed to be (2**32) - 1, the maximum length.
-The constant m would normally be found in a protocol specification.
-For example, a filing protocol may state that the maximum data
-transfer size is 8192 bytes, as follows:
-.DS
-.ft CW
-opaque filedata<8192>;
-.DE
-This can be illustrated as follows:
-.ie t .DS
-.el .DS L
-\fIVariable-Length Opaque\fP
-
-\f(CW0 1 2 3 4 5 ...
-+-----+-----+-----+-----+-----+-----+...+-----+-----+...+-----+
-| length n |byte0|byte1|...| n-1 | 0 |...| 0 |
-+-----+-----+-----+-----+-----+-----+...+-----+-----+...+-----+
-|<-------4 bytes------->|<------n bytes------>|<---r bytes--->|
-|<----n+r (where (n+r) mod 4 = 0)---->|\fP
-.DE
-.LP
-It is an error to encode a length greater than the maximum
-described in the specification.
-.NH 2
-\&String
-.IX XDR string
-.LP
-The standard defines a string of n (numbered 0 through n-1) ASCII
-bytes to be the number n encoded as an unsigned integer (as described
-above), and followed by the n bytes of the string. Byte m of the
-string always precedes byte m+1 of the string, and byte 0 of the
-string always follows the string's length. If n is not a multiple of
-four, then the n bytes are followed by enough (0 to 3) residual zero
-bytes, r, to make the total byte count a multiple of four. Counted
-byte strings are declared as follows:
-.DS
-.ft CW
-string object<m>;
-.DE
-or
-.DS
-.ft CW
-string object<>;
-.DE
-The constant m denotes an upper bound of the number of bytes that a
-string may contain. If m is not specified, as in the second
-declaration, it is assumed to be (2**32) - 1, the maximum length.
-The constant m would normally be found in a protocol specification.
-For example, a filing protocol may state that a file name can be no
-longer than 255 bytes, as follows:
-.DS
-.ft CW
-string filename<255>;
-.DE
-Which can be illustrated as:
-.ie t .DS
-.el .DS L
-\fIA String\fP
-
-\f(CW0 1 2 3 4 5 ...
-+-----+-----+-----+-----+-----+-----+...+-----+-----+...+-----+
-| length n |byte0|byte1|...| n-1 | 0 |...| 0 |
-+-----+-----+-----+-----+-----+-----+...+-----+-----+...+-----+
-|<-------4 bytes------->|<------n bytes------>|<---r bytes--->|
-|<----n+r (where (n+r) mod 4 = 0)---->|\fP
-.DE
-.LP
-It is an error to encode a length greater than the maximum
-described in the specification.
-.NH 2
-\&Fixed-length Array
-.IX XDR "fixed-length array"
-.IX XDR "array, fixed length"
-.LP
-Declarations for fixed-length arrays of homogeneous elements are in
-the following form:
-.DS
-.ft CW
-type-name identifier[n];
-.DE
-Fixed-length arrays of elements numbered 0 through n-1 are encoded by
-individually encoding the elements of the array in their natural
-order, 0 through n-1. Each element's size is a multiple of four
-bytes. Though all elements are of the same type, the elements may
-have different sizes. For example, in a fixed-length array of
-strings, all elements are of type "string", yet each element will
-vary in its length.
-.ie t .DS
-.el .DS L
-\fIFixed-Length Array\fP
-
-\f(CW+---+---+---+---+---+---+---+---+...+---+---+---+---+
-| element 0 | element 1 |...| element n-1 |
-+---+---+---+---+---+---+---+---+...+---+---+---+---+
-|<--------------------n elements------------------->|\fP
-.DE
-.NH 2
-\&Variable-length Array
-.IX XDR "variable-length array"
-.IX XDR "array, variable length"
-.LP
-Counted arrays provide the ability to encode variable-length arrays
-of homogeneous elements. The array is encoded as the element count n
-(an unsigned integer) followed by the encoding of each of the array's
-elements, starting with element 0 and progressing through element n-
-1. The declaration for variable-length arrays follows this form:
-.DS
-.ft CW
-type-name identifier<m>;
-.DE
-or
-.DS
-.ft CW
-type-name identifier<>;
-.DE
-The constant m specifies the maximum acceptable element count of an
-array; if m is not specified, as in the second declaration, it is
-assumed to be (2**32) - 1.
-.ie t .DS
-.el .DS L
-\fICounted Array\fP
-
-\f(CW0 1 2 3
-+--+--+--+--+--+--+--+--+--+--+--+--+...+--+--+--+--+
-| n | element 0 | element 1 |...|element n-1|
-+--+--+--+--+--+--+--+--+--+--+--+--+...+--+--+--+--+
-|<-4 bytes->|<--------------n elements------------->|\fP
-.DE
-It is an error to encode a value of n that is greater than the
-maximum described in the specification.
-.NH 2
-\&Structure
-.IX XDR structure
-.LP
-Structures are declared as follows:
-.DS
-.ft CW
-struct {
- component-declaration-A;
- component-declaration-B;
- \&...
-} identifier;
-.DE
-The components of the structure are encoded in the order of their
-declaration in the structure. Each component's size is a multiple of
-four bytes, though the components may be different sizes.
-.ie t .DS
-.el .DS L
-\fIStructure\fP
-
-\f(CW+-------------+-------------+...
-| component A | component B |...
-+-------------+-------------+...\fP
-.DE
-.NH 2
-\&Discriminated Union
-.IX XDR "discriminated union"
-.IX XDR union discriminated
-.LP
-A discriminated union is a type composed of a discriminant followed
-by a type selected from a set of prearranged types according to the
-value of the discriminant. The type of discriminant is either "int",
-"unsigned int", or an enumerated type, such as "bool". The component
-types are called "arms" of the union, and are preceded by the value
-of the discriminant which implies their encoding. Discriminated
-unions are declared as follows:
-.DS
-.ft CW
-union switch (discriminant-declaration) {
- case discriminant-value-A:
- arm-declaration-A;
- case discriminant-value-B:
- arm-declaration-B;
- \&...
- default: default-declaration;
-} identifier;
-.DE
-Each "case" keyword is followed by a legal value of the discriminant.
-The default arm is optional. If it is not specified, then a valid
-encoding of the union cannot take on unspecified discriminant values.
-The size of the implied arm is always a multiple of four bytes.
-.LP
-The discriminated union is encoded as its discriminant followed by
-the encoding of the implied arm.
-.ie t .DS
-.el .DS L
-\fIDiscriminated Union\fP
-
-\f(CW0 1 2 3
-+---+---+---+---+---+---+---+---+
-| discriminant | implied arm |
-+---+---+---+---+---+---+---+---+
-|<---4 bytes--->|\fP
-.DE
-.NH 2
-\&Void
-.IX XDR void
-.LP
-An XDR void is a 0-byte quantity. Voids are useful for describing
-operations that take no data as input or no data as output. They are
-also useful in unions, where some arms may contain data and others do
-not. The declaration is simply as follows:
-.DS
-.ft CW
-void;
-.DE
-Voids are illustrated as follows:
-.ie t .DS
-.el .DS L
-\fIVoid\fP
-
-\f(CW ++
- ||
- ++
---><-- 0 bytes\fP
-.DE
-.NH 2
-\&Constant
-.IX XDR constant
-.LP
-The data declaration for a constant follows this form:
-.DS
-.ft CW
-const name-identifier = n;
-.DE
-"const" is used to define a symbolic name for a constant; it does not
-declare any data. The symbolic constant may be used anywhere a
-regular constant may be used. For example, the following defines a
-symbolic constant DOZEN, equal to 12.
-.DS
-.ft CW
-const DOZEN = 12;
-.DE
-.NH 2
-\&Typedef
-.IX XDR typedef
-.LP
-"typedef" does not declare any data either, but serves to define new
-identifiers for declaring data. The syntax is:
-.DS
-.ft CW
-typedef declaration;
-.DE
-The new type name is actually the variable name in the declaration
-part of the typedef. For example, the following defines a new type
-called "eggbox" using an existing type called "egg":
-.DS
-.ft CW
-typedef egg eggbox[DOZEN];
-.DE
-Variables declared using the new type name have the same type as the
-new type name would have in the typedef, if it was considered a
-variable. For example, the following two declarations are equivalent
-in declaring the variable "fresheggs":
-.DS
-.ft CW
-eggbox fresheggs;
-egg fresheggs[DOZEN];
-.DE
-When a typedef involves a struct, enum, or union definition, there is
-another (preferred) syntax that may be used to define the same type.
-In general, a typedef of the following form:
-.DS
-.ft CW
-typedef <<struct, union, or enum definition>> identifier;
-.DE
-may be converted to the alternative form by removing the "typedef"
-part and placing the identifier after the "struct", "union", or
-"enum" keyword, instead of at the end. For example, here are the two
-ways to define the type "bool":
-.DS
-.ft CW
-typedef enum { /* \fIusing typedef\fP */
- FALSE = 0,
- TRUE = 1
- } bool;
-
-enum bool { /* \fIpreferred alternative\fP */
- FALSE = 0,
- TRUE = 1
- };
-.DE
-The reason this syntax is preferred is one does not have to wait
-until the end of a declaration to figure out the name of the new
-type.
-.NH 2
-\&Optional-data
-.IX XDR "optional data"
-.IX XDR "data, optional"
-.LP
-Optional-data is one kind of union that occurs so frequently that we
-give it a special syntax of its own for declaring it. It is declared
-as follows:
-.DS
-.ft CW
-type-name *identifier;
-.DE
-This is equivalent to the following union:
-.DS
-.ft CW
-union switch (bool opted) {
- case TRUE:
- type-name element;
- case FALSE:
- void;
-} identifier;
-.DE
-It is also equivalent to the following variable-length array
-declaration, since the boolean "opted" can be interpreted as the
-length of the array:
-.DS
-.ft CW
-type-name identifier<1>;
-.DE
-Optional-data is not so interesting in itself, but it is very useful
-for describing recursive data-structures such as linked-lists and
-trees. For example, the following defines a type "stringlist" that
-encodes lists of arbitrary length strings:
-.DS
-.ft CW
-struct *stringlist {
- string item<>;
- stringlist next;
-};
-.DE
-It could have been equivalently declared as the following union:
-.DS
-.ft CW
-union stringlist switch (bool opted) {
- case TRUE:
- struct {
- string item<>;
- stringlist next;
- } element;
- case FALSE:
- void;
-};
-.DE
-or as a variable-length array:
-.DS
-.ft CW
-struct stringlist<1> {
- string item<>;
- stringlist next;
-};
-.DE
-Both of these declarations obscure the intention of the stringlist
-type, so the optional-data declaration is preferred over both of
-them. The optional-data type also has a close correlation to how
-recursive data structures are represented in high-level languages
-such as Pascal or C by use of pointers. In fact, the syntax is the
-same as that of the C language for pointers.
-.NH 2
-\&Areas for Future Enhancement
-.IX XDR futures
-.LP
-The XDR standard lacks representations for bit fields and bitmaps,
-since the standard is based on bytes. Also missing are packed (or
-binary-coded) decimals.
-.LP
-The intent of the XDR standard was not to describe every kind of data
-that people have ever sent or will ever want to send from machine to
-machine. Rather, it only describes the most commonly used data-types
-of high-level languages such as Pascal or C so that applications
-written in these languages will be able to communicate easily over
-some medium.
-.LP
-One could imagine extensions to XDR that would let it describe almost
-any existing protocol, such as TCP. The minimum necessary for this
-are support for different block sizes and byte-orders. The XDR
-discussed here could then be considered the 4-byte big-endian member
-of a larger XDR family.
-.NH 1
-\&Discussion
-.sp 2
-.NH 2
-\&Why a Language for Describing Data?
-.IX XDR language
-.LP
-There are many advantages in using a data-description language such
-as XDR versus using diagrams. Languages are more formal than
-diagrams and lead to less ambiguous descriptions of data.
-Languages are also easier to understand and allow one to think of
-other issues instead of the low-level details of bit-encoding.
-Also, there is a close analogy between the types of XDR and a
-high-level language such as C or Pascal. This makes the
-implementation of XDR encoding and decoding modules an easier task.
-Finally, the language specification itself is an ASCII string that
-can be passed from machine to machine to perform on-the-fly data
-interpretation.
-.NH 2
-\&Why Only one Byte-Order for an XDR Unit?
-.IX XDR "byte order"
-.LP
-Supporting two byte-orderings requires a higher level protocol for
-determining in which byte-order the data is encoded. Since XDR is
-not a protocol, this can't be done. The advantage of this, though,
-is that data in XDR format can be written to a magnetic tape, for
-example, and any machine will be able to interpret it, since no
-higher level protocol is necessary for determining the byte-order.
-.NH 2
-\&Why does XDR use Big-Endian Byte-Order?
-.LP
-Yes, it is unfair, but having only one byte-order means you have to
-be unfair to somebody. Many architectures, such as the Motorola
-68000 and IBM 370, support the big-endian byte-order.
-.NH 2
-\&Why is the XDR Unit Four Bytes Wide?
-.LP
-There is a tradeoff in choosing the XDR unit size. Choosing a small
-size such as two makes the encoded data small, but causes alignment
-problems for machines that aren't aligned on these boundaries. A
-large size such as eight means the data will be aligned on virtually
-every machine, but causes the encoded data to grow too big. We chose
-four as a compromise. Four is big enough to support most
-architectures efficiently, except for rare machines such as the
-eight-byte aligned Cray. Four is also small enough to keep the
-encoded data restricted to a reasonable size.
-.NH 2
-\&Why must Variable-Length Data be Padded with Zeros?
-.IX XDR "variable-length data"
-.LP
-It is desirable that the same data encode into the same thing on all
-machines, so that encoded data can be meaningfully compared or
-checksummed. Forcing the padded bytes to be zero ensures this.
-.NH 2
-\&Why is there No Explicit Data-Typing?
-.LP
-Data-typing has a relatively high cost for what small advantages it
-may have. One cost is the expansion of data due to the inserted type
-fields. Another is the added cost of interpreting these type fields
-and acting accordingly. And most protocols already know what type
-they expect, so data-typing supplies only redundant information.
-However, one can still get the benefits of data-typing using XDR. One
-way is to encode two things: first a string which is the XDR data
-description of the encoded data, and then the encoded data itself.
-Another way is to assign a value to all the types in XDR, and then
-define a universal type which takes this value as its discriminant
-and for each value, describes the corresponding data type.
-.NH 1
-\&The XDR Language Specification
-.IX XDR language
-.sp 1
-.NH 2
-\&Notational Conventions
-.IX "XDR language" notation
-.LP
-This specification uses an extended Backus-Naur Form notation for
-describing the XDR language. Here is a brief description of the
-notation:
-.IP 1.
-The characters
-.I | ,
-.I ( ,
-.I ) ,
-.I [ ,
-.I ] ,
-.I " ,
-and
-.I *
-are special.
-.IP 2.
-Terminal symbols are strings of any characters surrounded by
-double quotes.
-.IP 3.
-Non-terminal symbols are strings of non-special characters.
-.IP 4.
-Alternative items are separated by a vertical bar ("\fI|\fP").
-.IP 5.
-Optional items are enclosed in brackets.
-.IP 6.
-Items are grouped together by enclosing them in parentheses.
-.IP 7.
-A
-.I *
-following an item means 0 or more occurrences of that item.
-.LP
-For example, consider the following pattern:
-.DS L
-"a " "very" (", " " very")* [" cold " "and"] " rainy " ("day" | "night")
-.DE
-.LP
-An infinite number of strings match this pattern. A few of them
-are:
-.DS
-"a very rainy day"
-"a very, very rainy day"
-"a very cold and rainy day"
-"a very, very, very cold and rainy night"
-.DE
-.NH 2
-\&Lexical Notes
-.IP 1.
-Comments begin with '/*' and terminate with '*/'.
-.IP 2.
-White space serves to separate items and is otherwise ignored.
-.IP 3.
-An identifier is a letter followed by an optional sequence of
-letters, digits or underbar ('_'). The case of identifiers is
-not ignored.
-.IP 4.
-A constant is a sequence of one or more decimal digits,
-optionally preceded by a minus-sign ('-').
-.NH 2
-\&Syntax Information
-.IX "XDR language" syntax
-.DS
-.ft CW
-declaration:
- type-specifier identifier
- | type-specifier identifier "[" value "]"
- | type-specifier identifier "<" [ value ] ">"
- | "opaque" identifier "[" value "]"
- | "opaque" identifier "<" [ value ] ">"
- | "string" identifier "<" [ value ] ">"
- | type-specifier "*" identifier
- | "void"
-.DE
-.DS
-.ft CW
-value:
- constant
- | identifier
-
-type-specifier:
- [ "unsigned" ] "int"
- | [ "unsigned" ] "hyper"
- | "float"
- | "double"
- | "bool"
- | enum-type-spec
- | struct-type-spec
- | union-type-spec
- | identifier
-.DE
-.DS
-.ft CW
-enum-type-spec:
- "enum" enum-body
-
-enum-body:
- "{"
- ( identifier "=" value )
- ( "," identifier "=" value )*
- "}"
-.DE
-.DS
-.ft CW
-struct-type-spec:
- "struct" struct-body
-
-struct-body:
- "{"
- ( declaration ";" )
- ( declaration ";" )*
- "}"
-.DE
-.DS
-.ft CW
-union-type-spec:
- "union" union-body
-
-union-body:
- "switch" "(" declaration ")" "{"
- ( "case" value ":" declaration ";" )
- ( "case" value ":" declaration ";" )*
- [ "default" ":" declaration ";" ]
- "}"
-
-constant-def:
- "const" identifier "=" constant ";"
-.DE
-.DS
-.ft CW
-type-def:
- "typedef" declaration ";"
- | "enum" identifier enum-body ";"
- | "struct" identifier struct-body ";"
- | "union" identifier union-body ";"
-
-definition:
- type-def
- | constant-def
-
-specification:
- definition *
-.DE
-.NH 3
-\&Syntax Notes
-.IX "XDR language" syntax
-.LP
-.IP 1.
-The following are keywords and cannot be used as identifiers:
-"bool", "case", "const", "default", "double", "enum", "float",
-"hyper", "opaque", "string", "struct", "switch", "typedef", "union",
-"unsigned" and "void".
-.IP 2.
-Only unsigned constants may be used as size specifications for
-arrays. If an identifier is used, it must have been declared
-previously as an unsigned constant in a "const" definition.
-.IP 3.
-Constant and type identifiers within the scope of a specification
-are in the same name space and must be declared uniquely within this
-scope.
-.IP 4.
-Similarly, variable names must be unique within the scope of
-struct and union declarations. Nested struct and union declarations
-create new scopes.
-.IP 5.
-The discriminant of a union must be of a type that evaluates to
-an integer. That is, "int", "unsigned int", "bool", an enumerated
-type or any typedefed type that evaluates to one of these is legal.
-Also, the case values must be one of the legal values of the
-discriminant. Finally, a case value may not be specified more than
-once within the scope of a union declaration.
-.NH 1
-\&An Example of an XDR Data Description
-.LP
-Here is a short XDR data description of a thing called a "file",
-which might be used to transfer files from one machine to another.
-.ie t .DS
-.el .DS L
-.ft CW
-
-const MAXUSERNAME = 32; /*\fI max length of a user name \fP*/
-const MAXFILELEN = 65535; /*\fI max length of a file \fP*/
-const MAXNAMELEN = 255; /*\fI max length of a file name \fP*/
-
-.ft I
-/*
- * Types of files:
- */
-.ft CW
-
-enum filekind {
- TEXT = 0, /*\fI ascii data \fP*/
- DATA = 1, /*\fI raw data \fP*/
- EXEC = 2 /*\fI executable \fP*/
-};
-
-.ft I
-/*
- * File information, per kind of file:
- */
-.ft CW
-
-union filetype switch (filekind kind) {
- case TEXT:
- void; /*\fI no extra information \fP*/
- case DATA:
- string creator<MAXNAMELEN>; /*\fI data creator \fP*/
- case EXEC:
- string interpretor<MAXNAMELEN>; /*\fI program interpretor \fP*/
-};
-
-.ft I
-/*
- * A complete file:
- */
-.ft CW
-
-struct file {
- string filename<MAXNAMELEN>; /*\fI name of file \fP*/
- filetype type; /*\fI info about file \fP*/
- string owner<MAXUSERNAME>; /*\fI owner of file \fP*/
- opaque data<MAXFILELEN>; /*\fI file data \fP*/
-};
-.DE
-.LP
-Suppose now that there is a user named "john" who wants to store
-his lisp program "sillyprog" that contains just the data "(quit)".
-His file would be encoded as follows:
-.TS
-box tab (&) ;
-lfI lfI lfI lfI
-rfL rfL rfL l .
-Offset&Hex Bytes&ASCII&Description
-_
-0&00 00 00 09&....&Length of filename = 9
-4&73 69 6c 6c&sill&Filename characters
-8&79 70 72 6f&ypro& ... and more characters ...
-12&67 00 00 00&g...& ... and 3 zero-bytes of fill
-16&00 00 00 02&....&Filekind is EXEC = 2
-20&00 00 00 04&....&Length of interpretor = 4
-24&6c 69 73 70&lisp&Interpretor characters
-28&00 00 00 04&....&Length of owner = 4
-32&6a 6f 68 6e&john&Owner characters
-36&00 00 00 06&....&Length of file data = 6
-40&28 71 75 69&(qui&File data bytes ...
-44&74 29 00 00&t)..& ... and 2 zero-bytes of fill
-.TE
-.NH 1
-\&References
-.LP
-[1] Brian W. Kernighan & Dennis M. Ritchie, "The C Programming
-Language", Bell Laboratories, Murray Hill, New Jersey, 1978.
-.LP
-[2] Danny Cohen, "On Holy Wars and a Plea for Peace", IEEE Computer,
-October 1981.
-.LP
-[3] "IEEE Standard for Binary Floating-Point Arithmetic", ANSI/IEEE
-Standard 754-1985, Institute of Electrical and Electronics
-Engineers, August 1985.
-.LP
-[4] "Courier: The Remote Procedure Call Protocol", XEROX
-Corporation, XSIS 038112, December 1981.
diff --git a/lib/libc/rpc/README b/lib/libc/rpc/README
deleted file mode 100644
index ad9d70f..0000000
--- a/lib/libc/rpc/README
+++ /dev/null
@@ -1,233 +0,0 @@
-RPCSRC 4.0 7/11/89
-
-This distribution contains Sun Microsystem's implementation of the
-RPC and XDR protocols and is compatible with 4.2BSD and 4.3BSD. Also
-included is complete documentation, utilities, RPC service
-specification files, and demonstration services in the format used by
-the RPC protocol compiler (rpcgen). See WHAT'S NEW below for
-details.
-
-NOTE ABOUT SECURE RPC:
-
-This release of RPCSRC contains most of the code needed to implement
-Secure RPC (see "DES Authentication" in the RPC Protocol Specification,
-doc/rpc.rfc.ms). Due to legal considerations, we are unable to
-distribute an implementation of DES, the Data Encryption Standard, which
-Secure RPC requires. For this reason, all of the files, documentation, and
-programs associated with Secure RPC have been placed into a separate
-directory, secure_rpc. The RPC library contained in the main body of this
-release *DOES NOT* support Secure RPC. See secure_rpc/README for more
-details. (A DES library was posted in Volume 18 of comp.sources.unix.)
-
-If you wish to report bugs found in this release, send mail to:
-
-Portable ONC/NFS
-Sun Microsystems, Inc
-MS 12-33
-2550 Garcia Avenue
-Mountain View, CA 94043
-
-or send Email to nfsnet@sun.com (the Internet) or sun!nfsnet (Usenet).
-
-ROADMAP
-
-The directory hierarchy is as follows:
-
- demo/ Various demonstration services
- demo/dir Remote directory lister
- demo/msg Remote console message delivery service
- demo/sort Remote sort service
-
- doc/ Documentation for RPC, XDR and NFS in "-ms" format.
-
- etc/ Utilities (rpcinfo and portmap). portmap must be
- started by root before any other RPC network services are
- used. SEE BELOW FOR BUGFIX TO 4.3BSD COMPILER.
-
- man/ Manual pages for RPC library, rpcgen, and utilities.
-
- rpc/ The RPC and XDR library. SEE BELOW
- FOR BUGFIX TO 4.2BSD COMPILER.
-
- rpcgen/ The RPC Language compiler (for .x files)
-
- rpcsvc/ Service definition files for various services and the
- server and client code for the Remote Status service.
-
- secure_rpc/ The files in this directory are used to build a version of
- the RPC library with DES Authentication. See the README
- file in that directory for more details.
-
-BUILD INSTRUCTIONS
-
-Makefiles can be found in all directories except for man. The
-Makefile in the top directory will cause these others to be invoked
-(except for in the doc, man and demo directories), in turn building the
-entire release.
-
-WARNING! THE DEFAULT INSTALLATION PROCEDURES WILL INSTALL FILES
-IN /usr/include, /usr/lib, /usr/bin and /etc.
-
-The master RPC include file, rpc/rpc.h, is used by all programs and
-routines that use RPC. It includes other RPC and system include files
-needed by the RPC system. PLEASE NOTE: If your system has NFS, it
-may have been based on Sun's NFS Source. The include files installed
-by this package may duplicate include files you will find on your NFS
-system. The RPCSRC 4.0 include files are upwardly compatible to all
-NFS Source include files as of the date of this distribution (not
-including any new definitions or declarations added by your system
-vendor). HOWEVER: Please read the comments towards the end of
-rpc/rpc.h regarding rpc/netdb.h. You may need to uncomment the
-inclusion of that file if the structures it defines are already
-defined by your system's include files.
-
-After making any compiler fixes that are needed (see below), at
-the top directory, type:
-
- make install
-
-For all installations, the Makefile macro DESTDIR is prepended to the
-installation path. It is defined to be null in the Makefiles, so
-installations are relative to root. (You will probably need root
-privileges for installing the files under the default path.) To
-install the files under some other tree (e.g., /usr/local), use the
-command:
-
- make install DESTDIR=/usr/local
-
-This will place the include files in /usr/local/usr/include, the RPC
-library in /usr/local/usr/lib, rpcgen in /usr/local/usr/bin, and the
-utilities in /usr/local/etc. You'll have to edit the Makefiles or
-install the files by hand if you want to do anything other than this
-kind of relocation of the installation tree.
-
-The RPC library will be built and installed first. By default it is
-installed in /usr/lib as "librpclib.a". The directory
-/usr/include/rpc will also be created, and several header files will
-be installed there. ALL RPC SERVICES INCLUDE THESE HEADER FILES.
-
-The programs in etc/ link in routines from librpclib.a. If you change
-where it is installed, be sure to edit etc/'s Makefile to reflect this.
-These programs are installed in /etc. PORTMAP MUST BE RUNNING ON
-YOUR SYSTEM BEFORE YOU START ANY OTHER RPC SERVICE.
-
-rpcgen is installed in /usr/bin. This program is required to build
-the demonstration services in demo and the rstat client and server in
-rpcsvc/.
-
-The rpcsvc/ directory will install its files in the directory
-/usr/include/rpcsvc. The Remote Status service (rstat_svc) will be
-compiled and installed in /etc. If you wish to make this service
-available, you should either start this service when needed or have
-it started at boot time by invoking it in your /etc/rc.local script.
-(Be sure that portmap is started first!) Sun has modified its
-version of inetd to automatically start RPC services. (Use "make
-LIB=" when building rstat on a Sun Workstation.) The Remote Status
-client (rstat) will be installed in /usr/bin. This program queries
-the rstat_svc on a remote host and prints a system status summary
-similar to the one printed by "uptime".
-
-The documentation is not built during the "make install" command.
-Typing "make" in the doc directory will cause all of the manuals to
-be formatted using nroff into a single file. We have had a report
-that certain "troff" equivalents have trouble processing the full
-manual. If you have trouble, try building the manuals individually
-(see the Makefile).
-
-The demonstration services in the demo directory are not built by the
-top-level "make install" command. To build these, cd to the demo
-directory and enter "make". The three services will be built.
-RPCGEN MUST BE INSTALLED in a path that make can find. To run the
-services, start the portmap program as root and invoke the service
-(you probably will want to put it in the background). rpcinfo can be
-used to check that the service succeeded in getting registered with
-portmap, and to ping the service (see rpcinfo's man page). You can
-then use the corresponding client program to exercise the service.
-To build these services on a Sun workstation, you must prevent the
-Makefile from trying to link the RPC library (as these routines are
-already a part of Sun's libc). Use: "make LIB=".
-
-BUGFIX FOR 4.3BSD COMPILER
-
-The use of a 'void *' declaration for one of the arguments in
-the reply_proc() procedure in etc/rpcinfo.c will trigger a bug
-in the 4.3BSD compiler. The bug is fixed by the following change to
-the compiler file mip/manifest.h:
-
-*** manifest.h.r1.1 Thu Apr 30 13:52:25 1987
---- manifest.h.r1.2 Mon Nov 23 18:58:17 1987
-***************
-*** 21,27 ****
- /*
- * Bogus type values
- */
-! #define TNULL PTR /* pointer to UNDEF */
- #define TVOID FTN /* function returning UNDEF (for void) */
-
- /*
---- 21,27 ----
- /*
- * Bogus type values
- */
-! #define TNULL INCREF(MOETY) /* pointer to MOETY -- impossible type */
- #define TVOID FTN /* function returning UNDEF (for void) */
-
- /*
-
-If you cannot fix your compiler, change the declaration in reply_proc()
-from 'void *' to 'char *'.
-
-BUGFIX FOR 4.2BSD COMPILER
-
-Unpatched 4.2BSD compilers complain about valid C. You can make old
-compilers happy by changing some voids to ints. However, the fix to
-the 4.2 VAX compiler is as follows (to mip/trees.c):
-
-*** trees.c.r1.1 Mon May 11 13:47:58 1987
---- trees.c.r1.2 Wed Jul 2 18:28:52 1986
-***************
-*** 1247,1253 ****
- if(o==CAST && mt1==0)return(TYPL+TYMATCH);
- if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH );
- else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN );
-! else if( mt12 == 0 ) break;
- else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN );
- else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN );
- break;
---- 1261,1269 ----
- if(o==CAST && mt1==0)return(TYPL+TYMATCH);
- if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH );
- else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN );
-! /* if right is TVOID and looks like a CALL, is not ok */
-! else if (mt2 == 0 && (p->in.right->in.op == CALL || p->in.right->in.op == UNARY CALL))
-! break;
- else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN );
- else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN );
- break;
-
-WHAT'S NEW IN THIS RELEASE: RPCSRC 4.0
-
-The previous release was RPCSRC 3.9. As with all previous releases,
-this release is based directly on files from Sun Microsystem's
-implementation.
-
-Upgrade from RPCSRC 3.9
-
-1) RPCSRC 4.0 upgrades RPCSRC 3.9. Improvements from SunOS 4.0 have
- been integrated into this release.
-
-Secure RPC (in the secure_rpc/ directory)
-
-2) DES Authentication routines and programs are provided.
-3) A new manual, "Secure NFS" is provided, which describes Secure RPC
- and Secure NFS.
-4) Skeleton routines and manual pages are provided which describe the
- DES encryption procedures required by Secure RPC. HOWEVER, NO DES
- ROUTINE IS PROVIDED.
-
-New Functionality
-
-5) rpcinfo can now be used to de-register services from the portmapper
- which may have terminated abnormally.
-6) A new client, rstat, is provided which queries the rstat_svc and
- prints a status line similar to the one displayed by "uptime".
diff --git a/lib/libc/rpc/auth_des.c b/lib/libc/rpc/auth_des.c
deleted file mode 100644
index 3fd2bfe..0000000
--- a/lib/libc/rpc/auth_des.c
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1988 by Sun Microsystems, Inc.
- */
-/*
- * auth_des.c, client-side implementation of DES authentication
- */
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/cdefs.h>
-#include <rpc/des_crypt.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-#include <rpc/auth_des.h>
-#include <netinet/in.h> /* XXX: just to get htonl() and ntohl() */
-#include <sys/socket.h>
-#undef NIS
-#include <rpcsvc/nis.h>
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/* from: static char sccsid[] = "@(#)auth_des.c 2.2 88/07/29 4.0 RPCSRC; from 1.9 88/02/08 SMI"; */
-static const char rcsid[] = "$Id$";
-#endif
-
-extern bool_t __rpc_get_time_offset __P(( struct timeval *, nis_server *,
- char *, char **, struct sockaddr_in * ));
-extern int rtime __P(( struct sockaddr_in *, struct timeval *, struct timeval *));
-extern bool_t xdr_authdes_cred __P(( XDR *, struct authdes_cred * ));
-extern bool_t xdr_authdes_verf __P(( XDR *, struct authdes_verf * ));
-
-#define MILLION 1000000L
-#define RTIME_TIMEOUT 5 /* seconds to wait for sync */
-
-#define AUTH_PRIVATE(auth) (struct ad_private *) auth->ah_private
-#define ALLOC(object_type) (object_type *) mem_alloc(sizeof(object_type))
-#define FREE(ptr, size) mem_free((char *)(ptr), (int) size)
-#define ATTEMPT(xdr_op) if (!(xdr_op)) return (FALSE)
-
-#define debug(msg) /*printf("%s\n", msg) */
-
-/*
- * DES authenticator operations vector
- */
-static void authdes_nextverf();
-static bool_t authdes_marshal();
-static bool_t authdes_validate();
-static bool_t authdes_refresh();
-static void authdes_destroy();
-static struct auth_ops authdes_ops = {
- authdes_nextverf,
- authdes_marshal,
- authdes_validate,
- authdes_refresh,
- authdes_destroy
-};
-#ifdef foo
-static bool_t synchronize __P(( struct sockaddr *, struct timeval *));
-#endif
-/*
- * This struct is pointed to by the ah_private field of an "AUTH *"
- */
-struct ad_private {
- char *ad_fullname; /* client's full name */
- u_int ad_fullnamelen; /* length of name, rounded up */
- char *ad_servername; /* server's full name */
- u_int ad_servernamelen; /* length of name, rounded up */
- u_int ad_window; /* client specified window */
- bool_t ad_dosync; /* synchronize? */
- struct sockaddr ad_syncaddr; /* remote host to synch with */
- char *ad_timehost; /* remote host to synch with */
- struct timeval ad_timediff; /* server's time - client's time */
- u_long ad_nickname; /* server's nickname for client */
- struct authdes_cred ad_cred; /* storage for credential */
- struct authdes_verf ad_verf; /* storage for verifier */
- struct timeval ad_timestamp; /* timestamp sent */
- des_block ad_xkey; /* encrypted conversation key */
- u_char ad_pkey[1024]; /* Server's actual public key */
- char *ad_netid; /* Timehost netid */
- char *ad_uaddr; /* Timehost uaddr */
- nis_server *ad_nis_srvr; /* NIS+ server struct */
-};
-
-
-/*
- * Create the client des authentication object
- */
-AUTH *
-authdes_create(servername, window, syncaddr, ckey)
- char *servername; /* network name of server */
- u_int window; /* time to live */
- struct sockaddr *syncaddr; /* optional addr of host to sync with */
- des_block *ckey; /* optional conversation key to use*/
-{
-
- AUTH *auth;
- struct ad_private *ad;
- char namebuf[MAXNETNAMELEN+1];
- u_char pkey_data[1024];
-
- if (!getpublickey(servername, pkey_data))
- return(NULL);
-
- /*
- * Allocate everything now
- */
- auth = ALLOC(AUTH);
- ad = ALLOC(struct ad_private);
- (void) getnetname(namebuf);
-
- ad->ad_fullnamelen = RNDUP(strlen(namebuf));
- ad->ad_fullname = (char *)mem_alloc(ad->ad_fullnamelen + 1);
-
- ad->ad_servernamelen = strlen(servername);
- ad->ad_servername = (char *)mem_alloc(ad->ad_servernamelen + 1);
-
- if (auth == NULL || ad == NULL || ad->ad_fullname == NULL ||
- ad->ad_servername == NULL) {
- debug("authdes_create: out of memory");
- goto failed;
- }
-
- /*
- * Set up private data
- */
- bcopy(namebuf, ad->ad_fullname, ad->ad_fullnamelen + 1);
- bcopy(servername, ad->ad_servername, ad->ad_servernamelen + 1);
- bcopy(pkey_data, ad->ad_pkey, strlen(pkey_data) + 1);
- if (syncaddr != NULL) {
- ad->ad_syncaddr = *syncaddr;
- ad->ad_dosync = TRUE;
- } else {
- ad->ad_dosync = FALSE;
- }
- ad->ad_window = window;
- if (ckey == NULL) {
- if (key_gendes(&auth->ah_key) < 0) {
- debug("authdes_create: unable to gen conversation key");
- return (NULL);
- }
- } else {
- auth->ah_key = *ckey;
- }
-
- /*
- * Set up auth handle
- */
- auth->ah_cred.oa_flavor = AUTH_DES;
- auth->ah_verf.oa_flavor = AUTH_DES;
- auth->ah_ops = &authdes_ops;
- auth->ah_private = (caddr_t)ad;
-
- if (!authdes_refresh(auth)) {
- goto failed;
- }
- return (auth);
-
-failed:
- if (auth != NULL)
- FREE(auth, sizeof(AUTH));
- if (ad != NULL)
- FREE(ad, sizeof(struct ad_private));
- if (ad->ad_fullname != NULL)
- FREE(ad->ad_fullname, ad->ad_fullnamelen + 1);
- if (ad->ad_servername != NULL)
- FREE(ad->ad_servername, ad->ad_servernamelen + 1);
- return (NULL);
-}
-
-/*
- * Slightly modified version of authdes_create which takes the public key
- * of the server principal as an argument. This spares us a call to
- * getpublickey() which in the nameserver context can cause a deadlock.
- */
-AUTH *
-authdes_pk_create(servername, pkey, window, timehost, ckey, srvr)
- char *servername; /* network name of server */
- netobj *pkey; /* public key of server */
- u_int window; /* time to live */
- char *timehost; /* optional hostname to sync with */
- des_block *ckey; /* optional conversation key to use */
- nis_server *srvr; /* optional NIS+ server struct */
-{
- AUTH *auth;
- struct ad_private *ad;
- char namebuf[MAXNETNAMELEN+1];
-
- /*
- * Allocate everything now
- */
- auth = ALLOC(AUTH);
- if (auth == NULL) {
- debug("authdes_pk_create: out of memory");
- return (NULL);
- }
- ad = ALLOC(struct ad_private);
- if (ad == NULL) {
- debug("authdes_pk_create: out of memory");
- goto failed;
- }
- ad->ad_fullname = ad->ad_servername = NULL; /* Sanity reasons */
- ad->ad_timehost = NULL;
- ad->ad_netid = NULL;
- ad->ad_uaddr = NULL;
- ad->ad_nis_srvr = NULL;
- ad->ad_timediff.tv_sec = 0;
- ad->ad_timediff.tv_usec = 0;
- memcpy(ad->ad_pkey, pkey->n_bytes, pkey->n_len);
- if (!getnetname(namebuf))
- goto failed;
- ad->ad_fullnamelen = RNDUP((u_int) strlen(namebuf));
- ad->ad_fullname = (char *)mem_alloc(ad->ad_fullnamelen + 1);
- ad->ad_servernamelen = strlen(servername);
- ad->ad_servername = (char *)mem_alloc(ad->ad_servernamelen + 1);
-
- if (ad->ad_fullname == NULL || ad->ad_servername == NULL) {
- debug("authdes_pk_create: out of memory");
- goto failed;
- }
- if (timehost != NULL) {
- ad->ad_timehost = (char *)mem_alloc(strlen(timehost) + 1);
- if (ad->ad_timehost == NULL) {
- debug("authdes_pk_create: out of memory");
- goto failed;
- }
- memcpy(ad->ad_timehost, timehost, strlen(timehost) + 1);
- ad->ad_dosync = TRUE;
- } else if (srvr != NULL) {
- ad->ad_nis_srvr = srvr; /* transient */
- ad->ad_dosync = TRUE;
- } else {
- ad->ad_dosync = FALSE;
- }
- memcpy(ad->ad_fullname, namebuf, ad->ad_fullnamelen + 1);
- memcpy(ad->ad_servername, servername, ad->ad_servernamelen + 1);
- ad->ad_window = window;
- if (ckey == NULL) {
- if (key_gendes(&auth->ah_key) < 0) {
- debug("authdes_pk_create: unable to gen conversation key");
- goto failed;
- }
- } else {
- auth->ah_key = *ckey;
- }
-
- /*
- * Set up auth handle
- */
- auth->ah_cred.oa_flavor = AUTH_DES;
- auth->ah_verf.oa_flavor = AUTH_DES;
- auth->ah_ops = &authdes_ops;
- auth->ah_private = (caddr_t)ad;
-
- if (!authdes_refresh(auth)) {
- goto failed;
- }
- ad->ad_nis_srvr = NULL; /* not needed any longer */
- return (auth);
-
-failed:
- if (auth)
- FREE(auth, sizeof (AUTH));
- if (ad) {
- if (ad->ad_fullname)
- FREE(ad->ad_fullname, ad->ad_fullnamelen + 1);
- if (ad->ad_servername)
- FREE(ad->ad_servername, ad->ad_servernamelen + 1);
- if (ad->ad_timehost)
- FREE(ad->ad_timehost, strlen(ad->ad_timehost) + 1);
- if (ad->ad_netid)
- free(ad->ad_netid);
- if (ad->ad_uaddr)
- free(ad->ad_uaddr);
- FREE(ad, sizeof (struct ad_private));
- }
- return (NULL);
-}
-/*
- * Implement the five authentication operations
- */
-
-
-/*
- * 1. Next Verifier
- */
-/*ARGSUSED*/
-static void
-authdes_nextverf(auth)
- AUTH *auth;
-{
- /* what the heck am I supposed to do??? */
-}
-
-
-
-/*
- * 2. Marshal
- */
-static bool_t
-authdes_marshal(auth, xdrs)
- AUTH *auth;
- XDR *xdrs;
-{
- struct ad_private *ad = AUTH_PRIVATE(auth);
- struct authdes_cred *cred = &ad->ad_cred;
- struct authdes_verf *verf = &ad->ad_verf;
- des_block cryptbuf[2];
- des_block ivec;
- int status;
- long len;
- int32_t *ixdr;
-
- /*
- * Figure out the "time", accounting for any time difference
- * with the server if necessary.
- */
- (void) gettimeofday(&ad->ad_timestamp, (struct timezone *)NULL);
- ad->ad_timestamp.tv_sec += ad->ad_timediff.tv_sec;
- ad->ad_timestamp.tv_usec += ad->ad_timediff.tv_usec;
- if (ad->ad_timestamp.tv_usec >= MILLION) {
- ad->ad_timestamp.tv_usec -= MILLION;
- ad->ad_timestamp.tv_sec += 1;
- }
-
- /*
- * XDR the timestamp and possibly some other things, then
- * encrypt them.
- */
- ixdr = (int32_t *)cryptbuf;
- IXDR_PUT_LONG(ixdr, ad->ad_timestamp.tv_sec);
- IXDR_PUT_LONG(ixdr, ad->ad_timestamp.tv_usec);
- if (ad->ad_cred.adc_namekind == ADN_FULLNAME) {
- IXDR_PUT_U_LONG(ixdr, ad->ad_window);
- IXDR_PUT_U_LONG(ixdr, ad->ad_window - 1);
- ivec.key.high = ivec.key.low = 0;
- status = cbc_crypt((char *)&auth->ah_key, (char *)cryptbuf,
- 2*sizeof(des_block), DES_ENCRYPT | DES_HW, (char *)&ivec);
- } else {
- status = ecb_crypt((char *)&auth->ah_key, (char *)cryptbuf,
- sizeof(des_block), DES_ENCRYPT | DES_HW);
- }
- if (DES_FAILED(status)) {
- debug("authdes_marshal: DES encryption failure");
- return (FALSE);
- }
- ad->ad_verf.adv_xtimestamp = cryptbuf[0];
- if (ad->ad_cred.adc_namekind == ADN_FULLNAME) {
- ad->ad_cred.adc_fullname.window = cryptbuf[1].key.high;
- ad->ad_verf.adv_winverf = cryptbuf[1].key.low;
- } else {
- ad->ad_cred.adc_nickname = ad->ad_nickname;
- ad->ad_verf.adv_winverf = 0;
- }
-
- /*
- * Serialize the credential and verifier into opaque
- * authentication data.
- */
- if (ad->ad_cred.adc_namekind == ADN_FULLNAME) {
- len = ((1 + 1 + 2 + 1)*BYTES_PER_XDR_UNIT + ad->ad_fullnamelen);
- } else {
- len = (1 + 1)*BYTES_PER_XDR_UNIT;
- }
-
- if ((ixdr = xdr_inline(xdrs, 2*BYTES_PER_XDR_UNIT))) {
- IXDR_PUT_LONG(ixdr, AUTH_DES);
- IXDR_PUT_LONG(ixdr, len);
- } else {
- ATTEMPT(xdr_putlong(xdrs, (long *)&auth->ah_cred.oa_flavor));
- ATTEMPT(xdr_putlong(xdrs, &len));
- }
- ATTEMPT(xdr_authdes_cred(xdrs, cred));
-
- len = (2 + 1)*BYTES_PER_XDR_UNIT;
- if ((ixdr = xdr_inline(xdrs, 2*BYTES_PER_XDR_UNIT))) {
- IXDR_PUT_LONG(ixdr, AUTH_DES);
- IXDR_PUT_LONG(ixdr, len);
- } else {
- ATTEMPT(xdr_putlong(xdrs, (long *)&auth->ah_verf.oa_flavor));
- ATTEMPT(xdr_putlong(xdrs, &len));
- }
- ATTEMPT(xdr_authdes_verf(xdrs, verf));
- return (TRUE);
-}
-
-
-/*
- * 3. Validate
- */
-static bool_t
-authdes_validate(auth, rverf)
- AUTH *auth;
- struct opaque_auth *rverf;
-{
- struct ad_private *ad = AUTH_PRIVATE(auth);
- struct authdes_verf verf;
- int status;
- register u_long *ixdr;
-
- if (rverf->oa_length != (2 + 1) * BYTES_PER_XDR_UNIT) {
- return (FALSE);
- }
- ixdr = (u_long *)rverf->oa_base;
- verf.adv_xtimestamp.key.high = (u_long)*ixdr++;
- verf.adv_xtimestamp.key.low = (u_long)*ixdr++;
- verf.adv_int_u = (u_long)*ixdr++; /* nickname not XDR'd ! */
-
- /*
- * Decrypt the timestamp
- */
- status = ecb_crypt((char *)&auth->ah_key, (char *)&verf.adv_xtimestamp,
- sizeof(des_block), DES_DECRYPT | DES_HW);
-
- if (DES_FAILED(status)) {
- debug("authdes_validate: DES decryption failure");
- return (FALSE);
- }
-
- /*
- * xdr the decrypted timestamp
- */
- ixdr = (u_long *)verf.adv_xtimestamp.c;
- verf.adv_timestamp.tv_sec = IXDR_GET_LONG(ixdr) + 1;
- verf.adv_timestamp.tv_usec = IXDR_GET_LONG(ixdr);
-
- /*
- * validate
- */
- if (bcmp((char *)&ad->ad_timestamp, (char *)&verf.adv_timestamp,
- sizeof(struct timeval)) != 0) {
- debug("authdes_validate: verifier mismatch\n");
- return (FALSE);
- }
-
- /*
- * We have a nickname now, let's use it
- */
- ad->ad_nickname = verf.adv_nickname;
- ad->ad_cred.adc_namekind = ADN_NICKNAME;
- return (TRUE);
-}
-
-/*
- * 4. Refresh
- */
-static bool_t
-authdes_refresh(auth)
- AUTH *auth;
-{
- struct ad_private *ad = AUTH_PRIVATE(auth);
- struct authdes_cred *cred = &ad->ad_cred;
- netobj pkey;
-
- if (ad->ad_dosync &&
-#ifdef old
- !synchronize(&ad->ad_syncaddr, &ad->ad_timediff)) {
-#else
- !__rpc_get_time_offset(&ad->ad_timediff,ad->ad_nis_srvr,
- ad->ad_timehost, &(ad->ad_uaddr),
- (struct sockaddr_in *)&(ad->ad_syncaddr))) {
-#endif
- /*
- * Hope the clocks are synced!
- */
- ad->ad_timediff.tv_sec = ad->ad_timediff.tv_usec = 0;
- ad->ad_dosync = 0;
- debug("authdes_refresh: unable to synchronize with server");
- }
- ad->ad_xkey = auth->ah_key;
- pkey.n_bytes = (char *)(ad->ad_pkey);
- pkey.n_len = strlen((char *)ad->ad_pkey) + 1;
- if (key_encryptsession_pk(ad->ad_servername, &pkey, &ad->ad_xkey) < 0) {
- debug("authdes_create: unable to encrypt conversation key");
- return (FALSE);
- }
- cred->adc_fullname.key = ad->ad_xkey;
- cred->adc_namekind = ADN_FULLNAME;
- cred->adc_fullname.name = ad->ad_fullname;
- return (TRUE);
-}
-
-
-/*
- * 5. Destroy
- */
-static void
-authdes_destroy(auth)
- AUTH *auth;
-{
- struct ad_private *ad = AUTH_PRIVATE(auth);
-
- FREE(ad->ad_fullname, ad->ad_fullnamelen + 1);
- FREE(ad->ad_servername, ad->ad_servernamelen + 1);
- FREE(ad, sizeof(struct ad_private));
- FREE(auth, sizeof(AUTH));
-}
-
-
-#ifdef old
-/*
- * Synchronize with the server at the given address, that is,
- * adjust timep to reflect the delta between our clocks
- */
-static bool_t
-synchronize(syncaddr, timep)
- struct sockaddr *syncaddr;
- struct timeval *timep;
-{
- struct timeval mytime;
- struct timeval timeout;
-
- timeout.tv_sec = RTIME_TIMEOUT;
- timeout.tv_usec = 0;
- if (rtime((struct sockaddr_in *)syncaddr, timep, NULL /*&timeout*/) < 0) {
- return (FALSE);
- }
- (void) gettimeofday(&mytime, (struct timezone *)NULL);
- timep->tv_sec -= mytime.tv_sec;
- if (mytime.tv_usec > timep->tv_usec) {
- timep->tv_sec -= 1;
- timep->tv_usec += MILLION;
- }
- timep->tv_usec -= mytime.tv_usec;
- return (TRUE);
-}
-#endif
diff --git a/lib/libc/rpc/auth_none.c b/lib/libc/rpc/auth_none.c
deleted file mode 100644
index b2e2995..0000000
--- a/lib/libc/rpc/auth_none.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)auth_none.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: auth_none.c,v 1.5 1996/12/30 14:13:30 peter Exp $";
-#endif
-
-/*
- * auth_none.c
- * Creates a client authentication handle for passing "null"
- * credentials and verifiers to remote systems.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <stdlib.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-#define MAX_MARSHEL_SIZE 20
-
-/*
- * Authenticator operations routines
- */
-static void authnone_verf();
-static void authnone_destroy();
-static bool_t authnone_marshal();
-static bool_t authnone_validate();
-static bool_t authnone_refresh();
-
-static struct auth_ops ops = {
- authnone_verf,
- authnone_marshal,
- authnone_validate,
- authnone_refresh,
- authnone_destroy
-};
-
-static struct authnone_private {
- AUTH no_client;
- char marshalled_client[MAX_MARSHEL_SIZE];
- u_int mcnt;
-} *authnone_private;
-
-AUTH *
-authnone_create()
-{
- register struct authnone_private *ap = authnone_private;
- XDR xdr_stream;
- register XDR *xdrs;
-
- if (ap == 0) {
- ap = (struct authnone_private *)calloc(1, sizeof (*ap));
- if (ap == 0)
- return (0);
- authnone_private = ap;
- }
- if (!ap->mcnt) {
- ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
- ap->no_client.ah_ops = &ops;
- xdrs = &xdr_stream;
- xdrmem_create(xdrs, ap->marshalled_client, (u_int)MAX_MARSHEL_SIZE,
- XDR_ENCODE);
- (void)xdr_opaque_auth(xdrs, &ap->no_client.ah_cred);
- (void)xdr_opaque_auth(xdrs, &ap->no_client.ah_verf);
- ap->mcnt = XDR_GETPOS(xdrs);
- XDR_DESTROY(xdrs);
- }
- return (&ap->no_client);
-}
-
-/*ARGSUSED*/
-static bool_t
-authnone_marshal(client, xdrs)
- AUTH *client;
- XDR *xdrs;
-{
- register struct authnone_private *ap = authnone_private;
-
- if (ap == 0)
- return (0);
- return ((*xdrs->x_ops->x_putbytes)(xdrs,
- ap->marshalled_client, ap->mcnt));
-}
-
-static void
-authnone_verf()
-{
-}
-
-static bool_t
-authnone_validate()
-{
-
- return (TRUE);
-}
-
-static bool_t
-authnone_refresh()
-{
-
- return (FALSE);
-}
-
-static void
-authnone_destroy()
-{
-}
diff --git a/lib/libc/rpc/auth_time.c b/lib/libc/rpc/auth_time.c
deleted file mode 100644
index 3128e6d..0000000
--- a/lib/libc/rpc/auth_time.c
+++ /dev/null
@@ -1,501 +0,0 @@
-#pragma ident "@(#)auth_time.c 1.4 92/11/10 SMI"
-
-/*
- * auth_time.c
- *
- * This module contains the private function __rpc_get_time_offset()
- * which will return the difference in seconds between the local system's
- * notion of time and a remote server's notion of time. This must be
- * possible without calling any functions that may invoke the name
- * service. (netdir_getbyxxx, getXbyY, etc). The function is used in the
- * synchronize call of the authdes code to synchronize clocks between
- * NIS+ clients and their servers.
- *
- * Note to minimize the amount of duplicate code, portions of the
- * synchronize() function were folded into this code, and the synchronize
- * call becomes simply a wrapper around this function. Further, if this
- * function is called with a timehost it *DOES* recurse to the name
- * server so don't use it in that mode if you are doing name service code.
- *
- * Copyright (c) 1992 Sun Microsystems Inc.
- * All rights reserved.
- *
- * Side effects :
- * When called a client handle to a RPCBIND process is created
- * and destroyed. Two strings "netid" and "uaddr" are malloc'd
- * and returned. The SIGALRM processing is modified only if
- * needed to deal with TCP connections.
- *
- * NOTE: This code has had the crap beaten out it in order to convert
- * it from TI-RPC back to TD-RPC for use on FreeBSD.
- */
-#include <stdio.h>
-#include <syslog.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <netdb.h>
-#include <sys/signal.h>
-#include <sys/errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <rpc/rpc.h>
-#include <rpc/rpc_com.h>
-#undef NIS
-#include <rpcsvc/nis.h>
-
-/*
- * FreeBSD currently uses RPC 4.0, which uses portmap rather than
- * rpcbind. Consequently, we need to fake up these values here.
- * Luckily, the RPCB_GETTIME procedure uses only base XDR data types
- * so we don't need anything besides these magic numbers.
- */
-#define RPCBPROG (u_long)100000
-#define RPCBVERS (u_long)3
-#define RPCBPROC_GETTIME (u_long)6
-
-#ifdef TESTING
-#define msg(x) printf("ERROR: %s\n", x)
-/* #define msg(x) syslog(LOG_ERR, "%s", x) */
-#else
-#define msg(x)
-#endif
-
-static int saw_alarm = 0;
-
-static void
-alarm_hndler(s)
- int s;
-{
- saw_alarm = 1;
- return;
-}
-
-/*
- * The internet time server defines the epoch to be Jan 1, 1900
- * whereas UNIX defines it to be Jan 1, 1970. To adjust the result
- * from internet time-service time, into UNIX time we subtract the
- * following offset :
- */
-#define NYEARS (1970 - 1900)
-#define TOFFSET ((u_long)60*60*24*(365*NYEARS + (NYEARS/4)))
-
-
-/*
- * Stolen from rpc.nisd:
- * Turn a 'universal address' into a struct sockaddr_in.
- * Bletch.
- */
-static int uaddr_to_sockaddr(uaddr, sin)
-#ifdef foo
- endpoint *endpt;
-#endif
- char *uaddr;
- struct sockaddr_in *sin;
-{
- unsigned char p_bytes[2];
- int i;
- unsigned long a[6];
-
- i = sscanf(uaddr, "%lu.%lu.%lu.%lu.%lu.%lu", &a[0], &a[1], &a[2],
- &a[3], &a[4], &a[5]);
-
- if (i < 6)
- return(1);
-
- for (i = 0; i < 4; i++)
- sin->sin_addr.s_addr |= (a[i] & 0x000000FF) << (8 * i);
-
- p_bytes[0] = (unsigned char)a[4] & 0x000000FF;
- p_bytes[1] = (unsigned char)a[5] & 0x000000FF;
-
- sin->sin_family = AF_INET; /* always */
- bcopy((char *)&p_bytes, (char *)&sin->sin_port, 2);
-
- return (0);
-}
-
-/*
- * free_eps()
- *
- * Free the strings that were strduped into the eps structure.
- */
-static void
-free_eps(eps, num)
- endpoint eps[];
- int num;
-{
- int i;
-
- for (i = 0; i < num; i++) {
- free(eps[i].uaddr);
- free(eps[i].proto);
- free(eps[i].family);
- }
- return;
-}
-
-/*
- * get_server()
- *
- * This function constructs a nis_server structure description for the
- * indicated hostname.
- *
- * NOTE: There is a chance we may end up recursing here due to the
- * fact that gethostbyname() could do an NIS search. Ideally, the
- * NIS+ server will call __rpc_get_time_offset() with the nis_server
- * structure already populated.
- */
-static nis_server *
-get_server(sin, host, srv, eps, maxep)
- struct sockaddr_in *sin;
- char *host; /* name of the time host */
- nis_server *srv; /* nis_server struct to use. */
- endpoint eps[]; /* array of endpoints */
- int maxep; /* max array size */
-{
- char hname[256];
- int num_ep = 0, i;
- struct hostent *he;
- struct hostent dummy;
- char *ptr[2];
-
- if (host == NULL && sin == NULL)
- return (NULL);
-
- if (sin == NULL) {
- he = gethostbyname(host);
- if (he == NULL)
- return(NULL);
- } else {
- he = &dummy;
- ptr[0] = (char *)&sin->sin_addr.s_addr;
- ptr[1] = NULL;
- dummy.h_addr_list = ptr;
- }
-
- /*
- * This is lame. We go around once for TCP, then again
- * for UDP.
- */
- for (i = 0; (he->h_addr_list[i] != NULL) && (num_ep < maxep);
- i++, num_ep++) {
- struct in_addr *a;
-
- a = (struct in_addr *)he->h_addr_list[i];
- snprintf(hname, sizeof(hname), "%s.0.111", inet_ntoa(*a));
- eps[num_ep].uaddr = strdup(hname);
- eps[num_ep].family = strdup("inet");
- eps[num_ep].proto = strdup("tcp");
- }
-
- for (i = 0; (he->h_addr_list[i] != NULL) && (num_ep < maxep);
- i++, num_ep++) {
- struct in_addr *a;
-
- a = (struct in_addr *)he->h_addr_list[i];
- snprintf(hname, sizeof(hname), "%s.0.111", inet_ntoa(*a));
- eps[num_ep].uaddr = strdup(hname);
- eps[num_ep].family = strdup("inet");
- eps[num_ep].proto = strdup("udp");
- }
-
- srv->name = (nis_name) host;
- srv->ep.ep_len = num_ep;
- srv->ep.ep_val = eps;
- srv->key_type = NIS_PK_NONE;
- srv->pkey.n_bytes = NULL;
- srv->pkey.n_len = 0;
- return (srv);
-}
-
-/*
- * __rpc_get_time_offset()
- *
- * This function uses a nis_server structure to contact the a remote
- * machine (as named in that structure) and returns the offset in time
- * between that machine and this one. This offset is returned in seconds
- * and may be positive or negative.
- *
- * The first time through, a lot of fiddling is done with the netconfig
- * stuff to find a suitable transport. The function is very aggressive
- * about choosing UDP or at worst TCP if it can. This is because
- * those transports support both the RCPBIND call and the internet
- * time service.
- *
- * Once through, *uaddr is set to the universal address of
- * the machine and *netid is set to the local netid for the transport
- * that uaddr goes with. On the second call, the netconfig stuff
- * is skipped and the uaddr/netid pair are used to fetch the netconfig
- * structure and to then contact the machine for the time.
- *
- * td = "server" - "client"
- */
-int
-__rpc_get_time_offset(td, srv, thost, uaddr, netid)
- struct timeval *td; /* Time difference */
- nis_server *srv; /* NIS Server description */
- char *thost; /* if no server, this is the timehost */
- char **uaddr; /* known universal address */
- struct sockaddr_in *netid; /* known network identifier */
-{
- CLIENT *clnt; /* Client handle */
- endpoint *ep, /* useful endpoints */
- *useep = NULL; /* endpoint of xp */
- char *useua = NULL; /* uaddr of selected xp */
- int epl, i; /* counters */
- enum clnt_stat status; /* result of clnt_call */
- u_long thetime, delta;
- int needfree = 0;
- struct timeval tv;
- int time_valid;
- int udp_ep = -1, tcp_ep = -1;
- int a1, a2, a3, a4;
- char ut[64], ipuaddr[64];
- endpoint teps[32];
- nis_server tsrv;
- void (*oldsig)() = NULL; /* old alarm handler */
- struct sockaddr_in sin;
- int s = RPC_ANYSOCK, len;
- int type = 0;
-
- td->tv_sec = 0;
- td->tv_usec = 0;
-
- /*
- * First check to see if we need to find and address for this
- * server.
- */
- if (*uaddr == NULL) {
- if ((srv != NULL) && (thost != NULL)) {
- msg("both timehost and srv pointer used!");
- return (0);
- }
- if (! srv) {
- srv = get_server(netid, thost, &tsrv, teps, 32);
- if (srv == NULL) {
- msg("unable to contruct server data.");
- return (0);
- }
- needfree = 1; /* need to free data in endpoints */
- }
-
- ep = srv->ep.ep_val;
- epl = srv->ep.ep_len;
-
- /* Identify the TCP and UDP endpoints */
- for (i = 0;
- (i < epl) && ((udp_ep == -1) || (tcp_ep == -1)); i++) {
- if (strcasecmp(ep[i].proto, "udp") == 0)
- udp_ep = i;
- if (strcasecmp(ep[i].proto, "tcp") == 0)
- tcp_ep = i;
- }
-
- /* Check to see if it is UDP or TCP */
- if (tcp_ep > -1) {
- useep = &ep[tcp_ep];
- useua = ep[tcp_ep].uaddr;
- type = SOCK_STREAM;
- } else if (udp_ep > -1) {
- useep = &ep[udp_ep];
- useua = ep[udp_ep].uaddr;
- type = SOCK_DGRAM;
- }
-
- if (useep == NULL) {
- msg("no acceptable transport endpoints.");
- if (needfree)
- free_eps(teps, tsrv.ep.ep_len);
- return (0);
- }
- }
-
- /*
- * Create a sockaddr from the uaddr.
- */
- if (*uaddr != NULL)
- useua = *uaddr;
-
- /* Fixup test for NIS+ */
- sscanf(useua, "%d.%d.%d.%d.", &a1, &a2, &a3, &a4);
- sprintf(ipuaddr, "%d.%d.%d.%d.0.111", a1, a2, a3, a4);
- useua = &ipuaddr[0];
-
- bzero((char *)&sin, sizeof(sin));
- if (uaddr_to_sockaddr(useua, &sin)) {
- msg("unable to translate uaddr to sockaddr.");
- if (needfree)
- free_eps(teps, tsrv.ep.ep_len);
- return (0);
- }
-
- /*
- * Create the client handle to rpcbind. Note we always try
- * version 3 since that is the earliest version that supports
- * the RPCB_GETTIME call. Also it is the version that comes
- * standard with SVR4. Since most everyone supports TCP/IP
- * we could consider trying the rtime call first.
- */
- clnt = clnttcp_create(&sin, RPCBPROG, RPCBVERS, &s, 0, 0);
- if (clnt == NULL) {
- msg("unable to create client handle to rpcbind.");
- if (needfree)
- free_eps(teps, tsrv.ep.ep_len);
- return (0);
- }
-
- tv.tv_sec = 5;
- tv.tv_usec = 0;
- time_valid = 0;
- status = clnt_call(clnt, RPCBPROC_GETTIME, xdr_void, NULL,
- xdr_u_long, (char *)&thetime, tv);
- /*
- * The only error we check for is anything but success. In
- * fact we could have seen PROGMISMATCH if talking to a 4.1
- * machine (pmap v2) or TIMEDOUT if the net was busy.
- */
- if (status == RPC_SUCCESS)
- time_valid = 1;
- else {
- int save;
-
- /* Blow away possible stale CLNT handle. */
- if (clnt != NULL) {
- clnt_destroy(clnt);
- clnt = NULL;
- }
-
- /*
- * Convert PMAP address into timeservice address
- * We take advantage of the fact that we "know" what
- * the universal address looks like for inet transports.
- *
- * We also know that the internet timeservice is always
- * listening on port 37.
- */
- sscanf(useua, "%d.%d.%d.%d.", &a1, &a2, &a3, &a4);
- sprintf(ut, "%d.%d.%d.%d.0.37", a1, a2, a3, a4);
-
- if (uaddr_to_sockaddr(ut, &sin)) {
- msg("cannot convert timeservice uaddr to sockaddr.");
- goto error;
- }
-
- s = socket(AF_INET, type, 0);
- if (s == -1) {
- msg("unable to open fd to network.");
- goto error;
- }
-
- /*
- * Now depending on whether or not we're talking to
- * UDP we set a timeout or not.
- */
- if (type == SOCK_DGRAM) {
- struct timeval timeout = { 20, 0 };
- struct sockaddr_in from;
- fd_set readfds;
- int res;
-
- if (sendto(s, &thetime, sizeof(thetime), 0,
- (struct sockaddr *)&sin, sizeof(sin)) == -1) {
- msg("udp : sendto failed.");
- goto error;
- }
- do {
- FD_ZERO(&readfds);
- FD_SET(s, &readfds);
- res = select(_rpc_dtablesize(), &readfds,
- (fd_set *)NULL, (fd_set *)NULL, &timeout);
- } while (res < 0 && errno == EINTR);
- if (res <= 0)
- goto error;
- len = sizeof(from);
- res = recvfrom(s, (char *)&thetime, sizeof(thetime), 0,
- (struct sockaddr *)&from, &len);
- if (res == -1) {
- msg("recvfrom failed on udp transport.");
- goto error;
- }
- time_valid = 1;
- } else {
- int res;
-
- oldsig = (void (*)())signal(SIGALRM, alarm_hndler);
- saw_alarm = 0; /* global tracking the alarm */
- alarm(20); /* only wait 20 seconds */
- res = connect(s, (struct sockaddr *)&sin, sizeof(sin));
- if (res == -1) {
- msg("failed to connect to tcp endpoint.");
- goto error;
- }
- if (saw_alarm) {
- msg("alarm caught it, must be unreachable.");
- goto error;
- }
- res = read(s, (char *)&thetime, sizeof(thetime));
- if (res != sizeof(thetime)) {
- if (saw_alarm)
- msg("timed out TCP call.");
- else
- msg("wrong size of results returned");
-
- goto error;
- }
- time_valid = 1;
- }
- save = errno;
- (void) close(s);
- errno = save;
- s = RPC_ANYSOCK;
-
- if (time_valid) {
- thetime = ntohl(thetime);
- thetime = thetime - TOFFSET; /* adjust to UNIX time */
- } else
- thetime = 0;
- }
-
- gettimeofday(&tv, 0);
-
-error:
- /*
- * clean up our allocated data structures.
- */
-
- if (s != RPC_ANYSOCK)
- (void) close(s);
-
- if (clnt != NULL)
- clnt_destroy(clnt);
-
- alarm(0); /* reset that alarm if its outstanding */
- if (oldsig) {
- signal(SIGALRM, oldsig);
- }
-
- /*
- * note, don't free uaddr strings until after we've made a
- * copy of them.
- */
- if (time_valid) {
- if (*uaddr == NULL)
- *uaddr = strdup(useua);
-
- /* Round to the nearest second */
- tv.tv_sec += (tv.tv_sec > 500000) ? 1 : 0;
- delta = (thetime > tv.tv_sec) ? thetime - tv.tv_sec :
- tv.tv_sec - thetime;
- td->tv_sec = (thetime < tv.tv_sec) ? - delta : delta;
- td->tv_usec = 0;
- } else {
- msg("unable to get the server's time.");
- }
-
- if (needfree)
- free_eps(teps, tsrv.ep.ep_len);
-
- return (time_valid);
-}
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c
deleted file mode 100644
index 32200c2..0000000
--- a/lib/libc/rpc/auth_unix.c
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)auth_unix.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: auth_unix.c,v 1.7 1996/12/30 14:14:39 peter Exp $";
-#endif
-
-/*
- * auth_unix.c, Implements UNIX style authentication parameters.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * The system is very weak. The client uses no encryption for it's
- * credentials and only sends null verifiers. The server sends backs
- * null verifiers or optionally a verifier that suggests a new short hand
- * for the credentials.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-#include <sys/param.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-#include <rpc/auth_unix.h>
-
-/*
- * Unix authenticator operations vector
- */
-static void authunix_nextverf();
-static bool_t authunix_marshal();
-static bool_t authunix_validate();
-static bool_t authunix_refresh();
-static void authunix_destroy();
-
-static struct auth_ops auth_unix_ops = {
- authunix_nextverf,
- authunix_marshal,
- authunix_validate,
- authunix_refresh,
- authunix_destroy
-};
-
-/*
- * This struct is pointed to by the ah_private field of an auth_handle.
- */
-struct audata {
- struct opaque_auth au_origcred; /* original credentials */
- struct opaque_auth au_shcred; /* short hand cred */
- u_long au_shfaults; /* short hand cache faults */
- char au_marshed[MAX_AUTH_BYTES];
- u_int au_mpos; /* xdr pos at end of marshed */
-};
-#define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private)
-
-static void marshal_new_auth();
-
-/*
- * This goop is here because some servers refuse to accept a
- * credential with more than some number (usually 8) supplementary
- * groups. Blargh!
- */
-static int authunix_maxgrouplist = 0;
-
-void
-set_rpc_maxgrouplist(int num)
-{
- authunix_maxgrouplist = num;
-}
-
-/*
- * Create a unix style authenticator.
- * Returns an auth handle with the given stuff in it.
- */
-AUTH *
-authunix_create(machname, uid, gid, len, aup_gids)
- char *machname;
- int uid;
- int gid;
- register int len;
- int *aup_gids;
-{
- struct authunix_parms aup;
- char mymem[MAX_AUTH_BYTES];
- struct timeval now;
- XDR xdrs;
- register AUTH *auth;
- register struct audata *au;
-
- /*
- * Allocate and set up auth handle
- */
- auth = (AUTH *)mem_alloc(sizeof(*auth));
-#ifndef KERNEL
- if (auth == NULL) {
- (void)fprintf(stderr, "authunix_create: out of memory\n");
- return (NULL);
- }
-#endif
- au = (struct audata *)mem_alloc(sizeof(*au));
-#ifndef KERNEL
- if (au == NULL) {
- (void)fprintf(stderr, "authunix_create: out of memory\n");
- return (NULL);
- }
-#endif
- auth->ah_ops = &auth_unix_ops;
- auth->ah_private = (caddr_t)au;
- auth->ah_verf = au->au_shcred = _null_auth;
- au->au_shfaults = 0;
-
- /*
- * fill in param struct from the given params
- */
- (void)gettimeofday(&now, (struct timezone *)0);
- aup.aup_time = now.tv_sec;
- aup.aup_machname = machname;
- aup.aup_uid = uid;
- aup.aup_gid = gid;
- /* GW: continuation of max group list hack */
- if(authunix_maxgrouplist != 0) {
- aup.aup_len = ((len < authunix_maxgrouplist) ? len
- : authunix_maxgrouplist);
- } else {
- aup.aup_len = (u_int)len;
- }
- aup.aup_gids = aup_gids;
-
- /*
- * Serialize the parameters into origcred
- */
- xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
- if (! xdr_authunix_parms(&xdrs, &aup))
- abort();
- au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs);
- au->au_origcred.oa_flavor = AUTH_UNIX;
-#ifdef KERNEL
- au->au_origcred.oa_base = mem_alloc((u_int) len);
-#else
- if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) {
- (void)fprintf(stderr, "authunix_create: out of memory\n");
- return (NULL);
- }
-#endif
- memcpy(au->au_origcred.oa_base, mymem, (u_int)len);
-
- /*
- * set auth handle to reflect new cred.
- */
- auth->ah_cred = au->au_origcred;
- marshal_new_auth(auth);
- return (auth);
-}
-
-/*
- * Returns an auth handle with parameters determined by doing lots of
- * syscalls.
- */
-AUTH *
-authunix_create_default()
-{
- register int len;
- char machname[MAX_MACHINE_NAME + 1];
- register int uid;
- register int gid;
- int gids[NGRPS];
- int i;
- gid_t real_gids[NGROUPS];
-
- if (gethostname(machname, MAX_MACHINE_NAME) == -1)
- abort();
- machname[MAX_MACHINE_NAME] = 0;
- uid = (int)geteuid();
- gid = (int)getegid();
- if ((len = getgroups(NGROUPS, real_gids)) < 0)
- abort();
- if(len > NGRPS) len = NGRPS; /* GW: turn `gid_t's into `int's */
- for(i = 0; i < len; i++) {
- gids[i] = (int)real_gids[i];
- }
- return (authunix_create(machname, uid, gid, len, gids));
-}
-
-/*
- * authunix operations
- */
-
-static void
-authunix_nextverf(auth)
- AUTH *auth;
-{
- /* no action necessary */
-}
-
-static bool_t
-authunix_marshal(auth, xdrs)
- AUTH *auth;
- XDR *xdrs;
-{
- register struct audata *au = AUTH_PRIVATE(auth);
-
- return (XDR_PUTBYTES(xdrs, au->au_marshed, au->au_mpos));
-}
-
-static bool_t
-authunix_validate(auth, verf)
- register AUTH *auth;
- struct opaque_auth verf;
-{
- register struct audata *au;
- XDR xdrs;
-
- if (verf.oa_flavor == AUTH_SHORT) {
- au = AUTH_PRIVATE(auth);
- xdrmem_create(&xdrs, verf.oa_base, verf.oa_length, XDR_DECODE);
-
- if (au->au_shcred.oa_base != NULL) {
- mem_free(au->au_shcred.oa_base,
- au->au_shcred.oa_length);
- au->au_shcred.oa_base = NULL;
- }
- if (xdr_opaque_auth(&xdrs, &au->au_shcred)) {
- auth->ah_cred = au->au_shcred;
- } else {
- xdrs.x_op = XDR_FREE;
- (void)xdr_opaque_auth(&xdrs, &au->au_shcred);
- au->au_shcred.oa_base = NULL;
- auth->ah_cred = au->au_origcred;
- }
- marshal_new_auth(auth);
- }
- return (TRUE);
-}
-
-static bool_t
-authunix_refresh(auth)
- register AUTH *auth;
-{
- register struct audata *au = AUTH_PRIVATE(auth);
- struct authunix_parms aup;
- struct timeval now;
- XDR xdrs;
- register int stat;
-
- if (auth->ah_cred.oa_base == au->au_origcred.oa_base) {
- /* there is no hope. Punt */
- return (FALSE);
- }
- au->au_shfaults ++;
-
- /* first deserialize the creds back into a struct authunix_parms */
- aup.aup_machname = NULL;
- aup.aup_gids = (int *)NULL;
- xdrmem_create(&xdrs, au->au_origcred.oa_base,
- au->au_origcred.oa_length, XDR_DECODE);
- stat = xdr_authunix_parms(&xdrs, &aup);
- if (! stat)
- goto done;
-
- /* update the time and serialize in place */
- (void)gettimeofday(&now, (struct timezone *)0);
- aup.aup_time = now.tv_sec;
- xdrs.x_op = XDR_ENCODE;
- XDR_SETPOS(&xdrs, 0);
- stat = xdr_authunix_parms(&xdrs, &aup);
- if (! stat)
- goto done;
- auth->ah_cred = au->au_origcred;
- marshal_new_auth(auth);
-done:
- /* free the struct authunix_parms created by deserializing */
- xdrs.x_op = XDR_FREE;
- (void)xdr_authunix_parms(&xdrs, &aup);
- XDR_DESTROY(&xdrs);
- return (stat);
-}
-
-static void
-authunix_destroy(auth)
- register AUTH *auth;
-{
- register struct audata *au = AUTH_PRIVATE(auth);
-
- mem_free(au->au_origcred.oa_base, au->au_origcred.oa_length);
-
- if (au->au_shcred.oa_base != NULL)
- mem_free(au->au_shcred.oa_base, au->au_shcred.oa_length);
-
- mem_free(auth->ah_private, sizeof(struct audata));
-
- if (auth->ah_verf.oa_base != NULL)
- mem_free(auth->ah_verf.oa_base, auth->ah_verf.oa_length);
-
- mem_free((caddr_t)auth, sizeof(*auth));
-}
-
-/*
- * Marshals (pre-serializes) an auth struct.
- * sets private data, au_marshed and au_mpos
- */
-static void
-marshal_new_auth(auth)
- register AUTH *auth;
-{
- XDR xdr_stream;
- register XDR *xdrs = &xdr_stream;
- register struct audata *au = AUTH_PRIVATE(auth);
-
- xdrmem_create(xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
- if ((! xdr_opaque_auth(xdrs, &(auth->ah_cred))) ||
- (! xdr_opaque_auth(xdrs, &(auth->ah_verf)))) {
- perror("auth_none.c - Fatal marshalling problem");
- } else {
- au->au_mpos = XDR_GETPOS(xdrs);
- }
- XDR_DESTROY(xdrs);
-}
diff --git a/lib/libc/rpc/authdes_prot.c b/lib/libc/rpc/authdes_prot.c
deleted file mode 100644
index 14679c0..0000000
--- a/lib/libc/rpc/authdes_prot.c
+++ /dev/null
@@ -1,82 +0,0 @@
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)authdes_prot.c 2.1 88/07/29 4.0 RPCSRC; from 1.6 88/02/08 SMI";
-#endif
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1988 by Sun Microsystems, Inc.
- */
-
-/*
- * authdes_prot.c, XDR routines for DES authentication
- */
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-#include <rpc/auth_des.h>
-
-#define ATTEMPT(xdr_op) if (!(xdr_op)) return (FALSE)
-
-bool_t
-xdr_authdes_cred(xdrs, cred)
- XDR *xdrs;
- struct authdes_cred *cred;
-{
- /*
- * Unrolled xdr
- */
- ATTEMPT(xdr_enum(xdrs, (enum_t *)&cred->adc_namekind));
- switch (cred->adc_namekind) {
- case ADN_FULLNAME:
- ATTEMPT(xdr_string(xdrs, &cred->adc_fullname.name, MAXNETNAMELEN));
- ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_fullname.key, sizeof(des_block)));
- ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_fullname.window, sizeof(cred->adc_fullname.window)));
- return (TRUE);
- case ADN_NICKNAME:
- ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_nickname, sizeof(cred->adc_nickname)));
- return (TRUE);
- default:
- return (FALSE);
- }
-}
-
-
-bool_t
-xdr_authdes_verf(xdrs, verf)
- register XDR *xdrs;
- register struct authdes_verf *verf;
-{
- /*
- * Unrolled xdr
- */
- ATTEMPT(xdr_opaque(xdrs, (caddr_t)&verf->adv_xtimestamp, sizeof(des_block)));
- ATTEMPT(xdr_opaque(xdrs, (caddr_t)&verf->adv_int_u, sizeof(verf->adv_int_u)));
- return (TRUE);
-}
diff --git a/lib/libc/rpc/authunix_prot.c b/lib/libc/rpc/authunix_prot.c
deleted file mode 100644
index c818ba0..0000000
--- a/lib/libc/rpc/authunix_prot.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)authunix_prot.c 1.15 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)authunix_prot.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: authunix_prot.c,v 1.2 1995/05/30 05:41:12 rgrimes Exp $";
-#endif
-
-/*
- * authunix_prot.c
- * XDR for UNIX style authentication parameters for RPC
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-#include <rpc/auth_unix.h>
-
-/*
- * XDR for unix authentication parameters.
- */
-bool_t
-xdr_authunix_parms(xdrs, p)
- register XDR *xdrs;
- register struct authunix_parms *p;
-{
-
- if (xdr_u_long(xdrs, &(p->aup_time))
- && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
- && xdr_int(xdrs, &(p->aup_uid))
- && xdr_int(xdrs, &(p->aup_gid))
- && xdr_array(xdrs, (caddr_t *)&(p->aup_gids),
- &(p->aup_len), NGRPS, sizeof(int), xdr_int) ) {
- return (TRUE);
- }
- return (FALSE);
-}
-
diff --git a/lib/libc/rpc/bindresvport.3 b/lib/libc/rpc/bindresvport.3
deleted file mode 100644
index b21d65e..0000000
--- a/lib/libc/rpc/bindresvport.3
+++ /dev/null
@@ -1,30 +0,0 @@
-.\" @(#)bindresvport.3n 2.2 88/08/02 4.0 RPCSRC; from 1.7 88/03/14 SMI
-.Dd November 22, 1987
-.Dt BINDRESVPORT 3
-.Os
-.Sh NAME
-.Nm bindresvport
-.Ndbind a socket to a privileged IP port
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netinet/in.h>
-.Ft int
-.Fn bindresvport "int sd" "struct sockaddr_in **sin"
-.Sh DESCRIPTION
-.Nm Bindresvport
-is used to bind a socket descriptor to a privileged
-.Tn IP
-port, that is, a
-port number in the range 0-1023.
-The routine returns 0 if it is successful,
-otherwise -1 is returned and
-.Va errno
-set to reflect the cause of the error.
-.Pp
-Only root can bind to a privileged port; this call will fail for any
-other users.
-.Pp
-If the value of sin->sin_port is non-zero
-.Fn bindresvport
-will attempt to use that specific port. If it fails, it chooses another
-privileged port automatically.
diff --git a/lib/libc/rpc/bindresvport.c b/lib/libc/rpc/bindresvport.c
deleted file mode 100644
index dea8705..0000000
--- a/lib/libc/rpc/bindresvport.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)bindresvport.c 1.8 88/02/08 SMI";*/
-/*static char *sccsid = "from: @(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC";*/
-/*from: OpenBSD: bindresvport.c,v 1.7 1996/07/30 16:25:47 downsj Exp */
-static char *rcsid = "$Id: bindresvport.c,v 1.6 1996/12/30 14:12:36 peter Exp $";
-#endif
-
-/*
- * Copyright (c) 1987 by Sun Microsystems, Inc.
- *
- * Portions Copyright(C) 1996, Jason Downs. All rights reserved.
- */
-
-#include <sys/types.h>
-#include <sys/errno.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#include <string.h>
-
-/*
- * Bind a socket to a privileged IP port
- */
-int
-bindresvport(sd, sin)
- int sd;
- struct sockaddr_in *sin;
-{
- int on, old, error;
- struct sockaddr_in myaddr;
- int sinlen = sizeof(struct sockaddr_in);
-
- if (sin == (struct sockaddr_in *)0) {
- sin = &myaddr;
- memset(sin, 0, sinlen);
- sin->sin_len = sinlen;
- sin->sin_family = AF_INET;
- } else if (sin->sin_family != AF_INET) {
- errno = EPFNOSUPPORT;
- return (-1);
- }
-
- if (sin->sin_port == 0) {
- int oldlen = sizeof(old);
- error = getsockopt(sd, IPPROTO_IP, IP_PORTRANGE,
- &old, &oldlen);
- if (error < 0)
- return(error);
-
- on = IP_PORTRANGE_LOW;
- error = setsockopt(sd, IPPROTO_IP, IP_PORTRANGE,
- &on, sizeof(on));
- if (error < 0)
- return(error);
- }
-
- error = bind(sd, (struct sockaddr *)sin, sinlen);
-
- if (sin->sin_port == 0) {
- int saved_errno = errno;
-
- if (error) {
- if (setsockopt(sd, IPPROTO_IP, IP_PORTRANGE,
- &old, sizeof(old)) < 0)
- errno = saved_errno;
- return (error);
- }
-
- if (sin != &myaddr) {
- /* Hmm, what did the kernel assign... */
- if (getsockname(sd, (struct sockaddr *)sin,
- &sinlen) < 0)
- errno = saved_errno;
- return (error);
- }
- }
- return (error);
-}
diff --git a/lib/libc/rpc/clnt_generic.c b/lib/libc/rpc/clnt_generic.c
deleted file mode 100644
index ed754ea..0000000
--- a/lib/libc/rpc/clnt_generic.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";*/
-/*static char *sccsid = "from: @(#)clnt_generic.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_generic.c,v 1.5 1996/12/30 14:17:20 peter Exp $";
-#endif
-
-/*
- * Copyright (C) 1987, Sun Microsystems, Inc.
- */
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <sys/errno.h>
-#include <netdb.h>
-#include <string.h>
-
-/*
- * Generic client creation: takes (hostname, program-number, protocol) and
- * returns client handle. Default options are set, which the user can
- * change using the rpc equivalent of ioctl()'s.
- */
-CLIENT *
-clnt_create(hostname, prog, vers, proto)
- char *hostname;
- u_long prog;
- u_long vers;
- char *proto;
-{
- struct hostent *h;
- struct protoent *p;
- struct sockaddr_in sin;
- struct sockaddr_un sun;
- int sock;
- static struct timeval tv;
- CLIENT *client;
-
- if (!strcmp(proto, "unix")) {
- bzero((char *)&sun, sizeof(sun));
- sun.sun_family = AF_UNIX;
- strcpy(sun.sun_path, hostname);
- sun.sun_len = sizeof(sun.sun_len) + sizeof(sun.sun_family) +
- strlen(sun.sun_path) + 1;
- sock = RPC_ANYSOCK;
- client = clntunix_create(&sun, prog, vers, &sock, 0, 0);
- if (client == NULL)
- return(NULL);
- tv.tv_sec = 25;
- tv.tv_usec = 0;
- clnt_control(client, CLSET_TIMEOUT, &tv);
- return(client);
- }
-
- h = gethostbyname(hostname);
- if (h == NULL) {
- rpc_createerr.cf_stat = RPC_UNKNOWNHOST;
- return (NULL);
- }
- if (h->h_addrtype != AF_INET) {
- /*
- * Only support INET for now
- */
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = EAFNOSUPPORT;
- return (NULL);
- }
- memset(&sin, 0, sizeof(sin));
- sin.sin_len = sizeof(struct sockaddr_in);
- sin.sin_family = h->h_addrtype;
- sin.sin_port = 0;
- memcpy((char*)&sin.sin_addr, h->h_addr, h->h_length);
- p = getprotobyname(proto);
- if (p == NULL) {
- rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
- rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
- return (NULL);
- }
- sock = RPC_ANYSOCK;
- switch (p->p_proto) {
- case IPPROTO_UDP:
- tv.tv_sec = 5;
- tv.tv_usec = 0;
- client = clntudp_create(&sin, prog, vers, tv, &sock);
- if (client == NULL) {
- return (NULL);
- }
-#if 0 /* XXX do we need this? */
- tv.tv_sec = 25;
- tv.tv_usec = 0;
- clnt_control(client, CLSET_TIMEOUT, &tv);
-#endif
- break;
- case IPPROTO_TCP:
- client = clnttcp_create(&sin, prog, vers, &sock, 0, 0);
- if (client == NULL) {
- return (NULL);
- }
-#if 0 /* XXX do we need this? */
- tv.tv_sec = 25;
- tv.tv_usec = 0;
- clnt_control(client, CLSET_TIMEOUT, &tv);
-#endif
- break;
- default:
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
- return (NULL);
- }
- return (client);
-}
diff --git a/lib/libc/rpc/clnt_perror.c b/lib/libc/rpc/clnt_perror.c
deleted file mode 100644
index 79baac2..0000000
--- a/lib/libc/rpc/clnt_perror.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)clnt_perror.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_perror.c,v 1.6 1996/12/30 14:19:34 peter Exp $";
-#endif
-
-/*
- * clnt_perror.c
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <rpc/types.h>
-#include <rpc/auth.h>
-#include <rpc/clnt.h>
-
-static char *auth_errmsg();
-#define CLNT_PERROR_BUFLEN 256
-
-static char *buf;
-
-static char *
-_buf()
-{
-
- if (buf == 0)
- buf = (char *)malloc(CLNT_PERROR_BUFLEN);
- return (buf);
-}
-
-/*
- * Print reply error info
- */
-char *
-clnt_sperror(rpch, s)
- CLIENT *rpch;
- char *s;
-{
- struct rpc_err e;
- char *err;
- char *str = _buf();
- char *strstart = str;
-
- if (str == 0)
- return (0);
- CLNT_GETERR(rpch, &e);
-
- (void) sprintf(str, "%s: %s", s, clnt_sperrno(e.re_status));
- str += strlen(str);
-
- switch (e.re_status) {
- case RPC_SUCCESS:
- case RPC_CANTENCODEARGS:
- case RPC_CANTDECODERES:
- case RPC_TIMEDOUT:
- case RPC_PROGUNAVAIL:
- case RPC_PROCUNAVAIL:
- case RPC_CANTDECODEARGS:
- case RPC_SYSTEMERROR:
- case RPC_UNKNOWNHOST:
- case RPC_UNKNOWNPROTO:
- case RPC_PMAPFAILURE:
- case RPC_PROGNOTREGISTERED:
- case RPC_FAILED:
- break;
-
- case RPC_CANTSEND:
- case RPC_CANTRECV:
- (void) snprintf(str, CLNT_PERROR_BUFLEN - (str - strstart),
- "; errno = %s\n", strerror(e.re_errno));
- break;
-
- case RPC_VERSMISMATCH:
- (void) sprintf(str,
- "; low version = %lu, high version = %lu\n",
- e.re_vers.low, e.re_vers.high);
- break;
-
- case RPC_AUTHERROR:
- err = auth_errmsg(e.re_why);
- (void) sprintf(str,"; why = ");
- str += strlen(str);
- if (err != NULL) {
- (void) sprintf(str, "%s\n",err);
- } else {
- (void) sprintf(str,
- "(unknown authentication error - %d)\n",
- (int) e.re_why);
- }
- break;
-
- case RPC_PROGVERSMISMATCH:
- (void) sprintf(str,
- "; low version = %lu, high version = %lu\n",
- e.re_vers.low, e.re_vers.high);
- break;
-
- default: /* unknown */
- (void) sprintf(str,
- "; s1 = %lu, s2 = %lu\n",
- e.re_lb.s1, e.re_lb.s2);
- break;
- }
- strstart[CLNT_PERROR_BUFLEN-2] = '\n';
- strstart[CLNT_PERROR_BUFLEN-1] = '\0';
- return(strstart) ;
-}
-
-void
-clnt_perror(rpch, s)
- CLIENT *rpch;
- char *s;
-{
- (void) fprintf(stderr,"%s\n",clnt_sperror(rpch,s));
-}
-
-
-static const char *const rpc_errlist[] = {
- "RPC: Success", /* 0 - RPC_SUCCESS */
- "RPC: Can't encode arguments", /* 1 - RPC_CANTENCODEARGS */
- "RPC: Can't decode result", /* 2 - RPC_CANTDECODERES */
- "RPC: Unable to send", /* 3 - RPC_CANTSEND */
- "RPC: Unable to receive", /* 4 - RPC_CANTRECV */
- "RPC: Timed out", /* 5 - RPC_TIMEDOUT */
- "RPC: Incompatible versions of RPC", /* 6 - RPC_VERSMISMATCH */
- "RPC: Authentication error", /* 7 - RPC_AUTHERROR */
- "RPC: Program unavailable", /* 8 - RPC_PROGUNAVAIL */
- "RPC: Program/version mismatch", /* 9 - RPC_PROGVERSMISMATCH */
- "RPC: Procedure unavailable", /* 10 - RPC_PROCUNAVAIL */
- "RPC: Server can't decode arguments", /* 11 - RPC_CANTDECODEARGS */
- "RPC: Remote system error", /* 12 - RPC_SYSTEMERROR */
- "RPC: Unknown host", /* 13 - RPC_UNKNOWNHOST */
- "RPC: Port mapper failure", /* 14 - RPC_PMAPFAILURE */
- "RPC: Program not registered", /* 15 - RPC_PROGNOTREGISTERED */
- "RPC: Failed (unspecified error)", /* 16 - RPC_FAILED */
- "RPC: Unknown protocol" /* 17 - RPC_UNKNOWNPROTO */
-};
-
-
-/*
- * This interface for use by clntrpc
- */
-char *
-clnt_sperrno(stat)
- enum clnt_stat stat;
-{
- unsigned int errnum = stat;
-
- if (errnum < (sizeof(rpc_errlist)/sizeof(rpc_errlist[0])))
- return (char *)rpc_errlist[errnum];
-
- return ("RPC: (unknown error code)");
-}
-
-void
-clnt_perrno(num)
- enum clnt_stat num;
-{
- (void) fprintf(stderr,"%s\n",clnt_sperrno(num));
-}
-
-
-char *
-clnt_spcreateerror(s)
- char *s;
-{
- char *str = _buf();
-
- if (str == 0)
- return(0);
- switch (rpc_createerr.cf_stat) {
- case RPC_PMAPFAILURE:
- (void) snprintf(str, CLNT_PERROR_BUFLEN, "%s: %s - %s\n", s,
- clnt_sperrno(rpc_createerr.cf_stat),
- clnt_sperrno(rpc_createerr.cf_error.re_status));
- break;
-
- case RPC_SYSTEMERROR:
- (void) snprintf(str, CLNT_PERROR_BUFLEN, "%s: %s - %s\n", s,
- clnt_sperrno(rpc_createerr.cf_stat),
- strerror(rpc_createerr.cf_error.re_errno));
- break;
- default:
- (void) snprintf(str, CLNT_PERROR_BUFLEN, "%s: %s\n", s,
- clnt_sperrno(rpc_createerr.cf_stat));
- break;
- }
- str[CLNT_PERROR_BUFLEN-2] = '\n';
- str[CLNT_PERROR_BUFLEN-1] = '\0';
- return (str);
-}
-
-void
-clnt_pcreateerror(s)
- char *s;
-{
- (void) fprintf(stderr,"%s\n",clnt_spcreateerror(s));
-}
-
-static const char *const auth_errlist[] = {
- "Authentication OK", /* 0 - AUTH_OK */
- "Invalid client credential", /* 1 - AUTH_BADCRED */
- "Server rejected credential", /* 2 - AUTH_REJECTEDCRED */
- "Invalid client verifier", /* 3 - AUTH_BADVERF */
- "Server rejected verifier", /* 4 - AUTH_REJECTEDVERF */
- "Client credential too weak", /* 5 - AUTH_TOOWEAK */
- "Invalid server verifier", /* 6 - AUTH_INVALIDRESP */
- "Failed (unspecified error)" /* 7 - AUTH_FAILED */
-};
-
-static char *
-auth_errmsg(stat)
- enum auth_stat stat;
-{
- unsigned int errnum = stat;
-
- if (errnum < (sizeof(auth_errlist)/sizeof(auth_errlist[0])))
- return (char *)auth_errlist[errnum];
-
- return(NULL);
-}
diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c
deleted file mode 100644
index c715ef69..0000000
--- a/lib/libc/rpc/clnt_raw.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)clnt_raw.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_raw.c,v 1.6 1996/12/30 14:21:36 peter Exp $";
-#endif
-
-/*
- * clnt_raw.c
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * Memory based rpc for simple testing and timing.
- * Interface to create an rpc client and server in the same process.
- * This lets us similate rpc and get round trip overhead, without
- * any interference from the kernal.
- */
-
-#include <rpc/rpc.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#define MCALL_MSG_SIZE 24
-
-/*
- * This is the "network" we will be moving stuff over.
- */
-static struct clntraw_private {
- CLIENT client_object;
- XDR xdr_stream;
- char _raw_buf[UDPMSGSIZE];
- char mashl_callmsg[MCALL_MSG_SIZE];
- u_int mcnt;
-} *clntraw_private;
-
-static enum clnt_stat clntraw_call();
-static void clntraw_abort();
-static void clntraw_geterr();
-static bool_t clntraw_freeres();
-static bool_t clntraw_control();
-static void clntraw_destroy();
-
-static struct clnt_ops client_ops = {
- clntraw_call,
- clntraw_abort,
- clntraw_geterr,
- clntraw_freeres,
- clntraw_destroy,
- clntraw_control
-};
-
-void svc_getreq();
-
-/*
- * Create a client handle for memory based rpc.
- */
-CLIENT *
-clntraw_create(prog, vers)
- u_long prog;
- u_long vers;
-{
- register struct clntraw_private *clp = clntraw_private;
- struct rpc_msg call_msg;
- XDR *xdrs = &clp->xdr_stream;
- CLIENT *client = &clp->client_object;
-
- if (clp == 0) {
- clp = (struct clntraw_private *)calloc(1, sizeof (*clp));
- if (clp == 0)
- return (0);
- clntraw_private = clp;
- }
- /*
- * pre-serialize the static part of the call msg and stash it away
- */
- call_msg.rm_direction = CALL;
- call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
- call_msg.rm_call.cb_prog = prog;
- call_msg.rm_call.cb_vers = vers;
- xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
- if (! xdr_callhdr(xdrs, &call_msg)) {
- perror("clnt_raw.c - Fatal header serialization error.");
- }
- clp->mcnt = XDR_GETPOS(xdrs);
- XDR_DESTROY(xdrs);
-
- /*
- * Set xdrmem for client/server shared buffer
- */
- xdrmem_create(xdrs, clp->_raw_buf, UDPMSGSIZE, XDR_FREE);
-
- /*
- * create client handle
- */
- client->cl_ops = &client_ops;
- client->cl_auth = authnone_create();
- return (client);
-}
-
-static enum clnt_stat
-clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
- CLIENT *h;
- u_long proc;
- xdrproc_t xargs;
- caddr_t argsp;
- xdrproc_t xresults;
- caddr_t resultsp;
- struct timeval timeout;
-{
- register struct clntraw_private *clp = clntraw_private;
- register XDR *xdrs = &clp->xdr_stream;
- struct rpc_msg msg;
- enum clnt_stat status;
- struct rpc_err error;
-
- if (clp == 0)
- return (RPC_FAILED);
-call_again:
- /*
- * send request
- */
- xdrs->x_op = XDR_ENCODE;
- XDR_SETPOS(xdrs, 0);
- ((struct rpc_msg *)clp->mashl_callmsg)->rm_xid ++ ;
- if ((! XDR_PUTBYTES(xdrs, clp->mashl_callmsg, clp->mcnt)) ||
- (! XDR_PUTLONG(xdrs, (long *)&proc)) ||
- (! AUTH_MARSHALL(h->cl_auth, xdrs)) ||
- (! (*xargs)(xdrs, argsp))) {
- return (RPC_CANTENCODEARGS);
- }
- (void)XDR_GETPOS(xdrs); /* called just to cause overhead */
-
- /*
- * We have to call server input routine here because this is
- * all going on in one process. Yuk.
- */
- svc_getreq(1);
-
- /*
- * get results
- */
- xdrs->x_op = XDR_DECODE;
- XDR_SETPOS(xdrs, 0);
- msg.acpted_rply.ar_verf = _null_auth;
- msg.acpted_rply.ar_results.where = resultsp;
- msg.acpted_rply.ar_results.proc = xresults;
- if (! xdr_replymsg(xdrs, &msg))
- return (RPC_CANTDECODERES);
- _seterr_reply(&msg, &error);
- status = error.re_status;
-
- if (status == RPC_SUCCESS) {
- if (! AUTH_VALIDATE(h->cl_auth, &msg.acpted_rply.ar_verf)) {
- status = RPC_AUTHERROR;
- }
- } /* end successful completion */
- else {
- if (AUTH_REFRESH(h->cl_auth))
- goto call_again;
- } /* end of unsuccessful completion */
-
- if (status == RPC_SUCCESS) {
- if (! AUTH_VALIDATE(h->cl_auth, &msg.acpted_rply.ar_verf)) {
- status = RPC_AUTHERROR;
- }
- if (msg.acpted_rply.ar_verf.oa_base != NULL) {
- xdrs->x_op = XDR_FREE;
- (void)xdr_opaque_auth(xdrs, &(msg.acpted_rply.ar_verf));
- }
- }
-
- return (status);
-}
-
-static void
-clntraw_geterr()
-{
-}
-
-
-static bool_t
-clntraw_freeres(cl, xdr_res, res_ptr)
- CLIENT *cl;
- xdrproc_t xdr_res;
- caddr_t res_ptr;
-{
- register struct clntraw_private *clp = clntraw_private;
- register XDR *xdrs = &clp->xdr_stream;
- bool_t rval;
-
- if (clp == 0)
- {
- rval = (bool_t) RPC_FAILED;
- return (rval);
- }
- xdrs->x_op = XDR_FREE;
- return ((*xdr_res)(xdrs, res_ptr));
-}
-
-static void
-clntraw_abort()
-{
-}
-
-static bool_t
-clntraw_control()
-{
- return (FALSE);
-}
-
-static void
-clntraw_destroy()
-{
-}
diff --git a/lib/libc/rpc/clnt_simple.c b/lib/libc/rpc/clnt_simple.c
deleted file mode 100644
index 5bcfd47..0000000
--- a/lib/libc/rpc/clnt_simple.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)clnt_simple.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_simple.c,v 1.6 1996/12/30 14:23:50 peter Exp $";
-#endif
-
-/*
- * clnt_simple.c
- * Simplified front end to rpc.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <sys/param.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <netdb.h>
-
-static struct callrpc_private {
- CLIENT *client;
- int socket;
- int oldprognum, oldversnum, valid;
- char *oldhost;
-} *callrpc_private;
-
-int
-callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
- char *host;
- int prognum, versnum, procnum;
- xdrproc_t inproc, outproc;
- char *in, *out;
-{
- register struct callrpc_private *crp = callrpc_private;
- struct sockaddr_in server_addr;
- enum clnt_stat clnt_stat;
- struct hostent *hp;
- struct timeval timeout, tottimeout;
-
- if (crp == 0) {
- crp = (struct callrpc_private *)calloc(1, sizeof (*crp));
- if (crp == 0)
- return (0);
- callrpc_private = crp;
- }
- if (crp->oldhost == NULL) {
- crp->oldhost = malloc(MAXHOSTNAMELEN);
- crp->oldhost[0] = 0;
- crp->socket = RPC_ANYSOCK;
- }
- if (crp->valid && crp->oldprognum == prognum && crp->oldversnum == versnum
- && strcmp(crp->oldhost, host) == 0) {
- /* reuse old client */
- } else {
- crp->valid = 0;
- if (crp->socket != -1)
- (void)close(crp->socket);
- crp->socket = RPC_ANYSOCK;
- if (crp->client) {
- clnt_destroy(crp->client);
- crp->client = NULL;
- }
- if ((hp = gethostbyname(host)) == NULL)
- return ((int) RPC_UNKNOWNHOST);
- timeout.tv_usec = 0;
- timeout.tv_sec = 5;
- memset(&server_addr, 0, sizeof(server_addr));
- memcpy((char *)&server_addr.sin_addr, hp->h_addr, hp->h_length);
- server_addr.sin_len = sizeof(struct sockaddr_in);
- server_addr.sin_family = AF_INET;
- server_addr.sin_port = 0;
- if ((crp->client = clntudp_create(&server_addr, (u_long)prognum,
- (u_long)versnum, timeout, &crp->socket)) == NULL)
- return ((int) rpc_createerr.cf_stat);
- crp->valid = 1;
- crp->oldprognum = prognum;
- crp->oldversnum = versnum;
- (void) strcpy(crp->oldhost, host);
- }
- tottimeout.tv_sec = 25;
- tottimeout.tv_usec = 0;
- clnt_stat = clnt_call(crp->client, procnum, inproc, in,
- outproc, out, tottimeout);
- /*
- * if call failed, empty cache
- */
- if (clnt_stat != RPC_SUCCESS)
- crp->valid = 0;
- return ((int) clnt_stat);
-}
diff --git a/lib/libc/rpc/clnt_tcp.c b/lib/libc/rpc/clnt_tcp.c
deleted file mode 100644
index cfb3746..0000000
--- a/lib/libc/rpc/clnt_tcp.c
+++ /dev/null
@@ -1,580 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)clnt_tcp.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_tcp.c,v 1.7 1996/12/30 14:36:17 peter Exp $";
-#endif
-
-/*
- * clnt_tcp.c, Implements a TCP/IP based, client side RPC.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * TCP based RPC supports 'batched calls'.
- * A sequence of calls may be batched-up in a send buffer. The rpc call
- * return immediately to the client even though the call was not necessarily
- * sent. The batching occurs if the results' xdr routine is NULL (0) AND
- * the rpc timeout value is zero (see clnt.h, rpc).
- *
- * Clients should NOT casually batch calls that in fact return results; that is,
- * the server side should be aware that a call is batched and not produce any
- * return message. Batched calls that produce many result messages can
- * deadlock (netlock) the client and the server....
- *
- * Now go hang yourself.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <errno.h>
-#include <rpc/pmap_clnt.h>
-
-#define MCALL_MSG_SIZE 24
-
-static int readtcp();
-static int writetcp();
-
-static enum clnt_stat clnttcp_call();
-static void clnttcp_abort();
-static void clnttcp_geterr();
-static bool_t clnttcp_freeres();
-static bool_t clnttcp_control();
-static void clnttcp_destroy();
-
-static struct clnt_ops tcp_ops = {
- clnttcp_call,
- clnttcp_abort,
- clnttcp_geterr,
- clnttcp_freeres,
- clnttcp_destroy,
- clnttcp_control
-};
-
-struct ct_data {
- int ct_sock;
- bool_t ct_closeit;
- struct timeval ct_wait;
- bool_t ct_waitset; /* wait set by clnt_control? */
- struct sockaddr_in ct_addr;
- struct rpc_err ct_error;
- char ct_mcall[MCALL_MSG_SIZE]; /* marshalled callmsg */
- u_int ct_mpos; /* pos after marshal */
- XDR ct_xdrs;
-};
-
-/*
- * Create a client handle for a tcp/ip connection.
- * If *sockp<0, *sockp is set to a newly created TCP socket and it is
- * connected to raddr. If *sockp non-negative then
- * raddr is ignored. The rpc/tcp package does buffering
- * similar to stdio, so the client must pick send and receive buffer sizes,];
- * 0 => use the default.
- * If raddr->sin_port is 0, then a binder on the remote machine is
- * consulted for the right port number.
- * NB: *sockp is copied into a private area.
- * NB: It is the clients responsibility to close *sockp.
- * NB: The rpch->cl_auth is set null authentication. Caller may wish to set this
- * something more useful.
- */
-CLIENT *
-clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
- struct sockaddr_in *raddr;
- u_long prog;
- u_long vers;
- register int *sockp;
- u_int sendsz;
- u_int recvsz;
-{
- CLIENT *h;
- register struct ct_data *ct = NULL;
- struct timeval now;
- struct rpc_msg call_msg;
- static u_int32_t disrupt;
-
- if (disrupt == 0)
- disrupt = (u_int32_t)(long)raddr;
-
- h = (CLIENT *)mem_alloc(sizeof(*h));
- if (h == NULL) {
- (void)fprintf(stderr, "clnttcp_create: out of memory\n");
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = errno;
- goto fooy;
- }
- ct = (struct ct_data *)mem_alloc(sizeof(*ct));
- if (ct == NULL) {
- (void)fprintf(stderr, "clnttcp_create: out of memory\n");
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = errno;
- goto fooy;
- }
-
- /*
- * If no port number given ask the pmap for one
- */
- if (raddr->sin_port == 0) {
- u_short port;
- if ((port = pmap_getport(raddr, prog, vers, IPPROTO_TCP)) == 0) {
- mem_free((caddr_t)ct, sizeof(struct ct_data));
- mem_free((caddr_t)h, sizeof(CLIENT));
- return ((CLIENT *)NULL);
- }
- raddr->sin_port = htons(port);
- }
-
- /*
- * If no socket given, open one
- */
- if (*sockp < 0) {
- *sockp = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
- (void)bindresvport(*sockp, (struct sockaddr_in *)0);
- if ((*sockp < 0)
- || (connect(*sockp, (struct sockaddr *)raddr,
- sizeof(*raddr)) < 0)) {
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = errno;
- if (*sockp != -1)
- (void)close(*sockp);
- goto fooy;
- }
- ct->ct_closeit = TRUE;
- } else {
- ct->ct_closeit = FALSE;
- }
-
- /*
- * Set up private data struct
- */
- ct->ct_sock = *sockp;
- ct->ct_wait.tv_usec = 0;
- ct->ct_waitset = FALSE;
- ct->ct_addr = *raddr;
-
- /*
- * Initialize call message
- */
- (void)gettimeofday(&now, (struct timezone *)0);
- call_msg.rm_xid = (++disrupt) ^ getpid() ^ now.tv_sec ^ now.tv_usec;
- call_msg.rm_direction = CALL;
- call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
- call_msg.rm_call.cb_prog = prog;
- call_msg.rm_call.cb_vers = vers;
-
- /*
- * pre-serialize the static part of the call msg and stash it away
- */
- xdrmem_create(&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE,
- XDR_ENCODE);
- if (! xdr_callhdr(&(ct->ct_xdrs), &call_msg)) {
- if (ct->ct_closeit) {
- (void)close(*sockp);
- }
- goto fooy;
- }
- ct->ct_mpos = XDR_GETPOS(&(ct->ct_xdrs));
- XDR_DESTROY(&(ct->ct_xdrs));
-
- /*
- * Create a client handle which uses xdrrec for serialization
- * and authnone for authentication.
- */
- xdrrec_create(&(ct->ct_xdrs), sendsz, recvsz,
- (caddr_t)ct, readtcp, writetcp);
- h->cl_ops = &tcp_ops;
- h->cl_private = (caddr_t) ct;
- h->cl_auth = authnone_create();
- return (h);
-
-fooy:
- /*
- * Something goofed, free stuff and barf
- */
- if (ct)
- mem_free((caddr_t)ct, sizeof(struct ct_data));
- if (h)
- mem_free((caddr_t)h, sizeof(CLIENT));
- return ((CLIENT *)NULL);
-}
-
-static enum clnt_stat
-clnttcp_call(h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
- register CLIENT *h;
- u_long proc;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
- xdrproc_t xdr_results;
- caddr_t results_ptr;
- struct timeval timeout;
-{
- register struct ct_data *ct = (struct ct_data *) h->cl_private;
- register XDR *xdrs = &(ct->ct_xdrs);
- struct rpc_msg reply_msg;
- u_long x_id;
- u_int32_t *msg_x_id = (u_int32_t *)(ct->ct_mcall); /* yuk */
- register bool_t shipnow;
- int refreshes = 2;
-
- if (!ct->ct_waitset) {
- ct->ct_wait = timeout;
- }
-
- shipnow =
- (xdr_results == (xdrproc_t)0 && timeout.tv_sec == 0
- && timeout.tv_usec == 0) ? FALSE : TRUE;
-
-call_again:
- xdrs->x_op = XDR_ENCODE;
- ct->ct_error.re_status = RPC_SUCCESS;
- x_id = ntohl(--(*msg_x_id));
- if ((! XDR_PUTBYTES(xdrs, ct->ct_mcall, ct->ct_mpos)) ||
- (! XDR_PUTLONG(xdrs, (long *)&proc)) ||
- (! AUTH_MARSHALL(h->cl_auth, xdrs)) ||
- (! (*xdr_args)(xdrs, args_ptr))) {
- if (ct->ct_error.re_status == RPC_SUCCESS)
- ct->ct_error.re_status = RPC_CANTENCODEARGS;
- (void)xdrrec_endofrecord(xdrs, TRUE);
- return (ct->ct_error.re_status);
- }
- if (! xdrrec_endofrecord(xdrs, shipnow))
- return (ct->ct_error.re_status = RPC_CANTSEND);
- if (! shipnow)
- return (RPC_SUCCESS);
- /*
- * Hack to provide rpc-based message passing
- */
- if (timeout.tv_sec == 0 && timeout.tv_usec == 0) {
- return(ct->ct_error.re_status = RPC_TIMEDOUT);
- }
-
-
- /*
- * Keep receiving until we get a valid transaction id
- */
- xdrs->x_op = XDR_DECODE;
- while (TRUE) {
- reply_msg.acpted_rply.ar_verf = _null_auth;
- reply_msg.acpted_rply.ar_results.where = NULL;
- reply_msg.acpted_rply.ar_results.proc = xdr_void;
- if (! xdrrec_skiprecord(xdrs))
- return (ct->ct_error.re_status);
- /* now decode and validate the response header */
- if (! xdr_replymsg(xdrs, &reply_msg)) {
- if (ct->ct_error.re_status == RPC_SUCCESS)
- continue;
- return (ct->ct_error.re_status);
- }
- if (reply_msg.rm_xid == x_id)
- break;
- }
-
- /*
- * process header
- */
- _seterr_reply(&reply_msg, &(ct->ct_error));
- if (ct->ct_error.re_status == RPC_SUCCESS) {
- if (! AUTH_VALIDATE(h->cl_auth, &reply_msg.acpted_rply.ar_verf)) {
- ct->ct_error.re_status = RPC_AUTHERROR;
- ct->ct_error.re_why = AUTH_INVALIDRESP;
- } else if (! (*xdr_results)(xdrs, results_ptr)) {
- if (ct->ct_error.re_status == RPC_SUCCESS)
- ct->ct_error.re_status = RPC_CANTDECODERES;
- }
- /* free verifier ... */
- if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) {
- xdrs->x_op = XDR_FREE;
- (void)xdr_opaque_auth(xdrs, &(reply_msg.acpted_rply.ar_verf));
- }
- } /* end successful completion */
- else {
- /* maybe our credentials need to be refreshed ... */
- if (refreshes-- && AUTH_REFRESH(h->cl_auth))
- goto call_again;
- } /* end of unsuccessful completion */
- return (ct->ct_error.re_status);
-}
-
-static void
-clnttcp_geterr(h, errp)
- CLIENT *h;
- struct rpc_err *errp;
-{
- register struct ct_data *ct =
- (struct ct_data *) h->cl_private;
-
- *errp = ct->ct_error;
-}
-
-static bool_t
-clnttcp_freeres(cl, xdr_res, res_ptr)
- CLIENT *cl;
- xdrproc_t xdr_res;
- caddr_t res_ptr;
-{
- register struct ct_data *ct = (struct ct_data *)cl->cl_private;
- register XDR *xdrs = &(ct->ct_xdrs);
-
- xdrs->x_op = XDR_FREE;
- return ((*xdr_res)(xdrs, res_ptr));
-}
-
-static void
-clnttcp_abort()
-{
-}
-
-
-static bool_t
-clnttcp_control(cl, request, info)
- CLIENT *cl;
- int request;
- char *info;
-{
- register struct ct_data *ct = (struct ct_data *)cl->cl_private;
- register struct timeval *tv;
- int len;
-
- switch (request) {
- case CLSET_FD_CLOSE:
- ct->ct_closeit = TRUE;
- break;
- case CLSET_FD_NCLOSE:
- ct->ct_closeit = FALSE;
- break;
- case CLSET_TIMEOUT:
- if (info == NULL)
- return(FALSE);
- tv = (struct timeval *)info;
- ct->ct_wait.tv_sec = tv->tv_sec;
- ct->ct_wait.tv_usec = tv->tv_usec;
- ct->ct_waitset = TRUE;
- break;
- case CLGET_TIMEOUT:
- if (info == NULL)
- return(FALSE);
- *(struct timeval *)info = ct->ct_wait;
- break;
- case CLGET_SERVER_ADDR:
- if (info == NULL)
- return(FALSE);
- *(struct sockaddr_in *)info = ct->ct_addr;
- break;
- case CLGET_FD:
- if (info == NULL)
- return(FALSE);
- *(int *)info = ct->ct_sock;
- break;
- case CLGET_XID:
- /*
- * use the knowledge that xid is the
- * first element in the call structure *.
- * This will get the xid of the PREVIOUS call
- */
- if (info == NULL)
- return(FALSE);
- *(u_long *)info = ntohl(*(u_long *)ct->ct_mcall);
- break;
- case CLSET_XID:
- /* This will set the xid of the NEXT call */
- if (info == NULL)
- return(FALSE);
- *(u_long *)ct->ct_mcall = htonl(*(u_long *)info - 1);
- /* decrement by 1 as clnttcp_call() increments once */
- case CLGET_VERS:
- /*
- * This RELIES on the information that, in the call body,
- * the version number field is the fifth field from the
- * begining of the RPC header. MUST be changed if the
- * call_struct is changed
- */
- if (info == NULL)
- return(FALSE);
- *(u_long *)info = ntohl(*(u_long *)(ct->ct_mcall +
- 4 * BYTES_PER_XDR_UNIT));
- break;
- case CLSET_VERS:
- if (info == NULL)
- return(FALSE);
- *(u_long *)(ct->ct_mcall + 4 * BYTES_PER_XDR_UNIT)
- = htonl(*(u_long *)info);
- break;
- case CLGET_PROG:
- /*
- * This RELIES on the information that, in the call body,
- * the program number field is the field from the
- * begining of the RPC header. MUST be changed if the
- * call_struct is changed
- */
- if (info == NULL)
- return(FALSE);
- *(u_long *)info = ntohl(*(u_long *)(ct->ct_mcall +
- 3 * BYTES_PER_XDR_UNIT));
- break;
- case CLSET_PROG:
- if (info == NULL)
- return(FALSE);
- *(u_long *)(ct->ct_mcall + 3 * BYTES_PER_XDR_UNIT)
- = htonl(*(u_long *)info);
- break;
- case CLGET_LOCAL_ADDR:
- len = sizeof(struct sockaddr);
- if (getsockname(ct->ct_sock, (struct sockaddr *)info, &len) <0)
- return(FALSE);
- break;
- case CLGET_RETRY_TIMEOUT:
- case CLSET_RETRY_TIMEOUT:
- case CLGET_SVC_ADDR:
- case CLSET_SVC_ADDR:
- case CLSET_PUSH_TIMOD:
- case CLSET_POP_TIMOD:
- default:
- return (FALSE);
- }
- return (TRUE);
-}
-
-
-static void
-clnttcp_destroy(h)
- CLIENT *h;
-{
- register struct ct_data *ct =
- (struct ct_data *) h->cl_private;
-
- if (ct->ct_closeit) {
- (void)close(ct->ct_sock);
- }
- XDR_DESTROY(&(ct->ct_xdrs));
- mem_free((caddr_t)ct, sizeof(struct ct_data));
- mem_free((caddr_t)h, sizeof(CLIENT));
-}
-
-/*
- * Interface between xdr serializer and tcp connection.
- * Behaves like the system calls, read & write, but keeps some error state
- * around for the rpc level.
- */
-static int
-readtcp(ct, buf, len)
- register struct ct_data *ct;
- caddr_t buf;
- register int len;
-{
- fd_set *fds, readfds;
- struct timeval start, after, duration, delta, tmp, tv;
- int r, save_errno;
-
- if (len == 0)
- return (0);
-
- if (ct->ct_sock + 1 > FD_SETSIZE) {
- int bytes = howmany(ct->ct_sock + 1, NFDBITS) * sizeof(fd_mask);
- fds = (fd_set *)malloc(bytes);
- if (fds == NULL)
- return (-1);
- memset(fds, 0, bytes);
- } else {
- fds = &readfds;
- FD_ZERO(fds);
- }
-
- gettimeofday(&start, NULL);
- delta = ct->ct_wait;
- while (TRUE) {
- /* XXX we know the other bits are still clear */
- FD_SET(ct->ct_sock, fds);
- tv = delta; /* in case select writes back */
- r = select(ct->ct_sock+1, fds, NULL, NULL, &tv);
- save_errno = errno;
-
- gettimeofday(&after, NULL);
- timersub(&start, &after, &duration);
- timersub(&delta, &duration, &tmp);
- delta = tmp;
- if (delta.tv_sec < 0 || !timerisset(&delta))
- r = 0;
-
- switch (r) {
- case 0:
- if (fds != &readfds)
- free(fds);
- ct->ct_error.re_status = RPC_TIMEDOUT;
- return (-1);
-
- case -1:
- if (errno == EINTR)
- continue;
- if (fds != &readfds)
- free(fds);
- ct->ct_error.re_status = RPC_CANTRECV;
- ct->ct_error.re_errno = save_errno;
- return (-1);
- }
- break;
- }
- switch (len = read(ct->ct_sock, buf, len)) {
-
- case 0:
- /* premature eof */
- ct->ct_error.re_errno = ECONNRESET;
- ct->ct_error.re_status = RPC_CANTRECV;
- len = -1; /* it's really an error */
- break;
-
- case -1:
- ct->ct_error.re_errno = errno;
- ct->ct_error.re_status = RPC_CANTRECV;
- break;
- }
- return (len);
-}
-
-static int
-writetcp(ct, buf, len)
- struct ct_data *ct;
- caddr_t buf;
- int len;
-{
- register int i, cnt;
-
- for (cnt = len; cnt > 0; cnt -= i, buf += i) {
- if ((i = write(ct->ct_sock, buf, cnt)) == -1) {
- ct->ct_error.re_errno = errno;
- ct->ct_error.re_status = RPC_CANTSEND;
- return (-1);
- }
- }
- return (len);
-}
diff --git a/lib/libc/rpc/clnt_udp.c b/lib/libc/rpc/clnt_udp.c
deleted file mode 100644
index 3532849..0000000
--- a/lib/libc/rpc/clnt_udp.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)clnt_udp.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_udp.c,v 1.8 1996/12/30 14:40:34 peter Exp $";
-#endif
-
-/*
- * clnt_udp.c, Implements a UDP/IP based, client side RPC.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netdb.h>
-#include <errno.h>
-#include <rpc/pmap_clnt.h>
-
-/*
- * UDP bases client side rpc operations
- */
-static enum clnt_stat clntudp_call();
-static void clntudp_abort();
-static void clntudp_geterr();
-static bool_t clntudp_freeres();
-static bool_t clntudp_control();
-static void clntudp_destroy();
-
-static struct clnt_ops udp_ops = {
- clntudp_call,
- clntudp_abort,
- clntudp_geterr,
- clntudp_freeres,
- clntudp_destroy,
- clntudp_control
-};
-
-/*
- * Private data kept per client handle
- */
-struct cu_data {
- int cu_sock;
- bool_t cu_closeit;
- struct sockaddr_in cu_raddr;
- int cu_rlen;
- struct timeval cu_wait;
- struct timeval cu_total;
- struct rpc_err cu_error;
- XDR cu_outxdrs;
- u_int cu_xdrpos;
- u_int cu_sendsz;
- char *cu_outbuf;
- u_int cu_recvsz;
- char cu_inbuf[1];
-};
-
-/*
- * Create a UDP based client handle.
- * If *sockp<0, *sockp is set to a newly created UPD socket.
- * If raddr->sin_port is 0 a binder on the remote machine
- * is consulted for the correct port number.
- * NB: It is the clients responsibility to close *sockp.
- * NB: The rpch->cl_auth is initialized to null authentication.
- * Caller may wish to set this something more useful.
- *
- * wait is the amount of time used between retransmitting a call if
- * no response has been heard; retransmition occurs until the actual
- * rpc call times out.
- *
- * sendsz and recvsz are the maximum allowable packet sizes that can be
- * sent and received.
- */
-CLIENT *
-clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
- struct sockaddr_in *raddr;
- u_long program;
- u_long version;
- struct timeval wait;
- register int *sockp;
- u_int sendsz;
- u_int recvsz;
-{
- CLIENT *cl;
- register struct cu_data *cu = NULL;
- struct timeval now;
- struct rpc_msg call_msg;
- static u_int32_t disrupt;
-
- if (disrupt == 0)
- disrupt = (u_int32_t)(long)raddr;
-
- cl = (CLIENT *)mem_alloc(sizeof(CLIENT));
- if (cl == NULL) {
- (void) fprintf(stderr, "clntudp_create: out of memory\n");
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = errno;
- goto fooy;
- }
- sendsz = ((sendsz + 3) / 4) * 4;
- recvsz = ((recvsz + 3) / 4) * 4;
- cu = (struct cu_data *)mem_alloc(sizeof(*cu) + sendsz + recvsz);
- if (cu == NULL) {
- (void) fprintf(stderr, "clntudp_create: out of memory\n");
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = errno;
- goto fooy;
- }
- cu->cu_outbuf = &cu->cu_inbuf[recvsz];
-
- (void)gettimeofday(&now, (struct timezone *)0);
- if (raddr->sin_port == 0) {
- u_short port;
- if ((port =
- pmap_getport(raddr, program, version, IPPROTO_UDP)) == 0) {
- goto fooy;
- }
- raddr->sin_port = htons(port);
- }
- cl->cl_ops = &udp_ops;
- cl->cl_private = (caddr_t)cu;
- cu->cu_raddr = *raddr;
- cu->cu_rlen = sizeof (cu->cu_raddr);
- cu->cu_wait = wait;
- cu->cu_total.tv_sec = -1;
- cu->cu_total.tv_usec = -1;
- cu->cu_sendsz = sendsz;
- cu->cu_recvsz = recvsz;
- call_msg.rm_xid = (++disrupt) ^ getpid() ^ now.tv_sec ^ now.tv_usec;
- call_msg.rm_direction = CALL;
- call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
- call_msg.rm_call.cb_prog = program;
- call_msg.rm_call.cb_vers = version;
- xdrmem_create(&(cu->cu_outxdrs), cu->cu_outbuf,
- sendsz, XDR_ENCODE);
- if (! xdr_callhdr(&(cu->cu_outxdrs), &call_msg)) {
- goto fooy;
- }
- cu->cu_xdrpos = XDR_GETPOS(&(cu->cu_outxdrs));
- if (*sockp < 0) {
- int dontblock = 1;
-
- *sockp = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- if (*sockp < 0) {
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = errno;
- goto fooy;
- }
- /* attempt to bind to priv port */
- (void)bindresvport(*sockp, (struct sockaddr_in *)0);
- /* the sockets rpc controls are non-blocking */
- (void)ioctl(*sockp, FIONBIO, (char *) &dontblock);
- cu->cu_closeit = TRUE;
- } else {
- cu->cu_closeit = FALSE;
- }
- cu->cu_sock = *sockp;
- cl->cl_auth = authnone_create();
- return (cl);
-fooy:
- if (cu)
- mem_free((caddr_t)cu, sizeof(*cu) + sendsz + recvsz);
- if (cl)
- mem_free((caddr_t)cl, sizeof(CLIENT));
- return ((CLIENT *)NULL);
-}
-
-CLIENT *
-clntudp_create(raddr, program, version, wait, sockp)
- struct sockaddr_in *raddr;
- u_long program;
- u_long version;
- struct timeval wait;
- register int *sockp;
-{
-
- return(clntudp_bufcreate(raddr, program, version, wait, sockp,
- UDPMSGSIZE, UDPMSGSIZE));
-}
-
-static enum clnt_stat
-clntudp_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
- register CLIENT *cl; /* client handle */
- u_long proc; /* procedure number */
- xdrproc_t xargs; /* xdr routine for args */
- caddr_t argsp; /* pointer to args */
- xdrproc_t xresults; /* xdr routine for results */
- caddr_t resultsp; /* pointer to results */
- struct timeval utimeout; /* seconds to wait before giving up */
-{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
- register XDR *xdrs;
- register int outlen;
- register int inlen;
- int fromlen;
- fd_set *fds, readfds;
- struct sockaddr_in from;
- struct rpc_msg reply_msg;
- XDR reply_xdrs;
- struct timeval time_waited, start, after, tmp1, tmp2, tv;
- bool_t ok;
- int nrefreshes = 2; /* number of times to refresh cred */
- struct timeval timeout;
-
- if (cu->cu_total.tv_usec == -1)
- timeout = utimeout; /* use supplied timeout */
- else
- timeout = cu->cu_total; /* use default timeout */
-
- if (cu->cu_sock + 1 > FD_SETSIZE) {
- int bytes = howmany(cu->cu_sock + 1, NFDBITS) * sizeof(fd_mask);
- fds = (fd_set *)malloc(bytes);
- if (fds == NULL)
- return (cu->cu_error.re_status = RPC_CANTSEND);
- memset(fds, 0, bytes);
- } else {
- fds = &readfds;
- FD_ZERO(fds);
- }
-
- timerclear(&time_waited);
-
-call_again:
- xdrs = &(cu->cu_outxdrs);
- xdrs->x_op = XDR_ENCODE;
- XDR_SETPOS(xdrs, cu->cu_xdrpos);
- /*
- * the transaction is the first thing in the out buffer
- */
- (*(u_short *)(cu->cu_outbuf))++;
- if ((! XDR_PUTLONG(xdrs, (long *)&proc)) ||
- (! AUTH_MARSHALL(cl->cl_auth, xdrs)) ||
- (! (*xargs)(xdrs, argsp))) {
- if (fds != &readfds)
- free(fds);
- return (cu->cu_error.re_status = RPC_CANTENCODEARGS);
- }
- outlen = (int)XDR_GETPOS(xdrs);
-
-send_again:
- if (sendto(cu->cu_sock, cu->cu_outbuf, outlen, 0,
- (struct sockaddr *)&(cu->cu_raddr), cu->cu_rlen) != outlen) {
- cu->cu_error.re_errno = errno;
- if (fds != &readfds)
- free(fds);
- return (cu->cu_error.re_status = RPC_CANTSEND);
- }
-
- /*
- * Hack to provide rpc-based message passing
- */
- if (!timerisset(&timeout)) {
- if (fds != &readfds)
- free(fds);
- return (cu->cu_error.re_status = RPC_TIMEDOUT);
- }
- /*
- * sub-optimal code appears here because we have
- * some clock time to spare while the packets are in flight.
- * (We assume that this is actually only executed once.)
- */
- reply_msg.acpted_rply.ar_verf = _null_auth;
- reply_msg.acpted_rply.ar_results.where = resultsp;
- reply_msg.acpted_rply.ar_results.proc = xresults;
-
- gettimeofday(&start, NULL);
- for (;;) {
- /* XXX we know the other bits are still clear */
- FD_SET(cu->cu_sock, fds);
- tv = cu->cu_wait;
- switch (select(cu->cu_sock+1, fds, NULL, NULL, &tv)) {
-
- case 0:
- timeradd(&time_waited, &cu->cu_wait, &tmp1);
- time_waited = tmp1;
- if (timercmp(&time_waited, &timeout, <))
- goto send_again;
- if (fds != &readfds)
- free(fds);
- return (cu->cu_error.re_status = RPC_TIMEDOUT);
-
- case -1:
- if (errno == EINTR) {
- gettimeofday(&after, NULL);
- timersub(&after, &start, &tmp1);
- timeradd(&time_waited, &tmp1, &tmp2);
- time_waited = tmp2;
- if (timercmp(&time_waited, &timeout, <))
- continue;
- if (fds != &readfds)
- free(fds);
- return (cu->cu_error.re_status = RPC_TIMEDOUT);
- }
- cu->cu_error.re_errno = errno;
- if (fds != &readfds)
- free(fds);
- return (cu->cu_error.re_status = RPC_CANTRECV);
- }
-
- do {
- fromlen = sizeof(struct sockaddr);
- inlen = recvfrom(cu->cu_sock, cu->cu_inbuf,
- (int) cu->cu_recvsz, 0,
- (struct sockaddr *)&from, &fromlen);
- } while (inlen < 0 && errno == EINTR);
- if (inlen < 0) {
- if (errno == EWOULDBLOCK)
- continue;
- cu->cu_error.re_errno = errno;
- if (fds != &readfds)
- free(fds);
- return (cu->cu_error.re_status = RPC_CANTRECV);
- }
- if (inlen < sizeof(u_int32_t))
- continue;
- /* see if reply transaction id matches sent id */
- if (*((u_int32_t *)(cu->cu_inbuf)) != *((u_int32_t *)(cu->cu_outbuf)))
- continue;
- /* we now assume we have the proper reply */
- break;
- }
-
- /*
- * now decode and validate the response
- */
- xdrmem_create(&reply_xdrs, cu->cu_inbuf, (u_int)inlen, XDR_DECODE);
- ok = xdr_replymsg(&reply_xdrs, &reply_msg);
- /* XDR_DESTROY(&reply_xdrs); save a few cycles on noop destroy */
- if (ok) {
- _seterr_reply(&reply_msg, &(cu->cu_error));
- if (cu->cu_error.re_status == RPC_SUCCESS) {
- if (! AUTH_VALIDATE(cl->cl_auth,
- &reply_msg.acpted_rply.ar_verf)) {
- cu->cu_error.re_status = RPC_AUTHERROR;
- cu->cu_error.re_why = AUTH_INVALIDRESP;
- }
- if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) {
- xdrs->x_op = XDR_FREE;
- (void)xdr_opaque_auth(xdrs,
- &(reply_msg.acpted_rply.ar_verf));
- }
- } /* end successful completion */
- else {
- /* maybe our credentials need to be refreshed ... */
- if (nrefreshes > 0 && AUTH_REFRESH(cl->cl_auth)) {
- nrefreshes--;
- goto call_again;
- }
- } /* end of unsuccessful completion */
- } /* end of valid reply message */
- else {
- /*
- * It's possible for xdr_replymsg() to fail partway
- * through its attempt to decode the result from the
- * server. If this happens, it will leave the reply
- * structure partially populated with dynamically
- * allocated memory. (This can happen if someone uses
- * clntudp_bufcreate() to create a CLIENT handle and
- * specifies a receive buffer size that is too small.)
- * This memory must be free()ed to avoid a leak.
- */
- int op = reply_xdrs.x_op;
- reply_xdrs.x_op = XDR_FREE;
- xdr_replymsg(&reply_xdrs, &reply_msg);
- reply_xdrs.x_op = op;
- cu->cu_error.re_status = RPC_CANTDECODERES;
- }
- if (fds != &readfds)
- free(fds);
- return (cu->cu_error.re_status);
-}
-
-static void
-clntudp_geterr(cl, errp)
- CLIENT *cl;
- struct rpc_err *errp;
-{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
-
- *errp = cu->cu_error;
-}
-
-
-static bool_t
-clntudp_freeres(cl, xdr_res, res_ptr)
- CLIENT *cl;
- xdrproc_t xdr_res;
- caddr_t res_ptr;
-{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
- register XDR *xdrs = &(cu->cu_outxdrs);
-
- xdrs->x_op = XDR_FREE;
- return ((*xdr_res)(xdrs, res_ptr));
-}
-
-static void
-clntudp_abort(/*h*/)
- /*CLIENT *h;*/
-{
-}
-
-
-static bool_t
-clntudp_control(cl, request, info)
- CLIENT *cl;
- int request;
- char *info;
-{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
- register struct timeval *tv;
- int len;
-
- switch (request) {
- case CLSET_FD_CLOSE:
- cu->cu_closeit = TRUE;
- break;
- case CLSET_FD_NCLOSE:
- cu->cu_closeit = FALSE;
- break;
- case CLSET_TIMEOUT:
- if (info == NULL)
- return(FALSE);
- tv = (struct timeval *)info;
- cu->cu_total.tv_sec = tv->tv_sec;
- cu->cu_total.tv_usec = tv->tv_usec;
- break;
- case CLGET_TIMEOUT:
- if (info == NULL)
- return(FALSE);
- *(struct timeval *)info = cu->cu_total;
- break;
- case CLSET_RETRY_TIMEOUT:
- if (info == NULL)
- return(FALSE);
- tv = (struct timeval *)info;
- cu->cu_wait.tv_sec = tv->tv_sec;
- cu->cu_wait.tv_usec = tv->tv_usec;
- break;
- case CLGET_RETRY_TIMEOUT:
- if (info == NULL)
- return(FALSE);
- *(struct timeval *)info = cu->cu_wait;
- break;
- case CLGET_SERVER_ADDR:
- if (info == NULL)
- return(FALSE);
- *(struct sockaddr_in *)info = cu->cu_raddr;
- break;
- case CLGET_FD:
- if (info == NULL)
- return(FALSE);
- *(int *)info = cu->cu_sock;
- break;
- case CLGET_XID:
- /*
- * use the knowledge that xid is the
- * first element in the call structure *.
- * This will get the xid of the PREVIOUS call
- */
- if (info == NULL)
- return(FALSE);
- *(u_long *)info = ntohl(*(u_long *)cu->cu_outbuf);
- break;
- case CLSET_XID:
- /* This will set the xid of the NEXT call */
- if (info == NULL)
- return(FALSE);
- *(u_long *)cu->cu_outbuf = htonl(*(u_long *)info - 1);
- /* decrement by 1 as clntudp_call() increments once */
- case CLGET_VERS:
- /*
- * This RELIES on the information that, in the call body,
- * the version number field is the fifth field from the
- * begining of the RPC header. MUST be changed if the
- * call_struct is changed
- */
- if (info == NULL)
- return(FALSE);
- *(u_long *)info = ntohl(*(u_long *)(cu->cu_outbuf +
- 4 * BYTES_PER_XDR_UNIT));
- break;
- case CLSET_VERS:
- if (info == NULL)
- return(FALSE);
- *(u_long *)(cu->cu_outbuf + 4 * BYTES_PER_XDR_UNIT)
- = htonl(*(u_long *)info);
- break;
- case CLGET_PROG:
- /*
- * This RELIES on the information that, in the call body,
- * the program number field is the field from the
- * begining of the RPC header. MUST be changed if the
- * call_struct is changed
- */
- if (info == NULL)
- return(FALSE);
- *(u_long *)info = ntohl(*(u_long *)(cu->cu_outbuf +
- 3 * BYTES_PER_XDR_UNIT));
- break;
- case CLSET_PROG:
- if (info == NULL)
- return(FALSE);
- *(u_long *)(cu->cu_outbuf + 3 * BYTES_PER_XDR_UNIT)
- = htonl(*(u_long *)info);
- break;
- case CLGET_LOCAL_ADDR:
- len = sizeof(struct sockaddr);
- if (getsockname(cu->cu_sock, (struct sockaddr *)info, &len) <0)
- return(FALSE);
- break;
- case CLGET_SVC_ADDR:
- case CLSET_SVC_ADDR:
- case CLSET_PUSH_TIMOD:
- case CLSET_POP_TIMOD:
- default:
- return (FALSE);
- }
- return (TRUE);
-}
-
-static void
-clntudp_destroy(cl)
- CLIENT *cl;
-{
- register struct cu_data *cu = (struct cu_data *)cl->cl_private;
-
- if (cu->cu_closeit) {
- (void)close(cu->cu_sock);
- }
- XDR_DESTROY(&(cu->cu_outxdrs));
- mem_free((caddr_t)cu, (sizeof(*cu) + cu->cu_sendsz + cu->cu_recvsz));
- mem_free((caddr_t)cl, sizeof(CLIENT));
-}
diff --git a/lib/libc/rpc/clnt_unix.c b/lib/libc/rpc/clnt_unix.c
deleted file mode 100644
index e4c4309..0000000
--- a/lib/libc/rpc/clnt_unix.c
+++ /dev/null
@@ -1,635 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)clnt_unix.c 1.37 87/10/05 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)clnt_unix.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: clnt_unix.c,v 1.7 1996/12/30 14:36:17 peter Exp $";
-#endif
-
-/*
- * clnt_unix.c, Implements a AF_UNIX based, client side RPC.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * AF_UNIX based RPC supports 'batched calls'.
- * A sequence of calls may be batched-up in a send buffer. The rpc call
- * return immediately to the client even though the call was not necessarily
- * sent. The batching occurs if the results' xdr routine is NULL (0) AND
- * the rpc timeout value is zero (see clnt.h, rpc).
- *
- * Clients should NOT casually batch calls that in fact return results; that is,
- * the server side should be aware that a call is batched and not produce any
- * return message. Batched calls that produce many result messages can
- * deadlock (netlock) the client and the server....
- *
- * Now go hang yourself.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <sys/uio.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netdb.h>
-#include <errno.h>
-#include <rpc/pmap_clnt.h>
-
-#define MCALL_MSG_SIZE 24
-
-static int readunix();
-static int writeunix();
-
-static enum clnt_stat clntunix_call();
-static void clntunix_abort();
-static void clntunix_geterr();
-static bool_t clntunix_freeres();
-static bool_t clntunix_control();
-static void clntunix_destroy();
-
-static struct clnt_ops unix_ops = {
- clntunix_call,
- clntunix_abort,
- clntunix_geterr,
- clntunix_freeres,
- clntunix_destroy,
- clntunix_control
-};
-
-struct ct_data {
- int ct_sock;
- bool_t ct_closeit;
- struct timeval ct_wait;
- bool_t ct_waitset; /* wait set by clnt_control? */
- struct sockaddr_un ct_addr;
- struct rpc_err ct_error;
- char ct_mcall[MCALL_MSG_SIZE]; /* marshalled callmsg */
- u_int ct_mpos; /* pos after marshal */
- XDR ct_xdrs;
-};
-
-/*
- * Create a client handle for a unix/ip connection.
- * If *sockp<0, *sockp is set to a newly created TCP socket and it is
- * connected to raddr. If *sockp non-negative then
- * raddr is ignored. The rpc/unix package does buffering
- * similar to stdio, so the client must pick send and receive buffer sizes,];
- * 0 => use the default.
- * If raddr->sin_port is 0, then a binder on the remote machine is
- * consulted for the right port number.
- * NB: *sockp is copied into a private area.
- * NB: It is the clients responsibility to close *sockp.
- * NB: The rpch->cl_auth is set null authentication. Caller may wish to set this
- * something more useful.
- */
-CLIENT *
-clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz)
- struct sockaddr_un *raddr;
- u_long prog;
- u_long vers;
- register int *sockp;
- u_int sendsz;
- u_int recvsz;
-{
- CLIENT *h;
- register struct ct_data *ct = NULL;
- struct timeval now;
- struct rpc_msg call_msg;
- static u_int32_t disrupt;
- int len;
-
- if (disrupt == 0)
- disrupt = (u_int32_t)(long)raddr;
-
- h = (CLIENT *)mem_alloc(sizeof(*h));
- if (h == NULL) {
- (void)fprintf(stderr, "clntunix_create: out of memory\n");
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = errno;
- goto fooy;
- }
- ct = (struct ct_data *)mem_alloc(sizeof(*ct));
- if (ct == NULL) {
- (void)fprintf(stderr, "clntunix_create: out of memory\n");
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = errno;
- goto fooy;
- }
-
- /*
- * If no socket given, open one
- */
- if (*sockp < 0) {
- *sockp = socket(AF_UNIX, SOCK_STREAM, 0);
- len = strlen(raddr->sun_path) + sizeof(raddr->sun_family) +
- sizeof(raddr->sun_len) + 1;
- raddr->sun_len = len;
- if ((*sockp < 0)
- || (connect(*sockp, (struct sockaddr *)raddr, len) < 0)) {
- rpc_createerr.cf_stat = RPC_SYSTEMERROR;
- rpc_createerr.cf_error.re_errno = errno;
- if (*sockp != -1)
- (void)close(*sockp);
- goto fooy;
- }
- ct->ct_closeit = TRUE;
- } else {
- ct->ct_closeit = FALSE;
- }
-
- /*
- * Set up private data struct
- */
- ct->ct_sock = *sockp;
- ct->ct_wait.tv_usec = 0;
- ct->ct_waitset = FALSE;
- ct->ct_addr = *raddr;
-
- /*
- * Initialize call message
- */
- (void)gettimeofday(&now, (struct timezone *)0);
- call_msg.rm_xid = (++disrupt) ^ getpid() ^ now.tv_sec ^ now.tv_usec;
- call_msg.rm_direction = CALL;
- call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
- call_msg.rm_call.cb_prog = prog;
- call_msg.rm_call.cb_vers = vers;
-
- /*
- * pre-serialize the static part of the call msg and stash it away
- */
- xdrmem_create(&(ct->ct_xdrs), ct->ct_mcall, MCALL_MSG_SIZE,
- XDR_ENCODE);
- if (! xdr_callhdr(&(ct->ct_xdrs), &call_msg)) {
- if (ct->ct_closeit) {
- (void)close(*sockp);
- }
- goto fooy;
- }
- ct->ct_mpos = XDR_GETPOS(&(ct->ct_xdrs));
- XDR_DESTROY(&(ct->ct_xdrs));
-
- /*
- * Create a client handle which uses xdrrec for serialization
- * and authnone for authentication.
- */
- xdrrec_create(&(ct->ct_xdrs), sendsz, recvsz,
- (caddr_t)ct, readunix, writeunix);
- h->cl_ops = &unix_ops;
- h->cl_private = (caddr_t) ct;
- h->cl_auth = authnone_create();
- return (h);
-
-fooy:
- /*
- * Something goofed, free stuff and barf
- */
- if (ct)
- mem_free((caddr_t)ct, sizeof(struct ct_data));
- if (h)
- mem_free((caddr_t)h, sizeof(CLIENT));
- return ((CLIENT *)NULL);
-}
-
-static enum clnt_stat
-clntunix_call(h, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout)
- register CLIENT *h;
- u_long proc;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
- xdrproc_t xdr_results;
- caddr_t results_ptr;
- struct timeval timeout;
-{
- register struct ct_data *ct = (struct ct_data *) h->cl_private;
- register XDR *xdrs = &(ct->ct_xdrs);
- struct rpc_msg reply_msg;
- u_long x_id;
- u_int32_t *msg_x_id = (u_int32_t *)(ct->ct_mcall); /* yuk */
- register bool_t shipnow;
- int refreshes = 2;
-
- if (!ct->ct_waitset) {
- ct->ct_wait = timeout;
- }
-
- shipnow =
- (xdr_results == (xdrproc_t)0 && timeout.tv_sec == 0
- && timeout.tv_usec == 0) ? FALSE : TRUE;
-
-call_again:
- xdrs->x_op = XDR_ENCODE;
- ct->ct_error.re_status = RPC_SUCCESS;
- x_id = ntohl(--(*msg_x_id));
- if ((! XDR_PUTBYTES(xdrs, ct->ct_mcall, ct->ct_mpos)) ||
- (! XDR_PUTLONG(xdrs, (long *)&proc)) ||
- (! AUTH_MARSHALL(h->cl_auth, xdrs)) ||
- (! (*xdr_args)(xdrs, args_ptr))) {
- if (ct->ct_error.re_status == RPC_SUCCESS)
- ct->ct_error.re_status = RPC_CANTENCODEARGS;
- (void)xdrrec_endofrecord(xdrs, TRUE);
- return (ct->ct_error.re_status);
- }
- if (! xdrrec_endofrecord(xdrs, shipnow))
- return (ct->ct_error.re_status = RPC_CANTSEND);
- if (! shipnow)
- return (RPC_SUCCESS);
- /*
- * Hack to provide rpc-based message passing
- */
- if (timeout.tv_sec == 0 && timeout.tv_usec == 0) {
- return(ct->ct_error.re_status = RPC_TIMEDOUT);
- }
-
-
- /*
- * Keep receiving until we get a valid transaction id
- */
- xdrs->x_op = XDR_DECODE;
- while (TRUE) {
- reply_msg.acpted_rply.ar_verf = _null_auth;
- reply_msg.acpted_rply.ar_results.where = NULL;
- reply_msg.acpted_rply.ar_results.proc = xdr_void;
- if (! xdrrec_skiprecord(xdrs))
- return (ct->ct_error.re_status);
- /* now decode and validate the response header */
- if (! xdr_replymsg(xdrs, &reply_msg)) {
- if (ct->ct_error.re_status == RPC_SUCCESS)
- continue;
- return (ct->ct_error.re_status);
- }
- if (reply_msg.rm_xid == x_id)
- break;
- }
-
- /*
- * process header
- */
- _seterr_reply(&reply_msg, &(ct->ct_error));
- if (ct->ct_error.re_status == RPC_SUCCESS) {
- if (! AUTH_VALIDATE(h->cl_auth, &reply_msg.acpted_rply.ar_verf)) {
- ct->ct_error.re_status = RPC_AUTHERROR;
- ct->ct_error.re_why = AUTH_INVALIDRESP;
- } else if (! (*xdr_results)(xdrs, results_ptr)) {
- if (ct->ct_error.re_status == RPC_SUCCESS)
- ct->ct_error.re_status = RPC_CANTDECODERES;
- }
- /* free verifier ... */
- if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) {
- xdrs->x_op = XDR_FREE;
- (void)xdr_opaque_auth(xdrs, &(reply_msg.acpted_rply.ar_verf));
- }
- } /* end successful completion */
- else {
- /* maybe our credentials need to be refreshed ... */
- if (refreshes-- && AUTH_REFRESH(h->cl_auth))
- goto call_again;
- } /* end of unsuccessful completion */
- return (ct->ct_error.re_status);
-}
-
-static void
-clntunix_geterr(h, errp)
- CLIENT *h;
- struct rpc_err *errp;
-{
- register struct ct_data *ct =
- (struct ct_data *) h->cl_private;
-
- *errp = ct->ct_error;
-}
-
-static bool_t
-clntunix_freeres(cl, xdr_res, res_ptr)
- CLIENT *cl;
- xdrproc_t xdr_res;
- caddr_t res_ptr;
-{
- register struct ct_data *ct = (struct ct_data *)cl->cl_private;
- register XDR *xdrs = &(ct->ct_xdrs);
-
- xdrs->x_op = XDR_FREE;
- return ((*xdr_res)(xdrs, res_ptr));
-}
-
-static void
-clntunix_abort()
-{
-}
-
-
-static bool_t
-clntunix_control(cl, request, info)
- CLIENT *cl;
- int request;
- char *info;
-{
- register struct ct_data *ct = (struct ct_data *)cl->cl_private;
- register struct timeval *tv;
- int len;
-
- switch (request) {
- case CLSET_FD_CLOSE:
- ct->ct_closeit = TRUE;
- break;
- case CLSET_FD_NCLOSE:
- ct->ct_closeit = FALSE;
- break;
- case CLSET_TIMEOUT:
- if (info == NULL)
- return(FALSE);
- tv = (struct timeval *)info;
- ct->ct_wait.tv_sec = tv->tv_sec;
- ct->ct_wait.tv_usec = tv->tv_usec;
- ct->ct_waitset = TRUE;
- break;
- case CLGET_TIMEOUT:
- if (info == NULL)
- return(FALSE);
- *(struct timeval *)info = ct->ct_wait;
- break;
- case CLGET_SERVER_ADDR:
- if (info == NULL)
- return(FALSE);
- *(struct sockaddr_un *)info = ct->ct_addr;
- break;
- case CLGET_FD:
- if (info == NULL)
- return(FALSE);
- *(int *)info = ct->ct_sock;
- break;
- case CLGET_XID:
- /*
- * use the knowledge that xid is the
- * first element in the call structure *.
- * This will get the xid of the PREVIOUS call
- */
- if (info == NULL)
- return(FALSE);
- *(u_long *)info = ntohl(*(u_long *)ct->ct_mcall);
- break;
- case CLSET_XID:
- /* This will set the xid of the NEXT call */
- if (info == NULL)
- return(FALSE);
- *(u_long *)ct->ct_mcall = htonl(*(u_long *)info - 1);
- /* decrement by 1 as clntunix_call() increments once */
- case CLGET_VERS:
- /*
- * This RELIES on the information that, in the call body,
- * the version number field is the fifth field from the
- * begining of the RPC header. MUST be changed if the
- * call_struct is changed
- */
- if (info == NULL)
- return(FALSE);
- *(u_long *)info = ntohl(*(u_long *)(ct->ct_mcall +
- 4 * BYTES_PER_XDR_UNIT));
- break;
- case CLSET_VERS:
- if (info == NULL)
- return(FALSE);
- *(u_long *)(ct->ct_mcall + 4 * BYTES_PER_XDR_UNIT)
- = htonl(*(u_long *)info);
- break;
- case CLGET_PROG:
- /*
- * This RELIES on the information that, in the call body,
- * the program number field is the field from the
- * begining of the RPC header. MUST be changed if the
- * call_struct is changed
- */
- if (info == NULL)
- return(FALSE);
- *(u_long *)info = ntohl(*(u_long *)(ct->ct_mcall +
- 3 * BYTES_PER_XDR_UNIT));
- break;
- case CLSET_PROG:
- if (info == NULL)
- return(FALSE);
- *(u_long *)(ct->ct_mcall + 3 * BYTES_PER_XDR_UNIT)
- = htonl(*(u_long *)info);
- break;
- case CLGET_LOCAL_ADDR:
- len = sizeof(struct sockaddr);
- if (getsockname(ct->ct_sock, (struct sockaddr *)info, &len) <0)
- return(FALSE);
- break;
- case CLGET_RETRY_TIMEOUT:
- case CLSET_RETRY_TIMEOUT:
- case CLGET_SVC_ADDR:
- case CLSET_SVC_ADDR:
- case CLSET_PUSH_TIMOD:
- case CLSET_POP_TIMOD:
- default:
- return (FALSE);
- }
- return (TRUE);
-}
-
-
-static void
-clntunix_destroy(h)
- CLIENT *h;
-{
- register struct ct_data *ct =
- (struct ct_data *) h->cl_private;
-
- if (ct->ct_closeit) {
- (void)close(ct->ct_sock);
- }
- XDR_DESTROY(&(ct->ct_xdrs));
- mem_free((caddr_t)ct, sizeof(struct ct_data));
- mem_free((caddr_t)h, sizeof(CLIENT));
-}
-
-/*
- * read() and write() are replaced with recvmsg()/sendmsg() so that
- * we can pass ancillary control data. In this case, the data constists
- * of credential information which the kernel will fill in for us.
- * XXX: This code is specific to FreeBSD and will not work on other
- * platforms without the requisite kernel modifications.
- */
-struct cmessage {
- struct cmsghdr cmsg;
- struct cmsgcred cmcred;
-};
-
-static int __msgread(sock, buf, cnt)
- int sock;
- void *buf;
- size_t cnt;
-{
- struct iovec iov[1];
- struct msghdr msg;
- struct cmessage cm;
-
- bzero((char *)&cm, sizeof(cm));
- iov[0].iov_base = buf;
- iov[0].iov_len = cnt;
-
- msg.msg_iov = iov;
- msg.msg_iovlen = 1;
- msg.msg_name = NULL;
- msg.msg_namelen = 0;
- msg.msg_control = (caddr_t)&cm;
- msg.msg_controllen = sizeof(struct cmessage);
- msg.msg_flags = 0;
-
- return(recvmsg(sock, &msg, 0));
-}
-
-static int __msgwrite(sock, buf, cnt)
- int sock;
- void *buf;
- size_t cnt;
-{
- struct iovec iov[1];
- struct msghdr msg;
- struct cmessage cm;
-
- bzero((char *)&cm, sizeof(cm));
- iov[0].iov_base = buf;
- iov[0].iov_len = cnt;
-
- cm.cmsg.cmsg_type = SCM_CREDS;
- cm.cmsg.cmsg_level = SOL_SOCKET;
- cm.cmsg.cmsg_len = sizeof(struct cmessage);
-
- msg.msg_iov = iov;
- msg.msg_iovlen = 1;
- msg.msg_name = NULL;
- msg.msg_namelen = 0;
- msg.msg_control = (caddr_t)&cm;
- msg.msg_controllen = sizeof(struct cmessage);
- msg.msg_flags = 0;
-
- return(sendmsg(sock, &msg, 0));
-}
-
-/*
- * Interface between xdr serializer and unix connection.
- * Behaves like the system calls, read & write, but keeps some error state
- * around for the rpc level.
- */
-static int
-readunix(ct, buf, len)
- register struct ct_data *ct;
- caddr_t buf;
- register int len;
-{
- fd_set *fds, readfds;
- struct timeval start, after, duration, delta, tmp, tv;
- int r, save_errno;
-
- if (len == 0)
- return (0);
-
- if (ct->ct_sock + 1 > FD_SETSIZE) {
- int bytes = howmany(ct->ct_sock + 1, NFDBITS) * sizeof(fd_mask);
- fds = (fd_set *)malloc(bytes);
- if (fds == NULL)
- return (-1);
- memset(fds, 0, bytes);
- } else {
- fds = &readfds;
- FD_ZERO(fds);
- }
-
- gettimeofday(&start, NULL);
- delta = ct->ct_wait;
- while (TRUE) {
- /* XXX we know the other bits are still clear */
- FD_SET(ct->ct_sock, fds);
- tv = delta; /* in case select writes back */
- r = select(ct->ct_sock+1, fds, NULL, NULL, &tv);
- save_errno = errno;
-
- gettimeofday(&after, NULL);
- timersub(&start, &after, &duration);
- timersub(&delta, &duration, &tmp);
- delta = tmp;
- if (delta.tv_sec < 0 || !timerisset(&delta))
- r = 0;
-
- switch (r) {
- case 0:
- if (fds != &readfds)
- free(fds);
- ct->ct_error.re_status = RPC_TIMEDOUT;
- return (-1);
-
- case -1:
- if (errno == EINTR)
- continue;
- if (fds != &readfds)
- free(fds);
- ct->ct_error.re_status = RPC_CANTRECV;
- ct->ct_error.re_errno = save_errno;
- return (-1);
- }
- break;
- }
- switch (len = __msgread(ct->ct_sock, buf, len)) {
-
- case 0:
- /* premature eof */
- ct->ct_error.re_errno = ECONNRESET;
- ct->ct_error.re_status = RPC_CANTRECV;
- len = -1; /* it's really an error */
- break;
-
- case -1:
- ct->ct_error.re_errno = errno;
- ct->ct_error.re_status = RPC_CANTRECV;
- break;
- }
- return (len);
-}
-
-static int
-writeunix(ct, buf, len)
- struct ct_data *ct;
- caddr_t buf;
- int len;
-{
- register int i, cnt;
-
- for (cnt = len; cnt > 0; cnt -= i, buf += i) {
- if ((i = __msgwrite(ct->ct_sock, buf, cnt)) == -1) {
- ct->ct_error.re_errno = errno;
- ct->ct_error.re_status = RPC_CANTSEND;
- return (-1);
- }
- }
- return (len);
-}
diff --git a/lib/libc/rpc/crypt_client.c b/lib/libc/rpc/crypt_client.c
deleted file mode 100644
index cdc0c06..0000000
--- a/lib/libc/rpc/crypt_client.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 1996
- * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Bill Paul.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <rpc/des_crypt.h>
-#include <rpc/des.h>
-#include <string.h>
-#include <rpcsvc/crypt.h>
-
-#ifndef lint
-static const char rcsid[] = "$Id$";
-#endif
-
-#ifndef KEYSERVSOCK
-#define KEYSERVSOCK "/var/run/keyservsock"
-#endif
-
-int
-_des_crypt_call(buf, len, dparms)
- char *buf;
- int len;
- struct desparams *dparms;
-{
- CLIENT *clnt;
- desresp *result_1;
- desargs des_crypt_1_arg;
- int stat;
-
- clnt = clnt_create(KEYSERVSOCK, CRYPT_PROG, CRYPT_VERS, "unix");
- if (clnt == (CLIENT *) NULL) {
- return(DESERR_HWERROR);
- }
-
- des_crypt_1_arg.desbuf.desbuf_len = len;
- des_crypt_1_arg.desbuf.desbuf_val = buf;
- des_crypt_1_arg.des_dir = dparms->des_dir;
- des_crypt_1_arg.des_mode = dparms->des_mode;
- bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8);
- bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8);
-
- result_1 = des_crypt_1(&des_crypt_1_arg, clnt);
- if (result_1 == (desresp *) NULL) {
- return(DESERR_HWERROR);
- }
-
- stat = result_1->stat;
-
- if (result_1->stat == DESERR_NONE ||
- result_1->stat == DESERR_NOHWDEVICE) {
- bcopy(result_1->desbuf.desbuf_val, buf, len);
- bcopy(result_1->des_ivec, dparms->des_ivec, 8);
- }
-
- clnt_freeres(clnt, xdr_desresp, (char *)result_1);
- clnt_destroy(clnt);
-
- return(stat);
-}
diff --git a/lib/libc/rpc/des_crypt.3 b/lib/libc/rpc/des_crypt.3
deleted file mode 100644
index ca0a33e..0000000
--- a/lib/libc/rpc/des_crypt.3
+++ /dev/null
@@ -1,126 +0,0 @@
-.\" @(#)des_crypt.3 2.1 88/08/11 4.0 RPCSRC; from 1.16 88/03/02 SMI;
-.TH DES_CRYPT 3 "6 October 1987"
-.SH NAME
-des_crypt, ecb_crypt, cbc_crypt, des_setparity \- fast DES encryption
-.SH SYNOPSIS
-.nf
-.B #include <des_crypt.h>
-.LP
-.B int ecb_crypt(key, data, datalen, mode)
-.B char *key;
-.B char *data;
-.B unsigned datalen;
-.B unsigned mode;
-.LP
-.B int cbc_crypt(key, data, datalen, mode, ivec)
-.B char *key;
-.B char *data;
-.B unsigned datalen;
-.B unsigned mode;
-.B char *ivec;
-.LP
-.B void des_setparity(key)
-.B char *key;
-.fi
-.SH DESCRIPTION
-.IX encryption cbc_crypt "" \fLcbc_crypt\fP
-.IX "des encryption" cbc_crypt "DES encryption" \fLcbc_crypt\fP
-.IX encryption des_setparity "" \fLdes_setparity\fP
-.IX "des encryption" des_setparity "DES encryption" \fLdes_setparity\fP
-.B ecb_crypt(\|)
-and
-.B cbc_crypt(\|)
-implement the
-.SM NBS
-.SM DES
-(Data Encryption Standard).
-These routines are faster and more general purpose than
-.BR crypt (3).
-They also are able to utilize
-.SM DES
-hardware if it is available.
-.B ecb_crypt(\|)
-encrypts in
-.SM ECB
-(Electronic Code Book)
-mode, which encrypts blocks of data independently.
-.B cbc_crypt(\|)
-encrypts in
-.SM CBC
-(Cipher Block Chaining)
-mode, which chains together
-successive blocks.
-.SM CBC
-mode protects against insertions, deletions and
-substitutions of blocks. Also, regularities in the clear text will
-not appear in the cipher text.
-.LP
-Here is how to use these routines. The first parameter,
-.IR key ,
-is the 8-byte encryption key with parity.
-To set the key's parity, which for
-.SM DES
-is in the low bit of each byte, use
-.IR des_setparity .
-The second parameter,
-.IR data ,
-contains the data to be encrypted or decrypted. The
-third parameter,
-.IR datalen ,
-is the length in bytes of
-.IR data ,
-which must be a multiple of 8. The fourth parameter,
-.IR mode ,
-is formed by
-.SM OR\s0'ing
-together some things. For the encryption direction 'or' in either
-.SM DES_ENCRYPT
-or
-.SM DES_DECRYPT\s0.
-For software versus hardware
-encryption, 'or' in either
-.SM DES_HW
-or
-.SM DES_SW\s0.
-If
-.SM DES_HW
-is specified, and there is no hardware, then the encryption is performed
-in software and the routine returns
-.SM DESERR_NOHWDEVICE\s0.
-For
-.IR cbc_crypt ,
-the parameter
-.I ivec
-is the the 8-byte initialization
-vector for the chaining. It is updated to the next initialization
-vector upon return.
-.LP
-.SH "SEE ALSO"
-.BR des (1),
-.BR crypt (3)
-.SH DIAGNOSTICS
-.PD 0
-.TP 20
-.SM DESERR_NONE
-No error.
-.TP
-.SM DESERR_NOHWDEVICE
-Encryption succeeded, but done in software instead of the requested hardware.
-.TP
-.SM DESERR_HWERR
-An error occurred in the hardware or driver.
-.TP
-.SM DESERR_BADPARAM
-Bad parameter to routine.
-.PD
-.LP
-Given a result status
-.IR stat ,
-the macro
-.SM DES_FAILED\c
-.BR ( stat )
-is false only for the first two statuses.
-.SH RESTRICTIONS
-These routines are not available in RPCSRC 4.0.
-This information is provided to describe the DES interface expected by
-Secure RPC.
diff --git a/lib/libc/rpc/des_crypt.c b/lib/libc/rpc/des_crypt.c
deleted file mode 100644
index 18c9972..0000000
--- a/lib/libc/rpc/des_crypt.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * des_crypt.c, DES encryption library routines
- * Copyright (C) 1986, Sun Microsystems, Inc.
- */
-
-#include <sys/types.h>
-#include <rpc/des_crypt.h>
-#include <rpc/des.h>
-
-#ifndef lint
-/* from: static char sccsid[] = "@(#)des_crypt.c 2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/08 SMI"; */
-static const char rcsid[] = "$Id$";
-#endif
-
-static int common_crypt __P(( char *, char *, register unsigned, unsigned, struct desparams * ));
-int (*__des_crypt_LOCAL)() = 0;
-extern _des_crypt_call __P(( char *, int, struct desparams * ));
-/*
- * Copy 8 bytes
- */
-#define COPY8(src, dst) { \
- register char *a = (char *) dst; \
- register char *b = (char *) src; \
- *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \
- *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \
-}
-
-/*
- * Copy multiple of 8 bytes
- */
-#define DESCOPY(src, dst, len) { \
- register char *a = (char *) dst; \
- register char *b = (char *) src; \
- register int i; \
- for (i = (int) len; i > 0; i -= 8) { \
- *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \
- *a++ = *b++; *a++ = *b++; *a++ = *b++; *a++ = *b++; \
- } \
-}
-
-/*
- * CBC mode encryption
- */
-int
-cbc_crypt(key, buf, len, mode, ivec)
- char *key;
- char *buf;
- unsigned len;
- unsigned mode;
- char *ivec;
-{
- int err;
- struct desparams dp;
-
-#ifdef BROKEN_DES
- dp.UDES.UDES_buf = buf;
- dp.des_mode = ECB;
-#else
- dp.des_mode = CBC;
-#endif
- COPY8(ivec, dp.des_ivec);
- err = common_crypt(key, buf, len, mode, &dp);
- COPY8(dp.des_ivec, ivec);
- return(err);
-}
-
-
-/*
- * ECB mode encryption
- */
-int
-ecb_crypt(key, buf, len, mode)
- char *key;
- char *buf;
- unsigned len;
- unsigned mode;
-{
- struct desparams dp;
-
-#ifdef BROKEN_DES
- dp.UDES.UDES_buf = buf;
- dp.des_mode = CBC;
-#else
- dp.des_mode = ECB;
-#endif
- return(common_crypt(key, buf, len, mode, &dp));
-}
-
-
-
-/*
- * Common code to cbc_crypt() & ecb_crypt()
- */
-static int
-common_crypt(key, buf, len, mode, desp)
- char *key;
- char *buf;
- register unsigned len;
- unsigned mode;
- register struct desparams *desp;
-{
- register int desdev;
-
- if ((len % 8) != 0 || len > DES_MAXDATA) {
- return(DESERR_BADPARAM);
- }
- desp->des_dir =
- ((mode & DES_DIRMASK) == DES_ENCRYPT) ? ENCRYPT : DECRYPT;
-
- desdev = mode & DES_DEVMASK;
- COPY8(key, desp->des_key);
- /*
- * software
- */
- if (__des_crypt_LOCAL != NULL) {
- if (!__des_crypt_LOCAL(buf, len, desp)) {
- return (DESERR_HWERROR);
- }
- } else {
- if (!_des_crypt_call(buf, len, desp)) {
- return (DESERR_HWERROR);
- }
- }
- return(desdev == DES_SW ? DESERR_NONE : DESERR_NOHWDEVICE);
-}
diff --git a/lib/libc/rpc/des_soft.c b/lib/libc/rpc/des_soft.c
deleted file mode 100644
index 01dd7f2..0000000
--- a/lib/libc/rpc/des_soft.c
+++ /dev/null
@@ -1,67 +0,0 @@
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)des_soft.c 2.2 88/08/10 4.0 RPCSRC; from 1.13 88/02/08 SMI";
-#endif
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Table giving odd parity in the low bit for ASCII characters
- */
-static char partab[128] = {
- 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x07, 0x07,
- 0x08, 0x08, 0x0b, 0x0b, 0x0d, 0x0d, 0x0e, 0x0e,
- 0x10, 0x10, 0x13, 0x13, 0x15, 0x15, 0x16, 0x16,
- 0x19, 0x19, 0x1a, 0x1a, 0x1c, 0x1c, 0x1f, 0x1f,
- 0x20, 0x20, 0x23, 0x23, 0x25, 0x25, 0x26, 0x26,
- 0x29, 0x29, 0x2a, 0x2a, 0x2c, 0x2c, 0x2f, 0x2f,
- 0x31, 0x31, 0x32, 0x32, 0x34, 0x34, 0x37, 0x37,
- 0x38, 0x38, 0x3b, 0x3b, 0x3d, 0x3d, 0x3e, 0x3e,
- 0x40, 0x40, 0x43, 0x43, 0x45, 0x45, 0x46, 0x46,
- 0x49, 0x49, 0x4a, 0x4a, 0x4c, 0x4c, 0x4f, 0x4f,
- 0x51, 0x51, 0x52, 0x52, 0x54, 0x54, 0x57, 0x57,
- 0x58, 0x58, 0x5b, 0x5b, 0x5d, 0x5d, 0x5e, 0x5e,
- 0x61, 0x61, 0x62, 0x62, 0x64, 0x64, 0x67, 0x67,
- 0x68, 0x68, 0x6b, 0x6b, 0x6d, 0x6d, 0x6e, 0x6e,
- 0x70, 0x70, 0x73, 0x73, 0x75, 0x75, 0x76, 0x76,
- 0x79, 0x79, 0x7a, 0x7a, 0x7c, 0x7c, 0x7f, 0x7f,
-};
-
-/*
- * Add odd parity to low bit of 8 byte key
- */
-void
-des_setparity(p)
- char *p;
-{
- int i;
-
- for (i = 0; i < 8; i++) {
- *p = partab[*p & 0x7f];
- p++;
- }
-}
diff --git a/lib/libc/rpc/get_myaddress.c b/lib/libc/rpc/get_myaddress.c
deleted file mode 100644
index f4ba48b..0000000
--- a/lib/libc/rpc/get_myaddress.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)get_myaddress.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: get_myaddress.c,v 1.13 1997/09/21 23:04:51 wpaul Exp $";
-#endif
-
-/*
- * get_myaddress.c
- *
- * Get client's IP address via ioctl. This avoids using the yellowpages.
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/pmap_prot.h>
-#include <sys/socket.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <net/if.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-/*
- * don't use gethostbyname, which would invoke yellow pages
- *
- * Avoid loopback interfaces. We return information from a loopback
- * interface only if there are no other possible interfaces.
- */
-int
-get_myaddress(addr)
- struct sockaddr_in *addr;
-{
- int s;
- char buf[BUFSIZ];
- struct ifconf ifc;
- struct ifreq ifreq, *ifr, *end;
- int loopback = 0, gotit = 0;
-
- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- return(-1);
- }
- ifc.ifc_len = sizeof (buf);
- ifc.ifc_buf = buf;
- if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) {
- close(s);
- return(-1);
- }
-again:
- ifr = ifc.ifc_req;
- end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);
-
- while (ifr < end) {
- ifreq = *ifr;
- if (ioctl(s, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
- close(s);
- return(-1);
- }
- if (((ifreq.ifr_flags & IFF_UP) &&
- ifr->ifr_addr.sa_family == AF_INET &&
- !(ifreq.ifr_flags & IFF_LOOPBACK)) ||
- (loopback == 1 && (ifreq.ifr_flags & IFF_LOOPBACK)
- && (ifr->ifr_addr.sa_family == AF_INET)
- && (ifreq.ifr_flags & IFF_UP))) {
- *addr = *((struct sockaddr_in *)&ifr->ifr_addr);
- addr->sin_port = htons(PMAPPORT);
- gotit = 1;
- break;
- }
- if (ifr->ifr_addr.sa_len)
- ifr = (struct ifreq *) ((caddr_t) ifr +
- ifr->ifr_addr.sa_len -
- sizeof(struct sockaddr));
- ifr++;
- }
- if (gotit == 0 && loopback == 0) {
- loopback = 1;
- goto again;
- }
- (void) close(s);
- return (gotit ? 0 : -1);
-}
diff --git a/lib/libc/rpc/getpublickey.c b/lib/libc/rpc/getpublickey.c
deleted file mode 100644
index 4f0aa7c..0000000
--- a/lib/libc/rpc/getpublickey.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright (c) 1997 John D. Polstra
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-/*
- * Stub version of getpublickey(), which is referenced in auth_des.c
- * and svc_auth_des.c. This stub always fails. It is necessary to
- * avoid any references to undefined symbols from libc.
- */
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-
-int
-getpublickey(servername, pkey_data)
- char *servername;
- char *pkey_data;
-{
- return 0;
-}
diff --git a/lib/libc/rpc/getrpcent.3 b/lib/libc/rpc/getrpcent.3
deleted file mode 100644
index d2ea355..0000000
--- a/lib/libc/rpc/getrpcent.3
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" @(#)getrpcent.3n 2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI
-.Dd December 14, 1987
-.Dt GETRPCENT 3
-.Os
-.Sh NAME
-.Nm getrpcent ,
-.Nm getrpcbyname ,
-.Nm getrpcbynumber ,
-.Nm endrpcent ,
-.Nm setrpcent
-.Nd get RPC entry
-.Sh SYNOPSIS
-.Fd #include <rpc/rpc.h>
-.Ft struct rpcent *
-.Fn getrpcent void
-.Ft struct rpcent *
-.Fn getrpcbyname "char *name"
-.Ft struct rpcent *
-.Fn getrpcbynumber "int number"
-.Ft void
-.Fn setrpcent "int stayopen"
-.Ft void
-.Fn endrpcent void
-.Sh DESCRIPTION
-The
-.Fn getrpcent ,
-.Fn getrpcbyname ,
-and
-.Fn getrpcbynumber
-functions each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the rpc program number data base,
-.Pa /etc/rpc .
-.Bd -literal
-
-struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
- long r_number; /* rpc program number */
-};
-.Ed
-.Pp
-The members of this structure are:
-.Bl -tag -width r_aliasesxxx
-.It Fa r_name
-The name of the server for this rpc program.
-.It Fa r_aliases
-A zero terminated list of alternate names for the rpc program.
-.It Fa r_number
-The rpc program number for this service.
-.El
-.Pp
-The
-.Fn getrpcent
-function reads the next line of the file, opening the file if necessary.
-The
-.Nm getrpcent
-function opens and rewinds the file. If the
-.Fa stayopen
-flag is non-zero,
-the net data base will not be closed after each call to
-.Fn getrpcent
-(either directly, or indirectly through one of
-the other
-.Fn getrpcent
-function family.
-.Pp
-.Fn endrpcent
-closes the file.
-.Pp
-.Fn getrpcbyname
-and
-.Fn getrpcbynumber
-sequentially search from the beginning
-of the file until a matching rpc program name or
-program number is found, or until end-of-file is encountered.
-.Sh FILES
-.Bl -tag -width /etc/rpc -compact
-.It Pa /etc/rpc
-.El
-.Sh "SEE ALSO"
-.Xr rpc 5 ,
-.Xr rpcinfo 8 ,
-.Xr ypserv 8
-.Sh DIAGNOSTICS
-A
-.Dv NULL
-pointer is returned on
-.Dv EOF
-or error.
-.Sh BUGS
-All information
-is contained in a static area
-so it must be copied if it is
-to be saved.
diff --git a/lib/libc/rpc/getrpcent.c b/lib/libc/rpc/getrpcent.c
deleted file mode 100644
index 8266285..0000000
--- a/lib/libc/rpc/getrpcent.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user or with the express written consent of
- * Sun Microsystems, Inc.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";*/
-static char *rcsid = "$Id: getrpcent.c,v 1.6 1996/12/30 14:42:31 peter Exp $";
-#endif
-
-/*
- * Copyright (c) 1984 by Sun Microsystems, Inc.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#ifdef YP
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-
-/*
- * Internet version.
- */
-struct rpcdata {
- FILE *rpcf;
- int stayopen;
-#define MAXALIASES 35
- char *rpc_aliases[MAXALIASES];
- struct rpcent rpc;
- char line[BUFSIZ+1];
-#ifdef YP
- char *domain;
- char *current;
- int currentlen;
-#endif
-} *rpcdata;
-
-#ifdef YP
-static int __yp_nomap = 0;
-extern int _yp_check(char **);
-#endif /* YP */
-
-static struct rpcent *interpret();
-struct hostent *gethostent();
-char *inet_ntoa();
-
-static char RPCDB[] = "/etc/rpc";
-
-static struct rpcdata *
-_rpcdata()
-{
- register struct rpcdata *d = rpcdata;
-
- if (d == 0) {
- d = (struct rpcdata *)calloc(1, sizeof (struct rpcdata));
- rpcdata = d;
- }
- return (d);
-}
-
-struct rpcent *
-getrpcbynumber(number)
- register int number;
-{
- register struct rpcdata *d = _rpcdata();
- register struct rpcent *p;
-#ifdef YP
- int reason;
- char adrstr[16];
-#endif
-
- if (d == 0)
- return (0);
-#ifdef YP
- if (!__yp_nomap && _yp_check(&d->domain)) {
- sprintf(adrstr, "%d", number);
- reason = yp_match(d->domain, "rpc.bynumber", adrstr, strlen(adrstr),
- &d->current, &d->currentlen);
- switch(reason) {
- case 0:
- break;
- case YPERR_MAP:
- __yp_nomap = 1;
- goto no_yp;
- break;
- default:
- return(0);
- break;
- }
- d->current[d->currentlen] = '\0';
- p = interpret(d->current, d->currentlen);
- (void) free(d->current);
- return p;
- }
-no_yp:
-#endif /* YP */
- setrpcent(0);
- while ((p = getrpcent())) {
- if (p->r_number == number)
- break;
- }
- endrpcent();
- return (p);
-}
-
-struct rpcent *
-getrpcbyname(name)
- char *name;
-{
- struct rpcent *rpc = NULL;
- char **rp;
-
- setrpcent(0);
- while ((rpc = getrpcent())) {
- if (strcmp(rpc->r_name, name) == 0)
- goto done;
- for (rp = rpc->r_aliases; *rp != NULL; rp++) {
- if (strcmp(*rp, name) == 0)
- goto done;
- }
- }
-done:
- endrpcent();
- return (rpc);
-}
-
-void
-setrpcent(f)
- int f;
-{
- register struct rpcdata *d = _rpcdata();
-
- if (d == 0)
- return;
-#ifdef YP
- if (!__yp_nomap && _yp_check(NULL)) {
- if (d->current)
- free(d->current);
- d->current = NULL;
- d->currentlen = 0;
- return;
- }
- __yp_nomap = 0;
-#endif /* YP */
- if (d->rpcf == NULL)
- d->rpcf = fopen(RPCDB, "r");
- else
- rewind(d->rpcf);
- d->stayopen |= f;
-}
-
-void
-endrpcent()
-{
- register struct rpcdata *d = _rpcdata();
-
- if (d == 0)
- return;
-#ifdef YP
- if (!__yp_nomap && _yp_check(NULL)) {
- if (d->current && !d->stayopen)
- free(d->current);
- d->current = NULL;
- d->currentlen = 0;
- return;
- }
- __yp_nomap = 0;
-#endif /* YP */
- if (d->rpcf && !d->stayopen) {
- fclose(d->rpcf);
- d->rpcf = NULL;
- }
-}
-
-struct rpcent *
-getrpcent()
-{
- register struct rpcdata *d = _rpcdata();
-#ifdef YP
- struct rpcent *hp;
- int reason;
- char *val = NULL;
- int vallen;
-#endif
-
- if (d == 0)
- return(NULL);
-#ifdef YP
- if (!__yp_nomap && _yp_check(&d->domain)) {
- if (d->current == NULL && d->currentlen == 0) {
- reason = yp_first(d->domain, "rpc.bynumber",
- &d->current, &d->currentlen,
- &val, &vallen);
- } else {
- reason = yp_next(d->domain, "rpc.bynumber",
- d->current, d->currentlen,
- &d->current, &d->currentlen,
- &val, &vallen);
- }
- switch(reason) {
- case 0:
- break;
- case YPERR_MAP:
- __yp_nomap = 1;
- goto no_yp;
- break;
- default:
- return(0);
- break;
- }
- val[vallen] = '\0';
- hp = interpret(val, vallen);
- (void) free(val);
- return hp;
- }
-no_yp:
-#endif /* YP */
- if (d->rpcf == NULL && (d->rpcf = fopen(RPCDB, "r")) == NULL)
- return (NULL);
- /* -1 so there is room to append a \n below */
- if (fgets(d->line, BUFSIZ - 1, d->rpcf) == NULL)
- return (NULL);
- return (interpret(d->line, strlen(d->line)));
-}
-
-static struct rpcent *
-interpret(val, len)
- char *val;
- int len;
-{
- register struct rpcdata *d = _rpcdata();
- char *p;
- register char *cp, **q;
-
- if (d == 0)
- return (0);
- (void) strncpy(d->line, val, BUFSIZ);
- d->line[BUFSIZ] = '\0';
- p = d->line;
- p[len] = '\n';
- if (*p == '#')
- return (getrpcent());
- cp = strpbrk(p, "#\n");
- if (cp == NULL)
- return (getrpcent());
- *cp = '\0';
- cp = strpbrk(p, " \t");
- if (cp == NULL)
- return (getrpcent());
- *cp++ = '\0';
- /* THIS STUFF IS INTERNET SPECIFIC */
- d->rpc.r_name = d->line;
- while (*cp == ' ' || *cp == '\t')
- cp++;
- d->rpc.r_number = atoi(cp);
- q = d->rpc.r_aliases = d->rpc_aliases;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- while (cp && *cp) {
- if (*cp == ' ' || *cp == '\t') {
- cp++;
- continue;
- }
- if (q < &(d->rpc_aliases[MAXALIASES - 1]))
- *q++ = cp;
- cp = strpbrk(cp, " \t");
- if (cp != NULL)
- *cp++ = '\0';
- }
- *q = NULL;
- return (&d->rpc);
-}
-
diff --git a/lib/libc/rpc/getrpcport.3 b/lib/libc/rpc/getrpcport.3
deleted file mode 100644
index 8f4ebed..0000000
--- a/lib/libc/rpc/getrpcport.3
+++ /dev/null
@@ -1,29 +0,0 @@
-.\" @(#)getrpcport.3r 2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
-.Dd October 6, 1987
-.Dt GETRPCPORT 3
-.Os
-.Sh NAME
-.Nm getrpcport
-.Nd get RPC port number
-.Sh SYNOPSIS
-.Ft int
-.Fn getrpcport "char *host" "int prognum" "int versnum" "int proto"
-.Sh DESCRIPTION
-.Fn getrpcport
-returns the port number for version
-.Fa versnum
-of the RPC program
-.Fa prognum
-running on
-.Fa host
-and using protocol
-.Fa proto .
-It returns 0 if it cannot contact the portmapper, or if
-.Fa prognum
-is not registered. If
-.Fa prognum
-is registered but not with version
-.Fa versnum ,
-it will still return a port number (for some version of the program)
-indicating that the program is indeed registered.
-The version mismatch will be detected upon the first call to the service.
diff --git a/lib/libc/rpc/getrpcport.c b/lib/libc/rpc/getrpcport.c
deleted file mode 100644
index 04a8de2..0000000
--- a/lib/libc/rpc/getrpcport.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)getrpcport.c 1.3 87/08/11 SMI";*/
-/*static char *sccsid = "from: @(#)getrpcport.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: getrpcport.c,v 1.6 1996/12/30 14:43:42 peter Exp $";
-#endif
-
-/*
- * Copyright (c) 1985 by Sun Microsystems, Inc.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <rpc/pmap_clnt.h>
-#include <netdb.h>
-#include <sys/socket.h>
-
-int
-getrpcport(host, prognum, versnum, proto)
- char *host;
- int prognum, versnum, proto;
-{
- struct sockaddr_in addr;
- struct hostent *hp;
-
- if ((hp = gethostbyname(host)) == NULL)
- return (0);
- memset(&addr, 0, sizeof(addr));
- addr.sin_len = sizeof(struct sockaddr_in);
- addr.sin_family = AF_INET;
- addr.sin_port = 0;
- memcpy((char *)&addr.sin_addr, hp->h_addr, hp->h_length);
- return (pmap_getport(&addr, prognum, versnum, proto));
-}
diff --git a/lib/libc/rpc/key_call.c b/lib/libc/rpc/key_call.c
deleted file mode 100644
index bcef22e..0000000
--- a/lib/libc/rpc/key_call.c
+++ /dev/null
@@ -1,425 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1986-1991 by Sun Microsystems Inc.
- */
-
-#ident "@(#)key_call.c 1.25 94/04/24 SMI"
-
-/*
- * key_call.c, Interface to keyserver
- *
- * setsecretkey(key) - set your secret key
- * encryptsessionkey(agent, deskey) - encrypt a session key to talk to agent
- * decryptsessionkey(agent, deskey) - decrypt ditto
- * gendeskey(deskey) - generate a secure des key
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <rpc/rpc.h>
-#include <rpc/auth.h>
-#include <rpc/auth_unix.h>
-#include <rpc/key_prot.h>
-#include <string.h>
-#include <sys/utsname.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <sys/fcntl.h>
-
-
-#define KEY_TIMEOUT 5 /* per-try timeout in seconds */
-#define KEY_NRETRY 12 /* number of retries */
-
-#ifdef DEBUG
-#define debug(msg) (void) fprintf(stderr, "%s\n", msg);
-#else
-#define debug(msg)
-#endif /* DEBUG */
-
-/*
- * Hack to allow the keyserver to use AUTH_DES (for authenticated
- * NIS+ calls, for example). The only functions that get called
- * are key_encryptsession_pk, key_decryptsession_pk, and key_gendes.
- *
- * The approach is to have the keyserver fill in pointers to local
- * implementations of these functions, and to call those in key_call().
- */
-
-cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0;
-cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0;
-des_block *(*__key_gendes_LOCAL)() = 0;
-
-static int key_call __P(( u_long, xdrproc_t, char *, xdrproc_t, char * ));
-
-int
-key_setsecret(secretkey)
- const char *secretkey;
-{
- keystatus status;
-
- if (!key_call((u_long) KEY_SET, xdr_keybuf, (char *) secretkey,
- xdr_keystatus, (char *)&status)) {
- return (-1);
- }
- if (status != KEY_SUCCESS) {
- debug("set status is nonzero");
- return (-1);
- }
- return (0);
-}
-
-
-/* key_secretkey_is_set() returns 1 if the keyserver has a secret key
- * stored for the caller's effective uid; it returns 0 otherwise
- *
- * N.B.: The KEY_NET_GET key call is undocumented. Applications shouldn't
- * be using it, because it allows them to get the user's secret key.
- */
-
-int
-key_secretkey_is_set(void)
-{
- struct key_netstres kres;
-
- memset((void*)&kres, 0, sizeof (kres));
- if (key_call((u_long) KEY_NET_GET, xdr_void, (char *)NULL,
- xdr_key_netstres, (char *) &kres) &&
- (kres.status == KEY_SUCCESS) &&
- (kres.key_netstres_u.knet.st_priv_key[0] != 0)) {
- /* avoid leaving secret key in memory */
- memset(kres.key_netstres_u.knet.st_priv_key, 0, HEXKEYBYTES);
- return (1);
- }
- return (0);
-}
-
-int
-key_encryptsession_pk(remotename, remotekey, deskey)
- char *remotename;
- netobj *remotekey;
- des_block *deskey;
-{
- cryptkeyarg2 arg;
- cryptkeyres res;
-
- arg.remotename = remotename;
- arg.remotekey = *remotekey;
- arg.deskey = *deskey;
- if (!key_call((u_long)KEY_ENCRYPT_PK, xdr_cryptkeyarg2, (char *)&arg,
- xdr_cryptkeyres, (char *)&res)) {
- return (-1);
- }
- if (res.status != KEY_SUCCESS) {
- debug("encrypt status is nonzero");
- return (-1);
- }
- *deskey = res.cryptkeyres_u.deskey;
- return (0);
-}
-
-int
-key_decryptsession_pk(remotename, remotekey, deskey)
- char *remotename;
- netobj *remotekey;
- des_block *deskey;
-{
- cryptkeyarg2 arg;
- cryptkeyres res;
-
- arg.remotename = remotename;
- arg.remotekey = *remotekey;
- arg.deskey = *deskey;
- if (!key_call((u_long)KEY_DECRYPT_PK, xdr_cryptkeyarg2, (char *)&arg,
- xdr_cryptkeyres, (char *)&res)) {
- return (-1);
- }
- if (res.status != KEY_SUCCESS) {
- debug("decrypt status is nonzero");
- return (-1);
- }
- *deskey = res.cryptkeyres_u.deskey;
- return (0);
-}
-
-int
-key_encryptsession(remotename, deskey)
- const char *remotename;
- des_block *deskey;
-{
- cryptkeyarg arg;
- cryptkeyres res;
-
- arg.remotename = (char *) remotename;
- arg.deskey = *deskey;
- if (!key_call((u_long)KEY_ENCRYPT, xdr_cryptkeyarg, (char *)&arg,
- xdr_cryptkeyres, (char *)&res)) {
- return (-1);
- }
- if (res.status != KEY_SUCCESS) {
- debug("encrypt status is nonzero");
- return (-1);
- }
- *deskey = res.cryptkeyres_u.deskey;
- return (0);
-}
-
-int
-key_decryptsession(remotename, deskey)
- const char *remotename;
- des_block *deskey;
-{
- cryptkeyarg arg;
- cryptkeyres res;
-
- arg.remotename = (char *) remotename;
- arg.deskey = *deskey;
- if (!key_call((u_long)KEY_DECRYPT, xdr_cryptkeyarg, (char *)&arg,
- xdr_cryptkeyres, (char *)&res)) {
- return (-1);
- }
- if (res.status != KEY_SUCCESS) {
- debug("decrypt status is nonzero");
- return (-1);
- }
- *deskey = res.cryptkeyres_u.deskey;
- return (0);
-}
-
-int
-key_gendes(key)
- des_block *key;
-{
- if (!key_call((u_long)KEY_GEN, xdr_void, (char *)NULL,
- xdr_des_block, (char *)key)) {
- return (-1);
- }
- return (0);
-}
-
-int
-key_setnet(arg)
-struct netstarg *arg;
-{
- keystatus status;
-
-
- if (!key_call((u_long) KEY_NET_PUT, xdr_key_netstarg, (char *) arg,
- xdr_keystatus, (char *) &status)){
- return (-1);
- }
-
- if (status != KEY_SUCCESS) {
- debug("key_setnet status is nonzero");
- return (-1);
- }
- return (1);
-}
-
-
-int
-key_get_conv(pkey, deskey)
- char *pkey;
- des_block *deskey;
-{
- cryptkeyres res;
-
- if (!key_call((u_long) KEY_GET_CONV, xdr_keybuf, pkey,
- xdr_cryptkeyres, (char *)&res)) {
- return (-1);
- }
- if (res.status != KEY_SUCCESS) {
- debug("get_conv status is nonzero");
- return (-1);
- }
- *deskey = res.cryptkeyres_u.deskey;
- return (0);
-}
-
-struct key_call_private {
- CLIENT *client; /* Client handle */
- pid_t pid; /* process-id at moment of creation */
- uid_t uid; /* user-id at last authorization */
-};
-static struct key_call_private *key_call_private_main = NULL;
-
-#ifdef foo
-static void
-key_call_destroy(void *vp)
-{
- register struct key_call_private *kcp = (struct key_call_private *)vp;
-
- if (kcp) {
- if (kcp->client)
- clnt_destroy(kcp->client);
- free(kcp);
- }
-}
-#endif
-
-/*
- * Keep the handle cached. This call may be made quite often.
- */
-static CLIENT *
-getkeyserv_handle(vers)
-int vers;
-{
- struct key_call_private *kcp = key_call_private_main;
- struct timeval wait_time;
- int fd;
- struct sockaddr_un name;
- int namelen = sizeof(struct sockaddr_un);
-
-#define TOTAL_TIMEOUT 30 /* total timeout talking to keyserver */
-#define TOTAL_TRIES 5 /* Number of tries */
-
- if (kcp == (struct key_call_private *)NULL) {
- kcp = (struct key_call_private *)malloc(sizeof (*kcp));
- if (kcp == (struct key_call_private *)NULL) {
- return ((CLIENT *) NULL);
- }
- key_call_private_main = kcp;
- kcp->client = NULL;
- }
-
- /* if pid has changed, destroy client and rebuild */
- if (kcp->client != NULL && kcp->pid != getpid()) {
- clnt_destroy(kcp->client);
- kcp->client = NULL;
- }
-
- if (kcp->client != NULL) {
- /* if other side closed socket, build handle again */
- clnt_control(kcp->client, CLGET_FD, (char *)&fd);
- if (getpeername(fd,(struct sockaddr *)&name,&namelen) == -1) {
- auth_destroy(kcp->client->cl_auth);
- clnt_destroy(kcp->client);
- kcp->client = NULL;
- }
- }
-
- if (kcp->client != NULL) {
- /* if uid has changed, build client handle again */
- if (kcp->uid != geteuid()) {
- kcp->uid = geteuid();
- auth_destroy(kcp->client->cl_auth);
- kcp->client->cl_auth =
- authsys_create("", kcp->uid, 0, 0, NULL);
- if (kcp->client->cl_auth == NULL) {
- clnt_destroy(kcp->client);
- kcp->client = NULL;
- return ((CLIENT *) NULL);
- }
- }
- /* Change the version number to the new one */
- clnt_control(kcp->client, CLSET_VERS, (void *)&vers);
- return (kcp->client);
- }
-
- if ((kcp->client == (CLIENT *) NULL))
- /* Use the AF_UNIX transport */
- kcp->client = clnt_create("/var/run/keyservsock", KEY_PROG,
- vers, "unix");
-
- if (kcp->client == (CLIENT *) NULL) {
- return ((CLIENT *) NULL);
- }
- kcp->uid = geteuid();
- kcp->pid = getpid();
- kcp->client->cl_auth = authsys_create("", kcp->uid, 0, 0, NULL);
- if (kcp->client->cl_auth == NULL) {
- clnt_destroy(kcp->client);
- kcp->client = NULL;
- return ((CLIENT *) NULL);
- }
-
- wait_time.tv_sec = TOTAL_TIMEOUT/TOTAL_TRIES;
- wait_time.tv_usec = 0;
- (void) clnt_control(kcp->client, CLSET_RETRY_TIMEOUT,
- (char *)&wait_time);
- if (clnt_control(kcp->client, CLGET_FD, (char *)&fd))
- fcntl(fd, F_SETFD, 1); /* make it "close on exec" */
-
- return (kcp->client);
-}
-
-/* returns 0 on failure, 1 on success */
-
-static int
-key_call(proc, xdr_arg, arg, xdr_rslt, rslt)
- u_long proc;
- xdrproc_t xdr_arg;
- char *arg;
- xdrproc_t xdr_rslt;
- char *rslt;
-{
- CLIENT *clnt;
- struct timeval wait_time;
-
- if (proc == KEY_ENCRYPT_PK && __key_encryptsession_pk_LOCAL) {
- cryptkeyres *res;
- res = (*__key_encryptsession_pk_LOCAL)(geteuid(), arg);
- *(cryptkeyres*)rslt = *res;
- return (1);
- } else if (proc == KEY_DECRYPT_PK && __key_decryptsession_pk_LOCAL) {
- cryptkeyres *res;
- res = (*__key_decryptsession_pk_LOCAL)(geteuid(), arg);
- *(cryptkeyres*)rslt = *res;
- return (1);
- } else if (proc == KEY_GEN && __key_gendes_LOCAL) {
- des_block *res;
- res = (*__key_gendes_LOCAL)(geteuid(), 0);
- *(des_block*)rslt = *res;
- return (1);
- }
-
- if ((proc == KEY_ENCRYPT_PK) || (proc == KEY_DECRYPT_PK) ||
- (proc == KEY_NET_GET) || (proc == KEY_NET_PUT) ||
- (proc == KEY_GET_CONV))
- clnt = getkeyserv_handle(2); /* talk to version 2 */
- else
- clnt = getkeyserv_handle(1); /* talk to version 1 */
-
- if (clnt == NULL) {
- return (0);
- }
-
- wait_time.tv_sec = TOTAL_TIMEOUT;
- wait_time.tv_usec = 0;
-
- if (clnt_call(clnt, proc, xdr_arg, arg, xdr_rslt, rslt,
- wait_time) == RPC_SUCCESS) {
- return (1);
- } else {
- return (0);
- }
-}
diff --git a/lib/libc/rpc/key_prot_xdr.c b/lib/libc/rpc/key_prot_xdr.c
deleted file mode 100644
index 8cd6b6b..0000000
--- a/lib/libc/rpc/key_prot_xdr.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include <rpc/key_prot.h>
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI"
-
-/* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */
-
-/*
- * Compiled from key_prot.x using rpcgen.
- * DO NOT EDIT THIS FILE!
- * This is NOT source code!
- */
-
-bool_t
-xdr_keystatus(register XDR *xdrs, keystatus *objp)
-{
-
- if (!xdr_enum(xdrs, (enum_t *)objp))
- return (FALSE);
- return (TRUE);
-}
-
-bool_t
-xdr_keybuf(register XDR *xdrs, keybuf objp)
-{
-
- if (!xdr_opaque(xdrs, objp, HEXKEYBYTES))
- return (FALSE);
- return (TRUE);
-}
-
-bool_t
-xdr_netnamestr(register XDR *xdrs, netnamestr *objp)
-{
-
- if (!xdr_string(xdrs, objp, MAXNETNAMELEN))
- return (FALSE);
- return (TRUE);
-}
-
-bool_t
-xdr_cryptkeyarg(register XDR *xdrs, cryptkeyarg *objp)
-{
-
- if (!xdr_netnamestr(xdrs, &objp->remotename))
- return (FALSE);
- if (!xdr_des_block(xdrs, &objp->deskey))
- return (FALSE);
- return (TRUE);
-}
-
-bool_t
-xdr_cryptkeyarg2(register XDR *xdrs, cryptkeyarg2 *objp)
-{
-
- if (!xdr_netnamestr(xdrs, &objp->remotename))
- return (FALSE);
- if (!xdr_netobj(xdrs, &objp->remotekey))
- return (FALSE);
- if (!xdr_des_block(xdrs, &objp->deskey))
- return (FALSE);
- return (TRUE);
-}
-
-bool_t
-xdr_cryptkeyres(register XDR *xdrs, cryptkeyres *objp)
-{
-
- if (!xdr_keystatus(xdrs, &objp->status))
- return (FALSE);
- switch (objp->status) {
- case KEY_SUCCESS:
- if (!xdr_des_block(xdrs, &objp->cryptkeyres_u.deskey))
- return (FALSE);
- break;
- }
- return (TRUE);
-}
-
-bool_t
-xdr_unixcred(register XDR *xdrs, unixcred *objp)
-{
-
- if (!xdr_u_int(xdrs, &objp->uid))
- return (FALSE);
- if (!xdr_u_int(xdrs, &objp->gid))
- return (FALSE);
- if (!xdr_array(xdrs, (char **)&objp->gids.gids_val, (u_int *) &objp->gids.gids_len, MAXGIDS,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return (FALSE);
- return (TRUE);
-}
-
-bool_t
-xdr_getcredres(register XDR *xdrs, getcredres *objp)
-{
-
- if (!xdr_keystatus(xdrs, &objp->status))
- return (FALSE);
- switch (objp->status) {
- case KEY_SUCCESS:
- if (!xdr_unixcred(xdrs, &objp->getcredres_u.cred))
- return (FALSE);
- break;
- }
- return (TRUE);
-}
-
-bool_t
-xdr_key_netstarg(register XDR *xdrs, key_netstarg *objp)
-{
-
- if (!xdr_keybuf(xdrs, objp->st_priv_key))
- return (FALSE);
- if (!xdr_keybuf(xdrs, objp->st_pub_key))
- return (FALSE);
- if (!xdr_netnamestr(xdrs, &objp->st_netname))
- return (FALSE);
- return (TRUE);
-}
-
-bool_t
-xdr_key_netstres(register XDR *xdrs, key_netstres *objp)
-{
-
- if (!xdr_keystatus(xdrs, &objp->status))
- return (FALSE);
- switch (objp->status) {
- case KEY_SUCCESS:
- if (!xdr_key_netstarg(xdrs, &objp->key_netstres_u.knet))
- return (FALSE);
- break;
- }
- return (TRUE);
-}
diff --git a/lib/libc/rpc/netname.c b/lib/libc/rpc/netname.c
deleted file mode 100644
index 3a3942b..0000000
--- a/lib/libc/rpc/netname.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user or with the express written consent of
- * Sun Microsystems, Inc.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)netname.c 1.8 91/03/11 Copyr 1986 Sun Micro";
-#endif
-
-/*
- * netname utility routines
- * convert from unix names to network names and vice-versa
- * This module is operating system dependent!
- * What we define here will work with any unix system that has adopted
- * the sun NIS domain architecture.
- */
-
-#include <sys/param.h>
-#include <rpc/rpc.h>
-#include <rpc/rpc_com.h>
-#ifdef YP
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 256
-#endif
-#ifndef NGROUPS
-#define NGROUPS 16
-#endif
-
-static char *OPSYS = "unix";
-
-/*
- * Figure out my fully qualified network name
- */
-int
-getnetname(name)
- char name[MAXNETNAMELEN+1];
-{
- uid_t uid;
-
- uid = geteuid();
- if (uid == 0) {
- return (host2netname(name, (char *) NULL, (char *) NULL));
- } else {
- return (user2netname(name, uid, (char *) NULL));
- }
-}
-
-
-/*
- * Convert unix cred to network-name
- */
-int
-user2netname(netname, uid, domain)
- char netname[MAXNETNAMELEN + 1];
- uid_t uid;
- char *domain;
-{
- char *dfltdom;
-
-#define MAXIPRINT (11) /* max length of printed integer */
-
- if (domain == NULL) {
- if (_rpc_get_default_domain(&dfltdom) != 0) {
- return (0);
- }
- domain = dfltdom;
- }
- if (strlen(domain) + 1 + MAXIPRINT > MAXNETNAMELEN) {
- return (0);
- }
- (void) sprintf(netname, "%s.%ld@%s", OPSYS, uid, domain);
- return (1);
-}
-
-
-/*
- * Convert host to network-name
- */
-int
-host2netname(netname, host, domain)
- char netname[MAXNETNAMELEN + 1];
- char *host;
- char *domain;
-{
- char *dfltdom;
- char hostname[MAXHOSTNAMELEN+1];
-
- if (domain == NULL) {
- if (_rpc_get_default_domain(&dfltdom) != 0) {
- return (0);
- }
- domain = dfltdom;
- }
- if (host == NULL) {
- (void) gethostname(hostname, sizeof(hostname));
- host = hostname;
- }
- if (strlen(domain) + 1 + strlen(host) > MAXNETNAMELEN) {
- return (0);
- }
- (void) sprintf(netname, "%s.%s@%s", OPSYS, host, domain);
- return (1);
-}
diff --git a/lib/libc/rpc/netnamer.c b/lib/libc/rpc/netnamer.c
deleted file mode 100644
index 41c5146..0000000
--- a/lib/libc/rpc/netnamer.c
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user or with the express written consent of
- * Sun Microsystems, Inc.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)netnamer.c 1.13 91/03/11 Copyr 1986 Sun Micro";
-#endif
-/*
- * netname utility routines convert from unix names to network names and
- * vice-versa This module is operating system dependent! What we define here
- * will work with any unix system that has adopted the sun NIS domain
- * architecture.
- */
-#include <sys/param.h>
-#include <rpc/rpc.h>
-#include <rpc/rpc_com.h>
-#ifdef YP
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#endif
-#include <ctype.h>
-#include <stdio.h>
-#include <grp.h>
-#include <pwd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-static char *OPSYS = "unix";
-static char *NETID = "netid.byname";
-static char *NETIDFILE = "/etc/netid";
-
-static int getnetid __P(( char *, char * ));
-static int _getgroups __P(( char *, gid_t * ));
-
-#ifndef NGROUPS
-#define NGROUPS 16
-#endif
-
-/*
- * Convert network-name into unix credential
- */
-int
-netname2user(netname, uidp, gidp, gidlenp, gidlist)
- char netname[MAXNETNAMELEN + 1];
- uid_t *uidp;
- gid_t *gidp;
- int *gidlenp;
- gid_t *gidlist;
-{
- char *p;
- int gidlen;
- uid_t uid;
- struct passwd *pwd;
- char val[1024];
- char *val1, *val2;
- char *domain;
- int vallen;
- int err;
-
- if (getnetid(netname, val)) {
- p = strtok(val, ":");
- if (p == NULL)
- return (0);
- *uidp = (uid_t) atol(val);
- p = strtok(NULL, "\n,");
- *gidp = (gid_t) atol(p);
- if (p == NULL) {
- return (0);
- }
- gidlen = 0;
- for (gidlen = 0; gidlen < NGROUPS; gidlen++) {
- p = strtok(NULL, "\n,");
- if (p == NULL)
- break;
- gidlist[gidlen] = (gid_t) atol(p);
- }
- *gidlenp = gidlen;
-
- return (1);
- }
- val1 = strchr(netname, '.');
- if (val1 == NULL)
- return (0);
- if (strncmp(netname, OPSYS, (val1-netname)))
- return (0);
- val1++;
- val2 = strchr(val1, '@');
- if (val2 == NULL)
- return (0);
- vallen = val2 - val1;
- if (vallen > (1024 - 1))
- vallen = 1024 - 1;
- (void) strncpy(val, val1, 1024);
- val[vallen] = 0;
-
- err = _rpc_get_default_domain(&domain); /* change to rpc */
- if (err)
- return (0);
-
- if (strcmp(val2 + 1, domain))
- return (0); /* wrong domain */
-
- /* XXX: uid_t have different sizes on different OS's. sigh! */
- if (sizeof (uid_t) == sizeof (short)) {
- if (sscanf(val, "%hd", (short *)&uid) != 1)
- return (0);
- } else {
- if (sscanf(val, "%ld", &uid) != 1)
- return (0);
- }
- /* use initgroups method */
- pwd = getpwuid(uid);
- if (pwd == NULL)
- return (0);
- *uidp = pwd->pw_uid;
- *gidp = pwd->pw_gid;
- *gidlenp = _getgroups(pwd->pw_name, gidlist);
- return (1);
-}
-
-/*
- * initgroups
- */
-
-static int
-_getgroups(uname, groups)
- char *uname;
- gid_t groups[NGROUPS];
-{
- gid_t ngroups = 0;
- register struct group *grp;
- register int i;
- register int j;
- int filter;
-
- setgrent();
- while ((grp = getgrent())) {
- for (i = 0; grp->gr_mem[i]; i++)
- if (!strcmp(grp->gr_mem[i], uname)) {
- if (ngroups == NGROUPS) {
-#ifdef DEBUG
- fprintf(stderr,
- "initgroups: %s is in too many groups\n", uname);
-#endif
- goto toomany;
- }
- /* filter out duplicate group entries */
- filter = 0;
- for (j = 0; j < ngroups; j++)
- if (groups[j] == grp->gr_gid) {
- filter++;
- break;
- }
- if (!filter)
- groups[ngroups++] = grp->gr_gid;
- }
- }
-toomany:
- endgrent();
- return (ngroups);
-}
-
-/*
- * Convert network-name to hostname
- */
-int
-netname2host(netname, hostname, hostlen)
- char netname[MAXNETNAMELEN + 1];
- char *hostname;
- int hostlen;
-{
- int err;
- char valbuf[1024];
- char *val;
- char *val2;
- int vallen;
- char *domain;
-
- if (getnetid(netname, valbuf)) {
- val = valbuf;
- if ((*val == '0') && (val[1] == ':')) {
- (void) strncpy(hostname, val + 2, hostlen);
- return (1);
- }
- }
- val = strchr(netname, '.');
- if (val == NULL)
- return (0);
- if (strncmp(netname, OPSYS, (val - netname)))
- return (0);
- val++;
- val2 = strchr(val, '@');
- if (val2 == NULL)
- return (0);
- vallen = val2 - val;
- if (vallen > (hostlen - 1))
- vallen = hostlen - 1;
- (void) strncpy(hostname, val, vallen);
- hostname[vallen] = 0;
-
- err = _rpc_get_default_domain(&domain); /* change to rpc */
- if (err)
- return (0);
-
- if (strcmp(val2 + 1, domain))
- return (0); /* wrong domain */
- else
- return (1);
-}
-
-/*
- * reads the file /etc/netid looking for a + to optionally go to the
- * network information service.
- */
-int
-getnetid(key, ret)
- char *key, *ret;
-{
- char buf[1024]; /* big enough */
- char *res;
- char *mkey;
- char *mval;
- FILE *fd;
-#ifdef YP
- char *domain;
- int err;
- char *lookup;
- int len;
-#endif
-
- fd = fopen(NETIDFILE, "r");
- if (fd == (FILE *) 0) {
-#ifdef YP
- res = "+";
- goto getnetidyp;
-#else
- return (0);
-#endif
- }
- for (;;) {
- if (fd == (FILE *) 0)
- return (0); /* getnetidyp brings us here */
- res = fgets(buf, 1024, fd);
- if (res == 0) {
- fclose(fd);
- return (0);
- }
- if (res[0] == '#')
- continue;
- else if (res[0] == '+') {
-#ifdef YP
- getnetidyp:
- err = yp_get_default_domain(&domain);
- if (err) {
- continue;
- }
- lookup = NULL;
- err = yp_match(domain, NETID, key,
- strlen(key), &lookup, &len);
- if (err) {
-#ifdef DEBUG
- fprintf(stderr, "match failed error %d\n", err);
-#endif
- continue;
- }
- lookup[len] = 0;
- strcpy(ret, lookup);
- free(lookup);
- if (fd != NULL)
- fclose(fd);
- return (2);
-#else /* YP */
-#ifdef DEBUG
- fprintf(stderr,
-"Bad record in %s '+' -- NIS not supported in this library copy\n",
- NETIDFILE);
-#endif
- continue;
-#endif /* YP */
- } else {
- mkey = strtok(buf, "\t ");
- if (mkey == NULL) {
- fprintf(stderr,
- "Bad record in %s -- %s", NETIDFILE, buf);
- continue;
- }
- mval = strtok(NULL, " \t#\n");
- if (mval == NULL) {
- fprintf(stderr,
- "Bad record in %s val problem - %s", NETIDFILE, buf);
- continue;
- }
- if (strcmp(mkey, key) == 0) {
- strcpy(ret, mval);
- fclose(fd);
- return (1);
-
- }
- }
- }
-}
diff --git a/lib/libc/rpc/pmap_clnt.c b/lib/libc/rpc/pmap_clnt.c
deleted file mode 100644
index 9901d81..0000000
--- a/lib/libc/rpc/pmap_clnt.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)pmap_clnt.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: pmap_clnt.c,v 1.5 1996/12/30 14:46:33 peter Exp $";
-#endif
-
-/*
- * pmap_clnt.c
- * Client interface to pmap rpc service.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
-#include <netinet/in.h>
-
-static struct timeval timeout = { 5, 0 };
-static struct timeval tottimeout = { 60, 0 };
-
-void clnt_perror();
-
-#ifndef PORTMAPSOCK
-#define PORTMAPSOCK "/var/run/portmapsock"
-#endif
-
-/*
- * Set a mapping between program,version and port.
- * Calls the pmap service remotely to do the mapping.
- */
-bool_t
-pmap_set(program, version, protocol, port)
- u_long program;
- u_long version;
- int protocol;
- u_short port;
-{
- struct sockaddr_in myaddress;
- int socket = -1;
- register CLIENT *client;
- struct pmap parms;
- bool_t rslt;
- struct stat st;
-
- /*
- * Temporary hack for backwards compatibility. Eventually
- * this test will go away and we'll use only the "unix" transport.
- */
- if (stat(PORTMAPSOCK, &st) == 0 && st.st_mode & S_IFSOCK)
- client = clnt_create(PORTMAPSOCK, PMAPPROG, PMAPVERS, "unix");
- else {
- if (get_myaddress(&myaddress) != 0)
- return (FALSE);
- myaddress.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- client = clntudp_bufcreate(&myaddress, PMAPPROG, PMAPVERS,
- timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
- }
-
- if (client == (CLIENT *)NULL)
- return (FALSE);
- parms.pm_prog = program;
- parms.pm_vers = version;
- parms.pm_prot = protocol;
- parms.pm_port = port;
- if (CLNT_CALL(client, PMAPPROC_SET, xdr_pmap, &parms, xdr_bool, &rslt,
- tottimeout) != RPC_SUCCESS) {
- clnt_perror(client, "Cannot register service");
- return (FALSE);
- }
- CLNT_DESTROY(client);
- if (socket != -1)
- (void)close(socket);
- return (rslt);
-}
-
-/*
- * Remove the mapping between program,version and port.
- * Calls the pmap service remotely to do the un-mapping.
- */
-bool_t
-pmap_unset(program, version)
- u_long program;
- u_long version;
-{
- struct sockaddr_in myaddress;
- int socket = -1;
- register CLIENT *client;
- struct pmap parms;
- bool_t rslt;
- struct stat st;
-
- /*
- * Temporary hack for backwards compatibility. Eventually
- * this test will go away and we'll use only the "unix" transport.
- */
- if (stat(PORTMAPSOCK, &st) == 0 && st.st_mode & S_IFSOCK)
- client = clnt_create(PORTMAPSOCK, PMAPPROG, PMAPVERS, "unix");
- else {
- if (get_myaddress(&myaddress) != 0)
- return (FALSE);
- myaddress.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- client = clntudp_bufcreate(&myaddress, PMAPPROG, PMAPVERS,
- timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
- }
- if (client == (CLIENT *)NULL)
- return (FALSE);
- parms.pm_prog = program;
- parms.pm_vers = version;
- parms.pm_port = parms.pm_prot = 0;
- CLNT_CALL(client, PMAPPROC_UNSET, xdr_pmap, &parms, xdr_bool, &rslt,
- tottimeout);
- CLNT_DESTROY(client);
- if (socket != -1)
- (void)close(socket);
- return (rslt);
-}
diff --git a/lib/libc/rpc/pmap_getmaps.c b/lib/libc/rpc/pmap_getmaps.c
deleted file mode 100644
index d4f2774..0000000
--- a/lib/libc/rpc/pmap_getmaps.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)pmap_getmaps.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: pmap_getmaps.c,v 1.5 1996/12/30 14:48:28 peter Exp $";
-#endif
-
-/*
- * pmap_getmap.c
- * Client interface to pmap rpc service.
- * contains pmap_getmaps, which is only tcp service involved
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <net/if.h>
-#include <sys/ioctl.h>
-#define NAMELEN 255
-#define MAX_BROADCAST_SIZE 1400
-
-/*
- * Get a copy of the current port maps.
- * Calls the pmap service remotely to do get the maps.
- */
-struct pmaplist *
-pmap_getmaps(address)
- struct sockaddr_in *address;
-{
- struct pmaplist *head = (struct pmaplist *)NULL;
- int socket = -1;
- struct timeval minutetimeout;
- register CLIENT *client;
-
- minutetimeout.tv_sec = 60;
- minutetimeout.tv_usec = 0;
- address->sin_port = htons(PMAPPORT);
- client = clnttcp_create(address, PMAPPROG,
- PMAPVERS, &socket, 50, 500);
- if (client != (CLIENT *)NULL) {
- if (CLNT_CALL(client, PMAPPROC_DUMP, xdr_void, NULL, xdr_pmaplist,
- &head, minutetimeout) != RPC_SUCCESS) {
- clnt_perror(client, "pmap_getmaps rpc problem");
- }
- CLNT_DESTROY(client);
- }
- if (socket != -1)
- (void)close(socket);
- address->sin_port = 0;
- return (head);
-}
diff --git a/lib/libc/rpc/pmap_getport.c b/lib/libc/rpc/pmap_getport.c
deleted file mode 100644
index 3d4c48a..0000000
--- a/lib/libc/rpc/pmap_getport.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)pmap_getport.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: pmap_getport.c,v 1.4 1996/12/30 14:49:24 peter Exp $";
-#endif
-
-/*
- * pmap_getport.c
- * Client interface to pmap rpc service.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <unistd.h>
-
-static struct timeval timeout = { 5, 0 };
-static struct timeval tottimeout = { 60, 0 };
-
-/*
- * Find the mapped port for program,version.
- * Calls the pmap service remotely to do the lookup.
- * Returns 0 if no map exists.
- */
-u_short
-pmap_getport(address, program, version, protocol)
- struct sockaddr_in *address;
- u_long program;
- u_long version;
- u_int protocol;
-{
- u_short port = 0;
- int socket = -1;
- register CLIENT *client;
- struct pmap parms;
-
- address->sin_port = htons(PMAPPORT);
- client = clntudp_bufcreate(address, PMAPPROG,
- PMAPVERS, timeout, &socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
- if (client != (CLIENT *)NULL) {
- parms.pm_prog = program;
- parms.pm_vers = version;
- parms.pm_prot = protocol;
- parms.pm_port = 0; /* not needed or used */
- if (CLNT_CALL(client, PMAPPROC_GETPORT, xdr_pmap, &parms,
- xdr_u_short, &port, tottimeout) != RPC_SUCCESS){
- rpc_createerr.cf_stat = RPC_PMAPFAILURE;
- clnt_geterr(client, &rpc_createerr.cf_error);
- } else if (port == 0) {
- rpc_createerr.cf_stat = RPC_PROGNOTREGISTERED;
- }
- CLNT_DESTROY(client);
- }
- if (socket != -1)
- (void)close(socket);
- address->sin_port = 0;
- return (port);
-}
diff --git a/lib/libc/rpc/pmap_prot.c b/lib/libc/rpc/pmap_prot.c
deleted file mode 100644
index fcb9c99..0000000
--- a/lib/libc/rpc/pmap_prot.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)pmap_prot.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: pmap_prot.c,v 1.2 1995/05/30 05:41:25 rgrimes Exp $";
-#endif
-
-/*
- * pmap_prot.c
- * Protocol for the local binder service, or pmap.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/pmap_prot.h>
-
-
-bool_t
-xdr_pmap(xdrs, regs)
- XDR *xdrs;
- struct pmap *regs;
-{
-
- if (xdr_u_long(xdrs, &regs->pm_prog) &&
- xdr_u_long(xdrs, &regs->pm_vers) &&
- xdr_u_long(xdrs, &regs->pm_prot))
- return (xdr_u_long(xdrs, &regs->pm_port));
- return (FALSE);
-}
diff --git a/lib/libc/rpc/pmap_prot2.c b/lib/libc/rpc/pmap_prot2.c
deleted file mode 100644
index d81f612..0000000
--- a/lib/libc/rpc/pmap_prot2.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)pmap_prot2.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: pmap_prot2.c,v 1.3 1996/06/10 20:13:05 jraynard Exp $";
-#endif
-
-/*
- * pmap_prot2.c
- * Protocol for the local binder service, or pmap.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/pmap_prot.h>
-
-
-/*
- * What is going on with linked lists? (!)
- * First recall the link list declaration from pmap_prot.h:
- *
- * struct pmaplist {
- * struct pmap pml_map;
- * struct pmaplist *pml_map;
- * };
- *
- * Compare that declaration with a corresponding xdr declaration that
- * is (a) pointer-less, and (b) recursive:
- *
- * typedef union switch (bool_t) {
- *
- * case TRUE: struct {
- * struct pmap;
- * pmaplist_t foo;
- * };
- *
- * case FALSE: struct {};
- * } pmaplist_t;
- *
- * Notice that the xdr declaration has no nxt pointer while
- * the C declaration has no bool_t variable. The bool_t can be
- * interpreted as ``more data follows me''; if FALSE then nothing
- * follows this bool_t; if TRUE then the bool_t is followed by
- * an actual struct pmap, and then (recursively) by the
- * xdr union, pamplist_t.
- *
- * This could be implemented via the xdr_union primitive, though this
- * would cause a one recursive call per element in the list. Rather than do
- * that we can ``unwind'' the recursion
- * into a while loop and do the union arms in-place.
- *
- * The head of the list is what the C programmer wishes to past around
- * the net, yet is the data that the pointer points to which is interesting;
- * this sounds like a job for xdr_reference!
- */
-bool_t
-xdr_pmaplist(xdrs, rp)
- register XDR *xdrs;
- register struct pmaplist **rp;
-{
- /*
- * more_elements is pre-computed in case the direction is
- * XDR_ENCODE or XDR_FREE. more_elements is overwritten by
- * xdr_bool when the direction is XDR_DECODE.
- */
- bool_t more_elements;
- register int freeing = (xdrs->x_op == XDR_FREE);
- register struct pmaplist **next = NULL;
-
- while (TRUE) {
- more_elements = (bool_t)(*rp != NULL);
- if (! xdr_bool(xdrs, &more_elements))
- return (FALSE);
- if (! more_elements)
- return (TRUE); /* we are done */
- /*
- * the unfortunate side effect of non-recursion is that in
- * the case of freeing we must remember the next object
- * before we free the current object ...
- */
- if (freeing)
- next = &((*rp)->pml_next);
- if (! xdr_reference(xdrs, (caddr_t *)rp,
- (u_int)sizeof(struct pmaplist), xdr_pmap))
- return (FALSE);
- rp = (freeing) ? next : &((*rp)->pml_next);
- }
-}
diff --git a/lib/libc/rpc/pmap_rmt.c b/lib/libc/rpc/pmap_rmt.c
deleted file mode 100644
index 07a81e2..0000000
--- a/lib/libc/rpc/pmap_rmt.c
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)pmap_rmt.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: pmap_rmt.c,v 1.9 1996/12/30 14:53:20 peter Exp $";
-#endif
-
-/*
- * pmap_rmt.c
- * Client interface to pmap rpc service.
- * remote call and broadcast service
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <rpc/rpc.h>
-#include <rpc/pmap_prot.h>
-#include <rpc/pmap_clnt.h>
-#include <rpc/pmap_rmt.h>
-#include <sys/socket.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <net/if.h>
-#include <sys/ioctl.h>
-#include <arpa/inet.h>
-#define MAX_BROADCAST_SIZE 1400
-
-static struct timeval timeout = { 3, 0 };
-
-/*
- * pmapper remote-call-service interface.
- * This routine is used to call the pmapper remote call service
- * which will look up a service program in the port maps, and then
- * remotely call that routine with the given parameters. This allows
- * programs to do a lookup and call in one step.
-*/
-enum clnt_stat
-pmap_rmtcall(addr, prog, vers, proc, xdrargs, argsp, xdrres, resp, tout, port_ptr)
- struct sockaddr_in *addr;
- u_long prog, vers, proc;
- xdrproc_t xdrargs, xdrres;
- caddr_t argsp, resp;
- struct timeval tout;
- u_long *port_ptr;
-{
- int socket = -1;
- register CLIENT *client;
- struct rmtcallargs a;
- struct rmtcallres r;
- enum clnt_stat stat;
-
- addr->sin_port = htons(PMAPPORT);
- client = clntudp_create(addr, PMAPPROG, PMAPVERS, timeout, &socket);
- if (client != (CLIENT *)NULL) {
- a.prog = prog;
- a.vers = vers;
- a.proc = proc;
- a.args_ptr = argsp;
- a.xdr_args = xdrargs;
- r.port_ptr = port_ptr;
- r.results_ptr = resp;
- r.xdr_results = xdrres;
- stat = CLNT_CALL(client, PMAPPROC_CALLIT, xdr_rmtcall_args, &a,
- xdr_rmtcallres, &r, tout);
- CLNT_DESTROY(client);
- } else {
- stat = RPC_FAILED;
- }
- if (socket != -1)
- (void)close(socket);
- addr->sin_port = 0;
- return (stat);
-}
-
-
-/*
- * XDR remote call arguments
- * written for XDR_ENCODE direction only
- */
-bool_t
-xdr_rmtcall_args(xdrs, cap)
- register XDR *xdrs;
- register struct rmtcallargs *cap;
-{
- u_int lenposition, argposition, position;
-
- if (xdr_u_long(xdrs, &(cap->prog)) &&
- xdr_u_long(xdrs, &(cap->vers)) &&
- xdr_u_long(xdrs, &(cap->proc))) {
- lenposition = XDR_GETPOS(xdrs);
- if (! xdr_u_long(xdrs, &(cap->arglen)))
- return (FALSE);
- argposition = XDR_GETPOS(xdrs);
- if (! (*(cap->xdr_args))(xdrs, cap->args_ptr))
- return (FALSE);
- position = XDR_GETPOS(xdrs);
- cap->arglen = (u_long)position - (u_long)argposition;
- XDR_SETPOS(xdrs, lenposition);
- if (! xdr_u_long(xdrs, &(cap->arglen)))
- return (FALSE);
- XDR_SETPOS(xdrs, position);
- return (TRUE);
- }
- return (FALSE);
-}
-
-/*
- * XDR remote call results
- * written for XDR_DECODE direction only
- */
-bool_t
-xdr_rmtcallres(xdrs, crp)
- register XDR *xdrs;
- register struct rmtcallres *crp;
-{
- caddr_t port_ptr;
-
- port_ptr = (caddr_t)crp->port_ptr;
- if (xdr_reference(xdrs, &port_ptr, sizeof (u_long),
- xdr_u_long) && xdr_u_long(xdrs, &crp->resultslen)) {
- crp->port_ptr = (u_long *)port_ptr;
- return ((*(crp->xdr_results))(xdrs, crp->results_ptr));
- }
- return (FALSE);
-}
-
-
-/*
- * The following is kludged-up support for simple rpc broadcasts.
- * Someday a large, complicated system will replace these trivial
- * routines which only support udp/ip .
- */
-
-static int
-getbroadcastnets(addrs, sock, buf)
- struct in_addr *addrs;
- int sock; /* any valid socket will do */
- char *buf; /* why allocxate more when we can use existing... */
-{
- struct ifconf ifc;
- struct ifreq ifreq, *ifr;
- struct sockaddr_in *sin;
- struct in_addr addr;
- char *cp, *cplim;
- int n, i = 0;
-
- ifc.ifc_len = UDPMSGSIZE;
- ifc.ifc_buf = buf;
- if (ioctl(sock, SIOCGIFCONF, (char *)&ifc) < 0) {
- perror("broadcast: ioctl (get interface configuration)");
- return (0);
- }
-#define max(a, b) (a > b ? a : b)
-#define size(p) max((p).sa_len, sizeof(p))
- cplim = buf + ifc.ifc_len; /*skip over if's with big ifr_addr's */
- for (cp = buf; cp < cplim;
- cp += sizeof (ifr->ifr_name) + size(ifr->ifr_addr)) {
- ifr = (struct ifreq *)cp;
- if (ifr->ifr_addr.sa_family != AF_INET)
- continue;
- ifreq = *ifr;
- if (ioctl(sock, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
- perror("broadcast: ioctl (get interface flags)");
- continue;
- }
- if ((ifreq.ifr_flags & IFF_BROADCAST) &&
- (ifreq.ifr_flags & IFF_UP)) {
- sin = (struct sockaddr_in *)&ifr->ifr_addr;
-#ifdef SIOCGIFBRDADDR /* 4.3BSD */
- if (ioctl(sock, SIOCGIFBRDADDR, (char *)&ifreq) < 0) {
- addr =
- inet_makeaddr(inet_netof(sin->sin_addr),
- INADDR_ANY);
- } else {
- addr = ((struct sockaddr_in*)
- &ifreq.ifr_addr)->sin_addr;
- }
-#else /* 4.2 BSD */
- addr = inet_makeaddr(inet_netof(sin->sin_addr),
- INADDR_ANY);
-#endif
- for (n=i-1; n>=0; n--) {
- if (addr.s_addr == addrs[n].s_addr)
- break;
- }
- if (n<0) {
- addrs[i++] = addr;
- }
- }
- }
- return (i);
-}
-
-typedef bool_t (*resultproc_t)();
-
-enum clnt_stat
-clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
- u_long prog; /* program number */
- u_long vers; /* version number */
- u_long proc; /* procedure number */
- xdrproc_t xargs; /* xdr routine for args */
- caddr_t argsp; /* pointer to args */
- xdrproc_t xresults; /* xdr routine for results */
- caddr_t resultsp; /* pointer to results */
- resultproc_t eachresult; /* call with each result obtained */
-{
- enum clnt_stat stat;
- AUTH *unix_auth = authunix_create_default();
- XDR xdr_stream;
- register XDR *xdrs = &xdr_stream;
- int outlen, inlen, fromlen, nets;
- register int sock;
- int on = 1;
- fd_set *fds, readfds;
- register int i;
- bool_t done = FALSE;
- register u_long xid;
- u_long port;
- struct in_addr addrs[20];
- struct sockaddr_in baddr, raddr; /* broadcast and response addresses */
- struct rmtcallargs a;
- struct rmtcallres r;
- struct rpc_msg msg;
- struct timeval t, tv;
- char outbuf[MAX_BROADCAST_SIZE], inbuf[UDPMSGSIZE];
- static u_int32_t disrupt;
-
- if (disrupt == 0)
- disrupt = (u_int32_t)(long)resultsp;
-
- /*
- * initialization: create a socket, a broadcast address, and
- * preserialize the arguments into a send buffer.
- */
- if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
- perror("Cannot create socket for broadcast rpc");
- stat = RPC_CANTSEND;
- goto done_broad;
- }
-#ifdef SO_BROADCAST
- if (setsockopt(sock, SOL_SOCKET, SO_BROADCAST, &on, sizeof (on)) < 0) {
- perror("Cannot set socket option SO_BROADCAST");
- stat = RPC_CANTSEND;
- goto done_broad;
- }
-#endif /* def SO_BROADCAST */
- if (sock + 1 > FD_SETSIZE) {
- int bytes = howmany(sock + 1, NFDBITS) * sizeof(fd_mask);
- fds = (fd_set *)malloc(bytes);
- if (fds == NULL) {
- stat = RPC_CANTSEND;
- goto done_broad;
- }
- memset(fds, 0, bytes);
- } else {
- fds = &readfds;
- FD_ZERO(fds);
- }
-
- nets = getbroadcastnets(addrs, sock, inbuf);
- memset(&baddr, 0, sizeof (baddr));
- baddr.sin_len = sizeof(struct sockaddr_in);
- baddr.sin_family = AF_INET;
- baddr.sin_port = htons(PMAPPORT);
- baddr.sin_addr.s_addr = htonl(INADDR_ANY);
- (void)gettimeofday(&t, (struct timezone *)0);
- msg.rm_xid = xid = (++disrupt) ^ getpid() ^ t.tv_sec ^ t.tv_usec;
- t.tv_usec = 0;
- msg.rm_direction = CALL;
- msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
- msg.rm_call.cb_prog = PMAPPROG;
- msg.rm_call.cb_vers = PMAPVERS;
- msg.rm_call.cb_proc = PMAPPROC_CALLIT;
- msg.rm_call.cb_cred = unix_auth->ah_cred;
- msg.rm_call.cb_verf = unix_auth->ah_verf;
- a.prog = prog;
- a.vers = vers;
- a.proc = proc;
- a.xdr_args = xargs;
- a.args_ptr = argsp;
- r.port_ptr = &port;
- r.xdr_results = xresults;
- r.results_ptr = resultsp;
- xdrmem_create(xdrs, outbuf, MAX_BROADCAST_SIZE, XDR_ENCODE);
- if ((! xdr_callmsg(xdrs, &msg)) || (! xdr_rmtcall_args(xdrs, &a))) {
- stat = RPC_CANTENCODEARGS;
- goto done_broad;
- }
- outlen = (int)xdr_getpos(xdrs);
- xdr_destroy(xdrs);
- /*
- * Basic loop: broadcast a packet and wait a while for response(s).
- * The response timeout grows larger per iteration.
- *
- * XXX This will loop about 5 times the stop. If there are
- * lots of signals being received by the process it will quit
- * send them all in one quick burst, not paying attention to
- * the intended function of sending them slowly over half a
- * minute or so
- */
- for (t.tv_sec = 4; t.tv_sec <= 14; t.tv_sec += 2) {
- for (i = 0; i < nets; i++) {
- baddr.sin_addr = addrs[i];
- if (sendto(sock, outbuf, outlen, 0,
- (struct sockaddr *)&baddr,
- sizeof (struct sockaddr)) != outlen) {
- perror("Cannot send broadcast packet");
- stat = RPC_CANTSEND;
- goto done_broad;
- }
- }
- if (eachresult == NULL) {
- stat = RPC_SUCCESS;
- goto done_broad;
- }
- recv_again:
- msg.acpted_rply.ar_verf = _null_auth;
- msg.acpted_rply.ar_results.where = (caddr_t)&r;
- msg.acpted_rply.ar_results.proc = xdr_rmtcallres;
- /* XXX we know the other bits are still clear */
- FD_SET(sock, fds);
- tv = t; /* for select() that copies back */
- switch (select(sock + 1, fds, NULL, NULL, &tv)) {
-
- case 0: /* timed out */
- stat = RPC_TIMEDOUT;
- continue;
-
- case -1: /* some kind of error */
- if (errno == EINTR)
- goto recv_again;
- perror("Broadcast select problem");
- stat = RPC_CANTRECV;
- goto done_broad;
-
- } /* end of select results switch */
- try_again:
- fromlen = sizeof(struct sockaddr);
- inlen = recvfrom(sock, inbuf, UDPMSGSIZE, 0,
- (struct sockaddr *)&raddr, &fromlen);
- if (inlen < 0) {
- if (errno == EINTR)
- goto try_again;
- perror("Cannot receive reply to broadcast");
- stat = RPC_CANTRECV;
- goto done_broad;
- }
- if (inlen < sizeof(u_int32_t))
- goto recv_again;
- /*
- * see if reply transaction id matches sent id.
- * If so, decode the results.
- */
- xdrmem_create(xdrs, inbuf, (u_int)inlen, XDR_DECODE);
- if (xdr_replymsg(xdrs, &msg)) {
- if ((msg.rm_xid == xid) &&
- (msg.rm_reply.rp_stat == MSG_ACCEPTED) &&
- (msg.acpted_rply.ar_stat == SUCCESS)) {
- raddr.sin_port = htons((u_short)port);
- done = (*eachresult)(resultsp, &raddr);
- }
- /* otherwise, we just ignore the errors ... */
- }
- xdrs->x_op = XDR_FREE;
- msg.acpted_rply.ar_results.proc = xdr_void;
- (void)xdr_replymsg(xdrs, &msg);
- (void)(*xresults)(xdrs, resultsp);
- xdr_destroy(xdrs);
- if (done) {
- stat = RPC_SUCCESS;
- goto done_broad;
- } else {
- goto recv_again;
- }
- }
-done_broad:
- if (fds != &readfds)
- free(fds);
- if (sock >= 0)
- (void)close(sock);
- AUTH_DESTROY(unix_auth);
- return (stat);
-}
-
diff --git a/lib/libc/rpc/publickey.3 b/lib/libc/rpc/publickey.3
deleted file mode 100644
index 7063e8a..0000000
--- a/lib/libc/rpc/publickey.3
+++ /dev/null
@@ -1,44 +0,0 @@
-.\" @(#)publickey.3r 2.1 88/08/07 4.0 RPCSRC
-.TH PUBLICKEY 3R "6 October 1987"
-.SH NAME
-publickey, getpublickey, getsecretkey \- get public or secret key
-.SH SYNOPSIS
-.nf
-.B #include <rpc/rpc.h>
-.B #include <rpc/key_prot.h>
-.LP
-.B getpublickey(netname, publickey)
-.B char netname[\s-1MAXNETNAMELEN\s0+1];
-.B char publickey[\s-1HEXKEYBYTES\s0+1];
-.LP
-.B getsecretkey(netname, secretkey, passwd)
-.B char netname[\s-1MAXNETNAMELEN\s0+1];
-.B char secretkey[\s-1HEXKEYBYTES\s0+1];
-.B char *passwd;
-.fi
-.SH DESCRIPTION
-.IX "getpublickey function" "" "\fLgetpublickey()\fP function"
-.IX "getsecretkey function" "" "\fLgetsecretkey()\fP function"
-These routines are used to get public and secret keys from the
-.SM YP
-database.
-.B getsecretkey(\|)
-has an extra argument,
-.IR passwd ,
-which is used to decrypt the encrypted secret key stored in the database.
-Both routines return 1 if they are successful in finding the key, 0 otherwise.
-The keys are returned as
-.SM NULL\s0-terminated,
-hexadecimal strings. If the password supplied to
-.B getsecretkey(\|)
-fails to decrypt the secret key, the routine will return 1 but the
-.I secretkey
-argument will be a
-.SM NULL
-string (``'').
-.SH "SEE ALSO"
-.BR publickey (5)
-.LP
-.I \s-1RPC\s0 Programmer's Manual
-in
-.TX NETP
diff --git a/lib/libc/rpc/publickey.5 b/lib/libc/rpc/publickey.5
deleted file mode 100644
index de3c1e9..0000000
--- a/lib/libc/rpc/publickey.5
+++ /dev/null
@@ -1,37 +0,0 @@
-.\" @(#)publickey.5 2.1 88/08/07 4.0 RPCSRC; from 1.6 88/02/29 SMI;
-.TH PUBLICKEY 5 "19 October 1987"
-.SH NAME
-publickey \- public key database
-.SH SYNOPSIS
-.B /etc/publickey
-.SH DESCRIPTION
-.LP
-.B /etc/publickey
-is the public key database used for secure
-networking. Each entry in
-the database consists of a network user
-name (which may either refer to
-a user or a hostname), followed by the user's
-public key (in hex
-notation), a colon, and then the user's
-secret key encrypted with
-its login password (also in hex notation).
-.LP
-This file is altered either by the user through the
-.BR chkey (1)
-command or by the system administrator through the
-.BR newkey (8)
-command.
-The file
-.B /etc/publickey
-should only contain data on the Yellow
-Pages master machine, where it
-is converted into the
-.SM YP
-database
-.BR publickey.byname .
-.SH SEE ALSO
-.BR chkey (1),
-.BR publickey (3R),
-.BR newkey (8),
-.BR ypupdated (8C)
diff --git a/lib/libc/rpc/rpc.3 b/lib/libc/rpc/rpc.3
deleted file mode 100644
index dd55c22..0000000
--- a/lib/libc/rpc/rpc.3
+++ /dev/null
@@ -1,1737 +0,0 @@
-.\" @(#)rpc.3n 2.4 88/08/08 4.0 RPCSRC; from 1.19 88/06/24 SMI
-.TH RPC 3 "16 February 1988"
-.SH NAME
-rpc \- library routines for remote procedure calls
-.SH SYNOPSIS AND DESCRIPTION
-These routines allow C programs to make procedure
-calls on other machines across the network.
-First, the client calls a procedure to send a
-data packet to the server.
-Upon receipt of the packet, the server calls a dispatch routine
-to perform the requested service, and then sends back a
-reply.
-Finally, the procedure call returns to the client.
-.LP
-Routines that are used for Secure RPC (DES authentication) are described in
-.BR rpc_secure (3).
-Secure RPC can be used only if DES encryption is available.
-.LP
-.ft B
-.nf
-.sp .5
-#include <rpc/rpc.h>
-.fi
-.ft R
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-void
-auth_destroy(auth)
-\s-1AUTH\s0 *auth;
-.fi
-.ft R
-.IP
-A macro that destroys the authentication information associated with
-.IR auth .
-Destruction usually involves deallocation of private data
-structures. The use of
-.I auth
-is undefined after calling
-.BR auth_destroy(\|) .
-.br
-.if t .ne 6
-.LP
-.ft B
-.nf
-.sp .5
-\s-1AUTH\s0 *
-authnone_create(\|)
-.fi
-.ft R
-.IP
-Create and returns an
-.SM RPC
-authentication handle that passes nonusable authentication
-information with each remote procedure call. This is the
-default authentication used by
-.SM RPC.
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-\s-1AUTH\s0 *
-authunix_create(host, uid, gid, len, aup_gids)
-char *host;
-int uid, gid, len, *aup.gids;
-.fi
-.ft R
-.IP
-Create and return an
-.SM RPC
-authentication handle that contains
-.UX
-authentication information.
-The parameter
-.I host
-is the name of the machine on which the information was
-created;
-.I uid
-is the user's user
-.SM ID ;
-.I gid
-is the user's current group
-.SM ID ;
-.I len
-and
-.I aup_gids
-refer to a counted array of groups to which the user belongs.
-It is easy to impersonate a user.
-.br
-.if t .ne 5
-.LP
-.ft B
-.nf
-.sp .5
-\s-1AUTH\s0 *
-authunix_create_default(\|)
-.fi
-.ft R
-.IP
-Calls
-.B authunix_create(\|)
-with the appropriate parameters.
-.br
-.if t .ne 13
-.LP
-.ft B
-.nf
-.sp .5
-callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
-char *host;
-u_long prognum, versnum, procnum;
-char *in, *out;
-xdrproc_t inproc, outproc;
-.fi
-.ft R
-.IP
-Call the remote procedure associated with
-.IR prognum ,
-.IR versnum ,
-and
-.I procnum
-on the machine,
-.IR host .
-The parameter
-.I in
-is the address of the procedure's argument(s), and
-.I out
-is the address of where to place the result(s);
-.I inproc
-is used to encode the procedure's parameters, and
-.I outproc
-is used to decode the procedure's results.
-This routine returns zero if it succeeds, or the value of
-.B "enum clnt_stat"
-cast to an integer if it fails.
-The routine
-.B clnt_perrno(\|)
-is handy for translating failure statuses into messages.
-.IP
-Warning: calling remote procedures with this routine
-uses
-.SM UDP/IP
-as a transport; see
-.B clntudp_create(\|)
-for restrictions.
-You do not have control of timeouts or authentication using
-this routine.
-.br
-.if t .ne 16
-.LP
-.ft B
-.nf
-.sp .5
-enum clnt_stat
-clnt_broadcast(prognum, versnum, procnum, inproc, in, outproc, out, eachresult)
-u_long prognum, versnum, procnum;
-char *in, *out;
-xdrproc_t inproc, outproc;
-resultproc_t eachresult;
-.fi
-.ft R
-.IP
-Like
-.BR callrpc(\|) ,
-except the call message is broadcast to all locally
-connected broadcast nets. Each time it receives a
-response, this routine calls
-.BR eachresult(\|) ,
-whose form is:
-.IP
-.RS 1i
-.ft B
-.nf
-eachresult(out, addr)
-char *out;
-struct sockaddr_in *addr;
-.ft R
-.fi
-.RE
-.IP
-where
-.I out
-is the same as
-.I out
-passed to
-.BR clnt_broadcast(\|) ,
-except that the remote procedure's output is decoded there;
-.I addr
-points to the address of the machine that sent the results.
-If
-.B eachresult(\|)
-returns zero,
-.B clnt_broadcast(\|)
-waits for more replies; otherwise it returns with appropriate
-status.
-.IP
-Warning: broadcast sockets are limited in size to the
-maximum transfer unit of the data link. For ethernet,
-this value is 1500 bytes.
-.br
-.if t .ne 13
-.LP
-.ft B
-.nf
-.sp .5
-enum clnt_stat
-clnt_call(clnt, procnum, inproc, in, outproc, out, tout)
-\s-1CLIENT\s0 *clnt;
-u_long
-procnum;
-xdrproc_t inproc, outproc;
-char *in, *out;
-struct timeval tout;
-.fi
-.ft R
-.IP
-A macro that calls the remote procedure
-.I procnum
-associated with the client handle,
-.IR clnt ,
-which is obtained with an
-.SM RPC
-client creation routine such as
-.BR clnt_create(\|) .
-The parameter
-.I in
-is the address of the procedure's argument(s), and
-.I out
-is the address of where to place the result(s);
-.I inproc
-is used to encode the procedure's parameters, and
-.I outproc
-is used to decode the procedure's results;
-.I tout
-is the time allowed for results to come back.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-clnt_destroy(clnt)
-\s-1CLIENT\s0 *clnt;
-.fi
-.ft R
-.IP
-A macro that destroys the client's
-.SM RPC
-handle. Destruction usually involves deallocation
-of private data structures, including
-.I clnt
-itself. Use of
-.I clnt
-is undefined after calling
-.BR clnt_destroy(\|) .
-If the
-.SM RPC
-library opened the associated socket, it will close it also.
-Otherwise, the socket remains open.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-\s-1CLIENT\s0 *
-clnt_create(host, prog, vers, proto)
-char *host;
-u_long prog, vers;
-char *proto;
-.fi
-.ft R
-.IP
-Generic client creation routine.
-.I host
-identifies the name of the remote host where the server
-is located.
-.I proto
-indicates which kind of transport protocol to use. The
-currently supported values for this field are \(lqudp\(rq
-and \(lqtcp\(rq.
-Default timeouts are set, but can be modified using
-.BR clnt_control(\|) .
-.IP
-Warning: Using
-.SM UDP
-has its shortcomings. Since
-.SM UDP\s0-based
-.SM RPC
-messages can only hold up to 8 Kbytes of encoded data,
-this transport cannot be used for procedures that take
-large arguments or return huge results.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-bool_t
-clnt_control(cl, req, info)
-\s-1CLIENT\s0 *cl;
-char *info;
-.fi
-.ft R
-.IP
-A macro used to change or retrieve various information
-about a client object.
-.I req
-indicates the type of operation, and
-.I info
-is a pointer to the information. For both
-.SM UDP
-and
-.SM TCP\s0,
-the supported values of
-.I req
-and their argument types and what they do are:
-.IP
-.nf
-.ta +2.0i +2.0i +2.0i
-.SM CLSET_TIMEOUT\s0 struct timeval set total timeout
-.SM CLGET_TIMEOUT\s0 struct timeval get total timeout
-.fi
-.IP
-Note: if you set the timeout using
-.BR clnt_control(\|) ,
-the timeout parameter passed to
-.B clnt_call(\|)
-will be ignored in all future calls.
-.IP
-.nf
-.SM CLGET_SERVER_ADDR\s0 struct sockaddr_in get server's address
-.fi
-.br
-.IP
-The following operations are valid for
-.SM UDP
-only:
-.IP
-.nf
-.ta +2.0i ; +2.0i ; +2.0i
-.SM CLSET_RETRY_TIMEOUT\s0 struct timeval set the retry timeout
-.SM CLGET_RETRY_TIMEOUT\s0 struct timeval get the retry timeout
-.fi
-.br
-.IP
-The retry timeout is the time that
-.SM "UDP RPC"
-waits for the server to reply before
-retransmitting the request.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-clnt_freeres(clnt, outproc, out)
-\s-1CLIENT\s0 *clnt;
-xdrproc_t outproc;
-char *out;
-.fi
-.ft R
-.IP
-A macro that frees any data allocated by the
-.SM RPC/XDR
-system when it decoded the results of an
-.SM RPC
-call. The
-parameter
-.I out
-is the address of the results, and
-.I outproc
-is the
-.SM XDR
-routine describing the results.
-This routine returns one if the results were successfully
-freed,
-and zero otherwise.
-.br
-.if t .ne 6
-.LP
-.ft B
-.nf
-.sp .5
-void
-clnt_geterr(clnt, errp)
-\s-1CLIENT\s0 *clnt;
-struct rpc_err *errp;
-.fi
-.ft R
-.IP
-A macro that copies the error structure out of the client
-handle
-to the structure at address
-.IR errp .
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-void
-clnt_pcreateerror(s)
-char *s;
-.fi
-.ft R
-.IP
-Print a message to standard error indicating
-why a client
-.SM RPC
-handle could not be created.
-The message is prepended with string
-.I s
-and a colon.
-Used when a
-.BR clnt_create(\|) ,
-.BR clntraw_create(\|) ,
-.BR clnttcp_create(\|) ,
-or
-.B clntudp_create(\|)
-call fails.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-void
-clnt_perrno(stat)
-enum clnt_stat stat;
-.fi
-.ft R
-.IP
-Print a message to standard error corresponding
-to the condition indicated by
-.IR stat .
-Used after
-.BR callrpc(\|) .
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-clnt_perror(clnt, s)
-\s-1CLIENT\s0 *clnt;
-char *s;
-.fi
-.ft R
-.IP
-Print a message to standard error indicating why an
-.SM RPC
-call failed;
-.I clnt
-is the handle used to do the call.
-The message is prepended with string
-.I s
-and a colon.
-Used after
-.BR clnt_call(\|) .
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-char *
-clnt_spcreateerror
-char *s;
-.fi
-.ft R
-.IP
-Like
-.BR clnt_pcreateerror(\|) ,
-except that it returns a string
-instead of printing to the standard error.
-.IP
-Bugs: returns pointer to static data that is overwritten
-on each call.
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-char *
-clnt_sperrno(stat)
-enum clnt_stat stat;
-.fi
-.ft R
-.IP
-Take the same arguments as
-.BR clnt_perrno(\|) ,
-but instead of sending a message to the standard error
-indicating why an
-.SM RPC
-call failed, return a pointer to a string which contains
-the message. The string ends with a
-.SM NEWLINE\s0.
-.IP
-.B clnt_sperrno(\|)
-is used instead of
-.B clnt_perrno(\|)
-if the program does not have a standard error (as a program
-running as a server quite likely does not), or if the
-programmer
-does not want the message to be output with
-.BR printf ,
-or if a message format different than that supported by
-.B clnt_perrno(\|)
-is to be used.
-Note: unlike
-.B clnt_sperror(\|)
-and
-.BR clnt_spcreaterror(\|) ,
-.B clnt_sperrno(\|)
-returns pointer to static data, but the
-result will not get overwritten on each call.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-char *
-clnt_sperror(rpch, s)
-\s-1CLIENT\s0 *rpch;
-char *s;
-.fi
-.ft R
-.IP
-Like
-.BR clnt_perror(\|) ,
-except that (like
-.BR clnt_sperrno(\|) )
-it returns a string instead of printing to standard error.
-.IP
-Bugs: returns pointer to static data that is overwritten
-on each call.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-\s-1CLIENT\s0 *
-clntraw_create(prognum, versnum)
-u_long prognum, versnum;
-.fi
-.ft R
-.IP
-This routine creates a toy
-.SM RPC
-client for the remote program
-.IR prognum ,
-version
-.IR versnum .
-The transport used to pass messages to the service is
-actually a buffer within the process's address space, so the
-corresponding
-.SM RPC
-server should live in the same address space; see
-.BR svcraw_create(\|) .
-This allows simulation of
-.SM RPC
-and acquisition of
-.SM RPC
-overheads, such as round trip times, without any
-kernel interference. This routine returns
-.SM NULL
-if it fails.
-.br
-.if t .ne 15
-.LP
-.ft B
-.nf
-.sp .5
-\s-1CLIENT\s0 *
-clnttcp_create(addr, prognum, versnum, sockp, sendsz, recvsz)
-struct sockaddr_in *addr;
-u_long prognum, versnum;
-int *sockp;
-u_int sendsz, recvsz;
-.fi
-.ft R
-.IP
-This routine creates an
-.SM RPC
-client for the remote program
-.IR prognum ,
-version
-.IR versnum ;
-the client uses
-.SM TCP/IP
-as a transport. The remote program is located at Internet
-address
-.IR *addr .
-If
-.\"The following in-line font conversion is necessary for the hyphen indicator
-\fB\%addr\->sin_port\fR
-is zero, then it is set to the actual port that the remote
-program is listening on (the remote
-.B portmap
-service is consulted for this information). The parameter
-.I sockp
-is a socket; if it is
-.BR \s-1RPC_ANYSOCK\s0 ,
-then this routine opens a new one and sets
-.IR sockp .
-Since
-.SM TCP\s0-based
-.SM RPC
-uses buffered
-.SM I/O ,
-the user may specify the size of the send and receive buffers
-with the parameters
-.I sendsz
-and
-.IR recvsz ;
-values of zero choose suitable defaults.
-This routine returns
-.SM NULL
-if it fails.
-.br
-.if t .ne 15
-.LP
-.ft B
-.nf
-.sp .5
-\s-1CLIENT\s0 *
-clntudp_create(addr, prognum, versnum, wait, sockp)
-struct sockaddr_in *addr;
-u_long prognum, versnum;
-struct timeval wait;
-int *sockp;
-.fi
-.ft R
-.IP
-This routine creates an
-.SM RPC
-client for the remote program
-.IR prognum ,
-version
-.IR versnum ;
-the client uses
-.SM UDP/IP
-as a transport. The remote program is located at Internet
-address
-.IR addr .
-If
-\fB\%addr\->sin_port\fR
-is zero, then it is set to actual port that the remote
-program is listening on (the remote
-.B portmap
-service is consulted for this information). The parameter
-.I sockp
-is a socket; if it is
-.BR \s-1RPC_ANYSOCK\s0 ,
-then this routine opens a new one and sets
-.IR sockp .
-The
-.SM UDP
-transport resends the call message in intervals of
-.B wait
-time until a response is received or until the call times
-out.
-The total time for the call to time out is specified by
-.BR clnt_call(\|) .
-.IP
-Warning: since
-.SM UDP\s0-based
-.SM RPC
-messages can only hold up to 8 Kbytes
-of encoded data, this transport cannot be used for procedures
-that take large arguments or return huge results.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-\s-1CLIENT\s0 *
-clntudp_bufcreate(addr, prognum, versnum, wait, sockp, sendsize, recosize)
-struct sockaddr_in *addr;
-u_long prognum, versnum;
-struct timeval wait;
-int *sockp;
-unsigned int sendsize;
-unsigned int recosize;
-.fi
-.ft R
-.IP
-This routine creates an
-.SM RPC
-client for the remote program
-.IR prognum ,
-on
-.IR versnum ;
-the client uses
-.SM UDP/IP
-as a transport. The remote program is located at Internet
-address
-.IR addr .
-If
-\fB\%addr\->sin_port\fR
-is zero, then it is set to actual port that the remote
-program is listening on (the remote
-.B portmap
-service is consulted for this information). The parameter
-.I sockp
-is a socket; if it is
-.BR \s-1RPC_ANYSOCK\s0 ,
-then this routine opens a new one and sets
-.BR sockp .
-The
-.SM UDP
-transport resends the call message in intervals of
-.B wait
-time until a response is received or until the call times
-out.
-The total time for the call to time out is specified by
-.BR clnt_call(\|) .
-.IP
-This allows the user to specify the maximum packet size for sending and receiving
-.SM UDP\s0-based
-.SM RPC
-messages.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-int
-get_myaddress(addr)
-struct sockaddr_in *addr;
-.fi
-.ft R
-.IP
-Stuff the machine's
-.SM IP
-address into
-.IR *addr ,
-without consulting the library routines that deal with
-.BR /etc/hosts .
-The port number is always set to
-.BR htons(\s-1PMAPPORT\s0) .
-Returns zero on success, non-zero on failure.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-struct pmaplist *
-pmap_getmaps(addr)
-struct sockaddr_in *addr;
-.fi
-.ft R
-.IP
-A user interface to the
-.B portmap
-service, which returns a list of the current
-.SM RPC
-program-to-port mappings
-on the host located at
-.SM IP
-address
-.IR *addr .
-This routine can return
-.SM NULL .
-The command
-.RB ` "rpcinfo \-p" '
-uses this routine.
-.br
-.if t .ne 12
-.LP
-.ft B
-.nf
-.sp .5
-u_short
-pmap_getport(addr, prognum, versnum, protocol)
-struct sockaddr_in *addr;
-u_long prognum, versnum, protocol;
-.fi
-.ft R
-.IP
-A user interface to the
-.B portmap
-service, which returns the port number
-on which waits a service that supports program number
-.IR prognum ,
-version
-.IR versnum ,
-and speaks the transport protocol associated with
-.IR protocol .
-The value of
-.I protocol
-is most likely
-.B
-.SM IPPROTO_UDP
-or
-.BR \s-1IPPROTO_TCP\s0 .
-A return value of zero means that the mapping does not exist
-or that
-the
-.SM RPC
-system failed to contact the remote
-.B portmap
-service. In the latter case, the global variable
-.B rpc_createerr(\|)
-contains the
-.SM RPC
-status.
-.br
-.if t .ne 15
-.LP
-.ft B
-.nf
-.sp .5
-enum clnt_stat
-pmap_rmtcall(addr, prognum, versnum, procnum, inproc, in, outproc, out, tout, portp)
-struct sockaddr_in *addr;
-u_long prognum, versnum, procnum;
-char *in, *out;
-xdrproc_t inproc, outproc;
-struct timeval tout;
-u_long *portp;
-.fi
-.ft R
-.IP
-A user interface to the
-.B portmap
-service, which instructs
-.B portmap
-on the host at
-.SM IP
-address
-.I *addr
-to make an
-.SM RPC
-call on your behalf to a procedure on that host.
-The parameter
-.I *portp
-will be modified to the program's port number if the
-procedure
-succeeds. The definitions of other parameters are discussed
-in
-.B callrpc(\|)
-and
-.BR clnt_call(\|) .
-This procedure should be used for a \(lqping\(rq and nothing
-else.
-See also
-.BR clnt_broadcast(\|) .
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-pmap_set(prognum, versnum, protocol, port)
-u_long prognum, versnum, protocol;
-u_short port;
-.fi
-.ft R
-.IP
-A user interface to the
-.B portmap
-service, which establishes a mapping between the triple
-.RI [ prognum , versnum , protocol\fR]
-and
-.I port
-on the machine's
-.B portmap
-service. The value of
-.I protocol
-is most likely
-.B
-.SM IPPROTO_UDP
-or
-.BR \s-1IPPROTO_TCP\s0 .
-This routine returns one if it succeeds, zero otherwise.
-Automatically done by
-.BR svc_register(\|) .
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-pmap_unset(prognum, versnum)
-u_long prognum, versnum;
-.fi
-.ft R
-.IP
-A user interface to the
-.B portmap
-service, which destroys all mapping between the triple
-.RI [ prognum , versnum , *\fR]
-and
-.B ports
-on the machine's
-.B portmap
-service. This routine returns one if it succeeds, zero
-otherwise.
-.br
-.if t .ne 15
-.LP
-.ft B
-.nf
-.sp .5
-registerrpc(prognum, versnum, procnum, procname, inproc, outproc)
-u_long prognum, versnum, procnum;
-char *(*procname) (\|) ;
-xdrproc_t inproc, outproc;
-.fi
-.ft R
-.IP
-Register procedure
-.I procname
-with the
-.SM RPC
-service package. If a request arrives for program
-.IR prognum ,
-version
-.IR versnum ,
-and procedure
-.IR procnum ,
-.I procname
-is called with a pointer to its parameter(s);
-.I progname
-should return a pointer to its static result(s);
-.I inproc
-is used to decode the parameters while
-.I outproc
-is used to encode the results.
-This routine returns zero if the registration succeeded, \-1
-otherwise.
-.IP
-Warning: remote procedures registered in this form
-are accessed using the
-.SM UDP/IP
-transport; see
-.B svcudp_create(\|)
-for restrictions.
-.br
-.if t .ne 5
-.LP
-.ft B
-.nf
-.sp .5
-struct rpc_createerr rpc_createerr;
-.fi
-.ft R
-.IP
-A global variable whose value is set by any
-.SM RPC
-client creation routine
-that does not succeed. Use the routine
-.B clnt_pcreateerror(\|)
-to print the reason why.
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-svc_destroy(xprt)
-\s-1SVCXPRT\s0 *
-xprt;
-.fi
-.ft R
-.IP
-A macro that destroys the
-.SM RPC
-service transport handle,
-.IR xprt .
-Destruction usually involves deallocation
-of private data structures, including
-.I xprt
-itself. Use of
-.I xprt
-is undefined after calling this routine.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-fd_set svc_fdset;
-.fi
-.ft R
-.IP
-A global variable reflecting the
-.SM RPC
-service side's
-read file descriptor bit mask; it is suitable as a template parameter
-to the
-.B select
-system call. This is only of interest
-if a service implementor does not call
-.BR svc_run(\|) ,
-but rather does his own asynchronous event processing.
-This variable is read-only (do not pass its address to
-.BR select !),
-yet it may change after calls to
-.B svc_getreqset(\|)
-or any creation routines.
-.br
-As well, note that if the process has descriptor limits
-which are extended beyond
-.BR FD_SETSIZE ,
-this variable will only be usable for the first
-.BR FD_SETSIZE
-descriptors.
-.br
-.if t .ne 6
-.LP
-.ft B
-.nf
-.sp .5
-int svc_fds;
-.fi
-.ft R
-.IP
-Similar to
-.BR svc_fedset(\|) ,
-but limited to 32 descriptors. This
-interface is obsoleted by
-.BR svc_fdset(\|) .
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-svc_freeargs(xprt, inproc, in)
-\s-1SVCXPRT\s0 *xprt;
-xdrproc_t inproc;
-char *in;
-.fi
-.ft R
-.IP
-A macro that frees any data allocated by the
-.SM RPC/XDR
-system when it decoded the arguments to a service procedure
-using
-.BR svc_getargs(\|) .
-This routine returns 1 if the results were successfully
-freed,
-and zero otherwise.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-svc_getargs(xprt, inproc, in)
-\s-1SVCXPRT\s0 *xprt;
-xdrproc_t inproc;
-char *in;
-.fi
-.ft R
-.IP
-A macro that decodes the arguments of an
-.SM RPC
-request
-associated with the
-.SM RPC
-service transport handle,
-.IR xprt .
-The parameter
-.I in
-is the address where the arguments will be placed;
-.I inproc
-is the
-.SM XDR
-routine used to decode the arguments.
-This routine returns one if decoding succeeds, and zero
-otherwise.
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-struct sockaddr_in *
-svc_getcaller(xprt)
-\s-1SVCXPRT\s0 *xprt;
-.fi
-.ft R
-.IP
-The approved way of getting the network address of the caller
-of a procedure associated with the
-.SM RPC
-service transport handle,
-.IR xprt .
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-svc_getreqset(rdfds)
-fd_set *rdfds;
-.fi
-.ft R
-.IP
-This routine is only of interest if a service implementor
-does not call
-.BR svc_run(\|) ,
-but instead implements custom asynchronous event processing.
-It is called when the
-.B select
-system call has determined that an
-.SM RPC
-request has arrived on some
-.SM RPC
-.B socket(s) ;
-.I rdfds
-is the resultant read file descriptor bit mask.
-The routine returns when all sockets associated with the
-value of
-.I rdfds
-have been serviced.
-.br
-.if t .ne 6
-.LP
-.ft B
-.nf
-.sp .5
-svc_getreq(rdfds)
-int rdfds;
-.fi
-.ft R
-.IP
-Similar to
-.BR svc_getreqset(\|) ,
-but limited to 32 descriptors. This interface is obsoleted by
-.BR svc_getreqset(\|) .
-.br
-.if t .ne 17
-.LP
-.ft B
-.nf
-.sp .5
-svc_register(xprt, prognum, versnum, dispatch, protocol)
-\s-1SVCXPRT\s0 *xprt;
-u_long prognum, versnum;
-void (*dispatch) (\|);
-u_long protocol;
-.fi
-.ft R
-.IP
-Associates
-.I prognum
-and
-.I versnum
-with the service dispatch procedure,
-.IR dispatch .
-If
-.I protocol
-is zero, the service is not registered with the
-.B portmap
-service. If
-.I protocol
-is non-zero, then a mapping of the triple
-.RI [ prognum , versnum , protocol\fR]
-to
-\fB\%xprt\->xp_port\fR
-is established with the local
-.B portmap
-service (generally
-.I protocol
-is zero,
-.B
-.SM IPPROTO_UDP
-or
-.B
-.SM IPPROTO_TCP
-).
-The procedure
-.I dispatch
-has the following form:
-.RS 1i
-.ft B
-.nf
-dispatch(request, xprt)
-struct svc_req *request;
-\s-1SVCXPRT\s0 *xprt;
-.ft R
-.fi
-.RE
-.IP
-The
-.B svc_register(\|)
-routine returns one if it succeeds, and zero otherwise.
-.br
-.if t .ne 6
-.LP
-.ft B
-.nf
-.sp .5
-svc_run(\|)
-.fi
-.ft R
-.IP
-This routine never returns. It waits for
-.SM RPC
-requests to arrive, and calls the appropriate service
-procedure using
-.B svc_getreq(\|)
-when one arrives. This procedure is usually waiting for a
-.B select(\|)
-system call to return.
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-svc_sendreply(xprt, outproc, out)
-\s-1SVCXPRT\s0 *xprt;
-xdrproc_t outproc;
-char *out;
-.fi
-.ft R
-.IP
-Called by an
-.SM RPC
-service's dispatch routine to send the results of a
-remote procedure call. The parameter
-.I xprt
-is the request's associated transport handle;
-.I outproc
-is the
-.SM XDR
-routine which is used to encode the results; and
-.I out
-is the address of the results.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-void
-svc_unregister(prognum, versnum)
-u_long prognum, versnum;
-.fi
-.ft R
-.IP
-Remove all mapping of the double
-.RI [ prognum , versnum ]
-to dispatch routines, and of the triple
-.RI [ prognum , versnum , *\fR]
-to port number.
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-void
-svcerr_auth(xprt, why)
-\s-1SVCXPRT\s0 *xprt;
-enum auth_stat why;
-.fi
-.ft R
-.IP
-Called by a service dispatch routine that refuses to perform
-a remote procedure call due to an authentication error.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-void
-svcerr_decode(xprt)
-\s-1SVCXPRT\s0 *xprt;
-.fi
-.ft R
-.IP
-Called by a service dispatch routine that cannot successfully
-decode its parameters. See also
-.BR svc_getargs(\|) .
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-void
-svcerr_noproc(xprt)
-\s-1SVCXPRT\s0 *xprt;
-.fi
-.ft R
-.IP
-Called by a service dispatch routine that does not implement
-the procedure number that the caller requests.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-void
-svcerr_noprog(xprt)
-\s-1SVCXPRT\s0 *xprt;
-.fi
-.ft R
-.IP
-Called when the desired program is not registered with the
-.SM RPC
-package. Service implementors usually do not need this routine.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-void
-svcerr_progvers(xprt)
-\s-1SVCXPRT\s0 *xprt;
-.fi
-.ft R
-.IP
-Called when the desired version of a program is not registered
-with the
-.SM RPC
-package. Service implementors usually do not need this routine.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-void
-svcerr_systemerr(xprt)
-\s-1SVCXPRT\s0 *xprt;
-.fi
-.ft R
-.IP
-Called by a service dispatch routine when it detects a system
-error
-not covered by any particular protocol.
-For example, if a service can no longer allocate storage,
-it may call this routine.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-void
-svcerr_weakauth(xprt)
-\s-1SVCXPRT\s0 *xprt;
-.fi
-.ft R
-.IP
-Called by a service dispatch routine that refuses to perform
-a remote procedure call due to insufficient
-authentication parameters. The routine calls
-.BR "svcerr_auth(xprt, \s-1AUTH_TOOWEAK\s0)" .
-.br
-.if t .ne 11
-.LP
-.ft B
-.nf
-.sp .5
-\s-1SVCXPRT\s0 *
-svcraw_create(\|)
-.fi
-.ft R
-.IP
-This routine creates a toy
-.SM RPC
-service transport, to which it returns a pointer. The
-transport
-is really a buffer within the process's address space,
-so the corresponding
-.SM RPC
-client should live in the same
-address space;
-see
-.BR clntraw_create(\|) .
-This routine allows simulation of
-.SM RPC
-and acquisition of
-.SM RPC
-overheads (such as round trip times), without any kernel
-interference.
-This routine returns
-.SM NULL
-if it fails.
-.br
-.if t .ne 11
-.LP
-.ft B
-.nf
-.sp .5
-\s-1SVCXPRT\s0 *
-svctcp_create(sock, send_buf_size, recv_buf_size)
-int sock;
-u_int send_buf_size, recv_buf_size;
-.fi
-.ft R
-.IP
-This routine creates a
-.SM TCP/IP\s0-based
-.SM RPC
-service transport, to which it returns a pointer.
-The transport is associated with the socket
-.IR sock ,
-which may be
-.BR \s-1RPC_ANYSOCK\s0 ,
-in which case a new socket is created.
-If the socket is not bound to a local
-.SM TCP
-port, then this routine binds it to an arbitrary port. Upon
-completion,
-\fB\%xprt\->xp_sock\fR
-is the transport's socket descriptor, and
-\fB\%xprt\->xp_port\fR
-is the transport's port number.
-This routine returns
-.SM NULL
-if it fails. Since
-.SM TCP\s0-based
-.SM RPC
-uses buffered
-.SM I/O ,
-users may specify the size of buffers; values of zero
-choose suitable defaults.
-.br
-.if t .ne 11
-.LP
-.ft B
-.nf
-.sp .5
-\s-1SVCXPRT\s0 *
-svcfd_create(fd, sendsize, recvsize)
-int fd;
-u_int sendsize;
-u_int recvsize;
-.fi
-.ft R
-.IP
-Create a service on top of any open descriptor. Typically,
-this
-descriptor is a connected socket for a stream protocol such
-as
-.SM TCP\s0.
-.I sendsize
-and
-.I recvsize
-indicate sizes for the send and receive buffers. If they are
-zero, a reasonable default is chosen.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-\s-1SVCXPRT\s0 *
-svcudp_bufcreate(sock, sendsize, recosize)
-int sock;
-.fi
-.ft R
-.IP
-This routine creates a
-.SM UDP/IP\s0-based
-.SM RPC
-service transport, to which it returns a pointer.
-The transport is associated with the socket
-.IR sock ,
-which may be
-.B \s-1RPC_ANYSOCK\s0 ,
-in which case a new socket is created.
-If the socket is not bound to a local
-.SM UDP
-port, then this routine binds it to an arbitrary port. Upon
-completion,
-\fB\%xprt\->xp_sock\fR
-is the transport's socket descriptor, and
-\fB\%xprt\->xp_port\fR
-is the transport's port number.
-This routine returns
-.SM NULL
-if it fails.
-.IP
-This allows the user to specify the maximum packet size for sending and
-receiving
-.SM UDP\s0-based
-.SM RPC messages.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_accepted_reply(xdrs, ar)
-\s-1XDR\s0 *xdrs;
-struct accepted_reply *ar;
-.fi
-.ft R
-.IP
-Used for encoding
-.SM RPC
-reply messages. This routine is useful for users who
-wish to generate
-\s-1RPC\s0-style
-messages without using the
-.SM RPC
-package.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_authunix_parms(xdrs, aupp)
-\s-1XDR\s0 *xdrs;
-struct authunix_parms *aupp;
-.fi
-.ft R
-.IP
-Used for describing
-.SM UNIX
-credentials. This routine is useful for users
-who wish to generate these credentials without using the
-.SM RPC
-authentication package.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-void
-xdr_callhdr(xdrs, chdr)
-\s-1XDR\s0 *xdrs;
-struct rpc_msg *chdr;
-.fi
-.ft R
-.IP
-Used for describing
-.SM RPC
-call header messages.
-This routine is useful for users who wish to generate
-.SM RPC\s0-style
-messages without using the
-.SM RPC
-package.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_callmsg(xdrs, cmsg)
-\s-1XDR\s0 *xdrs;
-struct rpc_msg *cmsg;
-.fi
-.ft R
-.IP
-Used for describing
-.SM RPC
-call messages.
-This routine is useful for users who wish to generate
-.SM RPC\s0-style
-messages without using the
-.SM RPC
-package.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_opaque_auth(xdrs, ap)
-\s-1XDR\s0 *xdrs;
-struct opaque_auth *ap;
-.fi
-.ft R
-.IP
-Used for describing
-.SM RPC
-authentication information messages.
-This routine is useful for users who wish to generate
-.SM RPC\s0-style
-messages without using the
-.SM RPC
-package.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_pmap(xdrs, regs)
-\s-1XDR\s0 *xdrs;
-struct pmap *regs;
-.fi
-.ft R
-.IP
-Used for describing parameters to various
-.B portmap
-procedures, externally.
-This routine is useful for users who wish to generate
-these parameters without using the
-.B pmap
-interface.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_pmaplist(xdrs, rp)
-\s-1XDR\s0 *xdrs;
-struct pmaplist **rp;
-.fi
-.ft R
-.IP
-Used for describing a list of port mappings, externally.
-This routine is useful for users who wish to generate
-these parameters without using the
-.B pmap
-interface.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_rejected_reply(xdrs, rr)
-\s-1XDR\s0 *xdrs;
-struct rejected_reply *rr;
-.fi
-.ft R
-.IP
-Used for describing
-.SM RPC
-reply messages.
-This routine is useful for users who wish to generate
-.SM RPC\s0-style
-messages without using the
-.SM RPC
-package.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-xdr_replymsg(xdrs, rmsg)
-\s-1XDR\s0 *xdrs;
-struct rpc_msg *rmsg;
-.fi
-.ft R
-.IP
-Used for describing
-.SM RPC
-reply messages.
-This routine is useful for users who wish to generate
-.SM RPC
-style messages without using the
-.SM RPC
-package.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-void
-xprt_register(xprt)
-\s-1SVCXPRT\s0 *xprt;
-.fi
-.ft R
-.IP
-After
-.SM RPC
-service transport handles are created,
-they should register themselves with the
-.SM RPC
-service package.
-This routine modifies the global variable
-.BR svc_fds(\|) .
-Service implementors usually do not need this routine.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-void
-xprt_unregister(xprt)
-\s-1SVCXPRT\s0 *xprt;
-.fi
-.ft R
-.IP
-Before an
-.SM RPC
-service transport handle is destroyed,
-it should unregister itself with the
-.SM RPC
-service package.
-This routine modifies the global variable
-.BR svc_fds(\|) .
-Service implementors usually do not need this routine.
-.SH SEE ALSO
-.BR rpc_secure (3),
-.BR xdr (3)
-.br
-The following manuals:
-.RS
-.ft I
-Remote Procedure Calls: Protocol Specification
-.br
-Remote Procedure Call Programming Guide
-.br
-rpcgen Programming Guide
-.br
-.ft R
-.RE
-.IR "\s-1RPC\s0: Remote Procedure Call Protocol Specification" ,
-.SM RFC1050, Sun Microsystems, Inc.,
-.SM USC-ISI\s0.
-
diff --git a/lib/libc/rpc/rpc.5 b/lib/libc/rpc/rpc.5
deleted file mode 100644
index d464395..0000000
--- a/lib/libc/rpc/rpc.5
+++ /dev/null
@@ -1,34 +0,0 @@
-.\" @(#)rpc.5 2.2 88/08/03 4.0 RPCSRC; from 1.4 87/11/27 SMI;
-.Dd September 26, 1985
-.Dt RPC 5
-.Sh NAME
-.Nm rpc
-.Nd rpc program number data base
-.Sh SYNOPSIS
-/etc/rpc
-.Sh DESCRIPTION
-The
-.Pa /etc/rpc
-file contains user readable names that
-can be used in place of rpc program numbers.
-Each line has the following information:
-.Pp
-.Bl -bullet -compact
-.It
-name of server for the rpc program
-.It
-rpc program number
-.It
-aliases
-.El
-.Pp
-Items are separated by any number of blanks and/or
-tab characters.
-A ``#'' indicates the beginning of a comment; characters up to the end of
-the line are not interpreted by routines which search the file.
-.Sh FILES
-.Bl -tag -compact -width /etc/rpc
-.Pa /etc/rpc
-.El
-.Sh "SEE ALSO"
-.Xr getrpcent 3
diff --git a/lib/libc/rpc/rpc_callmsg.c b/lib/libc/rpc/rpc_callmsg.c
deleted file mode 100644
index af8e573..0000000
--- a/lib/libc/rpc/rpc_callmsg.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)rpc_callmsg.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: rpc_callmsg.c,v 1.5 1996/12/30 14:55:38 peter Exp $";
-#endif
-
-/*
- * rpc_callmsg.c
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- */
-
-#include <sys/param.h>
-#include <stdlib.h>
-#include <string.h>
-#include <rpc/rpc.h>
-
-/*
- * XDR a call message
- */
-bool_t
-xdr_callmsg(xdrs, cmsg)
- register XDR *xdrs;
- register struct rpc_msg *cmsg;
-{
- register int32_t *buf;
- register struct opaque_auth *oa;
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (cmsg->rm_call.cb_cred.oa_length > MAX_AUTH_BYTES) {
- return (FALSE);
- }
- if (cmsg->rm_call.cb_verf.oa_length > MAX_AUTH_BYTES) {
- return (FALSE);
- }
- buf = XDR_INLINE(xdrs, 8 * BYTES_PER_XDR_UNIT
- + RNDUP(cmsg->rm_call.cb_cred.oa_length)
- + 2 * BYTES_PER_XDR_UNIT
- + RNDUP(cmsg->rm_call.cb_verf.oa_length));
- if (buf != NULL) {
- IXDR_PUT_LONG(buf, cmsg->rm_xid);
- IXDR_PUT_ENUM(buf, cmsg->rm_direction);
- if (cmsg->rm_direction != CALL) {
- return (FALSE);
- }
- IXDR_PUT_LONG(buf, cmsg->rm_call.cb_rpcvers);
- if (cmsg->rm_call.cb_rpcvers != RPC_MSG_VERSION) {
- return (FALSE);
- }
- IXDR_PUT_LONG(buf, cmsg->rm_call.cb_prog);
- IXDR_PUT_LONG(buf, cmsg->rm_call.cb_vers);
- IXDR_PUT_LONG(buf, cmsg->rm_call.cb_proc);
- oa = &cmsg->rm_call.cb_cred;
- IXDR_PUT_ENUM(buf, oa->oa_flavor);
- IXDR_PUT_LONG(buf, oa->oa_length);
- if (oa->oa_length) {
- memcpy((caddr_t)buf, oa->oa_base, oa->oa_length);
- buf += RNDUP(oa->oa_length) / sizeof (int32_t);
- }
- oa = &cmsg->rm_call.cb_verf;
- IXDR_PUT_ENUM(buf, oa->oa_flavor);
- IXDR_PUT_LONG(buf, oa->oa_length);
- if (oa->oa_length) {
- memcpy((caddr_t)buf, oa->oa_base, oa->oa_length);
- /* no real need....
- buf += RNDUP(oa->oa_length) / sizeof (int32_t);
- */
- }
- return (TRUE);
- }
- }
- if (xdrs->x_op == XDR_DECODE) {
- buf = XDR_INLINE(xdrs, 8 * BYTES_PER_XDR_UNIT);
- if (buf != NULL) {
- cmsg->rm_xid = IXDR_GET_LONG(buf);
- cmsg->rm_direction = IXDR_GET_ENUM(buf, enum msg_type);
- if (cmsg->rm_direction != CALL) {
- return (FALSE);
- }
- cmsg->rm_call.cb_rpcvers = IXDR_GET_LONG(buf);
- if (cmsg->rm_call.cb_rpcvers != RPC_MSG_VERSION) {
- return (FALSE);
- }
- cmsg->rm_call.cb_prog = IXDR_GET_LONG(buf);
- cmsg->rm_call.cb_vers = IXDR_GET_LONG(buf);
- cmsg->rm_call.cb_proc = IXDR_GET_LONG(buf);
- oa = &cmsg->rm_call.cb_cred;
- oa->oa_flavor = IXDR_GET_ENUM(buf, enum_t);
- oa->oa_length = IXDR_GET_LONG(buf);
- if (oa->oa_length) {
- if (oa->oa_length > MAX_AUTH_BYTES) {
- return (FALSE);
- }
- if (oa->oa_base == NULL) {
- oa->oa_base = (caddr_t)
- mem_alloc(oa->oa_length);
- }
- buf = XDR_INLINE(xdrs, RNDUP(oa->oa_length));
- if (buf == NULL) {
- if (xdr_opaque(xdrs, oa->oa_base,
- oa->oa_length) == FALSE) {
- return (FALSE);
- }
- } else {
- memcpy(oa->oa_base, (caddr_t)buf,
- oa->oa_length);
- /* no real need....
- buf += RNDUP(oa->oa_length) /
- sizeof (int32_t);
- */
- }
- }
- oa = &cmsg->rm_call.cb_verf;
- buf = XDR_INLINE(xdrs, 2 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (xdr_enum(xdrs, &oa->oa_flavor) == FALSE ||
- xdr_u_int(xdrs, &oa->oa_length) == FALSE) {
- return (FALSE);
- }
- } else {
- oa->oa_flavor = IXDR_GET_ENUM(buf, enum_t);
- oa->oa_length = IXDR_GET_LONG(buf);
- }
- if (oa->oa_length) {
- if (oa->oa_length > MAX_AUTH_BYTES) {
- return (FALSE);
- }
- if (oa->oa_base == NULL) {
- oa->oa_base = (caddr_t)
- mem_alloc(oa->oa_length);
- }
- buf = XDR_INLINE(xdrs, RNDUP(oa->oa_length));
- if (buf == NULL) {
- if (xdr_opaque(xdrs, oa->oa_base,
- oa->oa_length) == FALSE) {
- return (FALSE);
- }
- } else {
- memcpy(oa->oa_base, (caddr_t)buf,
- oa->oa_length);
- /* no real need...
- buf += RNDUP(oa->oa_length) /
- sizeof (int32_t);
- */
- }
- }
- return (TRUE);
- }
- }
- if (
- xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
- xdr_enum(xdrs, (enum_t *)&(cmsg->rm_direction)) &&
- (cmsg->rm_direction == CALL) &&
- xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
- (cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) &&
- xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) &&
- xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)) &&
- xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_proc)) &&
- xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_cred)) )
- return (xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_verf)));
- return (FALSE);
-}
-
diff --git a/lib/libc/rpc/rpc_commondata.c b/lib/libc/rpc/rpc_commondata.c
deleted file mode 100644
index 9640782..0000000
--- a/lib/libc/rpc/rpc_commondata.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)rpc_commondata.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: rpc_commondata.c,v 1.3 1996/12/30 14:57:33 peter Exp $";
-#endif
-
-#include <rpc/rpc.h>
-/*
- * This file should only contain common data (global data) that is exported
- * by public interfaces
- */
-struct opaque_auth _null_auth;
-fd_set svc_fdset;
-int svc_maxfd = -1;
-struct rpc_createerr rpc_createerr;
diff --git a/lib/libc/rpc/rpc_dtablesize.c b/lib/libc/rpc/rpc_dtablesize.c
deleted file mode 100644
index c2703fa..0000000
--- a/lib/libc/rpc/rpc_dtablesize.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";*/
-/*static char *sccsid = "from: @(#)rpc_dtablesize.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: rpc_dtablesize.c,v 1.6 1996/12/30 18:41:20 peter Exp $";
-#endif
-
-#include <sys/types.h>
-#include <unistd.h>
-
-/*
- * Cache the result of getdtablesize(), so we don't have to do an
- * expensive system call every time.
- */
-/*
- * XXX In FreeBSD 2.x, you can have the maximum number of open file
- * descriptors be greater than FD_SETSIZE (which us 256 by default).
- *
- * Since old programs tend to use this call to determine the first arg
- * for select(), having this return > FD_SETSIZE is a Bad Idea(TM)!
- */
-int
-_rpc_dtablesize(void)
-{
- static int size;
-
- if (size == 0) {
- size = getdtablesize();
- if (size > FD_SETSIZE)
- size = FD_SETSIZE;
- }
- return (size);
-}
diff --git a/lib/libc/rpc/rpc_prot.c b/lib/libc/rpc/rpc_prot.c
deleted file mode 100644
index 8debaf1..0000000
--- a/lib/libc/rpc/rpc_prot.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)rpc_prot.c 2.3 88/08/07 4.0 RPCSRC";*/
-static char *rcsid = "$Id: rpc_prot.c,v 1.4 1996/12/30 15:00:53 peter Exp $";
-#endif
-
-/*
- * rpc_prot.c
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * This set of routines implements the rpc message definition,
- * its serializer and some common rpc utility routines.
- * The routines are meant for various implementations of rpc -
- * they are NOT for the rpc client or rpc service implementations!
- * Because authentication stuff is easy and is part of rpc, the opaque
- * routines are also in this program.
- */
-
-#include <sys/param.h>
-
-#include <rpc/rpc.h>
-
-/* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */
-
-struct opaque_auth _null_auth;
-
-/*
- * XDR an opaque authentication struct
- * (see auth.h)
- */
-bool_t
-xdr_opaque_auth(xdrs, ap)
- register XDR *xdrs;
- register struct opaque_auth *ap;
-{
-
- if (xdr_enum(xdrs, &(ap->oa_flavor)))
- return (xdr_bytes(xdrs, &ap->oa_base,
- &ap->oa_length, MAX_AUTH_BYTES));
- return (FALSE);
-}
-
-/*
- * XDR a DES block
- */
-bool_t
-xdr_des_block(xdrs, blkp)
- register XDR *xdrs;
- register des_block *blkp;
-{
- return (xdr_opaque(xdrs, (caddr_t)blkp, sizeof(des_block)));
-}
-
-/* * * * * * * * * * * * * * XDR RPC MESSAGE * * * * * * * * * * * * * * * */
-
-/*
- * XDR the MSG_ACCEPTED part of a reply message union
- */
-bool_t
-xdr_accepted_reply(xdrs, ar)
- register XDR *xdrs;
- register struct accepted_reply *ar;
-{
-
- /* personalized union, rather than calling xdr_union */
- if (! xdr_opaque_auth(xdrs, &(ar->ar_verf)))
- return (FALSE);
- if (! xdr_enum(xdrs, (enum_t *)&(ar->ar_stat)))
- return (FALSE);
- switch (ar->ar_stat) {
-
- case SUCCESS:
- return ((*(ar->ar_results.proc))(xdrs, ar->ar_results.where));
-
- case PROG_MISMATCH:
- if (! xdr_u_int32_t(xdrs, &(ar->ar_vers.low)))
- return (FALSE);
- return (xdr_u_int32_t(xdrs, &(ar->ar_vers.high)));
- default:
- break;
- }
- return (TRUE); /* TRUE => open ended set of problems */
-}
-
-/*
- * XDR the MSG_DENIED part of a reply message union
- */
-bool_t
-xdr_rejected_reply(xdrs, rr)
- register XDR *xdrs;
- register struct rejected_reply *rr;
-{
-
- /* personalized union, rather than calling xdr_union */
- if (! xdr_enum(xdrs, (enum_t *)&(rr->rj_stat)))
- return (FALSE);
- switch (rr->rj_stat) {
-
- case RPC_MISMATCH:
- if (! xdr_u_int32_t(xdrs, &(rr->rj_vers.low)))
- return (FALSE);
- return (xdr_u_int32_t(xdrs, &(rr->rj_vers.high)));
-
- case AUTH_ERROR:
- return (xdr_enum(xdrs, (enum_t *)&(rr->rj_why)));
- }
- return (FALSE);
-}
-
-static struct xdr_discrim reply_dscrm[3] = {
- { (int)MSG_ACCEPTED, xdr_accepted_reply },
- { (int)MSG_DENIED, xdr_rejected_reply },
- { __dontcare__, NULL_xdrproc_t } };
-
-/*
- * XDR a reply message
- */
-bool_t
-xdr_replymsg(xdrs, rmsg)
- register XDR *xdrs;
- register struct rpc_msg *rmsg;
-{
- if (
- xdr_u_int32_t(xdrs, &(rmsg->rm_xid)) &&
- xdr_enum(xdrs, (enum_t *)&(rmsg->rm_direction)) &&
- (rmsg->rm_direction == REPLY) )
- return (xdr_union(xdrs, (enum_t *)&(rmsg->rm_reply.rp_stat),
- (caddr_t)&(rmsg->rm_reply.ru), reply_dscrm, NULL_xdrproc_t));
- return (FALSE);
-}
-
-
-/*
- * Serializes the "static part" of a call message header.
- * The fields include: rm_xid, rm_direction, rpcvers, prog, and vers.
- * The rm_xid is not really static, but the user can easily munge on the fly.
- */
-bool_t
-xdr_callhdr(xdrs, cmsg)
- register XDR *xdrs;
- register struct rpc_msg *cmsg;
-{
-
- cmsg->rm_direction = CALL;
- cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
- if (
- (xdrs->x_op == XDR_ENCODE) &&
- xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
- xdr_enum(xdrs, (enum_t *)&(cmsg->rm_direction)) &&
- xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
- xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) )
- return (xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)));
- return (FALSE);
-}
-
-/* ************************** Client utility routine ************* */
-
-static void
-accepted(acpt_stat, error)
- register enum accept_stat acpt_stat;
- register struct rpc_err *error;
-{
-
- switch (acpt_stat) {
-
- case PROG_UNAVAIL:
- error->re_status = RPC_PROGUNAVAIL;
- return;
-
- case PROG_MISMATCH:
- error->re_status = RPC_PROGVERSMISMATCH;
- return;
-
- case PROC_UNAVAIL:
- error->re_status = RPC_PROCUNAVAIL;
- return;
-
- case GARBAGE_ARGS:
- error->re_status = RPC_CANTDECODEARGS;
- return;
-
- case SYSTEM_ERR:
- error->re_status = RPC_SYSTEMERROR;
- return;
-
- case SUCCESS:
- error->re_status = RPC_SUCCESS;
- return;
- }
- /* something's wrong, but we don't know what ... */
- error->re_status = RPC_FAILED;
- error->re_lb.s1 = (long)MSG_ACCEPTED;
- error->re_lb.s2 = (long)acpt_stat;
-}
-
-static void
-rejected(rjct_stat, error)
- register enum reject_stat rjct_stat;
- register struct rpc_err *error;
-{
-
- switch (rjct_stat) {
-
- case RPC_VERSMISMATCH:
- error->re_status = RPC_VERSMISMATCH;
- return;
-
- case AUTH_ERROR:
- error->re_status = RPC_AUTHERROR;
- return;
- default:
- break;
- }
- /* something's wrong, but we don't know what ... */
- error->re_status = RPC_FAILED;
- error->re_lb.s1 = (long)MSG_DENIED;
- error->re_lb.s2 = (long)rjct_stat;
-}
-
-/*
- * given a reply message, fills in the error
- */
-void
-_seterr_reply(msg, error)
- register struct rpc_msg *msg;
- register struct rpc_err *error;
-{
-
- /* optimized for normal, SUCCESSful case */
- switch (msg->rm_reply.rp_stat) {
-
- case MSG_ACCEPTED:
- if (msg->acpted_rply.ar_stat == SUCCESS) {
- error->re_status = RPC_SUCCESS;
- return;
- };
- accepted(msg->acpted_rply.ar_stat, error);
- break;
-
- case MSG_DENIED:
- rejected(msg->rjcted_rply.rj_stat, error);
- break;
-
- default:
- error->re_status = RPC_FAILED;
- error->re_lb.s1 = (long)(msg->rm_reply.rp_stat);
- break;
- }
- switch (error->re_status) {
-
- case RPC_VERSMISMATCH:
- error->re_vers.low = msg->rjcted_rply.rj_vers.low;
- error->re_vers.high = msg->rjcted_rply.rj_vers.high;
- break;
-
- case RPC_AUTHERROR:
- error->re_why = msg->rjcted_rply.rj_why;
- break;
-
- case RPC_PROGVERSMISMATCH:
- error->re_vers.low = msg->acpted_rply.ar_vers.low;
- error->re_vers.high = msg->acpted_rply.ar_vers.high;
- break;
- default:
- break;
- }
-}
diff --git a/lib/libc/rpc/rpc_secure.3 b/lib/libc/rpc/rpc_secure.3
deleted file mode 100644
index a66455c..0000000
--- a/lib/libc/rpc/rpc_secure.3
+++ /dev/null
@@ -1,228 +0,0 @@
-.\" @(#)rpc_secure.3n 2.1 88/08/08 4.0 RPCSRC; from 1.19 88/06/24 SMI
-.\" $Id$
-.Dd February 16, 1988
-.Dt RPC 3
-.Sh NAME
-.Nm rpc_secure
-.Nd library routines for secure remote procedure calls
-.Sh SYNOPSIS
-.Fd #include <rpc/rpc.h>
-.Ft AUTH *
-.Fo authdes_create
-.Fa "char *name"
-.Fa "unsigned window"
-.Fa "struct sockaddr_in *addr"
-.Fa "des_block *ckey"
-.Fc
-.Fn authdes_getucred "struct authdes_cred *adc" "short *uid" "short *gid" "short *grouplen" "int *groups"
-.Fn getnetname "char name[MAXNETNAMELEN]"
-.Fn host2netname "char *name" "char *host" "char *domain"
-.Fn key_decryptsession "char *remotename" "des_block *deskey"
-.Fn key_encryptsession "char *remotename" "des_block *deskey"
-.Fn key_gendes "des_block *deskey"
-.Fn key_setsecret "char *key"
-.Fn netname2host "char *name" "char *host" "int hostlen"
-.Fn netname2user "char *name" "int *uidp" "int *gidp" "int *gidlenp" "int *gidlist"
-.Fn user2netname "char *name" "int uid" "char *domain"
-.Sh DESCRIPTION
-These routines are part of the
-.Tn RPC
-library. They implement
-.Tn DES
-Authentication. See
-.Xr rpc 3
-for further details about
-.Tn RPC .
-.Pp
-The
-.Fn authdes_create
-is the first of two routines which interface to the
-.Tn RPC
-secure authentication system, known as
-.Tn DES
-authentication.
-The second is
-.Fn authdes_getucred ,
-below.
-.Pp
-Note: the keyserver daemon
-.Xr keyserv 8
-must be running for the
-.Tn DES
-authentication system to work.
-.Pp
-.Fn Authdes_create ,
-used on the client side, returns an authentication handle that
-will enable the use of the secure authentication system.
-The first parameter
-.Fa name
-is the network name, or
-.Fa netname ,
-of the owner of the server process. This field usually
-represents a
-.Fa hostname
-derived from the utility routine
-.Fn host2netname ,
-but could also represent a user name using
-.Fn user2netname .
-The second field is window on the validity of
-the client credential, given in seconds. A small
-window is more secure than a large one, but choosing
-too small of a window will increase the frequency of
-resynchronizations because of clock drift. The third
-parameter
-.Fa addr
-is optional. If it is
-.Dv NULL ,
-then the authentication system will assume
-that the local clock is always in sync with the server's
-clock, and will not attempt resynchronizations. If an address
-is supplied, however, then the system will use the address
-for consulting the remote time service whenever
-resynchronization
-is required. This parameter is usually the
-address of the
-.Tn RPC
-server itself. The final parameter
-.Fa ckey
-is also optional. If it is
-.Dv NULL ,
-then the authentication system will
-generate a random
-.Tn DES
-key to be used for the encryption of credentials.
-If it is supplied, however, then it will be used instead.
-.Pp
-.Fn Authdes_getucred ,
-the second of the two
-.Tn DES
-authentication routines,
-is used on the server side for converting a
-.Tn DES
-credential, which is
-operating system independent, into a
-.Ux
-credential. This routine differs from utility routine
-.Fn netname2user
-in that
-.Fn authdes_getucred
-pulls its information from a cache, and does not have to do a
-Yellow Pages lookup every time it is called to get its information.
-.Pp
-.Fn Getnetname
-installs the unique, operating-system independent netname of
-the
-caller in the fixed-length array
-.Fa name .
-Returns
-.Dv TRUE
-if it succeeds and
-.Dv FALSE
-if it fails.
-.Pp
-.Fn Host2netname
-converts from a domain-specific hostname to an
-operating-system independent netname. Returns
-.Dv TRUE
-if it succeeds and
-.Dv FALSE
-if it fails. Inverse of
-.Fn netname2host .
-.Pp
-.Fn Key_decryptsession
-is an interface to the keyserver daemon, which is associated
-with
-.Tn RPC Ns 's
-secure authentication system (
-.Tn DES
-authentication).
-User programs rarely need to call it, or its associated routines
-.Fn key_encryptsession ,
-.Fn key_gendes
-and
-.Fn key_setsecret .
-System commands such as
-.Xr login 1
-and the
-.Tn RPC
-library are the main clients of these four routines.
-.Pp
-.Fn Key_decryptsession
-takes a server netname and a
-.Tn DES
-key, and decrypts the key by
-using the the public key of the the server and the secret key
-associated with the effective uid of the calling process. It
-is the inverse of
-.Fn key_encryptsession .
-.Pp
-.Fn Key_encryptsession
-is a keyserver interface routine. It
-takes a server netname and a des key, and encrypts
-it using the public key of the the server and the secret key
-associated with the effective uid of the calling process. It
-is the inverse of
-.Fn key_decryptsession .
-.Pp
-.Fn Key_gendes
-is a keyserver interface routine. It
-is used to ask the keyserver for a secure conversation key.
-Choosing one
-.Qq random
-is usually not good enough,
-because
-the common ways of choosing random numbers, such as using the
-current time, are very easy to guess.
-.Pp
-.Fn Key_setsecret
-is a keyserver interface routine. It is used to set the key for
-the effective
-.Fa uid
-of the calling process.
-.Pp
-.Fn Netname2host
-converts from an operating-system independent netname to a
-domain-specific hostname. Returns
-.Dv TRUE
-if it succeeds and
-.Dv FALSE
-if it fails. Inverse of
-.Fn host2netname .
-.Pp
-.Fn Netname2user
-converts from an operating-system independent netname to a
-domain-specific user ID.
-Returns
-.Dv TRUE
-if it succeeds and
-.Dv FALSE
-if it fails. Inverse of
-.Fn user2netname .
-.Pp
-.Fn User2netname
-converts from a domain-specific username to an operating-system
-independent netname. Returns
-.Dv TRUE
-if it succeeds and
-.Dv FALSE
-if it fails. Inverse of
-.Fn netname2user .
-.Sh SEE ALSO
-.Xr rpc 3 ,
-.Xr xdr 3 ,
-.Xr keyserv 8
-.Pp
-The following manuals:
-.Rs
-.%B Remote Procedure Calls: Protocol Specification
-.Re
-.Rs
-.%B Remote Procedure Call Programming Guide
-.Re
-.Rs
-.%B Rpcgen Programming Guide
-.Re
-.Rs
-.%B RPC: Remote Procedure Call Protocol Specification
-.%O RFC1050, Sun Microsystems Inc., USC-ISI
-.Re
diff --git a/lib/libc/rpc/rpcdname.c b/lib/libc/rpc/rpcdname.c
deleted file mode 100644
index f28b4fd..0000000
--- a/lib/libc/rpc/rpcdname.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user or with the express written consent of
- * Sun Microsystems, Inc.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rpcdname.c 1.7 91/03/11 Copyr 1989 Sun Micro";
-#endif
-
-/*
- * rpcdname.c
- * Gets the default domain name
- */
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-
-static char *default_domain = 0;
-
-static char *
-get_default_domain()
-{
- char temp[256];
-
- if (default_domain)
- return (default_domain);
- if (getdomainname(temp, sizeof(temp)) < 0)
- return (0);
- if ((int) strlen(temp) > 0) {
- default_domain = (char *)malloc((strlen(temp)+(unsigned)1));
- if (default_domain == 0)
- return (0);
- (void) strcpy(default_domain, temp);
- return (default_domain);
- }
- return (0);
-}
-
-/*
- * This is a wrapper for the system call getdomainname which returns a
- * ypclnt.h error code in the failure case. It also checks to see that
- * the domain name is non-null, knowing that the null string is going to
- * get rejected elsewhere in the NIS client package.
- */
-int
-_rpc_get_default_domain(domain)
- char **domain;
-{
- if ((*domain = get_default_domain()) != 0)
- return (0);
- return (-1);
-}
diff --git a/lib/libc/rpc/rstat.1 b/lib/libc/rpc/rstat.1
deleted file mode 100644
index 03c3a06..0000000
--- a/lib/libc/rpc/rstat.1
+++ /dev/null
@@ -1,57 +0,0 @@
-.\" @(#)rstat.1 2.1 88/08/03 4.0 RPCSRC
-.TH RSTAT 1 "3 August 1988"
-.SH NAME
-rstat \- remote status display
-.SH SYNOPSIS
-.B rstat
-.B host
-.SH DESCRIPTION
-.LP
-.B rstat
-displays a summary of the current system status of a particular
-.BR host .
-The output shows the current time of day, how long the system has
-been up,
-and the load averages.
-The load average numbers give the number of jobs in the run queue
-averaged over 1, 5 and 15 minutes.
-.PP
-The
-.B rstat_svc(8)
-daemon must be running on the remote host for this command to
-work.
-.B rstat
-uses an RPC protocol defined in /usr/include/rpcsvc/rstat.x.
-.SH EXAMPLE
-.RS
-.ft B
-.nf
-example% rstat otherhost
-7:36am up 6 days, 16:45, load average: 0.20, 0.23, 0.18
-example%
-.ft R
-.fi
-.RE
-.SH DIAGNOSTICS
-.LP
-rstat: RPC: Program not registered
-.IP
-The
-.B rstat_svc
-daemon has not been started on the remote host.
-.LP
-rstat: RPC: Timed out
-.IP
-A communication error occurred. Either the network is
-excessively congested, or the
-.B rstat_svc
-daemon has terminated on the remote host.
-.LP
-rstat: RPC: Port mapper failure - RPC: Timed out
-.IP
-The remote host is not running the portmapper (see
-.BR portmap(8) ),
-and cannot accommodate any RPC-based services. The host may be down.
-.SH "SEE ALSO"
-.BR portmap (8),
-.BR rstat_svc (8)
diff --git a/lib/libc/rpc/rstat_svc.8 b/lib/libc/rpc/rstat_svc.8
deleted file mode 100644
index b7b4386..0000000
--- a/lib/libc/rpc/rstat_svc.8
+++ /dev/null
@@ -1,21 +0,0 @@
-.\" @(#)rstat_svc.8c 2.2 88/08/03 4.0 RPCSRC; from 1.10 87/09/09 SMI
-.TH RSTAT_SVC 8 "24 November 1987"
-.SH NAME
-rstat_svc \- kernel statistics server
-.SH SYNOPSIS
-.B /etc/rstat_svc
-.SH DESCRIPTION
-.LP
-.B rstat_svc
-is a server which returns performance statistics
-obtained from the kernel.
-These statistics are graphically displayed by the Sun Microsystems program,
-.BR perfmeter (1).
-The
-.B rstat_svc
-daemon is normally invoked at boot time through /etc/rc.local.
-.PP
-.B rstat_svc
-uses an RPC protocol defined in /usr/include/rpcsvc/rstat.x.
-.\" .SH "SEE ALSO"
-.\" .BR rstat (1),
diff --git a/lib/libc/rpc/rtime.3 b/lib/libc/rpc/rtime.3
deleted file mode 100644
index af0c1ca..0000000
--- a/lib/libc/rpc/rtime.3
+++ /dev/null
@@ -1,43 +0,0 @@
-.\" @(#)rtime.3n 2.1 88/08/08 4.0 RPCSRC; from 1.5 88/02/08 SMI
-.TH RTIME 3 "22 November 1987"
-.SH NAME
-rtime \- get remote time
-.SH SYNOPSIS
-.nf
-.B #include <sys/types.h>
-.B #include <sys/time.h>
-.B #include <netinet/in.h>
-.LP
-.B int rtime(addrp, timep, timeout)
-.B struct sockaddr_in \(**addrp;
-.B struct timeval \(**timep;
-.B struct timeval \(**timeout;
-.fi
-.SH DESCRIPTION
-.B rtime(\|)
-consults the Internet Time Server at the address pointed to by
-.I addrp
-and returns the remote time in the
-.B timeval
-struct pointed to by
-.IR timep .
-Normally, the
-.SM UDP
-protocol is used when consulting the Time Server. The
-.I timeout
-parameter specifies how long the
-routine should wait before giving
-up when waiting for a reply. If
-.I timeout
-is specified as
-.SM NULL\s0,
-however, the routine will instead use
-.SM TCP
-and block until a reply is received from the time server.
-.LP
-The routine returns 0 if it is successful. Otherwise,
-it returns \-1 and
-.B errno
-is set to reflect the cause of the error.
-.SH "SEE ALSO"
-.BR timed (8c)
diff --git a/lib/libc/rpc/rtime.c b/lib/libc/rpc/rtime.c
deleted file mode 100644
index fb2b402..0000000
--- a/lib/libc/rpc/rtime.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * Copyright (c) 1988 by Sun Microsystems, Inc.
-
- */
-
-/*
- * rtime - get time from remote machine
- *
- * gets time, obtaining value from host
- * on the udp/time socket. Since timeserver returns
- * with time of day in seconds since Jan 1, 1900, must
- * subtract seconds before Jan 1, 1970 to get
- * what unix uses.
- */
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <netdb.h>
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/* from: static char sccsid[] = "@(#)rtime.c 2.2 88/08/10 4.0 RPCSRC; from 1.8 88/02/08 SMI"; */
-static const char rcsid[] = "$Id$";
-#endif
-
-extern int _rpc_dtablesize __P(( void ));
-
-#define NYEARS (unsigned long)(1970 - 1900)
-#define TOFFSET (unsigned long)(60*60*24*(365*NYEARS + (NYEARS/4)))
-
-static void do_close __P(( int ));
-
-int
-rtime(addrp, timep, timeout)
- struct sockaddr_in *addrp;
- struct timeval *timep;
- struct timeval *timeout;
-{
- int s;
- fd_set readfds;
- int res;
- unsigned long thetime;
- struct sockaddr_in from;
- int fromlen;
- int type;
- struct servent *serv;
-
- if (timeout == NULL) {
- type = SOCK_STREAM;
- } else {
- type = SOCK_DGRAM;
- }
- s = socket(AF_INET, type, 0);
- if (s < 0) {
- return(-1);
- }
- addrp->sin_family = AF_INET;
-
- /* TCP and UDP port are the same in this case */
- if ((serv = getservbyname("time", "tcp")) == NULL) {
- return(-1);
- }
-
- addrp->sin_port = serv->s_port;
-
- if (type == SOCK_DGRAM) {
- res = sendto(s, (char *)&thetime, sizeof(thetime), 0,
- (struct sockaddr *)addrp, sizeof(*addrp));
- if (res < 0) {
- do_close(s);
- return(-1);
- }
- do {
- FD_ZERO(&readfds);
- FD_SET(s, &readfds);
- res = select(_rpc_dtablesize(), &readfds,
- (fd_set *)NULL, (fd_set *)NULL, timeout);
- } while (res < 0 && errno == EINTR);
- if (res <= 0) {
- if (res == 0) {
- errno = ETIMEDOUT;
- }
- do_close(s);
- return(-1);
- }
- fromlen = sizeof(from);
- res = recvfrom(s, (char *)&thetime, sizeof(thetime), 0,
- (struct sockaddr *)&from, &fromlen);
- do_close(s);
- if (res < 0) {
- return(-1);
- }
- } else {
- if (connect(s, (struct sockaddr *)addrp, sizeof(*addrp)) < 0) {
- do_close(s);
- return(-1);
- }
- res = read(s, (char *)&thetime, sizeof(thetime));
- do_close(s);
- if (res < 0) {
- return(-1);
- }
- }
- if (res != sizeof(thetime)) {
- errno = EIO;
- return(-1);
- }
- thetime = ntohl(thetime);
- timep->tv_sec = thetime - TOFFSET;
- timep->tv_usec = 0;
- return(0);
-}
-
-static void
-do_close(s)
- int s;
-{
- int save;
-
- save = errno;
- (void) close(s);
- errno = save;
-}
diff --git a/lib/libc/rpc/svc.c b/lib/libc/rpc/svc.c
deleted file mode 100644
index ba0b53f..0000000
--- a/lib/libc/rpc/svc.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)svc.c 1.44 88/02/08 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)svc.c 2.4 88/08/11 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc.c,v 1.12 1997/05/28 05:05:23 wpaul Exp $";
-#endif
-
-/*
- * svc.c, Server-side remote procedure call interface.
- *
- * There are two sets of procedures here. The xprt routines are
- * for handling transport handles. The svc routines handle the
- * list of service routines.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <sys/errno.h>
-#include <rpc/rpc.h>
-#include <rpc/pmap_clnt.h>
-
-static SVCXPRT **xports;
-static int xportssize;
-
-#define NULL_SVC ((struct svc_callout *)0)
-#define RQCRED_SIZE 400 /* this size is excessive */
-
-#define max(a, b) (a > b ? a : b)
-
-/*
- * The services list
- * Each entry represents a set of procedures (an rpc program).
- * The dispatch routine takes request structs and runs the
- * apropriate procedure.
- */
-static struct svc_callout {
- struct svc_callout *sc_next;
- u_long sc_prog;
- u_long sc_vers;
- void (*sc_dispatch)();
-} *svc_head;
-
-static struct svc_callout *svc_find();
-
-int __svc_fdsetsize = 0;
-fd_set *__svc_fdset = NULL;
-
-/* *************** SVCXPRT related stuff **************** */
-
-/*
- * Activate a transport handle.
- */
-void
-xprt_register(xprt)
- SVCXPRT *xprt;
-{
- register int sock = xprt->xp_sock;
-
- if (sock + 1 > __svc_fdsetsize) {
- int bytes = howmany(sock + 1, NFDBITS) * sizeof(fd_mask);
- fd_set *fds;
-
- fds = (fd_set *)malloc(bytes);
- memset(fds, 0, bytes);
- if (__svc_fdset) {
- memcpy(fds, __svc_fdset, howmany(__svc_fdsetsize,
- NFDBITS) * sizeof(fd_mask));
- free(__svc_fdset);
- }
- __svc_fdset = fds;
- __svc_fdsetsize = howmany(sock+1, NFDBITS) * NFDBITS;
- }
-
- if (sock < FD_SETSIZE)
- FD_SET(sock, &svc_fdset);
- FD_SET(sock, __svc_fdset);
-
- if (xports == NULL || sock + 1 > xportssize) {
- SVCXPRT **xp;
- int size = FD_SETSIZE;
-
- if (sock + 1 > size)
- size = sock + 1;
- xp = (SVCXPRT **)mem_alloc(size * sizeof(SVCXPRT *));
- memset(xp, 0, size * sizeof(SVCXPRT *));
- if (xports) {
- memcpy(xp, xports, xportssize * sizeof(SVCXPRT *));
- free(xports);
- }
- xportssize = size;
- xports = xp;
- }
- xports[sock] = xprt;
- svc_maxfd = max(svc_maxfd, sock);
-}
-
-/*
- * De-activate a transport handle.
- */
-void
-xprt_unregister(xprt)
- SVCXPRT *xprt;
-{
- register int sock = xprt->xp_sock;
-
- if (xports[sock] == xprt) {
- xports[sock] = (SVCXPRT *)0;
- if (sock < FD_SETSIZE)
- FD_CLR(sock, &svc_fdset);
- FD_CLR(sock, __svc_fdset);
- if (sock == svc_maxfd) {
- for (svc_maxfd--; svc_maxfd >= 0; svc_maxfd--)
- if (xports[svc_maxfd])
- break;
- }
- /*
- * XXX could use svc_maxfd as a hint to
- * decrease the size of __svc_fdset
- */
- }
-}
-
-
-/* ********************** CALLOUT list related stuff ************* */
-
-/*
- * Add a service program to the callout list.
- * The dispatch routine will be called when a rpc request for this
- * program number comes in.
- */
-bool_t
-svc_register(xprt, prog, vers, dispatch, protocol)
- SVCXPRT *xprt;
- u_long prog;
- u_long vers;
- void (*dispatch)();
- int protocol;
-{
- struct svc_callout *prev;
- register struct svc_callout *s;
-
- if ((s = svc_find(prog, vers, &prev)) != NULL_SVC) {
- if (s->sc_dispatch == dispatch)
- goto pmap_it; /* he is registering another xptr */
- return (FALSE);
- }
- s = (struct svc_callout *)mem_alloc(sizeof(struct svc_callout));
- if (s == (struct svc_callout *)0) {
- return (FALSE);
- }
- s->sc_prog = prog;
- s->sc_vers = vers;
- s->sc_dispatch = dispatch;
- s->sc_next = svc_head;
- svc_head = s;
-pmap_it:
- /* now register the information with the local binder service */
- if (protocol) {
- return (pmap_set(prog, vers, protocol, xprt->xp_port));
- }
- return (TRUE);
-}
-
-/*
- * Remove a service program from the callout list.
- */
-void
-svc_unregister(prog, vers)
- u_long prog;
- u_long vers;
-{
- struct svc_callout *prev;
- register struct svc_callout *s;
-
- if ((s = svc_find(prog, vers, &prev)) == NULL_SVC)
- return;
- if (prev == NULL_SVC) {
- svc_head = s->sc_next;
- } else {
- prev->sc_next = s->sc_next;
- }
- s->sc_next = NULL_SVC;
- mem_free((char *) s, (u_int) sizeof(struct svc_callout));
- /* now unregister the information with the local binder service */
- (void)pmap_unset(prog, vers);
-}
-
-/*
- * Search the callout list for a program number, return the callout
- * struct.
- */
-static struct svc_callout *
-svc_find(prog, vers, prev)
- u_long prog;
- u_long vers;
- struct svc_callout **prev;
-{
- register struct svc_callout *s, *p;
-
- p = NULL_SVC;
- for (s = svc_head; s != NULL_SVC; s = s->sc_next) {
- if ((s->sc_prog == prog) && (s->sc_vers == vers))
- goto done;
- p = s;
- }
-done:
- *prev = p;
- return (s);
-}
-
-/* ******************* REPLY GENERATION ROUTINES ************ */
-
-/*
- * Send a reply to an rpc request
- */
-bool_t
-svc_sendreply(xprt, xdr_results, xdr_location)
- register SVCXPRT *xprt;
- xdrproc_t xdr_results;
- caddr_t xdr_location;
-{
- struct rpc_msg rply;
-
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
- rply.acpted_rply.ar_verf = xprt->xp_verf;
- rply.acpted_rply.ar_stat = SUCCESS;
- rply.acpted_rply.ar_results.where = xdr_location;
- rply.acpted_rply.ar_results.proc = xdr_results;
- return (SVC_REPLY(xprt, &rply));
-}
-
-/*
- * No procedure error reply
- */
-void
-svcerr_noproc(xprt)
- register SVCXPRT *xprt;
-{
- struct rpc_msg rply;
-
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
- rply.acpted_rply.ar_verf = xprt->xp_verf;
- rply.acpted_rply.ar_stat = PROC_UNAVAIL;
- SVC_REPLY(xprt, &rply);
-}
-
-/*
- * Can't decode args error reply
- */
-void
-svcerr_decode(xprt)
- register SVCXPRT *xprt;
-{
- struct rpc_msg rply;
-
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
- rply.acpted_rply.ar_verf = xprt->xp_verf;
- rply.acpted_rply.ar_stat = GARBAGE_ARGS;
- SVC_REPLY(xprt, &rply);
-}
-
-/*
- * Some system error
- */
-void
-svcerr_systemerr(xprt)
- register SVCXPRT *xprt;
-{
- struct rpc_msg rply;
-
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
- rply.acpted_rply.ar_verf = xprt->xp_verf;
- rply.acpted_rply.ar_stat = SYSTEM_ERR;
- SVC_REPLY(xprt, &rply);
-}
-
-/*
- * Authentication error reply
- */
-void
-svcerr_auth(xprt, why)
- SVCXPRT *xprt;
- enum auth_stat why;
-{
- struct rpc_msg rply;
-
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_DENIED;
- rply.rjcted_rply.rj_stat = AUTH_ERROR;
- rply.rjcted_rply.rj_why = why;
- SVC_REPLY(xprt, &rply);
-}
-
-/*
- * Auth too weak error reply
- */
-void
-svcerr_weakauth(xprt)
- SVCXPRT *xprt;
-{
-
- svcerr_auth(xprt, AUTH_TOOWEAK);
-}
-
-/*
- * Program unavailable error reply
- */
-void
-svcerr_noprog(xprt)
- register SVCXPRT *xprt;
-{
- struct rpc_msg rply;
-
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
- rply.acpted_rply.ar_verf = xprt->xp_verf;
- rply.acpted_rply.ar_stat = PROG_UNAVAIL;
- SVC_REPLY(xprt, &rply);
-}
-
-/*
- * Program version mismatch error reply
- */
-void
-svcerr_progvers(xprt, low_vers, high_vers)
- register SVCXPRT *xprt;
- u_long low_vers;
- u_long high_vers;
-{
- struct rpc_msg rply;
-
- rply.rm_direction = REPLY;
- rply.rm_reply.rp_stat = MSG_ACCEPTED;
- rply.acpted_rply.ar_verf = xprt->xp_verf;
- rply.acpted_rply.ar_stat = PROG_MISMATCH;
- rply.acpted_rply.ar_vers.low = low_vers;
- rply.acpted_rply.ar_vers.high = high_vers;
- SVC_REPLY(xprt, &rply);
-}
-
-/* ******************* SERVER INPUT STUFF ******************* */
-
-/*
- * Get server side input from some transport.
- *
- * Statement of authentication parameters management:
- * This function owns and manages all authentication parameters, specifically
- * the "raw" parameters (msg.rm_call.cb_cred and msg.rm_call.cb_verf) and
- * the "cooked" credentials (rqst->rq_clntcred).
- * However, this function does not know the structure of the cooked
- * credentials, so it make the following assumptions:
- * a) the structure is contiguous (no pointers), and
- * b) the cred structure size does not exceed RQCRED_SIZE bytes.
- * In all events, all three parameters are freed upon exit from this routine.
- * The storage is trivially management on the call stack in user land, but
- * is mallocated in kernel land.
- */
-
-void
-svc_getreq(rdfds)
- int rdfds;
-{
- fd_set readfds;
-
- FD_ZERO(&readfds);
- readfds.fds_bits[0] = rdfds;
- svc_getreqset(&readfds);
-}
-
-void
-svc_getreqset(readfds)
- fd_set *readfds;
-{
- svc_getreqset2(readfds, FD_SETSIZE);
-}
-
-void
-svc_getreqset2(readfds, width)
- fd_set *readfds;
- int width;
-{
- enum xprt_stat stat;
- struct rpc_msg msg;
- int prog_found;
- u_long low_vers;
- u_long high_vers;
- struct svc_req r;
- register SVCXPRT *xprt;
- register int bit;
- register int sock;
- register fd_mask mask, *maskp;
- char cred_area[2*MAX_AUTH_BYTES + RQCRED_SIZE];
- msg.rm_call.cb_cred.oa_base = cred_area;
- msg.rm_call.cb_verf.oa_base = &(cred_area[MAX_AUTH_BYTES]);
- r.rq_clntcred = &(cred_area[2*MAX_AUTH_BYTES]);
-
-
- maskp = readfds->fds_bits;
- for (sock = 0; sock < width; sock += NFDBITS) {
- for (mask = *maskp++; (bit = ffs(mask)); mask ^= (1 << (bit - 1))) {
- /* sock has input waiting */
- xprt = xports[sock + bit - 1];
- if (xprt == NULL)
- /* But do we control sock? */
- continue;
- /* now receive msgs from xprtprt (support batch calls) */
- do {
- if (SVC_RECV(xprt, &msg)) {
-
- /* now find the exported program and call it */
- register struct svc_callout *s;
- enum auth_stat why;
-
- r.rq_xprt = xprt;
- r.rq_prog = msg.rm_call.cb_prog;
- r.rq_vers = msg.rm_call.cb_vers;
- r.rq_proc = msg.rm_call.cb_proc;
- r.rq_cred = msg.rm_call.cb_cred;
- /* first authenticate the message */
- if ((why= _authenticate(&r, &msg)) != AUTH_OK) {
- svcerr_auth(xprt, why);
- goto call_done;
- }
- /* now match message with a registered service*/
- prog_found = FALSE;
- low_vers = (u_long) - 1;
- high_vers = 0;
- for (s = svc_head; s != NULL_SVC; s = s->sc_next) {
- if (s->sc_prog == r.rq_prog) {
- if (s->sc_vers == r.rq_vers) {
- (*s->sc_dispatch)(&r, xprt);
- goto call_done;
- } /* found correct version */
- prog_found = TRUE;
- if (s->sc_vers < low_vers)
- low_vers = s->sc_vers;
- if (s->sc_vers > high_vers)
- high_vers = s->sc_vers;
- } /* found correct program */
- }
- /*
- * if we got here, the program or version
- * is not served ...
- */
- if (prog_found)
- svcerr_progvers(xprt,
- low_vers, high_vers);
- else
- svcerr_noprog(xprt);
- /* Fall through to ... */
- }
- call_done:
- if ((stat = SVC_STAT(xprt)) == XPRT_DIED){
- SVC_DESTROY(xprt);
- break;
- }
- } while (stat == XPRT_MOREREQS);
- }
- }
-}
diff --git a/lib/libc/rpc/svc_auth.c b/lib/libc/rpc/svc_auth.c
deleted file mode 100644
index 0063e75..0000000
--- a/lib/libc/rpc/svc_auth.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Copyright (c) 1986-1991 by Sun Microsystems Inc.
- */
-
-#ident "@(#)svc_auth.c 1.16 94/04/24 SMI"
-
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)svc_auth.c 1.26 89/02/07 Copyr 1984 Sun Micro";
-#endif
-
-/*
- * svc_auth.c, Server-side rpc authenticator interface.
- *
- */
-
-#ifdef KERNEL
-#include <sys/param.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-#include <rpc/clnt.h>
-#include <rpc/rpc_msg.h>
-#include <rpc/svc.h>
-#include <rpc/svc_auth.h>
-#else
-#include <stdlib.h>
-#include <rpc/rpc.h>
-#endif
-#include <sys/types.h>
-
-/*
- * svcauthsw is the bdevsw of server side authentication.
- *
- * Server side authenticators are called from authenticate by
- * using the client auth struct flavor field to index into svcauthsw.
- * The server auth flavors must implement a routine that looks
- * like:
- *
- * enum auth_stat
- * flavorx_auth(rqst, msg)
- * register struct svc_req *rqst;
- * register struct rpc_msg *msg;
- *
- */
-
-enum auth_stat _svcauth_null(); /* no authentication */
-enum auth_stat _svcauth_unix(); /* (system) unix style (uid, gids) */
-enum auth_stat _svcauth_short(); /* short hand unix style */
-enum auth_stat _svcauth_des(); /* des style */
-
-/* declarations to allow servers to specify new authentication flavors */
-struct authsvc {
- int flavor;
- enum auth_stat (*handler)();
- struct authsvc *next;
-};
-static struct authsvc *Auths = NULL;
-
-/*
- * The call rpc message, msg has been obtained from the wire. The msg contains
- * the raw form of credentials and verifiers. authenticate returns AUTH_OK
- * if the msg is successfully authenticated. If AUTH_OK then the routine also
- * does the following things:
- * set rqst->rq_xprt->verf to the appropriate response verifier;
- * sets rqst->rq_client_cred to the "cooked" form of the credentials.
- *
- * NB: rqst->rq_cxprt->verf must be pre-alloctaed;
- * its length is set appropriately.
- *
- * The caller still owns and is responsible for msg->u.cmb.cred and
- * msg->u.cmb.verf. The authentication system retains ownership of
- * rqst->rq_client_cred, the cooked credentials.
- *
- * There is an assumption that any flavour less than AUTH_NULL is
- * invalid.
- */
-enum auth_stat
-_authenticate(rqst, msg)
- register struct svc_req *rqst;
- struct rpc_msg *msg;
-{
- register int cred_flavor;
- register struct authsvc *asp;
-
- rqst->rq_cred = msg->rm_call.cb_cred;
- rqst->rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor;
- rqst->rq_xprt->xp_verf.oa_length = 0;
- cred_flavor = rqst->rq_cred.oa_flavor;
- switch (cred_flavor) {
- case AUTH_NULL:
- return(_svcauth_null(rqst, msg));
- case AUTH_UNIX:
- return(_svcauth_unix(rqst, msg));
- case AUTH_SHORT:
- return(_svcauth_short(rqst, msg));
- /*
- * We leave AUTH_DES turned off by default because svcauth_des()
- * needs getpublickey(), which is in librpcsvc, not libc. If we
- * included AUTH_DES as a built-in flavor, programs that don't
- * have -lrpcsvc in their Makefiles wouldn't link correctly, even
- * though they don't use AUTH_DES. And I'm too lazy to go through
- * the tree looking for all of them.
- */
-#ifdef DES_BUILTIN
- case AUTH_DES:
- return(_svcauth_des(rqst, msg));
-#endif
- }
-
- /* flavor doesn't match any of the builtin types, so try new ones */
- for (asp = Auths; asp; asp = asp->next) {
- if (asp->flavor == cred_flavor) {
- enum auth_stat as;
-
- as = (*asp->handler)(rqst, msg);
- return (as);
- }
- }
-
- return (AUTH_REJECTEDCRED);
-}
-
-/*ARGSUSED*/
-enum auth_stat
-_svcauth_null(rqst, msg)
- struct svc_req *rqst;
- struct rpc_msg *msg;
-{
- return (AUTH_OK);
-}
-
-/*
- * Allow the rpc service to register new authentication types that it is
- * prepared to handle. When an authentication flavor is registered,
- * the flavor is checked against already registered values. If not
- * registered, then a new Auths entry is added on the list.
- *
- * There is no provision to delete a registration once registered.
- *
- * This routine returns:
- * 0 if registration successful
- * 1 if flavor already registered
- * -1 if can't register (errno set)
- */
-
-int
-svc_auth_reg(cred_flavor, handler)
- register int cred_flavor;
- enum auth_stat (*handler)();
-{
- register struct authsvc *asp;
-
- switch (cred_flavor) {
- case AUTH_NULL:
- case AUTH_UNIX:
- case AUTH_SHORT:
-#ifdef DES_BUILTIN
- case AUTH_DES:
-#endif
- /* already registered */
- return (1);
-
- default:
- for (asp = Auths; asp; asp = asp->next) {
- if (asp->flavor == cred_flavor) {
- /* already registered */
- return (1);
- }
- }
-
- /* this is a new one, so go ahead and register it */
- asp = (struct authsvc *)mem_alloc(sizeof (*asp));
- if (asp == NULL) {
- return (-1);
- }
- asp->flavor = cred_flavor;
- asp->handler = handler;
- asp->next = Auths;
- Auths = asp;
- break;
- }
- return (0);
-}
diff --git a/lib/libc/rpc/svc_auth_des.c b/lib/libc/rpc/svc_auth_des.c
deleted file mode 100644
index 889182e..0000000
--- a/lib/libc/rpc/svc_auth_des.c
+++ /dev/null
@@ -1,531 +0,0 @@
-
-/*
- * Copyright (c) 1988 by Sun Microsystems, Inc.
- */
-
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-/*
- * svcauth_des.c, server-side des authentication
- *
- * We insure for the service the following:
- * (1) The timestamp microseconds do not exceed 1 million.
- * (2) The timestamp plus the window is less than the current time.
- * (3) The timestamp is not less than the one previously
- * seen in the current session.
- *
- * It is up to the server to determine if the window size is
- * too small .
- *
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <rpc/des_crypt.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <rpc/auth.h>
-#include <rpc/auth_des.h>
-#include <rpc/svc.h>
-#include <rpc/rpc_msg.h>
-#include <rpc/svc_auth.h>
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/* from: static char sccsid[] = "@(#)svcauth_des.c 2.3 89/07/11 4.0 RPCSRC; from 1.15 88/02/08 SMI"; */
-static const char rcsid[] = "$Id$";
-#endif
-
-#define debug(msg) printf("svcauth_des: %s\n", msg)
-
-#define USEC_PER_SEC ((u_long) 1000000L)
-#define BEFORE(t1, t2) timercmp(t1, t2, <)
-
-/*
- * LRU cache of conversation keys and some other useful items.
- */
-#define AUTHDES_CACHESZ 64
-struct cache_entry {
- des_block key; /* conversation key */
- char *rname; /* client's name */
- u_int window; /* credential lifetime window */
- struct timeval laststamp; /* detect replays of creds */
- char *localcred; /* generic local credential */
-};
-static struct cache_entry *authdes_cache/* [AUTHDES_CACHESZ] */;
-static short *authdes_lru/* [AUTHDES_CACHESZ] */;
-
-static void cache_init(); /* initialize the cache */
-static short cache_spot(); /* find an entry in the cache */
-static void cache_ref(/*short sid*/); /* note that sid was ref'd */
-
-static void invalidate(); /* invalidate entry in cache */
-
-/*
- * cache statistics
- */
-static struct {
- u_long ncachehits; /* times cache hit, and is not replay */
- u_long ncachereplays; /* times cache hit, and is replay */
- u_long ncachemisses; /* times cache missed */
-} svcauthdes_stats;
-
-/*
- * Service side authenticator for AUTH_DES
- */
-enum auth_stat
-_svcauth_des(rqst, msg)
- register struct svc_req *rqst;
- register struct rpc_msg *msg;
-{
-
- register long *ixdr;
- des_block cryptbuf[2];
- register struct authdes_cred *cred;
- struct authdes_verf verf;
- int status;
- register struct cache_entry *entry;
- short sid = 0;
- des_block *sessionkey;
- des_block ivec;
- u_int window;
- struct timeval timestamp;
- u_long namelen;
- struct area {
- struct authdes_cred area_cred;
- char area_netname[MAXNETNAMELEN+1];
- } *area;
-
- if (authdes_cache == NULL) {
- cache_init();
- }
-
- area = (struct area *)rqst->rq_clntcred;
- cred = (struct authdes_cred *)&area->area_cred;
-
- /*
- * Get the credential
- */
- ixdr = (long *)msg->rm_call.cb_cred.oa_base;
- cred->adc_namekind = IXDR_GET_ENUM(ixdr, enum authdes_namekind);
- switch (cred->adc_namekind) {
- case ADN_FULLNAME:
- namelen = IXDR_GET_U_LONG(ixdr);
- if (namelen > MAXNETNAMELEN) {
- return (AUTH_BADCRED);
- }
- cred->adc_fullname.name = area->area_netname;
- bcopy((char *)ixdr, cred->adc_fullname.name,
- (u_int)namelen);
- cred->adc_fullname.name[namelen] = 0;
- ixdr += (RNDUP(namelen) / BYTES_PER_XDR_UNIT);
- cred->adc_fullname.key.key.high = (u_long)*ixdr++;
- cred->adc_fullname.key.key.low = (u_long)*ixdr++;
- cred->adc_fullname.window = (u_long)*ixdr++;
- break;
- case ADN_NICKNAME:
- cred->adc_nickname = (u_long)*ixdr++;
- break;
- default:
- return (AUTH_BADCRED);
- }
-
- /*
- * Get the verifier
- */
- ixdr = (long *)msg->rm_call.cb_verf.oa_base;
- verf.adv_xtimestamp.key.high = (u_long)*ixdr++;
- verf.adv_xtimestamp.key.low = (u_long)*ixdr++;
- verf.adv_int_u = (u_long)*ixdr++;
-
-
- /*
- * Get the conversation key
- */
- if (cred->adc_namekind == ADN_FULLNAME) {
- netobj pkey;
- char pkey_data[1024];
-
- sessionkey = &cred->adc_fullname.key;
- if (! getpublickey(cred->adc_fullname.name, pkey_data)) {
- debug("getpublickey");
- return(AUTH_BADCRED);
- }
- pkey.n_bytes = pkey_data;
- pkey.n_len = strlen(pkey_data) + 1;
- if (key_decryptsession_pk(cred->adc_fullname.name, &pkey,
- sessionkey) < 0) {
- debug("decryptsessionkey");
- return (AUTH_BADCRED); /* key not found */
- }
- } else { /* ADN_NICKNAME */
- sid = (short)cred->adc_nickname;
- if (sid >= AUTHDES_CACHESZ) {
- debug("bad nickname");
- return (AUTH_BADCRED); /* garbled credential */
- }
- sessionkey = &authdes_cache[sid].key;
- }
-
-
- /*
- * Decrypt the timestamp
- */
- cryptbuf[0] = verf.adv_xtimestamp;
- if (cred->adc_namekind == ADN_FULLNAME) {
- cryptbuf[1].key.high = cred->adc_fullname.window;
- cryptbuf[1].key.low = verf.adv_winverf;
- ivec.key.high = ivec.key.low = 0;
- status = cbc_crypt((char *)sessionkey, (char *)cryptbuf,
- 2*sizeof(des_block), DES_DECRYPT | DES_HW,
- (char *)&ivec);
- } else {
- status = ecb_crypt((char *)sessionkey, (char *)cryptbuf,
- sizeof(des_block), DES_DECRYPT | DES_HW);
- }
- if (DES_FAILED(status)) {
- debug("decryption failure");
- return (AUTH_FAILED); /* system error */
- }
-
- /*
- * XDR the decrypted timestamp
- */
- ixdr = (long *)cryptbuf;
- timestamp.tv_sec = IXDR_GET_LONG(ixdr);
- timestamp.tv_usec = IXDR_GET_LONG(ixdr);
-
- /*
- * Check for valid credentials and verifiers.
- * They could be invalid because the key was flushed
- * out of the cache, and so a new session should begin.
- * Be sure and send AUTH_REJECTED{CRED, VERF} if this is the case.
- */
- {
- struct timeval current;
- int nick;
- int winverf;
-
- if (cred->adc_namekind == ADN_FULLNAME) {
- window = IXDR_GET_U_LONG(ixdr);
- winverf = IXDR_GET_U_LONG(ixdr);
- if (winverf != window - 1) {
- debug("window verifier mismatch");
- return (AUTH_BADCRED); /* garbled credential */
- }
- sid = cache_spot(sessionkey, cred->adc_fullname.name,
- &timestamp);
- if (sid < 0) {
- debug("replayed credential");
- return (AUTH_REJECTEDCRED); /* replay */
- }
- nick = 0;
- } else { /* ADN_NICKNAME */
- window = authdes_cache[sid].window;
- nick = 1;
- }
-
- if ((u_long)timestamp.tv_usec >= USEC_PER_SEC) {
- debug("invalid usecs");
- /* cached out (bad key), or garbled verifier */
- return (nick ? AUTH_REJECTEDVERF : AUTH_BADVERF);
- }
- if (nick && BEFORE(&timestamp,
- &authdes_cache[sid].laststamp)) {
- debug("timestamp before last seen");
- return (AUTH_REJECTEDVERF); /* replay */
- }
- (void) gettimeofday(&current, (struct timezone *)NULL);
- current.tv_sec -= window; /* allow for expiration */
- if (!BEFORE(&current, &timestamp)) {
- debug("timestamp expired");
- /* replay, or garbled credential */
- return (nick ? AUTH_REJECTEDVERF : AUTH_BADCRED);
- }
- }
-
- /*
- * Set up the reply verifier
- */
- verf.adv_nickname = (u_long)sid;
-
- /*
- * xdr the timestamp before encrypting
- */
- ixdr = (long *)cryptbuf;
- IXDR_PUT_LONG(ixdr, timestamp.tv_sec - 1);
- IXDR_PUT_LONG(ixdr, timestamp.tv_usec);
-
- /*
- * encrypt the timestamp
- */
- status = ecb_crypt((char *)sessionkey, (char *)cryptbuf,
- sizeof(des_block), DES_ENCRYPT | DES_HW);
- if (DES_FAILED(status)) {
- debug("encryption failure");
- return (AUTH_FAILED); /* system error */
- }
- verf.adv_xtimestamp = cryptbuf[0];
-
- /*
- * Serialize the reply verifier, and update rqst
- */
- ixdr = (long *)msg->rm_call.cb_verf.oa_base;
- *ixdr++ = (long)verf.adv_xtimestamp.key.high;
- *ixdr++ = (long)verf.adv_xtimestamp.key.low;
- *ixdr++ = (long)verf.adv_int_u;
-
- rqst->rq_xprt->xp_verf.oa_flavor = AUTH_DES;
- rqst->rq_xprt->xp_verf.oa_base = msg->rm_call.cb_verf.oa_base;
- rqst->rq_xprt->xp_verf.oa_length =
- (char *)ixdr - msg->rm_call.cb_verf.oa_base;
-
- /*
- * We succeeded, commit the data to the cache now and
- * finish cooking the credential.
- */
- entry = &authdes_cache[sid];
- entry->laststamp = timestamp;
- cache_ref(sid);
- if (cred->adc_namekind == ADN_FULLNAME) {
- cred->adc_fullname.window = window;
- cred->adc_nickname = (u_long)sid; /* save nickname */
- if (entry->rname != NULL) {
- mem_free(entry->rname, strlen(entry->rname) + 1);
- }
- entry->rname = (char *)mem_alloc((u_int)strlen(cred->adc_fullname.name)
- + 1);
- if (entry->rname != NULL) {
- (void) strcpy(entry->rname, cred->adc_fullname.name);
- } else {
- debug("out of memory");
- }
- entry->key = *sessionkey;
- entry->window = window;
- invalidate(entry->localcred); /* mark any cached cred invalid */
- } else { /* ADN_NICKNAME */
- /*
- * nicknames are cooked into fullnames
- */
- cred->adc_namekind = ADN_FULLNAME;
- cred->adc_fullname.name = entry->rname;
- cred->adc_fullname.key = entry->key;
- cred->adc_fullname.window = entry->window;
- }
- return (AUTH_OK); /* we made it!*/
-}
-
-
-/*
- * Initialize the cache
- */
-static void
-cache_init()
-{
- register int i;
-
- authdes_cache = (struct cache_entry *)
- mem_alloc(sizeof(struct cache_entry) * AUTHDES_CACHESZ);
- bzero((char *)authdes_cache,
- sizeof(struct cache_entry) * AUTHDES_CACHESZ);
-
- authdes_lru = (short *)mem_alloc(sizeof(short) * AUTHDES_CACHESZ);
- /*
- * Initialize the lru list
- */
- for (i = 0; i < AUTHDES_CACHESZ; i++) {
- authdes_lru[i] = i;
- }
-}
-
-
-/*
- * Find the lru victim
- */
-static short
-cache_victim()
-{
- return (authdes_lru[AUTHDES_CACHESZ-1]);
-}
-
-/*
- * Note that sid was referenced
- */
-static void
-cache_ref(sid)
- register short sid;
-{
- register int i;
- register short curr;
- register short prev;
-
- prev = authdes_lru[0];
- authdes_lru[0] = sid;
- for (i = 1; prev != sid; i++) {
- curr = authdes_lru[i];
- authdes_lru[i] = prev;
- prev = curr;
- }
-}
-
-
-/*
- * Find a spot in the cache for a credential containing
- * the items given. Return -1 if a replay is detected, otherwise
- * return the spot in the cache.
- */
-static short
-cache_spot(key, name, timestamp)
- register des_block *key;
- char *name;
- struct timeval *timestamp;
-{
- register struct cache_entry *cp;
- register int i;
- register u_long hi;
-
- hi = key->key.high;
- for (cp = authdes_cache, i = 0; i < AUTHDES_CACHESZ; i++, cp++) {
- if (cp->key.key.high == hi &&
- cp->key.key.low == key->key.low &&
- cp->rname != NULL &&
- bcmp(cp->rname, name, strlen(name) + 1) == 0) {
- if (BEFORE(timestamp, &cp->laststamp)) {
- svcauthdes_stats.ncachereplays++;
- return (-1); /* replay */
- }
- svcauthdes_stats.ncachehits++;
- return (i); /* refresh */
- }
- }
- svcauthdes_stats.ncachemisses++;
- return (cache_victim()); /* new credential */
-}
-
-
-#if (defined(sun) || defined(vax) || defined(__FreeBSD__))
-/*
- * Local credential handling stuff.
- * NOTE: bsd unix dependent.
- * Other operating systems should put something else here.
- */
-#define UNKNOWN -2 /* grouplen, if cached cred is unknown user */
-#define INVALID -1 /* grouplen, if cache entry is invalid */
-
-struct bsdcred {
- short uid; /* cached uid */
- short gid; /* cached gid */
- short grouplen; /* length of cached groups */
- short groups[NGROUPS]; /* cached groups */
-};
-
-/*
- * Map a des credential into a unix cred.
- * We cache the credential here so the application does
- * not have to make an rpc call every time to interpret
- * the credential.
- */
-int
-authdes_getucred(adc, uid, gid, grouplen, groups)
- struct authdes_cred *adc;
- uid_t *uid;
- gid_t *gid;
- int *grouplen;
- register gid_t *groups;
-{
- unsigned sid;
- register int i;
- uid_t i_uid;
- gid_t i_gid;
- int i_grouplen;
- struct bsdcred *cred;
-
- sid = adc->adc_nickname;
- if (sid >= AUTHDES_CACHESZ) {
- debug("invalid nickname");
- return (0);
- }
- cred = (struct bsdcred *)authdes_cache[sid].localcred;
- if (cred == NULL) {
- cred = (struct bsdcred *)mem_alloc(sizeof(struct bsdcred));
- authdes_cache[sid].localcred = (char *)cred;
- cred->grouplen = INVALID;
- }
- if (cred->grouplen == INVALID) {
- /*
- * not in cache: lookup
- */
- if (!netname2user(adc->adc_fullname.name, &i_uid, &i_gid,
- &i_grouplen, groups))
- {
- debug("unknown netname");
- cred->grouplen = UNKNOWN; /* mark as lookup up, but not found */
- return (0);
- }
- debug("missed ucred cache");
- *uid = cred->uid = i_uid;
- *gid = cred->gid = i_gid;
- *grouplen = cred->grouplen = i_grouplen;
- for (i = i_grouplen - 1; i >= 0; i--) {
- cred->groups[i] = groups[i]; /* int to short */
- }
- return (1);
- } else if (cred->grouplen == UNKNOWN) {
- /*
- * Already lookup up, but no match found
- */
- return (0);
- }
-
- /*
- * cached credentials
- */
- *uid = cred->uid;
- *gid = cred->gid;
- *grouplen = cred->grouplen;
- for (i = cred->grouplen - 1; i >= 0; i--) {
- groups[i] = cred->groups[i]; /* short to int */
- }
- return (1);
-}
-
-static void
-invalidate(cred)
- char *cred;
-{
- if (cred == NULL) {
- return;
- }
- ((struct bsdcred *)cred)->grouplen = INVALID;
-}
-#endif
-
diff --git a/lib/libc/rpc/svc_auth_unix.c b/lib/libc/rpc/svc_auth_unix.c
deleted file mode 100644
index 959cb73..0000000
--- a/lib/libc/rpc/svc_auth_unix.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)svc_auth_unix.c 1.28 88/02/08 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)svc_auth_unix.c 2.3 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_auth_unix.c,v 1.4 1996/12/30 15:10:14 peter Exp $";
-#endif
-
-/*
- * svc_auth_unix.c
- * Handles UNIX flavor authentication parameters on the service side of rpc.
- * There are two svc auth implementations here: AUTH_UNIX and AUTH_SHORT.
- * _svcauth_unix does full blown unix style uid,gid+gids auth,
- * _svcauth_short uses a shorthand auth to index into a cache of longhand auths.
- * Note: the shorthand has been gutted for efficiency.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <rpc/rpc.h>
-
-/*
- * Unix longhand authenticator
- */
-enum auth_stat
-_svcauth_unix(rqst, msg)
- register struct svc_req *rqst;
- register struct rpc_msg *msg;
-{
- register enum auth_stat stat;
- XDR xdrs;
- register struct authunix_parms *aup;
- register int32_t *buf;
- struct area {
- struct authunix_parms area_aup;
- char area_machname[MAX_MACHINE_NAME+1];
- int area_gids[NGRPS];
- } *area;
- u_int auth_len;
- int str_len, gid_len;
- register int i;
-
- area = (struct area *) rqst->rq_clntcred;
- aup = &area->area_aup;
- aup->aup_machname = area->area_machname;
- aup->aup_gids = area->area_gids;
- auth_len = (u_int)msg->rm_call.cb_cred.oa_length;
- xdrmem_create(&xdrs, msg->rm_call.cb_cred.oa_base, auth_len,XDR_DECODE);
- buf = XDR_INLINE(&xdrs, auth_len);
- if (buf != NULL) {
- aup->aup_time = IXDR_GET_LONG(buf);
- str_len = IXDR_GET_U_LONG(buf);
- if (str_len > MAX_MACHINE_NAME) {
- stat = AUTH_BADCRED;
- goto done;
- }
- memcpy(aup->aup_machname, (caddr_t)buf, (u_int)str_len);
- aup->aup_machname[str_len] = 0;
- str_len = RNDUP(str_len);
- buf += str_len / sizeof (int32_t);
- aup->aup_uid = IXDR_GET_LONG(buf);
- aup->aup_gid = IXDR_GET_LONG(buf);
- gid_len = IXDR_GET_U_LONG(buf);
- if (gid_len > NGRPS) {
- stat = AUTH_BADCRED;
- goto done;
- }
- aup->aup_len = gid_len;
- for (i = 0; i < gid_len; i++) {
- aup->aup_gids[i] = IXDR_GET_LONG(buf);
- }
- /*
- * five is the smallest unix credentials structure -
- * timestamp, hostname len (0), uid, gid, and gids len (0).
- */
- if ((5 + gid_len) * BYTES_PER_XDR_UNIT + str_len > auth_len) {
- (void) printf("bad auth_len gid %d str %d auth %d\n",
- gid_len, str_len, auth_len);
- stat = AUTH_BADCRED;
- goto done;
- }
- } else if (! xdr_authunix_parms(&xdrs, aup)) {
- xdrs.x_op = XDR_FREE;
- (void)xdr_authunix_parms(&xdrs, aup);
- stat = AUTH_BADCRED;
- goto done;
- }
-
- /* get the verifier */
- if ((u_int)msg->rm_call.cb_verf.oa_length) {
- rqst->rq_xprt->xp_verf.oa_flavor =
- msg->rm_call.cb_verf.oa_flavor;
- rqst->rq_xprt->xp_verf.oa_base =
- msg->rm_call.cb_verf.oa_base;
- rqst->rq_xprt->xp_verf.oa_length =
- msg->rm_call.cb_verf.oa_length;
- } else {
- rqst->rq_xprt->xp_verf.oa_flavor = AUTH_NULL;
- rqst->rq_xprt->xp_verf.oa_length = 0;
- }
- stat = AUTH_OK;
-done:
- XDR_DESTROY(&xdrs);
- return (stat);
-}
-
-
-/*
- * Shorthand unix authenticator
- * Looks up longhand in a cache.
- */
-/*ARGSUSED*/
-enum auth_stat
-_svcauth_short(rqst, msg)
- struct svc_req *rqst;
- struct rpc_msg *msg;
-{
- return (AUTH_REJECTEDCRED);
-}
diff --git a/lib/libc/rpc/svc_raw.c b/lib/libc/rpc/svc_raw.c
deleted file mode 100644
index 3a5bcb3..0000000
--- a/lib/libc/rpc/svc_raw.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)svc_raw.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_raw.c,v 1.3 1995/10/22 14:51:36 phk Exp $";
-#endif
-
-/*
- * svc_raw.c, This a toy for simple testing and timing.
- * Interface to create an rpc client and server in the same UNIX process.
- * This lets us similate rpc and get rpc (round trip) overhead, without
- * any interference from the kernal.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <rpc/rpc.h>
-#include <stdlib.h>
-
-/*
- * This is the "network" that we will be moving data over
- */
-static struct svcraw_private {
- char _raw_buf[UDPMSGSIZE];
- SVCXPRT server;
- XDR xdr_stream;
- char verf_body[MAX_AUTH_BYTES];
-} *svcraw_private;
-
-static bool_t svcraw_recv();
-static enum xprt_stat svcraw_stat();
-static bool_t svcraw_getargs();
-static bool_t svcraw_reply();
-static bool_t svcraw_freeargs();
-static void svcraw_destroy();
-
-static struct xp_ops server_ops = {
- svcraw_recv,
- svcraw_stat,
- svcraw_getargs,
- svcraw_reply,
- svcraw_freeargs,
- svcraw_destroy
-};
-
-SVCXPRT *
-svcraw_create()
-{
- register struct svcraw_private *srp = svcraw_private;
-
- if (srp == 0) {
- srp = (struct svcraw_private *)calloc(1, sizeof (*srp));
- if (srp == 0)
- return (0);
- }
- srp->server.xp_sock = 0;
- srp->server.xp_port = 0;
- srp->server.xp_ops = &server_ops;
- srp->server.xp_verf.oa_base = srp->verf_body;
- xdrmem_create(&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, XDR_FREE);
- return (&srp->server);
-}
-
-static enum xprt_stat
-svcraw_stat()
-{
-
- return (XPRT_IDLE);
-}
-
-static bool_t
-svcraw_recv(xprt, msg)
- SVCXPRT *xprt;
- struct rpc_msg *msg;
-{
- register struct svcraw_private *srp = svcraw_private;
- register XDR *xdrs;
-
- if (srp == 0)
- return (0);
- xdrs = &srp->xdr_stream;
- xdrs->x_op = XDR_DECODE;
- XDR_SETPOS(xdrs, 0);
- if (! xdr_callmsg(xdrs, msg))
- return (FALSE);
- return (TRUE);
-}
-
-static bool_t
-svcraw_reply(xprt, msg)
- SVCXPRT *xprt;
- struct rpc_msg *msg;
-{
- register struct svcraw_private *srp = svcraw_private;
- register XDR *xdrs;
-
- if (srp == 0)
- return (FALSE);
- xdrs = &srp->xdr_stream;
- xdrs->x_op = XDR_ENCODE;
- XDR_SETPOS(xdrs, 0);
- if (! xdr_replymsg(xdrs, msg))
- return (FALSE);
- (void)XDR_GETPOS(xdrs); /* called just for overhead */
- return (TRUE);
-}
-
-static bool_t
-svcraw_getargs(xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
-{
- register struct svcraw_private *srp = svcraw_private;
-
- if (srp == 0)
- return (FALSE);
- return ((*xdr_args)(&srp->xdr_stream, args_ptr));
-}
-
-static bool_t
-svcraw_freeargs(xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
-{
- register struct svcraw_private *srp = svcraw_private;
- register XDR *xdrs;
-
- if (srp == 0)
- return (FALSE);
- xdrs = &srp->xdr_stream;
- xdrs->x_op = XDR_FREE;
- return ((*xdr_args)(xdrs, args_ptr));
-}
-
-static void
-svcraw_destroy()
-{
-}
diff --git a/lib/libc/rpc/svc_run.c b/lib/libc/rpc/svc_run.c
deleted file mode 100644
index 0692c25..0000000
--- a/lib/libc/rpc/svc_run.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)svc_run.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_run.c,v 1.7 1997/02/22 15:01:32 peter Exp $";
-#endif
-
-/*
- * This is the rpc server side idle loop
- * Wait for input, call server program.
- */
-#include <rpc/rpc.h>
-#include <stdio.h>
-#include <sys/errno.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-
-extern int __svc_fdsetsize;
-extern fd_set *__svc_fdset;
-
-void
-svc_run()
-{
- fd_set *fds;
-
- for (;;) {
- if (__svc_fdset) {
- int bytes = howmany(__svc_fdsetsize, NFDBITS) *
- sizeof(fd_mask);
- fds = (fd_set *)malloc(bytes);
- memcpy(fds, __svc_fdset, bytes);
- } else
- fds = NULL;
- switch (select(svc_maxfd + 1, fds, NULL, NULL,
- (struct timeval *)0)) {
- case -1:
- if (errno == EINTR) {
- if (fds)
- free(fds);
- continue;
- }
- perror("svc_run: - select failed");
- if (fds)
- free(fds);
- return;
- case 0:
- if (fds)
- free(fds);
- continue;
- default:
- /* if fds == NULL, select() can't return a result */
- svc_getreqset2(fds, svc_maxfd + 1);
- free(fds);
- }
- }
-}
diff --git a/lib/libc/rpc/svc_simple.c b/lib/libc/rpc/svc_simple.c
deleted file mode 100644
index 0324675..0000000
--- a/lib/libc/rpc/svc_simple.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)svc_simple.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_simple.c,v 1.5 1996/12/30 15:16:22 peter Exp $";
-#endif
-
-/*
- * svc_simple.c
- * Simplified front end to rpc.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <rpc/pmap_clnt.h>
-#include <sys/socket.h>
-#include <netdb.h>
-
-static struct proglst {
- char *(*p_progname)();
- int p_prognum;
- int p_procnum;
- xdrproc_t p_inproc, p_outproc;
- struct proglst *p_nxt;
-} *proglst;
-static void universal();
-static SVCXPRT *transp;
-struct proglst *pl;
-
-int
-registerrpc(prognum, versnum, procnum, progname, inproc, outproc)
- int prognum, versnum, procnum;
- char *(*progname)();
- xdrproc_t inproc, outproc;
-{
-
- if (procnum == NULLPROC) {
- (void) fprintf(stderr,
- "can't reassign procedure number %ld\n", NULLPROC);
- return (-1);
- }
- if (transp == 0) {
- transp = svcudp_create(RPC_ANYSOCK);
- if (transp == NULL) {
- (void) fprintf(stderr, "couldn't create an rpc server\n");
- return (-1);
- }
- }
- (void) pmap_unset((u_long)prognum, (u_long)versnum);
- if (!svc_register(transp, (u_long)prognum, (u_long)versnum,
- universal, IPPROTO_UDP)) {
- (void) fprintf(stderr, "couldn't register prog %d vers %d\n",
- prognum, versnum);
- return (-1);
- }
- pl = (struct proglst *)malloc(sizeof(struct proglst));
- if (pl == NULL) {
- (void) fprintf(stderr, "registerrpc: out of memory\n");
- return (-1);
- }
- pl->p_progname = progname;
- pl->p_prognum = prognum;
- pl->p_procnum = procnum;
- pl->p_inproc = inproc;
- pl->p_outproc = outproc;
- pl->p_nxt = proglst;
- proglst = pl;
- return (0);
-}
-
-static void
-universal(rqstp, transp)
- struct svc_req *rqstp;
- SVCXPRT *transp;
-{
- int prog, proc;
- char *outdata;
- char xdrbuf[UDPMSGSIZE];
- struct proglst *pl;
-
- /*
- * enforce "procnum 0 is echo" convention
- */
- if (rqstp->rq_proc == NULLPROC) {
- if (svc_sendreply(transp, xdr_void, NULL) == FALSE) {
- (void) fprintf(stderr, "xxx\n");
- exit(1);
- }
- return;
- }
- prog = rqstp->rq_prog;
- proc = rqstp->rq_proc;
- for (pl = proglst; pl != NULL; pl = pl->p_nxt)
- if (pl->p_prognum == prog && pl->p_procnum == proc) {
- /* decode arguments into a CLEAN buffer */
- memset(xdrbuf, 0, sizeof(xdrbuf)); /* required ! */
- if (!svc_getargs(transp, pl->p_inproc, xdrbuf)) {
- svcerr_decode(transp);
- return;
- }
- outdata = (*(pl->p_progname))(xdrbuf);
- if (outdata == NULL && pl->p_outproc != xdr_void)
- /* there was an error */
- return;
- if (!svc_sendreply(transp, pl->p_outproc, outdata)) {
- (void) fprintf(stderr,
- "trouble replying to prog %d\n",
- pl->p_prognum);
- exit(1);
- }
- /* free the decoded arguments */
- (void)svc_freeargs(transp, pl->p_inproc, xdrbuf);
- return;
- }
- (void) fprintf(stderr, "never registered prog %d\n", prog);
- exit(1);
-}
-
diff --git a/lib/libc/rpc/svc_tcp.c b/lib/libc/rpc/svc_tcp.c
deleted file mode 100644
index 1387ee1..0000000
--- a/lib/libc/rpc/svc_tcp.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)svc_tcp.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_tcp.c,v 1.8 1996/12/30 15:19:08 peter Exp $";
-#endif
-
-/*
- * svc_tcp.c, Server side for TCP/IP based RPC.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * Actually implements two flavors of transporter -
- * a tcp rendezvouser (a listner and connection establisher)
- * and a record/tcp stream.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <errno.h>
-
-/*
- * Ops vector for TCP/IP based rpc service handle
- */
-static bool_t svctcp_recv();
-static enum xprt_stat svctcp_stat();
-static bool_t svctcp_getargs();
-static bool_t svctcp_reply();
-static bool_t svctcp_freeargs();
-static void svctcp_destroy();
-
-static struct xp_ops svctcp_op = {
- svctcp_recv,
- svctcp_stat,
- svctcp_getargs,
- svctcp_reply,
- svctcp_freeargs,
- svctcp_destroy
-};
-
-/*
- * Ops vector for TCP/IP rendezvous handler
- */
-static bool_t rendezvous_request();
-static enum xprt_stat rendezvous_stat();
-
-static struct xp_ops svctcp_rendezvous_op = {
- rendezvous_request,
- rendezvous_stat,
- (bool_t (*)())abort,
- (bool_t (*)())abort,
- (bool_t (*)())abort,
- svctcp_destroy
-};
-
-static int readtcp(), writetcp();
-static SVCXPRT *makefd_xprt();
-
-struct tcp_rendezvous { /* kept in xprt->xp_p1 */
- u_int sendsize;
- u_int recvsize;
-};
-
-struct tcp_conn { /* kept in xprt->xp_p1 */
- enum xprt_stat strm_stat;
- u_long x_id;
- XDR xdrs;
- char verf_body[MAX_AUTH_BYTES];
-};
-
-/*
- * Usage:
- * xprt = svctcp_create(sock, send_buf_size, recv_buf_size);
- *
- * Creates, registers, and returns a (rpc) tcp based transporter.
- * Once *xprt is initialized, it is registered as a transporter
- * see (svc.h, xprt_register). This routine returns
- * a NULL if a problem occurred.
- *
- * If sock<0 then a socket is created, else sock is used.
- * If the socket, sock is not bound to a port then svctcp_create
- * binds it to an arbitrary port. The routine then starts a tcp
- * listener on the socket's associated port. In any (successful) case,
- * xprt->xp_sock is the registered socket number and xprt->xp_port is the
- * associated port number.
- *
- * Since tcp streams do buffered io similar to stdio, the caller can specify
- * how big the send and receive buffers are via the second and third parms;
- * 0 => use the system default.
- */
-SVCXPRT *
-svctcp_create(sock, sendsize, recvsize)
- register int sock;
- u_int sendsize;
- u_int recvsize;
-{
- bool_t madesock = FALSE;
- register SVCXPRT *xprt;
- register struct tcp_rendezvous *r;
- struct sockaddr_in addr;
- int len = sizeof(struct sockaddr_in);
-
- if (sock == RPC_ANYSOCK) {
- if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
- perror("svctcp_.c - udp socket creation problem");
- return ((SVCXPRT *)NULL);
- }
- madesock = TRUE;
- }
- memset(&addr, 0, sizeof (addr));
- addr.sin_len = sizeof(struct sockaddr_in);
- addr.sin_family = AF_INET;
- if (bindresvport(sock, &addr)) {
- addr.sin_port = 0;
- (void)bind(sock, (struct sockaddr *)&addr, len);
- }
- if ((getsockname(sock, (struct sockaddr *)&addr, &len) != 0) ||
- (listen(sock, 2) != 0)) {
- perror("svctcp_.c - cannot getsockname or listen");
- if (madesock)
- (void)close(sock);
- return ((SVCXPRT *)NULL);
- }
- r = (struct tcp_rendezvous *)mem_alloc(sizeof(*r));
- if (r == NULL) {
- (void) fprintf(stderr, "svctcp_create: out of memory\n");
- return (NULL);
- }
- r->sendsize = sendsize;
- r->recvsize = recvsize;
- xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
- if (xprt == NULL) {
- (void) fprintf(stderr, "svctcp_create: out of memory\n");
- return (NULL);
- }
- xprt->xp_p2 = NULL;
- xprt->xp_p1 = (caddr_t)r;
- xprt->xp_verf = _null_auth;
- xprt->xp_ops = &svctcp_rendezvous_op;
- xprt->xp_port = ntohs(addr.sin_port);
- xprt->xp_sock = sock;
- xprt_register(xprt);
- return (xprt);
-}
-
-/*
- * Like svtcp_create(), except the routine takes any *open* UNIX file
- * descriptor as its first input.
- */
-SVCXPRT *
-svcfd_create(fd, sendsize, recvsize)
- int fd;
- u_int sendsize;
- u_int recvsize;
-{
-
- return (makefd_xprt(fd, sendsize, recvsize));
-}
-
-static SVCXPRT *
-makefd_xprt(fd, sendsize, recvsize)
- int fd;
- u_int sendsize;
- u_int recvsize;
-{
- register SVCXPRT *xprt;
- register struct tcp_conn *cd;
-
- xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
- if (xprt == (SVCXPRT *)NULL) {
- (void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n");
- goto done;
- }
- cd = (struct tcp_conn *)mem_alloc(sizeof(struct tcp_conn));
- if (cd == (struct tcp_conn *)NULL) {
- (void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n");
- mem_free((char *) xprt, sizeof(SVCXPRT));
- xprt = (SVCXPRT *)NULL;
- goto done;
- }
- cd->strm_stat = XPRT_IDLE;
- xdrrec_create(&(cd->xdrs), sendsize, recvsize,
- (caddr_t)xprt, readtcp, writetcp);
- xprt->xp_p2 = NULL;
- xprt->xp_p1 = (caddr_t)cd;
- xprt->xp_verf.oa_base = cd->verf_body;
- xprt->xp_addrlen = 0;
- xprt->xp_ops = &svctcp_op; /* truely deals with calls */
- xprt->xp_port = 0; /* this is a connection, not a rendezvouser */
- xprt->xp_sock = fd;
- xprt_register(xprt);
- done:
- return (xprt);
-}
-
-static bool_t
-rendezvous_request(xprt)
- register SVCXPRT *xprt;
-{
- int sock;
- struct tcp_rendezvous *r;
- struct sockaddr_in addr;
- int len;
-
- r = (struct tcp_rendezvous *)xprt->xp_p1;
- again:
- len = sizeof(struct sockaddr_in);
- if ((sock = accept(xprt->xp_sock, (struct sockaddr *)&addr,
- &len)) < 0) {
- if (errno == EINTR)
- goto again;
- return (FALSE);
- }
- /*
- * XXX careful for ftp bounce attacks. If discovered, close the
- * socket and look for another connection.
- */
- if (addr.sin_port == htons(20)) {
- close(sock);
- goto again;
- }
- /*
- * make a new transporter (re-uses xprt)
- */
- xprt = makefd_xprt(sock, r->sendsize, r->recvsize);
- xprt->xp_raddr = addr;
- xprt->xp_addrlen = len;
- return (FALSE); /* there is never an rpc msg to be processed */
-}
-
-static enum xprt_stat
-rendezvous_stat()
-{
-
- return (XPRT_IDLE);
-}
-
-static void
-svctcp_destroy(xprt)
- register SVCXPRT *xprt;
-{
- register struct tcp_conn *cd = (struct tcp_conn *)xprt->xp_p1;
-
- xprt_unregister(xprt);
- (void)close(xprt->xp_sock);
- if (xprt->xp_port != 0) {
- /* a rendezvouser socket */
- xprt->xp_port = 0;
- } else {
- /* an actual connection socket */
- XDR_DESTROY(&(cd->xdrs));
- }
- mem_free((caddr_t)cd, sizeof(struct tcp_conn));
- mem_free((caddr_t)xprt, sizeof(SVCXPRT));
-}
-
-/*
- * All read operations timeout after 35 seconds.
- * A timeout is fatal for the connection.
- */
-static struct timeval wait_per_try = { 35, 0 };
-
-/*
- * reads data from the tcp conection.
- * any error is fatal and the connection is closed.
- * (And a read of zero bytes is a half closed stream => error.)
- */
-static int
-readtcp(xprt, buf, len)
- register SVCXPRT *xprt;
- caddr_t buf;
- register int len;
-{
- register int sock = xprt->xp_sock;
- struct timeval start, delta, tv;
- struct timeval tmp1, tmp2;
- fd_set *fds, readfds;
-
- if (sock + 1 > FD_SETSIZE) {
- int bytes = howmany(sock+1, NFDBITS) * sizeof(fd_mask);
- fds = (fd_set *)malloc(bytes);
-
- if (fds == NULL)
- goto fatal_err;
- memset(fds, 0, bytes);
- } else {
- fds = &readfds;
- FD_ZERO(fds);
- }
-
- delta = wait_per_try;
- gettimeofday(&start, NULL);
- do {
- /* XXX we know the other bits are still clear */
- FD_SET(sock, fds);
- tv = delta; /* in case select() implements writeback */
- switch (select(sock + 1, fds, NULL, NULL, &tv)) {
- case -1:
- if (errno != EINTR)
- goto fatal_err;
- gettimeofday(&tmp1, NULL);
- timersub(&tmp1, &start, &tmp2);
- timersub(&delta, &tmp2, &tmp1);
- if (tmp1.tv_sec < 0 || !timerisset(&tmp1))
- goto fatal_err;
- delta = tmp1;
- continue;
- case 0:
- goto fatal_err;
- }
- } while (!FD_ISSET(sock, fds));
- if ((len = read(sock, buf, len)) > 0) {
- if (fds != &readfds)
- free(fds);
- return (len);
- }
-fatal_err:
- ((struct tcp_conn *)(xprt->xp_p1))->strm_stat = XPRT_DIED;
- if (fds != &readfds)
- free(fds);
- return (-1);
-}
-
-/*
- * writes data to the tcp connection.
- * Any error is fatal and the connection is closed.
- */
-static int
-writetcp(xprt, buf, len)
- register SVCXPRT *xprt;
- caddr_t buf;
- int len;
-{
- register int i, cnt;
-
- for (cnt = len; cnt > 0; cnt -= i, buf += i) {
- if ((i = write(xprt->xp_sock, buf, cnt)) < 0) {
- ((struct tcp_conn *)(xprt->xp_p1))->strm_stat =
- XPRT_DIED;
- return (-1);
- }
- }
- return (len);
-}
-
-static enum xprt_stat
-svctcp_stat(xprt)
- SVCXPRT *xprt;
-{
- register struct tcp_conn *cd =
- (struct tcp_conn *)(xprt->xp_p1);
-
- if (cd->strm_stat == XPRT_DIED)
- return (XPRT_DIED);
- if (! xdrrec_eof(&(cd->xdrs)))
- return (XPRT_MOREREQS);
- return (XPRT_IDLE);
-}
-
-static bool_t
-svctcp_recv(xprt, msg)
- SVCXPRT *xprt;
- register struct rpc_msg *msg;
-{
- register struct tcp_conn *cd =
- (struct tcp_conn *)(xprt->xp_p1);
- register XDR *xdrs = &(cd->xdrs);
-
- xdrs->x_op = XDR_DECODE;
- (void)xdrrec_skiprecord(xdrs);
- if (xdr_callmsg(xdrs, msg)) {
- cd->x_id = msg->rm_xid;
- return (TRUE);
- }
- return (FALSE);
-}
-
-static bool_t
-svctcp_getargs(xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
-{
-
- return ((*xdr_args)(&(((struct tcp_conn *)(xprt->xp_p1))->xdrs), args_ptr));
-}
-
-static bool_t
-svctcp_freeargs(xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
-{
- register XDR *xdrs =
- &(((struct tcp_conn *)(xprt->xp_p1))->xdrs);
-
- xdrs->x_op = XDR_FREE;
- return ((*xdr_args)(xdrs, args_ptr));
-}
-
-static bool_t
-svctcp_reply(xprt, msg)
- SVCXPRT *xprt;
- register struct rpc_msg *msg;
-{
- register struct tcp_conn *cd =
- (struct tcp_conn *)(xprt->xp_p1);
- register XDR *xdrs = &(cd->xdrs);
- register bool_t stat;
-
- xdrs->x_op = XDR_ENCODE;
- msg->rm_xid = cd->x_id;
- stat = xdr_replymsg(xdrs, msg);
- (void)xdrrec_endofrecord(xdrs, TRUE);
- return (stat);
-}
diff --git a/lib/libc/rpc/svc_udp.c b/lib/libc/rpc/svc_udp.c
deleted file mode 100644
index 6622de2..0000000
--- a/lib/libc/rpc/svc_udp.c
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)svc_udp.c 2.2 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_udp.c,v 1.7 1996/12/30 15:21:19 peter Exp $";
-#endif
-
-/*
- * svc_udp.c,
- * Server side for UDP/IP based RPC. (Does some caching in the hopes of
- * achieving execute-at-most-once semantics.)
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <errno.h>
-
-#define rpc_buffer(xprt) ((xprt)->xp_p1)
-#define MAX(a, b) ((a > b) ? a : b)
-
-static bool_t svcudp_recv();
-static bool_t svcudp_reply();
-static enum xprt_stat svcudp_stat();
-static bool_t svcudp_getargs();
-static bool_t svcudp_freeargs();
-static void svcudp_destroy();
-static void cache_set __P((SVCXPRT *, u_long));
-static int cache_get __P((SVCXPRT *, struct rpc_msg *, char **, u_long *));
-
-static struct xp_ops svcudp_op = {
- svcudp_recv,
- svcudp_stat,
- svcudp_getargs,
- svcudp_reply,
- svcudp_freeargs,
- svcudp_destroy
-};
-
-/*
- * kept in xprt->xp_p2
- */
-struct svcudp_data {
- u_int su_iosz; /* byte size of send.recv buffer */
- u_long su_xid; /* transaction id */
- XDR su_xdrs; /* XDR handle */
- char su_verfbody[MAX_AUTH_BYTES]; /* verifier body */
- char * su_cache; /* cached data, NULL if no cache */
-};
-#define su_data(xprt) ((struct svcudp_data *)(xprt->xp_p2))
-
-/*
- * Usage:
- * xprt = svcudp_create(sock);
- *
- * If sock<0 then a socket is created, else sock is used.
- * If the socket, sock is not bound to a port then svcudp_create
- * binds it to an arbitrary port. In any (successful) case,
- * xprt->xp_sock is the registered socket number and xprt->xp_port is the
- * associated port number.
- * Once *xprt is initialized, it is registered as a transporter;
- * see (svc.h, xprt_register).
- * The routines returns NULL if a problem occurred.
- */
-SVCXPRT *
-svcudp_bufcreate(sock, sendsz, recvsz)
- register int sock;
- u_int sendsz, recvsz;
-{
- bool_t madesock = FALSE;
- register SVCXPRT *xprt;
- register struct svcudp_data *su;
- struct sockaddr_in addr;
- int len = sizeof(struct sockaddr_in);
-
- if (sock == RPC_ANYSOCK) {
- if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
- perror("svcudp_create: socket creation problem");
- return ((SVCXPRT *)NULL);
- }
- madesock = TRUE;
- }
- memset((char *)&addr, 0, sizeof (addr));
- addr.sin_len = sizeof(struct sockaddr_in);
- addr.sin_family = AF_INET;
- if (bindresvport(sock, &addr)) {
- addr.sin_port = 0;
- (void)bind(sock, (struct sockaddr *)&addr, len);
- }
- if (getsockname(sock, (struct sockaddr *)&addr, &len) != 0) {
- perror("svcudp_create - cannot getsockname");
- if (madesock)
- (void)close(sock);
- return ((SVCXPRT *)NULL);
- }
- xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
- if (xprt == NULL) {
- (void)fprintf(stderr, "svcudp_create: out of memory\n");
- return (NULL);
- }
- su = (struct svcudp_data *)mem_alloc(sizeof(*su));
- if (su == NULL) {
- (void)fprintf(stderr, "svcudp_create: out of memory\n");
- return (NULL);
- }
- su->su_iosz = ((MAX(sendsz, recvsz) + 3) / 4) * 4;
- if ((rpc_buffer(xprt) = mem_alloc(su->su_iosz)) == NULL) {
- (void)fprintf(stderr, "svcudp_create: out of memory\n");
- return (NULL);
- }
- xdrmem_create(
- &(su->su_xdrs), rpc_buffer(xprt), su->su_iosz, XDR_DECODE);
- su->su_cache = NULL;
- xprt->xp_p2 = (caddr_t)su;
- xprt->xp_verf.oa_base = su->su_verfbody;
- xprt->xp_ops = &svcudp_op;
- xprt->xp_port = ntohs(addr.sin_port);
- xprt->xp_sock = sock;
- xprt_register(xprt);
- return (xprt);
-}
-
-SVCXPRT *
-svcudp_create(sock)
- int sock;
-{
-
- return(svcudp_bufcreate(sock, UDPMSGSIZE, UDPMSGSIZE));
-}
-
-static enum xprt_stat
-svcudp_stat(xprt)
- SVCXPRT *xprt;
-{
-
- return (XPRT_IDLE);
-}
-
-static bool_t
-svcudp_recv(xprt, msg)
- register SVCXPRT *xprt;
- struct rpc_msg *msg;
-{
- register struct svcudp_data *su = su_data(xprt);
- register XDR *xdrs = &(su->su_xdrs);
- register int rlen;
- char *reply;
- u_long replylen;
-
- again:
- xprt->xp_addrlen = sizeof(struct sockaddr_in);
- rlen = recvfrom(xprt->xp_sock, rpc_buffer(xprt), (int) su->su_iosz,
- 0, (struct sockaddr *)&(xprt->xp_raddr), &(xprt->xp_addrlen));
- if (rlen == -1 && errno == EINTR)
- goto again;
- if (rlen == -1 || rlen < 4*sizeof(u_int32_t))
- return (FALSE);
- xdrs->x_op = XDR_DECODE;
- XDR_SETPOS(xdrs, 0);
- if (! xdr_callmsg(xdrs, msg))
- return (FALSE);
- su->su_xid = msg->rm_xid;
- if (su->su_cache != NULL) {
- if (cache_get(xprt, msg, &reply, &replylen)) {
- (void) sendto(xprt->xp_sock, reply, (int) replylen, 0,
- (struct sockaddr *) &xprt->xp_raddr, xprt->xp_addrlen);
- return (TRUE);
- }
- }
- return (TRUE);
-}
-
-static bool_t
-svcudp_reply(xprt, msg)
- register SVCXPRT *xprt;
- struct rpc_msg *msg;
-{
- register struct svcudp_data *su = su_data(xprt);
- register XDR *xdrs = &(su->su_xdrs);
- register int slen;
- register bool_t stat = FALSE;
-
- xdrs->x_op = XDR_ENCODE;
- XDR_SETPOS(xdrs, 0);
- msg->rm_xid = su->su_xid;
- if (xdr_replymsg(xdrs, msg)) {
- slen = (int)XDR_GETPOS(xdrs);
- if (sendto(xprt->xp_sock, rpc_buffer(xprt), slen, 0,
- (struct sockaddr *)&(xprt->xp_raddr), xprt->xp_addrlen)
- == slen) {
- stat = TRUE;
- if (su->su_cache && slen >= 0) {
- cache_set(xprt, (u_long) slen);
- }
- }
- }
- return (stat);
-}
-
-static bool_t
-svcudp_getargs(xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
-{
-
- return ((*xdr_args)(&(su_data(xprt)->su_xdrs), args_ptr));
-}
-
-static bool_t
-svcudp_freeargs(xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
-{
- register XDR *xdrs = &(su_data(xprt)->su_xdrs);
-
- xdrs->x_op = XDR_FREE;
- return ((*xdr_args)(xdrs, args_ptr));
-}
-
-static void
-svcudp_destroy(xprt)
- register SVCXPRT *xprt;
-{
- register struct svcudp_data *su = su_data(xprt);
-
- xprt_unregister(xprt);
- (void)close(xprt->xp_sock);
- XDR_DESTROY(&(su->su_xdrs));
- mem_free(rpc_buffer(xprt), su->su_iosz);
- mem_free((caddr_t)su, sizeof(struct svcudp_data));
- mem_free((caddr_t)xprt, sizeof(SVCXPRT));
-}
-
-
-/***********this could be a separate file*********************/
-
-/*
- * Fifo cache for udp server
- * Copies pointers to reply buffers into fifo cache
- * Buffers are sent again if retransmissions are detected.
- */
-
-#define SPARSENESS 4 /* 75% sparse */
-
-#define CACHE_PERROR(msg) \
- (void) fprintf(stderr,"%s\n", msg)
-
-#define ALLOC(type, size) \
- (type *) mem_alloc((unsigned) (sizeof(type) * (size)))
-
-#define BZERO(addr, type, size) \
- memset((char *) addr, 0, sizeof(type) * (int) (size))
-
-/*
- * An entry in the cache
- */
-typedef struct cache_node *cache_ptr;
-struct cache_node {
- /*
- * Index into cache is xid, proc, vers, prog and address
- */
- u_long cache_xid;
- u_long cache_proc;
- u_long cache_vers;
- u_long cache_prog;
- struct sockaddr_in cache_addr;
- /*
- * The cached reply and length
- */
- char * cache_reply;
- u_long cache_replylen;
- /*
- * Next node on the list, if there is a collision
- */
- cache_ptr cache_next;
-};
-
-
-
-/*
- * The entire cache
- */
-struct udp_cache {
- u_long uc_size; /* size of cache */
- cache_ptr *uc_entries; /* hash table of entries in cache */
- cache_ptr *uc_fifo; /* fifo list of entries in cache */
- u_long uc_nextvictim; /* points to next victim in fifo list */
- u_long uc_prog; /* saved program number */
- u_long uc_vers; /* saved version number */
- u_long uc_proc; /* saved procedure number */
- struct sockaddr_in uc_addr; /* saved caller's address */
-};
-
-
-/*
- * the hashing function
- */
-#define CACHE_LOC(transp, xid) \
- (xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size))
-
-
-/*
- * Enable use of the cache.
- * Note: there is no disable.
- */
-int svcudp_enablecache(transp, size)
- SVCXPRT *transp;
- u_long size;
-{
- struct svcudp_data *su = su_data(transp);
- struct udp_cache *uc;
-
- if (su->su_cache != NULL) {
- CACHE_PERROR("enablecache: cache already enabled");
- return(0);
- }
- uc = ALLOC(struct udp_cache, 1);
- if (uc == NULL) {
- CACHE_PERROR("enablecache: could not allocate cache");
- return(0);
- }
- uc->uc_size = size;
- uc->uc_nextvictim = 0;
- uc->uc_entries = ALLOC(cache_ptr, size * SPARSENESS);
- if (uc->uc_entries == NULL) {
- CACHE_PERROR("enablecache: could not allocate cache data");
- return(0);
- }
- BZERO(uc->uc_entries, cache_ptr, size * SPARSENESS);
- uc->uc_fifo = ALLOC(cache_ptr, size);
- if (uc->uc_fifo == NULL) {
- CACHE_PERROR("enablecache: could not allocate cache fifo");
- return(0);
- }
- BZERO(uc->uc_fifo, cache_ptr, size);
- su->su_cache = (char *) uc;
- return(1);
-}
-
-
-/*
- * Set an entry in the cache
- */
-static void
-cache_set(xprt, replylen)
- SVCXPRT *xprt;
- u_long replylen;
-{
- register cache_ptr victim;
- register cache_ptr *vicp;
- register struct svcudp_data *su = su_data(xprt);
- struct udp_cache *uc = (struct udp_cache *) su->su_cache;
- u_int loc;
- char *newbuf;
-
- /*
- * Find space for the new entry, either by
- * reusing an old entry, or by mallocing a new one
- */
- victim = uc->uc_fifo[uc->uc_nextvictim];
- if (victim != NULL) {
- loc = CACHE_LOC(xprt, victim->cache_xid);
- for (vicp = &uc->uc_entries[loc];
- *vicp != NULL && *vicp != victim;
- vicp = &(*vicp)->cache_next)
- ;
- if (*vicp == NULL) {
- CACHE_PERROR("cache_set: victim not found");
- return;
- }
- *vicp = victim->cache_next; /* remote from cache */
- newbuf = victim->cache_reply;
- } else {
- victim = ALLOC(struct cache_node, 1);
- if (victim == NULL) {
- CACHE_PERROR("cache_set: victim alloc failed");
- return;
- }
- newbuf = mem_alloc(su->su_iosz);
- if (newbuf == NULL) {
- CACHE_PERROR("cache_set: could not allocate new rpc_buffer");
- return;
- }
- }
-
- /*
- * Store it away
- */
- victim->cache_replylen = replylen;
- victim->cache_reply = rpc_buffer(xprt);
- rpc_buffer(xprt) = newbuf;
- xdrmem_create(&(su->su_xdrs), rpc_buffer(xprt), su->su_iosz, XDR_ENCODE);
- victim->cache_xid = su->su_xid;
- victim->cache_proc = uc->uc_proc;
- victim->cache_vers = uc->uc_vers;
- victim->cache_prog = uc->uc_prog;
- victim->cache_addr = uc->uc_addr;
- loc = CACHE_LOC(xprt, victim->cache_xid);
- victim->cache_next = uc->uc_entries[loc];
- uc->uc_entries[loc] = victim;
- uc->uc_fifo[uc->uc_nextvictim++] = victim;
- uc->uc_nextvictim %= uc->uc_size;
-}
-
-/*
- * Try to get an entry from the cache
- * return 1 if found, 0 if not found
- */
-static int
-cache_get(xprt, msg, replyp, replylenp)
- SVCXPRT *xprt;
- struct rpc_msg *msg;
- char **replyp;
- u_long *replylenp;
-{
- u_int loc;
- register cache_ptr ent;
- register struct svcudp_data *su = su_data(xprt);
- register struct udp_cache *uc = (struct udp_cache *) su->su_cache;
-
-# define EQADDR(a1, a2) (memcmp(&a1, &a2, sizeof(a1)) == 0)
-
- loc = CACHE_LOC(xprt, su->su_xid);
- for (ent = uc->uc_entries[loc]; ent != NULL; ent = ent->cache_next) {
- if (ent->cache_xid == su->su_xid &&
- ent->cache_proc == uc->uc_proc &&
- ent->cache_vers == uc->uc_vers &&
- ent->cache_prog == uc->uc_prog &&
- EQADDR(ent->cache_addr, uc->uc_addr)) {
- *replyp = ent->cache_reply;
- *replylenp = ent->cache_replylen;
- return(1);
- }
- }
- /*
- * Failed to find entry
- * Remember a few things so we can do a set later
- */
- uc->uc_proc = msg->rm_call.cb_proc;
- uc->uc_vers = msg->rm_call.cb_vers;
- uc->uc_prog = msg->rm_call.cb_prog;
- uc->uc_addr = xprt->xp_raddr;
- return(0);
-}
-
diff --git a/lib/libc/rpc/svc_unix.c b/lib/libc/rpc/svc_unix.c
deleted file mode 100644
index 04e3223..0000000
--- a/lib/libc/rpc/svc_unix.c
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)svc_unix.c 1.21 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)svc_unix.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: svc_unix.c,v 1.8 1996/12/30 15:19:08 peter Exp $";
-#endif
-
-/*
- * svc_unix.c, Server side for TCP/IP based RPC.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * Actually implements two flavors of transporter -
- * a unix rendezvouser (a listner and connection establisher)
- * and a record/unix stream.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <rpc/rpc.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/uio.h>
-#include <errno.h>
-
-/*
- * Ops vector for AF_UNIX based rpc service handle
- */
-static bool_t svcunix_recv();
-static enum xprt_stat svcunix_stat();
-static bool_t svcunix_getargs();
-static bool_t svcunix_reply();
-static bool_t svcunix_freeargs();
-static void svcunix_destroy();
-
-static struct xp_ops svcunix_op = {
- svcunix_recv,
- svcunix_stat,
- svcunix_getargs,
- svcunix_reply,
- svcunix_freeargs,
- svcunix_destroy
-};
-
-/*
- * Ops vector for TCP/IP rendezvous handler
- */
-static bool_t rendezvous_request();
-static enum xprt_stat rendezvous_stat();
-
-static struct xp_ops svcunix_rendezvous_op = {
- rendezvous_request,
- rendezvous_stat,
- (bool_t (*)())abort,
- (bool_t (*)())abort,
- (bool_t (*)())abort,
- svcunix_destroy
-};
-
-static int readunix(), writeunix();
-static SVCXPRT *makefd_xprt();
-
-struct unix_rendezvous { /* kept in xprt->xp_p1 */
- u_int sendsize;
- u_int recvsize;
-};
-
-struct unix_conn { /* kept in xprt->xp_p1 */
- enum xprt_stat strm_stat;
- u_long x_id;
- XDR xdrs;
- char verf_body[MAX_AUTH_BYTES];
-};
-
-
-struct cmessage {
- struct cmsghdr cmsg;
- struct cmsgcred cmcred;
-};
-
-static struct cmessage cm;
-
-static int __msgread(sock, buf, cnt)
- int sock;
- void *buf;
- size_t cnt;
-{
- struct iovec iov[1];
- struct msghdr msg;
-
- bzero((char *)&cm, sizeof(cm));
- iov[0].iov_base = buf;
- iov[0].iov_len = cnt;
-
- msg.msg_iov = iov;
- msg.msg_iovlen = 1;
- msg.msg_name = NULL;
- msg.msg_namelen = 0;
- msg.msg_control = (caddr_t)&cm;
- msg.msg_controllen = sizeof(struct cmessage);
- msg.msg_flags = 0;
-
- return(recvmsg(sock, &msg, 0));
-}
-
-static int __msgwrite(sock, buf, cnt)
- int sock;
- void *buf;
- size_t cnt;
-{
- struct iovec iov[1];
- struct msghdr msg;
-
- bzero((char *)&cm, sizeof(cm));
- iov[0].iov_base = buf;
- iov[0].iov_len = cnt;
-
- cm.cmsg.cmsg_type = SCM_CREDS;
- cm.cmsg.cmsg_level = SOL_SOCKET;
- cm.cmsg.cmsg_len = sizeof(struct cmessage);
-
- msg.msg_iov = iov;
- msg.msg_iovlen = 1;
- msg.msg_name = NULL;
- msg.msg_namelen = 0;
- msg.msg_control = (caddr_t)&cm;
- msg.msg_controllen = sizeof(struct cmessage);
- msg.msg_flags = 0;
-
- return(sendmsg(sock, &msg, 0));
-}
-
-/*
- * Usage:
- * xprt = svcunix_create(sock, send_buf_size, recv_buf_size);
- *
- * Creates, registers, and returns a (rpc) unix based transporter.
- * Once *xprt is initialized, it is registered as a transporter
- * see (svc.h, xprt_register). This routine returns
- * a NULL if a problem occurred.
- *
- * If sock<0 then a socket is created, else sock is used.
- * If the socket, sock is not bound to a port then svcunix_create
- * binds it to an arbitrary port. The routine then starts a unix
- * listener on the socket's associated port. In any (successful) case,
- * xprt->xp_sock is the registered socket number and xprt->xp_port is the
- * associated port number.
- *
- * Since unix streams do buffered io similar to stdio, the caller can specify
- * how big the send and receive buffers are via the second and third parms;
- * 0 => use the system default.
- */
-SVCXPRT *
-svcunix_create(sock, sendsize, recvsize, path)
- register int sock;
- u_int sendsize;
- u_int recvsize;
- char *path;
-{
- bool_t madesock = FALSE;
- register SVCXPRT *xprt;
- register struct unix_rendezvous *r;
- struct sockaddr_un addr;
- int len = sizeof(struct sockaddr_un);
-
- if (sock == RPC_ANYSOCK) {
- if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
- perror("svc_unix.c - AF_UNIX socket creation problem");
- return ((SVCXPRT *)NULL);
- }
- madesock = TRUE;
- }
- memset(&addr, 0, sizeof (addr));
- addr.sun_family = AF_UNIX;
- strcpy(addr.sun_path, path);
- len = strlen(addr.sun_path) + sizeof(addr.sun_family) +
- sizeof(addr.sun_len) + 1;
- addr.sun_len = len;
-
- bind(sock, (struct sockaddr *)&addr, len);
-
- if ((getsockname(sock, (struct sockaddr *)&addr, &len) != 0) ||
- (listen(sock, 2) != 0)) {
- perror("svc_unix.c - cannot getsockname or listen");
- if (madesock)
- (void)close(sock);
- return ((SVCXPRT *)NULL);
- }
- r = (struct unix_rendezvous *)mem_alloc(sizeof(*r));
- if (r == NULL) {
- (void) fprintf(stderr, "svcunix_create: out of memory\n");
- return (NULL);
- }
- r->sendsize = sendsize;
- r->recvsize = recvsize;
- xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
- if (xprt == NULL) {
- (void) fprintf(stderr, "svcunix_create: out of memory\n");
- return (NULL);
- }
- xprt->xp_p2 = NULL;
- xprt->xp_p1 = (caddr_t)r;
- xprt->xp_verf = _null_auth;
- xprt->xp_ops = &svcunix_rendezvous_op;
- xprt->xp_port = -1 /*ntohs(addr.sin_port)*/;
- xprt->xp_sock = sock;
- xprt_register(xprt);
- return (xprt);
-}
-
-/*
- * Like svunix_create(), except the routine takes any *open* UNIX file
- * descriptor as its first input.
- */
-SVCXPRT *
-svcunixfd_create(fd, sendsize, recvsize)
- int fd;
- u_int sendsize;
- u_int recvsize;
-{
-
- return (makefd_xprt(fd, sendsize, recvsize));
-}
-
-static SVCXPRT *
-makefd_xprt(fd, sendsize, recvsize)
- int fd;
- u_int sendsize;
- u_int recvsize;
-{
- register SVCXPRT *xprt;
- register struct unix_conn *cd;
-
- xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT));
- if (xprt == (SVCXPRT *)NULL) {
- (void) fprintf(stderr, "svc_unix: makefd_xprt: out of memory\n");
- goto done;
- }
- cd = (struct unix_conn *)mem_alloc(sizeof(struct unix_conn));
- if (cd == (struct unix_conn *)NULL) {
- (void) fprintf(stderr, "svc_unix: makefd_xprt: out of memory\n");
- mem_free((char *) xprt, sizeof(SVCXPRT));
- xprt = (SVCXPRT *)NULL;
- goto done;
- }
- cd->strm_stat = XPRT_IDLE;
- xdrrec_create(&(cd->xdrs), sendsize, recvsize,
- (caddr_t)xprt, readunix, writeunix);
- xprt->xp_p2 = NULL;
- xprt->xp_p1 = (caddr_t)cd;
- xprt->xp_verf.oa_base = cd->verf_body;
- xprt->xp_addrlen = 0;
- xprt->xp_ops = &svcunix_op; /* truely deals with calls */
- xprt->xp_port = 0; /* this is a connection, not a rendezvouser */
- xprt->xp_sock = fd;
- xprt_register(xprt);
- done:
- return (xprt);
-}
-
-static bool_t
-rendezvous_request(xprt)
- register SVCXPRT *xprt;
-{
- int sock;
- struct unix_rendezvous *r;
- struct sockaddr_un addr;
- struct sockaddr_in in_addr;
- int len;
-
- r = (struct unix_rendezvous *)xprt->xp_p1;
- again:
- len = sizeof(struct sockaddr_in);
- if ((sock = accept(xprt->xp_sock, (struct sockaddr *)&addr,
- &len)) < 0) {
- if (errno == EINTR)
- goto again;
- return (FALSE);
- }
-
- /*
- * make a new transporter (re-uses xprt)
- */
- bzero((char *)&in_addr, sizeof(in_addr));
- in_addr.sin_family = AF_UNIX;
- xprt = makefd_xprt(sock, r->sendsize, r->recvsize);
- xprt->xp_raddr = in_addr;
- xprt->xp_addrlen = len;
- return (FALSE); /* there is never an rpc msg to be processed */
-}
-
-static enum xprt_stat
-rendezvous_stat()
-{
-
- return (XPRT_IDLE);
-}
-
-static void
-svcunix_destroy(xprt)
- register SVCXPRT *xprt;
-{
- register struct unix_conn *cd = (struct unix_conn *)xprt->xp_p1;
-
- xprt_unregister(xprt);
- (void)close(xprt->xp_sock);
- if (xprt->xp_port != 0) {
- /* a rendezvouser socket */
- xprt->xp_port = 0;
- } else {
- /* an actual connection socket */
- XDR_DESTROY(&(cd->xdrs));
- }
- mem_free((caddr_t)cd, sizeof(struct unix_conn));
- mem_free((caddr_t)xprt, sizeof(SVCXPRT));
-}
-
-/*
- * All read operations timeout after 35 seconds.
- * A timeout is fatal for the connection.
- */
-static struct timeval wait_per_try = { 35, 0 };
-
-/*
- * reads data from the unix conection.
- * any error is fatal and the connection is closed.
- * (And a read of zero bytes is a half closed stream => error.)
- */
-static int
-readunix(xprt, buf, len)
- register SVCXPRT *xprt;
- caddr_t buf;
- register int len;
-{
- register int sock = xprt->xp_sock;
- struct timeval start, delta, tv;
- struct timeval tmp1, tmp2;
- fd_set *fds, readfds;
-
- if (sock + 1 > FD_SETSIZE) {
- int bytes = howmany(sock+1, NFDBITS) * sizeof(fd_mask);
- fds = (fd_set *)malloc(bytes);
-
- if (fds == NULL)
- goto fatal_err;
- memset(fds, 0, bytes);
- } else {
- fds = &readfds;
- FD_ZERO(fds);
- }
-
- delta = wait_per_try;
- gettimeofday(&start, NULL);
- do {
- /* XXX we know the other bits are still clear */
- FD_SET(sock, fds);
- tv = delta; /* in case select() implements writeback */
- switch (select(sock + 1, fds, NULL, NULL, &tv)) {
- case -1:
- if (errno != EINTR)
- goto fatal_err;
- gettimeofday(&tmp1, NULL);
- timersub(&tmp1, &start, &tmp2);
- timersub(&delta, &tmp2, &tmp1);
- if (tmp1.tv_sec < 0 || !timerisset(&tmp1))
- goto fatal_err;
- delta = tmp1;
- continue;
- case 0:
- goto fatal_err;
- }
- } while (!FD_ISSET(sock, fds));
- if ((len = __msgread(sock, buf, len)) > 0) {
- if (fds != &readfds)
- free(fds);
- return (len);
- }
-fatal_err:
- ((struct unix_conn *)(xprt->xp_p1))->strm_stat = XPRT_DIED;
- if (fds != &readfds)
- free(fds);
- return (-1);
-}
-
-/*
- * writes data to the unix connection.
- * Any error is fatal and the connection is closed.
- */
-static int
-writeunix(xprt, buf, len)
- register SVCXPRT *xprt;
- caddr_t buf;
- int len;
-{
- register int i, cnt;
-
- for (cnt = len; cnt > 0; cnt -= i, buf += i) {
- if ((i = __msgwrite(xprt->xp_sock, buf, cnt)) < 0) {
- ((struct unix_conn *)(xprt->xp_p1))->strm_stat =
- XPRT_DIED;
- return (-1);
- }
- }
- return (len);
-}
-
-static enum xprt_stat
-svcunix_stat(xprt)
- SVCXPRT *xprt;
-{
- register struct unix_conn *cd =
- (struct unix_conn *)(xprt->xp_p1);
-
- if (cd->strm_stat == XPRT_DIED)
- return (XPRT_DIED);
- if (! xdrrec_eof(&(cd->xdrs)))
- return (XPRT_MOREREQS);
- return (XPRT_IDLE);
-}
-
-static bool_t
-svcunix_recv(xprt, msg)
- SVCXPRT *xprt;
- register struct rpc_msg *msg;
-{
- register struct unix_conn *cd =
- (struct unix_conn *)(xprt->xp_p1);
- register XDR *xdrs = &(cd->xdrs);
-
- xdrs->x_op = XDR_DECODE;
- (void)xdrrec_skiprecord(xdrs);
- if (xdr_callmsg(xdrs, msg)) {
- cd->x_id = msg->rm_xid;
- /* set up verifiers */
- msg->rm_call.cb_verf.oa_flavor = AUTH_UNIX;
- msg->rm_call.cb_verf.oa_base = (caddr_t)&cm;
- msg->rm_call.cb_verf.oa_length = sizeof(cm);
- return (TRUE);
- }
- return (FALSE);
-}
-
-static bool_t
-svcunix_getargs(xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
-{
-
- return ((*xdr_args)(&(((struct unix_conn *)(xprt->xp_p1))->xdrs), args_ptr));
-}
-
-static bool_t
-svcunix_freeargs(xprt, xdr_args, args_ptr)
- SVCXPRT *xprt;
- xdrproc_t xdr_args;
- caddr_t args_ptr;
-{
- register XDR *xdrs =
- &(((struct unix_conn *)(xprt->xp_p1))->xdrs);
-
- xdrs->x_op = XDR_FREE;
- return ((*xdr_args)(xdrs, args_ptr));
-}
-
-static bool_t
-svcunix_reply(xprt, msg)
- SVCXPRT *xprt;
- register struct rpc_msg *msg;
-{
- register struct unix_conn *cd =
- (struct unix_conn *)(xprt->xp_p1);
- register XDR *xdrs = &(cd->xdrs);
- register bool_t stat;
-
- xdrs->x_op = XDR_ENCODE;
- msg->rm_xid = cd->x_id;
- stat = xdr_replymsg(xdrs, msg);
- (void)xdrrec_endofrecord(xdrs, TRUE);
- return (stat);
-}
diff --git a/lib/libc/stdio/Makefile.inc b/lib/libc/stdio/Makefile.inc
deleted file mode 100644
index 97b403a..0000000
--- a/lib/libc/stdio/Makefile.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-# @(#)Makefile.inc 8.3 (Berkeley) 4/17/94
-# $Id: Makefile.inc,v 1.10 1997/10/15 16:16:07 bde Exp $
-
-# stdio sources
-.PATH: ${.CURDIR}/../libc/stdio
-
-SRCS+= asprintf.c clrerr.c fclose.c fdopen.c feof.c ferror.c fflush.c \
- fgetc.c fgetln.c fgetpos.c fgets.c fileno.c findfp.c flags.c fopen.c \
- fprintf.c fpurge.c fputc.c fputs.c fread.c freopen.c fscanf.c \
- fseek.c fsetpos.c ftell.c funopen.c fvwrite.c fwalk.c fwrite.c \
- getc.c getchar.c gets.c getw.c makebuf.c mktemp.c perror.c \
- printf.c putc.c putchar.c puts.c putw.c refill.c remove.c rewind.c \
- rget.c scanf.c setbuf.c setbuffer.c setvbuf.c snprintf.c sprintf.c \
- sscanf.c stdio.c tempnam.c tmpfile.c tmpnam.c ungetc.c vasprintf.c \
- vfprintf.c vfscanf.c vprintf.c vscanf.c vsnprintf.c vsprintf.c \
- vsscanf.c wbuf.c wsetup.c
-
-.if ${LIB} == "c"
-MAN3+= fclose.3 ferror.3 fflush.3 fgetln.3 fgets.3 fopen.3 fputs.3 \
- fread.3 fseek.3 funopen.3 getc.3 mktemp.3 printf.3 putc.3 remove.3 \
- scanf.3 setbuf.3 stdio.3 tmpnam.3 ungetc.3
-
-MLINKS+=ferror.3 clearerr.3 ferror.3 feof.3 ferror.3 fileno.3
-MLINKS+=fflush.3 fpurge.3
-MLINKS+=fgets.3 gets.3
-MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3
-MLINKS+=fputs.3 puts.3
-MLINKS+=fread.3 fwrite.3
-MLINKS+=fseek.3 fgetpos.3 fseek.3 fsetpos.3 fseek.3 ftell.3 fseek.3 rewind.3
-MLINKS+=funopen.3 fropen.3 funopen.3 fwopen.3
-MLINKS+=getc.3 fgetc.3 getc.3 getchar.3 getc.3 getw.3
-MLINKS+=mktemp.3 mkstemp.3
-MLINKS+=printf.3 asprintf.3 printf.3 fprintf.3 \
- printf.3 snprintf.3 printf.3 sprintf.3 \
- printf.3 vasprintf.3 \
- printf.3 vfprintf.3 printf.3 vprintf.3 printf.3 vsnprintf.3 \
- printf.3 vsprintf.3
-MLINKS+=putc.3 fputc.3 putc.3 putchar.3 putc.3 putw.3
-MLINKS+=scanf.3 fscanf.3 scanf.3 sscanf.3 scanf.3 vfscanf.3 scanf.3 vscanf.3 \
- scanf.3 vsscanf.3
-MLINKS+=setbuf.3 setbuffer.3 setbuf.3 setlinebuf.3 setbuf.3 setvbuf.3
-MLINKS+=tmpnam.3 tempnam.3 tmpnam.3 tmpfile.3
-.endif
diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c
deleted file mode 100644
index 9b4d05b..0000000
--- a/lib/libc/stdio/asprintf.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1996 Peter Wemm <peter@freebsd.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static char rcsid[] = "$Id$";
-#endif /* LIBC_RCS and not lint */
-
-#include <stdio.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#if __STDC__
-int
-asprintf(char **str, char const *fmt, ...)
-#else
-int
-asprintf(str, fmt, va_alist)
- char **str;
- char *fmt;
- va_dcl
-#endif
-{
- int ret;
- va_list ap;
-
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vasprintf(str, fmt, ap);
- va_end(ap);
- return (ret);
-}
diff --git a/lib/libc/stdio/clrerr.c b/lib/libc/stdio/clrerr.c
deleted file mode 100644
index a230119..0000000
--- a/lib/libc/stdio/clrerr.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)clrerr.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#undef clearerr
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-void
-clearerr(fp)
- FILE *fp;
-{
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- __sclearerr(fp);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
-}
diff --git a/lib/libc/stdio/fclose.3 b/lib/libc/stdio/fclose.3
deleted file mode 100644
index 77f3316..0000000
--- a/lib/libc/stdio/fclose.3
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fclose.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FCLOSE 3
-.Os
-.Sh NAME
-.Nm fclose
-.Nd close a stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn fclose "FILE *stream"
-.Sh DESCRIPTION
-The
-.Fn fclose
-function
-dissociates the named
-.Fa stream
-from its underlying file or set of functions.
-If the stream was being used for output, any buffered data is written
-first, using
-.Xr fflush 3 .
-.Sh RETURN VALUES
-Upon successful completion 0 is returned.
-Otherwise,
-.Dv EOF
-is returned and the global variable
-.Va errno
-is set to indicate the error.
-In either case no further access to the stream is possible.
-.Sh ERRORS
-.Bl -tag -width [EBADF]
-.It Bq Er EBADF
-The argument
-.Fa stream
-is not an open stream.
-.El
-.Pp
-The
-.Fn fclose
-function
-may also fail and set
-.Va errno
-for any of the errors specified for the routines
-.Xr close 2
-or
-.Xr fflush 3 .
-.Sh SEE ALSO
-.Xr close 2 ,
-.Xr fflush 3 ,
-.Xr fopen 3 ,
-.Xr setbuf 3
-.Sh STANDARDS
-The
-.Fn fclose
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/stdio/fclose.c b/lib/libc/stdio/fclose.c
deleted file mode 100644
index 1104bd0..0000000
--- a/lib/libc/stdio/fclose.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fclose.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "local.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-int
-fclose(fp)
- register FILE *fp;
-{
- register int r;
-
- if (fp->_flags == 0) { /* not open! */
- errno = EBADF;
- return (EOF);
- }
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- r = fp->_flags & __SWR ? __sflush(fp) : 0;
- if (fp->_close != NULL && (*fp->_close)(fp->_cookie) < 0)
- r = EOF;
- if (fp->_flags & __SMBF)
- free((char *)fp->_bf._base);
- if (HASUB(fp))
- FREEUB(fp);
- if (HASLB(fp))
- FREELB(fp);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- fp->_flags = 0; /* Release this FILE for reuse. */
- fp->_file = -1;
- fp->_r = fp->_w = 0; /* Mess up if reaccessed. */
- return (r);
-}
diff --git a/lib/libc/stdio/fdopen.c b/lib/libc/stdio/fdopen.c
deleted file mode 100644
index 48ea401..0000000
--- a/lib/libc/stdio/fdopen.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fdopen.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include "local.h"
-
-FILE *
-fdopen(fd, mode)
- int fd;
- const char *mode;
-{
- register FILE *fp;
- static int nofile;
- int flags, oflags, fdflags, tmp;
-
- if (nofile == 0)
- nofile = getdtablesize();
-
- if ((flags = __sflags(mode, &oflags)) == 0)
- return (NULL);
-
- /* Make sure the mode the user wants is a subset of the actual mode. */
- if ((fdflags = fcntl(fd, F_GETFL, 0)) < 0)
- return (NULL);
- tmp = fdflags & O_ACCMODE;
- if (tmp != O_RDWR && (tmp != (oflags & O_ACCMODE))) {
- errno = EINVAL;
- return (NULL);
- }
-
- if ((fp = __sfp()) == NULL)
- return (NULL);
- fp->_flags = flags;
- /*
- * If opened for appending, but underlying descriptor does not have
- * O_APPEND bit set, assert __SAPP so that __swrite() will lseek to
- * end before each write.
- */
- if ((oflags & O_APPEND) && !(fdflags & O_APPEND))
- fp->_flags |= __SAPP;
- fp->_file = fd;
- fp->_cookie = fp;
- fp->_read = __sread;
- fp->_write = __swrite;
- fp->_seek = __sseek;
- fp->_close = __sclose;
- return (fp);
-}
diff --git a/lib/libc/stdio/feof.c b/lib/libc/stdio/feof.c
deleted file mode 100644
index e42df61..0000000
--- a/lib/libc/stdio/feof.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)feof.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-
-/*
- * A subroutine version of the macro feof.
- */
-#undef feof
-
-int
-feof(fp)
- FILE *fp;
-{
- return (__sfeof(fp));
-}
diff --git a/lib/libc/stdio/ferror.3 b/lib/libc/stdio/ferror.3
deleted file mode 100644
index 411999d..0000000
--- a/lib/libc/stdio/ferror.3
+++ /dev/null
@@ -1,100 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ferror.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt FERROR 3
-.Os
-.Sh NAME
-.Nm clearerr ,
-.Nm feof ,
-.Nm ferror ,
-.Nm fileno
-.Nd check and reset stream status
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft void
-.Fn clearerr "FILE *stream"
-.Ft int
-.Fn feof "FILE *stream"
-.Ft int
-.Fn ferror "FILE *stream"
-.Ft int
-.Fn fileno "FILE *stream"
-.Sh DESCRIPTION
-The function
-.Fn clearerr
-clears the end-of-file and error indicators for the stream pointed
-to by
-.Fa stream .
-.Pp
-The function
-.Fn feof
-tests the end-of-file indicator for the stream pointed to by
-.Fa stream ,
-returning non-zero if it is set.
-The end-of-file indicator can only be cleared by the function
-.Fn clearerr .
-.Pp
-The function
-.Fn ferror
-tests the error indicator for the stream pointed to by
-.Fa stream ,
-returning non-zero if it is set.
-The error indicator can only be reset by the
-.Fn clearerr
-function.
-.Pp
-The function
-.Fn fileno
-examines the argument
-.Fa stream
-and returns its integer descriptor.
-.Sh ERRORS
-These functions should not fail and do not set the external
-variable
-.Va errno .
-.Sh SEE ALSO
-.Xr open 2 ,
-.Xr stdio 3
-.Sh STANDARDS
-The functions
-.Fn clearerr ,
-.Fn feof ,
-and
-.Fn ferror
-conform to
-.St -ansiC .
diff --git a/lib/libc/stdio/ferror.c b/lib/libc/stdio/ferror.c
deleted file mode 100644
index 8a68500..0000000
--- a/lib/libc/stdio/ferror.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)ferror.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-
-/*
- * A subroutine version of the macro ferror.
- */
-#undef ferror
-
-int
-ferror(fp)
- FILE *fp;
-{
- return (__sferror(fp));
-}
diff --git a/lib/libc/stdio/fflush.3 b/lib/libc/stdio/fflush.3
deleted file mode 100644
index abc8c67..0000000
--- a/lib/libc/stdio/fflush.3
+++ /dev/null
@@ -1,110 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fflush.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FFLUSH 3
-.Os
-.Sh NAME
-.Nm fflush ,
-.Nm fpurge
-.Nd flush a stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn fflush "FILE *stream"
-.Ft int
-.Fn fpurge "FILE *stream"
-.Sh DESCRIPTION
-The function
-.Fn fflush
-forces a write of all buffered data for the given output or update
-.Fa stream
-via the stream's underlying write function.
-The open status of the stream is unaffected.
-.Pp
-If the
-.Fa stream
-argument is
-.Dv NULL ,
-.Fn fflush
-flushes
-.Em all
-open output streams.
-.Pp
-The function
-.Fn fpurge
-erases any input or output buffered in the given
-.Fa stream .
-For output streams this discards any unwritten output.
-For input streams this discards any input read from the underlying object
-but not yet obtained via
-.Xr getc 3 ;
-this includes any text pushed back via
-.Xr ungetc .
-.Sh RETURN VALUES
-Upon successful completion 0 is returned.
-Otherwise,
-.Dv EOF
-is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Bl -tag -width [EBADF]
-.It Bq Er EBADF
-.Fa Stream
-is not an open stream, or, in the case of
-.Fn fflush ,
-not a stream open for writing.
-.El
-.Pp
-The function
-.Fn fflush
-may also fail and set
-.Va errno
-for any of the errors specified for the routine
-.Xr write 2 .
-.Sh SEE ALSO
-.Xr write 2 ,
-.Xr fclose 3 ,
-.Xr fopen 3 ,
-.Xr setbuf 3
-.Sh STANDARDS
-The
-.Fn fflush
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/stdio/fflush.c b/lib/libc/stdio/fflush.c
deleted file mode 100644
index aed57ec..0000000
--- a/lib/libc/stdio/fflush.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fflush.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <stdio.h>
-#include "local.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/* Flush a single file, or (if fp is NULL) all files. */
-int
-fflush(fp)
- register FILE *fp;
-{
- int retval;
-
- if (fp == NULL)
- return (_fwalk(__sflush));
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- if ((fp->_flags & (__SWR | __SRW)) == 0) {
- errno = EBADF;
- retval = EOF;
- } else {
- retval = __sflush(fp);
- }
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (retval);
-}
-
-int
-__sflush(fp)
- register FILE *fp;
-{
- register unsigned char *p;
- register int n, t;
-
- t = fp->_flags;
- if ((t & __SWR) == 0)
- return (0);
-
- if ((p = fp->_bf._base) == NULL)
- return (0);
-
- n = fp->_p - p; /* write this much */
-
- /*
- * Set these immediately to avoid problems with longjmp and to allow
- * exchange buffering (via setvbuf) in user write function.
- */
- fp->_p = p;
- fp->_w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size;
-
- for (; n > 0; n -= t, p += t) {
- t = (*fp->_write)(fp->_cookie, (char *)p, n);
- if (t <= 0) {
- fp->_flags |= __SERR;
- return (EOF);
- }
- }
- return (0);
-}
diff --git a/lib/libc/stdio/fgetc.c b/lib/libc/stdio/fgetc.c
deleted file mode 100644
index f93a004..0000000
--- a/lib/libc/stdio/fgetc.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fgetc.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-int
-fgetc(fp)
- FILE *fp;
-{
- int retval;
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- retval = __sgetc(fp);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/fgetln.3 b/lib/libc/stdio/fgetln.3
deleted file mode 100644
index e6c395d..0000000
--- a/lib/libc/stdio/fgetln.3
+++ /dev/null
@@ -1,124 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fgetln.3 8.3 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt FGETLN 3
-.Os
-.Sh NAME
-.Nm fgetln
-.Nd get a line from a stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft char *
-.Fn fgetln "FILE *stream" "size_t *len"
-.Sh DESCRIPTION
-The
-.Fn fgetln
-function
-returns a pointer to the next line from the stream referenced by
-.Fa stream .
-This line is
-.Em not
-a C string as it does not end with a terminating
-.Dv NUL
-character.
-The length of the line, including the final newline,
-is stored in the memory location to which
-.Fa len
-points.
-(Note, however, that if the line is the last
-in a file that does not end in a newline,
-the returned text will not contain a newline.)
-.Sh RETURN VALUES
-Upon successful completion a pointer is returned;
-this pointer becomes invalid after the next
-.Tn I/O
-operation on
-.Fa stream
-(whether successful or not)
-or as soon as the stream is closed.
-Otherwise,
-.Dv NULL
-is returned.
-The
-.Fn fgetln
-function
-does not distinguish between end-of-file and error; the routines
-.Xr feof 3
-and
-.Xr ferror 3
-must be used
-to determine which occurred.
-If an error occurs, the global variable
-.Va errno
-is set to indicate the error.
-The end-of-file condition is remembered, even on a terminal, and all
-subsequent attempts to read will return
-.Dv NULL
-until the condition is
-cleared with
-.Xr clearerr 3 .
-.Pp
-The text to which the returned pointer points may be modified,
-provided that no changes are made beyond the returned size.
-These changes are lost as soon as the pointer becomes invalid.
-.Sh ERRORS
-.Bl -tag -width [EBADF]
-.It Bq Er EBADF
-The argument
-.Fa stream
-is not a stream open for reading.
-.El
-.Pp
-The
-.Fn fgetln
-function
-may also fail and set
-.Va errno
-for any of the errors specified for the routines
-.Xr fflush 3 ,
-.Xr malloc 3 ,
-.Xr read 2 ,
-.Xr stat 2 ,
-or
-.Xr realloc 3 .
-.Sh SEE ALSO
-.Xr ferror 3 ,
-.Xr fgets 3 ,
-.Xr fopen 3 ,
-.Xr putc 3
-.Sh HISTORY
-The
-.Fn fgetln
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/stdio/fgetln.c b/lib/libc/stdio/fgetln.c
deleted file mode 100644
index 7c5742b..0000000
--- a/lib/libc/stdio/fgetln.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fgetln.c 8.2 (Berkeley) 1/2/94";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "local.h"
-
-/*
- * Expand the line buffer. Return -1 on error.
-#ifdef notdef
- * The `new size' does not account for a terminating '\0',
- * so we add 1 here.
-#endif
- */
-int
-__slbexpand(fp, newsize)
- FILE *fp;
- size_t newsize;
-{
- void *p;
-
-#ifdef notdef
- ++newsize;
-#endif
- if (fp->_lb._size >= newsize)
- return (0);
- if ((p = realloc(fp->_lb._base, newsize)) == NULL)
- return (-1);
- fp->_lb._base = p;
- fp->_lb._size = newsize;
- return (0);
-}
-
-/*
- * Get an input line. The returned pointer often (but not always)
- * points into a stdio buffer. Fgetln does not alter the text of
- * the returned line (which is thus not a C string because it will
- * not necessarily end with '\0'), but does allow callers to modify
- * it if they wish. Thus, we set __SMOD in case the caller does.
- */
-char *
-fgetln(fp, lenp)
- register FILE *fp;
- size_t *lenp;
-{
- register unsigned char *p;
- register size_t len;
- size_t off;
-
- /* make sure there is input */
- if (fp->_r <= 0 && __srefill(fp)) {
- *lenp = 0;
- return (NULL);
- }
-
- /* look for a newline in the input */
- if ((p = memchr((void *)fp->_p, '\n', (size_t)fp->_r)) != NULL) {
- register char *ret;
-
- /*
- * Found one. Flag buffer as modified to keep fseek from
- * `optimising' a backward seek, in case the user stomps on
- * the text.
- */
- p++; /* advance over it */
- ret = (char *)fp->_p;
- *lenp = len = p - fp->_p;
- fp->_flags |= __SMOD;
- fp->_r -= len;
- fp->_p = p;
- return (ret);
- }
-
- /*
- * We have to copy the current buffered data to the line buffer.
- * As a bonus, though, we can leave off the __SMOD.
- *
- * OPTIMISTIC is length that we (optimistically) expect will
- * accomodate the `rest' of the string, on each trip through the
- * loop below.
- */
-#define OPTIMISTIC 80
-
- for (len = fp->_r, off = 0;; len += fp->_r) {
- register size_t diff;
-
- /*
- * Make sure there is room for more bytes. Copy data from
- * file buffer to line buffer, refill file and look for
- * newline. The loop stops only when we find a newline.
- */
- if (__slbexpand(fp, len + OPTIMISTIC))
- goto error;
- (void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p,
- len - off);
- off = len;
- if (__srefill(fp))
- break; /* EOF or error: return partial line */
- if ((p = memchr((void *)fp->_p, '\n', (size_t)fp->_r)) == NULL)
- continue;
-
- /* got it: finish up the line (like code above) */
- p++;
- diff = p - fp->_p;
- len += diff;
- if (__slbexpand(fp, len))
- goto error;
- (void)memcpy((void *)(fp->_lb._base + off), (void *)fp->_p,
- diff);
- fp->_r -= diff;
- fp->_p = p;
- break;
- }
- *lenp = len;
-#ifdef notdef
- fp->_lb._base[len] = 0;
-#endif
- return ((char *)fp->_lb._base);
-
-error:
- *lenp = 0; /* ??? */
- return (NULL); /* ??? */
-}
diff --git a/lib/libc/stdio/fgetpos.c b/lib/libc/stdio/fgetpos.c
deleted file mode 100644
index ab8a9e5..0000000
--- a/lib/libc/stdio/fgetpos.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fgetpos.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-int
-fgetpos(fp, pos)
- FILE *fp;
- fpos_t *pos;
-{
- int retval;
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- retval = (*pos = ftell(fp)) == (fpos_t)-1;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return(retval);
-}
diff --git a/lib/libc/stdio/fgets.3 b/lib/libc/stdio/fgets.3
deleted file mode 100644
index 22ce5e6..0000000
--- a/lib/libc/stdio/fgets.3
+++ /dev/null
@@ -1,156 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fgets.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FGETS 3
-.Os
-.Sh NAME
-.Nm fgets ,
-.Nm gets
-.Nd get a line from a stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft char *
-.Fn fgets "char *str" "int size" "FILE *stream"
-.Ft char *
-.Fn gets "char *str"
-.Sh DESCRIPTION
-The
-.Fn fgets
-function
-reads at most one less than the number of characters specified by
-.Fa size
-from the given
-.Fa stream
-and stores them in the string
-.Fa str .
-Reading stops when a newline character is found,
-at end-of-file or error.
-The newline, if any, is retained.
-If any characters are read and there is no error, a
-.Ql \e0
-character is appended to end the string.
-.Pp
-The
-.Fn gets
-function
-is equivalent to
-.Fn fgets
-with an infinite
-.Fa size
-and a
-.Fa stream
-of
-.Em stdin ,
-except that the newline character (if any) is not stored in the string.
-It is the caller's responsibility to ensure that the input line,
-if any, is sufficiently short to fit in the string.
-.Sh RETURN VALUES
-.Pp
-Upon successful completion,
-.Fn fgets
-and
-.Fn gets
-return
-a pointer to the string.
-If end-of-file occurs before any characters are read,
-they return
-.Dv NULL
-and the buffer contents is unchanged.
-If an error occurs,
-they return
-.Dv NULL
-and the buffer contents is indeterminate.
-The
-.Fn fgets
-and
-.Fn gets
-functions
-do not distinguish between end-of-file and error, and callers must use
-.Xr feof 3
-and
-.Xr ferror 3
-to determine which occurred.
-.Sh ERRORS
-.Bl -tag -width [EBADF]
-.It Bq Er EBADF
-The given
-.Fa stream
-is not a readable stream.
-.El
-.Pp
-The function
-.Fn fgets
-may also fail and set
-.Va errno
-for any of the errors specified for the routines
-.Xr fflush 3 ,
-.Xr fstat 2 ,
-.Xr read 2 ,
-or
-.Xr malloc 3 .
-.Pp
-The function
-.Fn gets
-may also fail and set
-.Va errno
-for any of the errors specified for the routine
-.Xr getchar 3 .
-.Sh SEE ALSO
-.Xr feof 3 ,
-.Xr ferror 3 ,
-.Xr fgetln 3
-.Sh STANDARDS
-The functions
-.Fn fgets
-and
-.Fn gets
-conform to
-.St -ansiC .
-.Sh BUGS
-Since it is usually impossible to ensure that the next input line
-is less than some arbitrary length, and because overflowing the
-input buffer is almost invariably a security violation, programs
-should
-.Em NEVER
-use
-.Fn gets .
-The
-.Fn gets
-function
-exists purely to conform to
-.St -ansiC .
diff --git a/lib/libc/stdio/fgets.c b/lib/libc/stdio/fgets.c
deleted file mode 100644
index 434fc07..0000000
--- a/lib/libc/stdio/fgets.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fgets.c 8.2 (Berkeley) 12/22/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "local.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * Read at most n-1 characters from the given file.
- * Stop when a newline has been read, or the count runs out.
- * Return first argument, or NULL if no characters were read.
- */
-char *
-fgets(buf, n, fp)
- char *buf;
- register int n;
- register FILE *fp;
-{
- register size_t len;
- register char *s;
- register unsigned char *p, *t;
-
- if (n <= 0) /* sanity check */
- return (NULL);
-
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- s = buf;
- n--; /* leave space for NUL */
- while (n != 0) {
- /*
- * If the buffer is empty, refill it.
- */
- if ((len = fp->_r) <= 0) {
- if (__srefill(fp)) {
- /* EOF/error: stop with partial or no line */
- if (s == buf) {
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (NULL);
- }
- break;
- }
- len = fp->_r;
- }
- p = fp->_p;
-
- /*
- * Scan through at most n bytes of the current buffer,
- * looking for '\n'. If found, copy up to and including
- * newline, and stop. Otherwise, copy entire chunk
- * and loop.
- */
- if (len > n)
- len = n;
- t = memchr((void *)p, '\n', len);
- if (t != NULL) {
- len = ++t - p;
- fp->_r -= len;
- fp->_p = t;
- (void)memcpy((void *)s, (void *)p, len);
- s[len] = 0;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (buf);
- }
- fp->_r -= len;
- fp->_p += len;
- (void)memcpy((void *)s, (void *)p, len);
- s += len;
- n -= len;
- }
- *s = 0;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (buf);
-}
diff --git a/lib/libc/stdio/fileno.c b/lib/libc/stdio/fileno.c
deleted file mode 100644
index 6ceac0c..0000000
--- a/lib/libc/stdio/fileno.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fileno.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-
-/*
- * A subroutine version of the macro fileno.
- */
-#undef fileno
-
-int
-fileno(fp)
- FILE *fp;
-{
- return (__sfileno(fp));
-}
diff --git a/lib/libc/stdio/findfp.c b/lib/libc/stdio/findfp.c
deleted file mode 100644
index 8a6cddd..0000000
--- a/lib/libc/stdio/findfp.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)findfp.c 8.2 (Berkeley) 1/4/94";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include "local.h"
-#include "glue.h"
-
-int __sdidinit;
-
-#define NDYNAMIC 10 /* add ten more whenever necessary */
-
-#define std(flags, file) \
- {0,0,0,flags,file,{0},0,__sF+file,__sclose,__sread,__sseek,__swrite}
-/* p r w flags file _bf z cookie close read seek write */
-
- /* the usual - (stdin + stdout + stderr) */
-static FILE usual[FOPEN_MAX - 3];
-static struct glue uglue = { 0, FOPEN_MAX - 3, usual };
-
-FILE __sF[3] = {
- std(__SRD, STDIN_FILENO), /* stdin */
- std(__SWR, STDOUT_FILENO), /* stdout */
- std(__SWR|__SNBF, STDERR_FILENO) /* stderr */
-};
-struct glue __sglue = { &uglue, 3, __sF };
-
-static struct glue * moreglue __P((int));
-
-static struct glue *
-moreglue(n)
- register int n;
-{
- register struct glue *g;
- register FILE *p;
- static FILE empty;
-
- g = (struct glue *)malloc(sizeof(*g) + ALIGNBYTES + n * sizeof(FILE));
- if (g == NULL)
- return (NULL);
- p = (FILE *)ALIGN(g + 1);
- g->next = NULL;
- g->niobs = n;
- g->iobs = p;
- while (--n >= 0)
- *p++ = empty;
- return (g);
-}
-
-/*
- * Find a free FILE for fopen et al.
- */
-FILE *
-__sfp()
-{
- register FILE *fp;
- register int n;
- register struct glue *g;
-
- if (!__sdidinit)
- __sinit();
- for (g = &__sglue;; g = g->next) {
- for (fp = g->iobs, n = g->niobs; --n >= 0; fp++)
- if (fp->_flags == 0)
- goto found;
- if (g->next == NULL && (g->next = moreglue(NDYNAMIC)) == NULL)
- break;
- }
- return (NULL);
-found:
- fp->_flags = 1; /* reserve this slot; caller sets real flags */
- fp->_p = NULL; /* no current pointer */
- fp->_w = 0; /* nothing to read or write */
- fp->_r = 0;
- fp->_bf._base = NULL; /* no buffer */
- fp->_bf._size = 0;
- fp->_lbfsize = 0; /* not line buffered */
- fp->_file = -1; /* no file */
-/* fp->_cookie = <any>; */ /* caller sets cookie, _read/_write etc */
- fp->_ub._base = NULL; /* no ungetc buffer */
- fp->_ub._size = 0;
- fp->_lb._base = NULL; /* no line buffer */
- fp->_lb._size = 0;
- return (fp);
-}
-
-/*
- * XXX. Force immediate allocation of internal memory. Not used by stdio,
- * but documented historically for certain applications. Bad applications.
- */
-__warn_references(f_prealloc,
- "warning: this program uses f_prealloc(), which is stupid.");
-
-void
-f_prealloc()
-{
- register struct glue *g;
- int n;
-
- n = getdtablesize() - FOPEN_MAX + 20; /* 20 for slop. */
- for (g = &__sglue; (n -= g->niobs) > 0 && g->next; g = g->next)
- /* void */;
- if (n > 0)
- g->next = moreglue(n);
-}
-
-/*
- * exit() calls _cleanup() through *__cleanup, set whenever we
- * open or buffer a file. This chicanery is done so that programs
- * that do not use stdio need not link it all in.
- *
- * The name `_cleanup' is, alas, fairly well known outside stdio.
- */
-void
-_cleanup()
-{
- /* (void) _fwalk(fclose); */
- (void) _fwalk(__sflush); /* `cheating' */
-}
-
-/*
- * __sinit() is called whenever stdio's internal variables must be set up.
- */
-void
-__sinit()
-{
- /* make sure we clean up on exit */
- __cleanup = _cleanup; /* conservative */
- __sdidinit = 1;
-}
diff --git a/lib/libc/stdio/flags.c b/lib/libc/stdio/flags.c
deleted file mode 100644
index 4ef0db1..0000000
--- a/lib/libc/stdio/flags.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)flags.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <stdio.h>
-#include <errno.h>
-#include "local.h"
-
-/*
- * Return the (stdio) flags for a given mode. Store the flags
- * to be passed to an open() syscall through *optr.
- * Return 0 on error.
- */
-int
-__sflags(mode, optr)
- register const char *mode;
- int *optr;
-{
- register int ret, m, o;
-
- switch (*mode++) {
-
- case 'r': /* open for reading */
- ret = __SRD;
- m = O_RDONLY;
- o = 0;
- break;
-
- case 'w': /* open for writing */
- ret = __SWR;
- m = O_WRONLY;
- o = O_CREAT | O_TRUNC;
- break;
-
- case 'a': /* open for appending */
- ret = __SWR;
- m = O_WRONLY;
- o = O_CREAT | O_APPEND;
- break;
-
- default: /* illegal mode */
- errno = EINVAL;
- return (0);
- }
-
- /* [rwa]\+ or [rwa]b\+ means read and write */
- if (*mode == '+' || (*mode == 'b' && mode[1] == '+')) {
- ret = __SRW;
- m = O_RDWR;
- }
- *optr = m | o;
- return (ret);
-}
diff --git a/lib/libc/stdio/floatio.h b/lib/libc/stdio/floatio.h
deleted file mode 100644
index c2089fe..0000000
--- a/lib/libc/stdio/floatio.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)floatio.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * Floating point scanf/printf (input/output) definitions.
- */
-
-/* 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
diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3
deleted file mode 100644
index f954d6c..0000000
--- a/lib/libc/stdio/fopen.3
+++ /dev/null
@@ -1,237 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fopen.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FOPEN 3
-.Os
-.Sh NAME
-.Nm fopen ,
-.Nm fdopen ,
-.Nm freopen
-.Nd stream open functions
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft FILE *
-.Fn fopen "const char *path" "const char *mode"
-.Ft FILE *
-.Fn fdopen "int fildes" "const char *mode"
-.Ft FILE *
-.Fn freopen "const char *path" "const char *mode" "FILE *stream"
-.Sh DESCRIPTION
-The
-.Fn fopen
-function
-opens the file whose name is the string pointed to by
-.Fa path
-and associates a stream with it.
-.Pp
-The argument
-.Fa mode
-points to a string beginning with one of the following
-sequences (Additional characters may follow these sequences.):
-.Bl -tag -width indent
-.It Dq Li r
-Open text file for reading.
-The stream is positioned at the beginning of the file.
-.It Dq Li r+
-Open for reading and writing.
-The stream is positioned at the beginning of the file.
-.It Dq Li w
-Truncate file to zero length or create text file for writing.
-The stream is positioned at the beginning of the file.
-.It Dq Li w+
-Open for reading and writing.
-The file is created if it does not exist, otherwise it is truncated.
-The stream is positioned at the beginning of the file.
-.It Dq Li a
-Open for writing.
-The file is created if it does not exist.
-The stream is positioned at the end of the file.
-.It Dq Li a+
-Open for reading and writing.
-The file is created if it does not exist.
-The stream is positioned at the end of the file.
-.El
-.Pp
-The
-.Fa mode
-string can also include the letter ``b'' either as a third character or
-as a character between the characters in any of the two-character strings
-described above.
-This is strictly for compatibility with
-.St -ansiC
-and has no effect; the ``b'' is ignored.
-.Pp
-Any created files will have mode
-.Pf \\*q Dv S_IRUSR
-\&|
-.Dv S_IWUSR
-\&|
-.Dv S_IRGRP
-\&|
-.Dv S_IWGRP
-\&|
-.Dv S_IROTH
-\&|
-.Dv S_IWOTH Ns \\*q
-.Pq Li 0666 ,
-as modified by the process'
-umask value (see
-.Xr umask 2 ) .
-.Pp
-Reads and writes may be intermixed on read/write streams in any order,
-and do not require an intermediate seek as in previous versions of
-.Em stdio .
-This is not portable to other systems, however;
-.Tn ANSI C
-requires that
-a file positioning function intervene between output and input, unless
-an input operation encounters end-of-file.
-.Pp
-The
-.Fn fdopen
-function associates a stream with the existing file descriptor,
-.Fa fildes .
-The
-.Fa mode
-of the stream must be compatible with the mode of the file descriptor.
-.Pp
-The
-.Fn freopen
-function
-opens the file whose name is the string pointed to by
-.Fa path
-and associates the stream pointed to by
-.Fa stream
-with it.
-The original stream (if it exists) is closed.
-The
-.Fa mode
-argument is used just as in the
-.Fn fopen
-function.
-The primary use of the
-.Fn freopen
-function
-is to change the file associated with a
-standard text stream
-.Pf ( Em stderr ,
-.Em stdin ,
-or
-.Em stdout ) .
-.Sh RETURN VALUES
-Upon successful completion
-.Fn fopen ,
-.Fn fdopen
-and
-.Fn freopen
-return a
-.Tn FILE
-pointer.
-Otherwise,
-.Dv NULL
-is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Bl -tag -width [EINVAL]
-.It Bq Er EINVAL
-The
-.Fa mode
-provided to
-.Fn fopen ,
-.Fn fdopen ,
-or
-.Fn freopen
-was invalid.
-.El
-.Pp
-The
-.Fn fopen ,
-.Fn fdopen
-and
-.Fn freopen
-functions
-may also fail and set
-.Va errno
-for any of the errors specified for the routine
-.Xr malloc 3 .
-.Pp
-The
-.Fn fopen
-function
-may also fail and set
-.Va errno
-for any of the errors specified for the routine
-.Xr open 2 .
-.Pp
-The
-.Fn fdopen
-function
-may also fail and set
-.Va errno
-for any of the errors specified for the routine
-.Xr fcntl 2 .
-.Pp
-The
-.Fn freopen
-function
-may also fail and set
-.Va errno
-for any of the errors specified for the routines
-.Xr open 2 ,
-.Xr fclose 3
-and
-.Xr fflush 3 .
-.Sh SEE ALSO
-.Xr open 2 ,
-.Xr fclose 3 ,
-.Xr fseek 3 ,
-.Xr funopen 3
-.Sh STANDARDS
-The
-.Fn fopen
-and
-.Fn freopen
-functions
-conform to
-.St -ansiC .
-The
-.Fn fdopen
-function
-conforms to
-.St -p1003.1-88 .
diff --git a/lib/libc/stdio/fopen.c b/lib/libc/stdio/fopen.c
deleted file mode 100644
index 9199755..0000000
--- a/lib/libc/stdio/fopen.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fopen.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <errno.h>
-#include "local.h"
-
-FILE *
-fopen(file, mode)
- const char *file;
- const char *mode;
-{
- register FILE *fp;
- register int f;
- int flags, oflags;
-
- if ((flags = __sflags(mode, &oflags)) == 0)
- return (NULL);
- if ((fp = __sfp()) == NULL)
- return (NULL);
- if ((f = open(file, oflags, DEFFILEMODE)) < 0) {
- fp->_flags = 0; /* release */
- return (NULL);
- }
- fp->_file = f;
- fp->_flags = flags;
- fp->_cookie = fp;
- fp->_read = __sread;
- fp->_write = __swrite;
- fp->_seek = __sseek;
- fp->_close = __sclose;
-
- /*
- * When opening in append mode, even though we use O_APPEND,
- * we need to seek to the end so that ftell() gets the right
- * answer. If the user then alters the seek pointer, or
- * the file extends, this will fail, but there is not much
- * we can do about this. (We could set __SAPP and check in
- * fseek and ftell.)
- */
- if (oflags & O_APPEND)
- (void) __sseek((void *)fp, (fpos_t)0, SEEK_END);
- return (fp);
-}
diff --git a/lib/libc/stdio/fprintf.c b/lib/libc/stdio/fprintf.c
deleted file mode 100644
index 383f1e1..0000000
--- a/lib/libc/stdio/fprintf.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fprintf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-int
-#if __STDC__
-fprintf(FILE *fp, const char *fmt, ...)
-#else
-fprintf(fp, fmt, va_alist)
- FILE *fp;
- char *fmt;
- va_dcl
-#endif
-{
- int ret;
- va_list ap;
-
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vfprintf(fp, fmt, ap);
- va_end(ap);
- return (ret);
-}
diff --git a/lib/libc/stdio/fpurge.c b/lib/libc/stdio/fpurge.c
deleted file mode 100644
index d1d9e87..0000000
--- a/lib/libc/stdio/fpurge.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fpurge.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "local.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * fpurge: like fflush, but without writing anything: leave the
- * given FILE's buffer empty.
- */
-int
-fpurge(fp)
- register FILE *fp;
-{
- int retval;
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- if (!fp->_flags) {
- errno = EBADF;
- retval = EOF;
- } else {
- if (HASUB(fp))
- FREEUB(fp);
- fp->_p = fp->_bf._base;
- fp->_r = 0;
- fp->_w = fp->_flags & (__SLBF|__SNBF) ? 0 : fp->_bf._size;
- retval = 0;
- }
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/fputc.c b/lib/libc/stdio/fputc.c
deleted file mode 100644
index 89b138d..0000000
--- a/lib/libc/stdio/fputc.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fputc.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-int
-fputc(c, fp)
- int c;
- register FILE *fp;
-{
- int retval;
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- retval = putc(c, fp);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/fputs.3 b/lib/libc/stdio/fputs.3
deleted file mode 100644
index 0961366..0000000
--- a/lib/libc/stdio/fputs.3
+++ /dev/null
@@ -1,107 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fputs.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FPUTS 3
-.Os
-.Sh NAME
-.Nm fputs ,
-.Nm puts
-.Nd output a line to a stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn fputs "const char *str" "FILE *stream"
-.Ft int
-.Fn puts "const char *str"
-.Sh DESCRIPTION
-The function
-.Fn fputs
-writes the string pointed to by
-.Fa str
-to the stream pointed to by
-.Fa stream .
-.\" The terminating
-.\" .Dv NUL
-.\" character is not written.
-.Pp
-The function
-.Fn puts
-writes the string
-.Fa str ,
-and a terminating newline character,
-to the stream
-.Em stdout .
-.Sh RETURN VALUES
-The
-.Fn fputs
-function
-returns 0 on success and
-.Dv EOF
-on error;
-.Fn puts
-returns a nonnegative integer on success and
-.Dv EOF
-on error.
-.Sh ERRORS
-.Bl -tag -width [EBADF]
-.It Bq Er EBADF
-The
-.Fa stream
-supplied
-is not a writable stream.
-.El
-.Pp
-The functions
-.Fn fputs
-and
-.Fn puts
-may also fail and set
-.Va errno
-for any of the errors specified for the routines
-.Xr write 2 .
-.Sh SEE ALSO
-.Xr ferror 3 ,
-.Xr putc 3 ,
-.Xr stdio 3
-.Sh STANDARDS
-The functions
-.Fn fputs
-and
-.Fn puts
-conform to
-.St -ansiC .
diff --git a/lib/libc/stdio/fputs.c b/lib/libc/stdio/fputs.c
deleted file mode 100644
index 537c348..0000000
--- a/lib/libc/stdio/fputs.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fputs.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "fvwrite.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * Write the given string to the given file.
- */
-int
-fputs(s, fp)
- const char *s;
- FILE *fp;
-{
- int retval;
- struct __suio uio;
- struct __siov iov;
-
- iov.iov_base = (void *)s;
- iov.iov_len = uio.uio_resid = strlen(s);
- uio.uio_iov = &iov;
- uio.uio_iovcnt = 1;
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- retval = __sfvwrite(fp, &uio);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/fread.3 b/lib/libc/stdio/fread.3
deleted file mode 100644
index c3e591a..0000000
--- a/lib/libc/stdio/fread.3
+++ /dev/null
@@ -1,106 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fread.3 8.2 (Berkeley) 3/8/94
-.\"
-.Dd March 8, 1994
-.Dt FREAD 3
-.Os
-.Sh NAME
-.Nm fread ,
-.Nm fwrite
-.Nd binary stream input/output
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft size_t
-.Fn fread "void *ptr" "size_t size" "size_t nmemb" "FILE *stream"
-.Ft size_t
-.Fn fwrite "const void *ptr" "size_t size" "size_t nmemb" "FILE *stream"
-.Sh DESCRIPTION
-The function
-.Fn fread
-reads
-.Fa nmemb
-objects, each
-.Fa size
-bytes long, from the stream pointed to by
-.Fa stream ,
-storing them at the location given by
-.Fa ptr .
-.Pp
-The function
-.Fn fwrite
-writes
-.Fa nmemb
-objects, each
-.Fa size
-bytes long, to the stream pointed to by
-.Fa stream ,
-obtaining them from the location given by
-.Fa ptr .
-.Sh RETURN VALUES
-The functions
-.Fn fread
-and
-.Fn fwrite
-advance the file position indicator for the stream
-by the number of bytes read or written.
-They return the number of objects read or written.
-If an error occurs, or the end-of-file is reached,
-the return value is a short object count (or zero).
-.Pp
-The function
-.Fn fread
-does not distinguish between end-of-file and error, and callers
-must use
-.Xr feof 3
-and
-.Xr ferror 3
-to determine which occurred.
-The function
-.Fn fwrite
-returns a value less than
-.Fa nmemb
-only if a write error has occurred.
-.Sh SEE ALSO
-.Xr read 2 ,
-.Xr write 2
-.Sh STANDARDS
-The functions
-.Fn fread
-and
-.Fn fwrite
-conform to
-.St -ansiC .
diff --git a/lib/libc/stdio/fread.c b/lib/libc/stdio/fread.c
deleted file mode 100644
index 4f67fbf..0000000
--- a/lib/libc/stdio/fread.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fread.c 8.2 (Berkeley) 12/11/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "local.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-size_t
-fread(buf, size, count, fp)
- void *buf;
- size_t size, count;
- register FILE *fp;
-{
- register size_t resid;
- register char *p;
- register int r;
- size_t total;
-
- /*
- * The ANSI standard requires a return value of 0 for a count
- * or a size of 0. Peculiarily, it imposes no such requirements
- * on fwrite; it only requires fread to be broken.
- */
- if ((resid = count * size) == 0)
- return (0);
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- if (fp->_r < 0)
- fp->_r = 0;
- total = resid;
- p = buf;
- while (resid > (r = fp->_r)) {
- (void)memcpy((void *)p, (void *)fp->_p, (size_t)r);
- fp->_p += r;
- /* fp->_r = 0 ... done in __srefill */
- p += r;
- resid -= r;
- if (__srefill(fp)) {
- /* no more input: return partial result */
- return ((total - resid) / size);
- }
- }
- (void)memcpy((void *)p, (void *)fp->_p, resid);
- fp->_r -= resid;
- fp->_p += resid;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (count);
-}
diff --git a/lib/libc/stdio/freopen.c b/lib/libc/stdio/freopen.c
deleted file mode 100644
index 7a8a3ef..0000000
--- a/lib/libc/stdio/freopen.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)freopen.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "local.h"
-
-/*
- * Re-direct an existing, open (probably) file to some other file.
- * ANSI is written such that the original file gets closed if at
- * all possible, no matter what.
- */
-FILE *
-freopen(file, mode, fp)
- const char *file, *mode;
- register FILE *fp;
-{
- register int f;
- int flags, isopen, oflags, sverrno, wantfd;
-
- if ((flags = __sflags(mode, &oflags)) == 0) {
- (void) fclose(fp);
- return (NULL);
- }
-
- if (!__sdidinit)
- __sinit();
-
- /*
- * There are actually programs that depend on being able to "freopen"
- * descriptors that weren't originally open. Keep this from breaking.
- * Remember whether the stream was open to begin with, and which file
- * descriptor (if any) was associated with it. If it was attached to
- * a descriptor, defer closing it; freopen("/dev/stdin", "r", stdin)
- * should work. This is unnecessary if it was not a Unix file.
- */
- if (fp->_flags == 0) {
- fp->_flags = __SEOF; /* hold on to it */
- isopen = 0;
- wantfd = -1;
- } else {
- /* flush the stream; ANSI doesn't require this. */
- if (fp->_flags & __SWR)
- (void) __sflush(fp);
- /* if close is NULL, closing is a no-op, hence pointless */
- isopen = fp->_close != NULL;
- if ((wantfd = fp->_file) < 0 && isopen) {
- (void) (*fp->_close)(fp->_cookie);
- isopen = 0;
- }
- }
-
- /* Get a new descriptor to refer to the new file. */
- f = open(file, oflags, DEFFILEMODE);
- if (f < 0 && isopen) {
- /* If out of fd's close the old one and try again. */
- if (errno == ENFILE || errno == EMFILE) {
- (void) (*fp->_close)(fp->_cookie);
- isopen = 0;
- f = open(file, oflags, DEFFILEMODE);
- }
- }
- sverrno = errno;
-
- /*
- * Finish closing fp. Even if the open succeeded above, we cannot
- * keep fp->_base: it may be the wrong size. This loses the effect
- * of any setbuffer calls, but stdio has always done this before.
- */
- if (isopen)
- (void) (*fp->_close)(fp->_cookie);
- if (fp->_flags & __SMBF)
- free((char *)fp->_bf._base);
- fp->_w = 0;
- fp->_r = 0;
- fp->_p = NULL;
- fp->_bf._base = NULL;
- fp->_bf._size = 0;
- fp->_lbfsize = 0;
- if (HASUB(fp))
- FREEUB(fp);
- fp->_ub._size = 0;
- if (HASLB(fp))
- FREELB(fp);
- fp->_lb._size = 0;
-
- if (f < 0) { /* did not get it after all */
- fp->_flags = 0; /* set it free */
- errno = sverrno; /* restore in case _close clobbered */
- return (NULL);
- }
-
- /*
- * If reopening something that was open before on a real file, try
- * to maintain the descriptor. Various C library routines (perror)
- * assume stderr is always fd STDERR_FILENO, even if being freopen'd.
- */
- if (wantfd >= 0 && f != wantfd) {
- if (dup2(f, wantfd) >= 0) {
- (void) close(f);
- f = wantfd;
- }
- }
-
- fp->_flags = flags;
- fp->_file = f;
- fp->_cookie = fp;
- fp->_read = __sread;
- fp->_write = __swrite;
- fp->_seek = __sseek;
- fp->_close = __sclose;
- return (fp);
-}
diff --git a/lib/libc/stdio/fscanf.c b/lib/libc/stdio/fscanf.c
deleted file mode 100644
index 8513f80..0000000
--- a/lib/libc/stdio/fscanf.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fscanf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-#if __STDC__
-int
-fscanf(FILE *fp, char const *fmt, ...) {
- int ret;
- va_list ap;
-
- va_start(ap, fmt);
-#else
-int
-fscanf(fp, fmt, va_alist)
- FILE *fp;
- char *fmt;
- va_dcl
-{
- int ret;
- va_list ap;
-
- va_start(ap);
-#endif
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- ret = __svfscanf(fp, fmt, ap);
- va_end(ap);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (ret);
-}
diff --git a/lib/libc/stdio/fseek.3 b/lib/libc/stdio/fseek.3
deleted file mode 100644
index 5dd79e9..0000000
--- a/lib/libc/stdio/fseek.3
+++ /dev/null
@@ -1,188 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fseek.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FSEEK 3
-.Os
-.Sh NAME
-.Nm fgetpos ,
-.Nm fseek ,
-.Nm fsetpos ,
-.Nm ftell ,
-.Nm rewind
-.Nd reposition a stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn fseek "FILE *stream" "long offset" "int whence"
-.Ft long
-.Fn ftell "FILE *stream"
-.Ft void
-.Fn rewind "FILE *stream"
-.Ft int
-.Fn fgetpos "FILE *stream" "fpos_t *pos"
-.Ft int
-.Fn fsetpos "FILE *stream" "const fpos_t *pos"
-.Sh DESCRIPTION
-The
-.Fn fseek
-function sets the file position indicator for the stream pointed
-to by
-.Fa stream .
-The new position, measured in bytes, is obtained by adding
-.Fa offset
-bytes to the position specified by
-.Fa whence .
-If
-.Fa whence
-is set to
-.Dv SEEK_SET ,
-.Dv SEEK_CUR ,
-or
-.Dv SEEK_END ,
-the offset is relative to the
-start of the file, the current position indicator, or end-of-file,
-respectively.
-A successful call to the
-.Fn fseek
-function clears the end-of-file indicator for the stream and undoes
-any effects of the
-.Xr ungetc 3
-function on the same stream.
-.Pp
-The
-.Fn ftell
-function
-obtains the current value of the file position indicator for the
-stream pointed to by
-.Fa stream .
-.Pp
-The
-.Fn rewind
-function sets the file position indicator for the stream pointed
-to by
-.Fa stream
-to the beginning of the file.
-It is equivalent to:
-.Pp
-.Dl (void)fseek(stream, 0L, SEEK_SET)
-.Pp
-except that the error indicator for the stream is also cleared
-(see
-.Xr clearerr 3 ) .
-.Pp
-The
-.Fn fgetpos
-and
-.Fn fsetpos
-functions
-are alternate interfaces equivalent to
-.Fn ftell
-and
-.Fn fseek
-(with whence set to
-.Dv SEEK_SET
-), setting and storing the current value of
-the file offset into or from the object referenced by
-.Fa pos .
-On some
-.Pq non- Ns Tn UNIX
-systems an
-.Dq Fa fpos_t
-object may be a complex object
-and these routines may be the only way to portably reposition a text stream.
-.Sh RETURN VALUES
-The
-.Fn rewind
-function
-returns no value.
-Upon successful completion,
-.Fn fgetpos ,
-.Fn fseek ,
-.Fn fsetpos
-return 0,
-and
-.Fn ftell
-returns the current offset.
-Otherwise, \-1 is returned and the global variable errno is set to
-indicate the error.
-.Sh ERRORS
-.Bl -tag -width [EINVAL]
-.It Bq Er EBADF
-The
-.Fa stream
-specified
-is not a seekable stream.
-.It Bq Er EINVAL
-The
-.Fa whence
-argument to
-.Fn fseek
-was not
-.Dv SEEK_SET ,
-.Dv SEEK_END ,
-or
-.Dv SEEK_CUR .
-.El
-.Pp
-The function
-.Fn fgetpos ,
-.Fn fseek ,
-.Fn fsetpos ,
-and
-.Fn ftell
-may also fail and set
-.Va errno
-for any of the errors specified for the routines
-.Xr fflush 3 ,
-.Xr fstat 2 ,
-.Xr lseek 2 ,
-and
-.Xr malloc 3 .
-.Sh SEE ALSO
-.Xr lseek 2
-.Sh STANDARDS
-The
-.Fn fgetpos ,
-.Fn fsetpos ,
-.Fn fseek ,
-.Fn ftell ,
-and
-.Fn rewind
-functions
-conform to
-.St -ansiC .
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c
deleted file mode 100644
index c6707df..0000000
--- a/lib/libc/stdio/fseek.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fseek.c 8.3 (Berkeley) 1/2/94";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include "local.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-#define POS_ERR (-(fpos_t)1)
-
-/*
- * Seek the given file to the given offset.
- * `Whence' must be one of the three SEEK_* macros.
- */
-int
-fseek(fp, offset, whence)
- register FILE *fp;
- long offset;
- int whence;
-{
- register fpos_t (*seekfn) __P((void *, fpos_t, int));
- fpos_t target, curoff;
- size_t n;
- struct stat st;
- int havepos;
-
- /* make sure stdio is set up */
- if (!__sdidinit)
- __sinit();
-
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- /*
- * Have to be able to seek.
- */
- if ((seekfn = fp->_seek) == NULL) {
- errno = ESPIPE; /* historic practice */
- return (EOF);
- }
-
- /*
- * Change any SEEK_CUR to SEEK_SET, and check `whence' argument.
- * After this, whence is either SEEK_SET or SEEK_END.
- */
- switch (whence) {
-
- case SEEK_CUR:
- /*
- * In order to seek relative to the current stream offset,
- * we have to first find the current stream offset a la
- * ftell (see ftell for details).
- */
- if (fp->_flags & __SOFF)
- curoff = fp->_offset;
- else {
- curoff = (*seekfn)(fp->_cookie, (fpos_t)0, SEEK_CUR);
- if (curoff == -1) {
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (EOF);
- }
- }
- if (fp->_flags & __SRD) {
- curoff -= fp->_r;
- if (HASUB(fp))
- curoff -= fp->_ur;
- } else if (fp->_flags & __SWR && fp->_p != NULL)
- curoff += fp->_p - fp->_bf._base;
-
- offset += curoff;
- whence = SEEK_SET;
- havepos = 1;
- break;
-
- case SEEK_SET:
- case SEEK_END:
- curoff = 0; /* XXX just to keep gcc quiet */
- havepos = 0;
- break;
-
- default:
- errno = EINVAL;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (EOF);
- }
-
- /*
- * Can only optimise if:
- * reading (and not reading-and-writing);
- * not unbuffered; and
- * this is a `regular' Unix file (and hence seekfn==__sseek).
- * We must check __NBF first, because it is possible to have __NBF
- * and __SOPT both set.
- */
- if (fp->_bf._base == NULL)
- __smakebuf(fp);
- if (fp->_flags & (__SWR | __SRW | __SNBF | __SNPT))
- goto dumb;
- if ((fp->_flags & __SOPT) == 0) {
- if (seekfn != __sseek ||
- fp->_file < 0 || fstat(fp->_file, &st) ||
- (st.st_mode & S_IFMT) != S_IFREG) {
- fp->_flags |= __SNPT;
- goto dumb;
- }
- fp->_blksize = st.st_blksize;
- fp->_flags |= __SOPT;
- }
-
- /*
- * We are reading; we can try to optimise.
- * Figure out where we are going and where we are now.
- */
- if (whence == SEEK_SET)
- target = offset;
- else {
- if (fstat(fp->_file, &st))
- goto dumb;
- target = st.st_size + offset;
- }
-
- if (!havepos) {
- if (fp->_flags & __SOFF)
- curoff = fp->_offset;
- else {
- curoff = (*seekfn)(fp->_cookie, (fpos_t)0, SEEK_CUR);
- if (curoff == POS_ERR)
- goto dumb;
- }
- curoff -= fp->_r;
- if (HASUB(fp))
- curoff -= fp->_ur;
- }
-
- /*
- * Compute the number of bytes in the input buffer (pretending
- * that any ungetc() input has been discarded). Adjust current
- * offset backwards by this count so that it represents the
- * file offset for the first byte in the current input buffer.
- */
- if (HASUB(fp)) {
- curoff += fp->_r; /* kill off ungetc */
- n = fp->_up - fp->_bf._base;
- curoff -= n;
- n += fp->_ur;
- } else {
- n = fp->_p - fp->_bf._base;
- curoff -= n;
- n += fp->_r;
- }
-
- /*
- * If the target offset is within the current buffer,
- * simply adjust the pointers, clear EOF, undo ungetc(),
- * and return. (If the buffer was modified, we have to
- * skip this; see fgetln.c.)
- */
- if ((fp->_flags & __SMOD) == 0 &&
- target >= curoff && target < curoff + n) {
- register int o = target - curoff;
-
- fp->_p = fp->_bf._base + o;
- fp->_r = n - o;
- if (HASUB(fp))
- FREEUB(fp);
- fp->_flags &= ~__SEOF;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (0);
- }
-
- /*
- * The place we want to get to is not within the current buffer,
- * but we can still be kind to the kernel copyout mechanism.
- * By aligning the file offset to a block boundary, we can let
- * the kernel use the VM hardware to map pages instead of
- * copying bytes laboriously. Using a block boundary also
- * ensures that we only read one block, rather than two.
- */
- curoff = target & ~(fp->_blksize - 1);
- if ((*seekfn)(fp->_cookie, curoff, SEEK_SET) == POS_ERR)
- goto dumb;
- fp->_r = 0;
- fp->_p = fp->_bf._base;
- if (HASUB(fp))
- FREEUB(fp);
- fp->_flags &= ~__SEOF;
- n = target - curoff;
- if (n) {
- if (__srefill(fp) || fp->_r < n)
- goto dumb;
- fp->_p += n;
- fp->_r -= n;
- }
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (0);
-
- /*
- * We get here if we cannot optimise the seek ... just
- * do it. Allow the seek function to change fp->_bf._base.
- */
-dumb:
- if (__sflush(fp) ||
- (*seekfn)(fp->_cookie, (fpos_t)offset, whence) == POS_ERR) {
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (EOF);
- }
- /* success: clear EOF indicator and discard ungetc() data */
- if (HASUB(fp))
- FREEUB(fp);
- fp->_p = fp->_bf._base;
- fp->_r = 0;
- /* fp->_w = 0; */ /* unnecessary (I think...) */
- fp->_flags &= ~__SEOF;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (0);
-}
diff --git a/lib/libc/stdio/fsetpos.c b/lib/libc/stdio/fsetpos.c
deleted file mode 100644
index d521a20..0000000
--- a/lib/libc/stdio/fsetpos.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fsetpos.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-
-/*
- * fsetpos: like fseek.
- */
-int
-fsetpos(iop, pos)
- FILE *iop;
- const fpos_t *pos;
-{
- return (fseek(iop, (long)*pos, SEEK_SET));
-}
diff --git a/lib/libc/stdio/ftell.c b/lib/libc/stdio/ftell.c
deleted file mode 100644
index 9b85ee0..0000000
--- a/lib/libc/stdio/ftell.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)ftell.c 8.2 (Berkeley) 5/4/95";
-#endif
-static const char rcsid[] =
- "$Id: ftell.c,v 1.7 1997/02/22 15:02:07 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <errno.h>
-#include "local.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * ftell: return current offset.
- */
-long
-ftell(fp)
- register FILE *fp;
-{
- register fpos_t pos;
-
- if (fp->_seek == NULL) {
- errno = ESPIPE; /* historic practice */
- return (-1L);
- }
-
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp, __FILE__, __LINE__);
-#endif
- /*
- * Find offset of underlying I/O object, then
- * adjust for buffered bytes.
- */
- if (fp->_flags & __SOFF)
- pos = fp->_offset;
- else {
- pos = (*fp->_seek)(fp->_cookie, (fpos_t)0, SEEK_CUR);
- if (pos == -1) {
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (pos);
- }
- }
- if (fp->_flags & __SRD) {
- /*
- * Reading. Any unread characters (including
- * those from ungetc) cause the position to be
- * smaller than that in the underlying object.
- */
- pos -= fp->_r;
- if (HASUB(fp))
- pos -= fp->_ur;
- } else if (fp->_flags & __SWR && fp->_p != NULL) {
- /*
- * Writing. Any buffered characters cause the
- * position to be greater than that in the
- * underlying object.
- */
- pos += fp->_p - fp->_bf._base;
- }
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (pos);
-}
diff --git a/lib/libc/stdio/funopen.3 b/lib/libc/stdio/funopen.3
deleted file mode 100644
index 90e98d4..0000000
--- a/lib/libc/stdio/funopen.3
+++ /dev/null
@@ -1,169 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)funopen.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt FUNOPEN 3
-.Os
-.Sh NAME
-.Nm funopen ,
-.Nm fropen ,
-.Nm fwopen
-.Nd open a stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft FILE *
-.Fn funopen "const void *cookie" "int (*readfn)(void *, char *, int)" "int (*writefn)(void *, const char *, int)" "fpos_t (*seekfn)(void *, fpos_t, int)" "int (*closefn)(void *)"
-.Ft FILE *
-.Fn fropen "void *cookie" "int (*readfn)(void *, char *, int)"
-.Ft FILE *
-.Fn fwopen "void *cookie" "int (*writefn)(void *, const char *, int)"
-.Sh DESCRIPTION
-The
-.Fn funopen
-function
-associates a stream with up to four
-.Dq Tn I/O No functions .
-Either
-.Fa readfn
-or
-.Fa writefn
-must be specified;
-the others can be given as an appropriately-typed
-.Dv NULL
-pointer.
-These
-.Tn I/O
-functions will be used to read, write, seek and
-close the new stream.
-.Pp
-In general, omitting a function means that any attempt to perform the
-associated operation on the resulting stream will fail.
-If the close function is omitted, closing the stream will flush
-any buffered output and then succeed.
-.Pp
-The calling conventions of
-.Fa readfn ,
-.Fa writefn ,
-.Fa seekfn
-and
-.Fa closefn
-must match those, respectively, of
-.Xr read 2 ,
-.Xr write 2 ,
-.Xr seek 2 ,
-and
-.Xr close 2
-with the single exception that they are passed the
-.Fa cookie
-argument specified to
-.Fn funopen
-in place of the traditional file descriptor argument.
-.Pp
-Read and write
-.Tn I/O
-functions are allowed to change the underlying buffer
-on fully buffered or line buffered streams by calling
-.Xr setvbuf 3 .
-They are also not required to completely fill or empty the buffer.
-They are not, however, allowed to change streams from unbuffered to buffered
-or to change the state of the line buffering flag.
-They must also be prepared to have read or write calls occur on buffers other
-than the one most recently specified.
-.Pp
-All user
-.Tn I/O
-functions can report an error by returning \-1.
-Additionally, all of the functions should set the external variable
-.Va errno
-appropriately if an error occurs.
-.Pp
-An error on
-.Fn closefn
-does not keep the stream open.
-.Pp
-As a convenience, the include file
-.Aq Pa stdio.h
-defines the macros
-.Fn fropen
-and
-.Fn fwopen
-as calls to
-.Fn funopen
-with only a read or write function specified.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn funopen
-returns a
-.Dv FILE
-pointer.
-Otherwise,
-.Dv NULL
-is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Bl -tag -width [EINVAL]
-.It Bq Er EINVAL
-The
-.Fn funopen
-function
-was called without either a read or write function.
-The
-.Fn funopen
-function
-may also fail and set
-.Va errno
-for any of the errors
-specified for the routine
-.Xr malloc 3 .
-.El
-.Sh SEE ALSO
-.Xr fcntl 2 ,
-.Xr open 2 ,
-.Xr fclose 3 ,
-.Xr fopen 3 ,
-.Xr fseek 3 ,
-.Xr setbuf 3
-.Sh HISTORY
-The
-.Fn funopen
-functions first appeared in
-.Bx 4.4 .
-.Sh BUGS
-The
-.Fn funopen
-function
-may not be portable to systems other than
-.Bx .
diff --git a/lib/libc/stdio/funopen.c b/lib/libc/stdio/funopen.c
deleted file mode 100644
index 4d65b68..0000000
--- a/lib/libc/stdio/funopen.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)funopen.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <errno.h>
-#include "local.h"
-
-FILE *
-funopen(cookie, readfn, writefn, seekfn, closefn)
- const void *cookie;
- int (*readfn)(), (*writefn)();
-#if __STDC__
- fpos_t (*seekfn)(void *cookie, fpos_t off, int whence);
-#else
- fpos_t (*seekfn)();
-#endif
- int (*closefn)();
-{
- register FILE *fp;
- int flags;
-
- if (readfn == NULL) {
- if (writefn == NULL) { /* illegal */
- errno = EINVAL;
- return (NULL);
- } else
- flags = __SWR; /* write only */
- } else {
- if (writefn == NULL)
- flags = __SRD; /* read only */
- else
- flags = __SRW; /* read-write */
- }
- if ((fp = __sfp()) == NULL)
- return (NULL);
- fp->_flags = flags;
- fp->_file = -1;
- fp->_cookie = (void *)cookie;
- fp->_read = readfn;
- fp->_write = writefn;
- fp->_seek = seekfn;
- fp->_close = closefn;
- return (fp);
-}
diff --git a/lib/libc/stdio/fvwrite.c b/lib/libc/stdio/fvwrite.c
deleted file mode 100644
index 5061773..0000000
--- a/lib/libc/stdio/fvwrite.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fvwrite.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id: fvwrite.c,v 1.6 1997/12/24 13:17:13 ache Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "local.h"
-#include "fvwrite.h"
-
-/*
- * Write some memory regions. Return zero on success, EOF on error.
- *
- * This routine is large and unsightly, but most of the ugliness due
- * to the three different kinds of output buffering is handled here.
- */
-int
-__sfvwrite(fp, uio)
- register FILE *fp;
- register struct __suio *uio;
-{
- register size_t len;
- register char *p;
- register struct __siov *iov;
- register int w, s;
- char *nl;
- int nlknown, nldist;
-
- if ((len = uio->uio_resid) == 0)
- return (0);
- /* make sure we can write */
- if (cantwrite(fp))
- return (EOF);
-
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))
-
- iov = uio->uio_iov;
- p = iov->iov_base;
- len = iov->iov_len;
- iov++;
-#define GETIOV(extra_work) \
- while (len == 0) { \
- extra_work; \
- p = iov->iov_base; \
- len = iov->iov_len; \
- iov++; \
- }
- if (fp->_flags & __SNBF) {
- /*
- * Unbuffered: write up to BUFSIZ bytes at a time.
- */
- do {
- GETIOV(;);
- w = (*fp->_write)(fp->_cookie, p, MIN(len, BUFSIZ));
- if (w <= 0)
- goto err;
- p += w;
- len -= w;
- } while ((uio->uio_resid -= w) != 0);
- } else if ((fp->_flags & __SLBF) == 0) {
- /*
- * Fully buffered: fill partially full buffer, if any,
- * and then flush. If there is no partial buffer, write
- * one _bf._size byte chunk directly (without copying).
- *
- * String output is a special case: write as many bytes
- * as fit, but pretend we wrote everything. This makes
- * snprintf() return the number of bytes needed, rather
- * than the number used, and avoids its write function
- * (so that the write function can be invalid).
- */
- do {
- GETIOV(;);
- w = fp->_w;
- if (fp->_flags & __SSTR) {
- if (len < w)
- w = len;
- if (w > 0) {
- COPY(w); /* copy MIN(fp->_w,len), */
- fp->_w -= w;
- fp->_p += w;
- }
- w = len; /* but pretend copied all */
- } else if (fp->_p > fp->_bf._base && len > w) {
- /* fill and flush */
- COPY(w);
- /* fp->_w -= w; */ /* unneeded */
- fp->_p += w;
- if (fflush(fp))
- goto err;
- } else if (len >= (w = fp->_bf._size)) {
- /* write directly */
- w = (*fp->_write)(fp->_cookie, p, w);
- if (w <= 0)
- goto err;
- } else {
- /* fill and done */
- w = len;
- COPY(w);
- fp->_w -= w;
- fp->_p += w;
- }
- p += w;
- len -= w;
- } while ((uio->uio_resid -= w) != 0);
- } else {
- /*
- * Line buffered: like fully buffered, but we
- * must check for newlines. Compute the distance
- * to the first newline (including the newline),
- * or `infinity' if there is none, then pretend
- * that the amount to write is MIN(len,nldist).
- */
- nlknown = 0;
- nldist = 0; /* XXX just to keep gcc happy */
- do {
- GETIOV(nlknown = 0);
- if (!nlknown) {
- nl = memchr((void *)p, '\n', len);
- nldist = nl ? nl + 1 - p : len + 1;
- nlknown = 1;
- }
- s = MIN(len, nldist);
- w = fp->_w + fp->_bf._size;
- if (fp->_p > fp->_bf._base && s > w) {
- COPY(w);
- /* fp->_w -= w; */
- fp->_p += w;
- if (fflush(fp))
- goto err;
- } else if (s >= (w = fp->_bf._size)) {
- w = (*fp->_write)(fp->_cookie, p, w);
- if (w <= 0)
- goto err;
- } else {
- w = s;
- COPY(w);
- fp->_w -= w;
- fp->_p += w;
- }
- if ((nldist -= w) == 0) {
- /* copied the newline: flush and forget */
- if (fflush(fp))
- goto err;
- nlknown = 0;
- }
- p += w;
- len -= w;
- } while ((uio->uio_resid -= w) != 0);
- }
- return (0);
-
-err:
- fp->_flags |= __SERR;
- return (EOF);
-}
diff --git a/lib/libc/stdio/fvwrite.h b/lib/libc/stdio/fvwrite.h
deleted file mode 100644
index ec6bc0b..0000000
--- a/lib/libc/stdio/fvwrite.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)fvwrite.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * I/O descriptors for __sfvwrite().
- */
-struct __siov {
- void *iov_base;
- size_t iov_len;
-};
-struct __suio {
- struct __siov *uio_iov;
- int uio_iovcnt;
- int uio_resid;
-};
-
-#if __STDC__ || c_plusplus
-extern int __sfvwrite(FILE *, struct __suio *);
-#else
-extern int __sfvwrite();
-#endif
diff --git a/lib/libc/stdio/fwalk.c b/lib/libc/stdio/fwalk.c
deleted file mode 100644
index 8f91b46..0000000
--- a/lib/libc/stdio/fwalk.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fwalk.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <stdio.h>
-#include "local.h"
-#include "glue.h"
-
-int
-_fwalk(function)
- register int (*function)(FILE *);
-{
- register FILE *fp;
- register int n, ret;
- register struct glue *g;
-
- ret = 0;
- for (g = &__sglue; g != NULL; g = g->next)
- for (fp = g->iobs, n = g->niobs; --n >= 0; fp++)
- if (fp->_flags != 0)
- ret |= (*function)(fp);
- return (ret);
-}
diff --git a/lib/libc/stdio/fwrite.c b/lib/libc/stdio/fwrite.c
deleted file mode 100644
index ba8540d..0000000
--- a/lib/libc/stdio/fwrite.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)fwrite.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include "local.h"
-#include "fvwrite.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * Write `count' objects (each size `size') from memory to the given file.
- * Return the number of whole objects written.
- */
-size_t
-fwrite(buf, size, count, fp)
- const void *buf;
- size_t size, count;
- FILE *fp;
-{
- size_t n;
- struct __suio uio;
- struct __siov iov;
-
- iov.iov_base = (void *)buf;
- uio.uio_resid = iov.iov_len = n = count * size;
- uio.uio_iov = &iov;
- uio.uio_iovcnt = 1;
-
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- /*
- * The usual case is success (__sfvwrite returns 0);
- * skip the divide if this happens, since divides are
- * generally slow and since this occurs whenever size==0.
- */
- if (__sfvwrite(fp, &uio) != 0)
- count = (n - uio.uio_resid) / size;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (count);
-}
diff --git a/lib/libc/stdio/getc.3 b/lib/libc/stdio/getc.3
deleted file mode 100644
index 0c63fbe..0000000
--- a/lib/libc/stdio/getc.3
+++ /dev/null
@@ -1,136 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getc.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETC 3
-.Os
-.Sh NAME
-.Nm fgetc ,
-.Nm getc ,
-.Nm getchar ,
-.Nm getw
-.Nd get next character or word from input stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn fgetc "FILE *stream"
-.Ft int
-.Fn getc "FILE *stream"
-.Ft int
-.Fn getchar
-.Ft int
-.Fn getw "FILE *stream"
-.Sh DESCRIPTION
-The
-.Fn fgetc
-function
-obtains the next input character (if present) from the stream pointed at by
-.Fa stream ,
-or the next character pushed back on the stream via
-.Xr ungetc 3 .
-.Pp
-The
-.Fn getc
-function
-acts essentially identically to
-.Fn fgetc ,
-but is a macro that expands in-line.
-.Pp
-The
-.Fn getchar
-function
-is equivalent to:
-getc with the argument stdin.
-.Pp
-The
-.Fn getw
-function
-obtains the next
-.Em int
-(if present)
-from the stream pointed at by
-.Fa stream .
-.Sh RETURN VALUES
-If successful, these routines return the next requested object
-from the
-.Fa stream .
-If the stream is at end-of-file or a read error occurs,
-the routines return
-.Dv EOF .
-The routines
-.Xr feof 3
-and
-.Xr ferror 3
-must be used to distinguish between end-of-file and error.
-If an error occurs, the global variable
-.Va errno
-is set to indicate the error.
-The end-of-file condition is remembered, even on a terminal, and all
-subsequent attempts to read will return
-.Dv EOF
-until the condition is cleared with
-.Xr clearerr 3 .
-.Sh SEE ALSO
-.Xr ferror 3 ,
-.Xr fopen 3 ,
-.Xr fread 3 ,
-.Xr putc 3 ,
-.Xr ungetc 3
-.Sh STANDARDS
-The
-.Fn fgetc ,
-.Fn getc
-and
-.Fn getchar
-functions
-conform to
-.St -ansiC .
-.Sh BUGS
-Since
-.Dv EOF
-is a valid integer value,
-.Xr feof 3
-and
-.Xr ferror 3
-must be used to check for failure after calling
-.Fn getw .
-The size and byte order of an
-.Em int
-varies from one machine to another, and
-.Fn getw
-is not recommended for portable applications.
-.Pp
diff --git a/lib/libc/stdio/getc.c b/lib/libc/stdio/getc.c
deleted file mode 100644
index ced796b..0000000
--- a/lib/libc/stdio/getc.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)getc.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * A subroutine version of the macro getc.
- */
-#undef getc
-
-int
-getc(fp)
- register FILE *fp;
-{
- int retval;
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- retval = __sgetc(fp);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/getchar.c b/lib/libc/stdio/getchar.c
deleted file mode 100644
index 0bcbd3a..0000000
--- a/lib/libc/stdio/getchar.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)getchar.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * A subroutine version of the macro getchar.
- */
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-#undef getchar
-
-int
-getchar()
-{
- int retval;
-#ifdef _THREAD_SAFE
- _thread_flockfile(stdin,__FILE__,__LINE__);
-#endif
- retval = getc(stdin);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(stdin);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/gets.c b/lib/libc/stdio/gets.c
deleted file mode 100644
index 0c821ea..0000000
--- a/lib/libc/stdio/gets.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)gets.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/cdefs.h>
-
-__warn_references(gets, "warning: this program uses gets(), which is unsafe.");
-
-char *
-gets(buf)
- char *buf;
-{
- register int c;
- register char *s;
- static int warned;
- static char w[] =
- "warning: this program uses gets(), which is unsafe.\n";
-
- if (!warned) {
- (void) write(STDERR_FILENO, w, sizeof(w) - 1);
- warned = 1;
- }
- for (s = buf; (c = getchar()) != '\n';)
- if (c == EOF)
- if (s == buf)
- return (NULL);
- else
- break;
- else
- *s++ = c;
- *s = 0;
- return (buf);
-}
diff --git a/lib/libc/stdio/getw.c b/lib/libc/stdio/getw.c
deleted file mode 100644
index c72756d..0000000
--- a/lib/libc/stdio/getw.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)getw.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-
-int
-getw(fp)
- FILE *fp;
-{
- int x;
-
- return (fread((void *)&x, sizeof(x), 1, fp) == 1 ? x : EOF);
-}
diff --git a/lib/libc/stdio/glue.h b/lib/libc/stdio/glue.h
deleted file mode 100644
index 5dcdaff..0000000
--- a/lib/libc/stdio/glue.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)glue.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * The first few FILEs are statically allocated; others are dynamically
- * allocated and linked in via this glue structure.
- */
-struct glue {
- struct glue *next;
- int niobs;
- FILE *iobs;
-} __sglue;
diff --git a/lib/libc/stdio/local.h b/lib/libc/stdio/local.h
deleted file mode 100644
index cbc07a9..0000000
--- a/lib/libc/stdio/local.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)local.h 8.3 (Berkeley) 7/3/94
- */
-
-/*
- * Information local to this implementation of stdio,
- * in particular, macros and private variables.
- */
-
-extern int __sflush __P((FILE *));
-extern FILE *__sfp __P((void));
-extern int __srefill __P((FILE *));
-extern int __sread __P((void *, char *, int));
-extern int __swrite __P((void *, char const *, int));
-extern fpos_t __sseek __P((void *, fpos_t, int));
-extern int __sclose __P((void *));
-extern void __sinit __P((void));
-extern void _cleanup __P((void));
-extern void (*__cleanup) __P((void));
-extern void __smakebuf __P((FILE *));
-extern int __swhatbuf __P((FILE *, size_t *, int *));
-extern int _fwalk __P((int (*)(FILE *)));
-extern int __swsetup __P((FILE *));
-extern int __sflags __P((const char *, int *));
-
-extern int __sdidinit;
-
-/*
- * Return true iff the given FILE cannot be written now.
- */
-#define cantwrite(fp) \
- ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \
- __swsetup(fp))
-
-/*
- * Test whether the given stdio file has an active ungetc buffer;
- * release such a buffer, without restoring ordinary unread data.
- */
-#define HASUB(fp) ((fp)->_ub._base != NULL)
-#define FREEUB(fp) { \
- if ((fp)->_ub._base != (fp)->_ubuf) \
- free((char *)(fp)->_ub._base); \
- (fp)->_ub._base = NULL; \
-}
-
-/*
- * test for an fgetln() buffer.
- */
-#define HASLB(fp) ((fp)->_lb._base != NULL)
-#define FREELB(fp) { \
- free((char *)(fp)->_lb._base); \
- (fp)->_lb._base = NULL; \
-}
diff --git a/lib/libc/stdio/makebuf.c b/lib/libc/stdio/makebuf.c
deleted file mode 100644
index 7dcbd70..0000000
--- a/lib/libc/stdio/makebuf.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)makebuf.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "local.h"
-
-/*
- * Allocate a file buffer, or switch to unbuffered I/O.
- * Per the ANSI C standard, ALL tty devices default to line buffered.
- *
- * As a side effect, we set __SOPT or __SNPT (en/dis-able fseek
- * optimisation) right after the fstat() that finds the buffer size.
- */
-void
-__smakebuf(fp)
- register FILE *fp;
-{
- register void *p;
- register int flags;
- size_t size;
- int couldbetty;
-
- if (fp->_flags & __SNBF) {
- fp->_bf._base = fp->_p = fp->_nbuf;
- fp->_bf._size = 1;
- return;
- }
- flags = __swhatbuf(fp, &size, &couldbetty);
- if ((p = malloc(size)) == NULL) {
- fp->_flags |= __SNBF;
- fp->_bf._base = fp->_p = fp->_nbuf;
- fp->_bf._size = 1;
- return;
- }
- __cleanup = _cleanup;
- flags |= __SMBF;
- fp->_bf._base = fp->_p = p;
- fp->_bf._size = size;
- if (couldbetty && isatty(fp->_file))
- flags |= __SLBF;
- fp->_flags |= flags;
-}
-
-/*
- * Internal routine to determine `proper' buffering for a file.
- */
-int
-__swhatbuf(fp, bufsize, couldbetty)
- register FILE *fp;
- size_t *bufsize;
- int *couldbetty;
-{
- struct stat st;
-
- if (fp->_file < 0 || fstat(fp->_file, &st) < 0) {
- *couldbetty = 0;
- *bufsize = BUFSIZ;
- return (__SNPT);
- }
-
- /* could be a tty iff it is a character device */
- *couldbetty = (st.st_mode & S_IFMT) == S_IFCHR;
- if (st.st_blksize <= 0) {
- *bufsize = BUFSIZ;
- return (__SNPT);
- }
-
- /*
- * Optimise fseek() only if it is a regular file. (The test for
- * __sseek is mainly paranoia.) It is safe to set _blksize
- * unconditionally; it will only be used if __SOPT is also set.
- */
- *bufsize = st.st_blksize;
- fp->_blksize = st.st_blksize;
- return ((st.st_mode & S_IFMT) == S_IFREG && fp->_seek == __sseek ?
- __SOPT : __SNPT);
-}
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3
deleted file mode 100644
index 28a662d..0000000
--- a/lib/libc/stdio/mktemp.3
+++ /dev/null
@@ -1,158 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mktemp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MKTEMP 3
-.Os
-.Sh NAME
-.Nm mktemp
-.Nd make temporary file name (unique)
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft char *
-.Fn mktemp "char *template"
-.Ft int
-.Fn mkstemp "char *template"
-.Sh DESCRIPTION
-The
-.Fn mktemp
-function
-takes the given file name template and overwrites a portion of it
-to create a file name.
-This file name is unique and suitable for use
-by the application.
-The template may be any file name with some number of
-.Ql X Ns s
-appended
-to it, for example
-.Pa /tmp/temp.XXXX .
-The trailing
-.Ql X Ns s
-are replaced with the current process number and/or a
-unique letter combination.
-The number of unique file names
-.Fn mktemp
-can return depends on the number of
-.Ql X Ns s
-provided; six
-.Ql X Ns s
-will
-result in
-.Fn mktemp
-testing roughly 26 ** 6 combinations.
-.Pp
-The
-.Fn mkstemp
-function
-makes the same replacement to the template and creates the template file,
-mode 0600, returning a file descriptor opened for reading and writing.
-This avoids the race between testing for a file's existence and opening it
-for use.
-.Sh RETURN VALUES
-The
-.Fn mktemp
-function
-returns a pointer to the template on success and
-.Dv NULL
-on failure.
-The
-.Fn mkstemp
-function
-returns \-1 if no suitable file could be created.
-If either call fails an error code is placed in the global variable
-.Va errno .
-.Sh ERRORS
-The
-.Fn mktemp
-and
-.Fn mkstemp
-functions
-may set
-.Va errno
-to one of the following values:
-.Bl -tag -width [ENOTDIR]
-.It Bq Er ENOTDIR
-The pathname portion of the template is not an existing directory.
-.El
-.Pp
-The
-.Fn mktemp
-and
-.Fn mkstemp
-functions
-may also set
-.Va errno
-to any value specified by the
-.Xr stat 2
-function.
-.Pp
-The
-.Fn mkstemp
-function
-may also set
-.Va errno
-to any value specified by the
-.Xr open 2
-function.
-.Sh NOTES
-A common problem that results in a core dump is that the programmer
-passes in a read-only string to
-.Fn mktemp
-or
-.Fn mkstemp .
-This is common with programs that were developed before
-.St -ansiC
-compilers were common.
-For example, calling
-.Fn mkstemp
-with an argument of
-.Qq /tmp/tempfile.XXXXXX
-will result in a core dump due to
-.Fn mkstemp
-attempting to modify the string constant that was given.
-If the program in question makes heavy use of that type
-of function call, you do have the option of compiling the program
-so that it will store string constants in a writable segment of memory.
-See
-.Xr gcc 1
-for more information.
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr getpid 2 ,
-.Xr open 2 ,
-.Xr stat 2
-.Sh HISTORY
-A
-.Nm mktemp
-function appeared in
-.At v7 .
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
deleted file mode 100644
index 19125e6..0000000
--- a/lib/libc/stdio/mktemp.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id: mktemp.c,v 1.6 1997/02/22 15:02:16 peter Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <unistd.h>
-
-static int _gettemp(char *, int *);
-
-int
-mkstemp(path)
- char *path;
-{
- int fd;
-
- return (_gettemp(path, &fd) ? fd : -1);
-}
-
-char *
-mktemp(path)
- char *path;
-{
- return(_gettemp(path, (int *)NULL) ? path : (char *)NULL);
-}
-
-static int
-_gettemp(path, doopen)
- char *path;
- register int *doopen;
-{
- register char *start, *trv;
- struct stat sbuf;
- pid_t pid;
-
- pid = getpid();
- for (trv = path; *trv; ++trv); /* extra X's get set to 0's */
- while (*--trv == 'X') {
- *trv = (pid % 10) + '0';
- pid /= 10;
- }
-
- /*
- * check the target directory; if you have six X's and it
- * doesn't exist this runs for a *very* long time.
- */
- for (start = trv + 1;; --trv) {
- if (trv <= path)
- break;
- if (*trv == '/') {
- *trv = '\0';
- if (stat(path, &sbuf))
- return(0);
- if (!S_ISDIR(sbuf.st_mode)) {
- errno = ENOTDIR;
- return(0);
- }
- *trv = '/';
- break;
- }
- }
-
- for (;;) {
- if (doopen) {
- if ((*doopen =
- open(path, O_CREAT|O_EXCL|O_RDWR, 0600)) >= 0)
- return(1);
- if (errno != EEXIST)
- return(0);
- }
- else if (lstat(path, &sbuf))
- return(errno == ENOENT ? 1 : 0);
-
- /* tricky little algorithm for backward compatibility */
- for (trv = start;;) {
- if (!*trv)
- return(0);
- if (*trv == 'z')
- *trv++ = 'a';
- else {
- if (isdigit(*trv))
- *trv = 'a';
- else
- ++*trv;
- break;
- }
- }
- }
- /*NOTREACHED*/
-}
diff --git a/lib/libc/stdio/perror.c b/lib/libc/stdio/perror.c
deleted file mode 100644
index 91a7dee..0000000
--- a/lib/libc/stdio/perror.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)perror.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-
-void
-perror(s)
- const char *s;
-{
- register struct iovec *v;
- struct iovec iov[4];
-
- v = iov;
- if (s != NULL) {
- v->iov_base = (char *)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(STDERR_FILENO, iov, (v - iov) + 1);
-}
diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3
deleted file mode 100644
index 6d5ad8a..0000000
--- a/lib/libc/stdio/printf.3
+++ /dev/null
@@ -1,666 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)printf.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt PRINTF 3
-.Os
-.Sh NAME
-.Nm printf ,
-.Nm fprintf ,
-.Nm sprintf ,
-.Nm snprintf ,
-.Nm asprintf ,
-.Nm vprintf ,
-.Nm vfprintf,
-.Nm vsprintf ,
-.Nm vsnprintf ,
-.Nm vasprintf
-.Nd formatted output conversion
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn printf "const char *format" ...
-.Ft int
-.Fn fprintf "FILE *stream" "const char *format" ...
-.Ft int
-.Fn sprintf "char *str" "const char *format" ...
-.Ft int
-.Fn snprintf "char *str" "size_t size" "const char *format" ...
-.Ft int
-.Fn asprintf "char **ret" "const char *format" ...
-.Fd #include <stdarg.h>
-.Ft int
-.Fn vprintf "const char *format" "va_list ap"
-.Ft int
-.Fn vfprintf "FILE *stream" "const char *format" "va_list ap"
-.Ft int
-.Fn vsprintf "char *str" "const char *format" "va_list ap"
-.Ft int
-.Fn vsnprintf "char *str" "size_t size" "const char *format" "va_list ap"
-.Ft int
-.Fn vasprintf "char **ret" "const char *format" "va_list ap"
-.Sh DESCRIPTION
-The
-.Fn printf
-family of functions produces output according to a
-.Fa format
-as described below.
-.Fn Printf
-and
-.Fn vprintf
-write output to
-.Em stdout,
-the standard output stream;
-.Fn fprintf
-and
-.Fn vfprintf
-write output to the given output
-.Fa stream ;
-.Fn sprintf ,
-.Fn snprintf ,
-.Fn vsprintf ,
-and
-.Fn vsnprintf
-write to the character string
-.Fa str ;
-and
-.Fn asprintf
-and
-.Fn vasprintf
-dynamically allocate a new string with
-.Xr malloc 3
-/
-.Xr realloc 3 .
-.Pp
-These functions write the output under the control of a
-.Fa format
-string that specifies how subsequent arguments
-(or arguments accessed via the variable-length argument facilities of
-.Xr stdarg 3 )
-are converted for output.
-.Pp
-These functions return
-the number of characters printed
-(not including the trailing
-.Ql \e0
-used to end output to strings).
-.Pp
-.Fn Asprintf
-and
-.Fn vasprintf
-return a pointer to a buffer sufficiently large to hold the
-string in the
-.Fa ret
-argument;
-This pointer should be passed to
-.Xr free 3
-to release the allocated storage when it is no longer needed.
-If sufficient space cannot be allocated,
-.Fn asprintf
-and
-.Fn vasprintf
-will return -1 and set
-.Fa ret
-to be a NULL pointer.
-.Pp
-.Fn Snprintf
-and
-.Fn vsnprintf
-will write at most
-.Fa size Ns \-1
-of the characters printed into the output string
-(the
-.Fa size Ns 'th
-character then gets the terminating
-.Ql \e0 ) ;
-if the return value is greater than or equal to the
-.Fa size
-argument, the string was too short
-and some of the printed characters were discarded.
-.Pp
-.Fn Sprintf
-and
-.Fn vsprintf
-effectively assume an infinite
-.Fa size .
-.Pp
-The format string is composed of zero or more directives:
-ordinary
-.\" multibyte
-characters (not
-.Cm % ) ,
-which are copied unchanged to the output stream;
-and conversion specifications, each of which results
-in fetching zero or more subsequent arguments.
-Each conversion specification is introduced by
-the character
-.Cm % .
-The arguments must correspond properly (after type promotion)
-with the conversion specifier.
-After the
-.Cm % ,
-the following appear in sequence:
-.Bl -bullet
-.It
-An optional field, consisting of a decimal digit string followed by a
-.Cm $ ,
-specifying the next argument to access .
-If this field is not provided, the argument following the last
-argument accessed will be used.
-Arguments are numbered starting at
-.Cm 1 .
-If unaccessed arguments in the format string are interspersed with ones that
-are accessed the results will be indeterminate.
-.It
-Zero or more of the following flags:
-.Bl -hyphen
-.It
-A
-.Cm #
-character
-specifying that the value should be converted to an ``alternate form''.
-For
-.Cm c ,
-.Cm d ,
-.Cm i ,
-.Cm n ,
-.Cm p ,
-.Cm s ,
-and
-.Cm u ,
-conversions, this option has no effect.
-For
-.Cm o
-conversions, the precision of the number is increased to force the first
-character of the output string to a zero (except if a zero value is printed
-with an explicit precision of zero).
-For
-.Cm x
-and
-.Cm X
-conversions, a non-zero result has the string
-.Ql 0x
-(or
-.Ql 0X
-for
-.Cm X
-conversions) prepended to it.
-For
-.Cm e ,
-.Cm E ,
-.Cm f ,
-.Cm g ,
-and
-.Cm G ,
-conversions, the result will always contain a decimal point, even if no
-digits follow it (normally, a decimal point appears in the results of
-those conversions only if a digit follows).
-For
-.Cm g
-and
-.Cm G
-conversions, trailing zeros are not removed from the result as they
-would otherwise be.
-.It
-A zero
-.Sq Cm \&0
-character specifying zero padding.
-For all conversions except
-.Cm n ,
-the converted value is padded on the left with zeros rather than blanks.
-If a precision is given with a numeric conversion
-.Pf ( Cm d ,
-.Cm i ,
-.Cm o ,
-.Cm u ,
-.Cm i ,
-.Cm x ,
-and
-.Cm X ) ,
-the
-.Sq Cm \&0
-flag is ignored.
-.It
-A negative field width flag
-.Sq Cm \-
-indicates the converted value is to be left adjusted on the field boundary.
-Except for
-.Cm n
-conversions, the converted value is padded on the right with blanks,
-rather than on the left with blanks or zeros.
-A
-.Sq Cm \-
-overrides a
-.Sq Cm \&0
-if both are given.
-.It
-A space, specifying that a blank should be left before a positive number
-produced by a signed conversion
-.Pf ( Cm d ,
-.Cm e ,
-.Cm E ,
-.Cm f ,
-.Cm g ,
-.Cm G ,
-or
-.Cm i ) .
-.It
-A
-.Sq Cm +
-character specifying that a sign always be placed before a
-number produced by a signed conversion.
-A
-.Sq Cm +
-overrides a space if both are used.
-.El
-.It
-An optional decimal digit string specifying a minimum field width.
-If the converted value has fewer characters than the field width, it will
-be padded with spaces on the left (or right, if the left-adjustment
-flag has been given) to fill out
-the field width.
-.It
-An optional precision, in the form of a period
-.Sq Cm \&.
-followed by an
-optional digit string. If the digit string is omitted, the precision
-is taken as zero. This gives the minimum number of digits to appear for
-.Cm d ,
-.Cm i ,
-.Cm o ,
-.Cm u ,
-.Cm x ,
-and
-.Cm X
-conversions, the number of digits to appear after the decimal-point for
-.Cm e ,
-.Cm E ,
-and
-.Cm f
-conversions, the maximum number of significant digits for
-.Cm g
-and
-.Cm G
-conversions, or the maximum number of characters to be printed from a
-string for
-.Cm s
-conversions.
-.It
-The optional character
-.Cm h ,
-specifying that a following
-.Cm d ,
-.Cm i ,
-.Cm o ,
-.Cm u ,
-.Cm x ,
-or
-.Cm X
-conversion corresponds to a
-.Em short int
-or
-.Em unsigned short int
-argument, or that a following
-.Cm n
-conversion corresponds to a pointer to a
-.Em short int
-argument.
-.It
-The optional character
-.Cm l
-(ell) specifying that a following
-.Cm d ,
-.Cm i ,
-.Cm o ,
-.Cm u ,
-.Cm x ,
-or
-.Cm X
-conversion applies to a pointer to a
-.Em long int
-or
-.Em unsigned long int
-argument, or that a following
-.Cm n
-conversion corresponds to a pointer to a
-.Em long int
-argument.
-.It
-The optional character
-.Cm q ,
-specifying that a following
-.Cm d ,
-.Cm i ,
-.Cm o ,
-.Cm u ,
-.Cm x ,
-or
-.Cm X
-conversion corresponds to a
-.Em quad int
-or
-.Em unsigned quad int
-argument, or that a following
-.Cm n
-conversion corresponds to a pointer to a
-.Em quad int
-argument.
-.It
-The character
-.Cm L
-specifying that a following
-.Cm e ,
-.Cm E ,
-.Cm f ,
-.Cm g ,
-or
-.Cm G
-conversion corresponds to a
-.Em long double
-argument (but note that long double values are not currently supported
-by the
-.Tn VAX
-and
-.Tn Tahoe
-compilers).
-.It
-A character that specifies the type of conversion to be applied.
-.El
-.Pp
-A field width or precision, or both, may be indicated by
-an asterisk
-.Ql *
-or an asterisk followed by one or more decimal digits and a
-.Ql $
-instead of a
-digit string.
-In this case, an
-.Em int
-argument supplies the field width or precision.
-A negative field width is treated as a left adjustment flag followed by a
-positive field width; a negative precision is treated as though it were
-missing.
-If a single format directive mixes positional (nn$)
-and non-positional arguments, the results are undefined.
-.Pp
-The conversion specifiers and their meanings are:
-.Bl -tag -width "diouxX"
-.It Cm diouxX
-The
-.Em int
-(or appropriate variant) argument is converted to signed decimal
-.Pf ( Cm d
-and
-.Cm i ) ,
-unsigned octal
-.Pq Cm o ,
-unsigned decimal
-.Pq Cm u ,
-or unsigned hexadecimal
-.Pf ( Cm x
-and
-.Cm X )
-notation. The letters
-.Cm abcdef
-are used for
-.Cm x
-conversions; the letters
-.Cm ABCDEF
-are used for
-.Cm X
-conversions.
-The precision, if any, gives the minimum number of digits that must
-appear; if the converted value requires fewer digits, it is padded on
-the left with zeros.
-.It Cm DOU
-The
-.Em long int
-argument is converted to signed decimal, unsigned octal, or unsigned
-decimal, as if the format had been
-.Cm ld ,
-.Cm lo ,
-or
-.Cm lu
-respectively.
-These conversion characters are deprecated, and will eventually disappear.
-.It Cm eE
-The
-.Em double
-argument is rounded and converted in the style
-.Sm off
-.Pf [\-]d Cm \&. No ddd Cm e No \\*(Pmdd
-.Sm on
-where there is one digit before the
-decimal-point character
-and the number of digits after it is equal to the precision;
-if the precision is missing,
-it is taken as 6; if the precision is
-zero, no decimal-point character appears.
-An
-.Cm E
-conversion uses the letter
-.Cm E
-(rather than
-.Cm e )
-to introduce the exponent.
-The exponent always contains at least two digits; if the value is zero,
-the exponent is 00.
-.It Cm f
-The
-.Em double
-argument is rounded and converted to decimal notation in the style
-.Sm off
-.Pf [-]ddd Cm \&. No ddd ,
-.Sm on
-where the number of digits after the decimal-point character
-is equal to the precision specification.
-If the precision is missing, it is taken as 6; if the precision is
-explicitly zero, no decimal-point character appears.
-If a decimal point appears, at least one digit appears before it.
-.It Cm g
-The
-.Em double
-argument is converted in style
-.Cm f
-or
-.Cm e
-(or
-.Cm E
-for
-.Cm G
-conversions).
-The precision specifies the number of significant digits.
-If the precision is missing, 6 digits are given; if the precision is zero,
-it is treated as 1.
-Style
-.Cm e
-is used if the exponent from its conversion is less than -4 or greater than
-or equal to the precision.
-Trailing zeros are removed from the fractional part of the result; a
-decimal point appears only if it is followed by at least one digit.
-.It Cm c
-The
-.Em int
-argument is converted to an
-.Em unsigned char ,
-and the resulting character is written.
-.It Cm s
-The
-.Dq Em char *
-argument is expected to be a pointer to an array of character type (pointer
-to a string).
-Characters from the array are written up to (but not including)
-a terminating
-.Dv NUL
-character;
-if a precision is specified, no more than the number specified are
-written.
-If a precision is given, no null character
-need be present; if the precision is not specified, or is greater than
-the size of the array, the array must contain a terminating
-.Dv NUL
-character.
-.It Cm p
-The
-.Dq Em void *
-pointer argument is printed in hexadecimal (as if by
-.Ql %#x
-or
-.Ql %#lx ) .
-.It Cm n
-The number of characters written so far is stored into the
-integer indicated by the
-.Dq Em int *
-(or variant) pointer argument.
-No argument is converted.
-.It Cm %
-A
-.Ql %
-is written. No argument is converted. The complete conversion specification
-is
-.Ql %% .
-.El
-.Pp
-In no case does a non-existent or small field width cause truncation of
-a field; if the result of a conversion is wider than the field width, the
-field is expanded to contain the conversion result.
-.Pp
-.Sh EXAMPLES
-.br
-To print a date and time in the form `Sunday, July 3, 10:02',
-where
-.Em weekday
-and
-.Em month
-are pointers to strings:
-.Bd -literal -offset indent
-#include <stdio.h>
-fprintf(stdout, "%s, %s %d, %.2d:%.2d\en",
- weekday, month, day, hour, min);
-.Ed
-.Pp
-To print \*(Pi
-to five decimal places:
-.Bd -literal -offset indent
-#include <math.h>
-#include <stdio.h>
-fprintf(stdout, "pi = %.5f\en", 4 * atan(1.0));
-.Ed
-.Pp
-To allocate a 128 byte string and print into it:
-.Bd -literal -offset indent
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-char *newfmt(const char *fmt, ...)
-{
- char *p;
- va_list ap;
- if ((p = malloc(128)) == NULL)
- return (NULL);
- va_start(ap, fmt);
- (void) vsnprintf(p, 128, fmt, ap);
- va_end(ap);
- return (p);
-}
-.Ed
-.Sh SEE ALSO
-.Xr printf 1 ,
-.Xr scanf 3
-.Sh STANDARDS
-The
-.Fn fprintf ,
-.Fn printf ,
-.Fn sprintf ,
-.Fn vprintf ,
-.Fn vfprintf ,
-and
-.Fn vsprintf
-functions
-conform to
-.St -ansiC .
-.Sh HISTORY
-The functions
-.Fn snprintf
-and
-.Fn vsnprintf
-are new to this release.
-.Pp
-The functions
-.Fn asprintf
-and
-.Fn vasprintf
-first appeared in the GNU C library. This implementation is thought
-to be compatable but is not derived from the GNU code. This implementation
-was written by Peter Wemm <peter@FreeBSD.org> and first appeared in
-.Fx 2.2 .
-.Sh BUGS
-The conversion formats
-.Cm \&%D ,
-.Cm \&%O ,
-and
-.Cm %U
-are not standard and
-are provided only for backward compatibility.
-The effect of padding the
-.Cm %p
-format with zeros (either by the
-.Sq Cm 0
-flag or by specifying a precision), and the benign effect (i.e., none)
-of the
-.Sq Cm #
-flag on
-.Cm %n
-and
-.Cm %p
-conversions, as well as other
-nonsensical combinations such as
-.Cm %Ld ,
-are not standard; such combinations
-should be avoided.
-.Pp
-Because
-.Fn sprintf
-and
-.Fn vsprintf
-assume an infinitely long string,
-callers must be careful not to overflow the actual space;
-this is often hard to assure.
-For safety, programmers should use the
-.Fn snprintf
-interface instead.
-Unfortunately, this interface is not portable.
diff --git a/lib/libc/stdio/printf.c b/lib/libc/stdio/printf.c
deleted file mode 100644
index 9711549..0000000
--- a/lib/libc/stdio/printf.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-int
-#if __STDC__
-printf(char const *fmt, ...)
-#else
-printf(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
-{
- int ret;
- va_list ap;
-
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vfprintf(stdout, fmt, ap);
- va_end(ap);
- return (ret);
-}
diff --git a/lib/libc/stdio/putc.3 b/lib/libc/stdio/putc.3
deleted file mode 100644
index fc6e6a7..0000000
--- a/lib/libc/stdio/putc.3
+++ /dev/null
@@ -1,129 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)putc.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt PUTC 3
-.Os
-.Sh NAME
-.Nm fputc ,
-.Nm putc ,
-.Nm putchar ,
-.Nm putw
-.Nd output a character or word to a stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn fputc "int c" "FILE *stream"
-.Ft int
-.Fn putc "int c" "FILE *stream"
-.Ft int
-.Fn putchar "int c"
-.Ft int
-.Fn putw "int w" "FILE *stream"
-.Sh DESCRIPTION
-The
-.Fn fputc
-function
-writes the character
-.Fa c
-(converted to an ``unsigned char'')
-to the output stream pointed to by
-.Fa stream .
-.Pp
-.Fn Putc
-acts essentially identically to
-.Fn fputc ,
-but is a macro that expands in-line. It may evaluate
-.Fa stream
-more than once, so arguments given to
-.Fn putc
-should not be expressions with potential side effects.
-.Pp
-.Fn Putchar
-is identical to
-.Fn putc
-with an output stream of
-.Em stdout .
-.Pp
-The
-.Fn putw
-function
-writes the specified
-.Em int
-to the named output
-.Fa stream .
-.Sh RETURN VALUES
-The functions,
-.Fn fputc ,
-.Fn putc
-and
-.Fn putchar
-return the character written.
-If an error occurs, the value
-.Dv EOF
-is returned.
-The
-.Fn putw
-function
-returns 0 on success;
-.Dv EOF
-is returned if
-a write error occurs,
-or if an attempt is made to write a read-only stream.
-.Sh SEE ALSO
-.Xr ferror 3 ,
-.Xr fopen 3 ,
-.Xr getc 3 ,
-.Xr stdio 3
-.Sh STANDARDS
-The functions
-.Fn fputc ,
-.Fn putc ,
-and
-.Fn putchar ,
-conform to
-.St -ansiC .
-A function
-.Fn putw
-function appeared in
-.At v6 .
-.Sh BUGS
-The size and byte order of an
-.Em int
-varies from one machine to another, and
-.Fn putw
-is not recommended for portable applications.
diff --git a/lib/libc/stdio/putc.c b/lib/libc/stdio/putc.c
deleted file mode 100644
index a1b0814..0000000
--- a/lib/libc/stdio/putc.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)putc.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * A subroutine version of the macro putc.
- */
-#undef putc
-
-int
-putc(c, fp)
- int c;
- register FILE *fp;
-{
- int retval;
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- retval = __sputc(c, fp);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/putchar.c b/lib/libc/stdio/putchar.c
deleted file mode 100644
index 99439ac..0000000
--- a/lib/libc/stdio/putchar.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)putchar.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-#undef putchar
-
-/*
- * A subroutine version of the macro putchar
- */
-int
-putchar(c)
- int c;
-{
- int retval;
- register FILE *so = stdout;
-
-#ifdef _THREAD_SAFE
- _thread_flockfile(so,__FILE__,__LINE__);
-#endif
- retval = __sputc(c, so);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(so);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/puts.c b/lib/libc/stdio/puts.c
deleted file mode 100644
index 91a20de..0000000
--- a/lib/libc/stdio/puts.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)puts.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-#include "fvwrite.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * Write the given string to stdout, appending a newline.
- */
-int
-puts(s)
- char const *s;
-{
- int retval;
- size_t c = strlen(s);
- struct __suio uio;
- struct __siov iov[2];
-
- iov[0].iov_base = (void *)s;
- iov[0].iov_len = c;
- iov[1].iov_base = "\n";
- iov[1].iov_len = 1;
- uio.uio_resid = c + 1;
- uio.uio_iov = &iov[0];
- uio.uio_iovcnt = 2;
-#ifdef _THREAD_SAFE
- _thread_flockfile(stdout,__FILE__,__LINE__);
-#endif
- retval = __sfvwrite(stdout, &uio) ? EOF : '\n';
-#ifdef _THREAD_SAFE
- _thread_funlockfile(stdout);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/putw.c b/lib/libc/stdio/putw.c
deleted file mode 100644
index 946a311..0000000
--- a/lib/libc/stdio/putw.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)putw.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include "fvwrite.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-int
-putw(w, fp)
- int w;
- FILE *fp;
-{
- int retval;
- struct __suio uio;
- struct __siov iov;
-
- iov.iov_base = &w;
- iov.iov_len = uio.uio_resid = sizeof(w);
- uio.uio_iov = &iov;
- uio.uio_iovcnt = 1;
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- retval = __sfvwrite(fp, &uio);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/refill.c b/lib/libc/stdio/refill.c
deleted file mode 100644
index f0583f7..0000000
--- a/lib/libc/stdio/refill.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)refill.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "local.h"
-
-static int lflush __P((FILE *));
-
-static int
-lflush(fp)
- FILE *fp;
-{
-
- if ((fp->_flags & (__SLBF|__SWR)) == (__SLBF|__SWR))
- return (__sflush(fp));
- return (0);
-}
-
-/*
- * Refill a stdio buffer.
- * Return EOF on eof or error, 0 otherwise.
- */
-int
-__srefill(fp)
- register FILE *fp;
-{
-
- /* make sure stdio is set up */
- if (!__sdidinit)
- __sinit();
-
- fp->_r = 0; /* largely a convenience for callers */
-
- /* SysV does not make this test; take it out for compatibility */
- if (fp->_flags & __SEOF)
- return (EOF);
-
- /* if not already reading, have to be reading and writing */
- if ((fp->_flags & __SRD) == 0) {
- if ((fp->_flags & __SRW) == 0) {
- errno = EBADF;
- return (EOF);
- }
- /* switch to reading */
- if (fp->_flags & __SWR) {
- if (__sflush(fp))
- return (EOF);
- fp->_flags &= ~__SWR;
- fp->_w = 0;
- fp->_lbfsize = 0;
- }
- fp->_flags |= __SRD;
- } else {
- /*
- * We were reading. If there is an ungetc buffer,
- * we must have been reading from that. Drop it,
- * restoring the previous buffer (if any). If there
- * is anything in that buffer, return.
- */
- if (HASUB(fp)) {
- FREEUB(fp);
- if ((fp->_r = fp->_ur) != 0) {
- fp->_p = fp->_up;
- return (0);
- }
- }
- }
-
- if (fp->_bf._base == NULL)
- __smakebuf(fp);
-
- /*
- * Before reading from a line buffered or unbuffered file,
- * flush all line buffered output files, per the ANSI C
- * standard.
- */
- if (fp->_flags & (__SLBF|__SNBF))
- (void) _fwalk(lflush);
- fp->_p = fp->_bf._base;
- fp->_r = (*fp->_read)(fp->_cookie, (char *)fp->_p, fp->_bf._size);
- fp->_flags &= ~__SMOD; /* buffer contents are again pristine */
- if (fp->_r <= 0) {
- if (fp->_r == 0)
- fp->_flags |= __SEOF;
- else {
- fp->_r = 0;
- fp->_flags |= __SERR;
- }
- return (EOF);
- }
- return (0);
-}
diff --git a/lib/libc/stdio/remove.3 b/lib/libc/stdio/remove.3
deleted file mode 100644
index 7d6fc7d..0000000
--- a/lib/libc/stdio/remove.3
+++ /dev/null
@@ -1,78 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)remove.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt REMOVE 3
-.Os
-.Sh NAME
-.Nm remove
-.Nd remove directory entry
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn remove "const char *path"
-.Sh DESCRIPTION
-The
-.Fn remove
-function
-is an alias for the
-.Xr unlink 2
-system call.
-It deletes the file referenced by
-.Fa path .
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn remove
-returns 0.
-Otherwise, \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn remove
-function
-may fail and set
-.Va errno
-for any of the errors specified for the routine
-.Xr unlink 2 .
-.Sh SEE ALSO
-.Xr unlink 2
-.Sh STANDARDS
-The
-.Fn remove
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/stdio/remove.c b/lib/libc/stdio/remove.c
deleted file mode 100644
index 6a25563..0000000
--- a/lib/libc/stdio/remove.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)remove.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <unistd.h>
-#include <stdio.h>
-
-int
-remove(file)
- const char *file;
-{
- return (unlink(file));
-}
diff --git a/lib/libc/stdio/rewind.c b/lib/libc/stdio/rewind.c
deleted file mode 100644
index f6609d6..0000000
--- a/lib/libc/stdio/rewind.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)rewind.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-void
-rewind(fp)
- register FILE *fp;
-{
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- (void) fseek(fp, 0L, SEEK_SET);
- clearerr(fp);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- errno = 0; /* not required, but seems reasonable */
-}
diff --git a/lib/libc/stdio/rget.c b/lib/libc/stdio/rget.c
deleted file mode 100644
index 45d817d..0000000
--- a/lib/libc/stdio/rget.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)rget.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include "local.h"
-
-int
-__srefill(FILE *);
-
-/*
- * Handle getc() when the buffer ran out:
- * Refill, then return the first character
- * in the newly-filled buffer.
- */
-int __srget(fp)
- register FILE *fp;
-{
- if (__srefill(fp) == 0) {
- fp->_r--;
- return (*fp->_p++);
- }
- return (EOF);
-}
diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3
deleted file mode 100644
index a9bbc41..0000000
--- a/lib/libc/stdio/scanf.3
+++ /dev/null
@@ -1,439 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)scanf.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt SCANF 3
-.Os
-.Sh NAME
-.Nm scanf ,
-.Nm fscanf ,
-.Nm sscanf ,
-.Nm vscanf ,
-.Nm vsscanf ,
-.Nm vfscanf
-.Nd input format conversion
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn scanf "const char *format" ...
-.Ft int
-.Fn fscanf "FILE *stream" "const char *format" ...
-.Ft int
-.Fn sscanf "const char *str" "const char *format" ...
-.Fd #include <stdarg.h>
-.Ft int
-.Fn vscanf "const char *format" "va_list ap"
-.Ft int
-.Fn vsscanf "const char *str" "const char *format" "va_list ap"
-.Ft int
-.Fn vfscanf "FILE *stream" "const char *format" "va_list ap"
-.Sh DESCRIPTION
-The
-.Fn scanf
-family of functions scans input according to a
-.Fa format
-as described below.
-This format may contain
-.Em conversion specifiers ;
-the results from such conversions, if any,
-are stored through the
-.Em pointer
-arguments.
-The
-.Fn scanf
-function
-reads input from the standard input stream
-.Em stdin ,
-.Fn fscanf
-reads input from the stream pointer
-.Fa stream ,
-and
-.Fn sscanf
-reads its input from the character string pointed to by
-.Fa str .
-The
-.Fn vfscanf
-function
-is analogous to
-.Xr vfprintf 3
-and reads input from the stream pointer
-.Fa stream
-using a variable argument list of pointers (see
-.Xr stdarg 3 ) .
-The
-.Fn vscanf
-function scans a variable argument list from the standard input and
-the
-.Fn vsscanf
-function scans it from a string;
-these are analogous to
-the
-.Fn vprintf
-and
-.Fn vsprintf
-functions respectively.
-Each successive
-.Em pointer
-argument must correspond properly with
-each successive conversion specifier
-(but see `suppression' below).
-All conversions are introduced by the
-.Cm %
-(percent sign) character.
-The
-.Fa format
-string
-may also contain other characters.
-White space (such as blanks, tabs, or newlines) in the
-.Fa format
-string match any amount of white space, including none, in the input.
-Everything else
-matches only itself.
-Scanning stops
-when an input character does not match such a format character.
-Scanning also stops
-when an input conversion cannot be made (see below).
-.Sh CONVERSIONS
-Following the
-.Cm %
-character introducing a conversion
-there may be a number of
-.Em flag
-characters, as follows:
-.Bl -tag -width indent
-.It Cm *
-Suppresses assignment.
-The conversion that follows occurs as usual, but no pointer is used;
-the result of the conversion is simply discarded.
-.It Cm h
-Indicates that the conversion will be one of
-.Cm dioux
-or
-.Cm n
-and the next pointer is a pointer to a
-.Em short int
-(rather than
-.Em int ) .
-.It Cm l
-Indicates either that the conversion will be one of
-.Cm dioux
-or
-.Cm n
-and the next pointer is a pointer to a
-.Em long int
-(rather than
-.Em int ) ,
-or that the conversion will be one of
-.Cm efg
-and the next pointer is a pointer to
-.Em double
-(rather than
-.Em float ) .
-.It Cm L
-Indicates that the conversion will be
-.Cm efg
-and the next pointer is a pointer to
-.Em long double .
-(This type is not implemented; the
-.Cm L
-flag is currently ignored.)
-.It Cm q
-Indicates either that the conversion will be one of
-.Cm dioux
-or
-.Cm n
-and the next pointer is a pointer to a
-.Em long long int
-(rather than
-.Em int ) ,
-.El
-.Pp
-In addition to these flags,
-there may be an optional maximum field width,
-expressed as a decimal integer,
-between the
-.Cm %
-and the conversion.
-If no width is given,
-a default of `infinity' is used (with one exception, below);
-otherwise at most this many characters are scanned
-in processing the conversion.
-Before conversion begins,
-most conversions skip white space;
-this white space is not counted against the field width.
-.Pp
-The following conversions are available:
-.Bl -tag -width XXXX
-.It Cm %
-Matches a literal `%'.
-That is, `%\&%' in the format string
-matches a single input `%' character.
-No conversion is done, and assignment does not occur.
-.It Cm d
-Matches an optionally signed decimal integer;
-the next pointer must be a pointer to
-.Em int .
-.It Cm D
-Equivalent to
-.Cm ld ;
-this exists only for backwards compatibility.
-.It Cm i
-Matches an optionally signed integer;
-the next pointer must be a pointer to
-.Em int .
-The integer is read in base 16 if it begins
-with
-.Ql 0x
-or
-.Ql 0X ,
-in base 8 if it begins with
-.Ql 0 ,
-and in base 10 otherwise.
-Only characters that correspond to the base are used.
-.It Cm o
-Matches an octal integer;
-the next pointer must be a pointer to
-.Em unsigned int .
-.It Cm O
-Equivalent to
-.Cm lo ;
-this exists for backwards compatibility.
-.It Cm u
-Matches an optionally signed decimal integer;
-the next pointer must be a pointer to
-.Em unsigned int .
-.It Cm x
-Matches an optionally signed hexadecimal integer;
-the next pointer must be a pointer to
-.Em unsigned int .
-.It Cm X
-Equivalent to
-.Cm lx ;
-this violates the
-.St -ansiC ,
-but is backwards compatible with previous
-.Ux
-systems.
-.It Cm f
-Matches an optionally signed floating-point number;
-the next pointer must be a pointer to
-.Em float .
-.It Cm e
-Equivalent to
-.Cm f .
-.It Cm g
-Equivalent to
-.Cm f .
-.It Cm E
-Equivalent to
-.Cm lf ;
-this violates the
-.St -ansiC ,
-but is backwards compatible with previous
-.Ux
-systems.
-.It Cm F
-Equivalent to
-.Cm lf ;
-this exists only for backwards compatibility.
-.It Cm s
-Matches a sequence of non-white-space characters;
-the next pointer must be a pointer to
-.Em char ,
-and the array must be large enough to accept all the sequence and the
-terminating
-.Dv NUL
-character.
-The input string stops at white space
-or at the maximum field width, whichever occurs first.
-.It Cm c
-Matches a sequence of
-.Em width
-count
-characters (default 1);
-the next pointer must be a pointer to
-.Em char ,
-and there must be enough room for all the characters
-(no terminating
-.Dv NUL
-is added).
-The usual skip of leading white space is suppressed.
-To skip white space first, use an explicit space in the format.
-.It Cm \&[
-Matches a nonempty sequence of characters from the specified set
-of accepted characters;
-the next pointer must be a pointer to
-.Em char ,
-and there must be enough room for all the characters in the string,
-plus a terminating
-.Dv NUL
-character.
-The usual skip of leading white space is suppressed.
-The string is to be made up of characters in
-(or not in)
-a particular set;
-the set is defined by the characters between the open bracket
-.Cm [
-character
-and a close bracket
-.Cm ]
-character.
-The set
-.Em excludes
-those characters
-if the first character after the open bracket is a circumflex
-.Cm ^ .
-To include a close bracket in the set,
-make it the first character after the open bracket
-or the circumflex;
-any other position will end the set.
-The hyphen character
-.Cm -
-is also special;
-when placed between two other characters,
-it adds all intervening characters to the set.
-To include a hyphen,
-make it the last character before the final close bracket.
-For instance,
-.Ql [^]0-9-]
-means the set `everything except close bracket, zero through nine,
-and hyphen'.
-The string ends with the appearance of a character not in the
-(or, with a circumflex, in) set
-or when the field width runs out.
-.It Cm p
-Matches a pointer value (as printed by
-.Ql %p
-in
-.Xr printf 3 ) ;
-the next pointer must be a pointer to
-.Em void .
-.It Cm n
-Nothing is expected;
-instead, the number of characters consumed thus far from the input
-is stored through the next pointer,
-which must be a pointer to
-.Em int .
-This is
-.Em not
-a conversion, although it can be suppressed with the
-.Cm *
-flag.
-.El
-.Pp
-For backwards compatibility,
-other conversion characters (except
-.Ql \e0 )
-are taken as if they were
-.Ql %d
-or, if uppercase,
-.Ql %ld ,
-and a `conversion' of
-.Ql %\e0
-causes an immediate return of
-.Dv EOF .
-The
-.Cm F
-and
-.Cm X
-conversions will be changed in the future
-to conform to the
-.Tn ANSI
-C standard,
-after which they will act like
-.Cm f
-and
-.Cm x
-respectively.
-.Pp
-.Sh RETURN VALUES
-These
-functions
-return
-the number of input items assigned, which can be fewer than provided
-for, or even zero, in the event of a matching failure.
-Zero
-indicates that, while there was input available,
-no conversions were assigned;
-typically this is due to an invalid input character,
-such as an alphabetic character for a
-.Ql %d
-conversion.
-The value
-.Dv EOF
-is returned if an input failure occurs before any conversion such as an
-end-of-file occurs. If an error or end-of-file occurs after conversion
-has begun,
-the number of conversions which were successfully completed is returned.
-.Sh SEE ALSO
-.Xr getc 3 ,
-.Xr printf 3 ,
-.Xr strtod 3 ,
-.Xr strtol 3 ,
-.Xr strtoul 3
-.Sh STANDARDS
-The functions
-.Fn fscanf ,
-.Fn scanf ,
-and
-.Fn sscanf
-conform to
-.St -ansiC .
-.Sh HISTORY
-The functions
-.Fn vscanf ,
-.Fn vsscanf
-and
-.Fn vfscanf
-are new to this release.
-.Sh BUGS
-The current situation with
-.Cm %F
-and
-.Cm %X
-conversions is unfortunate.
-.Pp
-All of the backwards compatibility formats will be removed in the future.
-.Pp
-Numerical strings are truncated to 512 characters; for example,
-.Cm %f
-and
-.Cm %d
-are implicitly
-.Cm %512f
-and
-.Cm %512d .
diff --git a/lib/libc/stdio/scanf.c b/lib/libc/stdio/scanf.c
deleted file mode 100644
index 7a8bd65..0000000
--- a/lib/libc/stdio/scanf.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)scanf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-#if __STDC__
-int
-scanf(char const *fmt, ...)
-#else
-int
-scanf(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
-{
- int ret;
- va_list ap;
-
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
-#ifdef _THREAD_SAFE
- _thread_flockfile(stdin,__FILE__,__LINE__);
-#endif
- ret = __svfscanf(stdin, fmt, ap);
- va_end(ap);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(stdin);
-#endif
- return (ret);
-}
diff --git a/lib/libc/stdio/setbuf.3 b/lib/libc/stdio/setbuf.3
deleted file mode 100644
index ec5bbd8..0000000
--- a/lib/libc/stdio/setbuf.3
+++ /dev/null
@@ -1,202 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setbuf.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SETBUF 3
-.Os BSD 4
-.Sh NAME
-.Nm setbuf ,
-.Nm setbuffer ,
-.Nm setlinebuf ,
-.Nm setvbuf
-.Nd stream buffering operations
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft void
-.Fn setbuf "FILE *stream" "char *buf"
-.Ft void
-.Fn setbuffer "FILE *stream" "char *buf" "int size"
-.Ft int
-.Fn setlinebuf "FILE *stream"
-.Ft int
-.Fn setvbuf "FILE *stream" "char *buf" "int mode" "size_t size"
-.Sh DESCRIPTION
-The three types of buffering available are unbuffered, block buffered,
-and line buffered.
-When an output stream is unbuffered, information appears on the
-destination file or terminal as soon as written;
-when it is block buffered many characters are saved up and written as a block;
-when it is line buffered characters are saved up until a newline is
-output or input is read from any stream attached to a terminal device
-(typically stdin).
-The function
-.Xr fflush 3
-may be used to force the block out early.
-(See
-.Xr fclose 3 . )
-.Pp
-Normally all files are block buffered.
-When the first
-.Tn I/O
-operation occurs on a file,
-.Xr malloc 3
-is called,
-and an optimally-sized buffer is obtained.
-If a stream refers to a terminal
-(as
-.Em stdout
-normally does) it is line buffered.
-The standard error stream
-.Em stderr
-is always unbuffered.
-.Pp
-The
-.Fn setvbuf
-function
-may be used to alter the buffering behavior of a stream.
-The
-.Fa mode
-parameter must be one of the following three macros:
-.Bl -tag -width _IOFBF -offset indent
-.It Dv _IONBF
-unbuffered
-.It Dv _IOLBF
-line buffered
-.It Dv _IOFBF
-fully buffered
-.El
-.Pp
-The
-.Fa size
-parameter may be given as zero
-to obtain deferred optimal-size buffer allocation as usual.
-If it is not zero,
-then except for unbuffered files, the
-.Fa buf
-argument should point to a buffer at least
-.Fa size
-bytes long;
-this buffer will be used instead of the current buffer.
-(If the
-.Fa size
-argument
-is not zero but
-.Fa buf
-is
-.Dv NULL ,
-a buffer of the given size will be allocated immediately,
-and released on close.
-This is an extension to ANSI C;
-portable code should use a size of 0 with any
-.Dv NULL
-buffer.)
-.Pp
-The
-.Fn setvbuf
-function may be used at any time,
-but may have peculiar side effects
-(such as discarding input or flushing output)
-if the stream is ``active''.
-Portable applications should call it only once on any given stream,
-and before any
-.Tn I/O
-is performed.
-.Pp
-The other three calls are, in effect, simply aliases for calls to
-.Fn setvbuf .
-Except for the lack of a return value, the
-.Fn setbuf
-function is exactly equivalent to the call
-.Pp
-.Dl "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
-.Pp
-The
-.Fn setbuffer
-function
-is the same, except that the size of the buffer is up to the caller,
-rather than being determined by the default
-.Dv BUFSIZ .
-The
-.Fn setlinebuf
-function
-is exactly equivalent to the call:
-.Pp
-.Dl "setvbuf(stream, (char *)NULL, _IOLBF, 0);"
-.Sh RETURN VALUES
-The
-.Fn setvbuf
-function returns 0 on success, or
-.Dv EOF
-if the request cannot be honored
-(note that the stream is still functional in this case).
-.Pp
-The
-.Fn setlinebuf
-function returns what the equivalent
-.Fn setvbuf
-would have returned.
-.Sh SEE ALSO
-.Xr fclose 3 ,
-.Xr fopen 3 ,
-.Xr fread 3 ,
-.Xr malloc 3 ,
-.Xr printf 3 ,
-.Xr puts 3
-.Sh STANDARDS
-The
-.Fn setbuf
-and
-.Fn setvbuf
-functions
-conform to
-.St -ansiC .
-.Sh BUGS
-The
-.Fn setbuffer
-and
-.Fn setlinebuf
-functions are not portable to versions of
-.Bx
-before
-.Bx 4.2 .
-On
-.Bx 4.2
-and
-.Bx 4.3
-systems,
-.Fn setbuf
-always uses a suboptimal buffer size and should be avoided.
diff --git a/lib/libc/stdio/setbuf.c b/lib/libc/stdio/setbuf.c
deleted file mode 100644
index b07bce9..0000000
--- a/lib/libc/stdio/setbuf.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setbuf.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include "local.h"
-
-void
-setbuf(fp, buf)
- FILE *fp;
- char *buf;
-{
- (void) setvbuf(fp, buf, buf ? _IOFBF : _IONBF, BUFSIZ);
-}
diff --git a/lib/libc/stdio/setbuffer.c b/lib/libc/stdio/setbuffer.c
deleted file mode 100644
index d272177..0000000
--- a/lib/libc/stdio/setbuffer.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)setbuffer.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-
-void
-setbuffer(fp, buf, size)
- register FILE *fp;
- char *buf;
- int size;
-{
-
- (void)setvbuf(fp, buf, buf ? _IOFBF : _IONBF, (size_t)size);
-}
-
-/*
- * set line buffering
- */
-int
-setlinebuf(fp)
- FILE *fp;
-{
-
- return (setvbuf(fp, (char *)NULL, _IOLBF, (size_t)0));
-}
diff --git a/lib/libc/stdio/setvbuf.c b/lib/libc/stdio/setvbuf.c
deleted file mode 100644
index 9cc6bb6..0000000
--- a/lib/libc/stdio/setvbuf.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)setvbuf.c 8.2 (Berkeley) 11/16/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "local.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * Set one of the three kinds of buffering, optionally including
- * a buffer.
- */
-int
-setvbuf(fp, buf, mode, size)
- register FILE *fp;
- char *buf;
- register int mode;
- register size_t size;
-{
- register int ret, flags;
- size_t iosize;
- int ttyflag;
-
- /*
- * Verify arguments. The `int' limit on `size' is due to this
- * particular implementation. Note, buf and size are ignored
- * when setting _IONBF.
- */
- if (mode != _IONBF)
- if ((mode != _IOFBF && mode != _IOLBF) || (int)size < 0)
- return (EOF);
-
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- /*
- * Write current buffer, if any. Discard unread input (including
- * ungetc data), cancel line buffering, and free old buffer if
- * malloc()ed. We also clear any eof condition, as if this were
- * a seek.
- */
- ret = 0;
- (void)__sflush(fp);
- if (HASUB(fp))
- FREEUB(fp);
- fp->_r = fp->_lbfsize = 0;
- flags = fp->_flags;
- if (flags & __SMBF)
- free((void *)fp->_bf._base);
- flags &= ~(__SLBF | __SNBF | __SMBF | __SOPT | __SNPT | __SEOF);
-
- /* If setting unbuffered mode, skip all the hard work. */
- if (mode == _IONBF)
- goto nbf;
-
- /*
- * Find optimal I/O size for seek optimization. This also returns
- * a `tty flag' to suggest that we check isatty(fd), but we do not
- * care since our caller told us how to buffer.
- */
- flags |= __swhatbuf(fp, &iosize, &ttyflag);
- if (size == 0) {
- buf = NULL; /* force local allocation */
- size = iosize;
- }
-
- /* Allocate buffer if needed. */
- if (buf == NULL) {
- if ((buf = malloc(size)) == NULL) {
- /*
- * Unable to honor user's request. We will return
- * failure, but try again with file system size.
- */
- ret = EOF;
- if (size != iosize) {
- size = iosize;
- buf = malloc(size);
- }
- }
- if (buf == NULL) {
- /* No luck; switch to unbuffered I/O. */
-nbf:
- fp->_flags = flags | __SNBF;
- fp->_w = 0;
- fp->_bf._base = fp->_p = fp->_nbuf;
- fp->_bf._size = 1;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (ret);
- }
- flags |= __SMBF;
- }
-
- /*
- * Kill any seek optimization if the buffer is not the
- * right size.
- *
- * SHOULD WE ALLOW MULTIPLES HERE (i.e., ok iff (size % iosize) == 0)?
- */
- if (size != iosize)
- flags |= __SNPT;
-
- /*
- * Fix up the FILE fields, and set __cleanup for output flush on
- * exit (since we are buffered in some way).
- */
- if (mode == _IOLBF)
- flags |= __SLBF;
- fp->_flags = flags;
- fp->_bf._base = fp->_p = (unsigned char *)buf;
- fp->_bf._size = size;
- /* fp->_lbfsize is still 0 */
- if (flags & __SWR) {
- /*
- * Begin or continue writing: see __swsetup(). Note
- * that __SNBF is impossible (it was handled earlier).
- */
- if (flags & __SLBF) {
- fp->_w = 0;
- fp->_lbfsize = -fp->_bf._size;
- } else
- fp->_w = size;
- } else {
- /* begin/continue reading, or stay in intermediate state */
- fp->_w = 0;
- }
- __cleanup = _cleanup;
-
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (ret);
-}
diff --git a/lib/libc/stdio/snprintf.c b/lib/libc/stdio/snprintf.c
deleted file mode 100644
index a4c04d9..0000000
--- a/lib/libc/stdio/snprintf.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id: snprintf.c,v 1.10 1997/12/24 23:54:13 ache Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <limits.h>
-#include <stdio.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#if __STDC__
-int
-snprintf(char *str, size_t n, char const *fmt, ...)
-#else
-int
-snprintf(str, n, fmt, va_alist)
- char *str;
- size_t n;
- char *fmt;
- va_dcl
-#endif
-{
- size_t on;
- int ret;
- va_list ap;
- FILE f;
-
- on = n;
- if (n != 0)
- n--;
- if (n > INT_MAX)
- n = INT_MAX;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- f._file = -1;
- f._flags = __SWR | __SSTR;
- f._bf._base = f._p = (unsigned char *)str;
- f._bf._size = f._w = n;
- ret = vfprintf(&f, fmt, ap);
- if (on > 0)
- *f._p = '\0';
- va_end(ap);
- return (ret);
-}
diff --git a/lib/libc/stdio/sprintf.c b/lib/libc/stdio/sprintf.c
deleted file mode 100644
index fb0514d..0000000
--- a/lib/libc/stdio/sprintf.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)sprintf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#include <limits.h>
-#include "local.h"
-
-int
-#if __STDC__
-sprintf(char *str, char const *fmt, ...)
-#else
-sprintf(str, fmt, va_alist)
- char *str;
- char *fmt;
- va_dcl
-#endif
-{
- int ret;
- va_list ap;
- FILE f;
-
- f._file = -1;
- f._flags = __SWR | __SSTR;
- f._bf._base = f._p = (unsigned char *)str;
- f._bf._size = f._w = INT_MAX;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vfprintf(&f, fmt, ap);
- va_end(ap);
- *f._p = 0;
- return (ret);
-}
diff --git a/lib/libc/stdio/sscanf.c b/lib/libc/stdio/sscanf.c
deleted file mode 100644
index d114ae3..0000000
--- a/lib/libc/stdio/sscanf.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)sscanf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#include "local.h"
-
-static int eofread __P((void *, char *, int));
-
-/* ARGSUSED */
-static int
-eofread(cookie, buf, len)
- void *cookie;
- char *buf;
- int len;
-{
-
- return (0);
-}
-
-#if __STDC__
-int
-sscanf(const char *str, char const *fmt, ...)
-#else
-int
-sscanf(str, fmt, va_alist)
- char *str;
- char *fmt;
- va_dcl
-#endif
-{
- int ret;
- va_list ap;
- FILE f;
-
- f._file = -1;
- f._flags = __SRD;
- f._bf._base = f._p = (unsigned char *)str;
- f._bf._size = f._r = strlen(str);
- f._read = eofread;
- f._ub._base = NULL;
- f._lb._base = NULL;
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = __svfscanf(&f, fmt, ap);
- va_end(ap);
- return (ret);
-}
diff --git a/lib/libc/stdio/stdio.3 b/lib/libc/stdio/stdio.3
deleted file mode 100644
index 81a6970..0000000
--- a/lib/libc/stdio/stdio.3
+++ /dev/null
@@ -1,287 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)stdio.3 8.7 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt STDIO 3
-.Os BSD 4
-.Sh NAME
-.Nm stdio
-.Nd standard input/output library functions
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Fd FILE *stdin;
-.Fd FILE *stdout;
-.Fd FILE *stderr;
-.Sh DESCRIPTION
-The standard
-.Tn I/O
-library provides a simple and efficient buffered stream
-.Tn I/O
-interface.
-Input and output is mapped into logical data streams
-and the physical
-.Tn I/O
-characteristics are concealed. The functions and macros are listed
-below; more information is available from the individual man pages.
-.Pp
-A stream is associated with an external file (which may be a physical
-device) by
-.Em opening
-a file, which may involve creating a new file. Creating an
-existing file causes its former contents to be discarded.
-If a file can support positioning requests (such as a disk file, as opposed
-to a terminal) then a
-.Em file position indicator
-associated with the stream is positioned at the start of the file (byte
-zero), unless the file is opened with append mode. If append mode
-is used, the position indicator will be placed the end-of-file.
-The position indicator is maintained by subsequent reads, writes
-and positioning requests. All input occurs as if the characters
-were read by successive calls to the
-.Xr fgetc 3
-function; all output takes place as if all characters were
-read by successive calls to the
-.Xr fputc 3
-function.
-.Pp
-A file is disassociated from a stream by
-.Em closing
-the file.
-Output streams are flushed (any unwritten buffer contents are transferred
-to the host environment) before the stream is disassociated from the file.
-The value of a pointer to a
-.Dv FILE
-object is indeterminate after a file is closed (garbage).
-.Pp
-A file may be subsequently reopened, by the same or another program
-execution, and its contents reclaimed or modified (if it can be repositioned
-at the start). If the main function returns to its original caller, or
-the
-.Xr exit 3
-function is called, all open files are closed (hence all output
-streams are flushed) before program termination. Other methods
-of program termination, such as
-.Xr abort 3
-do not bother about closing files properly.
-.Pp
-This implementation needs and makes
-no distinction between
-.Dq text
-and
-.Dq binary
-streams.
-In effect, all streams are binary.
-No translation is performed and no extra padding appears on any stream.
-.Pp
-At program startup, three streams are predefined and need not be
-opened explicitly:
-.Bl -bullet -compact -offset indent
-.It
-.Em standard input
-(for reading conventional input),
-.It
-.Em standard output
-(for writing conventional output), and
-.It
-.Em standard error
-(for writing diagnostic output).
-.El
-These streams are abbreviated
-.Em stdin , stdout
-and
-.Em stderr .
-Initially, the standard error stream
-is unbuffered; the standard input and output streams are
-fully buffered if and only if the streams do not refer to
-an interactive or
-.Dq terminal
-device, as determined by the
-.Xr isatty 3
-function.
-In fact,
-.Em all
-freshly-opened streams that refer to terminal devices
-default to line buffering, and
-pending output to such streams is written automatically
-whenever an such an input stream is read.
-Note that this applies only to
-.Dq "true reads" ;
-if the read request can be satisfied by existing buffered data,
-no automatic flush will occur.
-In these cases,
-or when a large amount of computation is done after printing
-part of a line on an output terminal, it is necessary to
-.Xr fflush 3
-the standard output before going off and computing so that the output
-will appear.
-Alternatively, these defaults may be modified via the
-.Xr setvbuf 3
-function.
-.Pp
-The
-.Nm stdio
-library is a part of the library
-.Nm libc
-and routines are automatically loaded as needed by the compilers
-.Xr cc 1
-and
-.Xr pc 1 .
-The
-.Tn SYNOPSIS
-sections of the following manual pages indicate which include files
-are to be used, what the compiler declaration for the function
-looks like and which external variables are of interest.
-.Pp
-The following are defined as macros;
-these names may not be re-used
-without first removing their current definitions with
-.Dv #undef :
-.Dv BUFSIZ ,
-.Dv EOF ,
-.Dv FILENAME_MAX ,
-.Dv FOPEN_MAX ,
-.Dv L_cuserid ,
-.Dv L_ctermid ,
-.Dv L_tmpnam,
-.Dv NULL ,
-.Dv SEEK_END ,
-.Dv SEEK_SET ,
-.Dv SEE_CUR ,
-.Dv TMP_MAX ,
-.Dv clearerr ,
-.Dv feof ,
-.Dv ferror ,
-.Dv fileno ,
-.Dv freopen ,
-.Dv fwopen ,
-.Dv getc ,
-.Dv getchar ,
-.Dv putc ,
-.Dv putchar ,
-.Dv stderr ,
-.Dv stdin ,
-.Dv stdout .
-Function versions of the macro functions
-.Fn feof ,
-.Fn ferror ,
-.Fn clearerr ,
-.Fn fileno ,
-.Fn getc ,
-.Fn getchar ,
-.Fn putc ,
-and
-.Fn putchar
-exist and will be used if the macros
-definitions are explicitly removed.
-.Sh SEE ALSO
-.Xr close 2 ,
-.Xr open 2 ,
-.Xr read 2 ,
-.Xr write 2
-.Sh BUGS
-The standard buffered functions do not interact well with certain other
-library and system functions, especially
-.Xr vfork 2
-and
-.Xr abort 3 .
-.Sh STANDARDS
-The
-.Nm stdio
-library conforms to
-.St -ansiC .
-.Sh LIST OF FUNCTIONS
-.Bl -column "Description"
-.Sy Function Description
-clearerr check and reset stream status
-fclose close a stream
-fdopen stream open functions
-feof check and reset stream status
-ferror check and reset stream status
-fflush flush a stream
-fgetc get next character or word from input stream
-fgetln get a line from a stream
-fgetpos reposition a stream
-fgets get a line from a stream
-fileno check and reset stream status
-fopen stream open functions
-fprintf formatted output conversion
-fpurge flush a stream
-fputc output a character or word to a stream
-fputs output a line to a stream
-fread binary stream input/output
-freopen stream open functions
-fropen open a stream
-fscanf input format conversion
-fseek reposition a stream
-fsetpos reposition a stream
-ftell reposition a stream
-funopen open a stream
-fwopen open a stream
-fwrite binary stream input/output
-getc get next character or word from input stream
-getchar get next character or word from input stream
-gets get a line from a stream
-getw get next character or word from input stream
-mkstemp create unique temporary file
-mktemp create unique temporary file
-perror system error messages
-printf formatted output conversion
-putc output a character or word to a stream
-putchar output a character or word to a stream
-puts output a line to a stream
-putw output a character or word to a stream
-remove remove directory entry
-rewind reposition a stream
-scanf input format conversion
-setbuf stream buffering operations
-setbuffer stream buffering operations
-setlinebuf stream buffering operations
-setvbuf stream buffering operations
-snprintf formatted output conversion
-sprintf formatted output conversion
-sscanf input format conversion
-strerror system error messages
-sys_errlist system error messages
-sys_nerr system error messages
-tempnam temporary file routines
-tmpfile temporary file routines
-tmpnam temporary file routines
-ungetc un-get character from input stream
-vfprintf formatted output conversion
-vfscanf input format conversion
-vprintf formatted output conversion
-vscanf input format conversion
-vsnprintf formatted output conversion
-vsprintf formatted output conversion
-vsscanf input format conversion
-.El
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c
deleted file mode 100644
index 852e971..0000000
--- a/lib/libc/stdio/stdio.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)stdio.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include "local.h"
-
-/*
- * Small standard I/O/seek/close functions.
- * These maintain the `known seek offset' for seek optimisation.
- */
-int
-__sread(cookie, buf, n)
- void *cookie;
- char *buf;
- int n;
-{
- register FILE *fp = cookie;
- register int ret;
-
- ret = read(fp->_file, buf, (size_t)n);
- /* if the read succeeded, update the current offset */
- if (ret >= 0)
- fp->_offset += ret;
- else
- fp->_flags &= ~__SOFF; /* paranoia */
- return (ret);
-}
-
-int
-__swrite(cookie, buf, n)
- void *cookie;
- char const *buf;
- int n;
-{
- register FILE *fp = cookie;
-
- if (fp->_flags & __SAPP)
- (void) lseek(fp->_file, (off_t)0, SEEK_END);
- fp->_flags &= ~__SOFF; /* in case FAPPEND mode is set */
- return (write(fp->_file, buf, (size_t)n));
-}
-
-fpos_t
-__sseek(cookie, offset, whence)
- void *cookie;
- fpos_t offset;
- int whence;
-{
- register FILE *fp = cookie;
- register off_t ret;
-
- ret = lseek(fp->_file, (off_t)offset, whence);
- if (ret == -1)
- fp->_flags &= ~__SOFF;
- else {
- fp->_flags |= __SOFF;
- fp->_offset = ret;
- }
- return (ret);
-}
-
-int
-__sclose(cookie)
- void *cookie;
-{
-
- return (close(((FILE *)cookie)->_file));
-}
diff --git a/lib/libc/stdio/tempnam.c b/lib/libc/stdio/tempnam.c
deleted file mode 100644
index 243fa39..0000000
--- a/lib/libc/stdio/tempnam.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)tempnam.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <paths.h>
-
-char *
-tempnam(dir, pfx)
- const char *dir, *pfx;
-{
- int sverrno;
- char *f, *name;
-
- if (!(name = malloc(MAXPATHLEN)))
- return(NULL);
-
- if (!pfx)
- pfx = "tmp.";
-
- if ((f = getenv("TMPDIR"))) {
- (void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
- *(f + strlen(f) - 1) == '/'? "": "/", pfx);
- if ((f = mktemp(name)))
- return(f);
- }
-
- if ((f = (char *)dir)) {
- (void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
- *(f + strlen(f) - 1) == '/'? "": "/", pfx);
- if ((f = mktemp(name)))
- return(f);
- }
-
- f = P_tmpdir;
- (void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
- if ((f = mktemp(name)))
- return(f);
-
- f = _PATH_TMP;
- (void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
- if ((f = mktemp(name)))
- return(f);
-
- sverrno = errno;
- free(name);
- errno = sverrno;
- return(NULL);
-}
diff --git a/lib/libc/stdio/tmpfile.c b/lib/libc/stdio/tmpfile.c
deleted file mode 100644
index 2f8abfc..0000000
--- a/lib/libc/stdio/tmpfile.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)tmpfile.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <signal.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <paths.h>
-
-FILE *
-tmpfile()
-{
- sigset_t set, oset;
- FILE *fp;
- int fd, sverrno;
-#define TRAILER "tmp.XXXXXX"
- char buf[sizeof(_PATH_TMP) + sizeof(TRAILER)];
-
- (void)memcpy(buf, _PATH_TMP, sizeof(_PATH_TMP) - 1);
- (void)memcpy(buf + sizeof(_PATH_TMP) - 1, TRAILER, sizeof(TRAILER));
-
- sigfillset(&set);
- (void)sigprocmask(SIG_BLOCK, &set, &oset);
-
- fd = mkstemp(buf);
- if (fd != -1)
- (void)unlink(buf);
-
- (void)sigprocmask(SIG_SETMASK, &oset, NULL);
-
- if (fd == -1)
- return (NULL);
-
- if ((fp = fdopen(fd, "w+")) == NULL) {
- sverrno = errno;
- (void)close(fd);
- errno = sverrno;
- return (NULL);
- }
- return (fp);
-}
diff --git a/lib/libc/stdio/tmpnam.3 b/lib/libc/stdio/tmpnam.3
deleted file mode 100644
index d7e0326..0000000
--- a/lib/libc/stdio/tmpnam.3
+++ /dev/null
@@ -1,219 +0,0 @@
-.\" Copyright (c) 1988, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)tmpnam.3 8.2 (Berkeley) 11/17/93
-.\"
-.Dd November 17, 1993
-.Dt TMPFILE 3
-.Os
-.Sh NAME
-.Nm tempnam ,
-.Nm tmpfile ,
-.Nm tmpnam
-.Nd temporary file routines
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft FILE *
-.Fn tmpfile void
-.Ft char *
-.Fn tmpnam "char *str"
-.Ft char *
-.Fn tempnam "const char *tmpdir" "const char *prefix"
-.Sh DESCRIPTION
-The
-.Fn tmpfile
-function
-returns a pointer to a stream associated with a file descriptor returned
-by the routine
-.Xr mkstemp 3 .
-The created file is unlinked before
-.Fn tmpfile
-returns, causing the file to be automatically deleted when the last
-reference to it is closed.
-The file is opened with the access value
-.Ql w+ .
-.Pp
-The
-.Fn tmpnam
-function
-returns a pointer to a file name, in the
-.Dv P_tmpdir
-directory, which
-did not reference an existing file at some indeterminate point in the
-past.
-.Dv P_tmpdir
-is defined in the include file
-.Aq Pa stdio.h .
-If the argument
-.Fa s
-is
-.Pf non- Dv NULL ,
-the file name is copied to the buffer it references.
-Otherwise, the file name is copied to a static buffer.
-In either case,
-.Fn tmpnam
-returns a pointer to the file name.
-.Pp
-The buffer referenced by
-.Fa s
-is expected to be at least
-.Dv L_tmpnam
-bytes in length.
-.Dv L_tmpnam
-is defined in the include file
-.Aq Pa stdio.h .
-.Pp
-The
-.Fn tempnam
-function
-is similar to
-.Fn tmpnam ,
-but provides the ability to specify the directory which will
-contain the temporary file and the file name prefix.
-.Pp
-The environment variable
-.Ev TMPDIR
-(if set), the argument
-.Fa tmpdir
-(if
-.Pf non- Dv NULL ) ,
-the directory
-.Dv P_tmpdir ,
-and the directory
-.Pa /tmp
-are tried, in the listed order, as directories in which to store the
-temporary file.
-.Pp
-The argument
-.Fa prefix ,
-if
-.Pf non- Dv NULL ,
-is used to specify a file name prefix, which will be the
-first part of the created file name.
-.Fn Tempnam
-allocates memory in which to store the file name; the returned pointer
-may be used as a subsequent argument to
-.Xr free 3 .
-.Sh RETURN VALUES
-The
-.Fn tmpfile
-function
-returns a pointer to an open file stream on success, and a
-.Dv NULL
-pointer
-on error.
-.Pp
-The
-.Fn tmpnam
-and
-.Fn tempfile
-functions
-return a pointer to a file name on success, and a
-.Dv NULL
-pointer
-on error.
-.Sh ERRORS
-The
-.Fn tmpfile
-function
-may fail and set the global variable
-.Va errno
-for any of the errors specified for the library functions
-.Xr fdopen 3
-or
-.Xr mkstemp 3 .
-.Pp
-The
-.Fn tmpnam
-function
-may fail and set
-.Va errno
-for any of the errors specified for the library function
-.Xr mktemp 3 .
-.Pp
-The
-.Fn tempnam
-function
-may fail and set
-.Va errno
-for any of the errors specified for the library functions
-.Xr malloc 3
-or
-.Xr mktemp 3 .
-.Sh SEE ALSO
-.Xr mkstemp 3 ,
-.Xr mktemp 3
-.Sh STANDARDS
-The
-.Fn tmpfile
-and
-.Fn tmpnam
-functions
-conform to
-.St -ansiC .
-.Sh BUGS
-These interfaces are provided for System V and
-.Tn ANSI
-compatibility only.
-The
-.Xr mkstemp 3
-interface is strongly preferred.
-.Pp
-There are four important problems with these interfaces (as well as
-with the historic
-.Xr mktemp 3
-interface).
-First, there is an obvious race between file name selection and file
-creation and deletion.
-Second, most historic implementations provide only a limited number
-of possible temporary file names (usually 26) before file names will
-start being recycled.
-Third, the System V implementations of these functions (and of
-.Xr mktemp 3 )
-use the
-.Xr access 2
-function to determine whether or not the temporary file may be created.
-This has obvious ramifications for setuid or setgid programs, complicating
-the portable use of these interfaces in such programs.
-Finally, there is no specification of the permissions with which the
-temporary files are created.
-.Pp
-This implementation does not have these flaws, but portable software
-cannot depend on that.
-In particular, the
-.Fn tmpfile
-interface should not be used in software expected to be used on other systems
-if there is any possibility that the user does not wish the temporary file to
-be publicly readable and writable.
diff --git a/lib/libc/stdio/tmpnam.c b/lib/libc/stdio/tmpnam.c
deleted file mode 100644
index ce86482..0000000
--- a/lib/libc/stdio/tmpnam.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)tmpnam.c 8.3 (Berkeley) 3/28/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <stdio.h>
-#include <unistd.h>
-
-char *
-tmpnam(s)
- char *s;
-{
- static u_long tmpcount;
- static char buf[L_tmpnam];
-
- if (s == NULL)
- s = buf;
- (void)snprintf(s, L_tmpnam, "%stmp.%lu.XXXXXX", P_tmpdir, tmpcount);
- ++tmpcount;
- return (mktemp(s));
-}
diff --git a/lib/libc/stdio/ungetc.3 b/lib/libc/stdio/ungetc.3
deleted file mode 100644
index e5c68d0..0000000
--- a/lib/libc/stdio/ungetc.3
+++ /dev/null
@@ -1,95 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ungetc.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt UNGETC 3
-.Os
-.Sh NAME
-.Nm ungetc
-.Nd un-get character from input stream
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn ungetc "int c" "FILE *stream"
-.Sh DESCRIPTION
-The
-.Fn ungetc
-function pushes the character
-.Fa c
-(converted to an unsigned char)
-back onto the input stream pointed to by
-.Fa stream .
-The pushed-backed characters will be returned by subsequent reads on the
-stream (in reverse order).
-A successful intervening call, using the same stream, to one of the file
-positioning functions
-.Po
-.Xr fseek 3 ,
-.Xr fsetpos 3 ,
-or
-.Xr rewind 3
-.Pc
-will discard the pushed back characters.
-.Pp
-One character of push-back is guaranteed,
-but as long as there is
-sufficient memory, an effectively infinite amount of pushback is allowed.
-.Pp
-If a character is successfully pushed-back,
-the end-of-file indicator for the stream is cleared.
-.Sh RETURN VALUES
-The
-.Fn ungetc
-function
-returns
-the character pushed-back after the conversion, or
-.Dv EOF
-if the operation fails.
-If the value of the argument
-.Fa c
-character equals
-.Dv EOF ,
-the operation will fail and the stream will remain unchanged.
-.Sh SEE ALSO
-.Xr fseek 3 ,
-.Xr getc 3 ,
-.Xr setvbuf 3
-.Sh STANDARDS
-The
-.Fn ungetc
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/stdio/ungetc.c b/lib/libc/stdio/ungetc.c
deleted file mode 100644
index c0355b7..0000000
--- a/lib/libc/stdio/ungetc.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)ungetc.c 8.2 (Berkeley) 11/3/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "local.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-static int __submore __P((FILE *));
-
-/*
- * Expand the ungetc buffer `in place'. That is, adjust fp->_p when
- * the buffer moves, so that it points the same distance from the end,
- * and move the bytes in the buffer around as necessary so that they
- * are all at the end (stack-style).
- */
-static int
-__submore(fp)
- register FILE *fp;
-{
- register int i;
- register unsigned char *p;
-
- if (fp->_ub._base == fp->_ubuf) {
- /*
- * Get a new buffer (rather than expanding the old one).
- */
- if ((p = malloc((size_t)BUFSIZ)) == NULL)
- return (EOF);
- fp->_ub._base = p;
- fp->_ub._size = BUFSIZ;
- p += BUFSIZ - sizeof(fp->_ubuf);
- for (i = sizeof(fp->_ubuf); --i >= 0;)
- p[i] = fp->_ubuf[i];
- fp->_p = p;
- return (0);
- }
- i = fp->_ub._size;
- p = realloc(fp->_ub._base, (size_t)(i << 1));
- if (p == NULL)
- return (EOF);
- /* no overlap (hence can use memcpy) because we doubled the size */
- (void)memcpy((void *)(p + i), (void *)p, (size_t)i);
- fp->_p = p + i;
- fp->_ub._base = p;
- fp->_ub._size = i << 1;
- return (0);
-}
-
-int
-ungetc(c, fp)
- int c;
- register FILE *fp;
-{
- if (c == EOF)
- return (EOF);
- if (!__sdidinit)
- __sinit();
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- if ((fp->_flags & __SRD) == 0) {
- /*
- * Not already reading: no good unless reading-and-writing.
- * Otherwise, flush any current write stuff.
- */
- if ((fp->_flags & __SRW) == 0) {
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (EOF);
- }
- if (fp->_flags & __SWR) {
- if (__sflush(fp)) {
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (EOF);
- }
- fp->_flags &= ~__SWR;
- fp->_w = 0;
- fp->_lbfsize = 0;
- }
- fp->_flags |= __SRD;
- }
- c = (unsigned char)c;
-
- /*
- * If we are in the middle of ungetc'ing, just continue.
- * This may require expanding the current ungetc buffer.
- */
- if (HASUB(fp)) {
- if (fp->_r >= fp->_ub._size && __submore(fp)) {
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (EOF);
- }
- *--fp->_p = c;
- fp->_r++;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (c);
- }
- fp->_flags &= ~__SEOF;
-
- /*
- * If we can handle this by simply backing up, do so,
- * but never replace the original character.
- * (This makes sscanf() work when scanning `const' data.)
- */
- if (fp->_bf._base != NULL && fp->_p > fp->_bf._base &&
- fp->_p[-1] == c) {
- fp->_p--;
- fp->_r++;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (c);
- }
-
- /*
- * Create an ungetc buffer.
- * Initially, we will use the `reserve' buffer.
- */
- fp->_ur = fp->_r;
- fp->_up = fp->_p;
- fp->_ub._base = fp->_ubuf;
- fp->_ub._size = sizeof(fp->_ubuf);
- fp->_ubuf[sizeof(fp->_ubuf) - 1] = c;
- fp->_p = &fp->_ubuf[sizeof(fp->_ubuf) - 1];
- fp->_r = 1;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (c);
-}
diff --git a/lib/libc/stdio/vasprintf.c b/lib/libc/stdio/vasprintf.c
deleted file mode 100644
index 7b75b2c..0000000
--- a/lib/libc/stdio/vasprintf.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * Copyright (c) 1996 Peter Wemm <peter@freebsd.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_RCS) && !defined(lint)
-static char rcsid[] = "$Id: vasprintf.c,v 1.6 1997/07/06 07:54:56 peter Exp $";
-#endif /* LIBC_RCS and not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#define CHUNK_SPARE 128 /* how much spare to allocate to avoid realloc calls */
-
-struct bufcookie {
- char *base; /* start of buffer */
- size_t size;
- size_t left;
-};
-
-static int writehook __P((void *cookie, const char *, int));
-
-static int
-writehook(cookie, buf, len)
- void *cookie;
- const char *buf;
- int len;
-{
- struct bufcookie *h = (struct bufcookie *)cookie;
- char *newbuf;
-
- if (len == 0)
- return 0;
-
- if (len > h->left) {
- /* grow malloc region */
- /*
- * XXX this is linearly expanded, which is slow for obscenely
- * large strings.
- */
- h->left = h->left + len + CHUNK_SPARE;
- h->size = h->size + len + CHUNK_SPARE;
- newbuf = realloc(h->base, h->size);
- if (newbuf == NULL) {
- free(h->base);
- h->base = NULL;
- return (-1);
- } else
- h->base = newbuf;
- }
- /* "write" it */
- (void)memcpy(h->base + h->size - h->left, buf, (size_t)len);
- h->left -= len;
- return (len);
-}
-
-
-int
-vasprintf(str, fmt, ap)
- char **str;
- const char *fmt;
- va_list ap;
-{
- int ret;
- FILE *f;
- struct bufcookie h;
-
- h.base = malloc(CHUNK_SPARE);
- if (h.base == NULL)
- return (-1);
- h.size = CHUNK_SPARE;
- h.left = CHUNK_SPARE;
-
- f = funopen(&h, NULL, writehook, NULL, NULL);
- if (f == NULL) {
- free(h.base);
- return (-1);
- }
- ret = vfprintf(f, fmt, ap);
- fclose(f);
-
- /*
- * clean up the wreckage. Did writehook fail or did something else
- * in stdio explode perhaps?
- */
- if (h.base == NULL) /* realloc failed in writehook */
- return (-1);
- if (ret < 0) { /* something else? */
- free(h.base);
- return (-1);
- }
-
- /*
- * At this point, we have a non-null terminated string in a
- * buffer. There may not be enough room to null-terminate it
- * (h.left == 0) - if realloc failes to expand it, it's fatal.
- * If we were merely trying to shrink the buffer, a realloc failure
- * is not [yet] fatal. Note that when realloc returns NULL,
- * the original buffer is left allocated and valid.
- */
- if (h.left == 1) /* exact fit, do not realloc */
- *str = h.base;
- else {
- *str = realloc(h.base, (size_t)(h.size - h.left + 1));
- if (*str == NULL) {
- /* failed to expand? - fatal */
- if (h.left == 0) {
- free(h.base);
- return (-1);
- }
- *str = h.base; /* use oversize original buffer */
- }
- }
- (*str)[h.size - h.left] = '\0';
- return (ret);
-}
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
deleted file mode 100644
index dd3f743..0000000
--- a/lib/libc/stdio/vfprintf.c
+++ /dev/null
@@ -1,1284 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id: vfprintf.c,v 1.16 1997/12/25 00:32:17 ache Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Actual printf innards.
- *
- * This code is large and complicated...
- */
-
-#include <sys/types.h>
-
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#include "local.h"
-#include "fvwrite.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/* Define FLOATING_POINT to get floating point. */
-#define FLOATING_POINT
-
-static int __sprint __P((FILE *, struct __suio *));
-static int __sbprintf __P((FILE *, const char *, va_list));
-static char * __ultoa __P((u_long, char *, int, int, char *));
-static char * __uqtoa __P((u_quad_t, char *, int, int, char *));
-static void __find_arguments __P((const char *, va_list, void ***));
-static void __grow_type_table __P((int, unsigned char **, int *));
-
-/*
- * Flush out all the vectors defined by the given uio,
- * then reset it so that it can be reused.
- */
-static int
-__sprint(fp, uio)
- FILE *fp;
- register struct __suio *uio;
-{
- register int err;
-
- if (uio->uio_resid == 0) {
- uio->uio_iovcnt = 0;
- return (0);
- }
- err = __sfvwrite(fp, uio);
- uio->uio_resid = 0;
- uio->uio_iovcnt = 0;
- return (err);
-}
-
-/*
- * Helper function for `fprintf to unbuffered unix file': creates a
- * temporary buffer. We only work on write-only files; this avoids
- * worries about ungetc buffers and so forth.
- */
-static int
-__sbprintf(fp, fmt, ap)
- register FILE *fp;
- const char *fmt;
- va_list ap;
-{
- int ret;
- FILE fake;
- unsigned char buf[BUFSIZ];
-
- /* copy the important variables */
- fake._flags = fp->_flags & ~__SNBF;
- fake._file = fp->_file;
- fake._cookie = fp->_cookie;
- fake._write = fp->_write;
-
- /* set up the buffer */
- fake._bf._base = fake._p = buf;
- fake._bf._size = fake._w = sizeof(buf);
- fake._lbfsize = 0; /* not actually used, but Just In Case */
-
- /* do the work, then copy any error status */
- ret = vfprintf(&fake, fmt, ap);
- if (ret >= 0 && fflush(&fake))
- ret = EOF;
- if (fake._flags & __SERR)
- fp->_flags |= __SERR;
- return (ret);
-}
-
-/*
- * Macros for converting digits to letters and vice versa
- */
-#define to_digit(c) ((c) - '0')
-#define is_digit(c) ((unsigned)to_digit(c) <= 9)
-#define to_char(n) ((n) + '0')
-
-/*
- * Convert an unsigned long to ASCII for printf purposes, returning
- * a pointer to the first character of the string representation.
- * Octal numbers can be forced to have a leading zero; hex numbers
- * use the given digits.
- */
-static char *
-__ultoa(val, endp, base, octzero, xdigs)
- register u_long val;
- char *endp;
- int base, octzero;
- char *xdigs;
-{
- register char *cp = endp;
- register long sval;
-
- /*
- * Handle the three cases separately, in the hope of getting
- * better/faster code.
- */
- switch (base) {
- case 10:
- if (val < 10) { /* many numbers are 1 digit */
- *--cp = to_char(val);
- return (cp);
- }
- /*
- * On many machines, unsigned arithmetic is harder than
- * signed arithmetic, so we do at most one unsigned mod and
- * divide; this is sufficient to reduce the range of
- * the incoming value to where signed arithmetic works.
- */
- if (val > LONG_MAX) {
- *--cp = to_char(val % 10);
- sval = val / 10;
- } else
- sval = val;
- do {
- *--cp = to_char(sval % 10);
- sval /= 10;
- } while (sval != 0);
- break;
-
- case 8:
- do {
- *--cp = to_char(val & 7);
- val >>= 3;
- } while (val);
- if (octzero && *cp != '0')
- *--cp = '0';
- break;
-
- case 16:
- do {
- *--cp = xdigs[val & 15];
- val >>= 4;
- } while (val);
- break;
-
- default: /* oops */
- abort();
- }
- return (cp);
-}
-
-/* Identical to __ultoa, but for quads. */
-static char *
-__uqtoa(val, endp, base, octzero, xdigs)
- register u_quad_t val;
- char *endp;
- int base, octzero;
- char *xdigs;
-{
- register char *cp = endp;
- register quad_t sval;
-
- /* quick test for small values; __ultoa is typically much faster */
- /* (perhaps instead we should run until small, then call __ultoa?) */
- if (val <= ULONG_MAX)
- return (__ultoa((u_long)val, endp, base, octzero, xdigs));
- switch (base) {
- case 10:
- if (val < 10) {
- *--cp = to_char(val % 10);
- return (cp);
- }
- if (val > QUAD_MAX) {
- *--cp = to_char(val % 10);
- sval = val / 10;
- } else
- sval = val;
- do {
- *--cp = to_char(sval % 10);
- sval /= 10;
- } while (sval != 0);
- break;
-
- case 8:
- do {
- *--cp = to_char(val & 7);
- val >>= 3;
- } while (val);
- if (octzero && *cp != '0')
- *--cp = '0';
- break;
-
- case 16:
- do {
- *--cp = xdigs[val & 15];
- val >>= 4;
- } while (val);
- break;
-
- default:
- abort();
- }
- return (cp);
-}
-
-#ifdef FLOATING_POINT
-#include <math.h>
-#include "floatio.h"
-
-#define BUF (MAXEXP+MAXFRACT+1) /* + decimal point */
-#define DEFPREC 6
-
-static char *cvt __P((double, int, int, char *, int *, int, int *));
-static int exponent __P((char *, int, int));
-
-#else /* no FLOATING_POINT */
-
-#define BUF 68
-
-#endif /* FLOATING_POINT */
-
-#define STATIC_ARG_TBL_SIZE 8 /* Size of static argument table. */
-
-/*
- * Flags used during conversion.
- */
-#define ALT 0x001 /* alternate form */
-#define HEXPREFIX 0x002 /* add 0x or 0X prefix */
-#define LADJUST 0x004 /* left adjustment */
-#define LONGDBL 0x008 /* long double */
-#define LONGINT 0x010 /* long integer */
-#define QUADINT 0x020 /* quad integer */
-#define SHORTINT 0x040 /* short integer */
-#define ZEROPAD 0x080 /* zero (as opposed to blank) pad */
-#define FPT 0x100 /* Floating point number */
-int
-vfprintf(fp, fmt0, ap)
- FILE *fp;
- const char *fmt0;
- va_list ap;
-{
- register char *fmt; /* format string */
- register int ch; /* character from fmt */
- register int n, n2; /* handy integer (short term usage) */
- register char *cp; /* handy char pointer (short term usage) */
- register struct __siov *iovp;/* for PRINT macro */
- register int flags; /* flags as above */
- int ret; /* return value accumulator */
- int width; /* width from format (%8d), or 0 */
- int prec; /* precision from format (%.3d), or -1 */
- char sign; /* sign prefix (' ', '+', '-', or \0) */
-#ifdef FLOATING_POINT
- char softsign; /* temporary negative sign for floats */
- double _double; /* double precision arguments %[eEfgG] */
- int expt; /* integer value of exponent */
- int expsize; /* character count for expstr */
- int ndig; /* actual number of digits returned by cvt */
- char expstr[7]; /* buffer for exponent string */
-#endif
- u_long ulval; /* integer arguments %[diouxX] */
- u_quad_t uqval; /* %q integers */
- int base; /* base for [diouxX] conversion */
- int dprec; /* a copy of prec if [diouxX], 0 otherwise */
- int realsz; /* field size expanded by dprec, sign, etc */
- int size; /* size of converted field or string */
- int prsize; /* max size of printed field */
- char *xdigs; /* digits for [xX] conversion */
-#define NIOV 8
- struct __suio uio; /* output information: summary */
- struct __siov iov[NIOV];/* ... and individual io vectors */
- char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */
- char ox[2]; /* space for 0x hex-prefix */
- void **argtable; /* args, built due to positional arg */
- void *statargtable [STATIC_ARG_TBL_SIZE];
- int nextarg; /* 1-based argument index */
- va_list orgap; /* original argument pointer */
-
- /*
- * Choose PADSIZE to trade efficiency vs. size. If larger printf
- * fields occur frequently, increase PADSIZE and make the initialisers
- * below longer.
- */
-#define PADSIZE 16 /* pad chunk size */
- static char blanks[PADSIZE] =
- {' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '};
- static char zeroes[PADSIZE] =
- {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'};
-
- /*
- * BEWARE, these `goto error' on error, and PAD uses `n'.
- */
-#define PRINT(ptr, len) { \
- iovp->iov_base = (ptr); \
- iovp->iov_len = (len); \
- uio.uio_resid += (len); \
- iovp++; \
- if (++uio.uio_iovcnt >= NIOV) { \
- if (__sprint(fp, &uio)) \
- goto error; \
- iovp = iov; \
- } \
-}
-#define PAD(howmany, with) { \
- if ((n = (howmany)) > 0) { \
- while (n > PADSIZE) { \
- PRINT(with, PADSIZE); \
- n -= PADSIZE; \
- } \
- PRINT(with, n); \
- } \
-}
-#define FLUSH() { \
- if (uio.uio_resid && __sprint(fp, &uio)) \
- goto error; \
- uio.uio_iovcnt = 0; \
- iovp = iov; \
-}
-
- /*
- * Get the argument indexed by nextarg. If the argument table is
- * built, use it to get the argument. If its not, get the next
- * argument (and arguments must be gotten sequentially).
- */
-#define GETARG(type) \
- ((argtable != NULL) ? *((type*)(argtable[nextarg++])) : \
- (nextarg++, va_arg(ap, type)))
-
- /*
- * To extend shorts properly, we need both signed and unsigned
- * argument extraction methods.
- */
-#define SARG() \
- (flags&LONGINT ? GETARG(long) : \
- flags&SHORTINT ? (long)(short)GETARG(int) : \
- (long)GETARG(int))
-#define UARG() \
- (flags&LONGINT ? GETARG(u_long) : \
- flags&SHORTINT ? (u_long)(u_short)GETARG(int) : \
- (u_long)GETARG(u_int))
-
- /*
- * Get * arguments, including the form *nn$. Preserve the nextarg
- * that the argument can be gotten once the type is determined.
- */
-#define GETASTER(val) \
- n2 = 0; \
- cp = fmt; \
- while (is_digit(*cp)) { \
- n2 = 10 * n2 + to_digit(*cp); \
- cp++; \
- } \
- if (*cp == '$') { \
- int hold = nextarg; \
- if (argtable == NULL) { \
- argtable = statargtable; \
- __find_arguments (fmt0, orgap, &argtable); \
- } \
- nextarg = n2; \
- val = GETARG (int); \
- nextarg = hold; \
- fmt = ++cp; \
- } else { \
- val = GETARG (int); \
- }
-
-
-#ifdef _THREAD_SAFE
- _thread_flockfile(fp,__FILE__,__LINE__);
-#endif
- /* sorry, fprintf(read_only_file, "") returns EOF, not 0 */
- if (cantwrite(fp)) {
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (EOF);
- }
-
- /* optimise fprintf(stderr) (and other unbuffered Unix files) */
- if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
- fp->_file >= 0) {
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- return (__sbprintf(fp, fmt0, ap));
- }
-
- fmt = (char *)fmt0;
- argtable = NULL;
- nextarg = 1;
- orgap = ap;
- uio.uio_iov = iovp = iov;
- uio.uio_resid = 0;
- uio.uio_iovcnt = 0;
- ret = 0;
-
- /*
- * Scan the format for conversions (`%' character).
- */
- for (;;) {
- for (cp = fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++)
- /* void */;
- if ((n = fmt - cp) != 0) {
- if ((unsigned)ret + n > INT_MAX) {
- ret = EOF;
- goto error;
- }
- PRINT(cp, n);
- ret += n;
- }
- if (ch == '\0')
- goto done;
- fmt++; /* skip over '%' */
-
- flags = 0;
- dprec = 0;
- width = 0;
- prec = -1;
- sign = '\0';
-
-rflag: ch = *fmt++;
-reswitch: switch (ch) {
- 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.
- */
- GETASTER (width);
- if (width >= 0)
- goto rflag;
- width = -width;
- /* FALLTHROUGH */
- case '-':
- flags |= LADJUST;
- goto rflag;
- case '+':
- sign = '+';
- goto rflag;
- case '.':
- if ((ch = *fmt++) == '*') {
- GETASTER (n);
- prec = n < 0 ? -1 : n;
- goto rflag;
- }
- n = 0;
- while (is_digit(ch)) {
- n = 10 * n + to_digit(ch);
- ch = *fmt++;
- }
- prec = n < 0 ? -1 : n;
- goto reswitch;
- 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 + to_digit(ch);
- ch = *fmt++;
- } while (is_digit(ch));
- if (ch == '$') {
- nextarg = n;
- if (argtable == NULL) {
- argtable = statargtable;
- __find_arguments (fmt0, orgap,
- &argtable);
- }
- goto rflag;
- }
- width = n;
- goto reswitch;
-#ifdef FLOATING_POINT
- case 'L':
- flags |= LONGDBL;
- goto rflag;
-#endif
- case 'h':
- flags |= SHORTINT;
- goto rflag;
- case 'l':
- flags |= LONGINT;
- goto rflag;
- case 'q':
- flags |= QUADINT;
- goto rflag;
- case 'c':
- *(cp = buf) = GETARG(int);
- size = 1;
- sign = '\0';
- break;
- case 'D':
- flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'd':
- case 'i':
- if (flags & QUADINT) {
- uqval = GETARG(quad_t);
- if ((quad_t)uqval < 0) {
- uqval = -uqval;
- sign = '-';
- }
- } else {
- ulval = SARG();
- if ((long)ulval < 0) {
- ulval = -ulval;
- sign = '-';
- }
- }
- base = 10;
- goto number;
-#ifdef FLOATING_POINT
- case 'e':
- case 'E':
- case 'f':
- goto fp_begin;
- case 'g':
- case 'G':
- if (prec == 0)
- prec = 1;
-fp_begin: if (prec == -1)
- prec = DEFPREC;
- if (flags & LONGDBL)
- /* XXX this loses precision. */
- _double = (double)GETARG(long double);
- else
- _double = GETARG(double);
- /* do this before tricky precision changes */
- if (isinf(_double)) {
- if (_double < 0)
- sign = '-';
- cp = "Inf";
- size = 3;
- break;
- }
- if (isnan(_double)) {
- cp = "NaN";
- size = 3;
- break;
- }
- flags |= FPT;
- cp = cvt(_double, prec, flags, &softsign,
- &expt, ch, &ndig);
- if (ch == 'g' || ch == 'G') {
- if (expt <= -4 || expt > prec)
- ch = (ch == 'g') ? 'e' : 'E';
- else
- ch = 'g';
- }
- if (ch <= 'e') { /* 'e' or 'E' fmt */
- --expt;
- expsize = exponent(expstr, expt, ch);
- size = expsize + ndig;
- if (ndig > 1 || flags & ALT)
- ++size;
- } else if (ch == 'f') { /* f fmt */
- if (expt > 0) {
- size = expt;
- if (prec || flags & ALT)
- size += prec + 1;
- } else /* "0.X" */
- size = prec + 2;
- } else if (expt >= ndig) { /* fixed g fmt */
- size = expt;
- if (flags & ALT)
- ++size;
- } else
- size = ndig + (expt > 0 ?
- 1 : 2 - expt);
-
- if (softsign)
- sign = '-';
- break;
-#endif /* FLOATING_POINT */
- case 'n':
- if (flags & QUADINT)
- *GETARG(quad_t *) = ret;
- else if (flags & LONGINT)
- *GETARG(long *) = ret;
- else if (flags & SHORTINT)
- *GETARG(short *) = ret;
- else
- *GETARG(int *) = ret;
- continue; /* no output */
- case 'O':
- flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'o':
- if (flags & QUADINT)
- uqval = GETARG(u_quad_t);
- else
- ulval = UARG();
- 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
- */
- ulval = (u_long)GETARG(void *);
- base = 16;
- xdigs = "0123456789abcdef";
- flags = (flags & ~QUADINT) | HEXPREFIX;
- ch = 'x';
- goto nosign;
- case 's':
- if ((cp = GETARG(char *)) == NULL)
- cp = "(null)";
- if (prec >= 0) {
- /*
- * can't use strlen; can only look for the
- * NUL in the first `prec' characters, and
- * strlen() will go further.
- */
- char *p = memchr(cp, 0, (size_t)prec);
-
- if (p != NULL) {
- size = p - cp;
- if (size > prec)
- size = prec;
- } else
- size = prec;
- } else
- size = strlen(cp);
- sign = '\0';
- break;
- case 'U':
- flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'u':
- if (flags & QUADINT)
- uqval = GETARG(u_quad_t);
- else
- ulval = UARG();
- base = 10;
- goto nosign;
- case 'X':
- xdigs = "0123456789ABCDEF";
- goto hex;
- case 'x':
- xdigs = "0123456789abcdef";
-hex: if (flags & QUADINT)
- uqval = GETARG(u_quad_t);
- else
- ulval = UARG();
- base = 16;
- /* leading 0x/X only if non-zero */
- if (flags & ALT &&
- (flags & QUADINT ? uqval != 0 : ulval != 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
- */
- cp = buf + BUF;
- if (flags & QUADINT) {
- if (uqval != 0 || prec != 0)
- cp = __uqtoa(uqval, cp, base,
- flags & ALT, xdigs);
- } else {
- if (ulval != 0 || prec != 0)
- cp = __ultoa(ulval, cp, base,
- flags & ALT, xdigs);
- }
- size = buf + BUF - cp;
- break;
- default: /* "%?" prints ?, unless ? is NUL */
- if (ch == '\0')
- goto done;
- /* pretend it was %c with argument ch */
- cp = buf;
- *cp = ch;
- size = 1;
- sign = '\0';
- break;
- }
-
- /*
- * All reasonable formats wind up here. At this point, `cp'
- * 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.
- * size excludes decimal prec; realsz includes it.
- */
- realsz = dprec > size ? dprec : size;
- if (sign)
- realsz++;
- else if (flags & HEXPREFIX)
- realsz += 2;
-
- prsize = width > realsz ? width : realsz;
- if ((unsigned)ret + prsize > INT_MAX) {
- ret = EOF;
- goto error;
- }
-
- /* right-adjusting blank padding */
- if ((flags & (LADJUST|ZEROPAD)) == 0)
- PAD(width - realsz, blanks);
-
- /* prefix */
- if (sign) {
- PRINT(&sign, 1);
- } else if (flags & HEXPREFIX) {
- ox[0] = '0';
- ox[1] = ch;
- PRINT(ox, 2);
- }
-
- /* right-adjusting zero padding */
- if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD)
- PAD(width - realsz, zeroes);
-
- /* leading zeroes from decimal precision */
- PAD(dprec - size, zeroes);
-
- /* the string or number proper */
-#ifdef FLOATING_POINT
- if ((flags & FPT) == 0) {
- PRINT(cp, size);
- } else { /* glue together f_p fragments */
- if (ch >= 'f') { /* 'f' or 'g' */
- if (_double == 0) {
- /* kludge for __dtoa irregularity */
- if (expt >= ndig &&
- (flags & ALT) == 0) {
- PRINT("0", 1);
- } else {
- PRINT("0.", 2);
- PAD(ndig - 1, zeroes);
- }
- } else if (expt <= 0) {
- PRINT("0.", 2);
- PAD(-expt, zeroes);
- PRINT(cp, ndig);
- } else if (expt >= ndig) {
- PRINT(cp, ndig);
- PAD(expt - ndig, zeroes);
- if (flags & ALT)
- PRINT(".", 1);
- } else {
- PRINT(cp, expt);
- cp += expt;
- PRINT(".", 1);
- PRINT(cp, ndig-expt);
- }
- } else { /* 'e' or 'E' */
- if (ndig > 1 || flags & ALT) {
- ox[0] = *cp++;
- ox[1] = '.';
- PRINT(ox, 2);
- if (_double) {
- PRINT(cp, ndig-1);
- } else /* 0.[0..] */
- /* __dtoa irregularity */
- PAD(ndig - 1, zeroes);
- } else /* XeYYY */
- PRINT(cp, 1);
- PRINT(expstr, expsize);
- }
- }
-#else
- PRINT(cp, size);
-#endif
- /* left-adjusting padding (always blank) */
- if (flags & LADJUST)
- PAD(width - realsz, blanks);
-
- /* finally, adjust ret */
- ret += prsize;
-
- FLUSH(); /* copy out the I/O vectors */
- }
-done:
- FLUSH();
-error:
- if (__sferror(fp))
- ret = EOF;
-#ifdef _THREAD_SAFE
- _thread_funlockfile(fp);
-#endif
- if ((argtable != NULL) && (argtable != statargtable))
- free (argtable);
- return (ret);
- /* NOTREACHED */
-}
-
-/*
- * Type ids for argument type table.
- */
-#define T_UNUSED 0
-#define T_SHORT 1
-#define T_U_SHORT 2
-#define TP_SHORT 3
-#define T_INT 4
-#define T_U_INT 5
-#define TP_INT 6
-#define T_LONG 7
-#define T_U_LONG 8
-#define TP_LONG 9
-#define T_QUAD 10
-#define T_U_QUAD 11
-#define TP_QUAD 12
-#define T_DOUBLE 13
-#define T_LONG_DOUBLE 14
-#define TP_CHAR 15
-#define TP_VOID 16
-
-/*
- * Find all arguments when a positional parameter is encountered. Returns a
- * table, indexed by argument number, of pointers to each arguments. The
- * initial argument table should be an array of STATIC_ARG_TBL_SIZE entries.
- * It will be replaces with a malloc-ed on if it overflows.
- */
-static void
-__find_arguments (fmt0, ap, argtable)
- const char *fmt0;
- va_list ap;
- void ***argtable;
-{
- register char *fmt; /* format string */
- register int ch; /* character from fmt */
- register int n, n2; /* handy integer (short term usage) */
- register char *cp; /* handy char pointer (short term usage) */
- register int flags; /* flags as above */
- int width; /* width from format (%8d), or 0 */
- unsigned char *typetable; /* table of types */
- unsigned char stattypetable [STATIC_ARG_TBL_SIZE];
- int tablesize; /* current size of type table */
- int tablemax; /* largest used index in table */
- int nextarg; /* 1-based argument index */
-
- /*
- * Add an argument type to the table, expanding if necessary.
- */
-#define ADDTYPE(type) \
- ((nextarg >= tablesize) ? \
- __grow_type_table(nextarg, &typetable, &tablesize) : 0, \
- typetable[nextarg++] = type, \
- (nextarg > tablemax) ? tablemax = nextarg : 0)
-
-#define ADDSARG() \
- ((flags&LONGINT) ? ADDTYPE(T_LONG) : \
- ((flags&SHORTINT) ? ADDTYPE(T_SHORT) : ADDTYPE(T_INT)))
-
-#define ADDUARG() \
- ((flags&LONGINT) ? ADDTYPE(T_U_LONG) : \
- ((flags&SHORTINT) ? ADDTYPE(T_U_SHORT) : ADDTYPE(T_U_INT)))
-
- /*
- * Add * arguments to the type array.
- */
-#define ADDASTER() \
- n2 = 0; \
- cp = fmt; \
- while (is_digit(*cp)) { \
- n2 = 10 * n2 + to_digit(*cp); \
- cp++; \
- } \
- if (*cp == '$') { \
- int hold = nextarg; \
- nextarg = n2; \
- ADDTYPE (T_INT); \
- nextarg = hold; \
- fmt = ++cp; \
- } else { \
- ADDTYPE (T_INT); \
- }
- fmt = (char *)fmt0;
- typetable = stattypetable;
- tablesize = STATIC_ARG_TBL_SIZE;
- tablemax = 0;
- nextarg = 1;
- memset (typetable, T_UNUSED, STATIC_ARG_TBL_SIZE);
-
- /*
- * Scan the format for conversions (`%' character).
- */
- for (;;) {
- for (cp = fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++)
- /* void */;
- if (ch == '\0')
- goto done;
- fmt++; /* skip over '%' */
-
- flags = 0;
- width = 0;
-
-rflag: ch = *fmt++;
-reswitch: switch (ch) {
- case ' ':
- case '#':
- goto rflag;
- case '*':
- ADDASTER ();
- goto rflag;
- case '-':
- case '+':
- goto rflag;
- case '.':
- if ((ch = *fmt++) == '*') {
- ADDASTER ();
- goto rflag;
- }
- while (is_digit(ch)) {
- ch = *fmt++;
- }
- goto reswitch;
- case '0':
- 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 + to_digit(ch);
- ch = *fmt++;
- } while (is_digit(ch));
- if (ch == '$') {
- nextarg = n;
- goto rflag;
- }
- width = n;
- goto reswitch;
-#ifdef FLOATING_POINT
- case 'L':
- flags |= LONGDBL;
- goto rflag;
-#endif
- case 'h':
- flags |= SHORTINT;
- goto rflag;
- case 'l':
- flags |= LONGINT;
- goto rflag;
- case 'q':
- flags |= QUADINT;
- goto rflag;
- case 'c':
- ADDTYPE(T_INT);
- break;
- case 'D':
- flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'd':
- case 'i':
- if (flags & QUADINT) {
- ADDTYPE(T_QUAD);
- } else {
- ADDSARG();
- }
- break;
-#ifdef FLOATING_POINT
- case 'e':
- case 'E':
- case 'f':
- case 'g':
- case 'G':
- if (flags & LONGDBL)
- ADDTYPE(T_LONG_DOUBLE);
- else
- ADDTYPE(T_DOUBLE);
- break;
-#endif /* FLOATING_POINT */
- case 'n':
- if (flags & QUADINT)
- ADDTYPE(TP_QUAD);
- else if (flags & LONGINT)
- ADDTYPE(TP_LONG);
- else if (flags & SHORTINT)
- ADDTYPE(TP_SHORT);
- else
- ADDTYPE(TP_INT);
- continue; /* no output */
- case 'O':
- flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'o':
- if (flags & QUADINT)
- ADDTYPE(T_U_QUAD);
- else
- ADDUARG();
- break;
- case 'p':
- ADDTYPE(TP_VOID);
- break;
- case 's':
- ADDTYPE(TP_CHAR);
- break;
- case 'U':
- flags |= LONGINT;
- /*FALLTHROUGH*/
- case 'u':
- if (flags & QUADINT)
- ADDTYPE(T_U_QUAD);
- else
- ADDUARG();
- break;
- case 'X':
- case 'x':
- if (flags & QUADINT)
- ADDTYPE(T_U_QUAD);
- else
- ADDUARG();
- break;
- default: /* "%?" prints ?, unless ? is NUL */
- if (ch == '\0')
- goto done;
- break;
- }
- }
-done:
- /*
- * Build the argument table.
- */
- if (tablemax >= STATIC_ARG_TBL_SIZE) {
- *argtable = (void **)
- malloc (sizeof (void *) * (tablemax + 1));
- }
-
- (*argtable) [0] = NULL;
- for (n = 1; n <= tablemax; n++) {
- (*argtable) [n] = ap;
- switch (typetable [n]) {
- case T_UNUSED:
- (void) va_arg (ap, int);
- break;
- case T_SHORT:
- (void) va_arg (ap, int);
- break;
- case T_U_SHORT:
- (void) va_arg (ap, int);
- break;
- case TP_SHORT:
- (void) va_arg (ap, short *);
- break;
- case T_INT:
- (void) va_arg (ap, int);
- break;
- case T_U_INT:
- (void) va_arg (ap, unsigned int);
- break;
- case TP_INT:
- (void) va_arg (ap, int *);
- break;
- case T_LONG:
- (void) va_arg (ap, long);
- break;
- case T_U_LONG:
- (void) va_arg (ap, unsigned long);
- break;
- case TP_LONG:
- (void) va_arg (ap, long *);
- break;
- case T_QUAD:
- (void) va_arg (ap, quad_t);
- break;
- case T_U_QUAD:
- (void) va_arg (ap, u_quad_t);
- break;
- case TP_QUAD:
- (void) va_arg (ap, quad_t *);
- break;
- case T_DOUBLE:
- (void) va_arg (ap, double);
- break;
- case T_LONG_DOUBLE:
- (void) va_arg (ap, long double);
- break;
- case TP_CHAR:
- (void) va_arg (ap, char *);
- break;
- case TP_VOID:
- (void) va_arg (ap, void *);
- break;
- }
- }
-
- if ((typetable != NULL) && (typetable != stattypetable))
- free (typetable);
-}
-
-/*
- * Increase the size of the type table.
- */
-static void
-__grow_type_table (nextarg, typetable, tablesize)
- int nextarg;
- unsigned char **typetable;
- int *tablesize;
-{
- unsigned char *oldtable = *typetable;
- int newsize = *tablesize * 2;
-
- if (*tablesize == STATIC_ARG_TBL_SIZE) {
- *typetable = (unsigned char *)
- malloc (sizeof (unsigned char) * newsize);
- bcopy (oldtable, *typetable, *tablesize);
- } else {
- *typetable = (unsigned char *)
- realloc (typetable, sizeof (unsigned char) * newsize);
-
- }
- memset (&typetable [*tablesize], T_UNUSED, (newsize - *tablesize));
-
- *tablesize = newsize;
-}
-
-
-#ifdef FLOATING_POINT
-
-extern char *__dtoa __P((double, int, int, int *, int *, char **));
-
-static char *
-cvt(value, ndigits, flags, sign, decpt, ch, length)
- double value;
- int ndigits, flags, *decpt, ch, *length;
- char *sign;
-{
- int mode, dsgn;
- char *digits, *bp, *rve;
-
- if (ch == 'f')
- mode = 3; /* ndigits after the decimal point */
- else {
- /*
- * To obtain ndigits after the decimal point for the 'e'
- * and 'E' formats, round to ndigits + 1 significant
- * figures.
- */
- if (ch == 'e' || ch == 'E')
- ndigits++;
- mode = 2; /* ndigits significant digits */
- }
- if (value < 0) {
- value = -value;
- *sign = '-';
- } else
- *sign = '\000';
- digits = __dtoa(value, mode, ndigits, decpt, &dsgn, &rve);
- if ((ch != 'g' && ch != 'G') || flags & ALT) {
- /* print trailing zeros */
- bp = digits + ndigits;
- if (ch == 'f') {
- if (*digits == '0' && value)
- *decpt = -ndigits + 1;
- bp += *decpt;
- }
- if (value == 0) /* kludge for __dtoa irregularity */
- rve = bp;
- while (rve < bp)
- *rve++ = '0';
- }
- *length = rve - digits;
- return (digits);
-}
-
-static int
-exponent(p0, exp, fmtch)
- char *p0;
- int exp, fmtch;
-{
- register char *p, *t;
- char expbuf[MAXEXP];
-
- p = p0;
- *p++ = fmtch;
- if (exp < 0) {
- exp = -exp;
- *p++ = '-';
- }
- else
- *p++ = '+';
- t = expbuf + MAXEXP;
- if (exp > 9) {
- do {
- *--t = to_char(exp % 10);
- } while ((exp /= 10) > 9);
- *--t = to_char(exp);
- for (; t < expbuf + MAXEXP; *p++ = *t++);
- }
- else {
- *p++ = '0';
- *p++ = to_char(exp);
- }
- return (p - p0);
-}
-#endif /* FLOATING_POINT */
diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c
deleted file mode 100644
index ba4be5c..0000000
--- a/lib/libc/stdio/vfscanf.c
+++ /dev/null
@@ -1,791 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id: vfscanf.c,v 1.11 1997/07/01 17:46:39 jkh Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-#include <string.h>
-
-#include "collate.h"
-#include "local.h"
-
-#define FLOATING_POINT
-
-#include "floatio.h"
-#define BUF 513 /* Maximum length of numeric string. */
-
-/*
- * Flags used during conversion.
- */
-#define LONG 0x01 /* l: long or double */
-#define LONGDBL 0x02 /* L: long double */
-#define SHORT 0x04 /* h: short */
-#define SUPPRESS 0x08 /* suppress assignment */
-#define POINTER 0x10 /* weird %p pointer (`fake hex') */
-#define NOSKIP 0x20 /* do not skip blanks */
-#define QUAD 0x400
-
-/*
- * The following are used in numeric conversions only:
- * SIGNOK, NDIGITS, DPTOK, and EXPOK are for floating point;
- * SIGNOK, NDIGITS, PFXOK, and NZDIGITS are for integral.
- */
-#define SIGNOK 0x40 /* +/- is (still) legal */
-#define NDIGITS 0x80 /* no digits detected */
-
-#define DPTOK 0x100 /* (float) decimal point is still legal */
-#define EXPOK 0x200 /* (float) exponent (e+3, etc) still legal */
-
-#define PFXOK 0x100 /* 0x prefix is (still) legal */
-#define NZDIGITS 0x200 /* no zero digits detected */
-
-/*
- * Conversion types.
- */
-#define CT_CHAR 0 /* %c conversion */
-#define CT_CCL 1 /* %[...] conversion */
-#define CT_STRING 2 /* %s conversion */
-#define CT_INT 3 /* integer, i.e., strtoq or strtouq */
-#define CT_FLOAT 4 /* floating, i.e., strtod */
-
-#define u_char unsigned char
-#define u_long unsigned long
-
-static u_char *__sccl(char *, u_char *);
-
-/*
- * vfscanf
- */
-int
-__svfscanf(fp, fmt0, ap)
- register FILE *fp;
- char const *fmt0;
- va_list ap;
-{
- register u_char *fmt = (u_char *)fmt0;
- register int c; /* character from format, or conversion */
- register size_t width; /* field width, or 0 */
- register char *p; /* points into all kinds of strings */
- register int n; /* handy integer */
- register int flags; /* flags as defined above */
- register char *p0; /* saves original value of p when necessary */
- int nassigned; /* number of fields assigned */
- int nconversions; /* number of conversions */
- int nread; /* number of characters consumed from fp */
- int base; /* base argument to strtoq/strtouq */
- u_quad_t(*ccfn)(); /* conversion function (strtoq/strtouq) */
- char ccltab[256]; /* character class table for %[...] */
- char buf[BUF]; /* buffer for numeric conversions */
-
- /* `basefix' is used to avoid `if' tests in the integer scanner */
- static short basefix[17] =
- { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
-
- nassigned = 0;
- nconversions = 0;
- nread = 0;
- base = 0; /* XXX just to keep gcc happy */
- ccfn = NULL; /* XXX just to keep gcc happy */
- for (;;) {
- c = *fmt++;
- if (c == 0)
- return (nassigned);
- if (isspace(c)) {
- for (;;) {
- if (fp->_r <= 0 && __srefill(fp))
- goto input_failure;
- if (!isspace(*fp->_p))
- break;
- nread++, fp->_r--, fp->_p++;
- }
- continue;
- }
- if (c != '%')
- goto literal;
- width = 0;
- flags = 0;
- /*
- * switch on the format. continue if done;
- * break once format type is derived.
- */
-again: c = *fmt++;
- switch (c) {
- case '%':
-literal:
- if (fp->_r <= 0 && __srefill(fp))
- goto input_failure;
- if (*fp->_p != c)
- goto match_failure;
- fp->_r--, fp->_p++;
- nread++;
- continue;
-
- case '*':
- flags |= SUPPRESS;
- goto again;
- case 'l':
- flags |= LONG;
- goto again;
- case 'q':
- flags |= QUAD;
- goto again;
- case 'L':
- flags |= LONGDBL;
- goto again;
- case 'h':
- flags |= SHORT;
- goto again;
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- width = width * 10 + c - '0';
- goto again;
-
- /*
- * Conversions.
- * Those marked `compat' are for 4.[123]BSD compatibility.
- *
- * (According to ANSI, E and X formats are supposed
- * to the same as e and x. Sorry about that.)
- */
- case 'D': /* compat */
- flags |= LONG;
- /* FALLTHROUGH */
- case 'd':
- c = CT_INT;
- ccfn = (u_quad_t (*)())strtoq;
- base = 10;
- break;
-
- case 'i':
- c = CT_INT;
- ccfn = (u_quad_t (*)())strtoq;
- base = 0;
- break;
-
- case 'O': /* compat */
- flags |= LONG;
- /* FALLTHROUGH */
- case 'o':
- c = CT_INT;
- ccfn = strtouq;
- base = 8;
- break;
-
- case 'u':
- c = CT_INT;
- ccfn = strtouq;
- base = 10;
- break;
-
- case 'X': /* compat XXX */
- flags |= LONG;
- /* FALLTHROUGH */
- case 'x':
- flags |= PFXOK; /* enable 0x prefixing */
- c = CT_INT;
- ccfn = strtouq;
- base = 16;
- break;
-
-#ifdef FLOATING_POINT
- case 'E': /* compat XXX */
- case 'F': /* compat */
- flags |= LONG;
- /* FALLTHROUGH */
- case 'e': case 'f': case 'g':
- c = CT_FLOAT;
- break;
-#endif
-
- case 's':
- c = CT_STRING;
- break;
-
- case '[':
- fmt = __sccl(ccltab, fmt);
- flags |= NOSKIP;
- c = CT_CCL;
- break;
-
- case 'c':
- flags |= NOSKIP;
- c = CT_CHAR;
- break;
-
- case 'p': /* pointer format is like hex */
- flags |= POINTER | PFXOK;
- c = CT_INT;
- ccfn = strtouq;
- base = 16;
- break;
-
- case 'n':
- nconversions++;
- if (flags & SUPPRESS) /* ??? */
- continue;
- if (flags & SHORT)
- *va_arg(ap, short *) = nread;
- else if (flags & LONG)
- *va_arg(ap, long *) = nread;
- else if (flags & QUAD)
- *va_arg(ap, quad_t *) = nread;
- else
- *va_arg(ap, int *) = nread;
- continue;
-
- /*
- * Disgusting backwards compatibility hacks. XXX
- */
- case '\0': /* compat */
- return (EOF);
-
- default: /* compat */
- if (isupper(c))
- flags |= LONG;
- c = CT_INT;
- ccfn = (u_quad_t (*)())strtoq;
- base = 10;
- break;
- }
-
- /*
- * We have a conversion that requires input.
- */
- if (fp->_r <= 0 && __srefill(fp))
- goto input_failure;
-
- /*
- * Consume leading white space, except for formats
- * that suppress this.
- */
- if ((flags & NOSKIP) == 0) {
- while (isspace(*fp->_p)) {
- nread++;
- if (--fp->_r > 0)
- fp->_p++;
- else if (__srefill(fp))
- goto input_failure;
- }
- /*
- * Note that there is at least one character in
- * the buffer, so conversions that do not set NOSKIP
- * ca no longer result in an input failure.
- */
- }
-
- /*
- * Do the conversion.
- */
- switch (c) {
-
- case CT_CHAR:
- /* scan arbitrary characters (sets NOSKIP) */
- if (width == 0)
- width = 1;
- if (flags & SUPPRESS) {
- size_t sum = 0;
- for (;;) {
- if ((n = fp->_r) < width) {
- sum += n;
- width -= n;
- fp->_p += n;
- if (__srefill(fp)) {
- if (sum == 0)
- goto input_failure;
- break;
- }
- } else {
- sum += width;
- fp->_r -= width;
- fp->_p += width;
- break;
- }
- }
- nread += sum;
- } else {
- size_t r = fread((void *)va_arg(ap, char *), 1,
- width, fp);
-
- if (r == 0)
- goto input_failure;
- nread += r;
- nassigned++;
- }
- nconversions++;
- break;
-
- case CT_CCL:
- /* scan a (nonempty) character class (sets NOSKIP) */
- if (width == 0)
- width = (size_t)~0; /* `infinity' */
- /* take only those things in the class */
- if (flags & SUPPRESS) {
- n = 0;
- while (ccltab[*fp->_p]) {
- n++, fp->_r--, fp->_p++;
- if (--width == 0)
- break;
- if (fp->_r <= 0 && __srefill(fp)) {
- if (n == 0)
- goto input_failure;
- break;
- }
- }
- if (n == 0)
- goto match_failure;
- } else {
- p0 = p = va_arg(ap, char *);
- while (ccltab[*fp->_p]) {
- fp->_r--;
- *p++ = *fp->_p++;
- if (--width == 0)
- break;
- if (fp->_r <= 0 && __srefill(fp)) {
- if (p == p0)
- goto input_failure;
- break;
- }
- }
- n = p - p0;
- if (n == 0)
- goto match_failure;
- *p = 0;
- nassigned++;
- }
- nread += n;
- nconversions++;
- break;
-
- case CT_STRING:
- /* like CCL, but zero-length string OK, & no NOSKIP */
- if (width == 0)
- width = (size_t)~0;
- if (flags & SUPPRESS) {
- n = 0;
- while (!isspace(*fp->_p)) {
- n++, fp->_r--, fp->_p++;
- if (--width == 0)
- break;
- if (fp->_r <= 0 && __srefill(fp))
- break;
- }
- nread += n;
- } else {
- p0 = p = va_arg(ap, char *);
- while (!isspace(*fp->_p)) {
- fp->_r--;
- *p++ = *fp->_p++;
- if (--width == 0)
- break;
- if (fp->_r <= 0 && __srefill(fp))
- break;
- }
- *p = 0;
- nread += p - p0;
- nassigned++;
- }
- nconversions++;
- continue;
-
- case CT_INT:
- /* scan an integer as if by strtoq/strtouq */
-#ifdef hardway
- if (width == 0 || width > sizeof(buf) - 1)
- width = sizeof(buf) - 1;
-#else
- /* size_t is unsigned, hence this optimisation */
- if (--width > sizeof(buf) - 2)
- width = sizeof(buf) - 2;
- width++;
-#endif
- flags |= SIGNOK | NDIGITS | NZDIGITS;
- for (p = buf; width; width--) {
- c = *fp->_p;
- /*
- * Switch on the character; `goto ok'
- * if we accept it as a part of number.
- */
- switch (c) {
-
- /*
- * The digit 0 is always legal, but is
- * special. For %i conversions, if no
- * digits (zero or nonzero) have been
- * scanned (only signs), we will have
- * base==0. In that case, we should set
- * it to 8 and enable 0x prefixing.
- * Also, if we have not scanned zero digits
- * before this, do not turn off prefixing
- * (someone else will turn it off if we
- * have scanned any nonzero digits).
- */
- case '0':
- if (base == 0) {
- base = 8;
- flags |= PFXOK;
- }
- if (flags & NZDIGITS)
- flags &= ~(SIGNOK|NZDIGITS|NDIGITS);
- else
- flags &= ~(SIGNOK|PFXOK|NDIGITS);
- goto ok;
-
- /* 1 through 7 always legal */
- case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- base = basefix[base];
- flags &= ~(SIGNOK | PFXOK | NDIGITS);
- goto ok;
-
- /* digits 8 and 9 ok iff decimal or hex */
- case '8': case '9':
- base = basefix[base];
- if (base <= 8)
- break; /* not legal here */
- flags &= ~(SIGNOK | PFXOK | NDIGITS);
- goto ok;
-
- /* letters ok iff hex */
- case 'A': case 'B': case 'C':
- case 'D': case 'E': case 'F':
- case 'a': case 'b': case 'c':
- case 'd': case 'e': case 'f':
- /* no need to fix base here */
- if (base <= 10)
- break; /* not legal here */
- flags &= ~(SIGNOK | PFXOK | NDIGITS);
- goto ok;
-
- /* sign ok only as first character */
- case '+': case '-':
- if (flags & SIGNOK) {
- flags &= ~SIGNOK;
- goto ok;
- }
- break;
-
- /* x ok iff flag still set & 2nd char */
- case 'x': case 'X':
- if (flags & PFXOK && p == buf + 1) {
- base = 16; /* if %i */
- flags &= ~PFXOK;
- goto ok;
- }
- break;
- }
-
- /*
- * If we got here, c is not a legal character
- * for a number. Stop accumulating digits.
- */
- break;
- ok:
- /*
- * c is legal: store it and look at the next.
- */
- *p++ = c;
- if (--fp->_r > 0)
- fp->_p++;
- else if (__srefill(fp))
- break; /* EOF */
- }
- /*
- * If we had only a sign, it is no good; push
- * back the sign. If the number ends in `x',
- * it was [sign] '0' 'x', so push back the x
- * and treat it as [sign] '0'.
- */
- if (flags & NDIGITS) {
- if (p > buf)
- (void) ungetc(*(u_char *)--p, fp);
- goto match_failure;
- }
- c = ((u_char *)p)[-1];
- if (c == 'x' || c == 'X') {
- --p;
- (void) ungetc(c, fp);
- }
- if ((flags & SUPPRESS) == 0) {
- u_quad_t res;
-
- *p = 0;
- res = (*ccfn)(buf, (char **)NULL, base);
- if (flags & POINTER)
- *va_arg(ap, void **) =
- (void *)(u_long)res;
- else if (flags & SHORT)
- *va_arg(ap, short *) = res;
- else if (flags & LONG)
- *va_arg(ap, long *) = res;
- else if (flags & QUAD)
- *va_arg(ap, quad_t *) = res;
- else
- *va_arg(ap, int *) = res;
- nassigned++;
- }
- nread += p - buf;
- nconversions++;
- break;
-
-#ifdef FLOATING_POINT
- case CT_FLOAT:
- /* scan a floating point number as if by strtod */
-#ifdef hardway
- if (width == 0 || width > sizeof(buf) - 1)
- width = sizeof(buf) - 1;
-#else
- /* size_t is unsigned, hence this optimisation */
- if (--width > sizeof(buf) - 2)
- width = sizeof(buf) - 2;
- width++;
-#endif
- flags |= SIGNOK | NDIGITS | DPTOK | EXPOK;
- for (p = buf; width; width--) {
- c = *fp->_p;
- /*
- * This code mimicks the integer conversion
- * code, but is much simpler.
- */
- switch (c) {
-
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- case '8': case '9':
- flags &= ~(SIGNOK | NDIGITS);
- goto fok;
-
- case '+': case '-':
- if (flags & SIGNOK) {
- flags &= ~SIGNOK;
- goto fok;
- }
- break;
- case '.':
- if (flags & DPTOK) {
- flags &= ~(SIGNOK | DPTOK);
- goto fok;
- }
- break;
- case 'e': case 'E':
- /* no exponent without some digits */
- if ((flags&(NDIGITS|EXPOK)) == EXPOK) {
- flags =
- (flags & ~(EXPOK|DPTOK)) |
- SIGNOK | NDIGITS;
- goto fok;
- }
- break;
- }
- break;
- fok:
- *p++ = c;
- if (--fp->_r > 0)
- fp->_p++;
- else if (__srefill(fp))
- break; /* EOF */
- }
- /*
- * If no digits, might be missing exponent digits
- * (just give back the exponent) or might be missing
- * regular digits, but had sign and/or decimal point.
- */
- if (flags & NDIGITS) {
- if (flags & EXPOK) {
- /* no digits at all */
- while (p > buf)
- ungetc(*(u_char *)--p, fp);
- goto match_failure;
- }
- /* just a bad exponent (e and maybe sign) */
- c = *(u_char *)--p;
- if (c != 'e' && c != 'E') {
- (void) ungetc(c, fp);/* sign */
- c = *(u_char *)--p;
- }
- (void) ungetc(c, fp);
- }
- if ((flags & SUPPRESS) == 0) {
- double res;
-
- *p = 0;
- /* XXX this loses precision for long doubles. */
- res = strtod(buf, (char **) NULL);
- if (flags & LONGDBL)
- *va_arg(ap, long double *) = res;
- else if (flags & LONG)
- *va_arg(ap, double *) = res;
- else
- *va_arg(ap, float *) = res;
- nassigned++;
- }
- nread += p - buf;
- nconversions++;
- break;
-#endif /* FLOATING_POINT */
- }
- }
-input_failure:
- return (nconversions != 0 ? nassigned : EOF);
-match_failure:
- return (nassigned);
-}
-
-/*
- * Fill in the given table from the scanset at the given format
- * (just after `['). Return a pointer to the character past the
- * closing `]'. The table has a 1 wherever characters should be
- * considered part of the scanset.
- */
-static u_char *
-__sccl(tab, fmt)
- register char *tab;
- register u_char *fmt;
-{
- register int c, n, v, i;
-
- /* first `clear' the whole table */
- c = *fmt++; /* first char hat => negated scanset */
- if (c == '^') {
- v = 1; /* default => accept */
- c = *fmt++; /* get new first char */
- } else
- v = 0; /* default => reject */
-
- /* XXX: Will not work if sizeof(tab*) > sizeof(char) */
- (void) memset(tab, v, 256);
-
- if (c == 0)
- return (fmt - 1);/* format ended before closing ] */
-
- /*
- * Now set the entries corresponding to the actual scanset
- * to the opposite of the above.
- *
- * The first character may be ']' (or '-') without being special;
- * the last character may be '-'.
- */
- v = 1 - v;
- for (;;) {
- tab[c] = v; /* take character c */
-doswitch:
- n = *fmt++; /* and examine the next */
- switch (n) {
-
- case 0: /* format ended too soon */
- return (fmt - 1);
-
- case '-':
- /*
- * A scanset of the form
- * [01+-]
- * is defined as `the digit 0, the digit 1,
- * the character +, the character -', but
- * the effect of a scanset such as
- * [a-zA-Z0-9]
- * is implementation defined. The V7 Unix
- * scanf treats `a-z' as `the letters a through
- * z', but treats `a-a' as `the letter a, the
- * character -, and the letter a'.
- *
- * For compatibility, the `-' is not considerd
- * to define a range if the character following
- * it is either a close bracket (required by ANSI)
- * or is not numerically greater than the character
- * we just stored in the table (c).
- */
- n = *fmt;
- if (n == ']'
- || (__collate_load_error ? n < c :
- __collate_range_cmp (n, c) < 0
- )
- ) {
- c = '-';
- break; /* resume the for(;;) */
- }
- fmt++;
- /* fill in the range */
- if (__collate_load_error) {
- do {
- tab[++c] = v;
- } while (c < n);
- } else {
- for (i = 0; i < 256; i ++)
- if ( __collate_range_cmp (c, i) < 0
- && __collate_range_cmp (i, n) <= 0
- )
- tab[i] = v;
- }
-#if 1 /* XXX another disgusting compatibility hack */
- c = n;
- /*
- * Alas, the V7 Unix scanf also treats formats
- * such as [a-c-e] as `the letters a through e'.
- * This too is permitted by the standard....
- */
- goto doswitch;
-#else
- c = *fmt++;
- if (c == 0)
- return (fmt - 1);
- if (c == ']')
- return (fmt);
-#endif
- break;
-
- case ']': /* end of scanset */
- return (fmt);
-
- default: /* just another character */
- c = n;
- break;
- }
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/stdio/vprintf.c b/lib/libc/stdio/vprintf.c
deleted file mode 100644
index 8d449d6..0000000
--- a/lib/libc/stdio/vprintf.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)vprintf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-
-int
-vprintf(fmt, ap)
- char const *fmt;
- _BSD_VA_LIST_ ap;
-{
- return (vfprintf(stdout, fmt, ap));
-}
diff --git a/lib/libc/stdio/vscanf.c b/lib/libc/stdio/vscanf.c
deleted file mode 100644
index 9381710..0000000
--- a/lib/libc/stdio/vscanf.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Donn Seeley at UUNET Technologies, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)vscanf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-int
-vscanf(fmt, ap)
- const char *fmt;
- _BSD_VA_LIST_ ap;
-{
- int retval;
-
-#ifdef _THREAD_SAFE
- _thread_flockfile(stdin,__FILE__,__LINE__);
-#endif
- retval = __svfscanf(stdin, fmt, ap);
-#ifdef _THREAD_SAFE
- _thread_funlockfile(stdin);
-#endif
- return (retval);
-}
diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c
deleted file mode 100644
index 6cf2d76..0000000
--- a/lib/libc/stdio/vsnprintf.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)vsnprintf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id: vsnprintf.c,v 1.10 1997/12/24 23:54:19 ache Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <limits.h>
-#include <stdio.h>
-
-int
-vsnprintf(str, n, fmt, ap)
- char *str;
- size_t n;
- const char *fmt;
- _BSD_VA_LIST_ ap;
-{
- size_t on;
- int ret;
- FILE f;
-
- on = n;
- if (n != 0)
- n--;
- if (n > INT_MAX)
- n = INT_MAX;
- f._file = -1;
- f._flags = __SWR | __SSTR;
- f._bf._base = f._p = (unsigned char *)str;
- f._bf._size = f._w = n;
- ret = vfprintf(&f, fmt, ap);
- if (on > 0)
- *f._p = '\0';
- return (ret);
-}
diff --git a/lib/libc/stdio/vsprintf.c b/lib/libc/stdio/vsprintf.c
deleted file mode 100644
index 911d97f..0000000
--- a/lib/libc/stdio/vsprintf.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)vsprintf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <limits.h>
-
-int
-vsprintf(str, fmt, ap)
- char *str;
- const char *fmt;
- _BSD_VA_LIST_ ap;
-{
- int ret;
- FILE f;
-
- f._file = -1;
- f._flags = __SWR | __SSTR;
- f._bf._base = f._p = (unsigned char *)str;
- f._bf._size = f._w = INT_MAX;
- ret = vfprintf(&f, fmt, ap);
- *f._p = 0;
- return (ret);
-}
diff --git a/lib/libc/stdio/vsscanf.c b/lib/libc/stdio/vsscanf.c
deleted file mode 100644
index 4cfa662..0000000
--- a/lib/libc/stdio/vsscanf.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Donn Seeley at UUNET Technologies, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)vsscanf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-
-static int
-eofread __P((void *, char *, int));
-
-/* ARGSUSED */
-static int
-eofread(cookie, buf, len)
- void *cookie;
- char *buf;
- int len;
-{
-
- return (0);
-}
-
-int
-vsscanf(str, fmt, ap)
- const char *str;
- const char *fmt;
- _BSD_VA_LIST_ ap;
-{
- FILE f;
-
- f._file = -1;
- f._flags = __SRD;
- f._bf._base = f._p = (unsigned char *)str;
- f._bf._size = f._r = strlen(str);
- f._read = eofread;
- f._ub._base = NULL;
- f._lb._base = NULL;
- return (__svfscanf(&f, fmt, ap));
-}
diff --git a/lib/libc/stdio/wbuf.c b/lib/libc/stdio/wbuf.c
deleted file mode 100644
index b85ac51..0000000
--- a/lib/libc/stdio/wbuf.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)wbuf.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include "local.h"
-
-/*
- * Write the given character into the (probably full) buffer for
- * the given file. Flush the buffer out if it is or becomes full,
- * or if c=='\n' and the file is line buffered.
- */
-int
-__swbuf(c, fp)
- register int c;
- register FILE *fp;
-{
- register int n;
-
- /*
- * In case we cannot write, or longjmp takes us out early,
- * make sure _w is 0 (if fully- or un-buffered) or -_bf._size
- * (if line buffered) so that we will get called again.
- * If we did not do this, a sufficient number of putc()
- * calls might wrap _w from negative to positive.
- */
- fp->_w = fp->_lbfsize;
- if (cantwrite(fp))
- return (EOF);
- c = (unsigned char)c;
-
- /*
- * If it is completely full, flush it out. Then, in any case,
- * stuff c into the buffer. If this causes the buffer to fill
- * completely, or if c is '\n' and the file is line buffered,
- * flush it (perhaps a second time). The second flush will always
- * happen on unbuffered streams, where _bf._size==1; fflush()
- * guarantees that putc() will always call wbuf() by setting _w
- * to 0, so we need not do anything else.
- */
- n = fp->_p - fp->_bf._base;
- if (n >= fp->_bf._size) {
- if (fflush(fp))
- return (EOF);
- n = 0;
- }
- fp->_w--;
- *fp->_p++ = c;
- if (++n == fp->_bf._size || (fp->_flags & __SLBF && c == '\n'))
- if (fflush(fp))
- return (EOF);
- return (c);
-}
diff --git a/lib/libc/stdio/wsetup.c b/lib/libc/stdio/wsetup.c
deleted file mode 100644
index 74f0f77..0000000
--- a/lib/libc/stdio/wsetup.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)wsetup.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "local.h"
-
-/*
- * Various output routines call wsetup to be sure it is safe to write,
- * because either _flags does not include __SWR, or _buf is NULL.
- * _wsetup returns 0 if OK to write, nonzero otherwise.
- */
-int
-__swsetup(fp)
- register FILE *fp;
-{
- /* make sure stdio is set up */
- if (!__sdidinit)
- __sinit();
-
- /*
- * If we are not writing, we had better be reading and writing.
- */
- if ((fp->_flags & __SWR) == 0) {
- if ((fp->_flags & __SRW) == 0)
- return (EOF);
- if (fp->_flags & __SRD) {
- /* clobber any ungetc data */
- if (HASUB(fp))
- FREEUB(fp);
- fp->_flags &= ~(__SRD|__SEOF);
- fp->_r = 0;
- fp->_p = fp->_bf._base;
- }
- fp->_flags |= __SWR;
- }
-
- /*
- * Make a buffer if necessary, then set _w.
- */
- if (fp->_bf._base == NULL)
- __smakebuf(fp);
- if (fp->_flags & __SLBF) {
- /*
- * It is line buffered, so make _lbfsize be -_bufsize
- * for the putc() macro. We will change _lbfsize back
- * to 0 whenever we turn off __SWR.
- */
- fp->_w = 0;
- fp->_lbfsize = -fp->_bf._size;
- } else
- fp->_w = fp->_flags & __SNBF ? 0 : fp->_bf._size;
- return (0);
-}
diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc
deleted file mode 100644
index 03d0060..0000000
--- a/lib/libc/stdlib/Makefile.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-# from @(#)Makefile.inc 8.3 (Berkeley) 2/4/95
-# $Id: Makefile.inc,v 1.12 1997/10/16 14:58:18 bde Exp $
-
-# machine-independent stdlib sources
-.PATH: ${.CURDIR}/../libc/${MACHINE}/stdlib ${.CURDIR}/../libc/stdlib
-
-MISRCS+=abort.c abs.c atexit.c atof.c atoi.c atol.c bsearch.c calloc.c div.c \
- exit.c getenv.c getopt.c getsubopt.c heapsort.c labs.c ldiv.c \
- malloc.c merge.c putenv.c qsort.c radixsort.c rand.c random.c \
- realpath.c setenv.c strhash.c strtod.c strtol.c strtoq.c strtoul.c \
- strtouq.c system.c
-
-# machine-dependent stdlib sources
-.include "${.CURDIR}/../libc/${MACHINE}/stdlib/Makefile.inc"
-
-.if ${LIB} == "c"
-MAN3+= abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 bsearch.3 \
- div.3 exit.3 getenv.3 getopt.3 getsubopt.3 labs.3 \
- ldiv.3 malloc.3 memory.3 qsort.3 radixsort.3 rand.3 random.3 \
- realpath.3 strtod.3 strtol.3 strtoul.3 system.3
-
-MLINKS+=getenv.3 putenv.3 getenv.3 setenv.3 getenv.3 unsetenv.3
-MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3
-MLINKS+=rand.3 srand.3
-MLINKS+=random.3 initstate.3 random.3 setstate.3 random.3 srandom.3 \
- random.3 srandomdev.3
-MLINKS+=strtol.3 strtoq.3
-MLINKS+=strtoul.3 strtouq.3
-MLINKS+=malloc.3 calloc.3 malloc.3 free.3 malloc.3 realloc.3
-.endif
diff --git a/lib/libc/stdlib/abort.3 b/lib/libc/stdlib/abort.3
deleted file mode 100644
index 17717e9..0000000
--- a/lib/libc/stdlib/abort.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)abort.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ABORT 3
-.Os
-.Sh NAME
-.Nm abort
-.Nd cause abnormal program termination
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft void
-.Fn abort void
-.Sh DESCRIPTION
-The
-.Fn abort
-function causes abnormal program termination to occur, unless the
-signal
-.Dv SIGABRT
-is being caught and the signal handler does not return.
-.Pp
-Any open streams are flushed and closed.
-.Sh RETURN VALUES
-The
-.Fn abort
-function
-never returns.
-.Sh SEE ALSO
-.Xr sigaction 2 ,
-.Xr exit 3
-.Sh STANDARDS
-The
-.Fn abort
-function
-conforms to
-.St -p1003.1-90 .
diff --git a/lib/libc/stdlib/abort.c b/lib/libc/stdlib/abort.c
deleted file mode 100644
index 4fd34dc..0000000
--- a/lib/libc/stdlib/abort.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)abort.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <signal.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-void (*__cleanup)();
-
-void
-abort()
-{
- sigset_t mask;
-
- /*
- * POSIX requires we flush stdio buffers on abort
- */
- if (__cleanup)
- (*__cleanup)();
-
- sigfillset(&mask);
- /*
- * don't block SIGABRT to give any handler a chance; we ignore
- * any errors -- X311J doesn't allow abort to return anyway.
- */
- sigdelset(&mask, SIGABRT);
-#ifdef _THREAD_SAFE
- (void) _thread_sys_sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL);
-#else
- (void)sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL);
-#endif
- (void)kill(getpid(), SIGABRT);
-
- /*
- * if SIGABRT ignored, or caught and the handler returns, do
- * it again, only harder.
- */
-#ifdef _THREAD_SAFE
- (void) _thread_sys_signal(SIGABRT, SIG_DFL);
- (void) _thread_sys_sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL);
-#else
- (void)signal(SIGABRT, SIG_DFL);
- (void)sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL);
-#endif
- (void)kill(getpid(), SIGABRT);
- exit(1);
-}
diff --git a/lib/libc/stdlib/abs.3 b/lib/libc/stdlib/abs.3
deleted file mode 100644
index 501263e..0000000
--- a/lib/libc/stdlib/abs.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)abs.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt ABS 3
-.Os
-.Sh NAME
-.Nm abs
-.Nd integer absolute value function
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft int
-.Fn abs "int j"
-.Sh DESCRIPTION
-The
-.Fn abs
-function
-computes
-the absolute value of the integer
-.Ar j .
-.Sh RETURN VALUES
-The
-.Fn abs
-function
-returns
-the absolute value.
-.Sh SEE ALSO
-.Xr cabs 3 ,
-.Xr floor 3 ,
-.Xr hypot 3 ,
-.Xr labs 3 ,
-.Xr math 3
-.Sh STANDARDS
-The
-.Fn abs
-function conforms to
-.St -ansiC .
-.Sh BUGS
-The absolute value of the most negative integer remains negative.
diff --git a/lib/libc/stdlib/abs.c b/lib/libc/stdlib/abs.c
deleted file mode 100644
index 013fe53..0000000
--- a/lib/libc/stdlib/abs.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)abs.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-
-int
-abs(j)
- int j;
-{
- return(j < 0 ? -j : j);
-}
diff --git a/lib/libc/stdlib/alloca.3 b/lib/libc/stdlib/alloca.3
deleted file mode 100644
index 498348c..0000000
--- a/lib/libc/stdlib/alloca.3
+++ /dev/null
@@ -1,78 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)alloca.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ALLOCA 3
-.Os BSD 4
-.Sh NAME
-.Nm alloca
-.Nd memory allocator
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft void *
-.Fn alloca "size_t size"
-.Sh DESCRIPTION
-The
-.Fn alloca
-function
-allocates
-.Fa size
-bytes of space in the stack frame of the caller.
-This temporary space is automatically freed on
-return.
-.Sh RETURN VALUES
-The
-.Fn alloca
-function returns a pointer to the beginning of the allocated space.
-If the allocation failed, a
-.Dv NULL
-pointer is returned.
-.Sh SEE ALSO
-.Xr brk 2 ,
-.Xr calloc 3 ,
-.Xr getpagesize 3 ,
-.Xr malloc 3 ,
-.Xr realloc 3
-.Sh BUGS
-The
-.Fn alloca
-function
-is machine dependent; its use is discouraged.
-.\" .Sh HISTORY
-.\" The
-.\" .Fn alloca
-.\" function appeared in
-.\" .Bx ?? .
-.\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd
-.\" The first man page (or link to a man page that I can find at the
-.\" moment is 4.3...
diff --git a/lib/libc/stdlib/atexit.3 b/lib/libc/stdlib/atexit.3
deleted file mode 100644
index d50d57c..0000000
--- a/lib/libc/stdlib/atexit.3
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)atexit.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ATEXIT 3
-.Os
-.Sh NAME
-.Nm atexit
-.Nd register a function to be called on exit
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft int
-.Fn atexit "void (*function)(void)"
-.Sh DESCRIPTION
-The
-.Fn atexit
-function
-registers the given
-.Ar function
-to be called at program exit, whether via
-.Xr exit 3
-or via return from the program's
-.Em main .
-Functions so registered are called in reverse order;
-no arguments are passed.
-At least 32 functions can always be registered,
-and more are allowed as long as sufficient memory can be allocated.
-.Sh RETURN VALUES
-.Rv -std atexit
-.Sh ERRORS
-.Bl -tag -width [ENOMEM]
-.It Bq Er ENOMEM
-No memory was available to add the function to the list.
-The existing list of functions is unmodified.
-.El
-.Sh SEE ALSO
-.Xr exit 3
-.Sh STANDARDS
-The
-.Fn atexit
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/stdlib/atexit.c b/lib/libc/stdlib/atexit.c
deleted file mode 100644
index a65dae5..0000000
--- a/lib/libc/stdlib/atexit.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)atexit.c 8.2 (Berkeley) 7/3/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "atexit.h"
-
-struct atexit *__atexit; /* points to head of LIFO stack */
-
-/*
- * Register a function to be performed at exit.
- */
-int
-atexit(fn)
- void (*fn)();
-{
- static struct atexit __atexit0; /* one guaranteed table */
- register struct atexit *p;
-
- if ((p = __atexit) == NULL)
- __atexit = p = &__atexit0;
- else if (p->ind >= ATEXIT_SIZE) {
- if ((p = (struct atexit *)sbrk(sizeof(*p))) == (struct atexit *)-1)
- return (-1);
- p->ind = 0;
- p->next = __atexit;
- __atexit = p;
- }
- p->fns[p->ind++] = fn;
- return (0);
-}
diff --git a/lib/libc/stdlib/atexit.h b/lib/libc/stdlib/atexit.h
deleted file mode 100644
index 819151e..0000000
--- a/lib/libc/stdlib/atexit.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)atexit.h 8.2 (Berkeley) 7/3/94
- */
-
-/* must be at least 32 to guarantee ANSI conformance */
-#define ATEXIT_SIZE 32
-
-struct atexit {
- struct atexit *next; /* next in list */
- int ind; /* next index in this table */
- void (*fns[ATEXIT_SIZE])(); /* the table itself */
-};
-
-extern struct atexit *__atexit; /* points to head of LIFO stack */
diff --git a/lib/libc/stdlib/atof.3 b/lib/libc/stdlib/atof.3
deleted file mode 100644
index 978d3f4..0000000
--- a/lib/libc/stdlib/atof.3
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)atof.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ATOF 3
-.Os
-.Sh NAME
-.Nm atof
-.Nd convert
-.Tn ASCII
-string to double
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft double
-.Fn atof "const char *nptr"
-.Sh DESCRIPTION
-The
-.Fn atof
-function converts the initial portion of the string pointed to by
-.Ar nptr
-to
-.Ar double
-representation.
-.Pp
-It is equivalent to:
-.Bd -literal -offset indent
-strtod(nptr, (char **)NULL);
-.Ed
-.Sh SEE ALSO
-.Xr atoi 3 ,
-.Xr atol 3 ,
-.Xr strtod 3 ,
-.Xr strtol 3 ,
-.Xr strtoul 3
-.Sh STANDARDS
-The
-.Fn atof
-function conforms to
-.St -ansiC .
-.Sh BUGS
-This manual page represents intent instead of actual practice.
-While it is intended that
-.Fn atof
-be implemented using
-.Xr strtod 3 ,
-this has not yet happened.
-In the current system,
-.Fn atof
-translates a string in the following form to a double: a string of
-leading white space, possibly followed by a sign (``+'' or ``-''),
-followed by a digit string which may contain one decimal point (``.''),
-which may be followed by either of the exponent flags (``E'' or ``e''),
-and lastly, followed by a signed or unsigned integer.
diff --git a/lib/libc/stdlib/atof.c b/lib/libc/stdlib/atof.c
deleted file mode 100644
index 130e285..0000000
--- a/lib/libc/stdlib/atof.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)atof.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-#include <stddef.h>
-
-double
-atof(ascii)
- const char *ascii;
-{
- return (strtod(ascii, NULL));
-}
diff --git a/lib/libc/stdlib/atoi.3 b/lib/libc/stdlib/atoi.3
deleted file mode 100644
index a39779f..0000000
--- a/lib/libc/stdlib/atoi.3
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)atoi.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ATOI 3
-.Os
-.Sh NAME
-.Nm atoi
-.Nd convert
-.Tn ASCII
-string to integer
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft int
-.Fn atoi "const char *nptr"
-.Sh DESCRIPTION
-The
-.Fn atoi
-function converts the initial portion of the string pointed to by
-.Em nptr
-to
-.Em integer
-representation.
-.Pp
-It is equivalent to:
-.Bd -literal -offset indent
-(int)strtol(nptr, (char **)NULL, 10);
-.Ed
-.Sh SEE ALSO
-.Xr atof 3 ,
-.Xr atol 3 ,
-.Xr strtod 3 ,
-.Xr strtol 3 ,
-.Xr strtoul 3
-.Sh STANDARDS
-The
-.Fn atoi
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/stdlib/atoi.c b/lib/libc/stdlib/atoi.c
deleted file mode 100644
index 48e508a..0000000
--- a/lib/libc/stdlib/atoi.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)atoi.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-#include <stddef.h>
-
-int
-atoi(str)
- const char *str;
-{
- return((int)strtol(str, (char **)NULL, 10));
-}
diff --git a/lib/libc/stdlib/atol.3 b/lib/libc/stdlib/atol.3
deleted file mode 100644
index 6b12cc9..0000000
--- a/lib/libc/stdlib/atol.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)atol.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ATOL 3
-.Os
-.Sh NAME
-.Nm atol
-.Nd convert
-.Tn ASCII
-string to long integer
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft long
-.Fn atol "const char *nptr"
-.Sh DESCRIPTION
-The
-.Fn atol
-function converts the initial portion of the string pointed to by
-.Ar nptr
-to
-.Em long integer
-representation.
-.Pp
-It is equivalent to:
-.Bd -literal -offset indent
-strtol(nptr, (char **)NULL, 10);
-.Ed
-.Sh SEE ALSO
-.Xr atof 3 ,
-.Xr atoi 3 ,
-.Xr strtod 3 ,
-.Xr strtol 3 ,
-.Xr strtoul 3
-.Sh STANDARDS
-The
-.Fn atol
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/stdlib/atol.c b/lib/libc/stdlib/atol.c
deleted file mode 100644
index 31bcaa6..0000000
--- a/lib/libc/stdlib/atol.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)atol.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-#include <stdlib.h>
-
-long
-atol(str)
- const char *str;
-{
- return(strtol(str, (char **)NULL, 10));
-}
diff --git a/lib/libc/stdlib/bsearch.3 b/lib/libc/stdlib/bsearch.3
deleted file mode 100644
index a4e076e..0000000
--- a/lib/libc/stdlib/bsearch.3
+++ /dev/null
@@ -1,90 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)bsearch.3 8.3 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt BSEARCH 3
-.Os
-.Sh NAME
-.Nm bsearch
-.Nd binary search of a sorted table
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft void *
-.Fn bsearch "const void *key" "const void *base" "size_t nmemb" "size_t size" "int (*compar) (const void *, const void *)"
-.Sh DESCRIPTION
-The
-.Fn bsearch
-function searches an array of
-.Fa nmemb
-objects, the initial member of which is
-pointed to by
-.Fa base ,
-for a member that matches the object pointed to by
-.Fa key .
-The size of each member of the array is specified by
-.Fa size .
-.Pp
-The contents of the array should be in ascending sorted order according
-to the comparison function referenced by
-.Fa compar .
-The
-.Fa compar
-routine
-is expected to have
-two arguments which point to the
-.Fa key
-object and to an array member, in that order, and should return an integer
-less than, equal to, or greater than zero if the
-.Fa key
-object is found, respectively, to be less than, to match, or be
-greater than the array member.
-.Sh RETURN VALUES
-The
-.Fn bsearch
-function returns a pointer to a matching member of the array, or a null
-pointer if no match is found.
-If two members compare as equal, which member is matched is unspecified.
-.Sh SEE ALSO
-.Xr db 3 ,
-.Xr lsearch 3 ,
-.Xr qsort 3
-.\" .Xr tsearch 3
-.Sh STANDARDS
-The
-.Fn bsearch
-function conforms to
-.St -ansiC .
diff --git a/lib/libc/stdlib/bsearch.c b/lib/libc/stdlib/bsearch.c
deleted file mode 100644
index 4cee9de..0000000
--- a/lib/libc/stdlib/bsearch.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bsearch.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-#include <stdlib.h>
-
-/*
- * Perform a binary search.
- *
- * The code below is a bit sneaky. After a comparison fails, we
- * divide the work in half by moving either left or right. If lim
- * is odd, moving left simply involves halving lim: e.g., when lim
- * is 5 we look at item 2, so we change lim to 2 so that we will
- * look at items 0 & 1. If lim is even, the same applies. If lim
- * is odd, moving right again involes halving lim, this time moving
- * the base up one item past p: e.g., when lim is 5 we change base
- * to item 3 and make lim 2 so that we will look at items 3 and 4.
- * If lim is even, however, we have to shrink it by one before
- * halving: e.g., when lim is 4, we still looked at item 2, so we
- * have to make lim 3, then halve, obtaining 1, so that we will only
- * look at item 3.
- */
-void *
-bsearch(key, base0, nmemb, size, compar)
- register const void *key;
- const void *base0;
- size_t nmemb;
- register size_t size;
- register int (*compar) __P((const void *, const void *));
-{
- register const char *base = base0;
- register size_t lim;
- register int cmp;
- register const void *p;
-
- for (lim = nmemb; lim != 0; lim >>= 1) {
- p = base + (lim >> 1) * size;
- cmp = (*compar)(key, p);
- if (cmp == 0)
- return ((void *)p);
- if (cmp > 0) { /* key > p: move right */
- base = (char *)p + size;
- lim--;
- } /* else move left */
- }
- return (NULL);
-}
diff --git a/lib/libc/stdlib/calloc.c b/lib/libc/stdlib/calloc.c
deleted file mode 100644
index 7a83603..0000000
--- a/lib/libc/stdlib/calloc.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)calloc.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-#include <string.h>
-
-void *
-calloc(num, size)
- size_t num;
- register size_t size;
-{
- register void *p;
-
- size *= num;
- if ( (p = malloc(size)) )
- bzero(p, size);
- return(p);
-}
diff --git a/lib/libc/stdlib/div.3 b/lib/libc/stdlib/div.3
deleted file mode 100644
index f09e818..0000000
--- a/lib/libc/stdlib/div.3
+++ /dev/null
@@ -1,67 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)div.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt DIV 3
-.Os
-.Sh NAME
-.Nm div
-.Nd return quotient and remainder from division
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft div_t
-.Fn div "int num" "int denom"
-.Sh DESCRIPTION
-The
-.Fn div
-function
-computes the value
-.Fa num/denom
-and returns the quotient and remainder in a structure named
-.Fa div_t
-that contains two
-.Em int
-members named
-.Fa quot
-and
-.Fa rem .
-.Sh SEE ALSO
-.Xr ldiv 3
-.Sh STANDARDS
-The
-.Fn div
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/stdlib/div.c b/lib/libc/stdlib/div.c
deleted file mode 100644
index d7bde163..0000000
--- a/lib/libc/stdlib/div.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)div.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h> /* div_t */
-
-div_t
-div(num, denom)
- int num, denom;
-{
- div_t r;
-
- r.quot = num / denom;
- r.rem = num % denom;
- /*
- * The ANSI standard says that |r.quot| <= |n/d|, where
- * n/d is to be computed in infinite precision. In other
- * words, we should always truncate the quotient towards
- * 0, never -infinity.
- *
- * Machine division and remainer may work either way when
- * one or both of n or d is negative. If only one is
- * negative and r.quot has been truncated towards -inf,
- * r.rem will have the same sign as denom and the opposite
- * sign of num; if both are negative and r.quot has been
- * truncated towards -inf, r.rem will be positive (will
- * have the opposite sign of num). These are considered
- * `wrong'.
- *
- * If both are num and denom are positive, r will always
- * be positive.
- *
- * This all boils down to:
- * if num >= 0, but r.rem < 0, we got the wrong answer.
- * In that case, to get the right answer, add 1 to r.quot and
- * subtract denom from r.rem.
- */
- if (num >= 0 && r.rem < 0) {
- r.quot++;
- r.rem -= denom;
- }
- return (r);
-}
diff --git a/lib/libc/stdlib/exit.3 b/lib/libc/stdlib/exit.3
deleted file mode 100644
index de91276..0000000
--- a/lib/libc/stdlib/exit.3
+++ /dev/null
@@ -1,89 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)exit.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt EXIT 3
-.Os
-.Sh NAME
-.Nm exit
-.Nd perform normal program termination
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft void
-.Fn exit "int status"
-.Sh DESCRIPTION
-.Fn Exit
-terminates a process.
-.Pp
-Before termination it performs the following functions in the
-order listed:
-.Bl -enum -offset indent
-.It
-Call the functions registered with the
-.Xr atexit 3
-function, in the reverse order of their registration.
-.It
-Flush all open output streams.
-.It
-Close all open streams.
-.It
-Unlink all files created with the
-.Xr tmpfile 3
-function.
-.El
-.Pp
-Passing arbitrary values back to the environment as
-.Ar status
-is considered bad style. Instead, use the values as described in
-.Xr sysexits 3 .
-.Sh RETURN VALUES
-The
-.Fn exit
-function
-never returns.
-.Sh SEE ALSO
-.Xr _exit 2 ,
-.Xr atexit 3 ,
-.Xr intro 3 ,
-.Xr sysexits 3 ,
-.Xr tmpfile 3
-.Sh STANDARDS
-The
-.Fn exit
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/stdlib/exit.c b/lib/libc/stdlib/exit.c
deleted file mode 100644
index a8f6e24..0000000
--- a/lib/libc/stdlib/exit.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)exit.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-#include <unistd.h>
-#include "atexit.h"
-
-void (*__cleanup)();
-
-/*
- * Exit, flushing stdio buffers if necessary.
- */
-void
-exit(status)
- int status;
-{
- register struct atexit *p;
- register int n;
-
- for (p = __atexit; p; p = p->next)
- for (n = p->ind; --n >= 0;)
- (*p->fns[n])();
- if (__cleanup)
- (*__cleanup)();
- _exit(status);
-}
diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3
deleted file mode 100644
index f552d3d..0000000
--- a/lib/libc/stdlib/getenv.3
+++ /dev/null
@@ -1,151 +0,0 @@
-.\" Copyright (c) 1988, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getenv.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt GETENV 3
-.Os
-.Sh NAME
-.Nm getenv ,
-.Nm putenv ,
-.Nm setenv ,
-.Nm unsetenv
-.Nd environment variable functions
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft char *
-.Fn getenv "const char *name"
-.Ft int
-.Fn setenv "const char *name" "const char *value" "int overwrite"
-.Ft int
-.Fn putenv "const char *string"
-.Ft void
-.Fn unsetenv "const char *name"
-.Sh DESCRIPTION
-These functions set, unset and fetch environment variables from the
-host
-.Em environment list .
-For compatibility with differing environment conventions,
-the given arguments
-.Ar name
-and
-.Ar value
-may be appended and prepended,
-respectively,
-with an equal sign
-.Dq Li \&= .
-.Pp
-The
-.Fn getenv
-function obtains the current value of the environment variable,
-.Ar name .
-If the variable
-.Ar name
-is not in the current environment,
-a null pointer is returned.
-.Pp
-The
-.Fn setenv
-function inserts or resets the environment variable
-.Ar name
-in the current environment list.
-If the variable
-.Ar name
-does not exist in the list,
-it is inserted with the given
-.Ar value.
-If the variable does exist, the argument
-.Ar overwrite
-is tested; if
-.Ar overwrite is
-zero, the
-variable is not reset, otherwise it is reset
-to the given
-.Ar value .
-.Pp
-The
-.Fn putenv
-function takes an argument of the form ``name=value'' and is
-equivalent to:
-.Bd -literal -offset indent
-setenv(name, value, 1);
-.Ed
-.Pp
-The
-.Fn unsetenv
-function
-deletes all instances of the variable name pointed to by
-.Fa name
-from the list.
-.Sh RETURN VALUES
-The functions
-.Fn setenv
-and
-.Fn putenv
-return zero if successful; otherwise the global variable
-.Va errno
-is set to indicate the error and a
-\-1 is returned.
-.Sh ERRORS
-.Bl -tag -width [ENOMEM]
-.It Bq Er ENOMEM
-The function
-.Fn setenv
-or
-.Fn putenv
-failed because they were unable to allocate memory for the environment.
-.El
-.Sh SEE ALSO
-.Xr csh 1 ,
-.Xr sh 1 ,
-.Xr execve 2 ,
-.Xr environ 7
-.Sh STANDARDS
-The
-.Fn getenv
-function conforms to
-.St -ansiC .
-.Sh HISTORY
-The functions
-.Fn setenv
-and
-.Fn unsetenv
-appeared in
-.At v7 .
-The
-.Fn putenv
-function appeared in
-.Bx 4.3 Reno .
diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c
deleted file mode 100644
index a6bbd35..0000000
--- a/lib/libc/stdlib/getenv.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getenv.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-
-inline char *__findenv __P((const char *, int *));
-
-/*
- * __findenv --
- * Returns pointer to value associated with name, if any, else NULL.
- * Sets offset to be the offset of the name/value combination in the
- * environmental array, for use by setenv(3) and unsetenv(3).
- * Explicitly removes '=' in argument name.
- *
- * This routine *should* be a static; don't use it.
- */
-inline char *
-__findenv(name, offset)
- register const char *name;
- int *offset;
-{
- extern char **environ;
- register int len, i;
- register const char *np;
- register char **p, *cp;
-
- if (name == NULL || environ == NULL)
- return (NULL);
- for (np = name; *np && *np != '='; ++np)
- continue;
- len = np - name;
- for (p = environ; (cp = *p) != NULL; ++p) {
- for (np = name, i = len; i && *cp; i--)
- if (*cp++ != *np++)
- break;
- if (i == 0 && *cp++ == '=') {
- *offset = p - environ;
- return (cp);
- }
- }
- return (NULL);
-}
-
-/*
- * getenv --
- * Returns ptr to value associated with name, if any, else NULL.
- */
-char *
-getenv(name)
- const char *name;
-{
- int offset;
-
- return (__findenv(name, &offset));
-}
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3
deleted file mode 100644
index ad4a4dc..0000000
--- a/lib/libc/stdlib/getopt.3
+++ /dev/null
@@ -1,262 +0,0 @@
-.\" Copyright (c) 1988, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getopt.3 8.5 (Berkeley) 4/27/95
-.\"
-.Dd April 27, 1995
-.Dt GETOPT 3
-.Os BSD 4.3
-.Sh NAME
-.Nm getopt
-.Nd get option character from command line argument list
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Vt extern char *optarg;
-.Vt extern int optind;
-.Vt extern int optopt;
-.Vt extern int opterr;
-.Vt extern int optreset;
-.Ft int
-.Fn getopt "int argc" "char * const *argv" "const char *optstring"
-.Sh DESCRIPTION
-The
-.Fn getopt
-function incrementally parses a command line argument list
-.Fa argv
-and returns the next
-.Em known
-option character.
-An option character is
-.Em known
-if it has been specified in the string of accepted option characters,
-.Fa optstring .
-.Pp
-The option string
-.Fa optstring
-may contain the following elements: individual characters, and
-characters followed by a colon to indicate an option argument
-is to follow.
-For example, an option string
-.Li "\&""x""
-recognizes an option
-.Dq Fl x ,
-and an option string
-.Li "\&""x:""
-recognizes an option and argument
-.Dq Fl x Ar argument .
-It does not matter to
-.Fn getopt
-if a following argument has leading white space.
-.Pp
-On return from
-.Fn getopt ,
-.Va optarg
-points to an option argument, if it is anticipated,
-and the variable
-.Va optind
-contains the index to the next
-.Fa argv
-argument for a subsequent call
-to
-.Fn getopt .
-The variable
-.Va optopt
-saves the last
-.Em known
-option character returned by
-.Fn getopt .
-.Pp
-The variable
-.Va opterr
-and
-.Va optind
-are both initialized to 1.
-The
-.Va optind
-variable may be set to another value before a set of calls to
-.Fn getopt
-in order to skip over more or less argv entries.
-.Pp
-In order to use
-.Fn getopt
-to evaluate multiple sets of arguments, or to evaluate a single set of
-arguments multiple times,
-the variable
-.Va optreset
-must be set to 1 before the second and each additional set of calls to
-.Fn getopt ,
-and the variable
-.Va optind
-must be reinitialized.
-.Pp
-The
-.Fn getopt
-function
-returns \-1
-when the argument list is exhausted, or
-.Ql ?
-if a non-recognized
-option is encountered.
-The interpretation of options in the argument list may be canceled
-by the option
-.Ql --
-(double dash) which causes
-.Fn getopt
-to signal the end of argument processing and returns \-1.
-When all options have been processed (i.e., up to the first non-option
-argument),
-.Fn getopt
-returns \-1.
-.Sh DIAGNOSTICS
-If the
-.Fn getopt
-function encounters a character not found in the string
-.Va optarg
-or detects
-a missing option argument it writes an error message to the
-.Em stderr
-and returns
-.Ql ? .
-Setting
-.Va opterr
-to a zero will disable these error messages.
-If
-.Va optstring
-has a leading
-.Ql \&:
-then a missing option argument causes a
-.Ql \&:
-to be returned in addition to suppressing any error messages.
-.Pp
-Option arguments are allowed to begin with
-.Dq Li \- ;
-this is reasonable but
-reduces the amount of error checking possible.
-.Sh EXTENSIONS
-The
-.Va optreset
-variable was added to make it possible to call the
-.Fn getopt
-function multiple times.
-This is an extension to the
-.St -p1003.2
-specification.
-.Sh EXAMPLE
-.Bd -literal -compact
-extern char *optarg;
-extern int optind;
-int bflag, ch, fd;
-
-bflag = 0;
-while ((ch = getopt(argc, argv, "bf:")) != -1)
- switch(ch) {
- case 'b':
- bflag = 1;
- break;
- case 'f':
- if ((fd = open(optarg, O_RDONLY, 0)) < 0) {
- (void)fprintf(stderr,
- "myname: %s: %s\en", optarg, strerror(errno));
- exit(1);
- }
- break;
- case '?':
- default:
- usage();
-}
-argc -= optind;
-argv += optind;
-.Ed
-.Sh HISTORY
-The
-.Fn getopt
-function appeared
-.Bx 4.3 .
-.Sh BUGS
-The
-.Fn getopt
-function was once specified to return
-.Dv EOF
-instead of \-1.
-This was changed by
-.St -p1003.2-92
-to decouple
-.Fn getopt
-from
-.Pa <stdio.h> .
-.Pp
-A single dash
-.Dq Li -
-may be specified as a character in
-.Fa optstring ,
-however it should
-.Em never
-have an argument associated with it.
-This allows
-.Fn getopt
-to be used with programs that expect
-.Dq Li -
-as an option flag.
-This practice is wrong, and should not be used in any current development.
-It is provided for backward compatibility
-.Em only .
-By default, a single dash causes
-.Fn getopt
-to return \-1.
-This is, we believe, compatible with System V.
-.Pp
-It is also possible to handle digits as option letters.
-This allows
-.Fn getopt
-to be used with programs that expect a number
-.Pq Dq Li \&-\&3
-as an option.
-This practice is wrong, and should not be used in any current development.
-It is provided for backward compatibility
-.Em only .
-The following code fragment works in most cases.
-.Bd -literal -offset indent
-int length;
-char *p;
-
-while ((c = getopt(argc, argv, "0123456789")) != -1)
- switch (c) {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- p = argv[optind - 1];
- if (p[0] == '-' && p[1] == ch && !p[2])
- length = atoi(++p);
- else
- length = atoi(argv[optind] + 1);
- break;
- }
-}
-.Ed
diff --git a/lib/libc/stdlib/getopt.c b/lib/libc/stdlib/getopt.c
deleted file mode 100644
index 5dddf86..0000000
--- a/lib/libc/stdlib/getopt.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 1987, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int opterr = 1, /* if error message should be printed */
- optind = 1, /* index into parent argv vector */
- optopt, /* character checked for validity */
- optreset; /* reset getopt */
-char *optarg; /* argument associated with option */
-
-#define BADCH (int)'?'
-#define BADARG (int)':'
-#define EMSG ""
-
-/*
- * getopt --
- * Parse argc/argv argument vector.
- */
-int
-getopt(nargc, nargv, ostr)
- int nargc;
- char * const *nargv;
- const char *ostr;
-{
- extern char *__progname;
- static char *place = EMSG; /* option letter processing */
- char *oli; /* option letter list index */
-
- if (optreset || !*place) { /* update scanning pointer */
- optreset = 0;
- if (optind >= nargc || *(place = nargv[optind]) != '-') {
- place = EMSG;
- return (-1);
- }
- if (place[1] && *++place == '-') { /* found "--" */
- ++optind;
- place = EMSG;
- return (-1);
- }
- } /* option letter okay? */
- if ((optopt = (int)*place++) == (int)':' ||
- !(oli = strchr(ostr, optopt))) {
- /*
- * if the user didn't specify '-' as an option,
- * assume it means -1.
- */
- if (optopt == (int)'-')
- return (-1);
- if (!*place)
- ++optind;
- if (opterr && *ostr != ':')
- (void)fprintf(stderr,
- "%s: illegal option -- %c\n", __progname, optopt);
- return (BADCH);
- }
- if (*++oli != ':') { /* don't need argument */
- optarg = NULL;
- if (!*place)
- ++optind;
- }
- else { /* need an argument */
- if (*place) /* no white space */
- optarg = place;
- else if (nargc <= ++optind) { /* no arg */
- place = EMSG;
- if (*ostr == ':')
- return (BADARG);
- if (opterr)
- (void)fprintf(stderr,
- "%s: option requires an argument -- %c\n",
- __progname, optopt);
- return (BADCH);
- }
- else /* white space */
- optarg = nargv[optind];
- place = EMSG;
- ++optind;
- }
- return (optopt); /* dump back option letter */
-}
diff --git a/lib/libc/stdlib/getsubopt.3 b/lib/libc/stdlib/getsubopt.3
deleted file mode 100644
index 3f6f547..0000000
--- a/lib/libc/stdlib/getsubopt.3
+++ /dev/null
@@ -1,146 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getsubopt.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt GETSUBOPT 3
-.Os
-.Sh NAME
-.Nm getsubopt
-.Nd get sub options from an argument
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Vt extern char *suboptarg
-.Ft int
-.Fn getsubopt "char **optionp" "char * const *tokens" "char **valuep"
-.Sh DESCRIPTION
-The
-.Fn getsubopt
-function
-parses a string containing tokens delimited by one or more tab, space or
-comma
-.Pq Ql \&,
-characters.
-It is intended for use in parsing groups of option arguments provided
-as part of a utility command line.
-.Pp
-The argument
-.Fa optionp
-is a pointer to a pointer to the string.
-The argument
-.Fa tokens
-is a pointer to a
-.Dv NULL Ns -terminated
-array of pointers to strings.
-.Pp
-The
-.Fn getsubopt
-function
-returns the zero-based offset of the pointer in the
-.Fa tokens
-array referencing a string which matches the first token
-in the string, or, \-1 if the string contains no tokens or
-.Fa tokens
-does not contain a matching string.
-.Pp
-If the token is of the form ``name=value'', the location referenced by
-.Fa valuep
-will be set to point to the start of the ``value'' portion of the token.
-.Pp
-On return from
-.Fn getsubopt ,
-.Fa optionp
-will be set to point to the start of the next token in the string,
-or the null at the end of the string if no more tokens are present.
-The external variable
-.Fa suboptarg
-will be set to point to the start of the current token, or
-.Dv NULL
-if no
-tokens were present.
-The argument
-.Fa valuep
-will be set to point to the ``value'' portion of the token, or
-.Dv NULL
-if no ``value'' portion was present.
-.Sh EXAMPLE
-.Bd -literal -compact
-char *tokens[] = {
- #define ONE 0
- "one",
- #define TWO 1
- "two",
- NULL
-};
-
-\&...
-
-extern char *optarg, *suboptarg;
-char *options, *value;
-
-while ((ch = getopt(argc, argv, "ab:")) != \-1) {
- switch(ch) {
- case 'a':
- /* process ``a'' option */
- break;
- case 'b':
- options = optarg;
- while (*options) {
- switch(getsubopt(&options, tokens, &value)) {
- case ONE:
- /* process ``one'' sub option */
- break;
- case TWO:
- /* process ``two'' sub option */
- if (!value)
- error("no value for two");
- i = atoi(value);
- break;
- case \-1:
- if (suboptarg)
- error("illegal sub option %s",
- suboptarg);
- else
- error("missing sub option");
- break;
- }
- break;
- }
-.Ed
-.Sh SEE ALSO
-.Xr getopt 3 ,
-.Xr strsep 3
-.Sh HISTORY
-The
-.Fn getsubopt
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/stdlib/getsubopt.c b/lib/libc/stdlib/getsubopt.c
deleted file mode 100644
index bc055b8..0000000
--- a/lib/libc/stdlib/getsubopt.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)getsubopt.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <unistd.h>
-#include <stdlib.h>
-
-/*
- * The SVID interface to getsubopt provides no way of figuring out which
- * part of the suboptions list wasn't matched. This makes error messages
- * tricky... The extern variable suboptarg is a pointer to the token
- * which didn't match.
- */
-char *suboptarg;
-
-int
-getsubopt(optionp, tokens, valuep)
- register char **optionp, **valuep;
- register char * const *tokens;
-{
- register int cnt;
- register char *p;
-
- suboptarg = *valuep = NULL;
-
- if (!optionp || !*optionp)
- return(-1);
-
- /* skip leading white-space, commas */
- for (p = *optionp; *p && (*p == ',' || *p == ' ' || *p == '\t'); ++p);
-
- if (!*p) {
- *optionp = p;
- return(-1);
- }
-
- /* save the start of the token, and skip the rest of the token. */
- for (suboptarg = p;
- *++p && *p != ',' && *p != '=' && *p != ' ' && *p != '\t';);
-
- if (*p) {
- /*
- * If there's an equals sign, set the value pointer, and
- * skip over the value part of the token. Terminate the
- * token.
- */
- if (*p == '=') {
- *p = '\0';
- for (*valuep = ++p;
- *p && *p != ',' && *p != ' ' && *p != '\t'; ++p);
- if (*p)
- *p++ = '\0';
- } else
- *p++ = '\0';
- /* Skip any whitespace or commas after this token. */
- for (; *p && (*p == ',' || *p == ' ' || *p == '\t'); ++p);
- }
-
- /* set optionp for next round. */
- *optionp = p;
-
- for (cnt = 0; *tokens; ++tokens, ++cnt)
- if (!strcmp(suboptarg, *tokens))
- return(cnt);
- return(-1);
-}
diff --git a/lib/libc/stdlib/heapsort.c b/lib/libc/stdlib/heapsort.c
deleted file mode 100644
index 9649553..0000000
--- a/lib/libc/stdlib/heapsort.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Ronnie Kon at Mindcraft Inc., Kevin Lew and Elmer Yglesias.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)heapsort.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <errno.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-/*
- * Swap two areas of size number of bytes. Although qsort(3) permits random
- * blocks of memory to be sorted, sorting pointers is almost certainly the
- * common case (and, were it not, could easily be made so). Regardless, it
- * isn't worth optimizing; the SWAP's get sped up by the cache, and pointer
- * arithmetic gets lost in the time required for comparison function calls.
- */
-#define SWAP(a, b, count, size, tmp) { \
- count = size; \
- do { \
- tmp = *a; \
- *a++ = *b; \
- *b++ = tmp; \
- } while (--count); \
-}
-
-/* Copy one block of size size to another. */
-#define COPY(a, b, count, size, tmp1, tmp2) { \
- count = size; \
- tmp1 = a; \
- tmp2 = b; \
- do { \
- *tmp1++ = *tmp2++; \
- } while (--count); \
-}
-
-/*
- * Build the list into a heap, where a heap is defined such that for
- * the records K1 ... KN, Kj/2 >= Kj for 1 <= j/2 <= j <= N.
- *
- * There two cases. If j == nmemb, select largest of Ki and Kj. If
- * j < nmemb, select largest of Ki, Kj and Kj+1.
- */
-#define CREATE(initval, nmemb, par_i, child_i, par, child, size, count, tmp) { \
- for (par_i = initval; (child_i = par_i * 2) <= nmemb; \
- par_i = child_i) { \
- child = base + child_i * size; \
- if (child_i < nmemb && compar(child, child + size) < 0) { \
- child += size; \
- ++child_i; \
- } \
- par = base + par_i * size; \
- if (compar(child, par) <= 0) \
- break; \
- SWAP(par, child, count, size, tmp); \
- } \
-}
-
-/*
- * Select the top of the heap and 'heapify'. Since by far the most expensive
- * action is the call to the compar function, a considerable optimization
- * in the average case can be achieved due to the fact that k, the displaced
- * elememt, is ususally quite small, so it would be preferable to first
- * heapify, always maintaining the invariant that the larger child is copied
- * over its parent's record.
- *
- * Then, starting from the *bottom* of the heap, finding k's correct place,
- * again maintianing the invariant. As a result of the invariant no element
- * is 'lost' when k is assigned its correct place in the heap.
- *
- * The time savings from this optimization are on the order of 15-20% for the
- * average case. See Knuth, Vol. 3, page 158, problem 18.
- *
- * XXX Don't break the #define SELECT line, below. Reiser cpp gets upset.
- */
-#define SELECT(par_i, child_i, nmemb, par, child, size, k, count, tmp1, tmp2) { \
- for (par_i = 1; (child_i = par_i * 2) <= nmemb; par_i = child_i) { \
- child = base + child_i * size; \
- if (child_i < nmemb && compar(child, child + size) < 0) { \
- child += size; \
- ++child_i; \
- } \
- par = base + par_i * size; \
- COPY(par, child, count, size, tmp1, tmp2); \
- } \
- for (;;) { \
- child_i = par_i; \
- par_i = child_i / 2; \
- child = base + child_i * size; \
- par = base + par_i * size; \
- if (child_i == 1 || compar(k, par) < 0) { \
- COPY(child, k, count, size, tmp1, tmp2); \
- break; \
- } \
- COPY(child, par, count, size, tmp1, tmp2); \
- } \
-}
-
-/*
- * Heapsort -- Knuth, Vol. 3, page 145. Runs in O (N lg N), both average
- * and worst. While heapsort is faster than the worst case of quicksort,
- * the BSD quicksort does median selection so that the chance of finding
- * a data set that will trigger the worst case is nonexistent. Heapsort's
- * only advantage over quicksort is that it requires little additional memory.
- */
-int
-heapsort(vbase, nmemb, size, compar)
- void *vbase;
- size_t nmemb, size;
- int (*compar) __P((const void *, const void *));
-{
- register int cnt, i, j, l;
- register char tmp, *tmp1, *tmp2;
- char *base, *k, *p, *t;
-
- if (nmemb <= 1)
- return (0);
-
- if (!size) {
- errno = EINVAL;
- return (-1);
- }
-
- if ((k = malloc(size)) == NULL)
- return (-1);
-
- /*
- * Items are numbered from 1 to nmemb, so offset from size bytes
- * below the starting address.
- */
- base = (char *)vbase - size;
-
- for (l = nmemb / 2 + 1; --l;)
- CREATE(l, nmemb, i, j, t, p, size, cnt, tmp);
-
- /*
- * For each element of the heap, save the largest element into its
- * final slot, save the displaced element (k), then recreate the
- * heap.
- */
- while (nmemb > 1) {
- COPY(k, base + nmemb * size, cnt, size, tmp1, tmp2);
- COPY(base + nmemb * size, base + size, cnt, size, tmp1, tmp2);
- --nmemb;
- SELECT(i, j, nmemb, t, p, size, k, cnt, tmp1, tmp2);
- }
- free(k);
- return (0);
-}
diff --git a/lib/libc/stdlib/labs.3 b/lib/libc/stdlib/labs.3
deleted file mode 100644
index 2dba8cc..0000000
--- a/lib/libc/stdlib/labs.3
+++ /dev/null
@@ -1,66 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)labs.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt LABS 3
-.Os
-.Sh NAME
-.Nm labs
-.Nd return the absolute value of a long integer
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft long
-.Fn labs "long j"
-.Sh DESCRIPTION
-The
-.Fn labs
-function
-returns the absolute value of the long integer
-.Ar j .
-.Sh SEE ALSO
-.Xr abs 3 ,
-.Xr cabs 3 ,
-.Xr floor 3 ,
-.Xr math 3
-.Sh STANDARDS
-The
-.Fn labs
-function
-conforms to
-.St -ansiC .
-.Sh BUGS
-The absolute value of the most negative integer remains negative.
diff --git a/lib/libc/stdlib/labs.c b/lib/libc/stdlib/labs.c
deleted file mode 100644
index 4adc398..0000000
--- a/lib/libc/stdlib/labs.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)labs.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-
-long
-labs(j)
- long j;
-{
- return(j < 0 ? -j : j);
-}
diff --git a/lib/libc/stdlib/ldiv.3 b/lib/libc/stdlib/ldiv.3
deleted file mode 100644
index 2b61499..0000000
--- a/lib/libc/stdlib/ldiv.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ldiv.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt LDIV 3
-.Os
-.Sh NAME
-.Nm ldiv
-.Nd return quotient and remainder from division
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft ldiv_t
-.Fn ldiv "long num" "long denom"
-.Sh DESCRIPTION
-The
-.Fn ldiv
-function
-computes the value
-.Ar num/denom
-and returns the quotient and remainder in a structure named
-.Ar ldiv_t
-that contains two
-.Em long integer
-members named
-.Ar quot
-and
-.Ar rem .
-.Sh SEE ALSO
-.Xr div 3 ,
-.Xr math 3
-.Sh STANDARDS
-The
-.Fn ldiv
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/stdlib/ldiv.c b/lib/libc/stdlib/ldiv.c
deleted file mode 100644
index d458efd..0000000
--- a/lib/libc/stdlib/ldiv.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ldiv.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h> /* ldiv_t */
-
-ldiv_t
-ldiv(num, denom)
- long num, denom;
-{
- ldiv_t r;
-
- /* see div.c for comments */
-
- r.quot = num / denom;
- r.rem = num % denom;
- if (num >= 0 && r.rem < 0) {
- r.quot++;
- r.rem -= denom;
- }
- return (r);
-}
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
deleted file mode 100644
index a7d3240..0000000
--- a/lib/libc/stdlib/malloc.3
+++ /dev/null
@@ -1,424 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)malloc.3 8.1 (Berkeley) 6/4/93
-.\" $Id: malloc.3,v 1.14 1997/08/27 06:40:34 phk Exp $
-.\"
-.Dd August 27, 1996
-.Dt MALLOC 3
-.Os FreeBSD 2
-.Sh NAME
-.Nm malloc, calloc, realloc, free
-.Nd general purpose memory allocation functions
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft void *
-.Fn malloc "size_t size"
-.Ft void *
-.Fn calloc "size_t number" "size_t size"
-.Ft void *
-.Fn realloc "void *ptr" "size_t size"
-.Ft void
-.Fn free "void *ptr"
-.Ft char *
-.Va malloc_options;
-.Sh DESCRIPTION
-The
-.Fn malloc
-function allocates
-.Fa size
-bytes of memory.
-The allocated space is suitably aligned (after possible pointer coercion)
-for storage of any type of object.
-If the space is at least
-.Em pagesize
-bytes in length (see
-.Xr getpagesize (3)),
-the returned memory will be page boundary aligned as well.
-If
-.Fn malloc
-fails, a NULL pointer is returned.
-.Pp
-The
-.Fn calloc
-function allocates space for
-.Fa number
-objects,
-each
-.Fa size
-bytes in length.
-The result is identical to calling
-.Fn malloc
-with an argument of
-.Dq "number * size" ,
-with the exception that the allocated memory is initialized to nul bytes.
-.Pp
-The
-.Fn realloc
-function changes the size of the previously allocated memory referenced by
-.Fa ptr
-to
-.Fa size
-bytes.
-The contents of the memory are unchanged up to the lesser of the new and
-old sizes.
-If the new size is larger,
-the value of the newly allocated portion of the memory is undefined.
-If the requested memory cannot be allocated, NULL is returned and
-the memory referenced by
-.Fa ptr
-is valid and unchanged.
-If
-.Fa ptr
-is NULL, the
-.Fn realloc
-function behaves identically to
-.Fn malloc
-for the specified size.
-.Pp
-The
-.Fn free
-function causes the allocated memory referenced by
-.Fa ptr
-to be made available for future allocations.
-If
-.Fa ptr
-is NULL, no action occurs.
-.Sh TUNING
-Once, when the first call is made to one of these memory allocation
-routines, various flags will be set or reset, which affect the
-workings of this allocation implementation.
-.Pp
-The ``name'' of the file referenced by the symbolic link named
-.Pa /etc/malloc.conf ,
-the value of the environment variable
-.Ev MALLOC_OPTIONS ,
-and the string pointed to by the global variable
-.Va malloc_options
-will be interpreted, in that order, character by character as flags.
-.Pp
-Most flags are single letters,
-where uppercase indicates that the behavior is set, or on,
-and lowercase means that the behavior is not set, or off.
-.Bl -tag -width indent
-.It A
-All warnings (except for the warning about unknown
-flags being set), and failure to allocate memory become fatal.
-The process will call
-.Fn abort 3
-in these cases.
-.It J
-Each byte of new memory allocated by
-.Fn malloc
-or
-.Fn realloc
-as well as all memory returned by
-.Fn free
-or
-.Fn realloc
-will be initialized to 0xd0.
-This options also sets the
-.Dq R
-option.
-This is intended for debugging and will impact performance negatively.
-.It H
-Pass a hint to the kernel about pages unused by the allocation functions.
-This will help performance if the system is paging excessively. This
-option is on by default.
-.It R
-Cause the
-.Fn realloc
-function to always reallocate memory even if the initial allocation was
-sufficiently large.
-This can substantially aid in compacting memory.
-.It U
-Generate
-.Dq utrace
-entries for
-.Xr ktrace 1 ,
-for all operations.
-Consult the source for details on this option.
-.It V
-Attempting to allocate zero bytes will return a NULL pointer instead of
-a valid pointer.
-(The default behavior is to make a minimal allocation and return a
-pointer to it.)
-This option is provided for System V compatibility.
-This option is incompatible with the
-.Dq X
-option.
-.It X
-Rather than return failure for any allocation function,
-display a diagnostic message on stderr and cause the program to drop
-core (using
-.Fn abort 3 ).
-This option should be set at compile time by including the following in
-the source code:
-.Bd -literal -offset indent
-extern char *malloc_options;
-malloc_options = "X";
-.Ed
-.It Z
-This option implicitly sets the
-.Dq J
-and
-.Dq R
-options, and then zeros out the bytes that were requested.
-This is intended for debugging and will impact performance negatively.
-.It <
-Reduce the size of the cache by a factor of two.
-The default cache size is 16 pages.
-This option can be specified multiple times.
-.It >
-Double the size of the cache by a factor of two.
-The default cache size is 16 pages.
-This option can be specified multiple times.
-.El
-.Pp
-The
-.Dq J
-and
-.Dq Z
-options are intended for testing and debugging.
-An application which changes its behavior when these options are used
-is flawed.
-.Sh EXAMPLES
-To set a systemwide reduction of cache size, and to dump core whenever
-a problem occurs:
-.Pp
-.Bd -literal -offset indent
-ln -s 'A<' /etc/malloc.conf
-.Ed
-.Pp
-To specify in the source that a program does no return value checking
-on calls to these functions:
-.Bd -literal -offset indent
-extern char *malloc_options;
-malloc_options = "X";
-.Ed
-.Sh ENVIRONMENT
-The following environment variables affect the execution of the allocation
-functions:
-.Bl -tag -width MMM
-.It Ev MALLOC_OPTIONS
-If the environment variable
-.Ev MALLOC_OPTIONS
-is set, the characters it contains will be interpreted as flags to the
-allocation functions.
-.Sh RETURN VALUES
-The
-.Fn malloc
-and
-.Fn calloc
-functions return a pointer to the allocated memory if successful; otherwise
-a NULL pointer is returned.
-.Pp
-The
-.Fn realloc
-function returns a pointer, possibly identical to
-.Fa ptr ,
-to the allocated memory
-if successful; otherwise a NULL pointer is returned, in which case the
-memory referenced by
-.Fa ptr
-is still available and intact.
-.Pp
-The
-.Fn free
-function returns no value.
-.Sh "DEBUGGING MALLOC PROBLEMS"
-.Pp
-The major difference between this implementation and other allocation
-implementations is that the free pages are not accessed unless allocated,
-and are aggressively returned to the kernel for reuse.
-.Bd -filled -offset indent
-Most allocation implementations will store a data structure containing a
-linked list in the free chunks of memory,
-used to tie all the free memory together.
-That can be suboptimal,
-as every time the free-list is traversed,
-the otherwise unused, and likely paged out,
-pages are faulted into primary memory.
-On systems which are paging,
-this can result in a factor of five increase in the number of page-faults
-done by a process.
-.Ed
-.Pp
-A side effect of this architecture is that many minor transgressions on
-the interface which would traditionally not be detected are in fact
-detected. As a result, programs that have been running happily for
-years may suddenly start to complain loudly, when linked with this
-allocation implementation.
-.Pp
-The first and most important thing to do is to set the
-.Dq A
-option.
-This option forces a coredump (if possible) at the first sign of trouble,
-rather than the normal policy of trying to continue if at all possible.
-.Pp
-It is probably also a good idea to recompile the program with suitable
-options and symbols for debugger support.
-.Pp
-If the program starts to give unusual results, coredump or generally behave
-differently without emitting any of the messages listed in the next
-section, it is likely because it depends on the storage being filled with
-nul bytes. Try running it with
-.Dq Z
-option set;
-if that improves the situation, this diagnosis has been confirmed.
-If the program still misbehaves,
-the likely problem is accessing memory outside the allocated area,
-more likely after than before the allocated area.
-.Pp
-Alternatively, if the symptoms are not easy to reproduce, setting the
-.Dq J
-option may help provoke the problem.
-.Pp
-In truly difficult cases, the
-.Dq U
-option, if supported by the kernel, can provide a detailed trace of
-all calls made to these functions.
-.Pp
-Unfortunately this implementation does not provide much detail about
-the problems it detects, the performance impact for storing such information
-would be prohibitive.
-There are a number of allocation implementations available on the 'Net
-which focus on detecting and pinpointing problems by trading performance
-for extra sanity checks and detailed diagnostics.
-.Sh "DIAGNOSTIC MESSAGES
-If
-.Fn malloc ,
-.Fn calloc ,
-.Fn realloc
-or
-.Fn free
-detect an error or warning condition,
-a message will be printed to file descriptor STDERR_FILENO.
-Errors will result in the process dumping core.
-If the
-.Dq A
-option is set, all warnings are treated as errors.
-.Pp
-The following is a brief description of possible error messages and
-their meanings:
-.Pp
-.Bl -tag -width indent
-.It "(ES): mumble mumble mumble
-The allocation functions were compiled with
-.Dq EXTRA_SANITY
-defined, and an error was found during the additional error checking.
-Consult the source code for further information.
-.It "allocation failed
-If the
-.Dq A
-option is specified it is a fatal error for an allocation function to fail.
-.It "mmap(2) failed, check limits
-This most likely means that the system is dangerously overloaded or that
-the process' limits are incorrectly specified.
-.It "freelist is destroyed
-The internal free-list has been corrupted.
-.El
-.Pp
-.Bl -tag -width indent
-The following is a brief description of possible warning messages and
-their meanings:
-.Pp
-.It "chunk/page is already free
-The process attempted to
-.Fn free
-memory which had already been freed.
-.It "junk pointer ...
-A pointer specified to one of the allocation functions points outside the
-bounds of the memory of which they are aware.
-.It "malloc() has never been called
-No memory has been allocated,
-yet something is being freed or
-realloc'ed.
-.It "modified (chunk-/page-) pointer
-The pointer passed to
-.Fn free
-or
-.Fn realloc
-has been modified.
-.It "pointer to wrong page
-The pointer that
-.Fn malloc
-or
-.Fn calloc
-is trying to free does not reference a possible page.
-.It "recursive call
-A process has attempted to call an allocation function recursively.
-This is not permitted. In particular, signal handlers should not
-attempt to allocate memory.
-.It "out of memory
-The
-.Dq X
-option was specified and an allocation of memory failed.
-.It "unknown char in MALLOC_OPTIONS
-An unknown option was specified.
-Even with the
-.Dq A
-option set, this warning is still only a warning.
-.Sh SEE ALSO
-.Xr brk 2 ,
-.Xr alloca 3 ,
-.Xr getpagesize 3 ,
-.Xr memory 3
-.Pa /usr/share/doc/papers/malloc.ascii.gz
-.Sh STANDARDS
-The
-.Fn malloc ,
-.Fn calloc ,
-.Fn realloc
-and
-.Fn free
-functions conform to
-.St -ansiC .
-.Sh BUGS
-The messages printed in case of problems provide no detail about the
-actual values.
-.Pp
-It can be argued that returning a null pointer when asked to
-allocate zero bytes is a silly response to a silly question.
-.Pp
-This implementation was authored by Poul-Henning Kamp.
-Please report any problems to him at
-.Li <phk@FreeBSD.org> .
-.Sh HISTORY
-The present allocation implementation started out as a filesystem for a
-drum attached to a 20bit binary challenged computer which was built
-with discrete germanium transistors. It has since graduated to
-handle primary storage rather than secondary.
-It first appeared in its new shape and ability in FreeBSD release 2.2.
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
deleted file mode 100644
index 2fb306eb..0000000
--- a/lib/libc/stdlib/malloc.c
+++ /dev/null
@@ -1,1136 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id: malloc.c,v 1.33 1997/12/15 02:12:42 jb Exp $
- *
- */
-
-/*
- * Defining EXTRA_SANITY will enable extra checks which are related
- * to internal conditions and consistency in malloc.c. This has a
- * noticeable runtime performance hit, and generally will not do you
- * any good unless you fiddle with the internals of malloc or want
- * to catch random pointer corruption as early as possible.
- */
-#ifndef MALLOC_EXTRA_SANITY
-#undef MALLOC_EXTRA_SANITY
-#endif
-
-/*
- * What to use for Junk. This is the byte value we use to fill with
- * when the 'J' option is enabled.
- */
-#define SOME_JUNK 0xd0 /* as in "Duh" :-) */
-
-/*
- * The basic parameters you can tweak.
- *
- * malloc_pageshift pagesize = 1 << malloc_pageshift
- * It's probably best if this is the native
- * page size, but it doesn't have to be.
- *
- * malloc_minsize minimum size of an allocation in bytes.
- * If this is too small it's too much work
- * to manage them. This is also the smallest
- * unit of alignment used for the storage
- * returned by malloc/realloc.
- *
- */
-
-#if defined(__FreeBSD__)
-# if defined(__i386__)
-# define malloc_pageshift 12U
-# define malloc_minsize 16U
-# endif
-# define HAS_UTRACE
-# if defined(_THREAD_SAFE)
-# include <pthread.h>
-# include "pthread_private.h"
-# define THREAD_STATUS int thread_lock_status;
-# define THREAD_LOCK() _thread_kern_sig_block(&thread_lock_status);
-# define THREAD_UNLOCK() _thread_kern_sig_unblock(thread_lock_status);
- static struct pthread_mutex _malloc_lock = PTHREAD_MUTEX_INITIALIZER;
- static pthread_mutex_t malloc_lock = &_malloc_lock;
-# endif
-#endif /* __FreeBSD__ */
-
-#if defined(__sparc__) && defined(sun)
-# define malloc_pageshift 12U
-# define malloc_minsize 16U
-# define MAP_ANON (0)
- static int fdzero;
-# define MMAP_FD fdzero
-# define INIT_MMAP() \
- { if ((fdzero=open("/dev/zero", O_RDWR, 0000)) == -1) \
- wrterror("open of /dev/zero"); }
-# define MADV_FREE MADV_DONTNEED
-#endif /* __sparc__ */
-
-/* Insert your combination here... */
-#if defined(__FOOCPU__) && defined(__BAROS__)
-# define malloc_pageshift 12U
-# define malloc_minsize 16U
-#endif /* __FOOCPU__ && __BAROS__ */
-
-
-/*
- * No user serviceable parts behind this point.
- */
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/*
- * This structure describes a page worth of chunks.
- */
-
-struct pginfo {
- struct pginfo *next; /* next on the free list */
- void *page; /* Pointer to the page */
- u_short size; /* size of this page's chunks */
- u_short shift; /* How far to shift for this size chunks */
- u_short free; /* How many free chunks */
- u_short total; /* How many chunk */
- u_int bits[1]; /* Which chunks are free */
-};
-
-/*
- * This structure describes a number of free pages.
- */
-
-struct pgfree {
- struct pgfree *next; /* next run of free pages */
- struct pgfree *prev; /* prev run of free pages */
- void *page; /* pointer to free pages */
- void *end; /* pointer to end of free pages */
- size_t size; /* number of bytes free */
-};
-
-/*
- * How many bits per u_int in the bitmap.
- * Change only if not 8 bits/byte
- */
-#define MALLOC_BITS (8*sizeof(u_int))
-
-/*
- * Magic values to put in the page_directory
- */
-#define MALLOC_NOT_MINE ((struct pginfo*) 0)
-#define MALLOC_FREE ((struct pginfo*) 1)
-#define MALLOC_FIRST ((struct pginfo*) 2)
-#define MALLOC_FOLLOW ((struct pginfo*) 3)
-#define MALLOC_MAGIC ((struct pginfo*) 4)
-
-#ifndef malloc_pageshift
-#define malloc_pageshift 12U
-#endif
-
-#ifndef malloc_minsize
-#define malloc_minsize 16U
-#endif
-
-#if !defined(malloc_pagesize)
-#define malloc_pagesize (1UL<<malloc_pageshift)
-#endif
-
-#if ((1<<malloc_pageshift) != malloc_pagesize)
-#error "(1<<malloc_pageshift) != malloc_pagesize"
-#endif
-
-#ifndef malloc_maxsize
-#define malloc_maxsize ((malloc_pagesize)>>1)
-#endif
-
-/* A mask for the offset inside a page. */
-#define malloc_pagemask ((malloc_pagesize)-1)
-
-#define pageround(foo) (((foo) + (malloc_pagemask))&(~(malloc_pagemask)))
-#define ptr2index(foo) (((u_long)(foo) >> malloc_pageshift)-malloc_origo)
-
-#ifndef THREAD_STATUS
-#define THREAD_STATUS
-#endif
-
-#ifndef THREAD_LOCK
-#define THREAD_LOCK()
-#endif
-
-#ifndef THREAD_UNLOCK
-#define THREAD_UNLOCK()
-#endif
-
-#ifndef MMAP_FD
-#define MMAP_FD (-1)
-#endif
-
-#ifndef INIT_MMAP
-#define INIT_MMAP()
-#endif
-
-/* Set when initialization has been done */
-static unsigned malloc_started;
-
-/* Recusion flag for public interface. */
-static int malloc_active;
-
-/* Number of free pages we cache */
-static unsigned malloc_cache = 16;
-
-/* The offset from pagenumber to index into the page directory */
-static u_long malloc_origo;
-
-/* The last index in the page directory we care about */
-static u_long last_index;
-
-/* Pointer to page directory. Allocated "as if with" malloc */
-static struct pginfo **page_dir;
-
-/* How many slots in the page directory */
-static unsigned malloc_ninfo;
-
-/* Free pages line up here */
-static struct pgfree free_list;
-
-/* Abort(), user doesn't handle problems. */
-static int malloc_abort;
-
-/* Are we trying to die ? */
-static int suicide;
-
-/* always realloc ? */
-static int malloc_realloc;
-
-/* pass the kernel a hint on free pages ? */
-static int malloc_hint = 1;
-
-/* xmalloc behaviour ? */
-static int malloc_xmalloc;
-
-/* sysv behaviour for malloc(0) ? */
-static int malloc_sysv;
-
-/* zero fill ? */
-static int malloc_zero;
-
-/* junk fill ? */
-static int malloc_junk;
-
-#ifdef HAS_UTRACE
-
-/* utrace ? */
-static int malloc_utrace;
-
-struct ut { void *p; size_t s; void *r; };
-
-void utrace __P((struct ut *, int));
-
-#define UTRACE(a, b, c) \
- if (malloc_utrace) \
- {struct ut u; u.p=a; u.s = b; u.r=c; utrace(&u, sizeof u);}
-#else /* !HAS_UTRACE */
-#define UTRACE(a,b,c)
-#endif /* HAS_UTRACE */
-
-/* my last break. */
-static void *malloc_brk;
-
-/* one location cache for free-list holders */
-static struct pgfree *px;
-
-/* compile-time options */
-char *malloc_options;
-
-/* Name of the current public function */
-static char *malloc_func;
-
-/* Macro for mmap */
-#define MMAP(size) \
- mmap(0, (size), PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, \
- MMAP_FD, 0);
-
-/*
- * Necessary function declarations
- */
-static int extend_pgdir(u_long index);
-static void *imalloc(size_t size);
-static void ifree(void *ptr);
-static void *irealloc(void *ptr, size_t size);
-
-extern char *__progname;
-
-static void
-wrterror(char *p)
-{
- char *q = " error: ";
- write(STDERR_FILENO, __progname, strlen(__progname));
- write(STDERR_FILENO, malloc_func, strlen(malloc_func));
- write(STDERR_FILENO, q, strlen(q));
- write(STDERR_FILENO, p, strlen(p));
- suicide = 1;
- abort();
-}
-
-static void
-wrtwarning(char *p)
-{
- char *q = " warning: ";
- if (malloc_abort)
- wrterror(p);
- write(STDERR_FILENO, __progname, strlen(__progname));
- write(STDERR_FILENO, malloc_func, strlen(malloc_func));
- write(STDERR_FILENO, q, strlen(q));
- write(STDERR_FILENO, p, strlen(p));
-}
-
-
-/*
- * Allocate a number of pages from the OS
- */
-static void *
-map_pages(int pages)
-{
- caddr_t result, tail;
-
- result = (caddr_t)pageround((u_long)sbrk(0));
- tail = result + (pages << malloc_pageshift);
-
- if (brk(tail)) {
-#ifdef EXTRA_SANITY
- wrterror("(ES): map_pages fails\n");
-#endif /* EXTRA_SANITY */
- return 0;
- }
-
- last_index = ptr2index(tail) - 1;
- malloc_brk = tail;
-
- if ((last_index+1) >= malloc_ninfo && !extend_pgdir(last_index))
- return 0;;
-
- return result;
-}
-
-/*
- * Extend page directory
- */
-static int
-extend_pgdir(u_long index)
-{
- struct pginfo **new, **old;
- int i, oldlen;
-
- /* Make it this many pages */
- i = index * sizeof *page_dir;
- i /= malloc_pagesize;
- i += 2;
-
- /* remember the old mapping size */
- oldlen = malloc_ninfo * sizeof *page_dir;
-
- /*
- * NOTE: we allocate new pages and copy the directory rather than tempt
- * fate by trying to "grow" the region.. There is nothing to prevent
- * us from accidently re-mapping space that's been allocated by our caller
- * via dlopen() or other mmap().
- *
- * The copy problem is not too bad, as there is 4K of page index per
- * 4MB of malloc arena.
- *
- * We can totally avoid the copy if we open a file descriptor to associate
- * the anon mappings with. Then, when we remap the pages at the new
- * address, the old pages will be "magically" remapped.. But this means
- * keeping open a "secret" file descriptor.....
- */
-
- /* Get new pages */
- new = (struct pginfo**) MMAP(i * malloc_pagesize);
- if (new == (struct pginfo **)-1)
- return 0;
-
- /* Copy the old stuff */
- memcpy(new, page_dir,
- malloc_ninfo * sizeof *page_dir);
-
- /* register the new size */
- malloc_ninfo = i * malloc_pagesize / sizeof *page_dir;
-
- /* swap the pointers */
- old = page_dir;
- page_dir = new;
-
- /* Now free the old stuff */
- munmap(old, oldlen);
- return 1;
-}
-
-/*
- * Initialize the world
- */
-static void
-malloc_init ()
-{
- char *p, b[64];
- int i, j;
-
- INIT_MMAP();
-
-#ifdef EXTRA_SANITY
- malloc_junk = 1;
-#endif /* EXTRA_SANITY */
-
- for (i = 0; i < 3; i++) {
- if (i == 0) {
- j = readlink("/etc/malloc.conf", b, sizeof b - 1);
- if (j <= 0)
- continue;
- b[j] = '\0';
- p = b;
- } else if (i == 1) {
- p = getenv("MALLOC_OPTIONS");
- } else {
- p = malloc_options;
- }
- for (; p && *p; p++) {
- switch (*p) {
- case '>': malloc_cache <<= 1; break;
- case '<': malloc_cache >>= 1; break;
- case 'a': malloc_abort = 0; break;
- case 'A': malloc_abort = 1; break;
- case 'h': malloc_hint = 0; break;
- case 'H': malloc_hint = 1; break;
- case 'r': malloc_realloc = 0; break;
- case 'R': malloc_realloc = 1; break;
- case 'j': malloc_junk = 0; break;
- case 'J': malloc_junk = 1; break;
-#ifdef HAS_UTRACE
- case 'u': malloc_utrace = 0; break;
- case 'U': malloc_utrace = 1; break;
-#endif
- case 'v': malloc_sysv = 0; break;
- case 'V': malloc_sysv = 1; break;
- case 'x': malloc_xmalloc = 0; break;
- case 'X': malloc_xmalloc = 1; break;
- case 'z': malloc_zero = 0; break;
- case 'Z': malloc_zero = 1; break;
- default:
- j = malloc_abort;
- malloc_abort = 0;
- wrtwarning("unknown char in MALLOC_OPTIONS\n");
- malloc_abort = j;
- break;
- }
- }
- }
-
- UTRACE(0, 0, 0);
-
- /*
- * We want junk in the entire allocation, and zero only in the part
- * the user asked for.
- */
- if (malloc_zero)
- malloc_junk=1;
-
- /*
- * If we run with junk (or implicitly from above: zero), we want to
- * force realloc() to get new storage, so we can DTRT with it.
- */
- if (malloc_junk)
- malloc_realloc=1;
-
- /* Allocate one page for the page directory */
- page_dir = (struct pginfo **) MMAP(malloc_pagesize);
-
- if (page_dir == (struct pginfo **) -1)
- wrterror("mmap(2) failed, check limits.\n");
-
- /*
- * We need a maximum of malloc_pageshift buckets, steal these from the
- * front of the page_directory;
- */
- malloc_origo = ((u_long)pageround((u_long)sbrk(0))) >> malloc_pageshift;
- malloc_origo -= malloc_pageshift;
-
- malloc_ninfo = malloc_pagesize / sizeof *page_dir;
-
- /* Recalculate the cache size in bytes, and make sure it's nonzero */
-
- if (!malloc_cache)
- malloc_cache++;
-
- malloc_cache <<= malloc_pageshift;
-
- /*
- * This is a nice hack from Kaleb Keithly (kaleb@x.org).
- * We can sbrk(2) further back when we keep this on a low address.
- */
- px = (struct pgfree *) imalloc (sizeof *px);
-
- /* Been here, done that */
- malloc_started++;
-}
-
-/*
- * Allocate a number of complete pages
- */
-static void *
-malloc_pages(size_t size)
-{
- void *p, *delay_free = 0;
- int i;
- struct pgfree *pf;
- u_long index;
-
- size = pageround(size);
-
- p = 0;
-
- /* Look for free pages before asking for more */
- for(pf = free_list.next; pf; pf = pf->next) {
-
-#ifdef EXTRA_SANITY
- if (pf->size & malloc_pagemask)
- wrterror("(ES): junk length entry on free_list\n");
- if (!pf->size)
- wrterror("(ES): zero length entry on free_list\n");
- if (pf->page == pf->end)
- wrterror("(ES): zero entry on free_list\n");
- if (pf->page > pf->end)
- wrterror("(ES): sick entry on free_list\n");
- if ((void*)pf->page >= (void*)sbrk(0))
- wrterror("(ES): entry on free_list past brk\n");
- if (page_dir[ptr2index(pf->page)] != MALLOC_FREE)
- wrterror("(ES): non-free first page on free-list\n");
- if (page_dir[ptr2index(pf->end)-1] != MALLOC_FREE)
- wrterror("(ES): non-free last page on free-list\n");
-#endif /* EXTRA_SANITY */
-
- if (pf->size < size)
- continue;
-
- if (pf->size == size) {
- p = pf->page;
- if (pf->next)
- pf->next->prev = pf->prev;
- pf->prev->next = pf->next;
- delay_free = pf;
- break;
- }
-
- p = pf->page;
- pf->page = (char *)pf->page + size;
- pf->size -= size;
- break;
- }
-
-#ifdef EXTRA_SANITY
- if (p && page_dir[ptr2index(p)] != MALLOC_FREE)
- wrterror("(ES): allocated non-free page on free-list\n");
-#endif /* EXTRA_SANITY */
-
- size >>= malloc_pageshift;
-
- /* Map new pages */
- if (!p)
- p = map_pages(size);
-
- if (p) {
-
- index = ptr2index(p);
- page_dir[index] = MALLOC_FIRST;
- for (i=1;i<size;i++)
- page_dir[index+i] = MALLOC_FOLLOW;
-
- if (malloc_junk)
- memset(p, SOME_JUNK, size << malloc_pageshift);
- }
-
- if (delay_free) {
- if (!px)
- px = delay_free;
- else
- ifree(delay_free);
- }
-
- return p;
-}
-
-/*
- * Allocate a page of fragments
- */
-
-static __inline__ int
-malloc_make_chunks(int bits)
-{
- struct pginfo *bp;
- void *pp;
- int i, k, l;
-
- /* Allocate a new bucket */
- pp = malloc_pages(malloc_pagesize);
- if (!pp)
- return 0;
-
- /* Find length of admin structure */
- l = offsetof(struct pginfo, bits[0]);
- l += sizeof bp->bits[0] *
- (((malloc_pagesize >> bits)+MALLOC_BITS-1) / MALLOC_BITS);
-
- /* Don't waste more than two chunks on this */
- if ((1<<(bits)) <= l+l) {
- bp = (struct pginfo *)pp;
- } else {
- bp = (struct pginfo *)imalloc(l);
- if (!bp) {
- ifree(pp);
- return 0;
- }
- }
-
- bp->size = (1<<bits);
- bp->shift = bits;
- bp->total = bp->free = malloc_pagesize >> bits;
- bp->page = pp;
-
- /* set all valid bits in the bitmap */
- k = bp->total;
- i = 0;
-
- /* Do a bunch at a time */
- for(;k-i >= MALLOC_BITS; i += MALLOC_BITS)
- bp->bits[i / MALLOC_BITS] = ~0;
-
- for(; i < k; i++)
- bp->bits[i/MALLOC_BITS] |= 1<<(i%MALLOC_BITS);
-
- if (bp == bp->page) {
- /* Mark the ones we stole for ourselves */
- for(i=0;l > 0;i++) {
- bp->bits[i/MALLOC_BITS] &= ~(1<<(i%MALLOC_BITS));
- bp->free--;
- bp->total--;
- l -= (1 << bits);
- }
- }
-
- /* MALLOC_LOCK */
-
- page_dir[ptr2index(pp)] = bp;
-
- bp->next = page_dir[bits];
- page_dir[bits] = bp;
-
- /* MALLOC_UNLOCK */
-
- return 1;
-}
-
-/*
- * Allocate a fragment
- */
-static void *
-malloc_bytes(size_t size)
-{
- int i,j;
- u_int u;
- struct pginfo *bp;
- int k;
- u_int *lp;
-
- /* Don't bother with anything less than this */
- if (size < malloc_minsize)
- size = malloc_minsize;
-
- /* Find the right bucket */
- j = 1;
- i = size-1;
- while (i >>= 1)
- j++;
-
- /* If it's empty, make a page more of that size chunks */
- if (!page_dir[j] && !malloc_make_chunks(j))
- return 0;
-
- bp = page_dir[j];
-
- /* Find first word of bitmap which isn't empty */
- for (lp = bp->bits; !*lp; lp++)
- ;
-
- /* Find that bit, and tweak it */
- u = 1;
- k = 0;
- while (!(*lp & u)) {
- u += u;
- k++;
- }
- *lp ^= u;
-
- /* If there are no more free, remove from free-list */
- if (!--bp->free) {
- page_dir[j] = bp->next;
- bp->next = 0;
- }
-
- /* Adjust to the real offset of that chunk */
- k += (lp-bp->bits)*MALLOC_BITS;
- k <<= bp->shift;
-
- if (malloc_junk)
- memset((u_char*)bp->page + k, SOME_JUNK, bp->size);
-
- return (u_char *)bp->page + k;
-}
-
-/*
- * Allocate a piece of memory
- */
-static void *
-imalloc(size_t size)
-{
- void *result;
-
- if (suicide)
- abort();
-
- if ((size + malloc_pagesize) < size) /* Check for overflow */
- result = 0;
- else if (size <= malloc_maxsize)
- result = malloc_bytes(size);
- else
- result = malloc_pages(size);
-
- if (malloc_abort && !result)
- wrterror("allocation failed.\n");
-
- if (malloc_zero && result)
- memset(result, 0, size);
-
- return result;
-}
-
-/*
- * Change the size of an allocation.
- */
-static void *
-irealloc(void *ptr, size_t size)
-{
- void *p;
- u_long osize, index;
- struct pginfo **mp;
- int i;
-
- if (suicide)
- abort();
-
- index = ptr2index(ptr);
-
- if (index < malloc_pageshift) {
- wrtwarning("junk pointer, too low to make sense.\n");
- return 0;
- }
-
- if (index > last_index) {
- wrtwarning("junk pointer, too high to make sense.\n");
- return 0;
- }
-
- mp = &page_dir[index];
-
- if (*mp == MALLOC_FIRST) { /* Page allocation */
-
- /* Check the pointer */
- if ((u_long)ptr & malloc_pagemask) {
- wrtwarning("modified (page-) pointer.\n");
- return 0;
- }
-
- /* Find the size in bytes */
- for (osize = malloc_pagesize; *++mp == MALLOC_FOLLOW;)
- osize += malloc_pagesize;
-
- if (!malloc_realloc && /* unless we have to, */
- size <= osize && /* .. or are too small, */
- size > (osize - malloc_pagesize)) { /* .. or can free a page, */
- return ptr; /* don't do anything. */
- }
-
- } else if (*mp >= MALLOC_MAGIC) { /* Chunk allocation */
-
- /* Check the pointer for sane values */
- if (((u_long)ptr & ((*mp)->size-1))) {
- wrtwarning("modified (chunk-) pointer.\n");
- return 0;
- }
-
- /* Find the chunk index in the page */
- i = ((u_long)ptr & malloc_pagemask) >> (*mp)->shift;
-
- /* Verify that it isn't a free chunk already */
- if ((*mp)->bits[i/MALLOC_BITS] & (1<<(i%MALLOC_BITS))) {
- wrtwarning("chunk is already free.\n");
- return 0;
- }
-
- osize = (*mp)->size;
-
- if (!malloc_realloc && /* Unless we have to, */
- size < osize && /* ..or are too small, */
- (size > osize/2 || /* ..or could use a smaller size, */
- osize == malloc_minsize)) { /* ..(if there is one) */
- return ptr; /* ..Don't do anything */
- }
-
- } else {
- wrtwarning("pointer to wrong page.\n");
- return 0;
- }
-
- p = imalloc(size);
-
- if (p) {
- /* copy the lesser of the two sizes, and free the old one */
- if (!size || !osize)
- ;
- else if (osize < size)
- memcpy(p, ptr, osize);
- else
- memcpy(p, ptr, size);
- ifree(ptr);
- }
- return p;
-}
-
-/*
- * Free a sequence of pages
- */
-
-static __inline__ void
-free_pages(void *ptr, int index, struct pginfo *info)
-{
- int i;
- struct pgfree *pf, *pt=0;
- u_long l;
- void *tail;
-
- if (info == MALLOC_FREE) {
- wrtwarning("page is already free.\n");
- return;
- }
-
- if (info != MALLOC_FIRST) {
- wrtwarning("pointer to wrong page.\n");
- return;
- }
-
- if ((u_long)ptr & malloc_pagemask) {
- wrtwarning("modified (page-) pointer.\n");
- return;
- }
-
- /* Count how many pages and mark them free at the same time */
- page_dir[index] = MALLOC_FREE;
- for (i = 1; page_dir[index+i] == MALLOC_FOLLOW; i++)
- page_dir[index + i] = MALLOC_FREE;
-
- l = i << malloc_pageshift;
-
- if (malloc_junk)
- memset(ptr, SOME_JUNK, l);
-
- if (malloc_hint)
- madvise(ptr, l, MADV_FREE);
-
- tail = (char *)ptr+l;
-
- /* add to free-list */
- if (!px)
- px = imalloc(sizeof *pt); /* This cannot fail... */
- px->page = ptr;
- px->end = tail;
- px->size = l;
- if (!free_list.next) {
-
- /* Nothing on free list, put this at head */
- px->next = free_list.next;
- px->prev = &free_list;
- free_list.next = px;
- pf = px;
- px = 0;
-
- } else {
-
- /* Find the right spot, leave pf pointing to the modified entry. */
- tail = (char *)ptr+l;
-
- for(pf = free_list.next; pf->end < ptr && pf->next; pf = pf->next)
- ; /* Race ahead here */
-
- if (pf->page > tail) {
- /* Insert before entry */
- px->next = pf;
- px->prev = pf->prev;
- pf->prev = px;
- px->prev->next = px;
- pf = px;
- px = 0;
- } else if (pf->end == ptr ) {
- /* Append to the previous entry */
- pf->end = (char *)pf->end + l;
- pf->size += l;
- if (pf->next && pf->end == pf->next->page ) {
- /* And collapse the next too. */
- pt = pf->next;
- pf->end = pt->end;
- pf->size += pt->size;
- pf->next = pt->next;
- if (pf->next)
- pf->next->prev = pf;
- }
- } else if (pf->page == tail) {
- /* Prepend to entry */
- pf->size += l;
- pf->page = ptr;
- } else if (!pf->next) {
- /* Append at tail of chain */
- px->next = 0;
- px->prev = pf;
- pf->next = px;
- pf = px;
- px = 0;
- } else {
- wrterror("freelist is destroyed.\n");
- }
- }
-
- /* Return something to OS ? */
- if (!pf->next && /* If we're the last one, */
- pf->size > malloc_cache && /* ..and the cache is full, */
- pf->end == malloc_brk && /* ..and none behind us, */
- malloc_brk == sbrk(0)) { /* ..and it's OK to do... */
-
- /*
- * Keep the cache intact. Notice that the '>' above guarantees that
- * the pf will always have at least one page afterwards.
- */
- pf->end = (char *)pf->page + malloc_cache;
- pf->size = malloc_cache;
-
- brk(pf->end);
- malloc_brk = pf->end;
-
- index = ptr2index(pf->end);
- last_index = index - 1;
-
- for(i=index;i <= last_index;)
- page_dir[i++] = MALLOC_NOT_MINE;
-
- /* XXX: We could realloc/shrink the pagedir here I guess. */
- }
- if (pt)
- ifree(pt);
-}
-
-/*
- * Free a chunk, and possibly the page it's on, if the page becomes empty.
- */
-
-static __inline__ void
-free_bytes(void *ptr, int index, struct pginfo *info)
-{
- int i;
- struct pginfo **mp;
- void *vp;
-
- /* Find the chunk number on the page */
- i = ((u_long)ptr & malloc_pagemask) >> info->shift;
-
- if (((u_long)ptr & (info->size-1))) {
- wrtwarning("modified (chunk-) pointer.\n");
- return;
- }
-
- if (info->bits[i/MALLOC_BITS] & (1<<(i%MALLOC_BITS))) {
- wrtwarning("chunk is already free.\n");
- return;
- }
-
- if (malloc_junk)
- memset(ptr, SOME_JUNK, info->size);
-
- info->bits[i/MALLOC_BITS] |= 1<<(i%MALLOC_BITS);
- info->free++;
-
- mp = page_dir + info->shift;
-
- if (info->free == 1) {
-
- /* Page became non-full */
-
- mp = page_dir + info->shift;
- /* Insert in address order */
- while (*mp && (*mp)->next && (*mp)->next->page < info->page)
- mp = &(*mp)->next;
- info->next = *mp;
- *mp = info;
- return;
- }
-
- if (info->free != info->total)
- return;
-
- /* Find & remove this page in the queue */
- while (*mp != info) {
- mp = &((*mp)->next);
-#ifdef EXTRA_SANITY
- if (!*mp)
- wrterror("(ES): Not on queue\n");
-#endif /* EXTRA_SANITY */
- }
- *mp = info->next;
-
- /* Free the page & the info structure if need be */
- page_dir[ptr2index(info->page)] = MALLOC_FIRST;
- vp = info->page; /* Order is important ! */
- if(vp != (void*)info)
- ifree(info);
- ifree(vp);
-}
-
-static void
-ifree(void *ptr)
-{
- struct pginfo *info;
- int index;
-
- /* This is legal */
- if (!ptr)
- return;
-
- if (!malloc_started) {
- wrtwarning("malloc() has never been called.\n");
- return;
- }
-
- /* If we're already sinking, don't make matters any worse. */
- if (suicide)
- return;
-
- index = ptr2index(ptr);
-
- if (index < malloc_pageshift) {
- wrtwarning("junk pointer, too low to make sense.\n");
- return;
- }
-
- if (index > last_index) {
- wrtwarning("junk pointer, too high to make sense.\n");
- return;
- }
-
- info = page_dir[index];
-
- if (info < MALLOC_MAGIC)
- free_pages(ptr, index, info);
- else
- free_bytes(ptr, index, info);
- return;
-}
-
-/*
- * These are the public exported interface routines.
- */
-
-
-void *
-malloc(size_t size)
-{
- register void *r;
- THREAD_STATUS
-
- malloc_func = " in malloc():";
- THREAD_LOCK();
- if (malloc_active++) {
- wrtwarning("recursive call.\n");
- malloc_active--;
- return (0);
- }
- if (!malloc_started)
- malloc_init();
- if (malloc_sysv && !size)
- r = 0;
- else
- r = imalloc(size);
- UTRACE(0, size, r);
- malloc_active--;
- THREAD_UNLOCK();
- if (malloc_xmalloc && !r)
- wrterror("out of memory.\n");
- return (r);
-}
-
-void
-free(void *ptr)
-{
- THREAD_STATUS
-
- malloc_func = " in free():";
- THREAD_LOCK();
- if (malloc_active++) {
- wrtwarning("recursive call.\n");
- malloc_active--;
- return;
- }
- ifree(ptr);
- UTRACE(ptr, 0, 0);
- malloc_active--;
- THREAD_UNLOCK();
- return;
-}
-
-void *
-realloc(void *ptr, size_t size)
-{
- THREAD_STATUS
- register void *r;
-
- malloc_func = " in realloc():";
- THREAD_LOCK();
- if (malloc_active++) {
- wrtwarning("recursive call.\n");
- malloc_active--;
- return (0);
- }
- if (ptr && !malloc_started) {
- wrtwarning("malloc() has never been called.\n");
- ptr = 0;
- }
- if (!malloc_started)
- malloc_init();
- if (malloc_sysv && !size) {
- ifree(ptr);
- r = 0;
- } else if (!ptr) {
- r = imalloc(size);
- } else {
- r = irealloc(ptr, size);
- }
- UTRACE(ptr, size, r);
- malloc_active--;
- THREAD_UNLOCK();
- if (malloc_xmalloc && !r)
- wrterror("out of memory.\n");
- return (r);
-}
-
diff --git a/lib/libc/stdlib/memory.3 b/lib/libc/stdlib/memory.3
deleted file mode 100644
index 0a1fed4..0000000
--- a/lib/libc/stdlib/memory.3
+++ /dev/null
@@ -1,71 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)memory.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt MEMORY 3
-.Os BSD 4
-.Sh NAME
-.Nm malloc ,
-.Nm free ,
-.Nm realloc ,
-.Nm calloc ,
-.Nm alloca
-.Nd general memory allocation operations
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft void *
-.Fn malloc "size_t size"
-.Ft void
-.Fn free "void *ptr"
-.Ft void *
-.Fn realloc "void *ptr" "size_t size"
-.Ft void *
-.Fn calloc "size_t nelem" "size_t elsize"
-.Ft void *
-.Fn alloca "size_t size"
-.Sh DESCRIPTION
-These functions allocate and free memory for the calling process.
-They are described in the
-individual manual pages.
-.Sh SEE ALSO
-.Xr alloca 3 ,
-.Xr calloc 3 ,
-.Xr free 3 ,
-.Xr malloc 3 ,
-.Xr realloc 3
-.Sh STANDARDS
-These functions, with the exception of
-.Fn alloca
-conform to
-.St -ansiC .
diff --git a/lib/libc/stdlib/merge.c b/lib/libc/stdlib/merge.c
deleted file mode 100644
index a47e300..0000000
--- a/lib/libc/stdlib/merge.c
+++ /dev/null
@@ -1,347 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Peter McIlroy.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)merge.c 8.2 (Berkeley) 2/14/94";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Hybrid exponential search/linear search merge sort with hybrid
- * natural/pairwise first pass. Requires about .3% more comparisons
- * for random data than LSMS with pairwise first pass alone.
- * It works for objects as small as two bytes.
- */
-
-#define NATURAL
-#define THRESHOLD 16 /* Best choice for natural merge cut-off. */
-
-/* #define NATURAL to get hybrid natural merge.
- * (The default is pairwise merging.)
- */
-
-#include <sys/types.h>
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-static void setup __P((u_char *, u_char *, size_t, size_t, int (*)()));
-static void insertionsort __P((u_char *, size_t, size_t, int (*)()));
-
-#define ISIZE sizeof(int)
-#define PSIZE sizeof(u_char *)
-#define ICOPY_LIST(src, dst, last) \
- do \
- *(int*)dst = *(int*)src, src += ISIZE, dst += ISIZE; \
- while(src < last)
-#define ICOPY_ELT(src, dst, i) \
- do \
- *(int*) dst = *(int*) src, src += ISIZE, dst += ISIZE; \
- while (i -= ISIZE)
-
-#define CCOPY_LIST(src, dst, last) \
- do \
- *dst++ = *src++; \
- while (src < last)
-#define CCOPY_ELT(src, dst, i) \
- do \
- *dst++ = *src++; \
- while (i -= 1)
-
-/*
- * Find the next possible pointer head. (Trickery for forcing an array
- * to do double duty as a linked list when objects do not align with word
- * boundaries.
- */
-/* Assumption: PSIZE is a power of 2. */
-#define EVAL(p) (u_char **) \
- ((u_char *)0 + \
- (((u_char *)p + PSIZE - 1 - (u_char *) 0) & ~(PSIZE - 1)))
-
-/*
- * Arguments are as for qsort.
- */
-int
-mergesort(base, nmemb, size, cmp)
- void *base;
- size_t nmemb;
- register size_t size;
- int (*cmp) __P((const void *, const void *));
-{
- register int i, sense;
- int big, iflag;
- register u_char *f1, *f2, *t, *b, *tp2, *q, *l1, *l2;
- u_char *list2, *list1, *p2, *p, *last, **p1;
-
- if (size < PSIZE / 2) { /* Pointers must fit into 2 * size. */
- errno = EINVAL;
- return (-1);
- }
-
- /*
- * XXX
- * Stupid subtraction for the Cray.
- */
- iflag = 0;
- if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE))
- iflag = 1;
-
- if ((list2 = malloc(nmemb * size + PSIZE)) == NULL)
- return (-1);
-
- list1 = base;
- setup(list1, list2, nmemb, size, cmp);
- last = list2 + nmemb * size;
- i = big = 0;
- while (*EVAL(list2) != last) {
- l2 = list1;
- p1 = EVAL(list1);
- for (tp2 = p2 = list2; p2 != last; p1 = EVAL(l2)) {
- p2 = *EVAL(p2);
- f1 = l2;
- f2 = l1 = list1 + (p2 - list2);
- if (p2 != last)
- p2 = *EVAL(p2);
- l2 = list1 + (p2 - list2);
- while (f1 < l1 && f2 < l2) {
- if ((*cmp)(f1, f2) <= 0) {
- q = f2;
- b = f1, t = l1;
- sense = -1;
- } else {
- q = f1;
- b = f2, t = l2;
- sense = 0;
- }
- if (!big) { /* here i = 0 */
-LINEAR: while ((b += size) < t && cmp(q, b) >sense)
- if (++i == 6) {
- big = 1;
- goto EXPONENTIAL;
- }
- } else {
-EXPONENTIAL: for (i = size; ; i <<= 1)
- if ((p = (b + i)) >= t) {
- if ((p = t - size) > b &&
- (*cmp)(q, p) <= sense)
- t = p;
- else
- b = p;
- break;
- } else if ((*cmp)(q, p) <= sense) {
- t = p;
- if (i == size)
- big = 0;
- goto FASTCASE;
- } else
- b = p;
-SLOWCASE: while (t > b+size) {
- i = (((t - b) / size) >> 1) * size;
- if ((*cmp)(q, p = b + i) <= sense)
- t = p;
- else
- b = p;
- }
- goto COPY;
-FASTCASE: while (i > size)
- if ((*cmp)(q,
- p = b + (i >>= 1)) <= sense)
- t = p;
- else
- b = p;
-COPY: b = t;
- }
- i = size;
- if (q == f1) {
- if (iflag) {
- ICOPY_LIST(f2, tp2, b);
- ICOPY_ELT(f1, tp2, i);
- } else {
- CCOPY_LIST(f2, tp2, b);
- CCOPY_ELT(f1, tp2, i);
- }
- } else {
- if (iflag) {
- ICOPY_LIST(f1, tp2, b);
- ICOPY_ELT(f2, tp2, i);
- } else {
- CCOPY_LIST(f1, tp2, b);
- CCOPY_ELT(f2, tp2, i);
- }
- }
- }
- if (f2 < l2) {
- if (iflag)
- ICOPY_LIST(f2, tp2, l2);
- else
- CCOPY_LIST(f2, tp2, l2);
- } else if (f1 < l1) {
- if (iflag)
- ICOPY_LIST(f1, tp2, l1);
- else
- CCOPY_LIST(f1, tp2, l1);
- }
- *p1 = l2;
- }
- tp2 = list1; /* swap list1, list2 */
- list1 = list2;
- list2 = tp2;
- last = list2 + nmemb*size;
- }
- if (base == list2) {
- memmove(list2, list1, nmemb*size);
- list2 = list1;
- }
- free(list2);
- return (0);
-}
-
-#define swap(a, b) { \
- s = b; \
- i = size; \
- do { \
- tmp = *a; *a++ = *s; *s++ = tmp; \
- } while (--i); \
- a -= size; \
- }
-#define reverse(bot, top) { \
- s = top; \
- do { \
- i = size; \
- do { \
- tmp = *bot; *bot++ = *s; *s++ = tmp; \
- } while (--i); \
- s -= size2; \
- } while(bot < s); \
-}
-
-/*
- * Optional hybrid natural/pairwise first pass. Eats up list1 in runs of
- * increasing order, list2 in a corresponding linked list. Checks for runs
- * when THRESHOLD/2 pairs compare with same sense. (Only used when NATURAL
- * is defined. Otherwise simple pairwise merging is used.)
- */
-void
-setup(list1, list2, n, size, cmp)
- size_t n, size;
- int (*cmp) __P((const void *, const void *));
- u_char *list1, *list2;
-{
- int i, length, size2, tmp, sense;
- u_char *f1, *f2, *s, *l2, *last, *p2;
-
- size2 = size*2;
- if (n <= 5) {
- insertionsort(list1, n, size, cmp);
- *EVAL(list2) = (u_char*) list2 + n*size;
- return;
- }
- /*
- * Avoid running pointers out of bounds; limit n to evens
- * for simplicity.
- */
- i = 4 + (n & 1);
- insertionsort(list1 + (n - i) * size, i, size, cmp);
- last = list1 + size * (n - i);
- *EVAL(list2 + (last - list1)) = list2 + n * size;
-
-#ifdef NATURAL
- p2 = list2;
- f1 = list1;
- sense = (cmp(f1, f1 + size) > 0);
- for (; f1 < last; sense = !sense) {
- length = 2;
- /* Find pairs with same sense. */
- for (f2 = f1 + size2; f2 < last; f2 += size2) {
- if ((cmp(f2, f2+ size) > 0) != sense)
- break;
- length += 2;
- }
- if (length < THRESHOLD) { /* Pairwise merge */
- do {
- p2 = *EVAL(p2) = f1 + size2 - list1 + list2;
- if (sense > 0)
- swap (f1, f1 + size);
- } while ((f1 += size2) < f2);
- } else { /* Natural merge */
- l2 = f2;
- for (f2 = f1 + size2; f2 < l2; f2 += size2) {
- if ((cmp(f2-size, f2) > 0) != sense) {
- p2 = *EVAL(p2) = f2 - list1 + list2;
- if (sense > 0)
- reverse(f1, f2-size);
- f1 = f2;
- }
- }
- if (sense > 0)
- reverse (f1, f2-size);
- f1 = f2;
- if (f2 < last || cmp(f2 - size, f2) > 0)
- p2 = *EVAL(p2) = f2 - list1 + list2;
- else
- p2 = *EVAL(p2) = list2 + n*size;
- }
- }
-#else /* pairwise merge only. */
- for (f1 = list1, p2 = list2; f1 < last; f1 += size2) {
- p2 = *EVAL(p2) = p2 + size2;
- if (cmp (f1, f1 + size) > 0)
- swap(f1, f1 + size);
- }
-#endif /* NATURAL */
-}
-
-/*
- * This is to avoid out-of-bounds addresses in sorting the
- * last 4 elements.
- */
-static void
-insertionsort(a, n, size, cmp)
- u_char *a;
- size_t n, size;
- int (*cmp) __P((const void *, const void *));
-{
- u_char *ai, *s, *t, *u, tmp;
- int i;
-
- for (ai = a+size; --n >= 1; ai += size)
- for (t = ai; t > a; t -= size) {
- u = t - size;
- if (cmp(u, t) <= 0)
- break;
- swap(u, t);
- }
-}
diff --git a/lib/libc/stdlib/putenv.c b/lib/libc/stdlib/putenv.c
deleted file mode 100644
index eb5e805..0000000
--- a/lib/libc/stdlib/putenv.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)putenv.c 8.2 (Berkeley) 3/27/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-#include <string.h>
-
-int
-putenv(str)
- const char *str;
-{
- char *p, *equal;
- int rval;
-
- if ((p = strdup(str)) == NULL)
- return (-1);
- if ((equal = index(p, '=')) == NULL) {
- (void)free(p);
- return (-1);
- }
- *equal = '\0';
- rval = setenv(p, equal + 1, 1);
- (void)free(p);
- return (rval);
-}
diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3
deleted file mode 100644
index 4f449c7..0000000
--- a/lib/libc/stdlib/qsort.3
+++ /dev/null
@@ -1,233 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)qsort.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt QSORT 3
-.Os
-.Sh NAME
-.Nm qsort, heapsort, mergesort
-.Nd sort functions
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft void
-.Fn qsort "void *base" "size_t nmemb" "size_t size" "int (*compar)(const void *, const void *)"
-.Ft int
-.Fn heapsort "void *base" "size_t nmemb" "size_t size" "int (*compar)(const void *, const void *)"
-.Ft int
-.Fn mergesort "void *base" "size_t nmemb" "size_t size" "int (*compar)(const void *, const void *)"
-.Sh DESCRIPTION
-The
-.Fn qsort
-function is a modified partition-exchange sort, or quicksort.
-The
-.Fn heapsort
-function is a modified selection sort.
-The
-.Fn mergesort
-function is a modified merge sort with exponential search
-intended for sorting data with pre-existing order.
-.Pp
-The
-.Fn qsort
-and
-.Fn heapsort
-functions sort an array of
-.Fa nmemb
-objects, the initial member of which is pointed to by
-.Fa base .
-The size of each object is specified by
-.Fa size .
-.Fn Mergesort
-behaves similarly, but
-.Em requires
-that
-.Fa size
-be greater than
-.Dq "sizeof(void *) / 2" .
-.Pp
-The contents of the array
-.Fa base
-are sorted in ascending order according to
-a comparison function pointed to by
-.Fa compar ,
-which requires two arguments pointing to the objects being
-compared.
-.Pp
-The comparison function must return an integer less than, equal to, or
-greater than zero if the first argument is considered to be respectively
-less than, equal to, or greater than the second.
-.Pp
-The functions
-.Fn qsort
-and
-.Fn heapsort
-are
-.Em not
-stable, that is, if two members compare as equal, their order in
-the sorted array is undefined.
-The function
-.Fn mergesort
-is stable.
-.Pp
-The
-.Fn qsort
-function is an implementation of C.A.R. Hoare's ``quicksort'' algorithm,
-a variant of partition-exchange sorting; in particular, see D.E. Knuth's
-Algorithm Q.
-.Fn Qsort
-takes O N lg N average time.
-This implementation uses median selection to avoid its
-O N**2 worst-case behavior.
-.Pp
-The
-.Fn heapsort
-function is an implementation of J.W.J. William's ``heapsort'' algorithm,
-a variant of selection sorting; in particular, see D.E. Knuth's Algorithm H.
-.Fn Heapsort
-takes O N lg N worst-case time.
-Its
-.Em only
-advantage over
-.Fn qsort
-is that it uses almost no additional memory; while
-.Fn qsort
-does not allocate memory, it is implemented using recursion.
-.Pp
-The function
-.Fn mergesort
-requires additional memory of size
-.Fa nmemb *
-.Fa size
-bytes; it should be used only when space is not at a premium.
-.Fn Mergesort
-is optimized for data with pre-existing order; its worst case
-time is O N lg N; its best case is O N.
-.Pp
-Normally,
-.Fn qsort
-is faster than
-.Fn mergesort
-is faster than
-.Fn heapsort .
-Memory availability and pre-existing order in the data can make this
-untrue.
-.Sh RETURN VALUES
-The
-.Fn qsort
-function
-returns no value.
-.Pp
-Upon successful completion,
-.Fn heapsort
-and
-.Fn mergesort
-return 0.
-Otherwise, they return \-1 and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn heapsort
-function succeeds unless:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The
-.Fa size
-argument is zero, or,
-the
-.Fa size
-argument to
-.Fn mergesort
-is less than
-.Dq "sizeof(void *) / 2" .
-.It Bq Er ENOMEM
-.Fn Heapsort
-or
-.Fn mergesort
-were unable to allocate memory.
-.El
-.Sh COMPATIBILITY
-Previous versions of
-.Fn qsort
-did not permit the comparison routine itself to call
-.Fn qsort 3 .
-This is no longer true.
-.Sh SEE ALSO
-.Xr sort 1 ,
-.Xr radixsort 3
-.Rs
-.%A Hoare, C.A.R.
-.%D 1962
-.%T "Quicksort"
-.%J "The Computer Journal"
-.%V 5:1
-.%P pp. 10-15
-.Re
-.Rs
-.%A Williams, J.W.J
-.%D 1964
-.%T "Heapsort"
-.%J "Communications of the ACM"
-.%V 7:1
-.%P pp. 347-348
-.Re
-.Rs
-.%A Knuth, D.E.
-.%D 1968
-.%B "The Art of Computer Programming"
-.%V Vol. 3
-.%T "Sorting and Searching"
-.%P pp. 114-123, 145-149
-.Re
-.Rs
-.%A Mcilroy, P.M.
-.%T "Optimistic Sorting and Information Theoretic Complexity"
-.%J "Fourth Annual ACM-SIAM Symposium on Discrete Algorithms"
-.%V January 1992
-.Re
-.Rs
-.%A Bentley, J.L.
-.%T "Engineering a Sort Function"
-.%J "bentley@research.att.com"
-.%V January 1992
-.Re
-.Sh STANDARDS
-The
-.Fn qsort
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c
deleted file mode 100644
index ff3def5..0000000
--- a/lib/libc/stdlib/qsort.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-
-typedef int cmp_t __P((const void *, const void *));
-static inline char *med3 __P((char *, char *, char *, cmp_t *));
-static inline void swapfunc __P((char *, char *, int, int));
-
-#define min(a, b) (a) < (b) ? a : b
-
-/*
- * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
- */
-#define swapcode(TYPE, parmi, parmj, n) { \
- long i = (n) / sizeof (TYPE); \
- register TYPE *pi = (TYPE *) (parmi); \
- register TYPE *pj = (TYPE *) (parmj); \
- do { \
- register TYPE t = *pi; \
- *pi++ = *pj; \
- *pj++ = t; \
- } while (--i > 0); \
-}
-
-#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
- es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
-
-static inline void
-swapfunc(a, b, n, swaptype)
- char *a, *b;
- int n, swaptype;
-{
- if(swaptype <= 1)
- swapcode(long, a, b, n)
- else
- swapcode(char, a, b, n)
-}
-
-#define swap(a, b) \
- if (swaptype == 0) { \
- long t = *(long *)(a); \
- *(long *)(a) = *(long *)(b); \
- *(long *)(b) = t; \
- } else \
- swapfunc(a, b, es, swaptype)
-
-#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
-
-static inline char *
-med3(a, b, c, cmp)
- char *a, *b, *c;
- cmp_t *cmp;
-{
- return cmp(a, b) < 0 ?
- (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a ))
- :(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c ));
-}
-
-void
-qsort(a, n, es, cmp)
- void *a;
- size_t n, es;
- cmp_t *cmp;
-{
- char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
- int d, r, swaptype, swap_cnt;
-
-loop: SWAPINIT(a, es);
- swap_cnt = 0;
- if (n < 7) {
- for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
- for (pl = pm; pl > (char *)a && cmp(pl - es, pl) > 0;
- pl -= es)
- swap(pl, pl - es);
- return;
- }
- pm = (char *)a + (n / 2) * es;
- if (n > 7) {
- pl = a;
- pn = (char *)a + (n - 1) * es;
- if (n > 40) {
- d = (n / 8) * es;
- pl = med3(pl, pl + d, pl + 2 * d, cmp);
- pm = med3(pm - d, pm, pm + d, cmp);
- pn = med3(pn - 2 * d, pn - d, pn, cmp);
- }
- pm = med3(pl, pm, pn, cmp);
- }
- swap(a, pm);
- pa = pb = (char *)a + es;
-
- pc = pd = (char *)a + (n - 1) * es;
- for (;;) {
- while (pb <= pc && (r = cmp(pb, a)) <= 0) {
- if (r == 0) {
- swap_cnt = 1;
- swap(pa, pb);
- pa += es;
- }
- pb += es;
- }
- while (pb <= pc && (r = cmp(pc, a)) >= 0) {
- if (r == 0) {
- swap_cnt = 1;
- swap(pc, pd);
- pd -= es;
- }
- pc -= es;
- }
- if (pb > pc)
- break;
- swap(pb, pc);
- swap_cnt = 1;
- pb += es;
- pc -= es;
- }
- if (swap_cnt == 0) { /* Switch to insertion sort */
- for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
- for (pl = pm; pl > (char *)a && cmp(pl - es, pl) > 0;
- pl -= es)
- swap(pl, pl - es);
- return;
- }
-
- pn = (char *)a + n * es;
- r = min(pa - (char *)a, pb - pa);
- vecswap(a, pb - r, r);
- r = min(pd - pc, pn - pd - es);
- vecswap(pb, pn - r, r);
- if ((r = pb - pa) > es)
- qsort(a, r / es, es, cmp);
- if ((r = pd - pc) > es) {
- /* Iterate rather than recurse to save stack space */
- a = pn - r;
- n = r / es;
- goto loop;
- }
-/* qsort(pn - r, r / es, es, cmp);*/
-}
diff --git a/lib/libc/stdlib/radixsort.3 b/lib/libc/stdlib/radixsort.3
deleted file mode 100644
index 29a1d9d..0000000
--- a/lib/libc/stdlib/radixsort.3
+++ /dev/null
@@ -1,161 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)radixsort.3 8.2 (Berkeley) 1/27/94
-.\"
-.Dd January 27, 1994
-.Dt RADIXSORT 3
-.Os
-.Sh NAME
-.Nm radixsort
-.Nd radix sort
-.Sh SYNOPSIS
-.Fd #include <limits.h>
-.Fd #include <stdlib.h>
-.Ft int
-.Fn radixsort "const unsigned char **base" "int nmemb" "const unsigned char *table" "unsigned endbyte"
-.Ft int
-.Fn sradixsort "const unsigned char **base" "int nmemb" "const unsigned char *table" "unsigned endbyte"
-.Sh DESCRIPTION
-The
-.Fn radixsort
-and
-.Fn sradixsort
-functions
-are implementations of radix sort.
-.Pp
-These functions sort an array of pointers to byte strings, the initial
-member of which is referenced by
-.Fa base .
-The byte strings may contain any values; the end of each string
-is denoted by the user-specified value
-.Fa endbyte .
-.Pp
-Applications may specify a sort order by providing the
-.Fa table
-argument.
-If
-.Pf non- Dv NULL ,
-.Fa table
-must reference an array of
-.Dv UCHAR_MAX
-+ 1 bytes which contains the sort
-weight of each possible byte value.
-The end-of-string byte must have a sort weight of 0 or 255
-(for sorting in reverse order).
-More than one byte may have the same sort weight.
-The
-.Fa table
-argument
-is useful for applications which wish to sort different characters
-equally, for example, providing a table with the same weights
-for A-Z as for a-z will result in a case-insensitive sort.
-If
-.Fa table
-is NULL, the contents of the array are sorted in ascending order
-according to the
-.Tn ASCII
-order of the byte strings they reference and
-.Fa endbyte
-has a sorting weight of 0.
-.Pp
-The
-.Fn sradixsort
-function is stable, that is, if two elements compare as equal, their
-order in the sorted array is unchanged.
-The
-.Fn sradixsort
-function uses additional memory sufficient to hold
-.Fa nmemb
-pointers.
-.Pp
-The
-.Fn radixsort
-function is not stable, but uses no additional memory.
-.Pp
-These functions are variants of most-significant-byte radix sorting; in
-particular, see D.E. Knuth's Algorithm R and section 5.2.5, exercise 10.
-They take linear time relative to the number of bytes in the strings.
-.Sh RETURN VALUES
-Upon successful completion 0 is returned.
-Otherwise, \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The value of the
-.Fa endbyte
-element of
-.Fa table
-is not 0 or 255.
-.El
-.Pp
-Additionally, the
-.Fn sradixsort
-function
-may fail and set
-.Va errno
-for any of the errors specified for the library routine
-.Xr malloc 3 .
-.Sh SEE ALSO
-.Xr sort 1 ,
-.Xr qsort 3
-.Pp
-.Rs
-.%A Knuth, D.E.
-.%D 1968
-.%B "The Art of Computer Programming"
-.%T "Sorting and Searching"
-.%V Vol. 3
-.%P pp. 170-178
-.Re
-.Rs
-.%A Paige, R.
-.%D 1987
-.%T "Three Partition Refinement Algorithms"
-.%J "SIAM J. Comput."
-.%V Vol. 16
-.%N No. 6
-.Re
-.Rs
-.%A McIlroy, P.
-.%D 1993
-.%B "Engineering Radix Sort"
-.%T "Computing Systems"
-.%V Vol. 6:1
-.%P pp. 5-27
-.Re
-.Sh HISTORY
-The
-.Fn radixsort
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/stdlib/radixsort.c b/lib/libc/stdlib/radixsort.c
deleted file mode 100644
index 0a583ac..0000000
--- a/lib/libc/stdlib/radixsort.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Peter McIlroy and by Dan Bernstein at New York University,
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)radixsort.c 8.2 (Berkeley) 4/28/95";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Radixsort routines.
- *
- * Program r_sort_a() is unstable but uses O(logN) extra memory for a stack.
- * Use radixsort(a, n, trace, endchar) for this case.
- *
- * For stable sorting (using N extra pointers) use sradixsort(), which calls
- * r_sort_b().
- *
- * For a description of this code, see D. McIlroy, P. McIlroy, K. Bostic,
- * "Engineering Radix Sort".
- */
-
-#include <sys/types.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <errno.h>
-
-typedef struct {
- const u_char **sa;
- int sn, si;
-} stack;
-
-static inline void simplesort
- __P((const u_char **, int, int, const u_char *, u_int));
-static void r_sort_a __P((const u_char **, int, int, const u_char *, u_int));
-static void r_sort_b __P((const u_char **,
- const u_char **, int, int, const u_char *, u_int));
-
-#define THRESHOLD 20 /* Divert to simplesort(). */
-#define SIZE 512 /* Default stack size. */
-
-#define SETUP { \
- if (tab == NULL) { \
- tr = tr0; \
- for (c = 0; c < endch; c++) \
- tr0[c] = c + 1; \
- tr0[c] = 0; \
- for (c++; c < 256; c++) \
- tr0[c] = c; \
- endch = 0; \
- } else { \
- endch = tab[endch]; \
- tr = tab; \
- if (endch != 0 && endch != 255) { \
- errno = EINVAL; \
- return (-1); \
- } \
- } \
-}
-
-int
-radixsort(a, n, tab, endch)
- const u_char **a, *tab;
- int n;
- u_int endch;
-{
- const u_char *tr;
- int c;
- u_char tr0[256];
-
- SETUP;
- r_sort_a(a, n, 0, tr, endch);
- return (0);
-}
-
-int
-sradixsort(a, n, tab, endch)
- const u_char **a, *tab;
- int n;
- u_int endch;
-{
- const u_char *tr, **ta;
- int c;
- u_char tr0[256];
-
- SETUP;
- if (n < THRESHOLD)
- simplesort(a, n, 0, tr, endch);
- else {
- if ((ta = malloc(n * sizeof(a))) == NULL)
- return (-1);
- r_sort_b(a, ta, n, 0, tr, endch);
- free(ta);
- }
- return (0);
-}
-
-#define empty(s) (s >= sp)
-#define pop(a, n, i) a = (--sp)->sa, n = sp->sn, i = sp->si
-#define push(a, n, i) sp->sa = a, sp->sn = n, (sp++)->si = i
-#define swap(a, b, t) t = a, a = b, b = t
-
-/* Unstable, in-place sort. */
-static void
-r_sort_a(a, n, i, tr, endch)
- const u_char **a;
- int n, i;
- const u_char *tr;
- u_int endch;
-{
- static int count[256], nc, bmin;
- register int c;
- register const u_char **ak, *r;
- stack s[SIZE], *sp, *sp0, *sp1, temp;
- int *cp, bigc;
- const u_char **an, *t, **aj, **top[256];
-
- /* Set up stack. */
- sp = s;
- push(a, n, i);
- while (!empty(s)) {
- pop(a, n, i);
- if (n < THRESHOLD) {
- simplesort(a, n, i, tr, endch);
- continue;
- }
- an = a + n;
-
- /* Make character histogram. */
- if (nc == 0) {
- bmin = 255; /* First occupied bin, excluding eos. */
- for (ak = a; ak < an;) {
- c = tr[(*ak++)[i]];
- if (++count[c] == 1 && c != endch) {
- if (c < bmin)
- bmin = c;
- nc++;
- }
- }
- if (sp + nc > s + SIZE) { /* Get more stack. */
- r_sort_a(a, n, i, tr, endch);
- continue;
- }
- }
-
- /*
- * Set top[]; push incompletely sorted bins onto stack.
- * top[] = pointers to last out-of-place element in bins.
- * count[] = counts of elements in bins.
- * Before permuting: top[c-1] + count[c] = top[c];
- * during deal: top[c] counts down to top[c-1].
- */
- sp0 = sp1 = sp; /* Stack position of biggest bin. */
- bigc = 2; /* Size of biggest bin. */
- if (endch == 0) /* Special case: set top[eos]. */
- top[0] = ak = a + count[0];
- else {
- ak = a;
- top[255] = an;
- }
- for (cp = count + bmin; nc > 0; cp++) {
- while (*cp == 0) /* Find next non-empty pile. */
- cp++;
- if (*cp > 1) {
- if (*cp > bigc) {
- bigc = *cp;
- sp1 = sp;
- }
- push(ak, *cp, i+1);
- }
- top[cp-count] = ak += *cp;
- nc--;
- }
- swap(*sp0, *sp1, temp); /* Play it safe -- biggest bin last. */
-
- /*
- * Permute misplacements home. Already home: everything
- * before aj, and in bin[c], items from top[c] on.
- * Inner loop:
- * r = next element to put in place;
- * ak = top[r[i]] = location to put the next element.
- * aj = bottom of 1st disordered bin.
- * Outer loop:
- * Once the 1st disordered bin is done, ie. aj >= ak,
- * aj<-aj + count[c] connects the bins in a linked list;
- * reset count[c].
- */
- for (aj = a; aj < an; *aj = r, aj += count[c], count[c] = 0)
- for (r = *aj; aj < (ak = --top[c = tr[r[i]]]);)
- swap(*ak, r, t);
- }
-}
-
-/* Stable sort, requiring additional memory. */
-static void
-r_sort_b(a, ta, n, i, tr, endch)
- const u_char **a, **ta;
- int n, i;
- const u_char *tr;
- u_int endch;
-{
- static int count[256], nc, bmin;
- register int c;
- register const u_char **ak, **ai;
- stack s[512], *sp, *sp0, *sp1, temp;
- const u_char **top[256];
- int *cp, bigc;
-
- sp = s;
- push(a, n, i);
- while (!empty(s)) {
- pop(a, n, i);
- if (n < THRESHOLD) {
- simplesort(a, n, i, tr, endch);
- continue;
- }
-
- if (nc == 0) {
- bmin = 255;
- for (ak = a + n; --ak >= a;) {
- c = tr[(*ak)[i]];
- if (++count[c] == 1 && c != endch) {
- if (c < bmin)
- bmin = c;
- nc++;
- }
- }
- if (sp + nc > s + SIZE) {
- r_sort_b(a, ta, n, i, tr, endch);
- continue;
- }
- }
-
- sp0 = sp1 = sp;
- bigc = 2;
- if (endch == 0) {
- top[0] = ak = a + count[0];
- count[0] = 0;
- } else {
- ak = a;
- top[255] = a + n;
- count[255] = 0;
- }
- for (cp = count + bmin; nc > 0; cp++) {
- while (*cp == 0)
- cp++;
- if ((c = *cp) > 1) {
- if (c > bigc) {
- bigc = c;
- sp1 = sp;
- }
- push(ak, c, i+1);
- }
- top[cp-count] = ak += c;
- *cp = 0; /* Reset count[]. */
- nc--;
- }
- swap(*sp0, *sp1, temp);
-
- for (ak = ta + n, ai = a+n; ak > ta;) /* Copy to temp. */
- *--ak = *--ai;
- for (ak = ta+n; --ak >= ta;) /* Deal to piles. */
- *--top[tr[(*ak)[i]]] = *ak;
- }
-}
-
-static inline void
-simplesort(a, n, b, tr, endch) /* insertion sort */
- register const u_char **a;
- int n, b;
- register const u_char *tr;
- u_int endch;
-{
- register u_char ch;
- const u_char **ak, **ai, *s, *t;
-
- for (ak = a+1; --n >= 1; ak++)
- for (ai = ak; ai > a; ai--) {
- for (s = ai[0] + b, t = ai[-1] + b;
- (ch = tr[*s]) != endch; s++, t++)
- if (ch != tr[*t])
- break;
- if (ch >= tr[*t])
- break;
- swap(ai[0], ai[-1], s);
- }
-}
diff --git a/lib/libc/stdlib/rand.3 b/lib/libc/stdlib/rand.3
deleted file mode 100644
index f2e3742..0000000
--- a/lib/libc/stdlib/rand.3
+++ /dev/null
@@ -1,84 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)rand.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt RAND 3
-.Os
-.Sh NAME
-.Nm rand ,
-.Nm srand
-.Nd bad random number generator
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft void
-.Fn srand "unsigned seed"
-.Ft int
-.Fn rand void
-.Sh DESCRIPTION
-.Bf -symbolic
-These interfaces are obsoleted by random(3).
-.Ef
-.Pp
-The
-.Fn rand
-function computes a sequence of pseudo-random integers in the range
-of 0 to
-.Dv RAND_MAX
-(as defined by the header file
-.Aq Pa stdlib.h ) .
-.Pp
-The
-.Fn srand
-function sets its argument as the seed for a new sequence of
-pseudo-random numbers to be returned by
-.Fn rand .
-These sequences are repeatable by calling
-.Fn srand
-with the same seed value.
-.Pp
-If no seed value is provided, the functions are automatically
-seeded with a value of 1.
-.Sh SEE ALSO
-.Xr random 3
-.Sh STANDARDS
-The
-.Fn rand
-and
-.Fn srand
-functions
-conform to
-.St -ansiC .
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c
deleted file mode 100644
index 12846c3..0000000
--- a/lib/libc/stdlib/rand.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rand.c 8.1 (Berkeley) 6/14/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stdlib.h>
-
-static u_long next = 1;
-
-int
-rand()
-{
- return ((next = next * 1103515245 + 12345) % ((u_long)RAND_MAX + 1));
-}
-
-void
-srand(seed)
-u_int seed;
-{
- next = seed;
-}
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3
deleted file mode 100644
index 4691498..0000000
--- a/lib/libc/stdlib/random.3
+++ /dev/null
@@ -1,189 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)random.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt RANDOM 3
-.Os BSD 4.2
-.Sh NAME
-.Nm random ,
-.Nm srandom ,
-.Nm srandomdev ,
-.Nm initstate ,
-.Nm setstate
-.Nd better random number generator; routines for changing generators
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft long
-.Fn random void
-.Ft void
-.Fn srandom "unsigned long seed"
-.Ft void
-.Fn srandomdev void
-.Ft char *
-.Fn initstate "unsigned long seed" "char *state" "long n"
-.Ft char *
-.Fn setstate "char *state"
-.Sh DESCRIPTION
-The
-.Fn random
-function
-uses a non-linear additive feedback random number generator employing a
-default table of size 31 long integers to return successive pseudo-random
-numbers in the range from 0 to
-.if t 2\u\s731\s10\d\(mi1.
-.if n (2**31)\(mi1.
-The period of this random number generator is very large, approximately
-.if t 16\(mu(2\u\s731\s10\d\(mi1).
-.if n 16*((2**31)\(mi1).
-.Pp
-The
-.Fn random
-and
-.Fn srandom
-functions have (almost) the same calling sequence and initialization properties as the
-.Xr rand 3
-and
-.Xr srand 3
-functions.
-The difference is that
-.Xr rand 3
-produces a much less random sequence \(em in fact, the low dozen bits
-generated by rand go through a cyclic pattern. All the bits generated by
-.Fn random
-are usable. For example,
-.Sq Li random()&01
-will produce a random binary
-value.
-.Pp
-Like
-.Xr rand 3 ,
-.Fn random
-will by default produce a sequence of numbers that can be duplicated
-by calling
-.Fn srandom
-with
-.Ql 1
-as the seed.
-.Pp
-The
-.Fn srandomdev
-routine initialize a state array using
-.Xr urandom 4
-random number device which returns good random numbers,
-suitable for cryptographic use.
-Note that this particular seeding
-procedure can generate states which are impossible to reproduce by
-calling
-.Fn srandom
-with any value, since the succeeding terms in the
-state buffer are no longer derived from the LC algorithm applied to
-a fixed seed.
-.Pp
-The
-.Fn initstate
-routine allows a state array, passed in as an argument, to be initialized
-for future use. The size of the state array (in bytes) is used by
-.Fn initstate
-to decide how sophisticated a random number generator it should use \(em the
-more state, the better the random numbers will be.
-(Current "optimal" values for the amount of state information are
-8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to
-the nearest known amount. Using less than 8 bytes will cause an error.)
-The seed for the initialization (which specifies a starting point for
-the random number sequence, and provides for restarting at the same
-point) is also an argument.
-The
-.Fn initstate
-function
-returns a pointer to the previous state information array.
-.Pp
-Once a state has been initialized, the
-.Fn setstate
-routine provides for rapid switching between states.
-The
-.Fn setstate
-function
-returns a pointer to the previous state array; its
-argument state array is used for further random number generation
-until the next call to
-.Fn initstate
-or
-.Fn setstate .
-.Pp
-Once a state array has been initialized, it may be restarted at a
-different point either by calling
-.Fn initstate
-(with the desired seed, the state array, and its size) or by calling
-both
-.Fn setstate
-(with the state array) and
-.Fn srandom
-(with the desired seed).
-The advantage of calling both
-.Fn setstate
-and
-.Fn srandom
-is that the size of the state array does not have to be remembered after
-it is initialized.
-.Pp
-With 256 bytes of state information, the period of the random number
-generator is greater than
-.if t 2\u\s769\s10\d,
-.if n 2**69
-which should be sufficient for most purposes.
-.Sh AUTHOR
-Earl T. Cohen
-.Sh DIAGNOSTICS
-If
-.Fn initstate
-is called with less than 8 bytes of state information, or if
-.Fn setstate
-detects that the state information has been garbled, error
-messages are printed on the standard error output.
-.Sh SEE ALSO
-.Xr rand 3 ,
-.Xr srand 3 ,
-.Xr urandom 4
-.Sh HISTORY
-These
-functions appeared in
-.Bx 4.2 .
-.Sh BUGS
-.Pp
-About 2/3 the speed of
-.Xr rand 3 .
-.Pp
-The historical implementation used to have a very weak seeding; the
-random sequence did not vary much with the seed.
-The current implementation employs a better pseudo-random number
-generator for the initial state calculation.
diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c
deleted file mode 100644
index 4737e40..0000000
--- a/lib/libc/stdlib/random.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: random.c,v 1.9 1997/06/14 00:13:56 ache Exp $
- *
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/time.h> /* for srandomdev() */
-#include <fcntl.h> /* for srandomdev() */
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h> /* for srandomdev() */
-
-/*
- * random.c:
- *
- * An improved random number generation package. In addition to the standard
- * rand()/srand() like interface, this package also has a special state info
- * interface. The initstate() routine is called with a seed, an array of
- * bytes, and a count of how many bytes are being passed in; this array is
- * then initialized to contain information for random number generation with
- * that much state information. Good sizes for the amount of state
- * information are 32, 64, 128, and 256 bytes. The state can be switched by
- * calling the setstate() routine with the same array as was initiallized
- * with initstate(). By default, the package runs with 128 bytes of state
- * information and generates far better random numbers than a linear
- * congruential generator. If the amount of state information is less than
- * 32 bytes, a simple linear congruential R.N.G. is used.
- *
- * Internally, the state information is treated as an array of longs; the
- * zeroeth element of the array is the type of R.N.G. being used (small
- * integer); the remainder of the array is the state information for the
- * R.N.G. Thus, 32 bytes of state information will give 7 longs worth of
- * state information, which will allow a degree seven polynomial. (Note:
- * the zeroeth word of state information also has some other information
- * stored in it -- see setstate() for details).
- *
- * The random number generation technique is a linear feedback shift register
- * approach, employing trinomials (since there are fewer terms to sum up that
- * way). In this approach, the least significant bit of all the numbers in
- * the state table will act as a linear feedback shift register, and will
- * have period 2^deg - 1 (where deg is the degree of the polynomial being
- * used, assuming that the polynomial is irreducible and primitive). The
- * higher order bits will have longer periods, since their values are also
- * influenced by pseudo-random carries out of the lower bits. The total
- * period of the generator is approximately deg*(2**deg - 1); thus doubling
- * the amount of state information has a vast influence on the period of the
- * generator. Note: the deg*(2**deg - 1) is an approximation only good for
- * large deg, when the period of the shift register is the dominant factor.
- * With deg equal to seven, the period is actually much longer than the
- * 7*(2**7 - 1) predicted by this formula.
- *
- * Modified 28 December 1994 by Jacob S. Rosenberg.
- * The following changes have been made:
- * All references to the type u_int have been changed to unsigned long.
- * All references to type int have been changed to type long. Other
- * cleanups have been made as well. A warning for both initstate and
- * setstate has been inserted to the effect that on Sparc platforms
- * the 'arg_state' variable must be forced to begin on word boundaries.
- * This can be easily done by casting a long integer array to char *.
- * The overall logic has been left STRICTLY alone. This software was
- * tested on both a VAX and Sun SpacsStation with exactly the same
- * results. The new version and the original give IDENTICAL results.
- * The new version is somewhat faster than the original. As the
- * documentation says: "By default, the package runs with 128 bytes of
- * state information and generates far better random numbers than a linear
- * congruential generator. If the amount of state information is less than
- * 32 bytes, a simple linear congruential R.N.G. is used." For a buffer of
- * 128 bytes, this new version runs about 19 percent faster and for a 16
- * byte buffer it is about 5 percent faster.
- */
-
-/*
- * For each of the currently supported random number generators, we have a
- * break value on the amount of state information (you need at least this
- * many bytes of state info to support this random number generator), a degree
- * for the polynomial (actually a trinomial) that the R.N.G. is based on, and
- * the separation between the two lower order coefficients of the trinomial.
- */
-#define TYPE_0 0 /* linear congruential */
-#define BREAK_0 8
-#define DEG_0 0
-#define SEP_0 0
-
-#define TYPE_1 1 /* x**7 + x**3 + 1 */
-#define BREAK_1 32
-#define DEG_1 7
-#define SEP_1 3
-
-#define TYPE_2 2 /* x**15 + x + 1 */
-#define BREAK_2 64
-#define DEG_2 15
-#define SEP_2 1
-
-#define TYPE_3 3 /* x**31 + x**3 + 1 */
-#define BREAK_3 128
-#define DEG_3 31
-#define SEP_3 3
-
-#define TYPE_4 4 /* x**63 + x + 1 */
-#define BREAK_4 256
-#define DEG_4 63
-#define SEP_4 1
-
-/*
- * Array versions of the above information to make code run faster --
- * relies on fact that TYPE_i == i.
- */
-#define MAX_TYPES 5 /* max number of types above */
-
-static long degrees[MAX_TYPES] = { DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 };
-static long seps [MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
-
-/*
- * Initially, everything is set up as if from:
- *
- * initstate(1, randtbl, 128);
- *
- * Note that this initialization takes advantage of the fact that srandom()
- * advances the front and rear pointers 10*rand_deg times, and hence the
- * rear pointer which starts at 0 will also end up at zero; thus the zeroeth
- * element of the state information, which contains info about the current
- * position of the rear pointer is just
- *
- * MAX_TYPES * (rptr - state) + TYPE_3 == TYPE_3.
- */
-
-static long randtbl[DEG_3 + 1] = {
- TYPE_3,
-#ifdef USE_WEAK_SEEDING
-/* Historic implementation compatibility */
-/* The random sequences do not vary much with the seed */
- 0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342, 0xde3b81e0, 0xdf0a6fb5,
- 0xf103bc02, 0x48f340fb, 0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd,
- 0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86, 0xda672e2a, 0x1588ca88,
- 0xe369735d, 0x904f35f7, 0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
- 0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b, 0xf5ad9d0e, 0x8999220b,
- 0x27fb47b9,
-#else /* !USE_WEAK_SEEDING */
- 0x991539b1, 0x16a5bce3, 0x6774a4cd, 0x3e01511e, 0x4e508aaa, 0x61048c05,
- 0xf5500617, 0x846b7115, 0x6a19892c, 0x896a97af, 0xdb48f936, 0x14898454,
- 0x37ffd106, 0xb58bff9c, 0x59e17104, 0xcf918a49, 0x09378c83, 0x52c7a471,
- 0x8d293ea9, 0x1f4fc301, 0xc3db71be, 0x39b44e1c, 0xf8a44ef9, 0x4c8b80b1,
- 0x19edc328, 0x87bf4bdd, 0xc9b240e5, 0xe9ee4b1b, 0x4382aee7, 0x535b6b41,
- 0xf3bec5da
-#endif /* !USE_WEAK_SEEDING */
-};
-
-/*
- * fptr and rptr are two pointers into the state info, a front and a rear
- * pointer. These two pointers are always rand_sep places aparts, as they
- * cycle cyclically through the state information. (Yes, this does mean we
- * could get away with just one pointer, but the code for random() is more
- * efficient this way). The pointers are left positioned as they would be
- * from the call
- *
- * initstate(1, randtbl, 128);
- *
- * (The position of the rear pointer, rptr, is really 0 (as explained above
- * in the initialization of randtbl) because the state table pointer is set
- * to point to randtbl[1] (as explained below).
- */
-static long *fptr = &randtbl[SEP_3 + 1];
-static long *rptr = &randtbl[1];
-
-/*
- * The following things are the pointer to the state information table, the
- * type of the current generator, the degree of the current polynomial being
- * used, and the separation between the two pointers. Note that for efficiency
- * of random(), we remember the first location of the state information, not
- * the zeroeth. Hence it is valid to access state[-1], which is used to
- * store the type of the R.N.G. Also, we remember the last location, since
- * this is more efficient than indexing every time to find the address of
- * the last element to see if the front and rear pointers have wrapped.
- */
-static long *state = &randtbl[1];
-static long rand_type = TYPE_3;
-static long rand_deg = DEG_3;
-static long rand_sep = SEP_3;
-static long *end_ptr = &randtbl[DEG_3 + 1];
-
-static inline long good_rand __P((long));
-
-static inline long good_rand (x)
- register long x;
-{
-#ifdef USE_WEAK_SEEDING
-/*
- * Historic implementation compatibility.
- * The random sequences do not vary much with the seed,
- * even with overflowing.
- */
- return (1103515245 * x + 12345);
-#else /* !USE_WEAK_SEEDING */
-/*
- * Compute x = (7^5 * x) mod (2^31 - 1)
- * wihout overflowing 31 bits:
- * (2^31 - 1) = 127773 * (7^5) + 2836
- * From "Random number generators: good ones are hard to find",
- * Park and Miller, Communications of the ACM, vol. 31, no. 10,
- * October 1988, p. 1195.
- */
- register long hi, lo;
-
- hi = x / 127773;
- lo = x % 127773;
- x = 16807 * lo - 2836 * hi;
- if (x <= 0)
- x += 0x7fffffff;
- return (x);
-#endif /* !USE_WEAK_SEEDING */
-}
-
-/*
- * srandom:
- *
- * Initialize the random number generator based on the given seed. If the
- * type is the trivial no-state-information type, just remember the seed.
- * Otherwise, initializes state[] based on the given "seed" via a linear
- * congruential generator. Then, the pointers are set to known locations
- * that are exactly rand_sep places apart. Lastly, it cycles the state
- * information a given number of times to get rid of any initial dependencies
- * introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
- * for default usage relies on values produced by this routine.
- */
-void
-srandom(x)
- unsigned long x;
-{
- register long i;
-
- if (rand_type == TYPE_0)
- state[0] = x;
- else {
- state[0] = x;
- for (i = 1; i < rand_deg; i++)
- state[i] = good_rand(state[i - 1]);
- fptr = &state[rand_sep];
- rptr = &state[0];
- for (i = 0; i < 10 * rand_deg; i++)
- (void)random();
- }
-}
-
-/*
- * srandomdev:
- *
- * Many programs choose the seed value in a totally predictable manner.
- * This often causes problems. We seed the generator using the much more
- * secure urandom(4) interface. Note that this particular seeding
- * procedure can generate states which are impossible to reproduce by
- * calling srandom() with any value, since the succeeding terms in the
- * state buffer are no longer derived from the LC algorithm applied to
- * a fixed seed.
- */
-void
-srandomdev()
-{
- int fd, done;
- size_t len;
-
- if (rand_type == TYPE_0)
- len = sizeof state[0];
- else
- len = rand_deg * sizeof state[0];
-
- done = 0;
- fd = open("/dev/urandom", O_RDONLY, 0);
- if (fd >= 0) {
- if (read(fd, (void *) state, len) == (ssize_t) len)
- done = 1;
- close(fd);
- }
-
- if (!done) {
- struct timeval tv;
- unsigned long junk;
-
- gettimeofday(&tv, NULL);
- srandom(getpid() ^ tv.tv_sec ^ tv.tv_usec ^ junk);
- return;
- }
-
- if (rand_type != TYPE_0) {
- fptr = &state[rand_sep];
- rptr = &state[0];
- }
-}
-
-/*
- * initstate:
- *
- * Initialize the state information in the given array of n bytes for future
- * random number generation. Based on the number of bytes we are given, and
- * the break values for the different R.N.G.'s, we choose the best (largest)
- * one we can and set things up for it. srandom() is then called to
- * initialize the state information.
- *
- * Note that on return from srandom(), we set state[-1] to be the type
- * multiplexed with the current value of the rear pointer; this is so
- * successive calls to initstate() won't lose this information and will be
- * able to restart with setstate().
- *
- * Note: the first thing we do is save the current state, if any, just like
- * setstate() so that it doesn't matter when initstate is called.
- *
- * Returns a pointer to the old state.
- *
- * Note: The Sparc platform requires that arg_state begin on a long
- * word boundary; otherwise a bus error will occur. Even so, lint will
- * complain about mis-alignment, but you should disregard these messages.
- */
-char *
-initstate(seed, arg_state, n)
- unsigned long seed; /* seed for R.N.G. */
- char *arg_state; /* pointer to state array */
- long n; /* # bytes of state info */
-{
- register char *ostate = (char *)(&state[-1]);
- register long *long_arg_state = (long *) arg_state;
-
- if (rand_type == TYPE_0)
- state[-1] = rand_type;
- else
- state[-1] = MAX_TYPES * (rptr - state) + rand_type;
- if (n < BREAK_0) {
- (void)fprintf(stderr,
- "random: not enough state (%ld bytes); ignored.\n", n);
- return(0);
- }
- if (n < BREAK_1) {
- rand_type = TYPE_0;
- rand_deg = DEG_0;
- rand_sep = SEP_0;
- } else if (n < BREAK_2) {
- rand_type = TYPE_1;
- rand_deg = DEG_1;
- rand_sep = SEP_1;
- } else if (n < BREAK_3) {
- rand_type = TYPE_2;
- rand_deg = DEG_2;
- rand_sep = SEP_2;
- } else if (n < BREAK_4) {
- rand_type = TYPE_3;
- rand_deg = DEG_3;
- rand_sep = SEP_3;
- } else {
- rand_type = TYPE_4;
- rand_deg = DEG_4;
- rand_sep = SEP_4;
- }
- state = (long *) (long_arg_state + 1); /* first location */
- end_ptr = &state[rand_deg]; /* must set end_ptr before srandom */
- srandom(seed);
- if (rand_type == TYPE_0)
- long_arg_state[0] = rand_type;
- else
- long_arg_state[0] = MAX_TYPES * (rptr - state) + rand_type;
- return(ostate);
-}
-
-/*
- * setstate:
- *
- * Restore the state from the given state array.
- *
- * Note: it is important that we also remember the locations of the pointers
- * in the current state information, and restore the locations of the pointers
- * from the old state information. This is done by multiplexing the pointer
- * location into the zeroeth word of the state information.
- *
- * Note that due to the order in which things are done, it is OK to call
- * setstate() with the same state as the current state.
- *
- * Returns a pointer to the old state information.
- *
- * Note: The Sparc platform requires that arg_state begin on a long
- * word boundary; otherwise a bus error will occur. Even so, lint will
- * complain about mis-alignment, but you should disregard these messages.
- */
-char *
-setstate(arg_state)
- char *arg_state; /* pointer to state array */
-{
- register long *new_state = (long *) arg_state;
- register long type = new_state[0] % MAX_TYPES;
- register long rear = new_state[0] / MAX_TYPES;
- char *ostate = (char *)(&state[-1]);
-
- if (rand_type == TYPE_0)
- state[-1] = rand_type;
- else
- state[-1] = MAX_TYPES * (rptr - state) + rand_type;
- switch(type) {
- case TYPE_0:
- case TYPE_1:
- case TYPE_2:
- case TYPE_3:
- case TYPE_4:
- rand_type = type;
- rand_deg = degrees[type];
- rand_sep = seps[type];
- break;
- default:
- (void)fprintf(stderr,
- "random: state info corrupted; not changed.\n");
- }
- state = (long *) (new_state + 1);
- if (rand_type != TYPE_0) {
- rptr = &state[rear];
- fptr = &state[(rear + rand_sep) % rand_deg];
- }
- end_ptr = &state[rand_deg]; /* set end_ptr too */
- return(ostate);
-}
-
-/*
- * random:
- *
- * If we are using the trivial TYPE_0 R.N.G., just do the old linear
- * congruential bit. Otherwise, we do our fancy trinomial stuff, which is
- * the same in all the other cases due to all the global variables that have
- * been set up. The basic operation is to add the number at the rear pointer
- * into the one at the front pointer. Then both pointers are advanced to
- * the next location cyclically in the table. The value returned is the sum
- * generated, reduced to 31 bits by throwing away the "least random" low bit.
- *
- * Note: the code takes advantage of the fact that both the front and
- * rear pointers can't wrap on the same call by not testing the rear
- * pointer if the front one has wrapped.
- *
- * Returns a 31-bit random number.
- */
-long
-random()
-{
- register long i;
- register long *f, *r;
-
- if (rand_type == TYPE_0) {
- i = state[0];
- state[0] = i = (good_rand(i)) & 0x7fffffff;
- } else {
- /*
- * Use local variables rather than static variables for speed.
- */
- f = fptr; r = rptr;
- *f += *r;
- i = (*f >> 1) & 0x7fffffff; /* chucking least random bit */
- if (++f >= end_ptr) {
- f = state;
- ++r;
- }
- else if (++r >= end_ptr) {
- r = state;
- }
-
- fptr = f; rptr = r;
- }
- return(i);
-}
diff --git a/lib/libc/stdlib/realpath.3 b/lib/libc/stdlib/realpath.3
deleted file mode 100644
index 1cbbca9..0000000
--- a/lib/libc/stdlib/realpath.3
+++ /dev/null
@@ -1,125 +0,0 @@
-.\" Copyright (c) 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Jan-Simon Pendry.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)realpath.3 8.2 (Berkeley) 2/16/94
-.\"
-.Dd February 16, 1994
-.Dt REALPATH 3
-.Os
-.Sh NAME
-.Nm realpath
-.Nd returns the canonicalized absolute pathname
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <stdlib.h>
-.Ft "char *"
-.Fn realpath "const char *pathname" "char resolvedname[MAXPATHLEN]"
-.Sh DESCRIPTION
-The
-.Fn realpath
-function resolves all symbolic links, extra
-.Dq /
-characters and references to
-.Pa /./
-and
-.Pa /../
-in
-.Fa pathname ,
-and copies the resulting absolute pathname into
-the memory referenced by
-.Fa resolvedname .
-The
-.Fa resolvedname
-argument
-.Em must
-refer to a buffer capable of storing at least
-.Dv MAXPATHLEN
-characters.
-.Pp
-The
-.Fn realpath
-function will resolve both absolute and relative paths
-and return the absolute pathname corresponding to
-.Fa pathname .
-All but the last component of
-.Fa pathname
-must exist when
-.Fn realpath
-is called.
-.Sh "RETURN VALUES"
-The
-.Fn realpath
-function returns
-.Fa resolved_name
-on success.
-If an error occurs,
-.Fn realpath
-returns
-.Dv NULL ,
-and
-.Fa resolved_name
-contains the pathname which caused the problem.
-.Sh ERRORS
-The function
-.Fn realpath
-may fail and set the external variable
-.Va errno
-for any of the errors specified for the library functions
-.Xr chdir 2 ,
-.Xr close 2 ,
-.Xr fchdir 2 ,
-.Xr lstat 2 ,
-.Xr open 2 ,
-.Xr readlink 2
-and
-.Xr getcwd 3 .
-.Sh CAVEATS
-This implementation of
-.Fn realpath
-differs slightly from the Solaris implementation.
-The
-.Bx 4.4
-version always returns absolute pathnames,
-whereas the Solaris implementation will,
-under certain circumstances, return a relative
-.Fa resolved_path
-when given a relative
-.Fa pathname .
-.Sh "SEE ALSO"
-.Xr getcwd 3
-.Sh HISTORY
-The
-.Fn realpath
-function call first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c
deleted file mode 100644
index 998ef57..0000000
--- a/lib/libc/stdlib/realpath.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 1994
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)realpath.c 8.1 (Berkeley) 2/16/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/*
- * char *realpath(const char *path, char resolved_path[MAXPATHLEN]);
- *
- * Find the real name of path, by removing all ".", ".." and symlink
- * components. Returns (resolved) on success, or (NULL) on failure,
- * in which case the path which caused trouble is left in (resolved).
- */
-char *
-realpath(path, resolved)
- const char *path;
- char *resolved;
-{
- struct stat sb;
- int fd, n, rootd, serrno;
- char *p, *q, wbuf[MAXPATHLEN];
- int symlinks = 0;
-
- /* Save the starting point. */
- if ((fd = open(".", O_RDONLY)) < 0) {
- (void)strcpy(resolved, ".");
- return (NULL);
- }
-
- /*
- * Find the dirname and basename from the path to be resolved.
- * Change directory to the dirname component.
- * lstat the basename part.
- * if it is a symlink, read in the value and loop.
- * if it is a directory, then change to that directory.
- * get the current directory name and append the basename.
- */
- (void)strncpy(resolved, path, MAXPATHLEN - 1);
- resolved[MAXPATHLEN - 1] = '\0';
-loop:
- q = strrchr(resolved, '/');
- if (q != NULL) {
- p = q + 1;
- if (q == resolved)
- q = "/";
- else {
- do {
- --q;
- } while (q > resolved && *q == '/');
- q[1] = '\0';
- q = resolved;
- }
- if (chdir(q) < 0)
- goto err1;
- } else
- p = resolved;
-
- /* Deal with the last component. */
- if (*p != '\0' && lstat(p, &sb) == 0) {
- if (S_ISLNK(sb.st_mode)) {
- if (++symlinks > MAXSYMLINKS) {
- errno = ELOOP;
- goto err1;
- }
- n = readlink(p, resolved, MAXPATHLEN);
- if (n < 0)
- goto err1;
- resolved[n] = '\0';
- goto loop;
- }
- if (S_ISDIR(sb.st_mode)) {
- if (chdir(p) < 0)
- goto err1;
- p = "";
- }
- }
-
- /*
- * Save the last component name and get the full pathname of
- * the current directory.
- */
- (void)strcpy(wbuf, p);
- if (getcwd(resolved, MAXPATHLEN) == 0)
- goto err1;
-
- /*
- * Join the two strings together, ensuring that the right thing
- * happens if the last component is empty, or the dirname is root.
- */
- if (resolved[0] == '/' && resolved[1] == '\0')
- rootd = 1;
- else
- rootd = 0;
-
- if (*wbuf) {
- if (strlen(resolved) + strlen(wbuf) + rootd + 1 > MAXPATHLEN) {
- errno = ENAMETOOLONG;
- goto err1;
- }
- if (rootd == 0)
- (void)strcat(resolved, "/");
- (void)strcat(resolved, wbuf);
- }
-
- /* Go back to where we came from. */
- if (fchdir(fd) < 0) {
- serrno = errno;
- goto err2;
- }
-
- /* It's okay if the close fails, what's an fd more or less? */
- (void)close(fd);
- return (resolved);
-
-err1: serrno = errno;
- (void)fchdir(fd);
-err2: (void)close(fd);
- errno = serrno;
- return (NULL);
-}
diff --git a/lib/libc/stdlib/setenv.c b/lib/libc/stdlib/setenv.c
deleted file mode 100644
index d981277..0000000
--- a/lib/libc/stdlib/setenv.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setenv.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-char *__findenv __P((const char *, int *));
-
-/*
- * setenv --
- * Set the value of the environmental variable "name" to be
- * "value". If rewrite is set, replace any current value.
- */
-int
-setenv(name, value, rewrite)
- register const char *name;
- register const char *value;
- int rewrite;
-{
- extern char **environ;
- static int alloced; /* if allocated space before */
- register char *c;
- int l_value, offset;
-
- if (*value == '=') /* no `=' in value */
- ++value;
- l_value = strlen(value);
- if ((c = __findenv(name, &offset))) { /* find if already exists */
- if (!rewrite)
- return (0);
- if (strlen(c) >= l_value) { /* old larger; copy over */
- while ( (*c++ = *value++) );
- return (0);
- }
- } else { /* create new slot */
- register int cnt;
- register char **p;
-
- for (p = environ, cnt = 0; *p; ++p, ++cnt);
- if (alloced) { /* just increase size */
- environ = (char **)realloc((char *)environ,
- (size_t)(sizeof(char *) * (cnt + 2)));
- if (!environ)
- return (-1);
- }
- else { /* get new space */
- alloced = 1; /* copy old entries into it */
- p = malloc((size_t)(sizeof(char *) * (cnt + 2)));
- if (!p)
- return (-1);
- bcopy(environ, p, cnt * sizeof(char *));
- environ = p;
- }
- environ[cnt + 1] = NULL;
- offset = cnt;
- }
- for (c = (char *)name; *c && *c != '='; ++c); /* no `=' in name */
- if (!(environ[offset] = /* name + `=' + value */
- malloc((size_t)((int)(c - name) + l_value + 2))))
- return (-1);
- for (c = environ[offset]; (*c = *name++) && *c != '='; ++c);
- for (*c++ = '='; (*c++ = *value++); );
- return (0);
-}
-
-/*
- * unsetenv(name) --
- * Delete environmental variable "name".
- */
-void
-unsetenv(name)
- const char *name;
-{
- extern char **environ;
- register char **p;
- int offset;
-
- while (__findenv(name, &offset)) /* if set multiple times */
- for (p = &environ[offset];; ++p)
- if (!(*p = *(p + 1)))
- break;
-}
diff --git a/lib/libc/stdlib/strhash.c b/lib/libc/stdlib/strhash.c
deleted file mode 100644
index 8e2230b..0000000
--- a/lib/libc/stdlib/strhash.c
+++ /dev/null
@@ -1,436 +0,0 @@
-#ifndef lint
-static char *rcsid = "$Header: /home/ncvs/src/lib/libc/stdlib/strhash.c,v 1.5 1995/10/22 14:53:17 phk Exp $";
-#endif
-
-/*
- *
- * Copyright 1990
- * Terry Jones & Jordan Hubbard
- *
- * PCS Computer Systeme, GmbH.
- * Munich, West Germany
- *
- *
- * All rights reserved.
- *
- * This is unsupported software and is subject to change without notice.
- * the author makes no representations about the suitability of this software
- * for any purpose. It is supplied "as is" without express or implied
- * warranty.
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted, 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 the author not be used in
- * advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission.
- *
- */
-
-/*
- * This is a fairly simple open addressing hash scheme.
- * Terry did all the code, I just did the spec.
- * Thanks again, you crazy Aussie..
- *
- */
-
-/*
- * $Log: strhash.c,v $
- * Revision 1.5 1995/10/22 14:53:17 phk
- * Mino cleanup, #includes & unused vars.
- *
- * Revision 1.4 1995/05/30 05:41:55 rgrimes
- * Remove trailing whitespace.
- *
- * Revision 1.3 1995/03/28 08:41:02 jkh
- * Fix a missing _hash() to prevent namespace pollution with the db/hash routines.
- * Grrr. If the dbhash routines weren't grossly overengineered I wouldn't
- * even need to do this! :-(
- *
- * Also now export the hash_stats routine. Manpage coming RSN - I promise.
- *
- * Revision 1.2 1995/03/26 19:32:24 ache
- * Hash 8bit chars without sign extension
- *
- * Revision 1.1 1995/03/26 10:21:55 jkh
- * Add the strhash family of routines. They provide a number of features
- * that the db/hash functions don't, and they're much simpler to use for
- * low-overhead string hashing.
- *
- * Revision 1.1 1995/02/25 02:16:34 jkh
- * Second version of this - now support the essentials of a basic
- * attributed file system for storing menu information and command
- * templates. This is not finished yet, but it does compile so I can
- * commit it to the tree now and continue working on it.
- *
- * Revision 2.0 90/03/26 01:44:26 jkh
- * pre-beta check-in
- *
- * Revision 1.8 90/03/09 19:22:35 jkh
- * Fixed bogus comment.
- *
- * Revision 1.7 90/03/09 19:01:08 jkh
- * Added comments, GPL.
- *
- * Revision 1.6 90/03/08 17:55:58 terry
- * Rearranged hash_purge to be a tiny bit more efficient.
- * Added verbose option to hash_stats.
- *
- * Revision 1.5 90/03/08 17:19:54 terry
- * Added hash_purge. Added arg to hash_traverse. Changed all
- * void * to Generic.
- *
- * Revision 1.4 90/03/08 12:02:35 terry
- * Fixed problems with allocation that I screwed up last night.
- * Changed bucket lists to be singly linked. Thanks to JKH, my hero.
- *
- * Revision 1.3 90/03/07 21:33:33 terry
- * Cleaned up a few decls to keep gcc -Wall quiet.
- *
- * Revision 1.2 90/03/07 21:14:53 terry
- * Comments. Added HASH_STATS define. Removed hash_find()
- * and new_node().
- *
- * Revision 1.1 90/03/07 20:49:45 terry
- * Initial revision
- *
- *
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <strhash.h>
-
-#define HASH_NULL (hash_table *)0
-#define NODE_NULL (hash_node *)0
-#define GENERIC_NULL (void *)0
-
-#define HASH_SZ 97
-
-
-static int _hash(int size, char *key);
-static hash_node *list_find(caddr_t key, hash_node *head);
-
-
-/*
- * hash_create()
- *
- * Malloc room for a new hash table and then room for its
- * bucket pointers. Then set all the buckets to
- * point to 0. Return the address of the new table.
- */
-hash_table *
-hash_create(int size)
-{
- register int i;
- hash_table *new = (hash_table *)malloc(sizeof(hash_table));
-
- if (!new || size < 0){
- return HASH_NULL;
- }
-
- if (size == 0){
- size = HASH_SZ;
- }
-
- if (!(new->buckets = (hash_node **)malloc(size * sizeof(hash_node *)))){
- return HASH_NULL;
- }
-
- for (i = 0; i < size; i++){
- new->buckets[i] = NODE_NULL;
- }
- new->size = size;
-
- return new;
-}
-
-
-/*
- * list_find()
- *
- * Find the key in the linked list pointed to by head.
- */
-static hash_node *
-list_find(caddr_t key, hash_node *head)
-{
- while (head){
- if (!strcmp(head->key, key)){
- return head;
- }
- head = head->next;
- }
- return NODE_NULL;
-}
-
-
-/*
- * _hash()
- *
- * Compute the hash value for the given key.
- */
-static int
-_hash(int size, char *key)
-{
- unsigned int h = 0x0;
-
- while (*key){
- h = (h << 1) ^ (h ^ (unsigned char) *key++);
- }
-
- h %= size;
- return h;
-}
-
-/*
- * hash_destroy()
- *
- * Find the key and (if it's there) remove it entirely.
- * The function (*nukefunc)() is in charge of disposing
- * of the storage help by the data associated with the node.
- */
-void
-hash_destroy(hash_table *table, char *key, void (*nukefunc)())
-{
- int bucket = _hash(table->size, key);
- hash_node *found = table->buckets[bucket];
- hash_node *to_free = NODE_NULL;
-
- if (!found) {
- return;
- }
-
- if (!strcmp(found->key, key)) {
- /*
- * It was the head of the list.
- */
- table->buckets[bucket] = found->next;
- to_free = found;
- }
- else {
- /*
- * Walk the list, looking one ahead.
- */
- while (found->next) {
- if (!strcmp(found->next->key, key)) {
- to_free = found->next;
- found->next = found->next->next;
- break;
- }
- found = found->next;
- }
-
- if (!to_free){
- return;
- }
- }
-
- if (nukefunc)
- (*nukefunc)(to_free->key, to_free->data);
- free(to_free);
- return;
-}
-
-
-/*
- * hash_search()
- *
- * Search the table for the given key. Then:
- *
- * 1) If you find it and there is no replacement function, just
- * return what you found. (This is a simple search).
- * 2) If you find it and there is a replacement function, run
- * the function on the data you found, and replace the old
- * data with whatever is passed in datum. Return 0.
- * 3) If you don't find it and there is some datum, insert a
- * new item into the table. Insertions go at the front of
- * the bucket. Return 0.
- * 4) Otherwise just return 0.
- *
- */
-void *
-hash_search(hash_table *table, caddr_t key, void *datum,
- void (*replace_func)())
-{
- int bucket = _hash(table->size, key);
- hash_node *found = list_find(key, table->buckets[bucket]);
-
- if (found){
- if (!replace_func){
- return found->data;
- }
- else{
- (*replace_func)(found->data);
- found->data = datum;
- }
- }
- else{
- if (datum){
-
- static int assign_key();
-
- hash_node *new = (hash_node *)malloc(sizeof(hash_node));
-
- if (!new || !assign_key(key, new)){
- return GENERIC_NULL;
- }
- new->data = datum;
- new->next = table->buckets[bucket];
- table->buckets[bucket] = new;
- return new;
- }
- }
- return GENERIC_NULL;
-}
-
-
-/*
- * assign_key()
- *
- * Set the key value of a node to be 'key'. Get some space from
- * malloc and copy it in etc. Return 1 if all is well, 0 otherwise.
- */
-static int
-assign_key(char *key, hash_node *node)
-{
- if (!node || !key){
- return 0;
- }
-
- if (!(node->key = (char *)malloc(strlen(key) + 1))){
- return 0;
- }
-
- node->key[0] = '\0';
- strcat(node->key, key);
- return 1;
-}
-
-/*
- * hash_traverse()
- *
- * Traverse the hash table and run the function func on the
- * data found at each node and the argument we're passed for it.
- */
-void
-hash_traverse(hash_table *table, int (*func)(), void *arg)
-{
- register int i;
- register int size = table->size;
-
- if (!func)
- return;
-
- for (i = 0; i < size; i++) {
- hash_node *n = table->buckets[i];
- while (n) {
- if ((*func)(n->key, n->data, arg) == 0)
- return;
- n = n->next;
- }
- }
- return;
-}
-
-/*
- * hash_purge()
- *
- * Run through the entire hash table. Call purge_func
- * on the data found at each node, and then free the node.
- * Set all the bucket pointers to 0.
- */
-void
-hash_purge(hash_table *table, void (*purge_func)(char *p1, void *p2))
-{
- register int i;
- register int size = table->size;
-
- for (i = 0; i < size; i++) {
- hash_node *n = table->buckets[i];
- if (n) {
- do {
- hash_node *to_free = n;
- if (purge_func) {
- (*purge_func)(n->key, n->data);
- }
- n = n->next;
- free(to_free);
- } while (n);
- table->buckets[i] = NODE_NULL;
- }
- }
-}
-
-#undef min
-#define min(a, b) (a) < (b) ? (a) : (b)
-
-/*
- * hash_stats()
- *
- * Print statistics about the current table allocation to stdout.
- */
-void
-hash_stats(hash_table *table, int verbose)
-{
- register int i;
- int total_elements = 0;
- int non_empty_buckets = 0;
- int max_count = 0;
- int max_repeats = 0;
- int *counts;
- int size = table->size;
-
- if (!(counts = (int *)malloc(size * sizeof(int)))){
- fprintf(stderr, "malloc returns 0\n");
- exit(1);
- }
-
- for (i = 0; i < size; i++){
- int x = 0;
- hash_node *n = table->buckets[i];
- counts[i] = 0;
- while (n){
- if (!x){
- x = 1;
- non_empty_buckets++;
- if (verbose){
- printf("bucket %2d: ", i);
- }
- }
- if (verbose){
- printf(" %s", n->key);
- }
- counts[i]++;
- n = n->next;
- }
-
- total_elements += counts[i];
- if (counts[i] > max_count){
- max_count = counts[i];
- max_repeats = 1;
- }
- else if (counts[i] == max_count){
- max_repeats++;
- }
-
- if (counts[i] && verbose){
- printf(" (%d)\n", counts[i]);
- }
- }
-
- printf("\n");
- printf("%d element%s in storage.\n", total_elements, total_elements == 1 ? "" : "s");
-
- if (total_elements){
- printf("%d of %d (%.2f%%) buckets are in use\n", non_empty_buckets, size,
- (double)100 * (double)non_empty_buckets / (double)(size));
- printf("the maximum number of elements in a bucket is %d (%d times)\n", max_count, max_repeats);
- printf("average per bucket is %f\n", (double)total_elements / (double)non_empty_buckets);
- printf("optimal would be %f\n", (double)total_elements / (double)(min(size, total_elements)));
- }
- return;
-}
diff --git a/lib/libc/stdlib/strtod.3 b/lib/libc/stdlib/strtod.3
deleted file mode 100644
index e1d4c39..0000000
--- a/lib/libc/stdlib/strtod.3
+++ /dev/null
@@ -1,132 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strtod.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRTOD 3
-.Os
-.Sh NAME
-.Nm strtod
-.Nd convert
-.Tn ASCII
-string to double
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft double
-.Fn strtod "const char *nptr" "char **endptr"
-.Sh DESCRIPTION
-The
-.Fn strtod
-function converts the initial portion of the string
-pointed to by
-.Fa nptr
-to
-.Em double
-representation.
-.Pp
-The expected form of the string is an optional plus (``+'') or minus
-sign (``\-'') followed by a sequence of digits optionally containing
-a decimal-point character, optionally followed by an exponent.
-An exponent consists of an ``E'' or ``e'', followed by an optional plus
-or minus sign, followed by a sequence of digits.
-.Pp
-Leading white-space characters in the string (as defined by the
-.Xr isspace 3
-function) are skipped.
-.Sh RETURN VALUES
-The
-.Fn strtod
-function returns the converted value, if any.
-.Pp
-If
-.Fa endptr
-is not
-.Dv NULL ,
-a pointer to the character after the last character used
-in the conversion is stored in the location referenced by
-.Fa endptr .
-.Pp
-If no conversion is performed, zero is returned and the value of
-.Fa nptr
-is stored in the location referenced by
-.Fa endptr .
-.Pp
-If the correct value would cause overflow, plus or minus
-.Dv HUGE_VAL
-is returned (according to the sign of the value), and
-.Dv ERANGE
-is stored in
-.Va errno .
-If the correct value would cause underflow, zero is
-returned and
-.Dv ERANGE
-is stored in
-.Va errno .
-.Sh ERRORS
-.Bl -tag -width [ERANGE]
-.It Bq Er ERANGE
-Overflow or underflow occurred.
-.Sh SEE ALSO
-.Xr atof 3 ,
-.Xr atoi 3 ,
-.Xr atol 3 ,
-.Xr strtol 3 ,
-.Xr strtoul 3
-.Sh STANDARDS
-The
-.Fn strtod
-function
-conforms to
-.St -ansiC .
-.Sh AUTHORS
-The author of this software is David M. Gay.
-.Pp
-Copyright (c) 1991 by AT&T.
-.Pp
-Permission to use, copy, modify, and distribute this software for any
-purpose without fee is hereby granted, provided that this entire notice
-is included in all copies of any software which is or includes a copy
-or modification of this software and in all copies of the supporting
-documentation for such software.
-.Pp
-THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
-WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
-REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
-OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
-.Pp
-Contact your vendor for a free copy of the source code to
-.Fn strtod
-and accompanying functions.
diff --git a/lib/libc/stdlib/strtod.c b/lib/libc/stdlib/strtod.c
deleted file mode 100644
index 27fb499..0000000
--- a/lib/libc/stdlib/strtod.c
+++ /dev/null
@@ -1,2443 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtod.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/****************************************************************
- *
- * The author of this software is David M. Gay.
- *
- * Copyright (c) 1991 by AT&T.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose without fee is hereby granted, provided that this entire notice
- * is included in all copies of any software which is or includes a copy
- * or modification of this software and in all copies of the supporting
- * documentation for such software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
- * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
- *
- ***************************************************************/
-
-/* Please send bug reports to
- David M. Gay
- AT&T Bell Laboratories, Room 2C-463
- 600 Mountain Avenue
- Murray Hill, NJ 07974-2070
- U.S.A.
- dmg@research.att.com or research!dmg
- */
-
-/* strtod for IEEE-, VAX-, and IBM-arithmetic machines.
- *
- * This strtod returns a nearest machine number to the input decimal
- * string (or sets errno to ERANGE). With IEEE arithmetic, ties are
- * broken by the IEEE round-even rule. Otherwise ties are broken by
- * biased rounding (add half and chop).
- *
- * Inspired loosely by William D. Clinger's paper "How to Read Floating
- * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101].
- *
- * Modifications:
- *
- * 1. We only require IEEE, IBM, or VAX double-precision
- * arithmetic (not IEEE double-extended).
- * 2. We get by with floating-point arithmetic in a case that
- * Clinger missed -- when we're computing d * 10^n
- * for a small integer d and the integer n is not too
- * much larger than 22 (the maximum integer k for which
- * we can represent 10^k exactly), we may be able to
- * compute (d*10^k) * 10^(e-k) with just one roundoff.
- * 3. Rather than a bit-at-a-time adjustment of the binary
- * result in the hard case, we use floating-point
- * arithmetic to determine the adjustment to within
- * one bit; only in really hard cases do we need to
- * compute a second residual.
- * 4. Because of 3., we don't need a large table of powers of 10
- * for ten-to-e (just some small tables, e.g. of 10^k
- * for 0 <= k <= 22).
- */
-
-/*
- * #define IEEE_8087 for IEEE-arithmetic machines where the least
- * significant byte has the lowest address.
- * #define IEEE_MC68k for IEEE-arithmetic machines where the most
- * significant byte has the lowest address.
- * #define Sudden_Underflow for IEEE-format machines without gradual
- * underflow (i.e., that flush to zero on underflow).
- * #define IBM for IBM mainframe-style floating-point arithmetic.
- * #define VAX for VAX-style floating-point arithmetic.
- * #define Unsigned_Shifts if >> does treats its left operand as unsigned.
- * #define No_leftright to omit left-right logic in fast floating-point
- * computation of dtoa.
- * #define Check_FLT_ROUNDS if FLT_ROUNDS can assume the values 2 or 3.
- * #define RND_PRODQUOT to use rnd_prod and rnd_quot (assembly routines
- * that use extended-precision instructions to compute rounded
- * products and quotients) with IBM.
- * #define ROUND_BIASED for IEEE-format with biased rounding.
- * #define Inaccurate_Divide for IEEE-format with correctly rounded
- * products but inaccurate quotients, e.g., for Intel i860.
- * #define Just_16 to store 16 bits per 32-bit long when doing high-precision
- * integer arithmetic. Whether this speeds things up or slows things
- * down depends on the machine and the number being converted.
- * #define KR_headers for old-style C function headers.
- * #define Bad_float_h if your system lacks a float.h or if it does not
- * define some or all of DBL_DIG, DBL_MAX_10_EXP, DBL_MAX_EXP,
- * FLT_RADIX, FLT_ROUNDS, and DBL_MAX.
- */
-
-#if defined(i386) || defined(mips) && defined(MIPSEL)
-#define IEEE_8087
-#else
-#define IEEE_MC68k
-#endif
-
-#ifdef DEBUG
-#include "stdio.h"
-#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
-#endif
-
-#ifdef __cplusplus
-#include "malloc.h"
-#include "memory.h"
-#else
-#ifndef KR_headers
-#include "stdlib.h"
-#include "string.h"
-#else
-#include "malloc.h"
-#include "memory.h"
-#endif
-#endif
-
-#include "errno.h"
-#include <ctype.h>
-#ifdef Bad_float_h
-#undef __STDC__
-#ifdef IEEE_MC68k
-#define IEEE_ARITHMETIC
-#endif
-#ifdef IEEE_8087
-#define IEEE_ARITHMETIC
-#endif
-#ifdef IEEE_ARITHMETIC
-#define DBL_DIG 15
-#define DBL_MAX_10_EXP 308
-#define DBL_MAX_EXP 1024
-#define FLT_RADIX 2
-#define FLT_ROUNDS 1
-#define DBL_MAX 1.7976931348623157e+308
-#endif
-
-#ifdef IBM
-#define DBL_DIG 16
-#define DBL_MAX_10_EXP 75
-#define DBL_MAX_EXP 63
-#define FLT_RADIX 16
-#define FLT_ROUNDS 0
-#define DBL_MAX 7.2370055773322621e+75
-#endif
-
-#ifdef VAX
-#define DBL_DIG 16
-#define DBL_MAX_10_EXP 38
-#define DBL_MAX_EXP 127
-#define FLT_RADIX 2
-#define FLT_ROUNDS 1
-#define DBL_MAX 1.7014118346046923e+38
-#endif
-
-#ifndef LONG_MAX
-#define LONG_MAX 2147483647
-#endif
-#else
-#include "float.h"
-#endif
-#ifndef __MATH_H__
-#include "math.h"
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef CONST
-#ifdef KR_headers
-#define CONST /* blank */
-#else
-#define CONST const
-#endif
-#endif
-
-#ifdef Unsigned_Shifts
-#define Sign_Extend(a,b) if (b < 0) a |= 0xffff0000;
-#else
-#define Sign_Extend(a,b) /*no-op*/
-#endif
-
-#if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(VAX) + defined(IBM) != 1
-Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined.
-#endif
-
-#ifdef IEEE_8087
-#define word0(x) ((unsigned long *)&x)[1]
-#define word1(x) ((unsigned long *)&x)[0]
-#else
-#define word0(x) ((unsigned long *)&x)[0]
-#define word1(x) ((unsigned long *)&x)[1]
-#endif
-
-/* The following definition of Storeinc is appropriate for MIPS processors.
- * An alternative that might be better on some machines is
- * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
- */
-#if defined(IEEE_8087) + defined(VAX)
-#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
-((unsigned short *)a)[0] = (unsigned short)c, a++)
-#else
-#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b, \
-((unsigned short *)a)[1] = (unsigned short)c, a++)
-#endif
-
-/* #define P DBL_MANT_DIG */
-/* Ten_pmax = floor(P*log(2)/log(5)) */
-/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */
-/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */
-/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */
-
-#if defined(IEEE_8087) + defined(IEEE_MC68k)
-#define Exp_shift 20
-#define Exp_shift1 20
-#define Exp_msk1 0x100000
-#define Exp_msk11 0x100000
-#define Exp_mask 0x7ff00000
-#define P 53
-#define Bias 1023
-#define IEEE_Arith
-#define Emin (-1022)
-#define Exp_1 0x3ff00000
-#define Exp_11 0x3ff00000
-#define Ebits 11
-#define Frac_mask 0xfffff
-#define Frac_mask1 0xfffff
-#define Ten_pmax 22
-#define Bletch 0x10
-#define Bndry_mask 0xfffff
-#define Bndry_mask1 0xfffff
-#define LSB 1
-#define Sign_bit 0x80000000
-#define Log2P 1
-#define Tiny0 0
-#define Tiny1 1
-#define Quick_max 14
-#define Int_max 14
-#define Infinite(x) (word0(x) == 0x7ff00000) /* sufficient test for here */
-#else
-#undef Sudden_Underflow
-#define Sudden_Underflow
-#ifdef IBM
-#define Exp_shift 24
-#define Exp_shift1 24
-#define Exp_msk1 0x1000000
-#define Exp_msk11 0x1000000
-#define Exp_mask 0x7f000000
-#define P 14
-#define Bias 65
-#define Exp_1 0x41000000
-#define Exp_11 0x41000000
-#define Ebits 8 /* exponent has 7 bits, but 8 is the right value in b2d */
-#define Frac_mask 0xffffff
-#define Frac_mask1 0xffffff
-#define Bletch 4
-#define Ten_pmax 22
-#define Bndry_mask 0xefffff
-#define Bndry_mask1 0xffffff
-#define LSB 1
-#define Sign_bit 0x80000000
-#define Log2P 4
-#define Tiny0 0x100000
-#define Tiny1 0
-#define Quick_max 14
-#define Int_max 15
-#else /* VAX */
-#define Exp_shift 23
-#define Exp_shift1 7
-#define Exp_msk1 0x80
-#define Exp_msk11 0x800000
-#define Exp_mask 0x7f80
-#define P 56
-#define Bias 129
-#define Exp_1 0x40800000
-#define Exp_11 0x4080
-#define Ebits 8
-#define Frac_mask 0x7fffff
-#define Frac_mask1 0xffff007f
-#define Ten_pmax 24
-#define Bletch 2
-#define Bndry_mask 0xffff007f
-#define Bndry_mask1 0xffff007f
-#define LSB 0x10000
-#define Sign_bit 0x8000
-#define Log2P 1
-#define Tiny0 0x80
-#define Tiny1 0
-#define Quick_max 15
-#define Int_max 15
-#endif
-#endif
-
-#ifndef IEEE_Arith
-#define ROUND_BIASED
-#endif
-
-#ifdef RND_PRODQUOT
-#define rounded_product(a,b) a = rnd_prod(a, b)
-#define rounded_quotient(a,b) a = rnd_quot(a, b)
-#ifdef KR_headers
-extern double rnd_prod(), rnd_quot();
-#else
-extern double rnd_prod(double, double), rnd_quot(double, double);
-#endif
-#else
-#define rounded_product(a,b) a *= b
-#define rounded_quotient(a,b) a /= b
-#endif
-
-#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1))
-#define Big1 0xffffffff
-
-#ifndef Just_16
-/* When Pack_32 is not defined, we store 16 bits per 32-bit long.
- * This makes some inner loops simpler and sometimes saves work
- * during multiplications, but it often seems to make things slightly
- * slower. Hence the default is now to store 32 bits per long.
- */
-#ifndef Pack_32
-#define Pack_32
-#endif
-#endif
-
-#define Kmax 15
-
-#ifdef __cplusplus
-extern "C" double strtod(const char *s00, char **se);
-extern "C" char *dtoa(double d, int mode, int ndigits,
- int *decpt, int *sign, char **rve);
-#endif
-
- struct
-Bigint {
- struct Bigint *next;
- int k, maxwds, sign, wds;
- unsigned long x[1];
-};
-
- typedef struct Bigint Bigint;
-
- static Bigint *freelist[Kmax+1];
-
- static Bigint *
-Balloc
-#ifdef KR_headers
- (k) int k;
-#else
- (int k)
-#endif
-{
- int x;
- Bigint *rv;
-
- if ( (rv = freelist[k]) ) {
- freelist[k] = rv->next;
- } else {
- x = 1 << k;
- rv = (Bigint *)malloc(sizeof(Bigint) + (x-1)*sizeof(long));
- rv->k = k;
- rv->maxwds = x;
- }
- rv->sign = rv->wds = 0;
- return rv;
-}
-
- static void
-Bfree
-#ifdef KR_headers
- (v) Bigint *v;
-#else
- (Bigint *v)
-#endif
-{
- if (v) {
- v->next = freelist[v->k];
- freelist[v->k] = v;
- }
-}
-
-#define Bcopy(x,y) memcpy((char *)&x->sign, (char *)&y->sign, \
-y->wds*sizeof(long) + 2*sizeof(int))
-
- static Bigint *
-multadd
-#ifdef KR_headers
- (b, m, a) Bigint *b; int m, a;
-#else
- (Bigint *b, int m, int a) /* multiply by m and add a */
-#endif
-{
- int i, wds;
- unsigned long *x, y;
-#ifdef Pack_32
- unsigned long xi, z;
-#endif
- Bigint *b1;
-
- wds = b->wds;
- x = b->x;
- i = 0;
- do {
-#ifdef Pack_32
- xi = *x;
- y = (xi & 0xffff) * m + a;
- z = (xi >> 16) * m + (y >> 16);
- a = (int)(z >> 16);
- *x++ = (z << 16) + (y & 0xffff);
-#else
- y = *x * m + a;
- a = (int)(y >> 16);
- *x++ = y & 0xffff;
-#endif
- } while (++i < wds);
- if (a) {
- if (wds >= b->maxwds) {
- b1 = Balloc(b->k+1);
- Bcopy(b1, b);
- Bfree(b);
- b = b1;
- }
- b->x[wds++] = a;
- b->wds = wds;
- }
- return b;
-}
-
- static Bigint *
-s2b
-#ifdef KR_headers
- (s, nd0, nd, y9) CONST char *s; int nd0, nd; unsigned long y9;
-#else
- (CONST char *s, int nd0, int nd, unsigned long y9)
-#endif
-{
- Bigint *b;
- int i, k;
- long x, y;
-
- x = (nd + 8) / 9;
- for (k = 0, y = 1; x > y; y <<= 1, k++) ;
-#ifdef Pack_32
- b = Balloc(k);
- b->x[0] = y9;
- b->wds = 1;
-#else
- b = Balloc(k+1);
- b->x[0] = y9 & 0xffff;
- b->wds = (b->x[1] = y9 >> 16) ? 2 : 1;
-#endif
-
- i = 9;
- if (9 < nd0) {
- s += 9;
- do
- b = multadd(b, 10, *s++ - '0');
- while (++i < nd0);
- s++;
- } else
- s += 10;
- for (; i < nd; i++)
- b = multadd(b, 10, *s++ - '0');
- return b;
-}
-
- static int
-hi0bits
-#ifdef KR_headers
- (x) register unsigned long x;
-#else
- (register unsigned long x)
-#endif
-{
- register int k = 0;
-
- if (!(x & 0xffff0000)) {
- k = 16;
- x <<= 16;
- }
- if (!(x & 0xff000000)) {
- k += 8;
- x <<= 8;
- }
- if (!(x & 0xf0000000)) {
- k += 4;
- x <<= 4;
- }
- if (!(x & 0xc0000000)) {
- k += 2;
- x <<= 2;
- }
- if (!(x & 0x80000000)) {
- k++;
- if (!(x & 0x40000000))
- return 32;
- }
- return k;
-}
-
- static int
-lo0bits
-#ifdef KR_headers
- (y) unsigned long *y;
-#else
- (unsigned long *y)
-#endif
-{
- register int k;
- register unsigned long x = *y;
-
- if (x & 7) {
- if (x & 1)
- return 0;
- if (x & 2) {
- *y = x >> 1;
- return 1;
- }
- *y = x >> 2;
- return 2;
- }
- k = 0;
- if (!(x & 0xffff)) {
- k = 16;
- x >>= 16;
- }
- if (!(x & 0xff)) {
- k += 8;
- x >>= 8;
- }
- if (!(x & 0xf)) {
- k += 4;
- x >>= 4;
- }
- if (!(x & 0x3)) {
- k += 2;
- x >>= 2;
- }
- if (!(x & 1)) {
- k++;
- x >>= 1;
- if (!x & 1)
- return 32;
- }
- *y = x;
- return k;
-}
-
- static Bigint *
-i2b
-#ifdef KR_headers
- (i) int i;
-#else
- (int i)
-#endif
-{
- Bigint *b;
-
- b = Balloc(1);
- b->x[0] = i;
- b->wds = 1;
- return b;
- }
-
- static Bigint *
-mult
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
- (Bigint *a, Bigint *b)
-#endif
-{
- Bigint *c;
- int k, wa, wb, wc;
- unsigned long carry, y, z;
- unsigned long *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
-#ifdef Pack_32
- unsigned long z2;
-#endif
-
- if (a->wds < b->wds) {
- c = a;
- a = b;
- b = c;
- }
- k = a->k;
- wa = a->wds;
- wb = b->wds;
- wc = wa + wb;
- if (wc > a->maxwds)
- k++;
- c = Balloc(k);
- for (x = c->x, xa = x + wc; x < xa; x++)
- *x = 0;
- xa = a->x;
- xae = xa + wa;
- xb = b->x;
- xbe = xb + wb;
- xc0 = c->x;
-#ifdef Pack_32
- for (; xb < xbe; xb++, xc0++) {
- if ( (y = *xb & 0xffff) ) {
- x = xa;
- xc = xc0;
- carry = 0;
- do {
- z = (*x & 0xffff) * y + (*xc & 0xffff) + carry;
- carry = z >> 16;
- z2 = (*x++ >> 16) * y + (*xc >> 16) + carry;
- carry = z2 >> 16;
- Storeinc(xc, z2, z);
- } while (x < xae);
- *xc = carry;
- }
- if ( (y = *xb >> 16) ) {
- x = xa;
- xc = xc0;
- carry = 0;
- z2 = *xc;
- do {
- z = (*x & 0xffff) * y + (*xc >> 16) + carry;
- carry = z >> 16;
- Storeinc(xc, z, z2);
- z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry;
- carry = z2 >> 16;
- } while (x < xae);
- *xc = z2;
- }
- }
-#else
- for (; xb < xbe; xc0++) {
- if (y = *xb++) {
- x = xa;
- xc = xc0;
- carry = 0;
- do {
- z = *x++ * y + *xc + carry;
- carry = z >> 16;
- *xc++ = z & 0xffff;
- } while (x < xae);
- *xc = carry;
- }
- }
-#endif
- for (xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ;
- c->wds = wc;
- return c;
-}
-
- static Bigint *p5s;
-
- static Bigint *
-pow5mult
-#ifdef KR_headers
- (b, k) Bigint *b; int k;
-#else
- (Bigint *b, int k)
-#endif
-{
- Bigint *b1, *p5, *p51;
- int i;
- static int p05[3] = { 5, 25, 125 };
-
- if ( (i = k & 3) )
- b = multadd(b, p05[i-1], 0);
-
- if (!(k >>= 2))
- return b;
- if (!(p5 = p5s)) {
- /* first time */
- p5 = p5s = i2b(625);
- p5->next = 0;
- }
- for (;;) {
- if (k & 1) {
- b1 = mult(b, p5);
- Bfree(b);
- b = b1;
- }
- if (!(k >>= 1))
- break;
- if (!(p51 = p5->next)) {
- p51 = p5->next = mult(p5,p5);
- p51->next = 0;
- }
- p5 = p51;
- }
- return b;
-}
-
- static Bigint *
-lshift
-#ifdef KR_headers
- (b, k) Bigint *b; int k;
-#else
- (Bigint *b, int k)
-#endif
-{
- int i, k1, n, n1;
- Bigint *b1;
- unsigned long *x, *x1, *xe, z;
-
-#ifdef Pack_32
- n = k >> 5;
-#else
- n = k >> 4;
-#endif
- k1 = b->k;
- n1 = n + b->wds + 1;
- for (i = b->maxwds; n1 > i; i <<= 1)
- k1++;
- b1 = Balloc(k1);
- x1 = b1->x;
- for (i = 0; i < n; i++)
- *x1++ = 0;
- x = b->x;
- xe = x + b->wds;
-#ifdef Pack_32
- if (k &= 0x1f) {
- k1 = 32 - k;
- z = 0;
- do {
- *x1++ = *x << k | z;
- z = *x++ >> k1;
- } while (x < xe);
- if ( (*x1 = z) )
- ++n1;
- }
-#else
- if (k &= 0xf) {
- k1 = 16 - k;
- z = 0;
- do {
- *x1++ = *x << k & 0xffff | z;
- z = *x++ >> k1;
- } while (x < xe);
- if (*x1 = z)
- ++n1;
- }
-#endif
- else
- do
- *x1++ = *x++;
- while (x < xe);
- b1->wds = n1 - 1;
- Bfree(b);
- return b1;
-}
-
- static int
-cmp
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
- (Bigint *a, Bigint *b)
-#endif
-{
- unsigned long *xa, *xa0, *xb, *xb0;
- int i, j;
-
- i = a->wds;
- j = b->wds;
-#ifdef DEBUG
- if (i > 1 && !a->x[i-1])
- Bug("cmp called with a->x[a->wds-1] == 0");
- if (j > 1 && !b->x[j-1])
- Bug("cmp called with b->x[b->wds-1] == 0");
-#endif
- if (i -= j)
- return i;
- xa0 = a->x;
- xa = xa0 + j;
- xb0 = b->x;
- xb = xb0 + j;
- for (;;) {
- if (*--xa != *--xb)
- return *xa < *xb ? -1 : 1;
- if (xa <= xa0)
- break;
- }
- return 0;
-}
-
- static Bigint *
-diff
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
- (Bigint *a, Bigint *b)
-#endif
-{
- Bigint *c;
- int i, wa, wb;
- long borrow, y; /* We need signed shifts here. */
- unsigned long *xa, *xae, *xb, *xbe, *xc;
-#ifdef Pack_32
- long z;
-#endif
-
- i = cmp(a,b);
- if (!i) {
- c = Balloc(0);
- c->wds = 1;
- c->x[0] = 0;
- return c;
- }
- if (i < 0) {
- c = a;
- a = b;
- b = c;
- i = 1;
- } else
- i = 0;
- c = Balloc(a->k);
- c->sign = i;
- wa = a->wds;
- xa = a->x;
- xae = xa + wa;
- wb = b->wds;
- xb = b->x;
- xbe = xb + wb;
- xc = c->x;
- borrow = 0;
-#ifdef Pack_32
- do {
- y = (*xa & 0xffff) - (*xb & 0xffff) + borrow;
- borrow = y >> 16;
- Sign_Extend(borrow, y);
- z = (*xa++ >> 16) - (*xb++ >> 16) + borrow;
- borrow = z >> 16;
- Sign_Extend(borrow, z);
- Storeinc(xc, z, y);
- } while (xb < xbe);
- while (xa < xae) {
- y = (*xa & 0xffff) + borrow;
- borrow = y >> 16;
- Sign_Extend(borrow, y);
- z = (*xa++ >> 16) + borrow;
- borrow = z >> 16;
- Sign_Extend(borrow, z);
- Storeinc(xc, z, y);
- }
-#else
- do {
- y = *xa++ - *xb++ + borrow;
- borrow = y >> 16;
- Sign_Extend(borrow, y);
- *xc++ = y & 0xffff;
- } while (xb < xbe);
- while (xa < xae) {
- y = *xa++ + borrow;
- borrow = y >> 16;
- Sign_Extend(borrow, y);
- *xc++ = y & 0xffff;
- }
-#endif
- while (!*--xc)
- wa--;
- c->wds = wa;
- return c;
-}
-
- static double
-ulp
-#ifdef KR_headers
- (x) double x;
-#else
- (double x)
-#endif
-{
- register long L;
- double a;
-
- L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
-#ifndef Sudden_Underflow
- if (L > 0) {
-#endif
-#ifdef IBM
- L |= Exp_msk1 >> 4;
-#endif
- word0(a) = L;
- word1(a) = 0;
-#ifndef Sudden_Underflow
- } else {
- L = -L >> Exp_shift;
- if (L < Exp_shift) {
- word0(a) = 0x80000 >> L;
- word1(a) = 0;
- } else {
- word0(a) = 0;
- L -= Exp_shift;
- word1(a) = L >= 31 ? 1 : 1 << (31 - L);
- }
- }
-#endif
- return a;
-}
-
- static double
-b2d
-#ifdef KR_headers
- (a, e) Bigint *a; int *e;
-#else
- (Bigint *a, int *e)
-#endif
-{
- unsigned long *xa, *xa0, w, y, z;
- int k;
- double d;
-#ifdef VAX
- unsigned long d0, d1;
-#else
-#define d0 word0(d)
-#define d1 word1(d)
-#endif
-
- xa0 = a->x;
- xa = xa0 + a->wds;
- y = *--xa;
-#ifdef DEBUG
- if (!y) Bug("zero y in b2d");
-#endif
- k = hi0bits(y);
- *e = 32 - k;
-#ifdef Pack_32
- if (k < Ebits) {
- d0 = Exp_1 | (y >> (Ebits - k));
- w = xa > xa0 ? *--xa : 0;
- d1 = (y << ((32-Ebits) + k)) | (w >> (Ebits - k));
- goto ret_d;
- }
- z = xa > xa0 ? *--xa : 0;
- if (k -= Ebits) {
- d0 = Exp_1 | (y << k) | (z >> (32 - k));
- y = xa > xa0 ? *--xa : 0;
- d1 = (z << k) | (y >> (32 - k));
- } else {
- d0 = Exp_1 | y;
- d1 = z;
- }
-#else
- if (k < Ebits + 16) {
- z = xa > xa0 ? *--xa : 0;
- d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
- w = xa > xa0 ? *--xa : 0;
- y = xa > xa0 ? *--xa : 0;
- d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
- goto ret_d;
- }
- z = xa > xa0 ? *--xa : 0;
- w = xa > xa0 ? *--xa : 0;
- k -= Ebits + 16;
- d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
- y = xa > xa0 ? *--xa : 0;
- d1 = w << k + 16 | y << k;
-#endif
- ret_d:
-#ifdef VAX
- word0(d) = d0 >> 16 | d0 << 16;
- word1(d) = d1 >> 16 | d1 << 16;
-#else
-#undef d0
-#undef d1
-#endif
- return d;
-}
-
- static Bigint *
-d2b
-#ifdef KR_headers
- (d, e, bits) double d; int *e, *bits;
-#else
- (double d, int *e, int *bits)
-#endif
-{
- Bigint *b;
- int de, i, k;
- unsigned long *x, y, z;
-#ifdef VAX
- unsigned long d0, d1;
- d0 = word0(d) >> 16 | word0(d) << 16;
- d1 = word1(d) >> 16 | word1(d) << 16;
-#else
-#define d0 word0(d)
-#define d1 word1(d)
-#endif
-
-#ifdef Pack_32
- b = Balloc(1);
-#else
- b = Balloc(2);
-#endif
- x = b->x;
-
- z = d0 & Frac_mask;
- d0 &= 0x7fffffff; /* clear sign bit, which we ignore */
-#ifdef Sudden_Underflow
- de = (int)(d0 >> Exp_shift);
-#ifndef IBM
- z |= Exp_msk11;
-#endif
-#else
- if ( (de = (int)(d0 >> Exp_shift)) )
- z |= Exp_msk1;
-#endif
-#ifdef Pack_32
- if ( (y = d1) ) {
- if ( (k = lo0bits(&y)) ) {
- x[0] = y | (z << (32 - k));
- z >>= k;
- }
- else
- x[0] = y;
- i = b->wds = (x[1] = z) ? 2 : 1;
- } else {
-#ifdef DEBUG
- if (!z)
- Bug("Zero passed to d2b");
-#endif
- k = lo0bits(&z);
- x[0] = z;
- i = b->wds = 1;
- k += 32;
- }
-#else
- if (y = d1) {
- if (k = lo0bits(&y))
- if (k >= 16) {
- x[0] = y | z << 32 - k & 0xffff;
- x[1] = z >> k - 16 & 0xffff;
- x[2] = z >> k;
- i = 2;
- } else {
- x[0] = y & 0xffff;
- x[1] = y >> 16 | z << 16 - k & 0xffff;
- x[2] = z >> k & 0xffff;
- x[3] = z >> k+16;
- i = 3;
- }
- else {
- x[0] = y & 0xffff;
- x[1] = y >> 16;
- x[2] = z & 0xffff;
- x[3] = z >> 16;
- i = 3;
- }
- } else {
-#ifdef DEBUG
- if (!z)
- Bug("Zero passed to d2b");
-#endif
- k = lo0bits(&z);
- if (k >= 16) {
- x[0] = z;
- i = 0;
- } else {
- x[0] = z & 0xffff;
- x[1] = z >> 16;
- i = 1;
- }
- k += 32;
- }
- while (!x[i])
- --i;
- b->wds = i + 1;
-#endif
-#ifndef Sudden_Underflow
- if (de) {
-#endif
-#ifdef IBM
- *e = (de - Bias - (P-1) << 2) + k;
- *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask);
-#else
- *e = de - Bias - (P-1) + k;
- *bits = P - k;
-#endif
-#ifndef Sudden_Underflow
- } else {
- *e = de - Bias - (P-1) + 1 + k;
-#ifdef Pack_32
- *bits = 32*i - hi0bits(x[i-1]);
-#else
- *bits = (i+2)*16 - hi0bits(x[i]);
-#endif
- }
-#endif
- return b;
-}
-#undef d0
-#undef d1
-
- static double
-ratio
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
- (Bigint *a, Bigint *b)
-#endif
-{
- double da, db;
- int k, ka, kb;
-
- da = b2d(a, &ka);
- db = b2d(b, &kb);
-#ifdef Pack_32
- k = ka - kb + 32*(a->wds - b->wds);
-#else
- k = ka - kb + 16*(a->wds - b->wds);
-#endif
-#ifdef IBM
- if (k > 0) {
- word0(da) += (k >> 2)*Exp_msk1;
- if (k &= 3)
- da *= 1 << k;
- } else {
- k = -k;
- word0(db) += (k >> 2)*Exp_msk1;
- if (k &= 3)
- db *= 1 << k;
- }
-#else
- if (k > 0)
- word0(da) += k*Exp_msk1;
- else {
- k = -k;
- word0(db) += k*Exp_msk1;
- }
-#endif
- return da / db;
-}
-
- static double
-tens[] = {
- 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
- 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
- 1e20, 1e21, 1e22
-#ifdef VAX
- , 1e23, 1e24
-#endif
- };
-
- static double
-#ifdef IEEE_Arith
-bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 };
-static double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 1e-256 };
-#define n_bigtens 5
-#else
-#ifdef IBM
-bigtens[] = { 1e16, 1e32, 1e64 };
-static double tinytens[] = { 1e-16, 1e-32, 1e-64 };
-#define n_bigtens 3
-#else
-bigtens[] = { 1e16, 1e32 };
-static double tinytens[] = { 1e-16, 1e-32 };
-#define n_bigtens 2
-#endif
-#endif
-
- double
-strtod
-#ifdef KR_headers
- (s00, se) CONST char *s00; char **se;
-#else
- (CONST char *s00, char **se)
-#endif
-{
- int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
- e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
- CONST char *s, *s0, *s1;
- double aadj, aadj1, adj, rv, rv0;
- long L;
- unsigned long y, z;
- Bigint *bb, *bb1, *bd, *bd0, *bs, *delta;
- sign = nz0 = nz = 0;
- rv = 0.;
- for (s = s00;;s++) switch(*s) {
- case '-':
- sign = 1;
- /* no break */
- case '+':
- if (*++s)
- goto break2;
- /* no break */
- case 0:
- s = s00;
- goto ret;
- default:
- if (isspace((unsigned char)*s))
- continue;
- goto break2;
- }
- break2:
- if (*s == '0') {
- nz0 = 1;
- while (*++s == '0') ;
- if (!*s)
- goto ret;
- }
- s0 = s;
- y = z = 0;
- for (nd = nf = 0; (c = *s) >= '0' && c <= '9'; nd++, s++)
- if (nd < 9)
- y = 10*y + c - '0';
- else if (nd < 16)
- z = 10*z + c - '0';
- nd0 = nd;
- if (c == '.') {
- c = *++s;
- if (!nd) {
- for (; c == '0'; c = *++s)
- nz++;
- if (c > '0' && c <= '9') {
- s0 = s;
- nf += nz;
- nz = 0;
- goto have_dig;
- }
- goto dig_done;
- }
- for (; c >= '0' && c <= '9'; c = *++s) {
- have_dig:
- nz++;
- if (c -= '0') {
- nf += nz;
- for (i = 1; i < nz; i++)
- if (nd++ < 9)
- y *= 10;
- else if (nd <= DBL_DIG + 1)
- z *= 10;
- if (nd++ < 9)
- y = 10*y + c;
- else if (nd <= DBL_DIG + 1)
- z = 10*z + c;
- nz = 0;
- }
- }
- }
- dig_done:
- e = 0;
- if (c == 'e' || c == 'E') {
- if (!nd && !nz && !nz0) {
- s = s00;
- goto ret;
- }
- s00 = s;
- esign = 0;
- switch(c = *++s) {
- case '-':
- esign = 1;
- case '+':
- c = *++s;
- }
- if (c >= '0' && c <= '9') {
- while (c == '0')
- c = *++s;
- if (c > '0' && c <= '9') {
- L = c - '0';
- s1 = s;
- while ((c = *++s) >= '0' && c <= '9')
- L = 10*L + c - '0';
- if (s - s1 > 8 || L > 19999)
- /* Avoid confusion from exponents
- * so large that e might overflow.
- */
- e = 19999; /* safe for 16 bit ints */
- else
- e = (int)L;
- if (esign)
- e = -e;
- } else
- e = 0;
- } else
- s = s00;
- }
- if (!nd) {
- if (!nz && !nz0)
- s = s00;
- goto ret;
- }
- e1 = e -= nf;
-
- /* Now we have nd0 digits, starting at s0, followed by a
- * decimal point, followed by nd-nd0 digits. The number we're
- * after is the integer represented by those digits times
- * 10**e */
-
- if (!nd0)
- nd0 = nd;
- k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1;
- rv = y;
- if (k > 9)
- rv = tens[k - 9] * rv + z;
- if (nd <= DBL_DIG
-#ifndef RND_PRODQUOT
- && FLT_ROUNDS == 1
-#endif
- ) {
- if (!e)
- goto ret;
- if (e > 0) {
- if (e <= Ten_pmax) {
-#ifdef VAX
- goto vax_ovfl_check;
-#else
- /* rv = */ rounded_product(rv, tens[e]);
- goto ret;
-#endif
- }
- i = DBL_DIG - nd;
- if (e <= Ten_pmax + i) {
- /* A fancier test would sometimes let us do
- * this for larger i values.
- */
- e -= i;
- rv *= tens[i];
-#ifdef VAX
- /* VAX exponent range is so narrow we must
- * worry about overflow here...
- */
- vax_ovfl_check:
- word0(rv) -= P*Exp_msk1;
- /* rv = */ rounded_product(rv, tens[e]);
- if ((word0(rv) & Exp_mask)
- > Exp_msk1*(DBL_MAX_EXP+Bias-1-P))
- goto ovfl;
- word0(rv) += P*Exp_msk1;
-#else
- /* rv = */ rounded_product(rv, tens[e]);
-#endif
- goto ret;
- }
- }
-#ifndef Inaccurate_Divide
- else if (e >= -Ten_pmax) {
- /* rv = */ rounded_quotient(rv, tens[-e]);
- goto ret;
- }
-#endif
- }
- e1 += nd - k;
-
- /* Get starting approximation = rv * 10**e1 */
-
- if (e1 > 0) {
- if ( (i = e1 & 15) )
- rv *= tens[i];
- if ( (e1 &= ~15) ) {
- if (e1 > DBL_MAX_10_EXP) {
- ovfl:
- errno = ERANGE;
-#ifdef __STDC__
- rv = HUGE_VAL;
-#else
- /* Can't trust HUGE_VAL */
-#ifdef IEEE_Arith
- word0(rv) = Exp_mask;
- word1(rv) = 0;
-#else
- word0(rv) = Big0;
- word1(rv) = Big1;
-#endif
-#endif
- goto ret;
- }
- if (e1 >>= 4) {
- for (j = 0; e1 > 1; j++, e1 >>= 1)
- if (e1 & 1)
- rv *= bigtens[j];
- /* The last multiplication could overflow. */
- word0(rv) -= P*Exp_msk1;
- rv *= bigtens[j];
- if ((z = word0(rv) & Exp_mask)
- > Exp_msk1*(DBL_MAX_EXP+Bias-P))
- goto ovfl;
- if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) {
- /* set to largest number */
- /* (Can't trust DBL_MAX) */
- word0(rv) = Big0;
- word1(rv) = Big1;
- }
- else
- word0(rv) += P*Exp_msk1;
- }
- }
- } else if (e1 < 0) {
- e1 = -e1;
- if ( (i = e1 & 15) )
- rv /= tens[i];
- if ( (e1 &= ~15) ) {
- e1 >>= 4;
- for (j = 0; e1 > 1; j++, e1 >>= 1)
- if (e1 & 1)
- rv *= tinytens[j];
- /* The last multiplication could underflow. */
- rv0 = rv;
- rv *= tinytens[j];
- if (!rv) {
- rv = 2.*rv0;
- rv *= tinytens[j];
- if (!rv) {
- undfl:
- rv = 0.;
- errno = ERANGE;
- goto ret;
- }
- word0(rv) = Tiny0;
- word1(rv) = Tiny1;
- /* The refinement below will clean
- * this approximation up.
- */
- }
- }
- }
-
- /* Now the hard part -- adjusting rv to the correct value.*/
-
- /* Put digits into bd: true value = bd * 10^e */
-
- bd0 = s2b(s0, nd0, nd, y);
-
- for (;;) {
- bd = Balloc(bd0->k);
- Bcopy(bd, bd0);
- bb = d2b(rv, &bbe, &bbbits); /* rv = bb * 2^bbe */
- bs = i2b(1);
-
- if (e >= 0) {
- bb2 = bb5 = 0;
- bd2 = bd5 = e;
- } else {
- bb2 = bb5 = -e;
- bd2 = bd5 = 0;
- }
- if (bbe >= 0)
- bb2 += bbe;
- else
- bd2 -= bbe;
- bs2 = bb2;
-#ifdef Sudden_Underflow
-#ifdef IBM
- j = 1 + 4*P - 3 - bbbits + ((bbe + bbbits - 1) & 3);
-#else
- j = P + 1 - bbbits;
-#endif
-#else
- i = bbe + bbbits - 1; /* logb(rv) */
- if (i < Emin) /* denormal */
- j = bbe + (P-Emin);
- else
- j = P + 1 - bbbits;
-#endif
- bb2 += j;
- bd2 += j;
- i = bb2 < bd2 ? bb2 : bd2;
- if (i > bs2)
- i = bs2;
- if (i > 0) {
- bb2 -= i;
- bd2 -= i;
- bs2 -= i;
- }
- if (bb5 > 0) {
- bs = pow5mult(bs, bb5);
- bb1 = mult(bs, bb);
- Bfree(bb);
- bb = bb1;
- }
- if (bb2 > 0)
- bb = lshift(bb, bb2);
- if (bd5 > 0)
- bd = pow5mult(bd, bd5);
- if (bd2 > 0)
- bd = lshift(bd, bd2);
- if (bs2 > 0)
- bs = lshift(bs, bs2);
- delta = diff(bb, bd);
- dsign = delta->sign;
- delta->sign = 0;
- i = cmp(delta, bs);
- if (i < 0) {
- /* Error is less than half an ulp -- check for
- * special case of mantissa a power of two.
- */
- if (dsign || word1(rv) || word0(rv) & Bndry_mask)
- break;
- delta = lshift(delta,Log2P);
- if (cmp(delta, bs) > 0)
- goto drop_down;
- break;
- }
- if (i == 0) {
- /* exactly half-way between */
- if (dsign) {
- if ((word0(rv) & Bndry_mask1) == Bndry_mask1
- && word1(rv) == 0xffffffff) {
- /*boundary case -- increment exponent*/
- word0(rv) = (word0(rv) & Exp_mask)
- + Exp_msk1
-#ifdef IBM
- | Exp_msk1 >> 4
-#endif
- ;
- word1(rv) = 0;
- break;
- }
- } else if (!(word0(rv) & Bndry_mask) && !word1(rv)) {
- drop_down:
- /* boundary case -- decrement exponent */
-#ifdef Sudden_Underflow
- L = word0(rv) & Exp_mask;
-#ifdef IBM
- if (L < Exp_msk1)
-#else
- if (L <= Exp_msk1)
-#endif
- goto undfl;
- L -= Exp_msk1;
-#else
- L = (word0(rv) & Exp_mask) - Exp_msk1;
-#endif
- word0(rv) = L | Bndry_mask1;
- word1(rv) = 0xffffffff;
-#ifdef IBM
- goto cont;
-#else
- break;
-#endif
- }
-#ifndef ROUND_BIASED
- if (!(word1(rv) & LSB))
- break;
-#endif
- if (dsign)
- rv += ulp(rv);
-#ifndef ROUND_BIASED
- else {
- rv -= ulp(rv);
-#ifndef Sudden_Underflow
- if (!rv)
- goto undfl;
-#endif
- }
-#endif
- break;
- }
- if ((aadj = ratio(delta, bs)) <= 2.) {
- if (dsign)
- aadj = aadj1 = 1.;
- else if (word1(rv) || word0(rv) & Bndry_mask) {
-#ifndef Sudden_Underflow
- if (word1(rv) == Tiny1 && !word0(rv))
- goto undfl;
-#endif
- aadj = 1.;
- aadj1 = -1.;
- } else {
- /* special case -- power of FLT_RADIX to be */
- /* rounded down... */
-
- if (aadj < 2./FLT_RADIX)
- aadj = 1./FLT_RADIX;
- else
- aadj *= 0.5;
- aadj1 = -aadj;
- }
- } else {
- aadj *= 0.5;
- aadj1 = dsign ? aadj : -aadj;
-#ifdef Check_FLT_ROUNDS
- switch(FLT_ROUNDS) {
- case 2: /* towards +infinity */
- aadj1 -= 0.5;
- break;
- case 0: /* towards 0 */
- case 3: /* towards -infinity */
- aadj1 += 0.5;
- }
-#else
- if (FLT_ROUNDS == 0)
- aadj1 += 0.5;
-#endif
- }
- y = word0(rv) & Exp_mask;
-
- /* Check for overflow */
-
- if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) {
- rv0 = rv;
- word0(rv) -= P*Exp_msk1;
- adj = aadj1 * ulp(rv);
- rv += adj;
- if ((word0(rv) & Exp_mask) >=
- Exp_msk1*(DBL_MAX_EXP+Bias-P)) {
- if (word0(rv0) == Big0 && word1(rv0) == Big1)
- goto ovfl;
- word0(rv) = Big0;
- word1(rv) = Big1;
- goto cont;
- } else
- word0(rv) += P*Exp_msk1;
- } else {
-#ifdef Sudden_Underflow
- if ((word0(rv) & Exp_mask) <= P*Exp_msk1) {
- rv0 = rv;
- word0(rv) += P*Exp_msk1;
- adj = aadj1 * ulp(rv);
- rv += adj;
-#ifdef IBM
- if ((word0(rv) & Exp_mask) < P*Exp_msk1)
-#else
- if ((word0(rv) & Exp_mask) <= P*Exp_msk1)
-#endif
- {
- if (word0(rv0) == Tiny0
- && word1(rv0) == Tiny1)
- goto undfl;
- word0(rv) = Tiny0;
- word1(rv) = Tiny1;
- goto cont;
- } else
- word0(rv) -= P*Exp_msk1;
- } else {
- adj = aadj1 * ulp(rv);
- rv += adj;
- }
-#else
- /* Compute adj so that the IEEE rounding rules will
- * correctly round rv + adj in some half-way cases.
- * If rv * ulp(rv) is denormalized (i.e.,
- * y <= (P-1)*Exp_msk1), we must adjust aadj to avoid
- * trouble from bits lost to denormalization;
- * example: 1.2e-307 .
- */
- if (y <= (P-1)*Exp_msk1 && aadj >= 1.) {
- aadj1 = (double)(int)(aadj + 0.5);
- if (!dsign)
- aadj1 = -aadj1;
- }
- adj = aadj1 * ulp(rv);
- rv += adj;
-#endif
- }
- z = word0(rv) & Exp_mask;
- if (y == z) {
- /* Can we stop now? */
- L = aadj;
- aadj -= L;
- /* The tolerances below are conservative. */
- if (dsign || word1(rv) || word0(rv) & Bndry_mask) {
- if (aadj < .4999999 || aadj > .5000001)
- break;
- } else if (aadj < .4999999/FLT_RADIX)
- break;
- }
- cont:
- Bfree(bb);
- Bfree(bd);
- Bfree(bs);
- Bfree(delta);
- }
- Bfree(bb);
- Bfree(bd);
- Bfree(bs);
- Bfree(bd0);
- Bfree(delta);
- ret:
- if (se)
- *se = (char *)s;
- return sign ? -rv : rv;
-}
-
- static int
-quorem
-#ifdef KR_headers
- (b, S) Bigint *b, *S;
-#else
- (Bigint *b, Bigint *S)
-#endif
-{
- int n;
- long borrow, y;
- unsigned long carry, q, ys;
- unsigned long *bx, *bxe, *sx, *sxe;
-#ifdef Pack_32
- long z;
- unsigned long si, zs;
-#endif
-
- n = S->wds;
-#ifdef DEBUG
- /*debug*/ if (b->wds > n)
- /*debug*/ Bug("oversize b in quorem");
-#endif
- if (b->wds < n)
- return 0;
- sx = S->x;
- sxe = sx + --n;
- bx = b->x;
- bxe = bx + n;
- q = *bxe / (*sxe + 1); /* ensure q <= true quotient */
-#ifdef DEBUG
- /*debug*/ if (q > 9)
- /*debug*/ Bug("oversized quotient in quorem");
-#endif
- if (q) {
- borrow = 0;
- carry = 0;
- do {
-#ifdef Pack_32
- si = *sx++;
- ys = (si & 0xffff) * q + carry;
- zs = (si >> 16) * q + (ys >> 16);
- carry = zs >> 16;
- y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
- borrow = y >> 16;
- Sign_Extend(borrow, y);
- z = (*bx >> 16) - (zs & 0xffff) + borrow;
- borrow = z >> 16;
- Sign_Extend(borrow, z);
- Storeinc(bx, z, y);
-#else
- ys = *sx++ * q + carry;
- carry = ys >> 16;
- y = *bx - (ys & 0xffff) + borrow;
- borrow = y >> 16;
- Sign_Extend(borrow, y);
- *bx++ = y & 0xffff;
-#endif
- } while (sx <= sxe);
- if (!*bxe) {
- bx = b->x;
- while (--bxe > bx && !*bxe)
- --n;
- b->wds = n;
- }
- }
- if (cmp(b, S) >= 0) {
- q++;
- borrow = 0;
- carry = 0;
- bx = b->x;
- sx = S->x;
- do {
-#ifdef Pack_32
- si = *sx++;
- ys = (si & 0xffff) + carry;
- zs = (si >> 16) + (ys >> 16);
- carry = zs >> 16;
- y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
- borrow = y >> 16;
- Sign_Extend(borrow, y);
- z = (*bx >> 16) - (zs & 0xffff) + borrow;
- borrow = z >> 16;
- Sign_Extend(borrow, z);
- Storeinc(bx, z, y);
-#else
- ys = *sx++ + carry;
- carry = ys >> 16;
- y = *bx - (ys & 0xffff) + borrow;
- borrow = y >> 16;
- Sign_Extend(borrow, y);
- *bx++ = y & 0xffff;
-#endif
- } while (sx <= sxe);
- bx = b->x;
- bxe = bx + n;
- if (!*bxe) {
- while (--bxe > bx && !*bxe)
- --n;
- b->wds = n;
- }
- }
- return q;
-}
-
-/* dtoa for IEEE arithmetic (dmg): convert double to ASCII string.
- *
- * Inspired by "How to Print Floating-Point Numbers Accurately" by
- * Guy L. Steele, Jr. and Jon L. White [Proc. ACM SIGPLAN '90, pp. 92-101].
- *
- * Modifications:
- * 1. Rather than iterating, we use a simple numeric overestimate
- * to determine k = floor(log10(d)). We scale relevant
- * quantities using O(log2(k)) rather than O(k) multiplications.
- * 2. For some modes > 2 (corresponding to ecvt and fcvt), we don't
- * try to generate digits strictly left to right. Instead, we
- * compute with fewer bits and propagate the carry if necessary
- * when rounding the final digit up. This is often faster.
- * 3. Under the assumption that input will be rounded nearest,
- * mode 0 renders 1e23 as 1e23 rather than 9.999999999999999e22.
- * That is, we allow equality in stopping tests when the
- * round-nearest rule will give the same floating-point value
- * as would satisfaction of the stopping test with strict
- * inequality.
- * 4. We remove common factors of powers of 2 from relevant
- * quantities.
- * 5. When converting floating-point integers less than 1e16,
- * we use floating-point arithmetic rather than resorting
- * to multiple-precision integers.
- * 6. When asked to produce fewer than 15 digits, we first try
- * to get by with floating-point arithmetic; we resort to
- * multiple-precision integer arithmetic only if we cannot
- * guarantee that the floating-point calculation has given
- * the correctly rounded result. For k requested digits and
- * "uniformly" distributed input, the probability is
- * something like 10^(k-15) that we must resort to the long
- * calculation.
- */
-
-char *
-__dtoa
-#ifdef KR_headers
- (d, mode, ndigits, decpt, sign, rve)
- double d; int mode, ndigits, *decpt, *sign; char **rve;
-#else
- (double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
-#endif
-{
- /* Arguments ndigits, decpt, sign are similar to those
- of ecvt and fcvt; trailing zeros are suppressed from
- the returned string. If not null, *rve is set to point
- to the end of the return value. If d is +-Infinity or NaN,
- then *decpt is set to 9999.
-
- mode:
- 0 ==> shortest string that yields d when read in
- and rounded to nearest.
- 1 ==> like 0, but with Steele & White stopping rule;
- e.g. with IEEE P754 arithmetic , mode 0 gives
- 1e23 whereas mode 1 gives 9.999999999999999e22.
- 2 ==> max(1,ndigits) significant digits. This gives a
- return value similar to that of ecvt, except
- that trailing zeros are suppressed.
- 3 ==> through ndigits past the decimal point. This
- gives a return value similar to that from fcvt,
- except that trailing zeros are suppressed, and
- ndigits can be negative.
- 4-9 should give the same return values as 2-3, i.e.,
- 4 <= mode <= 9 ==> same return as mode
- 2 + (mode & 1). These modes are mainly for
- debugging; often they run slower but sometimes
- faster than modes 2-3.
- 4,5,8,9 ==> left-to-right digit generation.
- 6-9 ==> don't try fast floating-point estimate
- (if applicable).
-
- Values of mode other than 0-9 are treated as mode 0.
-
- Sufficient space is allocated to the return value
- to hold the suppressed trailing zeros.
- */
-
- int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
- j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
- spec_case, try_quick;
- long L;
-#ifndef Sudden_Underflow
- int denorm;
- unsigned long x;
-#endif
- Bigint *b, *b1, *delta, *mlo, *mhi, *S;
- double d2, ds, eps;
- char *s, *s0;
- static Bigint *result;
- static int result_k;
-
- if (result) {
- result->k = result_k;
- result->maxwds = 1 << result_k;
- Bfree(result);
- result = 0;
- }
-
- if (word0(d) & Sign_bit) {
- /* set sign for everything, including 0's and NaNs */
- *sign = 1;
- word0(d) &= ~Sign_bit; /* clear sign bit */
- }
- else
- *sign = 0;
-
-#if defined(IEEE_Arith) + defined(VAX)
-#ifdef IEEE_Arith
- if ((word0(d) & Exp_mask) == Exp_mask)
-#else
- if (word0(d) == 0x8000)
-#endif
- {
- /* Infinity or NaN */
- *decpt = 9999;
- s =
-#ifdef IEEE_Arith
- !word1(d) && !(word0(d) & 0xfffff) ? "Infinity" :
-#endif
- "NaN";
- if (rve)
- *rve =
-#ifdef IEEE_Arith
- s[3] ? s + 8 :
-#endif
- s + 3;
- return s;
- }
-#endif
-#ifdef IBM
- d += 0; /* normalize */
-#endif
- if (!d) {
- *decpt = 1;
- s = "0";
- if (rve)
- *rve = s + 1;
- return s;
- }
-
- b = d2b(d, &be, &bbits);
-#ifdef Sudden_Underflow
- i = (int)(word0(d) >> Exp_shift1 & (Exp_mask>>Exp_shift1));
-#else
- if ( (i = (int)((word0(d) >> Exp_shift1) & (Exp_mask>>Exp_shift1))) ) {
-#endif
- d2 = d;
- word0(d2) &= Frac_mask1;
- word0(d2) |= Exp_11;
-#ifdef IBM
- if ( (j = 11 - hi0bits(word0(d2) & Frac_mask)) )
- d2 /= 1 << j;
-#endif
-
- /* log(x) ~=~ log(1.5) + (x-1.5)/1.5
- * log10(x) = log(x) / log(10)
- * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
- * log10(d) = (i-Bias)*log(2)/log(10) + log10(d2)
- *
- * This suggests computing an approximation k to log10(d) by
- *
- * k = (i - Bias)*0.301029995663981
- * + ( (d2-1.5)*0.289529654602168 + 0.176091259055681 );
- *
- * We want k to be too large rather than too small.
- * The error in the first-order Taylor series approximation
- * is in our favor, so we just round up the constant enough
- * to compensate for any error in the multiplication of
- * (i - Bias) by 0.301029995663981; since |i - Bias| <= 1077,
- * and 1077 * 0.30103 * 2^-52 ~=~ 7.2e-14,
- * adding 1e-13 to the constant term more than suffices.
- * Hence we adjust the constant term to 0.1760912590558.
- * (We could get a more accurate k by invoking log10,
- * but this is probably not worthwhile.)
- */
-
- i -= Bias;
-#ifdef IBM
- i <<= 2;
- i += j;
-#endif
-#ifndef Sudden_Underflow
- denorm = 0;
- } else {
- /* d is denormalized */
-
- i = bbits + be + (Bias + (P-1) - 1);
- x = i > 32 ? ((word0(d) << (64 - i)) | (word1(d) >> (i - 32)))
- : (word1(d) << (32 - i));
- d2 = x;
- word0(d2) -= 31*Exp_msk1; /* adjust exponent */
- i -= (Bias + (P-1) - 1) + 1;
- denorm = 1;
- }
-#endif
- ds = (d2-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981;
- k = (int)ds;
- if (ds < 0. && ds != k)
- k--; /* want k = floor(ds) */
- k_check = 1;
- if (k >= 0 && k <= Ten_pmax) {
- if (d < tens[k])
- k--;
- k_check = 0;
- }
- j = bbits - i - 1;
- if (j >= 0) {
- b2 = 0;
- s2 = j;
- } else {
- b2 = -j;
- s2 = 0;
- }
- if (k >= 0) {
- b5 = 0;
- s5 = k;
- s2 += k;
- } else {
- b2 -= k;
- b5 = -k;
- s5 = 0;
- }
- if (mode < 0 || mode > 9)
- mode = 0;
- try_quick = 1;
- if (mode > 5) {
- mode -= 4;
- try_quick = 0;
- }
- leftright = 1;
- switch(mode) {
- case 0:
- case 1:
- ilim = ilim1 = -1;
- i = 18;
- ndigits = 0;
- break;
- case 2:
- leftright = 0;
- /* no break */
- case 4:
- if (ndigits <= 0)
- ndigits = 1;
- ilim = ilim1 = i = ndigits;
- break;
- case 3:
- leftright = 0;
- /* no break */
- case 5:
- i = ndigits + k + 1;
- ilim = i;
- ilim1 = i - 1;
- if (i <= 0)
- i = 1;
- }
- j = sizeof(unsigned long);
- for (result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j < i;
- j <<= 1) result_k++;
- result = Balloc(result_k);
- s = s0 = (char *)result;
-
- if (ilim >= 0 && ilim <= Quick_max && try_quick) {
-
- /* Try to get by with floating-point arithmetic. */
-
- i = 0;
- d2 = d;
- k0 = k;
- ilim0 = ilim;
- ieps = 2; /* conservative */
- if (k > 0) {
- ds = tens[k&0xf];
- j = k >> 4;
- if (j & Bletch) {
- /* prevent overflows */
- j &= Bletch - 1;
- d /= bigtens[n_bigtens-1];
- ieps++;
- }
- for (; j; j >>= 1, i++)
- if (j & 1) {
- ieps++;
- ds *= bigtens[i];
- }
- d /= ds;
- } else if ( (j1 = -k) ) {
- d *= tens[j1 & 0xf];
- for (j = j1 >> 4; j; j >>= 1, i++)
- if (j & 1) {
- ieps++;
- d *= bigtens[i];
- }
- }
- if (k_check && d < 1. && ilim > 0) {
- if (ilim1 <= 0)
- goto fast_failed;
- ilim = ilim1;
- k--;
- d *= 10.;
- ieps++;
- }
- eps = ieps*d + 7.;
- word0(eps) -= (P-1)*Exp_msk1;
- if (ilim == 0) {
- S = mhi = 0;
- d -= 5.;
- if (d > eps)
- goto one_digit;
- if (d < -eps)
- goto no_digits;
- goto fast_failed;
- }
-#ifndef No_leftright
- if (leftright) {
- /* Use Steele & White method of only
- * generating digits needed.
- */
- eps = 0.5/tens[ilim-1] - eps;
- for (i = 0;;) {
- L = d;
- d -= L;
- *s++ = '0' + (int)L;
- if (d < eps)
- goto ret1;
- if (1. - d < eps)
- goto bump_up;
- if (++i >= ilim)
- break;
- eps *= 10.;
- d *= 10.;
- }
- } else {
-#endif
- /* Generate ilim digits, then fix them up. */
- eps *= tens[ilim-1];
- for (i = 1;; i++, d *= 10.) {
- L = d;
- d -= L;
- *s++ = '0' + (int)L;
- if (i == ilim) {
- if (d > 0.5 + eps)
- goto bump_up;
- else if (d < 0.5 - eps) {
- while (*--s == '0');
- s++;
- goto ret1;
- }
- break;
- }
- }
-#ifndef No_leftright
- }
-#endif
- fast_failed:
- s = s0;
- d = d2;
- k = k0;
- ilim = ilim0;
- }
-
- /* Do we have a "small" integer? */
-
- if (be >= 0 && k <= Int_max) {
- /* Yes. */
- ds = tens[k];
- if (ndigits < 0 && ilim <= 0) {
- S = mhi = 0;
- if (ilim < 0 || d <= 5*ds)
- goto no_digits;
- goto one_digit;
- }
- for (i = 1;; i++) {
- L = d / ds;
- d -= L*ds;
-#ifdef Check_FLT_ROUNDS
- /* If FLT_ROUNDS == 2, L will usually be high by 1 */
- if (d < 0) {
- L--;
- d += ds;
- }
-#endif
- *s++ = '0' + (int)L;
- if (i == ilim) {
- d += d;
- if (d > ds || (d == ds && L & 1)) {
- bump_up:
- while (*--s == '9')
- if (s == s0) {
- k++;
- *s = '0';
- break;
- }
- ++*s++;
- }
- break;
- }
- if (!(d *= 10.))
- break;
- }
- goto ret1;
- }
-
- m2 = b2;
- m5 = b5;
- mhi = mlo = 0;
- if (leftright) {
- if (mode < 2) {
- i =
-#ifndef Sudden_Underflow
- denorm ? be + (Bias + (P-1) - 1 + 1) :
-#endif
-#ifdef IBM
- 1 + 4*P - 3 - bbits + ((bbits + be - 1) & 3);
-#else
- 1 + P - bbits;
-#endif
- } else {
- j = ilim - 1;
- if (m5 >= j)
- m5 -= j;
- else {
- s5 += j -= m5;
- b5 += j;
- m5 = 0;
- }
- if ((i = ilim) < 0) {
- m2 -= i;
- i = 0;
- }
- }
- b2 += i;
- s2 += i;
- mhi = i2b(1);
- }
- if (m2 > 0 && s2 > 0) {
- i = m2 < s2 ? m2 : s2;
- b2 -= i;
- m2 -= i;
- s2 -= i;
- }
- if (b5 > 0) {
- if (leftright) {
- if (m5 > 0) {
- mhi = pow5mult(mhi, m5);
- b1 = mult(mhi, b);
- Bfree(b);
- b = b1;
- }
- if ( (j = b5 - m5) )
- b = pow5mult(b, j);
- } else
- b = pow5mult(b, b5);
- }
- S = i2b(1);
- if (s5 > 0)
- S = pow5mult(S, s5);
-
- /* Check for special case that d is a normalized power of 2. */
-
- if (mode < 2) {
- if (!word1(d) && !(word0(d) & Bndry_mask)
-#ifndef Sudden_Underflow
- && word0(d) & Exp_mask
-#endif
- ) {
- /* The special case */
- b2 += Log2P;
- s2 += Log2P;
- spec_case = 1;
- } else
- spec_case = 0;
- }
-
- /* Arrange for convenient computation of quotients:
- * shift left if necessary so divisor has 4 leading 0 bits.
- *
- * Perhaps we should just compute leading 28 bits of S once
- * and for all and pass them and a shift to quorem, so it
- * can do shifts and ors to compute the numerator for q.
- */
-#ifdef Pack_32
- if ( (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0x1f) )
- i = 32 - i;
-#else
- if ( (i = ((s5 ? 32 - hi0bits(S->x[S->wds-1]) : 1) + s2) & 0xf) )
- i = 16 - i;
-#endif
- if (i > 4) {
- i -= 4;
- b2 += i;
- m2 += i;
- s2 += i;
- } else if (i < 4) {
- i += 28;
- b2 += i;
- m2 += i;
- s2 += i;
- }
- if (b2 > 0)
- b = lshift(b, b2);
- if (s2 > 0)
- S = lshift(S, s2);
- if (k_check) {
- if (cmp(b,S) < 0) {
- k--;
- b = multadd(b, 10, 0); /* we botched the k estimate */
- if (leftright)
- mhi = multadd(mhi, 10, 0);
- ilim = ilim1;
- }
- }
- if (ilim <= 0 && mode > 2) {
- if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) {
- /* no digits, fcvt style */
- no_digits:
- k = -1 - ndigits;
- goto ret;
- }
- one_digit:
- *s++ = '1';
- k++;
- goto ret;
- }
- if (leftright) {
- if (m2 > 0)
- mhi = lshift(mhi, m2);
-
- /* Compute mlo -- check for special case
- * that d is a normalized power of 2.
- */
-
- mlo = mhi;
- if (spec_case) {
- mhi = Balloc(mhi->k);
- Bcopy(mhi, mlo);
- mhi = lshift(mhi, Log2P);
- }
-
- for (i = 1;;i++) {
- dig = quorem(b,S) + '0';
- /* Do we yet have the shortest decimal string
- * that will round to d?
- */
- j = cmp(b, mlo);
- delta = diff(S, mhi);
- j1 = delta->sign ? 1 : cmp(b, delta);
- Bfree(delta);
-#ifndef ROUND_BIASED
- if (j1 == 0 && !mode && !(word1(d) & 1)) {
- if (dig == '9')
- goto round_9_up;
- if (j > 0)
- dig++;
- *s++ = dig;
- goto ret;
- }
-#endif
- if (j < 0 || (j == 0 && !mode
-#ifndef ROUND_BIASED
- && !(word1(d) & 1)
-#endif
- )) {
- if (j1 > 0) {
- b = lshift(b, 1);
- j1 = cmp(b, S);
- if ((j1 > 0 || (j1 == 0 && dig & 1))
- && dig++ == '9')
- goto round_9_up;
- }
- *s++ = dig;
- goto ret;
- }
- if (j1 > 0) {
- if (dig == '9') { /* possible if i == 1 */
- round_9_up:
- *s++ = '9';
- goto roundoff;
- }
- *s++ = dig + 1;
- goto ret;
- }
- *s++ = dig;
- if (i == ilim)
- break;
- b = multadd(b, 10, 0);
- if (mlo == mhi)
- mlo = mhi = multadd(mhi, 10, 0);
- else {
- mlo = multadd(mlo, 10, 0);
- mhi = multadd(mhi, 10, 0);
- }
- }
- } else
- for (i = 1;; i++) {
- *s++ = dig = quorem(b,S) + '0';
- if (i >= ilim)
- break;
- b = multadd(b, 10, 0);
- }
-
- /* Round off last digit */
-
- b = lshift(b, 1);
- j = cmp(b, S);
- if (j > 0 || (j == 0 && dig & 1)) {
- roundoff:
- while (*--s == '9')
- if (s == s0) {
- k++;
- *s++ = '1';
- goto ret;
- }
- ++*s++;
- } else {
- while (*--s == '0');
- s++;
- }
- ret:
- Bfree(S);
- if (mhi) {
- if (mlo && mlo != mhi)
- Bfree(mlo);
- Bfree(mhi);
- }
- ret1:
- Bfree(b);
- if (s == s0) { /* don't return empty string */
- *s++ = '0';
- k = 0;
- }
- *s = 0;
- *decpt = k + 1;
- if (rve)
- *rve = s;
- return s0;
- }
-#ifdef __cplusplus
-}
-#endif
diff --git a/lib/libc/stdlib/strtol.3 b/lib/libc/stdlib/strtol.3
deleted file mode 100644
index 3d43fb3..0000000
--- a/lib/libc/stdlib/strtol.3
+++ /dev/null
@@ -1,168 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strtol.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRTOL 3
-.Os
-.Sh NAME
-.Nm strtol, strtoq
-.Nd convert string value to a long or quad_t integer
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Fd #include <limits.h>
-.Ft long
-.Fn strtol "const char *nptr" "char **endptr" "int base"
-
-.Fd #include <sys/types.h>
-.Fd #include <stdlib.h>
-.Fd #include <limits.h>
-.Ft quad_t
-.Fn strtoq "const char *nptr" "char **endptr" "int base"
-.Sh DESCRIPTION
-The
-.Fn strtol
-function
-converts the string in
-.Fa nptr
-to a
-.Em long
-value.
-The
-.Fn strtoq
-function
-converts the string in
-.Fa nptr
-to a
-.Em quad_t
-value.
-The conversion is done according to the given
-.Fa base ,
-which must be between 2 and 36 inclusive,
-or be the special value 0.
-.Pp
-The string may begin with an arbitrary amount of white space
-(as determined by
-.Xr isspace 3 )
-followed by a single optional
-.Ql +
-or
-.Ql -
-sign.
-If
-.Fa base
-is zero or 16,
-the string may then include a
-.Ql 0x
-prefix,
-and the number will be read in base 16; otherwise, a zero
-.Fa base
-is taken as 10 (decimal) unless the next character is
-.Ql 0 ,
-in which case it is taken as 8 (octal).
-.Pp
-The remainder of the string is converted to a
-.Em long
-value in the obvious manner,
-stopping at the first character which is not a valid digit
-in the given base.
-(In bases above 10, the letter
-.Ql A
-in either upper or lower case
-represents 10,
-.Ql B
-represents 11, and so forth, with
-.Ql Z
-representing 35.)
-.Pp
-If
-.Fa endptr
-is non nil,
-.Fn strtol
-stores the address of the first invalid character in
-.Fa *endptr .
-If there were no digits at all, however,
-.Fn strtol
-stores the original value of
-.Fa nptr
-in
-.Fa *endptr .
-(Thus, if
-.Fa *nptr
-is not
-.Ql \e0
-but
-.Fa **endptr
-is
-.Ql \e0
-on return, the entire string was valid.)
-.Sh RETURN VALUES
-The
-.Fn strtol
-function
-returns the result of the conversion,
-unless the value would underflow or overflow.
-If an underflow occurs,
-.Fn strtol
-returns
-.Dv LONG_MIN .
-If an overflow occurs,
-.Fn strtol
-returns
-.Dv LONG_MAX .
-In both cases,
-.Va errno
-is set to
-.Er ERANGE .
-.Sh ERRORS
-.Bl -tag -width [ERANGE]
-.It Bq Er ERANGE
-The given string was out of range; the value converted has been clamped.
-.El
-.Sh SEE ALSO
-.Xr atof 3 ,
-.Xr atoi 3 ,
-.Xr atol 3 ,
-.Xr strtod 3 ,
-.Xr strtoul 3
-.Sh STANDARDS
-The
-.Fn strtol
-function
-conforms to
-.St -ansiC .
-.Sh BUGS
-Ignores the current locale.
diff --git a/lib/libc/stdlib/strtol.c b/lib/libc/stdlib/strtol.c
deleted file mode 100644
index 18e3972..0000000
--- a/lib/libc/stdlib/strtol.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtol.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <limits.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdlib.h>
-
-
-/*
- * Convert a string to a long integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-long
-strtol(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
-{
- register const char *s = nptr;
- register unsigned long acc;
- register unsigned char c;
- register unsigned long cutoff;
- register int neg = 0, any, cutlim;
-
- /*
- * Skip white space and pick up leading +/- sign if any.
- * If base is 0, allow 0x for hex and 0 for octal, else
- * assume decimal; if base is already 16, allow 0x.
- */
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else if (c == '+')
- c = *s++;
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
-
- /*
- * Compute the cutoff value between legal numbers and illegal
- * numbers. That is the largest legal value, divided by the
- * base. An input number that is greater than this value, if
- * followed by a legal input character, is too big. One that
- * is equal to this value may be valid or not; the limit
- * between valid and invalid numbers is then based on the last
- * digit. For instance, if the range for longs is
- * [-2147483648..2147483647] and the input base is 10,
- * cutoff will be set to 214748364 and cutlim to either
- * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated
- * a value > 214748364, or equal but the next digit is > 7 (or 8),
- * the number is too big, and we will return a range error.
- *
- * Set any if any `digits' consumed; make it negative to indicate
- * overflow.
- */
- cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX;
- cutlim = cutoff % (unsigned long)base;
- cutoff /= (unsigned long)base;
- for (acc = 0, any = 0;; c = *s++) {
- if (!isascii(c))
- break;
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
- any = -1;
- else {
- any = 1;
- acc *= base;
- acc += c;
- }
- }
- if (any < 0) {
- acc = neg ? LONG_MIN : LONG_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- *endptr = (char *)(any ? s - 1 : nptr);
- return (acc);
-}
diff --git a/lib/libc/stdlib/strtoll.c b/lib/libc/stdlib/strtoll.c
deleted file mode 100644
index f84e030..0000000
--- a/lib/libc/stdlib/strtoll.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtoq.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <limits.h>
-#include <errno.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-/*
- * Convert a string to a quad integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-quad_t
-strtoq(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
-{
- register const char *s;
- register u_quad_t acc;
- register unsigned char c;
- register u_quad_t qbase, cutoff;
- register int neg, any, cutlim;
-
- /*
- * Skip white space and pick up leading +/- sign if any.
- * If base is 0, allow 0x for hex and 0 for octal, else
- * assume decimal; if base is already 16, allow 0x.
- */
- s = nptr;
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else {
- neg = 0;
- if (c == '+')
- c = *s++;
- }
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
-
- /*
- * Compute the cutoff value between legal numbers and illegal
- * numbers. That is the largest legal value, divided by the
- * base. An input number that is greater than this value, if
- * followed by a legal input character, is too big. One that
- * is equal to this value may be valid or not; the limit
- * between valid and invalid numbers is then based on the last
- * digit. For instance, if the range for quads is
- * [-9223372036854775808..9223372036854775807] and the input base
- * is 10, cutoff will be set to 922337203685477580 and cutlim to
- * either 7 (neg==0) or 8 (neg==1), meaning that if we have
- * accumulated a value > 922337203685477580, or equal but the
- * next digit is > 7 (or 8), the number is too big, and we will
- * return a range error.
- *
- * Set any if any `digits' consumed; make it negative to indicate
- * overflow.
- */
- qbase = (unsigned)base;
- cutoff = neg ? (u_quad_t)-(QUAD_MIN + QUAD_MAX) + QUAD_MAX : QUAD_MAX;
- cutlim = cutoff % qbase;
- cutoff /= qbase;
- for (acc = 0, any = 0;; c = *s++) {
- if (!isascii(c))
- break;
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
- any = -1;
- else {
- any = 1;
- acc *= qbase;
- acc += c;
- }
- }
- if (any < 0) {
- acc = neg ? QUAD_MIN : QUAD_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- *endptr = (char *)(any ? s - 1 : nptr);
- return (acc);
-}
diff --git a/lib/libc/stdlib/strtoq.c b/lib/libc/stdlib/strtoq.c
deleted file mode 100644
index f84e030..0000000
--- a/lib/libc/stdlib/strtoq.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtoq.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <limits.h>
-#include <errno.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-/*
- * Convert a string to a quad integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-quad_t
-strtoq(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
-{
- register const char *s;
- register u_quad_t acc;
- register unsigned char c;
- register u_quad_t qbase, cutoff;
- register int neg, any, cutlim;
-
- /*
- * Skip white space and pick up leading +/- sign if any.
- * If base is 0, allow 0x for hex and 0 for octal, else
- * assume decimal; if base is already 16, allow 0x.
- */
- s = nptr;
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else {
- neg = 0;
- if (c == '+')
- c = *s++;
- }
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
-
- /*
- * Compute the cutoff value between legal numbers and illegal
- * numbers. That is the largest legal value, divided by the
- * base. An input number that is greater than this value, if
- * followed by a legal input character, is too big. One that
- * is equal to this value may be valid or not; the limit
- * between valid and invalid numbers is then based on the last
- * digit. For instance, if the range for quads is
- * [-9223372036854775808..9223372036854775807] and the input base
- * is 10, cutoff will be set to 922337203685477580 and cutlim to
- * either 7 (neg==0) or 8 (neg==1), meaning that if we have
- * accumulated a value > 922337203685477580, or equal but the
- * next digit is > 7 (or 8), the number is too big, and we will
- * return a range error.
- *
- * Set any if any `digits' consumed; make it negative to indicate
- * overflow.
- */
- qbase = (unsigned)base;
- cutoff = neg ? (u_quad_t)-(QUAD_MIN + QUAD_MAX) + QUAD_MAX : QUAD_MAX;
- cutlim = cutoff % qbase;
- cutoff /= qbase;
- for (acc = 0, any = 0;; c = *s++) {
- if (!isascii(c))
- break;
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
- any = -1;
- else {
- any = 1;
- acc *= qbase;
- acc += c;
- }
- }
- if (any < 0) {
- acc = neg ? QUAD_MIN : QUAD_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- *endptr = (char *)(any ? s - 1 : nptr);
- return (acc);
-}
diff --git a/lib/libc/stdlib/strtoul.3 b/lib/libc/stdlib/strtoul.3
deleted file mode 100644
index 5d6b050..0000000
--- a/lib/libc/stdlib/strtoul.3
+++ /dev/null
@@ -1,163 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strtoul.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRTOUL 3
-.Os
-.Sh NAME
-.Nm strtoul, strtouq
-.Nd convert a string to an unsigned long or uquad_t integer
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Fd #include <limits.h>
-.Ft unsigned long
-.Fn strtoul "const char *nptr" "char **endptr" "int base"
-
-.Fd #include <sys/types.h>
-.Fd #include <stdlib.h>
-.Fd #include <limits.h>
-.Ft u_quad_t
-.Fn strtouq "const char *nptr" "char **endptr" "int base"
-.Sh DESCRIPTION
-The
-.Fn strtoul
-function
-converts the string in
-.Fa nptr
-to an
-.Em unsigned long
-value.
-The
-.Fn strtouq
-function
-converts the string in
-.Fa nptr
-to a
-.Em u_quad_t
-value.
-The conversion is done according to the given
-.Fa base ,
-which must be between 2 and 36 inclusive,
-or be the special value 0.
-.Pp
-The string may begin with an arbitrary amount of white space
-(as determined by
-.Xr isspace 3 )
-followed by a single optional
-.Ql +
-or
-.Ql -
-sign.
-If
-.Fa base
-is zero or 16,
-the string may then include a
-.Ql 0x
-prefix,
-and the number will be read in base 16; otherwise, a zero
-.Fa base
-is taken as 10 (decimal) unless the next character is
-.Ql 0 ,
-in which case it is taken as 8 (octal).
-.Pp
-The remainder of the string is converted to an
-.Em unsigned long
-value in the obvious manner,
-stopping at the end of the string
-or at the first character that does not produce a valid digit
-in the given base.
-(In bases above 10, the letter
-.Ql A
-in either upper or lower case
-represents 10,
-.Ql B
-represents 11, and so forth, with
-.Ql Z
-representing 35.)
-.Pp
-If
-.Fa endptr
-is non nil,
-.Fn strtoul
-stores the address of the first invalid character in
-.Fa *endptr .
-If there were no digits at all, however,
-.Fn strtoul
-stores the original value of
-.Fa nptr
-in
-.Fa *endptr .
-(Thus, if
-.Fa *nptr
-is not
-.Ql \e0
-but
-.Fa **endptr
-is
-.Ql \e0
-on return, the entire string was valid.)
-.Sh RETURN VALUES
-The
-.Fn strtoul
-function
-returns either the result of the conversion
-or, if there was a leading minus sign,
-the negation of the result of the conversion,
-unless the original (non-negated) value would overflow;
-in the latter case,
-.Fn strtoul
-returns
-.Dv ULONG_MAX
-and sets the global variable
-.Va errno
-to
-.Er ERANGE .
-.Sh ERRORS
-.Bl -tag -width [ERANGE]
-.It Bq Er ERANGE
-The given string was out of range; the value converted has been clamped.
-.El
-.Sh SEE ALSO
-.Xr strtol 3
-.Sh STANDARDS
-The
-.Fn strtoul
-function
-conforms to
-.St -ansiC .
-.Sh BUGS
-Ignores the current locale.
diff --git a/lib/libc/stdlib/strtoul.c b/lib/libc/stdlib/strtoul.c
deleted file mode 100644
index 304150a..0000000
--- a/lib/libc/stdlib/strtoul.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <limits.h>
-#include <ctype.h>
-#include <errno.h>
-#include <stdlib.h>
-
-/*
- * Convert a string to an unsigned long integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-unsigned long
-strtoul(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
-{
- register const char *s = nptr;
- register unsigned long acc;
- register unsigned char c;
- register unsigned long cutoff;
- register int neg = 0, any, cutlim;
-
- /*
- * See strtol for comments as to the logic used.
- */
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else if (c == '+')
- c = *s++;
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
- cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
- cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
- for (acc = 0, any = 0;; c = *s++) {
- if (!isascii(c))
- break;
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
- any = -1;
- else {
- any = 1;
- acc *= base;
- acc += c;
- }
- }
- if (any < 0) {
- acc = ULONG_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- *endptr = (char *)(any ? s - 1 : nptr);
- return (acc);
-}
diff --git a/lib/libc/stdlib/strtoull.c b/lib/libc/stdlib/strtoull.c
deleted file mode 100644
index 7656a3c..0000000
--- a/lib/libc/stdlib/strtoull.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtouq.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <limits.h>
-#include <errno.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-/*
- * Convert a string to an unsigned quad integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-u_quad_t
-strtouq(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
-{
- register const char *s = nptr;
- register u_quad_t acc;
- register unsigned char c;
- register u_quad_t qbase, cutoff;
- register int neg, any, cutlim;
-
- /*
- * See strtoq for comments as to the logic used.
- */
- s = nptr;
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else {
- neg = 0;
- if (c == '+')
- c = *s++;
- }
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
- qbase = (unsigned)base;
- cutoff = (u_quad_t)UQUAD_MAX / qbase;
- cutlim = (u_quad_t)UQUAD_MAX % qbase;
- for (acc = 0, any = 0;; c = *s++) {
- if (!isascii(c))
- break;
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
- any = -1;
- else {
- any = 1;
- acc *= qbase;
- acc += c;
- }
- }
- if (any < 0) {
- acc = UQUAD_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- *endptr = (char *)(any ? s - 1 : nptr);
- return (acc);
-}
diff --git a/lib/libc/stdlib/strtouq.c b/lib/libc/stdlib/strtouq.c
deleted file mode 100644
index 7656a3c..0000000
--- a/lib/libc/stdlib/strtouq.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtouq.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <limits.h>
-#include <errno.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-/*
- * Convert a string to an unsigned quad integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-u_quad_t
-strtouq(nptr, endptr, base)
- const char *nptr;
- char **endptr;
- register int base;
-{
- register const char *s = nptr;
- register u_quad_t acc;
- register unsigned char c;
- register u_quad_t qbase, cutoff;
- register int neg, any, cutlim;
-
- /*
- * See strtoq for comments as to the logic used.
- */
- s = nptr;
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else {
- neg = 0;
- if (c == '+')
- c = *s++;
- }
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
- qbase = (unsigned)base;
- cutoff = (u_quad_t)UQUAD_MAX / qbase;
- cutlim = (u_quad_t)UQUAD_MAX % qbase;
- for (acc = 0, any = 0;; c = *s++) {
- if (!isascii(c))
- break;
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
- any = -1;
- else {
- any = 1;
- acc *= qbase;
- acc += c;
- }
- }
- if (any < 0) {
- acc = UQUAD_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- *endptr = (char *)(any ? s - 1 : nptr);
- return (acc);
-}
diff --git a/lib/libc/stdlib/system.3 b/lib/libc/stdlib/system.3
deleted file mode 100644
index 9b82e7b..0000000
--- a/lib/libc/stdlib/system.3
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)system.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SYSTEM 3
-.Os
-.Sh NAME
-.Nm system
-.Nd pass a command to the shell
-.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Ft int
-.Fn system "const char *string"
-.Sh DESCRIPTION
-The
-.Fn system
-function
-hands the argument
-.Fa string
-to the command interpreter
-.Xr sh 1 .
-The calling process waits for the shell
-to finish executing the command,
-ignoring
-.Dv SIGINT
-and
-.Dv SIGQUIT ,
-and blocking
-.Dv SIGCHLD .
-.Pp
-If
-.Fa string
-is a
-.Dv NULL
-pointer,
-.Fn system
-will return non-zero if the command interpreter
-.Xr sh 1
-is available, and zero if it is not.
-.Pp
-The
-.Fn system
-function
-returns the exit status of the shell, or \-1 if the
-.Xr wait 2
-for the shell failed.
-A return value of 127 means the execution of the shell
-failed.
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr execve 2 ,
-.Xr wait 2 ,
-.Xr popen 3
-.Sh STANDARDS
-The
-.Fn system
-function
-conforms to
-.St -ansiC .
-and is expected to be
-.St -p1003.2
-compatible.
diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c
deleted file mode 100644
index 00db7d6..0000000
--- a/lib/libc/stdlib/system.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)system.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <paths.h>
-#include <errno.h>
-
-int system(command)
- const char *command;
-{
- pid_t pid;
- int pstat;
- struct sigaction ign, intact, quitact;
- sigset_t newsigblock, oldsigblock;
-
- if (!command) /* just checking... */
- return(1);
-
- /*
- * Ignore SIGINT and SIGQUIT, block SIGCHLD. Remember to save
- * existing signal dispositions.
- */
- ign.sa_handler = SIG_IGN;
- (void)sigemptyset(&ign.sa_mask);
- ign.sa_flags = 0;
- (void)sigaction(SIGINT, &ign, &intact);
- (void)sigaction(SIGQUIT, &ign, &quitact);
- (void)sigemptyset(&newsigblock);
- (void)sigaddset(&newsigblock, SIGCHLD);
- (void)sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock);
- switch(pid = fork()) {
- case -1: /* error */
- break;
- case 0: /* child */
- /*
- * Restore original signal dispositions and exec the command.
- */
- (void)sigaction(SIGINT, &intact, NULL);
- (void)sigaction(SIGQUIT, &quitact, NULL);
- (void)sigprocmask(SIG_SETMASK, &oldsigblock, NULL);
- execl(_PATH_BSHELL, "sh", "-c", command, (char *)NULL);
- _exit(127);
- default: /* parent */
- do {
- pid = waitpid(pid, &pstat, 0);
- } while (pid == -1 && errno == EINTR);
- break;
- }
- (void)sigaction(SIGINT, &intact, NULL);
- (void)sigaction(SIGQUIT, &quitact, NULL);
- (void)sigprocmask(SIG_SETMASK, &oldsigblock, NULL);
- return(pid == -1 ? -1 : pstat);
-}
diff --git a/lib/libc/stdtime/Makefile.inc b/lib/libc/stdtime/Makefile.inc
deleted file mode 100644
index 311b835..0000000
--- a/lib/libc/stdtime/Makefile.inc
+++ /dev/null
@@ -1,15 +0,0 @@
-# Makefile.inc,v 1.2 1994/09/13 21:26:01 wollman Exp
-# $Id: Makefile.inc,v 1.6 1997/10/15 16:16:21 bde Exp $
-
-.PATH: ${.CURDIR}/../libc/stdtime
-
-SRCS+= asctime.c difftime.c localtime.c strftime.c strptime.c timelocal.c
-
-.if ${LIB} == "c"
-MAN3+= ctime.3 strftime.3 strptime.3 time2posix.3
-MAN5+= tzfile.5
-
-MLINKS+=ctime.3 asctime.3 ctime.3 difftime.3 ctime.3 gmtime.3 \
- ctime.3 localtime.3 ctime.3 mktime.3
-MLINKS+=time2posix.3 posix2time.3
-.endif
diff --git a/lib/libc/stdtime/asctime.c b/lib/libc/stdtime/asctime.c
deleted file mode 100644
index a1834b6..0000000
--- a/lib/libc/stdtime/asctime.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-** This file is in the public domain, so clarified as of
-** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
-*/
-
-#ifndef lint
-#ifndef NOID
-static char elsieid[] = "@(#)asctime.c 7.7";
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-/*LINTLIBRARY*/
-
-#include "private.h"
-#include "tzfile.h"
-
-/*
-** A la X3J11, with core dump avoidance.
-*/
-
-char *
-asctime(timeptr)
-register const struct tm * timeptr;
-{
- static const char wday_name[][3] = {
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
- };
- static const char mon_name[][3] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
- };
- /*
- ** Big enough for something such as
- ** ??? ???-2147483648 -2147483648:-2147483648:-2147483648 -2147483648\n
- ** (two three-character abbreviations, five strings denoting integers,
- ** three explicit spaces, two explicit colons, a newline,
- ** and a trailing ASCII nul).
- */
- static char result[3 * 2 + 5 * INT_STRLEN_MAXIMUM(int) +
- 3 + 2 + 1 + 1];
- register const char * wn;
- register const char * mn;
-
- if (timeptr->tm_wday < 0 || timeptr->tm_wday >= DAYSPERWEEK)
- wn = "???";
- else wn = wday_name[timeptr->tm_wday];
- if (timeptr->tm_mon < 0 || timeptr->tm_mon >= MONSPERYEAR)
- mn = "???";
- else mn = mon_name[timeptr->tm_mon];
- /*
- ** The X3J11-suggested format is
- ** "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %d\n"
- ** Since the .2 in 02.2d is ignored, we drop it.
- */
- (void) sprintf(result, "%.3s %.3s%3d %02d:%02d:%02d %d\n",
- wn, mn,
- timeptr->tm_mday, timeptr->tm_hour,
- timeptr->tm_min, timeptr->tm_sec,
- TM_YEAR_BASE + timeptr->tm_year);
- return result;
-}
diff --git a/lib/libc/stdtime/ctime.3 b/lib/libc/stdtime/ctime.3
deleted file mode 100644
index 47ae9a1..0000000
--- a/lib/libc/stdtime/ctime.3
+++ /dev/null
@@ -1,257 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Arthur Olson.
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ctime.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt CTIME 3
-.Os BSD 4.3
-.Sh NAME
-.Nm asctime ,
-.Nm ctime ,
-.Nm difftime ,
-.Nm gmtime ,
-.Nm localtime ,
-.Nm mktime
-.Nd transform binary date and time value to
-.Tn ASCII
-.Sh SYNOPSIS
-.Fd #include <time.h>
-.Vt extern char *tzname[2];
-.Ft char *
-.Fn ctime "const time_t *clock"
-.Ft double
-.Fn difftime "time_t time1" "time_t time0"
-.Ft char *
-.Fn asctime "const struct tm *tm"
-.Ft struct tm *
-.Fn localtime "const time_t *clock"
-.Ft struct tm *
-.Fn gmtime "const time_t *clock"
-.Ft time_t
-.Fn mktime "struct tm *tm"
-.Sh DESCRIPTION
-The functions
-.Fn ctime ,
-.Fn gmtime
-and
-.Fn localtime
-all take as an argument a time value representing the time in seconds since
-the Epoch (00:00:00
-.Tn UTC ,
-January 1, 1970; see
-.Xr time 3 ) .
-.Pp
-The function
-.Fn localtime
-converts the time value pointed at by
-.Fa clock ,
-and returns a pointer to a
-.Dq Fa struct tm
-(described below) which contains
-the broken-out time information for the value after adjusting for the current
-time zone (and any other factors such as Daylight Saving Time).
-Time zone adjustments are performed as specified by the
-.Ev TZ
-environment variable (see
-.Xr tzset 3 ) .
-The function
-.Fn localtime
-uses
-.Xr tzset 3
-to initialize time conversion information if
-.Xr tzset 3
-has not already been called by the process.
-.Pp
-After filling in the tm structure,
-.Fn localtime
-sets the
-.Fa tm_isdst Ns 'th
-element of
-.Fa tzname
-to a pointer to an
-.Tn ASCII
-string that's the time zone abbreviation to be
-used with
-.Fn localtime Ns 's
-return value.
-.Pp
-The function
-.Fn gmtime
-similarly converts the time value, but without any time zone adjustment,
-and returns a pointer to a tm structure (described below).
-.Pp
-The
-.Fn ctime
-function
-adjusts the time value for the current time zone in the same manner as
-.Fn localtime ,
-and returns a pointer to a 26-character string of the form:
-.Bd -literal -offset indent
-Thu Nov 24 18:22:48 1986\en\e0
-.Ed
-.Pp
-All the fields have constant width.
-.Pp
-The
-.Fn asctime
-function
-converts the broken down time in the structure
-.Fa tm
-pointed at by
-.Fa *tm
-to the form
-shown in the example above.
-.Pp
-The function
-.Fn mktime
-converts the broken-down time, expressed as local time, in the structure
-pointed to by tm into a time value with the same encoding as that of the
-values returned by the
-.Xr time 3
-function, that is, seconds from the Epoch,
-.Tn UTC .
-.Pp
-The original values of the
-.Fa tm_wday
-and
-.Fa tm_yday
-components of the structure are ignored, and the original values of the
-other components are not restricted to their normal ranges.
-(A positive or zero value for
-.Fa tm_isdst
-causes
-.Fn mktime
-to presume initially that summer time (for example, Daylight Saving Time)
-is or is not in effect for the specified time, respectively.
-A negative value for
-.Fa tm_isdst
-causes the
-.Fn mktime
-function to attempt to divine whether summer time is in effect for the
-specified time.)
-.Pp
-On successful completion, the values of the
-.Fa tm_wday
-and
-.Fa tm_yday
-components of the structure are set appropriately, and the other components
-are set to represent the specified calendar time, but with their values
-forced to their normal ranges; the final value of
-.Fa tm_mday
-is not set until
-.Fa tm_mon
-and
-.Fa tm_year
-are determined.
-.Fn Mktime
-returns the specified calendar time; if the calendar time cannot be
-represented, it returns \-1;
-.Pp
-The
-.Fn difftime
-function
-returns the difference between two calendar times,
-.Pf ( Fa time1
--
-.Fa time0 ) ,
-expressed in seconds.
-.Pp
-External declarations as well as the tm structure definition are in the
-.Aq Pa time.h
-include file.
-The tm structure includes at least the following fields:
-.Bd -literal -offset indent
-int tm_sec; /\(** seconds (0 - 60) \(**/
-int tm_min; /\(** minutes (0 - 59) \(**/
-int tm_hour; /\(** hours (0 - 23) \(**/
-int tm_mday; /\(** day of month (1 - 31) \(**/
-int tm_mon; /\(** month of year (0 - 11) \(**/
-int tm_year; /\(** year \- 1900 \(**/
-int tm_wday; /\(** day of week (Sunday = 0) \(**/
-int tm_yday; /\(** day of year (0 - 365) \(**/
-int tm_isdst; /\(** is summer time in effect? \(**/
-char \(**tm_zone; /\(** abbreviation of timezone name \(**/
-long tm_gmtoff; /\(** offset from UTC in seconds \(**/
-.Ed
-.Pp
-The
-field
-.Fa tm_isdst
-is non-zero if summer time is in effect.
-.Pp
-The field
-.Fa tm_gmtoff
-is the offset (in seconds) of the time represented from
-.Tn UTC ,
-with positive
-values indicating east of the Prime Meridian.
-.Sh SEE ALSO
-.Xr date 1 ,
-.Xr gettimeofday 2 ,
-.Xr getenv 3 ,
-.Xr time 3 ,
-.Xr tzset 3 ,
-.Xr tzfile 5
-.Sh HISTORY
-This manual page is derived from
-the time package contributed to Berkeley by
-Arthur Olsen and which appeared in
-.Bx 4.3 .
-.Sh BUGS
-Except for
-.Fn difftime
-and
-.Fn mktime ,
-these functions leaves their result in an internal static object and return
-a pointer to that object. Subsequent calls to these
-function will modify the same object.
-.Pp
-The
-.Fa tm_zone
-field of a returned tm structure points to a static array of characters,
-which will also be overwritten by any subsequent calls (as well as by
-subsequent calls to
-.Xr tzset 3
-and
-.Xr tzsetwall 3 ) .
-.Pp
-Use of the external variable
-.Fa tzname
-is discouraged; the
-.Fa tm_zone
-entry in the tm structure is preferred.
-.Pp
-Avoid using out-of-range values with
-.Fn mktime
-when setting up lunch with promptness sticklers in Riyadh.
diff --git a/lib/libc/stdtime/difftime.c b/lib/libc/stdtime/difftime.c
deleted file mode 100644
index f178524..0000000
--- a/lib/libc/stdtime/difftime.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-** This file is in the public domain, so clarified as of
-** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
-*/
-
-#ifndef lint
-#ifndef NOID
-static char elsieid[] = "@(#)difftime.c 7.7";
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-/*LINTLIBRARY*/
-
-#include "private.h"
-
-/*
-** Algorithm courtesy Paul Eggert (eggert@twinsun.com).
-*/
-
-#ifdef HAVE_LONG_DOUBLE
-#define long_double long double
-#endif /* defined HAVE_LONG_DOUBLE */
-#ifndef HAVE_LONG_DOUBLE
-#define long_double double
-#endif /* !defined HAVE_LONG_DOUBLE */
-
-double
-difftime(time1, time0)
-const time_t time1;
-const time_t time0;
-{
- time_t delta;
- time_t hibit;
-
- if (sizeof(time_t) < sizeof(double))
- return (double) time1 - (double) time0;
- if (sizeof(time_t) < sizeof(long_double))
- return (long_double) time1 - (long_double) time0;
- if (time1 < time0)
- return -difftime(time0, time1);
- /*
- ** As much as possible, avoid loss of precision
- ** by computing the difference before converting to double.
- */
- delta = time1 - time0;
- if (delta >= 0)
- return delta;
- /*
- ** Repair delta overflow.
- */
- hibit = (~ (time_t) 0) << (TYPE_BIT(time_t) - 1);
- /*
- ** The following expression rounds twice, which means
- ** the result may not be the closest to the true answer.
- ** For example, suppose time_t is 64-bit signed int,
- ** long_double is IEEE 754 double with default rounding,
- ** time1 = 9223372036854775807 and time0 = -1536.
- ** Then the true difference is 9223372036854777343,
- ** which rounds to 9223372036854777856
- ** with a total error of 513.
- ** But delta overflows to -9223372036854774273,
- ** which rounds to -9223372036854774784, and correcting
- ** this by subtracting 2 * (long_double) hibit
- ** (i.e. by adding 2**64 = 18446744073709551616)
- ** yields 9223372036854776832, which
- ** rounds to 9223372036854775808
- ** with a total error of 1535 instead.
- ** This problem occurs only with very large differences.
- ** It's too painful to fix this portably.
- ** We are not alone in this problem;
- ** some C compilers round twice when converting
- ** large unsigned types to small floating types,
- ** so if time_t is unsigned the "return delta" above
- ** has the same double-rounding problem with those compilers.
- */
- return delta - 2 * (long_double) hibit;
-}
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c
deleted file mode 100644
index 3438cc6..0000000
--- a/lib/libc/stdtime/localtime.c
+++ /dev/null
@@ -1,1754 +0,0 @@
-/*
-** This file is in the public domain, so clarified as of
-** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
-*/
-
-#ifndef lint
-#ifndef NOID
-static char elsieid[] = "@(#)localtime.c 7.57";
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-/*
-** Leap second handling from Bradley White (bww@k.gp.cs.cmu.edu).
-** POSIX-style TZ environment variable handling from Guy Harris
-** (guy@auspex.com).
-*/
-
-/*LINTLIBRARY*/
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include "private.h"
-#include "tzfile.h"
-#include "fcntl.h"
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
-** SunOS 4.1.1 headers lack O_BINARY.
-*/
-
-#ifdef O_BINARY
-#define OPEN_MODE (O_RDONLY | O_BINARY)
-#endif /* defined O_BINARY */
-#ifndef O_BINARY
-#define OPEN_MODE O_RDONLY
-#endif /* !defined O_BINARY */
-
-#ifndef WILDABBR
-/*
-** Someone might make incorrect use of a time zone abbreviation:
-** 1. They might reference tzname[0] before calling tzset (explicitly
-** or implicitly).
-** 2. They might reference tzname[1] before calling tzset (explicitly
-** or implicitly).
-** 3. They might reference tzname[1] after setting to a time zone
-** in which Daylight Saving Time is never observed.
-** 4. They might reference tzname[0] after setting to a time zone
-** in which Standard Time is never observed.
-** 5. They might reference tm.TM_ZONE after calling offtime.
-** What's best to do in the above cases is open to debate;
-** for now, we just set things up so that in any of the five cases
-** WILDABBR is used. Another possibility: initialize tzname[0] to the
-** string "tzname[0] used before set", and similarly for the other cases.
-** And another: initialize tzname[0] to "ERA", with an explanation in the
-** manual page of what this "time zone abbreviation" means (doing this so
-** that tzname[0] has the "normal" length of three characters).
-*/
-#define WILDABBR " "
-#endif /* !defined WILDABBR */
-
-static char wildabbr[] = "WILDABBR";
-
-static const char gmt[] = "GMT";
-
-struct ttinfo { /* time type information */
- long tt_gmtoff; /* GMT offset in seconds */
- int tt_isdst; /* used to set tm_isdst */
- int tt_abbrind; /* abbreviation list index */
- int tt_ttisstd; /* TRUE if transition is std time */
- int tt_ttisgmt; /* TRUE if transition is GMT */
-};
-
-struct lsinfo { /* leap second information */
- time_t ls_trans; /* transition time */
- long ls_corr; /* correction to apply */
-};
-
-#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b))
-
-#ifdef TZNAME_MAX
-#define MY_TZNAME_MAX TZNAME_MAX
-#endif /* defined TZNAME_MAX */
-#ifndef TZNAME_MAX
-#define MY_TZNAME_MAX 255
-#endif /* !defined TZNAME_MAX */
-
-struct state {
- int leapcnt;
- int timecnt;
- int typecnt;
- int charcnt;
- time_t ats[TZ_MAX_TIMES];
- unsigned char types[TZ_MAX_TIMES];
- struct ttinfo ttis[TZ_MAX_TYPES];
- char chars[BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt),
- (2 * (MY_TZNAME_MAX + 1)))];
- struct lsinfo lsis[TZ_MAX_LEAPS];
-};
-
-struct rule {
- int r_type; /* type of rule--see below */
- int r_day; /* day number of rule */
- int r_week; /* week number of rule */
- int r_mon; /* month number of rule */
- long r_time; /* transition time of rule */
-};
-
-#define JULIAN_DAY 0 /* Jn - Julian day */
-#define DAY_OF_YEAR 1 /* n - day of year */
-#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */
-
-/*
-** Prototypes for static functions.
-*/
-
-static long detzcode P((const char * codep));
-static const char * getzname P((const char * strp));
-static const char * getnum P((const char * strp, int * nump, int min,
- int max));
-static const char * getsecs P((const char * strp, long * secsp));
-static const char * getoffset P((const char * strp, long * offsetp));
-static const char * getrule P((const char * strp, struct rule * rulep));
-static void gmtload P((struct state * sp));
-static void gmtsub P((const time_t * timep, long offset,
- struct tm * tmp));
-static void localsub P((const time_t * timep, long offset,
- struct tm * tmp));
-static int increment_overflow P((int * number, int delta));
-static int normalize_overflow P((int * tensptr, int * unitsptr,
- int base));
-static void settzname P((void));
-static time_t time1 P((struct tm * tmp,
- void(*funcp) P((const time_t *,
- long, struct tm *)),
- long offset));
-static time_t time2 P((struct tm *tmp,
- void(*funcp) P((const time_t *,
- long, struct tm*)),
- long offset, int * okayp));
-static void timesub P((const time_t * timep, long offset,
- const struct state * sp, struct tm * tmp));
-static int tmcomp P((const struct tm * atmp,
- const struct tm * btmp));
-static time_t transtime P((time_t janfirst, int year,
- const struct rule * rulep, long offset));
-static int tzload P((const char * name, struct state * sp));
-static int tzparse P((const char * name, struct state * sp,
- int lastditch));
-
-#ifdef ALL_STATE
-static struct state * lclptr;
-static struct state * gmtptr;
-#endif /* defined ALL_STATE */
-
-#ifndef ALL_STATE
-static struct state lclmem;
-static struct state gmtmem;
-#define lclptr (&lclmem)
-#define gmtptr (&gmtmem)
-#endif /* State Farm */
-
-#ifndef TZ_STRLEN_MAX
-#define TZ_STRLEN_MAX 255
-#endif /* !defined TZ_STRLEN_MAX */
-
-static char lcl_TZname[TZ_STRLEN_MAX + 1];
-static int lcl_is_set;
-static int gmt_is_set;
-#ifdef _THREAD_SAFE
-static struct pthread_mutex _lcl_mutexd = PTHREAD_MUTEX_INITIALIZER;
-static struct pthread_mutex _gmt_mutexd = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t lcl_mutex = &_lcl_mutexd;
-static pthread_mutex_t gmt_mutex = &_gmt_mutexd;
-#endif
-
-char * tzname[2] = {
- wildabbr,
- wildabbr
-};
-
-/*
-** Section 4.12.3 of X3.159-1989 requires that
-** Except for the strftime function, these functions [asctime,
-** ctime, gmtime, localtime] return values in one of two static
-** objects: a broken-down time structure and an array of char.
-** Thanks to Paul Eggert (eggert@twinsun.com) for noting this.
-*/
-
-static struct tm tm;
-
-#ifdef USG_COMPAT
-time_t timezone = 0;
-int daylight = 0;
-#endif /* defined USG_COMPAT */
-
-#ifdef ALTZONE
-time_t altzone = 0;
-#endif /* defined ALTZONE */
-
-static long
-detzcode(codep)
-const char * const codep;
-{
- register long result;
- register int i;
-
- result = (codep[0] & 0x80) ? ~0L : 0L;
- for (i = 0; i < 4; ++i)
- result = (result << 8) | (codep[i] & 0xff);
- return result;
-}
-
-static void
-settzname P((void))
-{
- register struct state * const sp = lclptr;
- register int i;
-
- tzname[0] = wildabbr;
- tzname[1] = wildabbr;
-#ifdef USG_COMPAT
- daylight = 0;
- timezone = 0;
-#endif /* defined USG_COMPAT */
-#ifdef ALTZONE
- altzone = 0;
-#endif /* defined ALTZONE */
-#ifdef ALL_STATE
- if (sp == NULL) {
- tzname[0] = tzname[1] = gmt;
- return;
- }
-#endif /* defined ALL_STATE */
- for (i = 0; i < sp->typecnt; ++i) {
- register const struct ttinfo * const ttisp = &sp->ttis[i];
-
- tzname[ttisp->tt_isdst] =
- &sp->chars[ttisp->tt_abbrind];
-#ifdef USG_COMPAT
- if (ttisp->tt_isdst)
- daylight = 1;
- if (i == 0 || !ttisp->tt_isdst)
- timezone = -(ttisp->tt_gmtoff);
-#endif /* defined USG_COMPAT */
-#ifdef ALTZONE
- if (i == 0 || ttisp->tt_isdst)
- altzone = -(ttisp->tt_gmtoff);
-#endif /* defined ALTZONE */
- }
- /*
- ** And to get the latest zone names into tzname. . .
- */
- for (i = 0; i < sp->timecnt; ++i) {
- register const struct ttinfo * const ttisp =
- &sp->ttis[
- sp->types[i]];
-
- tzname[ttisp->tt_isdst] =
- &sp->chars[ttisp->tt_abbrind];
- }
-}
-
-static int
-tzload(name, sp)
-register const char * name;
-register struct state * const sp;
-{
- register const char * p;
- register int i;
- register int fid;
-
- if (name == NULL && (name = TZDEFAULT) == NULL)
- return -1;
- {
- register int doaccess;
- struct stat stab;
- /*
- ** Section 4.9.1 of the C standard says that
- ** "FILENAME_MAX expands to an integral constant expression
- ** that is the size needed for an array of char large enough
- ** to hold the longest file name string that the implementation
- ** guarantees can be opened."
- */
- char fullname[FILENAME_MAX + 1];
-
- if (name[0] == ':')
- ++name;
- doaccess = name[0] == '/';
- if (!doaccess) {
- if ((p = TZDIR) == NULL)
- return -1;
- if ((strlen(p) + strlen(name) + 1) >= sizeof fullname)
- return -1;
- (void) strcpy(fullname, p);
- (void) strcat(fullname, "/");
- (void) strcat(fullname, name);
- /*
- ** Set doaccess if '.' (as in "../") shows up in name.
- */
- if (strchr(name, '.') != NULL)
- doaccess = TRUE;
- name = fullname;
- }
- if (doaccess && access(name, R_OK) != 0)
- return -1;
- if ((fid = open(name, OPEN_MODE)) == -1)
- return -1;
- if ((fstat(fid, &stab) < 0) || !S_ISREG(stab.st_mode))
- return -1;
- }
- {
- struct tzhead * tzhp;
- char buf[sizeof *sp + sizeof *tzhp];
- int ttisstdcnt;
- int ttisgmtcnt;
-
- i = read(fid, buf, sizeof buf);
- if (close(fid) != 0)
- return -1;
- p = buf;
- p += sizeof tzhp->tzh_reserved;
- ttisstdcnt = (int) detzcode(p);
- p += 4;
- ttisgmtcnt = (int) detzcode(p);
- p += 4;
- sp->leapcnt = (int) detzcode(p);
- p += 4;
- sp->timecnt = (int) detzcode(p);
- p += 4;
- sp->typecnt = (int) detzcode(p);
- p += 4;
- sp->charcnt = (int) detzcode(p);
- p += 4;
- if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS ||
- sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES ||
- sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES ||
- sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS ||
- (ttisstdcnt != sp->typecnt && ttisstdcnt != 0) ||
- (ttisgmtcnt != sp->typecnt && ttisgmtcnt != 0))
- return -1;
- if (i - (p - buf) < sp->timecnt * 4 + /* ats */
- sp->timecnt + /* types */
- sp->typecnt * (4 + 2) + /* ttinfos */
- sp->charcnt + /* chars */
- sp->leapcnt * (4 + 4) + /* lsinfos */
- ttisstdcnt + /* ttisstds */
- ttisgmtcnt) /* ttisgmts */
- return -1;
- for (i = 0; i < sp->timecnt; ++i) {
- sp->ats[i] = detzcode(p);
- p += 4;
- }
- for (i = 0; i < sp->timecnt; ++i) {
- sp->types[i] = (unsigned char) *p++;
- if (sp->types[i] >= sp->typecnt)
- return -1;
- }
- for (i = 0; i < sp->typecnt; ++i) {
- register struct ttinfo * ttisp;
-
- ttisp = &sp->ttis[i];
- ttisp->tt_gmtoff = detzcode(p);
- p += 4;
- ttisp->tt_isdst = (unsigned char) *p++;
- if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1)
- return -1;
- ttisp->tt_abbrind = (unsigned char) *p++;
- if (ttisp->tt_abbrind < 0 ||
- ttisp->tt_abbrind > sp->charcnt)
- return -1;
- }
- for (i = 0; i < sp->charcnt; ++i)
- sp->chars[i] = *p++;
- sp->chars[i] = '\0'; /* ensure '\0' at end */
- for (i = 0; i < sp->leapcnt; ++i) {
- register struct lsinfo * lsisp;
-
- lsisp = &sp->lsis[i];
- lsisp->ls_trans = detzcode(p);
- p += 4;
- lsisp->ls_corr = detzcode(p);
- p += 4;
- }
- for (i = 0; i < sp->typecnt; ++i) {
- register struct ttinfo * ttisp;
-
- ttisp = &sp->ttis[i];
- if (ttisstdcnt == 0)
- ttisp->tt_ttisstd = FALSE;
- else {
- ttisp->tt_ttisstd = *p++;
- if (ttisp->tt_ttisstd != TRUE &&
- ttisp->tt_ttisstd != FALSE)
- return -1;
- }
- }
- for (i = 0; i < sp->typecnt; ++i) {
- register struct ttinfo * ttisp;
-
- ttisp = &sp->ttis[i];
- if (ttisgmtcnt == 0)
- ttisp->tt_ttisgmt = FALSE;
- else {
- ttisp->tt_ttisgmt = *p++;
- if (ttisp->tt_ttisgmt != TRUE &&
- ttisp->tt_ttisgmt != FALSE)
- return -1;
- }
- }
- }
- return 0;
-}
-
-static const int mon_lengths[2][MONSPERYEAR] = {
- { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
- { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
-};
-
-static const int year_lengths[2] = {
- DAYSPERNYEAR, DAYSPERLYEAR
-};
-
-/*
-** Given a pointer into a time zone string, scan until a character that is not
-** a valid character in a zone name is found. Return a pointer to that
-** character.
-*/
-
-static const char *
-getzname(strp)
-register const char * strp;
-{
- register char c;
-
- while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' &&
- c != '+')
- ++strp;
- return strp;
-}
-
-/*
-** Given a pointer into a time zone string, extract a number from that string.
-** Check that the number is within a specified range; if it is not, return
-** NULL.
-** Otherwise, return a pointer to the first character not part of the number.
-*/
-
-static const char *
-getnum(strp, nump, min, max)
-register const char * strp;
-int * const nump;
-const int min;
-const int max;
-{
- register char c;
- register int num;
-
- if (strp == NULL || !is_digit(c = *strp))
- return NULL;
- num = 0;
- do {
- num = num * 10 + (c - '0');
- if (num > max)
- return NULL; /* illegal value */
- c = *++strp;
- } while (is_digit(c));
- if (num < min)
- return NULL; /* illegal value */
- *nump = num;
- return strp;
-}
-
-/*
-** Given a pointer into a time zone string, extract a number of seconds,
-** in hh[:mm[:ss]] form, from the string.
-** If any error occurs, return NULL.
-** Otherwise, return a pointer to the first character not part of the number
-** of seconds.
-*/
-
-static const char *
-getsecs(strp, secsp)
-register const char * strp;
-long * const secsp;
-{
- int num;
-
- /*
- ** `HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like
- ** "M10.4.6/26", which does not conform to Posix,
- ** but which specifies the equivalent of
- ** ``02:00 on the first Sunday on or after 23 Oct''.
- */
- strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1);
- if (strp == NULL)
- return NULL;
- *secsp = num * (long) SECSPERHOUR;
- if (*strp == ':') {
- ++strp;
- strp = getnum(strp, &num, 0, MINSPERHOUR - 1);
- if (strp == NULL)
- return NULL;
- *secsp += num * SECSPERMIN;
- if (*strp == ':') {
- ++strp;
- /* `SECSPERMIN' allows for leap seconds. */
- strp = getnum(strp, &num, 0, SECSPERMIN);
- if (strp == NULL)
- return NULL;
- *secsp += num;
- }
- }
- return strp;
-}
-
-/*
-** Given a pointer into a time zone string, extract an offset, in
-** [+-]hh[:mm[:ss]] form, from the string.
-** If any error occurs, return NULL.
-** Otherwise, return a pointer to the first character not part of the time.
-*/
-
-static const char *
-getoffset(strp, offsetp)
-register const char * strp;
-long * const offsetp;
-{
- register int neg = 0;
-
- if (*strp == '-') {
- neg = 1;
- ++strp;
- } else if (*strp == '+')
- ++strp;
- strp = getsecs(strp, offsetp);
- if (strp == NULL)
- return NULL; /* illegal time */
- if (neg)
- *offsetp = -*offsetp;
- return strp;
-}
-
-/*
-** Given a pointer into a time zone string, extract a rule in the form
-** date[/time]. See POSIX section 8 for the format of "date" and "time".
-** If a valid rule is not found, return NULL.
-** Otherwise, return a pointer to the first character not part of the rule.
-*/
-
-static const char *
-getrule(strp, rulep)
-const char * strp;
-register struct rule * const rulep;
-{
- if (*strp == 'J') {
- /*
- ** Julian day.
- */
- rulep->r_type = JULIAN_DAY;
- ++strp;
- strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR);
- } else if (*strp == 'M') {
- /*
- ** Month, week, day.
- */
- rulep->r_type = MONTH_NTH_DAY_OF_WEEK;
- ++strp;
- strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR);
- if (strp == NULL)
- return NULL;
- if (*strp++ != '.')
- return NULL;
- strp = getnum(strp, &rulep->r_week, 1, 5);
- if (strp == NULL)
- return NULL;
- if (*strp++ != '.')
- return NULL;
- strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1);
- } else if (is_digit(*strp)) {
- /*
- ** Day of year.
- */
- rulep->r_type = DAY_OF_YEAR;
- strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1);
- } else return NULL; /* invalid format */
- if (strp == NULL)
- return NULL;
- if (*strp == '/') {
- /*
- ** Time specified.
- */
- ++strp;
- strp = getsecs(strp, &rulep->r_time);
- } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */
- return strp;
-}
-
-/*
-** Given the Epoch-relative time of January 1, 00:00:00 GMT, in a year, the
-** year, a rule, and the offset from GMT at the time that rule takes effect,
-** calculate the Epoch-relative time that rule takes effect.
-*/
-
-static time_t
-transtime(janfirst, year, rulep, offset)
-const time_t janfirst;
-const int year;
-register const struct rule * const rulep;
-const long offset;
-{
- register int leapyear;
- register time_t value;
- register int i;
- int d, m1, yy0, yy1, yy2, dow;
-
- INITIALIZE(value);
- leapyear = isleap(year);
- switch (rulep->r_type) {
-
- case JULIAN_DAY:
- /*
- ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap
- ** years.
- ** In non-leap years, or if the day number is 59 or less, just
- ** add SECSPERDAY times the day number-1 to the time of
- ** January 1, midnight, to get the day.
- */
- value = janfirst + (rulep->r_day - 1) * SECSPERDAY;
- if (leapyear && rulep->r_day >= 60)
- value += SECSPERDAY;
- break;
-
- case DAY_OF_YEAR:
- /*
- ** n - day of year.
- ** Just add SECSPERDAY times the day number to the time of
- ** January 1, midnight, to get the day.
- */
- value = janfirst + rulep->r_day * SECSPERDAY;
- break;
-
- case MONTH_NTH_DAY_OF_WEEK:
- /*
- ** Mm.n.d - nth "dth day" of month m.
- */
- value = janfirst;
- for (i = 0; i < rulep->r_mon - 1; ++i)
- value += mon_lengths[leapyear][i] * SECSPERDAY;
-
- /*
- ** Use Zeller's Congruence to get day-of-week of first day of
- ** month.
- */
- m1 = (rulep->r_mon + 9) % 12 + 1;
- yy0 = (rulep->r_mon <= 2) ? (year - 1) : year;
- yy1 = yy0 / 100;
- yy2 = yy0 % 100;
- dow = ((26 * m1 - 2) / 10 +
- 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7;
- if (dow < 0)
- dow += DAYSPERWEEK;
-
- /*
- ** "dow" is the day-of-week of the first day of the month. Get
- ** the day-of-month (zero-origin) of the first "dow" day of the
- ** month.
- */
- d = rulep->r_day - dow;
- if (d < 0)
- d += DAYSPERWEEK;
- for (i = 1; i < rulep->r_week; ++i) {
- if (d + DAYSPERWEEK >=
- mon_lengths[leapyear][rulep->r_mon - 1])
- break;
- d += DAYSPERWEEK;
- }
-
- /*
- ** "d" is the day-of-month (zero-origin) of the day we want.
- */
- value += d * SECSPERDAY;
- break;
- }
-
- /*
- ** "value" is the Epoch-relative time of 00:00:00 GMT on the day in
- ** question. To get the Epoch-relative time of the specified local
- ** time on that day, add the transition time and the current offset
- ** from GMT.
- */
- return value + rulep->r_time + offset;
-}
-
-/*
-** Given a POSIX section 8-style TZ string, fill in the rule tables as
-** appropriate.
-*/
-
-static int
-tzparse(name, sp, lastditch)
-const char * name;
-register struct state * const sp;
-const int lastditch;
-{
- const char * stdname;
- const char * dstname;
- size_t stdlen;
- size_t dstlen;
- long stdoffset;
- long dstoffset;
- register time_t * atp;
- register unsigned char * typep;
- register char * cp;
- register int load_result;
-
- INITIALIZE(dstname);
- stdname = name;
- if (lastditch) {
- stdlen = strlen(name); /* length of standard zone name */
- name += stdlen;
- if (stdlen >= sizeof sp->chars)
- stdlen = (sizeof sp->chars) - 1;
- stdoffset = 0;
- } else {
- name = getzname(name);
- stdlen = name - stdname;
- if (stdlen < 3)
- return -1;
- if (*name == '\0')
- return -1; /* was "stdoffset = 0;" */
- else {
- name = getoffset(name, &stdoffset);
- if (name == NULL)
- return -1;
- }
- }
- load_result = tzload(TZDEFRULES, sp);
- if (load_result != 0)
- sp->leapcnt = 0; /* so, we're off a little */
- if (*name != '\0') {
- dstname = name;
- name = getzname(name);
- dstlen = name - dstname; /* length of DST zone name */
- if (dstlen < 3)
- return -1;
- if (*name != '\0' && *name != ',' && *name != ';') {
- name = getoffset(name, &dstoffset);
- if (name == NULL)
- return -1;
- } else dstoffset = stdoffset - SECSPERHOUR;
- if (*name == ',' || *name == ';') {
- struct rule start;
- struct rule end;
- register int year;
- register time_t janfirst;
- time_t starttime;
- time_t endtime;
-
- ++name;
- if ((name = getrule(name, &start)) == NULL)
- return -1;
- if (*name++ != ',')
- return -1;
- if ((name = getrule(name, &end)) == NULL)
- return -1;
- if (*name != '\0')
- return -1;
- sp->typecnt = 2; /* standard time and DST */
- /*
- ** Two transitions per year, from EPOCH_YEAR to 2037.
- */
- sp->timecnt = 2 * (2037 - EPOCH_YEAR + 1);
- if (sp->timecnt > TZ_MAX_TIMES)
- return -1;
- sp->ttis[0].tt_gmtoff = -dstoffset;
- sp->ttis[0].tt_isdst = 1;
- sp->ttis[0].tt_abbrind = stdlen + 1;
- sp->ttis[1].tt_gmtoff = -stdoffset;
- sp->ttis[1].tt_isdst = 0;
- sp->ttis[1].tt_abbrind = 0;
- atp = sp->ats;
- typep = sp->types;
- janfirst = 0;
- for (year = EPOCH_YEAR; year <= 2037; ++year) {
- starttime = transtime(janfirst, year, &start,
- stdoffset);
- endtime = transtime(janfirst, year, &end,
- dstoffset);
- if (starttime > endtime) {
- *atp++ = endtime;
- *typep++ = 1; /* DST ends */
- *atp++ = starttime;
- *typep++ = 0; /* DST begins */
- } else {
- *atp++ = starttime;
- *typep++ = 0; /* DST begins */
- *atp++ = endtime;
- *typep++ = 1; /* DST ends */
- }
- janfirst += year_lengths[isleap(year)] *
- SECSPERDAY;
- }
- } else {
- register long theirstdoffset;
- register long theirdstoffset;
- register long theiroffset;
- register int isdst;
- register int i;
- register int j;
-
- if (*name != '\0')
- return -1;
- if (load_result != 0)
- return -1;
- /*
- ** Initial values of theirstdoffset and theirdstoffset.
- */
- theirstdoffset = 0;
- for (i = 0; i < sp->timecnt; ++i) {
- j = sp->types[i];
- if (!sp->ttis[j].tt_isdst) {
- theirstdoffset =
- -sp->ttis[j].tt_gmtoff;
- break;
- }
- }
- theirdstoffset = 0;
- for (i = 0; i < sp->timecnt; ++i) {
- j = sp->types[i];
- if (sp->ttis[j].tt_isdst) {
- theirdstoffset =
- -sp->ttis[j].tt_gmtoff;
- break;
- }
- }
- /*
- ** Initially we're assumed to be in standard time.
- */
- isdst = FALSE;
- theiroffset = theirstdoffset;
- /*
- ** Now juggle transition times and types
- ** tracking offsets as you do.
- */
- for (i = 0; i < sp->timecnt; ++i) {
- j = sp->types[i];
- sp->types[i] = sp->ttis[j].tt_isdst;
- if (sp->ttis[j].tt_ttisgmt) {
- /* No adjustment to transition time */
- } else {
- /*
- ** If summer time is in effect, and the
- ** transition time was not specified as
- ** standard time, add the summer time
- ** offset to the transition time;
- ** otherwise, add the standard time
- ** offset to the transition time.
- */
- /*
- ** Transitions from DST to DDST
- ** will effectively disappear since
- ** POSIX provides for only one DST
- ** offset.
- */
- if (isdst && !sp->ttis[j].tt_ttisstd) {
- sp->ats[i] += dstoffset -
- theirdstoffset;
- } else {
- sp->ats[i] += stdoffset -
- theirstdoffset;
- }
- }
- theiroffset = -sp->ttis[j].tt_gmtoff;
- if (sp->ttis[j].tt_isdst)
- theirdstoffset = theiroffset;
- else theirstdoffset = theiroffset;
- }
- /*
- ** Finally, fill in ttis.
- ** ttisstd and ttisgmt need not be handled.
- */
- sp->ttis[0].tt_gmtoff = -stdoffset;
- sp->ttis[0].tt_isdst = FALSE;
- sp->ttis[0].tt_abbrind = 0;
- sp->ttis[1].tt_gmtoff = -dstoffset;
- sp->ttis[1].tt_isdst = TRUE;
- sp->ttis[1].tt_abbrind = stdlen + 1;
- }
- } else {
- dstlen = 0;
- sp->typecnt = 1; /* only standard time */
- sp->timecnt = 0;
- sp->ttis[0].tt_gmtoff = -stdoffset;
- sp->ttis[0].tt_isdst = 0;
- sp->ttis[0].tt_abbrind = 0;
- }
- sp->charcnt = stdlen + 1;
- if (dstlen != 0)
- sp->charcnt += dstlen + 1;
- if (sp->charcnt > sizeof sp->chars)
- return -1;
- cp = sp->chars;
- (void) strncpy(cp, stdname, stdlen);
- cp += stdlen;
- *cp++ = '\0';
- if (dstlen != 0) {
- (void) strncpy(cp, dstname, dstlen);
- *(cp + dstlen) = '\0';
- }
- return 0;
-}
-
-static void
-gmtload(sp)
-struct state * const sp;
-{
- if (tzload(gmt, sp) != 0)
- (void) tzparse(gmt, sp, TRUE);
-}
-
-#ifndef STD_INSPIRED
-/*
-** A non-static declaration of tzsetwall in a system header file
-** may cause a warning about this upcoming static declaration...
-*/
-static
-#endif /* !defined STD_INSPIRED */
-#ifdef _THREAD_SAFE
-void
-tzsetwall_basic P((void))
-#else
-void
-tzsetwall P((void))
-#endif
-{
- if (lcl_is_set < 0)
- return;
- lcl_is_set = -1;
-
-#ifdef ALL_STATE
- if (lclptr == NULL) {
- lclptr = (struct state *) malloc(sizeof *lclptr);
- if (lclptr == NULL) {
- settzname(); /* all we can do */
- return;
- }
- }
-#endif /* defined ALL_STATE */
- if (tzload((char *) NULL, lclptr) != 0)
- gmtload(lclptr);
- settzname();
-}
-
-#ifdef _THREAD_SAFE
-void
-tzsetwall P((void))
-{
- pthread_mutex_lock(&lcl_mutex);
- tzsetwall_basic();
- pthread_mutex_unlock(&lcl_mutex);
-}
-#endif
-
-#ifdef _THREAD_SAFE
-static void
-tzset_basic P((void))
-#else
-void
-tzset P((void))
-#endif
-{
- register const char * name;
-
- name = getenv("TZ");
- if (name == NULL) {
- tzsetwall();
- return;
- }
-
- if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0)
- return;
- lcl_is_set = (strlen(name) < sizeof(lcl_TZname));
- if (lcl_is_set)
- (void) strcpy(lcl_TZname, name);
-
-#ifdef ALL_STATE
- if (lclptr == NULL) {
- lclptr = (struct state *) malloc(sizeof *lclptr);
- if (lclptr == NULL) {
- settzname(); /* all we can do */
- return;
- }
- }
-#endif /* defined ALL_STATE */
- if (*name == '\0') {
- /*
- ** User wants it fast rather than right.
- */
- lclptr->leapcnt = 0; /* so, we're off a little */
- lclptr->timecnt = 0;
- lclptr->ttis[0].tt_gmtoff = 0;
- lclptr->ttis[0].tt_abbrind = 0;
- (void) strcpy(lclptr->chars, gmt);
- } else if (tzload(name, lclptr) != 0)
- if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0)
- (void) gmtload(lclptr);
- settzname();
-}
-
-#ifdef _THREAD_SAFE
-void
-tzset P((void))
-{
- pthread_mutex_lock(&lcl_mutex);
- tzset_basic();
- pthread_mutex_unlock(&lcl_mutex);
-}
-#endif
-
-/*
-** The easy way to behave "as if no library function calls" localtime
-** is to not call it--so we drop its guts into "localsub", which can be
-** freely called. (And no, the PANS doesn't require the above behavior--
-** but it *is* desirable.)
-**
-** The unused offset argument is for the benefit of mktime variants.
-*/
-
-/*ARGSUSED*/
-static void
-localsub(timep, offset, tmp)
-const time_t * const timep;
-const long offset;
-struct tm * const tmp;
-{
- register struct state * sp;
- register const struct ttinfo * ttisp;
- register int i;
- const time_t t = *timep;
-
- sp = lclptr;
-#ifdef ALL_STATE
- if (sp == NULL) {
- gmtsub(timep, offset, tmp);
- return;
- }
-#endif /* defined ALL_STATE */
- if (sp->timecnt == 0 || t < sp->ats[0]) {
- i = 0;
- while (sp->ttis[i].tt_isdst)
- if (++i >= sp->typecnt) {
- i = 0;
- break;
- }
- } else {
- for (i = 1; i < sp->timecnt; ++i)
- if (t < sp->ats[i])
- break;
- i = sp->types[i - 1];
- }
- ttisp = &sp->ttis[i];
- /*
- ** To get (wrong) behavior that's compatible with System V Release 2.0
- ** you'd replace the statement below with
- ** t += ttisp->tt_gmtoff;
- ** timesub(&t, 0L, sp, tmp);
- */
- timesub(&t, ttisp->tt_gmtoff, sp, tmp);
- tmp->tm_isdst = ttisp->tt_isdst;
- tzname[tmp->tm_isdst] = &sp->chars[ttisp->tt_abbrind];
-#ifdef TM_ZONE
- tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind];
-#endif /* defined TM_ZONE */
-}
-
-#ifdef _THREAD_SAFE
-struct tm *
-localtime_r(timep, p_tm)
-const time_t * const timep;
-struct tm *p_tm;
-{
- pthread_mutex_lock(&lcl_mutex);
- tzset();
- localsub(timep, 0L, p_tm);
- pthread_mutex_unlock(&lcl_mutex);
- return(p_tm);
-}
-#endif
-
-struct tm *
-localtime(timep)
-const time_t * const timep;
-{
-#ifdef _THREAD_SAFE
- static struct pthread_mutex _localtime_mutex = PTHREAD_MUTEX_INITIALIZER;
- static pthread_mutex_t localtime_mutex = &_localtime_mutex;
- static pthread_key_t localtime_key = -1;
- struct tm *p_tm;
-
- pthread_mutex_lock(&localtime_mutex);
- if (localtime_key < 0) {
- if (pthread_key_create(&localtime_key, free) < 0) {
- pthread_mutex_unlock(&localtime_mutex);
- return(NULL);
- }
- }
- pthread_mutex_unlock(&localtime_mutex);
- p_tm = pthread_getspecific(localtime_key);
- if (p_tm == NULL) {
- if ((p_tm = (struct tm *)malloc(sizeof(struct tm))) == NULL)
- return(NULL);
- pthread_setspecific(localtime_key, p_tm);
- }
- pthread_mutex_lock(&lcl_mutex);
- tzset();
- localsub(timep, 0L, p_tm);
- pthread_mutex_unlock(&lcl_mutex);
- return p_tm;
-#else
- tzset();
- localsub(timep, 0L, &tm);
- return &tm;
-#endif
-}
-
-/*
-** gmtsub is to gmtime as localsub is to localtime.
-*/
-
-static void
-gmtsub(timep, offset, tmp)
-const time_t * const timep;
-const long offset;
-struct tm * const tmp;
-{
-#ifdef _THREAD_SAFE
- pthread_mutex_lock(&gmt_mutex);
-#endif
- if (!gmt_is_set) {
- gmt_is_set = TRUE;
-#ifdef ALL_STATE
- gmtptr = (struct state *) malloc(sizeof *gmtptr);
- if (gmtptr != NULL)
-#endif /* defined ALL_STATE */
- gmtload(gmtptr);
- }
-#ifdef _THREAD_SAFE
- pthread_mutex_unlock(&gmt_mutex);
-#endif
- timesub(timep, offset, gmtptr, tmp);
-#ifdef TM_ZONE
- /*
- ** Could get fancy here and deliver something such as
- ** "GMT+xxxx" or "GMT-xxxx" if offset is non-zero,
- ** but this is no time for a treasure hunt.
- */
- if (offset != 0)
- tmp->TM_ZONE = wildabbr;
- else {
-#ifdef ALL_STATE
- if (gmtptr == NULL)
- tmp->TM_ZONE = gmt;
- else tmp->TM_ZONE = gmtptr->chars;
-#endif /* defined ALL_STATE */
-#ifndef ALL_STATE
- tmp->TM_ZONE = gmtptr->chars;
-#endif /* State Farm */
- }
-#endif /* defined TM_ZONE */
-}
-
-struct tm *
-gmtime(timep)
-const time_t * const timep;
-{
-#ifdef _THREAD_SAFE
- static struct pthread_mutex _gmtime_mutex = PTHREAD_MUTEX_INITIALIZER;
- static pthread_mutex_t gmtime_mutex = &_gmtime_mutex;
- static pthread_key_t gmtime_key = -1;
- struct tm *p_tm;
-
- pthread_mutex_lock(&gmtime_mutex);
- if (gmtime_key < 0) {
- if (pthread_key_create(&gmtime_key, free) < 0) {
- pthread_mutex_unlock(&gmtime_mutex);
- return(NULL);
- }
- }
- pthread_mutex_unlock(&gmtime_mutex);
- if ((p_tm = pthread_getspecific(gmtime_key)) != 0) {
- return(NULL);
- } else if (p_tm == NULL) {
- if ((p_tm = (struct tm *)malloc(sizeof(struct tm))) == NULL) {
- return(NULL);
- }
- pthread_setspecific(gmtime_key, p_tm);
- }
- gmtsub(timep, 0L, p_tm);
- return(p_tm);
-#else
- gmtsub(timep, 0L, &tm);
- return &tm;
-#endif
-}
-
-#ifdef _THREAD_SAFE
-struct tm *
-gmtime_r(const time_t * timep, struct tm * tm)
-{
- gmtsub(timep, 0L, tm);
- return(tm);
-}
-#endif
-
-#ifdef STD_INSPIRED
-
-struct tm *
-offtime(timep, offset)
-const time_t * const timep;
-const long offset;
-{
- gmtsub(timep, offset, &tm);
- return &tm;
-}
-
-#endif /* defined STD_INSPIRED */
-
-static void
-timesub(timep, offset, sp, tmp)
-const time_t * const timep;
-const long offset;
-register const struct state * const sp;
-register struct tm * const tmp;
-{
- register const struct lsinfo * lp;
- register long days;
- register long rem;
- register int y;
- register int yleap;
- register const int * ip;
- register long corr;
- register int hit;
- register int i;
-
- corr = 0;
- hit = 0;
-#ifdef ALL_STATE
- i = (sp == NULL) ? 0 : sp->leapcnt;
-#endif /* defined ALL_STATE */
-#ifndef ALL_STATE
- i = sp->leapcnt;
-#endif /* State Farm */
- while (--i >= 0) {
- lp = &sp->lsis[i];
- if (*timep >= lp->ls_trans) {
- if (*timep == lp->ls_trans) {
- hit = ((i == 0 && lp->ls_corr > 0) ||
- lp->ls_corr > sp->lsis[i - 1].ls_corr);
- if (hit)
- while (i > 0 &&
- sp->lsis[i].ls_trans ==
- sp->lsis[i - 1].ls_trans + 1 &&
- sp->lsis[i].ls_corr ==
- sp->lsis[i - 1].ls_corr + 1) {
- ++hit;
- --i;
- }
- }
- corr = lp->ls_corr;
- break;
- }
- }
- days = *timep / SECSPERDAY;
- rem = *timep % SECSPERDAY;
-#ifdef mc68k
- if (*timep == 0x80000000) {
- /*
- ** A 3B1 muffs the division on the most negative number.
- */
- days = -24855;
- rem = -11648;
- }
-#endif /* defined mc68k */
- rem += (offset - corr);
- while (rem < 0) {
- rem += SECSPERDAY;
- --days;
- }
- while (rem >= SECSPERDAY) {
- rem -= SECSPERDAY;
- ++days;
- }
- tmp->tm_hour = (int) (rem / SECSPERHOUR);
- rem = rem % SECSPERHOUR;
- tmp->tm_min = (int) (rem / SECSPERMIN);
- /*
- ** A positive leap second requires a special
- ** representation. This uses "... ??:59:60" et seq.
- */
- tmp->tm_sec = (int) (rem % SECSPERMIN) + hit;
- tmp->tm_wday = (int) ((EPOCH_WDAY + days) % DAYSPERWEEK);
- if (tmp->tm_wday < 0)
- tmp->tm_wday += DAYSPERWEEK;
- y = EPOCH_YEAR;
-#define LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400)
- while (days < 0 || days >= (long) year_lengths[yleap = isleap(y)]) {
- register int newy;
-
- newy = y + days / DAYSPERNYEAR;
- if (days < 0)
- --newy;
- days -= (newy - y) * DAYSPERNYEAR +
- LEAPS_THRU_END_OF(newy - 1) -
- LEAPS_THRU_END_OF(y - 1);
- y = newy;
- }
- tmp->tm_year = y - TM_YEAR_BASE;
- tmp->tm_yday = (int) days;
- ip = mon_lengths[yleap];
- for (tmp->tm_mon = 0; days >= (long) ip[tmp->tm_mon]; ++(tmp->tm_mon))
- days = days - (long) ip[tmp->tm_mon];
- tmp->tm_mday = (int) (days + 1);
- tmp->tm_isdst = 0;
-#ifdef TM_GMTOFF
- tmp->TM_GMTOFF = offset;
-#endif /* defined TM_GMTOFF */
-}
-
-char *
-ctime(timep)
-const time_t * const timep;
-{
-/*
-** Section 4.12.3.2 of X3.159-1989 requires that
-** The ctime funciton converts the calendar time pointed to by timer
-** to local time in the form of a string. It is equivalent to
-** asctime(localtime(timer))
-*/
- return asctime(localtime(timep));
-}
-
-/*
-** Adapted from code provided by Robert Elz, who writes:
-** The "best" way to do mktime I think is based on an idea of Bob
-** Kridle's (so its said...) from a long time ago.
-** [kridle@xinet.com as of 1996-01-16.]
-** It does a binary search of the time_t space. Since time_t's are
-** just 32 bits, its a max of 32 iterations (even at 64 bits it
-** would still be very reasonable).
-*/
-
-#ifndef WRONG
-#define WRONG (-1)
-#endif /* !defined WRONG */
-
-/*
-** Simplified normalize logic courtesy Paul Eggert (eggert@twinsun.com).
-*/
-
-static int
-increment_overflow(number, delta)
-int * number;
-int delta;
-{
- int number0;
-
- number0 = *number;
- *number += delta;
- return (*number < number0) != (delta < 0);
-}
-
-static int
-normalize_overflow(tensptr, unitsptr, base)
-int * const tensptr;
-int * const unitsptr;
-const int base;
-{
- register int tensdelta;
-
- tensdelta = (*unitsptr >= 0) ?
- (*unitsptr / base) :
- (-1 - (-1 - *unitsptr) / base);
- *unitsptr -= tensdelta * base;
- return increment_overflow(tensptr, tensdelta);
-}
-
-static int
-tmcomp(atmp, btmp)
-register const struct tm * const atmp;
-register const struct tm * const btmp;
-{
- register int result;
-
- if ((result = (atmp->tm_year - btmp->tm_year)) == 0 &&
- (result = (atmp->tm_mon - btmp->tm_mon)) == 0 &&
- (result = (atmp->tm_mday - btmp->tm_mday)) == 0 &&
- (result = (atmp->tm_hour - btmp->tm_hour)) == 0 &&
- (result = (atmp->tm_min - btmp->tm_min)) == 0)
- result = atmp->tm_sec - btmp->tm_sec;
- return result;
-}
-
-static time_t
-time2(tmp, funcp, offset, okayp)
-struct tm * const tmp;
-void (* const funcp) P((const time_t*, long, struct tm*));
-const long offset;
-int * const okayp;
-{
- register const struct state * sp;
- register int dir;
- register int bits;
- register int i, j ;
- register int saved_seconds;
- time_t newt;
- time_t t;
- struct tm yourtm, mytm;
-
- *okayp = FALSE;
- yourtm = *tmp;
- if (normalize_overflow(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR))
- return WRONG;
- if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY))
- return WRONG;
- if (normalize_overflow(&yourtm.tm_year, &yourtm.tm_mon, MONSPERYEAR))
- return WRONG;
- /*
- ** Turn yourtm.tm_year into an actual year number for now.
- ** It is converted back to an offset from TM_YEAR_BASE later.
- */
- if (increment_overflow(&yourtm.tm_year, TM_YEAR_BASE))
- return WRONG;
- while (yourtm.tm_mday <= 0) {
- if (increment_overflow(&yourtm.tm_year, -1))
- return WRONG;
- i = yourtm.tm_year + (1 < yourtm.tm_mon);
- yourtm.tm_mday += year_lengths[isleap(i)];
- }
- while (yourtm.tm_mday > DAYSPERLYEAR) {
- i = yourtm.tm_year + (1 < yourtm.tm_mon);
- yourtm.tm_mday -= year_lengths[isleap(i)];
- if (increment_overflow(&yourtm.tm_year, 1))
- return WRONG;
- }
- for ( ; ; ) {
- i = mon_lengths[isleap(yourtm.tm_year)][yourtm.tm_mon];
- if (yourtm.tm_mday <= i)
- break;
- yourtm.tm_mday -= i;
- if (++yourtm.tm_mon >= MONSPERYEAR) {
- yourtm.tm_mon = 0;
- if (increment_overflow(&yourtm.tm_year, 1))
- return WRONG;
- }
- }
- if (increment_overflow(&yourtm.tm_year, -TM_YEAR_BASE))
- return WRONG;
- if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) {
- /*
- ** We can't set tm_sec to 0, because that might push the
- ** time below the minimum representable time.
- ** Set tm_sec to 59 instead.
- ** This assumes that the minimum representable time is
- ** not in the same minute that a leap second was deleted from,
- ** which is a safer assumption than using 58 would be.
- */
- if (increment_overflow(&yourtm.tm_sec, 1 - SECSPERMIN))
- return WRONG;
- saved_seconds = yourtm.tm_sec;
- yourtm.tm_sec = SECSPERMIN - 1;
- } else {
- saved_seconds = yourtm.tm_sec;
- yourtm.tm_sec = 0;
- }
- /*
- ** Divide the search space in half
- ** (this works whether time_t is signed or unsigned).
- */
- bits = TYPE_BIT(time_t) - 1;
- /*
- ** If time_t is signed, then 0 is just above the median,
- ** assuming two's complement arithmetic.
- ** If time_t is unsigned, then (1 << bits) is just above the median.
- */
- t = TYPE_SIGNED(time_t) ? 0 : (((time_t) 1) << bits);
- for ( ; ; ) {
- (*funcp)(&t, offset, &mytm);
- dir = tmcomp(&mytm, &yourtm);
- if (dir != 0) {
- if (bits-- < 0)
- return WRONG;
- if (bits < 0)
- --t; /* may be needed if new t is minimal */
- else if (dir > 0)
- t -= ((time_t) 1) << bits;
- else t += ((time_t) 1) << bits;
- continue;
- }
- if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst)
- break;
- /*
- ** Right time, wrong type.
- ** Hunt for right time, right type.
- ** It's okay to guess wrong since the guess
- ** gets checked.
- */
- /*
- ** The (void *) casts are the benefit of SunOS 3.3 on Sun 2's.
- */
- sp = (const struct state *)
- (((void *) funcp == (void *) localsub) ?
- lclptr : gmtptr);
-#ifdef ALL_STATE
- if (sp == NULL)
- return WRONG;
-#endif /* defined ALL_STATE */
- for (i = sp->typecnt - 1; i >= 0; --i) {
- if (sp->ttis[i].tt_isdst != yourtm.tm_isdst)
- continue;
- for (j = sp->typecnt - 1; j >= 0; --j) {
- if (sp->ttis[j].tt_isdst == yourtm.tm_isdst)
- continue;
- newt = t + sp->ttis[j].tt_gmtoff -
- sp->ttis[i].tt_gmtoff;
- (*funcp)(&newt, offset, &mytm);
- if (tmcomp(&mytm, &yourtm) != 0)
- continue;
- if (mytm.tm_isdst != yourtm.tm_isdst)
- continue;
- /*
- ** We have a match.
- */
- t = newt;
- goto label;
- }
- }
- return WRONG;
- }
-label:
- newt = t + saved_seconds;
- if ((newt < t) != (saved_seconds < 0))
- return WRONG;
- t = newt;
- (*funcp)(&t, offset, tmp);
- *okayp = TRUE;
- return t;
-}
-
-static time_t
-time1(tmp, funcp, offset)
-struct tm * const tmp;
-void (* const funcp) P((const time_t *, long, struct tm *));
-const long offset;
-{
- register time_t t;
- register const struct state * sp;
- register int samei, otheri;
- int okay;
-
- if (tmp->tm_isdst > 1)
- tmp->tm_isdst = 1;
- t = time2(tmp, funcp, offset, &okay);
-#ifdef PCTS
- /*
- ** PCTS code courtesy Grant Sullivan (grant@osf.org).
- */
- if (okay)
- return t;
- if (tmp->tm_isdst < 0)
- tmp->tm_isdst = 0; /* reset to std and try again */
-#endif /* defined PCTS */
-#ifndef PCTS
- if (okay || tmp->tm_isdst < 0)
- return t;
-#endif /* !defined PCTS */
- /*
- ** We're supposed to assume that somebody took a time of one type
- ** and did some math on it that yielded a "struct tm" that's bad.
- ** We try to divine the type they started from and adjust to the
- ** type they need.
- */
- /*
- ** The (void *) casts are the benefit of SunOS 3.3 on Sun 2's.
- */
- sp = (const struct state *) (((void *) funcp == (void *) localsub) ?
- lclptr : gmtptr);
-#ifdef ALL_STATE
- if (sp == NULL)
- return WRONG;
-#endif /* defined ALL_STATE */
- for (samei = sp->typecnt - 1; samei >= 0; --samei) {
- if (sp->ttis[samei].tt_isdst != tmp->tm_isdst)
- continue;
- for (otheri = sp->typecnt - 1; otheri >= 0; --otheri) {
- if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst)
- continue;
- tmp->tm_sec += sp->ttis[otheri].tt_gmtoff -
- sp->ttis[samei].tt_gmtoff;
- tmp->tm_isdst = !tmp->tm_isdst;
- t = time2(tmp, funcp, offset, &okay);
- if (okay)
- return t;
- tmp->tm_sec -= sp->ttis[otheri].tt_gmtoff -
- sp->ttis[samei].tt_gmtoff;
- tmp->tm_isdst = !tmp->tm_isdst;
- }
- }
- return WRONG;
-}
-
-time_t
-mktime(tmp)
-struct tm * const tmp;
-{
- time_t mktime_return_value;
-#ifdef _THREAD_SAFE
- pthread_mutex_lock(&lcl_mutex);
-#endif
- tzset();
- mktime_return_value = time1(tmp, localsub, 0L);
-#ifdef _THREAD_SAFE
- pthread_mutex_unlock(&lcl_mutex);
-#endif
- return(mktime_return_value);
-}
-
-#ifdef STD_INSPIRED
-
-time_t
-timelocal(tmp)
-struct tm * const tmp;
-{
- tmp->tm_isdst = -1; /* in case it wasn't initialized */
- return mktime(tmp);
-}
-
-time_t
-timegm(tmp)
-struct tm * const tmp;
-{
- tmp->tm_isdst = 0;
- return time1(tmp, gmtsub, 0L);
-}
-
-time_t
-timeoff(tmp, offset)
-struct tm * const tmp;
-const long offset;
-{
- tmp->tm_isdst = 0;
- return time1(tmp, gmtsub, offset);
-}
-
-#endif /* defined STD_INSPIRED */
-
-#ifdef CMUCS
-
-/*
-** The following is supplied for compatibility with
-** previous versions of the CMUCS runtime library.
-*/
-
-long
-gtime(tmp)
-struct tm * const tmp;
-{
- const time_t t = mktime(tmp);
-
- if (t == WRONG)
- return -1;
- return t;
-}
-
-#endif /* defined CMUCS */
-
-/*
-** XXX--is the below the right way to conditionalize??
-*/
-
-#ifdef STD_INSPIRED
-
-/*
-** IEEE Std 1003.1-1988 (POSIX) legislates that 536457599
-** shall correspond to "Wed Dec 31 23:59:59 GMT 1986", which
-** is not the case if we are accounting for leap seconds.
-** So, we provide the following conversion routines for use
-** when exchanging timestamps with POSIX conforming systems.
-*/
-
-static long
-leapcorr(timep)
-time_t * timep;
-{
- register struct state * sp;
- register struct lsinfo * lp;
- register int i;
-
- sp = lclptr;
- i = sp->leapcnt;
- while (--i >= 0) {
- lp = &sp->lsis[i];
- if (*timep >= lp->ls_trans)
- return lp->ls_corr;
- }
- return 0;
-}
-
-time_t
-time2posix(t)
-time_t t;
-{
- tzset();
- return t - leapcorr(&t);
-}
-
-time_t
-posix2time(t)
-time_t t;
-{
- time_t x;
- time_t y;
-
- tzset();
- /*
- ** For a positive leap second hit, the result
- ** is not unique. For a negative leap second
- ** hit, the corresponding time doesn't exist,
- ** so we return an adjacent second.
- */
- x = t + leapcorr(&t);
- y = x - leapcorr(&x);
- if (y < t) {
- do {
- x++;
- y = x - leapcorr(&x);
- } while (y < t);
- if (t != y)
- return x - 1;
- } else if (y > t) {
- do {
- --x;
- y = x - leapcorr(&x);
- } while (y > t);
- if (t != y)
- return x + 1;
- }
- return x;
-}
-
-#endif /* defined STD_INSPIRED */
diff --git a/lib/libc/stdtime/private.h b/lib/libc/stdtime/private.h
deleted file mode 100644
index d8fa906..0000000
--- a/lib/libc/stdtime/private.h
+++ /dev/null
@@ -1,218 +0,0 @@
-#ifndef PRIVATE_H
-
-#define PRIVATE_H
-/*
-** This file is in the public domain, so clarified as of
-** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
-*/
-
-/* Stuff moved from Makefile.inc to reduce clutter */
-#ifndef TM_GMTOFF
-#define TM_GMTOFF tm_gmtoff
-#define TM_ZONE tm_zone
-#define STD_INSPIRED 1
-#define PCTS 1
-#define HAVE_LONG_DOUBLE 1
-#define HAVE_STRERROR 1
-#define HAVE_UNISTD_H 1
-#define LOCALE_HOME _PATH_LOCALE
-#define TZDIR "/usr/share/zoneinfo"
-#endif /* ndef TM_GMTOFF */
-
-/*
-** This header is for use ONLY with the time conversion code.
-** There is no guarantee that it will remain unchanged,
-** or that it will remain at all.
-** Do NOT copy it to any system include directory.
-** Thank you!
-*/
-
-/*
-** ID
-*/
-
-#ifndef lint
-#ifndef NOID
-/*
-static char privatehid[] = "@(#)private.h 7.43";
-*/
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-/*
-** Defaults for preprocessor symbols.
-** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'.
-*/
-
-#ifndef HAVE_ADJTIME
-#define HAVE_ADJTIME 1
-#endif /* !defined HAVE_ADJTIME */
-
-#ifndef HAVE_GETTEXT
-#define HAVE_GETTEXT 0
-#endif /* !defined HAVE_GETTEXT */
-
-#ifndef HAVE_SETTIMEOFDAY
-#define HAVE_SETTIMEOFDAY 3
-#endif /* !defined HAVE_SETTIMEOFDAY */
-
-#ifndef HAVE_STRERROR
-#define HAVE_STRERROR 0
-#endif /* !defined HAVE_STRERROR */
-
-#ifndef HAVE_UNISTD_H
-#define HAVE_UNISTD_H 1
-#endif /* !defined HAVE_UNISTD_H */
-
-#ifndef HAVE_UTMPX_H
-#define HAVE_UTMPX_H 0
-#endif /* !defined HAVE_UTMPX_H */
-
-#ifndef LOCALE_HOME
-#define LOCALE_HOME "/usr/lib/locale"
-#endif /* !defined LOCALE_HOME */
-
-/*
-** Nested includes
-*/
-
-#include "sys/types.h" /* for time_t */
-#include "stdio.h"
-#include "errno.h"
-#include "string.h"
-#include "limits.h" /* for CHAR_BIT */
-#include "time.h"
-#include "stdlib.h"
-
-#if HAVE_GETTEXT - 0
-#include "libintl.h"
-#endif /* HAVE_GETTEXT - 0 */
-
-#if HAVE_UNISTD_H - 0
-#include "unistd.h" /* for F_OK and R_OK */
-#endif /* HAVE_UNISTD_H - 0 */
-
-#if !(HAVE_UNISTD_H - 0)
-#ifndef F_OK
-#define F_OK 0
-#endif /* !defined F_OK */
-#ifndef R_OK
-#define R_OK 4
-#endif /* !defined R_OK */
-#endif /* !(HAVE_UNISTD_H - 0) */
-
-/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
-#define is_digit(c) ((unsigned)(c) - '0' <= 9)
-
-/*
-** Workarounds for compilers/systems.
-*/
-
-#ifndef P
-#ifdef __STDC__
-#define P(x) x
-#endif /* defined __STDC__ */
-#ifndef __STDC__
-#define P(x) ()
-#endif /* !defined __STDC__ */
-#endif /* !defined P */
-
-/*
-** SunOS 4.1.1 headers lack FILENAME_MAX.
-*/
-
-#ifndef FILENAME_MAX
-
-#ifndef MAXPATHLEN
-#ifdef unix
-#include "sys/param.h"
-#endif /* defined unix */
-#endif /* !defined MAXPATHLEN */
-
-#ifdef MAXPATHLEN
-#define FILENAME_MAX MAXPATHLEN
-#endif /* defined MAXPATHLEN */
-#ifndef MAXPATHLEN
-#define FILENAME_MAX 1024 /* Pure guesswork */
-#endif /* !defined MAXPATHLEN */
-
-#endif /* !defined FILENAME_MAX */
-
-/*
-** Finally, some convenience items.
-*/
-
-#ifndef TRUE
-#define TRUE 1
-#endif /* !defined TRUE */
-
-#ifndef FALSE
-#define FALSE 0
-#endif /* !defined FALSE */
-
-#ifndef TYPE_BIT
-#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT)
-#endif /* !defined TYPE_BIT */
-
-#ifndef TYPE_SIGNED
-#define TYPE_SIGNED(type) (((type) -1) < 0)
-#endif /* !defined TYPE_SIGNED */
-
-#ifndef INT_STRLEN_MAXIMUM
-/*
-** 302 / 1000 is log10(2.0) rounded up.
-** Subtract one for the sign bit if the type is signed;
-** add one for integer division truncation;
-** add one more for a minus sign if the type is signed.
-*/
-#define INT_STRLEN_MAXIMUM(type) \
- ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 100 + 1 + TYPE_SIGNED(type))
-#endif /* !defined INT_STRLEN_MAXIMUM */
-
-/*
-** INITIALIZE(x)
-*/
-
-#ifndef GNUC_or_lint
-#ifdef lint
-#define GNUC_or_lint
-#endif /* defined lint */
-#ifndef lint
-#ifdef __GNUC__
-#define GNUC_or_lint
-#endif /* defined __GNUC__ */
-#endif /* !defined lint */
-#endif /* !defined GNUC_or_lint */
-
-#ifndef INITIALIZE
-#ifdef GNUC_or_lint
-#define INITIALIZE(x) ((x) = 0)
-#endif /* defined GNUC_or_lint */
-#ifndef GNUC_or_lint
-#define INITIALIZE(x)
-#endif /* !defined GNUC_or_lint */
-#endif /* !defined INITIALIZE */
-
-/*
-** For the benefit of GNU folk...
-** `_(MSGID)' uses the current locale's message library string for MSGID.
-** The default is to use gettext if available, and use MSGID otherwise.
-*/
-
-#ifndef _
-#if HAVE_GETTEXT - 0
-#define _(msgid) gettext(msgid)
-#else /* !(HAVE_GETTEXT - 0) */
-#define _(msgid) msgid
-#endif /* !(HAVE_GETTEXT - 0) */
-#endif /* !defined _ */
-
-#ifndef TZ_DOMAIN
-#define TZ_DOMAIN "tz"
-#endif /* !defined TZ_DOMAIN */
-
-/*
-** UNIX was a registered trademark of UNIX System Laboratories in 1993.
-*/
-
-#endif /* !defined PRIVATE_H */
diff --git a/lib/libc/stdtime/strftime.3 b/lib/libc/stdtime/strftime.3
deleted file mode 100644
index 55b8ffd..0000000
--- a/lib/libc/stdtime/strftime.3
+++ /dev/null
@@ -1,247 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strftime.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd October 4, 1997
-.Dt STRFTIME 3
-.Os
-.Sh NAME
-.Nm strftime
-.Nd format date and time
-.Sh SYNOPSIS
-.Fd #include <time.h>
-.Ft size_t
-.Fn strftime "char *buf" "size_t maxsize" "const char *format" "const struct tm *timeptr"
-.Sh DESCRIPTION
-The
-.Fn strftime
-function formats the information from
-.Fa timeptr
-into the buffer
-.Fa buf
-according to the string pointed to by
-.Fa format .
-.Pp
-The
-.Fa format
-string consists of zero or more conversion specifications and
-ordinary characters.
-All ordinary characters are copied directly into the buffer.
-A conversion specification consists of a percent sign
-.Dq Ql %
-and one other character.
-.Pp
-No more than
-.Fa maxsize
-characters will be placed into the array.
-If the total number of resulting characters, including the terminating
-null character, is not more than
-.Fa maxsize ,
-.Fn strftime
-returns the number of characters in the array, not counting the
-terminating null.
-Otherwise, zero is returned and the buffer contents is indeterminate.
-.Pp
-Each conversion specification is replaced by the characters as
-follows which are then copied into the buffer.
-.Bl -tag -width "xxxx"
-.It Cm \&%A
-is replaced by national representation of the full weekday name.
-.It Cm %a
-is replaced by national representation of
-the abbreviated weekday name, where the abbreviation
-is the first three characters.
-.It Cm \&%B
-is replaced by national representation of the full month name.
-.It Cm %b
-is replaced by national representation of
-the abbreviated month name, where the abbreviation is
-the first three characters.
-.It Cm \&%C
-is replaced by (year / 100) as decimal number; single
-digits are preceded by a zero.
-.It Cm %c
-is replaced by national representation of time and date
-(the format is similar with produced by
-.Xr asctime 3 ) .
-.It Cm \&%D
-is equivalent to
-.Dq Li %m/%d/%y .
-.It Cm %d
-is replaced by the day of the month as a decimal number (01-31).
-.It Cm \&%E*
-POSIX locale extensions.
-The sequences
-%Ec %EC %Ex %Ey %EY
-%Od %Oe %OH %OI %Om %OM
-%OS %Ou %OU %OV %Ow %OW %Oy
-are supposed to provide alternate
-representations.
-.It Cm %e
-is replaced by the day of month as a decimal number (1-31); single
-digits are preceded by a blank.
-.It Cm \&%G
-is replaced by a year as a decimal number with century.
-This year is the one that contains the greater part of
-the week (Monday as the first day of the week).
-.It Cm %g
-is replaced by the same year as in
-.Dq Li %G ,
-but as a decimal number without century (00-99).
-.It Cm \&%H
-is replaced by the hour (24-hour clock) as a decimal number (00-23).
-.It Cm %h
-the same as %b.
-.It Cm \&%I
-is replaced by the hour (12-hour clock) as a decimal number (01-12).
-.It Cm %j
-is replaced by the day of the year as a decimal number (001-366).
-.It Cm %k
-is replaced by the hour (24-hour clock) as a decimal number (0-23);
-single digits are preceded by a blank.
-.It Cm %l
-is replaced by the hour (12-hour clock) as a decimal number (1-12);
-single digits are preceded by a blank.
-.It Cm \&%M
-is replaced by the minute as a decimal number (00-59).
-.It Cm %m
-is replaced by the month as a decimal number (01-12).
-.It Cm %n
-is replaced by a newline.
-.It Cm \&%O*
-the same as %E*.
-.It Cm %p
-is replaced by national representation of either
-"ante meridiem"
-or
-"post meridiem"
-as appropriate.
-.It Cm \&%R
-is equivalent to
-.Dq Li %H:%M .
-.It Cm %r
-is equivalent to
-.Dq Li %I:%M:%S %p .
-.It Cm \&%S
-is replaced by the second as a decimal number (00-60).
-.It Cm %s
-is replaced by the number of seconds since the Epoch, UTC (see
-.Xr mktime 3 ) .
-.It Cm \&%T
-is equivalent to
-.Dq Li %H:%M:%S .
-.It Cm %t
-is replaced by a tab.
-.It Cm \&%U
-is replaced by the week number of the year (Sunday as the first day of
-the week) as a decimal number (00-53).
-.It Cm %u
-is replaced by the weekday (Monday as the first day of the week)
-as a decimal number (1-7).
-.It Cm \&%V
-is replaced by the week number of the year (Monday as the first day of
-the week) as a decimal number (01-53). If the week containing January
-1 has four or more days in the new year, then it is week 1; otherwise
-it is the last week of the previous year, and the next week is week 1.
-.It Cm %v
-is equivalent to
-.Dq Li %e-%b-%Y .
-.It Cm \&%W
-is replaced by the week number of the year (Monday as the first day of
-the week) as a decimal number (00-53).
-.It Cm %w
-is replaced by the weekday (Sunday as the first day of the week)
-as a decimal number (0-6).
-.It Cm \&%X
-is replaced by national representation of the time.
-.It Cm %x
-is replaced by national representation of the date.
-.It Cm \&%Y
-is replaced by the year with century as a decimal number.
-.It Cm %y
-is replaced by the year without century as a decimal number (00-99).
-.It Cm \&%Z
-is replaced by the time zone name.
-.It Cm %+
-is replaced by national representation of the date and time
-(the format is similar with produced by
-.Xr date 1 ) .
-.It Cm %%
-is replaced by
-.Ql % .
-.El
-.Sh SEE ALSO
-.Xr date 1 ,
-.Xr printf 1 ,
-.Xr ctime 3 ,
-.Xr printf 3 ,
-.Xr strptime 3
-.Sh STANDARDS
-The
-.Fn strftime
-function
-conforms to
-.St -ansiC
-with a lot of extensions including
-.Ql %C ,
-.Ql %D ,
-.Ql %E* ,
-.Ql %e ,
-.Ql %G ,
-.Ql %g ,
-.Ql %h ,
-.Ql %k ,
-.Ql %l ,
-.Ql %n ,
-.Ql %O* ,
-.Ql \&%R ,
-.Ql %r ,
-.Ql %s ,
-.Ql \&%T ,
-.Ql %t ,
-.Ql %u ,
-.Ql \&%V ,
-.Ql %+ .
-
-The peculiar week number and year in the replacements of
-.Ql %G ,
-.Ql %g
-and
-.Ql \&%V
-are defined in ISO 8601: 1988.
-
-.Sh BUGS
-There is no conversion specification for the phase of the moon.
diff --git a/lib/libc/stdtime/strftime.c b/lib/libc/stdtime/strftime.c
deleted file mode 100644
index 893b784..0000000
--- a/lib/libc/stdtime/strftime.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- * Copyright (c) 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not 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.
- */
-
-#ifdef LIBC_RCS
-static const char rcsid[] =
- "$Id: strftime.c,v 1.18 1997/08/09 15:43:53 joerg Exp $";
-#endif
-
-#ifndef lint
-#ifndef NOID
-static const char elsieid[] = "@(#)strftime.c 7.38";
-/*
-** Based on the UCB version with the ID appearing below.
-** This is ANSIish only when "multibyte character == plain character".
-*/
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-#include "private.h"
-
-#ifndef LIBC_SCCS
-#ifndef lint
-static const char sccsid[] = "@(#)strftime.c 5.4 (Berkeley) 3/14/89";
-#endif /* !defined lint */
-#endif /* !defined LIBC_SCCS */
-
-#include "tzfile.h"
-#include <fcntl.h>
-#include <sys/stat.h>
-#include "timelocal.h"
-
-static char * _add P((const char *, char *, const char *));
-static char * _conv P((int, const char *, char *, const char *));
-static char * _fmt P((const char *, const struct tm *, char *, const char *));
-static char * _secs P((const struct tm *, char *, const char *));
-
-size_t strftime P((char *, size_t, const char *, const struct tm *));
-
-extern char * tzname[];
-
-size_t
-strftime(s, maxsize, format, t)
- char *const s;
- const size_t maxsize;
- const char *const format;
- const struct tm *const t;
-{
- char *p;
-
- tzset();
- p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize);
- if (p == s + maxsize)
- return 0;
- *p = '\0';
- return p - s;
-}
-
-static char *
-_fmt(format, t, pt, ptlim)
- const char *format;
- const struct tm *const t;
- char *pt;
- const char *const ptlim;
-{
- for ( ; *format; ++format) {
- if (*format == '%') {
-label:
- switch (*++format) {
- case '\0':
- --format;
- break;
- case 'A':
- pt = _add((t->tm_wday < 0 || t->tm_wday > 6) ?
- "?" : Locale->weekday[t->tm_wday],
- pt, ptlim);
- continue;
- case 'a':
- pt = _add((t->tm_wday < 0 || t->tm_wday > 6) ?
- "?" : Locale->wday[t->tm_wday],
- pt, ptlim);
- continue;
- case 'B':
- pt = _add((t->tm_mon < 0 || t->tm_mon > 11) ?
- "?" : Locale->month[t->tm_mon],
- pt, ptlim);
- continue;
- case 'b':
- case 'h':
- pt = _add((t->tm_mon < 0 || t->tm_mon > 11) ?
- "?" : Locale->mon[t->tm_mon],
- pt, ptlim);
- continue;
- case 'C':
- /*
- ** %C used to do a...
- ** _fmt("%a %b %e %X %Y", t);
- ** ...whereas now POSIX 1003.2 calls for
- ** something completely different.
- ** (ado, 5/24/93)
- */
- pt = _conv((t->tm_year + TM_YEAR_BASE) / 100,
- "%02d", pt, ptlim);
- continue;
- case 'c':
- pt = _fmt(Locale->c_fmt, t, pt, ptlim);
- continue;
- case 'D':
- pt = _fmt("%m/%d/%y", t, pt, ptlim);
- continue;
- case 'd':
- pt = _conv(t->tm_mday, "%02d", pt, ptlim);
- continue;
- case 'E':
- case 'O':
- /*
- ** POSIX locale extensions, a la
- ** Arnold Robbins' strftime version 3.0.
- ** The sequences
- ** %Ec %EC %Ex %Ey %EY
- ** %Od %oe %OH %OI %Om %OM
- ** %OS %Ou %OU %OV %Ow %OW %Oy
- ** are supposed to provide alternate
- ** representations.
- ** (ado, 5/24/93)
- */
- goto label;
- case 'e':
- pt = _conv(t->tm_mday, "%2d", pt, ptlim);
- continue;
- case 'H':
- pt = _conv(t->tm_hour, "%02d", pt, ptlim);
- continue;
- case 'I':
- pt = _conv((t->tm_hour % 12) ?
- (t->tm_hour % 12) : 12,
- "%02d", pt, ptlim);
- continue;
- case 'j':
- pt = _conv(t->tm_yday + 1, "%03d", pt, ptlim);
- continue;
- case 'k':
- /*
- ** This used to be...
- ** _conv(t->tm_hour % 12 ?
- ** t->tm_hour % 12 : 12, 2, ' ');
- ** ...and has been changed to the below to
- ** match SunOS 4.1.1 and Arnold Robbins'
- ** strftime version 3.0. That is, "%k" and
- ** "%l" have been swapped.
- ** (ado, 5/24/93)
- */
- pt = _conv(t->tm_hour, "%2d", pt, ptlim);
- continue;
-#ifdef KITCHEN_SINK
- case 'K':
- /*
- ** After all this time, still unclaimed!
- */
- pt = _add("kitchen sink", pt, ptlim);
- continue;
-#endif /* defined KITCHEN_SINK */
- case 'l':
- /*
- ** This used to be...
- ** _conv(t->tm_hour, 2, ' ');
- ** ...and has been changed to the below to
- ** match SunOS 4.1.1 and Arnold Robbin's
- ** strftime version 3.0. That is, "%k" and
- ** "%l" have been swapped.
- ** (ado, 5/24/93)
- */
- pt = _conv((t->tm_hour % 12) ?
- (t->tm_hour % 12) : 12,
- "%2d", pt, ptlim);
- continue;
- case 'M':
- pt = _conv(t->tm_min, "%02d", pt, ptlim);
- continue;
- case 'm':
- pt = _conv(t->tm_mon + 1, "%02d", pt, ptlim);
- continue;
- case 'n':
- pt = _add("\n", pt, ptlim);
- continue;
- case 'p':
- pt = _add((t->tm_hour >= 12) ?
- Locale->pm :
- Locale->am,
- pt, ptlim);
- continue;
- case 'R':
- pt = _fmt("%H:%M", t, pt, ptlim);
- continue;
- case 'r':
- pt = _fmt("%I:%M:%S %p", t, pt, ptlim);
- continue;
- case 'S':
- pt = _conv(t->tm_sec, "%02d", pt, ptlim);
- continue;
- case 's':
- pt = _secs(t, pt, ptlim);
- continue;
- case 'T':
- pt = _fmt("%H:%M:%S", t, pt, ptlim);
- continue;
- case 't':
- pt = _add("\t", pt, ptlim);
- continue;
- case 'U':
- pt = _conv((t->tm_yday + 7 - t->tm_wday) / 7,
- "%02d", pt, ptlim);
- continue;
- case 'u':
- /*
- ** From Arnold Robbins' strftime version 3.0:
- ** "ISO 8601: Weekday as a decimal number
- ** [1 (Monday) - 7]"
- ** (ado, 5/24/93)
- */
- pt = _conv((t->tm_wday == 0) ? 7 : t->tm_wday,
- "%d", pt, ptlim);
- continue;
- case 'V': /* ISO 8601 week number */
- case 'G': /* ISO 8601 year (four digits) */
- case 'g': /* ISO 8601 year (two digits) */
-/*
-** From Arnold Robbins' strftime version 3.0: "the week number of the
-** year (the first Monday as the first day of week 1) as a decimal number
-** (01-53)."
-** (ado, 1993-05-24)
-**
-** From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn:
-** "Week 01 of a year is per definition the first week which has the
-** Thursday in this year, which is equivalent to the week which contains
-** the fourth day of January. In other words, the first week of a new year
-** is the week which has the majority of its days in the new year. Week 01
-** might also contain days from the previous year and the week before week
-** 01 of a year is the last week (52 or 53) of the previous year even if
-** it contains days from the new year. A week starts with Monday (day 1)
-** and ends with Sunday (day 7). For example, the first week of the year
-** 1997 lasts from 1996-12-30 to 1997-01-05..."
-** (ado, 1996-01-02)
-*/
- {
- int year;
- int yday;
- int wday;
- int w;
-
- year = t->tm_year + TM_YEAR_BASE;
- yday = t->tm_yday;
- wday = t->tm_wday;
- for ( ; ; ) {
- int len;
- int bot;
- int top;
-
- len = isleap(year) ?
- DAYSPERLYEAR :
- DAYSPERNYEAR;
- /*
- ** What yday (-3 ... 3) does
- ** the ISO year begin on?
- */
- bot = ((yday + 11 - wday) %
- DAYSPERWEEK) - 3;
- /*
- ** What yday does the NEXT
- ** ISO year begin on?
- */
- top = bot -
- (len % DAYSPERWEEK);
- if (top < -3)
- top += DAYSPERWEEK;
- top += len;
- if (yday >= top) {
- ++year;
- w = 1;
- break;
- }
- if (yday >= bot) {
- w = 1 + ((yday - bot) /
- DAYSPERWEEK);
- break;
- }
- --year;
- yday += isleap(year) ?
- DAYSPERLYEAR :
- DAYSPERNYEAR;
- }
-#ifdef XPG4_1994_04_09
- if ((w == 52
- && t->tm_mon == TM_JANUARY)
- || (w == 1
- && t->tm_mon == TM_DECEMBER))
- w = 53;
-#endif /* defined XPG4_1994_04_09 */
- if (*format == 'V')
- pt = _conv(w, "%02d",
- pt, ptlim);
- else if (*format == 'g') {
- pt = _conv(year % 100, "%02d",
- pt, ptlim);
- } else pt = _conv(year, "%04d",
- pt, ptlim);
- }
- continue;
- case 'v':
- /*
- ** From Arnold Robbins' strftime version 3.0:
- ** "date as dd-bbb-YYYY"
- ** (ado, 5/24/93)
- */
- pt = _fmt("%e-%b-%Y", t, pt, ptlim);
- continue;
- case 'W':
- pt = _conv((t->tm_yday + 7 -
- (t->tm_wday ?
- (t->tm_wday - 1) : 6)) / 7,
- "%02d", pt, ptlim);
- continue;
- case 'w':
- pt = _conv(t->tm_wday, "%d", pt, ptlim);
- continue;
- case 'X':
- pt = _fmt(Locale->X_fmt, t, pt, ptlim);
- continue;
- case 'x':
- pt = _fmt(Locale->x_fmt, t, pt, ptlim);
- continue;
- case 'y':
- pt = _conv((t->tm_year + TM_YEAR_BASE) % 100,
- "%02d", pt, ptlim);
- continue;
- case 'Y':
- pt = _conv(t->tm_year + TM_YEAR_BASE, "%04d",
- pt, ptlim);
- continue;
- case 'Z':
- if (t->tm_zone != NULL)
- pt = _add(t->tm_zone, pt, ptlim);
- else
- if (t->tm_isdst == 0 || t->tm_isdst == 1) {
- pt = _add(tzname[t->tm_isdst],
- pt, ptlim);
- } else pt = _add("?", pt, ptlim);
- continue;
- case '+':
- pt = _fmt(Locale->date_fmt, t, pt, ptlim);
- continue;
- case '%':
- /*
- * X311J/88-090 (4.12.3.5): if conversion char is
- * undefined, behavior is undefined. Print out the
- * character itself as printf(3) also does.
- */
- default:
- break;
- }
- }
- if (pt == ptlim)
- break;
- *pt++ = *format;
- }
- return pt;
-}
-
-static char *
-_conv(n, format, pt, ptlim)
- const int n;
- const char *const format;
- char *const pt;
- const char *const ptlim;
-{
- char buf[INT_STRLEN_MAXIMUM(int) + 1];
-
- (void) sprintf(buf, format, n);
- return _add(buf, pt, ptlim);
-}
-
-static char *
-_secs(t, pt, ptlim)
- const struct tm *t;
- char *pt;
- const char *ptlim;
-{
- char buf[INT_STRLEN_MAXIMUM(int) + 1];
- register time_t s;
- struct tm tmp;
-
- /* Make a copy, mktime(3) modifies the tm struct. */
- tmp = *t;
- s = mktime(&tmp);
- (void) sprintf(buf, "%ld", s);
- return _add(buf, pt, ptlim);
-}
-
-static char *
-_add(str, pt, ptlim)
- const char *str;
- char *pt;
- const char *const ptlim;
-{
- while (pt < ptlim && (*pt = *str++) != '\0')
- ++pt;
- return pt;
-}
diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3
deleted file mode 100644
index bdda0e3..0000000
--- a/lib/libc/stdtime/strptime.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.\"
-.\" Copyright (c) 1997 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id$
-.\" "
-.Dd May 8, 1997
-.Dt STRPTIME 3
-.Os
-.Sh NAME
-.Nm strptime
-.Nd parse date and time string
-.Sh SYNOPSIS
-.Fd #include <time.h>
-.Ft const char *
-.Fn strptime "const char *buf" "const char *format" "struct tm *timeptr"
-.Sh DESCRIPTION
-The
-.Fn strptime
-function parses the string in the buffer
-.Fa buf
-according to the string pointed to by
-.Fa format ,
-and fills in the elements of the structure pointed to by
-.Fa timeptr .
-Thus, it can be considered the reverse operation of
-.Xr strftime 3 .
-.Pp
-The
-.Fa format
-string consists of zero or more conversion specifications and
-ordinary characters.
-All ordinary characters are matched exactly with the buffer, where
-white space in the format string will match any amount of white space
-in the buffer.
-All conversion specifications are identical to those described in
-.Xr strftime 3 .
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn strptime
-returns the pointer to the first character in
-.Fa buf
-that has not been required to satisfy the specified conversions in
-.Fa format .
-It returns
-.Dv NULL
-if one of the conversions failed.
-.Sh SEE ALSO
-.Xr date 1 ,
-.Xr scanf 3 ,
-.Xr strftime 3
-.Sh AUTHORS
-The
-.Fn strptime
-function has been contributed by Powerdog Industries.
-.Pp
-This man page was written by
-.ie t J\(:org Wunsch.
-.el Joerg Wunsch.
-.Sh HISTORY
-The
-.Fn strptime
-function appeared in
-.Fx 3.0 .
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c
deleted file mode 100644
index 1158b25..0000000
--- a/lib/libc/stdtime/strptime.c
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- * Powerdog Industries kindly requests feedback from anyone modifying
- * this function:
- *
- * Date: Thu, 05 Jun 1997 23:17:17 -0400
- * From: Kevin Ruddy <kevin.ruddy@powerdog.com>
- * To: James FitzGibbon <james@nexis.net>
- * Subject: Re: Use of your strptime(3) code (fwd)
- *
- * The reason for the "no mod" clause was so that modifications would
- * come back and we could integrate them and reissue so that a wider
- * audience could use it (thereby spreading the wealth). This has
- * made it possible to get strptime to work on many operating systems.
- * I'm not sure why that's "plain unacceptable" to the FreeBSD team.
- *
- * Anyway, you can change it to "with or without modification" as
- * you see fit. Enjoy.
- *
- * Kevin Ruddy
- * Powerdog Industries, Inc.
- */
-/*
- * Copyright (c) 1994 Powerdog Industries. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgement:
- * This product includes software developed by Powerdog Industries.
- * 4. The name of Powerdog Industries may not be used to endorse or
- * promote products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY POWERDOG INDUSTRIES ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE POWERDOG INDUSTRIES BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifdef LIBC_RCS
-static const char rcsid[] =
- "$Id: strptime.c,v 1.2 1997/08/09 15:43:56 joerg Exp $";
-#endif
-
-#ifndef lint
-#ifndef NOID
-static char copyright[] =
-"@(#) Copyright (c) 1994 Powerdog Industries. All rights reserved.";
-static char sccsid[] = "@(#)strptime.c 0.1 (Powerdog) 94/03/27";
-#endif /* !defined NOID */
-#endif /* not lint */
-
-#include <time.h>
-#include <ctype.h>
-#include <string.h>
-#include "timelocal.h"
-
-#define asizeof(a) (sizeof (a) / sizeof ((a)[0]))
-
-const char *
-strptime(const char *buf, const char *fmt, struct tm *tm)
-{
- char c;
- const char *ptr;
- int i,
- len;
-
- ptr = fmt;
- while (*ptr != 0) {
- if (*buf == 0)
- break;
-
- c = *ptr++;
-
- if (c != '%') {
- if (isspace((unsigned char)c))
- while (*buf != 0 && isspace((unsigned char)*buf))
- buf++;
- else if (c != *buf++)
- return 0;
- continue;
- }
-
- c = *ptr++;
- switch (c) {
- case 0:
- case '%':
- if (*buf++ != '%')
- return 0;
- break;
-
- case 'C':
- buf = strptime(buf, Locale->date_fmt, tm);
- if (buf == 0)
- return 0;
- break;
-
- case 'c':
- buf = strptime(buf, "%x %X", tm);
- if (buf == 0)
- return 0;
- break;
-
- case 'D':
- buf = strptime(buf, "%m/%d/%y", tm);
- if (buf == 0)
- return 0;
- break;
-
- case 'R':
- buf = strptime(buf, "%H:%M", tm);
- if (buf == 0)
- return 0;
- break;
-
- case 'r':
- buf = strptime(buf, "%I:%M:%S %p", tm);
- if (buf == 0)
- return 0;
- break;
-
- case 'T':
- buf = strptime(buf, "%H:%M:%S", tm);
- if (buf == 0)
- return 0;
- break;
-
- case 'X':
- buf = strptime(buf, Locale->X_fmt, tm);
- if (buf == 0)
- return 0;
- break;
-
- case 'x':
- buf = strptime(buf, Locale->x_fmt, tm);
- if (buf == 0)
- return 0;
- break;
-
- case 'j':
- if (!isdigit((unsigned char)*buf))
- return 0;
-
- for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
- i *= 10;
- i += *buf - '0';
- }
- if (i > 365)
- return 0;
-
- tm->tm_yday = i;
- break;
-
- case 'M':
- case 'S':
- if (*buf == 0 || isspace((unsigned char)*buf))
- break;
-
- if (!isdigit((unsigned char)*buf))
- return 0;
-
- for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
- i *= 10;
- i += *buf - '0';
- }
- if (i > 59)
- return 0;
-
- if (c == 'M')
- tm->tm_min = i;
- else
- tm->tm_sec = i;
-
- if (*buf != 0 && isspace((unsigned char)*buf))
- while (*ptr != 0 && !isspace((unsigned char)*ptr))
- ptr++;
- break;
-
- case 'H':
- case 'I':
- case 'k':
- case 'l':
- if (!isdigit((unsigned char)*buf))
- return 0;
-
- for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
- i *= 10;
- i += *buf - '0';
- }
- if (c == 'H' || c == 'k') {
- if (i > 23)
- return 0;
- } else if (i > 11)
- return 0;
-
- tm->tm_hour = i;
-
- if (*buf != 0 && isspace((unsigned char)*buf))
- while (*ptr != 0 && !isspace((unsigned char)*ptr))
- ptr++;
- break;
-
- case 'p':
- len = strlen(Locale->am);
- if (strncasecmp(buf, Locale->am, len) == 0) {
- if (tm->tm_hour > 12)
- return 0;
- if (tm->tm_hour == 12)
- tm->tm_hour = 0;
- buf += len;
- break;
- }
-
- len = strlen(Locale->pm);
- if (strncasecmp(buf, Locale->pm, len) == 0) {
- if (tm->tm_hour > 12)
- return 0;
- if (tm->tm_hour != 12)
- tm->tm_hour += 12;
- buf += len;
- break;
- }
-
- return 0;
-
- case 'A':
- case 'a':
- for (i = 0; i < asizeof(Locale->weekday); i++) {
- len = strlen(Locale->weekday[i]);
- if (strncasecmp(buf,
- Locale->weekday[i],
- len) == 0)
- break;
-
- len = strlen(Locale->wday[i]);
- if (strncasecmp(buf,
- Locale->wday[i],
- len) == 0)
- break;
- }
- if (i == asizeof(Locale->weekday))
- return 0;
-
- tm->tm_wday = i;
- buf += len;
- break;
-
- case 'd':
- case 'e':
- if (!isdigit((unsigned char)*buf))
- return 0;
-
- for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
- i *= 10;
- i += *buf - '0';
- }
- if (i > 31)
- return 0;
-
- tm->tm_mday = i;
-
- if (*buf != 0 && isspace((unsigned char)*buf))
- while (*ptr != 0 && !isspace((unsigned char)*ptr))
- ptr++;
- break;
-
- case 'B':
- case 'b':
- case 'h':
- for (i = 0; i < asizeof(Locale->month); i++) {
- len = strlen(Locale->month[i]);
- if (strncasecmp(buf,
- Locale->month[i],
- len) == 0)
- break;
-
- len = strlen(Locale->mon[i]);
- if (strncasecmp(buf,
- Locale->mon[i],
- len) == 0)
- break;
- }
- if (i == asizeof(Locale->month))
- return 0;
-
- tm->tm_mon = i;
- buf += len;
- break;
-
- case 'm':
- if (!isdigit((unsigned char)*buf))
- return 0;
-
- for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
- i *= 10;
- i += *buf - '0';
- }
- if (i < 1 || i > 12)
- return 0;
-
- tm->tm_mon = i - 1;
-
- if (*buf != 0 && isspace((unsigned char)*buf))
- while (*ptr != 0 && !isspace((unsigned char)*ptr))
- ptr++;
- break;
-
- case 'Y':
- case 'y':
- if (*buf == 0 || isspace((unsigned char)*buf))
- break;
-
- if (!isdigit((unsigned char)*buf))
- return 0;
-
- for (i = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) {
- i *= 10;
- i += *buf - '0';
- }
- if (c == 'Y')
- i -= 1900;
- if (i < 0)
- return 0;
-
- tm->tm_year = i;
-
- if (*buf != 0 && isspace((unsigned char)*buf))
- while (*ptr != 0 && !isspace((unsigned char)*ptr))
- ptr++;
- break;
- }
- }
-
- return buf;
-}
diff --git a/lib/libc/stdtime/time2posix.3 b/lib/libc/stdtime/time2posix.3
deleted file mode 100644
index 38bb1ab..0000000
--- a/lib/libc/stdtime/time2posix.3
+++ /dev/null
@@ -1,114 +0,0 @@
-.Dd May 1, 1996
-.Dt TIME2POSIX 3
-.Os
-.Sh NAME
-.Nm time2posix ,
-.Nm posix2time
-.Nd convert seconds since the Epoch
-.Sh SYNOPSIS
-.Fd #include <time.h>
-.Ft time_t
-.Fn time2posix "const time_t *t"
-.Ft time_t
-.Fn posix2time "const time_t *t"
-.Sh DESCRIPTION
-.St -p1003.1-88
-legislates that a time_t value of
-536457599 shall correspond to "Wed Dec 31 23:59:59 GMT 1986."
-This effectively implies that POSIX time_t's cannot include leap
-seconds and,
-therefore,
-that the system time must be adjusted as each leap occurs.
-.Pp
-If the time package is configured with leap-second support
-enabled,
-however,
-no such adjustment is needed and
-time_t values continue to increase over leap events
-(as a true `seconds since...' value).
-This means that these values will differ from those required by POSIX
-by the net number of leap seconds inserted since the Epoch.
-.Pp
-Typically this is not a problem as the type time_t is intended
-to be
-(mostly)
-opaque\(emtime_t values should only be obtained-from and
-passed-to functions such as
-.Xr time 2 ,
-.Xr localtime 3 ,
-.Xr mktime 3
-and
-.Xr difftime 3 .
-However,
-.Std -p1003.1-88
-gives an arithmetic
-expression for directly computing a time_t value from a given date/time,
-and the same relationship is assumed by some
-(usually older)
-applications.
-Any programs creating/dissecting time_t's
-using such a relationship will typically not handle intervals
-over leap seconds correctly.
-.Pp
-The
-.Fn time2posix
-and
-.Fn posix2time
-functions are provided to address this time_t mismatch by converting
-between local time_t values and their POSIX equivalents.
-This is done by accounting for the number of time-base changes that
-would have taken place on a POSIX system as leap seconds were inserted
-or deleted.
-These converted values can then be used in lieu of correcting the older
-applications,
-or when communicating with POSIX-compliant systems.
-.Pp
-The
-.Fn time2posix
-function is single-valued.
-That is,
-every local time_t
-corresponds to a single POSIX time_t.
-The
-.Fn posix2time
-function is less well-behaved:
-for a positive leap second hit the result is not unique,
-and for a negative leap second hit the corresponding
-POSIX time_t doesn't exist so an adjacent value is returned.
-Both of these are good indicators of the inferiority of the
-POSIX representation.
-.Pp
-The following table summarizes the relationship between time_t
-and its conversion to,
-and back from,
-the POSIX representation over the leap second inserted at the end of June,
-1993.
-.ta \w'93/06/30 'u +\w'23:59:59 'u +\w'A+0 'u +\w'X=time2posix(T) 'u
-DATE TIME T X=time2posix(T) posix2time(X)
-93/06/30 23:59:59 A+0 B+0 A+0
-93/06/30 23:59:60 A+1 B+1 A+1 or A+2
-93/07/01 00:00:00 A+2 B+1 A+1 or A+2
-93/07/01 00:00:01 A+3 B+2 A+3
-
-A leap second deletion would look like...
-
-DATE TIME T X=time2posix(T) posix2time(X)
-??/06/30 23:59:58 A+0 B+0 A+0
-??/07/01 00:00:00 A+1 B+2 A+1
-??/07/01 00:00:01 A+2 B+3 A+2
-.Pp
- [Note: posix2time(B+1) => A+0 or A+1]
-.Pp
-If leap-second support is not enabled,
-local time_t's and
-POSIX time_t's are equivalent,
-and both
-.Fn time2posix
-and
-.Fn posix2time
-degenerate to the identity function.
-.Sh "SEE ALSO"
-.Xr difftime 3 ,
-.Xr localtime 3 ,
-.Xr mktime 3 ,
-.Xr time 3
diff --git a/lib/libc/stdtime/timelocal.c b/lib/libc/stdtime/timelocal.c
deleted file mode 100644
index ef40035..0000000
--- a/lib/libc/stdtime/timelocal.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*-
- * Copyright (c) 1997 FreeBSD Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/syslimits.h>
-#include <fcntl.h>
-#include <locale.h>
-#include <stdlib.h>
-#include <string.h>
-#include "setlocale.h"
-#include "timelocal.h"
-
-struct lc_time_T _time_localebuf;
-int _time_using_locale;
-
-const struct lc_time_T _C_time_locale = {
- {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
- }, {
- "January", "February", "March", "April", "May", "June",
- "July", "August", "September", "October", "November", "December"
- }, {
- "Sun", "Mon", "Tue", "Wed",
- "Thu", "Fri", "Sat"
- }, {
- "Sunday", "Monday", "Tuesday", "Wednesday",
- "Thursday", "Friday", "Saturday"
- },
-
- /* X_fmt */
- "%H:%M:%S",
-
- /*
- ** x_fmt
- ** Since the C language standard calls for
- ** "date, using locale's date format," anything goes.
- ** Using just numbers (as here) makes Quakers happier;
- ** it's also compatible with SVR4.
- */
- "%m/%d/%y",
-
- /*
- ** c_fmt (ctime-compatible)
- ** Note that
- ** "%a %b %d %H:%M:%S %Y"
- ** is used by Solaris 2.3.
- */
- "%a %b %e %X %Y",
-
- /* am */
- "AM",
-
- /* pm */
- "PM",
-
- /* date_fmt */
- "%a %b %e %X %Z %Y"
-};
-
-
-int
-__time_load_locale(const char *name)
-{
- static char * locale_buf;
- static char locale_buf_C[] = "C";
-
- int fd;
- char * lbuf;
- char * p;
- const char ** ap;
- const char * plim;
- char filename[PATH_MAX];
- struct stat st;
- size_t namesize;
- size_t bufsize;
- int save_using_locale;
-
- save_using_locale = _time_using_locale;
- _time_using_locale = 0;
-
- if (name == NULL)
- goto no_locale;
-
- if (!strcmp(name, "C") || !strcmp(name, "POSIX"))
- return 0;
-
- /*
- ** If the locale name is the same as our cache, use the cache.
- */
- lbuf = locale_buf;
- if (lbuf != NULL && strcmp(name, lbuf) == 0) {
- p = lbuf;
- for (ap = (const char **) &_time_localebuf;
- ap < (const char **) (&_time_localebuf + 1);
- ++ap)
- *ap = p += strlen(p) + 1;
- _time_using_locale = 1;
- return 0;
- }
- /*
- ** Slurp the locale file into the cache.
- */
- namesize = strlen(name) + 1;
-
- if (!_PathLocale)
- goto no_locale;
- /* Range checking not needed, 'name' size is limited */
- strcpy(filename, _PathLocale);
- strcat(filename, "/");
- strcat(filename, name);
- strcat(filename, "/LC_TIME");
- fd = open(filename, O_RDONLY);
- if (fd < 0)
- goto no_locale;
- if (fstat(fd, &st) != 0)
- goto bad_locale;
- if (st.st_size <= 0)
- goto bad_locale;
- bufsize = namesize + st.st_size;
- locale_buf = NULL;
- lbuf = (lbuf == NULL || lbuf == locale_buf_C) ?
- malloc(bufsize) : realloc(lbuf, bufsize);
- if (lbuf == NULL)
- goto bad_locale;
- (void) strcpy(lbuf, name);
- p = lbuf + namesize;
- plim = p + st.st_size;
- if (read(fd, p, (size_t) st.st_size) != st.st_size)
- goto bad_lbuf;
- if (close(fd) != 0)
- goto bad_lbuf;
- /*
- ** Parse the locale file into localebuf.
- */
- if (plim[-1] != '\n')
- goto bad_lbuf;
- for (ap = (const char **) &_time_localebuf;
- ap < (const char **) (&_time_localebuf + 1);
- ++ap) {
- if (p == plim)
- goto reset_locale;
- *ap = p;
- while (*p != '\n')
- ++p;
- *p++ = '\0';
- }
- /*
- ** Record the successful parse in the cache.
- */
- locale_buf = lbuf;
-
- _time_using_locale = 1;
- return 0;
-
-reset_locale:
- /*
- * XXX - This may not be the correct thing to do in this case.
- * setlocale() assumes that we left the old locale alone.
- */
- locale_buf = locale_buf_C;
- _time_localebuf = _C_time_locale;
- save_using_locale = 0;
-bad_lbuf:
- free(lbuf);
-bad_locale:
- (void) close(fd);
-no_locale:
- _time_using_locale = save_using_locale;
- return -1;
-}
diff --git a/lib/libc/stdtime/timelocal.h b/lib/libc/stdtime/timelocal.h
deleted file mode 100644
index 8593aee..0000000
--- a/lib/libc/stdtime/timelocal.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-
- * Copyright (c) 1997 FreeBSD Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-/*
- * Private header file for the strftime and strptime localization
- * stuff.
- */
-struct lc_time_T {
- const char * mon[12];
- const char * month[12];
- const char * wday[7];
- const char * weekday[7];
- const char * X_fmt;
- const char * x_fmt;
- const char * c_fmt;
- const char * am;
- const char * pm;
- const char * date_fmt;
-};
-
-extern struct lc_time_T _time_localebuf;
-extern int _time_using_locale;
-extern const struct lc_time_T _C_time_locale;
-
-#define Locale (_time_using_locale ? &_time_localebuf : &_C_time_locale)
-
diff --git a/lib/libc/stdtime/tzfile.5 b/lib/libc/stdtime/tzfile.5
deleted file mode 100644
index f894390..0000000
--- a/lib/libc/stdtime/tzfile.5
+++ /dev/null
@@ -1,122 +0,0 @@
-.Dd September 13, 1994
-.Dt TZFILE 5
-.Os FreeBSD 2.0
-.Sh NAME
-.Nm tzfile
-.Nd timezone information
-.Sh SYNOPSIS
-.Fd #include <tzfile.h>
-.Sh DESCRIPTION
-The time zone information files used by
-.Xr tzset 3
-begin with bytes reserved for future use,
-followed by four four-byte values of type
-.Fa long ,
-written in a ``standard'' byte order
-(the high-order byte of the value is written first).
-These values are,
-in order:
-.Pp
-.Bl -tag -compact -width tzh_ttisstdcnt
-.It Li tzh_ttisstdcnt
-The number of standard/wall indicators stored in the file.
-.It Li tzh_leapcnt
-The number of leap seconds for which data is stored in the file.
-.It Li tzh_timecnt
-The number of ``transition times'' for which data is stored
-in the file.
-.It Li tzh_typecnt
-The number of ``local time types'' for which data is stored
-in the file (must not be zero).
-.It Li tzh_charcnt
-The number of characters of ``time zone abbreviation strings''
-stored in the file.
-.El
-.Pp
-The above header is followed by
-.Li tzh_timecnt
-four-byte values of type
-.Fa long ,
-sorted in ascending order.
-These values are written in ``standard'' byte order.
-Each is used as a transition time (as returned by
-.Xr time 3 )
-at which the rules for computing local time change.
-Next come
-.Li tzh_timecnt
-one-byte values of type
-.Fa "unsigned char" ;
-each one tells which of the different types of ``local time'' types
-described in the file is associated with the same-indexed transition time.
-These values serve as indices into an array of
-.Fa ttinfo
-structures that appears next in the file;
-these structures are defined as follows:
-.Pp
-.Bd -literal -offset indent
-struct ttinfo {
- long tt_gmtoff;
- int tt_isdst;
- unsigned int tt_abbrind;
-};
-.Ed
-.Pp
-Each structure is written as a four-byte value for
-.Li tt_gmtoff
-of type
-.Fa long ,
-in a standard byte order, followed by a one-byte value for
-.Li tt_isdst
-and a one-byte value for
-.Li tt_abbrind .
-In each structure,
-.Li tt_gmtoff
-gives the number of seconds to be added to GMT,
-.Li tt_isdst
-tells whether
-.Li tm_isdst
-should be set by
-.Xr localtime 3
-and
-.Li tt_abbrind
-serves as an index into the array of time zone abbreviation characters
-that follow the
-.Li ttinfo
-structure(s) in the file.
-.Pp
-Then there are
-.Li tzh_leapcnt
-pairs of four-byte values, written in standard byte order;
-the first value of each pair gives the time
-(as returned by
-.Xr time 3 )
-at which a leap second occurs;
-the second gives the
-.Em total
-number of leap seconds to be applied after the given time.
-The pairs of values are sorted in ascending order by time.
-.Pp
-Finally there are
-.Li tzh_ttisstdcnt
-standard/wall indicators, each stored as a one-byte value;
-they tell whether the transition times associated with local time types
-were specified as standard time or wall clock time,
-and are used when a time zone file is used in handling POSIX-style
-time zone environment variables.
-.Pp
-.Nm localtime
-uses the first standard-time
-.Li ttinfo
-structure in the file
-(or simply the first
-.Li ttinfo
-structure in the absence of a standard-time structure)
-if either
-.Li tzh_timecnt
-is zero or the time argument is less than the first transition time recorded
-in the file.
-.Sh SEE ALSO
-.Xr ctime 3 ,
-.Xr time2posix 3 ,
-.Xr zic 8
-.\" @(#)tzfile.5 7.2
diff --git a/lib/libc/stdtime/tzfile.h b/lib/libc/stdtime/tzfile.h
deleted file mode 100644
index 58cdc3d..0000000
--- a/lib/libc/stdtime/tzfile.h
+++ /dev/null
@@ -1,187 +0,0 @@
-#ifndef TZFILE_H
-
-#define TZFILE_H
-
-/*
-** This file is in the public domain, so clarified as of
-** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
-*/
-
-/*
-** This header is for use ONLY with the time conversion code.
-** There is no guarantee that it will remain unchanged,
-** or that it will remain at all.
-** Do NOT copy it to any system include directory.
-** Thank you!
-*/
-
-/*
-** ID
-*/
-
-#ifndef lint
-#ifndef NOID
-/*
-static char tzfilehid[] = "@(#)tzfile.h 7.8";
-*/
-#endif /* !defined NOID */
-#endif /* !defined lint */
-
-/*
-** Information about time zone files.
-*/
-
-#ifndef TZDIR
-#define TZDIR "/usr/share/zoneinfo" /* Time zone object file directory */
-#endif /* !defined TZDIR */
-
-#ifndef TZDEFAULT
-#define TZDEFAULT "/etc/localtime"
-#endif /* !defined TZDEFAULT */
-
-#ifndef TZDEFRULES
-#define TZDEFRULES "posixrules"
-#endif /* !defined TZDEFRULES */
-
-/*
-** Each file begins with. . .
-*/
-
-struct tzhead {
- char tzh_reserved[20]; /* reserved for future use */
- char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
- char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
- char tzh_leapcnt[4]; /* coded number of leap seconds */
- char tzh_timecnt[4]; /* coded number of transition times */
- char tzh_typecnt[4]; /* coded number of local time types */
- char tzh_charcnt[4]; /* coded number of abbr. chars */
-};
-
-/*
-** . . .followed by. . .
-**
-** tzh_timecnt (char [4])s coded transition times a la time(2)
-** tzh_timecnt (unsigned char)s types of local time starting at above
-** tzh_typecnt repetitions of
-** one (char [4]) coded GMT offset in seconds
-** one (unsigned char) used to set tm_isdst
-** one (unsigned char) that's an abbreviation list index
-** tzh_charcnt (char)s '\0'-terminated zone abbreviations
-** tzh_leapcnt repetitions of
-** one (char [4]) coded leap second transition times
-** one (char [4]) total correction after above
-** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition
-** time is standard time, if FALSE,
-** transition time is wall clock time
-** if absent, transition times are
-** assumed to be wall clock time
-** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition
-** time is GMT, if FALSE,
-** transition time is local time
-** if absent, transition times are
-** assumed to be local time
-*/
-
-/*
-** In the current implementation, "tzset()" refuses to deal with files that
-** exceed any of the limits below.
-*/
-
-#ifndef TZ_MAX_TIMES
-/*
-** The TZ_MAX_TIMES value below is enough to handle a bit more than a
-** year's worth of solar time (corrected daily to the nearest second) or
-** 138 years of Pacific Presidential Election time
-** (where there are three time zone transitions every fourth year).
-*/
-#define TZ_MAX_TIMES 370
-#endif /* !defined TZ_MAX_TIMES */
-
-#ifndef TZ_MAX_TYPES
-#ifndef NOSOLAR
-#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
-#endif /* !defined NOSOLAR */
-#ifdef NOSOLAR
-/*
-** Must be at least 14 for Europe/Riga as of Jan 12 1995,
-** as noted by Earl Chew <earl@hpato.aus.hp.com>.
-*/
-#define TZ_MAX_TYPES 20 /* Maximum number of local time types */
-#endif /* !defined NOSOLAR */
-#endif /* !defined TZ_MAX_TYPES */
-
-#ifndef TZ_MAX_CHARS
-#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */
- /* (limited by what unsigned chars can hold) */
-#endif /* !defined TZ_MAX_CHARS */
-
-#ifndef TZ_MAX_LEAPS
-#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */
-#endif /* !defined TZ_MAX_LEAPS */
-
-#define SECSPERMIN 60
-#define MINSPERHOUR 60
-#define HOURSPERDAY 24
-#define DAYSPERWEEK 7
-#define DAYSPERNYEAR 365
-#define DAYSPERLYEAR 366
-#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)
-#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
-#define MONSPERYEAR 12
-
-#define TM_SUNDAY 0
-#define TM_MONDAY 1
-#define TM_TUESDAY 2
-#define TM_WEDNESDAY 3
-#define TM_THURSDAY 4
-#define TM_FRIDAY 5
-#define TM_SATURDAY 6
-
-#define TM_JANUARY 0
-#define TM_FEBRUARY 1
-#define TM_MARCH 2
-#define TM_APRIL 3
-#define TM_MAY 4
-#define TM_JUNE 5
-#define TM_JULY 6
-#define TM_AUGUST 7
-#define TM_SEPTEMBER 8
-#define TM_OCTOBER 9
-#define TM_NOVEMBER 10
-#define TM_DECEMBER 11
-
-#define TM_YEAR_BASE 1900
-
-#define EPOCH_YEAR 1970
-#define EPOCH_WDAY TM_THURSDAY
-
-/*
-** Accurate only for the past couple of centuries;
-** that will probably do.
-*/
-
-#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
-
-#ifndef USG
-
-/*
-** Use of the underscored variants may cause problems if you move your code to
-** certain System-V-based systems; for maximum portability, use the
-** underscore-free variants. The underscored variants are provided for
-** backward compatibility only; they may disappear from future versions of
-** this file.
-*/
-
-#define SECS_PER_MIN SECSPERMIN
-#define MINS_PER_HOUR MINSPERHOUR
-#define HOURS_PER_DAY HOURSPERDAY
-#define DAYS_PER_WEEK DAYSPERWEEK
-#define DAYS_PER_NYEAR DAYSPERNYEAR
-#define DAYS_PER_LYEAR DAYSPERLYEAR
-#define SECS_PER_HOUR SECSPERHOUR
-#define SECS_PER_DAY SECSPERDAY
-#define MONS_PER_YEAR MONSPERYEAR
-
-#endif /* !defined USG */
-
-#endif /* !defined TZFILE_H */
diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc
deleted file mode 100644
index 5583ce3..0000000
--- a/lib/libc/string/Makefile.inc
+++ /dev/null
@@ -1,30 +0,0 @@
-# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
-# $Id: Makefile.inc,v 1.12 1997/10/16 13:46:50 bde Exp $
-
-.PATH: ${.CURDIR}/../libc/${MACHINE}/string ${.CURDIR}/../libc/string
-
-CFLAGS += -I${.CURDIR}/../libc/locale
-
-# machine-independent string sources
-MISRCS+=bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \
- memcpy.c memmove.c memset.c rindex.c strcasecmp.c strcat.c strchr.c \
- strcmp.c strcoll.c strcpy.c strcspn.c strdup.c strerror.c strlen.c \
- strmode.c strncat.c strncmp.c strncpy.c strpbrk.c strrchr.c strsep.c \
- strspn.c strstr.c strtok.c strxfrm.c swab.c
-
-# machine-dependent string sources
-.include "${.CURDIR}/../libc/${MACHINE}/string/Makefile.inc"
-
-.if ${LIB} == "c"
-MAN3+= bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 memccpy.3 memchr.3 \
- memcmp.3 memcpy.3 memmove.3 memset.3 rindex.3 strcasecmp.3 strcat.3 \
- strchr.3 strcmp.3 strcoll.3 strcpy.3 strcspn.3 strdup.3 strerror.3 \
- string.3 strlen.3 strmode.3 strpbrk.3 strrchr.3 strsep.3 strspn.3 \
- strstr.3 strtok.3 strxfrm.3 swab.3
-
-MLINKS+=strcasecmp.3 strncasecmp.3
-MLINKS+=strcat.3 strncat.3
-MLINKS+=strcmp.3 strncmp.3
-MLINKS+=strcpy.3 strncpy.3
-MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3
-.endif
diff --git a/lib/libc/string/bcmp.3 b/lib/libc/string/bcmp.3
deleted file mode 100644
index 5b02740..0000000
--- a/lib/libc/string/bcmp.3
+++ /dev/null
@@ -1,72 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)bcmp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt BCMP 3
-.Os BSD 4.2
-.Sh NAME
-.Nm bcmp
-.Nd compare byte string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft int
-.Fn bcmp "const void *b1" "const void *b2" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn bcmp
-function
-compares byte string
-.Fa b1
-against byte string
-.Fa b2 ,
-returning zero if they are identical, non-zero otherwise.
-Both strings are assumed to be
-.Fa len
-bytes long.
-Zero-length strings are always identical.
-.Pp
-The strings may overlap.
-.Sh SEE ALSO
-.Xr bcmp 3 ,
-.Xr memcmp 3 ,
-.Xr strcasecmp 3 ,
-.Xr strcmp 3 ,
-.Xr strcoll 3 ,
-.Xr strxfrm 3
-.Sh HISTORY
-A
-.Fn bcmp
-function first appeared in
-.Bx 4.2 .
diff --git a/lib/libc/string/bcmp.c b/lib/libc/string/bcmp.c
deleted file mode 100644
index 5a3ae61..0000000
--- a/lib/libc/string/bcmp.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bcmp.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <string.h>
-
-/*
- * bcmp -- vax cmpc3 instruction
- */
-int
-bcmp(b1, b2, length)
- const void *b1, *b2;
- register size_t length;
-{
- register char *p1, *p2;
-
- if (length == 0)
- return(0);
- p1 = (char *)b1;
- p2 = (char *)b2;
- do
- if (*p1++ != *p2++)
- break;
- while (--length);
- return(length);
-}
diff --git a/lib/libc/string/bcopy.3 b/lib/libc/string/bcopy.3
deleted file mode 100644
index 7f6a14c..0000000
--- a/lib/libc/string/bcopy.3
+++ /dev/null
@@ -1,71 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)bcopy.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt BCOPY 3
-.Os BSD 4.2
-.Sh NAME
-.Nm bcopy
-.Nd copy byte string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft void
-.Fn bcopy "const void *src" "void *dst" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn bcopy
-function
-copies
-.Fa len
-bytes from string
-.Fa src
-to string
-.Fa dst .
-The two strings may overlap.
-If
-.Fa len
-is zero, no bytes are copied.
-.Sh SEE ALSO
-.Xr memccpy 3 ,
-.Xr memcpy 3 ,
-.Xr memmove 3 ,
-.Xr strcpy 3 ,
-.Xr strncpy 3
-.Sh HISTORY
-A
-.Fn bcopy
-function appeared in
-.Bx 4.2 .
diff --git a/lib/libc/string/bcopy.c b/lib/libc/string/bcopy.c
deleted file mode 100644
index f90b09c..0000000
--- a/lib/libc/string/bcopy.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)bcopy.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-/*
- * sizeof(word) MUST BE A POWER OF TWO
- * SO THAT wmask BELOW IS ALL ONES
- */
-typedef int word; /* "word" used for optimal copy speed */
-
-#define wsize sizeof(word)
-#define wmask (wsize - 1)
-
-/*
- * Copy a block of memory, handling overlap.
- * This is the routine that actually implements
- * (the portable versions of) bcopy, memcpy, and memmove.
- */
-#ifdef MEMCOPY
-void *
-memcpy(dst0, src0, length)
-#else
-#ifdef MEMMOVE
-void *
-memmove(dst0, src0, length)
-#else
-void
-bcopy(src0, dst0, length)
-#endif
-#endif
- void *dst0;
- const void *src0;
- register size_t length;
-{
- register char *dst = dst0;
- register const char *src = src0;
- register size_t t;
-
- if (length == 0 || dst == src) /* nothing to do */
- goto done;
-
- /*
- * Macros: loop-t-times; and loop-t-times, t>0
- */
-#define TLOOP(s) if (t) TLOOP1(s)
-#define TLOOP1(s) do { s; } while (--t)
-
- if ((unsigned long)dst < (unsigned long)src) {
- /*
- * Copy forward.
- */
- t = (int)src; /* only need low bits */
- if ((t | (int)dst) & wmask) {
- /*
- * Try to align operands. This cannot be done
- * unless the low bits match.
- */
- if ((t ^ (int)dst) & wmask || length < wsize)
- t = length;
- else
- t = wsize - (t & wmask);
- length -= t;
- TLOOP1(*dst++ = *src++);
- }
- /*
- * Copy whole words, then mop up any trailing bytes.
- */
- t = length / wsize;
- TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
- t = length & wmask;
- TLOOP(*dst++ = *src++);
- } else {
- /*
- * Copy backwards. Otherwise essentially the same.
- * Alignment works as before, except that it takes
- * (t&wmask) bytes to align, not wsize-(t&wmask).
- */
- src += length;
- dst += length;
- t = (int)src;
- if ((t | (int)dst) & wmask) {
- if ((t ^ (int)dst) & wmask || length <= wsize)
- t = length;
- else
- t &= wmask;
- length -= t;
- TLOOP1(*--dst = *--src);
- }
- t = length / wsize;
- TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
- t = length & wmask;
- TLOOP(*--dst = *--src);
- }
-done:
-#if defined(MEMCOPY) || defined(MEMMOVE)
- return (dst0);
-#else
- return;
-#endif
-}
diff --git a/lib/libc/string/bstring.3 b/lib/libc/string/bstring.3
deleted file mode 100644
index 10d91a2..0000000
--- a/lib/libc/string/bstring.3
+++ /dev/null
@@ -1,109 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)bstring.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt BSTRING 3
-.Os
-.Sh NAME
-.Nm bcmp ,
-.Nm bcopy ,
-.Nm bzero ,
-.Nm memccpy ,
-.Nm memchr ,
-.Nm memcmp ,
-.Nm memcpy ,
-.Nm memmove,
-.Nm memset
-.Nd byte string operations
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft int
-.Fn bcmp "const void *b1" "const void *b2" "size_t len"
-.Ft void
-.Fn bcopy "const void *src" "void *dst" "size_t len"
-.Ft void
-.Fn bzero "void *b" "size_t len"
-.Ft void *
-.Fn memchr "const void *b" "int c" "size_t len"
-.Ft int
-.Fn memcmp "const void *b1" "const void *b2" "size_t len"
-.Ft void *
-.Fn memccpy "void *dst" "const void *src" "int c" "size_t len"
-.Ft void *
-.Fn memcpy "void *dst" "const void *src" "size_t len"
-.Ft void *
-.Fn memmove "void *dst" "const void *src" "size_t len"
-.Ft void *
-.Fn memset "void *b" "int c" "size_t len"
-.Sh DESCRIPTION
-These functions operate on variable length strings of bytes.
-They do not check for terminating null bytes as the routines
-listed in
-.Xr string 3
-do.
-.Pp
-See the specific manual pages for more information.
-.Sh SEE ALSO
-.Xr bcmp 3 ,
-.Xr bcopy 3 ,
-.Xr bzero 3 ,
-.Xr memccpy 3 ,
-.Xr memchr 3 ,
-.Xr memcmp 3 ,
-.Xr memcpy 3 ,
-.Xr memmove 3 ,
-.Xr memset 3
-.Sh STANDARDS
-The functions
-.Fn memchr ,
-.Fn memcmp ,
-.Fn memcpy ,
-.Fn memmove ,
-and
-.Fn memset
-conform to
-.St -ansiC .
-.Sh HISTORY
-The functions
-.Fn bzero
-and
-.Fn memccpy
-appeared in
-.Bx 4.3 ;
-the functions
-.Fn bcmp ,
-.Fn bcopy ,
-appeared in
-.Bx 4.2 .
diff --git a/lib/libc/string/bzero.3 b/lib/libc/string/bzero.3
deleted file mode 100644
index 46a20ab..0000000
--- a/lib/libc/string/bzero.3
+++ /dev/null
@@ -1,68 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)bzero.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt BZERO 3
-.Os BSD 4.3
-.Sh NAME
-.Nm bzero
-.Nd write zeroes to a byte string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft void
-.Fn bzero "void *b" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn bzero
-function
-writes
-.Fa len
-zero bytes to the string
-.Fa b .
-If
-.Fa len
-is zero,
-.Fn bzero
-does nothing.
-.Sh SEE ALSO
-.Xr memset 3 ,
-.Xr swab 3
-.Sh HISTORY
-A
-.Fn bzero
-function
-appeared in
-.Bx 4.3 .
diff --git a/lib/libc/string/bzero.c b/lib/libc/string/bzero.c
deleted file mode 100644
index 7bc2b3a..0000000
--- a/lib/libc/string/bzero.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define BZERO
-#include "memset.c"
diff --git a/lib/libc/string/ffs.3 b/lib/libc/string/ffs.3
deleted file mode 100644
index 451b7b9..0000000
--- a/lib/libc/string/ffs.3
+++ /dev/null
@@ -1,61 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ffs.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt FFS 3
-.Os
-.Sh NAME
-.Nm ffs
-.Nd find first bit set in a bit string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft int
-.Fn ffs "int value"
-.Sh DESCRIPTION
-The
-.Fn ffs
-function finds the first bit set in
-.Fa value
-and returns the index of that bit.
-Bits are numbered starting from 1, starting at the right-most
-bit.
-A return value of 0 means that the argument was zero.
-.Sh SEE ALSO
-.Xr bitstring 3
-.Sh HISTORY
-The
-.Fn ffs
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libc/string/ffs.c b/lib/libc/string/ffs.c
deleted file mode 100644
index 099ff8e..0000000
--- a/lib/libc/string/ffs.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ffs.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <string.h>
-
-/*
- * ffs -- vax ffs instruction
- */
-int
-ffs(mask)
- register int mask;
-{
- register int bit;
-
- if (mask == 0)
- return(0);
- for (bit = 1; !(mask & 1); bit++)
- mask >>= 1;
- return(bit);
-}
diff --git a/lib/libc/string/index.3 b/lib/libc/string/index.3
deleted file mode 100644
index eb49c8f..0000000
--- a/lib/libc/string/index.3
+++ /dev/null
@@ -1,80 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)index.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt INDEX 3
-.Os
-.Sh NAME
-.Nm index
-.Nd locate character in string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn index "const char *s" "int c"
-.Sh DESCRIPTION
-The
-.Fn index
-function
-locates the first character matching
-.Fa c
-(converted to a
-.Em char )
-in the null-terminated string
-.Fa s .
-.Sh RETURN VALUES
-A pointer to the character is returned if it is found; otherwise
-.Dv NULL
-is returned.
-If
-.Fa c
-is '\e0',
-.Fn index
-locates the terminating '\e0'.
-.Sh SEE ALSO
-.Xr memchr 3 ,
-.Xr rindex 3 ,
-.Xr strchr 3 ,
-.Xr strcspn 3 ,
-.Xr strpbrk 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strstr 3 ,
-.Xr strtok 3
-.Sh HISTORY
-A
-.Fn index
-function appeared in
-.At v6 .
diff --git a/lib/libc/string/index.c b/lib/libc/string/index.c
deleted file mode 100644
index 37e505f..0000000
--- a/lib/libc/string/index.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)index.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-#include <stddef.h>
-
-char *
-#ifdef STRCHR
-strchr(p, ch)
-#else
-index(p, ch)
-#endif
- register const char *p, ch;
-{
- for (;; ++p) {
- if (*p == ch)
- return((char *)p);
- if (!*p)
- return((char *)NULL);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/string/memccpy.3 b/lib/libc/string/memccpy.3
deleted file mode 100644
index 92009bd..0000000
--- a/lib/libc/string/memccpy.3
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)memccpy.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt MEMCCPY 3
-.Os
-.Sh NAME
-.Nm memccpy
-.Nd copy string until character found
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft void *
-.Fn memccpy "void *dst" "const void *src" "int c" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn memccpy
-function
-copies bytes from string
-.Fa src
-to string
-.Fa dst .
-If the character
-.Fa c
-(as converted to an unsigned char) occurs in the string
-.Fa src ,
-the copy stops and a pointer to the byte after the copy of
-.Fa c
-in the string
-.Fa dst
-is returned.
-Otherwise,
-.Fa len
-bytes are copied, and a NULL pointer is returned.
-.Sh SEE ALSO
-.Xr bcopy 3 ,
-.Xr memcpy 3 ,
-.Xr memmove 3 ,
-.Xr strcpy 3
-.Sh HISTORY
-The
-.Fn memccpy
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/string/memccpy.c b/lib/libc/string/memccpy.c
deleted file mode 100644
index c457110..0000000
--- a/lib/libc/string/memccpy.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)memccpy.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-void *
-memccpy(t, f, c, n)
- void *t;
- const void *f;
- int c;
- register size_t n;
-{
-
- if (n) {
- register unsigned char *tp = t;
- register const unsigned char *fp = f;
- register unsigned char uc = c;
- do {
- if ((*tp++ = *fp++) == uc)
- return (tp);
- } while (--n != 0);
- }
- return (0);
-}
diff --git a/lib/libc/string/memchr.3 b/lib/libc/string/memchr.3
deleted file mode 100644
index c94b086..0000000
--- a/lib/libc/string/memchr.3
+++ /dev/null
@@ -1,81 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)memchr.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MEMCHR 3
-.Os
-.Sh NAME
-.Nm memchr
-.Nd locate byte in byte string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft void *
-.Fn memchr "const void *b" "int c" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn memchr
-function
-locates the first occurrence of
-.Fa c
-(converted to an unsigned char)
-in string
-.Fa b .
-.Sh RETURN VALUES
-The
-.Fn memchr
-function
-returns a pointer to the byte located,
-or NULL if no such byte exists within
-.Fa len
-bytes.
-.Sh SEE ALSO
-.Xr index 3 ,
-.Xr rindex 3 ,
-.Xr strchr 3 ,
-.Xr strcspn 3 ,
-.Xr strpbrk 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strstr 3 ,
-.Xr strtok 3
-.Sh STANDARDS
-The
-.Fn memchr
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c
deleted file mode 100644
index 7200894..0000000
--- a/lib/libc/string/memchr.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)memchr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-void *
-memchr(s, c, n)
- const void *s;
- register unsigned char c;
- register size_t n;
-{
- if (n != 0) {
- register const unsigned char *p = s;
-
- do {
- if (*p++ == c)
- return ((void *)(p - 1));
- } while (--n != 0);
- }
- return (NULL);
-}
diff --git a/lib/libc/string/memcmp.3 b/lib/libc/string/memcmp.3
deleted file mode 100644
index 4fbee33..0000000
--- a/lib/libc/string/memcmp.3
+++ /dev/null
@@ -1,83 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)memcmp.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt MEMCMP 3
-.Os
-.Sh NAME
-.Nm memcmp
-.Nd compare byte string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft int
-.Fn memcmp "const void *b1" "const void *b2" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn memcmp
-function
-compares byte string
-.Fa b1
-against byte string
-.Fa b2 .
-Both strings are assumed to be
-.Fa len
-bytes long.
-.Sh RETURN VALUES
-The
-.Fn memcmp
-function
-returns zero if the two strings are identical,
-otherwise returns the difference between the first two differing bytes
-(treated as unsigned char values, so that
-.Sq Li \e200
-is greater than
-.Sq Li \&\e0 ,
-for example).
-Zero-length strings are always identical.
-.Sh SEE ALSO
-.Xr bcmp 3 ,
-.Xr strcasecmp 3 ,
-.Xr strcmp 3 ,
-.Xr strcoll 3 ,
-.Xr strxfrm 3
-.Sh STANDARDS
-The
-.Fn memcmp
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/memcmp.c b/lib/libc/string/memcmp.c
deleted file mode 100644
index d025d89..0000000
--- a/lib/libc/string/memcmp.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)memcmp.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-/*
- * Compare memory regions.
- */
-int
-memcmp(s1, s2, n)
- const void *s1, *s2;
- size_t n;
-{
- if (n != 0) {
- register const unsigned char *p1 = s1, *p2 = s2;
-
- do {
- if (*p1++ != *p2++)
- return (*--p1 - *--p2);
- } while (--n != 0);
- }
- return (0);
-}
diff --git a/lib/libc/string/memcpy.3 b/lib/libc/string/memcpy.3
deleted file mode 100644
index 61b6768..0000000
--- a/lib/libc/string/memcpy.3
+++ /dev/null
@@ -1,83 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)memcpy.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MEMCPY 3
-.Os
-.Sh NAME
-.Nm memcpy
-.Nd copy byte string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft void *
-.Fn memcpy "void *dst" "const void *src" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn memcpy
-function
-copies
-.Fa len
-bytes from string
-.Fa src
-to string
-.Fa dst .
-.Sh RETURN VALUES
-The
-.Fn memcpy
-function
-returns the original value of
-.Fa dst .
-.Sh SEE ALSO
-.Xr bcopy 3 ,
-.Xr memccpy 3 ,
-.Xr memmove 3 ,
-.Xr strcpy 3
-.Sh STANDARDS
-The
-.Fn memcpy
-function
-conforms to
-.St -ansiC .
-.Sh BUGS
-In this implementation
-.Fn memcpy
-is implemented using
-.Xr bcopy 3 ,
-and therefore the strings may overlap.
-On other systems, copying overlapping strings may produce surprises.
-A simpler solution is to not use
-.Fn memcpy .
diff --git a/lib/libc/string/memcpy.c b/lib/libc/string/memcpy.c
deleted file mode 100644
index ee11504..0000000
--- a/lib/libc/string/memcpy.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MEMCOPY
-#include "bcopy.c"
diff --git a/lib/libc/string/memmove.3 b/lib/libc/string/memmove.3
deleted file mode 100644
index 54c2b9b..0000000
--- a/lib/libc/string/memmove.3
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)memmove.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MEMMOVE 3
-.Os
-.Sh NAME
-.Nm memmove
-.Nd copy byte string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft void *
-.Fn memmove "void *dst" "const void *src" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn memmove
-function
-copies
-.Fa len
-bytes from string
-.Fa src
-to string
-.Fa dst .
-The two strings may overlap;
-the copy is always done in a non-destructive manner.
-.Sh RETURN VALUES
-The
-.Fn memmove
-function returns the original value of
-.Fa dst .
-.Sh SEE ALSO
-.Xr bcopy 3 ,
-.Xr memccpy 3 ,
-.Xr memcpy 3 ,
-.Xr strcpy 3
-.Sh STANDARDS
-The
-.Fn memmove
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/memmove.c b/lib/libc/string/memmove.c
deleted file mode 100644
index e9bb2c2..0000000
--- a/lib/libc/string/memmove.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define MEMMOVE
-#include "bcopy.c"
diff --git a/lib/libc/string/memset.3 b/lib/libc/string/memset.3
deleted file mode 100644
index 98e6d5f..0000000
--- a/lib/libc/string/memset.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)memset.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MEMSET 3
-.Os
-.Sh NAME
-.Nm memset
-.Nd write a byte to byte string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft void *
-.Fn memset "void *b" "int c" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn memset
-function
-writes
-.Fa len
-bytes of value
-.Fa c
-(converted to an unsigned char) to the string
-.Fa b .
-.Sh RETURNS
-The
-.Fn memset
-function returns its first argument.
-.Sh SEE ALSO
-.Xr bzero 3 ,
-.Xr swab 3
-.Sh STANDARDS
-The
-.Fn memset
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/memset.c b/lib/libc/string/memset.c
deleted file mode 100644
index 99c72dc..0000000
--- a/lib/libc/string/memset.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Mike Hibler and Chris Torek.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)memset.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <limits.h>
-#include <string.h>
-
-#define wsize sizeof(u_int)
-#define wmask (wsize - 1)
-
-#ifdef BZERO
-#define RETURN return
-#define VAL 0
-#define WIDEVAL 0
-
-void
-bzero(dst0, length)
- void *dst0;
- register size_t length;
-#else
-#define RETURN return (dst0)
-#define VAL c0
-#define WIDEVAL c
-
-void *
-memset(dst0, c0, length)
- void *dst0;
- register int c0;
- register size_t length;
-#endif
-{
- register size_t t;
- register u_int c;
- register u_char *dst;
-
- dst = dst0;
- /*
- * If not enough words, just fill bytes. A length >= 2 words
- * guarantees that at least one of them is `complete' after
- * any necessary alignment. For instance:
- *
- * |-----------|-----------|-----------|
- * |00|01|02|03|04|05|06|07|08|09|0A|00|
- * ^---------------------^
- * dst dst+length-1
- *
- * but we use a minimum of 3 here since the overhead of the code
- * to do word writes is substantial.
- */
- if (length < 3 * wsize) {
- while (length != 0) {
- *dst++ = VAL;
- --length;
- }
- RETURN;
- }
-
-#ifndef BZERO
- if ((c = (u_char)c0) != 0) { /* Fill the word. */
- c = (c << 8) | c; /* u_int is 16 bits. */
-#if UINT_MAX > 0xffff
- c = (c << 16) | c; /* u_int is 32 bits. */
-#endif
-#if UINT_MAX > 0xffffffff
- c = (c << 32) | c; /* u_int is 64 bits. */
-#endif
- }
-#endif
- /* Align destination by filling in bytes. */
- if ((t = (int)dst & wmask) != 0) {
- t = wsize - t;
- length -= t;
- do {
- *dst++ = VAL;
- } while (--t != 0);
- }
-
- /* Fill words. Length was >= 2*words so we know t >= 1 here. */
- t = length / wsize;
- do {
- *(u_int *)dst = WIDEVAL;
- dst += wsize;
- } while (--t != 0);
-
- /* Mop up trailing bytes, if any. */
- t = length & wmask;
- if (t != 0)
- do {
- *dst++ = VAL;
- } while (--t != 0);
- RETURN;
-}
diff --git a/lib/libc/string/rindex.3 b/lib/libc/string/rindex.3
deleted file mode 100644
index 78d3294..0000000
--- a/lib/libc/string/rindex.3
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)rindex.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt RINDEX 3
-.Os
-.Sh NAME
-.Nm rindex
-.Nd locate character in string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn rindex "const char *s" "int c"
-.Sh DESCRIPTION
-The
-.Fn rindex
-function
-locates the last character
-matching
-.Fa c
-(converted to a
-.Em char )
-in the null-terminated string
-.Fa s .
-.Sh RETURN VALUES
-A pointer to the character is returned if it is found; otherwise
-NULL is returned.
-If
-.Fa c
-is
-.Ql \e0 ,
-.Fn rindex
-locates the terminating
-.Ql \e0 .
-.Sh SEE ALSO
-.Xr index 3 ,
-.Xr memchr 3 ,
-.Xr strchr 3 ,
-.Xr strcspn 3 ,
-.Xr strpbrk 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strstr 3 ,
-.Xr strtok 3
-.Sh HISTORY
-A
-.Fn rindex
-function appeared in
-.At v6 .
diff --git a/lib/libc/string/rindex.c b/lib/libc/string/rindex.c
deleted file mode 100644
index 69dced4..0000000
--- a/lib/libc/string/rindex.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rindex.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-#include <string.h>
-
-char *
-#ifdef STRRCHR
-strrchr(p, ch)
-#else
-rindex(p, ch)
-#endif
- register const char *p;
- register int ch;
-{
- register char *save;
-
- for (save = NULL;; ++p) {
- if (*p == ch)
- save = (char *)p;
- if (!*p)
- return(save);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/string/strcasecmp.3 b/lib/libc/string/strcasecmp.3
deleted file mode 100644
index c26740e..0000000
--- a/lib/libc/string/strcasecmp.3
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt STRCASECMP 3
-.Os
-.Sh NAME
-.Nm strcasecmp
-.Nd compare strings, ignoring case
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft int
-.Fn strcasecmp "const char *s1" "const char *s2"
-.Ft int
-.Fn strncasecmp "const char *s1" "const char *s2" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn strcasecmp
-and
-.Fn strncasecmp
-functions
-compare the null-terminated strings
-.Fa s1
-and
-.Fa s2
-and return an integer greater than, equal to, or less than 0,
-according as
-.Fa s1
-is lexicographically greater than, equal to, or less than
-.Fa s2
-after translation of each corresponding character to lower-case.
-The strings themselves are not modified.
-The comparison is done using unsigned characters, so that
-.Sq Li \e200
-is greater than
-.Ql \e0 .
-.Pp
-The
-.Fn strncasecmp
-compares at most
-.Fa len
-characters.
-.Sh SEE ALSO
-.Xr bcmp 3 ,
-.Xr memcmp 3 ,
-.Xr strcmp 3 ,
-.Xr strcoll 3 ,
-.Xr strxfrm 3
-.Sh HISTORY
-The
-.Fn strcasecmp
-and
-.Fn strncasecmp
-functions first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/string/strcasecmp.c b/lib/libc/string/strcasecmp.c
deleted file mode 100644
index 463c4de..0000000
--- a/lib/libc/string/strcasecmp.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#include <string.h>
-#include <ctype.h>
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strcasecmp.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-typedef unsigned char u_char;
-
-int
-strcasecmp(s1, s2)
- const char *s1, *s2;
-{
- register const u_char
- *us1 = (const u_char *)s1,
- *us2 = (const u_char *)s2;
-
- while (tolower(*us1) == tolower(*us2++))
- if (*us1++ == '\0')
- return (0);
- return (tolower(*us1) - tolower(*--us2));
-}
-
-int
-strncasecmp(s1, s2, n)
- const char *s1, *s2;
- register size_t n;
-{
- if (n != 0) {
- register const u_char
- *us1 = (const u_char *)s1,
- *us2 = (const u_char *)s2;
-
- do {
- if (tolower(*us1) != tolower(*us2++))
- return (tolower(*us1) - tolower(*--us2));
- if (*us1++ == '\0')
- break;
- } while (--n != 0);
- }
- return (0);
-}
diff --git a/lib/libc/string/strcat.3 b/lib/libc/string/strcat.3
deleted file mode 100644
index 0d34d58..0000000
--- a/lib/libc/string/strcat.3
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strcat.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRCAT 3
-.Os
-.Sh NAME
-.Nm strcat
-.Nd concatenate strings
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strcat "char *s" "const char *append"
-.Ft char *
-.Fn strncat "char *s" "const char *append" "size_t count"
-.Sh DESCRIPTION
-The
-.Fn strcat
-and
-.Fn strncat
-functions
-append a copy of the null-terminated string
-.Fa append
-to the end of the null-terminated string
-.Fa s ,
-then add a terminating
-.Ql \e0 .
-The string
-.Fa s
-must have sufficient space to hold the result.
-.Pp
-The
-.Fn strncat
-function
-appends not more than
-.Fa count
-characters from
-.Fa append ,
-and then adds a terminating
-.Ql \e0.
-.Sh RETURN VALUES
-The
-.Fn strcat
-and
-.Fn strncat
-functions
-return the pointer
-.Fa s .
-.Sh SEE ALSO
-.Xr bcopy 3 ,
-.Xr memccpy 3 ,
-.Xr memcpy 3 ,
-.Xr memmove 3 ,
-.Xr strcpy 3
-.Sh STANDARDS
-The
-.Fn strcat
-and
-.Fn strncat
-functions
-conform to
-.St -ansiC .
diff --git a/lib/libc/string/strcat.c b/lib/libc/string/strcat.c
deleted file mode 100644
index 3436967..0000000
--- a/lib/libc/string/strcat.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strcat.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <string.h>
-
-char *
-strcat(s, append)
- register char *s;
- register const char *append;
-{
- char *save = s;
-
- for (; *s; ++s);
- while (*s++ = *append++);
- return(save);
-}
diff --git a/lib/libc/string/strchr.3 b/lib/libc/string/strchr.3
deleted file mode 100644
index d139f8e..0000000
--- a/lib/libc/string/strchr.3
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strchr.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt STRCHR 3
-.Os
-.Sh NAME
-.Nm strchr
-.Nd locate character in string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strchr "const char *s" "int c"
-.Sh DESCRIPTION
-The
-.Fn strchr
-function locates the first occurrence of
-.Ar c
-in the string pointed to by
-.Ar s .
-The terminating
-.Dv NUL
-character is considered part of the string.
-If
-.Fa c
-is
-.Ql \e0 ,
-.Fn strchr
-locates the terminating
-.Ql \e0 .
-.Sh RETURN VALUES
-The function
-.Fn strchr
-returns a pointer to the located character, or
-.Dv NULL
-if the character does not appear in the string.
-.Sh SEE ALSO
-.Xr index 3 ,
-.Xr memchr 3 ,
-.Xr rindex 3 ,
-.Xr strcspn 3 ,
-.Xr strpbrk 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strstr 3 ,
-.Xr strtok 3
-.Sh STANDARDS
-The
-.Fn strchr
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/strchr.c b/lib/libc/string/strchr.c
deleted file mode 100644
index ee33662..0000000
--- a/lib/libc/string/strchr.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define STRCHR
-#include "index.c"
diff --git a/lib/libc/string/strcmp.3 b/lib/libc/string/strcmp.3
deleted file mode 100644
index 49e5f14..0000000
--- a/lib/libc/string/strcmp.3
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strcmp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRCMP 3
-.Os
-.Sh NAME
-.Nm strcmp
-.Nd compare strings
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft int
-.Fn strcmp "const char *s1" "const char *s2"
-.Ft int
-.Fn strncmp "const char *s1" "const char *s2" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn strcmp
-and
-.Fn strncmp
-functions
-lexicographically compare the null-terminated strings
-.Fa s1
-and
-.Fa s2 .
-.Sh RETURN VALUES
-The
-.Fn strcmp
-and
-.Fn strncmp
-return an integer greater than, equal to, or less than 0, according
-as the string
-.Fa s1
-is greater than, equal to, or less than the string
-.Fa s2 .
-The comparison is done using unsigned characters, so that
-.Ql \e200
-is greater than
-.Ql \e0 .
-.Pp
-The
-.Fn strncmp
-compares not more than
-.Fa len
-characters.
-.Sh SEE ALSO
-.Xr bcmp 3 ,
-.Xr memcmp 3 ,
-.Xr strcasecmp 3 ,
-.Xr strcoll 3 ,
-.Xr strxfrm 3
-.Sh STANDARDS
-The
-.Fn strcmp
-and
-.Fn strncmp
-functions
-conform to
-.St -ansiC .
diff --git a/lib/libc/string/strcmp.c b/lib/libc/string/strcmp.c
deleted file mode 100644
index cf25e50..0000000
--- a/lib/libc/string/strcmp.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strcmp.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-/*
- * Compare strings.
- */
-int
-strcmp(s1, s2)
- register const char *s1, *s2;
-{
- while (*s1 == *s2++)
- if (*s1++ == 0)
- return (0);
- return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1));
-}
diff --git a/lib/libc/string/strcoll.3 b/lib/libc/string/strcoll.3
deleted file mode 100644
index 08f48ad..0000000
--- a/lib/libc/string/strcoll.3
+++ /dev/null
@@ -1,72 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strcoll.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRCOLL 3
-.Os
-.Sh NAME
-.Nm strcoll
-.Nd compare strings according to current collation
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft int
-.Fn strcoll "const char *s1" "const char *s2"
-.Sh DESCRIPTION
-The
-.Fn strcoll
-function
-lexicographically compares the null-terminated strings
-.Fa s1
-and
-.Fa s2
-according to the current locale collation if any, otherwise call
-.Fa strcmp ,
-and returns an integer greater than, equal to, or less than 0,
-according as
-.Fa s1
-is greater than, equal to, or less than
-.Fa s2 .
-.Sh SEE ALSO
-.Xr setlocale 3 ,
-.Xr strcmp 3 ,
-.Xr strxfrm 3
-.Sh STANDARDS
-The
-.Fn strcoll
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/strcoll.c b/lib/libc/string/strcoll.c
deleted file mode 100644
index 259ca23..0000000
--- a/lib/libc/string/strcoll.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-
- * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
- * at Electronni Visti IA, Kiev, Ukraine.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include "collate.h"
-
-int
-strcoll(s, s2)
- const char *s, *s2;
-{
- int len, len2, prim, prim2, sec, sec2, ret, ret2;
- char *tt, *t, *tt2, *t2;
-
- if (__collate_load_error)
- return strcmp(s, s2);
-
- len = len2 = 1;
- ret = ret2 = 0;
- tt = t = __collate_substitute(s);
- tt2 = t2 = __collate_substitute(s2);
- while(*t && *t2) {
- prim = prim2 = 0;
- while(*t && !prim) {
- __collate_lookup(t, &len, &prim, &sec);
- t += len;
- }
- while(*t2 && !prim2) {
- __collate_lookup(t2, &len2, &prim2, &sec2);
- t2 += len2;
- }
- if(!prim || !prim2)
- break;
- if(prim != prim2) {
- ret = prim - prim2;
- goto end;
- }
- if(!ret2)
- ret2 = sec - sec2;
- }
- if(!*t && *t2)
- ret = -(int)((u_char)*t2);
- else if(*t && !*t2)
- ret = (u_char)*t;
- else if(!*t && !*t2)
- ret = ret2;
- end:
- free(tt);
- free(tt2);
-
- return ret;
-}
diff --git a/lib/libc/string/strcpy.3 b/lib/libc/string/strcpy.3
deleted file mode 100644
index 1e6f335..0000000
--- a/lib/libc/string/strcpy.3
+++ /dev/null
@@ -1,121 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strcpy.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRCPY 3
-.Os BSD 4
-.Sh NAME
-.Nm strcpy
-.Nd copy strings
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strcpy "char *dst" "const char *src"
-.Ft char *
-.Fn strncpy "char *dst" "const char *src" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn strcpy
-and
-.Fn strncpy
-functions
-copy the string
-.Fa src
-to
-.Fa dst
-(including the terminating
-.Ql \e0
-character).
-.Pp
-The
-.Fn strncpy
-copies not more than
-.Fa len
-characters into
-.Fa dst ,
-appending
-.Ql \e0
-characters if
-.Fa src
-is less than
-.Fa len
-characters long, and
-.Em not
-terminating
-.Fa dst
-if
-.Fa src
-is more than
-.Fa len
-characters long.
-.Sh RETURN VALUES
-The
-.Fn strcpy
-and
-.Fn strncpy
-functions
-return
-.Fa dst .
-.Sh EXAMPLES
-The following sets
-.Dq Li chararray
-to
-.Dq Li abc\e0\e0\e0 :
-.Bd -literal -offset indent
-(void)strncpy(chararray, "abc", 6).
-.Ed
-.Pp
-The following sets
-.Dq Li chararray
-to
-.Dq Li abcdef :
-.Bd -literal -offset indent
-(void)strncpy(chararray, "abcdefgh", 6);
-.Ed
-.Sh SEE ALSO
-.Xr bcopy 3 ,
-.Xr memccpy 3 ,
-.Xr memcpy 3 ,
-.Xr memmove 3
-.Sh STANDARDS
-The
-.Fn strcpy
-and
-.Fn strncpy
-functions
-conform to
-.St -ansiC .
diff --git a/lib/libc/string/strcpy.c b/lib/libc/string/strcpy.c
deleted file mode 100644
index d1791dd..0000000
--- a/lib/libc/string/strcpy.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strcpy.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-char *
-strcpy(to, from)
- register char *to;
- register const char *from;
-{
- char *save = to;
-
- for (; *to = *from; ++from, ++to);
- return(save);
-}
diff --git a/lib/libc/string/strcspn.3 b/lib/libc/string/strcspn.3
deleted file mode 100644
index 89d20fd..0000000
--- a/lib/libc/string/strcspn.3
+++ /dev/null
@@ -1,84 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strcspn.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRCSPN 3
-.Os
-.Sh NAME
-.Nm strcspn
-.Nd span the complement of a string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft size_t
-.Fn strcspn "const char *s" "const char *charset"
-.Sh DESCRIPTION
-The
-.Fn strcspn
-function
-spans the initial part of the null-terminated string
-.Fa s
-as long as the characters from
-.Fa s
-do not occur in string
-.Fa charset
-(it
-spans the
-.Em complement
-of
-.Fa charset ) .
-.Sh RETURN VALUES
-The
-.Fn strcspn
-function
-returns the number of characters spanned.
-.Sh SEE ALSO
-.Xr index 3 ,
-.Xr memchr 3 ,
-.Xr rindex 3 ,
-.Xr strchr 3 ,
-.Xr strpbrk 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strstr 3 ,
-.Xr strtok 3
-.Sh STANDARDS
-The
-.Fn strcspn
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/strcspn.c b/lib/libc/string/strcspn.c
deleted file mode 100644
index a1c2e1d..0000000
--- a/lib/libc/string/strcspn.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strcspn.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-/*
- * Span the complement of string s2.
- */
-size_t
-strcspn(s1, s2)
- const char *s1;
- register const char *s2;
-{
- register const char *p, *spanp;
- register char c, sc;
-
- /*
- * Stop as soon as we find any character from s2. Note that there
- * must be a NUL in s2; it suffices to stop when we find that, too.
- */
- for (p = s1;;) {
- c = *p++;
- spanp = s2;
- do {
- if ((sc = *spanp++) == c)
- return (p - 1 - s1);
- } while (sc != 0);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/string/strdup.3 b/lib/libc/string/strdup.3
deleted file mode 100644
index c99b416..0000000
--- a/lib/libc/string/strdup.3
+++ /dev/null
@@ -1,65 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strdup.3 8.1 (Berkeley) 6/9/93
-.\" $Id$
-.\"
-.Dd June 9, 1993
-.Dt STRDUP 3
-.Os
-.Sh NAME
-.Nm strdup
-.Nd save a copy of a string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strdup "const char *str"
-.Sh DESCRIPTION
-The
-.Fn strdup
-function
-allocates sufficient memory for a copy
-of the string
-.Fa str ,
-does the copy, and returns a pointer to it.
-The pointer may subsequently be used as an
-argument to the function
-.Xr free 3 .
-.Pp
-If insufficient memory is available, NULL is returned.
-.Sh SEE ALSO
-.Xr free 3 ,
-.Xr malloc 3
-.Sh HISTORY
-The
-.Fn strdup
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/string/strdup.c b/lib/libc/string/strdup.c
deleted file mode 100644
index a1c2eed..0000000
--- a/lib/libc/string/strdup.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-char *
-strdup(str)
- const char *str;
-{
- size_t len;
- char *copy;
-
- len = strlen(str) + 1;
- if ((copy = malloc(len)) == NULL)
- return (NULL);
- memcpy(copy, str, len);
- return (copy);
-}
diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3
deleted file mode 100644
index 67c22db..0000000
--- a/lib/libc/string/strerror.3
+++ /dev/null
@@ -1,130 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strerror.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt STRERROR 3
-.Os BSD 4
-.Sh NAME
-.Nm perror ,
-.Nm strerror ,
-.Nm sys_errlist ,
-.Nm sys_nerr
-.Nd system error messages
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft void
-.Fn perror "const char *string"
-.Vt extern const char * const sys_errlist[];
-.Vt extern const int sys_nerr;
-.Fd #include <string.h>
-.Ft char *
-.Fn strerror "int errnum"
-.Sh DESCRIPTION
-The
-.Fn strerror
-and
-.Fn perror
-functions look up the error message string corresponding to an
-error number.
-.Pp
-The
-.Fn strerror
-function accepts an error number argument
-.Fa errnum
-and
-returns a pointer to the corresponding
-message string.
-.Pp
-The
-.Fn perror
-function finds the error message corresponding to the current
-value of the global variable
-.Va errno
-.Pq Xr intro 2
-and writes it, followed by a newline, to the
-standard error file descriptor.
-If the argument
-.Fa string
-is
-.Pf non- Dv NULL ,
-it is prepended to the message
-string and separated from it by
-a colon and space
-.Pq Ql \&:\ \& .
-If
-.Fa string
-is
-.Dv NULL ,
-only the error message string is printed.
-.Pp
-If
-.Fa errnum
-is not a recognized error number,
-the error message string will contain
-.Dq Li "Unknown error:\0
-followed by the error number in decimal.
-.Pp
-The message strings can be accessed directly using the external
-array
-.Va sys_errlist .
-The external value
-.Va sys_nerr
-contains a count of the messages in
-.Va sys_errlist .
-The use of these variables is deprecated;
-.Fn strerror
-should be used instead.
-.Sh SEE ALSO
-.Xr intro 2 ,
-.Xr psignal 3
-.Sh HISTORY
-The
-.Fn strerror
-and
-.Fn perror
-functions first appeared in
-.Bx 4.4 .
-.Sh BUGS
-For unknown error numbers, the
-.Fn strerror
-function will return its result in a static buffer which
-may be overwritten by subsequent calls.
-.Pp
-Programs that use the deprecated
-.Va sys_errlist
-variable often fail to compile because they declare it
-inconsistently.
diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c
deleted file mode 100644
index 5acefd9..0000000
--- a/lib/libc/string/strerror.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdio.h>
-#include <string.h>
-
-char *
-strerror(num)
- int num;
-{
-#define UPREFIX "Unknown error: "
- static char ebuf[40] = UPREFIX; /* 64-bit number + slop */
- register unsigned int errnum;
- register char *p, *t;
- char tmp[40];
-
- errnum = num; /* convert to unsigned */
- if (errnum < sys_nerr)
- return ((char *)sys_errlist[errnum]);
-
- /* Do this by hand, so we don't link to stdio(3). */
- t = tmp;
- if (num < 0)
- errnum = -errnum;
- do {
- *t++ = "0123456789"[errnum % 10];
- } while (errnum /= 10);
- if (num < 0)
- *t++ = '-';
- for (p = ebuf + sizeof(UPREFIX) - 1;;) {
- *p++ = *--t;
- if (t <= tmp)
- break;
- }
- *p = '\0';
- return (ebuf);
-}
diff --git a/lib/libc/string/string.3 b/lib/libc/string/string.3
deleted file mode 100644
index 462482f..0000000
--- a/lib/libc/string/string.3
+++ /dev/null
@@ -1,156 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)string.3 8.2 (Berkeley) 12/11/93
-.\" $Id$
-.\"
-.Dd December 11, 1993
-.Dt STRING 3
-.Os BSD 4
-.Sh NAME
-.Nm strcat ,
-.Nm strncat ,
-.Nm strchr ,
-.Nm strrchr ,
-.Nm strcmp ,
-.Nm strncmp ,
-.Nm strcasecmp,
-.Nm strncasecmp ,
-.Nm strcpy ,
-.Nm strncpy ,
-.Nm strerror ,
-.Nm strlen ,
-.Nm strpbrk ,
-.Nm strsep,
-.Nm strspn ,
-.Nm strcspn ,
-.Nm strstr ,
-.Nm strtok ,
-.Nm index ,
-.Nm rindex
-.Nd string specific functions
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strcat "char *s" "const char * append"
-.Ft char *
-.Fn strncat "char *s" "const char *append" "size_t count"
-.Ft char *
-.Fn strchr "const char *s" "int c"
-.Ft char *
-.Fn strrchr "const char *s" "int c"
-.Ft int
-.Fn strcmp "const char *s1" "const char *s2"
-.Ft int
-.Fn strncmp "const char *s1" "const char *s2" "size_t count"
-.Ft int
-.Fn strcasecmp "const char *s1" "const char *s2"
-.Ft int
-.Fn strncasecmp "const char *s1" "const char *s2" "size_t count"
-.Ft char *
-.Fn strcpy "char *dst" "const char *src"
-.Ft char *
-.Fn strncpy "char *dst" "const char *src" "size_t count"
-.Ft char *
-.Fn strerror "int errno"
-.Ft size_t
-.Fn strlen "const char *s"
-.Ft char *
-.Fn strpbrk "const char *s" "const char *charset"
-.Ft char *
-.Fn strsep "char **stringp" "const char *delim"
-.Ft size_t
-.Fn strspn "const char *s" "const char *charset"
-.Ft size_t
-.Fn strcspn "const char *s" "const char *charset"
-.Ft char *
-.Fn strstr "const char *big" "const char *little"
-.Ft char *
-.Fn strtok "char *s" "const char *delim"
-.Ft char *
-.Fn index "const char *s" "int c"
-.Ft char *
-.Fn rindex "const char *s" "int c"
-.Sh DESCRIPTION
-The string
-functions manipulate strings terminated by a
-null byte.
-.Pp
-See the specific manual pages for more information.
-For manipulating variable length generic objects as byte
-strings (without the null byte check), see
-.Xr bstring 3 .
-.Pp
-Except as noted in their specific manual pages,
-the string functions do not test the destination
-for size limitations.
-.Sh SEE ALSO
-.Xr bstring 3 ,
-.Xr index 3 ,
-.Xr rindex 3 ,
-.Xr strcasecmp 3 ,
-.Xr strcat 3 ,
-.Xr strchr 3 ,
-.Xr strcmp 3 ,
-.Xr strcpy 3 ,
-.Xr strcspn 3 ,
-.Xr strerror 3 ,
-.Xr strlen 3 ,
-.Xr strpbrk 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strstr 3 ,
-.Xr strtok 3
-.Sh STANDARDS
-The
-.Fn strcat ,
-.Fn strncat ,
-.Fn strchr ,
-.Fn strrchr ,
-.Fn strcmp ,
-.Fn strncmp ,
-.Fn strcpy ,
-.Fn strncpy ,
-.Fn strerror ,
-.Fn strlen ,
-.Fn strpbrk ,
-.Fn strsep ,
-.Fn strspn ,
-.Fn strcspn ,
-.Fn strstr ,
-and
-.Fn strtok
-functions
-conform to
-.St -ansiC .
diff --git a/lib/libc/string/strlen.3 b/lib/libc/string/strlen.3
deleted file mode 100644
index 04cb48e..0000000
--- a/lib/libc/string/strlen.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strlen.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRLEN 3
-.Os
-.Sh NAME
-.Nm strlen
-.Nd find length of string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft size_t
-.Fn strlen "const char *s"
-.Sh DESCRIPTION
-The
-.Fn strlen
-function
-computes the length of the string
-.Fa s .
-.Sh RETURN VALUES
-The
-.Fn strlen
-function
-returns
-the number of characters that precede the
-terminating
-.Dv NUL
-character.
-.Sh SEE ALSO
-.Xr string 3
-.Sh STANDARDS
-The
-.Fn strlen
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/strlen.c b/lib/libc/string/strlen.c
deleted file mode 100644
index 323fbe4..0000000
--- a/lib/libc/string/strlen.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strlen.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-size_t
-strlen(str)
- const char *str;
-{
- register const char *s;
-
- for (s = str; *s; ++s);
- return(s - str);
-}
-
diff --git a/lib/libc/string/strmode.3 b/lib/libc/string/strmode.3
deleted file mode 100644
index 3efc889..0000000
--- a/lib/libc/string/strmode.3
+++ /dev/null
@@ -1,150 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strmode.3 8.3 (Berkeley) 7/28/94
-.\"
-.Dd July 28, 1994
-.Dt STRMODE 3
-.Os
-.Sh NAME
-.Nm strmode
-.Nd convert inode status information into a symbolic string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft void
-.Fn strmode "mode_t mode" "char *bp"
-.Sh DESCRIPTION
-The
-.Fn strmode
-function
-converts a file
-.Fa mode
-(the type and permission information associated with an inode, see
-.Xr stat 2 )
-into a symbolic string which is stored in the location referenced by
-.Fa bp .
-This stored string is eleven characters in length plus a trailing
-.Dv NULL .
-.Pp
-The first character is the inode type, and will be one of the following:
-.Pp
-.Bl -tag -width flag -offset indent -compact
-.It \-
-regular file
-.It b
-block special
-.It c
-character special
-.It d
-directory
-.It l
-symbolic link
-.It p
-fifo
-.It s
-socket
-.It w
-whiteout
-.It ?
-unknown inode type
-.El
-.Pp
-The next nine characters encode three sets of permissions, in three
-characters each.
-The first three characters are the permissions for the owner of the
-file, the second three for the group the file belongs to, and the
-third for the ``other'', or default, set of users.
-.Pp
-Permission checking is done as specifically as possible.
-If read permission is denied to the owner of a file in the first set
-of permissions, the owner of the file will not be able to read the file.
-This is true even if the owner is in the file's group and the group
-permissions allow reading or the ``other'' permissions allow reading.
-.Pp
-If the first character of the three character set is an ``r'', the file is
-readable for that set of users; if a dash ``\-'', it is not readable.
-.Pp
-If the second character of the three character set is a ``w'', the file is
-writable for that set of users; if a dash ``\-'', it is not writable.
-.Pp
-The third character is the first of the following characters that apply:
-.Bl -tag -width xxxx
-.It S
-If the character is part of the owner permissions and the file is not
-executable or the directory is not searchable by the owner, and the
-set-user-id bit is set.
-.It S
-If the character is part of the group permissions and the file is not
-executable or the directory is not searchable by the group, and the
-set-group-id bit is set.
-.It T
-If the character is part of the other permissions and the file is not
-executable or the directory is not searchable by others, and the ``sticky''
-.Pq Dv S_ISVTX
-bit is set.
-.It s
-If the character is part of the owner permissions and the file is
-executable or the directory searchable by the owner, and the set-user-id
-bit is set.
-.It s
-If the character is part of the group permissions and the file is
-executable or the directory searchable by the group, and the set-group-id
-bit is set.
-.It t
-If the character is part of the other permissions and the file is
-executable or the directory searchable by others, and the ``sticky''
-.Pq Dv S_ISVTX
-bit is set.
-.It x
-The file is executable or the directory is searchable.
-.It \-
-None of the above apply.
-.El
-.Pp
-The last character is a plus sign ``+'' if any there are any alternate
-or additional access control methods associated with the inode, otherwise
-it will be a space.
-.Sh RETURN VALUES
-The
-.Fn strmode
-function
-always returns 0.
-.Sh SEE ALSO
-.Xr chmod 1 ,
-.Xr find 1 ,
-.Xr stat 2 ,
-.Xr getmode 3 ,
-.Xr setmode 3
-.Sh HISTORY
-The
-.Fn strmode
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/string/strmode.c b/lib/libc/string/strmode.c
deleted file mode 100644
index 2c3f44a..0000000
--- a/lib/libc/string/strmode.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strmode.c 8.3 (Berkeley) 8/15/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <string.h>
-
-void
-strmode(mode, p)
- register mode_t mode;
- register char *p;
-{
- /* print type */
- switch (mode & S_IFMT) {
- case S_IFDIR: /* directory */
- *p++ = 'd';
- break;
- case S_IFCHR: /* character special */
- *p++ = 'c';
- break;
- case S_IFBLK: /* block special */
- *p++ = 'b';
- break;
- case S_IFREG: /* regular */
- *p++ = '-';
- break;
- case S_IFLNK: /* symbolic link */
- *p++ = 'l';
- break;
- case S_IFSOCK: /* socket */
- *p++ = 's';
- break;
-#ifdef S_IFIFO
- case S_IFIFO: /* fifo */
- *p++ = 'p';
- break;
-#endif
-#ifdef S_IFWHT
- case S_IFWHT: /* whiteout */
- *p++ = 'w';
- break;
-#endif
- default: /* unknown */
- *p++ = '?';
- break;
- }
- /* usr */
- if (mode & S_IRUSR)
- *p++ = 'r';
- else
- *p++ = '-';
- if (mode & S_IWUSR)
- *p++ = 'w';
- else
- *p++ = '-';
- switch (mode & (S_IXUSR | S_ISUID)) {
- case 0:
- *p++ = '-';
- break;
- case S_IXUSR:
- *p++ = 'x';
- break;
- case S_ISUID:
- *p++ = 'S';
- break;
- case S_IXUSR | S_ISUID:
- *p++ = 's';
- break;
- }
- /* group */
- if (mode & S_IRGRP)
- *p++ = 'r';
- else
- *p++ = '-';
- if (mode & S_IWGRP)
- *p++ = 'w';
- else
- *p++ = '-';
- switch (mode & (S_IXGRP | S_ISGID)) {
- case 0:
- *p++ = '-';
- break;
- case S_IXGRP:
- *p++ = 'x';
- break;
- case S_ISGID:
- *p++ = 'S';
- break;
- case S_IXGRP | S_ISGID:
- *p++ = 's';
- break;
- }
- /* other */
- if (mode & S_IROTH)
- *p++ = 'r';
- else
- *p++ = '-';
- if (mode & S_IWOTH)
- *p++ = 'w';
- else
- *p++ = '-';
- switch (mode & (S_IXOTH | S_ISVTX)) {
- case 0:
- *p++ = '-';
- break;
- case S_IXOTH:
- *p++ = 'x';
- break;
- case S_ISVTX:
- *p++ = 'T';
- break;
- case S_IXOTH | S_ISVTX:
- *p++ = 't';
- break;
- }
- *p++ = ' '; /* will be a '+' if ACL's implemented */
- *p = '\0';
-}
diff --git a/lib/libc/string/strncat.c b/lib/libc/string/strncat.c
deleted file mode 100644
index 1b82a75..0000000
--- a/lib/libc/string/strncat.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strncat.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-/*
- * Concatenate src on the end of dst. At most strlen(dst)+n+1 bytes
- * are written at dst (at most n+1 bytes being appended). Return dst.
- */
-char *
-strncat(dst, src, n)
- char *dst;
- const char *src;
- register size_t n;
-{
- if (n != 0) {
- register char *d = dst;
- register const char *s = src;
-
- while (*d != 0)
- d++;
- do {
- if ((*d = *s++) == 0)
- break;
- d++;
- } while (--n != 0);
- *d = 0;
- }
- return (dst);
-}
diff --git a/lib/libc/string/strncmp.c b/lib/libc/string/strncmp.c
deleted file mode 100644
index 4b701a9..0000000
--- a/lib/libc/string/strncmp.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strncmp.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-int
-strncmp(s1, s2, n)
- register const char *s1, *s2;
- register size_t n;
-{
-
- if (n == 0)
- return (0);
- do {
- if (*s1 != *s2++)
- return (*(const unsigned char *)s1 -
- *(const unsigned char *)(s2 - 1));
- if (*s1++ == 0)
- break;
- } while (--n != 0);
- return (0);
-}
diff --git a/lib/libc/string/strncpy.c b/lib/libc/string/strncpy.c
deleted file mode 100644
index 9e72740..0000000
--- a/lib/libc/string/strncpy.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strncpy.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-/*
- * Copy src to dst, truncating or null-padding to always copy n bytes.
- * Return dst.
- */
-char *
-strncpy(dst, src, n)
- char *dst;
- const char *src;
- register size_t n;
-{
- if (n != 0) {
- register char *d = dst;
- register const char *s = src;
-
- do {
- if ((*d++ = *s++) == 0) {
- /* NUL pad the remaining n-1 bytes */
- while (--n != 0)
- *d++ = 0;
- break;
- }
- } while (--n != 0);
- }
- return (dst);
-}
diff --git a/lib/libc/string/strpbrk.3 b/lib/libc/string/strpbrk.3
deleted file mode 100644
index 6b0edaf..0000000
--- a/lib/libc/string/strpbrk.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strpbrk.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRPBRK 3
-.Os
-.Sh NAME
-.Nm strpbrk
-.Nd locate multiple characters in string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strpbrk "const char *s" "const char *charset"
-.Sh DESCRIPTION
-The
-.Fn strpbrk
-function
-locates in the null-terminated string
-.Fa s
-the first occurrence of any character in the string
-.Fa charset
-and returns a pointer to this character.
-If no characters from
-.Fa charset
-occur anywhere in
-.Fa s
-.Fn strpbrk
-returns NULL.
-.Sh SEE ALSO
-.Xr index 3 ,
-.Xr memchr 3 ,
-.Xr rindex 3 ,
-.Xr strchr 3 ,
-.Xr strcspn 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strstr 3 ,
-.Xr strtok 3
-.Sh STANDARDS
-The
-.Fn strpbrk
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/strpbrk.c b/lib/libc/string/strpbrk.c
deleted file mode 100644
index 119d8b7..0000000
--- a/lib/libc/string/strpbrk.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strpbrk.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-/*
- * Find the first occurrence in s1 of a character in s2 (excluding NUL).
- */
-char *
-strpbrk(s1, s2)
- register const char *s1, *s2;
-{
- register const char *scanp;
- register int c, sc;
-
- while ((c = *s1++) != 0) {
- for (scanp = s2; (sc = *scanp++) != 0;)
- if (sc == c)
- return ((char *)(s1 - 1));
- }
- return (NULL);
-}
diff --git a/lib/libc/string/strrchr.3 b/lib/libc/string/strrchr.3
deleted file mode 100644
index dd551d4..0000000
--- a/lib/libc/string/strrchr.3
+++ /dev/null
@@ -1,90 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strrchr.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRRCHR 3
-.Os
-.Sh NAME
-.Nm strrchr
-.Nd locate character in string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strrchr "const char *s" "int c"
-.Sh DESCRIPTION
-The
-.Fn strrchr
-function
-locates the last occurrence of
-.Fa c
-(converted to a char)
-in the string
-.Fa s .
-If
-.Fa c
-is
-.Ql \e0 ,
-.Fn strrchr
-locates the terminating
-.Ql \e0 .
-.Sh RETURN VALUES
-The
-.Fn strrchr
-function
-returns a pointer to the character,
-or a null
-pointer if
-.Fa c
-does not occur anywhere in
-.Fa s .
-.Sh SEE ALSO
-.Xr index 3 ,
-.Xr memchr 3 ,
-.Xr rindex 3 ,
-.Xr strchr 3 ,
-.Xr strcspn 3 ,
-.Xr strpbrk 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strstr 3 ,
-.Xr strtok 3
-.Sh STANDARDS
-The
-.Fn strrchr
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/strrchr.c b/lib/libc/string/strrchr.c
deleted file mode 100644
index 8fcf3a1..0000000
--- a/lib/libc/string/strrchr.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#define STRRCHR
-#include "rindex.c"
diff --git a/lib/libc/string/strsep.3 b/lib/libc/string/strsep.3
deleted file mode 100644
index 7950135..0000000
--- a/lib/libc/string/strsep.3
+++ /dev/null
@@ -1,109 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" 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, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strsep.3 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt STRSEP 3
-.Os
-.Sh NAME
-.Nm strsep
-.Nd separate strings
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strsep "char **stringp" "const char *delim"
-.Sh DESCRIPTION
-The
-.Fn strsep
-function locates, in the string referenced by
-.Fa *stringp ,
-the first occurrence of any character in the string
-.Fa delim
-(or the terminating
-.Ql \e0
-character) and replaces it with a
-.Ql \e0 .
-The location of the next character after the delimiter character
-(or NULL, if the end of the string was reached) is stored in
-.Fa *stringp .
-The original value of
-.Fa *stringp
-is returned.
-.Pp
-An ``empty'' field, i.e. one caused by two adjacent delimiter characters,
-can be detected by comparing the location referenced by the pointer returned
-in
-.Fa *stringp
-to
-.Ql \e0 .
-.Pp
-If
-.Fa *stringp
-is initially
-.Dv NULL ,
-.Fn strsep
-returns
-.Dv NULL .
-.Sh EXAMPLES
-The following uses
-.Fn strsep
-to parse a string, containing tokens delimited by white space, into an
-argument vector:
-.Bd -literal -offset indent
-char **ap, *argv[10], *inputstring;
-
-for (ap = argv; (*ap = strsep(&inputstring, " \et")) != NULL;)
- if (**ap != '\e0')
- if (++ap >= &argv[10])
- break;
-.Ed
-.Sh HISTORY
-The
-.Fn strsep
-function
-is intended as a replacement for the
-.Fn strtok
-function.
-While the
-.Fn strtok
-function should be preferred for portability reasons (it conforms to
-.St -ansiC )
-it is unable to handle empty fields, i.e. detect fields delimited by
-two adjacent delimiter characters, or to be used for more than a single
-string at a time.
-The
-.Fn strsep
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/string/strsep.c b/lib/libc/string/strsep.c
deleted file mode 100644
index ddad596..0000000
--- a/lib/libc/string/strsep.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-#include <string.h>
-#include <stdio.h>
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Get next token from string *stringp, where tokens are possibly-empty
- * strings separated by characters from delim.
- *
- * Writes NULs into the string at *stringp to end tokens.
- * delim need not remain constant from call to call.
- * On return, *stringp points past the last NUL written (if there might
- * be further tokens), or is NULL (if there are definitely no more tokens).
- *
- * If *stringp is NULL, strsep returns NULL.
- */
-char *
-strsep(stringp, delim)
- register char **stringp;
- register const char *delim;
-{
- register char *s;
- register const char *spanp;
- register int c, sc;
- char *tok;
-
- if ((s = *stringp) == NULL)
- return (NULL);
- for (tok = s;;) {
- c = *s++;
- spanp = delim;
- do {
- if ((sc = *spanp++) == c) {
- if (c == 0)
- s = NULL;
- else
- s[-1] = 0;
- *stringp = s;
- return (tok);
- }
- } while (sc != 0);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/string/strspn.3 b/lib/libc/string/strspn.3
deleted file mode 100644
index e96cbeb..0000000
--- a/lib/libc/string/strspn.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strspn.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRSPN 3
-.Os
-.Sh NAME
-.Nm strspn
-.Nd span a string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft size_t
-.Fn strspn "const char *s" "const char *charset"
-.Sh DESCRIPTION
-The
-.Fn strspn
-function
-spans the initial part of the null-terminated string
-.Fa s
-as long as the characters from
-.Fa s
-occur in string
-.Fa charset .
-.Sh RETURN VALUES
-The
-.Fn strspn
-function
-returns the number of characters spanned.
-.Sh SEE ALSO
-.Xr index 3 ,
-.Xr memchr 3 ,
-.Xr rindex 3 ,
-.Xr strchr 3 ,
-.Xr strcspn 3 ,
-.Xr strpbrk 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strstr 3 ,
-.Xr strtok 3
-.Sh STANDARDS
-The
-.Fn strspn
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/strspn.c b/lib/libc/string/strspn.c
deleted file mode 100644
index 4676bd4..0000000
--- a/lib/libc/string/strspn.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strspn.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-/*
- * Span the string s2 (skip characters that are in s2).
- */
-size_t
-strspn(s1, s2)
- const char *s1;
- register const char *s2;
-{
- register const char *p = s1, *spanp;
- register char c, sc;
-
- /*
- * Skip any characters in s2, excluding the terminating \0.
- */
-cont:
- c = *p++;
- for (spanp = s2; (sc = *spanp++) != 0;)
- if (sc == c)
- goto cont;
- return (p - 1 - s1);
-}
diff --git a/lib/libc/string/strstr.3 b/lib/libc/string/strstr.3
deleted file mode 100644
index 7d16b97..0000000
--- a/lib/libc/string/strstr.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strstr.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRSTR 3
-.Os
-.Sh NAME
-.Nm strstr
-.Nd locate a substring in a string
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strstr "const char *big" "const char *little"
-.Sh DESCRIPTION
-The
-.Fn strstr
-function
-locates the first occurrence of the null-terminated string
-.Fa little
-in the null-terminated string
-.Fa big .
-If
-.Fa little
-is the empty string,
-.Fn strstr
-returns
-.Fa big ;
-if
-.Fa little
-occurs nowhere in
-.Fa big ,
-.Fn strstr
-returns NULL;
-otherwise
-.Fn strstr
-returns a pointer to the first character of the first occurrence of
-.Fa little .
-.Sh SEE ALSO
-.Xr index 3 ,
-.Xr memchr 3 ,
-.Xr rindex 3 ,
-.Xr strchr 3 ,
-.Xr strcspn 3 ,
-.Xr strpbrk 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strtok 3
-.Sh STANDARDS
-The
-.Fn strstr
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/strstr.c b/lib/libc/string/strstr.c
deleted file mode 100644
index 1f10961..0000000
--- a/lib/libc/string/strstr.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * 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, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strstr.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/cdefs.h>
-#include <string.h>
-
-/*
- * Find the first occurrence of find in s.
- */
-char *
-strstr(s, find)
- register const char *s, *find;
-{
- register char c, sc;
- register size_t len;
-
- if ((c = *find++) != 0) {
- len = strlen(find);
- do {
- do {
- if ((sc = *s++) == 0)
- return (NULL);
- } while (sc != c);
- } while (strncmp(s, find, len) != 0);
- s--;
- }
- return ((char *)s);
-}
diff --git a/lib/libc/string/strtok.3 b/lib/libc/string/strtok.3
deleted file mode 100644
index 56db2b0..0000000
--- a/lib/libc/string/strtok.3
+++ /dev/null
@@ -1,110 +0,0 @@
-.\" Copyright (c) 1988, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" the American National Standards Committee X3, on Information
-.\" Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strtok.3 8.2 (Berkeley) 2/3/94
-.\"
-.Dd February 3, 1994
-.Dt STRTOK 3
-.Os BSD 3
-.Sh NAME
-.Nm strtok
-.Nd string tokens
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft char *
-.Fn strtok "char *str" "const char *sep"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is obsoleted by strsep(3).
-.Ef
-.Pp
-The
-.Fn strtok
-function
-is used to isolate sequential tokens in a null-terminated string,
-.Fa str .
-These tokens are separated in the string by at least one of the
-characters in
-.Fa sep .
-The first time that
-.Fn strtok
-is called,
-.Fa str
-should be specified; subsequent calls, wishing to obtain further tokens
-from the same string, should pass a null pointer instead.
-The separator string,
-.Fa sep ,
-must be supplied each time, and may change between calls.
-.Pp
-The
-.Fn strtok
-function
-returns a pointer to the beginning of each subsequent token in the string,
-after replacing the token itself with a
-.Dv NUL
-character.
-When no more tokens remain, a null pointer is returned.
-.Sh SEE ALSO
-.Xr index 3 ,
-.Xr memchr 3 ,
-.Xr rindex 3 ,
-.Xr strchr 3 ,
-.Xr strcspn 3 ,
-.Xr strpbrk 3 ,
-.Xr strrchr 3 ,
-.Xr strsep 3 ,
-.Xr strspn 3 ,
-.Xr strstr 3
-.Sh STANDARDS
-The
-.Fn strtok
-function
-conforms to
-.St -ansiC .
-.Sh BUGS
-There is no way to get tokens from multiple strings simultaneously.
-.Pp
-The System V
-.Fn strtok ,
-if handed a string containing only delimiter characters,
-will not alter the next starting point, so that a call to
-.Fn strtok
-with a different (or empty) delimiter string
-may return a
-.Pf non- Dv NULL
-value.
-Since this implementation always alters the next starting point,
-such a sequence of calls would always return
-.Dv NULL .
diff --git a/lib/libc/string/strtok.c b/lib/libc/string/strtok.c
deleted file mode 100644
index 9151cf2..0000000
--- a/lib/libc/string/strtok.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtok.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stddef.h>
-#include <string.h>
-
-char *
-strtok(s, delim)
- register char *s;
- register const char *delim;
-{
- register char *spanp;
- register int c, sc;
- char *tok;
- static char *last;
-
-
- if (s == NULL && (s = last) == NULL)
- return (NULL);
-
- /*
- * Skip (span) leading delimiters (s += strspn(s, delim), sort of).
- */
-cont:
- c = *s++;
- for (spanp = (char *)delim; (sc = *spanp++) != 0;) {
- if (c == sc)
- goto cont;
- }
-
- if (c == 0) { /* no non-delimiter characters */
- last = NULL;
- return (NULL);
- }
- tok = s - 1;
-
- /*
- * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
- * Note that delim must have one NUL; we stop if we see that, too.
- */
- for (;;) {
- c = *s++;
- spanp = (char *)delim;
- do {
- if ((sc = *spanp++) == c) {
- if (c == 0)
- s = NULL;
- else
- s[-1] = 0;
- last = s;
- return (tok);
- }
- } while (sc != 0);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libc/string/strxfrm.3 b/lib/libc/string/strxfrm.3
deleted file mode 100644
index 308f942..0000000
--- a/lib/libc/string/strxfrm.3
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Chris Torek and the American National Standards Committee X3,
-.\" on Information Processing Systems.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)strxfrm.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STRXFRM 3
-.Os
-.Sh NAME
-.Nm strxfrm
-.Nd transform a string under locale
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft size_t
-.Fn strxfrm "char *dst" "const char *src" "size_t n"
-.Sh DESCRIPTION
-The
-.Fn strxfrm
-function transforms a null-terminated string pointed to by
-.Fa src
-according to the current locale collation if any,
-then copies not more than
-.Fa n-1
-characters of the resulting string into
-.Fa dst ,
-terminating it with a null character and then returns the resulting length.
-Comparing two strings using
-.Fn strcmp
-after
-.Fn strxfrm
-is equal to comparing
-two original strings with
-.Fn strcoll .
-.Sh BUGS
-Sometimes the behavior of this function is unpredictable.
-.Sh SEE ALSO
-.Xr setlocale 3 ,
-.Xr strcmp 3 ,
-.Xr strcoll 3
-.Sh STANDARDS
-The
-.Fn strxfrm
-function
-conforms to
-.St -ansiC .
diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c
deleted file mode 100644
index 64b0bcf..0000000
--- a/lib/libc/string/strxfrm.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-
- * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
- * at Electronni Visti IA, Kiev, Ukraine.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include "collate.h"
-
-size_t
-strxfrm(dest, src, len)
- char *dest;
- const char *src;
- size_t len;
-{
- int prim, sec, l;
- char *d = dest, *s, *ss;
-
- if (len < 1)
- return 0;
-
- if (!*src) {
- *d = '\0';
- return 0;
- }
-
- if (__collate_load_error) {
- size_t slen = strlen(src);
-
- if (slen < len) {
- strcpy(d, src);
- return slen;
- }
- strncpy(d, src, len - 1);
- d[len - 1] = '\0';
- return len - 1;
- }
-
- ss = s = __collate_substitute(src);
- prim = sec = 0;
- while (*s && len > 1) {
- while (*s && !prim) {
- __collate_lookup(s, &l, &prim, &sec);
- s += l;
- }
- if (prim) {
- *d++ = (char)prim;
- len--;
- }
- }
-#if 0
- s = ss;
- while (*s && len > 1) {
- while (*s && !prim) {
- lookup(s, &l, &prim, &sec);
- s += l;
- }
- if (prim && sec) {
- *d++ = (char)sec;
- len--;
- }
- }
-#endif /* 0 */
- *d = '\0';
- free(ss);
-
- return d - dest;
-}
diff --git a/lib/libc/string/swab.3 b/lib/libc/string/swab.3
deleted file mode 100644
index 70a9205..0000000
--- a/lib/libc/string/swab.3
+++ /dev/null
@@ -1,65 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)swab.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SWAB 3
-.Os
-.Sh NAME
-.Nm swab
-.Nd swap adjacent bytes
-.Sh SYNOPSIS
-.Fd #include <string.h>
-.Ft void
-.Fn swab "const void *src" "void *dst" "size_t len"
-.Sh DESCRIPTION
-The function
-.Fn swab
-copies
-.Fa len
-bytes from the location referenced by
-.Fa src
-to the location referenced by
-.Fa dst ,
-swapping adjacent bytes.
-.Pp
-The argument
-.Fa len
-must be even number.
-.Sh SEE ALSO
-.Xr bzero 3 ,
-.Xr memset 3
-.Sh HISTORY
-A
-.Fn swab
-function appeared in
-.At v7 .
diff --git a/lib/libc/string/swab.c b/lib/libc/string/swab.c
deleted file mode 100644
index a4fc3b9..0000000
--- a/lib/libc/string/swab.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jeffrey Mogul.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)swab.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <string.h>
-
-void
-swab(from, to, len)
- const void *from;
- void *to;
- size_t len;
-{
- register unsigned long temp;
- register int n;
- register char *fp, *tp;
-
- n = (len >> 1) + 1;
- fp = (char *)from;
- tp = (char *)to;
-#define STEP temp = *fp++,*tp++ = *fp++,*tp++ = temp
- /* round to multiple of 8 */
- while ((--n) & 07)
- STEP;
- n >>= 3;
- while (--n >= 0) {
- STEP; STEP; STEP; STEP;
- STEP; STEP; STEP; STEP;
- }
-}
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
deleted file mode 100644
index f8e8d5a..0000000
--- a/lib/libc/sys/Makefile.inc
+++ /dev/null
@@ -1,152 +0,0 @@
-# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
-# $Id: Makefile.inc,v 1.43 1997/10/15 16:29:14 bde Exp $
-
-# sys sources
-.PATH: ${.CURDIR}/../libc/${MACHINE}/sys ${.CURDIR}/../libc/sys
-
-.include "${.CURDIR}/../libc/${MACHINE}/sys/Makefile.inc"
-
-# modules with non-default implementations on at least one architecture:
-SRCS+= Ovfork.S brk.S cerror.S exect.S fork.S pipe.S ptrace.S reboot.S \
- rfork.S sbrk.S setlogin.S sigpending.S sigprocmask.S sigreturn.S \
- sigsuspend.S syscall.S
-
-# glue to provide compatibility between GCC 1.X and 2.X
-SRCS+= ftruncate.c lseek.c mmap.c truncate.c
-
-# modules with default implementations on all architectures:
-ASM= __getcwd.o __syscall.o __sysctl.o \
- access.o acct.o adjtime.o \
- aio_cancel.o aio_error.o aio_read.o aio_return.o aio_suspend.o \
- aio_write.o \
- chdir.o chflags.o chmod.o chown.o chroot.o \
- clock_getres.o clock_gettime.o clock_settime.o \
- getdtablesize.o getegid.o \
- geteuid.o getfh.o getfsstat.o getgid.o getgroups.o getitimer.o \
- getpgrp.o getpgid.o getpid.o getppid.o getpriority.o \
- getrlimit.o getrusage.o getsid.o gettimeofday.o \
- getuid.o issetugid.o kill.o \
- kldfind.o kldfirstmod.o kldload.o kldnext.o kldstat.o kldunload.o \
- ktrace.o lchown.o \
- lfs_bmapv.o lfs_markv.o \
- lfs_segclean.o lfs_segwait.o link.o lio_listio.o lstat.o \
- madvise.o mincore.o minherit.o mkdir.o mlock.o \
- modfind.o modfnext.o modnext.o modstat.o \
- mount.o \
- mprotect.o msgsys.o msync.o munlock.o munmap.o \
- ntp_adjtime.o pathconf.o profil.o quotactl.o \
- readlink.o rename.o revoke.o rmdir.o \
- rtprio.o semsys.o setegid.o seteuid.o setgid.o \
- setgroups.o setitimer.o setpgid.o setpriority.o \
- setregid.o setreuid.o setrlimit.o \
- setsid.o settimeofday.o setuid.o shmsys.o \
- stat.o statfs.o \
- swapon.o symlink.o sync.o sysarch.o \
- umask.o undelete.o unlink.o unmount.o utimes.o utrace.o \
- vadvise.o
-
-# Syscalls renamed as _thread_sys_{syscall} when building libc_r.
-ASMR= accept.o bind.o close.o connect.o dup.o dup2.o \
- execve.o fchdir.o fchflags.o fchmod.o fchown.o fcntl.o \
- flock.o fpathconf.o fstat.o fstatfs.o fsync.o getdirentries.o \
- getpeername.o getsockname.o getsockopt.o ioctl.o listen.o \
- mkfifo.o mknod.o nanosleep.o nfssvc.o open.o poll.o read.o readv.o \
- recvfrom.o recvmsg.o select.o sendmsg.o sendto.o setsockopt.o \
- shutdown.o sigaction.o sigaltstack.o signanosleep.o socket.o \
- socketpair.o \
- wait4.o write.o writev.o
-
-PSEUDO= _getlogin.o
-
-# Pseudo syscalls that are renamed as _thread_sys_{pseudo} when
-# building libc_r.
-PSEUDOR= _exit.o
-
-OBJS+= ${ASM} ${ASMR} ${PSEUDO} ${PSEUDOR}
-
-SASM= ${ASM:S/.o/.S/}
-
-SASMR= ${ASMR:S/.o/.S/}
-
-SPSEUDO= ${PSEUDO:S/.o/.S/}
-
-SPSEUDOR= ${PSEUDOR:S/.o/.S/}
-
-SRCS+= ${SASM} ${SASMR} ${SPSEUDO} ${SPSEUDOR}
-
-# Generated files
-CLEANFILES+= ${SASM} ${SASMR} ${SPSEUDO} ${SPSEUDOR}
-
-${SASM}:
- printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' > ${.TARGET}
-
-${SASMR}:
- printf '#include "SYS.h"\nPRSYSCALL(${.PREFIX})\n' > ${.TARGET}
-
-${SPSEUDO}:
- printf '#include "SYS.h"\nPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' \
- > ${.TARGET}
-
-${SPSEUDOR}:
- printf '#include "SYS.h"\nPPSEUDO(${.PREFIX},${.PREFIX:S/_//})\n' \
- > ${.TARGET}
-
-.if ${LIB} == "c"
-MAN2+= _exit.2 accept.2 access.2 acct.2 adjtime.2 \
- bind.2 brk.2 chdir.2 chflags.2 \
- chmod.2 chown.2 chroot.2 clock_gettime.2 close.2 \
- connect.2 dup.2 execve.2 \
- fcntl.2 flock.2 fork.2 fsync.2 getdirentries.2 getdtablesize.2 \
- getfh.2 getfsstat.2 getgid.2 getgroups.2 getitimer.2 getlogin.2 \
- getpeername.2 getpgrp.2 getpid.2 getpriority.2 getrlimit.2 \
- getrusage.2 getsid.2 getsockname.2 \
- getsockopt.2 gettimeofday.2 getuid.2 \
- intro.2 ioctl.2 issetugid.2 kill.2 ktrace.2 link.2 listen.2 lseek.2 \
- madvise.2 mincore.2 minherit.2 mkdir.2 mkfifo.2 mknod.2 mlock.2 mmap.2 \
- mount.2 mprotect.2 msync.2 munmap.2 nanosleep.2 \
- nfssvc.2 open.2 pathconf.2 pipe.2 poll.2 profil.2 ptrace.2 quotactl.2 \
- read.2 readlink.2 reboot.2 recv.2 rename.2 revoke.2 rfork.2 rmdir.2 \
- rtprio.2 select.2 semctl.2 semget.2 semop.2 send.2 \
- setgroups.2 setpgid.2 setregid.2 setreuid.2 setsid.2 setuid.2 \
- shmat.2 shmctl.2 shmget.2 shutdown.2 \
- sigaction.2 sigaltstack.2 sigpending.2 sigprocmask.2 sigreturn.2 \
- sigstack.2 sigsuspend.2 socket.2 socketpair.2 stat.2 statfs.2 \
- swapon.2 symlink.2 sync.2 syscall.2 truncate.2 umask.2 undelete.2 \
- unlink.2 utimes.2 vfork.2 wait.2 write.2
-
-MLINKS+=brk.2 sbrk.2
-MLINKS+=dup.2 dup2.2
-MLINKS+=chdir.2 fchdir.2
-MLINKS+=chflags.2 fchflags.2
-MLINKS+=chmod.2 fchmod.2
-MLINKS+=chown.2 fchown.2 chown.2 lchown.2
-MLINKS+=clock_gettime.2 clock_getres.2 clock_gettime.2 clock_settime.2
-MLINKS+=getgid.2 getegid.2
-MLINKS+=getitimer.2 setitimer.2
-MLINKS+=getlogin.2 setlogin.2
-MLINKS+=getpgrp.2 getpgid.2
-MLINKS+=getpid.2 getppid.2
-MLINKS+=getpriority.2 setpriority.2
-MLINKS+=getrlimit.2 setrlimit.2
-MLINKS+=getsockopt.2 setsockopt.2
-MLINKS+=gettimeofday.2 settimeofday.2
-MLINKS+=getuid.2 geteuid.2
-MLINKS+=intro.2 errno.2
-MLINKS+=lseek.2 seek.2
-MLINKS+=mlock.2 munlock.2
-MLINKS+=mount.2 unmount.2
-MLINKS+=nanosleep.2 signanosleep.2
-MLINKS+=pathconf.2 fpathconf.2
-MLINKS+=read.2 readv.2
-MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2
-MLINKS+=send.2 sendmsg.2 send.2 sendto.2
-MLINKS+=setpgid.2 setpgrp.2
-MLINKS+=setuid.2 setegid.2 setuid.2 seteuid.2 setuid.2 setgid.2
-MLINKS+=shmat.2 shmdt.2
-MLINKS+=stat.2 fstat.2 stat.2 lstat.2
-MLINKS+=statfs.2 fstatfs.2
-MLINKS+=syscall.2 __syscall.2
-MLINKS+=truncate.2 ftruncate.2
-MLINKS+=wait.2 wait3.2 wait.2 wait4.2 wait.2 waitpid.2
-MLINKS+=write.2 writev.2
-.endif
diff --git a/lib/libc/sys/_exit.2 b/lib/libc/sys/_exit.2
deleted file mode 100644
index 4f6a1c5..0000000
--- a/lib/libc/sys/_exit.2
+++ /dev/null
@@ -1,118 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)_exit.2 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt EXIT 2
-.Os BSD 4
-.Sh NAME
-.Nm _exit
-.Nd terminate the calling process
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft void
-.Fn _exit "int status"
-.Sh DESCRIPTION
-The
-.Fn _exit
-function
-terminates a process with the following consequences:
-.Bl -bullet
-.It
-All of the descriptors open in the calling process are closed.
-This may entail delays, for example, waiting for output to drain;
-a process in this state may not be killed, as it is already dying.
-.It
-If the parent process of the calling process has an outstanding
-.Xr wait 2
-call
-or catches the
-.Dv SIGCHLD
-signal,
-it is notified of the calling process's termination and
-the
-.Em status
-is set as defined by
-.Xr wait 2 .
-.It
-The parent process-ID of all of the calling process's existing child
-processes are set to 1; the initialization process
-(see the DEFINITIONS section of
-.Xr intro 2 )
-inherits each of these processes.
-.It
-If the termination of the process causes any process group
-to become orphaned (usually because the parents of all members
-of the group have now exited; see
-.Dq orphaned process group
-in
-.Xr intro 2 ) ,
-and if any member of the orphaned group is stopped,
-the
-.Dv SIGHUP
-signal and the
-.Dv SIGCONT
-signal are sent to all members of the newly-orphaned process group.
-.It
-If the process is a controlling process (see
-.Xr intro 2 ) ,
-the
-.Dv SIGHUP
-signal is sent to the foreground process group of the controlling terminal,
-and all current access to the controlling terminal is revoked.
-.El
-.Pp
-Most C programs call the library routine
-.Xr exit 3 ,
-which flushes buffers, closes streams, unlinks temporary files, etc.,
-before
-calling
-.Fn _exit .
-.Sh RETURN VALUE
-.Fn _exit
-can never return.
-.Sh SEE ALSO
-.Xr fork 2 ,
-.Xr sigvec 2 ,
-.Xr wait 2 ,
-.Xr exit 3
-.Sh STANDARDS
-The
-.Fn _exit
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-An
-.Fn _exit
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/accept.2 b/lib/libc/sys/accept.2
deleted file mode 100644
index c5d162f..0000000
--- a/lib/libc/sys/accept.2
+++ /dev/null
@@ -1,192 +0,0 @@
-.\" Copyright (c) 1983, 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)accept.2 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt ACCEPT 2
-.Os BSD 4.2
-.Sh NAME
-.Nm accept
-.Nd accept a connection on a socket
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn accept "int s" "struct sockaddr *addr" "int *addrlen"
-.Sh DESCRIPTION
-The argument
-.Fa s
-is a socket that has been created with
-.Xr socket 2 ,
-bound to an address with
-.Xr bind 2 ,
-and is listening for connections after a
-.Xr listen 2 .
-The
-.Fn accept
-argument
-extracts the first connection request
-on the queue of pending connections, creates
-a new socket with the same properties of
-.Fa s
-and allocates a new file descriptor
-for the socket. If no pending connections are
-present on the queue, and the socket is not marked
-as non-blocking,
-.Fn accept
-blocks the caller until a connection is present.
-If the socket is marked non-blocking and no pending
-connections are present on the queue,
-.Fn accept
-returns an error as described below.
-The accepted socket
-may not be used
-to accept more connections. The original socket
-.Fa s
-remains open.
-.Pp
-The argument
-.Fa addr
-is a result parameter that is filled in with
-the address of the connecting entity,
-as known to the communications layer.
-The exact format of the
-.Fa addr
-parameter is determined by the domain in which the communication
-is occurring.
-The
-.Fa addrlen
-is a value-result parameter; it should initially contain the
-amount of space pointed to by
-.Fa addr ;
-on return it will contain the actual length (in bytes) of the
-address returned.
-This call
-is used with connection-based socket types, currently with
-.Dv SOCK_STREAM .
-.Pp
-It is possible to
-.Xr select 2
-a socket for the purposes of doing an
-.Fn accept
-by selecting it for read.
-.Pp
-For certain protocols which require an explicit confirmation,
-such as
-.Tn ISO
-or
-.Tn DATAKIT ,
-.Fn accept
-can be thought of
-as merely dequeueing the next connection
-request and not implying confirmation.
-Confirmation can be implied by a normal read or write on the new
-file descriptor, and rejection can be implied by closing the
-new socket.
-.Pp
-One can obtain user connection request data without confirming
-the connection by issuing a
-.Xr recvmsg 2
-call with an
-.Fa msg_iovlen
-of 0 and a non-zero
-.Fa msg_controllen ,
-or by issuing a
-.Xr getsockopt 2
-request.
-Similarly, one can provide user connection rejection information
-by issuing a
-.Xr sendmsg 2
-call with providing only the control information,
-or by calling
-.Xr setsockopt 2 .
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn accept
-is implemented as the
-.Va accept
-syscall.
-.Pp
-In the threaded library, the
-.Va accept
-syscall is assembled to
-.Fn _thread_sys_accept
-and
-.Fn accept
-is implemented as a function which locks
-.Va s
-for read and write, then calls
-.Fn _thread_sys_accept .
-If the call to
-.Fn _thread_sys_accept
-would block, a context switch is performed. Before returning,
-.Fn accept
-unlocks
-.Va s .
-.Pp
-.Sh RETURN VALUES
-The call returns \-1 on error. If it succeeds, it returns a non-negative
-integer that is a descriptor for the accepted socket.
-.Sh ERRORS
-The
-.Fn accept
-will fail if:
-.Bl -tag -width EWOULDBLOCK
-.It Bq Er EBADF
-The descriptor is invalid.
-.It Bq Er ENOTSOCK
-The descriptor references a file, not a socket.
-.It Bq Er EOPNOTSUPP
-The referenced socket is not of type
-.Dv SOCK_STREAM .
-.It Bq Er EFAULT
-The
-.Fa addr
-parameter is not in a writable part of the
-user address space.
-.It Bq Er EWOULDBLOCK
-The socket is marked non-blocking and no connections
-are present to be accepted.
-.El
-.Sh SEE ALSO
-.Xr bind 2 ,
-.Xr connect 2 ,
-.Xr getpeername 2 ,
-.Xr listen 2 ,
-.Xr select 2 ,
-.Xr socket 2
-.Sh HISTORY
-The
-.Fn accept
-function appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2
deleted file mode 100644
index cf1fe90..0000000
--- a/lib/libc/sys/access.2
+++ /dev/null
@@ -1,135 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)access.2 8.2 (Berkeley) 4/1/94
-.\" $Id$
-.\"
-.Dd April 1, 1994
-.Dt ACCESS 2
-.Os BSD 4
-.Sh NAME
-.Nm access
-.Nd check access permissions of a file or pathname
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn access "const char *path" "int mode"
-.Sh DESCRIPTION
-The
-.Fn access
-function checks the accessibility of the
-file named by
-.Fa path
-for the access permissions indicated by
-.Fa mode .
-The value of
-.Fa mode
-is the bitwise inclusive OR of the access permissions to be
-checked
-.Pf ( Dv R_OK
-for read permission,
-.Dv W_OK
-for write permission and
-.Dv X_OK
-for execute/search permission) or the existence test,
-.Dv F_OK .
-All components of the pathname
-.Fa path
-are checked for access permissions (including
-.Dv F_OK ) .
-.Pp
-The real user ID is used in place of the effective user ID
-and the real group access list
-(including the real group ID) are
-used in place of the effective ID for verifying permission.
-.Pp
-Even if a process has appropriate privileges and indicates success for
-.Dv X_OK ,
-the file may not actually have execute permission bits set.
-Likewise for
-.Dv R_OK
-and
-.Dv W_OK .
-.Sh RETURN VALUES
-If
-.Fa path
-cannot be found or if any of the desired access modes would
-not be granted, then a -1 value is returned; otherwise
-a 0 value is returned.
-.Sh ERRORS
-Access to the file is denied if:
-.Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EROFS
-Write access is requested for a file on a read-only file system.
-.It Bq Er ETXTBSY
-Write access is requested for a pure procedure (shared text)
-file presently being executed.
-.It Bq Er EACCES
-Permission bits of the file mode do not permit the requested
-access, or search permission is denied on a component of the
-path prefix. The owner of a file has permission checked with
-respect to the ``owner'' read, write, and execute mode bits,
-members of the file's group other than the owner have permission
-checked with respect to the ``group'' mode bits, and all
-others have permissions checked with respect to the ``other''
-mode bits.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr stat 2
-.Sh STANDARDS
-The
-.Fn access
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh CAVEAT
-.Fn Access
-is a potential security hole and
-should never be used.
-.Sh HISTORY
-An
-.Fn access
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/acct.2 b/lib/libc/sys/acct.2
deleted file mode 100644
index 879a06f..0000000
--- a/lib/libc/sys/acct.2
+++ /dev/null
@@ -1,114 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)acct.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ACCT 2
-.Os BSD 4
-.Sh NAME
-.Nm acct
-.Nd enable or disable process accounting
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn acct "const char *file"
-.Sh DESCRIPTION
-The
-.Fn acct
-call enables or disables the collection of system accounting
-records.
-If the argument
-.Fa file
-is a nil pointer, accounting is disabled.
-If
-.Fa file
-is an
-.Em existing
-pathname (null-terminated), record collection is enabled and for
-every process initiated which terminates under normal
-conditions an accounting record is appended to
-.Fa file .
-Abnormal conditions of termination are reboots
-or other fatal system problems.
-Records for processes which never terminate can not be
-produced by
-.Fn acct .
-.Pp
-For more information on the record structure used by
-.Fn acct ,
-see
-.Pa /usr/include/sys/acct.h
-and
-.Xr acct 5 .
-.Pp
-This call is permitted only to the super-user.
-.Sh NOTES
-Accounting is automatically disabled when the file system the
-accounting file resides on runs out of space; it is enabled when
-space once again becomes available.
-.Sh RETURN VALUES
-On error -1 is returned.
-The file must exist and the call may be exercised only by the super-user.
-.Sh ERRORS
-.Fn Acct
-will fail if one of the following is true:
-.Bl -tag -width Er
-.It Bq Er EPERM
-The caller is not the super-user.
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix,
-or the path name is not a regular file.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er EFAULT
-.Fa File
-points outside the process's allocated address space.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr acct 5 ,
-.Xr sa 8
-.Sh HISTORY
-An
-.Fn acct
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/adjtime.2 b/lib/libc/sys/adjtime.2
deleted file mode 100644
index 04673ad..0000000
--- a/lib/libc/sys/adjtime.2
+++ /dev/null
@@ -1,111 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)adjtime.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ADJTIME 2
-.Os BSD 4.3
-.Sh NAME
-.Nm adjtime
-.Nd "correct the time to allow synchronization of the system clock"
-.Sh SYNOPSIS
-.Fd #include <sys/time.h>
-.Ft int
-.Fn adjtime "const struct timeval *delta" "struct timeval *olddelta"
-.Sh DESCRIPTION
-.Fn Adjtime
-makes small adjustments to the system time, as returned by
-.Xr gettimeofday 2 ,
-advancing or retarding it
-by the time specified by the timeval
-.Fa delta .
-If
-.Fa delta
-is negative, the clock is
-slowed down by incrementing it more slowly than normal until
-the correction is complete.
-If
-.Fa delta
-is positive, a larger increment than normal
-is used.
-The skew used to perform the correction is generally a fraction of one percent.
-Thus, the time is always
-a monotonically increasing function.
-A time correction from an earlier call to
-.Fn adjtime
-may not be finished when
-.Fn adjtime
-is called again.
-If
-.Fa olddelta
-is non-nil,
-the structure pointed to will contain, upon return, the
-number of microseconds still to be corrected
-from the earlier call.
-.Pp
-This call may be used by time servers that synchronize the clocks
-of computers in a local area network.
-Such time servers would slow down the clocks of some machines
-and speed up the clocks of others to bring them to the average network time.
-.Pp
-The call
-.Fn adjtime
-is restricted to the super-user.
-.Sh RETURN VALUES
-A return value of 0 indicates that the call succeeded.
-A return value of -1 indicates that an error occurred, and in this
-case an error code is stored in the global variable
-.Va errno .
-.Sh ERRORS
-.Fn Adjtime
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-An argument points outside the process's allocated address space.
-.It Bq Er EPERM
-The process's effective user ID is not that of the super-user.
-.El
-.Sh SEE ALSO
-.Xr date 1 ,
-.Xr gettimeofday 2 ,
-.Xr timed 8 ,
-.Xr timedc 8
-.Rs
-.%T "TSP: The Time Synchronization Protocol for UNIX 4.3BSD"
-.%A R. Gusella
-.%A S. Zatti
-.Re
-.Sh HISTORY
-The
-.Fn adjtime
-function call appeared in
-.Bx 4.3 .
diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2
deleted file mode 100644
index ce6ca0c..0000000
--- a/lib/libc/sys/bind.2
+++ /dev/null
@@ -1,146 +0,0 @@
-.\" Copyright (c) 1983, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)bind.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt BIND 2
-.Os BSD 4.2
-.Sh NAME
-.Nm bind
-.Nd bind a name to a socket
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn bind "int s" "const struct sockaddr *name" "int namelen"
-.Sh DESCRIPTION
-.Fn Bind
-assigns a name to an unnamed socket.
-When a socket is created
-with
-.Xr socket 2
-it exists in a name space (address family)
-but has no name assigned.
-.Fn Bind
-requests that
-.Fa name
-be assigned to the socket.
-.Sh NOTES
-Binding a name in the UNIX domain creates a socket in the file
-system that must be deleted by the caller when it is no longer
-needed (using
-.Xr unlink 2 ) .
-.Pp
-The rules used in name binding vary between communication domains.
-Consult the manual entries in section 4 for detailed information.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn bind
-is implemented as the
-.Va bind
-syscall.
-.Pp
-In the threaded library, the
-.Va bind
-syscall is assembled to
-.Fn _thread_sys_bind
-and
-.Fn bind
-is implemented as a function which locks
-.Va s
-for read and write, then calls
-.Fn _thread_sys_bind .
-Before returning,
-.Fn bind
-unlocks
-.Va s .
-.Sh RETURN VALUES
-If the bind is successful, a 0 value is returned.
-A return value of -1 indicates an error, which is
-further specified in the global
-.Va errno .
-.Sh ERRORS
-The
-.Fn bind
-call will fail if:
-.Bl -tag -width EADDRNOTAVA
-.It Bq Er EBADF
-.Fa S
-is not a valid descriptor.
-.It Bq Er ENOTSOCK
-.Fa S
-is not a socket.
-.It Bq Er EADDRNOTAVAIL
-The specified address is not available from the local machine.
-.It Bq Er EADDRINUSE
-The specified address is already in use.
-.It Bq Er EACCES
-The requested address is protected, and the current user
-has inadequate permission to access it.
-.It Bq Er EFAULT
-The
-.Fa name
-parameter is not in a valid part of the user
-address space.
-.El
-.Pp
-The following errors are specific to binding names in the UNIX domain.
-.Bl -tag -width EADDRNOTAVA
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er EINVAL
-The pathname contains a character with the high-order bit set.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-A prefix component of the path name does not exist.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EIO
-An I/O error occurred while making the directory entry or allocating the inode.
-.It Bq Er EROFS
-The name would reside on a read-only file system.
-.It Bq Er EISDIR
-An empty pathname was specified.
-.El
-.Sh SEE ALSO
-.Xr connect 2 ,
-.Xr getsockname 2 ,
-.Xr listen 2 ,
-.Xr socket 2
-.Sh HISTORY
-The
-.Fn bind
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/brk.2 b/lib/libc/sys/brk.2
deleted file mode 100644
index 313e47d..0000000
--- a/lib/libc/sys/brk.2
+++ /dev/null
@@ -1,149 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)brk.2 8.4 (Berkeley) 5/1/95
-.\"
-.Dd May 1, 1995
-.Dt BRK 2
-.Os BSD 4
-.Sh NAME
-.Nm brk ,
-.Nm sbrk
-.Nd change data segment size
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft char *
-.Fn brk "const char *addr"
-.Ft char *
-.Fn sbrk "int incr"
-.Sh DESCRIPTION
-.Bf -symbolic
-The brk and sbrk functions are historical curiosities
-left over from earlier days before the advent of virtual memory management.
-.Ef
-The
-.Fn brk
-function
-sets the break or lowest address
-of a process's data segment (uninitialized data) to
-.Fa addr
-(immediately above bss).
-Data addressing is restricted between
-.Fa addr
-and the lowest stack pointer to the stack segment.
-Memory is allocated by
-.Fa brk
-in page size pieces;
-if
-.Fa addr
-is not evenly divisible by the system page size, it is
-increased to the next page boundary.
-.Pp
-.\" The
-.\" .Nm sbrk
-.\" function
-.\" allocates chunks of
-.\" .Fa incr
-.\" bytes
-.\" to the process's data space
-.\" and returns an address pointer.
-.\" The
-.\" .Xr malloc 3
-.\" function utilizes
-.\" .Nm sbrk .
-.\" .Pp
-The current value of the program break is reliably returned by
-.Dq Li sbrk(0)
-(see also
-.Xr end 3 ) .
-The
-.Xr getrlimit 2
-system call may be used to determine
-the maximum permissible size of the
-.Em data
-segment;
-it will not be possible to set the break
-beyond the
-.Em rlim_max
-value returned from a call to
-.Xr getrlimit 2 ,
-e.g.
-.Dq etext + rlp\(->rlim_max.
-(see
-.Xr end 3
-for the definition of
-.Em etext ) .
-.Sh RETURN VALUES
-.Fn Brk
-returns 0 if successful;
-otherwise -1 with
-.Va errno
-set to indicate why the allocation failed.
-The
-.Fn sbrk
-function returns a pointer to the base of the new storage if successful;
-otherwise -1 with
-.Va errno
-set to indicate why the allocation failed.
-.Sh ERRORS
-.Fn Brk
-or
-.Fn sbrk
-will fail and no additional memory will be allocated if
-one of the following are true:
-.Bl -tag -width [ENOMEM]
-.It Bq Er ENOMEM
-The limit, as set by
-.Xr setrlimit 2 ,
-was exceeded.
-.It Bq Er ENOMEM
-The maximum possible size of a data segment (compiled into the
-system) was exceeded.
-.It Bq Er ENOMEM
-Insufficient space existed in the swap area
-to support the expansion.
-.El
-.Sh SEE ALSO
-.Xr execve 2 ,
-.Xr getrlimit 2 ,
-.Xr end 3 ,
-.Xr malloc 3
-.Sh BUGS
-Setting the break may fail due to a temporary lack of
-swap space. It is not possible to distinguish this
-from a failure caused by exceeding the maximum size of
-the data segment without consulting
-.Xr getrlimit 2 .
-.Sh HISTORY
-A
-.Fn brk
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/chdir.2 b/lib/libc/sys/chdir.2
deleted file mode 100644
index 215d759..0000000
--- a/lib/libc/sys/chdir.2
+++ /dev/null
@@ -1,133 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)chdir.2 8.2 (Berkeley) 12/11/93
-.\" $Id$
-.\"
-.Dd December 11, 1993
-.Dt CHDIR 2
-.Os BSD 4
-.Sh NAME
-.Nm chdir ,
-.Nm fchdir
-.Nd change current working directory
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn chdir "const char *path"
-.Ft int
-.Fn fchdir "int fd"
-.Sh DESCRIPTION
-The
-.Fa path
-argument points to the pathname of a directory.
-The
-.Fn chdir
-function
-causes the named directory
-to become the current working directory, that is,
-the starting point for path searches of pathnames not beginning with
-a slash,
-.Ql / .
-.Pp
-The
-.Fn fchdir
-function
-causes the directory referenced by
-.Fa fd
-to become the current working directory,
-the starting point for path searches of pathnames not beginning with
-a slash,
-.Ql / .
-.Pp
-In order for a directory to become the current directory,
-a process must have execute (search) access to the directory.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate
-the error.
-.Sh ERRORS
-.Fn Chdir
-will fail and the current working directory will be unchanged if
-one or more of the following are true:
-.Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named directory does not exist.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EACCES
-Search permission is denied for any component of
-the path name.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Pp
-.Fn Fchdir
-will fail and the current working directory will be unchanged if
-one or more of the following are true:
-.Bl -tag -width Er
-.It Bq Er EACCES
-Search permission is denied for the directory referenced by the
-file descriptor.
-.It Bq Er ENOTDIR
-The file descriptor does not reference a directory.
-.It Bq Er EBADF
-The argument
-.Fa fd
-is not a valid file descriptor.
-.El
-.Sh SEE ALSO
-.Xr chroot 2
-.Sh STANDARDS
-The
-.Fn chdir
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn chdir
-function call appeared in
-.At v7 .
-The
-.Fn fchdir
-function call
-appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/chflags.2 b/lib/libc/sys/chflags.2
deleted file mode 100644
index 3305b3a..0000000
--- a/lib/libc/sys/chflags.2
+++ /dev/null
@@ -1,166 +0,0 @@
-.\" Copyright (c) 1989, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)chflags.2 8.3 (Berkeley) 5/2/95
-.\"
-.Dd May 2, 1995
-.Dt CHFLAGS 2
-.Os
-.Sh NAME
-.Nm chflags ,
-.Nm fchflags
-.Nd set file flags
-.Sh SYNOPSIS
-.Fd #include <sys/stat.h>
-.Fd #include <unistd.h>
-.Ft int
-.Fn chflags "const char *path" "u_long flags"
-.Ft int
-.Fn fchflags "int fd" "u_long flags"
-.Sh DESCRIPTION
-The file whose name
-is given by
-.Fa path
-or referenced by the descriptor
-.Fa fd
-has its flags changed to
-.Fa flags .
-.Pp
-The flags specified are formed by
-.Em or Ns 'ing
-the following values
-.Pp
-.Bl -tag -width "SF_IMMUTABLE" -compact -offset indent
-.It UF_NODUMP
-Do not dump the file.
-.It UF_IMMUTABLE
-The file may not be changed.
-.It UF_APPEND
-The file may only be appended to.
-.It UF_NOUNLINK
-The file may not be renamed or deleted.
-.It UF_OPAQUE
-The directory is opaque when viewed through a union stack.
-.\".It ARCHIVED
-.\"File is archived.
-.It SF_IMMUTABLE
-The file may not be changed.
-.It SF_APPEND
-The file may only be appended to.
-.It SF_NOUNLINK
-The file may not be renamed or deleted.
-.El
-.Pp
-The
-.Dq UF_IMMUTABLE
-,
-.Dq UF_APPEND
-and
-.Dq UF_NOUNLINK
-flags may be set or unset by either the owner of a file or the super-user.
-.Pp
-The
-.Dq SF_IMMUTABLE
-,
-.Dq SF_APPEND
-and
-.Dq SF_NOUNLINK
-flags may only be set or unset by the super-user.
-Attempts by the non-super-user to set the super-user only flags
-are silently ignored.
-These flags may be set at any time, but normally may only be unset when
-the system is in single-user mode.
-(See
-.Xr init 8
-for details.)
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Chflags
-will fail if:
-.Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EPERM
-The effective user ID does not match the owner of the file and
-the effective user ID is not the super-user.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.It Bq Er EIO
-An
-.Tn I/O
-error occurred while reading from or writing to the file system.
-.El
-.Pp
-.Fn Fchflags
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EBADF
-The descriptor is not valid.
-.It Bq Er EINVAL
-.Fa Fd
-refers to a socket, not to a file.
-.It Bq Er EPERM
-The effective user ID does not match the owner of the file and
-the effective user ID is not the super-user.
-.It Bq Er EROFS
-The file resides on a read-only file system.
-.It Bq Er EIO
-An
-.Tn I/O
-error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr chflags 1 ,
-.Xr init 8 ,
-.Xr mount_union 8
-.Sh HISTORY
-The
-.Nm chflags
-and
-.Nm fchflags
-functions first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2
deleted file mode 100644
index d4ba0cb..0000000
--- a/lib/libc/sys/chmod.2
+++ /dev/null
@@ -1,209 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)chmod.2 8.1 (Berkeley) 6/4/93
-.\" $Id: chmod.2,v 1.10 1997/08/17 00:19:28 steve Exp $
-.\"
-.Dd June 4, 1993
-.Dt CHMOD 2
-.Os BSD 4
-.Sh NAME
-.Nm chmod ,
-.Nm fchmod
-.Nd change mode of file
-.Sh SYNOPSIS
-.Fd #include <sys/stat.h>
-.Ft int
-.Fn chmod "const char *path" "mode_t mode"
-.Ft int
-.Fn fchmod "int fd" "mode_t mode"
-.Sh DESCRIPTION
-The function
-.Fn chmod
-sets the file permission bits
-of the file
-specified by the pathname
-.Fa path
-to
-.Fa mode .
-.Fn Fchmod
-sets the permission bits of the specified
-file descriptor
-.Fa fd .
-.Fn Chmod
-verifies that the process owner (user) either owns
-the file specified by
-.Fa path
-(or
-.Fa fd ) ,
-or
-is the super-user.
-A mode is created from
-.Em or'd
-permission bit masks
-defined in
-.Aq Pa sys/stat.h :
-.Bd -literal -offset indent -compact
-#define S_IRWXU 0000700 /* RWX mask for owner */
-#define S_IRUSR 0000400 /* R for owner */
-#define S_IWUSR 0000200 /* W for owner */
-#define S_IXUSR 0000100 /* X for owner */
-
-#define S_IRWXG 0000070 /* RWX mask for group */
-#define S_IRGRP 0000040 /* R for group */
-#define S_IWGRP 0000020 /* W for group */
-#define S_IXGRP 0000010 /* X for group */
-
-#define S_IRWXO 0000007 /* RWX mask for other */
-#define S_IROTH 0000004 /* R for other */
-#define S_IWOTH 0000002 /* W for other */
-#define S_IXOTH 0000001 /* X for other */
-
-#define S_ISUID 0004000 /* set user id on execution */
-#define S_ISGID 0002000 /* set group id on execution */
-#define S_ISVTX 0001000 /* sticky bit */
-#ifndef _POSIX_SOURCE
-#define S_ISTXT 0001000
-#endif
-.Ed
-.Pp
-The
-.Tn FreeBSD
-VM system totally ignores the sticky bit
-.Pf ( Dv ISVTX
-) for executables. On UFS-based filesystems (FFS, MFS, LFS) the sticky
-bit may only be set upon directories.
-.Pp
-If mode
-.Dv ISVTX
-(the `sticky bit') is set on a directory,
-an unprivileged user may not delete or rename
-files of other users in that directory. The sticky bit may be
-set by any user on a directory which the user owns or has appropriate
-permissions.
-For more details of the properties of the sticky bit, see
-.Xr sticky 8 .
-.Pp
-If mode ISUID (set UID) is set on a directory,
-and the MNT_SUIDDIR option was used in the mount of the filesystem,
-then the owner of any new files and sub-directories
-created within this directory are set
-to be the same as the owner of that directory.
-If this function is enabled, new directories will inherit
-the bit from their parents. Execute bits are removed from
-the file, and it will not be given to root. This behaviour does not change the
-requirements for the user to be allowed to write the file, but only the eventual
-owner after it has been created. Group inheritance is not effected.
-.Pp
-This feature is designed for use on fileservers serving PC users via
-ftp, SAMBA, or netatalk. It provides security holes for shell users and as
-such should not be used on shell machines, especially on home directories.
-This option requires the SUIDDIR
-option in the kernel to work. Only UFS filesystems support this option.
-For more details of the suiddir mount option, see
-.Xr mount 8 .
-.Pp
-Writing or changing the owner of a file
-turns off the set-user-id and set-group-id bits
-unless the user is the super-user.
-This makes the system somewhat more secure
-by protecting set-user-id (set-group-id) files
-from remaining set-user-id (set-group-id) if they are modified,
-at the expense of a degree of compatibility.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Chmod
-will fail and the file mode will be unchanged if:
-.Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EPERM
-The effective user ID does not match the owner of the file and
-the effective user ID is not the super-user.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.It Bq Er EFTYPE
-An attempt was made to set the sticky bit upon an executable.
-.El
-.Pp
-.Fn Fchmod
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EBADF
-The descriptor is not valid.
-.It Bq Er EINVAL
-.Fa Fd
-refers to a socket, not to a file.
-.It Bq Er EROFS
-The file resides on a read-only file system.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr chmod 1 ,
-.Xr chown 2 ,
-.Xr open 2 ,
-.Xr stat 2 ,
-.Xr sticky 8
-.Sh STANDARDS
-The
-.Fn chmod
-function call is expected to conform to
-.St -p1003.1-90 ,
-except for the return of EFTYPE and the use of S_ISTXT.
-.Sh HISTORY
-A
-.Fn chmod
-function call appeared in
-.At v7 .
-The
-.Fn fchmod
-function call
-appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/chown.2 b/lib/libc/sys/chown.2
deleted file mode 100644
index af1875c..0000000
--- a/lib/libc/sys/chown.2
+++ /dev/null
@@ -1,169 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)chown.2 8.4 (Berkeley) 4/19/94
-.\" $Id: chown.2,v 1.10 1997/03/31 12:37:35 peter Exp $
-.\"
-.Dd April 19, 1994
-.Dt CHOWN 2
-.Os BSD 4
-.Sh NAME
-.Nm chown ,
-.Nm fchown ,
-.Nm lchown
-.Nd change owner and group of a file
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn chown "const char *path" "uid_t owner" "gid_t group"
-.Ft int
-.Fn fchown "int fd" "uid_t owner" "gid_t group"
-.Ft int
-.Fn lchown "const char *path" "uid_t owner" "gid_t group"
-.Sh DESCRIPTION
-The owner ID and group ID of the file
-named by
-.Fa path
-or referenced by
-.Fa fd
-is changed as specified by the arguments
-.Fa owner
-and
-.Fa group .
-The owner of a file may change the
-.Fa group
-to a group of which
-he or she is a member,
-but the change
-.Fa owner
-capability is restricted to the super-user.
-.Pp
-.Fn Chown
-clears the set-user-id and set-group-id bits
-on the file
-to prevent accidental or mischievous creation of
-set-user-id and set-group-id programs if not executed
-by the super-user.
-.Fn chown
-follows symbolic links to operate on the target of the link
-rather than the link itself.
-.Pp
-.Fn Fchown
-is particularly useful when used in conjunction
-with the file locking primitives (see
-.Xr flock 2 ) .
-.Pp
-.Fn Lchown
-is similar to
-.Fn chown
-but does not follow symbolic links.
-.Pp
-One of the owner or group id's
-may be left unchanged by specifying it as -1.
-.Sh RETURN VALUES
-Zero is returned if the operation was successful;
--1 is returned if an error occurs, with a more specific
-error code being placed in the global variable
-.Va errno .
-.Sh ERRORS
-.Fn Chown
-and
-.Fn lchown
-will fail and the file will be unchanged if:
-.Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EPERM
-The effective user ID is not the super-user.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Pp
-.Fn Fchown
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EBADF
-.Fa Fd
-does not refer to a valid descriptor.
-.It Bq Er EINVAL
-.Fa Fd
-refers to a socket, not a file.
-.It Bq Er EPERM
-The effective user ID is not the super-user.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr chgrp 1 ,
-.Xr chmod 2 ,
-.Xr flock 2 ,
-.Xr chown 8
-.Sh STANDARDS
-The
-.Fn chown
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn chown
-function call appeared in
-.At v7 .
-The
-.Fn fchown
-function call
-appeared in
-.Bx 4.2 .
-.Pp
-The
-.Fn chown
-function was changed to follow symbolic links in
-.Bx 4.4 .
-The
-.Fn lchown
-function was added in
-.Fx 3.0
-to compensate for the loss of functionality.
diff --git a/lib/libc/sys/chroot.2 b/lib/libc/sys/chroot.2
deleted file mode 100644
index 10a9b5e..0000000
--- a/lib/libc/sys/chroot.2
+++ /dev/null
@@ -1,97 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)chroot.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt CHROOT 2
-.Os BSD 4.2
-.Sh NAME
-.Nm chroot
-.Nd change root directory
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn chroot "const char *dirname"
-.Sh DESCRIPTION
-.Fa Dirname
-is the address of the pathname of a directory, terminated by an ASCII NUL.
-.Fn Chroot
-causes
-.Fa dirname
-to become the root directory,
-that is, the starting point for path searches of pathnames
-beginning with
-.Ql / .
-.Pp
-In order for a directory to become the root directory
-a process must have execute (search) access for that directory.
-.Pp
-It should be noted that
-.Fn chroot
-has no effect on the process's current directory.
-.Pp
-This call is restricted to the super-user.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate an error.
-.Sh ERRORS
-.Fn Chroot
-will fail and the root directory will be unchanged if:
-.Bl -tag -width [ENOTDIR]
-.It Bq Er ENOTDIR
-A component of the path name is not a directory.
-.It Bq Er EPERM
-The effective user ID is not the super-user.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named directory does not exist.
-.It Bq Er EACCES
-Search permission is denied for any component of the path name.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr chdir 2
-.Sh HISTORY
-The
-.Fn chroot
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/clock_gettime.2 b/lib/libc/sys/clock_gettime.2
deleted file mode 100644
index 6894c14..0000000
--- a/lib/libc/sys/clock_gettime.2
+++ /dev/null
@@ -1,124 +0,0 @@
-.\" $OpenBSD: clock_gettime.2,v 1.4 1997/05/08 20:21:16 kstailey Exp $
-.\" $Id$
-.\"
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd May 8, 1997
-.Dt CLOCK_GETTIME 2
-.Os BSD 4
-.Sh NAME
-.Nm clock_gettime ,
-.Nm clock_settime ,
-.Nm clock_getres
-.Nd get/set/calibrate date and time
-.Sh SYNOPSIS
-.Fd #include <sys/time.h>
-.Ft int
-.Fn clock_gettime "clockid_t clock_id" "struct timespec *tp"
-.Ft int
-.Fn clock_settime "clockid_t clock_id" "const struct timespec *tp"
-.Ft int
-.Fn clock_getres "clockid_t clock_id" "const struct timespec *tp"
-.Sh DESCRIPTION
-The
-.Fn clock_gettime
-and
-.Fn clock_settime
-allow the calling process to retrieve or set the value used by a clock
-which is specifed by
-.Fa clock_id .
-.Pp
-.Fa clock_id
-can be one of three values: CLOCK_REALTIME for time that increments as
-a wall clock should, CLOCK_VIRTUAL for time that increments only when
-the CPU is running in user mode on behalf of the calling process, or
-CLOCK_PROF for time that increments when the CPU is running in user or
-kernel mode.
-.Pp
-The structure pointed to by
-.Fa tp
-is defined in
-.Ao Pa sys/time.h Ac
-as:
-.Pp
-.Bd -literal
-struct timespec {
- time_t tv_sec; /* seconds */
- long tv_nsec; /* and nanoseconds */
-};
-.Ed
-.Pp
-Only the super-user may set the time of day.
-If the system securelevel is greater than 1 (see
-.Xr init 8 ),
-the time may only be advanced.
-This limitation is imposed to prevent a malicious super-user
-from setting arbitrary time stamps on files.
-The system time can still be adjusted backwards using the
-.Xr adjtime 2
-system call even when the system is secure.
-.Pp
-The resolution (granularity) of a clock is returned by the
-.Fn clock_getres
-call. This value is placed in a (non-NULL)
-.Fa *tp .
-.Sh RETURN
-A 0 return value indicates that the call succeeded.
-A -1 return value indicates an error occurred, and in this
-case an error code is stored into the global variable
-.Va errno .
-.Sh ERRORS
-The following error codes may be set in
-.Va errno :
-.Bl -tag -width [EFAULT]
-.It Bq Er EINVAL
-The
-.Fa clock_id
-was not a valid value.
-.It Bq Er EFAULT
-The
-.Fa *tp
-argument address referenced invalid memory.
-.It Bq Er EPERM
-A user other than the super-user attempted to set the time.
-.El
-.Sh SEE ALSO
-.Xr date 1 ,
-.Xr adjtime 2 ,
-.Xr ctime 3 ,
-.Xr timed 8
-.Sh STANDARDS
-The
-.Fn clock_gettime ,
-etc.
-functions conform to
-.St -p1003.1b-93 .
diff --git a/lib/libc/sys/close.2 b/lib/libc/sys/close.2
deleted file mode 100644
index 1a66e39..0000000
--- a/lib/libc/sys/close.2
+++ /dev/null
@@ -1,149 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)close.2 8.2 (Berkeley) 4/19/94
-.\" $Id$
-.\"
-.Dd April 19, 1994
-.Dt CLOSE 2
-.Os BSD 4
-.Sh NAME
-.Nm close
-.Nd delete a descriptor
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn close "int d"
-.Sh DESCRIPTION
-The
-.Fn close
-call deletes a descriptor from the per-process object
-reference table.
-If this is the last reference to the underlying object, the
-object will be deactivated.
-For example, on the last close of a file
-the current
-.Em seek
-pointer associated with the file is lost;
-on the last close of a
-.Xr socket 2
-associated naming information and queued data are discarded;
-on the last close of a file holding an advisory lock
-the lock is released (see further
-.Xr flock 2 ) .
-.Pp
-When a process exits,
-all associated file descriptors are freed, but since there is
-a limit on active descriptors per processes, the
-.Fn close
-function call
-is useful when a large quantity of file descriptors are being handled.
-.Pp
-When a process forks (see
-.Xr fork 2 ) ,
-all descriptors for the new child process reference the same
-objects as they did in the parent before the fork.
-If a new process is then to be run using
-.Xr execve 2 ,
-the process would normally inherit these descriptors. Most
-of the descriptors can be rearranged with
-.Xr dup2 2
-or deleted with
-.Fn close
-before the
-.Xr execve 2
-is attempted, but if some of these descriptors will still
-be needed if the execve fails, it is necessary to arrange for them
-to be closed if the execve succeeds.
-For this reason, the call
-.Dq Li fcntl(d, F_SETFD, 1)
-is provided,
-which arranges that a descriptor will be closed after a successful
-execve; the call
-.Dq Li fcntl(d, F_SETFD, 0)
-restores the default,
-which is to not close the descriptor.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn close
-is implemented as the
-.Va close
-syscall.
-.Pp
-In the threaded library, the
-.Va close
-syscall is assembled to
-.Fn _thread_sys_close
-and
-.Fn close
-is implemented as a function which locks
-.Va d
-for read and write, then calls
-.Fn _thread_sys_close .
-Before returning,
-.Fn close
-unlocks
-.Va d .
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and the global integer variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Close
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EBADF
-.Fa D
-is not an active descriptor.
-.It Bq Er EINTR
-An interrupt was received.
-.El
-.Sh SEE ALSO
-.Xr accept 2 ,
-.Xr execve 2 ,
-.Xr fcntl 2 ,
-.Xr flock 2 ,
-.Xr open 2 ,
-.Xr pipe 2 ,
-.Xr socket 2 ,
-.Xr socketpair 2
-.Sh STANDARDS
-The
-.Fn close
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn close
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/connect.2 b/lib/libc/sys/connect.2
deleted file mode 100644
index f328d86..0000000
--- a/lib/libc/sys/connect.2
+++ /dev/null
@@ -1,170 +0,0 @@
-.\" Copyright (c) 1983, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)connect.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt CONNECT 2
-.Os BSD 4.2
-.Sh NAME
-.Nm connect
-.Nd initiate a connection on a socket
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn connect "int s" "const struct sockaddr *name" "int namelen"
-.Sh DESCRIPTION
-The parameter
-.Fa s
-is a socket.
-If it is of type
-.Dv SOCK_DGRAM ,
-this call specifies the peer with which the socket is to be associated;
-this address is that to which datagrams are to be sent,
-and the only address from which datagrams are to be received.
-If the socket is of type
-.Dv SOCK_STREAM ,
-this call attempts to make a connection to
-another socket.
-The other socket is specified by
-.Fa name ,
-which is an address in the communications space of the socket.
-Each communications space interprets the
-.Fa name
-parameter in its own way.
-Generally, stream sockets may successfully
-.Fn connect
-only once; datagram sockets may use
-.Fn connect
-multiple times to change their association.
-Datagram sockets may dissolve the association
-by connecting to an invalid address, such as a null address.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn connect
-is implemented as the
-.Va connect
-syscall.
-.Pp
-In the threaded library, the
-.Va connect
-syscall is assembled to
-.Fn _thread_sys_connect
-and
-.Fn connect
-is implemented as a function which locks
-.Va s
-for read and write, then calls
-.Fn _thread_sys_connect .
-If the call to
-.Fn _thread_sys_connect
-would block, a context switch is performed. Before returning,
-.Fn connect
-unlocks
-.Va s .
-.Sh RETURN VALUES
-If the connection or binding succeeds, 0 is returned.
-Otherwise a -1 is returned, and a more specific error
-code is stored in
-.Va errno .
-.Sh ERRORS
-The
-.Fn connect
-call fails if:
-.Bl -tag -width EADDRNOTAVAILABB
-.It Bq Er EBADF
-.Fa s
-is not a valid descriptor.
-.It Bq Er ENOTSOCK
-.Fa s
-is a descriptor for a file, not a socket.
-.It Bq Er EADDRNOTAVAIL
-The specified address is not available on this machine.
-.It Bq Er EAFNOSUPPORT
-Addresses in the specified address family cannot be used with this socket.
-.It Bq Er EISCONN
-The socket is already connected.
-.It Bq Er ETIMEDOUT
-Connection establishment timed out without establishing a connection.
-.It Bq Er ECONNREFUSED
-The attempt to connect was forcefully rejected.
-.It Bq Er ENETUNREACH
-The network isn't reachable from this host.
-.It Bq Er EADDRINUSE
-The address is already in use.
-.It Bq Er EFAULT
-The
-.Fa name
-parameter specifies an area outside
-the process address space.
-.It Bq Er EINPROGRESS
-The socket is non-blocking
-and the connection cannot
-be completed immediately.
-It is possible to
-.Xr select 2
-for completion by selecting the socket for writing.
-.It Bq Er EALREADY
-The socket is non-blocking
-and a previous connection attempt
-has not yet been completed.
-.El
-.Pp
-The following errors are specific to connecting names in the UNIX domain.
-These errors may not apply in future versions of the UNIX IPC domain.
-.Bl -tag -width EADDRNOTAVAILABB
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named socket does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er EACCES
-Write access to the named socket is denied.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.El
-.Sh SEE ALSO
-.Xr accept 2 ,
-.Xr getpeername 2 ,
-.Xr getsockname 2 ,
-.Xr select 2 ,
-.Xr socket 2
-.Sh HISTORY
-The
-.Fn connect
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/dup.2 b/lib/libc/sys/dup.2
deleted file mode 100644
index 58a967d..0000000
--- a/lib/libc/sys/dup.2
+++ /dev/null
@@ -1,204 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)dup.2 8.1 (Berkeley) 6/4/93
-.\" $Id: dup.2,v 1.7 1997/02/22 15:03:49 peter Exp $
-.\"
-.Dd June 4, 1993
-.Dt DUP 2
-.Os BSD 4
-.Sh NAME
-.Nm dup ,
-.Nm dup2
-.Nd duplicate an existing file descriptor
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn dup "int oldd"
-.Ft int
-.Fn dup2 "int oldd" "int newd"
-.Sh DESCRIPTION
-.Fn Dup
-duplicates an existing object descriptor and returns its value to
-the calling process
-.Fa ( newd
-=
-.Fn dup oldd ) .
-The argument
-.Fa oldd
-is a small non-negative integer index in
-the per-process descriptor table. The value must be less
-than the size of the table, which is returned by
-.Xr getdtablesize 2 .
-The new descriptor returned by the call
-is the lowest numbered descriptor
-currently not in use by the process.
-.Pp
-The object referenced by the descriptor does not distinguish
-between
-.Fa oldd
-and
-.Fa newd
-in any way.
-Thus if
-.Fa newd
-and
-.Fa oldd
-are duplicate references to an open
-file,
-.Xr read 2 ,
-.Xr write 2
-and
-.Xr lseek 2
-calls all move a single pointer into the file,
-and append mode, non-blocking I/O and asynchronous I/O options
-are shared between the references.
-If a separate pointer into the file is desired, a different
-object reference to the file must be obtained by issuing an
-additional
-.Xr open 2
-call.
-The close-on-exec flag on the new file descriptor is unset.
-.Pp
-In
-.Fn dup2 ,
-the value of the new descriptor
-.Fa newd
-is specified. If this descriptor is already in use and
-.Fa oldd
-!=
-.Fa newd ,
-the descriptor is first deallocated as if a
-.Xr close 2
-call had been used.
-If
-.Fa oldd
-is not a valid descriptor, then
-.Fa newd
-is not closed.
-If
-.Fa oldd
-==
-.Fa newd
-and
-.Fa oldd
-is a valid descriptor, then
-.Fn dup2
-is successful, and does nothing.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn dup
-is implemented as the
-.Va dup
-syscall.
-.Pp
-In the threaded library, the
-.Va dup
-syscall is assembled to
-.Fn _thread_sys_dup
-and
-.Fn dup
-is implemented as a function which locks
-.Va oldd
-for read and write, then calls
-.Fn _thread_sys_dup .
-Before returning,
-.Fn dup
-unlocks
-.Va oldd .
-.Pp
-In the non-threaded library
-.Fn dup2
-is implemented as the
-.Va dup2
-syscall.
-.Pp
-In the threaded library, the
-.Va dup2
-syscall is assembled to
-.Fn _thread_sys_dup2
-and
-.Fn dup2
-is implemented as a function which locks both
-.Va oldd
-and
-.Va newd
-for read and write, then calls
-.Fn _thread_sys_dup2 .
-Before returning,
-.Fn dup2
-unlocks
-.Va oldd .
-and
-.Va newd .
-.Sh RETURN VALUES
-The value -1 is returned if an error occurs in either call.
-The external variable
-.Va errno
-indicates the cause of the error.
-.Sh ERRORS
-.Fn Dup
-and
-.Fn dup2
-fail if:
-.Bl -tag -width Er
-.It Bq Er EBADF
-.Fa Oldd
-or
-.Fa newd
-is not a valid active descriptor
-.It Bq Er EMFILE
-Too many descriptors are active.
-.El
-.Sh SEE ALSO
-.Xr accept 2 ,
-.Xr close 2 ,
-.Xr fcntl 2 ,
-.Xr getdtablesize 2 ,
-.Xr open 2 ,
-.Xr pipe 2 ,
-.Xr socket 2 ,
-.Xr socketpair 2
-.Sh STANDARDS
-The
-.Fn dup
-and
-.Fn dup2
-function calls are expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn dup
-and a
-.Fn dup2
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2
deleted file mode 100644
index 36e69ad..0000000
--- a/lib/libc/sys/execve.2
+++ /dev/null
@@ -1,279 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)execve.2 8.5 (Berkeley) 6/1/94
-.\"
-.Dd June 1, 1994
-.Dt EXECVE 2
-.Os BSD 4
-.Sh NAME
-.Nm execve
-.Nd execute a file
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn execve "const char *path" "char *const argv[]" "char *const envp[]"
-.Sh DESCRIPTION
-.Fn Execve
-transforms the calling process into a new process.
-The new process is constructed from an ordinary file,
-whose name is pointed to by
-.Fa path ,
-called the
-.Em new process file .
-This file is either an executable object file,
-or a file of data for an interpreter.
-An executable object file consists of an identifying header,
-followed by pages of data representing the initial program (text)
-and initialized data pages. Additional pages may be specified
-by the header to be initialized with zero data; see
-.Xr a.out 5 .
-.Pp
-An interpreter file begins with a line of the form:
-.Pp
-.Bd -filled -offset indent -compact
-.Sy \&#!
-.Em interpreter
-.Bq Em arg
-.Ed
-.Pp
-When an interpreter file is
-.Sy execve Ap d ,
-the system actually
-.Sy execve Ap s
-the specified
-.Em interpreter .
-If the optional
-.Em arg
-is specified, it becomes the first argument to the
-.Em interpreter ,
-and the name of the originally
-.Sy execve Ap d
-file becomes the second argument;
-otherwise, the name of the originally
-.Sy execve Ap d
-file becomes the first argument. The original arguments are shifted over to
-become the subsequent arguments. The zeroth argument, normally the name of the
-.Sy execve Ap d
-file, is left unchanged.
-.Pp
-The argument
-.Fa argv
-is a pointer to a null-terminated array of
-character pointers to null-terminated character strings.
-These strings construct the argument list to be made available to the new
-process. At least one argument must be present in
-the array; by custom, the first element should be
-the name of the executed program (for example, the last component of
-.Fa path ) .
-.Pp
-The argument
-.Fa envp
-is also a pointer to a null-terminated array of
-character pointers to null-terminated strings.
-A pointer to this array is normally stored in the global variable
-.Va environ.
-These strings pass information to the
-new process that is not directly an argument to the command (see
-.Xr environ 7 ) .
-.Pp
-File descriptors open in the calling process image remain open in
-the new process image, except for those for which the close-on-exec
-flag is set (see
-.Xr close 2
-and
-.Xr fcntl 2 ) .
-Descriptors that remain open are unaffected by
-.Fn execve .
-.Pp
-Signals set to be ignored in the calling process are set to be ignored in
-the
-new process. Signals which are set to be caught in the calling process image
-are set to default action in the new process image.
-Blocked signals remain blocked regardless of changes to the signal action.
-The signal stack is reset to be undefined (see
-.Xr sigaction 2
-for more information).
-.Pp
-If the set-user-ID mode bit of the new process image file is set
-(see
-.Xr chmod 2 ) ,
-the effective user ID of the new process image is set to the owner ID
-of the new process image file.
-If the set-group-ID mode bit of the new process image file is set,
-the effective group ID of the new process image is set to the group ID
-of the new process image file.
-(The effective group ID is the first element of the group list.)
-The real user ID, real group ID and
-other group IDs of the new process image remain the same as the calling
-process image.
-After any set-user-ID and set-group-ID processing,
-the effective user ID is recorded as the saved set-user-ID,
-and the effective group ID is recorded as the saved set-group-ID.
-These values may be used in changing the effective IDs later (see
-.Xr setuid 2 ) .
-.ne 1i
-.Pp
-The new process also inherits the following attributes from
-the calling process:
-.Pp
-.Bl -column parent_process_ID -offset indent -compact
-.It process ID Ta see Xr getpid 2
-.It parent process ID Ta see Xr getppid 2
-.It process group ID Ta see Xr getpgrp 2
-.It access groups Ta see Xr getgroups 2
-.It working directory Ta see Xr chdir 2
-.It root directory Ta see Xr chroot 2
-.It control terminal Ta see Xr termios 4
-.It resource usages Ta see Xr getrusage 2
-.It interval timers Ta see Xr getitimer 2
-.It resource limits Ta see Xr getrlimit 2
-.It file mode mask Ta see Xr umask 2
-.It signal mask Ta see Xr sigvec 2 ,
-.Xr sigsetmask 2
-.El
-.Pp
-When a program is executed as a result of an
-.Fn execve
-call, it is entered as follows:
-.Bd -literal -offset indent
-main(argc, argv, envp)
-int argc;
-char **argv, **envp;
-.Ed
-.Pp
-where
-.Fa argc
-is the number of elements in
-.Fa argv
-(the ``arg count'')
-and
-.Fa argv
-points to the array of character pointers
-to the arguments themselves.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn execve
-is implemented as the
-.Va execve
-syscall.
-.Pp
-In the threaded library, the
-.Va execve
-syscall is assembled to
-.Fn _thread_sys_execve
-and
-.Fn execve
-is implemented as a function which performs user-thread
-library re-initialization and then calls
-.Fn _thread_sys_execve .
-.Sh RETURN VALUES
-As the
-.Fn execve
-function overlays the current process image
-with a new process image the successful call
-has no process to return to.
-If
-.Fn execve
-does return to the calling process an error has occurred; the
-return value will be -1 and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Execve
-will fail and return to the calling process if:
-.Bl -tag -width [ENAMETOOLONG]
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The new process file does not exist.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er EACCES
-The new process file is not an ordinary file.
-.It Bq Er EACCES
-The new process file mode denies execute permission.
-.It Bq Er ENOEXEC
-The new process file has the appropriate access
-permission, but has an invalid magic number in its header.
-.It Bq Er ETXTBSY
-The new process file is a pure procedure (shared text)
-file that is currently open for writing or reading by some process.
-.ne 1i
-.It Bq Er ENOMEM
-The new process requires more virtual memory than
-is allowed by the imposed maximum
-.Pq Xr getrlimit 2 .
-.It Bq Er E2BIG
-The number of bytes in the new process's argument list
-is larger than the system-imposed limit.
-The limit in the system as released is 65536 bytes
-.Pf ( Dv NCARGS
-in
-.Ao Pa sys/param.h Ac ) .
-.It Bq Er EFAULT
-The new process file is not as long as indicated by
-the size values in its header.
-.It Bq Er EFAULT
-.Fa Path ,
-.Fa argv ,
-or
-.Fa envp
-point
-to an illegal address.
-.It Bq Er EIO
-An I/O error occurred while reading from the file system.
-.El
-.Sh CAVEAT
-If a program is
-.Em setuid
-to a non-super-user, but is executed when
-the real
-.Em uid
-is ``root'', then the program has some of the powers
-of a super-user as well.
-.Sh SEE ALSO
-.Xr _exit 2 ,
-.Xr fork 2 ,
-.Xr execl 3 ,
-.Xr exit 3 ,
-.Xr environ 7
-.Sh HISTORY
-The
-.Fn execve
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2
deleted file mode 100644
index 877e830..0000000
--- a/lib/libc/sys/fcntl.2
+++ /dev/null
@@ -1,518 +0,0 @@
-.\" Copyright (c) 1983, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fcntl.2 8.2 (Berkeley) 1/12/94
-.\"
-.Dd January 12, 1994
-.Dt FCNTL 2
-.Os BSD 4.2
-.Sh NAME
-.Nm fcntl
-.Nd file control
-.Sh SYNOPSIS
-.Fd #include <fcntl.h>
-.Ft int
-.Fn fcntl "int fd" "int cmd" "int arg"
-.Sh DESCRIPTION
-.Fn Fcntl
-provides for control over descriptors.
-The argument
-.Fa fd
-is a descriptor to be operated on by
-.Fa cmd
-as follows:
-.Bl -tag -width F_GETOWNX
-.It Dv F_DUPFD
-Return a new descriptor as follows:
-.Pp
-.Bl -bullet -compact -offset 4n
-.It
-Lowest numbered available descriptor greater than or equal to
-.Fa arg .
-.It
-Same object references as the original descriptor.
-.It
-New descriptor shares the same file offset if the object
-was a file.
-.It
-Same access mode (read, write or read/write).
-.It
-Same file status flags (i.e., both file descriptors
-share the same file status flags).
-.It
-The close-on-exec flag associated with the new file descriptor
-is set to remain open across
-.Xr execve 2
-system calls.
-.El
-.It Dv F_GETFD
-Get the close-on-exec flag associated with the file descriptor
-.Fa fd .
-If the low-order bit of the returned value is 0,
-the file will remain open across
-.Fn exec ,
-otherwise the file will be closed upon execution of
-.Fn exec
-.Fa ( arg
-is ignored).
-.It Dv F_SETFD
-Set the close-on-exec flag associated with
-.Fa fd
-to the low order bit of
-.Fa arg
-(0 or 1 as above).
-.It Dv F_GETFL
-Get descriptor status flags, as described below
-.Fa ( arg
-is ignored).
-.It Dv F_SETFL
-Set descriptor status flags to
-.Fa arg .
-.It Dv F_GETOWN
-Get the process ID or process group
-currently receiving
-.Dv SIGIO
-and
-.Dv SIGURG
-signals; process groups are returned
-as negative values
-.Fa ( arg
-is ignored).
-.It Dv F_SETOWN
-Set the process or process group
-to receive
-.Dv SIGIO
-and
-.Dv SIGURG
-signals;
-process groups are specified by supplying
-.Fa arg
-as negative, otherwise
-.Fa arg
-is interpreted as a process ID.
-.El
-.Pp
-The flags for the
-.Dv F_GETFL
-and
-.Dv F_SETFL
-flags are as follows:
-.Bl -tag -width O_NONBLOCKX
-.It Dv O_NONBLOCK
-Non-blocking I/O; if no data is available to a
-.Xr read 2
-call, or if a
-.Xr write 2
-operation would block,
-the read or write call returns -1 with the error
-.Er EAGAIN .
-.It Dv O_APPEND
-Force each write to append at the end of file;
-corresponds to the
-.Dv O_APPEND
-flag of
-.Xr open 2 .
-.It Dv O_ASYNC
-Enable the
-.Dv SIGIO
-signal to be sent to the process group
-when I/O is possible, e.g.,
-upon availability of data to be read.
-.El
-.Pp
-Several commands are available for doing advisory file locking;
-they all operate on the following structure:
-.ne 7v
-.Bd -literal
-struct flock {
- off_t l_start; /* starting offset */
- off_t l_len; /* len = 0 means until end of file */
- pid_t l_pid; /* lock owner */
- short l_type; /* lock type: read/write, etc. */
- short l_whence; /* type of l_start */
-};
-.Ed
-The commands available for advisory record locking are as follows:
-.Bl -tag -width F_SETLKWX
-.It Dv F_GETLK
-Get the first lock that blocks the lock description pointed to by the
-third argument,
-.Fa arg ,
-taken as a pointer to a
-.Fa "struct flock"
-(see above).
-The information retrieved overwrites the information passed to
-.Fn fcntl
-in the
-.Fa flock
-structure.
-If no lock is found that would prevent this lock from being created,
-the structure is left unchanged by this function call except for the
-lock type which is set to
-.Dv F_UNLCK .
-.It Dv F_SETLK
-Set or clear a file segment lock according to the lock description
-pointed to by the third argument,
-.Fa arg ,
-taken as a pointer to a
-.Fa "struct flock"
-(see above).
-.Dv F_SETLK
-is used to establish shared (or read) locks
-.Dv (F_RDLCK)
-or exclusive (or write) locks,
-.Dv (F_WRLCK) ,
-as well as remove either type of lock
-.Dv (F_UNLCK) .
-If a shared or exclusive lock cannot be set,
-.Fn fcntl
-returns immediately with
-.Er EAGAIN .
-.It Dv F_SETLKW
-This command is the same as
-.Dv F_SETLK
-except that if a shared or exclusive lock is blocked by other locks,
-the process waits until the request can be satisfied.
-If a signal that is to be caught is received while
-.Fn fcntl
-is waiting for a region, the
-.Fn fcntl
-will be interrupted if the signal handler has not specified the
-.Dv SA_RESTART
-(see
-.Xr sigaction 2 ) .
-.El
-.Pp
-When a shared lock has been set on a segment of a file,
-other processes can set shared locks on that segment
-or a portion of it.
-A shared lock prevents any other process from setting an exclusive
-lock on any portion of the protected area.
-A request for a shared lock fails if the file descriptor was not
-opened with read access.
-.Pp
-An exclusive lock prevents any other process from setting a shared lock or
-an exclusive lock on any portion of the protected area.
-A request for an exclusive lock fails if the file was not
-opened with write access.
-.Pp
-The value of
-.Fa l_whence
-is
-.Dv SEEK_SET ,
-.Dv SEEK_CUR ,
-or
-.Dv SEEK_END
-to indicate that the relative offset,
-.Fa l_start
-bytes, will be measured from the start of the file,
-current position, or end of the file, respectively.
-The value of
-.Fa l_len
-is the number of consecutive bytes to be locked.
-If
-.Fa l_len
-is negative, the result is undefined.
-The
-.Fa l_pid
-field is only used with
-.Dv F_GETLK
-to return the process ID of the process holding a blocking lock.
-After a successful
-.Dv F_GETLK
-request, the value of
-.Fa l_whence
-is
-.Dv SEEK_SET .
-.Pp
-Locks may start and extend beyond the current end of a file,
-but may not start or extend before the beginning of the file.
-A lock is set to extend to the largest possible value of the
-file offset for that file if
-.Fa l_len
-is set to zero. If
-.Fa l_whence
-and
-.Fa l_start
-point to the beginning of the file, and
-.Fa l_len
-is zero, the entire file is locked.
-If an application wishes only to do entire file locking, the
-.Xr flock 2
-system call is much more efficient.
-.Pp
-There is at most one type of lock set for each byte in the file.
-Before a successful return from an
-.Dv F_SETLK
-or an
-.Dv F_SETLKW
-request when the calling process has previously existing locks
-on bytes in the region specified by the request,
-the previous lock type for each byte in the specified
-region is replaced by the new lock type.
-As specified above under the descriptions
-of shared locks and exclusive locks, an
-.Dv F_SETLK
-or an
-.Dv F_SETLKW
-request fails or blocks respectively when another process has existing
-locks on bytes in the specified region and the type of any of those
-locks conflicts with the type specified in the request.
-.Pp
-This interface follows the completely stupid semantics of System V and
-.St -p1003.1-88
-that require that all locks associated with a file for a given process are
-removed when
-.Em any
-file descriptor for that file is closed by that process.
-This semantic means that applications must be aware of any files that
-a subroutine library may access.
-For example if an application for updating the password file locks the
-password file database while making the update, and then calls
-.Xr getpwnam 3
-to retrieve a record,
-the lock will be lost because
-.Xr getpwnam 3
-opens, reads, and closes the password database.
-The database close will release all locks that the process has
-associated with the database, even if the library routine never
-requested a lock on the database.
-Another minor semantic problem with this interface is that
-locks are not inherited by a child process created using the
-.Xr fork 2
-function.
-The
-.Xr flock 2
-interface has much more rational last close semantics and
-allows locks to be inherited by child processes.
-.Xr Flock 2
-is recommended for applications that want to ensure the integrity
-of their locks when using library routines or wish to pass locks
-to their children.
-Note that
-.Xr flock 2
-and
-.Xr fcntl 2
-locks may be safely used concurrently.
-.Pp
-All locks associated with a file for a given process are
-removed when the process terminates.
-.Pp
-A potential for deadlock occurs if a process controlling a locked region
-is put to sleep by attempting to lock the locked region of another process.
-This implementation detects that sleeping until a locked region is unlocked
-would cause a deadlock and fails with an
-.Er EDEADLK
-error.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn fcntl
-is implemented as the
-.Va fcntl
-syscall.
-.Pp
-In the threaded library, the
-.Va fcntl
-syscall is assembled to
-.Fn _thread_sys_fcntl
-and
-.Fn fcntl
-is implemented as a function which disables thread rescheduling, locks
-.Va fd
-for read and write, then calls
-.Fn _thread_sys_fcntl .
-Before returning,
-.Fn fcntl
-unlocks
-.Va fd
-and enables thread rescheduling.
-.Sh RETURN VALUES
-Upon successful completion, the value returned depends on
-.Fa cmd
-as follows:
-.Bl -tag -width F_GETOWNX -offset indent
-.It Dv F_DUPFD
-A new file descriptor.
-.It Dv F_GETFD
-Value of flag (only the low-order bit is defined).
-.It Dv F_GETFL
-Value of flags.
-.It Dv F_GETOWN
-Value of file descriptor owner.
-.It other
-Value other than -1.
-.El
-.Pp
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Fcntl
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EAGAIN
-The argument
-.Fa cmd
-is
-.Dv F_SETLK ,
-the type of lock
-.Fa (l_type)
-is a shared lock
-.Dv (F_RDLCK)
-or exclusive lock
-.Dv (F_WRLCK) ,
-and the segment of a file to be locked is already
-exclusive-locked by another process;
-or the type is an exclusive lock and some portion of the
-segment of a file to be locked is already shared-locked or
-exclusive-locked by another process.
-.It Bq Er EBADF
-.Fa Fildes
-is not a valid open file descriptor.
-.Pp
-The argument
-.Fa cmd
-is
-.Dv F_SETLK
-or
-.Dv F_SETLKW ,
-the type of lock
-.Fa (l_type)
-is a shared lock
-.Dv (F_RDLCK) ,
-and
-.Fa fildes
-is not a valid file descriptor open for reading.
-.Pp
-The argument
-.Fa cmd
-is
-.Dv F_SETLK
-or
-.Dv F_SETLKW ,
-the type of lock
-.Fa (l_type)
-is an exclusive lock
-.Dv (F_WRLCK) ,
-and
-.Fa fildes
-is not a valid file descriptor open for writing.
-.It Bq Er EDEADLK
-The argument
-.Fa cmd
-is
-.Dv F_SETLKW ,
-and a deadlock condition was detected.
-.It Bq Er EINTR
-The argument
-.Fa cmd
-is
-.Dv F_SETLKW ,
-and the function was interrupted by a signal.
-.It Bq Er EINVAL
-.Fa Cmd
-is
-.Dv F_DUPFD
-and
-.Fa arg
-is negative or greater than the maximum allowable number
-(see
-.Xr getdtablesize 2 ) .
-.Pp
-The argument
-.Fa cmd
-is
-.Dv F_GETLK ,
-.Dv F_SETLK ,
-or
-.Dv F_SETLKW
-and the data to which
-.Fa arg
-points is not valid, or
-.Fa fildes
-refers to a file that does not support locking.
-.It Bq Er EMFILE
-The argument
-.Fa cmd
-is
-.Dv F_DUPFD
-and the maximum number of file descriptors permitted for the
-process are already in use,
-or no file descriptors greater than or equal to
-.Fa arg
-are available.
-.It Bq Er ENOLCK
-The argument
-.Fa cmd
-is
-.Dv F_SETLK
-or
-.Dv F_SETLKW ,
-and satisfying the lock or unlock request would result in the
-number of locked regions in the system exceeding a system-imposed limit.
-.It Bq Er ESRCH
-.Fa Cmd
-is
-.Dv F_SETOWN
-and
-the process ID given as argument is not in use.
-.El
-.Pp
-In addition, if
-.Fa fd
-refers to a descriptor open on a terminal device (as opposed to a
-descriptor open on a socket), a
-.Fa cmd
-of
-.Dv F_SETOWN
-can fail for the same reasons as in
-.Xr tcsetpgrp 3 ,
-and a
-.Fa cmd
-of
-.Dv F_GETOWN
-for the reasons as stated in
-.Xr tcgetpgrp 3 .
-.Sh SEE ALSO
-.Xr close 2 ,
-.Xr execve 2 ,
-.Xr flock 2 ,
-.Xr getdtablesize 2 ,
-.Xr open 2 ,
-.Xr sigvec 2 ,
-.Xr tcgetpgrp 3 ,
-.Xr tcsetpgrp 3
-.Sh HISTORY
-The
-.Fn fcntl
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/flock.2 b/lib/libc/sys/flock.2
deleted file mode 100644
index 466e347..0000000
--- a/lib/libc/sys/flock.2
+++ /dev/null
@@ -1,171 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)flock.2 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt FLOCK 2
-.Os BSD 4.2
-.Sh NAME
-.Nm flock
-.Nd "apply or remove an advisory lock on an open file"
-.Sh SYNOPSIS
-.Fd #include <sys/file.h>
-.Fd #define LOCK_SH 0x01 /* shared file lock */
-.Fd #define LOCK_EX 0x02 /* exclusive file lock */
-.Fd #define LOCK_NB 0x04 /* don't block when locking */
-.Fd #define LOCK_UN 0x08 /* unlock file */
-.Ft int
-.Fn flock "int fd" "int operation"
-.Sh DESCRIPTION
-.Fn Flock
-applies or removes an
-.Em advisory
-lock on the file associated with the file descriptor
-.Fa fd .
-A lock is applied by specifying an
-.Fa operation
-parameter that is one of
-.Dv LOCK_SH
-or
-.Dv LOCK_EX
-with the optional addition of
-.Dv LOCK_NB .
-To unlock
-an existing lock
-.Dv operation
-should be
-.Dv LOCK_UN .
-.Pp
-Advisory locks allow cooperating processes to perform
-consistent operations on files, but do not guarantee
-consistency (i.e., processes may still access files
-without using advisory locks possibly resulting in
-inconsistencies).
-.Pp
-The locking mechanism allows two types of locks:
-.Em shared
-locks and
-.Em exclusive
-locks.
-At any time multiple shared locks may be applied to a file,
-but at no time are multiple exclusive, or both shared and exclusive,
-locks allowed simultaneously on a file.
-.Pp
-A shared lock may be
-.Em upgraded
-to an exclusive lock, and vice versa, simply by specifying
-the appropriate lock type; this results in the previous
-lock being released and the new lock applied (possibly
-after other processes have gained and released the lock).
-.Pp
-Requesting a lock on an object that is already locked
-normally causes the caller to be blocked until the lock may be
-acquired. If
-.Dv LOCK_NB
-is included in
-.Fa operation ,
-then this will not happen; instead the call will fail and
-the error
-.Er EWOULDBLOCK
-will be returned.
-.Sh NOTES
-Locks are on files, not file descriptors. That is, file descriptors
-duplicated through
-.Xr dup 2
-or
-.Xr fork 2
-do not result in multiple instances of a lock, but rather multiple
-references to a single lock. If a process holding a lock on a file
-forks and the child explicitly unlocks the file, the parent will
-lose its lock.
-.Pp
-Processes blocked awaiting a lock may be awakened by signals.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn flock
-is implemented as the
-.Va flock
-syscall.
-.Pp
-In the threaded library, the
-.Va flock
-syscall is assembled to
-.Fn _thread_sys_flock
-and
-.Fn flock
-is implemented as a function which locks
-.Va fd
-for read and write, then calls
-.Fn _thread_sys_flock .
-Before returning,
-.Fn flock
-unlocks
-.Va fd .
-.Sh RETURN VALUES
-Zero is returned if the operation was successful;
-on an error a -1 is returned and an error code is left in
-the global location
-.Va errno .
-.Sh ERRORS
-The
-.Fn flock
-call fails if:
-.Bl -tag -width EWOULDBLOCKAA
-.It Bq Er EWOULDBLOCK
-The file is locked and the
-.Dv LOCK_NB
-option was specified.
-.It Bq Er EBADF
-The argument
-.Fa fd
-is an invalid descriptor.
-.It Bq Er EINVAL
-The argument
-.Fa fd
-refers to an object other than a file.
-.It Bq Er EOPNOTSUPP
-The argument
-.Fa fd
-refers to an object that does not support file locking.
-.El
-.Sh SEE ALSO
-.Xr close 2 ,
-.Xr dup 2 ,
-.Xr execve 2 ,
-.Xr fork 2 ,
-.Xr open 2
-.Sh HISTORY
-The
-.Fn flock
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2
deleted file mode 100644
index f84cd1b..0000000
--- a/lib/libc/sys/fork.2
+++ /dev/null
@@ -1,124 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fork.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FORK 2
-.Os BSD 4
-.Sh NAME
-.Nm fork
-.Nd create a new process
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft pid_t
-.Fn fork void
-.Sh DESCRIPTION
-.Fn Fork
-causes creation of a new process.
-The new process (child process) is an exact copy of the
-calling process (parent process) except for the following:
-.Bl -bullet -offset indent
-.It
-The child process has a unique process ID.
-.It
-The child process has a different parent
-process ID (i.e., the process ID of the parent process).
-.It
-The child process has its own copy of the parent's descriptors.
-These descriptors reference the same underlying objects, so that,
-for instance, file pointers in file objects are shared between
-the child and the parent, so that an
-.Xr lseek 2
-on a descriptor in the child process can affect a subsequent
-.Xr read 2
-or
-.Xr write 2
-by the parent.
-This descriptor copying is also used by the shell to
-establish standard input and output for newly created processes
-as well as to set up pipes.
-.It
-The child processes resource utilizations
-are set to 0; see
-.Xr setrlimit 2 .
-.El
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn fork
-returns a value
-of 0 to the child process and returns the process ID of the child
-process to the parent process. Otherwise, a value of -1 is returned
-to the parent process, no child process is created, and the global
-variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Fork
-will fail and no child process will be created if:
-.Bl -tag -width [EAGAIN]
-.It Bq Er EAGAIN
-The system-imposed limit on the total
-number of processes under execution would be exceeded.
-The limit is given by the
-.Xr sysctl 3
-MIB variable
-.Dv KERN_MAXPROC .
-(The limit is actually one less than this
-except for the super user).
-.It Bq Er EAGAIN
-The user is not the super user, and
-the system-imposed limit
-on the total number of
-processes under execution by a single user would be exceeded.
-The limit is given by the
-.Xr sysctl 3
-MIB variable
-.Dv KERN_MAXPROCPERUID .
-.It Bq Er EAGAIN
-The user is not the super user, and
-the soft resource limit corresponding to the resource parameter
-.Dv RLIMIT_NPROC
-would be exceeded (see
-.Xr getrlimit 2 ) .
-.It Bq Er ENOMEM
-There is insufficient swap space for the new process.
-.El
-.Sh SEE ALSO
-.Xr execve 2 ,
-.Xr rfork 2 ,
-.Xr vfork 2 ,
-.Xr wait 2
-.Sh HISTORY
-A
-.Fn fork 2
-function call appeared in
-.At v6 .
diff --git a/lib/libc/sys/fsync.2 b/lib/libc/sys/fsync.2
deleted file mode 100644
index 74105ec..0000000
--- a/lib/libc/sys/fsync.2
+++ /dev/null
@@ -1,103 +0,0 @@
-.\" Copyright (c) 1983, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fsync.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FSYNC 2
-.Os BSD 4.2
-.Sh NAME
-.Nm fsync
-.Nd "synchronize a file's in-core state with that on disk"
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn fsync "int fd"
-.Sh DESCRIPTION
-.Fn Fsync
-causes all modified data and attributes of
-.Fa fd
-to be moved to a permanent storage device.
-This normally results in all in-core modified copies
-of buffers for the associated file to be written to a disk.
-.Pp
-.Fn Fsync
-should be used by programs that require a file to be
-in a known state, for example, in building a simple transaction
-facility.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn fsync
-is implemented as the
-.Va fsync
-syscall.
-.Pp
-In the threaded library, the
-.Va fsync
-syscall is assembled to
-.Fn _thread_sys_fsync
-and
-.Fn fsync
-is implemented as a function which locks
-.Va fd
-for read and write, then calls
-.Fn _thread_sys_fsync .
-Before returning,
-.Fn fsync
-unlocks
-.Va fd .
-.Sh RETURN VALUES
-A 0 value is returned on success. A -1 value indicates
-an error.
-.Sh ERRORS
-The
-.Fn fsync
-fails if:
-.Bl -tag -width Er
-.It Bq Er EBADF
-.Fa Fd
-is not a valid descriptor.
-.It Bq Er EINVAL
-.Fa Fd
-refers to a socket, not to a file.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr sync 2 ,
-.Xr update 4 ,
-.Xr sync 8
-.Sh HISTORY
-The
-.Fn fsync
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/ftruncate.c b/lib/libc/sys/ftruncate.c
deleted file mode 100644
index 72a6a91..0000000
--- a/lib/libc/sys/ftruncate.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ftruncate.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * This function provides 64-bit offset padding that
- * is not supplied by GCC 1.X but is supplied by GCC 2.X.
- */
-int
-ftruncate(fd, length)
- int fd;
- off_t length;
-{
-
-#ifdef _THREAD_SAFE
- int retval;
- if (_thread_fd_lock(fd, FD_RDWR, NULL,__FILE__,__LINE__) != 0) {
- retval = -1;
- } else {
- retval = __syscall((quad_t)SYS_ftruncate, fd, 0, length);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return(retval);
-#else
- return(__syscall((quad_t)SYS_ftruncate, fd, 0, length));
-#endif
-}
diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2
deleted file mode 100644
index be85934..0000000
--- a/lib/libc/sys/getdirentries.2
+++ /dev/null
@@ -1,182 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getdirentries.2 8.2 (Berkeley) 5/3/95
-.\"
-.Dd May 3, 1995
-.Dt GETDIRENTRIES 2
-.Os
-.Sh NAME
-.Nm getdirentries
-.Nd "get directory entries in a filesystem independent format"
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <dirent.h>
-.Ft int
-.Fn getdirentries "int fd" "char *buf" "int nbytes" "long *basep"
-.Sh DESCRIPTION
-.Fn Getdirentries
-reads directory entries from the directory
-referenced by the file descriptor
-.Fa fd
-into the buffer pointed to by
-.Fa buf ,
-in a filesystem independent format.
-Up to
-.Fa nbytes
-of data will be transferred.
-.Fa Nbytes
-must be greater than or equal to the
-block size associated with the file,
-see
-.Xr stat 2 .
-Some filesystems may not support
-.Fn getdirentries
-with buffers smaller than this size.
-.Pp
-The data in the buffer is a series of
-.Em dirent
-structures each containing the following entries:
-.Bd -literal -offset indent
-u_int32_t d_fileno;
-u_int16_t d_reclen;
-u_int8_t d_type;
-u_int8_t d_namelen;
-char d_name[MAXNAMELEN + 1]; /* see below */
-.Ed
-.Pp
-The
-.Fa d_fileno
-entry is a number which is unique for each
-distinct file in the filesystem.
-Files that are linked by hard links (see
-.Xr link 2 )
-have the same
-.Fa d_fileno .
-The
-.Fa d_reclen
-entry is the length, in bytes, of the directory record.
-The
-.Fa d_type
-entry is the type of the file pointed to by the directory record.
-The file type values are defined in
-.Fa <sys/dirent.h> .
-The
-.Fa d_name
-entry contains a null terminated file name.
-The
-.Fa d_namlen
-entry specifies the length of the file name excluding the null byte.
-Thus the actual size of
-.Fa d_name
-may vary from 1 to
-.Dv MAXNAMELEN
-\&+ 1.
-.Pp
-Entries may be separated by extra space.
-The
-.Fa d_reclen
-entry may be used as an offset from the start of a
-.Fa dirent
-structure to the next structure, if any.
-.Pp
-The actual number of bytes transferred is returned.
-The current position pointer associated with
-.Fa fd
-is set to point to the next block of entries.
-The pointer may not advance by the number of bytes returned by
-.Fn getdirentries .
-A value of zero is returned when
-the end of the directory has been reached.
-.Pp
-.Fn Getdirentries
-writes the position of the block read into the location pointed to by
-.Fa basep .
-Alternatively, the current position pointer may be set and retrieved by
-.Xr lseek 2 .
-The current position pointer should only be set to a value returned by
-.Xr lseek 2 ,
-a value returned in the location pointed to by
-.Fa basep ,
-or zero.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn getdirentries
-is implemented as the
-.Va getdirentries
-syscall.
-.Pp
-In the threaded library, the
-.Va getdirentries
-syscall is assembled to
-.Fn _thread_sys_getdirentries
-and
-.Fn getdirentries
-is implemented as a function which locks
-.Va fd
-for read and write, then calls
-.Fn _thread_sys_getdirentries .
-Before returning,
-.Fn getdirentries
-unlocks
-.Va fd .
-.Sh RETURN VALUES
-If successful, the number of bytes actually transferred is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Getdirentries
-will fail if:
-.Bl -tag -width [EFAULT]
-.It Bq Er EBADF
-.Fa fd
-is not a valid file descriptor open for reading.
-.It Bq Er EFAULT
-Either
-.Fa buf
-or
-.Fa basep
-point outside the allocated address space.
-.It Bq Er EIO
-An
-.Tn I/O
-error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr lseek 2 ,
-.Xr open 2
-.Sh HISTORY
-The
-.Fn getdirentries
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/getdtablesize.2 b/lib/libc/sys/getdtablesize.2
deleted file mode 100644
index 8251fec..0000000
--- a/lib/libc/sys/getdtablesize.2
+++ /dev/null
@@ -1,60 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getdtablesize.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETDTABLESIZE 2
-.Os BSD 4.2
-.Sh NAME
-.Nm getdtablesize
-.Nd get descriptor table size
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn getdtablesize void
-.Sh DESCRIPTION
-Each process has a fixed size descriptor table,
-which is guaranteed to have at least 20 slots. The entries in
-the descriptor table are numbered with small integers starting at 0.
-The call
-.Fn getdtablesize
-returns the size of this table.
-.Sh SEE ALSO
-.Xr close 2 ,
-.Xr dup 2 ,
-.Xr open 2 ,
-.Xr select 2
-.Sh HISTORY
-The
-.Nm
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/getfh.2 b/lib/libc/sys/getfh.2
deleted file mode 100644
index 44ac7e7..0000000
--- a/lib/libc/sys/getfh.2
+++ /dev/null
@@ -1,94 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getfh.2 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt GETFH 2
-.Os
-.Sh NAME
-.Nm getfh
-.Nd get file handle
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/mount.h>
-.Ft int
-.Fn getfh "const char *path" "fhandle_t *fhp"
-.Sh DESCRIPTION
-.Fn Getfh
-returns a file handle for the specified file or directory
-in the file handle pointed to by
-.Fa fhp .
-This system call is restricted to the superuser.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Getfh
-fails if one or more of the following are true:
-.Bl -tag -width Er
-.It Bq ENOTDIR
-A component of the path prefix of
-.Fa path
-is not a directory.
-.It Bq ENAMETOOLONG
-The length of a component of
-.Fa path
-exceeds 255 characters,
-or the length of
-.Fa path
-exceeds 1023 characters.
-.It Bq ENOENT
-The file referred to by
-.Fa path
-does not exist.
-.It Bq EACCES
-Search permission is denied for a component of the path prefix of
-.Fa path .
-.It Bq ELOOP
-Too many symbolic links were encountered in translating
-.Fa path .
-.It Bq EFAULT
-.Fa Fhp
-points to an invalid address.
-.It Bq EIO
-An
-.Tn I/O
-error occurred while reading from or writing to the file system.
-.El
-.Sh HISTORY
-The
-.Fn getfh
-function
-first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/getfsstat.2 b/lib/libc/sys/getfsstat.2
deleted file mode 100644
index 011a815..0000000
--- a/lib/libc/sys/getfsstat.2
+++ /dev/null
@@ -1,171 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getfsstat.2 8.3 (Berkeley) 5/25/95
-.\"
-.Dd May 25, 1995
-.Dt GETFSSTAT 2
-.Os
-.Sh NAME
-.Nm getfsstat
-.Nd get list of all mounted filesystems
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/ucred.h>
-.Fd #include <sys/mount.h>
-.Ft int
-.Fn getfsstat "struct statfs *buf" "long bufsize" "int flags"
-.Sh DESCRIPTION
-.Fn Getfsstat
-returns information about all mounted filesystems.
-.Fa Buf
-is a pointer to
-.Xr statfs
-structures defined as follows:
-.Bd -literal
-typedef struct fsid { int32_t val[2]; } fsid_t; /* file system id type */
-
-/*
- * file system statistics
- */
-
-#define MFSNAMELEN 16 /* length of fs type name, including null */
-#define MNAMELEN 90 /* length of buffer for returned name */
-
-struct statfs {
- long f_spare2; /* placeholder */
- long f_bsize; /* fundamental file system block size */
- long f_iosize; /* optimal transfer block size */
- long f_blocks; /* total data blocks in file system */
- long f_bfree; /* free blocks in fs */
- long f_bavail; /* free blocks avail to non-superuser */
- long f_files; /* total file nodes in file system */
- long f_ffree; /* free file nodes in fs */
- fsid_t f_fsid; /* file system id */
- uid_t f_owner; /* user that mounted the filesystem */
- int f_type; /* type of filesystem (see below) */
- int f_flags; /* copy of mount flags */
- long f_spare[2]; /* spare for later */
- char f_fstypename[MFSNAMELEN];/* fs type name */
- char f_mntonname[MNAMELEN];/* directory on which mounted */
- char f_mntfromname[MNAMELEN];/* mounted filesystem */
-};
-.Ed
-.Pp
-The flags that may be returned include:
-.Bl -tag -width MNT_ASYNCHRONOUS
-.It Dv MNT_RDONLY
-The filesystem is mounted read-only;
-Even the super-user may not write on it.
-.It Dv MNT_NOEXEC
-Files may not be executed from the filesystem.
-.It Dv MNT_NOSUID
-Setuid and setgid bits on files are not honored when they are executed.
-.It Dv MNT_NODEV
-Special files in the filesystem may not be opened.
-.It Dv MNT_SYNCHRONOUS
-All I/O to the filesystem is done synchronously.
-.It Dv MNT_ASYNCHRONOUS
-No filesystem I/O is done synchronously.
-.It Dv MNT_LOCAL
-The filesystem resides locally.
-.It Dv MNT_QUOTA
-The filesystem has quotas enabled on it.
-.It Dv MNT_ROOTFS
-Identifies the root filesystem.
-.It Dv MNT_EXRDONLY
-The filesystem is exported read-only.
-.It Dv MNT_EXPORTED
-The filesystem is exported for both reading and writing.
-.It Dv MNT_DEFEXPORTED
-The filesystem is exported for both reading and writing to any Internet host.
-.It Dv MNT_EXPORTANON
-The filesystem maps all remote accesses to the anonymous user.
-.It Dv MNT_EXKERB
-The filesystem is exported with Kerberos uid mapping.
-.El
-.Pp
-Fields that are undefined for a particular filesystem are set to -1.
-The buffer is filled with an array of
-.Fa fsstat
-structures, one for each mounted filesystem
-up to the size specified by
-.Fa bufsize .
-.Pp
-If
-.Fa buf
-is given as NULL,
-.Fn getfsstat
-returns just the number of mounted filesystems.
-.Pp
-Normally
-.Fa flags
-should be specified as
-.Dv MNT_WAIT .
-If
-.Fa flags
-is set to
-.Dv MNT_NOWAIT ,
-.Fn getfsstat
-will return the information it has available without requesting
-an update from each filesystem.
-Thus, some of the information will be out of date, but
-.Fn getfsstat
-will not block waiting for information from a filesystem that is
-unable to respond.
-.Sh RETURN VALUES
-Upon successful completion, the number of
-.Fa fsstat
-structures is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Getfsstat
-fails if one or more of the following are true:
-.Bl -tag -width Er
-.It EFAULT
-.Fa Buf
-points to an invalid address.
-.It EIO
-An
-.Tn I/O
-error occurred while reading from or writing to the filesystem.
-.El
-.Sh SEE ALSO
-.Xr statfs 2 ,
-.Xr fstab 5 ,
-.Xr mount 8
-.Sh HISTORY
-The
-.Fn getfsstat
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/getgid.2 b/lib/libc/sys/getgid.2
deleted file mode 100644
index bf58d18..0000000
--- a/lib/libc/sys/getgid.2
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getgid.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETGID 2
-.Os BSD 4.2
-.Sh NAME
-.Nm getgid ,
-.Nm getegid
-.Nd get group process identification
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <unistd.h>
-.Ft gid_t
-.Fn getgid void
-.Ft gid_t
-.Fn getegid void
-.Sh DESCRIPTION
-The
-.Fn getgid
-function returns the real group ID of the calling process,
-.Fn getegid
-returns the effective group ID of the calling process.
-.Pp
-The real group ID is specified at login time.
-.Pp
-The real group ID is the group of the user who invoked the program.
-As the effective group ID gives the process additional permissions
-during the execution of
-.Dq Em set-group-ID
-mode processes,
-.Fn getgid
-is used to determine the real-user-id of the calling process.
-.Sh ERRORS
-The
-.Fn getgid
-and
-.Fn getegid
-functions are always successful, and no return value is reserved to
-indicate an error.
-.Sh SEE ALSO
-.Xr getuid 2 ,
-.Xr issetugid 2 ,
-.Xr setgid 2 ,
-.Xr setregid 2
-.Sh STANDARDS
-The
-.Fn getgid
-and
-.Fn getegid
-function calls are expected to conform to
-.St -p1003.1-90 .
diff --git a/lib/libc/sys/getgroups.2 b/lib/libc/sys/getgroups.2
deleted file mode 100644
index ea73890..0000000
--- a/lib/libc/sys/getgroups.2
+++ /dev/null
@@ -1,90 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getgroups.2 8.2 (Berkeley) 4/16/94
-.\"
-.Dd April 16, 1994
-.Dt GETGROUPS 2
-.Os BSD 4.2
-.Sh NAME
-.Nm getgroups
-.Nd get group access list
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <unistd.h>
-.Ft int
-.Fn getgroups "int gidsetlen" "gid_t *gidset"
-.Sh DESCRIPTION
-.Fn Getgroups
-gets the current group access list of the user process
-and stores it in the array
-.Fa gidset .
-The parameter
-.Fa gidsetlen
-indicates the number of entries that may be placed in
-.Fa gidset .
-.Fn Getgroups
-returns the actual number of groups returned in
-.Fa gidset .
-No more than
-.Dv NGROUPS ,
-as defined in
-.Aq Pa sys/param.h ,
-will ever
-be returned.
-.Sh RETURN VALUES
-A successful call returns the number of groups in the group set.
-A value of -1 indicates that an error occurred, and the error
-code is stored in the global variable
-.Va errno .
-.Sh ERRORS
-The possible errors for
-.Fn getgroups
-are:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The argument
-.Fa gidsetlen
-is smaller than the number of groups in the group set.
-.It Bq Er EFAULT
-The argument
-.Fa gidset
-specifies
-an invalid address.
-.El
-.Sh SEE ALSO
-.Xr setgroups 2 ,
-.Xr initgroups 3
-.Sh HISTORY
-The
-.Fn getgroups
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/getitimer.2 b/lib/libc/sys/getitimer.2
deleted file mode 100644
index 171bc42..0000000
--- a/lib/libc/sys/getitimer.2
+++ /dev/null
@@ -1,176 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getitimer.2 8.3 (Berkeley) 5/16/95
-.\"
-.Dd May 16, 1995
-.Dt GETITIMER 2
-.Os BSD 4.2
-.Sh NAME
-.Nm getitimer ,
-.Nm setitimer
-.Nd get/set value of interval timer
-.Sh SYNOPSIS
-.Fd #include <sys/time.h>
-.Fd #define ITIMER_REAL 0
-.Fd #define ITIMER_VIRTUAL 1
-.Fd #define ITIMER_PROF 2
-.Ft int
-.Fn getitimer "int which" "struct itimerval *value"
-.Ft int
-.Fn setitimer "int which" "const struct itimerval *value" "struct itimerval *ovalue"
-.Sh DESCRIPTION
-The system provides each process with three interval timers,
-defined in
-.Ao Pa sys/time.h Ac .
-The
-.Fn getitimer
-call returns the current value for the timer specified in
-.Fa which
-in the structure at
-.Fa value .
-The
-.Fn setitimer
-call sets a timer to the specified
-.Fa value
-(returning the previous value of the timer if
-.Fa ovalue
-is non-nil).
-.Pp
-A timer value is defined by the
-.Fa itimerval
-structure:
-.Bd -literal -offset indent
-struct itimerval {
- struct timeval it_interval; /* timer interval */
- struct timeval it_value; /* current value */
-};
-.Ed
-.Pp
-If
-.Fa it_value
-is non-zero, it indicates the time to the next timer expiration.
-If
-.Fa it_interval
-is non-zero, it specifies a value to be used in reloading
-.Fa it_value
-when the timer expires.
-Setting
-.Fa it_value
-to 0 disables a timer, regardless of the value of
-.Fa it_interval .
-Setting
-.Fa it_interval
-to 0 causes a timer to be disabled after its next expiration (assuming
-.Fa it_value
-is non-zero).
-.Pp
-Time values smaller than the resolution of the
-system clock are rounded up to this resolution
-(typically 10 milliseconds).
-.Pp
-The
-.Dv ITIMER_REAL
-timer decrements in real time. A
-.Dv SIGALRM
-signal is
-delivered when this timer expires.
-.Pp
-The
-.Dv ITIMER_VIRTUAL
-timer decrements in process virtual time.
-It runs only when the process is executing. A
-.Dv SIGVTALRM
-signal
-is delivered when it expires.
-.Pp
-The
-.Dv ITIMER_PROF
-timer decrements both in process virtual time and
-when the system is running on behalf of the process. It is designed
-to be used by interpreters in statistically profiling the execution
-of interpreted programs.
-Each time the
-.Dv ITIMER_PROF
-timer expires, the
-.Dv SIGPROF
-signal is
-delivered. Because this signal may interrupt in-progress
-system calls, programs using this timer must be prepared to
-restart interrupted system calls.
-.Pp
-The maximum number of seconds allowed for
-.Fa it_interval
-and
-.Fa it_value
-in
-.Fn setitimer
-is 100000000.
-.Sh NOTES
-Three macros for manipulating time values are defined in
-.Ao Pa sys/time.h Ac .
-.Fa Timerclear
-sets a time value to zero,
-.Fa timerisset
-tests if a time value is non-zero, and
-.Fa timercmp
-compares two time values.
-.Sh RETURN VALUES
-If the calls succeed, a value of 0 is returned. If an error occurs,
-the value -1 is returned, and a more precise error code is placed
-in the global variable
-.Va errno .
-.Sh ERRORS
-.Fn Getitimer
-and
-.Fn setitimer
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-The
-.Fa value
-parameter specified a bad address.
-.It Bq Er EINVAL
-A
-.Fa value
-parameter specified a time that was too large
-to be handled.
-.El
-.Sh SEE ALSO
-.Xr gettimeofday 2 ,
-.Xr select 2 ,
-.Xr sigvec 2 ,
-.Xr clocks 7
-.Sh HISTORY
-The
-.Fn getitimer
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/getlogin.2 b/lib/libc/sys/getlogin.2
deleted file mode 100644
index f628b31..0000000
--- a/lib/libc/sys/getlogin.2
+++ /dev/null
@@ -1,165 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getlogin.2 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt GETLOGIN 2
-.Os BSD 4.4
-.Sh NAME
-.Nm getlogin ,
-.Nm setlogin
-.Nd get/set login name
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft char *
-.Fn getlogin void
-.Ft int
-.Fn setlogin "const char *name"
-.Sh DESCRIPTION
-The
-.Fn getlogin
-routine
-returns the login name of the user associated with the current session,
-as previously set by
-.Fn setlogin .
-The name is normally associated with a login shell
-at the time a session is created,
-and is inherited by all processes descended from the login shell.
-(This is true even if some of those processes assume another user ID,
-for example when
-.Xr su 1
-is used.)
-.Pp
-.Fn Setlogin
-sets the login name of the user associated with the current session to
-.Fa name .
-This call is restricted to the super-user, and
-is normally used only when a new session is being created on behalf
-of the named user
-(for example, at login time, or when a remote shell is invoked).
-.Pp
-.Em NOTE:
-There is only one `login name' per `session .
-.Pp
-It is
-.Em CRITICALLY
-important to ensure that
-.Fn setlogin
-is only ever called after the process has taken adequate steps to ensure
-that it is detached from its parent's session.
-Making a
-.Fn setsid
-system call is the
-.Em ONLY
-way to do this. The
-.Fn daemon
-library call calls
-.Fn setsid
-which is an ideal way of detaching from a controlling terminal and
-forking into the background.
-.Pp
-In particular, doing a
-.Fn ioctl ttyfd TIOCNOTTY ...
-or
-.Fn setpgrp ...
-is
-.Em NOT
-sufficient.
-.Pp
-Once a parent process does a
-.Fn setsid
-call, it is acceptable for some child of that process to then do a
-.Fn setlogin
-even though it is not the session leader, but beware that ALL processes
-in the session will change their login name at the same time, even the
-parent.
-.Pp
-This is not the same as the traditional UNIX behavior of inheriting privilege.
-.Pp
-Since the
-.Fn setlogin
-system call is restricted to the super-user, it is assumed that (like
-all other privileged programs) the programmer has taken adequate
-precautions to prevent security violations.
-.Sh RETURN VALUES
-If a call to
-.Fn getlogin
-succeeds, it returns a pointer to a null-terminated string in a static buffer.
-If the name has not been set, it returns
-.Dv NULL .
-If a call to
-.Fn setlogin
-succeeds, a value of 0 is returned. If
-.Fn setlogin
-fails, a value of -1 is returned and an error code is
-placed in the global location
-.Va errno .
-.Sh ERRORS
-The following errors may be returned by these calls:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-The
-.Fa name
-parameter gave an
-invalid address.
-.It Bq Er EINVAL
-The
-.Fa name
-parameter
-pointed to a string that was too long.
-Login names are limited to
-.Dv MAXLOGNAME
-(from
-.Ao Pa sys/param.h Ac )
-characters, currently 17 including null.
-.It Bq Er EPERM
-The caller tried to set the login name and was not the super-user.
-.El
-.Sh SEE ALSO
-.Xr setsid 2 ,
-.Xr daemon 3
-.Sh BUGS
-In earlier versions of the system,
-.Fn getlogin
-failed unless the process was associated with a login terminal.
-The current implementation (using
-.Fn setlogin )
-allows getlogin to succeed even when the process has no controlling terminal.
-In earlier versions of the system, the value returned by
-.Fn getlogin
-could not be trusted without checking the user ID.
-Portable programs should probably still make this check.
-.Sh HISTORY
-The
-.Fn getlogin
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/getpeername.2 b/lib/libc/sys/getpeername.2
deleted file mode 100644
index b9b6a03..0000000
--- a/lib/libc/sys/getpeername.2
+++ /dev/null
@@ -1,113 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getpeername.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETPEERNAME 2
-.Os BSD 4.2
-.Sh NAME
-.Nm getpeername
-.Nd get name of connected peer
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn getpeername "int s" "struct sockaddr *name" "int *namelen"
-.Sh DESCRIPTION
-.Fn Getpeername
-returns the name of the peer connected to
-socket
-.Fa s .
-The
-.Fa namelen
-parameter should be initialized to indicate
-the amount of space pointed to by
-.Fa name .
-On return it contains the actual size of the name
-returned (in bytes).
-The name is truncated if the buffer provided is too small.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn getpeername
-is implemented as the
-.Va getpeername
-syscall.
-.Pp
-In the threaded library, the
-.Va getpeername
-syscall is assembled to
-.Fn _thread_sys_getpeername
-and
-.Fn getpeername
-is implemented as a function which locks
-.Va s
-for read and write, then calls
-.Fn _thread_sys_getpeername .
-Before returning,
-.Fn getpeername
-unlocks
-.Va s .
-.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
-.Sh ERRORS
-The call succeeds unless:
-.Bl -tag -width ENOTSOCKAA
-.It Bq Er EBADF
-The argument
-.Fa s
-is not a valid descriptor.
-.It Bq Er ENOTSOCK
-The argument
-.Fa s
-is a file, not a socket.
-.It Bq Er ENOTCONN
-The socket is not connected.
-.It Bq Er ENOBUFS
-Insufficient resources were available in the system
-to perform the operation.
-.It Bq Er EFAULT
-The
-.Fa name
-parameter points to memory not in a valid part of the
-process address space.
-.El
-.Sh SEE ALSO
-.Xr accept 2 ,
-.Xr bind 2 ,
-.Xr getsockname 2 ,
-.Xr socket 2
-.Sh HISTORY
-The
-.Fn getpeername
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/getpgrp.2 b/lib/libc/sys/getpgrp.2
deleted file mode 100644
index e797c7a..0000000
--- a/lib/libc/sys/getpgrp.2
+++ /dev/null
@@ -1,122 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getpgrp.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETPGRP 2
-.Os BSD 4.2
-.Sh NAME
-.Nm getpgrp
-.Nd get process group
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft pid_t
-.Fn getpgrp void
-.Ft pid_t
-.Fn getpgid "pid_t pid"
-.Sh DESCRIPTION
-The process group of the current process is returned by
-.Fn getpgrp .
-The process group of the process identified by
-.Fa pid
-is returned by
-.Fn getpgid .
-If
-.Fa pid
-is zero,
-.Fn getpgid
-returns the process group of the current process.
-.Pp
-Process groups are used for distribution of signals, and
-by terminals to arbitrate requests for their input: processes
-that have the same process group as the terminal are foreground
-and may read, while others will block with a signal if they attempt
-to read.
-.Pp
-This call is thus used by programs such as
-.Xr csh 1
-to create
-process groups
-in implementing job control.
-The
-.Fn tcgetpgrp
-and
-.Fn tcsetpgrp
-calls
-are used to get/set the process group of the control terminal.
-.Sh SEE ALSO
-.Xr getsid 2 ,
-.Xr setpgid 2 ,
-.Xr termios 4
-.Sh HISTORY
-The
-.Fn getpgrp
-function call appeared in
-.Bx 4.0 .
-The
-.Fn getpgid
-function call is derived from it's usage in System V Release 4.
-.Sh STANDARDS
-The
-.Fn getpgrp
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh COMPATIBILITY
-This version of
-.Fn getpgrp
-differs from past Berkeley versions by not taking a
-.Fa "pid_t pid"
-argument.
-This incompatibility is required by
-.St -p1003.1-90 .
-.Pp
-From the
-.St -p1003.1-90
-Rationale:
-.Pp
-.Bx 4.3
-provides a
-.Fn getpgrp
-function that returns the process group ID for a specified process.
-Although this function is used to support job control, all known
-job-control shells always specify the calling process with this
-function.
-Thus, the simpler
-.At V
-.Fn getpgrp
-suffices, and the added complexity of the
-.Bx 4.3
-.Fn getpgrp
-has been omitted from POSIX.1.
-The old functionality is available from the
-.Fn getpgid
-function.
diff --git a/lib/libc/sys/getpid.2 b/lib/libc/sys/getpid.2
deleted file mode 100644
index b57fd60..0000000
--- a/lib/libc/sys/getpid.2
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getpid.2 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt GETPID 2
-.Os BSD 4
-.Sh NAME
-.Nm getpid ,
-.Nm getppid
-.Nd get parent or calling process identification
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft pid_t
-.Fn getpid void
-.Ft pid_t
-.Fn getppid void
-.Sh DESCRIPTION
-.Fn Getpid
-returns
-the process ID of
-the calling process.
-The ID is guaranteed to be unique and is
-useful for constructing temporary file names.
-.Pp
-.Fn Getppid
-returns the process ID of the parent
-of the calling process.
-.Sh ERRORS
-The
-.Fn getpid
-and
-.Fn getppid
-functions are always successful, and no return value is reserved to
-indicate an error.
-.Sh SEE ALSO
-.Xr gethostid 3
-.Sh STANDARDS
-The
-.Fn getpid
-and
-.Fn getppid
-function calls are expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn getpid
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/getpriority.2 b/lib/libc/sys/getpriority.2
deleted file mode 100644
index fdb0a1e..0000000
--- a/lib/libc/sys/getpriority.2
+++ /dev/null
@@ -1,142 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getpriority.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETPRIORITY 2
-.Os BSD 4
-.Sh NAME
-.Nm getpriority ,
-.Nm setpriority
-.Nd get/set program scheduling priority
-.Sh SYNOPSIS
-.Fd #include <sys/time.h>
-.Fd #include <sys/resource.h>
-.Ft int
-.Fn getpriority "int which" "int who"
-.Ft int
-.Fn setpriority "int which" "int who" "int prio"
-.Sh DESCRIPTION
-The scheduling
-priority of the process, process group, or user, as indicated by
-.Fa which
-and
-.Fa who
-is obtained with the
-.Fn getpriority
-call and set with the
-.Fn setpriority
-call.
-.Fa Which
-is one of
-.Dv PRIO_PROCESS ,
-.Dv PRIO_PGRP ,
-or
-.Dv PRIO_USER ,
-and
-.Fa who
-is interpreted relative to
-.Fa which
-(a process identifier for
-.Dv PRIO_PROCESS ,
-process group
-identifier for
-.Dv PRIO_PGRP ,
-and a user ID for
-.Dv PRIO_USER ) .
-A zero value of
-.Fa who
-denotes the current process, process group, or user.
-.Fa Prio
-is a value in the range -20 to 20. The default priority is 0;
-lower priorities cause more favorable scheduling.
-.Pp
-The
-.Fn getpriority
-call returns the highest priority (lowest numerical value)
-enjoyed by any of the specified processes. The
-.Fn setpriority
-call sets the priorities of all of the specified processes
-to the specified value. Only the super-user may lower priorities.
-.Sh RETURN VALUES
-Since
-.Fn getpriority
-can legitimately return the value -1, it is necessary
-to clear the external variable
-.Va errno
-prior to the
-call, then check it afterward to determine
-if a -1 is an error or a legitimate value.
-The
-.Fn setpriority
-call returns 0 if there is no error, or
--1 if there is.
-.Sh ERRORS
-.Fn Getpriority
-and
-.Fn setpriority
-will fail if:
-.Bl -tag -width Er
-.It Bq Er ESRCH
-No process was located using the
-.Fa which
-and
-.Fa who
-values specified.
-.It Bq Er EINVAL
-.Fa Which
-was not one of
-.Dv PRIO_PROCESS ,
-.Dv PRIO_PGRP ,
-or
-.Dv PRIO_USER .
-.El
-.Pp
-.Bl -tag -width Er
-In addition to the errors indicated above,
-.Fn setpriority
-will fail if:
-.It Bq Er EPERM
-A process was located, but neither its effective nor real user
-ID matched the effective user ID of the caller.
-.It Bq Er EACCES
-A non super-user attempted to lower a process priority.
-.El
-.Sh SEE ALSO
-.Xr nice 1 ,
-.Xr fork 2 ,
-.Xr renice 8
-.Sh HISTORY
-The
-.Fn getpriority
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/getrlimit.2 b/lib/libc/sys/getrlimit.2
deleted file mode 100644
index 6725520..0000000
--- a/lib/libc/sys/getrlimit.2
+++ /dev/null
@@ -1,183 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getrlimit.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETRLIMIT 2
-.Os BSD 4
-.Sh NAME
-.Nm getrlimit ,
-.Nm setrlimit
-.Nd control maximum system resource consumption
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/time.h>
-.Fd #include <sys/resource.h>
-.Ft int
-.Fn getrlimit "int resource" "struct rlimit *rlp"
-.Ft int
-.Fn setrlimit "int resource" "const struct rlimit *rlp"
-.Sh DESCRIPTION
-Limits on the consumption of system resources by the current process
-and each process it creates may be obtained with the
-.Fn getrlimit
-call, and set with the
-.Fn setrlimit
-call.
-.Pp
-The
-.Fa resource
-parameter is one of the following:
-.Bl -tag -width RLIMIT_FSIZEAA
-.It Li RLIMIT_CORE
-The largest size (in bytes)
-.Xr core 5
-file that may be created.
-.It Li RLIMIT_CPU
-The maximum amount of cpu time (in seconds) to be used by
-each process.
-.It Li RLIMIT_DATA
-The maximum size (in bytes) of the data segment for a process;
-this defines how far a program may extend its break with the
-.Xr sbrk 2
-system call.
-.It Li RLIMIT_FSIZE
-The largest size (in bytes) file that may be created.
-.It Li RLIMIT_MEMLOCK
-The maximum size (in bytes) which a process may lock into memory
-using the
-.Xr mlock 2
-function.
-.It Li RLIMIT_NOFILE
-The maximum number of open files for this process.
-.It Li RLIMIT_NPROC
-The maximum number of simultaneous processes for this user id.
-.It Li RLIMIT_RSS
-The maximum size (in bytes) to which a process's resident set size may
-grow.
-This imposes a limit on the amount of physical memory to be given to
-a process; if memory is tight, the system will prefer to take memory
-from processes that are exceeding their declared resident set size.
-.It Li RLIMIT_STACK
-The maximum size (in bytes) of the stack segment for a process;
-this defines how far a program's stack segment may be extended.
-Stack extension is performed automatically by the system.
-.El
-.Pp
-A resource limit is specified as a soft limit and a hard limit. When a
-soft limit is exceeded a process may receive a signal (for example, if
-the cpu time or file size is exceeded), but it will be allowed to
-continue execution until it reaches the hard limit (or modifies
-its resource limit). The
-.Em rlimit
-structure is used to specify the hard and soft limits on a resource,
-.Bd -literal -offset indent
-struct rlimit {
- rlim_t rlim_cur; /* current (soft) limit */
- rlim_t rlim_max; /* maximum value for rlim_cur */
-};
-.Ed
-.Pp
-Only the super-user may raise the maximum limits. Other users
-may only alter
-.Fa rlim_cur
-within the range from 0 to
-.Fa rlim_max
-or (irreversibly) lower
-.Fa rlim_max .
-.Pp
-An
-.Dq infinite
-value for a limit is defined as
-.Dv RLIM_INFINITY .
-.Pp
-Because this information is stored in the per-process information,
-this system call must be executed directly by the shell if it
-is to affect all future processes created by the shell;
-.Ic limit
-is thus a built-in command to
-.Xr csh 1 .
-.Pp
-The system refuses to extend the data or stack space when the limits
-would be exceeded in the normal way: a
-.Xr break
-call fails if the data space limit is reached.
-When the stack limit is reached, the process receives
-a segmentation fault
-.Pq Dv SIGSEGV ;
-if this signal is not
-caught by a handler using the signal stack, this signal
-will kill the process.
-.Pp
-A file I/O operation that would create a file larger that the process'
-soft limit will cause the write to fail and a signal
-.Dv SIGXFSZ
-to be
-generated; this normally terminates the process, but may be caught. When
-the soft cpu time limit is exceeded, a signal
-.Dv SIGXCPU
-is sent to the
-offending process.
-.Sh RETURN VALUES
-A 0 return value indicates that the call succeeded, changing
-or returning the resource limit. A return value of -1 indicates
-that an error occurred, and an error code is stored in the global
-location
-.Va errno .
-.Sh ERRORS
-.Fn Getrlimit
-and
-.Fn setrlimit
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-The address specified for
-.Fa rlp
-is invalid.
-.It Bq Er EPERM
-The limit specified to
-.Fn setrlimit
-would have
-raised the maximum limit value, and the caller is not the super-user.
-.El
-.Sh SEE ALSO
-.Xr csh 1 ,
-.Xr quota 1 ,
-.Xr quotactl 2 ,
-.Xr sigaltstack 2 ,
-.Xr sigvec 2 ,
-.Xr sysctl 3
-.Sh HISTORY
-The
-.Fn getrlimit
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2
deleted file mode 100644
index 0f92569..0000000
--- a/lib/libc/sys/getrusage.2
+++ /dev/null
@@ -1,175 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getrusage.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETRUSAGE 2
-.Os BSD 4
-.Sh NAME
-.Nm getrusage
-.Nd get information about resource utilization
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/time.h>
-.Fd #include <sys/resource.h>
-.Fd #define RUSAGE_SELF 0
-.Fd #define RUSAGE_CHILDREN -1
-.Ft int
-.Fn getrusage "int who" "struct rusage *rusage"
-.Sh DESCRIPTION
-.Fn Getrusage
-returns information describing the resources utilized by the current
-process, or all its terminated child processes.
-The
-.Fa who
-parameter is either
-.Dv RUSAGE_SELF
-or
-.Dv RUSAGE_CHILDREN .
-The buffer to which
-.Fa rusage
-points will be filled in with
-the following structure:
-.Bd -literal
-struct rusage {
- struct timeval ru_utime; /* user time used */
- struct timeval ru_stime; /* system time used */
- long ru_maxrss; /* max resident set size */
- long ru_ixrss; /* integral shared text memory size */
- long ru_idrss; /* integral unshared data size */
- long ru_isrss; /* integral unshared stack size */
- long ru_minflt; /* page reclaims */
- long ru_majflt; /* page faults */
- long ru_nswap; /* swaps */
- long ru_inblock; /* block input operations */
- long ru_oublock; /* block output operations */
- long ru_msgsnd; /* messages sent */
- long ru_msgrcv; /* messages received */
- long ru_nsignals; /* signals received */
- long ru_nvcsw; /* voluntary context switches */
- long ru_nivcsw; /* involuntary context switches */
-};
-.Ed
-.Pp
-The fields are interpreted as follows:
-.Bl -tag -width ru_minfltaa
-.It Fa ru_utime
-the total amount of time spent executing in user mode.
-.It Fa ru_stime
-the total amount of time spent in the system executing on behalf
-of the process(es).
-.It Fa ru_maxrss
-the maximum resident set size utilized (in kilobytes).
-.It Fa ru_ixrss
-an \*(lqintegral\*(rq value indicating the amount of memory used
-by the text segment
-that was also shared among other processes. This value is expressed
-in units of kilobytes * ticks-of-execution.
-Ticks are statistics clock ticks.
-The statistics clock has a frequency of
-sysconf(_SC_CLOCK_TCK) ticks per second.
-.It Fa ru_idrss
-an integral value of the amount of unshared memory residing in the
-data segment of a process (expressed in units of
-kilobytes * ticks-of-execution).
-.It Fa ru_isrss
-an integral value of the amount of unshared memory residing in the
-stack segment of a process (expressed in units of
-kilobytes * ticks-of-execution).
-.It Fa ru_minflt
-the number of page faults serviced without any I/O activity; here
-I/O activity is avoided by \*(lqreclaiming\*(rq a page frame from
-the list of pages awaiting reallocation.
-.It Fa ru_majflt
-the number of page faults serviced that required I/O activity.
-.It Fa ru_nswap
-the number of times a process was \*(lqswapped\*(rq out of main
-memory.
-.It Fa ru_inblock
-the number of times the file system had to perform input.
-.It Fa ru_oublock
-the number of times the file system had to perform output.
-.It Fa ru_msgsnd
-the number of IPC messages sent.
-.It Fa ru_msgrcv
-the number of IPC messages received.
-.It Fa ru_nsignals
-the number of signals delivered.
-.It Fa ru_nvcsw
-the number of times a context switch resulted due to a process
-voluntarily giving up the processor before its time slice was
-completed (usually to await availability of a resource).
-.It Fa ru_nivcsw
-the number of times a context switch resulted due to a higher
-priority process becoming runnable or because the current process
-exceeded its time slice.
-.El
-.Sh NOTES
-The numbers
-.Fa ru_inblock
-and
-.Fa ru_oublock
-account only for real
-I/O; data supplied by the caching mechanism is charged only
-to the first process to read or write the data.
-.Sh RETURN VALUES
-Uponsuccessful completion,
-.Fn getrusage
-returns 0. Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn getrusage
-function will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The
-.Fa who
-parameter is not a valid value.
-.It Bq Er EFAULT
-The address specified by the
-.Fa rusage
-parameter is not in a valid part of the process address space.
-.El
-.Sh SEE ALSO
-.Xr gettimeofday 2 ,
-.Xr wait 2 ,
-.Xr clocks 7
-.Sh BUGS
-There is no way to obtain information about a child process
-that has not yet terminated.
-.Sh HISTORY
-The
-.Fn getrusage
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/getsid.2 b/lib/libc/sys/getsid.2
deleted file mode 100644
index a08290a..0000000
--- a/lib/libc/sys/getsid.2
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1997 Peter Wemm <peter@freebsd.org>
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id: getsid.2,v 1.1 1997/08/19 07:19:43 peter Exp $
-.\"
-.Dd August 19, 1997
-.Dt GETSID 2
-.Os BSD 4.2
-.Sh NAME
-.Nm getsid
-.Nd get process session
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft pid_t
-.Fn getsid "pid_t pid"
-.Sh DESCRIPTION
-The session ID of the process identified by
-.Fa pid
-is returned by
-.Fn getsid .
-If
-.Fa pid
-is zero,
-.Fn getsid
-returns the session ID of the current process.
-.Sh RETURN VALUES
-Upon successful completion, the function
-.Fn getsid
-returns the session ID of
-the specified process; otherwise, it returns a value of -1 and
-sets errno to indicate an error.
-.Sh ERRORS
-.Fn getsid
-will succeed unless:
-.Bl -tag -width Er
-.It Bq Er ESRCH
-if there is no process with a process ID equal to
-.Fa pid .
-.El
-.Pp
-Note that an implementation may restrict this function call to
-processes within the same session ID as the calling process.
-.Sh SEE ALSO
-.Xr getpgid 2 ,
-.Xr getpgrp 2 ,
-.Xr setpgid 2 ,
-.Xr setsid 2 ,
-.Xr termios 4
-.Sh HISTORY
-The
-.Fn setsid
-function call appeared in
-.Fx 3.0 .
-The
-.Fn getsid
-function call is derived from it's usage in
-.At V .
diff --git a/lib/libc/sys/getsockname.2 b/lib/libc/sys/getsockname.2
deleted file mode 100644
index bbd9f93..0000000
--- a/lib/libc/sys/getsockname.2
+++ /dev/null
@@ -1,112 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getsockname.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETSOCKNAME 2
-.Os BSD 4.2
-.Sh NAME
-.Nm getsockname
-.Nd get socket name
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn getsockname "int s" "struct sockaddr *name" "int *namelen"
-.Sh DESCRIPTION
-.Fn Getsockname
-returns the current
-.Fa name
-for the specified socket. The
-.Fa namelen
-parameter should be initialized to indicate
-the amount of space pointed to by
-.Fa name .
-On return it contains the actual size of the name
-returned (in bytes).
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn getsockname
-is implemented as the
-.Va getsockname
-syscall.
-.Pp
-In the threaded library, the
-.Va getsockname
-syscall is assembled to
-.Fn _thread_sys_getsockname
-and
-.Fn getsockname
-is implemented as a function which locks
-.Va fd
-for read and write, then calls
-.Fn _thread_sys_getsockname .
-Before returning,
-.Fn getsockname
-unlocks
-.Va fd .
-.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
-.Sh ERRORS
-The call succeeds unless:
-.Bl -tag -width ENOTSOCKAA
-.It Bq Er EBADF
-The argument
-.Fa s
-is not a valid descriptor.
-.It Bq Er ENOTSOCK
-The argument
-.Fa s
-is a file, not a socket.
-.It Bq Er ENOBUFS
-Insufficient resources were available in the system
-to perform the operation.
-.It Bq Er EFAULT
-The
-.Fa name
-parameter points to memory not in a valid part of the
-process address space.
-.El
-.Sh SEE ALSO
-.Xr bind 2 ,
-.Xr getpeername 2 ,
-.Xr socket 2
-.Sh BUGS
-Names bound to sockets in the UNIX domain are inaccessible;
-.Xr getsockname
-returns a zero length name.
-.Sh HISTORY
-The
-.Fn getsockname
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2
deleted file mode 100644
index ff9ca90..0000000
--- a/lib/libc/sys/getsockopt.2
+++ /dev/null
@@ -1,397 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95
-.\" $Id: getsockopt.2,v 1.8 1997/02/22 15:03:53 peter Exp $
-.\"
-.Dd May 2, 1995
-.Dt GETSOCKOPT 2
-.Os BSD 4.3r
-.Sh NAME
-.Nm getsockopt ,
-.Nm setsockopt
-.Nd get and set options on sockets
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn getsockopt "int s" "int level" "int optname" "void *optval" "int *optlen"
-.Ft int
-.Fn setsockopt "int s" "int level" "int optname" "const void *optval" "int optlen"
-.Sh DESCRIPTION
-.Fn Getsockopt
-and
-.Fn setsockopt
-manipulate the
-.Em options
-associated with a socket. Options may exist at multiple
-protocol levels; they are always present at the uppermost
-.Dq socket
-level.
-.Pp
-When manipulating socket options the level at which the
-option resides and the name of the option must be specified.
-To manipulate options at the socket level,
-.Fa level
-is specified as
-.Dv SOL_SOCKET .
-To manipulate options at any
-other level the protocol number of the appropriate protocol
-controlling the option is supplied. For example,
-to indicate that an option is to be interpreted by the
-.Tn TCP
-protocol,
-.Fa level
-should be set to the protocol number of
-.Tn TCP ;
-see
-.Xr getprotoent 3 .
-.Pp
-The parameters
-.Fa optval
-and
-.Fa optlen
-are used to access option values for
-.Fn setsockopt .
-For
-.Fn getsockopt
-they identify a buffer in which the value for the
-requested option(s) are to be returned. For
-.Fn getsockopt ,
-.Fa optlen
-is a value-result parameter, initially containing the
-size of the buffer pointed to by
-.Fa optval ,
-and modified on return to indicate the actual size of
-the value returned. If no option value is
-to be supplied or returned,
-.Fa optval
-may be NULL.
-.Pp
-.Fa Optname
-and any specified options are passed uninterpreted to the appropriate
-protocol module for interpretation.
-The include file
-.Ao Pa sys/socket.h Ac
-contains definitions for
-socket level options, described below.
-Options at other protocol levels vary in format and
-name; consult the appropriate entries in
-section
-4 of the manual.
-.Pp
-Most socket-level options utilize an
-.Fa int
-parameter for
-.Fa optval .
-For
-.Fn setsockopt ,
-the parameter should be non-zero to enable a boolean option,
-or zero if the option is to be disabled.
-.Dv SO_LINGER
-uses a
-.Fa struct linger
-parameter, defined in
-.Ao Pa sys/socket.h Ac ,
-which specifies the desired state of the option and the
-linger interval (see below).
-.Dv SO_SNDTIMEO
-and
-.Dv SO_RCVTIMEO
-use a
-.Fa struct timeval
-parameter, defined in
-.Ao Pa sys/time.h Ac .
-.Pp
-The following options are recognized at the socket level.
-Except as noted, each may be examined with
-.Fn getsockopt
-and set with
-.Fn setsockopt .
-.Bl -column SO_OOBINLINE -offset indent
-.It Dv SO_DEBUG Ta "enables recording of debugging information"
-.It Dv SO_REUSEADDR Ta "enables local address reuse"
-.It Dv SO_REUSEPORT Ta "enables duplicate address and port bindings"
-.It Dv SO_KEEPALIVE Ta "enables keep connections alive"
-.It Dv SO_DONTROUTE Ta "enables routing bypass for outgoing messages"
-.It Dv SO_LINGER Ta "linger on close if data present"
-.It Dv SO_BROADCAST Ta "enables permission to transmit broadcast messages"
-.It Dv SO_OOBINLINE Ta "enables reception of out-of-band data in band"
-.It Dv SO_SNDBUF Ta "set buffer size for output"
-.It Dv SO_RCVBUF Ta "set buffer size for input"
-.It Dv SO_SNDLOWAT Ta "set minimum count for output"
-.It Dv SO_RCVLOWAT Ta "set minimum count for input"
-.It Dv SO_SNDTIMEO Ta "set timeout value for output"
-.It Dv SO_RCVTIMEO Ta "set timeout value for input"
-.It Dv SO_TYPE Ta "get the type of the socket (get only)"
-.It Dv SO_ERROR Ta "get and clear error on the socket (get only)"
-.El
-.Pp
-.Dv SO_DEBUG
-enables debugging in the underlying protocol modules.
-.Dv SO_REUSEADDR
-indicates that the rules used in validating addresses supplied
-in a
-.Xr bind 2
-call should allow reuse of local addresses.
-.Dv SO_REUSEPORT
-allows completely duplicate bindings by multiple processes
-if they all set
-.Dv SO_REUSEPORT
-before binding the port.
-This option permits multiple instances of a program to each
-receive UDP/IP multicast or broadcast datagrams destined for the bound port.
-.Dv SO_KEEPALIVE
-enables the
-periodic transmission of messages on a connected socket. Should the
-connected party fail to respond to these messages, the connection is
-considered broken and processes using the socket are notified via a
-.Dv SIGPIPE
-signal when attempting to send data.
-.Dv SO_DONTROUTE
-indicates that outgoing messages should
-bypass the standard routing facilities. Instead, messages are directed
-to the appropriate network interface according to the network portion
-of the destination address.
-.Pp
-.Dv SO_LINGER
-controls the action taken when unsent messages
-are queued on socket and a
-.Xr close 2
-is performed.
-If the socket promises reliable delivery of data and
-.Dv SO_LINGER is set,
-the system will block the process on the
-.Xr close 2
-attempt until it is able to transmit the data or until it decides it
-is unable to deliver the information (a timeout period, termed the
-linger interval, is specified in seconds in the
-.Fn setsockopt
-call when
-.Dv SO_LINGER
-is requested).
-If
-.Dv SO_LINGER
-is disabled and a
-.Xr close 2
-is issued, the system will process the close in a manner that allows
-the process to continue as quickly as possible.
-.Pp
-The option
-.Dv SO_BROADCAST
-requests permission to send broadcast datagrams
-on the socket.
-Broadcast was a privileged operation in earlier versions of the system.
-With protocols that support out-of-band data, the
-.Dv SO_OOBINLINE
-option
-requests that out-of-band data be placed in the normal data input queue
-as received; it will then be accessible with
-.Xr recv 2
-or
-.Xr read 2
-calls without the
-.Dv MSG_OOB
-flag.
-Some protocols always behave as if this option is set.
-.Dv SO_SNDBUF
-and
-.Dv SO_RCVBUF
-are options to adjust the normal
-buffer sizes allocated for output and input buffers, respectively.
-The buffer size may be increased for high-volume connections,
-or may be decreased to limit the possible backlog of incoming data.
-The system places an absolute maximum on these values, which is accessible
-through the
-.Xr sysctl 3
-MIB variable
-.Dq Li kern.maxsockbuf .
-.Pp
-.Dv SO_SNDLOWAT
-is an option to set the minimum count for output operations.
-Most output operations process all of the data supplied
-by the call, delivering data to the protocol for transmission
-and blocking as necessary for flow control.
-Nonblocking output operations will process as much data as permitted
-subject to flow control without blocking, but will process no data
-if flow control does not allow the smaller of the low water mark value
-or the entire request to be processed.
-A
-.Xr select 2
-operation testing the ability to write to a socket will return true
-only if the low water mark amount could be processed.
-The default value for
-.Dv SO_SNDLOWAT
-is set to a convenient size for network efficiency, often 1024.
-.Dv SO_RCVLOWAT
-is an option to set the minimum count for input operations.
-In general, receive calls will block until any (non-zero) amount of data
-is received, then return with the smaller of the amount available or the amount
-requested.
-The default value for
-.Dv SO_RCVLOWAT
-is 1.
-If
-.Dv SO_RCVLOWAT
-is set to a larger value, blocking receive calls normally
-wait until they have received the smaller of the low water mark value
-or the requested amount.
-Receive calls may still return less than the low water mark if an error
-occurs, a signal is caught, or the type of data next in the receive queue
-is different from that which was returned.
-.Pp
-.Dv SO_SNDTIMEO
-is an option to set a timeout value for output operations.
-It accepts a
-.Fa struct timeval
-parameter with the number of seconds and microseconds
-used to limit waits for output operations to complete.
-If a send operation has blocked for this much time,
-it returns with a partial count
-or with the error
-.Er EWOULDBLOCK
-if no data were sent.
-In the current implementation, this timer is restarted each time additional
-data are delivered to the protocol,
-implying that the limit applies to output portions ranging in size
-from the low water mark to the high water mark for output.
-.Dv SO_RCVTIMEO
-is an option to set a timeout value for input operations.
-It accepts a
-.Fa struct timeval
-parameter with the number of seconds and microseconds
-used to limit waits for input operations to complete.
-In the current implementation, this timer is restarted each time additional
-data are received by the protocol,
-and thus the limit is in effect an inactivity timer.
-If a receive operation has been blocked for this much time without
-receiving additional data, it returns with a short count
-or with the error
-.Er EWOULDBLOCK
-if no data were received.
-.Pp
-Finally,
-.Dv SO_TYPE
-and
-.Dv SO_ERROR
-are options used only with
-.Fn getsockopt .
-.Dv SO_TYPE
-returns the type of the socket, such as
-.Dv SOCK_STREAM ;
-it is useful for servers that inherit sockets on startup.
-.Dv SO_ERROR
-returns any pending error on the socket and clears
-the error status.
-It may be used to check for asynchronous errors on connected
-datagram sockets or for other asynchronous errors.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn getsockopt
-is implemented as the
-.Va getsockopt
-syscall.
-.Pp
-In the threaded library, the
-.Va getsockopt
-syscall is assembled to
-.Fn _thread_sys_getsockopt
-and
-.Fn getsockopt
-is implemented as a function which locks
-.Va s
-for read and write, then calls
-.Fn _thread_sys_getsockopt .
-Before returning,
-.Fn getsockopt
-unlocks
-.Va s .
-.Pp
-In the non-threaded library
-.Fn setsockopt
-is implemented as the
-.Va setsockopt
-syscall.
-.Pp
-In the threaded library, the
-.Va setsockopt
-syscall is assembled to
-.Fn _thread_sys_setsockopt
-and
-.Fn setsockopt
-is implemented as a function which locks
-.Va s
-for read and write, then calls
-.Fn _thread_sys_setsockopt .
-Before returning,
-.Fn setsockopt
-unlocks
-.Va s .
-.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
-.Sh ERRORS
-The call succeeds unless:
-.Bl -tag -width ENOPROTOOPTAA
-.It Bq Er EBADF
-The argument
-.Fa s
-is not a valid descriptor.
-.It Bq Er ENOTSOCK
-The argument
-.Fa s
-is a file, not a socket.
-.It Bq Er ENOPROTOOPT
-The option is unknown at the level indicated.
-.It Bq Er EFAULT
-The address pointed to by
-.Fa optval
-is not in a valid part of the process address space.
-For
-.Fn getsockopt ,
-this error may also be returned if
-.Fa optlen
-is not in a valid part of the process address space.
-.El
-.Sh SEE ALSO
-.Xr ioctl 2 ,
-.Xr socket 2 ,
-.Xr getprotoent 3 ,
-.Xr sysctl 3 ,
-.Xr protocols 5 ,
-.Xr sysctl 8
-.Sh BUGS
-Several of the socket options should be handled at lower levels of the system.
-.Sh HISTORY
-The
-.Fn getsockopt
-system call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/gettimeofday.2 b/lib/libc/sys/gettimeofday.2
deleted file mode 100644
index 06ee8b1..0000000
--- a/lib/libc/sys/gettimeofday.2
+++ /dev/null
@@ -1,128 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)gettimeofday.2 8.2 (Berkeley) 5/26/95
-.\"
-.Dd May 26, 1995
-.Dt GETTIMEOFDAY 2
-.Os BSD 4
-.Sh NAME
-.Nm gettimeofday ,
-.Nm settimeofday
-.Nd get/set date and time
-.Sh SYNOPSIS
-.Fd #include <sys/time.h>
-.Ft int
-.Fn gettimeofday "struct timeval *tp" "struct timezone *tzp"
-.Ft int
-.Fn settimeofday "const struct timeval *tp" "const struct timezone *tzp"
-.Sh DESCRIPTION
-.Bf -symbolic
-Note: timezone is no longer used; this information is kept outside
-the kernel.
-.Ef
-The system's notion of the current Greenwich time and the current time
-zone is obtained with the
-.Fn gettimeofday
-call, and set with the
-.Fn settimeofday
-call. The time is expressed in seconds and microseconds
-since midnight (0 hour), January 1, 1970. The resolution of the system
-clock is hardware dependent, and the time may be updated continuously or
-in ``ticks.'' If
-.Fa tp
-or
-.Fa tzp
-is NULL, the associated time
-information will not be returned or set.
-.Pp
-The structures pointed to by
-.Fa tp
-and
-.Fa tzp
-are defined in
-.Ao Pa sys/time.h Ac
-as:
-.Pp
-.Bd -literal
-struct timeval {
- long tv_sec; /* seconds */
- long tv_usec; /* and microseconds */
-};
-
-struct timezone {
- int tz_minuteswest; /* minutes west of Greenwich */
- int tz_dsttime; /* type of dst correction */
-};
-.Ed
-.Pp
-The
-.Fa timezone
-structure indicates the local time zone
-(measured in minutes of time westward from Greenwich),
-and a flag that, if nonzero, indicates that
-Daylight Saving time applies locally during
-the appropriate part of the year.
-.Pp
-Only the super-user may set the time of day or time zone.
-If the system is running in secure mode (see
-.Xr init 8 ),
-the time may only be advanced.
-This limitation is imposed to prevent a malicious super-user
-from setting arbitrary time stamps on files.
-The system time can still be adjusted backwards using the
-.Xr adjtime 2
-system call even when the system is secure.
-.Sh RETURN
-A 0 return value indicates that the call succeeded.
-A -1 return value indicates an error occurred, and in this
-case an error code is stored into the global variable
-.Va errno .
-.Sh ERRORS
-The following error codes may be set in
-.Va errno :
-.Bl -tag -width [EFAULT]
-.It Bq Er EFAULT
-An argument address referenced invalid memory.
-.It Bq Er EPERM
-A user other than the super-user attempted to set the time.
-.El
-.Sh SEE ALSO
-.Xr date 1 ,
-.Xr adjtime 2 ,
-.Xr ctime 3 ,
-.Xr clocks 7 ,
-.Xr timed 8
-.Sh HISTORY
-The
-.Fn gettimeofday
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/getuid.2 b/lib/libc/sys/getuid.2
deleted file mode 100644
index 9808cb2..0000000
--- a/lib/libc/sys/getuid.2
+++ /dev/null
@@ -1,92 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getuid.2 8.1 (Berkeley) 6/4/93
-.\" $Id: getuid.2,v 1.5 1997/02/22 15:03:54 peter Exp $
-.\"
-.Dd June 4, 1993
-.Dt GETUID 2
-.Os BSD 4
-.Sh NAME
-.Nm getuid ,
-.Nm geteuid
-.Nd get user identification
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Fd #include <sys/types.h>
-.Ft uid_t
-.Fn getuid void
-.Ft uid_t
-.Fn geteuid void
-.Sh DESCRIPTION
-The
-.Fn getuid
-function returns the real user ID of the calling process.
-The
-.Fn geteuid
-function
-returns the effective user ID of the calling process.
-.Pp
-The real user ID is that of the user who has invoked the program.
-As the effective user ID
-gives the process additional permissions during
-execution of
-.Dq Em set-user-ID
-mode processes,
-.Fn getuid
-is used to determine the real-user-id of the calling process.
-.Sh ERRORS
-The
-.Fn getuid
-and
-.Fn geteuid
-functions are always successful, and no return value is reserved to
-indicate an error.
-.Sh SEE ALSO
-.Xr getgid 2 ,
-.Xr issetugid 2 ,
-.Xr setgid 2 ,
-.Xr setreuid 2 ,
-.Xr setuid 2
-.Sh STANDARDS
-The
-.Fn geteuid
-and
-.Fn getuid
-function calls are expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn getuid
-and a
-.Fn geteuid
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/intro.2 b/lib/libc/sys/intro.2
deleted file mode 100644
index ee46085..0000000
--- a/lib/libc/sys/intro.2
+++ /dev/null
@@ -1,710 +0,0 @@
-.\" Copyright (c) 1980, 1983, 1986, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)intro.2 8.5 (Berkeley) 2/27/95
-.\"
-.Dd February 27, 1995
-.Dt INTRO 2
-.Os BSD 4
-.Sh NAME
-.Nm intro
-.Nd introduction to system calls and error numbers
-.Sh SYNOPSIS
-.Fd #include <sys/errno.h>
-.Sh DESCRIPTION
-This section provides an overview of the system calls,
-their error returns, and other common definitions and concepts.
-.\".Pp
-.\".Sy System call restart
-.\".Pp
-.\"<more later...>
-.Sh RETURN VALUES
-Nearly all of the system calls provide an error number referenced via
-the external identifier errno. This identifier is defined in
-.Aq Pa sys/errno.h
-for non-threaded programs as:
-.Pp
-.Dl extern int errno;
-.Pp
-and for threaded programs as:
-.Pp
-.Dl extern int * __error();
-.Dl #define errno (* __error())
-.Pp
-A threaded program must be compiled with
-.Va _THREAD_SAFE
-defined so that the preprocessor will output the appropriate errno
-definition to the compiler. Failure to do so will mean that error
-variables will not be thread specific.
-.Pp
-The threaded library implementation of
-.Va __error()
-returns a pointer to a field in the thread specific structure for
-threads other than the initial thread. For the initial thread,
-.Va __error()
-returns a pointer to a global
-.Va errno
-variable that is compatible with that used by non-threaded programs.
-This allows the initial thread to call functions in libraries which have
-not been compiled with
-.Va _THREAD_SAFE .
-Programmers should ensure that threads other than the initial thread only
-call functions in libraries that have been compiled with
-.Va _THREAD_SAFE .
-.Pp
-Programmers should include
-.Aq Pa sys/errno.h
-to obtain the definition of
-.Va errno
-rather than coding the definition as an external reference directly. It is
-planned that the
-.Va extern int errno
-definition will eventually be replaced by the threaded definition so that
-all libraries will have a thread-aware treatment of
-.Va errno .
-.Pp
-When a system call detects an error,
-it returns an integer value
-indicating failure (usually -1)
-and sets the variable
-.Va errno
-accordingly.
-<This allows interpretation of the failure on receiving
-a -1 and to take action accordingly.>
-Successful calls never set
-.Va errno ;
-once set, it remains until another error occurs.
-It should only be examined after an error.
-Note that a number of system calls overload the meanings of these
-error numbers, and that the meanings must be interpreted according
-to the type and circumstances of the call.
-.Pp
-The following is a complete list of the errors and their
-names as given in
-.Aq Pa sys/errno.h .
-.Bl -hang -width Ds
-.It Er 0 Em "Error 0" .
-Not used.
-.It Er 1 EPERM Em "Operation not permitted" .
-An attempt was made to perform an operation limited to processes
-with appropriate privileges or to the owner of a file or other
-resources.
-.It Er 2 ENOENT Em "No such file or directory" .
-A component of a specified pathname did not exist, or the
-pathname was an empty string.
-.It Er 3 ESRCH Em "No such process" .
-No process could be found corresponding to that specified by the given
-process ID.
-.It Er 4 EINTR Em "Interrupted function call" .
-An asynchronous signal (such as
-.Dv SIGINT
-or
-.Dv SIGQUIT )
-was caught by the process during the execution of an interruptible
-function. If the signal handler performs a normal return, the
-interrupted function call will seem to have returned the error condition.
-.It Er 5 EIO Em "Input/output error" .
-Some physical input or output error occurred.
-This error will not be reported until a subsequent operation on the same file
-descriptor and may be lost (over written) by any subsequent errors.
-.It Er 6 ENXIO Em "\&No such device or address" .
-Input or output on a special file referred to a device that did not
-exist, or
-made a request beyond the limits of the device.
-This error may also occur when, for example,
-a tape drive is not online or no disk pack is
-loaded on a drive.
-.It Er 7 E2BIG Em "Arg list too long" .
-The number of bytes used for the argument and environment
-list of the new process exceeded the current limit
-of 65536 bytes
-.Pf ( Dv NCARGS
-in
-.Aq Pa sys/param.h ) .
-.It Er 8 ENOEXEC Em "Exec format error" .
-A request was made to execute a file
-that, although it has the appropriate permissions,
-was not in the format required for an
-executable file.
-.It Er 9 EBADF Em "Bad file descriptor" .
-A file descriptor argument was out of range, referred to no open file,
-or a read (write) request was made to a file that was only open for
-writing (reading).
-.Pp
-.It Er 10 ECHILD Em "\&No child processes" .
-A
-.Xr wait 2
-or
-.Xr waitpid 2
-function was executed by a process that had no existing or unwaited-for
-child processes.
-.It Er 11 EDEADLK Em "Resource deadlock avoided" .
-An attempt was made to lock a system resource that
-would have resulted in a deadlock situation.
-.It Er 12 ENOMEM Em "Cannot allocate memory" .
-The new process image required more memory than was allowed by the hardware
-or by system-imposed memory management constraints.
-A lack of swap space is normally temporary; however,
-a lack of core is not.
-Soft limits may be increased to their corresponding hard limits.
-.It Er 13 EACCES Em "Permission denied" .
-An attempt was made to access a file in a way forbidden
-by its file access permissions.
-.It Er 14 EFAULT Em "Bad address" .
-The system detected an invalid address in attempting to
-use an argument of a call.
-.It Er 15 ENOTBLK Em "Not a block device" .
-A block device operation was attempted on a non-block device or file.
-.It Er 16 EBUSY Em "Resource busy" .
-An attempt to use a system resource which was in use at the time
-in a manner which would have conflicted with the request.
-.It Er 17 EEXIST Em "File exists" .
-An existing file was mentioned in an inappropriate context,
-for instance, as the new link name in a
-.Xr link 2
-function.
-.It Er 18 EXDEV Em "Improper link" .
-A hard link to a file on another file system
-was attempted.
-.It Er 19 ENODEV Em "Operation not supported by device" .
-An attempt was made to apply an inappropriate
-function to a device,
-for example,
-trying to read a write-only device such as a printer.
-.It Er 20 ENOTDIR Em "Not a directory" .
-A component of the specified pathname existed, but it was
-not a directory, when a directory was expected.
-.It Er 21 EISDIR Em "Is a directory" .
-An attempt was made to open a directory with write mode specified.
-.It Er 22 EINVAL Em "Invalid argument" .
-Some invalid argument was supplied. (For example,
-specifying an undefined signal to a
-.Xr signal 3
-or
-.Xr kill 2
-function).
-.It Er 23 ENFILE Em "Too many open files in system" .
-Maximum number of file descriptors allowable on the system
-has been reached and a requests for an open cannot be satisfied
-until at least one has been closed.
-.It Er 24 EMFILE Em "Too many open files" .
-<As released, the limit on the number of
-open files per process is 64.>
-.Xr Getdtablesize 2
-will obtain the current limit.
-.It Er 25 ENOTTY Em "Inappropriate ioctl for device" .
-A control function (see
-.Xr ioctl 2 )
-was attempted for a file or
-special device for which the operation was inappropriate.
-.It Er 26 ETXTBSY Em "Text file busy" .
-The new process was a pure procedure (shared text) file
-which was open for writing by another process, or
-while the pure procedure file was being executed an
-.Xr open 2
-call requested write access.
-.It Er 27 EFBIG Em "File too large" .
-The size of a file exceeded the maximum (about
-.if t 2\u\s-231\s+2\d
-.if n 2.1E9
-bytes).
-.It Er 28 ENOSPC Em "Device out of space" .
-A
-.Xr write 2
-to an ordinary file, the creation of a
-directory or symbolic link, or the creation of a directory
-entry failed because no more disk blocks were available
-on the file system, or the allocation of an inode for a newly
-created file failed because no more inodes were available
-on the file system.
-.It Er 29 ESPIPE Em "Illegal seek" .
-An
-.Xr lseek 2
-function was issued on a socket, pipe or
-.Tn FIFO .
-.It Er 30 EROFS Em "Read-only file system" .
-An attempt was made to modify a file or directory
-was made
-on a file system that was read-only at the time.
-.It Er 31 EMLINK Em "Too many links" .
-Maximum allowable hard links to a single file has been exceeded (limit
-of 32767 hard links per file).
-.It Er 32 EPIPE Em "Broken pipe" .
-A write on a pipe, socket or
-.Tn FIFO
-for which there is no process
-to read the data.
-.It Er 33 EDOM Em "Numerical argument out of domain" .
-A numerical input argument was outside the defined domain of the mathematical
-function.
-.It Er 34 ERANGE Em "Numerical result out of range" .
-A numerical result of the function was too large to fit in the
-available space (perhaps exceeded precision).
-.It Er 35 EAGAIN Em "Resource temporarily unavailable" .
-This is a temporary condition and later calls to the
-same routine may complete normally.
-.It Er 36 EINPROGRESS Em "Operation now in progress" .
-An operation that takes a long time to complete (such as
-a
-.Xr connect 2 )
-was attempted on a non-blocking object (see
-.Xr fcntl 2 ) .
-.It Er 37 EALREADY Em "Operation already in progress" .
-An operation was attempted on a non-blocking object that already
-had an operation in progress.
-.It Er 38 ENOTSOCK Em "Socket operation on non-socket" .
-Self-explanatory.
-.It Er 39 EDESTADDRREQ Em "Destination address required" .
-A required address was omitted from an operation on a socket.
-.It Er 40 EMSGSIZE Em "Message too long" .
-A message sent on a socket was larger than the internal message buffer
-or some other network limit.
-.It Er 41 EPROTOTYPE Em "Protocol wrong type for socket" .
-A protocol was specified that does not support the semantics of the
-socket type requested. For example, you cannot use the
-.Tn ARPA
-Internet
-.Tn UDP
-protocol with type
-.Dv SOCK_STREAM .
-.It Er 42 ENOPROTOOPT Em "Protocol not available" .
-A bad option or level was specified in a
-.Xr getsockopt 2
-or
-.Xr setsockopt 2
-call.
-.It Er 43 EPROTONOSUPPORT Em "Protocol not supported" .
-The protocol has not been configured into the
-system or no implementation for it exists.
-.It Er 44 ESOCKTNOSUPPORT Em "Socket type not supported" .
-The support for the socket type has not been configured into the
-system or no implementation for it exists.
-.It Er 45 EOPNOTSUPP Em "Operation not supported" .
-The attempted operation is not supported for the type of object referenced.
-Usually this occurs when a file descriptor refers to a file or socket
-that cannot support this operation,
-for example, trying to
-.Em accept
-a connection on a datagram socket.
-.It Er 46 EPFNOSUPPORT Em "Protocol family not supported" .
-The protocol family has not been configured into the
-system or no implementation for it exists.
-.It Er 47 EAFNOSUPPORT Em "Address family not supported by protocol family" .
-An address incompatible with the requested protocol was used.
-For example, you shouldn't necessarily expect to be able to use
-.Tn NS
-addresses with
-.Tn ARPA
-Internet protocols.
-.It Er 48 EADDRINUSE Em "Address already in use" .
-Only one usage of each address is normally permitted.
-.Pp
-.It Er 49 EADDRNOTAVAIL Em "Cannot assign requested address" .
-Normally results from an attempt to create a socket with an
-address not on this machine.
-.It Er 50 ENETDOWN Em "Network is down" .
-A socket operation encountered a dead network.
-.It Er 51 ENETUNREACH Em "Network is unreachable" .
-A socket operation was attempted to an unreachable network.
-.It Er 52 ENETRESET Em "Network dropped connection on reset" .
-The host you were connected to crashed and rebooted.
-.It Er 53 ECONNABORTED Em "Software caused connection abort" .
-A connection abort was caused internal to your host machine.
-.It Er 54 ECONNRESET Em "Connection reset by peer" .
-A connection was forcibly closed by a peer. This normally
-results from a loss of the connection on the remote socket
-due to a timeout or a reboot.
-.It Er 55 ENOBUFS Em "\&No buffer space available" .
-An operation on a socket or pipe was not performed because
-the system lacked sufficient buffer space or because a queue was full.
-.It Er 56 EISCONN Em "Socket is already connected" .
-A
-.Xr connect 2
-request was made on an already connected socket; or,
-a
-.Xr sendto 2
-or
-.Xr sendmsg 2
-request on a connected socket specified a destination
-when already connected.
-.It Er 57 ENOTCONN Em "Socket is not connected" .
-An request to send or receive data was disallowed because
-the socket was not connected and (when sending on a datagram socket)
-no address was supplied.
-.It Er 58 ESHUTDOWN Em "Cannot send after socket shutdown" .
-A request to send data was disallowed because the socket
-had already been shut down with a previous
-.Xr shutdown 2
-call.
-.It Er 60 ETIMEDOUT Em "Operation timed out" .
-A
-.Xr connect 2
-or
-.Xr send 2
-request failed because the connected party did not
-properly respond after a period of time. (The timeout
-period is dependent on the communication protocol.)
-.It Er 61 ECONNREFUSED Em "Connection refused" .
-No connection could be made because the target machine actively
-refused it. This usually results from trying to connect
-to a service that is inactive on the foreign host.
-.It Er 62 ELOOP Em "Too many levels of symbolic links" .
-A path name lookup involved more than 8 symbolic links.
-.It Er 63 ENAMETOOLONG Em "File name too long" .
-A component of a path name exceeded 255
-.Pq Dv MAXNAMELEN
-characters, or an entire
-path name exceeded 1023
-.Pq Dv MAXPATHLEN Ns -1
-characters.
-.It Er 64 EHOSTDOWN Em "Host is down" .
-A socket operation failed because the destination host was down.
-.It Er 65 EHOSTUNREACH Em "No route to host" .
-A socket operation was attempted to an unreachable host.
-.It Er 66 ENOTEMPTY Em "Directory not empty" .
-A directory with entries other than
-.Ql \&.
-and
-.Ql \&..
-was supplied to a remove directory or rename call.
-.It Er 67 EPROCLIM Em "Too many processes" .
-.It Er 68 EUSERS Em "Too many users" .
-The quota system ran out of table entries.
-.It Er 69 EDQUOT Em "Disc quota exceeded" .
-A
-.Xr write 2
-to an ordinary file, the creation of a
-directory or symbolic link, or the creation of a directory
-entry failed because the user's quota of disk blocks was
-exhausted, or the allocation of an inode for a newly
-created file failed because the user's quota of inodes
-was exhausted.
-.ne 1i
-.It Er 70 ESTALE Em "Stale NFS file handle" .
-An attempt was made to access an open file (on an
-.Tn NFS
-filesystem)
-which is now unavailable as referenced by the file descriptor.
-This may indicate the file was deleted on the
-.Tn NFS
-server or some
-other catastrophic event occurred.
-.It Er 72 EBADRPC Em "RPC struct is bad" .
-Exchange of
-.Tn RPC
-information was unsuccessful.
-.It Er 73 ERPCMISMATCH Em "RPC version wrong" .
-The version of
-.Tn RPC
-on the remote peer is not compatible with
-the local version.
-.It Er 74 EPROGUNAVAIL Em "RPC prog. not avail" .
-The requested program is not registered on the remote host.
-.It Er 75 EPROGMISMATCH Em "Program version wrong" .
-The requested version of the program is not available
-on the remote host
-.Pq Tn RPC .
-.It Er 76 EPROCUNAVAIL Em "Bad procedure for program" .
-An
-.Tn RPC
-call was attempted for a procedure which doesn't exist
-in the remote program.
-.It Er 77 ENOLCK Em "No locks available" .
-A system-imposed limit on the number of simultaneous file
-locks was reached.
-.It Er 78 ENOSYS Em "Function not implemented" .
-Attempted a system call that is not available on this
-system.
-.Sh DEFINITIONS
-.Bl -tag -width Ds
-.It Process ID .
-Each active process in the system is uniquely identified by a non-negative
-integer called a process ID. The range of this ID is from 0 to 30000.
-.It Parent process ID
-A new process is created by a currently active process; (see
-.Xr fork 2 ) .
-The parent process ID of a process is initially the process ID of its creator.
-If the creating process exits,
-the parent process ID of each child is set to the ID of a system process,
-.Xr init 8 .
-.It Process Group
-Each active process is a member of a process group that is identified by
-a non-negative integer called the process group ID. This is the process
-ID of the group leader. This grouping permits the signaling of related
-processes (see
-.Xr termios 4 )
-and the job control mechanisms of
-.Xr csh 1 .
-.It Session
-A session is a set of one or more process groups.
-A session is created by a successful call to
-.Xr setsid 2 ,
-which causes the caller to become the only member of the only process
-group in the new session.
-.It Session leader
-A process that has created a new session by a successful call to
-.Xr setsid 2 ,
-is known as a session leader.
-Only a session leader may acquire a terminal as its controlling terminal (see
-.Xr termios 4 ) .
-.It Controlling process
-A session leader with a controlling terminal is a controlling process.
-.It Controlling terminal
-A terminal that is associated with a session is known as the controlling
-terminal for that session and its members.
-.ne 1i
-.It "Terminal Process Group ID"
-A terminal may be acquired by a session leader as its controlling terminal.
-Once a terminal is associated with a session, any of the process groups
-within the session may be placed into the foreground by setting
-the terminal process group ID to the ID of the process group.
-This facility is used
-to arbitrate between multiple jobs contending for the same terminal;
-(see
-.Xr csh 1
-and
-.Xr tty 4 ) .
-.It "Orphaned Process Group"
-A process group is considered to be
-.Em orphaned
-if it is not under the control of a job control shell.
-More precisely, a process group is orphaned
-when none of its members has a parent process that is in the same session
-as the group,
-but is in a different process group.
-Note that when a process exits, the parent process for its children
-is changed to be
-.Nm init ,
-which is in a separate session.
-Not all members of an orphaned process group are necessarily orphaned
-processes (those whose creating process has exited).
-The process group of a session leader is orphaned by definition.
-.It "Real User ID and Real Group ID"
-Each user on the system is identified by a positive integer
-termed the real user ID.
-.Pp
-Each user is also a member of one or more groups.
-One of these groups is distinguished from others and
-used in implementing accounting facilities. The positive
-integer corresponding to this distinguished group is termed
-the real group ID.
-.Pp
-All processes have a real user ID and real group ID.
-These are initialized from the equivalent attributes
-of the process that created it.
-.It "Effective User Id, Effective Group Id, and Group Access List"
-Access to system resources is governed by two values:
-the effective user ID, and the group access list.
-The first member of the group access list is also known as the
-effective group ID.
-(In POSIX.1, the group access list is known as the set of supplementary
-group IDs, and it is unspecified whether the effective group ID is
-a member of the list.)
-.Pp
-The effective user ID and effective group ID are initially the
-process's real user ID and real group ID respectively. Either
-may be modified through execution of a set-user-ID or set-group-ID
-file (possibly by one its ancestors) (see
-.Xr execve 2 ) .
-By convention, the effective group ID (the first member of the group access
-list) is duplicated, so that the execution of a set-group-ID program
-does not result in the loss of the original (real) group ID.
-.Pp
-The group access list is a set of group IDs
-used only in determining resource accessibility. Access checks
-are performed as described below in ``File Access Permissions''.
-.It "Saved Set User ID and Saved Set Group ID"
-When a process executes a new file, the effective user ID is set
-to the owner of the file if the file is set-user-ID, and the effective
-group ID (first element of the group access list) is set to the group
-of the file if the file is set-group-ID.
-The effective user ID of the process is then recorded as the saved set-user-ID,
-and the effective group ID of the process is recorded as the saved set-group-ID.
-These values may be used to regain those values as the effective user
-or group ID after reverting to the real ID (see
-.Xr setuid 2 ) .
-(In POSIX.1, the saved set-user-ID and saved set-group-ID are optional,
-and are used in setuid and setgid, but this does not work as desired
-for the super-user.)
-.It Super-user
-A process is recognized as a
-.Em super-user
-process and is granted special privileges if its effective user ID is 0.
-.ne 1i
-.It Special Processes
-The processes with process IDs of 0, 1, and 2 are special.
-Process 0 is the scheduler. Process 1 is the initialization process
-.Xr init ,
-and is the ancestor of every other process in the system.
-It is used to control the process structure.
-Process 2 is the paging daemon.
-.It Descriptor
-An integer assigned by the system when a file is referenced
-by
-.Xr open 2
-or
-.Xr dup 2 ,
-or when a socket is created by
-.Xr pipe 2 ,
-.Xr socket 2
-or
-.Xr socketpair 2 ,
-which uniquely identifies an access path to that file or socket from
-a given process or any of its children.
-.It File Name
-Names consisting of up to 255
-.Pq Dv MAXNAMELEN
-characters may be used to name
-an ordinary file, special file, or directory.
-.Pp
-These characters may be selected from the set of all
-.Tn ASCII
-character
-excluding 0 (NUL) and the
-.Tn ASCII
-code for
-.Ql \&/
-(slash).
-.Pp
-Note that it is generally unwise to use
-.Ql \&* ,
-.Ql \&? ,
-.Ql \&[
-or
-.Ql \&]
-as part of
-file names because of the special meaning attached to these characters
-by the shell.
-.It Path Name
-A path name is a
-.Tn NUL Ns -terminated
-character string starting with an
-optional slash
-.Ql \&/ ,
-followed by zero or more directory names separated
-by slashes, optionally followed by a file name.
-The total length of a path name must be less than 1024
-.Pq Dv MAXPATHLEN
-characters.
-.Pp
-If a path name begins with a slash, the path search begins at the
-.Em root
-directory.
-Otherwise, the search begins from the current working directory.
-A slash by itself names the root directory. An empty
-pathname refers to the current directory.
-.It Directory
-A directory is a special type of file that contains entries
-that are references to other files.
-Directory entries are called links. By convention, a directory
-contains at least two links,
-.Ql \&.
-and
-.Ql \&.. ,
-referred to as
-.Em dot
-and
-.Em dot-dot
-respectively. Dot refers to the directory itself and
-dot-dot refers to its parent directory.
-.It "Root Directory and Current Working Directory"
-Each process has associated with it a concept of a root directory
-and a current working directory for the purpose of resolving path
-name searches. A process's root directory need not be the root
-directory of the root file system.
-.It File Access Permissions
-Every file in the file system has a set of access permissions.
-These permissions are used in determining whether a process
-may perform a requested operation on the file (such as opening
-a file for writing). Access permissions are established at the
-time a file is created. They may be changed at some later time
-through the
-.Xr chmod 2
-call.
-.Pp
-File access is broken down according to whether a file may be: read,
-written, or executed. Directory files use the execute
-permission to control if the directory may be searched.
-.Pp
-File access permissions are interpreted by the system as
-they apply to three different classes of users: the owner
-of the file, those users in the file's group, anyone else.
-Every file has an independent set of access permissions for
-each of these classes. When an access check is made, the system
-decides if permission should be granted by checking the access
-information applicable to the caller.
-.Pp
-Read, write, and execute/search permissions on
-a file are granted to a process if:
-.Pp
-The process's effective user ID is that of the super-user. (Note:
-even the super-user cannot execute a non-executable file.)
-.Pp
-The process's effective user ID matches the user ID of the owner
-of the file and the owner permissions allow the access.
-.Pp
-The process's effective user ID does not match the user ID of the
-owner of the file, and either the process's effective
-group ID matches the group ID
-of the file, or the group ID of the file is in
-the process's group access list,
-and the group permissions allow the access.
-.Pp
-Neither the effective user ID nor effective group ID
-and group access list of the process
-match the corresponding user ID and group ID of the file,
-but the permissions for ``other users'' allow access.
-.Pp
-Otherwise, permission is denied.
-.It Sockets and Address Families
-.Pp
-A socket is an endpoint for communication between processes.
-Each socket has queues for sending and receiving data.
-.Pp
-Sockets are typed according to their communications properties.
-These properties include whether messages sent and received
-at a socket require the name of the partner, whether communication
-is reliable, the format used in naming message recipients, etc.
-.Pp
-Each instance of the system supports some
-collection of socket types; consult
-.Xr socket 2
-for more information about the types available and
-their properties.
-.Pp
-Each instance of the system supports some number of sets of
-communications protocols. Each protocol set supports addresses
-of a certain format. An Address Family is the set of addresses
-for a specific group of protocols. Each socket has an address
-chosen from the address family in which the socket was created.
-.Sh SEE ALSO
-.Xr intro 3 ,
-.Xr perror 3
diff --git a/lib/libc/sys/ioctl.2 b/lib/libc/sys/ioctl.2
deleted file mode 100644
index a1d5f79..0000000
--- a/lib/libc/sys/ioctl.2
+++ /dev/null
@@ -1,129 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ioctl.2 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt IOCTL 2
-.Os BSD 4
-.Sh NAME
-.Nm ioctl
-.Nd control device
-.Sh SYNOPSIS
-.Fd #include <sys/ioctl.h>
-.Ft int
-.Fn ioctl "int d" "unsigned long request" "char *argp"
-.Sh DESCRIPTION
-The
-.Fn ioctl
-function manipulates the underlying device parameters of special files.
-In particular, many operating
-characteristics of character special files (e.g. terminals)
-may be controlled with
-.Fn ioctl
-requests.
-The argument
-.Fa d
-must be an open file descriptor.
-.Pp
-An ioctl
-.Fa request
-has encoded in it whether the argument is an
-.Dq in
-parameter
-or
-.Dq out
-parameter, and the size of the argument
-.Fa argp
-in bytes.
-Macros and defines used in specifying an ioctl
-.Fa request
-are located in the file
-.Ao Pa sys/ioctl.h Ac .
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn ioctl
-is implemented as the
-.Va ioctl
-syscall.
-.Pp
-In the threaded library, the
-.Va ioctl
-syscall is assembled to
-.Fn _thread_sys_ioctl
-and
-.Fn ioctl
-is implemented as a function which locks
-.Va d
-for read and write, then calls
-.Fn _thread_sys_ioctl .
-Before returning,
-.Fn ioctl
-unlocks
-.Va d .
-.Sh RETURN VALUES
-If an error has occurred, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Ioctl
-will fail if:
-.Bl -tag -width [ENOTTY]
-.It Bq Er EBADF
-.Fa d
-is not a valid descriptor.
-.It Bq Er ENOTTY
-.Fa d
-is not associated with a character
-special device.
-.It Bq Er ENOTTY
-The specified request does not apply to the kind
-of object that the descriptor
-.Fa d
-references.
-.It Bq Er EINVAL
-.Fa Request
-or
-.Fa argp
-is not valid.
-.El
-.Sh SEE ALSO
-.Xr mt 1 ,
-.Xr execve 2 ,
-.Xr fcntl 2 ,
-.Xr intro 4 ,
-.Xr tty 4
-.Sh HISTORY
-An
-.Fn ioctl
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/issetugid.2 b/lib/libc/sys/issetugid.2
deleted file mode 100644
index 551ac43..0000000
--- a/lib/libc/sys/issetugid.2
+++ /dev/null
@@ -1,94 +0,0 @@
-.\" $OpenBSD: issetugid.2,v 1.7 1997/02/18 00:16:09 deraadt Exp $
-.\"
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id: issetugid.2,v 1.4 1997/04/01 18:50:56 mpp Exp $
-.\"
-.Dd August, 25 1996
-.Dt ISSETUGID 2
-.Os
-.Sh NAME
-.Nm issetugid
-.Nd is current process tainted by uid or gid changes
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn issetugid void
-.Sh DESCRIPTION
-The
-.Fn issetugid
-function returns 1 if the process environment or memory address space
-is considered ``tainted'', and returns 0 otherwise.
-.Pp
-A process is tainted if it was created as a result of an
-.Xr execve 2
-system call which had either of the setuid or setgid bits set (and extra
-privileges were given as a result) or if it has changed any of it's real,
-effective or saved user or group ID's since it began execution.
-.Pp
-This system call exists so that library routines (eg: libc, libtermcap)
-can reliably determine if it is safe to use information
-that was obtained from the user, in particular the results from
-.Xr getenv 3
-should be viewed with suspicion if it is used to control operation.
-.Pp
-A ``tainted'' status is inherited by child processes as a result of the
-.Xr fork 2
-system call (or other library code that calls fork, such as
-.Xr popen 3 ) .
-.Pp
-It is assumed that a program that clears all privileges as it prepares
-to execute another will also reset the environment, hence the ``tainted''
-status will not be passed on. This is important for programs such as
-.Xr su 1
-which begin setuid but need to be able to create an untainted process.
-.Sh ERRORS
-The
-.Fn issetugid
-function is always successful, and no return value is reserved to
-indicate an error.
-.Sh SEE ALSO
-.Xr execve 2 ,
-.Xr fork 2 ,
-.Xr setegid 2 ,
-.Xr seteuid 2 ,
-.Xr setgid 2 ,
-.Xr setregid 2 ,
-.Xr setreuid 2 ,
-.Xr setuid 2
-.Sh HISTORY
-A
-.Fn issetugid
-function call first appeared in
-.Ox 2.0
-and was also implemented in
-.Fx 3.0 .
diff --git a/lib/libc/sys/kill.2 b/lib/libc/sys/kill.2
deleted file mode 100644
index 6234bc1..0000000
--- a/lib/libc/sys/kill.2
+++ /dev/null
@@ -1,137 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kill.2 8.3 (Berkeley) 4/19/94
-.\" $Id: kill.2,v 1.6 1997/02/22 15:03:55 peter Exp $
-.\"
-.Dd April 19, 1994
-.Dt KILL 2
-.Os BSD 4
-.Sh NAME
-.Nm kill
-.Nd send signal to a process
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <signal.h>
-.Ft int
-.Fn kill "pid_t pid" "int sig"
-.Sh DESCRIPTION
-The
-.Fn kill
-function sends the signal given by
-.Fa sig
-to
-.Fa pid ,
-a
-process or a group of processes.
-.Fa Sig
-may be one of the signals specified in
-.Xr sigaction 2
-or it may be 0, in which case
-error checking is performed but no
-signal is actually sent.
-This can be used to check the validity of
-.Fa pid .
-.Pp
-For a process to have permission to send a signal to a process designated
-by
-.Fa pid ,
-the real or effective user ID of the receiving process must match
-that of the sending process or the user must have appropriate privileges
-(such as given by a set-user-ID program or the user is the super-user).
-A single exception is the signal SIGCONT, which may always be sent
-to any descendant of the current process.
-.Bl -tag -width Ds
-.It \&If Fa pid No \&is greater than zero :
-.Fa Sig
-is sent to the process whose ID is equal to
-.Fa pid.
-.It \&If Fa pid No \&is zero :
-.Fa Sig
-is sent to all processes whose group ID is equal
-to the process group ID of the sender, and for which the
-process has permission;
-this is a variant of
-.Xr killpg 2 .
-.It \&If Fa pid No \&is -1 :
-If the user has super-user privileges,
-the signal is sent to all processes excluding
-system processes and the process sending the signal.
-If the user is not the super user, the signal is sent to all processes
-with the same uid as the user excluding the process sending the signal.
-No error is returned if any process could be signaled.
-.El
-.Pp
-For compatibility with System V,
-if the process number is negative but not -1,
-the signal is sent to all processes whose process group ID
-is equal to the absolute value of the process number.
-This is a variant of
-.Xr killpg 2 .
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Kill
-will fail and no signal will be sent if:
-.Bl -tag -width [EINVAL]
-.It Bq Er EINVAL
-.Fa Sig
-is not a valid signal number.
-.It Bq Er ESRCH
-No process can be found corresponding to that specified by
-.Fa pid .
-.It Bq Er ESRCH
-The process id was given as 0
-but the sending process does not have a process group.
-.It Bq Er EPERM
-The sending process is not the super-user and its effective
-user id does not match the effective user-id of the receiving process.
-When signaling a process group, this error is returned if any members
-of the group could not be signaled.
-.El
-.Sh SEE ALSO
-.Xr getpgrp 2 ,
-.Xr getpid 2 ,
-.Xr killpg 2 ,
-.Xr sigaction 2
-.Sh STANDARDS
-The
-.Fn kill
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn kill
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/ktrace.2 b/lib/libc/sys/ktrace.2
deleted file mode 100644
index 8f41a52..0000000
--- a/lib/libc/sys/ktrace.2
+++ /dev/null
@@ -1,163 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt KTRACE 2
-.Os BSD 4
-.Sh NAME
-.Nm ktrace
-.Nd process tracing
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/time.h>
-.Fd #include <sys/uio.h>
-.Fd #include <sys/ktrace.h>
-.Ft int
-.Fn ktrace "const char *tracefile" "int ops" "int trpoints" "int pid"
-.Sh DESCRIPTION
-The
-.Fn ktrace
-function enables or disables tracing of one or more processes.
-Users may only trace their own processes.
-Only the super-user can trace setuid or setgid programs.
-.Pp
-The
-.Ar tracefile
-gives the pathname of the file to be used for tracing.
-The file must exist and be a regular file writable by the calling process.
-All trace records are always appended to the file,
-so the file must be truncated to zero length to discard
-previous trace data.
-If tracing points are being disabled (see KTROP_CLEAR below),
-.Ar tracefile
-may be NULL.
-.Pp
-The
-.Nm ops
-parameter specifies the requested ktrace operation.
-The defined operations are:
-.Bl -column KTRFLAG_DESCENDXXX -offset indent
-.It KTROP_SET Enable trace points specified in Ar trpoints .
-.It KTROP_CLEAR Disable trace points specified in Ar trpoints .
-.It KTROP_CLEARFILE Stop all tracing.
-.It KTRFLAG_DESCEND The tracing change should apply to the
-specified process and all its current children.
-.El
-.Pp
-The
-.Nm trpoints
-parameter specifies the trace points of interest.
-The defined trace points are:
-.Bl -column KTRFAC_SYSCALLXXX -offset indent
-.It KTRFAC_SYSCALL Trace system calls.
-.It KTRFAC_SYSRET Trace return values from system calls.
-.It KTRFAC_NAMEI Trace name lookup operations.
-.It KTRFAC_GENIO Trace all I/O (note that this option can
-generate much output).
-.It KTRFAC_PSIG Trace posted signals.
-.It KTRFAC_CSW Trace context switch points.
-.It KTRFAC_INHERIT Inherit tracing to future children.
-.El
-.Pp
-Each tracing event outputs a record composed of a generic header
-followed by a trace point specific structure.
-The generic header is:
-.Bd -literal
-struct ktr_header {
- int ktr_len; /* length of buf */
- short ktr_type; /* trace record type */
- pid_t ktr_pid; /* process id */
- char ktr_comm[MAXCOMLEN+1]; /* command name */
- struct timeval ktr_time; /* timestamp */
- caddr_t ktr_buf;
-};
-.Ed
-.Pp
-The
-.Nm ktr_len
-field specifies the length of the
-.Nm ktr_type
-data that follows this header.
-The
-.Nm ktr_pid
-and
-.Nm ktr_comm
-fields specify the process and command generating the record.
-The
-.Nm ktr_time
-field gives the time (with microsecond resolution)
-that the record was generated.
-The
-.Nm ktr_buf
-is an internal kernel pointer and is not useful.
-.Pp
-The generic header is followed by
-.Nm ktr_len
-bytes of a
-.Nm ktr_type
-record.
-The type specific records are defined in the
-.Pa <sys/ktrace.h>
-include file.
-.Sh RETURN VALUES
-On successful completion a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to show the error.
-.Sh ERRORS
-.Fn Ktrace
-will fail if:
-.Bl -tag -width ENAMETOOLONGAA
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named tracefile does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr kdump 1 ,
-.Xr ktrace 1
-.Sh HISTORY
-A
-.Nm ktrace
-function call first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/link.2 b/lib/libc/sys/link.2
deleted file mode 100644
index e0bc45e..0000000
--- a/lib/libc/sys/link.2
+++ /dev/null
@@ -1,159 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)link.2 8.3 (Berkeley) 1/12/94
-.\" $Id$
-.\"
-.Dd January 12, 1994
-.Dt LINK 2
-.Os BSD 4
-.Sh NAME
-.Nm link
-.Nd make a hard file link
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn link "const char *name1" "const char *name2"
-.Sh DESCRIPTION
-The
-.Fn link
-function call
-atomically creates the specified directory entry (hard link)
-.Fa name2
-with the attributes of the underlying object pointed at by
-.Fa name1
-If the link is successful: the link count of the underlying object
-is incremented;
-.Fa name1
-and
-.Fa name2
-share equal access and rights
-to the
-underlying object.
-.Pp
-If
-.Fa name1
-is removed, the file
-.Fa name2
-is not deleted and the link count of the
-underlying object is
-decremented.
-.Pp
-.Fa Name1
-must exist for the hard link to
-succeed and
-both
-.Fa name1
-and
-.Fa name2
-must be in the same file system.
-.Fa name1
-may not be a directory.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Link
-will fail and no link will be created if:
-.Bl -tag -width Ar
-.It Bq Er ENOTDIR
-A component of either path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of either pathname exceeded 255 characters,
-or entire length of either path name exceeded 1023 characters.
-.It Bq Er ENOENT
-A component of either path prefix does not exist.
-.It Bq Er EACCES
-A component of either path prefix denies search permission.
-.It Bq Er EACCES
-The requested link requires writing in a directory with a mode
-that denies write permission.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating one of the pathnames.
-.It Bq Er ENOENT
-The file named by
-.Fa name1
-does not exist.
-.It Bq Er EEXIST
-The link named by
-.Fa name2
-does exist.
-.It Bq Er EPERM
-The file named by
-.Fa name1
-is a directory.
-.It Bq Er EXDEV
-The link named by
-.Fa name2
-and the file named by
-.Fa name1
-are on different file systems.
-.It Bq Er ENOSPC
-The directory in which the entry for the new link is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.ne 3v
-.It Bq Er EDQUOT
-The directory in which the entry for the new link
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to
-the file system to make the directory entry.
-.It Bq Er EROFS
-The requested link requires writing in a directory on a read-only file
-system.
-.It Bq Er EFAULT
-One of the pathnames specified
-is outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr symlink 2 ,
-.Xr unlink 2
-.Sh STANDARDS
-The
-.Fn link
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn link
-function call appeared in
-.At v7 .
-.Pp
-The
-.Fn link
-system call traditionally allows the super-user to link directories which
-corrupts the filesystem coherency. This implementation no longer permits
-it.
diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2
deleted file mode 100644
index a9b503f..0000000
--- a/lib/libc/sys/listen.2
+++ /dev/null
@@ -1,142 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)listen.2 8.2 (Berkeley) 12/11/93
-.\" $Id: listen.2,v 1.9 1997/02/22 15:03:59 peter Exp $
-.\"
-.Dd November 3, 1995
-.Dt LISTEN 2
-.Os BSD 4.2
-.Sh NAME
-.Nm listen
-.Nd listen for connections on a socket
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn listen "int s" "int backlog"
-.Sh DESCRIPTION
-To accept connections, a socket
-is first created with
-.Xr socket 2 ,
-a willingness to accept incoming connections and
-a queue limit for incoming connections are specified with
-.Fn listen ,
-and then the connections are
-accepted with
-.Xr accept 2 .
-The
-.Fn listen
-call applies only to sockets of type
-.Dv SOCK_STREAM
-or
-.Dv SOCK_SEQPACKET.
-.Pp
-The
-.Fa backlog
-parameter defines the maximum length the queue of
-pending connections may grow to.
-If a connection
-request arrives with the queue full the client may
-receive an error with an indication of
-.Er ECONNREFUSED ,
-or, if the underlying protocol supports retransmission,
-the request may be ignored so that retries may succeed.
-.Pp
-The
-.Xr sysctl 3
-MIB variable
-.Dq Li kern.somaxconn
-specifies a hard limit on
-.Fa backlog ;
-if a value greater than
-.Li kern.somaxconn
-or less than zero is specified,
-.Fa backlog
-is silently forced to
-.Li kern.somaxconn .
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn listen
-is implemented as the
-.Va listen
-syscall.
-.Pp
-In the threaded library, the
-.Va listen
-syscall is assembled to
-.Fn _thread_sys_listen
-and
-.Fn listen
-is implemented as a function which locks
-.Va s
-for read and write, then calls
-.Fn _thread_sys_listen .
-Before returning,
-.Fn listen
-unlocks
-.Va s .
-.Sh RETURN VALUES
-A 0 return value indicates success; -1 indicates an error.
-.Sh ERRORS
-.Fn Listen
-will fail if:
-.Bl -tag -width [EOPNOTSUPP]
-.It Bq Er EBADF
-The argument
-.Fa s
-is not a valid descriptor.
-.It Bq Er ENOTSOCK
-The argument
-.Fa s
-is not a socket.
-.It Bq Er EOPNOTSUPP
-The socket is not of a type that supports the operation
-.Fn listen .
-.El
-.Sh SEE ALSO
-.Xr accept 2 ,
-.Xr connect 2 ,
-.Xr socket 2 ,
-.Xr sysctl 3 ,
-.Xr sysctl 8
-.Sh HISTORY
-The
-.Fn listen
-function call appeared in
-.Bx 4.2 .
-The ability to configure the maximum
-.Fa backlog
-at run-time, and to use a negative
-.Fa backlog
-to request the maximum allowable value, was introduced in
-.Fx 2.2 .
diff --git a/lib/libc/sys/lseek.2 b/lib/libc/sys/lseek.2
deleted file mode 100644
index 39a37fa..0000000
--- a/lib/libc/sys/lseek.2
+++ /dev/null
@@ -1,141 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)lseek.2 8.3 (Berkeley) 4/19/94
-.\" $Id$
-.\"
-.Dd April 19, 1994
-.Dt LSEEK 2
-.Os BSD 4
-.Sh NAME
-.Nm lseek
-.Nd reposition read/write file offset
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft off_t
-.Fn lseek "int fildes" "off_t offset" "int whence"
-.Sh DESCRIPTION
-The
-.Fn lseek
-function repositions the offset of the file descriptor
-.Fa fildes
-to the
-argument
-.Fa offset
-according to the directive
-.Fa whence.
-The argument
-.Fa fildes
-must be an open
-file descriptor.
-.Fn Lseek
-repositions the file position pointer associated with the file
-descriptor
-.Fa fildes
-as follows:
-.Bl -item -offset indent
-.It
-If
-.Fa whence
-is
-.Dv SEEK_SET ,
-the offset is set to
-.Fa offset
-bytes.
-.It
-If
-.Fa whence
-is
-.Dv SEEK_CUR ,
-the offset is set to its current location plus
-.Fa offset
-bytes.
-.It
-If
-.Fa whence
-is
-.Dv SEEK_END ,
-the offset is set to the size of the
-file plus
-.Fa offset
-bytes.
-.El
-.Pp
-The
-.Fn lseek
-function allows the file offset to be set beyond the end
-of the existing end-of-file of the file. If data is later written
-at this point, subsequent reads of the data in the gap return
-bytes of zeros (until data is actually written into the gap).
-.Pp
-Some devices are incapable of seeking. The value of the pointer
-associated with such a device is undefined.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn lseek
-returns the resulting offset location as measured in bytes from the
-beginning of the file.
-Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate
-the error.
-.Sh ERRORS
-.Fn Lseek
-will fail and the file position pointer will remain unchanged if:
-.Bl -tag -width [EINVAL]
-.It Bq Er EBADF
-.Em Fildes
-is not an open file descriptor.
-.It Bq Er ESPIPE
-.Em Fildes
-is associated with a pipe, socket, or FIFO.
-.It Bq Er EINVAL
-.Fa Whence
-is not a proper value.
-.El
-.Sh SEE ALSO
-.Xr dup 2 ,
-.Xr open 2
-.Sh BUGS
-This document's use of
-.Fa whence
-is incorrect English, but is maintained for historical reasons.
-.Sh STANDARDS
-The
-.Fn lseek
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn lseek
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/lseek.c b/lib/libc/sys/lseek.c
deleted file mode 100644
index 8896ad8..0000000
--- a/lib/libc/sys/lseek.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)lseek.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-#endif
-
-/*
- * This function provides 64-bit offset padding that
- * is not supplied by GCC 1.X but is supplied by GCC 2.X.
- */
-off_t
-lseek(fd, offset, whence)
- int fd;
- off_t offset;
- int whence;
-{
-#ifdef _THREAD_SAFE
- off_t offs;
- if (_thread_fd_lock(fd, FD_RDWR, NULL,__FILE__,__LINE__) != 0) {
- offs = -1;
- } else {
- offs = __syscall((quad_t) SYS_lseek,fd, 0, offset, whence);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return(offs);
-
-#else
- return(__syscall((quad_t)SYS_lseek, fd, 0, offset, whence));
-#endif
-}
diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2
deleted file mode 100644
index 75c23dc..0000000
--- a/lib/libc/sys/madvise.2
+++ /dev/null
@@ -1,127 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)madvise.2 8.1 (Berkeley) 6/9/93
-.\" $Id: madvise.2,v 1.11 1997/12/30 05:17:33 alex Exp $
-.\"
-.Dd Jul 19, 1996
-.Dt MADVISE 2
-.Os
-.Sh NAME
-.Nm madvise
-.Nd give advise about use of memory
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/mman.h>
-.Ft int
-.Fn madvise "void *addr" "size_t len" "int behav"
-.Sh DESCRIPTION
-The
-.Fn madvise
-system call
-allows a process that has knowledge of its memory behavior
-to describe it to the system.
-The known behaviors are given in
-.Aq Pa sys/mman.h :
-.Bd -literal
-#define MADV_NORMAL 0 /* no further special treatment */
-#define MADV_RANDOM 1 /* expect random page references */
-#define MADV_SEQUENTIAL 2 /* expect sequential references */
-#define MADV_WILLNEED 3 /* will need these pages */
-#define MADV_DONTNEED 4 /* don't need these pages */
-#define MADV_FREE 5 /* data is now unimportant */
-.Ed
-.Pp
-.Bl -tag -width MADV_SEQUENTIAL
-.It Dv MADV_NORMAL
-Tells the system to revert to the default paging
-behavior.
-.It Dv MADV_RANDOM
-Is a hint that pages will be accessed randomly, and prefetching
-is likely not advantageous.
-.It Dv MADV_SEQUENTIAL
-Causes the VM system to depress the priority of
-pages immediately preceeding a given page when it is faulted in.
-.It Dv MADV_WILLNEED
-Causes pages that are in a given virtual address range
-to temporarily have higher priority, and if they are in
-memory, decrease the likelihood of them being freed. Additionally,
-the pages that are already in memory will be immediately mapped into
-the process, thereby eliminating unnecessary overhead of going through
-the entire process of faulting the pages in. This WILL NOT fault
-pages in from backing store, but quickly map the pages already in memory
-into the calling process.
-.It Dv MADV_DONTNEED
-Allows the VM system to decrease the in-memory priority
-of pages in the specified range. Additionally future references to
-this address range will incur a page fault.
-.It Dv MADV_FREE
-Gives the VM system the freedom to free pages,
-and tells the system that information in the specified page range
-is no longer important. This is an efficient way of allowing
-.Xr malloc 3
-to free pages anywhere in the address space, while keeping the address space
-valid. The next time that the page is referenced, the page might be demand
-zeroed, or might contain the data that was there before the
-.Dv MADV_FREE
-call.
-References made to that address space range will not make the VM system
-page the information back in from backing store until the page is
-modified again.
-.El
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn madvise
-returns 0. Otherwise a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn madvise
-function will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The virtual address range specified by the
-.Fa addr
-and
-.Fa len
-arguments is not valid.
-.El
-.Sh SEE ALSO
-.Xr mincore 2 ,
-.Xr mprotect 2 ,
-.Xr msync 2 ,
-.Xr munmap 2 .
-.Sh HISTORY
-The
-.Fn madvise
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/mincore.2 b/lib/libc/sys/mincore.2
deleted file mode 100644
index 5c83de2..0000000
--- a/lib/libc/sys/mincore.2
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mincore.2 8.1 (Berkeley) 6/9/93
-.\" $Id: mincore.2,v 1.9 1997/12/30 04:05:47 alex Exp $
-.\"
-.Dd June 9, 1993
-.Dt MINCORE 2
-.Os
-.Sh NAME
-.Nm mincore
-.Nd get advise about use of memory
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/mman.h>
-.Ft int
-.Fn mincore "const void *addr" "size_t len" "char *vec"
-.Sh DESCRIPTION
-The
-.Fn mincore
-system call
-allows a process to obtain information about whether pages are
-core resident.
-Here the current core residency of the pages is returned
-in the character array
-.Fa vec ,
-with a value of 1 meaning
-that the page is in-core.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn mincore
-returns 0 and
-.Fa vec
-is updated to relect the page status. Otherwise a value of -1
-is returned and
-.Va error
-is set to indicate the error.
-.Sh ERRORS
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The virtial address range specified by the
-.Fa addr
-and
-.Fa len
-arguments is not valid.
-.It Bq Er EFAULT
-The
-.Fa vec
-argument points to an illegal address.
-.El
-.Sh SEE ALSO
-.Xr madvise 2 ,
-.Xr mprotect 2 ,
-.Xr msync 2 ,
-.Xr munmap 2
-.Sh HISTORY
-The
-.Fn mincore
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/minherit.2 b/lib/libc/sys/minherit.2
deleted file mode 100644
index 631c175..0000000
--- a/lib/libc/sys/minherit.2
+++ /dev/null
@@ -1,94 +0,0 @@
-.\" $Id: minherit.2,v 1.4 1997/02/22 15:04:06 peter Exp $
-.\"
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)minherit.2 8.1 (Berkeley) 6/9/93
-.\"
-.Dd Feb 17, 1996
-.Dt MINHERIT 2
-.Os
-.Sh NAME
-.Nm minherit
-.Nd control the inheritance of pages
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/mman.h>
-.Ft int
-.Fn minherit "void *addr" "size_t len" "int inherit"
-.Sh DESCRIPTION
-The
-.Fn minherit
-system call
-changes the specified pages to have the inheritance characteristic
-.Fa inherit .
-Not all implementations will guarantee that the inheritance characteristic
-can be set on a page basis;
-the granularity of changes may be as large as an entire region.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn minherit
-returns 0. Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn minherit
-function will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The virtual address range specified by the
-.Fa addr
-and
-.Fa len
-arguments is not valid.
-.It Bq Er EACESS
-The flags specified by the
-.Fa inherit
-argument were not valid for the pages specified
-by the
-.Fa addr
-and
-.Fa len
-arguments.
-.El
-.Sh SEE ALSO
-.Xr fork 2 ,
-.Xr madvise 2 ,
-.Xr mincore 2 ,
-.Xr mprotect 2 ,
-.Xr msync 2 ,
-.Xr munmap 2 ,
-.Xr rfork 2
-.Sh HISTORY
-The
-.Fn minherit
-function first appeared in OpenBSD.
diff --git a/lib/libc/sys/mkdir.2 b/lib/libc/sys/mkdir.2
deleted file mode 100644
index 1dc6ef5..0000000
--- a/lib/libc/sys/mkdir.2
+++ /dev/null
@@ -1,113 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mkdir.2 8.2 (Berkeley) 12/11/93
-.\" $Id$
-.\"
-.Dd December 11, 1993
-.Dt MKDIR 2
-.Os BSD 4.2
-.Sh NAME
-.Nm mkdir
-.Nd make a directory file
-.Sh SYNOPSIS
-.Fd #include <sys/stat.h>
-.Ft int
-.Fn mkdir "const char *path" "mode_t mode"
-.Sh DESCRIPTION
-The directory
-.Fa path
-is created with the access permissions specified by
-.Fa mode
-and restricted by the
-.Xr umask 2
-of the calling process.
-.Pp
-The directory's owner ID is set to the process's effective user ID.
-The directory's group ID is set to that of the parent directory in
-which it is created.
-.Sh RETURN VALUES
-A 0 return value indicates success. A -1 return value
-indicates an error, and an error code is stored in
-.Va errno .
-.Sh ERRORS
-.Fn Mkdir
-will fail and no directory will be created if:
-.Bl -tag -width ENAMETOOLO
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-A component of the path prefix does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EPERM
-The
-.Fa path
-argument contains a byte with the high-order bit set.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er EEXIST
-The named file exists.
-.It Bq Er ENOSPC
-The new directory cannot be created because there is no space left
-on the file system that will contain the directory.
-.It Bq Er ENOSPC
-There are no free inodes on the file system on which the
-directory is being created.
-.It Bq Er EDQUOT
-The new directory cannot be created because the user's
-quota of disk blocks on the file system that will
-contain the directory has been exhausted.
-.It Bq Er EDQUOT
-The user's quota of inodes on the file system on
-which the directory is being created has been exhausted.
-.It Bq Er EIO
-An I/O error occurred while making the directory entry or allocating the inode.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr stat 2 ,
-.Xr umask 2
-.Sh STANDARDS
-The
-.Fn mkdir
-function call is expected to conform to
-.St -p1003.1-90 .
diff --git a/lib/libc/sys/mkfifo.2 b/lib/libc/sys/mkfifo.2
deleted file mode 100644
index 0cdb7ff..0000000
--- a/lib/libc/sys/mkfifo.2
+++ /dev/null
@@ -1,123 +0,0 @@
-.\" Copyright (c) 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mkfifo.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MKFIFO 2
-.Os
-.Sh NAME
-.Nm mkfifo
-.Nd make a fifo file
-.Sh SYNOPSIS
-.Fd #include <sys/stat.h>
-.Ft int
-.Fn mkfifo "const char *path" "mode_t mode"
-.Sh DESCRIPTION
-.Fn Mkfifo
-creates a new fifo file with name
-.Fa path .
-The access permissions are
-specified by
-.Fa mode
-and restricted by the
-.Xr umask 2
-of the calling process.
-.Pp
-The fifo's owner ID is set to the process's effective user ID.
-The fifo's group ID is set to that of the parent directory in
-which it is created.
-.Sh RETURN VALUES
-A 0 return value indicates success. A -1 return value
-indicates an error, and an error code is stored in
-.Va errno .
-.Sh ERRORS
-.Fn Mkfifo
-will fail and no fifo will be created if:
-.Bl -tag -width ENAMETOOLO
-.It Bq Er ENOTSUPP
-The kernel has not been configured to support fifo's.
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-A component of the path prefix does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EPERM
-The
-.Fa path
-argument contains a byte with the high-order bit set.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er EEXIST
-The named file exists.
-.It Bq Er ENOSPC
-The directory in which the entry for the new fifo is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.It Bq Er ENOSPC
-There are no free inodes on the file system on which the
-fifo is being created.
-.It Bq Er EDQUOT
-The directory in which the entry for the new fifo
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.It Bq Er EDQUOT
-The user's quota of inodes on the file system on
-which the fifo is being created has been exhausted.
-.It Bq Er EIO
-An
-.Tn I/O
-error occurred while making the directory entry or allocating the inode.
-.It Bq Er EIO
-An
-.Tn I/O
-error occurred while reading from or writing to the file system.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr mknod 2 ,
-.Xr stat 2 ,
-.Xr umask 2
-.Sh STANDARDS
-The
-.Fn mkfifo
-function call is expected to conform to
-.St -p1003.1-90 .
diff --git a/lib/libc/sys/mknod.2 b/lib/libc/sys/mknod.2
deleted file mode 100644
index 2fa6342..0000000
--- a/lib/libc/sys/mknod.2
+++ /dev/null
@@ -1,121 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mknod.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt MKNOD 2
-.Os BSD 4
-.Sh NAME
-.Nm mknod
-.Nd make a special file node
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn mknod "const char *path" "mode_t mode" "dev_t dev"
-.Sh DESCRIPTION
-The filesystem node
-.Fa path
-is created with the file type and access permissions specified in
-.Fa mode .
-The access permissions are modified by the process's umask value.
-.Pp
-If
-.Fa mode
-indicates a block or character special file,
-.Fa dev
-is a configuration dependent specification denoting a particular device
-on the system.
-Otherwise,
-.Fa dev
-is ignored.
-.Pp
-.Fn Mknod
-requires super-user privileges.
-.Sh RETURN VALUES
-Upon successful completion a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Mknod
-will fail and the file will be not created if:
-.Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-A component of the path prefix does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EPERM
-The process's effective user ID is not super-user.
-.It Bq Er EPERM
-The pathname contains a character with the high-order bit set.
-.It Bq Er EIO
-An I/O error occurred while making the directory entry or allocating the inode.
-.It Bq Er ENOSPC
-The directory in which the entry for the new node is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.It Bq Er ENOSPC
-There are no free inodes on the file system on which the
-node is being created.
-.It Bq Er EDQUOT
-The directory in which the entry for the new node
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.It Bq Er EDQUOT
-The user's quota of inodes on the file system on
-which the node is being created has been exhausted.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er EEXIST
-The named file exists.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr mkfifo 2 ,
-.Xr stat 2 ,
-.Xr umask 2
-.Sh HISTORY
-A
-.Fn mknod
-function call appeared in
-.At v6 .
diff --git a/lib/libc/sys/mlock.2 b/lib/libc/sys/mlock.2
deleted file mode 100644
index 6770173..0000000
--- a/lib/libc/sys/mlock.2
+++ /dev/null
@@ -1,162 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mlock.2 8.2 (Berkeley) 12/11/93
-.\"
-.Dd June 2, 1993
-.Dt MLOCK 2
-.Os
-.Sh NAME
-.Nm mlock ,
-.Nm munlock
-.Nd lock (unlock) physical pages in memory
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/mman.h>
-.Ft int
-.Fn mlock "const void *addr" "size_t len"
-.Ft int
-.Fn munlock "const void *addr" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn mlock
-system call
-locks into memory the physical pages associated with the virtual address
-range starting at
-.Fa addr
-for
-.Fa len
-bytes.
-The
-.Fn munlock
-call unlocks pages previously locked by one or more
-.Fn mlock
-calls.
-For both, the
-.Fa addr
-parameter should be aligned to a multiple of the page size.
-If the
-.Fa len
-parameter is not a multiple of the page size, it will be rounded up
-to be so.
-The entire range must be allocated.
-.Pp
-After an
-.Fn mlock
-call, the indicated pages will cause neither a non-resident page
-nor address-translation fault until they are unlocked.
-They may still cause protection-violation faults or TLB-miss faults on
-architectures with software-managed TLBs.
-The physical pages remain in memory until all locked mappings for the pages
-are removed.
-Multiple processes may have the same physical pages locked via their own
-virtual address mappings.
-A single process may likewise have pages multiply-locked via different virtual
-mappings of the same pages or via nested
-.Fn mlock
-calls on the same address range.
-Unlocking is performed explicitly by
-.Fn munlock
-or implicitly by a call to
-.Fn munmap
-which deallocates the unmapped address range.
-Locked mappings are not inherited by the child process after a
-.Xr fork 2 .
-.Pp
-Since physical memory is a potentially scarce resource, processes are
-limited in how much they can lock down.
-A single process can
-.Fn mlock
-the minimum of
-a system-wide ``wired pages'' limit and
-the per-process
-.Li RLIMIT_MEMLOCK
-resource limit.
-.Sh RETURN VALUES
-A return value of 0 indicates that the call
-succeeded and all pages in the range have either been locked or unlocked.
-A return value of -1 indicates an error occurred and the locked
-status of all pages in the range remains unchanged.
-In this case, the global location
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Mlock
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The address given is not page aligned or the length is negative.
-.It Bq Er EAGAIN
-Locking the indicated range would exceed either the system or per-process
-limit for locked memory.
-.It Bq Er ENOMEM
-Some portion of the indicated address range is not allocated.
-There was an error faulting/mapping a page.
-.El
-.Fn Munlock
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The address given is not page aligned or the length is negative.
-.It Bq Er ENOMEM
-Some portion of the indicated address range is not allocated.
-Some portion of the indicated address range is not locked.
-.El
-.Sh "SEE ALSO"
-.Xr fork 2 ,
-.Xr mmap 2 ,
-.Xr munmap 2 ,
-.Xr setrlimit 2 ,
-.Xr getpagesize 3
-.Sh BUGS
-Unlike The Sun implementation, multiple
-.Fn mlock
-calls on the same address range require the corresponding number of
-.Fn munlock
-calls to actually unlock the pages, i.e.
-.Fn mlock
-nests.
-This should be considered a consequence of the implementation
-and not a feature.
-.Pp
-The per-process resource limit is a limit on the amount of virtual
-memory locked, while the system-wide limit is for the number of locked
-physical pages.
-Hence a process with two distinct locked mappings of the same physical page
-counts as 2 pages against the per-process limit and as only a single page
-in the system limit.
-.Sh HISTORY
-The
-.Fn mlock
-and
-.Fn munlock
-functions first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
deleted file mode 100644
index 174a083..0000000
--- a/lib/libc/sys/mmap.2
+++ /dev/null
@@ -1,241 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mmap.2 8.4 (Berkeley) 5/11/95
-.\"
-.Dd May 11, 1995
-.Dt MMAP 2
-.Os BSD 4
-.Sh NAME
-.Nm mmap
-.Nd map files or devices into memory
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/mman.h>
-.Ft void *
-.Fn mmap "void * addr" "size_t len" "int prot" "int flags" "int fd" "off_t offset"
-.Sh DESCRIPTION
-The
-.Fn mmap
-function causes the pages starting at
-.Fa addr
-and continuing for at most
-.Fa len
-bytes to be mapped from the object described by
-.Fa fd ,
-starting at byte offset
-.Fa offset .
-If
-.Fa len
-is not a multiple of the pagesize, the mapped region may extend past the
-specified range.
-Any such extension beyond the end of the mapped object will be zero-filled.
-.Pp
-If
-.Fa addr
-is non-zero, it is used as a hint to the system.
-(As a convenience to the system, the actual address of the region may differ
-from the address supplied.)
-If
-.Fa addr
-is zero, an address will be selected by the system.
-The actual starting address of the region is returned.
-A successful
-.Fa mmap
-deletes any previous mapping in the allocated address range.
-.Pp
-The protections (region accessibility) are specified in the
-.Fa prot
-argument by
-.Em or Ns 'ing
-the following values:
-.Pp
-.Bl -tag -width MAP_FIXEDX
-.It Dv PROT_EXEC
-Pages may be executed.
-.It Dv PROT_READ
-Pages may be read.
-.It Dv PROT_WRITE
-Pages may be written.
-.El
-.Pp
-The
-.Fa flags
-parameter specifies the type of the mapped object, mapping options and
-whether modifications made to the mapped copy of the page are private
-to the process or are to be shared with other references.
-Sharing, mapping type and options are specified in the
-.Fa flags
-argument by
-.Em or Ns 'ing
-the following values:
-.Pp
-.Bl -tag -width MAP_FIXEDX
-.It Dv MAP_ANON
-Map anonymous memory not associated with any specific file.
-The file descriptor used for creating
-.Dv MAP_ANON
-must be \-1.
-The
-.Fa offset
-parameter is ignored.
-.\".It Dv MAP_FILE
-.\"Mapped from a regular file or character-special device memory.
-.It Dv MAP_FIXED
-Do not permit the system to select a different address than the one
-specified.
-If the specified address cannot be used,
-.Fn mmap
-will fail.
-If MAP_FIXED is specified,
-.Fa addr
-must be a multiple of the pagesize.
-Use of this option is discouraged.
-.It Dv MAP_HASSEMAPHORE
-Notify the kernel that the region may contain semaphores and that special
-handling may be necessary.
-.It Dv MAP_INHERIT
-Permit regions to be inherited across
-.Xr execve 2
-system calls.
-.It Dv MAP_PRIVATE
-Modifications are private.
-.It Dv MAP_SHARED
-Modifications are shared.
-.El
-.Pp
-The
-.Xr close 2
-function does not unmap pages, see
-.Xr munmap 2
-for further information.
-.Pp
-The current design does not allow a process to specify the location of
-swap space.
-In the future we may define an additional mapping type,
-.Dv MAP_SWAP ,
-in which
-the file descriptor argument specifies a file or device to which swapping
-should be done.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn mmap
-returns a pointer to the mapped region.
-Otherwise, a value of MAP_FAILED is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Mmap
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EACCES
-The flag
-.Dv PROT_READ
-was specified as part of the
-.Fa prot
-parameter and
-.Fa fd
-was not open for reading.
-The flags
-.Dv MAP_SHARED
-and
-.Dv PROT_WRITE
-were specified as part of the
-.Fa flags
-and
-.Fa prot
-parameters and
-.Fa fd
-was not open for writing.
-.It Bq Er EBADF
-.Fa Fd
-is not a valid open file descriptor.
-.It Bq Er EINVAL
-.Dv MAP_FIXED
-was specified and the
-.Fa addr
-parameter was not page aligned, or part of the desired address space
-resides out of the valid address space for a user process.
-.It Bq Er EINVAL
-.Fa Len
-was negative.
-.It Bq Er EINVAL
-.Dv MAP_ANON
-was specified and the
-.Fa fd
-parameter was not -1.
-.It Bq Er EINVAL
-.Dv MAP_ANON
-has not been specified and
-.Fa fd
-did not reference a regular or character special file.
-.It Bq Er EINVAL
-.Fa Offset
-was not page-aligned. (See BUGS below.)
-.It Bq Er ENOMEM
-.Dv MAP_FIXED
-was specified and the
-.Fa addr
-parameter wasn't available.
-.Dv MAP_ANON
-was specified and insufficient memory was available.
-.Sh "SEE ALSO"
-.Xr madvise 2 ,
-.Xr mincore 2 ,
-.Xr mlock 2 ,
-.Xr mprotect 2 ,
-.Xr msync 2 ,
-.Xr munlock 2 ,
-.Xr munmap 2 ,
-.Xr getpagesize 3
-.Sh BUGS
-.Ar len
-is limited to 2GB. Mmapping slightly more than 2GB doesn't work, but
-it is possible to map a window of size (filesize % 2GB) for file sizes
-of slightly less than 2G, 4GB, 6GB and 8GB.
-.Pp
-The limit is imposed for a variety of reasons. Most of them have to do
-with
-.Tn FreeBSD
-not wanting to use 64 bit offsets in the VM system due to
-the extreme performance penalty. So
-.Tn FreeBSD
-uses 32bit page indexes and
-this gives
-.Tn FreeBSD
-a maximum of 8TB filesizes. It's actually bugs in
-the filesystem code that causes the limit to be further restricted to
-1TB (loss of precision when doing blockno calculations).
-.Pp
-Another reason for the 2GB limit is that filesystem metadata can
-reside at negative offsets.
-.Pp
-We currently can only deal with page aligned file offsets.
diff --git a/lib/libc/sys/mmap.c b/lib/libc/sys/mmap.c
deleted file mode 100644
index c011692..0000000
--- a/lib/libc/sys/mmap.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)mmap.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/syscall.h>
-
-/*
- * This function provides 64-bit offset padding that
- * is not supplied by GCC 1.X but is supplied by GCC 2.X.
- */
-void *
-mmap(addr, len, prot, flags, fd, offset)
- void * addr;
- size_t len;
- int prot;
- int flags;
- int fd;
- off_t offset;
-{
-
- return((void *)__syscall((quad_t)SYS_mmap, addr, len, prot, flags,
- fd, 0, offset));
-}
diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2
deleted file mode 100644
index 25a2d8c..0000000
--- a/lib/libc/sys/mount.2
+++ /dev/null
@@ -1,325 +0,0 @@
-.\" Copyright (c) 1980, 1989, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mount.2 8.3 (Berkeley) 5/24/95
-.\"
-.Dd May 24, 1995
-.Dt MOUNT 2
-.Os BSD 4
-.Sh NAME
-.Nm mount ,
-.Nm unmount
-.Nd mount or dismount a filesystem
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/mount.h>
-.Ft int
-.Fn mount "const char *type" "const char *dir" "int flags" "void *data"
-.Ft int
-.Fn unmount "const char *dir" "int flags"
-.Sh DESCRIPTION
-The
-.Fn mount
-function grafts
-a filesystem object onto the system file tree
-at the point
-.Ar dir .
-The argument
-.Ar data
-describes the filesystem object to be mounted.
-The argument
-.Ar type
-tells the kernel how to interpret
-.Ar data
-(See
-.Ar type
-below).
-The contents of the filesystem
-become available through the new mount point
-.Ar dir .
-Any files in
-.Ar dir
-at the time
-of a successful mount are swept under the carpet so to speak, and
-are unavailable until the filesystem is unmounted.
-.Pp
-The following
-.Ar flags
-may be specified to
-suppress default semantics which affect filesystem access.
-.Bl -tag -width MNT_SYNCHRONOUS
-.It Dv MNT_RDONLY
-The filesystem should be treated as read-only;
-Even the super-user may not write on it.
-Specifying MNT_UPDATE withut this option will upgrade
-a read-only filesystem to read/write.
-.It Dv MNT_NOEXEC
-Do not allow files to be executed from the filesystem.
-.It Dv MNT_NOSUID
-Do not honor setuid or setgid bits on files when executing them.
-.It Dv MNT_NOATIME
-Disable update of file access times.
-.It Dv MNT_NODEV
-Do not interpret special files on the filesystem.
-.It Dv MNT_SUIDDIR
-Directories with the SUID bit set chown new files to their own owner.
-.It Dv MNT_SYNCHRONOUS
-All I/O to the filesystem should be done synchronously.
-.It Dv MNT_ASYNC
-All I/O to the filesystem should be done asynchronously.
-.It Dv MNT_FORCE
-Fore a read-write mount even if the filesystem appears to be unclean.
-Dangerous.
-.It Dv MNT_NOCLUSTERR
-Disable read clustering.
-.It Dv MNT_NOCLUSTERW
-Disable write clustering.
-.El
-.Pp
-The flag
-.Dv MNT_UPDATE
-indicates that the mount command is being applied
-to an already mounted filesystem.
-This allows the mount flags to be changed without requiring
-that the filesystem be unmounted and remounted.
-Some filesystems may not allow all flags to be changed.
-For example,
-many filesystems will not allow a change from read-write to read-only.
-.Pp
-The flag
-.Dv MNT_RELOAD
-causes the vfs subsystem to update its data structures pertaining to
-the specified already mounted filesystem.
-.Pp
-The
-.Fa type
-argument names the filesystem.
-The types of filesystems known to the system can be obtained with
-.Xr lsvfs 1 .
-.Pp
-.Fa Data
-is a pointer to a structure that contains the type
-specific arguments to mount.
-The format for these argument structures is described in the
-manual page for each filesystem.
-By convention filesystem manual pages are named
-by prefixing ``mount_'' to the name of the filesystem as returned by
-.Xr lsvfs 1 .
-Thus the
-.Nm NFS
-filesystem is described by the
-.Xr mount_nfs 8
-manual page.
-.Pp
-The
-.Fn umount
-function call disassociates the filesystem from the specified
-mount point
-.Fa dir .
-.Pp
-The
-.Fa flags
-argument may specify
-.Dv MNT_FORCE
-to specify that the filesystem should be forcibly unmounted or made read-only
-(if MNT_UPDATE and MNT_RDONLY are also specified)
-even if files are still active.
-Active special devices continue to work,
-but any further accesses to any other active files result in errors
-even if the filesystem is later remounted.
-.Pp
-The
-.Dv MNT_SUIDDIR
-option requires the SUIDDIR option to have been compiled into the kernel
-to have any effect.
-See the
-.Xr mount 8
-and
-.Xr chmod 2
-pages for more information.
-.Sh RETURN VALUES
-The
-.Fn mount
-returns the value 0 if the mount was successful, otherwise -1 is returned
-and the variable
-.Va errno
-is set to indicate the error.
-.Pp
-The
-.Fn umount
-function returns the value 0 if the umount succeeded; otherwise -1 is returned
-and the variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn mount
-function will fail when one of the following occurs:
-.Bl -tag -width [ENOTBLK]
-.It Bq Er EPERM
-The caller is not the super-user.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or the entire length of a path name exceeded 1023 characters.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating a pathname.
-.It Bq Er ENOENT
-A component of
-.Fa dir
-does not exist.
-.It Bq Er ENOTDIR
-A component of
-.Ar name
-is not a directory,
-or a path prefix of
-.Ar special
-is not a directory.
-.It Bq Er EBUSY
-Another process currently holds a reference to
-.Fa dir .
-.It Bq Er EFAULT
-.Fa Dir
-points outside the process's allocated address space.
-.El
-.Pp
-The following errors can occur for a
-.Em ufs
-filesystem mount:
-.Bl -tag -width [ENOTBLK]
-.It Bq Er ENODEV
-A component of ufs_args
-.Ar fspec
-does not exist.
-.It Bq Er ENOTBLK
-.Ar Fspec
-is not a block device.
-.It Bq Er ENXIO
-The major device number of
-.Ar fspec
-is out of range (this indicates no device driver exists
-for the associated hardware).
-.It Bq Er EBUSY
-.Ar Fspec
-is already mounted.
-.It Bq Er EMFILE
-No space remains in the mount table.
-.It Bq Er EINVAL
-The super block for the filesystem had a bad magic
-number or an out of range block size.
-.It Bq Er ENOMEM
-Not enough memory was available to read the cylinder
-group information for the filesystem.
-.It Bq Er EIO
-An I/O error occurred while reading the super block or
-cylinder group information.
-.It Bq Er EFAULT
-.Ar Fspec
-points outside the process's allocated address space.
-.El
-.Pp
-The following errors can occur for a
-.Em nfs
-filesystem mount:
-.Bl -tag -width [ENOTBLK]
-.It Bq Er ETIMEDOUT
-.Em Nfs
-timed out trying to contact the server.
-.It Bq Er EFAULT
-Some part of the information described by nfs_args
-points outside the process's allocated address space.
-.El
-.Pp
-The following errors can occur for a
-.Em mfs
-filesystem mount:
-.Bl -tag -width [ENOTBLK]
-.It Bq Er EMFILE
-No space remains in the mount table.
-.It Bq Er EINVAL
-The super block for the filesystem had a bad magic
-number or an out of range block size.
-.It Bq Er ENOMEM
-Not enough memory was available to read the cylinder
-group information for the filesystem.
-.It Bq Er EIO
-A paging error occurred while reading the super block or
-cylinder group information.
-.It Bq Er EFAULT
-.Em Name
-points outside the process's allocated address space.
-.El
-.Pp
-The
-.Fn umount
-function may fail with one of the following errors:
-.Bl -tag -width [ENOTBLK]
-.It Bq Er EPERM
-The caller is not the super-user.
-.It Bq Er ENOTDIR
-A component of the path is not a directory.
-.It Bq Er EINVAL
-The pathname contains a character with the high-order bit set.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EINVAL
-The requested directory is not in the mount table.
-.It Bq Er EBUSY
-A process is holding a reference to a file located
-on the filesystem.
-.It Bq Er EIO
-An I/O error occurred while writing cached filesystem information.
-.It Bq Er EFAULT
-.Fa Dir
-points outside the process's allocated address space.
-.El
-.Pp
-A
-.Em ufs
-or
-.Em mfs
-mount can also fail if the maximum number of filesystems are currently
-mounted.
-.Sh SEE ALSO
-.Xr lsvfs 1 ,
-.Xr mfs 8 ,
-.Xr mount 8 ,
-.Xr umount 8
-.Sh BUGS
-Some of the error codes need translation to more obvious messages.
-.Sh HISTORY
-.Fn Mount
-and
-.Fn umount
-function calls appeared in
-.At v6 .
diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2
deleted file mode 100644
index e76fceb..0000000
--- a/lib/libc/sys/mprotect.2
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)mprotect.2 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt MPROTECT 2
-.Os
-.Sh NAME
-.Nm mprotect
-.Nd control the protection of pages
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/mman.h>
-.Ft int
-.Fn mprotect "const void *addr" "size_t len" "int prot"
-.Sh DESCRIPTION
-The
-.Fn mprotect
-system call
-changes the specified pages to have protection
-.Fa prot .
-Not all implementations will guarantee protection on a page basis;
-the granularity of protection changes may be as large as an entire region.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn mprotect
-returns 0. Otherwise a value of -1 is returned
-and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn mprotect
-function will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The virtual address range specified by the
-.Fa addr
-and
-.Fa len
-arguments is not valid.
-.It Bq Er EACCES
-The calling process was not allowed to change
-the protection to the value specified by
-the
-.Fa prot
-argument.
-.El
-.Sh SEE ALSO
-.Xr madvise 2 ,
-.Xr mincore 2 ,
-.Xr msync 2 ,
-.Xr munmap 2
-.Sh HISTORY
-The
-.Fn mprotect
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/msync.2 b/lib/libc/sys/msync.2
deleted file mode 100644
index 4f4fc6a..0000000
--- a/lib/libc/sys/msync.2
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)msync.2 8.2 (Berkeley) 6/21/94
-.\"
-.Dd June 21, 1994
-.Dt MSYNC 2
-.Os
-.Sh NAME
-.Nm msync
-.Nd synchronize a mapped region
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/mman.h>
-.Ft int
-.Fn msync "void *addr" "size_t len" "int flags"
-.Sh DESCRIPTION
-The
-.Fn msync
-system call
-writes any modified pages back to the filesystem and updates
-the file modification time.
-If
-.Fa len
-is 0, all modified pages within the region containing
-.Fa addr
-will be flushed;
-if
-.Fa len
-is non-zero, only the pages containing
-.Fa addr
-and
-.Fa len
-succeeding locations will be examined.
-The
-.Fa flags
-argument may be specified as follows:
-.Bd -literal
-MS_ASYNC Return immediately (not currently implemented)
-MS_SYNC Perform synchronous writes
-MS_INVALIDATE Invalidate all cached data
-.Ed
-.Sh RETURN VALUES
-If any errors occur, -1 is returned and errno is set to indicate the
-error. Otherwise, a 0 value is returned.
-.Sh ERRORS
-.Fn msync
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa addr
-is not a multiple of the hardware page size.
-.It Bq Er EINVAL
-.Fa len
-is too large or negative.
-.It Bq Er EINVAL
-.Fa flags
-was both MS_ASYNC and MS_INVALIDATE. Only one of these flags is allowed.
-.It Bq Er EIO
-An I/O error occured while writing to the file system.
-.Sh SEE ALSO
-.Xr madvise 2 ,
-.Xr mincore 2 ,
-.Xr mprotect 2 ,
-.Xr munmap 2
-.Sh HISTORY
-The
-.Fn msync
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2
deleted file mode 100644
index 63df238..0000000
--- a/lib/libc/sys/munmap.2
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)munmap.2 8.3 (Berkeley) 5/27/94
-.\"
-.Dd May 27, 1994
-.Dt MUNMAP 2
-.Os
-.Sh NAME
-.Nm munmap
-.Nd remove a mapping
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/mman.h>
-.Ft int
-.Fn munmap "void *addr" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn munmap
-system call
-deletes the mappings for the specified address range,
-and causes further references to addresses within the range
-to generate invalid memory references.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn munmap
-returns zero.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Munmap
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The
-.Fa addr
-parameter was not page aligned, the
-.Fa len
-parameter was negative, or
-some part of the region being unmapped is outside the
-valid address range for a process.
-.Sh "SEE ALSO"
-.Xr madvise 2 ,
-.Xr mincore 2 ,
-.Xr mprotect 2 ,
-.Xr msync 2 ,
-.Xr munmap 2 ,
-.Xr getpagesize 3
-.Sh HISTORY
-The
-.Fn munmap
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/nanosleep.2 b/lib/libc/sys/nanosleep.2
deleted file mode 100644
index 0cbcc08..0000000
--- a/lib/libc/sys/nanosleep.2
+++ /dev/null
@@ -1,120 +0,0 @@
-.\" $Id: nanosleep.2,v 1.3 1997/08/21 19:44:41 bde Exp $
-.\" $OpenBSD: nanosleep.2,v 1.1 1997/04/20 20:56:20 tholo Exp $
-.\" $NetBSD: nanosleep.2,v 1.1 1997/04/17 18:12:02 jtc Exp $
-.\"
-.\" Copyright (c) 1986, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sleep.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd April 17, 1997
-.Dt NANOSLEEP 2
-.Os
-.Sh NAME
-.Nm nanosleep ,
-.Nm signanosleep
-.Sh SYNOPSIS
-.Fd #include <time.h>
-.Ft int
-.Fn nanosleep "const struct timespec *rqtp" "struct timespec *rmtp"
-.Pp
-.Fd #include <signal.h>
-.Fd #include <time.h>
-.Ft int
-.Fn signanosleep "const struct timespec *rqtp" "struct timespec *rmtp" "sigset_t *mask"
-.Sh DESCRIPTION
-.Fn Nanosleep
-causes the process to sleep for the specified time. An unmasked signal will
-cause it to terminate the sleep early, regardless of the
-.Dv SA_RESTART
-value on the interrupting signal.
-.Pp
-The
-.Fn signanosleep
-function temporarily (and atomically) sets the signal mask of the process
-for the duration of the system call so that specific signals can be
-nominated to cause an early termination of the sleep.
-.Sh RETURN VALUE
-If the
-.Fn nanosleep
-function returns because the requested time has elapsed, the value
-returned will be zero.
-.Pp
-If the
-.Fn nanosleep
-function returns due to the delivery of a signal, the value returned
-will be the -1, and the global variable
-.Va errno
-will be set to indicate the interruption.
-If
-.Fa rmtp
-is
-.Pf non- Dv NULL ,
-the timespec structure it references is updated to contain the
-unslept amount (the request time minus the time actually slept).
-.Sh ERRORS
-If any of the following conditions occur, the
-.Nm
-function shall return -1 and set
-.Va errno
-to the corresponding value.
-.Bl -tag -width Er
-.It Bq Er EFAULT
-Either
-.Fa rqtp
-or
-.Fa rmtp
-points to memory that is not a valid part of the process
-address space.
-.It Bq Er EINTR
-.Nm
-was interrupted by the delivery of a signal.
-.It Bq Er EINVAL
-.Fa rqtp
-specified a nanosecond value less than zero
-or greater than or equal to 1000 million.
-.It Bq Er ENOSYS
-.Nm
-is not supported by this implementation.
-.El
-.Sh SEE ALSO
-.Xr sigsuspend 2 ,
-.Xr sleep 3
-.Sh STANDARDS
-The
-.Fn nanosleep
-function conforms to
-.St -p1003.1b-93 .
-.Pp
-The
-.Fn signanosleep
-function is an extenstion that first appeared in
-.Fx 3.0
diff --git a/lib/libc/sys/nfssvc.2 b/lib/libc/sys/nfssvc.2
deleted file mode 100644
index b2f481e..0000000
--- a/lib/libc/sys/nfssvc.2
+++ /dev/null
@@ -1,250 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)nfssvc.2 8.1 (Berkeley) 6/9/93
-.\"
-.Dd June 9, 1993
-.Dt NFSSVC 2
-.Os
-.Sh NAME
-.Nm nfssvc
-.Nd NFS services
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/mount.h>
-.Fd #include <nfs/rpcv2.h>
-.Fd #include <nfs/nfs.h>
-.Fd #include <unistd.h>
-.Ft int
-.Fn nfssvc "int flags" "void *argstructp"
-.Sh DESCRIPTION
-The
-.Fn nfssvc
-function is used by the NFS daemons to pass information into and out
-of the kernel and also to enter the kernel as a server daemon.
-The
-.Fa flags
-argument consists of several bits that show what action is to be taken
-once in the kernel and the
-.Fa argstructp
-points to one of three structures depending on which bits are set in
-flags.
-.Pp
-On the client side,
-.Xr nfsiod 8
-calls
-.Fn nfssvc
-with the
-.Fa flags
-argument set to
-.Dv NFSSVC_BIOD
-and
-.Fa argstructp
-set to
-.Dv NULL
-to enter the kernel as a block I/O server daemon.
-For
-.Nm NQNFS ,
-.Xr mount_nfs 8
-calls
-.Fn nfssvc
-with the
-.Dv NFSSVC_MNTD
-flag, optionally or'd with the flags
-.Dv NFSSVC_GOTAUTH
-and
-.Dv NFSSVC_AUTHINFAIL
-along with a pointer to a
-.Bd -literal
-struct nfsd_cargs {
- char *ncd_dirp; /* Mount dir path */
- uid_t ncd_authuid; /* Effective uid */
- int ncd_authtype; /* Type of authenticator */
- int ncd_authlen; /* Length of authenticator string */
- u_char *ncd_authstr; /* Authenticator string */
- int ncd_verflen; /* and the verifier */
- u_char *ncd_verfstr;
- NFSKERBKEY_T ncd_key; /* Session key */
-};
-.Ed
-.Pp
-structure.
-The initial call has only the
-.Dv NFSSVC_MNTD
-flag set to specify service for the mount point.
-If the mount point is using Kerberos, then the
-.Xr mount_nfs 8
-daemon will return from
-.Fn nfssvc
-with errno == ENEEDAUTH whenever the client side requires an ``rcmd''
-authentication ticket for the user.
-.Xr Mount_nfs 8
-will attempt to get the Kerberos ticket, and if successful will call
-.Fn nfssvc
-with the flags
-.Dv NFSSVC_MNTD
-and
-.Dv NFSSVC_GOTAUTH
-after filling the ticket into the
-ncd_authstr field
-and
-setting the ncd_authlen and ncd_authtype
-fields of the nfsd_cargs structure.
-If
-.Xr mount_nfs 8
-failed to get the ticket,
-.Fn nfssvc
-will be called with the flags
-.Dv NFSSVC_MNTD ,
-.Dv NFSSVC_GOTAUTH
-and
-.Dv NFSSVC_AUTHINFAIL
-to denote a failed authentication attempt.
-.Pp
-On the server side,
-.Fn nfssvc
-is called with the flag
-.Dv NFSSVC_NFSD
-and a pointer to a
-.Bd -literal
-struct nfsd_srvargs {
- struct nfsd *nsd_nfsd; /* Pointer to in kernel nfsd struct */
- uid_t nsd_uid; /* Effective uid mapped to cred */
- u_long nsd_haddr; /* Ip address of client */
- struct ucred nsd_cr; /* Cred. uid maps to */
- int nsd_authlen; /* Length of auth string (ret) */
- u_char *nsd_authstr; /* Auth string (ret) */
- int nsd_verflen; /* and the verfier */
- u_char *nsd_verfstr;
- struct timeval nsd_timestamp; /* timestamp from verifier */
- u_long nsd_ttl; /* credential ttl (sec) */
- NFSKERBKEY_T nsd_key; /* Session key */
-};
-.Ed
-.Pp
-to enter the kernel as an
-.Xr nfsd 8
-daemon.
-Whenever an
-.Xr nfsd 8
-daemon receives a Kerberos authentication ticket, it will return from
-.Fn nfssvc
-with errno == ENEEDAUTH.
-The
-.Xr nfsd 8
-will attempt to authenticate the ticket and generate a set of credentials
-on the server for the ``user id'' specified in the field nsd_uid.
-This is done by first authenticating the Kerberos ticket and then mapping
-the Kerberos principal to a local name and getting a set of credentials for
-that user via.
-.Xr getpwnam 3
-and
-.Xr getgrouplist 3 .
-If successful, the
-.Xr nfsd 8
-will call
-.Fn nfssvc
-with the
-.Dv NFSSVC_NFSD
-and
-.Dv NFSSVC_AUTHIN
-flags set to pass the credential mapping in nsd_cr into the
-kernel to be cached on the server socket for that client.
-If the authentication failed,
-.Xr nfsd 8
-calls
-.Fn nfssvc
-with the flags
-.Dv NFSSVC_NFSD
-and
-.Dv NFSSVC_AUTHINFAIL
-to denote an authentication failure.
-.Pp
-The master
-.Xr nfsd 8
-server daemon calls
-.Fn nfssvc
-with the flag
-.Dv NFSSVC_ADDSOCK
-and a pointer to a
-.Bd -literal
-struct nfsd_args {
- int sock; /* Socket to serve */
- caddr_t name; /* Client address for connection based sockets */
- int namelen;/* Length of name */
-};
-.Ed
-.Pp
-to pass a server side
-.Tn NFS
-socket into the kernel for servicing by the
-.Xr nfsd 8
-daemons.
-.Sh RETURN VALUES
-Normally
-.Fn nfssvc
-does not return unless the server
-is terminated by a signal when a value of 0 is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to specify the error.
-.Sh ERRORS
-.Bl -tag -width [ENEEDAUTH]
-.It Bq Er ENEEDAUTH
-This special error value
-is really used for authentication support, particularly Kerberos,
-as explained above.
-.It Bq Er EPERM
-The caller is not the super-user.
-.El
-.Sh SEE ALSO
-.Xr mount_nfs 8 ,
-.Xr nfsd 8 ,
-.Xr nfsiod 8
-.Sh HISTORY
-The
-.Fn nfssvc
-function first appeared in
-.Bx 4.4 .
-.Sh BUGS
-The
-.Fn nfssvc
-system call is designed specifically for the
-.Tn NFS
-support daemons and as such is specific to their requirements.
-It should really return values to indicate the need for authentication
-support, since
-.Dv ENEEDAUTH
-is not really an error.
-Several fields of the argument structures are assumed to be valid and
-sometimes to be unchanged from a previous call, such that
-.Fn nfssvc
-must be used with extreme care.
diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2
deleted file mode 100644
index 7343528..0000000
--- a/lib/libc/sys/open.2
+++ /dev/null
@@ -1,292 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)open.2 8.2 (Berkeley) 11/16/93
-.\"
-.Dd November 16, 1993
-.Dt OPEN 2
-.Os BSD 4
-.Sh NAME
-.Nm open
-.Nd open or create a file for reading or writing
-.Sh SYNOPSIS
-.Fd #include <fcntl.h>
-.Ft int
-.Fn open "const char *path" "int flags" "mode_t mode"
-.Sh DESCRIPTION
-The file name specified by
-.Fa path
-is opened
-for reading and/or writing as specified by the
-argument
-.Fa flags
-and the file descriptor returned to the calling process.
-The
-.Fa flags
-argument may indicate the file is to be
-created if it does not exist (by specifying the
-.Dv O_CREAT
-flag), in which case the file is created with mode
-.Fa mode
-as described in
-.Xr chmod 2
-and modified by the process' umask value (see
-.Xr umask 2 ) .
-.Pp
-The flags specified are formed by
-.Em or Ns 'ing
-the following values
-.Pp
-.Bd -literal -offset indent -compact
-O_RDONLY open for reading only
-O_WRONLY open for writing only
-O_RDWR open for reading and writing
-O_NONBLOCK do not block on open
-O_APPEND append on each write
-O_CREAT create file if it does not exist
-O_TRUNC truncate size to 0
-O_EXCL error if create and file exists
-O_SHLOCK atomically obtain a shared lock
-O_EXLOCK atomically obtain an exclusive lock
-.Ed
-.Pp
-Opening a file with
-.Dv O_APPEND
-set causes each write on the file
-to be appended to the end. If
-.Dv O_TRUNC
-is specified and the
-file exists, the file is truncated to zero length.
-If
-.Dv O_EXCL
-is set with
-.Dv O_CREAT
-and the file already
-exists,
-.Fn open
-returns an error. This may be used to
-implement a simple exclusive access locking mechanism.
-If
-.Dv O_EXCL
-is set and the last component of the pathname is
-a symbolic link,
-.Fn open
-will fail even if the symbolic
-link points to a non-existent name.
-If the
-.Dv O_NONBLOCK
-flag is specified and the
-.Fn open
-call would result
-in the process being blocked for some reason (e.g., waiting for
-carrier on a dialup line),
-.Fn open
-returns immediately.
-The first time the process attempts to perform I/O on the open
-file it will block (not currently implemented).
-.Pp
-When opening a file, a lock with
-.Xr flock 2
-semantics can be obtained by setting
-.Dv O_SHLOCK
-for a shared lock, or
-.Dv O_EXLOCK
-for an exclusive lock.
-If creating a file with
-.Dv O_CREAT ,
-the request for the lock will never fail
-(provided that the underlying filesystem supports locking).
-.Pp
-If successful,
-.Fn open
-returns a non-negative integer, termed a file descriptor.
-It returns -1 on failure.
-The file pointer used to mark the current position within the
-file is set to the beginning of the file.
-.Pp
-When a new file is created it is given the group of the directory
-which contains it.
-.Pp
-The new descriptor is set to remain open across
-.Xr execve 2
-system calls; see
-.Xr close 2
-and
-.Xr fcntl 2 .
-.Pp
-The system imposes a limit on the number of file descriptors
-open simultaneously by one process.
-.Xr Getdtablesize 2
-returns the current system limit.
-.Pp
-.Sh IMPLEMENTATION NOTES
-In the non-threaded library
-.Fn open
-is implemented as the
-.Va open
-syscall.
-.Pp
-In the threaded library, the
-.Va open
-syscall is assembled to
-.Fn _thread_sys_open
-and
-.Fn open
-is implemented as a function which disables thread rescheduling
-and calls
-.Fn _thread_sys_open .
-Before returning,
-.Fn open
-enables thread rescheduling.
-.Sh RETURN VALUES
-If successful,
-.Fn open
-returns a non-negative integer, termed a file descriptor.
-It returns -1 on failure, and sets
-.Va errno
-to indicate the error.
-.Sh ERRORS
-The named file is opened unless:
-.Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-.Dv O_CREAT
-is not set and the named file does not exist.
-.It Bq Er ENOENT
-A component of the path name that must exist does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er EACCES
-The required permissions (for reading and/or writing)
-are denied for the given flags.
-.It Bq Er EACCES
-.Dv O_CREAT
-is specified,
-the file does not exist,
-and the directory in which it is to be created
-does not permit writing.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EISDIR
-The named file is a directory, and the arguments specify
-it is to be opened for writing.
-.It Bq Er EROFS
-The named file resides on a read-only file system,
-and the file is to be modified.
-.It Bq Er EMFILE
-The process has already reached its limit for open file descriptors.
-.It Bq Er ENFILE
-The system file table is full.
-.It Bq Er ENXIO
-The named file is a character special or block
-special file, and the device associated with this special file
-does not exist.
-.It Bq Er EINTR
-The
-.Fn open
-operation was interrupted by a signal.
-.It Bq Er EOPNOTSUPP
-.Dv O_SHLOCK
-or
-.Dv O_EXLOCK
-is specified but the underlying filesystem does not support locking.
-.It Bq Er ENOSPC
-.Dv O_CREAT
-is specified,
-the file does not exist,
-and the directory in which the entry for the new file is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.It Bq Er ENOSPC
-.Dv O_CREAT
-is specified,
-the file does not exist,
-and there are no free inodes on the file system on which the
-file is being created.
-.It Bq Er EDQUOT
-.Dv O_CREAT
-is specified,
-the file does not exist,
-and the directory in which the entry for the new file
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.It Bq Er EDQUOT
-.Dv O_CREAT
-is specified,
-the file does not exist,
-and the user's quota of inodes on the file system on
-which the file is being created has been exhausted.
-.It Bq Er EIO
-An I/O error occurred while making the directory entry or
-allocating the inode for
-.Dv O_CREAT .
-.It Bq Er ETXTBSY
-The file is a pure procedure (shared text) file that is being
-executed and the
-.Fn open
-call requests write access.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.It Bq Er EEXIST
-.Dv O_CREAT
-and
-.Dv O_EXCL
-were specified and the file exists.
-.It Bq Er EOPNOTSUPP
-An attempt was made to open a socket (not currently implemented).
-.It Bq Er EINVAL
-An attempt was made to open a descriptor with an illegal combination
-of
-.Dv O_RDONLY ,
-.Dv O_WRONLY ,
-and
-.Dv O_RDWR .
-.El
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr close 2 ,
-.Xr dup 2 ,
-.Xr getdtablesize 2 ,
-.Xr lseek 2 ,
-.Xr read 2 ,
-.Xr umask 2 ,
-.Xr write 2
-.Sh HISTORY
-An
-.Fn open
-function call appeared in
-.At v6 .
diff --git a/lib/libc/sys/pathconf.2 b/lib/libc/sys/pathconf.2
deleted file mode 100644
index f8500e3..0000000
--- a/lib/libc/sys/pathconf.2
+++ /dev/null
@@ -1,164 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)pathconf.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt PATHCONF 2
-.Os BSD 4
-.Sh NAME
-.Nm pathconf ,
-.Nm fpathconf
-.Nd get configurable pathname variables
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft long
-.Fn pathconf "const char *path" "int name"
-.Ft long
-.Fn fpathconf "int fd" "int name"
-.Sh DESCRIPTION
-.Pp
-The
-.Fn pathconf
-and
-.Fn fpathconf
-functions provides a method for applications to determine the current
-value of a configurable system limit or option variable associated
-with a pathname or file descriptor.
-.Pp
-For
-.Fn pathconf ,
-the
-.Fa path
-argument is the name of a file or directory.
-For
-.Fn fpathconf ,
-the
-.Fa fd
-argument is an open file descriptor.
-The
-.Fa name
-argument specifies the system variable to be queried.
-Symbolic constants for each name value are found in the include file
-.Li <unistd.h> .
-.Pp
-The available values are as follows:
-.Pp
-.Bl -tag -width "123456"
-.Pp
-.It Li _PC_LINK_MAX
-The maximum file link count.
-.It Li _PC_MAX_CANON
-The maximum number of bytes in terminal canonical input line.
-.It Li _PC_MAX_INPUT
-The minimum maximum number of bytes for which space is available in
-a terminal input queue.
-.It Li _PC_NAME_MAX
-The maximum number of bytes in a file name.
-.It Li _PC_PATH_MAX
-The maximum number of bytes in a pathname.
-.It Li _PC_PIPE_BUF
-The maximum number of bytes which will be written atomically to a pipe.
-.It Li _PC_CHOWN_RESTRICTED
-Return 1 if appropriate privileges are required for the
-.Xr chown 2
-system call, otherwise 0.
-.It Li _PC_NO_TRUNC
-Return 1 if file names longer than KERN_NAME_MAX are truncated.
-.It Li _PC_VDISABLE
-Returns the terminal character disabling value.
-.El
-.Sh RETURN VALUES
-If the call to
-.Fn pathconf
-or
-.Fn fpathconf
-is not successful, \-1 is returned and
-.Va errno
-is set appropriately.
-Otherwise, if the variable is associated with functionality that does
-not have a limit in the system, \-1 is returned and
-.Va errno
-is not modified.
-Otherwise, the current variable value is returned.
-.Sh ERRORS
-If any of the following conditions occur, the
-.Fn pathconf
-and
-.Fn fpathconf
-functions shall return -1 and set
-.Va errno
-to the corresponding value.
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The value of the
-.Fa name
-argument is invalid.
-.It Bq Er EINVAL
-The implementation does not support an association of the variable
-name with the associated file.
-.El
-.Fn Pathconf
-will fail if:
-.Bl -tag -width ENAMETOOLONGAA
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Pp
-.Bl -tag -width [EFAULT]
-.Fn Fpathconf
-will fail if:
-.It Bq Er EBADF
-.Fa fd
-is not a valid open file descriptor.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr sysctl 3
-.Sh HISTORY
-The
-.Fn pathconf
-and
-.Fn fpathconf
-functions first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/pipe.2 b/lib/libc/sys/pipe.2
deleted file mode 100644
index d50c94f..0000000
--- a/lib/libc/sys/pipe.2
+++ /dev/null
@@ -1,119 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)pipe.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt PIPE 2
-.Os BSD 4
-.Sh NAME
-.Nm pipe
-.Nd create descriptor pair for interprocess communication
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn pipe "int *fildes"
-.Sh DESCRIPTION
-The
-.Fn pipe
-function
-creates a
-.Em pipe ,
-which is an object allowing
-bidirectional data flow,
-and allocates a pair of file descriptors.
-.Pp
-By convention, the first descriptor is normally used as the
-.Em read end
-of the pipe,
-and the second is normally the
-.Em write end ,
-so that data written to
-.Fa fildes[1]
-appears on (i.e., can be read from)
-.Fa fildes[0] .
-This allows the output of one program to be
-sent
-to another program:
-the source's standard output is set up to be
-the write end of the pipe,
-and the sink's standard input is set up to be
-the read end of the pipe.
-The pipe itself persists until all its associated descriptors are
-closed.
-.Pp
-A pipe that has had an end closed is considered
-.Em widowed .
-Writing on such a pipe causes the writing process to receive
-a
-.Dv SIGPIPE
-signal.
-Widowing a pipe is the only way to deliver end-of-file to a reader:
-after the reader consumes any buffered data, reading a widowed pipe
-returns a zero count.
-.Pp
-The bidirectional nature of this implementation of pipes is not
-portable to older systems, so it is recommended to use the convention
-for using the endpoints in the traditional manner when using a
-pipe in one direction.
-.Sh RETURN VALUES
-On successful creation of the pipe, zero is returned. Otherwise,
-a value of -1 is returned and the variable
-.Va errno
-set to indicate the
-error.
-.Sh ERRORS
-The
-.Fn pipe
-call will fail if:
-.Bl -tag -width [EMFILE]
-.It Bq Er EMFILE
-Too many descriptors are active.
-.It Bq Er ENFILE
-The system file table is full.
-.It Bq Er EFAULT
-The
-.Fa fildes
-buffer is in an invalid area of the process's address
-space.
-.El
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr fork 2 ,
-.Xr read 2 ,
-.Xr socketpair 2 ,
-.Xr write 2
-.Sh HISTORY
-A
-.Fn pipe
-function call appeared in Version 3 AT&T UNIX.
-.Pp
-Bidirectional pipes were first used on Unix System V release 4.
diff --git a/lib/libc/sys/poll.2 b/lib/libc/sys/poll.2
deleted file mode 100644
index b6e6706..0000000
--- a/lib/libc/sys/poll.2
+++ /dev/null
@@ -1,188 +0,0 @@
-.\" $NetBSD: poll.2,v 1.3 1996/09/07 21:53:08 mycroft Exp $
-.\" $Id$
-.\"
-.\" Copyright (c) 1996 Charles M. Hannum. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Charles M. Hannum.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd September 7, 1996
-.Dt POLL 2
-.Os
-.Sh NAME
-.Nm poll
-.Nd synchronous I/O multiplexing
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <poll.h>
-.Ft int
-.Fn poll "struct pollfd *fds" "unsigned int nfds" "int timeout"
-.Sh DESCRIPTION
-.Fn Poll
-examines a set of file descriptors to see if some of them are ready for
-I/O.
-The
-.Fa fds
-argument is a pointer to an array of pollfd structures as defined in
-.Aq Pa poll.h
-(shown below). The
-.Fa nfds
-argument determines the size of the
-.Fa fds
-array.
-.Bd -literal
-struct pollfd {
- int fd; /* file descriptor */
- short events; /* events to look for */
- short revents; /* events returned */
-};
-.Ed
-.Pp
-The fields of
-.Fa struct pollfd
-are as follows:
-.Bl -tag -width XXXrevents
-.It fd
-File descriptor to poll.
-.It events
-Events to poll for. (See below.)
-.It revents
-Events which may occur. (See below.)
-.El
-.Pp
-The event bitmasks in
-.Fa events
-and
-.Fa revents
-have the following bits:
-.Bl -tag -width XXXPOLLWRNORM
-.It POLLIN
-Data other than high priority data may be read without blocking.
-.It POLLRDNORM
-Normal data may be read without blocking.
-.It POLLRDBAND
-Data with a non-zero priority may be read without blocking.
-.It POLLPRI
-High priority data may be read without blocking.
-.It POLLOUT
-.It POLLWRNORM
-Normal data may be written without blocking.
-.It POLLWRBAND
-Data with a non-zero priority may be written without blocking.
-.It POLLERR
-An exceptional condition has occured on the device or socket. This
-flag is always checked, even if not present in the
-.Fa events
-bitmask.
-.It POLLHUP
-The device or socket has been disconnected. This flag is always
-checked, even if not present in the
-.Fa events
-bitmask. Note that
-POLLHUP
-and
-POLLOUT
-should never be present in the
-.Fa revents
-bitmask at the same time.
-.It POLLNVAL
-The file descriptor is not open. This flag is always checked, even
-if not present in the
-.Fa events
-bitmask.
-.El
-.Pp
-If
-.Fa timeout
-is neither zero nor INFTIM (-1), it specifies a maximum interval to
-wait for any file descriptor to become ready, in milliseconds. If
-.Fa timeout
-is INFTIM (-1), the poll blocks indefinitely. If
-.Fa timeout
-is zero, then
-.Fn poll
-will return without blocking.
-.Sh RETURN VALUES
-.Fn Poll
-returns the number of descriptors that are ready for I/O, or -1 if an
-error occured. If the time limit expires,
-.Fn poll
-returns 0.
-If
-.Fn poll
-returns with an error,
-including one due to an interrupted call,
-the
-.Fa fds
-array will be unmodified.
-.Sh COMPATIBILITY
-This implementation differs from the historical one in that a given
-file descriptor may not cause
-.Fn poll
-to return with an error. In cases where this would have happened in
-the historical implementation (e.g. trying to poll a
-.Xr revoke 2 ed
-descriptor), this implementation instead copies the
-.Fa events
-bitmask to the
-.Fa revents
-bitmask. Attempting to perform I/O on this descriptor will then
-return an error. This behaviour is believed to be more useful.
-.Sh ERRORS
-An error return from
-.Fn poll
-indicates:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-.Fa Fds
-points outside the process's allocated address space.
-.It Bq Er EINTR
-A signal was delivered before the time limit expired and
-before any of the selected events occurred.
-.It Bq Er EINVAL
-The specified time limit is negative.
-.El
-.Sh SEE ALSO
-.Xr accept 2 ,
-.Xr connect 2 ,
-.Xr read 2 ,
-.Xr recv 2 ,
-.Xr select 2 ,
-.Xr send 2 ,
-.Xr write 2
-.Sh BUGS
-The distinction between some of the fields in the
-.Fa events
-and
-.Fa revents
-bitmasks is really not useful without STREAMS. The fields are
-defined for compatibility with existing software.
-.Sh HISTORY
-The
-.Fn poll
-function call appeared in
-.At V .
-This manual page and the core of the implementation was taken from
-.Nx .
diff --git a/lib/libc/sys/profil.2 b/lib/libc/sys/profil.2
deleted file mode 100644
index 100b8f4..0000000
--- a/lib/libc/sys/profil.2
+++ /dev/null
@@ -1,136 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Donn Seeley of BSDI.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)profil.2 8.1 (Berkeley) 6/4/93
-.\" $Id: profil.2,v 1.6 1997/04/11 18:47:07 bde Exp $
-.\"
-.Dd June 4, 1993
-.Dt PROFIL 2
-.Os
-.Sh NAME
-.Nm profil
-.Nd control process profiling
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn profil "char *samples" "int size" "int offset" "int scale"
-.Sh DESCRIPTION
-The
-.Fn profil
-function enables or disables
-program counter profiling of the current process.
-If profiling is enabled,
-then at every profiling clock tick,
-the kernel updates an appropriate count in the
-.Fa samples
-buffer.
-The frequency of the profiling clock is recorded
-in the header in the profiling output file.
-.Pp
-The buffer
-.Fa samples
-contains
-.Fa size
-bytes and is divided into
-a series of 16-bit bins.
-Each bin counts the number of times the program counter
-was in a particular address range in the process
-when a profiling clock tick occurred while profiling was enabled.
-For a given program counter address,
-the number of the corresponding bin is given
-by the relation:
-.Bd -literal -offset indent
-[(pc - offset) / 2] * scale / 65536
-.Ed
-.Pp
-The
-.Fa offset
-parameter is the lowest address at which
-the kernel takes program counter samples.
-The
-.Fa scale
-parameter ranges from 1 to 65536 and
-can be used to change the span of the bins.
-A scale of 65536 maps each bin to 2 bytes of address range;
-a scale of 32768 gives 4 bytes, 16384 gives 8 bytes and so on.
-Intermediate values provide approximate intermediate ranges.
-A
-.Fa scale
-value of 0 disables profiling.
-.Sh RETURN VALUES
-If the
-.Fa scale
-value is nonzero and the buffer
-.Fa samples
-contains an illegal address,
-.Fn profil
-returns \-1,
-profiling is terminated and
-.Va errno
-is set appropriately.
-Otherwise
-.Fn profil
-returns 0.
-.Sh FILES
-.Bl -tag -width /usr/lib/gcrt0.o -compact
-.It Pa /usr/lib/gcrt0.o
-profiling C run-time startup file
-.It Pa gmon.out
-conventional name for profiling output file
-.El
-.Sh ERRORS
-The following error may be reported:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-The buffer
-.Fa samples
-contains an invalid address.
-.El
-.Sh SEE ALSO
-.Xr gprof 1
-.Sh HISTORY
-A
-.Fn profil
-function call appeared in
-.At v7 .
-.Sh BUGS
-This routine should be named
-.Fn profile .
-.Pp
-The
-.Fa samples
-argument should really be a vector of type
-.Fa "unsigned short" .
-.Pp
-The format of the gmon.out file is undocumented.
diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2
deleted file mode 100644
index 48468a5..0000000
--- a/lib/libc/sys/ptrace.2
+++ /dev/null
@@ -1,293 +0,0 @@
-.\" $Id: ptrace.2,v 1.9 1997/02/22 15:04:13 peter Exp $
-.\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
-.\"
-.\" This file is in the public domain.
-.Dd January 20, 1996
-.Dt PTRACE 2
-.Os FreeBSD 2
-.Sh NAME
-.Nm ptrace
-.Nd process tracing and debugging
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ptrace.h>
-.Ft int
-.Fn ptrace "int request" "pid_t pid" "caddr_t addr" "int data"
-.Sh DESCRIPTION
-.Fn ptrace
-provides tracing and debugging facilities. It allows one process (the
-.Em tracing
-process) to control another (the
-.Em traced
-process). Most of the time, the traced process runs normally, but when
-it receives a signal
-.Po
-see
-.Xr sigaction 2
-.Pc ,
-it stops. The tracing process is expected to notice this via
-.Xr wait 2
-or the delivery of a
-.Dv SIGCHLD
-signal, examine the state of the stopped process, and cause it to
-terminate or continue as appropriate.
-.Fn ptrace
-is the mechanism by which all this happens.
-.Pp
-The
-.Fa request
-argument specifies what operation is being performed; the meaning of
-the rest of the arguments depends on the operation, but except for one
-special case noted below, all
-.Fn ptrace
-calls are made by the tracing process, and the
-.Fa pid
-argument specifies the process ID of the traced process.
-.Fa request
-can be:
-.Bl -tag -width 12n
-.It Dv PT_TRACE_ME
-This request is the only one used by the traced process; it declares
-that the process expects to be traced by its parent. All the other
-arguments are ignored. (If the parent process does not expect to trace
-the child, it will probably be rather confused by the results; once the
-traced process stops, it cannot be made to continue except via
-.Eo \&
-.Fn ptrace
-.Ec \&.)
-When a process has used this request and calls
-.Xr execve 2
-or any of the routines built on it
-.Po
-such as
-.Xr execv 3
-.Pc ,
-it will stop before executing the first instruction of the new image.
-Also, any setuid or setgid bits on the executable being executed will
-be ignored.
-.It Dv PT_READ_I , Dv PT_READ_D
-These requests read a single
-.Li int
-of data from the traced process' address space. Traditionally,
-.Fn ptrace
-has allowed for machines with distinct address spaces for instruction
-and data, which is why there are two requests: conceptually,
-.Dv PT_READ_I
-reads from the instruction space and
-.Dv PT_READ_D
-reads from the data space. In the current
-.Tn FreeBSD
-implementation, these
-two requests are completely identical. The
-.Fa addr
-argument specifies the address (in the traced process' virtual address
-space) at which the read is to be done. This address does not have to
-meet any alignment constraints. The value read is returned as the
-return value from
-.Eo \&
-.Fn ptrace
-.Ec .
-.It Dv PT_WRITE_I , Dv PT_WRITE_D
-These requests parallel
-.Dv PT_READ_I
-and
-.Dv PT_READ_D ,
-except that they write rather than read. The
-.Fa data
-argument supplies the value to be written.
-.It Dv PT_READ_U
-This request reads an
-.Li int
-from the traced process' user structure. The
-.Fa addr
-argument specifies the location of the int relative to the base of the
-user structure; it will usually be an integer value cast to
-.Li caddr_t
-either explicitly or via the presence of a prototype for
-.Eo \&
-.Fn ptrace
-.Ec .
-Unlike
-.Dv PT_READ_I
-and
-.Dv PT_READ_D ,
-.Fa addr
-must be aligned on an
-.Li int
-boundary. The value read is returned as the return value from
-.Eo \&
-.Fn ptrace
-.Ec .
-.It Dv PT_WRITE_U
-This request writes an
-.Li int
-into the traced process' user structure.
-.Fa addr
-specifies the offset, just as for
-.Dv PT_READ_U ,
-and
-.Fa data
-specifies the value to be written, just as for
-.Dv PT_WRITE_I
-and
-.Dv PT_WRITE_D .
-.It Dv PT_CONTINUE
-The traced process continues execution.
-.Fa addr
-is an address specifying the place where execution is to be resumed (a
-new value for the program counter), or
-.Li (caddr_t)1
-to indicate that execution is to pick up where it left off.
-.Fa data
-provides a signal number to be delivered to the traced process as it
-resumes execution, or 0 if no signal is to be sent.
-.It Dv PT_KILL
-The traced process terminates, as if
-.Dv PT_CONTINUE
-had been used with
-.Dv SIGKILL
-given as the signal to be delivered.
-.It Dv PT_ATTACH
-This request allows a process to gain control of an otherwise unrelated
-process and begin tracing it. It does not need any cooperation from
-the to-be-traced process. In this case,
-.Fa pid
-specifies the process ID of the to-be-traced process, and the other two
-arguments are ignored. This request requires that the target process
-must have the same real UID as the tracing process, and that it must
-not be executing a setuid or setgid executable. (If the tracing
-process is running as root, these restrictions do not apply.) The
-tracing process will see the newly-traced process stop and may then
-control it as if it had been traced all along.
-.It Dv PT_DETACH
-This request is like PT_CONTINUE, except that it does not allow
-specifying an alternate place to continue execution, and after it
-succeeds, the traced process is no longer traced and continues
-execution normally.
-.El
-.Pp
-Additionally, machine-specific requests can exist. On the i386, these
-are:
-.Bl -tag -width 12n
-.It Dv PT_GETREGS
-This request reads the traced process' machine registers into the
-.Dq Li "struct reg"
-(defined in
-.Aq Pa machine/reg.h )
-pointed to by
-.Fa addr .
-.It Dv PT_SETREGS
-This request is the converse of
-.Dv PT_GETREGS ;
-it loads the traced process' machine registers from the
-.Dq Li "struct reg"
-(defined in
-.Aq Pa machine/reg.h )
-pointed to by
-.Fa addr .
-.It Dv PT_GETFPREGS
-This request reads the traced process' floating-point registers into
-the
-.Dq Li "struct fpreg"
-(defined in
-.Aq Pa machine/reg.h )
-pointed to by
-.Fa addr .
-.It Dv PT_SETFPREGS
-This request is the converse of
-.Dv PT_GETFPREGS ;
-it loads the traced process' floating-point registers from the
-.Dq Li "struct fpreg"
-(defined in
-.Aq Pa machine/reg.h )
-pointed to by
-.Fa addr .
-.El
-.Sh RETURN VALUES
-Some requests can cause
-.Fn ptrace
-to return
-.Li -1
-as a non-error value; to disambiguate,
-.Va errno
-can be set to 0 before the call and checked afterwards.
-.Sh ERRORS
-The
-.Fn ptrace
-function may fail if:
-.Bl -tag -width 4n
-.It Bq Er ESRCH
-.Bl -bullet -compact
-.It
-No process having the specified process ID exists.
-.El
-.It Bq Er EINVAL
-.Bl -bullet -compact
-.It
-A process attempted to use
-.Dv PT_ATTACH
-on itself.
-.It
-The
-.Fa request
-was not one of the legal requests.
-.It
-The
-.Fa addr
-to
-.Dv PT_READ_U
-or
-.Dv PT_WRITE_U
-was not
-.Li int Ns \&-aligned.
-.It
-The signal number (in
-.Fa data )
-to
-.Dv PT_CONTINUE
-was neither 0 nor a legal signal number.
-.It
-.Dv PT_GETREGS ,
-.Dv PT_SETREGS ,
-.Dv PT_GETFPREGS ,
-or
-.Dv PT_SETFPREGS
-was attempted on a process with no valid register set. (This is
-normally true only of system processes.)
-.El
-.It Bq Er EBUSY
-.Bl -bullet -compact
-.It
-.Dv PT_ATTACH
-was attempted on a process that was already being traced.
-.It
-A request attempted to manipulate a process that was being traced by
-some process other than the one making the request.
-.It
-A request (other than
-.Dv PT_ATTACH )
-specified a process that wasn't stopped.
-.El
-.It Bq Er EPERM
-.Bl -bullet -compact
-.It
-A request (other than
-.Dv PT_ATTACH )
-attempted to manipulate a process that wasn't being traced at all.
-.It
-An attempt was made to use
-.Dv PT_ATTACH
-on a process in violation of the requirements listed under
-.Dv PT_ATTACH
-above.
-.El
-.Sh SEE ALSO
-.Xr execve 2 ,
-.Xr sigaction 2 ,
-.Xr wait 2 ,
-.Xr execv 3
-.Sh HISTORY
-A
-.Fn ptrace
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/quotactl.2 b/lib/libc/sys/quotactl.2
deleted file mode 100644
index ac6d912..0000000
--- a/lib/libc/sys/quotactl.2
+++ /dev/null
@@ -1,216 +0,0 @@
-.\" Copyright (c) 1983, 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Robert Elz at The University of Melbourne.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)quotactl.2 8.2 (Berkeley) 3/10/95
-.\"
-.Dd March 10, 1995
-.Dt QUOTACTL 2
-.Os
-.Sh NAME
-.Nm quotactl
-.Nd manipulate filesystem quotas
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <ufs/ufs/quota.h>
-.Ft int
-.Fn quotactl "const char *path" "int cmd" "int id" "char *addr"
-.Sh DESCRIPTION
-The
-.Fn quotactl
-call enables, disables and
-manipulates filesystem quotas.
-A quota control command
-given by
-.Fa cmd
-operates on the given filename
-.Fa path
-for the given user
-.Fa id .
-(NOTE: One should use the QCMD macro defined in
-.Ao Pa ufs/ufs/quota.h Ac
-to formulate the value for
-.Fa cmd . )
-The address of an optional command specific data structure,
-.Fa addr ,
-may be given; its interpretation
-is discussed below with each command.
-.Pp
-Currently quotas are supported only for the ``ufs'' filesystem.
-For ``ufs'',
-a command is composed of a primary command (see below)
-and a command type used to interpret the
-.Fa id .
-Types are supported for interpretation of user identifiers (USRQUOTA)
-and group identifiers (GRPQUOTA).
-The ``ufs'' specific commands are:
-.Bl -tag -width Q_QUOTAON
-.It Dv Q_QUOTAON
-Enable disk quotas for the filesystem specified by
-.Fa path .
-The command type specifies the type of the quotas being enabled.
-The
-.Fa addr
-argument specifies a file from which to take the quotas.
-The quota file must exist;
-it is normally created with the
-.Xr quotacheck 8
-program.
-The
-.Fa id
-argument is unused.
-Only the super-user may turn quotas on.
-.It Dv Q_QUOTAOFF
-Disable disk quotas for the filesystem specified by
-.Fa path .
-The command type specifies the type of the quotas being disabled.
-The
-.Fa addr
-and
-.Fa id
-arguments are unused.
-Only the super-user may turn quotas off.
-.It Dv Q_GETQUOTA
-Get disk quota limits and current usage for the user or group
-(as determined by the command type) with identifier
-.Fa id .
-.Fa Addr
-is a pointer to a
-.Fa struct dqblk
-structure (defined in
-.Ao Pa ufs/ufs/quota.h Ac ) .
-.It Dv Q_SETQUOTA
-Set disk quota limits for the user or group
-(as determined by the command type) with identifier
-.Fa id .
-.Fa Addr
-is a pointer to a
-.Fa struct dqblk
-structure (defined in
-.Ao Pa ufs/ufs/quota.h Ac ) .
-The usage fields of the
-.Fa dqblk
-structure are ignored.
-This call is restricted to the super-user.
-.It Dv Q_SETUSE
-Set disk usage limits for the user or group
-(as determined by the command type) with identifier
-.Fa id .
-.Fa Addr
-is a pointer to a
-.Fa struct dqblk
-structure (defined in
-.Ao Pa ufs/ufs/quota.h Ac ) .
-Only the usage fields are used.
-This call is restricted to the super-user.
-.It Dv Q_SYNC
-Update the on-disk copy of quota usages.
-The command type specifies which type of quotas are to be updated.
-The
-.Fa id
-and
-.Fa addr
-parameters are ignored.
-.El
-.Sh RETURN VALUES
-A successful call returns 0,
-otherwise the value -1 is returned and the global variable
-.Va errno
-indicates the reason for the failure.
-.Sh ERRORS
-A
-.Fn quotactl
-call will fail if:
-.Bl -tag -width ENAMETOOLONGAA
-.It Bq Er EOPNOTSUPP
-The kernel has not been compiled with the
-.Dv QUOTA
-option.
-.It Bq Er EUSERS
-The quota table cannot be expanded.
-.It Bq Er EINVAL
-.Fa Cmd
-or the command type is invalid.
-.It Bq Er EACCES
-In
-.Dv Q_QUOTAON ,
-the quota file is not a plain file.
-.It Bq Er EACCES
-Search permission is denied for a component of a path prefix.
-.It Bq Er ENOTDIR
-A component of a path prefix was not a directory.
-.It Bq Er ENAMETOOLONG
-A component of either pathname exceeded 255 characters,
-or the entire length of either path name exceeded 1023 characters.
-.It Bq Er ENOENT
-A filename does not exist.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating a pathname.
-.It Bq Er EROFS
-In
-.Dv Q_QUOTAON ,
-the quota file resides on a read-only filesystem.
-.It Bq Er EIO
-An
-.Tn I/O
-error occurred while reading from or writing
-to a file containing quotas.
-.It Bq Er EFAULT
-An invalid
-.Fa addr
-was supplied; the associated structure could not be copied in or out
-of the kernel.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.It Bq Er EPERM
-The call was privileged and the caller was not the super-user.
-.El
-.Sh SEE ALSO
-.Xr quota 1 ,
-.Xr fstab 5 ,
-.Xr edquota 8 ,
-.Xr quotacheck 8 ,
-.Xr quotaon 8 ,
-.Xr repquota 8
-.Sh BUGS
-There should be some way to integrate this call with the resource
-limit interface provided by
-.Xr setrlimit 2
-and
-.Xr getrlimit 2 .
-.Sh HISTORY
-The
-.Fn quotactl
-function call appeared in
-.Bx 4.3 Reno .
diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2
deleted file mode 100644
index 723c1bd..0000000
--- a/lib/libc/sys/read.2
+++ /dev/null
@@ -1,236 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)read.2 8.4 (Berkeley) 2/26/94
-.\"
-.Dd February 26, 1994
-.Dt READ 2
-.Os BSD 4
-.Sh NAME
-.Nm read ,
-.Nm readv
-.Nd read input
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/uio.h>
-.Fd #include <unistd.h>
-.Ft ssize_t
-.Fn read "int d" "void *buf" "size_t nbytes"
-.Ft ssize_t
-.Fn readv "int d" "const struct iovec *iov" "int iovcnt"
-.Sh DESCRIPTION
-.Fn Read
-attempts to read
-.Fa nbytes
-of data from the object referenced by the descriptor
-.Fa d
-into the buffer pointed to by
-.Fa buf .
-.Fn Readv
-performs the same action, but scatters the input data
-into the
-.Fa iovcnt
-buffers specified by the members of the
-.Fa iov
-array: iov[0], iov[1], ..., iov[iovcnt\|\-\|1].
-.Pp
-For
-.Fn readv ,
-the
-.Fa iovec
-structure is defined as:
-.Pp
-.Bd -literal -offset indent -compact
-struct iovec {
- char *iov_base; /* Base address. */
- size_t iov_len; /* Length. */
-};
-.Ed
-.Pp
-Each
-.Fa iovec
-entry specifies the base address and length of an area
-in memory where data should be placed.
-.Fn Readv
-will always fill an area completely before proceeding
-to the next.
-.Pp
-On objects capable of seeking, the
-.Fn read
-starts at a position
-given by the pointer associated with
-.Fa d
-(see
-.Xr lseek 2 ) .
-Upon return from
-.Fn read ,
-the pointer is incremented by the number of bytes actually read.
-.Pp
-Objects that are not capable of seeking always read from the current
-position. The value of the pointer associated with such an
-object is undefined.
-.Pp
-Upon successful completion,
-.Fn read
-and
-.Fn readv
-return the number of bytes actually read and placed in the buffer.
-The system guarantees to read the number of bytes requested if
-the descriptor references a normal file that has that many bytes left
-before the end-of-file, but in no other case.
-.Pp
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn read
-is implemented as the
-.Va read
-syscall.
-.Pp
-In the threaded library, the
-.Va read
-syscall is assembled to
-.Fn _thread_sys_read
-and
-.Fn read
-is implemented as a function which locks
-.Va d
-for read, then calls
-.Fn _thread_sys_read .
-If the call to
-.Fn _thread_sys_read
-would block, a context switch is performed. Before returning,
-.Fn read
-unlocks
-.Va d .
-.Pp
-In the non-threaded library
-.Fn readv
-is implemented as the
-.Va readv
-syscall.
-.Pp
-In the threaded library, the
-.Va readv
-syscall is assembled to
-.Fn _thread_sys_readv
-and
-.Fn readv
-is implemented as a function which locks
-.Va d
-for read, then calls
-.Fn _thread_sys_readv .
-If the call to
-.Fn _thread_sys_readv
-would block, a context switch is performed. Before returning,
-.Fn readv
-unlocks
-.Va d .
-.Sh RETURN VALUES
-If successful, the
-number of bytes actually read is returned. Upon reading end-of-file,
-zero is returned.
-Otherwise, a -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Read
-and
-.Fn readv
-will succeed unless:
-.Bl -tag -width Er
-.It Bq Er EBADF
-.Fa D
-is not a valid file or socket descriptor open for reading.
-.It Bq Er EFAULT
-.Fa Buf
-points outside the allocated address space.
-.It Bq Er EIO
-An I/O error occurred while reading from the file system.
-.It Bq Er EINTR
-A read from a slow device was interrupted before
-any data arrived by the delivery of a signal.
-.It Bq Er EINVAL
-The pointer associated with
-.Fa d
-was negative.
-.It Bq Er EAGAIN
-The file was marked for non-blocking I/O,
-and no data were ready to be read.
-.El
-.Pp
-In addition,
-.Fn readv
-may return one of the following errors:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa Iovcnt
-was less than or equal to 0, or greater than 16.
-.It Bq Er EINVAL
-One of the
-.Fa iov_len
-values in the
-.Fa iov
-array was negative.
-.It Bq Er EINVAL
-The sum of the
-.Fa iov_len
-values in the
-.Fa iov
-array overflowed a 32-bit integer.
-.It Bq Er EFAULT
-Part of the
-.Fa iov
-points outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr dup 2 ,
-.Xr fcntl 2 ,
-.Xr open 2 ,
-.Xr pipe 2 ,
-.Xr select 2 ,
-.Xr socket 2 ,
-.Xr socketpair 2
-.Sh STANDARDS
-The
-.Fn read
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-The
-.Fn readv
-function call
-appeared in
-.Bx 4.2 .
-A
-.Fn read
-function call appeared in
-.At v6 .
diff --git a/lib/libc/sys/readlink.2 b/lib/libc/sys/readlink.2
deleted file mode 100644
index 8443de2..0000000
--- a/lib/libc/sys/readlink.2
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)readlink.2 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt READLINK 2
-.Os BSD 4.2
-.Sh NAME
-.Nm readlink
-.Nd read value of a symbolic link
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn readlink "const char *path" "char *buf" "int bufsiz"
-.Sh DESCRIPTION
-.Fn Readlink
-places the contents of the symbolic link
-.Fa path
-in the buffer
-.Fa buf ,
-which has size
-.Fa bufsiz .
-The
-.Fn readlink
-function does not append a
-.Dv NUL
-character to
-.Fa buf .
-.Sh RETURN VALUES
-The call returns the count of characters placed in the buffer
-if it succeeds, or a -1 if an error occurs, placing the error
-code in the global variable
-.Va errno .
-.Sh ERRORS
-.Fn Readlink
-will fail if:
-.Bl -tag -width ENAMETOOLONG
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EINVAL
-The named file is not a symbolic link.
-.It Bq Er EIO
-An I/O error occurred while reading from the file system.
-.It Bq Er EFAULT
-.Fa Buf
-extends outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr lstat 2 ,
-.Xr stat 2 ,
-.Xr symlink 2 ,
-.Xr symlink 7
-.Sh HISTORY
-The
-.Fn readlink
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/reboot.2 b/lib/libc/sys/reboot.2
deleted file mode 100644
index 1eda9b3..0000000
--- a/lib/libc/sys/reboot.2
+++ /dev/null
@@ -1,160 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)reboot.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt REBOOT 2
-.Os BSD 4
-.Sh NAME
-.Nm reboot
-.Nd reboot system or halt processor
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Fd #include <sys/reboot.h>
-.Ft int
-.Fn reboot "int howto"
-.Sh DESCRIPTION
-.Fn Reboot
-reboots the system.
-Only the super-user may reboot a machine on demand.
-However, a reboot is invoked
-automatically in the event of unrecoverable system failures.
-.Pp
-.Fa Howto
-is a mask of options; the system call interface allows the following
-options, defined in the include file
-.Aq Pa sys/reboot.h ,
-to be passed
-to the new kernel or the new bootstrap and init programs.
-.Bl -tag -width RB_INITNAMEA
-.It Dv RB_AUTOBOOT
-The default, causing the system to reboot in its usual fashion.
-.It Dv RB_ASKNAME
-Interpreted by the bootstrap program itself, causing it to
-prompt on the console as to what file should be booted.
-Normally, the system is booted from the file
-.Dq Em xx Ns No (0,0)kernel ,
-where
-.Em xx
-is the default disk name,
-without prompting for the file name.
-.It Dv RB_DFLTROOT
-Use the compiled in root device.
-Normally, the system uses the device from which it was booted
-as the root device if possible.
-(The default behavior is dependent on the ability of the bootstrap program
-to determine the drive from which it was loaded, which is not possible
-on all systems.)
-.It Dv RB_DUMP
-Dump kernel memory before rebooting; see
-.Xr savecore 8
-for more information.
-.It Dv RB_HALT
-the processor is simply halted; no reboot takes place.
-This option should be used with caution.
-.It Dv RB_POWEROFF
-After halting, the shutdown code will do what it can to turn
-of the power. This requires hardware support.
-.It Dv RB_INITNAME
-An option allowing the specification of an init program (see
-.Xr init 8 )
-other than
-.Pa /sbin/init
-to be run when the system reboots.
-This switch is not currently available.
-.It Dv RB_KDB
-Load the symbol table and enable a built-in debugger in the system.
-This option will have no useful function if the kernel is not configured
-for debugging.
-Several other options have different meaning if combined
-with this option, although their use may not be possible
-via the
-.Fn reboot
-call.
-See
-.Xr kadb 4
-for more information.
-.It Dv RB_NOSYNC
-Normally, the disks are sync'd (see
-.Xr sync 8 )
-before the processor is halted or rebooted.
-This option may be useful if file system changes have been made manually
-or if the processor is on fire.
-.It Dv RB_RDONLY
-Initially mount the root file system read-only.
-This is currently the default, and this option has been deprecated.
-.It Dv RB_SINGLE
-Normally, the reboot procedure involves an automatic disk consistency
-check and then multi-user operations.
-.Dv RB_SINGLE
-prevents this, booting the system with a single-user shell
-on the console.
-.Dv RB_SINGLE
-is actually interpreted by the
-.Xr init 8
-program in the newly booted system.
-.Pp
-When no options are given (i.e.,
-.Dv RB_AUTOBOOT
-is used), the system is
-rebooted from file ``kernel'' in the root file system of unit 0
-of a disk chosen in a processor specific way.
-An automatic consistency check of the disks is normally performed
-(see
-.Xr fsck 8 ) .
-.El
-.Sh RETURN VALUES
-If successful, this call never returns.
-Otherwise, a -1 is returned and an error is returned in the global
-variable
-.Va errno .
-.Sh ERRORS
-.Bl -tag -width Er
-.It Bq Er EPERM
-The caller is not the super-user.
-.El
-.Sh SEE ALSO
-.Xr crash 8 ,
-.Xr halt 8 ,
-.Xr init 8 ,
-.Xr reboot 8 ,
-.Xr savecore 8
-.Sh BUGS
-The HP300 implementation supports neither
-.Dv RB_DFLTROOT
-nor
-.Dv RB_KDB .
-.Sh HISTORY
-The
-.Fn reboot
-function call appeared in
-.Bx 4.0 .
diff --git a/lib/libc/sys/recv.2 b/lib/libc/sys/recv.2
deleted file mode 100644
index fdf02e3..0000000
--- a/lib/libc/sys/recv.2
+++ /dev/null
@@ -1,291 +0,0 @@
-.\" Copyright (c) 1983, 1990, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)recv.2 8.3 (Berkeley) 2/21/94
-.\"
-.Dd February 21, 1994
-.Dt RECV 2
-.Os BSD 4.3r
-.Sh NAME
-.Nm recv ,
-.Nm recvfrom ,
-.Nm recvmsg
-.Nd receive a message from a socket
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft ssize_t
-.Fn recv "int s" "void *buf" "size_t len" "int flags"
-.Ft ssize_t
-.Fn recvfrom "int s" "void *buf" "size_t len" "int flags" "struct sockaddr *from" "int *fromlen"
-.Ft ssize_t
-.Fn recvmsg "int s" "struct msghdr *msg" "int flags"
-.Sh DESCRIPTION
-.Fn Recvfrom
-and
-.Fn recvmsg
-are used to receive messages from a socket,
-and may be used to receive data on a socket whether or not
-it is connection-oriented.
-.Pp
-If
-.Fa from
-is non-nil, and the socket is not connection-oriented,
-the source address of the message is filled in.
-.Fa Fromlen
-is a value-result parameter, initialized to the size of
-the buffer associated with
-.Fa from ,
-and modified on return to indicate the actual size of the
-address stored there.
-.Pp
-The
-.Fn recv
-call is normally used only on a
-.Em connected
-socket (see
-.Xr connect 2 )
-and is identical to
-.Fn recvfrom
-with a nil
-.Fa from
-parameter.
-As it is redundant, it may not be supported in future releases.
-.Pp
-All three routines return the length of the message on successful
-completion.
-If a message is too long to fit in the supplied buffer,
-excess bytes may be discarded depending on the type of socket
-the message is received from (see
-.Xr socket 2 ) .
-.Pp
-If no messages are available at the socket, the
-receive call waits for a message to arrive, unless
-the socket is nonblocking (see
-.Xr fcntl 2 )
-in which case the value
--1 is returned and the external variable
-.Va errno
-set to
-.Er EAGAIN .
-The receive calls normally return any data available,
-up to the requested amount,
-rather than waiting for receipt of the full amount requested;
-this behavior is affected by the socket-level options
-.Dv SO_RCVLOWAT
-and
-.Dv SO_RCVTIMEO
-described in
-.Xr getsockopt 2 .
-.Pp
-The
-.Xr select 2
-call may be used to determine when more data arrive.
-.Pp
-The
-.Fa flags
-argument to a recv call is formed by
-.Em or Ap ing
-one or more of the values:
-.Bl -column MSG_WAITALL -offset indent
-.It Dv MSG_OOB Ta process out-of-band data
-.It Dv MSG_PEEK Ta peek at incoming message
-.It Dv MSG_WAITALL Ta wait for full request or error
-.El
-The
-.Dv MSG_OOB
-flag requests receipt of out-of-band data
-that would not be received in the normal data stream.
-Some protocols place expedited data at the head of the normal
-data queue, and thus this flag cannot be used with such protocols.
-The MSG_PEEK flag causes the receive operation to return data
-from the beginning of the receive queue without removing that
-data from the queue.
-Thus, a subsequent receive call will return the same data.
-The MSG_WAITALL flag requests that the operation block until
-the full request is satisfied.
-However, the call may still return less data than requested
-if a signal is caught, an error or disconnect occurs,
-or the next data to be received is of a different type than that returned.
-.Pp
-The
-.Fn recvmsg
-call uses a
-.Fa msghdr
-structure to minimize the number of directly supplied parameters.
-This structure has the following form, as defined in
-.Ao Pa sys/socket.h Ac :
-.Pp
-.Bd -literal
-struct msghdr {
- caddr_t msg_name; /* optional address */
- u_int msg_namelen; /* size of address */
- struct iovec *msg_iov; /* scatter/gather array */
- u_int msg_iovlen; /* # elements in msg_iov */
- caddr_t msg_control; /* ancillary data, see below */
- u_int msg_controllen; /* ancillary data buffer len */
- int msg_flags; /* flags on received message */
-};
-.Ed
-.Pp
-Here
-.Fa msg_name
-and
-.Fa msg_namelen
-specify the destination address if the socket is unconnected;
-.Fa msg_name
-may be given as a null pointer if no names are desired or required.
-.Fa Msg_iov
-and
-.Fa msg_iovlen
-describe scatter gather locations, as discussed in
-.Xr read 2 .
-.Fa Msg_control ,
-which has length
-.Fa msg_controllen ,
-points to a buffer for other protocol control related messages
-or other miscellaneous ancillary data.
-The messages are of the form:
-.Bd -literal
-struct cmsghdr {
- u_int cmsg_len; /* data byte count, including hdr */
- int cmsg_level; /* originating protocol */
- int cmsg_type; /* protocol-specific type */
-/* followed by
- u_char cmsg_data[]; */
-};
-.Ed
-As an example, one could use this to learn of changes in the data-stream
-in XNS/SPP, or in ISO, to obtain user-connection-request data by requesting
-a recvmsg with no data buffer provided immediately after an
-.Fn accept
-call.
-.Pp
-Open file descriptors are now passed as ancillary data for
-.Dv AF_UNIX
-domain sockets, with
-.Fa cmsg_level
-set to
-.Dv SOL_SOCKET
-and
-.Fa cmsg_type
-set to
-.Dv SCM_RIGHTS .
-.Pp
-Process credentials can also be passed as ancillary data for
-.Dv AF_UNIX
-domain sockets using a
-.Fa cmsg_type
-of
-.Dv SCM_CREDS.
-In this case,
-.Fa cmsg_data
-should be a structure of type
-.Fa cmsgcred ,
-which is defined in
-.Ao Pa sys/socket.h Ac
-as follows:
-.Pp
-.Bd -literal
-struct cmsgcred {
- pid_t cmcred_pid; /* PID of sending process */
- uid_t cmcred_uid; /* real UID of sending process */
- uid_t cmcred_euid; /* effective UID of sending process */
- gid_t cmcred_gid; /* real GID of sending process */
- short cmcred_ngroups; /* number or groups */
- gid_t cmcred_groups[CMGROUP_MAX]; /* groups */
-};
-.Ed
-.Pp
-The kernel will fill in the credential information of the sending process
-and deliver it to the receiver.
-.Pp
-The
-.Fa msg_flags
-field is set on return according to the message received.
-.Dv MSG_EOR
-indicates end-of-record;
-the data returned completed a record (generally used with sockets of type
-.Dv SOCK_SEQPACKET ) .
-.Dv MSG_TRUNC
-indicates that
-the trailing portion of a datagram was discarded because the datagram
-was larger than the buffer supplied.
-.Dv MSG_CTRUNC
-indicates that some
-control data were discarded due to lack of space in the buffer
-for ancillary data.
-.Dv MSG_OOB
-is returned to indicate that expedited or out-of-band data were received.
-.Pp
-.Sh RETURN VALUES
-These calls return the number of bytes received, or -1
-if an error occurred.
-.Sh ERRORS
-The calls fail if:
-.Bl -tag -width ENOTCONNAA
-.It Bq Er EBADF
-The argument
-.Fa s
-is an invalid descriptor.
-.It Bq Er ENOTCONN
-The socket is associated with a connection-oriented protocol
-and has not been connected (see
-.Xr connect 2
-and
-.Xr accept 2 ).
-.It Bq Er ENOTSOCK
-The argument
-.Fa s
-does not refer to a socket.
-.It Bq Er EAGAIN
-The socket is marked non-blocking, and the receive operation
-would block, or
-a receive timeout had been set,
-and the timeout expired before data were received.
-.It Bq Er EINTR
-The receive was interrupted by delivery of a signal before
-any data were available.
-.It Bq Er EFAULT
-The receive buffer pointer(s) point outside the process's
-address space.
-.El
-.Sh SEE ALSO
-.Xr fcntl 2 ,
-.Xr getsockopt 2 ,
-.Xr read 2 ,
-.Xr select 2 ,
-.Xr socket 2
-.Sh HISTORY
-The
-.Fn recv
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/rename.2 b/lib/libc/sys/rename.2
deleted file mode 100644
index d9e1b83..0000000
--- a/lib/libc/sys/rename.2
+++ /dev/null
@@ -1,199 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)rename.2 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt RENAME 2
-.Os BSD 4.2
-.Sh NAME
-.Nm rename
-.Nd change the name of a file
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft int
-.Fn rename "const char *from" "const char *to"
-.Sh DESCRIPTION
-.Fn Rename
-causes the link named
-.Fa from
-to be renamed as
-.Fa to .
-If
-.Fa to
-exists, it is first removed.
-Both
-.Fa from
-and
-.Fa to
-must be of the same type (that is, both directories or both
-non-directories), and must reside on the same file system.
-.Pp
-.Fn Rename
-guarantees that an instance of
-.Fa to
-will always exist, even if the system should crash in
-the middle of the operation.
-.Pp
-If the final component of
-.Fa from
-is a symbolic link,
-the symbolic link is renamed,
-not the file or directory to which it points.
-.Sh CAVEAT
-The system can deadlock if a loop in the file system graph is present.
-This loop takes the form of an entry in directory
-.Ql Pa a ,
-say
-.Ql Pa a/foo ,
-being a hard link to directory
-.Ql Pa b ,
-and an entry in
-directory
-.Ql Pa b ,
-say
-.Ql Pa b/bar ,
-being a hard link
-to directory
-.Ql Pa a .
-When such a loop exists and two separate processes attempt to
-perform
-.Ql rename a/foo b/bar
-and
-.Ql rename b/bar a/foo ,
-respectively,
-the system may deadlock attempting to lock
-both directories for modification.
-Hard links to directories should be
-replaced by symbolic links by the system administrator.
-.Sh RETURN VALUES
-A 0 value is returned if the operation succeeds, otherwise
-.Fn rename
-returns -1 and the global variable
-.Va errno
-indicates the reason for the failure.
-.Sh ERRORS
-.Fn Rename
-will fail and neither of the argument files will be
-affected if:
-.Bl -tag -width ENAMETOOLONG
-.It Bq Er ENAMETOOLONG
-A component of either pathname exceeded 255 characters,
-or the entire length of either path name exceeded 1023 characters.
-.It Bq Er ENOENT
-A component of the
-.Fa from
-path does not exist,
-or a path prefix of
-.Fa to
-does not exist.
-.It Bq Er EACCES
-A component of either path prefix denies search permission.
-.It Bq Er EACCES
-The requested link requires writing in a directory with a mode
-that denies write permission.
-.It Bq Er EPERM
-The directory containing
-.Fa from
-is marked sticky,
-and neither the containing directory nor
-.Fa from
-are owned by the effective user ID.
-.It Bq Er EPERM
-The
-.Fa to
-file exists,
-the directory containing
-.Fa to
-is marked sticky,
-and neither the containing directory nor
-.Fa to
-are owned by the effective user ID.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating either pathname.
-.It Bq Er ENOTDIR
-A component of either path prefix is not a directory.
-.It Bq Er ENOTDIR
-.Fa from
-is a directory, but
-.Fa to
-is not a directory.
-.It Bq Er EISDIR
-.Fa to
-is a directory, but
-.Fa from
-is not a directory.
-.It Bq Er EXDEV
-The link named by
-.Fa to
-and the file named by
-.Fa from
-are on different logical devices (file systems). Note that this error
-code will not be returned if the implementation permits cross-device
-links.
-.It Bq Er ENOSPC
-The directory in which the entry for the new name is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.It Bq Er EDQUOT
-The directory in which the entry for the new name
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.It Bq Er EIO
-An I/O error occurred while making or updating a directory entry.
-.It Bq Er EROFS
-The requested link requires writing in a directory on a read-only file
-system.
-.It Bq Er EFAULT
-.Em Path
-points outside the process's allocated address space.
-.It Bq Er EINVAL
-.Fa From
-is a parent directory of
-.Fa to ,
-or an attempt is made to rename
-.Ql \&.
-or
-.Ql \&.. .
-.It Bq Er ENOTEMPTY
-.Fa To
-is a directory and is not empty.
-.El
-.Sh SEE ALSO
-.Xr open 2 ,
-.Xr symlink 7
-.Sh STANDARDS
-The
-.Fn rename
-function call is expected to conform to
-.St -p1003.1-90 .
diff --git a/lib/libc/sys/revoke.2 b/lib/libc/sys/revoke.2
deleted file mode 100644
index b64c9dc..0000000
--- a/lib/libc/sys/revoke.2
+++ /dev/null
@@ -1,106 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Berkeley Software Design, Inc.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)revoke.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt REVOKE 2
-.Os
-.Sh NAME
-.Nm revoke
-.Nd revoke file access
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn revoke "const char *path"
-.Sh DESCRIPTION
-The
-.Fn revoke
-function invalidates all current open file descriptors in the system
-for the file named by
-.Fa path .
-Subsequent operations on any such descriptors
-fail, with the exceptions that a
-.Fn read
-from a character device file which has been revoked
-returns a count of zero (end of file),
-and a
-.Fn close
-call will succeed.
-If the file is a special file for a device which is open,
-the device close function
-is called as if all open references to the file had been closed.
-.Pp
-Access to a file may be revoked only by its owner or the super user.
-The
-.Fn revoke
-function is currently supported only for block and character special
-device files.
-It is normally used to prepare a terminal device for a new login session,
-preventing any access by a previous user of the terminal.
-.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
-.Sh ERRORS
-Access to the named file is revoked unless one of the following:
-.Bl -tag -width Er
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1024 characters.
-.It Bq Er ENOENT
-The named file or a component of the path name does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.It Bq Er EINVAL
-The named file is neither a character special or block
-special file.
-.It Bq Er EPERM
-The caller is neither the owner of the file nor the super user.
-.El
-.Sh SEE ALSO
-.Xr close 2
-.Sh HISTORY
-The
-.Fn revoke
-function was introduced in
-.Bx 4.3 Reno .
diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2
deleted file mode 100644
index 5e57f1f..0000000
--- a/lib/libc/sys/rfork.2
+++ /dev/null
@@ -1,137 +0,0 @@
-.\"
-.\" This manual page is taken directly from Plan9, and modified to
-.\" describe the actual BSD implementation. Permission for
-.\" use of this page comes from Rob Pike <rob@plan9.att.com>.
-.\"
-.Dd Jan 12, 1996
-.Dt RFORK 2
-.Os
-.Sh NAME
-.Nm rfork
-.Nd manipulate process resources
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn rfork "int flags"
-.Sh DESCRIPTION
-Forking, vforking or rforking are the only ways new processes are created.
-The
-.Fa flags
-argument to
-.Fn rfork
-selects which resources of the
-invoking process (parent) are shared
-by the new process (child) or initialized to
-their default values.
-The resources include
-the open file descriptor table (which, when shared, permits processes
-to open and close files for other processes),
-and open files.
-.Fa Flags
-is the logical OR of some subset of:
-.Bl -tag -width "RFCNAMEG" -compact -offset indent
-.It RFPROC
-If set a new process is created; otherwise changes affect the
-current process.
-The current implementation requires this flag to always be set.
-.It RFNOWAIT
-If set, the child process will be dissociated from the parent. Upon
-exit the child will not leave a status for the parent to collect.
-See
-.Xr wait 2 .
-.It RFFDG
-If set, the invoker's file descriptor table (see
-.Xr intro 2
-) is copied; otherwise the two processes share a
-single table.
-.It RFCFDG
-If set, the new process starts with a clean file descriptor table.
-Is mutually exclusive with
-.Dv RFFDG .
-.It RFMEM
-If set, the kernel will force sharing of the entire address space.
-The child
-will then inherit all the shared segments the parent process owns. Other segment
-types will be unaffected. Subsequent forks by the parent will then
-propagate the shared data and bss between children. The stack segment
-is always split. May be set only with
-.Dv RFPROC .
-.El
-.Pp
-File descriptors in a shared file descriptor table are kept
-open until either they are explicitly closed
-or all processes sharing the table exit.
-.Pp
-If
-.Dv RFPROC
-is set, the
-value returned in the parent process
-is the process id
-of the child process; the value returned in the child is zero.
-Without
-.Dv RFPROC ,
-the return value is zero.
-Process id's range from 1 to the maximum integer
-.Ft ( int )
-value.
-.Fn Rfork
-will sleep, if necessary, until required process resources are available.
-.Pp
-.Fn Fork
-can be implemented as a call to
-.Fn rfork "RFFDG | RFPROC"
-but isn't for backwards compatibility.
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn rfork
-returns a value
-of 0 to the child process and returns the process ID of the child
-process to the parent process. Otherwise, a value of -1 is returned
-to the parent process, no child process is created, and the global
-variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Rfork
-will fail and no child process will be created if:
-.Bl -tag -width [EAGAIN]
-.It Bq Er EAGAIN
-The system-imposed limit on the total
-number of processes under execution would be exceeded.
-The limit is given by the
-.Xr sysctl 3
-MIB variable
-.Dv KERN_MAXPROC .
-(The limit is actually one less than this
-except for the super user).
-.It Bq Er EAGAIN
-The user is not the super user, and
-the system-imposed limit
-on the total number of
-processes under execution by a single user would be exceeded.
-The limit is given by the
-.Xr sysctl 3
-MIB variable
-.Dv KERN_MAXPROCPERUID .
-.It Bq Er EAGAIN
-The user is not the super user, and
-the soft resource limit corresponding to the resource parameter
-.Dv RLIMIT_NOFILE
-would be exceeded (see
-.Xr getrlimit 2 ) .
-.It Bq Er EINVAL
-The RFPROC flag was not specified.
-.It Bq Er EINVAL
-Both the RFFDG and the RFCFDG flags were specified.
-.It Bq Er ENOMEM
-There is insufficient swap space for the new process.
-.El
-.Sh SEE ALSO
-.Xr fork 2 ,
-.Xr intro 2 ,
-.Xr minherit 2 ,
-.Xr vfork 2
-.Sh HISTORY
-The
-.Fn rfork
-function call first appeared in Plan9.
diff --git a/lib/libc/sys/rmdir.2 b/lib/libc/sys/rmdir.2
deleted file mode 100644
index 51235f6..0000000
--- a/lib/libc/sys/rmdir.2
+++ /dev/null
@@ -1,104 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)rmdir.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt RMDIR 2
-.Os BSD 4.2
-.Sh NAME
-.Nm rmdir
-.Nd remove a directory file
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn rmdir "const char *path"
-.Sh DESCRIPTION
-.Fn Rmdir
-removes a directory file
-whose name is given by
-.Fa path .
-The directory must not have any entries other
-than
-.Ql \&.
-and
-.Ql \&.. .
-.Sh RETURN VALUES
-A 0 is returned if the remove succeeds; otherwise a -1 is
-returned and an error code is stored in the global location
-.Va errno .
-.Sh ERRORS
-The named file is removed unless:
-.Bl -tag -width [ENAMETOOLONG]
-.It Bq Er ENOTDIR
-A component of the path is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named directory does not exist.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er ENOTEMPTY
-The named directory contains files other than
-.Ql \&.
-and
-.Ql \&..
-in it.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er EACCES
-Write permission is denied on the directory containing the link
-to be removed.
-.It Bq Er EPERM
-The directory containing the directory to be removed is marked sticky,
-and neither the containing directory nor the directory to be removed
-are owned by the effective user ID.
-.It Bq Er EBUSY
-The directory to be removed is the mount point
-for a mounted file system.
-.It Bq Er EIO
-An I/O error occurred while deleting the directory entry
-or deallocating the inode.
-.It Bq Er EROFS
-The directory entry to be removed resides on a read-only file system.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr mkdir 2 ,
-.Xr unlink 2
-.Sh HISTORY
-The
-.Fn rmdir
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/rtprio.2 b/lib/libc/sys/rtprio.2
deleted file mode 100644
index 9e7c1c9..0000000
--- a/lib/libc/sys/rtprio.2
+++ /dev/null
@@ -1,108 +0,0 @@
-.\" Copyright (c) 1994, Henrik Vestergaard Draboel
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Henrik Vestergaard Draboel.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id: rtprio.2,v 1.8 1997/02/22 15:04:17 peter Exp $
-.\"
-.Dd July 23, 1994
-.Dt RTPRIO 2
-.Sh NAME
-.Nm rtprio
-.Nd examine or modify a process realtime or idle priority
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/rtprio.h>
-.Ft int
-.Fn rtprio "int function" "pid_t pid" "struct rtprio *rtp"
-.Sh DESCRIPTION
-.Fn rtprio
-is used to lookup or change the realtime or idle priority of a process.
-
-.Fa function
-specifies the operation to be performed. RTP_LOOKUP to lookup the current priority,
-and RTP_SET to set the priority.
-.Fa pid
-specifies the process to be used, 0 for the current process.
-
-.Fa *rtp
-is a pointer to a struct rtprio which is used to specify the priority and priority type.
-This structure has the following form:
-.Bd -literal
-struct rtprio {
- u_short type;
- u_short prio;
-};
-.Ed
-.Pp
-The value of the
-.Nm type
-field may be RTP_PRIO_REALTIME for realtime priorities,
-RTP_PRIO_NORMAL for normal priorities, and RTP_PRIO_IDLE for idle priorities.
-The priority specified by the
-.Nm prio
-field ranges between 0 and
-.Dv RTP_PRIO_MAX (usually 31) .
-0 is the highest possible priority.
-
-Realtime and idle priority is inherited through fork() and exec().
-
-A realtime process can only be preempted by a process of equal or
-higher priority, or by an interrupt; idle priority processes will run only
-when no other real/normal priority process is runnable. Higher real/idle priority processes
-preempt lower real/idle priority processes. Processes of equal real/idle priority are run round-robin.
-.Sh RETURN VALUES
-.Fn rtprio
-will return 0 for success and -1 for all errors. The global variable
-.Va errno
-will be set to indicate the error.
-.Sh ERRORS
-.Fn rtprio
-will fail if
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The specified
-.Fa prio
-was out of range.
-.It Bq Er EPERM
-The calling process is not allowed to set the realtime priority. Only
-root is allowed to change the realtime priority of any process, and non-root
-may only change the idle priority of the current process.
-.It Bq Er ESRCH
-The specified process was not found.
-.Sh AUTHOR
-The original author was Henrik Vestergaard Draboel - hvd@terry.ping.dk. This
-implementation in
-.Tn FreeBSD
-was substantially rewritten by David Greenman.
-.Sh SEE ALSO
-.Xr nice 1 ,
-.Xr ps 1 ,
-.Xr rtprio 1 ,
-.Xr setpriority 2 ,
-.Xr nice 3 ,
-.Xr renice 8
diff --git a/lib/libc/sys/select.2 b/lib/libc/sys/select.2
deleted file mode 100644
index 36a4da4..0000000
--- a/lib/libc/sys/select.2
+++ /dev/null
@@ -1,191 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)select.2 8.2 (Berkeley) 3/25/94
-.\"
-.Dd March 25, 1994
-.Dt SELECT 2
-.Os BSD 4.2
-.Sh NAME
-.Nm select
-.Nd synchronous I/O multiplexing
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/time.h>
-.Fd #include <unistd.h>
-.Ft int
-.Fn select "int nfds" "fd_set *readfds" "fd_set *writefds" "fd_set *exceptfds" "struct timeval *timeout"
-.Fn FD_SET fd &fdset
-.Fn FD_CLR fd &fdset
-.Fn FD_ISSET fd &fdset
-.Fn FD_ZERO &fdset
-.Sh DESCRIPTION
-.Fn Select
-examines the I/O descriptor sets whose addresses are passed in
-.Fa readfds ,
-.Fa writefds ,
-and
-.Fa exceptfds
-to see if some of their descriptors
-are ready for reading, are ready for writing, or have an exceptional
-condition pending, respectively.
-The first
-.Fa nfds
-descriptors are checked in each set;
-i.e., the descriptors from 0 through
-.Fa nfds Ns No -1
-in the descriptor sets are examined.
-On return,
-.Fn select
-replaces the given descriptor sets
-with subsets consisting of those descriptors that are ready
-for the requested operation.
-.Fn Select
-returns the total number of ready descriptors in all the sets.
-.Pp
-The descriptor sets are stored as bit fields in arrays of integers.
-The following macros are provided for manipulating such descriptor sets:
-.Fn FD_ZERO &fdset
-initializes a descriptor set
-.Fa fdset
-to the null set.
-.Fn FD_SET fd &fdset
-includes a particular descriptor
-.Fa fd
-in
-.Fa fdset .
-.Fn FD_CLR fd &fdset
-removes
-.Fa fd
-from
-.Fa fdset .
-.Fn FD_ISSET fd &fdset
-is non-zero if
-.Fa fd
-is a member of
-.Fa fdset ,
-zero otherwise.
-The behavior of these macros is undefined if
-a descriptor value is less than zero or greater than or equal to
-.Dv FD_SETSIZE ,
-which is normally at least equal
-to the maximum number of descriptors supported by the system.
-.Pp
-If
-.Fa timeout
-is a non-nil pointer, it specifies a maximum interval to wait for the
-selection to complete. If
-.Fa timeout
-is a nil pointer, the select blocks indefinitely. To effect a poll, the
-.Fa timeout
-argument should be non-nil, pointing to a zero-valued timeval structure.
-.Pp
-Any of
-.Fa readfds ,
-.Fa writefds ,
-and
-.Fa exceptfds
-may be given as nil pointers if no descriptors are of interest.
-.Sh RETURN VALUES
-.Fn Select
-returns the number of ready descriptors that are contained in
-the descriptor sets,
-or -1 if an error occurred.
-If the time limit expires,
-.Fn select
-returns 0.
-If
-.Fn select
-returns with an error,
-including one due to an interrupted call,
-the descriptor sets will be unmodified.
-.Sh ERRORS
-An error return from
-.Fn select
-indicates:
-.Bl -tag -width Er
-.It Bq Er EBADF
-One of the descriptor sets specified an invalid descriptor.
-.It Bq Er EINTR
-A signal was delivered before the time limit expired and
-before any of the selected events occurred.
-.It Bq Er EINVAL
-The specified time limit is invalid. One of its components is
-negative or too large.
-.It Bq Er EINVAL
-.Fa nfds
-was invalid.
-.El
-.Sh SEE ALSO
-.Xr accept 2 ,
-.Xr connect 2 ,
-.Xr getdtablesize 2 ,
-.Xr gettimeofday 2 ,
-.Xr read 2 ,
-.Xr recv 2 ,
-.Xr send 2 ,
-.Xr write 2 ,
-.Xr clocks 7
-.Sh NOTES
-The default size of
-.Dv FD_SETSIZE
-is currently 1024.
-In order to accomodate programs which might potentially
-use a larger number of open files with
-.Fn select
-, it is possible
-to increase this size by having the program define
-.Dv FD_SETSIZE
-before the inclusion of any header which includes
-.Aq Pa sys/types.h .
-.Pp
-If
-.Fa nfds
-is greater than the number of open files,
-.Fn select
-is not guaranteed to examine the unused file descriptors. For historical
-reasons,
-.Fn select
-will always examine the first 256 descriptors.
-.Sh BUGS
-.Fn select
-should probably return the time remaining from the original timeout,
-if any, by modifying the time value in place.
-This may be implemented in future versions of the system.
-Thus, it is unwise to assume that the timeout value will be unmodified
-by the
-.Fn select
-call.
-.Sh HISTORY
-The
-.Fn select
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/semctl.2 b/lib/libc/sys/semctl.2
deleted file mode 100644
index 5855a7d..0000000
--- a/lib/libc/sys/semctl.2
+++ /dev/null
@@ -1,173 +0,0 @@
-.\"
-.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com>
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: semctl.2,v 1.6 1997/02/22 15:04:18 peter Exp $
-.\"
-.Dd September 12, 1995
-.Dt SEMCTL 2
-.Os FreeBSD
-.Sh NAME
-.Nm semctl
-.Nd control operations on a semaphore set
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/sem.h>
-.Ft int
-.Fn semctl "int semid" "int semnum" "int cmd" "union semun arg"
-.Sh DESCRIPTION
-.Fn Semctl
-performs the operation indicated by
-.Fa cmd
-on the semaphore set indicated by
-.Fa semid .
-For the commands that use the
-.Fa arg
-parameter,
-.Fa "union semun"
-is defined as follows:
-.Bd -literal
-.\"
-.\" From <sys/sem.h>:
-.\"
-union semun {
- int val; /* value for SETVAL */
- struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
- u_short *array; /* array for GETALL & SETALL */
-};
-.Ed
-.Pp
-Commands are performed as follows:
-.\"
-.\" This section based on Stevens, _Advanced Programming in the UNIX
-.\" Environment_.
-.\"
-.Bl -tag -width IPC_RMIDXXX
-.It Dv IPC_STAT
-Fetch the semaphore set's
-.Fa "struct semid_ds" ,
-storing it in the memory pointed to by
-.Fa arg.buf .
-.It Dv IPC_SET
-Changes the
-.Fa sem_perm.uid ,
-.Fa sem_perm.gid ,
-and
-.Fa sem_perm.mode
-members of the semaphore set's
-.Fa "struct semid_ds"
-to match those of the struct pointed to by
-.Fa arg.buf .
-The calling process's effective uid must
-match either
-.Fa sem_perm.uid
-or
-.Fa sem_perm.cuid ,
-or it must have superuser privileges.
-.It IPC_RMID
-Immediately removes the semaphore set from the system. The calling
-process's effective uid must equal the semaphore set's
-.Fa sem_perm.uid
-or
-.Fa sem_perm.cuid ,
-or the process must have superuser privileges.
-.It Dv GETVAL
-Return the value of semaphore number
-.Fa semnum .
-.It Dv SETVAL
-Set the value of semaphore number
-.Fa semnum
-to
-.Fa arg.val .
-.It Dv GETPID
-Return the pid of the last process to perform an operation on
-semaphore number
-.Fa semnum .
-.It Dv GETNCNT
-Return the number of processes waiting for semaphore number
-.Fa semnum Ns 's
-value to become greater than its current value.
-.It Dv GETZCNT
-Return the number of processes waiting for semaphore number
-.Fa semnum Ns 's
-value to become 0.
-.It Dv GETALL
-Fetch the value of all of the semaphores in the set into the
-array pointed to by
-.Fa arg.array .
-.It Dv SETALL
-Set the values of all of the semaphores in the set to the values
-in the array pointed to by
-.Fa arg.array .
-.El
-.Pp
-The
-.Fa "struct semid_ds"
-is defined as follows:
-.Bd -literal
-.\"
-.\" Taken straight from <sys/sem.h>.
-.\"
-struct semid_ds {
- struct ipc_perm sem_perm; /* operation permission struct */
- struct sem *sem_base; /* pointer to first semaphore in set */
- u_short sem_nsems; /* number of sems in set */
- time_t sem_otime; /* last operation time */
- long sem_pad1; /* SVABI/386 says I need this here */
- time_t sem_ctime; /* last change time */
- /* Times measured in secs since */
- /* 00:00:00 GMT, Jan. 1, 1970 */
- long sem_pad2; /* SVABI/386 says I need this here */
- long sem_pad3[4]; /* SVABI/386 says I need this here */
-};
-.Ed
-.Sh RETURN VALUES
-On success, when
-.Fa cmd
-is one of GETVAL, GETNCNT, or GETZCNT,
-.Fn semctl
-returns the corresponding value; otherwise, 0 is returned.
-On failure, -1 is returned, and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Semctl
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-No semaphore set corresponds to
-.Fa semid .
-.It Bq Er EINVAL
-.Fa semnum
-is not in the range of valid semaphores for given semaphore set.
-.It Bq Er EPERM
-The calling process's effective uid does not match the uid of
-the semaphore set's owner or creator.
-.It Bq Er EACCES
-Permission denied due to mismatch between operation and mode of
-semaphore set.
-.Sh SEE ALSO
-.Xr semget 2 ,
-.Xr semop 2
diff --git a/lib/libc/sys/semget.2 b/lib/libc/sys/semget.2
deleted file mode 100644
index 3d58fa4..0000000
--- a/lib/libc/sys/semget.2
+++ /dev/null
@@ -1,138 +0,0 @@
-.\"
-.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com>
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: semget.2,v 1.5 1997/03/18 23:57:22 bde Exp $
-.\"
-.Dd September 12, 1995
-.Dt SEMGET 2
-.Os FreeBSD
-.Sh NAME
-.Nm semget
-.Nd obtain a semaphore id
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/sem.h>
-.Ft int
-.Fn semget "key_t key" "int nsems" "int flag"
-.Sh DESCRIPTION
-Based on the values of
-.Fa key
-and
-.Fa flag ,
-.Fn semget
-returns the identifier of a newly created or previously existing
-set of semaphores.
-.\"
-.\" This is copied verbatim from the shmget manpage. Perhaps
-.\" it should go in a common manpage, such as .Xr ipc 2
-.\"
-The key
-is analogous to a filename: it provides a handle that names an
-IPC object. There are three ways to specify a key:
-.Bl -bullet
-.It
-IPC_PRIVATE may be specified, in which case a new IPC object
-will be created.
-.It
-An integer constant may be specified. If no IPC object corresponding
-to
-.Fa key
-is specified and the IPC_CREAT bit is set in
-.Fa flag ,
-a new one will be created.
-.It
-.Fn ftok
-may be used to generate a key from a pathname. See
-.Xr ftok 3 .
-.El
-.\"
-.\" Likewise for this section, except SHM_* becomes SEM_*.
-.\"
-.Pp
-The mode of a newly created IPC object is determined by
-.Em OR Ns 'ing
-the following constants into the
-.Fa flag
-parameter:
-.Bl -tag -width XSEM_WXX6XXX
-.It Dv SEM_R
-Read access for user.
-.It Dv SEM_A
-Alter access for user.
-.It Dv (SEM_R>>3)
-Read access for group.
-.It Dv (SEM_A>>3)
-Alter access for group.
-.It Dv (SEM_R>>6)
-Read access for other.
-.It Dv (SEM_A>>6)
-Alter access for other.
-.El
-.Pp
-If a new set of semaphores is being created,
-.Fa nsems
-is used to indicate the number of semaphores the set should contain.
-Otherwise,
-.Fa nsems
-may be specified as 0.
-.Sh RETURN VALUES
-.Fn Semget
-returns the id of a semaphore set if successful; otherwise, -1
-is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Semget
-will fail if:
-.Bl -tag -width Er
-.\" ipcperm could fail (we're opening to read and write, as it were)
-.It Bq Er EACCES
-Access permission failure.
-.\"
-.\" sysv_sem.c is quite explicit about these, so I'm pretty sure
-.\" this is accurate
-.\"
-.It Bq Er EEXIST
-IPC_CREAT and IPC_EXCL were specified, and a semaphore set
-corresponding to
-.Fa key
-already exists.
-.It Bq Er EINVAL
-The number of semaphores requested exceeds the system imposed maximum
-per set.
-.It Bq Er ENOSPC
-Insufficiently many semaphores are available.
-.It Bq Er ENOSPC
-The kernel could not allocate a
-.Fa "struct semid_ds" .
-.It Bq Er ENOENT
-No semaphore set was found corresponding to
-.Fa key ,
-and IPC_CREAT was not specified.
-.Sh SEE ALSO
-.Xr semctl 2 ,
-.Xr semop 2 ,
-.Xr ftok 3
diff --git a/lib/libc/sys/semop.2 b/lib/libc/sys/semop.2
deleted file mode 100644
index 06dfa3b..0000000
--- a/lib/libc/sys/semop.2
+++ /dev/null
@@ -1,192 +0,0 @@
-.\"
-.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com>
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: semop.2,v 1.5 1997/02/22 15:04:21 peter Exp $
-.\"
-.Dd September 22, 1995
-.Dt SEMOP 2
-.Os FreeBSD
-.Sh NAME
-.Nm semop
-.Nd atomic array of operations on a semaphore set
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/sem.h>
-.Ft int
-.Fn semop "int semid" "struct sembuf array[]" "unsigned nops"
-.Sh DESCRIPTION
-.Fn Semop
-atomically performs the array of operations indicated by
-.Fa array
-on the semaphore set indicated by
-.Fa semid .
-The length of
-.Fa array
-is indicated by
-.Fa nops .
-Each operation is encoded in a
-.Fa "struct sembuf" ,
-which is defined as follows:
-.Bd -literal
-.\"
-.\" From <sys/sem.h>
-.\"
-struct sembuf {
- u_short sem_num; /* semaphore # */
- short sem_op; /* semaphore operation */
- short sem_flg; /* operation flags */
-};
-.Ed
-.Pp
-For each element in
-.Fa array ,
-.Fa sem_op
-and
-.Fa sem_flg
-determine an operation to be performed on semaphore number
-.Fa sem_num
-in the set. The values SEM_UNDO and IPC_NOWAIT may be
-.Em OR Ns 'ed
-into the
-.Fa sem_flg
-member in order to modify the behavior of the given operation.
-.Pp
-The operation performed depends as follows on the value of
-.Fa sem_op :
-.\"
-.\" This section is based on the description of semop() in
-.\" Stevens, _Advanced Programming in the UNIX Environment_.
-.\"
-.Bl -bullet
-.It
-When
-.Fa sem_op
-is positive, the semaphore's value is incremented by
-.Fa sem_op Ns 's
-value. If SEM_UNDO is specified, the semaphore's adjust on exit
-value is decremented by
-.Fa sem_op Ns 's
-value. A positive value for
-.Fa sem_op
-generally corresponds to a process releasing a resource
-associated with the semaphore.
-.It
-The behavior when
-.Fa sem_op
-is negative depends on the current value of the semaphore:
-.Bl -bullet
-.It
-If the current value of the semaphore is greater than or equal to
-the absolute value of
-.Fa sem_op ,
-then the value is decremented by the absolute value of
-.Fa sem_op .
-If SEM_UNDO is specified, the semaphore's adjust on exit
-value is incremented by the absolute value of
-.Fa sem_op .
-.It
-If the current value of the semaphore is less than
-.Fa sem_op Ns 's
-value, one of the following happens:
-.\" XXX a *second* sublist?
-.Bl -bullet
-.It
-If IPC_NOWAIT was specified, then
-.Fn semop
-returns immediately with a return value of EAGAIN.
-.It
-If some other process has removed the semaphore with the IPC_RMID
-option of
-.Fn semctl ,
-then
-.Fn semop
-returns immediately with a return value of EINVAL.
-.It
-Otherwise, the calling process is put to sleep until the semaphore's
-value is greater than or equal to the absolute value of
-.Fa sem_op .
-When this condition becomes true, the semaphore's value is decremented
-by the absolute value of
-.Fa sem_op ,
-and the semaphore's adjust on exit value is incremented by the
-absolute value of
-.Fa sem_op .
-.El
-.Pp
-A negative value for
-.Fa sem_op
-generally means that a process is waiting for a resource to become
-available.
-.El
-.Pp
-.It
-When
-.Fa sem_op
-is zero, the process waits for the semaphore's value to become zero.
-If it is already zero, the call to
-.Fn semop
-can return immediately. Otherwise, the calling process is put to
-sleep until the semaphore's value becomes zero.
-.El
-.Pp
-For each semaphore a process has in use, the kernel maintains an
-`adjust on exit' value, as alluded to earlier. When a process
-exits, either voluntarily or involuntarily, the adjust on exit value
-for each semaphore is added to the semaphore's value. This can
-be used to insure that a resource is released if a process terminates
-unexpectedly.
-.Sh RETURN VALUES
-On success,
-.Fn semop
-returns 0; otherwise, -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Semop
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-No semaphore set corresponds to
-.Fa semid .
-.It Bq Er EACCES
-Permission denied due to mismatch between operation and mode of
-semaphore set.
-.It Bq Er EAGAIN
-The semaphore's value was less than
-.Fa sem_op ,
-and IPC_NOWAIT was specified.
-.It Bq Er E2BIG
-Too many operations were specified.
-.It Bq Er EFBIG
-.\"
-.\" I'd have thought this would be EINVAL, but the source says
-.\" EFBIG.
-.\"
-.Fa sem_num
-was not in the range of valid semaphores for the set.
-.Sh SEE ALSO
-.Xr semctl 2 ,
-.Xr semget 2
diff --git a/lib/libc/sys/send.2 b/lib/libc/sys/send.2
deleted file mode 100644
index 57fcfb3..0000000
--- a/lib/libc/sys/send.2
+++ /dev/null
@@ -1,185 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)send.2 8.2 (Berkeley) 2/21/94
-.\" $Id$
-.\"
-.Dd February 15, 1995
-.Dt SEND 2
-.Os BSD 4.2
-.Sh NAME
-.Nm send ,
-.Nm sendto ,
-.Nm sendmsg
-.Nd send a message from a socket
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft ssize_t
-.Fn send "int s" "const void *msg" "size_t len" "int flags"
-.Ft ssize_t
-.Fn sendto "int s" "const void *msg" "size_t len" "int flags" "const struct sockaddr *to" "int tolen"
-.Ft ssize_t
-.Fn sendmsg "int s" "const struct msghdr *msg" "int flags"
-.Sh DESCRIPTION
-.Fn Send ,
-.Fn sendto ,
-and
-.Fn sendmsg
-are used to transmit a message to another socket.
-.Fn Send
-may be used only when the socket is in a
-.Em connected
-state, while
-.Fn sendto
-and
-.Fn sendmsg
-may be used at any time.
-.Pp
-The address of the target is given by
-.Fa to
-with
-.Fa tolen
-specifying its size.
-The length of the message is given by
-.Fa len .
-If the message is too long to pass atomically through the
-underlying protocol, the error
-.Er EMSGSIZE
-is returned, and
-the message is not transmitted.
-.Pp
-No indication of failure to deliver is implicit in a
-.Fn send .
-Locally detected errors are indicated by a return value of -1.
-.Pp
-If no messages space is available at the socket to hold
-the message to be transmitted, then
-.Fn send
-normally blocks, unless the socket has been placed in
-non-blocking I/O mode.
-The
-.Xr select 2
-call may be used to determine when it is possible to
-send more data.
-.Pp
-The
-.Fa flags
-parameter may include one or more of the following:
-.Bd -literal
-#define MSG_OOB 0x1 /* process out-of-band data */
-#define MSG_PEEK 0x2 /* peek at incoming message */
-#define MSG_DONTROUTE 0x4 /* bypass routing, use direct interface */
-#define MSG_EOR 0x8 /* data completes record */
-#define MSG_EOF 0x100 /* data completes transaction */
-.Ed
-.Pp
-The flag
-.Dv MSG_OOB
-is used to send
-.Dq out-of-band
-data on sockets that support this notion (e.g.
-.Dv SOCK_STREAM ) ;
-the underlying protocol must also support
-.Dq out-of-band
-data.
-.Dv MSG_EOR
-is used to indicate a record mark for protocols which support the
-concept.
-.Dv MSG_EOF
-requests that the sender side of a socket be shut down, and that an
-appropriate indication be sent at the end of the specified data;
-this flag is only implemented for
-.Dv SOCK_STREAM
-sockets in the
-.Dv PF_INET
-protocol family, and is used to implement Transaction
-.Tn TCP
-(see
-.Xr ttcp 4 ) .
-.Dv MSG_DONTROUTE
-is usually used only by diagnostic or routing programs.
-.Pp
-See
-.Xr recv 2
-for a description of the
-.Fa msghdr
-structure.
-.Sh RETURN VALUES
-The call returns the number of characters sent, or -1
-if an error occurred.
-.Sh ERRORS
-.Fn Send ,
-.Fn sendto ,
-and
-.Fn sendmsg
-fail if:
-.Bl -tag -width Er
-.It Bq Er EBADF
-An invalid descriptor was specified.
-.It Bq Er EACCES
-The destination address is a broadcast address, and
-.Dv SO_BROADCAST
-has not been set on the socket.
-.It Bq Er ENOTSOCK
-The argument
-.Fa s
-is not a socket.
-.It Bq Er EFAULT
-An invalid user space address was specified for a parameter.
-.It Bq Er EMSGSIZE
-The socket requires that message be sent atomically,
-and the size of the message to be sent made this impossible.
-.It Bq Er EAGAIN
-The socket is marked non-blocking and the requested operation
-would block.
-.It Bq Er ENOBUFS
-The system was unable to allocate an internal buffer.
-The operation may succeed when buffers become available.
-.It Bq Er ENOBUFS
-The output queue for a network interface was full.
-This generally indicates that the interface has stopped sending,
-but may be caused by transient congestion.
-.It Bq Er EHOSTUNREACH
-The remote host was unreachable.
-.El
-.Sh SEE ALSO
-.Xr fcntl 2 ,
-.Xr getsockopt 2 ,
-.Xr recv 2 ,
-.Xr select 2 ,
-.Xr socket 2 ,
-.Xr write 2
-.Sh HISTORY
-The
-.Fn send
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/setgroups.2 b/lib/libc/sys/setgroups.2
deleted file mode 100644
index bce9e1a..0000000
--- a/lib/libc/sys/setgroups.2
+++ /dev/null
@@ -1,83 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setgroups.2 8.2 (Berkeley) 4/16/94
-.\"
-.Dd April 16, 1994
-.Dt SETGROUPS 2
-.Os BSD 4.2
-.Sh NAME
-.Nm setgroups
-.Nd set group access list
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <unistd.h>
-.Ft int
-.Fn setgroups "int ngroups" "const gid_t *gidset"
-.Sh DESCRIPTION
-.Fn Setgroups
-sets the group access list of the current user process
-according to the array
-.Fa gidset .
-The parameter
-.Fa ngroups
-indicates the number of entries in the array and must be no
-more than
-.Dv NGROUPS ,
-as defined in
-.Ao Pa sys/param.h Ac .
-.Pp
-Only the super-user may set new groups.
-.Sh RETURN VALUES
-A 0 value is returned on success, -1 on error, with
-an error code stored in
-.Va errno .
-.Sh ERRORS
-The
-.Fn setgroups
-call will fail if:
-.Bl -tag -width Er
-.It Bq Er EPERM
-The caller is not the super-user.
-.It Bq Er EFAULT
-The address specified for
-.Fa gidset
-is outside the process
-address space.
-.El
-.Sh SEE ALSO
-.Xr getgroups 2 ,
-.Xr initgroups 3
-.Sh HISTORY
-The
-.Fn setgroups
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/setpgid.2 b/lib/libc/sys/setpgid.2
deleted file mode 100644
index 3b29620..0000000
--- a/lib/libc/sys/setpgid.2
+++ /dev/null
@@ -1,90 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setpgid.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SETPGID 2
-.Os BSD 4
-.Sh NAME
-.Nm setpgid ,
-.Nm setpgrp
-.Nd set process group
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn setpgid "pid_t pid" "pid_t pgrp"
-.Ft int
-.Fn setpgrp "pid_t pid" "pid_t pgrp"
-.Sh DESCRIPTION
-.Fn Setpgid
-sets the process group of the specified process
-.Ar pid
-to the specified
-.Ar pgrp .
-If
-.Ar pid
-is zero, then the call applies to the current process.
-.Pp
-If the invoker is not the super-user, then the affected process
-must have the same effective user-id as the invoker or be a descendant
-of the invoking process.
-.Sh RETURN VALUES
-.Fn Setpgid
-returns 0 when the operation was successful.
-If the request failed, -1 is returned and the global variable
-.Va errno
-indicates the reason.
-.Sh ERRORS
-.Fn Setpgid
-will fail and the process group will not be altered if:
-.Bl -tag -width indent
-.It Bq Er ESRCH
-The requested process does not exist.
-.It Bq Er EPERM
-The effective user ID of the requested process is different
-from that of the caller and the process is not a descendent
-of the calling process.
-.El
-.Sh SEE ALSO
-.Xr getpgrp 2
-.Sh STANDARDS
-The
-.Fn setpgid
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh COMPATIBILITY
-.Fn Setpgrp
-is identical to
-.Fn setpgid ,
-and is retained for calling convention compatibility with historical
-versions of
-.Bx .
diff --git a/lib/libc/sys/setregid.2 b/lib/libc/sys/setregid.2
deleted file mode 100644
index 0b8343b..0000000
--- a/lib/libc/sys/setregid.2
+++ /dev/null
@@ -1,92 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setregid.2 8.2 (Berkeley) 4/16/94
-.\"
-.Dd April 16, 1994
-.Dt SETREGID 2
-.Os BSD 4.2
-.Sh NAME
-.Nm setregid
-.Nd set real and effective group ID
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn setregid "gid_t rgid" "gid_t egid"
-.Sh DESCRIPTION
-The real and effective group ID's of the current process
-are set to the arguments.
-Unprivileged users may change the real group
-ID to the effective group ID and vice-versa; only the super-user may
-make other changes.
-.Pp
-Supplying a value of -1 for either the real or effective
-group ID forces the system to substitute the current
-ID in place of the -1 parameter.
-.Pp
-The
-.Fn setregid
-function was intended to allow swapping
-the real and effective group IDs
-in set-group-ID programs to temporarily relinquish the set-group-ID value.
-This function did not work correctly,
-and its purpose is now better served by the use of the
-.Fn setegid
-function (see
-.Xr setuid 2 ) .
-.Pp
-When setting the real and effective group IDs to the same value,
-the standard
-.Fn setgid
-function is preferred.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Bl -tag -width [EPERM]
-.It Bq Er EPERM
-The current process is not the super-user and a change
-other than changing the effective group-id to the real group-id
-was specified.
-.El
-.Sh SEE ALSO
-.Xr getgid 2 ,
-.Xr issetugid 2 ,
-.Xr setegid 2 ,
-.Xr setgid 2 ,
-.Xr setuid 2
-.Sh HISTORY
-The
-.Fn setregid
-system call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/setreuid.2 b/lib/libc/sys/setreuid.2
deleted file mode 100644
index 1736879..0000000
--- a/lib/libc/sys/setreuid.2
+++ /dev/null
@@ -1,90 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setreuid.2 8.2 (Berkeley) 4/16/94
-.\"
-.Dd April 16, 1994
-.Dt SETREUID 2
-.Os BSD 4
-.Sh NAME
-.Nm setreuid
-.Nd set real and effective user ID's
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn setreuid "uid_t ruid" "uid_t euid"
-.Sh DESCRIPTION
-The real and effective user IDs of the
-current process are set according to the arguments.
-If
-.Fa ruid
-or
-.Fa euid
-is -1, the current uid is filled in by the system.
-Unprivileged users may change the real user
-ID to the effective user ID and vice-versa; only the super-user may
-make other changes.
-.Pp
-The
-.Fn setreuid
-function has been used to swap the real and effective user IDs
-in set-user-ID programs to temporarily relinquish the set-user-ID value.
-This purpose is now better served by the use of the
-.Fn seteuid
-function (see
-.Xr setuid 2 ) .
-.Pp
-When setting the real and effective user IDs to the same value,
-the standard
-.Fn setuid
-function is preferred.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Bl -tag -width [EPERM]
-.It Bq Er EPERM
-The current process is not the super-user and a change
-other than changing the effective user-id to the real user-id
-was specified.
-.El
-.Sh SEE ALSO
-.Xr getuid 2 ,
-.Xr issetugid 2 ,
-.Xr seteuid 2 ,
-.Xr setuid 2
-.Sh HISTORY
-The
-.Fn setreuid
-system call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/setsid.2 b/lib/libc/sys/setsid.2
deleted file mode 100644
index c85980a..0000000
--- a/lib/libc/sys/setsid.2
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setsid.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SETSID 2
-.Os
-.Sh NAME
-.Nm setsid
-.Nd create session and set process group ID
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft pid_t
-.Fn setsid void
-.Sh DESCRIPTION
-The
-.Fn setsid
-function creates a new session.
-The calling process is the session leader of the new session, is the
-process group leader of a new process group and has no controlling
-terminal.
-The calling process is the only process in either the session or the
-process group.
-.Sh RETURN VALUES
-Upon successful completion, the
-.Fn setsid
-function returns the value of the process group ID of the new process
-group, which is the same as the process ID of the calling process.
-If an error occurs,
-.Fn setsid
-returns -1 and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn setsid
-function will fail if:
-.Bl -tag -width Er
-.It Bq Er EPERM
-The calling process is already a process group leader, or the process
-group ID of a process other than the calling process matches the process
-ID of the calling process.
-.El
-.Sh SEE ALSO
-.Xr setpgid 2 ,
-.Xr tcgetpgrp 3 ,
-.Xr tcsetpgrp 3
-.Sh STANDARDS
-The
-.Fn setsid
-function is expected to be compliant with the
-.St -p1003.1-90
-specification.
diff --git a/lib/libc/sys/setuid.2 b/lib/libc/sys/setuid.2
deleted file mode 100644
index 1f24fb0..0000000
--- a/lib/libc/sys/setuid.2
+++ /dev/null
@@ -1,161 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)setuid.2 8.1 (Berkeley) 6/4/93
-.\" $Id: setuid.2,v 1.10 1997/04/01 18:58:38 mpp Exp $
-.\"
-.Dd June 4, 1993
-.Dt SETUID 2
-.Os BSD 4.2
-.Sh NAME
-.Nm setuid ,
-.Nm seteuid ,
-.Nm setgid ,
-.Nm setegid ,
-.Nd set user and group ID
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <unistd.h>
-.Ft int
-.Fn setuid "uid_t uid"
-.Ft int
-.Fn seteuid "uid_t euid"
-.Ft int
-.Fn setgid "gid_t gid"
-.Ft int
-.Fn setegid "gid_t egid"
-.Sh DESCRIPTION
-The
-.Fn setuid
-function
-sets the real and effective
-user IDs and the saved set-user-ID of the current process
-to the specified value.
-.\" Comment out next block for !_POSIX_SAVED_IDS
-.\" The real user ID and the saved set-user-ID are changed only if the
-.\" effective user ID is that of the super user.
-.\" I.e.
-.\" .Fn setuid
-.\" function is equal to
-.\" .Fn seteuid
-.\" function if the effective user ID is not that of the super user.
-.\" End of block
-The
-.Fn setuid
-function is permitted if the specified ID is equal to the real user ID
-.\" Comment out next line for !_POSIX_SAVED_IDS
-.\" or the saved set-user-ID
-.\" Next line is for Appendix B.4.2.2 case.
-or the effective user ID
-of the process, or if the effective user ID is that of the super user.
-.Pp
-The
-.Fn setgid
-function
-sets the real and effective
-group IDs and the saved set-group-ID of the current process
-to the specified value.
-.\" Comment out next block for !_POSIX_SAVED_IDS
-.\" The real group ID and the saved set-group-ID are changed only if the
-.\" effective user ID is that of the super user.
-.\" I.e.
-.\" .Fn setgid
-.\" function is equal to
-.\" .Fn setegid
-.\" function if the effective user ID is not that of the super user.
-.\" End of block
-The
-.Fn setgid
-function is permitted if the specified ID is equal to the real group ID
-.\" Comment out next line for !_POSIX_SAVED_IDS
-.\" or the saved set-groupd-ID
-.\" Next line is for Appendix B.4.2.2 case.
-or the effective group ID
-of the process, or if the effective user ID is that of the super user.
-.Pp
-The
-.Fn seteuid
-function
-.Pq Fn setegid
-sets the effective user ID (group ID) of the
-current process.
-The effective user ID may be set to the value
-of the real user ID or the saved set-user-ID (see
-.Xr intro 2
-and
-.Xr execve 2 ) ;
-in this way, the effective user ID of a set-user-ID executable
-may be toggled by switching to the real user ID, then re-enabled
-by reverting to the set-user-ID value.
-Similarly, the effective group ID may be set to the value
-of the real group ID or the saved set-user-ID.
-.Pp
-.Sh RETURN VALUES
-Upon success, these functions return 0;
-otherwise \-1 is returned.
-.Pp
-If the user is not the super user, or the uid
-specified is not the real, effective ID, or saved ID,
-these functions return \-1.
-.Sh SEE ALSO
-.Xr getgid 2 ,
-.Xr getuid 2 ,
-.Xr issetugid 2 ,
-.Xr setregid 2 ,
-.Xr setreuid 2
-.Sh STANDARDS
-The
-.Fn setuid
-and
-.Fn setgid
-functions are compliant with the
-.St -p1003.1-90
-specification with
-.Li _POSIX_SAVED_IDS
-.\" Uncomment next line for !_POSIX_SAVED_IDS
-not
-defined with the permitted extensions from Appendix B.4.2.2.
-The
-.Fn seteuid
-and
-.Fn setegid
-functions are extensions based on the
-.Tn POSIX
-concept of
-.Li _POSIX_SAVED_IDS ,
-and have been proposed for a future revision of the standard.
-.Sh HISTORY
-A
-.Fn setuid
-and a
-.Fn setgid
-function calls appeared in
-.At v7 .
diff --git a/lib/libc/sys/shmat.2 b/lib/libc/sys/shmat.2
deleted file mode 100644
index e3f87c9..0000000
--- a/lib/libc/sys/shmat.2
+++ /dev/null
@@ -1,110 +0,0 @@
-.\"
-.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com>
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: shmat.2,v 1.5 1997/02/22 15:04:25 peter Exp $
-.\"
-.Dd August 2, 1995
-.Dt SHMAT 2
-.Os FreeBSD
-.Sh NAME
-.Nm shmat ,
-.Nm shmdt
-.Nd attach or detach shared memory
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/shm.h>
-.Ft void *
-.Fn shmat "int shmid" "void *addr" "int flag"
-.Ft int
-.Fn shmdt "void *addr"
-.Sh DESCRIPTION
-.Fn Shmat
-attaches the shared memory segment identified by
-.Fa shmid
-to the calling process's address space. The address where the segment
-is attached is determined as follows:
-.\"
-.\" These are cribbed almost exactly from Stevens, _Advanced Programming in
-.\" the UNIX Environment_.
-.\"
-.Bl -bullet
-.It
-If
-.Fa addr
-is 0, the segment is attached at an address selected by the
-kernel.
-.It
-If
-.Fa addr
-is nonzero and SHM_RND is not specified in
-.Fa flag ,
-the segment is attached the specified address.
-.It
-If
-.Fa addr
-is specified and SHM_RND is specified,
-.Fa addr
-is rounded down to the nearest multiple of SHMLBA.
-.El
-.Pp
-.Fn Shmdt
-detaches the shared memory segment at the address specified by
-.Fa addr
-from the calling process's address space.
-.Sh RETURN VALUES
-Upon success,
-.Fn shmat
-returns the address where the segment is attached; otherwise, -1
-is returned and
-.Va errno
-is set to indicate the error.
-.Pp
-Upon success,
-.Fn shmdt
-returns 0; otherwise, -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Shmat
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-No shared memory segment was found corresponding to
-.Fa shmid .
-.It Bq Er EINVAL
-.Fa addr
-was not an acceptable address.
-.El
-.Pp
-.Fn Shmdt
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa addr
-does not point to a shared memory segment.
-.Sh "SEE ALSO"
-.Xr shmctl 2 ,
-.Xr shmget 2
diff --git a/lib/libc/sys/shmctl.2 b/lib/libc/sys/shmctl.2
deleted file mode 100644
index 56145e5..0000000
--- a/lib/libc/sys/shmctl.2
+++ /dev/null
@@ -1,136 +0,0 @@
-.\"
-.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com>
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: shmctl.2,v 1.6 1997/03/18 23:57:31 bde Exp $
-.\"
-.Dd July 17, 1995
-.Dt SHMCTL 2
-.Os FreeBSD
-.Sh NAME
-.Nm shmctl
-.Nd shared memory control
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/shm.h>
-.Ft int
-.Fn shmctl "int shmid" "int cmd" "struct shmid_ds *buf"
-.Sh DESCRIPTION
-Performs the action specified by
-.Fa cmd
-on the shared memory segment identified by
-.Fa shmid :
-.Bl -tag -width SHM_UNLOCKX
-.It Dv IPC_STAT
-Fetch the segment's
-.Fa "struct shmid_ds" ,
-storing it in the memory pointed to by
-.Fa buf .
-.\"
-.\" XXX need to make sure that this is correct for FreeBSD
-.\"
-.It Dv IPC_SET
-Changes the
-.Fa shm_perm.uid ,
-.Fa shm_perm.gid ,
-and
-.Fa shm_perm.mode
-members of the segment's
-.Fa "struct shmid_ds"
-to match those of the struct pointed to by
-.Fa buf .
-The calling process's effective uid must
-match either
-.Fa shm_perm.uid
-or
-.Fa shm_perm.cuid ,
-or it must have superuser privileges.
-.It Dv IPC_RMID
-Removes the segment from the system. The removal will not take
-effect until all processes having attached the segment have exited;
-however, once the IPC_RMID operation has taken place, no further
-processes will be allowed to attach the segment. For the operation
-to succeed, the calling process's effective uid must match
-.Fa shm_perm.uid
-or
-.Fa shm_perm.cuid ,
-or the process must have superuser privileges.
-.\" .It Dv SHM_LOCK
-.\" Locks the segment in memory. The calling process must have
-.\" superuser privileges. Not implemented in FreeBSD.
-.\" .It Dv SHM_UNLOCK
-.\" Unlocks the segment from memory. The calling process must
-.\" have superuser privileges. Not implemented in FreeBSD.
-.El
-.Pp
-The
-.Fa shmid_ds
-struct is defined as follows:
-.\"
-.\" I fiddled with the spaces a bit to make it fit well when viewed
-.\" with nroff, but otherwise it's straight from sys/shm.h
-.\"
-.Bd -literal
-struct shmid_ds {
- struct ipc_perm shm_perm; /* operation permission structure */
- int shm_segsz; /* size of segment in bytes */
- pid_t shm_lpid; /* process ID of last shared memory op */
- pid_t shm_cpid; /* process ID of creator */
- short shm_nattch; /* number of current attaches */
- time_t shm_atime; /* time of last shmat() */
- time_t shm_dtime; /* time of last shmdt() */
- time_t shm_ctime; /* time of last change by shmctl() */
- void *shm_internal; /* sysv stupidity */
-};
-.Ed
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn shmctl
-returns 0. Otherwise, it returns -1 and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Shmctl
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-Invalid operation, or
-no shared memory segment was found corresponding to
-.Fa shmid .
-.\"
-.\" XXX I think the following is right: ipcperm() only returns EPERM
-.\" when an attempt is made to modify (IPC_M) by a non-creator
-.\" non-owner
-.It Bq Er EPERM
-The calling process's effective uid does not match the uid of
-the shared memory segment's owner or creator.
-.It Bq Er EACCES
-Permission denied due to mismatch between operation and mode of
-shared memory segment.
-.Sh "SEE ALSO"
-.Xr shmat 2 ,
-.Xr shmdt 2 ,
-.Xr shmget 2 ,
-.Xr ftok 3
diff --git a/lib/libc/sys/shmget.2 b/lib/libc/sys/shmget.2
deleted file mode 100644
index 1f8da15..0000000
--- a/lib/libc/sys/shmget.2
+++ /dev/null
@@ -1,138 +0,0 @@
-.\"
-.\" Copyright (c) 1995 David Hovemeyer <daveho@infocom.com>
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: shmget.2,v 1.5 1997/02/22 15:04:26 peter Exp $
-.\"
-.Dd July 3, 1995
-.Dt SHMGET 2
-.Os FreeBSD
-.Sh NAME
-.Nm shmget
-.Nd obtain a shared memory identifier
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Fd #include <sys/shm.h>
-.Ft int
-.Fn shmget "key_t key" "int size" "int flag"
-.Sh DESCRIPTION
-Based on the values of
-.Fa key
-and
-.Fa flag ,
-.Fn shmget
-returns the identifier of a newly created or previously existing shared
-memory segment.
-.\"
-.\" The following bit about keys and modes also applies to semaphores
-.\" and message queues.
-.\"
-The key
-is analogous to a filename: it provides a handle that names an
-IPC object. There are three ways to specify a key:
-.Bl -bullet
-.It
-IPC_PRIVATE may be specified, in which case a new IPC object
-will be created.
-.It
-An integer constant may be specified. If no IPC object corresponding
-to
-.Fa key
-is specified and the IPC_CREAT bit is set in
-.Fa flag ,
-a new one will be created.
-.It
-.Fn ftok
-may be used to generate a key from a pathname. See
-.Xr ftok 3 .
-.El
-.Pp
-The mode of a newly created IPC object is determined by
-.Em OR Ns 'ing
-the following constants into the
-.Fa flag
-parameter:
-.Bl -tag -width XSHM_WXX6XXX
-.It Dv SHM_R
-Read access for user.
-.It Dv SHM_W
-Write access for user.
-.It Dv (SHM_R>>3)
-Read access for group.
-.It Dv (SHM_W>>3)
-Write access for group.
-.It Dv (SHM_R>>6)
-Read access for other.
-.It Dv (SHM_W>>6)
-Write access for other.
-.El
-.\"
-.\" XXX - we should also mention how uid, euid, and gid affect ownership
-.\" and use
-.\"
-.\" end section about keys and modes
-.\"
-.Pp
-When creating a new shared memory segment,
-.Fa size
-indicates the desired size of the new segment in bytes. The size
-of the segment may be rounded up to a multiple convenient to the
-kernel (i.e., the page size).
-.Sh RETURN VALUES
-Upon successful completion,
-.Fn shmget
-returns the positive integer identifier of a shared memory segment.
-Otherwise, -1 is returned and
-.Va errno
-set to indicate the error.
-.Sh ERRORS
-.Fn Shmget
-will fail if:
-.Bl -tag -width Er
-.\"
-.\" XXX What about ipcperm failing?
-.\"
-.It Bq Er EINVAL
-Size specified is greater than the size of the previously existing segment.
-Size specified is less than the system imposed minimum, or greater than
-the system imposed maximum.
-.It Bq Er ENOENT
-No shared memory segment was found matching
-.Fa key ,
-and IPC_CREAT was not specified.
-.It Bq Er ENOSPC
-The kernel was unable to allocate enough memory to
-satisfy the request.
-.It Bq Er EEXIST
-IPC_CREAT and IPC_EXCL were specified, and a shared memory segment
-corresponding to
-.Fa key
-already exists.
-.Pp
-.Sh "SEE ALSO"
-.Xr shmat 2 ,
-.Xr shmctl 2 ,
-.Xr shmdt 2 ,
-.Xr ftok 3
diff --git a/lib/libc/sys/shutdown.2 b/lib/libc/sys/shutdown.2
deleted file mode 100644
index b83763f..0000000
--- a/lib/libc/sys/shutdown.2
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)shutdown.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SHUTDOWN 2
-.Os BSD 4.2
-.Sh NAME
-.Nm shutdown
-.Nd shut down part of a full-duplex connection
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn shutdown "int s" "int how"
-.Sh DESCRIPTION
-The
-.Fn shutdown
-call causes all or part of a full-duplex connection on
-the socket associated with
-.Fa s
-to be shut down.
-If
-.Fa how
-is 0, further receives will be disallowed.
-If
-.Fa how
-is 1, further sends will be disallowed.
-If
-.Fa how
-is 2, further sends and receives will be disallowed.
-.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
-.Sh ERRORS
-The call succeeds unless:
-.Bl -tag -width ENOTCONNAA
-.It Bq Er EBADF
-.Fa S
-is not a valid descriptor.
-.It Bq Er ENOTSOCK
-.Fa S
-is a file, not a socket.
-.It Bq Er ENOTCONN
-The specified socket is not connected.
-.El
-.Sh SEE ALSO
-.Xr connect 2 ,
-.Xr socket 2
-.Sh HISTORY
-The
-.Fn shutdown
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2
deleted file mode 100644
index 6bd3246..0000000
--- a/lib/libc/sys/sigaction.2
+++ /dev/null
@@ -1,410 +0,0 @@
-.\" Copyright (c) 1980, 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94
-.\" $Id: sigaction.2,v 1.14 1997/09/13 19:43:24 joerg Exp $
-.\"
-.Dd April 3, 1994
-.Dt SIGACTION 2
-.Os
-.Sh NAME
-.Nm sigaction
-.Nd software signal facilities
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Bd -literal
-struct sigaction {
- void (*sa_handler)(); /* signal handler */
- sigset_t sa_mask; /* signal mask to apply */
- int sa_flags; /* see signal options below */
-};
-.Ed
-.Ft int
-.Fn sigaction "int sig" "const struct sigaction *act" "struct sigaction *oact"
-.Sh DESCRIPTION
-The system defines a set of signals that may be delivered to a process.
-Signal delivery resembles the occurrence of a hardware interrupt:
-the signal is normally blocked from further occurrence, the current process
-context is saved, and a new one is built. A process may specify a
-.Em handler
-to which a signal is delivered, or specify that a signal is to be
-.Em ignored .
-A process may also specify that a default action is to be taken
-by the system when a signal occurs.
-A signal may also be
-.Em blocked ,
-in which case its delivery is postponed until it is
-.Em unblocked .
-The action to be taken on delivery is determined at the time
-of delivery.
-Normally, signal handlers execute on the current stack
-of the process. This may be changed, on a per-handler basis,
-so that signals are taken on a special
-.Em "signal stack" .
-.Pp
-Signal routines normally execute with the signal that caused their
-invocation
-.Em blocked ,
-but other signals may yet occur.
-A global
-.Em "signal mask"
-defines the set of signals currently blocked from delivery
-to a process. The signal mask for a process is initialized
-from that of its parent (normally empty). It
-may be changed with a
-.Xr sigprocmask 2
-call, or when a signal is delivered to the process.
-.Pp
-When a signal
-condition arises for a process, the signal is added to a set of
-signals pending for the process.
-If the signal is not currently
-.Em blocked
-by the process then it is delivered to the process.
-Signals may be delivered any time a process enters the operating system
-(e.g., during a system call, page fault or trap, or clock interrupt).
-If multiple signals are ready to be delivered at the same time,
-any signals that could be caused by traps are delivered first.
-Additional signals may be processed at the same time, with each
-appearing to interrupt the handlers for the previous signals
-before their first instructions.
-The set of pending signals is returned by the
-.Xr sigpending 2
-function.
-When a caught signal
-is delivered, the current state of the process is saved,
-a new signal mask is calculated (as described below),
-and the signal handler is invoked. The call to the handler
-is arranged so that if the signal handling routine returns
-normally the process will resume execution in the context
-from before the signal's delivery.
-If the process wishes to resume in a different context, then it
-must arrange to restore the previous context itself.
-.Pp
-When a signal is delivered to a process a new signal mask is
-installed for the duration of the process' signal handler
-(or until a
-.Xr sigprocmask
-call is made).
-This mask is formed by taking the union of the current signal mask set,
-the signal to be delivered, and
-the signal mask associated with the handler to be invoked.
-.Pp
-.Fn Sigaction
-assigns an action for a signal specified by
-.Fa sig .
-If
-.Fa act
-is non-zero, it
-specifies an action
-.Pf ( Dv SIG_DFL ,
-.Dv SIG_IGN ,
-or a handler routine) and mask
-to be used when delivering the specified signal.
-If
-.Fa oact
-is non-zero, the previous handling information for the signal
-is returned to the user.
-.Pp
-Once a signal handler is installed, it normally remains installed
-until another
-.Fn sigaction
-call is made, or an
-.Xr execve 2
-is performed.
-A signal-specific default action may be reset by
-setting
-.Fa sa_handler
-to
-.Dv SIG_DFL .
-The defaults are process termination, possibly with core dump;
-no action; stopping the process; or continuing the process.
-See the signal list below for each signal's default action.
-If
-.Fa sa_handler
-is
-.Dv SIG_DFL ,
-the default action for the signal is to discard the signal,
-and if a signal is pending,
-the pending signal is discarded even if the signal is masked.
-If
-.Fa sa_handler
-is set to
-.Dv SIG_IGN
-current and pending instances
-of the signal are ignored and discarded.
-.Pp
-Options may be specified by setting
-.Em sa_flags .
-The meaning of the various bits is as follows:
-.Bl -tag -offset indent -width SA_RESETHANDXX
-.It Dv SA_NOCLDSTOP
-If this bit is set when installing a catching function
-for the
-.Dv SIGCHLD
-signal,
-the
-.Dv SIGCHLD
-signal will be generated only when a child process exits,
-not when a child process stops.
-.It Dv SA_NOCLDWAIT
-If this bit is set when calling
-.Fn sigaction
-for the
-.Dv SIGCHLD
-signal, the system will not create zombie processes when children of
-the calling process exit. If the calling process subsequently issues
-a
-.Xr wait 2
-(or equivalent), it blocks until all of the calling process's child
-processes terminate, and then returns a value of -1 with errno set to
-.Dv ECHILD .
-.It Dv SA_ONSTACK
-If this bit is set, the system will deliver the signal to the process
-on a
-.Em "signal stack" ,
-specified with
-.Xr sigaltstack 2 .
-.It Dv SA_NODEFER
-If this bit is set, further occurrences of the delivered signal are
-not masked during the execution of the handler.
-.It Dv SA_RESETHAND
-If this bit is set, the handler is reset back to
-.Dv SIG_DFL
-at the moment the signal is delivered.
-.\" Still missing:
-.\" .It Dv SA_SIGINFO
-.El
-.Pp
-If a signal is caught during the system calls listed below,
-the call may be forced to terminate
-with the error
-.Dv EINTR ,
-the call may return with a data transfer shorter than requested,
-or the call may be restarted.
-Restart of pending calls is requested
-by setting the
-.Dv SA_RESTART
-bit in
-.Ar sa_flags .
-The affected system calls include
-.Xr open 2 ,
-.Xr read 2 ,
-.Xr write 2 ,
-.Xr sendto 2 ,
-.Xr recvfrom 2 ,
-.Xr sendmsg 2
-and
-.Xr recvmsg 2
-on a communications channel or a slow device (such as a terminal,
-but not a regular file)
-and during a
-.Xr wait 2
-or
-.Xr ioctl 2 .
-However, calls that have already committed are not restarted,
-but instead return a partial success (for example, a short read count).
-.Pp
-After a
-.Xr fork 2
-or
-.Xr vfork 2
-all signals, the signal mask, the signal stack,
-and the restart/interrupt flags are inherited by the child.
-.Pp
-.Xr Execve 2
-reinstates the default
-action for all signals which were caught and
-resets all signals to be caught on the user stack.
-Ignored signals remain ignored;
-the signal mask remains the same;
-signals that restart pending system calls continue to do so.
-.Pp
-The following is a list of all signals
-with names as in the include file
-.Aq Pa signal.h :
-.Bl -column SIGVTALARMXX "create core imagexxx"
-.It Sy " NAME " " Default Action " " Description"
-.It Dv SIGHUP No " terminate process" " terminal line hangup"
-.It Dv SIGINT No " terminate process" " interrupt program"
-.It Dv SIGQUIT No " create core image" " quit program"
-.It Dv SIGILL No " create core image" " illegal instruction"
-.It Dv SIGTRAP No " create core image" " trace trap"
-.It Dv SIGABRT No " create core image" Xr abort 3
-call (formerly
-.Dv SIGIOT )
-.It Dv SIGEMT No " create core image" " emulate instruction executed"
-.It Dv SIGFPE No " create core image" " floating-point exception"
-.It Dv SIGKILL No " terminate process" " kill program"
-.It Dv SIGBUS No " create core image" " bus error"
-.It Dv SIGSEGV No " create core image" " segmentation violation"
-.It Dv SIGSYS No " create core image" " non-existent system call invoked"
-.It Dv SIGPIPE No " terminate process" " write on a pipe with no reader"
-.It Dv SIGALRM No " terminate process" " real-time timer expired"
-.It Dv SIGTERM No " terminate process" " software termination signal"
-.It Dv SIGURG No " discard signal" " urgent condition present on socket"
-.It Dv SIGSTOP No " stop process" " stop (cannot be caught or ignored)"
-.It Dv SIGTSTP No " stop process" " stop signal generated from keyboard"
-.It Dv SIGCONT No " discard signal" " continue after stop"
-.It Dv SIGCHLD No " discard signal" " child status has changed"
-.It Dv SIGTTIN No " stop process" " background read attempted from control terminal"
-.It Dv SIGTTOU No " stop process" " background write attempted to control terminal"
-.It Dv SIGIO No " discard signal" Tn " I/O"
-is possible on a descriptor (see
-.Xr fcntl 2 )
-.It Dv SIGXCPU No " terminate process" " cpu time limit exceeded (see"
-.Xr setrlimit 2 )
-.It Dv SIGXFSZ No " terminate process" " file size limit exceeded (see"
-.Xr setrlimit 2 )
-.It Dv SIGVTALRM No " terminate process" " virtual time alarm (see"
-.Xr setitimer 2 )
-.It Dv SIGPROF No " terminate process" " profiling timer alarm (see"
-.Xr setitimer 2 )
-.It Dv SIGWINCH No " discard signal" " Window size change"
-.It Dv SIGINFO No " discard signal" " status request from keyboard"
-.It Dv SIGUSR1 No " terminate process" " User defined signal 1"
-.It Dv SIGUSR2 No " terminate process" " User defined signal 2"
-.El
-.Sh NOTE
-The
-.Fa sa_mask
-field specified in
-.Fa act
-is not allowed to block
-.Dv SIGKILL
-or
-.Dv SIGSTOP .
-Any attempt to do so will be silently ignored.
-.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
-.Sh EXAMPLE
-The handler routine can be declared:
-.Bd -literal -offset indent
-void handler(sig, code, scp)
-int sig, code;
-struct sigcontext *scp;
-.Ed
-.Pp
-Here
-.Fa sig
-is the signal number, into which the hardware faults and traps are
-mapped.
-.Fa Code
-is a parameter that is either a constant
-or the code provided by
-the hardware.
-.Fa Scp
-is a pointer to the
-.Fa sigcontext
-structure (defined in
-.Aq Pa signal.h ) ,
-used to restore the context from before the signal.
-.Sh ERRORS
-.Fn Sigaction
-will fail and no new signal handler will be installed if one
-of the following occurs:
-.Bl -tag -width Er
-.It Bq Er EFAULT
-Either
-.Fa act
-or
-.Fa oact
-points to memory that is not a valid part of the process
-address space.
-.It Bq Er EINVAL
-.Fa Sig
-is not a valid signal number.
-.It Bq Er EINVAL
-An attempt is made to ignore or supply a handler for
-.Dv SIGKILL
-or
-.Dv SIGSTOP .
-.El
-.Sh STANDARDS
-The
-.Fn sigaction
-function call is expected to conform to
-.St -p1003.1-90 .
-The
-.Dv SA_ONSTACK
-and
-.Dv SA_RESTART
-flags are Berkeley extensions,
-as are the signals,
-.Dv SIGTRAP ,
-.Dv SIGEMT ,
-.Dv SIGBUS ,
-.Dv SIGSYS ,
-.Dv SIGURG ,
-.Dv SIGIO ,
-.Dv SIGXCPU ,
-.Dv SIGXFSZ ,
-.Dv SIGVTALRM ,
-.Dv SIGPROF ,
-.Dv SIGWINCH ,
-and
-.Dv SIGINFO .
-Those signals are available on most
-.Tn BSD Ns \-derived
-systems.
-The
-.Dv SA_NODEFER
-and
-.Dv SA_RESETHAND
-flags are intended for backwards compatability with other operating
-systems. The
-.Dv SA_NOCLDSTOP ,
-and
-.Dv SA_NOCLDWAIT
-.\" and
-.\" SA_SIGINFO
-flags are featuring options commonly found in other operating systems.
-.Sh SEE ALSO
-.Xr kill 1 ,
-.Xr kill 2 ,
-.Xr ptrace 2 ,
-.Xr sigaction 2 ,
-.Xr sigaltstack 2 ,
-.Xr sigblock 2 ,
-.Xr sigpause 2 ,
-.Xr sigpending 2 ,
-.Xr sigprocmask 2 ,
-.Xr sigsetmask 2 ,
-.Xr sigsuspend 2 ,
-.Xr sigvec 2 ,
-.Xr wait 2 ,
-.Xr setjmp 3 ,
-.Xr siginterrupt 3 ,
-.Xr sigsetops 3 ,
-.Xr tty 4
diff --git a/lib/libc/sys/sigaltstack.2 b/lib/libc/sys/sigaltstack.2
deleted file mode 100644
index 7ea6113..0000000
--- a/lib/libc/sys/sigaltstack.2
+++ /dev/null
@@ -1,166 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigaltstack.2 8.2 (Berkeley) 5/1/95
-.\" $Id: sigaltstack.2,v 1.7 1997/03/12 16:23:36 mpp Exp $
-.\"
-.Dd May 1, 1995
-.Dt SIGALTSTACK 2
-.Os BSD 4.2
-.Sh NAME
-.Nm sigaltstack
-.Nd set and/or get signal stack context
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <signal.h>
-.Bd -literal
-struct sigaltstack {
- char *ss_sp;
- long ss_size;
- int ss_flags;
-};
-.Ed
-.Ft int
-.Fn sigaltstack "const struct sigaltstack *ss" "struct sigaltstack *oss"
-.Sh DESCRIPTION
-.Fn Sigaltstack
-allows users to define an alternate stack on which signals
-are to be processed.
-If
-.Fa ss
-is non-zero,
-it specifies a pointer to and the size of a
-.Em "signal stack"
-on which to deliver signals,
-and tells the system if the process is currently executing
-on that stack.
-When a signal's action indicates its handler
-should execute on the signal stack (specified with a
-.Xr sigaction 2
-call), the system checks to see
-if the process is currently executing on that stack.
-If the process is not currently executing on the signal stack,
-the system arranges a switch to the signal stack for the
-duration of the signal handler's execution.
-.Pp
-If
-.Dv SS_DISABLE
-is set in
-.Fa ss_flags ,
-.Fa ss_sp
-and
-.Fa ss_size
-are ignored and the signal stack will be disabled.
-Trying to disable an active stack will cause
-.Fn sigaltstack
-to return -1 with
-.Va errno
-set to
-.Dv EINVAL .
-A disabled stack will cause all signals to be
-taken on the regular user stack.
-If the stack is later re-enabled then all signals that were specified
-to be processed on an alternate stack will resume doing so.
-.Pp
-If
-.Fa oss
-is non-zero, the current signal stack state is returned.
-The
-.Fa ss_flags
-field will contain the value
-.Dv SS_ONSTACK
-if the process is currently on a signal stack and
-.Dv SS_DISABLE
-if the signal stack is currently disabled.
-.Sh NOTES
-The value
-.Dv SIGSTKSZ
-is defined to be the number of bytes/chars that would be used to cover
-the usual case when allocating an alternate stack area.
-The following code fragment is typically used to allocate an alternate stack.
-.Bd -literal -offset indent
-if ((sigstk.ss_sp = malloc(SIGSTKSZ)) == NULL)
- /* error return */
-sigstk.ss_size = SIGSTKSZ;
-sigstk.ss_flags = 0;
-if (sigaltstack(&sigstk,0) < 0)
- perror("sigaltstack");
-.Ed
-An alternative approach is provided for programs with signal handlers
-that require a specific amount of stack space other than the default size.
-The value
-.Dv MINSIGSTKSZ
-is defined to be the number of bytes/chars that is required by
-the operating system to implement the alternate stack feature.
-In computing an alternate stack size,
-programs should add
-.Dv MINSIGSTKSZ
-to their stack requirements to allow for the operating system overhead.
-.Pp
-Signal stacks are automatically adjusted for the direction of stack
-growth and alignment requirements.
-Signal stacks may or may not be protected by the hardware and
-are not ``grown'' automatically as is done for the normal stack.
-If the stack overflows and this space is not protected
-unpredictable results may occur.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Sigstack
-will fail and the signal stack context will remain unchanged
-if one of the following occurs.
-.Bl -tag -width [ENOMEM]
-.It Bq Er EFAULT
-Either
-.Fa ss
-or
-.Fa oss
-points to memory that is not a valid part of the process
-address space.
-.It Bq Er EINVAL
-An attempt was made to disable an active stack.
-.It Bq Er ENOMEM
-Size of alternate stack area is less than or equal to
-.Dv MINSIGSTKSZ .
-.El
-.Sh SEE ALSO
-.Xr sigaction 2 ,
-.Xr setjmp 3
-.Sh HISTORY
-The predecessor to
-.Fn sigaltstack ,
-the
-.Fn sigstack
-system call, appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/sigpending.2 b/lib/libc/sys/sigpending.2
deleted file mode 100644
index e8c6b8d..0000000
--- a/lib/libc/sys/sigpending.2
+++ /dev/null
@@ -1,72 +0,0 @@
-.\" Copyright (c) 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Berkeley Software Design, Inc.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigpending.2 8.3 (Berkeley) 1/12/94
-.\"
-.Dd January 12, 1994
-.Dt SIGPENDING 2
-.Os
-.Sh NAME
-.Nm sigpending
-.Nd get pending signals
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft int
-.Fn sigpending "sigset_t *set"
-.Sh DESCRIPTION
-The
-.Fn sigpending
-function returns a mask of the signals pending for delivery
-to the calling process in the location indicated by
-.Fa set .
-Signals may be pending because they are currently masked,
-or transiently before delivery (although the latter case is not
-normally detectable).
-.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
-.Sh ERRORS
-The
-.Fn sigpending
-function does not currently detect any errors.
-.Sh SEE ALSO
-.Xr sigaction 2 ,
-.Xr sigprocmask 2
-.Sh STANDARDS
-The
-.Fn sigpending
-function call is expected to conform to
-.St -p1003.1-90 .
diff --git a/lib/libc/sys/sigprocmask.2 b/lib/libc/sys/sigprocmask.2
deleted file mode 100644
index af1b574..0000000
--- a/lib/libc/sys/sigprocmask.2
+++ /dev/null
@@ -1,120 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigprocmask.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SIGPROCMASK 2
-.Os
-.Sh NAME
-.Nm sigprocmask
-.Nd manipulate current signal mask
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft int
-.Fn sigprocmask "int how" "const sigset_t *set" "sigset_t *oset"
-.Fn sigmask signum
-.Sh DESCRIPTION
-The
-.Fn sigprocmask
-function examines and/or changes the current signal mask (those signals
-that are blocked from delivery).
-Signals are blocked if they are members of the current signal mask set.
-.Pp
-If
-.Fa set
-is not null, the action of
-.Fn sigprocmask
-depends on the value of the parameter
-.Fa how .
-The signal mask is changed as a function of the specified
-.Fa set
-and the current mask.
-The function is specified by
-.Fa how
-using one of the following values from
-.Aq Pa signal.h :
-.Bl -tag -width SIG_UNBLOCK
-.It Dv SIG_BLOCK
-The new mask is the union of the current mask and the specified
-.Fa set .
-.It Dv SIG_UNBLOCK
-The new mask is the intersection of the current mask
-and the complement of the specified
-.Fa set .
-.It Dv SIG_SETMASK
-The current mask is replaced by the specified
-.Fa set .
-.El
-.Pp
-If
-.Fa oset
-is not null, it is set to
-the previous value of the signal mask.
-When
-.Fa set
-is null,
-the value of
-.Ar how
-is insignificant and the mask remains unset
-providing a way to examine the signal mask without modification.
-.Pp
-The system
-quietly disallows
-.Dv SIGKILL
-or
-.Dv SIGSTOP
-to be blocked.
-.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A -1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
-.Sh ERRORS
-The
-.Fn sigprocmask
-call will fail and the signal mask will be unchanged if one
-of the following occurs:
-.Bl -tag -width Bq Er EINVAL
-.It Bq Er EINVAL
-.Fa how
-has a value other than those listed here.
-.Sh SEE ALSO
-.Xr kill 2 ,
-.Xr sigaction 2 ,
-.Xr sigsuspend 2 ,
-.Xr sigsetops 3
-.Sh STANDARDS
-The
-.Fn sigprocmask
-function call is expected to
-conform to
-.St -p1003.1-90 .
diff --git a/lib/libc/sys/sigreturn.2 b/lib/libc/sys/sigreturn.2
deleted file mode 100644
index 0e848c3..0000000
--- a/lib/libc/sys/sigreturn.2
+++ /dev/null
@@ -1,111 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigreturn.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SIGRETURN 2
-.Os BSD 4.3
-.Sh NAME
-.Nm sigreturn
-.Nd return from signal
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Bd -literal
-struct sigcontext {
- int sc_onstack; /* sigstack state to restore */
- int sc_mask; /* signal mask to restore */
- int sc_esp; /* machine state */
- int sc_ebp;
- int sc_isp;
- int sc_eip;
- int sc_efl;
- int sc_es;
- int sc_ds;
- int sc_cs;
- int sc_ss;
- int sc_edi;
- int sc_esi;
- int sc_ebx;
- int sc_edx;
- int sc_ecx;
- int sc_eax;
-# define sc_sp sc_esp
-# define sc_fp sc_ebp
-# define sc_pc sc_eip
-# define sc_ps sc_efl
-};
-.Ed
-.Ft int
-.Fn sigreturn "struct sigcontext *scp"
-.Sh DESCRIPTION
-.Fn Sigreturn
-allows users to atomically unmask, switch stacks,
-and return from a signal context.
-The processes signal mask and stack status are
-restored from the context.
-The system call does not return;
-the users stack pointer, frame pointer, argument pointer,
-and processor status longword are restored from the context.
-Execution resumes at the specified pc.
-This system call is used by the trampoline code and
-.Xr longjmp 3
-when returning from a signal to the previously executing program.
-.Sh NOTES
-This system call is not available in 4.2
-.Tn BSD
-hence it should not be used if backward compatibility is needed.
-.Sh RETURN VALUES
-If successful, the system call does not return.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Sigreturn
-will fail and the process context will remain unchanged
-if one of the following occurs.
-.Bl -tag -width [EINVAL]
-.It Bq Er EFAULT
-.Fa Scp
-points to memory that is not a valid part of the process
-address space.
-.It Bq Er EINVAL
-The process status longword is invalid or would improperly
-raise the privilege level of the process.
-.El
-.Sh SEE ALSO
-.Xr sigvec 2 ,
-.Xr setjmp 3
-.Sh HISTORY
-The
-.Fn sigreturn
-function call appeared in
-.Bx 4.3 .
diff --git a/lib/libc/sys/sigstack.2 b/lib/libc/sys/sigstack.2
deleted file mode 100644
index 3fbe6e6..0000000
--- a/lib/libc/sys/sigstack.2
+++ /dev/null
@@ -1,51 +0,0 @@
-.\" Copyright (c) 1983, 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigstack.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SIGSTACK 2
-.Os BSD 4.2
-.Sh NAME
-.Nm sigstack
-.Nd set and/or get signal stack context
-.Sh DESCRIPTION
-The
-.Fn sigstack
-function has been deprecated in favor of the interface described in
-.Xr sigaltstack 2 .
-.Sh SEE ALSO
-.Xr sigaltstack 2
-.Sh HISTORY
-The
-.Fn sigstack
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/sigsuspend.2 b/lib/libc/sys/sigsuspend.2
deleted file mode 100644
index 885c170..0000000
--- a/lib/libc/sys/sigsuspend.2
+++ /dev/null
@@ -1,80 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sigsuspend.2 8.2 (Berkeley) 5/16/95
-.\"
-.Dd May 16, 1995
-.Dt SIGSUSPEND 2
-.Os
-.Sh NAME
-.Nm sigsuspend
-.Nd atomically release blocked signals and wait for interrupt
-.Sh SYNOPSIS
-.Fd #include <signal.h>
-.Ft int
-.Fn sigsuspend "const sigset_t *sigmask"
-.Sh DESCRIPTION
-.Fn Sigsuspend
-temporarily changes the blocked signal mask to the set to which
-.Fa sigmask
-points,
-and then waits for a signal to arrive;
-on return the previous set of masked signals is restored.
-The signal mask set
-is usually empty to indicate that all
-signals are to be unblocked for the duration of the call.
-.Pp
-In normal usage, a signal is blocked using
-.Xr sigprocmask 2
-to begin a critical section, variables modified on the occurrence
-of the signal are examined to determine that there is no work
-to be done, and the process pauses awaiting work by using
-.Fn sigsuspend
-with the previous mask returned by
-.Xr sigprocmask .
-.Sh RETURN VALUES
-The
-.Fn sigsuspend
-function
-always terminates by being interrupted, returning -1 with
-.Va errno
-set to
-.Dv EINTR .
-.Sh SEE ALSO
-.Xr sigaction 2 ,
-.Xr signanosleep 2 ,
-.Xr sigprocmask 2 ,
-.Xr sigsetops 3
-.Sh STANDARDS
-The
-.Fn sigsupend
-function call is expected to conform to
-.St -p1003.1-90 .
diff --git a/lib/libc/sys/socket.2 b/lib/libc/sys/socket.2
deleted file mode 100644
index 22e4b19..0000000
--- a/lib/libc/sys/socket.2
+++ /dev/null
@@ -1,272 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" From: @(#)socket.2 8.1 (Berkeley) 6/4/93
-.\" $Id: socket.2,v 1.8 1997/11/23 17:58:46 bde Exp $
-.\"
-.Dd November 24, 1997
-.Dt SOCKET 2
-.Os BSD 4.2
-.Sh NAME
-.Nm socket
-.Nd create an endpoint for communication
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn socket "int domain" "int type" "int protocol"
-.Sh DESCRIPTION
-.Fn Socket
-creates an endpoint for communication and returns a descriptor.
-.Pp
-The
-.Fa domain
-parameter specifies a communications domain within which
-communication will take place; this selects the protocol family
-which should be used.
-These families are defined in the include file
-.Ao Pa sys/socket.h Ac .
-The currently understood formats are
-.Pp
-.Bd -literal -offset indent -compact
-PF_LOCAL (Host-internal protocols, formerly called PF_UNIX),
-PF_INET (ARPA Internet protocols),
-PF_ISO (ISO protocols),
-PF_CCITT (ITU-T protocols, like X.25),
-PF_NS (Xerox Network Systems protocols), and
-.\"PF_IMPLINK (IMP \*(lqhost at IMP\*(rq link layer).
-.Ed
-.Pp
-The socket has the indicated
-.Fa type ,
-which specifies the semantics of communication. Currently
-defined types are:
-.Pp
-.Bd -literal -offset indent -compact
-SOCK_STREAM
-SOCK_DGRAM
-SOCK_RAW
-SOCK_SEQPACKET
-SOCK_RDM
-.Ed
-.Pp
-A
-.Dv SOCK_STREAM
-type provides sequenced, reliable,
-two-way connection based byte streams.
-An out-of-band data transmission mechanism may be supported.
-A
-.Dv SOCK_DGRAM
-socket supports
-datagrams (connectionless, unreliable messages of
-a fixed (typically small) maximum length).
-A
-.Dv SOCK_SEQPACKET
-socket may provide a sequenced, reliable,
-two-way connection-based data transmission path for datagrams
-of fixed maximum length; a consumer may be required to read
-an entire packet with each read system call.
-This facility is protocol specific, and presently implemented
-only for
-.Dv PF_NS .
-.Dv SOCK_RAW
-sockets provide access to internal network protocols and interfaces.
-The types
-.Dv SOCK_RAW ,
-which is available only to the super-user, and
-.Dv SOCK_RDM ,
-which is planned,
-but not yet implemented, are not described here.
-.Pp
-The
-.Fa protocol
-specifies a particular protocol to be used with the socket.
-Normally only a single protocol exists to support a particular
-socket type within a given protocol family. However, it is possible
-that many protocols may exist, in which case a particular protocol
-must be specified in this manner. The protocol number to use is
-particular to the \*(lqcommunication domain\*(rq in which communication
-is to take place; see
-.Xr protocols 5 .
-.Pp
-Sockets of type
-.Dv SOCK_STREAM
-are full-duplex byte streams, similar
-to pipes. A stream socket must be in a
-.Em connected
-state before any data may be sent or received
-on it. A connection to another socket is created with a
-.Xr connect 2
-call.
-Once connected, data may be transferred using
-.Xr read 2
-and
-.Xr write 2
-calls or some variant of the
-.Xr send 2
-and
-.Xr recv 2
-calls.
-(Some protocol families, such as the Internet family,
-support the notion of an
-.Dq implied connect,
-which permits data to be sent piggybacked onto a connect operation by
-using the
-.Xr sendto 2
-call.)
-When a session has been completed a
-.Xr close 2
-may be performed.
-Out-of-band data may also be transmitted as described in
-.Xr send 2
-and received as described in
-.Xr recv 2 .
-.Pp
-The communications protocols used to implement a
-.Dv SOCK_STREAM
-insure that data
-is not lost or duplicated. If a piece of data for which the
-peer protocol has buffer space cannot be successfully transmitted
-within a reasonable length of time, then
-the connection is considered broken and calls
-will indicate an error with
--1 returns and with
-.Dv ETIMEDOUT
-as the specific code
-in the global variable
-.Va errno .
-The protocols optionally keep sockets
-.Dq warm
-by forcing transmissions
-roughly every minute in the absence of other activity.
-An error is then indicated if no response can be
-elicited on an otherwise
-idle connection for a extended period (e.g. 5 minutes).
-A
-.Dv SIGPIPE
-signal is raised if a process sends
-on a broken stream; this causes naive processes,
-which do not handle the signal, to exit.
-.Pp
-.Dv SOCK_SEQPACKET
-sockets employ the same system calls
-as
-.Dv SOCK_STREAM
-sockets. The only difference
-is that
-.Xr read 2
-calls will return only the amount of data requested,
-and any remaining in the arriving packet will be discarded.
-.Pp
-.Dv SOCK_DGRAM
-and
-.Dv SOCK_RAW
-sockets allow sending of datagrams to correspondents
-named in
-.Xr send 2
-calls. Datagrams are generally received with
-.Xr recvfrom 2 ,
-which returns the next datagram with its return address.
-.Pp
-An
-.Xr fcntl 2
-call can be used to specify a process group to receive
-a
-.Dv SIGURG
-signal when the out-of-band data arrives.
-It may also enable non-blocking I/O
-and asynchronous notification of I/O events
-via
-.Dv SIGIO .
-.Pp
-The operation of sockets is controlled by socket level
-.Em options .
-These options are defined in the file
-.Ao Pa sys/socket.h Ac .
-.Xr Setsockopt 2
-and
-.Xr getsockopt 2
-are used to set and get options, respectively.
-.Sh RETURN VALUES
-A -1 is returned if an error occurs, otherwise the return
-value is a descriptor referencing the socket.
-.Sh ERRORS
-The
-.Fn socket
-call fails if:
-.Bl -tag -width EPROTONOPSUPPORTA
-.It Bq Er EPROTONOSUPPORT
-The protocol type or the specified protocol is not supported
-within this domain.
-.It Bq Er EMFILE
-The per-process descriptor table is full.
-.It Bq Er ENFILE
-The system file table is full.
-.It Bq Er EACCES
-Permission to create a socket of the specified type and/or protocol
-is denied.
-.It Bq Er ENOBUFS
-Insufficient buffer space is available.
-The socket cannot be created until sufficient resources are freed.
-.El
-.Sh SEE ALSO
-.Xr accept 2 ,
-.Xr bind 2 ,
-.Xr connect 2 ,
-.Xr getpeername 2 ,
-.Xr getsockname 2 ,
-.Xr getsockopt 2 ,
-.Xr ioctl 2 ,
-.Xr listen 2 ,
-.Xr read 2 ,
-.Xr recv 2 ,
-.Xr select 2 ,
-.Xr send 2 ,
-.Xr shutdown 2 ,
-.Xr socketpair 2 ,
-.Xr write 2 ,
-.Xr getprotoent 3 ,
-.Xr protocols 5
-.Rs
-.%T "An Introductory 4.3 BSD Interprocess Communication Tutorial"
-.%B PS1
-.%N 7
-.Re
-.Rs
-.%T "BSD Interprocess Communication Tutorial"
-.%B PS1
-.%N 8
-.Re
-.Sh HISTORY
-The
-.Fn socket
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/socketpair.2 b/lib/libc/sys/socketpair.2
deleted file mode 100644
index 62aef76..0000000
--- a/lib/libc/sys/socketpair.2
+++ /dev/null
@@ -1,91 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)socketpair.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SOCKETPAIR 2
-.Os BSD 4.2
-.Sh NAME
-.Nm socketpair
-.Nd create a pair of connected sockets
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/socket.h>
-.Ft int
-.Fn socketpair "int d" "int type" "int protocol" "int *sv"
-.Sh DESCRIPTION
-The
-.Fn socketpair
-call creates an unnamed pair of connected sockets in
-the specified domain
-.Fa d ,
-of the specified
-.Fa type ,
-and using the optionally specified
-.Fa protocol .
-The descriptors used in referencing the new sockets
-are returned in
-.Fa sv Ns [0]
-and
-.Fa sv Ns [1] .
-The two sockets are indistinguishable.
-.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
-.Sh ERRORS
-The call succeeds unless:
-.Bl -tag -width EPROTONOSUPPORTA
-.It Bq Er EMFILE
-Too many descriptors are in use by this process.
-.It Bq Er EAFNOSUPPORT
-The specified address family is not supported on this machine.
-.It Bq Er EPROTONOSUPPORT
-The specified protocol is not supported on this machine.
-.It Bq Er EOPNOSUPPORT
-The specified protocol does not support creation of socket pairs.
-.It Bq Er EFAULT
-The address
-.Fa sv
-does not specify a valid part of the
-process address space.
-.Sh SEE ALSO
-.Xr pipe 2 ,
-.Xr read 2 ,
-.Xr write 2
-.Sh BUGS
-This call is currently implemented only for the
-.Tn UNIX
-domain.
-.Sh HISTORY
-The
-.Fn socketpair
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2
deleted file mode 100644
index 50d489a..0000000
--- a/lib/libc/sys/stat.2
+++ /dev/null
@@ -1,292 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)stat.2 8.4 (Berkeley) 5/1/95
-.\" $Id: stat.2,v 1.12 1997/03/11 11:35:55 peter Exp $
-.\"
-.Dd May 1, 1995
-.Dt STAT 2
-.Os BSD 4
-.Sh NAME
-.Nm stat ,
-.Nm lstat ,
-.Nm fstat
-.Nd get file status
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/stat.h>
-.Ft int
-.Fn stat "const char *path" "struct stat *sb"
-.Ft int
-.Fn lstat "const char *path" "struct stat *sb"
-.Ft int
-.Fn fstat "int fd" "struct stat *sb"
-.Sh DESCRIPTION
-The
-.Fn stat
-function obtains information about the file pointed to by
-.Fa path .
-Read, write or execute
-permission of the named file is not required, but all directories
-listed in the path name leading to the file must be searchable.
-.Pp
-.Fn Lstat
-is like
-.Fn stat
-except in the case where the named file is a symbolic link,
-in which case
-.Fn lstat
-returns information about the link,
-while
-.Fn stat
-returns information about the file the link references.
-Unlike other filesystem objects,
-symbolic links do not have an owner, group, access mode, times, etc.
-Instead, these attributes are taken from the directory that
-contains the link.
-The only attributes returned from an
-.Fn lstat
-that refer to the symbolic link itself are the file type (S_IFLNK),
-size, blocks, and link count (always 1).
-.Pp
-The
-.Fn fstat
-obtains the same information about an open file
-known by the file descriptor
-.Fa fd .
-.Pp
-The
-.Fa sb
-argument is a pointer to a
-.Fn stat
-structure
-as defined by
-.Aq Pa sys/stat.h
-(shown below)
-and into which information is placed concerning the file.
-.Bd -literal
-struct stat {
- dev_t st_dev; /* inode's device */
- ino_t st_ino; /* inode's number */
- mode_t st_mode; /* inode protection mode */
- nlink_t st_nlink; /* number of hard links */
- uid_t st_uid; /* user ID of the file's owner */
- gid_t st_gid; /* group ID of the file's group */
- dev_t st_rdev; /* device type */
-#ifndef _POSIX_SOURCE
- struct timespec st_atimespec; /* time of last access */
- struct timespec st_mtimespec; /* time of last data modification */
- struct timespec st_ctimespec; /* time of last file status change */
-#else
- time_t st_atime; /* time of last access */
- long st_atimensec; /* nsec of last access */
- time_t st_mtime; /* time of last data modification */
- long st_mtimensec; /* nsec of last data modification */
- time_t st_ctime; /* time of last file status change */
- long st_ctimensec; /* nsec of last file status change */
-#endif
- off_t st_size; /* file size, in bytes */
- quad_t st_blocks; /* blocks allocated for file */
- u_long st_blksize; /* optimal blocksize for I/O */
- u_long st_flags; /* user defined flags for file */
- u_long st_gen; /* file generation number */
-};
-.Ed
-.Pp
-The time-related fields of
-.Fa struct stat
-are as follows:
-.Bl -tag -width XXXst_mtime
-.It st_atime
-Time when file data last accessed.
-Changed by the
-.Xr mknod 2 ,
-.Xr utimes 2
-and
-.Xr read 2
-system calls.
-.It st_mtime
-Time when file data last modified.
-Changed by the
-.Xr mknod 2 ,
-.Xr utimes 2
-and
-.Xr write 2
-system calls.
-.It st_ctime
-Time when file status was last changed (inode data modification).
-Changed by the
-.Xr chmod 2 ,
-.Xr chown 2 ,
-.Xr link 2 ,
-.Xr mknod 2 ,
-.Xr rename 2 ,
-.Xr unlink 2 ,
-.Xr utimes 2
-and
-.Xr write 2
-system calls.
-.El
-.Pp
-If
-.Dv _POSIX_SOURCE
-is not defined, the time-related fields are defined as:
-.Bd -literal
-#ifndef _POSIX_SOURCE
-#define st_atime st_atimespec.tv_sec
-#define st_mtime st_mtimespec.tv_sec
-#define st_ctime st_ctimespec.tv_sec
-#endif
-.Ed
-.Pp
-The size-related fields of the
-.Fa struct stat
-are as follows:
-.Bl -tag -width XXXst_blksize
-.It st_blksize
-The optimal I/O block size for the file.
-.It st_blocks
-The actual number of blocks allocated for the file in 512-byte units.
-As short symbolic links are stored in the inode, this number may
-be zero.
-.El
-.Pp
-The status information word
-.Fa st_mode
-has the following bits:
-.Bd -literal
-#define S_IFMT 0170000 /* type of file */
-#define S_IFIFO 0010000 /* named pipe (fifo) */
-#define S_IFCHR 0020000 /* character special */
-#define S_IFDIR 0040000 /* directory */
-#define S_IFBLK 0060000 /* block special */
-#define S_IFREG 0100000 /* regular */
-#define S_IFLNK 0120000 /* symbolic link */
-#define S_IFSOCK 0140000 /* socket */
-#define S_IFWHT 0160000 /* whiteout */
-#define S_ISUID 0004000 /* set user id on execution */
-#define S_ISGID 0002000 /* set group id on execution */
-#define S_ISVTX 0001000 /* save swapped text even after use */
-#define S_IRUSR 0000400 /* read permission, owner */
-#define S_IWUSR 0000200 /* write permission, owner */
-#define S_IXUSR 0000100 /* execute/search permission, owner */
-.Ed
-.Pp
-For a list of access modes, see
-.Aq Pa sys/stat.h ,
-.Xr access 2
-and
-.Xr chmod 2 .
-.Sh RETURN VALUES
-Upon successful completion a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh COMPATIBILITY
-Previous versions of the system used different types for the
-.Li st_dev ,
-.Li st_uid ,
-.Li st_gid ,
-.Li st_rdev ,
-.Li st_size ,
-.Li st_blksize
-and
-.Li st_blocks
-fields.
-.Sh ERRORS
-.Fn Stat
-and
-.Fn lstat
-will fail if:
-.Bl -tag -width ENAMETOOLONGAA
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EFAULT
-.Fa Sb
-or
-.Em name
-points to an invalid address.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Pp
-.Bl -tag -width [EFAULT]
-.Fn Fstat
-will fail if:
-.It Bq Er EBADF
-.Fa fd
-is not a valid open file descriptor.
-.It Bq Er EFAULT
-.Fa Sb
-points to an invalid address.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.El
-.Sh SEE ALSO
-.Xr access 2 ,
-.Xr chmod 2 ,
-.Xr chown 2 ,
-.Xr utimes 2 ,
-.Xr symlink 7
-.Sh BUGS
-Applying
-.Fn fstat
-to a socket (and thus to a pipe)
-returns a zeroed buffer,
-except for the blocksize field,
-and a unique device and inode number.
-.Sh STANDARDS
-The
-.Fn stat
-and
-.Fn fstat
-function calls are expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-A
-.Fn stat
-and a
-.Fn fstat
-function call appeared in
-.At v7 .
-A
-.Fn lstat
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/statfs.2 b/lib/libc/sys/statfs.2
deleted file mode 100644
index 80164d0..0000000
--- a/lib/libc/sys/statfs.2
+++ /dev/null
@@ -1,181 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)statfs.2 8.5 (Berkeley) 5/24/95
-.\"
-.Dd May 24, 1995
-.Dt STATFS 2
-.Os
-.Sh NAME
-.Nm statfs
-.Nd get file system statistics
-.Sh SYNOPSIS
-.Fd #include <sys/param.h>
-.Fd #include <sys/mount.h>
-.Ft int
-.Fn statfs "const char *path" "struct statfs *buf"
-.Ft int
-.Fn fstatfs "int fd" "struct statfs *buf"
-.Sh DESCRIPTION
-.Fn Statfs
-returns information about a mounted file system.
-.Fa Path
-is the path name of any file within the mounted filesystem.
-.Fa Buf
-is a pointer to a
-.Fn statfs
-structure defined as follows:
-.Bd -literal
-typedef struct fsid { int32_t val[2]; } fsid_t; /* file system id type */
-
-/*
- * file system statistics
- */
-
-#define MFSNAMELEN 16 /* length of fs type name, including null */
-#define MNAMELEN 90 /* length of buffer for returned name */
-
-struct statfs {
-long f_spare2; /* placeholder */
-long f_bsize; /* fundamental file system block size */
-long f_iosize; /* optimal transfer block size */
-long f_blocks; /* total data blocks in file system */
-long f_bfree; /* free blocks in fs */
-long f_bavail; /* free blocks avail to non-superuser */
-long f_files; /* total file nodes in file system */
-long f_ffree; /* free file nodes in fs */
-fsid_t f_fsid; /* file system id */
-uid_t f_owner; /* user that mounted the filesystem */
-int f_type; /* type of filesystem (see below) */
-int f_flags; /* copy of mount flags */
-long f_spare[2]; /* spare for later */
-char f_fstypename[MFSNAMELEN];/* fs type name */
-char f_mntonname[MNAMELEN]; /* mount point */
-char f_mntfromname[MNAMELEN]; /* mounted filesystem */
-};
-.Ed
-The flags that may be returned include:
-.Bl -tag -width MNT_ASYNCHRONOUS
-.It Dv MNT_RDONLY
-The filesystem is mounted read-only;
-Even the super-user may not write on it.
-.It Dv MNT_NOEXEC
-Files may not be executed from the filesystem.
-.It Dv MNT_NOSUID
-Setuid and setgid bits on files are not honored when they are executed.
-.It Dv MNT_NODEV
-Special files in the filesystem may not be opened.
-.It Dv MNT_SYNCHRONOUS
-All I/O to the filesystem is done synchronously.
-.It Dv MNT_ASYNCHRONOUS
-No filesystem I/O is done synchronously.
-.It Dv MNT_LOCAL
-The filesystem resides locally.
-.It Dv MNT_QUOTA
-The filesystem has quotas enabled on it.
-.It Dv MNT_ROOTFS
-Identifies the root filesystem.
-.It Dv MNT_EXRDONLY
-The filesystem is exported read-only.
-.It Dv MNT_EXPORTED
-The filesystem is exported for both reading and writing.
-.It Dv MNT_DEFEXPORTED
-The filesystem is exported for both reading and writing to any Internet host.
-.It Dv MNT_EXPORTANON
-The filesystem maps all remote accesses to the anonymous user.
-.It Dv MNT_EXKERB
-The filesystem is exported with Kerberos uid mapping.
-.El
-.Pp
-Fields that are undefined for a particular file system are set to -1.
-.Fn Fstatfs
-returns the same information about an open file referenced by descriptor
-.Fa fd .
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Statfs
-fails if one or more of the following are true:
-.Bl -tag -width ENAMETOOLONGA
-.It Bq Er ENOTDIR
-A component of the path prefix of
-.Fa Path
-is not a directory.
-.It Bq Er ENAMETOOLONG
-The length of a component of
-.Fa path
-exceeds 255 characters,
-or the length of
-.Fa path
-exceeds 1023 characters.
-.It Bq Er ENOENT
-The file referred to by
-.Fa path
-does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix of
-.Fa path .
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating
-.Fa path .
-.It Bq Er EFAULT
-.Fa Buf
-or
-.Fa path
-points to an invalid address.
-.It Bq Er EIO
-An
-.Tn I/O
-error occurred while reading from or writing to the file system.
-.El
-.Pp
-.Fn Fstatfs
-fails if one or more of the following are true:
-.Bl -tag -width ENAMETOOLONGA
-.It Bq Er EBADF
-.Fa Fd
-is not a valid open file descriptor.
-.It Bq Er EFAULT
-.Fa Buf
-points to an invalid address.
-.It Bq Er EIO
-An
-.Tn I/O
-error occurred while reading from or writing to the file system.
-.El
-.Sh HISTORY
-The
-.Fn statfs
-function first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/sys/swapon.2 b/lib/libc/sys/swapon.2
deleted file mode 100644
index b684da1..0000000
--- a/lib/libc/sys/swapon.2
+++ /dev/null
@@ -1,111 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)swapon.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SWAPON 2
-.Os BSD 4
-.Sh NAME
-.Nm swapon
-.Nd add a swap device for interleaved paging/swapping
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn swapon "const char *special"
-.Sh DESCRIPTION
-.Fn Swapon
-makes the block device
-.Fa special
-available to the system for
-allocation for paging and swapping. The names of potentially
-available devices are known to the system and defined at system
-configuration time. The size of the swap area on
-.Fa special
-is calculated at the time the device is first made available
-for swapping.
-.Sh RETURN VALUES
-If an error has occurred, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Swapon
-succeeds unless:
-.Bl -tag -width ENAMETOOLONG
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named device does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EPERM
-The caller is not the super-user.
-.It Bq Er ENOTBLK
-.Fa Special
-is not a block device.
-.It Bq Er EBUSY
-The device specified by
-.Fa special
-has already
-been made available for swapping
-.It Bq Er EINVAL
-The device configured by
-.Fa special
-was not
-configured into the system as a swap device.
-.It Bq Er ENXIO
-The major device number of
-.Fa special
-is out of range (this indicates no device driver exists
-for the associated hardware).
-.It Bq Er EIO
-An I/O error occurred while opening the swap device.
-.It Bq Er EFAULT
-.Fa Special
-points outside the process's allocated address space.
-.Sh SEE ALSO
-.Xr config 8 ,
-.Xr swapon 8
-.Sh BUGS
-There is no way to stop swapping on a disk so that the pack may be
-dismounted.
-.Pp
-This call will be upgraded in future versions of the system.
-.Sh HISTORY
-The
-.Fn swapon
-function call appeared in
-.Bx 4.0 .
diff --git a/lib/libc/sys/symlink.2 b/lib/libc/sys/symlink.2
deleted file mode 100644
index ce1fa7e..0000000
--- a/lib/libc/sys/symlink.2
+++ /dev/null
@@ -1,136 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)symlink.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SYMLINK 2
-.Os BSD 4.2
-.Sh NAME
-.Nm symlink
-.Nd make symbolic link to a file
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn symlink "const char *name1" "const char *name2"
-.Sh DESCRIPTION
-A symbolic link
-.Fa name2
-is created to
-.Fa name1
-.Pf ( Fa name2
-is the name of the
-file created,
-.Fa name1
-is the string
-used in creating the symbolic link).
-Either name may be an arbitrary path name; the files need not
-be on the same file system.
-.Sh RETURN VALUES
-Upon successful completion, a zero value is returned.
-If an error occurs, the error code is stored in
-.Va errno
-and a -1 value is returned.
-.Sh ERRORS
-The symbolic link succeeds unless:
-.Bl -tag -width ENAMETOO
-.It Bq Er ENOTDIR
-A component of the
-.Fa name2
-prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of either pathname exceeded 255 characters,
-or the entire length of either path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-A component of the
-.Fa name2
-path prefix denies search permission.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EEXIST
-.Fa Name2
-already exists.
-.It Bq Er EIO
-An I/O error occurred while making the directory entry for
-.Fa name2 ,
-or allocating the inode for
-.Fa name2 ,
-or writing out the link contents of
-.Fa name2 .
-.It Bq Er EROFS
-The file
-.Fa name2
-would reside on a read-only file system.
-.It Bq Er ENOSPC
-The directory in which the entry for the new symbolic link is being placed
-cannot be extended because there is no space left on the file
-system containing the directory.
-.It Bq Er ENOSPC
-The new symbolic link cannot be created because there
-there is no space left on the file
-system that will contain the symbolic link.
-.It Bq Er ENOSPC
-There are no free inodes on the file system on which the
-symbolic link is being created.
-.It Bq Er EDQUOT
-The directory in which the entry for the new symbolic link
-is being placed cannot be extended because the
-user's quota of disk blocks on the file system
-containing the directory has been exhausted.
-.It Bq Er EDQUOT
-The new symbolic link cannot be created because the user's
-quota of disk blocks on the file system that will
-contain the symbolic link has been exhausted.
-.It Bq Er EDQUOT
-The user's quota of inodes on the file system on
-which the symbolic link is being created has been exhausted.
-.It Bq Er EIO
-An I/O error occurred while making the directory entry or allocating the inode.
-.It Bq Er EFAULT
-.Fa Name1
-or
-.Fa name2
-points outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr ln 1 ,
-.Xr link 2 ,
-.Xr lstat 2 ,
-.Xr readlink 2 ,
-.Xr unlink 2 ,
-.Xr symlink 7
-.Sh HISTORY
-The
-.Fn symlink
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/sync.2 b/lib/libc/sys/sync.2
deleted file mode 100644
index 2b2b664..0000000
--- a/lib/libc/sys/sync.2
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sync.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SYNC 2
-.Os BSD 4
-.Sh NAME
-.Nm sync
-.Nd "synchronize disk block in-core status with that on disk"
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft void
-.Fn sync void
-.Sh DESCRIPTION
-The
-.Fn sync
-function forces a write of dirty (modified) buffers
-in the block buffer cache out
-to disk. The kernel keeps this information in core to reduce
-the number of disk I/O transfers required by the system.
-As information in the cache is lost after a system crash a
-.Fn sync
-call is issued
-frequently
-by the user process
-.Xr update 4
-(about every 30 seconds).
-.Pp
-The function
-.Xr fsync 2
-may be used to synchronize individual file descriptor
-attributes.
-.Sh SEE ALSO
-.Xr fsync 2 ,
-.Xr update 4 ,
-.Xr sync 8
-.Sh BUGS
-.Fn Sync
-may return before the buffers are completely flushed.
-.Sh HISTORY
-A
-.Fn sync
-function call appeared in
-.At v6 .
diff --git a/lib/libc/sys/syscall.2 b/lib/libc/sys/syscall.2
deleted file mode 100644
index f59f2d1..0000000
--- a/lib/libc/sys/syscall.2
+++ /dev/null
@@ -1,76 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)syscall.2 8.1 (Berkeley) 6/16/93
-.\"
-.Dd June 16, 1993
-.Dt SYSCALL 2
-.Os BSD 4
-.Sh NAME
-.Nm syscall ,
-.Nm __syscall
-.Nd indirect system call
-.Sh SYNOPSIS
-.Fd #include <sys/syscall.h>
-.Fd #include <unistd.h>
-.Ft int
-.Fn syscall "int number" ...
-.Ft off_t
-.Fn __syscall "quad_t number" ...
-.Sh DESCRIPTION
-.Fn Syscall
-performs the system call whose assembly language
-interface has the specified
-.Fa number
-with the specified arguments.
-Symbolic constants for system calls can be found in the header file
-.Ao Pa sys/syscall.h Ac .
-The
-.Fn __syscall
-form should be used when one or more of the parameters is a
-64-bit argument to ensure that argument alignment is correct.
-This system call is useful for testing new system calls that
-do not have entries in the C library.
-.Sh RETURN VALUES
-The return values are defined by the system call being invoked.
-In general, a 0 return value indicates success.
-A -1 return value indicates an error,
-and an error code is stored in
-.Va errno .
-.Sh BUGS
-There is no way to simulate system calls that have multiple return values
-such as
-.Xr pipe 2 .
-.Sh HISTORY
-The
-.Fn syscall
-function call appeared in
-.Bx 4.0 .
diff --git a/lib/libc/sys/truncate.2 b/lib/libc/sys/truncate.2
deleted file mode 100644
index 678dcf6..0000000
--- a/lib/libc/sys/truncate.2
+++ /dev/null
@@ -1,128 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)truncate.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TRUNCATE 2
-.Os BSD 4.2
-.Sh NAME
-.Nm truncate ,
-.Nm ftruncate
-.Nd truncate or extend a file to a specified length
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn truncate "const char *path" "off_t length"
-.Ft int
-.Fn ftruncate "int fd" "off_t length"
-.Sh DESCRIPTION
-.Fn Truncate
-causes the file named by
-.Fa path
-or referenced by
-.Fa fd
-to be truncated or extended to
-.Fa length
-bytes in size. If the file
-was larger than this size, the extra data
-is lost.
-If the file was smaller than this size,
-it will be extended as if by writing bytes
-with the value zero.
-With
-.Fn ftruncate ,
-the file must be open for writing.
-.Sh RETURN VALUES
-A value of 0 is returned if the call succeeds. If the call
-fails a -1 is returned, and the global variable
-.Va errno
-specifies the error.
-.Sh ERRORS
-.Fn Truncate
-succeeds unless:
-.Bl -tag -width [ENOTDIR]
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er EACCES
-The named file is not writable by the user.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EISDIR
-The named file is a directory.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er ETXTBSY
-The file is a pure procedure (shared text) file that is being executed.
-.It Bq Er EIO
-An I/O error occurred updating the inode.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.El
-.Pp
-.Fn Ftruncate
-succeeds unless:
-.Bl -tag -width [ENOTDIR]
-.It Bq Er EBADF
-The
-.Fa fd
-is not a valid descriptor.
-.It Bq Er EINVAL
-The
-.Fa fd
-references a socket, not a file.
-.It Bq Er EINVAL
-The
-.Fa fd
-is not open for writing.
-.El
-.Sh SEE ALSO
-.Xr open 2
-.Sh BUGS
-These calls should be generalized to allow ranges
-of bytes in a file to be discarded.
-.Pp
-Use of
-.Fn truncate
-to extend a file is not portable.
-.Sh HISTORY
-The
-.Fn truncate
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/truncate.c b/lib/libc/sys/truncate.c
deleted file mode 100644
index 5bfeeb6..0000000
--- a/lib/libc/sys/truncate.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)truncate.c 8.1 (Berkeley) 6/17/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/syscall.h>
-
-#include <unistd.h>
-
-/*
- * This function provides 64-bit offset padding that
- * is not supplied by GCC 1.X but is supplied by GCC 2.X.
- */
-int
-truncate(path, length)
- const char *path;
- off_t length;
-{
-
- return(__syscall((quad_t)SYS_truncate, path, 0, length));
-}
diff --git a/lib/libc/sys/umask.2 b/lib/libc/sys/umask.2
deleted file mode 100644
index 4ac1db8..0000000
--- a/lib/libc/sys/umask.2
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)umask.2 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt UMASK 2
-.Os BSD 4
-.Sh NAME
-.Nm umask
-.Nd set file creation mode mask
-.Sh SYNOPSIS
-.Fd #include <sys/stat.h>
-.Ft mode_t
-.Fn umask "mode_t numask"
-.Sh DESCRIPTION
-The
-.Fn umask
-routine sets the process's file mode creation mask to
-.Fa numask
-and returns the previous value of the mask. The 9 low-order
-access permission
-bits of
-.Fa numask
-are used by system calls, including
-.Xr open 2 ,
-.Xr mkdir 2 ,
-and
-.Xr mkfifo 2 ,
-to turn off corresponding bits
-requested in file mode.
-(See
-.Xr chmod 2 ) .
-This clearing allows each user to restrict the default access
-to his files.
-.Pp
-The default mask value is S_IWGRP|S_IWOTH (022, write access for the
-owner only).
-Child processes inherit the mask of the calling process.
-.Sh RETURN VALUES
-The previous value of the file mode mask is returned by the call.
-.Sh ERRORS
-The
-.Fn umask
-function is always successful.
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr mknod 2 ,
-.Xr open 2
-.Sh STANDARDS
-The
-.Fn umask
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-An
-.Fn umask
-function call appeared in
-.At v7 .
diff --git a/lib/libc/sys/undelete.2 b/lib/libc/sys/undelete.2
deleted file mode 100644
index 317397c..0000000
--- a/lib/libc/sys/undelete.2
+++ /dev/null
@@ -1,105 +0,0 @@
-.\" Copyright (c) 1994
-.\" Jan-Simon Pendry
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)undelete.2 8.4 (Berkeley) 10/18/94
-.\"
-.Dd October 18, 1994
-.Dt UNDELETE 2
-.Os BSD 4
-.Sh NAME
-.Nm undelete
-.Nd attempt to recover a deleted file
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn undelete "const char *path"
-.Sh DESCRIPTION
-The
-.Fn undelete
-function attempts to recover the deleted file named by
-.Fa path .
-Currently, this works only when the named object
-is a whiteout in a union filesystem.
-The system call removes the whiteout causing
-any objects in a lower layer of the
-union stack to become visible once more.
-.Pp
-Eventually, the
-.Nm undelete
-functionality may be expanded to other filesystems able to recover
-deleted files such as the log-structured filesystem.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn undelete
-succeeds unless:
-.Bl -tag -width ENAMETOOLONGAA
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er EINVAL
-The pathname contains a character with the high-order bit set.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er EEXIST
-The path does not reference a whiteout.
-.It Bq Er ENOENT
-The named whiteout does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er EACCES
-Write permission is denied on the directory containing the name
-to be undeleted.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EPERM
-The directory containing the name is marked sticky,
-and the containing directory is not owned by the effective user ID.
-.It Bq Er EIO
-An I/O error occurred while updating the directory entry.
-.It Bq Er EROFS
-The name resides on a read-only file system.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr unlink 2 ,
-.Xr mount_union 8
-.Sh HISTORY
-An
-.Nm undelete
-function call first appeared in 4.4BSD-Lite.
diff --git a/lib/libc/sys/unlink.2 b/lib/libc/sys/unlink.2
deleted file mode 100644
index 8693f95..0000000
--- a/lib/libc/sys/unlink.2
+++ /dev/null
@@ -1,119 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)unlink.2 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt UNLINK 2
-.Os BSD 4
-.Sh NAME
-.Nm unlink
-.Nd remove directory entry
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn unlink "const char *path"
-.Sh DESCRIPTION
-The
-.Fn unlink
-function
-removes the link named by
-.Fa path
-from its directory and decrements the link count of the
-file which was referenced by the link.
-If that decrement reduces the link count of the file
-to zero,
-and no process has the file open, then
-all resources associated with the file are reclaimed.
-If one or more process have the file open when the last link is removed,
-the link is removed, but the removal of the file is delayed until
-all references to it have been closed.
-.Fa path
-may not be a directory.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-The
-.Fn unlink
-succeeds unless:
-.Bl -tag -width ENAMETOOLONGAA
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix.
-.It Bq Er EACCES
-Write permission is denied on the directory containing the link
-to be removed.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er EPERM
-The named file is a directory.
-.It Bq Er EPERM
-The directory containing the file is marked sticky,
-and neither the containing directory nor the file to be removed
-are owned by the effective user ID.
-.It Bq Er EBUSY
-The entry to be unlinked is the mount point for a
-mounted file system.
-.It Bq Er EIO
-An I/O error occurred while deleting the directory entry
-or deallocating the inode.
-.It Bq Er EROFS
-The named file resides on a read-only file system.
-.It Bq Er EFAULT
-.Fa Path
-points outside the process's allocated address space.
-.El
-.Sh SEE ALSO
-.Xr close 2 ,
-.Xr link 2 ,
-.Xr rmdir 2 ,
-.Xr symlink 7
-.Sh HISTORY
-An
-.Fn unlink
-function call appeared in
-.At v6 .
-.Pp
-The
-.Fn unlink
-system call traditionally allows the super-user to unlink directories which
-can damage the filesystem integrity. This implementation no longer permits
-it.
diff --git a/lib/libc/sys/utimes.2 b/lib/libc/sys/utimes.2
deleted file mode 100644
index 531d236..0000000
--- a/lib/libc/sys/utimes.2
+++ /dev/null
@@ -1,116 +0,0 @@
-.\" Copyright (c) 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)utimes.2 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt UTIMES 2
-.Os BSD 4
-.Sh NAME
-.Nm utimes
-.Nd set file access and modification times
-.Sh SYNOPSIS
-.Fd #include <sys/time.h>
-.Ft int
-.Fn utimes "const char *file" "const struct timeval *times"
-.Sh DESCRIPTION
-The
-.Fn utimes
-function sets the access and modification times of the named file from
-the structures in the argument array
-.Fa times .
-.Pp
-The first structure is the access time, and the second is the modification
-time.
-.Pp
-If the times are specified (the
-.Fa times
-argument is
-.Pf non- Dv NULL )
-the caller must be the owner of the file or be the super-user.
-.Pp
-If the times are not specified (the
-.Fa times
-argument is
-.Dv NULL )
-the caller must be the owner of the file, have permission to
-write the file, or be the super-user.
-.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Utimes
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EACCES
-Search permission is denied for a component of the path prefix;
-or the
-.Fa times
-argument is
-.Dv NULL
-and the effective user ID of the process does not
-match the owner of the file, and is not the super-user, and write
-access is denied.
-.It Bq Er EFAULT
-.Fa File
-or
-.Fa times
-points outside the process's allocated address space.
-.It Bq Er EIO
-An I/O error occurred while reading or writing the affected inode.
-.It Bq Er ELOOP
-Too many symbolic links were encountered in translating the pathname.
-.It Bq Er ENAMETOOLONG
-A component of a pathname exceeded 255 characters,
-or an entire path name exceeded 1023 characters.
-.It Bq Er ENOENT
-The named file does not exist.
-.It Bq Er ENOTDIR
-A component of the path prefix is not a directory.
-.It Bq Er EPERM
-The
-.Fa times
-argument is not
-.Dv NULL
-and the calling process's effective user ID
-does not match the owner of the file and is not the super-user.
-.It Bq Er EROFS
-The file system containing the file is mounted read-only.
-.El
-.Sh SEE ALSO
-.Xr stat 2
-.Sh HISTORY
-The
-.Fn utimes
-function call appeared in
-.Bx 4.2 .
diff --git a/lib/libc/sys/vfork.2 b/lib/libc/sys/vfork.2
deleted file mode 100644
index 5fff122..0000000
--- a/lib/libc/sys/vfork.2
+++ /dev/null
@@ -1,130 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)vfork.2 8.1 (Berkeley) 6/4/93
-.\" $Id: vfork.2,v 1.9 1997/11/18 03:59:30 jdp Exp $
-.\"
-.Dd June 4, 1993
-.Dt VFORK 2
-.Os BSD 4
-.Sh NAME
-.Nm vfork
-.Nd spawn new process in a virtual memory efficient way
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft int
-.Fn vfork void
-.Sh DESCRIPTION
-.Fn Vfork
-can be used to create new processes without fully copying the address
-space of the old process, which is horrendously inefficient in a paged
-environment. It is useful when the purpose of
-.Xr fork 2
-would have been to create a new system context for an
-.Xr execve 2 .
-.Fn Vfork
-differs from
-.Xr fork 2
-in that the child borrows the parent's memory and thread of
-control until a call to
-.Xr execve 2
-or an exit (either by a call to
-.Xr exit 3
-or abnormally).
-The parent process is suspended while the child is using its resources.
-.Pp
-.Fn Vfork
-returns 0 in the child's context and (later) the pid of the child in
-the parent's context.
-.Pp
-.Fn Vfork
-can normally be used just like
-.Xr fork 2 .
-It does not work, however, to return while running in the childs context
-from the procedure that called
-.Fn vfork
-since the eventual return from
-.Fn vfork
-would then return to a no longer existent stack frame.
-Be careful, also, to call
-.Xr _exit 2
-rather than
-.Xr exit 3
-if you can't
-.Xr execve 2 ,
-since
-.Xr exit 3
-will flush and close standard I/O channels, and thereby mess up the
-parent processes standard I/O data structures.
-(Even with
-.Xr fork 2
-it is wrong to call
-.Xr exit 3
-since buffered data would then be flushed twice.)
-.Sh SEE ALSO
-.Xr _exit 2 ,
-.Xr execve 2 ,
-.Xr fork 2 ,
-.Xr rfork 2 ,
-.Xr sigvec 2 ,
-.Xr wait 2 ,
-.Xr exit 3
-.Sh RETURN VALUES
-Same as for
-.Xr fork 2 .
-.Sh BUGS
-This system call will be eliminated when proper system sharing
-mechanisms are implemented.
-Users should not depend on the memory
-sharing semantics of
-.Xr vfork 2
-as it will, in that case, be made synonymous to
-.Xr fork 2 .
-.Pp
-To avoid a possible deadlock situation,
-processes that are children in the middle
-of a
-.Fn vfork
-are never sent
-.Dv SIGTTOU
-or
-.Dv SIGTTIN
-signals; rather,
-output or
-.Xr ioctl 2
-calls
-are allowed
-and input attempts result in an end-of-file indication.
-.Sh HISTORY
-The
-.Fn vfork
-function call appeared in
-.Bx 3.0 .
diff --git a/lib/libc/sys/wait.2 b/lib/libc/sys/wait.2
deleted file mode 100644
index 3d31479..0000000
--- a/lib/libc/sys/wait.2
+++ /dev/null
@@ -1,298 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993, 1994
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)wait.2 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt WAIT 2
-.Os BSD 4
-.Sh NAME
-.Nm wait ,
-.Nm waitpid ,
-.Nm wait4 ,
-.Nm wait3
-.Nd wait for process termination
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/wait.h>
-.Ft pid_t
-.Fn wait "int *status"
-.Fd #include <sys/time.h>
-.Fd #include <sys/resource.h>
-.Ft pid_t
-.Fn waitpid "pid_t wpid" "int *status" "int options"
-.Ft pid_t
-.Fn wait3 "int *status" "int options" "struct rusage *rusage"
-.Ft pid_t
-.Fn wait4 "pid_t wpid" "int *status" "int options" "struct rusage *rusage"
-.Sh DESCRIPTION
-The
-.Fn wait
-function suspends execution of its calling process until
-.Fa status
-information is available for a terminated child process,
-or a signal is received.
-On return from a successful
-.Fn wait
-call,
-the
-.Fa status
-area contains termination information about the process that exited
-as defined below.
-.Pp
-The
-.Fn wait4
-call provides a more general interface for programs
-that need to wait for certain child processes,
-that need resource utilization statistics accumulated by child processes,
-or that require options.
-The other wait functions are implemented using
-.Fn wait4 .
-.Pp
-The
-.Fa wpid
-parameter specifies the set of child processes for which to wait.
-If
-.Fa wpid
-is -1, the call waits for any child process.
-If
-.Fa wpid
-is 0,
-the call waits for any child process in the process group of the caller.
-If
-.Fa wpid
-is greater than zero, the call waits for the process with process id
-.Fa wpid .
-If
-.Fa wpid
-is less than -1, the call waits for any process whose process group id
-equals the absolute value of
-.Fa wpid .
-.Pp
-The
-.Fa status
-parameter is defined below. The
-.Fa options
-parameter contains the bitwise OR of any of the following options.
-The
-.Dv WNOHANG
-option
-is used to indicate that the call should not block if
-there are no processes that wish to report status.
-If the
-.Dv WUNTRACED
-option is set,
-children of the current process that are stopped
-due to a
-.Dv SIGTTIN , SIGTTOU , SIGTSTP ,
-or
-.Dv SIGSTOP
-signal also have
-their status reported.
-.Pp
-If
-.Fa rusage
-is non-zero, a summary of the resources used by the terminated
-process and all its
-children is returned (this information is currently not available
-for stopped processes).
-.Pp
-When the
-.Dv WNOHANG
-option is specified and no processes
-wish to report status,
-.Fn wait4
-returns a
-process id
-of 0.
-.Pp
-The
-.Fn waitpid
-call is identical to
-.Fn wait4
-with an
-.Fa rusage
-value of zero.
-The older
-.Fn wait3
-call is the same as
-.Fn wait4
-with a
-.Fa wpid
-value of -1.
-.Pp
-The following macros may be used to test the manner of exit of the process.
-One of the first three macros will evaluate to a non-zero (true) value:
-.Bl -tag -width Ds
-.It Fn WIFEXITED status
-True if the process terminated normally by a call to
-.Xr _exit 2
-or
-.Xr exit 3 .
-.It Fn WIFSIGNALED status
-True if the process terminated due to receipt of a signal.
-.It Fn WIFSTOPPED status
-True if the process has not terminated, but has stopped and can be restarted.
-This macro can be true only if the wait call specified the
-.Dv WUNTRACED
-option
-or if the child process is being traced (see
-.Xr ptrace 2 ) .
-.El
-.Pp
-Depending on the values of those macros, the following macros
-produce the remaining status information about the child process:
-.Bl -tag -width Ds
-.It Fn WEXITSTATUS status
-If
-.Fn WIFEXITED status
-is true, evaluates to the low-order 8 bits
-of the argument passed to
-.Xr _exit 2
-or
-.Xr exit 3
-by the child.
-.It Fn WTERMSIG status
-If
-.Fn WIFSIGNALED status
-is true, evaluates to the number of the signal
-that caused the termination of the process.
-.It Fn WCOREDUMP status
-If
-.Fn WIFSIGNALED status
-is true, evaluates as true if the termination
-of the process was accompanied by the creation of a core file
-containing an image of the process when the signal was received.
-.It Fn WSTOPSIG status
-If
-.Fn WIFSTOPPED status
-is true, evaluates to the number of the signal
-that caused the process to stop.
-.El
-.Sh NOTES
-See
-.Xr sigaction 2
-for a list of termination signals.
-A status of 0 indicates normal termination.
-.Pp
-If a parent process terminates without
-waiting for all of its child processes to terminate,
-the remaining child processes are assigned the parent
-process 1 ID (the init process ID).
-.Pp
-If a signal is caught while any of the
-.Fn wait
-calls is pending,
-the call may be interrupted or restarted when the signal-catching routine
-returns,
-depending on the options in effect for the signal;
-see
-.Xr intro 2 ,
-System call restart.
-.Sh RETURN VALUES
-If
-.Fn wait
-returns due to a stopped
-or terminated child process, the process ID of the child
-is returned to the calling process. Otherwise, a value of -1
-is returned and
-.Va errno
-is set to indicate the error.
-.Pp
-If
-.Fn wait4 ,
-.Fn wait3
-or
-.Fn waitpid
-returns due to a stopped
-or terminated child process, the process ID of the child
-is returned to the calling process.
-If there are no children not previously awaited,
--1 is returned with
-.Va errno
-set to
-.Bq Er ECHILD .
-Otherwise, if
-.Dv WNOHANG
-is specified and there are
-no stopped or exited children,
-0 is returned.
-If an error is detected or a caught signal aborts the call,
-a value of -1
-is returned and
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Wait
-will fail and return immediately if:
-.Bl -tag -width Er
-.It Bq Er ECHILD
-The calling process has no existing unwaited-for
-child processes.
-.It Bq Er EFAULT
-The
-.Fa status
-or
-.Fa rusage
-arguments point to an illegal address.
-(May not be detected before exit of a child process.)
-.It Bq Er EINTR
-The call was interrupted by a caught signal,
-or the signal did not have the
-.Dv SA_RESTART
-flag set.
-.El
-.Sh STANDARDS
-The
-.Fn wait
-and
-.Fn waitpid
-functions are defined by POSIX;
-.Fn wait4
-and
-.Fn wait3
-are not specified by POSIX.
-The
-.Fn WCOREDUMP
-macro
-and the ability to restart a pending
-.Fn wait
-call are extensions to the POSIX interface.
-.Sh SEE ALSO
-.Xr _exit 2 ,
-.Xr ptrace 2 ,
-.Xr sigaction 2 ,
-.Xr exit 3
-.Sh HISTORY
-A
-.Fn wait
-function call appeared in
-.At v6 .
diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2
deleted file mode 100644
index f8d8063..0000000
--- a/lib/libc/sys/write.2
+++ /dev/null
@@ -1,252 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)write.2 8.5 (Berkeley) 4/2/94
-.\"
-.Dd April 2, 1994
-.Dt WRITE 2
-.Os BSD 4
-.Sh NAME
-.Nm write ,
-.Nm writev
-.Nd write output
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/uio.h>
-.Fd #include <unistd.h>
-.Ft ssize_t
-.Fn write "int d" "const void *buf" "size_t nbytes"
-.Ft ssize_t
-.Fn writev "int d" "const struct iovec *iov" "int iovcnt"
-.Sh DESCRIPTION
-.Fn Write
-attempts to write
-.Fa nbytes
-of data to the object referenced by the descriptor
-.Fa d
-from the buffer pointed to by
-.Fa buf .
-.Fn Writev
-performs the same action, but gathers the output data
-from the
-.Fa iovcnt
-buffers specified by the members of the
-.Fa iov
-array: iov[0], iov[1], ..., iov[iovcnt\|-\|1].
-.Pp
-For
-.Fn writev ,
-the
-.Fa iovec
-structure is defined as:
-.Pp
-.Bd -literal -offset indent -compact
-struct iovec {
- char *iov_base; /* Base address. */
- size_t iov_len; /* Length. */
-};
-.Ed
-.Pp
-Each
-.Fa iovec
-entry specifies the base address and length of an area
-in memory from which data should be written.
-.Fn Writev
-will always write a complete area before proceeding
-to the next.
-.Pp
-On objects capable of seeking, the
-.Fn write
-starts at a position
-given by the pointer associated with
-.Fa d ,
-see
-.Xr lseek 2 .
-Upon return from
-.Fn write ,
-the pointer is incremented by the number of bytes which were written.
-.Pp
-Objects that are not capable of seeking always write from the current
-position. The value of the pointer associated with such an object
-is undefined.
-.Pp
-If the real user is not the super-user, then
-.Fn write
-clears the set-user-id bit on a file.
-This prevents penetration of system security
-by a user who
-.Dq captures
-a writable set-user-id file
-owned by the super-user.
-.Pp
-When using non-blocking I/O on objects such as sockets that are subject
-to flow control,
-.Fn write
-and
-.Fn writev
-may write fewer bytes than requested;
-the return value must be noted,
-and the remainder of the operation should be retried when possible.
-.Sh IMPLEMENTATION NOTES
-.Pp
-In the non-threaded library
-.Fn write
-is implemented as the
-.Va write
-syscall.
-.Pp
-In the threaded library, the
-.Va write
-syscall is assembled to
-.Fn _thread_sys_write
-and
-.Fn write
-is implemented as a function which locks
-.Va d
-for read and write, then calls
-.Fn _thread_sys_write .
-If the call to
-.Fn _thread_sys_write
-would block, a context switch is performed. Before returning,
-.Fn write
-unlocks
-.Va d .
-.Pp
-In the non-threaded library
-.Fn writev
-is implemented as the
-.Va writev
-syscall.
-.Pp
-In the threaded library, the
-.Va writev
-syscall is assembled to
-.Fn _thread_sys_writev
-and
-.Fn writev
-is implemented as a function which locks
-.Va d
-for read and write, then calls
-.Fn _thread_sys_writev .
-If the call to
-.Fn _thread_sys_writev
-would block, a context switch is performed. Before returning,
-.Fn writev
-unlocks
-.Va d .
-.Sh RETURN VALUES
-Upon successful completion the number of bytes which were written
-is returned. Otherwise a -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
-.Sh ERRORS
-.Fn Write
-and
-.Fn writev
-will fail and the file pointer will remain unchanged if:
-.Bl -tag -width Er
-.It Bq Er EBADF
-.Fa D
-is not a valid descriptor open for writing.
-.It Bq Er EPIPE
-An attempt is made to write to a pipe that is not open
-for reading by any process.
-.It Bq Er EPIPE
-An attempt is made to write to a socket of type
-.Dv SOCK_STREAM
-that is not connected to a peer socket.
-.It Bq Er EFBIG
-An attempt was made to write a file that exceeds the process's
-file size limit or the maximum file size.
-.It Bq Er EFAULT
-Part of
-.Fa iov
-or data to be written to the file
-points outside the process's allocated address space.
-.It Bq Er EINVAL
-The pointer associated with
-.Fa d
-was negative.
-.It Bq Er ENOSPC
-There is no free space remaining on the file system
-containing the file.
-.It Bq Er EDQUOT
-The user's quota of disk blocks on the file system
-containing the file has been exhausted.
-.It Bq Er EIO
-An I/O error occurred while reading from or writing to the file system.
-.It Bq Er EAGAIN
-The file was marked for non-blocking I/O,
-and no data could be written immediately.
-.El
-.Pp
-In addition,
-.Fn writev
-may return one of the following errors:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-.Fa Iovcnt
-was less than or equal to 0, or greater than
-.Dv UIO_MAXIOV .
-.It Bq Er EINVAL
-One of the
-.Fa iov_len
-values in the
-.Fa iov
-array was negative.
-.It Bq Er EINVAL
-The sum of the
-.Fa iov_len
-values in the
-.Fa iov
-array overflowed a 32-bit integer.
-.El
-.Sh SEE ALSO
-.Xr fcntl 2 ,
-.Xr lseek 2 ,
-.Xr open 2 ,
-.Xr pipe 2 ,
-.Xr select 2
-.Sh STANDARDS
-The
-.Fn write
-function call is expected to conform to
-.St -p1003.1-90 .
-.Sh HISTORY
-The
-.Fn writev
-function call
-appeared in
-.Bx 4.2 .
-A
-.Fn write
-function call appeared in
-.At v6 .
diff --git a/lib/libc/xdr/Makefile.inc b/lib/libc/xdr/Makefile.inc
deleted file mode 100644
index 848d4a5..0000000
--- a/lib/libc/xdr/Makefile.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-# @(#)Makefile 5.11 (Berkeley) 9/6/90
-# $Id: Makefile.inc,v 1.8 1997/05/28 16:29:12 wpaul Exp $
-
-.PATH: ${.CURDIR}/../libc/xdr ${.CURDIR}/.
-SRCS+= xdr.c xdr_array.c xdr_float.c xdr_mem.c \
- xdr_rec.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
-
-.if ${LIB} == "c"
-MAN3+= xdr.3
-
-MLINKS+= xdr.3 xdr_array.3 \
- xdr.3 xdr_bool.3 \
- xdr.3 xdr_bytes.3 \
- xdr.3 xdr_char.3 \
- xdr.3 xdr_destroy.3 \
- xdr.3 xdr_double.3 \
- xdr.3 xdr_enum.3 \
- xdr.3 xdr_float.3 \
- xdr.3 xdr_free.3 \
- xdr.3 xdr_getpos.3 \
- xdr.3 xdr_inline.3 \
- xdr.3 xdr_int.3 \
- xdr.3 xdr_long.3 \
- xdr.3 xdrmem_create.3 \
- xdr.3 xdr_opaque.3 \
- xdr.3 xdr_pointer.3 \
- xdr.3 xdrrec_create.3 \
- xdr.3 xdrrec_endofrecord.3 \
- xdr.3 xdrrec_eof.3 \
- xdr.3 xdrrec_skiprecord.3 \
- xdr.3 xdr_reference.3 \
- xdr.3 xdr_setpos.3 \
- xdr.3 xdr_short.3 \
- xdr.3 xdrstdio_create.3 \
- xdr.3 xdr_string.3 \
- xdr.3 xdr_u_char.3 \
- xdr.3 xdr_u_long.3 \
- xdr.3 xdr_u_short.3 \
- xdr.3 xdr_union.3 \
- xdr.3 xdr_vector.3 \
- xdr.3 xdr_void.3 \
- xdr.3 xdr_wrapstring.3
-.endif
diff --git a/lib/libc/xdr/xdr.3 b/lib/libc/xdr/xdr.3
deleted file mode 100644
index f64e5b1..0000000
--- a/lib/libc/xdr/xdr.3
+++ /dev/null
@@ -1,825 +0,0 @@
-.\" @(#)xdr.3n 2.2 88/08/03 4.0 RPCSRC; from 1.16 88/03/14 SMI
-.\" $Id: xdr.3,v 1.3 1996/10/05 22:26:44 wosch Exp $
-.\"
-.TH XDR 3 "16 February 1988"
-.SH NAME
-xdr \- library routines for external data representation
-.SH SYNOPSIS AND DESCRIPTION
-.LP
-These routines allow C programmers to describe
-arbitrary data structures in a machine-independent fashion.
-Data for remote procedure calls are transmitted using these
-routines.
-.LP
-.ft B
-.nf
-.sp .5
-xdr_array(xdrs, arrp, sizep, maxsize, elsize, elproc)
-\s-1XDR\s0 *xdrs;
-char **arrp;
-u_int *sizep, maxsize, elsize;
-xdrproc_t elproc;
-.fi
-.ft R
-.IP
-A filter primitive that translates between variable-length
-arrays
-and their corresponding external representations. The
-parameter
-.I arrp
-is the address of the pointer to the array, while
-.I sizep
-is the address of the element count of the array;
-this element count cannot exceed
-.IR maxsize .
-The parameter
-.I elsize
-is the
-.I sizeof
-each of the array's elements, and
-.I elproc
-is an
-.SM XDR
-filter that translates between
-the array elements' C form, and their external
-representation.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-xdr_bool(xdrs, bp)
-\s-1XDR\s0 *xdrs;
-bool_t *bp;
-.fi
-.ft R
-.IP
-A filter primitive that translates between booleans (C
-integers)
-and their external representations. When encoding data, this
-filter produces values of either one or zero.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-xdr_bytes(xdrs, sp, sizep, maxsize)
-\s-1XDR\s0 *xdrs;
-char **sp;
-u_int *sizep, maxsize;
-.fi
-.ft R
-.IP
-A filter primitive that translates between counted byte
-strings and their external representations.
-The parameter
-.I sp
-is the address of the string pointer. The length of the
-string is located at address
-.IR sizep ;
-strings cannot be longer than
-.IR maxsize .
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_char(xdrs, cp)
-\s-1XDR\s0 *xdrs;
-char *cp;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C characters
-and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-Note: encoded characters are not packed, and occupy 4 bytes
-each. For arrays of characters, it is worthwhile to
-consider
-.BR xdr_bytes(\|) ,
-.B xdr_opaque(\|)
-or
-.BR xdr_string(\|) .
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-void
-xdr_destroy(xdrs)
-\s-1XDR\s0 *xdrs;
-.fi
-.ft R
-.IP
-A macro that invokes the destroy routine associated with the
-.SM XDR
-stream,
-.IR xdrs .
-Destruction usually involves freeing private data structures
-associated with the stream. Using
-.I xdrs
-after invoking
-.B xdr_destroy(\|)
-is undefined.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_double(xdrs, dp)
-\s-1XDR\s0 *xdrs;
-double *dp;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C
-.B double
-precision numbers and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_enum(xdrs, ep)
-\s-1XDR\s0 *xdrs;
-enum_t *ep;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C
-.BR enum s
-(actually integers) and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-xdr_float(xdrs, fp)
-\s-1XDR\s0 *xdrs;
-float *fp;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C
-.BR float s
-and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-void
-xdr_free(proc, objp)
-xdrproc_t proc;
-char *objp;
-.fi
-.ft R
-.IP
-Generic freeing routine. The first argument is the
-.SM XDR
-routine for the object being freed. The second argument
-is a pointer to the object itself. Note: the pointer passed
-to this routine is
-.I not
-freed, but what it points to
-.I is
-freed (recursively).
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-u_int
-xdr_getpos(xdrs)
-\s-1XDR\s0 *xdrs;
-.fi
-.ft R
-.IP
-A macro that invokes the get-position routine
-associated with the
-.SM XDR
-stream,
-.IR xdrs .
-The routine returns an unsigned integer,
-which indicates the position of the
-.SM XDR
-byte stream.
-A desirable feature of
-.SM XDR
-streams is that simple arithmetic works with this number,
-although the
-.SM XDR
-stream instances need not guarantee this.
-.br
-.if t .ne 4
-.LP
-.ft B
-.nf
-.sp .5
-.br
-long *
-xdr_inline(xdrs, len)
-\s-1XDR\s0 *xdrs;
-int len;
-.fi
-.ft R
-.IP
-A macro that invokes the in-line routine associated with the
-.SM XDR
-stream,
-.IR xdrs .
-The routine returns a pointer
-to a contiguous piece of the stream's buffer;
-.I len
-is the byte length of the desired buffer.
-Note: pointer is cast to
-.BR "long *" .
-.IP
-Warning:
-.B xdr_inline(\|)
-may return
-.SM NULL
-(0)
-if it cannot allocate a contiguous piece of a buffer.
-Therefore the behavior may vary among stream instances;
-it exists for the sake of efficiency.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_int(xdrs, ip)
-\s-1XDR\s0 *xdrs;
-int *ip;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C integers
-and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_long(xdrs, lp)
-\s-1XDR\s0 *xdrs;
-long *lp;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C
-.B long
-integers and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 12
-.LP
-.ft B
-.nf
-.sp .5
-void
-xdrmem_create(xdrs, addr, size, op)
-\s-1XDR\s0 *xdrs;
-char *addr;
-u_int size;
-enum xdr_op op;
-.fi
-.ft R
-.IP
-This routine initializes the
-.SM XDR
-stream object pointed to by
-.IR xdrs .
-The stream's data is written to, or read from,
-a chunk of memory at location
-.I addr
-whose length is no more than
-.I size
-bytes long. The
-.I op
-determines the direction of the
-.SM XDR
-stream
-(either
-.BR \s-1XDR_ENCODE\s0 ,
-.BR \s-1XDR_DECODE\s0 ,
-or
-.BR \s-1XDR_FREE\s0 ).
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-xdr_opaque(xdrs, cp, cnt)
-\s-1XDR\s0 *xdrs;
-char *cp;
-u_int cnt;
-.fi
-.ft R
-.IP
-A filter primitive that translates between fixed size opaque
-data
-and its external representation.
-The parameter
-.I cp
-is the address of the opaque object, and
-.I cnt
-is its size in bytes.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-xdr_pointer(xdrs, objpp, objsize, xdrobj)
-\s-1XDR\s0 *xdrs;
-char **objpp;
-u_int objsize;
-xdrproc_t xdrobj;
-.fi
-.ft R
-.IP
-Like
-.B xdr_reference(\|)
-execpt that it serializes
-.SM NULL
-pointers, whereas
-.B xdr_reference(\|)
-does not. Thus,
-.B xdr_pointer(\|)
-can represent
-recursive data structures, such as binary trees or
-linked lists.
-.br
-.if t .ne 15
-.LP
-.ft B
-.nf
-.sp .5
-void
-xdrrec_create(xdrs, sendsize, recvsize, handle, readit, writeit)
-\s-1XDR\s0 *xdrs;
-u_int sendsize, recvsize;
-char *handle;
-int (*readit) (\|), (*writeit) (\|);
-.fi
-.ft R
-.IP
-This routine initializes the
-.SM XDR
-stream object pointed to by
-.IR xdrs .
-The stream's data is written to a buffer of size
-.IR sendsize ;
-a value of zero indicates the system should use a suitable
-default. The stream's data is read from a buffer of size
-.IR recvsize ;
-it too can be set to a suitable default by passing a zero
-value.
-When a stream's output buffer is full,
-.I writeit
-is called. Similarly, when a stream's input buffer is empty,
-.I readit
-is called. The behavior of these two routines is similar to
-the
-system calls
-.B read
-and
-.BR write ,
-except that
-.I handle
-is passed to the former routines as the first parameter.
-Note: the
-.SM XDR
-stream's
-.I op
-field must be set by the caller.
-.IP
-Warning: this
-.SM XDR
-stream implements an intermediate record stream.
-Therefore there are additional bytes in the stream
-to provide record boundary information.
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-xdrrec_endofrecord(xdrs, sendnow)
-\s-1XDR\s0 *xdrs;
-int sendnow;
-.fi
-.ft R
-.IP
-This routine can be invoked only on
-streams created by
-.BR xdrrec_create(\|) .
-The data in the output buffer is marked as a completed
-record,
-and the output buffer is optionally written out if
-.I sendnow
-is non-zero. This routine returns one if it succeeds, zero
-otherwise.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-xdrrec_eof(xdrs)
-\s-1XDR\s0 *xdrs;
-int empty;
-.fi
-.ft R
-.IP
-This routine can be invoked only on
-streams created by
-.BR xdrrec_create(\|) .
-After consuming the rest of the current record in the stream,
-this routine returns one if the stream has no more input,
-zero otherwise.
-.br
-.if t .ne 3
-.LP
-.ft B
-.nf
-.sp .5
-xdrrec_skiprecord(xdrs)
-\s-1XDR\s0 *xdrs;
-.fi
-.ft R
-.IP
-This routine can be invoked only on
-streams created by
-.BR xdrrec_create(\|) .
-It tells the
-.SM XDR
-implementation that the rest of the current record
-in the stream's input buffer should be discarded.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 11
-.LP
-.ft B
-.nf
-.sp .5
-xdr_reference(xdrs, pp, size, proc)
-\s-1XDR\s0 *xdrs;
-char **pp;
-u_int size;
-xdrproc_t proc;
-.fi
-.ft R
-.IP
-A primitive that provides pointer chasing within structures.
-The parameter
-.I pp
-is the address of the pointer;
-.I size
-is the
-.I sizeof
-the structure that
-.I *pp
-points to; and
-.I proc
-is an
-.SM XDR
-procedure that filters the structure
-between its C form and its external representation.
-This routine returns one if it succeeds, zero otherwise.
-.IP
-Warning: this routine does not understand
-.SM NULL
-pointers. Use
-.B xdr_pointer(\|)
-instead.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-xdr_setpos(xdrs, pos)
-\s-1XDR\s0 *xdrs;
-u_int pos;
-.fi
-.ft R
-.IP
-A macro that invokes the set position routine associated with
-the
-.SM XDR
-stream
-.IR xdrs .
-The parameter
-.I pos
-is a position value obtained from
-.BR xdr_getpos(\|) .
-This routine returns one if the
-.SM XDR
-stream could be repositioned,
-and zero otherwise.
-.IP
-Warning: it is difficult to reposition some types of
-.SM XDR
-streams, so this routine may fail with one
-type of stream and succeed with another.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-xdr_short(xdrs, sp)
-\s-1XDR\s0 *xdrs;
-short *sp;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C
-.B short
-integers and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-void
-xdrstdio_create(xdrs, file, op)
-\s-1XDR\s0 *xdrs;
-\s-1FILE\s0 *file;
-enum xdr_op op;
-.fi
-.ft R
-.IP
-This routine initializes the
-.SM XDR
-stream object pointed to by
-.IR xdrs .
-The
-.SM XDR
-stream data is written to, or read from, the Standard
-.B I/O
-stream
-.IR file .
-The parameter
-.I op
-determines the direction of the
-.SM XDR
-stream (either
-.BR \s-1XDR_ENCODE\s0 ,
-.BR \s-1XDR_DECODE\s0 ,
-or
-.BR \s-1XDR_FREE\s0 ).
-.IP
-Warning: the destroy routine associated with such
-.SM XDR
-streams calls
-.B fflush(\|)
-on the
-.I file
-stream, but never
-.BR fclose(\|) .
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-xdr_string(xdrs, sp, maxsize)
-\s-1XDR\s0
-*xdrs;
-char **sp;
-u_int maxsize;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C strings and
-their
-corresponding external representations.
-Strings cannot be longer than
-.IR maxsize .
-Note:
-.I sp
-is the address of the string's pointer.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 8
-.LP
-.ft B
-.nf
-.sp .5
-xdr_u_char(xdrs, ucp)
-\s-1XDR\s0 *xdrs;
-unsigned char *ucp;
-.fi
-.ft R
-.IP
-A filter primitive that translates between
-.B unsigned
-C characters and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 9
-.LP
-.ft B
-.nf
-.sp .5
-xdr_u_int(xdrs, up)
-\s-1XDR\s0 *xdrs;
-unsigned *up;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C
-.B unsigned
-integers and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_u_long(xdrs, ulp)
-\s-1XDR\s0 *xdrs;
-unsigned long *ulp;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C
-.B "unsigned long"
-integers and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 7
-.LP
-.ft B
-.nf
-.sp .5
-xdr_u_short(xdrs, usp)
-\s-1XDR\s0 *xdrs;
-unsigned short *usp;
-.fi
-.ft R
-.IP
-A filter primitive that translates between C
-.B "unsigned short"
-integers and their external representations.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 16
-.LP
-.ft B
-.nf
-.sp .5
-xdr_union(xdrs, dscmp, unp, choices, dfault)
-\s-1XDR\s0 *xdrs;
-int *dscmp;
-char *unp;
-struct xdr_discrim *choices;
-bool_t (*defaultarm) (\|); /* may equal \s-1NULL\s0 */
-.fi
-.ft R
-.IP
-A filter primitive that translates between a discriminated C
-.B union
-and its corresponding external representation. It first
-translates the discriminant of the union located at
-.IR dscmp .
-This discriminant is always an
-.BR enum_t .
-Next the union located at
-.I unp
-is translated. The parameter
-.I choices
-is a pointer to an array of
-.B xdr_discrim(\|)
-structures. Each structure contains an ordered pair of
-.RI [ value , proc ].
-If the union's discriminant is equal to the associated
-.IR value ,
-then the
-.I proc
-is called to translate the union. The end of the
-.B xdr_discrim(\|)
-structure array is denoted by a routine of value
-.SM NULL\s0.
-If the discriminant is not found in the
-.I choices
-array, then the
-.I defaultarm
-procedure is called (if it is not
-.SM NULL\s0).
-Returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 6
-.LP
-.ft B
-.nf
-.sp .5
-xdr_vector(xdrs, arrp, size, elsize, elproc)
-\s-1XDR\s0 *xdrs;
-char *arrp;
-u_int size, elsize;
-xdrproc_t elproc;
-.fi
-.ft R
-.IP
-A filter primitive that translates between fixed-length
-arrays
-and their corresponding external representations. The
-parameter
-.I arrp
-is the address of the pointer to the array, while
-.I size
-is the element count of the array. The parameter
-.I elsize
-is the
-.I sizeof
-each of the array's elements, and
-.I elproc
-is an
-.SM XDR
-filter that translates between
-the array elements' C form, and their external
-representation.
-This routine returns one if it succeeds, zero otherwise.
-.br
-.if t .ne 5
-.LP
-.ft B
-.nf
-.sp .5
-xdr_void(\|)
-.fi
-.ft R
-.IP
-This routine always returns one.
-It may be passed to
-.SM RPC
-routines that require a function parameter,
-where nothing is to be done.
-.br
-.if t .ne 10
-.LP
-.ft B
-.nf
-.sp .5
-xdr_wrapstring(xdrs, sp)
-\s-1XDR\s0 *xdrs;
-char **sp;
-.fi
-.ft R
-.IP
-A primitive that calls
-.B "xdr_string(xdrs, sp,\s-1MAXUN.UNSIGNED\s0 );"
-where
-.B
-.SM MAXUN.UNSIGNED
-is the maximum value of an unsigned integer.
-.B xdr_wrapstring(\|)
-is handy because the
-.SM RPC
-package passes a maximum of two
-.SM XDR
-routines as parameters, and
-.BR xdr_string(\|) ,
-one of the most frequently used primitives, requires three.
-Returns one if it succeeds, zero otherwise.
-.SH SEE ALSO
-.BR rpc (3)
-.LP
-The following manuals:
-.RS
-.ft I
-eXternal Data Representation Standard: Protocol Specification
-.br
-eXternal Data Representation: Sun Technical Notes
-.ft R
-.br
-.IR "\s-1XDR\s0: External Data Representation Standard" ,
-.SM RFC1014, Sun Microsystems, Inc.,
-.SM USC-ISI\s0.
diff --git a/lib/libc/xdr/xdr.c b/lib/libc/xdr/xdr.c
deleted file mode 100644
index 12a787e..0000000
--- a/lib/libc/xdr/xdr.c
+++ /dev/null
@@ -1,719 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr.c 1.35 87/08/12";*/
-/*static char *sccsid = "from: @(#)xdr.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: xdr.c,v 1.4 1996/12/30 14:07:07 peter Exp $";
-#endif
-
-/*
- * xdr.c, Generic XDR routines implementation.
- *
- * Copyright (C) 1986, Sun Microsystems, Inc.
- *
- * These are the "generic" xdr routines used to serialize and de-serialize
- * most common data items. See xdr.h for more info on the interface to
- * xdr.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-
-/*
- * constants specific to the xdr "protocol"
- */
-#define XDR_FALSE ((long) 0)
-#define XDR_TRUE ((long) 1)
-#define LASTUNSIGNED ((u_int) 0-1)
-
-/*
- * for unit alignment
- */
-static char xdr_zero[BYTES_PER_XDR_UNIT] = { 0, 0, 0, 0 };
-
-/*
- * Free a data structure using XDR
- * Not a filter, but a convenient utility nonetheless
- */
-void
-xdr_free(proc, objp)
- xdrproc_t proc;
- char *objp;
-{
- XDR x;
-
- x.x_op = XDR_FREE;
- (*proc)(&x, objp);
-}
-
-/*
- * XDR nothing
- */
-bool_t
-xdr_void(/* xdrs, addr */)
- /* XDR *xdrs; */
- /* caddr_t addr; */
-{
-
- return (TRUE);
-}
-
-
-/*
- * XDR integers
- */
-bool_t
-xdr_int(xdrs, ip)
- XDR *xdrs;
- int *ip;
-{
- long l;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- l = (long) *ip;
- return (XDR_PUTLONG(xdrs, &l));
-
- case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, &l)) {
- return (FALSE);
- }
- *ip = (int) l;
- return (TRUE);
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-/*
- * XDR unsigned integers
- */
-bool_t
-xdr_u_int(xdrs, up)
- XDR *xdrs;
- u_int *up;
-{
- u_long l;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- l = (u_long) *up;
- return (XDR_PUTLONG(xdrs, (long *)&l));
-
- case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, (long *)&l)) {
- return (FALSE);
- }
- *up = (u_int) l;
- return (TRUE);
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-
-/*
- * XDR long integers
- * same as xdr_u_long - open coded to save a proc call!
- */
-bool_t
-xdr_long(xdrs, lp)
- register XDR *xdrs;
- long *lp;
-{
- switch (xdrs->x_op) {
- case XDR_ENCODE:
- return (XDR_PUTLONG(xdrs, lp));
- case XDR_DECODE:
- return (XDR_GETLONG(xdrs, lp));
- case XDR_FREE:
- return (TRUE);
- }
-
- return (FALSE);
-}
-
-/*
- * XDR unsigned long integers
- * same as xdr_long - open coded to save a proc call!
- */
-bool_t
-xdr_u_long(xdrs, ulp)
- register XDR *xdrs;
- u_long *ulp;
-{
- switch (xdrs->x_op) {
- case XDR_ENCODE:
- return (XDR_PUTLONG(xdrs, (long *)ulp));
- case XDR_DECODE:
- return (XDR_GETLONG(xdrs, (long *)ulp));
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-
-/*
- * XDR 32-bit integers
- * same as xdr_u_int32_t - open coded to save a proc call!
- */
-bool_t
-xdr_int32_t(xdrs, int32_p)
- register XDR *xdrs;
- int32_t *int32_p;
-{
- long l;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- l = (long) *int32_p;
- return (XDR_PUTLONG(xdrs, &l));
-
- case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, &l)) {
- return (FALSE);
- }
- *int32_p = (int32_t) l;
- return (TRUE);
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-/*
- * XDR unsigned 32-bit integers
- * same as xdr_int32_t - open coded to save a proc call!
- */
-bool_t
-xdr_u_int32_t(xdrs, u_int32_p)
- register XDR *xdrs;
- u_int32_t *u_int32_p;
-{
- u_long l;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- l = (u_long) *u_int32_p;
- return (XDR_PUTLONG(xdrs, (long *)&l));
-
- case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, (long *)&l)) {
- return (FALSE);
- }
- *u_int32_p = (u_int32_t) l;
- return (TRUE);
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-
-/*
- * XDR short integers
- */
-bool_t
-xdr_short(xdrs, sp)
- register XDR *xdrs;
- short *sp;
-{
- long l;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- l = (long) *sp;
- return (XDR_PUTLONG(xdrs, &l));
-
- case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, &l)) {
- return (FALSE);
- }
- *sp = (short) l;
- return (TRUE);
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-/*
- * XDR unsigned short integers
- */
-bool_t
-xdr_u_short(xdrs, usp)
- register XDR *xdrs;
- u_short *usp;
-{
- u_long l;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- l = (u_long) *usp;
- return (XDR_PUTLONG(xdrs, (long *)&l));
-
- case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, (long *)&l)) {
- return (FALSE);
- }
- *usp = (u_short) l;
- return (TRUE);
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-
-/*
- * XDR 16-bit integers
- */
-bool_t
-xdr_int16_t(xdrs, int16_p)
- register XDR *xdrs;
- int16_t *int16_p;
-{
- long l;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- l = (long) *int16_p;
- return (XDR_PUTLONG(xdrs, &l));
-
- case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, &l)) {
- return (FALSE);
- }
- *int16_p = (int16_t) l;
- return (TRUE);
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-/*
- * XDR unsigned 16-bit integers
- */
-bool_t
-xdr_u_int16_t(xdrs, u_int16_p)
- register XDR *xdrs;
- u_int16_t *u_int16_p;
-{
- u_long l;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- l = (u_long) *u_int16_p;
- return (XDR_PUTLONG(xdrs, (long *)&l));
-
- case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, (long *)&l)) {
- return (FALSE);
- }
- *u_int16_p = (u_int16_t) l;
- return (TRUE);
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-
-/*
- * XDR a char
- */
-bool_t
-xdr_char(xdrs, cp)
- XDR *xdrs;
- char *cp;
-{
- int i;
-
- i = (*cp);
- if (!xdr_int(xdrs, &i)) {
- return (FALSE);
- }
- *cp = i;
- return (TRUE);
-}
-
-/*
- * XDR an unsigned char
- */
-bool_t
-xdr_u_char(xdrs, cp)
- XDR *xdrs;
- u_char *cp;
-{
- u_int u;
-
- u = (*cp);
- if (!xdr_u_int(xdrs, &u)) {
- return (FALSE);
- }
- *cp = u;
- return (TRUE);
-}
-
-/*
- * XDR booleans
- */
-bool_t
-xdr_bool(xdrs, bp)
- register XDR *xdrs;
- bool_t *bp;
-{
- long lb;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- lb = *bp ? XDR_TRUE : XDR_FALSE;
- return (XDR_PUTLONG(xdrs, &lb));
-
- case XDR_DECODE:
- if (!XDR_GETLONG(xdrs, &lb)) {
- return (FALSE);
- }
- *bp = (lb == XDR_FALSE) ? FALSE : TRUE;
- return (TRUE);
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-/*
- * XDR enumerations
- */
-bool_t
-xdr_enum(xdrs, ep)
- XDR *xdrs;
- enum_t *ep;
-{
-#ifndef lint
- enum sizecheck { SIZEVAL }; /* used to find the size of an enum */
-
- /*
- * enums are treated as ints
- */
- if (sizeof (enum sizecheck) == sizeof (long)) {
- return (xdr_long(xdrs, (long *)ep));
- } else if (sizeof (enum sizecheck) == sizeof (int)) {
- return (xdr_int(xdrs, (int *)ep));
- } else if (sizeof (enum sizecheck) == sizeof (short)) {
- return (xdr_short(xdrs, (short *)ep));
- } else {
- return (FALSE);
- }
-#else
- (void) (xdr_short(xdrs, (short *)ep));
- (void) (xdr_int(xdrs, (int *)ep));
- return (xdr_long(xdrs, (long *)ep));
-#endif
-}
-
-/*
- * XDR opaque data
- * Allows the specification of a fixed size sequence of opaque bytes.
- * cp points to the opaque object and cnt gives the byte length.
- */
-bool_t
-xdr_opaque(xdrs, cp, cnt)
- register XDR *xdrs;
- caddr_t cp;
- register u_int cnt;
-{
- register u_int rndup;
- static crud[BYTES_PER_XDR_UNIT];
-
- /*
- * if no data we are done
- */
- if (cnt == 0)
- return (TRUE);
-
- /*
- * round byte count to full xdr units
- */
- rndup = cnt % BYTES_PER_XDR_UNIT;
- if (rndup > 0)
- rndup = BYTES_PER_XDR_UNIT - rndup;
-
- if (xdrs->x_op == XDR_DECODE) {
- if (!XDR_GETBYTES(xdrs, cp, cnt)) {
- return (FALSE);
- }
- if (rndup == 0)
- return (TRUE);
- return (XDR_GETBYTES(xdrs, (caddr_t)crud, rndup));
- }
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!XDR_PUTBYTES(xdrs, cp, cnt)) {
- return (FALSE);
- }
- if (rndup == 0)
- return (TRUE);
- return (XDR_PUTBYTES(xdrs, xdr_zero, rndup));
- }
-
- if (xdrs->x_op == XDR_FREE) {
- return (TRUE);
- }
-
- return (FALSE);
-}
-
-/*
- * XDR counted bytes
- * *cpp is a pointer to the bytes, *sizep is the count.
- * If *cpp is NULL maxsize bytes are allocated
- */
-bool_t
-xdr_bytes(xdrs, cpp, sizep, maxsize)
- register XDR *xdrs;
- char **cpp;
- register u_int *sizep;
- u_int maxsize;
-{
- register char *sp = *cpp; /* sp is the actual string pointer */
- register u_int nodesize;
-
- /*
- * first deal with the length since xdr bytes are counted
- */
- if (! xdr_u_int(xdrs, sizep)) {
- return (FALSE);
- }
- nodesize = *sizep;
- if ((nodesize > maxsize) && (xdrs->x_op != XDR_FREE)) {
- return (FALSE);
- }
-
- /*
- * now deal with the actual bytes
- */
- switch (xdrs->x_op) {
-
- case XDR_DECODE:
- if (nodesize == 0) {
- return (TRUE);
- }
- if (sp == NULL) {
- *cpp = sp = (char *)mem_alloc(nodesize);
- }
- if (sp == NULL) {
- (void) fprintf(stderr, "xdr_bytes: out of memory\n");
- return (FALSE);
- }
- /* fall into ... */
-
- case XDR_ENCODE:
- return (xdr_opaque(xdrs, sp, nodesize));
-
- case XDR_FREE:
- if (sp != NULL) {
- mem_free(sp, nodesize);
- *cpp = NULL;
- }
- return (TRUE);
- }
- return (FALSE);
-}
-
-/*
- * Implemented here due to commonality of the object.
- */
-bool_t
-xdr_netobj(xdrs, np)
- XDR *xdrs;
- struct netobj *np;
-{
-
- return (xdr_bytes(xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ));
-}
-
-/*
- * XDR a descriminated union
- * Support routine for discriminated unions.
- * You create an array of xdrdiscrim structures, terminated with
- * an entry with a null procedure pointer. The routine gets
- * the discriminant value and then searches the array of xdrdiscrims
- * looking for that value. It calls the procedure given in the xdrdiscrim
- * to handle the discriminant. If there is no specific routine a default
- * routine may be called.
- * If there is no specific or default routine an error is returned.
- */
-bool_t
-xdr_union(xdrs, dscmp, unp, choices, dfault)
- register XDR *xdrs;
- enum_t *dscmp; /* enum to decide which arm to work on */
- char *unp; /* the union itself */
- struct xdr_discrim *choices; /* [value, xdr proc] for each arm */
- xdrproc_t dfault; /* default xdr routine */
-{
- register enum_t dscm;
-
- /*
- * we deal with the discriminator; it's an enum
- */
- if (! xdr_enum(xdrs, dscmp)) {
- return (FALSE);
- }
- dscm = *dscmp;
-
- /*
- * search choices for a value that matches the discriminator.
- * if we find one, execute the xdr routine for that value.
- */
- for (; choices->proc != NULL_xdrproc_t; choices++) {
- if (choices->value == dscm)
- return ((*(choices->proc))(xdrs, unp, LASTUNSIGNED));
- }
-
- /*
- * no match - execute the default xdr routine if there is one
- */
- return ((dfault == NULL_xdrproc_t) ? FALSE :
- (*dfault)(xdrs, unp, LASTUNSIGNED));
-}
-
-
-/*
- * Non-portable xdr primitives.
- * Care should be taken when moving these routines to new architectures.
- */
-
-
-/*
- * XDR null terminated ASCII strings
- * xdr_string deals with "C strings" - arrays of bytes that are
- * terminated by a NULL character. The parameter cpp references a
- * pointer to storage; If the pointer is null, then the necessary
- * storage is allocated. The last parameter is the max allowed length
- * of the string as specified by a protocol.
- */
-bool_t
-xdr_string(xdrs, cpp, maxsize)
- register XDR *xdrs;
- char **cpp;
- u_int maxsize;
-{
- register char *sp = *cpp; /* sp is the actual string pointer */
- u_int size;
- u_int nodesize;
-
- /*
- * first deal with the length since xdr strings are counted-strings
- */
- switch (xdrs->x_op) {
- case XDR_FREE:
- if (sp == NULL) {
- return(TRUE); /* already free */
- }
- /* fall through... */
- case XDR_ENCODE:
- size = strlen(sp);
- break;
- }
- if (! xdr_u_int(xdrs, &size)) {
- return (FALSE);
- }
- if (size > maxsize) {
- return (FALSE);
- }
- nodesize = size + 1;
-
- /*
- * now deal with the actual bytes
- */
- switch (xdrs->x_op) {
-
- case XDR_DECODE:
- if (nodesize == 0) {
- return (TRUE);
- }
- if (sp == NULL)
- *cpp = sp = (char *)mem_alloc(nodesize);
- if (sp == NULL) {
- (void) fprintf(stderr, "xdr_string: out of memory\n");
- return (FALSE);
- }
- sp[size] = 0;
- /* fall into ... */
-
- case XDR_ENCODE:
- return (xdr_opaque(xdrs, sp, size));
-
- case XDR_FREE:
- mem_free(sp, nodesize);
- *cpp = NULL;
- return (TRUE);
- }
- return (FALSE);
-}
-
-/*
- * Wrapper for xdr_string that can be called directly from
- * routines like clnt_call
- */
-bool_t
-xdr_wrapstring(xdrs, cpp)
- XDR *xdrs;
- char **cpp;
-{
- return xdr_string(xdrs, cpp, LASTUNSIGNED);
-}
diff --git a/lib/libc/xdr/xdr_array.c b/lib/libc/xdr/xdr_array.c
deleted file mode 100644
index f9c34ab..0000000
--- a/lib/libc/xdr/xdr_array.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)xdr_array.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: xdr_array.c,v 1.4 1996/12/30 14:07:08 peter Exp $";
-#endif
-
-/*
- * xdr_array.c, Generic XDR routines impelmentation.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * These are the "non-trivial" xdr primitives used to serialize and de-serialize
- * arrays. See xdr.h for more info on the interface to xdr.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-
-#define LASTUNSIGNED ((u_int) 0-1)
-
-/*
- * XDR an array of arbitrary elements
- * *addrp is a pointer to the array, *sizep is the number of elements.
- * If addrp is NULL (*sizep * elsize) bytes are allocated.
- * elsize is the size (in bytes) of each element, and elproc is the
- * xdr procedure to call to handle each element of the array.
- */
-bool_t
-xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
- register XDR *xdrs;
- caddr_t *addrp; /* array pointer */
- u_int *sizep; /* number of elements */
- u_int maxsize; /* max numberof elements */
- u_int elsize; /* size in bytes of each element */
- xdrproc_t elproc; /* xdr routine to handle each element */
-{
- register u_int i;
- register caddr_t target = *addrp;
- register u_int c; /* the actual element count */
- register bool_t stat = TRUE;
- register u_int nodesize;
-
- /* like strings, arrays are really counted arrays */
- if (! xdr_u_int(xdrs, sizep)) {
- return (FALSE);
- }
- c = *sizep;
- if ((c > maxsize) && (xdrs->x_op != XDR_FREE)) {
- return (FALSE);
- }
- nodesize = c * elsize;
-
- /*
- * if we are deserializing, we may need to allocate an array.
- * We also save time by checking for a null array if we are freeing.
- */
- if (target == NULL)
- switch (xdrs->x_op) {
- case XDR_DECODE:
- if (c == 0)
- return (TRUE);
- *addrp = target = mem_alloc(nodesize);
- if (target == NULL) {
- (void) fprintf(stderr,
- "xdr_array: out of memory\n");
- return (FALSE);
- }
- memset(target, 0, nodesize);
- break;
-
- case XDR_FREE:
- return (TRUE);
- }
-
- /*
- * now we xdr each element of array
- */
- for (i = 0; (i < c) && stat; i++) {
- stat = (*elproc)(xdrs, target, LASTUNSIGNED);
- target += elsize;
- }
-
- /*
- * the array may need freeing
- */
- if (xdrs->x_op == XDR_FREE) {
- mem_free(*addrp, nodesize);
- *addrp = NULL;
- }
- return (stat);
-}
-
-/*
- * xdr_vector():
- *
- * XDR a fixed length array. Unlike variable-length arrays,
- * the storage of fixed length arrays is static and unfreeable.
- * > basep: base of the array
- * > size: size of the array
- * > elemsize: size of each element
- * > xdr_elem: routine to XDR each element
- */
-bool_t
-xdr_vector(xdrs, basep, nelem, elemsize, xdr_elem)
- register XDR *xdrs;
- register char *basep;
- register u_int nelem;
- register u_int elemsize;
- register xdrproc_t xdr_elem;
-{
- register u_int i;
- register char *elptr;
-
- elptr = basep;
- for (i = 0; i < nelem; i++) {
- if (! (*xdr_elem)(xdrs, elptr, LASTUNSIGNED)) {
- return(FALSE);
- }
- elptr += elemsize;
- }
- return(TRUE);
-}
-
diff --git a/lib/libc/xdr/xdr_float.c b/lib/libc/xdr/xdr_float.c
deleted file mode 100644
index b8c8f60..0000000
--- a/lib/libc/xdr/xdr_float.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)xdr_float.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: xdr_float.c,v 1.3 1996/12/30 14:07:08 peter Exp $";
-#endif
-
-/*
- * xdr_float.c, Generic XDR routines impelmentation.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * These are the "floating point" xdr routines used to (de)serialize
- * most common data items. See xdr.h for more info on the interface to
- * xdr.
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-
-/*
- * NB: Not portable.
- * This routine works on machines with IEEE754 FP and Vaxen.
- */
-
-#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
- defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
- defined(__arm32__) || defined(__ppc__)
-#include <machine/endian.h>
-#define IEEEFP
-#endif
-
-#ifdef vax
-
-/* What IEEE single precision floating point looks like on a Vax */
-struct ieee_single {
- unsigned int mantissa: 23;
- unsigned int exp : 8;
- unsigned int sign : 1;
-};
-
-/* Vax single precision floating point */
-struct vax_single {
- unsigned int mantissa1 : 7;
- unsigned int exp : 8;
- unsigned int sign : 1;
- unsigned int mantissa2 : 16;
-};
-
-#define VAX_SNG_BIAS 0x81
-#define IEEE_SNG_BIAS 0x7f
-
-static struct sgl_limits {
- struct vax_single s;
- struct ieee_single ieee;
-} sgl_limits[2] = {
- {{ 0x7f, 0xff, 0x0, 0xffff }, /* Max Vax */
- { 0x0, 0xff, 0x0 }}, /* Max IEEE */
- {{ 0x0, 0x0, 0x0, 0x0 }, /* Min Vax */
- { 0x0, 0x0, 0x0 }} /* Min IEEE */
-};
-#endif /* vax */
-
-bool_t
-xdr_float(xdrs, fp)
- register XDR *xdrs;
- register float *fp;
-{
-#ifdef IEEEFP
- bool_t rv;
- long tmpl;
-#else
- struct ieee_single is;
- struct vax_single vs, *vsp;
- struct sgl_limits *lim;
- int i;
-#endif
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
-#ifdef IEEEFP
- tmpl = *(int32_t *)fp;
- return (XDR_PUTLONG(xdrs, &tmpl));
-#else
- vs = *((struct vax_single *)fp);
- for (i = 0, lim = sgl_limits;
- i < sizeof(sgl_limits)/sizeof(struct sgl_limits);
- i++, lim++) {
- if ((vs.mantissa2 == lim->s.mantissa2) &&
- (vs.exp == lim->s.exp) &&
- (vs.mantissa1 == lim->s.mantissa1)) {
- is = lim->ieee;
- goto shipit;
- }
- }
- is.exp = vs.exp - VAX_SNG_BIAS + IEEE_SNG_BIAS;
- is.mantissa = (vs.mantissa1 << 16) | vs.mantissa2;
- shipit:
- is.sign = vs.sign;
- return (XDR_PUTLONG(xdrs, (long *)&is));
-#endif
-
- case XDR_DECODE:
-#ifdef IEEEFP
- rv = XDR_GETLONG(xdrs, &tmpl);
- *(int32_t *)fp = tmpl;
- return (rv);
-#else
- vsp = (struct vax_single *)fp;
- if (!XDR_GETLONG(xdrs, (long *)&is))
- return (FALSE);
- for (i = 0, lim = sgl_limits;
- i < sizeof(sgl_limits)/sizeof(struct sgl_limits);
- i++, lim++) {
- if ((is.exp == lim->ieee.exp) &&
- (is.mantissa == lim->ieee.mantissa)) {
- *vsp = lim->s;
- goto doneit;
- }
- }
- vsp->exp = is.exp - IEEE_SNG_BIAS + VAX_SNG_BIAS;
- vsp->mantissa2 = is.mantissa;
- vsp->mantissa1 = (is.mantissa >> 16);
- doneit:
- vsp->sign = is.sign;
- return (TRUE);
-#endif
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
-
-#ifdef vax
-/* What IEEE double precision floating point looks like on a Vax */
-struct ieee_double {
- unsigned int mantissa1 : 20;
- unsigned int exp : 11;
- unsigned int sign : 1;
- unsigned int mantissa2 : 32;
-};
-
-/* Vax double precision floating point */
-struct vax_double {
- unsigned int mantissa1 : 7;
- unsigned int exp : 8;
- unsigned int sign : 1;
- unsigned int mantissa2 : 16;
- unsigned int mantissa3 : 16;
- unsigned int mantissa4 : 16;
-};
-
-#define VAX_DBL_BIAS 0x81
-#define IEEE_DBL_BIAS 0x3ff
-#define MASK(nbits) ((1 << nbits) - 1)
-
-static struct dbl_limits {
- struct vax_double d;
- struct ieee_double ieee;
-} dbl_limits[2] = {
- {{ 0x7f, 0xff, 0x0, 0xffff, 0xffff, 0xffff }, /* Max Vax */
- { 0x0, 0x7ff, 0x0, 0x0 }}, /* Max IEEE */
- {{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, /* Min Vax */
- { 0x0, 0x0, 0x0, 0x0 }} /* Min IEEE */
-};
-
-#endif /* vax */
-
-
-bool_t
-xdr_double(xdrs, dp)
- register XDR *xdrs;
- double *dp;
-{
-#ifdef IEEEFP
- register int32_t *i32p;
- bool_t rv;
- long tmpl;
-#else
- register long *lp;
- struct ieee_double id;
- struct vax_double vd;
- register struct dbl_limits *lim;
- int i;
-#endif
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
-#ifdef IEEEFP
- i32p = (int32_t *)dp;
-#if BYTE_ORDER == BIG_ENDIAN
- tmpl = *i32p++;
- rv = XDR_PUTLONG(xdrs, &tmpl);
- if (!rv)
- return (rv);
- tmpl = *i32p;
- rv = XDR_PUTLONG(xdrs, &tmpl);
-#else
- tmpl = *(i32p+1);
- rv = XDR_PUTLONG(xdrs, &tmpl);
- if (!rv)
- return (rv);
- tmpl = *i32p;
- rv = XDR_PUTLONG(xdrs, &tmpl);
-#endif
- return (rv);
-#else
- vd = *((struct vax_double *)dp);
- for (i = 0, lim = dbl_limits;
- i < sizeof(dbl_limits)/sizeof(struct dbl_limits);
- i++, lim++) {
- if ((vd.mantissa4 == lim->d.mantissa4) &&
- (vd.mantissa3 == lim->d.mantissa3) &&
- (vd.mantissa2 == lim->d.mantissa2) &&
- (vd.mantissa1 == lim->d.mantissa1) &&
- (vd.exp == lim->d.exp)) {
- id = lim->ieee;
- goto shipit;
- }
- }
- id.exp = vd.exp - VAX_DBL_BIAS + IEEE_DBL_BIAS;
- id.mantissa1 = (vd.mantissa1 << 13) | (vd.mantissa2 >> 3);
- id.mantissa2 = ((vd.mantissa2 & MASK(3)) << 29) |
- (vd.mantissa3 << 13) |
- ((vd.mantissa4 >> 3) & MASK(13));
- shipit:
- id.sign = vd.sign;
- lp = (long *)&id;
- return (XDR_PUTLONG(xdrs, lp++) && XDR_PUTLONG(xdrs, lp));
-#endif
-
- case XDR_DECODE:
-#ifdef IEEEFP
- i32p = (int32_t *)dp;
-#if BYTE_ORDER == BIG_ENDIAN
- rv = XDR_GETLONG(xdrs, &tmpl);
- *i32p++ = tmpl;
- if (!rv)
- return (rv);
- rv = XDR_GETLONG(xdrs, &tmpl);
- *i32p = tmpl;
-#else
- rv = XDR_GETLONG(xdrs, &tmpl);
- *(i32p+1) = tmpl;
- if (!rv)
- return (rv);
- rv = XDR_GETLONG(xdrs, &tmpl);
- *i32p = tmpl;
-#endif
- return (rv);
-#else
- lp = (long *)&id;
- if (!XDR_GETLONG(xdrs, lp++) || !XDR_GETLONG(xdrs, lp))
- return (FALSE);
- for (i = 0, lim = dbl_limits;
- i < sizeof(dbl_limits)/sizeof(struct dbl_limits);
- i++, lim++) {
- if ((id.mantissa2 == lim->ieee.mantissa2) &&
- (id.mantissa1 == lim->ieee.mantissa1) &&
- (id.exp == lim->ieee.exp)) {
- vd = lim->d;
- goto doneit;
- }
- }
- vd.exp = id.exp - IEEE_DBL_BIAS + VAX_DBL_BIAS;
- vd.mantissa1 = (id.mantissa1 >> 13);
- vd.mantissa2 = ((id.mantissa1 & MASK(13)) << 3) |
- (id.mantissa2 >> 29);
- vd.mantissa3 = (id.mantissa2 >> 13);
- vd.mantissa4 = (id.mantissa2 << 3);
- doneit:
- vd.sign = id.sign;
- *dp = *((double *)&vd);
- return (TRUE);
-#endif
-
- case XDR_FREE:
- return (TRUE);
- }
- return (FALSE);
-}
diff --git a/lib/libc/xdr/xdr_mem.c b/lib/libc/xdr/xdr_mem.c
deleted file mode 100644
index 36b9ada..0000000
--- a/lib/libc/xdr/xdr_mem.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_mem.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)xdr_mem.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: xdr_mem.c,v 1.4 1996/12/30 14:07:09 peter Exp $";
-#endif
-
-/*
- * xdr_mem.h, XDR implementation using memory buffers.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * If you have some data to be interpreted as external data representation
- * or to be converted to external data representation in a memory buffer,
- * then this is the package for you.
- *
- */
-
-#include <string.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <netinet/in.h>
-
-static bool_t xdrmem_getlong_aligned();
-static bool_t xdrmem_putlong_aligned();
-static bool_t xdrmem_getlong_unaligned();
-static bool_t xdrmem_putlong_unaligned();
-static bool_t xdrmem_getbytes();
-static bool_t xdrmem_putbytes();
-static u_int xdrmem_getpos(); /* XXX w/64-bit pointers, u_int not enough! */
-static bool_t xdrmem_setpos();
-static int32_t *xdrmem_inline_aligned();
-static int32_t *xdrmem_inline_unaligned();
-static void xdrmem_destroy();
-
-static struct xdr_ops xdrmem_ops_aligned = {
- xdrmem_getlong_aligned,
- xdrmem_putlong_aligned,
- xdrmem_getbytes,
- xdrmem_putbytes,
- xdrmem_getpos,
- xdrmem_setpos,
- xdrmem_inline_aligned,
- xdrmem_destroy
-};
-
-static struct xdr_ops xdrmem_ops_unaligned = {
- xdrmem_getlong_unaligned,
- xdrmem_putlong_unaligned,
- xdrmem_getbytes,
- xdrmem_putbytes,
- xdrmem_getpos,
- xdrmem_setpos,
- xdrmem_inline_unaligned,
- xdrmem_destroy
-};
-
-/*
- * The procedure xdrmem_create initializes a stream descriptor for a
- * memory buffer.
- */
-void
-xdrmem_create(xdrs, addr, size, op)
- register XDR *xdrs;
- caddr_t addr;
- u_int size;
- enum xdr_op op;
-{
-
- xdrs->x_op = op;
- xdrs->x_ops = ((size_t)addr & (sizeof(int32_t) - 1))
- ? &xdrmem_ops_unaligned : &xdrmem_ops_aligned;
- xdrs->x_private = xdrs->x_base = addr;
- xdrs->x_handy = size;
-}
-
-static void
-xdrmem_destroy(/*xdrs*/)
- /*XDR *xdrs;*/
-{
-
-}
-
-static bool_t
-xdrmem_getlong_aligned(xdrs, lp)
- register XDR *xdrs;
- long *lp;
-{
-
- if ((xdrs->x_handy -= sizeof(int32_t)) < 0)
- return (FALSE);
- *lp = ntohl(*(int32_t *)(xdrs->x_private));
- xdrs->x_private += sizeof(int32_t);
- return (TRUE);
-}
-
-static bool_t
-xdrmem_putlong_aligned(xdrs, lp)
- register XDR *xdrs;
- long *lp;
-{
-
- if ((xdrs->x_handy -= sizeof(int32_t)) < 0)
- return (FALSE);
- *(int32_t *)xdrs->x_private = htonl(*lp);
- xdrs->x_private += sizeof(int32_t);
- return (TRUE);
-}
-
-static bool_t
-xdrmem_getlong_unaligned(xdrs, lp)
- register XDR *xdrs;
- long *lp;
-{
- int32_t l;
-
- if ((xdrs->x_handy -= sizeof(int32_t)) < 0)
- return (FALSE);
- memcpy(&l, xdrs->x_private, sizeof(int32_t));
- *lp = ntohl(l);
- xdrs->x_private += sizeof(int32_t);
- return (TRUE);
-}
-
-static bool_t
-xdrmem_putlong_unaligned(xdrs, lp)
- register XDR *xdrs;
- long *lp;
-{
- int32_t l;
-
- if ((xdrs->x_handy -= sizeof(int32_t)) < 0)
- return (FALSE);
- l = htonl(*lp);
- memcpy(xdrs->x_private, &l, sizeof(int32_t));
- xdrs->x_private += sizeof(int32_t);
- return (TRUE);
-}
-
-static bool_t
-xdrmem_getbytes(xdrs, addr, len)
- register XDR *xdrs;
- caddr_t addr;
- register u_int len;
-{
-
- if ((xdrs->x_handy -= len) < 0)
- return (FALSE);
- memcpy(addr, xdrs->x_private, len);
- xdrs->x_private += len;
- return (TRUE);
-}
-
-static bool_t
-xdrmem_putbytes(xdrs, addr, len)
- register XDR *xdrs;
- caddr_t addr;
- register u_int len;
-{
-
- if ((xdrs->x_handy -= len) < 0)
- return (FALSE);
- memcpy(xdrs->x_private, addr, len);
- xdrs->x_private += len;
- return (TRUE);
-}
-
-static u_int
-xdrmem_getpos(xdrs)
- register XDR *xdrs;
-{
-
- /* XXX w/64-bit pointers, u_int not enough! */
- return ((u_long)xdrs->x_private - (u_long)xdrs->x_base);
-}
-
-static bool_t
-xdrmem_setpos(xdrs, pos)
- register XDR *xdrs;
- u_int pos;
-{
- register caddr_t newaddr = xdrs->x_base + pos;
- register caddr_t lastaddr = xdrs->x_private + xdrs->x_handy;
-
- if ((long)newaddr > (long)lastaddr)
- return (FALSE);
- xdrs->x_private = newaddr;
- xdrs->x_handy = (long)lastaddr - (long)newaddr;
- return (TRUE);
-}
-
-static int32_t *
-xdrmem_inline_aligned(xdrs, len)
- register XDR *xdrs;
- int len;
-{
- int32_t *buf = 0;
-
- if (xdrs->x_handy >= len) {
- xdrs->x_handy -= len;
- buf = (int32_t *) xdrs->x_private;
- xdrs->x_private += len;
- }
- return (buf);
-}
-
-static int32_t *
-xdrmem_inline_unaligned(xdrs, len)
- register XDR *xdrs;
- int len;
-{
-
- return (0);
-}
diff --git a/lib/libc/xdr/xdr_rec.c b/lib/libc/xdr/xdr_rec.c
deleted file mode 100644
index f54172b..0000000
--- a/lib/libc/xdr/xdr_rec.c
+++ /dev/null
@@ -1,586 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_rec.c 1.21 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)xdr_rec.c 2.2 88/08/01 4.0 RPCSRC";*/
-static char *rcsid = "$Id: xdr_rec.c,v 1.5 1996/12/30 14:07:10 peter Exp $";
-#endif
-
-/*
- * xdr_rec.c, Implements TCP/IP based XDR streams with a "record marking"
- * layer above tcp (for rpc's use).
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * These routines interface XDRSTREAMS to a tcp/ip connection.
- * There is a record marking layer between the xdr stream
- * and the tcp transport level. A record is composed on one or more
- * record fragments. A record fragment is a thirty-two bit header followed
- * by n bytes of data, where n is contained in the header. The header
- * is represented as a htonl(u_long). Thegh order bit encodes
- * whether or not the fragment is the last fragment of the record
- * (1 => fragment is last, 0 => more fragments to follow.
- * The other 31 bits encode the byte length of the fragment.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <netinet/in.h>
-
-static u_int fix_buf_size();
-static bool_t flush_out();
-static bool_t get_input_bytes();
-static bool_t set_input_fragment();
-static bool_t skip_input_bytes();
-
-static bool_t xdrrec_getlong();
-static bool_t xdrrec_putlong();
-static bool_t xdrrec_getbytes();
-static bool_t xdrrec_putbytes();
-static u_int xdrrec_getpos();
-static bool_t xdrrec_setpos();
-static int32_t *xdrrec_inline();
-static void xdrrec_destroy();
-
-static struct xdr_ops xdrrec_ops = {
- xdrrec_getlong,
- xdrrec_putlong,
- xdrrec_getbytes,
- xdrrec_putbytes,
- xdrrec_getpos,
- xdrrec_setpos,
- xdrrec_inline,
- xdrrec_destroy
-};
-
-/*
- * A record is composed of one or more record fragments.
- * A record fragment is a two-byte header followed by zero to
- * 2**32-1 bytes. The header is treated as a long unsigned and is
- * encode/decoded to the network via htonl/ntohl. The low order 31 bits
- * are a byte count of the fragment. The highest order bit is a boolean:
- * 1 => this fragment is the last fragment of the record,
- * 0 => this fragment is followed by more fragment(s).
- *
- * The fragment/record machinery is not general; it is constructed to
- * meet the needs of xdr and rpc based on tcp.
- */
-
-#define LAST_FRAG ((u_int32_t)(1 << 31))
-
-typedef struct rec_strm {
- caddr_t tcp_handle;
- caddr_t the_buffer;
- /*
- * out-goung bits
- */
- int (*writeit) __P((caddr_t, caddr_t, int));
- caddr_t out_base; /* output buffer (points to frag header) */
- caddr_t out_finger; /* next output position */
- caddr_t out_boundry; /* data cannot up to this address */
- u_int32_t *frag_header; /* beginning of current fragment */
- bool_t frag_sent; /* true if buffer sent in middle of record */
- /*
- * in-coming bits
- */
- int (*readit) __P((caddr_t, caddr_t, int));
- u_long in_size; /* fixed size of the input buffer */
- caddr_t in_base;
- caddr_t in_finger; /* location of next byte to be had */
- caddr_t in_boundry; /* can read up to this location */
- long fbtbc; /* fragment bytes to be consumed */
- bool_t last_frag;
- u_int sendsize;
- u_int recvsize;
-} RECSTREAM;
-
-
-/*
- * Create an xdr handle for xdrrec
- * xdrrec_create fills in xdrs. Sendsize and recvsize are
- * send and recv buffer sizes (0 => use default).
- * tcp_handle is an opaque handle that is passed as the first parameter to
- * the procedures readit and writeit. Readit and writeit are read and
- * write respectively. They are like the system
- * calls expect that they take an opaque handle rather than an fd.
- */
-void
-xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
- register XDR *xdrs;
- register u_int sendsize;
- register u_int recvsize;
- caddr_t tcp_handle;
- int (*readit)(); /* like read, but pass it a tcp_handle, not sock */
- int (*writeit)(); /* like write, but pass it a tcp_handle, not sock */
-{
- register RECSTREAM *rstrm =
- (RECSTREAM *)mem_alloc(sizeof(RECSTREAM));
-
- if (rstrm == NULL) {
- (void)fprintf(stderr, "xdrrec_create: out of memory\n");
- /*
- * This is bad. Should rework xdrrec_create to
- * return a handle, and in this case return NULL
- */
- return;
- }
- /*
- * adjust sizes and allocate buffer quad byte aligned
- */
- rstrm->sendsize = sendsize = fix_buf_size(sendsize);
- rstrm->recvsize = recvsize = fix_buf_size(recvsize);
- rstrm->the_buffer = mem_alloc(sendsize + recvsize + BYTES_PER_XDR_UNIT);
- if (rstrm->the_buffer == NULL) {
- (void)fprintf(stderr, "xdrrec_create: out of memory\n");
- return;
- }
- for (rstrm->out_base = rstrm->the_buffer;
- (u_long)rstrm->out_base % BYTES_PER_XDR_UNIT != 0;
- rstrm->out_base++);
- rstrm->in_base = rstrm->out_base + sendsize;
- /*
- * now the rest ...
- */
- xdrs->x_ops = &xdrrec_ops;
- xdrs->x_private = (caddr_t)rstrm;
- rstrm->tcp_handle = tcp_handle;
- rstrm->readit = readit;
- rstrm->writeit = writeit;
- rstrm->out_finger = rstrm->out_boundry = rstrm->out_base;
- rstrm->frag_header = (u_int32_t *)rstrm->out_base;
- rstrm->out_finger += sizeof(u_int32_t);
- rstrm->out_boundry += sendsize;
- rstrm->frag_sent = FALSE;
- rstrm->in_size = recvsize;
- rstrm->in_boundry = rstrm->in_base;
- rstrm->in_finger = (rstrm->in_boundry += recvsize);
- rstrm->fbtbc = 0;
- rstrm->last_frag = TRUE;
-}
-
-
-/*
- * The reoutines defined below are the xdr ops which will go into the
- * xdr handle filled in by xdrrec_create.
- */
-
-static bool_t
-xdrrec_getlong(xdrs, lp)
- XDR *xdrs;
- long *lp;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register int32_t *buflp = (int32_t *)(rstrm->in_finger);
- int32_t mylong;
-
- /* first try the inline, fast case */
- if ((rstrm->fbtbc >= sizeof(int32_t)) &&
- (((long)rstrm->in_boundry - (long)buflp) >= sizeof(int32_t))) {
- *lp = (long)ntohl((u_int32_t)(*buflp));
- rstrm->fbtbc -= sizeof(int32_t);
- rstrm->in_finger += sizeof(int32_t);
- } else {
- if (! xdrrec_getbytes(xdrs, (caddr_t)&mylong, sizeof(int32_t)))
- return (FALSE);
- *lp = (long)ntohl((u_int32_t)mylong);
- }
- return (TRUE);
-}
-
-static bool_t
-xdrrec_putlong(xdrs, lp)
- XDR *xdrs;
- long *lp;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register int32_t *dest_lp = ((int32_t *)(rstrm->out_finger));
-
- if ((rstrm->out_finger += sizeof(int32_t)) > rstrm->out_boundry) {
- /*
- * this case should almost never happen so the code is
- * inefficient
- */
- rstrm->out_finger -= sizeof(int32_t);
- rstrm->frag_sent = TRUE;
- if (! flush_out(rstrm, FALSE))
- return (FALSE);
- dest_lp = ((int32_t *)(rstrm->out_finger));
- rstrm->out_finger += sizeof(int32_t);
- }
- *dest_lp = (int32_t)htonl((u_int32_t)(*lp));
- return (TRUE);
-}
-
-static bool_t /* must manage buffers, fragments, and records */
-xdrrec_getbytes(xdrs, addr, len)
- XDR *xdrs;
- register caddr_t addr;
- register u_int len;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register int current;
-
- while (len > 0) {
- current = rstrm->fbtbc;
- if (current == 0) {
- if (rstrm->last_frag)
- return (FALSE);
- if (! set_input_fragment(rstrm))
- return (FALSE);
- continue;
- }
- current = (len < current) ? len : current;
- if (! get_input_bytes(rstrm, addr, current))
- return (FALSE);
- addr += current;
- rstrm->fbtbc -= current;
- len -= current;
- }
- return (TRUE);
-}
-
-static bool_t
-xdrrec_putbytes(xdrs, addr, len)
- XDR *xdrs;
- register caddr_t addr;
- register u_int len;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register long current;
-
- while (len > 0) {
- current = (u_long)rstrm->out_boundry -
- (u_long)rstrm->out_finger;
- current = (len < current) ? len : current;
- memcpy(rstrm->out_finger, addr, current);
- rstrm->out_finger += current;
- addr += current;
- len -= current;
- if (rstrm->out_finger == rstrm->out_boundry) {
- rstrm->frag_sent = TRUE;
- if (! flush_out(rstrm, FALSE))
- return (FALSE);
- }
- }
- return (TRUE);
-}
-
-static u_int
-xdrrec_getpos(xdrs)
- register XDR *xdrs;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
- register long pos;
-
- pos = lseek((int)(long)rstrm->tcp_handle, (off_t) 0, 1);
- if (pos != -1)
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- pos += rstrm->out_finger - rstrm->out_base;
- break;
-
- case XDR_DECODE:
- pos -= rstrm->in_boundry - rstrm->in_finger;
- break;
-
- default:
- pos = -1;
- break;
- }
- return ((u_int) pos);
-}
-
-static bool_t
-xdrrec_setpos(xdrs, pos)
- register XDR *xdrs;
- u_int pos;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
- u_int currpos = xdrrec_getpos(xdrs);
- int delta = currpos - pos;
- caddr_t newpos;
-
- if ((int)currpos != -1)
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- newpos = rstrm->out_finger - delta;
- if ((newpos > (caddr_t)(rstrm->frag_header)) &&
- (newpos < rstrm->out_boundry)) {
- rstrm->out_finger = newpos;
- return (TRUE);
- }
- break;
-
- case XDR_DECODE:
- newpos = rstrm->in_finger - delta;
- if ((delta < (int)(rstrm->fbtbc)) &&
- (newpos <= rstrm->in_boundry) &&
- (newpos >= rstrm->in_base)) {
- rstrm->in_finger = newpos;
- rstrm->fbtbc -= delta;
- return (TRUE);
- }
- break;
- }
- return (FALSE);
-}
-
-static int32_t *
-xdrrec_inline(xdrs, len)
- register XDR *xdrs;
- int len;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
- int32_t * buf = NULL;
-
- switch (xdrs->x_op) {
-
- case XDR_ENCODE:
- if ((rstrm->out_finger + len) <= rstrm->out_boundry) {
- buf = (int32_t *) rstrm->out_finger;
- rstrm->out_finger += len;
- }
- break;
-
- case XDR_DECODE:
- if ((len <= rstrm->fbtbc) &&
- ((rstrm->in_finger + len) <= rstrm->in_boundry)) {
- buf = (int32_t *) rstrm->in_finger;
- rstrm->fbtbc -= len;
- rstrm->in_finger += len;
- }
- break;
- }
- return (buf);
-}
-
-static void
-xdrrec_destroy(xdrs)
- register XDR *xdrs;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
-
- mem_free(rstrm->the_buffer,
- rstrm->sendsize + rstrm->recvsize + BYTES_PER_XDR_UNIT);
- mem_free((caddr_t)rstrm, sizeof(RECSTREAM));
-}
-
-
-/*
- * Exported routines to manage xdr records
- */
-
-/*
- * Before reading (deserializing from the stream, one should always call
- * this procedure to guarantee proper record alignment.
- */
-bool_t
-xdrrec_skiprecord(xdrs)
- XDR *xdrs;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
-
- while (rstrm->fbtbc > 0 || (! rstrm->last_frag)) {
- if (! skip_input_bytes(rstrm, rstrm->fbtbc))
- return (FALSE);
- rstrm->fbtbc = 0;
- if ((! rstrm->last_frag) && (! set_input_fragment(rstrm)))
- return (FALSE);
- }
- rstrm->last_frag = FALSE;
- return (TRUE);
-}
-
-/*
- * Look ahead fuction.
- * Returns TRUE iff there is no more input in the buffer
- * after consuming the rest of the current record.
- */
-bool_t
-xdrrec_eof(xdrs)
- XDR *xdrs;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
-
- while (rstrm->fbtbc > 0 || (! rstrm->last_frag)) {
- if (! skip_input_bytes(rstrm, rstrm->fbtbc))
- return (TRUE);
- rstrm->fbtbc = 0;
- if ((! rstrm->last_frag) && (! set_input_fragment(rstrm)))
- return (TRUE);
- }
- if (rstrm->in_finger == rstrm->in_boundry)
- return (TRUE);
- return (FALSE);
-}
-
-/*
- * The client must tell the package when an end-of-record has occurred.
- * The second paraemters tells whether the record should be flushed to the
- * (output) tcp stream. (This let's the package support batched or
- * pipelined procedure calls.) TRUE => immmediate flush to tcp connection.
- */
-bool_t
-xdrrec_endofrecord(xdrs, sendnow)
- XDR *xdrs;
- bool_t sendnow;
-{
- register RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
- register u_long len; /* fragment length */
-
- if (sendnow || rstrm->frag_sent ||
- ((u_long)rstrm->out_finger + sizeof(u_int32_t) >=
- (u_long)rstrm->out_boundry)) {
- rstrm->frag_sent = FALSE;
- return (flush_out(rstrm, TRUE));
- }
- len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->frag_header) -
- sizeof(u_int32_t);
- *(rstrm->frag_header) = htonl((u_long)len | LAST_FRAG);
- rstrm->frag_header = (u_int32_t *)rstrm->out_finger;
- rstrm->out_finger += sizeof(u_int32_t);
- return (TRUE);
-}
-
-
-/*
- * Internal useful routines
- */
-static bool_t
-flush_out(rstrm, eor)
- register RECSTREAM *rstrm;
- bool_t eor;
-{
- register u_long eormask = (eor == TRUE) ? LAST_FRAG : 0;
- register u_int32_t len = (u_long)(rstrm->out_finger) -
- (u_long)(rstrm->frag_header) - sizeof(u_int32_t);
-
- *(rstrm->frag_header) = htonl(len | eormask);
- len = (u_long)(rstrm->out_finger) - (u_long)(rstrm->out_base);
- if ((*(rstrm->writeit))(rstrm->tcp_handle, rstrm->out_base, (int)len)
- != (int)len)
- return (FALSE);
- rstrm->frag_header = (u_int32_t *)rstrm->out_base;
- rstrm->out_finger = (caddr_t)rstrm->out_base + sizeof(u_int32_t);
- return (TRUE);
-}
-
-static bool_t /* knows nothing about records! Only about input buffers */
-fill_input_buf(rstrm)
- register RECSTREAM *rstrm;
-{
- register caddr_t where;
- u_long i;
- register long len;
-
- where = rstrm->in_base;
- i = (u_long)rstrm->in_boundry % BYTES_PER_XDR_UNIT;
- where += i;
- len = rstrm->in_size - i;
- if ((len = (*(rstrm->readit))(rstrm->tcp_handle, where, len)) == -1)
- return (FALSE);
- rstrm->in_finger = where;
- where += len;
- rstrm->in_boundry = where;
- return (TRUE);
-}
-
-static bool_t /* knows nothing about records! Only about input buffers */
-get_input_bytes(rstrm, addr, len)
- register RECSTREAM *rstrm;
- register caddr_t addr;
- register int len;
-{
- register long current;
-
- while (len > 0) {
- current = (long)rstrm->in_boundry - (long)rstrm->in_finger;
- if (current == 0) {
- if (! fill_input_buf(rstrm))
- return (FALSE);
- continue;
- }
- current = (len < current) ? len : current;
- memcpy(addr, rstrm->in_finger, current);
- rstrm->in_finger += current;
- addr += current;
- len -= current;
- }
- return (TRUE);
-}
-
-static bool_t /* next two bytes of the input stream are treated as a header */
-set_input_fragment(rstrm)
- register RECSTREAM *rstrm;
-{
- u_int32_t header;
-
- if (! get_input_bytes(rstrm, (caddr_t)&header, sizeof(header)))
- return (FALSE);
- header = (long)ntohl(header);
- rstrm->last_frag = ((header & LAST_FRAG) == 0) ? FALSE : TRUE;
- rstrm->fbtbc = header & (~LAST_FRAG);
- return (TRUE);
-}
-
-static bool_t /* consumes input bytes; knows nothing about records! */
-skip_input_bytes(rstrm, cnt)
- register RECSTREAM *rstrm;
- long cnt;
-{
- register long current;
-
- while (cnt > 0) {
- current = (long)rstrm->in_boundry - (long)rstrm->in_finger;
- if (current == 0) {
- if (! fill_input_buf(rstrm))
- return (FALSE);
- continue;
- }
- current = (cnt < current) ? cnt : current;
- rstrm->in_finger += current;
- cnt -= current;
- }
- return (TRUE);
-}
-
-static u_int
-fix_buf_size(s)
- register u_int s;
-{
-
- if (s < 100)
- s = 4000;
- return (RNDUP(s));
-}
diff --git a/lib/libc/xdr/xdr_reference.c b/lib/libc/xdr/xdr_reference.c
deleted file mode 100644
index 75607ba..0000000
--- a/lib/libc/xdr/xdr_reference.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_reference.c 1.11 87/08/11 SMI";*/
-/*static char *sccsid = "from: @(#)xdr_reference.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: xdr_reference.c,v 1.4 1996/12/30 14:07:11 peter Exp $";
-#endif
-
-/*
- * xdr_reference.c, Generic XDR routines impelmentation.
- *
- * Copyright (C) 1987, Sun Microsystems, Inc.
- *
- * These are the "non-trivial" xdr primitives used to serialize and de-serialize
- * "pointers". See xdr.h for more info on the interface to xdr.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-
-#define LASTUNSIGNED ((u_int) 0-1)
-
-/*
- * XDR an indirect pointer
- * xdr_reference is for recursively translating a structure that is
- * referenced by a pointer inside the structure that is currently being
- * translated. pp references a pointer to storage. If *pp is null
- * the necessary storage is allocated.
- * size is the sizeof the referneced structure.
- * proc is the routine to handle the referenced structure.
- */
-bool_t
-xdr_reference(xdrs, pp, size, proc)
- register XDR *xdrs;
- caddr_t *pp; /* the pointer to work on */
- u_int size; /* size of the object pointed to */
- xdrproc_t proc; /* xdr routine to handle the object */
-{
- register caddr_t loc = *pp;
- register bool_t stat;
-
- if (loc == NULL)
- switch (xdrs->x_op) {
- case XDR_FREE:
- return (TRUE);
-
- case XDR_DECODE:
- *pp = loc = (caddr_t) mem_alloc(size);
- if (loc == NULL) {
- (void) fprintf(stderr,
- "xdr_reference: out of memory\n");
- return (FALSE);
- }
- memset(loc, 0, (int)size);
- break;
- }
-
- stat = (*proc)(xdrs, loc, LASTUNSIGNED);
-
- if (xdrs->x_op == XDR_FREE) {
- mem_free(loc, size);
- *pp = NULL;
- }
- return (stat);
-}
-
-
-/*
- * xdr_pointer():
- *
- * XDR a pointer to a possibly recursive data structure. This
- * differs with xdr_reference in that it can serialize/deserialiaze
- * trees correctly.
- *
- * What's sent is actually a union:
- *
- * union object_pointer switch (boolean b) {
- * case TRUE: object_data data;
- * case FALSE: void nothing;
- * }
- *
- * > objpp: Pointer to the pointer to the object.
- * > obj_size: size of the object.
- * > xdr_obj: routine to XDR an object.
- *
- */
-bool_t
-xdr_pointer(xdrs,objpp,obj_size,xdr_obj)
- register XDR *xdrs;
- char **objpp;
- u_int obj_size;
- xdrproc_t xdr_obj;
-{
-
- bool_t more_data;
-
- more_data = (*objpp != NULL);
- if (! xdr_bool(xdrs,&more_data)) {
- return (FALSE);
- }
- if (! more_data) {
- *objpp = NULL;
- return (TRUE);
- }
- return (xdr_reference(xdrs,objpp,obj_size,xdr_obj));
-}
diff --git a/lib/libc/xdr/xdr_sizeof.c b/lib/libc/xdr/xdr_sizeof.c
deleted file mode 100644
index e9c6a19..0000000
--- a/lib/libc/xdr/xdr_sizeof.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * xdr_sizeof.c
- *
- * Copyright 1990 Sun Microsystems, Inc.
- *
- * General purpose routine to see how much space something will use
- * when serialized using XDR.
- */
-
-#include <rpc/types.h>
-#include <rpc/xdr.h>
-#include <sys/types.h>
-#include <stdlib.h>
-
-/* ARGSUSED */
-static bool_t
-x_putlong(xdrs, longp)
- XDR *xdrs;
- long *longp;
-{
- xdrs->x_handy += BYTES_PER_XDR_UNIT;
- return (TRUE);
-}
-
-/* ARGSUSED */
-static bool_t
-x_putbytes(xdrs, bp, len)
- XDR *xdrs;
- char *bp;
- int len;
-{
- xdrs->x_handy += len;
- return (TRUE);
-}
-
-static u_int
-x_getpostn(xdrs)
- XDR *xdrs;
-{
- return (xdrs->x_handy);
-}
-
-/* ARGSUSED */
-static bool_t
-x_setpostn(xdrs, pos)
- XDR *xdrs;
- u_int pos;
-{
- /* This is not allowed */
- return (FALSE);
-}
-
-static int32_t *
-x_inline(xdrs, len)
- XDR *xdrs;
- int len;
-{
- if (len == 0) {
- return (NULL);
- }
- if (xdrs->x_op != XDR_ENCODE) {
- return (NULL);
- }
- if (len < (int) xdrs->x_base) {
- /* x_private was already allocated */
- xdrs->x_handy += len;
- return ((int32_t *) xdrs->x_private);
- } else {
- /* Free the earlier space and allocate new area */
- if (xdrs->x_private)
- free(xdrs->x_private);
- if ((xdrs->x_private = (caddr_t) malloc(len)) == NULL) {
- xdrs->x_base = 0;
- return (NULL);
- }
- xdrs->x_base = (caddr_t) len;
- xdrs->x_handy += len;
- return ((int32_t *) xdrs->x_private);
- }
-}
-
-static int
-harmless()
-{
- /* Always return FALSE/NULL, as the case may be */
- return (0);
-}
-
-static void
-x_destroy(xdrs)
- XDR *xdrs;
-{
- xdrs->x_handy = 0;
- xdrs->x_base = 0;
- if (xdrs->x_private) {
- free(xdrs->x_private);
- xdrs->x_private = NULL;
- }
- return;
-}
-
-unsigned long
-xdr_sizeof(func, data)
- xdrproc_t func;
- void *data;
-{
- XDR x;
- struct xdr_ops ops;
- bool_t stat;
- /* to stop ANSI-C compiler from complaining */
- typedef bool_t (* dummyfunc1)(XDR *, long *);
- typedef bool_t (* dummyfunc2)(XDR *, caddr_t, u_int);
-
- ops.x_putlong = x_putlong;
- ops.x_putbytes = x_putbytes;
- ops.x_inline = x_inline;
- ops.x_getpostn = x_getpostn;
- ops.x_setpostn = x_setpostn;
- ops.x_destroy = x_destroy;
-
- /* the other harmless ones */
- ops.x_getlong = (dummyfunc1) harmless;
- ops.x_getbytes = (dummyfunc2) harmless;
-
- x.x_op = XDR_ENCODE;
- x.x_ops = &ops;
- x.x_handy = 0;
- x.x_private = (caddr_t) NULL;
- x.x_base = (caddr_t) 0;
-
- stat = func(&x, data);
- if (x.x_private)
- free(x.x_private);
- return (stat == TRUE ? (unsigned) x.x_handy: 0);
-}
diff --git a/lib/libc/xdr/xdr_stdio.c b/lib/libc/xdr/xdr_stdio.c
deleted file mode 100644
index 39eda50..0000000
--- a/lib/libc/xdr/xdr_stdio.c
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)xdr_stdio.c 1.16 87/08/11 Copyr 1984 Sun Micro";*/
-/*static char *sccsid = "from: @(#)xdr_stdio.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: xdr_stdio.c,v 1.3 1996/12/30 14:07:11 peter Exp $";
-#endif
-
-/*
- * xdr_stdio.c, XDR implementation on standard i/o file.
- *
- * Copyright (C) 1984, Sun Microsystems, Inc.
- *
- * This set of routines implements a XDR on a stdio stream.
- * XDR_ENCODE serializes onto the stream, XDR_DECODE de-serializes
- * from the stream.
- */
-
-#include <rpc/types.h>
-#include <stdio.h>
-#include <rpc/xdr.h>
-
-static bool_t xdrstdio_getlong();
-static bool_t xdrstdio_putlong();
-static bool_t xdrstdio_getbytes();
-static bool_t xdrstdio_putbytes();
-static u_int xdrstdio_getpos();
-static bool_t xdrstdio_setpos();
-static int32_t *xdrstdio_inline();
-static void xdrstdio_destroy();
-
-/*
- * Ops vector for stdio type XDR
- */
-static struct xdr_ops xdrstdio_ops = {
- xdrstdio_getlong, /* deseraialize a long int */
- xdrstdio_putlong, /* seraialize a long int */
- xdrstdio_getbytes, /* deserialize counted bytes */
- xdrstdio_putbytes, /* serialize counted bytes */
- xdrstdio_getpos, /* get offset in the stream */
- xdrstdio_setpos, /* set offset in the stream */
- xdrstdio_inline, /* prime stream for inline macros */
- xdrstdio_destroy /* destroy stream */
-};
-
-/*
- * Initialize a stdio xdr stream.
- * Sets the xdr stream handle xdrs for use on the stream file.
- * Operation flag is set to op.
- */
-void
-xdrstdio_create(xdrs, file, op)
- register XDR *xdrs;
- FILE *file;
- enum xdr_op op;
-{
-
- xdrs->x_op = op;
- xdrs->x_ops = &xdrstdio_ops;
- xdrs->x_private = (caddr_t)file;
- xdrs->x_handy = 0;
- xdrs->x_base = 0;
-}
-
-/*
- * Destroy a stdio xdr stream.
- * Cleans up the xdr stream handle xdrs previously set up by xdrstdio_create.
- */
-static void
-xdrstdio_destroy(xdrs)
- register XDR *xdrs;
-{
- (void)fflush((FILE *)xdrs->x_private);
- /* xx should we close the file ?? */
-}
-
-static bool_t
-xdrstdio_getlong(xdrs, lp)
- XDR *xdrs;
- register long *lp;
-{
-
- if (fread((caddr_t)lp, sizeof(int32_t), 1,
- (FILE *)xdrs->x_private) != 1)
- return (FALSE);
- *lp = (long)ntohl((int32_t)*lp);
- return (TRUE);
-}
-
-static bool_t
-xdrstdio_putlong(xdrs, lp)
- XDR *xdrs;
- long *lp;
-{
-
- long mycopy = (long)htonl((int32_t)*lp);
-
- if (fwrite((caddr_t)&mycopy, sizeof(int32_t), 1,
- (FILE *)xdrs->x_private) != 1)
- return (FALSE);
- return (TRUE);
-}
-
-static bool_t
-xdrstdio_getbytes(xdrs, addr, len)
- XDR *xdrs;
- caddr_t addr;
- u_int len;
-{
-
- if ((len != 0) && (fread(addr, (int)len, 1, (FILE *)xdrs->x_private) != 1))
- return (FALSE);
- return (TRUE);
-}
-
-static bool_t
-xdrstdio_putbytes(xdrs, addr, len)
- XDR *xdrs;
- caddr_t addr;
- u_int len;
-{
-
- if ((len != 0) && (fwrite(addr, (int)len, 1, (FILE *)xdrs->x_private) != 1))
- return (FALSE);
- return (TRUE);
-}
-
-static u_int
-xdrstdio_getpos(xdrs)
- XDR *xdrs;
-{
-
- return ((u_int) ftell((FILE *)xdrs->x_private));
-}
-
-static bool_t
-xdrstdio_setpos(xdrs, pos)
- XDR *xdrs;
- u_int pos;
-{
-
- return ((fseek((FILE *)xdrs->x_private, (long)pos, 0) < 0) ?
- FALSE : TRUE);
-}
-
-static int32_t *
-xdrstdio_inline(xdrs, len)
- XDR *xdrs;
- u_int len;
-{
-
- /*
- * Must do some work to implement this: must insure
- * enough data in the underlying stdio buffer,
- * that the buffer is aligned so that we can indirect through a
- * long *, and stuff this pointer in xdrs->x_buf. Doing
- * a fread or fwrite to a scratch buffer would defeat
- * most of the gains to be had here and require storage
- * management on this buffer, so we don't do this.
- */
- return (NULL);
-}
diff --git a/lib/libc/yp/Makefile.inc b/lib/libc/yp/Makefile.inc
deleted file mode 100644
index a1c9473..0000000
--- a/lib/libc/yp/Makefile.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-# from: @(#)Makefile.inc 5.3 (Berkeley) 2/20/91
-# $Id: Makefile.inc,v 1.5 1997/05/03 03:50:06 jb Exp $
-
-# yp sources
-.PATH: ${.CURDIR}/../libc/yp
-
-SRCS+= xdryp.c yp_xdr.c yplib.c
-CLEANFILES+= yp_xdr.c yp.h
-
-RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x
-RPCGEN= rpcgen
-
-yp_xdr.c: ${RPCSRC} yp.h
- ${RPCGEN} -c -o ${.TARGET} ${RPCSRC}
-
-yp.h: ${RPCSRC}
- ${RPCGEN} -h -o ${.TARGET} ${RPCSRC}
diff --git a/lib/libc/yp/xdryp.c b/lib/libc/yp/xdryp.c
deleted file mode 100644
index 9268fc2..0000000
--- a/lib/libc/yp/xdryp.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1992/3 Theo de Raadt <deraadt@fsa.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef LINT
-static char *rcsid = "$Id$";
-#endif
-
-#include <rpc/rpc.h>
-#include <rpcsvc/yp.h>
-#include <stdlib.h>
-#include <string.h>
-
-extern int (*ypresp_allfn)();
-extern void *ypresp_data;
-
-/*
- * I'm leaving the xdr_datum() function in purely for backwards
- * compatibility. yplib.c doesn't actually use it, but it's listed
- * in yp_prot.h as being available, so it's probably a good idea to
- * leave it in in case somebody goes looking for it.
- */
-typedef struct {
- char *dptr;
- int dsize;
-} datum;
-
-bool_t
-xdr_datum(xdrs, objp)
-XDR *xdrs;
-datum *objp;
-{
- if (!xdr_bytes(xdrs, (char **)&objp->dptr, (u_int *)&objp->dsize, YPMAXRECORD)) {
- return (FALSE);
- }
- return (TRUE);
-}
-
-bool_t
-xdr_ypresp_all_seq(xdrs, objp)
-XDR *xdrs;
-u_long *objp;
-{
- struct ypresp_all out;
- u_long status;
- char *key, *val;
- int r;
-
- bzero(&out, sizeof out);
- while(1) {
- if( !xdr_ypresp_all(xdrs, &out)) {
- xdr_free(xdr_ypresp_all, (char *)&out);
- *objp = YP_YPERR;
- return FALSE;
- }
- if(out.more == 0) {
- xdr_free(xdr_ypresp_all, (char *)&out);
- *objp = YP_NOMORE;
- return TRUE;
- }
- status = out.ypresp_all_u.val.stat;
- switch(status) {
- case YP_TRUE:
- key = (char *)malloc(out.ypresp_all_u.val.key.keydat_len + 1);
- bcopy(out.ypresp_all_u.val.key.keydat_val, key,
- out.ypresp_all_u.val.key.keydat_len);
- key[out.ypresp_all_u.val.key.keydat_len] = '\0';
- val = (char *)malloc(out.ypresp_all_u.val.val.valdat_len + 1);
- bcopy(out.ypresp_all_u.val.val.valdat_val, val,
- out.ypresp_all_u.val.val.valdat_len);
- val[out.ypresp_all_u.val.val.valdat_len] = '\0';
- xdr_free(xdr_ypresp_all, (char *)&out);
-
- r = (*ypresp_allfn)(status,
- key, out.ypresp_all_u.val.key.keydat_len,
- val, out.ypresp_all_u.val.val.valdat_len,
- ypresp_data);
- *objp = status;
- free(key);
- free(val);
- if(r)
- return TRUE;
- break;
- case YP_NOMORE:
- xdr_free(xdr_ypresp_all, (char *)&out);
- *objp = YP_NOMORE;
- return TRUE;
- default:
- xdr_free(xdr_ypresp_all, (char *)&out);
- *objp = status;
- return TRUE;
- }
- }
-}
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c
deleted file mode 100644
index 2e0223d..0000000
--- a/lib/libc/yp/yplib.c
+++ /dev/null
@@ -1,1033 +0,0 @@
-/*
- * Copyright (c) 1992/3 Theo de Raadt <deraadt@fsa.ca>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
- * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef LINT
-static char *rcsid = "$Id: yplib.c,v 1.28 1997/02/22 15:05:02 peter Exp $";
-#endif
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/file.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <rpc/rpc.h>
-#include <rpc/xdr.h>
-#include <rpcsvc/yp.h>
-
-
-/*
- * We have to define these here due to clashes between yp_prot.h and
- * yp.h.
- */
-
-struct dom_binding {
- struct dom_binding *dom_pnext;
- char dom_domain[YPMAXDOMAIN + 1];
- struct sockaddr_in dom_server_addr;
- u_short dom_server_port;
- int dom_socket;
- CLIENT *dom_client;
- u_short dom_local_port; /* now I finally know what this is for. */
- long dom_vers;
-};
-
-#include <rpcsvc/ypclnt.h>
-
-#ifndef BINDINGDIR
-#define BINDINGDIR "/var/yp/binding"
-#endif
-#define YPMATCHCACHE
-#define MAX_RETRIES 20
-
-extern bool_t xdr_domainname(), xdr_ypbind_resp();
-extern bool_t xdr_ypreq_key(), xdr_ypresp_val();
-extern bool_t xdr_ypreq_nokey(), xdr_ypresp_key_val();
-extern bool_t xdr_ypresp_all(), xdr_ypresp_all_seq();
-extern bool_t xdr_ypresp_master();
-
-int (*ypresp_allfn)();
-void *ypresp_data;
-
-static void _yp_unbind __P(( struct dom_binding * ));
-struct dom_binding *_ypbindlist;
-static char _yp_domain[MAXHOSTNAMELEN];
-int _yplib_timeout = 10;
-
-#ifdef YPMATCHCACHE
-int _yplib_cache = 5;
-
-static struct ypmatch_ent {
- struct ypmatch_ent *next;
- char *map, *key, *val;
- int keylen, vallen;
- time_t expire_t;
-} *ypmc;
-
-static void
-ypmatch_add(map, key, keylen, val, vallen)
- char *map;
- char *key;
- int keylen;
- char *val;
- int vallen;
-{
- struct ypmatch_ent *ep;
- time_t t;
-
- time(&t);
-
- for(ep=ypmc; ep; ep=ep->next)
- if(ep->expire_t < t)
- break;
- if(ep==NULL) {
- ep = (struct ypmatch_ent *)malloc(sizeof *ep);
- bzero((char *)ep, sizeof *ep);
- if(ypmc)
- ep->next = ypmc;
- ypmc = ep;
- }
-
- if(ep->key)
- free(ep->key);
- if(ep->val)
- free(ep->val);
-
- ep->key = NULL;
- ep->val = NULL;
-
- ep->key = (char *)malloc(keylen);
- if(ep->key==NULL)
- return;
-
- ep->val = (char *)malloc(vallen);
- if(ep->key==NULL) {
- free(ep->key);
- ep->key = NULL;
- return;
- }
- ep->keylen = keylen;
- ep->vallen = vallen;
-
- bcopy(key, ep->key, ep->keylen);
- bcopy(val, ep->val, ep->vallen);
-
- if(ep->map) {
- if( strcmp(ep->map, map) ) {
- free(ep->map);
- ep->map = strdup(map);
- }
- } else {
- ep->map = strdup(map);
- }
-
- ep->expire_t = t + _yplib_cache;
-}
-
-static bool_t
-ypmatch_find(map, key, keylen, val, vallen)
- char *map;
- char *key;
- int keylen;
- char **val;
- int *vallen;
-{
- struct ypmatch_ent *ep;
- time_t t;
-
- if(ypmc==NULL)
- return 0;
-
- time(&t);
-
- for(ep=ypmc; ep; ep=ep->next) {
- if(ep->keylen != keylen)
- continue;
- if(strcmp(ep->map, map))
- continue;
- if(bcmp(ep->key, key, keylen))
- continue;
- if(t > ep->expire_t)
- continue;
-
- *val = ep->val;
- *vallen = ep->vallen;
- return 1;
- }
- return 0;
-}
-#endif
-
-char *
-ypbinderr_string(incode)
- int incode;
-{
- static char err[80];
- switch(incode) {
- case 0:
- return "Success";
- case YPBIND_ERR_ERR:
- return "Internal ypbind error";
- case YPBIND_ERR_NOSERV:
- return "Domain not bound";
- case YPBIND_ERR_RESC:
- return "System resource allocation failure";
- }
- sprintf(err, "Unknown ypbind error: #%d\n", incode);
- return err;
-}
-
-int
-_yp_dobind(dom, ypdb)
- char *dom;
- struct dom_binding **ypdb;
-{
- static pid_t pid = -1;
- char path[MAXPATHLEN];
- struct dom_binding *ysd, *ysd2;
- struct ypbind_resp ypbr;
- struct timeval tv;
- struct sockaddr_in clnt_sin;
- int clnt_sock, fd;
- pid_t gpid;
- CLIENT *client;
- int new = 0, r;
- int retries = 0;
- struct sockaddr_in check;
- int checklen = sizeof(struct sockaddr_in);
-
- /* Not allowed; bad doggie. Bad. */
- if (strchr(dom, '/') != NULL)
- return(YPERR_BADARGS);
-
- gpid = getpid();
- if( !(pid==-1 || pid==gpid) ) {
- ysd = _ypbindlist;
- while(ysd) {
- if(ysd->dom_client != NULL)
- _yp_unbind(ysd);
- ysd2 = ysd->dom_pnext;
- free(ysd);
- ysd = ysd2;
- }
- _ypbindlist = NULL;
- }
- pid = gpid;
-
- if(ypdb!=NULL)
- *ypdb = NULL;
-
- if(dom==NULL || strlen(dom)==0)
- return YPERR_BADARGS;
-
- for(ysd = _ypbindlist; ysd; ysd = ysd->dom_pnext)
- if( strcmp(dom, ysd->dom_domain) == 0)
- break;
-
-
- if(ysd==NULL) {
- ysd = (struct dom_binding *)malloc(sizeof *ysd);
- bzero((char *)ysd, sizeof *ysd);
- ysd->dom_socket = -1;
- ysd->dom_vers = 0;
- new = 1;
- } else {
- /* Check the socket -- may have been hosed by the caller. */
- if (getsockname(ysd->dom_socket, (struct sockaddr *)&check,
- &checklen) == -1 || check.sin_family != AF_INET ||
- check.sin_port != ysd->dom_local_port) {
- /* Socket became bogus somehow... need to rebind. */
- int save, sock;
-
- sock = ysd->dom_socket;
- save = dup(ysd->dom_socket);
- if (ysd->dom_client != NULL)
- clnt_destroy(ysd->dom_client);
- ysd->dom_vers = 0;
- ysd->dom_client = NULL;
- sock = dup2(save, sock);
- close(save);
- }
- }
-
-again:
- retries++;
- if (retries > MAX_RETRIES) {
- if (new)
- free(ysd);
- return(YPERR_YPBIND);
- }
-#ifdef BINDINGDIR
- if(ysd->dom_vers==0) {
- /*
- * We're trying to make a new binding: zorch the
- * existing handle now (if any).
- */
- if(ysd->dom_client != NULL) {
- clnt_destroy(ysd->dom_client);
- ysd->dom_client = NULL;
- ysd->dom_socket = -1;
- }
- sprintf(path, "%s/%s.%d", BINDINGDIR, dom, 2);
- if( (fd=open(path, O_RDONLY)) == -1) {
- /* no binding file, YP is dead. */
- /* Try to bring it back to life. */
- close(fd);
- goto skipit;
- }
- if( flock(fd, LOCK_EX|LOCK_NB) == -1 && errno==EWOULDBLOCK) {
- struct iovec iov[2];
- struct ypbind_resp ybr;
- u_short ypb_port;
-
- iov[0].iov_base = (caddr_t)&ypb_port;
- iov[0].iov_len = sizeof ypb_port;
- iov[1].iov_base = (caddr_t)&ybr;
- iov[1].iov_len = sizeof ybr;
-
- r = readv(fd, iov, 2);
- if(r != iov[0].iov_len + iov[1].iov_len) {
- close(fd);
- ysd->dom_vers = -1;
- goto again;
- }
-
- bzero(&ysd->dom_server_addr, sizeof ysd->dom_server_addr);
- ysd->dom_server_addr.sin_family = AF_INET;
- ysd->dom_server_addr.sin_len = sizeof(struct sockaddr_in);
- ysd->dom_server_addr.sin_addr.s_addr =
- *(u_long *)&ybr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr;
- ysd->dom_server_addr.sin_port =
- *(u_short *)&ybr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port;
-
- ysd->dom_server_port = ysd->dom_server_addr.sin_port;
- close(fd);
- goto gotit;
- } else {
- /* no lock on binding file, YP is dead. */
- /* Try to bring it back to life. */
- close(fd);
- goto skipit;
- }
- }
-skipit:
-#endif
- if(ysd->dom_vers==-1 || ysd->dom_vers==0) {
- /*
- * We're trying to make a new binding: zorch the
- * existing handle now (if any).
- */
- if(ysd->dom_client != NULL) {
- clnt_destroy(ysd->dom_client);
- ysd->dom_client = NULL;
- ysd->dom_socket = -1;
- }
- bzero((char *)&clnt_sin, sizeof clnt_sin);
- clnt_sin.sin_family = AF_INET;
- clnt_sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
-
- clnt_sock = RPC_ANYSOCK;
- client = clnttcp_create(&clnt_sin, YPBINDPROG, YPBINDVERS, &clnt_sock,
- 0, 0);
- if(client==NULL) {
- /*
- * These conditions indicate ypbind just isn't
- * alive -- we probably don't want to shoot our
- * mouth off in this case; instead generate error
- * messages only for really exotic problems.
- */
- if (rpc_createerr.cf_stat != RPC_PROGNOTREGISTERED &&
- (rpc_createerr.cf_stat != RPC_SYSTEMERROR &&
- rpc_createerr.cf_error.re_errno == ECONNREFUSED))
- clnt_pcreateerror("clnttcp_create");
- if(new)
- free(ysd);
- return (YPERR_YPBIND);
- }
-
- /*
- * Check the port number -- should be < IPPORT_RESERVED.
- * If not, it's possible someone has registered a bogus
- * ypbind with the portmapper and is trying to trick us.
- */
- if (ntohs(clnt_sin.sin_port) >= IPPORT_RESERVED) {
- if (client != NULL)
- clnt_destroy(client);
- if (new)
- free(ysd);
- return(YPERR_YPBIND);
- }
- tv.tv_sec = _yplib_timeout/2;
- tv.tv_usec = 0;
- r = clnt_call(client, YPBINDPROC_DOMAIN,
- xdr_domainname, (char *)&dom, xdr_ypbind_resp, &ypbr, tv);
- if(r != RPC_SUCCESS) {
- clnt_destroy(client);
- ysd->dom_vers = -1;
- if (r == RPC_PROGUNAVAIL || r == RPC_PROCUNAVAIL) {
- if (new)
- free(ysd);
- return(YPERR_YPBIND);
- }
- fprintf(stderr,
- "YP: server for domain %s not responding, retrying\n", dom);
- goto again;
- } else {
- if (ypbr.ypbind_status != YPBIND_SUCC_VAL) {
- clnt_destroy(client);
- ysd->dom_vers = -1;
- sleep(_yplib_timeout/2);
- goto again;
- }
- }
- clnt_destroy(client);
-
- bzero((char *)&ysd->dom_server_addr, sizeof ysd->dom_server_addr);
- ysd->dom_server_addr.sin_family = AF_INET;
- ysd->dom_server_addr.sin_port =
- *(u_short *)&ypbr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port;
- ysd->dom_server_addr.sin_addr.s_addr =
- *(u_long *)&ypbr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr;
-
- /*
- * We could do a reserved port check here too, but this
- * could pose compatibility problems. The local ypbind is
- * supposed to decide whether or not to trust yp servers
- * on insecure ports. For now, we trust its judgement.
- */
- ysd->dom_server_port =
- *(u_short *)&ypbr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port;
-gotit:
- ysd->dom_vers = YPVERS;
- strcpy(ysd->dom_domain, dom);
- }
-
- /* Don't rebuild the connection to the server unless we have to. */
- if (ysd->dom_client == NULL) {
- tv.tv_sec = _yplib_timeout/2;
- tv.tv_usec = 0;
- ysd->dom_socket = RPC_ANYSOCK;
- ysd->dom_client = clntudp_create(&ysd->dom_server_addr,
- YPPROG, YPVERS, tv, &ysd->dom_socket);
- if(ysd->dom_client==NULL) {
- clnt_pcreateerror("clntudp_create");
- ysd->dom_vers = -1;
- goto again;
- }
- if( fcntl(ysd->dom_socket, F_SETFD, 1) == -1)
- perror("fcntl: F_SETFD");
- /*
- * We want a port number associated with this socket
- * so that we can check its authenticity later.
- */
- checklen = sizeof(struct sockaddr_in);
- bzero((char *)&check, checklen);
- bind(ysd->dom_socket, (struct sockaddr *)&check, checklen);
- check.sin_family = AF_INET;
- if (!getsockname(ysd->dom_socket,
- (struct sockaddr *)&check, &checklen)) {
- ysd->dom_local_port = check.sin_port;
- } else {
- clnt_destroy(ysd->dom_client);
- if (new)
- free(ysd);
- return(YPERR_YPBIND);
- }
- }
-
- if(new) {
- ysd->dom_pnext = _ypbindlist;
- _ypbindlist = ysd;
- }
-
- if(ypdb!=NULL)
- *ypdb = ysd;
- return 0;
-}
-
-static void
-_yp_unbind(ypb)
- struct dom_binding *ypb;
-{
- struct sockaddr_in check;
- int checklen = sizeof(struct sockaddr_in);
-
- if (ypb->dom_client != NULL) {
- /* Check the socket -- may have been hosed by the caller. */
- if (getsockname(ypb->dom_socket, (struct sockaddr *)&check,
- &checklen) == -1 || check.sin_family != AF_INET ||
- check.sin_port != ypb->dom_local_port) {
- int save, sock;
-
- sock = ypb->dom_socket;
- save = dup(ypb->dom_socket);
- clnt_destroy(ypb->dom_client);
- sock = dup2(save, sock);
- close(save);
- } else
- clnt_destroy(ypb->dom_client);
- }
-
- ypb->dom_client = NULL;
- ypb->dom_socket = -1;
- ypb->dom_vers = -1;
-}
-
-int
-yp_bind(dom)
- char *dom;
-{
- return _yp_dobind(dom, NULL);
-}
-
-void
-yp_unbind(dom)
- char *dom;
-{
- struct dom_binding *ypb, *ypbp;
-
- ypbp = NULL;
- for(ypb=_ypbindlist; ypb; ypb=ypb->dom_pnext) {
- if( strcmp(dom, ypb->dom_domain) == 0) {
- _yp_unbind(ypb);
- if(ypbp)
- ypbp->dom_pnext = ypb->dom_pnext;
- else
- _ypbindlist = ypb->dom_pnext;
- free(ypb);
- return;
- }
- ypbp = ypb;
- }
- return;
-}
-
-int
-yp_match(indomain, inmap, inkey, inkeylen, outval, outvallen)
- char *indomain;
- char *inmap;
- const char *inkey;
- int inkeylen;
- char **outval;
- int *outvallen;
-{
- struct dom_binding *ysd;
- struct ypresp_val yprv;
- struct timeval tv;
- struct ypreq_key yprk;
- int r;
-
- *outval = NULL;
- *outvallen = 0;
-
- /* Sanity check */
-
- if (inkey == NULL || !strlen(inkey) || inkeylen <= 0 ||
- inmap == NULL || !strlen(inmap) ||
- indomain == NULL || !strlen(indomain))
- return YPERR_BADARGS;
-
-#ifdef YPMATCHCACHE
- if( !strcmp(_yp_domain, indomain) && ypmatch_find(inmap, inkey,
- inkeylen, &yprv.val.valdat_val, &yprv.val.valdat_len)) {
- *outvallen = yprv.val.valdat_len;
- *outval = (char *)malloc(*outvallen+1);
- bcopy(yprv.val.valdat_val, *outval, *outvallen);
- (*outval)[*outvallen] = '\0';
- return 0;
- }
-#endif
-
-again:
- if( _yp_dobind(indomain, &ysd) != 0)
- return YPERR_DOMAIN;
-
- tv.tv_sec = _yplib_timeout;
- tv.tv_usec = 0;
-
- yprk.domain = indomain;
- yprk.map = inmap;
- yprk.key.keydat_val = (char *)inkey;
- yprk.key.keydat_len = inkeylen;
-
- bzero((char *)&yprv, sizeof yprv);
-
- r = clnt_call(ysd->dom_client, YPPROC_MATCH,
- xdr_ypreq_key, &yprk, xdr_ypresp_val, &yprv, tv);
- if(r != RPC_SUCCESS) {
- clnt_perror(ysd->dom_client, "yp_match: clnt_call");
- _yp_unbind(ysd);
- goto again;
- }
-
- if( !(r=ypprot_err(yprv.stat)) ) {
- *outvallen = yprv.val.valdat_len;
- *outval = (char *)malloc(*outvallen+1);
- bcopy(yprv.val.valdat_val, *outval, *outvallen);
- (*outval)[*outvallen] = '\0';
-#ifdef YPMATCHCACHE
- if( strcmp(_yp_domain, indomain)==0 )
- ypmatch_add(inmap, inkey, inkeylen, *outval, *outvallen);
-#endif
- }
-
- xdr_free(xdr_ypresp_val, (char *)&yprv);
- return r;
-}
-
-int
-yp_get_default_domain(domp)
-char **domp;
-{
- *domp = NULL;
- if(_yp_domain[0] == '\0')
- if( getdomainname(_yp_domain, sizeof _yp_domain))
- return YPERR_NODOM;
- *domp = _yp_domain;
- return 0;
-}
-
-int
-yp_first(indomain, inmap, outkey, outkeylen, outval, outvallen)
- char *indomain;
- char *inmap;
- char **outkey;
- int *outkeylen;
- char **outval;
- int *outvallen;
-{
- struct ypresp_key_val yprkv;
- struct ypreq_nokey yprnk;
- struct dom_binding *ysd;
- struct timeval tv;
- int r;
-
- /* Sanity check */
-
- if (indomain == NULL || !strlen(indomain) ||
- inmap == NULL || !strlen(inmap))
- return YPERR_BADARGS;
-
- *outkey = *outval = NULL;
- *outkeylen = *outvallen = 0;
-
-again:
- if( _yp_dobind(indomain, &ysd) != 0)
- return YPERR_DOMAIN;
-
- tv.tv_sec = _yplib_timeout;
- tv.tv_usec = 0;
-
- yprnk.domain = indomain;
- yprnk.map = inmap;
- bzero((char *)&yprkv, sizeof yprkv);
-
- r = clnt_call(ysd->dom_client, YPPROC_FIRST,
- xdr_ypreq_nokey, &yprnk, xdr_ypresp_key_val, &yprkv, tv);
- if(r != RPC_SUCCESS) {
- clnt_perror(ysd->dom_client, "yp_first: clnt_call");
- _yp_unbind(ysd);
- goto again;
- }
- if( !(r=ypprot_err(yprkv.stat)) ) {
- *outkeylen = yprkv.key.keydat_len;
- *outkey = (char *)malloc(*outkeylen+1);
- bcopy(yprkv.key.keydat_val, *outkey, *outkeylen);
- (*outkey)[*outkeylen] = '\0';
- *outvallen = yprkv.val.valdat_len;
- *outval = (char *)malloc(*outvallen+1);
- bcopy(yprkv.val.valdat_val, *outval, *outvallen);
- (*outval)[*outvallen] = '\0';
- }
-
- xdr_free(xdr_ypresp_key_val, (char *)&yprkv);
- return r;
-}
-
-int
-yp_next(indomain, inmap, inkey, inkeylen, outkey, outkeylen, outval, outvallen)
- char *indomain;
- char *inmap;
- char *inkey;
- int inkeylen;
- char **outkey;
- int *outkeylen;
- char **outval;
- int *outvallen;
-{
- struct ypresp_key_val yprkv;
- struct ypreq_key yprk;
- struct dom_binding *ysd;
- struct timeval tv;
- int r;
-
- /* Sanity check */
-
- if (inkey == NULL || !strlen(inkey) || inkeylen <= 0 ||
- inmap == NULL || !strlen(inmap) ||
- indomain == NULL || !strlen(indomain))
- return YPERR_BADARGS;
-
- *outkey = *outval = NULL;
- *outkeylen = *outvallen = 0;
-
-again:
- if( _yp_dobind(indomain, &ysd) != 0)
- return YPERR_DOMAIN;
-
- tv.tv_sec = _yplib_timeout;
- tv.tv_usec = 0;
-
- yprk.domain = indomain;
- yprk.map = inmap;
- yprk.key.keydat_val = inkey;
- yprk.key.keydat_len = inkeylen;
- bzero((char *)&yprkv, sizeof yprkv);
-
- r = clnt_call(ysd->dom_client, YPPROC_NEXT,
- xdr_ypreq_key, &yprk, xdr_ypresp_key_val, &yprkv, tv);
- if(r != RPC_SUCCESS) {
- clnt_perror(ysd->dom_client, "yp_next: clnt_call");
- _yp_unbind(ysd);
- goto again;
- }
- if( !(r=ypprot_err(yprkv.stat)) ) {
- *outkeylen = yprkv.key.keydat_len;
- *outkey = (char *)malloc(*outkeylen+1);
- bcopy(yprkv.key.keydat_val, *outkey, *outkeylen);
- (*outkey)[*outkeylen] = '\0';
- *outvallen = yprkv.val.valdat_len;
- *outval = (char *)malloc(*outvallen+1);
- bcopy(yprkv.val.valdat_val, *outval, *outvallen);
- (*outval)[*outvallen] = '\0';
- }
-
- xdr_free(xdr_ypresp_key_val, (char *)&yprkv);
- return r;
-}
-
-int
-yp_all(indomain, inmap, incallback)
- char *indomain;
- char *inmap;
- struct ypall_callback *incallback;
-{
- struct ypreq_nokey yprnk;
- struct dom_binding *ysd;
- struct timeval tv;
- struct sockaddr_in clnt_sin;
- CLIENT *clnt;
- u_long status, savstat;
- int clnt_sock;
-
- /* Sanity check */
-
- if (indomain == NULL || !strlen(indomain) ||
- inmap == NULL || !strlen(inmap))
- return YPERR_BADARGS;
-
-again:
-
- if( _yp_dobind(indomain, &ysd) != 0)
- return YPERR_DOMAIN;
-
- tv.tv_sec = _yplib_timeout;
- tv.tv_usec = 0;
-
- /* YPPROC_ALL manufactures its own channel to ypserv using TCP */
-
- clnt_sock = RPC_ANYSOCK;
- clnt_sin = ysd->dom_server_addr;
- clnt_sin.sin_port = 0;
- clnt = clnttcp_create(&clnt_sin, YPPROG, YPVERS, &clnt_sock, 0, 0);
- if(clnt==NULL) {
- printf("clnttcp_create failed\n");
- return YPERR_PMAP;
- }
-
- yprnk.domain = indomain;
- yprnk.map = inmap;
- ypresp_allfn = incallback->foreach;
- ypresp_data = (void *)incallback->data;
-
- if (clnt_call(clnt, YPPROC_ALL,
- xdr_ypreq_nokey, &yprnk,
- xdr_ypresp_all_seq, &status, tv) != RPC_SUCCESS) {
- clnt_perror(ysd->dom_client, "yp_next: clnt_call");
- clnt_destroy(clnt);
- _yp_unbind(ysd);
- goto again;
- }
-
- clnt_destroy(clnt);
- savstat = status;
- xdr_free(xdr_ypresp_all_seq, (char *)&status); /* not really needed... */
- if(savstat != YP_NOMORE)
- return ypprot_err(savstat);
- return 0;
-}
-
-int
-yp_order(indomain, inmap, outorder)
- char *indomain;
- char *inmap;
- int *outorder;
-{
- struct dom_binding *ysd;
- struct ypresp_order ypro;
- struct ypreq_nokey yprnk;
- struct timeval tv;
- int r;
-
- /* Sanity check */
-
- if (indomain == NULL || !strlen(indomain) ||
- inmap == NULL || !strlen(inmap))
- return YPERR_BADARGS;
-
-again:
- if( _yp_dobind(indomain, &ysd) != 0)
- return YPERR_DOMAIN;
-
- tv.tv_sec = _yplib_timeout;
- tv.tv_usec = 0;
-
- yprnk.domain = indomain;
- yprnk.map = inmap;
-
- bzero((char *)(char *)&ypro, sizeof ypro);
-
- r = clnt_call(ysd->dom_client, YPPROC_ORDER,
- xdr_ypreq_nokey, &yprnk, xdr_ypresp_order, &ypro, tv);
-
- /*
- * NIS+ in YP compat mode doesn't support the YPPROC_ORDER
- * procedure.
- */
- if (r == RPC_PROCUNAVAIL) {
- return(YPERR_YPERR);
- }
-
- if(r != RPC_SUCCESS) {
- clnt_perror(ysd->dom_client, "yp_order: clnt_call");
- _yp_unbind(ysd);
- goto again;
- }
-
- if( !(r=ypprot_err(ypro.stat)) ) {
- *outorder = ypro.ordernum;
- }
-
- xdr_free(xdr_ypresp_order, (char *)&ypro);
- return (r);
-}
-
-int
-yp_master(indomain, inmap, outname)
- char *indomain;
- char *inmap;
- char **outname;
-{
- struct dom_binding *ysd;
- struct ypresp_master yprm;
- struct ypreq_nokey yprnk;
- struct timeval tv;
- int r;
-
- /* Sanity check */
-
- if (indomain == NULL || !strlen(indomain) ||
- inmap == NULL || !strlen(inmap))
- return YPERR_BADARGS;
-again:
- if( _yp_dobind(indomain, &ysd) != 0)
- return YPERR_DOMAIN;
-
- tv.tv_sec = _yplib_timeout;
- tv.tv_usec = 0;
-
- yprnk.domain = indomain;
- yprnk.map = inmap;
-
- bzero((char *)&yprm, sizeof yprm);
-
- r = clnt_call(ysd->dom_client, YPPROC_MASTER,
- xdr_ypreq_nokey, &yprnk, xdr_ypresp_master, &yprm, tv);
- if(r != RPC_SUCCESS) {
- clnt_perror(ysd->dom_client, "yp_master: clnt_call");
- _yp_unbind(ysd);
- goto again;
- }
-
- if( !(r=ypprot_err(yprm.stat)) ) {
- *outname = (char *)strdup(yprm.peer);
- }
-
- xdr_free(xdr_ypresp_master, (char *)&yprm);
- return (r);
-}
-int
-yp_maplist(indomain, outmaplist)
- char *indomain;
- struct ypmaplist **outmaplist;
-{
- struct dom_binding *ysd;
- struct ypresp_maplist ypml;
- struct timeval tv;
- int r;
-
- /* Sanity check */
-
- if (indomain == NULL || !strlen(indomain))
- return YPERR_BADARGS;
-
-again:
- if( _yp_dobind(indomain, &ysd) != 0)
- return YPERR_DOMAIN;
-
- tv.tv_sec = _yplib_timeout;
- tv.tv_usec = 0;
-
- bzero((char *)&ypml, sizeof ypml);
-
- r = clnt_call(ysd->dom_client, YPPROC_MAPLIST,
- xdr_domainname,(char *)&indomain,xdr_ypresp_maplist,&ypml,tv);
- if (r != RPC_SUCCESS) {
- clnt_perror(ysd->dom_client, "yp_maplist: clnt_call");
- _yp_unbind(ysd);
- goto again;
- }
- if( !(r=ypprot_err(ypml.stat)) ) {
- *outmaplist = ypml.maps;
- }
-
- /* NO: xdr_free(xdr_ypresp_maplist, &ypml);*/
- return (r);
-}
-
-char *
-yperr_string(incode)
- int incode;
-{
- static char err[80];
-
- switch(incode) {
- case 0:
- return "Success";
- case YPERR_BADARGS:
- return "Request arguments bad";
- case YPERR_RPC:
- return "RPC failure";
- case YPERR_DOMAIN:
- return "Can't bind to server which serves this domain";
- case YPERR_MAP:
- return "No such map in server's domain";
- case YPERR_KEY:
- return "No such key in map";
- case YPERR_YPERR:
- return "YP server error";
- case YPERR_RESRC:
- return "Local resource allocation failure";
- case YPERR_NOMORE:
- return "No more records in map database";
- case YPERR_PMAP:
- return "Can't communicate with portmapper";
- case YPERR_YPBIND:
- return "Can't communicate with ypbind";
- case YPERR_YPSERV:
- return "Can't communicate with ypserv";
- case YPERR_NODOM:
- return "Local domain name not set";
- case YPERR_BADDB:
- return "Server data base is bad";
- case YPERR_VERS:
- return "YP server version mismatch - server can't supply service.";
- case YPERR_ACCESS:
- return "Access violation";
- case YPERR_BUSY:
- return "Database is busy";
- }
- sprintf(err, "YP unknown error %d\n", incode);
- return err;
-}
-
-int
-ypprot_err(incode)
- unsigned int incode;
-{
- switch(incode) {
- case YP_TRUE:
- return 0;
- case YP_FALSE:
- return YPERR_YPBIND;
- case YP_NOMORE:
- return YPERR_NOMORE;
- case YP_NOMAP:
- return YPERR_MAP;
- case YP_NODOM:
- return YPERR_DOMAIN;
- case YP_NOKEY:
- return YPERR_KEY;
- case YP_BADOP:
- return YPERR_YPERR;
- case YP_BADDB:
- return YPERR_BADDB;
- case YP_YPERR:
- return YPERR_YPERR;
- case YP_BADARGS:
- return YPERR_BADARGS;
- case YP_VERS:
- return YPERR_VERS;
- }
- return YPERR_YPERR;
-}
-
-int
-_yp_check(dom)
- char **dom;
-{
- char *unused;
-
- if( _yp_domain[0]=='\0' )
- if( yp_get_default_domain(&unused) )
- return 0;
-
- if(dom)
- *dom = _yp_domain;
-
- if( yp_bind(_yp_domain)==0 ) {
- yp_unbind(_yp_domain);
- return 1;
- }
- return 0;
-}
diff --git a/lib/libc_r/Makefile b/lib/libc_r/Makefile
deleted file mode 100644
index 363f308..0000000
--- a/lib/libc_r/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# $Id$
-#
-# All library objects contain rcsid strings by default; they may be
-# excluded as a space-saving measure. To produce a library that does
-# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
-# from CFLAGS below. To remove these strings from just the system call
-# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
-LIB=c_r
-SHLIB_MAJOR= 3
-SHLIB_MINOR= 0
-CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS
-CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
-AINC= -I${.CURDIR}/../libc/${MACHINE} -I${.CURDIR}/uthread
-PRECIOUSLIB= yes
-
-.include "${.CURDIR}/../libc/Makefile.inc"
-.include "${.CURDIR}/man/Makefile.inc"
-.include "${.CURDIR}/uthread/Makefile.inc"
-.include "${.CURDIR}/sys/Makefile.inc"
-
-.include <bsd.lib.mk>
diff --git a/lib/libc_r/man/Makefile.inc b/lib/libc_r/man/Makefile.inc
deleted file mode 100644
index 7d67fb8..0000000
--- a/lib/libc_r/man/Makefile.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-# $Id$
-
-# POSIX thread man files
-
-.PATH: ${.CURDIR}/man
-
-MAN3+= pthread_create.3 \
- pthread_detach.3 \
- pthread_equal.3 \
- pthread_exit.3 \
- pthread_getspecific.3 \
- pthread_join.3 \
- pthread_key_create.3 \
- pthread_key_delete.3 \
- pthread_once.3 \
- pthread_self.3 \
- pthread_setspecific.3
diff --git a/lib/libc_r/man/pthread_create.3 b/lib/libc_r/man/pthread_create.3
deleted file mode 100644
index aa81588..0000000
--- a/lib/libc_r/man/pthread_create.3
+++ /dev/null
@@ -1,109 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_CREATE 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_create
-.Nd create a new thread
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_create "pthread_t *thread" "const pthread_attr_t *attr" "void *(*start_routine)(void *)" "void *arg"
-.Sh DESCRIPTION
-The
-.Fn pthread_create
-function is used to create a new thread, with attributes specified by
-.Fa attr ,
-within a process. If
-.Fa attr
-is NULL, the default attributes are used. If the attributes specified by
-.Fa attr
-are modified later, the thread's attributes are not affected. Upon
-successful completion
-.Fn pthread_create
-will store the ID of the created thread in the location specified by
-.Fa thread .
-.Pp
-The thread is created executing
-.Fa start_routine
-with
-.Fa arg
-as its sole argument. If the
-.Fa start_routine
-returns, the effect is as if there was an implicit call to
-.Fn pthread_exit
-using the return value of
-.Fa start_toutine
-as the exit status. Note that the thread in which
-.Fn main
-was originally invoked differs from this. When it returns from
-.Fn main ,
-the effect is as if there was an implicit call to
-.Fn exit using the return value of
-.Fn main
-as the exit status.
-.Pp
-The signal state of the new thread is initialized as:
-.Bl -bullet -offset indent
-.It
-The signal mask is inherited from the creating thread.
-.It
-The set of signals pending for the new thread is empty.
-.El
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_create
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_create
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EAGAIN
-The system lacked the necessary resources to create another thread, or
-the system-imposed limit on the total number of threads in a process
-[PTHREAD_THREADS_MAX] would be exceeded.
-.It Bq Er EINVAL
-The value specified by
-.Fa attr
-is invalid.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr fork 2 ,
-.Xr pthread_exit 3 ,
-.Xr pthread_join 3
-.Sh STANDARDS
-.Fn pthread_create
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_detach.3 b/lib/libc_r/man/pthread_detach.3
deleted file mode 100644
index d2a60dd..0000000
--- a/lib/libc_r/man/pthread_detach.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_DETACH 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_detach
-.Nd detach a thread
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_detach "pthread_t thread"
-.Sh DESCRIPTION
-The
-.Fn pthread_detach
-function is used to indicate to the implementation that storage for the
-thread
-.Fa thread
-can be reclaimed when the thread terminates. If
-.Fa thread
-has not terminated,
-.Fn pthread_detach
-will not cause it to terminate. The effect of multiple
-.Fn pthread_detach
-calls on the same target thread is unspecified.
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_detach
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_detach
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The implementation has detected that the value specified by
-.Fa thread
-does not refer to a joinable thread.
-.It Bq Er ESRCH
-No thread could be found corresponding to that specified by the given
-thread ID,
-.Fa thread .
-.El
-.Pp
-.Sh SEE ALSO
-.Xr pthread_join 3
-.Sh STANDARDS
-.Fn pthread_detach
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_equal.3 b/lib/libc_r/man/pthread_equal.3
deleted file mode 100644
index 3324855..0000000
--- a/lib/libc_r/man/pthread_equal.3
+++ /dev/null
@@ -1,66 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_EQUAL 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_equal
-.Nd compare thread IDs
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_equal "pthread_t t1" "pthread_t t2"
-.Sh DESCRIPTION
-The
-.Fn pthread_equal
-function compares the thread IDs
-.Fa t1
-and
-.Fa t2 .
-.Sh RETURN VALUES
-The
-.Fn pthread_equal
-function will non-zero if the thread IDs
-.Fa t1
-and
-.Fa t2
-correspond to the same thread, otherwise it will return zero.
-.Sh ERRORS
-None.
-.Pp
-.Sh SEE ALSO
-.Xr pthread_create 3 ,
-.Xr pthread_exit 3
-.Sh STANDARDS
-.Fn pthread_equal
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_exit.3 b/lib/libc_r/man/pthread_exit.3
deleted file mode 100644
index aad365e..0000000
--- a/lib/libc_r/man/pthread_exit.3
+++ /dev/null
@@ -1,99 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_EXIT 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_exit
-.Nd terminate the calling thread
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft void
-.Fn pthread_exit "void *value_ptr"
-.Sh DESCRIPTION
-The
-.Fn pthread_exit
-function terminates the calling thread and makes the value
-.Fa value_ptr
-available to any successful join with the terminating thread. Any
-cancellation cleanup handlers that have been pushed and are not yet popped
-are popped in the reverse order that they were pushed and then executed.
-After all cancellation handlers have been executed, if the thread has any
-thread-specific data, appropriate destructor functions are called in an
-unspecified order. Thread termination does not release any application
-visible process resources, including, but not limited to, mutexes and
-file descriptors, nor does it perform any process level cleanup
-actions, including, but not limited to, calling
-.Fn atexit
-routines that may exist.
-.Pp
-An implicit call to
-.Fn pthread_exit
-is made when a thread other than the thread in which
-.Fn main
-was first invoked returns from the start routine that was used to create
-it. The function's return value serves as the thread's exit status.
-.Pp
-The behavior of
-.Fn pthread_exit
-is undefied if called from a cancellation handler or destructor function
-that was invoked as the result of an implicit or explicit call to
-.Fn pthread_exit .
-.Pp
-After a thread has terminated, the result of access to local (auto)
-variables of the thread is undefined. Thus, references to local variables
-of the exiting thread should not be used for the
-.Fn pthread_exit
-.Fa value_ptr
-parameter value.
-.Pp
-The process will exit with an exit status of 0 after the last thread has
-been terminated. The behavior is as if the implementation called
-.Fn exit
-with a zero argument at thread termination time.
-.Pp
-.Sh RETURN VALUES
-The
-.Fn pthread_exit
-function cannot return to its caller.
-.Sh ERRORS
-None.
-.Pp
-.Sh SEE ALSO
-.Xr _exit 2 ,
-.Xr exit 2 ,
-.Xr pthread_create 3 ,
-.Xr pthread_join 3
-.Sh STANDARDS
-.Fn pthread_exit
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_getspecific.3 b/lib/libc_r/man/pthread_getspecific.3
deleted file mode 100644
index b53841e..0000000
--- a/lib/libc_r/man/pthread_getspecific.3
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id$
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_GETSPECIFIC 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_getspecific
-.Nd get a thread-specific data value
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft void *
-.Fn pthread_getspecific "pthread_key_t key"
-.Sh DESCRIPTION
-The
-.Fn pthread_getspecific
-function returns the value currently bound to the specified
-.Fa key
-on behalf of the calling thread.
-.Pp
-The effect of calling
-.Fn pthread_getspecific
-with a
-.Fa key
-value not obtained from
-.Fn pthread_key_create
-or after
-.Fa key
-has been deleted with
-.Fn pthread_key_delete
-is undefined.
-.Pp
-.Fn pthread_getspecific
-may be called from a thread-specific data destructor function.
-.Sh RETURN VALUES
-The
-.Fn pthread_getspecific
-function will return the thread-specific data value associated with the given
-.Fa key .
-If no thread-specific data value is associated with
-.Fa key ,
-then the value NULL is returned.
-.Sh ERRORS
-None.
-.Sh SEE ALSO
-.Xr pthread_key_create 3 ,
-.Xr pthread_key_delete 3 ,
-.Xr pthread_setspecific 3
-.Sh STANDARDS
-.Fn pthread_getspecific
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_join.3 b/lib/libc_r/man/pthread_join.3
deleted file mode 100644
index cabf319..0000000
--- a/lib/libc_r/man/pthread_join.3
+++ /dev/null
@@ -1,100 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_JOIN 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_join
-.Nd wait for thread termination
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_join "pthread_t thread" "void **value_ptr"
-.Sh DESCRIPTION
-The
-.Fn pthread_join
-function suspends execution of the calling thread until the target
-.Fa thread
-terminates unless the target
-.Fa thread
-has already terminated.
-.Pp
-On return from a successful
-.Fn pthread_join
-call with a non-NULL
-.Fa value_ptr
-argument, the value passed to
-.Fn pthread_exit
-by the terminating thread is stored in the location referenced by
-.Fa value_ptr .
-When a
-.Fn pthread_join
-returns successfully, the target thread has been terminated. The results
-of multiple simultaneous calls to
-.Fn pthread_join
-specifying the same target thread are undefined. If the thread calling
-.Fn pthread_join
-is cancelled, then the target thread is not detached.
-.Pp
-A thread that has exited but remains unjoined counts against
-[_POSIX_THREAD_THREADS_MAX].
-.Pp
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_join
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_join
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The implementation has detected that the value specified by
-.Fa thread
-does not refer to a joinable thread.
-.It Bq Er ESRCH
-No thread could be found corresponding to that specified by the given
-thread ID,
-.Fa thread .
-.It Bq Er EDEADLK
-A deadlock was detected or the value of
-.Fa thread
-specifies the calling thread.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr wait 2 ,
-.Xr pthread_create 3
-.Sh STANDARDS
-.Fn pthread_join
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_key_create.3 b/lib/libc_r/man/pthread_key_create.3
deleted file mode 100644
index 25165ce..0000000
--- a/lib/libc_r/man/pthread_key_create.3
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_KEY_CREATE 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_key_create
-.Nd thread-specific data key creation
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_key_create "pthread_key_t *key" "void (*destructor)(void *)"
-.Sh DESCRIPTION
-The
-.Fn pthread_key_create
-function creates a thread-specific data key visible to all threads in the
-process. Key values provided by
-.Fn pthread_key_create
-are opaque objects used to locate thread-specific data. Although the same
-key value may be used by different threads, the values bound to the key
-by
-.Fn pthread_setspecific
-are maintained on a per-thread basis and persist for the life of the calling
-thread.
-.Pp
-Upon key creation, the value NULL is associated with the new key in all
-active threads. Upon thread creation, the value NULL is associated with all
-defined keys in the new thread.
-.Pp
-An optional destructor function may be associated with each key value. At
-thread exit, if a key value has a non-NULL destructor pointer, and the
-thread has a non-NULL value associated with the key, the function pointed
-to is called with the current associated value as its sole argument. The
-order of destructor calls is unspecified if more than one destructor exists
-for a thread when it exits.
-.Pp
-If, after all the destructors have been called for all non-NULL values
-with associated destructors, there are still some non-NULL values with
-associated destructors, then the process is repeated. If, after at least
-[PTHREAD_DESTRUCTOR_ITERATIONS] iterations of destructor calls for
-outstanding non-NULL values, there are still some non-NULL values with
-associated destructors, the implementation stops calling destructors.
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_key_create
-function will store the newly created key value at the location specified by
-.Fa key
-and returns zero. Otherwise an error number will be returned to indicate
-the error.
-.Sh ERRORS
-.Fn pthread_key_create
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EAGAIN
-The system lacked the necessary resources to create another thread-specific
-data key, or the system-imposed limit on the total number of keys per process
-[PTHREAD_KEYS_MAX] would be exceeded.
-.It Bq Er ENOMEM
-Insufficient memory exists to create the key.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr pthread_getspecific 3 ,
-.Xr pthread_key_delete 3 ,
-.Xr pthread_setspecific 3
-.Sh STANDARDS
-.Fn pthread_key_create
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_key_delete.3 b/lib/libc_r/man/pthread_key_delete.3
deleted file mode 100644
index badfa8c..0000000
--- a/lib/libc_r/man/pthread_key_delete.3
+++ /dev/null
@@ -1,92 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_KEY_DELETE 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_key_delete
-.Nd delete a thread-specific data key
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_key_delete "pthread_key_t key"
-.Sh DESCRIPTION
-The
-.Fn pthread_key_delete
-function deletes a thread-specific data key previously returned by
-.Fn pthread_key_create .
-The thread-specific data values associated with
-.Fa key
-need not be NULL at the time that
-.Fn pthread_key_delete
-is called. It is the responsibility of the application to free any
-application storage or perform any cleanup actions for data structures
-related to the deleted key or associated thread-specific data in any threads;
-this cleanup can be done either before or after
-.Fn pthread_key_delete
-is called. Any attempt to use
-.Fa key
-following the call to
-.Fn pthread_key_delete
-results in undefined behavior.
-.Pp
-The
-.Fn pthread_key_delete
-function is callable from within destructor functions. Destructor functions
-are not invoked by
-.Fn pthread_key_delete .
-Any destructor function that may have been associated with
-.Fa key
-will no longer be called upon thread exit.
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_key_delete
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_key_delete
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The
-.Fa key
-value is invalid.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr pthread_getspecific 3 ,
-.Xr pthread_key_create 3 ,
-.Xr pthread_setspecific 3
-.Sh STANDARDS
-.Fn pthread_key_delete
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_once.3 b/lib/libc_r/man/pthread_once.3
deleted file mode 100644
index 9ade42f..0000000
--- a/lib/libc_r/man/pthread_once.3
+++ /dev/null
@@ -1,100 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_ONCE 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_once
-.Nd dynamic package initialization
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Pp
-pthread_once
-.Fa once_control
-= PTHREAD_ONCE_INIT;
-.Ft int
-.Fn pthread_once "pthread_once_t *once_control" "void *(*init_routine)(void)"
-.Sh DESCRIPTION
-The first call to
-.Fn pthread_once
-by any thread in a process, with a given
-.Fa once_control ,
-will call the
-.Fn init_routine
-with no arguments. Subsequent calls to
-.Fn pthread_once
-with the same
-.Fa once_control
-will not call the
-.Fn init_routine .
-On return from
-.Fn pthread_once ,
-it is guaranteed that
-.Fn init_routine
-has completed. The
-.Fa once_control
-parameter is used to determine whether the associated initialization
-routine has been called.
-.Pp
-The function
-.Fn pthread_once
-is not a cancellation point. However, if
-.Fn init_routine
-is a cancellation point and is cancelled, the effect on
-.Fa once_control is as if
-.Fn pthread_once
-was never called.
-.Pp
-The constant
-.Fa PTHREAD_ONCE_INIT
-is defined by header
-.Aq Pa pthread.h .
-.Pp
-The behavior of
-.Fn pthread_once
-is undefined if
-.Fa once_control
-has automatic storage duration or is not initialized by
-.Fa PTHREAD_ONCE_INIT .
-.Pp
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_once
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-None.
-.Pp
-.Sh STANDARDS
-.Fn pthread_once
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_self.3 b/lib/libc_r/man/pthread_self.3
deleted file mode 100644
index 9ba0ee6..0000000
--- a/lib/libc_r/man/pthread_self.3
+++ /dev/null
@@ -1,59 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_SELF 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_self
-.Nd get the calling thread's ID
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft pthread_t
-.Fn pthread_self "void"
-.Sh DESCRIPTION
-The
-.Fn pthread_self
-function returns the thread ID of the calling thread.
-.Sh RETURN VALUES
-The
-.Fn pthread_self
-function returns the thread ID of the calling thread.
-.Sh ERRORS
-None.
-.Pp
-.Sh SEE ALSO
-.Xr pthread_create 3 ,
-.Xr pthread_equal 3
-.Sh STANDARDS
-.Fn pthread_self
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/man/pthread_setspecific.3 b/lib/libc_r/man/pthread_setspecific.3
deleted file mode 100644
index 838b587..0000000
--- a/lib/libc_r/man/pthread_setspecific.3
+++ /dev/null
@@ -1,91 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_SETSPECIFIC 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_setspecific
-.Nd set a thread-specific data value
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_setspecific "pthread_key_t key" "const void *value"
-.Sh DESCRIPTION
-The
-.Fn pthread_setspecific
-function associates a thread-specific value with a
-.Fa key
-obtained via a previous call to
-.Fn pthread_key_create .
-Different threads man bind different values to the same key. These values are
-typically pointers to blocks of dynamically allocated memory that have been
-reserved for use by the calling thread.
-.Pp
-The effect of calling
-.Fn pthread_setspecific
-with a key value not obtained from
-.Fn pthread_key_create
-or after
-.Fa key
-has been deleted with
-.Fn pthread_key_delete
-is undefined.
-.Pp
-.Fn pthread_setspecific
-may be called from a thread-specific data destructor function, however this
-may result in lost storage or infinite loops.
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_setspecific
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_setspecific
-will fail if:
-.Bl -tag -width Er
-.It Bq Er ENOMEM
-Insufficient memory exists to associate the value with the
-.Fa key .
-.It Bq Er EINVAL
-The
-.Fa key
-value is invalid.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr pthread_getspecific 3 ,
-.Xr pthread_key_create 3 ,
-.Xr pthread_key_delete 3
-.Sh STANDARDS
-.Fn pthread_setspecific
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libc_r/sys/Makefile.inc b/lib/libc_r/sys/Makefile.inc
deleted file mode 100644
index 16fd33d..0000000
--- a/lib/libc_r/sys/Makefile.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-
-.PATH: ${.CURDIR}/sys
-
-SRCS+= __error.c
diff --git a/lib/libc_r/sys/__error.c b/lib/libc_r/sys/__error.c
deleted file mode 100644
index 545dfb0..0000000
--- a/lib/libc_r/sys/__error.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * Copyright (c) 1994 by Chris Provenzano, proven@mit.edu
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell
- * and Chris Provenzano.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-extern int errno;
-
-int * __error()
-{
- int *p_errno;
- if (_thread_run == _thread_initial) {
- p_errno = &errno;
- } else {
- p_errno = &_thread_run->error;
- }
- return(p_errno);
-}
-#endif
diff --git a/lib/libc_r/uthread/Makefile.inc b/lib/libc_r/uthread/Makefile.inc
deleted file mode 100644
index 4f1b308..0000000
--- a/lib/libc_r/uthread/Makefile.inc
+++ /dev/null
@@ -1,94 +0,0 @@
-# $Id: Makefile.inc,v 1.9 1997/05/06 00:49:36 jdp Exp $
-
-# uthread sources
-.PATH: ${.CURDIR}/uthread
-
-SRCS+= \
- uthread_accept.c \
- uthread_attr_destroy.c \
- uthread_attr_init.c \
- uthread_attr_getdetachstate.c \
- uthread_attr_getstackaddr.c \
- uthread_attr_getstacksize.c \
- uthread_attr_setcreatesuspend_np.c \
- uthread_attr_setdetachstate.c \
- uthread_attr_setstackaddr.c \
- uthread_attr_setstacksize.c \
- uthread_autoinit.cc \
- uthread_bind.c \
- uthread_clean.c \
- uthread_close.c \
- uthread_cond.c \
- uthread_condattr_destroy.c \
- uthread_condattr_init.c \
- uthread_connect.c \
- uthread_create.c \
- uthread_detach.c \
- uthread_dup.c \
- uthread_dup2.c \
- uthread_equal.c \
- uthread_execve.c \
- uthread_exit.c \
- uthread_fchmod.c \
- uthread_fchown.c \
- uthread_fcntl.c \
- uthread_fd.c \
- uthread_file.c \
- uthread_flock.c \
- uthread_fork.c \
- uthread_fstat.c \
- uthread_fstatfs.c \
- uthread_fsync.c \
- uthread_getdirentries.c \
- uthread_getpeername.c \
- uthread_getprio.c \
- uthread_getsockname.c \
- uthread_getsockopt.c \
- uthread_info.c \
- uthread_init.c \
- uthread_ioctl.c \
- uthread_join.c \
- uthread_kern.c \
- uthread_kill.c \
- uthread_listen.c \
- uthread_longjmp.c \
- uthread_mattr_init.c \
- uthread_mattr_kind_np.c \
- uthread_multi_np.c \
- uthread_mutex.c \
- uthread_mutexattr_destroy.c \
- uthread_nanosleep.c \
- uthread_once.c \
- uthread_open.c \
- uthread_pipe.c \
- uthread_queue.c \
- uthread_read.c \
- uthread_readv.c \
- uthread_recvfrom.c \
- uthread_resume_np.c \
- uthread_select.c \
- uthread_self.c \
- uthread_sendto.c \
- uthread_seterrno.c \
- uthread_setjmp.c \
- uthread_setprio.c \
- uthread_setsockopt.c \
- uthread_shutdown.c \
- uthread_sig.c \
- uthread_sigaction.c \
- uthread_sigblock.c \
- uthread_single_np.c \
- uthread_sigmask.c \
- uthread_signal.c \
- uthread_sigprocmask.c \
- uthread_sigsetmask.c \
- uthread_sigsuspend.c \
- uthread_sigwait.c \
- uthread_socket.c \
- uthread_socketpair.c \
- uthread_spec.c \
- uthread_suspend_np.c \
- uthread_wait4.c \
- uthread_write.c \
- uthread_writev.c \
- uthread_yield.c
diff --git a/lib/libc_r/uthread/pthread_private.h b/lib/libc_r/uthread/pthread_private.h
deleted file mode 100644
index e0a0511..0000000
--- a/lib/libc_r/uthread/pthread_private.h
+++ /dev/null
@@ -1,783 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Private thread definitions for the uthread kernel.
- *
- */
-
-#ifndef _PTHREAD_PRIVATE_H
-#define _PTHREAD_PRIVATE_H
-
-/*
- * Evaluate the storage class specifier.
- */
-#ifdef GLOBAL_PTHREAD_PRIVATE
-#define SCLASS
-#else
-#define SCLASS extern
-#endif
-
-/*
- * Include files.
- */
-#include <setjmp.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-/*
- * Kernel fatal error handler macro.
- */
-#define PANIC(string) _thread_exit(__FILE__,__LINE__,string)
-
-/*
- * State change macro:
- */
-#define PTHREAD_NEW_STATE(thrd, newstate) { \
- (thrd)->state = newstate; \
- (thrd)->fname = __FILE__; \
- (thrd)->lineno = __LINE__; \
-}
-
-/*
- * Queue definitions.
- */
-struct pthread_queue {
- struct pthread *q_next;
- struct pthread *q_last;
- void *q_data;
-};
-
-/*
- * Static queue initialization values.
- */
-#define PTHREAD_QUEUE_INITIALIZER { NULL, NULL, NULL }
-
-/*
- * Mutex definitions.
- */
-union pthread_mutex_data {
- void *m_ptr;
- int m_count;
-};
-
-struct pthread_mutex {
- enum pthread_mutextype m_type;
- struct pthread_queue m_queue;
- struct pthread *m_owner;
- union pthread_mutex_data m_data;
- long m_flags;
-};
-
-/*
- * Flags for mutexes.
- */
-#define MUTEX_FLAGS_PRIVATE 0x01
-#define MUTEX_FLAGS_INITED 0x02
-#define MUTEX_FLAGS_BUSY 0x04
-
-/*
- * Static mutex initialization values.
- */
-#define PTHREAD_MUTEX_INITIALIZER \
- { MUTEX_TYPE_FAST, PTHREAD_QUEUE_INITIALIZER, \
- NULL, { NULL }, MUTEX_FLAGS_INITED }
-
-struct pthread_mutex_attr {
- enum pthread_mutextype m_type;
- long m_flags;
-};
-
-/*
- * Condition variable definitions.
- */
-enum pthread_cond_type {
- COND_TYPE_FAST,
- COND_TYPE_MAX
-};
-
-struct pthread_cond {
- enum pthread_cond_type c_type;
- struct pthread_queue c_queue;
- void *c_data;
- long c_flags;
-};
-
-struct pthread_cond_attr {
- enum pthread_cond_type c_type;
- long c_flags;
-};
-
-/*
- * Flags for condition variables.
- */
-#define COND_FLAGS_PRIVATE 0x01
-#define COND_FLAGS_INITED 0x02
-#define COND_FLAGS_BUSY 0x04
-
-/*
- * Static cond initialization values.
- */
-#define PTHREAD_COND_INITIALIZER \
- { COND_TYPE_FAST, PTHREAD_QUEUE_INITIALIZER, NULL, COND_FLAGS_INITED }
-
-/*
- * Cleanup definitions.
- */
-struct pthread_cleanup {
- struct pthread_cleanup *next;
- void (*routine) ();
- void *routine_arg;
-};
-
-/*
- * Scheduling definitions.
- */
-enum schedparam_policy {
- SCHED_RR,
- SCHED_IO,
- SCHED_FIFO,
- SCHED_OTHER
-};
-
-struct pthread_attr {
- enum schedparam_policy schedparam_policy;
- int prio;
- int suspend;
- int flags;
- void *arg_attr;
- void (*cleanup_attr) ();
- void *stackaddr_attr;
- size_t stacksize_attr;
-};
-
-struct sched_param {
- int prio;
- void *no_data;
-};
-
-/*
- * Thread creation state attributes.
- */
-#define PTHREAD_CREATE_RUNNING 0
-#define PTHREAD_CREATE_SUSPENDED 1
-
-/*
- * Miscellaneous definitions.
- */
-#define PTHREAD_STACK_DEFAULT 65536
-#define PTHREAD_DEFAULT_PRIORITY 64
-#define PTHREAD_MAX_PRIORITY 126
-#define PTHREAD_MIN_PRIORITY 0
-#define _POSIX_THREAD_ATTR_STACKSIZE
-
-/*
- * Clock resolution in nanoseconds.
- */
-#define CLOCK_RES_NSEC 10000000
-
-/*
- * Number of microseconds between incremental priority updates for
- * threads that are ready to run, but denied being run.
- */
-#define INC_PRIO_USEC 500000
-
-/*
- * Time slice period in microseconds.
- */
-#define TIMESLICE_USEC 100000
-
-struct pthread_key {
- pthread_mutex_t mutex;
- long count;
- void (*destructor) ();
-};
-
-/*
- * Thread states.
- */
-enum pthread_state {
- PS_RUNNING,
- PS_SIGTHREAD,
- PS_MUTEX_WAIT,
- PS_COND_WAIT,
- PS_FDLR_WAIT,
- PS_FDLW_WAIT,
- PS_FDR_WAIT,
- PS_FDW_WAIT,
- PS_SELECT_WAIT,
- PS_SLEEP_WAIT,
- PS_WAIT_WAIT,
- PS_SIGWAIT,
- PS_JOIN,
- PS_SUSPENDED,
- PS_DEAD,
- PS_STATE_MAX
-};
-
-
-/*
- * File descriptor locking definitions.
- */
-#define FD_READ 0x1
-#define FD_WRITE 0x2
-#define FD_RDWR (FD_READ | FD_WRITE)
-
-/*
- * File descriptor table structure.
- */
-struct fd_table_entry {
- struct pthread_queue r_queue; /* Read queue. */
- struct pthread_queue w_queue; /* Write queue. */
- struct pthread *r_owner; /* Ptr to thread owning read lock. */
- struct pthread *w_owner; /* Ptr to thread owning write lock. */
- char *r_fname; /* Ptr to read lock source file name */
- int r_lineno; /* Read lock source line number. */
- char *w_fname; /* Ptr to write lock source file name */
- int w_lineno; /* Write lock source line number. */
- int r_lockcount; /* Count for FILE read locks. */
- int w_lockcount; /* Count for FILE write locks. */
- int flags; /* Flags used in open. */
-};
-
-struct pthread_select_data {
- int nfds;
- fd_set readfds;
- fd_set writefds;
- fd_set exceptfds;
-};
-
-union pthread_wait_data {
- pthread_mutex_t *mutex;
- pthread_cond_t *cond;
- const sigset_t *sigwait; /* Waiting on a signal in sigwait */
- struct {
- short fd; /* Used when thread waiting on fd */
- short branch; /* Line number, for debugging. */
- char *fname; /* Source file name for debugging.*/
- } fd;
- struct pthread_select_data * select_data;
-};
-
-/*
- * Thread structure.
- */
-struct pthread {
- /*
- * Pointer to the next thread in the thread linked list.
- */
- struct pthread *nxt;
-
- /*
- * Thread start routine, argument, stack pointer and thread
- * attributes.
- */
- void *(*start_routine)(void *);
- void *arg;
- void *stack;
- struct pthread_attr attr;
-
- /*
- * Thread-specific signal handler interface:
- *
- * Array of signal actions for this thread.
- */
- struct sigaction act[NSIG];
-
-#if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(__i386__)
- /*
- * Saved floating point registers on systems where they are not
- * saved in the signal context.
- */
- char saved_fp[108];
-#endif
-
- /*
- * Saved signal context used in call to sigreturn by
- * _thread_kern_sched if sig_saved is TRUE.
- */
- struct sigcontext saved_sigcontext;
-
- /*
- * Saved jump buffer used in call to longjmp by _thread_kern_sched
- * if sig_saved is FALSE.
- */
- jmp_buf saved_jmp_buf;
-
- /*
- * TRUE if the last state saved was a signal context. FALSE if the
- * last state saved was a jump buffer.
- */
- int sig_saved;
-
- /*
- * Current signal mask and array of pending signals.
- */
- sigset_t sigmask;
- int sigpend[NSIG];
-
- /*
- * Pointer to the parent thread for which the current thread is
- * a signal handler thread, otherwise NULL if the current thread
- * is not a signal handler thread.
- */
- struct pthread *parent_thread;
-
- /* Thread state: */
- enum pthread_state state;
-
- /* Time that this thread was last made active. */
- struct timeval last_active;
-
- /* Time that this thread was last made inactive. */
- struct timeval last_inactive;
-
- /*
- * Number of microseconds accumulated by this thread when
- * time slicing is active.
- */
- long slice_usec;
-
- /*
- * Incremental priority accumulated by thread while it is ready to
- * run but is denied being run.
- */
- int inc_prio;
-
- /*
- * Time to wake up thread. This is used for sleeping threads and
- * for any operation which may time out (such as select).
- */
- struct timespec wakeup_time;
-
- /* TRUE if operation has timed out. */
- int timeout;
-
- /*
- * Error variable used instead of errno. The function __error()
- * returns a pointer to this.
- */
- int error;
-
- /* Join queue for waiting threads: */
- struct pthread_queue join_queue;
-
- /*
- * The current thread can belong to only one queue at a time.
- *
- * Pointer to queue (if any) on which the current thread is waiting.
- */
- struct pthread_queue *queue;
-
- /* Pointer to next element in queue. */
- struct pthread *qnxt;
-
- /* Wait data. */
- union pthread_wait_data data;
-
- /*
- * Set to TRUE if a blocking operation was
- * interrupted by a signal:
- */
- int interrupted;
-
- /* Signal number when in state PS_SIGWAIT: */
- int signo;
-
- /* Miscellaneous data. */
- char flags;
- char pthread_priority;
- void *ret;
- const void **specific_data;
- int specific_data_count;
-
- /* Cleanup handlers Link List */
- struct pthread_cleanup *cleanup;
- char *fname; /* Ptr to source file name */
- int lineno; /* Source line number. */
-};
-
-/*
- * Global variables for the uthread kernel.
- */
-
-/* Kernel thread structure used when there are no running threads: */
-SCLASS struct pthread _thread_kern_thread;
-
-/* Ptr to the thread structure for the running thread: */
-SCLASS struct pthread * volatile _thread_run
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= &_thread_kern_thread;
-#else
-;
-#endif
-
-/*
- * Ptr to the thread running in single-threaded mode or NULL if
- * running multi-threaded (default POSIX behaviour).
- */
-SCLASS struct pthread * volatile _thread_single
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/* Ptr to the first thread in the thread linked list: */
-SCLASS struct pthread * volatile _thread_link_list
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/*
- * Array of kernel pipe file descriptors that are used to ensure that
- * no signals are missed in calls to _thread_sys_select.
- */
-SCLASS int _thread_kern_pipe[2]
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= {
- -1,
- -1
-};
-#else
-;
-#endif
-SCLASS int _thread_kern_in_select
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= 0;
-#else
-;
-#endif
-
-/* Last time that an incremental priority update was performed: */
-SCLASS struct timeval kern_inc_prio_time
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { 0, 0 };
-#else
-;
-#endif
-
-/* Dead threads: */
-SCLASS struct pthread * volatile _thread_dead
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/* Initial thread: */
-SCLASS struct pthread *_thread_initial
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/* Default thread attributes: */
-SCLASS struct pthread_attr pthread_attr_default
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { SCHED_RR, PTHREAD_DEFAULT_PRIORITY, PTHREAD_CREATE_RUNNING,
- PTHREAD_CREATE_JOINABLE, NULL, NULL, NULL, PTHREAD_STACK_DEFAULT };
-#else
-;
-#endif
-
-/* Default mutex attributes: */
-SCLASS struct pthread_mutex_attr pthread_mutexattr_default
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { MUTEX_TYPE_FAST, 0 };
-#else
-;
-#endif
-
-/* Default condition variable attributes: */
-SCLASS struct pthread_cond_attr pthread_condattr_default
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { COND_TYPE_FAST, 0 };
-#else
-;
-#endif
-
-/*
- * Standard I/O file descriptors need special flag treatment since
- * setting one to non-blocking does all on *BSD. Sigh. This array
- * is used to store the initial flag settings.
- */
-SCLASS int _pthread_stdio_flags[3];
-
-/* File table information: */
-SCLASS struct fd_table_entry **_thread_fd_table
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-SCLASS const int dtablecount
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= 4096/sizeof(struct fd_table_entry);
-#else
-;
-#endif
-SCLASS int _thread_dtablesize /* Descriptor table size. */
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= 1024;
-#else
-;
-#endif
-
-/* Undefine the storage class specifier: */
-#undef SCLASS
-
-/*
- * Function prototype definitions.
- */
-__BEGIN_DECLS
-char *__ttyname_basic(int);
-char *__ttyname_r_basic(int, char *, size_t);
-char *ttyname_r(int, char *, size_t);
-int _thread_create(pthread_t *,const pthread_attr_t *,void *(*start_routine)(void *),void *,pthread_t);
-int _thread_fd_lock(int, int, struct timespec *,char *fname,int lineno);
-void _thread_exit(char *, int, char *);
-void _thread_fd_unlock(int, int);
-void *_thread_cleanup(pthread_t);
-void _thread_cleanupspecific(void);
-void _thread_dump_info(void);
-void _thread_init(void);
-void _thread_kern_sched(struct sigcontext *);
-void _thread_kern_sched_state(enum pthread_state,char *fname,int lineno);
-void _thread_kern_set_timeout(struct timespec *);
-void _thread_kern_sig_block(int *);
-void _thread_kern_sig_unblock(int);
-void _thread_sig_handler(int, int, struct sigcontext *);
-void _thread_start(void);
-void _thread_start_sig_handler(void);
-void _thread_seterrno(pthread_t,int);
-void _thread_queue_init(struct pthread_queue *);
-void _thread_queue_enq(struct pthread_queue *, struct pthread *);
-int _thread_queue_remove(struct pthread_queue *, struct pthread *);
-int _thread_fd_table_init(int fd);
-struct pthread *_thread_queue_get(struct pthread_queue *);
-struct pthread *_thread_queue_deq(struct pthread_queue *);
-
-/* #include <signal.h> */
-int _thread_sys_sigaction(int, const struct sigaction *, struct sigaction *);
-int _thread_sys_sigpending(sigset_t *);
-int _thread_sys_sigprocmask(int, const sigset_t *, sigset_t *);
-int _thread_sys_sigsuspend(const sigset_t *);
-int _thread_sys_sigblock(int);
-int _thread_sys_siginterrupt(int, int);
-int _thread_sys_sigpause(int);
-int _thread_sys_sigreturn(struct sigcontext *);
-int _thread_sys_sigsetmask(int);
-int _thread_sys_sigstack(const struct sigstack *, struct sigstack *);
-int _thread_sys_sigvec(int, struct sigvec *, struct sigvec *);
-void _thread_sys_psignal(unsigned int, const char *);
-void (*_thread_sys_signal(int, void (*)(int)))(int);
-
-/* #include <sys/stat.h> */
-#ifdef _SYS_STAT_H_
-int _thread_sys_fchmod(int, mode_t);
-int _thread_sys_fstat(int, struct stat *);
-int _thread_sys_fchflags(int, u_long);
-#endif
-
-/* #include <sys/mount.h> */
-#ifdef _SYS_MOUNT_H_
-int _thread_sys_fstatfs(int, struct statfs *);
-#endif
-int _thread_sys_pipe(int *);
-
-/* #include <sys/socket.h> */
-#ifdef _SYS_SOCKET_H_
-int _thread_sys_accept(int, struct sockaddr *, int *);
-int _thread_sys_bind(int, const struct sockaddr *, int);
-int _thread_sys_connect(int, const struct sockaddr *, int);
-int _thread_sys_getpeername(int, struct sockaddr *, int *);
-int _thread_sys_getsockname(int, struct sockaddr *, int *);
-int _thread_sys_getsockopt(int, int, int, void *, int *);
-int _thread_sys_listen(int, int);
-int _thread_sys_setsockopt(int, int, int, const void *, int);
-int _thread_sys_shutdown(int, int);
-int _thread_sys_socket(int, int, int);
-int _thread_sys_socketpair(int, int, int, int *);
-ssize_t _thread_sys_recv(int, void *, size_t, int);
-ssize_t _thread_sys_recvfrom(int, void *, size_t, int, struct sockaddr *, int *);
-ssize_t _thread_sys_recvmsg(int, struct msghdr *, int);
-ssize_t _thread_sys_send(int, const void *, size_t, int);
-ssize_t _thread_sys_sendmsg(int, const struct msghdr *, int);
-ssize_t _thread_sys_sendto(int, const void *,size_t, int, const struct sockaddr *, int);
-#endif
-
-/* #include <stdio.h> */
-#ifdef _STDIO_H_
-void _thread_flockfile(FILE *fp,char *fname,int lineno);
-void _thread_funlockfile(FILE *fp);
-FILE *_thread_sys_fdopen(int, const char *);
-FILE *_thread_sys_fopen(const char *, const char *);
-FILE *_thread_sys_freopen(const char *, const char *, FILE *);
-FILE *_thread_sys_popen(const char *, const char *);
-FILE *_thread_sys_tmpfile(void);
-char *_thread_sys_ctermid(char *);
-char *_thread_sys_cuserid(char *);
-char *_thread_sys_fgetln(FILE *, size_t *);
-char *_thread_sys_fgets(char *, int, FILE *);
-char *_thread_sys_gets(char *);
-char *_thread_sys_tempnam(const char *, const char *);
-char *_thread_sys_tmpnam(char *);
-int _thread_sys_fclose(FILE *);
-int _thread_sys_feof(FILE *);
-int _thread_sys_ferror(FILE *);
-int _thread_sys_fflush(FILE *);
-int _thread_sys_fgetc(FILE *);
-int _thread_sys_fgetpos(FILE *, fpos_t *);
-int _thread_sys_fileno(FILE *);
-int _thread_sys_fprintf(FILE *, const char *, ...);
-int _thread_sys_fpurge(FILE *);
-int _thread_sys_fputc(int, FILE *);
-int _thread_sys_fputs(const char *, FILE *);
-int _thread_sys_fscanf(FILE *, const char *, ...);
-int _thread_sys_fseek(FILE *, long, int);
-int _thread_sys_fsetpos(FILE *, const fpos_t *);
-int _thread_sys_getc(FILE *);
-int _thread_sys_getchar(void);
-int _thread_sys_getw(FILE *);
-int _thread_sys_pclose(FILE *);
-int _thread_sys_printf(const char *, ...);
-int _thread_sys_putc(int, FILE *);
-int _thread_sys_putchar(int);
-int _thread_sys_puts(const char *);
-int _thread_sys_putw(int, FILE *);
-int _thread_sys_remove(const char *);
-int _thread_sys_rename (const char *, const char *);
-int _thread_sys_scanf(const char *, ...);
-int _thread_sys_setlinebuf(FILE *);
-int _thread_sys_setvbuf(FILE *, char *, int, size_t);
-int _thread_sys_snprintf(char *, size_t, const char *, ...);
-int _thread_sys_sprintf(char *, const char *, ...);
-int _thread_sys_sscanf(const char *, const char *, ...);
-int _thread_sys_ungetc(int, FILE *);
-int _thread_sys_vfprintf(FILE *, const char *, _BSD_VA_LIST_);
-int _thread_sys_vprintf(const char *, _BSD_VA_LIST_);
-int _thread_sys_vscanf(const char *, _BSD_VA_LIST_);
-int _thread_sys_vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_);
-int _thread_sys_vsprintf(char *, const char *, _BSD_VA_LIST_);
-int _thread_sys_vsscanf(const char *, const char *, _BSD_VA_LIST_);
-long _thread_sys_ftell(FILE *);
-size_t _thread_sys_fread(void *, size_t, size_t, FILE *);
-size_t _thread_sys_fwrite(const void *, size_t, size_t, FILE *);
-void _thread_sys_clearerr(FILE *);
-void _thread_sys_perror(const char *);
-void _thread_sys_rewind(FILE *);
-void _thread_sys_setbuf(FILE *, char *);
-void _thread_sys_setbuffer(FILE *, char *, int);
-#endif
-
-/* #include <unistd.h> */
-#ifdef _UNISTD_H_
-char *_thread_sys_ttyname(int);
-int _thread_sys_close(int);
-int _thread_sys_dup(int);
-int _thread_sys_dup2(int, int);
-int _thread_sys_exect(const char *, char * const *, char * const *);
-int _thread_sys_execve(const char *, char * const *, char * const *);
-int _thread_sys_fchdir(int);
-int _thread_sys_fchown(int, uid_t, gid_t);
-int _thread_sys_fsync(int);
-int _thread_sys_ftruncate(int, off_t);
-int _thread_sys_pause(void);
-int _thread_sys_pipe(int *);
-int _thread_sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
-off_t _thread_sys_lseek(int, off_t, int);
-pid_t _thread_sys_fork(void);
-pid_t _thread_sys_tcgetpgrp(int);
-ssize_t _thread_sys_read(int, void *, size_t);
-ssize_t _thread_sys_write(int, const void *, size_t);
-void _thread_sys__exit(int);
-#endif
-
-/* #include <fcntl.h> */
-#ifdef _SYS_FCNTL_H_
-int _thread_sys_creat(const char *, mode_t);
-int _thread_sys_fcntl(int, int, ...);
-int _thread_sys_flock(int, int);
-int _thread_sys_open(const char *, int, ...);
-#endif
-
-/* #include <setjmp.h> */
-#ifdef _SETJMP_H_
-int __thread_sys_setjmp(jmp_buf);
-int _thread_sys_setjmp(jmp_buf);
-int _thread_sys_sigsetjmp(sigjmp_buf, int);
-void __thread_sys_longjmp(jmp_buf, int);
-void _thread_sys_longjmp(jmp_buf, int);
-void _thread_sys_longjmperror(void);
-void _thread_sys_siglongjmp(sigjmp_buf, int);
-#endif
-
-/* #include <sys/ioctl.h> */
-#ifdef _SYS_IOCTL_H_
-int _thread_sys_ioctl(int, unsigned long, ...);
-#endif
-
-/* #include <dirent.h> */
-#ifdef _DIRENT_H_
-DIR *___thread_sys_opendir2(const char *, int);
-DIR *_thread_sys_opendir(const char *);
-int _thread_sys_alphasort(const void *, const void *);
-int _thread_sys_scandir(const char *, struct dirent ***,
- int (*)(struct dirent *), int (*)(const void *, const void *));
-int _thread_sys_closedir(DIR *);
-int _thread_sys_getdirentries(int, char *, int, long *);
-long _thread_sys_telldir(const DIR *);
-struct dirent *_thread_sys_readdir(DIR *);
-void _thread_sys_rewinddir(DIR *);
-void _thread_sys_seekdir(DIR *, long);
-#endif
-
-/* #include <sys/uio.h> */
-#ifdef _SYS_UIO_H_
-ssize_t _thread_sys_readv(int, const struct iovec *, int);
-ssize_t _thread_sys_writev(int, const struct iovec *, int);
-#endif
-
-/* #include <sys/wait.h> */
-#ifdef WNOHANG
-pid_t _thread_sys_wait(int *);
-pid_t _thread_sys_waitpid(pid_t, int *, int);
-pid_t _thread_sys_wait3(int *, int, struct rusage *);
-pid_t _thread_sys_wait4(pid_t, int *, int, struct rusage *);
-#endif
-__END_DECLS
-
-#endif /* !_PTHREAD_PRIVATE_H */
diff --git a/lib/libc_r/uthread/uthread_accept.c b/lib/libc_r/uthread/uthread_accept.c
deleted file mode 100644
index e240cde..0000000
--- a/lib/libc_r/uthread/uthread_accept.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-accept(int fd, struct sockaddr * name, int *namelen)
-{
- int ret;
-
- /* Lock the file descriptor: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Enter a loop to wait for a connection request: */
- while ((ret = _thread_sys_accept(fd, name, namelen)) < 0) {
- /* Check if the socket is to block: */
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) {
- /* Save the socket file descriptor: */
- _thread_run->data.fd.fd = fd;
- _thread_run->data.fd.fname = __FILE__;
- _thread_run->data.fd.branch = __LINE__;
-
- /* Set the timeout: */
- _thread_kern_set_timeout(NULL);
-
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_FDR_WAIT, __FILE__, __LINE__);
-
- /* Check if the wait was interrupted: */
- if (errno == EINTR) {
- /* Return an error status: */
- ret = -1;
- break;
- }
- } else {
- /*
- * Another error has occurred, so exit the
- * loop here:
- */
- break;
- }
- }
-
- /* Unlock the file descriptor: */
- _thread_fd_unlock(fd, FD_RDWR);
-
- /* Check for errors: */
- if (ret < 0) {
- }
- /* Initialise the file descriptor table for the new socket: */
- else if (_thread_fd_table_init(ret) != 0) {
- /* Quietly close the socket: */
- _thread_sys_close(ret);
-
- /* Return an error: */
- ret = -1;
- }
- }
- /* Return the socket file descriptor or -1 on error: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_destroy.c b/lib/libc_r/uthread/uthread_attr_destroy.c
deleted file mode 100644
index 1f4b2c8..0000000
--- a/lib/libc_r/uthread/uthread_attr_destroy.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_destroy(pthread_attr_t *attr)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL)
- /* Invalid argument: */
- ret = EINVAL;
- else {
- /* Free the memory allocated to the attribute object: */
- free(*attr);
-
- /*
- * Leave the attribute pointer NULL now that the memory
- * has been freed:
- */
- *attr = NULL;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_getdetachstate.c b/lib/libc_r/uthread/uthread_attr_getdetachstate.c
deleted file mode 100644
index 4715cb6..0000000
--- a/lib/libc_r/uthread/uthread_attr_getdetachstate.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_getdetachstate(pthread_attr_t *attr, int *detachstate)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || detachstate == NULL)
- ret = EINVAL;
- else {
- /* Check if the detached flag is set: */
- if ((*attr)->flags & PTHREAD_DETACHED)
- /* Return detached: */
- *detachstate = PTHREAD_CREATE_DETACHED;
- else
- /* Return joinable: */
- *detachstate = PTHREAD_CREATE_JOINABLE;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_getstackaddr.c b/lib/libc_r/uthread/uthread_attr_getstackaddr.c
deleted file mode 100644
index 1850a32..0000000
--- a/lib/libc_r/uthread/uthread_attr_getstackaddr.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_getstackaddr(pthread_attr_t *attr, void **stackaddr)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stackaddr == NULL)
- ret = EINVAL;
- else {
- /* Return the stack address: */
- *stackaddr = (*attr)->stackaddr_attr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_getstacksize.c b/lib/libc_r/uthread/uthread_attr_getstacksize.c
deleted file mode 100644
index de81106..0000000
--- a/lib/libc_r/uthread/uthread_attr_getstacksize.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_getstacksize(pthread_attr_t *attr, size_t *stacksize)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stacksize == NULL)
- ret = EINVAL;
- else {
- /* Return the stack size: */
- *stacksize = (*attr)->stacksize_attr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_init.c b/lib/libc_r/uthread/uthread_attr_init.c
deleted file mode 100644
index c64e29f..0000000
--- a/lib/libc_r/uthread/uthread_attr_init.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_init(pthread_attr_t *attr)
-{
- int ret;
- pthread_attr_t pattr;
-
- /* Allocate memory for the attribute object: */
- if ((pattr = (pthread_attr_t) malloc(sizeof(struct pthread_attr))) == NULL)
- /* Insufficient memory: */
- ret = ENOMEM;
- else {
- /* Initialise the attribute object with the defaults: */
- memcpy(pattr, &pthread_attr_default, sizeof(struct pthread_attr));
-
- /* Return a pointer to the attribute object: */
- *attr = pattr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_setcreatesuspend.c b/lib/libc_r/uthread/uthread_attr_setcreatesuspend.c
deleted file mode 100644
index e69de29..0000000
--- a/lib/libc_r/uthread/uthread_attr_setcreatesuspend.c
+++ /dev/null
diff --git a/lib/libc_r/uthread/uthread_attr_setcreatesuspend_np.c b/lib/libc_r/uthread/uthread_attr_setcreatesuspend_np.c
deleted file mode 100644
index afe6b23..0000000
--- a/lib/libc_r/uthread/uthread_attr_setcreatesuspend_np.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_attr_setcreatesuspend_np(pthread_attr_t *attr)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- (*attr)->suspend = PTHREAD_CREATE_SUSPENDED;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_setdetachstate.c b/lib/libc_r/uthread/uthread_attr_setdetachstate.c
deleted file mode 100644
index 6ec0dbc..0000000
--- a/lib/libc_r/uthread/uthread_attr_setdetachstate.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL ||
- (detachstate != PTHREAD_CREATE_DETACHED &&
- detachstate != PTHREAD_CREATE_JOINABLE))
- ret = EINVAL;
- else {
- /* Check if detached state: */
- if (detachstate == PTHREAD_CREATE_DETACHED)
- /* Set the detached flag: */
- (*attr)->flags |= PTHREAD_DETACHED;
- else
- /* Reset the detached flag: */
- (*attr)->flags &= ~PTHREAD_DETACHED;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_setprio.c b/lib/libc_r/uthread/uthread_attr_setprio.c
deleted file mode 100644
index f6d54fc..0000000
--- a/lib/libc_r/uthread/uthread_attr_setprio.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setprio(pthread_attr_t *attr, int priority)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- (*attr)->prio = priority;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_setstackaddr.c b/lib/libc_r/uthread/uthread_attr_setstackaddr.c
deleted file mode 100644
index ce54915..0000000
--- a/lib/libc_r/uthread/uthread_attr_setstackaddr.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stackaddr == NULL)
- ret = EINVAL;
- else {
- /* Save the stack address: */
- (*attr)->stackaddr_attr = stackaddr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_attr_setstacksize.c b/lib/libc_r/uthread/uthread_attr_setstacksize.c
deleted file mode 100644
index 94e575e..0000000
--- a/lib/libc_r/uthread/uthread_attr_setstacksize.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stacksize < PTHREAD_STACK_MIN)
- ret = EINVAL;
- else {
- /* Save the stack size: */
- (*attr)->stacksize_attr = stacksize;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_autoinit.cc b/lib/libc_r/uthread/uthread_autoinit.cc
deleted file mode 100644
index 1cebd75..0000000
--- a/lib/libc_r/uthread/uthread_autoinit.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-/*
- * This module uses the magic of C++ static constructors to initialize the
- * threads package at program start-up time.
- *
- * Note: Because of a bug in certain versions of "/usr/lib/c++rt0.o", you
- * should _not_ enclose the body of this module in an "#ifdef _THREAD_SAFE"
- * conditional.
- */
-
-extern "C" void _thread_init(void);
-
-/*
- * First, we declare a class with a constructor.
- */
-class _thread_init_invoker {
-public:
- _thread_init_invoker(); /* Constructor declaration. */
-};
-
-/*
- * Here is the definition of the constructor. All it does is call the
- * threads initialization function, "_thread_init".
- */
-_thread_init_invoker::_thread_init_invoker()
-{
- _thread_init();
-}
-
-/*
- * Here is a single, static instance of our "_thread_init_invoker" class.
- * The mere existance of this instance will result in its constructor
- * being called, automatically, at program start-up time.
- */
-static _thread_init_invoker the_thread_init_invoker;
-
-/*
- * For the shared version of the threads library, the above is sufficient.
- * But for the archive version of the library, we need a little bit more.
- * Namely, we must arrange for this particular module to be pulled in from
- * the archive library at link time. To accomplish that, we define and
- * initialize a variable, "_thread_autoinit_dummy_decl". This variable is
- * referenced (as an extern) from the module "uthread_init.c". So, if
- * that module is used, then it will create a need for this module as well,
- * ensuring that this module will be present in the executable.
- *
- * We know that, if the user does _anything_ at all with threads, then the
- * "uthread_init.c" module will be linked in. That is the case because
- * "uthread_init.c" is the module that defines all of the global variables
- * used by the threads library. The presence of "uthread_init.c" will, in
- * turn, force this module to be linked in. And the presence of this module
- * in the executable will result in the constructor being invoked, and
- * "_thread_init" being called.
- */
-extern "C" int _thread_autoinit_dummy_decl; /* Declare with "C" linkage */
-int _thread_autoinit_dummy_decl = 0;
diff --git a/lib/libc_r/uthread/uthread_bind.c b/lib/libc_r/uthread/uthread_bind.c
deleted file mode 100644
index 1f7bbec..0000000
--- a/lib/libc_r/uthread/uthread_bind.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-bind(int fd, const struct sockaddr * name, int namelen)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_bind(fd, name, namelen);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_clean.c b/lib/libc_r/uthread/uthread_clean.c
deleted file mode 100644
index 9319f85..0000000
--- a/lib/libc_r/uthread/uthread_clean.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#include <stdlib.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-pthread_cleanup_push(void (*routine) (void *), void *routine_arg)
-{
- struct pthread_cleanup *new;
-
- if ((new = (struct pthread_cleanup *) malloc(sizeof(struct pthread_cleanup))) != NULL) {
- new->routine = routine;
- new->routine_arg = routine_arg;
- new->next = _thread_run->cleanup;
-
- _thread_run->cleanup = new;
- }
-}
-
-void
-pthread_cleanup_pop(int execute)
-{
- struct pthread_cleanup *old;
-
- if ((old = _thread_run->cleanup) != NULL) {
- _thread_run->cleanup = old->next;
- if (execute) {
- old->routine(old->routine_arg);
- }
- free(old);
- }
-}
-
-#endif
diff --git a/lib/libc_r/uthread/uthread_close.c b/lib/libc_r/uthread/uthread_close.c
deleted file mode 100644
index 26a8fbf..0000000
--- a/lib/libc_r/uthread/uthread_close.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-close(int fd)
-{
- int flags;
- int ret;
- int status;
- struct stat sb;
-
- /* Lock the file descriptor while the file is closed: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Get file descriptor status. */
- fstat(fd, &sb);
-
- /*
- * Check if the file should be left as blocking.
- *
- * This is so that the file descriptors shared with a parent
- * process aren't left set to non-blocking if the child
- * closes them prior to exit. An example where this causes
- * problems with /bin/sh is when a child closes stdin.
- *
- * Setting a file as blocking causes problems if a threaded
- * parent accesses the file descriptor before the child exits.
- * Once the threaded parent receives a SIGCHLD then it resets
- * all of its files to non-blocking, and so it is then safe
- * to access them.
- *
- * Pipes are not set to blocking when they are closed, as
- * the parent and child will normally close the file
- * descriptor of the end of the pipe that they are not
- * using, which would then cause any reads to block
- * indefinitely.
- */
- if ((S_ISREG(sb.st_mode) || S_ISCHR(sb.st_mode)) && (_thread_fd_table[fd]->flags & O_NONBLOCK) == 0) {
- /* Get the current flags: */
- flags = _thread_sys_fcntl(fd, F_GETFL, NULL);
- /* Clear the nonblocking file descriptor flag: */
- _thread_sys_fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
- }
-
- /* Close the file descriptor: */
- ret = _thread_sys_close(fd);
-
- /* Free the file descriptor table entry: */
- free(_thread_fd_table[fd]);
- _thread_fd_table[fd] = NULL;
-
- /* Unblock signals again: */
- _thread_kern_sig_unblock(status);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_cond.c b/lib/libc_r/uthread/uthread_cond.c
deleted file mode 100644
index 978ad04..0000000
--- a/lib/libc_r/uthread/uthread_cond.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_cond_init(pthread_cond_t * cond, const pthread_condattr_t * cond_attr)
-{
- enum pthread_cond_type type;
- pthread_cond_t pcond;
- int rval = 0;
-
- if (cond == NULL) {
- rval = EINVAL;
- } else {
- /*
- * Check if a pointer to a condition variable attribute
- * structure was passed by the caller:
- */
- if (cond_attr != NULL && *cond_attr != NULL) {
- /* Default to a fast condition variable: */
- type = (*cond_attr)->c_type;
- } else {
- /* Default to a fast condition variable: */
- type = COND_TYPE_FAST;
- }
-
- /* Process according to condition variable type: */
- switch (type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Check for no errors: */
- if (rval == 0) {
- if ((pcond = (pthread_cond_t)
- malloc(sizeof(struct pthread_cond))) == NULL) {
- rval = ENOMEM;
- } else {
- /*
- * Initialise the condition variable
- * structure:
- */
- _thread_queue_init(&pcond->c_queue);
- pcond->c_flags |= COND_FLAGS_INITED;
- pcond->c_type = type;
- *cond = pcond;
- }
- }
- }
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_destroy(pthread_cond_t * cond)
-{
- int rval = 0;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Check for errors: */
- if (rval == 0) {
- /* Destroy the contents of the condition structure: */
- _thread_queue_init(&(*cond)->c_queue);
- (*cond)->c_flags = 0;
- free(*cond);
- *cond = NULL;
- }
- }
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex)
-{
- int rval = 0;
- int status;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /*
- * Queue the running thread for the condition
- * variable:
- */
- _thread_queue_enq(&(*cond)->c_queue, _thread_run);
-
- /* Unlock the mutex: */
- pthread_mutex_unlock(mutex);
-
- /* Wait forever: */
- _thread_run->wakeup_time.tv_sec = -1;
-
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_COND_WAIT,
- __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Lock the mutex: */
- rval = pthread_mutex_lock(mutex);
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex,
- const struct timespec * abstime)
-{
- int rval = 0;
- int status;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Set the wakeup time: */
- _thread_run->wakeup_time.tv_sec = abstime->tv_sec;
- _thread_run->wakeup_time.tv_nsec = abstime->tv_nsec;
-
- /* Reset the timeout flag: */
- _thread_run->timeout = 0;
-
- /*
- * Queue the running thread for the condition
- * variable:
- */
- _thread_queue_enq(&(*cond)->c_queue, _thread_run);
-
- /* Unlock the mutex: */
- if ((rval = pthread_mutex_unlock(mutex)) != 0) {
- /*
- * Cannot unlock the mutex, so remove the
- * running thread from the condition
- * variable queue:
- */
- _thread_queue_deq(&(*cond)->c_queue);
- } else {
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_COND_WAIT,
- __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Lock the mutex: */
- if ((rval = pthread_mutex_lock(mutex)) != 0) {
- }
- /* Check if the wait timed out: */
- else if (_thread_run->timeout) {
- /* Return a timeout error: */
- rval = ETIMEDOUT;
- }
- }
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_signal(pthread_cond_t * cond)
-{
- int rval = 0;
- int status;
- pthread_t pthread;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Bring the next thread off the condition queue: */
- if ((pthread = _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
- /* Allow the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_broadcast(pthread_cond_t * cond)
-{
- int rval = 0;
- int status;
- pthread_t pthread;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /*
- * Enter a loop to bring all threads off the
- * condition queue:
- */
- while ((pthread =
- _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
- /* Allow the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_condattr_destroy.c b/lib/libc_r/uthread/uthread_condattr_destroy.c
deleted file mode 100644
index 4179970..0000000
--- a/lib/libc_r/uthread/uthread_condattr_destroy.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_condattr_destroy(pthread_condattr_t *attr)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- ret = EINVAL;
- } else {
- free(*attr);
- *attr = NULL;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_condattr_init.c b/lib/libc_r/uthread/uthread_condattr_init.c
deleted file mode 100644
index c87323d..0000000
--- a/lib/libc_r/uthread/uthread_condattr_init.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_condattr_init(pthread_condattr_t *attr)
-{
- int ret;
- pthread_condattr_t pattr;
-
- if ((pattr = (pthread_condattr_t)
- malloc(sizeof(struct pthread_cond_attr))) == NULL) {
- ret = ENOMEM;
- } else {
- memcpy(pattr, &pthread_condattr_default,
- sizeof(struct pthread_cond_attr));
- *attr = pattr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_connect.c b/lib/libc_r/uthread/uthread_connect.c
deleted file mode 100644
index bf42db3..0000000
--- a/lib/libc_r/uthread/uthread_connect.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-connect(int fd, const struct sockaddr * name, int namelen)
-{
- struct sockaddr tmpname;
- int ret, tmpnamelen;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- if ((ret = _thread_sys_connect(fd, name, namelen)) < 0) {
- if (!(_thread_fd_table[fd]->flags & O_NONBLOCK) &&
- ((errno == EWOULDBLOCK) || (errno == EINPROGRESS) ||
- (errno == EALREADY) || (errno == EAGAIN))) {
- _thread_run->data.fd.fd = fd;
-
- /* Set the timeout: */
- _thread_kern_set_timeout(NULL);
- _thread_kern_sched_state(PS_FDW_WAIT, __FILE__, __LINE__);
-
- tmpnamelen = sizeof(tmpname);
- /* 0 now lets see if it really worked */
- if (((ret = _thread_sys_getpeername(fd, &tmpname, &tmpnamelen)) < 0) && (errno == ENOTCONN)) {
-
- /*
- * Get the error, this function
- * should not fail
- */
- _thread_sys_getsockopt(fd, SOL_SOCKET, SO_ERROR, &errno, &tmpnamelen);
- }
- } else {
- ret = -1;
- }
- }
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_create.c b/lib/libc_r/uthread/uthread_create.c
deleted file mode 100644
index e4925a9..0000000
--- a/lib/libc_r/uthread/uthread_create.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/time.h>
-#ifdef _THREAD_SAFE
-#include <machine/reg.h>
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-_thread_create(pthread_t * thread, const pthread_attr_t * attr,
- void *(*start_routine) (void *), void *arg, pthread_t parent)
-{
- int i;
- int ret = 0;
- int status;
- pthread_t new_thread;
- pthread_attr_t pattr;
- void *stack;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Allocate memory for the thread structure: */
- if ((new_thread = (pthread_t) malloc(sizeof(struct pthread))) == NULL) {
- /* Insufficient memory to create a thread: */
- ret = EAGAIN;
- } else {
- /* Check if default thread attributes are required: */
- if (attr == NULL || *attr == NULL) {
- /* Use the default thread attributes: */
- pattr = &pthread_attr_default;
- } else {
- pattr = *attr;
- }
- /* Check if a stack was specified in the thread attributes: */
- if ((stack = pattr->stackaddr_attr) != NULL) {
- }
- /* Allocate memory for the stack: */
- else if ((stack = (void *) malloc(pattr->stacksize_attr)) == NULL) {
- /* Insufficient memory to create a thread: */
- ret = EAGAIN;
- free(new_thread);
- }
- /* Check for errors: */
- if (ret != 0) {
- } else {
- /* Initialise the thread structure: */
- memset(new_thread, 0, sizeof(struct pthread));
- new_thread->slice_usec = -1;
- new_thread->sig_saved = 0;
- new_thread->stack = stack;
- new_thread->start_routine = start_routine;
- new_thread->arg = arg;
- if (pattr->suspend == PTHREAD_CREATE_SUSPENDED) {
- PTHREAD_NEW_STATE(new_thread,PS_SUSPENDED);
- } else {
- PTHREAD_NEW_STATE(new_thread,PS_RUNNING);
- }
-
- /* Initialise the thread for signals: */
- new_thread->sigmask = _thread_run->sigmask;
-
- /*
- * Enter a loop to initialise the signal handler
- * array:
- */
- for (i = 1; i < NSIG; i++) {
- /* Default the signal handler: */
- sigfillset(&new_thread->act[i - 1].sa_mask);
- new_thread->act[i - 1].sa_handler = _thread_run->act[i - 1].sa_handler;
- new_thread->act[i - 1].sa_flags = _thread_run->act[i - 1].sa_flags;
- }
-
- /* Initialise the jump buffer: */
- _thread_sys_setjmp(new_thread->saved_jmp_buf);
-
- /*
- * Set up new stack frame so that it looks like it
- * returned from a longjmp() to the beginning of
- * _thread_start(). Check if this is a user thread:
- */
- if (parent == NULL) {
- /* Use the user start function: */
-#if defined(__FreeBSD__)
- new_thread->saved_jmp_buf[0]._jb[0] = (long) _thread_start;
-#elif defined(__NetBSD__)
-#if defined(__alpha)
- new_thread->saved_jmp_buf[2] = (long) _thread_start;
- new_thread->saved_jmp_buf[4 + R_RA] = 0;
- new_thread->saved_jmp_buf[4 + R_T12] = (long) _thread_start;
-#else
- new_thread->saved_jmp_buf[0] = (long) _thread_start;
-#endif
-#else
-#error "Don't recognize this operating system!"
-#endif
- } else {
- /*
- * Use the (funny) signal handler start
- * function:
- */
-#if defined(__FreeBSD__)
- new_thread->saved_jmp_buf[0]._jb[0] = (int) _thread_start_sig_handler;
-#elif defined(__NetBSD__)
-#if defined(__alpha)
- new_thread->saved_jmp_buf[2] = (long) _thread_start_sig_handler;
- new_thread->saved_jmp_buf[4 + R_RA] = 0;
- new_thread->saved_jmp_buf[4 + R_T12] = (long) _thread_start_sig_handler;
-#else
- new_thread->saved_jmp_buf[0] = (long) _thread_start_sig_handler;
-#endif
-#else
-#error "Don't recognize this operating system!"
-#endif
- }
-
- /* The stack starts high and builds down: */
-#if defined(__FreeBSD__)
- new_thread->saved_jmp_buf[0]._jb[2] = (int) (new_thread->stack + pattr->stacksize_attr - sizeof(double));
-#elif defined(__NetBSD__)
-#if defined(__alpha)
- new_thread->saved_jmp_buf[4 + R_SP] = (long) new_thread->stack + pattr->stacksize_attr - sizeof(double);
-#else
- new_thread->saved_jmp_buf[2] = (long) new_thread->stack + pattr->stacksize_attr - sizeof(double);
-#endif
-#else
-#error "Don't recognize this operating system!"
-#endif
-
- /* Copy the thread attributes: */
- memcpy(&new_thread->attr, pattr, sizeof(struct pthread_attr));
-
- /*
- * Check if this thread is to inherit the scheduling
- * attributes from its parent:
- */
- if (new_thread->attr.flags & PTHREAD_INHERIT_SCHED) {
- /* Copy the scheduling attributes: */
- new_thread->pthread_priority = _thread_run->pthread_priority;
- new_thread->attr.prio = _thread_run->pthread_priority;
- new_thread->attr.schedparam_policy = _thread_run->attr.schedparam_policy;
- } else {
- /*
- * Use just the thread priority, leaving the
- * other scheduling attributes as their
- * default values:
- */
- new_thread->pthread_priority = new_thread->attr.prio;
- }
-
- /* Initialise the join queue for the new thread: */
- _thread_queue_init(&(new_thread->join_queue));
-
- /* Initialise hooks in the thread structure: */
- new_thread->specific_data = NULL;
- new_thread->cleanup = NULL;
- new_thread->queue = NULL;
- new_thread->qnxt = NULL;
- new_thread->parent_thread = parent;
- new_thread->flags = 0;
-
- /* Add the thread to the linked list of all threads: */
- new_thread->nxt = _thread_link_list;
- _thread_link_list = new_thread;
-
- /* Return a pointer to the thread structure: */
- (*thread) = new_thread;
-
- /* Check if a parent thread was specified: */
- if (parent != NULL) {
- /*
- * A parent thread was specified, so this is
- * a signal handler thread which must now
- * wait for the signal handler to complete:
- */
- PTHREAD_NEW_STATE(parent,PS_SIGTHREAD);
- } else {
- /* Schedule the new user thread: */
- _thread_kern_sched(NULL);
- }
- }
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the status: */
- return (ret);
-}
-
-int
-pthread_create(pthread_t * thread, const pthread_attr_t * attr,
- void *(*start_routine) (void *), void *arg)
-{
- int ret = 0;
-
- /*
- * Call the low level thread creation function which allows a parent
- * thread to be specified:
- */
- ret = _thread_create(thread, attr, start_routine, arg, NULL);
-
- /* Return the status: */
- return (ret);
-}
-
-void
-_thread_start(void)
-{
- /* Run the current thread's start routine with argument: */
- pthread_exit(_thread_run->start_routine(_thread_run->arg));
-
- /* This point should never be reached. */
- PANIC("Thread has resumed after exit");
-}
-
-void
-_thread_start_sig_handler(void)
-{
- int sig;
- long arg;
- void (*sig_routine) (int);
-
- /*
- * Cast the argument from 'void *' to a variable that is NO SMALLER
- * than a pointer (otherwise gcc under NetBSD/Alpha will complain):
- */
- arg = (long) _thread_run->arg;
-
- /* Cast the argument as a signal number: */
- sig = (int) arg;
-
- /* Cast a pointer to the signal handler function: */
- sig_routine = (void (*) (int)) _thread_run->start_routine;
-
- /* Call the signal handler function: */
- (*sig_routine) (sig);
-
- /* Exit the signal handler thread: */
- pthread_exit(&arg);
-
- /* This point should never be reached. */
- PANIC("Signal handler thread has resumed after exit");
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_detach.c b/lib/libc_r/uthread/uthread_detach.c
deleted file mode 100644
index a9f2469..0000000
--- a/lib/libc_r/uthread/uthread_detach.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_detach(pthread_t pthread)
-{
- int rval = 0;
- int status;
- pthread_t next_thread;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Check for invalid calling parameters: */
- if (pthread == NULL) {
- /* Return an invalid argument error: */
- rval = EINVAL;
- }
- /* Check if the thread has not been detached: */
- else if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) {
- /* Flag the thread as detached: */
- pthread->attr.flags |= PTHREAD_DETACHED;
-
- /* Enter a loop to bring all threads off the join queue: */
- while ((next_thread = _thread_queue_deq(&pthread->join_queue)) != NULL) {
- /* Make the thread run: */
- PTHREAD_NEW_STATE(next_thread,PS_RUNNING);
- }
- } else {
- /* Return an error: */
- rval = EINVAL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_dup.c b/lib/libc_r/uthread/uthread_dup.c
deleted file mode 100644
index e6c4598..0000000
--- a/lib/libc_r/uthread/uthread_dup.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-dup(int fd)
-{
- int ret;
-
- /* Lock the file descriptor: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Perform the 'dup' syscall: */
- if ((ret = _thread_sys_dup(fd)) < 0) {
- }
- /* Initialise the file descriptor table entry: */
- else if (_thread_fd_table_init(ret) != 0) {
- /* Quietly close the file: */
- _thread_sys_close(ret);
-
- /* Reset the file descriptor: */
- ret = -1;
- } else {
- /*
- * Save the file open flags so that they can be
- * checked later:
- */
- _thread_fd_table[ret]->flags = _thread_fd_table[fd]->flags;
- }
-
- /* Unlock the file descriptor: */
- _thread_fd_unlock(fd, FD_RDWR);
- }
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_dup2.c b/lib/libc_r/uthread/uthread_dup2.c
deleted file mode 100644
index 6da78f7..0000000
--- a/lib/libc_r/uthread/uthread_dup2.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-dup2(int fd, int newfd)
-{
- int ret;
-
- /* Lock the file descriptor: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Lock the file descriptor: */
- if ((ret = _thread_fd_lock(newfd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Perform the 'dup2' syscall: */
- if ((ret = _thread_sys_dup2(fd, newfd)) < 0) {
- }
- /* Initialise the file descriptor table entry: */
- else if (_thread_fd_table_init(ret) != 0) {
- /* Quietly close the file: */
- _thread_sys_close(ret);
-
- /* Reset the file descriptor: */
- ret = -1;
- } else {
- /*
- * Save the file open flags so that they can
- * be checked later:
- */
- _thread_fd_table[ret]->flags = _thread_fd_table[fd]->flags;
- }
-
- /* Unlock the file descriptor: */
- _thread_fd_unlock(newfd, FD_RDWR);
- }
- /* Unlock the file descriptor: */
- _thread_fd_unlock(fd, FD_RDWR);
- }
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_equal.c b/lib/libc_r/uthread/uthread_equal.c
deleted file mode 100644
index 99ffb5d..0000000
--- a/lib/libc_r/uthread/uthread_equal.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_equal(pthread_t t1, pthread_t t2)
-{
- /* Compare the two thread pointers: */
- return (t1 == t2);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_execve.c b/lib/libc_r/uthread/uthread_execve.c
deleted file mode 100644
index d12b8ff..0000000
--- a/lib/libc_r/uthread/uthread_execve.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-execve(const char *name, char *const * argv, char *const * envp)
-{
- int flags;
- int i;
- int ret;
- struct sigaction act;
- struct sigaction oact;
- struct itimerval itimer;
-
- /* Disable the interval timer: */
- itimer.it_interval.tv_sec = 0;
- itimer.it_interval.tv_usec = 0;
- itimer.it_value.tv_sec = 0;
- itimer.it_value.tv_usec = 0;
- setitimer(ITIMER_VIRTUAL, &itimer, NULL);
-
- /* Close the pthread kernel pipe: */
- _thread_sys_close(_thread_kern_pipe[0]);
- _thread_sys_close(_thread_kern_pipe[1]);
-
- /*
- * Enter a loop to set all file descriptors to blocking
- * if they were not created as non-blocking:
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Check if this file descriptor is in use: */
- if (_thread_fd_table[i] != NULL &&
- !(_thread_fd_table[i]->flags & O_NONBLOCK)) {
- /* Get the current flags: */
- flags = _thread_sys_fcntl(i, F_GETFL, NULL);
- /* Clear the nonblocking file descriptor flag: */
- _thread_sys_fcntl(i, F_SETFL, flags & ~O_NONBLOCK);
- }
- }
-
- /* Enter a loop to adopt the signal actions for the running thread: */
- for (i = 1; i < NSIG; i++) {
- /* Check for signals which cannot be caught: */
- if (i == SIGKILL || i == SIGSTOP) {
- /* Don't do anything with these signals. */
- } else {
- /*
- * Check if the running thread is ignoring this
- * signal:
- */
- if (_thread_run->act[i - 1].sa_handler == SIG_IGN) {
- /* Continue to ignore this signal: */
- act.sa_handler = SIG_IGN;
- } else {
- /* Use the default handler for this signal: */
- act.sa_handler = SIG_DFL;
- }
-
- /* Copy the mask and flags for this signal: */
- act.sa_mask = _thread_run->act[i - 1].sa_mask;
- act.sa_flags = _thread_run->act[i - 1].sa_flags;
-
- /* Change the signal action for the process: */
- _thread_sys_sigaction(i, &act, &oact);
- }
- }
-
- /* Execute the process: */
- _thread_sys_sigprocmask(SIG_SETMASK, &_thread_run->sigmask, NULL);
-
- /* Execute the process: */
- ret = _thread_sys_execve(name, argv, envp);
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_exit.c b/lib/libc_r/uthread/uthread_exit.c
deleted file mode 100644
index 15bcfa3..0000000
--- a/lib/libc_r/uthread/uthread_exit.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void _exit(int status)
-{
- int flags;
- int i;
- struct itimerval itimer;
-
- /* Disable the interval timer: */
- itimer.it_interval.tv_sec = 0;
- itimer.it_interval.tv_usec = 0;
- itimer.it_value.tv_sec = 0;
- itimer.it_value.tv_usec = 0;
- setitimer(ITIMER_VIRTUAL, &itimer, NULL);
-
- /* Close the pthread kernel pipe: */
- _thread_sys_close(_thread_kern_pipe[0]);
- _thread_sys_close(_thread_kern_pipe[1]);
-
- /*
- * Enter a loop to set all file descriptors to blocking
- * if they were not created as non-blocking:
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Check if this file descriptor is in use: */
- if (_thread_fd_table[i] != NULL &&
- !(_thread_fd_table[i]->flags & O_NONBLOCK)) {
- /* Get the current flags: */
- flags = _thread_sys_fcntl(i, F_GETFL, NULL);
- /* Clear the nonblocking file descriptor flag: */
- _thread_sys_fcntl(i, F_SETFL, flags & ~O_NONBLOCK);
- }
- }
-
- /* Call the _exit syscall: */
- _thread_sys__exit(status);
-}
-
-void
-_thread_exit(char *fname, int lineno, char *string)
-{
- char s[256];
-
- /* Prepare an error message string: */
- strcpy(s, "Fatal error '");
- strcat(s, string);
- strcat(s, "' at line ? ");
- strcat(s, "in file ");
- strcat(s, fname);
- strcat(s, " (errno = ?");
- strcat(s, ")\n");
-
- /* Write the string to the standard error file descriptor: */
- _thread_sys_write(2, s, strlen(s));
-
- /* Force this process to exit: */
- _exit(1);
-}
-
-void
-pthread_exit(void *status)
-{
- int sig;
- long l;
- pthread_t pthread;
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Save the return value: */
- _thread_run->ret = status;
-
- while (_thread_run->cleanup != NULL) {
- pthread_cleanup_pop(1);
- }
-
- if (_thread_run->attr.cleanup_attr != NULL) {
- _thread_run->attr.cleanup_attr(_thread_run->attr.arg_attr);
- }
- /* Check if there is thread specific data: */
- if (_thread_run->specific_data != NULL) {
- /* Run the thread-specific data destructors: */
- _thread_cleanupspecific();
- }
- /* Check if there are any threads joined to this one: */
- while ((pthread = _thread_queue_deq(&(_thread_run->join_queue))) != NULL) {
- /* Wake the joined thread and let it detach this thread: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
-
- /* Check if the running thread is at the head of the linked list: */
- if (_thread_link_list == _thread_run) {
- /* There is no previous thread: */
- _thread_link_list = _thread_run->nxt;
- } else {
- /* Point to the first thread in the list: */
- pthread = _thread_link_list;
-
- /*
- * Enter a loop to find the thread in the linked list before
- * the running thread:
- */
- while (pthread != NULL && pthread->nxt != _thread_run) {
- /* Point to the next thread: */
- pthread = pthread->nxt;
- }
-
- /* Check that a previous thread was found: */
- if (pthread != NULL) {
- /*
- * Point the previous thread to the one after the
- * running thread:
- */
- pthread->nxt = _thread_run->nxt;
- }
- }
-
- /* Check if this is a signal handler thread: */
- if (_thread_run->parent_thread != NULL) {
- /*
- * Enter a loop to search for other threads with the same
- * parent:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Compare the parent thread pointers: */
- if (pthread->parent_thread == _thread_run->parent_thread) {
- /*
- * The parent thread is waiting on at least
- * one other signal handler. Exit the loop
- * now that this is known.
- */
- break;
- }
- }
-
- /*
- * Check if the parent is not waiting on any other signal
- * handler threads and if it hasn't died in the meantime:
- */
- if (pthread == NULL && _thread_run->parent_thread->state != PS_DEAD) {
- /* Allow the parent thread to run again: */
- PTHREAD_NEW_STATE(_thread_run->parent_thread,PS_RUNNING);
- }
- /* Get the signal number: */
- l = (long) _thread_run->arg;
- sig = (int) l;
-
- /* Unblock the signal from the parent thread: */
- sigdelset(&_thread_run->parent_thread->sigmask, sig);
- }
- /*
- * This thread will never run again. Add it to the list of dead
- * threads:
- */
- _thread_run->nxt = _thread_dead;
- _thread_dead = _thread_run;
-
- /*
- * The running thread is no longer in the thread link list so it will
- * now die:
- */
- _thread_kern_sched_state(PS_DEAD, __FILE__, __LINE__);
-
- /* This point should not be reached. */
- PANIC("Dead thread has resumed");
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_fchmod.c b/lib/libc_r/uthread/uthread_fchmod.c
deleted file mode 100644
index ee5dfde..0000000
--- a/lib/libc_r/uthread/uthread_fchmod.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fchmod(int fd, mode_t mode)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_WRITE, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_fchmod(fd, mode);
- _thread_fd_unlock(fd, FD_WRITE);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_fchown.c b/lib/libc_r/uthread/uthread_fchown.c
deleted file mode 100644
index 52f65b8..0000000
--- a/lib/libc_r/uthread/uthread_fchown.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <unistd.h>
-#include <dirent.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fchown(int fd, uid_t owner, gid_t group)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_WRITE, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_fchown(fd, owner, group);
- _thread_fd_unlock(fd, FD_WRITE);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_fcntl.c b/lib/libc_r/uthread/uthread_fcntl.c
deleted file mode 100644
index f83ee50..0000000
--- a/lib/libc_r/uthread/uthread_fcntl.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdarg.h>
-#include <unistd.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fcntl(int fd, int cmd,...)
-{
- int flags = 0;
- int oldfd;
- int ret;
- int status;
- va_list ap;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Lock the file descriptor: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Initialise the variable argument list: */
- va_start(ap, cmd);
-
- /* Process according to file control command type: */
- switch (cmd) {
- /* Duplicate a file descriptor: */
- case F_DUPFD:
- /*
- * Get the file descriptor that the caller wants to
- * use:
- */
- oldfd = va_arg(ap, int);
-
- /* Initialise the file descriptor table entry: */
- if ((ret = _thread_sys_fcntl(fd, cmd, oldfd)) < 0) {
- }
- /* Initialise the file descriptor table entry: */
- else if (_thread_fd_table_init(ret) != 0) {
- /* Quietly close the file: */
- _thread_sys_close(ret);
-
- /* Reset the file descriptor: */
- ret = -1;
- } else {
- /*
- * Save the file open flags so that they can
- * be checked later:
- */
- _thread_fd_table[ret]->flags = _thread_fd_table[fd]->flags;
- }
- break;
- case F_SETFD:
- break;
- case F_GETFD:
- break;
- case F_GETFL:
- ret = _thread_fd_table[fd]->flags;
- break;
- case F_SETFL:
- flags = va_arg(ap, int);
- if ((ret = _thread_sys_fcntl(fd, cmd, flags | O_NONBLOCK)) == 0) {
- _thread_fd_table[fd]->flags = flags;
- }
- break;
- default:
- /* Might want to make va_arg use a union */
- ret = _thread_sys_fcntl(fd, cmd, va_arg(ap, void *));
- break;
- }
-
- /* Free variable arguments: */
- va_end(ap);
-
- /* Unlock the file descriptor: */
- _thread_fd_unlock(fd, FD_RDWR);
- }
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_fd.c b/lib/libc_r/uthread/uthread_fd.c
deleted file mode 100644
index 1e61bb7..0000000
--- a/lib/libc_r/uthread/uthread_fd.c
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-_thread_fd_table_init(int fd)
-{
- int ret = 0;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Check if the file descriptor is out of range: */
- if (fd < 0 || fd >= _thread_dtablesize)
- /* Return a bad file descriptor error: */
- ret = EBADF;
-
- /*
- * Check if memory has already been allocated for this file
- * descriptor:
- */
- else if (_thread_fd_table[fd] != NULL) {
- /* Memory has already been allocated. */
- }
- /* Allocate memory for the file descriptor table entry: */
- else if ((_thread_fd_table[fd] = (struct fd_table_entry *)
- malloc(sizeof(struct fd_table_entry))) == NULL)
- /* Return a bad file descriptor error: */
- ret = EBADF;
- else {
- /* Assume that the operation will succeed: */
- ret = 0;
-
- /* Initialise the file locks: */
- _thread_fd_table[fd]->r_owner = NULL;
- _thread_fd_table[fd]->w_owner = NULL;
- _thread_fd_table[fd]->r_fname = NULL;
- _thread_fd_table[fd]->w_fname = NULL;
- _thread_fd_table[fd]->r_lineno = 0;;
- _thread_fd_table[fd]->w_lineno = 0;;
- _thread_fd_table[fd]->r_lockcount = 0;;
- _thread_fd_table[fd]->w_lockcount = 0;;
-
- /* Initialise the read/write queues: */
- _thread_queue_init(&_thread_fd_table[fd]->r_queue);
- _thread_queue_init(&_thread_fd_table[fd]->w_queue);
-
- /* Get the flags for the file: */
- if (fd >= 3 && (_thread_fd_table[fd]->flags =
- _thread_sys_fcntl(fd, F_GETFL, 0)) == -1)
- ret = errno;
-
- else {
- /* Check if a stdio descriptor: */
- if (fd < 3)
- /*
- * Use the stdio flags read by
- * _pthread_init() to avoid
- * mistaking the non-blocking
- * flag that, when set on one
- * stdio fd, is set on all stdio
- * fds.
- */
- _thread_fd_table[fd]->flags =
- _pthread_stdio_flags[fd];
-
- /* Make the file descriptor non-blocking: */
- if (_thread_sys_fcntl(fd, F_SETFL,
- _thread_fd_table[fd]->flags | O_NONBLOCK) == -1) {
- /*
- * Some devices don't support
- * non-blocking calls (sigh):
- */
- if (errno != ENODEV)
- ret = errno;
- }
- }
-
- /* Check if one of the fcntl calls failed: */
- if (ret != 0) {
- /* Free the file descriptor table entry: */
- free(_thread_fd_table[fd]);
- _thread_fd_table[fd] = NULL;
- }
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (ret);
-}
-
-void
-_thread_fd_unlock(int fd, int lock_type)
-{
- int ret;
- int status;
-
- /* Block signals while the file descriptor lock is tested: */
- _thread_kern_sig_block(&status);
-
- /*
- * Check that the file descriptor table is initialised for this
- * entry:
- */
- if ((ret = _thread_fd_table_init(fd)) != 0) {
- } else {
- /* Check if the running thread owns the read lock: */
- if (_thread_fd_table[fd]->r_owner == _thread_run) {
- /* Check the file descriptor and lock types: */
- if (lock_type == FD_READ || lock_type == FD_RDWR) {
- /*
- * Decrement the read lock count for the
- * running thread:
- */
- _thread_fd_table[fd]->r_lockcount--;
-
- /*
- * Check if the running thread still has read
- * locks on this file descriptor:
- */
- if (_thread_fd_table[fd]->r_lockcount != 0) {
- }
- /*
- * Get the next thread in the queue for a
- * read lock on this file descriptor:
- */
- else if ((_thread_fd_table[fd]->r_owner = _thread_queue_deq(&_thread_fd_table[fd]->r_queue)) == NULL) {
- } else {
- /*
- * Set the state of the new owner of
- * the thread to running:
- */
- PTHREAD_NEW_STATE(_thread_fd_table[fd]->r_owner,PS_RUNNING);
-
- /*
- * Reset the number of read locks.
- * This will be incremented by the
- * new owner of the lock when it sees
- * that it has the lock.
- */
- _thread_fd_table[fd]->r_lockcount = 0;
- }
- }
- }
- /* Check if the running thread owns the write lock: */
- if (_thread_fd_table[fd]->w_owner == _thread_run) {
- /* Check the file descriptor and lock types: */
- if (lock_type == FD_WRITE || lock_type == FD_RDWR) {
- /*
- * Decrement the write lock count for the
- * running thread:
- */
- _thread_fd_table[fd]->w_lockcount--;
-
- /*
- * Check if the running thread still has
- * write locks on this file descriptor:
- */
- if (_thread_fd_table[fd]->w_lockcount != 0) {
- }
- /*
- * Get the next thread in the queue for a
- * write lock on this file descriptor:
- */
- else if ((_thread_fd_table[fd]->w_owner = _thread_queue_deq(&_thread_fd_table[fd]->w_queue)) == NULL) {
- } else {
- /*
- * Set the state of the new owner of
- * the thread to running:
- */
- PTHREAD_NEW_STATE(_thread_fd_table[fd]->w_owner,PS_RUNNING);
-
- /*
- * Reset the number of write locks.
- * This will be incremented by the
- * new owner of the lock when it
- * sees that it has the lock.
- */
- _thread_fd_table[fd]->w_lockcount = 0;
- }
- }
- }
- }
-
- /* Unblock signals again: */
- _thread_kern_sig_unblock(status);
-
- /* Nothing to return. */
- return;
-}
-
-int
-_thread_fd_lock(int fd, int lock_type, struct timespec * timeout,
- char *fname, int lineno)
-{
- int ret;
- int status;
-
- /* Block signals while the file descriptor lock is tested: */
- _thread_kern_sig_block(&status);
-
- /*
- * Check that the file descriptor table is initialised for this
- * entry:
- */
- if ((ret = _thread_fd_table_init(fd)) != 0) {
- } else {
- /* Check the file descriptor and lock types: */
- if (lock_type == FD_READ || lock_type == FD_RDWR) {
- /*
- * Enter a loop to wait for the file descriptor to be
- * locked for read for the current thread:
- */
- while (_thread_fd_table[fd]->r_owner != _thread_run) {
- /*
- * Check if the file descriptor is locked by
- * another thread:
- */
- if (_thread_fd_table[fd]->r_owner != NULL) {
- /*
- * Another thread has locked the file
- * descriptor for read, so join the
- * queue of threads waiting for a
- * read lock on this file descriptor:
- */
- _thread_queue_enq(&_thread_fd_table[fd]->r_queue, _thread_run);
-
- /*
- * Save the file descriptor details
- * in the thread structure for the
- * running thread:
- */
- _thread_run->data.fd.fd = fd;
- _thread_run->data.fd.branch = lineno;
- _thread_run->data.fd.fname = fname;
-
- /* Set the timeout: */
- _thread_kern_set_timeout(timeout);
-
- /*
- * Schedule this thread to wait on
- * the read lock. It will only be
- * woken when it becomes the next in
- * the queue and is granted access
- * to the lock by the thread
- * that is unlocking the file
- * descriptor.
- */
- _thread_kern_sched_state(PS_FDLR_WAIT, __FILE__, __LINE__);
-
- /*
- * Block signals so that the file
- * descriptor lock can again be
- * tested:
- */
- _thread_kern_sig_block(NULL);
- } else {
- /*
- * The running thread now owns the
- * read lock on this file descriptor:
- */
- _thread_fd_table[fd]->r_owner = _thread_run;
-
- /*
- * Reset the number of read locks for
- * this file descriptor:
- */
- _thread_fd_table[fd]->r_lockcount = 0;
-
- /*
- * Save the source file details for
- * debugging:
- */
- _thread_fd_table[fd]->r_fname = fname;
- _thread_fd_table[fd]->r_lineno = lineno;
- }
- }
-
- /* Increment the read lock count: */
- _thread_fd_table[fd]->r_lockcount++;
- }
- /* Check the file descriptor and lock types: */
- if (lock_type == FD_WRITE || lock_type == FD_RDWR) {
- /*
- * Enter a loop to wait for the file descriptor to be
- * locked for write for the current thread:
- */
- while (_thread_fd_table[fd]->w_owner != _thread_run) {
- /*
- * Check if the file descriptor is locked by
- * another thread:
- */
- if (_thread_fd_table[fd]->w_owner != NULL) {
- /*
- * Another thread has locked the file
- * descriptor for write, so join the
- * queue of threads waiting for a
- * write lock on this file
- * descriptor:
- */
- _thread_queue_enq(&_thread_fd_table[fd]->w_queue, _thread_run);
-
- /*
- * Save the file descriptor details
- * in the thread structure for the
- * running thread:
- */
- _thread_run->data.fd.fd = fd;
- _thread_run->data.fd.branch = lineno;
- _thread_run->data.fd.fname = fname;
-
- /* Set the timeout: */
- _thread_kern_set_timeout(timeout);
-
- /*
- * Schedule this thread to wait on
- * the write lock. It will only be
- * woken when it becomes the next in
- * the queue and is granted access to
- * the lock by the thread that is
- * unlocking the file descriptor.
- */
- _thread_kern_sched_state(PS_FDLW_WAIT, __FILE__, __LINE__);
-
- /*
- * Block signals so that the file
- * descriptor lock can again be
- * tested:
- */
- _thread_kern_sig_block(NULL);
- } else {
- /*
- * The running thread now owns the
- * write lock on this file
- * descriptor:
- */
- _thread_fd_table[fd]->w_owner = _thread_run;
-
- /*
- * Reset the number of write locks
- * for this file descriptor:
- */
- _thread_fd_table[fd]->w_lockcount = 0;
-
- /*
- * Save the source file details for
- * debugging:
- */
- _thread_fd_table[fd]->w_fname = fname;
- _thread_fd_table[fd]->w_lineno = lineno;
- }
- }
-
- /* Increment the write lock count: */
- _thread_fd_table[fd]->w_lockcount++;
- }
- }
-
- /* Unblock signals again: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_file.c b/lib/libc_r/uthread/uthread_file.c
deleted file mode 100644
index 0d8e9a3..0000000
--- a/lib/libc_r/uthread/uthread_file.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-_thread_flockfile(FILE * fp, char *fname, int lineno)
-{
- int fd, flags;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- if ((fd = fileno(fp)) >= 0) {
- if (fp->_flags & __SRW) {
- flags = FD_READ | FD_WRITE;
- } else {
- if (fp->_flags & __SWR) {
- flags = FD_WRITE;
- } else {
- flags = FD_READ;
- }
- }
-
- /* This might fail but POSIX doesn't give a damn. */
- _thread_fd_lock(fd, flags, NULL, fname, lineno);
- }
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return;
-}
-
-int
-_thread_ftrylockfile(FILE * fp)
-{
- int fd = 0;
- int flags;
- int status;
-
- if ((fd = fileno(fp)) >= 0) {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- if (fp->_flags & __SRW) {
- flags = FD_READ | FD_WRITE;
- } else {
- if (fp->_flags & __SWR) {
- flags = FD_WRITE;
- } else {
- flags = FD_READ;
- }
- }
- if (!(_thread_fd_table[fd]->r_owner && _thread_fd_table[fd]->w_owner)) {
- _thread_fd_lock(fd, flags, NULL, __FILE__, __LINE__);
- fd = 0;
- } else {
- fd = -1;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
- return (fd);
-}
-
-void
-_thread_funlockfile(FILE * fp)
-{
- int fd, flags;
- int status;
-
- if ((fd = fileno(fp)) >= 0) {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- if (fp->_flags & __SRW) {
- flags = FD_READ | FD_WRITE;
- } else if (fp->_flags & __SWR) {
- flags = FD_WRITE;
- } else {
- flags = FD_READ;
- }
- _thread_fd_unlock(fd, flags);
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
- return;
-}
-
-#endif
diff --git a/lib/libc_r/uthread/uthread_flock.c b/lib/libc_r/uthread/uthread_flock.c
deleted file mode 100644
index 4071b54..0000000
--- a/lib/libc_r/uthread/uthread_flock.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/file.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-flock(int fd, int operation)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_flock(fd, operation);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_fork.c b/lib/libc_r/uthread/uthread_fork.c
deleted file mode 100644
index 19f674d..0000000
--- a/lib/libc_r/uthread/uthread_fork.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-pid_t
-fork(void)
-{
- int flags;
- pid_t ret;
-
- /* Fork a new process: */
- if ((ret = _thread_sys_fork()) <= 0) {
- /* Parent process or error. Nothing to do here. */
- } else {
- /* Close the pthread kernel pipe: */
- _thread_sys_close(_thread_kern_pipe[0]);
- _thread_sys_close(_thread_kern_pipe[1]);
-
- /* Reset signals pending for the running thread: */
- memset(_thread_run->sigpend, 0, sizeof(_thread_run->sigpend));
-
- /*
- * Create a pipe that is written to by the signal handler to
- * prevent signals being missed in calls to
- * _thread_sys_select:
- */
- if (_thread_sys_pipe(_thread_kern_pipe) != 0) {
- /* Cannot create pipe, so abort: */
- PANIC("Cannot create pthread kernel pipe for forked process");
- }
- /* Get the flags for the read pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[0], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- abort();
- }
- /* Make the read pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[0], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- abort();
- }
- /* Get the flags for the write pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[1], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- abort();
- }
- /* Make the write pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[1], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- abort();
- }
- }
-
- /* Return the process ID: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_fstat.c b/lib/libc_r/uthread/uthread_fstat.c
deleted file mode 100644
index fc29e66..0000000
--- a/lib/libc_r/uthread/uthread_fstat.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fstat(int fd, struct stat * buf)
-{
- int ret;
-
- /* Lock the file descriptor for read: */
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL, __FILE__, __LINE__)) == 0) {
- /* Get the file status: */
- ret = _thread_sys_fstat(fd, buf);
- /* Unlock the file descriptor: */
- _thread_fd_unlock(fd, FD_READ);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_fstatfs.c b/lib/libc_r/uthread/uthread_fstatfs.c
deleted file mode 100644
index 252c8b1..0000000
--- a/lib/libc_r/uthread/uthread_fstatfs.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/mount.h>
-#include <sys/stat.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fstatfs(int fd, struct statfs * buf)
-{
- int ret;
-
- /* Lock the file descriptor for read: */
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL, __FILE__, __LINE__)) == 0) {
- /* Get the file system status: */
- ret = _thread_sys_fstatfs(fd, buf);
- /* Unlock the file descriptor: */
- _thread_fd_unlock(fd, FD_READ);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_fsync.c b/lib/libc_r/uthread/uthread_fsync.c
deleted file mode 100644
index 51078e5..0000000
--- a/lib/libc_r/uthread/uthread_fsync.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fsync(int fd)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_fsync(fd);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_getdirentries.c b/lib/libc_r/uthread/uthread_getdirentries.c
deleted file mode 100644
index b75e804..0000000
--- a/lib/libc_r/uthread/uthread_getdirentries.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <dirent.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-getdirentries(int fd, char *buf, int nbytes, long *basep)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_getdirentries(fd, buf, nbytes, basep);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_getpeername.c b/lib/libc_r/uthread/uthread_getpeername.c
deleted file mode 100644
index d3bb4e1..0000000
--- a/lib/libc_r/uthread/uthread_getpeername.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-getpeername(int fd, struct sockaddr * peer, int *paddrlen)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_getpeername(fd, peer, paddrlen);
- _thread_fd_unlock(fd, FD_READ);
- }
- return ret;
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_getprio.c b/lib/libc_r/uthread/uthread_getprio.c
deleted file mode 100644
index 85bd261..0000000
--- a/lib/libc_r/uthread/uthread_getprio.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_getprio(pthread_t pthread)
-{
- int rval = 0;
- int status;
- pthread_t pthread_p;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the first thread in the list: */
- pthread_p = _thread_link_list;
-
- /* Enter a loop to search for the thread: */
- while (pthread_p != NULL && pthread_p != pthread) {
- /* Point to the next thread: */
- pthread_p = pthread_p->nxt;
- }
-
- /* Check if the thread pointer is NULL: */
- if (pthread == NULL || pthread_p == NULL) {
- /* Return an invalid argument error: */
- errno = EINVAL;
- rval = -1;
- } else {
- /* Get the thread priority: */
- rval = pthread->pthread_priority;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the thread priority or an error status: */
- return (rval);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_getsockname.c b/lib/libc_r/uthread/uthread_getsockname.c
deleted file mode 100644
index 5a8466b..0000000
--- a/lib/libc_r/uthread/uthread_getsockname.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-getsockname(int s, struct sockaddr * name, int *namelen)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(s, FD_READ, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_getsockname(s, name, namelen);
- _thread_fd_unlock(s, FD_READ);
- }
- return ret;
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_getsockopt.c b/lib/libc_r/uthread/uthread_getsockopt.c
deleted file mode 100644
index fdedd90..0000000
--- a/lib/libc_r/uthread/uthread_getsockopt.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-getsockopt(int fd, int level, int optname, void *optval, int *optlen)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_getsockopt(fd, level, optname, optval, optlen);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return ret;
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_info.c b/lib/libc_r/uthread/uthread_info.c
deleted file mode 100644
index be25d45..0000000
--- a/lib/libc_r/uthread/uthread_info.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdio.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-struct s_thread_info {
- enum pthread_state state;
- char *name;
-};
-
-/* Static variables: */
-static const struct s_thread_info thread_info[] = {
- {PS_RUNNING , "Running"},
- {PS_SIGTHREAD , "Waiting on signal thread"},
- {PS_MUTEX_WAIT , "Waiting on a mutex"},
- {PS_COND_WAIT , "Waiting on a condition variable"},
- {PS_FDLR_WAIT , "Waiting for a file read lock"},
- {PS_FDLW_WAIT , "Waiting for a file write lock"},
- {PS_FDR_WAIT , "Waiting for read"},
- {PS_FDW_WAIT , "Waitingfor write"},
- {PS_SELECT_WAIT , "Waiting on select"},
- {PS_SLEEP_WAIT , "Sleeping"},
- {PS_WAIT_WAIT , "Waiting process"},
- {PS_SIGWAIT , "Waiting for a signal"},
- {PS_JOIN , "Waiting to join"},
- {PS_SUSPENDED , "Suspended"},
- {PS_DEAD , "Dead"},
- {PS_STATE_MAX , "Not a real state!"}
-};
-
-void
-_thread_dump_info(void)
-{
- char s[128];
- int fd;
- int i;
- int j;
- pthread_t pthread;
-
- /* Open the dump file for append and create it if necessary: */
- if ((fd = _thread_sys_open("/tmp/uthread.dump", O_RDWR | O_CREAT | O_APPEND, 0666)) < 0) {
- /* Can't open the dump file. */
- } else {
- /* Output a header for active threads: */
- strcpy(s, "\n\n=============\nACTIVE THREADS\n\n");
- _thread_sys_write(fd, s, strlen(s));
-
- /* Enter a loop to report each thread in the global list: */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Find the state: */
- for (j = 0; j < (sizeof(thread_info) / sizeof(struct s_thread_info)) - 1; j++)
- if (thread_info[j].state == pthread->state)
- break;
- /* Output a record for the current thread: */
- sprintf(s, "--------------------\nThread %p prio %3d state %s [%s:%d]\n",
- pthread, pthread->pthread_priority, thread_info[j].name,pthread->fname,pthread->lineno);
- _thread_sys_write(fd, s, strlen(s));
-
- /* Check if this is the running thread: */
- if (pthread == _thread_run) {
- /* Output a record for the running thread: */
- strcpy(s, "This is the running thread\n");
- _thread_sys_write(fd, s, strlen(s));
- }
- /* Check if this is the initial thread: */
- if (pthread == _thread_initial) {
- /* Output a record for the initial thread: */
- strcpy(s, "This is the initial thread\n");
- _thread_sys_write(fd, s, strlen(s));
- }
- /* Process according to thread state: */
- switch (pthread->state) {
- /* File descriptor read lock wait: */
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_FDR_WAIT:
- case PS_FDW_WAIT:
- /* Write the lock details: */
- sprintf(s, "fd %d[%s:%d]", pthread->data.fd.fd, pthread->data.fd.fname, pthread->data.fd.branch);
- _thread_sys_write(fd, s, strlen(s));
- sprintf(s, "owner %pr/%pw\n", _thread_fd_table[pthread->data.fd.fd]->r_owner, _thread_fd_table[pthread->data.fd.fd]->w_owner);
- _thread_sys_write(fd, s, strlen(s));
- break;
-
- /*
- * Trap other states that are not explicitly
- * coded to dump information:
- */
- default:
- /* Nothing to do here. */
- break;
- }
- }
-
- /* Check if there are no dead threads: */
- if (_thread_dead == NULL) {
- /* Output a record: */
- strcpy(s, "\n\nTHERE ARE NO DEAD THREADS\n");
- _thread_sys_write(fd, s, strlen(s));
- } else {
- /* Output a header for dead threads: */
- strcpy(s, "\n\nDEAD THREADS\n\n");
- _thread_sys_write(fd, s, strlen(s));
-
- /*
- * Enter a loop to report each thread in the global
- * dead thread list:
- */
- for (pthread = _thread_dead; pthread != NULL; pthread = pthread->nxt) {
- /* Output a record for the current thread: */
- sprintf(s, "Thread %p prio %3d [%s:%d]\n", pthread, pthread->pthread_priority,pthread->fname,pthread->lineno);
- _thread_sys_write(fd, s, strlen(s));
- }
- }
-
- /* Output a header for file descriptors: */
- strcpy(s, "\n\n=============\nFILE DESCRIPTOR TABLE\n\n");
- _thread_sys_write(fd, s, strlen(s));
-
- /* Enter a loop to report file descriptor lock usage: */
- for (i = 0; i < _thread_dtablesize; i++) {
- /*
- * Check if memory is allocated for this file
- * descriptor:
- */
- if (_thread_fd_table[i] != NULL) {
- /* Report the file descriptor lock status: */
- sprintf(s, "fd[%3d] read owner %p count %d [%s:%d]\n write owner %p count %d [%s:%d]\n",
- i,
- _thread_fd_table[i]->r_owner,
- _thread_fd_table[i]->r_lockcount,
- _thread_fd_table[i]->r_fname,
- _thread_fd_table[i]->r_lineno,
- _thread_fd_table[i]->w_owner,
- _thread_fd_table[i]->w_lockcount,
- _thread_fd_table[i]->w_fname,
- _thread_fd_table[i]->w_lineno);
- _thread_sys_write(fd, s, strlen(s));
- }
- }
-
- /* Close the dump file: */
- _thread_sys_close(fd);
- }
- return;
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_init.c b/lib/libc_r/uthread/uthread_init.c
deleted file mode 100644
index 5833cdf..0000000
--- a/lib/libc_r/uthread/uthread_init.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-/* Allocate space for global thread variables here: */
-#define GLOBAL_PTHREAD_PRIVATE
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/time.h>
-#ifdef _THREAD_SAFE
-#include <machine/reg.h>
-#include <pthread.h>
-#include "pthread_private.h"
-extern int _thread_autoinit_dummy_decl;
-
-/*
- * Threaded process initialization
- */
-void
-_thread_init(void)
-{
- int flags;
- int i;
- struct sigaction act;
-
- /* Ensure that the auto-initialization routine is linked in: */
- _thread_autoinit_dummy_decl = 1;
-
- /* Check if this function has already been called: */
- if (_thread_initial)
- /* Only initialise the threaded application once. */
- return;
-
- /* Get the standard I/O flags before messing with them : */
- for (i = 0; i < 3; i++)
- if ((_pthread_stdio_flags[i] =
- _thread_sys_fcntl(i,F_GETFL, NULL)) == -1)
- PANIC("Cannot get stdio flags");
-
- /*
- * Create a pipe that is written to by the signal handler to prevent
- * signals being missed in calls to _thread_sys_select:
- */
- if (_thread_sys_pipe(_thread_kern_pipe) != 0) {
- /* Cannot create pipe, so abort: */
- PANIC("Cannot create kernel pipe");
- }
- /* Get the flags for the read pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[0], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- PANIC("Cannot get kernel read pipe flags");
- }
- /* Make the read pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[0], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- PANIC("Cannot make kernel read pipe non-blocking");
- }
- /* Get the flags for the write pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[1], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- PANIC("Cannot get kernel write pipe flags");
- }
- /* Make the write pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[1], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- PANIC("Cannot get kernel write pipe flags");
- }
- /* Allocate memory for the thread structure of the initial thread: */
- else if ((_thread_initial = (pthread_t) malloc(sizeof(struct pthread))) == NULL) {
- /*
- * Insufficient memory to initialise this application, so
- * abort:
- */
- PANIC("Cannot allocate memory for initial thread");
- } else {
- /* Zero the global kernel thread structure: */
- memset(&_thread_kern_thread, 0, sizeof(struct pthread));
- memset(_thread_initial, 0, sizeof(struct pthread));
-
- /* Default the priority of the initial thread: */
- _thread_initial->pthread_priority = PTHREAD_DEFAULT_PRIORITY;
-
- /* Initialise the state of the initial thread: */
- _thread_initial->state = PS_RUNNING;
-
- /* Initialise the queue: */
- _thread_queue_init(&(_thread_initial->join_queue));
-
- /* Initialise the rest of the fields: */
- _thread_initial->parent_thread = NULL;
- _thread_initial->specific_data = NULL;
- _thread_initial->cleanup = NULL;
- _thread_initial->queue = NULL;
- _thread_initial->qnxt = NULL;
- _thread_initial->nxt = NULL;
- _thread_initial->flags = 0;
- _thread_initial->error = 0;
- _thread_link_list = _thread_initial;
- _thread_run = _thread_initial;
-
- /* Enter a loop to get the existing signal status: */
- for (i = 1; i < NSIG; i++) {
- /* Check for signals which cannot be trapped: */
- if (i == SIGKILL || i == SIGSTOP) {
- }
- /* Get the signal handler details: */
- else if (_thread_sys_sigaction(i, NULL, &act) != 0) {
- /*
- * Abort this process if signal
- * initialisation fails:
- */
- PANIC("Cannot read signal handler info");
- }
- /* Set the signal handler for the initial thread: */
- else if (sigaction(i, &act, NULL) != 0) {
- /*
- * Abort this process if signal
- * initialisation fails:
- */
- PANIC("Cannot initialise signal handler for initial thread");
- }
- }
-
- /* Initialise the global signal action structure: */
- sigfillset(&act.sa_mask);
- act.sa_handler = (void (*) ()) _thread_sig_handler;
- act.sa_flags = SA_RESTART;
-
- /* Enter a loop to initialise the rest of the signals: */
- for (i = 1; i < NSIG; i++) {
- /* Check for signals which cannot be trapped: */
- if (i == SIGKILL || i == SIGSTOP) {
- }
- /* Initialise the signal for default handling: */
- else if (_thread_sys_sigaction(i, &act, NULL) != 0) {
- /*
- * Abort this process if signal
- * initialisation fails:
- */
- PANIC("Cannot initialise signal handler");
- }
- }
-
- /* Get the table size: */
- if ((_thread_dtablesize = getdtablesize()) < 0) {
- /*
- * Cannot get the system defined table size, so abort
- * this process.
- */
- PANIC("Cannot get dtablesize");
- }
- /* Allocate memory for the file descriptor table: */
- if ((_thread_fd_table = (struct fd_table_entry **) malloc(sizeof(struct fd_table_entry *) * _thread_dtablesize)) == NULL) {
- /*
- * Cannot allocate memory for the file descriptor
- * table, so abort this process.
- */
- PANIC("Cannot allocate memory for file descriptor table");
- } else {
- /*
- * Enter a loop to initialise the file descriptor
- * table:
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Initialise the file descriptor table: */
- _thread_fd_table[i] = NULL;
- }
- }
- }
- return;
-}
-
-/*
- * Special start up code for NetBSD/Alpha
- */
-#if defined(__NetBSD__) && defined(__alpha__)
-int
-main(int argc, char *argv[], char *env);
-
-int
-_thread_main(int argc, char *argv[], char *env)
-{
- _thread_init();
- return (main(argc, argv, env));
-}
-#endif
-#else
-/*
- * A stub for non-threaded programs.
- */
-void
-_thread_init(void)
-{
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_ioctl.c b/lib/libc_r/uthread/uthread_ioctl.c
deleted file mode 100644
index 69df24d..0000000
--- a/lib/libc_r/uthread/uthread_ioctl.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdarg.h>
-#include <sys/ioctl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-ioctl(int fd, unsigned long request,...)
-{
- int ret;
- va_list ap;
-
- va_start(ap, request);
- if (fd < 0 || fd >= _thread_dtablesize)
- ret = -1;
- else
- ret = _thread_sys_ioctl(fd, request, va_arg(ap, char *));
- va_end(ap);
- return ret;
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_join.c b/lib/libc_r/uthread/uthread_join.c
deleted file mode 100644
index 63d0d58..0000000
--- a/lib/libc_r/uthread/uthread_join.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_join(pthread_t pthread, void **thread_return)
-{
- int rval = 0;
- int status;
- pthread_t pthread1;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the first thread in the list: */
- pthread1 = _thread_link_list;
-
- /* Search for the thread to join to: */
- while (pthread1 != NULL && pthread1 != pthread) {
- /* Point to the next thread: */
- pthread1 = pthread1->nxt;
- }
-
- if (pthread1 == NULL) {
- /* Point to the first thread in the dead thread list: */
- pthread1 = _thread_dead;
-
- /* Search for the thread to join to: */
- while (pthread1 != NULL && pthread1 != pthread) {
- /* Point to the next thread: */
- pthread1 = pthread1->nxt;
- }
- }
-
- if (pthread1 == NULL) {
- /* Return an error: */
- rval = ESRCH;
-
- /* Check if this thread has been detached: */
- } else if ((pthread->attr.flags & PTHREAD_DETACHED) != 0) {
- /* Return an error: */
- rval = ESRCH;
- }
- /* Check if the thread is not dead: */
- else if (pthread->state != PS_DEAD) {
- /* Add the running thread to the join queue: */
- _thread_queue_enq(&(pthread->join_queue), _thread_run);
-
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__);
-
- /* Block signals again: */
- _thread_kern_sig_block(NULL);
-
- /* Check if the thread is not detached: */
- if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) {
- /* Check if the return value is required: */
- if (thread_return) {
- /* Return the thread's return value: */
- *thread_return = pthread->ret;
- }
- } else {
- /* Return an error: */
- rval = ESRCH;
- }
- } else {
- /* Check if the return value is required: */
- if (thread_return != NULL) {
- /* Return the thread's return value: */
- *thread_return = pthread->ret;
- }
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_kern.c b/lib/libc_r/uthread/uthread_kern.c
deleted file mode 100644
index ba8e250..0000000
--- a/lib/libc_r/uthread/uthread_kern.c
+++ /dev/null
@@ -1,1739 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <errno.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-#include <setjmp.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-#include <sys/syscall.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/* Static variables: */
-static sigset_t sig_to_block = 0xffffffff;
-static sigset_t sig_to_unblock = 0;
-
-/* Static function prototype definitions: */
-static void
-_thread_kern_select(int wait_reqd);
-static void
-_thread_signal(pthread_t pthread, int sig);
-
-void
-_thread_kern_sched(struct sigcontext * scp)
-{
-#ifndef __alpha
- char *fdata;
-#endif
- int i;
- int prio = -1;
- pthread_t pthread;
- pthread_t pthread_h = NULL;
- pthread_t pthread_nxt = NULL;
- pthread_t pthread_prv = NULL;
- pthread_t pthread_s = NULL;
- struct itimerval itimer;
- struct timespec ts;
- struct timespec ts1;
- struct timeval tv;
- struct timeval tv1;
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Check if this function was called from the signal handler: */
- if (scp != NULL) {
- /*
- * Copy the signal context to the current thread's jump
- * buffer:
- */
- memcpy(&_thread_run->saved_sigcontext, scp, sizeof(_thread_run->saved_sigcontext));
-
-#ifndef __alpha
- /* Point to the floating point data in the running thread: */
- fdata = _thread_run->saved_fp;
-
- /* Save the floating point data: */
-__asm__("fnsave %0": :"m"(*fdata));
-#endif
-
- /* Flag the signal context as the last state saved: */
- _thread_run->sig_saved = 1;
- }
- /* Save the state of the current thread: */
- else if (_thread_sys_setjmp(_thread_run->saved_jmp_buf) != 0) {
- /* Unblock signals (just in case): */
- _thread_kern_sig_unblock(0);
-
- /*
- * This point is reached when a longjmp() is called to
- * restore the state of a thread.
- */
- return;
- } else {
- /* Flag the jump buffer was the last state saved: */
- _thread_run->sig_saved = 0;
- }
-
- /* Point to the first dead thread (if there are any): */
- pthread = _thread_dead;
-
- /* There is no previous dead thread: */
- pthread_prv = NULL;
-
- /* Enter a loop to cleanup after dead threads: */
- while (pthread != NULL) {
- /* Save a pointer to the next thread: */
- pthread_nxt = pthread->nxt;
-
- /* Check if this thread is one which is running: */
- if (pthread == _thread_run || pthread == _thread_initial) {
- /*
- * Don't destroy the running thread or the initial
- * thread.
- */
- pthread_prv = pthread;
- }
- /*
- * Check if this thread has detached or if it is a signal
- * handler thread:
- */
- else if (((pthread->attr.flags & PTHREAD_DETACHED) != 0) || pthread->parent_thread != NULL) {
- /* Check if there is no previous dead thread: */
- if (pthread_prv == NULL) {
- /*
- * The dead thread is at the head of the
- * list:
- */
- _thread_dead = pthread_nxt;
- } else {
- /*
- * The dead thread is not at the head of the
- * list:
- */
- pthread_prv->nxt = pthread->nxt;
- }
-
- /*
- * Check if the stack was not specified by the caller
- * to pthread_create and has not been destroyed yet:
- */
- if (pthread->attr.stackaddr_attr == NULL && pthread->stack != NULL) {
- /* Free the stack of the dead thread: */
- free(pthread->stack);
- }
- /* Free the memory allocated to the thread structure: */
- free(pthread);
- } else {
- /*
- * This thread has not detached, so do not destroy
- * it:
- */
- pthread_prv = pthread;
-
- /*
- * Check if the stack was not specified by the caller
- * to pthread_create and has not been destroyed yet:
- */
- if (pthread->attr.stackaddr_attr == NULL && pthread->stack != NULL) {
- /* Free the stack of the dead thread: */
- free(pthread->stack);
-
- /*
- * NULL the stack pointer now that the memory
- * has been freed:
- */
- pthread->stack = NULL;
- }
- }
-
- /* Point to the next thread: */
- pthread = pthread_nxt;
- }
-
- /*
- * Enter a the scheduling loop that finds the next thread that is
- * ready to run. This loop completes when there are no more threads
- * in the global list or when a thread has its state restored by
- * either a sigreturn (if the state was saved as a sigcontext) or a
- * longjmp (if the state was saved by a setjmp).
- */
- while (_thread_link_list != NULL) {
- /* Get the current time of day: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &ts);
-
- /*
- * Poll file descriptors to update the state of threads
- * waiting on file I/O where data may be available:
- */
- _thread_kern_select(0);
-
- /*
- * Enter a loop to look for sleeping threads that are ready
- * or threads with pending signals that are no longer
- * blocked:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Enter a loop to process the sending signals: */
- for (i = 1; i < NSIG; i++) {
- /*
- * Check if there are no pending signals of
- * this type:
- */
- if (pthread->sigpend[i] == 0) {
- }
- /* Check if this signal type is not masked: */
- else if (sigismember(&pthread->sigmask, i) == 0) {
- /*
- * Delete the signal from the set of
- * pending signals for this thread:
- */
- pthread->sigpend[i] -= 1;
-
- /*
- * Act on the signal for the current
- * thread:
- */
- _thread_signal(pthread, i);
- } else {
- /*
- * This signal is masked, so make
- * sure the count does not exceed 1:
- */
- pthread->sigpend[i] = 1;
- }
- }
-
- /* Check if this thread is to timeout: */
- if (pthread->state == PS_COND_WAIT ||
- pthread->state == PS_SLEEP_WAIT ||
- pthread->state == PS_FDR_WAIT ||
- pthread->state == PS_FDW_WAIT ||
- pthread->state == PS_SELECT_WAIT) {
- /* Check if this thread is to wait forever: */
- if (pthread->wakeup_time.tv_sec == -1) {
- }
- /*
- * Check if this thread is to wakeup
- * immediately or if it is past its wakeup
- * time:
- */
- else if ((pthread->wakeup_time.tv_sec == 0 &&
- pthread->wakeup_time.tv_nsec == 0) ||
- (ts.tv_sec > pthread->wakeup_time.tv_sec) ||
- ((ts.tv_sec == pthread->wakeup_time.tv_sec) &&
- (ts.tv_nsec >= pthread->wakeup_time.tv_nsec))) {
- /*
- * Check if this thread is waiting on
- * select:
- */
- if (pthread->state == PS_SELECT_WAIT) {
- /*
- * The select has timed out,
- * so zero the file
- * descriptor sets:
- */
- FD_ZERO(&pthread->data.select_data->readfds);
- FD_ZERO(&pthread->data.select_data->writefds);
- FD_ZERO(&pthread->data.select_data->exceptfds);
- pthread->data.select_data->nfds = 0;
- }
- /*
- * Return an error as an interrupted
- * wait:
- */
- _thread_seterrno(pthread, EINTR);
-
- /*
- * Flag the timeout in the thread
- * structure:
- */
- pthread->timeout = 1;
-
- /*
- * Change the threads state to allow
- * it to be restarted:
- */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- }
- }
-
- /* Check if there is a current thread: */
- if (_thread_run != &_thread_kern_thread) {
- /*
- * Save the current time as the time that the thread
- * became inactive:
- */
- _thread_run->last_inactive.tv_sec = tv.tv_sec;
- _thread_run->last_inactive.tv_usec = tv.tv_usec;
-
- /*
- * Accumulate the number of microseconds that this
- * thread has run for:
- */
- _thread_run->slice_usec += (_thread_run->last_inactive.tv_sec -
- _thread_run->last_active.tv_sec) * 1000000 +
- _thread_run->last_inactive.tv_usec -
- _thread_run->last_active.tv_usec;
-
- /*
- * Check if this thread has reached its allocated
- * time slice period:
- */
- if (_thread_run->slice_usec > TIMESLICE_USEC) {
- /*
- * Flag the allocated time slice period as
- * up:
- */
- _thread_run->slice_usec = -1;
- }
- }
- /* Check if an incremental priority update is required: */
- if (((tv.tv_sec - kern_inc_prio_time.tv_sec) * 1000000 +
- tv.tv_usec - kern_inc_prio_time.tv_usec) > INC_PRIO_USEC) {
- /*
- * Enter a loop to look for run-enabled threads that
- * have not run since the last time that an
- * incremental priority update was performed:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if this thread is unable to run: */
- if (pthread->state != PS_RUNNING) {
- }
- /*
- * Check if the last time that this thread
- * was run (as indicated by the last time it
- * became inactive) is before the time that
- * the last incremental priority check was
- * made:
- */
- else if (timercmp(&_thread_run->last_inactive, &kern_inc_prio_time, >)) {
- /*
- * Increment the incremental priority
- * for this thread in the hope that
- * it will eventually get a chance to
- * run:
- */
- (pthread->inc_prio)++;
- }
- }
-
- /* Save the new incremental priority update time: */
- kern_inc_prio_time.tv_sec = tv.tv_sec;
- kern_inc_prio_time.tv_usec = tv.tv_usec;
- }
- /*
- * Enter a loop to look for the first thread of the highest
- * priority that is ready to run:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if in single-threaded mode: */
- if (_thread_single != NULL) {
- /*
- * Check if the current thread is
- * the thread for which single-threaded
- * mode is enabled:
- */
- if (pthread == _thread_single) {
- /*
- * This thread is allowed
- * to run.
- */
- } else {
- /*
- * Walk up the signal handler
- * parent thread tree to see
- * if the current thread is
- * descended from the thread
- * for which single-threaded
- * mode is enabled.
- */
- pthread_nxt = pthread;
- while(pthread_nxt != NULL &&
- pthread_nxt != _thread_single) {
- pthread_nxt = pthread->parent_thread;
- }
- /*
- * Check if the current
- * thread is not descended
- * from the thread for which
- * single-threaded mode is
- * enabled.
- */
- if (pthread_nxt == NULL)
- /* Ignore this thread. */
- continue;
- }
- }
-
- /* Check if the current thread is unable to run: */
- if (pthread->state != PS_RUNNING) {
- }
- /*
- * Check if no run-enabled thread has been seen or if
- * the current thread has a priority higher than the
- * highest seen so far:
- */
- else if (pthread_h == NULL || (pthread->pthread_priority + pthread->inc_prio) > prio) {
- /*
- * Save this thread as the highest priority
- * thread seen so far:
- */
- pthread_h = pthread;
- prio = pthread->pthread_priority + pthread->inc_prio;
- }
- }
-
- /*
- * Enter a loop to look for a thread that: 1. Is run-enabled.
- * 2. Has the required agregate priority. 3. Has not been
- * allocated its allocated time slice. 4. Became inactive
- * least recently.
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if in single-threaded mode: */
- if (_thread_single != NULL) {
- /*
- * Check if the current thread is
- * the thread for which single-threaded
- * mode is enabled:
- */
- if (pthread == _thread_single) {
- /*
- * This thread is allowed
- * to run.
- */
- } else {
- /*
- * Walk up the signal handler
- * parent thread tree to see
- * if the current thread is
- * descended from the thread
- * for which single-threaded
- * mode is enabled.
- */
- pthread_nxt = pthread;
- while(pthread_nxt != NULL &&
- pthread_nxt != _thread_single) {
- pthread_nxt = pthread->parent_thread;
- }
- /*
- * Check if the current
- * thread is not descended
- * from the thread for which
- * single-threaded mode is
- * enabled.
- */
- if (pthread_nxt == NULL)
- /* Ignore this thread. */
- continue;
- }
- }
-
- /* Check if the current thread is unable to run: */
- if (pthread->state != PS_RUNNING) {
- /* Ignore threads that are not ready to run. */
- }
- /*
- * Check if the current thread as an agregate
- * priority not equal to the highest priority found
- * above:
- */
- else if ((pthread->pthread_priority + pthread->inc_prio) != prio) {
- /*
- * Ignore threads which have lower agregate
- * priority.
- */
- }
- /*
- * Check if the current thread reached its time slice
- * allocation last time it ran (or if it has not run
- * yet):
- */
- else if (pthread->slice_usec == -1) {
- }
- /*
- * Check if an eligible thread has not been found
- * yet, or if the current thread has an inactive time
- * earlier than the last one seen:
- */
- else if (pthread_s == NULL || timercmp(&pthread->last_inactive, &tv1, <)) {
- /*
- * Save the pointer to the current thread as
- * the most eligible thread seen so far:
- */
- pthread_s = pthread;
-
- /*
- * Save the time that the selected thread
- * became inactive:
- */
- tv1.tv_sec = pthread->last_inactive.tv_sec;
- tv1.tv_usec = pthread->last_inactive.tv_usec;
- }
- }
-
- /*
- * Check if no thread was selected according to incomplete
- * time slice allocation:
- */
- if (pthread_s == NULL) {
- /*
- * Enter a loop to look for any other thread that: 1.
- * Is run-enabled. 2. Has the required agregate
- * priority. 3. Became inactive least recently.
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if in single-threaded mode: */
- if (_thread_single != NULL) {
- /*
- * Check if the current thread is
- * the thread for which single-threaded
- * mode is enabled:
- */
- if (pthread == _thread_single) {
- /*
- * This thread is allowed
- * to run.
- */
- } else {
- /*
- * Walk up the signal handler
- * parent thread tree to see
- * if the current thread is
- * descended from the thread
- * for which single-threaded
- * mode is enabled.
- */
- pthread_nxt = pthread;
- while(pthread_nxt != NULL &&
- pthread_nxt != _thread_single) {
- pthread_nxt = pthread->parent_thread;
- }
- /*
- * Check if the current
- * thread is not descended
- * from the thread for which
- * single-threaded mode is
- * enabled.
- */
- if (pthread_nxt == NULL)
- /* Ignore this thread. */
- continue;
- }
- }
-
- /*
- * Check if the current thread is unable to
- * run:
- */
- if (pthread->state != PS_RUNNING) {
- /*
- * Ignore threads that are not ready
- * to run.
- */
- }
- /*
- * Check if the current thread as an agregate
- * priority not equal to the highest priority
- * found above:
- */
- else if ((pthread->pthread_priority + pthread->inc_prio) != prio) {
- /*
- * Ignore threads which have lower
- * agregate priority.
- */
- }
- /*
- * Check if an eligible thread has not been
- * found yet, or if the current thread has an
- * inactive time earlier than the last one
- * seen:
- */
- else if (pthread_s == NULL || timercmp(&pthread->last_inactive, &tv1, <)) {
- /*
- * Save the pointer to the current
- * thread as the most eligible thread
- * seen so far:
- */
- pthread_s = pthread;
-
- /*
- * Save the time that the selected
- * thread became inactive:
- */
- tv1.tv_sec = pthread->last_inactive.tv_sec;
- tv1.tv_usec = pthread->last_inactive.tv_usec;
- }
- }
- }
- /* Check if there are no threads ready to run: */
- if (pthread_s == NULL) {
- /*
- * Lock the pthread kernel by changing the pointer to
- * the running thread to point to the global kernel
- * thread structure:
- */
- _thread_run = &_thread_kern_thread;
-
- /*
- * There are no threads ready to run, so wait until
- * something happens that changes this condition:
- */
- _thread_kern_select(1);
- } else {
- /* Make the selected thread the current thread: */
- _thread_run = pthread_s;
-
- /*
- * Save the current time as the time that the thread
- * became active:
- */
- _thread_run->last_active.tv_sec = tv.tv_sec;
- _thread_run->last_active.tv_usec = tv.tv_usec;
-
- /*
- * Check if this thread is running for the first time
- * or running again after using its full time slice
- * allocation:
- */
- if (_thread_run->slice_usec == -1) {
- /* Reset the accumulated time slice period: */
- _thread_run->slice_usec = 0;
- }
- /*
- * Reset the incremental priority now that this
- * thread has been given the chance to run:
- */
- _thread_run->inc_prio = 0;
-
- /* Check if there is more than one thread: */
- if (_thread_run != _thread_link_list || _thread_run->nxt != NULL) {
- /*
- * Define the maximum time before a SIGVTALRM
- * is required:
- */
- itimer.it_value.tv_sec = 0;
- itimer.it_value.tv_usec = TIMESLICE_USEC;
-
- /*
- * The interval timer is not reloaded when it
- * times out. The interval time needs to be
- * calculated every time.
- */
- itimer.it_interval.tv_sec = 0;
- itimer.it_interval.tv_usec = 0;
-
- /*
- * Enter a loop to look for threads waiting
- * for a time:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /*
- * Check if this thread is to
- * timeout:
- */
- if (pthread->state == PS_COND_WAIT ||
- pthread->state == PS_SLEEP_WAIT ||
- pthread->state == PS_FDR_WAIT ||
- pthread->state == PS_FDW_WAIT ||
- pthread->state == PS_SELECT_WAIT) {
- /*
- * Check if this thread is to
- * wait forever:
- */
- if (pthread->wakeup_time.tv_sec == -1) {
- }
- /*
- * Check if this thread is to
- * wakeup immediately:
- */
- else if (pthread->wakeup_time.tv_sec == 0 &&
- pthread->wakeup_time.tv_nsec == 0) {
- }
- /*
- * Check if the current time
- * is after the wakeup time:
- */
- else if ((ts.tv_sec > pthread->wakeup_time.tv_sec) ||
- ((ts.tv_sec == pthread->wakeup_time.tv_sec) &&
- (ts.tv_nsec > pthread->wakeup_time.tv_nsec))) {
- } else {
- /*
- * Calculate the time
- * until this thread
- * is ready, allowing
- * for the clock
- * resolution:
- */
- ts1.tv_sec = pthread->wakeup_time.tv_sec - ts.tv_sec;
- ts1.tv_nsec = pthread->wakeup_time.tv_nsec - ts.tv_nsec +
- CLOCK_RES_NSEC;
-
- /*
- * Check for
- * underflow of the
- * nanosecond field:
- */
- if (ts1.tv_nsec < 0) {
- /*
- * Allow for
- * the
- * underflow
- * of the
- * nanosecond
- * field:
- */
- ts1.tv_sec--;
- ts1.tv_nsec += 1000000000;
- }
- /*
- * Check for overflow
- * of the nanosecond
- * field:
- */
- if (ts1.tv_nsec >= 1000000000) {
- /*
- * Allow for
- * the
- * overflow
- * of the
- * nanosecond
- * field:
- */
- ts1.tv_sec++;
- ts1.tv_nsec -= 1000000000;
- }
- /*
- * Convert the
- * timespec structure
- * to a timeval
- * structure:
- */
- TIMESPEC_TO_TIMEVAL(&tv, &ts1);
-
- /*
- * Check if the
- * thread will be
- * ready sooner than
- * the earliest one
- * found so far:
- */
- if (timercmp(&tv, &itimer.it_value, <)) {
- /*
- * Update the
- * time
- * value:
- */
- itimer.it_value.tv_sec = tv.tv_sec;
- itimer.it_value.tv_usec = tv.tv_usec;
- }
- }
- }
- }
-
- /*
- * Start the interval timer for the
- * calculated time interval:
- */
- if (setitimer(ITIMER_VIRTUAL, &itimer, NULL) != 0) {
- /*
- * Cannot initialise the timer, so
- * abort this process:
- */
- PANIC("Cannot set virtual timer");
- }
- }
- /* Check if a signal context was saved: */
- if (_thread_run->sig_saved == 1) {
-#ifndef __alpha
- /*
- * Point to the floating point data in the
- * running thread:
- */
- fdata = _thread_run->saved_fp;
-
- /* Restore the floating point state: */
- __asm__("frstor %0": :"m"(*fdata));
-#endif
-
- /*
- * Do a sigreturn to restart the thread that
- * was interrupted by a signal:
- */
- _thread_sys_sigreturn(&_thread_run->saved_sigcontext);
- } else {
- /*
- * Do a longjmp to restart the thread that
- * was context switched out (by a longjmp to
- * a different thread):
- */
- _thread_sys_longjmp(_thread_run->saved_jmp_buf, 1);
- }
-
- /* This point should not be reached. */
- PANIC("Thread has returned from sigreturn or longjmp");
- }
- }
-
- /* There are no more threads, so exit this process: */
- exit(0);
-}
-
-static void
-_thread_signal(pthread_t pthread, int sig)
-{
- int done;
- long l;
- pthread_t new_pthread;
- struct sigaction act;
- void *arg;
-
- /*
- * Assume that the signal will not be dealt with according
- * to the thread state:
- */
- done = 0;
-
- /* Process according to thread state: */
- switch (pthread->state) {
- /* States which do not change when a signal is trapped: */
- case PS_COND_WAIT:
- case PS_DEAD:
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_JOIN:
- case PS_MUTEX_WAIT:
- case PS_RUNNING:
- case PS_STATE_MAX:
- case PS_SIGTHREAD:
- case PS_SUSPENDED:
- /* Nothing to do here. */
- break;
-
- /* Wait for child: */
- case PS_WAIT_WAIT:
- /* Check if the signal is from a child exiting: */
- if (sig == SIGCHLD) {
- /* Reset the error: */
- _thread_seterrno(pthread, 0);
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- } else {
- /* Return the 'interrupted' error: */
- _thread_seterrno(pthread, EINTR);
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- pthread->interrupted = 1;
- break;
-
- /* Waiting on I/O for zero or more file descriptors: */
- case PS_SELECT_WAIT:
- pthread->data.select_data->nfds = -1;
-
- /* Return the 'interrupted' error: */
- _thread_seterrno(pthread, EINTR);
- pthread->interrupted = 1;
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- break;
-
- /*
- * States that are interrupted by the occurrence of a signal
- * other than the scheduling alarm:
- */
- case PS_FDR_WAIT:
- case PS_FDW_WAIT:
- case PS_SLEEP_WAIT:
- /* Return the 'interrupted' error: */
- _thread_seterrno(pthread, EINTR);
- pthread->interrupted = 1;
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
-
- /* Return the signal number: */
- pthread->signo = sig;
- break;
-
- /* Waiting on a signal: */
- case PS_SIGWAIT:
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
-
- /* Return the signal number: */
- pthread->signo = sig;
-
- /* Flag the signal as dealt with: */
- done = 1;
- break;
- }
-
- /*
- * Check if this signal has been dealt with, or is being
- * ignored:
- */
- if (done || pthread->act[sig - 1].sa_handler == SIG_IGN) {
- /* Ignore the signal for this thread. */
- }
- /* Check if this signal is to use the default handler: */
- else if (pthread->act[sig - 1].sa_handler == SIG_DFL) {
- /* Process according to signal type: */
- switch (sig) {
- /* Signals which cause core dumps: */
- case SIGQUIT:
- case SIGILL:
- case SIGTRAP:
- case SIGABRT:
- case SIGEMT:
- case SIGFPE:
- case SIGBUS:
- case SIGSEGV:
- case SIGSYS:
- /* Clear the signal action: */
- sigfillset(&act.sa_mask);
- act.sa_handler = SIG_DFL;
- act.sa_flags = SA_RESTART;
- _thread_sys_sigaction(sig, &act, NULL);
-
- /*
- * Do a sigreturn back to where the signal was
- * detected and a core dump should occur:
- */
- _thread_sys_sigreturn(&pthread->saved_sigcontext);
- break;
-
- /* Default processing for other signals: */
- default:
- /*
- * ### Default processing is a problem to resolve!
- * ###
- */
- break;
- }
- } else {
- /*
- * Cast the signal number as a long and then to a void
- * pointer. Sigh. This is POSIX.
- */
- l = (long) sig;
- arg = (void *) l;
-
- /* Create a signal handler thread, but don't run it yet: */
- if (_thread_create(&new_pthread, NULL, (void *) pthread->act[sig - 1].sa_handler, arg, pthread) != 0) {
- /*
- * Error creating signal handler thread, so abort
- * this process:
- */
- PANIC("Cannot create signal handler thread");
- }
- }
-
- /* Nothing to return. */
- return;
-}
-
-void
-_thread_kern_sig_block(int *status)
-{
- sigset_t oset;
-
- /*
- * Block all signals so that the process will not be interrupted by
- * signals:
- */
- _thread_sys_sigprocmask(SIG_SETMASK, &sig_to_block, &oset);
-
- /* Check if the caller wants the current block status returned: */
- if (status != NULL) {
- /* Return the previous signal block status: */
- *status = (oset != 0);
- }
- return;
-}
-
-void
-_thread_kern_sig_unblock(int status)
-{
- sigset_t oset;
-
- /*
- * Check if the caller thinks that signals weren't blocked when it
- * called _thread_kern_sig_block:
- */
- if (status == 0) {
- /*
- * Unblock all signals so that the process will be
- * interrupted when a signal occurs:
- */
- _thread_sys_sigprocmask(SIG_SETMASK, &sig_to_unblock, &oset);
- }
- return;
-}
-
-void
-_thread_kern_sched_state(enum pthread_state state, char *fname, int lineno)
-{
- /* Change the state of the current thread: */
- _thread_run->state = state;
- _thread_run->fname = fname;
- _thread_run->lineno = lineno;
-
- /* Schedule the next thread that is ready: */
- _thread_kern_sched(NULL);
- return;
-}
-
-static void
-_thread_kern_select(int wait_reqd)
-{
- char bufr[128];
- fd_set fd_set_except;
- fd_set fd_set_read;
- fd_set fd_set_write;
- int count = 0;
- int count_dec;
- int found_one;
- int i;
- int nfds = -1;
- int settimeout;
- pthread_t pthread;
- ssize_t num;
- struct timespec ts;
- struct timespec ts1;
- struct timeval *p_tv;
- struct timeval tv;
- struct timeval tv1;
-
- /* Zero the file descriptor sets: */
- FD_ZERO(&fd_set_read);
- FD_ZERO(&fd_set_write);
- FD_ZERO(&fd_set_except);
-
- /* Check if the caller wants to wait: */
- if (wait_reqd) {
- /*
- * Add the pthread kernel pipe file descriptor to the read
- * set:
- */
- FD_SET(_thread_kern_pipe[0], &fd_set_read);
- nfds = _thread_kern_pipe[0];
-
- /* Get the current time of day: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &ts);
- }
- /* Initialise the time value structure: */
- tv.tv_sec = 0;
- tv.tv_usec = 0;
-
- /*
- * Enter a loop to process threads waiting on either file descriptors
- * or times:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Assume that this state does not time out: */
- settimeout = 0;
-
- /* Process according to thread state: */
- switch (pthread->state) {
- /*
- * States which do not depend on file descriptor I/O
- * operations or timeouts:
- */
- case PS_DEAD:
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_JOIN:
- case PS_MUTEX_WAIT:
- case PS_RUNNING:
- case PS_SIGTHREAD:
- case PS_SIGWAIT:
- case PS_STATE_MAX:
- case PS_WAIT_WAIT:
- case PS_SUSPENDED:
- /* Nothing to do here. */
- break;
-
- /* File descriptor read wait: */
- case PS_FDR_WAIT:
- /* Add the file descriptor to the read set: */
- FD_SET(pthread->data.fd.fd, &fd_set_read);
-
- /*
- * Check if this file descriptor is greater than any
- * of those seen so far:
- */
- if (pthread->data.fd.fd > nfds) {
- /* Remember this file descriptor: */
- nfds = pthread->data.fd.fd;
- }
- /* Increment the file descriptor count: */
- count++;
-
- /* This state can time out: */
- settimeout = 1;
- break;
-
- /* File descriptor write wait: */
- case PS_FDW_WAIT:
- /* Add the file descriptor to the write set: */
- FD_SET(pthread->data.fd.fd, &fd_set_write);
-
- /*
- * Check if this file descriptor is greater than any
- * of those seen so far:
- */
- if (pthread->data.fd.fd > nfds) {
- /* Remember this file descriptor: */
- nfds = pthread->data.fd.fd;
- }
- /* Increment the file descriptor count: */
- count++;
-
- /* This state can time out: */
- settimeout = 1;
- break;
-
- /* States that time out: */
- case PS_SLEEP_WAIT:
- case PS_COND_WAIT:
- /* Flag a timeout as required: */
- settimeout = 1;
- break;
-
- /* Select wait: */
- case PS_SELECT_WAIT:
- /*
- * Enter a loop to process each file descriptor in
- * the thread-specific file descriptor sets:
- */
- for (i = 0; i < pthread->data.select_data->nfds; i++) {
- /*
- * Check if this file descriptor is set for
- * exceptions:
- */
- if (FD_ISSET(i, &pthread->data.select_data->exceptfds)) {
- /*
- * Add the file descriptor to the
- * exception set:
- */
- FD_SET(i, &fd_set_except);
-
- /*
- * Increment the file descriptor
- * count:
- */
- count++;
-
- /*
- * Check if this file descriptor is
- * greater than any of those seen so
- * far:
- */
- if (i > nfds) {
- /*
- * Remember this file
- * descriptor:
- */
- nfds = i;
- }
- }
- /*
- * Check if this file descriptor is set for
- * write:
- */
- if (FD_ISSET(i, &pthread->data.select_data->writefds)) {
- /*
- * Add the file descriptor to the
- * write set:
- */
- FD_SET(i, &fd_set_write);
-
- /*
- * Increment the file descriptor
- * count:
- */
- count++;
-
- /*
- * Check if this file descriptor is
- * greater than any of those seen so
- * far:
- */
- if (i > nfds) {
- /*
- * Remember this file
- * descriptor:
- */
- nfds = i;
- }
- }
- /*
- * Check if this file descriptor is set for
- * read:
- */
- if (FD_ISSET(i, &pthread->data.select_data->readfds)) {
- /*
- * Add the file descriptor to the
- * read set:
- */
- FD_SET(i, &fd_set_read);
-
- /*
- * Increment the file descriptor
- * count:
- */
- count++;
-
- /*
- * Check if this file descriptor is
- * greater than any of those seen so
- * far:
- */
- if (i > nfds) {
- /*
- * Remember this file
- * descriptor:
- */
- nfds = i;
- }
- }
- }
-
- /* This state can time out: */
- settimeout = 1;
- break;
- }
-
- /*
- * Check if the caller wants to wait and if the thread state
- * is one that times out:
- */
- if (wait_reqd && settimeout) {
- /* Check if this thread wants to wait forever: */
- if (pthread->wakeup_time.tv_sec == -1) {
- }
- /* Check if this thread doesn't want to wait at all: */
- else if (pthread->wakeup_time.tv_sec == 0 &&
- pthread->wakeup_time.tv_nsec == 0) {
- /* Override the caller's request to wait: */
- wait_reqd = 0;
- } else {
- /*
- * Calculate the time until this thread is
- * ready, allowing for the clock resolution:
- */
- ts1.tv_sec = pthread->wakeup_time.tv_sec - ts.tv_sec;
- ts1.tv_nsec = pthread->wakeup_time.tv_nsec - ts.tv_nsec +
- CLOCK_RES_NSEC;
-
- /*
- * Check for underflow of the nanosecond
- * field:
- */
- if (ts1.tv_nsec < 0) {
- /*
- * Allow for the underflow of the
- * nanosecond field:
- */
- ts1.tv_sec--;
- ts1.tv_nsec += 1000000000;
- }
- /*
- * Check for overflow of the nanosecond
- * field:
- */
- if (ts1.tv_nsec >= 1000000000) {
- /*
- * Allow for the overflow of the
- * nanosecond field:
- */
- ts1.tv_sec++;
- ts1.tv_nsec -= 1000000000;
- }
- /*
- * Convert the timespec structure to a
- * timeval structure:
- */
- TIMESPEC_TO_TIMEVAL(&tv1, &ts1);
-
- /*
- * Check if no time value has been found yet,
- * or if the thread will be ready sooner that
- * the earliest one found so far:
- */
- if ((tv.tv_sec == 0 && tv.tv_usec == 0) || timercmp(&tv1, &tv, <)) {
- /* Update the time value: */
- tv.tv_sec = tv1.tv_sec;
- tv.tv_usec = tv1.tv_usec;
- }
- }
- }
- }
-
- /* Check if the caller wants to wait: */
- if (wait_reqd) {
- /* Check if no threads were found with timeouts: */
- if (tv.tv_sec == 0 && tv.tv_usec == 0) {
- /* Wait forever: */
- p_tv = NULL;
- } else {
- /*
- * Point to the time value structure which contains
- * the earliest time that a thread will be ready:
- */
- p_tv = &tv;
- }
-
- /*
- * Flag the pthread kernel as in a select. This is to avoid
- * the window between the next statement that unblocks
- * signals and the select statement which follows.
- */
- _thread_kern_in_select = 1;
-
- /* Unblock all signals: */
- _thread_kern_sig_unblock(0);
-
- /*
- * Wait for a file descriptor to be ready for read, write, or
- * an exception, or a timeout to occur:
- */
- count = _thread_sys_select(nfds + 1, &fd_set_read, &fd_set_write, &fd_set_except, p_tv);
-
- /* Block all signals again: */
- _thread_kern_sig_block(NULL);
-
- /* Reset the kernel in select flag: */
- _thread_kern_in_select = 0;
-
- /*
- * Check if it is possible that there are bytes in the kernel
- * read pipe waiting to be read:
- */
- if (count < 0 || FD_ISSET(_thread_kern_pipe[0], &fd_set_read)) {
- /*
- * Check if the kernel read pipe was included in the
- * count:
- */
- if (count > 0) {
- /*
- * Remove the kernel read pipe from the
- * count:
- */
- FD_CLR(_thread_kern_pipe[0], &fd_set_read);
-
- /* Decrement the count of file descriptors: */
- count--;
- }
- /*
- * Enter a loop to read (and trash) bytes from the
- * pthread kernel pipe:
- */
- while ((num = _thread_sys_read(_thread_kern_pipe[0], bufr, sizeof(bufr))) > 0) {
- /*
- * The buffer read contains one byte per
- * signal and each byte is the signal number.
- * This data is not used, but the fact that
- * the signal handler wrote to the pipe *is*
- * used to cause the _thread_sys_select call
- * to complete if the signal occurred between
- * the time when signals were unblocked and
- * the _thread_sys_select select call being
- * made.
- */
- }
- }
- }
- /* Check if there are file descriptors to poll: */
- else if (count > 0) {
- /*
- * Point to the time value structure which has been zeroed so
- * that the call to _thread_sys_select will not wait:
- */
- p_tv = &tv;
-
- /* Poll file descrptors without wait: */
- count = _thread_sys_select(nfds + 1, &fd_set_read, &fd_set_write, &fd_set_except, p_tv);
- }
- /*
- * Check if the select call was interrupted, or some other error
- * occurred:
- */
- if (count < 0) {
- /* Check if the select call was interrupted: */
- if (errno == EINTR) {
- /*
- * Interrupted calls are expected. The interrupting
- * signal will be in the sigpend array.
- */
- } else {
- /* This should not occur: */
- }
- }
- /* Check if no file descriptors are ready: */
- else if (count == 0) {
- /* Nothing to do here. */
- } else {
- /*
- * Enter a loop to look for threads waiting on file
- * descriptors that are flagged as available by the
- * _thread_sys_select syscall:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Process according to thread state: */
- switch (pthread->state) {
- /*
- * States which do not depend on file
- * descriptor I/O operations:
- */
- case PS_RUNNING:
- case PS_COND_WAIT:
- case PS_DEAD:
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_JOIN:
- case PS_MUTEX_WAIT:
- case PS_SIGWAIT:
- case PS_SLEEP_WAIT:
- case PS_WAIT_WAIT:
- case PS_SIGTHREAD:
- case PS_STATE_MAX:
- case PS_SUSPENDED:
- /* Nothing to do here. */
- break;
-
- /* File descriptor read wait: */
- case PS_FDR_WAIT:
- /*
- * Check if the file descriptor is available
- * for read:
- */
- if (FD_ISSET(pthread->data.fd.fd, &fd_set_read)) {
- /*
- * Change the thread state to allow
- * it to read from the file when it
- * is scheduled next:
- */
- pthread->state = PS_RUNNING;
- }
- break;
-
- /* File descriptor write wait: */
- case PS_FDW_WAIT:
- /*
- * Check if the file descriptor is available
- * for write:
- */
- if (FD_ISSET(pthread->data.fd.fd, &fd_set_write)) {
- /*
- * Change the thread state to allow
- * it to write to the file when it is
- * scheduled next:
- */
- pthread->state = PS_RUNNING;
- }
- break;
-
- /* Select wait: */
- case PS_SELECT_WAIT:
- /*
- * Reset the flag that indicates if a file
- * descriptor is ready for some type of
- * operation:
- */
- count_dec = 0;
-
- /*
- * Enter a loop to search though the
- * thread-specific select file descriptors
- * for the first descriptor that is ready:
- */
- for (i = 0; i < pthread->data.select_data->nfds && count_dec == 0; i++) {
- /*
- * Check if this file descriptor does
- * not have an exception:
- */
- if (FD_ISSET(i, &pthread->data.select_data->exceptfds) && FD_ISSET(i, &fd_set_except)) {
- /*
- * Flag this file descriptor
- * as ready:
- */
- count_dec = 1;
- }
- /*
- * Check if this file descriptor is
- * not ready for write:
- */
- if (FD_ISSET(i, &pthread->data.select_data->writefds) && FD_ISSET(i, &fd_set_write)) {
- /*
- * Flag this file descriptor
- * as ready:
- */
- count_dec = 1;
- }
- /*
- * Check if this file descriptor is
- * not ready for read:
- */
- if (FD_ISSET(i, &pthread->data.select_data->readfds) && FD_ISSET(i, &fd_set_read)) {
- /*
- * Flag this file descriptor
- * as ready:
- */
- count_dec = 1;
- }
- }
-
- /*
- * Check if any file descriptors are ready
- * for the current thread:
- */
- if (count_dec) {
- /*
- * Reset the count of file
- * descriptors that are ready for
- * this thread:
- */
- found_one = 0;
-
- /*
- * Enter a loop to search though the
- * thread-specific select file
- * descriptors:
- */
- for (i = 0; i < pthread->data.select_data->nfds; i++) {
- /*
- * Reset the count of
- * operations for which the
- * current file descriptor is
- * ready:
- */
- count_dec = 0;
-
- /*
- * Check if this file
- * descriptor is selected for
- * exceptions:
- */
- if (FD_ISSET(i, &pthread->data.select_data->exceptfds)) {
- /*
- * Check if this file
- * descriptor has an
- * exception:
- */
- if (FD_ISSET(i, &fd_set_except)) {
- /*
- * Increment
- * the count
- * for this
- * file:
- */
- count_dec++;
- } else {
- /*
- * Clear the
- * file
- * descriptor
- * in the
- * thread-spec
- * ific file
- * descriptor
- * set:
- */
- FD_CLR(i, &pthread->data.select_data->exceptfds);
- }
- }
- /*
- * Check if this file
- * descriptor is selected for
- * write:
- */
- if (FD_ISSET(i, &pthread->data.select_data->writefds)) {
- /*
- * Check if this file
- * descriptor is
- * ready for write:
- */
- if (FD_ISSET(i, &fd_set_write)) {
- /*
- * Increment
- * the count
- * for this
- * file:
- */
- count_dec++;
- } else {
- /*
- * Clear the
- * file
- * descriptor
- * in the
- * thread-spec
- * ific file
- * descriptor
- * set:
- */
- FD_CLR(i, &pthread->data.select_data->writefds);
- }
- }
- /*
- * Check if this file
- * descriptor is selected for
- * read:
- */
- if (FD_ISSET(i, &pthread->data.select_data->readfds)) {
- /*
- * Check if this file
- * descriptor is
- * ready for read:
- */
- if (FD_ISSET(i, &fd_set_read)) {
- /*
- * Increment
- * the count
- * for this
- * file:
- */
- count_dec++;
- } else {
- /*
- * Clear the
- * file
- * descriptor
- * in the
- * thread-spec
- * ific file
- * descriptor
- * set:
- */
- FD_CLR(i, &pthread->data.select_data->readfds);
- }
- }
- /*
- * Check if the current file
- * descriptor is ready for
- * any one of the operations:
- */
- if (count_dec > 0) {
- /*
- * Increment the
- * count of file
- * descriptors that
- * are ready for the
- * current thread:
- */
- found_one++;
- }
- }
-
- /*
- * Return the number of file
- * descriptors that are ready:
- */
- pthread->data.select_data->nfds = found_one;
-
- /*
- * Change the state of the current
- * thread to run:
- */
- pthread->state = PS_RUNNING;
- }
- break;
- }
- }
- }
-
- /* Nothing to return. */
- return;
-}
-
-void
-_thread_kern_set_timeout(struct timespec * timeout)
-{
- struct timespec current_time;
- struct timeval tv;
-
- /* Reset the timeout flag for the running thread: */
- _thread_run->timeout = 0;
-
- /* Check if the thread is to wait forever: */
- if (timeout == NULL) {
- /*
- * Set the wakeup time to something that can be recognised as
- * different to an actual time of day:
- */
- _thread_run->wakeup_time.tv_sec = -1;
- _thread_run->wakeup_time.tv_nsec = -1;
- }
- /* Check if no waiting is required: */
- else if (timeout->tv_sec == 0 && timeout->tv_nsec == 0) {
- /* Set the wake up time to 'immediately': */
- _thread_run->wakeup_time.tv_sec = 0;
- _thread_run->wakeup_time.tv_nsec = 0;
- } else {
- /* Get the current time: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &current_time);
-
- /* Calculate the time for the current thread to wake up: */
- _thread_run->wakeup_time.tv_sec = current_time.tv_sec + timeout->tv_sec;
- _thread_run->wakeup_time.tv_nsec = current_time.tv_nsec + timeout->tv_nsec;
-
- /* Check if the nanosecond field needs to wrap: */
- if (_thread_run->wakeup_time.tv_nsec >= 1000000000) {
- /* Wrap the nanosecond field: */
- _thread_run->wakeup_time.tv_sec += 1;
- _thread_run->wakeup_time.tv_nsec -= 1000000000;
- }
- }
- return;
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_kill.c b/lib/libc_r/uthread/uthread_kill.c
deleted file mode 100644
index eb2c6b7..0000000
--- a/lib/libc_r/uthread/uthread_kill.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <signal.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_kill(pthread_t pthread, int sig)
-{
- int rval = 0;
- int status;
- pthread_t p_pthread;
-
- /* Check for invalid signal numbers: */
- if (sig < 0 || sig >= NSIG)
- /* Invalid signal: */
- rval = EINVAL;
- else {
- /* Assume that the search will succeed: */
- rval = 0;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Search for the thread: */
- p_pthread = _thread_link_list;
- while (p_pthread != NULL && p_pthread != pthread) {
- p_pthread = p_pthread->nxt;
- }
-
- /* Check if the thread was not found: */
- if (p_pthread == NULL)
- /* Can't find the thread: */
- rval = ESRCH;
- else
- /* Increment the pending signal count: */
- p_pthread->sigpend[sig] += 1;
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_listen.c b/lib/libc_r/uthread/uthread_listen.c
deleted file mode 100644
index 453f25e..0000000
--- a/lib/libc_r/uthread/uthread_listen.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-listen(int fd, int backlog)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_listen(fd, backlog);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_longjmp.c b/lib/libc_r/uthread/uthread_longjmp.c
deleted file mode 100644
index 435f3cf..0000000
--- a/lib/libc_r/uthread/uthread_longjmp.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/* ### This function needs to do something special with signals? ### */
-void
-longjmp(jmp_buf env, int val)
-{
- _thread_sys_longjmp(env, val);
- abort();
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_mattr_init.c b/lib/libc_r/uthread/uthread_mattr_init.c
deleted file mode 100644
index 73226a6..0000000
--- a/lib/libc_r/uthread/uthread_mattr_init.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1996 Jeffrey Hsu <hsu@freebsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_mutexattr_init(pthread_mutexattr_t *attr)
-{
- int ret;
- pthread_mutexattr_t pattr;
-
- if ((pattr = (pthread_mutexattr_t)
- malloc(sizeof(struct pthread_mutex_attr))) == NULL) {
- ret = ENOMEM;
- } else {
- memcpy(pattr, &pthread_mutexattr_default,
- sizeof(struct pthread_mutex_attr));
- *attr = pattr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_mattr_kind_np.c b/lib/libc_r/uthread/uthread_mattr_kind_np.c
deleted file mode 100644
index 3eeabff..0000000
--- a/lib/libc_r/uthread/uthread_mattr_kind_np.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1996 Jeffrey Hsu <hsu@freebsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- (*attr)->m_type = kind;
- ret = 0;
- }
- return(ret);
-}
-
-int
-pthread_mutexattr_getkind_np(pthread_mutexattr_t attr)
-{
- int ret;
- if (attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- ret = attr->m_type;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_multi_np.c b/lib/libc_r/uthread/uthread_multi_np.c
deleted file mode 100644
index 64f360f..0000000
--- a/lib/libc_r/uthread/uthread_multi_np.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_multi_np()
-{
- /* Return to multi-threaded scheduling mode: */
- _thread_single = NULL;
- return(0);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_mutex.c b/lib/libc_r/uthread/uthread_mutex.c
deleted file mode 100644
index e6be6de..0000000
--- a/lib/libc_r/uthread/uthread_mutex.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_mutex_init(pthread_mutex_t * mutex,
- const pthread_mutexattr_t * mutex_attr)
-{
- enum pthread_mutextype type;
- pthread_mutex_t pmutex;
- int ret = 0;
- int status;
-
- if (mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Check if default mutex attributes: */
- if (mutex_attr == NULL || *mutex_attr == NULL) {
- /* Default to a fast mutex: */
- type = MUTEX_TYPE_FAST;
- } else if ((*mutex_attr)->m_type >= MUTEX_TYPE_MAX) {
- /* Return an invalid argument error: */
- ret = EINVAL;
- } else {
- /* Use the requested mutex type: */
- type = (*mutex_attr)->m_type;
- }
-
- /* Check no errors so far: */
- if (ret == 0) {
- if ((pmutex = (pthread_mutex_t) malloc(sizeof(struct pthread_mutex))) == NULL) {
- ret = ENOMEM;
- } else {
- /* Reset the mutex flags: */
- pmutex->m_flags = 0;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch (type) {
- /* Fast mutex: */
- case MUTEX_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Reset the mutex count: */
- pmutex->m_data.m_count = 0;
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
- if (ret == 0) {
- /* Initialise the rest of the mutex: */
- _thread_queue_init(&pmutex->m_queue);
- pmutex->m_flags |= MUTEX_FLAGS_INITED;
- pmutex->m_owner = NULL;
- pmutex->m_type = type;
- *mutex = pmutex;
- } else {
- free(pmutex);
- *mutex = NULL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
- }
- }
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_destroy(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutex: */
- case MUTEX_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Reset the mutex count: */
- (*mutex)->m_data.m_count = 0;
- break;
-
- /* Trap undefined mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Clean up the mutex in case that others want to use it: */
- _thread_queue_init(&(*mutex)->m_queue);
- (*mutex)->m_owner = NULL;
- (*mutex)->m_flags = 0;
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_trylock(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutex: */
- case MUTEX_TYPE_FAST:
- /* Check if this mutex is not locked: */
- if ((*mutex)->m_owner == NULL) {
- /* Lock the mutex for the running thread: */
- (*mutex)->m_owner = _thread_run;
- } else {
- /* Return a busy error: */
- ret = EBUSY;
- }
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Check if this mutex is locked: */
- if ((*mutex)->m_owner != NULL) {
- /*
- * Check if the mutex is locked by the running
- * thread:
- */
- if ((*mutex)->m_owner == _thread_run) {
- /* Increment the lock count: */
- (*mutex)->m_data.m_count++;
- } else {
- /* Return a busy error: */
- ret = EBUSY;
- }
- } else {
- /* Lock the mutex for the running thread: */
- (*mutex)->m_owner = _thread_run;
- }
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_lock(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutexes do not check for any error conditions: */
- case MUTEX_TYPE_FAST:
- /*
- * Enter a loop to wait for the mutex to be locked by the
- * current thread:
- */
- while ((*mutex)->m_owner != _thread_run) {
- /* Check if the mutex is not locked: */
- if ((*mutex)->m_owner == NULL) {
- /* Lock the mutex for this thread: */
- (*mutex)->m_owner = _thread_run;
- } else {
- /*
- * Join the queue of threads waiting to lock
- * the mutex:
- */
- _thread_queue_enq(&(*mutex)->m_queue, _thread_run);
-
- /* Block signals: */
- _thread_kern_sched_state(PS_MUTEX_WAIT, __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
- }
- }
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /*
- * Enter a loop to wait for the mutex to be locked by the
- * current thread:
- */
- while ((*mutex)->m_owner != _thread_run) {
- /* Check if the mutex is not locked: */
- if ((*mutex)->m_owner == NULL) {
- /* Lock the mutex for this thread: */
- (*mutex)->m_owner = _thread_run;
-
- /* Reset the lock count for this mutex: */
- (*mutex)->m_data.m_count = 0;
- } else {
- /*
- * Join the queue of threads waiting to lock
- * the mutex:
- */
- _thread_queue_enq(&(*mutex)->m_queue, _thread_run);
-
- /* Block signals: */
- _thread_kern_sched_state(PS_MUTEX_WAIT, __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
- }
- }
-
- /* Increment the lock count for this mutex: */
- (*mutex)->m_data.m_count++;
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_unlock(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutexes do not check for any error conditions: */
- case MUTEX_TYPE_FAST:
- /* Check if the running thread is not the owner of the mutex: */
- if ((*mutex)->m_owner != _thread_run) {
- /* Return an invalid argument error: */
- ret = EINVAL;
- }
- /*
- * Get the next thread from the queue of threads waiting on
- * the mutex:
- */
- else if (((*mutex)->m_owner = _thread_queue_deq(&(*mutex)->m_queue)) != NULL) {
- /* Allow the new owner of the mutex to run: */
- PTHREAD_NEW_STATE((*mutex)->m_owner,PS_RUNNING);
- }
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Check if the running thread is not the owner of the mutex: */
- if ((*mutex)->m_owner != _thread_run) {
- /* Return an invalid argument error: */
- ret = EINVAL;
- }
- /* Check if there are still counts: */
- else if ((*mutex)->m_data.m_count) {
- /* Decrement the count: */
- (*mutex)->m_data.m_count--;
- }
- /*
- * Get the next thread from the queue of threads waiting on
- * the mutex:
- */
- else if (((*mutex)->m_owner = _thread_queue_deq(&(*mutex)->m_queue)) != NULL) {
- /* Allow the new owner of the mutex to run: */
- PTHREAD_NEW_STATE((*mutex)->m_owner,PS_RUNNING);
- }
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_mutexattr_destroy.c b/lib/libc_r/uthread/uthread_mutexattr_destroy.c
deleted file mode 100644
index 5642cbe..0000000
--- a/lib/libc_r/uthread/uthread_mutexattr_destroy.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- ret = EINVAL;
- } else {
- free(*attr);
- *attr = NULL;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_nanosleep.c b/lib/libc_r/uthread/uthread_nanosleep.c
deleted file mode 100644
index 39c7dad..0000000
--- a/lib/libc_r/uthread/uthread_nanosleep.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdio.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-nanosleep(const struct timespec * time_to_sleep,
- struct timespec * time_remaining)
-{
- int ret = 0;
- struct timespec current_time;
- struct timespec current_time1;
- struct timespec remaining_time;
- struct timeval tv;
-
- /* Check if the time to sleep is legal: */
- if (time_to_sleep == NULL || time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) {
- /* Return an EINVAL error : */
- errno = EINVAL;
- ret = -1;
- } else {
- /* Get the current time: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &current_time);
-
- /* Calculate the time for the current thread to wake up: */
- _thread_run->wakeup_time.tv_sec = current_time.tv_sec + time_to_sleep->tv_sec;
- _thread_run->wakeup_time.tv_nsec = current_time.tv_nsec + time_to_sleep->tv_nsec;
-
- /* Check if the nanosecond field has overflowed: */
- if (_thread_run->wakeup_time.tv_nsec >= 1000000000) {
- /* Wrap the nanosecond field: */
- _thread_run->wakeup_time.tv_sec += 1;
- _thread_run->wakeup_time.tv_nsec -= 1000000000;
- }
-
- /* Reschedule the current thread to sleep: */
- _thread_kern_sched_state(PS_SLEEP_WAIT, __FILE__, __LINE__);
-
- /* Get the current time: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &current_time1);
-
- /* Calculate the remaining time to sleep: */
- remaining_time.tv_sec = time_to_sleep->tv_sec + current_time.tv_sec - current_time1.tv_sec;
- remaining_time.tv_nsec = time_to_sleep->tv_nsec + current_time.tv_nsec - current_time1.tv_nsec;
-
- /* Check if the nanosecond field has underflowed: */
- if (remaining_time.tv_nsec < 0) {
- /* Handle the underflow: */
- remaining_time.tv_sec -= 1;
- remaining_time.tv_nsec += 1000000000;
- }
-
- /* Check if the nanosecond field has overflowed: */
- if (remaining_time.tv_nsec >= 1000000000) {
- /* Handle the overflow: */
- remaining_time.tv_sec += 1;
- remaining_time.tv_nsec -= 1000000000;
- }
-
- /* Check if the sleep was longer than the required time: */
- if (remaining_time.tv_sec < 0) {
- /* Reset the time left: */
- remaining_time.tv_sec = 0;
- remaining_time.tv_nsec = 0;
- }
-
- /* Check if the time remaining is to be returned: */
- if (time_remaining != NULL) {
- /* Return the actual time slept: */
- time_remaining->tv_sec = remaining_time.tv_sec;
- time_remaining->tv_nsec = remaining_time.tv_nsec;
- }
-
- /* Check if the entire sleep was not completed: */
- if (remaining_time.tv_nsec != 0 || remaining_time.tv_sec != 0) {
- /* Return an EINTR error : */
- errno = EINTR;
- ret = -1;
- }
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_once.c b/lib/libc_r/uthread/uthread_once.c
deleted file mode 100644
index c55ba9e..0000000
--- a/lib/libc_r/uthread/uthread_once.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_once(pthread_once_t * once_control, void (*init_routine) (void))
-{
- if (once_control->state == PTHREAD_NEEDS_INIT) {
- pthread_mutex_lock(&(once_control->mutex));
- if (once_control->state == PTHREAD_NEEDS_INIT) {
- init_routine();
- once_control->state = PTHREAD_DONE_INIT;
- }
- pthread_mutex_unlock(&(once_control->mutex));
- }
- return (0);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_open.c b/lib/libc_r/uthread/uthread_open.c
deleted file mode 100644
index ef7a504..0000000
--- a/lib/libc_r/uthread/uthread_open.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <stdarg.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-open(const char *path, int flags,...)
-{
- int fd;
- int mode = 0;
- int status;
- va_list ap;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Check if the file is being created: */
- if (flags & O_CREAT) {
- /* Get the creation mode: */
- va_start(ap, flags);
- mode = va_arg(ap, int);
- va_end(ap);
- }
- /* Open the file: */
- if ((fd = _thread_sys_open(path, flags, mode)) < 0) {
- }
- /* Initialise the file descriptor table entry: */
- else if (_thread_fd_table_init(fd) != 0) {
- /* Quietly close the file: */
- _thread_sys_close(fd);
-
- /* Reset the file descriptor: */
- fd = -1;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the file descriptor or -1 on error: */
- return (fd);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_pipe.c b/lib/libc_r/uthread/uthread_pipe.c
deleted file mode 100644
index 5bac6b3..0000000
--- a/lib/libc_r/uthread/uthread_pipe.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pipe(int fds[2])
-{
- int ret;
- if ((ret = _thread_sys_pipe(fds)) >= 0) {
- if (_thread_fd_table_init(fds[0]) != 0 ||
- _thread_fd_table_init(fds[1]) != 0) {
- _thread_sys_close(fds[0]);
- _thread_sys_close(fds[1]);
- ret = -1;
- }
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_queue.c b/lib/libc_r/uthread/uthread_queue.c
deleted file mode 100644
index 5225ab8..0000000
--- a/lib/libc_r/uthread/uthread_queue.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdio.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-_thread_queue_init(struct pthread_queue * queue)
-{
- /* Initialise the pointers in the queue structure: */
- queue->q_next = NULL;
- queue->q_last = NULL;
- queue->q_data = NULL;
- return;
-}
-
-void
-_thread_queue_enq(struct pthread_queue * queue, struct pthread * thread)
-{
- if (queue->q_last) {
- queue->q_last->qnxt = thread;
- } else {
- queue->q_next = thread;
- }
- queue->q_last = thread;
- thread->queue = queue;
- thread->qnxt = NULL;
- return;
-}
-
-struct pthread *
-_thread_queue_get(struct pthread_queue * queue)
-{
- /* Return the pointer to the next thread in the queue: */
- return (queue->q_next);
-}
-
-struct pthread *
-_thread_queue_deq(struct pthread_queue * queue)
-{
- struct pthread *thread = NULL;
-
- if (queue->q_next) {
- thread = queue->q_next;
- if (!(queue->q_next = queue->q_next->qnxt)) {
- queue->q_last = NULL;
- }
- thread->queue = NULL;
- thread->qnxt = NULL;
- }
- return (thread);
-}
-
-int
-_thread_queue_remove(struct pthread_queue * queue, struct pthread * thread)
-{
- struct pthread **current = &(queue->q_next);
- struct pthread *prev = NULL;
- int ret = -1;
-
- while (*current) {
- if (*current == thread) {
- if ((*current)->qnxt) {
- *current = (*current)->qnxt;
- } else {
- queue->q_last = prev;
- *current = NULL;
- }
- ret = 0;
- break;
- }
- prev = *current;
- current = &((*current)->qnxt);
- }
- thread->queue = NULL;
- thread->qnxt = NULL;
- return (ret);
-}
-
-int
-pthread_llist_remove(struct pthread ** llist, struct pthread * thread)
-{
- while (*llist) {
- if (*llist == thread) {
- *llist = thread->qnxt;
- return (0);
- }
- llist = &(*llist)->qnxt;
- }
- return (-1);
-}
-
-#endif
diff --git a/lib/libc_r/uthread/uthread_read.c b/lib/libc_r/uthread/uthread_read.c
deleted file mode 100644
index 242014e..0000000
--- a/lib/libc_r/uthread/uthread_read.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-read(int fd, void *buf, size_t nbytes)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read: */
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking read syscall: */
- while ((ret = _thread_sys_read(fd, buf, nbytes)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDR_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_READ);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_readv.c b/lib/libc_r/uthread/uthread_readv.c
deleted file mode 100644
index 3ea065e..0000000
--- a/lib/libc_r/uthread/uthread_readv.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-readv(int fd, const struct iovec * iov, int iovcnt)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read: */
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking readv syscall: */
- while ((ret = _thread_sys_readv(fd, iov, iovcnt)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDR_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_READ);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_recvfrom.c b/lib/libc_r/uthread/uthread_recvfrom.c
deleted file mode 100644
index a3d6a7d..0000000
--- a/lib/libc_r/uthread/uthread_recvfrom.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr * from, int *from_len)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL, __FILE__, __LINE__)) == 0) {
- while ((ret = _thread_sys_recvfrom(fd, buf, len, flags, from, from_len)) < 0) {
- if (!(_thread_fd_table[fd]->flags & O_NONBLOCK) && ((errno == EWOULDBLOCK) || (errno == EAGAIN))) {
- _thread_run->data.fd.fd = fd;
-
- /* Set the timeout: */
- _thread_kern_set_timeout(NULL);
- _thread_kern_sched_state(PS_FDR_WAIT, __FILE__, __LINE__);
-
- /* Check if the wait was interrupted: */
- if (errno == EINTR) {
- /* Return an error status: */
- ret = -1;
- break;
- }
- } else {
- ret = -1;
- break;
- }
- }
- _thread_fd_unlock(fd, FD_READ);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_resume.c b/lib/libc_r/uthread/uthread_resume.c
deleted file mode 100644
index e69de29..0000000
--- a/lib/libc_r/uthread/uthread_resume.c
+++ /dev/null
diff --git a/lib/libc_r/uthread/uthread_resume_np.c b/lib/libc_r/uthread/uthread_resume_np.c
deleted file mode 100644
index 934df58..0000000
--- a/lib/libc_r/uthread/uthread_resume_np.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_resume_np(pthread_t thread)
-{
- int ret = -1;
- pthread_t pthread;
- /*
- * Search for the thread in the linked list.
- */
- for (pthread = _thread_link_list; pthread != NULL && ret == -1; pthread = pthread->nxt) {
- /* Is this the thread? */
- if (pthread == thread) {
- /* Found the thread. Is it suspended? */
- if (pthread->state == PS_SUSPENDED) {
- /* Allow the thread to run. */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- ret = 0;
- } else if (pthread->state == PS_RUNNING) {
- /* Thread is already running. */
- ret = 0;
- } else {
- /* Thread is in some other state. */
- errno = EINVAL;
- }
- }
- }
- /* Check if thread was not found. */
- if (ret == -1) {
- /* No such thread */
- errno = ESRCH;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_select.c b/lib/libc_r/uthread/uthread_select.c
deleted file mode 100644
index 7db3ed2..0000000
--- a/lib/libc_r/uthread/uthread_select.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-select(int numfds, fd_set * readfds, fd_set * writefds,
- fd_set * exceptfds, struct timeval * timeout)
-{
- fd_set read_locks, write_locks, rdwr_locks;
- struct timespec ts;
- struct timeval zero_timeout = {0, 0};
- int i, ret = 0, got_all_locks = 1;
- struct pthread_select_data data;
-
- if (numfds > _thread_dtablesize) {
- numfds = _thread_dtablesize;
- }
- /* Check if a timeout was specified: */
- if (timeout) {
- /* Convert the timeval to a timespec: */
- TIMEVAL_TO_TIMESPEC(timeout, &ts);
-
- /* Set the wake up time: */
- _thread_kern_set_timeout(&ts);
- } else {
- /* Wait for ever: */
- _thread_kern_set_timeout(NULL);
- }
-
- FD_ZERO(&read_locks);
- FD_ZERO(&write_locks);
- FD_ZERO(&rdwr_locks);
-
- /* lock readfds */
- if (readfds || writefds || exceptfds) {
- for (i = 0; i < numfds; i++) {
- if ((readfds && (FD_ISSET(i, readfds))) || (exceptfds && FD_ISSET(i, exceptfds))) {
- if (writefds && FD_ISSET(i, writefds)) {
- if ((ret = _thread_fd_lock(i, FD_RDWR, NULL, __FILE__, __LINE__)) != 0) {
- got_all_locks = 0;
- break;
- }
- FD_SET(i, &rdwr_locks);
- } else {
- if ((ret = _thread_fd_lock(i, FD_READ, NULL, __FILE__, __LINE__)) != 0) {
- got_all_locks = 0;
- break;
- }
- FD_SET(i, &read_locks);
- }
- } else {
- if (writefds && FD_ISSET(i, writefds)) {
- if ((ret = _thread_fd_lock(i, FD_WRITE, NULL, __FILE__, __LINE__)) != 0) {
- got_all_locks = 0;
- break;
- }
- FD_SET(i, &write_locks);
- }
- }
- }
- }
- if (got_all_locks) {
- data.nfds = numfds;
- FD_ZERO(&data.readfds);
- FD_ZERO(&data.writefds);
- FD_ZERO(&data.exceptfds);
- if (readfds != NULL) {
- memcpy(&data.readfds, readfds, sizeof(data.readfds));
- }
- if (writefds != NULL) {
- memcpy(&data.writefds, writefds, sizeof(data.writefds));
- }
- if (exceptfds != NULL) {
- memcpy(&data.exceptfds, exceptfds, sizeof(data.exceptfds));
- }
- if ((ret = _thread_sys_select(data.nfds, &data.readfds, &data.writefds, &data.exceptfds, &zero_timeout)) == 0) {
- data.nfds = numfds;
- FD_ZERO(&data.readfds);
- FD_ZERO(&data.writefds);
- FD_ZERO(&data.exceptfds);
- if (readfds != NULL) {
- memcpy(&data.readfds, readfds, sizeof(data.readfds));
- }
- if (writefds != NULL) {
- memcpy(&data.writefds, writefds, sizeof(data.writefds));
- }
- if (exceptfds != NULL) {
- memcpy(&data.exceptfds, exceptfds, sizeof(data.exceptfds));
- }
- _thread_run->data.select_data = &data;
- _thread_kern_sched_state(PS_SELECT_WAIT, __FILE__, __LINE__);
- ret = data.nfds;
- }
- }
- /* clean up the locks */
- for (i = 0; i < numfds; i++)
- if (FD_ISSET(i, &read_locks))
- _thread_fd_unlock(i, FD_READ);
- for (i = 0; i < numfds; i++)
- if (FD_ISSET(i, &rdwr_locks))
- _thread_fd_unlock(i, FD_RDWR);
- for (i = 0; i < numfds; i++)
- if (FD_ISSET(i, &write_locks))
- _thread_fd_unlock(i, FD_WRITE);
-
- if (ret > 0) {
- if (readfds != NULL) {
- for (i = 0; i < numfds; i++) {
- if (FD_ISSET(i, readfds) &&
- !FD_ISSET(i, &data.readfds)) {
- FD_CLR(i, readfds);
- }
- }
- }
- if (writefds != NULL) {
- for (i = 0; i < numfds; i++) {
- if (FD_ISSET(i, writefds) &&
- !FD_ISSET(i, &data.writefds)) {
- FD_CLR(i, writefds);
- }
- }
- }
- if (exceptfds != NULL) {
- for (i = 0; i < numfds; i++) {
- if (FD_ISSET(i, exceptfds) &&
- !FD_ISSET(i, &data.exceptfds)) {
- FD_CLR(i, exceptfds);
- }
- }
- }
- }
-
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_self.c b/lib/libc_r/uthread/uthread_self.c
deleted file mode 100644
index a0a2d2a..0000000
--- a/lib/libc_r/uthread/uthread_self.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-pthread_t
-pthread_self(void)
-{
- /* Return the running thread pointer: */
- return (_thread_run);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_sendto.c b/lib/libc_r/uthread/uthread_sendto.c
deleted file mode 100644
index c7155c8..0000000
--- a/lib/libc_r/uthread/uthread_sendto.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-sendto(int fd, const void *msg, size_t len, int flags, const struct sockaddr * to, int to_len)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_WRITE, NULL, __FILE__, __LINE__)) == 0) {
- while ((ret = _thread_sys_sendto(fd, msg, len, flags, to, to_len)) < 0) {
- if (!(_thread_fd_table[fd]->flags & O_NONBLOCK) && ((errno == EWOULDBLOCK) || (errno == EAGAIN))) {
- _thread_run->data.fd.fd = fd;
-
- /* Set the timeout: */
- _thread_kern_set_timeout(NULL);
- _thread_kern_sched_state(PS_FDW_WAIT, __FILE__, __LINE__);
- } else {
- ret = -1;
- break;
- }
- }
- _thread_fd_unlock(fd, FD_WRITE);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_seterrno.c b/lib/libc_r/uthread/uthread_seterrno.c
deleted file mode 100644
index c4fe08b6..0000000
--- a/lib/libc_r/uthread/uthread_seterrno.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/*
- * This function needs to reference the global error variable which is
- * normally hidden from the user.
- */
-#ifdef errno
-#undef errno;
-#endif
-extern int errno;
-
-void
-_thread_seterrno(pthread_t thread, int error)
-{
- /* Check for the initial thread: */
- if (thread == _thread_initial) {
- /* The initial thread always uses the global error variable: */
- errno = error;
- } else {
- /*
- * Threads other than the initial thread always use the error
- * field in the thread structureL
- */
- thread->error = error;
- }
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_setjmp.c b/lib/libc_r/uthread/uthread_setjmp.c
deleted file mode 100644
index 7820466..0000000
--- a/lib/libc_r/uthread/uthread_setjmp.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/* ### This function needs to do something special with signals? ### */
-int
-setjmp(jmp_buf env)
-{
- return (_thread_sys_setjmp(env));
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_setprio.c b/lib/libc_r/uthread/uthread_setprio.c
deleted file mode 100644
index 4b49ed0..0000000
--- a/lib/libc_r/uthread/uthread_setprio.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_setprio(pthread_t pthread, int prio)
-{
- int rval = 0;
- int status;
- pthread_t pthread_p;
-
- /* Check if the priority is invalid: */
- if (prio < PTHREAD_MIN_PRIORITY || prio > PTHREAD_MAX_PRIORITY) {
- /* Return an invalid argument error: */
- errno = EINVAL;
- rval = -1;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the first thread in the list: */
- pthread_p = _thread_link_list;
-
- /* Enter a loop to search for the thread: */
- while (pthread_p != NULL && pthread_p != pthread) {
- /* Point to the next thread: */
- pthread_p = pthread_p->nxt;
- }
-
- /* Check if the thread pointer is NULL: */
- if (pthread == NULL || pthread_p == NULL) {
- /* Return a 'search' error: */
- errno = ESRCH;
- rval = -1;
- } else {
- /* Set the thread priority: */
- pthread->pthread_priority = prio;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the error status: */
- return (rval);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_setsockopt.c b/lib/libc_r/uthread/uthread_setsockopt.c
deleted file mode 100644
index be004a3..0000000
--- a/lib/libc_r/uthread/uthread_setsockopt.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-setsockopt(int fd, int level, int optname, const void *optval, int optlen)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_setsockopt(fd, level, optname, optval, optlen);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return ret;
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_shutdown.c b/lib/libc_r/uthread/uthread_shutdown.c
deleted file mode 100644
index 5e06910..0000000
--- a/lib/libc_r/uthread/uthread_shutdown.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-shutdown(int fd, int how)
-{
- int ret;
-
- switch (how) {
- case 0:
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_shutdown(fd, how);
- _thread_fd_unlock(fd, FD_READ);
- }
- break;
- case 1:
- if ((ret = _thread_fd_lock(fd, FD_WRITE, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_shutdown(fd, how);
- _thread_fd_unlock(fd, FD_WRITE);
- }
- break;
- case 2:
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_shutdown(fd, how);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- break;
- default:
- errno = EBADF;
- ret = -1;
- break;
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_sig.c b/lib/libc_r/uthread/uthread_sig.c
deleted file mode 100644
index e73d5a2..0000000
--- a/lib/libc_r/uthread/uthread_sig.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-_thread_sig_handler(int sig, int code, struct sigcontext * scp)
-{
- char c;
- int i;
- pthread_t pthread;
-
- /*
- * Check if the pthread kernel has unblocked signals (or is about to)
- * and was on its way into a _thread_sys_select when the current
- * signal interrupted it:
- */
- if (_thread_kern_in_select) {
- /* Cast the signal number to a character variable: */
- c = sig;
-
- /*
- * Write the signal number to the kernel pipe so that it will
- * be ready to read when this signal handler returns. This
- * means that the _thread_sys_select call will complete
- * immediately.
- */
- if (_thread_sys_write(_thread_kern_pipe[1], &c, 1) != 1) {
- }
- }
- /* Check if the signal requires a dump of thread information: */
- if (sig == SIGINFO) {
- /* Dump thread information to file: */
- _thread_dump_info();
- } else {
- /* Handle depending on signal type: */
- switch (sig) {
- /* Interval timer used for timeslicing: */
- case SIGVTALRM:
- /*
- * Don't add the signal to any thread. Just want to
- * call the scheduler:
- */
- break;
-
- /* Child termination: */
- case SIGCHLD:
- /*
- * Enter a loop to process each thread in the linked
- * list:
- */
- for (pthread = _thread_link_list; pthread != NULL;
- pthread = pthread->nxt) {
- /*
- * Add the signal to the set of pending
- * signals:
- */
- pthread->sigpend[sig] += 1;
- if (pthread->state == PS_WAIT_WAIT) {
- /* Reset the error: */
- /* There should be another flag so that this is not required! ### */
- _thread_seterrno(pthread, 0);
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- }
-
- /*
- * Go through the file list and set all files
- * to non-blocking again in case the child
- * set some of them to block. Sigh.
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Check if this file is used: */
- if (_thread_fd_table[i] != NULL) {
- /* Set the file descriptor to non-blocking: */
- _thread_sys_fcntl(i, F_SETFL, _thread_fd_table[i]->flags | O_NONBLOCK);
- }
- }
- break;
-
- /* Signals specific to the running thread: */
- case SIGBUS:
- case SIGEMT:
- case SIGFPE:
- case SIGILL:
- case SIGPIPE:
- case SIGSEGV:
- case SIGSYS:
- /* Add the signal to the set of pending signals: */
- _thread_run->sigpend[sig] += 1;
- break;
-
- /* Signals to send to all threads: */
- default:
- /*
- * Enter a loop to process each thread in the linked
- * list:
- */
- for (pthread = _thread_link_list; pthread != NULL;
- pthread = pthread->nxt) {
- /*
- * Add the signal to the set of pending
- * signals:
- */
- pthread->sigpend[sig] += 1;
- }
- break;
- }
-
- /* Check if the kernel is not locked: */
- if (_thread_run != &_thread_kern_thread) {
- /*
- * Schedule the next thread. This function is not
- * expected to return because it will do a longjmp
- * instead.
- */
- _thread_kern_sched(scp);
-
- /*
- * This point should not be reached, so abort the
- * process:
- */
- PANIC("Returned to signal function from scheduler");
- }
- }
-
- /* Returns nothing. */
- return;
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_sigaction.c b/lib/libc_r/uthread/uthread_sigaction.c
deleted file mode 100644
index dd08405..0000000
--- a/lib/libc_r/uthread/uthread_sigaction.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
-{
- int ret = 0;
- int status;
-
- /* Check if the signal number is out of range: */
- if (sig < 1 || sig > NSIG) {
- /* Return an invalid argument: */
- errno = EINVAL;
- ret = -1;
- } else {
- /*
- * Check if the existing signal action structure contents are
- * to be returned:
- */
- if (oact != NULL) {
- /* Return the existing signal action contents: */
- oact->sa_handler = _thread_run->act[sig - 1].sa_handler;
- oact->sa_mask = _thread_run->act[sig - 1].sa_mask;
- oact->sa_flags = _thread_run->act[sig - 1].sa_flags;
- }
- /* Check if a signal action was supplied: */
- if (act != NULL) {
- /* Block signals while the signal handler is changed: */
- _thread_kern_sig_block(&status);
-
- /* Set the new signal handler: */
- _thread_run->act[sig - 1].sa_handler = act->sa_handler;
- _thread_run->act[sig - 1].sa_mask = act->sa_mask;
- _thread_run->act[sig - 1].sa_flags = act->sa_flags;
-
- /*
- * Unblock signals to allow the new signal handler to
- * take effect:
- */
- _thread_kern_sig_unblock(status);
- }
- }
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_sigblock.c b/lib/libc_r/uthread/uthread_sigblock.c
deleted file mode 100644
index bca32e1..0000000
--- a/lib/libc_r/uthread/uthread_sigblock.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-_thread_sys_sigblock(int mask)
-{
- int omask, n;
-
- n = _thread_sys_sigprocmask(SIG_BLOCK, (sigset_t *) & mask, (sigset_t *) & omask);
- if (n)
- return (n);
- return (omask);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_sigmask.c b/lib/libc_r/uthread/uthread_sigmask.c
deleted file mode 100644
index 94f64cb..0000000
--- a/lib/libc_r/uthread/uthread_sigmask.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <signal.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
-{
- int ret = 0;
- int status;
-
- /* Check if the existing signal process mask is to be returned: */
- if (oset != NULL) {
- /* Return the current mask: */
- *oset = _thread_run->sigmask;
- }
- /* Check if a new signal set was provided by the caller: */
- if (set != NULL) {
- /* Block signals while the signal mask is changed: */
- _thread_kern_sig_block(&status);
-
- /* Process according to what to do: */
- switch (how) {
- /* Block signals: */
- case SIG_BLOCK:
- /* Add signals to the existing mask: */
- _thread_run->sigmask |= *set;
- break;
-
- /* Unblock signals: */
- case SIG_UNBLOCK:
- /* Clear signals from the existing mask: */
- _thread_run->sigmask &= ~(*set);
- break;
-
- /* Set the signal process mask: */
- case SIG_SETMASK:
- /* Set the new mask: */
- _thread_run->sigmask = *set;
- break;
-
- /* Trap invalid actions: */
- default:
- /* Return an invalid argument: */
- errno = EINVAL;
- ret = -1;
- break;
- }
-
- /*
- * Schedule the next thread in case there are signals that
- * now need to be acted on:
- */
- _thread_kern_sched(NULL);
- }
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_signal.c b/lib/libc_r/uthread/uthread_signal.c
deleted file mode 100644
index cef725f..0000000
--- a/lib/libc_r/uthread/uthread_signal.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-sig_t
-_thread_sys_signal(int s, sig_t a)
-{
- struct sigaction sa;
- struct sigaction osa;
-
- /* Initialise the signal action structure: */
- sigemptyset(&sa.sa_mask);
- sa.sa_handler = a;
- sa.sa_flags = SA_RESTART;
-
- /* Perform the sigaction syscall: */
- if (_thread_sys_sigaction(s, &sa, &osa) < 0) {
- /* Return an error: */
- return (SIG_ERR);
- }
- /* Return a pointer to the old signal handler: */
- return (osa.sa_handler);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_sigprocmask.c b/lib/libc_r/uthread/uthread_sigprocmask.c
deleted file mode 100644
index b4a8d84..0000000
--- a/lib/libc_r/uthread/uthread_sigprocmask.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigprocmask(int how, const sigset_t * set, sigset_t * oset)
-{
- int ret = 0;
- int status;
-
- /* Check if the existing signal process mask is to be returned: */
- if (oset != NULL) {
- /* Return the current mask: */
- *oset = _thread_run->sigmask;
- }
- /* Check if a new signal set was provided by the caller: */
- if (set != NULL) {
- /* Block signals while the signal mask is changed: */
- _thread_kern_sig_block(&status);
-
- /* Process according to what to do: */
- switch (how) {
- /* Block signals: */
- case SIG_BLOCK:
- /* Add signals to the existing mask: */
- _thread_run->sigmask |= *set;
- break;
-
- /* Unblock signals: */
- case SIG_UNBLOCK:
- /* Clear signals from the existing mask: */
- _thread_run->sigmask &= ~(*set);
- break;
-
- /* Set the signal process mask: */
- case SIG_SETMASK:
- /* Set the new mask: */
- _thread_run->sigmask = *set;
- break;
-
- /* Trap invalid actions: */
- default:
- /* Return an invalid argument: */
- errno = EINVAL;
- ret = -1;
- break;
- }
-
- /*
- * Schedule the next thread in case there are signals that
- * now need to be acted on:
- */
- _thread_kern_sched(NULL);
- }
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_sigsetmask.c b/lib/libc_r/uthread/uthread_sigsetmask.c
deleted file mode 100644
index 2780670..0000000
--- a/lib/libc_r/uthread/uthread_sigsetmask.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-_thread_sys_sigsetmask(int mask)
-{
- int omask, n;
-
- n = _thread_sys_sigprocmask(SIG_SETMASK, (sigset_t *) & mask, (sigset_t *) & omask);
- if (n)
- return (n);
- return (omask);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_sigsuspend.c b/lib/libc_r/uthread/uthread_sigsuspend.c
deleted file mode 100644
index 14cf74b..0000000
--- a/lib/libc_r/uthread/uthread_sigsuspend.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigsuspend(const sigset_t * set)
-{
- int ret = -1;
- sigset_t oset;
-
- /* Check if a new signal set was provided by the caller: */
- if (set != NULL) {
- /* Save the current sigmal mask: */
- oset = _thread_run->sigmask;
-
- /* Combine the caller's mask with the current one: */
- _thread_run->sigmask |= *set;
-
- /* Wait for a signal: */
- _thread_kern_sched_state(PS_SIGWAIT, __FILE__, __LINE__);
-
- /* Restore the signal mask: */
- _thread_run->sigmask = oset;
- } else {
- /* Return an invalid argument error: */
- errno = EINVAL;
- }
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_sigwait.c b/lib/libc_r/uthread/uthread_sigwait.c
deleted file mode 100644
index 4f95190..0000000
--- a/lib/libc_r/uthread/uthread_sigwait.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigwait(const sigset_t * set, int *sig)
-{
- int ret;
- int status;
- sigset_t oset;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Save the current sigmal mask: */
- oset = _thread_run->sigmask;
-
- /* Combine the caller's mask with the current one: */
- _thread_run->sigmask |= *set;
-
- /* Wait for a signal: */
- _thread_kern_sched_state(PS_SIGWAIT, __FILE__, __LINE__);
-
- /* Block signals again: */
- _thread_kern_sig_block(NULL);
-
- /* Return the signal number to the caller: */
- *sig = _thread_run->signo;
-
- /* Restore the signal mask: */
- _thread_run->sigmask = oset;
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_single_np.c b/lib/libc_r/uthread/uthread_single_np.c
deleted file mode 100644
index e36c856..0000000
--- a/lib/libc_r/uthread/uthread_single_np.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_single_np()
-{
- /* Enter single-threaded (non-POSIX) scheduling mode: */
- _thread_single = _thread_run;
- return(0);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_socket.c b/lib/libc_r/uthread/uthread_socket.c
deleted file mode 100644
index bfc657d..0000000
--- a/lib/libc_r/uthread/uthread_socket.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-socket(int af, int type, int protocol)
-{
- int fd;
-
- /* Create a socket: */
- if ((fd = _thread_sys_socket(af, type, protocol)) < 0) {
- /* Error creating socket. */
-
- /* Initialise the entry in the file descriptor table: */
- } else if (_thread_fd_table_init(fd) != 0) {
- _thread_sys_close(fd);
- fd = -1;
- }
- return (fd);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_socketpair.c b/lib/libc_r/uthread/uthread_socketpair.c
deleted file mode 100644
index 2c8761b..0000000
--- a/lib/libc_r/uthread/uthread_socketpair.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-socketpair(int af, int type, int protocol, int pair[2])
-{
- int ret;
- if (!((ret = _thread_sys_socketpair(af, type, protocol, pair)) < 0))
- if (_thread_fd_table_init(pair[0]) != 0 ||
- _thread_fd_table_init(pair[1]) != 0) {
- _thread_sys_close(pair[0]);
- _thread_sys_close(pair[1]);
- ret = -1;
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_spec.c b/lib/libc_r/uthread/uthread_spec.c
deleted file mode 100644
index 7ff9054..0000000
--- a/lib/libc_r/uthread/uthread_spec.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/* Static variables: */
-static struct pthread_key key_table[PTHREAD_KEYS_MAX];
-
-int
-pthread_key_create(pthread_key_t * key, void (*destructor) (void *))
-{
- for ((*key) = 0; (*key) < PTHREAD_KEYS_MAX; (*key)++) {
- if (key_table[(*key)].count == 0) {
- key_table[(*key)].count++;
- key_table[(*key)].destructor = destructor;
- return (0);
- }
- }
- return (EAGAIN);
-}
-
-int
-pthread_key_delete(pthread_key_t key)
-{
- int ret;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- if (key < PTHREAD_KEYS_MAX) {
- switch (key_table[key].count) {
- case 1:
- key_table[key].destructor = NULL;
- key_table[key].count = 0;
- case 0:
- ret = 0;
- break;
- default:
- ret = EBUSY;
- }
- } else {
- ret = EINVAL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return (ret);
-}
-
-void
-_thread_cleanupspecific(void)
-{
- void *data;
- int key;
- int itr;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- for (itr = 0; itr < PTHREAD_DESTRUCTOR_ITERATIONS; itr++) {
- for (key = 0; key < PTHREAD_KEYS_MAX; key++) {
- if (_thread_run->specific_data_count) {
- if (_thread_run->specific_data[key]) {
- data = (void *) _thread_run->specific_data[key];
- _thread_run->specific_data[key] = NULL;
- _thread_run->specific_data_count--;
- if (key_table[key].destructor) {
- key_table[key].destructor(data);
- }
- key_table[key].count--;
- }
- } else {
- free(_thread_run->specific_data);
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return;
- }
- }
- }
- free(_thread_run->specific_data);
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-}
-
-static inline const void **
-pthread_key_allocate_data(void)
-{
- const void **new_data;
- if ((new_data = (const void **) malloc(sizeof(void *) * PTHREAD_KEYS_MAX)) != NULL) {
- memset((void *) new_data, 0, sizeof(void *) * PTHREAD_KEYS_MAX);
- }
- return (new_data);
-}
-
-int
-pthread_setspecific(pthread_key_t key, const void *value)
-{
- pthread_t pthread;
- int ret = 0;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the running thread: */
- pthread = _thread_run;
-
- /*
- * Enter a loop for signal handler threads to find the parent thread
- * which has the specific data associated with it:
- */
- while (pthread->parent_thread != NULL) {
- /* Point to the parent thread: */
- pthread = pthread->parent_thread;
- }
-
- if ((pthread->specific_data) || (pthread->specific_data = pthread_key_allocate_data())) {
- if ((key < PTHREAD_KEYS_MAX) && (key_table)) {
- if (key_table[key].count) {
- if (pthread->specific_data[key] == NULL) {
- if (value != NULL) {
- pthread->specific_data_count++;
- key_table[key].count++;
- }
- } else {
- if (value == NULL) {
- pthread->specific_data_count--;
- key_table[key].count--;
- }
- }
- pthread->specific_data[key] = value;
- ret = 0;
- } else {
- ret = EINVAL;
- }
- } else {
- ret = EINVAL;
- }
- } else {
- ret = ENOMEM;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return (ret);
-}
-
-void *
-pthread_getspecific(pthread_key_t key)
-{
- pthread_t pthread;
- int status;
- void *data;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the running thread: */
- pthread = _thread_run;
-
- /*
- * Enter a loop for signal handler threads to find the parent thread
- * which has the specific data associated with it:
- */
- while (pthread->parent_thread != NULL) {
- /* Point to the parent thread: */
- pthread = pthread->parent_thread;
- }
-
- /* Check for errors: */
- if (pthread == NULL) {
- /* Return an invalid argument error: */
- data = NULL;
- }
- /* Check if there is specific data: */
- else if (pthread->specific_data != NULL && (key < PTHREAD_KEYS_MAX) && (key_table)) {
- /* Check if this key has been used before: */
- if (key_table[key].count) {
- /* Return the value: */
- data = (void *) pthread->specific_data[key];
- } else {
- /*
- * This key has not been used before, so return NULL
- * instead:
- */
- data = NULL;
- }
- } else {
- /* No specific data has been created, so just return NULL: */
- data = NULL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return (data);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_suspend.c b/lib/libc_r/uthread/uthread_suspend.c
deleted file mode 100644
index e69de29..0000000
--- a/lib/libc_r/uthread/uthread_suspend.c
+++ /dev/null
diff --git a/lib/libc_r/uthread/uthread_suspend_np.c b/lib/libc_r/uthread/uthread_suspend_np.c
deleted file mode 100644
index d065b73..0000000
--- a/lib/libc_r/uthread/uthread_suspend_np.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_suspend_np(pthread_t thread)
-{
- int ret = -1;
- pthread_t pthread;
- /*
- * Search for the thread in the linked list.
- */
- for (pthread = _thread_link_list; pthread != NULL && ret == -1; pthread = pthread->nxt) {
- /* Is this the thread? */
- if (pthread == thread) {
- /* Found the thread. Is it running? */
- if (pthread->state != PS_RUNNING &&
- pthread->state != PS_SUSPENDED) {
- /* The thread operation has been interrupted */
- _thread_seterrno(pthread,EINTR);
- }
- /* Suspend the thread. */
- PTHREAD_NEW_STATE(pthread,PS_SUSPENDED);
- ret = 0;
- }
- }
- /* Check if thread was not found. */
- if (ret == -1) {
- /* No such thread */
- errno = ESRCH;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_wait4.c b/lib/libc_r/uthread/uthread_wait4.c
deleted file mode 100644
index 0a721af4f..0000000
--- a/lib/libc_r/uthread/uthread_wait4.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <sys/wait.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-pid_t
-wait4(pid_t pid, int *istat, int options, struct rusage * rusage)
-{
- int status;
- pid_t ret;
- _thread_kern_sig_block(&status);
-
- /* Perform a non-blocking wait4 syscall: */
- while ((ret = _thread_sys_wait4(pid, istat, options | WNOHANG, rusage)) == 0 && (options & WNOHANG) == 0) {
- /* Schedule the next thread while this one waits: */
- _thread_kern_sched_state(PS_WAIT_WAIT, __FILE__, __LINE__);
-
- /* Check if this call was interrupted by a signal: */
- if (errno == EINTR) {
- ret = -1;
- break;
- }
- _thread_kern_sig_block(NULL);
- }
- _thread_kern_sig_unblock(status);
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_write.c b/lib/libc_r/uthread/uthread_write.c
deleted file mode 100644
index eab105d..0000000
--- a/lib/libc_r/uthread/uthread_write.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-write(int fd, const void *buf, size_t nbytes)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read and write: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking write syscall: */
- while ((ret = _thread_sys_write(fd, buf, nbytes)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDW_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_writev.c b/lib/libc_r/uthread/uthread_writev.c
deleted file mode 100644
index 5ad1ce9..0000000
--- a/lib/libc_r/uthread/uthread_writev.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-writev(int fd, const struct iovec * iov, int iovcnt)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read and write: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking writev syscall: */
- while ((ret = _thread_sys_writev(fd, iov, iovcnt)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDW_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libc_r/uthread/uthread_yield.c b/lib/libc_r/uthread/uthread_yield.c
deleted file mode 100644
index a88a948..0000000
--- a/lib/libc_r/uthread/uthread_yield.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-pthread_yield(void)
-{
- /* Reset the accumulated time slice value for the current thread: */
- _thread_run->slice_usec = -1;
-
- /* Schedule the next thread: */
- _thread_kern_sched(NULL);
-
- /* Nothing to return. */
- return;
-}
-#endif
diff --git a/lib/libcalendar/Makefile b/lib/libcalendar/Makefile
deleted file mode 100644
index 5e2a345..0000000
--- a/lib/libcalendar/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# $Id: Makefile,v 1.1.1.1 1997/12/04 10:41:49 helbig Exp $
-
-LIB= calendar
-
-SRCS= calendar.c easter.c
-
-MAN3= calendar.3
-
-MLINKS= calendar.3 easterg.3 calendar.3 easterog.3 calendar.3 easteroj.3 \
- calendar.3 gdate.3 calendar.3 jdate.3 \
- calendar.3 ndaysg.3 calendar.3 ndaysj.3 \
- calendar.3 week.3 calendar.3 weekday.3
-
-CFLAGS+=-I. -I${.CURDIR} -Wall
-
-beforeinstall:
- ${INSTALL} -C -m 444 -o $(BINOWN) -g $(BINGRP) ${.CURDIR}/calendar.h \
- ${DESTDIR}/usr/include
-
-.include <bsd.lib.mk>
diff --git a/lib/libcalendar/calendar.3 b/lib/libcalendar/calendar.3
deleted file mode 100644
index bbf5ede..0000000
--- a/lib/libcalendar/calendar.3
+++ /dev/null
@@ -1,197 +0,0 @@
-.\" Copyright (c) 1997 Wolfgang Helbig
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id: calendar.3,v 1.2 1997/12/07 19:04:08 helbig Exp $
-.\"
-.Dd November 29, 1997
-.Dt CALENDAR 3
-.Os
-.Sh NAME
-.Nm easterg ,
-.Nm easterog ,
-.Nm easteroj ,
-.Nm gdate ,
-.Nm jdate ,
-.Nm ndaysg ,
-.Nm ndaysj ,
-.Nm week ,
-.Nm weekday
-.Nd Calendar arithmetic for the Christian era.
-.Sh SYNOPSIS
-.Fd #include <calendar.h>
-.Ft struct date *
-.Fn easterg "int year" "struct date *dt"
-.Ft struct date *
-.Fn easterog "int year" "struct date *dt"
-.Ft struct date *
-.Fn easteroj "int year" "struct date *dt"
-.Ft struct date *
-.Fn gdate "int nd" "struct date *dt"
-.Ft struct date *
-.Fn jdate "int nd" "struct date *dt"
-.Ft int
-.Fn ndaysg "struct date *dt"
-.Ft int
-.Fn ndaysj "struct date *dt"
-.Ft int
-.Fn week "int nd" "int *year"
-.Ft int
-.Fn weekday "int nd"
-.Sh DESCRIPTION
-These functions provide calendar arithmetic for a large range of years,
-starting at March 1st, year zero (i. e. 1 B.C.) and ending way beyond
-year 100000.
-.Pp
-Programs should be linked with
-.Fl lcalendar .
-.Pp
-The functions
-.Fn easterg ,
-.Fn easterog
-and
-.Fn easteroj
-store the date of Easter Sunday into the structure pointed at by
-.Fa dt
-and return a pointer to this structure.
-The function
-.Fn easterg
-assumes Gregorian Calendar (adopted by most western churches after 1582) and
-the functions
-.Fn easterog
-and
-.Fn easteroj
-compute the date of Easter Sunday according to the orthodox rules
-(Western churches before 1582, Greek and Russian Orthodox Church
-until today).
-The result returned by
-.Fn easterog
-is the date in Gregorian Calendar, whereas
-.Fn easteroj
-returns the date in Julian Calendar.
-.Pp
-The functions
-.Fn gdate ,
-.Fn jdate ,
-.Fn ndaysg
-and
-.Fn ndaysj
-provide conversions between the common "year, month, day" notation
-of a date and the "number of days" representation, which is better suited
-for calculations. The days are numbered from March 1st year 1 B.C., starting
-with zero, so the number of a day gives the number of days since March 1st,
-year 1 B.C. The conversions work for nonnegative day numbers only.
-.Pp
-The
-.Fn gdate
-and
-.Fn jdate
-functions
-store the date corresponding to the day number
-.Fa nd
-into the structure pointed at by
-.Fa dt
-and return a pointer to this structure.
-.Pp
-The
-.Fn ndaysg
-and
-.Fn ndaysj
-functions
-return the day number of the date pointed at by
-.Fa dt .
-.Pp
-The
-.Fn gdate
-and
-.Fn ndaysg
-functions
-assume Gregorian Calendar after October 4, 1582 and Julian Calendar before,
-whereas
-.Fn jdate
-and
-.Fn ndaysj
-assume Julian Calendar throughout.
-.Pp
-The two calendars differ by the definition of the leap year. The
-Julian Calendar says every year that is a multiple of four is a
-leap year. The Gregorian Calendar excludes years that are multiples of
-100 and not multiples of 400.
-This means the years 1700, 1800, 1900, 2100 are not leap years
-and the year 2000 is
-a leap year.
-The new rules were inaugurated on October 4, 1582 by deleting ten
-days following this date. Most catholic countries adopted the new
-calendar by the end of the 16th century, whereas others stayed with
-the Julian Calendar until the 20th century. The United Kingdom and
-their colonies switched on September 2, 1752. They already had to
-delete 11 days.
-.Pp
-The function
-.Fn week
-returns the number of the week which contains the day numbered
-.Fa nd .
-The argument
-.Fa *year
-is set with the year that contains (the greater part of) the week.
-The weeks are numbered per year starting with week 1, which is the
-first week in a year that includes more than three days of the year.
-Weeks start on Monday.
-This function is defined for Gregorian Calendar only.
-.Pp
-The function
-.Fn weekday
-returns the weekday (Mo = 0 .. Su = 6) of the day numbered
-.Fa nd .
-.Pp
-The structure
-.Fa date
-is defined in
-.Aq Pa calendar.h .
-It contains these fields:
-.Bd -literal -offset indent
-int y; /\(** year (0000 - ????) \(**/
-int m; /\(** month (1 - 12) \(**/
-int d; /\(** day of month (1 - 31) \(**/
-.Ed
-.Pp
-The year zero is written as "1 B.C." by historians and "0" by astronomers
-and in this library.
-.Sh SEE ALSO
-.Xr ncal 1 ,
-.Xr strftime 3
-.Rs
-.%A A. B. Author
-.%D November 1997
-.Sh STANDARDS
-The week number conforms to ISO 8601: 1988.
-.Sh HISTORY
-The
-.Nm calendar
-library first appeared in
-.Fx 3.0 .
-.Sh AUTHOR
-This manual page and the library was written by
-.An Wolfgang Helbig Aq helbig@FreeBSD.ORG .
-.Sh BUGS
-The library was coded with great care so there are no bugs left.
diff --git a/lib/libcalendar/calendar.c b/lib/libcalendar/calendar.c
deleted file mode 100644
index ae36a4c..0000000
--- a/lib/libcalendar/calendar.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/*-
- * Copyright (c) 1997 Wolfgang Helbig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: calendar.c,v 1.1.1.1 1997/12/04 10:41:49 helbig Exp $
- */
-
-#include "calendar.h"
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/*
- * For each month tabulate the number of days elapsed in a year before the
- * month. This assumes the internal date representation, where a year
- * starts on March 1st. So we don't need a special table for leap years.
- * But we do need a special table for the year 1582, since 10 days are
- * deleted in October. This is month1s for the switch from Julian to
- * Gregorian calendar.
- */
-static int const month1[] =
- {0, 31, 61, 92, 122, 153, 184, 214, 245, 275, 306, 337};
- /* M A M J J A S O N D J */
-static int const month1s[]=
- {0, 31, 61, 92, 122, 153, 184, 214, 235, 265, 296, 327};
-
-typedef struct date date;
-
-/* The last day of Julian calendar, in internal and ndays representation */
-static int nswitch; /* The last day of Julian calendar */
-static date jiswitch = {1582, 7, 3};
-
-static date *date2idt(date *idt, date *dt);
-static date *idt2date(date *dt, date *idt);
-static int ndaysji(date *idt);
-static int ndaysgi(date *idt);
-static int firstweek(int year);
-
-/*
- * Compute the Julian date from the number of days elapsed since
- * March 1st of year zero.
- */
-date *
-jdate(int ndays, date *dt)
-{
- date idt; /* Internal date representation */
- int r; /* hold the rest of days */
-
- /*
- * Compute the year by starting with an approximation not smaller
- * than the answer and using linear search for the greatest
- * year which does not begin after ndays.
- */
- idt.y = ndays / 365;
- idt.m = 0;
- idt.d = 0;
- while ((r = ndaysji(&idt)) > ndays)
- idt.y--;
-
- /*
- * Set r to the days left in the year and compute the month by
- * linear search as the largest month that does not begin after r
- * days.
- */
- r = ndays - r;
- for (idt.m = 11; month1[idt.m] > r; idt.m--)
- ;
-
- /* Compute the days left in the month */
- idt.d = r - month1[idt.m];
-
- /* return external representation of the date */
- return (idt2date(dt, &idt));
-}
-
-/*
- * Return the number of days since March 1st of the year zero.
- * The date is given according to Julian calendar.
- */
-int
-ndaysj(date *dt)
-{
- date idt; /* Internal date representation */
-
- if (date2idt(&idt, dt) == NULL)
- return (-1);
- else
- return (ndaysji(&idt));
-}
-
-/*
- * Same as above, where the Julian date is given in internal notation.
- * This formula shows the beauty of this notation.
- */
-static int
-ndaysji(date * idt)
-{
-
- return (idt->d + month1[idt->m] + idt->y * 365 + idt->y / 4);
-}
-
-/*
- * Compute the date according to the Gregorian calendar from the number of
- * days since March 1st, year zero. The date computed will be Julian if it
- * is older than 1582-10-05. This is the reverse of the function ndaysg().
- */
-date *
-gdate(int ndays, date *dt)
-{
- int const *montht; /* month-table */
- date idt; /* for internal date representation */
- int r; /* holds the rest of days */
-
- /*
- * Compute the year by starting with an approximation not smaller
- * than the answer and search linearly for the greatest year not
- * starting after ndays.
- */
- idt.y = ndays / 365;
- idt.m = 0;
- idt.d = 0;
- while ((r = ndaysgi(&idt)) > ndays)
- idt.y--;
-
- /*
- * Set ndays to the number of days left and compute by linear
- * search the greatest month which does not start after ndays. We
- * use the table month1 which provides for each month the number
- * of days that elapsed in the year before that month. Here the
- * year 1582 is special, as 10 days are left out in October to
- * resynchronize the calendar with the earth's orbit. October 4th
- * 1582 is followed by October 15th 1582. We use the "switch"
- * table month1s for this year.
- */
- ndays = ndays - r;
- if (idt.y == 1582)
- montht = month1s;
- else
- montht = month1;
-
- for (idt.m = 11; montht[idt.m] > ndays; idt.m--)
- ;
-
- idt.d = ndays - montht[idt.m]; /* the rest is the day in month */
-
- /* Advance ten days deleted from October if after switch in Oct 1582 */
- if (idt.y == jiswitch.y && idt.m == jiswitch.m && jiswitch.d < idt.d)
- idt.d += 10;
-
- /* return external representation of found date */
- return (idt2date(dt, &idt));
-}
-
-/*
- * Return the number of days since March 1st of the year zero. The date is
- * assumed Gregorian if younger than 1582-10-04 and Julian otherwise. This
- * is the reverse of gdate.
- */
-int
-ndaysg(date *dt)
-{
- date idt; /* Internal date representation */
-
- if (date2idt(&idt, dt) == NULL)
- return (-1);
- return (ndaysgi(&idt));
-}
-
-/*
- * Same as above, but with the Gregorian date given in internal
- * representation.
- */
-static int
-ndaysgi(date *idt)
-{
- int nd; /* Number of days--return value */
-
- /* Cache nswitch if not already done */
- if (nswitch == 0)
- nswitch = ndaysji(&jiswitch);
-
- /*
- * Assume Julian calendar and adapt to Gregorian if necessary, i. e.
- * younger than nswitch. Gregori deleted
- * the ten days from Oct 5th to Oct 14th 1582.
- * Thereafter years which are multiples of 100 and not multiples
- * of 400 were not leap years anymore.
- * This makes the average length of a year
- * 365d +.25d - .01d + .0025d = 365.2425d. But the tropical
- * year measures 365.2422d. So in 10000/3 years we are
- * again one day ahead of the earth. Sigh :-)
- * (d is the average length of a day and tropical year is the
- * time from one spring point to the next.)
- */
- if ((nd = ndaysji(idt)) == -1)
- return (-1);
- if (idt->y >= 1600)
- nd = (nd - 10 - (idt->y - 1600) / 100 + (idt->y - 1600) / 400);
- else if (nd > nswitch)
- nd -= 10;
- return (nd);
-}
-
-/*
- * Compute the week number from the number of days since March 1st year 0.
- * The weeks are numbered per year starting with 1. If the first
- * week of a year includes at least four days of that year it is week 1,
- * otherwise it gets the number of the last week of the previous year.
- * The variable y will be filled with the year that contains the greater
- * part of the week.
- */
-int
-week(int nd, int *y)
-{
- date dt;
- int fw; /* 1st day of week 1 of previous, this and
- * next year */
- gdate(nd, &dt);
- for (*y = dt.y + 1; nd < (fw = firstweek(*y)); (*y)--)
- ;
- return ((nd - fw) / 7 + 1);
-}
-
-/* return the first day of week 1 of year y */
-static int
-firstweek(int y)
-{
- date idt;
- int nd, wd;
-
- idt.y = y - 1; /* internal representation of y-1-1 */
- idt.m = 10;
- idt.d = 0;
-
- nd = ndaysgi(&idt);
- /*
- * If more than 3 days of this week are in the preceding year, the
- * next week is week 1 (and the next monday is the answer),
- * otherwise this week is week 1 and the last monday is the
- * answer.
- */
- if ((wd = weekday(nd)) > 3)
- return (nd - wd + 7);
- else
- return (nd - wd);
-}
-
-/* return the weekday (Mo = 0 .. Su = 6) */
-int
-weekday(int nd)
-{
- date dmondaygi = {1997, 8, 16}; /* Internal repr. of 1997-11-17 */
- static int nmonday; /* ... which is a monday */
-
- /* Cache the daynumber of one monday */
- if (nmonday == 0)
- nmonday = ndaysgi(&dmondaygi);
-
- /* return (nd - nmonday) modulo 7 which is the weekday */
- nd = (nd - nmonday) % 7;
- if (nd < 0)
- return (nd + 7);
- else
- return (nd);
-}
-
-/*
- * Convert a date to internal date representation: The year starts on
- * March 1st, month and day numbering start at zero. E. g. March 1st of
- * year zero is written as y=0, m=0, d=0.
- */
-static date *
-date2idt(date *idt, date *dt)
-{
-
- idt->d = dt->d - 1;
- if (dt->m > 2) {
- idt->m = dt->m - 3;
- idt->y = dt->y;
- } else {
- idt->m = dt->m + 9;
- idt->y = dt->y - 1;
- }
- if (idt->m < 0 || idt->m > 11 || idt->y < 0)
- return (NULL);
- else
- return idt;
-}
-
-/* Reverse of date2idt */
-static date *
-idt2date(date *dt, date *idt)
-{
-
- dt->d = idt->d + 1;
- if (idt->m < 10) {
- dt->m = idt->m + 3;
- dt->y = idt->y;
- } else {
- dt->m = idt->m - 9;
- dt->y = idt->y + 1;
- }
- if (dt->m < 1)
- return (NULL);
- else
- return (dt);
-}
diff --git a/lib/libcalendar/calendar.h b/lib/libcalendar/calendar.h
deleted file mode 100644
index 2e432ed..0000000
--- a/lib/libcalendar/calendar.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * Copyright (c) 1997 Wolfgang Helbig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: calendar.h,v 1.2 1997/12/07 19:04:11 helbig Exp $
- */
-struct date {
- int y; /* year */
- int m; /* month */
- int d; /* day */
-};
-
-struct date *easterg(int _year, struct date *_dt);
-struct date *easterog(int _year, struct date *_dt);
-struct date *easteroj(int _year, struct date *_dt);
-struct date *gdate(int _nd, struct date *_dt);
-struct date *jdate(int _nd, struct date *_dt);
-int ndaysg(struct date *_dt);
-int ndaysj(struct date *_dt);
-int week(int _nd, int *_year);
-int weekday(int _nd);
diff --git a/lib/libcalendar/easter.c b/lib/libcalendar/easter.c
deleted file mode 100644
index 573f06d..0000000
--- a/lib/libcalendar/easter.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- * Copyright (c) 1997 Wolfgang Helbig
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: easter.c,v 1.2 1997/12/07 19:04:14 helbig Exp $
- */
-
-#include "calendar.h"
-
-typedef struct date date;
-
-static int easterodn(int y);
-
-/* Compute Easter Sunday in Gregorian Calendar */
-date *
-easterg(int y, date *dt)
-{
- int c, i, j, k, l, n;
-
- n = y % 19;
- c = y / 100;
- k = (c - 17) / 25;
- i = (c - c/4 -(c-k)/3 + 19 * n + 15) % 30;
- i = i -(i/28) * (1 - (i/28) * (29/(i + 1)) * ((21 - n)/11));
- j = (y + y/4 + i + 2 - c + c/4) % 7;
- l = i - j;
- dt->m = 3 + (l + 40) / 44;
- dt->d = l + 28 - 31*(dt->m / 4);
- dt->y = y;
- return (dt);
-}
-
-/* Compute the Gregorian date of Easter Sunday in Julian Calendar */
-date *
-easterog(int y, date *dt)
-{
-
- return (gdate(easterodn(y), dt));
-}
-
-/* Compute the Julian date of Easter Sunday in Julian Calendar */
-date *
-easteroj(int y, date * dt)
-{
-
- return (jdate(easterodn(y), dt));
-}
-
-/* Compute the day number of Easter Sunday in Julian Calendar */
-static int
-easterodn(int y)
-{
- /*
- * Table for the easter limits in one metonic (19-year) cycle. 21
- * to 31 is in March, 1 through 18 in April. Easter is the first
- * sunday after the easter limit.
- */
- int mc[] = {5, 25, 13, 2, 22, 10, 30, 18, 7, 27, 15, 4,
- 24, 12, 1, 21, 9, 29, 17};
-
- /* Offset from a weekday to next sunday */
- int ns[] = {6, 5, 4, 3, 2, 1, 7};
- date dt;
- int dn;
-
- /* Assign the easter limit of y to dt */
- dt.d = mc[y % 19];
-
- if (dt.d < 21)
- dt.m = 4;
- else
- dt.m = 3;
-
- dt.y = y;
-
- /* Return the next sunday after the easter limit */
- dn = ndaysj(&dt);
- return (dn + ns[weekday(dn)]);
-}
diff --git a/lib/libcom_err/Makefile b/lib/libcom_err/Makefile
deleted file mode 100644
index 3112832..0000000
--- a/lib/libcom_err/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-# $Id$
-
-LIB= com_err
-SRCS= com_err.c error_message.c et_name.c init_et.c
-MAN3= com_err.3
-
-SUBDIR= doc
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/com_err.h \
- ${DESTDIR}/usr/include
-
-.include <bsd.lib.mk>
-
diff --git a/lib/libcom_err/com_err.3 b/lib/libcom_err/com_err.3
deleted file mode 100644
index ee4375b..0000000
--- a/lib/libcom_err/com_err.3
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" Copyright (c) 1988 Massachusetts Institute of Technology,
-.\" Student Information Processing Board. All rights reserved.
-.\"
-.\" $Header$
-.\"
-.TH COM_ERR 3 "22 Nov 1988" SIPB
-.SH NAME
-com_err \- common error display routine
-.SH SYNOPSIS
-.nf
- #include <com_err.h>
-.PP
-void com_err (whoami, code, format, ...);
- const char *whoami;
- long code;
- const char *format;
-.PP
-proc = set_com_err_hook (proc);
-.fi
-void (*
-.I proc
-) (const char *, long, const char *, va_list);
-.nf
-.PP
-proc = reset_com_err_hook ();
-.PP
-void initialize_XXXX_error_table ();
-.fi
-.SH DESCRIPTION
-.I Com_err
-displays an error message on the standard error stream
-.I stderr
-(see
-.IR stdio (3S))
-composed of the
-.I whoami
-string, which should specify the program name or some subportion of
-a program, followed by an error message generated from the
-.I code
-value (derived from
-.IR compile_et (1)),
-and a string produced using the
-.I format
-string and any following arguments, in the same style as
-.IR fprintf (3).
-
-The behavior of
-.I com_err
-can be modified using
-.I set_com_err_hook;
-this defines a procedure which is called with the arguments passed to
-.I com_err,
-instead of the default internal procedure which sends the formatted
-text to error output. Thus the error messages from a program can all
-easily be diverted to another form of diagnostic logging, such as
-.IR syslog (3).
-.I Reset_com_err_hook
-may be used to restore the behavior of
-.I com_err
-to its default form. Both procedures return the previous ``hook''
-value. These ``hook'' procedures must have the declaration given for
-.I proc
-above in the synopsis.
-
-The
-.I initialize_XXXX_error_table
-routine is generated mechanically by
-.IR compile_et (1)
-from a source file containing names and associated strings. Each
-table has a name of up to four characters, which is used in place of
-the
-.B XXXX
-in the name of the routine. These routines should be called before
-any of the corresponding error codes are used, so that the
-.I com_err
-library will recognize error codes from these tables when they are
-used.
-
-The
-.B com_err.h
-header file should be included in any source file that uses routines
-from the
-.I com_err
-library; executable files must be linked using
-.I ``-lcom_err''
-in order to cause the
-.I com_err
-library to be included.
-
-.\" .IR for manual entries
-.\" .PP for paragraph breaks
-
-.SH "SEE ALSO"
-compile_et (1), syslog (3).
-
-Ken Raeburn, "A Common Error Description Library for UNIX".
diff --git a/lib/libcom_err/com_err.c b/lib/libcom_err/com_err.c
deleted file mode 100644
index 9da3f9a..0000000
--- a/lib/libcom_err/com_err.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 1987, 1988 by MIT Student Information Processing Board.
- *
- * For copyright info, see mit-sipb-copyright.h.
- */
-
-#include <stdio.h>
-#include "mit-sipb-copyright.h"
-
-#include <stdarg.h>
-
-#include "error_table.h"
-#include "internal.h"
-#include "com_err.h"
-
-#if ! lint
-static const char rcsid[] =
- "$Id$";
-#endif /* ! lint */
-
-static void
-#ifdef __STDC__
- default_com_err_proc (const char *whoami, long code, const char *fmt, va_list args)
-#else
- default_com_err_proc (whoami, code, fmt, args)
- const char *whoami;
- long code;
- const char *fmt;
- va_list args;
-#endif
-{
- if (whoami) {
- fputs(whoami, stderr);
- fputs(": ", stderr);
- }
- if (code) {
- fputs(error_message(code), stderr);
- fputs(" ", stderr);
- }
- if (fmt) {
- vfprintf (stderr, fmt, args);
- }
- putc('\n', stderr);
- /* should do this only on a tty in raw mode */
- putc('\r', stderr);
- fflush(stderr);
-}
-
-#ifdef __STDC__
-typedef void (*errf) (const char *, long, const char *, va_list);
-#else
-typedef void (*errf) ();
-#endif
-
-errf com_err_hook = default_com_err_proc;
-
-void com_err_va (whoami, code, fmt, args)
- const char *whoami;
- long code;
- const char *fmt;
- va_list args;
-{
- (*com_err_hook) (whoami, code, fmt, args);
-}
-
-#if ! VARARGS
-void com_err (const char *whoami,
- long code,
- const char *fmt, ...)
-{
-#else
-void com_err (va_alist)
- va_dcl
-{
- const char *whoami, *fmt;
- long code;
-#endif
- va_list pvar;
-
- if (!com_err_hook)
- com_err_hook = default_com_err_proc;
-#if VARARGS
- va_start (pvar);
- whoami = va_arg (pvar, const char *);
- code = va_arg (pvar, long);
- fmt = va_arg (pvar, const char *);
-#else
- va_start(pvar, fmt);
-#endif
- com_err_va (whoami, code, fmt, pvar);
- va_end(pvar);
-}
-
-errf set_com_err_hook (new_proc)
- errf new_proc;
-{
- errf x = com_err_hook;
-
- if (new_proc)
- com_err_hook = new_proc;
- else
- com_err_hook = default_com_err_proc;
-
- return x;
-}
-
-errf reset_com_err_hook () {
- errf x = com_err_hook;
- com_err_hook = default_com_err_proc;
- return x;
-}
diff --git a/lib/libcom_err/com_err.h b/lib/libcom_err/com_err.h
deleted file mode 100644
index 7bea010..0000000
--- a/lib/libcom_err/com_err.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Header file for common error description library.
- *
- * Copyright 1988, Student Information Processing Board of the
- * Massachusetts Institute of Technology.
- *
- * For copyright and distribution info, see the documentation supplied
- * with this package.
- */
-
-#ifndef __COM_ERR_H
-
-#ifdef __STDC__
-#ifndef __HIGHC__ /* gives us STDC but not stdarg */
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-/* ANSI C -- use prototypes etc */
-void com_err (const char *, long, const char *, ...);
-char const *error_message (long);
-void (*com_err_hook) (const char *, long, const char *, va_list);
-void (*set_com_err_hook (void (*) (const char *, long, const char *, va_list)))
- (const char *, long, const char *, va_list);
-void (*reset_com_err_hook ()) (const char *, long, const char *, va_list);
-#else
-/* no prototypes */
-void com_err ();
-char *error_message ();
-void (*com_err_hook) ();
-void (*set_com_err_hook ()) ();
-void (*reset_com_err_hook ()) ();
-#endif
-
-#define __COM_ERR_H
-#endif /* ! defined(__COM_ERR_H) */
diff --git a/lib/libcom_err/doc/Makefile b/lib/libcom_err/doc/Makefile
deleted file mode 100644
index e94d862..0000000
--- a/lib/libcom_err/doc/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $Id$
-
-INFO= com_err
-INFOSECTION= "Programming & development tools."
-INFOENTRY_com_err= "* libcom_err: (com_err). A Common Error Description Library for UNIX."
-
-.include <bsd.info.mk>
diff --git a/lib/libcom_err/doc/com_err.texinfo b/lib/libcom_err/doc/com_err.texinfo
deleted file mode 100644
index 77f62c7..0000000
--- a/lib/libcom_err/doc/com_err.texinfo
+++ /dev/null
@@ -1,616 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-
-@c $Header: /home/ncvs/src/lib/libcom_err/doc/com_err.texinfo,v 1.1.1.1 1995/01/14 22:23:41 wollman Exp $
-@c $Source: /home/ncvs/src/lib/libcom_err/doc/com_err.texinfo,v $
-
-@c Note that although this source file is in texinfo format (more
-@c or less), it is not yet suitable for turning into an ``info''
-@c file. Sorry, maybe next time.
-@c
-@c In order to produce hardcopy documentation from a texinfo file,
-@c run ``tex com_err.texinfo'' which will load in texinfo.tex,
-@c provided in this distribution. (texinfo.tex is from the Free
-@c Software Foundation, and is under different copyright restrictions
-@c from the rest of this package.)
-
-@ifinfo
-@barfo
-@end ifinfo
-
-@iftex
-@tolerance 10000
-
-@c Mutate section headers...
-@begingroup
- @catcode#=6
- @gdef@secheading#1#2#3{@secheadingi {#3@enspace #1}}
-@endgroup
-@end iftex
-
-@c %**start of header (This is for running Texinfo on a region.)
-@setfilename com_err
-@settitle A Common Error Description Library for UNIX
-@c %**end of header (This is for running Texinfo on a region.)
-
-@ifinfo
-This file documents the use of the Common Error Description library.
-
-Copyright (C) 1987, 1988 Student Information Processing Board of the
-Massachusetts Institute of Technology.
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted, 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 names of M.I.T. and the M.I.T. S.I.P.B. not be
-used in advertising or publicity pertaining to distribution of the software
-without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B.
-make no representations about the suitability of this software for any
-purpose. It is provided "as is" without express or implied warranty.
-
-Note that the file texinfo.tex, provided with this distribution, is from
-the Free Software Foundation, and is under different copyright restrictions
-from the remainder of this package.
-
-@end ifinfo
-
-@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
-
-@setchapternewpage odd
-
-@titlepage
-@center @titlefont{A Common Error Description}
-@center @titlefont{Library for UNIX}
-@sp 2
-@center Ken Raeburn
-@center Bill Sommerfeld
-@sp 1
-@center MIT Student Information Processing Board
-@sp 3
-@center last updated 1 January 1989
-@center for version 1.2
-@center ***DRAFT COPY ONLY***
-
-@vskip 2in
-
-@center @b{Abstract}
-
-UNIX has always had a clean and simple system call interface, with a
-standard set of error codes passed between the kernel and user
-programs. Unfortunately, the same cannot be said of many of the
-libraries layered on top of the primitives provided by the kernel.
-Typically, each one has used a different style of indicating errors to
-their callers, leading to a total hodgepodge of error handling, and
-considerable amounts of work for the programmer. This paper describes
-a library and associated utilities which allows a more uniform way for
-libraries to return errors to their callers, and for programs to
-describe errors and exceptional conditions to their users.
-
-@page
-@vskip 0pt plus 1filll
-
-Copyright @copyright{} 1987, 1988 by the Student Information Processing
-Board of the Massachusetts Institute of Technology.
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted, 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 names of M.I.T. and the M.I.T. S.I.P.B. not be
-used in advertising or publicity pertaining to distribution of the software
-without specific, written prior permission. M.I.T. and the M.I.T. S.I.P.B.
-make no representations about the suitability of this software for any
-purpose. It is provided "as is" without express or implied warranty.
-
-Note that the file texinfo.tex, provided with this distribution, is from
-the Free Software Foundation, and is under different copyright restrictions
-from the remainder of this package.
-
-@end titlepage
-
-@ifinfo
-@node Top, Why com_err?, (dir), (dir)
-@comment node-name, next, previous, up
-@top General Introduction
-
-@menu
-* Why com_err?:: What is all this for?
-* Error codes:: What's an error code, anyway?
-* Error table source file:: How to describe an error table.
-* The error-table compiler:: How to compile the table.
-* Run-time support routines:: How to use from within your program.
-* Coding Conventions:: Stylistic issues.
-* Building and Installation:: How to build and install.
-* Bug Reports:: You have found a bug? Report it.
-* Acknowledgements:: Whom to thank...
-
-@end menu
-
-@end ifinfo
-
-@page
-
-@ifinfo
-@node Why com_err?, Error codes, Top, (dir)
-@comment node-name, next, previous, up
-@end ifinfo
-
-@section Why com_err?
-
-In building application software packages, a programmer often has to
-deal with a number of libraries, each of which can use a different
-error-reporting mechanism. Sometimes one of two values is returned,
-indicating simply SUCCESS or FAILURE, with no description of errors
-encountered. Sometimes it is an index into a table of text strings,
-where the name of the table used is dependent on the library being
-used when the error is generated; since each table starts numbering at
-0 or 1, additional information as to the source of the error code is
-needed to determine which table to look at. Sometimes no text messages are
-supplied at all, and the programmer must supply them at any point at which
-he may wish to report error conditions.
-Often, a global variable is assigned some value describing the error, but
-the programmer has to know in each case whether to look at @code{errno},
-@code{h_errno}, the return value from @code{hes_err()}, or whatever other
-variables or routines are specified.
-And what happens if something
-in the procedure of
-examining or reporting the error changes the same variable?
-
-The package we have developed is an attempt to present a common
-error-handling mechanism to manipulate the most common form of error code
-in a fashion that does not have the problems listed above.
-
-A list of up to 256 text messages is supplied to a translator we have
-written, along with the three- to four-character ``name'' of the error
-table. The library using this error table need only call a routine
-generated from this error-table source to make the table ``known'' to the
-com_err library, and any error code the library generates can be converted
-to the corresponding error message. There is also a default format for
-error codes accidentally returned before making the table known, which is
-of the form @samp{unknown code foo 32}, where @samp{foo} would be the name
-of the table.
-
-@ifinfo
-@node Error codes, Error table source file, Why com_err?, (dir)
-@comment node-name, next, previous, up
-@end ifinfo
-
-@section Error codes
-
-Error codes themselves are 32 bit (signed) integers, of which the high
-order 24 bits are an identifier of which error table the error code is
-from, and the low order 8 bits are a sequential error number within
-the table. An error code may thus be easily decomposed into its component
-parts. Only the lowest 32 bits of an error code are considered significant
-on systems which support wider values.
-
-Error table 0 is defined to match the UNIX system call error table
-(@code{sys_errlist}); this allows @code{errno} values to be used directly
-in the library (assuming that @code{errno} is of a type with the same width
-as @t{long}). Other error table numbers are formed by compacting together
-the first four characters of the error table name. The mapping between
-characters in the name and numeric values in the error code are defined in
-a system-independent fashion, so that two systems that can pass integral
-values between them can reliably pass error codes without loss of meaning;
-this should work even if the character sets used are not the same.
-(However, if this is to be done, error table 0 should be avoided, since the
-local system call error tables may differ.)
-
-Any variable which is to contain an error code should be declared @t{long}.
-The draft proposed American National Standard for C (as of May, 1988)
-requires that @t{long} variables be at least 32 bits; any system which does
-not support 32-bit @t{long} values cannot make use of this package (nor
-much other software that assumes an ANSI-C environment base) without
-significant effort.
-
-@ifinfo
-@node Error table source file, The error-table compiler, Error codes, (dir)
-@comment node-name, next, previous, up
-@end ifinfo
-
-@section Error table source file
-
-The error table source file begins with the declaration of the table name,
-as
-
-@example
-error_table @var{tablename}
-@end example
-
-Individual error codes are
-specified with
-
-@example
-error_code @var{ERROR_NAME}, @var{"text message"}
-@end example
-
-where @samp{ec} can also be used as a short form of @samp{error_code}. To
-indicate the end of the table, use @samp{end}. Thus, a (short) sample
-error table might be:
-
-@example
-
- error_table dsc
-
- error_code DSC_DUP_MTG_NAME,
- "Meeting already exists"
-
- ec DSC_BAD_PATH,
- "A bad meeting pathname was given"
-
- ec DSC_BAD_MODES,
- "Invalid mode for this access control list"
-
- end
-
-@end example
-
-@ifinfo
-@node The error-table compiler, Run-time support routines, Error table source file, (dir)
-@comment node-name, next, previous, up
-@end ifinfo
-
-@section The error-table compiler
-
-The error table compiler is named @code{compile_et}. It takes one
-argument, the pathname of a file (ending in @samp{.et}, e.g.,
-@samp{dsc_err.et}) containing an error table source file. It parses the
-error table, and generates two output files -- a C header file
-(@samp{discuss_err.h}) which contains definitions of the numerical values
-of the error codes defined in the error table, and a C source file which
-should be compiled and linked with the executable. The header file must be
-included in the source of a module which wishes to reference the error
-codes defined; the object module generated from the C code may be linked in
-to a program which wishes to use the printed forms of the error codes.
-
-This translator accepts a @kbd{-language @var{lang}} argument, which
-determines for which language (or language variant) the output should be
-written. At the moment, @var{lang} is currently limited to @kbd{ANSI-C}
-and @kbd{K&R-C}, and some abbreviated forms of each. Eventually, this will
-be extended to include some support for C++. The default is currently
-@kbd{K&R-C}, though the generated sources will have ANSI-C code
-conditionalized on the symbol @t{__STDC__}.
-
-@ifinfo
-@node Run-time support routines, Coding Conventions, The error-table compiler, (dir)
-@comment node-name, next, previous, up
-@end ifinfo
-
-@section Run-time support routines
-
-Any source file which uses the routines supplied with or produced by the
-com_err package should include the header file @file{<com_err.h>}. It
-contains declarations and definitions which may be needed on some systems.
-(Some functions cannot be referenced properly without the return type
-declarations in this file. Some functions may work properly on most
-architectures even without the header file, but relying on this is not
-recommended.)
-
-The run-time support routines and variables provided via this package
-include the following:
-
-@example
-void initialize_@var{xxxx}_error_table (void);
-@end example
-
-One of these routines is built by the error compiler for each error table.
-It makes the @var{xxxx} error table ``known'' to the error reporting
-system. By convention, this routine should be called in the initialization
-routine of the @var{xxxx} library. If the library has no initialization
-routine, some combination of routines which form the core of the library
-should ensure that this routine is called. It is not advised to leave it
-the caller to make this call.
-
-There is no harm in calling this routine more than once.
-
-@example
-#define ERROR_TABLE_BASE_@var{xxxx} @var{nnnnn}L
-@end example
-
-This symbol contains the value of the first error code entry in the
-specified table.
-This rarely needs be used by the
-programmer.
-
-@example
-const char *error_message (long code);
-@end example
-
-This routine returns the character string error message associated
-with @code{code}; if this is associated with an unknown error table, or
-if the code is associated with a known error table but the code is not
-in the table, a string of the form @samp{Unknown code @var{xxxx nn}} is
-returned, where @var{xxxx} is the error table name produced by
-reversing the compaction performed on the error table number implied
-by that error code, and @var{nn} is the offset from that base value.
-
-Although this routine is available for use when needed, its use should be
-left to circumstances which render @code{com_err} (below) unusable.
-
-@example
-void com_err (const char *whoami, /* module reporting error */
- long code, /* error code */
- const char *format, /* format for additional detail */
- ...); /* (extra parameters) */
-@end example
-
-This routine provides an alternate way to print error messages to
-standard error; it allows the error message to be passed in as a
-parameter, rather than in an external variable. @emph{Provide grammatical
-context for ``message.''}
-
-If @var{format} is @code{(char *)NULL}, the formatted message will not be
-printed. @var{format} may not be omitted.
-
-@example
-#include <stdarg.h>
-
-void com_err_va (const char *whoami,
- long code,
- const char *format,
- va_list args);
-@end example
-
-This routine provides an interface, equivalent to @code{com_err} above,
-which may be used by higher-level variadic functions (functions which
-accept variable numbers of arguments).
-
-@example
-#include <stdarg.h>
-
-void (*set_com_err_hook (void (*proc) ())) ();
-
-void (*@var{proc}) (const char *whoami, long code, va_list args);
-
-void reset_com_err_hook ();
-@end example
-
-These two routines allow a routine to be dynamically substituted for
-@samp{com_err}. After @samp{set_com_err_hook} has been called,
-calls to @samp{com_err} will turn into calls to the new hook routine.
-@samp{reset_com_err_hook} turns off this hook. This may intended to
-be used in daemons (to use a routine which calls @var{syslog(3)}), or
-in a window system application (which could pop up a dialogue box).
-
-If a program is to be used in an environment in which simply printing
-messages to the @code{stderr} stream would be inappropriate (such as in a
-daemon program which runs without a terminal attached),
-@code{set_com_err_hook} may be used to redirect output from @code{com_err}.
-The following is an example of an error handler which uses @var{syslog(3)}
-as supplied in BSD 4.3:
-
-@example
-#include <stdio.h>
-#include <stdarg.h>
-#include <syslog.h>
-
-/* extern openlog (const char * name, int logopt, int facility); */
-/* extern syslog (int priority, char * message, ...); */
-
-void hook (const char * whoami, long code,
- const char * format, va_list args)
-@{
- char buffer[BUFSIZ];
- static int initialized = 0;
- if (!initialized) @{
- openlog (whoami,
- LOG_NOWAIT|LOG_CONS|LOG_PID|LOG_NDELAY,
- LOG_DAEMON);
- initialized = 1;
- @}
- vsprintf (buffer, format, args);
- syslog (LOG_ERR, "%s %s", error_message (code), buffer);
-@}
-@end example
-
-After making the call
-@code{set_com_err_hook (hook);},
-any calls to @code{com_err} will result in messages being sent to the
-@var{syslogd} daemon for logging.
-The name of the program, @samp{whoami}, is supplied to the
-@samp{openlog()} call, and the message is formatted into a buffer and
-passed to @code{syslog}.
-
-Note that since the extra arguments to @code{com_err} are passed by
-reference via the @code{va_list} value @code{args}, the hook routine may
-place any form of interpretation on them, including ignoring them. For
-consistency, @code{printf}-style interpretation is suggested, via
-@code{vsprintf} (or @code{_doprnt} on BSD systems without full support for
-the ANSI C library).
-
-@ifinfo
-@node Coding Conventions, Building and Installation, Run-time support routines, (dir)
-@comment node-name, next, previous, up
-@end ifinfo
-
-@section Coding Conventions
-
-The following conventions are just some general stylistic conventions
-to follow when writing robust libraries and programs. Conventions
-similar to this are generally followed inside the UNIX kernel and most
-routines in the Multics operating system. In general, a routine
-either succeeds (returning a zero error code, and doing some side
-effects in the process), or it fails, doing minimal side effects; in
-any event, any invariant which the library assumes must be maintained.
-
-In general, it is not in the domain of non user-interface library
-routines to write error messages to the user's terminal, or halt the
-process. Such forms of ``error handling'' should be reserved for
-failures of internal invariants and consistancy checks only, as it
-provides the user of the library no way to clean up for himself in the
-event of total failure.
-
-Library routines which can fail should be set up to return an error
-code. This should usually be done as the return value of the
-function; if this is not acceptable, the routine should return a
-``null'' value, and put the error code into a parameter passed by
-reference.
-
-Routines which use the first style of interface can be used from
-user-interface levels of a program as follows:
-
-@example
-@{
- if ((code = initialize_world(getuid(), random())) != 0) @{
- com_err("demo", code,
- "when trying to initialize world");
- exit(1);
- @}
- if ((database = open_database("my_secrets", &code))==NULL) @{
- com_err("demo", code,
- "while opening my_secrets");
- exit(1);
- @}
-@}
-@end example
-
-A caller which fails to check the return status is in error. It is
-possible to look for code which ignores error returns by using lint;
-look for error messages of the form ``foobar returns value which is
-sometimes ignored'' or ``foobar returns value which is always
-ignored.''
-
-Since libraries may be built out of other libraries, it is often necessary
-for the success of one routine to depend on another. When a lower level
-routine returns an error code, the middle level routine has a few possible
-options. It can simply return the error code to its caller after doing
-some form of cleanup, it can substitute one of its own, or it can take
-corrective action of its own and continue normally. For instance, a
-library routine which makes a ``connect'' system call to make a network
-connection may reflect the system error code @code{ECONNREFUSED}
-(Connection refused) to its caller, or it may return a ``server not
-available, try again later,'' or it may try a different server.
-
-Cleanup which is typically necessary may include, but not be limited
-to, freeing allocated memory which will not be needed any more,
-unlocking concurrancy locks, dropping reference counts, closing file
-descriptors, or otherwise undoing anything which the procedure did up
-to this point. When there are a lot of things which can go wrong, it
-is generally good to write one block of error-handling code which is
-branched to, using a goto, in the event of failure. A common source
-of errors in UNIX programs is failing to close file descriptors on
-error returns; this leaves a number of ``zombied'' file descriptors
-open, which eventually causes the process to run out of file
-descriptors and fall over.
-
-@example
-@{
- FILE *f1=NULL, *f2=NULL, *f3=NULL;
- int status = 0;
-
- if ( (f1 = fopen(FILE1, "r")) == NULL) @{
- status = errno;
- goto error;
- @}
-
- /*
- * Crunch for a while
- */
-
- if ( (f2 = fopen(FILE2, "w")) == NULL) @{
- status = errno;
- goto error;
- @}
-
- if ( (f3 = fopen(FILE3, "a+")) == NULL) @{
- status = errno;
- goto error;
- @}
-
- /*
- * Do more processing.
- */
- fclose(f1);
- fclose(f2);
- fclose(f3);
- return 0;
-
-error:
- if (f1) fclose(f1);
- if (f2) fclose(f2);
- if (f3) fclose(f3);
- return status;
-@}
-@end example
-
-@ifinfo
-@node Building and Installation, Bug Reports, Coding Conventions, (dir)
-@comment node-name, next, previous, up
-@end ifinfo
-
-@section Building and Installation
-
-The distribution of this package will probably be done as a compressed
-``tar''-format file available via anonymous FTP from SIPB.MIT.EDU.
-Retrieve @samp{pub/com_err.tar.Z} and extract the contents. A subdirectory
-@t{profiled} should be created to hold objects compiled for profiling.
-Running ``make all'' should then be sufficient to build the library and
-error-table compiler. The files @samp{libcom_err.a},
-@samp{libcom_err_p.a}, @samp{com_err.h}, and @samp{compile_et} should be
-installed for use; @samp{com_err.3} and @samp{compile_et.1} can also be
-installed as manual pages.
-
-Potential problems:
-
-@itemize @bullet
-
-@item Use of @code{strcasecmp}, a routine provided in BSD for
-case-insensitive string comparisons. If an equivalent routine is
-available, you can modify @code{CFLAGS} in the makefile to define
-@code{strcasecmp} to the name of that routine.
-
-@item Compilers that defined @code{__STDC__} without providing the header
-file @code{<stdarg.h>}. One such example is Metaware's High ``C''
-compiler, as provided at Project Athena on the IBM RT/PC workstation; if
-@code{__HIGHC__} is defined, it is assumed that @code{<stdarg.h>} is not
-available, and therefore @code{<varargs.h>} must be used. If the symbol
-@code{VARARGS} is defined (e.g., in the makefile), @code{<varargs.h>} will
-be used.
-
-@item If your linker rejects symbols that are simultaneously defined in two
-library files, edit @samp{Makefile} to remove @samp{perror.c} from the
-library. This file contains a version of @var{perror(3)} which calls
-@code{com_err} instead of calling @code{write} directly.
-
-@end itemize
-
-As I do not have access to non-BSD systems, there are probably
-bugs present that may interfere with building or using this package on
-other systems. If they are reported to me, they can probably be fixed for
-the next version.
-
-@ifinfo
-@node Bug Reports, Acknowledgements, Building and Installation, (dir)
-@comment node-name, next, previous, up
-@end ifinfo
-
-@section Bug Reports
-
-Please send any comments or bug reports to the principal author: Ken
-Raeburn, @t{Raeburn@@Athena.MIT.EDU}.
-
-@ifinfo
-@node Acknowledgements, , Bug Reports, (dir)
-@comment node-name, next, previous, up
-@end ifinfo
-
-@section Acknowledgements
-
-I would like to thank: Bill Sommerfeld, for his help with some of this
-documentation, and catching some of the bugs the first time around;
-Honeywell Information Systems, for not killing off the @emph{Multics}
-operating system before I had an opportunity to use it; Honeywell's
-customers, who persuaded them not to do so, for a while; Ted Anderson of
-CMU, for catching some problems before version 1.2 left the nest; Stan
-Zanarotti and several others of MIT's Student Information Processing Board,
-for getting us started with ``discuss,'' for which this package was
-originally written; and everyone I've talked into --- I mean, asked to read
-this document and the ``man'' pages.
-
-@bye
diff --git a/lib/libcom_err/error_message.c b/lib/libcom_err/error_message.c
deleted file mode 100644
index 51ac568..0000000
--- a/lib/libcom_err/error_message.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * $Header: /home/ncvs/src/lib/libcom_err/error_message.c,v 1.1.1.1 1995/01/14 22:23:41 wollman Exp $
- * $Source: /home/ncvs/src/lib/libcom_err/error_message.c,v $
- * $Locker: $
- *
- * Copyright 1987 by the Student Information Processing Board
- * of the Massachusetts Institute of Technology
- *
- * For copyright info, see "mit-sipb-copyright.h".
- */
-
-#include <stdio.h>
-#include <string.h>
-#include "error_table.h"
-#include "mit-sipb-copyright.h"
-#include "internal.h"
-
-static const char rcsid[] =
- "$Header: /home/ncvs/src/lib/libcom_err/error_message.c,v 1.1.1.1 1995/01/14 22:23:41 wollman Exp $";
-static const char copyright[] =
- "Copyright 1986, 1987, 1988 by the Student Information Processing Board\nand the department of Information Systems\nof the Massachusetts Institute of Technology";
-
-static char buffer[25];
-
-struct et_list * _et_list = (struct et_list *) NULL;
-
-const char * error_message (code)
-long code;
-{
- int offset;
- struct et_list *et;
- int table_num;
- int started = 0;
- char *cp;
-
- offset = code & ((1<<ERRCODE_RANGE)-1);
- table_num = code - offset;
- if (!table_num) {
- if (offset < sys_nerr)
- return(sys_errlist[offset]);
- else
- goto oops;
- }
- for (et = _et_list; et; et = et->next) {
- if (et->table->base == table_num) {
- /* This is the right table */
- if (et->table->n_msgs <= offset)
- goto oops;
- return(et->table->msgs[offset]);
- }
- }
-oops:
- strcpy (buffer, "Unknown code ");
- if (table_num) {
- strcat (buffer, error_table_name (table_num));
- strcat (buffer, " ");
- }
- for (cp = buffer; *cp; cp++)
- ;
- if (offset >= 100) {
- *cp++ = '0' + offset / 100;
- offset %= 100;
- started++;
- }
- if (started || offset >= 10) {
- *cp++ = '0' + offset / 10;
- offset %= 10;
- }
- *cp++ = '0' + offset;
- *cp = '\0';
- return(buffer);
-}
diff --git a/lib/libcom_err/error_table.h b/lib/libcom_err/error_table.h
deleted file mode 100644
index 78f7db2..0000000
--- a/lib/libcom_err/error_table.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 1988 by the Student Information Processing Board of the
- * Massachusetts Institute of Technology.
- *
- * For copyright info, see mit-sipb-copyright.h.
- */
-
-#ifndef _ET_H
-/* Are we using ANSI C? */
-#ifndef __STDC__
-#define const
-#endif
-extern int errno;
-struct error_table {
- char const * const * msgs;
- long base;
- int n_msgs;
-};
-struct et_list {
- struct et_list *next;
- const struct error_table *table;
-};
-extern struct et_list * _et_list;
-
-#define ERRCODE_RANGE 8 /* # of bits to shift table number */
-#define BITS_PER_CHAR 6 /* # bits to shift per character in name */
-
-extern const char *error_table_name();
-#define _ET_H
-#endif
diff --git a/lib/libcom_err/et_name.c b/lib/libcom_err/et_name.c
deleted file mode 100644
index a896bab..0000000
--- a/lib/libcom_err/et_name.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 1987 by MIT Student Information Processing Board
- *
- * For copyright info, see mit-sipb-copyright.h.
- */
-
-#include "error_table.h"
-#include "mit-sipb-copyright.h"
-#include "internal.h"
-
-#ifndef lint
-static const char copyright[] =
- "Copyright 1987,1988 by Student Information Processing Board, Massachusetts Institute of Technology";
-static const char rcsid_et_name_c[] =
- "$Header: et_name.c,v 1.7 89/01/01 06:14:56 raeburn Exp $";
-#endif
-
-static const char char_set[] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";
-
-static char buf[6];
-
-const char * error_table_name(num)
- int num;
-{
- int ch;
- int i;
- char *p;
-
- /* num = aa aaa abb bbb bcc ccc cdd ddd d?? ??? ??? */
- p = buf;
- num >>= ERRCODE_RANGE;
- /* num = ?? ??? ??? aaa aaa bbb bbb ccc ccc ddd ddd */
- num &= 077777777;
- /* num = 00 000 000 aaa aaa bbb bbb ccc ccc ddd ddd */
- for (i = 4; i >= 0; i--) {
- ch = (num >> BITS_PER_CHAR * i) & ((1 << BITS_PER_CHAR) - 1);
- if (ch != 0)
- *p++ = char_set[ch-1];
- }
- *p = '\0';
- return(buf);
-}
diff --git a/lib/libcom_err/init_et.c b/lib/libcom_err/init_et.c
deleted file mode 100644
index 630c2ac..0000000
--- a/lib/libcom_err/init_et.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * $Header: init_et.c,v 1.5 88/10/27 08:34:54 raeburn Exp $
- * $Source: /mit/raeburn/Work/et/src/RCS/init_et.c,v $
- * $Locker: $
- *
- * Copyright 1986, 1987, 1988 by MIT Information Systems and
- * the MIT Student Information Processing Board.
- *
- * For copyright info, see mit-sipb-copyright.h.
- */
-
-#include <stdio.h>
-#include "error_table.h"
-#include "mit-sipb-copyright.h"
-
-#ifndef __STDC__
-#define const
-#endif
-
-#ifndef lint
-static const char rcsid_init_et_c[] =
- "$Header: init_et.c,v 1.5 88/10/27 08:34:54 raeburn Exp $";
-#endif
-
-extern char *malloc(), *realloc();
-
-struct foobar {
- struct et_list etl;
- struct error_table et;
-};
-
-extern struct et_list * _et_list;
-
-int init_error_table(msgs, base, count)
- const char * const * msgs;
- int base;
- int count;
-{
- struct foobar * new_et;
-
- if (!base || !count || !msgs)
- return 0;
-
- new_et = (struct foobar *) malloc(sizeof(struct foobar));
- if (!new_et)
- return errno; /* oops */
- new_et->etl.table = &new_et->et;
- new_et->et.msgs = msgs;
- new_et->et.base = base;
- new_et->et.n_msgs= count;
-
- new_et->etl.next = _et_list;
- _et_list = &new_et->etl;
- return 0;
-}
diff --git a/lib/libcom_err/internal.h b/lib/libcom_err/internal.h
deleted file mode 100644
index 880fe76..0000000
--- a/lib/libcom_err/internal.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * internal include file for com_err package
- */
-#include "mit-sipb-copyright.h"
-#ifndef __STDC__
-#undef const
-#define const
-#endif
-
-extern int errno;
-extern char const * const sys_errlist[];
-extern /* const */ int sys_nerr;
-
-#ifdef __STDC__
-void perror (const char *);
-#else
-int perror ();
-#endif
diff --git a/lib/libcom_err/mit-sipb-copyright.h b/lib/libcom_err/mit-sipb-copyright.h
deleted file mode 100644
index 2f7eb29..0000000
--- a/lib/libcom_err/mit-sipb-copyright.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-
-Copyright 1987, 1988 by the Student Information Processing Board
- of the Massachusetts Institute of Technology
-
-Permission to use, copy, modify, and distribute this software
-and its documentation for any purpose and without fee is
-hereby granted, 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 names of M.I.T. and the M.I.T. S.I.P.B. not be
-used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-M.I.T. and the M.I.T. S.I.P.B. make no representations about
-the suitability of this software for any purpose. It is
-provided "as is" without express or implied warranty.
-
-*/
-
diff --git a/lib/libcom_err/test/test.c b/lib/libcom_err/test/test.c
deleted file mode 100644
index 955cb96..0000000
--- a/lib/libcom_err/test/test.c
+++ /dev/null
@@ -1,47 +0,0 @@
-#include <stdio.h>
-#include <errno.h>
-#include "com_err.h"
-#include "test1.h"
-#include "test2.h"
-
-extern int sys_nerr, errno;
-
-main()
-{
- printf("Before initiating error table:\n\n");
- printf("Table name '%s'\n", error_table_name(KRB_MK_AP_TGTEXP));
- printf("UNIX name '%s'\n", error_table_name(EPERM));
- printf("Msg TGT-expired is '%s'\n", error_message(KRB_MK_AP_TGTEXP));
- printf("Msg EPERM is '%s'\n", error_message(EPERM));
- printf("Msg FOO_ERR is '%s'\n", error_message(FOO_ERR));
- printf("Msg {sys_nerr-1} is '%s'\n", error_message(sys_nerr-1));
- printf("Msg {sys_nerr} is '%s'\n", error_message(sys_nerr));
-
- printf("With 0: tgt-expired -> %s\n", error_message(KRB_MK_AP_TGTEXP));
-
- initialize_krb_error_table();
- printf("KRB error table initialized: base %d (%s), name %s\n",
- ERROR_TABLE_BASE_krb, error_message(ERROR_TABLE_BASE_krb),
- error_table_name(ERROR_TABLE_BASE_krb));
- initialize_krb_error_table();
- printf("With krb: tgt-expired -> %s\n",
- error_message(KRB_MK_AP_TGTEXP));
-
- initialize_quux_error_table();
- printf("QUUX error table initialized: base %d (%s), name %s\n",
- ERROR_TABLE_BASE_quux, error_message(ERROR_TABLE_BASE_quux),
- error_table_name(ERROR_TABLE_BASE_quux));
-
- printf("Msg for TGT-expired is '%s'\n",
- error_message(KRB_MK_AP_TGTEXP));
- printf("Msg {sys_nerr-1} is '%s'\n", error_message(sys_nerr-1));
- printf("Msg FOO_ERR is '%s'\n", error_message(FOO_ERR));
- printf("Msg KRB_SKDC_CANT is '%s'\n",
- error_message(KRB_SKDC_CANT));
- printf("Msg 1e6 (8B 64) is '%s'\n", error_message(1000000));
- printf("\n\nCOM_ERR tests:\n");
- com_err("whoami", FOO_ERR, (char *)NULL);
- com_err("whoami", FOO_ERR, " -- message goes %s", "here");
- com_err("whoami", 0, (char *)0);
- com_err("whoami", 0, "error number %d\n", 0);
-}
diff --git a/lib/libcom_err/test/test1.et b/lib/libcom_err/test/test1.et
deleted file mode 100644
index 4c7b77f..0000000
--- a/lib/libcom_err/test/test1.et
+++ /dev/null
@@ -1,69 +0,0 @@
- error_table krb
-
- error_code KRB_MK_AP_TKFIL,
- "Can't read ticket file"
-
- ec KRB_MK_AP_NOTKT,
- "Can't find ticket or TGT"
-
- ec KRB_MK_AP_TGTEXP,
- "TGT expired"
-
- ec KRB_RD_AP_UNDEC,
- "Can't decode authenticator"
-
- ec KRB_RD_AP_EXP,
- "Ticket expired"
-
- ec KRB_RD_AP_REPEAT,
- "Repeated request"
-
- ec KRB_RD_AP_NOT_US,
- "The ticket isn't for us"
-
- ec KRB_RD_AP_INCON,
- "Request is inconsistent"
-
- ec KRB_RD_AP_TIME,
- "Delta-T too big"
-
- ec KRB_RD_AP_BADD,
- "Incorrect net address"
-
- ec KRB_RD_AP_VERSION,
- "Protocol version mismatch"
-
- ec KRB_RD_AP_MSG_TYPE,
- "Invalid message type"
-
- ec KRB_RD_AP_MODIFIED,
- "Message stream modified"
-
- ec KRB_RD_AP_ORDER,
- "Message out of order"
-
- ec KRB_RD_AP_UNAUTHOR,
- "Unauthorized request"
-
- ec KRB_GT_PW_NULL,
- "Current password is null"
-
- ec KRB_GT_PW_BADPW,
- "Incorrect current password"
-
- ec KRB_GT_PW_PROT,
- "Protocol error"
-
- ec KRB_GT_PW_KDCERR,
- "Error returned by KDC"
-
- ec KRB_GT_PW_NULLTKT,
- "Null ticket returned by KDC"
-
- ec KRB_SKDC_RETRY,
- "Retry count exceeded"
-
- ec KRB_SKDC_CANT,
- "Can't send request"
-
- end
diff --git a/lib/libcom_err/test/test2.et b/lib/libcom_err/test/test2.et
deleted file mode 100644
index 55ad74e..0000000
--- a/lib/libcom_err/test/test2.et
+++ /dev/null
@@ -1,9 +0,0 @@
- error_table quux
-
- ec FOO_ERR, "foo"
-
- ec BAR_ERR, "bar"
-
- ec BAZ_ERR, "meow"
-
- end
diff --git a/lib/libcompat/4.1/ascftime.c b/lib/libcompat/4.1/ascftime.c
deleted file mode 100644
index e842b6e..0000000
--- a/lib/libcompat/4.1/ascftime.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1994 Joerg Wunsch
- *
- * All rights reserved.
- *
- * This program is free software.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Joerg Wunsch
- * 4. The name of the developer may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#define MAXLEN 1000 /* just a guess, only the user knows... */
-
-int
-#if __STDC__
-ascftime(char *s, const char *format, const struct tm *tmptr)
-#else
-ascftime(s, format, tmptr)
- char *s;
- char *format;
- struct tm *tmptr;
-#endif
-{
- return strftime(s, MAXLEN, format? format: "%C", tmptr);
-}
diff --git a/lib/libcompat/4.1/cftime.3 b/lib/libcompat/4.1/cftime.3
deleted file mode 100644
index 058f85c..0000000
--- a/lib/libcompat/4.1/cftime.3
+++ /dev/null
@@ -1,99 +0,0 @@
-.\"
-.\" Copyright (c) 1994, 1995 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" This program is free software.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Joerg Wunsch
-.\" 4. The name of the developer may not be used to endorse or promote
-.\" products derived from this software without specific prior written
-.\" permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\"
-.\" $Id: cftime.3,v 1.3 1997/02/22 15:05:51 peter Exp $
-.\"
-.Dd June 15, 1993
-.Os
-.Dt CFTIME 3
-.Sh NAME
-.Nm cftime
-.Nm ascftime
-.Nd convert date and time to string
-.Sh SYNOPSIS
-.Fd #include <time.h>
-.Ft int
-.Fn cftime "char *s" "char *format" "const time_t *clock"
-.Ft int
-.Fn ascftime "char *s" "const char *format" "const struct tm *tmptr"
-.Sh DESCRIPTION
-.Bf -symbolic
-The cftime and ascftime functions are made obsolete by strftime(3).
-.br
-They are available from the compatibility library, libcompat.
-.Ef
-.Pp
-Use of the functions
-.Nm cftime
-and
-.Nm ascftime
-is strongly deprecated, since there is no way to check for a buffer
-overflow condition. Use
-.Xr strftime 3
-instead.
-
-.Nm Ascftime
-is almost identical with
-.Xr strftime 3 ,
-with the only exception there's no parameter to tell about the
-maximal buffer length, and the
-.Fa format
-parameter defaults to
-.Dq %C
-if a
-.Em NULL
-pointer is given.
-
-.Nm Cftime
-does the same job, but it first invokes
-.Xr localtime 3
-in order to convert the given
-.Fa clock ,
-then also performs the conversions as requested by the
-.Fa format
-argument.
-
-.Sh RETURN VALUES
-The
-.Nm cftime
-and
-.Nm ascftime
-functions return the number of characters written to the output
-buffer
-.Fa s ,
-not counting the trailing null character.
-
-.Sh SEE ALSO
-.Xr localtime 3 ,
-.Xr strftime 3 .
diff --git a/lib/libcompat/4.1/cftime.c b/lib/libcompat/4.1/cftime.c
deleted file mode 100644
index 2e3a34b..0000000
--- a/lib/libcompat/4.1/cftime.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1994 Joerg Wunsch
- *
- * All rights reserved.
- *
- * This program is free software.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Joerg Wunsch
- * 4. The name of the developer may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <time.h>
-
-#define MAXLEN 1000 /* just a guess, only the user knows... */
-
-int
-#if __STDC__
-cftime(char *s, char *format, const time_t *clock)
-#else
-cftime(s, format, clock)
- char *s;
- char *format;
- time_t *clock;
-#endif
-{
- return strftime(s, MAXLEN, format? format: "%C", localtime(clock));
-}
-
diff --git a/lib/libcompat/4.1/ftime.3 b/lib/libcompat/4.1/ftime.3
deleted file mode 100644
index 097eaa6..0000000
--- a/lib/libcompat/4.1/ftime.3
+++ /dev/null
@@ -1,84 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ftime.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FTIME 3
-.Os BSD 4
-.Sh NAME
-.Nm ftime
-.Nd get date and time
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/timeb.h>
-.Ft int
-.Fn ftime "struct timeb *tp"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is obsoleted by gettimeofday(2).
-.Pp
-It is available from the compatibility library, libcompat.
-.Ef
-.Pp
-The
-.Fn ftime
-routine fills in a structure pointed to by its argument,
-as defined by
-.Aq Pa sys/timeb.h :
-.Bd -literal -offset indent
-/*
- * Structure returned by ftime system call
- */
-struct timeb
-{
- time_t time;
- unsigned short millitm;
- short timezone;
- short dstflag;
-};
-.Ed
-.Pp
-The structure contains the time since the epoch in seconds,
-up to 1000 milliseconds of more-precise interval,
-the local time zone (measured in minutes of time westward from Greenwich),
-and a flag that, if nonzero, indicates that
-Daylight Saving time applies locally during the appropriate part of the year.
-.Sh SEE ALSO
-.Xr gettimeofday 2 ,
-.Xr settimeofday 2 ,
-.Xr ctime 3 ,
-.Xr time 3
-.Sh HISTORY
-The
-.Nm
-function appeared in
-.Bx 4.2 .
diff --git a/lib/libcompat/4.1/ftime.c b/lib/libcompat/4.1/ftime.c
deleted file mode 100644
index 7da7e85..0000000
--- a/lib/libcompat/4.1/ftime.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1994 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Christopher G. Demetriou.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/timeb.h>
-
-int
-ftime(tbp)
- struct timeb *tbp;
-{
- struct timezone tz;
- struct timeval t;
-
- if (gettimeofday(&t, &tz) < 0)
- return (-1);
- tbp->millitm = t.tv_usec / 1000;
- tbp->time = t.tv_sec;
- tbp->timezone = tz.tz_minuteswest;
- tbp->dstflag = tz.tz_dsttime;
-
- return (0);
-}
diff --git a/lib/libcompat/4.1/getpw.3 b/lib/libcompat/4.1/getpw.3
deleted file mode 100644
index b64e588..0000000
--- a/lib/libcompat/4.1/getpw.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1990, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)getpw.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt GETPW 3
-.Os
-.Sh NAME
-.Nm getpw
-.Nd get name from uid
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Ft int
-.Fn getpw "uid_t uid" "char *buf"
-.Sh DESCRIPTION
-.Bf -symbolic
-The getpw function is made obsolete by getpwuid(3).
-.br
-It is available from the compatibility library, libcompat.
-.Ef
-.Pp
-The
-.Fn getpw
-function reads the file
-.Pa /etc/passwd ,
-and if it finds
-the specified
-.Fa uid ,
-copies the password entry line into the string pointed to by
-.Fa buf .
-the null terminated entry line from the password database,
-and appends the
-.Dv NUL
-character.
-.Sh RETURN VALUES
-The
-.Fn getpw
-function returns the zero if successful, otherwise
-a non-zero if the entry does not exist.
-.Sh FILES
-.Bl -tag -width /etc/passwd - compact
-.It Pa /etc/passwd
-.El
-.Sh SEE ALSO
-.Xr getpwent 3 ,
-.Xr passwd 5
-.Sh HISTORY
-A
-.Fn getpw
-function appeared in
-.At v6 .
-.Sh BUGS
-The area pointed to by
-.Fa buf
-must be large enough to hold the user name.
-
-All of the bugs from
-.Xr getpwent 3
-hold valid as well.
diff --git a/lib/libcompat/4.1/getpw.c b/lib/libcompat/4.1/getpw.c
deleted file mode 100644
index 82f7025..0000000
--- a/lib/libcompat/4.1/getpw.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1995 Joerg Wunsch
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Joerg Wunsch
- * 4. The name of the developer may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <pwd.h>
-#include <string.h>
-#include <stdio.h>
-
-int
-#if __STDC__
-getpw(uid_t uid, char *buf)
-#else
-getpw(uid, buf)
- uid_t uid;
- char *buf;
-#endif
-{
- struct passwd *pw;
-
- pw = getpwuid(uid);
- endpwent();
-
- if(pw == 0) return -1;
-
- strncpy(buf, pw->pw_name, L_cuserid);
- return 0;
-}
diff --git a/lib/libcompat/4.1/gtty.c b/lib/libcompat/4.1/gtty.c
deleted file mode 100644
index 5517ae9..0000000
--- a/lib/libcompat/4.1/gtty.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1994 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Christopher G. Demetriou.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-
-#include <sgtty.h>
-
-/*
- * Get tty modes.
- * This was defined in ioctl_compat.h as:
- * #define gtty(fd, tty) ioctl(fd, TIOCGETP, tty)
- */
-
-#undef gtty
-
-int
-gtty(fd, tty)
- int fd;
- struct sgttyb *tty;
-{
-
- return (ioctl(fd, TIOCGETP, tty));
-}
diff --git a/lib/libcompat/4.1/stty.3 b/lib/libcompat/4.1/stty.3
deleted file mode 100644
index 32bb114..0000000
--- a/lib/libcompat/4.1/stty.3
+++ /dev/null
@@ -1,95 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)stty.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt STTY 3
-.Os BSD 4.2
-.Sh NAME
-.Nm stty ,
-.Nm gtty
-.Nd set and get terminal state (defunct)
-.Sh SYNOPSIS
-.Fd #include <sgtty.h>
-.Ft int
-.Fn stty "int fd" "struct sgttyb *buf"
-.Ft int
-.Fn gtty "int fd" "struct sgttyb *buf"
-.Sh DESCRIPTION
-.Bf -symbolic
-These interfaces are obsoleted by ioctl(2).
-They are available from the compatibility library, libcompat.
-.Ef
-.Pp
-The
-.Fn stty
-function
-sets the state of the terminal associated with
-.Fa fd .
-The
-.Fn gtty
-function
-retrieves the state of the terminal associated
-with
-.Fa fd .
-To set the state of a terminal the call must have
-write permission.
-.Pp
-The
-.Fn stty
-call is actually
-.Ql ioctl(fd, TIOCSETP, buf) ,
-while
-the
-.Fn gtty
-call is
-.Ql ioctl(fd, TIOCGETP, buf) .
-See
-.Xr ioctl 2
-and
-.Xr tty 4
-for an explanation.
-.Sh DIAGNOSTICS
-If the call is successful 0 is returned, otherwise \-1 is
-returned and the global variable
-.Va errno
-contains the reason for the failure.
-.Sh SEE ALSO
-.Xr ioctl 2 ,
-.Xr tty 4
-.Sh HISTORY
-The
-.Fn stty
-and
-.Fn gtty
-functions appeared in
-.Bx 4.2 .
diff --git a/lib/libcompat/4.1/stty.c b/lib/libcompat/4.1/stty.c
deleted file mode 100644
index 3a73c93..0000000
--- a/lib/libcompat/4.1/stty.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1994 Christopher G. Demetriou
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Christopher G. Demetriou.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif /* not lint */
-
-#include <sgtty.h>
-
-/*
- * Set tty modes.
- * This was defined in ioctl_compat.h as:
- * #define stty(fd, tty) ioctl(fd, TIOCSETP, tty)
- */
-
-#undef stty
-
-int
-stty(fd, tty)
- int fd;
- struct sgttyb *tty;
-{
-
- return (ioctl(fd, TIOCSETP, tty));
-}
diff --git a/lib/libcompat/4.1/vlimit.3 b/lib/libcompat/4.1/vlimit.3
deleted file mode 100644
index 4736800..0000000
--- a/lib/libcompat/4.1/vlimit.3
+++ /dev/null
@@ -1,125 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)vlimit.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt VLIMIT 3
-.Os BSD 4
-.Sh NAME
-.Nm vlimit
-.Nd control maximum system resource consumption
-.Sh SYNOPSIS
-.Fd #include <sys/vlimit.h>
-.Fn vlimit resource value
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is obsoleted by getrlimit(2).
-It is available from the compatibility library, libcompat.
-.Ef
-.Pp
-Limits the consumption by the current process and each process
-it creates to not individually exceed
-.Fa value
-on the specified
-.Fa resource .
-If
-.Fa value
-is specified as \-1, then the current limit is returned and the
-limit is unchanged.
-The resources which are currently controllable are:
-.Bl -tag -width LIM_NORAISE
-.It Dv LIM_NORAISE
-A pseudo-limit; if set non-zero then the limits may not be raised.
-Only the super-user may remove the
-.Em noraise
-restriction.
-.It Dv LIM_CPU
-the maximum
-number of cpu-seconds to be used by each process
-.It Dv LIM_FSIZE
-the largest single file which can be created
-.It Dv LIM_DATA
-the maximum growth of the data+stack region via
-.Xr sbrk 2
-beyond the end of the program text
-.It Dv LIM_STACK
-the maximum
-size of the automatically-extended stack region
-.It Dv LIM_CORE
-the size of the largest core dump that will be created.
-.It Dv LIM_MAXRSS
-a soft limit for the amount of physical memory (in bytes) to be given
-to the program. If memory is tight, the system will prefer to take memory
-from processes which are exceeding their declared
-.Dv LIM_MAXRSS.
-.El
-.Pp
-Because this information is stored in the per-process information
-this system call must be executed directly by the shell if it
-is to affect all future processes created by the shell;
-.Xr limit
-is thus a built-in command to
-.Xr csh 1 .
-.Pp
-The system refuses to extend the data or stack space when the limits
-would be exceeded in the normal way; a
-.Xr brk 2
-call fails if the data space limit is reached, or the process is
-killed when the stack limit is reached (since the stack cannot be
-extended, there is no way to send a signal!).
-.Pp
-A file
-.Tn I/O
-operation which would create a file which is too large
-will cause a signal
-.Dv SIGXFSZ
-to be generated, this normally terminates
-the process, but may be caught.
-When the cpu time limit is exceeded, a signal
-.Dv SIGXCPU
-is sent to the
-offending process; to allow it time to process the signal it is
-given 5 seconds grace by raising the
-.Tn CPU
-time limit.
-.Sh SEE ALSO
-.Xr csh 1
-.Sh HISTORY
-The
-.Fn vlimit
-function appeared in
-.Bx 4.2 .
-.Sh BUGS
-.Dv LIM_NORAISE
-no longer exists.
-
-This function has not yet been reimplemented.
diff --git a/lib/libcompat/4.1/vtimes.3 b/lib/libcompat/4.1/vtimes.3
deleted file mode 100644
index 6eeee64..0000000
--- a/lib/libcompat/4.1/vtimes.3
+++ /dev/null
@@ -1,143 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)vtimes.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt VTIMES 3
-.Os BSD 4
-.Sh NAME
-.Nm vtimes
-.Nd get information about resource utilization
-.Sh SYNOPSIS
-.Fd #include <sys/vtimes.h>
-.Fn vtimes "struct vtimes *par_vm" "struct vtimes *ch_vm"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is obsoleted by getrusage(2).
-It is available from the compatibility library, libcompat.
-.Ef
-.Pp
-The
-.Fn vtimes
-function
-returns accounting information for the current process and for
-the terminated child processes of the current
-process. Either
-.Fa par_vm
-or
-.Fa ch_vm
-or both may be 0, in which case only the information for the pointers
-which are non-zero is returned.
-.Pp
-After the call, each buffer contains information as defined by the
-contents of the include file
-.Pa /usr/include/sys/vtimes.h :
-.Bd -literal -offset indent
-struct vtimes {
- int vm_utime; /* user time (*HZ) */
- int vm_stime; /* system time (*HZ) */
- /* divide next two by utime+stime to get averages */
- unsigned vm_idsrss; /* integral of d+s rss */
- unsigned vm_ixrss; /* integral of text rss */
- int vm_maxrss; /* maximum rss */
- int vm_majflt; /* major page faults */
- int vm_minflt; /* minor page faults */
- int vm_nswap; /* number of swaps */
- int vm_inblk; /* block reads */
- int vm_oublk; /* block writes */
-};
-.Ed
-.Pp
-The
-.Fa vm_utime
-and
-.Fa vm_stime
-fields give the user and system
-time respectively in 60ths of a second (or 50ths if that
-is the frequency of wall current in your locality.) The
-.Fa vm_idrss
-and
-.Fa vm_ixrss
-measure memory usage. They are computed by integrating the number of
-memory pages in use each
-over
-.Tn CPU
-time. They are reported as though computed
-discretely, adding the current memory usage (in 512 byte
-pages) each time the clock ticks. If a process used 5 core
-pages over 1 cpu-second for its data and stack, then
-.Fa vm_idsrss
-would have the value 5*60, where
-.Fa vm_utime+vm_stime
-would be the 60.
-The
-.Fa Vm_idsrss
-argument
-integrates data and stack segment
-usage, while
-.Fa vm_ixrss
-integrates text segment usage.
-The
-.Fa Vm_maxrss
-function
-reports the maximum instantaneous sum of the
-text+data+stack core-resident page count.
-.Pp
-The
-.Fa vm_majflt
-field gives the number of page faults which
-resulted in disk activity; the
-.Fa vm_minflt
-field gives the
-number of page faults incurred in simulation of reference
-bits;
-.Fa vm_nswap
-is the number of swaps which occurred. The
-number of file system input/output events are reported in
-.Fa vm_inblk
-and
-.Fa vm_oublk
-These numbers account only for real
-.Tn I/O ;
-data supplied by the caching mechanism is charged only
-to the first process to read or write the data.
-.Sh SEE ALSO
-.Xr getrusage 2 ,
-.Xr wait3 2 ,
-.Xr time 3
-.Sh HISTORY
-The
-.Fn vlimit
-function appeared in
-.Bx 4.2 .
-.Sh BUGS
-This function has not yet been re-implemented.
diff --git a/lib/libcompat/4.3/cfree.3 b/lib/libcompat/4.3/cfree.3
deleted file mode 100644
index 0f5afb2..0000000
--- a/lib/libcompat/4.3/cfree.3
+++ /dev/null
@@ -1,49 +0,0 @@
-.\"
-.\" Copyright (c) 1995 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id$
-.\" " <- this is for hilit19 :)
-.Dd November 23, 1995
-.Dt CFREE 3
-.Os
-.Sh NAME
-.Nm cfree
-.Nd free up allocated memory
-.Sh SYNOPSIS
-.Ft void
-.Fn cfree "void *"
-.Sh DESCRIPTION
-.Bf -symbolic
-The cfree function considered obsolete.
-.br
-It is available from the compatibility library, libcompat.
-.Ef
-.Pp
-The
-.Nm
-function is a synonym for
-.Xr free 3 .
-.Sh SEE ALSO
-.Xr free 3 .
diff --git a/lib/libcompat/4.3/cfree.c b/lib/libcompat/4.3/cfree.c
deleted file mode 100644
index 7f029ff..0000000
--- a/lib/libcompat/4.3/cfree.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)cfree.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <stdlib.h>
-
-void
-cfree(p)
- void *p;
-{
- free(p);
-}
diff --git a/lib/libcompat/4.3/insque.3 b/lib/libcompat/4.3/insque.3
deleted file mode 100644
index 2c6ea06..0000000
--- a/lib/libcompat/4.3/insque.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)insque.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt INSQUE 3
-.Os BSD 4.2
-.Sh NAME
-.Nm insque ,
-.Nm remque
-.Nd insert/remove element from a queue
-.Sh SYNOPSIS
-.Bd -literal
-struct qelem {
- struct qelem *q_forw;
- struct qelem *q_back;
- char q_data[];
-};
-.Ed
-
-.Ft void
-.Fn insque "struct qelem *elem" "struct qelem *pred"
-.Ft void
-.Fn remque "struct qelem *elem"
-.Sh DESCRIPTION
-.Bf -symbolic
-The insque and remque functions are considered obsolete.
-.br
-They are available from the compatibility library, libcompat.
-.Ef
-.Pp
-The
-.Fn insque
-and
-.Fn remque
-functions
-manipulate queues built from doubly linked lists. Each
-element in the queue must be in the form of
-.Dq Li struct qelem .
-The function
-.Fn insque
-inserts
-.Fa elem
-in a queue immediately after
-.Fa pred ;
-.Fn remque
-removes an entry
-.Fa elem
-from a queue.
-.Sh SEE ALSO
-.%T "VAX Architecture Handbook" ,
-pp. 228-235.
-.Sh HISTORY
-The
-.Fn insque
-and
-.Fn remque
-functions appeared in
-.Bx 4.2 .
diff --git a/lib/libcompat/4.3/insque.c b/lib/libcompat/4.3/insque.c
deleted file mode 100644
index 3035976..0000000
--- a/lib/libcompat/4.3/insque.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)insque.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * insque -- vax insque instruction
- *
- * NOTE: this implementation is non-atomic!!
- */
-
-struct vaxque { /* queue format expected by VAX queue instructions */
- struct vaxque *vq_next;
- struct vaxque *vq_prev;
-};
-
-void
-insque(e, prev)
- register struct vaxque *e, *prev;
-{
- e->vq_prev = prev;
- e->vq_next = prev->vq_next;
- prev->vq_next->vq_prev = e;
- prev->vq_next = e;
-}
diff --git a/lib/libcompat/4.3/lsearch.3 b/lib/libcompat/4.3/lsearch.3
deleted file mode 100644
index ac0e6d5..0000000
--- a/lib/libcompat/4.3/lsearch.3
+++ /dev/null
@@ -1,103 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)lsearch.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt LSEARCH 3
-.Os
-.Sh NAME
-.Nm lsearch ,
-.Nm lfind,
-.Nd linear searching routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Ft char *
-.Fn lsearch "const void *key" "const void *base" "size_t *nelp" "size_t width" "int (*compar)(void *, void *)"
-.Ft char *
-.Fn lfind "const void *key" "const void *base" "size_t *nelp" "size_t width" "int (*compar)(void *, void *)"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface was obsolete before it was written.
-It is available from the compatibility library, libcompat.
-.Ef
-.Pp
-The functions
-.Fn lsearch ,
-and
-.Fn lfind
-provide basic linear searching functionality.
-.Pp
-.Fa Base
-is the pointer to the beginning of an array.
-The argument
-.Fa nelp
-is the current number of elements in the array, where each element
-is
-.Fa width
-bytes long.
-The
-.Fa compar
-function
-is a comparison routine which is used to compare two elements.
-It takes two arguments which point to the
-.Fa key
-object and to an array member, in that order, and must return an integer
-less than, equivalent to, or greater than zero if the
-.Fa key
-object is considered, respectively, to be less than, equal to, or greater
-than the array member.
-.Pp
-The
-.Fn lsearch
-and
-.Fn lfind
-functions
-return a pointer into the array referenced by
-.Fa base
-where
-.Fa key
-is located.
-If
-.Fa key
-does not exist,
-.Fn lfind
-will return a null pointer and
-.Fn lsearch
-will add it to the array.
-When an element is added to the array by
-.Fn lsearch
-the location referenced by the argument
-.Fa nelp
-is incremented by one.
-.Sh SEE ALSO
-.Xr bsearch 3 ,
-.Xr db 3
diff --git a/lib/libcompat/4.3/lsearch.c b/lib/libcompat/4.3/lsearch.c
deleted file mode 100644
index be650b4..0000000
--- a/lib/libcompat/4.3/lsearch.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Roger L. Snyder.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)lsearch.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <string.h>
-
-static char *linear_base();
-
-char *
-lsearch(key, base, nelp, width, compar)
- char *key, *base;
- u_int *nelp, width;
- int (*compar)();
-{
- return(linear_base(key, base, nelp, width, compar, 1));
-}
-
-char *
-lfind(key, base, nelp, width, compar)
- char *key, *base;
- u_int *nelp, width;
- int (*compar)();
-{
- return(linear_base(key, base, nelp, width, compar, 0));
-}
-
-static char *
-linear_base(key, base, nelp, width, compar, add_flag)
- char *key, *base;
- u_int *nelp, width;
- int (*compar)(), add_flag;
-{
- register char *element, *end;
-
- end = base + *nelp * width;
- for (element = base; element < end; element += width)
- if (!compar(element, key)) /* key found */
- return(element);
-
- if (!add_flag) /* key not found */
- return(NULL);
-
- /*
- * The UNIX System User's Manual, 1986 edition claims that
- * a NULL pointer is returned by lsearch with errno set
- * appropriately, if there is not enough room in the table
- * to add a new item. This can't be done as none of these
- * routines have any method of determining the size of the
- * table. This comment was isn't in the 1986-87 System V
- * manual.
- */
- ++*nelp;
- bcopy(key, end, (int)width);
- return(end);
-}
diff --git a/lib/libcompat/4.3/re_comp.3 b/lib/libcompat/4.3/re_comp.3
deleted file mode 100644
index 1c6a91d..0000000
--- a/lib/libcompat/4.3/re_comp.3
+++ /dev/null
@@ -1,124 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)re_comp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt RE_COMP 3
-.Os
-.Sh NAME
-.Nm re_comp ,
-.Nm re_exec
-.Nd regular expression handler
-.Sh SYNOPSIS
-.Fd #include <unistd.h>
-.Ft char *
-.Fn re_comp "const char *s"
-.Ft int
-.Fn re_exec "const char *s"
-.Sh DESCRIPTION
-This interface is made obsolete by
-.Xr regex 3 .
-It is available from the compatibility library, libcompat.
-.Pp
-The
-.Fn re_comp
-function
-compiles a string into an internal form suitable for pattern matching.
-The
-.Fn re_exec
-function
-checks the argument string against the last string passed to
-.Fn re_comp .
-.Pp
-The
-.Fn re_comp
-function
-returns 0 if the string
-.Fa s
-was compiled successfully; otherwise a string containing an
-error message is returned. If
-.Fn re_comp
-is passed 0 or a null string, it returns without changing the currently
-compiled regular expression.
-.Pp
-The
-.Fn re_exec
-function
-returns 1 if the string
-.Fa s
-matches the last compiled regular expression, 0 if the string
-.Fa s
-failed to match the last compiled regular expression, and \-1 if the compiled
-regular expression was invalid (indicating an internal error).
-.Pp
-The strings passed to both
-.Fn re_comp
-and
-.Fn re_exec
-may have trailing or embedded newline characters;
-they are terminated by
-.Dv NUL Ns s.
-The regular expressions recognized are described in the manual entry for
-.Xr ed 1 ,
-given the above difference.
-.Sh DIAGNOSTICS
-The
-.Fn re_exec
-function
-returns \-1 for an internal error.
-.Pp
-The
-.Fn re_comp
-function
-returns one of the following strings if an error occurs:
-.Bd -unfilled -offset indent
-No previous regular expression,
-Regular expression too long,
-unmatched \e(,
-missing ],
-too many \e(\e) pairs,
-unmatched \e).
-.Ed
-.Sh SEE ALSO
-.Xr ed 1 ,
-.Xr egrep 1 ,
-.Xr ex 1 ,
-.Xr fgrep 1 ,
-.Xr grep 1 ,
-.Xr regex 3
-.Sh HISTORY
-The
-.Fn re_comp
-and
-.Fn re_exec
-functions appeared in
-.Bx 4.0 .
diff --git a/lib/libcompat/4.3/regex.c b/lib/libcompat/4.3/regex.c
deleted file mode 100644
index 07566b5..0000000
--- a/lib/libcompat/4.3/regex.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*-
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * James da Silva at the University of Maryland at College Park.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Compatibility routines that implement the old re_comp/re_exec interface in
- * terms of the regcomp/regexec interface. It's possible that some programs
- * rely on dark corners of re_comp/re_exec and won't work with this version,
- * but most programs should be fine.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)regex.c 5.1 (Berkeley) 3/29/92";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <stddef.h>
-#include <regexp.h>
-#include <string.h>
-#include <stdlib.h>
-#include <string.h>
-
-static regexp *re_regexp;
-static int re_goterr;
-static char *re_errstr;
-
-char *
-re_comp(s)
- char *s;
-{
- if (s == NULL || *s == '\0') {
- if (re_regexp == NULL)
- return "no previous regular expression";
- return (NULL);
- }
- if (re_regexp)
- free(re_regexp);
- if (re_errstr)
- free(re_errstr);
- re_goterr = 0;
- re_regexp = regcomp(s);
- return (re_goterr ? re_errstr : NULL);
-}
-
-int
-re_exec(s)
- char *s;
-{
- int rc;
-
- re_goterr = 0;
- rc = regexec(re_regexp, s);
- return (re_goterr ? -1 : rc);
-}
-
-void
-regerror(s)
- const char *s;
-{
- re_goterr = 1;
- if (re_errstr)
- free(re_errstr);
- re_errstr = strdup(s);
-}
diff --git a/lib/libcompat/4.3/remque.c b/lib/libcompat/4.3/remque.c
deleted file mode 100644
index e0f9aa3..0000000
--- a/lib/libcompat/4.3/remque.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)remque.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * remque -- vax remque instruction
- *
- * NOTE: this implementation is non-atomic!!
- */
-
-struct vaxque { /* queue format expected by VAX queue instructions */
- struct vaxque *vq_next;
- struct vaxque *vq_prev;
-};
-
-void
-remque(e)
- register struct vaxque *e;
-{
- e->vq_prev->vq_next = e->vq_next;
- e->vq_next->vq_prev = e->vq_prev;
-}
diff --git a/lib/libcompat/4.3/rexec.3 b/lib/libcompat/4.3/rexec.3
deleted file mode 100644
index f6d7478..0000000
--- a/lib/libcompat/4.3/rexec.3
+++ /dev/null
@@ -1,131 +0,0 @@
-.\" Copyright (c) 1983, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)rexec.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt REXEC 3
-.Os BSD 4.2
-.Sh NAME
-.Nm rexec
-.Nd return stream to a remote command
-.Sh SYNOPSIS
-.Ft int
-.Fn rexec "char **ahost" "int inport" "char *user" "char *passwd" "char *cmd" "int *fd2p"
-.Sh DESCRIPTION
-.Bf -symbolic
-This interface is obsoleted by krcmd(3).
-It is available from the compatibility library, libcompat.
-.Ef
-.Pp
-The
-.Fn rexec
-function
-looks up the host
-.Fa *ahost
-using
-.Xr gethostbyname 3 ,
-returning \-1 if the host does not exist.
-Otherwise
-.Fa *ahost
-is set to the standard name of the host.
-If a username and password are both specified, then these
-are used to authenticate to the foreign host; otherwise
-the environment and then the user's
-.Pa .netrc
-file in his
-home directory are searched for appropriate information.
-If all this fails, the user is prompted for the information.
-.Pp
-The port
-.Fa inport
-specifies which well-known
-.Tn DARPA
-Internet port to use for
-the connection; the call
-.Ql getservbyname(\\*qexec\\*q, \\*qtcp\\*q)
-(see
-.Xr getservent 3 )
-will return a pointer to a structure, which contains the
-necessary port.
-The protocol for connection is described in detail in
-.Xr rexecd 8 .
-.Pp
-If the connection succeeds,
-a socket in the Internet domain of type
-.Dv SOCK_STREAM
-is returned to
-the caller, and given to the remote command as
-.Em stdin
-and
-.Em stdout .
-If
-.Fa fd2p
-is non-zero, then an auxiliary channel to a control
-process will be setup, and a descriptor for it will be placed
-in
-.Fa *fd2p .
-The control process will return diagnostic
-output from the command (unit 2) on this channel, and will also
-accept bytes on this channel as being
-.Tn UNIX
-signal numbers, to be
-forwarded to the process group of the command. The diagnostic
-information returned does not include remote authorization failure,
-as the secondary connection is set up after authorization has been
-verified.
-If
-.Fa fd2p
-is 0, then the
-.Em stderr
-(unit 2 of the remote
-command) will be made the same as the
-.Em stdout
-and no
-provision is made for sending arbitrary signals to the remote process,
-although you may be able to get its attention by using out-of-band data.
-.Sh SEE ALSO
-.Xr rcmd 3 ,
-.Xr rexecd 8
-.Sh HISTORY
-The
-.Fn rexec
-function appeared in
-.Bx 4.2 .
-.Sh BUGS
-The
-.Fn rexec
-function sends the unencrypted password across the network.
-.Pp
-The underlying service is considered a big security hole and therefore
-not enabled on many sites, see
-.Xr rexecd 8
-for explanations.
diff --git a/lib/libcompat/4.3/rexec.c b/lib/libcompat/4.3/rexec.c
deleted file mode 100644
index beb2108..0000000
--- a/lib/libcompat/4.3/rexec.c
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * Copyright (c) 1980, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)rexec.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/socket.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-
-#include <netinet/in.h>
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <netdb.h>
-#include <errno.h>
-#include <ctype.h>
-#include <err.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-int rexecoptions;
-char *getpass(), *getlogin();
-
-/*
- * Options and other state info.
- */
-struct macel {
- char mac_name[9]; /* macro name */
- char *mac_start; /* start of macro in macbuf */
- char *mac_end; /* end of macro in macbuf */
-};
-
-int macnum; /* number of defined macros */
-struct macel macros[16];
-char macbuf[4096];
-
-static FILE *cfile;
-
-#define DEFAULT 1
-#define LOGIN 2
-#define PASSWD 3
-#define ACCOUNT 4
-#define MACDEF 5
-#define ID 10
-#define MACH 11
-
-static char tokval[100];
-
-static struct toktab {
- char *tokstr;
- int tval;
-} toktab[]= {
- { "default", DEFAULT },
- { "login", LOGIN },
- { "password", PASSWD },
- { "passwd", PASSWD },
- { "account", ACCOUNT },
- { "machine", MACH },
- { "macdef", MACDEF },
- { NULL, 0 }
-};
-
-static int
-token()
-{
- char *cp;
- int c;
- struct toktab *t;
-
- if (feof(cfile) || ferror(cfile))
- return (0);
- while ((c = getc(cfile)) != EOF &&
- (c == '\n' || c == '\t' || c == ' ' || c == ','))
- continue;
- if (c == EOF)
- return (0);
- cp = tokval;
- if (c == '"') {
- while ((c = getc(cfile)) != EOF && c != '"') {
- if (c == '\\')
- c = getc(cfile);
- *cp++ = c;
- }
- } else {
- *cp++ = c;
- while ((c = getc(cfile)) != EOF
- && c != '\n' && c != '\t' && c != ' ' && c != ',') {
- if (c == '\\')
- c = getc(cfile);
- *cp++ = c;
- }
- }
- *cp = 0;
- if (tokval[0] == 0)
- return (0);
- for (t = toktab; t->tokstr; t++)
- if (!strcmp(t->tokstr, tokval))
- return (t->tval);
- return (ID);
-}
-
-static int
-ruserpass(host, aname, apass, aacct)
- char *host, **aname, **apass, **aacct;
-{
- char *hdir, buf[BUFSIZ], *tmp;
- char myname[MAXHOSTNAMELEN], *mydomain;
- int t, i, c, usedefault = 0;
- struct stat stb;
-
- hdir = getenv("HOME");
- if (hdir == NULL)
- hdir = ".";
- (void) sprintf(buf, "%s/.netrc", hdir);
- cfile = fopen(buf, "r");
- if (cfile == NULL) {
- if (errno != ENOENT)
- warn("%s", buf);
- return (0);
- }
- if (gethostname(myname, sizeof(myname)) < 0)
- myname[0] = '\0';
- if ((mydomain = strchr(myname, '.')) == NULL)
- mydomain = "";
-next:
- while ((t = token())) switch(t) {
-
- case DEFAULT:
- usedefault = 1;
- /* FALL THROUGH */
-
- case MACH:
- if (!usedefault) {
- if (token() != ID)
- continue;
- /*
- * Allow match either for user's input host name
- * or official hostname. Also allow match of
- * incompletely-specified host in local domain.
- */
- if (strcasecmp(host, tokval) == 0)
- goto match;
- if ((tmp = strchr(host, '.')) != NULL &&
- strcasecmp(tmp, mydomain) == 0 &&
- strncasecmp(host, tokval, tmp - host) == 0 &&
- tokval[tmp - host] == '\0')
- goto match;
- continue;
- }
- match:
- while ((t = token()) && t != MACH && t != DEFAULT) switch(t) {
-
- case LOGIN:
- if (token())
- if (*aname == 0) {
- *aname = malloc((unsigned) strlen(tokval) + 1);
- (void) strcpy(*aname, tokval);
- } else {
- if (strcmp(*aname, tokval))
- goto next;
- }
- break;
- case PASSWD:
- if ((*aname == 0 || strcmp(*aname, "anonymous")) &&
- fstat(fileno(cfile), &stb) >= 0 &&
- (stb.st_mode & 077) != 0) {
- warnx("Error: .netrc file is readable by others.");
- warnx("Remove password or make file unreadable by others.");
- goto bad;
- }
- if (token() && *apass == 0) {
- *apass = malloc((unsigned) strlen(tokval) + 1);
- (void) strcpy(*apass, tokval);
- }
- break;
- case ACCOUNT:
- if (fstat(fileno(cfile), &stb) >= 0
- && (stb.st_mode & 077) != 0) {
- warnx("Error: .netrc file is readable by others.");
- warnx("Remove account or make file unreadable by others.");
- goto bad;
- }
- if (token() && *aacct == 0) {
- *aacct = malloc((unsigned) strlen(tokval) + 1);
- (void) strcpy(*aacct, tokval);
- }
- break;
- case MACDEF:
- while ((c=getc(cfile)) != EOF &&
- (c == ' ' || c == '\t'))
- ;
- if (c == EOF || c == '\n') {
- printf("Missing macdef name argument.\n");
- goto bad;
- }
- if (macnum == 16) {
- printf("Limit of 16 macros have already been defined\n");
- goto bad;
- }
- tmp = macros[macnum].mac_name;
- *tmp++ = c;
- for (i=0; i < 8 && (c=getc(cfile)) != EOF &&
- !isspace(c); ++i) {
- *tmp++ = c;
- }
- if (c == EOF) {
- printf("Macro definition missing null line terminator.\n");
- goto bad;
- }
- *tmp = '\0';
- if (c != '\n') {
- while ((c=getc(cfile)) != EOF && c != '\n');
- }
- if (c == EOF) {
- printf("Macro definition missing null line terminator.\n");
- goto bad;
- }
- if (macnum == 0) {
- macros[macnum].mac_start = macbuf;
- }
- else {
- macros[macnum].mac_start = macros[macnum-1].mac_end + 1;
- }
- tmp = macros[macnum].mac_start;
- while (tmp != macbuf + 4096) {
- if ((c=getc(cfile)) == EOF) {
- printf("Macro definition missing null line terminator.\n");
- goto bad;
- }
- *tmp = c;
- if (*tmp == '\n') {
- if (*(tmp-1) == '\0') {
- macros[macnum++].mac_end = tmp - 1;
- break;
- }
- *tmp = '\0';
- }
- tmp++;
- }
- if (tmp == macbuf + 4096) {
- printf("4K macro buffer exceeded\n");
- goto bad;
- }
- break;
- default:
- warnx("Unknown .netrc keyword %s", tokval);
- break;
- }
- goto done;
- }
-done:
- (void) fclose(cfile);
- return (0);
-bad:
- (void) fclose(cfile);
- return (-1);
-}
-
-int
-rexec(ahost, rport, name, pass, cmd, fd2p)
- char **ahost;
- int rport;
- char *name, *pass, *cmd;
- int *fd2p;
-{
- struct sockaddr_in sin, sin2, from;
- struct hostent *hp;
- u_short port;
- int s, timo = 1, s3;
- char c;
-
- hp = gethostbyname(*ahost);
- if (hp == 0) {
- herror(*ahost);
- return (-1);
- }
- *ahost = hp->h_name;
- ruserpass(hp->h_name, &name, &pass);
-retry:
- s = socket(AF_INET, SOCK_STREAM, 0);
- if (s < 0) {
- perror("rexec: socket");
- return (-1);
- }
- sin.sin_family = hp->h_addrtype;
- sin.sin_port = rport;
- bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length);
- if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
- if (errno == ECONNREFUSED && timo <= 16) {
- (void) close(s);
- sleep(timo);
- timo *= 2;
- goto retry;
- }
- perror(hp->h_name);
- return (-1);
- }
- if (fd2p == 0) {
- (void) write(s, "", 1);
- port = 0;
- } else {
- char num[8];
- int s2, sin2len;
-
- s2 = socket(AF_INET, SOCK_STREAM, 0);
- if (s2 < 0) {
- (void) close(s);
- return (-1);
- }
- listen(s2, 1);
- sin2len = sizeof (sin2);
- if (getsockname(s2, (struct sockaddr *)&sin2, &sin2len) < 0 ||
- sin2len != sizeof (sin2)) {
- perror("getsockname");
- (void) close(s2);
- goto bad;
- }
- port = ntohs((u_short)sin2.sin_port);
- (void) sprintf(num, "%u", port);
- (void) write(s, num, strlen(num)+1);
- { int len = sizeof (from);
- s3 = accept(s2, (struct sockaddr *)&from, &len);
- close(s2);
- if (s3 < 0) {
- perror("accept");
- port = 0;
- goto bad;
- }
- }
- *fd2p = s3;
- }
- (void) write(s, name, strlen(name) + 1);
- /* should public key encypt the password here */
- (void) write(s, pass, strlen(pass) + 1);
- (void) write(s, cmd, strlen(cmd) + 1);
- if (read(s, &c, 1) != 1) {
- perror(*ahost);
- goto bad;
- }
- if (c != 0) {
- while (read(s, &c, 1) == 1) {
- (void) write(2, &c, 1);
- if (c == '\n')
- break;
- }
- goto bad;
- }
- return (s);
-bad:
- if (port)
- (void) close(*fd2p);
- (void) close(s);
- return (-1);
-}
diff --git a/lib/libcompat/4.4/cuserid.3 b/lib/libcompat/4.4/cuserid.3
deleted file mode 100644
index 6d25fba..0000000
--- a/lib/libcompat/4.4/cuserid.3
+++ /dev/null
@@ -1,82 +0,0 @@
-.\"
-.\" Copyright (c) 1995 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by Joerg Wunsch
-.\" 4. The name of the developer may not be used to endorse or promote
-.\" products derived from this software without specific prior written
-.\" permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id$
-.\"
-.Dd April 10, 1995
-.Os
-.Dt CUSERID 3
-.Sh NAME
-.Nm cuserid
-.Nd get user name associated with effective UID
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Ft char *
-.Fn cuserid "char *s"
-.Sh DESCRIPTION
-.Bf -symbolic
-The cuserid function is made obsolete by getpwuid.
-.br
-It is available from the compatibility library, libcompat.
-.Ef
-.Pp
-The function
-.Nm cuserid
-gets the user name associated with the effective UID of the current
-process. If the argument
-.Fa s
-is non-zero, the name is copied to the buffer it is pointing to,
-and that address is being returned. This buffer must provide space
-for at least
-.Em L_cuserid
-characters, this constant is defined in
-.Pa Aq stdio.h .
-
-If
-.Fa s
-is zero, an internal array is used an its address will be returned.
-.Sh RETURN VALUES
-.Nm cuserid
-returns the address of an array where the name has been stored to.
-
-If the name associated with the effective UID of the current process
-could not be found, either a null pointer will be returned, or
-.Po
-if
-.Fa s
-is non-zero
-.Pc
-the buffer
-.Fa s
-will be filled with a null string.
-.Sh SEE ALSO
-.Xr geteuid 2 ,
-.Xr getpwuid 3
diff --git a/lib/libcompat/4.4/cuserid.c b/lib/libcompat/4.4/cuserid.c
deleted file mode 100644
index 2fc5cc8..0000000
--- a/lib/libcompat/4.4/cuserid.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)cuserid.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <pwd.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-char *
-cuserid(s)
- char *s;
-{
- register struct passwd *pwd;
-
- if ((pwd = getpwuid(geteuid())) == NULL) {
- if (s)
- *s = '\0';
- return (s);
- }
- if (s) {
- (void)strncpy(s, pwd->pw_name, L_cuserid);
- return (s);
- }
- return (pwd->pw_name);
-}
diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile
deleted file mode 100644
index 5bf8c33..0000000
--- a/lib/libcompat/Makefile
+++ /dev/null
@@ -1,74 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/4/93
-
-LIB=compat
-CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale
-AINC= -I${.CURDIR}/../libc/${MACHINE}
-NOPIC=
-
-.PATH: ${.CURDIR}/4.1/${MACHINE} ${.CURDIR}/4.1 \
- ${.CURDIR}/4.3/${MACHINE} ${.CURDIR}/4.3 \
- ${.CURDIR}/4.4/${MACHINE} ${.CURDIR}/4.4 \
- ${.CURDIR}/regexp \
- ${.CURDIR}/SysV
-
-# compat 4.1 sources
-# XXX MISSING: tell.c vlimit.c vtimes.c
-SRCS+= ascftime.c cftime.c ftime.c getpw.c gtty.c stty.c
-
-.if (${MACHINE} == "vax")
-SRCS+= reset.s
-.endif
-
-MAN3+= 4.1/ftime.3 4.1/getpw.3 4.1/stty.3 4.1/vlimit.3 4.1/vtimes.3
-MAN3+= 4.1/cftime.3
-
-MLINKS+=stty.3 gtty.3
-MLINKS+=cftime.3 ascftime.3
-
-# compat 4.3 sources
-# XXX MISSING: ecvt.c gcvt.c sibuf.c sobuf.c strout.c
-SRCS+= cfree.c lsearch.c regex.c rexec.c
-
-.if (${MACHINE} == "hp300" || ${MACHINE} == "luna68k")
-SRCS+= insque.s remque.s
-.elif (${MACHINE} == "i386")
-SRCS+= insque.c remque.c
-.elif (${MACHINE} == "mips")
-SRCS+= insque.c remque.c
-.elif (${MACHINE} == "sparc")
-SRCS+= insque.c remque.c
-.elif (${MACHINE} == "tahoe")
-SRCS+= nargs.s insque.s remque.s
-.elif (${MACHINE} == "vax")
-SRCS+= nargs.s insque.s remque.s
-.endif
-
-# XXX MISSING: ecvt.0
-MAN3+= 4.3/cfree.3 4.3/insque.3 4.3/lsearch.3 4.3/re_comp.3 4.3/rexec.3
-
-# XXX MISSING: ecvt.3, so can't MLINK
-#MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3
-MLINKS+=insque.3 remque.3
-MLINKS+=re_comp.3 re_exec.3
-MLINKS+=lsearch.3 lfind.3
-
-# compat 4.4 sources
-SRCS+= cuserid.c
-MAN3+= 4.4/cuserid.3
-
-# regexp sources
-SRCS+= regerror.c regexp.c regsub.c
-
-MAN3+= regexp/regexp.3
-
-# XXX name clash with libc
-# MLINKS+=regexp.3 regcomp.3 regexp.3 regexec.3 regexp.3 regerror.3
-MLINKS+=regexp.3 regsub.3
-
-# SysV compat sources
-SRCS+= ftok.c
-
-MAN3+= SysV/ftok.3
-
-
-.include <bsd.lib.mk>
diff --git a/lib/libcompat/SysV/ftok.3 b/lib/libcompat/SysV/ftok.3
deleted file mode 100644
index 03b586d..0000000
--- a/lib/libcompat/SysV/ftok.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. The name of the author may not be used to endorse or promote products
-.\" derived from this software without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: ftok.3,v 1.7 1997/02/22 15:06:08 peter Exp $
-.Dd June 24, 1994
-.Os
-.Dt ftok 3
-.Sh NAME
-.Nm ftok
-.Nd create IPC identifier from path name
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ipc.h>
-.Ft key_t
-.Fn ftok "const char *path" "int id"
-.Sh DESCRIPTION
-.Bf -symbolic
-This function is available from the compatibility library, libcompat.
-.Ef
-The
-.Fn ftok
-function attempts to create a unique key suitable for use with the
-.Xr msgget 3 ,
-.Xr semget 2
-and
-.Xr shmget 2
-functions given the
-.Fa path
-of an existing file and a user-selectable
-.Fa id .
-.Pp
-The specified
-.Fa path
-must specify an existing file that is accessible to the calling process
-or the call will fail. Also, note that links to files will return the
-same key, given the same
-.Fa id .
-.Sh RETURN VALUES
-The
-.Fn ftok
-function will return -1 if
-.Fa path
-does not exist or if it cannot be accessed by the calling process.
-.Sh SEE ALSO
-.Xr semget 2 ,
-.Xr shmget 2 ,
-.Xr msgget 3
-.Sh HISTORY
-The
-.Fn ftok
-function originates with System V and is typically used by programs
-that use the System V IPC routines.
-.Sh AUTHOR
-.Bl -tag
-Thorsten Lockert <tholo@sigmasoft.com>
-.El
-.Sh BUGS
-The returned key is computed based on the device minor number and inode of the
-specified
-.Fa path
-in combination with the lower 8 bits of the given
-.Fa id .
-Thus it is quite possible for the routine to return duplicate keys.
diff --git a/lib/libcompat/SysV/ftok.c b/lib/libcompat/SysV/ftok.c
deleted file mode 100644
index 4f59725..0000000
--- a/lib/libcompat/SysV/ftok.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ipc.h>
-
-key_t
-ftok(path, id)
- const char *path;
- char id;
-{
- struct stat st;
-
- if (stat(path, &st) < 0)
- return (key_t)-1;
-
- return (key_t) (id << 24 | (st.st_dev & 0xff) << 16 | (st.st_ino & 0xffff));
-}
diff --git a/lib/libcompat/regexp/COPYRIGHT b/lib/libcompat/regexp/COPYRIGHT
deleted file mode 100644
index 48b3f43..0000000
--- a/lib/libcompat/regexp/COPYRIGHT
+++ /dev/null
@@ -1,22 +0,0 @@
-This entire subtree is copyright the University of Toronto.
-The following copyright notice applies to all files found here. None of
-these files contain AT&T proprietary source code.
-_____________________________________________________________________________
-
- Copyright (c) 1986 by University of Toronto.
- Written by Henry Spencer. Not derived from licensed software.
-
- Permission is granted to anyone to use this software for any
- purpose on any computer system, and to redistribute it freely,
- subject to the following restrictions:
-
- 1. The author is not responsible for the consequences of use of
- this software, no matter how awful, even if they arise
- from defects in it.
-
- 2. The origin of this software must not be misrepresented, either
- by explicit claim or by omission.
-
- 3. Altered versions must be plainly marked as such, and must not
- be misrepresented as being the original software.
-
diff --git a/lib/libcompat/regexp/README b/lib/libcompat/regexp/README
deleted file mode 100644
index 37d6f51..0000000
--- a/lib/libcompat/regexp/README
+++ /dev/null
@@ -1,84 +0,0 @@
-This is a nearly-public-domain reimplementation of the V8 regexp(3) package.
-It gives C programs the ability to use egrep-style regular expressions, and
-does it in a much cleaner fashion than the analogous routines in SysV.
-
- Copyright (c) 1986 by University of Toronto.
- Written by Henry Spencer. Not derived from licensed software.
-
- Permission is granted to anyone to use this software for any
- purpose on any computer system, and to redistribute it freely,
- subject to the following restrictions:
-
- 1. The author is not responsible for the consequences of use of
- this software, no matter how awful, even if they arise
- from defects in it.
-
- 2. The origin of this software must not be misrepresented, either
- by explicit claim or by omission.
-
- 3. Altered versions must be plainly marked as such, and must not
- be misrepresented as being the original software.
-
-Barring a couple of small items in the BUGS list, this implementation is
-believed 100% compatible with V8. It should even be binary-compatible,
-sort of, since the only fields in a "struct regexp" that other people have
-any business touching are declared in exactly the same way at the same
-location in the struct (the beginning).
-
-This implementation is *NOT* AT&T/Bell code, and is not derived from licensed
-software. Even though U of T is a V8 licensee. This software is based on
-a V8 manual page sent to me by Dennis Ritchie (the manual page enclosed
-here is a complete rewrite and hence is not covered by AT&T copyright).
-The software was nearly complete at the time of arrival of our V8 tape.
-I haven't even looked at V8 yet, although a friend elsewhere at U of T has
-been kind enough to run a few test programs using the V8 regexp(3) to resolve
-a few fine points. I admit to some familiarity with regular-expression
-implementations of the past, but the only one that this code traces any
-ancestry to is the one published in Kernighan & Plauger (from which this
-one draws ideas but not code).
-
-Simplistically: put this stuff into a source directory, copy regexp.h into
-/usr/include, inspect Makefile for compilation options that need changing
-to suit your local environment, and then do "make r". This compiles the
-regexp(3) functions, compiles a test program, and runs a large set of
-regression tests. If there are no complaints, then put regexp.o, regsub.o,
-and regerror.o into your C library, and regexp.3 into your manual-pages
-directory.
-
-Note that if you don't put regexp.h into /usr/include *before* compiling,
-you'll have to add "-I." to CFLAGS before compiling.
-
-The files are:
-
-Makefile instructions to make everything
-regexp.3 manual page
-regexp.h header file, for /usr/include
-regexp.c source for regcomp() and regexec()
-regsub.c source for regsub()
-regerror.c source for default regerror()
-regmagic.h internal header file
-try.c source for test program
-timer.c source for timing program
-tests test list for try and timer
-
-This implementation uses nondeterministic automata rather than the
-deterministic ones found in some other implementations, which makes it
-simpler, smaller, and faster at compiling regular expressions, but slower
-at executing them. In theory, anyway. This implementation does employ
-some special-case optimizations to make the simpler cases (which do make
-up the bulk of regular expressions actually used) run quickly. In general,
-if you want blazing speed you're in the wrong place. Replacing the insides
-of egrep with this stuff is probably a mistake; if you want your own egrep
-you're going to have to do a lot more work. But if you want to use regular
-expressions a little bit in something else, you're in luck. Note that many
-existing text editors use nondeterministic regular-expression implementations,
-so you're in good company.
-
-This stuff should be pretty portable, given appropriate option settings.
-If your chars have less than 8 bits, you're going to have to change the
-internal representation of the automaton, although knowledge of the details
-of this is fairly localized. There are no "reserved" char values except for
-NUL, and no special significance is attached to the top bit of chars.
-The string(3) functions are used a fair bit, on the grounds that they are
-probably faster than coding the operations in line. Some attempts at code
-tuning have been made, but this is invariably a bit machine-specific.
diff --git a/lib/libcompat/regexp/regerror.c b/lib/libcompat/regexp/regerror.c
deleted file mode 100644
index 6d0077d..0000000
--- a/lib/libcompat/regexp/regerror.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <regexp.h>
-#include <stdio.h>
-
-void
-regerror(s)
-const char *s;
-{
-#ifdef ERRAVAIL
- error("regexp: %s", s);
-#else
-/*
- fprintf(stderr, "regexp(3): %s\n", s);
- exit(1);
-*/
- return; /* let std. egrep handle errors */
-#endif
- /* NOTREACHED */
-}
diff --git a/lib/libcompat/regexp/regexp.3 b/lib/libcompat/regexp/regexp.3
deleted file mode 100644
index f99202e..0000000
--- a/lib/libcompat/regexp/regexp.3
+++ /dev/null
@@ -1,320 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)regexp.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt REGEXP 3
-.Os
-.Sh NAME
-.Nm regcomp ,
-.Nm regexec ,
-.Nm regsub ,
-.Nm regerror
-.Nd regular expression handlers
-.Sh SYNOPSIS
-.Fd #include <regexp.h>
-.Ft regexp *
-.Fn regcomp "const char *exp"
-.Ft int
-.Fn regexec "const regexp *prog" "const char *string"
-.Ft void
-.Fn regsub "const regexp *prog" "const char *source" "char *dest"
-.Sh DESCRIPTION
-This interface is made obsolete by
-.Xr regex 3 .
-.br
-It is available from the compatibility library, libcompat.
-.Pp
-The
-.Fn regcomp ,
-.Fn regexec ,
-.Fn regsub ,
-and
-.Fn regerror
-functions
-implement
-.Xr egrep 1 Ns -style
-regular expressions and supporting facilities.
-.Pp
-The
-.Fn regcomp
-function
-compiles a regular expression into a structure of type
-.Xr regexp ,
-and returns a pointer to it.
-The space has been allocated using
-.Xr malloc 3
-and may be released by
-.Xr free .
-.Pp
-The
-.Fn regexec
-function
-matches a
-.Dv NUL Ns -terminated
-.Fa string
-against the compiled regular expression
-in
-.Fa prog .
-It returns 1 for success and 0 for failure, and adjusts the contents of
-.Fa prog Ns 's
-.Em startp
-and
-.Em endp
-(see below) accordingly.
-.Pp
-The members of a
-.Xr regexp
-structure include at least the following (not necessarily in order):
-.Bd -literal -offset indent
-char *startp[NSUBEXP];
-char *endp[NSUBEXP];
-.Ed
-.Pp
-where
-.Dv NSUBEXP
-is defined (as 10) in the header file.
-Once a successful
-.Fn regexec
-has been done using the
-.Fn regexp ,
-each
-.Em startp Ns - Em endp
-pair describes one substring
-within the
-.Fa string ,
-with the
-.Em startp
-pointing to the first character of the substring and
-the
-.Em endp
-pointing to the first character following the substring.
-The 0th substring is the substring of
-.Fa string
-that matched the whole
-regular expression.
-The others are those substrings that matched parenthesized expressions
-within the regular expression, with parenthesized expressions numbered
-in left-to-right order of their opening parentheses.
-.Pp
-The
-.Fn regsub
-function
-copies
-.Fa source
-to
-.Fa dest ,
-making substitutions according to the
-most recent
-.Fn regexec
-performed using
-.Fa prog .
-Each instance of `&' in
-.Fa source
-is replaced by the substring
-indicated by
-.Em startp Ns Bq
-and
-.Em endp Ns Bq .
-Each instance of
-.Sq \e Ns Em n ,
-where
-.Em n
-is a digit, is replaced by
-the substring indicated by
-.Em startp Ns Bq Em n
-and
-.Em endp Ns Bq Em n .
-To get a literal `&' or
-.Sq \e Ns Em n
-into
-.Fa dest ,
-prefix it with `\e';
-to get a literal `\e' preceding `&' or
-.Sq \e Ns Em n ,
-prefix it with
-another `\e'.
-.Pp
-The
-.Fn regerror
-function
-is called whenever an error is detected in
-.Fn regcomp ,
-.Fn regexec ,
-or
-.Fn regsub .
-The default
-.Fn regerror
-writes the string
-.Fa msg ,
-with a suitable indicator of origin,
-on the standard
-error output
-and invokes
-.Xr exit 2 .
-The
-.Fn regerror
-function
-can be replaced by the user if other actions are desirable.
-.Sh REGULAR EXPRESSION SYNTAX
-A regular expression is zero or more
-.Em branches ,
-separated by `|'.
-It matches anything that matches one of the branches.
-.Pp
-A branch is zero or more
-.Em pieces ,
-concatenated.
-It matches a match for the first, followed by a match for the second, etc.
-.Pp
-A piece is an
-.Em atom
-possibly followed by `*', `+', or `?'.
-An atom followed by `*' matches a sequence of 0 or more matches of the atom.
-An atom followed by `+' matches a sequence of 1 or more matches of the atom.
-An atom followed by `?' matches a match of the atom, or the null string.
-.Pp
-An atom is a regular expression in parentheses (matching a match for the
-regular expression), a
-.Em range
-(see below), `.'
-(matching any single character), `^' (matching the null string at the
-beginning of the input string), `$' (matching the null string at the
-end of the input string), a `\e' followed by a single character (matching
-that character), or a single character with no other significance
-(matching that character).
-.Pp
-A
-.Em range
-is a sequence of characters enclosed in `[]'.
-It normally matches any single character from the sequence.
-If the sequence begins with `^',
-it matches any single character
-.Em not
-from the rest of the sequence.
-If two characters in the sequence are separated by `\-', this is shorthand
-for the full list of
-.Tn ASCII
-characters between them
-(e.g. `[0-9]' matches any decimal digit).
-To include a literal `]' in the sequence, make it the first character
-(following a possible `^').
-To include a literal `\-', make it the first or last character.
-.Sh AMBIGUITY
-If a regular expression could match two different parts of the input string,
-it will match the one which begins earliest.
-If both begin in the same place but match different lengths, or match
-the same length in different ways, life gets messier, as follows.
-.Pp
-In general, the possibilities in a list of branches are considered in
-left-to-right order, the possibilities for `*', `+', and `?' are
-considered longest-first, nested constructs are considered from the
-outermost in, and concatenated constructs are considered leftmost-first.
-The match that will be chosen is the one that uses the earliest
-possibility in the first choice that has to be made.
-If there is more than one choice, the next will be made in the same manner
-(earliest possibility) subject to the decision on the first choice.
-And so forth.
-.Pp
-For example,
-.Sq Li (ab|a)b*c
-could match
-`abc' in one of two ways.
-The first choice is between `ab' and `a'; since `ab' is earlier, and does
-lead to a successful overall match, it is chosen.
-Since the `b' is already spoken for,
-the `b*' must match its last possibility\(emthe empty string\(emsince
-it must respect the earlier choice.
-.Pp
-In the particular case where no `|'s are present and there is only one
-`*', `+', or `?', the net effect is that the longest possible
-match will be chosen.
-So
-.Sq Li ab* ,
-presented with `xabbbby', will match `abbbb'.
-Note that if
-.Sq Li ab* ,
-is tried against `xabyabbbz', it
-will match `ab' just after `x', due to the begins-earliest rule.
-(In effect, the decision on where to start the match is the first choice
-to be made, hence subsequent choices must respect it even if this leads them
-to less-preferred alternatives.)
-.Sh RETURN VALUES
-The
-.Fn regcomp
-function
-returns
-.Dv NULL
-for a failure
-.Pf ( Fn regerror
-permitting),
-where failures are syntax errors, exceeding implementation limits,
-or applying `+' or `*' to a possibly-null operand.
-.Sh SEE ALSO
-.Xr ed 1 ,
-.Xr egrep 1 ,
-.Xr ex 1 ,
-.Xr expr 1 ,
-.Xr fgrep 1 ,
-.Xr grep 1 ,
-.Xr regex 3
-.Sh HISTORY
-Both code and manual page for
-.Fn regcomp ,
-.Fn regexec ,
-.Fn regsub ,
-and
-.Fn regerror
-were written at the University of Toronto
-and appeared in
-.Bx 4.3 tahoe .
-They are intended to be compatible with the Bell V8
-.Xr regexp 3 ,
-but are not derived from Bell code.
-.Sh BUGS
-Empty branches and empty regular expressions are not portable to V8.
-.Pp
-The restriction against
-applying `*' or `+' to a possibly-null operand is an artifact of the
-simplistic implementation.
-.Pp
-Does not support
-.Xr egrep Ns 's
-newline-separated branches;
-neither does the V8
-.Xr regexp 3 ,
-though.
-.Pp
-Due to emphasis on
-compactness and simplicity,
-it's not strikingly fast.
-It does give special attention to handling simple cases quickly.
diff --git a/lib/libcompat/regexp/regexp.c b/lib/libcompat/regexp/regexp.c
deleted file mode 100644
index fc97378..0000000
--- a/lib/libcompat/regexp/regexp.c
+++ /dev/null
@@ -1,1333 +0,0 @@
-/*
- * regcomp and regexec -- regsub and regerror are elsewhere
- *
- * Copyright (c) 1986 by University of Toronto.
- * Written by Henry Spencer. Not derived from licensed software.
- *
- * Permission is granted to anyone to use this software for any
- * purpose on any computer system, and to redistribute it freely,
- * subject to the following restrictions:
- *
- * 1. The author is not responsible for the consequences of use of
- * this software, no matter how awful, even if they arise
- * from defects in it.
- *
- * 2. The origin of this software must not be misrepresented, either
- * by explicit claim or by omission.
- *
- * 3. Altered versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore,
- *** hoptoad!gnu, on 27 Dec 1986, to add \n as an alternative to |
- *** to assist in implementing egrep.
- *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore,
- *** hoptoad!gnu, on 27 Dec 1986, to add \< and \> for word-matching
- *** as in BSD grep and ex.
- *** THIS IS AN ALTERED VERSION. It was altered by John Gilmore,
- *** hoptoad!gnu, on 28 Dec 1986, to optimize characters quoted with \.
- *** THIS IS AN ALTERED VERSION. It was altered by James A. Woods,
- *** ames!jaw, on 19 June 1987, to quash a regcomp() redundancy.
- *
- * Beware that some of this code is subtly aware of the way operator
- * precedence is structured in regular expressions. Serious changes in
- * regular-expression syntax might require a total rethink.
- */
-#include <limits.h>
-#include <regexp.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include "collate.h"
-#include "regmagic.h"
-
-/*
- * The "internal use only" fields in regexp.h are present to pass info from
- * compile to execute that permits the execute phase to run lots faster on
- * simple cases. They are:
- *
- * regstart char that must begin a match; '\0' if none obvious
- * reganch is the match anchored (at beginning-of-line only)?
- * regmust string (pointer into program) that match must include, or NULL
- * regmlen length of regmust string
- *
- * Regstart and reganch permit very fast decisions on suitable starting points
- * for a match, cutting down the work a lot. Regmust permits fast rejection
- * of lines that cannot possibly match. The regmust tests are costly enough
- * that regcomp() supplies a regmust only if the r.e. contains something
- * potentially expensive (at present, the only such thing detected is * or +
- * at the start of the r.e., which can involve a lot of backup). Regmlen is
- * supplied because the test in regexec() needs it and regcomp() is computing
- * it anyway.
- */
-
-/*
- * Structure for regexp "program". This is essentially a linear encoding
- * of a nondeterministic finite-state machine (aka syntax charts or
- * "railroad normal form" in parsing technology). Each node is an opcode
- * plus a "next" pointer, possibly plus an operand. "Next" pointers of
- * all nodes except BRANCH implement concatenation; a "next" pointer with
- * a BRANCH on both ends of it is connecting two alternatives. (Here we
- * have one of the subtle syntax dependencies: an individual BRANCH (as
- * opposed to a collection of them) is never concatenated with anything
- * because of operator precedence.) The operand of some types of node is
- * a literal string; for others, it is a node leading into a sub-FSM. In
- * particular, the operand of a BRANCH node is the first node of the branch.
- * (NB this is *not* a tree structure: the tail of the branch connects
- * to the thing following the set of BRANCHes.) The opcodes are:
- */
-
-/* definition number opnd? meaning */
-#define END 0 /* no End of program. */
-#define BOL 1 /* no Match "" at beginning of line. */
-#define EOL 2 /* no Match "" at end of line. */
-#define ANY 3 /* no Match any one character. */
-#define ANYOF 4 /* str Match any character in this string. */
-#define ANYBUT 5 /* str Match any character not in this string. */
-#define BRANCH 6 /* node Match this alternative, or the next... */
-#define BACK 7 /* no Match "", "next" ptr points backward. */
-#define EXACTLY 8 /* str Match this string. */
-#define NOTHING 9 /* no Match empty string. */
-#define STAR 10 /* node Match this (simple) thing 0 or more times. */
-#define PLUS 11 /* node Match this (simple) thing 1 or more times. */
-#define WORDA 12 /* no Match "" at wordchar, where prev is nonword */
-#define WORDZ 13 /* no Match "" at nonwordchar, where prev is word */
-#define OPEN 20 /* no Mark this point in input as start of #n. */
- /* OPEN+1 is number 1, etc. */
-#define CLOSE 30 /* no Analogous to OPEN. */
-
-/*
- * Opcode notes:
- *
- * BRANCH The set of branches constituting a single choice are hooked
- * together with their "next" pointers, since precedence prevents
- * anything being concatenated to any individual branch. The
- * "next" pointer of the last BRANCH in a choice points to the
- * thing following the whole choice. This is also where the
- * final "next" pointer of each individual branch points; each
- * branch starts with the operand node of a BRANCH node.
- *
- * BACK Normal "next" pointers all implicitly point forward; BACK
- * exists to make loop structures possible.
- *
- * STAR,PLUS '?', and complex '*' and '+', are implemented as circular
- * BRANCH structures using BACK. Simple cases (one character
- * per match) are implemented with STAR and PLUS for speed
- * and to minimize recursive plunges.
- *
- * OPEN,CLOSE ...are numbered at compile time.
- */
-
-/*
- * A node is one char of opcode followed by two chars of "next" pointer.
- * "Next" pointers are stored as two 8-bit pieces, high order first. The
- * value is a positive offset from the opcode of the node containing it.
- * An operand, if any, simply follows the node. (Note that much of the
- * code generation knows about this implicit relationship.)
- *
- * Using two bytes for the "next" pointer is vast overkill for most things,
- * but allows patterns to get big without disasters.
- */
-#define OP(p) (*(p))
-#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&0377))
-#define OPERAND(p) ((p) + 3)
-
-/*
- * See regmagic.h for one further detail of program structure.
- */
-
-
-/*
- * Utility definitions.
- */
-#ifndef CHARBITS
-#define UCHARAT(p) ((int)*(unsigned char *)(p))
-#else
-#define UCHARAT(p) ((int)*(p)&CHARBITS)
-#endif
-
-#define FAIL(m) { regerror(m); return(NULL); }
-#define ISMULT(c) ((c) == '*' || (c) == '+' || (c) == '?')
-
-/*
- * Flags to be passed up and down.
- */
-#define HASWIDTH 01 /* Known never to match null string. */
-#define SIMPLE 02 /* Simple enough to be STAR/PLUS operand. */
-#define SPSTART 04 /* Starts with * or +. */
-#define WORST 0 /* Worst case. */
-
-/*
- * Global work variables for regcomp().
- */
-static char *regparse; /* Input-scan pointer. */
-static int regnpar; /* () count. */
-static char regdummy;
-static char *regcode; /* Code-emit pointer; &regdummy = don't. */
-static long regsize; /* Code size. */
-
-/*
- * Forward declarations for regcomp()'s friends.
- */
-#ifndef STATIC
-#define STATIC static
-#endif
-STATIC char *reg();
-STATIC char *regbranch();
-STATIC char *regpiece();
-STATIC char *regatom();
-STATIC char *regnode();
-STATIC char *regnext();
-STATIC void regc();
-STATIC void reginsert();
-STATIC void regtail();
-STATIC void regoptail();
-#ifdef STRCSPN
-STATIC int strcspn();
-#endif
-
-/*
- - regcomp - compile a regular expression into internal code
- *
- * We can't allocate space until we know how big the compiled form will be,
- * but we can't compile it (and thus know how big it is) until we've got a
- * place to put the code. So we cheat: we compile it twice, once with code
- * generation turned off and size counting turned on, and once "for real".
- * This also means that we don't allocate space until we are sure that the
- * thing really will compile successfully, and we never have to move the
- * code and thus invalidate pointers into it. (Note that it has to be in
- * one piece because free() must be able to free it all.)
- *
- * Beware that the optimization-preparation code in here knows about some
- * of the structure of the compiled regexp.
- */
-regexp *
-regcomp(exp)
-const char *exp;
-{
- register regexp *r;
- register char *scan;
- register char *longest;
- register int len;
- int flags;
-
- if (exp == NULL)
- FAIL("NULL argument");
-
- /* First pass: determine size, legality. */
-#ifdef notdef
- if (exp[0] == '.' && exp[1] == '*') exp += 2; /* aid grep */
-#endif
- regparse = (char *)exp;
- regnpar = 1;
- regsize = 0L;
- regcode = &regdummy;
- regc(MAGIC);
- if (reg(0, &flags) == NULL)
- return(NULL);
-
- /* Small enough for pointer-storage convention? */
- if (regsize >= 32767L) /* Probably could be 65535L. */
- FAIL("regexp too big");
-
- /* Allocate space. */
- r = (regexp *)malloc(sizeof(regexp) + (unsigned)regsize);
- if (r == NULL)
- FAIL("out of space");
-
- /* Second pass: emit code. */
- regparse = (char *)exp;
- regnpar = 1;
- regcode = r->program;
- regc(MAGIC);
- if (reg(0, &flags) == NULL)
- return(NULL);
-
- /* Dig out information for optimizations. */
- r->regstart = '\0'; /* Worst-case defaults. */
- r->reganch = 0;
- r->regmust = NULL;
- r->regmlen = 0;
- scan = r->program+1; /* First BRANCH. */
- if (OP(regnext(scan)) == END) { /* Only one top-level choice. */
- scan = OPERAND(scan);
-
- /* Starting-point info. */
- if (OP(scan) == EXACTLY)
- r->regstart = *OPERAND(scan);
- else if (OP(scan) == BOL)
- r->reganch++;
-
- /*
- * If there's something expensive in the r.e., find the
- * longest literal string that must appear and make it the
- * regmust. Resolve ties in favor of later strings, since
- * the regstart check works with the beginning of the r.e.
- * and avoiding duplication strengthens checking. Not a
- * strong reason, but sufficient in the absence of others.
- */
- if (flags&SPSTART) {
- longest = NULL;
- len = 0;
- for (; scan != NULL; scan = regnext(scan))
- if (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) {
- longest = OPERAND(scan);
- len = strlen(OPERAND(scan));
- }
- r->regmust = longest;
- r->regmlen = len;
- }
- }
-
- return(r);
-}
-
-/*
- - reg - regular expression, i.e. main body or parenthesized thing
- *
- * Caller must absorb opening parenthesis.
- *
- * Combining parenthesis handling with the base level of regular expression
- * is a trifle forced, but the need to tie the tails of the branches to what
- * follows makes it hard to avoid.
- */
-static char *
-reg(paren, flagp)
-int paren; /* Parenthesized? */
-int *flagp;
-{
- register char *ret;
- register char *br;
- register char *ender;
- register int parno;
- int flags;
-
- *flagp = HASWIDTH; /* Tentatively. */
-
- /* Make an OPEN node, if parenthesized. */
- if (paren) {
- if (regnpar >= NSUBEXP)
- FAIL("too many ()");
- parno = regnpar;
- regnpar++;
- ret = regnode(OPEN+parno);
- } else
- ret = NULL;
-
- /* Pick up the branches, linking them together. */
- br = regbranch(&flags);
- if (br == NULL)
- return(NULL);
- if (ret != NULL)
- regtail(ret, br); /* OPEN -> first. */
- else
- ret = br;
- if (!(flags&HASWIDTH))
- *flagp &= ~HASWIDTH;
- *flagp |= flags&SPSTART;
- while (*regparse == '|' || *regparse == '\n') {
- regparse++;
- br = regbranch(&flags);
- if (br == NULL)
- return(NULL);
- regtail(ret, br); /* BRANCH -> BRANCH. */
- if (!(flags&HASWIDTH))
- *flagp &= ~HASWIDTH;
- *flagp |= flags&SPSTART;
- }
-
- /* Make a closing node, and hook it on the end. */
- ender = regnode((paren) ? CLOSE+parno : END);
- regtail(ret, ender);
-
- /* Hook the tails of the branches to the closing node. */
- for (br = ret; br != NULL; br = regnext(br))
- regoptail(br, ender);
-
- /* Check for proper termination. */
- if (paren && *regparse++ != ')') {
- FAIL("unmatched ()");
- } else if (!paren && *regparse != '\0') {
- if (*regparse == ')') {
- FAIL("unmatched ()");
- } else
- FAIL("junk on end"); /* "Can't happen". */
- /* NOTREACHED */
- }
-
- return(ret);
-}
-
-/*
- - regbranch - one alternative of an | operator
- *
- * Implements the concatenation operator.
- */
-static char *
-regbranch(flagp)
-int *flagp;
-{
- register char *ret;
- register char *chain;
- register char *latest;
- int flags;
-
- *flagp = WORST; /* Tentatively. */
-
- ret = regnode(BRANCH);
- chain = NULL;
- while (*regparse != '\0' && *regparse != ')' &&
- *regparse != '\n' && *regparse != '|') {
- latest = regpiece(&flags);
- if (latest == NULL)
- return(NULL);
- *flagp |= flags&HASWIDTH;
- if (chain == NULL) /* First piece. */
- *flagp |= flags&SPSTART;
- else
- regtail(chain, latest);
- chain = latest;
- }
- if (chain == NULL) /* Loop ran zero times. */
- (void) regnode(NOTHING);
-
- return(ret);
-}
-
-/*
- - regpiece - something followed by possible [*+?]
- *
- * Note that the branching code sequences used for ? and the general cases
- * of * and + are somewhat optimized: they use the same NOTHING node as
- * both the endmarker for their branch list and the body of the last branch.
- * It might seem that this node could be dispensed with entirely, but the
- * endmarker role is not redundant.
- */
-static char *
-regpiece(flagp)
-int *flagp;
-{
- register char *ret;
- register char op;
- register char *next;
- int flags;
-
- ret = regatom(&flags);
- if (ret == NULL)
- return(NULL);
-
- op = *regparse;
- if (!ISMULT(op)) {
- *flagp = flags;
- return(ret);
- }
-
- if (!(flags&HASWIDTH) && op != '?')
- FAIL("*+ operand could be empty");
- *flagp = (op != '+') ? (WORST|SPSTART) : (WORST|HASWIDTH);
-
- if (op == '*' && (flags&SIMPLE))
- reginsert(STAR, ret);
- else if (op == '*') {
- /* Emit x* as (x&|), where & means "self". */
- reginsert(BRANCH, ret); /* Either x */
- regoptail(ret, regnode(BACK)); /* and loop */
- regoptail(ret, ret); /* back */
- regtail(ret, regnode(BRANCH)); /* or */
- regtail(ret, regnode(NOTHING)); /* null. */
- } else if (op == '+' && (flags&SIMPLE))
- reginsert(PLUS, ret);
- else if (op == '+') {
- /* Emit x+ as x(&|), where & means "self". */
- next = regnode(BRANCH); /* Either */
- regtail(ret, next);
- regtail(regnode(BACK), ret); /* loop back */
- regtail(next, regnode(BRANCH)); /* or */
- regtail(ret, regnode(NOTHING)); /* null. */
- } else if (op == '?') {
- /* Emit x? as (x|) */
- reginsert(BRANCH, ret); /* Either x */
- regtail(ret, regnode(BRANCH)); /* or */
- next = regnode(NOTHING); /* null. */
- regtail(ret, next);
- regoptail(ret, next);
- }
- regparse++;
- if (ISMULT(*regparse))
- FAIL("nested *?+");
-
- return(ret);
-}
-
-/*
- - regatom - the lowest level
- *
- * Optimization: gobbles an entire sequence of ordinary characters so that
- * it can turn them into a single node, which is smaller to store and
- * faster to run. Backslashed characters are exceptions, each becoming a
- * separate node; the code is simpler that way and it's not worth fixing.
- */
-static char *
-regatom(flagp)
-int *flagp;
-{
- register char *ret;
- int flags;
-
- *flagp = WORST; /* Tentatively. */
-
- switch (*regparse++) {
- /* FIXME: these chars only have meaning at beg/end of pat? */
- case '^':
- ret = regnode(BOL);
- break;
- case '$':
- ret = regnode(EOL);
- break;
- case '.':
- ret = regnode(ANY);
- *flagp |= HASWIDTH|SIMPLE;
- break;
- case '[': {
- register int class;
- register int classend;
- int i;
-
- if (*regparse == '^') { /* Complement of range. */
- ret = regnode(ANYBUT);
- regparse++;
- } else
- ret = regnode(ANYOF);
- if (*regparse == ']' || *regparse == '-')
- regc(*regparse++);
- while (*regparse != '\0' && *regparse != ']') {
- if (*regparse == '-') {
- regparse++;
- if (*regparse == ']' || *regparse == '\0')
- regc('-');
- else {
- class = UCHARAT(regparse-2);
- classend = UCHARAT(regparse);
- if (__collate_load_error) {
- if (class > classend)
- FAIL("invalid [] range");
- for (class++; class <= classend; class++)
- regc(class);
- } else {
- if (__collate_range_cmp(class, classend) > 0)
- FAIL("invalid [] range");
- for (i = 0; i <= UCHAR_MAX; i++)
- if ( i != class
- && __collate_range_cmp(class, i) <= 0
- && __collate_range_cmp(i, classend) <= 0
- )
- regc(i);
- }
- regparse++;
- }
- } else
- regc(*regparse++);
- }
- regc('\0');
- if (*regparse != ']')
- FAIL("unmatched []");
- regparse++;
- *flagp |= HASWIDTH|SIMPLE;
- }
- break;
- case '(':
- ret = reg(1, &flags);
- if (ret == NULL)
- return(NULL);
- *flagp |= flags&(HASWIDTH|SPSTART);
- break;
- case '\0':
- case '|':
- case '\n':
- case ')':
- FAIL("internal urp"); /* Supposed to be caught earlier. */
- break;
- case '?':
- case '+':
- case '*':
- FAIL("?+* follows nothing");
- break;
- case '\\':
- switch (*regparse++) {
- case '\0':
- FAIL("trailing \\");
- break;
- case '<':
- ret = regnode(WORDA);
- break;
- case '>':
- ret = regnode(WORDZ);
- break;
- /* FIXME: Someday handle \1, \2, ... */
- default:
- /* Handle general quoted chars in exact-match routine */
- goto de_fault;
- }
- break;
- de_fault:
- default:
- /*
- * Encode a string of characters to be matched exactly.
- *
- * This is a bit tricky due to quoted chars and due to
- * '*', '+', and '?' taking the SINGLE char previous
- * as their operand.
- *
- * On entry, the char at regparse[-1] is going to go
- * into the string, no matter what it is. (It could be
- * following a \ if we are entered from the '\' case.)
- *
- * Basic idea is to pick up a good char in ch and
- * examine the next char. If it's *+? then we twiddle.
- * If it's \ then we frozzle. If it's other magic char
- * we push ch and terminate the string. If none of the
- * above, we push ch on the string and go around again.
- *
- * regprev is used to remember where "the current char"
- * starts in the string, if due to a *+? we need to back
- * up and put the current char in a separate, 1-char, string.
- * When regprev is NULL, ch is the only char in the
- * string; this is used in *+? handling, and in setting
- * flags |= SIMPLE at the end.
- */
- {
- char *regprev;
- register char ch;
-
- regparse--; /* Look at cur char */
- ret = regnode(EXACTLY);
- for ( regprev = 0 ; ; ) {
- ch = *regparse++; /* Get current char */
- switch (*regparse) { /* look at next one */
-
- default:
- regc(ch); /* Add cur to string */
- break;
-
- case '.': case '[': case '(':
- case ')': case '|': case '\n':
- case '$': case '^':
- case '\0':
- /* FIXME, $ and ^ should not always be magic */
- magic:
- regc(ch); /* dump cur char */
- goto done; /* and we are done */
-
- case '?': case '+': case '*':
- if (!regprev) /* If just ch in str, */
- goto magic; /* use it */
- /* End mult-char string one early */
- regparse = regprev; /* Back up parse */
- goto done;
-
- case '\\':
- regc(ch); /* Cur char OK */
- switch (regparse[1]){ /* Look after \ */
- case '\0':
- case '<':
- case '>':
- /* FIXME: Someday handle \1, \2, ... */
- goto done; /* Not quoted */
- default:
- /* Backup point is \, scan * point is after it. */
- regprev = regparse;
- regparse++;
- continue; /* NOT break; */
- }
- }
- regprev = regparse; /* Set backup point */
- }
- done:
- regc('\0');
- *flagp |= HASWIDTH;
- if (!regprev) /* One char? */
- *flagp |= SIMPLE;
- }
- break;
- }
-
- return(ret);
-}
-
-/*
- - regnode - emit a node
- */
-static char * /* Location. */
-regnode(op)
-char op;
-{
- register char *ret;
- register char *ptr;
-
- ret = regcode;
- if (ret == &regdummy) {
- regsize += 3;
- return(ret);
- }
-
- ptr = ret;
- *ptr++ = op;
- *ptr++ = '\0'; /* Null "next" pointer. */
- *ptr++ = '\0';
- regcode = ptr;
-
- return(ret);
-}
-
-/*
- - regc - emit (if appropriate) a byte of code
- */
-static void
-regc(b)
-char b;
-{
- if (regcode != &regdummy)
- *regcode++ = b;
- else
- regsize++;
-}
-
-/*
- - reginsert - insert an operator in front of already-emitted operand
- *
- * Means relocating the operand.
- */
-static void
-reginsert(op, opnd)
-char op;
-char *opnd;
-{
- register char *src;
- register char *dst;
- register char *place;
-
- if (regcode == &regdummy) {
- regsize += 3;
- return;
- }
-
- src = regcode;
- regcode += 3;
- dst = regcode;
- while (src > opnd)
- *--dst = *--src;
-
- place = opnd; /* Op node, where operand used to be. */
- *place++ = op;
- *place++ = '\0';
- *place++ = '\0';
-}
-
-/*
- - regtail - set the next-pointer at the end of a node chain
- */
-static void
-regtail(p, val)
-char *p;
-char *val;
-{
- register char *scan;
- register char *temp;
- register int offset;
-
- if (p == &regdummy)
- return;
-
- /* Find last node. */
- scan = p;
- for (;;) {
- temp = regnext(scan);
- if (temp == NULL)
- break;
- scan = temp;
- }
-
- if (OP(scan) == BACK)
- offset = scan - val;
- else
- offset = val - scan;
- *(scan+1) = (offset>>8)&0377;
- *(scan+2) = offset&0377;
-}
-
-/*
- - regoptail - regtail on operand of first argument; nop if operandless
- */
-static void
-regoptail(p, val)
-char *p;
-char *val;
-{
- /* "Operandless" and "op != BRANCH" are synonymous in practice. */
- if (p == NULL || p == &regdummy || OP(p) != BRANCH)
- return;
- regtail(OPERAND(p), val);
-}
-
-/*
- * regexec and friends
- */
-
-/*
- * Global work variables for regexec().
- */
-static char *reginput; /* String-input pointer. */
-static char *regbol; /* Beginning of input, for ^ check. */
-static char **regstartp; /* Pointer to startp array. */
-static char **regendp; /* Ditto for endp. */
-
-/*
- * Forwards.
- */
-STATIC int regtry();
-STATIC int regmatch();
-STATIC int regrepeat();
-
-#ifdef DEBUG
-int regnarrate = 0;
-void regdump();
-STATIC char *regprop();
-#endif
-
-/*
- - regexec - match a regexp against a string
- */
-int
-regexec(prog, string)
-register const regexp *prog;
-register const char *string;
-{
- register char *s;
- extern char *strchr();
-
- /* Be paranoid... */
- if (prog == NULL || string == NULL) {
- regerror("NULL parameter");
- return(0);
- }
-
- /* Check validity of program. */
- if (UCHARAT(prog->program) != MAGIC) {
- regerror("corrupted program");
- return(0);
- }
-
- /* If there is a "must appear" string, look for it. */
- if (prog->regmust != NULL) {
- s = (char *)string;
- while ((s = strchr(s, prog->regmust[0])) != NULL) {
- if (strncmp(s, prog->regmust, prog->regmlen) == 0)
- break; /* Found it. */
- s++;
- }
- if (s == NULL) /* Not present. */
- return(0);
- }
-
- /* Mark beginning of line for ^ . */
- regbol = (char *)string;
-
- /* Simplest case: anchored match need be tried only once. */
- if (prog->reganch)
- return(regtry(prog, string));
-
- /* Messy cases: unanchored match. */
- s = (char *)string;
- if (prog->regstart != '\0')
- /* We know what char it must start with. */
- while ((s = strchr(s, prog->regstart)) != NULL) {
- if (regtry(prog, s))
- return(1);
- s++;
- }
- else
- /* We don't -- general case. */
- do {
- if (regtry(prog, s))
- return(1);
- } while (*s++ != '\0');
-
- /* Failure. */
- return(0);
-}
-
-/*
- - regtry - try match at specific point
- */
-static int /* 0 failure, 1 success */
-regtry(prog, string)
-regexp *prog;
-char *string;
-{
- register int i;
- register char **sp;
- register char **ep;
-
- reginput = string;
- regstartp = prog->startp;
- regendp = prog->endp;
-
- sp = prog->startp;
- ep = prog->endp;
- for (i = NSUBEXP; i > 0; i--) {
- *sp++ = NULL;
- *ep++ = NULL;
- }
- if (regmatch(prog->program + 1)) {
- prog->startp[0] = string;
- prog->endp[0] = reginput;
- return(1);
- } else
- return(0);
-}
-
-/*
- - regmatch - main matching routine
- *
- * Conceptually the strategy is simple: check to see whether the current
- * node matches, call self recursively to see whether the rest matches,
- * and then act accordingly. In practice we make some effort to avoid
- * recursion, in particular by going through "ordinary" nodes (that don't
- * need to know whether the rest of the match failed) by a loop instead of
- * by recursion.
- */
-static int /* 0 failure, 1 success */
-regmatch(prog)
-char *prog;
-{
- register char *scan; /* Current node. */
- char *next; /* Next node. */
-
- scan = prog;
-#ifdef DEBUG
- if (scan != NULL && regnarrate)
- fprintf(stderr, "%s(\n", regprop(scan));
-#endif
- while (scan != NULL) {
-#ifdef DEBUG
- if (regnarrate)
- fprintf(stderr, "%s...\n", regprop(scan));
-#endif
- next = regnext(scan);
-
- switch (OP(scan)) {
- case BOL:
- if (reginput != regbol)
- return(0);
- break;
- case EOL:
- if (*reginput != '\0')
- return(0);
- break;
- case WORDA:
- /* Must be looking at a letter, digit, or _ */
- if ((!isalnum((unsigned char)*reginput)) && *reginput != '_')
- return(0);
- /* Prev must be BOL or nonword */
- if (reginput > regbol &&
- (isalnum((unsigned char)reginput[-1]) || reginput[-1] == '_'))
- return(0);
- break;
- case WORDZ:
- /* Must be looking at non letter, digit, or _ */
- if (isalnum((unsigned char)*reginput) || *reginput == '_')
- return(0);
- /* We don't care what the previous char was */
- break;
- case ANY:
- if (*reginput == '\0')
- return(0);
- reginput++;
- break;
- case EXACTLY: {
- register int len;
- register char *opnd;
-
- opnd = OPERAND(scan);
- /* Inline the first character, for speed. */
- if (*opnd != *reginput)
- return(0);
- len = strlen(opnd);
- if (len > 1 && strncmp(opnd, reginput, len) != 0)
- return(0);
- reginput += len;
- }
- break;
- case ANYOF:
- if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) == NULL)
- return(0);
- reginput++;
- break;
- case ANYBUT:
- if (*reginput == '\0' || strchr(OPERAND(scan), *reginput) != NULL)
- return(0);
- reginput++;
- break;
- case NOTHING:
- break;
- case BACK:
- break;
- case OPEN+1:
- case OPEN+2:
- case OPEN+3:
- case OPEN+4:
- case OPEN+5:
- case OPEN+6:
- case OPEN+7:
- case OPEN+8:
- case OPEN+9: {
- register int no;
- register char *save;
-
- no = OP(scan) - OPEN;
- save = reginput;
-
- if (regmatch(next)) {
- /*
- * Don't set startp if some later
- * invocation of the same parentheses
- * already has.
- */
- if (regstartp[no] == NULL)
- regstartp[no] = save;
- return(1);
- } else
- return(0);
- }
- break;
- case CLOSE+1:
- case CLOSE+2:
- case CLOSE+3:
- case CLOSE+4:
- case CLOSE+5:
- case CLOSE+6:
- case CLOSE+7:
- case CLOSE+8:
- case CLOSE+9: {
- register int no;
- register char *save;
-
- no = OP(scan) - CLOSE;
- save = reginput;
-
- if (regmatch(next)) {
- /*
- * Don't set endp if some later
- * invocation of the same parentheses
- * already has.
- */
- if (regendp[no] == NULL)
- regendp[no] = save;
- return(1);
- } else
- return(0);
- }
- break;
- case BRANCH: {
- register char *save;
-
- if (OP(next) != BRANCH) /* No choice. */
- next = OPERAND(scan); /* Avoid recursion. */
- else {
- do {
- save = reginput;
- if (regmatch(OPERAND(scan)))
- return(1);
- reginput = save;
- scan = regnext(scan);
- } while (scan != NULL && OP(scan) == BRANCH);
- return(0);
- /* NOTREACHED */
- }
- }
- break;
- case STAR:
- case PLUS: {
- register char nextch;
- register int no;
- register char *save;
- register int min;
-
- /*
- * Lookahead to avoid useless match attempts
- * when we know what character comes next.
- */
- nextch = '\0';
- if (OP(next) == EXACTLY)
- nextch = *OPERAND(next);
- min = (OP(scan) == STAR) ? 0 : 1;
- save = reginput;
- no = regrepeat(OPERAND(scan));
- while (no >= min) {
- /* If it could work, try it. */
- if (nextch == '\0' || *reginput == nextch)
- if (regmatch(next))
- return(1);
- /* Couldn't or didn't -- back up. */
- no--;
- reginput = save + no;
- }
- return(0);
- }
- break;
- case END:
- return(1); /* Success! */
- break;
- default:
- regerror("memory corruption");
- return(0);
- break;
- }
-
- scan = next;
- }
-
- /*
- * We get here only if there's trouble -- normally "case END" is
- * the terminating point.
- */
- regerror("corrupted pointers");
- return(0);
-}
-
-/*
- - regrepeat - repeatedly match something simple, report how many
- */
-static int
-regrepeat(p)
-char *p;
-{
- register int count = 0;
- register char *scan;
- register char *opnd;
-
- scan = reginput;
- opnd = OPERAND(p);
- switch (OP(p)) {
- case ANY:
- count = strlen(scan);
- scan += count;
- break;
- case EXACTLY:
- while (*opnd == *scan) {
- count++;
- scan++;
- }
- break;
- case ANYOF:
- while (*scan != '\0' && strchr(opnd, *scan) != NULL) {
- count++;
- scan++;
- }
- break;
- case ANYBUT:
- while (*scan != '\0' && strchr(opnd, *scan) == NULL) {
- count++;
- scan++;
- }
- break;
- default: /* Oh dear. Called inappropriately. */
- regerror("internal foulup");
- count = 0; /* Best compromise. */
- break;
- }
- reginput = scan;
-
- return(count);
-}
-
-/*
- - regnext - dig the "next" pointer out of a node
- */
-static char *
-regnext(p)
-register char *p;
-{
- register int offset;
-
- if (p == &regdummy)
- return(NULL);
-
- offset = NEXT(p);
- if (offset == 0)
- return(NULL);
-
- if (OP(p) == BACK)
- return(p-offset);
- else
- return(p+offset);
-}
-
-#ifdef DEBUG
-
-STATIC char *regprop();
-
-/*
- - regdump - dump a regexp onto stdout in vaguely comprehensible form
- */
-void
-regdump(r)
-regexp *r;
-{
- register char *s;
- register char op = EXACTLY; /* Arbitrary non-END op. */
- register char *next;
- extern char *strchr();
-
-
- s = r->program + 1;
- while (op != END) { /* While that wasn't END last time... */
- op = OP(s);
- printf("%2d%s", s-r->program, regprop(s)); /* Where, what. */
- next = regnext(s);
- if (next == NULL) /* Next ptr. */
- printf("(0)");
- else
- printf("(%d)", (s-r->program)+(next-s));
- s += 3;
- if (op == ANYOF || op == ANYBUT || op == EXACTLY) {
- /* Literal string, where present. */
- while (*s != '\0') {
- putchar(*s);
- s++;
- }
- s++;
- }
- putchar('\n');
- }
-
- /* Header fields of interest. */
- if (r->regstart != '\0')
- printf("start `%c' ", r->regstart);
- if (r->reganch)
- printf("anchored ");
- if (r->regmust != NULL)
- printf("must have \"%s\"", r->regmust);
- printf("\n");
-}
-
-/*
- - regprop - printable representation of opcode
- */
-static char *
-regprop(op)
-char *op;
-{
- register char *p;
- static char buf[50];
-
- (void) strcpy(buf, ":");
-
- switch (OP(op)) {
- case BOL:
- p = "BOL";
- break;
- case EOL:
- p = "EOL";
- break;
- case ANY:
- p = "ANY";
- break;
- case ANYOF:
- p = "ANYOF";
- break;
- case ANYBUT:
- p = "ANYBUT";
- break;
- case BRANCH:
- p = "BRANCH";
- break;
- case EXACTLY:
- p = "EXACTLY";
- break;
- case NOTHING:
- p = "NOTHING";
- break;
- case BACK:
- p = "BACK";
- break;
- case END:
- p = "END";
- break;
- case OPEN+1:
- case OPEN+2:
- case OPEN+3:
- case OPEN+4:
- case OPEN+5:
- case OPEN+6:
- case OPEN+7:
- case OPEN+8:
- case OPEN+9:
- sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN);
- p = NULL;
- break;
- case CLOSE+1:
- case CLOSE+2:
- case CLOSE+3:
- case CLOSE+4:
- case CLOSE+5:
- case CLOSE+6:
- case CLOSE+7:
- case CLOSE+8:
- case CLOSE+9:
- sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE);
- p = NULL;
- break;
- case STAR:
- p = "STAR";
- break;
- case PLUS:
- p = "PLUS";
- break;
- case WORDA:
- p = "WORDA";
- break;
- case WORDZ:
- p = "WORDZ";
- break;
- default:
- regerror("corrupted opcode");
- break;
- }
- if (p != NULL)
- (void) strcat(buf, p);
- return(buf);
-}
-#endif
-
-/*
- * The following is provided for those people who do not have strcspn() in
- * their C libraries. They should get off their butts and do something
- * about it; at least one public-domain implementation of those (highly
- * useful) string routines has been published on Usenet.
- */
-#ifdef STRCSPN
-/*
- * strcspn - find length of initial segment of s1 consisting entirely
- * of characters not from s2
- */
-
-static int
-strcspn(s1, s2)
-char *s1;
-char *s2;
-{
- register char *scan1;
- register char *scan2;
- register int count;
-
- count = 0;
- for (scan1 = s1; *scan1 != '\0'; scan1++) {
- for (scan2 = s2; *scan2 != '\0';) /* ++ moved down. */
- if (*scan1 == *scan2++)
- return(count);
- count++;
- }
- return(count);
-}
-#endif
diff --git a/lib/libcompat/regexp/regmagic.h b/lib/libcompat/regexp/regmagic.h
deleted file mode 100644
index 5acf447..0000000
--- a/lib/libcompat/regexp/regmagic.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * The first byte of the regexp internal "program" is actually this magic
- * number; the start node begins in the second byte.
- */
-#define MAGIC 0234
diff --git a/lib/libcompat/regexp/regsub.c b/lib/libcompat/regexp/regsub.c
deleted file mode 100644
index e55b9b6..0000000
--- a/lib/libcompat/regexp/regsub.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * regsub
- *
- * Copyright (c) 1986 by University of Toronto.
- * Written by Henry Spencer. Not derived from licensed software.
- *
- * Permission is granted to anyone to use this software for any
- * purpose on any computer system, and to redistribute it freely,
- * subject to the following restrictions:
- *
- * 1. The author is not responsible for the consequences of use of
- * this software, no matter how awful, even if they arise
- * from defects in it.
- *
- * 2. The origin of this software must not be misrepresented, either
- * by explicit claim or by omission.
- *
- * 3. Altered versions must be plainly marked as such, and must not
- * be misrepresented as being the original software.
- */
-#include <regexp.h>
-#include <stdio.h>
-#include <string.h>
-#include "regmagic.h"
-
-#ifndef CHARBITS
-#define UCHARAT(p) ((int)*(unsigned char *)(p))
-#else
-#define UCHARAT(p) ((int)*(p)&CHARBITS)
-#endif
-
-/*
- - regsub - perform substitutions after a regexp match
- */
-void
-regsub(prog, source, dest)
-const regexp *prog;
-const char *source;
-char *dest;
-{
- register char *src;
- register char *dst;
- register char c;
- register int no;
- register int len;
- extern char *strncpy();
-
- if (prog == NULL || source == NULL || dest == NULL) {
- regerror("NULL parm to regsub");
- return;
- }
- if (UCHARAT(prog->program) != MAGIC) {
- regerror("damaged regexp fed to regsub");
- return;
- }
-
- src = (char *)source;
- dst = dest;
- while ((c = *src++) != '\0') {
- if (c == '&')
- no = 0;
- else if (c == '\\' && '0' <= *src && *src <= '9')
- no = *src++ - '0';
- else
- no = -1;
- if (no < 0) { /* Ordinary character. */
- if (c == '\\' && (*src == '\\' || *src == '&'))
- c = *src++;
- *dst++ = c;
- } else if (prog->startp[no] != NULL && prog->endp[no] != NULL) {
- len = prog->endp[no] - prog->startp[no];
- (void) strncpy(dst, prog->startp[no], len);
- dst += len;
- if (len != 0 && *(dst-1) == '\0') { /* strncpy hit NUL. */
- regerror("damaged match string");
- return;
- }
- }
- }
- *dst++ = '\0';
-}
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
deleted file mode 100644
index 953f9d0..0000000
--- a/lib/libcrypt/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# $Id: Makefile,v 1.9 1997/02/22 15:06:14 peter Exp $
-#
-
-LCRYPTBASE= libcrypt
-LSCRYPTBASE= libscrypt
-
-.if ${BINFORMAT} != elf
-LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
-LSCRYPTSO= ${LSCRYPTBASE}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
-.else
-LCRYPTSO= ${LCRYPTBASE}.so.${SHLIB_MAJOR}
-LSCRYPTSO= ${LSCRYPTBASE}.so.${SHLIB_MAJOR}
-.endif
-
-# called libscrypt - for scramble crypt!
-.PATH: ${.CURDIR}/../libmd
-LIB= scrypt
-SRCS= crypt.c md5c.c
-CFLAGS+= -I${.CURDIR}/../libmd
-
-.if ${BINFORMAT} == elf
-SONAME= ${LCRYPTBASE}.so.${SHLIB_MAJOR}
-.endif
-
-# We only install the links if they do not already exist.
-# This may have to be revised
-
-afterinstall:
-.if !defined(NOPIC)
- @cd ${DESTDIR}${SHLIBDIR}; \
- if [ ! -e ${LCRYPTSO} ]; then \
- rm -f ${LCRYPTSO}; \
- ln -s ${LSCRYPTSO} ${LCRYPTSO}; \
- fi
-.endif
-.if !defined(NOPIC) && ${BINFORMAT} == elf
- @cd ${DESTDIR}${LIBDIR}; \
- if [ ! -e ${LCRYPTBASE}.so ]; then \
- rm -f ${LCRYPTBASE}.so; \
- ln -s ${LSCRYPTBASE}.so libcrypt.so; \
- fi
-.endif
- @cd ${DESTDIR}${LIBDIR}; \
- if [ ! -e ${LCRYPTBASE}.a ]; then \
- rm -f ${LCRYPTBASE}.a; \
- ln -s ${LSCRYPTBASE}.a libcrypt.a; \
- fi
-.if !defined(NOPROFILE)
- @cd ${DESTDIR}${LIBDIR}; \
- if [ ! -e ${LCRYPTBASE}_p.a ]; then \
- rm -f ${LCRYPTBASE}_p.a; \
- ln -s ${LSCRYPTBASE}_p.a libcrypt_p.a; \
- fi
-.endif
-
-.include <bsd.lib.mk>
diff --git a/lib/libcrypt/crypt.c b/lib/libcrypt/crypt.c
deleted file mode 100644
index c0a8dc9..0000000
--- a/lib/libcrypt/crypt.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Header: /home/ncvs/src/lib/libcrypt/crypt.c,v 1.6 1997/01/14 06:09:00 jkh Exp $";
-#endif /* LIBC_SCCS and not lint */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <md5.h>
-#include <string.h>
-
-static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
- "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-
-static void to64 __P((char *, unsigned long, int));
-
-static void
-to64(s, v, n)
- char *s;
- unsigned long v;
- int n;
-{
-static void to64 __P((char *, unsigned long, int));
-
- while (--n >= 0) {
- *s++ = itoa64[v&0x3f];
- v >>= 6;
- }
-}
-
-/*
- * UNIX password
- *
- * Use MD5 for what it is best at...
- */
-
-char *
-crypt(pw, salt)
- register const char *pw;
- register const char *salt;
-{
- static char *magic = "$1$"; /*
- * This string is magic for
- * this algorithm. Having
- * it this way, we can get
- * get better later on
- */
- static char passwd[120], *p;
- static const char *sp,*ep;
- unsigned char final[16];
- int sl,pl,i,j;
- MD5_CTX ctx,ctx1;
- unsigned long l;
-
- /* Refine the Salt first */
- sp = salt;
-
- /* If it starts with the magic string, then skip that */
- if(!strncmp(sp,magic,strlen(magic)))
- sp += strlen(magic);
-
- /* It stops at the first '$', max 8 chars */
- for(ep=sp;*ep && *ep != '$' && ep < (sp+8);ep++)
- continue;
-
- /* get the length of the true salt */
- sl = ep - sp;
-
- MD5Init(&ctx);
-
- /* The password first, since that is what is most unknown */
- MD5Update(&ctx,pw,strlen(pw));
-
- /* Then our magic string */
- MD5Update(&ctx,magic,strlen(magic));
-
- /* Then the raw salt */
- MD5Update(&ctx,sp,sl);
-
- /* Then just as many characters of the MD5(pw,salt,pw) */
- MD5Init(&ctx1);
- MD5Update(&ctx1,pw,strlen(pw));
- MD5Update(&ctx1,sp,sl);
- MD5Update(&ctx1,pw,strlen(pw));
- MD5Final(final,&ctx1);
- for(pl = strlen(pw); pl > 0; pl -= 16)
- MD5Update(&ctx,final,pl>16 ? 16 : pl);
-
- /* Don't leave anything around in vm they could use. */
- memset(final,0,sizeof final);
-
- /* Then something really weird... */
- for (i = strlen(pw); i ; i >>= 1)
- if(i&1)
- MD5Update(&ctx, final, 1);
- else
- MD5Update(&ctx, pw, 1);
-
- /* Now make the output string */
- strcpy(passwd,magic);
- strncat(passwd,sp,sl);
- strcat(passwd,"$");
-
- MD5Final(final,&ctx);
-
- /*
- * and now, just to make sure things don't run too fast
- * On a 60 Mhz Pentium this takes 34 msec, so you would
- * need 30 seconds to build a 1000 entry dictionary...
- */
- for(i=0;i<1000;i++) {
- MD5Init(&ctx1);
- if(i & 1)
- MD5Update(&ctx1,pw,strlen(pw));
- else
- MD5Update(&ctx1,final,16);
-
- if(i % 3)
- MD5Update(&ctx1,sp,sl);
-
- if(i % 7)
- MD5Update(&ctx1,pw,strlen(pw));
-
- if(i & 1)
- MD5Update(&ctx1,final,16);
- else
- MD5Update(&ctx1,pw,strlen(pw));
- MD5Final(final,&ctx1);
- }
-
- p = passwd + strlen(passwd);
-
- l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; to64(p,l,4); p += 4;
- l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; to64(p,l,4); p += 4;
- l = (final[ 2]<<16) | (final[ 8]<<8) | final[14]; to64(p,l,4); p += 4;
- l = (final[ 3]<<16) | (final[ 9]<<8) | final[15]; to64(p,l,4); p += 4;
- l = (final[ 4]<<16) | (final[10]<<8) | final[ 5]; to64(p,l,4); p += 4;
- l = final[11] ; to64(p,l,2); p += 2;
- *p = '\0';
-
- /* Don't leave anything around in vm they could use. */
- memset(final,0,sizeof final);
-
- return passwd;
-}
-
diff --git a/lib/libcurses/EXAMPLES/ex1.c b/lib/libcurses/EXAMPLES/ex1.c
deleted file mode 100644
index e8a4e0f..0000000
--- a/lib/libcurses/EXAMPLES/ex1.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1992, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)ex1.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-#include <sys/types.h>
-#include <curses.h>
-#include <stdio.h>
-#include <signal.h>
-
-
-#define YSIZE 10
-#define XSIZE 20
-
-int quit();
-
-main()
-{
- int i, j, c;
- size_t len;
- char id[100];
- FILE *fp;
- char *s;
-
- initscr(); /* Always call initscr() first */
- signal(SIGINT, quit); /* Make sure wou have a 'cleanup' fn */
- crmode(); /* We want cbreak mode */
- noecho(); /* We want to have control of chars */
- delwin(stdscr); /* Create our own stdscr */
- stdscr = newwin(YSIZE, XSIZE, 10, 35);
- flushok(stdscr, TRUE); /* Enable flushing of stdout */
- scrollok(stdscr, TRUE); /* Enable scrolling */
- erase(); /* Initially, clear the screen */
-
- standout();
- move(0,0);
- while (1) {
- c = getchar();
- switch(c) {
- case 'q': /* Quit on 'q' */
- quit();
- break;
- case 's': /* Go into standout mode on 's' */
- standout();
- break;
- case 'e': /* Exit standout mode on 'e' */
- standend();
- break;
- case 'r': /* Force a refresh on 'r' */
- wrefresh(curscr);
- break;
- default: /* By default output the character */
- addch(c);
- refresh();
- }
- }
-}
-
-
-int
-quit()
-{
- erase(); /* Terminate by erasing the screen */
- refresh();
- endwin(); /* Always end with endwin() */
- delwin(curscr); /* Return storage */
- delwin(stdscr);
- putchar('\n');
- exit(0);
-}
-
-
-
-
diff --git a/lib/libcurses/Makefile b/lib/libcurses/Makefile
deleted file mode 100644
index 5046265..0000000
--- a/lib/libcurses/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-# From: @(#)Makefile 8.2 (Berkeley) 1/2/94
-# $Id$
-
-CFLAGS+=#-DTFILE=\"/dev/ttyp0\"
-CFLAGS+=-D_CURSES_PRIVATE -I${.CURDIR}
-DPADD= ${LIBTERMCAP}
-LDADD= -ltermcap
-LIB= curses
-SRCS= addbytes.c addch.c addnstr.c box.c clear.c clrtobot.c clrtoeol.c \
- cr_put.c ctrace.c cur_hash.c curses.c delch.c deleteln.c delwin.c \
- erase.c fullname.c getch.c getstr.c id_subwins.c idlok.c initscr.c \
- insch.c insertln.c longname.c move.c mvwin.c newwin.c overlay.c \
- overwrite.c printw.c _putchar.c putchar.c refresh.c scanw.c scroll.c \
- setterm.c standout.c toucholap.c touchwin.c tscroll.c tstp.c tty.c \
- unctrl.c
-MAN3= curses.3
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/curses.h \
- ${DESTDIR}/usr/include
-
-.include <bsd.lib.mk>
diff --git a/lib/libcurses/PSD.doc/Makefile b/lib/libcurses/PSD.doc/Makefile
deleted file mode 100644
index a09c460..0000000
--- a/lib/libcurses/PSD.doc/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-# @(#)Makefile 8.2 (Berkeley) 5/23/94
-
-DIR= psd/19.curses
-SRCS= Master
-MACROS= -me
-
-CLEANFILES+=win_st.gr twinkle1.gr twinkle2.gr life.gr intro.2.tbl appen.A.tbl \
- ex1.gr ex2.gr
-
-.SUFFIXES:
-.SUFFIXES: .c .gr
-
-#
-# this section formats C input source into nice troffable (or nroffable)
-# versions. It uses the capabilites of "vgrind", which sets keywords in
-# bold font, and comments in italics.
-#
-
-# Don't re-run vgrind unless you want to patch the output files.
-VFONT= /usr/libexec/vfontedpr
-.c.gr:
- ${VFONT} $*.c | grep -v "^'wh" > $*.gr
-
-paper.ps: ${SRCS}
- soelim ${SRCS} | ${ROFF} > ${.TARGET}
-
-Master: twinkle1.gr ex1.gr ex2.gr fns.doc intro.5 intro.2.tbl intro.0 intro.1 \
- intro.3 intro.4 intro.6 macros c_macros
-
-intro.2.tbl: intro.2
- ${TBL} intro.2 > intro.2.tbl
-
-.include <bsd.doc.mk>
-
-
diff --git a/lib/libcurses/PSD.doc/Master b/lib/libcurses/PSD.doc/Master
deleted file mode 100644
index 12db62b..0000000
--- a/lib/libcurses/PSD.doc/Master
+++ /dev/null
@@ -1,54 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)Master 8.2 (Berkeley) 5/24/94
-.\"
-.ds Ln Screen Package
-.so macros
-.so c_macros
-.so intro.0
-.pn 3
-.bp
-.so intro.1
-.so intro.2.tbl
-.so intro.3
-.so intro.4
-.so intro.5
-.so intro.6
-.bp
-.so appen.A
-.pn 2
-.oh '\*(Ln''PSD:19-%'
-.eh 'PSD:19-%''\*(Ln'
-.bp
-.bi Contents
-.sp
-.xp
diff --git a/lib/libcurses/PSD.doc/appen.A b/lib/libcurses/PSD.doc/appen.A
deleted file mode 100644
index a40c95d..0000000
--- a/lib/libcurses/PSD.doc/appen.A
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)appen.A 8.1 (Berkeley) 6/8/93
-.\"
-.ie t .oh '\*(Ln Appendix A''PS1:19-%'
-.eh 'PS1:19-%''\*(Ln Appendix A'
-.el .he ''\fIAppendix A\fR''
-.bp
-.(x
-.ti 0
-.b "Appendix A"
-.)x
-.sh 1 "Examples" 1
-.pp
-Here we present a few examples
-of how to use the package.
-They attempt to be representative,
-though not comprehensive. Further examples can be found in the games section
-of the source tree and in various utilities that use the screen such as
-.i systat(1) .
-.pp
-The following examples are intended to demonstrate
-the basic structure of a program
-using the package. An additional, more comprehensive, program can be found in
-the source code in the
-\fIexamples\fP subdirectory.
-.sh 2 "Simple Character Output"
-.pp
-This program demonstrates how to set up a window and output characters to it.
-Also, it demonstrates how one might control the output to the window. If
-you run this program, you will get a demonstration of the character output
-chracteristics discussed in the above Character Output section.
-.(l I
-.so ex1.gr
-.)l
-.sh 2 "Twinkle"
-.pp
-This is a moderately simple program which prints
-patterns on the screen.
-It switches between patterns of asterisks,
-putting them on one by one in random order,
-and then taking them off in the same fashion.
-It is more efficient to write this
-using only the motion optimization,
-as is demonstrated below.
-.(l I
-.so twinkle1.gr
-.)l
diff --git a/lib/libcurses/PSD.doc/appen.B b/lib/libcurses/PSD.doc/appen.B
deleted file mode 100644
index 0f89fa5..0000000
--- a/lib/libcurses/PSD.doc/appen.B
+++ /dev/null
@@ -1,201 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)appen.B 8.1 (Berkeley) 6/8/93
-.\"
-.ie t .oh '\*(Ln Appendix B''PS1:19-%'
-.eh 'PS1:19-%''\*(Ln Appendix B'
-.el .he ''\fIAppendix B\fR''
-.bp
-.(x
-.ti 0
-.b "Appendix B"
-.)x
-.nr $1 0
-.sh 1 "The WINDOW structure"
-.pp
-The WINDOW structure is defined as follows:
-.(l I
-.so win_st.gr
-.)l
-.pp
-.Vn \*_cury \\*
-.(f
-\**
-All variables not normally accessed directly by the user
-are named with an initial
-.Bq \*_
-to avoid conflicts with the user's variables.
-.)f
-and
-.Vn \*_curx
-are the current \*y for the window.
-New characters added to the screen
-are added at this point.
-.Vn \*_maxy
-and
-.Vn \*_maxx
-are the maximum values allowed for
-.Vn \*_cury\*,\*_curx ). (
-.Vn \*_begy
-and
-.Vn \*_begx
-are the starting \*y on the terminal for the window,
-.i i.e. ,
-the window's home.
-.Vn \*_cury ,
-.Vn \*_curx ,
-.Vn \*_maxy ,
-and
-.Vn \*_maxx
-are measured relative to
-.Vn \*_begy\*,\*_begx ), (
-not the terminal's home.
-.pp
-.Vn \*_clear
-tells if a clear-screen sequence is to be generated
-on the next
-.Fn refresh
-call.
-This is only meaningful for screens.
-The initial clear-screen for the first
-.Fn refresh
-call is generated by initially setting clear to be TRUE for
-.Vn curscr ,
-which always generates a clear-screen if set,
-irrelevant of the dimensions of the window involved.
-.Vn \*_leave
-is TRUE if the current \*y and the cursor
-are to be left after the last character changed on the terminal,
-or not moved if there is no change.
-.Vn \*_scroll
-is TRUE
-if scrolling is allowed.
-.pp
-.Vn \*_y
-is a pointer to an array of lines which describe the terminal.
-Thus:
-.(l
-\*_y[i]
-.)l
-.lp
-is a pointer to the
-.Vn i th
-line, and
-.(l
-\*_y[i][j]
-.)l
-.lp
-is the
-.Vn j th
-character on the
-.Vn i th
-line.
-.Vn \*_flags
-can have one or more values
-or'd into it.
-.pp
-For windows that are not subwindows,
-.Vn \*_orig
-is
-NULL .
-For subwindows,
-it points to the main window
-to which the window is subsidiary.
-.Vn \*_nextp
-is a pointer in a circularly linked list
-of all the windows which are subwindows of the same main window,
-plus the main window itself.
-.pp
-.Vn \*_firstch
-and
-.Vn \*_lastch
-are
-.Fn malloc ed
-arrays which contain the index of the
-first and last changed characters
-on the line.
-.Vn \*_ch\*_off
-is the x offset for the window
-in the
-.Vn \*_firstch
-and
-.Vn \*_lastch
-arrays for this window.
-For main windows,
-this is always 0;
-for subwindows
-it is the difference between the starting point of the main window
-and that of the subindow,
-so that change markers can be set relative to the main window.
-This makes these markers global in scope.
-.pp
-All subwindows share the appropriate portions of
-.Vn _y ,
-.Vn _firstch ,
-.Vn _lastch ,
-and
-.Vn _insdel
-with their main window.
-.pp
-.b \*_ENDLINE
-says that the end of the line for this window
-is also the end of a screen.
-.b \*_FULLWIN
-says that this window is a screen.
-.b \*_SCROLLWIN
-indicates that the last character of this screen
-is at the lower right-hand corner of the terminal;
-.i i.e. ,
-if a character was put there,
-the terminal would scroll.
-.b \*_FULLLINE
-says that the width of a line is the same as the width of the terminal.
-If
-.b \*_FLUSH
-is set,
-it says that
-.Fn fflush "" "" stdout
-should be called at the end of each
-.Fn refresh
-.b \*_STANDOUT
-says that all characters added to the screen
-are in standout mode.
-.b \*_INSDEL
-is reserved for future use,
-and is set by
-.Fn idlok .
-.Vn \*_firstch
-is set to
-.b \*_NOCHANGE
-for lines on which there has been no change
-since the last
-.Fn refresh .
diff --git a/lib/libcurses/PSD.doc/appen.C b/lib/libcurses/PSD.doc/appen.C
deleted file mode 100644
index 65bef2b..0000000
--- a/lib/libcurses/PSD.doc/appen.C
+++ /dev/null
@@ -1,127 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)appen.C 8.1 (Berkeley) 6/8/93
-.\"
-.ie t .oh '\*(Ln Appendix A''PS1:19-%'
-.eh 'PS1:19-%''\*(Ln Appendix A'
-.el .he ''\fIAppendix A\fR''
-.bp
-.(x
-.ti 0
-.b "Appendix A"
-.)x
-.sh 1 "Examples" 1
-.pp
-Here we present a few examples
-of how to use the package.
-They attempt to be representative,
-though not comprehensive. Further examples can be found in the games section
-of the source tree and in various utilities that use the screen such as
-.i systat(1) .
-.sh 2 "Screen Updating"
-.pp
-The following examples are intended to demonstrate
-the basic structure of a program
-using the screen updating sections of the package.
-Several of the programs require calculational sections
-which are irrelevant of to the example,
-and are therefore usually not included.
-It is hoped that the data structure definitions
-give enough of an idea to allow understanding
-of what the relevant portions do.
-.sh 3 "Simple Character Output"
-.pp
-This program demonstrates how to set up a window and output characters to it.
-Also, it demonstrates how one might control the output to the window. If
-you run this program, you will get a demonstration of the character output
-chracteristics discussed in the above Character Output section.
-.(l I
-.so t2.gr
-.)l
-.sh 3 "A Small Screen Manipulator"
-.pp
-The next example follows the lines of the previous one but extends then to
-demonstrate the various othe uses of the package. Make sure you understand
-how this program works as it encompasses most of anything you will
-need to do with the package.
-.(l I
-.so t3.gr
-.)l
-.sh 3 "Twinkle"
-.pp
-This is a moderately simple program which prints
-patterns on the screen.
-It switches between patterns of asterisks,
-putting them on one by one in random order,
-and then taking them off in the same fashion.
-It is more efficient to write this
-using only the motion optimization,
-as is demonstrated below.
-.(l I
-.so twinkle1.gr
-.)l
-.sh 3 "Life"
-.pp
-This program fragment models the famous computer pattern game of life
-(Scientific American, May, 1974).
-The calculational routines create a linked list of structures
-defining where each piece is.
-Nothing here claims to be optimal,
-merely demonstrative.
-This code, however,
-is a very good place to use the screen updating routines,
-as it allows them to worry about what the last position looked like,
-so you don't have to.
-It also demonstrates some of the input routines.
-.(l I
-.so life.gr
-.)l
-.sh 2 "Motion optimization"
-.pp
-The following example shows how motion optimization
-is written on its own.
-Programs which flit from one place to another without
-regard for what is already there
-usually do not need the overhead of both space and time
-associated with screen updating.
-They should instead use motion optimization.
-.sh 3 "Twinkle"
-.pp
-The
-.b twinkle
-program
-is a good candidate for simple motion optimization.
-Here is how it could be written
-(only the routines that have been changed are shown):
-.(l
-.so twinkle2.gr
-.)l
diff --git a/lib/libcurses/PSD.doc/appenA b/lib/libcurses/PSD.doc/appenA
deleted file mode 100644
index a40c95d..0000000
--- a/lib/libcurses/PSD.doc/appenA
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)appen.A 8.1 (Berkeley) 6/8/93
-.\"
-.ie t .oh '\*(Ln Appendix A''PS1:19-%'
-.eh 'PS1:19-%''\*(Ln Appendix A'
-.el .he ''\fIAppendix A\fR''
-.bp
-.(x
-.ti 0
-.b "Appendix A"
-.)x
-.sh 1 "Examples" 1
-.pp
-Here we present a few examples
-of how to use the package.
-They attempt to be representative,
-though not comprehensive. Further examples can be found in the games section
-of the source tree and in various utilities that use the screen such as
-.i systat(1) .
-.pp
-The following examples are intended to demonstrate
-the basic structure of a program
-using the package. An additional, more comprehensive, program can be found in
-the source code in the
-\fIexamples\fP subdirectory.
-.sh 2 "Simple Character Output"
-.pp
-This program demonstrates how to set up a window and output characters to it.
-Also, it demonstrates how one might control the output to the window. If
-you run this program, you will get a demonstration of the character output
-chracteristics discussed in the above Character Output section.
-.(l I
-.so ex1.gr
-.)l
-.sh 2 "Twinkle"
-.pp
-This is a moderately simple program which prints
-patterns on the screen.
-It switches between patterns of asterisks,
-putting them on one by one in random order,
-and then taking them off in the same fashion.
-It is more efficient to write this
-using only the motion optimization,
-as is demonstrated below.
-.(l I
-.so twinkle1.gr
-.)l
diff --git a/lib/libcurses/PSD.doc/c_macros b/lib/libcurses/PSD.doc/c_macros
deleted file mode 100644
index ba6ebbc..0000000
--- a/lib/libcurses/PSD.doc/c_macros
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)c_macros 8.1 (Berkeley) 6/4/93
-.\"
-'ie t 'ds _ \d\(mi\u
-'el 'ds _ _
-'tr *\(**
-'ps 9p
-'vs 10p
-'ds - \(mi
-'ds /* \\h'\\w' 'u-\\w'/'u'/*
-'bd B 3
-'bd S B 3
-'nr cm 0
-'nf
-'de ()
-'pn 1
-..
-'de +C
-'nr cm 1
-'ft 2
-'ds +K
-'ds -K
-..
-'de -C
-'nr cm 0
-'ft 1
-.ie t 'ds +K \f3
-.el 'ds +K \fI
-'ds -K \fP
-..
-'+C
-'-C
-'am +C
-'ne 3
-..
-'de -F
-'rm =f
-..
-'ft 1
-'lg 0
diff --git a/lib/libcurses/PSD.doc/doc.I b/lib/libcurses/PSD.doc/doc.I
deleted file mode 100644
index 2345aba..0000000
--- a/lib/libcurses/PSD.doc/doc.I
+++ /dev/null
@@ -1,349 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)doc.I 8.1 (Berkeley) 6/4/93
-.\"
-.Ds
-.Fd addch ch \*m
-char ch;
-.Fd waddch win\*,ch
-WINDOW *win;
-char ch;
-.De
-Add the character
-.Vn ch
-on the window
-at the current \*y.
-If the character is a newline
-(\'\en\')
-the line will be cleared to the end,
-and the current \*y will be changed to the
-beginning off the next line
-if newline mapping is on,
-or to the next line at the same x co-ordinate
-if it is off.
-A return
-(\'\er\')
-will move to the beginning of the line on the window.
-Tabs
-(\'\et\')
-will be expanded into spaces
-in the normal tabstop positions of
-every eight characters.
-\*(Es
-.Ds
-.Fd addstr str \*m
-char *str;
-.Fd waddstr win\*,str
-WINDOW *win;
-char *str;
-.De
-Add the string pointed to by
-.Vn str
-on the window at the current \*y.
-\*(Es
-In this case, it will put on as much as it can.
-.Ds
-.Fd box win\*,vert\*,hor
-WINDOW *win;
-char vert\*,hor;
-.De
-.Pp
-Draws a box around the window using
-.Vn vert
-as the character for drawing the vertical sides, and
-.Vn hor
-for drawing the horizontal lines.
-If scrolling is not allowed,
-and the window encompasses the lower right-hand corner of the terminal,
-the corners are left blank to avoid a scroll.
-.Ds
-.Fd clear "" \*m
-.Fd wclear win
-WINDOW *win;
-.De
-Resets the entire window to blanks.
-If
-.Vn win
-is a screen,
-this sets the clear flag,
-which will cause a clear-screen sequence to be sent
-on the next
-.Fn refresh
-call.
-This also moves the current \*y
-to (0\*,0).
-.Ds
-.Fd clearok scr\*,boolf \*m
-WINDOW *scr;
-bool boolf;
-.De
-Sets the clear flag for the screen
-.Vn scr .
-If
-.Vn boolf
-is TRUE,
-this will force a clear-screen to be printed on the next
-.Fn refresh ,
-or stop it from doing so if
-.Vn boolf
-is FALSE.
-This only works on screens,
-and,
-unlike
-.Fn clear ,
-does not alter the contents of the screen.
-If
-.Vn scr
-is
-.Vn curscr ,
-the next
-.Fn refresh
-call will cause a clear-screen,
-even if the window passed to
-.Fn refresh
-is not a screen.
-.Ds
-.Fd clrtobot "" \*m
-.Fd wclrtobot win
-WINDOW *win;
-.De
-Wipes the window clear from the current \*y to the bottom.
-This does not force a clear-screen sequence on the next refresh
-under any circumstances.
-\*(Nm
-.Ds
-.Fd clrtoeol "" \*m
-.Fd wclrtoeol win
-WINDOW *win;
-.De
-Wipes the window clear from the current \*y to the end of the line.
-\*(Nm
-.Ds
-.Fd delch
-.Fd wdelch win
-WINDOW *win;
-.De
-Delete the character at the current \*y.
-Each character after it on the line shifts to the left,
-and the last character becomes blank.
-.Ds
-.Fd deleteln
-.Fd wdeleteln win
-WINDOW *win;
-.De
-Delete the current line.
-Every line below the current one will move up,
-and the bottom line will become blank.
-The current \*y will remain unchanged.
-.Ds
-.Fd erase "" \*m
-.Fd werase win
-WINDOW *win;
-.De
-Erases the window to blanks without setting the clear flag.
-This is analagous to
-.Fn clear ,
-except that it never causes a clear-screen sequence to be generated
-on a
-.Fn refresh .
-\*(Nm
-.Ds
-.Fd flushok win\*,boolf \*m
-WINDOW *win;
-bool boolf;
-.De
-Normally,
-.Fn refresh
-.Fn fflush 's
-.Vn stdout
-when it is finished.
-.Fn flushok
-allows you to control this.
-if
-.Vn boolf
-is TRUE
-(\c
-.i i.e. ,
-non-zero)
-it will do the
-.Fn fflush ;
-if it is FALSE.
-it will not.
-.Ds
-.Fd idlok win\*,boolf
-WINDOW *win;
-bool boolf;
-.De
-Reserved for future use.
-This will eventually signal to
-.Fn refresh
-that it is all right to use the insert and delete line sequences
-when updating the window.
-.Ds
-.Fd insch c
-char c;
-.Fd winsch win\*,c
-WINDOW *win;
-char c;
-.De
-Insert
-.Vn c
-at the current \*y
-Each character after it shifts to the right,
-and the last character disappears.
-\*(Es
-.Ds
-.Fd insertln
-.Fd winsertln win
-WINDOW *win;
-.De
-Insert a line above the current one.
-Every line below the current line
-will be shifted down,
-and the bottom line will disappear.
-The current line will become blank,
-and the current \*y will remain unchanged.
-.Ds
-.Fd move y\*,x \*m
-int y\*,x;
-.Fd wmove win\*,y\*,x
-WINDOW *win;
-int y\*,x;
-.De
-Change the current \*y of the window to
-.Vn y\*,x ). (
-\*(Es
-.Ds
-.Fd overlay win1\*,win2
-WINDOW *win1\*,*win2;
-.De
-Overlay
-.Vn win1
-on
-.Vn win2 .
-The contents of
-.Vn win1 ,
-insofar as they fit,
-are placed on
-.Vn win2
-at their starting \*y.
-This is done non-destructively,
-i.e., blanks on
-.Vn win1
-leave the contents of the space on
-.Vn win2
-untouched.
-.Ds
-.Fd overwrite win1\*,win2
-WINDOW *win1\*,*win2;
-.De
-Overwrite
-.Vn win1
-on
-.Vn win2 .
-The contents of
-.Vn win1 ,
-insofar as they fit,
-are placed on
-.Vn win2
-at their starting \*y.
-This is done destructively,
-.i i.e. ,
-blanks on
-.Vn win1
-become blank on
-.Vn win2 .
-.Ds
-.Fd printw fmt\*,arg1\*,arg2\*,...
-char *fmt;
-.Fd wprintw win\*,fmt\*,arg1\*,arg2\*,...
-WINDOW *win;
-char *fmt;
-.De
-Performs a
-.Fn printf
-on the window starting at the current \*y.
-It uses
-.Fn addstr
-to add the string on the window.
-It is often advisable to use the field width options of
-.Fn printf
-to avoid leaving things on the window from earlier calls.
-\*(Es
-.Ds
-.Fd refresh "" \*m
-.Fd wrefresh win
-WINDOW *win;
-.De
-Synchronize the terminal screen with the desired window.
-If the window is not a screen,
-only that part covered by it is updated.
-\*(Es
-In this case, it will update whatever it can
-without causing the scroll.
-.sp
-As a special case,
-if
-.Fn wrefresh
-is called with the window
-.Vn curscr
-the screen is cleared
-and repainted as it is currently.
-This is very useful for allowing the redrawing of the screen
-when the user has garbage dumped on his terminal.
-.Ds
-.Fd standout "" \*m
-.Fd wstandout win
-WINDOW *win;
-.Fd standend "" \*m
-.Fd wstandend win
-WINDOW *win;
-.De
-Start and stop putting characters onto
-.i win
-in standout mode.
-.Fn standout
-causes any characters added to the window
-to be put in standout mode on the terminal
-(if it has that capability).
-.Fn standend
-stops this.
-The sequences
-.Vn SO
-and
-.Vn SE
-(or
-.Vn US
-and
-.Vn UE
-if they are not defined)
-are used (see Appendix A).
diff --git a/lib/libcurses/PSD.doc/doc.II b/lib/libcurses/PSD.doc/doc.II
deleted file mode 100644
index 1f68802..0000000
--- a/lib/libcurses/PSD.doc/doc.II
+++ /dev/null
@@ -1,142 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)doc.II 8.1 (Berkeley) 6/4/93
-.\"
-.Ds
-.Fd cbreak "" \*m
-.Fd nocbreak "" \*m
-.Fd crmode "" \*m
-.Fd nocrmode "" \*m
-.De
-Set or unset the terminal to/from cbreak mode.
-The misnamed macros
-.Fn crmode
-and
-.Fn nocrmode
-are retained for backwards compatibility
-with ealier versions of the library.
-.Ds
-.Fd echo "" \*m
-.Fd noecho "" \*m
-.De
-Sets the terminal to echo or not echo characters.
-.Ds
-.Fd getch "" \*m
-.Fd wgetch win
-WINDOW *win;
-.De
-Gets a character from the terminal and (if necessary)
-echos it on the window.
-\*(Es
-Otherwise, the character gotten is returned.
-If
-.i noecho
-has been set, then the window is left unaltered.
-In order to retain control of the terminal,
-it is necessary to have one of
-.i noecho ,
-.i cbreak ,
-or
-.i rawmode
-set.
-If you do not set one,
-whatever routine you call to read characters will set
-.i cbreak
-for you,
-and then reset to the original mode when finished.
-.Ds
-.Fd getstr str \*m
-char *str;
-.Fd wgetstr win\*,str
-WINDOW *win;
-char *str;
-.De
-Get a string through the window
-and put it in the location pointed to by
-.Vn str ,
-which is assumed to be large enough to handle it.
-It sets tty modes if necessary,
-and then calls
-.Fn getch
-(or
-.Fn wgetch ) "" win
-to get the characters needed to fill in the string
-until a newline or EOF is encountered.
-The newline stripped off the string.
-\*(Es
-.Ds
-.Fd \*_putchar c
-char c;
-.De
-Put out a character using the
-.Fn putchar
-macro.
-This function is used to output every character
-that
-.b curses
-generates.
-Thus,
-it can be redefined by the user who wants to do non-standard things
-with the output.
-It is named with an initial \*(lq\*_\*(rq
-because it usually should be invisible to the programmer.
-.Ds
-.Fd raw "" \*m
-.Fd noraw "" \*m
-.De
-Set or unset the terminal to/from raw mode.
-On version 7
-.Un \**
-.(f
-\**
-.Un
-is a trademark of Bell Laboratories.
-.)f
-this also turns of newline mapping
-(see
-.Fn nl ).
-.Ds
-.Fd scanw fmt\*,arg1\*,arg2\*,...
-char *fmt;
-.Fd wscanw win\*,fmt\*,arg1\*,arg2\*,...
-WINDOW *win;
-char *fmt;
-.De
-Perform a
-.Fn scanf
-through the window using
-.Vn fmt .
-It does this using consecutive
-.Fn getch 's
-(or
-.Fn wgetch 's). "" win
-\*(Es
diff --git a/lib/libcurses/PSD.doc/doc.III b/lib/libcurses/PSD.doc/doc.III
deleted file mode 100644
index 7d710d4..0000000
--- a/lib/libcurses/PSD.doc/doc.III
+++ /dev/null
@@ -1,343 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)doc.III 8.1 (Berkeley) 6/4/93
-.\"
-.Ds
-.Fd baudrate "" \*m
-.De
-Returns the output baud rate of the terminal.
-This is a system dependent constant
-(defined in
-.b <sys/tty.h>
-on BSD systems,
-which is included by
-.b <curses.h> ).
-.Ds
-.Fd delwin win
-WINDOW *win;
-.De
-Deletes the window from existence.
-All resources are freed for future use by
-.b calloc (3).
-If a window has a
-.Fn subwin
-allocated window inside of it,
-deleting the outer window
-the subwindow is not affected,
-even though this does invalidate it.
-Therefore,
-subwindows should be deleted before their
-outer windows are.
-.Ds
-.Fd endwin
-.De
-Finish up window routines before exit.
-This restores the terminal to the state it was before
-.Fn initscr
-(or
-.Fn gettmode
-and
-.Fn setterm )
-was called.
-It should always be called before exiting.
-It does not exit.
-This is especially useful for resetting tty stats
-when trapping rubouts via
-.b signal (2).
-.Ds
-.Fd erasechar "" \*m
-.De
-Returns the erase character
-for the terminal,
-.i i.e. ,
-the character used by the user to erase a single character from the input.
-.Ds
-.Fd getcap str "" "char *"
-char *str;
-.De
-Return a pointer to the
-.b termcap
-capability described by
-.Vn str
-(see
-.b termcap (5)
-for details).
-.Ds
-.Fd getyx win\*,y\*,x \*m
-WINDOW *win;
-int y\*,x;
-.De
-Puts the current \*y of
-.Vn win
-in the variables
-.Vn y
-and
-.Vn x .
-Since it is a macro,
-not a function,
-you do not pass the address
-of
-.Vn y
-and
-.Vn x .
-.Ds
-.Fd inch "" \*m
-.Fd winch win \*m
-WINDOW *win;
-.De
-Returns the character at the current \*(y
-on the given window.
-This does not make any changes to the window.
-.Ds
-.Fd initscr
-.De
-Initialize the screen routines.
-This must be called before any of the screen routines are used.
-It initializes the terminal-type data and such,
-and without it none of the routines can operate.
-If standard input is not a tty,
-it sets the specifications to the terminal
-whose name is pointed to by
-.Vn Def\*_term
-(initialy "dumb").
-If the boolean
-.Vn My\*_term
-is true,
-.Vn Def\*_term
-is always used.
-If the system supports the
-.b TIOCGWINSZ
-.Fn ioctl "" "" 2
-call,
-it is used to get the number of lines and columns for the terminal,
-otherwise it is taken from the
-.b termcap
-description.
-.Ds
-.Fd killchar "" \*m
-.De
-Returns the line kill character
-for the terminal,
-.i i.e. ,
-the character used by the user to erase an entire line from the input.
-.Ds
-.Fd leaveok win\*,boolf \*m
-WINDOW *win;
-bool boolf;
-.De
-Sets the boolean flag for leaving the cursor after the last change.
-If
-.Vn boolf
-is TRUE,
-the cursor will be left after the last update on the terminal,
-and the current \*y for
-.Vn win
-will be changed accordingly.
-If it is FALSE,
-it will be moved to the current \*y.
-This flag
-(initialy FALSE)
-retains its value until changed by the user.
-.Ds
-.Fd longname termbuf\*,name
-char *termbuf\*,*name;
-.Fd fullname termbuf\*,name
-char *termbuf\*,*name;
-.De
-.Fn longname
-fills in
-.Vn name
-with the long name of the terminal described by the
-.b termcap
-entry in
-.Vn termbuf .
-It is generally of little use,
-but is nice for telling the user in a readable format what terminal
-we think he has.
-This is available in the global variable
-.Vn ttytype .
-.Vn termbuf
-is usually set via the termlib routine
-.Fn tgetent .
-.Fn fullname
-is the same as
-.Fn longname ,
-except that it gives the fullest name given in the entry,
-which can be quite verbose.
-.Ds
-.Fd mvwin win\*,y\*,x
-WINDOW *win;
-int y, x;
-.De
-Move the home position of the window
-.Vn win
-from its current starting coordinates
-to
-.Vn y\*,x ). (
-If that would put part or all of the window
-off the edge of the terminal screen,
-.Fn mvwin
-returns ERR and does not change anything.
-For subwindows,
-.Fn mvwin
-also returns ERR if you attempt to move it off its main window.
-If you move a main window,
-all subwindows are moved along with it.
-.Ds
-.Fd newwin lines\*,cols\*,begin\*_y\*,begin\*_x "" "WINDOW *"
-int lines\*,cols\*,begin\*_y\*,begin\*_x;
-.De
-Create a new window with
-.Vn lines
-lines and
-.Vn cols
-columns starting at position
-.Vn begin\*_y\*,begin\*_x ). (
-If either
-.Vn lines
-or
-.Vn cols
-is 0 (zero),
-that dimension will be set to
-.Vn "LINES \- begin\*_y" ) (
-or
-.Vn "COLS \- begin\*_x" ) (
-respectively.
-Thus, to get a new window of dimensions
-.Vn LINES
-\(mu
-.Vn COLS ,
-use
-.Fn newwin . "" 0\*,0\*,0\*,0
-.Ds
-.Fd nl "" \*m
-.Fd nonl "" \*m
-.De
-Set or unset the terminal to/from nl mode,
-.i i.e. ,
-start/stop the system from mapping
-.b <RETURN>
-to
-.b <LINE-FEED> .
-If the mapping is not done,
-.Fn refresh
-can do more optimization,
-so it is recommended, but not required, to turn it off.
-.Ds
-.Fd scrollok win\*,boolf \*m
-WINDOW *win;
-bool boolf;
-.De
-Set the scroll flag for the given window.
-If
-.Vn boolf
-is FALSE, scrolling is not allowed.
-This is its default setting.
-.Ds
-.Fd touchline win\*,y\*,startx\*,endx
-WINDOW *win;
-int y\*,startx\*,endx;
-.De
-This function performs a function similar to
-.Fn touchwin
-on a single line.
-It marks the first change for the given line
-to be
-.Vn startx ,
-if it is before the current first change mark,
-and
-the last change mark is set to be
-.Vn endx
-if it is currently less than
-.Vn endx .
-.Ds
-.Fd touchoverlap win1\*,win2
-WINDOW *win1, *win2;
-.De
-Touch the window
-.Vn win2
-in the area which overlaps with
-.Vn win1 .
-If they do not overlap,
-no changes are made.
-.Ds
-.Fd touchwin win
-WINDOW *win;
-.De
-Make it appear that the every location on the window
-has been changed.
-This is usually only needed for refreshes with overlapping windows.
-.Ds
-.Fd subwin win\*,lines\*,cols\*,begin\*_y\*,begin\*_x "" "WINDOW *"
-WINDOW *win;
-int lines\*,cols\*,begin\*_y\*,begin\*_x;
-.De
-Create a new window with
-.Vn lines
-lines and
-.Vn cols
-columns starting at position
-.Vn begin\*_y\*,begin\*_x ) (
-inside the window
-.i win .
-This means that any change made to either window
-in the area covered
-by the subwindow will be made on both windows.
-.Vn begin\*_y\*,begin\*_x
-are specified relative to the overall screen,
-not the relative (0\*,0) of
-.Vn win .
-If either
-.Vn lines
-or
-.Vn cols
-is 0 (zero),
-that dimension will be set to
-.Vn "LINES \- begin\*_y" ) (
-or
-.Vn "COLS \- begin\*_x" ) (
-respectively.
-.Ds
-.Fd unctrl ch \*m
-char ch;
-.De
-This is actually a debug function for the library,
-but it is of general usefulness.
-It returns a string which is a representation of
-.Vn ch .
-Control characters become their upper-case equivalents preceded by a "^".
-Other letters stay just as they are.
-To use
-.Fn unctrl ,
-you may have to have
-.b #include\ <unctrl.h>
-in your file.
diff --git a/lib/libcurses/PSD.doc/doc.IV b/lib/libcurses/PSD.doc/doc.IV
deleted file mode 100644
index 717a986..0000000
--- a/lib/libcurses/PSD.doc/doc.IV
+++ /dev/null
@@ -1,110 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)doc.IV 8.1 (Berkeley) 6/4/93
-.\"
-.Ds
-.Fd gettmode
-.De
-Get the tty stats.
-This is normally called by
-.Fn initscr .
-.Ds
-.Fd mvcur lasty\*,lastx\*,newy\*,newx
-int lasty\*,lastx\*,newy\*,newx;
-.De
-Moves the terminal's cursor from
-.Vn lasty\*,lastx ) (
-to
-.Vn newy\*,newx ) (
-in an approximation of optimal fashion.
-This routine uses the functions borrowed from
-.i ex
-version 2.6.
-It is possible to use this optimization
-without the benefit of the screen routines.
-With the screen routines, this should not be called by the user.
-.Fn move
-and
-.Fn refresh
-should be used to move the cursor position,
-so that the routines know what's going on.
-.Ds
-.Fd scroll win
-WINDOW *win;
-.De
-Scroll the window upward one line.
-This is normally not used by the user.
-.Ds
-.Fd savetty "" \*m
-.Fd resetty "" \*m
-.De
-.Fn savetty
-saves the current tty characteristic flags.
-.Fn resetty
-restores them to what
-.Fn savetty
-stored.
-These functions are performed automatically by
-.Fn initscr
-and
-.Fn endwin .
-.Ds
-.Fd setterm name
-char *name;
-.De
-Set the terminal characteristics to be those of the terminal named
-.Vn name ,
-getting the terminal size from the
-.b TIOCGWINSZ
-.Fn ioctl "" "" 2
-if it exists,
-otherwise from the environment.
-This is normally called by
-.Fn initscr .
-.Ds
-.Fd tstp
-.De
-If the new
-.b tty (4)
-driver is in use,
-this function
-will save the current tty state
-and then put the process to sleep.
-When the process gets restarted,
-it restores the tty state
-and then calls
-.Fn wrefresh "" "" curscr
-to redraw the screen.
-.Fn initscr
-sets the signal
-SIGTSTP
-to trap to this routine.
diff --git a/lib/libcurses/PSD.doc/ex1.c b/lib/libcurses/PSD.doc/ex1.c
deleted file mode 100644
index 97d8432..0000000
--- a/lib/libcurses/PSD.doc/ex1.c
+++ /dev/null
@@ -1,102 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ex1.c 8.1 (Berkeley) 6/8/93
-.\"
-#include <sys/types.h>
-#include <curses.h>
-#include <stdio.h>
-#include <signal.h>
-
-
-#define YSIZE 10
-#define XSIZE 20
-
-int quit();
-
-main()
-{
- int i, j, c;
- size_t len;
- char id[100];
- FILE *fp;
- char *s;
-
- initscr(); /* Always call initscr() first */
- signal(SIGINT, quit); /* Make sure wou have a 'cleanup' fn */
- crmode(); /* We want cbreak mode */
- noecho(); /* We want to have control of chars */
- delwin(stdscr); /* Create our own stdscr */
- stdscr = newwin(YSIZE, XSIZE, 10, 35);
- flushok(stdscr, TRUE); /* Enable flushing of stdout */
- scrollok(stdscr, TRUE); /* Enable scrolling */
- erase(); /* Initially, clear the screen */
-
- standout();
- move(0,0);
- while (1) {
- c = getchar();
- switch(c) {
- case 'q': /* Quit on 'q' */
- quit();
- break;
- case 's': /* Go into standout mode on 's' */
- standout();
- break;
- case 'e': /* Exit standout mode on 'e' */
- standend();
- break;
- case 'r': /* Force a refresh on 'r' */
- wrefresh(curscr);
- break;
- default: /* By default output the character */
- addch(c);
- refresh();
- }
- }
-}
-
-
-int
-quit()
-{
- erase(); /* Terminate by erasing the screen */
- refresh();
- endwin(); /* Always end with endwin() */
- delwin(curscr); /* Return storage */
- delwin(stdscr);
- putchar('\n');
- exit(0);
-}
-
-
-
-
diff --git a/lib/libcurses/PSD.doc/ex2.c b/lib/libcurses/PSD.doc/ex2.c
deleted file mode 100644
index 7b23b61..0000000
--- a/lib/libcurses/PSD.doc/ex2.c
+++ /dev/null
@@ -1,210 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ex2.c 8.1 (Berkeley) 6/8/93
-.\"
-#include <curses.h>
-#include <stdio.h>
-#include <signal.h>
-
-#define YSIZE LINES
-#define XSIZE COLS
-
-static int quit();
-
-/*
- * This program fills the screen up with characters and the allows the user to
- * manipulate the text on the screen using some basic commands.
- * Nothing fancy, just a demonstration of the elementary features of the
- * curses(3) package.
- */
-main()
-{
- int i, j, c, n, d = 0;
- char id[100];
- int hh = 0;
- int curx, cury, base, arg;
-
- initscr();
- signal(SIGINT, quit);
- crmode();
- noecho();
- nonl();
- delwin(stdscr);
- stdscr = newwin(YSIZE, XSIZE, 0, 0);
- flushok(stdscr, TRUE);
- scrollok(stdscr, TRUE);
- erase();
- refresh();
-
- move(0,0);
- refresh();
- for (i = 0; i < YSIZE + 2; i++) {
- sprintf(id, "%d: ", i);
- addstr(id);
- for (j = 0; j < XSIZE - strlen(id); j++)
- addch('0' + (i % 10));
- }
- c = getchar();
- base = 2;
- curx = cury = 0;
- move(0, 0);
- refresh();
-
- /*
- * The screen manipulator has the following commands:
- * 'D' - clear to the end of the current line.
- * 'B' - clear to the bottom of the screen.
- * 'E' - erase the screen.
- * 's' - enter standout mode.
- * 'e' - exit standout mode.
- * 'd' n - delete n lines below cursor line.
- * 'i' n - insert n lines below cursor line.
- * 'q' - quit.
- * 'f' - move cursor one position to the right.
- * 'b' - move cursor one position to the left.
- * 'n' - move cursor one line down.
- * 'p' - move cursor one line up.
- * 'h' - home cusor.
- * 'l' - force refresh.
- * 'r' - simulate a carriage return.
- *
- * All other characters are ignored.
- */
- for(;;) {
- switch(c = getchar()) {
- case 'D':
- clrtoeol();
- refresh();
- continue;
- case 'B':
- clrtobot();
- refresh();
- continue;
- case 'E':
- erase();
- refresh();
- continue;
- case 's':
- standout();
- continue;
- case 'e':
- standend();
- continue;
- case 'd':
- arg = getchar() - '0';
- for (i = 0; i < arg; i++)
- deleteln();
- refresh();
- continue;
- case 'i':
- arg = getchar() - '0';
- for (i = 0; i < arg; i++)
- insertln();
- refresh();
- continue;
- case 'q':
- quit();
- case 'f':
- if (curx < XSIZE - 1)
- curx++;
- else {
- cury++;
- curx = 0;
- }
- break;
- case 'b':
- if (curx == 0) {
- cury--;
- curx = XSIZE - 1;
- } else
- curx--;
- break;
- case 'n':
- cury++;
- break;
- case 'p':
- cury--;
- break;
- case 'h':
- curx = cury = 0;
- break;
- case 'l':
- wrefresh(curscr);
- continue;
- case 'r': /* return */
- {
- int x, y;
- getyx(stdscr, y, x);
- move(y+1, 0);
- insertln();
- move(y, x);
- clrtoeol();
- refresh();
- continue;
- }
- default:
- continue;
- }
-
- if (cury < 0) {
- base--;
- move(0, 0);
- insertln();
- sprintf(id, "%d: ", base);
- addstr(id);
- for (j = 0; j < XSIZE - strlen(id) - 2; j++)
- addch('0' + (base % 10));
- cury++;
- } else if (cury >= YSIZE) {
- move(0, 0);
- deleteln();
- move(YSIZE - 1, 0);
- sprintf(id, "%d: ", base + YSIZE);
- addstr(id);
- for (j = 0; j < XSIZE - strlen(id) - 2; j++)
- addch('0' + ((base + YSIZE) % 10));
- cury--;
- base++;
- }
- move(cury, curx);
- refresh();
- }
-}
-
-int
-quit()
-{
- erase();
- refresh();
- endwin();
- exit(0);
-}
diff --git a/lib/libcurses/PSD.doc/fns.doc b/lib/libcurses/PSD.doc/fns.doc
deleted file mode 100644
index 0fa89ab..0000000
--- a/lib/libcurses/PSD.doc/fns.doc
+++ /dev/null
@@ -1,799 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fns.doc 8.2 (Berkeley) 6/1/94
-.\"
-.Ds
-.Fn addch "char ch" \(dg
-.De
-Add the character
-.Vn ch
-on the window
-at the current \*y.
-If the character is a newline
-(\'\en\')
-the line will be cleared to the end,
-and the current \*y will be changed to the
-beginning off the next line
-if newline mapping is on,
-or to the next line at the same x co-ordinate
-if it is off.
-A return
-(\'\er\')
-will move to the beginning of the line on the window.
-Tabs
-(\'\et\')
-will be expanded into spaces
-in the normal tabstop positions of
-every eight characters.
-\*(Es
-.Ds
-.Fn addstr "char *str" \(dg
-.De
-Add the string pointed to by
-.Vn str
-on the window at the current \*y.
-\*(Es
-In this case, it will put on as much as it can.
-.Ds
-.Fn baudrate "" \(dg
-.De
-Returns the output baud rate of the terminal.
-This is a system dependent constant
-(defined in
-.b <sys/tty.h>
-on BSD systems,
-which is included by
-.b <curses.h> ).
-.Ds
-.Fn box "WINDOW win" "char vert" "char hor"
-.De
-.Pp
-Draws a box around the window using
-.Vn vert
-as the character for drawing the vertical sides, and
-.Vn hor
-for drawing the horizontal lines.
-If scrolling is not allowed,
-and the window encompasses the lower right-hand corner of the terminal,
-the corners are left blank to avoid a scroll.
-.Ds
-.Fn cbreak "" \(dg
-.De
-Set or the terminal to cbreak mode.
-.Ds
-.Fn clear "" \(dg
-.De
-Resets the entire window to blanks.
-If
-.Vn win
-is a screen,
-this sets the clear flag,
-which will cause a clear-screen sequence to be sent
-on the next
-.Fn refresh
-call.
-This also moves the current \*y
-to (0\*,0).
-.Ds
-.Fn clearok "WINDOW *scr" "int boolf" \(dg
-.De
-Sets the clear flag for the screen
-.Vn scr .
-If
-.Vn boolf
-is non-zero,
-this will force a clear-screen to be printed on the next
-.Fn refresh ,
-or stop it from doing so if
-.Vn boolf
-is 0.
-This only works on screens,
-and,
-unlike
-.Fn clear ,
-does not alter the contents of the screen.
-If
-.Vn scr
-is
-.Vn curscr ,
-the next
-.Fn refresh
-call will cause a clear-screen,
-even if the window passed to
-.Fn refresh
-is not a screen.
-.Ds
-.Fn clrtobot "" \(dg
-.De
-Wipes the window clear from the current \*y to the bottom.
-This does not force a clear-screen sequence on the next refresh
-under any circumstances.
-\*(Nm
-.Ds
-.Fn clrtoeol "" \(dg
-.De
-Wipes the window clear from the current \*y to the end of the line.
-\*(Nm
-.Ds
-.Fn crmode "" \(dg
-.De
-Identical to
-.Fn cbreak .
-The misnamed macro
-.Fn crmode
-and
-.Fn nocrmode
-is retained for backwards compatibility
-with ealier versions of the library.
-.Ds
-.Fn delch ""
-.De
-Delete the character at the current \*y.
-Each character after it on the line shifts to the left,
-and the last character becomes blank.
-.Ds
-.Fn deleteln ""
-.De
-Delete the current line.
-Every line below the current one will move up,
-and the bottom line will become blank.
-The current \*y will remain unchanged.
-.Ds
-.Fn delwin "WINDOW *win"
-.De
-Deletes the window from existence.
-All resources are freed for future use by
-.b calloc (3).
-If a window has a
-.Fn subwin
-allocated window inside of it,
-deleting the outer window
-the subwindow is not affected,
-even though this does invalidate it.
-Therefore,
-subwindows should be deleted before their
-outer windows are.
-.Ds
-.Fn echo "" \(dg
-.De
-Sets the terminal to echo characters.
-.Ds
-.Fn endwin ""
-.De
-Finish up window routines before exit.
-This restores the terminal to the state it was before
-.Fn initscr
-(or
-.Fn gettmode
-and
-.Fn setterm )
-was called.
-It should always be called before exiting and before the final calls to
-.Fn delwin .
-It does not exit.
-This is especially useful for resetting tty stats
-when trapping rubouts via
-.b signal (2).
-.Ds
-.Fn erase "" \(dg
-.De
-Erases the window to blanks without setting the clear flag.
-This is analagous to
-.Fn clear ,
-except that it never causes a clear-screen sequence to be generated
-on a
-.Fn refresh .
-\*(Nm
-.Ds
-.Fn erasechar "" \(dg
-.De
-Returns the erase character
-for the terminal,
-.i i.e. ,
-the character used by the user to erase a single character from the input.
-.Ds
-.Fn flushok "WINDOW *win" "int boolf"
-.De
-Normally,
-.Fn refresh
-.Fn fflush 's
-.Vn stdout
-when it is finished.
-.Fn flushok
-allows you to control this.
-if
-.Vn boolf
-is non-zero
-(\c
-.i i.e. ,
-non-zero)
-it will do the
-.Fn fflush ,
-otherwise it will not.
-.Ds
-.Fn getch "" \(dg
-.De
-Gets a character from the terminal and (if necessary)
-echos it on the window.
-\*(Es
-Otherwise, the character gotten is returned.
-If
-.i noecho
-has been set, then the window is left unaltered.
-In order to retain control of the terminal,
-it is necessary to have one of
-.i noecho ,
-.i cbreak ,
-or
-.i rawmode
-set.
-If you do not set one,
-whatever routine you call to read characters will set
-.i cbreak
-for you,
-and then reset to the original mode when finished.
-.Ds
-.Fn getstr "char *str" \(dg
-.De
-Get a string through the window
-and put it in the location pointed to by
-.Vn str ,
-which is assumed to be large enough to handle it.
-It sets tty modes if necessary,
-and then calls
-.Fn getch
-(or
-.Fn wgetch )
-to get the characters needed to fill in the string
-until a newline or EOF is encountered.
-The newline stripped off the string.
-\*(Es
-.Ds
-.Fn gettmode ""
-.De
-Get the tty stats.
-This is normally called by
-.Fn initscr .
-.Ds
-.Fn getyx "WINDOW *win" "int y" "int x"
-.De
-Puts the current \*y of
-.Vn win
-in the variables
-.Vn y
-and
-.Vn x .
-Since it is a macro,
-not a function,
-you do not pass the address
-of
-.Vn y
-and
-.Vn x .
-.Ds
-.Fn idlok "WINDOW *win" "int boolf"
-.De
-Reserved for future use.
-This will eventually signal to
-.Fn refresh
-that it is all right to use the insert and delete line sequences
-when updating the window.
-.ne 1i
-.Ds
-.Fn inch "" \(dg
-.De
-Returns the character at the current position on the given window.
-This does not make any changes to the window.
-.Ds
-.Fn initscr ""
-.De
-Initialize the screen routines.
-This must be called before any of the screen routines are used.
-It initializes the terminal-type data and such,
-and without it none of the routines can operate.
-If standard input is not a tty,
-it sets the specifications to the terminal
-whose name is pointed to by
-.Vn Def\*_term
-(initially "dumb").
-If the boolean
-.Vn My\*_term
-is non-zero,
-.Vn Def\*_term
-is always used.
-If the system supports the
-.b TIOCGWINSZ
-.i ioctl(2)
-call,
-it is used to get the number of lines and columns for the terminal,
-otherwise it is taken from the
-.b termcap
-description.
-.Ds
-.Fn insch "char c"
-.De
-Insert
-.Vn c
-at the current \*y
-Each character after it shifts to the right,
-and the last character disappears.
-\*(Es
-.Ds
-.Fn insertln ""
-.De
-Insert a line above the current one.
-Every line below the current line
-will be shifted down,
-and the bottom line will disappear.
-The current line will become blank,
-and the current \*y will remain unchanged.
-.Ds
-.Fn killchar "" \(dg
-.De
-Returns the line kill character
-for the terminal,
-.i i.e. ,
-the character used by the user to erase an entire line from the input.
-.Ds
-.Fn leaveok "WINDOW *win" "int boolf" \(dg
-.De
-Sets the boolean flag for leaving the cursor after the last change.
-If
-.Vn boolf
-is non-zero,
-the cursor will be left after the last update on the terminal,
-and the current \*y for
-.Vn win
-will be changed accordingly.
-If
-.Vn boolf
- is 0 the cursor will be moved to the current \*y.
-This flag
-(initially 0)
-retains its value until changed by the user.
-.Ds
-.Fn move "int y" "int x"
-.De
-Change the current \*y of the window to
-.Vn y\*,x ). (
-\*(Es
-.Ds
-.Fn mvcur "int lasty" "int lastx" "int newy" "int newx"
-.De
-Moves the terminal's cursor from
-.Vn lasty\*,lastx ) (
-to
-.Vn newy\*,newx ) (
-in an approximation of optimal fashion.
-This routine uses the functions borrowed from
-.i ex
-version 2.6.
-It is possible to use this optimization
-without the benefit of the screen routines.
-With the screen routines, this should not be called by the user.
-.Fn move
-and
-.Fn refresh
-should be used to move the cursor position,
-so that the routines know what's going on.
-.Ds
-.Fn mvprintw "int y" "int x" "const char *fmt" "..."
-.De
-Equivalent to:
-.(l
-move(y, x);
-printw(fmt, ...);
-.)l
-.Ds
-.Fn mvscanw "int y" "int x" "const char *fmt" "..."
-.De
-Equivalent to:
-.(l
-move(y, x);
-scanw(fmt, ...);
-.)l
-.Ds
-.Fn mvwin "WINDOW *win" "int y" "int x"
-.De
-Move the home position of the window
-.Vn win
-from its current starting coordinates
-to
-.Vn y\*,x ). (
-If that would put part or all of the window
-off the edge of the terminal screen,
-.Fn mvwin
-returns ERR and does not change anything.
-For subwindows,
-.Fn mvwin
-also returns ERR if you attempt to move it off its main window.
-If you move a main window,
-all subwindows are moved along with it.
-.Ds
-.Fn mvwprintw "WINDOW *win" "int y" "int x" "const char *fmt" "..."
-.De
-Equivalent to:
-.(l
-wmove(win, y, x);
-printw(fmt, ...);
-.)l
-.Ds
-.Fn mvwscanw "WINDOW *win" "int y" "int x" "const char *fmt" "..."
-.De
-Equivalent to:
-.(l
-wmove(win, y, x);
-scanw(fmt, ...);
-.)l
-.Ds
-.Ft "WINDOW *"
-.Fn newwin "int lines" "int cols" "int begin_y" "int begin_x"
-.De
-Create a new window with
-.Vn lines
-lines and
-.Vn cols
-columns starting at position
-.Vn begin\*_y\*,begin\*_x ). (
-If either
-.Vn lines
-or
-.Vn cols
-is 0 (zero),
-that dimension will be set to
-.Vn "LINES \- begin\*_y" ) (
-or
-.Vn "COLS \- begin\*_x" ) (
-respectively.
-Thus, to get a new window of dimensions
-.Vn LINES
-\(mu
-.Vn COLS ,
-use
-.Fn newwin 0 0 0 0 .
-.Ds
-.Fn nl "" \(dg
-.De
-Set the terminal to nl mode,
-.i i.e. ,
-start/stop the system from mapping
-.b <RETURN>
-to
-.b <LINE-FEED> .
-If the mapping is not done,
-.Fn refresh
-can do more optimization,
-so it is recommended, but not required, to turn it off.
-.Ds
-.Fn nocbreak "" \(dg
-.De
-Unset the terminal from cbreak mode.
-.Ds
-.Fn nocrmode "" \(dg
-.De
-Identical to
-.Fn nocbreak .
-The misnamed macro
-.Fn nocrmode
-is retained for backwards compatibility
-with ealier versions of the library.
-.Ds
-.Fn noecho "" \(dg
-.De
-Turn echoing of characters off.
-.Ds
-.Fn nonl "" \(dg
-.De
-Unset the terminal to from nl mode. See
-.Fn nl .
-.ne 1i
-.Ds
-.Fn noraw "" \(dg
-.De
-Unset the terminal from raw mode. See
-.Fn raw .
-.Ds
-.Fn overlay "WINDOW *win1" "WINDOW *win2"
-.De
-Overlay
-.Vn win1
-on
-.Vn win2 .
-The contents of
-.Vn win1 ,
-insofar as they fit,
-are placed on
-.Vn win2
-at their starting \*y.
-This is done non-destructively,
-i.e., blanks on
-.Vn win1
-leave the contents of the space on
-.Vn win2
-untouched. Note that all non-blank characters are overwritten
-destructively in the overlay.
-.Ds
-.Fn overwrite "WINDOW *win1" "WINDOW *win2"
-.De
-Overwrite
-.Vn win1
-on
-.Vn win2 .
-The contents of
-.Vn win1 ,
-insofar as they fit,
-are placed on
-.Vn win2
-at their starting \*y.
-This is done destructively,
-.i i.e. ,
-blanks on
-.Vn win1
-become blank on
-.Vn win2 .
-.Ds
-.Fn printw "char *fmt" "..."
-.De
-Performs a
-.Fn printf
-on the window starting at the current \*y.
-It uses
-.Fn addstr
-to add the string on the window.
-It is often advisable to use the field width options of
-.Fn printf
-to avoid leaving things on the window from earlier calls.
-\*(Es
-.Ds
-.Fn raw "" \(dg
-.De
-Set the terminal to raw mode.
-On version 7
-.Un \**
-.(f
-\**
-.Un
-is a trademark of Unix System Laboratories.
-.)f
-this also turns off newline mapping
-(see
-.Fn nl ).
-.Ds
-.Fn refresh "" \(dg
-.De
-Synchronize the terminal screen with the desired window.
-If the window is not a screen,
-only that part covered by it is updated.
-\*(Es
-In this case, it will update whatever it can
-without causing the scroll.
-.sp
-As a special case,
-if
-.Fn wrefresh
-is called with the window
-.Vn curscr
-the screen is cleared
-and repainted as it is currently.
-This is very useful for allowing the redrawing of the screen
-when the user has garbage dumped on his terminal.
-.Ds
-.Fn resetty "" \(dg
-.De
-.Fn resetty
-restores them to what
-.Fn savetty
-stored.
-These functions are performed automatically by
-.Fn initscr
-and
-.Fn endwin .
-This function should not be used by the user.
-.Ds
-.Fn savetty "" \(dg
-.De
-.Fn savetty
-saves the current tty characteristic flags. See
-.Fn resetty .
-This function should not be used by the user.
-.Ds
-.Fn scanw "char *fmt" "..."
-.De
-Perform a
-.Fn scanf
-through the window using
-.Vn fmt .
-It does this using consecutive calls to
-.Fn getch
-(or
-.Fn wgetch ).
-\*(Es
-.ne 1i
-.Ds
-.Fn scroll "WINDOW *win"
-.De
-Scroll the window upward one line.
-This is normally not used by the user.
-.Ds
-.Fn scrollok "WINDOW *win" "int boolf" \(dg
-.De
-Set the scroll flag for the given window.
-If
-.Vn boolf
-is 0, scrolling is not allowed.
-This is its default setting.
-.Ds
-.Fn standend "" \(dg
-.De
-End standout mode initiated by
-.Fn standout .
-.Ds
-.Fn standout "" \(dg
-.De
-Causes any characters added to the window
-to be put in standout mode on the terminal
-(if it has that capability).
-.Ds
-.Ft "WINDOW *"
-.Fn subwin "WINDOW *win" "int lines" "int cols" "int begin_y" "int begin_x"
-.De
-Create a new window with
-.Vn lines
-lines and
-.Vn cols
-columns starting at position
-.Vn begin\*_y\*,begin\*_x ) (
-inside the window
-.i win .
-This means that any change made to either window
-in the area covered
-by the subwindow will be made on both windows.
-.Vn begin\*_y\*,begin\*_x
-are specified relative to the overall screen,
-not the relative (0\*,0) of
-.Vn win .
-If either
-.Vn lines
-or
-.Vn cols
-is 0 (zero),
-that dimension will be set to
-.Vn "LINES \- begin\*_y" ) (
-or
-.Vn "COLS \- begin\*_x" ) (
-respectively.
-.Ds
-.Fn touchline "WINDOW *win" "int y" "int startx" "int endx"
-.De
-This function performs a function similar to
-.Fn touchwin
-on a single line.
-It marks the first change for the given line
-to be
-.Vn startx ,
-if it is before the current first change mark,
-and
-the last change mark is set to be
-.Vn endx
-if it is currently less than
-.Vn endx .
-.Ds
-.Fn touchoverlap "WINDOW *win1" "WINDOW *win2"
-.De
-Touch the window
-.Vn win2
-in the area which overlaps with
-.Vn win1 .
-If they do not overlap,
-no changes are made.
-.Ds
-.Fn touchwin "WINDOW *win"
-.De
-Make it appear that the every location on the window
-has been changed.
-This is usually only needed for refreshes with overlapping windows.
-.Ds
-.Fn tstp
-.De
-This function
-will save the current tty state
-and then put the process to sleep.
-When the process gets restarted,
-it restores the saved tty state
-and then calls
-.Fn wrefresh "curscr"
-to redraw the screen.
-.Fn Initscr
-sets the signal
-SIGTSTP
-to trap to this routine.
-.Ds
-.Fn unctrl "char *ch" \(dg
-.De
-Returns a string which is an ASCII representation of
-.Vn ch .
-Characters are 8 bits long.
-.Ds
-.Fn unctrllen "char *ch" \(dg
-.De
-Returns the length of the ASCII representation of
-.Vn ch .
-.ne 1i
-.Ds
-.Fn vwprintw "WINDOW *win" "const char *fmt" "va_list ap"
-.De
-Identical to
-.Fn printw
-except that it takes both a window specification and a pointer to a variable
-length argument list.
-.Ds
-.Fn vwscanw "WINDOW *win" "const char *fmt" "va_list ap"
-.De
-Identical to
-.Fn scanw
-except that it takes both a window specification and a pointer to a variable
-length argument list.
-.Ds
-.Fn waddbytes "WINDOW *win" "char *str" "int len"
-.De
-This function is the low level character output function.
-.Vn Len
-characters of the string
-.Vn str
-are output to the current \*y position of the window specified by
-.Vn win.
-.sp 2
-.pp
-\fIThe following functions differ from the standard functions only in their
-specification of a window, rather than the use of the default
-.Vn stdscr.\fP
-.Ds
-.Fn waddch "WINDOW *win" "char ch"
-.Fn waddstr "WINDOW *win" "char *str"
-.Fn wclear "WINDOW *win"
-.Fn wclrtobot "WINDOW *win"
-.Fn wclrtoeol "WINDOW *win"
-.Fn wdelch "WINDOW *win"
-.Fn wdeleteln "WINDOW *win"
-.Fn werase "WINDOW *win"
-.Fn wgetch "WINDOW *win"
-.Fn wgetstr "WINDOW *win" "char *str"
-.Fn winch "WINDOW *win" \(dg
-.Fn winsch "WINDOW *win" "char c"
-.Fn winsertln "WINDOW *win"
-.Fn wmove "WINDOW *win" "int y" int x"
-.Fn wprintw "WINDOW *win" "char *fmt" "..."
-.Fn wrefresh "WINDOW *win"
-.Fn wscanw "WINDOW *win" "char *fmt" "..."
-.Fn wstandend "WINDOW *win"
-.Fn wstandout "WINDOW *win"
-.Dg
diff --git a/lib/libcurses/PSD.doc/intro.0 b/lib/libcurses/PSD.doc/intro.0
deleted file mode 100644
index c95b49d..0000000
--- a/lib/libcurses/PSD.doc/intro.0
+++ /dev/null
@@ -1,106 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)intro.0 8.1 (Berkeley) 6/4/93
-.\"
-.tp
-.(l C
-.ps 12
-.ft B
-Screen Updating and Cursor Movement Optimization:
-.fl
-A Library Package
-.ft
-.ps
-.sp
-.i "Kenneth C. R. C. Arnold"
-.i "Elan Amir"
-.sp
-Computer Science Division
-Department of Electrical Engineering and Computer Science
-University of California, Berkeley
-Berkeley, California 94720
-.sp 3
-.bi ABSTRACT
-.sp 2
-.)l
-.(q
-.pp
-This document describes a package of C library functions
-which allow the user to:
-.ie t .ip \ \ \ \(bu
-.el .ip 1)
-update a screen with reasonable optimization,
-.ie t .ip \ \ \ \(bu
-.el .ip 2)
-get input from the terminal
-in a screen-oriented fashion,
-and
-.ie t .ip \ \ \ \(bu
-.el .ip 3)
-independent from the above, move the cursor optimally
-from one point to another.
-.pp
-These routines all use the
-\*(tc \*(db to describe the capabilities of the terminal.
-.)q
-.b Acknowledgements
-.pp
-This package would not exist
-without the work of Bill Joy,
-who,
-in writing his editor,
-created the capability to generally describe terminals,
-wrote the routines which read this \*(db,
-and, most importantly,
-those which implement optimal cursor movement,
-which routines I have simply lifted nearly intact.
-Doug Merritt and Kurt Shoens also were extremely important,
-as were both willing to waste time listening to me rant and rave.
-The help and/or support of
-Ken Abrams,
-Alan Char,
-Mark Horton,
-and
-Joe Kalash,
-was, and is,
-also greatly appreciated.
-.i "Ken Arnold 16 April 1986"
-.pp
-The help and/or support of Kirk McKusick and Keith Bostic (public vi!)
-was invaluable in bringing the package ``into the 90's'', which now
-includes completely new data structures and screen refresh optimization
-routines.
-.i "Elan Amir 29 December 1992"
-
-
-
-
diff --git a/lib/libcurses/PSD.doc/intro.1 b/lib/libcurses/PSD.doc/intro.1
deleted file mode 100644
index a86d757..0000000
--- a/lib/libcurses/PSD.doc/intro.1
+++ /dev/null
@@ -1,249 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)intro.1 8.1 (Berkeley) 6/4/93
-.\"
-.bp
-.sh 1 Overview
-.pp
-In making available the generalized terminal descriptions in \*(tc,
-much information was made available to the programmer,
-but little work was taken out of one's hands.
-The purpose of this package is to allow the C programmer
-to do the most common type of terminal dependent functions,
-those of movement optimization and optimal screen updating,
-without doing any of the dirty work,
-and with nearly as much ease as is necessary to simply print
-or read things.
-.sh 2 "Terminology"
-.pp
-In this document, the following terminology is used:
-.de Ip
-.sp
-.in 5n
-.ti 0n
-.b "\\$1" :
-..
-.Ip window
-An internal representation
-containing an image of what a section of the terminal screen may look like
-at some point in time.
-This subsection can either encompass the entire terminal screen,
-or any smaller portion down to a single character within that screen.
-.Ip terminal
-Sometimes called
-.b terminal
-.b screen .
-The package's idea of what the terminal's screen currently looks like,
-.i i.e. ,
-what the user sees now.
-This is a special
-.i screen :
-.Ip screen
-This is a subset of windows which are as large as the terminal screen,
-.i i.e. ,
-they start at the upper left hand corner
-and encompass the lower right hand corner.
-One of these,
-.Vn stdscr ,
-is automatically provided for the programmer.
-.rm Ip
-.sh 2 "Compiling Applications"
-.pp
-In order to use the library,
-it is necessary to have certain types and variables defined.
-Therefore, the programmer must have a line:
-.(l
-.b "#include <curses.h>"
-.)l
-at the top of the program source.
-Compilations should have the following form:
-.(l
-.ie t \fBcc\fR [ \fIflags\fR ] file ... \fB\-lcurses \-ltermcap\fR
-.el \fIcc\fR [ flags ] file ... \fI\-lcurses \-ltermcap\fR
-.)l
-.sh 2 "Screen Updating"
-.pp
-In order to update the screen optimally,
-it is necessary for the routines to know what the screen currently looks like
-and what the programmer wants it to look like next.
-For this purpose,
-a data type
-(structure)
-named
-.Vn WINDOW
-is defined
-which describes a window image to the routines,
-including its starting position on the screen
-(the \*y of the upper left hand corner)
-and its size.
-One of these
-(called
-.Vn curscr
-for
-.i "current screen" )
-is a screen image of what the terminal currently looks like.
-Another screen
-(called
-.Vn stdscr ,
-for
-.i "standard screen" )
-is provided
-by default
-to make changes on.
-.pp
-A window is a purely internal representation.
-It is used to build and store
-a potential image of a portion of the terminal.
-It doesn't bear any necessary relation
-to what is really on the terminal screen.
-It is more like an array of characters on which to make changes.
-.pp
-When one has a window which describes
-what some part the terminal should look like,
-the routine
-.Fn refresh
-(or
-.Fn wrefresh
-if the window is not
-.Vn stdscr )
-is called.
-.Fn Refresh
-makes the terminal,
-in the area covered by the window,
-look like that window.
-Note, therefore, that changing something on a window
-.i does
-.bi not
-.i "change the terminal" .
-Actual updates to the terminal screen
-are made only by calling
-.Fn refresh
-or
-.Fn wrefresh .
-This allows the programmer to maintain several different ideas
-of what a portion of the terminal screen should look like.
-Also, changes can be made to windows in any order,
-without regard to motion efficiency.
-Then, at will,
-the programmer can effectively say
-.q "make it look like this" ,
-and the package will execute the changes in an optimal way.
-.sh 2 "Naming Conventions"
-.pp
-As hinted above,
-the routines can use several windows,
-but two are always available:
-.Vn curscr ,
-which is the image of what the terminal looks like at present,
-and
-.Vn stdscr ,
-which is the image of what the programmer wants the terminal to look like next.
-The user should not access
-.Vn curscr
-directly.
-Changes should be made to
-the appropriate screen,
-and then the routine
-.Fn refresh
-(or
-.Fn wrefresh )
-should be called.
-.pp
-Many functions are set up to deal with
-.Vn stdscr
-as a default screen.
-For example, to add a character to
-.Vn stdscr ,
-one calls
-.Fn addch
-with the desired character.
-If a different window is to be used,
-the routine
-.Fn waddch
-(for
-.b w indow-specific
-.Fn addch )
-is provided\**.
-.(f
-\**
-Actually,
-.Fn addch
-is really a
-.q #define
-macro with arguments,
-as are most of the "functions" which act upon
-.Vn stdscr .
-.)f
-This convention of prepending function names with a
-.Bq w
-when they are to be applied to specific windows
-is consistent.
-The only routines which do
-.i not
-do this are those
-to which a window must always be specified.
-.pp
-In order to move the current \*y from one point to another,
-the routines
-.Fn move
-and
-.Fn wmove
-are provided.
-However,
-it is often desirable to first move and then perform some I/O operation.
-In order to avoid clumsiness,
-most I/O routines can be preceded by the prefix
-.Bq mv
-and the desired \*y can then be added to the arguments to the function.
-For example,
-the calls
-.(l
-move(y\*,x);
-addch(ch);
-.)l
-can be replaced by
-.(l
-mvaddch(y\*,x\*,ch);
-.)l
-and
-.(l
-wmove(win\*,y\*,x);
-waddch(win\*,ch);
-.)l
-can be replaced by
-.(l
-mvwaddch(win\*,y\*,x\*,ch);
-.)l
-Note that the window description pointer
-.Vn win ) (
-comes before the added \*y.
-If a window pointer is needed, it is always the first parameter passed.
diff --git a/lib/libcurses/PSD.doc/intro.2 b/lib/libcurses/PSD.doc/intro.2
deleted file mode 100644
index d98c0c7..0000000
--- a/lib/libcurses/PSD.doc/intro.2
+++ /dev/null
@@ -1,77 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)intro.2 8.1 (Berkeley) 6/4/93
-.\"
-.sh 1 Variables
-.pp
-Many variables which are used to describe the terminal environment
-are available to the programmer. They are:
-.(b
-.TS
-expand;
-lw(6m) lw(8n) lw(50n).
-type name description
-_
-WINDOW * curscr T{
-.fi
-current version of the screen (terminal screen).
-T}
-WINDOW * stdscr T{
-standard screen. Most updates are usually done here.
-T}
-char * Def\*_term T{
-default terminal type if type cannot be determined
-T}
-bool My\*_term T{
-use the terminal specification in \fIDef\*_term\fR as terminal,
-irrelevant of real terminal type
-T}
-char * ttytype T{
-full name of the current terminal.
-T}
-int LINES T{
-number of lines on the terminal
-T}
-int COLS T{
-number of columns on the terminal
-T}
-int ERR T{
-error flag returned by routines on a fail.
-T}
-int OK T{
-flag returned by routines upon success.
-T}
-.TE
-.fi
-.ev
-.)b
-.lp
diff --git a/lib/libcurses/PSD.doc/intro.3 b/lib/libcurses/PSD.doc/intro.3
deleted file mode 100644
index d0ba9a2..0000000
--- a/lib/libcurses/PSD.doc/intro.3
+++ /dev/null
@@ -1,228 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)intro.3 8.1 (Berkeley) 6/4/93
-.\"
-.sh 1 Usage
-.pp
-This is a description of how to actually use the screen package.
-For simplicity, we assume all updating, reading, etc.
-is applied to
-.Vn stdscr ,
-although a different window can of course be specified.
-.sh 2 "Initialization"
-.pp
-In order to use the screen package,
-the routines must know about terminal characteristics,
-and the space for
-.Vn curscr
-and
-.Vn stdscr
-must be allocated.
-These functions are performed by
-.Fn initscr .
-Since it must allocate space for the windows,
-it can overflow core when attempting to do so.
-On this rather rare occasion,
-.Fn initscr
-returns ERR.
-.Fn Initscr
-must
-.bi always
-be called before any of the routines which affect windows are used.
-If it is not,
-the program will core dump as soon as either
-.Vn curscr
-or
-.Vn stdscr
-are referenced.
-However, it is usually best to wait to call it
-until after you are sure you will need it,
-like after checking for startup errors.
-Terminal status changing routines
-like
-.Fn nl
-and
-.Fn cbreak
-should be called after
-.Fn initscr .
-.pp
-After the initial window allocation done by
-.Fn initscr ,
-specific window characteristics can be set.
-Scrolling can be enabled by calling
-.Fn scrollok .
-If you want the cursor to be left after the last change, use
-.Fn leaveok .
-If this isn't done,
-.Fn refresh
-will move the cursor to the window's current \*y after updating it.
-Additional windows can be created by using the functions
-.Fn newwin
-and
-.Fn subwin .
-.Fn Delwin
-allows you to delete an exisiting window.
-The variables
-.Vn LINES
-and
-.Vn COLS
-control the size of the terminal. They are initially implicitly set by
-.Fn initscr ,
-but can be altered explicitly by the user followed by a call to
-.Fn initscr .
-Note that any call to
-.Fn initscr ,
-will always delete any existing
-.Vn stdscr
-and/or
-.Vn curscr
-before creating new ones so this change is best done before the initial call to
-.Fn initscr .
-.pp
-.sh 2 "Output"
-.pp
-The basic functions
-used to change what will go on a window are
-.Fn addch
-and
-.Fn move .
-.Fn Addch
-adds a character at the current \*y,
-returning ERR if it would cause the window to illegally scroll,
-.i i.e. ,
-printing a character in the lower right-hand corner
-of a terminal which automatically scrolls
-if scrolling is not allowed.
-.Fn Move
-changes the current \*y to whatever you want them to be.
-It returns ERR if you try to move off the window.
-As mentioned above, you can combine the two into
-.Fn mvaddch
-to do both things in one call.
-.pp
-The other output functions
-(such as
-.Fn addstr
-and
-.Fn printw )
-all call
-.Fn addch
-to add characters to the window.
-.pp
-After a change has been made to the window,
-you must call
-.Fn refresh .
-when you want the portion of the terminal covered by the window
-to reflect the change.
-In order to optimize finding changes,
-.Fn refresh
-assumes that any part of the window not changed
-since the last
-.Fn refresh
-of that window has not been changed on the terminal,
-.i i.e. ,
-that you have not refreshed a portion of the terminal
-with an overlapping window.
-If this is not the case,
-the routines
-.Fn touchwin ,
-.Fn touchline ,
-and
-.Fn touchoverlap
-are provided to make it look like a desired part of window has been changed,
-thus forcing
-.Fn refresh
-to check that whole subsection of the terminal for changes.
-.pp
-If you call
-.Fn wrefresh
-with
-.Vn curscr ,
-it will make the screen look like the image of
-.Vn curscr .
-This is useful for implementing a command
-which would redraw the screen in case it got messed up.
-.sh 2 Input
-.pp
-Input is essentially a mirror image of output.
-The complementary function to
-.Fn addch
-is
-.Fn getch
-which,
-if echo is set,
-will call
-.Fn addch
-to echo the character.
-Since the screen package needs to know what is on the terminal at all times,
-if characters are to be echoed,
-the tty must be in raw or cbreak mode.
-If it is not,
-.Fn getch
-sets it to be cbreak,
-and then reads in the character.
-.sh 2 "Termination"
-.pp
-In order to perform certain optimizations,
-and,
-on some terminals,
-to work at all,
-some things must be done
-before the screen routines start up.
-These functions are performed in
-.Fn getttmode
-and
-.Fn setterm ,
-which are called by
-.Fn initscr .
-In order to clean up after the routines,
-the routine
-.Fn endwin
-is provided.
-It restores tty modes to what they were
-when
-.Fn initscr
-was first called.
-The terminal state module uses the variable
-.Vn curses_termios
-to save the original terminal state which is then restored upon a call to
-.Fn endwin .
-Thus,
-anytime after the call to initscr,
-.Fn endwin
-should be called before exiting. Note however, that
-.Fn endwin
-should always be called
-.b before
-the final calls to
-.Fn delwin ,
-which free the storage of the windows.
diff --git a/lib/libcurses/PSD.doc/intro.4 b/lib/libcurses/PSD.doc/intro.4
deleted file mode 100644
index 9e52982..0000000
--- a/lib/libcurses/PSD.doc/intro.4
+++ /dev/null
@@ -1,69 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)intro.4 8.1 (Berkeley) 6/4/93
-.\"
-.sh 1 "Cursor Movement Optimizations"
-.pp
-One of the most difficult things to do properly is motion optimization.
-After using
-.Fn gettmode
-and
-.Fn setterm
-to get the terminal descriptions,
-the function
-.Fn mvcur
-deals with this task.
-It usage is simple:
-simply tell it where you are now and where you want to go.
-For example
-.(l
-mvcur(0\*,0\*,LINES/2\*,COLS/2);
-.)l
-.lp
-would move the cursor from the home position (0\*,0)
-to the middle of the screen.
-If you wish to force absolute addressing,
-you can use the function
-.Fn tgoto
-from the
-.b termlib (7)
-routines,
-or you can tell
-.Fn mvcur
-that you are impossibly far away,
-For example,
-to absolutely address the lower left hand corner of the screen
-from anywhere
-just claim that you are in the upper right hand corner:
-.(l
-mvcur(0\*,COLS\-1\*,LINES\-1\*,0);
-.)l
diff --git a/lib/libcurses/PSD.doc/intro.5 b/lib/libcurses/PSD.doc/intro.5
deleted file mode 100644
index d0f9657..0000000
--- a/lib/libcurses/PSD.doc/intro.5
+++ /dev/null
@@ -1,87 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)intro.5 8.1 (Berkeley) 6/4/93
-.\"
-.sh 1 "Character Output and Scrolling"
-.pp
-The character output policy deals with the following problems. First,
-where is the location of the cursor after a character is printed, and
-secondly, when does the screen scroll if scrolling is enabled.
-.pp
-In the normal case the characters are output as expected, with the cursor
-occupying the position of the next character to be output. However, when the
-cursor is on the last column of the line, the cursor will remain on that
-position after the last character on the line is output and will only assume
-the position on the next line when the next character (the first on the next
-line) is output.
-.pp
-Likewise, if scrolling is enabled, a scroll will be invoked only when the
-first character on he first line past the bottom line of the window is
-output. If scrolling is not enabled the chracters will to be output to the
-bottom right corner of the window which is the cursor location.
-.pp
-This policy allows consistent behavior of the cursor at the boundary
-conditions. Furthermore, it prevents a scroll from happening before it is
-actually needed (the old package used to scroll when the bottom right position
-was output a character). As a precendent, it models the
-.i xterm
-character output conventions.
-.sh 1 "Terminal State Handling"
-.pp
-The variable
-.Vn curses_termios
-contains the terminal state of the terminal. Certain historical routines
-return information:
-.Fn baudrate ,
-.Fn erasechar ,
-.Fn killchar ,
-and
-.Fn ospeed .
-These routines are obsolete and exist only for backward compatibility. If
-you wish to use the information in the
-.Vn curses_termios
-structure, you should use the
-\fItsetattr\fP(3)
-routines.
-.sh 1 "Subwindows"
-.pp
-Subwindows are windows which do not have an independent text structure,
-.i i.e. ,
-they are windows whose text is a subset of the text of a larger window: the
-.i parent
-window. One consequence of this is that changes to either the parent or the
-child window are destructive to the other,
-.i i.e. ,
-a change to the subwindow is also a change to the parent window and a change
-to the parent window in the region defined by the subwindow is implicitly a
-change to the subwindow as well.
-Apart from this detail, subwindows function like any other window.
diff --git a/lib/libcurses/PSD.doc/intro.6 b/lib/libcurses/PSD.doc/intro.6
deleted file mode 100644
index 7c4560d..0000000
--- a/lib/libcurses/PSD.doc/intro.6
+++ /dev/null
@@ -1,44 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)intro.6 8.1 (Berkeley) 6/4/93
-.\"
-.sh 1 "The Functions"
-.pp
-In the following definitions,
-.q \*m
-means that the
-.q function
-is really a
-.q #define
-macro with arguments.
-.ta 11m 17m 25m 33m 41m 49m 57m 65m 73m
-.so fns.doc
diff --git a/lib/libcurses/PSD.doc/life.c b/lib/libcurses/PSD.doc/life.c
deleted file mode 100644
index 5ecd07f..0000000
--- a/lib/libcurses/PSD.doc/life.c
+++ /dev/null
@@ -1,163 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)life.c 8.1 (Berkeley) 6/8/93
-.\"
-# include <curses.h>
-# include <signal.h>
-
-/*
- * Run a life game. This is a demonstration program for
- * the Screen Updating section of the -lcurses cursor package.
- */
-
-typedef struct lst_st { /* linked list element */
- int y, x; /* (y, x) position of piece */
- struct lst_st *next, *last; /* doubly linked */
-} LIST;
-
-LIST *Head; /* head of linked list */
-
-int die();
-
-main(ac, av)
-int ac;
-char *av[];
-{
- evalargs(ac, av); /* evaluate arguments */
-
- initscr(); /* initialize screen package */
- signal(SIGINT, die); /* set to restore tty stats */
- cbreak(); /* set for char-by-char */
- noecho(); /* input */
- nonl(); /* for optimization */
-
- getstart(); /* get starting position */
- for (;;) {
- prboard(); /* print out current board */
- update(); /* update board position */
- }
-}
-
-/*
- * This is the routine which is called when rubout is hit.
- * It resets the tty stats to their original values. This
- * is the normal way of leaving the program.
- */
-die()
-{
- signal(SIGINT, SIG_IGN); /* ignore rubouts */
- mvcur(0, COLS - 1, LINES - 1, 0); /* go to bottom of screen */
- endwin(); /* set terminal to good state */
- exit(0);
-}
-
-/*
- * Get the starting position from the user. They keys u, i, o, j, l,
- * m, ,, and . are used for moving their relative directions from the
- * k key. Thus, u move diagonally up to the left, , moves directly down,
- * etc. x places a piece at the current position, " " takes it away.
- * The input can also be from a file. The list is built after the
- * board setup is ready.
- */
-getstart()
-{
- reg char c;
- reg int x, y;
- auto char buf[100];
-
- box(stdscr, '|', '_'); /* box in the screen */
- move(1, 1); /* move to upper left corner */
-
- for (;;) {
- refresh(); /* print current position */
- if ((c = getch()) == 'q')
- break;
- switch (c) {
- case 'u':
- case 'i':
- case 'o':
- case 'j':
- case 'l':
- case 'm':
- case ',':
- case '.':
- adjustyx(c);
- break;
- case 'f':
- mvaddstr(0, 0, "File name: ");
- getstr(buf);
- readfile(buf);
- break;
- case 'x':
- addch('X');
- break;
- case ' ':
- addch(' ');
- break;
- }
- }
-
- if (Head != NULL) /* start new list */
- dellist(Head);
- Head = malloc(sizeof (LIST));
-
- /*
- * loop through the screen looking for 'x's, and add a list
- * element for each one
- */
- for (y = 1; y < LINES - 1; y++)
- for (x = 1; x < COLS - 1; x++) {
- move(y, x);
- if (inch() == 'x')
- addlist(y, x);
- }
-}
-
-/*
- * Print out the current board position from the linked list
- */
-prboard() {
-
- reg LIST *hp;
-
- erase(); /* clear out last position */
- box(stdscr, '|', '_'); /* box in the screen */
-
- /*
- * go through the list adding each piece to the newly
- * blank board
- */
- for (hp = Head; hp; hp = hp->next)
- mvaddch(hp->y, hp->x, 'X');
-
- refresh();
-}
diff --git a/lib/libcurses/PSD.doc/macros b/lib/libcurses/PSD.doc/macros
deleted file mode 100644
index b7f3abf..0000000
--- a/lib/libcurses/PSD.doc/macros
+++ /dev/null
@@ -1,144 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)macros 8.1 (Berkeley) 8/14/93
-.\"
-.\" this is the uncommented version. The commented one is in "macros.coms"
-.ie t .ds _ \d\(mi\u
-.el .ds _ _
-.ds , ,\
-.ds y (y\*,x) co-ordinates
-.ds db database
-.ie n .ds f \fI
-.el .ds f \fB
-.ds tc \*ftermcap\fP(5)
-.ds Es This returns ERR if it would cause the screen to scroll illegally.
-.ds Nm This has no associated \*(lq\fBmv\fP\*(rq command.
-.ie t .ds m \fB\s-2\(dg\s+2\fP
-.el .ds m [*]
-.\" .hy WINDOW
-.\".he ''\*(Ln''
-.\".fo ''\- % \-''
-.oh '\*(Ln''PS1:19-%'
-.eh 'PS1:19-%''\*(Ln'
-.de Un
-.b
-\s-2\\$2UNIX\\$1\s+2
-.ft
-..
-.de Ds
-.sp
-.lp
-.ev 1
-.nf
-.ft I
-.in 0
-.di Df
-..
-.de De
-.di
-.Df
-.ne \n(dn+2
-.ev
-.ip
-..
-.de Dg
-.di
-.Df
-.ne \n(dn+2
-.ev
-..
-.de Fd
-.br
-\&\\$4
-.fi
-.b
-\&\\$1(\\$2)
-.ft
-\&\\$3
-.br
-.nf
-..
-.de Vn
-\&\\$3\c
-.i "\\$1" \\$2
-..
-.de Bq
-.ie t \&\*(lq\fB\\$1\fP\*(rq
-.el \&\*(lq\fI\\$1\fP\*(rq
-..
-.de $0
-.(x
-.in \\n(Xs
-\\*($n \\$1
-.)x
-..
-.de $1
-.nr Xs 0
-..
-.de $2
-.nr Xs 3
-..
-.de $3
-.nr Xs 6
-..
-.de Fn
-.if \\n(.$==0 .tm error
-.nr ll 0
-.nr dg 0
-.ft R
-.if '\\$\\n(.$'.' .nr ll 1
-.if '\\$\\n(.$',' .nr ll 1
-.if '\\$\\n(.$')' .nr ll 1
-.if '\\$\\n(.$').' .nr ll 1
-.if '\\$\\n(.$';' .nr ll 1
-.if '\\$\\n(.$':' .nr ll 1
-.if '\\$\\n(.$'\'s' .nr ll 1
-.if '\\$\\n(.$'\(dg' .nr ll 1
-.\" .if '\\$\\n(.$'' .nr ll 1
-.nr al \\n(.$-\\n(ll
-.ds ot \f(CB\\$1\fP(
-.if \\n(al>1 .as ot \fI\\$2\fP
-.if \\n(al>2 .as ot ", \fI\\$3\fP
-.if \\n(al>3 .as ot ", \fI\\$4\fP
-.if \\n(al>4 .as ot ", \fI\\$5\fP
-.if \\n(al>5 .as ot ", \fI\\$6\fP
-.if \\n(al>6 .as ot ", \fI\\$7\fP
-.if \\n(al>7 .as ot ", \fI\\$8\fP
-.if \\n(al>8 .as ot ", \fI\\$9\fP
-.as ot )
-.if \\n(.$>1 \{\
-. if \\n(ll==0 .as ot ;
-. if '\\$\\n(.$'\(dg' .as ot ;
-.\}
-.if \\n(ll==1 .as ot \\$\\n(.$
-\\*(ot
-..
diff --git a/lib/libcurses/PSD.doc/twinkle1.c b/lib/libcurses/PSD.doc/twinkle1.c
deleted file mode 100644
index 7d3d00d..0000000
--- a/lib/libcurses/PSD.doc/twinkle1.c
+++ /dev/null
@@ -1,157 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)twinkle1.c 8.1 (Berkeley) 6/8/93
-.\"
-# include <curses.h>
-# include <signal.h>
-
-/*
- * the idea for this program was a product of the imagination of
- * Kurt Schoens. Not responsible for minds lost or stolen.
- */
-
-# define NCOLS 80
-# define NLINES 24
-# define MAXPATTERNS 4
-
-typedef struct {
- int y, x;
-} LOCS;
-
-LOCS Layout[NCOLS * NLINES]; /* current board layout */
-
-int Pattern, /* current pattern number */
- Numstars; /* number of stars in pattern */
-
-char *getenv();
-
-int die();
-
-main()
-{
- srand(getpid()); /* initialize random sequence */
-
- initscr();
- signal(SIGINT, die);
- noecho();
- nonl();
- leaveok(stdscr, TRUE);
- scrollok(stdscr, FALSE);
-
- for (;;) {
- makeboard(); /* make the board setup */
- puton('*'); /* put on '*'s */
- puton(' '); /* cover up with ' 's */
- }
-}
-
-/*
- * On program exit, move the cursor to the lower left corner by
- * direct addressing, since current location is not guaranteed.
- * We lie and say we used to be at the upper right corner to guarantee
- * absolute addressing.
- */
-die()
-{
- signal(SIGINT, SIG_IGN);
- mvcur(0, COLS - 1, LINES - 1, 0);
- endwin();
- exit(0);
-}
-
-
-/*
- * Make the current board setup. It picks a random pattern and
- * calls ison() to determine if the character is on that pattern
- * or not.
- */
-makeboard()
-{
- reg int y, x;
- reg LOCS *lp;
-
- Pattern = rand() % MAXPATTERNS;
- lp = Layout;
- for (y = 0; y < NLINES; y++)
- for (x = 0; x < NCOLS; x++)
- if (ison(y, x)) {
- lp->y = y;
- lp->x = x;
- lp++;
- }
- Numstars = lp - Layout;
-}
-
-/*
- * Return TRUE if (y, x) is on the current pattern.
- */
-ison(y, x)
-reg int y, x; {
-
- switch (Pattern) {
- case 0: /* alternating lines */
- return !(y & 01);
- case 1: /* box */
- if (x >= LINES && y >= NCOLS)
- return FALSE;
- if (y < 3 || y >= NLINES - 3)
- return TRUE;
- return (x < 3 || x >= NCOLS - 3);
- case 2: /* holy pattern! */
- return ((x + y) & 01);
- case 3: /* bar across center */
- return (y >= 9 && y <= 15);
- }
- /* NOTREACHED */
-}
-
-puton(ch)
-reg char ch;
-{
- reg LOCS *lp;
- reg int r;
- reg LOCS *end;
- LOCS temp;
-
- end = &Layout[Numstars];
- for (lp = Layout; lp < end; lp++) {
- r = rand() % Numstars;
- temp = *lp;
- *lp = Layout[r];
- Layout[r] = temp;
- }
-
- for (lp = Layout; lp < end; lp++) {
- mvaddch(lp->y, lp->x, ch);
- refresh();
- }
-}
diff --git a/lib/libcurses/PSD.doc/twinkle2.c b/lib/libcurses/PSD.doc/twinkle2.c
deleted file mode 100644
index 0a25590..0000000
--- a/lib/libcurses/PSD.doc/twinkle2.c
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)twinkle2.c 8.1 (Berkeley) 6/8/93
-.\"
-extern int _putchar();
-
-main()
-{
- reg char *sp;
-
- srand(getpid()); /* initialize random sequence */
-
- if (isatty(0)) {
- gettmode();
- if ((sp = getenv("TERM")) != NULL)
- setterm(sp);
- signal(SIGINT, die);
- }
- else {
- printf("Need a terminal on %d\n", _tty_ch);
- exit(1);
- }
- _puts(TI);
- _puts(VS);
-
- noecho();
- nonl();
- tputs(CL, NLINES, _putchar);
- for (;;) {
- makeboard(); /* make the board setup */
- puton('*'); /* put on '*'s */
- puton(' '); /* cover up with ' 's */
- }
-}
-
-puton(ch)
-char ch;
-{
- reg LOCS *lp;
- reg int r;
- reg LOCS *end;
- LOCS temp;
- static int lasty, lastx;
-
- end = &Layout[Numstars];
- for (lp = Layout; lp < end; lp++) {
- r = rand() % Numstars;
- temp = *lp;
- *lp = Layout[r];
- Layout[r] = temp;
- }
-
- for (lp = Layout; lp < end; lp++)
- /* prevent scrolling */
- if (!AM || (lp->y < NLINES - 1 || lp->x < NCOLS - 1)) {
- mvcur(lasty, lastx, lp->y, lp->x);
- putchar(ch);
- lasty = lp->y;
- if ((lastx = lp->x + 1) >= NCOLS)
- if (AM) {
- lastx = 0;
- lasty++;
- }
- else
- lastx = NCOLS - 1;
- }
-}
diff --git a/lib/libcurses/PSD.doc/win_st.c b/lib/libcurses/PSD.doc/win_st.c
deleted file mode 100644
index 7790f6c..0000000
--- a/lib/libcurses/PSD.doc/win_st.c
+++ /dev/null
@@ -1,58 +0,0 @@
-.\" Copyright (c) 1980, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)win_st.c 8.1 (Berkeley) 6/8/93
-.\"
-# define WINDOW struct _win_st
-
-struct _win_st {
- short _cury, _curx;
- short _maxy, _maxx;
- short _begy, _begx;
- short _flags;
- short _ch_off;
- bool _clear;
- bool _leave;
- bool _scroll;
- char **_y;
- short *_firstch;
- short *_lastch;
- struct _win_st *_nextp, *_orig;
-};
-
-# define _ENDLINE 001
-# define _FULLWIN 002
-# define _SCROLLWIN 004
-# define _FLUSH 010
-# define _FULLLINE 020
-# define _IDLINE 040
-# define _STANDOUT 0200
-# define _NOCHANGE -1
diff --git a/lib/libcurses/_putchar.c b/lib/libcurses/_putchar.c
deleted file mode 100644
index ff90d2c..0000000
--- a/lib/libcurses/_putchar.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)_putchar.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-int
-_putchar(ch)
- int ch;
-{
- __cputchar(ch);
- return 0;
-}
-
diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c
deleted file mode 100644
index 39124a0..0000000
--- a/lib/libcurses/addbytes.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 1987, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-#define SYNCH_IN {y = win->cury; x = win->curx;}
-#define SYNCH_OUT {win->cury = y; win->curx = x;}
-
-/*
- * waddbytes --
- * Add the character to the current position in the given window.
- */
-int
-__waddbytes(win, bytes, count, so)
- register WINDOW *win;
- register const char *bytes;
- register int count;
- int so;
-{
- static char blanks[] = " ";
- register int c, newx, x, y;
- char stand;
- __LINE *lp;
-
- SYNCH_IN;
-
-#ifdef DEBUG
- __CTRACE("ADDBYTES('%c') at (%d, %d)\n", c, y, x);
-#endif
- while (count--) {
- c = *bytes++;
- switch (c) {
- case '\t':
- SYNCH_OUT;
- if (waddbytes(win, blanks, 8 - (x % 8)) == ERR)
- return (ERR);
- SYNCH_IN;
- break;
-
- default:
-#ifdef DEBUG
- __CTRACE("ADDBYTES(%0.2o, %d, %d)\n", win, y, x);
-#endif
-
- lp = win->lines[y];
- if (lp->flags & __ISPASTEOL) {
- lp->flags &= ~__ISPASTEOL;
-newline: if (y == win->maxy - 1) {
- if (win->flags & __SCROLLOK) {
- SYNCH_OUT;
- scroll(win);
- SYNCH_IN;
- lp = win->lines[y];
- x = 0;
- } else
- return (ERR);
- } else {
- y++;
- lp = win->lines[y];
- x = 0;
- }
- if (c == '\n')
- break;
- }
-
- stand = '\0';
- if (win->flags & __WSTANDOUT || so)
- stand |= __STANDOUT;
-#ifdef DEBUG
- __CTRACE("ADDBYTES: 1: y = %d, x = %d, firstch = %d, lastch = %d\n",
- y, x, *win->lines[y]->firstchp, *win->lines[y]->lastchp);
-#endif
- if (lp->line[x].ch != c ||
- !(lp->line[x].attr & stand)) {
- newx = x + win->ch_off;
- if (!(lp->flags & __ISDIRTY)) {
- lp->flags |= __ISDIRTY;
- *lp->firstchp = *lp->lastchp = newx;
- }
- else if (newx < *lp->firstchp)
- *lp->firstchp = newx;
- else if (newx > *lp->lastchp)
- *lp->lastchp = newx;
-#ifdef DEBUG
- __CTRACE("ADDBYTES: change gives f/l: %d/%d [%d/%d]\n",
- *lp->firstchp, *lp->lastchp,
- *lp->firstchp - win->ch_off,
- *lp->lastchp - win->ch_off);
-#endif
- }
- lp->line[x].ch = c;
- if (stand)
- lp->line[x].attr |= __STANDOUT;
- else
- lp->line[x].attr &= ~__STANDOUT;
- if (x == win->maxx - 1)
- lp->flags |= __ISPASTEOL;
- else
- x++;
-#ifdef DEBUG
- __CTRACE("ADDBYTES: 2: y = %d, x = %d, firstch = %d, lastch = %d\n",
- y, x, *win->lines[y]->firstchp, *win->lines[y]->lastchp);
-#endif
- break;
- case '\n':
- SYNCH_OUT;
- wclrtoeol(win);
- SYNCH_IN;
- if (!NONL)
- x = 0;
- goto newline;
- case '\r':
- x = 0;
- break;
- case '\b':
- if (--x < 0)
- x = 0;
- break;
- }
- }
- SYNCH_OUT;
- return (OK);
-}
diff --git a/lib/libcurses/addch.c b/lib/libcurses/addch.c
deleted file mode 100644
index d5f3001..0000000
--- a/lib/libcurses/addch.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)addch.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * waddch --
- * Add the character to the current position in the given window.
- *
- */
-int
-waddch(win, ch)
- WINDOW *win;
- int ch;
-{
- __LDATA buf;
-
- buf.ch = ch;
- buf.attr = 0;
- return (__waddch(win, &buf));
-}
-
-int
-__waddch(win, dp)
- WINDOW *win;
- __LDATA *dp;
-{
- char buf[2];
-
- buf[0] = dp->ch;
- return (__waddbytes(win, buf, 1, dp->attr & __STANDOUT));
-}
diff --git a/lib/libcurses/addnstr.c b/lib/libcurses/addnstr.c
deleted file mode 100644
index 92a6e68..0000000
--- a/lib/libcurses/addnstr.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)addnstr.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <string.h>
-
-#include "curses.h"
-
-/*
- * waddnstr --
- * Add a string (at most n characters) to the given window
- * starting at (_cury, _curx). If n is negative, add the
- * entire string.
- */
-int
-waddnstr(win, s, n)
- WINDOW *win;
- const char *s;
- int n;
-{
- size_t len;
- const char *p;
-
- if (n > 0)
- for (p = s, len = 0; n-- && *p++; ++len);
- else
- len = strlen(s);
- return (waddbytes(win, s, len));
-}
diff --git a/lib/libcurses/box.c b/lib/libcurses/box.c
deleted file mode 100644
index 191e37c..0000000
--- a/lib/libcurses/box.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)box.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * box --
- * Draw a box around the given window with "vert" as the vertical
- * delimiting char, and "hor", as the horizontal one.
- */
-int
-box(win, vert, hor)
- register WINDOW *win;
- int vert, hor;
-{
- register int endy, endx, i;
- register __LDATA *fp, *lp;
-
- endx = win->maxx;
- endy = win->maxy - 1;
- fp = win->lines[0]->line;
- lp = win->lines[endy]->line;
- for (i = 0; i < endx; i++) {
- fp[i].ch = lp[i].ch = hor;
- fp[i].attr &= ~__STANDOUT;
- lp[i].attr &= ~__STANDOUT;
- }
- endx--;
- for (i = 0; i <= endy; i++) {
- win->lines[i]->line[0].ch = vert;
- win->lines[i]->line[endx].ch = vert;
- win->lines[i]->line[0].attr &= ~__STANDOUT;
- win->lines[i]->line[endx].attr &= ~__STANDOUT;
- }
- if (!(win->flags & __SCROLLOK) && (win->flags & __SCROLLWIN)) {
- fp[0].ch = fp[endx].ch = lp[0].ch = lp[endx].ch = ' ';
- fp[0].attr &= ~__STANDOUT;
- fp[endx].attr &= ~__STANDOUT;
- lp[0].attr &= ~__STANDOUT;
- lp[endx].attr &= ~__STANDOUT;
- }
- __touchwin(win);
- return (OK);
-}
diff --git a/lib/libcurses/clear.c b/lib/libcurses/clear.c
deleted file mode 100644
index 54c0b30..0000000
--- a/lib/libcurses/clear.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)clear.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * wclear --
- * Clear the window.
- */
-int
-wclear(win)
- register WINDOW *win;
-{
- if (werase(win) == OK) {
- win->flags |= __CLEAROK;
- return (OK);
- }
- return (ERR);
-}
diff --git a/lib/libcurses/clrtobot.c b/lib/libcurses/clrtobot.c
deleted file mode 100644
index 81ee6a4..0000000
--- a/lib/libcurses/clrtobot.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)clrtobot.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * wclrtobot --
- * Erase everything on the window.
- */
-int
-wclrtobot(win)
- register WINDOW *win;
-{
- register int minx, startx, starty, y;
- register __LDATA *sp, *end, *maxx;
-
- if (win->lines[win->cury]->flags & __ISPASTEOL) {
- starty = win->cury + 1;
- startx = 0;
- } else {
- starty = win->cury;
- startx = win->curx;
- }
- for (y = starty; y < win->maxy; y++) {
- minx = -1;
- end = &win->lines[y]->line[win->maxx];
- for (sp = &win->lines[y]->line[startx]; sp < end; sp++)
- if (sp->ch != ' ' || sp->attr != 0) {
- maxx = sp;
- if (minx == -1)
- minx = sp - win->lines[y]->line;
- sp->ch = ' ';
- sp->attr = 0;
- }
- if (minx != -1)
- __touchline(win, y, minx, maxx - win->lines[y]->line,
- 0);
- startx = 0;
- }
- return (OK);
-}
diff --git a/lib/libcurses/clrtoeol.c b/lib/libcurses/clrtoeol.c
deleted file mode 100644
index 1f10c41..0000000
--- a/lib/libcurses/clrtoeol.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)clrtoeol.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * wclrtoeol --
- * Clear up to the end of line.
- */
-int
-wclrtoeol(win)
- register WINDOW *win;
-{
- register int minx, x, y;
- register __LDATA *end, *maxx, *sp;
-
- y = win->cury;
- x = win->curx;
- if (win->lines[y]->flags & __ISPASTEOL) {
- if (y < win->maxy - 1) {
- y++;
- x = 0;
- } else
- return (OK);
- }
- end = &win->lines[y]->line[win->maxx];
- minx = -1;
- maxx = &win->lines[y]->line[x];
- for (sp = maxx; sp < end; sp++)
- if (sp->ch != ' ' || sp->attr != 0) {
- maxx = sp;
- if (minx == -1)
- minx = sp - win->lines[y]->line;
- sp->ch = ' ';
- sp->attr = 0;
- }
-#ifdef DEBUG
- __CTRACE("CLRTOEOL: minx = %d, maxx = %d, firstch = %d, lastch = %d\n",
- minx, maxx - win->lines[y]->line, *win->lines[y]->firstchp,
- *win->lines[y]->lastchp);
-#endif
- /* Update firstch and lastch for the line. */
- return (__touchline(win, y, x, win->maxx - 1, 0));
-}
-
-
-
-
-
diff --git a/lib/libcurses/cr_put.c b/lib/libcurses/cr_put.c
deleted file mode 100644
index f17bb2a..0000000
--- a/lib/libcurses/cr_put.c
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)cr_put.c 8.3 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <string.h>
-
-#include "curses.h"
-
-#define HARDTABS 8
-
-/*
- * Terminal driving and line formatting routines. Basic motion optimizations
- * are done here as well as formatting lines (printing of control characters,
- * line numbering and the like).
- */
-
-/* Stub function for the users. */
-int
-mvcur(ly, lx, y, x)
- int ly, lx, y, x;
-{
- return (__mvcur(ly, lx, y, x, 0));
-}
-
-static void fgoto __P((int));
-static int plod __P((int, int));
-static void plodput __P((int));
-static int tabcol __P((int, int));
-
-static int outcol, outline, destcol, destline;
-
-/*
- * Sync the position of the output cursor. Most work here is rounding for
- * terminal boundaries getting the column position implied by wraparound or
- * the lack thereof and rolling up the screen to get destline on the screen.
- */
-int
-__mvcur(ly, lx, y, x, in_refresh)
- int ly, lx, y, x, in_refresh;
-{
-#ifdef DEBUG
- __CTRACE("mvcur: moving cursor from (%d, %d) to (%d, %d)\n",
- ly, lx, y, x);
-#endif
- destcol = x;
- destline = y;
- outcol = lx;
- outline = ly;
- if (destline != outline || destcol != outcol)
- fgoto(in_refresh);
- return (OK);
-}
-
-static void
-fgoto(in_refresh)
- int in_refresh;
-{
- register int c, l;
- register char *cgp;
-
- if (destcol >= COLS) {
- destline += destcol / COLS;
- destcol %= COLS;
- }
- if (outcol >= COLS) {
- l = (outcol + 1) / COLS;
- outline += l;
- outcol %= COLS;
- if (AM == 0) {
- while (l > 0) {
- if (__pfast)
- if (CR)
- tputs(CR, 1, __cputchar);
- else
- putchar('\r');
- if (NL)
- tputs(NL, 1, __cputchar);
- else
- putchar('\n');
- l--;
- }
- outcol = 0;
- }
- if (outline > LINES - 1) {
- destline -= outline - (LINES - 1);
- outline = LINES - 1;
- }
- }
- if (destline >= LINES) {
- l = destline;
- destline = LINES - 1;
- if (outline < LINES - 1) {
- c = destcol;
- if (__pfast == 0 && !CA)
- destcol = 0;
- fgoto(in_refresh);
- destcol = c;
- }
- while (l >= LINES) {
- /* The following linefeed (or simulation thereof) is
- * supposed to scroll up the screen, since we are on
- * the bottom line. We make the assumption that
- * linefeed will scroll. If ns is in the capability
- * list this won't work. We should probably have an
- * sc capability but sf will generally take the place
- * if it works.
- *
- * Superbee glitch: in the middle of the screen have
- * to use esc B (down) because linefeed screws up in
- * "Efficient Paging" (what a joke) mode (which is
- * essential in some SB's because CRLF mode puts
- * garbage in at end of memory), but you must use
- * linefeed to scroll since down arrow won't go past
- * memory end. I turned this off after recieving Paul
- * Eggert's Superbee description which wins better.
- */
- if (NL /* && !XB */ && __pfast)
- tputs(NL, 1, __cputchar);
- else
- putchar('\n');
- l--;
- if (__pfast == 0)
- outcol = 0;
- }
- }
- if (destline < outline && !(CA || UP))
- destline = outline;
- if (CA) {
- cgp = tgoto(CM, destcol, destline);
-
- /*
- * Need this condition due to inconsistent behavior
- * of backspace on the last column.
- */
- if (outcol != COLS - 1 && plod(strlen(cgp), in_refresh) > 0)
- plod(0, in_refresh);
- else
- tputs(cgp, 1, __cputchar);
- } else
- plod(0, in_refresh);
- outline = destline;
- outcol = destcol;
-}
-/*
- * Move (slowly) to destination.
- * Hard thing here is using home cursor on really deficient terminals.
- * Otherwise just use cursor motions, hacking use of tabs and overtabbing
- * and backspace.
- */
-
-static int plodcnt, plodflg;
-
-static void
-plodput(c)
- int c;
-{
- if (plodflg)
- --plodcnt;
- else
- putchar(c);
-}
-
-static int
-plod(cnt, in_refresh)
- int cnt, in_refresh;
-{
- register int i, j, k, soutcol, soutline;
-
- plodcnt = plodflg = cnt;
- soutcol = outcol;
- soutline = outline;
- /*
- * Consider homing and moving down/right from there, vs. moving
- * directly with local motions to the right spot.
- */
- if (HO) {
- /*
- * i is the cost to home and tab/space to the right to get to
- * the proper column. This assumes ND space costs 1 char. So
- * i + destcol is cost of motion with home.
- */
- if (GT)
- i = (destcol / HARDTABS) + (destcol % HARDTABS);
- else
- i = destcol;
-
- /* j is cost to move locally without homing. */
- if (destcol >= outcol) { /* if motion is to the right */
- j = destcol / HARDTABS - outcol / HARDTABS;
- if (GT && j)
- j += destcol % HARDTABS;
- else
- j = destcol - outcol;
- } else
- /* leftward motion only works if we can backspace. */
- if (outcol - destcol <= i && (BS || BC))
- /* Cheaper to backspace. */
- i = j = outcol - destcol;
- else
- /* Impossibly expensive. */
- j = i + 1;
-
- /* k is the absolute value of vertical distance. */
- k = outline - destline;
- if (k < 0)
- k = -k;
- j += k;
-
- /* Decision. We may not have a choice if no UP. */
- if (i + destline < j || (!UP && destline < outline)) {
- /*
- * Cheaper to home. Do it now and pretend it's a
- * regular local motion.
- */
- tputs(HO, 1, plodput);
- outcol = outline = 0;
- } else if (LL) {
- /*
- * Quickly consider homing down and moving from there.
- * Assume cost of LL is 2.
- */
- k = (LINES - 1) - destline;
- if (i + k + 2 < j && (k <= 0 || UP)) {
- tputs(LL, 1, plodput);
- outcol = 0;
- outline = LINES - 1;
- }
- }
- } else
- /* No home and no up means it's impossible. */
- if (!UP && destline < outline)
- return (-1);
- if (GT)
- i = destcol % HARDTABS + destcol / HARDTABS;
- else
- i = destcol;
-#ifdef notdef
- if (BT && outcol > destcol &&
- (j = (((outcol+7) & ~7) - destcol - 1) >> 3)) {
- j *= (k = strlen(BT));
- if ((k += (destcol&7)) > 4)
- j += 8 - (destcol&7);
- else
- j += k;
- }
- else
-#endif
- j = outcol - destcol;
-
- /*
- * If we will later need a \n which will turn into a \r\n by the
- * system or the terminal, then don't bother to try to \r.
- */
- if ((NONL || !__pfast) && outline < destline)
- goto dontcr;
-
- /*
- * If the terminal will do a \r\n and there isn't room for it, then
- * we can't afford a \r.
- */
- if (NC && outline >= destline)
- goto dontcr;
-
- /*
- * If it will be cheaper, or if we can't back up, then send a return
- * preliminarily.
- */
- if ((j > i + 1) || (outcol > destcol && !BS && !BC)) {
- /*
- * BUG: this doesn't take the (possibly long) length of CR
- * into account.
- */
- if (CR)
- tputs(CR, 1, plodput);
- else
- plodput('\r');
- if (NC) {
- if (NL)
- tputs(NL, 1, plodput);
- else
- plodput('\n');
- outline++;
- }
- outcol = 0;
- }
-
-dontcr: while (outline < destline) {
- outline++;
- if (NL)
- tputs(NL, 1, plodput);
- else
- plodput('\n');
- if (plodcnt < 0)
- goto out;
- if (NONL || __pfast == 0)
- outcol = 0;
- }
- if (BT)
- k = strlen(BT);
- while (outcol > destcol) {
- if (plodcnt < 0)
- goto out;
-#ifdef notdef
- if (BT && outcol - destcol > k + 4) {
- tputs(BT, 0, plodput);
- outcol--;
- outcol &= ~7;
- continue;
- }
-#endif
- outcol--;
- if (BC)
- tputs(BC, 0, plodput);
- else
- plodput('\b');
- }
- while (outline > destline) {
- outline--;
- tputs(UP, 1, plodput);
- if (plodcnt < 0)
- goto out;
- }
- if (GT && destcol - outcol > 1) {
- for (;;) {
- i = tabcol(outcol, HARDTABS);
- if (i > destcol)
- break;
- if (TA)
- tputs(TA, 0, plodput);
- else
- plodput('\t');
- outcol = i;
- }
- if (destcol - outcol > 4 && i < COLS && (BC || BS)) {
- if (TA)
- tputs(TA, 0, plodput);
- else
- plodput('\t');
- outcol = i;
- while (outcol > destcol) {
- outcol--;
- if (BC)
- tputs(BC, 0, plodput);
- else
- plodput('\b');
- }
- }
- }
- while (outcol < destcol) {
- /*
- * Move one char to the right. We don't use ND space because
- * it's better to just print the char we are moving over.
- */
- if (in_refresh)
- if (plodflg) /* Avoid a complex calculation. */
- plodcnt--;
- else {
- i = curscr->lines[outline]->line[outcol].ch;
- if ((curscr->lines[outline]->line[outcol].attr
- & __STANDOUT) ==
- (curscr->flags & __WSTANDOUT))
- putchar(i);
- else
- goto nondes;
- }
- else
-nondes: if (ND)
- tputs(ND, 0, plodput);
- else
- plodput(' ');
- outcol++;
- if (plodcnt < 0)
- goto out;
- }
-
-out: if (plodflg) {
- outcol = soutcol;
- outline = soutline;
- }
- return (plodcnt);
-}
-
-/*
- * Return the column number that results from being in column col and
- * hitting a tab, where tabs are set every ts columns. Work right for
- * the case where col > COLS, even if ts does not divide COLS.
- */
-static int
-tabcol(col, ts)
- int col, ts;
-{
- int offset;
-
- if (col >= COLS) {
- offset = COLS * (col / COLS);
- col -= offset;
- } else
- offset = 0;
- return (col + ts - (col % ts) + offset);
-}
diff --git a/lib/libcurses/ctrace.c b/lib/libcurses/ctrace.c
deleted file mode 100644
index 4f53906..0000000
--- a/lib/libcurses/ctrace.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)ctrace.c 8.2 (Berkeley) 10/5/93";
-#endif /* not lint */
-
-#ifdef DEBUG
-#include <stdio.h>
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#ifndef TFILE
-#define TFILE "__curses.out"
-#endif
-
-static FILE *tracefp; /* Curses debugging file descriptor. */
-
-void
-#ifdef __STDC__
-__CTRACE(const char *fmt, ...)
-#else
-__CTRACE(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- if (tracefp == NULL)
- tracefp = fopen(TFILE, "w");
- if (tracefp == NULL)
- return;
- (void)vfprintf(tracefp, fmt, ap);
- va_end(ap);
- (void)fflush(tracefp);
-}
-#endif
diff --git a/lib/libcurses/cur_hash.c b/lib/libcurses/cur_hash.c
deleted file mode 100644
index b358184..0000000
--- a/lib/libcurses/cur_hash.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)cur_hash.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/types.h>
-
-
-/*
- * __hash() is "hashpjw" from the Dragon Book, Aho, Sethi & Ullman, p.436.
- */
-u_int
-__hash(s, len)
- unsigned char *s;
- int len;
-{
- register u_int h, g, i;
-
- h = 0;
- i = 0;
- while (i < len) {
- h = (h << 4) + s[i];
- if ( (g = h & 0xf0000000) ) {
- h = h ^ (g >> 24);
- h = h ^ g;
- }
- i++;
- }
- return h;
-}
diff --git a/lib/libcurses/curses.3 b/lib/libcurses/curses.3
deleted file mode 100644
index a081540..0000000
--- a/lib/libcurses/curses.3
+++ /dev/null
@@ -1,207 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)curses.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt CURSES 3
-.Os BSD 4
-.Sh NAME
-.Nm curses
-.Nd screen functions with ``optimal'' cursor motion
-.Sh SYNOPSIS
-.Nm cc
-.Op Ar flags
-.Ar files
-.Fl lcurses ltermcap
-.Op Ar libraries
-.Sh DESCRIPTION
-These routines give the user a method of updating screens with reasonable
-optimization. They keep an image of the current screen,
-and the user sets up an image of a new one. Then the
-.Fn refresh
-tells the routines to make the current screen look like the new one.
-In order to initialize the routines, the routine
-.Fn initscr
-must be called before any of the other routines that deal with windows and
-screens are used. The routine
-.Fn endwin
-should be called before exiting.
-.Sh SEE ALSO
-.Xr ioctl 2 ,
-.Xr getenv 3 ,
-.Xr tty 4 ,
-.Xr termcap 5
-.Rs
-.%T Screen Updating and Cursor Movement Optimization: A Library Package
-.%A Ken Arnold
-.Re
-.Sh AUTHOR
-.An Ken Arnold
-.Sh FUNCTIONS
-.Bl -column "subwin(win,lines,cols,begin_y,begin_x) "
-.It addch(ch) add a character to
-.Em stdscr
-.It addstr(str) add a string to
-.Em stdscr
-.It box(win,vert,hor) draw a box around a window
-.It cbreak() set cbreak mode
-.It clear() clear
-.Em stdscr
-.It clearok(scr,boolf) set clear flag for
-.Em scr
-.It clrtobot() clear to bottom on
-.Em stdscr
-.It clrtoeol() clear to end of line on
-.Em stdscr
-.It delch() delete a character
-.It deleteln() delete a line
-.It delwin(win) delete
-.Em win
-.It echo() set echo mode
-.It endwin() end window modes
-.It erase() erase
-.Em stdscr
-.It flusok(win,boolf) set flush-on-refresh flag for
-.Em win
-.It getch() get a char through
-.Em stdscr
-.It getcap(name) get terminal capability
-.Em name
-.It getstr(str) get a string through
-.Em stdscr
-.It gettmode() get tty modes
-.It getyx(win,y,x) get (y,x) co-ordinates for
-.Em win
-.It inch() get char at current (y,x) co-ordinates
-.It initscr() initialize screens
-.It insch(c) insert a char
-.It insertln() insert a line
-.It leaveok(win,boolf) set leave flag for
-.Em win
-.It longname(termbuf,name) get long name from
-.Em termbuf
-.It move(y,x) move to (y,x) on
-.Em stdscr
-.It mvcur(lasty,lastx,newy,newx) actually move cursor
-.It newwin(lines,cols,begin_y,begin_x)\ create a new window
-.It nl() set newline mapping
-.It nocbreak() unset cbreak mode
-.It noecho() unset echo mode
-.It nonl() unset newline mapping
-.It noraw() unset raw mode
-.It overlay(win1,win2) overlay
-.Em win1
-on
-.Em win2
-.It overwrite(win1,win2) overwrite
-.Em win1
-on top of
-.Em win2
-.It printw(fmt,arg1,arg2,...) printf on
-.Em stdscr
-.It raw() set raw mode
-.It refresh() make current screen look like
-.Em stdscr
-.It resetty() reset tty flags to stored value
-.It savetty() stored current tty flags
-.It scanw(fmt,arg1,arg2,...) scanf through
-.Em stdscr
-.It scroll(win) scroll
-.Em win
-one line
-.It scrollok(win,boolf) set scroll flag for
-.Em win
-.It setterm(name) set term variables for name
-.It standend() end standout mode
-.It standout() start standout mode
-.It subwin(win,lines,cols,begin_y,begin_x)\ create a subwindow of
-.Em win
-.It touchline(win,y,sx,ex) mark line
-.Em y
-.Em sx
-through
-.Em sy
-as changed on
-.Em win
-.It touchoverlap(win1,win2) mark overlap of
-.Em win1
-on
-.Em win2
-as changed
-.It touchwin(win) \*(lqchange\*(rq all of
-.Em win
-.It unctrl(ch) printable version of
-.Em ch
-.It waddch(win,ch) add char to
-.Em win
-.It waddstr(win,str) add string to
-.Em win
-.It wclear(win) clear
-.Em win
-.It wclrtobot(win) clear to bottom of
-.Em win
-.It wclrtoeol(win) clear to end of line on
-.Em win
-.It wdelch(win,c) delete char from
-.Em win
-.It wdeleteln(win) delete line from
-.Em win
-.It werase(win) erase
-.Em win
-.It wgetch(win) get a char through
-.Em win
-.It wgetstr(win,str) get a string through
-.Em win
-.It winch(win) get char at current (y,x) in
-.Em win
-.It winsch(win,c) insert char into
-.Em win
-.It winsertln(win) insert line into
-.Em win
-.It wmove(win,y,x) set current (y,x) co-ordinates on
-.Em win
-.It wprintw(win,fmt,arg1,arg2,...)\ printf on
-.Em win
-.It wrefresh(win) make screen look like
-.Em win
-.It wscanw(win,fmt,arg1,arg2,...)\ scanf through
-.Em win
-.It wstandend(win) end standout mode on
-.Em win
-.It wstandout(win) start standout mode on
-.Em win
-.El
-.Sh HISTORY
-The
-.Nm
-package appeared in
-.Bx 4.0 .
diff --git a/lib/libcurses/curses.c b/lib/libcurses/curses.c
deleted file mode 100644
index d78d284..0000000
--- a/lib/libcurses/curses.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)curses.c 8.3 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/* Private. */
-int __echoit = 1; /* If stty indicates ECHO. */
-int __pfast;
-int __rawmode = 0; /* If stty indicates RAW mode. */
-int __noqch = 0; /*
- * If terminal doesn't have
- * insert/delete line capabilities
- * or change scroll capabilities
- * for quick change on refresh.
- */
-int __usecs = 0; /*
- * If terminal able to change scroll
- * region (used only if insert/delete
- * line capabilities absent)
- */
-char AM, BS, CA, DA, DB, EO, HC, IN, MI, MS, NC, NS, OS, PC,
- UL, XB, XN, XT, XS, XX;
-char *AL, *BC, *BT, *CD, *CE, *CL, *CM, *CR, *CS, *DC, *DL,
- *DM, *DO, *ED, *EI, *K0, *K1, *K2, *K3, *K4, *K5, *K6,
- *K7, *K8, *K9, *HO, *IC, *IM, *IP, *KD, *KE, *KH, *KL,
- *KR, *KS, *KU, *LL, *MA, *ND, *NL, *RC, *SC, *SE, *SF,
- *SO, *SR, *TA, *TE, *TI, *UC, *UE, *UP, *US, *VB, *VS,
- *VE, *al, *dl, *sf, *sr,
- *AL_PARM, *DL_PARM, *UP_PARM, *DOWN_PARM, *LEFT_PARM,
- *RIGHT_PARM;
-/*
- * Public.
- *
- * XXX
- * UPPERCASE isn't used by libcurses, and is left for backward
- * compatibility only.
- */
-WINDOW *curscr; /* Current screen. */
-WINDOW *stdscr; /* Standard screen. */
-int COLS; /* Columns on the screen. */
-int LINES; /* Lines on the screen. */
-int My_term = 0; /* Use Def_term regardless. */
-char *Def_term = "unknown"; /* Default terminal type. */
-char GT; /* Gtty indicates tabs. */
-char NONL; /* Term can't hack LF doing a CR. */
-char UPPERCASE; /* Terminal is uppercase only. */
diff --git a/lib/libcurses/curses.h b/lib/libcurses/curses.h
deleted file mode 100644
index 15c9777..0000000
--- a/lib/libcurses/curses.h
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)curses.h 8.3 (Berkeley) 7/27/94
- * $Id$
- */
-
-#ifndef _CURSES_H_
-#define _CURSES_H_
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-
-#include <stdio.h>
-
-#ifndef _BSD_VA_LIST_
-#define _BSD_VA_LIST_ char *
-#endif
-
-/*
- * The following #defines and #includes are present for backward
- * compatibility only. They should not be used in future code.
- *
- * START BACKWARD COMPATIBILITY ONLY.
- */
-#ifndef _CURSES_PRIVATE
-
-/* This stuff needed for those pgms which include <sgtty.h> */
-/* Undef things manually to avoid redefinition */
-
-#undef USE_OLD_TTY
-#undef B0
-#undef B50
-#undef B75
-#undef B110
-#undef B134
-#undef B150
-#undef B200
-#undef B300
-#undef B600
-#undef B1200
-#undef B1800
-#undef B2400
-#undef B4800
-#undef B9600
-#undef EXTA
-#undef EXTB
-#undef B57600
-#undef B115200
-
-#include <termios.h>
-#include <sys/ioctl.h>
-#include <sys/ioctl_compat.h> /* For sgttyb and related */
-
-#define bool char
-#define reg register
-
-#ifndef TRUE
-#define TRUE (1)
-#endif
-#ifndef FALSE
-#define FALSE (0)
-#endif
-
-#define _puts(s) tputs(s, 0, __cputchar)
-
-/* Old-style terminal modes access. */
-#define baudrate() (cfgetospeed(&__baset))
-#define crmode() cbreak()
-#define erasechar() (__baset.c_cc[VERASE])
-#define killchar() (__baset.c_cc[VKILL])
-#define nocrmode() nocbreak()
-
-/* WINDOW structure members name compatibility */
-#define _curx curx
-#define _cury cury
-#define _begx begx
-#define _begy begy
-#define _maxx maxx
-#define _maxy maxy
-
-#define _tty __baset
-
-#endif /* _CURSES_PRIVATE */
-
-extern char GT; /* Gtty indicates tabs. */
-extern char NONL; /* Term can't hack LF doing a CR. */
-extern char UPPERCASE; /* Terminal is uppercase only. */
-
-extern int My_term; /* Use Def_term regardless. */
-extern char *Def_term; /* Default terminal type. */
-
-/* Termcap capabilities. */
-extern char AM, BS, CA, DA, EO, HC, IN, MI, MS, NC, NS, OS,
- PC, UL, XB, XN, XT, XS, XX;
-extern char *AL, *BC, *BT, *CD, *CE, *CL, *CM, *CR, *CS, *DC, *DL,
- *DM, *DO, *ED, *EI, *K0, *K1, *K2, *K3, *K4, *K5, *K6,
- *K7, *K8, *K9, *HO, *IC, *IM, *IP, *KD, *KE, *KH, *KL,
- *KR, *KS, *KU, *LL, *MA, *ND, *NL, *RC, *SC, *SE, *SF,
- *SO, *SR, *TA, *TE, *TI, *UC, *UE, *UP, *US, *VB, *VS,
- *VE, *al, *dl, *sf, *sr,
- *AL_PARM, *DL_PARM, *UP_PARM, *DOWN_PARM, *LEFT_PARM,
- *RIGHT_PARM;
-
-/* END BACKWARD COMPATIBILITY ONLY. */
-
-/* 8-bit ASCII characters. */
-#define unctrl(c) __unctrl[(c) & 0xff]
-#define unctrllen(ch) __unctrllen[(ch) & 0xff]
-
-extern char *__unctrl[256]; /* Control strings. */
-extern char __unctrllen[256]; /* Control strings length. */
-
-/*
- * A window an array of __LINE structures pointed to by the 'lines' pointer.
- * A line is an array of __LDATA structures pointed to by the 'line' pointer.
- *
- * IMPORTANT: the __LDATA structure must NOT induce any padding, so if new
- * fields are added -- padding fields with *constant values* should ensure
- * that the compiler will not generate any padding when storing an array of
- * __LDATA structures. This is to enable consistent use of memcmp, and memcpy
- * for comparing and copying arrays.
- */
-typedef struct {
- char ch; /* the actual character */
-
-#define __STANDOUT 0x01 /* Added characters are standout. */
- char attr; /* attributes of character */
-} __LDATA;
-
-#define __LDATASIZE (sizeof(__LDATA))
-
-typedef struct {
-#define __ISDIRTY 0x01 /* Line is dirty. */
-#define __ISPASTEOL 0x02 /* Cursor is past end of line */
-#define __FORCEPAINT 0x04 /* Force a repaint of the line */
- u_int flags;
- u_int hash; /* Hash value for the line. */
- size_t *firstchp, *lastchp; /* First and last chngd columns ptrs */
- size_t firstch, lastch; /* First and last changed columns. */
- __LDATA *line; /* Pointer to the line text. */
-} __LINE;
-
-typedef struct __window { /* Window structure. */
- struct __window *nextp, *orig; /* Subwindows list and parent. */
- size_t begy, begx; /* Window home. */
- size_t cury, curx; /* Current x, y coordinates. */
- size_t maxy, maxx; /* Maximum values for curx, cury. */
- short ch_off; /* x offset for firstch/lastch. */
- __LINE **lines; /* Array of pointers to the lines */
- __LINE *lspace; /* line space (for cleanup) */
- __LDATA *wspace; /* window space (for cleanup) */
-
-#define __ENDLINE 0x001 /* End of screen. */
-#define __FLUSH 0x002 /* Fflush(stdout) after refresh. */
-#define __FULLWIN 0x004 /* Window is a screen. */
-#define __IDLINE 0x008 /* Insert/delete sequences. */
-#define __SCROLLWIN 0x010 /* Last char will scroll window. */
-#define __SCROLLOK 0x020 /* Scrolling ok. */
-#define __CLEAROK 0x040 /* Clear on next refresh. */
-#define __WSTANDOUT 0x080 /* Standout window */
-#define __LEAVEOK 0x100 /* If curser left */
-#define __FULLLINE 0x200 /* Line width = terminal width. */
- u_int flags;
-} WINDOW;
-
-/* Curses external declarations. */
-extern WINDOW *curscr; /* Current screen. */
-extern WINDOW *stdscr; /* Standard screen. */
-
-typedef struct termios SGTTY;
-
-extern SGTTY __orig_termios; /* Terminal state before curses */
-extern SGTTY __baset; /* Our base terminal state */
-extern int __tcaction; /* If terminal hardware set. */
-extern int __tty_fileno; /* Terminal file descriptor */
-
-extern int COLS; /* Columns on the screen. */
-extern int LINES; /* Lines on the screen. */
-
-extern char *ttytype; /* Full name of current terminal. */
-
-#define ERR (0) /* Error return. */
-#define OK (1) /* Success return. */
-
-/* Standard screen pseudo functions. */
-#define addbytes(s, n) __waddbytes(stdscr, s, n, 0)
-#define addch(ch) waddch(stdscr, ch)
-#define addnstr(s, n) waddnstr(stdscr, s, n)
-#define addstr(s) __waddbytes(stdscr, s, strlen(s), 0)
-#define clear() wclear(stdscr)
-#define clrtobot() wclrtobot(stdscr)
-#define clrtoeol() wclrtoeol(stdscr)
-#define delch() wdelch(stdscr)
-#define deleteln() wdeleteln(stdscr)
-#define erase() werase(stdscr)
-#define getch() wgetch(stdscr)
-#define getstr(s) wgetstr(stdscr, s)
-#define inch() winch(stdscr)
-#define insch(ch) winsch(stdscr, ch)
-#define insertln() winsertln(stdscr)
-#define move(y, x) wmove(stdscr, y, x)
-#define refresh() wrefresh(stdscr)
-#define standend() wstandend(stdscr)
-#define standout() wstandout(stdscr)
-#define waddbytes(w, s, n) __waddbytes(w, s, n, 0)
-#define waddstr(w, s) __waddbytes(w, s, strlen(s), 0)
-
-/* Standard screen plus movement pseudo functions. */
-#define mvaddbytes(y, x, s, n) mvwaddbytes(stdscr, y, x, s, n)
-#define mvaddch(y, x, ch) mvwaddch(stdscr, y, x, ch)
-#define mvaddnstr(y, x, s, n) mvwaddnstr(stdscr, y, x, s, n)
-#define mvaddstr(y, x, s) mvwaddstr(stdscr, y, x, s)
-#define mvdelch(y, x) mvwdelch(stdscr, y, x)
-#define mvgetch(y, x) mvwgetch(stdscr, y, x)
-#define mvgetstr(y, x, s) mvwgetstr(stdscr, y, x, s)
-#define mvinch(y, x) mvwinch(stdscr, y, x)
-#define mvinsch(y, x, c) mvwinsch(stdscr, y, x, c)
-#define mvwaddbytes(w, y, x, s, n) \
- (wmove(w, y, x) == ERR ? ERR : __waddbytes(w, s, n, 0))
-#define mvwaddch(w, y, x, ch) \
- (wmove(w, y, x) == ERR ? ERR : waddch(w, ch))
-#define mvwaddnstr(w, y, x, s, n) \
- (wmove(w, y, x) == ERR ? ERR : waddnstr(w, s, n))
-#define mvwaddstr(w, y, x, s) \
- (wmove(w, y, x) == ERR ? ERR : __waddbytes(w, s, strlen(s), 0))
-#define mvwdelch(w, y, x) \
- (wmove(w, y, x) == ERR ? ERR : wdelch(w))
-#define mvwgetch(w, y, x) \
- (wmove(w, y, x) == ERR ? ERR : wgetch(w))
-#define mvwgetstr(w, y, x, s) \
- (wmove(w, y, x) == ERR ? ERR : wgetstr(w, s))
-#define mvwinch(w, y, x) \
- (wmove(w, y, x) == ERR ? ERR : winch(w))
-#define mvwinsch(w, y, x, c) \
- (wmove(w, y, x) == ERR ? ERR : winsch(w, c))
-
-/* Psuedo functions. */
-#define clearok(w, bf) \
- ((bf) ? ((w)->flags |= __CLEAROK) : ((w)->flags &= ~__CLEAROK))
-#define flushok(w, bf) \
- ((bf) ? ((w)->flags |= __FLUSH) : ((w)->flags &= ~__FLUSH))
-#define getyx(w, y, x) \
- (y) = (w)->cury, (x) = (w)->curx
-#define leaveok(w, bf) \
- ((bf) ? ((w)->flags |= __LEAVEOK) : ((w)->flags &= ~__LEAVEOK))
-#define scrollok(w, bf) \
- ((bf) ? ((w)->flags |= __SCROLLOK) : ((w)->flags &= ~__SCROLLOK))
-#define winch(w) \
- ((w)->lines[(w)->cury]->line[(w)->curx].ch & 0377)
-
-/* Public function prototypes. */
-int box __P((WINDOW *, int, int));
-int cbreak __P((void));
-int delwin __P((WINDOW *));
-int echo __P((void));
-int endwin __P((void));
-char *fullname __P((char *, char *));
-char *getcap __P((char *));
-int gettmode __P((void));
-void idlok __P((WINDOW *, int));
-WINDOW *initscr __P((void));
-char *longname __P((char *, char *));
-int mvcur __P((int, int, int, int));
-int mvprintw __P((int, int, const char *, ...));
-int mvscanw __P((int, int, const char *, ...));
-int mvwin __P((WINDOW *, int, int));
-int mvwprintw __P((WINDOW *, int, int, const char *, ...));
-int mvwscanw __P((WINDOW *, int, int, const char *, ...));
-WINDOW *newwin __P((int, int, int, int));
-int nl __P((void));
-int nocbreak __P((void));
-int noecho __P((void));
-int nonl __P((void));
-int noraw __P((void));
-int overlay __P((WINDOW *, WINDOW *));
-int overwrite __P((WINDOW *, WINDOW *));
-int printw __P((const char *, ...));
-int raw __P((void));
-int resetty __P((void));
-int savetty __P((void));
-int scanw __P((const char *, ...));
-int scroll __P((WINDOW *));
-int setterm __P((char *));
-int sscans __P((WINDOW *, const char *, ...));
-WINDOW *subwin __P((WINDOW *, int, int, int, int));
-int suspendwin __P((void));
-int touchline __P((WINDOW *, int, int, int));
-int touchoverlap __P((WINDOW *, WINDOW *));
-int touchwin __P((WINDOW *));
-int vwprintw __P((WINDOW *, const char *, _BSD_VA_LIST_));
-int vwscanw __P((WINDOW *, const char *, _BSD_VA_LIST_));
-int waddch __P((WINDOW *, int));
-int waddnstr __P((WINDOW *, const char *, int));
-int wclear __P((WINDOW *));
-int wclrtobot __P((WINDOW *));
-int wclrtoeol __P((WINDOW *));
-int wdelch __P((WINDOW *));
-int wdeleteln __P((WINDOW *));
-int werase __P((WINDOW *));
-int wgetch __P((WINDOW *));
-int wgetstr __P((WINDOW *, char *));
-int winsch __P((WINDOW *, int));
-int winsertln __P((WINDOW *));
-int wmove __P((WINDOW *, int, int));
-int wprintw __P((WINDOW *, const char *, ...));
-int wrefresh __P((WINDOW *));
-int wscanw __P((WINDOW *, const char *, ...));
-int wstandend __P((WINDOW *));
-int wstandout __P((WINDOW *));
-
-/* Private functions that are needed for user programs prototypes. */
-void __cputchar __P((int));
-int _putchar __P((int));
-int __waddbytes __P((WINDOW *, const char *, int, int));
-
-/* Private functions. */
-#ifdef _CURSES_PRIVATE
-void __CTRACE __P((const char *, ...));
-u_int __hash __P((char *, int));
-void __id_subwins __P((WINDOW *));
-int __mvcur __P((int, int, int, int, int));
-void __restore_stophandler __P((void));
-void __set_stophandler __P((void));
-void __set_subwin __P((WINDOW *, WINDOW *));
-void __set_scroll_region __P((int, int, int, int));
-void __startwin __P((void));
-void __stop_signal_handler __P((int));
-void __swflags __P((WINDOW *));
-int __touchline __P((WINDOW *, int, int, int, int));
-int __touchwin __P((WINDOW *));
-char *__tscroll __P((const char *, int, int));
-int __waddch __P((WINDOW *, __LDATA *));
-
-/* Private #defines. */
-#define min(a,b) (a < b ? a : b)
-#define max(a,b) (a > b ? a : b)
-
-/* Private externs. */
-extern char DB;
-extern int __echoit;
-extern int __endwin;
-extern int __pfast;
-extern int __rawmode;
-extern int __noqch;
-extern int __usecs;
-
-int tputs __P((const char *, int, void (*)(int)));
-
-#else
-
-int tputs __P((const char *, int, int (*)(int)));
-
-#endif
-
-/* Termcap functions. */
-int tgetent __P((char *, const char *));
-int tgetnum __P((const char *));
-int tgetflag __P((const char *));
-char *tgetstr __P((const char *, char **));
-char *tgoto __P((const char *, int, int));
-
-#endif /* !_CURSES_H_ */
diff --git a/lib/libcurses/delch.c b/lib/libcurses/delch.c
deleted file mode 100644
index b9cdc31..0000000
--- a/lib/libcurses/delch.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)delch.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <string.h>
-
-#include "curses.h"
-
-/*
- * wdelch --
- * Do an insert-char on the line, leaving (cury, curx) unchanged.
- */
-int
-wdelch(win)
- register WINDOW *win;
-{
- register __LDATA *end, *temp1, *temp2;
-
- end = &win->lines[win->cury]->line[win->maxx - 1];
- temp1 = &win->lines[win->cury]->line[win->curx];
- temp2 = temp1 + 1;
- while (temp1 < end) {
- (void)memcpy(temp1, temp2, sizeof(__LDATA));
- temp1++, temp2++;
- }
- temp1->ch = ' ';
- temp1->attr = 0;
- __touchline(win, win->cury, win->curx, win->maxx - 1, 0);
- return (OK);
-}
diff --git a/lib/libcurses/deleteln.c b/lib/libcurses/deleteln.c
deleted file mode 100644
index afe6b93..0000000
--- a/lib/libcurses/deleteln.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)deleteln.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <string.h>
-
-#include "curses.h"
-
-/*
- * wdeleteln --
- * Delete a line from the screen. It leaves (cury, curx) unchanged.
- */
-int
-wdeleteln(win)
- register WINDOW *win;
-{
- register int y, i;
- register __LINE *temp;
-
-#ifdef DEBUG
- __CTRACE("deleteln: (%0.2o)\n", win);
-#endif
- temp = win->lines[win->cury];
- for (y = win->cury; y < win->maxy - 1; y++) {
- win->lines[y]->flags &= ~__ISPASTEOL;
- win->lines[y + 1]->flags &= ~__ISPASTEOL;
- if (win->orig == NULL)
- win->lines[y] = win->lines[y + 1];
- else
- (void) memcpy(win->lines[y]->line,
- win->lines[y + 1]->line,
- win->maxx * __LDATASIZE);
- __touchline(win, y, 0, win->maxx - 1, 0);
- }
-
- if (win->orig == NULL)
- win->lines[y] = temp;
- else
- temp = win->lines[y];
-
- for(i = 0; i < win->maxx; i++) {
- temp->line[i].ch = ' ';
- temp->line[i].attr = 0;
- }
- __touchline(win, y, 0, win->maxx - 1, 0);
- if (win->orig == NULL)
- __id_subwins(win);
- return (OK);
-}
diff --git a/lib/libcurses/delwin.c b/lib/libcurses/delwin.c
deleted file mode 100644
index 7310db8..0000000
--- a/lib/libcurses/delwin.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)delwin.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <stdlib.h>
-
-#include "curses.h"
-
-/*
- * delwin --
- * Delete a window and release it back to the system.
- */
-int
-delwin(win)
- register WINDOW *win;
-{
-
- register WINDOW *wp, *np;
-
- if (win->orig == NULL) {
- /*
- * If we are the original window, delete the space for all
- * the subwindows, the line space and the window space.
- */
- free(win->lspace);
- free(win->wspace);
- free(win->lines);
- wp = win->nextp;
- while (wp != win) {
- np = wp->nextp;
- delwin(wp);
- wp = np;
- }
- } else {
- /*
- * If we are a subwindow, take ourselves out of the list.
- * NOTE: if we are a subwindow, the minimum list is orig
- * followed by this subwindow, so there are always at least
- * two windows in the list.
- */
- for (wp = win->nextp; wp->nextp != win; wp = wp->nextp)
- continue;
- wp->nextp = win->nextp;
- }
- free(win);
- return (OK);
-}
diff --git a/lib/libcurses/erase.c b/lib/libcurses/erase.c
deleted file mode 100644
index c2e3e48..0000000
--- a/lib/libcurses/erase.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)erase.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * werase --
- * Erases everything on the window.
- */
-int
-werase(win)
- register WINDOW *win;
-{
-
- register int minx, y;
- register __LDATA *sp, *end, *start, *maxx;
-
-#ifdef DEBUG
- __CTRACE("werase: (%0.2o)\n", win);
-#endif
- for (y = 0; y < win->maxy; y++) {
- minx = -1;
- start = win->lines[y]->line;
- end = &start[win->maxx];
- for (sp = start; sp < end; sp++)
- if (sp->ch != ' ' || sp->attr != 0) {
- maxx = sp;
- if (minx == -1)
- minx = sp - start;
- sp->ch = ' ';
- sp->attr = 0;
- }
- if (minx != -1)
- __touchline(win, y, minx, maxx - win->lines[y]->line,
- 0);
- }
- return (OK);
-}
diff --git a/lib/libcurses/fullname.c b/lib/libcurses/fullname.c
deleted file mode 100644
index 3d05e5d..0000000
--- a/lib/libcurses/fullname.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1981, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)fullname.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/*
- * fullname --
- * This routine fills in "def" with the full name of the terminal.
- * This is assumed to be the last name in the list of aliases.
- */
-char *
-fullname(bp, def)
- register char *bp, *def;
-{
- register char *cp;
-
- *def = '\0'; /* In case no name. */
-
- while (*bp && *bp != ':') {
- cp = def; /* Start of answer. */
- while (*bp && *bp != ':' && *bp != '|')
- *cp++ = *bp++; /* Copy name over. */
- *cp = '\0'; /* Zero end of name. */
- if (*bp == '|')
- bp++; /* Skip over '|' if that is case. */
- }
- return (def);
-}
diff --git a/lib/libcurses/getch.c b/lib/libcurses/getch.c
deleted file mode 100644
index 31dd2b6..0000000
--- a/lib/libcurses/getch.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)getch.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * wgetch --
- * Read in a character from the window.
- */
-int
-wgetch(win)
- register WINDOW *win;
-{
- register int inp, weset;
-
- if (!(win->flags & __SCROLLOK) && (win->flags & __FULLWIN)
- && win->curx == win->maxx - 1 && win->cury == win->maxy - 1)
- return (ERR);
-#ifdef DEBUG
- __CTRACE("wgetch: __echoit = %d, __rawmode = %d\n",
- __echoit, __rawmode);
-#endif
- if (__echoit && !__rawmode) {
- cbreak();
- weset = 1;
- } else
- weset = 0;
-
- inp = getchar();
- if (inp != EOF) {
-#ifdef DEBUG
- __CTRACE("wgetch got '%s'\n", unctrl(inp));
-#endif
- if (__echoit) {
- mvwaddch(curscr,
- win->cury + win->begy, win->curx + win->begx, inp);
- waddch(win, inp);
- }
- }
- if (weset)
- nocbreak();
- return (inp);
-}
diff --git a/lib/libcurses/getstr.c b/lib/libcurses/getstr.c
deleted file mode 100644
index 2536999..0000000
--- a/lib/libcurses/getstr.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)getstr.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * wgetstr --
- * Get a string starting at (cury, curx).
- */
-int
-wgetstr(win, str)
- register WINDOW *win;
- register char *str;
-{
- int c;
-
- while ((c = wgetch(win)) != ERR && c != EOF && c != '\n')
- *str++ = c;
- *str = '\0';
- if (c == ERR)
- return (ERR);
- return (OK);
-}
diff --git a/lib/libcurses/id_subwins.c b/lib/libcurses/id_subwins.c
deleted file mode 100644
index 0ceef2d..0000000
--- a/lib/libcurses/id_subwins.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)id_subwins.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * __id_subwins --
- * Re-sync the pointers to lines for all the subwindows.
- */
-void
-__id_subwins(orig)
- register WINDOW *orig;
-{
- register WINDOW *win;
- register int oy, realy, y;
-
- realy = orig->begy + orig->cury;
- for (win = orig->nextp; win != orig; win = win->nextp) {
- /*
- * If the window ends before our current position, don't need
- * to do anything.
- */
- if (win->begy + win->maxy <= realy)
- continue;
-
- oy = orig->cury;
- for (y = realy - win->begy; y < win->maxy; y++, oy++)
- win->lines[y]->line =
- &orig->lines[oy]->line[win->ch_off];
- }
-}
diff --git a/lib/libcurses/idlok.c b/lib/libcurses/idlok.c
deleted file mode 100644
index 4d3bb59..0000000
--- a/lib/libcurses/idlok.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)idlok.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * idlok --
- * Turn on and off using insert/deleteln sequences for the
- * given window.
- */
-void
-idlok(win, bf)
- WINDOW *win;
- int bf;
-{
- if (bf)
- win->flags |= __IDLINE;
- else
- win->flags &= ~__IDLINE;
-}
diff --git a/lib/libcurses/initscr.c b/lib/libcurses/initscr.c
deleted file mode 100644
index ac39669..0000000
--- a/lib/libcurses/initscr.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)initscr.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <signal.h>
-#include <stdlib.h>
-
-#include "curses.h"
-
-/*
- * initscr --
- * Initialize the current and standard screen.
- */
-WINDOW *
-initscr()
-{
- register char *sp;
-
-#ifdef DEBUG
- __CTRACE("initscr\n");
-#endif
- __echoit = 1;
- __pfast = __rawmode = __noqch = 0;
-
- if (gettmode() == ERR)
- return (NULL);
-
- /*
- * If My_term is set, or can't find a terminal in the environment,
- * use Def_term.
- */
- if (My_term || (sp = getenv("TERM")) == NULL)
- sp = Def_term;
- if (setterm(sp) == ERR)
- return (NULL);
-
- /* Need either homing or cursor motion for refreshes */
- if (!HO && !CM)
- return (NULL);
-
- if (curscr != NULL)
- delwin(curscr);
- if ((curscr = newwin(LINES, COLS, 0, 0)) == ERR)
- return (NULL);
- clearok(curscr, 1);
-
- if (stdscr != NULL)
- delwin(stdscr);
- if ((stdscr = newwin(LINES, COLS, 0, 0)) == ERR) {
- delwin(curscr);
- return (NULL);
- }
-
- __set_stophandler();
-
-#ifdef DEBUG
- __CTRACE("initscr: LINES = %d, COLS = %d\n", LINES, COLS);
-#endif
- __startwin();
-
- return (stdscr);
-}
diff --git a/lib/libcurses/insch.c b/lib/libcurses/insch.c
deleted file mode 100644
index aa48bcb..0000000
--- a/lib/libcurses/insch.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)insch.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <string.h>
-
-#include "curses.h"
-
-/*
- * winsch --
- * Do an insert-char on the line, leaving (cury, curx) unchanged.
- */
-int
-winsch(win, ch)
- register WINDOW *win;
- int ch;
-{
-
- register __LDATA *end, *temp1, *temp2;
-
- end = &win->lines[win->cury]->line[win->curx];
- temp1 = &win->lines[win->cury]->line[win->maxx - 1];
- temp2 = temp1 - 1;
- while (temp1 > end) {
- (void)memcpy(temp1, temp2, sizeof(__LDATA));
- temp1--, temp2--;
- }
- temp1->ch = ch;
- temp1->attr &= ~__STANDOUT;
- __touchline(win, win->cury, win->curx, win->maxx - 1, 0);
- if (win->cury == LINES - 1 &&
- (win->lines[LINES - 1]->line[COLS - 1].ch != ' ' ||
- win->lines[LINES -1]->line[COLS - 1].attr != 0))
- if (win->flags & __SCROLLOK) {
- wrefresh(win);
- scroll(win);
- win->cury--;
- } else
- return (ERR);
- return (OK);
-}
diff --git a/lib/libcurses/insertln.c b/lib/libcurses/insertln.c
deleted file mode 100644
index ce713ca..0000000
--- a/lib/libcurses/insertln.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)insertln.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <string.h>
-
-#include "curses.h"
-
-/*
- * winsertln --
- * Do an insert-line on the window, leaving (cury, curx) unchanged.
- */
-int
-winsertln(win)
- register WINDOW *win;
-{
-
- register int y, i;
- register __LINE *temp;
-
-#ifdef DEBUG
- __CTRACE("insertln: (%0.2o)\n", win);
-#endif
- if (win->orig == NULL)
- temp = win->lines[win->maxy - 1];
- for (y = win->maxy - 1; y > (int) win->cury; --y) {
- win->lines[y]->flags &= ~__ISPASTEOL;
- win->lines[y - 1]->flags &= ~__ISPASTEOL;
- if (win->orig == NULL)
- win->lines[y] = win->lines[y - 1];
- else
- (void)memcpy(win->lines[y]->line,
- win->lines[y - 1]->line,
- win->maxx * __LDATASIZE);
- __touchline(win, y, 0, win->maxx - 1, 0);
- }
- if (win->orig == NULL)
- win->lines[y] = temp;
- else
- temp = win->lines[y];
- for(i = 0; i < win->maxx; i++) {
- temp->line[i].ch = ' ';
- temp->line[i].attr = 0;
- }
- __touchline(win, y, 0, win->maxx - 1, 0);
- if (win->orig == NULL)
- __id_subwins(win);
- return (OK);
-}
diff --git a/lib/libcurses/longname.c b/lib/libcurses/longname.c
deleted file mode 100644
index fd54630..0000000
--- a/lib/libcurses/longname.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1981, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)longname.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/*
- * longname --
- * Fill in "def" with the long name of the terminal.
- */
-char *
-longname(bp, def)
- register char *bp, *def;
-{
- register char *cp;
-
- while (*bp && *bp != ':' && *bp != '|')
- bp++;
- if (*bp == '|') {
- for (cp = def, ++bp; *bp && *bp != ':' && *bp != '|';)
- *cp++ = *bp++;
- *cp = '\0';
- }
- return (def);
-}
diff --git a/lib/libcurses/move.c b/lib/libcurses/move.c
deleted file mode 100644
index 1e22fb0..0000000
--- a/lib/libcurses/move.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)move.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * wmove --
- * Moves the cursor to the given point.
- */
-int
-wmove(win, y, x)
- register WINDOW *win;
- register int y, x;
-{
-
-#ifdef DEBUG
- __CTRACE("wmove: (%d, %d)\n", y, x);
-#endif
- if (x < 0 || y < 0)
- return (ERR);
- if (x >= win->maxx || y >= win->maxy)
- return (ERR);
- win->curx = x;
- win->lines[win->cury]->flags &= ~__ISPASTEOL;
- win->cury = y;
- win->lines[y]->flags &= ~__ISPASTEOL;
- return (OK);
-}
diff --git a/lib/libcurses/mvwin.c b/lib/libcurses/mvwin.c
deleted file mode 100644
index 1471b27..0000000
--- a/lib/libcurses/mvwin.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)mvwin.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * mvwin --
- * Relocate the starting position of a window.
- */
-int
-mvwin(win, by, bx)
- register WINDOW *win;
- register int by, bx;
-{
- register WINDOW *orig;
- register int dy, dx;
-
- if (by + win->maxy > LINES || bx + win->maxx > COLS)
- return (ERR);
- dy = by - win->begy;
- dx = bx - win->begx;
- orig = win->orig;
- if (orig == NULL) {
- orig = win;
- do {
- win->begy += dy;
- win->begx += dx;
- __swflags(win);
- win = win->nextp;
- } while (win != orig);
- } else {
- if (by < orig->begy || win->maxy + dy > orig->maxy)
- return (ERR);
- if (bx < orig->begx || win->maxx + dx > orig->maxx)
- return (ERR);
- win->begy = by;
- win->begx = bx;
- __swflags(win);
- __set_subwin(orig, win);
- }
- __touchwin(win);
- return (OK);
-}
diff --git a/lib/libcurses/newwin.c b/lib/libcurses/newwin.c
deleted file mode 100644
index 3273817..0000000
--- a/lib/libcurses/newwin.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)newwin.c 8.3 (Berkeley) 7/27/94";
-#endif /* not lint */
-
-#include <stdlib.h>
-
-#include "curses.h"
-
-#undef nl /* Don't need it here, and it interferes. */
-
-static WINDOW *__makenew __P((int, int, int, int, int));
-
-void __set_subwin __P((WINDOW *, WINDOW *));
-
-/*
- * newwin --
- * Allocate space for and set up defaults for a new window.
- */
-WINDOW *
-newwin(nl, nc, by, bx)
- register int nl, nc, by, bx;
-{
- register WINDOW *win;
- register __LINE *lp;
- register int i, j;
- register __LDATA *sp;
-
- if (nl == 0)
- nl = LINES - by;
- if (nc == 0)
- nc = COLS - bx;
-
- if ((win = __makenew(nl, nc, by, bx, 0)) == NULL)
- return (NULL);
-
- win->nextp = win;
- win->ch_off = 0;
- win->orig = NULL;
-
-#ifdef DEBUG
- __CTRACE("newwin: win->ch_off = %d\n", win->ch_off);
-#endif
-
- for (i = 0; i < nl; i++) {
- lp = win->lines[i];
- lp->flags = 0;
- for (sp = lp->line, j = 0; j < nc; j++, sp++) {
- sp->ch = ' ';
- sp->attr = 0;
- }
- lp->hash = __hash((char *) lp->line, nc * __LDATASIZE);
- }
- return (win);
-}
-
-WINDOW *
-subwin(orig, nl, nc, by, bx)
- register WINDOW *orig;
- register int by, bx, nl, nc;
-{
- int i;
- __LINE *lp;
- register WINDOW *win;
-
- /* Make sure window fits inside the original one. */
-#ifdef DEBUG
- __CTRACE("subwin: (%0.2o, %d, %d, %d, %d)\n", orig, nl, nc, by, bx);
-#endif
- if (by < orig->begy || bx < orig->begx
- || by + nl > orig->maxy + orig->begy
- || bx + nc > orig->maxx + orig->begx)
- return (NULL);
- if (nl == 0)
- nl = orig->maxy + orig->begy - by;
- if (nc == 0)
- nc = orig->maxx + orig->begx - bx;
- if ((win = __makenew(nl, nc, by, bx, 1)) == NULL)
- return (NULL);
- win->nextp = orig->nextp;
- orig->nextp = win;
- win->orig = orig;
-
- /* Initialize flags here so that refresh can also use __set_subwin. */
- for (lp = win->lspace, i = 0; i < win->maxy; i++, lp++)
- lp->flags = 0;
- __set_subwin(orig, win);
- return (win);
-}
-
-/*
- * This code is shared with mvwin().
- */
-void
-__set_subwin(orig, win)
- register WINDOW *orig, *win;
-{
- int i;
- __LINE *lp, *olp;
-
- win->ch_off = win->begx - orig->begx;
- /* Point line pointers to line space. */
- for (lp = win->lspace, i = 0; i < win->maxy; i++, lp++) {
- win->lines[i] = lp;
- olp = orig->lines[i + win->begy - orig->begy];
- lp->line = &olp->line[win->ch_off];
- lp->firstchp = &olp->firstch;
- lp->lastchp = &olp->lastch;
- lp->hash = __hash((char *) lp->line, win->maxx * __LDATASIZE);
- }
-
-#ifdef DEBUG
- __CTRACE("__set_subwin: win->ch_off = %d\n", win->ch_off);
-#endif
-}
-
-/*
- * __makenew --
- * Set up a window buffer and returns a pointer to it.
- */
-static WINDOW *
-__makenew(nl, nc, by, bx, sub)
- register int by, bx, nl, nc;
- int sub;
-{
- register WINDOW *win;
- register __LINE *lp;
- int i;
-
-
-#ifdef DEBUG
- __CTRACE("makenew: (%d, %d, %d, %d)\n", nl, nc, by, bx);
-#endif
- if ((win = malloc(sizeof(*win))) == NULL)
- return (NULL);
-#ifdef DEBUG
- __CTRACE("makenew: nl = %d\n", nl);
-#endif
-
- /*
- * Set up line pointer array and line space.
- */
- if ((win->lines = malloc (nl * sizeof(__LINE *))) == NULL) {
- free(win);
- return NULL;
- }
- if ((win->lspace = malloc (nl * sizeof(__LINE))) == NULL) {
- free (win);
- free (win->lines);
- return NULL;
- }
-
- /* Don't allocate window and line space if it's a subwindow */
- if (!sub) {
- /*
- * Allocate window space in one chunk.
- */
- if ((win->wspace =
- malloc(nc * nl * sizeof(__LDATA))) == NULL) {
- free(win->lines);
- free(win->lspace);
- free(win);
- return NULL;
- }
-
- /*
- * Point line pointers to line space, and lines themselves into
- * window space.
- */
- for (lp = win->lspace, i = 0; i < nl; i++, lp++) {
- win->lines[i] = lp;
- lp->line = &win->wspace[i * nc];
- lp->firstchp = &lp->firstch;
- lp->lastchp = &lp->lastch;
- lp->firstch = 0;
- lp->lastch = 0;
- }
- }
-#ifdef DEBUG
- __CTRACE("makenew: nc = %d\n", nc);
-#endif
- win->cury = win->curx = 0;
- win->maxy = nl;
- win->maxx = nc;
-
- win->begy = by;
- win->begx = bx;
- win->flags = 0;
- __swflags(win);
-#ifdef DEBUG
- __CTRACE("makenew: win->flags = %0.2o\n", win->flags);
- __CTRACE("makenew: win->maxy = %d\n", win->maxy);
- __CTRACE("makenew: win->maxx = %d\n", win->maxx);
- __CTRACE("makenew: win->begy = %d\n", win->begy);
- __CTRACE("makenew: win->begx = %d\n", win->begx);
-#endif
- return (win);
-}
-
-void
-__swflags(win)
- register WINDOW *win;
-{
- win->flags &=
- ~(__ENDLINE | __FULLLINE | __FULLWIN | __SCROLLWIN | __LEAVEOK);
- if (win->begx + win->maxx == COLS) {
- win->flags |= __ENDLINE;
- if (win->begx == 0) {
- if (!__noqch)
- win->flags |= __FULLLINE;
- if (win->maxy == LINES && win->begy == 0)
- win->flags |= __FULLWIN;
- }
- if (win->begy + win->maxy == LINES)
- win->flags |= __SCROLLWIN;
- }
-}
diff --git a/lib/libcurses/overlay.c b/lib/libcurses/overlay.c
deleted file mode 100644
index 22c3433..0000000
--- a/lib/libcurses/overlay.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)overlay.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <ctype.h>
-
-#include "curses.h"
-
-/*
- * overlay --
- * Writes win1 on win2 non-destructively.
- */
-int
-overlay(win1, win2)
- register WINDOW *win1, *win2;
-{
-
- register int x, y, y1, y2, endy, endx, starty, startx;
- register __LDATA *sp, *end;
-
-#ifdef DEBUG
- __CTRACE("overlay: (%0.2o, %0.2o);\n", win1, win2);
-#endif
- starty = max(win1->begy, win2->begy);
- startx = max(win1->begx, win2->begx);
- endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
- endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
-#ifdef DEBUG
- __CTRACE("overlay: from (%d,%d) to (%d,%d)\n",
- starty, startx, endy, endx);
-#endif
- if (starty >= endy || startx >= endx)
- return (OK);
- y1 = starty - win1->begy;
- y2 = starty - win2->begy;
- for (y = starty; y < endy; y++, y1++, y2++) {
- end = &win1->lines[y1]->line[endx - win1->begx];
- x = startx - win2->begx;
- for (sp = &win1->lines[y1]->line[startx - win1->begx];
- sp < end; sp++) {
- if (!isspace(sp->ch)) {
- wmove(win2, y2, x);
- __waddch(win2, sp);
- }
- x++;
- }
- }
- return (OK);
-}
diff --git a/lib/libcurses/overwrite.c b/lib/libcurses/overwrite.c
deleted file mode 100644
index 162c731..0000000
--- a/lib/libcurses/overwrite.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)overwrite.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <ctype.h>
-#include <string.h>
-
-#include "curses.h"
-
-/*
- * overwrite --
- * Writes win1 on win2 destructively.
- */
-int
-overwrite(win1, win2)
- register WINDOW *win1, *win2;
-{
- register int x, y, endy, endx, starty, startx;
-
-#ifdef DEBUG
- __CTRACE("overwrite: (%0.2o, %0.2o);\n", win1, win2);
-#endif
- starty = max(win1->begy, win2->begy);
- startx = max(win1->begx, win2->begx);
- endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
- endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
- if (starty >= endy || startx >= endx)
- return (OK);
-#ifdef DEBUG
- __CTRACE("overwrite: from (%d, %d) to (%d, %d)\n",
- starty, startx, endy, endx);
-#endif
- x = endx - startx;
- for (y = starty; y < endy; y++) {
- (void)memcpy(
- &win2->lines[y - win2->begy]->line[startx - win2->begx],
- &win1->lines[y - win1->begy]->line[startx - win1->begx],
- x * __LDATASIZE);
- __touchline(win2, y, startx - win2->begx, endx - win2->begx,
- 0);
- }
- return (OK);
-}
diff --git a/lib/libcurses/printw.c b/lib/libcurses/printw.c
deleted file mode 100644
index ae6ea49..0000000
--- a/lib/libcurses/printw.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)printw.c 8.3 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#include "curses.h"
-
-/*
- * printw and friends.
- *
- * These routines make nonportable assumptions about varargs if __STDC__
- * is not in effect.
- */
-
-static int __winwrite __P((void *, const char *, int));
-
-/*
- * printw --
- * Printf on the standard screen.
- */
-int
-#ifdef __STDC__
-printw(const char *fmt, ...)
-#else
-printw(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int ret;
-
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vwprintw(stdscr, fmt, ap);
- va_end(ap);
- return (ret);
-}
-
-/*
- * wprintw --
- * Printf on the given window.
- */
-int
-#ifdef __STDC__
-wprintw(WINDOW * win, const char *fmt, ...)
-#else
-wprintw(win, fmt, va_alist)
- WINDOW *win;
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int ret;
-
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vwprintw(win, fmt, ap);
- va_end(ap);
- return (ret);
-}
-
-/*
- * mvprintw, mvwprintw --
- * Implement the mvprintw commands. Due to the variable number of
- * arguments, they cannot be macros. Sigh....
- */
-int
-#ifdef __STDC__
-mvprintw(register int y, register int x, const char *fmt, ...)
-#else
-mvprintw(y, x, fmt, va_alist)
- register int y, x;
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int ret;
-
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- if (move(y, x) != OK)
- return (ERR);
- ret = vwprintw(stdscr, fmt, ap);
- va_end(ap);
- return (ret);
-}
-
-int
-#ifdef __STDC__
-mvwprintw(register WINDOW * win, register int y, register int x,
- const char *fmt, ...)
-#else
-mvwprintw(win, y, x, fmt, va_alist)
- register WINDOW *win;
- register int y, x;
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int ret;
-
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- if (wmove(win, y, x) != OK)
- return (ERR);
-
- ret = vwprintw(win, fmt, ap);
- va_end(ap);
- return (ret);
-}
-
-/*
- * Internal write-buffer-to-window function.
- */
-static int
-__winwrite(cookie, buf, n)
- void *cookie;
- register const char *buf;
- int n;
-{
- register WINDOW *win;
- register int c;
-
- for (c = n, win = cookie; --c >= 0;)
- if (waddch(win, *buf++) == ERR)
- return (-1);
- return (n);
-}
-
-/*
- * vwprintw --
- * This routine actually executes the printf and adds it to the window.
- */
-int
-vwprintw(win, fmt, ap)
- WINDOW *win;
- const char *fmt;
- va_list ap;
-{
- FILE *f;
-
- if ((f = funopen(win, NULL, __winwrite, NULL, NULL)) == NULL)
- return (ERR);
- (void)vfprintf(f, fmt, ap);
- return (fclose(f) ? ERR : OK);
-}
diff --git a/lib/libcurses/putchar.c b/lib/libcurses/putchar.c
deleted file mode 100644
index 2ed5bb4..0000000
--- a/lib/libcurses/putchar.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)putchar.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-void
-__cputchar(ch)
- int ch;
-{
-
-#ifdef DEBUG
- __CTRACE("__cputchar: %s\n", unctrl(ch));
-#endif
- (void)putchar(ch);
-}
diff --git a/lib/libcurses/refresh.c b/lib/libcurses/refresh.c
deleted file mode 100644
index 1719454..0000000
--- a/lib/libcurses/refresh.c
+++ /dev/null
@@ -1,850 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)refresh.c 8.4 (Berkeley) 8/4/94";
-#endif /* not lint */
-
-#include <string.h>
-
-#include "curses.h"
-
-static int curwin;
-static short ly, lx;
-
-static void domvcur __P((int, int, int, int));
-static int makech __P((WINDOW *, int));
-static void quickch __P((WINDOW *));
-static void scrolln __P((int, int, int, int, int));
-
-/*
- * wrefresh --
- * Make the current screen look like "win" over the area coverd by
- * win.
- */
-int
-wrefresh(win)
- register WINDOW *win;
-{
- register __LINE *wlp;
- register int retval;
- register short wy;
- int dnum;
-
- /* Initialize loop parameters. */
- ly = curscr->cury;
- lx = curscr->curx;
- wy = 0;
- curwin = (win == curscr);
-
- if (!curwin)
- for (wy = 0; wy < win->maxy; wy++) {
- wlp = win->lines[wy];
- if (wlp->flags & __ISDIRTY)
- wlp->hash =
- __hash((char *) wlp->line, win->maxx * __LDATASIZE);
- }
-
- if (win->flags & __CLEAROK || curscr->flags & __CLEAROK || curwin) {
- if ((win->flags & __FULLWIN) || curscr->flags & __CLEAROK) {
- if (curscr->flags & __WSTANDOUT) {
- tputs(SE, 0, __cputchar);
- curscr->flags &= ~__WSTANDOUT;
- }
- tputs(CL, win->maxy, __cputchar);
- ly = 0;
- lx = 0;
- if (!curwin) {
- curscr->flags &= ~__CLEAROK;
- curscr->cury = 0;
- curscr->curx = 0;
- werase(curscr);
- }
- __touchwin(win);
- }
- win->flags &= ~__CLEAROK;
- }
- if (!CA) {
- if (win->curx != 0)
- putchar('\n');
- if (!curwin)
- werase(curscr);
- }
-#ifdef DEBUG
- __CTRACE("wrefresh: (%0.2o): curwin = %d\n", win, curwin);
- __CTRACE("wrefresh: \tfirstch\tlastch\n");
-#endif
-
-#ifndef NOQCH
- if ((win->flags & __FULLLINE) && !curwin) {
- /*
- * Invoke quickch() only if more than a quarter of the lines
- * in the window are dirty.
- */
- for (wy = 0, dnum = 0; wy < win->maxy; wy++)
- if (win->lines[wy]->flags & (__ISDIRTY | __FORCEPAINT))
- dnum++;
- /* __noqch already == 0 when __FULLLINE */
- if (dnum > (int) win->maxy / 4)
- quickch(win);
- }
-#endif
-
-#ifdef DEBUG
-{ int i, j;
- __CTRACE("#####################################\n");
- for (i = 0; i < curscr->maxy; i++) {
- __CTRACE("C: %d:", i);
- __CTRACE(" 0x%x \n", curscr->lines[i]->hash);
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%c",
- curscr->lines[i]->line[j].ch);
- __CTRACE("\n");
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%x",
- curscr->lines[i]->line[j].attr);
- __CTRACE("\n");
- if (i < win->begy || i > win->begy + win->maxy - 1)
- continue;
- __CTRACE("W: %d:", i - win->begy);
- __CTRACE(" 0x%x \n", win->lines[i - win->begy]->hash);
- __CTRACE(" 0x%x ", win->lines[i - win->begy]->flags);
- for (j = 0; j < win->maxx; j++)
- __CTRACE("%c",
- win->lines[i - win->begy]->line[j].ch);
- __CTRACE("\n");
- for (j = 0; j < win->maxx; j++)
- __CTRACE("%x",
- win->lines[i - win->begy]->line[j].attr);
- __CTRACE("\n");
- }
-}
-#endif /* DEBUG */
-
- for (wy = 0; wy < win->maxy; wy++) {
-#ifdef DEBUG
- __CTRACE("%d\t%d\t%d\n",
- wy, *win->lines[wy]->firstchp, *win->lines[wy]->lastchp);
-#endif
- if (!curwin)
- curscr->lines[win->begy + wy]->hash = win->lines[wy]->hash;
- if (win->lines[wy]->flags & (__ISDIRTY | __FORCEPAINT)) {
- if (makech(win, wy) == ERR)
- return (ERR);
- else {
- if (*win->lines[wy]->firstchp >= win->ch_off)
- *win->lines[wy]->firstchp = win->maxx +
- win->ch_off;
- if (*win->lines[wy]->lastchp < win->maxx +
- win->ch_off)
- *win->lines[wy]->lastchp = win->ch_off;
- if (*win->lines[wy]->lastchp <
- *win->lines[wy]->firstchp) {
-#ifdef DEBUG
- __CTRACE("wrefresh: line %d notdirty \n", wy);
-#endif
- win->lines[wy]->flags &= ~__ISDIRTY;
- }
- }
-
- }
-#ifdef DEBUG
- __CTRACE("\t%d\t%d\n", *win->lines[wy]->firstchp,
- *win->lines[wy]->lastchp);
-#endif
- }
-
-#ifdef DEBUG
- __CTRACE("refresh: ly=%d, lx=%d\n", ly, lx);
-#endif
-
- if (win == curscr)
- domvcur(ly, lx, win->cury, win->curx);
- else {
- if (win->flags & __LEAVEOK) {
- curscr->cury = ly;
- curscr->curx = lx;
- ly -= win->begy;
- lx -= win->begx;
- if (ly >= 0 && ly < win->maxy && lx >= 0 &&
- lx < win->maxx) {
- win->cury = ly;
- win->curx = lx;
- } else
- win->cury = win->curx = 0;
- } else {
- domvcur(ly, lx, win->cury + win->begy,
- win->curx + win->begx);
- curscr->cury = win->cury + win->begy;
- curscr->curx = win->curx + win->begx;
- }
- }
- retval = OK;
-
- (void)fflush(stdout);
- return (retval);
-}
-
-/*
- * makech --
- * Make a change on the screen.
- */
-static int
-makech(win, wy)
- register WINDOW *win;
- int wy;
-{
- static __LDATA blank = {' ', 0};
- register int nlsp, clsp; /* Last space in lines. */
- register int wx, lch, y;
- register __LDATA *nsp, *csp, *cp, *cep;
- u_int force;
- char *ce;
-
- /* Is the cursor still on the end of the last line? */
- if (wy > 0 && win->lines[wy - 1]->flags & __ISPASTEOL) {
- domvcur(ly, lx, ly + 1, 0);
- ly++;
- lx = 0;
- }
- wx = *win->lines[wy]->firstchp - win->ch_off;
- if (wx < 0)
- wx = 0;
- else if (wx >= win->maxx)
- return (OK);
- lch = *win->lines[wy]->lastchp - win->ch_off;
- if (lch < 0)
- return (OK);
- else if (lch >= (int) win->maxx)
- lch = win->maxx - 1;
- y = wy + win->begy;
-
- if (curwin)
- csp = &blank;
- else
- csp = &curscr->lines[wy + win->begy]->line[wx + win->begx];
-
- nsp = &win->lines[wy]->line[wx];
- force = win->lines[wy]->flags & __FORCEPAINT;
- win->lines[wy]->flags &= ~__FORCEPAINT;
- if (CE && !curwin) {
- for (cp = &win->lines[wy]->line[win->maxx - 1];
- cp->ch == ' ' && cp->attr == 0; cp--)
- if (cp <= win->lines[wy]->line)
- break;
- nlsp = cp - win->lines[wy]->line;
- }
- if (!curwin)
- ce = CE;
- else
- ce = NULL;
-
- if (force) {
- if (CM)
- tputs(tgoto(CM, lx, ly), 1, __cputchar);
- else {
- tputs(HO, 1, __cputchar);
- __mvcur(0, 0, ly, lx, 1);
- }
- }
- while (wx <= lch) {
- if (!force && memcmp(nsp, csp, sizeof(__LDATA)) == 0) {
- if (wx <= lch) {
- while (wx <= lch &&
- memcmp(nsp, csp, sizeof(__LDATA)) == 0) {
- nsp++;
- if (!curwin)
- csp++;
- ++wx;
- }
- continue;
- }
- break;
- }
- domvcur(ly, lx, y, wx + win->begx);
-
-#ifdef DEBUG
- __CTRACE("makech: 1: wx = %d, ly= %d, lx = %d, newy = %d, newx = %d, force =%d\n",
- wx, ly, lx, y, wx + win->begx, force);
-#endif
- ly = y;
- lx = wx + win->begx;
- while ((force || memcmp(nsp, csp, sizeof(__LDATA)) != 0)
- && wx <= lch) {
-
- if (ce != NULL && win->maxx + win->begx ==
- curscr->maxx && wx >= nlsp && nsp->ch == ' ' && nsp->attr == 0) {
- /* Check for clear to end-of-line. */
- cep = &curscr->lines[win->begy + wy]->line[win->begx + win->maxx - 1];
- while (cep->ch == ' ' && cep->attr == 0)
- if (cep-- <= csp)
- break;
- clsp = cep - curscr->lines[win->begy + wy]->line -
- win->begx;
-#ifdef DEBUG
- __CTRACE("makech: clsp = %d, nlsp = %d\n", clsp, nlsp);
-#endif
- if ((clsp - nlsp >= strlen(CE)
- && clsp < win->maxx) ||
- wy == win->maxy - 1) {
-#ifdef DEBUG
- __CTRACE("makech: using CE\n");
-#endif
- if (curscr->flags & __WSTANDOUT) {
- tputs(SE, 0, __cputchar);
- curscr->flags &= ~__WSTANDOUT;
- }
- tputs(CE, 1, __cputchar);
- lx = wx + win->begx;
- while (wx++ <= clsp) {
- csp->ch = ' ';
- csp->attr = 0;
- csp++;
- }
- return (OK);
- }
- ce = NULL;
- }
-
- /* Enter/exit standout mode as appropriate. */
- /* don't use simple ! here due to gcc -O bug */
- if (SO && !!(nsp->attr & __STANDOUT) !=
- !!(curscr->flags & __WSTANDOUT)
- ) {
- if (nsp->attr & __STANDOUT) {
- tputs(SO, 0, __cputchar);
- curscr->flags |= __WSTANDOUT;
- } else {
- tputs(SE, 0, __cputchar);
- curscr->flags &= ~__WSTANDOUT;
- }
- }
-
- wx++;
- if (wx >= win->maxx && wy == win->maxy - 1 && !curwin)
- if (win->flags & __SCROLLOK) {
- if (curscr->flags & __WSTANDOUT
- && win->flags & __ENDLINE)
- if (!MS) {
- tputs(SE, 0,
- __cputchar);
- curscr->flags &=
- ~__WSTANDOUT;
- }
- if (!(win->flags & __SCROLLWIN)) {
- if (!curwin) {
- csp->attr = nsp->attr;
- putchar(csp->ch = nsp->ch);
- } else
- putchar(nsp->ch);
- }
- if (wx + win->begx < curscr->maxx) {
- domvcur(ly, wx + win->begx,
- win->begy + win->maxy - 1,
- win->begx + win->maxx - 1);
- }
- ly = win->begy + win->maxy - 1;
- lx = win->begx + win->maxx - 1;
- return (OK);
- }
- if (wx < win->maxx || wy < win->maxy - 1 ||
- !(win->flags & __SCROLLWIN)) {
- if (!curwin) {
- csp->attr = nsp->attr;
- putchar(csp->ch = nsp->ch);
- csp++;
- } else
- putchar(nsp->ch);
- }
-#ifdef DEBUG
- __CTRACE("makech: putchar(%c)\n", nsp->ch & 0177);
-#endif
- if (UC && (nsp->attr & __STANDOUT)) {
- putchar('\b');
- tputs(UC, 0, __cputchar);
- }
- nsp++;
-#ifdef DEBUG
- __CTRACE("makech: 2: wx = %d, lx = %d\n", wx, lx);
-#endif
- }
- if (lx == wx + win->begx) /* If no change. */
- break;
- lx = wx + win->begx;
- if (lx >= COLS && AM)
- lx = COLS - 1;
- else if (wx >= win->maxx) {
- domvcur(ly, lx, ly, win->maxx + win->begx - 1);
- lx = win->maxx + win->begx - 1;
- }
-
-#ifdef DEBUG
- __CTRACE("makech: 3: wx = %d, lx = %d\n", wx, lx);
-#endif
- }
- return (OK);
-}
-
-/*
- * domvcur --
- * Do a mvcur, leaving standout mode if necessary.
- */
-static void
-domvcur(oy, ox, ny, nx)
- int oy, ox, ny, nx;
-{
- if (curscr->flags & __WSTANDOUT && !MS) {
- tputs(SE, 0, __cputchar);
- curscr->flags &= ~__WSTANDOUT;
- }
-
- __mvcur(oy, ox, ny, nx, 1);
-}
-
-/*
- * Quickch() attempts to detect a pattern in the change of the window
- * in order to optimize the change, e.g., scroll n lines as opposed to
- * repainting the screen line by line.
- */
-
-static void
-quickch(win)
- WINDOW *win;
-{
-#define THRESH (int) win->maxy / 4
-
- register __LINE *clp, *tmp1, *tmp2;
- register int bsize, curs, curw, starts, startw, i, j;
- int n, target, cur_period, bot, top, sc_region;
- __LDATA buf[1024];
- u_int blank_hash;
-
- /*
- * Find how many lines from the top of the screen are unchanged.
- */
- for (top = win->begy; top < win->begy + win->maxy; top++)
- if (win->lines[top - win->begy]->flags & __FORCEPAINT ||
- win->lines[top - win->begy]->hash != curscr->lines[top]->hash
- || memcmp(win->lines[top - win->begy]->line,
- curscr->lines[top]->line,
- win->maxx * __LDATASIZE) != 0)
- break;
- else
- win->lines[top - win->begy]->flags &= ~__ISDIRTY;
- /*
- * Find how many lines from bottom of screen are unchanged.
- */
- for (bot = win->begy + win->maxy - 1; bot >= (int) win->begy; bot--)
- if (win->lines[bot - win->begy]->flags & __FORCEPAINT ||
- win->lines[bot - win->begy]->hash != curscr->lines[bot]->hash
- || memcmp(win->lines[bot - win->begy]->line,
- curscr->lines[bot]->line,
- win->maxx * __LDATASIZE) != 0)
- break;
- else
- win->lines[bot - win->begy]->flags &= ~__ISDIRTY;
-
-#ifdef NO_JERKINESS
- /*
- * If we have a bottom unchanged region return. Scrolling the
- * bottom region up and then back down causes a screen jitter.
- * This will increase the number of characters sent to the screen
- * but it looks better.
- */
- if (bot < (int) win->begy + win->maxy - 1)
- return;
-#endif /* NO_JERKINESS */
-
- /*
- * Search for the largest block of text not changed.
- * Invariants of the loop:
- * - Startw is the index of the beginning of the examined block in win.
- * - Starts is the index of the beginning of the examined block in
- * curscr.
- * - Curw is the index of one past the end of the exmined block in win.
- * - Curs is the index of one past the end of the exmined block in
- * curscr.
- * - bsize is the current size of the examined block.
- */
- for (bsize = bot - top; bsize >= THRESH; bsize--) {
- for (startw = top; startw <= bot - bsize; startw++)
- for (starts = top; starts <= bot - bsize;
- starts++) {
- for (curw = startw, curs = starts;
- curs < starts + bsize; curw++, curs++)
- if (win->lines[curw - win->begy]->flags &
- __FORCEPAINT ||
- (win->lines[curw - win->begy]->hash !=
- curscr->lines[curs]->hash ||
- memcmp(win->lines[curw - win->begy]->line,
- curscr->lines[curs]->line,
- win->maxx * __LDATASIZE) != 0))
- break;
- if (curs == starts + bsize)
- goto done;
- }
- }
- done:
- /* Did not find anything */
- if (bsize < THRESH)
- return;
-
-#ifdef DEBUG
- __CTRACE("quickch:bsize=%d,starts=%d,startw=%d,curw=%d,curs=%d,top=%d,bot=%d\n",
- bsize, starts, startw, curw, curs, top, bot);
-#endif
-
- /*
- * Make sure that there is no overlap between the bottom and top
- * regions and the middle scrolled block.
- */
- if (bot < curs)
- bot = curs - 1;
- if (top > starts)
- top = starts;
-
- n = startw - starts;
-
-#ifdef DEBUG
- __CTRACE("#####################################\n");
- for (i = 0; i < curscr->maxy; i++) {
- __CTRACE("C: %d:", i);
- __CTRACE(" 0x%x \n", curscr->lines[i]->hash);
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%c",
- curscr->lines[i]->line[j].ch);
- __CTRACE("\n");
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%x",
- curscr->lines[i]->line[j].attr);
- __CTRACE("\n");
- if (i < win->begy || i > win->begy + win->maxy - 1)
- continue;
- __CTRACE("W: %d:", i - win->begy);
- __CTRACE(" 0x%x \n", win->lines[i - win->begy]->hash);
- __CTRACE(" 0x%x ", win->lines[i - win->begy]->flags);
- for (j = 0; j < win->maxx; j++)
- __CTRACE("%c",
- win->lines[i - win->begy]->line[j].ch);
- __CTRACE("\n");
- for (j = 0; j < win->maxx; j++)
- __CTRACE("%x",
- win->lines[i - win->begy]->line[j].attr);
- __CTRACE("\n");
- }
-#endif
-
- /* So we don't have to call __hash() each time */
- for (i = 0; i < win->maxx; i++) {
- buf[i].ch = ' ';
- buf[i].attr = 0;
- }
- blank_hash = __hash((char *) buf, win->maxx * __LDATASIZE);
-
- /*
- * Perform the rotation to maintain the consistency of curscr.
- * This is hairy since we are doing an *in place* rotation.
- * Invariants of the loop:
- * - I is the index of the current line.
- * - Target is the index of the target of line i.
- * - Tmp1 points to current line (i).
- * - Tmp2 and points to target line (target);
- * - Cur_period is the index of the end of the current period.
- * (see below).
- *
- * There are 2 major issues here that make this rotation non-trivial:
- * 1. Scrolling in a scrolling region bounded by the top
- * and bottom regions determined (whose size is sc_region).
- * 2. As a result of the use of the mod function, there may be a
- * period introduced, i.e., 2 maps to 4, 4 to 6, n-2 to 0, and
- * 0 to 2, which then causes all odd lines not to be rotated.
- * To remedy this, an index of the end ( = beginning) of the
- * current 'period' is kept, cur_period, and when it is reached,
- * the next period is started from cur_period + 1 which is
- * guaranteed not to have been reached since that would mean that
- * all records would have been reached. (think about it...).
- *
- * Lines in the rotation can have 3 attributes which are marked on the
- * line so that curscr is consistent with the visual screen.
- * 1. Not dirty -- lines inside the scrolled block, top region or
- * bottom region.
- * 2. Blank lines -- lines in the differential of the scrolling
- * region adjacent to top and bot regions
- * depending on scrolling direction.
- * 3. Dirty line -- all other lines are marked dirty.
- */
- sc_region = bot - top + 1;
- i = top;
- tmp1 = curscr->lines[top];
- cur_period = top;
- for (j = top; j <= bot; j++) {
- target = (i - top + n + sc_region) % sc_region + top;
- tmp2 = curscr->lines[target];
- curscr->lines[target] = tmp1;
- /* Mark block as clean and blank out scrolled lines. */
- clp = curscr->lines[target];
-#ifdef DEBUG
- __CTRACE("quickch: n=%d startw=%d curw=%d i = %d target=%d ",
- n, startw, curw, i, target);
-#endif
- if ((target >= startw && target < curw) || target < top
- || target > bot) {
-#ifdef DEBUG
- __CTRACE("-- notdirty");
-#endif
- win->lines[target - win->begy]->flags &= ~__ISDIRTY;
- } else if ((n > 0 && target >= top && target < top + n) ||
- (n < 0 && target <= bot && target > bot + n)) {
- if (clp->hash != blank_hash || memcmp(clp->line,
- buf, win->maxx * __LDATASIZE) !=0) {
- (void)memcpy(clp->line, buf,
- win->maxx * __LDATASIZE);
-#ifdef DEBUG
- __CTRACE("-- blanked out: dirty");
-#endif
- clp->hash = blank_hash;
- __touchline(win, target - win->begy, 0, win->maxx - 1, 0);
- } else {
- __touchline(win, target - win->begy, 0, win->maxx - 1, 0);
-#ifdef DEBUG
- __CTRACE(" -- blank line already: dirty");
-#endif
- }
- } else {
-#ifdef DEBUG
- __CTRACE(" -- dirty");
-#endif
- __touchline(win, target - win->begy, 0, win->maxx - 1, 0);
- }
-#ifdef DEBUG
- __CTRACE("\n");
-#endif
- if (target == cur_period) {
- i = target + 1;
- tmp1 = curscr->lines[i];
- cur_period = i;
- } else {
- tmp1 = tmp2;
- i = target;
- }
- }
-#ifdef DEBUG
- __CTRACE("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n");
- for (i = 0; i < curscr->maxy; i++) {
- __CTRACE("C: %d:", i);
- for (j = 0; j < curscr->maxx; j++)
- __CTRACE("%c",
- curscr->lines[i]->line[j].ch);
- __CTRACE("\n");
- if (i < win->begy || i > win->begy + win->maxy - 1)
- continue;
- __CTRACE("W: %d:", i - win->begy);
- for (j = 0; j < win->maxx; j++)
- __CTRACE("%c",
- win->lines[i - win->begy]->line[j].ch);
- __CTRACE("\n");
- }
-#endif
- if (n != 0) {
- WINDOW *wp;
- scrolln(starts, startw, curs, bot, top);
- /*
- * Need to repoint any subwindow lines to the rotated
- * line structured.
- */
- for (wp = win->nextp; wp != win; wp = wp->nextp)
- __set_subwin(win, wp);
- }
-}
-
-/*
- * scrolln --
- * Scroll n lines, where n is starts - startw.
- */
-static void
-scrolln(starts, startw, curs, bot, top)
- int starts, startw, curs, bot, top;
-{
- int i, oy, ox, n;
-
- oy = curscr->cury;
- ox = curscr->curx;
- n = starts - startw;
-
- /*
- * When the scrolling region has been set, the cursor has to be at the
- * last line of the region to make the scroll happen.
- *
- * Doing SF/SR or AL/DL appears faster on the screen than either sf/sr
- * or al/dl, and, some terminals have AL/DL, sf/sr, and CS, but not
- * SF/SR. So, if we're scrolling almost all of the screen, try and use
- * AL/DL, otherwise use the scrolling region. The "almost all" is a
- * shameless hack for vi.
- */
-
- if (__usecs) { /* Use change scroll region */
- if (bot != curscr->maxy - 1 || top != 0)
- __set_scroll_region(top, bot, ox, oy);
- if (n > 0) {
- __mvcur(oy, ox, bot, 0, 1);
- /* Scroll up the block */
- if (SF != NULL && n > 1)
- tputs(__tscroll(SF, n, 0), n, __cputchar);
- else
- /* newline seems faster than sf */
- for(i = 0; i < n; i++)
- if (NL && __pfast)
- tputs(NL, 1, __cputchar);
- else
- putchar('\n');
- __mvcur(bot, 0, oy, ox, 1);
- } else {
- __mvcur(oy, ox, top, 0, 1);
- /* Scroll the block down */
- if (SR != NULL && (sr == NULL || -n > 1))
- tputs(__tscroll(SR, -n, 0), -n, __cputchar);
- else
- for(i = n; i < 0; i++)
- tputs(sr, 1, __cputchar);
- __mvcur(top, 0, oy, ox, 1);
- }
- if (bot != curscr->maxy - 1 || top != 0)
- __set_scroll_region(0, curscr->maxy - 1, ox, oy);
- return;
- }
-
- if (n > 0) {
- /* Scroll up the screen. */
- if (((!DB && SF != NULL) || n == 1) && (bot == curscr->maxy - 1) && top == 0) {
- __mvcur(oy, ox, curscr->maxy - 1, 0, 1);
- if (n == 1)
- goto f_nl1;
- tputs(__tscroll(SF, n, 0), n, __cputchar);
- __mvcur(curscr->maxy - 1, 0, oy, ox, 1);
- return;
- }
- else if (DL != NULL && top != 0) {
- __mvcur(oy, ox, top, 0, 1);
- if (dl != NULL && n == 1)
- goto f_dl1;
- tputs(__tscroll(DL, n, 0), n, __cputchar);
- __mvcur(top, 0, bot - n + 1, 0, 1);
- }
- else if (dl != NULL && top != 0) {
- __mvcur(oy, ox, top, 0, 1);
- f_dl1:
- for (i = 0; i < n; i++)
- tputs(dl, 1, __cputchar);
- __mvcur(top, 0, bot - n + 1, 0, 1);
- }
- else if (top == 0) {
- __mvcur(oy, ox, curscr->maxy - 1, 0, 1);
- f_nl1:
- /* newline seems faster than sf */
- for(i = 0; i < n; i++)
- if (NL && __pfast)
- tputs(NL, 1, __cputchar);
- else
- putchar('\n');
- if (bot == curscr->maxy - 1) {
- __mvcur(curscr->maxy - 1, 0, oy, ox, 1);
- return;
- }
- __mvcur(curscr->maxy - 1, 0, bot - n + 1, 0, 1);
- }
- else
- abort();
-
- /* Push down the bottom region. */
- if (AL != NULL) {
- if (al != NULL && n == 1)
- goto f_al1;
- tputs(__tscroll(AL, n, 0), n, __cputchar);
- }
- else if (al != NULL) {
- f_al1:
- for (i = 0; i < n; i++)
- tputs(al, 1, __cputchar);
- }
- else
- abort();
- __mvcur(bot - n + 1, 0, oy, ox, 1);
- } else {
- /*
- * !!!
- * n < 0
- */
- /* Scroll down the screen. */
- if (!DA && (SR != NULL || sr != NULL) && bot == curscr->maxy - 1 && top == 0) {
- __mvcur(oy, ox, 0, 0, 1);
- if (SR == NULL || (sr != NULL && -n == 1)) {
- for (i = n; i < 0; i++)
- tputs(sr, 1, __cputchar);
- } else
- tputs(__tscroll(SR, -n, 0), -n, __cputchar);
- __mvcur(0, 0, oy, ox, 1);
- return;
- }
- else if (DL != NULL) {
- __mvcur(oy, ox, bot + n + 1, 0, 1);
- if (dl != NULL && -n == 1)
- goto b_dl1;
- tputs(__tscroll(DL, -n, 0), -n, __cputchar);
- __mvcur(bot + n + 1, 0, top, 0, 1);
- }
- else if (dl != NULL) {
- __mvcur(oy, ox, bot + n + 1, 0, 1);
- b_dl1:
- for (i = n; i < 0; i++)
- tputs(dl, 1, __cputchar);
- __mvcur(bot + n + 1, 0, top, 0, 1);
- }
- else
- abort();
-
- /* Scroll the block down. */
- if (AL != NULL) {
- if (al != NULL && -n == 1)
- goto b_al1;
- tputs(__tscroll(AL, -n, 0), -n, __cputchar);
- }
- else if (al != NULL) {
- b_al1:
- for (i = n; i < 0; i++)
- tputs(al, 1, __cputchar);
- }
- else
- abort();
- __mvcur(top, 0, oy, ox, 1);
- }
-}
diff --git a/lib/libcurses/scanw.c b/lib/libcurses/scanw.c
deleted file mode 100644
index 221384f..0000000
--- a/lib/libcurses/scanw.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)scanw.c 8.3 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-/*
- * scanw and friends.
- */
-
-#ifdef __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#include "curses.h"
-
-/*
- * scanw --
- * Implement a scanf on the standard screen.
- */
-int
-#ifdef __STDC__
-scanw(const char *fmt, ...)
-#else
-scanw(fmt, va_alist)
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int ret;
-
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vwscanw(stdscr, fmt, ap);
- va_end(ap);
- return (ret);
-}
-
-/*
- * wscanw --
- * Implements a scanf on the given window.
- */
-int
-#ifdef __STDC__
-wscanw(WINDOW *win, const char *fmt, ...)
-#else
-wscanw(win, fmt, va_alist)
- WINDOW *win;
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int ret;
-
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vwscanw(win, fmt, ap);
- va_end(ap);
- return (ret);
-}
-
-/*
- * mvscanw, mvwscanw --
- * Implement the mvscanw commands. Due to the variable number of
- * arguments, they cannot be macros. Another sigh....
- */
-int
-#ifdef __STDC__
-mvscanw(register int y, register int x, const char *fmt,...)
-#else
-mvscanw(y, x, fmt, va_alist)
- register int y, x;
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int ret;
-
- if (move(y, x) != OK)
- return (ERR);
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vwscanw(stdscr, fmt, ap);
- va_end(ap);
- return (ret);
-}
-
-int
-#ifdef __STDC__
-mvwscanw(register WINDOW * win, register int y, register int x,
- const char *fmt, ...)
-#else
-mvwscanw(win, y, x, fmt, va_alist)
- register WINDOW *win;
- register int y, x;
- char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- int ret;
-
- if (move(y, x) != OK)
- return (ERR);
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- ret = vwscanw(win, fmt, ap);
- va_end(ap);
- return (ret);
-}
-
-/*
- * vwscanw --
- * This routine actually executes the scanf from the window.
- */
-int
-vwscanw(win, fmt, ap)
- WINDOW *win;
- const char *fmt;
- va_list ap;
-{
-
- char buf[1024];
-
- return (wgetstr(win, buf) == OK ?
- vsscanf(buf, fmt, ap) : ERR);
-}
diff --git a/lib/libcurses/scroll.c b/lib/libcurses/scroll.c
deleted file mode 100644
index 8aad91c..0000000
--- a/lib/libcurses/scroll.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)scroll.c 8.3 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * scroll --
- * Scroll the window up a line.
- */
-int
-scroll(win)
- register WINDOW *win;
-{
- register int oy, ox;
-
-#ifdef DEBUG
- __CTRACE("scroll: (%0.2o)\n", win);
-#endif
-
- if (!(win->flags & __SCROLLOK))
- return (ERR);
-
- getyx(win, oy, ox);
- wmove(win, 0, 0);
- wdeleteln(win);
- wmove(win, oy, ox);
-
- if (win == curscr) {
- putchar('\n');
- if (!NONL)
- win->curx = 0;
-#ifdef DEBUG
- __CTRACE("scroll: win == curscr\n");
-#endif
- }
- return (OK);
-}
diff --git a/lib/libcurses/setterm.c b/lib/libcurses/setterm.c
deleted file mode 100644
index 252c599..0000000
--- a/lib/libcurses/setterm.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)setterm.c 8.7 (Berkeley) 7/27/94";
-#endif /* not lint */
-
-#include <sys/ioctl.h> /* TIOCGWINSZ on old systems. */
-
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
-
-#include "curses.h"
-
-static void zap __P((void));
-
-static char *sflags[] = {
- /* am bs da db eo hc in mi ms */
- &AM, &BS, &DA, &DB, &EO, &HC, &IN, &MI, &MS,
- /* nc ns os ul xb xn xt xs xx */
- &NC, &NS, &OS, &UL, &XB, &XN, &XT, &XS, &XX
- };
-
-static char *_PC,
- **sstrs[] = {
- /* AL bc bt cd ce cl cm cr cs */
- &AL, &BC, &BT, &CD, &CE, &CL, &CM, &CR, &CS,
- /* dc DL dm do ed ei k0 k1 k2 */
- &DC, &DL, &DM, &DO, &ED, &EI, &K0, &K1, &K2,
- /* k3 k4 k5 k6 k7 k8 k9 ho ic */
- &K3, &K4, &K5, &K6, &K7, &K8, &K9, &HO, &IC,
- /* im ip kd ke kh kl kr ks ku */
- &IM, &IP, &KD, &KE, &KH, &KL, &KR, &KS, &KU,
- /* ll ma nd nl pc rc sc se SF */
- &LL, &MA, &ND, &NL, &_PC, &RC, &SC, &SE, &SF,
- /* so SR ta te ti uc ue up us */
- &SO, &SR, &TA, &TE, &TI, &UC, &UE, &UP, &US,
- /* vb vs ve al dl sf sr AL */
- &VB, &VS, &VE, &al, &dl, &sf, &sr, &AL_PARM,
- /* DL UP DO LE */
- &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM,
- /* RI */
- &RIGHT_PARM,
- };
-
-static char *aoftspace; /* Address of _tspace for relocation */
-static char tspace[2048]; /* Space for capability strings */
-
-char *ttytype;
-
-int
-setterm(type)
- register char *type;
-{
- static char genbuf[1024];
- static char __ttytype[1024];
- register int unknown;
- struct winsize win;
- char *p;
-
-#ifdef DEBUG
- __CTRACE("setterm: (\"%s\")\nLINES = %d, COLS = %d\n",
- type, LINES, COLS);
-#endif
- if (type[0] == '\0')
- type = "xx";
- unknown = 0;
- if (tgetent(genbuf, type) != 1) {
- unknown++;
- strcpy(genbuf, "xx|dumb:");
- }
-#ifdef DEBUG
- __CTRACE("setterm: tty = %s\n", type);
-#endif
-
- /* Try TIOCGWINSZ, and, if it fails, the termcap entry. */
- if (ioctl(__tty_fileno, TIOCGWINSZ, &win) != -1 &&
- win.ws_row != 0 && win.ws_col != 0) {
- LINES = win.ws_row;
- COLS = win.ws_col;
- } else {
- LINES = tgetnum("li");
- COLS = tgetnum("co");
- }
-
- /* POSIX 1003.2 requires that the environment override. */
- if ((p = getenv("LINES")) != NULL)
- LINES = strtol(p, NULL, 10);
- if ((p = getenv("COLUMNS")) != NULL)
- COLS = strtol(p, NULL, 10);
-
- /*
- * Want cols > 4, otherwise things will fail.
- */
- if (COLS <= 4)
- return (ERR);
-
-#ifdef DEBUG
- __CTRACE("setterm: LINES = %d, COLS = %d\n", LINES, COLS);
-#endif
- aoftspace = tspace;
- zap(); /* Get terminal description. */
-
- /* If we can't tab, we can't backtab, either. */
- if (!GT)
- BT = NULL;
-
- /*
- * Test for cursor motion capbility.
- *
- * XXX
- * This is truly stupid -- tgoto returns "OOPS" if it can't
- * do cursor motions.
- */
- if (tgoto(CM, 0, 0)[0] == 'O') {
- CA = 0;
- CM = 0;
- } else
- CA = 1;
-
- PC = _PC ? _PC[0] : 0;
-
- aoftspace = tspace;
- ttytype = longname(genbuf, __ttytype);
-
- __usecs =
- ((AL == NULL && al == NULL) || (DL == NULL && dl == NULL)) &&
- !NS && ((SC != NULL && RC != NULL) || HO != NULL) &&
- CS != NULL && (SR != NULL || sr != NULL);
-
- /* If no scrolling commands, no quick change. */
- __noqch = !__usecs &&
- ((AL == NULL && al == NULL) || (DL == NULL && dl == NULL));
-
- return (unknown ? ERR : OK);
-}
-
-/*
- * zap --
- * Gets all the terminal flags from the termcap database.
- */
-static void
-zap()
-{
- register char *namp, ***sp;
- register char **fp;
- char tmp[3];
-#ifdef DEBUG
- register char *cp;
-#endif
- tmp[2] = '\0';
-
- namp = "ambsdadbeohcinmimsncnsosulxbxnxtxsxx";
- fp = sflags;
- do {
- *tmp = *namp;
- *(tmp + 1) = *(namp + 1);
- *(*fp++) = tgetflag(tmp);
-#ifdef DEBUG
- __CTRACE("2.2s = %s\n", namp, *fp[-1] ? "TRUE" : "FALSE");
-#endif
- namp += 2;
-
- } while (*namp);
- namp = "ALbcbtcdceclcmcrcsdcDLdmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullmandnlpcrcscseSFsoSRtatetiucueupusvbvsvealdlsfsrALDLUPDOLERI";
- sp = sstrs;
- do {
- *tmp = *namp;
- *(tmp + 1) = *(namp + 1);
- *(*sp++) = tgetstr(tmp, &aoftspace);
-#ifdef DEBUG
- __CTRACE("2.2s = %s", namp, *sp[-1] == NULL ? "NULL\n" : "\"");
- if (*sp[-1] != NULL) {
- for (cp = *sp[-1]; *cp; cp++)
- __CTRACE("%s", unctrl(*cp));
- __CTRACE("\"\n");
- }
-#endif
- namp += 2;
- } while (*namp);
- if (XS)
- SO = SE = NULL;
- else {
- if (tgetnum("sg") > 0)
- SO = NULL;
- if (tgetnum("ug") > 0)
- US = NULL;
- if (!SO && US) {
- SO = US;
- SE = UE;
- }
- }
-}
-
-/*
- * getcap --
- * Return a capability from termcap.
- */
-char *
-getcap(name)
- char *name;
-{
- return (tgetstr(name, &aoftspace));
-}
diff --git a/lib/libcurses/standout.c b/lib/libcurses/standout.c
deleted file mode 100644
index 903400a..0000000
--- a/lib/libcurses/standout.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)standout.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * wstandout
- * Enter standout mode.
- */
-int
-wstandout(win)
- register WINDOW *win;
-{
- if (!SO && !UC)
- return (ERR);
-
- win->flags |= __WSTANDOUT;
- return (OK);
-}
-
-/*
- * wstandend --
- * Exit standout mode.
- */
-int
-wstandend(win)
- register WINDOW *win;
-{
- if (!SO && !UC)
- return (ERR);
-
- win->flags &= ~__WSTANDOUT;
- return (OK);
-}
diff --git a/lib/libcurses/toucholap.c b/lib/libcurses/toucholap.c
deleted file mode 100644
index 955c204..0000000
--- a/lib/libcurses/toucholap.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)toucholap.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * touchoverlap --
- * Touch, on win2, the part that overlaps with win1.
- */
-int
-touchoverlap(win1, win2)
- register WINDOW *win1, *win2;
-{
- register int y, endy, endx, starty, startx;
-
-#ifdef DEBUG
- __CTRACE("touchoverlap: (%0.2o, %0.2o);\n", win1, win2);
-#endif
- starty = max(win1->begy, win2->begy);
- startx = max(win1->begx, win2->begx);
- endy = min(win1->maxy + win1->begy, win2->maxy + win2->begx);
- endx = min(win1->maxx + win1->begx, win2->maxx + win2->begx);
-#ifdef DEBUG
- __CTRACE("touchoverlap: from (%d,%d) to (%d,%d)\n",
- starty, startx, endy, endx);
- __CTRACE("touchoverlap: win1 (%d,%d) to (%d,%d)\n",
- win1->begy, win1->begx, win1->begy + win1->maxy,
- win1->begx + win1->maxx);
- __CTRACE("touchoverlap: win2 (%d,%d) to (%d,%d)\n",
- win2->begy, win2->begx, win2->begy + win2->maxy,
- win2->begx + win2->maxx);
-#endif
- if (starty >= endy || startx >= endx)
- return (OK);
- starty -= win2->begy;
- startx -= win2->begx;
- endy -= win2->begy;
- endx -= win2->begx;
- for (--endx, y = starty; y < endy; y++)
- __touchline(win2, y, startx, endx, 0);
- return (OK);
-}
-
diff --git a/lib/libcurses/touchwin.c b/lib/libcurses/touchwin.c
deleted file mode 100644
index 36f487e..0000000
--- a/lib/libcurses/touchwin.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)touchwin.c 8.2 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-/*
- * touchline --
- * Touch a given line.
- */
-int
-touchline(win, y, sx, ex)
- WINDOW *win;
- register int y, sx, ex;
-{
- return (__touchline(win, y, sx, ex, 1));
-}
-
-
-/*
- * touchwin --
- * Make it look like the whole window has been changed.
- */
-int
-touchwin(win)
- register WINDOW *win;
-{
- register int y, maxy;
-
-#ifdef DEBUG
- __CTRACE("touchwin: (%0.2o)\n", win);
-#endif
- maxy = win->maxy;
- for (y = 0; y < maxy; y++)
- __touchline(win, y, 0, win->maxx - 1, 1);
- return (OK);
-}
-
-
-int
-__touchwin(win)
- register WINDOW *win;
-{
- register int y, maxy;
-
-#ifdef DEBUG
- __CTRACE("touchwin: (%0.2o)\n", win);
-#endif
- maxy = win->maxy;
- for (y = 0; y < maxy; y++)
- __touchline(win, y, 0, win->maxx - 1, 0);
- return (OK);
-}
-
-int
-__touchline(win, y, sx, ex, force)
- register WINDOW *win;
- register int y, sx, ex;
- int force;
-{
-#ifdef DEBUG
- __CTRACE("touchline: (%0.2o, %d, %d, %d, %d)\n", win, y, sx, ex, force);
- __CTRACE("touchline: first = %d, last = %d\n",
- *win->lines[y]->firstchp, *win->lines[y]->lastchp);
-#endif
- if (force)
- win->lines[y]->flags |= __FORCEPAINT;
- sx += win->ch_off;
- ex += win->ch_off;
- if (!(win->lines[y]->flags & __ISDIRTY)) {
- win->lines[y]->flags |= __ISDIRTY;
- *win->lines[y]->firstchp = sx;
- *win->lines[y]->lastchp = ex;
- } else {
- if (*win->lines[y]->firstchp > sx)
- *win->lines[y]->firstchp = sx;
- if (*win->lines[y]->lastchp < ex)
- *win->lines[y]->lastchp = ex;
- }
-#ifdef DEBUG
- __CTRACE("touchline: first = %d, last = %d\n",
- *win->lines[y]->firstchp, *win->lines[y]->lastchp);
-#endif
- return (OK);
-}
-
-
diff --git a/lib/libcurses/tscroll.c b/lib/libcurses/tscroll.c
deleted file mode 100644
index a3326a9..0000000
--- a/lib/libcurses/tscroll.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)tscroll.c 8.4 (Berkeley) 7/27/94";
-#endif /* not lint */
-
-#include "curses.h"
-
-#define MAXRETURNSIZE 64
-
-/*
- * Routine to perform scrolling. Derived from tgoto.c in tercamp(3)
- * library. Cap is a string containing printf type escapes to allow
- * scrolling. The following escapes are defined for substituting n:
- *
- * %d as in printf
- * %2 like %2d
- * %3 like %3d
- * %. gives %c hacking special case characters
- * %+x like %c but adding x first
- *
- * The codes below affect the state but don't use up a value.
- *
- * %>xy if value > x add y
- * %i increments n
- * %% gives %
- * %B BCD (2 decimal digits encoded in one byte)
- * %D Delta Data (backwards bcd)
- *
- * all other characters are ``self-inserting''.
- */
-char *
-__tscroll(cap, n1, n2)
- const char *cap;
- int n1, n2;
-{
- static char result[MAXRETURNSIZE];
- int c, n, increment = 0;
- char *dp;
-
- if (cap == NULL)
- goto err;
- for (n = n1, dp = result; (c = *cap++) != '\0';) {
- if (c != '%') {
- *dp++ = c;
- continue;
- }
- switch (c = *cap++) {
- case 'n':
- n ^= 0140;
- continue;
- case 'd':
- if (n < 10)
- goto one;
- if (n < 100)
- goto two;
- /* FALLTHROUGH */
- case '3':
- *dp++ = (n / 100) | '0';
- n %= 100;
- /* FALLTHROUGH */
- case '2':
-two: *dp++ = n / 10 | '0';
-one: *dp++ = n % 10 | '0';
- n = n2;
- if (increment)
- n++;
- continue;
- case '>':
- if (n > *cap++)
- n += *cap++;
- else
- cap++;
- continue;
- case '+':
- n += *cap++;
- /* FALLTHROUGH */
- case '.':
- *dp++ = n;
- continue;
- case 'i':
- increment = 1;
- n++;
- continue;
- case '%':
- *dp++ = c;
- continue;
- case 'B':
- n = (n / 10 << 4) + n % 10;
- continue;
- case 'D':
- n = n - 2 * (n % 16);
- continue;
- /*
- * XXX
- * System V terminfo files have lots of extra gunk.
- * The only one we've seen in scrolling strings is
- * %pN, and it seems to work okay if we ignore it.
- */
- case 'p':
- ++cap;
- continue;
- default:
- goto err;
- }
- }
- *dp = '\0';
- return (result);
-
-err: return("curses: __tscroll failed");
-}
diff --git a/lib/libcurses/tstp.c b/lib/libcurses/tstp.c
deleted file mode 100644
index 069dbd8..0000000
--- a/lib/libcurses/tstp.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 1981, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)tstp.c 8.3 (Berkeley) 5/4/94";
-#endif /* not lint */
-
-#include <errno.h>
-#include <signal.h>
-#include <termios.h>
-#include <unistd.h>
-
-#include "curses.h"
-
-/*
- * stop_signal_handler --
- * Handle stop signals.
- */
-void
-__stop_signal_handler(signo)
- int signo;
-{
- struct termios save;
- sigset_t oset, set;
-
- /* Get the current terminal state (which the user may have changed). */
- if (tcgetattr(__tty_fileno, &save))
- return;
-
- /*
- * Block window change and timer signals. The latter is because
- * applications use timers to decide when to repaint the screen.
- */
- (void)sigemptyset(&set);
- (void)sigaddset(&set, SIGALRM);
- (void)sigaddset(&set, SIGWINCH);
- (void)sigprocmask(SIG_BLOCK, &set, &oset);
-
- /*
- * End the window, which also resets the terminal state to the
- * original modes.
- */
- endwin();
-
- /* Unblock SIGTSTP. */
- (void)sigemptyset(&set);
- (void)sigaddset(&set, SIGTSTP);
- (void)sigprocmask(SIG_UNBLOCK, &set, NULL);
-
- /* Stop ourselves. */
- __restore_stophandler();
- (void)kill(0, SIGTSTP);
-
- /* Time passes ... */
-
- /* Reset the curses SIGTSTP signal handler. */
- __set_stophandler();
-
- /* save the new "default" terminal state */
- (void)tcgetattr(__tty_fileno, &__orig_termios);
-
- /* Reset the terminal state to the mode just before we stopped. */
- (void)tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, &save);
-
- /* Restart the screen. */
- __startwin();
-
- /* Repaint the screen. */
- wrefresh(curscr);
-
- /* Reset the signals. */
- (void)sigprocmask(SIG_SETMASK, &oset, NULL);
-}
-
-static void (*otstpfn)() = SIG_DFL;
-
-/*
- * Set the TSTP handler.
- */
-void
-__set_stophandler()
-{
- otstpfn = signal(SIGTSTP, __stop_signal_handler);
-}
-
-/*
- * Restore the TSTP handler.
- */
-void
-__restore_stophandler()
-{
- (void)signal(SIGTSTP, otstpfn);
-}
-
-/* For compatibility */
-
-void tstp() { __stop_signal_handler(SIGTSTP); }
diff --git a/lib/libcurses/tty.c b/lib/libcurses/tty.c
deleted file mode 100644
index 8265881..0000000
--- a/lib/libcurses/tty.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)tty.c 8.4 (Berkeley) 5/18/94";
-#endif /* not lint */
-
-#include <termios.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-#include "curses.h"
-
-/*
- * In general, curses should leave tty hardware settings alone (speed, parity,
- * word size). This is most easily done in BSD by using TCSASOFT on all
- * tcsetattr calls. On other systems, it would be better to get and restore
- * those attributes at each change, or at least when stopped and restarted.
- * See also the comments in getterm().
- */
-#ifdef TCSASOFT
-int __tcaction = 1; /* Ignore hardware settings. */
-#else
-int __tcaction = 0;
-#endif
-
-int __tty_fileno, __noterm = 0;
-struct termios __orig_termios, __baset;
-static struct termios cbreakt, rawt, *curt;
-static int useraw;
-
-#ifndef OXTABS
-#ifdef XTABS /* SMI uses XTABS. */
-#define OXTABS XTABS
-#else
-#define OXTABS 0
-#endif
-#endif
-
-/*
- * gettmode --
- * Do terminal type initialization.
- */
-int
-gettmode()
-{
- useraw = 0;
-
- if (tcgetattr(__tty_fileno = STDIN_FILENO, &__orig_termios))
- if (tcgetattr(__tty_fileno = STDOUT_FILENO, &__orig_termios))
- __noterm = 1;
-
- __baset = __orig_termios;
- __baset.c_oflag &= ~OXTABS;
-
- GT = 0; /* historical. was used before we wired OXTABS off */
- NONL = (__baset.c_oflag & ONLCR) == 0;
-
- /*
- * XXX
- * System V and SMI systems overload VMIN and VTIME, such that
- * VMIN is the same as the VEOF element, and VTIME is the same
- * as the VEOL element. This means that, if VEOF was ^D, the
- * default VMIN is 4. Majorly stupid.
- */
- cbreakt = __baset;
- cbreakt.c_lflag &= ~ICANON;
- cbreakt.c_cc[VMIN] = 1;
- cbreakt.c_cc[VTIME] = 0;
-
- rawt = cbreakt;
- rawt.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|INLCR|IGNCR|ICRNL|IXON);
- rawt.c_oflag &= ~OPOST;
- rawt.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
-
- /*
- * In general, curses should leave hardware-related settings alone.
- * This includes parity and word size. Older versions set the tty
- * to 8 bits, no parity in raw(), but this is considered to be an
- * artifact of the old tty interface. If it's desired to change
- * parity and word size, the TCSASOFT bit has to be removed from the
- * calls that switch to/from "raw" mode.
- */
- if (!__tcaction) {
- rawt.c_iflag &= ~ISTRIP;
- rawt.c_cflag &= ~(CSIZE|PARENB);
- rawt.c_cflag |= CS8;
- }
-
- curt = &__baset;
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
- return OK;
-}
-
-int
-raw()
-{
- useraw = __pfast = __rawmode = 1;
- curt = &rawt;
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
-}
-
-int
-noraw()
-{
- useraw = __pfast = __rawmode = 0;
- curt = &__baset;
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
-}
-
-int
-cbreak()
-{
-
- __rawmode = 1;
- curt = useraw ? &rawt : &cbreakt;
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
-}
-
-int
-nocbreak()
-{
-
- __rawmode = 0;
- curt = useraw ? &rawt : &__baset;
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
-}
-
-int
-echo()
-{
- rawt.c_lflag |= ECHO;
- cbreakt.c_lflag |= ECHO;
- __baset.c_lflag |= ECHO;
-
- __echoit = 1;
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
-}
-
-int
-noecho()
-{
- rawt.c_lflag &= ~ECHO;
- cbreakt.c_lflag &= ~ECHO;
- __baset.c_lflag &= ~ECHO;
-
- __echoit = 0;
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
-}
-
-int
-nl()
-{
- rawt.c_iflag |= ICRNL;
- rawt.c_oflag |= ONLCR;
- cbreakt.c_iflag |= ICRNL;
- cbreakt.c_oflag |= ONLCR;
- __baset.c_iflag |= ICRNL;
- __baset.c_oflag |= ONLCR;
-
- __pfast = __rawmode;
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
-}
-
-int
-nonl()
-{
- rawt.c_iflag &= ~ICRNL;
- rawt.c_oflag &= ~ONLCR;
- cbreakt.c_iflag &= ~ICRNL;
- cbreakt.c_oflag &= ~ONLCR;
- __baset.c_iflag &= ~ICRNL;
- __baset.c_oflag &= ~ONLCR;
-
- __pfast = 1;
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, curt) ? ERR : OK);
-}
-
-void
-__startwin()
-{
- (void)fflush(stdout);
- (void)setvbuf(stdout, NULL, _IOFBF, 0);
-
- tputs(TI, 0, __cputchar);
- tputs(VS, 0, __cputchar);
- if (curscr != NULL && __usecs)
- __set_scroll_region(0, curscr->maxy - 1, 0, 0);
-}
-
-void
-__set_scroll_region(top, bot, ox, oy)
-int top, bot, ox, oy;
-{
- if (SC != NULL && RC != NULL)
- tputs(SC, 0, __cputchar);
- tputs(__tscroll(CS, top, bot), 1, __cputchar);
- if (SC != NULL && RC != NULL)
- tputs(RC, 0, __cputchar);
- else {
- tputs(HO, 1, __cputchar);
- __mvcur(0, 0, oy, ox, 1);
- }
-}
-
-int
-endwin()
-{
- __restore_stophandler();
-
- if (curscr != NULL) {
- if (curscr->flags & __WSTANDOUT) {
- tputs(SE, 0, __cputchar);
- curscr->flags &= ~__WSTANDOUT;
- }
- if (__usecs)
- __set_scroll_region(0, curscr->maxy - 1, 0, 0);
- __mvcur(curscr->curx, curscr->cury, curscr->maxy - 1, 0, 0);
- }
-
- (void)tputs(VE, 0, __cputchar);
- (void)tputs(TE, 0, __cputchar);
- (void)fflush(stdout);
- (void)setvbuf(stdout, NULL, _IOLBF, 0);
-
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, &__orig_termios) ? ERR : OK);
-}
-
-/*
- * The following routines, savetty and resetty are completely useless and
- * are left in only as stubs. If people actually use them they will almost
- * certainly screw up the state of the world.
- */
-static struct termios savedtty;
-int
-savetty()
-{
- return (!__noterm && tcgetattr(__tty_fileno, &savedtty) ? ERR : OK);
-}
-
-int
-resetty()
-{
- return (!__noterm && tcsetattr(__tty_fileno, __tcaction ?
- TCSASOFT | TCSADRAIN : TCSADRAIN, &savedtty) ? ERR : OK);
-}
diff --git a/lib/libcurses/unctrl.c b/lib/libcurses/unctrl.c
deleted file mode 100644
index 530dcc2..0000000
--- a/lib/libcurses/unctrl.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1981, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)unctrl.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-char *__unctrl[256] = {
- "^@", "^A", "^B", "^C", "^D", "^E", "^F", "^G",
- "^H", "^I", "^J", "^K", "^L", "^M", "^N", "^O",
- "^P", "^Q", "^R", "^S", "^T", "^U", "^V", "^W",
- "^X", "^Y", "^Z", "^[", "^\\", "^]", "^~", "^_",
- " ", "!", "\"", "#", "$", "%", "&", "'",
- "(", ")", "*", "+", ",", "-", ".", "/",
- "0", "1", "2", "3", "4", "5", "6", "7",
- "8", "9", ":", ";", "<", "=", ">", "?",
- "@", "A", "B", "C", "D", "E", "F", "G",
- "H", "I", "J", "K", "L", "M", "N", "O",
- "P", "Q", "R", "S", "T", "U", "V", "W",
- "X", "Y", "Z", "[", "\\", "]", "^", "_",
- "`", "a", "b", "c", "d", "e", "f", "g",
- "h", "i", "j", "k", "l", "m", "n", "o",
- "p", "q", "r", "s", "t", "u", "v", "w",
- "x", "y", "z", "{", "|", "}", "~", "^?",
-
- "0x80", "0x81", "0x82", "0x83", "0x84", "0x85", "0x86", "0x87",
- "0x88", "0x89", "0x8a", "0x8b", "0x8c", "0x8d", "0x8e", "0x8f",
- "0x90", "0x91", "0x92", "0x93", "0x94", "0x95", "0x96", "0x97",
- "0x98", "0x99", "0x9a", "0x9b", "0x9c", "0x9d", "0x9e", "0x9f",
- "0xa0", "0xa1", "0xa2", "0xa3", "0xa4", "0xa5", "0xa6", "0xa7",
- "0xa8", "0xa9", "0xaa", "0xab", "0xac", "0xad", "0xae", "0xaf",
- "0xb0", "0xb1", "0xb2", "0xb3", "0xb4", "0xb5", "0xb6", "0xb7",
- "0xb8", "0xb9", "0xba", "0xbb", "0xbc", "0xbd", "0xbe", "0xbf",
- "0xc0", "0xc1", "0xc2", "0xc3", "0xc4", "0xc5", "0xc6", "0xc7",
- "0xc8", "0xc9", "0xca", "0xcb", "0xcc", "0xcd", "0xce", "0xcf",
- "0xd0", "0xd1", "0xd2", "0xd3", "0xd4", "0xd5", "0xd6", "0xd7",
- "0xd8", "0xd9", "0xda", "0xdb", "0xdc", "0xdd", "0xde", "0xdf",
- "0xe0", "0xe1", "0xe2", "0xe3", "0xe4", "0xe5", "0xe6", "0xe7",
- "0xe8", "0xe9", "0xea", "0xeb", "0xec", "0xed", "0xee", "0xef",
- "0xf0", "0xf1", "0xf2", "0xf3", "0xf4", "0xf5", "0xf6", "0xf7",
- "0xf8", "0xf9", "0xfa", "0xfb", "0xfc", "0xfd", "0xfe", "0xff",
-};
-
-char __unctrllen[256] = {
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4,
-};
diff --git a/lib/libdisk/Makefile b/lib/libdisk/Makefile
deleted file mode 100644
index 05919d5..0000000
--- a/lib/libdisk/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-# $Id$
-
-LIB= disk
-SRCS= blocks.c disklabel.c dkcksum.c chunk.c disk.c change.c \
- create_chunk.c rules.c write_disk.c data.c
-
-CFLAGS+= -Wall
-CLEANFILES+= tmp.c tst01 tst01.o data.c
-VPATH= ${.CURDIR}/../../sbin/disklabel
-NOPROFILE= yes
-NOSHARED= yes
-NOPIC= yes
-
-MAN3= libdisk.3
-MLINKS+= libdisk.3 Open_Disk.3 \
- libdisk.3 Clone_Disk.3 \
- libdisk.3 Free_Disk.3 \
- libdisk.3 Debug_Disk.3 \
- libdisk.3 Set_Bios_Geom.3 \
- libdisk.3 Delete_Chunk.3 \
- libdisk.3 Collapse_Disk.3 \
- libdisk.3 Collapse_Chunk.3 \
- libdisk.3 Create_Chunk.3 \
- libdisk.3 All_FreeBSD.3 \
- libdisk.3 CheckRules.3 \
- libdisk.3 Disk_Names.3 \
- libdisk.3 Set_Boot_Mgr.3 \
- libdisk.3 Set_Boot_Blocks.3 \
- libdisk.3 Write_Disk.3 \
- libdisk.3 Cyl_Aligned.3 \
- libdisk.3 Next_Cyl_Aligned.3 \
- libdisk.3 Prev_Cyl_Aligned.3 \
- libdisk.3 Track_Aligned.3 \
- libdisk.3 Next_Track_Aligned.3 \
- libdisk.3 Prev_Track_Aligned.3 \
- libdisk.3 Create_Chunk_DWIM.3 \
- libdisk.3 MakeDev.3 \
- libdisk.3 MakeDevDisk.3 \
- libdisk.3 ShowChunkFlags.3 \
- libdisk.3 ChunkCanBeRoot.3 \
- libdisk.3 slice_type_name.3
-
-.include <bsd.lib.mk>
-
-BOOTS=/usr/mdec
-
-data.c: ${.CURDIR}/libdisk.h ${BOOTS}/boot1 ${BOOTS}/boot2
- file2c 'const unsigned char boot1[] = {' '};' \
- < ${BOOTS}/boot1 > tmp.c
- file2c 'const unsigned char boot2[] = {' '};' \
- < ${BOOTS}/boot2 >> tmp.c
- mv -f tmp.c data.c
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/libdisk.h \
- ${DESTDIR}/usr/include/libdisk.h
-
-
-tst01: tst01.o libdisk.a
- cc ${CFLAGS} -static tst01.o -o tst01 libdisk.a
diff --git a/lib/libdisk/blocks.c b/lib/libdisk/blocks.c
deleted file mode 100644
index 3864ec2..0000000
--- a/lib/libdisk/blocks.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <err.h>
-#include "libdisk.h"
-
-void *
-read_block(int fd, daddr_t block)
-{
- void *foo;
-
- foo = malloc(512);
- if (!foo)
- err(1,"malloc");
- if (-1 == lseek(fd, (off_t)block * 512, SEEK_SET))
- err(1, "lseek");
- if (512 != read(fd,foo, 512))
- err(1,"read");
- return foo;
-}
-
-void
-write_block(int fd, daddr_t block, void *foo)
-{
- if (-1 == lseek(fd, (off_t)block * 512, SEEK_SET))
- err(1, "lseek");
- if (512 != write(fd,foo, 512))
- err(1,"write");
-}
diff --git a/lib/libdisk/change.c b/lib/libdisk/change.c
deleted file mode 100644
index a144aa5..0000000
--- a/lib/libdisk/change.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <err.h>
-#include <sys/types.h>
-#include "libdisk.h"
-
-void
-Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)
-{
- disk->bios_cyl = cyl;
- disk->bios_hd = hd;
- disk->bios_sect = sect;
- Bios_Limit_Chunk(disk->chunks,1024*hd*sect);
-}
-
-void
-Sanitize_Bios_Geom(struct disk *disk)
-{
- int sane = 1;
-
- if (disk->bios_cyl > 1024)
- sane = 0;
- if (disk->bios_hd > 16)
- sane = 0;
- if (disk->bios_sect > 63)
- sane = 0;
- if (disk->bios_cyl*disk->bios_hd*disk->bios_sect !=
- disk->chunks->size)
- sane = 0;
- if (sane)
- return;
-
- /* First try something that IDE can handle */
- disk->bios_sect = 63;
- disk->bios_hd = 16;
- disk->bios_cyl = disk->chunks->size/(disk->bios_sect*disk->bios_hd);
-
- if (disk->bios_cyl < 1024)
- return;
-
- /* Hmm, try harder... */
- disk->bios_hd = 255;
- disk->bios_cyl = disk->chunks->size/(disk->bios_sect*disk->bios_hd);
-
- return;
-}
-
-void
-All_FreeBSD(struct disk *d, int force_all)
-{
- struct chunk *c;
-
- again:
- for (c=d->chunks->part;c;c=c->next)
- if (c->type != unused) {
- Delete_Chunk(d,c);
- goto again;
- }
- c=d->chunks;
- if (force_all) {
- Sanitize_Bios_Geom(d);
- Create_Chunk(d,c->offset,c->size,freebsd,0xa5,
- CHUNK_FORCE_ALL);
- } else {
- Create_Chunk(d,c->offset,c->size,freebsd,0xa5, 0);
- }
-}
diff --git a/lib/libdisk/chunk.c b/lib/libdisk/chunk.c
deleted file mode 100644
index 10cc356..0000000
--- a/lib/libdisk/chunk.c
+++ /dev/null
@@ -1,434 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id: chunk.c,v 1.18 1997/02/22 15:06:30 peter Exp $
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/types.h>
-#include <err.h>
-#include "libdisk.h"
-
-#define new_chunk() memset(malloc(sizeof(struct chunk)), 0, sizeof(struct chunk))
-
-/* Is c2 completely inside c1 ? */
-
-static int
-Chunk_Inside(struct chunk *c1, struct chunk *c2)
-{
- /* if c1 ends before c2 do */
- if (c1->end < c2->end)
- return 0;
- /* if c1 starts after c2 do */
- if (c1->offset > c2->offset)
- return 0;
- return 1;
-}
-
-struct chunk *
-Find_Mother_Chunk(struct chunk *chunks, u_long offset, u_long end, chunk_e type)
-{
- struct chunk *c1,*c2,ct;
- ct.offset = offset;
- ct.end = end;
- switch (type) {
- case whole:
- if (Chunk_Inside(chunks,&ct))
- return chunks;
- case extended:
- for(c1=chunks->part;c1;c1=c1->next) {
- if (c1->type != type)
- continue;
- if (Chunk_Inside(c1,&ct))
- return c1;
- }
- return 0;
- case freebsd:
- for(c1=chunks->part;c1;c1=c1->next) {
- if (c1->type == type)
- if (Chunk_Inside(c1,&ct))
- return c1;
- if (c1->type != extended)
- continue;
- for(c2=c1->part;c2;c2=c2->next)
- if (c2->type == type
- && Chunk_Inside(c2,&ct))
- return c2;
- }
- return 0;
- default:
- warn("Unsupported mother type in Find_Mother_Chunk");
- return 0;
- }
-}
-
-void
-Free_Chunk(struct chunk *c1)
-{
- if(!c1) return;
- if(c1->private_data && c1->private_free)
- (*c1->private_free)(c1->private_data);
- if(c1->part)
- Free_Chunk(c1->part);
- if(c1->next)
- Free_Chunk(c1->next);
- free(c1->name);
- free(c1);
-}
-
-struct chunk *
-Clone_Chunk(struct chunk *c1)
-{
- struct chunk *c2;
- if(!c1)
- return 0;
- c2 = new_chunk();
- if (!c2) err(1,"malloc failed");
- *c2 = *c1;
- if (c1->private_data && c1->private_clone)
- c2->private_data = c2->private_clone(c2->private_data);
- c2->name = strdup(c2->name);
- c2->next = Clone_Chunk(c2->next);
- c2->part = Clone_Chunk(c2->part);
- return c2;
-}
-
-int
-Insert_Chunk(struct chunk *c2, u_long offset, u_long size, const char *name,
- chunk_e type, int subtype, u_long flags)
-{
- struct chunk *ct,*cs;
-
- /* We will only insert into empty spaces */
- if (c2->type != unused)
- return __LINE__;
-
- ct = new_chunk();
- if (!ct) err(1,"malloc failed");
- memset(ct,0,sizeof *ct);
- ct->disk = c2->disk;
- ct->offset = offset;
- ct->size = size;
- ct->end = offset + size - 1;
- ct->type = type;
- ct->name = strdup(name);
- ct->subtype = subtype;
- ct->flags = flags;
-
- if (!Chunk_Inside(c2,ct)) {
- Free_Chunk(ct);
- return __LINE__;
- }
-
- if(type==freebsd || type==extended) {
- cs = new_chunk();
- if (!cs) err(1,"malloc failed");
- memset(cs,0,sizeof *cs);
- cs->disk = c2->disk;
- cs->offset = offset;
- cs->size = size;
- cs->end = offset + size - 1;
- cs->type = unused;
- cs->name = strdup("-");
- ct->part = cs;
- }
-
- /* Make a new chunk for any trailing unused space */
- if (c2->end > ct->end) {
- cs = new_chunk();
- if (!cs) err(1,"malloc failed");
- *cs = *c2;
- cs->disk = c2->disk;
- cs->offset = ct->end + 1;
- cs->size = c2->end - ct->end;
- if(c2->name)
- cs->name = strdup(c2->name);
- c2->next = cs;
- c2->size -= c2->end - ct->end;
- c2->end = ct->end;
- }
- /* If no leading unused space just occupy the old chunk */
- if (c2->offset == ct->offset) {
- c2->name = ct->name;
- c2->type = ct->type;
- c2->part = ct->part;
- c2->subtype = ct->subtype;
- c2->flags = ct->flags;
- ct->name = 0;
- ct->part = 0;
- Free_Chunk(ct);
- return 0;
- }
- /* else insert new chunk and adjust old one */
- c2->end = ct->offset - 1;
- c2->size -= ct->size;
- ct->next = c2->next;
- c2->next = ct;
- return 0;
-}
-
-int
-Add_Chunk(struct disk *d, long offset, u_long size, const char *name,
- chunk_e type, int subtype, u_long flags)
-{
- struct chunk *c1,*c2,ct;
- u_long end = offset + size - 1;
- ct.offset = offset;
- ct.end = end;
- ct.size = size;
-
- if (type == whole) {
- d->chunks = c1 = new_chunk();
- if (!c1) err(1,"malloc failed");
- memset(c1,0,sizeof *c1);
- c2 = c1->part = new_chunk();
- if (!c2) err(1,"malloc failed");
- memset(c2,0,sizeof *c2);
- c2->disk = c1->disk = d;
- c2->offset = c1->offset = offset;
- c2->size = c1->size = size;
- c2->end = c1->end = end;
- c1->name = strdup(name);
- c2->name = strdup("-");
- c1->type = type;
- c2->type = unused;
- c1->flags = flags;
- c1->subtype = subtype;
- return 0;
- }
- if (type == freebsd)
- subtype = 0xa5;
- c1 = 0;
- if(!c1 && (type == freebsd || type == fat || type == unknown))
- c1 = Find_Mother_Chunk(d->chunks,offset,end,extended);
- if(!c1 && (type == freebsd || type == fat || type == unknown))
- c1 = Find_Mother_Chunk(d->chunks,offset,end,whole);
- if(!c1 && type == extended)
- c1 = Find_Mother_Chunk(d->chunks,offset,end,whole);
- if(!c1 && type == part)
- c1 = Find_Mother_Chunk(d->chunks,offset,end,freebsd);
- if(!c1)
- return __LINE__;
- for(c2=c1->part;c2;c2=c2->next) {
- if (c2->type != unused)
- continue;
- if(Chunk_Inside(c2,&ct)) {
- if (type != freebsd)
- goto doit;
- if (!(flags & CHUNK_ALIGN))
- goto doit;
- if (offset == d->chunks->offset
- && end == d->chunks->end)
- goto doit;
-
- /* Round down to prev cylinder */
- offset = Prev_Cyl_Aligned(d,offset);
- /* Stay inside the parent */
- if (offset < c2->offset)
- offset = c2->offset;
- /* Round up to next cylinder */
- offset = Next_Cyl_Aligned(d,offset);
- /* Keep one track clear in front of parent */
- if (offset == c1->offset)
- offset = Next_Track_Aligned(d,offset+1);
-
- /* Work on the (end+1) */
- size += offset;
- /* Round up to cylinder */
- size = Next_Cyl_Aligned(d,size);
- /* Stay inside parent */
- if ((size-1) > c2->end)
- size = c2->end+1;
- /* Round down to cylinder */
- size = Prev_Cyl_Aligned(d,size);
-
- /* Convert back to size */
- size -= offset;
-
- doit:
- return Insert_Chunk(c2,offset,size,name,
- type,subtype,flags);
- }
- }
- return __LINE__;
-}
-
-char *
-ShowChunkFlags(struct chunk *c)
-{
- static char ret[10];
-
- int i=0;
- if (c->flags & CHUNK_BSD_COMPAT) ret[i++] = 'C';
- if (c->flags & CHUNK_ACTIVE) ret[i++] = 'A';
- if (c->flags & CHUNK_ALIGN) ret[i++] = '=';
- if (c->flags & CHUNK_PAST_1024) ret[i++] = '>';
- if (c->flags & CHUNK_IS_ROOT) ret[i++] = 'R';
- if (c->flags & CHUNK_BAD144) ret[i++] = 'B';
- ret[i++] = '\0';
- return ret;
-}
-
-void
-Print_Chunk(struct chunk *c1,int offset)
-{
- int i;
- if(!c1) return;
- for(i=0;i<offset-2;i++) putchar(' ');
- for(;i<offset;i++) putchar('-');
- putchar('>');
- for(;i<10;i++) putchar(' ');
- printf("%p %8ld %8lu %8lu %-8s %-8s 0x%02x %s",
- c1, c1->offset, c1->size, c1->end, c1->name,
- chunk_n[c1->type],c1->subtype,
- ShowChunkFlags(c1));
- putchar('\n');
- Print_Chunk(c1->part,offset + 2);
- Print_Chunk(c1->next,offset);
-}
-
-void
-Debug_Chunk(struct chunk *c1)
-{
- Print_Chunk(c1,2);
-}
-
-void
-Bios_Limit_Chunk(struct chunk *c1, u_long limit)
-{
- if (c1->part)
- Bios_Limit_Chunk(c1->part,limit);
- if (c1->next)
- Bios_Limit_Chunk(c1->next,limit);
- if (c1->end >= limit) {
- c1->flags |= CHUNK_PAST_1024;
- } else {
- c1->flags &= ~CHUNK_PAST_1024;
- }
-}
-
-int
-Delete_Chunk(struct disk *d, struct chunk *c)
-{
- struct chunk *c1=0,*c2,*c3;
- chunk_e type = c->type;
-
- if(type == whole)
- return 1;
- if(!c1 && (type == freebsd || type == fat || type == unknown))
- c1 = Find_Mother_Chunk(d->chunks,c->offset,c->end,extended);
- if(!c1 && (type == freebsd || type == fat || type == unknown))
- c1 = Find_Mother_Chunk(d->chunks,c->offset,c->end,whole);
- if(!c1 && type == extended)
- c1 = Find_Mother_Chunk(d->chunks,c->offset,c->end,whole);
- if(!c1 && type == part)
- c1 = Find_Mother_Chunk(d->chunks,c->offset,c->end,freebsd);
- if(!c1)
- return 1;
- for(c2=c1->part;c2;c2=c2->next) {
- if (c2 == c) {
- c2->type = unused;
- c2->subtype = 0;
- c2->flags = 0;
- free(c2->name);
- c2->name = strdup("-");
- Free_Chunk(c2->part);
- c2->part =0;
- goto scan;
- }
- }
- return 1;
- scan:
- for(c2=c1->part;c2;c2=c2->next) {
- if (c2->type != unused)
- continue;
- if (!c2->next)
- continue;
- if (c2->next->type != unused)
- continue;
- c3 = c2->next;
- c2->size += c3->size;
- c2->end = c3->end;
- c2->next = c3->next;
- c3->next = 0;
- Free_Chunk(c3);
- goto scan;
- }
- Fixup_Names(d);
- return 0;
-}
-
-#if 0
-int
-Collapse_Chunk(struct disk *d, struct chunk *c1)
-{
- struct chunk *c2, *c3;
-
- if(c1->next && Collapse_Chunk(d,c1->next))
- return 1;
-
- if(c1->type == unused && c1->next && c1->next->type == unused) {
- c3 = c1->next;
- c1->size += c3->size;
- c1->end = c3->end;
- c1->next = c3->next;
- c3->next = 0;
- Free_Chunk(c3);
- return 1;
- }
- c3 = c1->part;
- if(!c3)
- return 0;
- if (Collapse_Chunk(d,c1->part))
- return 1;
-
- if (c1->type == whole)
- return 0;
-
- if(c3->type == unused && c3->size == c1->size) {
- Delete_Chunk(d,c1);
- return 1;
- }
- if(c3->type == unused) {
- c2 = new_chunk();
- if (!c2) err(1,"malloc failed");
- *c2 = *c1;
- c1->next = c2;
- c1->disk = d;
- c1->name = strdup("-");
- c1->part = 0;
- c1->type = unused;
- c1->flags = 0;
- c1->subtype = 0;
- c1->size = c3->size;
- c1->end = c3->end;
- c2->offset += c1->size;
- c2->size -= c1->size;
- c2->part = c3->next;
- c3->next = 0;
- Free_Chunk(c3);
- return 1;
- }
- for(c2=c3;c2->next;c2 = c2->next)
- c3 = c2;
- if (c2 && c2->type == unused) {
- c3->next = 0;
- c2->next = c1->next;
- c1->next = c2;
- c1->size -= c2->size;
- c1->end -= c2->size;
- return 1;
- }
-
- return 0;
-}
-#endif
diff --git a/lib/libdisk/create_chunk.c b/lib/libdisk/create_chunk.c
deleted file mode 100644
index 83fa345..0000000
--- a/lib/libdisk/create_chunk.c
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/disklabel.h>
-#include <sys/diskslice.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <err.h>
-#include "libdisk.h"
-
-/* Clone these two from sysinstall because we need our own copies
- * due to link order problems with `crunch'. Feh!
- */
-static int
-isDebug()
-{
- static int debug = 0; /* Allow debugger to tweak it */
-
- return debug;
-}
-
-/* Write something to the debugging port */
-static void
-msgDebug(char *fmt, ...)
-{
- va_list args;
- char *dbg;
- static int DebugFD = -1;
-
- if (DebugFD == -1)
- DebugFD = open("/dev/ttyv1", O_RDWR);
- dbg = (char *)alloca(FILENAME_MAX);
- strcpy(dbg, "DEBUG: ");
- va_start(args, fmt);
- vsnprintf((char *)(dbg + strlen(dbg)), FILENAME_MAX, fmt, args);
- va_end(args);
- write(DebugFD, dbg, strlen(dbg));
-}
-
-void
-Fixup_FreeBSD_Names(struct disk *d, struct chunk *c)
-{
- struct chunk *c1, *c3;
- int j;
-
- if (!strcmp(c->name, "X")) return;
-
- /* reset all names to "X" */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- c1->oname = c1->name;
- c1->name = malloc(12);
- if(!c1->name) err(1,"Malloc failed");
- strcpy(c1->name,"X");
- }
-
- /* Allocate the first swap-partition we find */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- if (c1->type == unused) continue;
- if (c1->subtype != FS_SWAP) continue;
- sprintf(c1->name,"%s%c",c->name,SWAP_PART+'a');
- break;
- }
-
- /* Allocate the first root-partition we find */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- if (c1->type == unused) continue;
- if (!(c1->flags & CHUNK_IS_ROOT)) continue;
- sprintf(c1->name,"%s%c",c->name,0+'a');
- break;
- }
-
- /* Try to give them the same as they had before */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- if (strcmp(c1->name,"X")) continue;
- for(c3 = c->part; c3 ; c3 = c3->next)
- if (c1 != c3 && !strcmp(c3->name, c1->oname)) {
- goto newname;
- }
- strcpy(c1->name,c1->oname);
- newname:
- }
-
-
- /* Allocate the rest sequentially */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- const char order[] = "efghabd";
- if (c1->type == unused) continue;
- if (strcmp("X",c1->name)) continue;
-
- for(j=0;j<strlen(order);j++) {
- sprintf(c1->name,"%s%c",c->name,order[j]);
- for(c3 = c->part; c3 ; c3 = c3->next)
- if (c1 != c3 && !strcmp(c3->name, c1->name))
- goto match;
- break;
- match:
- strcpy(c1->name,"X");
- continue;
- }
- }
- for (c1 = c->part; c1 ; c1 = c1->next) {
- free(c1->oname);
- c1->oname = 0;
- }
-}
-
-void
-Fixup_Extended_Names(struct disk *d, struct chunk *c)
-{
- struct chunk *c1;
- int j=5;
-
- for (c1 = c->part; c1 ; c1 = c1->next) {
- if (c1->type == unused) continue;
- free(c1->name);
- c1->name = malloc(12);
- if(!c1->name) err(1,"malloc failed");
- sprintf(c1->name,"%ss%d",d->chunks->name,j++);
- if (c1->type == freebsd)
- Fixup_FreeBSD_Names(d,c1);
- }
-}
-
-void
-Fixup_Names(struct disk *d)
-{
- struct chunk *c1, *c2, *c3;
- int i,j;
-
- c1 = d->chunks;
- for(i=1,c2 = c1->part; c2 ; c2 = c2->next) {
- c2->flags &= ~CHUNK_BSD_COMPAT;
- if (c2->type == unused)
- continue;
- if (strcmp(c2->name,"X"))
- continue;
- c2->oname = malloc(12);
- if(!c2->oname) err(1,"malloc failed");
- for(j=1;j<=NDOSPART;j++) {
- sprintf(c2->oname,"%ss%d",c1->name,j);
- for(c3 = c1->part; c3 ; c3 = c3->next)
- if (c3 != c2 && !strcmp(c3->name, c2->oname))
- goto match;
- free(c2->name);
- c2->name = c2->oname;
- c2->oname = 0;
- break;
- match:
- continue;
- }
- if (c2->oname)
- free(c2->oname);
- }
- for(c2 = c1->part; c2 ; c2 = c2->next) {
- if (c2->type == freebsd) {
- c2->flags |= CHUNK_BSD_COMPAT;
- break;
- }
- }
- for(c2 = c1->part; c2 ; c2 = c2->next) {
- if (c2->type == freebsd)
- Fixup_FreeBSD_Names(d,c2);
- if (c2->type == extended)
- Fixup_Extended_Names(d,c2);
- }
-}
-
-int
-Create_Chunk(struct disk *d, u_long offset, u_long size, chunk_e type, int subtype, u_long flags)
-{
- int i;
- u_long l;
-
- if(!(flags & CHUNK_FORCE_ALL))
- {
- /* Never use the first track */
- if (!offset) {
- offset += d->bios_sect;
- size -= d->bios_sect;
- }
-
- /* Always end on cylinder boundary */
- l = (offset+size) % (d->bios_sect * d->bios_hd);
- size -= l;
- }
-
- i = Add_Chunk(d,offset,size,"X",type,subtype,flags);
- Fixup_Names(d);
- return i;
-}
-
-struct chunk *
-Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e type, int subtype, u_long flags)
-{
- int i;
- struct chunk *c1;
- u_long offset,edge;
-
- if (!parent)
- parent = d->chunks;
- for (c1=parent->part; c1 ; c1 = c1->next) {
- if (c1->type != unused) continue;
- if (c1->size < size) continue;
- offset = c1->offset;
- goto found;
- }
- return 0;
- found:
- if (parent->flags & CHUNK_BAD144) {
- edge = c1->end - d->bios_sect - 127;
- if (offset > edge)
- return 0;
- if (offset + size > edge)
- size = edge - offset + 1;
- }
- i = Add_Chunk(d,offset,size,"X",type,subtype,flags);
- if (i)
- return 0;
- Fixup_Names(d);
- for (c1=parent->part; c1 ; c1 = c1->next)
- if (c1->offset == offset)
- return c1;
- err(1,"Serious internal trouble");
-}
-
-int
-MakeDev(struct chunk *c1, const char *path)
-{
- char *p = c1->name;
- u_long cmaj, bmaj, min, unit, part, slice;
- char buf[BUFSIZ], buf2[BUFSIZ];
-
- *buf2 = '\0';
- if (isDebug())
- msgDebug("MakeDev: Called with %s on path %s\n", p, path);
- if (!strcmp(p, "X"))
- return 0;
-
- if (!strncmp(p, "wd", 2))
- bmaj = 0, cmaj = 3;
- else if (!strncmp(p, "sd", 2))
- bmaj = 4, cmaj = 13;
- else if (!strncmp(p, "od", 2))
- bmaj = 20, cmaj = 70;
- else {
- return 0;
- }
- p += 2;
- if (!isdigit(*p)) {
- msgDebug("MakeDev: Invalid disk unit passed: %s\n", p);
- return 0;
- }
- unit = *p - '0';
- p++;
- if (!*p) {
- slice = 1;
- part = 2;
- goto done;
- }
- else if (isdigit(*p)) {
- unit *= 10;
- unit += (*p - '0');
- p++;
- }
- if (*p != 's') {
- msgDebug("MakeDev: `%s' is not a valid slice delimiter\n", p);
- return 0;
- }
- p++;
- if (!isdigit(*p)) {
- msgDebug("MakeDev: `%s' is an invalid slice number\n", p);
- return 0;
- }
- slice = *p - '0';
- p++;
- if (isdigit(*p)) {
- slice *= 10;
- slice += (*p - '0');
- p++;
- }
- slice = slice + 1;
- if (!*p) {
- part = 2;
- if(c1->type == freebsd)
- sprintf(buf2, "%sc", c1->name);
- goto done;
- }
- if (*p < 'a' || *p > 'h') {
- msgDebug("MakeDev: `%s' is not a valid partition name.\n", p);
- return 0;
- }
- part = *p - 'a';
- done:
- if (isDebug())
- msgDebug("MakeDev: Unit %d, Slice %d, Part %d\n", unit, slice, part);
- if (unit > 32)
- return 0;
- if (slice > 32)
- return 0;
- min = unit * 8 + 65536 * slice + part;
- sprintf(buf, "%s/r%s", path, c1->name);
- unlink(buf);
- if (mknod(buf, S_IFCHR|0640, makedev(cmaj,min)) == -1) {
- msgDebug("mknod of %s returned failure status!\n", buf);
- return 0;
- }
- if (*buf2) {
- sprintf(buf, "%s/r%s", path, buf2);
- unlink(buf);
- if (mknod(buf, S_IFCHR|0640, makedev(cmaj,min)) == -1) {
- msgDebug("mknod of %s returned failure status!\n", buf);
- return 0;
- }
- }
- sprintf(buf, "%s/%s", path, c1->name);
- unlink(buf);
- if (mknod(buf, S_IFBLK|0640, makedev(bmaj,min)) == -1) {
- msgDebug("mknod of %s returned failure status!\n", buf);
- return 0;
- }
- return 1;
-}
-
-int
-MakeDevChunk(struct chunk *c1, const char *path)
-{
- int i;
-
- i = MakeDev(c1, path);
- if (c1->next)
- MakeDevChunk(c1->next, path);
- if (c1->part)
- MakeDevChunk(c1->part, path);
- return i;
-}
-
-int
-MakeDevDisk(struct disk *d, const char *path)
-{
- return MakeDevChunk(d->chunks, path);
-}
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c
deleted file mode 100644
index 583073d..0000000
--- a/lib/libdisk/disk.c
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <err.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <sys/diskslice.h>
-#include "libdisk.h"
-
-#define DOSPTYP_EXTENDED 5
-#define DOSPTYP_ONTRACK 84
-
-const char *chunk_n[] = {
- "whole",
- "unknown",
- "fat",
- "freebsd",
- "extended",
- "part",
- "unused",
- NULL
-};
-
-struct disk *
-Open_Disk(const char *name)
-{
- return Int_Open_Disk(name,0);
-}
-
-struct disk *
-Int_Open_Disk(const char *name, u_long size)
-{
- int i,fd;
- struct diskslices ds;
- struct disklabel dl;
- char device[64];
- struct disk *d;
- struct dos_partition *dp;
- void *p;
- u_long offset = 0;
-
- strcpy(device,"/dev/r");
- strcat(device,name);
-
- d = (struct disk *)malloc(sizeof *d);
- if(!d) err(1,"malloc failed");
- memset(d,0,sizeof *d);
-
- fd = open(device,O_RDONLY);
- if (fd < 0) {
-#ifdef DEBUG
- warn("open(%s) failed",device);
-#endif
- return 0;
- }
-
- memset(&dl,0,sizeof dl);
- ioctl(fd,DIOCGDINFO,&dl);
- i = ioctl(fd,DIOCGSLICEINFO,&ds);
- if (i < 0) {
-#ifdef DEBUG
- warn("DIOCGSLICEINFO(%s) failed",device);
-#endif
- close(fd);
- return 0;
- }
-
-#ifdef DEBUG
- for(i=0;i<ds.dss_nslices;i++)
- if(ds.dss_slices[i].ds_openmask)
- printf(" open(%d)=0x%2x",
- i,ds.dss_slices[i].ds_openmask);
- printf("\n");
-#endif
-
- if (!size)
- size = ds.dss_slices[WHOLE_DISK_SLICE].ds_size;
-
- p = read_block(fd,0);
- dp = (struct dos_partition*)(p+DOSPARTOFF);
- for(i=0;i<NDOSPART;i++) {
- if (dp->dp_start >= size) continue;
- if (dp->dp_start+dp->dp_size >= size) continue;
- if (!dp->dp_size) continue;
-
- if (dp->dp_typ == DOSPTYP_ONTRACK) {
- d->flags |= DISK_ON_TRACK;
- offset = 63;
- }
-
- }
- free(p);
-
- d->bios_sect = dl.d_nsectors;
- d->bios_hd = dl.d_ntracks;
-
- d->name = strdup(name);
-
-
- if (dl.d_ntracks && dl.d_nsectors)
- d->bios_cyl = size/(dl.d_ntracks*dl.d_nsectors);
-
- if (Add_Chunk(d, -offset, size, name, whole, 0, 0))
-#ifdef DEBUG
- warn("Failed to add 'whole' chunk");
-#else
- {}
-#endif
-
- for(i=BASE_SLICE;i<ds.dss_nslices;i++) {
- char sname[20];
- chunk_e ce;
- u_long flags=0;
- int subtype=0;
- if (! ds.dss_slices[i].ds_size)
- continue;
- ds.dss_slices[i].ds_offset -= offset;
- sprintf(sname,"%ss%d",name,i-1);
- subtype = ds.dss_slices[i].ds_type;
- switch (ds.dss_slices[i].ds_type) {
- case 0xa5:
- ce = freebsd;
- break;
- case 0x1:
- case 0x6:
- case 0x4:
- ce = fat;
- break;
- case DOSPTYP_EXTENDED:
- ce = extended;
- break;
- default:
- ce = unknown;
- break;
- }
- if (Add_Chunk(d, ds.dss_slices[i].ds_offset,
- ds.dss_slices[i].ds_size, sname, ce, subtype, flags))
-#ifdef DEBUG
- warn("failed to add chunk for slice %d", i - 1);
-#else
- {}
-#endif
-
- if (ds.dss_slices[i].ds_type != 0xa5)
- continue;
- {
- struct disklabel dl;
- char pname[20];
- int j,k;
-
- strcpy(pname,"/dev/r");
- strcat(pname,sname);
- j = open(pname,O_RDONLY);
- if (j < 0) {
-#ifdef DEBUG
- warn("open(%s)",pname);
-#endif
- continue;
- }
- k = ioctl(j,DIOCGDINFO,&dl);
- if (k < 0) {
-#ifdef DEBUG
- warn("ioctl(%s,DIOCGDINFO)",pname);
-#endif
- close(j);
- continue;
- }
- close(j);
-
- for(j=0; j <= dl.d_npartitions; j++) {
- if (j == RAW_PART)
- continue;
- if (j == 3)
- continue;
- if (j == dl.d_npartitions) {
- j = 3;
- dl.d_npartitions=0;
- }
- if (!dl.d_partitions[j].p_size)
- continue;
- if (dl.d_partitions[j].p_size +
- dl.d_partitions[j].p_offset >
- ds.dss_slices[i].ds_size)
- continue;
- sprintf(pname,"%s%c",sname,j+'a');
- if (Add_Chunk(d,
- dl.d_partitions[j].p_offset +
- ds.dss_slices[i].ds_offset,
- dl.d_partitions[j].p_size,
- pname,part,
- dl.d_partitions[j].p_fstype,
- 0) && j != 3)
-#ifdef DEBUG
- warn(
- "Failed to add chunk for partition %c [%lu,%lu]",
- j + 'a',dl.d_partitions[j].p_offset,
- dl.d_partitions[j].p_size);
-#else
- {}
-#endif
- }
- }
- }
- close(fd);
- Fixup_Names(d);
- Bios_Limit_Chunk(d->chunks,1024*d->bios_hd*d->bios_sect);
- return d;
-}
-
-void
-Debug_Disk(struct disk *d)
-{
- printf("Debug_Disk(%s)",d->name);
- printf(" flags=%lx",d->flags);
-#if 0
- printf(" real_geom=%lu/%lu/%lu",d->real_cyl,d->real_hd,d->real_sect);
-#endif
- printf(" bios_geom=%lu/%lu/%lu = %lu\n",
- d->bios_cyl,d->bios_hd,d->bios_sect,
- d->bios_cyl*d->bios_hd*d->bios_sect);
- printf(" boot1=%p, boot2=%p, bootmgr=%p\n",
- d->boot1,d->boot2,d->bootmgr);
- Debug_Chunk(d->chunks);
-}
-
-void
-Free_Disk(struct disk *d)
-{
- if(d->chunks) Free_Chunk(d->chunks);
- if(d->name) free(d->name);
- if(d->bootmgr) free(d->bootmgr);
- if(d->boot1) free(d->boot1);
- if(d->boot2) free(d->boot2);
- free(d);
-}
-
-struct disk *
-Clone_Disk(struct disk *d)
-{
- struct disk *d2;
-
- d2 = (struct disk*) malloc(sizeof *d2);
- if(!d2) err(1,"malloc failed");
- *d2 = *d;
- d2->name = strdup(d2->name);
- d2->chunks = Clone_Chunk(d2->chunks);
- if(d2->bootmgr) {
- d2->bootmgr = malloc(DOSPARTOFF);
- memcpy(d2->bootmgr,d->bootmgr,DOSPARTOFF);
- }
- if(d2->boot1) {
- d2->boot1 = malloc(512);
- memcpy(d2->boot1,d->boot1,512);
- }
- if(d2->boot2) {
- d2->boot2 = malloc(512*15);
- memcpy(d2->boot2,d->boot2,512*15);
- }
- return d2;
-}
-
-#if 0
-void
-Collapse_Disk(struct disk *d)
-{
-
- while(Collapse_Chunk(d,d->chunks))
- ;
-}
-#endif
-
-static char * device_list[] = {"wd","sd","od",0};
-
-char **
-Disk_Names()
-{
- int i,j,k;
- char disk[25];
- char diskname[25];
- struct stat st;
- struct diskslices ds;
- int fd;
- static char **disks;
-
- disks = malloc(sizeof *disks * (1 + MAX_NO_DISKS));
- memset(disks,0,sizeof *disks * (1 + MAX_NO_DISKS));
- k = 0;
- for (j = 0; device_list[j]; j++) {
- for (i = 0; i < 10; i++) {
- sprintf(diskname, "%s%d", device_list[j], i);
- sprintf(disk, "/dev/r%s", diskname);
- if (stat(disk, &st) || !(st.st_mode & S_IFCHR))
- continue;
- if ((fd = open(disk, O_RDWR)) == -1)
- continue;
- if (ioctl(fd, DIOCGSLICEINFO, &ds) == -1) {
- close(fd);
- continue;
- }
- disks[k++] = strdup(diskname);
- if(k == MAX_NO_DISKS)
- return disks;
- }
- }
- return disks;
-}
-
-void
-Set_Boot_Mgr(struct disk *d, const u_char *b)
-{
- if (d->bootmgr)
- free(d->bootmgr);
- if (!b) {
- d->bootmgr = 0;
- } else {
- d->bootmgr = malloc(DOSPARTOFF);
- if(!d->bootmgr) err(1,"malloc failed");
- memcpy(d->bootmgr,b,DOSPARTOFF);
- }
-}
-
-void
-Set_Boot_Blocks(struct disk *d, const u_char *b1, const u_char *b2)
-{
- if (d->boot1) free(d->boot1);
- d->boot1 = malloc(512);
- if(!d->boot1) err(1,"malloc failed");
- memcpy(d->boot1,b1,512);
- if (d->boot2) free(d->boot2);
- d->boot2 = malloc(15*512);
- if(!d->boot2) err(1,"malloc failed");
- memcpy(d->boot2,b2,15*512);
-}
-
-const char *
-slice_type_name( int type, int subtype )
-{
- switch (type) {
- case 0: return "whole";
- case 1: switch (subtype) {
- case 1: return "fat (12-bit)";
- case 2: return "XENIX /";
- case 3: return "XENIX /usr";
- case 4: return "fat (16-bit)";
- case 5: return "extended DOS";
- case 6: return "fat (>32Mb)";
- case 7: return "NTFS/HPFS";
- case 10: return "OS/2 bootmgr";
- case 84: return "OnTrack diskmgr";
- case 100: return "Netware 2.x";
- case 101: return "Netware 3.x";
- case 128: return "Minix 1.1";
- case 129: return "Minix 1.5";
- case 130: return "linux_swap";
- case 131: return "ext2fs";
- case 183: return "bsd/os";
- case 184: return "bsd/os swap";
- default: return "unknown";
- }
- case 2: return "fat";
- case 3: switch (subtype) {
- case 165: return "freebsd";
- default: return "unknown";
- }
- case 4: return "extended";
- case 5: return "part";
- case 6: return "unused";
- default: return "unknown";
- }
-}
diff --git a/lib/libdisk/disklabel.c b/lib/libdisk/disklabel.c
deleted file mode 100644
index 9714e6c..0000000
--- a/lib/libdisk/disklabel.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <err.h>
-#include <sys/disklabel.h>
-#include "libdisk.h"
-
-struct disklabel *
-read_disklabel(int fd, daddr_t block)
-{
- struct disklabel *dp;
-
- dp = (struct disklabel *) read_block(fd,block);
- if (dp->d_magic != DISKMAGIC)
- return 0;
- if (dp->d_magic2 != DISKMAGIC)
- return 0;
- if (dkcksum(dp) != 0)
- return 0;
- return dp;
-}
diff --git a/lib/libdisk/libdisk.3 b/lib/libdisk/libdisk.3
deleted file mode 100644
index 1cc9388..0000000
--- a/lib/libdisk/libdisk.3
+++ /dev/null
@@ -1,339 +0,0 @@
-.\"
-.\" Copyright (c) 1996 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" This program is free software.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id$
-.\" "
-.Dd March 15, 1996
-.Dt LIBDISK 3
-.Os
-.Sh NAME
-.Nm Open_Disk ,
-.Nm Clone_Disk ,
-.Nm Free_Disk ,
-.Nm Debug_Disk ,
-.Nm Set_Bios_Geom ,
-.Nm Delete_Chunk ,
-.Nm Collapse_Disk ,
-.Nm Collapse_Chunk ,
-.Nm Create_Chunk ,
-.Nm All_FreeBSD ,
-.Nm CheckRules ,
-.Nm Disk_Names ,
-.Nm Set_Boot_Mgr ,
-.Nm Set_Boot_Blocks ,
-.Nm Write_Disk ,
-.Nm Cyl_Aligned ,
-.Nm Next_Cyl_Aligned ,
-.Nm Prev_Cyl_Aligned ,
-.Nm Track_Aligned ,
-.Nm Next_Track_Aligned ,
-.Nm Prev_Track_Aligned ,
-.Nm Create_Chunk_DWIM ,
-.Nm MakeDev ,
-.Nm MakeDevDisk ,
-.Nm ShowChunkFlags ,
-.Nm ChunkCanBeRoot ,
-.Nm chunk_n ,
-.Nm slice_type_name
-.Nd library interface to slice and partition labels
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <libdisk.h>
-.Dv extern const u_char *boot1, boot2;
-.\" What is the correct way to cause a single line break ???
-.Bd -literal
-.Dv extern const char *chunk_n[];
-.Ed
-.Ft const char *
-.Fn slice_type_name "int type" "int subtype"
-.Ft struct disk *
-.Fn Open_Disk "const char *devname"
-.Ft struct disk *
-.Fn Clone_Disk "struct disk *disk"
-.Ft void
-.Fn Free_Disk "struct disk *disk"
-.Ft void
-.Fn Debug_Disk "struct disk *disk"
-.Ft void
-.Fn Set_Bios_Geom "struct disk *disk" "u_long cyl" "u_long heads" "u_long sects"
-.Ft int
-.Fn Delete_Chunk "struct disk *disk" "struct chunk *"
-.Ft void
-.Fn Collapse_Disk "struct disk *disk"
-.Ft int
-.Fn Collapse_Chunk "struct disk *disk" "struct chunk *chunk"
-.Ft int
-.Fn Create_Chunk "struct disk *disk" "u_long offset" "u_long size" "chunk_e type" "int subtype" "u_long flags"
-.Ft void
-.Fn All_FreeBSD "struct disk *d" "int force_all"
-.Ft char *
-.Fn CheckRules "struct disk *"
-.Ft char **
-.Fn Disk_Names "void"
-.Ft void
-.Fn Set_Boot_Mgr "struct disk *d" "const u_char *bootmgr"
-.Ft void
-.Fn Set_Boot_Blocks "struct disk *d" "const u_char *boot1" "const u_char *boot2"
-.Ft int
-.Fn Write_Disk "struct disk *d"
-.Ft int
-.Fn Cyl_Aligned "struct disk *d" "u_long offset"
-.Ft u_long
-.Fn Next_Cyl_Aligned "struct disk *d" "u_long offset"
-.Ft u_long
-.Fn Prev_Cyl_Aligned "struct disk *d" "u_long offset"
-.Ft int
-.Fn Track_Aligned "struct disk *d" "u_long offset"
-.Ft u_long
-.Fn Next_Track_Aligned "struct disk *d" "u_long offset"
-.Ft u_long
-.Fn Prev_Track_Aligned "struct disk *d" "u_long offset"
-.Ft struct chunk *
-.Fn Create_Chunk_DWIM "struct disk *d" "struct chunk *parent" "u_long size" "chunk_e type" "int subtype" "u_long flags"
-.Ft int
-.Fn MakeDev "struct chunk *c" "const char *path"
-.Ft int
-.Fn MakeDevDisk "struct disk *d" "const char *path"
-.Ft char *
-.Fn ShowChunkFlags "struct chunk *c"
-.Ft char *
-.Fn ChunkCanBeRoot "struct chunk *c"
-.Sh DESCRIPTION
-.Nm Libdisk
-provides an interface to the low-level disk slice and partition labels.
-Most functions operate with arguments of the types
-.Ql struct disk ,
-or
-.Ql struct chunk .
-.Pp
-While both types are mostly opaque to the programmer, the internal
-structure is mentioned below for the sake of completeness.
-.Bd -literal -offset indent
-struct disk {
- char *name;
- u_long flags;
- u_long bios_cyl;
- u_long bios_hd;
- u_long bios_sect;
- u_char *bootmgr;
- u_char *boot1;
- u_char *boot2;
- struct chunk *chunks;
-};
-.Ed
-The only flag value by now is
-.Ql DISK_ON_TRACK ,
-meaning that this disk is handled by the On-Track Disk Manager.
-.Pp
-.Bd -literal -offset indent
-struct chunk {
- struct chunk *next;
- struct chunk *part;
- struct disk *disk;
- long offset;
- u_long size;
- u_long end;
- char *name;
- char *oname;
- chunk_e type;
- int subtype;
- u_long flags;
- void (*private_free)(void*);
- void *(*private_clone)(void*);
- void *private_data;
-};
-.Ed
-The
-.Ql type
-field can be one of the following values:
-.Ql whole, unknown, fat, freebsd, extended, part, unused .
-.Pp
-These are the valid
-.Ql flag
-values for a
-.Ql struct chunk .
-.Bl -tag -offset indent -width CHUNK_BSD_COMPATXX
-.It CHUNK_PAST_1024
-This chunk cannot be booted from because it extends past cylinder 1024.
-.It CHUNK_BSD_COMPAT
-This chunk is in the BSD-compatibility, and has a short name too, i.e.
-.Ql wd0s4f -> wd0f .
-.It CHUNK_BAD144
-This chunk has bad144 mapping.
-.It CHUNK_ALIGN
-This chunk should be aligned.
-.It CHUNK_IS_ROOT
-This
-.Ql part
-is a rootfs, allocate partition
-.Sq a .
-.It CHUNK_ACTIVE
-This is the active slice in the MBR.
-.It CHUNK_FORCE_ALL
-Force a dedicated disk for FreeBSD, bypassing all BIOS geometry
-considerations.
-.El
-.Pp
-The
-.Ql private_data ,
-.Ql private_free ,
-and
-.Ql private_clone
-fields are for data private to the application, and the management
-thereof. If the functions are not provided, no storage management is
-done, cloning will just copy the pointer and freeing will just forget
-it.
-.Pp
-.Fn Open_Disk
-will open the named disk, and return populated tree.
-.Pp
-.Fn Clone_Disk
-clones a copy of a tree. Useful for
-.Dq Undo
-functionality.
-.Pp
-.Fn Free_Disk
-frees a tree made with
-.Fn Open_Disk
-or
-.Fn Clone_Disk .
-.Pp
-.Fn Debug_Disk
-prints the content of the tree to stdout.
-.Pp
-.Fn Set_Bios_Geom
-sets the geometry the bios uses.
-.Pp
-.Fn Delete_Chunk
-frees a chunk of disk_space.
-.Pp
-.Fn Collapse_Disk,
-and
-.Fn Collapse_Chunk
-are experimental, do not use.
-.Pp
-.Fn Create_Chunk
-creates a chunk with the specified paramters.
-.Pp
-.Fn All_FreeBSD
-makes one FreeBSD chunk covering the entire disk; if
-.Ql force_all
-is set, bypass all BIOS geometry considerations.
-.Pp
-.Fn CheckRules
-returns
-.Ql char*
-to warnings about broken design rules in this disklayout.
-.Pp
-.Fn Disk_Names
-returns
-.Ql char**
-with all disk's names (wd0, wd1 ...). You must free each pointer, as
-well as the array by hand.
-.Pp
-.Fn Set_Boot_Mgr
-sets this boot-manager for use on this disk. Gets written when
-.Fn Write_Disk
-is called.
-.Pp
-.Fn Set_Boot_Blocks
-sets the boot-blocks for use on this disk. Gets written when
-.Fn Write_Disk
-is called. The external variables
-.Dv boot1
-and
-.Dv boot2
-contain suitable data to be passed to this function.
-.Pp
-.Fn Write_Disk
-writes all the MBRs, disklabels, bootblocks and boot managers.
-.Pp
-.Fn Cyl_Aligned
-checks if
-.Ql offset
-is aligned on a cylinder according to the BIOS.
-geometry.
-.Pp
-.Fn Next_Cyl_Aligned
-rounds
-.Ql offset
-up to next cylinder according to the BIOS geometry.
-.Pp
-.Fn Prev_Cyl_Aligned
-rounds
-.Ql offset
-down to previous cylinder according to the BIOS geometry.
-.Pp
-.Fn Track_Aligned
-checks if
-.Ql offset
-is aligned on a track according to the BIOS geometry.
-.Pp
-.Fn Next_Track_Aligned
-rounds
-.Ql offset
-up to next track according to the BIOS geometry.
-.Pp
-.Fn Prev_Track_Aligned
-checks if
-.Ql offset
-is aligned on a track according to the BIOS geometry.
-.Pp
-.Fn Create_Chunk_DWIM
-creates a partition inside the given parent of the given size, and
-returns a pointer to it. The first unused chunk big enough is used.
-.Pp
-.Fn MakeDev
-makes the device nodes for this chunk.
-.Pp
-.Fn MakeDevDisk
-makes the device nodes for all chunks on this disk.
-.Pp
-.Fn ShowChunkFlags
-returns a string to show flags.
-.Pp
-.Fn ChunkCanBeRoot
-returns NULL if chunk can be
-.Pp
-Chunk name strings can be accessed directly using the external array
-.Va chunk_n .
-.Pp
-.Fn slice_type_name
-returns the name strings associated with the specified
-.Ql type .
-.Ql subtype .
-If
-.Fn slice_type_name
-returns "unknown" for slices it isn't familar with.
-.Ql / .
-.Sh AUTHOR
-.Nm Libdisk
-has been written by Poul-Henning Kamp.
-.Pp
-This man page by
-.ie t J\(:org Wunsch.
-.el Joerg Wunsch.
diff --git a/lib/libdisk/libdisk.h b/lib/libdisk/libdisk.h
deleted file mode 100644
index b8c724e..0000000
--- a/lib/libdisk/libdisk.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
-* ----------------------------------------------------------------------------
-* "THE BEER-WARE LICENSE" (Revision 42):
-* <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
-* can do whatever you want with this stuff. If we meet some day, and you think
-* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
-* ----------------------------------------------------------------------------
-*
-* $Id: libdisk.h,v 1.26 1997/02/22 15:06:35 peter Exp $
-*
-*/
-
-#define MAX_NO_DISKS 20
-/* Max # of disks Disk_Names() will return */
-
-typedef enum {
- whole,
- unknown,
- fat,
- freebsd,
- extended,
- part,
- unused
-} chunk_e;
-
-__BEGIN_DECLS
-struct disk {
- char *name;
- u_long flags;
-# define DISK_ON_TRACK 1
- u_long bios_cyl;
- u_long bios_hd;
- u_long bios_sect;
- u_char *bootmgr;
- u_char *boot1;
- u_char *boot2;
- struct chunk *chunks;
-};
-
-struct chunk {
- struct chunk *next;
- struct chunk *part;
- struct disk *disk;
- long offset;
- u_long size;
- u_long end;
- char *name;
- char *oname;
- /* Used during Fixup_Names() to avoid renaming more than
- * absolutely needed.
- */
- chunk_e type;
- int subtype;
- u_long flags;
-# define CHUNK_PAST_1024 1
- /* this chunk cannot be booted from because it
- * extends past cylinder 1024
- */
-# define CHUNK_BSD_COMPAT 2
- /* this chunk is in the BSD-compatibility, and has a
- * short name too, ie wd0s4f -> wd0f
- */
-# define CHUNK_BAD144 4
- /* this chunk has bad144 mapping */
-# define CHUNK_ALIGN 8
- /* This chunk should be aligned */
-# define CHUNK_IS_ROOT 16
- /* This 'part' is a rootfs, allocate 'a' */
-# define CHUNK_ACTIVE 32
- /* This is the active slice in the MBR */
-# define CHUNK_FORCE_ALL 64
- /* Force a dedicated disk for FreeBSD, bypassing
- * all BIOS geometry considerations
- */
-
- void (*private_free)(void*);
- void *(*private_clone)(void*);
- void *private_data;
- /* For data private to the application, and the management
- * thereof. If the functions are not provided, no storage
- * management is done, Cloning will just copy the pointer
- * and freeing will just forget it.
- */
-};
-
-extern const char *chunk_n[];
-extern const u_char boot1[], boot2[];
-
-const char *
-slice_type_name( int type, int subtype );
-/* "chunk_n" for subtypes too
- */
-
-struct disk *
-Open_Disk(const char *devname);
-/* Will open the named disk, and return populated tree.
- */
-
-struct disk *
-Clone_Disk(struct disk *disk);
-/* Clone a copy of a tree. Useful for "Undo" functionality
- */
-
-void
-Free_Disk(struct disk *disk);
-/* Free a tree made with Open_Disk() or Clone_Disk()
- */
-
-void
-Debug_Disk(struct disk *disk);
-/* Print the content of the tree to stdout
- */
-
-void
-Set_Bios_Geom(struct disk *disk, u_long cyl, u_long heads, u_long sects);
-/* Set the geometry the bios uses.
- */
-
-void
-Sanitize_Bios_Geom(struct disk *disk);
-/* Set the bios geometry to something sane
- */
-
-int
-Delete_Chunk(struct disk *disk, struct chunk *);
-/* Free a chunk of disk_space
- */
-
-void
-Collapse_Disk(struct disk *disk);
-/* Experimental, do not use.
- */
-int
-Collapse_Chunk(struct disk *disk, struct chunk *chunk);
-/* Experimental, do not use.
- */
-
-int
-Create_Chunk(struct disk *disk, u_long offset, u_long size, chunk_e type,
- int subtype, u_long flags);
-/* Create a chunk with the specified paramters
- */
-
-void
-All_FreeBSD(struct disk *d, int force_all);
-/* Make one FreeBSD chunk covering the entire disk;
- * if force_all is set, bypass all BIOS geometry
- * considerations.
- */
-
-char *
-CheckRules(struct disk *);
-/* Return char* to warnings about broken design rules in this disklayout
- */
-
-char **
-Disk_Names();
-/* Return char** with all disk's names (wd0, wd1 ...). You must free
- * each pointer, as well as the array by hand
- */
-
-void
-Set_Boot_Mgr(struct disk *d, const u_char *bootmgr);
-/* Use this boot-manager on this disk. Gets written when Write_Disk()
- * is called
- */
-
-void
-Set_Boot_Blocks(struct disk *d, const u_char *boot1, const u_char *boot2);
-/* Use these boot-blocks on this disk. Gets written when Write_Disk()
- * is called
- */
-
-int
-Write_Disk(struct disk *d);
-/* Write all the MBRs, disklabels, bootblocks and boot managers
- */
-
-int
-Cyl_Aligned(struct disk *d, u_long offset);
-/* Check if offset is aligned on a cylinder according to the
- * bios geometry
- */
-
-u_long
-Next_Cyl_Aligned(struct disk *d, u_long offset);
-/* Round offset up to next cylinder according to the bios-geometry
- */
-
-u_long
-Prev_Cyl_Aligned(struct disk *d, u_long offset);
-/* Round offset down to previous cylinder according to the bios-
- * geometry
- */
-
-int
-Track_Aligned(struct disk *d, u_long offset);
-/* Check if offset is aligned on a track according to the
- * bios geometry
- */
-
-u_long
-Next_Track_Aligned(struct disk *d, u_long offset);
-/* Round offset up to next track according to the bios-geometry
- */
-
-u_long
-Prev_Track_Aligned(struct disk *d, u_long offset);
-/* Check if offset is aligned on a track according to the
- * bios geometry
- */
-
-struct chunk *
-Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size,
- chunk_e type, int subtype, u_long flags);
-/* This one creates a partition inside the given parent of the given
- * size, and returns a pointer to it. The first unused chunk big
- * enough is used.
- */
-
-int
-MakeDev(struct chunk *c, const char *path);
-
-int
-MakeDevDisk(struct disk *d, const char *path);
-/* Make device nodes for all chunks on this disk */
-
-char *
-ShowChunkFlags(struct chunk *c);
-/* Return string to show flags. */
-
-char *
-ChunkCanBeRoot(struct chunk *c);
-/* Return NULL if chunk can be /, explanation otherwise */
-
-/*
- * Implementation details >>> DO NOT USE <<<
- */
-
-void Debug_Chunk(struct chunk *);
-void Free_Chunk(struct chunk *);
-struct chunk * Clone_Chunk(struct chunk *);
-int Add_Chunk(struct disk *, long, u_long, const char *, chunk_e, int, u_long);
-void Bios_Limit_Chunk(struct chunk *, u_long);
-void * read_block(int, daddr_t);
-void write_block(int fd, daddr_t block, void *foo);
-struct disklabel * read_disklabel(int, daddr_t);
-u_short dkcksum(struct disklabel *);
-struct chunk * Find_Mother_Chunk(struct chunk *, u_long, u_long, chunk_e);
-struct disk * Int_Open_Disk(const char *name, u_long size);
-void Fixup_Names(struct disk *);
-__END_DECLS
-
-#define dprintf printf
-
-/* TODO
- *
- * Need a error string mechanism from the functions instead of warn()
- *
- * Make sure only FreeBSD start at offset==0
- *
- * Collapse must align.
- *
- * Make Write_Disk(struct disk*)
- *
- * Consider booting from OnTrack'ed disks.
- *
- * Get Bios-geom, ST506 & OnTrack from driver (or otherwise)
- *
- * Make Create_DWIM().
- *
- * Make Is_Unchanged(struct disk *d1, struct chunk *c1)
- *
- * don't rename slices unless we have to
- *
- *Sample output from tst01:
- *
- * Debug_Disk(wd0) flags=0 bios_geom=0/0/0
- * >> 0x3d040 0 1411200 1411199 wd0 0 whole 0 0
- * >>>> 0x3d080 0 960120 960119 wd0s1 3 freebsd 0 8
- * >>>>>> 0x3d100 0 40960 40959 wd0s1a 5 part 0 0
- * >>>>>> 0x3d180 40960 131072 172031 wd0s1b 5 part 0 0
- * >>>>>> 0x3d1c0 172032 409600 581631 wd0s1e 5 part 0 0
- * >>>>>> 0x3d200 581632 378488 960119 wd0s1f 5 part 0 0
- * >>>> 0x3d140 960120 5670 965789 wd0s2 4 extended 0 8
- * >>>>>> 0x3d2c0 960120 63 960182 - 6 unused 0 0
- * >>>>>> 0x3d0c0 960183 5607 965789 wd0s5 2 fat 0 8
- * >>>> 0x3d280 965790 1890 967679 wd0s3 1 foo -2 8
- * >>>> 0x3d300 967680 443520 1411199 wd0s4 3 freebsd 0 8
- * >>>>>> 0x3d340 967680 443520 1411199 wd0s4a 5 part 0 0
- *
- * ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
- * level chunkptr start size end name type subtype flags
- *
- * Underlying data structure:
- *
- * Legend:
- * <struct chunk> --> part
- * |
- * v next
- *
- * <wd0> --> <wd0s1> --> <wd0s1a>
- * | |
- * | v
- * | <wd0s1b>
- * | |
- * | v
- * | <wd0s1e>
- * | |
- * | v
- * | <wd0s1f>
- * |
- * v
- * <wd0s2> --> <unused>
- * | |
- * | v
- * | <wd0s5>
- * |
- * v
- * <wd0s3>
- * |
- * v
- * <wd0s4> --> <wd0s4a>
- *
- *
- */
diff --git a/lib/libdisk/rules.c b/lib/libdisk/rules.c
deleted file mode 100644
index 5bf75ec..0000000
--- a/lib/libdisk/rules.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/diskslice.h>
-#include <sys/disklabel.h>
-#include <err.h>
-#include "libdisk.h"
-
-int
-Track_Aligned(struct disk *d, u_long offset)
-{
- if (!d->bios_sect)
- return 1;
- if (offset % d->bios_sect)
- return 0;
- return 1;
-}
-
-u_long
-Prev_Track_Aligned(struct disk *d, u_long offset)
-{
- if (!d->bios_sect)
- return offset;
- return (offset / d->bios_sect) * d->bios_sect;
-}
-
-u_long
-Next_Track_Aligned(struct disk *d, u_long offset)
-{
- if (!d->bios_sect)
- return offset;
- return Prev_Track_Aligned(d,offset + d->bios_sect-1);
-}
-
-int
-Cyl_Aligned(struct disk *d, u_long offset)
-{
- if (!d->bios_sect || !d->bios_hd)
- return 1;
- if (offset % (d->bios_sect * d->bios_hd))
- return 0;
- return 1;
-}
-
-u_long
-Prev_Cyl_Aligned(struct disk *d, u_long offset)
-{
- if (!d->bios_sect || !d->bios_hd)
- return offset;
- return (offset / (d->bios_sect*d->bios_hd)) * d->bios_sect * d->bios_hd;
-}
-
-u_long
-Next_Cyl_Aligned(struct disk *d, u_long offset)
-{
- if (!d->bios_sect || !d->bios_hd)
- return offset;
- return Prev_Cyl_Aligned(d,offset + (d->bios_sect * d->bios_hd)-1);
-}
-
-/*
- * Rule#0:
- * Chunks of type 'whole' can have max NDOSPART children.
- * Only one of them can have the "active" flag
- */
-void
-Rule_000(struct disk *d, struct chunk *c, char *msg)
-{
- int i=0,j=0;
- struct chunk *c1;
-
- if (c->type != whole)
- return;
- for (c1=c->part; c1; c1=c1->next) {
- if (c1->type != unused) continue;
- if (c1->flags & CHUNK_ACTIVE)
- j++;
- i++;
- }
- if (i > NDOSPART)
- sprintf(msg+strlen(msg),
- "%d is too many children of the 'whole' chunk. Max is %d\n",
- i, NDOSPART);
- if (j > 1)
- sprintf(msg+strlen(msg),
- "Too many active children of 'whole'");
-}
-
-/*
- * Rule#1:
- * All children of 'whole' and 'extended' must be track-aligned.
- * Exception: the end can be unaligned if it matches the end of 'whole'
- */
-void
-Rule_001(struct disk *d, struct chunk *c, char *msg)
-{
- int i;
- struct chunk *c1;
-
- if (c->type != whole && c->type != extended)
- return;
- for (i=0, c1=c->part; c1; c1=c1->next) {
- if (c1->type == unused) continue;
- c1->flags |= CHUNK_ALIGN;
- if (!Track_Aligned(d,c1->offset))
- sprintf(msg+strlen(msg),
- "chunk '%s' [%ld..%ld] does not start on a track boundary\n",
- c1->name,c1->offset,c1->end);
- if ((c->type == whole || c->end == c1->end)
- || Cyl_Aligned(d,c1->end+1))
- ;
- else
- sprintf(msg+strlen(msg),
- "chunk '%s' [%ld..%ld] does not end on a cylinder boundary\n",
- c1->name,c1->offset,c1->end);
- }
-}
-
-/*
- * Rule#2:
- * Max one 'fat' as child of 'whole'
- */
-void
-Rule_002(struct disk *d, struct chunk *c, char *msg)
-{
- int i;
- struct chunk *c1;
-
- if (c->type != whole)
- return;
- for (i=0, c1=c->part; c1; c1=c1->next) {
- if (c1->type != fat)
- continue;
- i++;
- }
- if (i > 1) {
- sprintf(msg+strlen(msg),
- "Max one 'fat' allowed as child of 'whole'\n");
- }
-}
-
-/*
- * Rule#3:
- * Max one extended as child of 'whole'
- */
-void
-Rule_003(struct disk *d, struct chunk *c, char *msg)
-{
- int i;
- struct chunk *c1;
-
- if (c->type != whole)
- return;
- for (i=0, c1=c->part; c1; c1=c1->next) {
- if (c1->type != extended)
- continue;
- i++;
- }
- if (i > 1) {
- sprintf(msg+strlen(msg),
- "Max one 'extended' allowed as child of 'whole'\n");
- }
-}
-
-/*
- * Rule#4:
- * Max seven 'part' as children of 'freebsd'
- * Max one CHUNK_IS_ROOT child per 'freebsd'
- * If Bad144, space for table must exist.
- * If Bad144 & root, bad144 table must be inside 1024
- */
-void
-Rule_004(struct disk *d, struct chunk *c, char *msg)
-{
- int i=0,k=0;
- struct chunk *c1;
- u_long l;
-
- if (c->type != freebsd)
- return;
-
- if (c->flags & CHUNK_BAD144) {
- l = c->end - 127 - d->bios_sect + 1;
- for (c1=c->part; c1; c1=c1->next) {
- if (c1->end < l || c1->type == unused)
- continue;
- sprintf(msg+strlen(msg),
- "Blocks %lu to %lu are needed for bad144 information, but isn't unused.\n",
- l, c->end);
- break;
- }
- if (c->flags & CHUNK_PAST_1024) {
- for (c1=c->part; c1; c1=c1->next) {
- if (c1->flags & CHUNK_IS_ROOT) {
- sprintf(msg+strlen(msg),
- "You have assigned root to a slice which uses bad144, and\n extends past the first 1023 cylinders, and thus cannot be booted from.\n");
- break;
- }
- }
- }
- }
-
- for (c1=c->part; c1; c1=c1->next) {
- if (c1->type != part)
- continue;
- if (c1->flags & CHUNK_IS_ROOT) {
- k++;
- if (c1->flags & CHUNK_PAST_1024)
- sprintf(msg+strlen(msg),
- "Root filesystem extends past cylinder 1024, and cannot be booted from\n");
- }
- i++;
- }
- if (i > 7) {
- sprintf(msg+strlen(msg),
- "Max seven partitions per freebsd slice\n");
- }
- if (k > 1) {
- sprintf(msg+strlen(msg),
- "Max one root partition child per freebsd slice\n");
- }
-}
-
-void
-Check_Chunk(struct disk *d, struct chunk *c, char *msg)
-{
- Rule_000(d,c,msg);
- Rule_001(d,c,msg);
- Rule_002(d,c,msg);
- Rule_003(d,c,msg);
- Rule_004(d,c,msg);
- if (c->part)
- Check_Chunk(d,c->part,msg);
- if (c->next)
- Check_Chunk(d,c->next,msg);
-
- if (c->end >= 1024*d->bios_hd*d->bios_sect)
- c->flags |= CHUNK_PAST_1024;
- else
- c->flags &= ~CHUNK_PAST_1024;
-}
-
-char *
-CheckRules(struct disk *d)
-{
- char msg[BUFSIZ];
-
- *msg = '\0';
- Check_Chunk(d,d->chunks,msg);
- if (*msg)
- return strdup(msg);
- return 0;
-}
-
-char *
-ChunkCanBeRoot(struct chunk *c)
-{
- struct chunk *c1;
- struct disk *d = c->disk;
- char msg[BUFSIZ];
-
- *msg = '\0';
- if (c->flags & CHUNK_PAST_1024) {
- strcat(msg,
-"The root partition must end before cylinder 1024 seen from\n");
- strcat(msg,
-"the BIOS' point of view, or it cannot be booted from.\n");
- return strdup(msg);
- }
- for (c1=d->chunks->part;;) {
- for (; c1; c1=c1->next)
- if (c1->offset <= c->offset && c1->end >= c->end)
- break;
- if (!c1) {
- strcat(msg,
-"Internal trouble, cannot find this chunk in the chunk-tree\n");
- return strdup(msg);
- }
- if (c1->type == freebsd)
- break;
- c1 = c1->part;
- }
-
- if (c1->type != freebsd) {
- strcat(msg,
-"The root partition must be in a FreeBSD slice, otherwise\n");
- strcat(msg,
-"the kernel cannot be booted from it\n");
- return strdup(msg);
- }
-
- if ((c1->flags & CHUNK_BAD144) && (c1->flags & CHUNK_PAST_1024)) {
- strcat(msg,
-"This partition is unsuitable for root, because the FreeBSD slice\n");
- strcat(msg,
-"it is inside has bad144 enabled, but the badblock data lives past\n");
- strcat(msg,
-"the 1024th cylinder, and the bootblocks cannot get to it there.\n");
- return strdup(msg);
- }
- return NULL;
-}
diff --git a/lib/libdisk/tst01.c b/lib/libdisk/tst01.c
deleted file mode 100644
index f1fb5eb..0000000
--- a/lib/libdisk/tst01.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <err.h>
-#ifdef READLINE
-#include <readline/readline.h>
-#include <readline/history.h>
-#endif
-#include <sys/types.h>
-#include "libdisk.h"
-
-u_char mbr[] = {
-250,51,192,142,208,188,0,124,139,244,80,7,80,31,251,252,191,0,6,185,0,1,
-242,165,234,29,6,0,0,190,190,7,179,4,128,60,128,116,14,128,60,0,117,28,
-131,198,16,254,203,117,239,205,24,139,20,139,76,2,139,238,131,198,16,254,
-203,116,26,128,60,0,116,244,190,139,6,172,60,0,116,11,86,187,7,0,180,14,
-205,16,94,235,240,235,254,191,5,0,187,0,124,184,1,2,87,205,19,95,115,12,
-51,192,205,19,79,117,237,190,163,6,235,211,190,194,6,191,254,125,129,61,
-85,170,117,199,139,245,234,0,124,0,0,73,110,118,97,108,105,100,32,112,97,
-114,116,105,116,105,111,110,32,116,97,98,108,101,0,69,114,114,111,114,32,
-108,111,97,100,105,110,103,32,111,112,101,114,97,116,105,110,103,32,115,
-121,115,116,101,109,0,77,105,115,115,105,110,103,32,111,112,101,114,97,
-116,105,110,103,32,115,121,115,116,101,109,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,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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,128,
-1,1,0,4,15,63,60,63,0,0,0,241,239,0,0,0,0,1,61,5,15,63,243,48,240,0,0,144,
-208,2,0,0,0,1,244,165,15,63,170,192,192,3,0,144,208,2,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,85,170
-};
-
-u_char bteasy17[] = {
-51,192,142,192,142,216,142,208,188,0,124,252,139,244,191,0,6,185,0,1,242,
-165,234,96,6,0,0,139,213,88,162,72,7,60,53,116,28,180,16,246,228,5,174,
-4,150,246,68,4,255,116,62,198,4,128,232,218,0,138,116,1,139,76,2,235,8,
-232,207,0,185,1,0,50,209,187,0,124,184,1,2,205,19,114,30,129,191,254,1,
-85,170,117,22,234,0,124,0,0,128,250,129,116,2,178,128,139,234,66,128,242,
-179,136,22,58,7,191,190,7,185,4,0,198,6,45,7,49,50,246,136,45,138,69,4,
-60,0,116,35,60,5,116,31,254,198,190,42,7,232,113,0,190,72,7,70,70,139,28,
-10,255,116,5,50,125,4,117,243,141,183,114,7,232,90,0,131,199,16,254,6,45,
-7,226,203,128,62,117,4,2,116,11,190,59,7,10,246,117,10,205,24,235,172,190,
-42,7,232,57,0,232,54,0,50,228,205,26,139,218,131,195,96,180,1,205,22,180,
-0,117,11,205,26,59,211,114,242,160,72,7,235,10,205,22,138,196,60,28,116,
-243,4,246,60,49,114,214,60,53,119,210,80,190,40,7,187,27,6,83,252,172,80,
-36,127,180,14,205,16,88,168,128,116,242,195,86,184,1,3,187,0,6,185,1,0,
-50,246,205,19,94,198,6,72,7,63,195,13,138,13,10,70,48,32,46,32,46,32,46,
-160,100,105,115,107,32,49,13,10,10,68,101,102,97,117,108,116,58,32,70,63,
-160,0,1,0,4,0,6,3,7,7,10,10,99,14,100,14,101,20,128,20,129,25,130,30,147,
-36,165,39,159,43,117,47,82,47,219,50,64,55,242,61,0,100,111,243,72,80,70,
-211,79,115,178,85,110,105,248,78,111,118,101,108,236,77,105,110,105,248,
-76,105,110,117,248,65,109,111,101,98,225,66,83,196,66,83,68,233,80,67,73,
-216,67,80,205,86,101,110,105,248,68,111,115,115,101,227,63,191,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,85,170
-};
-
-int
-scan_block(int fd, daddr_t block)
-{
- u_char foo[512];
-
- if (-1 == lseek(fd, (off_t)block * 512, SEEK_SET))
- err(1, "lseek");
- if (512 != read(fd,foo, 512))
- return 1;
- return 0;
-}
-
-void
-Scan_Disk(struct disk *d)
-{
- char device[64];
- u_long l;
- int i,j,fd;
-
- strcpy(device,"/dev/r");
- strcat(device,d->name);
-
- fd = open(device,O_RDWR);
- if (fd < 0) {
- warn("open(%s) failed",device);
- return;
- }
- for(i=-1,l=0;;l++) {
- j = scan_block(fd,l);
- if (j != i) {
- if (i == -1) {
- printf("%c: %lu.",j ? 'B' : 'G', l);
- fflush(stdout);
- } else if (i == 0) {
- printf(".%lu\nB: %lu.",l-1,l);
- fflush(stdout);
- } else {
- printf(".%lu\nG: %lu.",l-1,l);
- fflush(stdout);
- }
- i = j;
- }
- }
- close(fd);
-}
-
-int
-main(int argc, char **argv)
-{
- struct disk *d,*db;
- char myprompt[BUFSIZ];
-#ifndef READLINE
- char input[BUFSIZ];
-#endif
- char *p,*q=0;
- char **cp,*cmds[200];
- int ncmd,i;
-
- if (argc < 2) {
- fprintf(stderr,"Usage:\n\t%s diskname\n",argv[0]);
- exit(1);
- }
- d = Open_Disk(argv[1]);
- if (!d)
- err(1,"Couldn't open disk %s",argv[1]);
-
- sprintf(myprompt,"%s %s> ",argv[0],argv[1]);
- while(1) {
- printf("--==##==--\n");
- p = CheckRules(d);
- Debug_Disk(d);
- if (p) {
- printf("%s",p);
- free(p);
- }
-#ifdef READLINE
- if (q)
- free(q);
- q = p = readline(myprompt);
-#else
- printf(myprompt);
- fflush(stdout);
- q = p = fgets(input,sizeof(input),stdin);
-#endif
- if(!p)
- break;
- for(cp = cmds; (*cp = strsep(&p, " \t\n")) != NULL;)
- if (**cp != '\0')
- cp++;
- ncmd = cp - cmds;
- if(!ncmd)
- continue;
- if (!strcasecmp(*cmds,"quit")) { break; }
- if (!strcasecmp(*cmds,"exit")) { break; }
- if (!strcasecmp(*cmds,"q")) { break; }
- if (!strcasecmp(*cmds,"x")) { break; }
- if (!strcasecmp(*cmds,"dwim") && ncmd == 6) {
- printf("dwim = %p\n",
- Create_Chunk_DWIM(d,
- (struct chunk *)strtol(cmds[1],0,0),
- strtol(cmds[2],0,0),
- strtol(cmds[3],0,0),
- strtol(cmds[4],0,0),
- strtol(cmds[5],0,0)));
- continue;
- }
- if (!strcasecmp(*cmds,"mknod")) {
- MakeDevDisk(d,"/tmp");
- continue;
- }
- if (!strcasecmp(*cmds,"delete") && ncmd == 2) {
- printf("delete = %d\n",
- Delete_Chunk(d,
- (struct chunk *)strtol(cmds[1],0,0)));
- continue;
- }
- if (!strcasecmp(*cmds,"allfreebsd")) {
- All_FreeBSD(d, 0);
- continue;
- }
- if (!strcasecmp(*cmds,"dedicate")) {
- All_FreeBSD(d, 1);
- continue;
- }
- if (!strcasecmp(*cmds,"sanitize")) {
- Sanitize_Bios_Geom(d);
- continue;
- }
- if (!strcasecmp(*cmds,"bios") && ncmd == 4) {
- Set_Bios_Geom(d,
- strtol(cmds[1],0,0),
- strtol(cmds[2],0,0),
- strtol(cmds[3],0,0));
- continue;
- }
- if (!strcasecmp(*cmds,"list")) {
- cp = Disk_Names();
- printf("Disks:");
- for(i=0;cp[i];i++) {
- printf(" %s",cp[i]);
- free(cp[i]);
- }
- free(cp);
- continue;
- }
- if (!strcasecmp(*cmds,"create") && ncmd == 6) {
-
- printf("Create=%d\n",
- Create_Chunk(d,
- strtol(cmds[1],0,0),
- strtol(cmds[2],0,0),
- strtol(cmds[3],0,0),
- strtol(cmds[4],0,0),
- strtol(cmds[5],0,0)));
- continue;
- }
- if (!strcasecmp(*cmds,"read")) {
- db = d;
- if (ncmd > 1)
- d = Open_Disk(cmds[1]);
- else
- d = Open_Disk(argv[1]);
- if (d)
- Free_Disk(db);
- else
- d = db;
- continue;
- }
- if (!strcasecmp(*cmds,"scan")) {
- Scan_Disk(d);
- continue;
- }
- if (!strcasecmp(*cmds,"bteasy")) {
- Set_Boot_Mgr(d,bteasy17);
- continue;
- }
- if (!strcasecmp(*cmds,"mbr")) {
- Set_Boot_Mgr(d,mbr);
- continue;
- }
- if (!strcasecmp(*cmds,"boot")) {
- Set_Boot_Blocks(d,boot1,boot2);
- continue;
- }
- if (!strcasecmp(*cmds,"write")) {
- printf("Write=%d\n",
- Write_Disk(d));
- Free_Disk(d);
- d = Open_Disk(d->name);
- continue;
- }
- if (strcasecmp(*cmds,"help"))
- printf("\007ERROR\n");
- printf("CMDS:\n");
- printf("\tallfreebsd\n");
- printf("\tdedicate\n");
- printf("\tbios cyl hd sect\n");
- printf("\tboot\n");
- printf("\tbteasy17\n");
-#if 0
- printf("\tcollapse [pointer]\n");
-#endif
- printf("\tcreate offset size enum subtype flags\n");
- printf("\t\tsubtype(part): swap=1, ffs=7\n");
- printf("\tdelete pointer\n");
- printf("\tlist\n");
- printf("\tmbr\n");
-#if 0
- printf("\tphys cyl hd sect\n");
-#endif
- printf("\tquit\n");
- printf("\tread [disk]\n");
- printf("\tscan\n");
- printf("\twrite\n");
- printf("\nENUM:\n\t");
- for(i=0;chunk_n[i];i++)
- printf("%d = %s%s",i,chunk_n[i],i == 4 ? "\n\t" : " ");
- printf("\n");
-
- }
- exit (0);
-}
diff --git a/lib/libdisk/write_disk.c b/lib/libdisk/write_disk.c
deleted file mode 100644
index b810cf3..0000000
--- a/lib/libdisk/write_disk.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id$
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#include <err.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <sys/diskslice.h>
-#include "libdisk.h"
-
-#define DOSPTYP_EXTENDED 5
-#define BBSIZE 8192
-#define SBSIZE 8192
-#define DEF_RPM 3600
-#define DEF_INTERLEAVE 1
-
-#define WHERE(offset,disk) (disk->flags & DISK_ON_TRACK ? offset + 63 : offset)
-int
-Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1)
-{
- struct disklabel *dl;
- struct chunk *c2;
- int i,j;
- void *p;
- u_char buf[BBSIZE];
-
- for(i=0;i<BBSIZE/512;i++) {
- p = read_block(fd,WHERE(i + c1->offset,new));
- memcpy(buf+512*i,p,512);
- free(p);
- }
- if(new->boot1)
- memcpy(buf,new->boot1,512);
-
- if(new->boot2)
- memcpy(buf+512,new->boot2,BBSIZE-512);
-
- dl = (struct disklabel *) (buf+512*LABELSECTOR+LABELOFFSET);
- memset(dl,0,sizeof *dl);
-
- for(c2=c1->part;c2;c2=c2->next) {
- if (c2->type == unused) continue;
- if (!strcmp(c2->name,"X")) continue;
- j = c2->name[5] - 'a';
- if (j < 0 || j >= MAXPARTITIONS || j == RAW_PART) {
-#ifdef DEBUG
- warn("Weird parititon letter %c",c2->name[5]);
-#endif
- continue;
- }
- dl->d_partitions[j].p_size = c2->size;
- dl->d_partitions[j].p_offset = c2->offset;
- dl->d_partitions[j].p_fstype = c2->subtype;
- }
-
- dl->d_bbsize = BBSIZE;
- /*
- * Add in defaults for superblock size, interleave, and rpms
- */
- dl->d_sbsize = SBSIZE;
- dl->d_interleave = DEF_INTERLEAVE;
- dl->d_rpm = DEF_RPM;
-
- strcpy(dl->d_typename,c1->name);
-
- dl->d_secsize = 512;
- dl->d_secperunit = new->chunks->size;
- dl->d_ncylinders = new->bios_cyl;
- dl->d_ntracks = new->bios_hd;
- dl->d_nsectors = new->bios_sect;
- dl->d_secpercyl = dl->d_ntracks * dl->d_nsectors;
-
- dl->d_npartitions = MAXPARTITIONS;
-
- dl->d_type = new->name[0] == 's' ? DTYPE_SCSI : DTYPE_ESDI;
- dl->d_partitions[RAW_PART].p_size = c1->size;
- dl->d_partitions[RAW_PART].p_offset = c1->offset;
-
- if(new->flags & DISK_ON_TRACK)
- for(i=0;i<MAXPARTITIONS;i++)
- if (dl->d_partitions[i].p_size)
- dl->d_partitions[i].p_offset += 63;
- dl->d_magic = DISKMAGIC;
- dl->d_magic2 = DISKMAGIC;
- dl->d_checksum = dkcksum(dl);
-
- for(i=0;i<BBSIZE/512;i++) {
- write_block(fd,WHERE(i + c1->offset,new),buf+512*i);
- }
-
- return 0;
-}
-
-int
-Write_Extended(int fd, struct disk *new, struct disk *old, struct chunk *c1)
-{
- return 0;
-}
-
-int
-Write_Disk(struct disk *d1)
-{
- int fd,i,j;
- struct disk *old = 0;
- struct chunk *c1;
- int ret = 0;
- char device[64];
- u_char *mbr;
- struct dos_partition *dp,work[NDOSPART];
- int s[4];
-
- strcpy(device,"/dev/r");
- strcat(device,d1->name);
-
- fd = open(device,O_RDWR);
- if (fd < 0) {
-#ifdef DEBUG
- warn("open(%s) failed",device);
-#endif
- return 1;
- }
-
- memset(s,0,sizeof s);
- mbr = read_block(fd,WHERE(0,d1));
- dp = (struct dos_partition*) (mbr + DOSPARTOFF);
- memcpy(work,dp,sizeof work);
- dp = work;
- free(mbr);
- for (c1=d1->chunks->part; c1 ; c1 = c1->next) {
- if (c1->type == unused) continue;
- if (!strcmp(c1->name,"X")) continue;
- j = c1->name[4] - '1';
- if (j < 0 || j > 3)
- continue;
- s[j]++;
- if (c1->type == extended)
- ret += Write_Extended(fd, d1,old,c1);
- if (c1->type == freebsd)
- ret += Write_FreeBSD(fd, d1,old,c1);
-
- dp[j].dp_start = c1->offset;
- dp[j].dp_size = c1->size;
-
- i = c1->offset;
- if (i >= 1024*d1->bios_sect*d1->bios_hd) {
- dp[j].dp_ssect = 0xff;
- dp[j].dp_shd = 0xff;
- dp[j].dp_scyl = 0xff;
- } else {
- dp[j].dp_ssect = i % d1->bios_sect;
- i -= dp[j].dp_ssect++;
- i /= d1->bios_sect;
- dp[j].dp_shd = i % d1->bios_hd;
- i -= dp[j].dp_shd;
- i /= d1->bios_hd;
- dp[j].dp_scyl = i;
- i -= dp[j].dp_scyl;
- dp[j].dp_ssect |= i >> 2;
- }
-
-#ifdef DEBUG
- printf("S:%lu = (%x/%x/%x)",
- c1->offset,dp[j].dp_scyl,dp[j].dp_shd,dp[j].dp_ssect);
-#endif
-
- i = c1->end;
- dp[j].dp_esect = i % d1->bios_sect;
- i -= dp[j].dp_esect++;
- i /= d1->bios_sect;
- dp[j].dp_ehd = i % d1->bios_hd;
- i -= dp[j].dp_ehd;
- i /= d1->bios_hd;
- if (i>1023) i = 1023;
- dp[j].dp_ecyl = i;
- i -= dp[j].dp_ecyl;
- dp[j].dp_esect |= i >> 2;
-
-#ifdef DEBUG
- printf(" E:%lu = (%x/%x/%x)\n",
- c1->end,dp[j].dp_ecyl,dp[j].dp_ehd,dp[j].dp_esect);
-#endif
-
- dp[j].dp_typ = c1->subtype;
- if (c1->flags & CHUNK_ACTIVE)
- dp[j].dp_flag = 0x80;
- else
- dp[j].dp_flag = 0;
- }
- j = 0;
- for(i=0;i<NDOSPART;i++) {
- if (!s[i])
- memset(dp+i,0,sizeof *dp);
- if (dp[i].dp_flag)
- j++;
- }
- if (!j)
- for(i=0;i<NDOSPART;i++)
- if (dp[i].dp_typ == 0xa5)
- dp[i].dp_flag = 0x80;
-
- mbr = read_block(fd,WHERE(0,d1));
- if (d1->bootmgr)
- memcpy(mbr,d1->bootmgr,DOSPARTOFF);
- memcpy(mbr+DOSPARTOFF,dp,sizeof *dp * NDOSPART);
- mbr[512-2] = 0x55;
- mbr[512-1] = 0xaa;
- write_block(fd,WHERE(0,d1),mbr);
-
- i = 1;
- i = ioctl(fd,DIOCSYNCSLICEINFO,&i);
-#ifdef DEBUG
- if (i != 0)
- warn("ioctl(DIOCSYNCSLICEINFO)");
-#endif
- close(fd);
- return 0;
-}
-
diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile
deleted file mode 100644
index db3057f..0000000
--- a/lib/libedit/Makefile
+++ /dev/null
@@ -1,67 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/4/93
-
-LIB= edit
-
-OSRCS= chared.c common.c el.c emacs.c fcns.c help.c hist.c key.c map.c \
- parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c
-
-LDADD+= -ltermcap
-DPADD+= ${LIBTERMCAP}
-
-MAN3= editline.3
-MAN5= editrc.5
-
-MLINKS= editline.3 el_init.3 editline.3 el_end.3 editline.3 el_reset.3 \
- editline.3 el_gets.3 editline.3 el_getc.3 editline.3 el_push.3 \
- editline.3 el_parse.3 editline.3 el_set.3 editline.3 el_source.3 \
- editline.3 el_resize.3 editline.3 el_line.3 \
- editline.3 el_insertstr.3 editline.3 el_deletestr.3 \
- editline.3 history_init.3 editline.3 history_end.3 editline.3 history.3
-
-
-# For speed and debugging
-#SRCS= ${OSRCS} tokenizer.c history.c
-# For protection
-SRCS= editline.c tokenizer.c history.c
-
-SRCS+= common.h emacs.h fcns.h help.h vi.h
-
-CLEANFILES+=common.h editline.c emacs.h fcns.c fcns.h help.c help.h vi.h
-CFLAGS+=-I. -I${.CURDIR}
-CFLAGS+=#-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
-CFLAGS+=#-DDEBUG_PASTE
-
-AHDR=vi.h emacs.h common.h
-ASRC=${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
-
-vi.h: vi.c makelist
- sh ${.CURDIR}/makelist -h ${.CURDIR}/vi.c > ${.TARGET}
-
-emacs.h: emacs.c makelist
- sh ${.CURDIR}/makelist -h ${.CURDIR}/emacs.c > ${.TARGET}
-
-common.h: common.c makelist
- sh ${.CURDIR}/makelist -h ${.CURDIR}/common.c > ${.TARGET}
-
-fcns.h: ${AHDR} makelist
- sh ${.CURDIR}/makelist -fh ${AHDR} > ${.TARGET}
-
-fcns.c: ${AHDR} fcns.h makelist
- sh ${.CURDIR}/makelist -fc ${AHDR} > ${.TARGET}
-
-help.c: ${ASRC} makelist
- sh ${.CURDIR}/makelist -bc ${ASRC} > ${.TARGET}
-
-help.h: ${ASRC} makelist
- sh ${.CURDIR}/makelist -bh ${ASRC} > ${.TARGET}
-
-editline.c:
- sh ${.CURDIR}/makelist -e ${OSRCS} > ${.TARGET}
-
-beforedepend editline.o editline.po editline.so: \
- vi.h emacs.h common.h fcns.h fcns.c help.h help.c
-
-test: test.o libedit.a ${DPADD} ${LIBTERMCAP}
- ${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD}
-
-.include <bsd.lib.mk>
diff --git a/lib/libedit/TEST/test.c b/lib/libedit/TEST/test.c
deleted file mode 100644
index 097055a..0000000
--- a/lib/libedit/TEST/test.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1992, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)test.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * test.c: A little test program
- */
-#include "sys.h"
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <dirent.h>
-
-#include "histedit.h"
-#include "tokenizer.h"
-
-static int continuation = 0;
-static EditLine *el = NULL;
-
-static char *
-/*ARGSUSED*/
-prompt(el)
- EditLine *el;
-{
- static char a[] = "Edit$";
- static char b[] = "Edit>";
- return continuation ? b : a;
-}
-
-static void
-sig(i)
- int i;
-{
- (void) fprintf(stderr, "Got signal %d.\n", i);
- el_reset(el);
-}
-
-static unsigned char
-/*ARGSUSED*/
-complete(el, ch)
- EditLine *el;
- int ch;
-{
- DIR *dd = opendir(".");
- struct dirent *dp;
- const char* ptr;
- const LineInfo *lf = el_line(el);
- int len;
-
- /*
- * Find the last word
- */
- for (ptr = lf->cursor - 1; !isspace(*ptr) && ptr > lf->buffer; ptr--)
- continue;
- len = lf->cursor - ++ptr;
-
- for (dp = readdir(dd); dp != NULL; dp = readdir(dd)) {
- if (len > strlen(dp->d_name))
- continue;
- if (strncmp(dp->d_name, ptr, len) == 0) {
- closedir(dd);
- if (el_insertstr(el, &dp->d_name[len]) == -1)
- return CC_ERROR;
- else
- return CC_REFRESH;
- }
- }
-
- closedir(dd);
- return CC_ERROR;
-}
-
-int
-/*ARGSUSED*/
-main(argc, argv)
- int argc;
- char *argv[];
-{
- int num;
- const char *buf;
- Tokenizer *tok;
- History *hist;
-
- (void) signal(SIGINT, sig);
- (void) signal(SIGQUIT, sig);
- (void) signal(SIGHUP, sig);
- (void) signal(SIGTERM, sig);
-
- hist = history_init(); /* Init the builtin history */
- history(hist, H_EVENT, 100); /* Remember 100 events */
-
- tok = tok_init(NULL); /* Initialize the tokenizer */
-
- el = el_init(*argv, stdin, stdout); /* Initialize editline */
-
- el_set(el, EL_EDITOR, "vi"); /* Default editor is vi */
- el_set(el, EL_SIGNAL, 1); /* Handle signals gracefully */
- el_set(el, EL_PROMPT, prompt); /* Set the prompt function */
-
- /* Tell editline to use this history interface */
- el_set(el, EL_HIST, history, hist);
-
- /* Add a user-defined function */
- el_set(el, EL_ADDFN, "ed-complete", "Complete argument", complete);
-
- el_set(el, EL_BIND, "^I", "ed-complete", NULL);/* Bind tab to it */
-
- /*
- * Bind j, k in vi command mode to previous and next line, instead
- * of previous and next history.
- */
- el_set(el, EL_BIND, "-a", "k", "ed-prev-line", NULL);
- el_set(el, EL_BIND, "-a", "j", "ed-next-line", NULL);
-
- /*
- * Source the user's defaults file.
- */
- el_source(el, NULL);
-
- while ((buf = el_gets(el, &num)) != NULL && num != 0) {
- int ac;
- char **av;
-#ifdef DEBUG
- (void) fprintf(stderr, "got %d %s", num, buf);
-#endif
- if (!continuation && num == 1)
- continue;
- if (tok_line(tok, buf, &ac, &av) > 0) {
- history(hist, continuation ? H_ADD : H_ENTER, buf);
- continuation = 1;
- continue;
- }
- history(hist, continuation ? H_ADD : H_ENTER, buf);
-
- continuation = 0;
-
- if (strcmp(av[0], "history") == 0) {
- const struct HistEvent *he;
-
- switch (ac) {
- case 1:
- for (he = history(hist, H_LAST); he;
- he = history(hist, H_PREV))
- (void) fprintf(stdout, "%4d %s", he->num, he->str);
- break;
-
- case 2:
- if (strcmp(av[1], "clear") == 0)
- history(hist, H_CLEAR);
- else
- goto badhist;
- break;
-
- case 3:
- if (strcmp(av[1], "load") == 0)
- history(hist, H_LOAD, av[2]);
- else if (strcmp(av[1], "save") == 0)
- history(hist, H_SAVE, av[2]);
- break;
-
- badhist:
- default:
- (void) fprintf(stderr, "Bad history arguments\n");
- break;
- }
- }
- else if (el_parse(el, ac, av) == -1) {
- switch (fork()) {
- case 0:
- execvp(av[0], av);
- perror(av[0]);
- _exit(1);
- /*NOTREACHED*/
- break;
-
- case -1:
- perror("fork");
- break;
-
- default:
- if (wait(&num) == -1)
- perror("wait");
- (void) fprintf(stderr, "Exit %x\n", num);
- break;
- }
- }
- tok_reset(tok);
- }
-
- el_end(el);
- tok_end(tok);
- history_end(hist);
-
- return 0;
-}
diff --git a/lib/libedit/chared.c b/lib/libedit/chared.c
deleted file mode 100644
index dcd189c..0000000
--- a/lib/libedit/chared.c
+++ /dev/null
@@ -1,639 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * chared.c: Character editor utilities
- */
-#include "sys.h"
-
-#include <stdlib.h>
-#include "el.h"
-
-/* cv_undo():
- * Handle state for the vi undo command
- */
-protected void
-cv_undo(el, action, size, ptr)
- EditLine *el;
- int action, size;
- char *ptr;
-{
- c_undo_t *vu = &el->el_chared.c_undo;
- vu->action = action;
- vu->ptr = ptr;
- vu->isize = size;
- (void) memcpy(vu->buf, vu->ptr, size);
-#ifdef DEBUG_UNDO
- (void) fprintf(el->el_errfile, "Undo buffer \"%s\" size = +%d -%d\n",
- vu->ptr, vu->isize, vu->dsize);
-#endif
-}
-
-
-/* c_insert():
- * Insert num characters
- */
-protected void
-c_insert(el, num)
- EditLine *el;
- int num;
-{
- char *cp;
-
- if (el->el_line.lastchar + num >= el->el_line.limit)
- return; /* can't go past end of buffer */
-
- if (el->el_line.cursor < el->el_line.lastchar) {
- /* if I must move chars */
- for (cp = el->el_line.lastchar; cp >= el->el_line.cursor; cp--)
- cp[num] = *cp;
- }
- el->el_line.lastchar += num;
-} /* end c_insert */
-
-
-/* c_delafter():
- * Delete num characters after the cursor
- */
-protected void
-c_delafter(el, num)
- EditLine *el;
- int num;
-{
-
- if (el->el_line.cursor + num > el->el_line.lastchar)
- num = el->el_line.lastchar - el->el_line.cursor;
-
- if (num > 0) {
- char *cp;
-
- if (el->el_map.current != el->el_map.emacs)
- cv_undo(el, INSERT, num, el->el_line.cursor);
-
- for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++)
- *cp = cp[num];
-
- el->el_line.lastchar -= num;
- }
-}
-
-
-/* c_delbefore():
- * Delete num characters before the cursor
- */
-protected void
-c_delbefore(el, num)
- EditLine *el;
- int num;
-{
-
- if (el->el_line.cursor - num < el->el_line.buffer)
- num = el->el_line.cursor - el->el_line.buffer;
-
- if (num > 0) {
- char *cp;
-
- if (el->el_map.current != el->el_map.emacs)
- cv_undo(el, INSERT, num, el->el_line.cursor - num);
-
- for (cp = el->el_line.cursor - num; cp <= el->el_line.lastchar; cp++)
- *cp = cp[num];
-
- el->el_line.lastchar -= num;
- }
-}
-
-
-/* ce__isword():
- * Return if p is part of a word according to emacs
- */
-protected int
-ce__isword(p)
- int p;
-{
- return isalpha((unsigned char) p) || isdigit((unsigned char) p) || strchr("*?_-.[]~=", p) != NULL;
-}
-
-
-/* cv__isword():
- * Return if p is part of a word according to vi
- */
-protected int
-cv__isword(p)
- int p;
-{
- return !isspace((unsigned char) p);
-}
-
-
-/* c__prev_word():
- * Find the previous word
- */
-protected char *
-c__prev_word(p, low, n, wtest)
- register char *p, *low;
- register int n;
- int (*wtest) __P((int));
-{
- p--;
-
- while (n--) {
- while ((p >= low) && !(*wtest)((unsigned char) *p))
- p--;
- while ((p >= low) && (*wtest)((unsigned char) *p))
- p--;
- }
-
- /* cp now points to one character before the word */
- p++;
- if (p < low)
- p = low;
- /* cp now points where we want it */
- return p;
-}
-
-
-/* c__next_word():
- * Find the next word
- */
-protected char *
-c__next_word(p, high, n, wtest)
- register char *p, *high;
- register int n;
- int (*wtest) __P((int));
-{
- while (n--) {
- while ((p < high) && !(*wtest)((unsigned char) *p))
- p++;
- while ((p < high) && (*wtest)((unsigned char) *p))
- p++;
- }
- if (p > high)
- p = high;
- /* p now points where we want it */
- return p;
-}
-
-/* cv_next_word():
- * Find the next word vi style
- */
-protected char *
-cv_next_word(el, p, high, n, wtest)
- EditLine *el;
- register char *p, *high;
- register int n;
- int (*wtest) __P((int));
-{
- int test;
-
- while (n--) {
- test = (*wtest)((unsigned char) *p);
- while ((p < high) && (*wtest)((unsigned char) *p) == test)
- p++;
- /*
- * vi historically deletes with cw only the word preserving the
- * trailing whitespace! This is not what 'w' does..
- */
- if (el->el_chared.c_vcmd.action != (DELETE|INSERT))
- while ((p < high) && isspace((unsigned char) *p))
- p++;
- }
-
- /* p now points where we want it */
- if (p > high)
- return high;
- else
- return p;
-}
-
-
-/* cv_prev_word():
- * Find the previous word vi style
- */
-protected char *
-cv_prev_word(el, p, low, n, wtest)
- EditLine *el;
- register char *p, *low;
- register int n;
- int (*wtest) __P((int));
-{
- int test;
-
- while (n--) {
- p--;
- /*
- * vi historically deletes with cb only the word preserving the
- * leading whitespace! This is not what 'b' does..
- */
- if (el->el_chared.c_vcmd.action != (DELETE|INSERT))
- while ((p > low) && isspace((unsigned char) *p))
- p--;
- test = (*wtest)((unsigned char) *p);
- while ((p >= low) && (*wtest)((unsigned char) *p) == test)
- p--;
- p++;
- while (isspace((unsigned char) *p))
- p++;
- }
-
- /* p now points where we want it */
- if (p < low)
- return low;
- else
- return p;
-}
-
-
-#ifdef notdef
-/* c__number():
- * Ignore character p points to, return number appearing after that.
- * A '$' by itself means a big number; "$-" is for negative; '^' means 1.
- * Return p pointing to last char used.
- */
-protected char *
-c__number(p, num, dval)
- char *p; /* character position */
- int *num; /* Return value */
- int dval; /* dval is the number to subtract from like $-3 */
-{
- register int i;
- register int sign = 1;
-
- if (*++p == '^') {
- *num = 1;
- return p;
- }
- if (*p == '$') {
- if (*++p != '-') {
- *num = 0x7fffffff; /* Handle $ */
- return --p;
- }
- sign = -1; /* Handle $- */
- ++p;
- }
- for (i = 0; isdigit((unsigned char) *p); i = 10 * i + *p++ - '0')
- continue;
- *num = (sign < 0 ? dval - i : i);
- return --p;
-}
-#endif
-
-/* cv_delfini():
- * Finish vi delete action
- */
-protected void
-cv_delfini(el)
- EditLine *el;
-{
- register int size;
- int oaction;
-
- if (el->el_chared.c_vcmd.action & INSERT)
- el->el_map.current = el->el_map.key;
-
- oaction = el->el_chared.c_vcmd.action;
- el->el_chared.c_vcmd.action = NOP;
-
- if (el->el_chared.c_vcmd.pos == 0)
- return;
-
-
- if (el->el_line.cursor > el->el_chared.c_vcmd.pos) {
- size = (int) (el->el_line.cursor - el->el_chared.c_vcmd.pos);
- c_delbefore(el, size);
- el->el_line.cursor = el->el_chared.c_vcmd.pos;
- re_refresh_cursor(el);
- }
- else if (el->el_line.cursor < el->el_chared.c_vcmd.pos) {
- size = (int)(el->el_chared.c_vcmd.pos - el->el_line.cursor);
- c_delafter(el, size);
- }
- else {
- size = 1;
- c_delafter(el, size);
- }
- switch (oaction) {
- case DELETE|INSERT:
- el->el_chared.c_undo.action = DELETE|INSERT;
- break;
- case DELETE:
- el->el_chared.c_undo.action = INSERT;
- break;
- case NOP:
- case INSERT:
- default:
- abort();
- break;
- }
-
-
- el->el_chared.c_undo.ptr = el->el_line.cursor;
- el->el_chared.c_undo.dsize = size;
-}
-
-
-#ifdef notdef
-/* ce__endword():
- * Go to the end of this word according to emacs
- */
-protected char *
-ce__endword(p, high, n)
- char *p, *high;
- int n;
-{
- p++;
-
- while (n--) {
- while ((p < high) && isspace((unsigned char) *p))
- p++;
- while ((p < high) && !isspace((unsigned char) *p))
- p++;
- }
-
- p--;
- return p;
-}
-#endif
-
-
-/* cv__endword():
- * Go to the end of this word according to vi
- */
-protected char *
-cv__endword(p, high, n)
- char *p, *high;
- int n;
-{
- p++;
-
- while (n--) {
- while ((p < high) && isspace((unsigned char) *p))
- p++;
-
- if (isalnum((unsigned char) *p))
- while ((p < high) && isalnum((unsigned char) *p))
- p++;
- else
- while ((p < high) && !(isspace((unsigned char) *p) ||
- isalnum((unsigned char) *p)))
- p++;
- }
- p--;
- return p;
-}
-
-/* ch_init():
- * Initialize the character editor
- */
-protected int
-ch_init(el)
- EditLine *el;
-{
- el->el_line.buffer = (char *) el_malloc(EL_BUFSIZ);
- (void) memset(el->el_line.buffer, 0, EL_BUFSIZ);
- el->el_line.cursor = el->el_line.buffer;
- el->el_line.lastchar = el->el_line.buffer;
- el->el_line.limit = &el->el_line.buffer[EL_BUFSIZ - 2];
-
- el->el_chared.c_undo.buf = (char *) el_malloc(EL_BUFSIZ);
- (void) memset(el->el_chared.c_undo.buf, 0, EL_BUFSIZ);
- el->el_chared.c_undo.action = NOP;
- el->el_chared.c_undo.isize = 0;
- el->el_chared.c_undo.dsize = 0;
- el->el_chared.c_undo.ptr = el->el_line.buffer;
-
- el->el_chared.c_vcmd.action = NOP;
- el->el_chared.c_vcmd.pos = el->el_line.buffer;
- el->el_chared.c_vcmd.ins = el->el_line.buffer;
-
- el->el_chared.c_kill.buf = (char *) el_malloc(EL_BUFSIZ);
- (void) memset(el->el_chared.c_kill.buf, 0, EL_BUFSIZ);
- el->el_chared.c_kill.mark = el->el_line.buffer;
- el->el_chared.c_kill.last = el->el_chared.c_kill.buf;
-
- el->el_map.current = el->el_map.key;
-
- el->el_state.inputmode = MODE_INSERT; /* XXX: save a default */
- el->el_state.doingarg = 0;
- el->el_state.metanext = 0;
- el->el_state.argument = 1;
- el->el_state.lastcmd = ED_UNASSIGNED;
-
- el->el_chared.c_macro.nline = NULL;
- el->el_chared.c_macro.level = -1;
- el->el_chared.c_macro.macro = (char **) el_malloc(EL_MAXMACRO *
- sizeof(char *));
- return 0;
-}
-
-/* ch_reset():
- * Reset the character editor
- */
-protected void
-ch_reset(el)
- EditLine *el;
-{
- el->el_line.cursor = el->el_line.buffer;
- el->el_line.lastchar = el->el_line.buffer;
-
- el->el_chared.c_undo.action = NOP;
- el->el_chared.c_undo.isize = 0;
- el->el_chared.c_undo.dsize = 0;
- el->el_chared.c_undo.ptr = el->el_line.buffer;
-
- el->el_chared.c_vcmd.action = NOP;
- el->el_chared.c_vcmd.pos = el->el_line.buffer;
- el->el_chared.c_vcmd.ins = el->el_line.buffer;
-
- el->el_chared.c_kill.mark = el->el_line.buffer;
-
- el->el_map.current = el->el_map.key;
-
- el->el_state.inputmode = MODE_INSERT; /* XXX: save a default */
- el->el_state.doingarg = 0;
- el->el_state.metanext = 0;
- el->el_state.argument = 1;
- el->el_state.lastcmd = ED_UNASSIGNED;
-
- el->el_chared.c_macro.level = -1;
-
- el->el_history.eventno = 0;
-}
-
-
-/* ch_end():
- * Free the data structures used by the editor
- */
-protected void
-ch_end(el)
- EditLine *el;
-{
- el_free((ptr_t) el->el_line.buffer);
- el->el_line.buffer = NULL;
- el->el_line.limit = NULL;
- el_free((ptr_t) el->el_chared.c_undo.buf);
- el->el_chared.c_undo.buf = NULL;
- el_free((ptr_t) el->el_chared.c_kill.buf);
- el->el_chared.c_kill.buf = NULL;
- el_free((ptr_t) el->el_chared.c_macro.macro);
- el->el_chared.c_macro.macro = NULL;
- ch_reset(el);
-}
-
-
-/* el_insertstr():
- * Insert string at cursorI
- */
-public int
-el_insertstr(el, s)
- EditLine *el;
- char *s;
-{
- int len;
-
- if ((len = strlen(s)) == 0)
- return -1;
- if (el->el_line.lastchar + len >= el->el_line.limit)
- return -1;
-
- c_insert(el, len);
- while (*s)
- *el->el_line.cursor++ = *s++;
- return 0;
-}
-
-
-/* el_deletestr():
- * Delete num characters before the cursor
- */
-public void
-el_deletestr(el, n)
- EditLine *el;
- int n;
-{
- if (n <= 0)
- return;
-
- if (el->el_line.cursor < &el->el_line.buffer[n])
- return;
-
- c_delbefore(el, n); /* delete before dot */
- el->el_line.cursor -= n;
- if (el->el_line.cursor < el->el_line.buffer)
- el->el_line.cursor = el->el_line.buffer;
-}
-
-/* c_gets():
- * Get a string
- */
-protected int
-c_gets(el, buf)
- EditLine *el;
- char *buf;
-{
- char ch;
- int len = 0;
-
- for (ch = 0; ch == 0;) {
- if (el_getc(el, &ch) != 1)
- return ed_end_of_file(el, 0);
- switch (ch) {
- case '\010': /* Delete and backspace */
- case '\177':
- if (len > 1) {
- *el->el_line.cursor-- = '\0';
- el->el_line.lastchar = el->el_line.cursor;
- buf[len--] = '\0';
- }
- else {
- el->el_line.buffer[0] = '\0';
- el->el_line.lastchar = el->el_line.buffer;
- el->el_line.cursor = el->el_line.buffer;
- return CC_REFRESH;
- }
- re_refresh(el);
- ch = 0;
- break;
-
- case '\033': /* ESC */
- case '\r': /* Newline */
- case '\n':
- break;
-
- default:
- if (len >= EL_BUFSIZ)
- term_beep(el);
- else {
- buf[len++] = ch;
- *el->el_line.cursor++ = ch;
- el->el_line.lastchar = el->el_line.cursor;
- }
- re_refresh(el);
- ch = 0;
- break;
- }
- }
- buf[len] = ch;
- return len;
-}
-
-
-/* c_hpos():
- * Return the current horizontal position of the cursor
- */
-protected int
-c_hpos(el)
- EditLine *el;
-{
- char *ptr;
-
- /*
- * Find how many characters till the beginning of this line.
- */
- if (el->el_line.cursor == el->el_line.buffer)
- return 0;
- else {
- for (ptr = el->el_line.cursor - 1;
- ptr >= el->el_line.buffer && *ptr != '\n';
- ptr--)
- continue;
- return el->el_line.cursor - ptr - 1;
- }
-}
diff --git a/lib/libedit/chared.h b/lib/libedit/chared.h
deleted file mode 100644
index 22d07f0..0000000
--- a/lib/libedit/chared.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)chared.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.chared.h: Character editor interface
- */
-#ifndef _h_el_chared
-#define _h_el_chared
-
-#include <ctype.h>
-#include <string.h>
-
-#include "histedit.h"
-
-#define EL_MAXMACRO 10
-
-/*
- * This is a issue of basic "vi" look-and-feel. Defining VI_MOVE works
- * like real vi: i.e. the transition from command<->insert modes moves
- * the cursor.
- *
- * On the other hand we really don't want to move the cursor, because
- * all the editing commands don't include the character under the cursor.
- * Probably the best fix is to make all the editing commands aware of
- * this fact.
- */
-#define VI_MOVE
-
-
-typedef struct c_macro_t {
- int level;
- char **macro;
- char *nline;
-} c_macro_t;
-
-/*
- * Undo information for both vi and emacs
- */
-typedef struct c_undo_t {
- int action;
- int isize;
- int dsize;
- char *ptr;
- char *buf;
-} c_undo_t;
-
-/*
- * Current action information for vi
- */
-typedef struct c_vcmd_t {
- int action;
- char *pos;
- char *ins;
-} c_vcmd_t;
-
-/*
- * Kill buffer for emacs
- */
-typedef struct c_kill_t {
- char *buf;
- char *last;
- char *mark;
-} c_kill_t;
-
-/*
- * Note that we use both data structures because the user can bind
- * commands from both editors!
- */
-typedef struct el_chared_t {
- c_undo_t c_undo;
- c_kill_t c_kill;
- c_vcmd_t c_vcmd;
- c_macro_t c_macro;
-} el_chared_t;
-
-
-#define STReof "^D\b\b"
-#define STRQQ "\"\""
-
-#define isglob(a) (strchr("*[]?", (a)) != NULL)
-#define isword(a) (isprint(a))
-
-#define NOP 0x00
-#define DELETE 0x01
-#define INSERT 0x02
-#define CHANGE 0x04
-
-#define CHAR_FWD 0
-#define CHAR_BACK 1
-
-#define MODE_INSERT 0
-#define MODE_REPLACE 1
-#define MODE_REPLACE_1 2
-
-#include "common.h"
-#include "vi.h"
-#include "emacs.h"
-#include "search.h"
-#include "fcns.h"
-
-
-protected int cv__isword __P((int));
-protected void cv_delfini __P((EditLine *));
-protected char *cv__endword __P((char *, char *, int));
-protected int ce__isword __P((int));
-protected void cv_undo __P((EditLine *, int, int, char *));
-protected char *cv_next_word __P((EditLine*, char *, char *, int,
- int (*)(int)));
-protected char *cv_prev_word __P((EditLine*, char *, char *, int,
- int (*)(int)));
-protected char *c__next_word __P((char *, char *, int, int (*)(int)));
-protected char *c__prev_word __P((char *, char *, int, int (*)(int)));
-protected void c_insert __P((EditLine *, int));
-protected void c_delbefore __P((EditLine *, int));
-protected void c_delafter __P((EditLine *, int));
-protected int c_gets __P((EditLine *, char *));
-protected int c_hpos __P((EditLine *));
-
-protected int ch_init __P((EditLine *));
-protected void ch_reset __P((EditLine *));
-protected void ch_end __P((EditLine *));
-
-#endif /* _h_el_chared */
diff --git a/lib/libedit/common.c b/lib/libedit/common.c
deleted file mode 100644
index 6908819..0000000
--- a/lib/libedit/common.c
+++ /dev/null
@@ -1,992 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * common.c: Common Editor functions
- */
-#include "sys.h"
-#include "el.h"
-
-/* ed_end_of_file():
- * Indicate end of file
- * [^D]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_end_of_file(el, c)
- EditLine *el;
- int c;
-{
- re_goto_bottom(el);
- *el->el_line.lastchar = '\0';
- return CC_EOF;
-}
-
-
-/* ed_insert():
- * Add character to the line
- * Insert a character [bound to all insert keys]
- */
-protected el_action_t
-ed_insert(el, c)
- EditLine *el;
- int c;
-{
- int i;
-
- if (c == '\0')
- return CC_ERROR;
-
- if (el->el_line.lastchar + el->el_state.argument >=
- el->el_line.limit)
- return CC_ERROR; /* end of buffer space */
-
- if (el->el_state.argument == 1) {
- if (el->el_state.inputmode != MODE_INSERT) {
- el->el_chared.c_undo.buf[el->el_chared.c_undo.isize++] =
- *el->el_line.cursor;
- el->el_chared.c_undo.buf[el->el_chared.c_undo.isize] = '\0';
- c_delafter(el, 1);
- }
-
- c_insert(el, 1);
-
- *el->el_line.cursor++ = c;
- el->el_state.doingarg = 0; /* just in case */
- re_fastaddc(el); /* fast refresh for one char. */
- }
- else {
- if (el->el_state.inputmode != MODE_INSERT) {
-
- for(i = 0;i < el->el_state.argument; i++)
- el->el_chared.c_undo.buf[el->el_chared.c_undo.isize++] =
- el->el_line.cursor[i];
-
- el->el_chared.c_undo.buf[el->el_chared.c_undo.isize] = '\0';
- c_delafter(el, el->el_state.argument);
- }
-
- c_insert(el, el->el_state.argument);
-
- while (el->el_state.argument--)
- *el->el_line.cursor++ = c;
- re_refresh(el);
- }
-
- if (el->el_state.inputmode == MODE_REPLACE_1)
- (void) vi_command_mode(el, 0);
-
- return CC_NORM;
-}
-
-
-/* ed_delete_prev_word():
- * Delete from beginning of current word to cursor
- * [M-^?] [^W]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_delete_prev_word(el, c)
- EditLine *el;
- int c;
-{
- char *cp, *p, *kp;
-
- if (el->el_line.cursor == el->el_line.buffer)
- return CC_ERROR;
-
- cp = c__prev_word(el->el_line.cursor, el->el_line.buffer,
- el->el_state.argument, ce__isword);
-
- for (p = cp, kp = el->el_chared.c_kill.buf; p < el->el_line.cursor; p++)
- *kp++ = *p;
- el->el_chared.c_kill.last = kp;
-
- c_delbefore(el, el->el_line.cursor - cp); /* delete before dot */
- el->el_line.cursor = cp;
- if (el->el_line.cursor < el->el_line.buffer)
- el->el_line.cursor = el->el_line.buffer; /* bounds check */
- return CC_REFRESH;
-}
-
-
-/* ed_delete_next_char():
- * Delete character under cursor
- * [^D] [x]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_delete_next_char(el, c)
- EditLine *el;
- int c;
-{
-#ifdef notdef /* XXX */
-#define EL el->el_line
-fprintf(stderr, "\nD(b: %x(%s) c: %x(%s) last: %x(%s) limit: %x(%s)\n",
- EL.buffer, EL.buffer, EL.cursor, EL.cursor, EL.lastchar, EL.lastchar, EL.limit, EL.limit);
-#endif
- if (el->el_line.cursor == el->el_line.lastchar) {/* if I'm at the end */
- if (el->el_map.type == MAP_VI) {
- if (el->el_line.cursor == el->el_line.buffer) {
- /* if I'm also at the beginning */
-#ifdef KSHVI
- return CC_ERROR;
-#else
- term_overwrite(el, STReof, 4);/* then do a EOF */
- term__flush();
- return CC_EOF;
-#endif
- }
- else {
-#ifdef KSHVI
- el->el_line.cursor--;
-#else
- return CC_ERROR;
-#endif
- }
- }
- else {
- if (el->el_line.cursor != el->el_line.buffer)
- el->el_line.cursor--;
- else
- return CC_ERROR;
- }
- }
- c_delafter(el, el->el_state.argument); /* delete after dot */
- if (el->el_line.cursor >= el->el_line.lastchar && el->el_line.cursor > el->el_line.buffer)
- el->el_line.cursor = el->el_line.lastchar - 1; /* bounds check */
- return CC_REFRESH;
-}
-
-
-/* ed_kill_line():
- * Cut to the end of line
- * [^K] [^K]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_kill_line(el, c)
- EditLine *el;
- int c;
-{
- char *kp, *cp;
-
- cp = el->el_line.cursor;
- kp = el->el_chared.c_kill.buf;
- while (cp < el->el_line.lastchar)
- *kp++ = *cp++; /* copy it */
- el->el_chared.c_kill.last = kp;
- el->el_line.lastchar = el->el_line.cursor; /* zap! -- delete to end */
- return CC_REFRESH;
-}
-
-
-/* ed_move_to_end():
- * Move cursor to the end of line
- * [^E] [^E]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_move_to_end(el, c)
- EditLine *el;
- int c;
-{
- el->el_line.cursor = el->el_line.lastchar;
- if (el->el_map.type == MAP_VI) {
-#ifdef VI_MOVE
- el->el_line.cursor--;
-#endif
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
- }
- return CC_CURSOR;
-}
-
-
-/* ed_move_to_beg():
- * Move cursor to the beginning of line
- * [^A] [^A]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_move_to_beg(el, c)
- EditLine *el;
- int c;
-{
- el->el_line.cursor = el->el_line.buffer;
-
- if (el->el_map.type == MAP_VI) {
- /* We want FIRST non space character */
- while (isspace((unsigned char) *el->el_line.cursor))
- el->el_line.cursor++;
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
- }
-
- return CC_CURSOR;
-}
-
-
-/* ed_transpose_chars():
- * Exchange the character to the left of the cursor with the one under it
- * [^T] [^T]
- */
-protected el_action_t
-ed_transpose_chars(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor < el->el_line.lastchar) {
- if (el->el_line.lastchar <= &el->el_line.buffer[1])
- return CC_ERROR;
- else
- el->el_line.cursor++;
- }
- if (el->el_line.cursor > &el->el_line.buffer[1]) {
- /* must have at least two chars entered */
- c = el->el_line.cursor[-2];
- el->el_line.cursor[-2] = el->el_line.cursor[-1];
- el->el_line.cursor[-1] = c;
- return CC_REFRESH;
- }
- else
- return CC_ERROR;
-}
-
-
-/* ed_next_char():
- * Move to the right one character
- * [^F] [^F]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_next_char(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor >= el->el_line.lastchar)
- return CC_ERROR;
-
- el->el_line.cursor += el->el_state.argument;
- if (el->el_line.cursor > el->el_line.lastchar)
- el->el_line.cursor = el->el_line.lastchar;
-
- if (el->el_map.type == MAP_VI)
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
-}
-
-
-/* ed_prev_word():
- * Move to the beginning of the current word
- * [M-b] [b]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_prev_word(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor == el->el_line.buffer)
- return CC_ERROR;
-
- el->el_line.cursor = c__prev_word(el->el_line.cursor, el->el_line.buffer,
- el->el_state.argument,
- ce__isword);
-
- if (el->el_map.type == MAP_VI)
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
-}
-
-
-/* ed_prev_char():
- * Move to the left one character
- * [^B] [^B]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_prev_char(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor > el->el_line.buffer) {
- el->el_line.cursor -= el->el_state.argument;
- if (el->el_line.cursor < el->el_line.buffer)
- el->el_line.cursor = el->el_line.buffer;
-
- if (el->el_map.type == MAP_VI)
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
- }
- else
- return CC_ERROR;
-}
-
-
-/* ed_quoted_insert():
- * Add the next character typed verbatim
- * [^V] [^V]
- */
-protected el_action_t
-ed_quoted_insert(el, c)
- EditLine *el;
- int c;
-{
- int num;
- char tc;
-
- tty_quotemode(el);
- num = el_getc(el, &tc);
- c = (unsigned char) tc;
- tty_noquotemode(el);
- if (num == 1)
- return ed_insert(el, c);
- else
- return ed_end_of_file(el, 0);
-}
-
-
-/* ed_digit():
- * Adds to argument or enters a digit
- */
-protected el_action_t
-ed_digit(el, c)
- EditLine *el;
- int c;
-{
- if (!isdigit((unsigned char) c))
- return CC_ERROR;
-
- if (el->el_state.doingarg) {
- /* if doing an arg, add this in... */
- if (el->el_state.lastcmd == EM_UNIVERSAL_ARGUMENT)
- el->el_state.argument = c - '0';
- else {
- if (el->el_state.argument > 1000000)
- return CC_ERROR;
- el->el_state.argument =
- (el->el_state.argument * 10) + (c - '0');
- }
- return CC_ARGHACK;
- }
- else {
- if (el->el_line.lastchar + 1 >= el->el_line.limit)
- return CC_ERROR;
-
- if (el->el_state.inputmode != MODE_INSERT) {
- el->el_chared.c_undo.buf[el->el_chared.c_undo.isize++] =
- *el->el_line.cursor;
- el->el_chared.c_undo.buf[el->el_chared.c_undo.isize] = '\0';
- c_delafter(el, 1);
- }
- c_insert(el, 1);
- *el->el_line.cursor++ = c;
- el->el_state.doingarg = 0;
- re_fastaddc(el);
- }
- return CC_NORM;
-}
-
-
-/* ed_argument_digit():
- * Digit that starts argument
- * For ESC-n
- */
-protected el_action_t
-ed_argument_digit(el, c)
- EditLine *el;
- register int c;
-{
- if (!isdigit((unsigned char) c))
- return CC_ERROR;
-
- if (el->el_state.doingarg) {
- if (el->el_state.argument > 1000000)
- return CC_ERROR;
- el->el_state.argument = (el->el_state.argument * 10) + (c - '0');
- }
- else { /* else starting an argument */
- el->el_state.argument = c - '0';
- el->el_state.doingarg = 1;
- }
- return CC_ARGHACK;
-}
-
-
-/* ed_unassigned():
- * Indicates unbound character
- * Bound to keys that are not assigned
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_unassigned(el, c)
- EditLine *el;
- int c;
-{
- term_beep(el);
- term__flush();
- return CC_NORM;
-}
-
-
-/**
- ** TTY key handling.
- **/
-
-/* ed_tty_sigint():
- * Tty interrupt character
- * [^C]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_sigint(el, c)
- EditLine *el;
- int c;
-{
- return CC_NORM;
-}
-
-
-/* ed_tty_dsusp():
- * Tty delayed suspend character
- * [^Y]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_dsusp(el, c)
- EditLine *el;
- int c;
-{
- return CC_NORM;
-}
-
-
-/* ed_tty_flush_output():
- * Tty flush output characters
- * [^O]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_flush_output(el, c)
- EditLine *el;
- int c;
-{
- return CC_NORM;
-}
-
-
-/* ed_tty_sigquit():
- * Tty quit character
- * [^\]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_sigquit(el, c)
- EditLine *el;
- int c;
-{
- return CC_NORM;
-}
-
-
-/* ed_tty_sigtstp():
- * Tty suspend character
- * [^Z]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_sigtstp(el, c)
- EditLine *el;
- int c;
-{
- return CC_NORM;
-}
-
-
-/* ed_tty_stop_output():
- * Tty disallow output characters
- * [^S]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_stop_output(el, c)
- EditLine *el;
- int c;
-{
- return CC_NORM;
-}
-
-
-/* ed_tty_start_output():
- * Tty allow output characters
- * [^Q]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_start_output(el, c)
- EditLine *el;
- int c;
-{
- return CC_NORM;
-}
-
-
-/* ed_newline():
- * Execute command
- * [^J]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_newline(el, c)
- EditLine *el;
- int c;
-{
- re_goto_bottom(el);
- *el->el_line.lastchar++ = '\n';
- *el->el_line.lastchar = '\0';
- if (el->el_map.type == MAP_VI)
- el->el_chared.c_vcmd.ins = el->el_line.buffer;
- return CC_NEWLINE;
-}
-
-
-/* ed_delete_prev_char():
- * Delete the character to the left of the cursor
- * [^?]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_delete_prev_char(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor <= el->el_line.buffer)
- return CC_ERROR;
-
- c_delbefore(el, el->el_state.argument);
- el->el_line.cursor -= el->el_state.argument;
- if (el->el_line.cursor < el->el_line.buffer)
- el->el_line.cursor = el->el_line.buffer;
- return CC_REFRESH;
-}
-
-
-/* ed_clear_screen():
- * Clear screen leaving current line at the top
- * [^L]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_clear_screen(el, c)
- EditLine *el;
- int c;
-{
- term_clear_screen(el); /* clear the whole real screen */
- re_clear_display(el); /* reset everything */
- return CC_REFRESH;
-}
-
-
-/* ed_redisplay():
- * Redisplay everything
- * ^R
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_redisplay(el, c)
- EditLine *el;
- int c;
-{
- return CC_REDISPLAY;
-}
-
-
-/* ed_start_over():
- * Erase current line and start from scratch
- * [^G]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_start_over(el, c)
- EditLine *el;
- int c;
-{
- ch_reset(el);
- return CC_REFRESH;
-}
-
-
-/* ed_sequence_lead_in():
- * First character in a bound sequence
- * Placeholder for external keys
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_sequence_lead_in(el, c)
- EditLine *el;
- int c;
-{
- return CC_NORM;
-}
-
-
-/* ed_prev_history():
- * Move to the previous history line
- * [^P] [k]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_prev_history(el, c)
- EditLine *el;
- int c;
-{
- char beep = 0;
-
- el->el_chared.c_undo.action = NOP;
- *el->el_line.lastchar = '\0'; /* just in case */
-
- if (el->el_history.eventno == 0) { /* save the current buffer away */
- (void) strncpy(el->el_history.buf, el->el_line.buffer, EL_BUFSIZ);
- el->el_history.last = el->el_history.buf +
- (el->el_line.lastchar - el->el_line.buffer);
- }
-
- el->el_history.eventno += el->el_state.argument;
-
- if (hist_get(el) == CC_ERROR) {
- beep = 1;
- /* el->el_history.eventno was fixed by first call */
- (void) hist_get(el);
- }
-
- re_refresh(el);
- if (beep)
- return CC_ERROR;
- else
- return CC_NORM; /* was CC_UP_HIST */
-}
-
-
-/* ed_next_history():
- * Move to the next history line
- * [^N] [j]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_next_history(el, c)
- EditLine *el;
- int c;
-{
- el->el_chared.c_undo.action = NOP;
- *el->el_line.lastchar = '\0'; /* just in case */
-
- el->el_history.eventno -= el->el_state.argument;
-
- if (el->el_history.eventno < 0) {
- el->el_history.eventno = 0;
- return CC_ERROR; /* make it beep */
- }
-
- return hist_get(el);
-}
-
-
-/* ed_search_prev_history():
- * Search previous in history for a line matching the current
- * next search history [M-P] [K]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_search_prev_history(el, c)
- EditLine *el;
- int c;
-{
- const char *hp;
- int h;
- bool_t found = 0;
-
- el->el_chared.c_vcmd.action = NOP;
- el->el_chared.c_undo.action = NOP;
- *el->el_line.lastchar = '\0'; /* just in case */
- if (el->el_history.eventno < 0) {
-#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile, "e_prev_search_hist(): eventno < 0;\n");
-#endif
- el->el_history.eventno = 0;
- return CC_ERROR;
- }
-
- if (el->el_history.eventno == 0) {
- (void) strncpy(el->el_history.buf, el->el_line.buffer, EL_BUFSIZ);
- el->el_history.last = el->el_history.buf +
- (el->el_line.lastchar - el->el_line.buffer);
- }
-
-
- if (el->el_history.ref == NULL)
- return CC_ERROR;
-
- hp = HIST_FIRST(el);
- if (hp == NULL)
- return CC_ERROR;
-
- c_setpat(el); /* Set search pattern !! */
-
- for (h = 1; h <= el->el_history.eventno; h++)
- hp = HIST_NEXT(el);
-
- while (hp != NULL) {
-#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp);
-#endif
- if ((strncmp(hp, el->el_line.buffer,
- el->el_line.lastchar - el->el_line.buffer) ||
- hp[el->el_line.lastchar-el->el_line.buffer]) &&
- c_hmatch(el, hp)) {
- found++;
- break;
- }
- h++;
- hp = HIST_NEXT(el);
- }
-
- if (!found) {
-#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "not found\n");
-#endif
- return CC_ERROR;
- }
-
- el->el_history.eventno = h;
-
- return hist_get(el);
-}
-
-
-/* ed_search_next_history():
- * Search next in history for a line matching the current
- * [M-N] [J]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_search_next_history(el, c)
- EditLine *el;
- int c;
-{
- const char *hp;
- int h;
- bool_t found = 0;
-
- el->el_chared.c_vcmd.action = NOP;
- el->el_chared.c_undo.action = NOP;
- *el->el_line.lastchar = '\0'; /* just in case */
-
- if (el->el_history.eventno == 0)
- return CC_ERROR;
-
- if (el->el_history.ref == NULL)
- return CC_ERROR;
-
- hp = HIST_FIRST(el);
- if (hp == NULL)
- return CC_ERROR;
-
- c_setpat(el); /* Set search pattern !! */
-
- for (h = 1; h < el->el_history.eventno && hp; h++) {
-#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "Comparing with \"%s\"\n", hp);
-#endif
- if ((strncmp(hp, el->el_line.buffer,
- el->el_line.lastchar - el->el_line.buffer) ||
- hp[el->el_line.lastchar-el->el_line.buffer]) &&
- c_hmatch(el, hp))
- found = h;
- hp = HIST_NEXT(el);
- }
-
- if (!found) { /* is it the current history number? */
- if (!c_hmatch(el, el->el_history.buf)) {
-#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "not found\n");
-#endif
- return CC_ERROR;
- }
- }
-
- el->el_history.eventno = found;
-
- return hist_get(el);
-}
-
-
-/* ed_prev_line():
- * Move up one line
- * Could be [k] [^p]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_prev_line(el, c)
- EditLine *el;
- int c;
-{
- char *ptr;
- int nchars = c_hpos(el);
-
- /*
- * Move to the line requested
- */
- if (*(ptr = el->el_line.cursor) == '\n')
- ptr--;
-
- for (; ptr >= el->el_line.buffer; ptr--)
- if (*ptr == '\n' && --el->el_state.argument <= 0)
- break;
-
- if (el->el_state.argument > 0)
- return CC_ERROR;
-
- /*
- * Move to the beginning of the line
- */
- for (ptr--; ptr >= el->el_line.buffer && *ptr != '\n'; ptr--)
- continue;
-
- /*
- * Move to the character requested
- */
- for (ptr++;
- nchars-- > 0 && ptr < el->el_line.lastchar && *ptr != '\n';
- ptr++)
- continue;
-
- el->el_line.cursor = ptr;
- return CC_CURSOR;
-}
-
-
-/* ed_next_line():
- * Move down one line
- * Could be [j] [^n]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_next_line(el, c)
- EditLine *el;
- int c;
-{
- char *ptr;
- int nchars = c_hpos(el);
-
- /*
- * Move to the line requested
- */
- for (ptr = el->el_line.cursor; ptr < el->el_line.lastchar; ptr++)
- if (*ptr == '\n' && --el->el_state.argument <= 0)
- break;
-
- if (el->el_state.argument > 0)
- return CC_ERROR;
-
- /*
- * Move to the character requested
- */
- for (ptr++;
- nchars-- > 0 && ptr < el->el_line.lastchar && *ptr != '\n';
- ptr++)
- continue;
-
- el->el_line.cursor = ptr;
- return CC_CURSOR;
-}
-
-
-/* ed_command():
- * Editline extended command
- * [M-X] [:]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_command(el, c)
- EditLine *el;
- int c;
-{
- char tmpbuf[EL_BUFSIZ];
- int tmplen;
-
- el->el_line.buffer[0] = '\0';
- el->el_line.lastchar = el->el_line.buffer;
- el->el_line.cursor = el->el_line.buffer;
-
- c_insert(el, 3); /* prompt + ": " */
- *el->el_line.cursor++ = '\n';
- *el->el_line.cursor++ = ':';
- *el->el_line.cursor++ = ' ';
- re_refresh(el);
-
- tmplen = c_gets(el, tmpbuf);
- tmpbuf[tmplen] = '\0';
-
- el->el_line.buffer[0] = '\0';
- el->el_line.lastchar = el->el_line.buffer;
- el->el_line.cursor = el->el_line.buffer;
-
- if (parse_line(el, tmpbuf) == -1)
- return CC_ERROR;
- else
- return CC_REFRESH;
-}
diff --git a/lib/libedit/editline.3 b/lib/libedit/editline.3
deleted file mode 100644
index fc39973..0000000
--- a/lib/libedit/editline.3
+++ /dev/null
@@ -1,532 +0,0 @@
-.\" $NetBSD: editline.3,v 1.4 1997/01/14 04:17:23 lukem Exp $
-.\"
-.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation 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 BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd January 11, 1997
-.Os BSD 4.4
-.Dt EDITLINE 3
-.Sh NAME
-.Nm editline ,
-.Nm el_init ,
-.Nm el_end ,
-.Nm el_reset ,
-.Nm el_gets ,
-.Nm el_getc ,
-.Nm el_push ,
-.Nm el_parse ,
-.Nm el_set ,
-.Nm el_source ,
-.Nm el_resize ,
-.Nm el_line ,
-.Nm el_insertstr ,
-.Nm el_deletestr ,
-.Nm history_init ,
-.Nm history_end ,
-.Nm history
-.Nd line editor and history functions
-.Sh SYNOPSIS
-.Fd #include <histedit.h>
-.Ft EditLine *
-.Fn el_init "const char *prog" "FILE *fin" "FILE *fout"
-.Ft void
-.Fn el_end "EditLine *e"
-.Ft void
-.Fn el_reset "EditLine *e"
-.Ft const char *
-.Fn el_gets "EditLine *e" "int *count"
-.Ft int
-.Fn el_getc "EditLine *e" "char *ch"
-.Ft void
-.Fn el_push "EditLine *e" "const char *str"
-.Ft int
-.Fn el_parse "EditLine *e" "int argc" "char *argv[]"
-.Ft int
-.Fn el_set "EditLine *e" "int op" "..."
-.Ft int
-.Fn el_source "EditLine *e" "const char *file"
-.Ft void
-.Fn el_resize "EditLine *e"
-.Ft const LineInfo *
-.Fn el_line "EditLine *e"
-.Ft int
-.Fn el_insertstr "EditLine *e" "char *str"
-.Ft void
-.Fn el_deletestr "EditLine *e" "int count"
-.Ft History *
-.Fn history_init
-.Ft void
-.Fn history_end "History *h"
-.Ft HistEvent *
-.Fn history "History h" "int op" "..."
-.Sh DESCRIPTION
-The
-.Nm
-library provides generic line editing and history functions,
-similar to those found in
-.Xr sh 1 .
-.Pp
-These functions are available in the
-.Nm libedit
-library (which needs the
-.Nm libtermcap
-library).
-Programs should be linked with
-.Fl ledit ltermcap .
-.Sh LINE EDITING FUNCTIONS
-The line editing functions use a common data structure,
-.Fa EditLine ,
-which is created by
-.Fn el_init
-and freed by
-.Fn el_end .
-.Pp
-The following functions are available:
-.Bl -tag -width 4n
-.It Fn el_init
-Initialise the line editor, and return a data structure
-to be used by all other line editing functions.
-.Fa prog
-is the name of the invoking program, used when reading the
-.Xr editrc 5
-file to determine which settings to use.
-.Fa fin
-and
-.Fa fout
-are the input and output streams (respectively) to use.
-In this documentation, references to
-.Dq the tty
-are actually to this input/output stream combination.
-.It Fn el_end
-Clean up and finish with
-.Fa e ,
-assumed to have been created with
-.Fn el_init .
-.It Fn el_reset
-Reset the tty and the parser.
-This should be called after an error which may have upset the tty's
-state.
-.It Fn el_gets
-Read a line from the tty.
-.Fa count
-is modified to contain the number of characters read.
-Returns the line read if successful, or
-.Dv NULL
-if no characters were read or if an error occurred.
-.It Fn el_getc
-Read a character from the tty.
-.Fa ch
-is modified to contain the character read.
-Returns the number of characters read if successful, -1 otherwise.
-.It Fn el_push
-Pushes
-.Fa str
-back onto the input stream.
-This is used by the macro expansion mechanism.
-Refer to the description of
-.Ic bind
-.Fl s
-in
-.Xr editrc 5
-for more information.
-.It Fn el_parse
-Parses the
-.Fa argv
-array (which is
-.Fa argc
-elements in size)
-to execute builtin
-.Nm
-commands.
-If the command is prefixed with
-.Dq prog:
-then
-.Fn el_parse
-will only execute the command if
-.Dq prog
-matches the
-.Fa prog
-argument supplied to
-.Fn el_init .
-The return value is
--1 if the command is unknown,
-0 if there was no error or
-.Dq prog
-didn't match, or
-1 if the command returned an error.
-Refer to
-.Xr editrc 5
-for more information.
-.Pp
-.Em NOTE:
-.Va argv[0]
-may be modified by
-.Fn el_parse .
-The colon between
-.Dq prog
-and the command,
-.Ar command ,
-will be replaced with a NUL
-.Po
-.Dq \e0
-.Pc .
-.It Fn el_set
-Set
-.Nm
-parameters.
-.Fa op
-determines which parameter to set, and each operation has its
-own parameter list.
-.Pp
-The following values for
-.Fa op
-are supported, along with the required argument list:
-.Bl -tag -width 4n
-.It Dv EL_PROMPT , Fa "char *(*f)(EditLine *)"
-Define prompt printing function as
-.Fa f ,
-which is to return a string that contains the prompt.
-.It Dv EL_TERMINAL , Fa "const char *type"
-Define terminal type of the tty to be
-.Fa type ,
-or to
-.Ev TERM
-if
-.Fa type
-is
-.Dv NULL .
-.It Dv EL_EDITOR , Fa "const char *mode"
-Set editing mode to
-.Fa mode ,
-which must be one of
-.Dq emacs
-or
-.Dq vi .
-.It Dv EL_SIGNAL , Fa "int flag"
-If
-.Fa flag
-is non-zero,
-.Nm
-will install its own signal handler for the following signals when
-reading command input:
-.Dv SIGCONT ,
-.Dv SIGHUP ,
-.Dv SIGINT ,
-.Dv SIGQUIT ,
-.Dv SIGSTOP ,
-.Dv SIGTERM ,
-.Dv SIGTSTP ,
-and
-.Dv SIGWINCH .
-Otherwise, the current signal handlers will be used.
-.It Dv EL_BIND , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
-Perform the
-.Ic bind
-builtin command.
-Refer to
-.Xr editrc 5
-for more information.
-.It Dv EL_ECHOTC , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
-Perform the
-.Ic echotc
-builtin command.
-Refer to
-.Xr editrc 5
-for more information.
-.It Dv EL_SETTC , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
-Perform the
-.Ic settc
-builtin command.
-Refer to
-.Xr editrc 5
-for more information.
-.It Dv EL_SETTY , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
-Perform the
-.Ic setty
-builtin command.
-Refer to
-.Xr editrc 5
-for more information.
-.It Dv EL_TELLTC , Xo
-.Fa "const char *" ,
-.Fa "..." ,
-.Dv NULL
-.Xc
-Perform the
-.Ic telltc
-builtin command.
-Refer to
-.Xr editrc 5
-for more information.
-.It Dv EL_ADDFN , Xo
-.Fa "const char *name" ,
-.Fa "const char *help" ,
-.Fa "unsigned char (*func)(EditLine *e, int ch)
-.Xc
-Add a user defined function,
-.Fn func ,
-referred to as
-.Fa name
-which is invoked when a key which is bound to
-.Fa name
-is entered.
-.Fa help
-is a description of
-.Fa name .
-At invocation time,
-.Fa ch
-is the key which caused the invocation.
-The return value of
-.Fn func
-should be one of:
-.Bl -tag -width "CC_REDISPLAY"
-.It Dv CC_NORM
-Add a normal character.
-.It Dv CC_NEWLINE
-End of line was entered.
-.It Dv CC_EOF
-EOF was entered.
-.It Dv CC_ARGHACK
-Expecting further command input as arguments, do nothing visually.
-.It Dv CC_REFRESH
-Refresh display.
-.It Dv CC_CURSOR
-Cursor moved, so update and perform
-.Dv CC_REFRESH.
-.It Dv CC_REDISPLAY
-Redisplay entire input line.
-This is useful if a key binding outputs extra information.
-.It Dv CC_ERROR
-An error occurred.
-Beep, and flush tty.
-.It Dv CC_FATAL
-Fatal error, reset tty to known state.
-.El
-.It Dv EL_HIST , Xo
-.Fa "History *(*func)(History *, int op, ...)" ,
-.Fa "const char *ptr"
-.Xc
-Defines which history function to use, which is usually
-.Fn history .
-.Fa ptr
-should be the value returned by
-.Fn history_init .
-.El
-.It Fn el_source
-Initialise
-.Nm
-by reading the contents of
-.Fa file .
-.Fn el_parse
-is called for each line in
-.Fa file .
-If
-.Fa file
-is
-.Dv NULL ,
-try
-.Pa $PWD/.editrc
-then
-.Pa $HOME/.editrc .
-Refer to
-.Xr editrc 5
-for details on the format of
-.Fa file .
-.It Fn el_resize
-Must be called if the terminal size changes.
-If
-.Dv EL_SIGNAL
-has been set with
-.Fn el_set ,
-then this is done automatically.
-Otherwise, it's the responsibility of the application to call
-.Fn el_resize
-on the appropriate occasions.
-.It Fn el_line
-Return the editing information for the current line in a
-.Fa LineInfo
-structure, which is defined as follows:
-.Bd -literal
-typedef struct lineinfo {
- const char *buffer; /* address of buffer */
- const char *cursor; /* address of cursor */
- const char *lastchar; /* address of last character */
-} LineInfo;
-.Ed
-.It Fn el_insertstr
-Insert
-.Fa str
-into the line at the cursor.
-Returns -1 if
-.Fa str
-is empty or won't fit, and 0 otherwise.
-.It Fn el_deletestr
-Delete
-.Fa num
-characters before the cursor.
-.El
-.Sh HISTORY LIST FUNCTIONS
-The history functions use a common data structure,
-.Fa History ,
-which is created by
-.Fn history_init
-and freed by
-.Fn history_end .
-.Pp
-The following functions are available:
-.Bl -tag -width 4n
-.It Fn history_init
-Initialise the history list, and return a data structure
-to be used by all other history list functions.
-.It Fn history_end
-Clean up and finish with
-.Fa h ,
-assumed to have been created with
-.Fn history_init .
-.It Fn history
-Perform operation
-.Fa op
-on the history list, with optional arguments as needed by the
-operation.
-The following values for
-.Fa op
-are supported, along with the required argument list:
-.Bl -tag -width 4n
-.It Dv H_EVENT , Fa "int size"
-Set size of history to
-.Fa size
-elements.
-.It Dv H_END
-Cleans up and finishes with
-.Fa h ,
-assumed to be created with
-.Fn history_init .
-.It Dv H_CLEAR
-Clear the history.
-.It Dv H_FUNC , Xo
-.Fa "void *ptr" ,
-.Fa "history_gfun_t first" ,
-.Fa "history_gfun_t next" ,
-.Fa "history_gfun_t last" ,
-.Fa "history_gfun_t prev" ,
-.Fa "history_gfun_t curr" ,
-.Fa "history_vfun_t clear" ,
-.Fa "history_efun_t enter" ,
-.Fa "history_efun_t add"
-.Xc
-Define functions to perform various history operations.
-.Fa ptr
-is the argument given to a function when it's invoked.
-.It Dv H_FIRST
-Return the first element in the history.
-.It Dv H_LAST
-Return the last element in the history.
-.It Dv H_PREV
-Return the previous element in the history.
-.It Dv H_NEXT
-Return the next element in the history.
-.It Dv H_CURR
-Return the current element in the history.
-.It Dv H_ADD , Fa "const char *str"
-Append
-.Fa str
-to the current element of the history, or create an element with
-.Dv H_ENTER
-if there isn't one.
-.It Dv H_ENTER , Fa "const char *str"
-Add
-.Fa str
-as a new element to the history, and, if necessary,
-removing the oldest entry to keep the list to the created size.
-.It Dv H_PREV_STR , Fa "const char *str"
-Return the closest previous event that starts with
-.Fa str .
-.It Dv H_NEXT_STR , Fa "const char *str"
-Return the closest next event that starts with
-.Fa str .
-.It Dv H_PREV_EVENT , Fa "int e"
-Return the previous event numbered
-.Fa e .
-.It Dv H_NEXT_EVENT , Fa "int e"
-Return the next event numbered
-.Fa e .
-.It Dv H_LOAD , Fa "const char *file"
-Load the history list stored in
-.Fa file .
-.It Dv H_SAVE , Fa "const char *file"
-Save the history list to
-.Fa file .
-.El
-.El
-.\"XXX.Sh EXAMPLES
-.\"XXX: provide some examples
-.Sh SEE ALSO
-.Xr sh 1 ,
-.Xr signal 3 ,
-.Xr termcap 3 ,
-.Xr editrc 5
-.Sh HISTORY
-The
-.Nm
-library first appeared in
-.Bx 4.4 .
-.Sh AUTHORS
-The
-.Nm
-library was written by Christos Zoulas,
-and this manual was written by Luke Mewburn.
-.Sh BUGS
-This documentation is probably incomplete.
-.Pp
-.Fn el_parse
-should not modify the supplied
-.Va argv[0] .
-.Pp
-The tokenization functions are not publically defined in
-.Fd <histedit.h>
diff --git a/lib/libedit/editrc.5 b/lib/libedit/editrc.5
deleted file mode 100644
index e9b2992..0000000
--- a/lib/libedit/editrc.5
+++ /dev/null
@@ -1,292 +0,0 @@
-.\" $NetBSD: editrc.5,v 1.4 1997/04/24 20:20:31 christos Exp $
-.\"
-.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the NetBSD
-.\" Foundation, Inc. and its contributors.
-.\" 4. Neither the name of The NetBSD Foundation 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 BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
-.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd January 11, 1997
-.Os BSD 4.4
-.Dt EDITRC 5
-.Sh NAME
-.Nm editrc
-.Nd configuration file for editline library
-.Sh SYNOPSIS
-.Nm
-.Sh DESCRIPTION
-The
-.Nm
-file defines various settings to be used by the
-.Xr editline 3
-library.
-.Pp
-The format of each line is either:
-.Dl prog:command [arg [...]]
-or
-.Dl command [arg [...]]
-.Pp
-.Ar command
-is one of the
-.Xr editline 3
-builtin commands.
-Refer to
-.Sx BUILTIN COMMANDS
-for more information.
-.Pp
-.Ar prog
-is the program name string that a program defines when it calls
-.Xr el_init 3
-to setup
-.Xr editline 3 ,
-which is usually
-.Va argv[0] .
-.Ar command
-will be executed for any program which matches
-.Ar prog .
-.Pp
-.Ar prog
-may also be a
-.Xr regex 3
-style
-regular expression, in which case
-.Ar command
-will be executed for any program that matches the regular expression.
-.Sh BUILTIN COMMANDS
-The
-.Nm editline
-library has some builtin commands, which affect the way
-that the line editing and history functions operate.
-These are based on similar named builtins present in the
-.Xr tcsh 1
-shell.
-.Pp
-The following builtin commands are available:
-.Bl -tag -width 4n
-.It Ic bind Xo
-.Op Fl a
-.Op Fl e
-.Op Fl k
-.Op Fl l
-.Op Fl r
-.Op Fl s
-.Op Fl v
-.Op Ar key Op Ar command
-.Xc
-Without options, list all bound keys, and the editor command to which
-each is bound.
-If
-.Ar key
-is supplied, show the bindings for
-.Ar key .
-If
-.Ar key command
-is supplied, bind
-.Ar command
-to
-.Ar key .
-Options include:
-.Bl -tag -width 4n
-.It Fl e
-Bind all keys to the standard GNU Emacs-like bindings.
-.It Fl v
-Bind all keys to the standard
-.Xr vi 1 -like
-bindings.
-.It Fl a
-List or change key bindings in the
-.Xr vi 1
-mode alternate (command mode) key map.
-.It Fl k
-.Ar key
-is interpreted as a symbolic arrow key name, which may be one of
-.Sq up ,
-.Sq down ,
-.Sq left
-or
-.Sq right .
-.It Fl l
-List all editor commands and a short description of each.
-.It Fl r
-Remove a key's binding.
-.It Fl s
-.Ar command
-is taken as a literal string and treated as terminal input when
-.Ar key
-is typed.
-Bound keys in
-.Ar command
-are themselves reinterpreted, and this continues for ten levels of
-interpretation.
-.El
-.Pp
-.Ar key
-and
-.Ar command
-can contain control characters of the form
-.Sm off
-.Sq No ^ Ar character
-.Sm on
-.Po
-e.g.
-.Sq ^A
-.Pc ,
-and the following backslashed escape sequences:
-.Pp
-.Bl -tag -compact -offset indent -width 4n
-.It Ic \ea
-Bell
-.It Ic \eb
-Backspace
-.It Ic \ee
-Escape
-.It Ic \ef
-Formfeed
-.It Ic \en
-Newline
-.It Ic \er
-Carriage return
-.It Ic \et
-Horizontal tab
-.It Ic \ev
-Vertical tab
-.Sm off
-.It Sy \e Ar nnn
-.Sm on
-The ASCII character corresponding to the octal number
-.Ar nnn .
-.El
-.Pp
-.Sq \e
-nullifies the special meaning of the following character,
-if it has any, notably
-.Sq \e
-and
-.Sq ^ .
-.It Ic echotc Xo
-.Op Fl sv
-.Ar arg
-.Ar ...
-.Xc
-Exercise terminal capabilities given in
-.Ar arg Ar ... .
-If
-.Ar arg
-is
-.Sq baud ,
-.Sq cols ,
-.Sq lines ,
-.Sq rows ,
-.Sq meta or
-.Sq tabs ,
-the value of that capability is printed, with
-.Dq yes
-or
-.Dq no
-indicating that the terminal does or does not have that capability.
-.Pp
-.Fl s
-returns an emptry string for non-existant capabilities, rather than
-causing an error.
-.Fl v
-causes messages to be verbose.
-.It Ic history
-List the history.
-.It Ic telltc
-List the values of all the terminal capabilities (see
-.Xr termcap 5 ).
-.It Ic settc Ar cap Ar val
-Set the terminal capability
-.Ar cap
-to
-.Ar val ,
-as defined in
-.Xr termcap 5 .
-No sanity checking is done.
-.It Ic setty Xo
-.Op Fl a
-.Op Fl d
-.Op Fl q
-.Op Fl x
-.Op Ar +mode
-.Op Ar -mode
-.Op Ar mode
-.Xc
-Control which tty modes that
-.Nm
-won't allow the user to change.
-.Fl d ,
-.Fl q
-or
-.Fl x
-tells
-.Ic setty
-to act on the
-.Sq edit ,
-.Sq quote
-or
-.Sq execute
-set of tty modes respectively; defaulting to
-.Fl x .
-.Pp
-Without other arguments,
-.Ic setty
-lists the modes in the chosen set which are fixed on
-.Po
-.Sq +mode
-.Pc
-or off
-.Po
-.Sq -mode
-.Pc .
-.Fl a
-lists all tty modes in the chosen set regardless of the setting.
-With
-.Ar +mode ,
-.Ar -mode
-or
-.Ar mode ,
-fixes
-.Ar mode
-on or off or removes control of
-.Ar mode
-in the chosen set.
-.El
-.Sh SEE ALSO
-.Xr editline 3 ,
-.Xr regex 3 ,
-.Xr termcap 5
-.Sh AUTHORS
-The
-.Nm editline
-library was written by Christos Zoulas,
-and this manual was written by Luke Mewburn,
-with some sections inspired by
-.Xr tcsh 1 .
diff --git a/lib/libedit/el.c b/lib/libedit/el.c
deleted file mode 100644
index f163ec8..0000000
--- a/lib/libedit/el.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94";
-#endif /* not lint && not SCCSID */
-
-/*
- * el.c: EditLine interface functions
- */
-#include "sys.h"
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <string.h>
-#include <stdlib.h>
-#if __STDC__
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
-#include "el.h"
-
-/* el_init():
- * Initialize editline and set default parameters.
- */
-public EditLine *
-el_init(prog, fin, fout)
- const char *prog;
- FILE *fin, *fout;
-{
- EditLine *el = (EditLine *) el_malloc(sizeof(EditLine));
-#ifdef DEBUG
- char *tty;
-#endif
-
- if (el == NULL)
- return NULL;
-
- memset(el, 0, sizeof(EditLine));
-
- el->el_infd = fileno(fin);
- el->el_outfile = fout;
- el->el_prog = strdup(prog);
-
-#ifdef DEBUG
- if ((tty = getenv("DEBUGTTY")) != NULL) {
- el->el_errfile = fopen(tty, "w");
- if (el->el_errfile == NULL) {
- extern errno;
- (void) fprintf(stderr, "Cannot open %s (%s).\n",
- tty, strerror(errno));
- return NULL;
- }
- }
- else
-#endif
- el->el_errfile = stderr;
-
- /*
- * Initialize all the modules. Order is important!!!
- */
- (void) term_init(el);
- (void) tty_init(el);
- (void) key_init(el);
- (void) map_init(el);
- (void) ch_init(el);
- (void) search_init(el);
- (void) hist_init(el);
- (void) prompt_init(el);
- (void) sig_init(el);
- el->el_flags = 0;
-
- return el;
-} /* end el_init */
-
-
-/* el_end():
- * Clean up.
- */
-public void
-el_end(el)
- EditLine *el;
-{
- if (el == NULL)
- return;
-
- el_reset(el);
-
- term_end(el);
- tty_end(el);
- key_end(el);
- map_end(el);
- ch_end(el);
- search_end(el);
- hist_end(el);
- prompt_end(el);
- sig_end(el);
-
- el_free((ptr_t) el->el_prog);
- el_free((ptr_t) el);
-} /* end el_end */
-
-
-/* el_reset():
- * Reset the tty and the parser
- */
-public void
-el_reset(el)
- EditLine *el;
-{
- tty_cookedmode(el);
- ch_reset(el); /* XXX: Do we want that? */
-}
-
-
-/* el_set():
- * set the editline parameters
- */
-public int
-#if __STDC__
-el_set(EditLine *el, int op, ...)
-#else
-el_set(va_alist)
- va_dcl
-#endif
-{
- va_list va;
- int rv;
-#if __STDC__
- va_start(va, op);
-#else
- EditLine *el;
- int op;
-
- va_start(va);
- el = va_arg(va, EditLine *);
- op = va_arg(va, int);
-#endif
-
- switch (op) {
- case EL_PROMPT:
- rv = prompt_set(el, va_arg(va, el_pfunc_t));
- break;
-
- case EL_TERMINAL:
- rv = term_set(el, va_arg(va, char *));
- break;
-
- case EL_EDITOR:
- rv = map_set_editor(el, va_arg(va, char *));
- break;
-
- case EL_SIGNAL:
- if (va_arg(va, int))
- el->el_flags |= HANDLE_SIGNALS;
- else
- el->el_flags &= ~HANDLE_SIGNALS;
- rv = 0;
- break;
-
- case EL_BIND:
- case EL_TELLTC:
- case EL_SETTC:
- case EL_ECHOTC:
- case EL_SETTY:
- {
- char *argv[20];
- int i;
- for (i = 1; i < 20; i++)
- if ((argv[i] = va_arg(va, char *)) == NULL)
- break;
-
- switch (op) {
- case EL_BIND:
- argv[0] = "bind";
- rv = map_bind(el, i, argv);
- break;
-
- case EL_TELLTC:
- argv[0] = "telltc";
- rv = term_telltc(el, i, argv);
- break;
-
- case EL_SETTC:
- argv[0] = "settc";
- rv = term_settc(el, i, argv);
- break;
-
- case EL_ECHOTC:
- argv[0] = "echotc";
- rv = term_echotc(el, i, argv);
- break;
-
- case EL_SETTY:
- argv[0] = "setty";
- rv = tty_stty(el, i, argv);
- break;
-
- default:
- rv = -1;
- abort();
- break;
- }
- }
- break;
-
- case EL_ADDFN:
- {
- char *name = va_arg(va, char *);
- char *help = va_arg(va, char *);
- el_func_t func = va_arg(va, el_func_t);
- rv = map_addfunc(el, name, help, func);
- }
- break;
-
- case EL_HIST:
- {
- hist_fun_t func = va_arg(va, hist_fun_t);
- ptr_t ptr = va_arg(va, char *);
- rv = hist_set(el, func, ptr);
- }
- break;
-
- default:
- rv = -1;
- }
-
- va_end(va);
- return rv;
-} /* end el_set */
-
-
-/* el_line():
- * Return editing info
- */
-public const LineInfo *
-el_line(el)
- EditLine *el;
-{
- return (const LineInfo *) &el->el_line;
-}
-
-static const char elpath[] = "/.editrc";
-
-/* el_source():
- * Source a file
- */
-public int
-el_source(el, fname)
- EditLine *el;
- const char *fname;
-{
- FILE *fp;
- size_t len;
- char *ptr, path[MAXPATHLEN];
-
- if (fname == NULL) {
- fname = &elpath[1];
- if ((fp = fopen(fname, "r")) == NULL) {
- if ((ptr = getenv("HOME")) == NULL)
- return -1;
- (void)snprintf(path, sizeof(path), "%s%s", ptr, elpath);
- fname = path;
- }
- }
-
- if ((fp = fopen(fname, "r")) == NULL)
- return -1;
-
- while ((ptr = fgetln(fp, &len)) != NULL) {
- if (ptr[len - 1] == '\n')
- --len;
- ptr[len] = '\0';
-
- if (parse_line(el, ptr) == -1) {
- (void) fclose(fp);
- return -1;
- }
- }
-
- (void) fclose(fp);
- return 0;
-}
-
-
-/* el_resize():
- * Called from program when terminal is resized
- */
-public void
-el_resize(el)
- EditLine *el;
-{
- int lins, cols;
- sigset_t oset, nset;
- (void) sigemptyset(&nset);
- (void) sigaddset(&nset, SIGWINCH);
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
-
- /* get the correct window size */
- if (term_get_size(el, &lins, &cols))
- term_change_size(el, lins, cols);
-
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
-}
diff --git a/lib/libedit/el.h b/lib/libedit/el.h
deleted file mode 100644
index 77cce15..0000000
--- a/lib/libedit/el.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)el.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.h: Internal structures.
- */
-#ifndef _h_el
-#define _h_el
-/*
- * Local defaults
- */
-#define KSHVI
-#define VIDEFAULT
-#define ANCHOR
-
-#include <stdio.h>
-#include <sys/types.h>
-
-#define EL_BUFSIZ 1024 /* Maximum line size */
-
-#define HANDLE_SIGNALS 1
-
-typedef int bool_t; /* True or not */
-
-typedef unsigned char el_action_t; /* Index to command array */
-
-typedef struct coord_t { /* Position on the screen */
- int h, v;
-} coord_t;
-
-typedef struct el_line_t {
- char *buffer, /* Input line */
- *cursor, /* Cursor position */
- *lastchar, /* Last character */
- *limit; /* Max position */
-} el_line_t;
-
-/*
- * Editor state
- */
-typedef struct el_state_t {
- int inputmode; /* What mode are we in? */
- int doingarg; /* Are we getting an argument? */
- int argument; /* Numeric argument */
- int metanext; /* Is the next char a meta char */
- el_action_t lastcmd; /* Previous command */
-} el_state_t;
-
-/*
- * Until we come up with something better...
- */
-#define el_malloc(a) malloc(a)
-#define el_realloc(a,b) realloc(a, b)
-#define el_free(a) free(a)
-
-#include "tty.h"
-#include "prompt.h"
-#include "key.h"
-#include "term.h"
-#include "refresh.h"
-#include "chared.h"
-#include "common.h"
-#include "search.h"
-#include "hist.h"
-#include "map.h"
-#include "parse.h"
-#include "sig.h"
-#include "help.h"
-
-struct editline {
- char *el_prog; /* the program name */
- FILE *el_outfile; /* Stdio stuff */
- FILE *el_errfile; /* Stdio stuff */
- int el_infd; /* Input file descriptor */
- int el_flags; /* Various flags. */
- coord_t el_cursor; /* Cursor location */
- char **el_display, /* Real screen image = what is there */
- **el_vdisplay; /* Virtual screen image = what we see */
-
- el_line_t el_line; /* The current line information */
- el_state_t el_state; /* Current editor state */
- el_term_t el_term; /* Terminal dependent stuff */
- el_tty_t el_tty; /* Tty dependent stuff */
- el_refresh_t el_refresh; /* Refresh stuff */
- el_prompt_t el_prompt; /* Prompt stuff */
- el_chared_t el_chared; /* Characted editor stuff */
- el_map_t el_map; /* Key mapping stuff */
- el_key_t el_key; /* Key binding stuff */
- el_history_t el_history; /* History stuff */
- el_search_t el_search; /* Search stuff */
- el_signal_t el_signal; /* Signal handling stuff */
-};
-
-#endif /* _h_el */
diff --git a/lib/libedit/emacs.c b/lib/libedit/emacs.c
deleted file mode 100644
index d84c360..0000000
--- a/lib/libedit/emacs.c
+++ /dev/null
@@ -1,504 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)emacs.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * emacs.c: Emacs functions
- */
-#include "sys.h"
-#include "el.h"
-
-/* em_delete_or_list():
- * Delete character under cursor or list completions if at end of line
- * [^D]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_delete_or_list(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor == el->el_line.lastchar) { /* if I'm at the end */
- if (el->el_line.cursor == el->el_line.buffer) { /* and the beginning */
- term_overwrite(el, STReof, 4);/* then do a EOF */
- term__flush();
- return CC_EOF;
- }
- else {
- /* Here we could list completions, but it is an error right now */
- term_beep(el);
- return CC_ERROR;
- }
- }
- else {
- c_delafter(el, el->el_state.argument); /* delete after dot */
- if (el->el_line.cursor > el->el_line.lastchar)
- el->el_line.cursor = el->el_line.lastchar; /* bounds check */
- return CC_REFRESH;
- }
-}
-
-
-/* em_delete_next_word():
- * Cut from cursor to end of current word
- * [M-d]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_delete_next_word(el, c)
- EditLine *el;
- int c;
-{
- char *cp, *p, *kp;
-
- if (el->el_line.cursor == el->el_line.lastchar)
- return CC_ERROR;
-
- cp = c__next_word(el->el_line.cursor, el->el_line.lastchar,
- el->el_state.argument, ce__isword);
-
- for (p = el->el_line.cursor, kp = el->el_chared.c_kill.buf; p < cp; p++)
- /* save the text */
- *kp++ = *p;
- el->el_chared.c_kill.last = kp;
-
- c_delafter(el, cp - el->el_line.cursor); /* delete after dot */
- if (el->el_line.cursor > el->el_line.lastchar)
- el->el_line.cursor = el->el_line.lastchar; /* bounds check */
- return CC_REFRESH;
-}
-
-
-/* em_yank():
- * Paste cut buffer at cursor position
- * [^Y]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_yank(el, c)
- EditLine *el;
- int c;
-{
- char *kp, *cp;
-
- if (el->el_chared.c_kill.last == el->el_chared.c_kill.buf)
- return CC_ERROR;
-
- if (el->el_line.lastchar +
- (el->el_chared.c_kill.last - el->el_chared.c_kill.buf) >=
- el->el_line.limit)
- return CC_ERROR;
-
- el->el_chared.c_kill.mark = el->el_line.cursor;
- cp = el->el_line.cursor;
-
- /* open the space, */
- c_insert(el, el->el_chared.c_kill.last - el->el_chared.c_kill.buf);
- /* copy the chars */
- for (kp = el->el_chared.c_kill.buf; kp < el->el_chared.c_kill.last; kp++)
- *cp++ = *kp;
-
- /* if an arg, cursor at beginning else cursor at end */
- if (el->el_state.argument == 1)
- el->el_line.cursor = cp;
-
- return CC_REFRESH;
-}
-
-
-/* em_kill_line():
- * Cut the entire line and save in cut buffer
- * [^U]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_kill_line(el, c)
- EditLine *el;
- int c;
-{
- char *kp, *cp;
-
- cp = el->el_line.buffer;
- kp = el->el_chared.c_kill.buf;
- while (cp < el->el_line.lastchar)
- *kp++ = *cp++; /* copy it */
- el->el_chared.c_kill.last = kp;
- el->el_line.lastchar = el->el_line.buffer; /* zap! -- delete all of it */
- el->el_line.cursor = el->el_line.buffer;
- return CC_REFRESH;
-}
-
-
-/* em_kill_region():
- * Cut area between mark and cursor and save in cut buffer
- * [^W]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_kill_region(el, c)
- EditLine *el;
- int c;
-{
- char *kp, *cp;
-
- if (!el->el_chared.c_kill.mark)
- return CC_ERROR;
-
- if (el->el_chared.c_kill.mark > el->el_line.cursor) {
- cp = el->el_line.cursor;
- kp = el->el_chared.c_kill.buf;
- while (cp < el->el_chared.c_kill.mark)
- *kp++ = *cp++; /* copy it */
- el->el_chared.c_kill.last = kp;
- c_delafter(el, cp - el->el_line.cursor);
- }
- else { /* mark is before cursor */
- cp = el->el_chared.c_kill.mark;
- kp = el->el_chared.c_kill.buf;
- while (cp < el->el_line.cursor)
- *kp++ = *cp++; /* copy it */
- el->el_chared.c_kill.last = kp;
- c_delbefore(el, cp - el->el_chared.c_kill.mark);
- el->el_line.cursor = el->el_chared.c_kill.mark;
- }
- return CC_REFRESH;
-}
-
-
-/* em_copy_region():
- * Copy area between mark and cursor to cut buffer
- * [M-W]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_copy_region(el, c)
- EditLine *el;
- int c;
-{
- char *kp, *cp;
-
- if (el->el_chared.c_kill.mark)
- return CC_ERROR;
-
- if (el->el_chared.c_kill.mark > el->el_line.cursor) {
- cp = el->el_line.cursor;
- kp = el->el_chared.c_kill.buf;
- while (cp < el->el_chared.c_kill.mark)
- *kp++ = *cp++; /* copy it */
- el->el_chared.c_kill.last = kp;
- }
- else {
- cp = el->el_chared.c_kill.mark;
- kp = el->el_chared.c_kill.buf;
- while (cp < el->el_line.cursor)
- *kp++ = *cp++; /* copy it */
- el->el_chared.c_kill.last = kp;
- }
- return CC_NORM;
-}
-
-
-/* em_gosmacs_traspose():
- * Exchange the two characters before the cursor
- * Gosling emacs transpose chars [^T]
- */
-protected el_action_t
-em_gosmacs_traspose(el, c)
- EditLine *el;
- int c;
-{
-
- if (el->el_line.cursor > &el->el_line.buffer[1]) {
- /* must have at least two chars entered */
- c = el->el_line.cursor[-2];
- el->el_line.cursor[-2] = el->el_line.cursor[-1];
- el->el_line.cursor[-1] = c;
- return CC_REFRESH;
- }
- else
- return CC_ERROR;
-}
-
-
-/* em_next_word():
- * Move next to end of current word
- * [M-f]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_next_word(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor == el->el_line.lastchar)
- return CC_ERROR;
-
- el->el_line.cursor = c__next_word(el->el_line.cursor, el->el_line.lastchar,
- el->el_state.argument,
- ce__isword);
-
- if (el->el_map.type == MAP_VI)
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
-}
-
-/* em_upper_case():
- * Uppercase the characters from cursor to end of current word
- * [M-u]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_upper_case(el, c)
- EditLine *el;
- int c;
-{
- char *cp, *ep;
-
- ep = c__next_word(el->el_line.cursor, el->el_line.lastchar,
- el->el_state.argument, ce__isword);
-
- for (cp = el->el_line.cursor; cp < ep; cp++)
- if (islower((unsigned char)*cp))
- *cp = toupper((unsigned char)*cp);
-
- el->el_line.cursor = ep;
- if (el->el_line.cursor > el->el_line.lastchar)
- el->el_line.cursor = el->el_line.lastchar;
- return CC_REFRESH;
-}
-
-
-/* em_capitol_case():
- * Capitalize the characters from cursor to end of current word
- * [M-c]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_capitol_case(el, c)
- EditLine *el;
- int c;
-{
- char *cp, *ep;
-
- ep = c__next_word(el->el_line.cursor, el->el_line.lastchar,
- el->el_state.argument, ce__isword);
-
- for (cp = el->el_line.cursor; cp < ep; cp++) {
- if (isalpha((unsigned char)*cp)) {
- if (islower((unsigned char)*cp))
- *cp = toupper((unsigned char)*cp);
- cp++;
- break;
- }
- }
- for (; cp < ep; cp++)
- if (isupper((unsigned char)*cp))
- *cp = tolower((unsigned char)*cp);
-
- el->el_line.cursor = ep;
- if (el->el_line.cursor > el->el_line.lastchar)
- el->el_line.cursor = el->el_line.lastchar;
- return CC_REFRESH;
-}
-
-/* em_lower_case():
- * Lowercase the characters from cursor to end of current word
- * [M-l]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_lower_case(el, c)
- EditLine *el;
- int c;
-{
- char *cp, *ep;
-
- ep = c__next_word(el->el_line.cursor, el->el_line.lastchar,
- el->el_state.argument, ce__isword);
-
- for (cp = el->el_line.cursor; cp < ep; cp++)
- if (isupper((unsigned char)*cp))
- *cp = tolower((unsigned char)*cp);
-
- el->el_line.cursor = ep;
- if (el->el_line.cursor > el->el_line.lastchar)
- el->el_line.cursor = el->el_line.lastchar;
- return CC_REFRESH;
-}
-
-
-/* em_set_mark():
- * Set the mark at cursor
- * [^@]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_set_mark(el, c)
- EditLine *el;
- int c;
-{
- el->el_chared.c_kill.mark = el->el_line.cursor;
- return CC_NORM;
-}
-
-
-/* em_exchange_mark():
- * Exchange the cursor and mark
- * [^X^X]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_exchange_mark(el, c)
- EditLine *el;
- int c;
-{
- register char *cp;
-
- cp = el->el_line.cursor;
- el->el_line.cursor = el->el_chared.c_kill.mark;
- el->el_chared.c_kill.mark = cp;
- return CC_CURSOR;
-}
-
-/* em_universal_argument():
- * Universal argument (argument times 4)
- * [^U]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_universal_argument(el, c)
- EditLine *el;
- int c;
-{ /* multiply current argument by 4 */
- if (el->el_state.argument > 1000000)
- return CC_ERROR;
- el->el_state.doingarg = 1;
- el->el_state.argument *= 4;
- return CC_ARGHACK;
-}
-
-/* em_meta_next():
- * Add 8th bit to next character typed
- * [<ESC>]
- */
-protected el_action_t
-/*ARGSUSED*/
-em_meta_next(el, c)
- EditLine *el;
- int c;
-{
- el->el_state.metanext = 1;
- return CC_ARGHACK;
-}
-
-
-/* em_toggle_overwrite():
- * Switch from insert to overwrite mode or vice versa
- */
-protected el_action_t
-/*ARGSUSED*/
-em_toggle_overwrite(el, c)
- EditLine *el;
- int c;
-{
- el->el_state.inputmode =
- (el->el_state.inputmode == MODE_INSERT) ? MODE_REPLACE : MODE_INSERT;
- return CC_NORM;
-}
-
-
-/* em_copy_prev_word():
- * Copy current word to cursor
- */
-protected el_action_t
-/*ARGSUSED*/
-em_copy_prev_word(el, c)
- EditLine *el;
- int c;
-{
- char *cp, *oldc, *dp;
-
- if (el->el_line.cursor == el->el_line.buffer)
- return CC_ERROR;
-
- oldc = el->el_line.cursor;
- /* does a bounds check */
- cp = c__prev_word(el->el_line.cursor, el->el_line.buffer,
- el->el_state.argument, ce__isword);
-
- c_insert(el, oldc - cp);
- for (dp = oldc; cp < oldc && dp < el->el_line.lastchar; cp++)
- *dp++ = *cp;
-
- el->el_line.cursor = dp; /* put cursor at end */
-
- return CC_REFRESH;
-}
-
-
-/* em_inc_search_next():
- * Emacs incremental next search
- */
-protected el_action_t
-/*ARGSUSED*/
-em_inc_search_next(el, c)
- EditLine *el;
- int c;
-{
- el->el_search.patlen = 0;
- return ce_inc_search(el, ED_SEARCH_NEXT_HISTORY);
-}
-
-
-/* em_inc_search_prev():
- * Emacs incremental reverse search
- */
-protected el_action_t
-/*ARGSUSED*/
-em_inc_search_prev(el, c)
- EditLine *el;
- int c;
-{
- el->el_search.patlen = 0;
- return ce_inc_search(el, ED_SEARCH_PREV_HISTORY);
-}
diff --git a/lib/libedit/hist.c b/lib/libedit/hist.c
deleted file mode 100644
index 27dacd1..0000000
--- a/lib/libedit/hist.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)hist.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * hist.c: History access functions
- */
-#include "sys.h"
-#include <stdlib.h>
-#include "el.h"
-
-/* hist_init():
- * Initialization function.
- */
-protected int
-hist_init(el)
- EditLine *el;
-{
- el->el_history.fun = NULL;
- el->el_history.ref = NULL;
- el->el_history.buf = (char *) el_malloc(EL_BUFSIZ);
- el->el_history.last = el->el_history.buf;
- return 0;
-}
-
-
-/* hist_end():
- * clean up history;
- */
-protected void
-hist_end(el)
- EditLine *el;
-{
- el_free((ptr_t) el->el_history.buf);
- el->el_history.buf = NULL;
-}
-
-
-/* hist_set():
- * Set new history interface
- */
-protected int
-hist_set(el, fun, ptr)
- EditLine *el;
- hist_fun_t fun;
- ptr_t ptr;
-
-{
- el->el_history.ref = ptr;
- el->el_history.fun = fun;
- return 0;
-}
-
-
-/* hist_get():
- * Get a history line and update it in the buffer.
- * eventno tells us the event to get.
- */
-protected el_action_t
-hist_get(el)
- EditLine *el;
-{
- const char *hp;
- int h;
-
- if (el->el_history.eventno == 0) { /* if really the current line */
- (void) strncpy(el->el_line.buffer, el->el_history.buf, EL_BUFSIZ);
- el->el_line.lastchar = el->el_line.buffer +
- (el->el_history.last - el->el_history.buf);
-
-#ifdef KSHVI
- if (el->el_map.type == MAP_VI)
- el->el_line.cursor = el->el_line.buffer;
- else
-#endif /* KSHVI */
- el->el_line.cursor = el->el_line.lastchar;
-
- return CC_REFRESH;
- }
-
- if (el->el_history.ref == NULL)
- return CC_ERROR;
-
- hp = HIST_FIRST(el);
-
- if (hp == NULL)
- return CC_ERROR;
-
- for (h = 1; h < el->el_history.eventno; h++)
- if ((hp = HIST_NEXT(el)) == NULL) {
- el->el_history.eventno = h;
- return CC_ERROR;
- }
-
- (void) strncpy(el->el_line.buffer, hp, EL_BUFSIZ);
- el->el_line.lastchar = el->el_line.buffer + strlen(el->el_line.buffer);
-
- if (el->el_line.lastchar > el->el_line.buffer) {
- if (el->el_line.lastchar[-1] == '\n')
- el->el_line.lastchar--;
- if (el->el_line.lastchar[-1] == ' ')
- el->el_line.lastchar--;
- if (el->el_line.lastchar < el->el_line.buffer)
- el->el_line.lastchar = el->el_line.buffer;
- }
-
-#ifdef KSHVI
- if (el->el_map.type == MAP_VI)
- el->el_line.cursor = el->el_line.buffer;
- else
-#endif /* KSHVI */
- el->el_line.cursor = el->el_line.lastchar;
-
- return CC_REFRESH;
-}
-
-/* hist_list()
- * List history entries
- */
-protected int
-/*ARGSUSED*/
-hist_list(el, argc, argv)
- EditLine *el;
- int argc;
- char **argv;
-{
- const char *str;
-
- if (el->el_history.ref == NULL)
- return -1;
- for (str = HIST_LAST(el); str != NULL; str = HIST_PREV(el))
- (void) fprintf(el->el_outfile, "%d %s", el->el_history.ev->num, str);
- return 0;
-}
diff --git a/lib/libedit/hist.h b/lib/libedit/hist.h
deleted file mode 100644
index 3f0fb9e..0000000
--- a/lib/libedit/hist.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)hist.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.hist.c: History functions
- */
-#ifndef _h_el_hist
-#define _h_el_hist
-
-#include "histedit.h"
-
-typedef const HistEvent * (*hist_fun_t) __P((ptr_t, int, ...));
-
-typedef struct el_history_t {
- char *buf; /* The history buffer */
- char *last; /* The last character */
- int eventno; /* Event we are looking for */
- ptr_t ref; /* Argument for history fcns */
- hist_fun_t fun; /* Event access */
- const HistEvent *ev; /* Event cookie */
-} el_history_t;
-
-#define HIST_FUN(el, fn, arg) \
- ((((el)->el_history.ev = \
- (*(el)->el_history.fun)((el)->el_history.ref, fn, arg)) == NULL) ? \
- NULL : (el)->el_history.ev->str)
-
-#define HIST_NEXT(el) HIST_FUN(el, H_NEXT, NULL)
-#define HIST_FIRST(el) HIST_FUN(el, H_FIRST, NULL)
-#define HIST_LAST(el) HIST_FUN(el, H_LAST, NULL)
-#define HIST_PREV(el) HIST_FUN(el, H_PREV, NULL)
-#define HIST_EVENT(el, num) HIST_FUN(el, H_EVENT, num)
-#define HIST_LOAD(el, fname) HIST_FUN(el, H_LOAD fname)
-#define HIST_SAVE(el, fname) HIST_FUN(el, H_SAVE fname)
-
-protected int hist_init __P((EditLine *));
-protected void hist_end __P((EditLine *));
-protected el_action_t hist_get __P((EditLine *));
-protected int hist_set __P((EditLine *, hist_fun_t, ptr_t));
-protected int hist_list __P((EditLine *, int, char **));
-
-#endif /* _h_el_hist */
diff --git a/lib/libedit/history.c b/lib/libedit/history.c
deleted file mode 100644
index ac9c3a9..0000000
--- a/lib/libedit/history.c
+++ /dev/null
@@ -1,685 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * hist.c: History access functions
- */
-#include "sys.h"
-
-#include <string.h>
-#include <stdlib.h>
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-static const char hist_cookie[] = "_HiStOrY_V1_\n";
-
-#include "histedit.h"
-
-typedef const HistEvent * (*history_gfun_t) __P((ptr_t));
-typedef const HistEvent * (*history_efun_t) __P((ptr_t, const char *));
-typedef void (*history_vfun_t) __P((ptr_t));
-
-struct history {
- ptr_t h_ref; /* Argument for history fcns */
- history_gfun_t h_first; /* Get the first element */
- history_gfun_t h_next; /* Get the next element */
- history_gfun_t h_last; /* Get the last element */
- history_gfun_t h_prev; /* Get the previous element */
- history_gfun_t h_curr; /* Get the current element */
- history_vfun_t h_clear; /* Clear the history list */
- history_efun_t h_enter; /* Add an element */
- history_efun_t h_add; /* Append to an element */
-};
-
-#define HNEXT(h) (*(h)->h_next)((h)->h_ref)
-#define HFIRST(h) (*(h)->h_first)((h)->h_ref)
-#define HPREV(h) (*(h)->h_prev)((h)->h_ref)
-#define HLAST(h) (*(h)->h_last)((h)->h_ref)
-#define HCURR(h) (*(h)->h_curr)((h)->h_ref)
-#define HCLEAR(h) (*(h)->h_clear)((h)->h_ref)
-#define HENTER(h, str) (*(h)->h_enter)((h)->h_ref, str)
-#define HADD(h, str) (*(h)->h_add)((h)->h_ref, str)
-
-#define h_malloc(a) malloc(a)
-#define h_free(a) free(a)
-
-
-private int history_set_num __P((History *, int));
-private int history_set_fun __P((History *, History *));
-private int history_load __P((History *, const char *));
-private int history_save __P((History *, const char *));
-private const HistEvent *history_prev_event __P((History *, int));
-private const HistEvent *history_next_event __P((History *, int));
-private const HistEvent *history_next_string __P((History *, const char *));
-private const HistEvent *history_prev_string __P((History *, const char *));
-
-
-/***********************************************************************/
-
-/*
- * Builtin- history implementation
- */
-typedef struct hentry_t {
- HistEvent ev; /* What we return */
- struct hentry_t *next; /* Next entry */
- struct hentry_t *prev; /* Previous entry */
-} hentry_t;
-
-typedef struct history_t {
- hentry_t list; /* Fake list header element */
- hentry_t *cursor; /* Current element in the list */
- int max; /* Maximum number of events */
- int cur; /* Current number of events */
- int eventno; /* Current event number */
-} history_t;
-
-private const HistEvent *history_def_first __P((ptr_t));
-private const HistEvent *history_def_last __P((ptr_t));
-private const HistEvent *history_def_next __P((ptr_t));
-private const HistEvent *history_def_prev __P((ptr_t));
-private const HistEvent *history_def_curr __P((ptr_t));
-private const HistEvent *history_def_enter __P((ptr_t, const char *));
-private const HistEvent *history_def_add __P((ptr_t, const char *));
-private void history_def_init __P((ptr_t *, int));
-private void history_def_clear __P((ptr_t));
-private const HistEvent *history_def_insert __P((history_t *, const char *));
-private void history_def_delete __P((history_t *, hentry_t *));
-
-#define history_def_set(p, num) (void) (((history_t *) p)->max = (num))
-
-
-/* history_def_first():
- * Default function to return the first event in the history.
- */
-private const HistEvent *
-history_def_first(p)
- ptr_t p;
-{
- history_t *h = (history_t *) p;
- h->cursor = h->list.next;
- if (h->cursor != &h->list)
- return &h->cursor->ev;
- else
- return NULL;
-}
-
-/* history_def_last():
- * Default function to return the last event in the history.
- */
-private const HistEvent *
-history_def_last(p)
- ptr_t p;
-{
- history_t *h = (history_t *) p;
- h->cursor = h->list.prev;
- if (h->cursor != &h->list)
- return &h->cursor->ev;
- else
- return NULL;
-}
-
-/* history_def_next():
- * Default function to return the next event in the history.
- */
-private const HistEvent *
-history_def_next(p)
- ptr_t p;
-{
- history_t *h = (history_t *) p;
-
- if (h->cursor != &h->list)
- h->cursor = h->cursor->next;
- else
- return NULL;
-
- if (h->cursor != &h->list)
- return &h->cursor->ev;
- else
- return NULL;
-}
-
-
-/* history_def_prev():
- * Default function to return the previous event in the history.
- */
-private const HistEvent *
-history_def_prev(p)
- ptr_t p;
-{
- history_t *h = (history_t *) p;
-
- if (h->cursor != &h->list)
- h->cursor = h->cursor->prev;
- else
- return NULL;
-
- if (h->cursor != &h->list)
- return &h->cursor->ev;
- else
- return NULL;
-}
-
-
-/* history_def_curr():
- * Default function to return the current event in the history.
- */
-private const HistEvent *
-history_def_curr(p)
- ptr_t p;
-{
- history_t *h = (history_t *) p;
-
- if (h->cursor != &h->list)
- return &h->cursor->ev;
- else
- return NULL;
-}
-
-
-/* history_def_add():
- * Append string to element
- */
-private const HistEvent *
-history_def_add(p, str)
- ptr_t p;
- const char *str;
-{
- history_t *h = (history_t *) p;
- size_t len;
- char *s;
-
- if (h->cursor == &h->list)
- return (history_def_enter(p, str));
- len = strlen(h->cursor->ev.str) + strlen(str) + 1;
- s = (char *) h_malloc(len);
- (void)strcpy(s, h->cursor->ev.str); /* XXX strcpy is safe */
- (void)strcat(s, str); /* XXX strcat is safe */
- h_free((ptr_t) h->cursor->ev.str);
- h->cursor->ev.str = s;
- return &h->cursor->ev;
-}
-
-
-/* history_def_delete():
- * Delete element hp of the h list
- */
-private void
-history_def_delete(h, hp)
- history_t *h;
- hentry_t *hp;
-{
- if (hp == &h->list)
- abort();
- hp->prev->next = hp->next;
- hp->next->prev = hp->prev;
- h_free((ptr_t) hp->ev.str);
- h_free(hp);
- h->cur--;
-}
-
-
-/* history_def_insert():
- * Insert element with string str in the h list
- */
-private const HistEvent *
-history_def_insert(h, str)
- history_t *h;
- const char *str;
-{
- h->cursor = (hentry_t *) h_malloc(sizeof(hentry_t));
- h->cursor->ev.str = strdup(str);
- h->cursor->next = h->list.next;
- h->cursor->prev = &h->list;
- h->list.next->prev = h->cursor;
- h->list.next = h->cursor;
- h->cur++;
-
- return &h->cursor->ev;
-}
-
-
-/* history_def_enter():
- * Default function to enter an item in the history
- */
-private const HistEvent *
-history_def_enter(p, str)
- ptr_t p;
- const char *str;
-{
- history_t *h = (history_t *) p;
- const HistEvent *ev;
-
-
- ev = history_def_insert(h, str);
- ((HistEvent*) ev)->num = ++h->eventno;
-
- /*
- * Always keep at least one entry.
- * This way we don't have to check for the empty list.
- */
- while (h->cur > h->max + 1)
- history_def_delete(h, h->list.prev);
- return ev;
-}
-
-
-/* history_def_init():
- * Default history initialization function
- */
-private void
-history_def_init(p, n)
- ptr_t *p;
- int n;
-{
- history_t *h = (history_t *) h_malloc(sizeof(history_t));
- if (n <= 0)
- n = 0;
- h->eventno = 0;
- h->cur = 0;
- h->max = n;
- h->list.next = h->list.prev = &h->list;
- h->list.ev.str = NULL;
- h->list.ev.num = 0;
- h->cursor = &h->list;
- *p = (ptr_t) h;
-}
-
-
-/* history_def_clear():
- * Default history cleanup function
- */
-private void
-history_def_clear(p)
- ptr_t p;
-{
- history_t *h = (history_t *) p;
-
- while (h->list.prev != &h->list)
- history_def_delete(h, h->list.prev);
- h->eventno = 0;
- h->cur = 0;
-}
-
-/************************************************************************/
-
-/* history_init():
- * Initialization function.
- */
-public History *
-history_init()
-{
- History *h = (History *) h_malloc(sizeof(History));
-
- history_def_init(&h->h_ref, 0);
-
- h->h_next = history_def_next;
- h->h_first = history_def_first;
- h->h_last = history_def_last;
- h->h_prev = history_def_prev;
- h->h_curr = history_def_curr;
- h->h_clear = history_def_clear;
- h->h_enter = history_def_enter;
- h->h_add = history_def_add;
-
- return h;
-}
-
-
-/* history_end():
- * clean up history;
- */
-public void
-history_end(h)
- History *h;
-{
- if (h->h_next == history_def_next)
- history_def_clear(h->h_ref);
-}
-
-
-
-/* history_set_num():
- * Set history number of events
- */
-private int
-history_set_num(h, num)
- History *h;
- int num;
-{
- if (h->h_next != history_def_next || num < 0)
- return -1;
- history_def_set(h->h_ref, num);
- return 0;
-}
-
-
-/* history_set_fun():
- * Set history functions
- */
-private int
-history_set_fun(h, nh)
- History *h, *nh;
-{
- if (nh->h_first == NULL || nh->h_next == NULL ||
- nh->h_last == NULL || nh->h_prev == NULL || nh->h_curr == NULL ||
- nh->h_enter == NULL || nh->h_add == NULL || nh->h_clear == NULL ||
- nh->h_ref == NULL) {
- if (h->h_next != history_def_next) {
- history_def_init(&h->h_ref, 0);
- h->h_first = history_def_first;
- h->h_next = history_def_next;
- h->h_last = history_def_last;
- h->h_prev = history_def_prev;
- h->h_curr = history_def_curr;
- h->h_clear = history_def_clear;
- h->h_enter = history_def_enter;
- h->h_add = history_def_add;
- }
- return -1;
- }
-
- if (h->h_next == history_def_next)
- history_def_clear(h->h_ref);
-
- h->h_first = nh->h_first;
- h->h_next = nh->h_next;
- h->h_last = nh->h_last;
- h->h_prev = nh->h_prev;
- h->h_curr = nh->h_curr;
- h->h_clear = nh->h_clear;
- h->h_enter = nh->h_enter;
- h->h_add = nh->h_add;
- return 0;
-}
-
-
-/* history_load():
- * History load function
- */
-private int
-history_load(h, fname)
- History *h;
- const char *fname;
-{
- FILE *fp;
- char *line;
- size_t sz;
- int i = -1;
-
- if ((fp = fopen(fname, "r")) == NULL)
- return i;
-
- if ((line = fgetln(fp, &sz)) == NULL)
- goto done;
-
- if (strncmp(line, hist_cookie, sz) != 0)
- goto done;
-
- for (i = 0; (line = fgetln(fp, &sz)) != NULL; i++) {
- char c = line[sz];
- line[sz] = '\0';
- HENTER(h, line);
- line[sz] = c;
- }
-
-done:
- (void) fclose(fp);
- return i;
-}
-
-
-/* history_save():
- * History save function
- */
-private int
-history_save(h, fname)
- History *h;
- const char *fname;
-{
- FILE *fp;
- const HistEvent *ev;
- int i = 0;
-
- if ((fp = fopen(fname, "w")) == NULL)
- return -1;
-
- (void) fputs(hist_cookie, fp);
- for (ev = HLAST(h); ev != NULL; ev = HPREV(h), i++)
- (void) fprintf(fp, "%s", ev->str);
- (void) fclose(fp);
- return i;
-}
-
-
-/* history_prev_event():
- * Find the previous event, with number given
- */
-private const HistEvent *
-history_prev_event(h, num)
- History *h;
- int num;
-{
- const HistEvent *ev;
- for (ev = HCURR(h); ev != NULL; ev = HPREV(h))
- if (ev->num == num)
- return ev;
- return NULL;
-}
-
-
-/* history_next_event():
- * Find the next event, with number given
- */
-private const HistEvent *
-history_next_event(h, num)
- History *h;
- int num;
-{
- const HistEvent *ev;
- for (ev = HCURR(h); ev != NULL; ev = HNEXT(h))
- if (ev->num == num)
- return ev;
- return NULL;
-}
-
-
-/* history_prev_string():
- * Find the previous event beginning with string
- */
-private const HistEvent *
-history_prev_string(h, str)
- History *h;
- const char* str;
-{
- const HistEvent *ev;
- size_t len = strlen(str);
-
- for (ev = HCURR(h); ev != NULL; ev = HNEXT(h))
- if (strncmp(str, ev->str, len) == 0)
- return ev;
- return NULL;
-}
-
-
-/* history_next_string():
- * Find the next event beginning with string
- */
-private const HistEvent *
-history_next_string(h, str)
- History *h;
- const char* str;
-{
- const HistEvent *ev;
- size_t len = strlen(str);
-
- for (ev = HCURR(h); ev != NULL; ev = HPREV(h))
- if (strncmp(str, ev->str, len) == 0)
- return ev;
- return NULL;
-}
-
-
-/* history():
- * User interface to history functions.
- */
-const HistEvent *
-#if __STDC__
-history(History *h, int fun, ...)
-#else
-history(va_alist)
- va_dcl
-#endif
-{
- va_list va;
- const HistEvent *ev = NULL;
- const char *str;
- static HistEvent sev = { 0, "" };
-
-#if __STDC__
- va_start(va, fun);
-#else
- History *h;
- int fun;
- va_start(va);
- h = va_arg(va, History *);
- fun = va_arg(va, int);
-#endif
-
- switch (fun) {
- case H_ADD:
- str = va_arg(va, const char *);
- ev = HADD(h, str);
- break;
-
- case H_ENTER:
- str = va_arg(va, const char *);
- ev = HENTER(h, str);
- break;
-
- case H_FIRST:
- ev = HFIRST(h);
- break;
-
- case H_NEXT:
- ev = HNEXT(h);
- break;
-
- case H_LAST:
- ev = HLAST(h);
- break;
-
- case H_PREV:
- ev = HPREV(h);
- break;
-
- case H_CURR:
- ev = HCURR(h);
- break;
-
- case H_CLEAR:
- HCLEAR(h);
- break;
-
- case H_LOAD:
- sev.num = history_load(h, va_arg(va, const char *));
- ev = &sev;
- break;
-
- case H_SAVE:
- sev.num = history_save(h, va_arg(va, const char *));
- ev = &sev;
- break;
-
- case H_PREV_EVENT:
- ev = history_prev_event(h, va_arg(va, int));
- break;
-
- case H_NEXT_EVENT:
- ev = history_next_event(h, va_arg(va, int));
- break;
-
- case H_PREV_STR:
- ev = history_prev_string(h, va_arg(va, const char*));
- break;
-
- case H_NEXT_STR:
- ev = history_next_string(h, va_arg(va, const char*));
- break;
-
- case H_EVENT:
- if (history_set_num(h, va_arg(va, int)) == 0) {
- sev.num = -1;
- ev = &sev;
- }
- break;
-
- case H_FUNC:
- {
- History hf;
- hf.h_ref = va_arg(va, ptr_t);
- hf.h_first = va_arg(va, history_gfun_t);
- hf.h_next = va_arg(va, history_gfun_t);
- hf.h_last = va_arg(va, history_gfun_t);
- hf.h_prev = va_arg(va, history_gfun_t);
- hf.h_curr = va_arg(va, history_gfun_t);
- hf.h_clear = va_arg(va, history_vfun_t);
- hf.h_enter = va_arg(va, history_efun_t);
- hf.h_add = va_arg(va, history_efun_t);
-
- if (history_set_fun(h, &hf) == 0) {
- sev.num = -1;
- ev = &sev;
- }
- }
- break;
-
- case H_END:
- history_end(h);
- break;
-
- default:
- break;
- }
- va_end(va);
- return ev;
-}
diff --git a/lib/libedit/key.c b/lib/libedit/key.c
deleted file mode 100644
index 3da65d5..0000000
--- a/lib/libedit/key.c
+++ /dev/null
@@ -1,728 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)key.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * key.c: This module contains the procedures for maintaining
- * the extended-key map.
- *
- * An extended-key (key) is a sequence of keystrokes introduced
- * with an sequence introducer and consisting of an arbitrary
- * number of characters. This module maintains a map (the el->el_key.map)
- * to convert these extended-key sequences into input strs
- * (XK_STR), editor functions (XK_CMD), or unix commands (XK_EXE).
- *
- * Warning:
- * If key is a substr of some other keys, then the longer
- * keys are lost!! That is, if the keys "abcd" and "abcef"
- * are in el->el_key.map, adding the key "abc" will cause the first two
- * definitions to be lost.
- *
- * Restrictions:
- * -------------
- * 1) It is not possible to have one key that is a
- * substr of another.
- */
-#include "sys.h"
-#include <string.h>
-#include <stdlib.h>
-
-#include "el.h"
-
-/*
- * The Nodes of the el->el_key.map. The el->el_key.map is a linked list
- * of these node elements
- */
-struct key_node_t {
- char ch; /* single character of key */
- int type; /* node type */
- key_value_t val; /* command code or pointer to str, */
- /* if this is a leaf */
- struct key_node_t *next; /* ptr to next char of this key */
- struct key_node_t *sibling; /* ptr to another key with same prefix */
-};
-
-private int node_trav __P((EditLine *, key_node_t *, char *,
- key_value_t *));
-private int node__try __P((key_node_t *, char *,
- key_value_t *, int));
-private key_node_t *node__get __P((int));
-private void node__put __P((key_node_t *));
-private int node__delete __P((key_node_t **, char *));
-private int node_lookup __P((EditLine *, char *, key_node_t *,
- int));
-private int node_enum __P((EditLine *, key_node_t *, int));
-private int key__decode_char __P((char *, int, int));
-
-#define KEY_BUFSIZ EL_BUFSIZ
-
-
-/* key_init():
- * Initialize the key maps
- */
-protected int
-key_init(el)
- EditLine *el;
-{
- el->el_key.buf = (char *) el_malloc(KEY_BUFSIZ);
- el->el_key.map = NULL;
- key_reset(el);
- return 0;
-}
-
-
-/* key_end():
- * Free the key maps
- */
-protected void
-key_end(el)
- EditLine *el;
-{
- el_free((ptr_t) el->el_key.buf);
- el->el_key.buf = NULL;
- /* XXX: provide a function to clear the keys */
- el->el_key.map = NULL;
-}
-
-
-/* key_map_cmd():
- * Associate cmd with a key value
- */
-protected key_value_t *
-key_map_cmd(el, cmd)
- EditLine *el;
- int cmd;
-{
- el->el_key.val.cmd = (el_action_t) cmd;
- return &el->el_key.val;
-}
-
-
-/* key_map_str():
- * Associate str with a key value
- */
-protected key_value_t *
-key_map_str(el, str)
- EditLine *el;
- char *str;
-{
- el->el_key.val.str = str;
- return &el->el_key.val;
-}
-
-
-/* key_reset():
- * Takes all nodes on el->el_key.map and puts them on free list. Then
- * initializes el->el_key.map with arrow keys
- * [Always bind the ansi arrow keys?]
- */
-protected void
-key_reset(el)
- EditLine *el;
-{
- node__put(el->el_key.map);
- el->el_key.map = NULL;
- return;
-}
-
-
-/* key_get():
- * Calls the recursive function with entry point el->el_key.map
- * Looks up *ch in map and then reads characters until a
- * complete match is found or a mismatch occurs. Returns the
- * type of the match found (XK_STR, XK_CMD, or XK_EXE).
- * Returns NULL in val.str and XK_STR for no match.
- * The last character read is returned in *ch.
- */
-protected int
-key_get(el, ch, val)
- EditLine *el;
- char *ch;
- key_value_t *val;
-{
- return node_trav(el, el->el_key.map, ch, val);
-}
-
-
-
-/* key_add():
- * Adds key to the el->el_key.map and associates the value in val with it.
- * If key is already is in el->el_key.map, the new code is applied to the
- * existing key. Ntype specifies if code is a command, an
- * out str or a unix command.
- */
-protected void
-key_add(el, key, val, ntype)
- EditLine *el;
- char *key;
- key_value_t *val;
- int ntype;
-{
- if (key[0] == '\0') {
- (void) fprintf(el->el_errfile,
- "key_add: Null extended-key not allowed.\n");
- return;
- }
-
- if (ntype == XK_CMD && val->cmd == ED_SEQUENCE_LEAD_IN) {
- (void) fprintf(el->el_errfile,
- "key_add: sequence-lead-in command not allowed\n");
- return;
- }
-
- if (el->el_key.map == NULL)
- /* tree is initially empty. Set up new node to match key[0] */
- el->el_key.map = node__get(key[0]); /* it is properly initialized */
-
- /* Now recurse through el->el_key.map */
- (void) node__try(el->el_key.map, key, val, ntype);
- return;
-}
-
-
-/* key_clear():
- *
- */
-protected void
-key_clear(el, map, in)
- EditLine *el;
- el_action_t *map;
- char *in;
-{
- if ((map[(unsigned char) *in] == ED_SEQUENCE_LEAD_IN) &&
- ((map == el->el_map.key &&
- el->el_map.alt[(unsigned char) *in] != ED_SEQUENCE_LEAD_IN) ||
- (map == el->el_map.alt &&
- el->el_map.key[(unsigned char) *in] != ED_SEQUENCE_LEAD_IN)))
- (void) key_delete(el, in);
-}
-
-
-/* key_delete():
- * Delete the key and all longer keys staring with key, if
- * they exists.
- */
-protected int
-key_delete(el, key)
- EditLine *el;
- char *key;
-{
- if (key[0] == '\0') {
- (void) fprintf(el->el_errfile,
- "key_delete: Null extended-key not allowed.\n");
- return -1;
- }
-
- if (el->el_key.map == NULL)
- return 0;
-
- (void) node__delete(&el->el_key.map, key);
- return 0;
-}
-
-
-/* key_print():
- * Print the binding associated with key key.
- * Print entire el->el_key.map if null
- */
-protected void
-key_print(el, key)
- EditLine *el;
- char *key;
-{
- /* do nothing if el->el_key.map is empty and null key specified */
- if (el->el_key.map == NULL && *key == 0)
- return;
-
- el->el_key.buf[0] = '"';
- if (node_lookup(el, key, el->el_key.map, 1) <= -1)
- /* key is not bound */
- (void) fprintf(el->el_errfile, "Unbound extended key \"%s\"\n", key);
- return;
-}
-
-
-/* node_trav():
- * recursively traverses node in tree until match or mismatch is
- * found. May read in more characters.
- */
-private int
-node_trav(el, ptr, ch, val)
- EditLine *el;
- key_node_t *ptr;
- char *ch;
- key_value_t *val;
-{
- if (ptr->ch == *ch) {
- /* match found */
- if (ptr->next) {
- /* key not complete so get next char */
- if (el_getc(el, ch) != 1) { /* if EOF or error */
- val->cmd = ED_END_OF_FILE;
- return XK_CMD;/* PWP: Pretend we just read an end-of-file */
- }
- return node_trav(el, ptr->next, ch, val);
- }
- else {
- *val = ptr->val;
- if (ptr->type != XK_CMD)
- *ch = '\0';
- return ptr->type;
- }
- }
- else {
- /* no match found here */
- if (ptr->sibling) {
- /* try next sibling */
- return node_trav(el, ptr->sibling, ch, val);
- }
- else {
- /* no next sibling -- mismatch */
- val->str = NULL;
- return XK_STR;
- }
- }
-}
-
-
-/* node__try():
- * Find a node that matches *str or allocate a new one
- */
-private int
-node__try(ptr, str, val, ntype)
- key_node_t *ptr;
- char *str;
- key_value_t *val;
- int ntype;
-{
- if (ptr->ch != *str) {
- key_node_t *xm;
-
- for (xm = ptr; xm->sibling != NULL; xm = xm->sibling)
- if (xm->sibling->ch == *str)
- break;
- if (xm->sibling == NULL)
- xm->sibling = node__get(*str); /* setup new node */
- ptr = xm->sibling;
- }
-
- if (*++str == '\0') {
- /* we're there */
- if (ptr->next != NULL) {
- node__put(ptr->next); /* lose longer keys with this prefix */
- ptr->next = NULL;
- }
- switch (ptr->type) {
- case XK_CMD:
- case XK_NOD:
- break;
- case XK_STR:
- case XK_EXE:
- if (ptr->val.str)
- el_free((ptr_t) ptr->val.str);
- break;
- default:
- abort();
- break;
- }
-
- switch (ptr->type = ntype) {
- case XK_CMD:
- ptr->val = *val;
- break;
- case XK_STR:
- case XK_EXE:
- ptr->val.str = strdup(val->str);
- break;
- default:
- abort();
- break;
- }
- }
- else {
- /* still more chars to go */
- if (ptr->next == NULL)
- ptr->next = node__get(*str); /* setup new node */
- (void) node__try(ptr->next, str, val, ntype);
- }
- return 0;
-}
-
-
-/* node__delete():
- * Delete node that matches str
- */
-private int
-node__delete(inptr, str)
- key_node_t **inptr;
- char *str;
-{
- key_node_t *ptr;
- key_node_t *prev_ptr = NULL;
-
- ptr = *inptr;
-
- if (ptr->ch != *str) {
- key_node_t *xm;
-
- for (xm = ptr; xm->sibling != NULL; xm = xm->sibling)
- if (xm->sibling->ch == *str)
- break;
- if (xm->sibling == NULL)
- return 0;
- prev_ptr = xm;
- ptr = xm->sibling;
- }
-
- if (*++str == '\0') {
- /* we're there */
- if (prev_ptr == NULL)
- *inptr = ptr->sibling;
- else
- prev_ptr->sibling = ptr->sibling;
- ptr->sibling = NULL;
- node__put(ptr);
- return 1;
- }
- else if (ptr->next != NULL && node__delete(&ptr->next, str) == 1) {
- if (ptr->next != NULL)
- return 0;
- if (prev_ptr == NULL)
- *inptr = ptr->sibling;
- else
- prev_ptr->sibling = ptr->sibling;
- ptr->sibling = NULL;
- node__put(ptr);
- return 1;
- }
- else {
- return 0;
- }
-}
-
-/* node__put():
- * Puts a tree of nodes onto free list using free(3).
- */
-private void
-node__put(ptr)
- key_node_t *ptr;
-{
- if (ptr == NULL)
- return;
-
- if (ptr->next != NULL) {
- node__put(ptr->next);
- ptr->next = NULL;
- }
-
- node__put(ptr->sibling);
-
- switch (ptr->type) {
- case XK_CMD:
- case XK_NOD:
- break;
- case XK_EXE:
- case XK_STR:
- if (ptr->val.str != NULL)
- el_free((ptr_t) ptr->val.str);
- break;
- default:
- abort();
- break;
- }
- el_free((ptr_t) ptr);
-}
-
-
-/* node__get():
- * Returns pointer to an key_node_t for ch.
- */
-private key_node_t *
-node__get(ch)
- int ch;
-{
- key_node_t *ptr;
-
- ptr = (key_node_t *) el_malloc((size_t) sizeof(key_node_t));
- ptr->ch = ch;
- ptr->type = XK_NOD;
- ptr->val.str = NULL;
- ptr->next = NULL;
- ptr->sibling = NULL;
- return ptr;
-}
-
-
-
-/* node_lookup():
- * look for the str starting at node ptr.
- * Print if last node
- */
-private int
-node_lookup(el, str, ptr, cnt)
- EditLine *el;
- char *str;
- key_node_t *ptr;
- int cnt;
-{
- int ncnt;
-
- if (ptr == NULL)
- return -1; /* cannot have null ptr */
-
- if (*str == 0) {
- /* no more chars in str. node_enum from here. */
- (void) node_enum(el, ptr, cnt);
- return 0;
- }
- else {
- /* If match put this char into el->el_key.buf. Recurse */
- if (ptr->ch == *str) {
- /* match found */
- ncnt = key__decode_char(el->el_key.buf, cnt,
- (unsigned char) ptr->ch);
- if (ptr->next != NULL)
- /* not yet at leaf */
- return node_lookup(el, str + 1, ptr->next, ncnt + 1);
- else {
- /* next node is null so key should be complete */
- if (str[1] == 0) {
- el->el_key.buf[ncnt + 1] = '"';
- el->el_key.buf[ncnt + 2] = '\0';
- key_kprint(el, el->el_key.buf, &ptr->val, ptr->type);
- return 0;
- }
- else
- return -1;/* mismatch -- str still has chars */
- }
- }
- else {
- /* no match found try sibling */
- if (ptr->sibling)
- return node_lookup(el, str, ptr->sibling, cnt);
- else
- return -1;
- }
- }
-}
-
-
-/* node_enum():
- * Traverse the node printing the characters it is bound in buffer
- */
-private int
-node_enum(el, ptr, cnt)
- EditLine *el;
- key_node_t *ptr;
- int cnt;
-{
- int ncnt;
-
- if (cnt >= KEY_BUFSIZ - 5) { /* buffer too small */
- el->el_key.buf[++cnt] = '"';
- el->el_key.buf[++cnt] = '\0';
- (void) fprintf(el->el_errfile,
- "Some extended keys too long for internal print buffer");
- (void) fprintf(el->el_errfile, " \"%s...\"\n", el->el_key.buf);
- return 0;
- }
-
- if (ptr == NULL) {
-#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile, "node_enum: BUG!! Null ptr passed\n!");
-#endif
- return -1;
- }
-
- /* put this char at end of str */
- ncnt = key__decode_char(el->el_key.buf, cnt, (unsigned char) ptr->ch);
- if (ptr->next == NULL) {
- /* print this key and function */
- el->el_key.buf[ncnt + 1] = '"';
- el->el_key.buf[ncnt + 2] = '\0';
- key_kprint(el, el->el_key.buf, &ptr->val, ptr->type);
- }
- else
- (void) node_enum(el, ptr->next, ncnt + 1);
-
- /* go to sibling if there is one */
- if (ptr->sibling)
- (void) node_enum(el, ptr->sibling, cnt);
- return 0;
-}
-
-
-/* key_kprint():
- * Print the specified key and its associated
- * function specified by val
- */
-protected void
-key_kprint(el, key, val, ntype)
- EditLine *el;
- char *key;
- key_value_t *val;
- int ntype;
-{
- el_bindings_t *fp;
- char unparsbuf[EL_BUFSIZ];
- static char *fmt = "%-15s-> %s\n";
-
- if (val != NULL)
- switch (ntype) {
- case XK_STR:
- case XK_EXE:
- (void) fprintf(el->el_errfile, fmt, key,
- key__decode_str(val->str, unparsbuf,
- ntype == XK_STR ? "\"\"" : "[]"));
- break;
- case XK_CMD:
- for (fp = el->el_map.help; fp->name; fp++)
- if (val->cmd == fp->func) {
- (void) fprintf(el->el_errfile, fmt, key, fp->name);
- break;
- }
-#ifdef DEBUG_KEY
- if (fp->name == NULL)
- (void) fprintf(el->el_errfile, "BUG! Command not found.\n");
-#endif
-
- break;
- default:
- abort();
- break;
- }
- else
- (void) fprintf(el->el_errfile, fmt, key, "no input");
-}
-
-
-/* key__decode_char():
- * Put a printable form of char in buf.
- */
-private int
-key__decode_char(buf, cnt, ch)
- char *buf;
- int cnt, ch;
-{
- ch = (unsigned char)ch;
-
- if (ch == 0) {
- buf[cnt++] = '^';
- buf[cnt] = '@';
- return cnt;
- }
-
- if (iscntrl(ch)) {
- buf[cnt++] = '^';
- if (ch == 0177)
- buf[cnt] = '?';
- else
- buf[cnt] = toascii(ch) | 0100;
- }
- else if (ch == '^') {
- buf[cnt++] = '\\';
- buf[cnt] = '^';
- }
- else if (ch == '\\') {
- buf[cnt++] = '\\';
- buf[cnt] = '\\';
- }
- else if (ch == ' ' || (isprint(ch) && !isspace(ch))) {
- buf[cnt] = ch;
- }
- else {
- buf[cnt++] = '\\';
- buf[cnt++] = ((ch >> 6) & 7) + '0';
- buf[cnt++] = ((ch >> 3) & 7) + '0';
- buf[cnt] = (ch & 7) + '0';
- }
- return cnt;
-}
-
-/* key__decode_str():
- * Make a printable version of the ey
- */
-protected char *
-key__decode_str(str, buf, sep)
- char *str;
- char *buf;
- char *sep;
-{
- char *b, *p;
-
- b = buf;
- if (sep[0] != '\0')
- *b++ = sep[0];
- if (*str == 0) {
- *b++ = '^';
- *b++ = '@';
- if (sep[0] != '\0' && sep[1] != '\0')
- *b++ = sep[1];
- *b++ = 0;
- return buf;
- }
-
- for (p = str; *p != 0; p++) {
- if (iscntrl((unsigned char) *p)) {
- *b++ = '^';
- if (*p == '\177')
- *b++ = '?';
- else
- *b++ = toascii(*p) | 0100;
- }
- else if (*p == '^' || *p == '\\') {
- *b++ = '\\';
- *b++ = *p;
- }
- else if (*p == ' ' || (isprint((unsigned char) *p) &&
- !isspace((unsigned char) *p))) {
- *b++ = *p;
- }
- else {
- *b++ = '\\';
- *b++ = ((*p >> 6) & 7) + '0';
- *b++ = ((*p >> 3) & 7) + '0';
- *b++ = (*p & 7) + '0';
- }
- }
- if (sep[0] != '\0' && sep[1] != '\0')
- *b++ = sep[1];
- *b++ = 0;
- return buf; /* should check for overflow */
-}
diff --git a/lib/libedit/key.h b/lib/libedit/key.h
deleted file mode 100644
index eed0818..0000000
--- a/lib/libedit/key.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)key.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.key.h: Key macro header
- */
-#ifndef _h_el_key
-#define _h_el_key
-
-typedef union key_value_t {
- el_action_t cmd; /* If it is a command the # */
- char *str; /* If it is a string... */
-} key_value_t;
-
-typedef struct key_node_t key_node_t;
-
-typedef struct el_key_t {
- char *buf; /* Key print buffer */
- key_node_t *map; /* Key map */
- key_value_t val; /* Local conversion buffer */
-} el_key_t;
-
-#define XK_CMD 0
-#define XK_STR 1
-#define XK_NOD 2
-#define XK_EXE 3
-
-protected int key_init __P((EditLine *));
-protected void key_end __P((EditLine *));
-protected key_value_t * key_map_cmd __P((EditLine *, int));
-protected key_value_t * key_map_str __P((EditLine *, char *));
-protected void key_reset __P((EditLine *));
-protected int key_get __P((EditLine *, char *,
- key_value_t *));
-protected void key_add __P((EditLine *, char *, key_value_t *,
- int));
-protected void key_clear __P((EditLine *, el_action_t *,
- char *));
-protected int key_delete __P((EditLine *, char *));
-protected void key_print __P((EditLine *, char *));
-protected void key_kprint __P((EditLine *, char *,
- key_value_t *, int));
-protected char *key__decode_str __P((char *, char *, char *));
-
-#endif /* _h_el_key */
diff --git a/lib/libedit/makelist b/lib/libedit/makelist
deleted file mode 100644
index 7e66b98..0000000
--- a/lib/libedit/makelist
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/bin/sh -
-#
-# Copyright (c) 1992, 1993
-# The Regents of the University of California. All rights reserved.
-#
-# This code is derived from software contributed to Berkeley by
-# Christos Zoulas of Cornell University.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# @(#)makelist 5.3 (Berkeley) 6/4/93
-
-# makelist.sh: Automatically generate header files...
-
-AWK=/usr/bin/awk
-USAGE="Usage: $0 -h|-e|-fc|-fh|-bc|-bh <filenames>"
-
-if [ "x$1" = "x" ]
-then
- echo $USAGE 1>&2
- exit 1
-fi
-
-FLAG="$1"
-shift
-
-FILES="$@"
-
-case $FLAG in
--h)
- fn=`basename $FILES`
- OIFS="$IFS"
- IFS=".$IFS"
- set - $fn
- IFS="$OIFS"
- hdr="_h_$1_$2"
- cat $FILES | $AWK '
- BEGIN {
- printf("/* Automatically generated file, do not edit */\n");
- printf("#ifndef %s\n#define %s\n", "'$hdr'", "'$hdr'");
- }
- /\(\):/ {
- pr = substr($2, 1, 2);
- if (pr == "vi" || pr == "em" || pr == "ed") {
- name = substr($2, 1, length($2) - 3);
- printf("protected el_action_t\t%-25.25s __P((EditLine *, int));\n", name);
- }
- }
- END {
- printf("#endif /* %s */\n", "'$hdr'");
- }';;
--bc)
- cat $FILES | $AWK '
- BEGIN {
- printf("/* Automatically generated file, do not edit */\n");
- printf("#include \"sys.h\"\n#include \"el.h\"\n");
- printf("private struct el_bindings_t el_func_help[] = {\n");
- low = "abcdefghijklmnopqrstuvwxyz_";
- high = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_";
- for (i = 1; i <= length(low); i++)
- tr[substr(low, i, 1)] = substr(high, i, 1);
- }
- /\(\):/ {
- pr = substr($2, 1, 2);
- if (pr == "vi" || pr == "em" || pr == "ed") {
- name = substr($2, 1, length($2) - 3);
- uname = "";
- fname = "";
- for (i = 1; i <= length(name); i++) {
- s = substr(name, i, 1);
- uname = uname tr[s];
- if (s == "_")
- s = "-";
- fname = fname s;
- }
-
- printf(" { %-30.30s %-30.30s\n","\"" fname "\",", uname ",");
- ok = 1;
- }
- }
- /^ \*/ {
- if (ok) {
- printf(" \"");
- for (i = 2; i < NF; i++)
- printf("%s ", $i);
- printf("%s\" },\n", $i);
- ok = 0;
- }
- }
- END {
- printf(" { NULL, 0, NULL }\n");
- printf("};\n");
- printf("\nprotected el_bindings_t* help__get()");
- printf("{ return el_func_help; }\n");
- }';;
--bh)
- $AWK '
- BEGIN {
- printf("/* Automatically generated file, do not edit */\n");
- printf("#ifndef _h_help_c\n#define _h_help_c\n");
- printf("protected el_bindings_t *help__get\t__P((void));\n");
- printf("#endif /* _h_help_c */\n");
- }' /dev/null;;
--fh)
- cat $FILES | $AWK '/el_action_t/ { print $3 }' | \
- sort | tr '[a-z]' '[A-Z]' | $AWK '
- BEGIN {
- printf("/* Automatically generated file, do not edit */\n");
- printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");
- count = 0;
- }
- {
- printf("#define\t%-30.30s\t%3d\n", $1, count++);
- }
- END {
- printf("#define\t%-30.30s\t%3d\n", "EL_NUM_FCNS", count);
-
- printf("typedef el_action_t (*el_func_t) __P((EditLine *, int));");
- printf("\nprotected el_func_t* func__get __P((void));\n");
- printf("#endif /* _h_fcns_c */\n");
- }';;
--fc)
- cat $FILES | $AWK '/el_action_t/ { print $3 }' | sort | $AWK '
- BEGIN {
- printf("/* Automatically generated file, do not edit */\n");
- printf("#include \"sys.h\"\n#include \"el.h\"\n");
- printf("private el_func_t el_func[] = {");
- maxlen = 80;
- needn = 1;
- len = 0;
- }
- {
- clen = 25 + 2;
- len += clen;
- if (len >= maxlen)
- needn = 1;
- if (needn) {
- printf("\n ");
- needn = 0;
- len = 4 + clen;
- }
- s = $1 ",";
- printf("%-26.26s ", s);
- }
- END {
- printf("\n};\n");
- printf("\nprotected el_func_t* func__get() { return el_func; }\n");
- }';;
--e)
- echo "$FILES" | tr ' ' '\012' | $AWK '
- BEGIN {
- printf("/* Automatically generated file, do not edit */\n");
- printf("#define protected static\n");
- printf("#define SCCSID\n");
- }
- {
- printf("#include \"%s\"\n", $1);
- }';;
-*)
- echo $USAGE 1>&2
- exit 1;;
-esac
diff --git a/lib/libedit/map.c b/lib/libedit/map.c
deleted file mode 100644
index 3b282cc..0000000
--- a/lib/libedit/map.c
+++ /dev/null
@@ -1,1397 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * map.c: Editor function definitions
- */
-#include "sys.h"
-#include <stdlib.h>
-#include "el.h"
-
-#define N_KEYS 256
-
-private void map_print_key __P((EditLine *, el_action_t *, char *));
-private void map_print_some_keys __P((EditLine *, el_action_t *, int, int));
-private void map_print_all_keys __P((EditLine *));
-private void map_init_nls __P((EditLine *));
-private void map_init_meta __P((EditLine *));
-
-/* keymap tables ; should be N_KEYS*sizeof(KEYCMD) bytes long */
-
-private el_action_t el_map_emacs[] = {
- /* 0 */ EM_SET_MARK, /* ^@ */
- /* 1 */ ED_MOVE_TO_BEG, /* ^A */
- /* 2 */ ED_PREV_CHAR, /* ^B */
- /* 3 */ ED_TTY_SIGINT, /* ^C */
- /* 4 */ EM_DELETE_OR_LIST, /* ^D */
- /* 5 */ ED_MOVE_TO_END, /* ^E */
- /* 6 */ ED_NEXT_CHAR, /* ^F */
- /* 7 */ ED_UNASSIGNED, /* ^G */
- /* 8 */ ED_DELETE_PREV_CHAR, /* ^H */
- /* 9 */ ED_UNASSIGNED, /* ^I */
- /* 10 */ ED_NEWLINE, /* ^J */
- /* 11 */ ED_KILL_LINE, /* ^K */
- /* 12 */ ED_CLEAR_SCREEN, /* ^L */
- /* 13 */ ED_NEWLINE, /* ^M */
- /* 14 */ ED_NEXT_HISTORY, /* ^N */
- /* 15 */ ED_TTY_FLUSH_OUTPUT, /* ^O */
- /* 16 */ ED_PREV_HISTORY, /* ^P */
- /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */
- /* 18 */ ED_REDISPLAY, /* ^R */
- /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */
- /* 20 */ ED_TRANSPOSE_CHARS, /* ^T */
- /* 21 */ EM_KILL_LINE, /* ^U */
- /* 22 */ ED_QUOTED_INSERT, /* ^V */
- /* 23 */ EM_KILL_REGION, /* ^W */
- /* 24 */ ED_SEQUENCE_LEAD_IN, /* ^X */
- /* 25 */ EM_YANK, /* ^Y */
- /* 26 */ ED_TTY_SIGTSTP, /* ^Z */
- /* 27 */ EM_META_NEXT, /* ^[ */
- /* 28 */ ED_TTY_SIGQUIT, /* ^\ */
- /* 29 */ ED_TTY_DSUSP, /* ^] */
- /* 30 */ ED_UNASSIGNED, /* ^^ */
- /* 31 */ ED_UNASSIGNED, /* ^_ */
- /* 32 */ ED_INSERT, /* SPACE */
- /* 33 */ ED_INSERT, /* ! */
- /* 34 */ ED_INSERT, /* " */
- /* 35 */ ED_INSERT, /* # */
- /* 36 */ ED_INSERT, /* $ */
- /* 37 */ ED_INSERT, /* % */
- /* 38 */ ED_INSERT, /* & */
- /* 39 */ ED_INSERT, /* ' */
- /* 40 */ ED_INSERT, /* ( */
- /* 41 */ ED_INSERT, /* ) */
- /* 42 */ ED_INSERT, /* * */
- /* 43 */ ED_INSERT, /* + */
- /* 44 */ ED_INSERT, /* , */
- /* 45 */ ED_INSERT, /* - */
- /* 46 */ ED_INSERT, /* . */
- /* 47 */ ED_INSERT, /* / */
- /* 48 */ ED_DIGIT, /* 0 */
- /* 49 */ ED_DIGIT, /* 1 */
- /* 50 */ ED_DIGIT, /* 2 */
- /* 51 */ ED_DIGIT, /* 3 */
- /* 52 */ ED_DIGIT, /* 4 */
- /* 53 */ ED_DIGIT, /* 5 */
- /* 54 */ ED_DIGIT, /* 6 */
- /* 55 */ ED_DIGIT, /* 7 */
- /* 56 */ ED_DIGIT, /* 8 */
- /* 57 */ ED_DIGIT, /* 9 */
- /* 58 */ ED_INSERT, /* : */
- /* 59 */ ED_INSERT, /* ; */
- /* 60 */ ED_INSERT, /* < */
- /* 61 */ ED_INSERT, /* = */
- /* 62 */ ED_INSERT, /* > */
- /* 63 */ ED_INSERT, /* ? */
- /* 64 */ ED_INSERT, /* @ */
- /* 65 */ ED_INSERT, /* A */
- /* 66 */ ED_INSERT, /* B */
- /* 67 */ ED_INSERT, /* C */
- /* 68 */ ED_INSERT, /* D */
- /* 69 */ ED_INSERT, /* E */
- /* 70 */ ED_INSERT, /* F */
- /* 71 */ ED_INSERT, /* G */
- /* 72 */ ED_INSERT, /* H */
- /* 73 */ ED_INSERT, /* I */
- /* 74 */ ED_INSERT, /* J */
- /* 75 */ ED_INSERT, /* K */
- /* 76 */ ED_INSERT, /* L */
- /* 77 */ ED_INSERT, /* M */
- /* 78 */ ED_INSERT, /* N */
- /* 79 */ ED_INSERT, /* O */
- /* 80 */ ED_INSERT, /* P */
- /* 81 */ ED_INSERT, /* Q */
- /* 82 */ ED_INSERT, /* R */
- /* 83 */ ED_INSERT, /* S */
- /* 84 */ ED_INSERT, /* T */
- /* 85 */ ED_INSERT, /* U */
- /* 86 */ ED_INSERT, /* V */
- /* 87 */ ED_INSERT, /* W */
- /* 88 */ ED_INSERT, /* X */
- /* 89 */ ED_INSERT, /* Y */
- /* 90 */ ED_INSERT, /* Z */
- /* 91 */ ED_INSERT, /* [ */
- /* 92 */ ED_INSERT, /* \ */
- /* 93 */ ED_INSERT, /* ] */
- /* 94 */ ED_INSERT, /* ^ */
- /* 95 */ ED_INSERT, /* _ */
- /* 96 */ ED_INSERT, /* ` */
- /* 97 */ ED_INSERT, /* a */
- /* 98 */ ED_INSERT, /* b */
- /* 99 */ ED_INSERT, /* c */
- /* 100 */ ED_INSERT, /* d */
- /* 101 */ ED_INSERT, /* e */
- /* 102 */ ED_INSERT, /* f */
- /* 103 */ ED_INSERT, /* g */
- /* 104 */ ED_INSERT, /* h */
- /* 105 */ ED_INSERT, /* i */
- /* 106 */ ED_INSERT, /* j */
- /* 107 */ ED_INSERT, /* k */
- /* 108 */ ED_INSERT, /* l */
- /* 109 */ ED_INSERT, /* m */
- /* 110 */ ED_INSERT, /* n */
- /* 111 */ ED_INSERT, /* o */
- /* 112 */ ED_INSERT, /* p */
- /* 113 */ ED_INSERT, /* q */
- /* 114 */ ED_INSERT, /* r */
- /* 115 */ ED_INSERT, /* s */
- /* 116 */ ED_INSERT, /* t */
- /* 117 */ ED_INSERT, /* u */
- /* 118 */ ED_INSERT, /* v */
- /* 119 */ ED_INSERT, /* w */
- /* 120 */ ED_INSERT, /* x */
- /* 121 */ ED_INSERT, /* y */
- /* 122 */ ED_INSERT, /* z */
- /* 123 */ ED_INSERT, /* { */
- /* 124 */ ED_INSERT, /* | */
- /* 125 */ ED_INSERT, /* } */
- /* 126 */ ED_INSERT, /* ~ */
- /* 127 */ ED_DELETE_PREV_CHAR, /* ^? */
- /* 128 */ ED_UNASSIGNED, /* M-^@ */
- /* 129 */ ED_UNASSIGNED, /* M-^A */
- /* 130 */ ED_UNASSIGNED, /* M-^B */
- /* 131 */ ED_UNASSIGNED, /* M-^C */
- /* 132 */ ED_UNASSIGNED, /* M-^D */
- /* 133 */ ED_UNASSIGNED, /* M-^E */
- /* 134 */ ED_UNASSIGNED, /* M-^F */
- /* 135 */ ED_UNASSIGNED, /* M-^G */
- /* 136 */ ED_DELETE_PREV_WORD, /* M-^H */
- /* 137 */ ED_UNASSIGNED, /* M-^I */
- /* 138 */ ED_UNASSIGNED, /* M-^J */
- /* 139 */ ED_UNASSIGNED, /* M-^K */
- /* 140 */ ED_CLEAR_SCREEN, /* M-^L */
- /* 141 */ ED_UNASSIGNED, /* M-^M */
- /* 142 */ ED_UNASSIGNED, /* M-^N */
- /* 143 */ ED_UNASSIGNED, /* M-^O */
- /* 144 */ ED_UNASSIGNED, /* M-^P */
- /* 145 */ ED_UNASSIGNED, /* M-^Q */
- /* 146 */ ED_UNASSIGNED, /* M-^R */
- /* 147 */ ED_UNASSIGNED, /* M-^S */
- /* 148 */ ED_UNASSIGNED, /* M-^T */
- /* 149 */ ED_UNASSIGNED, /* M-^U */
- /* 150 */ ED_UNASSIGNED, /* M-^V */
- /* 151 */ ED_UNASSIGNED, /* M-^W */
- /* 152 */ ED_UNASSIGNED, /* M-^X */
- /* 153 */ ED_UNASSIGNED, /* M-^Y */
- /* 154 */ ED_UNASSIGNED, /* M-^Z */
- /* 155 */ ED_UNASSIGNED, /* M-^[ */
- /* 156 */ ED_UNASSIGNED, /* M-^\ */
- /* 157 */ ED_UNASSIGNED, /* M-^] */
- /* 158 */ ED_UNASSIGNED, /* M-^^ */
- /* 159 */ EM_COPY_PREV_WORD, /* M-^_ */
- /* 160 */ ED_UNASSIGNED, /* M-SPACE */
- /* 161 */ ED_UNASSIGNED, /* M-! */
- /* 162 */ ED_UNASSIGNED, /* M-" */
- /* 163 */ ED_UNASSIGNED, /* M-# */
- /* 164 */ ED_UNASSIGNED, /* M-$ */
- /* 165 */ ED_UNASSIGNED, /* M-% */
- /* 166 */ ED_UNASSIGNED, /* M-& */
- /* 167 */ ED_UNASSIGNED, /* M-' */
- /* 168 */ ED_UNASSIGNED, /* M-( */
- /* 169 */ ED_UNASSIGNED, /* M-) */
- /* 170 */ ED_UNASSIGNED, /* M-* */
- /* 171 */ ED_UNASSIGNED, /* M-+ */
- /* 172 */ ED_UNASSIGNED, /* M-, */
- /* 173 */ ED_UNASSIGNED, /* M-- */
- /* 174 */ ED_UNASSIGNED, /* M-. */
- /* 175 */ ED_UNASSIGNED, /* M-/ */
- /* 176 */ ED_ARGUMENT_DIGIT, /* M-0 */
- /* 177 */ ED_ARGUMENT_DIGIT, /* M-1 */
- /* 178 */ ED_ARGUMENT_DIGIT, /* M-2 */
- /* 179 */ ED_ARGUMENT_DIGIT, /* M-3 */
- /* 180 */ ED_ARGUMENT_DIGIT, /* M-4 */
- /* 181 */ ED_ARGUMENT_DIGIT, /* M-5 */
- /* 182 */ ED_ARGUMENT_DIGIT, /* M-6 */
- /* 183 */ ED_ARGUMENT_DIGIT, /* M-7 */
- /* 184 */ ED_ARGUMENT_DIGIT, /* M-8 */
- /* 185 */ ED_ARGUMENT_DIGIT, /* M-9 */
- /* 186 */ ED_UNASSIGNED, /* M-: */
- /* 187 */ ED_UNASSIGNED, /* M-; */
- /* 188 */ ED_UNASSIGNED, /* M-< */
- /* 189 */ ED_UNASSIGNED, /* M-= */
- /* 190 */ ED_UNASSIGNED, /* M-> */
- /* 191 */ ED_UNASSIGNED, /* M-? */
- /* 192 */ ED_UNASSIGNED, /* M-@ */
- /* 193 */ ED_UNASSIGNED, /* M-A */
- /* 194 */ ED_PREV_WORD, /* M-B */
- /* 195 */ EM_CAPITOL_CASE, /* M-C */
- /* 196 */ EM_DELETE_NEXT_WORD, /* M-D */
- /* 197 */ ED_UNASSIGNED, /* M-E */
- /* 198 */ EM_NEXT_WORD, /* M-F */
- /* 199 */ ED_UNASSIGNED, /* M-G */
- /* 200 */ ED_UNASSIGNED, /* M-H */
- /* 201 */ ED_UNASSIGNED, /* M-I */
- /* 202 */ ED_UNASSIGNED, /* M-J */
- /* 203 */ ED_UNASSIGNED, /* M-K */
- /* 204 */ EM_LOWER_CASE, /* M-L */
- /* 205 */ ED_UNASSIGNED, /* M-M */
- /* 206 */ ED_SEARCH_NEXT_HISTORY, /* M-N */
- /* 207 */ ED_SEQUENCE_LEAD_IN, /* M-O */
- /* 208 */ ED_SEARCH_PREV_HISTORY, /* M-P */
- /* 209 */ ED_UNASSIGNED, /* M-Q */
- /* 210 */ ED_UNASSIGNED, /* M-R */
- /* 211 */ ED_UNASSIGNED, /* M-S */
- /* 212 */ ED_UNASSIGNED, /* M-T */
- /* 213 */ EM_UPPER_CASE, /* M-U */
- /* 214 */ ED_UNASSIGNED, /* M-V */
- /* 215 */ EM_COPY_REGION, /* M-W */
- /* 216 */ ED_COMMAND, /* M-X */
- /* 217 */ ED_UNASSIGNED, /* M-Y */
- /* 218 */ ED_UNASSIGNED, /* M-Z */
- /* 219 */ ED_SEQUENCE_LEAD_IN, /* M-[ */
- /* 220 */ ED_UNASSIGNED, /* M-\ */
- /* 221 */ ED_UNASSIGNED, /* M-] */
- /* 222 */ ED_UNASSIGNED, /* M-^ */
- /* 223 */ ED_UNASSIGNED, /* M-_ */
- /* 223 */ ED_UNASSIGNED, /* M-` */
- /* 224 */ ED_UNASSIGNED, /* M-a */
- /* 225 */ ED_PREV_WORD, /* M-b */
- /* 226 */ EM_CAPITOL_CASE, /* M-c */
- /* 227 */ EM_DELETE_NEXT_WORD, /* M-d */
- /* 228 */ ED_UNASSIGNED, /* M-e */
- /* 229 */ EM_NEXT_WORD, /* M-f */
- /* 230 */ ED_UNASSIGNED, /* M-g */
- /* 231 */ ED_UNASSIGNED, /* M-h */
- /* 232 */ ED_UNASSIGNED, /* M-i */
- /* 233 */ ED_UNASSIGNED, /* M-j */
- /* 234 */ ED_UNASSIGNED, /* M-k */
- /* 235 */ EM_LOWER_CASE, /* M-l */
- /* 236 */ ED_UNASSIGNED, /* M-m */
- /* 237 */ ED_SEARCH_NEXT_HISTORY, /* M-n */
- /* 238 */ ED_UNASSIGNED, /* M-o */
- /* 239 */ ED_SEARCH_PREV_HISTORY, /* M-p */
- /* 240 */ ED_UNASSIGNED, /* M-q */
- /* 241 */ ED_UNASSIGNED, /* M-r */
- /* 242 */ ED_UNASSIGNED, /* M-s */
- /* 243 */ ED_UNASSIGNED, /* M-t */
- /* 244 */ EM_UPPER_CASE, /* M-u */
- /* 245 */ ED_UNASSIGNED, /* M-v */
- /* 246 */ EM_COPY_REGION, /* M-w */
- /* 247 */ ED_COMMAND, /* M-x */
- /* 248 */ ED_UNASSIGNED, /* M-y */
- /* 249 */ ED_UNASSIGNED, /* M-z */
- /* 250 */ ED_UNASSIGNED, /* M-{ */
- /* 251 */ ED_UNASSIGNED, /* M-| */
- /* 252 */ ED_UNASSIGNED, /* M-} */
- /* 253 */ ED_UNASSIGNED, /* M-~ */
- /* 254 */ ED_DELETE_PREV_WORD /* M-^? */
- /* 255 */
-};
-
-/*
- * keymap table for vi. Each index into above tbl; should be
- * N_KEYS entries long. Vi mode uses a sticky-extend to do command mode:
- * insert mode characters are in the normal keymap, and command mode
- * in the extended keymap.
- */
-private el_action_t el_map_vi_insert[] = {
-#ifdef KSHVI
- /* 0 */ ED_UNASSIGNED, /* ^@ */
- /* 1 */ ED_INSERT, /* ^A */
- /* 2 */ ED_INSERT, /* ^B */
- /* 3 */ ED_INSERT, /* ^C */
- /* 4 */ VI_LIST_OR_EOF, /* ^D */
- /* 5 */ ED_INSERT, /* ^E */
- /* 6 */ ED_INSERT, /* ^F */
- /* 7 */ ED_INSERT, /* ^G */
- /* 8 */ VI_DELETE_PREV_CHAR, /* ^H */ /* BackSpace key */
- /* 9 */ ED_INSERT, /* ^I */ /* Tab Key */
- /* 10 */ ED_NEWLINE, /* ^J */
- /* 11 */ ED_INSERT, /* ^K */
- /* 12 */ ED_INSERT, /* ^L */
- /* 13 */ ED_NEWLINE, /* ^M */
- /* 14 */ ED_INSERT, /* ^N */
- /* 15 */ ED_INSERT, /* ^O */
- /* 16 */ ED_INSERT, /* ^P */
- /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */
- /* 18 */ ED_INSERT, /* ^R */
- /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */
- /* 20 */ ED_INSERT, /* ^T */
- /* 21 */ VI_KILL_LINE_PREV, /* ^U */
- /* 22 */ ED_QUOTED_INSERT, /* ^V */
- /* 23 */ ED_DELETE_PREV_WORD, /* ^W */ /* Only until strt edit pos */
- /* 24 */ ED_INSERT, /* ^X */
- /* 25 */ ED_INSERT, /* ^Y */
- /* 26 */ ED_INSERT, /* ^Z */
- /* 27 */ VI_COMMAND_MODE, /* ^[ */ /* [ Esc ] key */
- /* 28 */ ED_TTY_SIGQUIT, /* ^\ */
- /* 29 */ ED_INSERT, /* ^] */
- /* 30 */ ED_INSERT, /* ^^ */
- /* 31 */ ED_INSERT, /* ^_ */
-#else /* !KSHVI */
- /* 0 */ ED_UNASSIGNED, /* ^@ */ /* NOTE: These mappings do */
- /* 1 */ ED_MOVE_TO_BEG, /* ^A */ /* NOT Correspond well to */
- /* 2 */ ED_PREV_CHAR, /* ^B */ /* the KSH VI editing as- */
- /* 3 */ ED_TTY_SIGINT, /* ^C */ /* signments. On the other */
- /* 4 */ VI_LIST_OR_EOF, /* ^D */ /* hand they are convenient*/
- /* 5 */ ED_MOVE_TO_END, /* ^E */ /* and many people have */
- /* 6 */ ED_NEXT_CHAR, /* ^F */ /* have gotten used to them*/
- /* 7 */ ED_UNASSIGNED, /* ^G */
- /* 8 */ ED_DELETE_PREV_CHAR, /* ^H */ /* BackSpace key */
- /* 9 */ ED_UNASSIGNED, /* ^I */ /* Tab Key */
- /* 10 */ ED_NEWLINE, /* ^J */
- /* 11 */ ED_KILL_LINE, /* ^K */
- /* 12 */ ED_CLEAR_SCREEN, /* ^L */
- /* 13 */ ED_NEWLINE, /* ^M */
- /* 14 */ ED_NEXT_HISTORY, /* ^N */
- /* 15 */ ED_TTY_FLUSH_OUTPUT, /* ^O */
- /* 16 */ ED_PREV_HISTORY, /* ^P */
- /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */
- /* 18 */ ED_REDISPLAY, /* ^R */
- /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */
- /* 20 */ ED_TRANSPOSE_CHARS, /* ^T */
- /* 21 */ VI_KILL_LINE_PREV, /* ^U */
- /* 22 */ ED_QUOTED_INSERT, /* ^V */
- /* 23 */ ED_DELETE_PREV_WORD, /* ^W */
- /* 24 */ ED_UNASSIGNED, /* ^X */
- /* 25 */ ED_TTY_DSUSP, /* ^Y */
- /* 26 */ ED_TTY_SIGTSTP, /* ^Z */
- /* 27 */ VI_COMMAND_MODE, /* ^[ */
- /* 28 */ ED_TTY_SIGQUIT, /* ^\ */
- /* 29 */ ED_UNASSIGNED, /* ^] */
- /* 30 */ ED_UNASSIGNED, /* ^^ */
- /* 31 */ ED_UNASSIGNED, /* ^_ */
-#endif /* KSHVI */
- /* 32 */ ED_INSERT, /* SPACE */
- /* 33 */ ED_INSERT, /* ! */
- /* 34 */ ED_INSERT, /* " */
- /* 35 */ ED_INSERT, /* # */
- /* 36 */ ED_INSERT, /* $ */
- /* 37 */ ED_INSERT, /* % */
- /* 38 */ ED_INSERT, /* & */
- /* 39 */ ED_INSERT, /* ' */
- /* 40 */ ED_INSERT, /* ( */
- /* 41 */ ED_INSERT, /* ) */
- /* 42 */ ED_INSERT, /* * */
- /* 43 */ ED_INSERT, /* + */
- /* 44 */ ED_INSERT, /* , */
- /* 45 */ ED_INSERT, /* - */
- /* 46 */ ED_INSERT, /* . */
- /* 47 */ ED_INSERT, /* / */
- /* 48 */ ED_INSERT, /* 0 */
- /* 49 */ ED_INSERT, /* 1 */
- /* 50 */ ED_INSERT, /* 2 */
- /* 51 */ ED_INSERT, /* 3 */
- /* 52 */ ED_INSERT, /* 4 */
- /* 53 */ ED_INSERT, /* 5 */
- /* 54 */ ED_INSERT, /* 6 */
- /* 55 */ ED_INSERT, /* 7 */
- /* 56 */ ED_INSERT, /* 8 */
- /* 57 */ ED_INSERT, /* 9 */
- /* 58 */ ED_INSERT, /* : */
- /* 59 */ ED_INSERT, /* ; */
- /* 60 */ ED_INSERT, /* < */
- /* 61 */ ED_INSERT, /* = */
- /* 62 */ ED_INSERT, /* > */
- /* 63 */ ED_INSERT, /* ? */
- /* 64 */ ED_INSERT, /* @ */
- /* 65 */ ED_INSERT, /* A */
- /* 66 */ ED_INSERT, /* B */
- /* 67 */ ED_INSERT, /* C */
- /* 68 */ ED_INSERT, /* D */
- /* 69 */ ED_INSERT, /* E */
- /* 70 */ ED_INSERT, /* F */
- /* 71 */ ED_INSERT, /* G */
- /* 72 */ ED_INSERT, /* H */
- /* 73 */ ED_INSERT, /* I */
- /* 74 */ ED_INSERT, /* J */
- /* 75 */ ED_INSERT, /* K */
- /* 76 */ ED_INSERT, /* L */
- /* 77 */ ED_INSERT, /* M */
- /* 78 */ ED_INSERT, /* N */
- /* 79 */ ED_INSERT, /* O */
- /* 80 */ ED_INSERT, /* P */
- /* 81 */ ED_INSERT, /* Q */
- /* 82 */ ED_INSERT, /* R */
- /* 83 */ ED_INSERT, /* S */
- /* 84 */ ED_INSERT, /* T */
- /* 85 */ ED_INSERT, /* U */
- /* 86 */ ED_INSERT, /* V */
- /* 87 */ ED_INSERT, /* W */
- /* 88 */ ED_INSERT, /* X */
- /* 89 */ ED_INSERT, /* Y */
- /* 90 */ ED_INSERT, /* Z */
- /* 91 */ ED_INSERT, /* [ */
- /* 92 */ ED_INSERT, /* \ */
- /* 93 */ ED_INSERT, /* ] */
- /* 94 */ ED_INSERT, /* ^ */
- /* 95 */ ED_INSERT, /* _ */
- /* 96 */ ED_INSERT, /* ` */
- /* 97 */ ED_INSERT, /* a */
- /* 98 */ ED_INSERT, /* b */
- /* 99 */ ED_INSERT, /* c */
- /* 100 */ ED_INSERT, /* d */
- /* 101 */ ED_INSERT, /* e */
- /* 102 */ ED_INSERT, /* f */
- /* 103 */ ED_INSERT, /* g */
- /* 104 */ ED_INSERT, /* h */
- /* 105 */ ED_INSERT, /* i */
- /* 106 */ ED_INSERT, /* j */
- /* 107 */ ED_INSERT, /* k */
- /* 108 */ ED_INSERT, /* l */
- /* 109 */ ED_INSERT, /* m */
- /* 110 */ ED_INSERT, /* n */
- /* 111 */ ED_INSERT, /* o */
- /* 112 */ ED_INSERT, /* p */
- /* 113 */ ED_INSERT, /* q */
- /* 114 */ ED_INSERT, /* r */
- /* 115 */ ED_INSERT, /* s */
- /* 116 */ ED_INSERT, /* t */
- /* 117 */ ED_INSERT, /* u */
- /* 118 */ ED_INSERT, /* v */
- /* 119 */ ED_INSERT, /* w */
- /* 120 */ ED_INSERT, /* x */
- /* 121 */ ED_INSERT, /* y */
- /* 122 */ ED_INSERT, /* z */
- /* 123 */ ED_INSERT, /* { */
- /* 124 */ ED_INSERT, /* | */
- /* 125 */ ED_INSERT, /* } */
- /* 126 */ ED_INSERT, /* ~ */
- /* 127 */ ED_DELETE_PREV_CHAR, /* ^? */
- /* 128 */ ED_UNASSIGNED, /* M-^@ */
- /* 129 */ ED_UNASSIGNED, /* M-^A */
- /* 130 */ ED_UNASSIGNED, /* M-^B */
- /* 131 */ ED_UNASSIGNED, /* M-^C */
- /* 132 */ ED_UNASSIGNED, /* M-^D */
- /* 133 */ ED_UNASSIGNED, /* M-^E */
- /* 134 */ ED_UNASSIGNED, /* M-^F */
- /* 135 */ ED_UNASSIGNED, /* M-^G */
- /* 136 */ ED_UNASSIGNED, /* M-^H */
- /* 137 */ ED_UNASSIGNED, /* M-^I */
- /* 138 */ ED_UNASSIGNED, /* M-^J */
- /* 139 */ ED_UNASSIGNED, /* M-^K */
- /* 140 */ ED_UNASSIGNED, /* M-^L */
- /* 141 */ ED_UNASSIGNED, /* M-^M */
- /* 142 */ ED_UNASSIGNED, /* M-^N */
- /* 143 */ ED_UNASSIGNED, /* M-^O */
- /* 144 */ ED_UNASSIGNED, /* M-^P */
- /* 145 */ ED_UNASSIGNED, /* M-^Q */
- /* 146 */ ED_UNASSIGNED, /* M-^R */
- /* 147 */ ED_UNASSIGNED, /* M-^S */
- /* 148 */ ED_UNASSIGNED, /* M-^T */
- /* 149 */ ED_UNASSIGNED, /* M-^U */
- /* 150 */ ED_UNASSIGNED, /* M-^V */
- /* 151 */ ED_UNASSIGNED, /* M-^W */
- /* 152 */ ED_UNASSIGNED, /* M-^X */
- /* 153 */ ED_UNASSIGNED, /* M-^Y */
- /* 154 */ ED_UNASSIGNED, /* M-^Z */
- /* 155 */ ED_UNASSIGNED, /* M-^[ */
- /* 156 */ ED_UNASSIGNED, /* M-^\ */
- /* 157 */ ED_UNASSIGNED, /* M-^] */
- /* 158 */ ED_UNASSIGNED, /* M-^^ */
- /* 159 */ ED_UNASSIGNED, /* M-^_ */
- /* 160 */ ED_UNASSIGNED, /* M-SPACE */
- /* 161 */ ED_UNASSIGNED, /* M-! */
- /* 162 */ ED_UNASSIGNED, /* M-" */
- /* 163 */ ED_UNASSIGNED, /* M-# */
- /* 164 */ ED_UNASSIGNED, /* M-$ */
- /* 165 */ ED_UNASSIGNED, /* M-% */
- /* 166 */ ED_UNASSIGNED, /* M-& */
- /* 167 */ ED_UNASSIGNED, /* M-' */
- /* 168 */ ED_UNASSIGNED, /* M-( */
- /* 169 */ ED_UNASSIGNED, /* M-) */
- /* 170 */ ED_UNASSIGNED, /* M-* */
- /* 171 */ ED_UNASSIGNED, /* M-+ */
- /* 172 */ ED_UNASSIGNED, /* M-, */
- /* 173 */ ED_UNASSIGNED, /* M-- */
- /* 174 */ ED_UNASSIGNED, /* M-. */
- /* 175 */ ED_UNASSIGNED, /* M-/ */
- /* 176 */ ED_UNASSIGNED, /* M-0 */
- /* 177 */ ED_UNASSIGNED, /* M-1 */
- /* 178 */ ED_UNASSIGNED, /* M-2 */
- /* 179 */ ED_UNASSIGNED, /* M-3 */
- /* 180 */ ED_UNASSIGNED, /* M-4 */
- /* 181 */ ED_UNASSIGNED, /* M-5 */
- /* 182 */ ED_UNASSIGNED, /* M-6 */
- /* 183 */ ED_UNASSIGNED, /* M-7 */
- /* 184 */ ED_UNASSIGNED, /* M-8 */
- /* 185 */ ED_UNASSIGNED, /* M-9 */
- /* 186 */ ED_UNASSIGNED, /* M-: */
- /* 187 */ ED_UNASSIGNED, /* M-; */
- /* 188 */ ED_UNASSIGNED, /* M-< */
- /* 189 */ ED_UNASSIGNED, /* M-= */
- /* 190 */ ED_UNASSIGNED, /* M-> */
- /* 191 */ ED_UNASSIGNED, /* M-? */
- /* 192 */ ED_UNASSIGNED, /* M-@ */
- /* 193 */ ED_UNASSIGNED, /* M-A */
- /* 194 */ ED_UNASSIGNED, /* M-B */
- /* 195 */ ED_UNASSIGNED, /* M-C */
- /* 196 */ ED_UNASSIGNED, /* M-D */
- /* 197 */ ED_UNASSIGNED, /* M-E */
- /* 198 */ ED_UNASSIGNED, /* M-F */
- /* 199 */ ED_UNASSIGNED, /* M-G */
- /* 200 */ ED_UNASSIGNED, /* M-H */
- /* 201 */ ED_UNASSIGNED, /* M-I */
- /* 202 */ ED_UNASSIGNED, /* M-J */
- /* 203 */ ED_UNASSIGNED, /* M-K */
- /* 204 */ ED_UNASSIGNED, /* M-L */
- /* 205 */ ED_UNASSIGNED, /* M-M */
- /* 206 */ ED_UNASSIGNED, /* M-N */
- /* 207 */ ED_UNASSIGNED, /* M-O */
- /* 208 */ ED_UNASSIGNED, /* M-P */
- /* 209 */ ED_UNASSIGNED, /* M-Q */
- /* 210 */ ED_UNASSIGNED, /* M-R */
- /* 211 */ ED_UNASSIGNED, /* M-S */
- /* 212 */ ED_UNASSIGNED, /* M-T */
- /* 213 */ ED_UNASSIGNED, /* M-U */
- /* 214 */ ED_UNASSIGNED, /* M-V */
- /* 215 */ ED_UNASSIGNED, /* M-W */
- /* 216 */ ED_UNASSIGNED, /* M-X */
- /* 217 */ ED_UNASSIGNED, /* M-Y */
- /* 218 */ ED_UNASSIGNED, /* M-Z */
- /* 219 */ ED_UNASSIGNED, /* M-[ */
- /* 220 */ ED_UNASSIGNED, /* M-\ */
- /* 221 */ ED_UNASSIGNED, /* M-] */
- /* 222 */ ED_UNASSIGNED, /* M-^ */
- /* 223 */ ED_UNASSIGNED, /* M-_ */
- /* 224 */ ED_UNASSIGNED, /* M-` */
- /* 225 */ ED_UNASSIGNED, /* M-a */
- /* 226 */ ED_UNASSIGNED, /* M-b */
- /* 227 */ ED_UNASSIGNED, /* M-c */
- /* 228 */ ED_UNASSIGNED, /* M-d */
- /* 229 */ ED_UNASSIGNED, /* M-e */
- /* 230 */ ED_UNASSIGNED, /* M-f */
- /* 231 */ ED_UNASSIGNED, /* M-g */
- /* 232 */ ED_UNASSIGNED, /* M-h */
- /* 233 */ ED_UNASSIGNED, /* M-i */
- /* 234 */ ED_UNASSIGNED, /* M-j */
- /* 235 */ ED_UNASSIGNED, /* M-k */
- /* 236 */ ED_UNASSIGNED, /* M-l */
- /* 237 */ ED_UNASSIGNED, /* M-m */
- /* 238 */ ED_UNASSIGNED, /* M-n */
- /* 239 */ ED_UNASSIGNED, /* M-o */
- /* 240 */ ED_UNASSIGNED, /* M-p */
- /* 241 */ ED_UNASSIGNED, /* M-q */
- /* 242 */ ED_UNASSIGNED, /* M-r */
- /* 243 */ ED_UNASSIGNED, /* M-s */
- /* 244 */ ED_UNASSIGNED, /* M-t */
- /* 245 */ ED_UNASSIGNED, /* M-u */
- /* 246 */ ED_UNASSIGNED, /* M-v */
- /* 247 */ ED_UNASSIGNED, /* M-w */
- /* 248 */ ED_UNASSIGNED, /* M-x */
- /* 249 */ ED_UNASSIGNED, /* M-y */
- /* 250 */ ED_UNASSIGNED, /* M-z */
- /* 251 */ ED_UNASSIGNED, /* M-{ */
- /* 252 */ ED_UNASSIGNED, /* M-| */
- /* 253 */ ED_UNASSIGNED, /* M-} */
- /* 254 */ ED_UNASSIGNED, /* M-~ */
- /* 255 */ ED_UNASSIGNED /* M-^? */
-};
-
-private el_action_t el_map_vi_command[] = {
- /* 0 */ ED_UNASSIGNED, /* ^@ */
- /* 1 */ ED_MOVE_TO_BEG, /* ^A */
- /* 2 */ ED_UNASSIGNED, /* ^B */
- /* 3 */ ED_TTY_SIGINT, /* ^C */
- /* 4 */ ED_UNASSIGNED, /* ^D */
- /* 5 */ ED_MOVE_TO_END, /* ^E */
- /* 6 */ ED_UNASSIGNED, /* ^F */
- /* 7 */ ED_UNASSIGNED, /* ^G */
- /* 8 */ ED_PREV_CHAR, /* ^H */
- /* 9 */ ED_UNASSIGNED, /* ^I */
- /* 10 */ ED_NEWLINE, /* ^J */
- /* 11 */ ED_KILL_LINE, /* ^K */
- /* 12 */ ED_CLEAR_SCREEN, /* ^L */
- /* 13 */ ED_NEWLINE, /* ^M */
- /* 14 */ ED_NEXT_HISTORY, /* ^N */
- /* 15 */ ED_TTY_FLUSH_OUTPUT, /* ^O */
- /* 16 */ ED_PREV_HISTORY, /* ^P */
- /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */
- /* 18 */ ED_REDISPLAY, /* ^R */
- /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */
- /* 20 */ ED_UNASSIGNED, /* ^T */
- /* 21 */ VI_KILL_LINE_PREV, /* ^U */
- /* 22 */ ED_UNASSIGNED, /* ^V */
- /* 23 */ ED_DELETE_PREV_WORD, /* ^W */
- /* 24 */ ED_UNASSIGNED, /* ^X */
- /* 25 */ ED_UNASSIGNED, /* ^Y */
- /* 26 */ ED_UNASSIGNED, /* ^Z */
- /* 27 */ EM_META_NEXT, /* ^[ */
- /* 28 */ ED_TTY_SIGQUIT, /* ^\ */
- /* 29 */ ED_UNASSIGNED, /* ^] */
- /* 30 */ ED_UNASSIGNED, /* ^^ */
- /* 31 */ ED_UNASSIGNED, /* ^_ */
- /* 32 */ ED_NEXT_CHAR, /* SPACE */
- /* 33 */ ED_UNASSIGNED, /* ! */
- /* 34 */ ED_UNASSIGNED, /* " */
- /* 35 */ ED_UNASSIGNED, /* # */
- /* 36 */ ED_MOVE_TO_END, /* $ */
- /* 37 */ ED_UNASSIGNED, /* % */
- /* 38 */ ED_UNASSIGNED, /* & */
- /* 39 */ ED_UNASSIGNED, /* ' */
- /* 40 */ ED_UNASSIGNED, /* ( */
- /* 41 */ ED_UNASSIGNED, /* ) */
- /* 42 */ ED_UNASSIGNED, /* * */
- /* 43 */ ED_NEXT_HISTORY, /* + */
- /* 44 */ VI_REPEAT_PREV_CHAR, /* , */
- /* 45 */ ED_PREV_HISTORY, /* - */
- /* 46 */ ED_UNASSIGNED, /* . */
- /* 47 */ VI_SEARCH_PREV, /* / */
- /* 48 */ VI_ZERO, /* 0 */
- /* 49 */ ED_ARGUMENT_DIGIT, /* 1 */
- /* 50 */ ED_ARGUMENT_DIGIT, /* 2 */
- /* 51 */ ED_ARGUMENT_DIGIT, /* 3 */
- /* 52 */ ED_ARGUMENT_DIGIT, /* 4 */
- /* 53 */ ED_ARGUMENT_DIGIT, /* 5 */
- /* 54 */ ED_ARGUMENT_DIGIT, /* 6 */
- /* 55 */ ED_ARGUMENT_DIGIT, /* 7 */
- /* 56 */ ED_ARGUMENT_DIGIT, /* 8 */
- /* 57 */ ED_ARGUMENT_DIGIT, /* 9 */
- /* 58 */ ED_COMMAND, /* : */
- /* 59 */ VI_REPEAT_NEXT_CHAR, /* ; */
- /* 60 */ ED_UNASSIGNED, /* < */
- /* 61 */ ED_UNASSIGNED, /* = */
- /* 62 */ ED_UNASSIGNED, /* > */
- /* 63 */ VI_SEARCH_NEXT, /* ? */
- /* 64 */ ED_UNASSIGNED, /* @ */
- /* 65 */ VI_ADD_AT_EOL, /* A */
- /* 66 */ VI_PREV_SPACE_WORD, /* B */
- /* 67 */ VI_CHANGE_TO_EOL, /* C */
- /* 68 */ ED_KILL_LINE, /* D */
- /* 69 */ VI_TO_END_WORD, /* E */
- /* 70 */ VI_PREV_CHAR, /* F */
- /* 71 */ ED_UNASSIGNED, /* G */
- /* 72 */ ED_UNASSIGNED, /* H */
- /* 73 */ VI_INSERT_AT_BOL, /* I */
- /* 74 */ ED_SEARCH_NEXT_HISTORY, /* J */
- /* 75 */ ED_SEARCH_PREV_HISTORY, /* K */
- /* 76 */ ED_UNASSIGNED, /* L */
- /* 77 */ ED_UNASSIGNED, /* M */
- /* 78 */ VI_REPEAT_SEARCH_PREV, /* N */
- /* 79 */ ED_SEQUENCE_LEAD_IN, /* O */
- /* 80 */ VI_PASTE_PREV, /* P */
- /* 81 */ ED_UNASSIGNED, /* Q */
- /* 82 */ VI_REPLACE_MODE, /* R */
- /* 83 */ VI_SUBSTITUTE_LINE, /* S */
- /* 84 */ VI_TO_PREV_CHAR, /* T */
- /* 85 */ ED_UNASSIGNED, /* U */
- /* 86 */ ED_UNASSIGNED, /* V */
- /* 87 */ VI_NEXT_SPACE_WORD, /* W */
- /* 88 */ ED_DELETE_PREV_CHAR, /* X */
- /* 89 */ ED_UNASSIGNED, /* Y */
- /* 90 */ ED_UNASSIGNED, /* Z */
- /* 91 */ ED_SEQUENCE_LEAD_IN, /* [ */
- /* 92 */ ED_UNASSIGNED, /* \ */
- /* 93 */ ED_UNASSIGNED, /* ] */
- /* 94 */ ED_MOVE_TO_BEG, /* ^ */
- /* 95 */ ED_UNASSIGNED, /* _ */
- /* 96 */ ED_UNASSIGNED, /* ` */
- /* 97 */ VI_ADD, /* a */
- /* 98 */ VI_PREV_WORD, /* b */
- /* 99 */ VI_CHANGE_META, /* c */
- /* 100 */ VI_DELETE_META, /* d */
- /* 101 */ VI_END_WORD, /* e */
- /* 102 */ VI_NEXT_CHAR, /* f */
- /* 103 */ ED_UNASSIGNED, /* g */
- /* 104 */ ED_PREV_CHAR, /* h */
- /* 105 */ VI_INSERT, /* i */
- /* 106 */ ED_NEXT_HISTORY, /* j */
- /* 107 */ ED_PREV_HISTORY, /* k */
- /* 108 */ ED_NEXT_CHAR, /* l */
- /* 109 */ ED_UNASSIGNED, /* m */
- /* 110 */ VI_REPEAT_SEARCH_NEXT, /* n */
- /* 111 */ ED_UNASSIGNED, /* o */
- /* 112 */ VI_PASTE_NEXT, /* p */
- /* 113 */ ED_UNASSIGNED, /* q */
- /* 114 */ VI_REPLACE_CHAR, /* r */
- /* 115 */ VI_SUBSTITUTE_CHAR, /* s */
- /* 116 */ VI_TO_NEXT_CHAR, /* t */
- /* 117 */ VI_UNDO, /* u */
- /* 118 */ ED_UNASSIGNED, /* v */
- /* 119 */ VI_NEXT_WORD, /* w */
- /* 120 */ ED_DELETE_NEXT_CHAR, /* x */
- /* 121 */ ED_UNASSIGNED, /* y */
- /* 122 */ ED_UNASSIGNED, /* z */
- /* 123 */ ED_UNASSIGNED, /* { */
- /* 124 */ ED_UNASSIGNED, /* | */
- /* 125 */ ED_UNASSIGNED, /* } */
- /* 126 */ VI_CHANGE_CASE, /* ~ */
- /* 127 */ ED_DELETE_PREV_CHAR, /* ^? */
- /* 128 */ ED_UNASSIGNED, /* M-^@ */
- /* 129 */ ED_UNASSIGNED, /* M-^A */
- /* 130 */ ED_UNASSIGNED, /* M-^B */
- /* 131 */ ED_UNASSIGNED, /* M-^C */
- /* 132 */ ED_UNASSIGNED, /* M-^D */
- /* 133 */ ED_UNASSIGNED, /* M-^E */
- /* 134 */ ED_UNASSIGNED, /* M-^F */
- /* 135 */ ED_UNASSIGNED, /* M-^G */
- /* 136 */ ED_UNASSIGNED, /* M-^H */
- /* 137 */ ED_UNASSIGNED, /* M-^I */
- /* 138 */ ED_UNASSIGNED, /* M-^J */
- /* 139 */ ED_UNASSIGNED, /* M-^K */
- /* 140 */ ED_UNASSIGNED, /* M-^L */
- /* 141 */ ED_UNASSIGNED, /* M-^M */
- /* 142 */ ED_UNASSIGNED, /* M-^N */
- /* 143 */ ED_UNASSIGNED, /* M-^O */
- /* 144 */ ED_UNASSIGNED, /* M-^P */
- /* 145 */ ED_UNASSIGNED, /* M-^Q */
- /* 146 */ ED_UNASSIGNED, /* M-^R */
- /* 147 */ ED_UNASSIGNED, /* M-^S */
- /* 148 */ ED_UNASSIGNED, /* M-^T */
- /* 149 */ ED_UNASSIGNED, /* M-^U */
- /* 150 */ ED_UNASSIGNED, /* M-^V */
- /* 151 */ ED_UNASSIGNED, /* M-^W */
- /* 152 */ ED_UNASSIGNED, /* M-^X */
- /* 153 */ ED_UNASSIGNED, /* M-^Y */
- /* 154 */ ED_UNASSIGNED, /* M-^Z */
- /* 155 */ ED_UNASSIGNED, /* M-^[ */
- /* 156 */ ED_UNASSIGNED, /* M-^\ */
- /* 157 */ ED_UNASSIGNED, /* M-^] */
- /* 158 */ ED_UNASSIGNED, /* M-^^ */
- /* 159 */ ED_UNASSIGNED, /* M-^_ */
- /* 160 */ ED_UNASSIGNED, /* M-SPACE */
- /* 161 */ ED_UNASSIGNED, /* M-! */
- /* 162 */ ED_UNASSIGNED, /* M-" */
- /* 163 */ ED_UNASSIGNED, /* M-# */
- /* 164 */ ED_UNASSIGNED, /* M-$ */
- /* 165 */ ED_UNASSIGNED, /* M-% */
- /* 166 */ ED_UNASSIGNED, /* M-& */
- /* 167 */ ED_UNASSIGNED, /* M-' */
- /* 168 */ ED_UNASSIGNED, /* M-( */
- /* 169 */ ED_UNASSIGNED, /* M-) */
- /* 170 */ ED_UNASSIGNED, /* M-* */
- /* 171 */ ED_UNASSIGNED, /* M-+ */
- /* 172 */ ED_UNASSIGNED, /* M-, */
- /* 173 */ ED_UNASSIGNED, /* M-- */
- /* 174 */ ED_UNASSIGNED, /* M-. */
- /* 175 */ ED_UNASSIGNED, /* M-/ */
- /* 176 */ ED_UNASSIGNED, /* M-0 */
- /* 177 */ ED_UNASSIGNED, /* M-1 */
- /* 178 */ ED_UNASSIGNED, /* M-2 */
- /* 179 */ ED_UNASSIGNED, /* M-3 */
- /* 180 */ ED_UNASSIGNED, /* M-4 */
- /* 181 */ ED_UNASSIGNED, /* M-5 */
- /* 182 */ ED_UNASSIGNED, /* M-6 */
- /* 183 */ ED_UNASSIGNED, /* M-7 */
- /* 184 */ ED_UNASSIGNED, /* M-8 */
- /* 185 */ ED_UNASSIGNED, /* M-9 */
- /* 186 */ ED_UNASSIGNED, /* M-: */
- /* 187 */ ED_UNASSIGNED, /* M-; */
- /* 188 */ ED_UNASSIGNED, /* M-< */
- /* 189 */ ED_UNASSIGNED, /* M-= */
- /* 190 */ ED_UNASSIGNED, /* M-> */
- /* 191 */ ED_UNASSIGNED, /* M-? */
- /* 192 */ ED_UNASSIGNED, /* M-@ */
- /* 193 */ ED_UNASSIGNED, /* M-A */
- /* 194 */ ED_UNASSIGNED, /* M-B */
- /* 195 */ ED_UNASSIGNED, /* M-C */
- /* 196 */ ED_UNASSIGNED, /* M-D */
- /* 197 */ ED_UNASSIGNED, /* M-E */
- /* 198 */ ED_UNASSIGNED, /* M-F */
- /* 199 */ ED_UNASSIGNED, /* M-G */
- /* 200 */ ED_UNASSIGNED, /* M-H */
- /* 201 */ ED_UNASSIGNED, /* M-I */
- /* 202 */ ED_UNASSIGNED, /* M-J */
- /* 203 */ ED_UNASSIGNED, /* M-K */
- /* 204 */ ED_UNASSIGNED, /* M-L */
- /* 205 */ ED_UNASSIGNED, /* M-M */
- /* 206 */ ED_UNASSIGNED, /* M-N */
- /* 207 */ ED_SEQUENCE_LEAD_IN, /* M-O */
- /* 208 */ ED_UNASSIGNED, /* M-P */
- /* 209 */ ED_UNASSIGNED, /* M-Q */
- /* 210 */ ED_UNASSIGNED, /* M-R */
- /* 211 */ ED_UNASSIGNED, /* M-S */
- /* 212 */ ED_UNASSIGNED, /* M-T */
- /* 213 */ ED_UNASSIGNED, /* M-U */
- /* 214 */ ED_UNASSIGNED, /* M-V */
- /* 215 */ ED_UNASSIGNED, /* M-W */
- /* 216 */ ED_UNASSIGNED, /* M-X */
- /* 217 */ ED_UNASSIGNED, /* M-Y */
- /* 218 */ ED_UNASSIGNED, /* M-Z */
- /* 219 */ ED_SEQUENCE_LEAD_IN, /* M-[ */
- /* 220 */ ED_UNASSIGNED, /* M-\ */
- /* 221 */ ED_UNASSIGNED, /* M-] */
- /* 222 */ ED_UNASSIGNED, /* M-^ */
- /* 223 */ ED_UNASSIGNED, /* M-_ */
- /* 224 */ ED_UNASSIGNED, /* M-` */
- /* 225 */ ED_UNASSIGNED, /* M-a */
- /* 226 */ ED_UNASSIGNED, /* M-b */
- /* 227 */ ED_UNASSIGNED, /* M-c */
- /* 228 */ ED_UNASSIGNED, /* M-d */
- /* 229 */ ED_UNASSIGNED, /* M-e */
- /* 230 */ ED_UNASSIGNED, /* M-f */
- /* 231 */ ED_UNASSIGNED, /* M-g */
- /* 232 */ ED_UNASSIGNED, /* M-h */
- /* 233 */ ED_UNASSIGNED, /* M-i */
- /* 234 */ ED_UNASSIGNED, /* M-j */
- /* 235 */ ED_UNASSIGNED, /* M-k */
- /* 236 */ ED_UNASSIGNED, /* M-l */
- /* 237 */ ED_UNASSIGNED, /* M-m */
- /* 238 */ ED_UNASSIGNED, /* M-n */
- /* 239 */ ED_UNASSIGNED, /* M-o */
- /* 240 */ ED_UNASSIGNED, /* M-p */
- /* 241 */ ED_UNASSIGNED, /* M-q */
- /* 242 */ ED_UNASSIGNED, /* M-r */
- /* 243 */ ED_UNASSIGNED, /* M-s */
- /* 244 */ ED_UNASSIGNED, /* M-t */
- /* 245 */ ED_UNASSIGNED, /* M-u */
- /* 246 */ ED_UNASSIGNED, /* M-v */
- /* 247 */ ED_UNASSIGNED, /* M-w */
- /* 248 */ ED_UNASSIGNED, /* M-x */
- /* 249 */ ED_UNASSIGNED, /* M-y */
- /* 250 */ ED_UNASSIGNED, /* M-z */
- /* 251 */ ED_UNASSIGNED, /* M-{ */
- /* 252 */ ED_UNASSIGNED, /* M-| */
- /* 253 */ ED_UNASSIGNED, /* M-} */
- /* 254 */ ED_UNASSIGNED, /* M-~ */
- /* 255 */ ED_UNASSIGNED /* M-^? */
-};
-
-
-/* map_init():
- * Initialize and allocate the maps
- */
-protected int
-map_init(el)
- EditLine *el;
-{
-
- /*
- * Make sure those are correct before starting.
- */
-#ifdef MAP_DEBUG
- if (sizeof(el_map_emacs) != N_KEYS * sizeof(el_action_t))
- abort();
- if (sizeof(el_map_vi_command) != N_KEYS * sizeof(el_action_t))
- abort();
- if (sizeof(el_map_vi_insert) != N_KEYS * sizeof(el_action_t))
- abort();
-#endif
-
- el->el_map.alt = (el_action_t *) el_malloc(sizeof(el_action_t) * N_KEYS);
- el->el_map.key = (el_action_t *) el_malloc(sizeof(el_action_t) * N_KEYS);
- el->el_map.emacs = el_map_emacs;
- el->el_map.vic = el_map_vi_command;
- el->el_map.vii = el_map_vi_insert;
- el->el_map.help = (el_bindings_t *) el_malloc(sizeof(el_bindings_t) *
- EL_NUM_FCNS);
- (void) memcpy(el->el_map.help, help__get(),
- sizeof(el_bindings_t) * EL_NUM_FCNS);
- el->el_map.func = (el_func_t *) el_malloc(sizeof(el_func_t) * EL_NUM_FCNS);
- memcpy(el->el_map.func, func__get(), sizeof(el_func_t) * EL_NUM_FCNS);
- el->el_map.nfunc = EL_NUM_FCNS;
-
-#ifdef VIDEFAULT
- map_init_vi(el);
-#else
- map_init_emacs(el);
-#endif /* VIDEFAULT */
- return 0;
-}
-
-
-/* map_end():
- * Free the space taken by the editor maps
- */
-protected void
-map_end(el)
- EditLine *el;
-{
- el_free((ptr_t) el->el_map.alt);
- el->el_map.alt = NULL;
- el_free((ptr_t) el->el_map.key);
- el->el_map.key = NULL;
- el->el_map.emacs = NULL;
- el->el_map.vic = NULL;
- el->el_map.vii = NULL;
- el_free((ptr_t) el->el_map.help);
- el->el_map.help = NULL;
- el_free((ptr_t) el->el_map.func);
- el->el_map.func = NULL;
-}
-
-
-/* map_init_nls():
- * Find all the printable keys and bind them to self insert
- */
-private void
-map_init_nls(el)
- EditLine *el;
-{
- int i;
- el_action_t *map = el->el_map.key;
-
- for (i = 0200; i <= 0377; i++)
- if (isprint(i))
- map[i] = ED_INSERT;
-}
-
-
-/* map_init_meta():
- * Bind all the meta keys to the appropriate ESC-<key> sequence
- */
-private void
-map_init_meta(el)
- EditLine *el;
-{
- char buf[3];
- register int i;
- el_action_t *map = el->el_map.key;
- el_action_t *alt = el->el_map.alt;
-
- for (i = 0; i <= 0377 && map[i] != EM_META_NEXT; i++)
- continue;
-
- if (i > 0377) {
- for (i = 0; i <= 0377 && alt[i] != EM_META_NEXT; i++)
- continue;
- if (i > 0377) {
- i = 033;
- if (el->el_map.type == MAP_VI)
- map = alt;
- }
- else
- map = alt;
- }
- buf[0] = (char) i;
- buf[2] = 0;
- for (i = 0200; i <= 0377; i++)
- switch (map[i]) {
- case ED_INSERT:
- case ED_UNASSIGNED:
- case ED_SEQUENCE_LEAD_IN:
- break;
- default:
- buf[1] = i & 0177;
- key_add(el, buf, key_map_cmd(el, (int) map[i]), XK_CMD);
- break;
- }
- map[buf[0]] = ED_SEQUENCE_LEAD_IN;
-}
-
-
-/* map_init_vi():
- * Initialize the vi bindings
- */
-protected void
-map_init_vi(el)
- EditLine *el;
-{
- register int i;
- el_action_t *key = el->el_map.key;
- el_action_t *alt = el->el_map.alt;
- el_action_t *vii = el->el_map.vii;
- el_action_t *vic = el->el_map.vic;
-
- el->el_map.type = MAP_VI;
- el->el_map.current = el->el_map.key;
-
- key_reset(el);
-
- for (i = 0; i < N_KEYS; i++) {
- key[i] = vii[i];
- alt[i] = vic[i];
- }
-
- map_init_meta(el);
-#ifdef notyet
- if (0 /* XXX: USER has set LC_CTYPE */)
- map_init_nls(el);
-#endif
-
- tty_bind_char(el, 1);
- term_bind_arrow(el);
-}
-
-
-/* map_init_emacs():
- * Initialize the emacs bindings
- */
-protected void
-map_init_emacs(el)
- EditLine *el;
-{
- int i;
- char buf[3];
- el_action_t *key = el->el_map.key;
- el_action_t *alt = el->el_map.alt;
- el_action_t *emacs = el->el_map.emacs;
-
- el->el_map.type = MAP_EMACS;
- el->el_map.current = el->el_map.key;
- key_reset(el);
-
- for (i = 0; i < N_KEYS; i++) {
- key[i] = emacs[i];
- alt[i] = ED_UNASSIGNED;
- }
-
- map_init_meta(el);
-#ifdef notyet
- if (0 /* XXX: USER has set LC_CTYPE */)
- map_init_nls(el);
-#endif
- map_init_nls(el);
-
- buf[0] = CONTROL('X');
- buf[1] = CONTROL('X');
- buf[2] = 0;
- key_add(el, buf, key_map_cmd(el, EM_EXCHANGE_MARK), XK_CMD);
-
- tty_bind_char(el, 1);
- term_bind_arrow(el);
-}
-
-
-/* map_set_editor():
- * Set the editor
- */
-protected int
-map_set_editor(el, editor)
- EditLine *el;
- char *editor;
-{
- if (strcmp(editor, "emacs") == 0) {
- map_init_emacs(el);
- return 0;
- }
- if (strcmp(editor, "vi") == 0) {
- map_init_vi(el);
- return 0;
- }
- return -1;
-}
-
-
-/* map_print_key():
- * Print the function description for 1 key
- */
-private void
-map_print_key(el, map, in)
- EditLine *el;
- el_action_t *map;
- char *in;
-{
- char outbuf[EL_BUFSIZ];
- el_bindings_t *bp;
-
- if (in[0] == '\0' || in[1] == '\0') {
- (void) key__decode_str(in, outbuf, "");
- for (bp = el->el_map.help; bp->name != NULL; bp++)
- if (bp->func == map[(unsigned char) *in]) {
- (void) fprintf(el->el_outfile,
- "%s\t->\t%s\n", outbuf, bp->name);
- return;
- }
- }
- else
- key_print(el, in);
-}
-
-
-/* map_print_some_keys():
- * Print keys from first to last
- */
-private void
-map_print_some_keys(el, map, first, last)
- EditLine *el;
- el_action_t *map;
- int first, last;
-{
- el_bindings_t *bp;
- char firstbuf[2], lastbuf[2];
- char unparsbuf[EL_BUFSIZ], extrabuf[EL_BUFSIZ];
-
- firstbuf[0] = first;
- firstbuf[1] = 0;
- lastbuf[0] = last;
- lastbuf[1] = 0;
- if (map[first] == ED_UNASSIGNED) {
- if (first == last)
- (void) fprintf(el->el_outfile, "%-15s-> is undefined\n",
- key__decode_str(firstbuf, unparsbuf, STRQQ));
- return;
- }
-
- for (bp = el->el_map.help; bp->name != NULL; bp++) {
- if (bp->func == map[first]) {
- if (first == last) {
- (void) fprintf(el->el_outfile, "%-15s-> %s\n",
- key__decode_str(firstbuf, unparsbuf, STRQQ),
- bp->name);
- }
- else {
- (void) fprintf(el->el_outfile, "%-4s to %-7s-> %s\n",
- key__decode_str(firstbuf, unparsbuf, STRQQ),
- key__decode_str(lastbuf, extrabuf, STRQQ),
- bp->name);
- }
- return;
- }
- }
-#ifdef MAP_DEBUG
- if (map == el->el_map.key) {
- (void) fprintf(el->el_outfile, "BUG!!! %s isn't bound to anything.\n",
- key__decode_str(firstbuf, unparsbuf, STRQQ));
- (void) fprintf(el->el_outfile, "el->el_map.key[%d] == %d\n",
- first, el->el_map.key[first]);
- }
- else {
- (void) fprintf(el->el_outfile, "BUG!!! %s isn't bound to anything.\n",
- key__decode_str(firstbuf, unparsbuf, STRQQ));
- (void) fprintf(el->el_outfile, "el->el_map.alt[%d] == %d\n",
- first, el->el_map.alt[first]);
- }
-#endif
- abort();
-}
-
-
-/* map_print_all_keys():
- * Print the function description for all keys.
- */
-private void
-map_print_all_keys(el)
- EditLine *el;
-{
- int prev, i;
-
- (void) fprintf(el->el_outfile, "Standard key bindings\n");
- prev = 0;
- for (i = 0; i < N_KEYS; i++) {
- if (el->el_map.key[prev] == el->el_map.key[i])
- continue;
- map_print_some_keys(el, el->el_map.key, prev, i - 1);
- prev = i;
- }
- map_print_some_keys(el, el->el_map.key, prev, i - 1);
-
- (void) fprintf(el->el_outfile, "Alternative key bindings\n");
- prev = 0;
- for (i = 0; i < N_KEYS; i++) {
- if (el->el_map.alt[prev] == el->el_map.alt[i])
- continue;
- map_print_some_keys(el, el->el_map.alt, prev, i - 1);
- prev = i;
- }
- map_print_some_keys(el, el->el_map.alt, prev, i - 1);
-
- (void) fprintf(el->el_outfile, "Multi-character bindings\n");
- key_print(el, "");
- (void) fprintf(el->el_outfile, "Arrow key bindings\n");
- term_print_arrow(el, "");
-}
-
-
-/* map_bind():
- * Add/remove/change bindings
- */
-protected int
-map_bind(el, argc, argv)
- EditLine *el;
- int argc;
- char **argv;
-{
- el_action_t *map;
- int ntype, remove;
- char *p;
- char inbuf[EL_BUFSIZ];
- char outbuf[EL_BUFSIZ];
- char *in = NULL;
- char *out = NULL;
- el_bindings_t *bp;
- int cmd;
- int key;
-
- if (argv == NULL)
- return -1;
-
- map = el->el_map.key;
- ntype = XK_CMD;
- key = remove = 0;
- for (argc = 1; (p = argv[argc]) != NULL; argc++)
- if (p[0] == '-')
- switch (p[1]) {
- case 'a':
- map = el->el_map.alt;
- break;
-
- case 's':
- ntype = XK_STR;
- break;
-#ifdef notyet
- case 'c':
- ntype = XK_EXE;
- break;
-#endif
- case 'k':
- key = 1;
- break;
-
- case 'r':
- remove = 1;
- break;
-
- case 'v':
- map_init_vi(el);
- return 0;
-
- case 'e':
- map_init_emacs(el);
- return 0;
-
- case 'l':
- for (bp = el->el_map.help; bp->name != NULL; bp++)
- (void) fprintf(el->el_outfile, "%s\n\t%s\n",
- bp->name, bp->description);
- return 0;
- default:
- (void) fprintf(el->el_errfile, "%s: Invalid switch `%c'.\n",
- argv[0], p[1]);
- }
- else
- break;
-
- if (argv[argc] == NULL) {
- map_print_all_keys(el);
- return 0;
- }
-
- if (key)
- in = argv[argc++];
- else
- if ((in = parse__string(inbuf, argv[argc++])) == NULL) {
- (void) fprintf(el->el_errfile, "%s: Invalid \\ or ^ in instring.\n",
- argv[0]);
- return -1;
- }
-
- if (remove) {
- if (key) {
- (void) term_clear_arrow(el, in);
- return -1;
- }
- if (in[1])
- (void) key_delete(el, in);
- else if (map[(unsigned char) *in] == ED_SEQUENCE_LEAD_IN)
- (void) key_delete(el, in);
- else
- map[(unsigned char) *in] = ED_UNASSIGNED;
- return 0;
- }
-
- if (argv[argc] == NULL) {
- if (key)
- term_print_arrow(el, in);
- else
- map_print_key(el, map, in);
- return 0;
- }
-
-#ifdef notyet
- if (argv[argc + 1] != NULL) {
- bindkey_usage();
- return -1;
- }
-#endif
-
- switch (ntype) {
- case XK_STR:
- case XK_EXE:
- if ((out = parse__string(outbuf, argv[argc])) == NULL) {
- (void) fprintf(el->el_errfile,
- "%s: Invalid \\ or ^ in outstring.\n", argv[0]);
- return -1;
- }
- if (key)
- term_set_arrow(el, in, key_map_str(el, out), ntype);
- else
- key_add(el, in, key_map_str(el, out), ntype);
- map[(unsigned char) *in] = ED_SEQUENCE_LEAD_IN;
- break;
-
- case XK_CMD:
- if ((cmd = parse_cmd(el, argv[argc])) == -1) {
- (void) fprintf(el->el_errfile,
- "%s: Invalid command `%s'.\n", argv[0], argv[argc]);
- return -1;
- }
- if (key)
- term_set_arrow(el, in, key_map_str(el, out), ntype);
- else {
- if (in[1]) {
- key_add(el, in, key_map_cmd(el, cmd), ntype);
- map[(unsigned char) *in] = ED_SEQUENCE_LEAD_IN;
- }
- else {
- key_clear(el, map, in);
- map[(unsigned char) *in] = cmd;
- }
- }
- break;
-
- default:
- abort();
- break;
- }
- return 0;
-}
-
-
-/* map_addfunc():
- * add a user defined function
- */
-protected int
-map_addfunc(el, name, help, func)
- EditLine *el;
- const char *name;
- const char *help;
- el_func_t func;
-{
- int nf = el->el_map.nfunc + 2;
- if (name == NULL || help == NULL || func == NULL)
- return -1;
-
- el->el_map.func = (el_func_t *)
- el_realloc(el->el_map.func, nf * sizeof(el_func_t));
- el->el_map.help = (el_bindings_t *)
- el_realloc(el->el_map.help, nf * sizeof(el_bindings_t));
-
- nf = el->el_map.nfunc;
- el->el_map.func[nf] = func;
-
- el->el_map.help[nf].name = name;
- el->el_map.help[nf].func = nf;
- el->el_map.help[nf].description = help;
- el->el_map.help[++nf].name = NULL;
- el->el_map.nfunc++;
-
- return 0;
-}
diff --git a/lib/libedit/map.h b/lib/libedit/map.h
deleted file mode 100644
index c0f16f1..0000000
--- a/lib/libedit/map.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)map.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.map.h: Editor maps
- */
-#ifndef _h_el_map
-#define _h_el_map
-
-typedef struct el_bindings_t { /* for the "bind" shell command */
- const char *name; /* function name for bind command */
- int func; /* function numeric value */
- const char *description; /* description of function */
-} el_bindings_t;
-
-
-typedef struct el_map_t {
- el_action_t *alt; /* The current alternate key map */
- el_action_t *key; /* The current normal key map */
- el_action_t *current; /* The keymap we are using */
- el_action_t *emacs; /* The default emacs key map */
- el_action_t *vic; /* The vi command mode key map */
- el_action_t *vii; /* The vi insert mode key map */
- int type; /* Emacs or vi */
- el_bindings_t *help; /* The help for the editor functions */
- el_func_t *func; /* List of available functions */
- int nfunc; /* The number of functions/help items */
-} el_map_t;
-
-#define MAP_EMACS 0
-#define MAP_VI 1
-
-protected int map_bind __P((EditLine *, int, char **));
-protected int map_init __P((EditLine *));
-protected void map_end __P((EditLine *));
-protected void map_init_vi __P((EditLine *));
-protected void map_init_emacs __P((EditLine *));
-protected int map_set_editor __P((EditLine *, char *));
-protected int map_addfunc __P((EditLine *, const char *,
- const char *, el_func_t));
-
-#endif /* _h_el_map */
diff --git a/lib/libedit/parse.c b/lib/libedit/parse.c
deleted file mode 100644
index dd5bd94..0000000
--- a/lib/libedit/parse.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * parse.c: parse an editline extended command
- *
- * commands are:
- *
- * bind
- * echotc
- * settc
- * gettc
- * history
- * settc
- * setty
- */
-#include "sys.h"
-#include "el.h"
-#include "tokenizer.h"
-
-private struct {
- char *name;
- int (*func) __P((EditLine *, int, char **));
-} cmds[] = {
- { "bind", map_bind },
- { "echotc", term_echotc },
- { "history", hist_list },
- { "telltc", term_telltc },
- { "settc", term_settc },
- { "setty", tty_stty },
- { NULL, NULL }
-};
-
-
-/* parse_line():
- * Parse a line and dispatch it
- */
-protected int
-parse_line(el, line)
- EditLine *el;
- const char *line;
-{
- char **argv;
- int argc;
- Tokenizer *tok;
-
- tok = tok_init(NULL);
- tok_line(tok, line, &argc, &argv);
- argc = el_parse(el, argc, argv);
- tok_end(tok);
- return argc;
-}
-
-/* el_parse():
- * Command dispatcher
- */
-public int
-el_parse(el, argc, argv)
- EditLine *el;
- int argc;
- char *argv[];
-{
- char *ptr;
- int i;
-
- if (argc < 1)
- return -1;
- ptr = strchr(argv[0], ':');
- if (ptr != NULL) {
- *ptr++ = '\0';
- if (! el_match(el->el_prog, argv[0]))
- return 0;
- }
- else
- ptr = argv[0];
-
- for (i = 0; cmds[i].name != NULL; i++)
- if (strcmp(cmds[i].name, ptr) == 0) {
- i = (*cmds[i].func)(el, argc, argv);
- return -i;
- }
-
- return -1;
-}
-
-
-/* parse__escape():
- * Parse a string of the form ^<char> \<odigit> \<char> and return
- * the appropriate character or -1 if the escape is not valid
- */
-protected int
-parse__escape(ptr)
- const char ** const ptr;
-{
- const char *p;
- int c;
-
- p = *ptr;
-
- if (p[1] == 0)
- return -1;
-
- if (*p == '\\') {
- p++;
- switch (*p) {
- case 'a':
- c = '\007'; /* Bell */
- break;
- case 'b':
- c = '\010'; /* Backspace */
- break;
- case 't':
- c = '\011'; /* Horizontal Tab */
- break;
- case 'n':
- c = '\012'; /* New Line */
- break;
- case 'v':
- c = '\013'; /* Vertical Tab */
- break;
- case 'f':
- c = '\014'; /* Form Feed */
- break;
- case 'r':
- c = '\015'; /* Carriage Return */
- break;
- case 'e':
- c = '\033'; /* Escape */
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- {
- int cnt, ch;
-
- for (cnt = 0, c = 0; cnt < 3; cnt++) {
- ch = *p++;
- if (ch < '0' || ch > '7') {
- p--;
- break;
- }
- c = (c << 3) | (ch - '0');
- }
- if ((c & 0xffffff00) != 0)
- return -1;
- --p;
- }
- break;
- default:
- c = *p;
- break;
- }
- }
- else if (*p == '^' && isascii(p[1]) && (p[1] == '?' || isalpha(p[1]))) {
- p++;
- c = (*p == '?') ? '\177' : (*p & 0237);
- }
- else
- c = *p;
- *ptr = ++p;
- return (unsigned char)c;
-}
-
-/* parse__string():
- * Parse the escapes from in and put the raw string out
- */
-protected char *
-parse__string(out, in)
- char *out;
- const char *in;
-{
- char *rv = out;
- int n;
- for (;;)
- switch (*in) {
- case '\0':
- *out = '\0';
- return rv;
-
- case '\\':
- case '^':
- if ((n = parse__escape(&in)) == -1)
- return NULL;
- *out++ = n;
- break;
-
- default:
- *out++ = *in++;
- break;
- }
-}
-
-/* parse_cmd():
- * Return the command number for the command string given
- * or -1 if one is not found
- */
-protected int
-parse_cmd(el, cmd)
- EditLine *el;
- const char *cmd;
-{
- el_bindings_t *b;
-
- for (b = el->el_map.help; b->name != NULL; b++)
- if (strcmp(b->name, cmd) == 0)
- return b->func;
- return -1;
-}
diff --git a/lib/libedit/parse.h b/lib/libedit/parse.h
deleted file mode 100644
index 0601746..0000000
--- a/lib/libedit/parse.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)parse.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.parse.h: Parser functions
- */
-#ifndef _h_el_parse
-#define _h_el_parse
-
-protected int parse_line __P((EditLine *, const char *));
-protected int parse__escape __P((const char ** const));
-protected char * parse__string __P((char *, const char *));
-protected int parse_cmd __P((EditLine *, const char *));
-
-#endif /* _h_el_parse */
diff --git a/lib/libedit/prompt.c b/lib/libedit/prompt.c
deleted file mode 100644
index 59ba200..0000000
--- a/lib/libedit/prompt.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)prompt.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * prompt.c: Prompt printing functions
- */
-#include "sys.h"
-#include <stdio.h>
-#include "el.h"
-
-private char *prompt_default __P((EditLine *));
-
-/* prompt_default():
- * Just a default prompt, in case the user did not provide one
- */
-private char *
-/*ARGSUSED*/
-prompt_default(el)
- EditLine *el;
-{
- static char a[3] = { '?', ' ', '\0' };
- return a;
-}
-
-
-/* prompt_print():
- * Print the prompt and update the prompt position.
- * We use an array of integers in case we want to pass
- * literal escape sequences in the prompt and we want a
- * bit to flag them
- */
-protected void
-prompt_print(el)
- EditLine *el;
-{
- char *p = (*el->el_prompt.p_func)(el);
- while (*p)
- re_putc(el, *p++);
-
- el->el_prompt.p_pos.v = el->el_refresh.r_cursor.v;
- el->el_prompt.p_pos.h = el->el_refresh.r_cursor.h;
-
-} /* end prompt_print */
-
-
-/* prompt_init():
- * Initialize the prompt stuff
- */
-protected int
-prompt_init(el)
- EditLine *el;
-{
- el->el_prompt.p_func = prompt_default;
- el->el_prompt.p_pos.v = 0;
- el->el_prompt.p_pos.h = 0;
- return 0;
-} /* end prompt_init */
-
-
-/* prompt_end():
- * Clean up the prompt stuff
- */
-protected void
-/*ARGSUSED*/
-prompt_end(el)
- EditLine *el;
-{
-} /* end prompt_end */
-
-
-/* prompt_set():
- * Install a prompt printing function
- */
-protected int
-prompt_set(el, prf)
- EditLine *el;
- el_pfunc_t prf;
-{
- if (prf == NULL)
- el->el_prompt.p_func = prompt_default;
- else
- el->el_prompt.p_func = prf;
- el->el_prompt.p_pos.v = 0;
- el->el_prompt.p_pos.h = 0;
- return 0;
-} /* end prompt_set */
diff --git a/lib/libedit/prompt.h b/lib/libedit/prompt.h
deleted file mode 100644
index a624fc0..0000000
--- a/lib/libedit/prompt.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)prompt.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.prompt.h: Prompt printing stuff
- */
-#ifndef _h_el_prompt
-#define _h_el_prompt
-
-#include "histedit.h"
-
-typedef char * (*el_pfunc_t) __P((EditLine*));
-
-typedef struct el_prompt_t {
- el_pfunc_t p_func; /* Function to return the prompt */
- coord_t p_pos; /* position in the line after prompt */
-} el_prompt_t;
-
-protected void prompt_print __P((EditLine *));
-protected int prompt_set __P((EditLine *, el_pfunc_t));
-protected int prompt_init __P((EditLine *));
-protected void prompt_end __P((EditLine *));
-
-#endif /* _h_el_prompt */
diff --git a/lib/libedit/read.c b/lib/libedit/read.c
deleted file mode 100644
index 6475a25..0000000
--- a/lib/libedit/read.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/4/93";
-
-#endif /* not lint && not SCCSID */
-/*
- * read.c: Clean this junk up! This is horrible code.
- * Terminal read functions
- */
-#include "sys.h"
-#include <sys/errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-extern int errno;
-#include "el.h"
-
-#define OKCMD -1
-
-private int read__fixio __P((int, int));
-private int read_preread __P((EditLine *));
-private int read_getcmd __P((EditLine *, el_action_t *, char *));
-
-#ifdef DEBUG_EDIT
-private void
-read_debug(el)
- EditLine *el;
-{
-
- if (el->el_line.cursor > el->el_line.lastchar)
- (void) fprintf(el->el_errfile, "cursor > lastchar\r\n");
- if (el->el_line.cursor < el->el_line.buffer)
- (void) fprintf(el->el_errfile, "cursor < buffer\r\n");
- if (el->el_line.cursor > el->el_line.limit)
- (void) fprintf(el->el_errfile, "cursor > limit\r\n");
- if (el->el_line.lastchar > el->el_line.limit)
- (void) fprintf(el->el_errfile, "lastchar > limit\r\n");
- if (el->el_line.limit != &el->el_line.buffer[EL_BUFSIZ - 2])
- (void) fprintf(el->el_errfile, "limit != &buffer[EL_BUFSIZ-2]\r\n");
-}
-#endif /* DEBUG_EDIT */
-
-/* read__fixio():
- * Try to recover from a read error
- */
-private int
-read__fixio(fd, e)
- int fd, e;
-{
- switch (e) {
- case -1: /* Make sure that the code is reachable */
-
-#ifdef EWOULDBLOCK
- case EWOULDBLOCK:
-# ifndef TRY_AGAIN
-# define TRY_AGAIN
-# endif
-#endif /* EWOULDBLOCK */
-
-#if defined(POSIX) && defined(EAGAIN)
-# if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
- case EAGAIN:
-# ifndef TRY_AGAIN
-# define TRY_AGAIN
-# endif
-# endif /* EWOULDBLOCK && EWOULDBLOCK != EAGAIN */
-#endif /* POSIX && EAGAIN */
-
- e = 0;
-#ifdef TRY_AGAIN
-# if defined(F_SETFL) && defined(O_NDELAY)
- if ((e = fcntl(fd, F_GETFL, 0)) == -1)
- return -1;
-
- if (fcntl(fd, F_SETFL, e & ~O_NDELAY) == -1)
- return -1;
- else
- e = 1;
-# endif /* F_SETFL && O_NDELAY */
-
-# ifdef FIONBIO
- if (ioctl(fd, FIONBIO, (ioctl_t) &e) == -1)
- return -1;
- else
- e = 1;
-# endif /* FIONBIO */
-
-#endif /* TRY_AGAIN */
- return e ? 0 : -1;
-
- case EINTR:
- return 0;
-
- default:
- return -1;
- }
-}
-
-
-/* read_preread():
- * Try to read the stuff in the input queue;
- */
-private int
-read_preread(el)
- EditLine *el;
-{
- int chrs = 0;
-
- if (el->el_chared.c_macro.nline) {
- el_free((ptr_t) el->el_chared.c_macro.nline);
- el->el_chared.c_macro.nline = NULL;
- }
-
- if (el->el_tty.t_mode == ED_IO)
- return 0;
-
-#ifdef FIONREAD
- (void) ioctl(el->el_infd, FIONREAD, (ioctl_t) &chrs);
- if (chrs > 0) {
- char buf[EL_BUFSIZ];
-
- chrs = read(el->el_infd, buf, (size_t) MIN(chrs, EL_BUFSIZ - 1));
- if (chrs > 0) {
- buf[chrs] = '\0';
- el->el_chared.c_macro.nline = strdup(buf);
- el_push(el->el_chared.c_macro.nline);
- }
- }
-#endif /* FIONREAD */
-
- return chrs > 0;
-}
-
-
-/* el_push():
- * Push a macro
- */
-public void
-el_push(el, str)
- EditLine *el;
- const char *str;
-{
- c_macro_t *ma = &el->el_chared.c_macro;
-
- if (str != NULL && ma->level + 1 < EL_MAXMACRO) {
- ma->level++;
- ma->macro[ma->level] = (char *) str;
- }
- else {
- term_beep(el);
- term__flush();
- }
-}
-
-
-/* read_getcmd():
- * Return next command from the input stream.
- */
-private int
-read_getcmd(el, cmdnum, ch)
- EditLine *el;
- el_action_t *cmdnum;
- char *ch;
-{
- el_action_t cmd = 0;
- int num;
-
- while (cmd == 0 || cmd == ED_SEQUENCE_LEAD_IN) {
- if ((num = el_getc(el, ch)) != 1) /* if EOF or error */
- return num;
-
-#ifdef KANJI
- if ((*ch & 0200)) {
- el->el_state.metanext = 0;
- cmd = CcViMap[' '];
- break;
- }
- else
-#endif /* KANJI */
-
- if (el->el_state.metanext) {
- el->el_state.metanext = 0;
- *ch |= 0200;
- }
- cmd = el->el_map.current[(unsigned char) *ch];
- if (cmd == ED_SEQUENCE_LEAD_IN) {
- key_value_t val;
- switch (key_get(el, ch, &val)) {
- case XK_CMD:
- cmd = val.cmd;
- break;
- case XK_STR:
- el_push(el, val.str);
- break;
-#ifdef notyet
- case XK_EXE:
- /* XXX: In the future to run a user function */
- RunCommand(val.str);
- break;
-#endif
- default:
- abort();
- break;
- }
- }
- if (el->el_map.alt == NULL)
- el->el_map.current = el->el_map.key;
- }
- *cmdnum = cmd;
- return OKCMD;
-}
-
-
-/* el_getc():
- * Read a character
- */
-public int
-el_getc(el, cp)
- EditLine *el;
- char *cp;
-{
- int num_read;
- unsigned char tcp;
- int tried = 0;
-
- c_macro_t *ma = &el->el_chared.c_macro;
-
- term__flush();
- for (;;) {
- if (ma->level < 0) {
- if (!read_preread(el))
- break;
- }
- if (ma->level < 0)
- break;
-
- if (*ma->macro[ma->level] == 0) {
- ma->level--;
- continue;
- }
- *cp = *ma->macro[ma->level]++ & 0377;
- if (*ma->macro[ma->level] == 0) { /* Needed for QuoteMode On */
- ma->level--;
- }
- return 1;
- }
-
-#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "Turning raw mode on\n");
-#endif /* DEBUG_READ */
- if (tty_rawmode(el) < 0) /* make sure the tty is set up correctly */
- return 0;
-
-#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "Reading a character\n");
-#endif /* DEBUG_READ */
- while ((num_read = read(el->el_infd, (char *) &tcp, 1)) == -1)
- if (!tried && read__fixio(el->el_infd, errno) == 0)
- tried = 1;
- else {
- *cp = '\0';
- return -1;
- }
-#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "Got it %c\n", tcp);
-#endif /* DEBUG_READ */
- *cp = tcp;
- return num_read;
-}
-
-
-
-public const char *
-el_gets(el, nread)
- EditLine *el;
- int *nread;
-{
- int retval;
- el_action_t cmdnum = 0;
- int num; /* how many chars we have read at NL */
- char ch;
-
- if (el->el_flags & HANDLE_SIGNALS)
- sig_set(el);
-
- re_clear_display(el); /* reset the display stuff */
- ch_reset(el);
-
-#ifdef FIONREAD
- if (el->el_tty.t_mode == EX_IO && ma->level < 0) {
- long chrs = 0;
-
- (void) ioctl(el->el_infd, FIONREAD, (ioctl_t) &chrs);
- if (chrs == 0) {
- if (tty_rawmode(el) < 0) {
- if (nread)
- *nread = 0;
- return NULL;
- }
- }
- }
-#endif /* FIONREAD */
-
- re_refresh(el); /* print the prompt */
-
- for (num = OKCMD; num == OKCMD;) { /* while still editing this line */
-#ifdef DEBUG_EDIT
- read_debug(el);
-#endif /* DEBUG_EDIT */
- /* if EOF or error */
- if ((num = read_getcmd(el, &cmdnum, &ch)) != OKCMD) {
-#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "Returning from el_gets %d\n", num);
-#endif /* DEBUG_READ */
- break;
- }
-
- if (cmdnum >= el->el_map.nfunc) { /* BUG CHECK command */
-#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile,
- "ERROR: illegal command from key 0%o\r\n", ch);
-#endif /* DEBUG_EDIT */
- continue; /* try again */
- }
-
- /* now do the real command */
-#ifdef DEBUG_READ
- {
- el_bindings_t *b;
- for (b = el->el_map.help; b->name; b++)
- if (b->func == cmdnum)
- break;
- if (b->name)
- (void) fprintf(el->el_errfile, "Executing %s\n", b->name);
- else
- (void) fprintf(el->el_errfile, "Error command = %d\n", cmdnum);
- }
-#endif /* DEBUG_READ */
- retval = (*el->el_map.func[cmdnum])(el, ch);
-
- /* save the last command here */
- el->el_state.lastcmd = cmdnum;
-
- /* use any return value */
- switch (retval) {
- case CC_CURSOR:
- el->el_state.argument = 1;
- el->el_state.doingarg = 0;
- re_refresh_cursor(el);
- break;
-
- case CC_REDISPLAY:
- re_clear_lines(el);
- re_clear_display(el);
- /* FALLTHROUGH */
-
- case CC_REFRESH:
- el->el_state.argument = 1;
- el->el_state.doingarg = 0;
- re_refresh(el);
- break;
-
- case CC_NORM: /* normal char */
- el->el_state.argument = 1;
- el->el_state.doingarg = 0;
- break;
-
- case CC_ARGHACK: /* Suggested by Rich Salz */
- /* <rsalz@pineapple.bbn.com> */
- break; /* keep going... */
-
- case CC_EOF: /* end of file typed */
- num = 0;
- break;
-
- case CC_NEWLINE: /* normal end of line */
- num = el->el_line.lastchar - el->el_line.buffer;
- break;
-
- case CC_FATAL: /* fatal error, reset to known state */
-#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "*** editor fatal ERROR ***\r\n\n");
-#endif /* DEBUG_READ */
- /* put (real) cursor in a known place */
- re_clear_display(el); /* reset the display stuff */
- ch_reset(el); /* reset the input pointers */
- re_refresh(el); /* print the prompt again */
- el->el_state.argument = 1;
- el->el_state.doingarg = 0;
- break;
-
- case CC_ERROR:
- default: /* functions we don't know about */
-#ifdef DEBUG_READ
- (void) fprintf(el->el_errfile, "*** editor ERROR ***\r\n\n");
-#endif /* DEBUG_READ */
- el->el_state.argument = 1;
- el->el_state.doingarg = 0;
- term_beep(el);
- term__flush();
- break;
- }
- }
-
- (void) tty_cookedmode(el); /* make sure the tty is set up correctly */
- term__flush(); /* flush any buffered output */
- if (el->el_flags & HANDLE_SIGNALS)
- sig_clr(el);
- if (nread)
- *nread = num;
- return num ? el->el_line.buffer : NULL;
-}
diff --git a/lib/libedit/refresh.c b/lib/libedit/refresh.c
deleted file mode 100644
index 6c3ee93..0000000
--- a/lib/libedit/refresh.c
+++ /dev/null
@@ -1,1015 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * refresh.c: Lower level screen refreshing functions
- */
-#include "sys.h"
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "el.h"
-
-private void re_addc __P((EditLine *, int));
-private void re_update_line __P((EditLine *, char *, char *, int));
-private void re_insert __P((EditLine *, char *, int, int,
- char *, int));
-private void re_delete __P((EditLine *, char *, int, int,
- int));
-private void re_fastputc __P((EditLine *, int));
-
-private void re__strncopy __P((char *, char *, size_t));
-private void re__copy_and_pad __P((char *, char *, size_t));
-
-#ifdef DEBUG_REFRESH
-private void re_printstr __P((EditLine *, char *, char *,
- char *));
-# define __F el->el_errfile
-# define RE_DEBUG(a, b, c) do \
- if (a) { \
- (void) fprintf b; \
- c; \
- } \
- while (0)
-/* re_printstr():
- * Print a string on the debugging pty
- */
-private void
-re_printstr(el, str, f, t)
- EditLine *el;
- char *str;
- char *f, *t;
-{
- RE_DEBUG(1,(__F, "%s:\"", str),);
- while (f < t)
- RE_DEBUG(1,(__F, "%c", *f++ & 0177),);
- RE_DEBUG(1,(__F, "\"\r\n"),);
-}
-#else
-# define RE_DEBUG(a, b, c)
-#endif
-
-
-/* re_addc():
- * Draw c, expanding tabs, control chars etc.
- */
-private void
-re_addc(el, c)
- EditLine *el;
- int c;
-{
- c = (unsigned char)c;
-
- if (isprint(c)) {
- re_putc(el, c);
- return;
- }
- if (c == '\n') { /* expand the newline */
- re_putc(el, '\0'); /* assure end of line */
- el->el_refresh.r_cursor.h = 0; /* reset cursor pos */
- el->el_refresh.r_cursor.v++;
- return;
- }
- if (c == '\t') { /* expand the tab */
- for (;;) {
- re_putc(el, ' ');
- if ((el->el_refresh.r_cursor.h & 07) == 0)
- break; /* go until tab stop */
- }
- }
- else if (iscntrl(c)) {
- re_putc(el, '^');
- if (c == 0177)
- re_putc(el, '?');
- else
- /* uncontrolify it; works only for iso8859-1 like sets */
- re_putc(el, (toascii(c) | 0100));
- }
- else {
- re_putc(el, '\\');
- re_putc(el, ((c >> 6) & 07) + '0');
- re_putc(el, ((c >> 3) & 07) + '0');
- re_putc(el, (c & 07) + '0');
- }
-} /* end re_addc */
-
-
-/* re_putc():
- * Draw the character given
- */
-protected void
-re_putc(el, c)
- EditLine *el;
- int c;
-{
- RE_DEBUG(1,(__F, "printing %3.3o '%c'\r\n", c, c),);
-
- el->el_vdisplay[el->el_refresh.r_cursor.v][el->el_refresh.r_cursor.h] = c;
- el->el_refresh.r_cursor.h++; /* advance to next place */
- if (el->el_refresh.r_cursor.h >= el->el_term.t_size.h) {
- el->el_vdisplay[el->el_refresh.r_cursor.v][el->el_term.t_size.h] = '\0';
- /* assure end of line */
- el->el_refresh.r_cursor.h = 0; /* reset it. */
- el->el_refresh.r_cursor.v++;
- RE_DEBUG(el->el_refresh.r_cursor.v >= el->el_term.t_size.v,
- (__F, "\r\nre_putc: overflow! r_cursor.v == %d > %d\r\n",
- el->el_refresh.r_cursor.v, el->el_term.t_size.v), abort());
- }
-} /* end re_putc */
-
-
-/* re_refresh():
- * draws the new virtual screen image from the current input
- * line, then goes line-by-line changing the real image to the new
- * virtual image. The routine to re-draw a line can be replaced
- * easily in hopes of a smarter one being placed there.
- */
-protected void
-re_refresh(el)
- EditLine *el;
-{
- int i;
- char *cp;
- coord_t cur;
-
- RE_DEBUG(1,(__F, "el->el_line.buffer = :%s:\r\n", el->el_line.buffer),);
-
- /* reset the Drawing cursor */
- el->el_refresh.r_cursor.h = 0;
- el->el_refresh.r_cursor.v = 0;
-
- cur.h = -1; /* set flag in case I'm not set */
- cur.v = 0;
-
- prompt_print(el);
-
- /* draw the current input buffer */
- for (cp = el->el_line.buffer; cp < el->el_line.lastchar; cp++) {
- if (cp == el->el_line.cursor) {
- cur.h = el->el_refresh.r_cursor.h; /* save for later */
- cur.v = el->el_refresh.r_cursor.v;
- }
- re_addc(el, *cp);
- }
-
- if (cur.h == -1) { /* if I haven't been set yet, I'm at the end */
- cur.h = el->el_refresh.r_cursor.h;
- cur.v = el->el_refresh.r_cursor.v;
- }
- /* must be done BEFORE the NUL is written */
- el->el_refresh.r_newcv = el->el_refresh.r_cursor.v;
- re_putc(el, '\0'); /* put NUL on end */
-
- RE_DEBUG(1,(__F,
- "term.h=%d vcur.h=%d vcur.v=%d vdisplay[0]=\r\n:%80.80s:\r\n",
- el->el_term.t_size.h, el->el_refresh.r_cursor.h,
- el->el_refresh.r_cursor.v, el->el_vdisplay[0]),);
-
- RE_DEBUG(1,(__F, "updating %d lines.\r\n", el->el_refresh.r_newcv),);
- for (i = 0; i <= el->el_refresh.r_newcv; i++) {
- /* NOTE THAT re_update_line MAY CHANGE el_display[i] */
- re_update_line(el, el->el_display[i], el->el_vdisplay[i], i);
-
- /*
- * Copy the new line to be the current one, and pad out with spaces
- * to the full width of the terminal so that if we try moving the
- * cursor by writing the character that is at the end of the
- * screen line, it won't be a NUL or some old leftover stuff.
- */
- re__copy_and_pad(el->el_display[i], el->el_vdisplay[i],
- el->el_term.t_size.h);
- }
- RE_DEBUG(1,(__F,
- "\r\nel->el_refresh.r_cursor.v=%d,el->el_refresh.r_oldcv=%d i=%d\r\n",
- el->el_refresh.r_cursor.v, el->el_refresh.r_oldcv, i),);
-
- if (el->el_refresh.r_oldcv > el->el_refresh.r_newcv)
- for (; i <= el->el_refresh.r_oldcv; i++) {
- term_move_to_line(el, i);
- term_move_to_char(el, 0);
- term_clear_EOL(el, strlen(el->el_display[i]));
-#ifdef DEBUG_REFRESH
- term_overwrite(el, "C\b", 2);
-#endif /* DEBUG_REFRESH */
- *el->el_display[i] = '\0';
- }
-
- el->el_refresh.r_oldcv = el->el_refresh.r_newcv; /* set for next time */
- RE_DEBUG(1,(__F,
- "\r\ncursor.h = %d, cursor.v = %d, cur.h = %d, cur.v = %d\r\n",
- el->el_refresh.r_cursor.h, el->el_refresh.r_cursor.v,
- cur.h, cur.v),);
- term_move_to_line(el, cur.v); /* go to where the cursor is */
- term_move_to_char(el, cur.h);
-} /* end re_refresh */
-
-
-/* re_goto_bottom():
- * used to go to last used screen line
- */
-protected void
-re_goto_bottom(el)
- EditLine *el;
-{
- term_move_to_line(el, el->el_refresh.r_oldcv);
- term__putc('\r');
- term__putc('\n');
- re_clear_display(el);
- term__flush();
-} /* end re_goto_bottom */
-
-
-/* re_insert():
- * insert num characters of s into d (in front of the character)
- * at dat, maximum length of d is dlen
- */
-private void
-/*ARGSUSED*/
-re_insert(el, d, dat, dlen, s, num)
- EditLine *el;
- char *d;
- int dat, dlen;
- char *s;
- int num;
-{
- char *a, *b;
-
- if (num <= 0)
- return;
- if (num > dlen - dat)
- num = dlen - dat;
-
- RE_DEBUG(1,(__F, "re_insert() starting: %d at %d max %d, d == \"%s\"\n",
- num, dat, dlen, d),);
- RE_DEBUG(1,(__F, "s == \"%s\"n", s),);
-
- /* open up the space for num chars */
- if (num > 0) {
- b = d + dlen - 1;
- a = b - num;
- while (a >= &d[dat])
- *b-- = *a--;
- d[dlen] = '\0'; /* just in case */
- }
- RE_DEBUG(1,(__F,
- "re_insert() after insert: %d at %d max %d, d == \"%s\"\n",
- num, dat, dlen, d),);
- RE_DEBUG(1,(__F, "s == \"%s\"n", s),);
-
- /* copy the characters */
- for (a = d + dat; (a < d + dlen) && (num > 0); num--)
- *a++ = *s++;
-
- RE_DEBUG(1,(__F, "re_insert() after copy: %d at %d max %d, %s == \"%s\"\n",
- num, dat, dlen, d, s),);
- RE_DEBUG(1,(__F, "s == \"%s\"n", s),);
-} /* end re_insert */
-
-
-/* re_delete():
- * delete num characters d at dat, maximum length of d is dlen
- */
-private void
-/*ARGSUSED*/
-re_delete(el, d, dat, dlen, num)
- EditLine *el;
- char *d;
- int dat, dlen, num;
-{
- char *a, *b;
-
- if (num <= 0)
- return;
- if (dat + num >= dlen) {
- d[dat] = '\0';
- return;
- }
-
- RE_DEBUG(1,(__F, "re_delete() starting: %d at %d max %d, d == \"%s\"\n",
- num, dat, dlen, d),);
-
- /* open up the space for num chars */
- if (num > 0) {
- b = d + dat;
- a = b + num;
- while (a < &d[dlen])
- *b++ = *a++;
- d[dlen] = '\0'; /* just in case */
- }
- RE_DEBUG(1,(__F, "re_delete() after delete: %d at %d max %d, d == \"%s\"\n",
- num, dat, dlen, d),);
-} /* end re_delete */
-
-
-/* re__strncopy():
- * Like strncpy without padding.
- */
-private void
-re__strncopy(a, b, n)
- char *a, *b;
- size_t n;
-{
- while (n-- && *b)
- *a++ = *b++;
-} /* end re__strncopy */
-
-
-/* ****************************************************************
- re_update_line() is based on finding the middle difference of each line
- on the screen; vis:
-
- /old first difference
- /beginning of line | /old last same /old EOL
- v v v v
-old: eddie> Oh, my little gruntle-buggy is to me, as lurgid as
-new: eddie> Oh, my little buggy says to me, as lurgid as
- ^ ^ ^ ^
- \beginning of line | \new last same \new end of line
- \new first difference
-
- all are character pointers for the sake of speed. Special cases for
- no differences, as well as for end of line additions must be handled.
-**************************************************************** */
-
-/* Minimum at which doing an insert it "worth it". This should be about
- * half the "cost" of going into insert mode, inserting a character, and
- * going back out. This should really be calculated from the termcap
- * data... For the moment, a good number for ANSI terminals.
- */
-#define MIN_END_KEEP 4
-
-private void
-re_update_line(el, old, new, i)
- EditLine *el;
- char *old, *new;
- int i;
-{
- char *o, *n, *p, c;
- char *ofd, *ols, *oe, *nfd, *nls, *ne;
- char *osb, *ose, *nsb, *nse;
- int fx, sx;
-
- /*
- * find first diff
- */
- for (o = old, n = new; *o && (*o == *n); o++, n++)
- continue;
- ofd = o;
- nfd = n;
-
- /*
- * Find the end of both old and new
- */
- while (*o)
- o++;
- /*
- * Remove any trailing blanks off of the end, being careful not to
- * back up past the beginning.
- */
- while (ofd < o) {
- if (o[-1] != ' ')
- break;
- o--;
- }
- oe = o;
- *oe = '\0';
-
- while (*n)
- n++;
-
- /* remove blanks from end of new */
- while (nfd < n) {
- if (n[-1] != ' ')
- break;
- n--;
- }
- ne = n;
- *ne = '\0';
-
- /*
- * if no diff, continue to next line of redraw
- */
- if (*ofd == '\0' && *nfd == '\0') {
- RE_DEBUG(1,(__F, "no difference.\r\n"),);
- return;
- }
-
- /*
- * find last same pointer
- */
- while ((o > ofd) && (n > nfd) && (*--o == *--n))
- continue;
- ols = ++o;
- nls = ++n;
-
- /*
- * find same begining and same end
- */
- osb = ols;
- nsb = nls;
- ose = ols;
- nse = nls;
-
- /*
- * case 1: insert: scan from nfd to nls looking for *ofd
- */
- if (*ofd) {
- for (c = *ofd, n = nfd; n < nls; n++) {
- if (c == *n) {
- for (o = ofd, p = n; p < nls && o < ols && *o == *p; o++, p++)
- continue;
- /*
- * if the new match is longer and it's worth keeping, then we
- * take it
- */
- if (((nse - nsb) < (p - n)) && (2 * (p - n) > n - nfd)) {
- nsb = n;
- nse = p;
- osb = ofd;
- ose = o;
- }
- }
- }
- }
-
- /*
- * case 2: delete: scan from ofd to ols looking for *nfd
- */
- if (*nfd) {
- for (c = *nfd, o = ofd; o < ols; o++) {
- if (c == *o) {
- for (n = nfd, p = o; p < ols && n < nls && *p == *n; p++, n++)
- continue;
- /*
- * if the new match is longer and it's worth keeping, then we
- * take it
- */
- if (((ose - osb) < (p - o)) && (2 * (p - o) > o - ofd)) {
- nsb = nfd;
- nse = n;
- osb = o;
- ose = p;
- }
- }
- }
- }
-
- /*
- * Pragmatics I: If old trailing whitespace or not enough characters to
- * save to be worth it, then don't save the last same info.
- */
- if ((oe - ols) < MIN_END_KEEP) {
- ols = oe;
- nls = ne;
- }
-
- /*
- * Pragmatics II: if the terminal isn't smart enough, make the data dumber
- * so the smart update doesn't try anything fancy
- */
-
- /*
- * fx is the number of characters we need to insert/delete: in the
- * beginning to bring the two same begins together
- */
- fx = (nsb - nfd) - (osb - ofd);
- /*
- * sx is the number of characters we need to insert/delete: in the end to
- * bring the two same last parts together
- */
- sx = (nls - nse) - (ols - ose);
-
- if (!EL_CAN_INSERT) {
- if (fx > 0) {
- osb = ols;
- ose = ols;
- nsb = nls;
- nse = nls;
- }
- if (sx > 0) {
- ols = oe;
- nls = ne;
- }
- if ((ols - ofd) < (nls - nfd)) {
- ols = oe;
- nls = ne;
- }
- }
- if (!EL_CAN_DELETE) {
- if (fx < 0) {
- osb = ols;
- ose = ols;
- nsb = nls;
- nse = nls;
- }
- if (sx < 0) {
- ols = oe;
- nls = ne;
- }
- if ((ols - ofd) > (nls - nfd)) {
- ols = oe;
- nls = ne;
- }
- }
-
- /*
- * Pragmatics III: make sure the middle shifted pointers are correct if
- * they don't point to anything (we may have moved ols or nls).
- */
- /* if the change isn't worth it, don't bother */
- /* was: if (osb == ose) */
- if ((ose - osb) < MIN_END_KEEP) {
- osb = ols;
- ose = ols;
- nsb = nls;
- nse = nls;
- }
-
- /*
- * Now that we are done with pragmatics we recompute fx, sx
- */
- fx = (nsb - nfd) - (osb - ofd);
- sx = (nls - nse) - (ols - ose);
-
- RE_DEBUG(1,(__F, "\n"),);
- RE_DEBUG(1,(__F, "ofd %d, osb %d, ose %d, ols %d, oe %d\n",
- ofd - old, osb - old, ose - old, ols - old, oe - old),);
- RE_DEBUG(1,(__F, "nfd %d, nsb %d, nse %d, nls %d, ne %d\n",
- nfd - new, nsb - new, nse - new, nls - new, ne - new),);
- RE_DEBUG(1,(__F,
- "xxx-xxx:\"00000000001111111111222222222233333333334\"\r\n"),);
- RE_DEBUG(1,(__F,
- "xxx-xxx:\"01234567890123456789012345678901234567890\"\r\n"),);
-#ifdef DEBUG_REFRESH
- re_printstr(el, "old- oe", old, oe);
- re_printstr(el, "new- ne", new, ne);
- re_printstr(el, "old-ofd", old, ofd);
- re_printstr(el, "new-nfd", new, nfd);
- re_printstr(el, "ofd-osb", ofd, osb);
- re_printstr(el, "nfd-nsb", nfd, nsb);
- re_printstr(el, "osb-ose", osb, ose);
- re_printstr(el, "nsb-nse", nsb, nse);
- re_printstr(el, "ose-ols", ose, ols);
- re_printstr(el, "nse-nls", nse, nls);
- re_printstr(el, "ols- oe", ols, oe);
- re_printstr(el, "nls- ne", nls, ne);
-#endif /* DEBUG_REFRESH */
-
- /*
- * el_cursor.v to this line i MUST be in this routine so that if we
- * don't have to change the line, we don't move to it. el_cursor.h to first
- * diff char
- */
- term_move_to_line(el, i);
-
- /*
- * at this point we have something like this:
- *
- * /old /ofd /osb /ose /ols /oe
- * v.....................v v..................v v........v
- * eddie> Oh, my fredded gruntle-buggy is to me, as foo var lurgid as
- * eddie> Oh, my fredded quiux buggy is to me, as gruntle-lurgid as
- * ^.....................^ ^..................^ ^........^
- * \new \nfd \nsb \nse \nls \ne
- *
- * fx is the difference in length between the the chars between nfd and
- * nsb, and the chars between ofd and osb, and is thus the number of
- * characters to delete if < 0 (new is shorter than old, as above),
- * or insert (new is longer than short).
- *
- * sx is the same for the second differences.
- */
-
- /*
- * if we have a net insert on the first difference, AND inserting the net
- * amount ((nsb-nfd) - (osb-ofd)) won't push the last useful character
- * (which is ne if nls != ne, otherwise is nse) off the edge of the screen
- * (el->el_term.t_size.h) else we do the deletes first so that we keep everything we need
- * to.
- */
-
- /*
- * if the last same is the same like the end, there is no last same part,
- * otherwise we want to keep the last same part set p to the last useful
- * old character
- */
- p = (ols != oe) ? oe : ose;
-
- /*
- * if (There is a diffence in the beginning) && (we need to insert
- * characters) && (the number of characters to insert is less than the term
- * width) We need to do an insert! else if (we need to delete characters)
- * We need to delete characters! else No insert or delete
- */
- if ((nsb != nfd) && fx > 0 && ((p - old) + fx <= el->el_term.t_size.h)) {
- RE_DEBUG(1,(__F, "first diff insert at %d...\r\n", nfd - new),);
- /*
- * Move to the first char to insert, where the first diff is.
- */
- term_move_to_char(el, nfd - new);
- /*
- * Check if we have stuff to keep at end
- */
- if (nsb != ne) {
- RE_DEBUG(1,(__F, "with stuff to keep at end\r\n"),);
- /*
- * insert fx chars of new starting at nfd
- */
- if (fx > 0) {
- RE_DEBUG(!EL_CAN_INSERT,
- (__F, "ERROR: cannot insert in early first diff\n"),);
- term_insertwrite(el, nfd, fx);
- re_insert(el, old, ofd - old, el->el_term.t_size.h, nfd, fx);
- }
- /*
- * write (nsb-nfd) - fx chars of new starting at (nfd + fx)
- */
- term_overwrite(el, nfd + fx, (nsb - nfd) - fx);
- re__strncopy(ofd + fx, nfd + fx, (nsb - nfd) - fx);
- }
- else {
- RE_DEBUG(1,(__F, "without anything to save\r\n"),);
- term_overwrite(el, nfd, (nsb - nfd));
- re__strncopy(ofd, nfd, (nsb - nfd));
- /*
- * Done
- */
- return;
- }
- }
- else if (fx < 0) {
- RE_DEBUG(1,(__F, "first diff delete at %d...\r\n", ofd - old),);
- /*
- * move to the first char to delete where the first diff is
- */
- term_move_to_char(el, ofd - old);
- /*
- * Check if we have stuff to save
- */
- if (osb != oe) {
- RE_DEBUG(1,(__F, "with stuff to save at end\r\n"),);
- /*
- * fx is less than zero *always* here but we check for code
- * symmetry
- */
- if (fx < 0) {
- RE_DEBUG(!EL_CAN_DELETE,
- (__F, "ERROR: cannot delete in first diff\n"),);
- term_deletechars(el, -fx);
- re_delete(el, old, ofd - old, el->el_term.t_size.h, -fx);
- }
- /*
- * write (nsb-nfd) chars of new starting at nfd
- */
- term_overwrite(el, nfd, (nsb - nfd));
- re__strncopy(ofd, nfd, (nsb - nfd));
-
- }
- else {
- RE_DEBUG(1,(__F, "but with nothing left to save\r\n"),);
- /*
- * write (nsb-nfd) chars of new starting at nfd
- */
- term_overwrite(el, nfd, (nsb - nfd));
- RE_DEBUG(1,(__F, "cleareol %d\n", (oe - old) - (ne - new)),);
- term_clear_EOL(el, (oe - old) - (ne - new));
- /*
- * Done
- */
- return;
- }
- }
- else
- fx = 0;
-
- if (sx < 0) {
- RE_DEBUG(1,(__F, "second diff delete at %d...\r\n", (ose - old) + fx),);
- /*
- * Check if we have stuff to delete
- */
- /*
- * fx is the number of characters inserted (+) or deleted (-)
- */
-
- term_move_to_char(el, (ose - old) + fx);
- /*
- * Check if we have stuff to save
- */
- if (ols != oe) {
- RE_DEBUG(1,(__F, "with stuff to save at end\r\n"),);
- /*
- * Again a duplicate test.
- */
- if (sx < 0) {
- RE_DEBUG(!EL_CAN_DELETE,
- (__F, "ERROR: cannot delete in second diff\n"),);
- term_deletechars(el, -sx);
- }
-
- /*
- * write (nls-nse) chars of new starting at nse
- */
- term_overwrite(el, nse, (nls - nse));
- }
- else {
- RE_DEBUG(1,(__F, "but with nothing left to save\r\n"),);
- term_overwrite(el, nse, (nls - nse));
- RE_DEBUG(1,(__F, "cleareol %d\n", (oe - old) - (ne - new)),);
- term_clear_EOL(el, (oe - old) - (ne - new));
- }
- }
-
- /*
- * if we have a first insert AND WE HAVEN'T ALREADY DONE IT...
- */
- if ((nsb != nfd) && (osb - ofd) <= (nsb - nfd) && (fx == 0)) {
- RE_DEBUG(1,(__F, "late first diff insert at %d...\r\n", nfd - new),);
-
- term_move_to_char(el, nfd - new);
- /*
- * Check if we have stuff to keep at the end
- */
- if (nsb != ne) {
- RE_DEBUG(1,(__F, "with stuff to keep at end\r\n"),);
- /*
- * We have to recalculate fx here because we set it
- * to zero above as a flag saying that we hadn't done
- * an early first insert.
- */
- fx = (nsb - nfd) - (osb - ofd);
- if (fx > 0) {
- /*
- * insert fx chars of new starting at nfd
- */
- RE_DEBUG(!EL_CAN_INSERT,
- (__F, "ERROR: cannot insert in late first diff\n"),);
- term_insertwrite(el, nfd, fx);
- re_insert(el, old, ofd - old, el->el_term.t_size.h, nfd, fx);
- }
-
- /*
- * write (nsb-nfd) - fx chars of new starting at (nfd + fx)
- */
- term_overwrite(el, nfd + fx, (nsb - nfd) - fx);
- re__strncopy(ofd + fx, nfd + fx, (nsb - nfd) - fx);
- }
- else {
- RE_DEBUG(1,(__F, "without anything to save\r\n"),);
- term_overwrite(el, nfd, (nsb - nfd));
- re__strncopy(ofd, nfd, (nsb - nfd));
- }
- }
-
- /*
- * line is now NEW up to nse
- */
- if (sx >= 0) {
- RE_DEBUG(1,(__F, "second diff insert at %d...\r\n", nse - new),);
- term_move_to_char(el, nse - new);
- if (ols != oe) {
- RE_DEBUG(1,(__F, "with stuff to keep at end\r\n"),);
- if (sx > 0) {
- /* insert sx chars of new starting at nse */
- RE_DEBUG(!EL_CAN_INSERT,
- (__F, "ERROR: cannot insert in second diff\n"),);
- term_insertwrite(el, nse, sx);
- }
-
- /*
- * write (nls-nse) - sx chars of new starting at (nse + sx)
- */
- term_overwrite(el, nse + sx, (nls - nse) - sx);
- }
- else {
- RE_DEBUG(1,(__F, "without anything to save\r\n"),);
- term_overwrite(el, nse, (nls - nse));
-
- /*
- * No need to do a clear-to-end here because we were doing
- * a second insert, so we will have over written all of the
- * old string.
- */
- }
- }
- RE_DEBUG(1,(__F, "done.\r\n"),);
-} /* re_update_line */
-
-
-/* re__copy_and_pad():
- * Copy string and pad with spaces
- */
-private void
-re__copy_and_pad(dst, src, width)
- char *dst, *src;
- size_t width;
-{
- int i;
-
- for (i = 0; i < width; i++) {
- if (*src == '\0')
- break;
- *dst++ = *src++;
- }
-
- while (i < width) {
- *dst++ = ' ';
- i++;
- }
- *dst = '\0';
-} /* end re__copy_and_pad */
-
-
-/* re_refresh_cursor():
- * Move to the new cursor position
- */
-protected void
-re_refresh_cursor(el)
- EditLine *el;
-{
- char *cp;
- int c;
- int h, v, th;
-
- /* first we must find where the cursor is... */
- h = el->el_prompt.p_pos.h;
- v = el->el_prompt.p_pos.v;
- th = el->el_term.t_size.h; /* optimize for speed */
-
- /* do input buffer to el->el_line.cursor */
- for (cp = el->el_line.buffer; cp < el->el_line.cursor; cp++) {
- c = (unsigned char)*cp;
- h++; /* all chars at least this long */
-
- if (c == '\n') { /* handle newline in data part too */
- h = 0;
- v++;
- }
- else {
- if (c == '\t') { /* if a tab, to next tab stop */
- while (h & 07) {
- h++;
- }
- }
- else if (iscntrl(c)) { /* if control char */
- h++;
- if (h > th) { /* if overflow, compensate */
- h = 1;
- v++;
- }
- }
- else if (!isprint(c)) {
- h += 3;
- if (h > th) { /* if overflow, compensate */
- h = h - th;
- v++;
- }
- }
- }
-
- if (h >= th) { /* check, extra long tabs picked up here also */
- h = 0;
- v++;
- }
- }
-
- /* now go there */
- term_move_to_line(el, v);
- term_move_to_char(el, h);
- term__flush();
-} /* re_refresh_cursor */
-
-
-/* re_fastputc():
- * Add a character fast.
- */
-private void
-re_fastputc(el, c)
- EditLine *el;
- int c;
-{
- term__putc(c);
- el->el_display[el->el_cursor.v][el->el_cursor.h++] = c;
- if (el->el_cursor.h >= el->el_term.t_size.h) {
- /* if we must overflow */
- el->el_cursor.h = 0;
- el->el_cursor.v++;
- el->el_refresh.r_oldcv++;
- term__putc('\r');
- term__putc('\n');
- }
-} /* end re_fastputc */
-
-
-/* re_fastaddc():
- * we added just one char, handle it fast.
- * Assumes that screen cursor == real cursor
- */
-protected void
-re_fastaddc(el)
- EditLine *el;
-{
- int c;
-
- c = (unsigned char)el->el_line.cursor[-1];
-
- if (c == '\t' || el->el_line.cursor != el->el_line.lastchar) {
- re_refresh(el); /* too hard to handle */
- return;
- } /* else (only do at end of line, no TAB) */
-
- if (iscntrl(c)) { /* if control char, do caret */
- char mc = (c == 0177) ? '?' : (toascii(c) | 0100);
- re_fastputc(el, '^');
- re_fastputc(el, mc);
- }
- else if (isprint(c)) { /* normal char */
- re_fastputc(el, c);
- }
- else {
- re_fastputc(el, '\\');
- re_fastputc(el, ((c >> 6) & 7) + '0');
- re_fastputc(el, ((c >> 3) & 7) + '0');
- re_fastputc(el, (c & 7) + '0');
- }
- term__flush();
-} /* end re_fastaddc */
-
-
-/* re_clear_display():
- * clear the screen buffers so that new new prompt starts fresh.
- */
-protected void
-re_clear_display(el)
- EditLine *el;
-{
- int i;
-
- el->el_cursor.v = 0;
- el->el_cursor.h = 0;
- for (i = 0; i < el->el_term.t_size.v; i++)
- el->el_display[i][0] = '\0';
- el->el_refresh.r_oldcv = 0;
-} /* end re_clear_display */
-
-
-/* re_clear_lines():
- * Make sure all lines are *really* blank
- */
-protected void
-re_clear_lines(el)
- EditLine *el;
-{
- if (EL_CAN_CEOL) {
- int i;
- term_move_to_char(el, 0);
- for (i = 0; i <= el->el_refresh.r_oldcv; i++) {
- /* for each line on the screen */
- term_move_to_line(el, i);
- term_clear_EOL(el, el->el_term.t_size.h);
- }
- term_move_to_line(el, 0);
- }
- else {
- term_move_to_line(el, el->el_refresh.r_oldcv); /* go to last line */
- term__putc('\r'); /* go to BOL */
- term__putc('\n'); /* go to new line */
- }
-} /* end re_clear_lines */
diff --git a/lib/libedit/refresh.h b/lib/libedit/refresh.h
deleted file mode 100644
index 4fe50bc..0000000
--- a/lib/libedit/refresh.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)refresh.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.refresh.h: Screen refresh functions
- */
-#ifndef _h_el_refresh
-#define _h_el_refresh
-
-#include "histedit.h"
-
-typedef struct {
- coord_t r_cursor; /* Refresh cursor position */
- int r_oldcv, r_newcv; /* Vertical locations */
-} el_refresh_t;
-
-protected void re_putc __P((EditLine *, int));
-protected void re_clear_lines __P((EditLine *));
-protected void re_clear_display __P((EditLine *));
-protected void re_refresh __P((EditLine *));
-protected void re_refresh_cursor __P((EditLine *));
-protected void re_fastaddc __P((EditLine *));
-protected void re_goto_bottom __P((EditLine *));
-
-#endif /* _h_el_refresh */
diff --git a/lib/libedit/search.c b/lib/libedit/search.c
deleted file mode 100644
index 0716ff2..0000000
--- a/lib/libedit/search.c
+++ /dev/null
@@ -1,632 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)search.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * search.c: History and character search functions
- */
-#include "sys.h"
-#include <stdlib.h>
-#if defined(REGEX)
-#include <regex.h>
-#elif defined(REGEXP)
-#include <regexp.h>
-#endif
-#include "el.h"
-
-/*
- * Adjust cursor in vi mode to include the character under it
- */
-#define EL_CURSOR(el) \
- ((el)->el_line.cursor + (((el)->el_map.type == MAP_VI) && \
- ((el)->el_map.current == (el)->el_map.alt)))
-
-/* search_init():
- * Initialize the search stuff
- */
-protected int
-search_init(el)
- EditLine *el;
-{
- el->el_search.patbuf = (char *) el_malloc(EL_BUFSIZ);
- el->el_search.patlen = 0;
- el->el_search.patdir = -1;
- el->el_search.chacha = '\0';
- el->el_search.chadir = -1;
- return 0;
-}
-
-
-/* search_end():
- * Initialize the search stuff
- */
-protected void
-search_end(el)
- EditLine *el;
-{
- el_free((ptr_t) el->el_search.patbuf);
- el->el_search.patbuf = NULL;
-}
-
-#ifdef REGEXP
-/* regerror():
- * Handle regular expression errors
- */
-public void
-/*ARGSUSED*/
-regerror(msg)
- const char *msg;
-{
-}
-#endif
-
-/* el_match():
- * Return if string matches pattern
- */
-protected int
-el_match(str, pat)
- const char *str;
- const char *pat;
-{
-#if defined (REGEX)
- regex_t re;
- int rv;
-#elif defined (REGEXP)
- regexp *rp;
- int rv;
-#else
- extern char *re_comp __P((const char *));
- extern int re_exec __P((const char *));
-#endif
-
- if (strstr(str, pat) != NULL)
- return 1;
-
-#if defined(REGEX)
- if (regcomp(&re, pat, 0) == 0) {
- rv = regexec(&re, str, 0, NULL, 0) == 0;
- regfree(&re);
- } else {
- rv = 0;
- }
- return rv;
-#elif defined(REGEXP)
- if ((re = regcomp(pat)) != NULL) {
- rv = regexec(re, str);
- free((ptr_t) re);
- } else {
- rv = 0;
- }
- return rv;
-#else
- if (re_comp(pat) != NULL)
- return 0;
- else
- return re_exec(str) == 1;
-#endif
-}
-
-
-/* c_hmatch():
- * return True if the pattern matches the prefix
- */
-protected int
-c_hmatch(el, str)
- EditLine *el;
- const char *str;
-{
-#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "match `%s' with `%s'\n",
- el->el_search.patbuf, str);
-#endif /* SDEBUG */
-
- return el_match(str, el->el_search.patbuf);
-}
-
-
-/* c_setpat():
- * Set the history seatch pattern
- */
-protected void
-c_setpat(el)
- EditLine *el;
-{
- if (el->el_state.lastcmd != ED_SEARCH_PREV_HISTORY &&
- el->el_state.lastcmd != ED_SEARCH_NEXT_HISTORY) {
- el->el_search.patlen = EL_CURSOR(el) - el->el_line.buffer;
- if (el->el_search.patlen >= EL_BUFSIZ)
- el->el_search.patlen = EL_BUFSIZ -1;
- if (el->el_search.patlen >= 0) {
- (void) strncpy(el->el_search.patbuf, el->el_line.buffer,
- el->el_search.patlen);
- el->el_search.patbuf[el->el_search.patlen] = '\0';
- }
- else
- el->el_search.patlen = strlen(el->el_search.patbuf);
- }
-#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "\neventno = %d\n", el->el_history.eventno);
- (void) fprintf(el->el_errfile, "patlen = %d\n", el->el_search.patlen);
- (void) fprintf(el->el_errfile, "patbuf = \"%s\"\n", el->el_search.patbuf);
- (void) fprintf(el->el_errfile, "cursor %d lastchar %d\n",
- EL_CURSOR(el) - el->el_line.buffer,
- el->el_line.lastchar - el->el_line.buffer);
-#endif
-}
-
-
-/* ce_inc_search():
- * Emacs incremental search
- */
-protected el_action_t
-ce_inc_search(el, dir)
- EditLine *el;
- int dir;
-{
- static char STRfwd[] = { 'f', 'w', 'd', '\0' },
- STRbck[] = { 'b', 'c', 'k', '\0' };
- static char pchar = ':'; /* ':' = normal, '?' = failed */
- static char endcmd[2] = { '\0', '\0' };
- char ch, *cp, *ocursor = el->el_line.cursor, oldpchar = pchar;
-
- el_action_t ret = CC_NORM;
-
- int ohisteventno = el->el_history.eventno,
- oldpatlen = el->el_search.patlen,
- newdir = dir,
- done, redo;
-
- if (el->el_line.lastchar + sizeof(STRfwd) / sizeof(char) + 2 +
- el->el_search.patlen >= el->el_line.limit)
- return CC_ERROR;
-
- for (;;) {
-
- if (el->el_search.patlen == 0) { /* first round */
- pchar = ':';
-#ifdef ANCHOR
- el->el_search.patbuf[el->el_search.patlen++] = '.';
- el->el_search.patbuf[el->el_search.patlen++] = '*';
-#endif
- }
- done = redo = 0;
- *el->el_line.lastchar++ = '\n';
- for (cp = newdir == ED_SEARCH_PREV_HISTORY ? STRbck : STRfwd;
- *cp; *el->el_line.lastchar++ = *cp++)
- continue;
- *el->el_line.lastchar++ = pchar;
- for (cp = &el->el_search.patbuf[1];
- cp < &el->el_search.patbuf[el->el_search.patlen];
- *el->el_line.lastchar++ = *cp++)
- continue;
- *el->el_line.lastchar = '\0';
- re_refresh(el);
-
- if (el_getc(el, &ch) != 1)
- return ed_end_of_file(el, 0);
-
- switch (el->el_map.current[(unsigned char) ch]) {
- case ED_INSERT:
- case ED_DIGIT:
- if (el->el_search.patlen > EL_BUFSIZ - 3)
- term_beep(el);
- else {
- el->el_search.patbuf[el->el_search.patlen++] = ch;
- *el->el_line.lastchar++ = ch;
- *el->el_line.lastchar = '\0';
- re_refresh(el);
- }
- break;
-
- case EM_INC_SEARCH_NEXT:
- newdir = ED_SEARCH_NEXT_HISTORY;
- redo++;
- break;
-
- case EM_INC_SEARCH_PREV:
- newdir = ED_SEARCH_PREV_HISTORY;
- redo++;
- break;
-
- case ED_DELETE_PREV_CHAR:
- if (el->el_search.patlen > 1)
- done++;
- else
- term_beep(el);
- break;
-
- default:
- switch (ch) {
- case 0007: /* ^G: Abort */
- ret = CC_ERROR;
- done++;
- break;
-
- case 0027: /* ^W: Append word */
- /* No can do if globbing characters in pattern */
- for (cp = &el->el_search.patbuf[1]; ; cp++)
- if (cp >= &el->el_search.patbuf[el->el_search.patlen]) {
- el->el_line.cursor += el->el_search.patlen - 1;
- cp = c__next_word(el->el_line.cursor,
- el->el_line.lastchar, 1, ce__isword);
- while (el->el_line.cursor < cp &&
- *el->el_line.cursor != '\n') {
- if (el->el_search.patlen > EL_BUFSIZ - 3) {
- term_beep(el);
- break;
- }
- el->el_search.patbuf[el->el_search.patlen++] =
- *el->el_line.cursor;
- *el->el_line.lastchar++ = *el->el_line.cursor++;
- }
- el->el_line.cursor = ocursor;
- *el->el_line.lastchar = '\0';
- re_refresh(el);
- break;
- } else if (isglob(*cp)) {
- term_beep(el);
- break;
- }
- break;
-
- default: /* Terminate and execute cmd */
- endcmd[0] = ch;
- el_push(el, endcmd);
- /*FALLTHROUGH*/
-
- case 0033: /* ESC: Terminate */
- ret = CC_REFRESH;
- done++;
- break;
- }
- break;
- }
-
- while (el->el_line.lastchar > el->el_line.buffer &&
- *el->el_line.lastchar != '\n')
- *el->el_line.lastchar-- = '\0';
- *el->el_line.lastchar = '\0';
-
- if (!done) {
-
- /* Can't search if unmatched '[' */
- for (cp = &el->el_search.patbuf[el->el_search.patlen-1], ch = ']';
- cp > el->el_search.patbuf; cp--)
- if (*cp == '[' || *cp == ']') {
- ch = *cp;
- break;
- }
-
- if (el->el_search.patlen > 1 && ch != '[') {
- if (redo && newdir == dir) {
- if (pchar == '?') { /* wrap around */
- el->el_history.eventno =
- newdir == ED_SEARCH_PREV_HISTORY ? 0 : 0x7fffffff;
- if (hist_get(el) == CC_ERROR)
- /* el->el_history.eventno was fixed by first call */
- (void) hist_get(el);
- el->el_line.cursor = newdir == ED_SEARCH_PREV_HISTORY ?
- el->el_line.lastchar : el->el_line.buffer;
- } else
- el->el_line.cursor +=
- newdir == ED_SEARCH_PREV_HISTORY ? -1 : 1;
- }
-#ifdef ANCHOR
- el->el_search.patbuf[el->el_search.patlen++] = '.';
- el->el_search.patbuf[el->el_search.patlen++] = '*';
-#endif
- el->el_search.patbuf[el->el_search.patlen] = '\0';
- if (el->el_line.cursor < el->el_line.buffer ||
- el->el_line.cursor > el->el_line.lastchar ||
- (ret = ce_search_line(el, &el->el_search.patbuf[1],
- newdir)) == CC_ERROR) {
- /* avoid c_setpat */
- el->el_state.lastcmd = (el_action_t) newdir;
- ret = newdir == ED_SEARCH_PREV_HISTORY ?
- ed_search_prev_history(el, 0) :
- ed_search_next_history(el, 0);
- if (ret != CC_ERROR) {
- el->el_line.cursor = newdir == ED_SEARCH_PREV_HISTORY ?
- el->el_line.lastchar : el->el_line.buffer;
- (void) ce_search_line(el, &el->el_search.patbuf[1],
- newdir);
- }
- }
- el->el_search.patbuf[--el->el_search.patlen] = '\0';
- if (ret == CC_ERROR) {
- term_beep(el);
- if (el->el_history.eventno != ohisteventno) {
- el->el_history.eventno = ohisteventno;
- if (hist_get(el) == CC_ERROR)
- return CC_ERROR;
- }
- el->el_line.cursor = ocursor;
- pchar = '?';
- } else {
- pchar = ':';
- }
- }
-
- ret = ce_inc_search(el, newdir);
-
- if (ret == CC_ERROR && pchar == '?' && oldpchar == ':')
- /* break abort of failed search at last non-failed */
- ret = CC_NORM;
-
- }
-
- if (ret == CC_NORM || (ret == CC_ERROR && oldpatlen == 0)) {
- /* restore on normal return or error exit */
- pchar = oldpchar;
- el->el_search.patlen = oldpatlen;
- if (el->el_history.eventno != ohisteventno) {
- el->el_history.eventno = ohisteventno;
- if (hist_get(el) == CC_ERROR)
- return CC_ERROR;
- }
- el->el_line.cursor = ocursor;
- if (ret == CC_ERROR)
- re_refresh(el);
- }
- if (done || ret != CC_NORM)
- return ret;
- }
-}
-
-
-/* cv_search():
- * Vi search.
- */
-protected el_action_t
-cv_search(el, dir)
- EditLine *el;
- int dir;
-{
- char ch;
- char tmpbuf[EL_BUFSIZ];
- int tmplen;
-
- tmplen = 0;
-#ifdef ANCHOR
- tmpbuf[tmplen++] = '.';
- tmpbuf[tmplen++] = '*';
-#endif
-
- el->el_line.buffer[0] = '\0';
- el->el_line.lastchar = el->el_line.buffer;
- el->el_line.cursor = el->el_line.buffer;
- el->el_search.patdir = dir;
-
- c_insert(el, 2); /* prompt + '\n' */
- *el->el_line.cursor++ = '\n';
- *el->el_line.cursor++ = dir == ED_SEARCH_PREV_HISTORY ? '/' : '?';
- re_refresh(el);
-
-#ifdef ANCHOR
-# define LEN 2
-#else
-# define LEN 0
-#endif
-
- tmplen = c_gets(el, &tmpbuf[LEN]) + LEN;
- ch = tmpbuf[tmplen];
- tmpbuf[tmplen] = '\0';
-
- if (tmplen == LEN) {
- /*
- * Use the old pattern, but wild-card it.
- */
- if (el->el_search.patlen == 0) {
- el->el_line.buffer[0] = '\0';
- el->el_line.lastchar = el->el_line.buffer;
- el->el_line.cursor = el->el_line.buffer;
- re_refresh(el);
- return CC_ERROR;
- }
-#ifdef ANCHOR
- if (el->el_search.patbuf[0] != '.' && el->el_search.patbuf[0] != '*') {
- (void)strncpy(tmpbuf, el->el_search.patbuf, sizeof(tmpbuf) - 1);
- el->el_search.patbuf[0] = '.';
- el->el_search.patbuf[1] = '*';
- (void)strncpy(&el->el_search.patbuf[2], tmpbuf, EL_BUFSIZ - 3);
- el->el_search.patlen++;
- el->el_search.patbuf[el->el_search.patlen++] = '.';
- el->el_search.patbuf[el->el_search.patlen++] = '*';
- el->el_search.patbuf[el->el_search.patlen] = '\0';
- }
-#endif
- }
- else {
-#ifdef ANCHOR
- tmpbuf[tmplen++] = '.';
- tmpbuf[tmplen++] = '*';
-#endif
- tmpbuf[tmplen] = '\0';
- (void)strncpy(el->el_search.patbuf, tmpbuf, EL_BUFSIZ - 1);
- el->el_search.patlen = tmplen;
- }
- el->el_state.lastcmd = (el_action_t) dir; /* avoid c_setpat */
- el->el_line.cursor = el->el_line.lastchar = el->el_line.buffer;
- if ((dir == ED_SEARCH_PREV_HISTORY ? ed_search_prev_history(el, 0) :
- ed_search_next_history(el, 0)) == CC_ERROR) {
- re_refresh(el);
- return CC_ERROR;
- }
- else {
- if (ch == 0033) {
- re_refresh(el);
- *el->el_line.lastchar++ = '\n';
- *el->el_line.lastchar = '\0';
- re_goto_bottom(el);
- return CC_NEWLINE;
- }
- else
- return CC_REFRESH;
- }
-}
-
-
-/* ce_search_line():
- * Look for a pattern inside a line
- */
-protected el_action_t
-ce_search_line(el, pattern, dir)
- EditLine *el;
- char *pattern;
- int dir;
-{
- char *cp;
-
- if (dir == ED_SEARCH_PREV_HISTORY) {
- for (cp = el->el_line.cursor; cp >= el->el_line.buffer; cp--)
- if (el_match(cp, pattern)) {
- el->el_line.cursor = cp;
- return CC_NORM;
- }
- return CC_ERROR;
- } else {
- for (cp = el->el_line.cursor; *cp != '\0' &&
- cp < el->el_line.limit; cp++)
- if (el_match(cp, pattern)) {
- el->el_line.cursor = cp;
- return CC_NORM;
- }
- return CC_ERROR;
- }
-}
-
-
-/* cv_repeat_srch():
- * Vi repeat search
- */
-protected el_action_t
-cv_repeat_srch(el, c)
- EditLine *el;
- int c;
-{
-#ifdef SDEBUG
- (void) fprintf(el->el_errfile, "dir %d patlen %d patbuf %s\n",
- c, el->el_search.patlen, el->el_search.patbuf);
-#endif
-
- el->el_state.lastcmd = (el_action_t) c; /* Hack to stop c_setpat */
- el->el_line.lastchar = el->el_line.buffer;
-
- switch (c) {
- case ED_SEARCH_NEXT_HISTORY:
- return ed_search_next_history(el, 0);
- case ED_SEARCH_PREV_HISTORY:
- return ed_search_prev_history(el, 0);
- default:
- return CC_ERROR;
- }
-}
-
-
-/* cv_csearch_back():
- * Vi character search reverse
- */
-protected el_action_t
-cv_csearch_back(el, ch, count, tflag)
- EditLine *el;
- int ch, count, tflag;
-{
- char *cp;
-
- cp = el->el_line.cursor;
- while (count--) {
- if (*cp == ch)
- cp--;
- while (cp > el->el_line.buffer && *cp != ch)
- cp--;
- }
-
- if (cp < el->el_line.buffer || (cp == el->el_line.buffer && *cp != ch))
- return CC_ERROR;
-
- if (*cp == ch && tflag)
- cp++;
-
- el->el_line.cursor = cp;
-
- if (el->el_chared.c_vcmd.action & DELETE) {
- el->el_line.cursor++;
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- re_refresh_cursor(el);
- return CC_NORM;
-}
-
-
-/* cv_csearch_fwd():
- * Vi character search forward
- */
-protected el_action_t
-cv_csearch_fwd(el, ch, count, tflag)
- EditLine *el;
- int ch, count, tflag;
-{
- char *cp;
-
- cp = el->el_line.cursor;
- while (count--) {
- if(*cp == ch)
- cp++;
- while (cp < el->el_line.lastchar && *cp != ch)
- cp++;
- }
-
- if (cp >= el->el_line.lastchar)
- return CC_ERROR;
-
- if (*cp == ch && tflag)
- cp--;
-
- el->el_line.cursor = cp;
-
- if (el->el_chared.c_vcmd.action & DELETE) {
- el->el_line.cursor++;
- cv_delfini(el);
- return CC_REFRESH;
- }
- re_refresh_cursor(el);
- return CC_NORM;
-}
diff --git a/lib/libedit/search.h b/lib/libedit/search.h
deleted file mode 100644
index 346b38c..0000000
--- a/lib/libedit/search.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)search.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.search.h: Line and history searching utilities
- */
-#ifndef _h_el_search
-#define _h_el_search
-
-#include "histedit.h"
-
-typedef struct el_search_t {
- char *patbuf; /* The pattern buffer */
- int patlen; /* Length of the pattern buffer */
- int patdir; /* Direction of the last search */
- int chadir; /* Character search direction */
- char chacha; /* Character we are looking for */
-} el_search_t;
-
-
-protected int el_match __P((const char *, const char *));
-protected int search_init __P((EditLine *));
-protected void search_end __P((EditLine *));
-protected int c_hmatch __P((EditLine *, const char *));
-protected void c_setpat __P((EditLine *));
-protected el_action_t ce_inc_search __P((EditLine *, int));
-protected el_action_t cv_search __P((EditLine *, int));
-protected el_action_t ce_search_line __P((EditLine *, char *, int));
-protected el_action_t cv_repeat_srch __P((EditLine *, int));
-protected el_action_t cv_csearch_back __P((EditLine *, int, int, int));
-protected el_action_t cv_csearch_fwd __P((EditLine *, int, int, int));
-
-#endif /* _h_el_search */
diff --git a/lib/libedit/sig.c b/lib/libedit/sig.c
deleted file mode 100644
index d0a780a..0000000
--- a/lib/libedit/sig.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)sig.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * sig.c: Signal handling stuff.
- * our policy is to trap all signals, set a good state
- * and pass the ball to our caller.
- */
-#include "sys.h"
-#include "el.h"
-#include <stdlib.h>
-
-private EditLine *sel = NULL;
-
-private int sighdl[] = {
-#define _DO(a) (a),
- ALLSIGS
-#undef _DO
- -1
-};
-
-private void sig_handler __P((int));
-
-/* sig_handler():
- * This is the handler called for all signals
- * XXX: we cannot pass any data so we just store the old editline
- * state in a private variable
- */
-private void
-sig_handler(signo)
- int signo;
-{
- int i;
- sigset_t nset, oset;
-
- (void) sigemptyset(&nset);
- (void) sigaddset(&nset, signo);
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
-
- switch (signo) {
- case SIGCONT:
- tty_rawmode(sel);
- if (ed_redisplay(sel, 0) == CC_REFRESH)
- re_refresh(sel);
- term__flush();
- break;
-
- case SIGWINCH:
- el_resize(sel);
- break;
-
- default:
- tty_cookedmode(sel);
- break;
- }
-
- for (i = 0; sighdl[i] != -1; i++)
- if (signo == sighdl[i])
- break;
-
- (void) signal(signo, sel->el_signal[i]);
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
- (void) kill(0, signo);
-}
-
-
-/* sig_init():
- * Initialize all signal stuff
- */
-protected int
-sig_init(el)
- EditLine *el;
-{
- int i;
- sigset_t nset, oset;
-
- (void) sigemptyset(&nset);
-#define _DO(a) (void) sigaddset(&nset, SIGWINCH);
- ALLSIGS
-#undef _DO
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
-
-#define SIGSIZE (sizeof(sighdl) / sizeof(sighdl[0]) * sizeof(sig_t))
-
- el->el_signal = (sig_t *) el_malloc(SIGSIZE);
- for (i = 0; sighdl[i] != -1; i++)
- el->el_signal[i] = SIG_ERR;
-
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
-
- return 0;
-}
-
-
-/* sig_end():
- * Clear all signal stuff
- */
-protected void
-sig_end(el)
- EditLine *el;
-{
- el_free((ptr_t) el->el_signal);
- el->el_signal = NULL;
-}
-
-
-/* sig_set():
- * set all the signal handlers
- */
-protected void
-sig_set(el)
- EditLine *el;
-{
- int i;
- sigset_t nset, oset;
-
- (void) sigemptyset(&nset);
-#define _DO(a) (void) sigaddset(&nset, SIGWINCH);
- ALLSIGS
-#undef _DO
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
-
- for (i = 0; sighdl[i] != -1; i++) {
- sig_t s;
- /* This could happen if we get interrupted */
- if ((s = signal(sighdl[i], sig_handler)) != sig_handler)
- el->el_signal[i] = s;
- }
- sel = el;
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
-}
-
-
-/* sig_clr():
- * clear all the signal handlers
- */
-protected void
-sig_clr(el)
- EditLine *el;
-{
- int i;
- sigset_t nset, oset;
-
- (void) sigemptyset(&nset);
-#define _DO(a) (void) sigaddset(&nset, SIGWINCH);
- ALLSIGS
-#undef _DO
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
-
- for (i = 0; sighdl[i] != -1; i++)
- if (el->el_signal[i] != SIG_ERR)
- (void) signal(sighdl[i], el->el_signal[i]);
-
- sel = NULL; /* we are going to die if the handler is called */
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
-}
diff --git a/lib/libedit/sig.h b/lib/libedit/sig.h
deleted file mode 100644
index 98da74f..0000000
--- a/lib/libedit/sig.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sig.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.sig.h: Signal handling functions
- */
-#ifndef _h_el_sig
-#define _h_el_sig
-
-#include <signal.h>
-
-#include "histedit.h"
-
-/*
- * Define here all the signals we are going to handle
- * The _DO macro is used to iterate in the source code
- */
-#define ALLSIGS \
- _DO(SIGINT) \
- _DO(SIGTSTP) \
- _DO(SIGSTOP) \
- _DO(SIGQUIT) \
- _DO(SIGHUP) \
- _DO(SIGTERM) \
- _DO(SIGCONT) \
- _DO(SIGWINCH)
-
-typedef sig_t *el_signal_t;
-
-protected void sig_end __P((EditLine*));
-protected int sig_init __P((EditLine*));
-protected void sig_set __P((EditLine*));
-protected void sig_clr __P((EditLine*));
-
-#endif /* _h_el_sig */
diff --git a/lib/libedit/sys.h b/lib/libedit/sys.h
deleted file mode 100644
index 9e5fd0f..0000000
--- a/lib/libedit/sys.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)sys.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * sys.h: Put all the stupid compiler and system dependencies here...
- */
-#ifndef _h_sys
-#define _h_sys
-
-#ifndef public
-# define public /* Externally visible functions/variables */
-#endif
-
-#ifndef private
-# define private static /* Always hidden internals */
-#endif
-
-#ifndef protected
-# define protected /* Redefined from elsewhere to "static" */
- /* When we want to hide everything */
-#endif
-
-#include <sys/cdefs.h>
-
-#ifndef _PTR_T
-# define _PTR_T
-# if __STDC__
-typedef void* ptr_t;
-# else
-typedef char* ptr_t;
-# endif
-#endif
-
-#ifndef _IOCTL_T
-# define _IOCTL_T
-# if __STDC__
-typedef void* ioctl_t;
-# else
-typedef char* ioctl_t;
-# endif
-#endif
-
-#include <stdio.h>
-#define REGEX /* Use POSIX.2 regular expression functions */
-#undef REGEXP /* Use UNIX V8 regular expression functions */
-
-#ifdef SUNOS
-# undef REGEX
-# undef REGEXP
-# include <malloc.h>
-typedef void (*sig_t)__P((int));
-# ifdef __GNUC__
-/*
- * Broken hdrs.
- */
-extern char *getenv __P((const char *));
-extern int fprintf __P((FILE *, const char *, ...));
-extern int sigsetmask __P((int));
-extern int sigblock __P((int));
-extern int ioctl __P((int, int, void *));
-extern int fputc __P((int, FILE *));
-extern int fgetc __P((FILE *));
-extern int fflush __P((FILE *));
-extern int tolower __P((int));
-extern int toupper __P((int));
-extern int errno, sys_nerr;
-extern char *sys_errlist[];
-extern void perror __P((const char *));
-extern int read __P((int, const char*, int));
-# include <string.h>
-# define strerror(e) sys_errlist[e]
-# endif
-# ifdef SABER
-extern ptr_t memcpy __P((ptr_t, const ptr_t, size_t));
-extern ptr_t memset __P((ptr_t, int, size_t));
-# endif
-extern char *fgetline __P((FILE *, int *));
-#endif
-
-#endif /* _h_sys */
diff --git a/lib/libedit/term.c b/lib/libedit/term.c
deleted file mode 100644
index 8de3027..0000000
--- a/lib/libedit/term.c
+++ /dev/null
@@ -1,1378 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95";
-#endif /* not lint && not SCCSID */
-
-/*
- * term.c: Editor/termcap-curses interface
- * We have to declare a static variable here, since the
- * termcap putchar routine does not take an argument!
- */
-#include "sys.h"
-#include <stdio.h>
-#include <signal.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <termcap.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-
-#include "el.h"
-
-/*
- * IMPORTANT NOTE: these routines are allowed to look at the current screen
- * and the current possition assuming that it is correct. If this is not
- * true, then the update will be WRONG! This is (should be) a valid
- * assumption...
- */
-
-#define TC_BUFSIZE 2048
-
-#define GoodStr(a) (el->el_term.t_str[a] != NULL && \
- el->el_term.t_str[a][0] != '\0')
-#define Str(a) el->el_term.t_str[a]
-#define Val(a) el->el_term.t_val[a]
-
-private struct termcapstr {
- char *name;
- char *long_name;
-} tstr[] = {
-
-#define T_al 0
- { "al", "add new blank line" },
-#define T_bl 1
- { "bl", "audible bell" },
-#define T_cd 2
- { "cd", "clear to bottom" },
-#define T_ce 3
- { "ce", "clear to end of line" },
-#define T_ch 4
- { "ch", "cursor to horiz pos" },
-#define T_cl 5
- { "cl", "clear screen" },
-#define T_dc 6
- { "dc", "delete a character" },
-#define T_dl 7
- { "dl", "delete a line" },
-#define T_dm 8
- { "dm", "start delete mode" },
-#define T_ed 9
- { "ed", "end delete mode" },
-#define T_ei 10
- { "ei", "end insert mode" },
-#define T_fs 11
- { "fs", "cursor from status line" },
-#define T_ho 12
- { "ho", "home cursor" },
-#define T_ic 13
- { "ic", "insert character" },
-#define T_im 14
- { "im", "start insert mode" },
-#define T_ip 15
- { "ip", "insert padding" },
-#define T_kd 16
- { "kd", "sends cursor down" },
-#define T_kl 17
- { "kl", "sends cursor left" },
-#define T_kr 18
- { "kr", "sends cursor right" },
-#define T_ku 19
- { "ku", "sends cursor up" },
-#define T_md 20
- { "md", "begin bold" },
-#define T_me 21
- { "me", "end attributes" },
-#define T_nd 22
- { "nd", "non destructive space" },
-#define T_se 23
- { "se", "end standout" },
-#define T_so 24
- { "so", "begin standout" },
-#define T_ts 25
- { "ts", "cursor to status line" },
-#define T_up 26
- { "up", "cursor up one" },
-#define T_us 27
- { "us", "begin underline" },
-#define T_ue 28
- { "ue", "end underline" },
-#define T_vb 29
- { "vb", "visible bell" },
-#define T_DC 30
- { "DC", "delete multiple chars" },
-#define T_DO 31
- { "DO", "cursor down multiple" },
-#define T_IC 32
- { "IC", "insert multiple chars" },
-#define T_LE 33
- { "LE", "cursor left multiple" },
-#define T_RI 34
- { "RI", "cursor right multiple" },
-#define T_UP 35
- { "UP", "cursor up multiple" },
-#define T_str 36
- { NULL, NULL }
-};
-
-private struct termcapval {
- char *name;
- char *long_name;
-} tval[] = {
-#define T_pt 0
- { "pt", "has physical tabs" },
-#define T_li 1
- { "li", "Number of lines" },
-#define T_co 2
- { "co", "Number of columns" },
-#define T_km 3
- { "km", "Has meta key" },
-#define T_xt 4
- { "xt", "Tab chars destructive" },
-#define T_MT 5
- { "MT", "Has meta key" }, /* XXX? */
-#define T_val 6
- { NULL, NULL, }
-};
-
-/* do two or more of the attributes use me */
-
-private void term_rebuffer_display __P((EditLine *));
-private void term_free_display __P((EditLine *));
-private void term_alloc_display __P((EditLine *));
-private void term_alloc __P((EditLine *,
- struct termcapstr *, char *));
-private void term_init_arrow __P((EditLine *));
-private void term_reset_arrow __P((EditLine *));
-
-
-private FILE *term_outfile = NULL; /* XXX: How do we fix that? */
-
-
-/* term_setflags():
- * Set the terminal capability flags
- */
-private void
-term_setflags(el)
- EditLine *el;
-{
- EL_FLAGS = 0;
- if (el->el_tty.t_tabs)
- EL_FLAGS |= (Val(T_pt) && !Val(T_xt)) ? TERM_CAN_TAB : 0;
-
- EL_FLAGS |= (Val(T_km) || Val(T_MT)) ? TERM_HAS_META : 0;
- EL_FLAGS |= GoodStr(T_ce) ? TERM_CAN_CEOL : 0;
- EL_FLAGS |= (GoodStr(T_dc) || GoodStr(T_DC)) ? TERM_CAN_DELETE : 0;
- EL_FLAGS |= (GoodStr(T_im) || GoodStr(T_ic) || GoodStr(T_IC)) ?
- TERM_CAN_INSERT : 0;
- EL_FLAGS |= (GoodStr(T_up) || GoodStr(T_UP)) ? TERM_CAN_UP : 0;
-
- if (GoodStr(T_me) && GoodStr(T_ue))
- EL_FLAGS |= (strcmp(Str(T_me), Str(T_ue)) == 0) ? TERM_CAN_ME : 0;
- else
- EL_FLAGS &= ~TERM_CAN_ME;
- if (GoodStr(T_me) && GoodStr(T_se))
- EL_FLAGS |= (strcmp(Str(T_me), Str(T_se)) == 0) ? TERM_CAN_ME : 0;
-
-
-#ifdef DEBUG_SCREEN
- if (!EL_CAN_UP) {
- (void) fprintf(el->el_errfile, "WARNING: Your terminal cannot move up.\n");
- (void) fprintf(el->el_errfile, "Editing may be odd for long lines.\n");
- }
- if (!EL_CAN_CEOL)
- (void) fprintf(el->el_errfile, "no clear EOL capability.\n");
- if (!EL_CAN_DELETE)
- (void) fprintf(el->el_errfile, "no delete char capability.\n");
- if (!EL_CAN_INSERT)
- (void) fprintf(el->el_errfile, "no insert char capability.\n");
-#endif /* DEBUG_SCREEN */
-}
-
-
-/* term_init():
- * Initialize the terminal stuff
- */
-protected int
-term_init(el)
- EditLine *el;
-{
- el->el_term.t_buf = (char *) el_malloc(TC_BUFSIZE);
- el->el_term.t_cap = (char *) el_malloc(TC_BUFSIZE);
- el->el_term.t_fkey = (fkey_t *) el_malloc(4 * sizeof(fkey_t));
- (void) memset(el->el_term.t_fkey, 0, 4 * sizeof(fkey_t));
- el->el_term.t_loc = 0;
- el->el_term.t_str = (char **) el_malloc(T_str * sizeof(char*));
- (void) memset(el->el_term.t_str, 0, T_str * sizeof(char*));
- el->el_term.t_val = (int *) el_malloc(T_val * sizeof(int));
- (void) memset(el->el_term.t_val, 0, T_val * sizeof(char*));
- term_outfile = el->el_outfile;
- (void) term_set(el, NULL);
- term_init_arrow(el);
- return 0;
-}
-
-/* term_end():
- * Clean up the terminal stuff
- */
-protected void
-term_end(el)
- EditLine *el;
-{
- el_free((ptr_t) el->el_term.t_buf);
- el->el_term.t_buf = NULL;
- el_free((ptr_t) el->el_term.t_cap);
- el->el_term.t_cap = NULL;
- el->el_term.t_loc = 0;
- el_free((ptr_t) el->el_term.t_str);
- el->el_term.t_str = NULL;
- el_free((ptr_t) el->el_term.t_val);
- el->el_term.t_val = NULL;
- term_free_display(el);
-}
-
-
-/* term_alloc():
- * Maintain a string pool for termcap strings
- */
-private void
-term_alloc(el, t, cap)
- EditLine *el;
- struct termcapstr *t;
- char *cap;
-{
- char termbuf[TC_BUFSIZE];
- int tlen, clen;
- char **tlist = el->el_term.t_str;
- char **tmp, **str = &tlist[t - tstr];
-
- if (cap == NULL || *cap == '\0') {
- *str = NULL;
- return;
- }
- else
- clen = strlen(cap);
-
- tlen = *str == NULL ? 0 : strlen(*str);
-
- /*
- * New string is shorter; no need to allocate space
- */
- if (clen <= tlen) {
- (void)strcpy(*str, cap); /* XXX strcpy is safe */
- return;
- }
-
- /*
- * New string is longer; see if we have enough space to append
- */
- if (el->el_term.t_loc + 3 < TC_BUFSIZE) {
- /* XXX strcpy is safe */
- (void)strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], cap);
- el->el_term.t_loc += clen + 1; /* one for \0 */
- return;
- }
-
- /*
- * Compact our buffer; no need to check compaction, cause we know it
- * fits...
- */
- tlen = 0;
- for (tmp = tlist; tmp < &tlist[T_str]; tmp++)
- if (*tmp != NULL && *tmp != '\0' && *tmp != *str) {
- char *ptr;
-
- for (ptr = *tmp; *ptr != '\0'; termbuf[tlen++] = *ptr++)
- continue;
- termbuf[tlen++] = '\0';
- }
- memcpy(el->el_term.t_buf, termbuf, TC_BUFSIZE);
- el->el_term.t_loc = tlen;
- if (el->el_term.t_loc + 3 >= TC_BUFSIZE) {
- (void) fprintf(el->el_errfile, "Out of termcap string space.\n");
- return;
- }
- /* XXX strcpy is safe */
- (void)strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], cap);
- el->el_term.t_loc += clen + 1; /* one for \0 */
- return;
-} /* end term_alloc */
-
-
-/* term_rebuffer_display():
- * Rebuffer the display after the screen changed size
- */
-private void
-term_rebuffer_display(el)
- EditLine *el;
-{
- coord_t *c = &el->el_term.t_size;
-
- term_free_display(el);
-
- /* make this public, -1 to avoid wraps */
- c->h = Val(T_co) - 1;
- c->v = (EL_BUFSIZ * 4) / c->h + 1;
-
- term_alloc_display(el);
-} /* end term_rebuffer_display */
-
-
-/* term_alloc_display():
- * Allocate a new display.
- */
-private void
-term_alloc_display(el)
- EditLine *el;
-{
- int i;
- char **b;
- coord_t *c = &el->el_term.t_size;
-
- b = (char **) el_malloc((size_t) (sizeof(char *) * (c->v + 1)));
- for (i = 0; i < c->v; i++)
- b[i] = (char *) el_malloc((size_t) (sizeof(char) * (c->h + 1)));
- b[c->v] = NULL;
- el->el_display = b;
-
- b = (char **) el_malloc((size_t) (sizeof(char *) * (c->v + 1)));
- for (i = 0; i < c->v; i++)
- b[i] = (char *) el_malloc((size_t) (sizeof(char) * (c->h + 1)));
- b[c->v] = NULL;
- el->el_vdisplay = b;
-
-} /* end term_alloc_display */
-
-
-/* term_free_display():
- * Free the display buffers
- */
-private void
-term_free_display(el)
- EditLine *el;
-{
- char **b;
- char **bufp;
-
- b = el->el_display;
- el->el_display = NULL;
- if (b != NULL) {
- for (bufp = b; *bufp != NULL; bufp++)
- el_free((ptr_t) *bufp);
- el_free((ptr_t) b);
- }
- b = el->el_vdisplay;
- el->el_vdisplay = NULL;
- if (b != NULL) {
- for (bufp = b; *bufp != NULL; bufp++)
- el_free((ptr_t) * bufp);
- el_free((ptr_t) b);
- }
-} /* end term_free_display */
-
-
-/* term_move_to_line():
- * move to line <where> (first line == 0)
- * as efficiently as possible
- */
-protected void
-term_move_to_line(el, where)
- EditLine *el;
- int where;
-{
- int del, i;
-
- if (where == el->el_cursor.v)
- return;
-
- if (where > el->el_term.t_size.v) {
-#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile,
- "term_move_to_line: where is ridiculous: %d\r\n", where);
-#endif /* DEBUG_SCREEN */
- return;
- }
-
- if ((del = where - el->el_cursor.v) > 0) {
- if ((del > 1) && GoodStr(T_DO))
- (void) tputs(tgoto(Str(T_DO), del, del), del, term__putc);
- else {
- for (i = 0; i < del; i++)
- term__putc('\n');
- el->el_cursor.h = 0; /* because the \n will become \r\n */
- }
- }
- else { /* del < 0 */
- if (GoodStr(T_UP) && (-del > 1 || !GoodStr(T_up)))
- (void) tputs(tgoto(Str(T_UP), -del, -del), -del, term__putc);
- else {
- if (GoodStr(T_up))
- for (i = 0; i < -del; i++)
- (void) tputs(Str(T_up), 1, term__putc);
- }
- }
- el->el_cursor.v = where; /* now where is here */
-} /* end term_move_to_line */
-
-
-/* term_move_to_char():
- * Move to the character position specified
- */
-protected void
-term_move_to_char(el, where)
- EditLine *el;
- int where;
-{
- int del, i;
-
-mc_again:
- if (where == el->el_cursor.h)
- return;
-
- if (where > (el->el_term.t_size.h + 1)) {
-#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile,
- "term_move_to_char: where is riduculous: %d\r\n", where);
-#endif /* DEBUG_SCREEN */
- return;
- }
-
- if (!where) { /* if where is first column */
- term__putc('\r'); /* do a CR */
- el->el_cursor.h = 0;
- return;
- }
-
- del = where - el->el_cursor.h;
-
- if ((del < -4 || del > 4) && GoodStr(T_ch))
- /* go there directly */
- (void) tputs(tgoto(Str(T_ch), where, where), where, term__putc);
- else {
- if (del > 0) { /* moving forward */
- if ((del > 4) && GoodStr(T_RI))
- (void) tputs(tgoto(Str(T_RI), del, del), del, term__putc);
- else {
- if (EL_CAN_TAB) { /* if I can do tabs, use them */
- if ((el->el_cursor.h & 0370) != (where & 0370)) {
- /* if not within tab stop */
- for (i = (el->el_cursor.h & 0370);
- i < (where & 0370); i += 8)
- term__putc('\t'); /* then tab over */
- el->el_cursor.h = where & 0370;
- }
- }
- /* it's usually cheaper to just write the chars, so we do. */
-
- /* NOTE THAT term_overwrite() WILL CHANGE el->el_cursor.h!!! */
- term_overwrite(el,
- &el->el_display[el->el_cursor.v][el->el_cursor.h],
- where - el->el_cursor.h);
-
- }
- }
- else { /* del < 0 := moving backward */
- if ((-del > 4) && GoodStr(T_LE))
- (void) tputs(tgoto(Str(T_LE), -del, -del), -del, term__putc);
- else { /* can't go directly there */
- /* if the "cost" is greater than the "cost" from col 0 */
- if (EL_CAN_TAB ? (-del > ((where >> 3) + (where & 07)))
- : (-del > where)) {
- term__putc('\r'); /* do a CR */
- el->el_cursor.h = 0;
- goto mc_again; /* and try again */
- }
- for (i = 0; i < -del; i++)
- term__putc('\b');
- }
- }
- }
- el->el_cursor.h = where; /* now where is here */
-} /* end term_move_to_char */
-
-
-/* term_overwrite():
- * Overstrike num characters
- */
-protected void
-term_overwrite(el, cp, n)
- EditLine *el;
- char *cp;
- int n;
-{
- if (n <= 0)
- return; /* catch bugs */
-
- if (n > (el->el_term.t_size.h + 1)) {
-#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile, "term_overwrite: n is riduculous: %d\r\n", n);
-#endif /* DEBUG_SCREEN */
- return;
- }
-
- do {
- term__putc(*cp++);
- el->el_cursor.h++;
- } while (--n);
-} /* end term_overwrite */
-
-
-/* term_deletechars():
- * Delete num characters
- */
-protected void
-term_deletechars(el, num)
- EditLine *el;
- int num;
-{
- if (num <= 0)
- return;
-
- if (!EL_CAN_DELETE) {
-#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile, " ERROR: cannot delete \n");
-#endif /* DEBUG_EDIT */
- return;
- }
-
- if (num > el->el_term.t_size.h) {
-#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile,
- "term_deletechars: num is riduculous: %d\r\n", num);
-#endif /* DEBUG_SCREEN */
- return;
- }
-
- if (GoodStr(T_DC)) /* if I have multiple delete */
- if ((num > 1) || !GoodStr(T_dc)) { /* if dc would be more expen. */
- (void) tputs(tgoto(Str(T_DC), num, num), num, term__putc);
- return;
- }
-
- if (GoodStr(T_dm)) /* if I have delete mode */
- (void) tputs(Str(T_dm), 1, term__putc);
-
- if (GoodStr(T_dc)) /* else do one at a time */
- while (num--)
- (void) tputs(Str(T_dc), 1, term__putc);
-
- if (GoodStr(T_ed)) /* if I have delete mode */
- (void) tputs(Str(T_ed), 1, term__putc);
-} /* end term_deletechars */
-
-
-/* term_insertwrite():
- * Puts terminal in insert character mode or inserts num
- * characters in the line
- */
-protected void
-term_insertwrite(el, cp, num)
- EditLine *el;
- char *cp;
- int num;
-{
- if (num <= 0)
- return;
- if (!EL_CAN_INSERT) {
-#ifdef DEBUG_EDIT
- (void) fprintf(el->el_errfile, " ERROR: cannot insert \n");
-#endif /* DEBUG_EDIT */
- return;
- }
-
- if (num > el->el_term.t_size.h) {
-#ifdef DEBUG_SCREEN
- (void) fprintf(el->el_errfile, "StartInsert: num is riduculous: %d\r\n", num);
-#endif /* DEBUG_SCREEN */
- return;
- }
-
- if (GoodStr(T_IC)) /* if I have multiple insert */
- if ((num > 1) || !GoodStr(T_ic)) { /* if ic would be more expen. */
- (void) tputs(tgoto(Str(T_IC), num, num), num, term__putc);
- term_overwrite(el, cp, num); /* this updates el_cursor.h */
- return;
- }
-
- if (GoodStr(T_im) && GoodStr(T_ei)) { /* if I have insert mode */
- (void) tputs(Str(T_im), 1, term__putc);
-
- el->el_cursor.h += num;
- do
- term__putc(*cp++);
- while (--num);
-
- if (GoodStr(T_ip)) /* have to make num chars insert */
- (void) tputs(Str(T_ip), 1, term__putc);
-
- (void) tputs(Str(T_ei), 1, term__putc);
- return;
- }
-
- do {
- if (GoodStr(T_ic)) /* have to make num chars insert */
- (void) tputs(Str(T_ic), 1, term__putc); /* insert a char */
-
- term__putc(*cp++);
-
- el->el_cursor.h++;
-
- if (GoodStr(T_ip)) /* have to make num chars insert */
- (void) tputs(Str(T_ip), 1, term__putc);/* pad the inserted char */
-
- } while (--num);
-} /* end term_insertwrite */
-
-
-/* term_clear_EOL():
- * clear to end of line. There are num characters to clear
- */
-protected void
-term_clear_EOL(el, num)
- EditLine *el;
- int num;
-{
- int i;
-
- if (EL_CAN_CEOL && GoodStr(T_ce))
- (void) tputs(Str(T_ce), 1, term__putc);
- else {
- for (i = 0; i < num; i++)
- term__putc(' ');
- el->el_cursor.h += num; /* have written num spaces */
- }
-} /* end term_clear_EOL */
-
-
-/* term_clear_screen():
- * Clear the screen
- */
-protected void
-term_clear_screen(el)
- EditLine *el;
-{ /* clear the whole screen and home */
- if (GoodStr(T_cl))
- /* send the clear screen code */
- (void) tputs(Str(T_cl), Val(T_li), term__putc);
- else if (GoodStr(T_ho) && GoodStr(T_cd)) {
- (void) tputs(Str(T_ho), Val(T_li), term__putc); /* home */
- /* clear to bottom of screen */
- (void) tputs(Str(T_cd), Val(T_li), term__putc);
- }
- else {
- term__putc('\r');
- term__putc('\n');
- }
-} /* end term_clear_screen */
-
-
-/* term_beep():
- * Beep the way the terminal wants us
- */
-protected void
-term_beep(el)
- EditLine *el;
-{
- if (GoodStr(T_vb))
- (void) tputs(Str(T_vb), 1, term__putc); /* visible bell */
- else if (GoodStr(T_bl))
- /* what termcap says we should use */
- (void) tputs(Str(T_bl), 1, term__putc);
- else
- term__putc('\007'); /* an ASCII bell; ^G */
-} /* end term_beep */
-
-
-#ifdef notdef
-/* term_clear_to_bottom():
- * Clear to the bottom of the screen
- */
-protected void
-term_clear_to_bottom(el)
- EditLine *el;
-{
- if (GoodStr(T_cd))
- (void) tputs(Str(T_cd), Val(T_li), term__putc);
- else if (GoodStr(T_ce))
- (void) tputs(Str(T_ce), Val(T_li), term__putc);
-} /* end term_clear_to_bottom */
-#endif
-
-
-/* term_set():
- * Read in the terminal capabilities from the requested terminal
- */
-protected int
-term_set(el, term)
- EditLine *el;
- char *term;
-{
- int i;
- char buf[TC_BUFSIZE];
- char *area;
- struct termcapstr *t;
- sigset_t oset, nset;
- int lins, cols;
-
- (void) sigemptyset(&nset);
- (void) sigaddset(&nset, SIGWINCH);
- (void) sigprocmask(SIG_BLOCK, &nset, &oset);
-
- area = buf;
-
-
- if (term == NULL)
- term = getenv("TERM");
-
- if (!term || !term[0])
- term = "dumb";
-
- memset(el->el_term.t_cap, 0, TC_BUFSIZE);
-
- i = tgetent(el->el_term.t_cap, term);
-
- if (i <= 0) {
- if (i == -1)
- (void) fprintf(el->el_errfile, "Cannot read termcap database;\n");
- else if (i == 0)
- (void) fprintf(el->el_errfile,
- "No entry for terminal type \"%s\";\n", term);
- (void) fprintf(el->el_errfile, "using dumb terminal settings.\n");
- Val(T_co) = 80; /* do a dumb terminal */
- Val(T_pt) = Val(T_km) = Val(T_li) = 0;
- Val(T_xt) = Val(T_MT);
- for (t = tstr; t->name != NULL; t++)
- term_alloc(el, t, NULL);
- }
- else {
- /* Can we tab */
- Val(T_pt) = tgetflag("pt");
- Val(T_xt) = tgetflag("xt");
- /* do we have a meta? */
- Val(T_km) = tgetflag("km");
- Val(T_MT) = tgetflag("MT");
- /* Get the size */
- Val(T_co) = tgetnum("co");
- Val(T_li) = tgetnum("li");
- for (t = tstr; t->name != NULL; t++)
- term_alloc(el, t, tgetstr(t->name, &area));
- }
-
- if (Val(T_co) < 2)
- Val(T_co) = 80; /* just in case */
- if (Val(T_li) < 1)
- Val(T_li) = 24;
-
- el->el_term.t_size.v = Val(T_co);
- el->el_term.t_size.h = Val(T_li);
-
- term_setflags(el);
-
- (void) term_get_size(el, &lins, &cols);/* get the correct window size */
- term_change_size(el, lins, cols);
- (void) sigprocmask(SIG_SETMASK, &oset, NULL);
- term_bind_arrow(el);
- return i <= 0 ? -1 : 0;
-} /* end term_set */
-
-
-/* term_get_size():
- * Return the new window size in lines and cols, and
- * true if the size was changed.
- */
-protected int
-term_get_size(el, lins, cols)
- EditLine *el;
- int *lins, *cols;
-{
-
- *cols = Val(T_co);
- *lins = Val(T_li);
-
-#ifdef TIOCGWINSZ
- {
- struct winsize ws;
- if (ioctl(el->el_infd, TIOCGWINSZ, (ioctl_t) &ws) != -1) {
- if (ws.ws_col)
- *cols = ws.ws_col;
- if (ws.ws_row)
- *lins = ws.ws_row;
- }
- }
-#endif
-#ifdef TIOCGSIZE
- {
- struct ttysize ts;
- if (ioctl(el->el_infd, TIOCGSIZE, (ioctl_t) &ts) != -1) {
- if (ts.ts_cols)
- *cols = ts.ts_cols;
- if (ts.ts_lines)
- *lins = ts.ts_lines;
- }
- }
-#endif
- return (Val(T_co) != *cols || Val(T_li) != *lins);
-} /* end term_get_size */
-
-
-/* term_change_size():
- * Change the size of the terminal
- */
-protected void
-term_change_size(el, lins, cols)
- EditLine *el;
- int lins, cols;
-{
- /*
- * Just in case
- */
- Val(T_co) = (cols < 2) ? 80 : cols;
- Val(T_li) = (lins < 1) ? 24 : lins;
-
- term_rebuffer_display(el); /* re-make display buffers */
- re_clear_display(el);
-} /* end term_change_size */
-
-
-/* term_init_arrow():
- * Initialize the arrow key bindings from termcap
- */
-private void
-term_init_arrow(el)
- EditLine *el;
-{
- fkey_t *arrow = el->el_term.t_fkey;
-
- arrow[A_K_DN].name = "down";
- arrow[A_K_DN].key = T_kd;
- arrow[A_K_DN].fun.cmd = ED_NEXT_HISTORY;
- arrow[A_K_DN].type = XK_CMD;
-
- arrow[A_K_UP].name = "up";
- arrow[A_K_UP].key = T_ku;
- arrow[A_K_UP].fun.cmd = ED_PREV_HISTORY;
- arrow[A_K_UP].type = XK_CMD;
-
- arrow[A_K_LT].name = "left";
- arrow[A_K_LT].key = T_kl;
- arrow[A_K_LT].fun.cmd = ED_PREV_CHAR;
- arrow[A_K_LT].type = XK_CMD;
-
- arrow[A_K_RT].name = "right";
- arrow[A_K_RT].key = T_kr;
- arrow[A_K_RT].fun.cmd = ED_NEXT_CHAR;
- arrow[A_K_RT].type = XK_CMD;
-
-}
-
-
-/* term_reset_arrow():
- * Reset arrow key bindings
- */
-private void
-term_reset_arrow(el)
- EditLine *el;
-{
- fkey_t *arrow = el->el_term.t_fkey;
- static char strA[] = {033, '[', 'A', '\0'};
- static char strB[] = {033, '[', 'B', '\0'};
- static char strC[] = {033, '[', 'C', '\0'};
- static char strD[] = {033, '[', 'D', '\0'};
- static char stOA[] = {033, 'O', 'A', '\0'};
- static char stOB[] = {033, 'O', 'B', '\0'};
- static char stOC[] = {033, 'O', 'C', '\0'};
- static char stOD[] = {033, 'O', 'D', '\0'};
-
- key_add(el, strA, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
- key_add(el, strB, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
- key_add(el, strC, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
- key_add(el, strD, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
- key_add(el, stOA, &arrow[A_K_UP].fun, arrow[A_K_UP].type);
- key_add(el, stOB, &arrow[A_K_DN].fun, arrow[A_K_DN].type);
- key_add(el, stOC, &arrow[A_K_RT].fun, arrow[A_K_RT].type);
- key_add(el, stOD, &arrow[A_K_LT].fun, arrow[A_K_LT].type);
-
- if (el->el_map.type == MAP_VI) {
- key_add(el, &strA[1], &arrow[A_K_UP].fun, arrow[A_K_UP].type);
- key_add(el, &strB[1], &arrow[A_K_DN].fun, arrow[A_K_DN].type);
- key_add(el, &strC[1], &arrow[A_K_RT].fun, arrow[A_K_RT].type);
- key_add(el, &strD[1], &arrow[A_K_LT].fun, arrow[A_K_LT].type);
- key_add(el, &stOA[1], &arrow[A_K_UP].fun, arrow[A_K_UP].type);
- key_add(el, &stOB[1], &arrow[A_K_DN].fun, arrow[A_K_DN].type);
- key_add(el, &stOC[1], &arrow[A_K_RT].fun, arrow[A_K_RT].type);
- key_add(el, &stOD[1], &arrow[A_K_LT].fun, arrow[A_K_LT].type);
- }
-}
-
-
-/* term_set_arrow():
- * Set an arrow key binding
- */
-protected int
-term_set_arrow(el, name, fun, type)
- EditLine *el;
- char *name;
- key_value_t *fun;
- int type;
-{
- fkey_t *arrow = el->el_term.t_fkey;
- int i;
-
- for (i = 0; i < A_K_NKEYS; i++)
- if (strcmp(name, arrow[i].name) == 0) {
- arrow[i].fun = *fun;
- arrow[i].type = type;
- return 0;
- }
- return -1;
-}
-
-
-/* term_clear_arrow():
- * Clear an arrow key binding
- */
-protected int
-term_clear_arrow(el, name)
- EditLine *el;
- char *name;
-{
- fkey_t *arrow = el->el_term.t_fkey;
- int i;
-
- for (i = 0; i < A_K_NKEYS; i++)
- if (strcmp(name, arrow[i].name) == 0) {
- arrow[i].type = XK_NOD;
- return 0;
- }
- return -1;
-}
-
-
-/* term_print_arrow():
- * Print the arrow key bindings
- */
-protected void
-term_print_arrow(el, name)
- EditLine *el;
- char *name;
-{
- int i;
- fkey_t *arrow = el->el_term.t_fkey;
-
- for (i = 0; i < A_K_NKEYS; i++)
- if (*name == '\0' || strcmp(name, arrow[i].name) == 0)
- if (arrow[i].type != XK_NOD)
- key_kprint(el, arrow[i].name, &arrow[i].fun, arrow[i].type);
-}
-
-
-/* term_bind_arrow():
- * Bind the arrow keys
- */
-protected void
-term_bind_arrow(el)
- EditLine *el;
-{
- el_action_t *map, *dmap;
- int i, j;
- char *p;
- fkey_t *arrow = el->el_term.t_fkey;
-
- /* Check if the components needed are initialized */
- if (el->el_term.t_buf == NULL || el->el_map.key == NULL)
- return;
-
- map = el->el_map.type == MAP_VI ? el->el_map.alt : el->el_map.key;
- dmap = el->el_map.type == MAP_VI ? el->el_map.vic : el->el_map.emacs;
-
- term_reset_arrow(el);
-
- for (i = 0; i < 4; i++) {
- p = el->el_term.t_str[arrow[i].key];
- if (p && *p) {
- j = (unsigned char) *p;
- /*
- * Assign the arrow keys only if:
- *
- * 1. They are multi-character arrow keys and the user
- * has not re-assigned the leading character, or
- * has re-assigned the leading character to be
- * ED_SEQUENCE_LEAD_IN
- * 2. They are single arrow keys pointing to an unassigned key.
- */
- if (arrow[i].type == XK_NOD)
- key_clear(el, map, p);
- else {
- if (p[1] && (dmap[j] == map[j] ||
- map[j] == ED_SEQUENCE_LEAD_IN)) {
- key_add(el, p, &arrow[i].fun, arrow[i].type);
- map[j] = ED_SEQUENCE_LEAD_IN;
- }
- else if (map[j] == ED_UNASSIGNED) {
- key_clear(el, map, p);
- if (arrow[i].type == XK_CMD)
- map[j] = arrow[i].fun.cmd;
- else
- key_add(el, p, &arrow[i].fun, arrow[i].type);
- }
- }
- }
- }
-}
-
-
-/* term__putc():
- * Add a character
- */
-protected int
-term__putc(c)
- int c;
-{
- return fputc(c, term_outfile);
-} /* end term__putc */
-
-
-/* term__flush():
- * Flush output
- */
-protected void
-term__flush()
-{
- (void) fflush(term_outfile);
-} /* end term__flush */
-
-
-/* term_telltc():
- * Print the current termcap characteristics
- */
-protected int
-/*ARGSUSED*/
-term_telltc(el, argc, argv)
- EditLine *el;
- int argc;
- char **argv;
-{
- struct termcapstr *t;
- char **ts;
- char upbuf[EL_BUFSIZ];
-
- (void) fprintf(el->el_outfile, "\n\tYour terminal has the\n");
- (void) fprintf(el->el_outfile, "\tfollowing characteristics:\n\n");
- (void) fprintf(el->el_outfile, "\tIt has %d columns and %d lines\n",
- Val(T_co), Val(T_li));
- (void) fprintf(el->el_outfile,
- "\tIt has %s meta key\n", EL_HAS_META ? "a" : "no");
- (void) fprintf(el->el_outfile,
- "\tIt can%suse tabs\n", EL_CAN_TAB ? " " : "not ");
-#ifdef notyet
- (void) fprintf(el->el_outfile, "\tIt %s automatic margins\n",
- (T_Margin&MARGIN_AUTO)? "has": "does not have");
- if (T_Margin & MARGIN_AUTO)
- (void) fprintf(el->el_outfile, "\tIt %s magic margins\n",
- (T_Margin&MARGIN_MAGIC)?"has":"does not have");
-#endif
-
- for (t = tstr, ts = el->el_term.t_str; t->name != NULL; t++, ts++)
- (void) fprintf(el->el_outfile, "\t%25s (%s) == %s\n", t->long_name,
- t->name, *ts && **ts ?
- key__decode_str(*ts, upbuf, "") : "(empty)");
- (void) fputc('\n', el->el_outfile);
- return 0;
-}
-
-
-/* term_settc():
- * Change the current terminal characteristics
- */
-protected int
-/*ARGSUSED*/
-term_settc(el, argc, argv)
- EditLine *el;
- int argc;
- char **argv;
-{
- struct termcapstr *ts;
- struct termcapval *tv;
- char *what, *how;
-
- if (argv == NULL || argv[1] == NULL || argv[2] == NULL)
- return -1;
-
- what = argv[1];
- how = argv[2];
-
- /*
- * Do the strings first
- */
- for (ts = tstr; ts->name != NULL; ts++)
- if (strcmp(ts->name, what) == 0)
- break;
-
- if (ts->name != NULL) {
- term_alloc(el, ts, how);
- term_setflags(el);
- return 0;
- }
-
- /*
- * Do the numeric ones second
- */
- for (tv = tval; tv->name != NULL; tv++)
- if (strcmp(tv->name, what) == 0)
- break;
-
- if (tv->name != NULL) {
- if (tv == &tval[T_pt] || tv == &tval[T_km]
-#ifdef notyet
- || tv == &tval[T_am] || tv == &tval[T_xn]
-#endif
- ) {
- if (strcmp(how, "yes") == 0)
- el->el_term.t_val[tv - tval] = 1;
- else if (strcmp(how, "no") == 0)
- el->el_term.t_val[tv - tval] = 0;
- else {
- (void) fprintf(el->el_errfile, "settc: Bad value `%s'.\n", how);
- return -1;
- }
- term_setflags(el);
- term_change_size(el, Val(T_li), Val(T_co));
- return 0;
- }
- else {
- el->el_term.t_val[tv - tval] = atoi(how);
- el->el_term.t_size.v = Val(T_co);
- el->el_term.t_size.h = Val(T_li);
- if (tv == &tval[T_co] || tv == &tval[T_li])
- term_change_size(el, Val(T_li), Val(T_co));
- return 0;
- }
- }
- return -1;
-}
-
-
-/* term_echotc():
- * Print the termcap string out with variable substitution
- */
-protected int
-/*ARGSUSED*/
-term_echotc(el, argc, argv)
- EditLine *el;
- int argc;
- char **argv;
-{
- char *cap, *scap;
- int arg_need, arg_cols, arg_rows;
- int verbose = 0, silent = 0;
- char *area;
- static char *fmts = "%s\n", *fmtd = "%d\n";
- struct termcapstr *t;
- char buf[TC_BUFSIZE];
-
- area = buf;
-
- if (argv == NULL || argv[1] == NULL)
- return -1;
- argv++;
-
- if (argv[0][0] == '-') {
- switch (argv[0][1]) {
- case 'v':
- verbose = 1;
- break;
- case 's':
- silent = 1;
- break;
- default:
- /* stderror(ERR_NAME | ERR_TCUSAGE); */
- break;
- }
- argv++;
- }
- if (!*argv || *argv[0] == '\0')
- return 0;
- if (strcmp(*argv, "tabs") == 0) {
- (void) fprintf(el->el_outfile, fmts, EL_CAN_TAB ? "yes" : "no");
- return 0;
- }
- else if (strcmp(*argv, "meta") == 0) {
- (void) fprintf(el->el_outfile, fmts, Val(T_km) ? "yes" : "no");
- return 0;
- }
-#ifdef notyet
- else if (strcmp(*argv, "xn") == 0) {
- (void) fprintf(el->el_outfile, fmts, T_Margin & MARGIN_MAGIC ?
- "yes" : "no");
- return 0;
- }
- else if (strcmp(*argv, "am") == 0) {
- (void) fprintf(el->el_outfile, fmts, T_Margin & MARGIN_AUTO ?
- "yes" : "no");
- return 0;
- }
-#endif
- else if (strcmp(*argv, "baud") == 0) {
- (void) fprintf(el->el_outfile, "%ld\n", el->el_tty.t_speed);
- return 0;
- }
- else if (strcmp(*argv, "rows") == 0 || strcmp(*argv, "lines") == 0) {
- (void) fprintf(el->el_outfile, fmtd, Val(T_li));
- return 0;
- }
- else if (strcmp(*argv, "cols") == 0) {
- (void) fprintf(el->el_outfile, fmtd, Val(T_co));
- return 0;
- }
-
- /*
- * Try to use our local definition first
- */
- scap = NULL;
- for (t = tstr; t->name != NULL; t++)
- if (strcmp(t->name, *argv) == 0) {
- scap = el->el_term.t_str[t - tstr];
- break;
- }
- if (t->name == NULL)
- scap = tgetstr(*argv, &area);
- if (!scap || scap[0] == '\0') {
- if (!silent)
- (void) fprintf(el->el_errfile,
- "echotc: Termcap parameter `%s' not found.\n", *argv);
- return -1;
- }
-
- /*
- * Count home many values we need for this capability.
- */
- for (cap = scap, arg_need = 0; *cap; cap++)
- if (*cap == '%')
- switch (*++cap) {
- case 'd':
- case '2':
- case '3':
- case '.':
- case '+':
- arg_need++;
- break;
- case '%':
- case '>':
- case 'i':
- case 'r':
- case 'n':
- case 'B':
- case 'D':
- break;
- default:
- /*
- * hpux has lot's of them...
- */
- if (verbose)
- (void) fprintf(el->el_errfile,
- "echotc: Warning: unknown termcap %% `%c'.\n", *cap);
- /* This is bad, but I won't complain */
- break;
- }
-
- switch (arg_need) {
- case 0:
- argv++;
- if (*argv && *argv[0]) {
- if (!silent)
- (void) fprintf(el->el_errfile,
- "echotc: Warning: Extra argument `%s'.\n", *argv);
- return -1;
- }
- (void) tputs(scap, 1, term__putc);
- break;
- case 1:
- argv++;
- if (!*argv || *argv[0] == '\0') {
- if (!silent)
- (void) fprintf(el->el_errfile,
- "echotc: Warning: Missing argument.\n");
- return -1;
- }
- arg_cols = 0;
- arg_rows = atoi(*argv);
- argv++;
- if (*argv && *argv[0]) {
- if (!silent)
- (void) fprintf(el->el_errfile,
- "echotc: Warning: Extra argument `%s'.\n", *argv);
- return -1;
- }
- (void) tputs(tgoto(scap, arg_cols, arg_rows), 1, term__putc);
- break;
- default:
- /* This is wrong, but I will ignore it... */
- if (verbose)
- (void) fprintf(el->el_errfile,
- "echotc: Warning: Too many required arguments (%d).\n",
- arg_need);
- /*FALLTHROUGH*/
- case 2:
- argv++;
- if (!*argv || *argv[0] == '\0') {
- if (!silent)
- (void) fprintf(el->el_errfile,
- "echotc: Warning: Missing argument.\n");
- return -1;
- }
- arg_cols = atoi(*argv);
- argv++;
- if (!*argv || *argv[0] == '\0') {
- if (!silent)
- (void) fprintf(el->el_errfile,
- "echotc: Warning: Missing argument.\n");
- return -1;
- }
- arg_rows = atoi(*argv);
- argv++;
- if (*argv && *argv[0]) {
- if (!silent)
- (void) fprintf(el->el_errfile,
- "echotc: Warning: Extra argument `%s'.\n", *argv);
- return -1;
- }
- (void) tputs(tgoto(scap, arg_cols, arg_rows), arg_rows, term__putc);
- break;
- }
- return 0;
-}
diff --git a/lib/libedit/term.h b/lib/libedit/term.h
deleted file mode 100644
index f9de221..0000000
--- a/lib/libedit/term.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)term.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.term.h: Termcap header
- */
-#ifndef _h_el_term
-#define _h_el_term
-
-#include "histedit.h"
-
-typedef struct { /* Symbolic function key bindings */
- char *name; /* name of the key */
- int key; /* Index in termcap table */
- key_value_t fun; /* Function bound to it */
- int type; /* Type of function */
-} fkey_t;
-
-typedef struct {
- coord_t t_size; /* # lines and cols */
- bool_t t_flags;
-#define TERM_CAN_INSERT 0x01 /* Has insert cap */
-#define TERM_CAN_DELETE 0x02 /* Has delete cap */
-#define TERM_CAN_CEOL 0x04 /* Has CEOL cap */
-#define TERM_CAN_TAB 0x08 /* Can use tabs */
-#define TERM_CAN_ME 0x10 /* Can turn all attrs. */
-#define TERM_CAN_UP 0x20 /* Can move up */
-#define TERM_HAS_META 0x40 /* Has a meta key */
- char *t_buf; /* Termcap buffer */
- int t_loc; /* location used */
- char **t_str; /* termcap strings */
- int *t_val; /* termcap values */
- char *t_cap; /* Termcap buffer */
- fkey_t *t_fkey; /* Array of keys */
-} el_term_t;
-
-/*
- * fKey indexes
- */
-#define A_K_DN 0
-#define A_K_UP 1
-#define A_K_LT 2
-#define A_K_RT 3
-#define A_K_NKEYS 4
-
-protected void term_move_to_line __P((EditLine *, int));
-protected void term_move_to_char __P((EditLine *, int));
-protected void term_clear_EOL __P((EditLine *, int));
-protected void term_overwrite __P((EditLine *, char *, int));
-protected void term_insertwrite __P((EditLine *, char *, int));
-protected void term_deletechars __P((EditLine *, int));
-protected void term_clear_screen __P((EditLine *));
-protected void term_beep __P((EditLine *));
-protected void term_change_size __P((EditLine *, int, int));
-protected int term_get_size __P((EditLine *, int *, int *));
-protected int term_init __P((EditLine *));
-protected void term_bind_arrow __P((EditLine *));
-protected void term_print_arrow __P((EditLine *, char *));
-protected int term_clear_arrow __P((EditLine *, char *));
-protected int term_set_arrow __P((EditLine *, char *,
- key_value_t *, int));
-protected void term_end __P((EditLine *));
-protected int term_set __P((EditLine *, char *));
-protected int term_settc __P((EditLine *, int, char **));
-protected int term_telltc __P((EditLine *, int, char **));
-protected int term_echotc __P((EditLine *, int, char **));
-
-protected int term__putc __P((int));
-protected void term__flush __P((void));
-
-/*
- * Easy access macros
- */
-#define EL_FLAGS (el)->el_term.t_flags
-
-#define EL_CAN_INSERT (EL_FLAGS & TERM_CAN_INSERT)
-#define EL_CAN_DELETE (EL_FLAGS & TERM_CAN_DELETE)
-#define EL_CAN_CEOL (EL_FLAGS & TERM_CAN_CEOL)
-#define EL_CAN_TAB (EL_FLAGS & TERM_CAN_TAB)
-#define EL_CAN_ME (EL_FLAGS & TERM_CAN_ME)
-#define EL_HAS_META (EL_FLAGS & TERM_HAS_META)
-
-#endif /* _h_el_term */
diff --git a/lib/libedit/tokenizer.c b/lib/libedit/tokenizer.c
deleted file mode 100644
index bbe847e..0000000
--- a/lib/libedit/tokenizer.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)tokenizer.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * tokenize.c: Bourne shell like tokenizer
- */
-#include "sys.h"
-#include <string.h>
-#include <stdlib.h>
-#include "tokenizer.h"
-
-typedef enum { Q_none, Q_single, Q_double, Q_one, Q_doubleone } quote_t;
-
-#define IFS "\t \n"
-
-#define TOK_KEEP 1
-#define TOK_EAT 2
-
-#define WINCR 20
-#define AINCR 10
-
-#define tok_malloc(a) malloc(a)
-#define tok_free(a) free(a)
-#define tok_realloc(a, b) realloc(a, b)
-
-
-struct tokenizer {
- char *ifs; /* In field separator */
- int argc, amax; /* Current and maximum number of args */
- char **argv; /* Argument list */
- char *wptr, *wmax; /* Space and limit on the word buffer */
- char *wstart; /* Beginning of next word */
- char *wspace; /* Space of word buffer */
- quote_t quote; /* Quoting state */
- int flags; /* flags; */
-};
-
-
-private void tok_finish __P((Tokenizer *));
-
-
-/* tok_finish():
- * Finish a word in the tokenizer.
- */
-private void
-tok_finish(tok)
- Tokenizer *tok;
-{
- *tok->wptr = '\0';
- if ((tok->flags & TOK_KEEP) || tok->wptr != tok->wstart) {
- tok->argv[tok->argc++] = tok->wstart;
- tok->argv[tok->argc] = NULL;
- tok->wstart = ++tok->wptr;
- }
- tok->flags &= ~TOK_KEEP;
-}
-
-
-/* tok_init():
- * Initialize the tokenizer
- */
-public Tokenizer *
-tok_init(ifs)
- const char *ifs;
-{
- Tokenizer* tok = (Tokenizer*) tok_malloc(sizeof(Tokenizer));
-
- tok->ifs = strdup(ifs ? ifs : IFS);
- tok->argc = 0;
- tok->amax = AINCR;
- tok->argv = (char **) tok_malloc(sizeof(char *) * tok->amax);
- tok->argv[0] = NULL;
- tok->wspace = (char *) tok_malloc(WINCR);
- tok->wmax = tok->wspace + WINCR;
- tok->wstart = tok->wspace;
- tok->wptr = tok->wspace;
- tok->flags = 0;
- tok->quote = Q_none;
-
- return tok;
-}
-
-
-/* tok_reset():
- * Reset the tokenizer
- */
-public void
-tok_reset(tok)
- Tokenizer *tok;
-{
- tok->argc = 0;
- tok->wstart = tok->wspace;
- tok->wptr = tok->wspace;
- tok->flags = 0;
- tok->quote = Q_none;
-}
-
-
-/* tok_end():
- * Clean up
- */
-public void
-tok_end(tok)
- Tokenizer *tok;
-{
- tok_free((ptr_t) tok->ifs);
- tok_free((ptr_t) tok->wspace);
- tok_free((ptr_t) tok->argv);
- tok_free((ptr_t) tok);
-}
-
-
-
-/* tok_line():
- * Bourne shell like tokenizing
- * Return:
- * -1: Internal error
- * 3: Quoted return
- * 2: Unmatched double quote
- * 1: Unmatched single quote
- * 0: Ok
- */
-public int
-tok_line(tok, line, argc, argv)
- Tokenizer *tok;
- const char* line;
- int *argc;
- char ***argv;
-{
- const char *ptr;
-
- while (1) {
- switch (*(ptr = line++)) {
- case '\'':
- tok->flags |= TOK_KEEP;
- tok->flags &= ~TOK_EAT;
- switch (tok->quote) {
- case Q_none:
- tok->quote = Q_single; /* Enter single quote mode */
- break;
-
- case Q_single: /* Exit single quote mode */
- tok->quote = Q_none;
- break;
-
- case Q_one: /* Quote this ' */
- tok->quote = Q_none;
- *tok->wptr++ = *ptr;
- break;
-
- case Q_double: /* Stay in double quote mode */
- *tok->wptr++ = *ptr;
- break;
-
- case Q_doubleone: /* Quote this ' */
- tok->quote = Q_double;
- *tok->wptr++ = *ptr;
- break;
-
- default:
- return(-1);
- }
- break;
-
- case '"':
- tok->flags &= ~TOK_EAT;
- tok->flags |= TOK_KEEP;
- switch (tok->quote) {
- case Q_none: /* Enter double quote mode */
- tok->quote = Q_double;
- break;
-
- case Q_double:
- tok->quote = Q_none; /* Exit double quote mode */
- break;
-
- case Q_one: /* Quote this " */
- tok->quote = Q_none;
- *tok->wptr++ = *ptr;
- break;
-
- case Q_single: /* Stay in single quote mode */
- *tok->wptr++ = *ptr;
- break;
-
- case Q_doubleone: /* Quote this " */
- tok->quote = Q_double;
- *tok->wptr++ = *ptr;
- break;
-
- default:
- return(-1);
- }
- break;
-
- case '\\':
- tok->flags |= TOK_KEEP;
- tok->flags &= ~TOK_EAT;
- switch (tok->quote) {
- case Q_none: /* Quote next character */
- tok->quote = Q_one;
- break;
-
- case Q_double:
- tok->quote = Q_doubleone;/* Quote next character */
- break;
-
- case Q_one:
- *tok->wptr++ = *ptr;
- tok->quote = Q_none; /* Quote this, restore state */
- break;
-
- case Q_single: /* Stay in single quote mode */
- *tok->wptr++ = *ptr;
- break;
-
- case Q_doubleone: /* Quote this \ */
- tok->quote = Q_double;
- *tok->wptr++ = *ptr;
- break;
-
- default:
- return(-1);
- }
- break;
-
- case '\n':
- tok->flags &= ~TOK_EAT;
- switch (tok->quote) {
- case Q_none:
- tok_finish(tok);
- *argv = tok->argv;
- *argc = tok->argc;
- return(0);
-
- case Q_single:
- case Q_double:
- *tok->wptr++ = *ptr; /* Add the return */
- break;
-
- case Q_doubleone:
- tok->flags |= TOK_EAT;
- tok->quote = Q_double; /* Back to double, eat the '\n' */
- break;
-
- case Q_one:
- tok->flags |= TOK_EAT;
- tok->quote = Q_none; /* No quote, more eat the '\n' */
- break;
-
- default:
- return(0);
- }
- break;
-
- case '\0':
- switch (tok->quote) {
- case Q_none:
- /* Finish word and return */
- if (tok->flags & TOK_EAT) {
- tok->flags &= ~TOK_EAT;
- return 3;
- }
- tok_finish(tok);
- *argv = tok->argv;
- *argc = tok->argc;
- return(0);
-
- case Q_single:
- return(1);
-
- case Q_double:
- return(2);
-
- case Q_doubleone:
- tok->quote = Q_double;
- *tok->wptr++ = *ptr;
- break;
-
- case Q_one:
- tok->quote = Q_none;
- *tok->wptr++ = *ptr;
- break;
-
- default:
- return(-1);
- }
- break;
-
- default:
- tok->flags &= ~TOK_EAT;
- switch (tok->quote) {
- case Q_none:
- if (strchr(tok->ifs, *ptr) != NULL)
- tok_finish(tok);
- else
- *tok->wptr++ = *ptr;
- break;
-
- case Q_single:
- case Q_double:
- *tok->wptr++ = *ptr;
- break;
-
-
- case Q_doubleone:
- *tok->wptr++ = '\\';
- tok->quote = Q_double;
- *tok->wptr++ = *ptr;
- break;
-
- case Q_one:
- tok->quote = Q_none;
- *tok->wptr++ = *ptr;
- break;
-
- default:
- return(-1);
-
- }
- break;
- }
-
- if (tok->wptr >= tok->wmax - 4) {
- size_t size = tok->wmax - tok->wspace + WINCR;
- char *s = (char *) tok_realloc(tok->wspace, size);
- /*SUPPRESS 22*/
- int offs = s - tok->wspace;
-
- if (offs != 0) {
- int i;
- for (i = 0; i < tok->argc; i++)
- tok->argv[i] = tok->argv[i] + offs;
- tok->wptr = tok->wptr + offs;
- tok->wstart = tok->wstart + offs;
- tok->wmax = s + size;
- tok->wspace = s;
- }
- }
-
- if (tok->argc >= tok->amax - 4) {
- tok->amax += AINCR;
- tok->argv = (char **) tok_realloc(tok->argv,
- tok->amax * sizeof(char*));
- }
-
- }
-}
diff --git a/lib/libedit/tokenizer.h b/lib/libedit/tokenizer.h
deleted file mode 100644
index 86911e1..0000000
--- a/lib/libedit/tokenizer.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tokenizer.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * tokenizer.h: Header file for tokenizer routines
- */
-#ifndef _h_tokenizer
-#define _h_tokenizer
-
-typedef struct tokenizer Tokenizer;
-
-Tokenizer *tok_init __P((const char *));
-void tok_reset __P((Tokenizer *));
-void tok_end __P((Tokenizer *));
-int tok_line __P((Tokenizer *, const char *,
- int *, char ***));
-
-#endif /* _h_tokenizer */
diff --git a/lib/libedit/tty.c b/lib/libedit/tty.c
deleted file mode 100644
index 961e340..0000000
--- a/lib/libedit/tty.c
+++ /dev/null
@@ -1,1144 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * tty.c: tty interface stuff
- */
-#include "sys.h"
-#include "tty.h"
-#include "el.h"
-
-typedef struct ttymodes_t {
- char *m_name;
- u_int m_value;
- int m_type;
-} ttymodes_t;
-
-typedef struct ttymap_t {
- int nch, och; /* Internal and termio rep of chars */
- el_action_t bind[3]; /* emacs, vi, and vi-cmd */
-} ttymap_t;
-
-
-private ttyperm_t ttyperm = {
- {
- { "iflag:", ICRNL, (INLCR|IGNCR) },
- { "oflag:", (OPOST|ONLCR), ONLRET },
- { "cflag:", 0, 0 },
- { "lflag:", (ISIG|ICANON|ECHO|ECHOE|ECHOCTL|IEXTEN),
- (NOFLSH|ECHONL|EXTPROC|FLUSHO) },
- { "chars:", 0, 0 },
- },
- {
- { "iflag:", (INLCR|ICRNL), IGNCR },
- { "oflag:", (OPOST|ONLCR), ONLRET },
- { "cflag:", 0, 0 },
- { "lflag:", ISIG,
- (NOFLSH|ICANON|ECHO|ECHOK|ECHONL|EXTPROC|IEXTEN|FLUSHO) },
- { "chars:", (C_SH(C_MIN)|C_SH(C_TIME)|C_SH(C_SWTCH)|C_SH(C_DSWTCH)|
- C_SH(C_SUSP)|C_SH(C_DSUSP)|C_SH(C_EOL)|C_SH(C_DISCARD)|
- C_SH(C_PGOFF)|C_SH(C_PAGE)|C_SH(C_STATUS)), 0 }
- },
- {
- { "iflag:", 0, IXON | IXOFF },
- { "oflag:", 0, 0 },
- { "cflag:", 0, 0 },
- { "lflag:", 0, ISIG | IEXTEN },
- { "chars:", 0, 0 },
- }
-};
-
-private ttychar_t ttychar = {
- {
- CINTR, CQUIT, CERASE, CKILL,
- CEOF, CEOL, CEOL2, CSWTCH,
- CDSWTCH, CERASE2, CSTART, CSTOP,
- CWERASE, CSUSP, CDSUSP, CREPRINT,
- CDISCARD, CLNEXT, CSTATUS, CPAGE,
- CPGOFF, CKILL2, CBRK, CMIN,
- CTIME
- },
- {
- CINTR, CQUIT, CERASE, CKILL,
- _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE,
- _POSIX_VDISABLE, CERASE2, CSTART, CSTOP,
- _POSIX_VDISABLE, CSUSP, _POSIX_VDISABLE, _POSIX_VDISABLE,
- CDISCARD, _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE,
- _POSIX_VDISABLE, _POSIX_VDISABLE, _POSIX_VDISABLE, 1,
- 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
- }
-};
-
-private ttymap_t tty_map[] = {
-#ifdef VERASE
- { C_ERASE, VERASE,
- { ED_DELETE_PREV_CHAR, VI_DELETE_PREV_CHAR, ED_PREV_CHAR } },
-#endif /* VERASE */
-#ifdef VERASE2
- { C_ERASE2, VERASE2,
- { ED_DELETE_PREV_CHAR, VI_DELETE_PREV_CHAR, ED_PREV_CHAR } },
-#endif /* VERASE2 */
-#ifdef VKILL
- { C_KILL, VKILL,
- { EM_KILL_LINE, VI_KILL_LINE_PREV, ED_UNASSIGNED } },
-#endif /* VKILL */
-#ifdef VKILL2
- { C_KILL2, VKILL2,
- { EM_KILL_LINE, VI_KILL_LINE_PREV, ED_UNASSIGNED } },
-#endif /* VKILL2 */
-#ifdef VEOF
- { C_EOF, VEOF,
- { EM_DELETE_OR_LIST, VI_LIST_OR_EOF, ED_UNASSIGNED } },
-#endif /* VEOF */
-#ifdef VWERASE
- { C_WERASE, VWERASE,
- { ED_DELETE_PREV_WORD, ED_DELETE_PREV_WORD, ED_PREV_WORD } },
-#endif /* VWERASE */
-#ifdef VREPRINT
- { C_REPRINT, VREPRINT,
- { ED_REDISPLAY, ED_INSERT, ED_REDISPLAY } },
-#endif /* VREPRINT */
-#ifdef VLNEXT
- { C_LNEXT, VLNEXT,
- { ED_QUOTED_INSERT, ED_QUOTED_INSERT, ED_UNASSIGNED } },
-#endif /* VLNEXT */
- { -1, -1,
- { ED_UNASSIGNED, ED_UNASSIGNED, ED_UNASSIGNED } }
- };
-
-private ttymodes_t ttymodes[] = {
-# ifdef IGNBRK
- { "ignbrk", IGNBRK, M_INP },
-# endif /* IGNBRK */
-# ifdef BRKINT
- { "brkint", BRKINT, M_INP },
-# endif /* BRKINT */
-# ifdef IGNPAR
- { "ignpar", IGNPAR, M_INP },
-# endif /* IGNPAR */
-# ifdef PARMRK
- { "parmrk", PARMRK, M_INP },
-# endif /* PARMRK */
-# ifdef INPCK
- { "inpck", INPCK, M_INP },
-# endif /* INPCK */
-# ifdef ISTRIP
- { "istrip", ISTRIP, M_INP },
-# endif /* ISTRIP */
-# ifdef INLCR
- { "inlcr", INLCR, M_INP },
-# endif /* INLCR */
-# ifdef IGNCR
- { "igncr", IGNCR, M_INP },
-# endif /* IGNCR */
-# ifdef ICRNL
- { "icrnl", ICRNL, M_INP },
-# endif /* ICRNL */
-# ifdef IUCLC
- { "iuclc", IUCLC, M_INP },
-# endif /* IUCLC */
-# ifdef IXON
- { "ixon", IXON, M_INP },
-# endif /* IXON */
-# ifdef IXANY
- { "ixany", IXANY, M_INP },
-# endif /* IXANY */
-# ifdef IXOFF
- { "ixoff", IXOFF, M_INP },
-# endif /* IXOFF */
-# ifdef IMAXBEL
- { "imaxbel",IMAXBEL,M_INP },
-# endif /* IMAXBEL */
-
-# ifdef OPOST
- { "opost", OPOST, M_OUT },
-# endif /* OPOST */
-# ifdef OLCUC
- { "olcuc", OLCUC, M_OUT },
-# endif /* OLCUC */
-# ifdef ONLCR
- { "onlcr", ONLCR, M_OUT },
-# endif /* ONLCR */
-# ifdef OCRNL
- { "ocrnl", OCRNL, M_OUT },
-# endif /* OCRNL */
-# ifdef ONOCR
- { "onocr", ONOCR, M_OUT },
-# endif /* ONOCR */
-# ifdef ONOEOT
- { "onoeot", ONOEOT, M_OUT },
-# endif /* ONOEOT */
-# ifdef ONLRET
- { "onlret", ONLRET, M_OUT },
-# endif /* ONLRET */
-# ifdef OFILL
- { "ofill", OFILL, M_OUT },
-# endif /* OFILL */
-# ifdef OFDEL
- { "ofdel", OFDEL, M_OUT },
-# endif /* OFDEL */
-# ifdef NLDLY
- { "nldly", NLDLY, M_OUT },
-# endif /* NLDLY */
-# ifdef CRDLY
- { "crdly", CRDLY, M_OUT },
-# endif /* CRDLY */
-# ifdef TABDLY
- { "tabdly", TABDLY, M_OUT },
-# endif /* TABDLY */
-# ifdef XTABS
- { "xtabs", XTABS, M_OUT },
-# endif /* XTABS */
-# ifdef BSDLY
- { "bsdly", BSDLY, M_OUT },
-# endif /* BSDLY */
-# ifdef VTDLY
- { "vtdly", VTDLY, M_OUT },
-# endif /* VTDLY */
-# ifdef FFDLY
- { "ffdly", FFDLY, M_OUT },
-# endif /* FFDLY */
-# ifdef PAGEOUT
- { "pageout",PAGEOUT,M_OUT },
-# endif /* PAGEOUT */
-# ifdef WRAP
- { "wrap", WRAP, M_OUT },
-# endif /* WRAP */
-
-# ifdef CIGNORE
- { "cignore",CIGNORE,M_CTL },
-# endif /* CBAUD */
-# ifdef CBAUD
- { "cbaud", CBAUD, M_CTL },
-# endif /* CBAUD */
-# ifdef CSTOPB
- { "cstopb", CSTOPB, M_CTL },
-# endif /* CSTOPB */
-# ifdef CREAD
- { "cread", CREAD, M_CTL },
-# endif /* CREAD */
-# ifdef PARENB
- { "parenb", PARENB, M_CTL },
-# endif /* PARENB */
-# ifdef PARODD
- { "parodd", PARODD, M_CTL },
-# endif /* PARODD */
-# ifdef HUPCL
- { "hupcl", HUPCL, M_CTL },
-# endif /* HUPCL */
-# ifdef CLOCAL
- { "clocal", CLOCAL, M_CTL },
-# endif /* CLOCAL */
-# ifdef LOBLK
- { "loblk", LOBLK, M_CTL },
-# endif /* LOBLK */
-# ifdef CIBAUD
- { "cibaud", CIBAUD, M_CTL },
-# endif /* CIBAUD */
-# ifdef CRTSCTS
-# ifdef CCTS_OFLOW
- { "ccts_oflow",CCTS_OFLOW,M_CTL },
-# else
- { "crtscts",CRTSCTS,M_CTL },
-# endif /* CCTS_OFLOW */
-# endif /* CRTSCTS */
-# ifdef CRTS_IFLOW
- { "crts_iflow",CRTS_IFLOW,M_CTL },
-# endif /* CRTS_IFLOW */
-# ifdef MDMBUF
- { "mdmbuf", MDMBUF, M_CTL },
-# endif /* MDMBUF */
-# ifdef RCV1EN
- { "rcv1en", RCV1EN, M_CTL },
-# endif /* RCV1EN */
-# ifdef XMT1EN
- { "xmt1en", XMT1EN, M_CTL },
-# endif /* XMT1EN */
-
-# ifdef ISIG
- { "isig", ISIG, M_LIN },
-# endif /* ISIG */
-# ifdef ICANON
- { "icanon", ICANON, M_LIN },
-# endif /* ICANON */
-# ifdef XCASE
- { "xcase", XCASE, M_LIN },
-# endif /* XCASE */
-# ifdef ECHO
- { "echo", ECHO, M_LIN },
-# endif /* ECHO */
-# ifdef ECHOE
- { "echoe", ECHOE, M_LIN },
-# endif /* ECHOE */
-# ifdef ECHOK
- { "echok", ECHOK, M_LIN },
-# endif /* ECHOK */
-# ifdef ECHONL
- { "echonl", ECHONL, M_LIN },
-# endif /* ECHONL */
-# ifdef NOFLSH
- { "noflsh", NOFLSH, M_LIN },
-# endif /* NOFLSH */
-# ifdef TOSTOP
- { "tostop", TOSTOP, M_LIN },
-# endif /* TOSTOP */
-# ifdef ECHOCTL
- { "echoctl",ECHOCTL,M_LIN },
-# endif /* ECHOCTL */
-# ifdef ECHOPRT
- { "echoprt",ECHOPRT,M_LIN },
-# endif /* ECHOPRT */
-# ifdef ECHOKE
- { "echoke", ECHOKE, M_LIN },
-# endif /* ECHOKE */
-# ifdef DEFECHO
- { "defecho",DEFECHO,M_LIN },
-# endif /* DEFECHO */
-# ifdef FLUSHO
- { "flusho", FLUSHO, M_LIN },
-# endif /* FLUSHO */
-# ifdef PENDIN
- { "pendin", PENDIN, M_LIN },
-# endif /* PENDIN */
-# ifdef IEXTEN
- { "iexten", IEXTEN, M_LIN },
-# endif /* IEXTEN */
-# ifdef NOKERNINFO
- { "nokerninfo",NOKERNINFO,M_LIN },
-# endif /* NOKERNINFO */
-# ifdef ALTWERASE
- { "altwerase",ALTWERASE,M_LIN },
-# endif /* ALTWERASE */
-# ifdef EXTPROC
- { "extproc",EXTPROC, M_LIN },
-# endif /* EXTPROC */
-
-# if defined(VINTR)
- { "intr", C_SH(C_INTR), M_CHAR },
-# endif /* VINTR */
-# if defined(VQUIT)
- { "quit", C_SH(C_QUIT), M_CHAR },
-# endif /* VQUIT */
-# if defined(VERASE)
- { "erase", C_SH(C_ERASE), M_CHAR },
-# endif /* VERASE */
-# if defined(VKILL)
- { "kill", C_SH(C_KILL), M_CHAR },
-# endif /* VKILL */
-# if defined(VEOF)
- { "eof", C_SH(C_EOF), M_CHAR },
-# endif /* VEOF */
-# if defined(VEOL)
- { "eol", C_SH(C_EOL), M_CHAR },
-# endif /* VEOL */
-# if defined(VEOL2)
- { "eol2", C_SH(C_EOL2), M_CHAR },
-# endif /* VEOL2 */
-# if defined(VSWTCH)
- { "swtch", C_SH(C_SWTCH), M_CHAR },
-# endif /* VSWTCH */
-# if defined(VDSWTCH)
- { "dswtch", C_SH(C_DSWTCH), M_CHAR },
-# endif /* VDSWTCH */
-# if defined(VERASE2)
- { "erase2", C_SH(C_ERASE2), M_CHAR },
-# endif /* VERASE2 */
-# if defined(VSTART)
- { "start", C_SH(C_START), M_CHAR },
-# endif /* VSTART */
-# if defined(VSTOP)
- { "stop", C_SH(C_STOP), M_CHAR },
-# endif /* VSTOP */
-# if defined(VWERASE)
- { "werase", C_SH(C_WERASE), M_CHAR },
-# endif /* VWERASE */
-# if defined(VSUSP)
- { "susp", C_SH(C_SUSP), M_CHAR },
-# endif /* VSUSP */
-# if defined(VDSUSP)
- { "dsusp", C_SH(C_DSUSP), M_CHAR },
-# endif /* VDSUSP */
-# if defined(VREPRINT)
- { "reprint", C_SH(C_REPRINT),M_CHAR },
-# endif /* VREPRINT */
-# if defined(VDISCARD)
- { "discard", C_SH(C_DISCARD),M_CHAR },
-# endif /* VDISCARD */
-# if defined(VLNEXT)
- { "lnext", C_SH(C_LNEXT), M_CHAR },
-# endif /* VLNEXT */
-# if defined(VSTATUS)
- { "status", C_SH(C_STATUS), M_CHAR },
-# endif /* VSTATUS */
-# if defined(VPAGE)
- { "page", C_SH(C_PAGE), M_CHAR },
-# endif /* VPAGE */
-# if defined(VPGOFF)
- { "pgoff", C_SH(C_PGOFF), M_CHAR },
-# endif /* VPGOFF */
-# if defined(VKILL2)
- { "kill2", C_SH(C_KILL2), M_CHAR },
-# endif /* VKILL2 */
-# if defined(VBRK)
- { "brk", C_SH(C_BRK), M_CHAR },
-# endif /* VBRK */
-# if defined(VMIN)
- { "min", C_SH(C_MIN), M_CHAR },
-# endif /* VMIN */
-# if defined(VTIME)
- { "time", C_SH(C_TIME), M_CHAR },
-# endif /* VTIME */
- { NULL, 0, -1 },
-};
-
-
-
-#define tty_getty(el, td) tcgetattr((el)->el_infd, (td))
-#define tty_setty(el, td) tcsetattr((el)->el_infd, TCSADRAIN, (td))
-
-#define tty__gettabs(td) ((((td)->c_oflag & TAB3) == TAB3) ? 0 : 1)
-#define tty__geteightbit(td) (((td)->c_cflag & CSIZE) == CS8)
-#define tty__cooked_mode(td) ((td)->c_lflag & ICANON)
-
-private void tty__getchar __P((struct termios *, unsigned char *));
-private void tty__setchar __P((struct termios *, unsigned char *));
-private speed_t tty__getspeed __P((struct termios *));
-private int tty_setup __P((EditLine *));
-
-#define t_qu t_ts
-
-
-/* tty_setup():
- * Get the tty parameters and initialize the editing state
- */
-private int
-tty_setup(el)
- EditLine *el;
-{
- int rst = 1;
- if (tty_getty(el, &el->el_tty.t_ed) == -1) {
-#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile,
- "tty_setup: tty_getty: %s\n", strerror(errno));
-#endif /* DEBUG_TTY */
- return(-1);
- }
- el->el_tty.t_ts = el->el_tty.t_ex = el->el_tty.t_ed;
-
- el->el_tty.t_speed = tty__getspeed(&el->el_tty.t_ex);
- el->el_tty.t_tabs = tty__gettabs(&el->el_tty.t_ex);
- el->el_tty.t_eight = tty__geteightbit(&el->el_tty.t_ex);
-
- el->el_tty.t_ex.c_iflag &= ~el->el_tty.t_t[EX_IO][M_INP].t_clrmask;
- el->el_tty.t_ex.c_iflag |= el->el_tty.t_t[EX_IO][M_INP].t_setmask;
-
- el->el_tty.t_ex.c_oflag &= ~el->el_tty.t_t[EX_IO][M_OUT].t_clrmask;
- el->el_tty.t_ex.c_oflag |= el->el_tty.t_t[EX_IO][M_OUT].t_setmask;
-
- el->el_tty.t_ex.c_cflag &= ~el->el_tty.t_t[EX_IO][M_CTL].t_clrmask;
- el->el_tty.t_ex.c_cflag |= el->el_tty.t_t[EX_IO][M_CTL].t_setmask;
-
- el->el_tty.t_ex.c_lflag &= ~el->el_tty.t_t[EX_IO][M_LIN].t_clrmask;
- el->el_tty.t_ex.c_lflag |= el->el_tty.t_t[EX_IO][M_LIN].t_setmask;
-
- /*
- * Reset the tty chars to reasonable defaults
- * If they are disabled, then enable them.
- */
- if (rst) {
- if (tty__cooked_mode(&el->el_tty.t_ts)) {
- tty__getchar(&el->el_tty.t_ts, el->el_tty.t_c[TS_IO]);
- /*
- * Don't affect CMIN and CTIME for the editor mode
- */
- for (rst = 0; rst < C_NCC - 2; rst++)
- if (el->el_tty.t_c[TS_IO][rst] != el->el_tty.t_vdisable &&
- el->el_tty.t_c[ED_IO][rst] != el->el_tty.t_vdisable)
- el->el_tty.t_c[ED_IO][rst] = el->el_tty.t_c[TS_IO][rst];
- for (rst = 0; rst < C_NCC; rst++)
- if (el->el_tty.t_c[TS_IO][rst] != el->el_tty.t_vdisable &&
- el->el_tty.t_c[EX_IO][rst] != el->el_tty.t_vdisable)
- el->el_tty.t_c[EX_IO][rst] = el->el_tty.t_c[TS_IO][rst];
- }
- tty__setchar(&el->el_tty.t_ex, el->el_tty.t_c[EX_IO]);
- if (tty_setty(el, &el->el_tty.t_ex) == -1) {
-#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "tty_setup: tty_setty: %s\n",
- strerror(errno));
-#endif /* DEBUG_TTY */
- return(-1);
- }
- }
- else
- tty__setchar(&el->el_tty.t_ex, el->el_tty.t_c[EX_IO]);
-
- el->el_tty.t_ed.c_iflag &= ~el->el_tty.t_t[ED_IO][M_INP].t_clrmask;
- el->el_tty.t_ed.c_iflag |= el->el_tty.t_t[ED_IO][M_INP].t_setmask;
-
- el->el_tty.t_ed.c_oflag &= ~el->el_tty.t_t[ED_IO][M_OUT].t_clrmask;
- el->el_tty.t_ed.c_oflag |= el->el_tty.t_t[ED_IO][M_OUT].t_setmask;
-
- el->el_tty.t_ed.c_cflag &= ~el->el_tty.t_t[ED_IO][M_CTL].t_clrmask;
- el->el_tty.t_ed.c_cflag |= el->el_tty.t_t[ED_IO][M_CTL].t_setmask;
-
- el->el_tty.t_ed.c_lflag &= ~el->el_tty.t_t[ED_IO][M_LIN].t_clrmask;
- el->el_tty.t_ed.c_lflag |= el->el_tty.t_t[ED_IO][M_LIN].t_setmask;
-
- tty__setchar(&el->el_tty.t_ed, el->el_tty.t_c[ED_IO]);
- return 0;
-}
-
-protected int
-tty_init(el)
- EditLine *el;
-{
- el->el_tty.t_mode = EX_IO;
- el->el_tty.t_vdisable = _POSIX_VDISABLE;
- (void) memcpy(el->el_tty.t_t, ttyperm, sizeof(ttyperm_t));
- (void) memcpy(el->el_tty.t_c, ttychar, sizeof(ttychar_t));
- return tty_setup(el);
-} /* end tty_init */
-
-
-/* tty_end():
- * Restore the tty to its original settings
- */
-protected void
-/*ARGSUSED*/
-tty_end(el)
- EditLine *el;
-{
- /* XXX: Maybe reset to an initial state? */
-}
-
-
-/* tty__getspeed():
- * Get the tty speed
- */
-private speed_t
-tty__getspeed(td)
- struct termios *td;
-{
- speed_t spd;
-
- if ((spd = cfgetispeed(td)) == 0)
- spd = cfgetospeed(td);
- return spd;
-} /* end tty__getspeed */
-
-
-/* tty__getchar():
- * Get the tty characters
- */
-private void
-tty__getchar(td, s)
- struct termios *td;
- unsigned char *s;
-{
-# ifdef VINTR
- s[C_INTR] = td->c_cc[VINTR];
-# endif /* VINTR */
-# ifdef VQUIT
- s[C_QUIT] = td->c_cc[VQUIT];
-# endif /* VQUIT */
-# ifdef VERASE
- s[C_ERASE] = td->c_cc[VERASE];
-# endif /* VERASE */
-# ifdef VKILL
- s[C_KILL] = td->c_cc[VKILL];
-# endif /* VKILL */
-# ifdef VEOF
- s[C_EOF] = td->c_cc[VEOF];
-# endif /* VEOF */
-# ifdef VEOL
- s[C_EOL] = td->c_cc[VEOL];
-# endif /* VEOL */
-# ifdef VEOL2
- s[C_EOL2] = td->c_cc[VEOL2];
-# endif /* VEOL2 */
-# ifdef VSWTCH
- s[C_SWTCH] = td->c_cc[VSWTCH];
-# endif /* VSWTCH */
-# ifdef VDSWTCH
- s[C_DSWTCH] = td->c_cc[VDSWTCH];
-# endif /* VDSWTCH */
-# ifdef VERASE2
- s[C_ERASE2] = td->c_cc[VERASE2];
-# endif /* VERASE2 */
-# ifdef VSTART
- s[C_START] = td->c_cc[VSTART];
-# endif /* VSTART */
-# ifdef VSTOP
- s[C_STOP] = td->c_cc[VSTOP];
-# endif /* VSTOP */
-# ifdef VWERASE
- s[C_WERASE] = td->c_cc[VWERASE];
-# endif /* VWERASE */
-# ifdef VSUSP
- s[C_SUSP] = td->c_cc[VSUSP];
-# endif /* VSUSP */
-# ifdef VDSUSP
- s[C_DSUSP] = td->c_cc[VDSUSP];
-# endif /* VDSUSP */
-# ifdef VREPRINT
- s[C_REPRINT]= td->c_cc[VREPRINT];
-# endif /* VREPRINT */
-# ifdef VDISCARD
- s[C_DISCARD]= td->c_cc[VDISCARD];
-# endif /* VDISCARD */
-# ifdef VLNEXT
- s[C_LNEXT] = td->c_cc[VLNEXT];
-# endif /* VLNEXT */
-# ifdef VSTATUS
- s[C_STATUS] = td->c_cc[VSTATUS];
-# endif /* VSTATUS */
-# ifdef VPAGE
- s[C_PAGE] = td->c_cc[VPAGE];
-# endif /* VPAGE */
-# ifdef VPGOFF
- s[C_PGOFF] = td->c_cc[VPGOFF];
-# endif /* VPGOFF */
-# ifdef VKILL2
- s[C_KILL2] = td->c_cc[VKILL2];
-# endif /* KILL2 */
-# ifdef VMIN
- s[C_MIN] = td->c_cc[VMIN];
-# endif /* VMIN */
-# ifdef VTIME
- s[C_TIME] = td->c_cc[VTIME];
-# endif /* VTIME */
-} /* tty__getchar */
-
-
-/* tty__setchar():
- * Set the tty characters
- */
-private void
-tty__setchar(td, s)
- struct termios *td;
- unsigned char *s;
-{
-# ifdef VINTR
- td->c_cc[VINTR] = s[C_INTR];
-# endif /* VINTR */
-# ifdef VQUIT
- td->c_cc[VQUIT] = s[C_QUIT];
-# endif /* VQUIT */
-# ifdef VERASE
- td->c_cc[VERASE] = s[C_ERASE];
-# endif /* VERASE */
-# ifdef VKILL
- td->c_cc[VKILL] = s[C_KILL];
-# endif /* VKILL */
-# ifdef VEOF
- td->c_cc[VEOF] = s[C_EOF];
-# endif /* VEOF */
-# ifdef VEOL
- td->c_cc[VEOL] = s[C_EOL];
-# endif /* VEOL */
-# ifdef VEOL2
- td->c_cc[VEOL2] = s[C_EOL2];
-# endif /* VEOL2 */
-# ifdef VSWTCH
- td->c_cc[VSWTCH] = s[C_SWTCH];
-# endif /* VSWTCH */
-# ifdef VDSWTCH
- td->c_cc[VDSWTCH] = s[C_DSWTCH];
-# endif /* VDSWTCH */
-# ifdef VERASE2
- td->c_cc[VERASE2] = s[C_ERASE2];
-# endif /* VERASE2 */
-# ifdef VSTART
- td->c_cc[VSTART] = s[C_START];
-# endif /* VSTART */
-# ifdef VSTOP
- td->c_cc[VSTOP] = s[C_STOP];
-# endif /* VSTOP */
-# ifdef VWERASE
- td->c_cc[VWERASE] = s[C_WERASE];
-# endif /* VWERASE */
-# ifdef VSUSP
- td->c_cc[VSUSP] = s[C_SUSP];
-# endif /* VSUSP */
-# ifdef VDSUSP
- td->c_cc[VDSUSP] = s[C_DSUSP];
-# endif /* VDSUSP */
-# ifdef VREPRINT
- td->c_cc[VREPRINT] = s[C_REPRINT];
-# endif /* VREPRINT */
-# ifdef VDISCARD
- td->c_cc[VDISCARD] = s[C_DISCARD];
-# endif /* VDISCARD */
-# ifdef VLNEXT
- td->c_cc[VLNEXT] = s[C_LNEXT];
-# endif /* VLNEXT */
-# ifdef VSTATUS
- td->c_cc[VSTATUS] = s[C_STATUS];
-# endif /* VSTATUS */
-# ifdef VPAGE
- td->c_cc[VPAGE] = s[C_PAGE];
-# endif /* VPAGE */
-# ifdef VPGOFF
- td->c_cc[VPGOFF] = s[C_PGOFF];
-# endif /* VPGOFF */
-# ifdef VKILL2
- td->c_cc[VKILL2] = s[C_KILL2];
-# endif /* VKILL2 */
-# ifdef VMIN
- td->c_cc[VMIN] = s[C_MIN];
-# endif /* VMIN */
-# ifdef VTIME
- td->c_cc[VTIME] = s[C_TIME];
-# endif /* VTIME */
-} /* tty__setchar */
-
-
-/* tty_bind_char():
- * Rebind the editline functions
- */
-protected void
-tty_bind_char(el, force)
- EditLine *el;
- int force;
-{
- unsigned char *t_n = el->el_tty.t_c[ED_IO];
- unsigned char *t_o = el->el_tty.t_ed.c_cc;
- char new[2], old[2];
- ttymap_t *tp;
- el_action_t *dmap, *dalt, *map, *alt;
- new[1] = old[1] = '\0';
-
-
- map = el->el_map.key;
- alt = el->el_map.alt;
- if (el->el_map.type == MAP_VI) {
- dmap = el->el_map.vii;
- dalt = el->el_map.vic;
- }
- else {
- dmap = el->el_map.emacs;
- dalt = NULL;
- }
-
- for (tp = tty_map; tp->nch != -1; tp++) {
- new[0] = t_n[tp->nch];
- old[0] = t_o[tp->och];
- if (new[0] == old[0] && !force)
- continue;
- /* Put the old default binding back, and set the new binding */
- key_clear(el, map, old);
- map[old[0]] = dmap[old[0]];
- key_clear(el, map, new);
- /* MAP_VI == 1, MAP_EMACS == 0... */
- map[new[0]] = tp->bind[el->el_map.type];
- if (dalt) {
- key_clear(el, alt, old);
- alt[old[0]] = dalt[old[0]];
- key_clear(el, alt, new);
- alt[new[0]] = tp->bind[el->el_map.type+1];
- }
- }
-}
-
-/* tty_rawmode():
- * Set terminal into 1 character at a time mode.
- */
-protected int
-tty_rawmode(el)
- EditLine *el;
-{
- if (el->el_tty.t_mode == ED_IO)
- return (0);
-
- if (tty_getty(el, &el->el_tty.t_ts) == -1) {
-#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "tty_rawmode: tty_getty: %s\n", strerror(errno));
-#endif /* DEBUG_TTY */
- return(-1);
- }
-
- /*
- * We always keep up with the eight bit setting and the speed of the
- * tty. But only we only believe changes that are made to cooked mode!
- */
- el->el_tty.t_eight = tty__geteightbit(&el->el_tty.t_ts);
- el->el_tty.t_speed = tty__getspeed(&el->el_tty.t_ts);
-
- if (tty__getspeed(&el->el_tty.t_ex) != el->el_tty.t_speed ||
- tty__getspeed(&el->el_tty.t_ed) != el->el_tty.t_speed) {
- (void) cfsetispeed(&el->el_tty.t_ex, el->el_tty.t_speed);
- (void) cfsetospeed(&el->el_tty.t_ex, el->el_tty.t_speed);
- (void) cfsetispeed(&el->el_tty.t_ed, el->el_tty.t_speed);
- (void) cfsetospeed(&el->el_tty.t_ed, el->el_tty.t_speed);
- }
-
- if (tty__cooked_mode(&el->el_tty.t_ts)) {
- if (el->el_tty.t_ts.c_cflag != el->el_tty.t_ex.c_cflag) {
- el->el_tty.t_ex.c_cflag = el->el_tty.t_ts.c_cflag;
- el->el_tty.t_ex.c_cflag &= ~el->el_tty.t_t[EX_IO][M_CTL].t_clrmask;
- el->el_tty.t_ex.c_cflag |= el->el_tty.t_t[EX_IO][M_CTL].t_setmask;
-
- el->el_tty.t_ed.c_cflag = el->el_tty.t_ts.c_cflag;
- el->el_tty.t_ed.c_cflag &= ~el->el_tty.t_t[ED_IO][M_CTL].t_clrmask;
- el->el_tty.t_ed.c_cflag |= el->el_tty.t_t[ED_IO][M_CTL].t_setmask;
- }
-
- if ((el->el_tty.t_ts.c_lflag != el->el_tty.t_ex.c_lflag) &&
- (el->el_tty.t_ts.c_lflag != el->el_tty.t_ed.c_lflag)) {
- el->el_tty.t_ex.c_lflag = el->el_tty.t_ts.c_lflag;
- el->el_tty.t_ex.c_lflag &= ~el->el_tty.t_t[EX_IO][M_LIN].t_clrmask;
- el->el_tty.t_ex.c_lflag |= el->el_tty.t_t[EX_IO][M_LIN].t_setmask;
-
- el->el_tty.t_ed.c_lflag = el->el_tty.t_ts.c_lflag;
- el->el_tty.t_ed.c_lflag &= ~el->el_tty.t_t[ED_IO][M_LIN].t_clrmask;
- el->el_tty.t_ed.c_lflag |= el->el_tty.t_t[ED_IO][M_LIN].t_setmask;
- }
-
- if ((el->el_tty.t_ts.c_iflag != el->el_tty.t_ex.c_iflag) &&
- (el->el_tty.t_ts.c_iflag != el->el_tty.t_ed.c_iflag)) {
- el->el_tty.t_ex.c_iflag = el->el_tty.t_ts.c_iflag;
- el->el_tty.t_ex.c_iflag &= ~el->el_tty.t_t[EX_IO][M_INP].t_clrmask;
- el->el_tty.t_ex.c_iflag |= el->el_tty.t_t[EX_IO][M_INP].t_setmask;
-
- el->el_tty.t_ed.c_iflag = el->el_tty.t_ts.c_iflag;
- el->el_tty.t_ed.c_iflag &= ~el->el_tty.t_t[ED_IO][M_INP].t_clrmask;
- el->el_tty.t_ed.c_iflag |= el->el_tty.t_t[ED_IO][M_INP].t_setmask;
- }
-
- if ((el->el_tty.t_ts.c_oflag != el->el_tty.t_ex.c_oflag) &&
- (el->el_tty.t_ts.c_oflag != el->el_tty.t_ed.c_oflag)) {
- el->el_tty.t_ex.c_oflag = el->el_tty.t_ts.c_oflag;
- el->el_tty.t_ex.c_oflag &= ~el->el_tty.t_t[EX_IO][M_OUT].t_clrmask;
- el->el_tty.t_ex.c_oflag |= el->el_tty.t_t[EX_IO][M_OUT].t_setmask;
-
- el->el_tty.t_ed.c_oflag = el->el_tty.t_ts.c_oflag;
- el->el_tty.t_ed.c_oflag &= ~el->el_tty.t_t[ED_IO][M_OUT].t_clrmask;
- el->el_tty.t_ed.c_oflag |= el->el_tty.t_t[ED_IO][M_OUT].t_setmask;
- }
-
- if (tty__gettabs(&el->el_tty.t_ex) == 0)
- el->el_tty.t_tabs = 0;
- else
- el->el_tty.t_tabs = EL_CAN_TAB ? 1 : 0;
-
- {
- int i;
-
- tty__getchar(&el->el_tty.t_ts, el->el_tty.t_c[TS_IO]);
- /*
- * Check if the user made any changes.
- * If he did, then propagate the changes to the
- * edit and execute data structures.
- */
- for (i = 0; i < C_NCC; i++)
- if (el->el_tty.t_c[TS_IO][i] != el->el_tty.t_c[EX_IO][i])
- break;
-
- if (i != C_NCC) {
- /*
- * Propagate changes only to the unprotected chars
- * that have been modified just now.
- */
- for (i = 0; i < C_NCC; i++) {
- if (!((el->el_tty.t_t[ED_IO][M_CHAR].t_setmask & C_SH(i)))
- && (el->el_tty.t_c[TS_IO][i] != el->el_tty.t_c[EX_IO][i]))
- el->el_tty.t_c[ED_IO][i] = el->el_tty.t_c[TS_IO][i];
- if (el->el_tty.t_t[ED_IO][M_CHAR].t_clrmask & C_SH(i))
- el->el_tty.t_c[ED_IO][i] = el->el_tty.t_vdisable;
- }
- tty_bind_char(el, 0);
- tty__setchar(&el->el_tty.t_ed, el->el_tty.t_c[ED_IO]);
-
- for (i = 0; i < C_NCC; i++) {
- if (!((el->el_tty.t_t[EX_IO][M_CHAR].t_setmask & C_SH(i)))
- && (el->el_tty.t_c[TS_IO][i] != el->el_tty.t_c[EX_IO][i]))
- el->el_tty.t_c[EX_IO][i] = el->el_tty.t_c[TS_IO][i];
- if (el->el_tty.t_t[EX_IO][M_CHAR].t_clrmask & C_SH(i))
- el->el_tty.t_c[EX_IO][i] = el->el_tty.t_vdisable;
- }
- tty__setchar(&el->el_tty.t_ex, el->el_tty.t_c[EX_IO]);
- }
-
- }
- }
-
- if (tty_setty(el, &el->el_tty.t_ed) == -1) {
-#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "tty_rawmode: tty_setty: %s\n",
- strerror(errno));
-#endif /* DEBUG_TTY */
- return -1;
- }
- el->el_tty.t_mode = ED_IO;
- return (0);
-} /* end tty_rawmode */
-
-
-/* tty_cookedmode():
- * Set the tty back to normal mode
- */
-protected int
-tty_cookedmode(el)
- EditLine *el;
-{ /* set tty in normal setup */
- if (el->el_tty.t_mode == EX_IO)
- return (0);
-
- if (tty_setty(el, &el->el_tty.t_ex) == -1) {
-#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "tty_cookedmode: tty_setty: %s\n",
- strerror(errno));
-#endif /* DEBUG_TTY */
- return -1;
- }
- el->el_tty.t_mode = EX_IO;
- return (0);
-} /* end tty_cookedmode */
-
-
-/* tty_quotemode():
- * Turn on quote mode
- */
-protected int
-tty_quotemode(el)
- EditLine *el;
-{
- if (el->el_tty.t_mode == QU_IO)
- return 0;
-
- el->el_tty.t_qu = el->el_tty.t_ed;
-
- el->el_tty.t_qu.c_iflag &= ~el->el_tty.t_t[QU_IO][M_INP].t_clrmask;
- el->el_tty.t_qu.c_iflag |= el->el_tty.t_t[QU_IO][M_INP].t_setmask;
-
- el->el_tty.t_qu.c_oflag &= ~el->el_tty.t_t[QU_IO][M_OUT].t_clrmask;
- el->el_tty.t_qu.c_oflag |= el->el_tty.t_t[QU_IO][M_OUT].t_setmask;
-
- el->el_tty.t_qu.c_cflag &= ~el->el_tty.t_t[QU_IO][M_CTL].t_clrmask;
- el->el_tty.t_qu.c_cflag |= el->el_tty.t_t[QU_IO][M_CTL].t_setmask;
-
- el->el_tty.t_qu.c_lflag &= ~el->el_tty.t_t[QU_IO][M_LIN].t_clrmask;
- el->el_tty.t_qu.c_lflag |= el->el_tty.t_t[QU_IO][M_LIN].t_setmask;
-
- if (tty_setty(el, &el->el_tty.t_qu) == -1) {
-#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "QuoteModeOn: tty_setty: %s\n",
- strerror(errno));
-#endif /* DEBUG_TTY */
- return -1;
- }
- el->el_tty.t_mode = QU_IO;
- return 0;
-} /* end tty_quotemode */
-
-
-/* tty_noquotemode():
- * Turn off quote mode
- */
-protected int
-tty_noquotemode(el)
- EditLine *el;
-{
- if (el->el_tty.t_mode != QU_IO)
- return 0;
- if (tty_setty(el, &el->el_tty.t_ed) == -1) {
-#ifdef DEBUG_TTY
- (void) fprintf(el->el_errfile, "QuoteModeOff: tty_setty: %s\n",
- strerror(errno));
-#endif /* DEBUG_TTY */
- return -1;
- }
- el->el_tty.t_mode = ED_IO;
- return 0;
-}
-
-/* tty_stty():
- * Stty builtin
- */
-protected int
-/*ARGSUSED*/
-tty_stty(el, argc, argv)
- EditLine *el;
- int argc;
- char **argv;
-{
- ttymodes_t *m;
- char x, *d;
- int aflag = 0;
- char *s;
- char *name;
- int z = EX_IO;
-
- if (argv == NULL)
- return -1;
- name = *argv++;
-
- while (argv && *argv && argv[0][0] == '-' && argv[0][2] == '\0')
- switch (argv[0][1]) {
- case 'a':
- aflag++;
- argv++;
- break;
- case 'd':
- argv++;
- z = ED_IO;
- break;
- case 'x':
- argv++;
- z = EX_IO;
- break;
- case 'q':
- argv++;
- z = QU_IO;
- break;
- default:
- (void) fprintf(el->el_errfile, "%s: Unknown switch `%c'.\n",
- name, argv[0][1]);
- return -1;
- }
-
- if (!argv || !*argv) {
- int i = -1;
- int len = 0, st = 0, cu;
- for (m = ttymodes; m->m_name; m++) {
- if (m->m_type != i) {
- (void) fprintf(el->el_outfile, "%s%s", i != -1 ? "\n" : "",
- el->el_tty.t_t[z][m->m_type].t_name);
- i = m->m_type;
- st = len = strlen(el->el_tty.t_t[z][m->m_type].t_name);
- }
-
- x = (el->el_tty.t_t[z][i].t_setmask & m->m_value) ? '+' : '\0';
- x = (el->el_tty.t_t[z][i].t_clrmask & m->m_value) ? '-' : x;
-
- if (x != '\0' || aflag) {
-
- cu = strlen(m->m_name) + (x != '\0') + 1;
-
- if (len + cu >= el->el_term.t_size.h) {
- (void) fprintf(el->el_outfile, "\n%*s", st, "");
- len = st + cu;
- }
- else
- len += cu;
-
- if (x != '\0')
- (void) fprintf(el->el_outfile, "%c%s ", x, m->m_name);
- else
- (void) fprintf(el->el_outfile, "%s ", m->m_name);
- }
- }
- (void) fprintf(el->el_outfile, "\n");
- return 0;
- }
-
- while (argv && (s = *argv++)) {
- switch (*s) {
- case '+':
- case '-':
- x = *s++;
- break;
- default:
- x = '\0';
- break;
- }
- d = s;
- for (m = ttymodes; m->m_name; m++)
- if (strcmp(m->m_name, d) == 0)
- break;
-
- if (!m->m_name) {
- (void) fprintf(el->el_errfile, "%s: Invalid argument `%s'.\n",
- name, d);
- return -1;
- }
-
- switch (x) {
- case '+':
- el->el_tty.t_t[z][m->m_type].t_setmask |= m->m_value;
- el->el_tty.t_t[z][m->m_type].t_clrmask &= ~m->m_value;
- break;
- case '-':
- el->el_tty.t_t[z][m->m_type].t_setmask &= ~m->m_value;
- el->el_tty.t_t[z][m->m_type].t_clrmask |= m->m_value;
- break;
- default:
- el->el_tty.t_t[z][m->m_type].t_setmask &= ~m->m_value;
- el->el_tty.t_t[z][m->m_type].t_clrmask &= ~m->m_value;
- break;
- }
- }
- return 0;
-} /* end tty_stty */
-
-
-#ifdef notyet
-/* tty_printchar():
- * DEbugging routine to print the tty characters
- */
-private void
-tty_printchar(el, s)
- EditLine *el;
- unsigned char *s;
-{
- ttyperm_t *m;
- int i;
-
- for (i = 0; i < C_NCC; i++) {
- for (m = el->el_tty.t_t; m->m_name; m++)
- if (m->m_type == M_CHAR && C_SH(i) == m->m_value)
- break;
- if (m->m_name)
- (void) fprintf(el->el_errfile, "%s ^%c ", m->m_name, s[i] + 'A'-1);
- if (i % 5 == 0)
- (void) fprintf(el->el_errfile, "\n");
- }
- (void) fprintf(el->el_errfile, "\n");
-}
-#endif /* notyet */
diff --git a/lib/libedit/tty.h b/lib/libedit/tty.h
deleted file mode 100644
index 294c36a..0000000
--- a/lib/libedit/tty.h
+++ /dev/null
@@ -1,481 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)tty.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * el.tty.h: Local terminal header
- */
-#ifndef _h_el_tty
-#define _h_el_tty
-
-#include "histedit.h"
-#include <termios.h>
-
-/* Define our own since everyone gets it wrong! */
-#define CONTROL(A) ((A) & 037)
-
-/*
- * Aix compatible names
- */
-# if defined(VWERSE) && !defined(VWERASE)
-# define VWERASE VWERSE
-# endif /* VWERSE && !VWERASE */
-
-# if defined(VDISCRD) && !defined(VDISCARD)
-# define VDISCARD VDISCRD
-# endif /* VDISCRD && !VDISCARD */
-
-# if defined(VFLUSHO) && !defined(VDISCARD)
-# define VDISCARD VFLUSHO
-# endif /* VFLUSHO && VDISCARD */
-
-# if defined(VSTRT) && !defined(VSTART)
-# define VSTART VSTRT
-# endif /* VSTRT && ! VSTART */
-
-# if defined(VSTAT) && !defined(VSTATUS)
-# define VSTATUS VSTAT
-# endif /* VSTAT && ! VSTATUS */
-
-# ifndef ONLRET
-# define ONLRET 0
-# endif /* ONLRET */
-
-# ifndef TAB3
-# ifdef OXTABS
-# define TAB3 OXTABS
-# else
-# define TAB3 0
-# endif /* OXTABS */
-# endif /* !TAB3 */
-
-# if defined(OXTABS) && !defined(XTABS)
-# define XTABS OXTABS
-# endif /* OXTABS && !XTABS */
-
-# ifndef ONLCR
-# define ONLCR 0
-# endif /* ONLCR */
-
-# ifndef IEXTEN
-# define IEXTEN 0
-# endif /* IEXTEN */
-
-# ifndef ECHOCTL
-# define ECHOCTL 0
-# endif /* ECHOCTL */
-
-# ifndef PARENB
-# define PARENB 0
-# endif /* PARENB */
-
-# ifndef EXTPROC
-# define EXTPROC 0
-# endif /* EXTPROC */
-
-# ifndef FLUSHO
-# define FLUSHO 0
-# endif /* FLUSHO */
-
-
-# if defined(VDISABLE) && !defined(_POSIX_VDISABLE)
-# define _POSIX_VDISABLE VDISABLE
-# endif /* VDISABLE && ! _POSIX_VDISABLE */
-
-/*
- * Work around ISC's definition of IEXTEN which is
- * XCASE!
- */
-# ifdef ISC
-# if defined(IEXTEN) && defined(XCASE)
-# if IEXTEN == XCASE
-# undef IEXTEN
-# define IEXTEN 0
-# endif /* IEXTEN == XCASE */
-# endif /* IEXTEN && XCASE */
-# if defined(IEXTEN) && !defined(XCASE)
-# define XCASE IEXTEN
-# undef IEXTEN
-# define IEXTEN 0
-# endif /* IEXTEN && !XCASE */
-# endif /* ISC */
-
-/*
- * Work around convex weirdness where turning off IEXTEN makes us
- * lose all postprocessing!
- */
-#if defined(convex) || defined(__convex__)
-# if defined(IEXTEN) && IEXTEN != 0
-# undef IEXTEN
-# define IEXTEN 0
-# endif /* IEXTEN != 0 */
-#endif /* convex || __convex__ */
-
-/*
- * So that we don't lose job control.
- */
-#ifdef __SVR4
-# undef CSWTCH
-#endif
-
-#ifndef _POSIX_VDISABLE
-# define _POSIX_VDISABLE ((unsigned char) -1)
-#endif /* _POSIX_VDISABLE */
-
-#if !defined(CREPRINT) && defined(CRPRNT)
-# define CREPRINT CRPRNT
-#endif /* !CREPRINT && CRPRNT */
-#if !defined(CDISCARD) && defined(CFLUSH)
-# define CDISCARD CFLUSH
-#endif /* !CDISCARD && CFLUSH */
-
-#ifndef CINTR
-# define CINTR CONTROL('c')
-#endif /* CINTR */
-#ifndef CQUIT
-# define CQUIT 034 /* ^\ */
-#endif /* CQUIT */
-#ifndef CERASE
-# define CERASE 0177 /* ^? */
-#endif /* CERASE */
-#ifndef CKILL
-# define CKILL CONTROL('u')
-#endif /* CKILL */
-#ifndef CEOF
-# define CEOF CONTROL('d')
-#endif /* CEOF */
-#ifndef CEOL
-# define CEOL _POSIX_VDISABLE
-#endif /* CEOL */
-#ifndef CEOL2
-# define CEOL2 _POSIX_VDISABLE
-#endif /* CEOL2 */
-#ifndef CSWTCH
-# define CSWTCH _POSIX_VDISABLE
-#endif /* CSWTCH */
-#ifndef CDSWTCH
-# define CDSWTCH _POSIX_VDISABLE
-#endif /* CDSWTCH */
-#ifndef CERASE2
-# define CERASE2 _POSIX_VDISABLE
-#endif /* CERASE2 */
-#ifndef CSTART
-# define CSTART CONTROL('q')
-#endif /* CSTART */
-#ifndef CSTOP
-# define CSTOP CONTROL('s')
-#endif /* CSTOP */
-#ifndef CSUSP
-# define CSUSP CONTROL('z')
-#endif /* CSUSP */
-#ifndef CDSUSP
-# define CDSUSP CONTROL('y')
-#endif /* CDSUSP */
-
-#ifdef hpux
-
-# ifndef CREPRINT
-# define CREPRINT _POSIX_VDISABLE
-# endif /* CREPRINT */
-# ifndef CDISCARD
-# define CDISCARD _POSIX_VDISABLE
-# endif /* CDISCARD */
-# ifndef CLNEXT
-# define CLNEXT _POSIX_VDISABLE
-# endif /* CLNEXT */
-# ifndef CWERASE
-# define CWERASE _POSIX_VDISABLE
-# endif /* CWERASE */
-
-#else /* !hpux */
-
-# ifndef CREPRINT
-# define CREPRINT CONTROL('r')
-# endif /* CREPRINT */
-# ifndef CDISCARD
-# define CDISCARD CONTROL('o')
-# endif /* CDISCARD */
-# ifndef CLNEXT
-# define CLNEXT CONTROL('v')
-# endif /* CLNEXT */
-# ifndef CWERASE
-# define CWERASE CONTROL('w')
-# endif /* CWERASE */
-
-#endif /* hpux */
-
-#ifndef CSTATUS
-# define CSTATUS CONTROL('t')
-#endif /* CSTATUS */
-#ifndef CPAGE
-# define CPAGE ' '
-#endif /* CPAGE */
-#ifndef CPGOFF
-# define CPGOFF CONTROL('m')
-#endif /* CPGOFF */
-#ifndef CKILL2
-# define CKILL2 _POSIX_VDISABLE
-#endif /* CKILL2 */
-#ifndef CBRK
-# ifndef masscomp
-# define CBRK 0377
-# else
-# define CBRK '\0'
-# endif /* masscomp */
-#endif /* CBRK */
-#ifndef CMIN
-# define CMIN CEOF
-#endif /* CMIN */
-#ifndef CTIME
-# define CTIME CEOL
-#endif /* CTIME */
-
-/*
- * Fix for sun inconsistency. On termio VSUSP and the rest of the
- * ttychars > NCC are defined. So we undefine them.
- */
-#if defined(TERMIO) || defined(POSIX)
-# if defined(POSIX) && defined(NCCS)
-# define NUMCC NCCS
-# else
-# ifdef NCC
-# define NUMCC NCC
-# endif /* NCC */
-# endif /* POSIX && NCCS */
-# ifdef NUMCC
-# ifdef VINTR
-# if NUMCC <= VINTR
-# undef VINTR
-# endif /* NUMCC <= VINTR */
-# endif /* VINTR */
-# ifdef VQUIT
-# if NUMCC <= VQUIT
-# undef VQUIT
-# endif /* NUMCC <= VQUIT */
-# endif /* VQUIT */
-# ifdef VERASE
-# if NUMCC <= VERASE
-# undef VERASE
-# endif /* NUMCC <= VERASE */
-# endif /* VERASE */
-# ifdef VKILL
-# if NUMCC <= VKILL
-# undef VKILL
-# endif /* NUMCC <= VKILL */
-# endif /* VKILL */
-# ifdef VEOF
-# if NUMCC <= VEOF
-# undef VEOF
-# endif /* NUMCC <= VEOF */
-# endif /* VEOF */
-# ifdef VEOL
-# if NUMCC <= VEOL
-# undef VEOL
-# endif /* NUMCC <= VEOL */
-# endif /* VEOL */
-# ifdef VEOL2
-# if NUMCC <= VEOL2
-# undef VEOL2
-# endif /* NUMCC <= VEOL2 */
-# endif /* VEOL2 */
-# ifdef VSWTCH
-# if NUMCC <= VSWTCH
-# undef VSWTCH
-# endif /* NUMCC <= VSWTCH */
-# endif /* VSWTCH */
-# ifdef VDSWTCH
-# if NUMCC <= VDSWTCH
-# undef VDSWTCH
-# endif /* NUMCC <= VDSWTCH */
-# endif /* VDSWTCH */
-# ifdef VERASE2
-# if NUMCC <= VERASE2
-# undef VERASE2
-# endif /* NUMCC <= VERASE2 */
-# endif /* VERASE2 */
-# ifdef VSTART
-# if NUMCC <= VSTART
-# undef VSTART
-# endif /* NUMCC <= VSTART */
-# endif /* VSTART */
-# ifdef VSTOP
-# if NUMCC <= VSTOP
-# undef VSTOP
-# endif /* NUMCC <= VSTOP */
-# endif /* VSTOP */
-# ifdef VWERASE
-# if NUMCC <= VWERASE
-# undef VWERASE
-# endif /* NUMCC <= VWERASE */
-# endif /* VWERASE */
-# ifdef VSUSP
-# if NUMCC <= VSUSP
-# undef VSUSP
-# endif /* NUMCC <= VSUSP */
-# endif /* VSUSP */
-# ifdef VDSUSP
-# if NUMCC <= VDSUSP
-# undef VDSUSP
-# endif /* NUMCC <= VDSUSP */
-# endif /* VDSUSP */
-# ifdef VREPRINT
-# if NUMCC <= VREPRINT
-# undef VREPRINT
-# endif /* NUMCC <= VREPRINT */
-# endif /* VREPRINT */
-# ifdef VDISCARD
-# if NUMCC <= VDISCARD
-# undef VDISCARD
-# endif /* NUMCC <= VDISCARD */
-# endif /* VDISCARD */
-# ifdef VLNEXT
-# if NUMCC <= VLNEXT
-# undef VLNEXT
-# endif /* NUMCC <= VLNEXT */
-# endif /* VLNEXT */
-# ifdef VSTATUS
-# if NUMCC <= VSTATUS
-# undef VSTATUS
-# endif /* NUMCC <= VSTATUS */
-# endif /* VSTATUS */
-# ifdef VPAGE
-# if NUMCC <= VPAGE
-# undef VPAGE
-# endif /* NUMCC <= VPAGE */
-# endif /* VPAGE */
-# ifdef VPGOFF
-# if NUMCC <= VPGOFF
-# undef VPGOFF
-# endif /* NUMCC <= VPGOFF */
-# endif /* VPGOFF */
-# ifdef VKILL2
-# if NUMCC <= VKILL2
-# undef VKILL2
-# endif /* NUMCC <= VKILL2 */
-# endif /* VKILL2 */
-# ifdef VBRK
-# if NUMCC <= VBRK
-# undef VBRK
-# endif /* NUMCC <= VBRK */
-# endif /* VBRK */
-# ifdef VMIN
-# if NUMCC <= VMIN
-# undef VMIN
-# endif /* NUMCC <= VMIN */
-# endif /* VMIN */
-# ifdef VTIME
-# if NUMCC <= VTIME
-# undef VTIME
-# endif /* NUMCC <= VTIME */
-# endif /* VTIME */
-# endif /* NUMCC */
-#endif /* !POSIX */
-
-#define C_INTR 0
-#define C_QUIT 1
-#define C_ERASE 2
-#define C_KILL 3
-#define C_EOF 4
-#define C_EOL 5
-#define C_EOL2 6
-#define C_SWTCH 7
-#define C_DSWTCH 8
-#define C_ERASE2 9
-#define C_START 10
-#define C_STOP 11
-#define C_WERASE 12
-#define C_SUSP 13
-#define C_DSUSP 14
-#define C_REPRINT 15
-#define C_DISCARD 16
-#define C_LNEXT 17
-#define C_STATUS 18
-#define C_PAGE 19
-#define C_PGOFF 20
-#define C_KILL2 21
-#define C_BRK 22
-#define C_MIN 23
-#define C_TIME 24
-#define C_NCC 25
-#define C_SH(A) (1 << (A))
-
-/*
- * Terminal dependend data structures
- */
-#define EX_IO 0 /* while we are executing */
-#define ED_IO 1 /* while we are editing */
-#define TS_IO 2 /* new mode from terminal */
-#define QU_IO 2 /* used only for quoted chars */
-#define NN_IO 3 /* The number of entries */
-
-#define M_INP 0
-#define M_OUT 1
-#define M_CTL 2
-#define M_LIN 3
-#define M_CHAR 4
-#define M_NN 5
-
-typedef struct {
- char *t_name;
- u_int t_setmask;
- u_int t_clrmask;
-} ttyperm_t[NN_IO][M_NN];
-
-typedef unsigned char ttychar_t[NN_IO][C_NCC];
-
-protected int tty_init __P((EditLine *));
-protected void tty_end __P((EditLine *));
-protected int tty_stty __P((EditLine *, int, char**));
-protected int tty_rawmode __P((EditLine *));
-protected int tty_cookedmode __P((EditLine *));
-protected int tty_quotemode __P((EditLine *));
-protected int tty_noquotemode __P((EditLine *));
-protected void tty_bind_char __P((EditLine *, int));
-
-typedef struct {
- ttyperm_t t_t;
- ttychar_t t_c;
- struct termios t_ex, t_ed, t_ts;
- int t_tabs;
- int t_eight;
- speed_t t_speed;
- int t_mode;
- unsigned char t_vdisable;
-} el_tty_t;
-
-
-#endif /* _h_el_tty */
diff --git a/lib/libedit/vi.c b/lib/libedit/vi.c
deleted file mode 100644
index 3a8ef05..0000000
--- a/lib/libedit/vi.c
+++ /dev/null
@@ -1,986 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Christos Zoulas of Cornell University.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if !defined(lint) && !defined(SCCSID)
-static char sccsid[] = "@(#)vi.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint && not SCCSID */
-
-/*
- * vi.c: Vi mode commands.
- */
-#include "sys.h"
-#include "el.h"
-
-private el_action_t cv_action __P((EditLine *, int));
-
-/* cv_action():
- * Handle vi actions.
- */
-private el_action_t
-cv_action(el, c)
- EditLine *el;
- int c;
-{
- register char *cp, *kp;
-
- if (el->el_chared.c_vcmd.action & DELETE) {
- el->el_chared.c_vcmd.action = NOP;
- el->el_chared.c_vcmd.pos = 0;
-
- el->el_chared.c_undo.isize = 0;
- el->el_chared.c_undo.dsize = 0;
- kp = el->el_chared.c_undo.buf;
- for (cp = el->el_line.buffer; cp < el->el_line.lastchar; cp++) {
- *kp++ = *cp;
- el->el_chared.c_undo.dsize++;
- }
-
- el->el_chared.c_undo.action = INSERT;
- el->el_chared.c_undo.ptr = el->el_line.buffer;
- el->el_line.lastchar = el->el_line.buffer;
- el->el_line.cursor = el->el_line.buffer;
- if (c & INSERT)
- el->el_map.current = el->el_map.key;
-
- return CC_REFRESH;
- }
-
- el->el_chared.c_vcmd.pos = el->el_line.cursor;
- el->el_chared.c_vcmd.action = c;
- return CC_ARGHACK;
-
-#ifdef notdef
- /*
- * I don't think that this is needed. But we keep it for now
- */
- else if (el_chared.c_vcmd.action == NOP) {
- el->el_chared.c_vcmd.pos = el->el_line.cursor;
- el->el_chared.c_vcmd.action = c;
- return CC_ARGHACK;
- }
- else {
- el->el_chared.c_vcmd.action = 0;
- el->el_chared.c_vcmd.pos = 0;
- return CC_ERROR;
- }
-#endif
-}
-
-
-/* cv_paste():
- * Paste previous deletion before or after the cursor
- */
-protected el_action_t
-cv_paste(el, c)
- EditLine *el;
- int c;
-{
- char *ptr;
- c_undo_t *un = &el->el_chared.c_undo;
-#ifdef DEBUG_PASTE
- (void) fprintf(el->el_errfile, "Paste: %x \"%s\" +%d -%d\n",
- un->action, un->buf, un->isize, un->dsize);
-#endif
- if (un->isize == 0)
- return CC_ERROR;
-
- if (!c && el->el_line.cursor < el->el_line.lastchar)
- el->el_line.cursor++;
- ptr = el->el_line.cursor;
-
- c_insert(el, un->isize);
- if (el->el_line.cursor + un->isize > el->el_line.lastchar)
- return CC_ERROR;
- (void) memcpy(ptr, un->buf, un->isize);
- return CC_REFRESH;
-}
-
-
-/* vi_paste_next():
- * Vi paste previous deletion to the right of the cursor
- * [p]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_paste_next(el, c)
- EditLine *el;
- int c;
-{
- return cv_paste(el, 0);
-}
-
-
-/* vi_paste_prev():
- * Vi paste previous deletion to the left of the cursor
- * [P]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_paste_prev(el, c)
- EditLine *el;
- int c;
-{
- return cv_paste(el, 1);
-}
-
-
-/* vi_prev_space_word():
- * Vi move to the previous space delimited word
- * [B]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_prev_space_word(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor == el->el_line.buffer)
- return CC_ERROR;
-
- el->el_line.cursor = cv_prev_word(el, el->el_line.cursor,
- el->el_line.buffer,
- el->el_state.argument,
- cv__isword);
-
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
-}
-
-
-/* vi_prev_word():
- * Vi move to the previous word
- * [B]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_prev_word(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor == el->el_line.buffer)
- return CC_ERROR;
-
- el->el_line.cursor = cv_prev_word(el, el->el_line.cursor,
- el->el_line.buffer,
- el->el_state.argument,
- ce__isword);
-
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
-}
-
-
-/* vi_next_space_word():
- * Vi move to the next space delimited word
- * [W]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_next_space_word(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor == el->el_line.lastchar)
- return CC_ERROR;
-
- el->el_line.cursor = cv_next_word(el, el->el_line.cursor,
- el->el_line.lastchar,
- el->el_state.argument,
- cv__isword);
-
- if (el->el_map.type == MAP_VI)
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
-}
-
-/* vi_next_word():
- * Vi move to the next word
- * [w]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_next_word(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor == el->el_line.lastchar)
- return CC_ERROR;
-
- el->el_line.cursor = cv_next_word(el, el->el_line.cursor,
- el->el_line.lastchar,
- el->el_state.argument,
- ce__isword);
-
- if (el->el_map.type == MAP_VI)
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
-}
-
-
-
-/* vi_change_case():
- * Vi change case of character under the cursor and advance one character
- * [~]
- */
-protected el_action_t
-vi_change_case(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor < el->el_line.lastchar) {
- c = (unsigned char)*el->el_line.cursor;
- if (isupper(c))
- *el->el_line.cursor++ = tolower(c);
- else if (islower(c))
- *el->el_line.cursor++ = toupper(c);
- else
- el->el_line.cursor++;
- re_fastaddc(el);
- return CC_NORM;
- }
- return CC_ERROR;
-}
-
-
-/* vi_change_meta():
- * Vi change prefix command
- * [c]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_change_meta(el, c)
- EditLine *el;
- int c;
-{
- /*
- * Delete with insert == change: first we delete and then we leave in
- * insert mode.
- */
- return cv_action(el, DELETE|INSERT);
-}
-
-
-/* vi_insert_at_bol():
- * Vi enter insert mode at the beginning of line
- * [I]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_insert_at_bol(el, c)
- EditLine *el;
- int c;
-{
- el->el_line.cursor = el->el_line.buffer;
- el->el_chared.c_vcmd.ins = el->el_line.cursor;
-
- el->el_chared.c_undo.ptr = el->el_line.cursor;
- el->el_chared.c_undo.action = DELETE;
-
- el->el_map.current = el->el_map.key;
- return CC_CURSOR;
-}
-
-
-/* vi_replace_char():
- * Vi replace character under the cursor with the next character typed
- * [r]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_replace_char(el, c)
- EditLine *el;
- int c;
-{
- el->el_map.current = el->el_map.key;
- el->el_state.inputmode = MODE_REPLACE_1;
- el->el_chared.c_undo.action = CHANGE;
- el->el_chared.c_undo.ptr = el->el_line.cursor;
- el->el_chared.c_undo.isize = 0;
- el->el_chared.c_undo.dsize = 0;
- return CC_NORM;
-}
-
-
-/* vi_replace_mode():
- * Vi enter replace mode
- * [R]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_replace_mode(el, c)
- EditLine *el;
- int c;
-{
- el->el_map.current = el->el_map.key;
- el->el_state.inputmode = MODE_REPLACE;
- el->el_chared.c_undo.action = CHANGE;
- el->el_chared.c_undo.ptr = el->el_line.cursor;
- el->el_chared.c_undo.isize = 0;
- el->el_chared.c_undo.dsize = 0;
- return CC_NORM;
-}
-
-
-/* vi_substitute_char():
- * Vi replace character under the cursor and enter insert mode
- * [r]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_substitute_char(el, c)
- EditLine *el;
- int c;
-{
- c_delafter(el, el->el_state.argument);
- el->el_map.current = el->el_map.key;
- return CC_REFRESH;
-}
-
-
-/* vi_substitute_line():
- * Vi substitute entire line
- * [S]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_substitute_line(el, c)
- EditLine *el;
- int c;
-{
- (void) em_kill_line(el, 0);
- el->el_map.current = el->el_map.key;
- return CC_REFRESH;
-}
-
-
-/* vi_change_to_eol():
- * Vi change to end of line
- * [C]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_change_to_eol(el, c)
- EditLine *el;
- int c;
-{
- (void) ed_kill_line(el, 0);
- el->el_map.current = el->el_map.key;
- return CC_REFRESH;
-}
-
-
-/* vi_insert():
- * Vi enter insert mode
- * [i]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_insert(el, c)
- EditLine *el;
- int c;
-{
- el->el_map.current = el->el_map.key;
-
- el->el_chared.c_vcmd.ins = el->el_line.cursor;
- el->el_chared.c_undo.ptr = el->el_line.cursor;
- el->el_chared.c_undo.action = DELETE;
-
- return CC_NORM;
-}
-
-
-/* vi_add():
- * Vi enter insert mode after the cursor
- * [a]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_add(el, c)
- EditLine *el;
- int c;
-{
- int ret;
- el->el_map.current = el->el_map.key;
- if (el->el_line.cursor < el->el_line.lastchar) {
- el->el_line.cursor++;
- if (el->el_line.cursor > el->el_line.lastchar)
- el->el_line.cursor = el->el_line.lastchar;
- ret = CC_CURSOR;
- }
- else
- ret = CC_NORM;
-
- el->el_chared.c_vcmd.ins = el->el_line.cursor;
- el->el_chared.c_undo.ptr = el->el_line.cursor;
- el->el_chared.c_undo.action = DELETE;
-
- return ret;
-}
-
-
-/* vi_add_at_eol():
- * Vi enter insert mode at end of line
- * [A]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_add_at_eol(el, c)
- EditLine *el;
- int c;
-{
- el->el_map.current = el->el_map.key;
- el->el_line.cursor = el->el_line.lastchar;
-
- /* Mark where insertion begins */
- el->el_chared.c_vcmd.ins = el->el_line.lastchar;
- el->el_chared.c_undo.ptr = el->el_line.lastchar;
- el->el_chared.c_undo.action = DELETE;
- return CC_CURSOR;
-}
-
-
-/* vi_delete_meta():
- * Vi delete prefix command
- * [d]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_delete_meta(el, c)
- EditLine *el;
- int c;
-{
- return cv_action(el, DELETE);
-}
-
-
-/* vi_end_word():
- * Vi move to the end of the current space delimited word
- * [E]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_end_word(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor == el->el_line.lastchar)
- return CC_ERROR;
-
- el->el_line.cursor = cv__endword(el->el_line.cursor, el->el_line.lastchar,
- el->el_state.argument);
-
- if (el->el_chared.c_vcmd.action & DELETE) {
- el->el_line.cursor++;
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
-}
-
-
-/* vi_to_end_word():
- * Vi move to the end of the current word
- * [e]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_to_end_word(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_line.cursor == el->el_line.lastchar)
- return CC_ERROR;
-
- el->el_line.cursor = cv__endword(el->el_line.cursor, el->el_line.lastchar,
- el->el_state.argument);
-
- if (el->el_chared.c_vcmd.action & DELETE) {
- el->el_line.cursor++;
- cv_delfini(el);
- return CC_REFRESH;
- }
-
- return CC_CURSOR;
-}
-
-
-/* vi_undo():
- * Vi undo last change
- * [u]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_undo(el, c)
- EditLine *el;
- int c;
-{
- char *cp, *kp;
- char temp;
- int i, size;
- c_undo_t *un = &el->el_chared.c_undo;
-
-#ifdef DEBUG_UNDO
- (void) fprintf(el->el_errfile, "Undo: %x \"%s\" +%d -%d\n",
- un->action, un->buf, un->isize, un->dsize);
-#endif
- switch (un->action) {
- case DELETE:
- if (un->dsize == 0)
- return CC_NORM;
-
- (void) memcpy(un->buf, un->ptr, un->dsize);
- for (cp = un->ptr; cp <= el->el_line.lastchar; cp++)
- *cp = cp[un->dsize];
-
- el->el_line.lastchar -= un->dsize;
- el->el_line.cursor = un->ptr;
-
- un->action = INSERT;
- un->isize = un->dsize;
- un->dsize = 0;
- break;
-
- case DELETE|INSERT:
- size = un->isize - un->dsize;
- if (size > 0)
- i = un->dsize;
- else
- i = un->isize;
- cp = un->ptr;
- kp = un->buf;
- while (i-- > 0) {
- temp = *kp;
- *kp++ = *cp;
- *cp++ = temp;
- }
- if (size > 0) {
- el->el_line.cursor = cp;
- c_insert(el, size);
- while (size-- > 0 && cp < el->el_line.lastchar) {
- temp = *kp;
- *kp++ = *cp;
- *cp++ = temp;
- }
- }
- else if (size < 0) {
- size = -size;
- for (; cp <= el->el_line.lastchar; cp++) {
- *kp++ = *cp;
- *cp = cp[size];
- }
- el->el_line.lastchar -= size;
- }
- el->el_line.cursor = un->ptr;
- i = un->dsize;
- un->dsize = un->isize;
- un->isize = i;
- break;
-
- case INSERT:
- if (un->isize == 0)
- return CC_NORM;
-
- el->el_line.cursor = un->ptr;
- c_insert(el, un->isize);
- memcpy(un->ptr, un->buf, un->isize);
- un->action = DELETE;
- un->dsize = un->isize;
- un->isize = 0;
- break;
-
- case CHANGE:
- if (un->isize == 0)
- return CC_NORM;
-
- el->el_line.cursor = un->ptr;
- size = (int) (el->el_line.cursor - el->el_line.lastchar);
- if (size < un->isize)
- size = un->isize;
- cp = un->ptr;
- kp = un->buf;
- for(i = 0; i < size; i++) {
- temp = *kp;
- *kp++ = *cp;
- *cp++ = temp;
- }
- un->dsize = 0;
- break;
-
- default:
- return CC_ERROR;
- }
-
- return CC_REFRESH;
-}
-
-
-/* vi_command_mode():
- * Vi enter command mode (use alternative key bindings)
- * [<ESC>]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_command_mode(el, c)
- EditLine *el;
- int c;
-{
- int size;
- /* [Esc] cancels pending action */
- el->el_chared.c_vcmd.ins = 0;
- el->el_chared.c_vcmd.action = NOP;
- el->el_chared.c_vcmd.pos = 0;
-
- el->el_state.doingarg = 0;
- size = el->el_chared.c_undo.ptr - el->el_line.cursor;
- if (size < 0)
- size = -size;
- if (el->el_chared.c_undo.action == (INSERT|DELETE) ||
- el->el_chared.c_undo.action == DELETE)
- el->el_chared.c_undo.dsize = size;
- else
- el->el_chared.c_undo.isize = size;
-
- el->el_state.inputmode = MODE_INSERT;
- el->el_map.current = el->el_map.alt;
-#ifdef VI_MOVE
- if (el->el_line.cursor > el->el_line.buffer)
- el->el_line.cursor--;
-#endif
- return CC_CURSOR;
-}
-
-/* vi_zero():
- * Vi move to the beginning of line
- * [0]
- */
-protected el_action_t
-vi_zero(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_state.doingarg) {
- if (el->el_state.argument > 1000000)
- return CC_ERROR;
- el->el_state.argument =
- (el->el_state.argument * 10) + (c - '0');
- return CC_ARGHACK;
- }
- else {
- el->el_line.cursor = el->el_line.buffer;
- if (el->el_chared.c_vcmd.action & DELETE) {
- cv_delfini(el);
- return CC_REFRESH;
- }
- return CC_CURSOR;
- }
-}
-
-
-/* vi_delete_prev_char():
- * Vi move to previous character (backspace)
- * [^H]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_delete_prev_char(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_chared.c_vcmd.ins == 0)
- return CC_ERROR;
-
- if (el->el_chared.c_vcmd.ins >
- el->el_line.cursor - el->el_state.argument)
- return CC_ERROR;
-
- c_delbefore(el, el->el_state.argument);
- el->el_line.cursor -= el->el_state.argument;
-
- return CC_REFRESH;
-} /* end v_del_char_prev */
-
-
-/* vi_list_or_eof():
- * Vi list choices for completion or indicate end of file if empty line
- * [^D]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_list_or_eof(el, c)
- EditLine *el;
- int c;
-{
-#ifdef notyet
- if (el->el_line.cursor == el->el_line.lastchar &&
- el->el_line.cursor == el->el_line.buffer) {
-#endif
- term_overwrite(el, STReof, 4); /* then do a EOF */
- term__flush();
- return CC_EOF;
-#ifdef notyet
- }
- else {
- re_goto_bottom(el);
- *el->el_line.lastchar = '\0'; /* just in case */
- return CC_LIST_CHOICES;
- }
-#endif
-}
-
-
-/* vi_kill_line_prev():
- * Vi cut from beginning of line to cursor
- * [^U]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_kill_line_prev(el, c)
- EditLine *el;
- int c;
-{
- char *kp, *cp;
-
- cp = el->el_line.buffer;
- kp = el->el_chared.c_kill.buf;
- while (cp < el->el_line.cursor)
- *kp++ = *cp++; /* copy it */
- el->el_chared.c_kill.last = kp;
- c_delbefore(el, el->el_line.cursor - el->el_line.buffer);
- el->el_line.cursor = el->el_line.buffer; /* zap! */
- return CC_REFRESH;
-}
-
-
-/* vi_search_prev():
- * Vi search history previous
- * [?]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_search_prev(el, c)
- EditLine *el;
- int c;
-{
- return cv_search(el, ED_SEARCH_PREV_HISTORY);
-}
-
-
-/* vi_search_next():
- * Vi search history next
- * [/]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_search_next(el, c)
- EditLine *el;
- int c;
-{
- return cv_search(el, ED_SEARCH_NEXT_HISTORY);
-}
-
-
-/* vi_repeat_search_next():
- * Vi repeat current search in the same search direction
- * [n]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_repeat_search_next(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_search.patlen == 0)
- return CC_ERROR;
- else
- return cv_repeat_srch(el, el->el_search.patdir);
-}
-
-
-/* vi_repeat_search_prev():
- * Vi repeat current search in the opposite search direction
- * [N]
- */
-/*ARGSUSED*/
-protected el_action_t
-vi_repeat_search_prev(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_search.patlen == 0)
- return CC_ERROR;
- else
- return cv_repeat_srch(el,
- el->el_search.patdir == ED_SEARCH_PREV_HISTORY ?
- ED_SEARCH_NEXT_HISTORY : ED_SEARCH_PREV_HISTORY);
-}
-
-
-/* vi_next_char():
- * Vi move to the character specified next
- * [f]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_next_char(el, c)
- EditLine *el;
- int c;
-{
- char ch;
-
- if (el_getc(el, &ch) != 1)
- return ed_end_of_file(el, 0);
-
- el->el_search.chadir = CHAR_FWD;
- el->el_search.chacha = ch;
-
- return cv_csearch_fwd(el, ch, el->el_state.argument, 0);
-
-}
-
-
-/* vi_prev_char():
- * Vi move to the character specified previous
- * [F]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_prev_char(el, c)
- EditLine *el;
- int c;
-{
- char ch;
-
- if (el_getc(el, &ch) != 1)
- return ed_end_of_file(el, 0);
-
- el->el_search.chadir = CHAR_BACK;
- el->el_search.chacha = ch;
-
- return cv_csearch_back(el, ch, el->el_state.argument, 0);
-}
-
-
-/* vi_to_next_char():
- * Vi move up to the character specified next
- * [t]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_to_next_char(el, c)
- EditLine *el;
- int c;
-{
- char ch;
-
- if (el_getc(el, &ch) != 1)
- return ed_end_of_file(el, 0);
-
- return cv_csearch_fwd(el, ch, el->el_state.argument, 1);
-
-}
-
-
-/* vi_to_prev_char():
- * Vi move up to the character specified previous
- * [T]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_to_prev_char(el, c)
- EditLine *el;
- int c;
-{
- char ch;
- if (el_getc(el, &ch) != 1)
- return ed_end_of_file(el, 0);
-
- return cv_csearch_back(el, ch, el->el_state.argument, 1);
-}
-
-
-/* vi_repeat_next_char():
- * Vi repeat current character search in the same search direction
- * [;]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_repeat_next_char(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_search.chacha == 0)
- return CC_ERROR;
-
- return el->el_search.chadir == CHAR_FWD ?
- cv_csearch_fwd(el, el->el_search.chacha, el->el_state.argument, 0) :
- cv_csearch_back(el, el->el_search.chacha, el->el_state.argument, 0);
-}
-
-
-/* vi_repeat_prev_char():
- * Vi repeat current character search in the opposite search direction
- * [,]
- */
-protected el_action_t
-/*ARGSUSED*/
-vi_repeat_prev_char(el, c)
- EditLine *el;
- int c;
-{
- if (el->el_search.chacha == 0)
- return CC_ERROR;
-
- return el->el_search.chadir == CHAR_BACK ?
- cv_csearch_fwd(el, el->el_search.chacha, el->el_state.argument, 0) :
- cv_csearch_back(el, el->el_search.chacha, el->el_state.argument, 0);
-}
diff --git a/lib/libf2c/Makefile b/lib/libf2c/Makefile
deleted file mode 100644
index e054130..0000000
--- a/lib/libf2c/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-.PATH: ${.CURDIR}/../libF77 ${.CURDIR}/../libI77
-
-LIB=f2c
-CFLAGS+= -DIEEE_drem -DNON_ANSI_RW_MODES -DNON_UNIX_STDIO -DPedantic -I${.CURDIR}/../../usr.bin/f2c
-
-MISC = Version.c main.c s_rnge.c abort_.c getarg_.c iargc_.c getenv_.c\
- signal_.c s_stop.c s_paus.c system_.c cabs.c\
- derf_.c derfc_.c erf_.c erfc_.c sig_die.c F77_aloc.c
-POW = pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c pow_ri.c pow_zi.c pow_zz.c
-CX = c_abs.c c_cos.c c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c
-DCX = z_cos.c z_div.c z_exp.c z_log.c z_sin.c z_sqrt.c
-REAL = r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c r_cnjg.c r_cos.c\
- r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c\
- r_lg10.c r_log.c r_mod.c r_nint.c r_sign.c\
- r_sin.c r_sinh.c r_sqrt.c r_tan.c r_tanh.c
-DBL = d_abs.c d_acos.c d_asin.c d_atan.c d_atn2.c\
- d_cnjg.c d_cos.c d_cosh.c d_dim.c d_exp.c\
- d_imag.c d_int.c d_lg10.c d_log.c d_mod.c\
- d_nint.c d_prod.c d_sign.c d_sin.c d_sinh.c\
- d_sqrt.c d_tan.c d_tanh.c
-INT = i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_mod.c i_nint.c i_sign.c
-HALF = h_abs.c h_dim.c h_dnnt.c h_indx.c h_len.c h_mod.c h_nint.c h_sign.c
-CMP = l_ge.c l_gt.c l_le.c l_lt.c hl_ge.c hl_gt.c hl_le.c hl_lt.c
-EFL = ef1asc_.c ef1cmc_.c
-CHAR = s_cat.c s_cmp.c s_copy.c
-F90BIT = lbitbits.c lbitshft.c
-
-F77SRCS= $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
- $(HALF) $(CMP) $(EFL) $(CHAR) $(F90BIT)
-
-I77SRCS = Version.c backspace.c close.c dfe.c dolio.c due.c endfile.c err.c \
- fmt.c fmtlib.c iio.c ilnw.c inquire.c lread.c lwrite.c open.c \
- rdfmt.c rewind.c rsfe.c rsli.c rsne.c sfe.c sue.c typesize.c uio.c \
- util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c xwsne.c
-
-SRCS= ${F77SRCS} ${I77SRCS}
-
-.include <bsd.lib.mk>
diff --git a/lib/libftpio/Makefile b/lib/libftpio/Makefile
deleted file mode 100644
index ce86c16..0000000
--- a/lib/libftpio/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-LIB= ftpio
-CFLAGS+= -I${.CURDIR} -Wall
-SRCS= ftpio.c ftperr.c
-MAN3= ftpio.3
-CLEANFILES+= ftperr.c
-
-SHLIB_MAJOR= 4
-SHLIB_MINOR= 0
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/ftpio.h \
- ${DESTDIR}/usr/include
-
-ftperr.c: ftp.errors
- @echo '#include <stdio.h>' > ${.TARGET}
- @echo '#include "ftpio.h"' >> ${.TARGET}
- @echo "struct ftperr ftpErrList[] = {" \ >> ${.TARGET}
- @cat ${.ALLSRC} \
- | grep -v ^# \
- | sort \
- | while read NUM STRING; do \
- echo " { $${NUM}, \"$${STRING}\" },"; \
- done >> ${.TARGET}
- @echo "};" >> ${.TARGET}
- @echo -n "int const ftpErrListLength = " >> ${.TARGET}
- @echo "sizeof(ftpErrList) / sizeof(*ftpErrList);" >> ${.TARGET}
-
-.include <bsd.lib.mk>
diff --git a/lib/libftpio/ftp.errors b/lib/libftpio/ftp.errors
deleted file mode 100644
index 26cb4f6..0000000
--- a/lib/libftpio/ftp.errors
+++ /dev/null
@@ -1,44 +0,0 @@
-# $Id$
-#
-# This list is taken from RFC 959.
-# It probably needs a going over.
-#
-110 Restart marker reply
-120 Service ready in a few minutes
-125 Data connection already open; transfer starting
-150 File status okay; about to open data connection
-200 Command okay
-202 Command not implemented, superfluous at this site
-211 System status, or system help reply
-212 Directory status
-213 File status
-214 Help message
-215 Set system type
-220 Service ready for new user
-221 Service closing control connection
-225 Data connection open; no transfer in progress
-226 Requested file action successful
-227 Entering Passive Mode
-230 User logged in, proceed
-250 Requested file action okay, completed
-257 File/directory created
-331 User name okay, need password
-332 Need account for login
-350 Requested file action pending further information
-421 Service not available, closing control connection
-425 Can't open data connection
-426 Connection closed; transfer aborted
-450 File unavailable (e.g., file busy)
-451 Requested action aborted: local error in processing
-452 Insufficient storage space in system
-500 Syntax error, command unrecognized
-501 Syntax error in parameters or arguments
-502 Command not implemented
-503 Bad sequence of commands
-504 Command not implemented for that parameter
-530 Not logged in
-532 Need account for storing files
-550 File unavailable (e.g., file not found, no access)
-551 Requested action aborted. Page type unknown
-552 Exceeded storage allocation
-553 File name not allowed
diff --git a/lib/libftpio/ftpio.3 b/lib/libftpio/ftpio.3
deleted file mode 100644
index 11e7cdb..0000000
--- a/lib/libftpio/ftpio.3
+++ /dev/null
@@ -1,198 +0,0 @@
-.\" Copyright (c) 1996 Jordan Hubbard (jkh@FreeBSD.org)
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id: ftpio.3,v 1.14 1997/02/22 15:06:48 peter Exp $
-.\"
-.Dd June 17, 1996
-.Dt ftpio 3
-.Os
-.Sh NAME
-.Nm ftpLogin ,
-.Nm ftpChdir ,
-.Nm ftpErrno ,
-.Nm ftpGetModtime ,
-.Nm ftpGetSize ,
-.Nm ftpGet ,
-.Nm ftpPut ,
-.Nm ftpBinary ,
-.Nm ftpPassive ,
-.Nm ftpVerbose ,
-.Nm ftpGetURL ,
-.Nm ftpPutURL
-.Nd FTPIO User library
-.Sh SYNOPSIS
-.Fd #include <ftpio.h>
-.Ft FILE *
-.Fn ftpLogin "char *host" "char *user" "char *passwd" "int ftp_port" "int verbose" "int *retcode"
-.Ft int
-.Fn ftpChdir "FILE *stream, char *dirname"
-.Ft int
-.Fn ftpErrno "FILE *stream"
-.Ft const char *
-.Fn ftpErrString "int errno"
-.Ft time_t
-.Fn ftpGetModtime "FILE *stream, char *file"
-.Ft off_t
-.Fn ftpGetSize "FILE *stream, char *file"
-.Ft FILE *
-.Fn ftpGet "FILE *stream, char *file, off_t *seekto"
-.Ft FILE *
-.Fn ftpPut "FILE *stream, char *file"
-.Ft int
-.Fn ftpAscii "FILE *stream"
-.Ft int
-.Fn ftpBinary "FILE *stream"
-.Ft int
-.Fn ftpPassive "FILE *stream, int status"
-.Ft void
-.Fn ftpVerbose "FILE *stream, int status"
-.Ft FILE *
-.Fn ftpGetURL "char *url, char *user, char *passwd, int *retcode"
-.Ft FILE *
-.Fn ftpPutURL "char *url, char *user, char *passwd, int *retcode"
-
-.Sh DESCRIPTION
-These functions implement a high-level library for managing FTP connections.
-.Pp
-.Fn ftpLogin
-attempts to log in using the supplied
-.Fa user ,
-.Fa passwd,
-.Fa ftp_port
-(if passed as 0,
-.Fa ftp_port
-defaults to the standard ftp port of 21) and
-.Fa verbose
-fields. If it is successful, a
-standard stream descriptor is returned which should be passed to
-subsequent FTP operations. On failure, NULL is returned and
-.Fa retcode
-will have the error code returned by the foreign server.
-.Pp
-.Fn ftpChdir
-attempts to issue a server CD command to the directory named in
-.Fa dir.
-On success, zero is returned. On failure, the error code from the server.
-.Pp
-.Fn ftpErrno
-returns the server failure code for the last operation (useful for seeing
-more about what happened if you're familiar with FTP error codes).
-.Fn ftpErrString
-returns a human readable version of the supplied server failure code.
-.Pp
-.Fn ftpGet
-attempts to retreive the file named by the
-.Fa file
-argument (which is assumed to be relative to the FTP server's current directory,
-see
-.Fn ftpChdir )
-and returns a new FILE* pointer for the file or NULL on failure. If
-.Fa seekto
-is non-NULL, the contents of the integer it points to will be used
-as a restart point for the file, that is to say that the stream
-returned will point
-.Fa *seekto
-bytes into the file gotten (this is handy for restarting failed
-transfers efficiently). If the seek operation fails, the value
-of
-.Fa *seekto
-will be zero'd.
-.Pp
-.Fn ftpGetModtime
-returns the last modification time of the file named by the
-.Fa file
-argument. If the file could not be opened or stat'd, 0 is returned.
-.Pp
-.Fn ftpGetSize
-returns the size in bytes of the file named by the
-.Fa file
-argument. If the file could not be opened or stat'd, -1 is returned.
-.Pp
-.Fn ftpPut
-attempts to create a new file named by the
-.Fa file
-argument (which is assumed to be relative to the FTP server's current directory,
-see
-.Fn ftpChdir )
-and returns a new
-.Fa stream
-pointer for the file or NULL on failure.
-.Pp
-.Fn ftpAscii
-sets ascii mode for the current server connection named by
-.Fa stream .
-.Pp
-.Fn ftpBinary
-sets binary mode for the current server connection named by
-.Fa stream .
-.Pp
-.Fn ftpPassive
-sets passive mode (for firewalls) for the current server connection named by
-.Fa stream
-to boolean value
-.Fa status .
-.Pp
-.Fn ftpVerbose
-sets the verbosity mode for the current server connection named by
-.Fa stream
-to boolean value
-.Fa status .
-.Pp
-.Fn ftpGetURL
-attempts to retreive the file named by the supplied
-.Fa URL
-and can be considered equivalent to the combined
-.Fn ftpLogin ,
-.Fn ftpChdir
-and
-.Fn ftpGet
-operations except that no server
-.Fa stream
-is ever returned - the connection to the server closes when
-the file has been completely read. Use the lower-level routines
-if multiple gets are required as it will be far more efficient.
-.Pp
-.Fn ftpPutURL
-attempts to create the file named by the supplied
-.Fa URL
-and can be considered equivalent to the combined
-.Fn ftpLogin ,
-.Fn ftpChdir
-and
-.Fn ftpPut
-operations except that no server stream is ever returned - the connection
-to the server closes when the file has been completely written. Use the
-lower-level routines if multiple puts are required as it will be far more
-efficient.
-.Sh BUGS
-I'm sure you can get this thing's internal state machine confused if
-you really work at it, but so far it's proven itself pretty robust in
-all my tests.
-.Sh HISTORY
-Started life as Poul-Henning Kamp's ftp driver for the system installation
-utility, later significantly mutated into a more general form as an
-extension of stdio by Jordan Hubbard. Also incorporates some ideas and
-extensions from Jean-Marc Zucconi.
-.Sh AUTHORS
-Jordan Hubbard, Poul-Henning Kamp and Jean-Marc Zucconi
diff --git a/lib/libftpio/ftpio.c b/lib/libftpio/ftpio.c
deleted file mode 100644
index 877896c..0000000
--- a/lib/libftpio/ftpio.c
+++ /dev/null
@@ -1,866 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * Major Changelog:
- *
- * Jordan K. Hubbard
- * 17 Jan 1996
- *
- * Turned inside out. Now returns xfers as new file ids, not as a special
- * `state' of FTP_t
- *
- * $Id: ftpio.c,v 1.28 1997/10/02 23:26:03 fenner Exp $
- *
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-
-#include <arpa/inet.h>
-
-#include <ctype.h>
-#include <errno.h>
-#include <ftpio.h>
-#include <netdb.h>
-#include <signal.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#define SUCCESS 0
-#define FAILURE -1
-
-#ifndef TRUE
-#define TRUE (1)
-#define FALSE (0)
-#endif
-
-/* How to see by a given code whether or not the connection has timed out */
-#define FTP_TIMEOUT(code) (FtpTimedOut || code == FTP_TIMED_OUT)
-
-/* Internal routines - deal only with internal FTP_t type */
-static FTP_t ftp_new(void);
-static void check_passive(FILE *fp);
-static int ftp_read_method(void *n, char *buf, int nbytes);
-static int ftp_write_method(void *n, const char *buf, int nbytes);
-static int ftp_close_method(void *n);
-static int writes(int fd, char *s);
-static __inline char *get_a_line(FTP_t ftp);
-static int get_a_number(FTP_t ftp, char **q);
-static int botch(char *func, char *botch_state);
-static int cmd(FTP_t ftp, const char *fmt, ...);
-static int ftp_login_session(FTP_t ftp, char *host, char *user, char *passwd, int port, int verbose);
-static int ftp_file_op(FTP_t ftp, char *operation, char *file, FILE **fp, char *mode, off_t *seekto);
-static int ftp_close(FTP_t ftp);
-static int get_url_info(char *url_in, char *host_ret, int *port_ret, char *name_ret);
-static void ftp_timeout(int sig);
-static void ftp_set_timeout(void);
-static void ftp_clear_timeout(void);
-
-
-/* Global status variable - ick */
-int FtpTimedOut;
-
-/* FTP happy status codes */
-#define FTP_GENERALLY_HAPPY 200
-#define FTP_ASCII_HAPPY FTP_GENERALLY_HAPPY
-#define FTP_BINARY_HAPPY FTP_GENERALLY_HAPPY
-#define FTP_PORT_HAPPY FTP_GENERALLY_HAPPY
-#define FTP_HAPPY_COMMENT 220
-#define FTP_QUIT_HAPPY 221
-#define FTP_TRANSFER_HAPPY 226
-#define FTP_PASSIVE_HAPPY 227
-#define FTP_CHDIR_HAPPY 250
-
-/* FTP unhappy status codes */
-#define FTP_TIMED_OUT 421
-
-/*
- * XXX
- * gross! evil! bad! We really need an access primitive for cookie in stdio itself.
- * it's too convenient a hook to bury and it's already exported through funopen as it is, so...
- * XXX
- */
-#define fcookie(fp) ((fp)->_cookie)
-
-/* Placeholder in case we want to do any pre-init stuff at some point */
-int
-networkInit()
-{
- return SUCCESS; /* XXX dummy function for now XXX */
-}
-
-/* Check a return code with some lenience for back-dated garbage that might be in the buffer */
-static int
-check_code(FTP_t ftp, int var, int preferred)
-{
- ftp->error = 0;
- while (1) {
- if (var == preferred)
- return 0;
- else if (var == FTP_TRANSFER_HAPPY) /* last operation succeeded */
- var = get_a_number(ftp, NULL);
- else if (var == FTP_HAPPY_COMMENT) /* chit-chat */
- var = get_a_number(ftp, NULL);
- else if (var == FTP_GENERALLY_HAPPY) /* general success code */
- var = get_a_number(ftp, NULL);
- else {
- ftp->error = var;
- return 1;
- }
- }
-}
-
-int
-ftpAscii(FILE *fp)
-{
- FTP_t ftp = fcookie(fp);
- int i;
-
- if (!ftp->is_binary)
- return SUCCESS;
- i = cmd(ftp, "TYPE A");
- if (i < 0 || check_code(ftp, i, FTP_ASCII_HAPPY))
- return i;
- ftp->is_binary = FALSE;
- return SUCCESS;
-}
-
-int
-ftpBinary(FILE *fp)
-{
- FTP_t ftp = fcookie(fp);
- int i;
-
- if (ftp->is_binary)
- return SUCCESS;
- i = cmd(ftp, "TYPE I");
- if (i < 0 || check_code(ftp, i, FTP_BINARY_HAPPY))
- return i;
- ftp->is_binary = TRUE;
- return SUCCESS;
-}
-void
-ftpVerbose(FILE *fp, int status)
-{
- FTP_t ftp = fcookie(fp);
- ftp->is_verbose = status;
-}
-
-int
-ftpChdir(FILE *fp, char *dir)
-{
- int i;
- FTP_t ftp = fcookie(fp);
-
- i = cmd(ftp, "CWD %s", dir);
- if (i < 0 || check_code(ftp, i, FTP_CHDIR_HAPPY))
- return i;
- return SUCCESS;
-}
-
-int
-ftpErrno(FILE *fp)
-{
- FTP_t ftp = fcookie(fp);
- return ftp->error;
-}
-
-const char *
-ftpErrString(int error)
-{
- int k;
-
- if (error == -1)
- return("connection in wrong state");
- if (error < 100)
- /* XXX soon UNIX errnos will catch up with FTP protocol errnos */
- return strerror(error);
- for (k = 0; k < ftpErrListLength; k++)
- if (ftpErrList[k].num == error)
- return(ftpErrList[k].string);
- return("Unknown error");
-}
-
-off_t
-ftpGetSize(FILE *fp, char *name)
-{
- int i;
- char p[BUFSIZ], *cp, *ep;
- FTP_t ftp = fcookie(fp);
- off_t size;
-
- check_passive(fp);
- sprintf(p, "SIZE %s\r\n", name);
- if (ftp->is_verbose)
- fprintf(stderr, "Sending %s", p);
- if (writes(ftp->fd_ctrl, p))
- return (off_t)-1;
- i = get_a_number(ftp, &cp);
- if (check_code(ftp, i, 213))
- return (off_t)-1;
-
- errno = 0; /* to check for ERANGE */
- size = (off_t)strtoq(cp, &ep, 10);
- if (*ep != '\0' || errno == ERANGE)
- return (off_t)-1;
- return size;
-}
-
-time_t
-ftpGetModtime(FILE *fp, char *name)
-{
- char p[BUFSIZ], *cp;
- struct tm t;
- time_t t0 = time (0);
- FTP_t ftp = fcookie(fp);
- int i;
-
- check_passive(fp);
- sprintf(p, "MDTM %s\r\n", name);
- if (ftp->is_verbose)
- fprintf(stderr, "Sending %s", p);
- if (writes(ftp->fd_ctrl, p))
- return (time_t)0;
- i = get_a_number(ftp, &cp);
- if (check_code(ftp, i, 213))
- return (time_t)0;
- while (*cp && !isdigit(*cp))
- cp++;
- if (!*cp)
- return (time_t)0;
- t0 = localtime (&t0)->tm_gmtoff;
- sscanf(cp, "%04d%02d%02d%02d%02d%02d", &t.tm_year, &t.tm_mon, &t.tm_mday, &t.tm_hour, &t.tm_min, &t.tm_sec);
- t.tm_mon--;
- t.tm_year -= 1900;
- t.tm_isdst=-1;
- t.tm_gmtoff = 0;
- t0 += mktime (&t);
- return t0;
-}
-
-FILE *
-ftpGet(FILE *fp, char *file, off_t *seekto)
-{
- FILE *fp2;
- FTP_t ftp = fcookie(fp);
-
- check_passive(fp);
- if (ftpBinary(fp) != SUCCESS)
- return NULL;
-
- if (ftp_file_op(ftp, "RETR", file, &fp2, "r", seekto) == SUCCESS)
- return fp2;
- return NULL;
-}
-
-/* Returns a standard FILE pointer type representing an open control connection */
-FILE *
-ftpLogin(char *host, char *user, char *passwd, int port, int verbose, int *retcode)
-{
- FTP_t n;
- FILE *fp;
-
- if (retcode)
- *retcode = 0;
- if (networkInit() != SUCCESS)
- return NULL;
-
- n = ftp_new();
- fp = NULL;
- if (n && ftp_login_session(n, host, user, passwd, port, verbose) == SUCCESS) {
- fp = funopen(n, ftp_read_method, ftp_write_method, NULL, ftp_close_method); /* BSD 4.4 function! */
- fp->_file = n->fd_ctrl;
- }
- if (retcode) {
- if (!n)
- *retcode = (FtpTimedOut ? FTP_TIMED_OUT : -1);
- /* Poor attempt at mapping real errnos to FTP error codes */
- else switch(n->error) {
- case EADDRNOTAVAIL:
- *retcode = FTP_TIMED_OUT; /* Actually no such host, but we have no way of saying that. :-( */
- break;
-
- case ETIMEDOUT:
- *retcode = FTP_TIMED_OUT;
- break;
-
- default:
- *retcode = n->error;
- break;
- }
- }
- return fp;
-}
-
-FILE *
-ftpPut(FILE *fp, char *file)
-{
- FILE *fp2;
- FTP_t ftp = fcookie(fp);
-
- check_passive(fp);
- if (ftp_file_op(ftp, "STOR", file, &fp2, "w", NULL) == SUCCESS)
- return fp2;
- return NULL;
-}
-
-/* Unlike binary mode, passive mode is a toggle! :-( */
-int
-ftpPassive(FILE *fp, int st)
-{
- FTP_t ftp = fcookie(fp);
- int i;
-
- if (ftp->is_passive == st)
- return SUCCESS;
- i = cmd(ftp, "PASV");
- if (i < 0)
- return i;
- ftp->is_passive = !ftp->is_passive;
- return SUCCESS;
-}
-
-FILE *
-ftpGetURL(char *url, char *user, char *passwd, int *retcode)
-{
- char host[255], name[255];
- int port;
- FILE *fp2;
- static FILE *fp = NULL;
- static char *prev_host;
-
- if (retcode)
- *retcode = 0;
- if (get_url_info(url, host, &port, name) == SUCCESS) {
- if (fp && prev_host) {
- if (!strcmp(prev_host, host)) {
- /* Try to use cached connection */
- fp2 = ftpGet(fp, name, NULL);
- if (!fp2) {
- /* Connection timed out or was no longer valid */
- fclose(fp);
- free(prev_host);
- prev_host = NULL;
- }
- else
- return fp2;
- }
- else {
- /* It's a different host now, flush old */
- fclose(fp);
- free(prev_host);
- prev_host = NULL;
- }
- }
- fp = ftpLogin(host, user, passwd, port, 0, retcode);
- if (fp) {
- fp2 = ftpGet(fp, name, NULL);
- if (!fp2) {
- /* Connection timed out or was no longer valid */
- if (retcode)
- *retcode = ftpErrno(fp);
- fclose(fp);
- fp = NULL;
- }
- else
- prev_host = strdup(host);
- return fp2;
- }
- }
- return NULL;
-}
-
-FILE *
-ftpPutURL(char *url, char *user, char *passwd, int *retcode)
-{
- char host[255], name[255];
- int port;
- static FILE *fp = NULL;
- FILE *fp2;
-
- if (retcode)
- *retcode = 0;
- if (fp) { /* Close previous managed connection */
- fclose(fp);
- fp = NULL;
- }
- if (get_url_info(url, host, &port, name) == SUCCESS) {
- fp = ftpLogin(host, user, passwd, port, 0, retcode);
- if (fp) {
- fp2 = ftpPut(fp, name);
- if (!fp2) {
- if (retcode)
- *retcode = ftpErrno(fp);
- fclose(fp);
- fp = NULL;
- }
- return fp2;
- }
- }
- return NULL;
-}
-
-/* Internal workhorse function for dissecting URLs. Takes a URL as the first argument and returns the
- result of such disection in the host, user, passwd, port and name variables. */
-static int
-get_url_info(char *url_in, char *host_ret, int *port_ret, char *name_ret)
-{
- char *name, *host, *cp, url[BUFSIZ];
- int port;
-
- name = host = NULL;
- /* XXX add http:// here or somewhere reasonable at some point XXX */
- if (strncmp("ftp://", url_in, 6) != 0)
- return FAILURE;
- /* We like to stomp a lot on the URL string in dissecting it, so copy it first */
- strncpy(url, url_in, BUFSIZ);
- host = url + 6;
- if ((cp = index(host, ':')) != NULL) {
- *(cp++) = '\0';
- port = strtol(cp, 0, 0);
- }
- else
- port = 0; /* use default */
- if (port_ret)
- *port_ret = port;
-
- if ((name = index(cp ? cp : host, '/')) != NULL)
- *(name++) = '\0';
- if (host_ret)
- strcpy(host_ret, host);
- if (name && name_ret)
- strcpy(name_ret, name);
- return SUCCESS;
-}
-
-static FTP_t
-ftp_new(void)
-{
- FTP_t ftp;
-
- ftp = (FTP_t)malloc(sizeof *ftp);
- if (!ftp)
- return NULL;
- memset(ftp, 0, sizeof *ftp);
- ftp->fd_ctrl = -1;
- ftp->con_state = init;
- ftp->is_binary = FALSE;
- ftp->is_passive = FALSE;
- ftp->is_verbose = FALSE;
- ftp->error = 0;
- return ftp;
-}
-
-static int
-ftp_read_method(void *vp, char *buf, int nbytes)
-{
- int i, fd;
- FTP_t n = (FTP_t)vp;
-
- fd = n->fd_ctrl;
- i = (fd >= 0) ? read(fd, buf, nbytes) : EOF;
- return i;
-}
-
-static int
-ftp_write_method(void *vp, const char *buf, int nbytes)
-{
- int i, fd;
- FTP_t n = (FTP_t)vp;
-
- fd = n->fd_ctrl;
- i = (fd >= 0) ? write(fd, buf, nbytes) : EOF;
- return i;
-}
-
-static int
-ftp_close_method(void *n)
-{
- int i;
-
- i = ftp_close((FTP_t)n);
- free(n);
- return i;
-}
-
-static void
-check_passive(FILE *fp)
-{
- if (getenv("FTP_PASSIVE_MODE"))
- ftpPassive(fp, TRUE);
-}
-
-static void
-ftp_timeout(int sig)
-{
- FtpTimedOut = TRUE;
- /* Debug("ftp_pkg: ftp_timeout called - operation timed out"); */
-}
-
-static struct sigaction new;
-
-static void
-ftp_set_timeout(void)
-{
- char *cp;
- int ival;
-
- FtpTimedOut = FALSE;
- new.sa_handler = ftp_timeout;
- sigaction(SIGALRM, &new, NULL);
- cp = getenv("FTP_TIMEOUT");
- if (!cp || !(ival = atoi(cp)))
- ival = 120;
- alarm(ival);
-}
-
-static void
-ftp_clear_timeout(void)
-{
- alarm(0);
- new.sa_handler = SIG_DFL;
- sigaction(SIGALRM, &new, NULL);
-}
-
-static int
-writes(int fd, char *s)
-{
- int n, i = strlen(s);
-
- ftp_set_timeout();
- n = write(fd, s, i);
- ftp_clear_timeout();
- if (FtpTimedOut || i != n)
- return TRUE;
- return FALSE;
-}
-
-static __inline char *
-get_a_line(FTP_t ftp)
-{
- static char buf[BUFSIZ];
- int i,j;
-
- /* Debug("ftp_pkg: trying to read a line from %d", ftp->fd_ctrl); */
- for(i = 0; i < BUFSIZ;) {
- ftp_set_timeout();
- j = read(ftp->fd_ctrl, buf + i, 1);
- ftp_clear_timeout();
- if (FtpTimedOut || j != 1)
- return NULL;
- if (buf[i] == '\r' || buf[i] == '\n') {
- if (!i)
- continue;
- buf[i] = '\0';
- if (ftp->is_verbose == TRUE)
- fprintf(stderr, "%s\n",buf+4);
- return buf;
- }
- i++;
- }
- /* Debug("ftp_pkg: read string \"%s\" from %d", buf, ftp->fd_ctrl); */
- return buf;
-}
-
-static int
-get_a_number(FTP_t ftp, char **q)
-{
- char *p;
- int i = -1, j;
-
- while(1) {
- p = get_a_line(ftp);
- if (!p) {
- ftp_close(ftp);
- if (FtpTimedOut)
- return FTP_TIMED_OUT;
- return FAILURE;
- }
- if (!(isdigit(p[0]) && isdigit(p[1]) && isdigit(p[2])))
- continue;
- if (i == -1 && p[3] == '-') {
- i = strtol(p, 0, 0);
- continue;
- }
- if (p[3] != ' ' && p[3] != '\t')
- continue;
- j = strtol(p, 0, 0);
- if (i == -1) {
- if (q) *q = p+4;
- /* Debug("ftp_pkg: read reply %d from server (%s)", j, p); */
- return j;
- } else if (j == i) {
- if (q) *q = p+4;
- /* Debug("ftp_pkg: read reply %d from server (%s)", j, p); */
- return j;
- }
- }
-}
-
-static int
-ftp_close(FTP_t ftp)
-{
- int i, rcode;
-
- rcode = FAILURE;
- if (ftp->con_state == isopen) {
- ftp->con_state = quit;
- /* If last operation timed out, don't try to quit - just close */
- if (ftp->error != FTP_TIMED_OUT)
- i = cmd(ftp, "QUIT");
- else
- i = FTP_QUIT_HAPPY;
- if (!check_code(ftp, i, FTP_QUIT_HAPPY))
- rcode = SUCCESS;
- close(ftp->fd_ctrl);
- ftp->fd_ctrl = -1;
- }
- else if (ftp->con_state == quit)
- rcode = SUCCESS;
- return rcode;
-}
-
-static int
-botch(char *func, char *botch_state)
-{
- /* Debug("ftp_pkg: botch: %s(%s)", func, botch_state); */
- return FAILURE;
-}
-
-static int
-cmd(FTP_t ftp, const char *fmt, ...)
-{
- char p[BUFSIZ];
- int i;
-
- va_list ap;
- va_start(ap, fmt);
- (void)vsnprintf(p, sizeof p, fmt, ap);
- va_end(ap);
-
- if (ftp->con_state == init)
- return botch("cmd", "open");
-
- strcat(p, "\r\n");
- if (ftp->is_verbose)
- fprintf(stderr, "Sending: %s", p);
- if (writes(ftp->fd_ctrl, p)) {
- if (FtpTimedOut)
- return FTP_TIMED_OUT;
- return FAILURE;
- }
- while ((i = get_a_number(ftp, NULL)) == FTP_HAPPY_COMMENT);
- return i;
-}
-
-static int
-ftp_login_session(FTP_t ftp, char *host, char *user, char *passwd, int port, int verbose)
-{
- struct hostent *he = NULL;
- struct sockaddr_in sin;
- int s;
- unsigned long temp;
- int i;
-
- if (networkInit() != SUCCESS)
- return FAILURE;
-
- if (ftp->con_state != init) {
- ftp_close(ftp);
- ftp->error = -1;
- return FAILURE;
- }
-
- if (!user)
- user = "ftp";
-
- if (!passwd)
- passwd = "setup@";
-
- if (!port)
- port = 21;
-
- temp = inet_addr(host);
- if (temp != INADDR_NONE) {
- ftp->addrtype = sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = temp;
- }
- else {
- he = gethostbyname(host);
- if (!he) {
- ftp->error = 0;
- return FAILURE;
- }
- ftp->addrtype = sin.sin_family = he->h_addrtype;
- bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
- }
-
- sin.sin_port = htons(port);
-
- if ((s = socket(ftp->addrtype, SOCK_STREAM, 0)) < 0) {
- ftp->error = -1;
- return FAILURE;
- }
-
- if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
- (void)close(s);
- ftp->error = errno;
- return FAILURE;
- }
-
- ftp->fd_ctrl = s;
- ftp->con_state = isopen;
- ftp->is_verbose = verbose;
-
- i = cmd(ftp, "USER %s", user);
- if (i >= 300 && i < 400)
- i = cmd(ftp, "PASS %s", passwd);
- if (i >= 299 || i < 0) {
- ftp_close(ftp);
- if (i > 0)
- ftp->error = i;
- return FAILURE;
- }
- return SUCCESS;
-}
-
-static int
-ftp_file_op(FTP_t ftp, char *operation, char *file, FILE **fp, char *mode, off_t *seekto)
-{
- int i,s;
- char *q;
- unsigned char addr[64];
- struct sockaddr_in sin;
- u_long a;
-
- if (!fp)
- return FAILURE;
- *fp = NULL;
-
- if (ftp->con_state != isopen)
- return botch("ftp_file_op", "open");
-
- if ((s = socket(ftp->addrtype, SOCK_STREAM, 0)) < 0) {
- ftp->error = errno;
- return FAILURE;
- }
-
- if (ftp->is_passive) {
- if (ftp->is_verbose)
- fprintf(stderr, "Sending PASV\n");
- if (writes(ftp->fd_ctrl, "PASV\r\n")) {
- ftp_close(ftp);
- if (FtpTimedOut)
- ftp->error = FTP_TIMED_OUT;
- return FTP_TIMED_OUT;
- }
- i = get_a_number(ftp, &q);
- if (check_code(ftp, i, FTP_PASSIVE_HAPPY)) {
- ftp_close(ftp);
- return i;
- }
- while (*q && !isdigit(*q))
- q++;
- if (!*q) {
- ftp_close(ftp);
- return FAILURE;
- }
- q--;
- for (i = 0; i < 6; i++) {
- q++;
- addr[i] = strtol(q, &q, 10);
- }
-
- sin.sin_family = ftp->addrtype;
- bcopy(addr, (char *)&sin.sin_addr, 4);
- bcopy(addr + 4, (char *)&sin.sin_port, 2);
- if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
- (void)close(s);
- return FAILURE;
- }
-
- if (seekto && *seekto) {
- i = cmd(ftp, "REST %d", *seekto);
- if (i < 0 || FTP_TIMEOUT(i)) {
- close(s);
- ftp->error = i;
- *seekto = (off_t)0;
- return i;
- }
- }
- i = cmd(ftp, "%s %s", operation, file);
- if (i < 0 || i > 299) {
- close(s);
- ftp->error = i;
- return i;
- }
- *fp = fdopen(s, mode);
- }
- else {
- int fd;
-
- i = sizeof sin;
- getsockname(ftp->fd_ctrl, (struct sockaddr *)&sin, &i);
- sin.sin_port = 0;
- i = sizeof sin;
- if (bind(s, (struct sockaddr *)&sin, i) < 0) {
- close(s);
- return FAILURE;
- }
- getsockname(s,(struct sockaddr *)&sin,&i);
- if (listen(s, 1) < 0) {
- close(s);
- return FAILURE;
- }
- a = ntohl(sin.sin_addr.s_addr);
- i = cmd(ftp, "PORT %d,%d,%d,%d,%d,%d",
- (a >> 24) & 0xff,
- (a >> 16) & 0xff,
- (a >> 8) & 0xff,
- a & 0xff,
- (ntohs(sin.sin_port) >> 8) & 0xff,
- ntohs(sin.sin_port) & 0xff);
- if (check_code(ftp, i, FTP_PORT_HAPPY)) {
- close(s);
- return i;
- }
- if (seekto && *seekto) {
- i = cmd(ftp, "REST %d", *seekto);
- if (i < 0 || FTP_TIMEOUT(i)) {
- close(s);
- ftp->error = i;
- return i;
- }
- else if (i != 350)
- *seekto = (off_t)0;
- }
- i = cmd(ftp, "%s %s", operation, file);
- if (i < 0 || i > 299) {
- close(s);
- ftp->error = i;
- return FAILURE;
- }
- fd = accept(s, 0, 0);
- if (fd < 0) {
- close(s);
- ftp->error = 401;
- return FAILURE;
- }
- close(s);
- *fp = fdopen(fd, mode);
- }
- if (*fp)
- return SUCCESS;
- else
- return FAILURE;
-}
diff --git a/lib/libftpio/ftpio.h b/lib/libftpio/ftpio.h
deleted file mode 100644
index 41e7c1e..0000000
--- a/lib/libftpio/ftpio.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef _FTP_H_INCLUDE
-#define _FTP_H_INCLUDE
-
-#include <sys/types.h>
-#include <sys/cdefs.h>
-#include <stdio.h>
-#include <time.h>
-
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * Major Changelog:
- *
- * Jordan K. Hubbard
- * 17 Jan 1996
- *
- * Turned inside out. Now returns xfers as new file ids, not as a special
- * `state' of FTP_t
- *
- * $Id: ftpio.h,v 1.13 1997/05/05 11:18:55 jkh Exp $
- */
-
-/* Internal housekeeping data structure for FTP sessions */
-typedef struct {
- enum { init, isopen, quit } con_state;
- int fd_ctrl;
- int addrtype;
- char *host;
- char *file;
- int error;
- int is_binary;
- int is_passive;
- int is_verbose;
-} *FTP_t;
-
-/* Structure we use to match FTP error codes with readable strings */
-struct ftperr {
- const int num;
- const char *string;
-};
-
-__BEGIN_DECLS
-extern struct ftperr ftpErrList[];
-extern int const ftpErrListLength;
-
-/* Exported routines - deal only with FILE* type */
-extern FILE *ftpLogin(char *host, char *user, char *passwd, int port, int verbose, int *retcode);
-extern int ftpChdir(FILE *fp, char *dir);
-extern int ftpErrno(FILE *fp);
-extern off_t ftpGetSize(FILE *fp, char *file);
-extern FILE *ftpGet(FILE *fp, char *file, off_t *seekto);
-extern FILE *ftpPut(FILE *fp, char *file);
-extern int ftpAscii(FILE *fp);
-extern int ftpBinary(FILE *fp);
-extern int ftpPassive(FILE *fp, int status);
-extern void ftpVerbose(FILE *fp, int status);
-extern FILE *ftpGetURL(char *url, char *user, char *passwd, int *retcode);
-extern FILE *ftpPutURL(char *url, char *user, char *passwd, int *retcode);
-extern time_t ftpGetModtime(FILE *fp, char *s);
-extern const char *ftpErrString(int error);
-__END_DECLS
-
-#endif /* _FTP_H_INCLUDE */
diff --git a/lib/libgnumalloc/Makefile b/lib/libgnumalloc/Makefile
deleted file mode 100644
index 9d30fa2..0000000
--- a/lib/libgnumalloc/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-# $Id$
-
-LIB= gnumalloc
-INTERNALLIB= yes # Do not build or install ${LIB}*.a
-SHLIB_MAJOR= 2
-SHLIB_MINOR= 0
-
-SRCS= cfree.c
-
-#
-# Before complaining about this, please *double-check* that you have
-# updated the ldconfig path in /etc/rc to include /usr/lib/compat that
-# was added in src/etc/rc rev 1.98.
-# This is so that programs that use autoconf will not "detect" -lgnumalloc
-# and continue to propagate the bogosity. The ldconfig path fix will enable
-# you to run programs that were linked with -lgnumalloc (such as XFree86).
-#
-beforeinstall:
- rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.a \
- ${DESTDIR}${LIBDIR}/lib${LIB}_p.a \
- ${DESTDIR}${ORIG_SHLIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
-
-.include <bsd.lib.mk>
-
-# This must follow the .include in case SHLIBDIR is defined there.
-ORIG_SHLIBDIR:= ${SHLIBDIR}
-
-# The ldconfig line in/etc/rc doesn't depend on ${LIBDIR} or ${SHLIBDIR},
-# so neither does this.
-SHLIBDIR= /usr/lib/compat
diff --git a/lib/libgnumalloc/cfree.c b/lib/libgnumalloc/cfree.c
deleted file mode 100644
index 5191fd6..0000000
--- a/lib/libgnumalloc/cfree.c
+++ /dev/null
@@ -1,5 +0,0 @@
-void
-cfree(void *foo)
-{
- free(foo);
-}
diff --git a/lib/libipx/Makefile b/lib/libipx/Makefile
deleted file mode 100644
index 04665ba..0000000
--- a/lib/libipx/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-LIB= ipx
-#CFLAGS+=-DLIBC_SCCS -I${.CURDIR}/../../sys
-SRCS= ipx_addr.c ipx_ntoa.c
-
-MAN3= ipx.3
-
-MLINKS+=ipx.3 ipx_addr.3 ipx.3 ipx_ntoa.3
-
-.include <bsd.lib.mk>
diff --git a/lib/libipx/ipx.3 b/lib/libipx/ipx.3
deleted file mode 100644
index cf68ffd..0000000
--- a/lib/libipx/ipx.3
+++ /dev/null
@@ -1,125 +0,0 @@
-.\" Copyright (c) 1986, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\"
-.Dd June 4, 1993
-.Dt IPX 3
-.Os BSD 4.3
-.Sh NAME
-.Nm ipx_addr ,
-.Nm ipx_ntoa
-.Nd IPX address conversion routines
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <netipx/ipx.h>
-.Ft struct ipx_addr
-.Fn ipx_addr "const char *cp"
-.Ft char *
-.Fn ipx_ntoa "struct ipx_addr ipx"
-.Sh DESCRIPTION
-The routine
-.Fn ipx_addr
-interprets character strings representing
-.Tn IPX
-addresses, returning binary information suitable
-for use in system calls.
-The routine
-.Fn ipx_ntoa
-takes
-.Tn IPX
-addresses and returns
-.Tn ASCII
-strings representing the address in a
-notation in common use:
-.Bd -filled -offset indent
-<network number>.<host number>.<port number>
-.Ed
-.Pp
-Trailing zero fields are suppressed, and each number is printed in hexadecimal,
-in a format suitable for input to
-.Fn ipx_addr .
-Any fields lacking super-decimal digits will have a
-trailing
-.Ql H
-appended.
-.Pp
-An effort has been made to insure that
-.Fn ipx_addr
-be compatible with most formats in common use.
-It will first separate an address into 1 to 3 fields using a single delimiter
-chosen from
-period
-.Ql \&. ,
-colon
-.Ql \&:
-or pound-sign
-.Ql \&# .
-Each field is then examined for byte separators (colon or period).
-If there are byte separators, each subfield separated is taken to be
-a small hexadecimal number, and the entirety is taken as a network-byte-ordered
-quantity to be zero extended in the high-network-order bytes.
-Next, the field is inspected for hyphens, in which case
-the field is assumed to be a number in decimal notation
-with hyphens separating the millenia.
-Next, the field is assumed to be a number:
-It is interpreted
-as hexadecimal if there is a leading
-.Ql 0x
-(as in C),
-a trailing
-.Ql H
-(as in Mesa), or there are any super-decimal digits present.
-It is interpreted as octal is there is a leading
-.Ql 0
-and there are no super-octal digits.
-Otherwise, it is converted as a decimal number.
-.Sh RETURN VALUES
-None. (See
-.Sx BUGS . )
-.Sh SEE ALSO
-.\" .Xr ns 4 ,
-.Xr hosts 5 ,
-.Xr networks 5
-.Sh HISTORY
-The precursor
-.Fn ns_addr
-and
-.Fn ns_toa
-functions appeared in
-.Bx 4.3 .
-.Sh BUGS
-The string returned by
-.Fn ipx_ntoa
-resides in a static memory area.
-The function
-.Fn ipx_addr
-should diagnose improperly formed input, and there should be an unambiguous
-way to recognize this.
diff --git a/lib/libipx/ipx_addr.c b/lib/libipx/ipx_addr.c
deleted file mode 100644
index b83f8be..0000000
--- a/lib/libipx/ipx_addr.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * J.Q. Johnson.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ipx_addr.c";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netipx/ipx.h>
-#include <stdio.h>
-#include <string.h>
-
-static struct ipx_addr addr, zero_addr;
-
-static void Field(), cvtbase();
-
-struct ipx_addr
-ipx_addr(name)
- const char *name;
-{
- char separator;
- char *hostname, *socketname, *cp;
- char buf[50];
-
- (void)strncpy(buf, name, sizeof(buf) - 1);
- buf[sizeof(buf) - 1] = '\0';
-
- /*
- * First, figure out what he intends as a field separtor.
- * Despite the way this routine is written, the prefered
- * form 2-272.AA001234H.01777, i.e. XDE standard.
- * Great efforts are made to insure backward compatability.
- */
- if ( (hostname = strchr(buf, '#')) )
- separator = '#';
- else {
- hostname = strchr(buf, '.');
- if ((cp = strchr(buf, ':')) &&
- ((hostname && cp < hostname) || (hostname == 0))) {
- hostname = cp;
- separator = ':';
- } else
- separator = '.';
- }
- if (hostname)
- *hostname++ = 0;
-
- addr = zero_addr;
- Field(buf, addr.x_net.c_net, 4);
- if (hostname == 0)
- return (addr); /* No separator means net only */
-
- socketname = strchr(hostname, separator);
- if (socketname) {
- *socketname++ = 0;
- Field(socketname, (u_char *)&addr.x_port, 2);
- }
-
- Field(hostname, addr.x_host.c_host, 6);
-
- return (addr);
-}
-
-static void
-Field(buf, out, len)
- char *buf;
- u_char *out;
- int len;
-{
- register char *bp = buf;
- int i, ibase, base16 = 0, base10 = 0, clen = 0;
- int hb[6], *hp;
- char *fmt;
-
- /*
- * first try 2-273#2-852-151-014#socket
- */
- if ((*buf != '-') &&
- (1 < (i = sscanf(buf, "%d-%d-%d-%d-%d",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4])))) {
- cvtbase(1000L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0.0.AA.0.5E.E6#socket
- */
- if (1 < (i = sscanf(buf,"%x.%x.%x.%x.%x.%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * try form 8E1#0:0:AA:0:5E:E6#socket
- */
- if (1 < (i = sscanf(buf,"%x:%x:%x:%x:%x:%x",
- &hb[0], &hb[1], &hb[2], &hb[3], &hb[4], &hb[5]))) {
- cvtbase(256L, 256, hb, i, out, len);
- return;
- }
- /*
- * This is REALLY stretching it but there was a
- * comma notation separting shorts -- definitely non standard
- */
- if (1 < (i = sscanf(buf,"%x,%x,%x",
- &hb[0], &hb[1], &hb[2]))) {
- hb[0] = htons(hb[0]); hb[1] = htons(hb[1]);
- hb[2] = htons(hb[2]);
- cvtbase(65536L, 256, hb, i, out, len);
- return;
- }
-
- /* Need to decide if base 10, 16 or 8 */
- while (*bp) switch (*bp++) {
-
- case '0': case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '-':
- break;
-
- case '8': case '9':
- base10 = 1;
- break;
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- base16 = 1;
- break;
-
- case 'x': case 'X':
- *--bp = '0';
- base16 = 1;
- break;
-
- case 'h': case 'H':
- base16 = 1;
- /* fall into */
-
- default:
- *--bp = 0; /* Ends Loop */
- }
- if (base16) {
- fmt = "%3x";
- ibase = 4096;
- } else if (base10 == 0 && *buf == '0') {
- fmt = "%3o";
- ibase = 512;
- } else {
- fmt = "%3d";
- ibase = 1000;
- }
-
- for (bp = buf; *bp++; ) clen++;
- if (clen == 0) clen++;
- if (clen > 18) clen = 18;
- i = ((clen - 1) / 3) + 1;
- bp = clen + buf - 3;
- hp = hb + i - 1;
-
- while (hp > hb) {
- (void)sscanf(bp, fmt, hp);
- bp[0] = 0;
- hp--;
- bp -= 3;
- }
- (void)sscanf(buf, fmt, hp);
- cvtbase((long)ibase, 256, hb, i, out, len);
-}
-
-static void
-cvtbase(oldbase,newbase,input,inlen,result,reslen)
- long oldbase;
- int newbase;
- int input[];
- int inlen;
- unsigned char result[];
- int reslen;
-{
- int d, e;
- long sum;
-
- e = 1;
- while (e > 0 && reslen > 0) {
- d = 0; e = 0; sum = 0;
- /* long division: input=input/newbase */
- while (d < inlen) {
- sum = sum*oldbase + (long) input[d];
- e += (sum > 0);
- input[d++] = sum / newbase;
- sum %= newbase;
- }
- result[--reslen] = sum; /* accumulate remainder */
- }
- for (d=0; d < reslen; d++)
- result[d] = 0;
-}
diff --git a/lib/libipx/ipx_ntoa.c b/lib/libipx/ipx_ntoa.c
deleted file mode 100644
index 21e60a1..0000000
--- a/lib/libipx/ipx_ntoa.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1986, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ipx_ntoa.c";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <netipx/ipx.h>
-#include <stdio.h>
-
-char *
-ipx_ntoa(addr)
- struct ipx_addr addr;
-{
- static char obuf[40];
- union { union ipx_net net_e; u_long long_e; } net;
- u_short port = htons(addr.x_port);
- register char *cp;
- char *cp2;
- register u_char *up = addr.x_host.c_host;
- u_char *uplim = up + 6;
- static char *spectHex();
-
- net.net_e = addr.x_net;
- sprintf(obuf, "%lx", ntohl(net.long_e));
- cp = spectHex(obuf);
- cp2 = cp + 1;
- while (*up==0 && up < uplim) up++;
- if (up == uplim) {
- if (port) {
- sprintf(cp, ".0");
- cp += 2;
- }
- } else {
- sprintf(cp, ".%x", *up++);
- while (up < uplim) {
- while (*cp) cp++;
- sprintf(cp, "%02x", *up++);
- }
- cp = spectHex(cp2);
- }
- if (port) {
- sprintf(cp, ".%x", port);
- spectHex(cp + 1);
- }
- return (obuf);
-}
-
-static char *
-spectHex(p0)
- char *p0;
-{
- int ok = 0;
- int nonzero = 0;
- register char *p = p0;
- for (; *p; p++) switch (*p) {
-
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- ok = 1;
- case '1': case '2': case '3': case '4': case '5':
- case '6': case '7': case '8': case '9':
- nonzero = 1;
- }
- if (nonzero && !ok) { *p++ = 'H'; *p = 0; }
- return (p);
-}
diff --git a/lib/libkse/Makefile b/lib/libkse/Makefile
deleted file mode 100644
index 363f308..0000000
--- a/lib/libkse/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# $Id$
-#
-# All library objects contain rcsid strings by default; they may be
-# excluded as a space-saving measure. To produce a library that does
-# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
-# from CFLAGS below. To remove these strings from just the system call
-# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
-LIB=c_r
-SHLIB_MAJOR= 3
-SHLIB_MINOR= 0
-CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS
-CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
-AINC= -I${.CURDIR}/../libc/${MACHINE} -I${.CURDIR}/uthread
-PRECIOUSLIB= yes
-
-.include "${.CURDIR}/../libc/Makefile.inc"
-.include "${.CURDIR}/man/Makefile.inc"
-.include "${.CURDIR}/uthread/Makefile.inc"
-.include "${.CURDIR}/sys/Makefile.inc"
-
-.include <bsd.lib.mk>
diff --git a/lib/libkse/sys/Makefile.inc b/lib/libkse/sys/Makefile.inc
deleted file mode 100644
index 16fd33d..0000000
--- a/lib/libkse/sys/Makefile.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-
-.PATH: ${.CURDIR}/sys
-
-SRCS+= __error.c
diff --git a/lib/libkse/thread/Makefile.inc b/lib/libkse/thread/Makefile.inc
deleted file mode 100644
index 4f1b308..0000000
--- a/lib/libkse/thread/Makefile.inc
+++ /dev/null
@@ -1,94 +0,0 @@
-# $Id: Makefile.inc,v 1.9 1997/05/06 00:49:36 jdp Exp $
-
-# uthread sources
-.PATH: ${.CURDIR}/uthread
-
-SRCS+= \
- uthread_accept.c \
- uthread_attr_destroy.c \
- uthread_attr_init.c \
- uthread_attr_getdetachstate.c \
- uthread_attr_getstackaddr.c \
- uthread_attr_getstacksize.c \
- uthread_attr_setcreatesuspend_np.c \
- uthread_attr_setdetachstate.c \
- uthread_attr_setstackaddr.c \
- uthread_attr_setstacksize.c \
- uthread_autoinit.cc \
- uthread_bind.c \
- uthread_clean.c \
- uthread_close.c \
- uthread_cond.c \
- uthread_condattr_destroy.c \
- uthread_condattr_init.c \
- uthread_connect.c \
- uthread_create.c \
- uthread_detach.c \
- uthread_dup.c \
- uthread_dup2.c \
- uthread_equal.c \
- uthread_execve.c \
- uthread_exit.c \
- uthread_fchmod.c \
- uthread_fchown.c \
- uthread_fcntl.c \
- uthread_fd.c \
- uthread_file.c \
- uthread_flock.c \
- uthread_fork.c \
- uthread_fstat.c \
- uthread_fstatfs.c \
- uthread_fsync.c \
- uthread_getdirentries.c \
- uthread_getpeername.c \
- uthread_getprio.c \
- uthread_getsockname.c \
- uthread_getsockopt.c \
- uthread_info.c \
- uthread_init.c \
- uthread_ioctl.c \
- uthread_join.c \
- uthread_kern.c \
- uthread_kill.c \
- uthread_listen.c \
- uthread_longjmp.c \
- uthread_mattr_init.c \
- uthread_mattr_kind_np.c \
- uthread_multi_np.c \
- uthread_mutex.c \
- uthread_mutexattr_destroy.c \
- uthread_nanosleep.c \
- uthread_once.c \
- uthread_open.c \
- uthread_pipe.c \
- uthread_queue.c \
- uthread_read.c \
- uthread_readv.c \
- uthread_recvfrom.c \
- uthread_resume_np.c \
- uthread_select.c \
- uthread_self.c \
- uthread_sendto.c \
- uthread_seterrno.c \
- uthread_setjmp.c \
- uthread_setprio.c \
- uthread_setsockopt.c \
- uthread_shutdown.c \
- uthread_sig.c \
- uthread_sigaction.c \
- uthread_sigblock.c \
- uthread_single_np.c \
- uthread_sigmask.c \
- uthread_signal.c \
- uthread_sigprocmask.c \
- uthread_sigsetmask.c \
- uthread_sigsuspend.c \
- uthread_sigwait.c \
- uthread_socket.c \
- uthread_socketpair.c \
- uthread_spec.c \
- uthread_suspend_np.c \
- uthread_wait4.c \
- uthread_write.c \
- uthread_writev.c \
- uthread_yield.c
diff --git a/lib/libkse/thread/thr_attr_destroy.c b/lib/libkse/thread/thr_attr_destroy.c
deleted file mode 100644
index 1f4b2c8..0000000
--- a/lib/libkse/thread/thr_attr_destroy.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_destroy(pthread_attr_t *attr)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL)
- /* Invalid argument: */
- ret = EINVAL;
- else {
- /* Free the memory allocated to the attribute object: */
- free(*attr);
-
- /*
- * Leave the attribute pointer NULL now that the memory
- * has been freed:
- */
- *attr = NULL;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_attr_getdetachstate.c b/lib/libkse/thread/thr_attr_getdetachstate.c
deleted file mode 100644
index 4715cb6..0000000
--- a/lib/libkse/thread/thr_attr_getdetachstate.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_getdetachstate(pthread_attr_t *attr, int *detachstate)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || detachstate == NULL)
- ret = EINVAL;
- else {
- /* Check if the detached flag is set: */
- if ((*attr)->flags & PTHREAD_DETACHED)
- /* Return detached: */
- *detachstate = PTHREAD_CREATE_DETACHED;
- else
- /* Return joinable: */
- *detachstate = PTHREAD_CREATE_JOINABLE;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_attr_getstackaddr.c b/lib/libkse/thread/thr_attr_getstackaddr.c
deleted file mode 100644
index 1850a32..0000000
--- a/lib/libkse/thread/thr_attr_getstackaddr.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_getstackaddr(pthread_attr_t *attr, void **stackaddr)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stackaddr == NULL)
- ret = EINVAL;
- else {
- /* Return the stack address: */
- *stackaddr = (*attr)->stackaddr_attr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_attr_getstacksize.c b/lib/libkse/thread/thr_attr_getstacksize.c
deleted file mode 100644
index de81106..0000000
--- a/lib/libkse/thread/thr_attr_getstacksize.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_getstacksize(pthread_attr_t *attr, size_t *stacksize)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stacksize == NULL)
- ret = EINVAL;
- else {
- /* Return the stack size: */
- *stacksize = (*attr)->stacksize_attr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_attr_init.c b/lib/libkse/thread/thr_attr_init.c
deleted file mode 100644
index c64e29f..0000000
--- a/lib/libkse/thread/thr_attr_init.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_init(pthread_attr_t *attr)
-{
- int ret;
- pthread_attr_t pattr;
-
- /* Allocate memory for the attribute object: */
- if ((pattr = (pthread_attr_t) malloc(sizeof(struct pthread_attr))) == NULL)
- /* Insufficient memory: */
- ret = ENOMEM;
- else {
- /* Initialise the attribute object with the defaults: */
- memcpy(pattr, &pthread_attr_default, sizeof(struct pthread_attr));
-
- /* Return a pointer to the attribute object: */
- *attr = pattr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_attr_setcreatesuspend_np.c b/lib/libkse/thread/thr_attr_setcreatesuspend_np.c
deleted file mode 100644
index afe6b23..0000000
--- a/lib/libkse/thread/thr_attr_setcreatesuspend_np.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_attr_setcreatesuspend_np(pthread_attr_t *attr)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- (*attr)->suspend = PTHREAD_CREATE_SUSPENDED;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_attr_setdetachstate.c b/lib/libkse/thread/thr_attr_setdetachstate.c
deleted file mode 100644
index 6ec0dbc..0000000
--- a/lib/libkse/thread/thr_attr_setdetachstate.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL ||
- (detachstate != PTHREAD_CREATE_DETACHED &&
- detachstate != PTHREAD_CREATE_JOINABLE))
- ret = EINVAL;
- else {
- /* Check if detached state: */
- if (detachstate == PTHREAD_CREATE_DETACHED)
- /* Set the detached flag: */
- (*attr)->flags |= PTHREAD_DETACHED;
- else
- /* Reset the detached flag: */
- (*attr)->flags &= ~PTHREAD_DETACHED;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_attr_setstackaddr.c b/lib/libkse/thread/thr_attr_setstackaddr.c
deleted file mode 100644
index ce54915..0000000
--- a/lib/libkse/thread/thr_attr_setstackaddr.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stackaddr == NULL)
- ret = EINVAL;
- else {
- /* Save the stack address: */
- (*attr)->stackaddr_attr = stackaddr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_attr_setstacksize.c b/lib/libkse/thread/thr_attr_setstacksize.c
deleted file mode 100644
index 94e575e..0000000
--- a/lib/libkse/thread/thr_attr_setstacksize.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stacksize < PTHREAD_STACK_MIN)
- ret = EINVAL;
- else {
- /* Save the stack size: */
- (*attr)->stacksize_attr = stacksize;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_clean.c b/lib/libkse/thread/thr_clean.c
deleted file mode 100644
index 9319f85..0000000
--- a/lib/libkse/thread/thr_clean.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#include <stdlib.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-pthread_cleanup_push(void (*routine) (void *), void *routine_arg)
-{
- struct pthread_cleanup *new;
-
- if ((new = (struct pthread_cleanup *) malloc(sizeof(struct pthread_cleanup))) != NULL) {
- new->routine = routine;
- new->routine_arg = routine_arg;
- new->next = _thread_run->cleanup;
-
- _thread_run->cleanup = new;
- }
-}
-
-void
-pthread_cleanup_pop(int execute)
-{
- struct pthread_cleanup *old;
-
- if ((old = _thread_run->cleanup) != NULL) {
- _thread_run->cleanup = old->next;
- if (execute) {
- old->routine(old->routine_arg);
- }
- free(old);
- }
-}
-
-#endif
diff --git a/lib/libkse/thread/thr_close.c b/lib/libkse/thread/thr_close.c
deleted file mode 100644
index 26a8fbf..0000000
--- a/lib/libkse/thread/thr_close.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-close(int fd)
-{
- int flags;
- int ret;
- int status;
- struct stat sb;
-
- /* Lock the file descriptor while the file is closed: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Get file descriptor status. */
- fstat(fd, &sb);
-
- /*
- * Check if the file should be left as blocking.
- *
- * This is so that the file descriptors shared with a parent
- * process aren't left set to non-blocking if the child
- * closes them prior to exit. An example where this causes
- * problems with /bin/sh is when a child closes stdin.
- *
- * Setting a file as blocking causes problems if a threaded
- * parent accesses the file descriptor before the child exits.
- * Once the threaded parent receives a SIGCHLD then it resets
- * all of its files to non-blocking, and so it is then safe
- * to access them.
- *
- * Pipes are not set to blocking when they are closed, as
- * the parent and child will normally close the file
- * descriptor of the end of the pipe that they are not
- * using, which would then cause any reads to block
- * indefinitely.
- */
- if ((S_ISREG(sb.st_mode) || S_ISCHR(sb.st_mode)) && (_thread_fd_table[fd]->flags & O_NONBLOCK) == 0) {
- /* Get the current flags: */
- flags = _thread_sys_fcntl(fd, F_GETFL, NULL);
- /* Clear the nonblocking file descriptor flag: */
- _thread_sys_fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
- }
-
- /* Close the file descriptor: */
- ret = _thread_sys_close(fd);
-
- /* Free the file descriptor table entry: */
- free(_thread_fd_table[fd]);
- _thread_fd_table[fd] = NULL;
-
- /* Unblock signals again: */
- _thread_kern_sig_unblock(status);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_cond.c b/lib/libkse/thread/thr_cond.c
deleted file mode 100644
index 978ad04..0000000
--- a/lib/libkse/thread/thr_cond.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_cond_init(pthread_cond_t * cond, const pthread_condattr_t * cond_attr)
-{
- enum pthread_cond_type type;
- pthread_cond_t pcond;
- int rval = 0;
-
- if (cond == NULL) {
- rval = EINVAL;
- } else {
- /*
- * Check if a pointer to a condition variable attribute
- * structure was passed by the caller:
- */
- if (cond_attr != NULL && *cond_attr != NULL) {
- /* Default to a fast condition variable: */
- type = (*cond_attr)->c_type;
- } else {
- /* Default to a fast condition variable: */
- type = COND_TYPE_FAST;
- }
-
- /* Process according to condition variable type: */
- switch (type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Check for no errors: */
- if (rval == 0) {
- if ((pcond = (pthread_cond_t)
- malloc(sizeof(struct pthread_cond))) == NULL) {
- rval = ENOMEM;
- } else {
- /*
- * Initialise the condition variable
- * structure:
- */
- _thread_queue_init(&pcond->c_queue);
- pcond->c_flags |= COND_FLAGS_INITED;
- pcond->c_type = type;
- *cond = pcond;
- }
- }
- }
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_destroy(pthread_cond_t * cond)
-{
- int rval = 0;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Check for errors: */
- if (rval == 0) {
- /* Destroy the contents of the condition structure: */
- _thread_queue_init(&(*cond)->c_queue);
- (*cond)->c_flags = 0;
- free(*cond);
- *cond = NULL;
- }
- }
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex)
-{
- int rval = 0;
- int status;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /*
- * Queue the running thread for the condition
- * variable:
- */
- _thread_queue_enq(&(*cond)->c_queue, _thread_run);
-
- /* Unlock the mutex: */
- pthread_mutex_unlock(mutex);
-
- /* Wait forever: */
- _thread_run->wakeup_time.tv_sec = -1;
-
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_COND_WAIT,
- __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Lock the mutex: */
- rval = pthread_mutex_lock(mutex);
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex,
- const struct timespec * abstime)
-{
- int rval = 0;
- int status;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Set the wakeup time: */
- _thread_run->wakeup_time.tv_sec = abstime->tv_sec;
- _thread_run->wakeup_time.tv_nsec = abstime->tv_nsec;
-
- /* Reset the timeout flag: */
- _thread_run->timeout = 0;
-
- /*
- * Queue the running thread for the condition
- * variable:
- */
- _thread_queue_enq(&(*cond)->c_queue, _thread_run);
-
- /* Unlock the mutex: */
- if ((rval = pthread_mutex_unlock(mutex)) != 0) {
- /*
- * Cannot unlock the mutex, so remove the
- * running thread from the condition
- * variable queue:
- */
- _thread_queue_deq(&(*cond)->c_queue);
- } else {
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_COND_WAIT,
- __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Lock the mutex: */
- if ((rval = pthread_mutex_lock(mutex)) != 0) {
- }
- /* Check if the wait timed out: */
- else if (_thread_run->timeout) {
- /* Return a timeout error: */
- rval = ETIMEDOUT;
- }
- }
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_signal(pthread_cond_t * cond)
-{
- int rval = 0;
- int status;
- pthread_t pthread;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Bring the next thread off the condition queue: */
- if ((pthread = _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
- /* Allow the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_broadcast(pthread_cond_t * cond)
-{
- int rval = 0;
- int status;
- pthread_t pthread;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /*
- * Enter a loop to bring all threads off the
- * condition queue:
- */
- while ((pthread =
- _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
- /* Allow the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libkse/thread/thr_condattr_destroy.c b/lib/libkse/thread/thr_condattr_destroy.c
deleted file mode 100644
index 4179970..0000000
--- a/lib/libkse/thread/thr_condattr_destroy.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_condattr_destroy(pthread_condattr_t *attr)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- ret = EINVAL;
- } else {
- free(*attr);
- *attr = NULL;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_condattr_init.c b/lib/libkse/thread/thr_condattr_init.c
deleted file mode 100644
index c87323d..0000000
--- a/lib/libkse/thread/thr_condattr_init.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_condattr_init(pthread_condattr_t *attr)
-{
- int ret;
- pthread_condattr_t pattr;
-
- if ((pattr = (pthread_condattr_t)
- malloc(sizeof(struct pthread_cond_attr))) == NULL) {
- ret = ENOMEM;
- } else {
- memcpy(pattr, &pthread_condattr_default,
- sizeof(struct pthread_cond_attr));
- *attr = pattr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_create.c b/lib/libkse/thread/thr_create.c
deleted file mode 100644
index e4925a9..0000000
--- a/lib/libkse/thread/thr_create.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/time.h>
-#ifdef _THREAD_SAFE
-#include <machine/reg.h>
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-_thread_create(pthread_t * thread, const pthread_attr_t * attr,
- void *(*start_routine) (void *), void *arg, pthread_t parent)
-{
- int i;
- int ret = 0;
- int status;
- pthread_t new_thread;
- pthread_attr_t pattr;
- void *stack;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Allocate memory for the thread structure: */
- if ((new_thread = (pthread_t) malloc(sizeof(struct pthread))) == NULL) {
- /* Insufficient memory to create a thread: */
- ret = EAGAIN;
- } else {
- /* Check if default thread attributes are required: */
- if (attr == NULL || *attr == NULL) {
- /* Use the default thread attributes: */
- pattr = &pthread_attr_default;
- } else {
- pattr = *attr;
- }
- /* Check if a stack was specified in the thread attributes: */
- if ((stack = pattr->stackaddr_attr) != NULL) {
- }
- /* Allocate memory for the stack: */
- else if ((stack = (void *) malloc(pattr->stacksize_attr)) == NULL) {
- /* Insufficient memory to create a thread: */
- ret = EAGAIN;
- free(new_thread);
- }
- /* Check for errors: */
- if (ret != 0) {
- } else {
- /* Initialise the thread structure: */
- memset(new_thread, 0, sizeof(struct pthread));
- new_thread->slice_usec = -1;
- new_thread->sig_saved = 0;
- new_thread->stack = stack;
- new_thread->start_routine = start_routine;
- new_thread->arg = arg;
- if (pattr->suspend == PTHREAD_CREATE_SUSPENDED) {
- PTHREAD_NEW_STATE(new_thread,PS_SUSPENDED);
- } else {
- PTHREAD_NEW_STATE(new_thread,PS_RUNNING);
- }
-
- /* Initialise the thread for signals: */
- new_thread->sigmask = _thread_run->sigmask;
-
- /*
- * Enter a loop to initialise the signal handler
- * array:
- */
- for (i = 1; i < NSIG; i++) {
- /* Default the signal handler: */
- sigfillset(&new_thread->act[i - 1].sa_mask);
- new_thread->act[i - 1].sa_handler = _thread_run->act[i - 1].sa_handler;
- new_thread->act[i - 1].sa_flags = _thread_run->act[i - 1].sa_flags;
- }
-
- /* Initialise the jump buffer: */
- _thread_sys_setjmp(new_thread->saved_jmp_buf);
-
- /*
- * Set up new stack frame so that it looks like it
- * returned from a longjmp() to the beginning of
- * _thread_start(). Check if this is a user thread:
- */
- if (parent == NULL) {
- /* Use the user start function: */
-#if defined(__FreeBSD__)
- new_thread->saved_jmp_buf[0]._jb[0] = (long) _thread_start;
-#elif defined(__NetBSD__)
-#if defined(__alpha)
- new_thread->saved_jmp_buf[2] = (long) _thread_start;
- new_thread->saved_jmp_buf[4 + R_RA] = 0;
- new_thread->saved_jmp_buf[4 + R_T12] = (long) _thread_start;
-#else
- new_thread->saved_jmp_buf[0] = (long) _thread_start;
-#endif
-#else
-#error "Don't recognize this operating system!"
-#endif
- } else {
- /*
- * Use the (funny) signal handler start
- * function:
- */
-#if defined(__FreeBSD__)
- new_thread->saved_jmp_buf[0]._jb[0] = (int) _thread_start_sig_handler;
-#elif defined(__NetBSD__)
-#if defined(__alpha)
- new_thread->saved_jmp_buf[2] = (long) _thread_start_sig_handler;
- new_thread->saved_jmp_buf[4 + R_RA] = 0;
- new_thread->saved_jmp_buf[4 + R_T12] = (long) _thread_start_sig_handler;
-#else
- new_thread->saved_jmp_buf[0] = (long) _thread_start_sig_handler;
-#endif
-#else
-#error "Don't recognize this operating system!"
-#endif
- }
-
- /* The stack starts high and builds down: */
-#if defined(__FreeBSD__)
- new_thread->saved_jmp_buf[0]._jb[2] = (int) (new_thread->stack + pattr->stacksize_attr - sizeof(double));
-#elif defined(__NetBSD__)
-#if defined(__alpha)
- new_thread->saved_jmp_buf[4 + R_SP] = (long) new_thread->stack + pattr->stacksize_attr - sizeof(double);
-#else
- new_thread->saved_jmp_buf[2] = (long) new_thread->stack + pattr->stacksize_attr - sizeof(double);
-#endif
-#else
-#error "Don't recognize this operating system!"
-#endif
-
- /* Copy the thread attributes: */
- memcpy(&new_thread->attr, pattr, sizeof(struct pthread_attr));
-
- /*
- * Check if this thread is to inherit the scheduling
- * attributes from its parent:
- */
- if (new_thread->attr.flags & PTHREAD_INHERIT_SCHED) {
- /* Copy the scheduling attributes: */
- new_thread->pthread_priority = _thread_run->pthread_priority;
- new_thread->attr.prio = _thread_run->pthread_priority;
- new_thread->attr.schedparam_policy = _thread_run->attr.schedparam_policy;
- } else {
- /*
- * Use just the thread priority, leaving the
- * other scheduling attributes as their
- * default values:
- */
- new_thread->pthread_priority = new_thread->attr.prio;
- }
-
- /* Initialise the join queue for the new thread: */
- _thread_queue_init(&(new_thread->join_queue));
-
- /* Initialise hooks in the thread structure: */
- new_thread->specific_data = NULL;
- new_thread->cleanup = NULL;
- new_thread->queue = NULL;
- new_thread->qnxt = NULL;
- new_thread->parent_thread = parent;
- new_thread->flags = 0;
-
- /* Add the thread to the linked list of all threads: */
- new_thread->nxt = _thread_link_list;
- _thread_link_list = new_thread;
-
- /* Return a pointer to the thread structure: */
- (*thread) = new_thread;
-
- /* Check if a parent thread was specified: */
- if (parent != NULL) {
- /*
- * A parent thread was specified, so this is
- * a signal handler thread which must now
- * wait for the signal handler to complete:
- */
- PTHREAD_NEW_STATE(parent,PS_SIGTHREAD);
- } else {
- /* Schedule the new user thread: */
- _thread_kern_sched(NULL);
- }
- }
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the status: */
- return (ret);
-}
-
-int
-pthread_create(pthread_t * thread, const pthread_attr_t * attr,
- void *(*start_routine) (void *), void *arg)
-{
- int ret = 0;
-
- /*
- * Call the low level thread creation function which allows a parent
- * thread to be specified:
- */
- ret = _thread_create(thread, attr, start_routine, arg, NULL);
-
- /* Return the status: */
- return (ret);
-}
-
-void
-_thread_start(void)
-{
- /* Run the current thread's start routine with argument: */
- pthread_exit(_thread_run->start_routine(_thread_run->arg));
-
- /* This point should never be reached. */
- PANIC("Thread has resumed after exit");
-}
-
-void
-_thread_start_sig_handler(void)
-{
- int sig;
- long arg;
- void (*sig_routine) (int);
-
- /*
- * Cast the argument from 'void *' to a variable that is NO SMALLER
- * than a pointer (otherwise gcc under NetBSD/Alpha will complain):
- */
- arg = (long) _thread_run->arg;
-
- /* Cast the argument as a signal number: */
- sig = (int) arg;
-
- /* Cast a pointer to the signal handler function: */
- sig_routine = (void (*) (int)) _thread_run->start_routine;
-
- /* Call the signal handler function: */
- (*sig_routine) (sig);
-
- /* Exit the signal handler thread: */
- pthread_exit(&arg);
-
- /* This point should never be reached. */
- PANIC("Signal handler thread has resumed after exit");
-}
-#endif
diff --git a/lib/libkse/thread/thr_detach.c b/lib/libkse/thread/thr_detach.c
deleted file mode 100644
index a9f2469..0000000
--- a/lib/libkse/thread/thr_detach.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_detach(pthread_t pthread)
-{
- int rval = 0;
- int status;
- pthread_t next_thread;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Check for invalid calling parameters: */
- if (pthread == NULL) {
- /* Return an invalid argument error: */
- rval = EINVAL;
- }
- /* Check if the thread has not been detached: */
- else if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) {
- /* Flag the thread as detached: */
- pthread->attr.flags |= PTHREAD_DETACHED;
-
- /* Enter a loop to bring all threads off the join queue: */
- while ((next_thread = _thread_queue_deq(&pthread->join_queue)) != NULL) {
- /* Make the thread run: */
- PTHREAD_NEW_STATE(next_thread,PS_RUNNING);
- }
- } else {
- /* Return an error: */
- rval = EINVAL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libkse/thread/thr_equal.c b/lib/libkse/thread/thr_equal.c
deleted file mode 100644
index 99ffb5d..0000000
--- a/lib/libkse/thread/thr_equal.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_equal(pthread_t t1, pthread_t t2)
-{
- /* Compare the two thread pointers: */
- return (t1 == t2);
-}
-#endif
diff --git a/lib/libkse/thread/thr_exit.c b/lib/libkse/thread/thr_exit.c
deleted file mode 100644
index 15bcfa3..0000000
--- a/lib/libkse/thread/thr_exit.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void _exit(int status)
-{
- int flags;
- int i;
- struct itimerval itimer;
-
- /* Disable the interval timer: */
- itimer.it_interval.tv_sec = 0;
- itimer.it_interval.tv_usec = 0;
- itimer.it_value.tv_sec = 0;
- itimer.it_value.tv_usec = 0;
- setitimer(ITIMER_VIRTUAL, &itimer, NULL);
-
- /* Close the pthread kernel pipe: */
- _thread_sys_close(_thread_kern_pipe[0]);
- _thread_sys_close(_thread_kern_pipe[1]);
-
- /*
- * Enter a loop to set all file descriptors to blocking
- * if they were not created as non-blocking:
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Check if this file descriptor is in use: */
- if (_thread_fd_table[i] != NULL &&
- !(_thread_fd_table[i]->flags & O_NONBLOCK)) {
- /* Get the current flags: */
- flags = _thread_sys_fcntl(i, F_GETFL, NULL);
- /* Clear the nonblocking file descriptor flag: */
- _thread_sys_fcntl(i, F_SETFL, flags & ~O_NONBLOCK);
- }
- }
-
- /* Call the _exit syscall: */
- _thread_sys__exit(status);
-}
-
-void
-_thread_exit(char *fname, int lineno, char *string)
-{
- char s[256];
-
- /* Prepare an error message string: */
- strcpy(s, "Fatal error '");
- strcat(s, string);
- strcat(s, "' at line ? ");
- strcat(s, "in file ");
- strcat(s, fname);
- strcat(s, " (errno = ?");
- strcat(s, ")\n");
-
- /* Write the string to the standard error file descriptor: */
- _thread_sys_write(2, s, strlen(s));
-
- /* Force this process to exit: */
- _exit(1);
-}
-
-void
-pthread_exit(void *status)
-{
- int sig;
- long l;
- pthread_t pthread;
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Save the return value: */
- _thread_run->ret = status;
-
- while (_thread_run->cleanup != NULL) {
- pthread_cleanup_pop(1);
- }
-
- if (_thread_run->attr.cleanup_attr != NULL) {
- _thread_run->attr.cleanup_attr(_thread_run->attr.arg_attr);
- }
- /* Check if there is thread specific data: */
- if (_thread_run->specific_data != NULL) {
- /* Run the thread-specific data destructors: */
- _thread_cleanupspecific();
- }
- /* Check if there are any threads joined to this one: */
- while ((pthread = _thread_queue_deq(&(_thread_run->join_queue))) != NULL) {
- /* Wake the joined thread and let it detach this thread: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
-
- /* Check if the running thread is at the head of the linked list: */
- if (_thread_link_list == _thread_run) {
- /* There is no previous thread: */
- _thread_link_list = _thread_run->nxt;
- } else {
- /* Point to the first thread in the list: */
- pthread = _thread_link_list;
-
- /*
- * Enter a loop to find the thread in the linked list before
- * the running thread:
- */
- while (pthread != NULL && pthread->nxt != _thread_run) {
- /* Point to the next thread: */
- pthread = pthread->nxt;
- }
-
- /* Check that a previous thread was found: */
- if (pthread != NULL) {
- /*
- * Point the previous thread to the one after the
- * running thread:
- */
- pthread->nxt = _thread_run->nxt;
- }
- }
-
- /* Check if this is a signal handler thread: */
- if (_thread_run->parent_thread != NULL) {
- /*
- * Enter a loop to search for other threads with the same
- * parent:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Compare the parent thread pointers: */
- if (pthread->parent_thread == _thread_run->parent_thread) {
- /*
- * The parent thread is waiting on at least
- * one other signal handler. Exit the loop
- * now that this is known.
- */
- break;
- }
- }
-
- /*
- * Check if the parent is not waiting on any other signal
- * handler threads and if it hasn't died in the meantime:
- */
- if (pthread == NULL && _thread_run->parent_thread->state != PS_DEAD) {
- /* Allow the parent thread to run again: */
- PTHREAD_NEW_STATE(_thread_run->parent_thread,PS_RUNNING);
- }
- /* Get the signal number: */
- l = (long) _thread_run->arg;
- sig = (int) l;
-
- /* Unblock the signal from the parent thread: */
- sigdelset(&_thread_run->parent_thread->sigmask, sig);
- }
- /*
- * This thread will never run again. Add it to the list of dead
- * threads:
- */
- _thread_run->nxt = _thread_dead;
- _thread_dead = _thread_run;
-
- /*
- * The running thread is no longer in the thread link list so it will
- * now die:
- */
- _thread_kern_sched_state(PS_DEAD, __FILE__, __LINE__);
-
- /* This point should not be reached. */
- PANIC("Dead thread has resumed");
-}
-#endif
diff --git a/lib/libkse/thread/thr_fcntl.c b/lib/libkse/thread/thr_fcntl.c
deleted file mode 100644
index f83ee50..0000000
--- a/lib/libkse/thread/thr_fcntl.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdarg.h>
-#include <unistd.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fcntl(int fd, int cmd,...)
-{
- int flags = 0;
- int oldfd;
- int ret;
- int status;
- va_list ap;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Lock the file descriptor: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Initialise the variable argument list: */
- va_start(ap, cmd);
-
- /* Process according to file control command type: */
- switch (cmd) {
- /* Duplicate a file descriptor: */
- case F_DUPFD:
- /*
- * Get the file descriptor that the caller wants to
- * use:
- */
- oldfd = va_arg(ap, int);
-
- /* Initialise the file descriptor table entry: */
- if ((ret = _thread_sys_fcntl(fd, cmd, oldfd)) < 0) {
- }
- /* Initialise the file descriptor table entry: */
- else if (_thread_fd_table_init(ret) != 0) {
- /* Quietly close the file: */
- _thread_sys_close(ret);
-
- /* Reset the file descriptor: */
- ret = -1;
- } else {
- /*
- * Save the file open flags so that they can
- * be checked later:
- */
- _thread_fd_table[ret]->flags = _thread_fd_table[fd]->flags;
- }
- break;
- case F_SETFD:
- break;
- case F_GETFD:
- break;
- case F_GETFL:
- ret = _thread_fd_table[fd]->flags;
- break;
- case F_SETFL:
- flags = va_arg(ap, int);
- if ((ret = _thread_sys_fcntl(fd, cmd, flags | O_NONBLOCK)) == 0) {
- _thread_fd_table[fd]->flags = flags;
- }
- break;
- default:
- /* Might want to make va_arg use a union */
- ret = _thread_sys_fcntl(fd, cmd, va_arg(ap, void *));
- break;
- }
-
- /* Free variable arguments: */
- va_end(ap);
-
- /* Unlock the file descriptor: */
- _thread_fd_unlock(fd, FD_RDWR);
- }
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_fork.c b/lib/libkse/thread/thr_fork.c
deleted file mode 100644
index 19f674d..0000000
--- a/lib/libkse/thread/thr_fork.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-pid_t
-fork(void)
-{
- int flags;
- pid_t ret;
-
- /* Fork a new process: */
- if ((ret = _thread_sys_fork()) <= 0) {
- /* Parent process or error. Nothing to do here. */
- } else {
- /* Close the pthread kernel pipe: */
- _thread_sys_close(_thread_kern_pipe[0]);
- _thread_sys_close(_thread_kern_pipe[1]);
-
- /* Reset signals pending for the running thread: */
- memset(_thread_run->sigpend, 0, sizeof(_thread_run->sigpend));
-
- /*
- * Create a pipe that is written to by the signal handler to
- * prevent signals being missed in calls to
- * _thread_sys_select:
- */
- if (_thread_sys_pipe(_thread_kern_pipe) != 0) {
- /* Cannot create pipe, so abort: */
- PANIC("Cannot create pthread kernel pipe for forked process");
- }
- /* Get the flags for the read pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[0], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- abort();
- }
- /* Make the read pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[0], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- abort();
- }
- /* Get the flags for the write pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[1], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- abort();
- }
- /* Make the write pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[1], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- abort();
- }
- }
-
- /* Return the process ID: */
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_fsync.c b/lib/libkse/thread/thr_fsync.c
deleted file mode 100644
index 51078e5..0000000
--- a/lib/libkse/thread/thr_fsync.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fsync(int fd)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_fsync(fd);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_getprio.c b/lib/libkse/thread/thr_getprio.c
deleted file mode 100644
index 85bd261..0000000
--- a/lib/libkse/thread/thr_getprio.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_getprio(pthread_t pthread)
-{
- int rval = 0;
- int status;
- pthread_t pthread_p;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the first thread in the list: */
- pthread_p = _thread_link_list;
-
- /* Enter a loop to search for the thread: */
- while (pthread_p != NULL && pthread_p != pthread) {
- /* Point to the next thread: */
- pthread_p = pthread_p->nxt;
- }
-
- /* Check if the thread pointer is NULL: */
- if (pthread == NULL || pthread_p == NULL) {
- /* Return an invalid argument error: */
- errno = EINVAL;
- rval = -1;
- } else {
- /* Get the thread priority: */
- rval = pthread->pthread_priority;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the thread priority or an error status: */
- return (rval);
-}
-#endif
diff --git a/lib/libkse/thread/thr_info.c b/lib/libkse/thread/thr_info.c
deleted file mode 100644
index be25d45..0000000
--- a/lib/libkse/thread/thr_info.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdio.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-struct s_thread_info {
- enum pthread_state state;
- char *name;
-};
-
-/* Static variables: */
-static const struct s_thread_info thread_info[] = {
- {PS_RUNNING , "Running"},
- {PS_SIGTHREAD , "Waiting on signal thread"},
- {PS_MUTEX_WAIT , "Waiting on a mutex"},
- {PS_COND_WAIT , "Waiting on a condition variable"},
- {PS_FDLR_WAIT , "Waiting for a file read lock"},
- {PS_FDLW_WAIT , "Waiting for a file write lock"},
- {PS_FDR_WAIT , "Waiting for read"},
- {PS_FDW_WAIT , "Waitingfor write"},
- {PS_SELECT_WAIT , "Waiting on select"},
- {PS_SLEEP_WAIT , "Sleeping"},
- {PS_WAIT_WAIT , "Waiting process"},
- {PS_SIGWAIT , "Waiting for a signal"},
- {PS_JOIN , "Waiting to join"},
- {PS_SUSPENDED , "Suspended"},
- {PS_DEAD , "Dead"},
- {PS_STATE_MAX , "Not a real state!"}
-};
-
-void
-_thread_dump_info(void)
-{
- char s[128];
- int fd;
- int i;
- int j;
- pthread_t pthread;
-
- /* Open the dump file for append and create it if necessary: */
- if ((fd = _thread_sys_open("/tmp/uthread.dump", O_RDWR | O_CREAT | O_APPEND, 0666)) < 0) {
- /* Can't open the dump file. */
- } else {
- /* Output a header for active threads: */
- strcpy(s, "\n\n=============\nACTIVE THREADS\n\n");
- _thread_sys_write(fd, s, strlen(s));
-
- /* Enter a loop to report each thread in the global list: */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Find the state: */
- for (j = 0; j < (sizeof(thread_info) / sizeof(struct s_thread_info)) - 1; j++)
- if (thread_info[j].state == pthread->state)
- break;
- /* Output a record for the current thread: */
- sprintf(s, "--------------------\nThread %p prio %3d state %s [%s:%d]\n",
- pthread, pthread->pthread_priority, thread_info[j].name,pthread->fname,pthread->lineno);
- _thread_sys_write(fd, s, strlen(s));
-
- /* Check if this is the running thread: */
- if (pthread == _thread_run) {
- /* Output a record for the running thread: */
- strcpy(s, "This is the running thread\n");
- _thread_sys_write(fd, s, strlen(s));
- }
- /* Check if this is the initial thread: */
- if (pthread == _thread_initial) {
- /* Output a record for the initial thread: */
- strcpy(s, "This is the initial thread\n");
- _thread_sys_write(fd, s, strlen(s));
- }
- /* Process according to thread state: */
- switch (pthread->state) {
- /* File descriptor read lock wait: */
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_FDR_WAIT:
- case PS_FDW_WAIT:
- /* Write the lock details: */
- sprintf(s, "fd %d[%s:%d]", pthread->data.fd.fd, pthread->data.fd.fname, pthread->data.fd.branch);
- _thread_sys_write(fd, s, strlen(s));
- sprintf(s, "owner %pr/%pw\n", _thread_fd_table[pthread->data.fd.fd]->r_owner, _thread_fd_table[pthread->data.fd.fd]->w_owner);
- _thread_sys_write(fd, s, strlen(s));
- break;
-
- /*
- * Trap other states that are not explicitly
- * coded to dump information:
- */
- default:
- /* Nothing to do here. */
- break;
- }
- }
-
- /* Check if there are no dead threads: */
- if (_thread_dead == NULL) {
- /* Output a record: */
- strcpy(s, "\n\nTHERE ARE NO DEAD THREADS\n");
- _thread_sys_write(fd, s, strlen(s));
- } else {
- /* Output a header for dead threads: */
- strcpy(s, "\n\nDEAD THREADS\n\n");
- _thread_sys_write(fd, s, strlen(s));
-
- /*
- * Enter a loop to report each thread in the global
- * dead thread list:
- */
- for (pthread = _thread_dead; pthread != NULL; pthread = pthread->nxt) {
- /* Output a record for the current thread: */
- sprintf(s, "Thread %p prio %3d [%s:%d]\n", pthread, pthread->pthread_priority,pthread->fname,pthread->lineno);
- _thread_sys_write(fd, s, strlen(s));
- }
- }
-
- /* Output a header for file descriptors: */
- strcpy(s, "\n\n=============\nFILE DESCRIPTOR TABLE\n\n");
- _thread_sys_write(fd, s, strlen(s));
-
- /* Enter a loop to report file descriptor lock usage: */
- for (i = 0; i < _thread_dtablesize; i++) {
- /*
- * Check if memory is allocated for this file
- * descriptor:
- */
- if (_thread_fd_table[i] != NULL) {
- /* Report the file descriptor lock status: */
- sprintf(s, "fd[%3d] read owner %p count %d [%s:%d]\n write owner %p count %d [%s:%d]\n",
- i,
- _thread_fd_table[i]->r_owner,
- _thread_fd_table[i]->r_lockcount,
- _thread_fd_table[i]->r_fname,
- _thread_fd_table[i]->r_lineno,
- _thread_fd_table[i]->w_owner,
- _thread_fd_table[i]->w_lockcount,
- _thread_fd_table[i]->w_fname,
- _thread_fd_table[i]->w_lineno);
- _thread_sys_write(fd, s, strlen(s));
- }
- }
-
- /* Close the dump file: */
- _thread_sys_close(fd);
- }
- return;
-}
-#endif
diff --git a/lib/libkse/thread/thr_init.c b/lib/libkse/thread/thr_init.c
deleted file mode 100644
index 5833cdf..0000000
--- a/lib/libkse/thread/thr_init.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-/* Allocate space for global thread variables here: */
-#define GLOBAL_PTHREAD_PRIVATE
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/time.h>
-#ifdef _THREAD_SAFE
-#include <machine/reg.h>
-#include <pthread.h>
-#include "pthread_private.h"
-extern int _thread_autoinit_dummy_decl;
-
-/*
- * Threaded process initialization
- */
-void
-_thread_init(void)
-{
- int flags;
- int i;
- struct sigaction act;
-
- /* Ensure that the auto-initialization routine is linked in: */
- _thread_autoinit_dummy_decl = 1;
-
- /* Check if this function has already been called: */
- if (_thread_initial)
- /* Only initialise the threaded application once. */
- return;
-
- /* Get the standard I/O flags before messing with them : */
- for (i = 0; i < 3; i++)
- if ((_pthread_stdio_flags[i] =
- _thread_sys_fcntl(i,F_GETFL, NULL)) == -1)
- PANIC("Cannot get stdio flags");
-
- /*
- * Create a pipe that is written to by the signal handler to prevent
- * signals being missed in calls to _thread_sys_select:
- */
- if (_thread_sys_pipe(_thread_kern_pipe) != 0) {
- /* Cannot create pipe, so abort: */
- PANIC("Cannot create kernel pipe");
- }
- /* Get the flags for the read pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[0], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- PANIC("Cannot get kernel read pipe flags");
- }
- /* Make the read pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[0], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- PANIC("Cannot make kernel read pipe non-blocking");
- }
- /* Get the flags for the write pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[1], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- PANIC("Cannot get kernel write pipe flags");
- }
- /* Make the write pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[1], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- PANIC("Cannot get kernel write pipe flags");
- }
- /* Allocate memory for the thread structure of the initial thread: */
- else if ((_thread_initial = (pthread_t) malloc(sizeof(struct pthread))) == NULL) {
- /*
- * Insufficient memory to initialise this application, so
- * abort:
- */
- PANIC("Cannot allocate memory for initial thread");
- } else {
- /* Zero the global kernel thread structure: */
- memset(&_thread_kern_thread, 0, sizeof(struct pthread));
- memset(_thread_initial, 0, sizeof(struct pthread));
-
- /* Default the priority of the initial thread: */
- _thread_initial->pthread_priority = PTHREAD_DEFAULT_PRIORITY;
-
- /* Initialise the state of the initial thread: */
- _thread_initial->state = PS_RUNNING;
-
- /* Initialise the queue: */
- _thread_queue_init(&(_thread_initial->join_queue));
-
- /* Initialise the rest of the fields: */
- _thread_initial->parent_thread = NULL;
- _thread_initial->specific_data = NULL;
- _thread_initial->cleanup = NULL;
- _thread_initial->queue = NULL;
- _thread_initial->qnxt = NULL;
- _thread_initial->nxt = NULL;
- _thread_initial->flags = 0;
- _thread_initial->error = 0;
- _thread_link_list = _thread_initial;
- _thread_run = _thread_initial;
-
- /* Enter a loop to get the existing signal status: */
- for (i = 1; i < NSIG; i++) {
- /* Check for signals which cannot be trapped: */
- if (i == SIGKILL || i == SIGSTOP) {
- }
- /* Get the signal handler details: */
- else if (_thread_sys_sigaction(i, NULL, &act) != 0) {
- /*
- * Abort this process if signal
- * initialisation fails:
- */
- PANIC("Cannot read signal handler info");
- }
- /* Set the signal handler for the initial thread: */
- else if (sigaction(i, &act, NULL) != 0) {
- /*
- * Abort this process if signal
- * initialisation fails:
- */
- PANIC("Cannot initialise signal handler for initial thread");
- }
- }
-
- /* Initialise the global signal action structure: */
- sigfillset(&act.sa_mask);
- act.sa_handler = (void (*) ()) _thread_sig_handler;
- act.sa_flags = SA_RESTART;
-
- /* Enter a loop to initialise the rest of the signals: */
- for (i = 1; i < NSIG; i++) {
- /* Check for signals which cannot be trapped: */
- if (i == SIGKILL || i == SIGSTOP) {
- }
- /* Initialise the signal for default handling: */
- else if (_thread_sys_sigaction(i, &act, NULL) != 0) {
- /*
- * Abort this process if signal
- * initialisation fails:
- */
- PANIC("Cannot initialise signal handler");
- }
- }
-
- /* Get the table size: */
- if ((_thread_dtablesize = getdtablesize()) < 0) {
- /*
- * Cannot get the system defined table size, so abort
- * this process.
- */
- PANIC("Cannot get dtablesize");
- }
- /* Allocate memory for the file descriptor table: */
- if ((_thread_fd_table = (struct fd_table_entry **) malloc(sizeof(struct fd_table_entry *) * _thread_dtablesize)) == NULL) {
- /*
- * Cannot allocate memory for the file descriptor
- * table, so abort this process.
- */
- PANIC("Cannot allocate memory for file descriptor table");
- } else {
- /*
- * Enter a loop to initialise the file descriptor
- * table:
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Initialise the file descriptor table: */
- _thread_fd_table[i] = NULL;
- }
- }
- }
- return;
-}
-
-/*
- * Special start up code for NetBSD/Alpha
- */
-#if defined(__NetBSD__) && defined(__alpha__)
-int
-main(int argc, char *argv[], char *env);
-
-int
-_thread_main(int argc, char *argv[], char *env)
-{
- _thread_init();
- return (main(argc, argv, env));
-}
-#endif
-#else
-/*
- * A stub for non-threaded programs.
- */
-void
-_thread_init(void)
-{
-}
-#endif
diff --git a/lib/libkse/thread/thr_join.c b/lib/libkse/thread/thr_join.c
deleted file mode 100644
index 63d0d58..0000000
--- a/lib/libkse/thread/thr_join.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_join(pthread_t pthread, void **thread_return)
-{
- int rval = 0;
- int status;
- pthread_t pthread1;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the first thread in the list: */
- pthread1 = _thread_link_list;
-
- /* Search for the thread to join to: */
- while (pthread1 != NULL && pthread1 != pthread) {
- /* Point to the next thread: */
- pthread1 = pthread1->nxt;
- }
-
- if (pthread1 == NULL) {
- /* Point to the first thread in the dead thread list: */
- pthread1 = _thread_dead;
-
- /* Search for the thread to join to: */
- while (pthread1 != NULL && pthread1 != pthread) {
- /* Point to the next thread: */
- pthread1 = pthread1->nxt;
- }
- }
-
- if (pthread1 == NULL) {
- /* Return an error: */
- rval = ESRCH;
-
- /* Check if this thread has been detached: */
- } else if ((pthread->attr.flags & PTHREAD_DETACHED) != 0) {
- /* Return an error: */
- rval = ESRCH;
- }
- /* Check if the thread is not dead: */
- else if (pthread->state != PS_DEAD) {
- /* Add the running thread to the join queue: */
- _thread_queue_enq(&(pthread->join_queue), _thread_run);
-
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__);
-
- /* Block signals again: */
- _thread_kern_sig_block(NULL);
-
- /* Check if the thread is not detached: */
- if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) {
- /* Check if the return value is required: */
- if (thread_return) {
- /* Return the thread's return value: */
- *thread_return = pthread->ret;
- }
- } else {
- /* Return an error: */
- rval = ESRCH;
- }
- } else {
- /* Check if the return value is required: */
- if (thread_return != NULL) {
- /* Return the thread's return value: */
- *thread_return = pthread->ret;
- }
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c
deleted file mode 100644
index ba8e250..0000000
--- a/lib/libkse/thread/thr_kern.c
+++ /dev/null
@@ -1,1739 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <errno.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-#include <setjmp.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-#include <sys/syscall.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/* Static variables: */
-static sigset_t sig_to_block = 0xffffffff;
-static sigset_t sig_to_unblock = 0;
-
-/* Static function prototype definitions: */
-static void
-_thread_kern_select(int wait_reqd);
-static void
-_thread_signal(pthread_t pthread, int sig);
-
-void
-_thread_kern_sched(struct sigcontext * scp)
-{
-#ifndef __alpha
- char *fdata;
-#endif
- int i;
- int prio = -1;
- pthread_t pthread;
- pthread_t pthread_h = NULL;
- pthread_t pthread_nxt = NULL;
- pthread_t pthread_prv = NULL;
- pthread_t pthread_s = NULL;
- struct itimerval itimer;
- struct timespec ts;
- struct timespec ts1;
- struct timeval tv;
- struct timeval tv1;
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Check if this function was called from the signal handler: */
- if (scp != NULL) {
- /*
- * Copy the signal context to the current thread's jump
- * buffer:
- */
- memcpy(&_thread_run->saved_sigcontext, scp, sizeof(_thread_run->saved_sigcontext));
-
-#ifndef __alpha
- /* Point to the floating point data in the running thread: */
- fdata = _thread_run->saved_fp;
-
- /* Save the floating point data: */
-__asm__("fnsave %0": :"m"(*fdata));
-#endif
-
- /* Flag the signal context as the last state saved: */
- _thread_run->sig_saved = 1;
- }
- /* Save the state of the current thread: */
- else if (_thread_sys_setjmp(_thread_run->saved_jmp_buf) != 0) {
- /* Unblock signals (just in case): */
- _thread_kern_sig_unblock(0);
-
- /*
- * This point is reached when a longjmp() is called to
- * restore the state of a thread.
- */
- return;
- } else {
- /* Flag the jump buffer was the last state saved: */
- _thread_run->sig_saved = 0;
- }
-
- /* Point to the first dead thread (if there are any): */
- pthread = _thread_dead;
-
- /* There is no previous dead thread: */
- pthread_prv = NULL;
-
- /* Enter a loop to cleanup after dead threads: */
- while (pthread != NULL) {
- /* Save a pointer to the next thread: */
- pthread_nxt = pthread->nxt;
-
- /* Check if this thread is one which is running: */
- if (pthread == _thread_run || pthread == _thread_initial) {
- /*
- * Don't destroy the running thread or the initial
- * thread.
- */
- pthread_prv = pthread;
- }
- /*
- * Check if this thread has detached or if it is a signal
- * handler thread:
- */
- else if (((pthread->attr.flags & PTHREAD_DETACHED) != 0) || pthread->parent_thread != NULL) {
- /* Check if there is no previous dead thread: */
- if (pthread_prv == NULL) {
- /*
- * The dead thread is at the head of the
- * list:
- */
- _thread_dead = pthread_nxt;
- } else {
- /*
- * The dead thread is not at the head of the
- * list:
- */
- pthread_prv->nxt = pthread->nxt;
- }
-
- /*
- * Check if the stack was not specified by the caller
- * to pthread_create and has not been destroyed yet:
- */
- if (pthread->attr.stackaddr_attr == NULL && pthread->stack != NULL) {
- /* Free the stack of the dead thread: */
- free(pthread->stack);
- }
- /* Free the memory allocated to the thread structure: */
- free(pthread);
- } else {
- /*
- * This thread has not detached, so do not destroy
- * it:
- */
- pthread_prv = pthread;
-
- /*
- * Check if the stack was not specified by the caller
- * to pthread_create and has not been destroyed yet:
- */
- if (pthread->attr.stackaddr_attr == NULL && pthread->stack != NULL) {
- /* Free the stack of the dead thread: */
- free(pthread->stack);
-
- /*
- * NULL the stack pointer now that the memory
- * has been freed:
- */
- pthread->stack = NULL;
- }
- }
-
- /* Point to the next thread: */
- pthread = pthread_nxt;
- }
-
- /*
- * Enter a the scheduling loop that finds the next thread that is
- * ready to run. This loop completes when there are no more threads
- * in the global list or when a thread has its state restored by
- * either a sigreturn (if the state was saved as a sigcontext) or a
- * longjmp (if the state was saved by a setjmp).
- */
- while (_thread_link_list != NULL) {
- /* Get the current time of day: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &ts);
-
- /*
- * Poll file descriptors to update the state of threads
- * waiting on file I/O where data may be available:
- */
- _thread_kern_select(0);
-
- /*
- * Enter a loop to look for sleeping threads that are ready
- * or threads with pending signals that are no longer
- * blocked:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Enter a loop to process the sending signals: */
- for (i = 1; i < NSIG; i++) {
- /*
- * Check if there are no pending signals of
- * this type:
- */
- if (pthread->sigpend[i] == 0) {
- }
- /* Check if this signal type is not masked: */
- else if (sigismember(&pthread->sigmask, i) == 0) {
- /*
- * Delete the signal from the set of
- * pending signals for this thread:
- */
- pthread->sigpend[i] -= 1;
-
- /*
- * Act on the signal for the current
- * thread:
- */
- _thread_signal(pthread, i);
- } else {
- /*
- * This signal is masked, so make
- * sure the count does not exceed 1:
- */
- pthread->sigpend[i] = 1;
- }
- }
-
- /* Check if this thread is to timeout: */
- if (pthread->state == PS_COND_WAIT ||
- pthread->state == PS_SLEEP_WAIT ||
- pthread->state == PS_FDR_WAIT ||
- pthread->state == PS_FDW_WAIT ||
- pthread->state == PS_SELECT_WAIT) {
- /* Check if this thread is to wait forever: */
- if (pthread->wakeup_time.tv_sec == -1) {
- }
- /*
- * Check if this thread is to wakeup
- * immediately or if it is past its wakeup
- * time:
- */
- else if ((pthread->wakeup_time.tv_sec == 0 &&
- pthread->wakeup_time.tv_nsec == 0) ||
- (ts.tv_sec > pthread->wakeup_time.tv_sec) ||
- ((ts.tv_sec == pthread->wakeup_time.tv_sec) &&
- (ts.tv_nsec >= pthread->wakeup_time.tv_nsec))) {
- /*
- * Check if this thread is waiting on
- * select:
- */
- if (pthread->state == PS_SELECT_WAIT) {
- /*
- * The select has timed out,
- * so zero the file
- * descriptor sets:
- */
- FD_ZERO(&pthread->data.select_data->readfds);
- FD_ZERO(&pthread->data.select_data->writefds);
- FD_ZERO(&pthread->data.select_data->exceptfds);
- pthread->data.select_data->nfds = 0;
- }
- /*
- * Return an error as an interrupted
- * wait:
- */
- _thread_seterrno(pthread, EINTR);
-
- /*
- * Flag the timeout in the thread
- * structure:
- */
- pthread->timeout = 1;
-
- /*
- * Change the threads state to allow
- * it to be restarted:
- */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- }
- }
-
- /* Check if there is a current thread: */
- if (_thread_run != &_thread_kern_thread) {
- /*
- * Save the current time as the time that the thread
- * became inactive:
- */
- _thread_run->last_inactive.tv_sec = tv.tv_sec;
- _thread_run->last_inactive.tv_usec = tv.tv_usec;
-
- /*
- * Accumulate the number of microseconds that this
- * thread has run for:
- */
- _thread_run->slice_usec += (_thread_run->last_inactive.tv_sec -
- _thread_run->last_active.tv_sec) * 1000000 +
- _thread_run->last_inactive.tv_usec -
- _thread_run->last_active.tv_usec;
-
- /*
- * Check if this thread has reached its allocated
- * time slice period:
- */
- if (_thread_run->slice_usec > TIMESLICE_USEC) {
- /*
- * Flag the allocated time slice period as
- * up:
- */
- _thread_run->slice_usec = -1;
- }
- }
- /* Check if an incremental priority update is required: */
- if (((tv.tv_sec - kern_inc_prio_time.tv_sec) * 1000000 +
- tv.tv_usec - kern_inc_prio_time.tv_usec) > INC_PRIO_USEC) {
- /*
- * Enter a loop to look for run-enabled threads that
- * have not run since the last time that an
- * incremental priority update was performed:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if this thread is unable to run: */
- if (pthread->state != PS_RUNNING) {
- }
- /*
- * Check if the last time that this thread
- * was run (as indicated by the last time it
- * became inactive) is before the time that
- * the last incremental priority check was
- * made:
- */
- else if (timercmp(&_thread_run->last_inactive, &kern_inc_prio_time, >)) {
- /*
- * Increment the incremental priority
- * for this thread in the hope that
- * it will eventually get a chance to
- * run:
- */
- (pthread->inc_prio)++;
- }
- }
-
- /* Save the new incremental priority update time: */
- kern_inc_prio_time.tv_sec = tv.tv_sec;
- kern_inc_prio_time.tv_usec = tv.tv_usec;
- }
- /*
- * Enter a loop to look for the first thread of the highest
- * priority that is ready to run:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if in single-threaded mode: */
- if (_thread_single != NULL) {
- /*
- * Check if the current thread is
- * the thread for which single-threaded
- * mode is enabled:
- */
- if (pthread == _thread_single) {
- /*
- * This thread is allowed
- * to run.
- */
- } else {
- /*
- * Walk up the signal handler
- * parent thread tree to see
- * if the current thread is
- * descended from the thread
- * for which single-threaded
- * mode is enabled.
- */
- pthread_nxt = pthread;
- while(pthread_nxt != NULL &&
- pthread_nxt != _thread_single) {
- pthread_nxt = pthread->parent_thread;
- }
- /*
- * Check if the current
- * thread is not descended
- * from the thread for which
- * single-threaded mode is
- * enabled.
- */
- if (pthread_nxt == NULL)
- /* Ignore this thread. */
- continue;
- }
- }
-
- /* Check if the current thread is unable to run: */
- if (pthread->state != PS_RUNNING) {
- }
- /*
- * Check if no run-enabled thread has been seen or if
- * the current thread has a priority higher than the
- * highest seen so far:
- */
- else if (pthread_h == NULL || (pthread->pthread_priority + pthread->inc_prio) > prio) {
- /*
- * Save this thread as the highest priority
- * thread seen so far:
- */
- pthread_h = pthread;
- prio = pthread->pthread_priority + pthread->inc_prio;
- }
- }
-
- /*
- * Enter a loop to look for a thread that: 1. Is run-enabled.
- * 2. Has the required agregate priority. 3. Has not been
- * allocated its allocated time slice. 4. Became inactive
- * least recently.
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if in single-threaded mode: */
- if (_thread_single != NULL) {
- /*
- * Check if the current thread is
- * the thread for which single-threaded
- * mode is enabled:
- */
- if (pthread == _thread_single) {
- /*
- * This thread is allowed
- * to run.
- */
- } else {
- /*
- * Walk up the signal handler
- * parent thread tree to see
- * if the current thread is
- * descended from the thread
- * for which single-threaded
- * mode is enabled.
- */
- pthread_nxt = pthread;
- while(pthread_nxt != NULL &&
- pthread_nxt != _thread_single) {
- pthread_nxt = pthread->parent_thread;
- }
- /*
- * Check if the current
- * thread is not descended
- * from the thread for which
- * single-threaded mode is
- * enabled.
- */
- if (pthread_nxt == NULL)
- /* Ignore this thread. */
- continue;
- }
- }
-
- /* Check if the current thread is unable to run: */
- if (pthread->state != PS_RUNNING) {
- /* Ignore threads that are not ready to run. */
- }
- /*
- * Check if the current thread as an agregate
- * priority not equal to the highest priority found
- * above:
- */
- else if ((pthread->pthread_priority + pthread->inc_prio) != prio) {
- /*
- * Ignore threads which have lower agregate
- * priority.
- */
- }
- /*
- * Check if the current thread reached its time slice
- * allocation last time it ran (or if it has not run
- * yet):
- */
- else if (pthread->slice_usec == -1) {
- }
- /*
- * Check if an eligible thread has not been found
- * yet, or if the current thread has an inactive time
- * earlier than the last one seen:
- */
- else if (pthread_s == NULL || timercmp(&pthread->last_inactive, &tv1, <)) {
- /*
- * Save the pointer to the current thread as
- * the most eligible thread seen so far:
- */
- pthread_s = pthread;
-
- /*
- * Save the time that the selected thread
- * became inactive:
- */
- tv1.tv_sec = pthread->last_inactive.tv_sec;
- tv1.tv_usec = pthread->last_inactive.tv_usec;
- }
- }
-
- /*
- * Check if no thread was selected according to incomplete
- * time slice allocation:
- */
- if (pthread_s == NULL) {
- /*
- * Enter a loop to look for any other thread that: 1.
- * Is run-enabled. 2. Has the required agregate
- * priority. 3. Became inactive least recently.
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if in single-threaded mode: */
- if (_thread_single != NULL) {
- /*
- * Check if the current thread is
- * the thread for which single-threaded
- * mode is enabled:
- */
- if (pthread == _thread_single) {
- /*
- * This thread is allowed
- * to run.
- */
- } else {
- /*
- * Walk up the signal handler
- * parent thread tree to see
- * if the current thread is
- * descended from the thread
- * for which single-threaded
- * mode is enabled.
- */
- pthread_nxt = pthread;
- while(pthread_nxt != NULL &&
- pthread_nxt != _thread_single) {
- pthread_nxt = pthread->parent_thread;
- }
- /*
- * Check if the current
- * thread is not descended
- * from the thread for which
- * single-threaded mode is
- * enabled.
- */
- if (pthread_nxt == NULL)
- /* Ignore this thread. */
- continue;
- }
- }
-
- /*
- * Check if the current thread is unable to
- * run:
- */
- if (pthread->state != PS_RUNNING) {
- /*
- * Ignore threads that are not ready
- * to run.
- */
- }
- /*
- * Check if the current thread as an agregate
- * priority not equal to the highest priority
- * found above:
- */
- else if ((pthread->pthread_priority + pthread->inc_prio) != prio) {
- /*
- * Ignore threads which have lower
- * agregate priority.
- */
- }
- /*
- * Check if an eligible thread has not been
- * found yet, or if the current thread has an
- * inactive time earlier than the last one
- * seen:
- */
- else if (pthread_s == NULL || timercmp(&pthread->last_inactive, &tv1, <)) {
- /*
- * Save the pointer to the current
- * thread as the most eligible thread
- * seen so far:
- */
- pthread_s = pthread;
-
- /*
- * Save the time that the selected
- * thread became inactive:
- */
- tv1.tv_sec = pthread->last_inactive.tv_sec;
- tv1.tv_usec = pthread->last_inactive.tv_usec;
- }
- }
- }
- /* Check if there are no threads ready to run: */
- if (pthread_s == NULL) {
- /*
- * Lock the pthread kernel by changing the pointer to
- * the running thread to point to the global kernel
- * thread structure:
- */
- _thread_run = &_thread_kern_thread;
-
- /*
- * There are no threads ready to run, so wait until
- * something happens that changes this condition:
- */
- _thread_kern_select(1);
- } else {
- /* Make the selected thread the current thread: */
- _thread_run = pthread_s;
-
- /*
- * Save the current time as the time that the thread
- * became active:
- */
- _thread_run->last_active.tv_sec = tv.tv_sec;
- _thread_run->last_active.tv_usec = tv.tv_usec;
-
- /*
- * Check if this thread is running for the first time
- * or running again after using its full time slice
- * allocation:
- */
- if (_thread_run->slice_usec == -1) {
- /* Reset the accumulated time slice period: */
- _thread_run->slice_usec = 0;
- }
- /*
- * Reset the incremental priority now that this
- * thread has been given the chance to run:
- */
- _thread_run->inc_prio = 0;
-
- /* Check if there is more than one thread: */
- if (_thread_run != _thread_link_list || _thread_run->nxt != NULL) {
- /*
- * Define the maximum time before a SIGVTALRM
- * is required:
- */
- itimer.it_value.tv_sec = 0;
- itimer.it_value.tv_usec = TIMESLICE_USEC;
-
- /*
- * The interval timer is not reloaded when it
- * times out. The interval time needs to be
- * calculated every time.
- */
- itimer.it_interval.tv_sec = 0;
- itimer.it_interval.tv_usec = 0;
-
- /*
- * Enter a loop to look for threads waiting
- * for a time:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /*
- * Check if this thread is to
- * timeout:
- */
- if (pthread->state == PS_COND_WAIT ||
- pthread->state == PS_SLEEP_WAIT ||
- pthread->state == PS_FDR_WAIT ||
- pthread->state == PS_FDW_WAIT ||
- pthread->state == PS_SELECT_WAIT) {
- /*
- * Check if this thread is to
- * wait forever:
- */
- if (pthread->wakeup_time.tv_sec == -1) {
- }
- /*
- * Check if this thread is to
- * wakeup immediately:
- */
- else if (pthread->wakeup_time.tv_sec == 0 &&
- pthread->wakeup_time.tv_nsec == 0) {
- }
- /*
- * Check if the current time
- * is after the wakeup time:
- */
- else if ((ts.tv_sec > pthread->wakeup_time.tv_sec) ||
- ((ts.tv_sec == pthread->wakeup_time.tv_sec) &&
- (ts.tv_nsec > pthread->wakeup_time.tv_nsec))) {
- } else {
- /*
- * Calculate the time
- * until this thread
- * is ready, allowing
- * for the clock
- * resolution:
- */
- ts1.tv_sec = pthread->wakeup_time.tv_sec - ts.tv_sec;
- ts1.tv_nsec = pthread->wakeup_time.tv_nsec - ts.tv_nsec +
- CLOCK_RES_NSEC;
-
- /*
- * Check for
- * underflow of the
- * nanosecond field:
- */
- if (ts1.tv_nsec < 0) {
- /*
- * Allow for
- * the
- * underflow
- * of the
- * nanosecond
- * field:
- */
- ts1.tv_sec--;
- ts1.tv_nsec += 1000000000;
- }
- /*
- * Check for overflow
- * of the nanosecond
- * field:
- */
- if (ts1.tv_nsec >= 1000000000) {
- /*
- * Allow for
- * the
- * overflow
- * of the
- * nanosecond
- * field:
- */
- ts1.tv_sec++;
- ts1.tv_nsec -= 1000000000;
- }
- /*
- * Convert the
- * timespec structure
- * to a timeval
- * structure:
- */
- TIMESPEC_TO_TIMEVAL(&tv, &ts1);
-
- /*
- * Check if the
- * thread will be
- * ready sooner than
- * the earliest one
- * found so far:
- */
- if (timercmp(&tv, &itimer.it_value, <)) {
- /*
- * Update the
- * time
- * value:
- */
- itimer.it_value.tv_sec = tv.tv_sec;
- itimer.it_value.tv_usec = tv.tv_usec;
- }
- }
- }
- }
-
- /*
- * Start the interval timer for the
- * calculated time interval:
- */
- if (setitimer(ITIMER_VIRTUAL, &itimer, NULL) != 0) {
- /*
- * Cannot initialise the timer, so
- * abort this process:
- */
- PANIC("Cannot set virtual timer");
- }
- }
- /* Check if a signal context was saved: */
- if (_thread_run->sig_saved == 1) {
-#ifndef __alpha
- /*
- * Point to the floating point data in the
- * running thread:
- */
- fdata = _thread_run->saved_fp;
-
- /* Restore the floating point state: */
- __asm__("frstor %0": :"m"(*fdata));
-#endif
-
- /*
- * Do a sigreturn to restart the thread that
- * was interrupted by a signal:
- */
- _thread_sys_sigreturn(&_thread_run->saved_sigcontext);
- } else {
- /*
- * Do a longjmp to restart the thread that
- * was context switched out (by a longjmp to
- * a different thread):
- */
- _thread_sys_longjmp(_thread_run->saved_jmp_buf, 1);
- }
-
- /* This point should not be reached. */
- PANIC("Thread has returned from sigreturn or longjmp");
- }
- }
-
- /* There are no more threads, so exit this process: */
- exit(0);
-}
-
-static void
-_thread_signal(pthread_t pthread, int sig)
-{
- int done;
- long l;
- pthread_t new_pthread;
- struct sigaction act;
- void *arg;
-
- /*
- * Assume that the signal will not be dealt with according
- * to the thread state:
- */
- done = 0;
-
- /* Process according to thread state: */
- switch (pthread->state) {
- /* States which do not change when a signal is trapped: */
- case PS_COND_WAIT:
- case PS_DEAD:
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_JOIN:
- case PS_MUTEX_WAIT:
- case PS_RUNNING:
- case PS_STATE_MAX:
- case PS_SIGTHREAD:
- case PS_SUSPENDED:
- /* Nothing to do here. */
- break;
-
- /* Wait for child: */
- case PS_WAIT_WAIT:
- /* Check if the signal is from a child exiting: */
- if (sig == SIGCHLD) {
- /* Reset the error: */
- _thread_seterrno(pthread, 0);
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- } else {
- /* Return the 'interrupted' error: */
- _thread_seterrno(pthread, EINTR);
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- pthread->interrupted = 1;
- break;
-
- /* Waiting on I/O for zero or more file descriptors: */
- case PS_SELECT_WAIT:
- pthread->data.select_data->nfds = -1;
-
- /* Return the 'interrupted' error: */
- _thread_seterrno(pthread, EINTR);
- pthread->interrupted = 1;
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- break;
-
- /*
- * States that are interrupted by the occurrence of a signal
- * other than the scheduling alarm:
- */
- case PS_FDR_WAIT:
- case PS_FDW_WAIT:
- case PS_SLEEP_WAIT:
- /* Return the 'interrupted' error: */
- _thread_seterrno(pthread, EINTR);
- pthread->interrupted = 1;
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
-
- /* Return the signal number: */
- pthread->signo = sig;
- break;
-
- /* Waiting on a signal: */
- case PS_SIGWAIT:
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
-
- /* Return the signal number: */
- pthread->signo = sig;
-
- /* Flag the signal as dealt with: */
- done = 1;
- break;
- }
-
- /*
- * Check if this signal has been dealt with, or is being
- * ignored:
- */
- if (done || pthread->act[sig - 1].sa_handler == SIG_IGN) {
- /* Ignore the signal for this thread. */
- }
- /* Check if this signal is to use the default handler: */
- else if (pthread->act[sig - 1].sa_handler == SIG_DFL) {
- /* Process according to signal type: */
- switch (sig) {
- /* Signals which cause core dumps: */
- case SIGQUIT:
- case SIGILL:
- case SIGTRAP:
- case SIGABRT:
- case SIGEMT:
- case SIGFPE:
- case SIGBUS:
- case SIGSEGV:
- case SIGSYS:
- /* Clear the signal action: */
- sigfillset(&act.sa_mask);
- act.sa_handler = SIG_DFL;
- act.sa_flags = SA_RESTART;
- _thread_sys_sigaction(sig, &act, NULL);
-
- /*
- * Do a sigreturn back to where the signal was
- * detected and a core dump should occur:
- */
- _thread_sys_sigreturn(&pthread->saved_sigcontext);
- break;
-
- /* Default processing for other signals: */
- default:
- /*
- * ### Default processing is a problem to resolve!
- * ###
- */
- break;
- }
- } else {
- /*
- * Cast the signal number as a long and then to a void
- * pointer. Sigh. This is POSIX.
- */
- l = (long) sig;
- arg = (void *) l;
-
- /* Create a signal handler thread, but don't run it yet: */
- if (_thread_create(&new_pthread, NULL, (void *) pthread->act[sig - 1].sa_handler, arg, pthread) != 0) {
- /*
- * Error creating signal handler thread, so abort
- * this process:
- */
- PANIC("Cannot create signal handler thread");
- }
- }
-
- /* Nothing to return. */
- return;
-}
-
-void
-_thread_kern_sig_block(int *status)
-{
- sigset_t oset;
-
- /*
- * Block all signals so that the process will not be interrupted by
- * signals:
- */
- _thread_sys_sigprocmask(SIG_SETMASK, &sig_to_block, &oset);
-
- /* Check if the caller wants the current block status returned: */
- if (status != NULL) {
- /* Return the previous signal block status: */
- *status = (oset != 0);
- }
- return;
-}
-
-void
-_thread_kern_sig_unblock(int status)
-{
- sigset_t oset;
-
- /*
- * Check if the caller thinks that signals weren't blocked when it
- * called _thread_kern_sig_block:
- */
- if (status == 0) {
- /*
- * Unblock all signals so that the process will be
- * interrupted when a signal occurs:
- */
- _thread_sys_sigprocmask(SIG_SETMASK, &sig_to_unblock, &oset);
- }
- return;
-}
-
-void
-_thread_kern_sched_state(enum pthread_state state, char *fname, int lineno)
-{
- /* Change the state of the current thread: */
- _thread_run->state = state;
- _thread_run->fname = fname;
- _thread_run->lineno = lineno;
-
- /* Schedule the next thread that is ready: */
- _thread_kern_sched(NULL);
- return;
-}
-
-static void
-_thread_kern_select(int wait_reqd)
-{
- char bufr[128];
- fd_set fd_set_except;
- fd_set fd_set_read;
- fd_set fd_set_write;
- int count = 0;
- int count_dec;
- int found_one;
- int i;
- int nfds = -1;
- int settimeout;
- pthread_t pthread;
- ssize_t num;
- struct timespec ts;
- struct timespec ts1;
- struct timeval *p_tv;
- struct timeval tv;
- struct timeval tv1;
-
- /* Zero the file descriptor sets: */
- FD_ZERO(&fd_set_read);
- FD_ZERO(&fd_set_write);
- FD_ZERO(&fd_set_except);
-
- /* Check if the caller wants to wait: */
- if (wait_reqd) {
- /*
- * Add the pthread kernel pipe file descriptor to the read
- * set:
- */
- FD_SET(_thread_kern_pipe[0], &fd_set_read);
- nfds = _thread_kern_pipe[0];
-
- /* Get the current time of day: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &ts);
- }
- /* Initialise the time value structure: */
- tv.tv_sec = 0;
- tv.tv_usec = 0;
-
- /*
- * Enter a loop to process threads waiting on either file descriptors
- * or times:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Assume that this state does not time out: */
- settimeout = 0;
-
- /* Process according to thread state: */
- switch (pthread->state) {
- /*
- * States which do not depend on file descriptor I/O
- * operations or timeouts:
- */
- case PS_DEAD:
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_JOIN:
- case PS_MUTEX_WAIT:
- case PS_RUNNING:
- case PS_SIGTHREAD:
- case PS_SIGWAIT:
- case PS_STATE_MAX:
- case PS_WAIT_WAIT:
- case PS_SUSPENDED:
- /* Nothing to do here. */
- break;
-
- /* File descriptor read wait: */
- case PS_FDR_WAIT:
- /* Add the file descriptor to the read set: */
- FD_SET(pthread->data.fd.fd, &fd_set_read);
-
- /*
- * Check if this file descriptor is greater than any
- * of those seen so far:
- */
- if (pthread->data.fd.fd > nfds) {
- /* Remember this file descriptor: */
- nfds = pthread->data.fd.fd;
- }
- /* Increment the file descriptor count: */
- count++;
-
- /* This state can time out: */
- settimeout = 1;
- break;
-
- /* File descriptor write wait: */
- case PS_FDW_WAIT:
- /* Add the file descriptor to the write set: */
- FD_SET(pthread->data.fd.fd, &fd_set_write);
-
- /*
- * Check if this file descriptor is greater than any
- * of those seen so far:
- */
- if (pthread->data.fd.fd > nfds) {
- /* Remember this file descriptor: */
- nfds = pthread->data.fd.fd;
- }
- /* Increment the file descriptor count: */
- count++;
-
- /* This state can time out: */
- settimeout = 1;
- break;
-
- /* States that time out: */
- case PS_SLEEP_WAIT:
- case PS_COND_WAIT:
- /* Flag a timeout as required: */
- settimeout = 1;
- break;
-
- /* Select wait: */
- case PS_SELECT_WAIT:
- /*
- * Enter a loop to process each file descriptor in
- * the thread-specific file descriptor sets:
- */
- for (i = 0; i < pthread->data.select_data->nfds; i++) {
- /*
- * Check if this file descriptor is set for
- * exceptions:
- */
- if (FD_ISSET(i, &pthread->data.select_data->exceptfds)) {
- /*
- * Add the file descriptor to the
- * exception set:
- */
- FD_SET(i, &fd_set_except);
-
- /*
- * Increment the file descriptor
- * count:
- */
- count++;
-
- /*
- * Check if this file descriptor is
- * greater than any of those seen so
- * far:
- */
- if (i > nfds) {
- /*
- * Remember this file
- * descriptor:
- */
- nfds = i;
- }
- }
- /*
- * Check if this file descriptor is set for
- * write:
- */
- if (FD_ISSET(i, &pthread->data.select_data->writefds)) {
- /*
- * Add the file descriptor to the
- * write set:
- */
- FD_SET(i, &fd_set_write);
-
- /*
- * Increment the file descriptor
- * count:
- */
- count++;
-
- /*
- * Check if this file descriptor is
- * greater than any of those seen so
- * far:
- */
- if (i > nfds) {
- /*
- * Remember this file
- * descriptor:
- */
- nfds = i;
- }
- }
- /*
- * Check if this file descriptor is set for
- * read:
- */
- if (FD_ISSET(i, &pthread->data.select_data->readfds)) {
- /*
- * Add the file descriptor to the
- * read set:
- */
- FD_SET(i, &fd_set_read);
-
- /*
- * Increment the file descriptor
- * count:
- */
- count++;
-
- /*
- * Check if this file descriptor is
- * greater than any of those seen so
- * far:
- */
- if (i > nfds) {
- /*
- * Remember this file
- * descriptor:
- */
- nfds = i;
- }
- }
- }
-
- /* This state can time out: */
- settimeout = 1;
- break;
- }
-
- /*
- * Check if the caller wants to wait and if the thread state
- * is one that times out:
- */
- if (wait_reqd && settimeout) {
- /* Check if this thread wants to wait forever: */
- if (pthread->wakeup_time.tv_sec == -1) {
- }
- /* Check if this thread doesn't want to wait at all: */
- else if (pthread->wakeup_time.tv_sec == 0 &&
- pthread->wakeup_time.tv_nsec == 0) {
- /* Override the caller's request to wait: */
- wait_reqd = 0;
- } else {
- /*
- * Calculate the time until this thread is
- * ready, allowing for the clock resolution:
- */
- ts1.tv_sec = pthread->wakeup_time.tv_sec - ts.tv_sec;
- ts1.tv_nsec = pthread->wakeup_time.tv_nsec - ts.tv_nsec +
- CLOCK_RES_NSEC;
-
- /*
- * Check for underflow of the nanosecond
- * field:
- */
- if (ts1.tv_nsec < 0) {
- /*
- * Allow for the underflow of the
- * nanosecond field:
- */
- ts1.tv_sec--;
- ts1.tv_nsec += 1000000000;
- }
- /*
- * Check for overflow of the nanosecond
- * field:
- */
- if (ts1.tv_nsec >= 1000000000) {
- /*
- * Allow for the overflow of the
- * nanosecond field:
- */
- ts1.tv_sec++;
- ts1.tv_nsec -= 1000000000;
- }
- /*
- * Convert the timespec structure to a
- * timeval structure:
- */
- TIMESPEC_TO_TIMEVAL(&tv1, &ts1);
-
- /*
- * Check if no time value has been found yet,
- * or if the thread will be ready sooner that
- * the earliest one found so far:
- */
- if ((tv.tv_sec == 0 && tv.tv_usec == 0) || timercmp(&tv1, &tv, <)) {
- /* Update the time value: */
- tv.tv_sec = tv1.tv_sec;
- tv.tv_usec = tv1.tv_usec;
- }
- }
- }
- }
-
- /* Check if the caller wants to wait: */
- if (wait_reqd) {
- /* Check if no threads were found with timeouts: */
- if (tv.tv_sec == 0 && tv.tv_usec == 0) {
- /* Wait forever: */
- p_tv = NULL;
- } else {
- /*
- * Point to the time value structure which contains
- * the earliest time that a thread will be ready:
- */
- p_tv = &tv;
- }
-
- /*
- * Flag the pthread kernel as in a select. This is to avoid
- * the window between the next statement that unblocks
- * signals and the select statement which follows.
- */
- _thread_kern_in_select = 1;
-
- /* Unblock all signals: */
- _thread_kern_sig_unblock(0);
-
- /*
- * Wait for a file descriptor to be ready for read, write, or
- * an exception, or a timeout to occur:
- */
- count = _thread_sys_select(nfds + 1, &fd_set_read, &fd_set_write, &fd_set_except, p_tv);
-
- /* Block all signals again: */
- _thread_kern_sig_block(NULL);
-
- /* Reset the kernel in select flag: */
- _thread_kern_in_select = 0;
-
- /*
- * Check if it is possible that there are bytes in the kernel
- * read pipe waiting to be read:
- */
- if (count < 0 || FD_ISSET(_thread_kern_pipe[0], &fd_set_read)) {
- /*
- * Check if the kernel read pipe was included in the
- * count:
- */
- if (count > 0) {
- /*
- * Remove the kernel read pipe from the
- * count:
- */
- FD_CLR(_thread_kern_pipe[0], &fd_set_read);
-
- /* Decrement the count of file descriptors: */
- count--;
- }
- /*
- * Enter a loop to read (and trash) bytes from the
- * pthread kernel pipe:
- */
- while ((num = _thread_sys_read(_thread_kern_pipe[0], bufr, sizeof(bufr))) > 0) {
- /*
- * The buffer read contains one byte per
- * signal and each byte is the signal number.
- * This data is not used, but the fact that
- * the signal handler wrote to the pipe *is*
- * used to cause the _thread_sys_select call
- * to complete if the signal occurred between
- * the time when signals were unblocked and
- * the _thread_sys_select select call being
- * made.
- */
- }
- }
- }
- /* Check if there are file descriptors to poll: */
- else if (count > 0) {
- /*
- * Point to the time value structure which has been zeroed so
- * that the call to _thread_sys_select will not wait:
- */
- p_tv = &tv;
-
- /* Poll file descrptors without wait: */
- count = _thread_sys_select(nfds + 1, &fd_set_read, &fd_set_write, &fd_set_except, p_tv);
- }
- /*
- * Check if the select call was interrupted, or some other error
- * occurred:
- */
- if (count < 0) {
- /* Check if the select call was interrupted: */
- if (errno == EINTR) {
- /*
- * Interrupted calls are expected. The interrupting
- * signal will be in the sigpend array.
- */
- } else {
- /* This should not occur: */
- }
- }
- /* Check if no file descriptors are ready: */
- else if (count == 0) {
- /* Nothing to do here. */
- } else {
- /*
- * Enter a loop to look for threads waiting on file
- * descriptors that are flagged as available by the
- * _thread_sys_select syscall:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Process according to thread state: */
- switch (pthread->state) {
- /*
- * States which do not depend on file
- * descriptor I/O operations:
- */
- case PS_RUNNING:
- case PS_COND_WAIT:
- case PS_DEAD:
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_JOIN:
- case PS_MUTEX_WAIT:
- case PS_SIGWAIT:
- case PS_SLEEP_WAIT:
- case PS_WAIT_WAIT:
- case PS_SIGTHREAD:
- case PS_STATE_MAX:
- case PS_SUSPENDED:
- /* Nothing to do here. */
- break;
-
- /* File descriptor read wait: */
- case PS_FDR_WAIT:
- /*
- * Check if the file descriptor is available
- * for read:
- */
- if (FD_ISSET(pthread->data.fd.fd, &fd_set_read)) {
- /*
- * Change the thread state to allow
- * it to read from the file when it
- * is scheduled next:
- */
- pthread->state = PS_RUNNING;
- }
- break;
-
- /* File descriptor write wait: */
- case PS_FDW_WAIT:
- /*
- * Check if the file descriptor is available
- * for write:
- */
- if (FD_ISSET(pthread->data.fd.fd, &fd_set_write)) {
- /*
- * Change the thread state to allow
- * it to write to the file when it is
- * scheduled next:
- */
- pthread->state = PS_RUNNING;
- }
- break;
-
- /* Select wait: */
- case PS_SELECT_WAIT:
- /*
- * Reset the flag that indicates if a file
- * descriptor is ready for some type of
- * operation:
- */
- count_dec = 0;
-
- /*
- * Enter a loop to search though the
- * thread-specific select file descriptors
- * for the first descriptor that is ready:
- */
- for (i = 0; i < pthread->data.select_data->nfds && count_dec == 0; i++) {
- /*
- * Check if this file descriptor does
- * not have an exception:
- */
- if (FD_ISSET(i, &pthread->data.select_data->exceptfds) && FD_ISSET(i, &fd_set_except)) {
- /*
- * Flag this file descriptor
- * as ready:
- */
- count_dec = 1;
- }
- /*
- * Check if this file descriptor is
- * not ready for write:
- */
- if (FD_ISSET(i, &pthread->data.select_data->writefds) && FD_ISSET(i, &fd_set_write)) {
- /*
- * Flag this file descriptor
- * as ready:
- */
- count_dec = 1;
- }
- /*
- * Check if this file descriptor is
- * not ready for read:
- */
- if (FD_ISSET(i, &pthread->data.select_data->readfds) && FD_ISSET(i, &fd_set_read)) {
- /*
- * Flag this file descriptor
- * as ready:
- */
- count_dec = 1;
- }
- }
-
- /*
- * Check if any file descriptors are ready
- * for the current thread:
- */
- if (count_dec) {
- /*
- * Reset the count of file
- * descriptors that are ready for
- * this thread:
- */
- found_one = 0;
-
- /*
- * Enter a loop to search though the
- * thread-specific select file
- * descriptors:
- */
- for (i = 0; i < pthread->data.select_data->nfds; i++) {
- /*
- * Reset the count of
- * operations for which the
- * current file descriptor is
- * ready:
- */
- count_dec = 0;
-
- /*
- * Check if this file
- * descriptor is selected for
- * exceptions:
- */
- if (FD_ISSET(i, &pthread->data.select_data->exceptfds)) {
- /*
- * Check if this file
- * descriptor has an
- * exception:
- */
- if (FD_ISSET(i, &fd_set_except)) {
- /*
- * Increment
- * the count
- * for this
- * file:
- */
- count_dec++;
- } else {
- /*
- * Clear the
- * file
- * descriptor
- * in the
- * thread-spec
- * ific file
- * descriptor
- * set:
- */
- FD_CLR(i, &pthread->data.select_data->exceptfds);
- }
- }
- /*
- * Check if this file
- * descriptor is selected for
- * write:
- */
- if (FD_ISSET(i, &pthread->data.select_data->writefds)) {
- /*
- * Check if this file
- * descriptor is
- * ready for write:
- */
- if (FD_ISSET(i, &fd_set_write)) {
- /*
- * Increment
- * the count
- * for this
- * file:
- */
- count_dec++;
- } else {
- /*
- * Clear the
- * file
- * descriptor
- * in the
- * thread-spec
- * ific file
- * descriptor
- * set:
- */
- FD_CLR(i, &pthread->data.select_data->writefds);
- }
- }
- /*
- * Check if this file
- * descriptor is selected for
- * read:
- */
- if (FD_ISSET(i, &pthread->data.select_data->readfds)) {
- /*
- * Check if this file
- * descriptor is
- * ready for read:
- */
- if (FD_ISSET(i, &fd_set_read)) {
- /*
- * Increment
- * the count
- * for this
- * file:
- */
- count_dec++;
- } else {
- /*
- * Clear the
- * file
- * descriptor
- * in the
- * thread-spec
- * ific file
- * descriptor
- * set:
- */
- FD_CLR(i, &pthread->data.select_data->readfds);
- }
- }
- /*
- * Check if the current file
- * descriptor is ready for
- * any one of the operations:
- */
- if (count_dec > 0) {
- /*
- * Increment the
- * count of file
- * descriptors that
- * are ready for the
- * current thread:
- */
- found_one++;
- }
- }
-
- /*
- * Return the number of file
- * descriptors that are ready:
- */
- pthread->data.select_data->nfds = found_one;
-
- /*
- * Change the state of the current
- * thread to run:
- */
- pthread->state = PS_RUNNING;
- }
- break;
- }
- }
- }
-
- /* Nothing to return. */
- return;
-}
-
-void
-_thread_kern_set_timeout(struct timespec * timeout)
-{
- struct timespec current_time;
- struct timeval tv;
-
- /* Reset the timeout flag for the running thread: */
- _thread_run->timeout = 0;
-
- /* Check if the thread is to wait forever: */
- if (timeout == NULL) {
- /*
- * Set the wakeup time to something that can be recognised as
- * different to an actual time of day:
- */
- _thread_run->wakeup_time.tv_sec = -1;
- _thread_run->wakeup_time.tv_nsec = -1;
- }
- /* Check if no waiting is required: */
- else if (timeout->tv_sec == 0 && timeout->tv_nsec == 0) {
- /* Set the wake up time to 'immediately': */
- _thread_run->wakeup_time.tv_sec = 0;
- _thread_run->wakeup_time.tv_nsec = 0;
- } else {
- /* Get the current time: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &current_time);
-
- /* Calculate the time for the current thread to wake up: */
- _thread_run->wakeup_time.tv_sec = current_time.tv_sec + timeout->tv_sec;
- _thread_run->wakeup_time.tv_nsec = current_time.tv_nsec + timeout->tv_nsec;
-
- /* Check if the nanosecond field needs to wrap: */
- if (_thread_run->wakeup_time.tv_nsec >= 1000000000) {
- /* Wrap the nanosecond field: */
- _thread_run->wakeup_time.tv_sec += 1;
- _thread_run->wakeup_time.tv_nsec -= 1000000000;
- }
- }
- return;
-}
-#endif
diff --git a/lib/libkse/thread/thr_kill.c b/lib/libkse/thread/thr_kill.c
deleted file mode 100644
index eb2c6b7..0000000
--- a/lib/libkse/thread/thr_kill.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <signal.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_kill(pthread_t pthread, int sig)
-{
- int rval = 0;
- int status;
- pthread_t p_pthread;
-
- /* Check for invalid signal numbers: */
- if (sig < 0 || sig >= NSIG)
- /* Invalid signal: */
- rval = EINVAL;
- else {
- /* Assume that the search will succeed: */
- rval = 0;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Search for the thread: */
- p_pthread = _thread_link_list;
- while (p_pthread != NULL && p_pthread != pthread) {
- p_pthread = p_pthread->nxt;
- }
-
- /* Check if the thread was not found: */
- if (p_pthread == NULL)
- /* Can't find the thread: */
- rval = ESRCH;
- else
- /* Increment the pending signal count: */
- p_pthread->sigpend[sig] += 1;
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libkse/thread/thr_mattr_init.c b/lib/libkse/thread/thr_mattr_init.c
deleted file mode 100644
index 73226a6..0000000
--- a/lib/libkse/thread/thr_mattr_init.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1996 Jeffrey Hsu <hsu@freebsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_mutexattr_init(pthread_mutexattr_t *attr)
-{
- int ret;
- pthread_mutexattr_t pattr;
-
- if ((pattr = (pthread_mutexattr_t)
- malloc(sizeof(struct pthread_mutex_attr))) == NULL) {
- ret = ENOMEM;
- } else {
- memcpy(pattr, &pthread_mutexattr_default,
- sizeof(struct pthread_mutex_attr));
- *attr = pattr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_mattr_kind_np.c b/lib/libkse/thread/thr_mattr_kind_np.c
deleted file mode 100644
index 3eeabff..0000000
--- a/lib/libkse/thread/thr_mattr_kind_np.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1996 Jeffrey Hsu <hsu@freebsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- (*attr)->m_type = kind;
- ret = 0;
- }
- return(ret);
-}
-
-int
-pthread_mutexattr_getkind_np(pthread_mutexattr_t attr)
-{
- int ret;
- if (attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- ret = attr->m_type;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_multi_np.c b/lib/libkse/thread/thr_multi_np.c
deleted file mode 100644
index 64f360f..0000000
--- a/lib/libkse/thread/thr_multi_np.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_multi_np()
-{
- /* Return to multi-threaded scheduling mode: */
- _thread_single = NULL;
- return(0);
-}
-#endif
diff --git a/lib/libkse/thread/thr_mutex.c b/lib/libkse/thread/thr_mutex.c
deleted file mode 100644
index e6be6de..0000000
--- a/lib/libkse/thread/thr_mutex.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_mutex_init(pthread_mutex_t * mutex,
- const pthread_mutexattr_t * mutex_attr)
-{
- enum pthread_mutextype type;
- pthread_mutex_t pmutex;
- int ret = 0;
- int status;
-
- if (mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Check if default mutex attributes: */
- if (mutex_attr == NULL || *mutex_attr == NULL) {
- /* Default to a fast mutex: */
- type = MUTEX_TYPE_FAST;
- } else if ((*mutex_attr)->m_type >= MUTEX_TYPE_MAX) {
- /* Return an invalid argument error: */
- ret = EINVAL;
- } else {
- /* Use the requested mutex type: */
- type = (*mutex_attr)->m_type;
- }
-
- /* Check no errors so far: */
- if (ret == 0) {
- if ((pmutex = (pthread_mutex_t) malloc(sizeof(struct pthread_mutex))) == NULL) {
- ret = ENOMEM;
- } else {
- /* Reset the mutex flags: */
- pmutex->m_flags = 0;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch (type) {
- /* Fast mutex: */
- case MUTEX_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Reset the mutex count: */
- pmutex->m_data.m_count = 0;
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
- if (ret == 0) {
- /* Initialise the rest of the mutex: */
- _thread_queue_init(&pmutex->m_queue);
- pmutex->m_flags |= MUTEX_FLAGS_INITED;
- pmutex->m_owner = NULL;
- pmutex->m_type = type;
- *mutex = pmutex;
- } else {
- free(pmutex);
- *mutex = NULL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
- }
- }
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_destroy(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutex: */
- case MUTEX_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Reset the mutex count: */
- (*mutex)->m_data.m_count = 0;
- break;
-
- /* Trap undefined mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Clean up the mutex in case that others want to use it: */
- _thread_queue_init(&(*mutex)->m_queue);
- (*mutex)->m_owner = NULL;
- (*mutex)->m_flags = 0;
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_trylock(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutex: */
- case MUTEX_TYPE_FAST:
- /* Check if this mutex is not locked: */
- if ((*mutex)->m_owner == NULL) {
- /* Lock the mutex for the running thread: */
- (*mutex)->m_owner = _thread_run;
- } else {
- /* Return a busy error: */
- ret = EBUSY;
- }
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Check if this mutex is locked: */
- if ((*mutex)->m_owner != NULL) {
- /*
- * Check if the mutex is locked by the running
- * thread:
- */
- if ((*mutex)->m_owner == _thread_run) {
- /* Increment the lock count: */
- (*mutex)->m_data.m_count++;
- } else {
- /* Return a busy error: */
- ret = EBUSY;
- }
- } else {
- /* Lock the mutex for the running thread: */
- (*mutex)->m_owner = _thread_run;
- }
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_lock(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutexes do not check for any error conditions: */
- case MUTEX_TYPE_FAST:
- /*
- * Enter a loop to wait for the mutex to be locked by the
- * current thread:
- */
- while ((*mutex)->m_owner != _thread_run) {
- /* Check if the mutex is not locked: */
- if ((*mutex)->m_owner == NULL) {
- /* Lock the mutex for this thread: */
- (*mutex)->m_owner = _thread_run;
- } else {
- /*
- * Join the queue of threads waiting to lock
- * the mutex:
- */
- _thread_queue_enq(&(*mutex)->m_queue, _thread_run);
-
- /* Block signals: */
- _thread_kern_sched_state(PS_MUTEX_WAIT, __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
- }
- }
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /*
- * Enter a loop to wait for the mutex to be locked by the
- * current thread:
- */
- while ((*mutex)->m_owner != _thread_run) {
- /* Check if the mutex is not locked: */
- if ((*mutex)->m_owner == NULL) {
- /* Lock the mutex for this thread: */
- (*mutex)->m_owner = _thread_run;
-
- /* Reset the lock count for this mutex: */
- (*mutex)->m_data.m_count = 0;
- } else {
- /*
- * Join the queue of threads waiting to lock
- * the mutex:
- */
- _thread_queue_enq(&(*mutex)->m_queue, _thread_run);
-
- /* Block signals: */
- _thread_kern_sched_state(PS_MUTEX_WAIT, __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
- }
- }
-
- /* Increment the lock count for this mutex: */
- (*mutex)->m_data.m_count++;
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_unlock(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutexes do not check for any error conditions: */
- case MUTEX_TYPE_FAST:
- /* Check if the running thread is not the owner of the mutex: */
- if ((*mutex)->m_owner != _thread_run) {
- /* Return an invalid argument error: */
- ret = EINVAL;
- }
- /*
- * Get the next thread from the queue of threads waiting on
- * the mutex:
- */
- else if (((*mutex)->m_owner = _thread_queue_deq(&(*mutex)->m_queue)) != NULL) {
- /* Allow the new owner of the mutex to run: */
- PTHREAD_NEW_STATE((*mutex)->m_owner,PS_RUNNING);
- }
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Check if the running thread is not the owner of the mutex: */
- if ((*mutex)->m_owner != _thread_run) {
- /* Return an invalid argument error: */
- ret = EINVAL;
- }
- /* Check if there are still counts: */
- else if ((*mutex)->m_data.m_count) {
- /* Decrement the count: */
- (*mutex)->m_data.m_count--;
- }
- /*
- * Get the next thread from the queue of threads waiting on
- * the mutex:
- */
- else if (((*mutex)->m_owner = _thread_queue_deq(&(*mutex)->m_queue)) != NULL) {
- /* Allow the new owner of the mutex to run: */
- PTHREAD_NEW_STATE((*mutex)->m_owner,PS_RUNNING);
- }
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_mutexattr_destroy.c b/lib/libkse/thread/thr_mutexattr_destroy.c
deleted file mode 100644
index 5642cbe..0000000
--- a/lib/libkse/thread/thr_mutexattr_destroy.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- ret = EINVAL;
- } else {
- free(*attr);
- *attr = NULL;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_nanosleep.c b/lib/libkse/thread/thr_nanosleep.c
deleted file mode 100644
index 39c7dad..0000000
--- a/lib/libkse/thread/thr_nanosleep.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdio.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-nanosleep(const struct timespec * time_to_sleep,
- struct timespec * time_remaining)
-{
- int ret = 0;
- struct timespec current_time;
- struct timespec current_time1;
- struct timespec remaining_time;
- struct timeval tv;
-
- /* Check if the time to sleep is legal: */
- if (time_to_sleep == NULL || time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) {
- /* Return an EINVAL error : */
- errno = EINVAL;
- ret = -1;
- } else {
- /* Get the current time: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &current_time);
-
- /* Calculate the time for the current thread to wake up: */
- _thread_run->wakeup_time.tv_sec = current_time.tv_sec + time_to_sleep->tv_sec;
- _thread_run->wakeup_time.tv_nsec = current_time.tv_nsec + time_to_sleep->tv_nsec;
-
- /* Check if the nanosecond field has overflowed: */
- if (_thread_run->wakeup_time.tv_nsec >= 1000000000) {
- /* Wrap the nanosecond field: */
- _thread_run->wakeup_time.tv_sec += 1;
- _thread_run->wakeup_time.tv_nsec -= 1000000000;
- }
-
- /* Reschedule the current thread to sleep: */
- _thread_kern_sched_state(PS_SLEEP_WAIT, __FILE__, __LINE__);
-
- /* Get the current time: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &current_time1);
-
- /* Calculate the remaining time to sleep: */
- remaining_time.tv_sec = time_to_sleep->tv_sec + current_time.tv_sec - current_time1.tv_sec;
- remaining_time.tv_nsec = time_to_sleep->tv_nsec + current_time.tv_nsec - current_time1.tv_nsec;
-
- /* Check if the nanosecond field has underflowed: */
- if (remaining_time.tv_nsec < 0) {
- /* Handle the underflow: */
- remaining_time.tv_sec -= 1;
- remaining_time.tv_nsec += 1000000000;
- }
-
- /* Check if the nanosecond field has overflowed: */
- if (remaining_time.tv_nsec >= 1000000000) {
- /* Handle the overflow: */
- remaining_time.tv_sec += 1;
- remaining_time.tv_nsec -= 1000000000;
- }
-
- /* Check if the sleep was longer than the required time: */
- if (remaining_time.tv_sec < 0) {
- /* Reset the time left: */
- remaining_time.tv_sec = 0;
- remaining_time.tv_nsec = 0;
- }
-
- /* Check if the time remaining is to be returned: */
- if (time_remaining != NULL) {
- /* Return the actual time slept: */
- time_remaining->tv_sec = remaining_time.tv_sec;
- time_remaining->tv_nsec = remaining_time.tv_nsec;
- }
-
- /* Check if the entire sleep was not completed: */
- if (remaining_time.tv_nsec != 0 || remaining_time.tv_sec != 0) {
- /* Return an EINTR error : */
- errno = EINTR;
- ret = -1;
- }
- }
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_once.c b/lib/libkse/thread/thr_once.c
deleted file mode 100644
index c55ba9e..0000000
--- a/lib/libkse/thread/thr_once.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_once(pthread_once_t * once_control, void (*init_routine) (void))
-{
- if (once_control->state == PTHREAD_NEEDS_INIT) {
- pthread_mutex_lock(&(once_control->mutex));
- if (once_control->state == PTHREAD_NEEDS_INIT) {
- init_routine();
- once_control->state = PTHREAD_DONE_INIT;
- }
- pthread_mutex_unlock(&(once_control->mutex));
- }
- return (0);
-}
-#endif
diff --git a/lib/libkse/thread/thr_open.c b/lib/libkse/thread/thr_open.c
deleted file mode 100644
index ef7a504..0000000
--- a/lib/libkse/thread/thr_open.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <stdarg.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-open(const char *path, int flags,...)
-{
- int fd;
- int mode = 0;
- int status;
- va_list ap;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Check if the file is being created: */
- if (flags & O_CREAT) {
- /* Get the creation mode: */
- va_start(ap, flags);
- mode = va_arg(ap, int);
- va_end(ap);
- }
- /* Open the file: */
- if ((fd = _thread_sys_open(path, flags, mode)) < 0) {
- }
- /* Initialise the file descriptor table entry: */
- else if (_thread_fd_table_init(fd) != 0) {
- /* Quietly close the file: */
- _thread_sys_close(fd);
-
- /* Reset the file descriptor: */
- fd = -1;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the file descriptor or -1 on error: */
- return (fd);
-}
-#endif
diff --git a/lib/libkse/thread/thr_private.h b/lib/libkse/thread/thr_private.h
deleted file mode 100644
index e0a0511..0000000
--- a/lib/libkse/thread/thr_private.h
+++ /dev/null
@@ -1,783 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Private thread definitions for the uthread kernel.
- *
- */
-
-#ifndef _PTHREAD_PRIVATE_H
-#define _PTHREAD_PRIVATE_H
-
-/*
- * Evaluate the storage class specifier.
- */
-#ifdef GLOBAL_PTHREAD_PRIVATE
-#define SCLASS
-#else
-#define SCLASS extern
-#endif
-
-/*
- * Include files.
- */
-#include <setjmp.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-/*
- * Kernel fatal error handler macro.
- */
-#define PANIC(string) _thread_exit(__FILE__,__LINE__,string)
-
-/*
- * State change macro:
- */
-#define PTHREAD_NEW_STATE(thrd, newstate) { \
- (thrd)->state = newstate; \
- (thrd)->fname = __FILE__; \
- (thrd)->lineno = __LINE__; \
-}
-
-/*
- * Queue definitions.
- */
-struct pthread_queue {
- struct pthread *q_next;
- struct pthread *q_last;
- void *q_data;
-};
-
-/*
- * Static queue initialization values.
- */
-#define PTHREAD_QUEUE_INITIALIZER { NULL, NULL, NULL }
-
-/*
- * Mutex definitions.
- */
-union pthread_mutex_data {
- void *m_ptr;
- int m_count;
-};
-
-struct pthread_mutex {
- enum pthread_mutextype m_type;
- struct pthread_queue m_queue;
- struct pthread *m_owner;
- union pthread_mutex_data m_data;
- long m_flags;
-};
-
-/*
- * Flags for mutexes.
- */
-#define MUTEX_FLAGS_PRIVATE 0x01
-#define MUTEX_FLAGS_INITED 0x02
-#define MUTEX_FLAGS_BUSY 0x04
-
-/*
- * Static mutex initialization values.
- */
-#define PTHREAD_MUTEX_INITIALIZER \
- { MUTEX_TYPE_FAST, PTHREAD_QUEUE_INITIALIZER, \
- NULL, { NULL }, MUTEX_FLAGS_INITED }
-
-struct pthread_mutex_attr {
- enum pthread_mutextype m_type;
- long m_flags;
-};
-
-/*
- * Condition variable definitions.
- */
-enum pthread_cond_type {
- COND_TYPE_FAST,
- COND_TYPE_MAX
-};
-
-struct pthread_cond {
- enum pthread_cond_type c_type;
- struct pthread_queue c_queue;
- void *c_data;
- long c_flags;
-};
-
-struct pthread_cond_attr {
- enum pthread_cond_type c_type;
- long c_flags;
-};
-
-/*
- * Flags for condition variables.
- */
-#define COND_FLAGS_PRIVATE 0x01
-#define COND_FLAGS_INITED 0x02
-#define COND_FLAGS_BUSY 0x04
-
-/*
- * Static cond initialization values.
- */
-#define PTHREAD_COND_INITIALIZER \
- { COND_TYPE_FAST, PTHREAD_QUEUE_INITIALIZER, NULL, COND_FLAGS_INITED }
-
-/*
- * Cleanup definitions.
- */
-struct pthread_cleanup {
- struct pthread_cleanup *next;
- void (*routine) ();
- void *routine_arg;
-};
-
-/*
- * Scheduling definitions.
- */
-enum schedparam_policy {
- SCHED_RR,
- SCHED_IO,
- SCHED_FIFO,
- SCHED_OTHER
-};
-
-struct pthread_attr {
- enum schedparam_policy schedparam_policy;
- int prio;
- int suspend;
- int flags;
- void *arg_attr;
- void (*cleanup_attr) ();
- void *stackaddr_attr;
- size_t stacksize_attr;
-};
-
-struct sched_param {
- int prio;
- void *no_data;
-};
-
-/*
- * Thread creation state attributes.
- */
-#define PTHREAD_CREATE_RUNNING 0
-#define PTHREAD_CREATE_SUSPENDED 1
-
-/*
- * Miscellaneous definitions.
- */
-#define PTHREAD_STACK_DEFAULT 65536
-#define PTHREAD_DEFAULT_PRIORITY 64
-#define PTHREAD_MAX_PRIORITY 126
-#define PTHREAD_MIN_PRIORITY 0
-#define _POSIX_THREAD_ATTR_STACKSIZE
-
-/*
- * Clock resolution in nanoseconds.
- */
-#define CLOCK_RES_NSEC 10000000
-
-/*
- * Number of microseconds between incremental priority updates for
- * threads that are ready to run, but denied being run.
- */
-#define INC_PRIO_USEC 500000
-
-/*
- * Time slice period in microseconds.
- */
-#define TIMESLICE_USEC 100000
-
-struct pthread_key {
- pthread_mutex_t mutex;
- long count;
- void (*destructor) ();
-};
-
-/*
- * Thread states.
- */
-enum pthread_state {
- PS_RUNNING,
- PS_SIGTHREAD,
- PS_MUTEX_WAIT,
- PS_COND_WAIT,
- PS_FDLR_WAIT,
- PS_FDLW_WAIT,
- PS_FDR_WAIT,
- PS_FDW_WAIT,
- PS_SELECT_WAIT,
- PS_SLEEP_WAIT,
- PS_WAIT_WAIT,
- PS_SIGWAIT,
- PS_JOIN,
- PS_SUSPENDED,
- PS_DEAD,
- PS_STATE_MAX
-};
-
-
-/*
- * File descriptor locking definitions.
- */
-#define FD_READ 0x1
-#define FD_WRITE 0x2
-#define FD_RDWR (FD_READ | FD_WRITE)
-
-/*
- * File descriptor table structure.
- */
-struct fd_table_entry {
- struct pthread_queue r_queue; /* Read queue. */
- struct pthread_queue w_queue; /* Write queue. */
- struct pthread *r_owner; /* Ptr to thread owning read lock. */
- struct pthread *w_owner; /* Ptr to thread owning write lock. */
- char *r_fname; /* Ptr to read lock source file name */
- int r_lineno; /* Read lock source line number. */
- char *w_fname; /* Ptr to write lock source file name */
- int w_lineno; /* Write lock source line number. */
- int r_lockcount; /* Count for FILE read locks. */
- int w_lockcount; /* Count for FILE write locks. */
- int flags; /* Flags used in open. */
-};
-
-struct pthread_select_data {
- int nfds;
- fd_set readfds;
- fd_set writefds;
- fd_set exceptfds;
-};
-
-union pthread_wait_data {
- pthread_mutex_t *mutex;
- pthread_cond_t *cond;
- const sigset_t *sigwait; /* Waiting on a signal in sigwait */
- struct {
- short fd; /* Used when thread waiting on fd */
- short branch; /* Line number, for debugging. */
- char *fname; /* Source file name for debugging.*/
- } fd;
- struct pthread_select_data * select_data;
-};
-
-/*
- * Thread structure.
- */
-struct pthread {
- /*
- * Pointer to the next thread in the thread linked list.
- */
- struct pthread *nxt;
-
- /*
- * Thread start routine, argument, stack pointer and thread
- * attributes.
- */
- void *(*start_routine)(void *);
- void *arg;
- void *stack;
- struct pthread_attr attr;
-
- /*
- * Thread-specific signal handler interface:
- *
- * Array of signal actions for this thread.
- */
- struct sigaction act[NSIG];
-
-#if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(__i386__)
- /*
- * Saved floating point registers on systems where they are not
- * saved in the signal context.
- */
- char saved_fp[108];
-#endif
-
- /*
- * Saved signal context used in call to sigreturn by
- * _thread_kern_sched if sig_saved is TRUE.
- */
- struct sigcontext saved_sigcontext;
-
- /*
- * Saved jump buffer used in call to longjmp by _thread_kern_sched
- * if sig_saved is FALSE.
- */
- jmp_buf saved_jmp_buf;
-
- /*
- * TRUE if the last state saved was a signal context. FALSE if the
- * last state saved was a jump buffer.
- */
- int sig_saved;
-
- /*
- * Current signal mask and array of pending signals.
- */
- sigset_t sigmask;
- int sigpend[NSIG];
-
- /*
- * Pointer to the parent thread for which the current thread is
- * a signal handler thread, otherwise NULL if the current thread
- * is not a signal handler thread.
- */
- struct pthread *parent_thread;
-
- /* Thread state: */
- enum pthread_state state;
-
- /* Time that this thread was last made active. */
- struct timeval last_active;
-
- /* Time that this thread was last made inactive. */
- struct timeval last_inactive;
-
- /*
- * Number of microseconds accumulated by this thread when
- * time slicing is active.
- */
- long slice_usec;
-
- /*
- * Incremental priority accumulated by thread while it is ready to
- * run but is denied being run.
- */
- int inc_prio;
-
- /*
- * Time to wake up thread. This is used for sleeping threads and
- * for any operation which may time out (such as select).
- */
- struct timespec wakeup_time;
-
- /* TRUE if operation has timed out. */
- int timeout;
-
- /*
- * Error variable used instead of errno. The function __error()
- * returns a pointer to this.
- */
- int error;
-
- /* Join queue for waiting threads: */
- struct pthread_queue join_queue;
-
- /*
- * The current thread can belong to only one queue at a time.
- *
- * Pointer to queue (if any) on which the current thread is waiting.
- */
- struct pthread_queue *queue;
-
- /* Pointer to next element in queue. */
- struct pthread *qnxt;
-
- /* Wait data. */
- union pthread_wait_data data;
-
- /*
- * Set to TRUE if a blocking operation was
- * interrupted by a signal:
- */
- int interrupted;
-
- /* Signal number when in state PS_SIGWAIT: */
- int signo;
-
- /* Miscellaneous data. */
- char flags;
- char pthread_priority;
- void *ret;
- const void **specific_data;
- int specific_data_count;
-
- /* Cleanup handlers Link List */
- struct pthread_cleanup *cleanup;
- char *fname; /* Ptr to source file name */
- int lineno; /* Source line number. */
-};
-
-/*
- * Global variables for the uthread kernel.
- */
-
-/* Kernel thread structure used when there are no running threads: */
-SCLASS struct pthread _thread_kern_thread;
-
-/* Ptr to the thread structure for the running thread: */
-SCLASS struct pthread * volatile _thread_run
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= &_thread_kern_thread;
-#else
-;
-#endif
-
-/*
- * Ptr to the thread running in single-threaded mode or NULL if
- * running multi-threaded (default POSIX behaviour).
- */
-SCLASS struct pthread * volatile _thread_single
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/* Ptr to the first thread in the thread linked list: */
-SCLASS struct pthread * volatile _thread_link_list
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/*
- * Array of kernel pipe file descriptors that are used to ensure that
- * no signals are missed in calls to _thread_sys_select.
- */
-SCLASS int _thread_kern_pipe[2]
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= {
- -1,
- -1
-};
-#else
-;
-#endif
-SCLASS int _thread_kern_in_select
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= 0;
-#else
-;
-#endif
-
-/* Last time that an incremental priority update was performed: */
-SCLASS struct timeval kern_inc_prio_time
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { 0, 0 };
-#else
-;
-#endif
-
-/* Dead threads: */
-SCLASS struct pthread * volatile _thread_dead
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/* Initial thread: */
-SCLASS struct pthread *_thread_initial
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/* Default thread attributes: */
-SCLASS struct pthread_attr pthread_attr_default
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { SCHED_RR, PTHREAD_DEFAULT_PRIORITY, PTHREAD_CREATE_RUNNING,
- PTHREAD_CREATE_JOINABLE, NULL, NULL, NULL, PTHREAD_STACK_DEFAULT };
-#else
-;
-#endif
-
-/* Default mutex attributes: */
-SCLASS struct pthread_mutex_attr pthread_mutexattr_default
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { MUTEX_TYPE_FAST, 0 };
-#else
-;
-#endif
-
-/* Default condition variable attributes: */
-SCLASS struct pthread_cond_attr pthread_condattr_default
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { COND_TYPE_FAST, 0 };
-#else
-;
-#endif
-
-/*
- * Standard I/O file descriptors need special flag treatment since
- * setting one to non-blocking does all on *BSD. Sigh. This array
- * is used to store the initial flag settings.
- */
-SCLASS int _pthread_stdio_flags[3];
-
-/* File table information: */
-SCLASS struct fd_table_entry **_thread_fd_table
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-SCLASS const int dtablecount
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= 4096/sizeof(struct fd_table_entry);
-#else
-;
-#endif
-SCLASS int _thread_dtablesize /* Descriptor table size. */
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= 1024;
-#else
-;
-#endif
-
-/* Undefine the storage class specifier: */
-#undef SCLASS
-
-/*
- * Function prototype definitions.
- */
-__BEGIN_DECLS
-char *__ttyname_basic(int);
-char *__ttyname_r_basic(int, char *, size_t);
-char *ttyname_r(int, char *, size_t);
-int _thread_create(pthread_t *,const pthread_attr_t *,void *(*start_routine)(void *),void *,pthread_t);
-int _thread_fd_lock(int, int, struct timespec *,char *fname,int lineno);
-void _thread_exit(char *, int, char *);
-void _thread_fd_unlock(int, int);
-void *_thread_cleanup(pthread_t);
-void _thread_cleanupspecific(void);
-void _thread_dump_info(void);
-void _thread_init(void);
-void _thread_kern_sched(struct sigcontext *);
-void _thread_kern_sched_state(enum pthread_state,char *fname,int lineno);
-void _thread_kern_set_timeout(struct timespec *);
-void _thread_kern_sig_block(int *);
-void _thread_kern_sig_unblock(int);
-void _thread_sig_handler(int, int, struct sigcontext *);
-void _thread_start(void);
-void _thread_start_sig_handler(void);
-void _thread_seterrno(pthread_t,int);
-void _thread_queue_init(struct pthread_queue *);
-void _thread_queue_enq(struct pthread_queue *, struct pthread *);
-int _thread_queue_remove(struct pthread_queue *, struct pthread *);
-int _thread_fd_table_init(int fd);
-struct pthread *_thread_queue_get(struct pthread_queue *);
-struct pthread *_thread_queue_deq(struct pthread_queue *);
-
-/* #include <signal.h> */
-int _thread_sys_sigaction(int, const struct sigaction *, struct sigaction *);
-int _thread_sys_sigpending(sigset_t *);
-int _thread_sys_sigprocmask(int, const sigset_t *, sigset_t *);
-int _thread_sys_sigsuspend(const sigset_t *);
-int _thread_sys_sigblock(int);
-int _thread_sys_siginterrupt(int, int);
-int _thread_sys_sigpause(int);
-int _thread_sys_sigreturn(struct sigcontext *);
-int _thread_sys_sigsetmask(int);
-int _thread_sys_sigstack(const struct sigstack *, struct sigstack *);
-int _thread_sys_sigvec(int, struct sigvec *, struct sigvec *);
-void _thread_sys_psignal(unsigned int, const char *);
-void (*_thread_sys_signal(int, void (*)(int)))(int);
-
-/* #include <sys/stat.h> */
-#ifdef _SYS_STAT_H_
-int _thread_sys_fchmod(int, mode_t);
-int _thread_sys_fstat(int, struct stat *);
-int _thread_sys_fchflags(int, u_long);
-#endif
-
-/* #include <sys/mount.h> */
-#ifdef _SYS_MOUNT_H_
-int _thread_sys_fstatfs(int, struct statfs *);
-#endif
-int _thread_sys_pipe(int *);
-
-/* #include <sys/socket.h> */
-#ifdef _SYS_SOCKET_H_
-int _thread_sys_accept(int, struct sockaddr *, int *);
-int _thread_sys_bind(int, const struct sockaddr *, int);
-int _thread_sys_connect(int, const struct sockaddr *, int);
-int _thread_sys_getpeername(int, struct sockaddr *, int *);
-int _thread_sys_getsockname(int, struct sockaddr *, int *);
-int _thread_sys_getsockopt(int, int, int, void *, int *);
-int _thread_sys_listen(int, int);
-int _thread_sys_setsockopt(int, int, int, const void *, int);
-int _thread_sys_shutdown(int, int);
-int _thread_sys_socket(int, int, int);
-int _thread_sys_socketpair(int, int, int, int *);
-ssize_t _thread_sys_recv(int, void *, size_t, int);
-ssize_t _thread_sys_recvfrom(int, void *, size_t, int, struct sockaddr *, int *);
-ssize_t _thread_sys_recvmsg(int, struct msghdr *, int);
-ssize_t _thread_sys_send(int, const void *, size_t, int);
-ssize_t _thread_sys_sendmsg(int, const struct msghdr *, int);
-ssize_t _thread_sys_sendto(int, const void *,size_t, int, const struct sockaddr *, int);
-#endif
-
-/* #include <stdio.h> */
-#ifdef _STDIO_H_
-void _thread_flockfile(FILE *fp,char *fname,int lineno);
-void _thread_funlockfile(FILE *fp);
-FILE *_thread_sys_fdopen(int, const char *);
-FILE *_thread_sys_fopen(const char *, const char *);
-FILE *_thread_sys_freopen(const char *, const char *, FILE *);
-FILE *_thread_sys_popen(const char *, const char *);
-FILE *_thread_sys_tmpfile(void);
-char *_thread_sys_ctermid(char *);
-char *_thread_sys_cuserid(char *);
-char *_thread_sys_fgetln(FILE *, size_t *);
-char *_thread_sys_fgets(char *, int, FILE *);
-char *_thread_sys_gets(char *);
-char *_thread_sys_tempnam(const char *, const char *);
-char *_thread_sys_tmpnam(char *);
-int _thread_sys_fclose(FILE *);
-int _thread_sys_feof(FILE *);
-int _thread_sys_ferror(FILE *);
-int _thread_sys_fflush(FILE *);
-int _thread_sys_fgetc(FILE *);
-int _thread_sys_fgetpos(FILE *, fpos_t *);
-int _thread_sys_fileno(FILE *);
-int _thread_sys_fprintf(FILE *, const char *, ...);
-int _thread_sys_fpurge(FILE *);
-int _thread_sys_fputc(int, FILE *);
-int _thread_sys_fputs(const char *, FILE *);
-int _thread_sys_fscanf(FILE *, const char *, ...);
-int _thread_sys_fseek(FILE *, long, int);
-int _thread_sys_fsetpos(FILE *, const fpos_t *);
-int _thread_sys_getc(FILE *);
-int _thread_sys_getchar(void);
-int _thread_sys_getw(FILE *);
-int _thread_sys_pclose(FILE *);
-int _thread_sys_printf(const char *, ...);
-int _thread_sys_putc(int, FILE *);
-int _thread_sys_putchar(int);
-int _thread_sys_puts(const char *);
-int _thread_sys_putw(int, FILE *);
-int _thread_sys_remove(const char *);
-int _thread_sys_rename (const char *, const char *);
-int _thread_sys_scanf(const char *, ...);
-int _thread_sys_setlinebuf(FILE *);
-int _thread_sys_setvbuf(FILE *, char *, int, size_t);
-int _thread_sys_snprintf(char *, size_t, const char *, ...);
-int _thread_sys_sprintf(char *, const char *, ...);
-int _thread_sys_sscanf(const char *, const char *, ...);
-int _thread_sys_ungetc(int, FILE *);
-int _thread_sys_vfprintf(FILE *, const char *, _BSD_VA_LIST_);
-int _thread_sys_vprintf(const char *, _BSD_VA_LIST_);
-int _thread_sys_vscanf(const char *, _BSD_VA_LIST_);
-int _thread_sys_vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_);
-int _thread_sys_vsprintf(char *, const char *, _BSD_VA_LIST_);
-int _thread_sys_vsscanf(const char *, const char *, _BSD_VA_LIST_);
-long _thread_sys_ftell(FILE *);
-size_t _thread_sys_fread(void *, size_t, size_t, FILE *);
-size_t _thread_sys_fwrite(const void *, size_t, size_t, FILE *);
-void _thread_sys_clearerr(FILE *);
-void _thread_sys_perror(const char *);
-void _thread_sys_rewind(FILE *);
-void _thread_sys_setbuf(FILE *, char *);
-void _thread_sys_setbuffer(FILE *, char *, int);
-#endif
-
-/* #include <unistd.h> */
-#ifdef _UNISTD_H_
-char *_thread_sys_ttyname(int);
-int _thread_sys_close(int);
-int _thread_sys_dup(int);
-int _thread_sys_dup2(int, int);
-int _thread_sys_exect(const char *, char * const *, char * const *);
-int _thread_sys_execve(const char *, char * const *, char * const *);
-int _thread_sys_fchdir(int);
-int _thread_sys_fchown(int, uid_t, gid_t);
-int _thread_sys_fsync(int);
-int _thread_sys_ftruncate(int, off_t);
-int _thread_sys_pause(void);
-int _thread_sys_pipe(int *);
-int _thread_sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
-off_t _thread_sys_lseek(int, off_t, int);
-pid_t _thread_sys_fork(void);
-pid_t _thread_sys_tcgetpgrp(int);
-ssize_t _thread_sys_read(int, void *, size_t);
-ssize_t _thread_sys_write(int, const void *, size_t);
-void _thread_sys__exit(int);
-#endif
-
-/* #include <fcntl.h> */
-#ifdef _SYS_FCNTL_H_
-int _thread_sys_creat(const char *, mode_t);
-int _thread_sys_fcntl(int, int, ...);
-int _thread_sys_flock(int, int);
-int _thread_sys_open(const char *, int, ...);
-#endif
-
-/* #include <setjmp.h> */
-#ifdef _SETJMP_H_
-int __thread_sys_setjmp(jmp_buf);
-int _thread_sys_setjmp(jmp_buf);
-int _thread_sys_sigsetjmp(sigjmp_buf, int);
-void __thread_sys_longjmp(jmp_buf, int);
-void _thread_sys_longjmp(jmp_buf, int);
-void _thread_sys_longjmperror(void);
-void _thread_sys_siglongjmp(sigjmp_buf, int);
-#endif
-
-/* #include <sys/ioctl.h> */
-#ifdef _SYS_IOCTL_H_
-int _thread_sys_ioctl(int, unsigned long, ...);
-#endif
-
-/* #include <dirent.h> */
-#ifdef _DIRENT_H_
-DIR *___thread_sys_opendir2(const char *, int);
-DIR *_thread_sys_opendir(const char *);
-int _thread_sys_alphasort(const void *, const void *);
-int _thread_sys_scandir(const char *, struct dirent ***,
- int (*)(struct dirent *), int (*)(const void *, const void *));
-int _thread_sys_closedir(DIR *);
-int _thread_sys_getdirentries(int, char *, int, long *);
-long _thread_sys_telldir(const DIR *);
-struct dirent *_thread_sys_readdir(DIR *);
-void _thread_sys_rewinddir(DIR *);
-void _thread_sys_seekdir(DIR *, long);
-#endif
-
-/* #include <sys/uio.h> */
-#ifdef _SYS_UIO_H_
-ssize_t _thread_sys_readv(int, const struct iovec *, int);
-ssize_t _thread_sys_writev(int, const struct iovec *, int);
-#endif
-
-/* #include <sys/wait.h> */
-#ifdef WNOHANG
-pid_t _thread_sys_wait(int *);
-pid_t _thread_sys_waitpid(pid_t, int *, int);
-pid_t _thread_sys_wait3(int *, int, struct rusage *);
-pid_t _thread_sys_wait4(pid_t, int *, int, struct rusage *);
-#endif
-__END_DECLS
-
-#endif /* !_PTHREAD_PRIVATE_H */
diff --git a/lib/libkse/thread/thr_read.c b/lib/libkse/thread/thr_read.c
deleted file mode 100644
index 242014e..0000000
--- a/lib/libkse/thread/thr_read.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-read(int fd, void *buf, size_t nbytes)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read: */
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking read syscall: */
- while ((ret = _thread_sys_read(fd, buf, nbytes)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDR_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_READ);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_readv.c b/lib/libkse/thread/thr_readv.c
deleted file mode 100644
index 3ea065e..0000000
--- a/lib/libkse/thread/thr_readv.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-readv(int fd, const struct iovec * iov, int iovcnt)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read: */
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking readv syscall: */
- while ((ret = _thread_sys_readv(fd, iov, iovcnt)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDR_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_READ);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_resume_np.c b/lib/libkse/thread/thr_resume_np.c
deleted file mode 100644
index 934df58..0000000
--- a/lib/libkse/thread/thr_resume_np.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_resume_np(pthread_t thread)
-{
- int ret = -1;
- pthread_t pthread;
- /*
- * Search for the thread in the linked list.
- */
- for (pthread = _thread_link_list; pthread != NULL && ret == -1; pthread = pthread->nxt) {
- /* Is this the thread? */
- if (pthread == thread) {
- /* Found the thread. Is it suspended? */
- if (pthread->state == PS_SUSPENDED) {
- /* Allow the thread to run. */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- ret = 0;
- } else if (pthread->state == PS_RUNNING) {
- /* Thread is already running. */
- ret = 0;
- } else {
- /* Thread is in some other state. */
- errno = EINVAL;
- }
- }
- }
- /* Check if thread was not found. */
- if (ret == -1) {
- /* No such thread */
- errno = ESRCH;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_select.c b/lib/libkse/thread/thr_select.c
deleted file mode 100644
index 7db3ed2..0000000
--- a/lib/libkse/thread/thr_select.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-select(int numfds, fd_set * readfds, fd_set * writefds,
- fd_set * exceptfds, struct timeval * timeout)
-{
- fd_set read_locks, write_locks, rdwr_locks;
- struct timespec ts;
- struct timeval zero_timeout = {0, 0};
- int i, ret = 0, got_all_locks = 1;
- struct pthread_select_data data;
-
- if (numfds > _thread_dtablesize) {
- numfds = _thread_dtablesize;
- }
- /* Check if a timeout was specified: */
- if (timeout) {
- /* Convert the timeval to a timespec: */
- TIMEVAL_TO_TIMESPEC(timeout, &ts);
-
- /* Set the wake up time: */
- _thread_kern_set_timeout(&ts);
- } else {
- /* Wait for ever: */
- _thread_kern_set_timeout(NULL);
- }
-
- FD_ZERO(&read_locks);
- FD_ZERO(&write_locks);
- FD_ZERO(&rdwr_locks);
-
- /* lock readfds */
- if (readfds || writefds || exceptfds) {
- for (i = 0; i < numfds; i++) {
- if ((readfds && (FD_ISSET(i, readfds))) || (exceptfds && FD_ISSET(i, exceptfds))) {
- if (writefds && FD_ISSET(i, writefds)) {
- if ((ret = _thread_fd_lock(i, FD_RDWR, NULL, __FILE__, __LINE__)) != 0) {
- got_all_locks = 0;
- break;
- }
- FD_SET(i, &rdwr_locks);
- } else {
- if ((ret = _thread_fd_lock(i, FD_READ, NULL, __FILE__, __LINE__)) != 0) {
- got_all_locks = 0;
- break;
- }
- FD_SET(i, &read_locks);
- }
- } else {
- if (writefds && FD_ISSET(i, writefds)) {
- if ((ret = _thread_fd_lock(i, FD_WRITE, NULL, __FILE__, __LINE__)) != 0) {
- got_all_locks = 0;
- break;
- }
- FD_SET(i, &write_locks);
- }
- }
- }
- }
- if (got_all_locks) {
- data.nfds = numfds;
- FD_ZERO(&data.readfds);
- FD_ZERO(&data.writefds);
- FD_ZERO(&data.exceptfds);
- if (readfds != NULL) {
- memcpy(&data.readfds, readfds, sizeof(data.readfds));
- }
- if (writefds != NULL) {
- memcpy(&data.writefds, writefds, sizeof(data.writefds));
- }
- if (exceptfds != NULL) {
- memcpy(&data.exceptfds, exceptfds, sizeof(data.exceptfds));
- }
- if ((ret = _thread_sys_select(data.nfds, &data.readfds, &data.writefds, &data.exceptfds, &zero_timeout)) == 0) {
- data.nfds = numfds;
- FD_ZERO(&data.readfds);
- FD_ZERO(&data.writefds);
- FD_ZERO(&data.exceptfds);
- if (readfds != NULL) {
- memcpy(&data.readfds, readfds, sizeof(data.readfds));
- }
- if (writefds != NULL) {
- memcpy(&data.writefds, writefds, sizeof(data.writefds));
- }
- if (exceptfds != NULL) {
- memcpy(&data.exceptfds, exceptfds, sizeof(data.exceptfds));
- }
- _thread_run->data.select_data = &data;
- _thread_kern_sched_state(PS_SELECT_WAIT, __FILE__, __LINE__);
- ret = data.nfds;
- }
- }
- /* clean up the locks */
- for (i = 0; i < numfds; i++)
- if (FD_ISSET(i, &read_locks))
- _thread_fd_unlock(i, FD_READ);
- for (i = 0; i < numfds; i++)
- if (FD_ISSET(i, &rdwr_locks))
- _thread_fd_unlock(i, FD_RDWR);
- for (i = 0; i < numfds; i++)
- if (FD_ISSET(i, &write_locks))
- _thread_fd_unlock(i, FD_WRITE);
-
- if (ret > 0) {
- if (readfds != NULL) {
- for (i = 0; i < numfds; i++) {
- if (FD_ISSET(i, readfds) &&
- !FD_ISSET(i, &data.readfds)) {
- FD_CLR(i, readfds);
- }
- }
- }
- if (writefds != NULL) {
- for (i = 0; i < numfds; i++) {
- if (FD_ISSET(i, writefds) &&
- !FD_ISSET(i, &data.writefds)) {
- FD_CLR(i, writefds);
- }
- }
- }
- if (exceptfds != NULL) {
- for (i = 0; i < numfds; i++) {
- if (FD_ISSET(i, exceptfds) &&
- !FD_ISSET(i, &data.exceptfds)) {
- FD_CLR(i, exceptfds);
- }
- }
- }
- }
-
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_self.c b/lib/libkse/thread/thr_self.c
deleted file mode 100644
index a0a2d2a..0000000
--- a/lib/libkse/thread/thr_self.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-pthread_t
-pthread_self(void)
-{
- /* Return the running thread pointer: */
- return (_thread_run);
-}
-#endif
diff --git a/lib/libkse/thread/thr_seterrno.c b/lib/libkse/thread/thr_seterrno.c
deleted file mode 100644
index c4fe08b6..0000000
--- a/lib/libkse/thread/thr_seterrno.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/*
- * This function needs to reference the global error variable which is
- * normally hidden from the user.
- */
-#ifdef errno
-#undef errno;
-#endif
-extern int errno;
-
-void
-_thread_seterrno(pthread_t thread, int error)
-{
- /* Check for the initial thread: */
- if (thread == _thread_initial) {
- /* The initial thread always uses the global error variable: */
- errno = error;
- } else {
- /*
- * Threads other than the initial thread always use the error
- * field in the thread structureL
- */
- thread->error = error;
- }
-}
-#endif
diff --git a/lib/libkse/thread/thr_setprio.c b/lib/libkse/thread/thr_setprio.c
deleted file mode 100644
index 4b49ed0..0000000
--- a/lib/libkse/thread/thr_setprio.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_setprio(pthread_t pthread, int prio)
-{
- int rval = 0;
- int status;
- pthread_t pthread_p;
-
- /* Check if the priority is invalid: */
- if (prio < PTHREAD_MIN_PRIORITY || prio > PTHREAD_MAX_PRIORITY) {
- /* Return an invalid argument error: */
- errno = EINVAL;
- rval = -1;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the first thread in the list: */
- pthread_p = _thread_link_list;
-
- /* Enter a loop to search for the thread: */
- while (pthread_p != NULL && pthread_p != pthread) {
- /* Point to the next thread: */
- pthread_p = pthread_p->nxt;
- }
-
- /* Check if the thread pointer is NULL: */
- if (pthread == NULL || pthread_p == NULL) {
- /* Return a 'search' error: */
- errno = ESRCH;
- rval = -1;
- } else {
- /* Set the thread priority: */
- pthread->pthread_priority = prio;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the error status: */
- return (rval);
-}
-#endif
diff --git a/lib/libkse/thread/thr_sig.c b/lib/libkse/thread/thr_sig.c
deleted file mode 100644
index e73d5a2..0000000
--- a/lib/libkse/thread/thr_sig.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-_thread_sig_handler(int sig, int code, struct sigcontext * scp)
-{
- char c;
- int i;
- pthread_t pthread;
-
- /*
- * Check if the pthread kernel has unblocked signals (or is about to)
- * and was on its way into a _thread_sys_select when the current
- * signal interrupted it:
- */
- if (_thread_kern_in_select) {
- /* Cast the signal number to a character variable: */
- c = sig;
-
- /*
- * Write the signal number to the kernel pipe so that it will
- * be ready to read when this signal handler returns. This
- * means that the _thread_sys_select call will complete
- * immediately.
- */
- if (_thread_sys_write(_thread_kern_pipe[1], &c, 1) != 1) {
- }
- }
- /* Check if the signal requires a dump of thread information: */
- if (sig == SIGINFO) {
- /* Dump thread information to file: */
- _thread_dump_info();
- } else {
- /* Handle depending on signal type: */
- switch (sig) {
- /* Interval timer used for timeslicing: */
- case SIGVTALRM:
- /*
- * Don't add the signal to any thread. Just want to
- * call the scheduler:
- */
- break;
-
- /* Child termination: */
- case SIGCHLD:
- /*
- * Enter a loop to process each thread in the linked
- * list:
- */
- for (pthread = _thread_link_list; pthread != NULL;
- pthread = pthread->nxt) {
- /*
- * Add the signal to the set of pending
- * signals:
- */
- pthread->sigpend[sig] += 1;
- if (pthread->state == PS_WAIT_WAIT) {
- /* Reset the error: */
- /* There should be another flag so that this is not required! ### */
- _thread_seterrno(pthread, 0);
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- }
-
- /*
- * Go through the file list and set all files
- * to non-blocking again in case the child
- * set some of them to block. Sigh.
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Check if this file is used: */
- if (_thread_fd_table[i] != NULL) {
- /* Set the file descriptor to non-blocking: */
- _thread_sys_fcntl(i, F_SETFL, _thread_fd_table[i]->flags | O_NONBLOCK);
- }
- }
- break;
-
- /* Signals specific to the running thread: */
- case SIGBUS:
- case SIGEMT:
- case SIGFPE:
- case SIGILL:
- case SIGPIPE:
- case SIGSEGV:
- case SIGSYS:
- /* Add the signal to the set of pending signals: */
- _thread_run->sigpend[sig] += 1;
- break;
-
- /* Signals to send to all threads: */
- default:
- /*
- * Enter a loop to process each thread in the linked
- * list:
- */
- for (pthread = _thread_link_list; pthread != NULL;
- pthread = pthread->nxt) {
- /*
- * Add the signal to the set of pending
- * signals:
- */
- pthread->sigpend[sig] += 1;
- }
- break;
- }
-
- /* Check if the kernel is not locked: */
- if (_thread_run != &_thread_kern_thread) {
- /*
- * Schedule the next thread. This function is not
- * expected to return because it will do a longjmp
- * instead.
- */
- _thread_kern_sched(scp);
-
- /*
- * This point should not be reached, so abort the
- * process:
- */
- PANIC("Returned to signal function from scheduler");
- }
- }
-
- /* Returns nothing. */
- return;
-}
-#endif
diff --git a/lib/libkse/thread/thr_sigaction.c b/lib/libkse/thread/thr_sigaction.c
deleted file mode 100644
index dd08405..0000000
--- a/lib/libkse/thread/thr_sigaction.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
-{
- int ret = 0;
- int status;
-
- /* Check if the signal number is out of range: */
- if (sig < 1 || sig > NSIG) {
- /* Return an invalid argument: */
- errno = EINVAL;
- ret = -1;
- } else {
- /*
- * Check if the existing signal action structure contents are
- * to be returned:
- */
- if (oact != NULL) {
- /* Return the existing signal action contents: */
- oact->sa_handler = _thread_run->act[sig - 1].sa_handler;
- oact->sa_mask = _thread_run->act[sig - 1].sa_mask;
- oact->sa_flags = _thread_run->act[sig - 1].sa_flags;
- }
- /* Check if a signal action was supplied: */
- if (act != NULL) {
- /* Block signals while the signal handler is changed: */
- _thread_kern_sig_block(&status);
-
- /* Set the new signal handler: */
- _thread_run->act[sig - 1].sa_handler = act->sa_handler;
- _thread_run->act[sig - 1].sa_mask = act->sa_mask;
- _thread_run->act[sig - 1].sa_flags = act->sa_flags;
-
- /*
- * Unblock signals to allow the new signal handler to
- * take effect:
- */
- _thread_kern_sig_unblock(status);
- }
- }
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_sigmask.c b/lib/libkse/thread/thr_sigmask.c
deleted file mode 100644
index 94f64cb..0000000
--- a/lib/libkse/thread/thr_sigmask.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <signal.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
-{
- int ret = 0;
- int status;
-
- /* Check if the existing signal process mask is to be returned: */
- if (oset != NULL) {
- /* Return the current mask: */
- *oset = _thread_run->sigmask;
- }
- /* Check if a new signal set was provided by the caller: */
- if (set != NULL) {
- /* Block signals while the signal mask is changed: */
- _thread_kern_sig_block(&status);
-
- /* Process according to what to do: */
- switch (how) {
- /* Block signals: */
- case SIG_BLOCK:
- /* Add signals to the existing mask: */
- _thread_run->sigmask |= *set;
- break;
-
- /* Unblock signals: */
- case SIG_UNBLOCK:
- /* Clear signals from the existing mask: */
- _thread_run->sigmask &= ~(*set);
- break;
-
- /* Set the signal process mask: */
- case SIG_SETMASK:
- /* Set the new mask: */
- _thread_run->sigmask = *set;
- break;
-
- /* Trap invalid actions: */
- default:
- /* Return an invalid argument: */
- errno = EINVAL;
- ret = -1;
- break;
- }
-
- /*
- * Schedule the next thread in case there are signals that
- * now need to be acted on:
- */
- _thread_kern_sched(NULL);
- }
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_sigprocmask.c b/lib/libkse/thread/thr_sigprocmask.c
deleted file mode 100644
index b4a8d84..0000000
--- a/lib/libkse/thread/thr_sigprocmask.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigprocmask(int how, const sigset_t * set, sigset_t * oset)
-{
- int ret = 0;
- int status;
-
- /* Check if the existing signal process mask is to be returned: */
- if (oset != NULL) {
- /* Return the current mask: */
- *oset = _thread_run->sigmask;
- }
- /* Check if a new signal set was provided by the caller: */
- if (set != NULL) {
- /* Block signals while the signal mask is changed: */
- _thread_kern_sig_block(&status);
-
- /* Process according to what to do: */
- switch (how) {
- /* Block signals: */
- case SIG_BLOCK:
- /* Add signals to the existing mask: */
- _thread_run->sigmask |= *set;
- break;
-
- /* Unblock signals: */
- case SIG_UNBLOCK:
- /* Clear signals from the existing mask: */
- _thread_run->sigmask &= ~(*set);
- break;
-
- /* Set the signal process mask: */
- case SIG_SETMASK:
- /* Set the new mask: */
- _thread_run->sigmask = *set;
- break;
-
- /* Trap invalid actions: */
- default:
- /* Return an invalid argument: */
- errno = EINVAL;
- ret = -1;
- break;
- }
-
- /*
- * Schedule the next thread in case there are signals that
- * now need to be acted on:
- */
- _thread_kern_sched(NULL);
- }
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_sigsuspend.c b/lib/libkse/thread/thr_sigsuspend.c
deleted file mode 100644
index 14cf74b..0000000
--- a/lib/libkse/thread/thr_sigsuspend.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigsuspend(const sigset_t * set)
-{
- int ret = -1;
- sigset_t oset;
-
- /* Check if a new signal set was provided by the caller: */
- if (set != NULL) {
- /* Save the current sigmal mask: */
- oset = _thread_run->sigmask;
-
- /* Combine the caller's mask with the current one: */
- _thread_run->sigmask |= *set;
-
- /* Wait for a signal: */
- _thread_kern_sched_state(PS_SIGWAIT, __FILE__, __LINE__);
-
- /* Restore the signal mask: */
- _thread_run->sigmask = oset;
- } else {
- /* Return an invalid argument error: */
- errno = EINVAL;
- }
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_sigwait.c b/lib/libkse/thread/thr_sigwait.c
deleted file mode 100644
index 4f95190..0000000
--- a/lib/libkse/thread/thr_sigwait.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigwait(const sigset_t * set, int *sig)
-{
- int ret;
- int status;
- sigset_t oset;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Save the current sigmal mask: */
- oset = _thread_run->sigmask;
-
- /* Combine the caller's mask with the current one: */
- _thread_run->sigmask |= *set;
-
- /* Wait for a signal: */
- _thread_kern_sched_state(PS_SIGWAIT, __FILE__, __LINE__);
-
- /* Block signals again: */
- _thread_kern_sig_block(NULL);
-
- /* Return the signal number to the caller: */
- *sig = _thread_run->signo;
-
- /* Restore the signal mask: */
- _thread_run->sigmask = oset;
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_single_np.c b/lib/libkse/thread/thr_single_np.c
deleted file mode 100644
index e36c856..0000000
--- a/lib/libkse/thread/thr_single_np.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_single_np()
-{
- /* Enter single-threaded (non-POSIX) scheduling mode: */
- _thread_single = _thread_run;
- return(0);
-}
-#endif
diff --git a/lib/libkse/thread/thr_spec.c b/lib/libkse/thread/thr_spec.c
deleted file mode 100644
index 7ff9054..0000000
--- a/lib/libkse/thread/thr_spec.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/* Static variables: */
-static struct pthread_key key_table[PTHREAD_KEYS_MAX];
-
-int
-pthread_key_create(pthread_key_t * key, void (*destructor) (void *))
-{
- for ((*key) = 0; (*key) < PTHREAD_KEYS_MAX; (*key)++) {
- if (key_table[(*key)].count == 0) {
- key_table[(*key)].count++;
- key_table[(*key)].destructor = destructor;
- return (0);
- }
- }
- return (EAGAIN);
-}
-
-int
-pthread_key_delete(pthread_key_t key)
-{
- int ret;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- if (key < PTHREAD_KEYS_MAX) {
- switch (key_table[key].count) {
- case 1:
- key_table[key].destructor = NULL;
- key_table[key].count = 0;
- case 0:
- ret = 0;
- break;
- default:
- ret = EBUSY;
- }
- } else {
- ret = EINVAL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return (ret);
-}
-
-void
-_thread_cleanupspecific(void)
-{
- void *data;
- int key;
- int itr;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- for (itr = 0; itr < PTHREAD_DESTRUCTOR_ITERATIONS; itr++) {
- for (key = 0; key < PTHREAD_KEYS_MAX; key++) {
- if (_thread_run->specific_data_count) {
- if (_thread_run->specific_data[key]) {
- data = (void *) _thread_run->specific_data[key];
- _thread_run->specific_data[key] = NULL;
- _thread_run->specific_data_count--;
- if (key_table[key].destructor) {
- key_table[key].destructor(data);
- }
- key_table[key].count--;
- }
- } else {
- free(_thread_run->specific_data);
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return;
- }
- }
- }
- free(_thread_run->specific_data);
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-}
-
-static inline const void **
-pthread_key_allocate_data(void)
-{
- const void **new_data;
- if ((new_data = (const void **) malloc(sizeof(void *) * PTHREAD_KEYS_MAX)) != NULL) {
- memset((void *) new_data, 0, sizeof(void *) * PTHREAD_KEYS_MAX);
- }
- return (new_data);
-}
-
-int
-pthread_setspecific(pthread_key_t key, const void *value)
-{
- pthread_t pthread;
- int ret = 0;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the running thread: */
- pthread = _thread_run;
-
- /*
- * Enter a loop for signal handler threads to find the parent thread
- * which has the specific data associated with it:
- */
- while (pthread->parent_thread != NULL) {
- /* Point to the parent thread: */
- pthread = pthread->parent_thread;
- }
-
- if ((pthread->specific_data) || (pthread->specific_data = pthread_key_allocate_data())) {
- if ((key < PTHREAD_KEYS_MAX) && (key_table)) {
- if (key_table[key].count) {
- if (pthread->specific_data[key] == NULL) {
- if (value != NULL) {
- pthread->specific_data_count++;
- key_table[key].count++;
- }
- } else {
- if (value == NULL) {
- pthread->specific_data_count--;
- key_table[key].count--;
- }
- }
- pthread->specific_data[key] = value;
- ret = 0;
- } else {
- ret = EINVAL;
- }
- } else {
- ret = EINVAL;
- }
- } else {
- ret = ENOMEM;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return (ret);
-}
-
-void *
-pthread_getspecific(pthread_key_t key)
-{
- pthread_t pthread;
- int status;
- void *data;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the running thread: */
- pthread = _thread_run;
-
- /*
- * Enter a loop for signal handler threads to find the parent thread
- * which has the specific data associated with it:
- */
- while (pthread->parent_thread != NULL) {
- /* Point to the parent thread: */
- pthread = pthread->parent_thread;
- }
-
- /* Check for errors: */
- if (pthread == NULL) {
- /* Return an invalid argument error: */
- data = NULL;
- }
- /* Check if there is specific data: */
- else if (pthread->specific_data != NULL && (key < PTHREAD_KEYS_MAX) && (key_table)) {
- /* Check if this key has been used before: */
- if (key_table[key].count) {
- /* Return the value: */
- data = (void *) pthread->specific_data[key];
- } else {
- /*
- * This key has not been used before, so return NULL
- * instead:
- */
- data = NULL;
- }
- } else {
- /* No specific data has been created, so just return NULL: */
- data = NULL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return (data);
-}
-#endif
diff --git a/lib/libkse/thread/thr_suspend_np.c b/lib/libkse/thread/thr_suspend_np.c
deleted file mode 100644
index d065b73..0000000
--- a/lib/libkse/thread/thr_suspend_np.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_suspend_np(pthread_t thread)
-{
- int ret = -1;
- pthread_t pthread;
- /*
- * Search for the thread in the linked list.
- */
- for (pthread = _thread_link_list; pthread != NULL && ret == -1; pthread = pthread->nxt) {
- /* Is this the thread? */
- if (pthread == thread) {
- /* Found the thread. Is it running? */
- if (pthread->state != PS_RUNNING &&
- pthread->state != PS_SUSPENDED) {
- /* The thread operation has been interrupted */
- _thread_seterrno(pthread,EINTR);
- }
- /* Suspend the thread. */
- PTHREAD_NEW_STATE(pthread,PS_SUSPENDED);
- ret = 0;
- }
- }
- /* Check if thread was not found. */
- if (ret == -1) {
- /* No such thread */
- errno = ESRCH;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_wait4.c b/lib/libkse/thread/thr_wait4.c
deleted file mode 100644
index 0a721af4f..0000000
--- a/lib/libkse/thread/thr_wait4.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <sys/wait.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-pid_t
-wait4(pid_t pid, int *istat, int options, struct rusage * rusage)
-{
- int status;
- pid_t ret;
- _thread_kern_sig_block(&status);
-
- /* Perform a non-blocking wait4 syscall: */
- while ((ret = _thread_sys_wait4(pid, istat, options | WNOHANG, rusage)) == 0 && (options & WNOHANG) == 0) {
- /* Schedule the next thread while this one waits: */
- _thread_kern_sched_state(PS_WAIT_WAIT, __FILE__, __LINE__);
-
- /* Check if this call was interrupted by a signal: */
- if (errno == EINTR) {
- ret = -1;
- break;
- }
- _thread_kern_sig_block(NULL);
- }
- _thread_kern_sig_unblock(status);
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_write.c b/lib/libkse/thread/thr_write.c
deleted file mode 100644
index eab105d..0000000
--- a/lib/libkse/thread/thr_write.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-write(int fd, const void *buf, size_t nbytes)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read and write: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking write syscall: */
- while ((ret = _thread_sys_write(fd, buf, nbytes)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDW_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_writev.c b/lib/libkse/thread/thr_writev.c
deleted file mode 100644
index 5ad1ce9..0000000
--- a/lib/libkse/thread/thr_writev.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-writev(int fd, const struct iovec * iov, int iovcnt)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read and write: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking writev syscall: */
- while ((ret = _thread_sys_writev(fd, iov, iovcnt)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDW_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libkse/thread/thr_yield.c b/lib/libkse/thread/thr_yield.c
deleted file mode 100644
index a88a948..0000000
--- a/lib/libkse/thread/thr_yield.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-pthread_yield(void)
-{
- /* Reset the accumulated time slice value for the current thread: */
- _thread_run->slice_usec = -1;
-
- /* Schedule the next thread: */
- _thread_kern_sched(NULL);
-
- /* Nothing to return. */
- return;
-}
-#endif
diff --git a/lib/libkvm/Makefile b/lib/libkvm/Makefile
deleted file mode 100644
index 2980402..0000000
--- a/lib/libkvm/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/4/93
-
-LIB= kvm
-CFLAGS+=-DLIBC_SCCS -I${.CURDIR}/../../sys
-SRCS= kvm.c kvm_${MACHINE}.c kvm_file.c kvm_getloadavg.c kvm_proc.c
-
-MAN3= kvm.3 kvm_geterr.3 kvm_getfiles.3 kvm_getloadavg.3 kvm_getprocs.3 \
- kvm_nlist.3 kvm_open.3 kvm_read.3
-
-MLINKS+=kvm_getprocs.3 kvm_getargv.3 kvm_getprocs.3 kvm_getenvv.3
-MLINKS+=kvm_open.3 kvm_openfiles.3 kvm_open.3 kvm_close.3
-MLINKS+=kvm_read.3 kvm_write.3
-
-.include <bsd.lib.mk>
diff --git a/lib/libkvm/kvm.3 b/lib/libkvm/kvm.3
deleted file mode 100644
index e0b12eb..0000000
--- a/lib/libkvm/kvm.3
+++ /dev/null
@@ -1,101 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software developed by the Computer Systems
-.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract
-.\" BG 91-66 and contributed to Berkeley.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kvm.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt KVM 3
-.Os
-.Sh NAME
-.Nm kvm
-.Nd kernel memory interface
-.Sh DESCRIPTION
-The
-.Xr kvm 3
-library provides a uniform interface for accessing kernel virtual memory
-images, including live systems and crash dumps.
-Access to live systems is via
-/dev/mem
-while crash dumps can be examined via the core file generated by
-.Xr savecore 8 .
-The interface behaves identically in both cases.
-Memory can be read and written, kernel symbol addresses can be
-looked up efficiently, and information about user processes can
-be gathered.
-.Pp
-.Fn kvm_open
-is first called to obtain a descriptor for all subsequent calls.
-.Sh COMPATIBILITY
-The kvm interface was first introduced in SunOS. A considerable
-number of programs have been developed that use this interface,
-making backward compatibility highly desirable.
-In most respects, the Sun kvm interface is consistent and clean.
-Accordingly, the generic portion of the interface (i.e.,
-.Fn kvm_open ,
-.Fn kvm_close ,
-.Fn kvm_read ,
-.Fn kvm_write ,
-and
-.Fn kvm_nlist )
-has been incorporated into the BSD interface. Indeed, many kvm
-applications (i.e., debuggers and statistical monitors) use only
-this subset of the interface.
-.Pp
-The process interface was not kept. This is not a portability
-issue since any code that manipulates processes is inherently
-machine dependent.
-.Pp
-Finally, the Sun kvm error reporting semantics are poorly defined.
-The library can be configured either to print errors to stderr automatically,
-or to print no error messages at all.
-In the latter case, the nature of the error cannot be determined.
-To overcome this, the BSD interface includes a
-routine,
-.Xr kvm_geterr 3 ,
-to return (not print out) the error message
-corresponding to the most recent error condition on the
-given descriptor.
-.Sh SEE ALSO
-.Xr kvm_close 3 ,
-.Xr kvm_getargv 3 ,
-.Xr kvm_getenvv 3 ,
-.Xr kvm_geterr 3 ,
-.Xr kvm_getloadavg 3 ,
-.Xr kvm_getprocs 3 ,
-.Xr kvm_nlist 3 ,
-.Xr kvm_open 3 ,
-.Xr kvm_openfiles 3 ,
-.Xr kvm_read 3 ,
-.Xr kvm_write 3
diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c
deleted file mode 100644
index a2ea42a..0000000
--- a/lib/libkvm/kvm.c
+++ /dev/null
@@ -1,545 +0,0 @@
-/*-
- * Copyright (c) 1989, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software developed by the Computer Systems
- * Engineering group at Lawrence Berkeley Laboratory under DARPA contract
- * BG 91-66 and contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm.c 8.2 (Berkeley) 2/13/94";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/sysctl.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/swap_pager.h>
-
-#include <machine/vmparam.h>
-
-#include <ctype.h>
-#include <db.h>
-#include <fcntl.h>
-#include <kvm.h>
-#include <limits.h>
-#include <nlist.h>
-#include <paths.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "kvm_private.h"
-
-static int kvm_dbopen __P((kvm_t *, const char *));
-
-char *
-kvm_geterr(kd)
- kvm_t *kd;
-{
- return (kd->errbuf);
-}
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-/*
- * Report an error using printf style arguments. "program" is kd->program
- * on hard errors, and 0 on soft errors, so that under sun error emulation,
- * only hard errors are printed out (otherwise, programs like gdb will
- * generate tons of error messages when trying to access bogus pointers).
- */
-void
-#if __STDC__
-_kvm_err(kvm_t *kd, const char *program, const char *fmt, ...)
-#else
-_kvm_err(kd, program, fmt, va_alist)
- kvm_t *kd;
- char *program, *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- if (program != NULL) {
- (void)fprintf(stderr, "%s: ", program);
- (void)vfprintf(stderr, fmt, ap);
- (void)fputc('\n', stderr);
- } else
- (void)vsnprintf(kd->errbuf,
- sizeof(kd->errbuf), (char *)fmt, ap);
-
- va_end(ap);
-}
-
-void
-#if __STDC__
-_kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...)
-#else
-_kvm_syserr(kd, program, fmt, va_alist)
- kvm_t *kd;
- char *program, *fmt;
- va_dcl
-#endif
-{
- va_list ap;
- register int n;
-
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- if (program != NULL) {
- (void)fprintf(stderr, "%s: ", program);
- (void)vfprintf(stderr, fmt, ap);
- (void)fprintf(stderr, ": %s\n", strerror(errno));
- } else {
- register char *cp = kd->errbuf;
-
- (void)vsnprintf(cp, sizeof(kd->errbuf), (char *)fmt, ap);
- n = strlen(cp);
- (void)snprintf(&cp[n], sizeof(kd->errbuf) - n, ": %s",
- strerror(errno));
- }
- va_end(ap);
-}
-
-void *
-_kvm_malloc(kd, n)
- register kvm_t *kd;
- register size_t n;
-{
- void *p;
-
- if ((p = calloc(n, sizeof(char))) == NULL)
- _kvm_err(kd, kd->program, "can't allocate %u bytes: %s",
- n, strerror(errno));
- return (p);
-}
-
-static kvm_t *
-_kvm_open(kd, uf, mf, sf, flag, errout)
- register kvm_t *kd;
- const char *uf;
- const char *mf;
- const char *sf;
- int flag;
- char *errout;
-{
- struct stat st;
-
- kd->vmfd = -1;
- kd->pmfd = -1;
- kd->swfd = -1;
- kd->nlfd = -1;
- kd->vmst = 0;
- kd->db = 0;
- kd->procbase = 0;
- kd->argspc = 0;
- kd->argv = 0;
-
- if (uf == 0)
- uf = getbootfile();
- else if (strlen(uf) >= MAXPATHLEN) {
- _kvm_err(kd, kd->program, "exec file name too long");
- goto failed;
- }
- if (flag & ~O_RDWR) {
- _kvm_err(kd, kd->program, "bad flags arg");
- goto failed;
- }
- if (mf == 0)
- mf = _PATH_MEM;
- if (sf == 0)
- sf = _PATH_DRUM;
-
- if ((kd->pmfd = open(mf, flag, 0)) < 0) {
- _kvm_syserr(kd, kd->program, "%s", mf);
- goto failed;
- }
- if (fstat(kd->pmfd, &st) < 0) {
- _kvm_syserr(kd, kd->program, "%s", mf);
- goto failed;
- }
- if (S_ISCHR(st.st_mode)) {
- /*
- * If this is a character special device, then check that
- * it's /dev/mem. If so, open kmem too. (Maybe we should
- * make it work for either /dev/mem or /dev/kmem -- in either
- * case you're working with a live kernel.)
- */
- if (strcmp(mf, _PATH_MEM) != 0) { /* XXX */
- _kvm_err(kd, kd->program,
- "%s: not physical memory device", mf);
- goto failed;
- }
- if ((kd->vmfd = open(_PATH_KMEM, flag)) < 0) {
- _kvm_syserr(kd, kd->program, "%s", _PATH_KMEM);
- goto failed;
- }
- if ((kd->swfd = open(sf, flag, 0)) < 0) {
- _kvm_syserr(kd, kd->program, "%s", sf);
- goto failed;
- }
- /*
- * Open kvm nlist database. We go ahead and do this
- * here so that we don't have to hold on to the kernel
- * path name. Since a kvm application will surely do
- * a kvm_nlist(), this probably won't be a wasted effort.
- * If the database cannot be opened, open the namelist
- * argument so we revert to slow nlist() calls.
- */
- if (kvm_dbopen(kd, uf) < 0 &&
- (kd->nlfd = open(uf, O_RDONLY, 0)) < 0) {
- _kvm_syserr(kd, kd->program, "%s", uf);
- goto failed;
- }
- } else {
- /*
- * This is a crash dump.
- * Initalize the virtual address translation machinery,
- * but first setup the namelist fd.
- */
- if ((kd->nlfd = open(uf, O_RDONLY, 0)) < 0) {
- _kvm_syserr(kd, kd->program, "%s", uf);
- goto failed;
- }
- if (_kvm_initvtop(kd) < 0)
- goto failed;
- }
- return (kd);
-failed:
- /*
- * Copy out the error if doing sane error semantics.
- */
- if (errout != 0)
- strcpy(errout, kd->errbuf);
- (void)kvm_close(kd);
- return (0);
-}
-
-kvm_t *
-kvm_openfiles(uf, mf, sf, flag, errout)
- const char *uf;
- const char *mf;
- const char *sf;
- int flag;
- char *errout;
-{
- register kvm_t *kd;
-
- if ((kd = malloc(sizeof(*kd))) == NULL) {
- (void)strcpy(errout, strerror(errno));
- return (0);
- }
- memset(kd, 0, sizeof(*kd));
- kd->program = 0;
- return (_kvm_open(kd, uf, mf, sf, flag, errout));
-}
-
-kvm_t *
-kvm_open(uf, mf, sf, flag, errstr)
- const char *uf;
- const char *mf;
- const char *sf;
- int flag;
- const char *errstr;
-{
- register kvm_t *kd;
-
- if ((kd = malloc(sizeof(*kd))) == NULL) {
- if (errstr != NULL)
- (void)fprintf(stderr, "%s: %s\n",
- errstr, strerror(errno));
- return (0);
- }
- memset(kd, 0, sizeof(*kd));
- kd->program = errstr;
- return (_kvm_open(kd, uf, mf, sf, flag, NULL));
-}
-
-int
-kvm_close(kd)
- kvm_t *kd;
-{
- register int error = 0;
-
- if (kd->pmfd >= 0)
- error |= close(kd->pmfd);
- if (kd->vmfd >= 0)
- error |= close(kd->vmfd);
- if (kd->nlfd >= 0)
- error |= close(kd->nlfd);
- if (kd->swfd >= 0)
- error |= close(kd->swfd);
- if (kd->db != 0)
- error |= (kd->db->close)(kd->db);
- if (kd->vmst)
- _kvm_freevtop(kd);
- if (kd->procbase != 0)
- free((void *)kd->procbase);
- if (kd->argv != 0)
- free((void *)kd->argv);
- free((void *)kd);
-
- return (0);
-}
-
-/*
- * Set up state necessary to do queries on the kernel namelist
- * data base. If the data base is out-of-data/incompatible with
- * given executable, set up things so we revert to standard nlist call.
- * Only called for live kernels. Return 0 on success, -1 on failure.
- */
-static int
-kvm_dbopen(kd, uf)
- kvm_t *kd;
- const char *uf;
-{
- char *cp;
- DBT rec;
- int dbversionlen;
- struct nlist nitem;
- char dbversion[_POSIX2_LINE_MAX];
- char kversion[_POSIX2_LINE_MAX];
- char dbname[MAXPATHLEN];
-
- if ((cp = rindex(uf, '/')) != 0)
- uf = cp + 1;
-
- (void)snprintf(dbname, sizeof(dbname), "%skvm_%s.db", _PATH_VARDB, uf);
- kd->db = dbopen(dbname, O_RDONLY, 0, DB_HASH, NULL);
- if (kd->db == 0)
- return (-1);
- /*
- * read version out of database
- */
- rec.data = VRS_KEY;
- rec.size = sizeof(VRS_KEY) - 1;
- if ((kd->db->get)(kd->db, (DBT *)&rec, (DBT *)&rec, 0))
- goto close;
- if (rec.data == 0 || rec.size > sizeof(dbversion))
- goto close;
-
- bcopy(rec.data, dbversion, rec.size);
- dbversionlen = rec.size;
- /*
- * Read version string from kernel memory.
- * Since we are dealing with a live kernel, we can call kvm_read()
- * at this point.
- */
- rec.data = VRS_SYM;
- rec.size = sizeof(VRS_SYM) - 1;
- if ((kd->db->get)(kd->db, (DBT *)&rec, (DBT *)&rec, 0))
- goto close;
- if (rec.data == 0 || rec.size != sizeof(struct nlist))
- goto close;
- bcopy((char *)rec.data, (char *)&nitem, sizeof(nitem));
- if (kvm_read(kd, (u_long)nitem.n_value, kversion, dbversionlen) !=
- dbversionlen)
- goto close;
- /*
- * If they match, we win - otherwise clear out kd->db so
- * we revert to slow nlist().
- */
- if (bcmp(dbversion, kversion, dbversionlen) == 0)
- return (0);
-close:
- (void)(kd->db->close)(kd->db);
- kd->db = 0;
-
- return (-1);
-}
-
-int
-kvm_nlist(kd, nl)
- kvm_t *kd;
- struct nlist *nl;
-{
- register struct nlist *p;
- register int nvalid;
-
- /*
- * If we can't use the data base, revert to the
- * slow library call.
- */
- if (kd->db == 0)
- return (__fdnlist(kd->nlfd, nl));
-
- /*
- * We can use the kvm data base. Go through each nlist entry
- * and look it up with a db query.
- */
- nvalid = 0;
- for (p = nl; p->n_name && p->n_name[0]; ++p) {
- register int len;
- DBT rec;
-
- if ((len = strlen(p->n_name)) > 4096) {
- /* sanity */
- _kvm_err(kd, kd->program, "symbol too large");
- return (-1);
- }
- rec.data = p->n_name;
- rec.size = len;
- if ((kd->db->get)(kd->db, (DBT *)&rec, (DBT *)&rec, 0))
- continue;
- if (rec.data == 0 || rec.size != sizeof(struct nlist))
- continue;
- ++nvalid;
- /*
- * Avoid alignment issues.
- */
- bcopy((char *)&((struct nlist *)rec.data)->n_type,
- (char *)&p->n_type,
- sizeof(p->n_type));
- bcopy((char *)&((struct nlist *)rec.data)->n_value,
- (char *)&p->n_value,
- sizeof(p->n_value));
- }
- /*
- * Return the number of entries that weren't found.
- */
- return ((p - nl) - nvalid);
-}
-
-ssize_t
-kvm_read(kd, kva, buf, len)
- kvm_t *kd;
- register u_long kva;
- register void *buf;
- register size_t len;
-{
- register int cc;
- register void *cp;
-
- if (ISALIVE(kd)) {
- /*
- * We're using /dev/kmem. Just read straight from the
- * device and let the active kernel do the address translation.
- */
- errno = 0;
- if (lseek(kd->vmfd, (off_t)kva, 0) == -1 && errno != 0) {
- _kvm_err(kd, 0, "invalid address (%x)", kva);
- return (0);
- }
- cc = read(kd->vmfd, buf, len);
- if (cc < 0) {
- _kvm_syserr(kd, 0, "kvm_read");
- return (0);
- } else if (cc < len)
- _kvm_err(kd, kd->program, "short read");
- return (cc);
- } else {
- cp = buf;
- while (len > 0) {
- u_long pa;
-
- cc = _kvm_kvatop(kd, kva, &pa);
- if (cc == 0)
- return (0);
- if (cc > len)
- cc = len;
- errno = 0;
- if (lseek(kd->pmfd, (off_t)pa, 0) == -1 && errno != 0) {
- _kvm_syserr(kd, 0, _PATH_MEM);
- break;
- }
- cc = read(kd->pmfd, cp, cc);
- if (cc < 0) {
- _kvm_syserr(kd, kd->program, "kvm_read");
- break;
- }
- /*
- * If kvm_kvatop returns a bogus value or our core
- * file is truncated, we might wind up seeking beyond
- * the end of the core file in which case the read will
- * return 0 (EOF).
- */
- if (cc == 0)
- break;
- (char *)cp += cc;
- kva += cc;
- len -= cc;
- }
- return ((char *)cp - (char *)buf);
- }
- /* NOTREACHED */
-}
-
-ssize_t
-kvm_write(kd, kva, buf, len)
- kvm_t *kd;
- register u_long kva;
- register const void *buf;
- register size_t len;
-{
- register int cc;
-
- if (ISALIVE(kd)) {
- /*
- * Just like kvm_read, only we write.
- */
- errno = 0;
- if (lseek(kd->vmfd, (off_t)kva, 0) == -1 && errno != 0) {
- _kvm_err(kd, 0, "invalid address (%x)", kva);
- return (0);
- }
- cc = write(kd->vmfd, buf, len);
- if (cc < 0) {
- _kvm_syserr(kd, 0, "kvm_write");
- return (0);
- } else if (cc < len)
- _kvm_err(kd, kd->program, "short write");
- return (cc);
- } else {
- _kvm_err(kd, kd->program,
- "kvm_write not implemented for dead kernels");
- return (0);
- }
- /* NOTREACHED */
-}
diff --git a/lib/libkvm/kvm.h b/lib/libkvm/kvm.h
deleted file mode 100644
index 6c437b9..0000000
--- a/lib/libkvm/kvm.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)kvm.h 8.1 (Berkeley) 6/2/93
- */
-
-#ifndef _KVM_H_
-#define _KVM_H_
-
-/* Default version symbol. */
-#define VRS_SYM "_version"
-#define VRS_KEY "VERSION"
-
-#include <nlist.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-typedef struct __kvm kvm_t;
-
-struct kinfo_proc;
-int kvm_close __P((kvm_t *));
-char **kvm_getargv __P((kvm_t *, const struct kinfo_proc *, int));
-char **kvm_getenvv __P((kvm_t *, const struct kinfo_proc *, int));
-char *kvm_geterr __P((kvm_t *));
-int kvm_getloadavg __P((kvm_t *, double [], int));
-char *kvm_getfiles __P((kvm_t *, int, int, int *));
-struct kinfo_proc *
- kvm_getprocs __P((kvm_t *, int, int, int *));
-int kvm_nlist __P((kvm_t *, struct nlist *));
-kvm_t *kvm_open
- __P((const char *, const char *, const char *, int, const char *));
-kvm_t *kvm_openfiles
- __P((const char *, const char *, const char *, int, char *));
-int kvm_read __P((kvm_t *, unsigned long, void *, unsigned int));
-int kvm_write __P((kvm_t *, unsigned long, const void *, unsigned int));
-/* Comment this out until it can be fixed correctly.
-ssize_t kvm_uread
- __P((kvm_t *, struct proc *, unsigned long, char *, size_t));
-*/
-
-__END_DECLS
-
-#endif /* !_KVM_H_ */
diff --git a/lib/libkvm/kvm_amd64.c b/lib/libkvm/kvm_amd64.c
deleted file mode 100644
index d36b922..0000000
--- a/lib/libkvm/kvm_amd64.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/*-
- * Copyright (c) 1989, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software developed by the Computer Systems
- * Engineering group at Lawrence Berkeley Laboratory under DARPA contract
- * BG 91-66 and contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * i386 machine dependent routines for kvm. Hopefully, the forthcoming
- * vm code will one day obsolete this module.
- */
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <nlist.h>
-#include <kvm.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-
-#include <limits.h>
-#include <db.h>
-
-#include "kvm_private.h"
-
-#ifndef btop
-#define btop(x) (i386_btop(x))
-#define ptob(x) (i386_ptob(x))
-#endif
-
-struct vmstate {
- pd_entry_t *PTD;
-};
-
-void
-_kvm_freevtop(kvm_t *kd)
-{
- if (kd->vmst != 0) {
- if (kd->vmst->PTD) {
- free(kd->vmst->PTD);
- }
- free(kd->vmst);
- }
-}
-
-int
-_kvm_initvtop(kvm_t *kd)
-{
- struct vmstate *vm;
- struct nlist nlist[2];
- u_long pa;
- pd_entry_t *PTD;
-
- vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm));
- if (vm == 0) {
- _kvm_err(kd, kd->program, "cannot allocate vm");
- return (-1);
- }
- kd->vmst = vm;
- vm->PTD = 0;
-
- nlist[0].n_name = "_IdlePTD";
- nlist[1].n_name = 0;
-
- if (kvm_nlist(kd, nlist) != 0) {
- _kvm_err(kd, kd->program, "bad namelist");
- return (-1);
- }
- if (kvm_read(kd, (nlist[0].n_value - KERNBASE), &pa, sizeof(pa)) != sizeof(pa)) {
- _kvm_err(kd, kd->program, "cannot read IdlePTD");
- return (-1);
- }
- PTD = _kvm_malloc(kd, PAGE_SIZE);
- if (kvm_read(kd, pa, PTD, PAGE_SIZE) != PAGE_SIZE) {
- _kvm_err(kd, kd->program, "cannot read PTD");
- return (-1);
- }
- vm->PTD = PTD;
- return (0);
-}
-
-static int
-_kvm_vatop(kvm_t *kd, u_long va, u_long *pa)
-{
- struct vmstate *vm;
- u_long offset;
- u_long pte_pa;
- pd_entry_t pde;
- pt_entry_t pte;
- u_long pdeindex;
- u_long pteindex;
- int i;
-
- if (ISALIVE(kd)) {
- _kvm_err(kd, 0, "vatop called in live kernel!");
- return((off_t)0);
- }
-
- vm = kd->vmst;
- offset = va & (PAGE_SIZE - 1);
-
- /*
- * If we are initializing (kernel page table descriptor pointer
- * not yet set) then return pa == va to avoid infinite recursion.
- */
- if (vm->PTD == 0) {
- *pa = va;
- return (PAGE_SIZE - offset);
- }
-
- pdeindex = va >> PDRSHIFT;
- pde = vm->PTD[pdeindex];
- if (((u_long)pde & PG_V) == 0)
- goto invalid;
-
- if ((u_long)pde & PG_PS) {
- /*
- * No second-level page table; ptd describes one 4MB page.
- * (We assume that the kernel wouldn't set PG_PS without enabling
- * it cr0, and that the kernel doesn't support 36-bit physical
- * addresses).
- */
-#define PAGE4M_MASK (NBPDR - 1)
-#define PG_FRAME4M (~PAGE4M_MASK)
- *pa = ((u_long)pde & PG_FRAME4M) + (va & PAGE4M_MASK);
- return (NBPDR - (va & PAGE4M_MASK));
- }
-
- pteindex = (va >> PAGE_SHIFT) & (NPTEPG-1);
- pte_pa = ((u_long)pde & PG_FRAME) + (pteindex * sizeof(pt_entry_t));
-
- /* XXX This has to be a physical address read, kvm_read is virtual */
- if (lseek(kd->pmfd, pte_pa, 0) == -1) {
- _kvm_syserr(kd, kd->program, "_kvm_vatop: lseek");
- goto invalid;
- }
- if (read(kd->pmfd, &pte, sizeof pte) != sizeof pte) {
- _kvm_syserr(kd, kd->program, "_kvm_vatop: read");
- goto invalid;
- }
- if (((u_long)pte & PG_V) == 0)
- goto invalid;
-
- *pa = ((u_long)pte & PG_FRAME) + offset;
- return (PAGE_SIZE - offset);
-
-invalid:
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
-}
-
-int
-_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa)
-{
- return (_kvm_vatop(kd, va, pa));
-}
diff --git a/lib/libkvm/kvm_file.c b/lib/libkvm/kvm_file.c
deleted file mode 100644
index c4cede3..0000000
--- a/lib/libkvm/kvm_file.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/*-
- * Copyright (c) 1989, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm_file.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * File list interface for kvm. pstat, fstat and netstat are
- * users of this code, so we've factored it out into a separate module.
- * Thus, we keep this grunge out of the other kvm applications (i.e.,
- * most other applications are interested only in open/close/read/nlist).
- */
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#define KERNEL
-#include <sys/file.h>
-#undef KERNEL
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <nlist.h>
-#include <kvm.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/swap_pager.h>
-
-#include <sys/sysctl.h>
-
-#include <limits.h>
-#include <ndbm.h>
-#include <paths.h>
-
-#include "kvm_private.h"
-
-#define KREAD(kd, addr, obj) \
- (kvm_read(kd, addr, obj, sizeof(*obj)) != sizeof(*obj))
-
-/*
- * Get file structures.
- */
-static int
-kvm_deadfiles(kd, op, arg, filehead_o, nfiles)
- kvm_t *kd;
- int op, arg, nfiles;
- long filehead_o;
-{
- int buflen = kd->arglen, n = 0;
- struct file *fp;
- register char *where = kd->argspc;
- struct filelist filehead;
-
- /*
- * first copyout filehead
- */
- if (buflen > sizeof (filehead)) {
- if (KREAD(kd, filehead_o, &filehead)) {
- _kvm_err(kd, kd->program, "can't read filehead");
- return (0);
- }
- buflen -= sizeof (filehead);
- where += sizeof (filehead);
- *(struct filelist *)kd->argspc = filehead;
- }
- /*
- * followed by an array of file structures
- */
- for (fp = filehead.lh_first; fp != 0; fp = fp->f_list.le_next) {
- if (buflen > sizeof (struct file)) {
- if (KREAD(kd, (long)fp, ((struct file *)where))) {
- _kvm_err(kd, kd->program, "can't read kfp");
- return (0);
- }
- buflen -= sizeof (struct file);
- fp = (struct file *)where;
- where += sizeof (struct file);
- n++;
- }
- }
- if (n != nfiles) {
- _kvm_err(kd, kd->program, "inconsistant nfiles");
- return (0);
- }
- return (nfiles);
-}
-
-char *
-kvm_getfiles(kd, op, arg, cnt)
- kvm_t *kd;
- int op, arg;
- int *cnt;
-{
- int mib[2], size, st, nfiles;
- struct file *fp, *fplim;
- struct filelist filehead;
-
- if (ISALIVE(kd)) {
- size = 0;
- mib[0] = CTL_KERN;
- mib[1] = KERN_FILE;
- st = sysctl(mib, 2, NULL, &size, NULL, 0);
- if (st == -1) {
- _kvm_syserr(kd, kd->program, "kvm_getprocs");
- return (0);
- }
- if (kd->argspc == 0)
- kd->argspc = (char *)_kvm_malloc(kd, size);
- else if (kd->arglen < size)
- kd->argspc = (char *)_kvm_realloc(kd, kd->argspc, size);
- if (kd->argspc == 0)
- return (0);
- kd->arglen = size;
- st = sysctl(mib, 2, kd->argspc, &size, NULL, 0);
- if (st == -1 || size < sizeof(filehead)) {
- _kvm_syserr(kd, kd->program, "kvm_getfiles");
- return (0);
- }
- filehead = *(struct filelist *)kd->argspc;
- fp = (struct file *)(kd->argspc + sizeof (filehead));
- fplim = (struct file *)(kd->argspc + size);
- for (nfiles = 0; filehead.lh_first && (fp < fplim); nfiles++, fp++)
- filehead.lh_first = fp->f_list.le_next;
- } else {
- struct nlist nl[3], *p;
-
- nl[0].n_name = "_filehead";
- nl[1].n_name = "_nfiles";
- nl[2].n_name = 0;
-
- if (kvm_nlist(kd, nl) != 0) {
- for (p = nl; p->n_type != 0; ++p)
- ;
- _kvm_err(kd, kd->program,
- "%s: no such symbol", p->n_name);
- return (0);
- }
- if (KREAD(kd, nl[0].n_value, &nfiles)) {
- _kvm_err(kd, kd->program, "can't read nfiles");
- return (0);
- }
- size = sizeof(filehead) + (nfiles + 10) * sizeof(struct file);
- if (kd->argspc == 0)
- kd->argspc = (char *)_kvm_malloc(kd, size);
- else if (kd->arglen < size)
- kd->argspc = (char *)_kvm_realloc(kd, kd->argspc, size);
- if (kd->argspc == 0)
- return (0);
- kd->arglen = size;
- nfiles = kvm_deadfiles(kd, op, arg, nl[1].n_value, nfiles);
- if (nfiles == 0)
- return (0);
- }
- *cnt = nfiles;
- return (kd->argspc);
-}
diff --git a/lib/libkvm/kvm_geterr.3 b/lib/libkvm/kvm_geterr.3
deleted file mode 100644
index b8eefa7..0000000
--- a/lib/libkvm/kvm_geterr.3
+++ /dev/null
@@ -1,80 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software developed by the Computer Systems
-.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract
-.\" BG 91-66 and contributed to Berkeley.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kvm_geterr.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt KVM_GETERR 3
-.Os
-.Sh NAME
-.Nm kvm_geterr
-.Nd get error message on kvm descriptor
-.Sh SYNOPSIS
-.Fd #include <kvm.h>
-.br
-.Ft char *
-.Fn kvm_geterr "kvm_t *kd"
-.Sh DESCRIPTION
-This function returns a string describing the most recent error condition
-on the descriptor
-.Fa kd .
-The results are undefined if the most recent
-.Xr kvm 3
-library call did not produce an error.
-The string returned is stored in memory owned by
-.Xr kvm 3
-so the message should be copied out and saved elsewhere if necessary.
-.Sh BUGS
-This routine cannot be used to access error conditions due to a failed
-.Fn kvm_openfiles
-call, since failure is indicated by returning a
-.Dv NULL
-descriptor.
-Therefore, errors on open are output to the special error buffer
-passed to
-.Fn kvm_openfiles .
-This option is not available to
-.Fn kvm_open .
-.Sh SEE ALSO
-.Xr kvm 3 ,
-.Xr kvm_close 3 ,
-.Xr kvm_getargv 3 ,
-.Xr kvm_getenvv 3 ,
-.Xr kvm_getprocs 3 ,
-.Xr kvm_nlist 3 ,
-.Xr kvm_open 3 ,
-.Xr kvm_openfiles 3 ,
-.Xr kvm_read 3 ,
-.Xr kvm_write 3
diff --git a/lib/libkvm/kvm_getfiles.3 b/lib/libkvm/kvm_getfiles.3
deleted file mode 100644
index 54a3270..0000000
--- a/lib/libkvm/kvm_getfiles.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software developed by the Computer Systems
-.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract
-.\" BG 91-66 and contributed to Berkeley.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kvm_getfiles.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt KVM_GETFILES 3
-.Os
-.Sh NAME
-.Nm kvm_getfiles
-.Nd survey open files
-.Sh SYNOPSIS
-.Fd #include <kvm.h>
-.Fd #define KERNEL
-.Fd #include <sys/file.h>
-.Fd #undef KERNEL
-.\" .Fa kvm_t *kd
-.br
-.Ft char *
-.Fn kvm_getfiles "kvm_t *kd" "int op" "int arg" "int *cnt"
-.Sh DESCRIPTION
-.Fn kvm_getfiles
-returns a (sub-)set of the open files in the kernel indicated by
-.Fa kd.
-The
-.Fa op
-and
-.Fa arg
-arguments constitute a predicate which limits the set of files
-returned. No predicates are currently defined.
-.Pp
-The number of processes found is returned in the reference parameter
-.Fa cnt .
-The files are returned as a contiguous array of file structures,
-preceded by the address of the first file entry in the kernel.
-This memory is owned by kvm and is not guaranteed to be persistent across
-subsequent kvm library calls. Data should be copied out if it needs to be
-saved.
-.Sh RETURN VALUES
-.Fn kvm_getfiles
-will return NULL on failure.
-.Pp
-.Sh BUGS
-This routine does not belong in the kvm interface.
-.Sh SEE ALSO
-.Xr kvm 3 ,
-.Xr kvm_close 3 ,
-.Xr kvm_geterr 3 ,
-.Xr kvm_nlist 3 ,
-.Xr kvm_open 3 ,
-.Xr kvm_openfiles 3 ,
-.Xr kvm_read 3 ,
-.Xr kvm_write 3
diff --git a/lib/libkvm/kvm_getloadavg.3 b/lib/libkvm/kvm_getloadavg.3
deleted file mode 100644
index 4910fa5..0000000
--- a/lib/libkvm/kvm_getloadavg.3
+++ /dev/null
@@ -1,63 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kvm_getloadavg.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt KVM_GETLOADAVG 3
-.Os
-.Sh NAME
-.Nm kvm_getloadavg
-.Nd get load average of the system
-.Sh SYNOPSIS
-.Fd #include <kvm.h>
-.Ft int
-.Fn kvm_getloadavg "kvm_t *kd" "double loadavg[]" "int nelem"
-.Sh DESCRIPTION
-The
-.Fn kvm_getloadavg
-function returns the number of processes in the system run queue
-of the kernel indicated by
-.Fa kd ,
-averaged over various periods of time.
-Up to
-.Fa nelem
-samples are retrieved and assigned to successive elements of
-.Fa loadavg Ns Bq .
-The system imposes a maximum of 3 samples, representing averages
-over the last 1, 5, and 15 minutes, respectively.
-.Sh DIAGNOSTICS
-If the load average was unobtainable, \-1 is returned; otherwise,
-the number of samples actually retrieved is returned.
-.Sh SEE ALSO
-.Xr uptime 1 ,
-.Xr getloadavg 3 ,
-.Xr kvm 3
diff --git a/lib/libkvm/kvm_getloadavg.c b/lib/libkvm/kvm_getloadavg.c
deleted file mode 100644
index 3368e63..0000000
--- a/lib/libkvm/kvm_getloadavg.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm_getloadavg.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/proc.h>
-#include <sys/sysctl.h>
-#include <vm/vm_param.h>
-
-#include <stdlib.h>
-#include <db.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <nlist.h>
-#include <kvm.h>
-
-#include "kvm_private.h"
-
-static struct nlist nl[] = {
- { "_averunnable" },
-#define X_AVERUNNABLE 0
- { "_fscale" },
-#define X_FSCALE 1
- { "" },
-};
-
-/*
- * kvm_getloadavg() -- Get system load averages, from live or dead kernels.
- *
- * Put `nelem' samples into `loadavg' array.
- * Return number of samples retrieved, or -1 on error.
- */
-int
-kvm_getloadavg(kd, loadavg, nelem)
- kvm_t *kd;
- double loadavg[];
- int nelem;
-{
- struct loadavg loadinfo;
- struct nlist *p;
- int fscale, i;
-
- if (ISALIVE(kd))
- return (getloadavg(loadavg, nelem));
-
- if (kvm_nlist(kd, nl) != 0) {
- for (p = nl; p->n_type != 0; ++p);
- _kvm_err(kd, kd->program,
- "%s: no such symbol", p->n_name);
- return (-1);
- }
-
-#define KREAD(kd, addr, obj) \
- (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj))
- if (KREAD(kd, nl[X_AVERUNNABLE].n_value, &loadinfo)) {
- _kvm_err(kd, kd->program, "can't read averunnable");
- return (-1);
- }
-
- /*
- * Old kernels have fscale separately; if not found assume
- * running new format.
- */
- if (!KREAD(kd, nl[X_FSCALE].n_value, &fscale))
- loadinfo.fscale = fscale;
-
- nelem = MIN(nelem, sizeof(loadinfo.ldavg) / sizeof(fixpt_t));
- for (i = 0; i < nelem; i++)
- loadavg[i] = (double) loadinfo.ldavg[i] / loadinfo.fscale;
- return (nelem);
-}
diff --git a/lib/libkvm/kvm_getprocs.3 b/lib/libkvm/kvm_getprocs.3
deleted file mode 100644
index 1ecfe14..0000000
--- a/lib/libkvm/kvm_getprocs.3
+++ /dev/null
@@ -1,164 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software developed by the Computer Systems
-.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract
-.\" BG 91-66 and contributed to Berkeley.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kvm_getprocs.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt KVM_GETPROCS 3
-.Os
-.Sh NAME
-.Nm kvm_getprocs ,
-.Nm kvm_getargv ,
-.Nm kvm_getenvv
-.Nd access user process state
-.Sh SYNOPSIS
-.Fd #include <kvm.h>
-.Fd #include <sys/param.h>
-.Fd #include <sys/sysctl.h>
-.\" .Fa kvm_t *kd
-.br
-.Ft struct kinfo_proc *
-.Fn kvm_getprocs "kvm_t *kd" "int op" "int arg" "int *cnt"
-.Ft char **
-.Fn kvm_getargv "kvm_t *kd" "const struct kinfo_proc *p" "int nchr"
-.Ft char **
-.Fn kvm_getenvv "kvm_t *kd" "const struct kinfo_proc *p" "int nchr"
-.Sh DESCRIPTION
-.Fn kvm_getprocs
-returns a (sub-)set of active processes in the kernel indicated by
-.Fa kd.
-The
-.Fa op
-and
-.Fa arg
-arguments constitute a predicate which limits the set of processes
-returned. The value of
-.Fa op
-describes the filtering predicate as follows:
-.Pp
-.Bl -tag -width 20n -offset indent -compact
-.It Sy KERN_PROC_ALL
-all processes
-.It Sy KERN_PROC_PID
-processes with process id
-.Fa arg
-.It Sy KERN_PROC_PGRP
-processes with process group
-.Fa arg
-.It Sy KERN_PROC_SESSION
-processes with session
-.Fa arg
-.It Sy KERN_PROC_TTY
-processes with tty
-.Fa arg
-.It Sy KERN_PROC_UID
-processes with effective user id
-.Fa arg
-.It Sy KERN_PROC_RUID
-processes with real user id
-.Fa arg
-.El
-.Pp
-The number of processes found is returned in the reference parameter
-.Fa cnt .
-The processes are returned as a contiguous array of kinfo_proc structures.
-This memory is locally allocated, and subsequent calls to
-.Fn kvm_getprocs
-and
-.Fn kvm_close
-will overwrite this storage.
-.Pp
-.Fn kvm_getargv
-returns a null-terminated argument vector that corresponds to the
-command line arguments passed to process indicated by
-.Fa p .
-Most likely, these arguments correspond to the values passed to
-.Xr exec 3
-on process creation. This information is, however,
-deliberately under control of the process itself.
-Note that the original command name can be found, unaltered,
-in the p_comm field of the process structure returned by
-.Fn kvm_getprocs .
-.Pp
-The
-.Fa nchr
-argument indicates the maximum number of characters, including null bytes,
-to use in building the strings. If this amount is exceeded, the string
-causing the overflow is truncated and the partial result is returned.
-This is handy for programs like
-.Xr ps 1
-and
-.Xr w 1
-that print only a one line summary of a command and should not copy
-out large amounts of text only to ignore it.
-If
-.Fa nchr
-is zero, no limit is imposed and all argument strings are returned in
-their entirety.
-.Pp
-The memory allocated to the argv pointers and string storage
-is owned by the kvm library. Subsequent
-.Fn kvm_getprocs
-and
-.Xr kvm_close 3
-calls will clobber this storage.
-.Pp
-The
-.Fn kvm_getenvv
-function is similar to
-.Fn kvm_getargv
-but returns the vector of environment strings. This data is
-also alterable by the process.
-.Sh RETURN VALUES
-.Fn kvm_getprocs ,
-.Fn kvm_getargv ,
-and
-.Fn kvm_getenvv ,
-all return
-.Dv NULL
-on failure.
-.Pp
-.Sh BUGS
-These routines do not belong in the kvm interface.
-.Sh SEE ALSO
-.Xr kvm 3 ,
-.Xr kvm_close 3 ,
-.Xr kvm_geterr 3 ,
-.Xr kvm_nlist 3 ,
-.Xr kvm_open 3 ,
-.Xr kvm_openfiles 3 ,
-.Xr kvm_read 3 ,
-.Xr kvm_write 3
diff --git a/lib/libkvm/kvm_hp300.c b/lib/libkvm/kvm_hp300.c
deleted file mode 100644
index c84691e..0000000
--- a/lib/libkvm/kvm_hp300.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/*-
- * Copyright (c) 1989, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software developed by the Computer Systems
- * Engineering group at Lawrence Berkeley Laboratory under DARPA contract
- * BG 91-66 and contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Hp300 machine dependent routines for kvm. Hopefully, the forthcoming
- * vm code will one day obsolete this module.
- */
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <nlist.h>
-#include <kvm.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-
-#include <limits.h>
-#include <db.h>
-
-#include "kvm_private.h"
-
-#if defined(hp300)
-#include <hp300/hp300/pte.h>
-#endif
-
-#if defined(luna68k)
-#include <luna68k/luna68k/pte.h>
-#endif
-
-#ifndef btop
-#define btop(x) (((unsigned)(x)) >> PGSHIFT) /* XXX */
-#define ptob(x) ((caddr_t)((x) << PGSHIFT)) /* XXX */
-#endif
-
-struct vmstate {
- u_long lowram;
- int mmutype;
- struct ste *Sysseg;
-};
-
-#define KREAD(kd, addr, p)\
- (kvm_read(kd, addr, (char *)(p), sizeof(*(p))) != sizeof(*(p)))
-
-void
-_kvm_freevtop(kd)
- kvm_t *kd;
-{
- if (kd->vmst != 0)
- free(kd->vmst);
-}
-
-int
-_kvm_initvtop(kd)
- kvm_t *kd;
-{
- struct vmstate *vm;
- struct nlist nlist[4];
-
- vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm));
- if (vm == 0)
- return (-1);
- kd->vmst = vm;
-
- nlist[0].n_name = "_lowram";
- nlist[1].n_name = "_mmutype";
- nlist[2].n_name = "_Sysseg";
- nlist[3].n_name = 0;
-
- if (kvm_nlist(kd, nlist) != 0) {
- _kvm_err(kd, kd->program, "bad namelist");
- return (-1);
- }
- vm->Sysseg = 0;
- if (KREAD(kd, (u_long)nlist[0].n_value, &vm->lowram)) {
- _kvm_err(kd, kd->program, "cannot read lowram");
- return (-1);
- }
- if (KREAD(kd, (u_long)nlist[1].n_value, &vm->mmutype)) {
- _kvm_err(kd, kd->program, "cannot read mmutype");
- return (-1);
- }
- if (KREAD(kd, (u_long)nlist[2].n_value, &vm->Sysseg)) {
- _kvm_err(kd, kd->program, "cannot read segment table");
- return (-1);
- }
- return (0);
-}
-
-static int
-_kvm_vatop(kd, sta, va, pa)
- kvm_t *kd;
- struct ste *sta;
- u_long va;
- u_long *pa;
-{
- register struct vmstate *vm;
- register u_long lowram;
- register u_long addr;
- int p, ste, pte;
- int offset;
-
- if (ISALIVE(kd)) {
- _kvm_err(kd, 0, "vatop called in live kernel!");
- return((off_t)0);
- }
- vm = kd->vmst;
- offset = va & PGOFSET;
- /*
- * If we are initializing (kernel segment table pointer not yet set)
- * then return pa == va to avoid infinite recursion.
- */
- if (vm->Sysseg == 0) {
- *pa = va;
- return (NBPG - offset);
- }
- lowram = vm->lowram;
- if (vm->mmutype == -2) {
- struct ste *sta2;
-
- addr = (u_long)&sta[va >> SG4_SHIFT1];
- /*
- * Can't use KREAD to read kernel segment table entries.
- * Fortunately it is 1-to-1 mapped so we don't have to.
- */
- if (sta == vm->Sysseg) {
- if (lseek(kd->pmfd, (off_t)addr, 0) == -1 ||
- read(kd->pmfd, (char *)&ste, sizeof(ste)) < 0)
- goto invalid;
- } else if (KREAD(kd, addr, &ste))
- goto invalid;
- if ((ste & SG_V) == 0) {
- _kvm_err(kd, 0, "invalid level 1 descriptor (%x)",
- ste);
- return((off_t)0);
- }
- sta2 = (struct ste *)(ste & SG4_ADDR1);
- addr = (u_long)&sta2[(va & SG4_MASK2) >> SG4_SHIFT2];
- /*
- * Address from level 1 STE is a physical address,
- * so don't use kvm_read.
- */
- if (lseek(kd->pmfd, (off_t)(addr - lowram), 0) == -1 ||
- read(kd->pmfd, (char *)&ste, sizeof(ste)) < 0)
- goto invalid;
- if ((ste & SG_V) == 0) {
- _kvm_err(kd, 0, "invalid level 2 descriptor (%x)",
- ste);
- return((off_t)0);
- }
- sta2 = (struct ste *)(ste & SG4_ADDR2);
- addr = (u_long)&sta2[(va & SG4_MASK3) >> SG4_SHIFT3];
- } else {
- addr = (u_long)&sta[va >> SEGSHIFT];
- /*
- * Can't use KREAD to read kernel segment table entries.
- * Fortunately it is 1-to-1 mapped so we don't have to.
- */
- if (sta == vm->Sysseg) {
- if (lseek(kd->pmfd, (off_t)addr, 0) == -1 ||
- read(kd->pmfd, (char *)&ste, sizeof(ste)) < 0)
- goto invalid;
- } else if (KREAD(kd, addr, &ste))
- goto invalid;
- if ((ste & SG_V) == 0) {
- _kvm_err(kd, 0, "invalid segment (%x)", ste);
- return((off_t)0);
- }
- p = btop(va & SG_PMASK);
- addr = (ste & SG_FRAME) + (p * sizeof(struct pte));
- }
- /*
- * Address from STE is a physical address so don't use kvm_read.
- */
- if (lseek(kd->pmfd, (off_t)(addr - lowram), 0) == -1 ||
- read(kd->pmfd, (char *)&pte, sizeof(pte)) < 0)
- goto invalid;
- addr = pte & PG_FRAME;
- if (pte == PG_NV) {
- _kvm_err(kd, 0, "page not valid");
- return (0);
- }
- *pa = addr - lowram + offset;
-
- return (NBPG - offset);
-invalid:
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
-}
-
-int
-_kvm_kvatop(kd, va, pa)
- kvm_t *kd;
- u_long va;
- u_long *pa;
-{
- return (_kvm_vatop(kd, (u_long)kd->vmst->Sysseg, va, pa));
-}
-
-/*
- * Translate a user virtual address to a physical address.
- */
-int
-_kvm_uvatop(kd, p, va, pa)
- kvm_t *kd;
- const struct proc *p;
- u_long va;
- u_long *pa;
-{
- register struct vmspace *vms = p->p_vmspace;
- int kva;
-
- /*
- * If this is a live kernel we just look it up in the kernel
- * virtually allocated flat 4mb page table (i.e. let the kernel
- * do the table walk). In this way, we avoid needing to know
- * the MMU type.
- */
- if (ISALIVE(kd)) {
- struct pte *ptab;
- int pte, offset;
-
- kva = (int)&vms->vm_pmap.pm_ptab;
- if (KREAD(kd, kva, &ptab)) {
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
- }
- kva = (int)&ptab[btop(va)];
- if (KREAD(kd, kva, &pte) || (pte & PG_V) == 0) {
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
- }
- offset = va & PGOFSET;
- *pa = (pte & PG_FRAME) | offset;
- return (NBPG - offset);
- }
- /*
- * Otherwise, we just walk the table ourself.
- */
- kva = (int)&vms->vm_pmap.pm_stab;
- if (KREAD(kd, kva, &kva)) {
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
- }
- return (_kvm_vatop(kd, kva, va, pa));
-}
diff --git a/lib/libkvm/kvm_i386.c b/lib/libkvm/kvm_i386.c
deleted file mode 100644
index d36b922..0000000
--- a/lib/libkvm/kvm_i386.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/*-
- * Copyright (c) 1989, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software developed by the Computer Systems
- * Engineering group at Lawrence Berkeley Laboratory under DARPA contract
- * BG 91-66 and contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm_hp300.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * i386 machine dependent routines for kvm. Hopefully, the forthcoming
- * vm code will one day obsolete this module.
- */
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <nlist.h>
-#include <kvm.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-
-#include <limits.h>
-#include <db.h>
-
-#include "kvm_private.h"
-
-#ifndef btop
-#define btop(x) (i386_btop(x))
-#define ptob(x) (i386_ptob(x))
-#endif
-
-struct vmstate {
- pd_entry_t *PTD;
-};
-
-void
-_kvm_freevtop(kvm_t *kd)
-{
- if (kd->vmst != 0) {
- if (kd->vmst->PTD) {
- free(kd->vmst->PTD);
- }
- free(kd->vmst);
- }
-}
-
-int
-_kvm_initvtop(kvm_t *kd)
-{
- struct vmstate *vm;
- struct nlist nlist[2];
- u_long pa;
- pd_entry_t *PTD;
-
- vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm));
- if (vm == 0) {
- _kvm_err(kd, kd->program, "cannot allocate vm");
- return (-1);
- }
- kd->vmst = vm;
- vm->PTD = 0;
-
- nlist[0].n_name = "_IdlePTD";
- nlist[1].n_name = 0;
-
- if (kvm_nlist(kd, nlist) != 0) {
- _kvm_err(kd, kd->program, "bad namelist");
- return (-1);
- }
- if (kvm_read(kd, (nlist[0].n_value - KERNBASE), &pa, sizeof(pa)) != sizeof(pa)) {
- _kvm_err(kd, kd->program, "cannot read IdlePTD");
- return (-1);
- }
- PTD = _kvm_malloc(kd, PAGE_SIZE);
- if (kvm_read(kd, pa, PTD, PAGE_SIZE) != PAGE_SIZE) {
- _kvm_err(kd, kd->program, "cannot read PTD");
- return (-1);
- }
- vm->PTD = PTD;
- return (0);
-}
-
-static int
-_kvm_vatop(kvm_t *kd, u_long va, u_long *pa)
-{
- struct vmstate *vm;
- u_long offset;
- u_long pte_pa;
- pd_entry_t pde;
- pt_entry_t pte;
- u_long pdeindex;
- u_long pteindex;
- int i;
-
- if (ISALIVE(kd)) {
- _kvm_err(kd, 0, "vatop called in live kernel!");
- return((off_t)0);
- }
-
- vm = kd->vmst;
- offset = va & (PAGE_SIZE - 1);
-
- /*
- * If we are initializing (kernel page table descriptor pointer
- * not yet set) then return pa == va to avoid infinite recursion.
- */
- if (vm->PTD == 0) {
- *pa = va;
- return (PAGE_SIZE - offset);
- }
-
- pdeindex = va >> PDRSHIFT;
- pde = vm->PTD[pdeindex];
- if (((u_long)pde & PG_V) == 0)
- goto invalid;
-
- if ((u_long)pde & PG_PS) {
- /*
- * No second-level page table; ptd describes one 4MB page.
- * (We assume that the kernel wouldn't set PG_PS without enabling
- * it cr0, and that the kernel doesn't support 36-bit physical
- * addresses).
- */
-#define PAGE4M_MASK (NBPDR - 1)
-#define PG_FRAME4M (~PAGE4M_MASK)
- *pa = ((u_long)pde & PG_FRAME4M) + (va & PAGE4M_MASK);
- return (NBPDR - (va & PAGE4M_MASK));
- }
-
- pteindex = (va >> PAGE_SHIFT) & (NPTEPG-1);
- pte_pa = ((u_long)pde & PG_FRAME) + (pteindex * sizeof(pt_entry_t));
-
- /* XXX This has to be a physical address read, kvm_read is virtual */
- if (lseek(kd->pmfd, pte_pa, 0) == -1) {
- _kvm_syserr(kd, kd->program, "_kvm_vatop: lseek");
- goto invalid;
- }
- if (read(kd->pmfd, &pte, sizeof pte) != sizeof pte) {
- _kvm_syserr(kd, kd->program, "_kvm_vatop: read");
- goto invalid;
- }
- if (((u_long)pte & PG_V) == 0)
- goto invalid;
-
- *pa = ((u_long)pte & PG_FRAME) + offset;
- return (PAGE_SIZE - offset);
-
-invalid:
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
-}
-
-int
-_kvm_kvatop(kvm_t *kd, u_long va, u_long *pa)
-{
- return (_kvm_vatop(kd, va, pa));
-}
diff --git a/lib/libkvm/kvm_mips.c b/lib/libkvm/kvm_mips.c
deleted file mode 100644
index 2087981..0000000
--- a/lib/libkvm/kvm_mips.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/*-
- * Copyright (c) 1989, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software developed by the Computer Systems
- * Engineering group at Lawrence Berkeley Laboratory under DARPA contract
- * BG 91-66 and contributed to Berkeley. Modified for MIPS by Ralph Campbell.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm_mips.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-/*
- * MIPS machine dependent routines for kvm. Hopefully, the forthcoming
- * vm code will one day obsolete this module.
- */
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <nlist.h>
-#include <kvm.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-
-#include <limits.h>
-#include <db.h>
-
-#include "kvm_private.h"
-
-#include <machine/machConst.h>
-#include <machine/pte.h>
-#include <machine/pmap.h>
-
-struct vmstate {
- pt_entry_t *Sysmap;
- u_int Sysmapsize;
-};
-
-#define KREAD(kd, addr, p)\
- (kvm_read(kd, addr, (char *)(p), sizeof(*(p))) != sizeof(*(p)))
-
-void
-_kvm_freevtop(kd)
- kvm_t *kd;
-{
- if (kd->vmst != 0)
- free(kd->vmst);
-}
-
-int
-_kvm_initvtop(kd)
- kvm_t *kd;
-{
- struct vmstate *vm;
- struct nlist nlist[3];
-
- vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm));
- if (vm == 0)
- return (-1);
- kd->vmst = vm;
-
- nlist[0].n_name = "Sysmap";
- nlist[1].n_name = "Sysmapsize";
- nlist[2].n_name = 0;
-
- if (kvm_nlist(kd, nlist) != 0) {
- _kvm_err(kd, kd->program, "bad namelist");
- return (-1);
- }
- if (KREAD(kd, (u_long)nlist[0].n_value, &vm->Sysmap)) {
- _kvm_err(kd, kd->program, "cannot read Sysmap");
- return (-1);
- }
- if (KREAD(kd, (u_long)nlist[1].n_value, &vm->Sysmapsize)) {
- _kvm_err(kd, kd->program, "cannot read mmutype");
- return (-1);
- }
- return (0);
-}
-
-/*
- * Translate a kernel virtual address to a physical address.
- */
-int
-_kvm_kvatop(kd, va, pa)
- kvm_t *kd;
- u_long va;
- u_long *pa;
-{
- register struct vmstate *vm;
- u_long pte, addr, offset;
-
- if (ISALIVE(kd)) {
- _kvm_err(kd, 0, "vatop called in live kernel!");
- return((off_t)0);
- }
- vm = kd->vmst;
- offset = va & PGOFSET;
- /*
- * If we are initializing (kernel segment table pointer not yet set)
- * then return pa == va to avoid infinite recursion.
- */
- if (vm->Sysmap == 0) {
- *pa = va;
- return (NBPG - offset);
- }
- if (va < KERNBASE ||
- va >= VM_MIN_KERNEL_ADDRESS + vm->Sysmapsize * NBPG)
- goto invalid;
- if (va < VM_MIN_KERNEL_ADDRESS) {
- *pa = MACH_CACHED_TO_PHYS(va);
- return (NBPG - offset);
- }
- addr = (u_long)(vm->Sysmap + ((va - VM_MIN_KERNEL_ADDRESS) >> PGSHIFT));
- /*
- * Can't use KREAD to read kernel segment table entries.
- * Fortunately it is 1-to-1 mapped so we don't have to.
- */
- if (lseek(kd->pmfd, (off_t)addr, 0) < 0 ||
- read(kd->pmfd, (char *)&pte, sizeof(pte)) < 0)
- goto invalid;
- if (!(pte & PG_V))
- goto invalid;
- *pa = (pte & PG_FRAME) | offset;
- return (NBPG - offset);
-
-invalid:
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
-}
-
-/*
- * Translate a user virtual address to a physical address.
- */
-int
-_kvm_uvatop(kd, p, va, pa)
- kvm_t *kd;
- const struct proc *p;
- u_long va;
- u_long *pa;
-{
- register struct vmspace *vms = p->p_vmspace;
- u_long kva, offset;
-
- if (va >= KERNBASE)
- goto invalid;
-
- /* read the address of the first level table */
- kva = (u_long)&vms->vm_pmap.pm_segtab;
- if (kvm_read(kd, kva, (char *)&kva, sizeof(kva)) != sizeof(kva))
- goto invalid;
- if (kva == 0)
- goto invalid;
-
- /* read the address of the second level table */
- kva += (va >> SEGSHIFT) * sizeof(caddr_t);
- if (kvm_read(kd, kva, (char *)&kva, sizeof(kva)) != sizeof(kva))
- goto invalid;
- if (kva == 0)
- goto invalid;
-
- /* read the pte from the second level table */
- kva += (va >> PGSHIFT) & (NPTEPG - 1);
- if (kvm_read(kd, kva, (char *)&kva, sizeof(kva)) != sizeof(kva))
- goto invalid;
- if (!(kva & PG_V))
- goto invalid;
- offset = va & PGOFSET;
- *pa = (kva & PG_FRAME) | offset;
- return (NBPG - offset);
-
-invalid:
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
-}
diff --git a/lib/libkvm/kvm_nlist.3 b/lib/libkvm/kvm_nlist.3
deleted file mode 100644
index f620f55..0000000
--- a/lib/libkvm/kvm_nlist.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software developed by the Computer Systems
-.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract
-.\" BG 91-66 and contributed to Berkeley.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kvm_nlist.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt KVM_NLIST 3
-.Os
-.Sh NAME
-.Nm kvm_nlist
-.Nd retrieve symbol table names from a kernel image
-.Sh SYNOPSIS
-.Fd #include <kvm.h>
-.Fd #include <nlist.h>
-.Ft int
-.Fn kvm_nlist "kvm_t *kd" "struct nlist *nl"
-.Sh DESCRIPTION
-.Fn kvm_nlist
-retrieves the symbol table entries indicated by the name list argument
-.Fa \&nl .
-This argument points to an array of nlist structures, terminated by
-an entry whose n_name field is
-.Dv NULL
-(see
-.Xr nlist 3 ) .
-Each symbol is looked up using the n_name field, and if found, the
-corresponding n_type and n_value fields are filled in. These fields are set
-to 0 if the symbol is not found.
-.Pp
-The program
-.Xr kvm_mkdb 8
-builds a database from the running kernel's namelist.
-If the database matches the opened kernel,
-.Fn kvm_nlist
-uses it to speed lookups.
-.Sh RETURN VALUES
-The
-.Fn kvm_nlist
-function returns the number of invalid entries found.
-If the kernel symbol table was unreadable, -1 is returned.
-.Sh FILES
-.Bl -tag -width /var/db/kvm_kernel.db -compact
-.It Pa /var/db/kvm_kernel.db
-.El
-.Sh SEE ALSO
-.Xr kvm 3 ,
-.Xr kvm_close 3 ,
-.Xr kvm_getargv 3 ,
-.Xr kvm_getenvv 3 ,
-.Xr kvm_geterr 3 ,
-.Xr kvm_getprocs 3 ,
-.Xr kvm_open 3 ,
-.Xr kvm_openfiles 3 ,
-.Xr kvm_read 3 ,
-.Xr kvm_write 3 ,
-.Xr kvm_mkdb 8
diff --git a/lib/libkvm/kvm_open.3 b/lib/libkvm/kvm_open.3
deleted file mode 100644
index 93fe0f7..0000000
--- a/lib/libkvm/kvm_open.3
+++ /dev/null
@@ -1,185 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software developed by the Computer Systems
-.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract
-.\" BG 91-66 and contributed to Berkeley.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kvm_open.3 8.3 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt KVM_OPEN 3
-.Os
-.Sh NAME
-.Nm kvm_open ,
-.Nm kvm_openfiles ,
-.Nm kvm_close
-.Nd initialize kernel virtual memory access
-.Sh SYNOPSIS
-.Fd #include <fcntl.h>
-.Fd #include <kvm.h>
-.br
-.Ft kvm_t *
-.Fn kvm_open "const char *execfile" "const char *corefile" "const char *swapfile" "int flags" "const char *errstr"
-.Ft kvm_t *
-.Fn kvm_openfiles "const char *execfile" "const char *corefile" "const char *swapfile" "int flags" "char *errbuf"
-.Ft int
-.Fn kvm_close "kvm_t *kd"
-.Sh DESCRIPTION
-The functions
-.Fn kvm_open
-and
-.Fn kvm_openfiles
-return a descriptor used to access kernel virtual memory
-via the
-.Xr kvm 3
-library routines. Both active kernels and crash dumps are accessible
-through this interface.
-.Pp
-.Fa execfile
-is the executable image of the kernel being examined.
-This file must contain a symbol table.
-If this argument is
-.Dv NULL ,
-the currently running system is assumed,
-as determined from
-.Xr getbootfile 3 .
-.Pp
-.Fa corefile
-is the kernel memory device file. It can be either /dev/mem
-or a crash dump core generated by
-.Xr savecore 8 .
-If
-.Fa corefile
-is
-.Dv NULL ,
-the default indicated by
-.Dv _PATH_MEM
-from <paths.h> is used.
-.Pp
-.Fa swapfile
-should indicate the swap device. If
-.Dv NULL ,
-.Dv _PATH_DRUM
-from <paths.h> is used.
-.Pp
-The
-.Fa flags
-argument indicates read/write access as in
-.Xr open 2
-and applies only to the core file.
-Only
-.Dv O_RDONLY ,
-.Dv O_WRONLY ,
-and
-.Dv O_RDWR
-are permitted.
-.Pp
-There are two open routines which differ only with respect to
-the error mechanism.
-One provides backward compatibility with the SunOS kvm library, while the
-other provides an improved error reporting framework.
-.Pp
-The
-.Fn kvm_open
-function is the Sun kvm compatible open call. Here, the
-.Fa errstr
-argument indicates how errors should be handled. If it is
-.Dv NULL ,
-no errors are reported and the application cannot know the
-specific nature of the failed kvm call.
-If it is not
-.Dv NULL ,
-errors are printed to stderr with
-.Fa errstr
-prepended to the message, as in
-.Xr perror 3 .
-Normally, the name of the program is used here.
-The string is assumed to persist at least until the corresponding
-.Fn kvm_close
-call.
-.Pp
-The
-.Fn kvm_openfiles
-function provides BSD style error reporting.
-Here, error messages are not printed out by the library.
-Instead, the application obtains the error message
-corresponding to the most recent kvm library call using
-.Fn kvm_geterr
-(see
-.Xr kvm_geterr 3 ).
-The results are undefined if the most recent kvm call did not produce
-an error.
-Since
-.Fn kvm_geterr
-requires a kvm descriptor, but the open routines return
-.Dv NULL
-on failure,
-.Fn kvm_geterr
-cannot be used to get the error message if open fails.
-Thus,
-.Fn kvm_openfiles
-will place any error message in the
-.Fa errbuf
-argument. This buffer should be _POSIX2_LINE_MAX characters large (from
-<limits.h>).
-.Sh RETURN VALUES
-The
-.Fn kvm_open
-and
-.Fn kvm_openfiles
-functions both return a descriptor to be used
-in all subsequent kvm library calls.
-The library is fully re-entrant.
-On failure,
-.Dv NULL
-is returned, in which case
-.Fn kvm_openfiles
-writes the error message into
-.Fa errbuf .
-.Pp
-The
-.Fn kvm_close
-function returns 0 on success and -1 on failure.
-.Sh BUGS
-There should not be two open calls. The ill-defined error semantics
-of the Sun library and the desire to have a backward-compatible library
-for BSD left little choice.
-.Sh SEE ALSO
-.Xr open 2 ,
-.Xr kvm 3 ,
-.Xr kvm_getargv 3 ,
-.Xr kvm_getenvv 3 ,
-.Xr kvm_geterr 3 ,
-.Xr kvm_getprocs 3 ,
-.Xr kvm_nlist 3 ,
-.Xr kvm_read 3 ,
-.Xr kvm_write 3
diff --git a/lib/libkvm/kvm_private.h b/lib/libkvm/kvm_private.h
deleted file mode 100644
index 92ab146..0000000
--- a/lib/libkvm/kvm_private.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software developed by the Computer Systems
- * Engineering group at Lawrence Berkeley Laboratory under DARPA contract
- * BG 91-66 and contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)kvm_private.h 8.1 (Berkeley) 6/4/93
- */
-
-struct __kvm {
- /*
- * a string to be prepended to error messages
- * provided for compatibility with sun's interface
- * if this value is null, errors are saved in errbuf[]
- */
- const char *program;
- char *errp; /* XXX this can probably go away */
- char errbuf[_POSIX2_LINE_MAX];
- DB *db;
-#define ISALIVE(kd) ((kd)->vmfd >= 0)
- int pmfd; /* physical memory file (or crashdump) */
- int vmfd; /* virtual memory file (-1 if crashdump) */
- int swfd; /* swap file (e.g., /dev/drum) */
- int nlfd; /* namelist file (e.g., /kernel) */
- struct kinfo_proc *procbase;
- char *argspc; /* (dynamic) storage for argv strings */
- int arglen; /* length of the above */
- char **argv; /* (dynamic) storage for argv pointers */
- int argc; /* length of above (not actual # present) */
- char *argbuf; /* (dynamic) temporary storage */
- /*
- * Kernel virtual address translation state. This only gets filled
- * in for dead kernels; otherwise, the running kernel (i.e. kmem)
- * will do the translations for us. It could be big, so we
- * only allocate it if necessary.
- */
- struct vmstate *vmst;
-};
-
-/*
- * Functions used internally by kvm, but across kvm modules.
- */
-void _kvm_err __P((kvm_t *kd, const char *program, const char *fmt, ...));
-void _kvm_freeprocs __P((kvm_t *kd));
-void _kvm_freevtop __P((kvm_t *));
-int _kvm_initvtop __P((kvm_t *));
-int _kvm_kvatop __P((kvm_t *, u_long, u_long *));
-void *_kvm_malloc __P((kvm_t *kd, size_t));
-void *_kvm_realloc __P((kvm_t *kd, void *, size_t));
-void _kvm_syserr
- __P((kvm_t *kd, const char *program, const char *fmt, ...));
-int _kvm_uvatop __P((kvm_t *, const struct proc *, u_long, u_long *));
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
deleted file mode 100644
index d167f34..0000000
--- a/lib/libkvm/kvm_proc.c
+++ /dev/null
@@ -1,722 +0,0 @@
-/*-
- * Copyright (c) 1989, 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software developed by the Computer Systems
- * Engineering group at Lawrence Berkeley Laboratory under DARPA contract
- * BG 91-66 and contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Proc traversal interface for kvm. ps and w are (probably) the exclusive
- * users of this code, so we've factored it out into a separate module.
- * Thus, we keep this grunge out of the other kvm applications (i.e.,
- * most other applications are interested only in open/close/read/nlist).
- */
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#include <sys/exec.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/tty.h>
-#include <sys/file.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <nlist.h>
-#include <kvm.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/swap_pager.h>
-
-#include <sys/sysctl.h>
-
-#include <limits.h>
-#include <memory.h>
-#include <db.h>
-#include <paths.h>
-
-#include "kvm_private.h"
-
-#if used
-static char *
-kvm_readswap(kd, p, va, cnt)
- kvm_t *kd;
- const struct proc *p;
- u_long va;
- u_long *cnt;
-{
-#ifdef __FreeBSD__
- /* XXX Stubbed out, our vm system is differnet */
- _kvm_err(kd, kd->program, "kvm_readswap not implemented");
- return(0);
-#endif /* __FreeBSD__ */
-}
-#endif
-
-#define KREAD(kd, addr, obj) \
- (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj))
-
-/*
- * Read proc's from memory file into buffer bp, which has space to hold
- * at most maxcnt procs.
- */
-static int
-kvm_proclist(kd, what, arg, p, bp, maxcnt)
- kvm_t *kd;
- int what, arg;
- struct proc *p;
- struct kinfo_proc *bp;
- int maxcnt;
-{
- register int cnt = 0;
- struct eproc eproc;
- struct pgrp pgrp;
- struct session sess;
- struct tty tty;
- struct proc proc;
- struct proc pproc;
-
- for (; cnt < maxcnt && p != NULL; p = proc.p_list.le_next) {
- if (KREAD(kd, (u_long)p, &proc)) {
- _kvm_err(kd, kd->program, "can't read proc at %x", p);
- return (-1);
- }
- if (KREAD(kd, (u_long)proc.p_cred, &eproc.e_pcred) == 0)
- (void)(KREAD(kd, (u_long)eproc.e_pcred.pc_ucred,
- &eproc.e_ucred));
-
- switch(what) {
-
- case KERN_PROC_PID:
- if (proc.p_pid != (pid_t)arg)
- continue;
- break;
-
- case KERN_PROC_UID:
- if (eproc.e_ucred.cr_uid != (uid_t)arg)
- continue;
- break;
-
- case KERN_PROC_RUID:
- if (eproc.e_pcred.p_ruid != (uid_t)arg)
- continue;
- break;
- }
- /*
- * We're going to add another proc to the set. If this
- * will overflow the buffer, assume the reason is because
- * nprocs (or the proc list) is corrupt and declare an error.
- */
- if (cnt >= maxcnt) {
- _kvm_err(kd, kd->program, "nprocs corrupt");
- return (-1);
- }
- /*
- * gather eproc
- */
- eproc.e_paddr = p;
- if (KREAD(kd, (u_long)proc.p_pgrp, &pgrp)) {
- _kvm_err(kd, kd->program, "can't read pgrp at %x",
- proc.p_pgrp);
- return (-1);
- }
- if (proc.p_oppid)
- eproc.e_ppid = proc.p_oppid;
- else if (proc.p_pptr) {
- if (KREAD(kd, (u_long)proc.p_pptr, &pproc)) {
- _kvm_err(kd, kd->program, "can't read pproc at %x",
- proc.p_pptr);
- return (-1);
- }
- eproc.e_ppid = pproc.p_pid;
- } else
- eproc.e_ppid = 0;
- eproc.e_sess = pgrp.pg_session;
- eproc.e_pgid = pgrp.pg_id;
- eproc.e_jobc = pgrp.pg_jobc;
- if (KREAD(kd, (u_long)pgrp.pg_session, &sess)) {
- _kvm_err(kd, kd->program, "can't read session at %x",
- pgrp.pg_session);
- return (-1);
- }
- (void)memcpy(eproc.e_login, sess.s_login,
- sizeof(eproc.e_login));
- if ((proc.p_flag & P_CONTROLT) && sess.s_ttyp != NULL) {
- if (KREAD(kd, (u_long)sess.s_ttyp, &tty)) {
- _kvm_err(kd, kd->program,
- "can't read tty at %x", sess.s_ttyp);
- return (-1);
- }
- eproc.e_tdev = tty.t_dev;
- eproc.e_tsess = tty.t_session;
- if (tty.t_pgrp != NULL) {
- if (KREAD(kd, (u_long)tty.t_pgrp, &pgrp)) {
- _kvm_err(kd, kd->program,
- "can't read tpgrp at &x",
- tty.t_pgrp);
- return (-1);
- }
- eproc.e_tpgid = pgrp.pg_id;
- } else
- eproc.e_tpgid = -1;
- } else
- eproc.e_tdev = NODEV;
- eproc.e_flag = sess.s_ttyvp ? EPROC_CTTY : 0;
- if (sess.s_leader == p)
- eproc.e_flag |= EPROC_SLEADER;
- if (proc.p_wmesg)
- (void)kvm_read(kd, (u_long)proc.p_wmesg,
- eproc.e_wmesg, WMESGLEN);
-
-#ifdef sparc
- (void)kvm_read(kd, (u_long)&proc.p_vmspace->vm_rssize,
- (char *)&eproc.e_vm.vm_rssize,
- sizeof(eproc.e_vm.vm_rssize));
- (void)kvm_read(kd, (u_long)&proc.p_vmspace->vm_tsize,
- (char *)&eproc.e_vm.vm_tsize,
- 3 * sizeof(eproc.e_vm.vm_rssize)); /* XXX */
-#else
- (void)kvm_read(kd, (u_long)proc.p_vmspace,
- (char *)&eproc.e_vm, sizeof(eproc.e_vm));
-#endif
- eproc.e_xsize = eproc.e_xrssize = 0;
- eproc.e_xccount = eproc.e_xswrss = 0;
-
- switch (what) {
-
- case KERN_PROC_PGRP:
- if (eproc.e_pgid != (pid_t)arg)
- continue;
- break;
-
- case KERN_PROC_TTY:
- if ((proc.p_flag & P_CONTROLT) == 0 ||
- eproc.e_tdev != (dev_t)arg)
- continue;
- break;
- }
- bcopy(&proc, &bp->kp_proc, sizeof(proc));
- bcopy(&eproc, &bp->kp_eproc, sizeof(eproc));
- ++bp;
- ++cnt;
- }
- return (cnt);
-}
-
-/*
- * Build proc info array by reading in proc list from a crash dump.
- * Return number of procs read. maxcnt is the max we will read.
- */
-static int
-kvm_deadprocs(kd, what, arg, a_allproc, a_zombproc, maxcnt)
- kvm_t *kd;
- int what, arg;
- u_long a_allproc;
- u_long a_zombproc;
- int maxcnt;
-{
- register struct kinfo_proc *bp = kd->procbase;
- register int acnt, zcnt;
- struct proc *p;
-
- if (KREAD(kd, a_allproc, &p)) {
- _kvm_err(kd, kd->program, "cannot read allproc");
- return (-1);
- }
- acnt = kvm_proclist(kd, what, arg, p, bp, maxcnt);
- if (acnt < 0)
- return (acnt);
-
- if (KREAD(kd, a_zombproc, &p)) {
- _kvm_err(kd, kd->program, "cannot read zombproc");
- return (-1);
- }
- zcnt = kvm_proclist(kd, what, arg, p, bp + acnt, maxcnt - acnt);
- if (zcnt < 0)
- zcnt = 0;
-
- return (acnt + zcnt);
-}
-
-struct kinfo_proc *
-kvm_getprocs(kd, op, arg, cnt)
- kvm_t *kd;
- int op, arg;
- int *cnt;
-{
- int mib[4], size, st, nprocs;
-
- if (kd->procbase != 0) {
- free((void *)kd->procbase);
- /*
- * Clear this pointer in case this call fails. Otherwise,
- * kvm_close() will free it again.
- */
- kd->procbase = 0;
- }
- if (ISALIVE(kd)) {
- size = 0;
- mib[0] = CTL_KERN;
- mib[1] = KERN_PROC;
- mib[2] = op;
- mib[3] = arg;
- st = sysctl(mib, op == KERN_PROC_ALL ? 3 : 4, NULL, &size, NULL, 0);
- if (st == -1) {
- _kvm_syserr(kd, kd->program, "kvm_getprocs");
- return (0);
- }
- kd->procbase = (struct kinfo_proc *)_kvm_malloc(kd, size);
- if (kd->procbase == 0)
- return (0);
- st = sysctl(mib, op == KERN_PROC_ALL ? 3 : 4, kd->procbase, &size, NULL, 0);
- if (st == -1) {
- _kvm_syserr(kd, kd->program, "kvm_getprocs");
- return (0);
- }
- if (size % sizeof(struct kinfo_proc) != 0) {
- _kvm_err(kd, kd->program,
- "proc size mismatch (%d total, %d chunks)",
- size, sizeof(struct kinfo_proc));
- return (0);
- }
- nprocs = size / sizeof(struct kinfo_proc);
- } else {
- struct nlist nl[4], *p;
-
- nl[0].n_name = "_nprocs";
- nl[1].n_name = "_allproc";
- nl[2].n_name = "_zombproc";
- nl[3].n_name = 0;
-
- if (kvm_nlist(kd, nl) != 0) {
- for (p = nl; p->n_type != 0; ++p)
- ;
- _kvm_err(kd, kd->program,
- "%s: no such symbol", p->n_name);
- return (0);
- }
- if (KREAD(kd, nl[0].n_value, &nprocs)) {
- _kvm_err(kd, kd->program, "can't read nprocs");
- return (0);
- }
- size = nprocs * sizeof(struct kinfo_proc);
- kd->procbase = (struct kinfo_proc *)_kvm_malloc(kd, size);
- if (kd->procbase == 0)
- return (0);
-
- nprocs = kvm_deadprocs(kd, op, arg, nl[1].n_value,
- nl[2].n_value, nprocs);
-#ifdef notdef
- size = nprocs * sizeof(struct kinfo_proc);
- (void)realloc(kd->procbase, size);
-#endif
- }
- *cnt = nprocs;
- return (kd->procbase);
-}
-
-void
-_kvm_freeprocs(kd)
- kvm_t *kd;
-{
- if (kd->procbase) {
- free(kd->procbase);
- kd->procbase = 0;
- }
-}
-
-void *
-_kvm_realloc(kd, p, n)
- kvm_t *kd;
- void *p;
- size_t n;
-{
- void *np = (void *)realloc(p, n);
-
- if (np == 0)
- _kvm_err(kd, kd->program, "out of memory");
- return (np);
-}
-
-#ifndef MAX
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-#endif
-
-/*
- * Read in an argument vector from the user address space of process p.
- * addr if the user-space base address of narg null-terminated contiguous
- * strings. This is used to read in both the command arguments and
- * environment strings. Read at most maxcnt characters of strings.
- */
-static char **
-kvm_argv(kd, p, addr, narg, maxcnt)
- kvm_t *kd;
- const struct proc *p;
- register u_long addr;
- register int narg;
- register int maxcnt;
-{
- register char *np, *cp, *ep, *ap;
- register u_long oaddr = -1;
- register int len, cc;
- register char **argv;
-
- /*
- * Check that there aren't an unreasonable number of agruments,
- * and that the address is in user space.
- */
- if (narg > 512 || addr < VM_MIN_ADDRESS || addr >= VM_MAXUSER_ADDRESS)
- return (0);
-
- /*
- * kd->argv : work space for fetching the strings from the target
- * process's space, and is converted for returning to caller
- */
- if (kd->argv == 0) {
- /*
- * Try to avoid reallocs.
- */
- kd->argc = MAX(narg + 1, 32);
- kd->argv = (char **)_kvm_malloc(kd, kd->argc *
- sizeof(*kd->argv));
- if (kd->argv == 0)
- return (0);
- } else if (narg + 1 > kd->argc) {
- kd->argc = MAX(2 * kd->argc, narg + 1);
- kd->argv = (char **)_kvm_realloc(kd, kd->argv, kd->argc *
- sizeof(*kd->argv));
- if (kd->argv == 0)
- return (0);
- }
- /*
- * kd->argspc : returned to user, this is where the kd->argv
- * arrays are left pointing to the collected strings.
- */
- if (kd->argspc == 0) {
- kd->argspc = (char *)_kvm_malloc(kd, PAGE_SIZE);
- if (kd->argspc == 0)
- return (0);
- kd->arglen = PAGE_SIZE;
- }
- /*
- * kd->argbuf : used to pull in pages from the target process.
- * the strings are copied out of here.
- */
- if (kd->argbuf == 0) {
- kd->argbuf = (char *)_kvm_malloc(kd, PAGE_SIZE);
- if (kd->argbuf == 0)
- return (0);
- }
-
- /* Pull in the target process'es argv vector */
- cc = sizeof(char *) * narg;
- if (kvm_uread(kd, p, addr, (char *)kd->argv, cc) != cc)
- return (0);
- /*
- * ap : saved start address of string we're working on in kd->argspc
- * np : pointer to next place to write in kd->argspc
- * len: length of data in kd->argspc
- * argv: pointer to the argv vector that we are hunting around the
- * target process space for, and converting to addresses in
- * our address space (kd->argspc).
- */
- ap = np = kd->argspc;
- argv = kd->argv;
- len = 0;
- /*
- * Loop over pages, filling in the argument vector.
- * Note that the argv strings could be pointing *anywhere* in
- * the user address space and are no longer contiguous.
- * Note that *argv is modified when we are going to fetch a string
- * that crosses a page boundary. We copy the next part of the string
- * into to "np" and eventually convert the pointer.
- */
- while (argv < kd->argv + narg && *argv != 0) {
-
- /* get the address that the current argv string is on */
- addr = (u_long)*argv & ~(PAGE_SIZE - 1);
-
- /* is it the same page as the last one? */
- if (addr != oaddr) {
- if (kvm_uread(kd, p, addr, kd->argbuf, PAGE_SIZE) !=
- PAGE_SIZE)
- return (0);
- oaddr = addr;
- }
-
- /* offset within the page... kd->argbuf */
- addr = (u_long)*argv & (PAGE_SIZE - 1);
-
- /* cp = start of string, cc = count of chars in this chunk */
- cp = kd->argbuf + addr;
- cc = PAGE_SIZE - addr;
-
- /* dont get more than asked for by user process */
- if (maxcnt > 0 && cc > maxcnt - len)
- cc = maxcnt - len;
-
- /* pointer to end of string if we found it in this page */
- ep = memchr(cp, '\0', cc);
- if (ep != 0)
- cc = ep - cp + 1;
- /*
- * at this point, cc is the count of the chars that we are
- * going to retrieve this time. we may or may not have found
- * the end of it. (ep points to the null if the end is known)
- */
-
- /* will we exceed the malloc/realloced buffer? */
- if (len + cc > kd->arglen) {
- register int off;
- register char **pp;
- register char *op = kd->argspc;
-
- kd->arglen *= 2;
- kd->argspc = (char *)_kvm_realloc(kd, kd->argspc,
- kd->arglen);
- if (kd->argspc == 0)
- return (0);
- /*
- * Adjust argv pointers in case realloc moved
- * the string space.
- */
- off = kd->argspc - op;
- for (pp = kd->argv; pp < argv; pp++)
- *pp += off;
- ap += off;
- np += off;
- }
- /* np = where to put the next part of the string in kd->argspc*/
- /* np is kinda redundant.. could use "kd->argspc + len" */
- memcpy(np, cp, cc);
- np += cc; /* inc counters */
- len += cc;
-
- /*
- * if end of string found, set the *argv pointer to the
- * saved beginning of string, and advance. argv points to
- * somewhere in kd->argv.. This is initially relative
- * to the target process, but when we close it off, we set
- * it to point in our address space.
- */
- if (ep != 0) {
- *argv++ = ap;
- ap = np;
- } else {
- /* update the address relative to the target process */
- *argv += cc;
- }
-
- if (maxcnt > 0 && len >= maxcnt) {
- /*
- * We're stopping prematurely. Terminate the
- * current string.
- */
- if (ep == 0) {
- *np = '\0';
- *argv++ = ap;
- }
- break;
- }
- }
- /* Make sure argv is terminated. */
- *argv = 0;
- return (kd->argv);
-}
-
-static void
-ps_str_a(p, addr, n)
- struct ps_strings *p;
- u_long *addr;
- int *n;
-{
- *addr = (u_long)p->ps_argvstr;
- *n = p->ps_nargvstr;
-}
-
-static void
-ps_str_e(p, addr, n)
- struct ps_strings *p;
- u_long *addr;
- int *n;
-{
- *addr = (u_long)p->ps_envstr;
- *n = p->ps_nenvstr;
-}
-
-/*
- * Determine if the proc indicated by p is still active.
- * This test is not 100% foolproof in theory, but chances of
- * being wrong are very low.
- */
-static int
-proc_verify(kd, kernp, p)
- kvm_t *kd;
- u_long kernp;
- const struct proc *p;
-{
- struct proc kernproc;
-
- /*
- * Just read in the whole proc. It's not that big relative
- * to the cost of the read system call.
- */
- if (kvm_read(kd, kernp, (char *)&kernproc, sizeof(kernproc)) !=
- sizeof(kernproc))
- return (0);
- return (p->p_pid == kernproc.p_pid &&
- (kernproc.p_stat != SZOMB || p->p_stat == SZOMB));
-}
-
-static char **
-kvm_doargv(kd, kp, nchr, info)
- kvm_t *kd;
- const struct kinfo_proc *kp;
- int nchr;
- void (*info)(struct ps_strings *, u_long *, int *);
-{
- register const struct proc *p = &kp->kp_proc;
- register char **ap;
- u_long addr;
- int cnt;
- struct ps_strings arginfo, *ps_strings;
- int mib[2];
- size_t len;
-
- ps_strings = NULL;
- mib[0] = CTL_KERN;
- mib[1] = KERN_PS_STRINGS;
- len = sizeof(ps_strings);
- if (sysctl(mib, 2, &ps_strings, &len, NULL, 0) < 0 ||
- ps_strings == NULL)
- ps_strings = PS_STRINGS;
-
- /*
- * Pointers are stored at the top of the user stack.
- */
- if (p->p_stat == SZOMB ||
- kvm_uread(kd, p, ps_strings, (char *)&arginfo,
- sizeof(arginfo)) != sizeof(arginfo))
- return (0);
-
- (*info)(&arginfo, &addr, &cnt);
- if (cnt == 0)
- return (0);
- ap = kvm_argv(kd, p, addr, cnt, nchr);
- /*
- * For live kernels, make sure this process didn't go away.
- */
- if (ap != 0 && ISALIVE(kd) &&
- !proc_verify(kd, (u_long)kp->kp_eproc.e_paddr, p))
- ap = 0;
- return (ap);
-}
-
-/*
- * Get the command args. This code is now machine independent.
- */
-char **
-kvm_getargv(kd, kp, nchr)
- kvm_t *kd;
- const struct kinfo_proc *kp;
- int nchr;
-{
- return (kvm_doargv(kd, kp, nchr, ps_str_a));
-}
-
-char **
-kvm_getenvv(kd, kp, nchr)
- kvm_t *kd;
- const struct kinfo_proc *kp;
- int nchr;
-{
- return (kvm_doargv(kd, kp, nchr, ps_str_e));
-}
-
-/*
- * Read from user space. The user context is given by p.
- */
-ssize_t
-kvm_uread(kd, p, uva, buf, len)
- kvm_t *kd;
- register const struct proc *p;
- register u_long uva;
- register char *buf;
- register size_t len;
-{
- register char *cp;
- char procfile[MAXPATHLEN];
- ssize_t amount;
- int fd;
-
- if (!ISALIVE(kd)) {
- _kvm_err(kd, kd->program, "cannot read user space from dead kernel");
- return(0);
- }
-
- cp = buf;
-
- sprintf(procfile, "/proc/%d/mem", p->p_pid);
- fd = open(procfile, O_RDONLY, 0);
-
- if (fd < 0) {
- _kvm_err(kd, kd->program, "cannot open %s", procfile);
- close(fd);
- return (0);
- }
-
-
- while (len > 0) {
- if (lseek(fd, (off_t)uva, 0) == -1 && errno != 0) {
- _kvm_err(kd, kd->program, "invalid address (%x) in %s", uva, procfile);
- break;
- }
- amount = read(fd, cp, len);
- if (amount < 0) {
- _kvm_err(kd, kd->program, "error reading %s", procfile);
- break;
- }
- cp += amount;
- uva += amount;
- len -= amount;
- }
-
- close(fd);
- return (ssize_t)(cp - buf);
-}
diff --git a/lib/libkvm/kvm_read.3 b/lib/libkvm/kvm_read.3
deleted file mode 100644
index 1e8e3ad..0000000
--- a/lib/libkvm/kvm_read.3
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" Copyright (c) 1992, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" This code is derived from software developed by the Computer Systems
-.\" Engineering group at Lawrence Berkeley Laboratory under DARPA contract
-.\" BG 91-66 and contributed to Berkeley.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)kvm_read.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt KVM_READ 3
-.Os
-.Sh NAME
-.Nm kvm_read ,
-.Nm kvm_write
-.Nd read or write kernel virtual memory
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <kvm.h>
-.Ft ssize_t
-.Fn kvm_read "kvm_t *kd" "u_long addr" "void *buf" "size_t nbytes"
-.Ft ssize_t
-.Fn kvm_write "kvm_t *kd" "u_long addr" "const void *buf" "size_t nbytes"
-.Sh DESCRIPTION
-The
-.Fn kvm_read
-and
-.Fn kvm_write
-functions are used to read and write kernel virtual memory (or a crash
-dump file). See
-.Fn kvm_open 3
-or
-.Fn kvm_openfiles 3
-for information regarding opening kernel virtual memory and crash dumps.
-.Pp
-The
-.Fn kvm_read
-function transfers
-.Fa nbytes
-bytes of data from
-the kernel space address
-.Fa addr
-to
-.Fa buf .
-Conversely,
-.Fn kvm_write
-transfers data from
-.Fa buf
-to
-.Fa addr .
-Unlike their SunOS counterparts, these functions cannot be used to
-read or write process address spaces.
-.Sh RETURN VALUES
-Upon success, the number of bytes actually transferred is returned.
-Otherwise, -1 is returned.
-.Sh SEE ALSO
-.Xr kvm 3 ,
-.Xr kvm_close 3 ,
-.Xr kvm_getargv 3 ,
-.Xr kvm_getenvv 3 ,
-.Xr kvm_geterr 3 ,
-.Xr kvm_getprocs 3 ,
-.Xr kvm_nlist 3 ,
-.Xr kvm_open 3 ,
-.Xr kvm_openfiles 3
diff --git a/lib/libkvm/kvm_sparc.c b/lib/libkvm/kvm_sparc.c
deleted file mode 100644
index a7b9594..0000000
--- a/lib/libkvm/kvm_sparc.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software developed by the Computer Systems
- * Engineering group at Lawrence Berkeley Laboratory under DARPA contract
- * BG 91-66 and contributed to Berkeley.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)kvm_sparc.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * Sparc machine dependent routines for kvm. Hopefully, the forthcoming
- * vm code will one day obsolete this module.
- */
-
-#include <sys/param.h>
-#include <sys/user.h>
-#include <sys/proc.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <nlist.h>
-#include <kvm.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-
-#include <limits.h>
-#include <db.h>
-
-#include "kvm_private.h"
-
-#define NPMEG 128
-
-/* XXX from sparc/pmap.c */
-#define MAXMEM (128 * 1024 * 1024) /* no more than 128 MB phys mem */
-#define NPGBANK 16 /* 2^4 pages per bank (64K / bank) */
-#define BSHIFT 4 /* log2(NPGBANK) */
-#define BOFFSET (NPGBANK - 1)
-#define BTSIZE (MAXMEM / NBPG / NPGBANK)
-#define HWTOSW(pmap_stod, pg) (pmap_stod[(pg) >> BSHIFT] | ((pg) & BOFFSET))
-
-struct vmstate {
- pmeg_t segmap[NKSEG];
- int pmeg[NPMEG][NPTESG];
- int pmap_stod[BTSIZE]; /* dense to sparse */
-};
-
-void
-_kvm_freevtop(kd)
- kvm_t *kd;
-{
- if (kd->vmst != 0)
- free(kd->vmst);
-}
-
-int
-_kvm_initvtop(kd)
- kvm_t *kd;
-{
- register int i;
- register int off;
- register struct vmstate *vm;
- struct stat st;
- struct nlist nlist[2];
-
- vm = (struct vmstate *)_kvm_malloc(kd, sizeof(*vm));
- if (vm == 0)
- return (-1);
-
- kd->vmst = vm;
-
- if (fstat(kd->pmfd, &st) < 0)
- return (-1);
- /*
- * Read segment table.
- */
- off = st.st_size - ctob(btoc(sizeof(vm->segmap)));
- errno = 0;
- if (lseek(kd->pmfd, (off_t)off, 0) == -1 && errno != 0 ||
- read(kd->pmfd, (char *)vm->segmap, sizeof(vm->segmap)) < 0) {
- _kvm_err(kd, kd->program, "cannot read segment map");
- return (-1);
- }
- /*
- * Read PMEGs.
- */
- off = st.st_size - ctob(btoc(sizeof(vm->pmeg)) +
- btoc(sizeof(vm->segmap)));
- errno = 0;
- if (lseek(kd->pmfd, (off_t)off, 0) == -1 && errno != 0 ||
- read(kd->pmfd, (char *)vm->pmeg, sizeof(vm->pmeg)) < 0) {
- _kvm_err(kd, kd->program, "cannot read PMEG table");
- return (-1);
- }
- /*
- * Make pmap_stod be an identity map so we can bootstrap it in.
- * We assume it's in the first contiguous chunk of physical memory.
- */
- for (i = 0; i < BTSIZE; ++i)
- vm->pmap_stod[i] = i << 4;
-
- /*
- * It's okay to do this nlist separately from the one kvm_getprocs()
- * does, since the only time we could gain anything by combining
- * them is if we do a kvm_getprocs() on a dead kernel, which is
- * not too common.
- */
- nlist[0].n_name = "_pmap_stod";
- nlist[1].n_name = 0;
- if (kvm_nlist(kd, nlist) != 0) {
- _kvm_err(kd, kd->program, "pmap_stod: no such symbol");
- return (-1);
- }
- if (kvm_read(kd, (u_long)nlist[0].n_value,
- (char *)vm->pmap_stod, sizeof(vm->pmap_stod))
- != sizeof(vm->pmap_stod)) {
- _kvm_err(kd, kd->program, "cannot read pmap_stod");
- return (-1);
- }
- return (0);
-}
-
-#define VA_OFF(va) (va & (NBPG - 1))
-
-/*
- * Translate a user virtual address to a physical address.
- */
-int
-_kvm_uvatop(kd, p, va, pa)
- kvm_t *kd;
- const struct proc *p;
- u_long va;
- u_long *pa;
-{
- int kva, pte;
- register int off, frame;
- register struct vmspace *vms = p->p_vmspace;
-
- if ((u_long)vms < KERNBASE) {
- _kvm_err(kd, kd->program, "_kvm_uvatop: corrupt proc");
- return (0);
- }
- if (va >= KERNBASE)
- return (0);
- /*
- * Get the PTE. This takes two steps. We read the
- * base address of the table, then we index it.
- * Note that the index pte table is indexed by
- * virtual segment rather than physical segment.
- */
- kva = (u_long)&vms->vm_pmap.pm_rpte[VA_VSEG(va)];
- if (kvm_read(kd, kva, (char *)&kva, 4) != 4 || kva == 0)
- goto invalid;
- kva += sizeof(vms->vm_pmap.pm_rpte[0]) * VA_VPG(va);
- if (kvm_read(kd, kva, (char *)&pte, 4) == 4 && (pte & PG_V)) {
- off = VA_OFF(va);
- /*
- * /dev/mem adheres to the hardware model of physical memory
- * (with holes in the address space), while crashdumps
- * adhere to the contiguous software model.
- */
- if (ISALIVE(kd))
- frame = pte & PG_PFNUM;
- else
- frame = HWTOSW(kd->vmst->pmap_stod, pte & PG_PFNUM);
- *pa = (frame << PGSHIFT) | off;
- return (NBPG - off);
- }
-invalid:
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
-}
-
-/*
- * Translate a kernel virtual address to a physical address using the
- * mapping information in kd->vm. Returns the result in pa, and returns
- * the number of bytes that are contiguously available from this
- * physical address. This routine is used only for crashdumps.
- */
-int
-_kvm_kvatop(kd, va, pa)
- kvm_t *kd;
- u_long va;
- u_long *pa;
-{
- register struct vmstate *vm;
- register int s;
- register int pte;
- register int off;
-
- if (va >= KERNBASE) {
- vm = kd->vmst;
- s = vm->segmap[VA_VSEG(va) - NUSEG];
- pte = vm->pmeg[s][VA_VPG(va)];
- if ((pte & PG_V) != 0) {
- off = VA_OFF(va);
- *pa = (HWTOSW(vm->pmap_stod, pte & PG_PFNUM)
- << PGSHIFT) | off;
-
- return (NBPG - off);
- }
- }
- _kvm_err(kd, 0, "invalid address (%x)", va);
- return (0);
-}
diff --git a/lib/libm/Makefile b/lib/libm/Makefile
deleted file mode 100644
index 7863229..0000000
--- a/lib/libm/Makefile
+++ /dev/null
@@ -1,168 +0,0 @@
-# From: @(#)Makefile 8.1 (Berkeley) 6/4/93
-# $Id$
-#
-# ieee - for most IEEE machines, we hope.
-# mc68881 - the, ahem, mc68881.
-# national - for those ieee machines whose floating point implementation
-# has similar byte ordering as the NATIONAL 32016 with 32081.
-# i386 - i387 NPX, currently the same as "national"
-# mips - for MIPS achitecture machines
-# tahoe - for the tahoe double format.
-# vax - for the vax D_floating format
-
-LIB= m
-CFLAGS+=-I${.CURDIR}/common_source
-
-.if (${MACHINE} == "ieee")
-
-HARDWARE=${MACHINE}
-.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
-# common_source
-SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
- exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c \
- jn.c log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c
-# common
-SRCS+= atan2.c sincos.c tan.c
-# ieee
-SRCS+= cabs.c cbrt.c support.c
-
-.elif (${MACHINE} == "hp300" || ${MACHINE} == "luna68k")
-
-HARDWARE=mc68881
-.PATH: ${.CURDIR}/mc68881 ${.CURDIR}/common_source ${.CURDIR}/ieee
-# common_source
-SRCS+= acosh.c asinh.c erf.c exp.c exp__E.c fmod.c gamma.c lgamma.c \
- j0.c j1.c log.c log__L.c pow.c
-# mc68881
-SRCS+= asincos.s atan.s atan2.c atanh.s cosh.s expm1.s floor.s \
- log10.s log1p.s sincos.s sinh.s sqrt.s support.s tan.s tanh.s
-# ieee
-SRCS+= cabs.c cbrt.c
-
-.elif (${MACHINE} == "i386")
-
-HARDWARE=i387
-.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
-CFLAGS+= -Dnational
-# common_source
-SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
- exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c \
- jn.c log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c
-# common
-SRCS+= atan2.c sincos.c tan.c
-# ieee
-SRCS+= cabs.c cbrt.c support.c
-
-.elif (${MACHINE} == "mips")
-
-HARDWARE=${MACHINE}
-.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
-CFLAGS+= -Dnational
-# common_source
-SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
- exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c \
- jn.c log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c
-# common
-SRCS+= atan2.c sincos.c tan.c
-# ieee
-SRCS+= cabs.c cbrt.c support.c
-
-.elif (${MACHINE} == "national")
-
-HARDWARE=${MACHINE}
-.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \
-.elif (${MACHINE} == "national")
-
-HARDWARE=${MACHINE}
-.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/national \
- ${.CURDIR}/ieee
-# common_source
-SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
- exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c jn.c \
- log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c
-# common
-SRCS+= atan2.c sincos.c tan.c
-# national
-SRCS+= sqrt.s support.s
-# ieee
-SRCS+= cabs.c cbrt.c
-
-.elif (${MACHINE} == "sparc")
-
-HARDWARE=${MACHINE}
-.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/ieee
-# common_source
-SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
- exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c \
- jn.c log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c
-# XXX should do sqrt & support functions in assembly
-# common
-SRCS+= atan2.c sincos.c tan.c
-# ieee
-SRCS+= cabs.c cbrt.c support.c
-
-.elif (${MACHINE} == "tahoe")
-
-HARDWARE=${MACHINE}
-.PATH: ${.CURDIR}/common_source ${.CURDIR}/common ${.CURDIR}/tahoe \
-# common_source
-SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
- exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c jn.c \
- log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c
-# common
-SRCS+= atan2.c sincos.c tan.c
-# tahoe
-SRCS+= cabs.s cbrt.s sqrt.s support.s infnan.s
-
-.elif (${MACHINE} == "vax")
-
-HARDWARE=${MACHINE}
-.PATH: ${.CURDIR}/common_source ${.CURDIR}/vax
-# common_source
-SRCS+= acosh.c asincos.c asinh.c atan.c atanh.c cosh.c erf.c exp.c \
- exp__E.c expm1.c floor.c fmod.c gamma.c lgamma.c j0.c j1.c jn.c \
- log.c log10.c log1p.c log__L.c pow.c sinh.c tanh.c
-# vax
-SRCS+= atan2.s cabs.s cbrt.s sqrt.s sincos.s tan.s argred.s support.s \
- infnan.s
-
-.endif
-
-MAN3+= common_source/acos.3 common_source/acosh.3 common_source/asin.3 \
- common_source/asinh.3 common_source/atan.3 common_source/atan2.3 \
- common_source/atanh.3 common_source/ceil.3 common_source/cos.3 \
- common_source/cosh.3 common_source/erf.3 common_source/exp.3 \
- common_source/fabs.3 common_source/floor.3 common_source/fmod.3 \
- common_source/hypot.3 common_source/ieee.3 common_source/infnan.3 \
- common_source/j0.3 common_source/lgamma.3 common_source/math.3 \
- common_source/rint.3 common_source/sin.3 common_source/sinh.3 \
- common_source/sqrt.3 common_source/tan.3 common_source/tanh.3
-
-MLINKS+=erf.3 erfc.3
-MLINKS+=exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 exp.3 pow.3
-MLINKS+=hypot.3 cabs.3
-MLINKS+=ieee.3 copysign.3 ieee.3 drem.3 ieee.3 finite.3 ieee.3 logb.3 \
- ieee.3 scalb.3
-MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0.3 y1.3 j0.3 yn.3
-MLINKS+=lgamma.3 gamma.3
-
-# can't use the standard mkdep, because there are some .s files that
-# are using '#' as a comment indicator and cpp thinks it's an undefined
-# control.
-
-depend: .depend
-.depend: ${SRCS}
- mkdep ${CFLAGS:M-[ID]*} ${.ALLSRC:M*.c}
-
-.include <bsd.lib.mk>
-
-.s.o:
- ${AS} -o ${.TARGET} ${.IMPSRC}
- @${LD} -x -r ${.TARGET}
- @mv -f a.out ${.TARGET}
-
-.s.po:
- sed -f ${.CURDIR}/${HARDWARE}/mcount.sed ${.IMPSRC} | \
- ${AS} -o ${.TARGET}
- @${LD} -X -r ${.TARGET}
- @mv -f a.out ${.TARGET}
diff --git a/lib/libm/README b/lib/libm/README
deleted file mode 100644
index 396d1ee..0000000
--- a/lib/libm/README
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * K.C. Ng, with Z-S. Alex Liu, S. McDonald, P. Tang, W. Kahan.
- * Revised on 5/10/85, 5/13/85, 6/14/85, 8/20/85, 8/27/85, 9/11/85.
- *
- * @(#)README 8.1 (Berkeley) 6/4/93
- */
-
-******************************************************************************
-* This is a description of the upgraded elementary functions (listed in 1). *
-* Bessel functions (j0, j1, jn, y0, y1, yn), floor, and fabs passed over *
-* from 4.2BSD without change except perhaps for the way floating point *
-* exception is signaled on a VAX. Three lines that contain "errno" in erf.c*
-* (error functions erf, erfc) have been deleted to prevent overriding the *
-* system "errno". *
-******************************************************************************
-
-0. Total number of files: 40
-
- IEEE/Makefile VAX/Makefile VAX/support.s erf.c lgamma.c
- IEEE/atan2.c VAX/argred.s VAX/tan.s exp.c log.c
- IEEE/cabs.c VAX/atan2.s acosh.c exp__E.c log10.c
- IEEE/cbrt.c VAX/cabs.s asincos.c expm1.c log1p.c
- IEEE/support.c VAX/cbrt.s asinh.c floor.c log__L.c
- IEEE/trig.c VAX/infnan.s atan.c j0.c pow.c
- Makefile VAX/sincos.s atanh.c j1.c sinh.c
- README VAX/sqrt.s cosh.c jn.c tanh.c
-
-1. Functions implemented :
- (A). Standard elementary functions (total 22) :
- acos(x) ...in file asincos.c
- asin(x) ...in file asincos.c
- atan(x) ...in file atan.c
- atan2(x,y) ...in files IEEE/atan2.c, VAX/atan2.s
- sin(x) ...in files IEEE/trig.c, VAX/sincos.s
- cos(x) ...in files IEEE/trig.c, VAX/sincos.s
- tan(x) ...in files IEEE/trig.c, VAX/tan.s
- cabs(x,y) ...in files IEEE/cabs.c, VAX/cabs.s
- hypot(x,y) ...in files IEEE/cabs.c, VAX/cabs.s
- cbrt(x) ...in files IEEE/cbrt.c, VAX/cbrt.s
- exp(x) ...in file exp.c
- expm1(x):=exp(x)-1 ...in file expm1.c
- log(x) ...in file log.c
- log10(x) ...in file log10.c
- log1p(x):=log(1+x) ...in file log1p.c
- pow(x,y) ...in file pow.c
- sinh(x) ...in file sinh.c
- cosh(x) ...in file cosh.c
- tanh(x) ...in file tanh.c
- asinh(x) ...in file asinh.c
- acosh(x) ...in file acosh.c
- atanh(x) ...in file atanh.c
-
- (B). Kernel functions :
- exp__E(x,c) ...in file exp__E.c, used by expm1/exp/pow/cosh
- log__L(s) ...in file log__L.c, used by log1p/log/pow
- libm$argred ...in file VAX/argred.s, used by VAX version of sin/cos/tan
-
- (C). System supported functions :
- sqrt() ...in files IEEE/support.c, VAX/sqrt.s
- drem() ...in files IEEE/support.c, VAX/support.s
- finite() ...in files IEEE/support.c, VAX/support.s
- logb() ...in files IEEE/support.c, VAX/support.s
- scalb() ...in files IEEE/support.c, VAX/support.s
- copysign() ...in files IEEE/support.c, VAX/support.s
- rint() ...in file floor.c
-
-
- Notes:
- i. The codes in files ending with ".s" are written in VAX assembly
- language. They are intended for VAX computers.
-
- Files that end with ".c" are written in C. They are intended
- for either a VAX or a machine that conforms to the IEEE
- standard 754 for double precision floating-point arithmetic.
-
- ii. On other than VAX or IEEE machines, run the original math
- library, formerly "/usr/lib/libm.a", now "/usr/lib/libom.a", if
- nothing better is available.
-
- iii. The trigonometric functions sin/cos/tan/atan2 in files "VAX/sincos.s",
- "VAX/tan.s" and "VAX/atan2.s" are different from those in
- "IEEE/trig.c" and "IEEE/atan2.c". The VAX assembler code uses the
- true value of pi to perform argument reduction, while the C code uses
- a machine value of PI (see "IEEE/trig.c").
-
-
-2. A computer system that conforms to IEEE standard 754 should provide
- sqrt(x),
- drem(x,p), (double precision remainder function)
- copysign(x,y),
- finite(x),
- scalb(x,N),
- logb(x) and
- rint(x).
- These functions are either required or recommended by the standard.
- For convenience, a (slow) C implementation of these functions is
- provided in the file "IEEE/support.c".
-
- Warning: The functions in IEEE/support.c are somewhat machine dependent.
- Some modifications may be necessary to run them on a different machine.
- Currently, if compiled with a suitable flag, "IEEE/support.c" will work
- on a National 32000, a Zilog 8000, a VAX, and a SUN (cf. the "Makefile"
- in this directory). Invoke the C compiler thus:
-
- cc -c -DVAX IEEE/support.c ... on a VAX, D-format
- cc -c -DNATIONAL IEEE/support.c ... on a National 32000
- cc -c IEEE/support.c ... on other IEEE machines,
- we hope.
-
- Notes:
- 1. Faster versions of "drem" and "sqrt" for IEEE double precision
- (coded in C but intended for assembly language) are given at the
- end of "IEEE/support.c" but commented out since they require certain
- machine-dependent functions.
-
- 2. A fast VAX assembler version of the system supported functions
- copysign(), logb(), scalb(), finite(), and drem() appears in file
- "VAX/support.s". A fast VAX assembler version of sqrt() is in
- file "VAX/sqrt.s".
-
-3. Two formats are supported by all the standard elementary functions:
- the VAX D-format (56-bit precision), and the IEEE double format
- (53-bit precision). The cbrt() in "IEEE/cbrt.c" is for IEEE machines
- only. The functions in files that end with ".s" are for VAX computers
- only. The functions in files that end with ".c" (except "IEEE/cbrt.c")
- are for VAX and IEEE machines. To use the VAX D-format, compile the code
- with -DVAX; to use IEEE double format on various IEEE machines, see
- "Makefile" in this directory).
-
- Example:
- cc -c -DVAX sin.c ... for VAX D-format
-
- Warning: The values of floating-point constants used in the code are
- given in both hexadecimal and decimal. The hexadecimal values
- are the intended ones. The decimal values may be used provided
- that the compiler converts from decimal to binary accurately
- enough to produce the hexadecimal values shown. If the
- conversion is inaccurate, then one must know the exact machine
- representation of the constants and alter the assembly
- language output from the compiler, or play tricks like
- the following in a C program.
-
- Example: to store the floating-point constant
-
- p1= 2^-6 * .F83ABE67E1066A (Hexadecimal)
-
- on a VAX in C, we use two longwords to store its
- machine value and define p1 to be the double constant
- at the location of these two longwords:
-
- static long p1x[] = { 0x3abe3d78, 0x066a67e1};
- #define p1 (*(double*)p1x)
-
- Note: On a VAX, some functions have two codes. For example, cabs() has
- one implementation in "IEEE/cabs.c", and another in "VAX/cabs.s".
- In this case, the assembly language version is preferred.
-
-
-4. Accuracy.
-
- The errors in expm1(), log1p(), exp(), log(), cabs(), hypot()
- and cbrt() are below 1 ULP (Unit in the Last Place).
-
- The error in pow(x,y) grows with the size of y. Nevertheless,
- for integers x and y, pow(x,y) returns the correct integer value
- on all tested machines (VAX, SUN, NATIONAL, ZILOG), provided that
- x to the power of y is representable exactly.
-
- cosh, sinh, acosh, asinh, tanh, atanh and log10 have errors below
- about 3 ULPs.
-
- For trigonometric and inverse trigonometric functions:
-
- Let [trig(x)] denote the value actually computed for trig(x),
-
- 1) Those codes using the machine's value PI (true pi rounded):
- (source codes: IEEE/{trig.c,atan2.c}, asincos.c and atan.c)
-
- The errors in [sin(x)], [cos(x)], and [atan(x)] are below
- 1 ULP compared with sin(x*pi/PI), cos(x*pi/PI), and
- atan(x)*PI/pi respectively, where PI is the machine's
- value of pi rounded. [tan(x)] returns tan(x*pi/PI) within
- about 2 ULPs; [acos(x)], [asin(x)], and [atan2(y,x)]
- return acos(x)*PI/pi, asin(x)*PI/pi, and atan2(y,x)*PI/pi
- respectively to similar accuracy.
-
-
- 2) Those using true pi (for VAX D-format only):
- (source codes: VAX/{sincos.s,tan.s,atan2.s}, asincos.c and
- atan.c)
-
- The errors in [sin(x)], [cos(x)], and [atan(x)] are below
- 1 ULP. [tan(x)], [atan2(y,x)], [acos(x)], and [asin(x)]
- have errors below about 2 ULPs.
-
-
- Here are the results of some test runs to find worst errors on
- the VAX :
-
- tan : 2.09 ULPs ...1,024,000 random arguments (machine PI)
- sin : .861 ULPs ...1,024,000 random arguments (machine PI)
- cos : .857 ULPs ...1,024,000 random arguments (machine PI)
- (compared with tan, sin, cos of (x*pi/PI))
-
- acos : 2.07 ULPs .....200,000 random arguments (machine PI)
- asin : 2.06 ULPs .....200,000 random arguments (machine PI)
- atan2 : 1.41 ULPs .....356,000 random arguments (machine PI)
- atan : 0.86 ULPs ...1,536,000 random arguments (machine PI)
- (compared with (PI/pi)*(atan, asin, acos, atan2 of x))
-
- tan : 2.15 ULPs ...1,024,000 random arguments (true pi)
- sin : .814 ULPs ...1,024,000 random arguments (true pi)
- cos : .792 ULPs ...1,024,000 random arguments (true pi)
- acos : 2.15 ULPs ...1,024,000 random arguments (true pi)
- asin : 1.99 ULPs ...1,024,000 random arguments (true pi)
- atan2 : 1.48 ULPs ...1,024,000 random arguments (true pi)
- atan : .850 ULPs ...1,024,000 random arguments (true pi)
-
- acosh : 3.30 ULPs .....512,000 random arguments
- asinh : 1.58 ULPs .....512,000 random arguments
- atanh : 1.71 ULPs .....512,000 random arguments
- cosh : 1.23 ULPs .....768,000 random arguments
- sinh : 1.93 ULPs ...1,024,000 random arguments
- tanh : 2.22 ULPs ...1,024,000 random arguments
- log10 : 1.74 ULPs ...1,536,000 random arguments
- pow : 1.79 ULPs .....100,000 random arguments, 0 < x, y < 20.
-
- exp : .768 ULPs ...1,156,000 random arguments
- expm1 : .844 ULPs ...1,166,000 random arguments
- log1p : .846 ULPs ...1,536,000 random arguments
- log : .826 ULPs ...1,536,000 random arguments
- cabs : .959 ULPs .....500,000 random arguments
- cbrt : .666 ULPs ...5,120,000 random arguments
-
-
-5. Speed.
-
- Some functions coded in VAX assembly language (cabs(), hypot() and
- sqrt()) are significantly faster than the corresponding ones in 4.2BSD.
- In general, to improve performance, all functions in "IEEE/support.c"
- should be written in assembly language and, whenever possible, should
- be called via short subroutine calls.
-
-
-6. j0, j1, jn.
-
- The modifications to these routines were only in how an invalid
- floating point operations is signaled.
diff --git a/lib/libm/common/atan2.c b/lib/libm/common/atan2.c
deleted file mode 100644
index b847a1d..0000000
--- a/lib/libm/common/atan2.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)atan2.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* ATAN2(Y,X)
- * RETURN ARG (X+iY)
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 1/8/85;
- * REVISED BY K.C. NG on 2/7/85, 2/13/85, 3/7/85, 3/30/85, 6/29/85.
- *
- * Required system supported functions :
- * copysign(x,y)
- * scalb(x,y)
- * logb(x)
- *
- * Method :
- * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
- * 2. Reduce x to positive by (if x and y are unexceptional):
- * ARG (x+iy) = arctan(y/x) ... if x > 0,
- * ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
- * 3. According to the integer k=4t+0.25 truncated , t=y/x, the argument
- * is further reduced to one of the following intervals and the
- * arctangent of y/x is evaluated by the corresponding formula:
- *
- * [0,7/16] atan(y/x) = t - t^3*(a1+t^2*(a2+...(a10+t^2*a11)...)
- * [7/16,11/16] atan(y/x) = atan(1/2) + atan( (y-x/2)/(x+y/2) )
- * [11/16.19/16] atan(y/x) = atan( 1 ) + atan( (y-x)/(x+y) )
- * [19/16,39/16] atan(y/x) = atan(3/2) + atan( (y-1.5x)/(x+1.5y) )
- * [39/16,INF] atan(y/x) = atan(INF) + atan( -x/y )
- *
- * Special cases:
- * Notations: atan2(y,x) == ARG (x+iy) == ARG(x,y).
- *
- * ARG( NAN , (anything) ) is NaN;
- * ARG( (anything), NaN ) is NaN;
- * ARG(+(anything but NaN), +-0) is +-0 ;
- * ARG(-(anything but NaN), +-0) is +-PI ;
- * ARG( 0, +-(anything but 0 and NaN) ) is +-PI/2;
- * ARG( +INF,+-(anything but INF and NaN) ) is +-0 ;
- * ARG( -INF,+-(anything but INF and NaN) ) is +-PI;
- * ARG( +INF,+-INF ) is +-PI/4 ;
- * ARG( -INF,+-INF ) is +-3PI/4;
- * ARG( (anything but,0,NaN, and INF),+-INF ) is +-PI/2;
- *
- * Accuracy:
- * atan2(y,x) returns (PI/pi) * the exact ARG (x+iy) nearly rounded,
- * where
- *
- * in decimal:
- * pi = 3.141592653589793 23846264338327 .....
- * 53 bits PI = 3.141592653589793 115997963 ..... ,
- * 56 bits PI = 3.141592653589793 227020265 ..... ,
- *
- * in hexadecimal:
- * pi = 3.243F6A8885A308D313198A2E....
- * 53 bits PI = 3.243F6A8885A30 = 2 * 1.921FB54442D18 error=.276ulps
- * 56 bits PI = 3.243F6A8885A308 = 4 * .C90FDAA22168C2 error=.206ulps
- *
- * In a test run with 356,000 random argument on [-1,1] * [-1,1] on a
- * VAX, the maximum observed error was 1.41 ulps (units of the last place)
- * compared with (PI/pi)*(the exact ARG(x+iy)).
- *
- * Note:
- * We use machine PI (the true pi rounded) in place of the actual
- * value of pi for all the trig and inverse trig functions. In general,
- * if trig is one of sin, cos, tan, then computed trig(y) returns the
- * exact trig(y*pi/PI) nearly rounded; correspondingly, computed arctrig
- * returns the exact arctrig(y)*PI/pi nearly rounded. These guarantee the
- * trig functions have period PI, and trig(arctrig(x)) returns x for
- * all critical values x.
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(athfhi, 4.6364760900080611433E-1 ,6338,3fed,da7b,2b0d, -1, .ED63382B0DDA7B)
-vc(athflo, 1.9338828231967579916E-19 ,5005,2164,92c0,9cfe, -62, .E450059CFE92C0)
-vc(PIo4, 7.8539816339744830676E-1 ,0fda,4049,68c2,a221, 0, .C90FDAA22168C2)
-vc(at1fhi, 9.8279372324732906796E-1 ,985e,407b,b4d9,940f, 0, .FB985E940FB4D9)
-vc(at1flo,-3.5540295636764633916E-18 ,1edc,a383,eaea,34d6, -57,-.831EDC34D6EAEA)
-vc(PIo2, 1.5707963267948966135E0 ,0fda,40c9,68c2,a221, 1, .C90FDAA22168C2)
-vc(PI, 3.1415926535897932270E0 ,0fda,4149,68c2,a221, 2, .C90FDAA22168C2)
-vc(a1, 3.3333333333333473730E-1 ,aaaa,3faa,ab75,aaaa, -1, .AAAAAAAAAAAB75)
-vc(a2, -2.0000000000017730678E-1 ,cccc,bf4c,946e,cccd, -2,-.CCCCCCCCCD946E)
-vc(a3, 1.4285714286694640301E-1 ,4924,3f12,4262,9274, -2, .92492492744262)
-vc(a4, -1.1111111135032672795E-1 ,8e38,bee3,6292,ebc6, -3,-.E38E38EBC66292)
-vc(a5, 9.0909091380563043783E-2 ,2e8b,3eba,d70c,b31b, -3, .BA2E8BB31BD70C)
-vc(a6, -7.6922954286089459397E-2 ,89c8,be9d,7f18,27c3, -3,-.9D89C827C37F18)
-vc(a7, 6.6663180891693915586E-2 ,86b4,3e88,9e58,ae37, -3, .8886B4AE379E58)
-vc(a8, -5.8772703698290408927E-2 ,bba5,be70,a942,8481, -4,-.F0BBA58481A942)
-vc(a9, 5.2170707402812969804E-2 ,b0f3,3e55,13ab,a1ab, -4, .D5B0F3A1AB13AB)
-vc(a10, -4.4895863157820361210E-2 ,e4b9,be37,048f,7fd1, -4,-.B7E4B97FD1048F)
-vc(a11, 3.3006147437343875094E-2 ,3174,3e07,2d87,3cf7, -4, .8731743CF72D87)
-vc(a12, -1.4614844866464185439E-2 ,731a,bd6f,76d9,2f34, -6,-.EF731A2F3476D9)
-
-ic(athfhi, 4.6364760900080609352E-1 , -2, 1.DAC670561BB4F)
-ic(athflo, 4.6249969567426939759E-18 , -58, 1.5543B8F253271)
-ic(PIo4, 7.8539816339744827900E-1 , -1, 1.921FB54442D18)
-ic(at1fhi, 9.8279372324732905408E-1 , -1, 1.F730BD281F69B)
-ic(at1flo,-2.4407677060164810007E-17 , -56, -1.C23DFEFEAE6B5)
-ic(PIo2, 1.5707963267948965580E0 , 0, 1.921FB54442D18)
-ic(PI, 3.1415926535897931160E0 , 1, 1.921FB54442D18)
-ic(a1, 3.3333333333333942106E-1 , -2, 1.55555555555C3)
-ic(a2, -1.9999999999979536924E-1 , -3, -1.9999999997CCD)
-ic(a3, 1.4285714278004377209E-1 , -3, 1.24924921EC1D7)
-ic(a4, -1.1111110579344973814E-1 , -4, -1.C71C7059AF280)
-ic(a5, 9.0908906105474668324E-2 , -4, 1.745CE5AA35DB2)
-ic(a6, -7.6919217767468239799E-2 , -4, -1.3B0FA54BEC400)
-ic(a7, 6.6614695906082474486E-2 , -4, 1.10DA924597FFF)
-ic(a8, -5.8358371008508623523E-2 , -5, -1.DE125FDDBD793)
-ic(a9, 4.9850617156082015213E-2 , -5, 1.9860524BDD807)
-ic(a10, -3.6700606902093604877E-2 , -5, -1.2CA6C04C6937A)
-ic(a11, 1.6438029044759730479E-2 , -6, 1.0D52174A1BB54)
-
-#ifdef vccast
-#define athfhi vccast(athfhi)
-#define athflo vccast(athflo)
-#define PIo4 vccast(PIo4)
-#define at1fhi vccast(at1fhi)
-#define at1flo vccast(at1flo)
-#define PIo2 vccast(PIo2)
-#define PI vccast(PI)
-#define a1 vccast(a1)
-#define a2 vccast(a2)
-#define a3 vccast(a3)
-#define a4 vccast(a4)
-#define a5 vccast(a5)
-#define a6 vccast(a6)
-#define a7 vccast(a7)
-#define a8 vccast(a8)
-#define a9 vccast(a9)
-#define a10 vccast(a10)
-#define a11 vccast(a11)
-#define a12 vccast(a12)
-#endif
-
-double atan2(y,x)
-double y,x;
-{
- static const double zero=0, one=1, small=1.0E-9, big=1.0E18;
- double t,z,signy,signx,hi,lo;
- int k,m;
-
-#if !defined(vax)&&!defined(tahoe)
- /* if x or y is NAN */
- if(x!=x) return(x); if(y!=y) return(y);
-#endif /* !defined(vax)&&!defined(tahoe) */
-
- /* copy down the sign of y and x */
- signy = copysign(one,y) ;
- signx = copysign(one,x) ;
-
- /* if x is 1.0, goto begin */
- if(x==1) { y=copysign(y,one); t=y; if(finite(t)) goto begin;}
-
- /* when y = 0 */
- if(y==zero) return((signx==one)?y:copysign(PI,signy));
-
- /* when x = 0 */
- if(x==zero) return(copysign(PIo2,signy));
-
- /* when x is INF */
- if(!finite(x))
- if(!finite(y))
- return(copysign((signx==one)?PIo4:3*PIo4,signy));
- else
- return(copysign((signx==one)?zero:PI,signy));
-
- /* when y is INF */
- if(!finite(y)) return(copysign(PIo2,signy));
-
- /* compute y/x */
- x=copysign(x,one);
- y=copysign(y,one);
- if((m=(k=logb(y))-logb(x)) > 60) t=big+big;
- else if(m < -80 ) t=y/x;
- else { t = y/x ; y = scalb(y,-k); x=scalb(x,-k); }
-
- /* begin argument reduction */
-begin:
- if (t < 2.4375) {
-
- /* truncate 4(t+1/16) to integer for branching */
- k = 4 * (t+0.0625);
- switch (k) {
-
- /* t is in [0,7/16] */
- case 0:
- case 1:
- if (t < small)
- { big + small ; /* raise inexact flag */
- return (copysign((signx>zero)?t:PI-t,signy)); }
-
- hi = zero; lo = zero; break;
-
- /* t is in [7/16,11/16] */
- case 2:
- hi = athfhi; lo = athflo;
- z = x+x;
- t = ( (y+y) - x ) / ( z + y ); break;
-
- /* t is in [11/16,19/16] */
- case 3:
- case 4:
- hi = PIo4; lo = zero;
- t = ( y - x ) / ( x + y ); break;
-
- /* t is in [19/16,39/16] */
- default:
- hi = at1fhi; lo = at1flo;
- z = y-x; y=y+y+y; t = x+x;
- t = ( (z+z)-x ) / ( t + y ); break;
- }
- }
- /* end of if (t < 2.4375) */
-
- else
- {
- hi = PIo2; lo = zero;
-
- /* t is in [2.4375, big] */
- if (t <= big) t = - x / y;
-
- /* t is in [big, INF] */
- else
- { big+small; /* raise inexact flag */
- t = zero; }
- }
- /* end of argument reduction */
-
- /* compute atan(t) for t in [-.4375, .4375] */
- z = t*t;
-#if defined(vax)||defined(tahoe)
- z = t*(z*(a1+z*(a2+z*(a3+z*(a4+z*(a5+z*(a6+z*(a7+z*(a8+
- z*(a9+z*(a10+z*(a11+z*a12))))))))))));
-#else /* defined(vax)||defined(tahoe) */
- z = t*(z*(a1+z*(a2+z*(a3+z*(a4+z*(a5+z*(a6+z*(a7+z*(a8+
- z*(a9+z*(a10+z*a11)))))))))));
-#endif /* defined(vax)||defined(tahoe) */
- z = lo - z; z += t; z += hi;
-
- return(copysign((signx>zero)?z:PI-z,signy));
-}
diff --git a/lib/libm/common/sincos.c b/lib/libm/common/sincos.c
deleted file mode 100644
index fc35618..0000000
--- a/lib/libm/common/sincos.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)sincos.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include "trig.h"
-double
-sin(x)
-double x;
-{
- double a,c,z;
-
- if(!finite(x)) /* sin(NaN) and sin(INF) must be NaN */
- return x-x;
- x=drem(x,PI2); /* reduce x into [-PI,PI] */
- a=copysign(x,one);
- if (a >= PIo4) {
- if(a >= PI3o4) /* ... in [3PI/4,PI] */
- x = copysign((a = PI-a),x);
- else { /* ... in [PI/4,3PI/4] */
- a = PIo2-a; /* rtn. sign(x)*C(PI/2-|x|) */
- z = a*a;
- c = cos__C(z);
- z *= half;
- a = (z >= thresh ? half-((z-half)-c) : one-(z-c));
- return copysign(a,x);
- }
- }
-
- if (a < small) { /* rtn. S(x) */
- big+a;
- return x;
- }
- return x+x*sin__S(x*x);
-}
-
-double
-cos(x)
-double x;
-{
- double a,c,z,s = 1.0;
-
- if(!finite(x)) /* cos(NaN) and cos(INF) must be NaN */
- return x-x;
- x=drem(x,PI2); /* reduce x into [-PI,PI] */
- a=copysign(x,one);
- if (a >= PIo4) {
- if (a >= PI3o4) { /* ... in [3PI/4,PI] */
- a = PI-a;
- s = negone;
- }
- else { /* ... in [PI/4,3PI/4] */
- a = PIo2-a;
- return a+a*sin__S(a*a); /* rtn. S(PI/2-|x|) */
- }
- }
- if (a < small) {
- big+a;
- return s; /* rtn. s*C(a) */
- }
- z = a*a;
- c = cos__C(z);
- z *= half;
- a = (z >= thresh ? half-((z-half)-c) : one-(z-c));
- return copysign(a,s);
-}
diff --git a/lib/libm/common/tan.c b/lib/libm/common/tan.c
deleted file mode 100644
index 7b49bce..0000000
--- a/lib/libm/common/tan.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)tan.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include "trig.h"
-double
-tan(x)
-double x;
-{
- double a,z,ss,cc,c;
- int k;
-
- if(!finite(x)) /* tan(NaN) and tan(INF) must be NaN */
- return x-x;
- x = drem(x,PI); /* reduce x into [-PI/2, PI/2] */
- a = copysign(x,one); /* ... = abs(x) */
- if (a >= PIo4) {
- k = 1;
- x = copysign(PIo2-a,x);
- }
- else {
- k = 0;
- if (a < small) {
- big+a;
- return x;
- }
- }
- z = x*x;
- cc = cos__C(z);
- ss = sin__S(z);
- z *= half; /* Next get c = cos(x) accurately */
- c = (z >= thresh ? half-((z-half)-cc) : one-(z-cc));
- if (k == 0)
- return x+(x*(z-(cc-ss)))/c; /* ... sin/cos */
-#ifdef national
- else if (x == zero)
- return copysign(fmax,x); /* no inf on 32k */
-#endif /* national */
- else
- return c/(x+x*ss); /* ... cos/sin */
-}
diff --git a/lib/libm/common/trig.h b/lib/libm/common/trig.h
deleted file mode 100644
index e31fb4c..0000000
--- a/lib/libm/common/trig.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Copyright (c) 1987, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)trig.h 8.1 (Berkeley) 6/4/93
- */
-
-#include "mathimpl.h"
-
-vc(thresh, 2.6117239648121182150E-1 ,b863,3f85,6ea0,6b02, -1, .85B8636B026EA0)
-vc(PIo4, 7.8539816339744830676E-1 ,0fda,4049,68c2,a221, 0, .C90FDAA22168C2)
-vc(PIo2, 1.5707963267948966135E0 ,0fda,40c9,68c2,a221, 1, .C90FDAA22168C2)
-vc(PI3o4, 2.3561944901923449203E0 ,cbe3,4116,0e92,f999, 2, .96CBE3F9990E92)
-vc(PI, 3.1415926535897932270E0 ,0fda,4149,68c2,a221, 2, .C90FDAA22168C2)
-vc(PI2, 6.2831853071795864540E0 ,0fda,41c9,68c2,a221, 3, .C90FDAA22168C2)
-
-ic(thresh, 2.6117239648121182150E-1 , -2, 1.0B70C6D604DD4)
-ic(PIo4, 7.8539816339744827900E-1 , -1, 1.921FB54442D18)
-ic(PIo2, 1.5707963267948965580E0 , 0, 1.921FB54442D18)
-ic(PI3o4, 2.3561944901923448370E0 , 1, 1.2D97C7F3321D2)
-ic(PI, 3.1415926535897931160E0 , 1, 1.921FB54442D18)
-ic(PI2, 6.2831853071795862320E0 , 2, 1.921FB54442D18)
-
-#ifdef vccast
-#define thresh vccast(thresh)
-#define PIo4 vccast(PIo4)
-#define PIo2 vccast(PIo2)
-#define PI3o4 vccast(PI3o4)
-#define PI vccast(PI)
-#define PI2 vccast(PI2)
-#endif
-
-#ifdef national
-static long fmaxx[] = { 0xffffffff, 0x7fefffff};
-#define fmax (*(double*)fmaxx)
-#endif /* national */
-
-static const double
- zero = 0,
- one = 1,
- negone = -1,
- half = 1.0/2.0,
- small = 1E-10, /* 1+small**2 == 1; better values for small:
- * small = 1.5E-9 for VAX D
- * = 1.2E-8 for IEEE Double
- * = 2.8E-10 for IEEE Extended
- */
- big = 1E20; /* big := 1/(small**2) */
-
-/* sin__S(x*x) ... re-implemented as a macro
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * STATIC KERNEL FUNCTION OF SIN(X), COS(X), AND TAN(X)
- * CODED IN C BY K.C. NG, 1/21/85;
- * REVISED BY K.C. NG on 8/13/85.
- *
- * sin(x*k) - x
- * RETURN --------------- on [-PI/4,PI/4] , where k=pi/PI, PI is the rounded
- * x
- * value of pi in machine precision:
- *
- * Decimal:
- * pi = 3.141592653589793 23846264338327 .....
- * 53 bits PI = 3.141592653589793 115997963 ..... ,
- * 56 bits PI = 3.141592653589793 227020265 ..... ,
- *
- * Hexadecimal:
- * pi = 3.243F6A8885A308D313198A2E....
- * 53 bits PI = 3.243F6A8885A30 = 2 * 1.921FB54442D18
- * 56 bits PI = 3.243F6A8885A308 = 4 * .C90FDAA22168C2
- *
- * Method:
- * 1. Let z=x*x. Create a polynomial approximation to
- * (sin(k*x)-x)/x = z*(S0 + S1*z^1 + ... + S5*z^5).
- * Then
- * sin__S(x*x) = z*(S0 + S1*z^1 + ... + S5*z^5)
- *
- * The coefficient S's are obtained by a special Remez algorithm.
- *
- * Accuracy:
- * In the absence of rounding error, the approximation has absolute error
- * less than 2**(-61.11) for VAX D FORMAT, 2**(-57.45) for IEEE DOUBLE.
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- *
- */
-
-vc(S0, -1.6666666666666646660E-1 ,aaaa,bf2a,aa71,aaaa, -2, -.AAAAAAAAAAAA71)
-vc(S1, 8.3333333333297230413E-3 ,8888,3d08,477f,8888, -6, .8888888888477F)
-vc(S2, -1.9841269838362403710E-4 ,0d00,ba50,1057,cf8a, -12, -.D00D00CF8A1057)
-vc(S3, 2.7557318019967078930E-6 ,ef1c,3738,bedc,a326, -18, .B8EF1CA326BEDC)
-vc(S4, -2.5051841873876551398E-8 ,3195,b3d7,e1d3,374c, -25, -.D73195374CE1D3)
-vc(S5, 1.6028995389845827653E-10 ,3d9c,3030,cccc,6d26, -32, .B03D9C6D26CCCC)
-vc(S6, -6.2723499671769283121E-13 ,8d0b,ac30,ea82,7561, -40, -.B08D0B7561EA82)
-
-ic(S0, -1.6666666666666463126E-1 , -3, -1.555555555550C)
-ic(S1, 8.3333333332992771264E-3 , -7, 1.111111110C461)
-ic(S2, -1.9841269816180999116E-4 , -13, -1.A01A019746345)
-ic(S3, 2.7557309793219876880E-6 , -19, 1.71DE3209CDCD9)
-ic(S4, -2.5050225177523807003E-8 , -26, -1.AE5C0E319A4EF)
-ic(S5, 1.5868926979889205164E-10 , -33, 1.5CF61DF672B13)
-
-#ifdef vccast
-#define S0 vccast(S0)
-#define S1 vccast(S1)
-#define S2 vccast(S2)
-#define S3 vccast(S3)
-#define S4 vccast(S4)
-#define S5 vccast(S5)
-#define S6 vccast(S6)
-#endif
-
-#if defined(vax)||defined(tahoe)
-# define sin__S(z) (z*(S0+z*(S1+z*(S2+z*(S3+z*(S4+z*(S5+z*S6)))))))
-#else /* defined(vax)||defined(tahoe) */
-# define sin__S(z) (z*(S0+z*(S1+z*(S2+z*(S3+z*(S4+z*S5))))))
-#endif /* defined(vax)||defined(tahoe) */
-
-/* cos__C(x*x) ... re-implemented as a macro
- * DOUBLE PRECISION (VAX D FORMAT 56 BITS, IEEE DOUBLE 53 BITS)
- * STATIC KERNEL FUNCTION OF SIN(X), COS(X), AND TAN(X)
- * CODED IN C BY K.C. NG, 1/21/85;
- * REVISED BY K.C. NG on 8/13/85.
- *
- * x*x
- * RETURN cos(k*x) - 1 + ----- on [-PI/4,PI/4], where k = pi/PI,
- * 2
- * PI is the rounded value of pi in machine precision :
- *
- * Decimal:
- * pi = 3.141592653589793 23846264338327 .....
- * 53 bits PI = 3.141592653589793 115997963 ..... ,
- * 56 bits PI = 3.141592653589793 227020265 ..... ,
- *
- * Hexadecimal:
- * pi = 3.243F6A8885A308D313198A2E....
- * 53 bits PI = 3.243F6A8885A30 = 2 * 1.921FB54442D18
- * 56 bits PI = 3.243F6A8885A308 = 4 * .C90FDAA22168C2
- *
- *
- * Method:
- * 1. Let z=x*x. Create a polynomial approximation to
- * cos(k*x)-1+z/2 = z*z*(C0 + C1*z^1 + ... + C5*z^5)
- * then
- * cos__C(z) = z*z*(C0 + C1*z^1 + ... + C5*z^5)
- *
- * The coefficient C's are obtained by a special Remez algorithm.
- *
- * Accuracy:
- * In the absence of rounding error, the approximation has absolute error
- * less than 2**(-64) for VAX D FORMAT, 2**(-58.3) for IEEE DOUBLE.
- *
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-vc(C0, 4.1666666666666504759E-2 ,aaaa,3e2a,a9f0,aaaa, -4, .AAAAAAAAAAA9F0)
-vc(C1, -1.3888888888865302059E-3 ,0b60,bbb6,0cca,b60a, -9, -.B60B60B60A0CCA)
-vc(C2, 2.4801587285601038265E-5 ,0d00,38d0,098f,cdcd, -15, .D00D00CDCD098F)
-vc(C3, -2.7557313470902390219E-7 ,f27b,b593,e805,b593, -21, -.93F27BB593E805)
-vc(C4, 2.0875623401082232009E-9 ,74c8,320f,3ff0,fa1e, -28, .8F74C8FA1E3FF0)
-vc(C5, -1.1355178117642986178E-11 ,c32d,ae47,5a63,0a5c, -36, -.C7C32D0A5C5A63)
-
-ic(C0, 4.1666666666666504759E-2 , -5, 1.555555555553E)
-ic(C1, -1.3888888888865301516E-3 , -10, -1.6C16C16C14199)
-ic(C2, 2.4801587269650015769E-5 , -16, 1.A01A01971CAEB)
-ic(C3, -2.7557304623183959811E-7 , -22, -1.27E4F1314AD1A)
-ic(C4, 2.0873958177697780076E-9 , -29, 1.1EE3B60DDDC8C)
-ic(C5, -1.1250289076471311557E-11 , -37, -1.8BD5986B2A52E)
-
-#ifdef vccast
-#define C0 vccast(C0)
-#define C1 vccast(C1)
-#define C2 vccast(C2)
-#define C3 vccast(C3)
-#define C4 vccast(C4)
-#define C5 vccast(C5)
-#endif
-
-#define cos__C(z) (z*z*(C0+z*(C1+z*(C2+z*(C3+z*(C4+z*C5))))))
diff --git a/lib/libm/common_source/acos.3 b/lib/libm/common_source/acos.3
deleted file mode 100644
index 4613957..0000000
--- a/lib/libm/common_source/acos.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)acos.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ACOS 3
-.Os
-.Sh NAME
-.Nm acos
-.Nd arc cosine function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn acos "double x"
-.Sh DESCRIPTION
-The
-.Fn acos
-function computes the principal value of the arc cosine of
-.Fa x .
-A domain error occurs for arguments not in the range [-1, +1].
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn acos
-function returns the arc cosine in the range
-.Bq 0 , \*(Pi
-radians.
-On the
-.Tn VAX
-and
-.Tn Tahoe ,
-if:
-.Bd -unfilled -offset indent
-.Pf \&| Ns Ar x Ns \&| > 1 ,
-.Ed
-.Pp
-.Fn acos x
-sets the global variable
-.Va errno
-to
-.Dv EDOM
-and a reserved operand fault is generated.
-.Sh SEE ALSO
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn acos
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/acosh.3 b/lib/libm/common_source/acosh.3
deleted file mode 100644
index 3475162..0000000
--- a/lib/libm/common_source/acosh.3
+++ /dev/null
@@ -1,81 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)acosh.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ACOSH 3
-.Os BSD 4.3
-.Sh NAME
-.Nm acosh
-.Nd inverse hyperbolic cosine function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn acosh "double x"
-.Sh DESCRIPTION
-The
-.Fn acosh
-function computes the inverse hyperbolic cosine
-of the real
-argument
-.Ar x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn acosh
-function
-returns the inverse hyperbolic cosine of
-.Ar x .
-On the
-.Tn VAX
-and
-.Tn Tahoe ,
-if the argument is less than one
-.Fn acosh
-sets the global variable
-.Va errno
-to
-.Er EDOM
-and
-causes a reserved operand fault.
-.Sh SEE ALSO
-.Xr asinh 3 ,
-.Xr atanh 3 ,
-.Xr exp 3 ,
-.Xr infnan 3 ,
-.Xr math 3
-.Sh HISTORY
-The
-.Fn acosh
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libm/common_source/acosh.c b/lib/libm/common_source/acosh.c
deleted file mode 100644
index 149e5de..0000000
--- a/lib/libm/common_source/acosh.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)acosh.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* ACOSH(X)
- * RETURN THE INVERSE HYPERBOLIC COSINE OF X
- * DOUBLE PRECISION (VAX D FORMAT 56 BITS, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 2/16/85;
- * REVISED BY K.C. NG on 3/6/85, 3/24/85, 4/16/85, 8/17/85.
- *
- * Required system supported functions :
- * sqrt(x)
- *
- * Required kernel function:
- * log1p(x) ...return log(1+x)
- *
- * Method :
- * Based on
- * acosh(x) = log [ x + sqrt(x*x-1) ]
- * we have
- * acosh(x) := log1p(x)+ln2, if (x > 1.0E20); else
- * acosh(x) := log1p( sqrt(x-1) * (sqrt(x-1) + sqrt(x+1)) ) .
- * These formulae avoid the over/underflow complication.
- *
- * Special cases:
- * acosh(x) is NaN with signal if x<1.
- * acosh(NaN) is NaN without signal.
- *
- * Accuracy:
- * acosh(x) returns the exact inverse hyperbolic cosine of x nearly
- * rounded. In a test run with 512,000 random arguments on a VAX, the
- * maximum observed error was 3.30 ulps (units of the last place) at
- * x=1.0070493753568216 .
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(ln2hi, 6.9314718055829871446E-1 ,7217,4031,0000,f7d0, 0, .B17217F7D00000)
-vc(ln2lo, 1.6465949582897081279E-12 ,bcd5,2ce7,d9cc,e4f1, -39, .E7BCD5E4F1D9CC)
-
-ic(ln2hi, 6.9314718036912381649E-1, -1, 1.62E42FEE00000)
-ic(ln2lo, 1.9082149292705877000E-10,-33, 1.A39EF35793C76)
-
-#ifdef vccast
-#define ln2hi vccast(ln2hi)
-#define ln2lo vccast(ln2lo)
-#endif
-
-double acosh(x)
-double x;
-{
- double t,big=1.E20; /* big+1==big */
-
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
-
- /* return log1p(x) + log(2) if x is large */
- if(x>big) {t=log1p(x)+ln2lo; return(t+ln2hi);}
-
- t=sqrt(x-1.0);
- return(log1p(t*(t+sqrt(x+1.0))));
-}
diff --git a/lib/libm/common_source/asin.3 b/lib/libm/common_source/asin.3
deleted file mode 100644
index ebd4671..0000000
--- a/lib/libm/common_source/asin.3
+++ /dev/null
@@ -1,90 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)asin.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ASIN 3
-.Os
-.Sh NAME
-.Nm asin
-.Nd arc sine function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn asin "double x"
-.Sh DESCRIPTION
-The
-.Fn asin
-function computes the principal value of the arc sine of
-.Fa x .
-A domain error occurs for arguments not in the range [-1, +1].
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn asin
-function returns the arc sine in the range
-.Bk -words
-.Bq -\*(Pi/2, +\*(Pi/2
-.Ek
-radians.
-On the
-.Tn VAX ,
-and Tahoe ,
-if:
-.Bd -unfilled -offset indent
-.Pf \&| Ns Ar x Ns \&| > 1
-.Ed
-.Pp
-the
-global variable
-.Va errno
-is set to
-.Er EDOM
-and
-a reserved operand fault generated.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn asin
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/asincos.c b/lib/libm/common_source/asincos.c
deleted file mode 100644
index 12d0e14..0000000
--- a/lib/libm/common_source/asincos.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)asincos.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* ASIN(X)
- * RETURNS ARC SINE OF X
- * DOUBLE PRECISION (IEEE DOUBLE 53 bits, VAX D FORMAT 56 bits)
- * CODED IN C BY K.C. NG, 4/16/85, REVISED ON 6/10/85.
- *
- * Required system supported functions:
- * copysign(x,y)
- * sqrt(x)
- *
- * Required kernel function:
- * atan2(y,x)
- *
- * Method :
- * asin(x) = atan2(x,sqrt(1-x*x)); for better accuracy, 1-x*x is
- * computed as follows
- * 1-x*x if x < 0.5,
- * 2*(1-|x|)-(1-|x|)*(1-|x|) if x >= 0.5.
- *
- * Special cases:
- * if x is NaN, return x itself;
- * if |x|>1, return NaN.
- *
- * Accuracy:
- * 1) If atan2() uses machine PI, then
- *
- * asin(x) returns (PI/pi) * (the exact arc sine of x) nearly rounded;
- * and PI is the exact pi rounded to machine precision (see atan2 for
- * details):
- *
- * in decimal:
- * pi = 3.141592653589793 23846264338327 .....
- * 53 bits PI = 3.141592653589793 115997963 ..... ,
- * 56 bits PI = 3.141592653589793 227020265 ..... ,
- *
- * in hexadecimal:
- * pi = 3.243F6A8885A308D313198A2E....
- * 53 bits PI = 3.243F6A8885A30 = 2 * 1.921FB54442D18 error=.276ulps
- * 56 bits PI = 3.243F6A8885A308 = 4 * .C90FDAA22168C2 error=.206ulps
- *
- * In a test run with more than 200,000 random arguments on a VAX, the
- * maximum observed error in ulps (units in the last place) was
- * 2.06 ulps. (comparing against (PI/pi)*(exact asin(x)));
- *
- * 2) If atan2() uses true pi, then
- *
- * asin(x) returns the exact asin(x) with error below about 2 ulps.
- *
- * In a test run with more than 1,024,000 random arguments on a VAX, the
- * maximum observed error in ulps (units in the last place) was
- * 1.99 ulps.
- */
-
-double asin(x)
-double x;
-{
- double s,t,copysign(),atan2(),sqrt(),one=1.0;
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- s=copysign(x,one);
- if(s <= 0.5)
- return(atan2(x,sqrt(one-x*x)));
- else
- { t=one-s; s=t+t; return(atan2(x,sqrt(s-t*t))); }
-
-}
-
-/* ACOS(X)
- * RETURNS ARC COS OF X
- * DOUBLE PRECISION (IEEE DOUBLE 53 bits, VAX D FORMAT 56 bits)
- * CODED IN C BY K.C. NG, 4/16/85, REVISED ON 6/10/85.
- *
- * Required system supported functions:
- * copysign(x,y)
- * sqrt(x)
- *
- * Required kernel function:
- * atan2(y,x)
- *
- * Method :
- * ________
- * / 1 - x
- * acos(x) = 2*atan2( / -------- , 1 ) .
- * \/ 1 + x
- *
- * Special cases:
- * if x is NaN, return x itself;
- * if |x|>1, return NaN.
- *
- * Accuracy:
- * 1) If atan2() uses machine PI, then
- *
- * acos(x) returns (PI/pi) * (the exact arc cosine of x) nearly rounded;
- * and PI is the exact pi rounded to machine precision (see atan2 for
- * details):
- *
- * in decimal:
- * pi = 3.141592653589793 23846264338327 .....
- * 53 bits PI = 3.141592653589793 115997963 ..... ,
- * 56 bits PI = 3.141592653589793 227020265 ..... ,
- *
- * in hexadecimal:
- * pi = 3.243F6A8885A308D313198A2E....
- * 53 bits PI = 3.243F6A8885A30 = 2 * 1.921FB54442D18 error=.276ulps
- * 56 bits PI = 3.243F6A8885A308 = 4 * .C90FDAA22168C2 error=.206ulps
- *
- * In a test run with more than 200,000 random arguments on a VAX, the
- * maximum observed error in ulps (units in the last place) was
- * 2.07 ulps. (comparing against (PI/pi)*(exact acos(x)));
- *
- * 2) If atan2() uses true pi, then
- *
- * acos(x) returns the exact acos(x) with error below about 2 ulps.
- *
- * In a test run with more than 1,024,000 random arguments on a VAX, the
- * maximum observed error in ulps (units in the last place) was
- * 2.15 ulps.
- */
-
-double acos(x)
-double x;
-{
- double t,copysign(),atan2(),sqrt(),one=1.0;
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x);
-#endif /* !defined(vax)&&!defined(tahoe) */
- if( x != -1.0)
- t=atan2(sqrt((one-x)/(one+x)),one);
- else
- t=atan2(one,0.0); /* t = PI/2 */
- return(t+t);
-}
diff --git a/lib/libm/common_source/asinh.3 b/lib/libm/common_source/asinh.3
deleted file mode 100644
index cd0b983..0000000
--- a/lib/libm/common_source/asinh.3
+++ /dev/null
@@ -1,69 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)asinh.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ASINH 3
-.Os BSD 4.3
-.Sh NAME
-.Nm asinh
-.Nd inverse hyperbolic sine function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn asinh "double x"
-.Sh DESCRIPTION
-The
-.Fn asinh
-function computes the inverse hyperbolic sine
-of the real
-argument
-.Ar x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn asinh
-function
-returns the inverse hyperbolic sine of
-.Ar x .
-.Sh SEE ALSO
-.Xr acosh 3 ,
-.Xr atanh 3 ,
-.Xr exp 3 ,
-.Xr infnan 3 ,
-.Xr math 3
-.Sh HISTORY
-The
-.Fn asinh
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libm/common_source/asinh.c b/lib/libm/common_source/asinh.c
deleted file mode 100644
index 1804145..0000000
--- a/lib/libm/common_source/asinh.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)asinh.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* ASINH(X)
- * RETURN THE INVERSE HYPERBOLIC SINE OF X
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 2/16/85;
- * REVISED BY K.C. NG on 3/7/85, 3/24/85, 4/16/85.
- *
- * Required system supported functions :
- * copysign(x,y)
- * sqrt(x)
- *
- * Required kernel function:
- * log1p(x) ...return log(1+x)
- *
- * Method :
- * Based on
- * asinh(x) = sign(x) * log [ |x| + sqrt(x*x+1) ]
- * we have
- * asinh(x) := x if 1+x*x=1,
- * := sign(x)*(log1p(x)+ln2)) if sqrt(1+x*x)=x, else
- * := sign(x)*log1p(|x| + |x|/(1/|x| + sqrt(1+(1/|x|)^2)) )
- *
- * Accuracy:
- * asinh(x) returns the exact inverse hyperbolic sine of x nearly rounded.
- * In a test run with 52,000 random arguments on a VAX, the maximum
- * observed error was 1.58 ulps (units in the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-#include "mathimpl.h"
-
-vc(ln2hi, 6.9314718055829871446E-1 ,7217,4031,0000,f7d0, 0, .B17217F7D00000)
-vc(ln2lo, 1.6465949582897081279E-12 ,bcd5,2ce7,d9cc,e4f1, -39, .E7BCD5E4F1D9CC)
-
-ic(ln2hi, 6.9314718036912381649E-1, -1, 1.62E42FEE00000)
-ic(ln2lo, 1.9082149292705877000E-10, -33, 1.A39EF35793C76)
-
-#ifdef vccast
-#define ln2hi vccast(ln2hi)
-#define ln2lo vccast(ln2lo)
-#endif
-
-double asinh(x)
-double x;
-{
- double t,s;
- const static double small=1.0E-10, /* fl(1+small*small) == 1 */
- big =1.0E20, /* fl(1+big) == big */
- one =1.0 ;
-
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- if((t=copysign(x,one))>small)
- if(t<big) {
- s=one/t; return(copysign(log1p(t+t/(s+sqrt(one+s*s))),x)); }
- else /* if |x| > big */
- {s=log1p(t)+ln2lo; return(copysign(s+ln2hi,x));}
- else /* if |x| < small */
- return(x);
-}
diff --git a/lib/libm/common_source/atan.3 b/lib/libm/common_source/atan.3
deleted file mode 100644
index 1119033..0000000
--- a/lib/libm/common_source/atan.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)atan.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ATAN 3
-.Os
-.Sh NAME
-.Nm atan
-.Nd arc tangent function of one variable
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn atan "double x"
-.Sh DESCRIPTION
-The
-.Fn atan
-function computes the principal value of the arc tangent of
-.Fa x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn atan
-function returns the arc tangent in the range
-.Bk -words
-.Bq -\*(Pi/2 , +\*(Pi/2
-.Ek
-radians.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn atan
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/atan.c b/lib/libm/common_source/atan.c
deleted file mode 100644
index f29c7d4..0000000
--- a/lib/libm/common_source/atan.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)atan.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* ATAN(X)
- * RETURNS ARC TANGENT OF X
- * DOUBLE PRECISION (IEEE DOUBLE 53 bits, VAX D FORMAT 56 bits)
- * CODED IN C BY K.C. NG, 4/16/85, REVISED ON 6/10/85.
- *
- * Required kernel function:
- * atan2(y,x)
- *
- * Method:
- * atan(x) = atan2(x,1.0).
- *
- * Special case:
- * if x is NaN, return x itself.
- *
- * Accuracy:
- * 1) If atan2() uses machine PI, then
- *
- * atan(x) returns (PI/pi) * (the exact arc tangent of x) nearly rounded;
- * and PI is the exact pi rounded to machine precision (see atan2 for
- * details):
- *
- * in decimal:
- * pi = 3.141592653589793 23846264338327 .....
- * 53 bits PI = 3.141592653589793 115997963 ..... ,
- * 56 bits PI = 3.141592653589793 227020265 ..... ,
- *
- * in hexadecimal:
- * pi = 3.243F6A8885A308D313198A2E....
- * 53 bits PI = 3.243F6A8885A30 = 2 * 1.921FB54442D18 error=.276ulps
- * 56 bits PI = 3.243F6A8885A308 = 4 * .C90FDAA22168C2 error=.206ulps
- *
- * In a test run with more than 200,000 random arguments on a VAX, the
- * maximum observed error in ulps (units in the last place) was
- * 0.86 ulps. (comparing against (PI/pi)*(exact atan(x))).
- *
- * 2) If atan2() uses true pi, then
- *
- * atan(x) returns the exact atan(x) with error below about 2 ulps.
- *
- * In a test run with more than 1,024,000 random arguments on a VAX, the
- * maximum observed error in ulps (units in the last place) was
- * 0.85 ulps.
- */
-
-double atan(x)
-double x;
-{
- double atan2(),one=1.0;
- return(atan2(x,one));
-}
diff --git a/lib/libm/common_source/atan2.3 b/lib/libm/common_source/atan2.3
deleted file mode 100644
index 3323e01..0000000
--- a/lib/libm/common_source/atan2.3
+++ /dev/null
@@ -1,189 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)atan2.3 8.1 (Berkeley) 6/4/93
-.\" $Id$
-.\"
-.Dd June 4, 1993
-.Dt ATAN2 3
-.Os
-.Sh NAME
-.Nm atan2
-.Nd arc tangent function of two variables
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn atan2 "double y" "double x"
-.Sh DESCRIPTION
-The
-.Xr atan2
-function computes the principal value of the arc tangent of
-.Ar y/ Ns Ar x ,
-using the signs of both arguments to determine the quadrant of
-the return value.
-.Sh RETURN VALUES
-The
-.Xr atan2
-function, if successful,
-returns the arc tangent of
-.Ar y/ Ns Ar x
-in the range
-.Bk -words
-.Bq \&- Ns \*(Pi , \&+ Ns \*(Pi
-.Ek
-radians.
-If both
-.Ar x
-and
-.Ar y
-are zero, the global variable
-.Va errno
-is set to
-.Er EDOM .
-On the
-.Tn VAX :
-.Bl -column atan_(y,x)_:=____ sign(y)_(Pi_atan2(Xy_xX))___
-.It Fn atan2 y x No := Ta
-.Fn atan y/x Ta
-if
-.Ar x
-> 0,
-.It Ta sign( Ns Ar y Ns )*(\*(Pi -
-.Fn atan "\\*(Bay/x\\*(Ba" ) Ta
-if
-.Ar x
-< 0,
-.It Ta
-.No 0 Ta
-if x = y = 0, or
-.It Ta
-.Pf sign( Ar y Ns )*\\*(Pi/2 Ta
-if
-.Ar x
-= 0 \*(!=
-.Ar y .
-.El
-.Sh NOTES
-The function
-.Fn atan2
-defines "if x > 0,"
-.Fn atan2 0 0
-= 0 on a
-.Tn VAX
-despite that previously
-.Fn atan2 0 0
-may have generated an error message.
-The reasons for assigning a value to
-.Fn atan2 0 0
-are these:
-.Bl -enum -offset indent
-.It
-Programs that test arguments to avoid computing
-.Fn atan2 0 0
-must be indifferent to its value.
-Programs that require it to be invalid are vulnerable
-to diverse reactions to that invalidity on diverse computer systems.
-.It
-The
-.Fn atan2
-function is used mostly to convert from rectangular (x,y)
-to polar
-.if n\
-(r,theta)
-.if t\
-(r,\(*h)
-coordinates that must satisfy x =
-.if n\
-r\(**cos theta
-.if t\
-r\(**cos\(*h
-and y =
-.if n\
-r\(**sin theta.
-.if t\
-r\(**sin\(*h.
-These equations are satisfied when (x=0,y=0)
-is mapped to
-.if n \
-(r=0,theta=0)
-.if t \
-(r=0,\(*h=0)
-on a VAX. In general, conversions to polar coordinates
-should be computed thus:
-.Bd -unfilled -offset indent
-.if n \{\
-r := hypot(x,y); ... := sqrt(x\(**x+y\(**y)
-theta := atan2(y,x).
-.\}
-.if t \{\
-r := hypot(x,y); ... := \(sr(x\u\s82\s10\d+y\u\s82\s10\d)
-\(*h := atan2(y,x).
-.\}
-.Ed
-.It
-The foregoing formulas need not be altered to cope in a
-reasonable way with signed zeros and infinities
-on a machine that conforms to
-.Tn IEEE 754 ;
-the versions of
-.Xr hypot 3
-and
-.Fn atan2
-provided for
-such a machine are designed to handle all cases.
-That is why
-.Fn atan2 \(+-0 \-0
-= \(+-\*(Pi
-for instance.
-In general the formulas above are equivalent to these:
-.Bd -unfilled -offset indent
-.if n \
-r := sqrt(x\(**x+y\(**y); if r = 0 then x := copysign(1,x);
-.if t \
-r := \(sr(x\(**x+y\(**y);\0\0if r = 0 then x := copysign(1,x);
-.Ed
-.El
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn atan2
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/atanh.3 b/lib/libm/common_source/atanh.3
deleted file mode 100644
index 49d669f..0000000
--- a/lib/libm/common_source/atanh.3
+++ /dev/null
@@ -1,83 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)atanh.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ATANH 3
-.Os BSD 4.3
-.Sh NAME
-.Nm atanh
-.Nd inverse hyperbolic tangent function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn atanh "double x"
-.Sh DESCRIPTION
-The
-.Fn atanh
-function computes the inverse hyperbolic tangent
-of the real
-argument
-.Ar x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn atanh
-function
-returns the inverse hyperbolic tangent of
-.Ar x
-if successful.
-On the
-.Tn VAX
-and
-.Tn Tahoe ,
-if the argument has absolute value
-bigger than or equal to 1,
-.Fn atanh
-sets the global variable
-.Va errno
-to
-.Er EDOM
-and
-a reserved operand fault is generated.
-.Sh SEE ALSO
-.Xr acosh 3 ,
-.Xr asinh 3 ,
-.Xr exp 3 ,
-.Xr infnan 3 ,
-.Xr math 3
-.Sh HISTORY
-The
-.Fn atanh
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libm/common_source/atanh.c b/lib/libm/common_source/atanh.c
deleted file mode 100644
index e5cdadd..0000000
--- a/lib/libm/common_source/atanh.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)atanh.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* ATANH(X)
- * RETURN THE HYPERBOLIC ARC TANGENT OF X
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 1/8/85;
- * REVISED BY K.C. NG on 2/7/85, 3/7/85, 8/18/85.
- *
- * Required kernel function:
- * log1p(x) ...return log(1+x)
- *
- * Method :
- * Return
- * 1 2x x
- * atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
- * 2 1 - x 1 - x
- *
- * Special cases:
- * atanh(x) is NaN if |x| > 1 with signal;
- * atanh(NaN) is that NaN with no signal;
- * atanh(+-1) is +-INF with signal.
- *
- * Accuracy:
- * atanh(x) returns the exact hyperbolic arc tangent of x nearly rounded.
- * In a test run with 512,000 random arguments on a VAX, the maximum
- * observed error was 1.87 ulps (units in the last place) at
- * x= -3.8962076028810414000e-03.
- */
-#include "mathimpl.h"
-
-#if defined(vax)||defined(tahoe)
-#include <errno.h>
-#endif /* defined(vax)||defined(tahoe) */
-
-double atanh(x)
-double x;
-{
- double z;
- z = copysign(0.5,x);
- x = copysign(x,1.0);
-#if defined(vax)||defined(tahoe)
- if (x == 1.0) {
- return(copysign(1.0,z)*infnan(ERANGE)); /* sign(x)*INF */
- }
-#endif /* defined(vax)||defined(tahoe) */
- x = x/(1.0-x);
- return( z*log1p(x+x) );
-}
diff --git a/lib/libm/common_source/ceil.3 b/lib/libm/common_source/ceil.3
deleted file mode 100644
index 080f30e..0000000
--- a/lib/libm/common_source/ceil.3
+++ /dev/null
@@ -1,65 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ceil.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt CEIL 3
-.Os
-.Sh NAME
-.Nm ceil
-.Nd smallest integral value greather than or equal to x
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn ceil "double x"
-.Sh DESCRIPTION
-The
-.Fn ceil
-function computes the smallest integral value greater than or equal to
-.Fa x .
-.Sh RETURN VALUES
-The
-.Fn ceil
-function returns the smallest integral value
-expressed as a double.
-.Sh SEE ALSO
-.Xr abs 3 ,
-.Xr fabs 3 ,
-.Xr floor 3 ,
-.Xr ieee 3 ,
-.Xr math 3 ,
-.Xr rint 3
-.Sh STANDARDS
-The
-.Fn ceil
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/cos.3 b/lib/libm/common_source/cos.3
deleted file mode 100644
index d279d38..0000000
--- a/lib/libm/common_source/cos.3
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)cos.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt COS 3
-.Os
-.Sh NAME
-.Nm cos
-.Nd cosine function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn cos "double x"
-.Sh DESCRIPTION
-The
-.Fn cos
-function computes the cosine of
-.Fa x
-(measured in radians).
-A large magnitude argument may yield a result with little or no
-significance.
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn cos
-function returns the cosine value.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn acos
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/cosh.3 b/lib/libm/common_source/cosh.3
deleted file mode 100644
index f88c848..0000000
--- a/lib/libm/common_source/cosh.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1989, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)cosh.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt COSH 3
-.Os
-.Sh NAME
-.Nm cosh
-.Nd hyperbolic cosine function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn cosh "double x"
-.Sh DESCRIPTION
-The
-.Fn cosh
-function computes the hyperbolic cosine of
-.Fa x .
-.Sh RETURN VALUES
-The
-.Fn cosh
-function returns the hyperbolic cosine unless the magnitude
-of
-.Fa x
-is too large; in this event, the global variable
-.Va errno
-is set to
-.Er ERANGE .
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn cosh
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/cosh.c b/lib/libm/common_source/cosh.c
deleted file mode 100644
index e8d3519..0000000
--- a/lib/libm/common_source/cosh.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)cosh.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* COSH(X)
- * RETURN THE HYPERBOLIC COSINE OF X
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 1/8/85;
- * REVISED BY K.C. NG on 2/8/85, 2/23/85, 3/7/85, 3/29/85, 4/16/85.
- *
- * Required system supported functions :
- * copysign(x,y)
- * scalb(x,N)
- *
- * Required kernel function:
- * exp(x)
- * exp__E(x,c) ...return exp(x+c)-1-x for |x|<0.3465
- *
- * Method :
- * 1. Replace x by |x|.
- * 2.
- * [ exp(x) - 1 ]^2
- * 0 <= x <= 0.3465 : cosh(x) := 1 + -------------------
- * 2*exp(x)
- *
- * exp(x) + 1/exp(x)
- * 0.3465 <= x <= 22 : cosh(x) := -------------------
- * 2
- * 22 <= x <= lnovfl : cosh(x) := exp(x)/2
- * lnovfl <= x <= lnovfl+log(2)
- * : cosh(x) := exp(x)/2 (avoid overflow)
- * log(2)+lnovfl < x < INF: overflow to INF
- *
- * Note: .3465 is a number near one half of ln2.
- *
- * Special cases:
- * cosh(x) is x if x is +INF, -INF, or NaN.
- * only cosh(0)=1 is exact for finite x.
- *
- * Accuracy:
- * cosh(x) returns the exact hyperbolic cosine of x nearly rounded.
- * In a test run with 768,000 random arguments on a VAX, the maximum
- * observed error was 1.23 ulps (units in the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(mln2hi, 8.8029691931113054792E1 ,0f33,43b0,2bdb,c7e2, 7, .B00F33C7E22BDB)
-vc(mln2lo,-4.9650192275318476525E-16 ,1b60,a70f,582a,279e, -50,-.8F1B60279E582A)
-vc(lnovfl, 8.8029691931113053016E1 ,0f33,43b0,2bda,c7e2, 7, .B00F33C7E22BDA)
-
-ic(mln2hi, 7.0978271289338397310E2, 10, 1.62E42FEFA39EF)
-ic(mln2lo, 2.3747039373786107478E-14, -45, 1.ABC9E3B39803F)
-ic(lnovfl, 7.0978271289338397310E2, 9, 1.62E42FEFA39EF)
-
-#ifdef vccast
-#define mln2hi vccast(mln2hi)
-#define mln2lo vccast(mln2lo)
-#define lnovfl vccast(lnovfl)
-#endif
-
-#if defined(vax)||defined(tahoe)
-static max = 126 ;
-#else /* defined(vax)||defined(tahoe) */
-static max = 1023 ;
-#endif /* defined(vax)||defined(tahoe) */
-
-double cosh(x)
-double x;
-{
- static const double half=1.0/2.0,
- one=1.0, small=1.0E-18; /* fl(1+small)==1 */
- double t;
-
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- if((x=copysign(x,one)) <= 22)
- if(x<0.3465)
- if(x<small) return(one+x);
- else {t=x+__exp__E(x,0.0);x=t+t; return(one+t*t/(2.0+x)); }
-
- else /* for x lies in [0.3465,22] */
- { t=exp(x); return((t+one/t)*half); }
-
- if( lnovfl <= x && x <= (lnovfl+0.7))
- /* for x lies in [lnovfl, lnovfl+ln2], decrease x by ln(2^(max+1))
- * and return 2^max*exp(x) to avoid unnecessary overflow
- */
- return(scalb(exp((x-mln2hi)-mln2lo), max));
-
- else
- return(exp(x)*half); /* for large x, cosh(x)=exp(x)/2 */
-}
diff --git a/lib/libm/common_source/erf.3 b/lib/libm/common_source/erf.3
deleted file mode 100644
index 2c8f065..0000000
--- a/lib/libm/common_source/erf.3
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)erf.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt ERF 3
-.Os BSD 4.3
-.Sh NAME
-.Nm erf ,
-.Nm erfc
-.Nd error function operators
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn erf "double x"
-.Ft double
-.Fn erfc "double x"
-.Sh DESCRIPTION
-These functions calculate the error function of
-.Fa x .
-.Pp
-The
-.Fn erf
-calculates the error function of x; where
-.Bd -filled -offset indent
-.if n \{\
-erf(x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. \}
-.if t \{\
-erf\|(x) :=
-(2/\(sr\(*p)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. \}
-.Ed
-.Pp
-The
-.Fn erfc
-function calculates the complementary error function of
-.Fa x ;
-that is
-.Fn erfc
-subtracts the result of the error function
-.Fn erf x
-from 1.0.
-This is useful, since for large
-.Fa x
-places disappear.
-.Sh SEE ALSO
-.Xr math 3
-.Sh HISTORY
-The
-.Fn erf
-and
-.Fn erfc
-functions appeared in
-.Bx 4.3 .
diff --git a/lib/libm/common_source/erf.c b/lib/libm/common_source/erf.c
deleted file mode 100644
index ba0c006..0000000
--- a/lib/libm/common_source/erf.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)erf.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* Modified Nov 30, 1992 P. McILROY:
- * Replaced expansions for x >= 1.25 (error 1.7ulp vs ~6ulp)
- * Replaced even+odd with direct calculation for x < .84375,
- * to avoid destructive cancellation.
- *
- * Performance of erfc(x):
- * In 300000 trials in the range [.83, .84375] the
- * maximum observed error was 3.6ulp.
- *
- * In [.84735,1.25] the maximum observed error was <2.5ulp in
- * 100000 runs in the range [1.2, 1.25].
- *
- * In [1.25,26] (Not including subnormal results)
- * the error is < 1.7ulp.
- */
-
-/* double erf(double x)
- * double erfc(double x)
- * x
- * 2 |\
- * erf(x) = --------- | exp(-t*t)dt
- * sqrt(pi) \|
- * 0
- *
- * erfc(x) = 1-erf(x)
- *
- * Method:
- * 1. Reduce x to |x| by erf(-x) = -erf(x)
- * 2. For x in [0, 0.84375]
- * erf(x) = x + x*P(x^2)
- * erfc(x) = 1 - erf(x) if x<=0.25
- * = 0.5 + ((0.5-x)-x*P) if x in [0.25,0.84375]
- * where
- * 2 2 4 20
- * P = P(x ) = (p0 + p1 * x + p2 * x + ... + p10 * x )
- * is an approximation to (erf(x)-x)/x with precision
- *
- * -56.45
- * | P - (erf(x)-x)/x | <= 2
- *
- *
- * Remark. The formula is derived by noting
- * erf(x) = (2/sqrt(pi))*(x - x^3/3 + x^5/10 - x^7/42 + ....)
- * and that
- * 2/sqrt(pi) = 1.128379167095512573896158903121545171688
- * is close to one. The interval is chosen because the fixed
- * point of erf(x) is near 0.6174 (i.e., erf(x)=x when x is
- * near 0.6174), and by some experiment, 0.84375 is chosen to
- * guarantee the error is less than one ulp for erf.
- *
- * 3. For x in [0.84375,1.25], let s = x - 1, and
- * c = 0.84506291151 rounded to single (24 bits)
- * erf(x) = c + P1(s)/Q1(s)
- * erfc(x) = (1-c) - P1(s)/Q1(s)
- * |P1/Q1 - (erf(x)-c)| <= 2**-59.06
- * Remark: here we use the taylor series expansion at x=1.
- * erf(1+s) = erf(1) + s*Poly(s)
- * = 0.845.. + P1(s)/Q1(s)
- * That is, we use rational approximation to approximate
- * erf(1+s) - (c = (single)0.84506291151)
- * Note that |P1/Q1|< 0.078 for x in [0.84375,1.25]
- * where
- * P1(s) = degree 6 poly in s
- * Q1(s) = degree 6 poly in s
- *
- * 4. For x in [1.25, 2]; [2, 4]
- * erf(x) = 1.0 - tiny
- * erfc(x) = (1/x)exp(-x*x-(.5*log(pi) -.5z + R(z)/S(z))
- *
- * Where z = 1/(x*x), R is degree 9, and S is degree 3;
- *
- * 5. For x in [4,28]
- * erf(x) = 1.0 - tiny
- * erfc(x) = (1/x)exp(-x*x-(.5*log(pi)+eps + zP(z))
- *
- * Where P is degree 14 polynomial in 1/(x*x).
- *
- * Notes:
- * Here 4 and 5 make use of the asymptotic series
- * exp(-x*x)
- * erfc(x) ~ ---------- * ( 1 + Poly(1/x^2) );
- * x*sqrt(pi)
- *
- * where for z = 1/(x*x)
- * P(z) ~ z/2*(-1 + z*3/2*(1 + z*5/2*(-1 + z*7/2*(1 +...))))
- *
- * Thus we use rational approximation to approximate
- * erfc*x*exp(x*x) ~ 1/sqrt(pi);
- *
- * The error bound for the target function, G(z) for
- * the interval
- * [4, 28]:
- * |eps + 1/(z)P(z) - G(z)| < 2**(-56.61)
- * for [2, 4]:
- * |R(z)/S(z) - G(z)| < 2**(-58.24)
- * for [1.25, 2]:
- * |R(z)/S(z) - G(z)| < 2**(-58.12)
- *
- * 6. For inf > x >= 28
- * erf(x) = 1 - tiny (raise inexact)
- * erfc(x) = tiny*tiny (raise underflow)
- *
- * 7. Special cases:
- * erf(0) = 0, erf(inf) = 1, erf(-inf) = -1,
- * erfc(0) = 1, erfc(inf) = 0, erfc(-inf) = 2,
- * erfc/erf(NaN) is NaN
- */
-
-#if defined(vax) || defined(tahoe)
-#define _IEEE 0
-#define TRUNC(x) (double) (float) (x)
-#else
-#define _IEEE 1
-#define TRUNC(x) *(((int *) &x) + 1) &= 0xf8000000
-#define infnan(x) 0.0
-#endif
-
-#ifdef _IEEE_LIBM
-/*
- * redefining "___function" to "function" in _IEEE_LIBM mode
- */
-#include "ieee_libm.h"
-#endif
-
-static double
-tiny = 1e-300,
-half = 0.5,
-one = 1.0,
-two = 2.0,
-c = 8.45062911510467529297e-01, /* (float)0.84506291151 */
-/*
- * Coefficients for approximation to erf in [0,0.84375]
- */
-p0t8 = 1.02703333676410051049867154944018394163280,
-p0 = 1.283791670955125638123339436800229927041e-0001,
-p1 = -3.761263890318340796574473028946097022260e-0001,
-p2 = 1.128379167093567004871858633779992337238e-0001,
-p3 = -2.686617064084433642889526516177508374437e-0002,
-p4 = 5.223977576966219409445780927846432273191e-0003,
-p5 = -8.548323822001639515038738961618255438422e-0004,
-p6 = 1.205520092530505090384383082516403772317e-0004,
-p7 = -1.492214100762529635365672665955239554276e-0005,
-p8 = 1.640186161764254363152286358441771740838e-0006,
-p9 = -1.571599331700515057841960987689515895479e-0007,
-p10= 1.073087585213621540635426191486561494058e-0008;
-/*
- * Coefficients for approximation to erf in [0.84375,1.25]
- */
-static double
-pa0 = -2.362118560752659485957248365514511540287e-0003,
-pa1 = 4.148561186837483359654781492060070469522e-0001,
-pa2 = -3.722078760357013107593507594535478633044e-0001,
-pa3 = 3.183466199011617316853636418691420262160e-0001,
-pa4 = -1.108946942823966771253985510891237782544e-0001,
-pa5 = 3.547830432561823343969797140537411825179e-0002,
-pa6 = -2.166375594868790886906539848893221184820e-0003,
-qa1 = 1.064208804008442270765369280952419863524e-0001,
-qa2 = 5.403979177021710663441167681878575087235e-0001,
-qa3 = 7.182865441419627066207655332170665812023e-0002,
-qa4 = 1.261712198087616469108438860983447773726e-0001,
-qa5 = 1.363708391202905087876983523620537833157e-0002,
-qa6 = 1.198449984679910764099772682882189711364e-0002;
-/*
- * log(sqrt(pi)) for large x expansions.
- * The tail (lsqrtPI_lo) is included in the rational
- * approximations.
-*/
-static double
- lsqrtPI_hi = .5723649429247000819387380943226;
-/*
- * lsqrtPI_lo = .000000000000000005132975581353913;
- *
- * Coefficients for approximation to erfc in [2, 4]
-*/
-static double
-rb0 = -1.5306508387410807582e-010, /* includes lsqrtPI_lo */
-rb1 = 2.15592846101742183841910806188e-008,
-rb2 = 6.24998557732436510470108714799e-001,
-rb3 = 8.24849222231141787631258921465e+000,
-rb4 = 2.63974967372233173534823436057e+001,
-rb5 = 9.86383092541570505318304640241e+000,
-rb6 = -7.28024154841991322228977878694e+000,
-rb7 = 5.96303287280680116566600190708e+000,
-rb8 = -4.40070358507372993983608466806e+000,
-rb9 = 2.39923700182518073731330332521e+000,
-rb10 = -6.89257464785841156285073338950e-001,
-sb1 = 1.56641558965626774835300238919e+001,
-sb2 = 7.20522741000949622502957936376e+001,
-sb3 = 9.60121069770492994166488642804e+001;
-/*
- * Coefficients for approximation to erfc in [1.25, 2]
-*/
-static double
-rc0 = -2.47925334685189288817e-007, /* includes lsqrtPI_lo */
-rc1 = 1.28735722546372485255126993930e-005,
-rc2 = 6.24664954087883916855616917019e-001,
-rc3 = 4.69798884785807402408863708843e+000,
-rc4 = 7.61618295853929705430118701770e+000,
-rc5 = 9.15640208659364240872946538730e-001,
-rc6 = -3.59753040425048631334448145935e-001,
-rc7 = 1.42862267989304403403849619281e-001,
-rc8 = -4.74392758811439801958087514322e-002,
-rc9 = 1.09964787987580810135757047874e-002,
-rc10 = -1.28856240494889325194638463046e-003,
-sc1 = 9.97395106984001955652274773456e+000,
-sc2 = 2.80952153365721279953959310660e+001,
-sc3 = 2.19826478142545234106819407316e+001;
-/*
- * Coefficients for approximation to erfc in [4,28]
- */
-static double
-rd0 = -2.1491361969012978677e-016, /* includes lsqrtPI_lo */
-rd1 = -4.99999999999640086151350330820e-001,
-rd2 = 6.24999999772906433825880867516e-001,
-rd3 = -1.54166659428052432723177389562e+000,
-rd4 = 5.51561147405411844601985649206e+000,
-rd5 = -2.55046307982949826964613748714e+001,
-rd6 = 1.43631424382843846387913799845e+002,
-rd7 = -9.45789244999420134263345971704e+002,
-rd8 = 6.94834146607051206956384703517e+003,
-rd9 = -5.27176414235983393155038356781e+004,
-rd10 = 3.68530281128672766499221324921e+005,
-rd11 = -2.06466642800404317677021026611e+006,
-rd12 = 7.78293889471135381609201431274e+006,
-rd13 = -1.42821001129434127360582351685e+007;
-
-double erf(x)
- double x;
-{
- double R,S,P,Q,ax,s,y,z,r,fabs(),exp();
- if(!finite(x)) { /* erf(nan)=nan */
- if (isnan(x))
- return(x);
- return (x > 0 ? one : -one); /* erf(+/-inf)= +/-1 */
- }
- if ((ax = x) < 0)
- ax = - ax;
- if (ax < .84375) {
- if (ax < 3.7e-09) {
- if (ax < 1.0e-308)
- return 0.125*(8.0*x+p0t8*x); /*avoid underflow */
- return x + p0*x;
- }
- y = x*x;
- r = y*(p1+y*(p2+y*(p3+y*(p4+y*(p5+
- y*(p6+y*(p7+y*(p8+y*(p9+y*p10)))))))));
- return x + x*(p0+r);
- }
- if (ax < 1.25) { /* 0.84375 <= |x| < 1.25 */
- s = fabs(x)-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if (x>=0)
- return (c + P/Q);
- else
- return (-c - P/Q);
- }
- if (ax >= 6.0) { /* inf>|x|>=6 */
- if (x >= 0.0)
- return (one-tiny);
- else
- return (tiny-one);
- }
- /* 1.25 <= |x| < 6 */
- z = -ax*ax;
- s = -one/z;
- if (ax < 2.0) {
- R = rc0+s*(rc1+s*(rc2+s*(rc3+s*(rc4+s*(rc5+
- s*(rc6+s*(rc7+s*(rc8+s*(rc9+s*rc10)))))))));
- S = one+s*(sc1+s*(sc2+s*sc3));
- } else {
- R = rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(rb5+
- s*(rb6+s*(rb7+s*(rb8+s*(rb9+s*rb10)))))))));
- S = one+s*(sb1+s*(sb2+s*sb3));
- }
- y = (R/S -.5*s) - lsqrtPI_hi;
- z += y;
- z = exp(z)/ax;
- if (x >= 0)
- return (one-z);
- else
- return (z-one);
-}
-
-double erfc(x)
- double x;
-{
- double R,S,P,Q,s,ax,y,z,r,fabs(),__exp__D();
- if (!finite(x)) {
- if (isnan(x)) /* erfc(NaN) = NaN */
- return(x);
- else if (x > 0) /* erfc(+-inf)=0,2 */
- return 0.0;
- else
- return 2.0;
- }
- if ((ax = x) < 0)
- ax = -ax;
- if (ax < .84375) { /* |x|<0.84375 */
- if (ax < 1.38777878078144568e-17) /* |x|<2**-56 */
- return one-x;
- y = x*x;
- r = y*(p1+y*(p2+y*(p3+y*(p4+y*(p5+
- y*(p6+y*(p7+y*(p8+y*(p9+y*p10)))))))));
- if (ax < .0625) { /* |x|<2**-4 */
- return (one-(x+x*(p0+r)));
- } else {
- r = x*(p0+r);
- r += (x-half);
- return (half - r);
- }
- }
- if (ax < 1.25) { /* 0.84375 <= |x| < 1.25 */
- s = ax-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if (x>=0) {
- z = one-c; return z - P/Q;
- } else {
- z = c+P/Q; return one+z;
- }
- }
- if (ax >= 28) /* Out of range */
- if (x>0)
- return (tiny*tiny);
- else
- return (two-tiny);
- z = ax;
- TRUNC(z);
- y = z - ax; y *= (ax+z);
- z *= -z; /* Here z + y = -x^2 */
- s = one/(-z-y); /* 1/(x*x) */
- if (ax >= 4) { /* 6 <= ax */
- R = s*(rd1+s*(rd2+s*(rd3+s*(rd4+s*(rd5+
- s*(rd6+s*(rd7+s*(rd8+s*(rd9+s*(rd10
- +s*(rd11+s*(rd12+s*rd13))))))))))));
- y += rd0;
- } else if (ax >= 2) {
- R = rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(rb5+
- s*(rb6+s*(rb7+s*(rb8+s*(rb9+s*rb10)))))))));
- S = one+s*(sb1+s*(sb2+s*sb3));
- y += R/S;
- R = -.5*s;
- } else {
- R = rc0+s*(rc1+s*(rc2+s*(rc3+s*(rc4+s*(rc5+
- s*(rc6+s*(rc7+s*(rc8+s*(rc9+s*rc10)))))))));
- S = one+s*(sc1+s*(sc2+s*sc3));
- y += R/S;
- R = -.5*s;
- }
- /* return exp(-x^2 - lsqrtPI_hi + R + y)/x; */
- s = ((R + y) - lsqrtPI_hi) + z;
- y = (((z-s) - lsqrtPI_hi) + R) + y;
- r = __exp__D(s, y)/x;
- if (x>0)
- return r;
- else
- return two-r;
-}
diff --git a/lib/libm/common_source/exp.3 b/lib/libm/common_source/exp.3
deleted file mode 100644
index be7677c..0000000
--- a/lib/libm/common_source/exp.3
+++ /dev/null
@@ -1,284 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)exp.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt EXP 3
-.Os BSD 4
-.Sh NAME
-.Nm exp ,
-.Nm expm1 ,
-.Nm log ,
-.Nm log10 ,
-.Nm log1p ,
-.Nm pow
-.Nd exponential, logarithm, power functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn exp "double x"
-.Ft double
-.Fn expm1 "double x"
-.Ft double
-.Fn log "double x"
-.Ft double
-.Fn log10 "double x"
-.Ft double
-.Fn log1p "double x"
-.Ft double
-.Fn pow "double x" "double y"
-.Sh DESCRIPTION
-The
-.Fn exp
-function computes the exponential value of the given argument
-.Fa x .
-.Pp
-The
-.Fn expm1
-function computes the value exp(x)\-1 accurately even for tiny argument
-.Fa x .
-.Pp
-The
-.Fn log
-function computes the value for the natural logarithm of
-the argument x.
-.Pp
-The
-.Fn log10
-function computes the value for the logarithm of
-argument
-.Fa x
-to base 10.
-.Pp
-The
-.Fn log1p
-function computes
-the value of log(1+x) accurately even for tiny argument
-.Fa x .
-.Pp
-The
-.Fn pow
-computes the value
-of
-.Ar x
-to the exponent
-.Ar y .
-.Sh ERROR (due to Roundoff etc.)
-exp(x), log(x), expm1(x) and log1p(x) are accurate to within
-an
-.Em up ,
-and log10(x) to within about 2
-.Em ups ;
-an
-.Em up
-is one
-.Em Unit
-in the
-.Em Last
-.Em Place .
-The error in
-.Fn pow x y
-is below about 2
-.Em ups
-when its
-magnitude is moderate, but increases as
-.Fn pow x y
-approaches
-the over/underflow thresholds until almost as many bits could be
-lost as are occupied by the floating\-point format's exponent
-field; that is 8 bits for
-.Tn "VAX D"
-and 11 bits for IEEE 754 Double.
-No such drastic loss has been exposed by testing; the worst
-errors observed have been below 20
-.Em ups
-for
-.Tn "VAX D" ,
-300
-.Em ups
-for
-.Tn IEEE
-754 Double.
-Moderate values of
-.Fn pow
-are accurate enough that
-.Fn pow integer integer
-is exact until it is bigger than 2**56 on a
-.Tn VAX ,
-2**53 for
-.Tn IEEE
-754.
-.Sh RETURN VALUES
-These functions will return the appropriate computation unless an error
-occurs or an argument is out of range.
-The functions
-.Fn exp ,
-.Fn expm1
-and
-.Fn pow
-detect if the computed value will overflow,
-set the global variable
-.Va errno to
-.Er RANGE
-and cause a reserved operand fault on a
-.Tn VAX
-or
-.Tn Tahoe .
-The function
-.Fn pow x y
-checks to see if
-.Fa x
-< 0 and
-.Fa y
-is not an integer, in the event this is true,
-the global variable
-.Va errno
-is set to
-.Er EDOM
-and on the
-.Tn VAX
-and
-.Tn Tahoe
-generate a reserved operand fault.
-On a
-.Tn VAX
-and
-.Tn Tahoe ,
-.Va errno
-is set to
-.Er EDOM
-and the reserved operand is returned
-by log unless
-.Fa x
-> 0, by
-.Fn log1p
-unless
-.Fa x
-> \-1.
-.Sh NOTES
-The functions exp(x)\-1 and log(1+x) are called
-expm1 and logp1 in
-.Tn BASIC
-on the Hewlett\-Packard
-.Tn HP Ns \-71B
-and
-.Tn APPLE
-Macintosh,
-.Tn EXP1
-and
-.Tn LN1
-in Pascal, exp1 and log1 in C
-on
-.Tn APPLE
-Macintoshes, where they have been provided to make
-sure financial calculations of ((1+x)**n\-1)/x, namely
-expm1(n\(**log1p(x))/x, will be accurate when x is tiny.
-They also provide accurate inverse hyperbolic functions.
-.Pp
-The function
-.Fn pow x 0
-returns x**0 = 1 for all x including x = 0,
-.if n \
-Infinity
-.if t \
-\(if
-(not found on a
-.Tn VAX ) ,
-and
-.Em NaN
-(the reserved
-operand on a
-.Tn VAX ) . Previous implementations of pow may
-have defined x**0 to be undefined in some or all of these
-cases. Here are reasons for returning x**0 = 1 always:
-.Bl -enum -width indent
-.It
-Any program that already tests whether x is zero (or
-infinite or \*(Na) before computing x**0 cannot care
-whether 0**0 = 1 or not. Any program that depends
-upon 0**0 to be invalid is dubious anyway since that
-expression's meaning and, if invalid, its consequences
-vary from one computer system to another.
-.It
-Some Algebra texts (e.g. Sigler's) define x**0 = 1 for
-all x, including x = 0.
-This is compatible with the convention that accepts a[0]
-as the value of polynomial
-.Bd -literal -offset indent
-p(x) = a[0]\(**x**0 + a[1]\(**x**1 + a[2]\(**x**2 +...+ a[n]\(**x**n
-.Ed
-.Pp
-at x = 0 rather than reject a[0]\(**0**0 as invalid.
-.It
-Analysts will accept 0**0 = 1 despite that x**y can
-approach anything or nothing as x and y approach 0
-independently.
-The reason for setting 0**0 = 1 anyway is this:
-.Bd -filled -offset indent
-If x(z) and y(z) are
-.Em any
-functions analytic (expandable
-in power series) in z around z = 0, and if there
-x(0) = y(0) = 0, then x(z)**y(z) \(-> 1 as z \(-> 0.
-.Ed
-.It
-If 0**0 = 1, then
-.if n \
-infinity**0 = 1/0**0 = 1 too; and
-.if t \
-\(if**0 = 1/0**0 = 1 too; and
-then \*(Na**0 = 1 too because x**0 = 1 for all finite
-and infinite x, i.e., independently of x.
-.El
-.Sh SEE ALSO
-.Xr infnan 3 ,
-.Xr math 3
-.Sh HISTORY
-A
-.Fn exp ,
-.Fn log
-and
-.Fn pow
-function
-appeared in
-.At v6 .
-A
-.Fn log10
-function
-appeared in
-.At v7 .
-The
-.Fn log1p
-and
-.Fn expm1
-functions appeared in
-.Bx 4.3 .
diff --git a/lib/libm/common_source/exp.c b/lib/libm/common_source/exp.c
deleted file mode 100644
index fa6ea75..0000000
--- a/lib/libm/common_source/exp.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)exp.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* EXP(X)
- * RETURN THE EXPONENTIAL OF X
- * DOUBLE PRECISION (IEEE 53 bits, VAX D FORMAT 56 BITS)
- * CODED IN C BY K.C. NG, 1/19/85;
- * REVISED BY K.C. NG on 2/6/85, 2/15/85, 3/7/85, 3/24/85, 4/16/85, 6/14/86.
- *
- * Required system supported functions:
- * scalb(x,n)
- * copysign(x,y)
- * finite(x)
- *
- * Method:
- * 1. Argument Reduction: given the input x, find r and integer k such
- * that
- * x = k*ln2 + r, |r| <= 0.5*ln2 .
- * r will be represented as r := z+c for better accuracy.
- *
- * 2. Compute exp(r) by
- *
- * exp(r) = 1 + r + r*R1/(2-R1),
- * where
- * R1 = x - x^2*(p1+x^2*(p2+x^2*(p3+x^2*(p4+p5*x^2)))).
- *
- * 3. exp(x) = 2^k * exp(r) .
- *
- * Special cases:
- * exp(INF) is INF, exp(NaN) is NaN;
- * exp(-INF)= 0;
- * for finite argument, only exp(0)=1 is exact.
- *
- * Accuracy:
- * exp(x) returns the exponential of x nearly rounded. In a test run
- * with 1,156,000 random arguments on a VAX, the maximum observed
- * error was 0.869 ulps (units in the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(ln2hi, 6.9314718055829871446E-1 ,7217,4031,0000,f7d0, 0, .B17217F7D00000)
-vc(ln2lo, 1.6465949582897081279E-12 ,bcd5,2ce7,d9cc,e4f1, -39, .E7BCD5E4F1D9CC)
-vc(lnhuge, 9.4961163736712506989E1 ,ec1d,43bd,9010,a73e, 7, .BDEC1DA73E9010)
-vc(lntiny,-9.5654310917272452386E1 ,4f01,c3bf,33af,d72e, 7,-.BF4F01D72E33AF)
-vc(invln2, 1.4426950408889634148E0 ,aa3b,40b8,17f1,295c, 1, .B8AA3B295C17F1)
-vc(p1, 1.6666666666666602251E-1 ,aaaa,3f2a,a9f1,aaaa, -2, .AAAAAAAAAAA9F1)
-vc(p2, -2.7777777777015591216E-3 ,0b60,bc36,ec94,b5f5, -8,-.B60B60B5F5EC94)
-vc(p3, 6.6137563214379341918E-5 ,b355,398a,f15f,792e, -13, .8AB355792EF15F)
-vc(p4, -1.6533902205465250480E-6 ,ea0e,b6dd,5f84,2e93, -19,-.DDEA0E2E935F84)
-vc(p5, 4.1381367970572387085E-8 ,bb4b,3431,2683,95f5, -24, .B1BB4B95F52683)
-
-#ifdef vccast
-#define ln2hi vccast(ln2hi)
-#define ln2lo vccast(ln2lo)
-#define lnhuge vccast(lnhuge)
-#define lntiny vccast(lntiny)
-#define invln2 vccast(invln2)
-#define p1 vccast(p1)
-#define p2 vccast(p2)
-#define p3 vccast(p3)
-#define p4 vccast(p4)
-#define p5 vccast(p5)
-#endif
-
-ic(p1, 1.6666666666666601904E-1, -3, 1.555555555553E)
-ic(p2, -2.7777777777015593384E-3, -9, -1.6C16C16BEBD93)
-ic(p3, 6.6137563214379343612E-5, -14, 1.1566AAF25DE2C)
-ic(p4, -1.6533902205465251539E-6, -20, -1.BBD41C5D26BF1)
-ic(p5, 4.1381367970572384604E-8, -25, 1.6376972BEA4D0)
-ic(ln2hi, 6.9314718036912381649E-1, -1, 1.62E42FEE00000)
-ic(ln2lo, 1.9082149292705877000E-10,-33, 1.A39EF35793C76)
-ic(lnhuge, 7.1602103751842355450E2, 9, 1.6602B15B7ECF2)
-ic(lntiny,-7.5137154372698068983E2, 9, -1.77AF8EBEAE354)
-ic(invln2, 1.4426950408889633870E0, 0, 1.71547652B82FE)
-
-double exp(x)
-double x;
-{
- double z,hi,lo,c;
- int k;
-
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- if( x <= lnhuge ) {
- if( x >= lntiny ) {
-
- /* argument reduction : x --> x - k*ln2 */
-
- k=invln2*x+copysign(0.5,x); /* k=NINT(x/ln2) */
-
- /* express x-k*ln2 as hi-lo and let x=hi-lo rounded */
-
- hi=x-k*ln2hi;
- x=hi-(lo=k*ln2lo);
-
- /* return 2^k*[1+x+x*c/(2+c)] */
- z=x*x;
- c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5))));
- return scalb(1.0+(hi-(lo-(x*c)/(2.0-c))),k);
-
- }
- /* end of x > lntiny */
-
- else
- /* exp(-big#) underflows to zero */
- if(finite(x)) return(scalb(1.0,-5000));
-
- /* exp(-INF) is zero */
- else return(0.0);
- }
- /* end of x < lnhuge */
-
- else
- /* exp(INF) is INF, exp(+big#) overflows to INF */
- return( finite(x) ? scalb(1.0,5000) : x);
-}
-
-/* returns exp(r = x + c) for |c| < |x| with no overlap. */
-
-double __exp__D(x, c)
-double x, c;
-{
- double z,hi,lo, t;
- int k;
-
-#if !defined(vax)&&!defined(tahoe)
- if (x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- if ( x <= lnhuge ) {
- if ( x >= lntiny ) {
-
- /* argument reduction : x --> x - k*ln2 */
- z = invln2*x;
- k = z + copysign(.5, x);
-
- /* express (x+c)-k*ln2 as hi-lo and let x=hi-lo rounded */
-
- hi=(x-k*ln2hi); /* Exact. */
- x= hi - (lo = k*ln2lo-c);
- /* return 2^k*[1+x+x*c/(2+c)] */
- z=x*x;
- c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5))));
- c = (x*c)/(2.0-c);
-
- return scalb(1.+(hi-(lo - c)), k);
- }
- /* end of x > lntiny */
-
- else
- /* exp(-big#) underflows to zero */
- if(finite(x)) return(scalb(1.0,-5000));
-
- /* exp(-INF) is zero */
- else return(0.0);
- }
- /* end of x < lnhuge */
-
- else
- /* exp(INF) is INF, exp(+big#) overflows to INF */
- return( finite(x) ? scalb(1.0,5000) : x);
-}
diff --git a/lib/libm/common_source/exp__E.c b/lib/libm/common_source/exp__E.c
deleted file mode 100644
index 16ec4cbb..0000000
--- a/lib/libm/common_source/exp__E.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)exp__E.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* exp__E(x,c)
- * ASSUMPTION: c << x SO THAT fl(x+c)=x.
- * (c is the correction term for x)
- * exp__E RETURNS
- *
- * / exp(x+c) - 1 - x , 1E-19 < |x| < .3465736
- * exp__E(x,c) = |
- * \ 0 , |x| < 1E-19.
- *
- * DOUBLE PRECISION (IEEE 53 bits, VAX D FORMAT 56 BITS)
- * KERNEL FUNCTION OF EXP, EXPM1, POW FUNCTIONS
- * CODED IN C BY K.C. NG, 1/31/85;
- * REVISED BY K.C. NG on 3/16/85, 4/16/85.
- *
- * Required system supported function:
- * copysign(x,y)
- *
- * Method:
- * 1. Rational approximation. Let r=x+c.
- * Based on
- * 2 * sinh(r/2)
- * exp(r) - 1 = ---------------------- ,
- * cosh(r/2) - sinh(r/2)
- * exp__E(r) is computed using
- * x*x (x/2)*W - ( Q - ( 2*P + x*P ) )
- * --- + (c + x*[---------------------------------- + c ])
- * 2 1 - W
- * where P := p1*x^2 + p2*x^4,
- * Q := q1*x^2 + q2*x^4 (for 56 bits precision, add q3*x^6)
- * W := x/2-(Q-x*P),
- *
- * (See the listing below for the values of p1,p2,q1,q2,q3. The poly-
- * nomials P and Q may be regarded as the approximations to sinh
- * and cosh :
- * sinh(r/2) = r/2 + r * P , cosh(r/2) = 1 + Q . )
- *
- * The coefficients were obtained by a special Remez algorithm.
- *
- * Approximation error:
- *
- * | exp(x) - 1 | 2**(-57), (IEEE double)
- * | ------------ - (exp__E(x,0)+x)/x | <=
- * | x | 2**(-69). (VAX D)
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(p1, 1.5150724356786683059E-2 ,3abe,3d78,066a,67e1, -6, .F83ABE67E1066A)
-vc(p2, 6.3112487873718332688E-5 ,5b42,3984,0173,48cd, -13, .845B4248CD0173)
-vc(q1, 1.1363478204690669916E-1 ,b95a,3ee8,ec45,44a2, -3, .E8B95A44A2EC45)
-vc(q2, 1.2624568129896839182E-3 ,7905,3ba5,f5e7,72e4, -9, .A5790572E4F5E7)
-vc(q3, 1.5021856115869022674E-6 ,9eb4,36c9,c395,604a, -19, .C99EB4604AC395)
-
-ic(p1, 1.3887401997267371720E-2, -7, 1.C70FF8B3CC2CF)
-ic(p2, 3.3044019718331897649E-5, -15, 1.15317DF4526C4)
-ic(q1, 1.1110813732786649355E-1, -4, 1.C719538248597)
-ic(q2, 9.9176615021572857300E-4, -10, 1.03FC4CB8C98E8)
-
-#ifdef vccast
-#define p1 vccast(p1)
-#define p2 vccast(p2)
-#define q1 vccast(q1)
-#define q2 vccast(q2)
-#define q3 vccast(q3)
-#endif
-
-double __exp__E(x,c)
-double x,c;
-{
- const static double zero=0.0, one=1.0, half=1.0/2.0, small=1.0E-19;
- double z,p,q,xp,xh,w;
- if(copysign(x,one)>small) {
- z = x*x ;
- p = z*( p1 +z* p2 );
-#if defined(vax)||defined(tahoe)
- q = z*( q1 +z*( q2 +z* q3 ));
-#else /* defined(vax)||defined(tahoe) */
- q = z*( q1 +z* q2 );
-#endif /* defined(vax)||defined(tahoe) */
- xp= x*p ;
- xh= x*half ;
- w = xh-(q-xp) ;
- p = p+p;
- c += x*((xh*w-(q-(p+xp)))/(one-w)+c);
- return(z*half+c);
- }
- /* end of |x| > small */
-
- else {
- if(x!=zero) one+small; /* raise the inexact flag */
- return(copysign(zero,x));
- }
-}
diff --git a/lib/libm/common_source/expm1.c b/lib/libm/common_source/expm1.c
deleted file mode 100644
index 8a84f14..0000000
--- a/lib/libm/common_source/expm1.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)expm1.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* EXPM1(X)
- * RETURN THE EXPONENTIAL OF X MINUS ONE
- * DOUBLE PRECISION (IEEE 53 BITS, VAX D FORMAT 56 BITS)
- * CODED IN C BY K.C. NG, 1/19/85;
- * REVISED BY K.C. NG on 2/6/85, 3/7/85, 3/21/85, 4/16/85.
- *
- * Required system supported functions:
- * scalb(x,n)
- * copysign(x,y)
- * finite(x)
- *
- * Kernel function:
- * exp__E(x,c)
- *
- * Method:
- * 1. Argument Reduction: given the input x, find r and integer k such
- * that
- * x = k*ln2 + r, |r| <= 0.5*ln2 .
- * r will be represented as r := z+c for better accuracy.
- *
- * 2. Compute EXPM1(r)=exp(r)-1 by
- *
- * EXPM1(r=z+c) := z + exp__E(z,c)
- *
- * 3. EXPM1(x) = 2^k * ( EXPM1(r) + 1-2^-k ).
- *
- * Remarks:
- * 1. When k=1 and z < -0.25, we use the following formula for
- * better accuracy:
- * EXPM1(x) = 2 * ( (z+0.5) + exp__E(z,c) )
- * 2. To avoid rounding error in 1-2^-k where k is large, we use
- * EXPM1(x) = 2^k * { [z+(exp__E(z,c)-2^-k )] + 1 }
- * when k>56.
- *
- * Special cases:
- * EXPM1(INF) is INF, EXPM1(NaN) is NaN;
- * EXPM1(-INF)= -1;
- * for finite argument, only EXPM1(0)=0 is exact.
- *
- * Accuracy:
- * EXPM1(x) returns the exact (exp(x)-1) nearly rounded. In a test run with
- * 1,166,000 random arguments on a VAX, the maximum observed error was
- * .872 ulps (units of the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(ln2hi, 6.9314718055829871446E-1 ,7217,4031,0000,f7d0, 0, .B17217F7D00000)
-vc(ln2lo, 1.6465949582897081279E-12 ,bcd5,2ce7,d9cc,e4f1, -39, .E7BCD5E4F1D9CC)
-vc(lnhuge, 9.4961163736712506989E1 ,ec1d,43bd,9010,a73e, 7, .BDEC1DA73E9010)
-vc(invln2, 1.4426950408889634148E0 ,aa3b,40b8,17f1,295c, 1, .B8AA3B295C17F1)
-
-ic(ln2hi, 6.9314718036912381649E-1, -1, 1.62E42FEE00000)
-ic(ln2lo, 1.9082149292705877000E-10, -33, 1.A39EF35793C76)
-ic(lnhuge, 7.1602103751842355450E2, 9, 1.6602B15B7ECF2)
-ic(invln2, 1.4426950408889633870E0, 0, 1.71547652B82FE)
-
-#ifdef vccast
-#define ln2hi vccast(ln2hi)
-#define ln2lo vccast(ln2lo)
-#define lnhuge vccast(lnhuge)
-#define invln2 vccast(invln2)
-#endif
-
-double expm1(x)
-double x;
-{
- const static double one=1.0, half=1.0/2.0;
- double z,hi,lo,c;
- int k;
-#if defined(vax)||defined(tahoe)
- static prec=56;
-#else /* defined(vax)||defined(tahoe) */
- static prec=53;
-#endif /* defined(vax)||defined(tahoe) */
-
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
-
- if( x <= lnhuge ) {
- if( x >= -40.0 ) {
-
- /* argument reduction : x - k*ln2 */
- k= invln2 *x+copysign(0.5,x); /* k=NINT(x/ln2) */
- hi=x-k*ln2hi ;
- z=hi-(lo=k*ln2lo);
- c=(hi-z)-lo;
-
- if(k==0) return(z+__exp__E(z,c));
- if(k==1)
- if(z< -0.25)
- {x=z+half;x +=__exp__E(z,c); return(x+x);}
- else
- {z+=__exp__E(z,c); x=half+z; return(x+x);}
- /* end of k=1 */
-
- else {
- if(k<=prec)
- { x=one-scalb(one,-k); z += __exp__E(z,c);}
- else if(k<100)
- { x = __exp__E(z,c)-scalb(one,-k); x+=z; z=one;}
- else
- { x = __exp__E(z,c)+z; z=one;}
-
- return (scalb(x+z,k));
- }
- }
- /* end of x > lnunfl */
-
- else
- /* expm1(-big#) rounded to -1 (inexact) */
- if(finite(x))
- { ln2hi+ln2lo; return(-one);}
-
- /* expm1(-INF) is -1 */
- else return(-one);
- }
- /* end of x < lnhuge */
-
- else
- /* expm1(INF) is INF, expm1(+big#) overflows to INF */
- return( finite(x) ? scalb(one,5000) : x);
-}
diff --git a/lib/libm/common_source/fabs.3 b/lib/libm/common_source/fabs.3
deleted file mode 100644
index 82704f1..0000000
--- a/lib/libm/common_source/fabs.3
+++ /dev/null
@@ -1,66 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" @(#)fabs.3 8.1 (Berkeley) 6/4/93
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fabs.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FABS 3
-.Os
-.Sh NAME
-.Nm fabs
-.Nd floating-point absolute value function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn fabs "double x"
-.Sh DESCRIPTION
-The
-.Fn fabs
-function computes the absolute value of a floating-point number
-.Fa x .
-.Sh RETURN VALUES
-The
-.Fn fabs
-function returns the absolute value of
-.Fa x .
-.Sh SEE ALSO
-.Xr abs 3 ,
-.Xr ceil 3 ,
-.Xr floor 3 ,
-.Xr ieee 3 ,
-.Xr math 3 ,
-.Xr rint 3
-.Sh STANDARDS
-The
-.Fn fabs
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/floor.3 b/lib/libm/common_source/floor.3
deleted file mode 100644
index 2aed79d..0000000
--- a/lib/libm/common_source/floor.3
+++ /dev/null
@@ -1,65 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)floor.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FLOOR 3
-.Os
-.Sh NAME
-.Nm floor
-.Nd largest integral value less than or equal to x
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn floor "double x"
-.Sh DESCRIPTION
-The
-.Fn floor
-function computes the largest integral value less than or equal to
-.Fa x .
-.Sh RETURN VALUES
-The
-.Fn floor
-function returns the largest integral value
-expressed as a double.
-.Sh SEE ALSO
-.Xr abs 3 ,
-.Xr fabs 3 ,
-.Xr floor 3 ,
-.Xr ieee 3 ,
-.Xr math 3 ,
-.Xr rint 3
-.Sh STANDARDS
-The
-.Fn floor
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/floor.c b/lib/libm/common_source/floor.c
deleted file mode 100644
index 5990067..0000000
--- a/lib/libm/common_source/floor.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)floor.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include "mathimpl.h"
-
-vc(L, 4503599627370496.0E0 ,0000,5c00,0000,0000, 55, 1.0) /* 2**55 */
-
-ic(L, 4503599627370496.0E0, 52, 1.0) /* 2**52 */
-
-#ifdef vccast
-#define L vccast(L)
-#endif
-
-/*
- * floor(x) := the largest integer no larger than x;
- * ceil(x) := -floor(-x), for all real x.
- *
- * Note: Inexact will be signaled if x is not an integer, as is
- * customary for IEEE 754. No other signal can be emitted.
- */
-double
-floor(x)
-double x;
-{
- volatile double y;
-
- if (
-#if !defined(vax)&&!defined(tahoe)
- x != x || /* NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- x >= L) /* already an even integer */
- return x;
- else if (x < (double)0)
- return -ceil(-x);
- else { /* now 0 <= x < L */
- y = L+x; /* destructive store must be forced */
- y -= L; /* an integer, and |x-y| < 1 */
- return x < y ? y-(double)1 : y;
- }
-}
-
-double
-ceil(x)
-double x;
-{
- volatile double y;
-
- if (
-#if !defined(vax)&&!defined(tahoe)
- x != x || /* NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- x >= L) /* already an even integer */
- return x;
- else if (x < (double)0)
- return -floor(-x);
- else { /* now 0 <= x < L */
- y = L+x; /* destructive store must be forced */
- y -= L; /* an integer, and |x-y| < 1 */
- return x > y ? y+(double)1 : y;
- }
-}
-
-#ifndef ns32000 /* rint() is in ./NATIONAL/support.s */
-/*
- * algorithm for rint(x) in pseudo-pascal form ...
- *
- * real rint(x): real x;
- * ... delivers integer nearest x in direction of prevailing rounding
- * ... mode
- * const L = (last consecutive integer)/2
- * = 2**55; for VAX D
- * = 2**52; for IEEE 754 Double
- * real s,t;
- * begin
- * if x != x then return x; ... NaN
- * if |x| >= L then return x; ... already an integer
- * s := copysign(L,x);
- * t := x + s; ... = (x+s) rounded to integer
- * return t - s
- * end;
- *
- * Note: Inexact will be signaled if x is not an integer, as is
- * customary for IEEE 754. No other signal can be emitted.
- */
-double
-rint(x)
-double x;
-{
- double s;
- volatile double t;
- const double one = 1.0;
-
-#if !defined(vax)&&!defined(tahoe)
- if (x != x) /* NaN */
- return (x);
-#endif /* !defined(vax)&&!defined(tahoe) */
- if (copysign(x,one) >= L) /* already an integer */
- return (x);
- s = copysign(L,x);
- t = x + s; /* x+s rounded to integer */
- return (t - s);
-}
-#endif /* not national */
diff --git a/lib/libm/common_source/fmod.3 b/lib/libm/common_source/fmod.3
deleted file mode 100644
index d22420a..0000000
--- a/lib/libm/common_source/fmod.3
+++ /dev/null
@@ -1,75 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)fmod.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt FMOD 3
-.Os
-.Sh NAME
-.Nm fmod
-.Nd floating-point remainder function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn fmod "double x" "double y"
-.Sh DESCRIPTION
-The
-.Fn fmod
-function computes the floating-point remainder of
-.Fa x Ns / Fa y .
-.Sh RETURN VALUES
-The
-.Fn fmod
-function returns the value
-.Sm off
-.Fa x - Em i * Fa y ,
-.Sm on
-for some integer
-.Em i
-such that, if
-.Fa y
-is non-zero, the result has the same sign as
-.Fa x
-and magnitude less than the magnitude of
-.Fa y .
-If
-.Fa y
-is zero, whether a domain error occurs or the
-.Fn fmod
-function returns zero is implementation-defined.
-.Sh SEE ALSO
-.Xr math 3
-.Sh STANDARDS
-The
-.Fn fmod
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/fmod.c b/lib/libm/common_source/fmod.c
deleted file mode 100644
index 09a31b2..0000000
--- a/lib/libm/common_source/fmod.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)fmod.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* fmod.c
- *
- * SYNOPSIS
- *
- * #include <math.h>
- * double fmod(double x, double y)
- *
- * DESCRIPTION
- *
- * The fmod function computes the floating-point remainder of x/y.
- *
- * RETURNS
- *
- * The fmod function returns the value x-i*y, for some integer i
- * such that, if y is nonzero, the result has the same sign as x and
- * magnitude less than the magnitude of y.
- *
- * On a VAX or CCI,
- *
- * fmod(x,0) traps/faults on floating-point divided-by-zero.
- *
- * On IEEE-754 conforming machines with "isnan()" primitive,
- *
- * fmod(x,0), fmod(INF,y) are invalid operations and NaN is returned.
- *
- */
-#if !defined(vax) && !defined(tahoe)
-extern int isnan(),finite();
-#endif /* !defined(vax) && !defined(tahoe) */
-extern double frexp(),ldexp(),fabs();
-
-#ifdef TEST_FMOD
-static double
-_fmod(x,y)
-#else /* TEST_FMOD */
-double
-fmod(x,y)
-#endif /* TEST_FMOD */
-double x,y;
-{
- int ir,iy;
- double r,w;
-
- if (y == (double)0
-#if !defined(vax) && !defined(tahoe) /* per "fmod" manual entry, SunOS 4.0 */
- || isnan(y) || !finite(x)
-#endif /* !defined(vax) && !defined(tahoe) */
- )
- return (x*y)/(x*y);
-
- r = fabs(x);
- y = fabs(y);
- (void)frexp(y,&iy);
- while (r >= y) {
- (void)frexp(r,&ir);
- w = ldexp(y,ir-iy);
- r -= w <= r ? w : w*(double)0.5;
- }
- return x >= (double)0 ? r : -r;
-}
-
-#ifdef TEST_FMOD
-extern long random();
-extern double fmod();
-
-#define NTEST 10000
-#define NCASES 3
-
-static int nfail = 0;
-
-static void
-doit(x,y)
-double x,y;
-{
- double ro = fmod(x,y),rn = _fmod(x,y);
- if (ro != rn) {
- (void)printf(" x = 0x%08.8x %08.8x (%24.16e)\n",x,x);
- (void)printf(" y = 0x%08.8x %08.8x (%24.16e)\n",y,y);
- (void)printf(" fmod = 0x%08.8x %08.8x (%24.16e)\n",ro,ro);
- (void)printf("_fmod = 0x%08.8x %08.8x (%24.16e)\n",rn,rn);
- (void)printf("\n");
- }
-}
-
-main()
-{
- register int i,cases;
- double x,y;
-
- srandom(12345);
- for (i = 0; i < NTEST; i++) {
- x = (double)random();
- y = (double)random();
- for (cases = 0; cases < NCASES; cases++) {
- switch (cases) {
- case 0:
- break;
- case 1:
- y = (double)1/y; break;
- case 2:
- x = (double)1/x; break;
- default:
- abort(); break;
- }
- doit(x,y);
- doit(x,-y);
- doit(-x,y);
- doit(-x,-y);
- }
- }
- if (nfail)
- (void)printf("Number of failures: %d (out of a total of %d)\n",
- nfail,NTEST*NCASES*4);
- else
- (void)printf("No discrepancies were found\n");
- exit(0);
-}
-#endif /* TEST_FMOD */
diff --git a/lib/libm/common_source/gamma.c b/lib/libm/common_source/gamma.c
deleted file mode 100644
index 5d270f0..0000000
--- a/lib/libm/common_source/gamma.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)gamma.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/*
- * This code by P. McIlroy, Oct 1992;
- *
- * The financial support of UUNET Communications Services is greatfully
- * acknowledged.
- */
-
-#include <math.h>
-#include "mathimpl.h"
-#include <errno.h>
-
-/* METHOD:
- * x < 0: Use reflection formula, G(x) = pi/(sin(pi*x)*x*G(x))
- * At negative integers, return +Inf, and set errno.
- *
- * x < 6.5:
- * Use argument reduction G(x+1) = xG(x) to reach the
- * range [1.066124,2.066124]. Use a rational
- * approximation centered at the minimum (x0+1) to
- * ensure monotonicity.
- *
- * x >= 6.5: Use the asymptotic approximation (Stirling's formula)
- * adjusted for equal-ripples:
- *
- * log(G(x)) ~= (x-.5)*(log(x)-1) + .5(log(2*pi)-1) + 1/x*P(1/(x*x))
- *
- * Keep extra precision in multiplying (x-.5)(log(x)-1), to
- * avoid premature round-off.
- *
- * Special values:
- * non-positive integer: Set overflow trap; return +Inf;
- * x > 171.63: Set overflow trap; return +Inf;
- * NaN: Set invalid trap; return NaN
- *
- * Accuracy: Gamma(x) is accurate to within
- * x > 0: error provably < 0.9ulp.
- * Maximum observed in 1,000,000 trials was .87ulp.
- * x < 0:
- * Maximum observed error < 4ulp in 1,000,000 trials.
- */
-
-static double neg_gam __P((double));
-static double small_gam __P((double));
-static double smaller_gam __P((double));
-static struct Double large_gam __P((double));
-static struct Double ratfun_gam __P((double, double));
-
-/*
- * Rational approximation, A0 + x*x*P(x)/Q(x), on the interval
- * [1.066.., 2.066..] accurate to 4.25e-19.
- */
-#define LEFT -.3955078125 /* left boundary for rat. approx */
-#define x0 .461632144968362356785 /* xmin - 1 */
-
-#define a0_hi 0.88560319441088874992
-#define a0_lo -.00000000000000004996427036469019695
-#define P0 6.21389571821820863029017800727e-01
-#define P1 2.65757198651533466104979197553e-01
-#define P2 5.53859446429917461063308081748e-03
-#define P3 1.38456698304096573887145282811e-03
-#define P4 2.40659950032711365819348969808e-03
-#define Q0 1.45019531250000000000000000000e+00
-#define Q1 1.06258521948016171343454061571e+00
-#define Q2 -2.07474561943859936441469926649e-01
-#define Q3 -1.46734131782005422506287573015e-01
-#define Q4 3.07878176156175520361557573779e-02
-#define Q5 5.12449347980666221336054633184e-03
-#define Q6 -1.76012741431666995019222898833e-03
-#define Q7 9.35021023573788935372153030556e-05
-#define Q8 6.13275507472443958924745652239e-06
-/*
- * Constants for large x approximation (x in [6, Inf])
- * (Accurate to 2.8*10^-19 absolute)
- */
-#define lns2pi_hi 0.418945312500000
-#define lns2pi_lo -.000006779295327258219670263595
-#define Pa0 8.33333333333333148296162562474e-02
-#define Pa1 -2.77777777774548123579378966497e-03
-#define Pa2 7.93650778754435631476282786423e-04
-#define Pa3 -5.95235082566672847950717262222e-04
-#define Pa4 8.41428560346653702135821806252e-04
-#define Pa5 -1.89773526463879200348872089421e-03
-#define Pa6 5.69394463439411649408050664078e-03
-#define Pa7 -1.44705562421428915453880392761e-02
-
-static const double zero = 0., one = 1.0, tiny = 1e-300;
-static int endian;
-/*
- * TRUNC sets trailing bits in a floating-point number to zero.
- * is a temporary variable.
- */
-#if defined(vax) || defined(tahoe)
-#define _IEEE 0
-#define TRUNC(x) x = (double) (float) (x)
-#else
-#define _IEEE 1
-#define TRUNC(x) *(((int *) &x) + endian) &= 0xf8000000
-#define infnan(x) 0.0
-#endif
-
-double
-gamma(x)
- double x;
-{
- struct Double u;
- endian = (*(int *) &one) ? 1 : 0;
-
- if (x >= 6) {
- if(x > 171.63)
- return(one/zero);
- u = large_gam(x);
- return(__exp__D(u.a, u.b));
- } else if (x >= 1.0 + LEFT + x0)
- return (small_gam(x));
- else if (x > 1.e-17)
- return (smaller_gam(x));
- else if (x > -1.e-17) {
- if (x == 0.0)
- if (!_IEEE) return (infnan(ERANGE));
- else return (one/x);
- one+1e-20; /* Raise inexact flag. */
- return (one/x);
- } else if (!finite(x)) {
- if (_IEEE) /* x = NaN, -Inf */
- return (x*x);
- else
- return (infnan(EDOM));
- } else
- return (neg_gam(x));
-}
-/*
- * Accurate to max(ulp(1/128) absolute, 2^-66 relative) error.
- */
-static struct Double
-large_gam(x)
- double x;
-{
- double z, p;
- int i;
- struct Double t, u, v;
-
- z = one/(x*x);
- p = Pa0+z*(Pa1+z*(Pa2+z*(Pa3+z*(Pa4+z*(Pa5+z*(Pa6+z*Pa7))))));
- p = p/x;
-
- u = __log__D(x);
- u.a -= one;
- v.a = (x -= .5);
- TRUNC(v.a);
- v.b = x - v.a;
- t.a = v.a*u.a; /* t = (x-.5)*(log(x)-1) */
- t.b = v.b*u.a + x*u.b;
- /* return t.a + t.b + lns2pi_hi + lns2pi_lo + p */
- t.b += lns2pi_lo; t.b += p;
- u.a = lns2pi_hi + t.b; u.a += t.a;
- u.b = t.a - u.a;
- u.b += lns2pi_hi; u.b += t.b;
- return (u);
-}
-/*
- * Good to < 1 ulp. (provably .90 ulp; .87 ulp on 1,000,000 runs.)
- * It also has correct monotonicity.
- */
-static double
-small_gam(x)
- double x;
-{
- double y, ym1, t, x1;
- struct Double yy, r;
- y = x - one;
- ym1 = y - one;
- if (y <= 1.0 + (LEFT + x0)) {
- yy = ratfun_gam(y - x0, 0);
- return (yy.a + yy.b);
- }
- r.a = y;
- TRUNC(r.a);
- yy.a = r.a - one;
- y = ym1;
- yy.b = r.b = y - yy.a;
- /* Argument reduction: G(x+1) = x*G(x) */
- for (ym1 = y-one; ym1 > LEFT + x0; y = ym1--, yy.a--) {
- t = r.a*yy.a;
- r.b = r.a*yy.b + y*r.b;
- r.a = t;
- TRUNC(r.a);
- r.b += (t - r.a);
- }
- /* Return r*gamma(y). */
- yy = ratfun_gam(y - x0, 0);
- y = r.b*(yy.a + yy.b) + r.a*yy.b;
- y += yy.a*r.a;
- return (y);
-}
-/*
- * Good on (0, 1+x0+LEFT]. Accurate to 1ulp.
- */
-static double
-smaller_gam(x)
- double x;
-{
- double t, d;
- struct Double r, xx;
- if (x < x0 + LEFT) {
- t = x, TRUNC(t);
- d = (t+x)*(x-t);
- t *= t;
- xx.a = (t + x), TRUNC(xx.a);
- xx.b = x - xx.a; xx.b += t; xx.b += d;
- t = (one-x0); t += x;
- d = (one-x0); d -= t; d += x;
- x = xx.a + xx.b;
- } else {
- xx.a = x, TRUNC(xx.a);
- xx.b = x - xx.a;
- t = x - x0;
- d = (-x0 -t); d += x;
- }
- r = ratfun_gam(t, d);
- d = r.a/x, TRUNC(d);
- r.a -= d*xx.a; r.a -= d*xx.b; r.a += r.b;
- return (d + r.a/x);
-}
-/*
- * returns (z+c)^2 * P(z)/Q(z) + a0
- */
-static struct Double
-ratfun_gam(z, c)
- double z, c;
-{
- int i;
- double p, q;
- struct Double r, t;
-
- q = Q0 +z*(Q1+z*(Q2+z*(Q3+z*(Q4+z*(Q5+z*(Q6+z*(Q7+z*Q8)))))));
- p = P0 + z*(P1 + z*(P2 + z*(P3 + z*P4)));
-
- /* return r.a + r.b = a0 + (z+c)^2*p/q, with r.a truncated to 26 bits. */
- p = p/q;
- t.a = z, TRUNC(t.a); /* t ~= z + c */
- t.b = (z - t.a) + c;
- t.b *= (t.a + z);
- q = (t.a *= t.a); /* t = (z+c)^2 */
- TRUNC(t.a);
- t.b += (q - t.a);
- r.a = p, TRUNC(r.a); /* r = P/Q */
- r.b = p - r.a;
- t.b = t.b*p + t.a*r.b + a0_lo;
- t.a *= r.a; /* t = (z+c)^2*(P/Q) */
- r.a = t.a + a0_hi, TRUNC(r.a);
- r.b = ((a0_hi-r.a) + t.a) + t.b;
- return (r); /* r = a0 + t */
-}
-
-static double
-neg_gam(x)
- double x;
-{
- int sgn = 1;
- struct Double lg, lsine;
- double y, z;
-
- y = floor(x + .5);
- if (y == x) /* Negative integer. */
- if(!_IEEE)
- return (infnan(ERANGE));
- else
- return (one/zero);
- z = fabs(x - y);
- y = .5*ceil(x);
- if (y == ceil(y))
- sgn = -1;
- if (z < .25)
- z = sin(M_PI*z);
- else
- z = cos(M_PI*(0.5-z));
- /* Special case: G(1-x) = Inf; G(x) may be nonzero. */
- if (x < -170) {
- if (x < -190)
- return ((double)sgn*tiny*tiny);
- y = one - x; /* exact: 128 < |x| < 255 */
- lg = large_gam(y);
- lsine = __log__D(M_PI/z); /* = TRUNC(log(u)) + small */
- lg.a -= lsine.a; /* exact (opposite signs) */
- lg.b -= lsine.b;
- y = -(lg.a + lg.b);
- z = (y + lg.a) + lg.b;
- y = __exp__D(y, z);
- if (sgn < 0) y = -y;
- return (y);
- }
- y = one-x;
- if (one-y == x)
- y = gamma(y);
- else /* 1-x is inexact */
- y = -x*gamma(-x);
- if (sgn < 0) y = -y;
- return (M_PI / (y*z));
-}
diff --git a/lib/libm/common_source/hypot.3 b/lib/libm/common_source/hypot.3
deleted file mode 100644
index 3a1de9a..0000000
--- a/lib/libm/common_source/hypot.3
+++ /dev/null
@@ -1,124 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)hypot.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt HYPOT 3
-.Os BSD 4
-.Sh NAME
-.Nm hypot ,
-.Nm cabs
-.Nd euclidean distance and complex absolute value functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn hypot "double x" "double y"
-.Fd struct {double x, y;} z;
-.Ft double
-.Fn cabs z
-.Sh DESCRIPTION
-The
-.Fn hypot
-and
-.Fn cabs
-functions
-computes the
-sqrt(x*x+y*y)
-in such a way that underflow will not happen, and overflow
-occurs only if the final result deserves it.
-.Pp
-.Fn hypot "\*(If" "v"
-=
-.Fn hypot "v" "\*(If"
-= +\*(If for all
-.Ar v ,
-including \*(Na.
-.Sh ERROR (due to Roundoff, etc.)
-Below 0.97
-.Em ulps .
-Consequently
-.Fn hypot "5.0" "12.0"
-= 13.0
-exactly;
-in general, hypot and cabs return an integer whenever an
-integer might be expected.
-.Pp
-The same cannot be said for the shorter and faster version of hypot
-and cabs that is provided in the comments in cabs.c; its error can
-exceed 1.2
-.Em ulps .
-.Sh NOTES
-As might be expected,
-.Fn hypot "v" "\*(Na"
-and
-.Fn hypot "\*(Na" "v"
-are \*(Na for all
-.Em finite
-.Ar v ;
-with "reserved operand" in place of "\*(Na", the
-same is true on a
-.Tn VAX .
-But programmers on machines other than a
-.Tn VAX
-(if has no \*(If)
-might be surprised at first to discover that
-.Fn hypot "\(+-\*(If" "\*(Na"
-= +\*(If.
-This is intentional; it happens because
-.Fn hypot "\*(If" "v"
-= +\*(If
-for
-.Em all
-.Ar v ,
-finite or infinite.
-Hence
-.Fn hypot "\*(If" "v"
-is independent of
-.Ar v .
-Unlike the reserved operand fault on a
-.Tn VAX ,
-the
-.Tn IEEE
-\*(Na is designed to
-disappear when it turns out to be irrelevant, as it does in
-.Fn hypot "\*(If" "\*(Na" .
-.Sh SEE ALSO
-.Xr math 3 ,
-.Xr sqrt 3
-.Sh HISTORY
-Both a
-.Fn hypot
-function and a
-.Fn cabs
-function
-appeared in
-.At v7 .
diff --git a/lib/libm/common_source/ieee.3 b/lib/libm/common_source/ieee.3
deleted file mode 100644
index 432f7a0..0000000
--- a/lib/libm/common_source/ieee.3
+++ /dev/null
@@ -1,267 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)ieee.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt IEEE 3
-.Os BSD 4.3
-.Sh NAME
-.Nm copysign ,
-.Nm drem ,
-.Nm finite ,
-.Nm logb ,
-.Nm scalb
-.Nd "IEEE 754 floating point support
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn copysign "double x" "double y"
-.Ft double
-.Fn drem "double x" "double y"
-.Ft int
-.Fn finite "double x"
-.Ft double
-.Fn logb "double x"
-.Ft double
-.Fn scalb "double x" "int n"
-.Sh DESCRIPTION
-These functions are required for, or recommended by the
-.Tn IEEE
-standard
-754 for floating\-point arithmetic.
-.Pp
-The
-.Fn copysign
-function
-returns
-.Fa x
-with its sign changed to
-.Fa y Ns 's.
-.Pp
-The
-.Fn drem
-function
-returns the remainder
-.Fa r
-:=
-.Fa x
-\-
-.Fa n\(**y
-where
-.Fa n
-is the integer nearest the exact value of
-.Bk -words
-.Fa x Ns / Ns Fa y ;
-.Ek
-moreover if
-.Pf \\*(Ba Fa n
-\-
-.Sm off
-.Fa x No / Fa y No \\*(Ba
-.Sm on
-=
-1/2
-then
-.Fa n
-is even. Consequently
-the remainder is computed exactly and
-.Sm off
-.Pf \\*(Ba Fa r No \\*(Ba
-.Sm on
-\*(Le
-.Sm off
-.Pf \\*(Ba Fa y No \\*(Ba/2.
-.Sm on
-But
-.Fn drem x 0
-is exceptional.
-(See below under
-.Sx DIAGNOSTICS . )
-.Pp
-The
-.Fn finite
-function returns the value 1 just when
-\-\*(If \*(Lt
-.Fa x
-\*(Lt +\*(If;
-otherwise a
-zero is returned
-(when
-.Pf \\*(Ba Ns Fa x Ns \\*(Ba
-= \*(If or
-.Fa x
-is \*(Na or
-is the
-.Tn VAX Ns 's
-reserved operand).
-.Pp
-The
-.Fn logb
-function returns
-.Fa x Ns 's exponent
-.Fa n ,
-a signed integer converted to double\-precision floating\-point and so
-chosen that
-1 (<=
-.Pf \\*(Ba Ns Fa x Ns \\*(Ba2** Ns Fa n
-< 2
-unless
-.Fa x
-= 0 or
-(only on machines that conform to
-.Tn IEEE
-754)
-.Pf \\*(Ba Fa x Ns \\*(Ba
-= \*(If
-or
-.Fa x
-lies between 0 and the Underflow Threshold.
-(See below under
-.Sx BUGS . )
-.Pp
-The
-.Fn scalb
-function returns
-.Fa x Ns \(**(2** Ns Fa n )
-computed, for integer n, without first computing
-.Pf 2\(** Fa n .
-.Sh RETURN VALUES
-The
-.Tn IEEE
-standard
-754 defines
-.Fn drem x 0
-and
-.Fn drem \\*(If y
-to be invalid operations that produce a \*(Na.
-On the
-.Tn VAX ,
-.Fn drem x 0
-generates a reserved operand fault. No \*(If
-exists on a
-.Tn VAX .
-.Pp
-.Tn IEEE
-754 defines
-.if n \
-.Fn logb \(+-\\*(If
-= \*(If and
-.Fn logb 0
-= \-\*(If, and
-requires the latter to signal Division\-by\-Zero.
-But on a
-.Tn VAX ,
-.Fn logb 0
-= 1.0 \- 2.0**31 = \-2,147,483,647.0.
-And if the correct value of
-.Fn scalb
-would overflow on a
-.Tn VAX ,
-it generates a reserved operand fault and sets the global variable
-.Va errno
-to
-.Dv ERANGE .
-.Sh SEE ALSO
-.Xr floor 3 ,
-.Xr infnan 3 ,
-.Xr math 3
-.Sh HISTORY
-The
-.Nm ieee
-functions appeared in
-.Bx 4.3 .
-.Sh BUGS
-Should
-.Fn drem x 0
-and
-.Fn logb 0
-on a
-.Tn VAX
-signal invalidity
-by setting
-.Va errno No = Dv EDOM ?
-Should
-.Fn logb 0
-return \-1.7e38?
-.Pp
-.Tn IEEE
-754 currently specifies that
-.Fn logb "denormalized no."
-=
-.Fn logb "tiniest normalized no. > 0"
-but the consensus has changed to the specification in the new
-proposed
-.Tn IEEE
-standard p854, namely that
-.Fn logb x
-satisfy
-.Bd -filled -offset indent
-1 \(<=
-.Fn scalb \\*(Bax\\*(Ba \-logb(x)
-<
-Radix\0 ... = 2
-for
-.Tn IEEE
-754
-.Ed
-.Pp
-for every x except 0,
-\*(If
-and \*(Na.
-Almost every program that assumes 754's specification will work
-correctly if
-.Fn logb
-follows 854's specification instead.
-.Pp
-.Tn IEEE
-754 requires
-.Fn copysign x \\*(Na)
-=
-.Pf \(+- Ns Fa x
-but says nothing
-else about the sign of a \*(Na. A \*(Na
-.Em (N Ns ot
-.Em a
-.Em N Ns umber )
-is
-similar in spirit to the
-.Tn VAX Ns 's
-reserved operand, but very
-different in important details. Since the sign bit of a
-reserved operand makes it look negative,
-.Bd -filled -offset indent
-.Fn copysign x "reserved operand"
-=
-.Pf \- Fa x ;
-.Ed
-.Pp
-should this return the reserved operand instead?
diff --git a/lib/libm/common_source/infnan.3 b/lib/libm/common_source/infnan.3
deleted file mode 100644
index 6da38fd8..0000000
--- a/lib/libm/common_source/infnan.3
+++ /dev/null
@@ -1,180 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)infnan.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt INFNAN 3
-.Os BSD 4.3
-.Sh NAME
-.Nm infnan
-.Nd signals invalid floating\-point operations on a
-.Tn VAX
-(temporary)
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn infnan "int iarg"
-.Sh DESCRIPTION
-At some time in the future, some of the useful properties of
-the Infinities and \*(Nas in the
-.Tn IEEE
-standard 754 for Binary
-Floating\-Point Arithmetic will be simulated in
-.Tn UNIX
-on the
-.Tn DEC VAX
-by using its Reserved Operands. Meanwhile, the
-Invalid, Overflow and Divide\-by\-Zero exceptions of the
-.Tn IEEE
-standard are being approximated on a
-.Tn VAX
-by calls to a
-procedure
-.Fn infnan
-in appropriate places in
-.Xr libm 3 .
-When
-better exception\-handling is implemented in
-.Tn UNIX ,
-only
-.Fn infnan
-among the codes in
-.Xr libm
-will have to be changed.
-And users of
-.Xr libm
-can design their own
-.Fn infnan
-now to
-insulate themselves from future changes.
-.Pp
-Whenever an elementary function code in
-.Xr libm
-has to
-simulate one of the aforementioned
-.Tn IEEE
-exceptions, it calls
-.Fn infnan iarg
-with an appropriate value of
-.Fa iarg .
-Then a
-reserved operand fault stops computation. But
-.Fn infnan
-could
-be replaced by a function with the same name that returns
-some plausible value, assigns an apt value to the global
-variable
-.Va errno ,
-and allows computation to resume.
-Alternatively, the Reserved Operand Fault Handler could be
-changed to respond by returning that plausible value, etc.
-instead of aborting.
-.Pp
-In the table below, the first two columns show various
-exceptions signaled by the
-.Tn IEEE
-standard, and the default
-result it prescribes. The third column shows what value is
-given to
-.Fa iarg
-by functions in
-.Xr libm
-when they
-invoke
-.Fn infnan iarg
-under analogous circumstances on a
-.Tn VAX .
-Currently
-.Fn infnan
-stops computation under all those
-circumstances. The last two columns offer an alternative;
-they suggest a setting for
-.Va errno
-and a value for a
-revised
-.Fn infnan
-to return. And a C program to
-implement that suggestion follows.
-.sp 0.5
-.Bd -filled -offset indent
-.Bl -column "IEEE Signal" "IEEE Default" XXERANGE ERANGEXXorXXEDOM
-.It IEEE Signal IEEE Default Ta
-.Fa iarg Ta
-.Va errno Ta
-.Fn infnan
-.It Invalid \*(Na Ta
-.Dv EDOM EDOM 0
-.It Overflow \(+-\*(If Ta
-.Dv ERANGE ERANGE HUGE
-.It Div\-by\-0 \(+-Infinity Ta
-.Dv \(+-ERANGE ERANGE or EDOM \(+-HUGE
-.It ( Ns Dv HUGE No "= 1.7e38 ... nearly 2.0**127)"
-.El
-.Ed
-.Pp
-ALTERNATIVE
-.Fn infnan :
-.Bd -literal -offset indent
-#include <math.h>
-#include <errno.h>
-extern int errno ;
-double infnan(iarg)
-int iarg ;
-{
- switch(iarg) {
- case \0ERANGE: errno = ERANGE; return(HUGE);
- case \-ERANGE: errno = EDOM; return(\-HUGE);
- default: errno = EDOM; return(0);
- }
-}
-.Ed
-.Sh SEE ALSO
-.Xr intro 2 ,
-.Xr math 3 ,
-.Xr signal 3 .
-.Pp
-.Dv ERANGE
-and
-.Dv EDOM
-are defined in
-.Aq Pa errno.h .
-(See
-.Xr intro 2
-for explanation of
-.Dv EDOM
-and
-.Dv ERANGE . )
-.Sh HISTORY
-The
-.Fn infnan
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libm/common_source/j0.3 b/lib/libm/common_source/j0.3
deleted file mode 100644
index 3a7d3fb..0000000
--- a/lib/libm/common_source/j0.3
+++ /dev/null
@@ -1,126 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)j0.3 8.2 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 1994
-.Dt J0 3
-.Os BSD 4
-.Sh NAME
-.Nm j0 ,
-.Nm j1 ,
-.Nm jn ,
-.Nm y0 ,
-.Nm y1 ,
-.Nm yn
-.Nd bessel functions of first and second kind
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn j0 "double x"
-.Ft double
-.Fn j1 "double x"
-.Ft double
-.Fn jn "int n" "double x"
-.Ft double
-.Fn y0 "double x"
-.Ft double
-.Fn y1 "double x"
-.Ft double
-.Fn yn "int n" "double x"
-.Sh DESCRIPTION
-The functions
-.Fn j0
-and
-.Fn j1
-compute the
-.Em Bessel function of the first kind of the order
-0 and the
-.Em order
-1, respectively,
-for the
-real value
-.Fa x ;
-the function
-.Fn jn
-computes the
-.Em Bessel function of the first kind of the integer order
-.Fa n
-for the real value
-.Fa x .
-.Pp
-The functions
-.Fn y0
-and
-.Fn y1
-compute the linearly independent
-.Em Bessel function of the second kind of the order
-0 and the
-.Em order
-1, respectively,
-for the positive
-.Em integer
-value
-.Fa x
-(expressed as a double);
-the function
-.Fn yn
-computes the
-.Em Bessel function of the second kind for the integer order
-.Fa n
-for the positive
-.Em integer
-value
-.Fa x
-(expressed as a double).
-.Sh RETURN VALUES
-If these functions are successful,
-the computed value is returned. On the
-.Tn VAX
-and
-.Tn Tahoe
-architectures,
-a negative
-.Fa x
-value
-results in an error; the global
-variable
-.Va errno
-is set to
-.Er EDOM
-and a reserve operand fault is generated.
-.Sh SEE ALSO
-.Xr infnan 3 ,
-.Xr math 3
-.Sh HISTORY
-A set of these functions
-function appeared in
-.At v7 .
diff --git a/lib/libm/common_source/j0.c b/lib/libm/common_source/j0.c
deleted file mode 100644
index 684fb4d..0000000
--- a/lib/libm/common_source/j0.c
+++ /dev/null
@@ -1,439 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)j0.c 8.2 (Berkeley) 11/30/93";
-#endif /* not lint */
-
-/*
- * 16 December 1992
- * Minor modifications by Peter McIlroy to adapt non-IEEE architecture.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1992 by Sun Microsystems, Inc.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- *
- * ******************* WARNING ********************
- * This is an alpha version of SunPro's FDLIBM (Freely
- * Distributable Math Library) for IEEE double precision
- * arithmetic. FDLIBM is a basic math library written
- * in C that runs on machines that conform to IEEE
- * Standard 754/854. This alpha version is distributed
- * for testing purpose. Those who use this software
- * should report any bugs to
- *
- * fdlibm-comments@sunpro.eng.sun.com
- *
- * -- K.C. Ng, Oct 12, 1992
- * ************************************************
- */
-
-/* double j0(double x), y0(double x)
- * Bessel function of the first and second kinds of order zero.
- * Method -- j0(x):
- * 1. For tiny x, we use j0(x) = 1 - x^2/4 + x^4/64 - ...
- * 2. Reduce x to |x| since j0(x)=j0(-x), and
- * for x in (0,2)
- * j0(x) = 1-z/4+ z^2*R0/S0, where z = x*x;
- * (precision: |j0-1+z/4-z^2R0/S0 |<2**-63.67 )
- * for x in (2,inf)
- * j0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)-q0(x)*sin(x0))
- * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
- * as follow:
- * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
- * = 1/sqrt(2) * (cos(x) + sin(x))
- * sin(x0) = sin(x)cos(pi/4)-cos(x)sin(pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * (To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.)
- *
- * 3 Special cases
- * j0(nan)= nan
- * j0(0) = 1
- * j0(inf) = 0
- *
- * Method -- y0(x):
- * 1. For x<2.
- * Since
- * y0(x) = 2/pi*(j0(x)*(ln(x/2)+Euler) + x^2/4 - ...)
- * therefore y0(x)-2/pi*j0(x)*ln(x) is an even function.
- * We use the following function to approximate y0,
- * y0(x) = U(z)/V(z) + (2/pi)*(j0(x)*ln(x)), z= x^2
- * where
- * U(z) = u0 + u1*z + ... + u6*z^6
- * V(z) = 1 + v1*z + ... + v4*z^4
- * with absolute approximation error bounded by 2**-72.
- * Note: For tiny x, U/V = u0 and j0(x)~1, hence
- * y0(tiny) = u0 + (2/pi)*ln(tiny), (choose tiny<2**-27)
- * 2. For x>=2.
- * y0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)+q0(x)*sin(x0))
- * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
- * by the method mentioned above.
- * 3. Special cases: y0(0)=-inf, y0(x<0)=NaN, y0(inf)=0.
- */
-
-#include <math.h>
-#include <float.h>
-#if defined(vax) || defined(tahoe)
-#define _IEEE 0
-#else
-#define _IEEE 1
-#define infnan(x) (0.0)
-#endif
-
-static double pzero __P((double)), qzero __P((double));
-
-static double
-huge = 1e300,
-zero = 0.0,
-one = 1.0,
-invsqrtpi= 5.641895835477562869480794515607725858441e-0001,
-tpi = 0.636619772367581343075535053490057448,
- /* R0/S0 on [0, 2.00] */
-r02 = 1.562499999999999408594634421055018003102e-0002,
-r03 = -1.899792942388547334476601771991800712355e-0004,
-r04 = 1.829540495327006565964161150603950916854e-0006,
-r05 = -4.618326885321032060803075217804816988758e-0009,
-s01 = 1.561910294648900170180789369288114642057e-0002,
-s02 = 1.169267846633374484918570613449245536323e-0004,
-s03 = 5.135465502073181376284426245689510134134e-0007,
-s04 = 1.166140033337900097836930825478674320464e-0009;
-
-double
-j0(x)
- double x;
-{
- double z, s,c,ss,cc,r,u,v;
-
- if (!finite(x))
- if (_IEEE) return one/(x*x);
- else return (0);
- x = fabs(x);
- if (x >= 2.0) { /* |x| >= 2.0 */
- s = sin(x);
- c = cos(x);
- ss = s-c;
- cc = s+c;
- if (x < .5 * DBL_MAX) { /* make sure x+x not overflow */
- z = -cos(x+x);
- if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
- }
- /*
- * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
- * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
- */
- if (_IEEE && x> 6.80564733841876927e+38) /* 2^129 */
- z = (invsqrtpi*cc)/sqrt(x);
- else {
- u = pzero(x); v = qzero(x);
- z = invsqrtpi*(u*cc-v*ss)/sqrt(x);
- }
- return z;
- }
- if (x < 1.220703125e-004) { /* |x| < 2**-13 */
- if (huge+x > one) { /* raise inexact if x != 0 */
- if (x < 7.450580596923828125e-009) /* |x|<2**-27 */
- return one;
- else return (one - 0.25*x*x);
- }
- }
- z = x*x;
- r = z*(r02+z*(r03+z*(r04+z*r05)));
- s = one+z*(s01+z*(s02+z*(s03+z*s04)));
- if (x < one) { /* |x| < 1.00 */
- return (one + z*(-0.25+(r/s)));
- } else {
- u = 0.5*x;
- return ((one+u)*(one-u)+z*(r/s));
- }
-}
-
-static double
-u00 = -7.380429510868722527422411862872999615628e-0002,
-u01 = 1.766664525091811069896442906220827182707e-0001,
-u02 = -1.381856719455968955440002438182885835344e-0002,
-u03 = 3.474534320936836562092566861515617053954e-0004,
-u04 = -3.814070537243641752631729276103284491172e-0006,
-u05 = 1.955901370350229170025509706510038090009e-0008,
-u06 = -3.982051941321034108350630097330144576337e-0011,
-v01 = 1.273048348341237002944554656529224780561e-0002,
-v02 = 7.600686273503532807462101309675806839635e-0005,
-v03 = 2.591508518404578033173189144579208685163e-0007,
-v04 = 4.411103113326754838596529339004302243157e-0010;
-
-double
-y0(x)
- double x;
-{
- double z, s, c, ss, cc, u, v;
- /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0 */
- if (!finite(x))
- if (_IEEE)
- return (one/(x+x*x));
- else
- return (0);
- if (x == 0)
- if (_IEEE) return (-one/zero);
- else return(infnan(-ERANGE));
- if (x<0)
- if (_IEEE) return (zero/zero);
- else return (infnan(EDOM));
- if (x >= 2.00) { /* |x| >= 2.0 */
- /* y0(x) = sqrt(2/(pi*x))*(p0(x)*sin(x0)+q0(x)*cos(x0))
- * where x0 = x-pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
- * = 1/sqrt(2) * (sin(x) + cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
- s = sin(x);
- c = cos(x);
- ss = s-c;
- cc = s+c;
- /*
- * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
- * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
- */
- if (x < .5 * DBL_MAX) { /* make sure x+x not overflow */
- z = -cos(x+x);
- if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
- }
- if (_IEEE && x > 6.80564733841876927e+38) /* > 2^129 */
- z = (invsqrtpi*ss)/sqrt(x);
- else {
- u = pzero(x); v = qzero(x);
- z = invsqrtpi*(u*ss+v*cc)/sqrt(x);
- }
- return z;
- }
- if (x <= 7.450580596923828125e-009) { /* x < 2**-27 */
- return (u00 + tpi*log(x));
- }
- z = x*x;
- u = u00+z*(u01+z*(u02+z*(u03+z*(u04+z*(u05+z*u06)))));
- v = one+z*(v01+z*(v02+z*(v03+z*v04)));
- return (u/v + tpi*(j0(x)*log(x)));
-}
-
-/* The asymptotic expansions of pzero is
- * 1 - 9/128 s^2 + 11025/98304 s^4 - ..., where s = 1/x.
- * For x >= 2, We approximate pzero by
- * pzero(x) = 1 + (R/S)
- * where R = pr0 + pr1*s^2 + pr2*s^4 + ... + pr5*s^10
- * S = 1 + ps0*s^2 + ... + ps4*s^10
- * and
- * | pzero(x)-1-R/S | <= 2 ** ( -60.26)
- */
-static double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
- 0.0,
- -7.031249999999003994151563066182798210142e-0002,
- -8.081670412753498508883963849859423939871e+0000,
- -2.570631056797048755890526455854482662510e+0002,
- -2.485216410094288379417154382189125598962e+0003,
- -5.253043804907295692946647153614119665649e+0003,
-};
-static double ps8[5] = {
- 1.165343646196681758075176077627332052048e+0002,
- 3.833744753641218451213253490882686307027e+0003,
- 4.059785726484725470626341023967186966531e+0004,
- 1.167529725643759169416844015694440325519e+0005,
- 4.762772841467309430100106254805711722972e+0004,
-};
-
-static double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
- -1.141254646918944974922813501362824060117e-0011,
- -7.031249408735992804117367183001996028304e-0002,
- -4.159610644705877925119684455252125760478e+0000,
- -6.767476522651671942610538094335912346253e+0001,
- -3.312312996491729755731871867397057689078e+0002,
- -3.464333883656048910814187305901796723256e+0002,
-};
-static double ps5[5] = {
- 6.075393826923003305967637195319271932944e+0001,
- 1.051252305957045869801410979087427910437e+0003,
- 5.978970943338558182743915287887408780344e+0003,
- 9.625445143577745335793221135208591603029e+0003,
- 2.406058159229391070820491174867406875471e+0003,
-};
-
-static double pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
- -2.547046017719519317420607587742992297519e-0009,
- -7.031196163814817199050629727406231152464e-0002,
- -2.409032215495295917537157371488126555072e+0000,
- -2.196597747348830936268718293366935843223e+0001,
- -5.807917047017375458527187341817239891940e+0001,
- -3.144794705948885090518775074177485744176e+0001,
-};
-static double ps3[5] = {
- 3.585603380552097167919946472266854507059e+0001,
- 3.615139830503038919981567245265266294189e+0002,
- 1.193607837921115243628631691509851364715e+0003,
- 1.127996798569074250675414186814529958010e+0003,
- 1.735809308133357510239737333055228118910e+0002,
-};
-
-static double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
- -8.875343330325263874525704514800809730145e-0008,
- -7.030309954836247756556445443331044338352e-0002,
- -1.450738467809529910662233622603401167409e+0000,
- -7.635696138235277739186371273434739292491e+0000,
- -1.119316688603567398846655082201614524650e+0001,
- -3.233645793513353260006821113608134669030e+0000,
-};
-static double ps2[5] = {
- 2.222029975320888079364901247548798910952e+0001,
- 1.362067942182152109590340823043813120940e+0002,
- 2.704702786580835044524562897256790293238e+0002,
- 1.538753942083203315263554770476850028583e+0002,
- 1.465761769482561965099880599279699314477e+0001,
-};
-
-static double pzero(x)
- double x;
-{
- double *p,*q,z,r,s;
- if (x >= 8.00) {p = pr8; q= ps8;}
- else if (x >= 4.54545211791992188) {p = pr5; q= ps5;}
- else if (x >= 2.85714149475097656) {p = pr3; q= ps3;}
- else if (x >= 2.00) {p = pr2; q= ps2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
- return one+ r/s;
-}
-
-
-/* For x >= 8, the asymptotic expansions of qzero is
- * -1/8 s + 75/1024 s^3 - ..., where s = 1/x.
- * We approximate pzero by
- * qzero(x) = s*(-1.25 + (R/S))
- * where R = qr0 + qr1*s^2 + qr2*s^4 + ... + qr5*s^10
- * S = 1 + qs0*s^2 + ... + qs5*s^12
- * and
- * | qzero(x)/s +1.25-R/S | <= 2 ** ( -61.22)
- */
-static double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
- 0.0,
- 7.324218749999350414479738504551775297096e-0002,
- 1.176820646822526933903301695932765232456e+0001,
- 5.576733802564018422407734683549251364365e+0002,
- 8.859197207564685717547076568608235802317e+0003,
- 3.701462677768878501173055581933725704809e+0004,
-};
-static double qs8[6] = {
- 1.637760268956898345680262381842235272369e+0002,
- 8.098344946564498460163123708054674227492e+0003,
- 1.425382914191204905277585267143216379136e+0005,
- 8.033092571195144136565231198526081387047e+0005,
- 8.405015798190605130722042369969184811488e+0005,
- -3.438992935378666373204500729736454421006e+0005,
-};
-
-static double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
- 1.840859635945155400568380711372759921179e-0011,
- 7.324217666126847411304688081129741939255e-0002,
- 5.835635089620569401157245917610984757296e+0000,
- 1.351115772864498375785526599119895942361e+0002,
- 1.027243765961641042977177679021711341529e+0003,
- 1.989977858646053872589042328678602481924e+0003,
-};
-static double qs5[6] = {
- 8.277661022365377058749454444343415524509e+0001,
- 2.077814164213929827140178285401017305309e+0003,
- 1.884728877857180787101956800212453218179e+0004,
- 5.675111228949473657576693406600265778689e+0004,
- 3.597675384251145011342454247417399490174e+0004,
- -5.354342756019447546671440667961399442388e+0003,
-};
-
-static double qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
- 4.377410140897386263955149197672576223054e-0009,
- 7.324111800429115152536250525131924283018e-0002,
- 3.344231375161707158666412987337679317358e+0000,
- 4.262184407454126175974453269277100206290e+0001,
- 1.708080913405656078640701512007621675724e+0002,
- 1.667339486966511691019925923456050558293e+0002,
-};
-static double qs3[6] = {
- 4.875887297245871932865584382810260676713e+0001,
- 7.096892210566060535416958362640184894280e+0002,
- 3.704148226201113687434290319905207398682e+0003,
- 6.460425167525689088321109036469797462086e+0003,
- 2.516333689203689683999196167394889715078e+0003,
- -1.492474518361563818275130131510339371048e+0002,
-};
-
-static double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
- 1.504444448869832780257436041633206366087e-0007,
- 7.322342659630792930894554535717104926902e-0002,
- 1.998191740938159956838594407540292600331e+0000,
- 1.449560293478857407645853071687125850962e+0001,
- 3.166623175047815297062638132537957315395e+0001,
- 1.625270757109292688799540258329430963726e+0001,
-};
-static double qs2[6] = {
- 3.036558483552191922522729838478169383969e+0001,
- 2.693481186080498724211751445725708524507e+0002,
- 8.447837575953201460013136756723746023736e+0002,
- 8.829358451124885811233995083187666981299e+0002,
- 2.126663885117988324180482985363624996652e+0002,
- -5.310954938826669402431816125780738924463e+0000,
-};
-
-static double qzero(x)
- double x;
-{
- double *p,*q, s,r,z;
- if (x >= 8.00) {p = qr8; q= qs8;}
- else if (x >= 4.54545211791992188) {p = qr5; q= qs5;}
- else if (x >= 2.85714149475097656) {p = qr3; q= qs3;}
- else if (x >= 2.00) {p = qr2; q= qs2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));
- return (-.125 + r/s)/x;
-}
diff --git a/lib/libm/common_source/j1.c b/lib/libm/common_source/j1.c
deleted file mode 100644
index e8ca43a..0000000
--- a/lib/libm/common_source/j1.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)j1.c 8.2 (Berkeley) 11/30/93";
-#endif /* not lint */
-
-/*
- * 16 December 1992
- * Minor modifications by Peter McIlroy to adapt non-IEEE architecture.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1992 by Sun Microsystems, Inc.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- *
- * ******************* WARNING ********************
- * This is an alpha version of SunPro's FDLIBM (Freely
- * Distributable Math Library) for IEEE double precision
- * arithmetic. FDLIBM is a basic math library written
- * in C that runs on machines that conform to IEEE
- * Standard 754/854. This alpha version is distributed
- * for testing purpose. Those who use this software
- * should report any bugs to
- *
- * fdlibm-comments@sunpro.eng.sun.com
- *
- * -- K.C. Ng, Oct 12, 1992
- * ************************************************
- */
-
-/* double j1(double x), y1(double x)
- * Bessel function of the first and second kinds of order zero.
- * Method -- j1(x):
- * 1. For tiny x, we use j1(x) = x/2 - x^3/16 + x^5/384 - ...
- * 2. Reduce x to |x| since j1(x)=-j1(-x), and
- * for x in (0,2)
- * j1(x) = x/2 + x*z*R0/S0, where z = x*x;
- * (precision: |j1/x - 1/2 - R0/S0 |<2**-61.51 )
- * for x in (2,inf)
- * j1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))
- * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
- * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
- * as follows:
- * cos(x1) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * sin(x1) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = -1/sqrt(2) * (sin(x) + cos(x))
- * (To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.)
- *
- * 3 Special cases
- * j1(nan)= nan
- * j1(0) = 0
- * j1(inf) = 0
- *
- * Method -- y1(x):
- * 1. screen out x<=0 cases: y1(0)=-inf, y1(x<0)=NaN
- * 2. For x<2.
- * Since
- * y1(x) = 2/pi*(j1(x)*(ln(x/2)+Euler)-1/x-x/2+5/64*x^3-...)
- * therefore y1(x)-2/pi*j1(x)*ln(x)-1/x is an odd function.
- * We use the following function to approximate y1,
- * y1(x) = x*U(z)/V(z) + (2/pi)*(j1(x)*ln(x)-1/x), z= x^2
- * where for x in [0,2] (abs err less than 2**-65.89)
- * U(z) = u0 + u1*z + ... + u4*z^4
- * V(z) = 1 + v1*z + ... + v5*z^5
- * Note: For tiny x, 1/x dominate y1 and hence
- * y1(tiny) = -2/pi/tiny, (choose tiny<2**-54)
- * 3. For x>=2.
- * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
- * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
- * by method mentioned above.
- */
-
-#include <math.h>
-#include <float.h>
-
-#if defined(vax) || defined(tahoe)
-#define _IEEE 0
-#else
-#define _IEEE 1
-#define infnan(x) (0.0)
-#endif
-
-static double pone(), qone();
-
-static double
-huge = 1e300,
-zero = 0.0,
-one = 1.0,
-invsqrtpi= 5.641895835477562869480794515607725858441e-0001,
-tpi = 0.636619772367581343075535053490057448,
-
- /* R0/S0 on [0,2] */
-r00 = -6.250000000000000020842322918309200910191e-0002,
-r01 = 1.407056669551897148204830386691427791200e-0003,
-r02 = -1.599556310840356073980727783817809847071e-0005,
-r03 = 4.967279996095844750387702652791615403527e-0008,
-s01 = 1.915375995383634614394860200531091839635e-0002,
-s02 = 1.859467855886309024045655476348872850396e-0004,
-s03 = 1.177184640426236767593432585906758230822e-0006,
-s04 = 5.046362570762170559046714468225101016915e-0009,
-s05 = 1.235422744261379203512624973117299248281e-0011;
-
-#define two_129 6.80564733841876926e+038 /* 2^129 */
-#define two_m54 5.55111512312578270e-017 /* 2^-54 */
-double j1(x)
- double x;
-{
- double z, s,c,ss,cc,r,u,v,y;
- y = fabs(x);
- if (!finite(x)) /* Inf or NaN */
- if (_IEEE && x != x)
- return(x);
- else
- return (copysign(x, zero));
- y = fabs(x);
- if (y >= 2) /* |x| >= 2.0 */
- {
- s = sin(y);
- c = cos(y);
- ss = -s-c;
- cc = s-c;
- if (y < .5*DBL_MAX) { /* make sure y+y not overflow */
- z = cos(y+y);
- if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
- }
- /*
- * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
- * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x)
- */
-#if !defined(vax) && !defined(tahoe)
- if (y > two_129) /* x > 2^129 */
- z = (invsqrtpi*cc)/sqrt(y);
- else
-#endif /* defined(vax) || defined(tahoe) */
- {
- u = pone(y); v = qone(y);
- z = invsqrtpi*(u*cc-v*ss)/sqrt(y);
- }
- if (x < 0) return -z;
- else return z;
- }
- if (y < 7.450580596923828125e-009) { /* |x|<2**-27 */
- if(huge+x>one) return 0.5*x;/* inexact if x!=0 necessary */
- }
- z = x*x;
- r = z*(r00+z*(r01+z*(r02+z*r03)));
- s = one+z*(s01+z*(s02+z*(s03+z*(s04+z*s05))));
- r *= x;
- return (x*0.5+r/s);
-}
-
-static double u0[5] = {
- -1.960570906462389484206891092512047539632e-0001,
- 5.044387166398112572026169863174882070274e-0002,
- -1.912568958757635383926261729464141209569e-0003,
- 2.352526005616105109577368905595045204577e-0005,
- -9.190991580398788465315411784276789663849e-0008,
-};
-static double v0[5] = {
- 1.991673182366499064031901734535479833387e-0002,
- 2.025525810251351806268483867032781294682e-0004,
- 1.356088010975162198085369545564475416398e-0006,
- 6.227414523646214811803898435084697863445e-0009,
- 1.665592462079920695971450872592458916421e-0011,
-};
-
-double y1(x)
- double x;
-{
- double z, s, c, ss, cc, u, v;
- /* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */
- if (!finite(x))
- if (!_IEEE) return (infnan(EDOM));
- else if (x < 0)
- return(zero/zero);
- else if (x > 0)
- return (0);
- else
- return(x);
- if (x <= 0) {
- if (_IEEE && x == 0) return -one/zero;
- else if(x == 0) return(infnan(-ERANGE));
- else if(_IEEE) return (zero/zero);
- else return(infnan(EDOM));
- }
- if (x >= 2) /* |x| >= 2.0 */
- {
- s = sin(x);
- c = cos(x);
- ss = -s-c;
- cc = s-c;
- if (x < .5 * DBL_MAX) /* make sure x+x not overflow */
- {
- z = cos(x+x);
- if ((s*c)>zero) cc = z/ss;
- else ss = z/cc;
- }
- /* y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x0)+q1(x)*cos(x0))
- * where x0 = x-3pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = -1/sqrt(2) * (cos(x) + sin(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
- if (_IEEE && x>two_129)
- z = (invsqrtpi*ss)/sqrt(x);
- else {
- u = pone(x); v = qone(x);
- z = invsqrtpi*(u*ss+v*cc)/sqrt(x);
- }
- return z;
- }
- if (x <= two_m54) { /* x < 2**-54 */
- return (-tpi/x);
- }
- z = x*x;
- u = u0[0]+z*(u0[1]+z*(u0[2]+z*(u0[3]+z*u0[4])));
- v = one+z*(v0[0]+z*(v0[1]+z*(v0[2]+z*(v0[3]+z*v0[4]))));
- return (x*(u/v) + tpi*(j1(x)*log(x)-one/x));
-}
-
-/* For x >= 8, the asymptotic expansions of pone is
- * 1 + 15/128 s^2 - 4725/2^15 s^4 - ..., where s = 1/x.
- * We approximate pone by
- * pone(x) = 1 + (R/S)
- * where R = pr0 + pr1*s^2 + pr2*s^4 + ... + pr5*s^10
- * S = 1 + ps0*s^2 + ... + ps4*s^10
- * and
- * | pone(x)-1-R/S | <= 2 ** ( -60.06)
- */
-
-static double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
- 0.0,
- 1.171874999999886486643746274751925399540e-0001,
- 1.323948065930735690925827997575471527252e+0001,
- 4.120518543073785433325860184116512799375e+0002,
- 3.874745389139605254931106878336700275601e+0003,
- 7.914479540318917214253998253147871806507e+0003,
-};
-static double ps8[5] = {
- 1.142073703756784104235066368252692471887e+0002,
- 3.650930834208534511135396060708677099382e+0003,
- 3.695620602690334708579444954937638371808e+0004,
- 9.760279359349508334916300080109196824151e+0004,
- 3.080427206278887984185421142572315054499e+0004,
-};
-
-static double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
- 1.319905195562435287967533851581013807103e-0011,
- 1.171874931906140985709584817065144884218e-0001,
- 6.802751278684328781830052995333841452280e+0000,
- 1.083081829901891089952869437126160568246e+0002,
- 5.176361395331997166796512844100442096318e+0002,
- 5.287152013633375676874794230748055786553e+0002,
-};
-static double ps5[5] = {
- 5.928059872211313557747989128353699746120e+0001,
- 9.914014187336144114070148769222018425781e+0002,
- 5.353266952914879348427003712029704477451e+0003,
- 7.844690317495512717451367787640014588422e+0003,
- 1.504046888103610723953792002716816255382e+0003,
-};
-
-static double pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
- 3.025039161373736032825049903408701962756e-0009,
- 1.171868655672535980750284752227495879921e-0001,
- 3.932977500333156527232725812363183251138e+0000,
- 3.511940355916369600741054592597098912682e+0001,
- 9.105501107507812029367749771053045219094e+0001,
- 4.855906851973649494139275085628195457113e+0001,
-};
-static double ps3[5] = {
- 3.479130950012515114598605916318694946754e+0001,
- 3.367624587478257581844639171605788622549e+0002,
- 1.046871399757751279180649307467612538415e+0003,
- 8.908113463982564638443204408234739237639e+0002,
- 1.037879324396392739952487012284401031859e+0002,
-};
-
-static double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
- 1.077108301068737449490056513753865482831e-0007,
- 1.171762194626833490512746348050035171545e-0001,
- 2.368514966676087902251125130227221462134e+0000,
- 1.224261091482612280835153832574115951447e+0001,
- 1.769397112716877301904532320376586509782e+0001,
- 5.073523125888185399030700509321145995160e+0000,
-};
-static double ps2[5] = {
- 2.143648593638214170243114358933327983793e+0001,
- 1.252902271684027493309211410842525120355e+0002,
- 2.322764690571628159027850677565128301361e+0002,
- 1.176793732871470939654351793502076106651e+0002,
- 8.364638933716182492500902115164881195742e+0000,
-};
-
-static double pone(x)
- double x;
-{
- double *p,*q,z,r,s;
- if (x >= 8.0) {p = pr8; q= ps8;}
- else if (x >= 4.54545211791992188) {p = pr5; q= ps5;}
- else if (x >= 2.85714149475097656) {p = pr3; q= ps3;}
- else /* if (x >= 2.0) */ {p = pr2; q= ps2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
- return (one + r/s);
-}
-
-
-/* For x >= 8, the asymptotic expansions of qone is
- * 3/8 s - 105/1024 s^3 - ..., where s = 1/x.
- * We approximate pone by
- * qone(x) = s*(0.375 + (R/S))
- * where R = qr1*s^2 + qr2*s^4 + ... + qr5*s^10
- * S = 1 + qs1*s^2 + ... + qs6*s^12
- * and
- * | qone(x)/s -0.375-R/S | <= 2 ** ( -61.13)
- */
-
-static double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
- 0.0,
- -1.025390624999927207385863635575804210817e-0001,
- -1.627175345445899724355852152103771510209e+0001,
- -7.596017225139501519843072766973047217159e+0002,
- -1.184980667024295901645301570813228628541e+0004,
- -4.843851242857503225866761992518949647041e+0004,
-};
-static double qs8[6] = {
- 1.613953697007229231029079421446916397904e+0002,
- 7.825385999233484705298782500926834217525e+0003,
- 1.338753362872495800748094112937868089032e+0005,
- 7.196577236832409151461363171617204036929e+0005,
- 6.666012326177764020898162762642290294625e+0005,
- -2.944902643038346618211973470809456636830e+0005,
-};
-
-static double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
- -2.089799311417640889742251585097264715678e-0011,
- -1.025390502413754195402736294609692303708e-0001,
- -8.056448281239359746193011295417408828404e+0000,
- -1.836696074748883785606784430098756513222e+0002,
- -1.373193760655081612991329358017247355921e+0003,
- -2.612444404532156676659706427295870995743e+0003,
-};
-static double qs5[6] = {
- 8.127655013843357670881559763225310973118e+0001,
- 1.991798734604859732508048816860471197220e+0003,
- 1.746848519249089131627491835267411777366e+0004,
- 4.985142709103522808438758919150738000353e+0004,
- 2.794807516389181249227113445299675335543e+0004,
- -4.719183547951285076111596613593553911065e+0003,
-};
-
-static double qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
- -5.078312264617665927595954813341838734288e-0009,
- -1.025378298208370901410560259001035577681e-0001,
- -4.610115811394734131557983832055607679242e+0000,
- -5.784722165627836421815348508816936196402e+0001,
- -2.282445407376317023842545937526967035712e+0002,
- -2.192101284789093123936441805496580237676e+0002,
-};
-static double qs3[6] = {
- 4.766515503237295155392317984171640809318e+0001,
- 6.738651126766996691330687210949984203167e+0002,
- 3.380152866795263466426219644231687474174e+0003,
- 5.547729097207227642358288160210745890345e+0003,
- 1.903119193388108072238947732674639066045e+0003,
- -1.352011914443073322978097159157678748982e+0002,
-};
-
-static double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
- -1.783817275109588656126772316921194887979e-0007,
- -1.025170426079855506812435356168903694433e-0001,
- -2.752205682781874520495702498875020485552e+0000,
- -1.966361626437037351076756351268110418862e+0001,
- -4.232531333728305108194363846333841480336e+0001,
- -2.137192117037040574661406572497288723430e+0001,
-};
-static double qs2[6] = {
- 2.953336290605238495019307530224241335502e+0001,
- 2.529815499821905343698811319455305266409e+0002,
- 7.575028348686454070022561120722815892346e+0002,
- 7.393932053204672479746835719678434981599e+0002,
- 1.559490033366661142496448853793707126179e+0002,
- -4.959498988226281813825263003231704397158e+0000,
-};
-
-static double qone(x)
- double x;
-{
- double *p,*q, s,r,z;
- if (x >= 8.0) {p = qr8; q= qs8;}
- else if (x >= 4.54545211791992188) {p = qr5; q= qs5;}
- else if (x >= 2.85714149475097656) {p = qr3; q= qs3;}
- else /* if (x >= 2.0) */ {p = qr2; q= qs2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));
- return (.375 + r/s)/x;
-}
diff --git a/lib/libm/common_source/jn.c b/lib/libm/common_source/jn.c
deleted file mode 100644
index 28d9687..0000000
--- a/lib/libm/common_source/jn.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)jn.c 8.2 (Berkeley) 11/30/93";
-#endif /* not lint */
-
-/*
- * 16 December 1992
- * Minor modifications by Peter McIlroy to adapt non-IEEE architecture.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1992 by Sun Microsystems, Inc.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- *
- * ******************* WARNING ********************
- * This is an alpha version of SunPro's FDLIBM (Freely
- * Distributable Math Library) for IEEE double precision
- * arithmetic. FDLIBM is a basic math library written
- * in C that runs on machines that conform to IEEE
- * Standard 754/854. This alpha version is distributed
- * for testing purpose. Those who use this software
- * should report any bugs to
- *
- * fdlibm-comments@sunpro.eng.sun.com
- *
- * -- K.C. Ng, Oct 12, 1992
- * ************************************************
- */
-
-/*
- * jn(int n, double x), yn(int n, double x)
- * floating point Bessel's function of the 1st and 2nd kind
- * of order n
- *
- * Special cases:
- * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
- * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
- * Note 2. About jn(n,x), yn(n,x)
- * For n=0, j0(x) is called,
- * for n=1, j1(x) is called,
- * for n<x, forward recursion us used starting
- * from values of j0(x) and j1(x).
- * for n>x, 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 <math.h>
-#include <float.h>
-#include <errno.h>
-
-#if defined(vax) || defined(tahoe)
-#define _IEEE 0
-#else
-#define _IEEE 1
-#define infnan(x) (0.0)
-#endif
-
-static double
-invsqrtpi= 5.641895835477562869480794515607725858441e-0001,
-two = 2.0,
-zero = 0.0,
-one = 1.0;
-
-double jn(n,x)
- int n; double x;
-{
- int i, sgn;
- double a, b, temp;
- double z, w;
-
- /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x)
- * Thus, J(-n,x) = J(n,-x)
- */
- /* if J(n,NaN) is NaN */
- if (_IEEE && isnan(x)) return x+x;
- if (n<0){
- n = -n;
- x = -x;
- }
- if (n==0) return(j0(x));
- if (n==1) return(j1(x));
- sgn = (n&1)&(x < zero); /* even n -- 0, odd n -- sign(x) */
- x = fabs(x);
- if (x == 0 || !finite (x)) /* if x is 0 or inf */
- b = zero;
- else if ((double) n <= x) {
- /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */
- if (_IEEE && x >= 8.148143905337944345e+090) {
- /* x >= 2**302 */
- /* (x >> n**2)
- * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Let s=sin(x), c=cos(x),
- * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
- *
- * n sin(xn)*sqt2 cos(xn)*sqt2
- * ----------------------------------
- * 0 s-c c+s
- * 1 -s-c -c+s
- * 2 -s+c -c-s
- * 3 s+c c-s
- */
- switch(n&3) {
- case 0: temp = cos(x)+sin(x); break;
- case 1: temp = -cos(x)+sin(x); break;
- case 2: temp = -cos(x)-sin(x); break;
- case 3: temp = cos(x)-sin(x); break;
- }
- b = invsqrtpi*temp/sqrt(x);
- } else {
- a = j0(x);
- b = j1(x);
- for(i=1;i<n;i++){
- temp = b;
- b = b*((double)(i+i)/x) - a; /* avoid underflow */
- a = temp;
- }
- }
- } else {
- if (x < 1.86264514923095703125e-009) { /* x < 2**-29 */
- /* x is tiny, return the first Taylor expansion of J(n,x)
- * J(n,x) = 1/n!*(x/2)^n - ...
- */
- if (n > 33) /* underflow */
- b = zero;
- else {
- temp = x*0.5; b = temp;
- for (a=one,i=2;i<=n;i++) {
- a *= (double)i; /* a = n! */
- b *= temp; /* b = (x/2)^n */
- }
- b = b/a;
- }
- } else {
- /* use backward recurrence */
- /* x x^2 x^2
- * J(n,x)/J(n-1,x) = ---- ------ ------ .....
- * 2n - 2(n+1) - 2(n+2)
- *
- * 1 1 1
- * (for large x) = ---- ------ ------ .....
- * 2n 2(n+1) 2(n+2)
- * -- - ------ - ------ -
- * x x x
- *
- * Let w = 2n/x and h=2/x, then the above quotient
- * is equal to the continued fraction:
- * 1
- * = -----------------------
- * 1
- * w - -----------------
- * 1
- * w+h - ---------
- * w+2h - ...
- *
- * To determine how many terms needed, let
- * Q(0) = w, Q(1) = w(w+h) - 1,
- * Q(k) = (w+k*h)*Q(k-1) - Q(k-2),
- * When Q(k) > 1e4 good for single
- * When Q(k) > 1e9 good for double
- * When Q(k) > 1e17 good for quadruple
- */
- /* determine k */
- double t,v;
- double q0,q1,h,tmp; int k,m;
- w = (n+n)/(double)x; h = 2.0/(double)x;
- q0 = w; z = w+h; q1 = w*z - 1.0; k=1;
- while (q1<1.0e9) {
- k += 1; z += h;
- tmp = z*q1 - q0;
- q0 = q1;
- q1 = tmp;
- }
- m = n+n;
- for(t=zero, i = 2*(n+k); i>=m; i -= 2) t = one/(i/x-t);
- a = t;
- b = one;
- /* estimate log((2/x)^n*n!) = n*log(2/x)+n*ln(n)
- * Hence, if n*(log(2n/x)) > ...
- * single 8.8722839355e+01
- * double 7.09782712893383973096e+02
- * long double 1.1356523406294143949491931077970765006170e+04
- * then recurrent value may overflow and the result will
- * likely underflow to zero
- */
- tmp = n;
- v = two/x;
- tmp = tmp*log(fabs(v*tmp));
- for (i=n-1;i>0;i--){
- temp = b;
- b = ((i+i)/x)*b - a;
- a = temp;
- /* scale b to avoid spurious overflow */
-# if defined(vax) || defined(tahoe)
-# define BMAX 1e13
-# else
-# define BMAX 1e100
-# endif /* defined(vax) || defined(tahoe) */
- if (b > BMAX) {
- a /= b;
- t /= b;
- b = one;
- }
- }
- b = (t*j0(x)/b);
- }
- }
- return ((sgn == 1) ? -b : b);
-}
-double yn(n,x)
- int n; double x;
-{
- int i, sign;
- double a, b, temp;
-
- /* Y(n,NaN), Y(n, x < 0) is NaN */
- if (x <= 0 || (_IEEE && x != x))
- if (_IEEE && x < 0) return zero/zero;
- else if (x < 0) return (infnan(EDOM));
- else if (_IEEE) return -one/zero;
- else return(infnan(-ERANGE));
- else if (!finite(x)) return(0);
- sign = 1;
- if (n<0){
- n = -n;
- sign = 1 - ((n&1)<<2);
- }
- if (n == 0) return(y0(x));
- if (n == 1) return(sign*y1(x));
- if(_IEEE && x >= 8.148143905337944345e+090) { /* x > 2**302 */
- /* (x >> n**2)
- * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Let s=sin(x), c=cos(x),
- * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
- *
- * n sin(xn)*sqt2 cos(xn)*sqt2
- * ----------------------------------
- * 0 s-c c+s
- * 1 -s-c -c+s
- * 2 -s+c -c-s
- * 3 s+c c-s
- */
- switch (n&3) {
- case 0: temp = sin(x)-cos(x); break;
- case 1: temp = -sin(x)-cos(x); break;
- case 2: temp = -sin(x)+cos(x); break;
- case 3: temp = sin(x)+cos(x); break;
- }
- b = invsqrtpi*temp/sqrt(x);
- } else {
- a = y0(x);
- b = y1(x);
- /* quit if b is -inf */
- for (i = 1; i < n && !finite(b); i++){
- temp = b;
- b = ((double)(i+i)/x)*b - a;
- a = temp;
- }
- }
- if (!_IEEE && !finite(b))
- return (infnan(-sign * ERANGE));
- return ((sign > 0) ? b : -b);
-}
diff --git a/lib/libm/common_source/lgamma.3 b/lib/libm/common_source/lgamma.3
deleted file mode 100644
index 92f4ba6..0000000
--- a/lib/libm/common_source/lgamma.3
+++ /dev/null
@@ -1,123 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)lgamma.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt LGAMMA 3
-.Os BSD 4.3
-.Sh NAME
-.Nm lgamma
-.Nm gamma
-.Nd log gamma function, gamma function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft extern int
-.Fa signgam ;
-.sp
-.Ft double
-.Fn lgamma "double x"
-.Ft double
-.Fn gamma "double x"
-.Sh DESCRIPTION
-.Fn Lgamma x
-.if t \{\
-returns ln\||\(*G(x)| where
-.Bd -unfilled -offset indent
-\(*G(x) = \(is\d\s8\z0\s10\u\u\s8\(if\s10\d t\u\s8x\-1\s10\d e\u\s8\-t\s10\d dt for x > 0 and
-.br
-\(*G(x) = \(*p/(\(*G(1\-x)\|sin(\(*px)) for x < 1.
-.Ed
-.\}
-.if n \
-returns ln\||\(*G(x)|.
-.Pp
-The external integer
-.Fa signgam
-returns the sign of \(*G(x).
-.Pp
-.Fn Gamma x
-returns \(*G(x), with no effect on
-.Fa signgam .
-.Sh IDIOSYNCRASIES
-Do not use the expression
-.Dq Li signgam\(**exp(lgamma(x))
-to compute g := \(*G(x).
-Instead use a program like this (in C):
-.Bd -literal -offset indent
-lg = lgamma(x); g = signgam\(**exp(lg);
-.Ed
-.Pp
-Only after
-.Fn lgamma
-has returned can signgam be correct.
-.Pp
-For arguments in its range,
-.Fn gamma
-is preferred, as for positive arguments
-it is accurate to within one unit in the last place.
-Exponentiation of
-.Fn lgamma
-will lose up to 10 significant bits.
-.Sh RETURN VALUES
-.Fn Gamma
-and
-.Fn lgamma
-return appropriate values unless an argument is out of range.
-Overflow will occur for sufficiently large positive values, and
-non-positive integers.
-On the
-.Tn VAX,
-the reserved operator is returned,
-and
-.Va errno
-is set to
-.Er ERANGE
-For large non-integer negative values,
-.Fn gamma
-will underflow.
-.Sh SEE ALSO
-.Xr infnan 3 ,
-.Xr math 3
-.Sh HISTORY
-The
-.Nm lgamma
-function appeared in
-.Bx 4.3 .
-The
-.Nm gamma
-function appeared in
-.Bx 4.4 .
-The name
-.Fn gamma
-was originally dedicated to the
-.Fn lgamma
-function, so some old code may no longer be compatible.
diff --git a/lib/libm/common_source/lgamma.c b/lib/libm/common_source/lgamma.c
deleted file mode 100644
index b5cb49f..0000000
--- a/lib/libm/common_source/lgamma.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)lgamma.c 8.2 (Berkeley) 11/30/93";
-#endif /* not lint */
-
-/*
- * Coded by Peter McIlroy, Nov 1992;
- *
- * The financial support of UUNET Communications Services is greatfully
- * acknowledged.
- */
-
-#include <math.h>
-#include <errno.h>
-
-#include "mathimpl.h"
-
-/* Log gamma function.
- * Error: x > 0 error < 1.3ulp.
- * x > 4, error < 1ulp.
- * x > 9, error < .6ulp.
- * x < 0, all bets are off. (When G(x) ~ 1, log(G(x)) ~ 0)
- * Method:
- * x > 6:
- * Use the asymptotic expansion (Stirling's Formula)
- * 0 < x < 6:
- * Use gamma(x+1) = x*gamma(x) for argument reduction.
- * Use rational approximation in
- * the range 1.2, 2.5
- * Two approximations are used, one centered at the
- * minimum to ensure monotonicity; one centered at 2
- * to maintain small relative error.
- * x < 0:
- * Use the reflection formula,
- * G(1-x)G(x) = PI/sin(PI*x)
- * Special values:
- * non-positive integer returns +Inf.
- * NaN returns NaN
-*/
-static int endian;
-#if defined(vax) || defined(tahoe)
-#define _IEEE 0
-/* double and float have same size exponent field */
-#define TRUNC(x) x = (double) (float) (x)
-#else
-#define _IEEE 1
-#define TRUNC(x) *(((int *) &x) + endian) &= 0xf8000000
-#define infnan(x) 0.0
-#endif
-
-static double small_lgam(double);
-static double large_lgam(double);
-static double neg_lgam(double);
-static double zero = 0.0, one = 1.0;
-int signgam;
-
-#define UNDERFL (1e-1020 * 1e-1020)
-
-#define LEFT (1.0 - (x0 + .25))
-#define RIGHT (x0 - .218)
-/*
-/* Constants for approximation in [1.244,1.712]
-*/
-#define x0 0.461632144968362356785
-#define x0_lo -.000000000000000015522348162858676890521
-#define a0_hi -0.12148629128932952880859
-#define a0_lo .0000000007534799204229502
-#define r0 -2.771227512955130520e-002
-#define r1 -2.980729795228150847e-001
-#define r2 -3.257411333183093394e-001
-#define r3 -1.126814387531706041e-001
-#define r4 -1.129130057170225562e-002
-#define r5 -2.259650588213369095e-005
-#define s0 1.714457160001714442e+000
-#define s1 2.786469504618194648e+000
-#define s2 1.564546365519179805e+000
-#define s3 3.485846389981109850e-001
-#define s4 2.467759345363656348e-002
-/*
- * Constants for approximation in [1.71, 2.5]
-*/
-#define a1_hi 4.227843350984671344505727574870e-01
-#define a1_lo 4.670126436531227189e-18
-#define p0 3.224670334241133695662995251041e-01
-#define p1 3.569659696950364669021382724168e-01
-#define p2 1.342918716072560025853732668111e-01
-#define p3 1.950702176409779831089963408886e-02
-#define p4 8.546740251667538090796227834289e-04
-#define q0 1.000000000000000444089209850062e+00
-#define q1 1.315850076960161985084596381057e+00
-#define q2 6.274644311862156431658377186977e-01
-#define q3 1.304706631926259297049597307705e-01
-#define q4 1.102815279606722369265536798366e-02
-#define q5 2.512690594856678929537585620579e-04
-#define q6 -1.003597548112371003358107325598e-06
-/*
- * Stirling's Formula, adjusted for equal-ripple. x in [6,Inf].
-*/
-#define lns2pi .418938533204672741780329736405
-#define pb0 8.33333333333333148296162562474e-02
-#define pb1 -2.77777777774548123579378966497e-03
-#define pb2 7.93650778754435631476282786423e-04
-#define pb3 -5.95235082566672847950717262222e-04
-#define pb4 8.41428560346653702135821806252e-04
-#define pb5 -1.89773526463879200348872089421e-03
-#define pb6 5.69394463439411649408050664078e-03
-#define pb7 -1.44705562421428915453880392761e-02
-
-__pure double
-lgamma(double x)
-{
- double r;
-
- signgam = 1;
- endian = ((*(int *) &one)) ? 1 : 0;
-
- if (!finite(x))
- if (_IEEE)
- return (x+x);
- else return (infnan(EDOM));
-
- if (x > 6 + RIGHT) {
- r = large_lgam(x);
- return (r);
- } else if (x > 1e-16)
- return (small_lgam(x));
- else if (x > -1e-16) {
- if (x < 0)
- signgam = -1, x = -x;
- return (-log(x));
- } else
- return (neg_lgam(x));
-}
-
-static double
-large_lgam(double x)
-{
- double z, p, x1;
- int i;
- struct Double t, u, v;
- u = __log__D(x);
- u.a -= 1.0;
- if (x > 1e15) {
- v.a = x - 0.5;
- TRUNC(v.a);
- v.b = (x - v.a) - 0.5;
- t.a = u.a*v.a;
- t.b = x*u.b + v.b*u.a;
- if (_IEEE == 0 && !finite(t.a))
- return(infnan(ERANGE));
- return(t.a + t.b);
- }
- x1 = 1./x;
- z = x1*x1;
- p = pb0+z*(pb1+z*(pb2+z*(pb3+z*(pb4+z*(pb5+z*(pb6+z*pb7))))));
- /* error in approximation = 2.8e-19 */
-
- p = p*x1; /* error < 2.3e-18 absolute */
- /* 0 < p < 1/64 (at x = 5.5) */
- v.a = x = x - 0.5;
- TRUNC(v.a); /* truncate v.a to 26 bits. */
- v.b = x - v.a;
- t.a = v.a*u.a; /* t = (x-.5)*(log(x)-1) */
- t.b = v.b*u.a + x*u.b;
- t.b += p; t.b += lns2pi; /* return t + lns2pi + p */
- return (t.a + t.b);
-}
-
-static double
-small_lgam(double x)
-{
- int x_int;
- double y, z, t, r = 0, p, q, hi, lo;
- struct Double rr;
- x_int = (x + .5);
- y = x - x_int;
- if (x_int <= 2 && y > RIGHT) {
- t = y - x0;
- y--; x_int++;
- goto CONTINUE;
- } else if (y < -LEFT) {
- t = y +(1.0-x0);
-CONTINUE:
- z = t - x0_lo;
- p = r0+z*(r1+z*(r2+z*(r3+z*(r4+z*r5))));
- q = s0+z*(s1+z*(s2+z*(s3+z*s4)));
- r = t*(z*(p/q) - x0_lo);
- t = .5*t*t;
- z = 1.0;
- switch (x_int) {
- case 6: z = (y + 5);
- case 5: z *= (y + 4);
- case 4: z *= (y + 3);
- case 3: z *= (y + 2);
- rr = __log__D(z);
- rr.b += a0_lo; rr.a += a0_hi;
- return(((r+rr.b)+t+rr.a));
- case 2: return(((r+a0_lo)+t)+a0_hi);
- case 0: r -= log1p(x);
- default: rr = __log__D(x);
- rr.a -= a0_hi; rr.b -= a0_lo;
- return(((r - rr.b) + t) - rr.a);
- }
- } else {
- p = p0+y*(p1+y*(p2+y*(p3+y*p4)));
- q = q0+y*(q1+y*(q2+y*(q3+y*(q4+y*(q5+y*q6)))));
- p = p*(y/q);
- t = (double)(float) y;
- z = y-t;
- hi = (double)(float) (p+a1_hi);
- lo = a1_hi - hi; lo += p; lo += a1_lo;
- r = lo*y + z*hi; /* q + r = y*(a0+p/q) */
- q = hi*t;
- z = 1.0;
- switch (x_int) {
- case 6: z = (y + 5);
- case 5: z *= (y + 4);
- case 4: z *= (y + 3);
- case 3: z *= (y + 2);
- rr = __log__D(z);
- r += rr.b; r += q;
- return(rr.a + r);
- case 2: return (q+ r);
- case 0: rr = __log__D(x);
- r -= rr.b; r -= log1p(x);
- r += q; r-= rr.a;
- return(r);
- default: rr = __log__D(x);
- r -= rr.b;
- q -= rr.a;
- return (r+q);
- }
- }
-}
-
-static double
-neg_lgam(double x)
-{
- int xi;
- double y, z, one = 1.0, zero = 0.0;
- extern double gamma();
-
- /* avoid destructive cancellation as much as possible */
- if (x > -170) {
- xi = x;
- if (xi == x)
- if (_IEEE)
- return(one/zero);
- else
- return(infnan(ERANGE));
- y = gamma(x);
- if (y < 0)
- y = -y, signgam = -1;
- return (log(y));
- }
- z = floor(x + .5);
- if (z == x) { /* convention: G(-(integer)) -> +Inf */
- if (_IEEE)
- return (one/zero);
- else
- return (infnan(ERANGE));
- }
- y = .5*ceil(x);
- if (y == ceil(y))
- signgam = -1;
- x = -x;
- z = fabs(x + z); /* 0 < z <= .5 */
- if (z < .25)
- z = sin(M_PI*z);
- else
- z = cos(M_PI*(0.5-z));
- z = log(M_PI/(z*x));
- y = large_lgam(x);
- return (z - y);
-}
diff --git a/lib/libm/common_source/log.c b/lib/libm/common_source/log.c
deleted file mode 100644
index 908b8544..0000000
--- a/lib/libm/common_source/log.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)log.c 8.2 (Berkeley) 11/30/93";
-#endif /* not lint */
-
-#include <math.h>
-#include <errno.h>
-
-#include "mathimpl.h"
-
-/* Table-driven natural logarithm.
- *
- * This code was derived, with minor modifications, from:
- * Peter Tang, "Table-Driven Implementation of the
- * Logarithm in IEEE Floating-Point arithmetic." ACM Trans.
- * Math Software, vol 16. no 4, pp 378-400, Dec 1990).
- *
- * Calculates log(2^m*F*(1+f/F)), |f/j| <= 1/256,
- * where F = j/128 for j an integer in [0, 128].
- *
- * log(2^m) = log2_hi*m + log2_tail*m
- * since m is an integer, the dominant term is exact.
- * m has at most 10 digits (for subnormal numbers),
- * and log2_hi has 11 trailing zero bits.
- *
- * log(F) = logF_hi[j] + logF_lo[j] is in tabular form in log_table.h
- * logF_hi[] + 512 is exact.
- *
- * log(1+f/F) = 2*f/(2*F + f) + 1/12 * (2*f/(2*F + f))**3 + ...
- * the leading term is calculated to extra precision in two
- * parts, the larger of which adds exactly to the dominant
- * m and F terms.
- * There are two cases:
- * 1. when m, j are non-zero (m | j), use absolute
- * precision for the leading term.
- * 2. when m = j = 0, |1-x| < 1/256, and log(x) ~= (x-1).
- * In this case, use a relative precision of 24 bits.
- * (This is done differently in the original paper)
- *
- * Special cases:
- * 0 return signalling -Inf
- * neg return signalling NaN
- * +Inf return +Inf
-*/
-
-#if defined(vax) || defined(tahoe)
-#define _IEEE 0
-#define TRUNC(x) x = (double) (float) (x)
-#else
-#define _IEEE 1
-#define endian (((*(int *) &one)) ? 1 : 0)
-#define TRUNC(x) *(((int *) &x) + endian) &= 0xf8000000
-#define infnan(x) 0.0
-#endif
-
-#define N 128
-
-/* Table of log(Fj) = logF_head[j] + logF_tail[j], for Fj = 1+j/128.
- * Used for generation of extend precision logarithms.
- * The constant 35184372088832 is 2^45, so the divide is exact.
- * It ensures correct reading of logF_head, even for inaccurate
- * decimal-to-binary conversion routines. (Everybody gets the
- * right answer for integers less than 2^53.)
- * Values for log(F) were generated using error < 10^-57 absolute
- * with the bc -l package.
-*/
-static double A1 = .08333333333333178827;
-static double A2 = .01250000000377174923;
-static double A3 = .002232139987919447809;
-static double A4 = .0004348877777076145742;
-
-static double logF_head[N+1] = {
- 0.,
- .007782140442060381246,
- .015504186535963526694,
- .023167059281547608406,
- .030771658666765233647,
- .038318864302141264488,
- .045809536031242714670,
- .053244514518837604555,
- .060624621816486978786,
- .067950661908525944454,
- .075223421237524235039,
- .082443669210988446138,
- .089612158689760690322,
- .096729626458454731618,
- .103796793681567578460,
- .110814366340264314203,
- .117783035656430001836,
- .124703478501032805070,
- .131576357788617315236,
- .138402322859292326029,
- .145182009844575077295,
- .151916042025732167530,
- .158605030176659056451,
- .165249572895390883786,
- .171850256926518341060,
- .178407657472689606947,
- .184922338493834104156,
- .191394852999565046047,
- .197825743329758552135,
- .204215541428766300668,
- .210564769107350002741,
- .216873938300523150246,
- .223143551314024080056,
- .229374101064877322642,
- .235566071312860003672,
- .241719936886966024758,
- .247836163904594286577,
- .253915209980732470285,
- .259957524436686071567,
- .265963548496984003577,
- .271933715484010463114,
- .277868451003087102435,
- .283768173130738432519,
- .289633292582948342896,
- .295464212893421063199,
- .301261330578199704177,
- .307025035294827830512,
- .312755710004239517729,
- .318453731118097493890,
- .324119468654316733591,
- .329753286372579168528,
- .335355541920762334484,
- .340926586970454081892,
- .346466767346100823488,
- .351976423156884266063,
- .357455888922231679316,
- .362905493689140712376,
- .368325561158599157352,
- .373716409793814818840,
- .379078352934811846353,
- .384411698910298582632,
- .389716751140440464951,
- .394993808240542421117,
- .400243164127459749579,
- .405465108107819105498,
- .410659924985338875558,
- .415827895143593195825,
- .420969294644237379543,
- .426084395310681429691,
- .431173464818130014464,
- .436236766774527495726,
- .441274560805140936281,
- .446287102628048160113,
- .451274644139630254358,
- .456237433481874177232,
- .461175715122408291790,
- .466089729924533457960,
- .470979715219073113985,
- .475845904869856894947,
- .480688529345570714212,
- .485507815781602403149,
- .490303988045525329653,
- .495077266798034543171,
- .499827869556611403822,
- .504556010751912253908,
- .509261901790523552335,
- .513945751101346104405,
- .518607764208354637958,
- .523248143765158602036,
- .527867089620485785417,
- .532464798869114019908,
- .537041465897345915436,
- .541597282432121573947,
- .546132437597407260909,
- .550647117952394182793,
- .555141507540611200965,
- .559615787935399566777,
- .564070138285387656651,
- .568504735352689749561,
- .572919753562018740922,
- .577315365035246941260,
- .581691739635061821900,
- .586049045003164792433,
- .590387446602107957005,
- .594707107746216934174,
- .599008189645246602594,
- .603290851438941899687,
- .607555250224322662688,
- .611801541106615331955,
- .616029877215623855590,
- .620240409751204424537,
- .624433288012369303032,
- .628608659422752680256,
- .632766669570628437213,
- .636907462236194987781,
- .641031179420679109171,
- .645137961373620782978,
- .649227946625615004450,
- .653301272011958644725,
- .657358072709030238911,
- .661398482245203922502,
- .665422632544505177065,
- .669430653942981734871,
- .673422675212350441142,
- .677398823590920073911,
- .681359224807238206267,
- .685304003098281100392,
- .689233281238557538017,
- .693147180560117703862
-};
-
-static double logF_tail[N+1] = {
- 0.,
- -.00000000000000543229938420049,
- .00000000000000172745674997061,
- -.00000000000001323017818229233,
- -.00000000000001154527628289872,
- -.00000000000000466529469958300,
- .00000000000005148849572685810,
- -.00000000000002532168943117445,
- -.00000000000005213620639136504,
- -.00000000000001819506003016881,
- .00000000000006329065958724544,
- .00000000000008614512936087814,
- -.00000000000007355770219435028,
- .00000000000009638067658552277,
- .00000000000007598636597194141,
- .00000000000002579999128306990,
- -.00000000000004654729747598444,
- -.00000000000007556920687451336,
- .00000000000010195735223708472,
- -.00000000000017319034406422306,
- -.00000000000007718001336828098,
- .00000000000010980754099855238,
- -.00000000000002047235780046195,
- -.00000000000008372091099235912,
- .00000000000014088127937111135,
- .00000000000012869017157588257,
- .00000000000017788850778198106,
- .00000000000006440856150696891,
- .00000000000016132822667240822,
- -.00000000000007540916511956188,
- -.00000000000000036507188831790,
- .00000000000009120937249914984,
- .00000000000018567570959796010,
- -.00000000000003149265065191483,
- -.00000000000009309459495196889,
- .00000000000017914338601329117,
- -.00000000000001302979717330866,
- .00000000000023097385217586939,
- .00000000000023999540484211737,
- .00000000000015393776174455408,
- -.00000000000036870428315837678,
- .00000000000036920375082080089,
- -.00000000000009383417223663699,
- .00000000000009433398189512690,
- .00000000000041481318704258568,
- -.00000000000003792316480209314,
- .00000000000008403156304792424,
- -.00000000000034262934348285429,
- .00000000000043712191957429145,
- -.00000000000010475750058776541,
- -.00000000000011118671389559323,
- .00000000000037549577257259853,
- .00000000000013912841212197565,
- .00000000000010775743037572640,
- .00000000000029391859187648000,
- -.00000000000042790509060060774,
- .00000000000022774076114039555,
- .00000000000010849569622967912,
- -.00000000000023073801945705758,
- .00000000000015761203773969435,
- .00000000000003345710269544082,
- -.00000000000041525158063436123,
- .00000000000032655698896907146,
- -.00000000000044704265010452446,
- .00000000000034527647952039772,
- -.00000000000007048962392109746,
- .00000000000011776978751369214,
- -.00000000000010774341461609578,
- .00000000000021863343293215910,
- .00000000000024132639491333131,
- .00000000000039057462209830700,
- -.00000000000026570679203560751,
- .00000000000037135141919592021,
- -.00000000000017166921336082431,
- -.00000000000028658285157914353,
- -.00000000000023812542263446809,
- .00000000000006576659768580062,
- -.00000000000028210143846181267,
- .00000000000010701931762114254,
- .00000000000018119346366441110,
- .00000000000009840465278232627,
- -.00000000000033149150282752542,
- -.00000000000018302857356041668,
- -.00000000000016207400156744949,
- .00000000000048303314949553201,
- -.00000000000071560553172382115,
- .00000000000088821239518571855,
- -.00000000000030900580513238244,
- -.00000000000061076551972851496,
- .00000000000035659969663347830,
- .00000000000035782396591276383,
- -.00000000000046226087001544578,
- .00000000000062279762917225156,
- .00000000000072838947272065741,
- .00000000000026809646615211673,
- -.00000000000010960825046059278,
- .00000000000002311949383800537,
- -.00000000000058469058005299247,
- -.00000000000002103748251144494,
- -.00000000000023323182945587408,
- -.00000000000042333694288141916,
- -.00000000000043933937969737844,
- .00000000000041341647073835565,
- .00000000000006841763641591466,
- .00000000000047585534004430641,
- .00000000000083679678674757695,
- -.00000000000085763734646658640,
- .00000000000021913281229340092,
- -.00000000000062242842536431148,
- -.00000000000010983594325438430,
- .00000000000065310431377633651,
- -.00000000000047580199021710769,
- -.00000000000037854251265457040,
- .00000000000040939233218678664,
- .00000000000087424383914858291,
- .00000000000025218188456842882,
- -.00000000000003608131360422557,
- -.00000000000050518555924280902,
- .00000000000078699403323355317,
- -.00000000000067020876961949060,
- .00000000000016108575753932458,
- .00000000000058527188436251509,
- -.00000000000035246757297904791,
- -.00000000000018372084495629058,
- .00000000000088606689813494916,
- .00000000000066486268071468700,
- .00000000000063831615170646519,
- .00000000000025144230728376072,
- -.00000000000017239444525614834
-};
-
-double
-#ifdef _ANSI_SOURCE
-log(double x)
-#else
-log(x) double x;
-#endif
-{
- int m, j;
- double F, f, g, q, u, u2, v, zero = 0.0, one = 1.0;
- volatile double u1;
-
- /* Catch special cases */
- if (x <= 0)
- if (_IEEE && x == zero) /* log(0) = -Inf */
- return (-one/zero);
- else if (_IEEE) /* log(neg) = NaN */
- return (zero/zero);
- else if (x == zero) /* NOT REACHED IF _IEEE */
- return (infnan(-ERANGE));
- else
- return (infnan(EDOM));
- else if (!finite(x))
- if (_IEEE) /* x = NaN, Inf */
- return (x+x);
- else
- return (infnan(ERANGE));
-
- /* Argument reduction: 1 <= g < 2; x/2^m = g; */
- /* y = F*(1 + f/F) for |f| <= 2^-8 */
-
- m = logb(x);
- g = ldexp(x, -m);
- if (_IEEE && m == -1022) {
- j = logb(g), m += j;
- g = ldexp(g, -j);
- }
- j = N*(g-1) + .5;
- F = (1.0/N) * j + 1; /* F*128 is an integer in [128, 512] */
- f = g - F;
-
- /* Approximate expansion for log(1+f/F) ~= u + q */
- g = 1/(2*F+f);
- u = 2*f*g;
- v = u*u;
- q = u*v*(A1 + v*(A2 + v*(A3 + v*A4)));
-
- /* case 1: u1 = u rounded to 2^-43 absolute. Since u < 2^-8,
- * u1 has at most 35 bits, and F*u1 is exact, as F has < 8 bits.
- * It also adds exactly to |m*log2_hi + log_F_head[j] | < 750
- */
- if (m | j)
- u1 = u + 513, u1 -= 513;
-
- /* case 2: |1-x| < 1/256. The m- and j- dependent terms are zero;
- * u1 = u to 24 bits.
- */
- else
- u1 = u, TRUNC(u1);
- u2 = (2.0*(f - F*u1) - u1*f) * g;
- /* u1 + u2 = 2f/(2F+f) to extra precision. */
-
- /* log(x) = log(2^m*F*(1+f/F)) = */
- /* (m*log2_hi+logF_head[j]+u1) + (m*log2_lo+logF_tail[j]+q); */
- /* (exact) + (tiny) */
-
- u1 += m*logF_head[N] + logF_head[j]; /* exact */
- u2 = (u2 + logF_tail[j]) + q; /* tiny */
- u2 += logF_tail[N]*m;
- return (u1 + u2);
-}
-
-/*
- * Extra precision variant, returning struct {double a, b;};
- * log(x) = a+b to 63 bits, with a is rounded to 26 bits.
- */
-struct Double
-#ifdef _ANSI_SOURCE
-__log__D(double x)
-#else
-__log__D(x) double x;
-#endif
-{
- int m, j;
- double F, f, g, q, u, v, u2, one = 1.0;
- volatile double u1;
- struct Double r;
-
- /* Argument reduction: 1 <= g < 2; x/2^m = g; */
- /* y = F*(1 + f/F) for |f| <= 2^-8 */
-
- m = logb(x);
- g = ldexp(x, -m);
- if (_IEEE && m == -1022) {
- j = logb(g), m += j;
- g = ldexp(g, -j);
- }
- j = N*(g-1) + .5;
- F = (1.0/N) * j + 1;
- f = g - F;
-
- g = 1/(2*F+f);
- u = 2*f*g;
- v = u*u;
- q = u*v*(A1 + v*(A2 + v*(A3 + v*A4)));
- if (m | j)
- u1 = u + 513, u1 -= 513;
- else
- u1 = u, TRUNC(u1);
- u2 = (2.0*(f - F*u1) - u1*f) * g;
-
- u1 += m*logF_head[N] + logF_head[j];
-
- u2 += logF_tail[j]; u2 += q;
- u2 += logF_tail[N]*m;
- r.a = u1 + u2; /* Only difference is here */
- TRUNC(r.a);
- r.b = (u1 - r.a) + u2;
- return (r);
-}
diff --git a/lib/libm/common_source/log10.c b/lib/libm/common_source/log10.c
deleted file mode 100644
index 75205cd..0000000
--- a/lib/libm/common_source/log10.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)log10.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* LOG10(X)
- * RETURN THE BASE 10 LOGARITHM OF x
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 1/20/85;
- * REVISED BY K.C. NG on 1/23/85, 3/7/85, 4/16/85.
- *
- * Required kernel function:
- * log(x)
- *
- * Method :
- * log(x)
- * log10(x) = --------- or [1/log(10)]*log(x)
- * log(10)
- *
- * Note:
- * [log(10)] rounded to 56 bits has error .0895 ulps,
- * [1/log(10)] rounded to 53 bits has error .198 ulps;
- * therefore, for better accuracy, in VAX D format, we divide
- * log(x) by log(10), but in IEEE Double format, we multiply
- * log(x) by [1/log(10)].
- *
- * Special cases:
- * log10(x) is NaN with signal if x < 0;
- * log10(+INF) is +INF with no signal; log10(0) is -INF with signal;
- * log10(NaN) is that NaN with no signal.
- *
- * Accuracy:
- * log10(X) returns the exact log10(x) nearly rounded. In a test run
- * with 1,536,000 random arguments on a VAX, the maximum observed
- * error was 1.74 ulps (units in the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(ln10hi, 2.3025850929940456790E0 ,5d8d,4113,a8ac,ddaa, 2, .935D8DDDAAA8AC)
-
-ic(ivln10, 4.3429448190325181667E-1, -2, 1.BCB7B1526E50E)
-
-#ifdef vccast
-#define ln10hi vccast(ln10hi)
-#endif
-
-
-double log10(x)
-double x;
-{
-#if defined(vax)||defined(tahoe)
- return(log(x)/ln10hi);
-#else /* defined(vax)||defined(tahoe) */
- return(ivln10*log(x));
-#endif /* defined(vax)||defined(tahoe) */
-}
diff --git a/lib/libm/common_source/log1p.c b/lib/libm/common_source/log1p.c
deleted file mode 100644
index 0202667..0000000
--- a/lib/libm/common_source/log1p.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)log1p.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* LOG1P(x)
- * RETURN THE LOGARITHM OF 1+x
- * DOUBLE PRECISION (VAX D FORMAT 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 1/19/85;
- * REVISED BY K.C. NG on 2/6/85, 3/7/85, 3/24/85, 4/16/85.
- *
- * Required system supported functions:
- * scalb(x,n)
- * copysign(x,y)
- * logb(x)
- * finite(x)
- *
- * Required kernel function:
- * log__L(z)
- *
- * Method :
- * 1. Argument Reduction: find k and f such that
- * 1+x = 2^k * (1+f),
- * where sqrt(2)/2 < 1+f < sqrt(2) .
- *
- * 2. Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
- * = 2s + 2/3 s**3 + 2/5 s**5 + .....,
- * log(1+f) is computed by
- *
- * log(1+f) = 2s + s*log__L(s*s)
- * where
- * log__L(z) = z*(L1 + z*(L2 + z*(... (L6 + z*L7)...)))
- *
- * See log__L() for the values of the coefficients.
- *
- * 3. Finally, log(1+x) = k*ln2 + log(1+f).
- *
- * Remarks 1. In step 3 n*ln2 will be stored in two floating point numbers
- * n*ln2hi + n*ln2lo, where ln2hi is chosen such that the last
- * 20 bits (for VAX D format), or the last 21 bits ( for IEEE
- * double) is 0. This ensures n*ln2hi is exactly representable.
- * 2. In step 1, f may not be representable. A correction term c
- * for f is computed. It follows that the correction term for
- * f - t (the leading term of log(1+f) in step 2) is c-c*x. We
- * add this correction term to n*ln2lo to attenuate the error.
- *
- *
- * Special cases:
- * log1p(x) is NaN with signal if x < -1; log1p(NaN) is NaN with no signal;
- * log1p(INF) is +INF; log1p(-1) is -INF with signal;
- * only log1p(0)=0 is exact for finite argument.
- *
- * Accuracy:
- * log1p(x) returns the exact log(1+x) nearly rounded. In a test run
- * with 1,536,000 random arguments on a VAX, the maximum observed
- * error was .846 ulps (units in the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include <errno.h>
-#include "mathimpl.h"
-
-vc(ln2hi, 6.9314718055829871446E-1 ,7217,4031,0000,f7d0, 0, .B17217F7D00000)
-vc(ln2lo, 1.6465949582897081279E-12 ,bcd5,2ce7,d9cc,e4f1, -39, .E7BCD5E4F1D9CC)
-vc(sqrt2, 1.4142135623730950622E0 ,04f3,40b5,de65,33f9, 1, .B504F333F9DE65)
-
-ic(ln2hi, 6.9314718036912381649E-1, -1, 1.62E42FEE00000)
-ic(ln2lo, 1.9082149292705877000E-10, -33, 1.A39EF35793C76)
-ic(sqrt2, 1.4142135623730951455E0, 0, 1.6A09E667F3BCD)
-
-#ifdef vccast
-#define ln2hi vccast(ln2hi)
-#define ln2lo vccast(ln2lo)
-#define sqrt2 vccast(sqrt2)
-#endif
-
-double log1p(x)
-double x;
-{
- const static double zero=0.0, negone= -1.0, one=1.0,
- half=1.0/2.0, small=1.0E-20; /* 1+small == 1 */
- double z,s,t,c;
- int k;
-
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
-
- if(finite(x)) {
- if( x > negone ) {
-
- /* argument reduction */
- if(copysign(x,one)<small) return(x);
- k=logb(one+x); z=scalb(x,-k); t=scalb(one,-k);
- if(z+t >= sqrt2 )
- { k += 1 ; z *= half; t *= half; }
- t += negone; x = z + t;
- c = (t-x)+z ; /* correction term for x */
-
- /* compute log(1+x) */
- s = x/(2+x); t = x*x*half;
- c += (k*ln2lo-c*x);
- z = c+s*(t+__log__L(s*s));
- x += (z - t) ;
-
- return(k*ln2hi+x);
- }
- /* end of if (x > negone) */
-
- else {
-#if defined(vax)||defined(tahoe)
- if ( x == negone )
- return (infnan(-ERANGE)); /* -INF */
- else
- return (infnan(EDOM)); /* NaN */
-#else /* defined(vax)||defined(tahoe) */
- /* x = -1, return -INF with signal */
- if ( x == negone ) return( negone/zero );
-
- /* negative argument for log, return NaN with signal */
- else return ( zero / zero );
-#endif /* defined(vax)||defined(tahoe) */
- }
- }
- /* end of if (finite(x)) */
-
- /* log(-INF) is NaN */
- else if(x<0)
- return(zero/zero);
-
- /* log(+INF) is INF */
- else return(x);
-}
diff --git a/lib/libm/common_source/log__L.c b/lib/libm/common_source/log__L.c
deleted file mode 100644
index 207cb0d..0000000
--- a/lib/libm/common_source/log__L.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)log__L.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* log__L(Z)
- * LOG(1+X) - 2S X
- * RETURN --------------- WHERE Z = S*S, S = ------- , 0 <= Z <= .0294...
- * S 2 + X
- *
- * DOUBLE PRECISION (VAX D FORMAT 56 bits or IEEE DOUBLE 53 BITS)
- * KERNEL FUNCTION FOR LOG; TO BE USED IN LOG1P, LOG, AND POW FUNCTIONS
- * CODED IN C BY K.C. NG, 1/19/85;
- * REVISED BY K.C. Ng, 2/3/85, 4/16/85.
- *
- * Method :
- * 1. Polynomial approximation: let s = x/(2+x).
- * Based on log(1+x) = log(1+s) - log(1-s)
- * = 2s + 2/3 s**3 + 2/5 s**5 + .....,
- *
- * (log(1+x) - 2s)/s is computed by
- *
- * z*(L1 + z*(L2 + z*(... (L7 + z*L8)...)))
- *
- * where z=s*s. (See the listing below for Lk's values.) The
- * coefficients are obtained by a special Remez algorithm.
- *
- * Accuracy:
- * Assuming no rounding error, the maximum magnitude of the approximation
- * error (absolute) is 2**(-58.49) for IEEE double, and 2**(-63.63)
- * for VAX D format.
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(L1, 6.6666666666666703212E-1 ,aaaa,402a,aac5,aaaa, 0, .AAAAAAAAAAAAC5)
-vc(L2, 3.9999999999970461961E-1 ,cccc,3fcc,2684,cccc, -1, .CCCCCCCCCC2684)
-vc(L3, 2.8571428579395698188E-1 ,4924,3f92,5782,92f8, -1, .92492492F85782)
-vc(L4, 2.2222221233634724402E-1 ,8e38,3f63,af2c,39b7, -2, .E38E3839B7AF2C)
-vc(L5, 1.8181879517064680057E-1 ,2eb4,3f3a,655e,cc39, -2, .BA2EB4CC39655E)
-vc(L6, 1.5382888777946145467E-1 ,8551,3f1d,781d,e8c5, -2, .9D8551E8C5781D)
-vc(L7, 1.3338356561139403517E-1 ,95b3,3f08,cd92,907f, -2, .8895B3907FCD92)
-vc(L8, 1.2500000000000000000E-1 ,0000,3f00,0000,0000, -2, .80000000000000)
-
-ic(L1, 6.6666666666667340202E-1, -1, 1.5555555555592)
-ic(L2, 3.9999999999416702146E-1, -2, 1.999999997FF24)
-ic(L3, 2.8571428742008753154E-1, -2, 1.24924941E07B4)
-ic(L4, 2.2222198607186277597E-1, -3, 1.C71C52150BEA6)
-ic(L5, 1.8183562745289935658E-1, -3, 1.74663CC94342F)
-ic(L6, 1.5314087275331442206E-1, -3, 1.39A1EC014045B)
-ic(L7, 1.4795612545334174692E-1, -3, 1.2F039F0085122)
-
-#ifdef vccast
-#define L1 vccast(L1)
-#define L2 vccast(L2)
-#define L3 vccast(L3)
-#define L4 vccast(L4)
-#define L5 vccast(L5)
-#define L6 vccast(L6)
-#define L7 vccast(L7)
-#define L8 vccast(L8)
-#endif
-
-double __log__L(z)
-double z;
-{
-#if defined(vax)||defined(tahoe)
- return(z*(L1+z*(L2+z*(L3+z*(L4+z*(L5+z*(L6+z*(L7+z*L8))))))));
-#else /* defined(vax)||defined(tahoe) */
- return(z*(L1+z*(L2+z*(L3+z*(L4+z*(L5+z*(L6+z*L7)))))));
-#endif /* defined(vax)||defined(tahoe) */
-}
diff --git a/lib/libm/common_source/math.3 b/lib/libm/common_source/math.3
deleted file mode 100644
index 80947e6..0000000
--- a/lib/libm/common_source/math.3
+++ /dev/null
@@ -1,630 +0,0 @@
-.\" Copyright (c) 1985, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)math.3 8.2 (Berkeley) 5/5/94
-.\"
-.TH MATH 3 "May 5, 1994"
-.UC 4
-.ds up \fIulp\fR
-.ds nn \fINaN\fR
-.de If
-.if n \\
-\\$1Infinity\\$2
-.if t \\
-\\$1\\(if\\$2
-..
-.SH NAME
-math \- introduction to mathematical library functions
-.SH DESCRIPTION
-These functions constitute the C math library,
-.I libm.
-The link editor searches this library under the \*(lq\-lm\*(rq option.
-Declarations for these functions may be obtained from the include file
-.RI < math.h >.
-The Fortran math library is described in ``man 3f intro''.
-.SH "LIST OF FUNCTIONS"
-.sp 2
-.nf
-.ta \w'copysign'u+2n +\w'infnan.3m'u+10n +\w'inverse trigonometric func'u
-\fIName\fP \fIAppears on Page\fP \fIDescription\fP \fIError Bound (ULPs)\fP
-.ta \w'copysign'u+4n +\w'infnan.3m'u+4n +\w'inverse trigonometric function'u+6nC
-.sp 5p
-acos sin.3m inverse trigonometric function 3
-acosh asinh.3m inverse hyperbolic function 3
-asin sin.3m inverse trigonometric function 3
-asinh asinh.3m inverse hyperbolic function 3
-atan sin.3m inverse trigonometric function 1
-atanh asinh.3m inverse hyperbolic function 3
-atan2 sin.3m inverse trigonometric function 2
-cabs hypot.3m complex absolute value 1
-cbrt sqrt.3m cube root 1
-ceil floor.3m integer no less than 0
-copysign ieee.3m copy sign bit 0
-cos sin.3m trigonometric function 1
-cosh sinh.3m hyperbolic function 3
-drem ieee.3m remainder 0
-erf erf.3m error function ???
-erfc erf.3m complementary error function ???
-exp exp.3m exponential 1
-expm1 exp.3m exp(x)\-1 1
-fabs floor.3m absolute value 0
-floor floor.3m integer no greater than 0
-hypot hypot.3m Euclidean distance 1
-infnan infnan.3m signals exceptions
-j0 j0.3m bessel function ???
-j1 j0.3m bessel function ???
-jn j0.3m bessel function ???
-lgamma lgamma.3m log gamma function; (formerly gamma.3m)
-log exp.3m natural logarithm 1
-logb ieee.3m exponent extraction 0
-log10 exp.3m logarithm to base 10 3
-log1p exp.3m log(1+x) 1
-pow exp.3m exponential x**y 60\-500
-rint floor.3m round to nearest integer 0
-scalb ieee.3m exponent adjustment 0
-sin sin.3m trigonometric function 1
-sinh sinh.3m hyperbolic function 3
-sqrt sqrt.3m square root 1
-tan sin.3m trigonometric function 3
-tanh sinh.3m hyperbolic function 3
-y0 j0.3m bessel function ???
-y1 j0.3m bessel function ???
-yn j0.3m bessel function ???
-.ta
-.fi
-.SH NOTES
-In 4.3 BSD, distributed from the University of California
-in late 1985, most of the foregoing functions come in two
-versions, one for the double\-precision "D" format in the
-DEC VAX\-11 family of computers, another for double\-precision
-arithmetic conforming to the IEEE Standard 754 for Binary
-Floating\-Point Arithmetic. The two versions behave very
-similarly, as should be expected from programs more accurate
-and robust than was the norm when UNIX was born. For
-instance, the programs are accurate to within the numbers
-of \*(ups tabulated above; an \*(up is one \fIU\fRnit in the \fIL\fRast
-\fIP\fRlace. And the programs have been cured of anomalies that
-afflicted the older math library \fIlibm\fR in which incidents like
-the following had been reported:
-.RS
-sqrt(\-1.0) = 0.0 and log(\-1.0) = \-1.7e38.
-.br
-cos(1.0e\-11) > cos(0.0) > 1.0.
-.br
-pow(x,1.0)
-.if n \
-!=
-.if t \
-\(!=
-x when x = 2.0, 3.0, 4.0, ..., 9.0.
-.br
-pow(\-1.0,1.0e10) trapped on Integer Overflow.
-.br
-sqrt(1.0e30) and sqrt(1.0e\-30) were very slow.
-.RE
-However the two versions do differ in ways that have to be
-explained, to which end the following notes are provided.
-.PP
-\fBDEC VAX\-11 D_floating\-point:\fR
-.PP
-This is the format for which the original math library \fIlibm\fR
-was developed, and to which this manual is still principally
-dedicated. It is \fIthe\fR double\-precision format for the PDP\-11
-and the earlier VAX\-11 machines; VAX\-11s after 1983 were
-provided with an optional "G" format closer to the IEEE
-double\-precision format. The earlier DEC MicroVAXs have no
-D format, only G double\-precision. (Why? Why not?)
-.PP
-Properties of D_floating\-point:
-.RS
-Wordsize: 64 bits, 8 bytes. Radix: Binary.
-.br
-Precision: 56
-.if n \
-sig.
-.if t \
-significant
-bits, roughly like 17
-.if n \
-sig.
-.if t \
-significant
-decimals.
-.RS
-If x and x' are consecutive positive D_floating\-point
-numbers (they differ by 1 \*(up), then
-.br
-1.3e\-17 < 0.5**56 < (x'\-x)/x \(<= 0.5**55 < 2.8e\-17.
-.RE
-.nf
-.ta \w'Range:'u+1n +\w'Underflow threshold'u+1n +\w'= 2.0**127'u+1n
-Range: Overflow threshold = 2.0**127 = 1.7e38.
- Underflow threshold = 0.5**128 = 2.9e\-39.
- NOTE: THIS RANGE IS COMPARATIVELY NARROW.
-.ta
-.fi
-.RS
-Overflow customarily stops computation.
-.br
-Underflow is customarily flushed quietly to zero.
-.br
-CAUTION:
-.RS
-It is possible to have x
-.if n \
-!=
-.if t \
-\(!=
-y and yet
-x\-y = 0 because of underflow. Similarly
-x > y > 0 cannot prevent either x\(**y = 0
-or y/x = 0 from happening without warning.
-.RE
-.RE
-Zero is represented ambiguously.
-.RS
-Although 2**55 different representations of zero are accepted by
-the hardware, only the obvious representation is ever produced.
-There is no \-0 on a VAX.
-.RE
-.If
-is not part of the VAX architecture.
-.br
-Reserved operands:
-.RS
-of the 2**55 that the hardware
-recognizes, only one of them is ever produced.
-Any floating\-point operation upon a reserved
-operand, even a MOVF or MOVD, customarily stops
-computation, so they are not much used.
-.RE
-Exceptions:
-.RS
-Divisions by zero and operations that
-overflow are invalid operations that customarily
-stop computation or, in earlier machines, produce
-reserved operands that will stop computation.
-.RE
-Rounding:
-.RS
-Every rational operation (+, \-, \(**, /) on a
-VAX (but not necessarily on a PDP\-11), if not an
-over/underflow nor division by zero, is rounded to
-within half an \*(up, and when the rounding error is
-exactly half an \*(up then rounding is away from 0.
-.RE
-.RE
-.PP
-Except for its narrow range, D_floating\-point is one of the
-better computer arithmetics designed in the 1960's.
-Its properties are reflected fairly faithfully in the elementary
-functions for a VAX distributed in 4.3 BSD.
-They over/underflow only if their results have to lie out of range
-or very nearly so, and then they behave much as any rational
-arithmetic operation that over/underflowed would behave.
-Similarly, expressions like log(0) and atanh(1) behave
-like 1/0; and sqrt(\-3) and acos(3) behave like 0/0;
-they all produce reserved operands and/or stop computation!
-The situation is described in more detail in manual pages.
-.RS
-.ll -0.5i
-\fIThis response seems excessively punitive, so it is destined
-to be replaced at some time in the foreseeable future by a
-more flexible but still uniform scheme being developed to
-handle all floating\-point arithmetic exceptions neatly.
-See infnan(3M) for the present state of affairs.\fR
-.ll +0.5i
-.RE
-.PP
-How do the functions in 4.3 BSD's new \fIlibm\fR for UNIX
-compare with their counterparts in DEC's VAX/VMS library?
-Some of the VMS functions are a little faster, some are
-a little more accurate, some are more puritanical about
-exceptions (like pow(0.0,0.0) and atan2(0.0,0.0)),
-and most occupy much more memory than their counterparts in
-\fIlibm\fR.
-The VMS codes interpolate in large table to achieve
-speed and accuracy; the \fIlibm\fR codes use tricky formulas
-compact enough that all of them may some day fit into a ROM.
-.PP
-More important, DEC regards the VMS codes as proprietary
-and guards them zealously against unauthorized use. But the
-\fIlibm\fR codes in 4.3 BSD are intended for the public domain;
-they may be copied freely provided their provenance is always
-acknowledged, and provided users assist the authors in their
-researches by reporting experience with the codes.
-Therefore no user of UNIX on a machine whose arithmetic resembles
-VAX D_floating\-point need use anything worse than the new \fIlibm\fR.
-.PP
-\fBIEEE STANDARD 754 Floating\-Point Arithmetic:\fR
-.PP
-This standard is on its way to becoming more widely adopted
-than any other design for computer arithmetic.
-VLSI chips that conform to some version of that standard have been
-produced by a host of manufacturers, among them ...
-.nf
-.ta 0.5i +\w'Intel i8070, i80287'u+6n
- Intel i8087, i80287 National Semiconductor 32081
- Motorola 68881 Weitek WTL-1032, ... , -1165
- Zilog Z8070 Western Electric (AT&T) WE32106.
-.ta
-.fi
-Other implementations range from software, done thoroughly
-in the Apple Macintosh, through VLSI in the Hewlett\-Packard
-9000 series, to the ELXSI 6400 running ECL at 3 Megaflops.
-Several other companies have adopted the formats
-of IEEE 754 without, alas, adhering to the standard's way
-of handling rounding and exceptions like over/underflow.
-The DEC VAX G_floating\-point format is very similar to the IEEE
-754 Double format, so similar that the C programs for the
-IEEE versions of most of the elementary functions listed
-above could easily be converted to run on a MicroVAX, though
-nobody has volunteered to do that yet.
-.PP
-The codes in 4.3 BSD's \fIlibm\fR for machines that conform to
-IEEE 754 are intended primarily for the National Semi. 32081
-and WTL 1164/65. To use these codes with the Intel or Zilog
-chips, or with the Apple Macintosh or ELXSI 6400, is to
-forego the use of better codes provided (perhaps freely) by
-those companies and designed by some of the authors of the
-codes above.
-Except for \fIatan\fR, \fIcabs\fR, \fIcbrt\fR, \fIerf\fR,
-\fIerfc\fR, \fIhypot\fR, \fIj0\-jn\fR, \fIlgamma\fR, \fIpow\fR
-and \fIy0\-yn\fR,
-the Motorola 68881 has all the functions in \fIlibm\fR on chip,
-and faster and more accurate;
-it, Apple, the i8087, Z8070 and WE32106 all use 64
-.if n \
-sig.
-.if t \
-significant
-bits.
-The main virtue of 4.3 BSD's
-\fIlibm\fR codes is that they are intended for the public domain;
-they may be copied freely provided their provenance is always
-acknowledged, and provided users assist the authors in their
-researches by reporting experience with the codes.
-Therefore no user of UNIX on a machine that conforms to
-IEEE 754 need use anything worse than the new \fIlibm\fR.
-.PP
-Properties of IEEE 754 Double\-Precision:
-.RS
-Wordsize: 64 bits, 8 bytes. Radix: Binary.
-.br
-Precision: 53
-.if n \
-sig.
-.if t \
-significant
-bits, roughly like 16
-.if n \
-sig.
-.if t \
-significant
-decimals.
-.RS
-If x and x' are consecutive positive Double\-Precision
-numbers (they differ by 1 \*(up), then
-.br
-1.1e\-16 < 0.5**53 < (x'\-x)/x \(<= 0.5**52 < 2.3e\-16.
-.RE
-.nf
-.ta \w'Range:'u+1n +\w'Underflow threshold'u+1n +\w'= 2.0**1024'u+1n
-Range: Overflow threshold = 2.0**1024 = 1.8e308
- Underflow threshold = 0.5**1022 = 2.2e\-308
-.ta
-.fi
-.RS
-Overflow goes by default to a signed
-.If "" .
-.br
-Underflow is \fIGradual,\fR rounding to the nearest
-integer multiple of 0.5**1074 = 4.9e\-324.
-.RE
-Zero is represented ambiguously as +0 or \-0.
-.RS
-Its sign transforms correctly through multiplication or
-division, and is preserved by addition of zeros
-with like signs; but x\-x yields +0 for every
-finite x. The only operations that reveal zero's
-sign are division by zero and copysign(x,\(+-0).
-In particular, comparison (x > y, x \(>= y, etc.)
-cannot be affected by the sign of zero; but if
-finite x = y then
-.If
-\&= 1/(x\-y)
-.if n \
-!=
-.if t \
-\(!=
-\-1/(y\-x) =
-.If \- .
-.RE
-.If
-is signed.
-.RS
-it persists when added to itself
-or to any finite number. Its sign transforms
-correctly through multiplication and division, and
-.If (finite)/\(+- \0=\0\(+-0
-(nonzero)/0 =
-.If \(+- .
-But
-.if n \
-Infinity\-Infinity, Infinity\(**0 and Infinity/Infinity
-.if t \
-\(if\-\(if, \(if\(**0 and \(if/\(if
-are, like 0/0 and sqrt(\-3),
-invalid operations that produce \*(nn. ...
-.RE
-Reserved operands:
-.RS
-there are 2**53\-2 of them, all
-called \*(nn (\fIN\fRot \fIa N\fRumber).
-Some, called Signaling \*(nns, trap any floating\-point operation
-performed upon them; they are used to mark missing
-or uninitialized values, or nonexistent elements
-of arrays. The rest are Quiet \*(nns; they are
-the default results of Invalid Operations, and
-propagate through subsequent arithmetic operations.
-If x
-.if n \
-!=
-.if t \
-\(!=
-x then x is \*(nn; every other predicate
-(x > y, x = y, x < y, ...) is FALSE if \*(nn is involved.
-.br
-NOTE: Trichotomy is violated by \*(nn.
-.RS
-Besides being FALSE, predicates that entail ordered
-comparison, rather than mere (in)equality,
-signal Invalid Operation when \*(nn is involved.
-.RE
-.RE
-Rounding:
-.RS
-Every algebraic operation (+, \-, \(**, /,
-.if n \
-sqrt)
-.if t \
-\(sr)
-is rounded by default to within half an \*(up, and
-when the rounding error is exactly half an \*(up then
-the rounded value's least significant bit is zero.
-This kind of rounding is usually the best kind,
-sometimes provably so; for instance, for every
-x = 1.0, 2.0, 3.0, 4.0, ..., 2.0**52, we find
-(x/3.0)\(**3.0 == x and (x/10.0)\(**10.0 == x and ...
-despite that both the quotients and the products
-have been rounded. Only rounding like IEEE 754
-can do that. But no single kind of rounding can be
-proved best for every circumstance, so IEEE 754
-provides rounding towards zero or towards
-.If +
-or towards
-.If \-
-at the programmer's option. And the
-same kinds of rounding are specified for
-Binary\-Decimal Conversions, at least for magnitudes
-between roughly 1.0e\-10 and 1.0e37.
-.RE
-Exceptions:
-.RS
-IEEE 754 recognizes five kinds of floating\-point exceptions,
-listed below in declining order of probable importance.
-.RS
-.nf
-.ta \w'Invalid Operation'u+6n +\w'Gradual Underflow'u+2n
-Exception Default Result
-.sp 0.5
-Invalid Operation \*(nn, or FALSE
-.if n \{\
-Overflow \(+-Infinity
-Divide by Zero \(+-Infinity \}
-.if t \{\
-Overflow \(+-\(if
-Divide by Zero \(+-\(if \}
-Underflow Gradual Underflow
-Inexact Rounded value
-.ta
-.fi
-.RE
-NOTE: An Exception is not an Error unless handled
-badly. What makes a class of exceptions exceptional
-is that no single default response can be satisfactory
-in every instance. On the other hand, if a default
-response will serve most instances satisfactorily,
-the unsatisfactory instances cannot justify aborting
-computation every time the exception occurs.
-.RE
-.PP
-For each kind of floating\-point exception, IEEE 754
-provides a Flag that is raised each time its exception
-is signaled, and stays raised until the program resets
-it. Programs may also test, save and restore a flag.
-Thus, IEEE 754 provides three ways by which programs
-may cope with exceptions for which the default result
-might be unsatisfactory:
-.IP 1) \w'\0\0\0\0'u
-Test for a condition that might cause an exception
-later, and branch to avoid the exception.
-.IP 2) \w'\0\0\0\0'u
-Test a flag to see whether an exception has occurred
-since the program last reset its flag.
-.IP 3) \w'\0\0\0\0'u
-Test a result to see whether it is a value that only
-an exception could have produced.
-.RS
-CAUTION: The only reliable ways to discover
-whether Underflow has occurred are to test whether
-products or quotients lie closer to zero than the
-underflow threshold, or to test the Underflow
-flag. (Sums and differences cannot underflow in
-IEEE 754; if x
-.if n \
-!=
-.if t \
-\(!=
-y then x\-y is correct to
-full precision and certainly nonzero regardless of
-how tiny it may be.) Products and quotients that
-underflow gradually can lose accuracy gradually
-without vanishing, so comparing them with zero
-(as one might on a VAX) will not reveal the loss.
-Fortunately, if a gradually underflowed value is
-destined to be added to something bigger than the
-underflow threshold, as is almost always the case,
-digits lost to gradual underflow will not be missed
-because they would have been rounded off anyway.
-So gradual underflows are usually \fIprovably\fR ignorable.
-The same cannot be said of underflows flushed to 0.
-.RE
-.PP
-At the option of an implementor conforming to IEEE 754,
-other ways to cope with exceptions may be provided:
-.IP 4) \w'\0\0\0\0'u
-ABORT. This mechanism classifies an exception in
-advance as an incident to be handled by means
-traditionally associated with error\-handling
-statements like "ON ERROR GO TO ...". Different
-languages offer different forms of this statement,
-but most share the following characteristics:
-.IP \(em \w'\0\0\0\0'u
-No means is provided to substitute a value for
-the offending operation's result and resume
-computation from what may be the middle of an
-expression. An exceptional result is abandoned.
-.IP \(em \w'\0\0\0\0'u
-In a subprogram that lacks an error\-handling
-statement, an exception causes the subprogram to
-abort within whatever program called it, and so
-on back up the chain of calling subprograms until
-an error\-handling statement is encountered or the
-whole task is aborted and memory is dumped.
-.IP 5) \w'\0\0\0\0'u
-STOP. This mechanism, requiring an interactive
-debugging environment, is more for the programmer
-than the program. It classifies an exception in
-advance as a symptom of a programmer's error; the
-exception suspends execution as near as it can to
-the offending operation so that the programmer can
-look around to see how it happened. Quite often
-the first several exceptions turn out to be quite
-unexceptionable, so the programmer ought ideally
-to be able to resume execution after each one as if
-execution had not been stopped.
-.IP 6) \w'\0\0\0\0'u
-\&... Other ways lie beyond the scope of this document.
-.RE
-.PP
-The crucial problem for exception handling is the problem of
-Scope, and the problem's solution is understood, but not
-enough manpower was available to implement it fully in time
-to be distributed in 4.3 BSD's \fIlibm\fR. Ideally, each
-elementary function should act as if it were indivisible, or
-atomic, in the sense that ...
-.IP i) \w'iii)'u+2n
-No exception should be signaled that is not deserved by
-the data supplied to that function.
-.IP ii) \w'iii)'u+2n
-Any exception signaled should be identified with that
-function rather than with one of its subroutines.
-.IP iii) \w'iii)'u+2n
-The internal behavior of an atomic function should not
-be disrupted when a calling program changes from
-one to another of the five or so ways of handling
-exceptions listed above, although the definition
-of the function may be correlated intentionally
-with exception handling.
-.PP
-Ideally, every programmer should be able \fIconveniently\fR to
-turn a debugged subprogram into one that appears atomic to
-its users. But simulating all three characteristics of an
-atomic function is still a tedious affair, entailing hosts
-of tests and saves\-restores; work is under way to ameliorate
-the inconvenience.
-.PP
-Meanwhile, the functions in \fIlibm\fR are only approximately
-atomic. They signal no inappropriate exception except
-possibly ...
-.RS
-Over/Underflow
-.RS
-when a result, if properly computed, might have lain barely within range, and
-.RE
-Inexact in \fIcabs\fR, \fIcbrt\fR, \fIhypot\fR, \fIlog10\fR and \fIpow\fR
-.RS
-when it happens to be exact, thanks to fortuitous cancellation of errors.
-.RE
-.RE
-Otherwise, ...
-.RS
-Invalid Operation is signaled only when
-.RS
-any result but \*(nn would probably be misleading.
-.RE
-Overflow is signaled only when
-.RS
-the exact result would be finite but beyond the overflow threshold.
-.RE
-Divide\-by\-Zero is signaled only when
-.RS
-a function takes exactly infinite values at finite operands.
-.RE
-Underflow is signaled only when
-.RS
-the exact result would be nonzero but tinier than the underflow threshold.
-.RE
-Inexact is signaled only when
-.RS
-greater range or precision would be needed to represent the exact result.
-.RE
-.RE
-.SH BUGS
-When signals are appropriate, they are emitted by certain
-operations within the codes, so a subroutine\-trace may be
-needed to identify the function with its signal in case
-method 5) above is in use. And the codes all take the
-IEEE 754 defaults for granted; this means that a decision to
-trap all divisions by zero could disrupt a code that would
-otherwise get correct results despite division by zero.
-.SH SEE ALSO
-An explanation of IEEE 754 and its proposed extension p854
-was published in the IEEE magazine MICRO in August 1984 under
-the title "A Proposed Radix\- and Word\-length\-independent
-Standard for Floating\-point Arithmetic" by W. J. Cody et al.
-The manuals for Pascal, C and BASIC on the Apple Macintosh
-document the features of IEEE 754 pretty well.
-Articles in the IEEE magazine COMPUTER vol. 14 no. 3 (Mar.
-1981), and in the ACM SIGNUM Newsletter Special Issue of
-Oct. 1979, may be helpful although they pertain to
-superseded drafts of the standard.
diff --git a/lib/libm/common_source/mathimpl.h b/lib/libm/common_source/mathimpl.h
deleted file mode 100644
index 6a2a37d..0000000
--- a/lib/libm/common_source/mathimpl.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)mathimpl.h 8.1 (Berkeley) 6/4/93
- */
-
-#include <sys/cdefs.h>
-#include <math.h>
-
-#if defined(vax)||defined(tahoe)
-
-/* Deal with different ways to concatenate in cpp */
-# ifdef __STDC__
-# define cat3(a,b,c) a ## b ## c
-# else
-# define cat3(a,b,c) a/**/b/**/c
-# endif
-
-/* Deal with vax/tahoe byte order issues */
-# ifdef vax
-# define cat3t(a,b,c) cat3(a,b,c)
-# else
-# define cat3t(a,b,c) cat3(a,c,b)
-# endif
-
-# define vccast(name) (*(const double *)(cat3(name,,x)))
-
- /*
- * Define a constant to high precision on a Vax or Tahoe.
- *
- * Args are the name to define, the decimal floating point value,
- * four 16-bit chunks of the float value in hex
- * (because the vax and tahoe differ in float format!), the power
- * of 2 of the hex-float exponent, and the hex-float mantissa.
- * Most of these arguments are not used at compile time; they are
- * used in a post-check to make sure the constants were compiled
- * correctly.
- *
- * People who want to use the constant will have to do their own
- * #define foo vccast(foo)
- * since CPP cannot do this for them from inside another macro (sigh).
- * We define "vccast" if this needs doing.
- */
-# define vc(name, value, x1,x2,x3,x4, bexp, xval) \
- const static long cat3(name,,x)[] = {cat3t(0x,x1,x2), cat3t(0x,x3,x4)};
-
-# define ic(name, value, bexp, xval) ;
-
-#else /* vax or tahoe */
-
- /* Hooray, we have an IEEE machine */
-# undef vccast
-# define vc(name, value, x1,x2,x3,x4, bexp, xval) ;
-
-# define ic(name, value, bexp, xval) \
- const static double name = value;
-
-#endif /* defined(vax)||defined(tahoe) */
-
-
-/*
- * Functions internal to the math package, yet not static.
- */
-extern double __exp__E();
-extern double __log__L();
-
-struct Double {double a, b;};
-double __exp__D __P((double, double));
-struct Double __log__D __P((double));
diff --git a/lib/libm/common_source/pow.c b/lib/libm/common_source/pow.c
deleted file mode 100644
index 9e92985..0000000
--- a/lib/libm/common_source/pow.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)pow.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* POW(X,Y)
- * RETURN X**Y
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 1/8/85;
- * REVISED BY K.C. NG on 7/10/85.
- * KERNEL pow_P() REPLACED BY P. McILROY 7/22/92.
- * Required system supported functions:
- * scalb(x,n)
- * logb(x)
- * copysign(x,y)
- * finite(x)
- * drem(x,y)
- *
- * Required kernel functions:
- * exp__D(a,c) exp(a + c) for |a| << |c|
- * struct d_double dlog(x) r.a + r.b, |r.b| < |r.a|
- *
- * Method
- * 1. Compute and return log(x) in three pieces:
- * log(x) = n*ln2 + hi + lo,
- * where n is an integer.
- * 2. Perform y*log(x) by simulating muti-precision arithmetic and
- * return the answer in three pieces:
- * y*log(x) = m*ln2 + hi + lo,
- * where m is an integer.
- * 3. Return x**y = exp(y*log(x))
- * = 2^m * ( exp(hi+lo) ).
- *
- * Special cases:
- * (anything) ** 0 is 1 ;
- * (anything) ** 1 is itself;
- * (anything) ** NaN is NaN;
- * NaN ** (anything except 0) is NaN;
- * +(anything > 1) ** +INF is +INF;
- * -(anything > 1) ** +INF is NaN;
- * +-(anything > 1) ** -INF is +0;
- * +-(anything < 1) ** +INF is +0;
- * +(anything < 1) ** -INF is +INF;
- * -(anything < 1) ** -INF is NaN;
- * +-1 ** +-INF is NaN and signal INVALID;
- * +0 ** +(anything except 0, NaN) is +0;
- * -0 ** +(anything except 0, NaN, odd integer) is +0;
- * +0 ** -(anything except 0, NaN) is +INF and signal DIV-BY-ZERO;
- * -0 ** -(anything except 0, NaN, odd integer) is +INF with signal;
- * -0 ** (odd integer) = -( +0 ** (odd integer) );
- * +INF ** +(anything except 0,NaN) is +INF;
- * +INF ** -(anything except 0,NaN) is +0;
- * -INF ** (odd integer) = -( +INF ** (odd integer) );
- * -INF ** (even integer) = ( +INF ** (even integer) );
- * -INF ** -(anything except integer,NaN) is NaN with signal;
- * -(x=anything) ** (k=integer) is (-1)**k * (x ** k);
- * -(anything except 0) ** (non-integer) is NaN with signal;
- *
- * Accuracy:
- * pow(x,y) returns x**y nearly rounded. In particular, on a SUN, a VAX,
- * and a Zilog Z8000,
- * pow(integer,integer)
- * always returns the correct integer provided it is representable.
- * In a test run with 100,000 random arguments with 0 < x, y < 20.0
- * on a VAX, the maximum observed error was 1.79 ulps (units in the
- * last place).
- *
- * Constants :
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include <errno.h>
-#include <math.h>
-
-#include "mathimpl.h"
-
-#if (defined(vax) || defined(tahoe))
-#define TRUNC(x) x = (double) (float) x
-#define _IEEE 0
-#else
-#define _IEEE 1
-#define endian (((*(int *) &one)) ? 1 : 0)
-#define TRUNC(x) *(((int *) &x)+endian) &= 0xf8000000
-#define infnan(x) 0.0
-#endif /* vax or tahoe */
-
-const static double zero=0.0, one=1.0, two=2.0, negone= -1.0;
-
-static double pow_P __P((double, double));
-
-double pow(x,y)
-double x,y;
-{
- double t;
- if (y==zero)
- return (one);
- else if (y==one || (_IEEE && x != x))
- return (x); /* if x is NaN or y=1 */
- else if (_IEEE && y!=y) /* if y is NaN */
- return (y);
- else if (!finite(y)) /* if y is INF */
- if ((t=fabs(x))==one) /* +-1 ** +-INF is NaN */
- return (y - y);
- else if (t>one)
- return ((y<0)? zero : ((x<zero)? y-y : y));
- else
- return ((y>0)? zero : ((x<0)? y-y : -y));
- else if (y==two)
- return (x*x);
- else if (y==negone)
- return (one/x);
- /* x > 0, x == +0 */
- else if (copysign(one, x) == one)
- return (pow_P(x, y));
-
- /* sign(x)= -1 */
- /* if y is an even integer */
- else if ( (t=drem(y,two)) == zero)
- return (pow_P(-x, y));
-
- /* if y is an odd integer */
- else if (copysign(t,one) == one)
- return (-pow_P(-x, y));
-
- /* Henceforth y is not an integer */
- else if (x==zero) /* x is -0 */
- return ((y>zero)? -x : one/(-x));
- else if (_IEEE)
- return (zero/zero);
- else
- return (infnan(EDOM));
-}
-/* kernel function for x >= 0 */
-static double
-#ifdef _ANSI_SOURCE
-pow_P(double x, double y)
-#else
-pow_P(x, y) double x, y;
-#endif
-{
- struct Double s, t, __log__D();
- double __exp__D();
- volatile double huge = 1e300, tiny = 1e-300;
-
- if (x == zero)
- if (y > zero)
- return (zero);
- else if (_IEEE)
- return (huge*huge);
- else
- return (infnan(ERANGE));
- if (x == one)
- return (one);
- if (!finite(x))
- if (y < zero)
- return (zero);
- else if (_IEEE)
- return (huge*huge);
- else
- return (infnan(ERANGE));
- if (y >= 7e18) /* infinity */
- if (x < 1)
- return(tiny*tiny);
- else if (_IEEE)
- return (huge*huge);
- else
- return (infnan(ERANGE));
-
- /* Return exp(y*log(x)), using simulated extended */
- /* precision for the log and the multiply. */
-
- s = __log__D(x);
- t.a = y;
- TRUNC(t.a);
- t.b = y - t.a;
- t.b = s.b*y + t.b*s.a;
- t.a *= s.a;
- s.a = t.a + t.b;
- s.b = (t.a - s.a) + t.b;
- return (__exp__D(s.a, s.b));
-}
diff --git a/lib/libm/common_source/rint.3 b/lib/libm/common_source/rint.3
deleted file mode 100644
index 868ebc9..0000000
--- a/lib/libm/common_source/rint.3
+++ /dev/null
@@ -1,115 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)rint.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt RINT 3
-.Os
-.Sh NAME
-.Nm rint
-.Nd round-to-closest integer functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn rint "double x"
-.Sh DESCRIPTION
-The
-.Fn rint
-function finds the integer (represented as a double precision number)
-nearest to
-.Fa x
-in the direction of the prevailing rounding mode.
-.Sh NOTES
-On a
-.Tn VAX ,
-.Fn rint x
-is equivalent to adding half to the magnitude
-and then rounding towards zero.
-.Pp
-In the default rounding mode, to nearest,
-on a machine that conforms to
-.Tn IEEE
-754,
-.Fn rint x
-is the integer nearest
-.Fa x
-with the additional stipulation
-that if
-.Li |rint(x)\-x|=1/2
-then
-.Fn rint x
-is even.
-Other rounding modes can make
-.Fn rint
-act like
-.Fn floor ,
-or like
-.Fn ceil ,
-or round towards zero.
-.Pp
-Another way to obtain an integer near
-.Fa x
-is to declare (in C)
-.Bd -literal -offset indent
-double x;\0\0\0\0 int k;\0\0\0\0k\0=\0x;
-.Ed
-.Pp
-Most C compilers round
-.Fa x
-towards 0 to get the integer
-.Fa k ,
-but
-some do otherwise.
-If in doubt, use
-.Fn floor ,
-.Fn ceil ,
-or
-.Fn rint
-first, whichever you intend.
-Also note that, if x is larger than
-.Fa k
-can accommodate, the value of
-.Fa k
-and the presence or absence of an integer overflow are hard to
-predict.
-.Sh SEE ALSO
-.Xr abs 3 ,
-.Xr ceil 3 ,
-.Xr fabs 3 ,
-.Xr floor 3 ,
-.Xr ieee 3 ,
-.Xr math 3
-.Sh HISTORY
-A
-.Fn rint
-function appeared in
-.At v6 .
diff --git a/lib/libm/common_source/sin.3 b/lib/libm/common_source/sin.3
deleted file mode 100644
index 0eab465..0000000
--- a/lib/libm/common_source/sin.3
+++ /dev/null
@@ -1,72 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" @(#)sin.3 8.1 (Berkeley) 6/4/93
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sin.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SIN 3
-.Os
-.Sh NAME
-.Nm sin
-.Nd sine function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn sin "double x"
-.Sh DESCRIPTION
-The
-.Fn sin
-function computes the sine of
-.Fa x
-(measured in radians).
-A large magnitude argument may yield a result with little
-or no significance.
-.Sh RETURN VALUES
-The
-.Fn sin
-function returns the sine value.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn sin
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/sinh.3 b/lib/libm/common_source/sinh.3
deleted file mode 100644
index 26a1403..0000000
--- a/lib/libm/common_source/sinh.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sinh.3 8.1 (Berkeley) 6/4/93
-.Dd June 4, 1993
-.Dt SINH 3
-.Os
-.Sh NAME
-.Nm sinh
-.Nd hyperbolic sine function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn sinh "double x"
-.Sh DESCRIPTION
-The
-.Fn sinh
-function computes the hyperbolic sine of
-.Fa x .
-.Sh RETURN VALUES
-The
-.Fn sinh
-function returns the hyperbolic sine value unless
-the magnitude
-of
-.Fa x
-is too large; in this event, the global variable
-.Va errno
-is set to
-.Er ERANGE .
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn sinh
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/sinh.c b/lib/libm/common_source/sinh.c
deleted file mode 100644
index 075172c..0000000
--- a/lib/libm/common_source/sinh.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)sinh.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* SINH(X)
- * RETURN THE HYPERBOLIC SINE OF X
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 1/8/85;
- * REVISED BY K.C. NG on 2/8/85, 3/7/85, 3/24/85, 4/16/85.
- *
- * Required system supported functions :
- * copysign(x,y)
- * scalb(x,N)
- *
- * Required kernel functions:
- * expm1(x) ...return exp(x)-1
- *
- * Method :
- * 1. reduce x to non-negative by sinh(-x) = - sinh(x).
- * 2.
- *
- * expm1(x) + expm1(x)/(expm1(x)+1)
- * 0 <= x <= lnovfl : sinh(x) := --------------------------------
- * 2
- * lnovfl <= x <= lnovfl+ln2 : sinh(x) := expm1(x)/2 (avoid overflow)
- * lnovfl+ln2 < x < INF : overflow to INF
- *
- *
- * Special cases:
- * sinh(x) is x if x is +INF, -INF, or NaN.
- * only sinh(0)=0 is exact for finite argument.
- *
- * Accuracy:
- * sinh(x) returns the exact hyperbolic sine of x nearly rounded. In
- * a test run with 1,024,000 random arguments on a VAX, the maximum
- * observed error was 1.93 ulps (units in the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(mln2hi, 8.8029691931113054792E1 ,0f33,43b0,2bdb,c7e2, 7, .B00F33C7E22BDB)
-vc(mln2lo,-4.9650192275318476525E-16 ,1b60,a70f,582a,279e, -50,-.8F1B60279E582A)
-vc(lnovfl, 8.8029691931113053016E1 ,0f33,43b0,2bda,c7e2, 7, .B00F33C7E22BDA)
-
-ic(mln2hi, 7.0978271289338397310E2, 10, 1.62E42FEFA39EF)
-ic(mln2lo, 2.3747039373786107478E-14, -45, 1.ABC9E3B39803F)
-ic(lnovfl, 7.0978271289338397310E2, 9, 1.62E42FEFA39EF)
-
-#ifdef vccast
-#define mln2hi vccast(mln2hi)
-#define mln2lo vccast(mln2lo)
-#define lnovfl vccast(lnovfl)
-#endif
-
-#if defined(vax)||defined(tahoe)
-static max = 126 ;
-#else /* defined(vax)||defined(tahoe) */
-static max = 1023 ;
-#endif /* defined(vax)||defined(tahoe) */
-
-
-double sinh(x)
-double x;
-{
- static const double one=1.0, half=1.0/2.0 ;
- double t, sign;
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- sign=copysign(one,x);
- x=copysign(x,one);
- if(x<lnovfl)
- {t=expm1(x); return(copysign((t+t/(one+t))*half,sign));}
-
- else if(x <= lnovfl+0.7)
- /* subtract x by ln(2^(max+1)) and return 2^max*exp(x)
- to avoid unnecessary overflow */
- return(copysign(scalb(one+expm1((x-mln2hi)-mln2lo),max),sign));
-
- else /* sinh(+-INF) = +-INF, sinh(+-big no.) overflow to +-INF */
- return( expm1(x)*sign );
-}
diff --git a/lib/libm/common_source/sqrt.3 b/lib/libm/common_source/sqrt.3
deleted file mode 100644
index 9c8c22b..0000000
--- a/lib/libm/common_source/sqrt.3
+++ /dev/null
@@ -1,120 +0,0 @@
-.\" Copyright (c) 1985, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)sqrt.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt SQRT 3
-.Os
-.Sh NAME
-.Nm cbrt ,
-.Nm sqrt
-.Nd cube root and square root functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn cbrt "double x"
-.Ft double
-.Fn sqrt "double x"
-.Sh DESCRIPTION
-The
-.Fn cbrt
-function computes
-the cube root of
-.Ar x .
-.Pp
-The
-.Fn sqrt
-computes the
-non-negative square root of x.
-.Sh RETURN VALUES
-The
-.Fn cbrt
-function returns the requested cube root.
-The
-.Fn sqrt
-function returns the requested square root
-unless an error occurs.
-On the
-.Tn VAX
-or
-.Tn Tahoe
-processor an attempt to take the
-.Fn sqrt
-of negative
-.Fa x
-causes an error; in this event,
-the global variable
-.Va errno
-is set to
-.Dv EDOM
-and a reserved operand fault is generated.
-.Sh ERROR (due to Roundoff etc.)
-The
-.Fn cbrt
-function
-is accurate to within 0.7
-.Em ulps .
-.Pp
-The
-.Fn sqrt
-function on a
-.Tn VAX
-is accurate to within 0.501
-.Em ulps .
-Sqrt on a machine that conforms to
-.Tn IEEE
-754 is correctly rounded
-in accordance with the rounding mode in force; the error is less than
-half an
-.Em ulp
-in the default mode (round\-to\-nearest).
-An
-.Em ulp
-is one
-.Em U Ns nit
-in the
-.Em L Ns ast
-.Em P Ns lace
-carried.
-.Sh SEE ALSO
-.Xr infnan 3 ,
-.Xr math 3
-.Sh STANDARDS
-The
-.Nm sqrt
-function conforms to
-.St -ansiC .
-.Sh HISTORY
-The
-.Nm cbrt
-function appeared in
-.Bx 4.3 .
diff --git a/lib/libm/common_source/tan.3 b/lib/libm/common_source/tan.3
deleted file mode 100644
index b0d3767..0000000
--- a/lib/libm/common_source/tan.3
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)tan.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TAN 3
-.Os
-.Sh NAME
-.Nm tan
-.Nd tangent function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn tan "double x"
-.Sh DESCRIPTION
-The
-.Fn tan
-function computes the tangent of
-.Fa x
-(measured in radians).
-A large magnitude argument may yield a result
-with little or no significance.
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn tan
-function returns the tangent value.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn tan
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/tanh.3 b/lib/libm/common_source/tanh.3
deleted file mode 100644
index 2dc6bfc..0000000
--- a/lib/libm/common_source/tanh.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)tanh.3 8.1 (Berkeley) 6/4/93
-.\"
-.Dd June 4, 1993
-.Dt TANH 3
-.Os
-.Sh NAME
-.Nm tanh
-.Nd hyperbolic tangent function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn tanh "double x"
-.Sh DESCRIPTION
-The
-.Fn tanh
-function computes the hyperbolic tangent of
-.Fa x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn tanh
-function returns the hyperbolic tangent value.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3
-.Sh STANDARDS
-The
-.Fn tanh
-function conforms to
-.St -ansiC .
diff --git a/lib/libm/common_source/tanh.c b/lib/libm/common_source/tanh.c
deleted file mode 100644
index 6813b55..0000000
--- a/lib/libm/common_source/tanh.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)tanh.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* TANH(X)
- * RETURN THE HYPERBOLIC TANGENT OF X
- * DOUBLE PRECISION (VAX D FORMAT 56 BITS, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 1/8/85;
- * REVISED BY K.C. NG on 2/8/85, 2/11/85, 3/7/85, 3/24/85.
- *
- * Required system supported functions :
- * copysign(x,y)
- * finite(x)
- *
- * Required kernel function:
- * expm1(x) ...exp(x)-1
- *
- * Method :
- * 1. reduce x to non-negative by tanh(-x) = - tanh(x).
- * 2.
- * 0 < x <= 1.e-10 : tanh(x) := x
- * -expm1(-2x)
- * 1.e-10 < x <= 1 : tanh(x) := --------------
- * expm1(-2x) + 2
- * 2
- * 1 <= x <= 22.0 : tanh(x) := 1 - ---------------
- * expm1(2x) + 2
- * 22.0 < x <= INF : tanh(x) := 1.
- *
- * Note: 22 was chosen so that fl(1.0+2/(expm1(2*22)+2)) == 1.
- *
- * Special cases:
- * tanh(NaN) is NaN;
- * only tanh(0)=0 is exact for finite argument.
- *
- * Accuracy:
- * tanh(x) returns the exact hyperbolic tangent of x nealy rounded.
- * In a test run with 1,024,000 random arguments on a VAX, the maximum
- * observed error was 2.22 ulps (units in the last place).
- */
-
-double tanh(x)
-double x;
-{
- static double one=1.0, two=2.0, small = 1.0e-10, big = 1.0e10;
- double expm1(), t, copysign(), sign;
- int finite();
-
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
-
- sign=copysign(one,x);
- x=copysign(x,one);
- if(x < 22.0)
- if( x > one )
- return(copysign(one-two/(expm1(x+x)+two),sign));
- else if ( x > small )
- {t= -expm1(-(x+x)); return(copysign(t/(two-t),sign));}
- else /* raise the INEXACT flag for non-zero x */
- {big+x; return(copysign(x,sign));}
- else if(finite(x))
- return (sign+1.0E-37); /* raise the INEXACT flag */
- else
- return(sign); /* x is +- INF */
-}
diff --git a/lib/libm/ieee/cabs.c b/lib/libm/ieee/cabs.c
deleted file mode 100644
index 5f1fc62..0000000
--- a/lib/libm/ieee/cabs.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)cabs.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* HYPOT(X,Y)
- * RETURN THE SQUARE ROOT OF X^2 + Y^2 WHERE Z=X+iY
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 11/28/84;
- * REVISED BY K.C. NG, 7/12/85.
- *
- * Required system supported functions :
- * copysign(x,y)
- * finite(x)
- * scalb(x,N)
- * sqrt(x)
- *
- * Method :
- * 1. replace x by |x| and y by |y|, and swap x and
- * y if y > x (hence x is never smaller than y).
- * 2. Hypot(x,y) is computed by:
- * Case I, x/y > 2
- *
- * y
- * hypot = x + -----------------------------
- * 2
- * sqrt ( 1 + [x/y] ) + x/y
- *
- * Case II, x/y <= 2
- * y
- * hypot = x + --------------------------------------------------
- * 2
- * [x/y] - 2
- * (sqrt(2)+1) + (x-y)/y + -----------------------------
- * 2
- * sqrt ( 1 + [x/y] ) + sqrt(2)
- *
- *
- *
- * Special cases:
- * hypot(x,y) is INF if x or y is +INF or -INF; else
- * hypot(x,y) is NAN if x or y is NAN.
- *
- * Accuracy:
- * hypot(x,y) returns the sqrt(x^2+y^2) with error less than 1 ulps (units
- * in the last place). See Kahan's "Interval Arithmetic Options in the
- * Proposed IEEE Floating Point Arithmetic Standard", Interval Mathematics
- * 1980, Edited by Karl L.E. Nickel, pp 99-128. (A faster but less accurate
- * code follows in comments.) In a test run with 500,000 random arguments
- * on a VAX, the maximum observed error was .959 ulps.
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-#include "mathimpl.h"
-
-vc(r2p1hi, 2.4142135623730950345E0 ,8279,411a,ef32,99fc, 2, .9A827999FCEF32)
-vc(r2p1lo, 1.4349369327986523769E-17 ,597d,2484,754b,89b3, -55, .84597D89B3754B)
-vc(sqrt2, 1.4142135623730950622E0 ,04f3,40b5,de65,33f9, 1, .B504F333F9DE65)
-
-ic(r2p1hi, 2.4142135623730949234E0 , 1, 1.3504F333F9DE6)
-ic(r2p1lo, 1.2537167179050217666E-16 , -53, 1.21165F626CDD5)
-ic(sqrt2, 1.4142135623730951455E0 , 0, 1.6A09E667F3BCD)
-
-#ifdef vccast
-#define r2p1hi vccast(r2p1hi)
-#define r2p1lo vccast(r2p1lo)
-#define sqrt2 vccast(sqrt2)
-#endif
-
-double
-hypot(x,y)
-double x, y;
-{
- static const double zero=0, one=1,
- small=1.0E-18; /* fl(1+small)==1 */
- static const ibig=30; /* fl(1+2**(2*ibig))==1 */
- double t,r;
- int exp;
-
- if(finite(x))
- if(finite(y))
- {
- x=copysign(x,one);
- y=copysign(y,one);
- if(y > x)
- { t=x; x=y; y=t; }
- if(x == zero) return(zero);
- if(y == zero) return(x);
- exp= logb(x);
- if(exp-(int)logb(y) > ibig )
- /* raise inexact flag and return |x| */
- { one+small; return(x); }
-
- /* start computing sqrt(x^2 + y^2) */
- r=x-y;
- if(r>y) { /* x/y > 2 */
- r=x/y;
- r=r+sqrt(one+r*r); }
- else { /* 1 <= x/y <= 2 */
- r/=y; t=r*(r+2.0);
- r+=t/(sqrt2+sqrt(2.0+t));
- r+=r2p1lo; r+=r2p1hi; }
-
- r=y/r;
- return(x+r);
-
- }
-
- else if(y==y) /* y is +-INF */
- return(copysign(y,one));
- else
- return(y); /* y is NaN and x is finite */
-
- else if(x==x) /* x is +-INF */
- return (copysign(x,one));
- else if(finite(y))
- return(x); /* x is NaN, y is finite */
-#if !defined(vax)&&!defined(tahoe)
- else if(y!=y) return(y); /* x and y is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- else return(copysign(y,one)); /* y is INF */
-}
-
-/* CABS(Z)
- * RETURN THE ABSOLUTE VALUE OF THE COMPLEX NUMBER Z = X + iY
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * CODED IN C BY K.C. NG, 11/28/84.
- * REVISED BY K.C. NG, 7/12/85.
- *
- * Required kernel function :
- * hypot(x,y)
- *
- * Method :
- * cabs(z) = hypot(x,y) .
- */
-
-struct complex { double x, y; };
-
-double
-cabs(z)
-struct complex z;
-{
- return hypot(z.x,z.y);
-}
-
-double
-z_abs(z)
-struct complex *z;
-{
- return hypot(z->x,z->y);
-}
-
-/* A faster but less accurate version of cabs(x,y) */
-#if 0
-double hypot(x,y)
-double x, y;
-{
- static const double zero=0, one=1;
- small=1.0E-18; /* fl(1+small)==1 */
- static const ibig=30; /* fl(1+2**(2*ibig))==1 */
- double temp;
- int exp;
-
- if(finite(x))
- if(finite(y))
- {
- x=copysign(x,one);
- y=copysign(y,one);
- if(y > x)
- { temp=x; x=y; y=temp; }
- if(x == zero) return(zero);
- if(y == zero) return(x);
- exp= logb(x);
- x=scalb(x,-exp);
- if(exp-(int)logb(y) > ibig )
- /* raise inexact flag and return |x| */
- { one+small; return(scalb(x,exp)); }
- else y=scalb(y,-exp);
- return(scalb(sqrt(x*x+y*y),exp));
- }
-
- else if(y==y) /* y is +-INF */
- return(copysign(y,one));
- else
- return(y); /* y is NaN and x is finite */
-
- else if(x==x) /* x is +-INF */
- return (copysign(x,one));
- else if(finite(y))
- return(x); /* x is NaN, y is finite */
- else if(y!=y) return(y); /* x and y is NaN */
- else return(copysign(y,one)); /* y is INF */
-}
-#endif
diff --git a/lib/libm/ieee/cbrt.c b/lib/libm/ieee/cbrt.c
deleted file mode 100644
index 6d73779..0000000
--- a/lib/libm/ieee/cbrt.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)cbrt.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <sys/cdefs.h>
-
-/* kahan's cube root (53 bits IEEE double precision)
- * for IEEE machines only
- * coded in C by K.C. Ng, 4/30/85
- *
- * Accuracy:
- * better than 0.667 ulps according to an error analysis. Maximum
- * error observed was 0.666 ulps in an 1,000,000 random arguments test.
- *
- * Warning: this code is semi machine dependent; the ordering of words in
- * a floating point number must be known in advance. I assume that the
- * long interger at the address of a floating point number will be the
- * leading 32 bits of that floating point number (i.e., sign, exponent,
- * and the 20 most significant bits).
- * On a National machine, it has different ordering; therefore, this code
- * must be compiled with flag -DNATIONAL.
- */
-#if !defined(vax)&&!defined(tahoe)
-
-static const unsigned long
- B1 = 715094163, /* B1 = (682-0.03306235651)*2**20 */
- B2 = 696219795; /* B2 = (664-0.03306235651)*2**20 */
-static const double
- C= 19./35.,
- D= -864./1225.,
- E= 99./70.,
- F= 45./28.,
- G= 5./14.;
-
-double cbrt(x)
-double x;
-{
- double r,s,t=0.0,w;
- unsigned long *px = (unsigned long *) &x,
- *pt = (unsigned long *) &t,
- mexp,sign;
-
-#ifdef national /* ordering of words in a floating points number */
- const int n0=1,n1=0;
-#else /* national */
- const int n0=0,n1=1;
-#endif /* national */
-
- mexp=px[n0]&0x7ff00000;
- if(mexp==0x7ff00000) return(x); /* cbrt(NaN,INF) is itself */
- if(x==0.0) return(x); /* cbrt(0) is itself */
-
- sign=px[n0]&0x80000000; /* sign= sign(x) */
- px[n0] ^= sign; /* x=|x| */
-
-
- /* rough cbrt to 5 bits */
- if(mexp==0) /* subnormal number */
- {pt[n0]=0x43500000; /* set t= 2**54 */
- t*=x; pt[n0]=pt[n0]/3+B2;
- }
- else
- pt[n0]=px[n0]/3+B1;
-
-
- /* new cbrt to 23 bits, may be implemented in single precision */
- r=t*t/x;
- s=C+r*t;
- t*=G+F/(s+E+D/s);
-
- /* chopped to 20 bits and make it larger than cbrt(x) */
- pt[n1]=0; pt[n0]+=0x00000001;
-
-
- /* one step newton iteration to 53 bits with error less than 0.667 ulps */
- s=t*t; /* t*t is exact */
- r=x/s;
- w=t+t;
- r=(r-t)/(w+r); /* r-t is exact */
- t=t+t*r;
-
-
- /* retore the sign bit */
- pt[n0] |= sign;
- return(t);
-}
-#endif
diff --git a/lib/libm/ieee/support.c b/lib/libm/ieee/support.c
deleted file mode 100644
index 0ae10bb..0000000
--- a/lib/libm/ieee/support.c
+++ /dev/null
@@ -1,524 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)support.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/*
- * Some IEEE standard 754 recommended functions and remainder and sqrt for
- * supporting the C elementary functions.
- ******************************************************************************
- * WARNING:
- * These codes are developed (in double) to support the C elementary
- * functions temporarily. They are not universal, and some of them are very
- * slow (in particular, drem and sqrt is extremely inefficient). Each
- * computer system should have its implementation of these functions using
- * its own assembler.
- ******************************************************************************
- *
- * IEEE 754 required operations:
- * drem(x,p)
- * returns x REM y = x - [x/y]*y , where [x/y] is the integer
- * nearest x/y; in half way case, choose the even one.
- * sqrt(x)
- * returns the square root of x correctly rounded according to
- * the rounding mod.
- *
- * IEEE 754 recommended functions:
- * (a) copysign(x,y)
- * returns x with the sign of y.
- * (b) scalb(x,N)
- * returns x * (2**N), for integer values N.
- * (c) logb(x)
- * returns the unbiased exponent of x, a signed integer in
- * double precision, except that logb(0) is -INF, logb(INF)
- * is +INF, and logb(NAN) is that NAN.
- * (d) finite(x)
- * returns the value TRUE if -INF < x < +INF and returns
- * FALSE otherwise.
- *
- *
- * CODED IN C BY K.C. NG, 11/25/84;
- * REVISED BY K.C. NG on 1/22/85, 2/13/85, 3/24/85.
- */
-
-#include "mathimpl.h"
-
-#if defined(vax)||defined(tahoe) /* VAX D format */
-#include <errno.h>
- static const unsigned short msign=0x7fff , mexp =0x7f80 ;
- static const short prep1=57, gap=7, bias=129 ;
- static const double novf=1.7E38, nunf=3.0E-39, zero=0.0 ;
-#else /* defined(vax)||defined(tahoe) */
- static const unsigned short msign=0x7fff, mexp =0x7ff0 ;
- static const short prep1=54, gap=4, bias=1023 ;
- static const double novf=1.7E308, nunf=3.0E-308,zero=0.0;
-#endif /* defined(vax)||defined(tahoe) */
-
-double scalb(x,N)
-double x; int N;
-{
- int k;
-
-#ifdef national
- unsigned short *px=(unsigned short *) &x + 3;
-#else /* national */
- unsigned short *px=(unsigned short *) &x;
-#endif /* national */
-
- if( x == zero ) return(x);
-
-#if defined(vax)||defined(tahoe)
- if( (k= *px & mexp ) != ~msign ) {
- if (N < -260)
- return(nunf*nunf);
- else if (N > 260) {
- return(copysign(infnan(ERANGE),x));
- }
-#else /* defined(vax)||defined(tahoe) */
- if( (k= *px & mexp ) != mexp ) {
- if( N<-2100) return(nunf*nunf); else if(N>2100) return(novf+novf);
- if( k == 0 ) {
- x *= scalb(1.0,(int)prep1); N -= prep1; return(scalb(x,N));}
-#endif /* defined(vax)||defined(tahoe) */
-
- if((k = (k>>gap)+ N) > 0 )
- if( k < (mexp>>gap) ) *px = (*px&~mexp) | (k<<gap);
- else x=novf+novf; /* overflow */
- else
- if( k > -prep1 )
- /* gradual underflow */
- {*px=(*px&~mexp)|(short)(1<<gap); x *= scalb(1.0,k-1);}
- else
- return(nunf*nunf);
- }
- return(x);
-}
-
-
-double copysign(x,y)
-double x,y;
-{
-#ifdef national
- unsigned short *px=(unsigned short *) &x+3,
- *py=(unsigned short *) &y+3;
-#else /* national */
- unsigned short *px=(unsigned short *) &x,
- *py=(unsigned short *) &y;
-#endif /* national */
-
-#if defined(vax)||defined(tahoe)
- if ( (*px & mexp) == 0 ) return(x);
-#endif /* defined(vax)||defined(tahoe) */
-
- *px = ( *px & msign ) | ( *py & ~msign );
- return(x);
-}
-
-double logb(x)
-double x;
-{
-
-#ifdef national
- short *px=(short *) &x+3, k;
-#else /* national */
- short *px=(short *) &x, k;
-#endif /* national */
-
-#if defined(vax)||defined(tahoe)
- return (int)(((*px&mexp)>>gap)-bias);
-#else /* defined(vax)||defined(tahoe) */
- if( (k= *px & mexp ) != mexp )
- if ( k != 0 )
- return ( (k>>gap) - bias );
- else if( x != zero)
- return ( -1022.0 );
- else
- return(-(1.0/zero));
- else if(x != x)
- return(x);
- else
- {*px &= msign; return(x);}
-#endif /* defined(vax)||defined(tahoe) */
-}
-
-finite(x)
-double x;
-{
-#if defined(vax)||defined(tahoe)
- return(1);
-#else /* defined(vax)||defined(tahoe) */
-#ifdef national
- return( (*((short *) &x+3 ) & mexp ) != mexp );
-#else /* national */
- return( (*((short *) &x ) & mexp ) != mexp );
-#endif /* national */
-#endif /* defined(vax)||defined(tahoe) */
-}
-
-double drem(x,p)
-double x,p;
-{
- short sign;
- double hp,dp,tmp;
- unsigned short k;
-#ifdef national
- unsigned short
- *px=(unsigned short *) &x +3,
- *pp=(unsigned short *) &p +3,
- *pd=(unsigned short *) &dp +3,
- *pt=(unsigned short *) &tmp+3;
-#else /* national */
- unsigned short
- *px=(unsigned short *) &x ,
- *pp=(unsigned short *) &p ,
- *pd=(unsigned short *) &dp ,
- *pt=(unsigned short *) &tmp;
-#endif /* national */
-
- *pp &= msign ;
-
-#if defined(vax)||defined(tahoe)
- if( ( *px & mexp ) == ~msign ) /* is x a reserved operand? */
-#else /* defined(vax)||defined(tahoe) */
- if( ( *px & mexp ) == mexp )
-#endif /* defined(vax)||defined(tahoe) */
- return (x-p)-(x-p); /* create nan if x is inf */
- if (p == zero) {
-#if defined(vax)||defined(tahoe)
- return(infnan(EDOM));
-#else /* defined(vax)||defined(tahoe) */
- return zero/zero;
-#endif /* defined(vax)||defined(tahoe) */
- }
-
-#if defined(vax)||defined(tahoe)
- if( ( *pp & mexp ) == ~msign ) /* is p a reserved operand? */
-#else /* defined(vax)||defined(tahoe) */
- if( ( *pp & mexp ) == mexp )
-#endif /* defined(vax)||defined(tahoe) */
- { if (p != p) return p; else return x;}
-
- else if ( ((*pp & mexp)>>gap) <= 1 )
- /* subnormal p, or almost subnormal p */
- { double b; b=scalb(1.0,(int)prep1);
- p *= b; x = drem(x,p); x *= b; return(drem(x,p)/b);}
- else if ( p >= novf/2)
- { p /= 2 ; x /= 2; return(drem(x,p)*2);}
- else
- {
- dp=p+p; hp=p/2;
- sign= *px & ~msign ;
- *px &= msign ;
- while ( x > dp )
- {
- k=(*px & mexp) - (*pd & mexp) ;
- tmp = dp ;
- *pt += k ;
-
-#if defined(vax)||defined(tahoe)
- if( x < tmp ) *pt -= 128 ;
-#else /* defined(vax)||defined(tahoe) */
- if( x < tmp ) *pt -= 16 ;
-#endif /* defined(vax)||defined(tahoe) */
-
- x -= tmp ;
- }
- if ( x > hp )
- { x -= p ; if ( x >= hp ) x -= p ; }
-
-#if defined(vax)||defined(tahoe)
- if (x)
-#endif /* defined(vax)||defined(tahoe) */
- *px ^= sign;
- return( x);
-
- }
-}
-
-
-double sqrt(x)
-double x;
-{
- double q,s,b,r;
- double t;
- double const zero=0.0;
- int m,n,i;
-#if defined(vax)||defined(tahoe)
- int k=54;
-#else /* defined(vax)||defined(tahoe) */
- int k=51;
-#endif /* defined(vax)||defined(tahoe) */
-
- /* sqrt(NaN) is NaN, sqrt(+-0) = +-0 */
- if(x!=x||x==zero) return(x);
-
- /* sqrt(negative) is invalid */
- if(x<zero) {
-#if defined(vax)||defined(tahoe)
- return (infnan(EDOM)); /* NaN */
-#else /* defined(vax)||defined(tahoe) */
- return(zero/zero);
-#endif /* defined(vax)||defined(tahoe) */
- }
-
- /* sqrt(INF) is INF */
- if(!finite(x)) return(x);
-
- /* scale x to [1,4) */
- n=logb(x);
- x=scalb(x,-n);
- if((m=logb(x))!=0) x=scalb(x,-m); /* subnormal number */
- m += n;
- n = m/2;
- if((n+n)!=m) {x *= 2; m -=1; n=m/2;}
-
- /* generate sqrt(x) bit by bit (accumulating in q) */
- q=1.0; s=4.0; x -= 1.0; r=1;
- for(i=1;i<=k;i++) {
- t=s+1; x *= 4; r /= 2;
- if(t<=x) {
- s=t+t+2, x -= t; q += r;}
- else
- s *= 2;
- }
-
- /* generate the last bit and determine the final rounding */
- r/=2; x *= 4;
- if(x==zero) goto end; 100+r; /* trigger inexact flag */
- if(s<x) {
- q+=r; x -=s; s += 2; s *= 2; x *= 4;
- t = (x-s)-5;
- b=1.0+3*r/4; if(b==1.0) goto end; /* b==1 : Round-to-zero */
- b=1.0+r/4; if(b>1.0) t=1; /* b>1 : Round-to-(+INF) */
- if(t>=0) q+=r; } /* else: Round-to-nearest */
- else {
- s *= 2; x *= 4;
- t = (x-s)-1;
- b=1.0+3*r/4; if(b==1.0) goto end;
- b=1.0+r/4; if(b>1.0) t=1;
- if(t>=0) q+=r; }
-
-end: return(scalb(q,n));
-}
-
-#if 0
-/* DREM(X,Y)
- * RETURN X REM Y =X-N*Y, N=[X/Y] ROUNDED (ROUNDED TO EVEN IN THE HALF WAY CASE)
- * DOUBLE PRECISION (VAX D format 56 bits, IEEE DOUBLE 53 BITS)
- * INTENDED FOR ASSEMBLY LANGUAGE
- * CODED IN C BY K.C. NG, 3/23/85, 4/8/85.
- *
- * Warning: this code should not get compiled in unless ALL of
- * the following machine-dependent routines are supplied.
- *
- * Required machine dependent functions (not on a VAX):
- * swapINX(i): save inexact flag and reset it to "i"
- * swapENI(e): save inexact enable and reset it to "e"
- */
-
-double drem(x,y)
-double x,y;
-{
-
-#ifdef national /* order of words in floating point number */
- static const n0=3,n1=2,n2=1,n3=0;
-#else /* VAX, SUN, ZILOG, TAHOE */
- static const n0=0,n1=1,n2=2,n3=3;
-#endif
-
- static const unsigned short mexp =0x7ff0, m25 =0x0190, m57 =0x0390;
- static const double zero=0.0;
- double hy,y1,t,t1;
- short k;
- long n;
- int i,e;
- unsigned short xexp,yexp, *px =(unsigned short *) &x ,
- nx,nf, *py =(unsigned short *) &y ,
- sign, *pt =(unsigned short *) &t ,
- *pt1 =(unsigned short *) &t1 ;
-
- xexp = px[n0] & mexp ; /* exponent of x */
- yexp = py[n0] & mexp ; /* exponent of y */
- sign = px[n0] &0x8000; /* sign of x */
-
-/* return NaN if x is NaN, or y is NaN, or x is INF, or y is zero */
- if(x!=x) return(x); if(y!=y) return(y); /* x or y is NaN */
- if( xexp == mexp ) return(zero/zero); /* x is INF */
- if(y==zero) return(y/y);
-
-/* save the inexact flag and inexact enable in i and e respectively
- * and reset them to zero
- */
- i=swapINX(0); e=swapENI(0);
-
-/* subnormal number */
- nx=0;
- if(yexp==0) {t=1.0,pt[n0]+=m57; y*=t; nx=m57;}
-
-/* if y is tiny (biased exponent <= 57), scale up y to y*2**57 */
- if( yexp <= m57 ) {py[n0]+=m57; nx+=m57; yexp+=m57;}
-
- nf=nx;
- py[n0] &= 0x7fff;
- px[n0] &= 0x7fff;
-
-/* mask off the least significant 27 bits of y */
- t=y; pt[n3]=0; pt[n2]&=0xf800; y1=t;
-
-/* LOOP: argument reduction on x whenever x > y */
-loop:
- while ( x > y )
- {
- t=y;
- t1=y1;
- xexp=px[n0]&mexp; /* exponent of x */
- k=xexp-yexp-m25;
- if(k>0) /* if x/y >= 2**26, scale up y so that x/y < 2**26 */
- {pt[n0]+=k;pt1[n0]+=k;}
- n=x/t; x=(x-n*t1)-n*(t-t1);
- }
- /* end while (x > y) */
-
- if(nx!=0) {t=1.0; pt[n0]+=nx; x*=t; nx=0; goto loop;}
-
-/* final adjustment */
-
- hy=y/2.0;
- if(x>hy||((x==hy)&&n%2==1)) x-=y;
- px[n0] ^= sign;
- if(nf!=0) { t=1.0; pt[n0]-=nf; x*=t;}
-
-/* restore inexact flag and inexact enable */
- swapINX(i); swapENI(e);
-
- return(x);
-}
-#endif
-
-#if 0
-/* SQRT
- * RETURN CORRECTLY ROUNDED (ACCORDING TO THE ROUNDING MODE) SQRT
- * FOR IEEE DOUBLE PRECISION ONLY, INTENDED FOR ASSEMBLY LANGUAGE
- * CODED IN C BY K.C. NG, 3/22/85.
- *
- * Warning: this code should not get compiled in unless ALL of
- * the following machine-dependent routines are supplied.
- *
- * Required machine dependent functions:
- * swapINX(i) ...return the status of INEXACT flag and reset it to "i"
- * swapRM(r) ...return the current Rounding Mode and reset it to "r"
- * swapENI(e) ...return the status of inexact enable and reset it to "e"
- * addc(t) ...perform t=t+1 regarding t as a 64 bit unsigned integer
- * subc(t) ...perform t=t-1 regarding t as a 64 bit unsigned integer
- */
-
-static const unsigned long table[] = {
-0, 1204, 3062, 5746, 9193, 13348, 18162, 23592, 29598, 36145, 43202, 50740,
-58733, 67158, 75992, 85215, 83599, 71378, 60428, 50647, 41945, 34246, 27478,
-21581, 16499, 12183, 8588, 5674, 3403, 1742, 661, 130, };
-
-double newsqrt(x)
-double x;
-{
- double y,z,t,addc(),subc()
- double const b54=134217728.*134217728.; /* b54=2**54 */
- long mx,scalx;
- long const mexp=0x7ff00000;
- int i,j,r,e,swapINX(),swapRM(),swapENI();
- unsigned long *py=(unsigned long *) &y ,
- *pt=(unsigned long *) &t ,
- *px=(unsigned long *) &x ;
-#ifdef national /* ordering of word in a floating point number */
- const int n0=1, n1=0;
-#else
- const int n0=0, n1=1;
-#endif
-/* Rounding Mode: RN ...round-to-nearest
- * RZ ...round-towards 0
- * RP ...round-towards +INF
- * RM ...round-towards -INF
- */
- const int RN=0,RZ=1,RP=2,RM=3;
- /* machine dependent: work on a Zilog Z8070
- * and a National 32081 & 16081
- */
-
-/* exceptions */
- if(x!=x||x==0.0) return(x); /* sqrt(NaN) is NaN, sqrt(+-0) = +-0 */
- if(x<0) return((x-x)/(x-x)); /* sqrt(negative) is invalid */
- if((mx=px[n0]&mexp)==mexp) return(x); /* sqrt(+INF) is +INF */
-
-/* save, reset, initialize */
- e=swapENI(0); /* ...save and reset the inexact enable */
- i=swapINX(0); /* ...save INEXACT flag */
- r=swapRM(RN); /* ...save and reset the Rounding Mode to RN */
- scalx=0;
-
-/* subnormal number, scale up x to x*2**54 */
- if(mx==0) {x *= b54 ; scalx-=0x01b00000;}
-
-/* scale x to avoid intermediate over/underflow:
- * if (x > 2**512) x=x/2**512; if (x < 2**-512) x=x*2**512 */
- if(mx>0x5ff00000) {px[n0] -= 0x20000000; scalx+= 0x10000000;}
- if(mx<0x1ff00000) {px[n0] += 0x20000000; scalx-= 0x10000000;}
-
-/* magic initial approximation to almost 8 sig. bits */
- py[n0]=(px[n0]>>1)+0x1ff80000;
- py[n0]=py[n0]-table[(py[n0]>>15)&31];
-
-/* Heron's rule once with correction to improve y to almost 18 sig. bits */
- t=x/y; y=y+t; py[n0]=py[n0]-0x00100006; py[n1]=0;
-
-/* triple to almost 56 sig. bits; now y approx. sqrt(x) to within 1 ulp */
- t=y*y; z=t; pt[n0]+=0x00100000; t+=z; z=(x-z)*y;
- t=z/(t+x) ; pt[n0]+=0x00100000; y+=t;
-
-/* twiddle last bit to force y correctly rounded */
- swapRM(RZ); /* ...set Rounding Mode to round-toward-zero */
- swapINX(0); /* ...clear INEXACT flag */
- swapENI(e); /* ...restore inexact enable status */
- t=x/y; /* ...chopped quotient, possibly inexact */
- j=swapINX(i); /* ...read and restore inexact flag */
- if(j==0) { if(t==y) goto end; else t=subc(t); } /* ...t=t-ulp */
- b54+0.1; /* ..trigger inexact flag, sqrt(x) is inexact */
- if(r==RN) t=addc(t); /* ...t=t+ulp */
- else if(r==RP) { t=addc(t);y=addc(y);}/* ...t=t+ulp;y=y+ulp; */
- y=y+t; /* ...chopped sum */
- py[n0]=py[n0]-0x00100000; /* ...correctly rounded sqrt(x) */
-end: py[n0]=py[n0]+scalx; /* ...scale back y */
- swapRM(r); /* ...restore Rounding Mode */
- return(y);
-}
-#endif
diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile
deleted file mode 100644
index 270bd26..0000000
--- a/lib/libmd/Makefile
+++ /dev/null
@@ -1,93 +0,0 @@
-# $Id: Makefile,v 1.23 1997/02/22 15:07:10 peter Exp $
-
-LIB= md
-.if ${BINFORMAT} != elf
-NOPIC= true
-.endif
-SRCS= md2c.c md4c.c md5c.c md2hl.c md4hl.c md5hl.c
-MAN3+= md2.3 md4.3 md5.3
-MLINKS+=md2.3 MD2Init.3 md2.3 MD2Update.3 md2.3 MD2Final.3
-MLINKS+=md2.3 MD2End.3 md2.3 MD2File.3 md2.3 MD2Data.3
-MLINKS+=md4.3 MD4Init.3 md4.3 MD4Update.3 md4.3 MD4Final.3
-MLINKS+=md4.3 MD4End.3 md4.3 MD4File.3 md4.3 MD4Data.3
-MLINKS+=md5.3 MD5Init.3 md5.3 MD5Update.3 md5.3 MD5Final.3
-MLINKS+=md5.3 MD5End.3 md5.3 MD5File.3 md5.3 MD5Data.3
-CLEANFILES+= md[245]hl.c md[245].ref md[245].3 mddriver
-CFLAGS+= -I${.CURDIR}
-
-all: md2.3 md4.3 md5.3
-
-md2hl.c: mdXhl.c
- sed -e 's/mdX/md2/g' -e 's/MDX/MD2/g' $> > $@
-
-md4hl.c: mdXhl.c
- sed -e 's/mdX/md4/g' -e 's/MDX/MD4/g' $> > $@
-
-md5hl.c: mdXhl.c
- sed -e 's/mdX/md5/g' -e 's/MDX/MD5/g' $> > $@
-
-md2.3: ${.CURDIR}/mdX.3
- sed -e 's/mdX/md2/g' -e 's/MDX/MD2/g' $> > $@
- cat ${.CURDIR}/md2.copyright >> $@
-
-md4.3: ${.CURDIR}/mdX.3
- sed -e 's/mdX/md4/g' -e 's/MDX/MD4/g' $> > $@
- cat ${.CURDIR}/md4.copyright >> $@
-
-md5.3: ${.CURDIR}/mdX.3
- sed -e 's/mdX/md5/g' -e 's/MDX/MD5/g' $> > $@
- cat ${.CURDIR}/md5.copyright >> $@
-
-md2.ref:
- echo 'MD2 test suite:' > $@
- @echo 'MD2 ("") = 8350e5a3e24c153df2275c9f80692773' >> $@
- @echo 'MD2 ("a") = 32ec01ec4a6dac72c0ab96fb34c0b5d1' >> $@
- @echo 'MD2 ("abc") = da853b0d3f88d99b30283a69e6ded6bb' >> $@
- @echo 'MD2 ("message digest") = ab4f496bfb2a530b219ff33031fe06b0' >> $@
- @echo 'MD2 ("abcdefghijklmnopqrstuvwxyz") = 4e8ddff3650292ab5a4108c3aa47940b' >> $@
- @echo 'MD2 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = da33def2a42df13975352846c30338cd' >> $@
- @echo 'MD2 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = d5976f79d83d3a0dc9806c3c66f3efd8' >> $@
-
-md4.ref:
- echo 'MD4 test suite:' > $@
- @echo 'MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0' >> $@
- @echo 'MD4 ("a") = bde52cb31de33e46245e05fbdbd6fb24' >> $@
- @echo 'MD4 ("abc") = a448017aaf21d8525fc10ae87aa6729d' >> $@
- @echo 'MD4 ("message digest") = d9130a8164549fe818874806e1c7014b' >> $@
- @echo 'MD4 ("abcdefghijklmnopqrstuvwxyz") = d79e1c308aa5bbcdeea8ed63df412da9' >> $@
- @echo 'MD4 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = 043f8582f241db351ce627e153e7f0e4' >> $@
- @echo 'MD4 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = e33b4ddc9c38f2199c3e7b164fcc0536' >> $@
-
-md5.ref:
- echo 'MD5 test suite:' > $@
- @echo 'MD5 ("") = d41d8cd98f00b204e9800998ecf8427e' >> $@
- @echo 'MD5 ("a") = 0cc175b9c0f1b6a831c399e269772661' >> $@
- @echo 'MD5 ("abc") = 900150983cd24fb0d6963f7d28e17f72' >> $@
- @echo 'MD5 ("message digest") = f96b697d7cb7938d525a2f31aaf161d0' >> $@
- @echo 'MD5 ("abcdefghijklmnopqrstuvwxyz") = c3fcd3d76192e4007dfb496cca67e13b' >> $@
- @echo 'MD5 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = d174ab98d277d9f5a5611c2c9f419d9f' >> $@
- @echo 'MD5 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 57edf4a22be3c955ac49da2e2107b67a' >> $@
-
-test: md2.ref md4.ref md5.ref
- @${ECHO} if any of these test fail, the code produces wrong results
- @${ECHO} and should NOT be used.
- ${CC} -static ${CFLAGS} ${LDFLAGS} -DMD=2 -o mddriver ${.CURDIR}/mddriver.c -L. -lmd
- ./mddriver | cmp md2.ref -
- @${ECHO} MD2 passed test
- ${CC} -static ${CFLAGS} ${LDFLAGS} -DMD=4 -o mddriver ${.CURDIR}/mddriver.c -L. -lmd
- ./mddriver | cmp md4.ref -
- @${ECHO} MD4 passed test
- ${CC} -static ${CFLAGS} ${LDFLAGS} -DMD=5 -o mddriver ${.CURDIR}/mddriver.c -L. -lmd
- ./mddriver | cmp md5.ref -
- @${ECHO} MD5 passed test
- -rm -f mddriver
-
-beforedepend: md2hl.c md4hl.c md5hl.c
-
-beforeinstall:
-.for i in md2.h md4.h md5.h
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/$i \
- ${DESTDIR}/usr/include
-.endfor
-
-.include <bsd.lib.mk>
diff --git a/lib/libmd/md2.copyright b/lib/libmd/md2.copyright
deleted file mode 100644
index 5f04560..0000000
--- a/lib/libmd/md2.copyright
+++ /dev/null
@@ -1,17 +0,0 @@
-.\" $Id$
-Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
-rights reserved.
-.Pp
-License to copy and use this software is granted for
-non-commercial Internet Privacy-Enhanced Mail provided that it is
-identified as the "RSA Data Security, Inc. MD2 Message Digest
-Algorithm" in all material mentioning or referencing this software
-or this function.
-.Pp
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
-.Pp
-These notices must be retained in any copies of any part of this
-documentation and/or software.
diff --git a/lib/libmd/md2.h b/lib/libmd/md2.h
deleted file mode 100644
index 73e8b5a..0000000
--- a/lib/libmd/md2.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* MD2.H - header file for MD2C.C
- * $Id: md2.h,v 1.5 1997/02/22 15:07:12 peter Exp $
- */
-
-/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
- rights reserved.
-
- License to copy and use this software is granted for
- non-commercial Internet Privacy-Enhanced Mail provided that it is
- identified as the "RSA Data Security, Inc. MD2 Message Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
- */
-
-#ifndef _MD2_H_
-#define _MD2_H_
-
-typedef struct MD2Context {
- unsigned char state[16]; /* state */
- unsigned char checksum[16]; /* checksum */
- unsigned int count; /* number of bytes, modulo 16 */
- unsigned char buffer[16]; /* input buffer */
-} MD2_CTX;
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-void MD2Init(MD2_CTX *);
-void MD2Update(MD2_CTX *, const unsigned char *, unsigned int);
-void MD2Final(unsigned char [16], MD2_CTX *);
-char * MD2End(MD2_CTX *, char *);
-char * MD2File(const char *, char *);
-char * MD2Data(const unsigned char *, unsigned int, char *);
-__END_DECLS
-
-#endif /* _MD2_H_ */
diff --git a/lib/libmd/md2c.c b/lib/libmd/md2c.c
deleted file mode 100644
index ebf9edc..0000000
--- a/lib/libmd/md2c.c
+++ /dev/null
@@ -1,199 +0,0 @@
-/* MD2C.C - RSA Data Security, Inc., MD2 message-digest algorithm
- * $Id$
- */
-
-/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
- rights reserved.
-
- License to copy and use this software is granted for
- non-commercial Internet Privacy-Enhanced Mail provided that it is
- identified as the "RSA Data Security, Inc. MD2 Message Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
- */
-
-#include "md2.h"
-#include <string.h>
-#include <sys/types.h>
-
-
-typedef unsigned char *POINTER;
-typedef u_int16_t UINT2;
-typedef u_int32_t UINT4;
-
-#define PROTO_LIST(list) list
-
-static void MD2Transform PROTO_LIST
- ((unsigned char [16], unsigned char [16], const unsigned char [16]));
-
-/* Permutation of 0..255 constructed from the digits of pi. It gives a
- "random" nonlinear byte substitution operation.
- */
-static unsigned char PI_SUBST[256] = {
- 41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6,
- 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188,
- 76, 130, 202, 30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24,
- 138, 23, 229, 18, 190, 78, 196, 214, 218, 158, 222, 73, 160, 251,
- 245, 142, 187, 47, 238, 122, 169, 104, 121, 145, 21, 178, 7, 63,
- 148, 194, 16, 137, 11, 34, 95, 33, 128, 127, 93, 154, 90, 144, 50,
- 39, 53, 62, 204, 231, 191, 247, 151, 3, 255, 25, 48, 179, 72, 165,
- 181, 209, 215, 94, 146, 42, 172, 86, 170, 198, 79, 184, 56, 210,
- 150, 164, 125, 182, 118, 252, 107, 226, 156, 116, 4, 241, 69, 157,
- 112, 89, 100, 113, 135, 32, 134, 91, 207, 101, 230, 45, 168, 2, 27,
- 96, 37, 173, 174, 176, 185, 246, 28, 70, 97, 105, 52, 64, 126, 15,
- 85, 71, 163, 35, 221, 81, 175, 58, 195, 92, 249, 206, 186, 197,
- 234, 38, 44, 83, 13, 110, 133, 40, 132, 9, 211, 223, 205, 244, 65,
- 129, 77, 82, 106, 220, 55, 200, 108, 193, 171, 250, 36, 225, 123,
- 8, 12, 189, 177, 74, 120, 136, 149, 139, 227, 99, 232, 109, 233,
- 203, 213, 254, 59, 0, 29, 57, 242, 239, 183, 14, 102, 88, 208, 228,
- 166, 119, 114, 248, 235, 117, 75, 10, 49, 68, 80, 180, 143, 237,
- 31, 26, 219, 153, 141, 51, 159, 17, 131, 20
-};
-
-static unsigned char *PADDING[] = {
- (unsigned char *)"",
- (unsigned char *)"\001",
- (unsigned char *)"\002\002",
- (unsigned char *)"\003\003\003",
- (unsigned char *)"\004\004\004\004",
- (unsigned char *)"\005\005\005\005\005",
- (unsigned char *)"\006\006\006\006\006\006",
- (unsigned char *)"\007\007\007\007\007\007\007",
- (unsigned char *)"\010\010\010\010\010\010\010\010",
- (unsigned char *)"\011\011\011\011\011\011\011\011\011",
- (unsigned char *)"\012\012\012\012\012\012\012\012\012\012",
- (unsigned char *)"\013\013\013\013\013\013\013\013\013\013\013",
- (unsigned char *)"\014\014\014\014\014\014\014\014\014\014\014\014",
- (unsigned char *)
- "\015\015\015\015\015\015\015\015\015\015\015\015\015",
- (unsigned char *)
- "\016\016\016\016\016\016\016\016\016\016\016\016\016\016",
- (unsigned char *)
- "\017\017\017\017\017\017\017\017\017\017\017\017\017\017\017",
- (unsigned char *)
- "\020\020\020\020\020\020\020\020\020\020\020\020\020\020\020\020"
-};
-
-/* MD2 initialization. Begins an MD2 operation, writing a new context.
- */
-void MD2Init (context)
-MD2_CTX *context; /* context */
-{
- context->count = 0;
- memset ((POINTER)context->state, 0, sizeof (context->state));
- memset
- ((POINTER)context->checksum, 0, sizeof (context->checksum));
-}
-
-/* MD2 block update operation. Continues an MD2 message-digest
- operation, processing another message block, and updating the
- context.
- */
-void MD2Update (context, input, inputLen)
-MD2_CTX *context; /* context */
-const unsigned char *input; /* input block */
-unsigned int inputLen; /* length of input block */
-{
- unsigned int i, index, partLen;
-
- /* Update number of bytes mod 16 */
- index = context->count;
- context->count = (index + inputLen) & 0xf;
-
- partLen = 16 - index;
-
- /* Transform as many times as possible.
- */
- if (inputLen >= partLen) {
- memcpy
- ((POINTER)&context->buffer[index], (POINTER)input, partLen);
- MD2Transform (context->state, context->checksum, context->buffer);
-
- for (i = partLen; i + 15 < inputLen; i += 16)
- MD2Transform (context->state, context->checksum, &input[i]);
-
- index = 0;
- }
- else
- i = 0;
-
- /* Buffer remaining input */
- memcpy
- ((POINTER)&context->buffer[index], (POINTER)&input[i],
- inputLen-i);
-}
-
-/* MD2 finalization. Ends an MD2 message-digest operation, writing the
- message digest and zeroizing the context.
- */
-void MD2Final (digest, context)
-unsigned char digest[16]; /* message digest */
-MD2_CTX *context; /* context */
-{
- unsigned int index, padLen;
-
- /* Pad out to multiple of 16.
- */
- index = context->count;
- padLen = 16 - index;
- MD2Update (context, PADDING[padLen], padLen);
-
- /* Extend with checksum */
- MD2Update (context, context->checksum, 16);
-
- /* Store state in digest */
- memcpy ((POINTER)digest, (POINTER)context->state, 16);
-
- /* Zeroize sensitive information.
- */
- memset ((POINTER)context, 0, sizeof (*context));
-}
-
-/* MD2 basic transformation. Transforms state and updates checksum
- based on block.
- */
-static void MD2Transform (state, checksum, block)
-unsigned char state[16];
-unsigned char checksum[16];
-const unsigned char block[16];
-{
- unsigned int i, j, t;
- unsigned char x[48];
-
- /* Form encryption block from state, block, state ^ block.
- */
- memcpy ((POINTER)x, (POINTER)state, 16);
- memcpy ((POINTER)x+16, (POINTER)block, 16);
- for (i = 0; i < 16; i++)
- x[i+32] = state[i] ^ block[i];
-
- /* Encrypt block (18 rounds).
- */
- t = 0;
- for (i = 0; i < 18; i++) {
- for (j = 0; j < 48; j++)
- t = x[j] ^= PI_SUBST[t];
- t = (t + i) & 0xff;
- }
-
- /* Save new state */
- memcpy ((POINTER)state, (POINTER)x, 16);
-
- /* Update checksum.
- */
- t = checksum[15];
- for (i = 0; i < 16; i++)
- t = checksum[i] ^= PI_SUBST[block[i] ^ t];
-
- /* Zeroize sensitive information.
- */
- memset ((POINTER)x, 0, sizeof (x));
-}
diff --git a/lib/libmd/md4.copyright b/lib/libmd/md4.copyright
deleted file mode 100644
index df93ad0..0000000
--- a/lib/libmd/md4.copyright
+++ /dev/null
@@ -1,20 +0,0 @@
-.\" $Id$
-Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
-rights reserved.
-.Pp
-License to copy and use this software is granted provided that it
-is identified as the "RSA Data Security, Inc. MD4 Message-Digest
-Algorithm" in all material mentioning or referencing this software
-or this function.
-License is also granted to make and use derivative works provided
-that such works are identified as "derived from the RSA Data
-Security, Inc. MD4 Message-Digest Algorithm" in all material
-mentioning or referencing the derived work.
-.Pp
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
-.Pp
-These notices must be retained in any copies of any part of this
-documentation and/or software.
diff --git a/lib/libmd/md4.h b/lib/libmd/md4.h
deleted file mode 100644
index 10058a8..0000000
--- a/lib/libmd/md4.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* MD4.H - header file for MD4C.C
- * $Id: md4.h,v 1.6 1997/02/22 15:07:17 peter Exp $
- */
-
-/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- rights reserved.
-
- License to copy and use this software is granted provided that it
- is identified as the "RSA Data Security, Inc. MD4 Message-Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
- License is also granted to make and use derivative works provided
- that such works are identified as "derived from the RSA Data
- Security, Inc. MD4 Message-Digest Algorithm" in all material
- mentioning or referencing the derived work.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
- */
-
-#ifndef _MD4_H_
-#define _MD4_H_
-/* MD4 context. */
-typedef struct MD4Context {
- u_int32_t state[4]; /* state (ABCD) */
- u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
- unsigned char buffer[64]; /* input buffer */
-} MD4_CTX;
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-void MD4Init(MD4_CTX *);
-void MD4Update(MD4_CTX *, const unsigned char *, unsigned int);
-void MD4Final(unsigned char [16], MD4_CTX *);
-char * MD4End(MD4_CTX *, char *);
-char * MD4File(const char *, char *);
-char * MD4Data(const unsigned char *, unsigned int, char *);
-__END_DECLS
-
-#endif /* _MD4_H_ */
diff --git a/lib/libmd/md4c.c b/lib/libmd/md4c.c
deleted file mode 100644
index a0eba4d..0000000
--- a/lib/libmd/md4c.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/* MD4C.C - RSA Data Security, Inc., MD4 message-digest algorithm
- * $Id$
- */
-
-/* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
-
- License to copy and use this software is granted provided that it
- is identified as the "RSA Data Security, Inc. MD4 Message-Digest
- Algorithm" in all material mentioning or referencing this software
- or this function.
-
- License is also granted to make and use derivative works provided
- that such works are identified as "derived from the RSA Data
- Security, Inc. MD4 Message-Digest Algorithm" in all material
- mentioning or referencing the derived work.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
- */
-
-#include <sys/types.h>
-#include <string.h>
-#include "md4.h"
-
-typedef unsigned char *POINTER;
-typedef u_int16_t UINT2;
-typedef u_int32_t UINT4;
-
-#define PROTO_LIST(list) list
-
-/* Constants for MD4Transform routine.
- */
-#define S11 3
-#define S12 7
-#define S13 11
-#define S14 19
-#define S21 3
-#define S22 5
-#define S23 9
-#define S24 13
-#define S31 3
-#define S32 9
-#define S33 11
-#define S34 15
-
-static void MD4Transform PROTO_LIST ((UINT4 [4], const unsigned char [64]));
-static void Encode PROTO_LIST
- ((unsigned char *, UINT4 *, unsigned int));
-static void Decode PROTO_LIST
- ((UINT4 *, const unsigned char *, unsigned int));
-
-static unsigned char PADDING[64] = {
- 0x80, 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, 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, 0
-};
-
-/* F, G and H are basic MD4 functions.
- */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-
-/* ROTATE_LEFT rotates x left n bits.
- */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/* FF, GG and HH are transformations for rounds 1, 2 and 3 */
-/* Rotation is separate from addition to prevent recomputation */
-#define FF(a, b, c, d, x, s) { \
- (a) += F ((b), (c), (d)) + (x); \
- (a) = ROTATE_LEFT ((a), (s)); \
- }
-#define GG(a, b, c, d, x, s) { \
- (a) += G ((b), (c), (d)) + (x) + (UINT4)0x5a827999; \
- (a) = ROTATE_LEFT ((a), (s)); \
- }
-#define HH(a, b, c, d, x, s) { \
- (a) += H ((b), (c), (d)) + (x) + (UINT4)0x6ed9eba1; \
- (a) = ROTATE_LEFT ((a), (s)); \
- }
-
-/* MD4 initialization. Begins an MD4 operation, writing a new context.
- */
-void MD4Init (context)
-MD4_CTX *context; /* context */
-{
- context->count[0] = context->count[1] = 0;
-
- /* Load magic initialization constants.
- */
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
-}
-
-/* MD4 block update operation. Continues an MD4 message-digest
- operation, processing another message block, and updating the
- context.
- */
-void MD4Update (context, input, inputLen)
-MD4_CTX *context; /* context */
-const unsigned char *input; /* input block */
-unsigned int inputLen; /* length of input block */
-{
- unsigned int i, index, partLen;
-
- /* Compute number of bytes mod 64 */
- index = (unsigned int)((context->count[0] >> 3) & 0x3F);
- /* Update number of bits */
- if ((context->count[0] += ((UINT4)inputLen << 3))
- < ((UINT4)inputLen << 3))
- context->count[1]++;
- context->count[1] += ((UINT4)inputLen >> 29);
-
- partLen = 64 - index;
- /* Transform as many times as possible.
- */
- if (inputLen >= partLen) {
- memcpy
- ((POINTER)&context->buffer[index], (POINTER)input, partLen);
- MD4Transform (context->state, context->buffer);
-
- for (i = partLen; i + 63 < inputLen; i += 64)
- MD4Transform (context->state, &input[i]);
-
- index = 0;
- }
- else
- i = 0;
-
- /* Buffer remaining input */
- memcpy
- ((POINTER)&context->buffer[index], (POINTER)&input[i],
- inputLen-i);
-}
-
-/* MD4 finalization. Ends an MD4 message-digest operation, writing the
- the message digest and zeroizing the context.
- */
-void MD4Final (digest, context)
-unsigned char digest[16]; /* message digest */
-MD4_CTX *context; /* context */
-{
- unsigned char bits[8];
- unsigned int index, padLen;
-
- /* Save number of bits */
- Encode (bits, context->count, 8);
-
- /* Pad out to 56 mod 64.
- */
- index = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (index < 56) ? (56 - index) : (120 - index);
- MD4Update (context, PADDING, padLen);
-
- /* Append length (before padding) */
- MD4Update (context, bits, 8);
- /* Store state in digest */
- Encode (digest, context->state, 16);
-
- /* Zeroize sensitive information.
- */
- memset ((POINTER)context, 0, sizeof (*context));
-}
-
-/* MD4 basic transformation. Transforms state based on block.
- */
-static void MD4Transform (state, block)
-UINT4 state[4];
-const unsigned char block[64];
-{
- UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- Decode (x, block, 64);
-
- /* Round 1 */
- FF (a, b, c, d, x[ 0], S11); /* 1 */
- FF (d, a, b, c, x[ 1], S12); /* 2 */
- FF (c, d, a, b, x[ 2], S13); /* 3 */
- FF (b, c, d, a, x[ 3], S14); /* 4 */
- FF (a, b, c, d, x[ 4], S11); /* 5 */
- FF (d, a, b, c, x[ 5], S12); /* 6 */
- FF (c, d, a, b, x[ 6], S13); /* 7 */
- FF (b, c, d, a, x[ 7], S14); /* 8 */
- FF (a, b, c, d, x[ 8], S11); /* 9 */
- FF (d, a, b, c, x[ 9], S12); /* 10 */
- FF (c, d, a, b, x[10], S13); /* 11 */
- FF (b, c, d, a, x[11], S14); /* 12 */
- FF (a, b, c, d, x[12], S11); /* 13 */
- FF (d, a, b, c, x[13], S12); /* 14 */
- FF (c, d, a, b, x[14], S13); /* 15 */
- FF (b, c, d, a, x[15], S14); /* 16 */
-
- /* Round 2 */
- GG (a, b, c, d, x[ 0], S21); /* 17 */
- GG (d, a, b, c, x[ 4], S22); /* 18 */
- GG (c, d, a, b, x[ 8], S23); /* 19 */
- GG (b, c, d, a, x[12], S24); /* 20 */
- GG (a, b, c, d, x[ 1], S21); /* 21 */
- GG (d, a, b, c, x[ 5], S22); /* 22 */
- GG (c, d, a, b, x[ 9], S23); /* 23 */
- GG (b, c, d, a, x[13], S24); /* 24 */
- GG (a, b, c, d, x[ 2], S21); /* 25 */
- GG (d, a, b, c, x[ 6], S22); /* 26 */
- GG (c, d, a, b, x[10], S23); /* 27 */
- GG (b, c, d, a, x[14], S24); /* 28 */
- GG (a, b, c, d, x[ 3], S21); /* 29 */
- GG (d, a, b, c, x[ 7], S22); /* 30 */
- GG (c, d, a, b, x[11], S23); /* 31 */
- GG (b, c, d, a, x[15], S24); /* 32 */
-
- /* Round 3 */
- HH (a, b, c, d, x[ 0], S31); /* 33 */
- HH (d, a, b, c, x[ 8], S32); /* 34 */
- HH (c, d, a, b, x[ 4], S33); /* 35 */
- HH (b, c, d, a, x[12], S34); /* 36 */
- HH (a, b, c, d, x[ 2], S31); /* 37 */
- HH (d, a, b, c, x[10], S32); /* 38 */
- HH (c, d, a, b, x[ 6], S33); /* 39 */
- HH (b, c, d, a, x[14], S34); /* 40 */
- HH (a, b, c, d, x[ 1], S31); /* 41 */
- HH (d, a, b, c, x[ 9], S32); /* 42 */
- HH (c, d, a, b, x[ 5], S33); /* 43 */
- HH (b, c, d, a, x[13], S34); /* 44 */
- HH (a, b, c, d, x[ 3], S31); /* 45 */
- HH (d, a, b, c, x[11], S32); /* 46 */
- HH (c, d, a, b, x[ 7], S33); /* 47 */
- HH (b, c, d, a, x[15], S34); /* 48 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* Zeroize sensitive information.
- */
- memset ((POINTER)x, 0, sizeof (x));
-}
-
-/* Encodes input (UINT4) into output (unsigned char). Assumes len is
- a multiple of 4.
- */
-static void Encode (output, input, len)
-unsigned char *output;
-UINT4 *input;
-unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (unsigned char)(input[i] & 0xff);
- output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
- }
-}
-
-/* Decodes input (unsigned char) into output (UINT4). Assumes len is
- a multiple of 4.
- */
-static void Decode (output, input, len)
-
-UINT4 *output;
-const unsigned char *input;
-unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
- (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
-}
diff --git a/lib/libmd/md5.copyright b/lib/libmd/md5.copyright
deleted file mode 100644
index c37746f..0000000
--- a/lib/libmd/md5.copyright
+++ /dev/null
@@ -1,21 +0,0 @@
-.\" $Id$
-Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
-rights reserved.
-.Pp
-License to copy and use this software is granted provided that it
-is identified as the "RSA Data Security, Inc. MD5 Message-Digest
-Algorithm" in all material mentioning or referencing this software
-or this function.
-.Pp
-License is also granted to make and use derivative works provided
-that such works are identified as "derived from the RSA Data
-Security, Inc. MD5 Message-Digest Algorithm" in all material
-mentioning or referencing the derived work.
-.Pp
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
-.Pp
-These notices must be retained in any copies of any part of this
-documentation and/or software.
diff --git a/lib/libmd/md5.h b/lib/libmd/md5.h
deleted file mode 100644
index 803a88f..0000000
--- a/lib/libmd/md5.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef _MD5_H_
-#define _MD5_H_
-#include <sys/md5.h>
-#endif /* _MD5_H_ */
diff --git a/lib/libmd/md5c.c b/lib/libmd/md5c.c
deleted file mode 100644
index 583d009..0000000
--- a/lib/libmd/md5c.c
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
- *
- * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
- * rights reserved.
- *
- * License to copy and use this software is granted provided that it
- * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
- * Algorithm" in all material mentioning or referencing this software
- * or this function.
- *
- * License is also granted to make and use derivative works provided
- * that such works are identified as "derived from the RSA Data
- * Security, Inc. MD5 Message-Digest Algorithm" in all material
- * mentioning or referencing the derived work.
- *
- * RSA Data Security, Inc. makes no representations concerning either
- * the merchantability of this software or the suitability of this
- * software for any particular purpose. It is provided "as is"
- * without express or implied warranty of any kind.
- *
- * These notices must be retained in any copies of any part of this
- * documentation and/or software.
- *
- * $Id$
- *
- * This code is the same as the code published by RSA Inc. It has been
- * edited for clarity and style only.
- */
-
-#include <sys/types.h>
-
-#ifdef KERNEL
-#include <sys/param.h>
-#include <sys/systm.h>
-#else
-#include <string.h>
-#endif
-
-#include <sys/md5.h>
-
-static void MD5Transform __P((u_int32_t [4], const unsigned char [64]));
-
-#ifdef KERNEL
-#define memset(x,y,z) bzero(x,z);
-#define memcpy(x,y,z) bcopy(y, x, z)
-#endif
-
-#ifdef i386
-#define Encode memcpy
-#define Decode memcpy
-#else /* i386 */
-
-/*
- * Encodes input (u_int32_t) into output (unsigned char). Assumes len is
- * a multiple of 4.
- */
-
-static void
-Encode (output, input, len)
- unsigned char *output;
- u_int32_t *input;
- unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4) {
- output[j] = (unsigned char)(input[i] & 0xff);
- output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
- output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
- output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
- }
-}
-
-/*
- * Decodes input (unsigned char) into output (u_int32_t). Assumes len is
- * a multiple of 4.
- */
-
-static void
-Decode (output, input, len)
- u_int32_t *output;
- const unsigned char *input;
- unsigned int len;
-{
- unsigned int i, j;
-
- for (i = 0, j = 0; j < len; i++, j += 4)
- output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
- (((u_int32_t)input[j+2]) << 16) | (((u_int32_t)input[j+3]) << 24);
-}
-#endif /* i386 */
-
-static unsigned char PADDING[64] = {
- 0x80, 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, 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, 0
-};
-
-/* F, G, H and I are basic MD5 functions. */
-#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
-#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
-#define H(x, y, z) ((x) ^ (y) ^ (z))
-#define I(x, y, z) ((y) ^ ((x) | (~z)))
-
-/* ROTATE_LEFT rotates x left n bits. */
-#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
-
-/*
- * FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
- * Rotation is separate from addition to prevent recomputation.
- */
-#define FF(a, b, c, d, x, s, ac) { \
- (a) += F ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define GG(a, b, c, d, x, s, ac) { \
- (a) += G ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define HH(a, b, c, d, x, s, ac) { \
- (a) += H ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-#define II(a, b, c, d, x, s, ac) { \
- (a) += I ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
- (a) = ROTATE_LEFT ((a), (s)); \
- (a) += (b); \
- }
-
-/* MD5 initialization. Begins an MD5 operation, writing a new context. */
-
-void
-MD5Init (context)
- MD5_CTX *context;
-{
-
- context->count[0] = context->count[1] = 0;
-
- /* Load magic initialization constants. */
- context->state[0] = 0x67452301;
- context->state[1] = 0xefcdab89;
- context->state[2] = 0x98badcfe;
- context->state[3] = 0x10325476;
-}
-
-/*
- * MD5 block update operation. Continues an MD5 message-digest
- * operation, processing another message block, and updating the
- * context.
- */
-
-void
-MD5Update (context, input, inputLen)
- MD5_CTX *context;
- const unsigned char *input;
- unsigned int inputLen;
-{
- unsigned int i, index, partLen;
-
- /* Compute number of bytes mod 64 */
- index = (unsigned int)((context->count[0] >> 3) & 0x3F);
-
- /* Update number of bits */
- if ((context->count[0] += ((u_int32_t)inputLen << 3))
- < ((u_int32_t)inputLen << 3))
- context->count[1]++;
- context->count[1] += ((u_int32_t)inputLen >> 29);
-
- partLen = 64 - index;
-
- /* Transform as many times as possible. */
- if (inputLen >= partLen) {
- memcpy((void *)&context->buffer[index], (void *)input,
- partLen);
- MD5Transform (context->state, context->buffer);
-
- for (i = partLen; i + 63 < inputLen; i += 64)
- MD5Transform (context->state, &input[i]);
-
- index = 0;
- }
- else
- i = 0;
-
- /* Buffer remaining input */
- memcpy ((void *)&context->buffer[index], (void *)&input[i],
- inputLen-i);
-}
-
-/*
- * MD5 finalization. Ends an MD5 message-digest operation, writing the
- * the message digest and zeroizing the context.
- */
-
-void
-MD5Final (digest, context)
- unsigned char digest[16];
- MD5_CTX *context;
-{
- unsigned char bits[8];
- unsigned int index, padLen;
-
- /* Save number of bits */
- Encode (bits, context->count, 8);
-
- /* Pad out to 56 mod 64. */
- index = (unsigned int)((context->count[0] >> 3) & 0x3f);
- padLen = (index < 56) ? (56 - index) : (120 - index);
- MD5Update (context, PADDING, padLen);
-
- /* Append length (before padding) */
- MD5Update (context, bits, 8);
-
- /* Store state in digest */
- Encode (digest, context->state, 16);
-
- /* Zeroize sensitive information. */
- memset ((void *)context, 0, sizeof (*context));
-}
-
-/* MD5 basic transformation. Transforms state based on block. */
-
-static void
-MD5Transform (state, block)
- u_int32_t state[4];
- const unsigned char block[64];
-{
- u_int32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
-
- Decode (x, block, 64);
-
- /* Round 1 */
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
- FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
- FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
- FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
- FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
- FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
- FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
- FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
- FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
- FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
- FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
- FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
- FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
- FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
- FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
- FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
- FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-
- /* Round 2 */
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
- GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
- GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
- GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
- GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
- GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
- GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
- GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
- GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
- GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
- GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
- GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
- GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
- GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
- GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
- GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
- GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-
- /* Round 3 */
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
- HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
- HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
- HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
- HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
- HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
- HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
- HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
- HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
- HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
- HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
- HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
- HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
- HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
- HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
- HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
- HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-
- /* Round 4 */
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
- II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
- II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
- II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
- II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
- II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
- II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
- II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
- II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
- II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
- II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
- II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
- II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
- II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
- II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
- II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
- II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-
- state[0] += a;
- state[1] += b;
- state[2] += c;
- state[3] += d;
-
- /* Zeroize sensitive information. */
- memset ((void *)x, 0, sizeof (x));
-}
diff --git a/lib/libmd/mdX.3 b/lib/libmd/mdX.3
deleted file mode 100644
index 63dc597..0000000
--- a/lib/libmd/mdX.3
+++ /dev/null
@@ -1,137 +0,0 @@
-.\"
-.\" ----------------------------------------------------------------------------
-.\" "THE BEER-WARE LICENSE" (Revision 42):
-.\" <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
-.\" can do whatever you want with this stuff. If we meet some day, and you think
-.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
-.\" ----------------------------------------------------------------------------
-.\"
-.\" $Id: mdX.3,v 1.10 1997/03/19 00:52:58 bde Exp $
-.\"
-.Dd October 9, 1996
-.Dt MDX 3
-.Os FreeBSD 2
-.Sh NAME
-.Nm MDXInit ,
-.Nm MDXUpdate ,
-.Nm MDXFinal ,
-.Nm MDXEnd ,
-.Nm MDXFile ,
-.Nm MDXData
-.Nd calculate the RSA Data Security, Inc., ``MDX'' message digest
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <mdX.h>
-.Ft void
-.Fn MDXInit "MDX_CTX *context"
-.Ft void
-.Fn MDXUpdate "MDX_CTX *context" "const unsigned char *data" "unsigned int len"
-.Ft void
-.Fn MDXFinal "unsigned char digest[16]" "MDX_CTX *context"
-.Ft "char *"
-.Fn MDXEnd "MDX_CTX *context" "char *buf"
-.Ft "char *"
-.Fn MDXFile "const char *filename" "char *buf"
-.Ft "char *"
-.Fn MDXData "const unsigned char *data" "unsigned int len" "char *buf"
-.Sh DESCRIPTION
-The MDX functions calculate a 128-bit cryptographic checksum (digest)
-for any number of input bytes. A cryptographic checksum is a one-way
-hash-function, that is, you cannot find (except by exhaustive search)
-the input corresponding to a particular output. This net result is
-a ``fingerprint'' of the input-data, which doesn't disclose the actual
-input.
-.Pp
-MD2 is the slowest, MD4 is the fastest and MD5 is somewhere in the middle.
-MD2 can only be used for Privacy-Enhanced Mail.
-MD4 has been criticized for being too weak, so MD5 was developed in
-response as ``MD4 with safety-belts''. When in doubt, use MD5.
-.Pp
-The
-.Fn MDXInit ,
-.Fn MDXUpdate ,
-and
-.Fn MDXFinal
-functions are the core functions. Allocate an MDX_CTX, initialize it with
-.Fn MDXInit ,
-run over the data with
-.Fn MDXUpdate ,
-and finally extract the result using
-.Fn MDXFinal .
-.Pp
-.Fn MDXEnd
-is a wrapper for
-.Fn MDXFinal
-which converts the return value to a 33-character
-(including the terminating '\e0')
-.Tn ASCII
-string which represents the 128 bits in hexadecimal.
-.Pp
-.Fn MDXFile
-calculates the digest of a file, and uses
-.Fn MDXEnd
-to return the result.
-If the file cannot be opened, a null pointer is returned.
-.Fn MDXData
-calculates the digest of a chunk of data in memory, and uses
-.Fn MDXEnd
-to return the result.
-.Pp
-When using
-.Fn MDXEnd ,
-.Fn MDXFile ,
-or
-.Fn MDXData ,
-the
-.Ar buf
-argument can be a null pointer, in which case the returned string
-is allocated with
-.Xr malloc 3
-and subsequently must be explicitly deallocated using
-.Xr free 3
-after use.
-If the
-.Ar buf
-argument is non-null it must point to at least 33 characters of buffer space.
-.Sh SEE ALSO
-.Xr md2 3 ,
-.Xr md4 3 ,
-.Xr md5 3
-.Rs
-.%A B. Kaliski
-.%T The MD2 Message-Digest Algorithm
-.%O RFC 1319
-.Re
-.Rs
-.%A R. Rivest
-.%T The MD4 Message-Digest Algorithm
-.%O RFC 1186
-.Re
-.Rs
-.%A R. Rivest
-.%T The MD5 Message-Digest Algorithm
-.%O RFC 1321
-.Re
-.Rs
-.%A RSA Laboratories
-.%T Frequently Asked Questions About today's Cryptography
-.Re
-.Sh AUTHOR
-The original MDX routines were developed by
-.Tn RSA
-Data Security, Inc., and published in the above references.
-This code is derived directly from these implementations by Poul-Henning Kamp
-.Aq Li phk@login.dkuug.dk
-.Pp
-Phk ristede runen.
-.Sh HISTORY
-These functions appeared in
-.Fx 2.0 .
-.Sh BUGS
-No method is known to exist which finds two files having the same hash value,
-nor to find a file with a specific hash value.
-There is on the other hand no guarantee that such a method doesn't exist.
-.Pp
-MD2 has only been licensed for use in Privacy Enhanced Mail.
-Use MD4 or MD5 if that isn't what you're doing.
-.Sh COPYRIGHT
diff --git a/lib/libmd/mdXhl.c b/lib/libmd/mdXhl.c
deleted file mode 100644
index 460d27e..0000000
--- a/lib/libmd/mdXhl.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* mdXhl.c
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id: mdXhl.c,v 1.10 1997/02/22 15:07:23 peter Exp $
- *
- */
-
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "mdX.h"
-
-char *
-MDXEnd(MDX_CTX *ctx, char *buf)
-{
- int i;
- unsigned char digest[16];
- static const char hex[]="0123456789abcdef";
-
- if (!buf)
- buf = malloc(33);
- if (!buf)
- return 0;
- MDXFinal(digest,ctx);
- for (i=0;i<16;i++) {
- buf[i+i] = hex[digest[i] >> 4];
- buf[i+i+1] = hex[digest[i] & 0x0f];
- }
- buf[i+i] = '\0';
- return buf;
-}
-
-char *
-MDXFile (const char *filename, char *buf)
-{
- unsigned char buffer[BUFSIZ];
- MDX_CTX ctx;
- int f,i,j;
-
- MDXInit(&ctx);
- f = open(filename,O_RDONLY);
- if (f < 0) return 0;
- while ((i = read(f,buffer,sizeof buffer)) > 0) {
- MDXUpdate(&ctx,buffer,i);
- }
- j = errno;
- close(f);
- errno = j;
- if (i < 0) return 0;
- return MDXEnd(&ctx, buf);
-}
-
-char *
-MDXData (const unsigned char *data, unsigned int len, char *buf)
-{
- MDX_CTX ctx;
-
- MDXInit(&ctx);
- MDXUpdate(&ctx,data,len);
- return MDXEnd(&ctx, buf);
-}
diff --git a/lib/libmd/mddriver.c b/lib/libmd/mddriver.c
deleted file mode 100644
index 82a4757..0000000
--- a/lib/libmd/mddriver.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* MDDRIVER.C - test driver for MD2, MD4 and MD5
- * $Id: mddriver.c,v 1.3 1997/02/22 15:07:24 peter Exp $
- */
-
-/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
- rights reserved.
-
- RSA Data Security, Inc. makes no representations concerning either
- the merchantability of this software or the suitability of this
- software for any particular purpose. It is provided "as is"
- without express or implied warranty of any kind.
-
- These notices must be retained in any copies of any part of this
- documentation and/or software.
- */
-
-/* The following makes MD default to MD5 if it has not already been
- defined with C compiler flags.
- */
-#ifndef MD
-#define MD 5
-#endif
-
-#include <sys/types.h>
-
-#include <stdio.h>
-#include <time.h>
-#include <string.h>
-#if MD == 2
-#include "md2.h"
-#define MDData MD2Data
-#endif
-#if MD == 4
-#include "md4.h"
-#define MDData MD4Data
-#endif
-#if MD == 5
-#include "md5.h"
-#define MDData MD5Data
-#endif
-
-/* Digests a string and prints the result.
- */
-static void MDString (string)
-char *string;
-{
- char buf[33];
-
- printf ("MD%d (\"%s\") = %s\n",
- MD, string, MDData(string,strlen(string),buf));
-}
-
-/* Digests a reference suite of strings and prints the results.
- */
-main()
-{
- printf ("MD%d test suite:\n", MD);
-
- MDString ("");
- MDString ("a");
- MDString ("abc");
- MDString ("message digest");
- MDString ("abcdefghijklmnopqrstuvwxyz");
- MDString
- ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
- MDString
- ("1234567890123456789012345678901234567890\
-1234567890123456789012345678901234567890");
-}
diff --git a/lib/libmytinfo/EXAMPLES/terminfo.src b/lib/libmytinfo/EXAMPLES/terminfo.src
deleted file mode 100644
index 0fed13e..0000000
--- a/lib/libmytinfo/EXAMPLES/terminfo.src
+++ /dev/null
@@ -1,104 +0,0 @@
-#
-# terminfo.src
-#
-# By Ross Ridge
-# Public Domain
-# 92/02/01 07:30:32
-#
-# Some sample terminfo definitions
-#
-# @(#) mytinfo terminfo.src 3.2 92/02/01 public domain, By Ross Ridge
-#
-#
-dumb|dumb terminal, gn, co#80,
-#
-# Note not all ANSI terminals will support all of these capabilities.
-# This doesn't define any real terminal, and probably wouldn't work
-# with any real terminal either.
-#
-ansi-all|ANS X3.64-1979 terminal,
- cr=^M, cud1=^J, ind=^J, nel=^M^J, bell=^G, cub1=^H,
- cuu1=\EM, ff=^L, ht=^I,
- .ind=\ED, .nel=\EE, hts=\EH, hd=\EK, hu=\EL, ri=\EM,
- .ich1=\E[@, .ich=\E[%p1%d@, .cuu1=\E[A, cuu=\E[%p1%dA,
- cud1=\E[B, .cud=\E[%p1%dB, cuf1=\E[C, cuf=\E[%p1%dC,
- .cub1=\E[D, cub=\E[%p1%dD, .cnl=\E[%p1%dE, .cpl=\E[%p1%dF,
- .hpa=\E[%i%p1%dG, cup=\E[%i%p1%d;%p2%dH, .cht=\E[%p1%dI,
- ed=\E[J, el=\E[K, el1=\E[1K, il1=\E[L, il=\E[%p1%dL,
- dl1=\E[M, dl=\E[%p1%dM, .ef=\E[N, .ea=\E[O,
- dch1=\E[P, dch=\E[%p1%dP, .sem=\E[%p1%dQ,
- .cpr=\E[%i%p1%d;%p2%dR, indn=\E[%p1%dS, .ind=\E[S,
- rin=\E[%p1%dT, .ri=\E[T, .np=\E[%p1%dU, .pp=\E[%p1%dU,
- .ctc=\E[%p1%dW, ech=\E[%p1%dX, .cvt=\E[%p1%dY,
- cbt=\E[Z, hpa=\E[%i%p1%d`, .hpr=\E[%p1%da,
- rep=%p1%c%?%p2%{1}%>%t\E[%p2%{1}%-%db%;,
- .da=\E[c, vpa=\E[%i%p1%dd, .vpr=\E[%p1%e,
- .hvp=\E[%i%p1%d;%p2%df, tbc=\E[3g,
- mc=\E[0i, mc4=\E[4i, mc5=\E[5i,
- sgr=\E[%?%p6%t;1%;%?%p5%p1%|%t;2%;%?%p2%t;4%;%?%p4%t;6%;%?%p3%p1%|%t;7%;%?%p7%t;8%;m,
- smso=\E[1;7m, rmso=\E[m, smul=\E[4m, rmul=\E[m,
- blink=\E[6m, bold=\E[1m, invis=\E[8m, rev=\E[7m,
- sgr0=\E[m, .dsr=\E[%p1%dn, .daq=\E[%p1%do,
- .sl=\E[%p1%d\s@, .sr=\E[%p1%d\sA, clear=\E[H\EJ, home=\E[H,
- smir=\E[4h, rmir=\E[4l,
- is2=\E[1Q\E[1;2;3;4;5;7;10;11;13;14;16;15;17;18;19;20l\E[6;12h\E[m,
- rs2=\Ec\E[1Q\E[1;2;3;4;5;7;10;11;13;14;16;15;17;18;19;20l\E[6;12h\E[m\E[H\EJ,
-ansi-all-8|ANS X3.64-1979 terminal (8 bit),
- cr=^M, cud1=^J, ind=^J, nel=^M^J, bell=^G, cub1=^H,
- cuu1=\215, ff=^L, ht=^I,
- .ind=\204, .nel=\205, hts=\207, hd=\213, hu=\214, ri=\215,
- .ich1=\233@, .ich=\E%p1%d@, .cuu1=\233A, cuu=\233%p1%dA,
- cud1=\233B, .cud=\233%p1%dB, cuf1=\233C, cuf=\233%p1%dC,
- .cub1=\233D, cub=\233%p1%dD, .cnl=\233%p1%dE, .cpl=\233%p1%dF,
- .hpa=\233%i%p1%dG, cup=\233%i%p1%d;%p2%dH, .cht=\233%p1%dI,
- ed=\233J, el=\233K, el1=\2331K, il1=\233L, il=\233%p1%dL,
- dl1=\233M, dl=\233%p1%dM, .ef=\233N, .ea=\233O,
- dch1=\233P, dch=\233%p1%dP, .sem=\233%p1%dQ,
- .cpr=\233%i%p1%d;%p2%dR, indn=\233%p1%dS, .ind=\233S,
- rin=\233%p1%dT, .ri=\233T, .np=\233%p1%dU, .pp=\233%p1%dU,
- .ctc=\233%p1%dW, ech=\233%p1%dX, .cvt=\233%p1%dY,
- cbt=\233Z, hpa=\233%i%p1%d`, .hpr=\233%p1%da,
- rep=%p1%c%?%p2%{1}%>%t\233%p2%{1}%-%db%;,
- .da=\233c, vpa=\233%i%p1%dd, .vpr=\233%p1%e,
- .hvp=\233%i%p1%d;%p2%df, tbc=\2333g,
- mc=\2330i, mc4=\2334i, mc5=\2334i,
- sgr=\233%?%p6%t;1%;%?%p5%p1%|%t;2%;%?%p2%t;4%;%?%p4%t;6%;%?%p3%p1%|%t;7%;%?%p7%t;8%;m,
- smso=\2331;7m, rmso=\233m, smul=\2334m, rmul=\233m,
- blink=\2336m, bold=\2331m, invis=\2338m, rev=\2337m,
- sgr0=\233m, .dsr=\233%p1%dn, .daq=\233%p1%do,
- .sl=\233%p1%d\s@, .sr=\233%p1%d\sA, clear=\233H\EJ, home=\233H,
- smir=\2334h, rmir=\2334l,
- is2=\2331Q\2331;2;3;4;5;7;10;11;13;14;16;15;17;18;19;20l\2336;12h\233m,
- rs2=\Ec\2331Q\2331;2;3;4;5;7;10;11;13;14;16;15;17;18;19;20l\2336;12h\233m\233H\EJ,
-#
-# Not tested...
-#
-vt100|dec vt100,
- xon, UWxc, msgr,
- cols#80, lines#24, it#8, vt#3,
- cr=\r, csr=^[[%i%p1%d;%p2%dr, tbc=^[[3g, clear=^[[;H^[[2J$<100>,
- el=^[[K$<3>, ed=^[[J$<50>, cup=^[[%i%p1%d;%p2%dH$<5>, cud1=^[[B,
- home=^[[H, cub1=^[[D, cuf1=^[[C$<2>, cuu1=^[[A$<2>, blink=^[[5m$<2>,
- bold=^[[1m$<2>, rev=^[[7m$<2>, smso=^[[7m$<2>, smul=^[[4m$<2>,
- sgr0=^[[m^N$<2>, rmso=^[[m$<2>, rmul=^[[m$<2>, hts=^[H, ht=^I,
- is2=^[[1;24r^[[?1l^[[?3l^[[30h^[[?7h^[>, bell=^G,
- kbs=\b, kcud1=^[[B, kf0=^[OP, kf1=^[OQ, kf2=^[OR, kf3=^[OS,
- kcub1=^[[D, kcuf1=^[[C, kcuu1=^[[A, lf0=PF1, lf1=PF2,
- lf2=PF3, lf3=PF4, nel=\r^[D, cud=^[[%p1%dB, cub=^[[%p1%dD,
- cuf=^[[%p1%dC, cuu=^[[%p1%dA, rc=^[8, sc=^[7, ind=^[D, ri=^[M$<5>,
- sgr=^[[0;%?%p4%t;5%;%?%p6%t;1%;%?%p3%p1%|%t;7%;%?%p2%t;4%;m%?%p1%t^N%e^O%;$<2>,
- smacs=^O, rmacs=^N,
-vt100-am|vt100 with automatic margins,
- am, xenl, @el, @ed,
- use=vt100,
-vt102|dec vt102,
- is=\E<\E[1;24r\E[?1l\E[?3l\E[?5l\E[?7h\E>,
- il=\E[%p1%dL, dch=\E[%p1%dP, dl=\E[%p1%dM,
- il1=\E[L, dch1=\E[P, dl1=\E[M,
- mir, rmir=\E[4l, smir=\E[4h,
- use=vt100,
-vt200|vt220|vt200-js|vt220-js|dec vt200 series with jump scroll,
- clear=\E[H\E[J, rmso=\E[27m, rmul=\E[24m,
- is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H,
- rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h,
- use=vt102,
diff --git a/lib/libmytinfo/INSTALL b/lib/libmytinfo/INSTALL
deleted file mode 100644
index 3a0276d..0000000
--- a/lib/libmytinfo/INSTALL
+++ /dev/null
@@ -1,211 +0,0 @@
-Compiling this package requires a fair bit of knowledge about your system.
-There are no automatic configuration programmes or prepared configuration
-files for different type of systems. You will need to edit the Makefile
-to specify things like which compiler to use and any options it needs.
-The file config.h needs to be edited to reflect the system you are
-using and to enable and/or disable certain features.
-
-Defines in config.h
-===================
-
-USE_ANSIC
-
-Normally this will be defined automaticly if __STDC__ is defined, but
-if your compile isn't truly ANSI C compliant you may need to undefine this.
-
-USE_TERMIO
-
-Define this if your system uses the termio tty driver. System III and
-System V use termio.
-
-USE_SGTTY
-
-Define this if your system uses the "sgtty" tty driver. V7 Unix and BSD
-use sgtty.
-
-USE_WINSZ
-
-If you defined USE_SGTTY you can define this if your system supports
-SIGWINSZ and the accompaning ioctls. If this is defined the library
-will get number of columns and lines from the tty driver not the
-terminal description. BSD 4.3 supports SIGWINSZ. This will also work
-if USE_TERMIO is defined on some hybrid System V machines such as Release 4.
-
-Do not define both USE_TERMIO and USE_SGTTY. If your system supports both
-you'd probably be better of defining USE_TERMIO. If your system supports
-neither termio or sgtty you can leave USE_TERMIO and USE_SGTTY undefined,
-but this is only recommended for use with micomputers.
-
-USE_STRINGS
-
-If you define this then the header file <strings.h> will be included
-and BSD type string library assumed (index instead of strchr), otherwise
-<string.h> will included. If you have a BSD type system define this.
-If you have an ANSI C, System III, or System V type of system leave it
-undefined.
-
-USE_MYBSEARCH
-
-If your system's C library doesn't include bsearch, define this.
-Most System V systems have bsearch. However even your C library has this
-function you still may want to define USE_MYBSEARCH, see USE_SHORT_BSEARCH
-below. ("MYBSEARCH" is misnomer, I didn't write this routine.)
-
-USE_SHORT_BSEARCH
-
-If you define USE_MYBSEARCH you can define this so that the bsearch
-routine that library uses the type short instead of size_t (usually long)
-for it's arguments. This results a large speedup on 68000 based machines
-and possibly a significant speedup on others as well. However on some CPU's
-defining this will only make things slower.
-
-USE_MYSTRTOK
-
-If your system's C library doesn't include strtok, define this.
-Most ANSI C, System III, and System V systems have this.
-
-USE_MYQSORT
-
-If your system's C library doesn't include qsort, define this.
-All most all systems should have this function, if it doesn't complain
-to your vendor. The qsort routine comes from the GNU Emacs distribution.
-
-USE_MYMKDIR
-
-Define this if your system doesn't have the mkdir library function call.
-My routine simply calls the system command mkdir, you may have to
-edit mkdir.c if the pathname of that command isn't "/bin/mkdir".
-
-USE_MEMORY
-
-If your system has a <memory.h> header define this. If USE_MEMORY
-is not defined bcopy will used instead of memcpy.
-
-USE_SMALLMEM
-
-Use you can define use this to save some memory, but it doesn't
-save much at moment, and will only slow the library down.
-
-USE_FAKE_STDIO
-
-If you define this then the library won't use the real stdio but a
-fake one instead. This is for compatiblity with termcap and vi which
-don't use stdio.
-
-USE_DOPRNT
-
-If you don't have a vfprintf function, but you have a _doprnt function
-define this. If you don't have either than you can compile the library
-but not the support programmes. System V has vfprintf and most Unixes
-have a _doprnt (but probably not documented). BSD has released a freely
-distributable vfprintf for BSD Unixes.
-
-USE_UPBC_KLUDGE
-
-Define this if you want the library's tgoto to work like termcap's tgoto
-and avoid putting ^D, and \n into an output string by using the cursor up
-and backspace strings.
-
-USE_EXTERN_UPBC
-
-If you defined USE_UPBC_KLUDGE you can define this so tgoto will,
-like termcap's tgoto, get the cursor up and backspace strings from the
-externs UP and BC instead from the library's internal record.
-
-USE_LITOUT_KLUDGE
-
-Don't define this. It's another kludge for tgoto.
-
-If neither USE_UPBC_KLUDGE or USE_LITOUT_KLUDGE is defined then tgoto
-won't worry about putting ^D, and \n in a string.
-
-USE_PROTOTYPES
-
-Define this if your compiler supports ANSI C style prototypes.
-
-USE_STDLIB
-
-Define this if your system has an <stdlib.h> header.
-
-USE_STDARG
-
-Define this if your system has an <stdarg.h> header. If this isn't
-defined <varargs.h> will be included instead.
-
-USE_STDDEF
-
-Define this if your system has an <stddef.h> header. If this isn't
-defined <sys/types.h> will be included instead.
-
-typedef char *anyptr;
-
-You should change the typedef to a type that any pointer can be assigned
-to or from. ANSI C compilers can use "typedef void *anyptr", most
-other compilers should use "typedef char *anyptr".
-
-#define mysize_t unsigned
-
-"mysize_t" needs to defined as the type of the size of an object, or
-the type of the sizeof operator. Traditional usage is "unsigned", for
-ANSI C you should define mysize_t as "size_t".
-
-TERMCAPFILE
-
-Define this to a string containing the default termcap file(s) to look
-for terminal descriptions in. Multiple filenames should be seperated
-by spaces and environment variables can be specfied by prefixing them
-with dolar signs ($). eg:
- #define TERMCAPFILE "$TERMCAPFILE $HOME/.termcap /etc/termcap"
-
-TERMINFOSRC
-
-Define this to a string containing the default terminfo source file to
-look for terminal descriptions in.
-
-TERMINFODIR
-
-Define this as the directory containing the default terminfo database,
-usually "/usr/lib/terminfo".
-
-Any of TERMCAPFILE, TERMINFOSRC or TERMINFODIR can be left undefined.
-
-
-defs.h
-======
-
-You may also need to edit defs.h and change the definitions of MAX_BUF,
-MAX_LINE, and MAX_NAME. Unless you are seriously starved for memory I
-don't recomend making them smaller.
-
-
-cap_list
-========
-
-You can add new capabilities to the file cap_list. You must provide
-a type, terminfo variable name, terminfo capname, and termcap name for
-all capabilities and you must make sure they are all unique.
-
-
-Making in the library
-=====================
-
-Once you've configured the package you can just type "make" and it
-will build the library and the "term.h" header. You can enter
-"make all" to make the library and the support programmes, tconv,
-cap2info, tic, clear, tput and tset. If you want a profiled library
-you can enter "make profiled". You can remove all the intermediate
-files with "make clean". "make spotless" will remove the target
-files as well.
-
-
-Installing the library
-======================
-
-As for installing it, that's up to you. Depending on how much you
-plan to use the libraries and whether or not you have termcap and/or
-terminfo already you can install them "standard" places (ie. /usr/lib,
-/usr/include, /usr/bin), in local directories, or just leave them in
-the source directory. However if you are compiling programmes that
-use terminfo and linking it with this library you must make sure that
-this library's term.h file is included in your programme and not the
-system supplied one.
diff --git a/lib/libmytinfo/Makefile b/lib/libmytinfo/Makefile
deleted file mode 100644
index f5aa031..0000000
--- a/lib/libmytinfo/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# Makefile for libmytinfo
-# Use 'make update_term_h' manually after changing internal
-# mytinfo structures
-# $Id$
-
-LIB= mytinfo
-SRCS= addstr.c binorder.c buildpath.c caplist.c capsort.c compar.c\
- fillterm.c findcap.c findterm.c getother.c gettbin.c\
- gettcap.c gettinfo.c tcapconv.c tcapvars.c termcap.c\
- terminfo.c tgoto.c tiget.c tmatch.c tparm.c tputs.c tty.c version.c
-CLEANFILES+= binorder.c caplist.c capsort.c mkbinorder mkcaplist \
- mkcapsort mktermhead mkversion readcaps.o version.c
-
-CFLAGS+=-Wall -I${.CURDIR}
-
-CAPS= 1000
-
-# ${.CURDIR}/term.h: ${.CURDIR}/term.head ${.CURDIR}/term.tail
-update_term_h: ${.CURDIR}/term.head ${.CURDIR}/term.tail
- cat ${.CURDIR}/term.head ${.CURDIR}/term.tail > ${.CURDIR}/term.h
-
-beforeinstall:
- $(INSTALL) -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/term.h \
- ${DESTDIR}/usr/include
- ln -sf term.h ${DESTDIR}/usr/include/nterm.h
-
-capsort.c: mkcapsort
- ./mkcapsort > capsort.c
-
-mkcapsort: mkcapsort.c caplist.o compar.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o mkcapsort ${.CURDIR}/mkcapsort.c caplist.o compar.o
-
-binorder.c: mkbinorder ${.CURDIR}/bin_order
- ./mkbinorder ${.CURDIR}/bin_order > binorder.c
-
-mkbinorder: mkbinorder.c capsort.o caplist.o compar.o findcap.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o mkbinorder ${.CURDIR}/mkbinorder.c capsort.o \
- caplist.o compar.o findcap.o
-
-version.c: mkversion
- ./mkversion > version.c
-
-mkversion: mkversion.c
- $(CC) $(CFLAGS) $(LDFLAGS) -o mkversion ${.CURDIR}/mkversion.c
-
-${.CURDIR}/term.head: mktermhead ${.CURDIR}/cap_list
- ./mktermhead -n $(CAPS) ${.CURDIR}/cap_list > ${.CURDIR}/term.head
-
-caplist.c: mkcaplist ${.CURDIR}/cap_list
- ./mkcaplist -n $(CAPS) ${.CURDIR}/cap_list > caplist.c
-
-mktermhead: mktermhead.c readcaps.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o mktermhead ${.CURDIR}/mktermhead.c readcaps.o
-
-mkcaplist: mkcaplist.c readcaps.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o mkcaplist ${.CURDIR}/mkcaplist.c readcaps.o
-
-.include <bsd.lib.mk>
diff --git a/lib/libmytinfo/README b/lib/libmytinfo/README
deleted file mode 100644
index ea65c94..0000000
--- a/lib/libmytinfo/README
+++ /dev/null
@@ -1,75 +0,0 @@
-Mytinfo is Public Domain and comes with no guarantees.
-By Ross Ridge (ross@zooid.guild.org).
-
-Mytinfo is a single library that combines the functionality of the
-standard Unix termcap and terminfo libraries. It has the special
-ability of being able to fetch terminal descriptions from both
-termcap and terminfo databases regardless of which set of functions,
-termcap or terminfo, are used. It can even read terminal descriptions
-from terminfo source files.
-
-You should be able to compile this library on almost all versions of Unix.
-Much of it's development was done on '386 Xenix, but I've sucessfuly built
-mytinfo under BSD 4.3, HP-UX 2.1 (System III), SunOS 3.5, and Amix
-(System V R4). There hasn't been a large amount of testing of the support
-programmes that come with the library, but the library itself has been in
-use on a couple of public access Unix sites for over two years. It has
-successfully linked and run with many programmes such as rn, vi and nethack.
-
-Included in the package is tconv, an "all-in-one" programme that will
-compile terminfo sources to binary format and also translate termcap to
-either terminfo source or binary. tic and cap2info are just links
-to the tconv programme. I've also written replacement for tset,
-that uses the mytinfo library, in case tset doesn't come with your
-system or if you aren't too pleased with the one that did. Since this
-is the newest part of the package it probably still has a few bugs.
-You'll also find tput, as well two versions of clear, one that uses
-termcap and the other that uses terminfo.
-
-The environment variables TERMCAP and TERMINFO can have multiple
-filenames separated by a space, a feature not in terminfo and not in
-most termcaps. This is very handy for users that maintain their own
-private databases, as they don't have to have a copy the entire
-database. Eg:
- TERMCAP="$HOME/.termcap /etc/termcap"
- TERMINFO="$HOME/terminfo /usr/lib/terminfo"
- export TERMCAP TERMINFO
-The library will also check compiled-in default locations for terminal
-descriptions. Like most termcaps, the TERMCAP variable can also
-contain the complete termcap terminal description, usually supplied
-from tset at login. The TERMINFO variable can also contain a complete
-terminfo description, but there is no programme like tset to supply it.
-
-Unlike termcap, this library can only use capabilities that it knows about.
-However it does knows about all the standard ones, and you can easily
-add your own to it's list. Included in the list are all terminfo
-capabilities to Release 4 of System V, obsolete termcap capabilities, a
-few caps used from the University of Waterloo (UW), a couple from GNU Emacs,
-and a few I made up myself. Two extensions to the standard termcap % codes
-are supported, GNU's %a, %m, %b, and %f, and UW's %-, %a, and %s.
-
-Termcap and terminfo source descriptions can be mixed in one file, but
-because of this termcap databases must be in a certain style. All
-continuation lines of a termcap entry must be indented from the left
-margin by white space. This shouldn't be a problem with most sites
-since this is the style that most termcap files are distributed, but local
-additions may not adhere to this style. Another possible problem is
-that termcap entries should end with a colon (:), but in most
-distributed termcaps there are entries that don't. If a one line
-termcap entry doesn't end with a colon, it will be ignored. A quick
-way to find these is "tconv -c /etc/termcap > /dev/null".
-
-See the file INSTALL for instructions on configuring and installing
-this library. The file README.doc lists the functions supported by the
-library, and gives short description of the tconv programme. tconv.1 is
-a simple man page for tconv. terminfo.src contains a few sample
-terminal descriptions in terminfo source format. TODO is a list of
-possible enhancements too the library, your comments and additions
-are welcome.
-
-Please let me know of any bugs you find, as well as any ideas you have
-for improvement.
-
-Ross Ridge
-
-ross@zooid.guild.org
diff --git a/lib/libmytinfo/README.doc b/lib/libmytinfo/README.doc
deleted file mode 100644
index 04e1409..0000000
--- a/lib/libmytinfo/README.doc
+++ /dev/null
@@ -1,125 +0,0 @@
-----------------------------------------------------------------------------
-tconv [-b] [-c [-OUGd]] [-i] [-B [-D dir]] [-I] [-k] [-t term] [file]
-tic [file]
-cap2info [-t term] [-OUGdk] [file]
-
--c convert from termcap
--i convert from terminfo source
--b convert from terminfo binary
--B convert to terminfo binary
--I convert to terminfo source
-
-The following switches are available when converting from termcap:
--d don't supply any defaults for missing capabilities
--O include obsolete termcap capabilities
--G include GNU capabilities
--U include UW capabilities
-
--k keep comments
--D dir directory to put terminfo binaries in
-
--t term name of terminal to translate
-file filename of termcap/terminfo database to use
-
-If a file is specifed and no terminal is given the entire file we be translated.
-If no terminal and no file is specified then the terminal name will be taken
-from the environment varible TERM. Unless compiling to a terminfo binary,
-output is to stdout.
-----------------------------------------------------------------------------
-
-char *tparm(char *str, ...); /* up to nine parameters */
-char *tgoto(char *str, int column, int row);
-
-tparm and tgoto support the following termcap and terminfo % codes:
-
-Terminfo % Codes
-
- %% output a '%'
- %[[:][-+# ][width][.precision]][doxXs]
- output pop according to the printf format
- %c output pop as a char
- %'c' push character constant c.
- %{n} push decimal constant n.
- %p[1-9] push paramter [1-9]
- %g[a-z] push variable [a-z]
- %P[a-z] put pop in variable [a-z]
- %l push the length of pop (a string)
- %+ add pop to pop and push the result
- %- subtract pop from pop and push the result
- %* multiply pop and pop and push the result
- %& bitwise and pop and pop and push the result
- %| bitwise or pop and pop and push the result
- %^ bitwise xor pop and pop and push the result
- %~ push the bitwise not of pop
- %= compare if pop and pop are equal and push the result
- %> compare if pop is less than pop and push the result
- %< compare if pop is greater than pop and push the result
- %A logical and pop and pop and push the result
- %O logical or pop and pop and push the result
- %! push the logical not of pop
- %? condition %t if_true [%e if_false] %;
- if condtion evaulates as true then evaluate if_true,
- else evaluate if_false. elseif's can be done:
-%? cond %t true [%e cond2 %t true2] ... [%e condN %t trueN] [%e false] %;
- %i add one to parameters 1 and 2. (ANSI)
-
-Termcap Codes
-
- %% output a %
- %. output parameter as a character
- %d output parameter as a decimal number
- %2 output parameter in printf format %02d
- %3 output parameter in printf format %03d
- %+x add the character x to parameter and output it as a character
-(UW) %-x subtract parameter FROM the character x and output it as a char
-(UW) %ax add the character x to parameter
-(GNU) %a[+*-/=][cp]x
- GNU arithmetic.
-(UW) %sx subtract parameter FROM the character x
- %>xy if parameter > character x then add character y to parameter
- %B convert to BCD (parameter = (parameter/10)*16 + parameter%16)
- %D Delta Data encode (parameter = parameter - 2*(paramter%16))
- %i increment the first two parameters by one
- %n xor the first two parameters by 0140
-(GNU) %m xor the first two parameters by 0177
- %r swap the first two parameters
-(GNU) %b backup to previous parameter
-(GNU) %f skip this parameter
-
-(GNU) used by GNU Emacs termcap libraries
-(UW) used by the University of Waterloo (MFCF) termcap libraries
-
-Note the two definitions of %a, the GNU defintion is used if the characters
-after the 'a' are valid for it, otherwise the UW definition is used.
-----------------------------------------------------------------------------
-
-int setupterm(char *term; int fd; int *err);
-int set_curterm(TERMINAL *new);
-int del_curterm(TERMINAL *old);
-char *tparm(char *str, ...); /* see above */
-int tputs(char *str, int count, int (*putc)());
-int putp(str);
-int tigetflag(char *cap);
-int tigetnum(char *cap);
-char *tigetstr(char *cap);
-int def_prog_mode();
-int def_shell_mode();
-int reset_prog_mode();
-int reset_shell_mode();
-char *boolnames[], *boolcodes[], *boolfnames[];
-char *numnames[], *numcodes[], *numfnames[];
-char *strnames[], *strcodes[], *strfnames[];
-
-These functions work just like the terminfo functions. Note restartterm(),
-vidputs(), vidattr(), and mvcur() are not available.
-----------------------------------------------------------------------------
-
-int tgetent(char *buf, char *term);
-int tgetflag(char *cap);
-int tgetnum(char *cap);
-char *tgetstr(char *cap, char **area);
-char *tgoto(char *cap, int column, int row);
-int tputs(char *str, int count, int (*putc)());
-
-These functions work just like termcap functions.
-----------------------------------------------------------------------------
diff --git a/lib/libmytinfo/TESTS/Makefile b/lib/libmytinfo/TESTS/Makefile
deleted file mode 100644
index eeaa6d2..0000000
--- a/lib/libmytinfo/TESTS/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# Makefile for libmytinfo tests
-# $Id$
-
-LIB= mytinfo
-
-TESTS= ttest tputs.test tparm.test readcaps.test caps clear.tcap \
- clear.tinfo tset tput
-
-CFLAGS+= -Wall -I${.CURDIR}/..
-
-CLEANFILES+= $(TESTS) quit.o
-
-all: $(TESTS)
-
-ttest: ttest.c quit.o
- $(CC) $(CFLAGS) -o ttest $(LDFLAGS) ${.CURDIR}/ttest.c quit.o -l$(LIB)
-
-caps: caps.c quit.o
- $(CC) $(CFLAGS) -o caps $(LDFLAGS) ${.CURDIR}/caps.c quit.o -l$(LIB)
-
-tputs.test: ${.CURDIR}/../tputs.c
- $(CC) -o tputs.test $(LDFLAGS) $(CFLAGS) -DTEST ${.CURDIR}/../tputs.c -l$(LIB)
-
-tparm.test: ${.CURDIR}/../tparm.c
- $(CC) -o tparm.test $(LDFLAGS) $(CFLAGS) -DTEST ${.CURDIR}/../tparm.c -l$(LIB)
-
-readcaps.test: ${.CURDIR}/../readcaps.c
- $(CC) -o readcaps.test $(LDFLAGS) $(CFLAGS) -DTEST ${.CURDIR}/../readcaps.c -l$(LIB)
-
-clear.tcap: clear.c
- $(CC) $(LDFLAGS) $(CFLAGS) -o clear.tcap ${.CURDIR}/clear.c -l$(LIB)
-
-clear.tinfo: clear.c
- $(CC) $(LDFLAGS) $(CFLAGS) -DUSE_TERMINFO -o clear.tinfo ${.CURDIR}/clear.c -l$(LIB)
-
-tset: tset.c quit.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o tset ${.CURDIR}/tset.c quit.o -l$(LIB)
-
-tput: tput.c quit.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o tput ${.CURDIR}/tput.c quit.o -l$(LIB)
-
-.include <bsd.prog.mk>
diff --git a/lib/libmytinfo/TESTS/caps.c b/lib/libmytinfo/TESTS/caps.c
deleted file mode 100644
index e90d26e..0000000
--- a/lib/libmytinfo/TESTS/caps.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * caps.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:29:45
- *
- * caps [-c | -t] [term]
- *
- * -c use termcap names instead of terminfo variable names
- * -t use terminfo capnames instead of variables names
- * term name of terminal to use
- *
- * prints out all the capabilities given the specified terminal. If no
- * terminal is given, it is taken from the environment variable TERM.
- *
- */
-
-#define NOTLIB
-#include "defs.h"
-#include <term.h>
-
-const char SCCSid[] = "@(#) mytinfo caps.c 3.2 92/02/01 public domain, By Ross Ridge";
-
-/* output a string in a human readable format */
-void
-putstr(s)
-char *s; {
- while(*s != '\0') {
- switch(*s) {
- case '\n': printf("\\n"); break;
- case '\b': printf("\\b"); break;
- case '\t': printf("\\t"); break;
- case '\r': printf("\\r"); break;
- case '\f': printf("\\f"); break;
- case ' ': printf("\\s"); break;
- case '\177': printf("^?"); break;
- case '\200': printf("\\0"); break;
- default:
- if (*s > 0 && *s < 32)
- printf("^%c", *s + 64);
- else if (*s < 0)
- printf("\\%03o", *s & 0xff);
- else
- putchar(*s);
- break;
- }
- s++;
- }
-}
-
-void
-do_cleanup(e)
-int e; {
- fprintf(stderr, "usage: %s [-c | -t ] [terminal]\n", prg_name);
- return;
-}
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- int names = 0;
- register int i;
- int flag, num;
- char *str;
-
- prg_name = argv[0];
- cleanup = do_cleanup;
-
- if (argc > 3)
- quit(-1, "argument count");
-
- if (argc == 1)
- setupterm(NULL, 2, (int *) 0);
- else if (argc == 2) {
- if (argv[1][0] != '-')
- setupterm(argv[1], 2, (int *) 0);
- else {
- if (argv[1][1] == 'c')
- names = 2;
- else if (argv[1][1] == 't')
- names = 1;
- else
- quit(-1, "unknown switch '%c'", argv[1][1]);
- setupterm(NULL, 2, (int *) 0);
- }
- } else {
- if (argv[1][0] != '-')
- quit(-1, "bad switch");
- if (argv[1][1] == 'c')
- names = 2;
- else if (argv[1][1] == 't')
- names = 1;
- else
- quit(-1, "unknown switch '%c'", argv[1][1]);
- setupterm(argv[2], 2, (int *) 0);
-
- }
-
- fflush(stderr);
- fflush(stdout);
- printf("\n");
-#ifdef _CUR_TERM
- printf("%s: %s\n", cur_term->name, cur_term->name_all);
- printf("pad: %d xon: %d termcap: %d\n",
- cur_term->pad, cur_term->xon, cur_term->termcap);
- printf("true_columns: %d true_lines: %d baudrate: %lu\n",
- cur_term->true_columns, cur_term->true_lines,
- (unsigned long) cur_term->baudrate);
- printf("\n");
-#endif
-
- printf("Booleans:\n");
- for(i = 0; boolnames[i] != NULL; i++) {
-#ifdef _CUR_TERM
- flag = cur_term->bools[i];
-#else
- flag = tigetflag(boolnames[i]);
-#endif
- if (flag != -1 && flag != 0) {
- switch(names) {
- case 0:
- printf(" %s\n", boolfnames[i]);
- break;
- case 1:
- printf(" %s\n", boolnames[i]);
- break;
- case 2:
- printf(" %s\n", boolcodes[i]);
- break;
- }
- }
- }
-
- printf("\nNumerics:\n");
- for(i = 0; numnames[i] != NULL; i++) {
- num = tigetnum(numnames[i]);
- if (num != -2 && num != -1) {
- switch(names) {
- case 0:
- printf(" %-32s: %d\n", numfnames[i], num);
- break;
- case 1:
- printf(" %-5s: %d\n", numnames[i], num);
- break;
- case 2:
- printf(" %-2s: %d\n", numcodes[i], num);
- break;
- }
- }
- }
- printf("\nStrings:\n");
- for(i = 0; strnames[i] != NULL; i++) {
- str = tigetstr(strnames[i]);
- if (str != (char *) -1 && str != (char *) 0) {
- switch(names) {
- case 0:
- printf(" %-32s: ", strfnames[i]);
- break;
- case 1:
- printf(" %-5s: ", strnames[i]);
- break;
- case 2:
- printf(" %-2s: ", strcodes[i]);
- break;
- }
- putstr(str);
- putchar('\n');
- }
- }
- return 0;
-}
diff --git a/lib/libmytinfo/TESTS/clear.c b/lib/libmytinfo/TESTS/clear.c
deleted file mode 100644
index b603a52..0000000
--- a/lib/libmytinfo/TESTS/clear.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * clear.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:29:47
- *
- * clear
- *
- * clears the terminal's screen
- *
- */
-
-#include "defs.h"
-
-const char SCCSid[] = "@(#) mytinfo clear.c 3.2 92/02/01 public domain, By Ross Ridge";
-
-#ifndef USE_TERMINFO
-
-#ifdef USE_SGTTY
-#include <sgtty.h>
-#endif
-#ifdef USE_TERMIO
-#include <termio.h>
-#endif
-#ifdef USE_TERMIOS
-#include <termios.h>
-#endif
-#ifdef __FreeBSD__
-int tgetent __P((char *, char *));
-int tgetnum __P((char *));
-int tputs __P((char *, int, int (*)(char)));
-#endif
-
-char PC;
-short ospeed;
-
-int
-#ifdef USE_PROTOTYPES
-putch(char c)
-#else
-putch(c)
-int c;
-#endif
-{
- return putchar(c);
-}
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
-#ifdef USE_PROTOTYPES
- char *tgetstr(char *, char **);
-#else
- char *tgetstr();
-#endif
- char *term;
- char buf[MAX_BUF];
- char CL[MAX_LINE];
- char *s, *pc;
-
-#ifdef USE_SGTTY
- struct sgttyb tty;
-
- gtty(1, &tty);
- ospeed = tty.sg_ospeed;
-#else
-#ifdef USE_TERMIO
- struct termio tty;
-
- ioctl(1, TCGETA, &tty);
- ospeed = tty.c_cflag & CBAUD;
-#else
-#ifdef USE_TERMIOS
- struct termios tty;
-
- tcgetattr(1, &tty);
- switch(cfgetospeed(&tty)) {
- case B0: ospeed = 0; break;
- case B50: ospeed = 1; break;
- case B75: ospeed = 2; break;
- case B110: ospeed = 3; break;
- case B134: ospeed = 4; break;
- case B150: ospeed = 5; break;
- case B200: ospeed = 6; break;
- case B300: ospeed = 7; break;
- case B600: ospeed = 8; break;
- case B1200: ospeed = 9; break;
- case B1800: ospeed = 10; break;
- case B2400: ospeed = 11; break;
- case B4800: ospeed = 12; break;
- case B9600: ospeed = 13; break;
- case EXTA: ospeed = 14; break;
- case EXTB: ospeed = 15; break;
-#ifdef B57600
- case B57600: ospeed = 16; break;
-#endif
-#ifdef B115200
- case B115200: ospeed = 17; break;
-#endif
- }
-#else
- ospeed = 0;
-#endif
-#endif
-#endif
-
- term = getenv("TERM");
- if (term == NULL)
- exit(1);
-
- if (tgetent(buf, term) != 1)
- exit(1);
-
- s = CL;
- pc = tgetstr("pc", &s);
- if (pc != NULL)
- PC = *pc;
-
- s = CL;
- tgetstr("cl", &s);
-
- if (CL != NULL) {
- tputs(CL, tgetnum("li"), putch);
- exit(1);
- }
-
- return 0;
-}
-
-#else /* USE_TERMINFO */
-
-#include <term.h>
-
-int
-#ifdef USE_PROTOTYPES
-putch(char c)
-#else
-putch(c)
-int c;
-#endif
-{
- return putchar(c);
-}
-
-int
-main() {
- setupterm((char *) 0, 1, (int *) 0);
- if (clear_screen == (char *) 0)
- exit(1);
- tputs(clear_screen, lines > 0 ? lines : 1, putch);
- return 0;
-}
-
-#endif /* USE_TERMINFO */
diff --git a/lib/libmytinfo/TESTS/quit.c b/lib/libmytinfo/TESTS/quit.c
deleted file mode 100644
index f30fb50..0000000
--- a/lib/libmytinfo/TESTS/quit.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * quit.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:14
- *
- * quit with a diagnostic message printed on stderr
- *
- */
-
-#define NOTLIB
-#include "defs.h"
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo quit.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-char *prg_name;
-
-#if defined(USE_PROTOTYPES) && !defined(lint)
-void (*cleanup)(int);
-#else
-void (*cleanup)();
-#endif
-
-/* PRINTFLIKE2 */
-noreturn
-#ifdef USE_STDARG
-#ifdef USE_PROTOTYPES
-void
-quit(int e, char *fmt, ...)
-#else
-void quit(e, fmt)
-int e;
-char *fmt;
-#endif
-#else
-void quit(va_alist)
-va_dcl
-#endif
-{
-#ifndef USE_STDARG
- int e;
- char *fmt;
-#endif
- va_list ap;
-
-#ifdef USE_STDARG
- va_start(ap, fmt);
-#else
- va_start(ap);
- e = va_arg(ap, int);
- fmt = va_arg(ap, char *);
-#endif
-
- (*cleanup)(e);
-
- if (e != 0)
- fprintf(stderr, "%s: ", prg_name);
-#ifdef USE_DOPRNT
- _doprnt(fmt, ap, stderr);
-#else
- vfprintf(stderr, fmt, ap);
-#endif
- putc('\n', stderr);
- if (e > 0 && e < sys_nerr) {
- fprintf(stderr, "%d - %s\n", e, sys_errlist[e]);
- }
- fflush(stderr);
- exit(e);
-}
diff --git a/lib/libmytinfo/TESTS/tput.c b/lib/libmytinfo/TESTS/tput.c
deleted file mode 100644
index 9c220b8..0000000
--- a/lib/libmytinfo/TESTS/tput.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * tput.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:39
- *
- */
-
-#define NOTLIB
-
-#include "defs.h"
-
-const char SCCSid[] = "@(#) mytinfo tput.c 3.2 92/02/01 public domain, By Ross Ridge";
-
-#define SINGLE
-#include <term.h>
-
-#include <ctype.h>
-
-#define PUTS(s) putp(s)
-#define PUTCHAR(c) putchar(c)
-#define FLUSH fflush(stdout)
-
-extern void (*cleanup)();
-
-static void
-clean(e)
-int e; {
- return;
-}
-
-static void
-usage(e)
-int e; {
- fprintf(stderr, "usage: %s [-T term] capname\n", prg_name);
- return;
-}
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- char *s;
- int i, j, c;
- int reset;
- FILE *f;
- char *term;
-
- prg_name = argv[0];
- s = strrchr(prg_name, '/');
- if (s != NULL && *++s != '\0') {
- prg_name = s;
- }
-
- term = getenv("TERM");
-
- cleanup = usage;
-
- if (argc > 2 && argv[1][0] == '-' && argv[1][1] == 'T') {
- if (argv[1][2] == '\0' && argc > 3) {
- term = argv[2];
- argc--;
- argv++;
- } else {
- term = argv[1] + 2;
- }
- argc--;
- argv++;
- }
-
- if (argc != 2) {
- quit(-1, "arg count");
- }
-
- cleanup = clean;
-
- setupterm(term, 1, (int *)0);
-
- reset = 0;
- if (strcmp(argv[1], "reset") == 0) {
- reset = 1;
- }
- if (reset || strcmp(argv[1], "init") == 0) {
-
- if (init_prog != NULL) {
- system(init_prog);
- }
- FLUSH;
-
- if (reset && reset_1string != NULL) {
- PUTS(reset_1string);
- } else if (init_1string != NULL) {
- PUTS(init_1string);
- }
- FLUSH;
-
- if (reset && reset_2string != NULL) {
- PUTS(reset_2string);
- } else if (init_2string != NULL) {
- PUTS(init_2string);
- }
- FLUSH;
-
- if (set_lr_margin != NULL) {
- PUTS(tparm(set_lr_margin, 0, columns - 1));
- } else if (set_left_margin_parm != NULL
- && set_right_margin_parm != NULL) {
- PUTS(tparm(set_left_margin_parm, 0));
- PUTS(tparm(set_right_margin_parm, columns - 1));
- } else if (clear_margins != NULL && set_left_margin != NULL
- && set_right_margin != NULL) {
- PUTS(clear_margins);
- if (carriage_return != NULL) {
- PUTS(carriage_return);
- } else {
- PUTCHAR('\r');
- }
- PUTS(set_left_margin);
- if (parm_right_cursor) {
- PUTS(tparm(parm_right_cursor, columns - 1));
- } else {
- for(i = 0; i < columns - 1; i++) {
- PUTCHAR(' ');
- }
- }
- PUTS(set_right_margin);
- if (carriage_return != NULL) {
- PUTS(carriage_return);
- } else {
- PUTCHAR('\r');
- }
- }
- FLUSH;
-
- if (init_tabs != 8) {
- if (clear_all_tabs != NULL && set_tab != NULL) {
- for(i = 0; i < columns - 1; i += 8) {
- if (parm_right_cursor) {
- PUTS(tparm(parm_right_cursor,
- 8));
- } else {
- for(j = 0; j < 8; j++) {
- PUTCHAR(' ');
- }
- }
- PUTS(set_tab);
- }
- FLUSH;
- }
- }
-
- if (reset && reset_file != NULL) {
- f = fopen(reset_file, "r");
- if (f == NULL) {
- quit(errno, "Can't open reset_file: '%s'",
- reset_file);
- }
- while((c = fgetc(f)) != EOF) {
- PUTCHAR(c);
- }
- fclose(f);
- } else if (init_file != NULL) {
- f = fopen(init_file, "r");
- if (f == NULL) {
- quit(errno, "Can't open init_file: '%s'",
- init_file);
- }
- while((c = fgetc(f)) != EOF) {
- PUTCHAR(c);
- }
- fclose(f);
- }
- FLUSH;
-
- if (reset && reset_3string != NULL) {
- PUTS(reset_3string);
- } else if (init_2string != NULL) {
- PUTS(init_3string);
- }
- FLUSH;
- return 0;
- }
-
- s = tigetstr(argv[1]);
-
- if (s == (char *) -1) {
- quit(-1, "unknown capname '%s'", argv[1]);
- } else if (s == NULL) {
- return 0;
- }
-
- putp(s);
-
- return 0;
-}
diff --git a/lib/libmytinfo/TESTS/tset.c b/lib/libmytinfo/TESTS/tset.c
deleted file mode 100644
index 3d1eb65..0000000
--- a/lib/libmytinfo/TESTS/tset.c
+++ /dev/null
@@ -1,919 +0,0 @@
-/*
- * tset.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/19 18:53:12
- *
- */
-
-#define NOTLIB
-
-#include "defs.h"
-
-const char SCCSid[] = "@(#) mytinfo tset.c 3.3 92/02/19 public domain, By Ross Ridge";
-
-#define SINGLE
-#include <term.h>
-
-#include <ctype.h>
-
-#if defined(USE_TERMIO) || defined(USE_TERMIOS)
-
-#ifndef ICANON
-#ifdef USE_TERMIO
-#include <termio.h>
-#else
-#include <termios.h>
-#endif
-#endif
-
-#undef USE_SUSPEND
-#ifdef VSUSP
-#define USE_SUSPEND
-#endif
-
-#define USE_INTERRUPT
-
-#if defined(USE_TERMIO) && !defined(TCSETS)
-#undef USE_SUSPEND
-#endif
-
-#else /* USE_TERMIO */
-#ifdef USE_SGTTY
-
-#ifndef CBREAK
-#include <sgtty.h>
-#endif
-
-#undef USE_INTERRUPT
-#ifdef TIOCGETC
-#define USE_INTERRUPT
-#endif
-
-#undef USE_SUSPEND
-#ifdef TIOCGLTC
-#define USE_SUSPEND
-#endif
-
-#undef USE_NEWBSDTTY
-#ifdef TIOCSETD
-#ifdef NTTYDISC
-#define USE_NEWBSDTTY
-#endif
-#endif
-
-#else /* USE_SGTTY */
-
-#undef USE_SUSPEND
-#define USE_NOTTY
-
-#endif /* else USE_SGTTY */
-#endif /* else USE_TERMIO */
-
-#ifndef key_interrupt_char
-#undef USE_INTERRUPT
-#endif
-
-#ifndef key_suspend_char
-#undef USE_SUSPEND
-#endif
-
-char *term;
-int asked = 0;
-long baudrate;
-
-#ifndef USE_STDLIB
-#ifdef USE_PROTOTYPES
-long atol(char const *);
-#else
-long atol();
-#endif
-#endif
-
-#define OUTPUT_TERM 1
-#define OUTPUT_SHELL 2
-#define OUTPUT_TERMCAP 3
-
-#define PUTS(s) tputs(s, 1, putch)
-#define PUTCHAR(c) putc(c, stderr)
-#define FLUSH fflush(stderr)
-
-#ifdef USE_SMALLMEM
-extern unsigned short _baud_tbl[];
-#else
-extern long _baud_tbl[];
-#endif
-
-extern void (*cleanup)();
-
-static void
-clean(e)
-int e; {
- return;
-}
-
-static int
-#ifdef USE_PROTOTYPES
-putch(char c)
-#else
-putch(c)
-int c;
-#endif
-{
- return putc(c, stderr);
-}
-
-void
-set_term(name, query)
-char *name;
-int query; {
- static char buf[MAX_LINE];
- char *s, *t;
-
- if (query) {
- fprintf(stderr, "TERM = (%s) ", name);
- fflush(stderr);
- asked = 1;
- if (fgets(buf, sizeof(buf), stdin) != NULL) {
- s = buf;
- while(*s != '\0' && isspace(*s))
- s++;
- t = s;
- while(*s != '\0' && !isspace(*s))
- s++;
- *s = '\0';
- if (*t != '\0') {
- term = t;
- return;
- }
- }
- }
- term = strcpy(buf, name);
-}
-
-int
-map_term(map, ask)
-char *map;
-int ask; {
- char *type;
- char test = 0;
- char *baud = NULL;
-
- type = map;
-#ifndef USE_NOTTY
- while(*map && strchr(">@<!:?", *map) == NULL)
- map++;
- if (*map != '\0' && *map != ':' && *map != '?') {
- if (*map == '!') {
- switch(*++map) {
- case '>': test = 'g'; break;
- case '@': test = 'n'; break;
- case '<': test = 'l'; break;
- default:
- quit(-1, "bad argument to 'm' switch");
- }
- } else
- test = *map;
- *map++ = '\0';
- baud = map;
- while(*map && *map != ':')
- map++;
- }
-
-#else
- while(*map && *map != ':' && *map != '?')
- map++;
-#endif
-
- if (*map == ':')
- *map++ = '\0';
- if (*map == '?') {
- ask = 1;
- *map++ = '\0';
- }
- if (*map == '\0')
- quit(-1, "bad argument to 'm' switch");
-
- if (type[0] != '\0' && strcmp(type, term) != 0) {
- return 0;
- }
-
-#ifndef USE_NOTTY
- switch(test) {
- case '>':
- if (baudrate <= atol(baud))
- return 0;
- break;
- case '<':
- if (baudrate >= atol(baud))
- return 0;
- break;
- case '@':
- if (baudrate != atol(baud))
- return 0;
- break;
- case 'l':
- if (baudrate < atol(baud))
- return 0;
- break;
- case 'g':
- if (baudrate > atol(baud))
- return 0;
- break;
- case 'n':
- if (baudrate == atol(baud))
- return 0;
- break;
- }
-#endif
-
- set_term(map, ask);
- return 1;
-}
-
-int
-conv_char(s)
-char *s; {
- if (s[0] == '^' && s[1] >= '@' && s[1] < '\177')
- return s[1] & 31;
- else if (s[0] == '^' && s[1] == '?')
- return '\177';
- else if (s[0] != '\0')
- return s[0];
- else
- return -2;
-}
-
-char *
-expand_char(c)
-int c; {
- static char buf[5];
-
- if (c < 0 || c > 127) {
- sprintf(buf, "\\%03o", c & 0177);
- } else if (c == 127) {
- return "DEL";
- } else if (c < 32) {
- buf[0] = '^';
- buf[1] = c + 64;
- buf[2] = '\0';
- } else {
- buf[0] = c;
- buf[1] = '\0';
- }
-
- return buf;
-}
-
-#define START 1
-#define COPY 2
-#define ESCAPE 3
-
-void
-compress_buf(buf)
-char *buf; {
- char *s, *d;
- int state = START;
-
- d = s = buf;
-
- while(*s) {
- switch(state) {
- case START:
- if (isspace(*s) || *s == ':') {
- s++;
- break;
- }
- state = COPY;
- /* FALLTHROUGH */
- case COPY:
- switch(*s) {
- case '^':
- case '\\':
- state = ESCAPE;
- break;
- case ':':
- state = START;
- break;
- }
- *d++ = *s++;
- break;
-
- case ESCAPE:
- *d++ = *s++;
- state = COPY;
- break;
- }
- }
-}
-
-static void
-usage(e)
-int e; {
-#ifdef USE_ANSIC
- fprintf(stderr, "usage: %s [-] [-"
-#define ARG(s) s
-#else
- fprintf(stderr, "usage: %s [-] [-", prg_name);
-#define ARG(s) fputs(s, stderr);
-#endif
- ARG("l")
-#ifndef USE_NOTTY
-#ifdef USE_NEWBSDTTY
- ARG("n")
-#endif
-#endif
- ARG("rsAI")
-#ifndef USE_NOTTY
- ARG("Q")
-#endif
- ARG("S")
-#ifndef USE_NOTTY
- ARG("T")
-#endif
- ARG("]")
-#ifndef USE_NOTTY
- ARG(" [-e[c]] [-E[c]] [-k[c]]")
-#ifdef USE_INTERRUPT
- ARG(" [-i[c]]")
-#endif
-#ifdef USE_SUSPEND
- ARG(" [-z[c]]")
-#endif
-#endif
- ARG("\n\t[-m ident")
-#ifndef USE_NOTTY
- ARG("[[!][<@>]speed]")
-#endif
- ARG(":[?]term] [term]\n")
-#ifdef USE_ANSIC
- , prg_name);
-#endif
-
-#undef ARG
-
- return;
-}
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- char *s;
- int i, j, r, c;
- int ask = 0;
-#ifndef USE_NOTTY
- int erase_char = -1;
- int erase_if_bs = 0;
- int kill_char = -1;
-#ifdef USE_INTERRUPT
- int interrupt_char = -1;
-#endif
-#ifdef USE_SUSPEND
- int suspend_char = -1;
-#endif
-#ifdef USE_NEWBSDTTY
- int newbsdtty = 0;
-#endif
-#endif /* !USE_NOTTY */
- int output_type = 0;
- int no_term_init = 0;
- int term_type_is = 0;
- int no_set_to = 0;
- int reset = 0;
- int matched = 0;
- int expand_tabs = -1;
- int is_csh;
-#ifndef USE_NOTTTY
-#if defined(USE_TERMIOS) || defined(USE_TERMIO) && defined(TCSETS)
- struct termios tty;
-#else
-#ifdef USE_TERMIO
- struct termio tty;
-#else
-#ifdef USE_SGTTY
- struct sgttyb tty;
-#ifdef USE_INTERRUPT
- struct tchars tty2;
-#endif
-#ifdef USE_SUSPEND
- struct ltchars tty3;
-#endif
-#endif /* USE_SGTTY */
-#endif /* else USE_TERMIO */
-#endif
-#endif /* !USE_NOTTY */
- struct term_path *path;
- char buf[MAX_BUF];
- FILE *f;
- int datatype;
-
- prg_name = argv[0];
- s = strrchr(prg_name, '/');
- if (s != NULL && *++s != '\0') {
- if (strcmp(s, "reset") == 0) {
- reset = 1;
- }
- prg_name = s;
- }
-
- cleanup = clean;
-
-#ifndef USE_NOTTY
-#ifdef USE_TERMIOS
- if (tcgetattr(2, &tty) == -1)
- quit(errno, "tcgetattr failed");
- baudrate = cfgetospeed(&tty);
-#else
-#ifdef USE_TERMIO
-#ifdef TCSETS
- if (ioctl(2, TCGETS, &tty) == -1)
-#else
- if (ioctl(2, TCGETA, &tty) == -1)
-#endif
- {
- quit(errno, "ioctl failed");
- }
- baudrate = _baud_tbl[tty.c_cflag & CBAUD];
-#else
-#ifdef USE_SGTTY
- if (gtty(2, &tty) == -1) {
- quit(errno, "gtty failed");
- }
- baudrate = _baud_tbl[tty.sg_ospeed];
-#ifdef USE_INTERRUPT
- if (ioctl(2, TIOCGETC, &tty2) == -1) {
- quit(errno, "ioctl failed");
- }
-#endif
-#ifdef USE_SUSPEND
- if (ioctl(2, TIOCGLTC, &tty3) == -1) {
- quit(errno, "ioctl failed");
- }
-#endif
-#endif /* USE_SGTTY */
-#endif /* else USE_TERMIO */
-#endif
-#endif /* !USE_NOTTY */
-
- term = getenv("TERM");
-
- cleanup = usage;
-
- for(i = 1; i < argc; i++) {
- if (argv[i][0] != '-') {
- if (term == NULL) {
- term = argv[i];
- }
- continue;
- }
- s = argv[i] + 1;
- if (*s == '\0') {
- output_type = OUTPUT_TERM;
- continue;
- }
- while (*s != '\0') {
- switch(*s++) {
- case 'A':
- ask = 1;
- continue;
-#ifndef USE_NOTTY
- case 'E':
- erase_if_bs = 1;
- /* FALLTHROUGH */
- case 'e':
- erase_char = conv_char(s);
- break;
- case 'k':
- kill_char = conv_char(s);
- break;
-#ifdef USE_INTERRUPT
- case 'i':
- interrupt_char = conv_char(s);
- break;
-#endif
-#ifdef USE_SUSPEND
- case 'z':
- suspend_char = conv_char(s);
- break;
-#endif
- case 'T':
- erase_char = kill_char
-#ifdef USE_INTERRUPT
- = interrupt_char
-#endif
-#ifdef USE_SUSPEND
- = suspend_char
-#endif
- = -2;
- continue;
-#ifdef USE_NEWBSDTTY
- case 'n':
- newbsdtty = 1;
- continue;
-#endif
- case 'Q':
- no_set_to = 1;
- continue;
-#endif /* !USE_NOTTY */
- case 'l':
- case 'I':
- no_term_init = 1;
- continue;
- case 'r':
- term_type_is = 1;
- continue;
- case 's':
- output_type = OUTPUT_SHELL;
- continue;
- case 'S':
- output_type = OUTPUT_TERMCAP;
- continue;
- case 'm':
- if (*s == '\0') {
- if (i == argc - 1) {
- quit(-1, "'m' switch requires an argument.");
- }
- s = argv[++i];
- }
- if (!matched) {
- matched = map_term(s, ask);
- }
- break;
- default:
- quit(-1, "unknown switch '%c'", s[-1]);
- break;
- }
- break;
- }
- }
-
- cleanup = clean;
-
- path = _buildpath("$MYTERMINFO", 2,
- "$TERMINFO", 2,
- "$TERMCAP", 1,
-#ifdef TERMINFODIR
- TERMINFODIR, 0,
-#endif
-#ifdef TERMCAPFILE
- TERMCAPFILE, 0,
-#endif
-#ifdef TERMINFOSRC
- TERMINFOSRC, 0,
-#endif
- NULL, -1);
-
- if (path == NULL) {
- quit(-1, "malloc error");
- }
-
- do {
- if (term == NULL) {
- term = "unknown";
- }
-
- if (ask && !asked) {
- set_term(term, 1);
- }
-
- datatype = _fillterm(term, path, buf);
-
- switch(datatype) {
- case -3:
- quit(-1, "malloc error");
- /* NOTREACHED */
- case -2:
- quit(-1, "database in bad format");
- /* NOTREACHED */
- case -1:
- /* quit(-1, "database not found"); */
- case 0:
- if (ask || asked) {
- fprintf(stderr, "terminal type '%s' unknown.\n",
- term);
- term = NULL;
- ask = 1;
- asked = 0;
- } else {
- quit(-1, "terminal type '%s' unknown.\n", term);
- }
- break;
- case 1:
- case 2:
- case 3:
- break;
- default:
- quit(-1, "oops...");
- }
- } while(term == NULL);
-
- _delpath(path);
-
- cur_term->baudrate = baudrate;
-
- if (!no_term_init) {
-
- if (init_prog != NULL) {
- system(init_prog);
- }
- FLUSH;
-
- if (reset && reset_1string != NULL) {
- PUTS(reset_1string);
- } else if (init_1string != NULL) {
- PUTS(init_1string);
- }
- FLUSH;
-
- if (reset && reset_2string != NULL) {
- PUTS(reset_2string);
- } else if (init_2string != NULL) {
- PUTS(init_2string);
- }
- FLUSH;
-
- if (set_lr_margin != NULL) {
- PUTS(tparm(set_lr_margin, 0, columns - 1));
- } else if (set_left_margin_parm != NULL
- && set_right_margin_parm != NULL) {
- PUTS(tparm(set_left_margin_parm, 0));
- PUTS(tparm(set_right_margin_parm, columns - 1));
- } else if (clear_margins != NULL && set_left_margin != NULL
- && set_right_margin != NULL) {
- PUTS(clear_margins);
- if (carriage_return != NULL) {
- PUTS(carriage_return);
- } else {
- PUTCHAR('\r');
- }
- PUTS(set_left_margin);
- if (parm_right_cursor) {
- PUTS(tparm(parm_right_cursor, columns - 1));
- } else {
- for(i = 0; i < columns - 1; i++) {
- PUTCHAR(' ');
- }
- }
- PUTS(set_right_margin);
- if (carriage_return != NULL) {
- PUTS(carriage_return);
- } else {
- PUTCHAR('\r');
- }
- }
- FLUSH;
-
- if (init_tabs != 8) {
- if (clear_all_tabs != NULL && set_tab != NULL) {
- if (carriage_return != NULL) {
- PUTS(carriage_return);
- } else {
- PUTCHAR('\r');
- }
- PUTS(clear_all_tabs);
- PUTS(set_tab);
- for(i = 8; i < columns - 1; i += 8) {
- if (parm_right_cursor) {
- PUTS(tparm(parm_right_cursor,
- 8));
- } else {
- for(j = 0; j < 8; j++) {
- PUTCHAR(' ');
- }
- }
- PUTS(set_tab);
- }
- if (carriage_return != NULL) {
- PUTS(carriage_return);
- } else {
- PUTCHAR('\r');
- }
- expand_tabs = 0;
- FLUSH;
- } else {
- expand_tabs = 1;
- }
- } else {
- expand_tabs = 0;
- }
-
- if (reset && reset_file != NULL) {
- f = fopen(reset_file, "r");
- if (f == NULL) {
- quit(errno, "Can't open reset_file: '%s'",
- reset_file);
- }
- while((c = fgetc(f)) != EOF) {
- PUTCHAR(c);
- }
- fclose(f);
- } else if (init_file != NULL) {
- f = fopen(init_file, "r");
- if (f == NULL) {
- quit(errno, "Can't open init_file: '%s'",
- init_file);
- }
- while((c = fgetc(f)) != EOF) {
- PUTCHAR(c);
- }
- fclose(f);
- }
- FLUSH;
-
- if (reset && reset_3string != NULL) {
- PUTS(reset_3string);
- } else if (init_2string != NULL) {
- PUTS(init_3string);
- }
- FLUSH;
- }
-
- if (term_type_is) {
- fprintf(stderr, "Terminal type is %s\n", term);
- }
-
-#ifndef USE_NOTTY
-#if defined(USE_TERMIO) || defined(USE_TERMIOS)
-
-#ifdef USE_TERMIO
- if (expand_tabs == 0 && (tty.c_cflag & TABDLY) == TAB3) {
- tty.c_cflag = tty.c_cflag & ~TABDLY;
- } else if (expand_tabs == 1) {
- tty.c_cflag = (tty.c_cflag & ~TABDLY) | TAB3;
- }
-#else
- if (!expand_tabs)
- tty.c_oflag &= ~OXTABS;
- else
- tty.c_oflag |= OXTABS;
-#endif
-
-#define SETTO(v, m, t, c) (c != tty.c_cc[v] ? (tty.c_cc[v] = c, \
- !no_set_to ? fprintf(stderr, "%s set to %s\n", t, \
- expand_char(c)) : 0) : 0)
-
-#endif
-#ifdef USE_SGTTY
-
-#ifdef USE_NEWBSDTTY
- if (newbsdtty) {
- if (ioctl(2, TIOCSETD, NTTYDISC) == -1) {
- quit(errno, "Can't switch tty to new line disc.");
- }
- }
-#endif
-
- if (expand_tabs == 0) {
- tty.sg_flags &= ~XTABS;
- } else if (expand_tabs == 1) {
- tty.sg_flags |= XTABS;
- }
-
-#define SETTO(v, m, t, c) (c != m ? (m = c, \
- !no_set_to ? fprintf(stderr, "%s set to %s\n", t, \
- expand_char(c)) : 0) : 0)
-#endif
-
- if (erase_char != -1
- && (!erase_if_bs || backspaces_with_bs
- || (cursor_left == NULL && cursor_left[0] != '\b'))) {
- if (erase_char != -2) {
- c = erase_char;
- } else if (cursor_left == NULL || cursor_left[0] == '\0'
- || cursor_left[1] != '\0') {
- c = '\b';
- } else {
- c = cursor_left[0];
- }
- SETTO(VERASE, tty.sg_erase, "Erase", c);
- }
-
- if (kill_char != -1) {
- if (kill_char != -2) {
- c = kill_char;
- } else if (key_kill_char == NULL || key_kill_char[0] == '\0'
- || key_kill_char[1] != '\0') {
- c = '\025';
- } else {
- c = key_kill_char[0];
- }
- SETTO(VKILL, tty.sg_kill, "Kill", c);
- }
-
-
-#ifdef USE_INTERRUPT
- if (interrupt_char != -1) {
- if (interrupt_char != -2) {
- c = interrupt_char;
- } else if (key_interrupt_char == NULL
- || key_interrupt_char[0] == '\0'
- || key_interrupt_char[1] != '\0') {
- c = '\177';
- } else {
- c = key_interrupt_char[0];
- }
- SETTO(VINTR, tty2.t_intrc, "Interrupt", c);
- }
-#endif
-
-#ifdef USE_SUSPEND
- if (suspend_char != -1) {
- if (suspend_char != -2) {
- c = suspend_char;
- } else if (key_suspend_char == NULL
- || key_suspend_char[0] == '\0'
- || key_suspend_char[1] != '\0') {
- c = '\032';
- } else {
- c = key_suspend_char[0];
- }
- SETTO(VSUSP, tty3.t_suspc, "Suspend", c);
- }
-#endif
-
-#ifdef USE_TERMIOS
- if (tcsetattr(2, TCSADRAIN, &tty) == -1)
- quit(errno, "tcsetattr failed");
-#else
-#ifdef USE_TERMIO
-#ifdef TCSETS
- if (ioctl(2, TCSETS, &tty) == -1)
-#else
- if (ioctl(2, TCSETA, &tty) == -1)
-#endif
- {
- quit(errno, "ioctl failed");
- }
-#else
-#ifdef USE_SGTTY
- if (stty(2, &tty) == -1) {
- quit(errno, "stty failed");
- }
-#ifdef USE_INTERRUPT
- if (ioctl(2, TIOCSETC, &tty2) == -1) {
- quit(errno, "ioctl failed");
- }
-#endif
-#ifdef USE_SUSPEND
- if (ioctl(2, TIOCSLTC, &tty3) == -1) {
- quit(errno, "ioctl failed");
- }
-#endif
-#endif /* USE_SGTTY */
-#endif /* else USE_TERMIO */
-#endif
-#endif /* !USE_NOTTY */
-
- s = getenv("SHELL");
- r = strlen(s);
-
- if (r >= 3 && strcmp("csh", s + r - 3) == 0) {
- is_csh = 1;
- } else {
- is_csh = 0;
- }
-
- switch(output_type) {
- case OUTPUT_TERM:
- fprintf(stdout, "%s\n", term);
- break;
-
- case OUTPUT_TERMCAP:
- if (is_csh) {
- if (datatype == 1) {
- compress_buf(buf);
- fprintf(stdout, "%s %s", term, buf);
- } else {
- s = getenv("TERMCAP");
- if (s == NULL || *s == '\0') {
- s = ":";
- }
- fprintf(stdout, "%s %s", term, s);
- }
- break;
- }
- /* FALLTHROUGH */
- case OUTPUT_SHELL:
- if (is_csh) {
- fprintf(stdout, "set noglob;\n");
- fprintf(stdout, "setenv TERM '%s';\n", term);
- if (datatype == 1) {
- compress_buf(buf);
- fprintf(stdout, "setenv TERMCAP '%s';\n", buf);
- }
- fprintf(stdout, "unset noglob;\n");
- } else {
- fprintf(stdout, "export TERM TERMCAP;\n");
- fprintf(stdout, "TERM='%s';\n", term);
- if (datatype == 1) {
- compress_buf(buf);
- fprintf(stdout, "TERMCAP='%s';\n", buf);
- }
- }
- break;
- }
-
- return 0;
-}
diff --git a/lib/libmytinfo/TESTS/ttest.c b/lib/libmytinfo/TESTS/ttest.c
deleted file mode 100644
index d6cc36e..0000000
--- a/lib/libmytinfo/TESTS/ttest.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * ttest.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:47
- *
- */
-
-#define NOTLIB
-#include "defs.h"
-#include <term.h>
-
-const char SCCSid[] = "@(#) mytinfo ttest.c 3.2 92/02/01 public domain, By Ross Ridge";
-
-int
-cup(x,y)
-int x, y; {
- if (columns < 2 || lines < 2)
- return -1;
- if (cursor_address != NULL)
- putp(tparm(cursor_address, y, x));
- else if (cursor_home != NULL && cursor_down != NULL
- && cursor_right != NULL) {
- putp(cursor_home);
- if (parm_down_cursor != NULL)
- putp(tparm(parm_down_cursor, y));
- else
- for(; y > 0; y--)
- putp(cursor_down);
- if (parm_right_cursor != NULL)
- putp(tparm(parm_right_cursor, y));
- else
- for(; y > 0; y--)
- putp(cursor_right);
- } else if (cursor_to_ll != NULL && cursor_up != NULL
- && cursor_right != NULL) {
- putp(cursor_to_ll);
- if (parm_up_cursor != NULL)
- putp(tparm(parm_up_cursor, y));
- else
- for(y++; y < columns ; y++)
- putp(cursor_up);
- if (parm_right_cursor != NULL)
- putp(tparm(parm_right_cursor, y));
- else
- for(; y > 0; y--)
- putp(cursor_right);
- } else
- return 1;
- return 0;
-}
-
-int
-clear() {
- int r;
- if (clear_screen != NULL)
- putp(clear_screen);
- else if (clr_eos != NULL) {
- r = cup(0,0);
- if (r != 0)
- return r;
- putp(clr_eos);
- } else
- return -2;
- return 0;
-}
-
-void
-nl() {
- if (newline != NULL)
- putp(newline);
- else if (carriage_return != NULL && cursor_down != NULL) {
- putp(cursor_down);
- putp(carriage_return);
- } else
- quit(-1, "can't do a newline");
- return;
-}
-
-void
-putln(s)
-char *s; {
- int i;
-
- if (columns < 2 || auto_right_margin)
- fputs(s, stdout);
- else {
- i = 0;
- while(*s) {
- putchar(*s);
- s++;
- if (++i == columns) {
- nl();
- i = 0;
- }
- }
- }
- nl();
-}
-
-void
-anykey() {
- fputs("-- press any key --", stdout);
- fflush(stdout);
- getchar();
- nl();
-}
-
-void
-do_cleanup(e)
-int e; {
- fflush(stdout);
- fflush(stderr);
- reset_shell_mode();
- fprintf(stderr, "\n");
-}
-
-#ifdef USE_SGTTY
-struct sgttyb new_tty;
-#else
-#ifdef USE_TERMIO
-struct termio new_tty;
-#else
-struct termios new_tty;
-#endif
-#endif
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- register int i;
-
- prg_name = argv[0];
- cleanup = do_cleanup;
-
- if (argc == 1)
- setupterm(NULL, 1, (int *) 0);
- else if (argc == 2)
- setupterm(argv[1], 1, (int *) 0);
- else {
- fprintf(stderr, "usage: %s [terminal]\n", argv[0]);
- return 1;
- }
- fflush(stderr);
- fflush(stdout);
-#ifdef USE_SGTTY
- ioctl(1, TIOCGETP, &new_tty);
- new_tty.sg_flags &= ~(CRMOD | ECHO | XTABS);
-#ifdef CBREAK
- new_tty.sg_flags |= CBREAK;
-#else
- new_tty.sg_flags |= RAW;
-#endif
- ioctl(1, TIOCSETP, &new_tty);
-#endif
-#ifdef USE_TERMIO
- ioctl(1, TCGETA, &new_tty);
-#else
-#ifdef USE_TERMIOS
- tcgetattr(1, &new_tty);
-#endif
-#endif
-#if defined(USE_TERMIO) || defined(USE_TERMIOS)
- new_tty.c_lflag &= ~(ICANON | ECHO);
- new_tty.c_oflag &= ~(OPOST);
- new_tty.c_cc[VMIN] = 1;
- new_tty.c_cc[VTIME] = 1;
-#endif
-#ifdef USE_TERMIO
- ioctl(1, TCSETA, &new_tty);
-#else
-#ifdef USE_TERMIOS
- tcsetattr(1, TCSADRAIN, &new_tty);
-#endif
-#endif
- def_prog_mode();
-
- clear();
- printf("columns = %d", columns);
- nl();
- printf("lines = %d", lines);
- if (columns < 2)
- quit(-1, "columns must be > 1");
- nl();
- anykey();
- nl();
- if (auto_right_margin) {
- putln("auto_right_margin = TRUE");
- nl();
- for(i = 0; i < columns; i++)
- putchar('1');
- for(i = 0; i < columns / 2; i++)
- putchar('2');
- nl();
- } else {
- putln("auto_right_margin = FALSE");
- nl();
- for(i = 0; i < columns + columns / 2; i++)
- putchar('1');
- nl();
- for(i = 0; i < columns / 2; i++)
- putchar('2');
- nl();
- }
- nl();
- putln("***a line of 1's followed by a line of 2's");
- nl();
- anykey();
- nl();
-
- if (over_strike) {
- putln("over_strike = TRUE");
- if (cursor_left != NULL) {
- for(i = 0; i < columns / 4 + 1; i++) {
- putchar('/');
- putp(cursor_left);
- putchar('\\');
- }
- } else if (carriage_return != NULL) {
- for(i = 0; i < columns / 4 + 1; i++)
- putchar('/');
- putp(carriage_return);
- for(i = 0; i < columns / 4 + 1; i++)
- putchar('\\');
- }
- nl();
- nl();
- putln("*** X's made from \\'s overstriking /'s");
- nl();
- anykey();
- nl();
- }
-
- if (cup(0,0) == 0) {
- clear();
- putln("cup test");
- for(i = 1; i < columns; i++)
- putp(tparm(cursor_address, 0, i));
- for(i = 0; i < lines; i++)
- putp(tparm(cursor_address, i, columns - 1));
- for(i = columns; i--;)
- putp(tparm(cursor_address, lines - 1, i));
- for(i = lines; i--;)
- putp(tparm(cursor_address, i, 0));
- nl();
- anykey();
- }
- clear();
-
- putln("Attribute test");
- nl();
- if (enter_blink_mode != NULL) {
- putp(enter_blink_mode);
- printf("blink");
- putp(exit_attribute_mode);
- nl();
- }
- if (enter_bold_mode != NULL) {
- putp(enter_bold_mode);
- printf("bold");
- putp(exit_attribute_mode);
- nl();
- }
- if (enter_dim_mode != NULL) {
- putp(enter_dim_mode);
- printf("dim");
- putp(exit_attribute_mode);
- nl();
- }
- if (enter_reverse_mode != NULL) {
- putp(enter_reverse_mode);
- printf("reverse");
- putp(exit_attribute_mode);
- nl();
- }
- if (enter_standout_mode != NULL) {
- putp(enter_standout_mode);
- printf("standout");
- putp(exit_standout_mode);
- nl();
- }
- if (enter_underline_mode != NULL) {
- putp(enter_underline_mode);
- printf("underline");
- putp(exit_underline_mode);
- nl();
- }
- nl();
- anykey();
-
- clear();
- reset_shell_mode();
-
- return (0);
-}
diff --git a/lib/libmytinfo/addstr.c b/lib/libmytinfo/addstr.c
deleted file mode 100644
index d3d7444..0000000
--- a/lib/libmytinfo/addstr.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * addstr.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:34:01
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#include <ctype.h>
-
-#ifdef USE_SCCS_IDS
-static char const SCCSid[] = "@(#) mytinfo addstr.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-/*
- * I think this routine could be improved, as it is now it searches a
- * linked list of strbufs for one that has enough room left for the
- * string. The only thing else I can think of doing would be to
- * expand a buffer by realloc and then fix the string pointers if it
- * moves.
- */
-
-static struct strbuf *strbuf = NULL;
-
-struct strbuf *
-_endstr() {
- register struct strbuf *p;
-
- p = strbuf;
- strbuf = NULL;
- return p;
-}
-
-char *
-_addstr(s)
-register char *s; {
- register struct strbuf *p;
- register int l;
-
- if (s == NULL) {
- strbuf = NULL;
- return NULL;
- }
-
- if (strbuf == NULL) {
- strbuf = (struct strbuf *) malloc(sizeof(struct strbuf));
- if (strbuf == NULL)
- return NULL;
- strbuf->len = 0;
- strbuf->next = NULL;
- }
- l = strlen(s) + 1;
- if (l > MAX_CHUNK)
- return NULL;
- p = strbuf;
- while (l + p->len > MAX_CHUNK) {
- if (p->next == NULL) {
- p->next = (struct strbuf *)
- malloc(sizeof(struct strbuf));
- p = p->next;
- if (p == NULL)
- return NULL;
- p->len = 0;
- p->next = NULL;
- break;
- }
- p = p->next;
- }
- s = strcpy(p->buf + p->len, s);
- p->len += l;
- return s;
-}
-
-void
-_del_strs(p)
-TERMINAL *p; {
- struct strbuf *q;
-
- q = p->strbuf;
- while(q != NULL) {
- p->strbuf = q->next;
- free((anyptr) q);
- q = p->strbuf;
- }
-}
diff --git a/lib/libmytinfo/bin_order b/lib/libmytinfo/bin_order
deleted file mode 100644
index e00d342..0000000
--- a/lib/libmytinfo/bin_order
+++ /dev/null
@@ -1,48 +0,0 @@
- bin_order
-
- By Ross Ridge
- Public Domain
- 92/02/01 07:29:39
-
- Order of entries in a terminfo binary
-
- @(#) mytinfo bin_order 3.2 92/02/01 public domain, By Ross Ridge
-
-
-!
-bw am xsb xhp xenl eo gn hc km hs in da db mir msgr os eslok xt hz ul
-xon nxon mc5i chts nrrmc npc ndscr ccc bce hls xhpa crxm daisy xvpa sam
-cpix lpix
-
-#
-cols it lines lm xmc pb vt wsl nlab lh lw ma wnum colors pairs ncv bufsz
-spinv spinh maddr mjump mcs mls npins orc orl orhi orvi cps widcs btns
-bitwin bitype
-
-$
-cbt bel cr csr tbc clear el ed hpa cmdch cup cud1 home civis cub1 mrcup cnorm
-cuf1 ll cuu1 cvvis dch1 dl1 dsl hd smacs blink bold smcup smdc dim smir invis
-prot rev smso smul ech rmacs sgr0 rmcup rmdc rmir rmso rmul flash ff fsl is1
-is2 is3 if ich1 il1 ip kbs ktbc kclr kctab kdch1 kdl1 kcud1 krmir kel ked
-kf0 kf1 kf10 kf2 kf3 kf4 kf5 kf6 kf7 kf8 kf9 khome kich1 kil1 kcub1 kll
-knp kpp kcuf1 kind kri khts kcuu1 rmkx smkx lf0 lf1 lf10 lf2 lf3 lf4 lf5
-lf6 lf7 lf8 lf9 rmm smm nel pad dch dl cud ich indn il cub cuf rin cuu pfkey
-pfloc pfx mc0 mc4 mc5 rep rs1 rs2 rs3 rf rc vpa sc ind ri sgr hts wind ht
-tsl uc hu iprog ka1 ka3 kb2 kc1 kc3 mc5p rmp acsc pln kcbt smxon rmxon
-smam rmam xonc xoffc enacs smln rmln kbeg kcan kclo kcmd kcpy kcrt kend
-kent kext kfnd khlp kmrk kmsg kmov knxt kopn kopt kprv kprt krdo kref
-krfr krpl krst kres ksav kspd kund kBEG kCAN kCMD kCPY kCRT kDC kDL kslt
-kEND kEOL kEXT kFND kHLP kHOM kIC kLFT kMSG kMOV kNXT kOPT kPRV kPRT kRDO
-kRPL kRIT kRES kSAV kSPD kUND rfi kf11 kf12 kf13 kf14 kf15 kf16 kf17 kf18
-kf19 kf20 kf21 kf22 kf23 kf24 kf25 kf26 kf27 kf28 kf29 kf30 kf31 kf32
-kf33 kf34 kf35 kf36 kf37 kf38 kf39 kf40 kf41 kf42 kf43 kf44 kf45 kf46 kf47
-kf48 kf49 kf50 kf51 kf52 kf53 kf54 kf55 kf56 kf57 kf58 kf59 kf60 kf61 kf62
-kf63 el1 mgc smgl smgr fln sclk dclk rmclk cwin wingo hup dial qdial tone
-pulse hook pause wait u0 u1 u2 u3 u4 u5 u6 u7 u8 u9 op oc initc initp scp
-setf setb cpi lpi chr cvr defc swidm sdrfq sitm slm smicm snlq snrmq sshm
-ssubm ssupm sum rwidm ritm rlm rmicm rshm rsubm rsupm rum mhpa mcud1 mcub1
-mcuf1 mvpa mcuu1 porder mcud mcub mcuf mcuu scs smgb smgbp smglp smgrp smgt
-smgtp sbim scsd rbim rcsd subcs supcs docr zerom csnm kmous minfo reqmp
-getm setaf setab pfxl devt csin s0ds s1ds s2ds s3ds smglr smgtb birep binel
-bicr colornm defbi endbi setcolor slines dispc smpch rmpch smsc rmsc pctrm
-scesc scesa
diff --git a/lib/libmytinfo/bsearch.c b/lib/libmytinfo/bsearch.c
deleted file mode 100644
index aa4eabf..0000000
--- a/lib/libmytinfo/bsearch.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * bsearch.c
- *
- * This is something I found on watmath. I've made some minor changes for use
- * in this package.
- *
- * 92/06/04 11:35:15
- */
-
-#if 0
-#ifndef lint
-static char *RCSid = "$OHeader: /usr/mfcf/src/accounts/libuw/RCS/bsearch.c,v 1.1 88/06/11 20:41:48 root Exp $";
-#endif
-#endif
-
-#include "defs.h"
-
-#ifdef USE_MYBSEARCH
-
-#ifdef USE_SCCS_IDS
-static char const SCCSid[] = "@(#) mytinfo bsearch.c 3.4 92/06/04 public domain, By Ross Ridge";
-#endif
-
-#ifdef USE_SHORT_BSEARCH
-#define fast_int short
-#else
-#define fast_int mysize_t
-#endif
-
-/*
- * bsearch - find an element of a sorted vector
- *
- * found = bsearch(key, array, dimension, width, compare)
- * returns a pointer to the specified element in the array,
- * or (char*)0 if the element can't be found.
- * key
- * pointer to the element to be searched for in the array
- * array
- * address of an array of elements
- * dimension
- * number of elements in the array
- * width
- * sizeof(type) of each element
- * compare
- * pointer to a function taking (char *) pointers to two elements
- * and returning <0, 0, or >0 as the first element comes before,
- * at, or after the second element. A compare function is provided
- * for comparing strings.
-*/
-#if 0
-/*
- * $OLog: bsearch.c,v $
- * Revision 1.1 88/06/11 20:41:48 root
- * Initial revision
- *
-*/
-#endif
-
- static anyptr
-bsearch(key, array, dimension, iwidth, compare)
- anyptr key;
- anyptr array;
- int dimension;
- mysize_t iwidth;
- compar_fn compare;
-{
- register fast_int start; /* offset to start of current interval */
- register fast_int end; /* offset to end+1 of current interval */
- register fast_int middle; /* offset to middle of current interval */
- auto int status;
- register fast_int width;
-
- width = iwidth / sizeof(char);
-
- start = 0;
- middle = 0;
- end = dimension;
-
- while (start < end) {
-
- middle = (start + end) / 2;
-
- status = (*compare)(key, ((char *)array + middle*width));
-
- if (status < 0)
- end = middle;
-
- else if (status > 0)
- start = middle + 1;
-
- else return (anyptr)(((char *)array) + middle*width);
- }
-
- return 0;
-}
-
-#endif /* USE_MYBSEARCH */
diff --git a/lib/libmytinfo/buildpath.c b/lib/libmytinfo/buildpath.c
deleted file mode 100644
index cecba42..0000000
--- a/lib/libmytinfo/buildpath.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * buildpath.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:29:42
- *
- * _buildpath builds a list of file names and terminal descriprions extracted
- * from its arguments. It returns a pointer to a structure that is used by
- * other routines as the list of file names to search for terminal
- * descriptions. It is passed a variable number of arguments consisting
- * of file name and type pairs. The file name can actually be a list of
- * file names seperated by spaces and any environment variables specified
- * by a dollar sign ($) followed by its name are substituted in. A type
- * of 1 indicates that the file name may actually be termcap description
- * and a type of 2 indicates it may be a terminfo description. A type of 0
- * indicates that the file name can only be a file name (or list of them).
- *
- */
-
-#include "defs.h"
-
-#include <ctype.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo buildpath.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-/* more memory is allocated for file names every HUNK file names */
-#define HUNK 32
-
-/* characters that seperate file names in a list */
-#define SEPERATORS " :"
-
-static struct term_path *path = NULL; /* the list of files */
-static int files = 0; /* # of files in the list */
-static int size = 0; /* # of files there is space for */
-
-/* add a file name, type pair to the list */
-static int
-addfile(file, type)
-char *file;
-int type; {
- int l;
- char *s;
-
- if (file == NULL) {
- if (type != -1)
- return -1;
- } else if (file[0] == '\0')
- return -1;
-
-#ifdef DEBUG
- if (file != NULL)
- printf("addfile: %s\n", file);
-#endif
-
- if (files >= size) {
- size += HUNK;
- if (path == NULL)
- path = (struct term_path *)
- malloc(size * sizeof(struct term_path));
- else
- path = (struct term_path *)
- realloc((anyptr) path,
- size * sizeof(struct term_path));
- if (path == NULL)
- return 0;
- }
- if (file == NULL) {
- path[files].file = file;
- } else {
- l = strlen(file) + 1;
- s = (char *) malloc(l * sizeof(char));
- if (s == NULL)
- return 0;
- path[files].file = strcpy(s, file);
- }
- path[files].type = type;
-
- return ++files;
-}
-
-/* deallocate space used by the path list */
-void
-_delpath(ppath)
-struct term_path *ppath; {
- struct term_path *p;
-
- p = ppath;
- while(p->file != NULL) {
- free((anyptr)p->file);
- p++;
- }
-
- free((anyptr)ppath);
-}
-
-/* build a list of paths. see above */
-#ifdef lint
-/*VARARGS2*/
-struct term_path *
-_buildpath(file, type)
-char *file;
-int type;
-#else
-#ifdef USE_STDARG
-#ifdef USE_PROTOTYPES
-struct term_path *_buildpath(char *file, int type, ...)
-#else
-struct term_path *_buildpath(file, type)
-char *file;
-int type;
-#endif /* USE_PROTOTYPES */
-#else /* USE_STDARG */
-struct term_path *_buildpath(va_alist)
-va_dcl
-#endif /* USE_STDARG */
-#endif /* lint */
-{
-#ifndef lint
-#ifndef USE_STDARG
- char *file;
- int type;
-#endif
-#endif
- va_list ap;
- register char *s, *d, *e;
- char *p;
- char line[MAX_BUF+1];
- char name[MAX_NAME+1];
- int i,j;
-
- size = 0;
- files = 0;
- path = NULL;
-
-#ifdef lint
- ap = NULL;
-#else
-#ifdef USE_STDARG
- va_start(ap, type);
-#else
- va_start(ap);
- file = va_arg(ap, char *);
- type = va_arg(ap, int);
-#endif
-#endif
-
- while (type >= 0 && type <= 2) {
- s = file;
- d = line;
- i = 0;
- while(*s != '\0') {
- if (*s == '$') {
- s++;
- j = 0;
- while(*s != '\0' && (*s == '_' || isalnum(*s)))
- if (j < MAX_NAME) {
- name[j] = *s++;
- j++;
- } else
- break;
- name[j] = '\0';
- e = getenv(name);
- if (e != NULL) {
- while(*e != '\0') {
- if (i < MAX_BUF) {
- *d++ = *e++;
- i++;
- } else
- break;
- }
- } else if (*s == '/')
- s++;
- } else {
- if (i < MAX_BUF) {
- *d++ = *s++;
- i++;
- } else
- break;
- }
- }
- *d = '\0';
- if (type == 0 || line[0] == '/') {
- p = line;
- while ((s = strsep(&p, SEPERATORS)) != NULL && *s == '\0')
- ;
- while(s != NULL) {
- if (addfile(s, 0) == 0)
- return NULL;
- while ((s = strsep(&p, SEPERATORS)) != NULL && *s == '\0')
- ;
- }
- } else
- if (addfile(line, type) == 0)
- return NULL;
- file = va_arg(ap, char *);
- type = va_arg(ap, int);
- }
- addfile(NULL, -1);
- return path;
-}
diff --git a/lib/libmytinfo/cap_list b/lib/libmytinfo/cap_list
deleted file mode 100644
index 8acf973..0000000
--- a/lib/libmytinfo/cap_list
+++ /dev/null
@@ -1,529 +0,0 @@
- cap_list
-
- By Ross Ridge
- Public Domain
- 92/02/01 07:29:44
-
- @(#) mytinfo cap_list 3.2 92/02/01 public domain, By Ross Ridge
-
-types: ! = boolean, # = number, $ = string, $G = string with parameters,
- $K = string that never is outputed (with tputs).
-
-type variable capname termcap
-
-Standard terminfo capabilities:
-
-! auto_left_margin bw bw
-! auto_right_margin am am
-! ceol_standout_glitch xhp xs
-! dest_tabs_magic_smso xt xt
-! eat_newline_glitch xenl xn
-! erase_overstrike eo eo
-! generic_type gn gn
-! hard_copy hc hc
-! hard_cursor chts HC
-! has_meta_key km km
-! has_status_line hs hs
-! insert_null_glitch in in
-! memory_above da da
-! memory_below db db
-! move_insert_mode mir mi
-! move_standout_mode msgr ms
-! needs_xon_xoff nxon nx
-! no_esc_ctlc xsb xb
-! no_pad_char npc NP
-! non_rev_rmcup nrrmc NR
-! over_strike os os
-! prtr_silent mc5i 5i
-! status_line_esc_ok eslok es
-! tilde_glitch hz hz
-! transparent_underline ul ul
-! xon_xoff xon xo
-# columns cols co
-# init_tabs it it
-# label_height lh lh
-# label_width lw lw
-# lines lines li
-# lines_of_memory lm lm
-# magic_cookie_glitch xmc sg
-# num_labels nlab Nl
-# padding_baud_rate pb pb
-# virtual_terminal vt vt
-# width_status_line wsl ws
-$K acs_chars acsc ac
-$ back_tab cbt bt
-$ bell bel bl
-$ carriage_return cr cr
-$G change_scroll_region csr cs
-$ char_padding rmp rP
-$ clear_all_tabs tbc ct
-$ clear_margins mgc MC
-$ clear_screen clear cl
-$ clr_bol el1 cb
-$ clr_eol el ce
-$ clr_eos ed cd
-$G column_address hpa ch
-$K command_character cmdch CC
-$G cursor_address cup cm
-$ cursor_down cud1 do
-$ cursor_home home ho
-$ cursor_invisible civis vi
-$ cursor_left cub1 le
-$G cursor_mem_address mrcup CM
-$ cursor_normal cnorm ve
-$ cursor_right cuf1 nd
-$ cursor_to_ll ll ll
-$ cursor_up cuu1 up
-$ cursor_visible cvvis vs
-$ delete_character dch1 dc
-$ delete_line dl1 dl
-$ dis_status_line dsl ds
-$ down_half_line hd hd
-$ ena_acs enacs eA
-$ enter_alt_charset_mode smacs as
-$ enter_am_mode smam SA
-$ enter_blink_mode blink mb
-$ enter_bold_mode bold md
-$ enter_ca_mode smcup ti
-$ enter_delete_mode smdc dm
-$ enter_dim_mode dim mh
-$ enter_insert_mode smir im
-$ enter_protected_mode prot mp
-$ enter_reverse_mode rev mr
-$ enter_secure_mode invis mk
-$ enter_standout_mode smso so
-$ enter_underline_mode smul us
-$ enter_xon_mode smxon SX
-$G erase_chars ech ec
-$ exit_alt_charset_mode rmacs ae
-$ exit_am_mode rmam RA
-$ exit_attribute_mode sgr0 me
-$ exit_ca_mode rmcup te
-$ exit_delete_mode rmdc ed
-$ exit_insert_mode rmir ei
-$ exit_standout_mode rmso se
-$ exit_underline_mode rmul ue
-$ exit_xon_mode rmxon RX
-$ flash_screen flash vb
-$ form_feed ff ff
-$ from_status_line fsl fs
-$ init_1string is1 i1
-$ init_2string is2 is
-$ init_3string is3 i3
-$K init_file if if
-$K init_prog iprog iP
-$ insert_character ich1 ic
-$ insert_line il1 al
-$ insert_padding ip ip
-$K key_a1 ka1 K1
-$K key_a3 ka3 K3
-$K key_b2 kb2 K2
-$K key_backspace kbs kb
-$K key_beg kbeg @1
-$K key_btab kcbt kB
-$K key_c1 kc1 K4
-$K key_c3 kc3 K5
-$K key_cancel kcan @2
-$K key_catab ktbc ka
-$K key_clear kclr kC
-$K key_close kclo @3
-$K key_command kcmd @4
-$K key_copy kcpy @5
-$K key_create kcrt @6
-$K key_ctab kctab kt
-$K key_dc kdch1 kD
-$K key_dl kdl1 kL
-$K key_down kcud1 kd
-$K key_eic krmir kM
-$K key_end kend @7
-$K key_enter kent @8
-$K key_eol kel kE
-$K key_eos ked kS
-$K key_exit kext @9
-$K key_f0 kf0 k0
-$K key_f1 kf1 k1
-$K key_f10 kf10 k;
-$K key_f11 kf11 F1
-$K key_f12 kf12 F2
-$K key_f13 kf13 F3
-$K key_f14 kf14 F4
-$K key_f15 kf15 F5
-$K key_f16 kf16 F6
-$K key_f17 kf17 F7
-$K key_f18 kf18 F8
-$K key_f19 kf19 F9
-$K key_f2 kf2 k2
-$K key_f20 kf20 FA
-$K key_f21 kf21 FB
-$K key_f22 kf22 FC
-$K key_f23 kf23 FD
-$K key_f24 kf24 FE
-$K key_f25 kf25 FF
-$K key_f26 kf26 FG
-$K key_f27 kf27 FH
-$K key_f28 kf28 FI
-$K key_f29 kf29 FJ
-$K key_f3 kf3 k3
-$K key_f30 kf30 FK
-$K key_f31 kf31 FL
-$K key_f32 kf32 FM
-$K key_f33 kf33 FN
-$K key_f34 kf34 FO
-$K key_f35 kf35 FP
-$K key_f36 kf36 FQ
-$K key_f37 kf37 FR
-$K key_f38 kf38 FS
-$K key_f39 kf39 FT
-$K key_f4 kf4 k4
-$K key_f40 kf40 FU
-$K key_f41 kf41 FV
-$K key_f42 kf42 FW
-$K key_f43 kf43 FX
-$K key_f44 kf44 FY
-$K key_f45 kf45 FZ
-$K key_f46 kf46 Fa
-$K key_f47 kf47 Fb
-$K key_f48 kf48 Fc
-$K key_f49 kf49 Fd
-$K key_f5 kf5 k5
-$K key_f50 kf50 Fe
-$K key_f51 kf51 Ff
-$K key_f52 kf52 Fg
-$K key_f53 kf53 Fh
-$K key_f54 kf54 Fi
-$K key_f55 kf55 Fj
-$K key_f56 kf56 Fk
-$K key_f57 kf57 Fl
-$K key_f58 kf58 Fm
-$K key_f59 kf59 Fn
-$K key_f6 kf6 k6
-$K key_f60 kf60 Fo
-$K key_f61 kf61 Fp
-$K key_f62 kf62 Fq
-$K key_f63 kf63 Fr
-$K key_f7 kf7 k7
-$K key_f8 kf8 k8
-$K key_f9 kf9 k9
-$K key_find kfnd @0
-$K key_help khlp %1
-$K key_home khome kh
-$K key_ic kich1 kI
-$K key_il kil1 kA
-$K key_left kcub1 kl
-$K key_ll kll kH
-$K key_mark kmrk %2
-$K key_message kmsg %3
-$K key_move kmov %4
-$K key_next knxt %5
-$K key_npage knp kN
-$K key_open kopn %6
-$K key_options kopt %7
-$K key_ppage kpp kP
-$K key_previous kprv %8
-$K key_print kprt %9
-$K key_redo krdo %0
-$K key_reference kref &1
-$K key_refresh krfr &2
-$K key_replace krpl &3
-$K key_restart krst &4
-$K key_resume kres &5
-$K key_right kcuf1 kr
-$K key_save ksav &6
-$K key_sbeg kBEG &9
-$K key_scancel kCAN &0
-$K key_scommand kCMD *1
-$K key_scopy kCPY *2
-$K key_screate kCRT *3
-$K key_sdc kDC *4
-$K key_sdl kDL *5
-$K key_select kslt *6
-$K key_send kEND *7
-$K key_seol kEOL *8
-$K key_sexit kEXT *9
-$K key_sf kind kF
-$K key_sfind kFND *0
-$K key_shelp kHLP #1
-$K key_shome kHOM #2
-$K key_sic kIC #3
-$K key_sleft kLFT #4
-$K key_smessage kMSG %a
-$K key_smove kMOV %b
-$K key_snext kNXT %c
-$K key_soptions kOPT %d
-$K key_sprevious kPRV %e
-$K key_sprint kPRT %f
-$K key_sr kri kR
-$K key_sredo kRDO %g
-$K key_sreplace kRPL %h
-$K key_sright kRIT %i
-$K key_srsume kRES %j
-$K key_ssave kSAV !1
-$K key_ssuspend kSPD !2
-$K key_stab khts kT
-$K key_sundo kUND !3
-$K key_suspend kspd &7
-$K key_undo kund &8
-$K key_up kcuu1 ku
-$ keypad_local rmkx ke
-$ keypad_xmit smkx ks
-$K lab_f0 lf0 l0
-$K lab_f1 lf1 l1
-$K lab_f10 lf10 la
-$K lab_f2 lf2 l2
-$K lab_f3 lf3 l3
-$K lab_f4 lf4 l4
-$K lab_f5 lf5 l5
-$K lab_f6 lf6 l6
-$K lab_f7 lf7 l7
-$K lab_f8 lf8 l8
-$K lab_f9 lf9 l9
-$ label_off rmln LF
-$ label_on smln LO
-$ meta_off rmm mo
-$ meta_on smm mm
-$ newline nel nw
-$K pad_char pad pc
-$G parm_dch dch DC
-$G parm_delete_line dl DL
-$G parm_down_cursor cud DO
-$G parm_ich ich IC
-$G parm_index indn SF
-$G parm_insert_line il AL
-$G parm_left_cursor cub LE
-$G parm_right_cursor cuf RI
-$G parm_rindex rin SR
-$G parm_up_cursor cuu UP
-$G pkey_key pfkey pk
-$G pkey_local pfloc pl
-$G pkey_xmit pfx px
-$G plab_norm pln pn
-$ print_screen mc0 ps
-$G prtr_non mc5p pO
-$ prtr_off mc4 pf
-$ prtr_on mc5 po
-$G repeat_char rep rp
-$ req_for_input rfi RF
-$ reset_1string rs1 r1
-$ reset_2string rs2 r2
-$ reset_3string rs3 r3
-$K reset_file rf rf
-$ restore_cursor rc rc
-$G row_address vpa cv
-$ save_cursor sc sc
-$ scroll_forward ind sf
-$ scroll_reverse ri sr
-$G set_attributes sgr sa
-$ set_left_margin smgl ML
-$ set_right_margin smgr MR
-$ set_tab hts st
-$G set_window wind wi
-$ tab ht ta
-$G to_status_line tsl ts
-$ underline_char uc uc
-$ up_half_line hu hu
-$ xoff_character xoffc XF
-$ xon_character xonc XN
-
-Release 3.2 and 4 capabilities (AMIX)
-(some of the string attributes are guesses...)
-
-! back_color_erase bce ut
-! can_change ccc cc
-! col_addr_glitch xhpa YA
-! cpi_changes_res cpix YF
-! cr_cancels_micro_mode crxm YB
-! has_print_wheel daisy YC
-! hue_lightness_saturation hls hl
-! lpi_changes_res lpix YG
-! non_dest_scroll_region ndscr ND
-! row_addr_glitch xvpa YD
-! semi_auto_right_margin sam YE
-# bit_image_entwining bitwin Yo
-# bit_image_type bitype Yp
-# buffer_capacity bufsz Ya
-# buttons btns BT
-# dot_horz_spacing spinh Yc
-# dot_vert_spacing spinv Yb
-# max_attributes ma ma
-# max_colors colors Co
-# max_micro_address maddr Yd
-# max_micro_jump mjump Ye
-# max_pairs pairs pa
-# maximum_windows wnum MW
-# micro_char_size mcs Yf
-# micro_line_size mls Yg
-# no_color_video ncv NC
-# number_of_pins npins Yh
-# output_res_char orc Yi
-# output_res_horz_inch orhi Yk
-# output_res_line orl Yj
-# output_res_vert_inch orvi Yl
-# print_rate cps Ym
-# wide_char_size widcs Yn
-$ alt_scancode_esc scesa S8
-$G bit_image_carriage_return bicr Yv
-$G bit_image_newline binel Zz
-$G bit_image_repeat birep Xy
-$G change_char_pitch cpi ZA
-$G change_line_pitch lpi ZB
-$G change_res_horz chr ZC
-$G change_res_vert cvr ZD
-$G char_set_names csnm Zy
-$ code_set_init csin ci
-$G color_names colornm Yw
-$G create_window cwin CW
-$G define_bit_image_region defbi Yx
-$G define_char defc ZE
-$ device_type devt dv
-$G dial_phone dial DI
-$ display_clock dclk DK
-$ display_pc_char dispc S1
-$ end_bit_image_region endbi Yy
-$ enter_doublewide_mode swidm ZF
-$ enter_draft_quality sdrfq ZG
-$ enter_italics_mode sitm ZH
-$ enter_leftward_mode slm ZI
-$ enter_micro_mode smicm ZJ
-$ enter_near_letter_quality snlq ZK
-$ enter_normal_quality snrmq ZL
-$ enter_pc_charset_mode smpch S2
-$ enter_scancode_mode smsc S4
-$ enter_shadow_mode sshm ZM
-$ enter_subscript_mode ssubm ZN
-$ enter_superscript_mode ssupm ZO
-$ enter_upward_mode sum ZP
-$ exit_doublewide_mode rwidm ZQ
-$ exit_italics_mode ritm ZR
-$ exit_leftward_mode rlm ZS
-$ exit_micro_mode rmicm ZT
-$ exit_pc_charset_mode rmpch S3
-$ exit_scancode_mode rmsc S5
-$ exit_shadow_mode rshm ZU
-$ exit_subscript_mode rsubm ZV
-$ exit_superscript_mode rsupm ZW
-$ exit_upward_mode rum ZX
-$ fixed_pause pause PA
-$ flash_hook hook fh
-$ get_mouse getm Gm
-$G goto_window wingo WG
-$ hangup hup HU
-$G initialize_color initc Ic
-$G initialize_pair initp Ip
-$ key_mouse kmous Km
-$ label_format fln Lf
-$G micro_column_address mhpa ZY
-$ micro_down mcud1 ZZ
-$ micro_left mcub1 Za
-$ micro_right mcuf1 Zb
-$G micro_row_address mvpa Zc
-$ micro_up mcuu1 Zd
-$ mouse_info minfo Mi
-$K order_of_pins porder Ze
-$ orig_colors oc oc
-$ orig_pair op op
-$G parm_down_micro mcud Zf
-$G parm_left_micro mcub Zg
-$G parm_right_micro mcuf Zh
-$G parm_up_micro mcuu Zi
-$ pc_term_options pctrm S6
-$G pkey_plab pfxl xl
-$ pulse pulse PU
-$ quick_dial qdial QD
-$ remove_clock rmclk RC
-$ req_mouse_pos reqmp RQ
-$ scancode_escape scesc S7
-$G select_char_set scs Zj
-$ set0_des_seq s0ds s0
-$ set1_des_seq s1ds s1
-$ set2_des_seq s2ds s2
-$ set3_des_seq s3ds s3
-$G set_a_background setab AB
-$G set_a_foreground setaf AF
-$G set_background setb Sb
-$ set_bottom_margin smgb Zk
-$G set_bottom_margin_parm smgbp Zl
-$G set_clock sclk SC
-$G set_color_band setcolor Yz
-$G set_color_pair scp sp
-$G set_foreground setf Sf
-$G set_left_margin_parm smglp Zm
-$G set_lr_margin smglr ML
-$G set_page_length slines YZ
-$G set_right_margin_parm smgrp Zn
-$G set_tb_margin smgtb MT
-$ set_top_margin smgt Zo
-$G set_top_margin_parm smgtp Zp
-$G start_bit_image sbim Zq
-$G start_char_set_def scsd Zr
-$ stop_bit_image rbim Zs
-$G stop_char_set_def rcsd Zt
-$K subscript_characters subcs Zu
-$K superscript_characters supcs Zv
-$K these_cause_cr docr Zw
-$ tone tone TO
-$ user0 u0 u0
-$ user1 u1 u1
-$ user2 u2 u2
-$ user3 u3 u3
-$ user4 u4 u4
-$ user5 u5 u5
-$ user6 u6 u6
-$ user7 u7 u7
-$ user8 u8 u8
-$ user9 u9 u9
-$ wait_tone wait WA
-$ zero_motion zerom Zx
-
-"Obsolete" termcap capabilities (variable and terminfo names are mine)
-
-$ backspace_if_not_bs OTbc bc
-! backspaces_with_bs OTbs bs
-# backspace_delay OTdB dB
-# carriage_return_delay OTdC dC
-# form_feed_delay OTdF dF
-# new_line_delay OTdN dN
-# horizontal_tab_delay OTdT dT
-# vertical_tab_delay OTdV dV
-! even_parity OTEP EP
-! half_duplex OTHD HD
-# number_of_function_keys OTkn kn
-$K other_non_function_keys OTko ko
-! lower_case_only OTLC LC
-$K arrow_key_map OTma ma
-$ memory_lock_above OTml ml
-$ memory_unlock OTmu mu
-! no_correctly_working_cr OTnc nc
-! linefeed_is_newline OTNL NL
-$ linefeed_if_not_lf OTnl nl
-! crt_without_scrolling OTns ns
-! odd_parity OTOP OP
-! has_hardware_tabs OTpt pt
-! uppercase_only OTUC UC
-! return_does_clr_eol OTxr xr
-! tek_4025_insert_line OTxx xx
-# magic_cookie_glitch_ul OTug ug
-
-Caps used by the University of Waterloo (variable and terminfo names are mine)
-
-$K key_interrupt_char UWki ki
-$K key_kill_char UWkk kk
-$K key_suspend_char UWkz kz
-! initialization_messy UWxc xc
-! index_at_bottom_does_cr UWxl xl
-
-! rind_only_at_top OTxq xq
-
-Different names for existing terminfo caps used by GNU Emacs:
-! GNU_has_meta_key GNUMT MT
-# GNU_tab_width GNUtw tw
-
-Non standard capabilities:
-
-$ scroll_left sl1 Sl
-$ scroll_right sr1 Sr
-$G parm_scroll_left sl SL
-$G parm_scroll_right sr SI
-
-Dummy (must be present and last):
-
-$K _get_other use tc
diff --git a/lib/libmytinfo/compar.c b/lib/libmytinfo/compar.c
deleted file mode 100644
index f8998d3..0000000
--- a/lib/libmytinfo/compar.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * compar.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/06/04 11:36:24
- *
- */
-
-#include "defs.h"
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo compar.c 3.3 92/06/04 public domain, By Ross Ridge";
-#endif
-
-/* compare two elements a sorted list of pointers to strings */
-int
-_compar(a, b)
-#ifdef USE_ANSIC
-void const *a;
-void const *b; {
-#else
-anyptr a, b; {
-#endif
- register char *aa = **(char ***)a;
- register char *bb = **(char ***)b;
-
- /* An optimization trick from C News, compare the first
- * two chars of the string here to avoid a the overhead of a
- * call to strcmp.
- */
-
-#ifdef __GNUC__
- return ((*aa - *bb) ? : strcmp(aa, bb));
-#else
- if (*aa != *bb)
- return *aa - *bb;
- return strcmp(aa, bb);
-#endif
-}
diff --git a/lib/libmytinfo/config.h b/lib/libmytinfo/config.h
deleted file mode 100644
index 87afa05..0000000
--- a/lib/libmytinfo/config.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * config.h
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/19 18:56:28
- *
- * @(#) mytinfo config.h 3.3 92/02/19 public domain, By Ross Ridge
- *
- * Read the file INSTALL for more information on configuring mytinfo
- *
- */
-
-#ifndef _CONFIG_H_
-#define _CONFIG_H_
-
-#ifdef __STDC__
-#define USE_ANSIC /* undefine this if your compiler lies */
-#endif
-
-#define USE_TERMIOS /* use POSIX termios */
-#undef USE_TERMIO /* use termio (SysIII, SysV) */
-#undef USE_SGTTY /* use sgtty (v7, BSD) */
-#define USE_WINSZ /* get window size from the tty driver */
-#undef USE_STRINGS /* include <strings.h> instead of <string.h> */
-#undef USE_MYBSEARCH /* your library doesn't have bsearch */
-#undef USE_MYSTRTOK /* your library doesn't have strtok */
-#undef USE_MYQSORT /* your library doesn't have qsort */
-#undef USE_MYMKDIR /* your library doesn't have mkdir */
-#define USE_MEMORY /* you have an <memory.h> header */
-#undef USE_FAKE_STDIO /* don't use real stdio */
-#undef USE_DOPRNT /* no vfprintf, use _doprnt */
-#undef USE_TERMINFO /* look in terminfo dirs for entry */
-#define USE_TERMCAP /* look in termcap dirs for entry */
-
-#undef USE_SHORT_BSEARCH /* speeds up MYBSEARCH on most machines */
-
-#undef USE_SMALLMEM /* save some memory */
-
-#undef USE_UPBC_KLUDGE /* do tgoto like real togo */
-#undef USE_EXTERN_UPBC /* get cuu1 and cub1 from externs UP and BC */
-#undef USE_LITOUT_KLUDGE /* an alternate tgoto kludge, not recommened */
-
-
-#ifndef USE_ANSIC
-
-#undef USE_PROTOTYPES /* use ANSI C prototypes */
-#undef USE_STDLIB /* you have a <stdlib.h> */
-#undef USE_STDARG /* you have a <stdarg.h> */
-#undef USE_STDDEF /* you have a <stddef.h> */
-
-#define const
-#define volatile
-#define noreturn /* a function that doesn't return */
-
-typedef char *anyptr; /* a type that any pointer can be assigned to */
-
-#define mysize_t unsigned /* size_t, the size of an object */
-
-#else /* USE_ANSIC */
-
-#define USE_PROTOTYPES
-#define USE_STDLIB
-#define USE_STDARG
-#define USE_STDDEF
-
-typedef void *anyptr;
-
-#define mysize_t size_t
-
-#ifdef __GNUC__
-#define noreturn volatile
-#else
-#define noreturn
-#endif
-
-#endif /* USE_ANSIC */
-
-#ifdef __FreeBSD__
-#define TERMCAPFILE "$TERMCAPFILE $HOME/.termcap /usr/share/misc/termcap"
-#else
-#define TERMCAPFILE "$TERMCAPFILE $HOME/.termcap /etc/termcap"
-#endif
-
-#define TERMINFOSRC "/usr/lib/terminfo/terminfo.src"
-
-#define TERMINFODIR "/usr/lib/terminfo"
-
-#endif
diff --git a/lib/libmytinfo/defs.h b/lib/libmytinfo/defs.h
deleted file mode 100644
index 7b8e8d9..0000000
--- a/lib/libmytinfo/defs.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * defs.h
- *
- * By Ross Ridge
- * Public Domain
- * 92/06/04 11:37:02
- *
- * @(#) mytinfo defs.h 3.3 92/06/04 public domain, By Ross Ridge
- */
-
-#ifndef _DEFS_H_
-#define _DEFS_H_
-
-#ifdef TEST
-#undef NOTLIB
-#define NOTLIB
-#endif
-
-#include "config.h"
-
-#ifdef NOTLIB
-#undef USE_FAKE_STDIO
-#endif
-
-#ifdef USE_STDDEF
-#include <stddef.h>
-#else
-#include <sys/types.h>
-#endif
-
-#ifdef USE_STDLIB
-#include <stdlib.h>
-#else
-#ifdef USE_PROTOTYPES
-anyptr malloc(mysize_t);
-anyptr realloc(anyptr, mysize_t);
-char *getenv(char const *);
-#else
-anyptr malloc();
-anyptr realloc();
-char *getenv();
-#endif
-#endif
-
-#ifdef USE_STDARG
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#ifndef _VA_LIST
-#define _VA_LIST
-#endif
-
-#ifdef USE_FAKE_STDIO
-#include "fake_stdio.h"
-#define sprintf _fake_sprintf
-#ifdef USE_PROTOTYPES
-int sprintf(char *, char *, ...);
-#else
-int sprintf();
-#endif
-#else /* USE_FAKE_STDIO */
-#if 0
-#include <stdio.h>
-#else
-#undef NULL
-#include <stdio.h>
-#endif
-#endif /* !USE_FAKE_STDIO */
-
-#ifdef USE_STRINGS
-#include <strings.h>
-#define strchr(s, c) index(s, c)
-#define strrchr(s, c) rindex(s, c)
-#ifndef USE_MYSTRTOK
-#ifdef USE_PROTOTYPES
-char *strtok(char *, char *);
-#else
-char *strtok();
-#endif
-#endif
-#else
-#include <string.h>
-#endif
-
-#ifdef USE_MEMORY
-#include <memory.h>
-#else
-#define memcpy(b, a, n) bcopy(a, b, n)
-#endif
-
-#include <errno.h>
-
-#define MAX_BUF 4096
-#define MAX_LINE 640
-#define MAX_NAME 128
-
-#define MAX_CHUNK MAX_LINE
-
-#define MAX_DEPTH 32
-
-#define MAX_VARNAME 32
-#define MAX_TINFONAME 5
-#define MAX_TCAPNAME 2
-
-struct caplist {
- char type;
- char flag;
- char var[MAX_VARNAME + 1];
- char tinfo[MAX_TINFONAME + 1];
- char tcap[MAX_TCAPNAME + 1];
-};
-
-struct term_path {
- char *file;
- int type; /* 0 = file, 1 = TERMCAP env, 2 = TERMINFO env */
-};
-
-struct _terminal;
-
-#ifdef USE_PROTOTYPES
-
-int _gettcap(char *, struct _terminal *, struct term_path *);
-int _gettinfo(char *, struct _terminal *, struct term_path *);
-int _fillterm(char *, struct term_path *, char *);
-int _findterm(char *, struct term_path *, char *);
-int _init_tty(void), _lit_output(void), _check_tty(void);
-void _figure_termcap(void);
-int _tmatch(char *, char *);
-void _norm_output(void);
-int readcaps(FILE *, struct caplist *, int);
-noreturn void quit(int, char *, ...);
-#ifdef lint
-extern void (*cleanup)();
-#else
-extern void (*cleanup)(int);
-#endif
-struct term_path *_buildpath(char *, int, ...);
-void _delpath(struct term_path *);
-char *_addstr(char *);
-struct strbuf *_endstr(void);
-void _del_strs(struct _terminal *);
-void _tcapconv(void);
-void _tcapdefault(void);
-int _getother(char *, struct term_path *, struct _terminal *);
-int _gettbin(char *, struct _terminal *);
-int _findboolcode(char *), _findnumcode(char *), _findstrcode(char *);
-int _findboolname(char *), _findnumname(char *), _findstrname(char *);
-int _findboolfname(char *), _findnumfname(char *), _findstrfname(char *);
-
-#ifdef USE_ANSIC
-int _compar(void const *, void const *);
-typedef int (*compar_fn)(void const *, void const *);
-#else
-int _compar(anyptr, anyptr);
-typedef int (*compar_fn)(anyptr, anyptr);
-#endif
-
-#else /* USE_PROTOTYPES */
-
-int _gettcap(), _gettinfo(), _fillterm(), _findterm(), _init_tty();
-int _lit_output(), _check_tty();
-void _figure_termcap();
-int _tmatch();
-void _norm_output();
-int readcaps();
-noreturn void /* GOTO */ quit(/*FORMAT2*/);
-extern void (*cleanup)();
-struct term_path *_buildpath();
-void _delpath();
-char *_addstr();
-struct strbuf *_endstr();
-void _del_strs();
-void _tcapconv();
-void _tcapdefault();
-int _getother();
-int _gettbin();
-int _findboolcode(), _findnumcode(), _findstrcode();
-int _findboolname(), _findnumname(), _findstrname();
-int _findboolfname(), _findnumfname(), _findstrfname();
-int _compar();
-typedef int (*compar_fn)();
-
-#endif /* USE_PROTOTYPES */
-
-extern char _strflags[];
-
-extern char _mytinfo_version[];
-
-/* for quit.c */
-extern int sys_nerr;
-extern char *prg_name;
-
-#endif /* _DEFS_H_ */
diff --git a/lib/libmytinfo/fillterm.c b/lib/libmytinfo/fillterm.c
deleted file mode 100644
index 8e120c9..0000000
--- a/lib/libmytinfo/fillterm.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * fillterm.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:29:54
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo fillterm.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-TERMINAL _term_buf;
-TERMINAL *cur_term;
-
-int
-_fillterm(name, path, buf)
-char *name, *buf;
-struct term_path *path; {
- register int i, r;
-
- r = -1;
-
- for(i = NUM_OF_BOOLS; i;)
- _term_buf.bools[--i] = -1;
- for(i = NUM_OF_NUMS; i;)
- _term_buf.nums[--i] = -2;
- for(i = NUM_OF_STRS; i;)
- _term_buf.strs[--i] = (char *) -1;
-
- _term_buf.name_all = NULL;
-
- r = _findterm(name, path, buf);
- switch(r) {
- case 1:
- if (_gettcap(buf, &_term_buf, path) != 0)
- return -3;
- _tcapconv();
- _tcapdefault();
- break;
- case 2:
- if (_gettinfo(buf, &_term_buf, path) != 0)
- return -3;
- break;
- case 3:
- if (_gettbin(buf, &_term_buf) != 0)
- return -3;
- break;
- default:
- return r;
- }
-
- if ((_term_buf.name = _addstr(name)) == NULL)
- return -3;
-
- for(i = NUM_OF_BOOLS; i;)
- if (_term_buf.bools[--i] == -1)
- _term_buf.bools[i] = 0;
- for(i = NUM_OF_NUMS; i;)
- if (_term_buf.nums[--i] == -2)
- _term_buf.nums[i] = -1;
- for(i = NUM_OF_STRS; i;)
- if (_term_buf.strs[--i] == (char *) -1)
- _term_buf.strs[i] = NULL;
-
- _term_buf.fd = 1;
- _term_buf.pad = 1;
- _term_buf.baudrate = 0;
- _term_buf.strbuf = _endstr();
-
- cur_term = (TERMINAL *) malloc(sizeof(_term_buf));
- if (cur_term == NULL)
- return -3;
- memcpy((anyptr)cur_term, (anyptr)&_term_buf, sizeof(_term_buf));
-
- return r;
-}
diff --git a/lib/libmytinfo/findcap.c b/lib/libmytinfo/findcap.c
deleted file mode 100644
index 81ede3f..0000000
--- a/lib/libmytinfo/findcap.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * findcap.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:29:55
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#include "bsearch.c"
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo findcap.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-extern char **_sboolcodes[], **_snumcodes[], **_sstrcodes[];
-extern char **_sboolnames[], **_snumnames[], **_sstrnames[];
-extern char **_sboolfnames[], **_snumfnames[], **_sstrfnames[];
-
-static char **p2p2c;
-
-int
-_findboolcode(s)
-char *s; {
- char ***match;
-
- p2p2c = &s;
-
- match = (char ***) bsearch((anyptr) &p2p2c, (anyptr) _sboolcodes,
- NUM_OF_BOOLS, sizeof(p2p2c), _compar);
- if (match == NULL)
- return -1;
- return *match - boolcodes;
-}
-
-int
-_findboolname(s)
-char *s; {
- char ***match;
-
- p2p2c = &s;
-
- match = (char ***) bsearch((anyptr) &p2p2c, (anyptr) _sboolnames,
- NUM_OF_BOOLS, sizeof(p2p2c), _compar);
- if (match == NULL)
- return -1;
- return *match - boolnames;
-}
-
-int
-_findboolfname(s)
-char *s; {
- char ***match;
-
- p2p2c = &s;
-
- match = (char ***) bsearch((anyptr) &p2p2c, (anyptr) _sboolfnames,
- NUM_OF_BOOLS, sizeof(p2p2c), _compar);
- if (match == NULL)
- return -1;
- return *match - boolfnames;
-}
-
-int
-_findnumcode(s)
-char *s; {
- char ***match;
-
- p2p2c = &s;
-
- match = (char ***) bsearch((anyptr) &p2p2c, (anyptr) _snumcodes,
- NUM_OF_NUMS, sizeof(p2p2c), _compar);
- if (match == NULL)
- return -1;
- return *match - numcodes;
-}
-
-int
-_findnumname(s)
-char *s; {
- char ***match;
-
- p2p2c = &s;
-
- match = (char ***) bsearch((anyptr) &p2p2c, (anyptr) _snumnames,
- NUM_OF_NUMS, sizeof(p2p2c), _compar);
- if (match == NULL)
- return -1;
- return *match - numnames;
-}
-
-int
-_findnumfname(s)
-char *s; {
- char ***match;
-
- p2p2c = &s;
-
- match = (char ***) bsearch((anyptr) &p2p2c, (anyptr) _snumfnames,
- NUM_OF_NUMS, sizeof(p2p2c), _compar);
- if (match == NULL)
- return -1;
- return *match - numfnames;
-}
-
-int
-_findstrcode(s)
-char *s; {
- char ***match;
-
- p2p2c = &s;
-
- match = (char ***) bsearch((anyptr) &p2p2c, (anyptr) _sstrcodes,
- NUM_OF_STRS, sizeof(p2p2c), _compar);
- if (match == NULL)
- return -1;
- return *match - strcodes;
-}
-
-int
-_findstrname(s)
-char *s; {
- char ***match;
-
- p2p2c = &s;
-
- match = (char ***) bsearch((anyptr) &p2p2c, (anyptr) _sstrnames,
- NUM_OF_STRS, sizeof(p2p2c), _compar);
- if (match == NULL)
- return -1;
- return *match - strnames;
-}
-
-int
-_findstrfname(s)
-char *s; {
- char ***match;
-
- p2p2c = &s;
-
- match = (char ***) bsearch((anyptr) &p2p2c, (anyptr) _sstrfnames,
- NUM_OF_STRS, sizeof(p2p2c), _compar);
- if (match == NULL)
- return -1;
- return *match - strfnames;
-}
diff --git a/lib/libmytinfo/findterm.c b/lib/libmytinfo/findterm.c
deleted file mode 100644
index 8fc41a0..0000000
--- a/lib/libmytinfo/findterm.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/* findterm.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:29:56
- *
- */
-
-#include "defs.h"
-
-#include <ctype.h>
-#include <fcntl.h>
-#ifdef USE_STDDEF
-#include <sys/types.h>
-#endif
-#include <sys/stat.h>
-#ifdef __FreeBSD__
-#include <unistd.h>
-#endif
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo findterm.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-static int linecnt;
-
-static int
-getln(f, buf, len)
-FILE *f;
-register char *buf;
-int len; {
- register int c, i = 0;
-
- while((c = getc(f)) == '#') {
- linecnt++;
- while((c = getc(f)) != '\n')
- if (c == EOF)
- return -1;
- }
-
- while(c != '\n') {
- if (c == EOF)
- return -1;
- if (i < len) {
- i++;
- *buf++ = c;
- }
- c = getc(f);
- }
-
- while(i > 0 && isspace(*(buf-1))) {
- buf--;
- i--;
- }
-
- *buf = '\0';
- return i;
-}
-
-static int
-_findterm2(name, file, buf)
-char *name, *buf;
-char *file; {
- char line[MAX_LINE];
- FILE *f;
- register char *sp, *dp;
- int c;
- int l;
- int cont;
- int fd;
- struct stat st;
-
- linecnt = 0;
-
-#ifdef DEBUG
- printf("open: %s\n", file);
-#endif
- fd = open(file, O_RDONLY);
- if (fd == -1)
- return -1;
- if (fstat(fd, &st) == -1) {
- close(fd);
- return -1;
- }
- if ((st.st_mode & 0170000) == 0040000) {
- sprintf(buf, "%s/%c/%s", file, name[0], name);
- close(fd);
- fd = open(buf, O_RDONLY);
- if (fd == -1)
- return -1;
- if (read(fd, buf, MAX_BUF) < 12
- || buf[0] != 032 || buf[1] != 1) {
- close(fd);
- return -1;
- }
- close(fd);
- return 3;
- }
- f = fdopen(fd, "r");
- if (f == NULL) {
- close(fd);
- return -1;
- }
-
- while ((l = getln(f, buf, MAX_LINE)) != -1) {
- linecnt++;
- if (!isspace(buf[0]) && l != 0) {
- sp = buf + l - 1;
- cont = 0;
- switch(*sp) {
- case '\\':
- cont = 1;
- *sp = '\0';
- /* FALLTHROUGH */
- case ':':
- sp = buf;
- dp = line;
- while (*sp != ':') {
- if (*sp == '\0' && cont &&
- (l = getln(f, buf, MAX_LINE))
- != -1) {
- linecnt++;
- sp = buf;
- if (l > 0 && buf[l-1] == '\\')
- cont = 1;
- else
- cont = 0;
- continue;
- }
- if (*sp == '\0') {
-#ifdef DEBUG
- printf("bad line (%d)\n",
- linecnt);
- fclose(f);
- return -2;
-#else
- goto err;
-#endif
- }
- *dp++ = *sp++;
- }
- *dp = '\0';
- if (!_tmatch(line, name))
- break;
- if (!cont) {
- fclose(f);
- return 1;
- }
- l = strlen(buf);
- dp = buf + l;
- while((c = getc(f)) != EOF && l < MAX_BUF) {
- if (c == '\n')
- break;
- if (c == '\\') {
- c = getc(f);
- if (c == EOF)
- break;
- if (c == '\n') {
- c = getc(f);
- if (c == EOF)
- break;
- if (c == '#') {
- while((c = getc(f)) != EOF && c != '\n');
- if (c == EOF)
- break;
- continue;
- }
- *dp++ = c;
- continue;
- }
- *dp++ = '\\';
- *dp++ = c;
- continue;
- }
- *dp++ = c;
- }
- *dp = '\0';
- fclose(f);
- return 1;
- case ',':
- sp = buf;
- dp = line;
- while(*sp != ',')
- *dp++ = *sp++;
- *dp = '\0';
- if (!_tmatch(line, name))
- break;
- dp = buf + l;
- while ((c = getc(f)) != EOF && l < MAX_BUF) {
- if (c == '\n') {
- c = getc(f);
- if (isspace(c))
- continue;
- if (c == '\n') {
- ungetc(c, f);
- continue;
- }
- if (c == '#') {
- while((c = getc(f)) != EOF)
- if (c == '\n')
- break;
- if (c == EOF)
- break;
- ungetc(c, f);
- continue;
- }
- break;
- }
- *dp++ = c;
- l++;
- }
- *dp = '\0';
- fclose(f);
- return 2;
- default:
- err:
-#ifdef DEBUG
- printf("strange line (%d)\n", linecnt);
-#endif
- break;
- }
- }
- }
- fclose(f);
- return 0;
-}
-
-int
-_findterm(name, path, buf)
-char *name;
-struct term_path *path;
-char *buf; {
- register char *s, *d;
- int r = 0;
- while(path->file != NULL) {
- switch(path->type) {
- case 0:
- r = _findterm2(name, path->file, buf);
- break;
- case 1:
- if (path->file[0] == '/') {
- r = _findterm2(name, path->file, buf);
- } else {
- s = path->file;
- d = buf;
- while(*s != '\0' && *s != ':')
- *d++ = *s++;
- *d = '\0';
- if (_tmatch(buf, name)) {
- while(*s != '\0')
- *d++ = *s++;
- return 1;
- }
- r = 0;
- }
- break;
- case 2:
- if (path->file[0] == '/') {
- r = _findterm2(name, path->file, buf);
- } else {
- s = path->file;
- d = buf;
- while(*s != '\0' && *s != ',')
- *d++ = *s++;
- *d = '\0';
- if (_tmatch(buf, name)) {
- while(*s != '\0')
- *d++ = *s++;
- return 2;
- }
- r = 0;
- }
- break;
- default:
- r = 0;
- break;
- }
- if (r == 1 || r == 2 || r == 3) {
-#ifdef DEBUG
- printf("found in %s\n", path->file);
-#endif
- break;
- }
- path++;
- }
- return r;
-}
diff --git a/lib/libmytinfo/getother.c b/lib/libmytinfo/getother.c
deleted file mode 100644
index 2542f66..0000000
--- a/lib/libmytinfo/getother.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * getother.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:29:58
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo getother.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-int
-_getother(name, path, ct)
-char *name;
-struct term_path *path;
-TERMINAL *ct; {
- static int depth = 0;
- int r;
- char buf[MAX_BUF];
-
- if (depth >= MAX_DEPTH)
- return 1; /* infinite loop */
-
-#ifdef DEBUG
- printf("\ngetother: %s\n", name);
-#endif
-
- switch(_findterm(name, path, buf)) {
- case -3:
- return 1;
- case 1:
- depth++;
- r = _gettcap(buf, ct, path);
- break;
- case 2:
- depth++;
- r = _gettinfo(buf, ct, path);
- break;
- default:
- return 0;
- }
- depth--;
- return r;
-}
diff --git a/lib/libmytinfo/gettbin.c b/lib/libmytinfo/gettbin.c
deleted file mode 100644
index 678a7d8..0000000
--- a/lib/libmytinfo/gettbin.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * gettbin.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:29:59
- *
- * Get a terminfo binary entry
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo gettbin.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-extern int _boolorder[], _numorder[], _strorder[];
-
-#ifdef TRUE_BYTE_ORDERING
-/* 8 bit char, 16 bit short, lsb first, twos complement */
-#define convshort(s) (*(short *)(s))
-
-#else
-
-#ifdef TWOS_COPLEMENT
-/* 8 bit char, 16 bit short, lsb last, twos complement */
-#define convshort(s) ((short)(((s[0] & 0377) << 8) | (s[1] & 0377)))
-
-#else
-
-/* anything else... */
-
-static short
-convshort(s)
-char *s; {
- register int a,b;
-
- a = (int) s[0] & 0377;
- b = (int) s[1] & 0377;
-
- if (a == 0377 && b == 0377)
- return -1;
- if (a == 0376 && b == 0377)
- return -2;
-
- return a + b * 256;
-}
-#endif
-#endif
-
-int
-_gettbin(buf, cur)
-char *buf;
-TERMINAL *cur; {
- register char *s;
- int i;
- int sz_names, sz_bools, sz_nums, sz_offs, sz_strs;
- int n_bools, n_nums, n_strs;
- char *strtbl;
-
- buf[MAX_BUF-1] = '\0';
- s = buf;
-
- if (convshort(s) != 0432)
- return 1;
- sz_names = convshort(s + 2);
- sz_bools = convshort(s + 4);
- n_nums = convshort(s + 6);
- n_strs = convshort(s + 8);
- sz_strs = convshort(s + 10);
-
- n_bools = sz_bools;
- sz_nums = n_nums * 2;
- sz_offs = n_strs * 2;
-
- if ((sz_names + sz_bools) & 1)
- sz_bools++;
-
- if (12 + sz_names + sz_bools + sz_nums + sz_offs + sz_strs >= MAX_BUF)
- return 1;
-
- s += 12;
- if ((cur->name_all = _addstr(s)) == NULL)
- return 1;
- s += sz_names;
- while(--s >= buf + 12) {
- if (*s == '|') {
- if ((cur->name_long = _addstr(s + 1)) == NULL)
- return 1;
- break;
- }
- }
-
- s = buf + 12 + sz_names;
- for(i = 0; i < n_bools && _boolorder[i] != -1; i++, s++) {
- if (cur->bools[_boolorder[i]] == -1 && *s == 1)
- cur->bools[_boolorder[i]] = 1;
- }
-
- s = buf + 12 + sz_names + sz_bools;
- for(i = 0; i < n_nums && _numorder[i] != -1; i++, s += 2) {
- if (convshort(s) == -2)
- cur->nums[_numorder[i]] = -1;
- else if (cur->nums[_numorder[i]] == -2 && convshort(s) != -1)
- cur->nums[_numorder[i]] = convshort(s);
- }
-
- s = buf + 12 + sz_names + sz_bools + sz_nums;
- strtbl = s + sz_offs;
- for(i = 0; i < n_strs && _strorder[i] != -1; i++, s += 2) {
- if (convshort(s) == -2)
- cur->strs[_strorder[i]] = NULL;
- else if (cur->strs[_strorder[i]] == (char *) -1
- && convshort(s) != -1) {
-#ifdef DEBUG
- printf("$%s ", strnames[_strorder[i]]);
-#endif
- if ((cur->strs[_strorder[i]]
- = _addstr(strtbl + convshort(s))) == NULL)
- return 1;
- }
- }
-
- return 0;
-}
diff --git a/lib/libmytinfo/gettcap.c b/lib/libmytinfo/gettcap.c
deleted file mode 100644
index 1424b88..0000000
--- a/lib/libmytinfo/gettcap.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * gettcap.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:00
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#include <ctype.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo gettcap.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-int
-_gettcap(sp, cur, path)
-register char *sp;
-TERMINAL *cur;
-struct term_path *path; {
- static char name[MAX_NAME];
- static char entry[MAX_LINE];
- register char *dp;
- register TERMINAL *ct = cur;
- int i, pad, fract, mul = 0, ind;
- char c, flag;
-
- dp = entry;
- while(*sp != ':' && *sp != '\0')
- *dp++ = *sp++;
- if (ct->name_all == NULL) {
- *dp = '\0';
- if ((ct->name_all = _addstr(entry)) == NULL)
- return 1;
- while(dp > entry && *--dp != '|');
- ct->name_long = ct->name_all + (dp - entry) + 1;
- }
-
- while(*sp != '\0') {
- while(*sp == ':')
- sp++;
- while(isspace(*sp))
- sp++;
- if (*sp == ':')
- continue;
- if (*sp == '\0')
- break;
- dp = name;
- while (*sp != ':' && *sp != '#' && *sp != '=' &&
- !isspace(*sp) && *sp != '\0')
- *dp++ = *sp++;
- *dp = '\0';
-#ifdef DEBUG
- printf(" %s", name);
-#endif
- switch(*sp) {
- case '=':
-#ifdef DEBUG
- putchar('$');
-#endif
- ind = _findstrcode(name);
- if (ind != -1)
- flag = _strflags[ind];
- else
- flag = 'K';
- dp = entry;
- fract = pad = 0;
- sp++;
- if (isdigit(*sp) && flag != 'K') {
- pad = *sp++ - '0';
- while(isdigit(*sp))
- pad = pad * 10 + (*sp++ - '0');
- if (*sp == '.' && isdigit(sp[1])) {
- sp++;
- fract = (*sp++ - '0');
- }
- if (*sp == '*') {
- mul = 1;
- sp++;
- } else
- mul = 0;
-
- }
- while(*sp != '\0' && *sp != ':') {
- switch(*sp) {
- case '\\':
- switch(*++sp) {
- case 'e':
- case 'E': *dp++ = '\033'; break;
- case 'l': *dp++ = '\012'; break;
- case 'n': *dp++ = '\n'; break;
- case 'r': *dp++ = '\r'; break;
- case 't': *dp++ = '\t'; break;
- case 'b': *dp++ = '\b'; break;
- case 'f': *dp++ = '\f'; break;
- case 's': *dp++ = ' '; break;
-
- case '^':
- case '\\':
- case ',':
- case ':':
- *dp++ = *sp;
- break;
-
- case '0':
- if (!isdigit(*(sp + 1))) {
- *dp++ = '\200';
- break;
- }
- ;/* FALLTHROUGH */
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- c = *sp - '0';
- if (sp[1] >= '0'
- && sp[1] <= '8')
- c = c * 8
- + (*++sp - '0');
- if (sp[1] >= '0'
- && sp[1] <= '8')
- c = c * 8
- + (*++sp - '0');
- switch((char)c) {
- case 0:
- if (flag == 'K')
- *dp++ = '\200';
- else {
- *dp++ = '\\';
- *dp++ = '0';
- *dp++ = '0';
- *dp++ = '0';
- }
- break;
- case '$':
- case '\'':
- case '\\':
- if (flag != 'K')
- *dp++ = '\\';
- /* FALLTHROUGH */
- default:
- if (flag == 'G'
- && c == '%')
- *dp++ = '\\';
- *dp++ = c;
- break;
- }
- break;
- default:
- *dp++ = '\\';
- *dp++ = *sp;
- break;
- }
- sp++;
- break;
- case '^':
- if (*++sp >= 'A' && *sp <= '_') {
- *dp++ = *sp++ - '@';
- } else if (*sp >= 'a' && *sp <= 'z') {
- *dp++ = *sp++ - 'a' + 1;
- } else if (*sp == '@') {
- if (flag == 'K')
- *dp++ = '\200';
- else {
- *dp++ = '\\';
- *dp++ = '0';
- *dp++ = '0';
- *dp++ = '0';
- }
- sp++;
- } else if (*sp == '?') {
- *dp++ = '\177';
- sp++;
- } else
- *dp++ = '^';
- break;
- case '$':
- if (flag != 'K')
- *dp++ = '\\';
- /* FALLTHROUGH */
- default:
- *dp++ = *sp++;
- break;
- }
- }
- if (pad != 0 || fract != 0) {
- if (fract == 0)
- sprintf(dp, "$<%d", pad);
- else
- sprintf(dp, "$<%d.%d", pad, fract);
- dp += strlen(dp);
- if (mul)
- *dp++ = '*';
- *dp++ = '>';
- }
- *dp++ = '\0';
- if(name[0] == 't' && name[1] == 'c' && name[2] == '\0'){
- if (_getother(entry, path, ct))
- return 1;
- break;
- }
- if (ind == -1)
- break;
- if (ct->strs[ind] != (char *) -1)
- break;
- if ((ct->strs[ind] = _addstr(entry)) == NULL)
- return 1;
- break;
- case '#':
-#ifdef DEBUG
- putchar('#');
-#endif
- i = atoi(++sp);
- while(*sp != '\0' && *sp++ != ':');
- ind = _findnumcode(name);
- if (ind == -1)
- break;
- if (ct->nums[ind] != -2)
- break;
- ct->nums[ind] = i;
- break;
- default:
- while(*sp != '\0' && *sp++ != ':');
- if (*(dp - 1) == '@') {
-#ifdef DEBUG
- putchar('@');
-#endif
- *(dp - 1) = '\0';
- ind = _findboolcode(name);
- if (ind != -1) {
-#ifdef DEBUG
- putchar('!');
-#endif
- if (ct->bools[ind] == -1)
- ct->bools[ind] = 0;
- break;
- }
- ind = _findnumcode(name);
- if (ind != -1) {
-#ifdef DEBUG
- putchar('#');
-#endif
- if (ct->nums[ind] == -2)
- ct->nums[ind] = -1;
- break;
- }
- ind = _findstrcode(name);
- if (ind != -1) {
-#ifdef DEBUG
- putchar('$');
-#endif
- if (ct->strs[ind] == (char *) -1)
- ct->strs[ind] = NULL;
- break;
- }
- break;
- }
-#ifdef DEBUG
- putchar('!');
-#endif
- ind = _findboolcode(name);
- if (ind == -1)
- break;
- if (ct->bools[ind] != -1)
- break;
- ct->bools[ind] = 1;
- }
- }
- return 0;
-}
diff --git a/lib/libmytinfo/gettinfo.c b/lib/libmytinfo/gettinfo.c
deleted file mode 100644
index 7b7b445..0000000
--- a/lib/libmytinfo/gettinfo.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * gettinfo.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:02
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#include <ctype.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo gettinfo.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-int _gettinfo(sp, cur, path)
-register char *sp;
-struct term_path *path;
-TERMINAL *cur; {
- static char name[MAX_NAME];
- static char entry[MAX_LINE];
- register char *dp;
- register TERMINAL *ct = cur;
- int ind, i, base;
- char c, flag;
-
- dp = entry;
- while(*sp != ',' && *sp != '\0')
- *dp++ = *sp++;
- if (ct->name_all == NULL) {
- *dp = '\0';
- if ((ct->name_all = _addstr(entry)) == NULL)
- return 1;
- while(dp > entry && *--dp != '|');
- ct->name_long = ct->name_all + (dp - entry) + 1;
- }
-
- while(*sp != '\0') {
- while(*sp == ',')
- sp++;
- while(isspace(*sp))
- sp++;
- if (*sp == ',')
- continue;
- if (*sp == '\0')
- break;
- dp = name;
- while (*sp != ',' && *sp != '#' && *sp != '=' && !isspace(*sp) && *sp != '\0')
- *dp++ = *sp++;
- *dp = '\0';
-#ifdef DEBUG
- printf(" %s", name);
-#endif
- switch(*sp) {
- case '=':
-#ifdef DEBUG
- putchar('$');
-#endif
- dp = entry;
- sp++;
- ind = _findstrname(name);
- if (ind != -1)
- flag = _strflags[ind];
- else {
- ind = _findstrfname(name);
- if (ind != -1)
- flag = _strflags[ind];
- else
- flag = 'K';
- }
- while(*sp != '\0' && *sp != ',') {
- switch(*sp) {
- case '%':
- *dp++ = *sp++;
- if (*sp == '^' && flag == 'G')
- *dp++ = *sp++;
- break;
- case '\\':
- switch(*++sp) {
- case 'e':
- case 'E': *dp++ = '\033'; break;
- case 'l': *dp++ = '\012'; break;
- case 'n': *dp++ = '\n'; break;
- case 'r': *dp++ = '\r'; break;
- case 't': *dp++ = '\t'; break;
- case 'b': *dp++ = '\b'; break;
- case 'f': *dp++ = '\f'; break;
- case 's': *dp++ = ' '; break;
-
- case '^':
- case '\\':
- case ',':
- case ':':
- *dp++ = *sp; break;
-
- case '0':
- if (!isdigit(*(sp + 1))) {
- *dp++ = '\200';
- break;
- }
- /* FALLTHROUGH */
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- c = *sp - '0';
- if (isdigit(sp[1]))
- c = c * 8 + (*++sp-'0');
- if (isdigit(sp[1]))
- c = c * 8 + (*++sp-'0');
- switch((char)c) {
- case 0:
- if (flag == 'K')
- *dp++ = '\200';
- else {
- *dp++ = '\\';
- *dp++ = '0';
- *dp++ = '0';
- *dp++ = '0';
- }
- break;
- case '$':
- case '\'':
- case '\\':
- if (flag != 'K')
- *dp++ = '\\';
- /* FALLTHROUGH */
- default:
- if (flag == 'G'
- && c == '%')
- *dp++ = '\\';
- *dp++ = c;
- break;
- }
- break;
- default:
- *dp++ = '\\';
- *dp++ = *sp;
- break;
- }
- sp++;
- break;
- case '^':
- if (*++sp >= 'A' && *sp <= '_') {
- *dp++ = *sp++ - '@';
- } else if (*sp >= 'a' && *sp <= 'z') {
- *dp++ = *sp++ - 'a' + 1;
- } else if (*sp == '@') {
- if (flag == 'K')
- *dp++ = '\200';
- else {
- *dp++ = '\\';
- *dp++ = '0';
- *dp++ = '0';
- *dp++ = '0';
- }
- sp++;
- } else
- *dp++ = '^';
- break;
- default:
- *dp++ = *sp++;
- break;
- }
- }
- *dp++ = '\0';
- if (strcmp(name, "use") == 0) {
- if (_getother(entry, path, ct))
- return 1;
- break;
- }
- if (ind == -1)
- break;
- if (ct->strs[ind] != (char *) -1)
- break;
- if ((ct->strs[ind] = _addstr(entry)) == NULL)
- return 1;
- break;
- case '#':
-#ifdef DEBUG
- putchar('#');
-#endif
-#if 0
- i = atoi(++sp);
-#else
- sp++;
- if (*sp == '0') {
- sp++;
- if (*sp == 'x' || *sp == 'X') {
- sp++;
- base = 16;
- } else
- base = 8;
- } else
- base = 10;
- i = 0;
- while(1) {
- if (isdigit(*sp))
- i = i * base + *sp - '0';
- else if (base == 16 && isxdigit(*sp))
- i = i * base + tolower(*sp) - 'a' + 10;
- else
- break;
- sp++;
- }
-#endif
- while(*sp != '\0' && *sp != ',')
- sp++;
-
- ind = _findnumname(name);
- if (ind != -1) {
- if (ct->nums[ind] != -2)
- break;
- ct->nums[ind] = i;
- } else {
- ind = _findnumfname(name);
- if (ind != -1) {
- if (ct->nums[ind] != -2)
- break;
- ct->nums[ind] = i;
- }
- }
- break;
- default:
- while(*sp != '\0' && *sp++ != ',');
- if (*(dp - 1) == '@') {
-#ifdef DEBUG
- putchar('@');
-#endif
- *(dp - 1) = '\0';
- ind = _findboolname(name);
- if (ind != -1) {
-#ifdef DEBUG
- putchar('!');
-#endif
- ct->bools[ind] = 0;
- break;
- }
- ind = _findnumname(name);
- if (ind != -1) {
-#ifdef DEBUG
- putchar('#');
-#endif
- ct->nums[ind] = -1;
- break;
- }
- ind = _findstrname(name);
- if (ind != -1) {
-#ifdef DEBUG
- putchar('$');
-#endif
- ct->strs[ind] = NULL;
- break;
- }
- ind = _findboolfname(name);
- if (ind != -1) {
-#ifdef DEBUG
- putchar('!');
-#endif
- ct->bools[ind] = 0;
- break;
- }
- ind = _findnumfname(name);
- if (ind != -1) {
-#ifdef DEBUG
- putchar('#');
-#endif
- ct->nums[ind] = -1;
- break;
- }
- ind = _findstrfname(name);
- if (ind != -1) {
-#ifdef DEBUG
- putchar('$');
-#endif
- ct->strs[ind] = NULL;
- break;
- }
- break;
- }
-#ifdef DEBUG
- putchar('!');
-#endif
- ind = _findboolname(name);
- if (ind == -1) {
- ind = _findboolfname(name);
- if (ind == -1)
- break;
- }
- if (ct->bools[ind] != -1)
- break;
- ct->bools[ind] = 1;
- break;
- }
- }
- return 0;
-}
diff --git a/lib/libmytinfo/mkbinorder.c b/lib/libmytinfo/mkbinorder.c
deleted file mode 100644
index 0bcc474..0000000
--- a/lib/libmytinfo/mkbinorder.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * mkbinorder.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:04
- *
- */
-
-#define NOTLIB
-#include "defs.h"
-#include <term.h>
-
-const char SCCSid[] = "@(#) mytinfo mkbinorder.c 3.2 92/02/01 public domain, By Ross Ridge";
-
-char cap[MAX_NAME];
-char *p2c = cap;
-char **p2p2c = &p2c;
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- int r;
- int ind;
- FILE *f;
-
- if (argc == 1)
- f = stdin;
- else if (argc == 2) {
- f = fopen(argv[1], "r");
- if (f == NULL) {
- fprintf(stderr, "can't open %s\n", argv[1]);
- exit(1);
- }
- } else {
- fprintf(stderr, "argument count\n");
- exit(1);
- }
-
- do {
- r = fscanf(f, "%s", cap);
- } while(r == 1 && strcmp(cap, "!") != 0);
- if (r != 1) {
- fprintf(stderr, "expected '!'\n");
- exit(1);
- }
-
- puts("/*");
- puts(" * binorder.c");
- puts(" *");
- puts(" * This file was generated automatically");
- puts(" *");
- puts(" */\n");
-
- puts("int _boolorder[] = {");
-
- while(1) {
- r = fscanf(f, "%s", cap);
- cap[MAX_TINFONAME] = '\0';
- if (r != 1) {
- fprintf(stderr, "unexpected EOF\n");
- exit(1);
- }
- if (strcmp(cap, "#") == 0)
- break;
- ind = _findboolname(cap);
- if (ind == -1) {
- fprintf(stderr, "unknown bool name '%s'\n", cap);
- continue;
- }
- printf("\t%d,\n", ind);
- }
- puts("\t-1");
- puts("};\n");
-
- puts("int _numorder[] = {");
-
- while(1) {
- r = fscanf(f, "%s", cap);
- cap[MAX_TINFONAME] = '\0';
- if (r != 1) {
- fprintf(stderr, "unexpected EOF\n");
- exit(1);
- }
- if (strcmp(cap, "$") == 0)
- break;
- ind = _findnumname(cap);
- if (ind == -1) {
- fprintf(stderr, "unknown num name '%s'\n", cap);
- continue;
- }
- printf("\t%d,\n", ind);
- }
- puts("\t-1");
- puts("};\n");
-
- puts("int _strorder[] = {");
-
- while(1) {
- r = fscanf(f, "%s", cap);
- cap[MAX_TINFONAME] = '\0';
- if (r != 1)
- break;
- ind = _findstrname(cap);
- if (ind == -1) {
- fprintf(stderr, "unknown str name '%s'\n", cap);
- continue;
- }
- printf("\t%d,\n", ind);
- }
- puts("\t-1");
- puts("};\n");
-
- return 0;
-}
diff --git a/lib/libmytinfo/mkcaplist.c b/lib/libmytinfo/mkcaplist.c
deleted file mode 100644
index 2fedf2d..0000000
--- a/lib/libmytinfo/mkcaplist.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * mkcaplist.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:05
- *
- * mkcaplist [-n caps] [file]
- *
- * makes caplist.c from the cap_list file
- *
- */
-
-#define NOTLIB
-#include "defs.h"
-
-const char SCCSid[] = "@(#) mytinfo mkcaplist.c 3.2 92/02/01 public domain, By Ross Ridge";
-
-#define DEFAULT_CAPS 1000
-
-struct caplist *list;
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- FILE *f;
- int caps = DEFAULT_CAPS;
- int n;
- register int i;
-
- if (argc > 2 && argv[1][0] == '-' && argv[1][1] == 'n') {
- caps = atoi(argv[2]);
- argv += 2;
- argc -= 2;
- }
-
- if (argc == 1) {
- f = stdin;
- } else if (argc == 2) {
- f = fopen(argv[1], "r");
- if (f == NULL) {
- fprintf(stderr, "%s: can't open '%s'\n", argv[0],
- argv[1]);
- return 1;
- }
- } else {
- fprintf(stderr, "%s: too many arguments\n", argv[0]);
- fprintf(stderr, "usage: %s [-n caps] [file]\n", argv[0]);
- return 1;
- }
-
- list = (struct caplist *) malloc(caps * sizeof(struct caplist));
- if (list == NULL) {
- fprintf(stderr, "%s: malloc failed.\n", argv[0]);
- return 1;
- }
-
- n = readcaps(f, list, caps);
- if (n > caps) {
- fprintf(stderr, "%s: too many caps, use -n.\n", argv[0]);
- return 1;
- }
- if (n == 0) {
- fprintf(stderr, "%s: no caps in file.\n", argv[0]);
- return 1;
- }
- if (n == -1) {
- fprintf(stderr, "%s: bad caps line.\n", argv[0]);
- return 1;
- }
- if (n == -2) {
- fprintf(stderr, "%s: unexpected EOF.\n", argv[0]);
- return 1;
- }
-
- puts("/*");
- puts(" * caplist.c ");
- puts(" *");
- puts(" * This file was generated automatically.");
- puts(" *");
- puts(" */");
- putchar('\n');
-
- puts("char *boolnames[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '!')
- printf("\t\"%s\",\n", list[i].tinfo);
- puts("\t(char *)0");
- puts("};");
- putchar('\n');
-
- puts("char *boolcodes[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '!')
- printf("\t\"%s\",\n", list[i].tcap);
- puts("\t(char *)0");
- puts("};");
- putchar('\n');
-
- puts("char *boolfnames[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '!')
- printf("\t\"%s\",\n", list[i].var);
- puts("\t(char *)0");
- puts("};");
- putchar('\n');
-
- puts("char *numnames[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '#')
- printf("\t\"%s\",\n", list[i].tinfo);
- puts("\t(char *)0");
- puts("};");
- putchar('\n');
-
- puts("char *numcodes[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '#')
- printf("\t\"%s\",\n", list[i].tcap);
- puts("\t(char *)0");
- puts("};");
- putchar('\n');
-
- puts("char *numfnames[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '#')
- printf("\t\"%s\",\n", list[i].var);
- puts("\t(char *)0");
- puts("};");
- putchar('\n');
-
- puts("char *strnames[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '$')
- printf("\t\"%s\",\n", list[i].tinfo);
- puts("\t(char *)0");
- puts("};");
- putchar('\n');
-
- puts("char *strcodes[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '$')
- printf("\t\"%s\",\n", list[i].tcap);
- puts("\t(char *)0");
- puts("};");
- putchar('\n');
-
- puts("char *strfnames[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '$')
- printf("\t\"%s\",\n", list[i].var);
- puts("\t(char *)0");
- puts("};");
- putchar('\n');
-
- puts("char _strflags[] = {");
- for (i = 0; i < n; i++)
- if (list[i].type == '$')
- printf("\t'%c',\n", list[i].flag);
- puts("\t'\\0'");
- puts("};");
- putchar('\n');
-
- return 0;
-}
diff --git a/lib/libmytinfo/mkcapsort.c b/lib/libmytinfo/mkcapsort.c
deleted file mode 100644
index 9079dcf..0000000
--- a/lib/libmytinfo/mkcapsort.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * mkcapsort.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/06/04 11:38:02
- *
- * mkcapsort
- *
- * make the sorted lists of pointers to strins
- *
- */
-
-#define NOTLIB
-#include "defs.h"
-#include <term.h>
-
-#ifdef USE_MYQSORT
-#include "qsort.c"
-#endif
-
-const char SCCSid[] = "@(#) mytinfo mkcapsort.c 3.3 92/06/04 public domain, By Ross Ridge";
-
-char **sboolnames[NUM_OF_BOOLS], **sboolcodes[NUM_OF_BOOLS], **sboolfnames[NUM_OF_BOOLS];
-char **snumnames[NUM_OF_NUMS], **snumcodes[NUM_OF_NUMS], **snumfnames[NUM_OF_NUMS];
-char **sstrnames[NUM_OF_STRS], **sstrcodes[NUM_OF_STRS], **sstrfnames[NUM_OF_STRS];
-
-
-int
-main() {
- register int i;
-
- i = NUM_OF_BOOLS;
- while(i) {
- i--;
- sboolnames[i] = &boolnames[i];
- sboolcodes[i] = &boolcodes[i];
- sboolfnames[i] = &boolfnames[i];
- }
-
- i = NUM_OF_NUMS;
- while(i) {
- i--;
- snumnames[i] = &numnames[i];
- snumcodes[i] = &numcodes[i];
- snumfnames[i] = &numfnames[i];
- }
-
- i = NUM_OF_STRS;
- while(i) {
- i--;
- sstrnames[i] = &strnames[i];
- sstrcodes[i] = &strcodes[i];
- sstrfnames[i] = &strfnames[i];
- }
-
- qsort((anyptr) sboolnames, NUM_OF_BOOLS, sizeof(*sboolnames), _compar);
- qsort((anyptr) sboolcodes, NUM_OF_BOOLS, sizeof(*sboolcodes), _compar);
- qsort((anyptr) sboolfnames, NUM_OF_BOOLS, sizeof(*sboolfnames),_compar);
- qsort((anyptr) snumnames, NUM_OF_NUMS, sizeof(*snumnames), _compar);
- qsort((anyptr) snumcodes, NUM_OF_NUMS, sizeof(*snumcodes), _compar);
- qsort((anyptr) snumfnames, NUM_OF_NUMS, sizeof(*snumfnames), _compar);
- qsort((anyptr) sstrnames, NUM_OF_STRS, sizeof(*sstrnames), _compar);
- qsort((anyptr) sstrcodes, NUM_OF_STRS, sizeof(*sstrcodes), _compar);
- qsort((anyptr) sstrfnames, NUM_OF_STRS, sizeof(*sstrfnames), _compar);
-
- printf("/*\n");
- printf(" * capsort.c\n");
- printf(" *\n");
- printf(" * This file was generated automatically.\n");
- printf(" *\n");
- printf(" */\n\n");
-
- puts("extern char *boolnames[], *boolcodes[], *boolfnames[];");
- puts("extern char *numnames[], *numcodes[], *numfnames[];");
- puts("extern char *strnames[], *strcodes[], *strfnames[];");
- putchar('\n');
-
- printf("char **_sboolnames[] = {\n");
- for(i = 0; i < NUM_OF_BOOLS; i++)
- printf("\tboolnames + %d,\n", sboolnames[i] - boolnames);
- printf(" (char **) 0\n");
- printf("};\n\n");
-
- printf("char **_sboolcodes[] = {\n");
- for(i = 0; i < NUM_OF_BOOLS; i++)
- printf("\tboolcodes + %d,\n", sboolcodes[i] - boolcodes);
- printf(" (char **) 0\n");
- printf("};\n\n");
-
- printf("char **_sboolfnames[] = {\n");
- for(i = 0; i < NUM_OF_BOOLS; i++)
- printf("\tboolfnames + %d,\n", sboolfnames[i] - boolfnames);
- printf(" (char **) 0\n");
- printf("};\n\n");
-
- printf("char **_snumnames[] = {\n");
- for(i = 0; i < NUM_OF_NUMS; i++)
- printf("\tnumnames + %d,\n", snumnames[i] - numnames);
- printf(" (char **) 0\n");
- printf("};\n\n");
-
- printf("char **_snumcodes[] = {\n");
- for(i = 0; i < NUM_OF_NUMS; i++)
- printf("\tnumcodes + %d,\n", snumcodes[i] - numcodes);
- printf(" (char **) 0\n");
- printf("};\n\n");
-
- printf("char **_snumfnames[] = {\n");
- for(i = 0; i < NUM_OF_NUMS; i++)
- printf("\tnumfnames + %d,\n", snumfnames[i] - numfnames);
- printf(" (char **) 0\n");
- printf("};\n\n");
-
- printf("char **_sstrnames[] = {\n");
- for(i = 0; i < NUM_OF_STRS; i++)
- printf("\tstrnames + %d,\n", sstrnames[i] - strnames);
- printf(" (char **) 0\n");
- printf("};\n\n");
-
- printf("char **_sstrcodes[] = {\n");
- for(i = 0; i < NUM_OF_STRS; i++)
- printf("\tstrcodes + %d,\n", sstrcodes[i] - strcodes);
- printf(" (char **) 0\n");
- printf("};\n\n");
-
- printf("char **_sstrfnames[] = {\n");
- for(i = 0; i < NUM_OF_STRS; i++)
- printf("\tstrfnames + %d,\n", sstrfnames[i] - strfnames);
- printf(" (char **) 0\n");
- printf("};\n\n");
-
- return 0;
-}
diff --git a/lib/libmytinfo/mktermhead.c b/lib/libmytinfo/mktermhead.c
deleted file mode 100644
index bacf051..0000000
--- a/lib/libmytinfo/mktermhead.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * mktermhead.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/06/04 11:38:57
- *
- * mktermhead [-n caps] file
- *
- * generates term.head
- *
- */
-
-#define NOTLIB
-#include "defs.h"
-
-const char SCCSid[] = "@(#) mytinfo mktermhead.c 3.3 92/06/04 public domain, By Ross Ridge";
-
-#define DEFAULT_CAPS 1000
-
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- FILE *f;
- int caps = DEFAULT_CAPS;
- int n;
- register int i;
- int nb, ns, nn;
- struct caplist *list;
-
- if (argc > 2 && argv[1][0] == '-' && argv[1][1] == 'n') {
- caps = atoi(argv[2]);
- argv += 2;
- argc -= 2;
- }
-
- if (argc == 1) {
- f = stdin;
- } else if (argc == 2) {
- f = fopen(argv[1], "r");
- if (f == NULL) {
- fprintf(stderr, "%s: can't open '%s'\n", argv[0],
- argv[1]);
- return 1;
- }
- } else {
- fprintf(stderr, "%s: too many arguments\n", argv[0]);
- fprintf(stderr, "usage: %s [-n caps] [file]\n", argv[0]);
- return 1;
- }
-
- list = (struct caplist *) malloc(caps * sizeof(struct caplist));
- if (list == NULL) {
- fprintf(stderr, "%s: malloc failed.\n", argv[0]);
- return 1;
- }
-
- n = readcaps(f, list, caps);
- if (n > caps) {
- fprintf(stderr, "%s: too many caps, use -n.\n", argv[0]);
- return 1;
- }
- switch(n) {
- case 0:
- fprintf(stderr, "%s: no caps in file.\n", argv[0]);
- return 1;
- case -1:
- fprintf(stderr, "%s: bad caps line.\n", argv[0]);
- return 1;
- case -2:
- fprintf(stderr, "%s: unexpected EOF.\n", argv[0]);
- return 1;
- }
-
- puts("/*");
- puts(" * term.h ");
- puts(" *");
- puts(" * This file was generated automatically.");
- puts(" *");
- puts(" */");
- putchar('\n');
- puts("#ifndef _TERM_H_");
- puts("#define _TERM_H_");
- putchar('\n');
- nb = 0;
- for (i = 0; i < n; i++) {
- if (list[i].type == '!') {
- printf("#define %-*s (_CUR_TERM.bools[%d])\n",
- MAX_VARNAME, list[i].var, nb);
- nb++;
- }
- }
-
- nn = 0;
- for (i = 0; i < n; i++) {
- if (list[i].type == '#') {
- printf("#define %-*s (_CUR_TERM.nums[%d])\n",
- MAX_VARNAME, list[i].var, nn);
- nn++;
- }
- }
-
- ns = 0;
- for (i = 0; i < n; i++) {
- if (list[i].type == '$') {
- printf("#define %-*s (_CUR_TERM.strs[%d])\n",
- MAX_VARNAME, list[i].var, ns);
- ns++;
- }
- }
-
- putchar('\n');
-
- printf ("#define NUM_OF_BOOLS\t%d\n", nb);
- printf ("#define NUM_OF_NUMS\t%d\n", nn);
- printf ("#define NUM_OF_STRS\t%d\n", ns);
-
- putchar('\n');
- puts("#ifndef OVERRIDE");
- puts("#undef _USE_SGTTY");
-#ifdef USE_SGTTY
- puts("#define _USE_SGTTY");
-#endif
- puts("#undef _USE_TERMIO");
-#ifdef USE_TERMIO
- puts("#define _USE_TERMIO");
-#endif
- puts("#undef _USE_TERMIOS");
-#ifdef USE_TERMIOS
- puts("#define _USE_TERMIOS");
-#endif
- puts("#undef _USE_SMALLMEM");
-#ifdef USE_SMALLMEM
- puts("#define _USE_SMALLMEM");
-#endif
- puts("#undef _USE_PROTOTYPES");
-#ifdef USE_PROTOTYPES
- puts("#define _USE_PROTOTYPES");
-#endif
- puts("#undef _USE_WINSZ");
-#ifdef USE_WINSZ
- puts("#define _USE_WINSZ");
-#endif
- puts("#undef _USE_TERMINFO");
-#ifdef USE_TERMINFO
- puts("#define _USE_TERMINFO");
-#endif
- puts("#undef _USE_TERMCAP");
-#ifdef USE_TERMCAP
- puts("#define _USE_TERMCAP");
-#endif
- puts("#undef _MAX_CHUNK");
- printf("#define _MAX_CHUNK %d\n", MAX_CHUNK);
- puts("#endif /* OVERRIDE */");
- putchar('\n');
-
- return 0;
-}
diff --git a/lib/libmytinfo/mkversion.c b/lib/libmytinfo/mkversion.c
deleted file mode 100644
index 9fbc12e..0000000
--- a/lib/libmytinfo/mkversion.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * mkversion.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:09
- *
- * generates version.c
- *
- */
-
-#define NOTLIB
-#include "defs.h"
-
-#include "version.h"
-
-const char SCCSid[] = "@(#) mytinfo mkversion.c 3.2 92/02/01 public domain, By Ross Ridge";
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- puts("/*");
- puts(" * version.c ");
- puts(" *");
- puts(" * This file was generated automatically.");
- puts(" *");
- puts(" */");
- putchar('\n');
-
- printf("char _mytinfo_version[] = \"@(#) mytinfo: Release %d, Patchlevel %d (ache).\";\n",
- RELEASE, PATCHLEVEL);
-
- return 0;
-}
diff --git a/lib/libmytinfo/readcaps.c b/lib/libmytinfo/readcaps.c
deleted file mode 100644
index b78bdc1..0000000
--- a/lib/libmytinfo/readcaps.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * readcaps.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:15
- *
- * Read in the cap_list file
- *
- */
-
-#define NOTLIB
-#include "defs.h"
-
-#include <ctype.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo readcaps.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-#ifdef __GNUC__
-__inline__
-#endif
-static int
-skipline(f)
-register FILE *f; {
- register int c;
-
- do {
- c = getc(f);
- if (c == EOF)
- return EOF;
-#ifdef TEST
- putchar(c);
-#endif
- } while (c != '\n');
-
- return 0;
-}
-
-#ifdef __GNUC__
-__inline__
-#endif
-static int
-getfield(f, s, len)
-register FILE *f;
-register char *s;
-int len; {
- register int c;
- int i;
-#ifdef TEST
- char *start = s;
-#endif
-
- do {
- c = getc(f);
- if (c == EOF)
- return EOF;
- } while (c != '\n' && isspace(c));
- if (c == '\n')
- return 0;
-
- i = 0;
- while(!isspace(c)) {
- if (i++ < len)
- *s++ = c;
- c = getc(f);
- if (c == EOF)
- return EOF;
-
- }
- *s = '\0';
-#ifdef TEST
- printf(" %s", start);
-#endif
- return c;
-}
-
-int
-readcaps(f, buf, max)
-FILE *f;
-register struct caplist *buf;
-int max; {
- int type;
- register int count;
- int c;
- static char dummy;
-
- count = 0;
- type = getc(f);
- while(type != EOF) {
- if (type == '$' || type == '!' || type == '#') {
- if (count >= max)
- return count + 1;
-#ifdef TEST
- putchar(type);
-#endif
- buf[count].type = type;
-
- if (type == '$') {
- c = getc(f);
- if (c == EOF)
- break;
- if (c == 'G')
- buf[count].flag = 'G';
- else if (c == 'K')
- buf[count].flag = 'K';
- else
- buf[count].flag = ' ';
- }
-
- c = getfield(f, buf[count].var, MAX_VARNAME);
- if (c == EOF || c == '\n' || c == 0)
- return -1;
- c = getfield(f, buf[count].tinfo, MAX_TINFONAME);
- if (c == EOF || c == '\n' || c == 0)
- return -1;
- c = getfield(f, buf[count].tcap, MAX_TCAPNAME);
- if (c == EOF || c == 0)
- return -1;
- if (c != '\n')
- if (getfield(f, &dummy, 1) != 0)
- return -1;
- count++;
-#ifdef TEST
- putchar('\n');
-#endif
- } else {
-#ifdef TEST
- putchar(type);
-#endif
- if (type != '\n' && skipline(f) == EOF)
- return -1;
- }
- type = getc(f);
- }
- return count;
-}
-
-#ifdef TEST
-struct caplist list[1000];
-
-int
-main() {
- int ret;
-
- ret = readcaps(stdin, list, 1000);
- printf("ret = %d\n", ret);
- return 0;
-}
-#endif
diff --git a/lib/libmytinfo/tcapconv.c b/lib/libmytinfo/tcapconv.c
deleted file mode 100644
index 3cd4d36..0000000
--- a/lib/libmytinfo/tcapconv.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * tcapconv.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:20
- *
- */
-
-#include "defs.h"
-#define SINGLE
-#include <term.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo tcapconv.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-extern char **_sstrcodes[], **_sstrnames[];
-
-static char *C_CR = "\r";
-static char *C_LF = "\n";
-static char *C_BS = "\b";
-/* static char *C_FF = "\f"; */
-static char *C_HT = "\t";
-/* static char *C_VT = "\013"; */
-/* static char *C_NL = "\r\n"; */
-
-#define DEF(s) ((s) != (char *) -1 && (s) != NULL)
-#define NOTSET(s) ((s) == (char *) -1)
-
-/*
- * This routine fills in caps that either had defaults under termcap or
- * can be manufactured from obsolete termcap capabilities.
- */
-
-void
-_tcapdefault() {
- char buf[MAX_LINE * 2 + 2];
- int set_scroll_forward_to_lf;
-
- if (NOTSET(carriage_return)) {
- if (carriage_return_delay > 0) {
- sprintf(buf, "%s$<%d>", C_CR, carriage_return_delay);
- carriage_return = _addstr(buf);
- } else
- carriage_return = _addstr(C_CR);
- }
- if (NOTSET(cursor_left)) {
- if (backspace_delay > 0) {
- sprintf(buf, "%s$<%d>", C_BS, backspace_delay);
- cursor_left = _addstr(buf);
- } else if (backspaces_with_bs == 1)
- cursor_left = _addstr(C_BS);
- else if (DEF(backspace_if_not_bs))
- cursor_left = _addstr(backspace_if_not_bs);
- }
-/* vi doesn't use "do", but it does seems to use nl (or '\n') instead */
- if (NOTSET(cursor_down)) {
- if (DEF(linefeed_if_not_lf))
- cursor_down = _addstr(linefeed_if_not_lf);
- else if (linefeed_is_newline != 1) {
- if (new_line_delay > 0) {
- sprintf(buf, "%s$<%d>", C_LF, new_line_delay);
- cursor_down = _addstr(buf);
- } else
- cursor_down = _addstr(C_LF);
- }
- }
- set_scroll_forward_to_lf = 0;
- if (NOTSET(scroll_forward) && crt_without_scrolling != 1) {
- set_scroll_forward_to_lf = 1;
- if (DEF(linefeed_if_not_lf))
- scroll_forward = _addstr(linefeed_if_not_lf);
- else if (linefeed_is_newline != 1) {
- if (new_line_delay > 0) {
- sprintf(buf, "%s$<%d>", C_LF, new_line_delay);
- scroll_forward = _addstr(buf);
- } else
- scroll_forward = _addstr(C_LF);
- }
- }
- if (NOTSET(newline)) {
- if (linefeed_is_newline == 1) {
- if (new_line_delay > 0) {
- sprintf(buf, "%s$<%d>", C_LF, new_line_delay);
- newline = _addstr(buf);
- } else
- newline = _addstr(C_LF);
- } else if (DEF(carriage_return) && carriage_return_delay <= 0) {
- if (set_scroll_forward_to_lf) {
- strncpy(buf, carriage_return, MAX_LINE-2);
- buf[MAX_LINE-1] = '\0';
- strncat(buf, scroll_forward, MAX_LINE-strlen(buf)-1);
- } else if (DEF(linefeed_if_not_lf)) {
- strncpy(buf, carriage_return, MAX_LINE-2);
- buf[MAX_LINE-1] = '\0';
- strncat(buf, linefeed_if_not_lf, MAX_LINE-strlen(buf)-1);
- }
- else if (new_line_delay > 0)
- sprintf(buf, "%s%s$<%d>", carriage_return, C_LF, new_line_delay);
- else {
- strncpy(buf, carriage_return, MAX_LINE-2);
- buf[MAX_LINE-1] = '\0';
- strncat(buf, C_LF, MAX_LINE-strlen(buf)-1);
- }
- buf[MAX_LINE-1] = '\0';
- newline = _addstr(buf);
- }
- }
-
-/*
- * We wait until know to decide if we've got a working cr because even
- * one that doesn't work can be used for newline. Unfortunately the
- * space allocated for it is wasted.
- */
- if (return_does_clr_eol == 1 || no_correctly_working_cr == 1)
- carriage_return = NULL;
-
-/*
- * supposedly most termcap entries have ta now and '\t' is no longer a
- * default, but it doesn't seem to be true...
- */
- if (NOTSET(tab)) {
- if (horizontal_tab_delay > 0) {
- sprintf(buf, "%s$<%d>", C_HT, horizontal_tab_delay);
- tab = _addstr(buf);
- } else
- tab = _addstr(C_HT);
- }
-#if 0
-/* probably not needed and might confuse some programmes */
- if (NOTSET(form_feed)) {
- if (form_feed_delay > 0) {
- sprintf(buf, "%s$<%d>", C_FF, form_feed_delay);
- form_feed = _addstr(buf);
- } else
- form_feed = _addstr(C_FF);
- }
-#endif
- if (init_tabs == -1 && has_hardware_tabs == 1)
- init_tabs = 8;
-
- if (NOTSET(key_backspace))
- key_backspace = _addstr(C_BS);
- if (NOTSET(key_left))
- key_left = _addstr(C_BS);
- if (NOTSET(key_down))
- key_down = _addstr(C_LF);
-}
-
-void
-_tcapconv() {
- char buf[MAX_LINE+1];
-
- if (GNU_tab_width > 0 && init_tabs == -1)
- init_tabs = GNU_tab_width;
-
- if (GNU_has_meta_key == 1 && has_meta_key == -1)
- has_meta_key = 1;
-
-/*
- * this is some what a kludge, but should work unless someone breaks
- * conventions.
- */
- if (DEF(other_non_function_keys)) {
- register char *s;
- static char *o;
- static char name[MAX_NAME] = "k";
- char *str;
- int ind;
-
- s = strcpy(buf, other_non_function_keys);
- while(*s != '\0') {
- o = s;
- while(*s != ',' && *s != '\0')
- s++;
- if (*s != '\0')
- *s++ = '\0';
- ind = _findstrcode(o);
- if (ind == -1)
- continue;
- str = _term_buf.strs[ind];
- if (!DEF(str))
- continue;
- strncpy(name + 1, strnames[ind], MAX_NAME - 2);
- ind = _findstrname(name);
- if (ind == -1)
- continue;
- if (!NOTSET(_term_buf.strs[ind]))
- continue;
- _term_buf.strs[ind] = _addstr(str);
- }
- }
-}
diff --git a/lib/libmytinfo/tcapvars.c b/lib/libmytinfo/tcapvars.c
deleted file mode 100644
index 52e339c..0000000
--- a/lib/libmytinfo/tcapvars.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * tcapvars.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:21
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo tcapvars.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-char PC;
-short ospeed;
-char *UP, *BC;
-
-void
-_figure_termcap() {
-#if defined(USE_SGTTY) || defined(USE_TERMIO) || defined(USE_TERMIOS)
-#ifdef USE_TERMIOS
- extern speed_t _baud_tbl[];
-#else
-#ifdef USE_SMALLMEM
- extern unsigned short _baud_tbl[];
-#else
- extern long _baud_tbl[];
-#endif
-#endif
- cur_term->padch = PC;
- cur_term->baudrate = _baud_tbl[ospeed];
-#endif
-}
diff --git a/lib/libmytinfo/term.h b/lib/libmytinfo/term.h
deleted file mode 100644
index f2b3a4d..0000000
--- a/lib/libmytinfo/term.h
+++ /dev/null
@@ -1,664 +0,0 @@
-/*
- * term.h
- *
- * This file was generated automatically.
- *
- */
-
-#ifndef _TERM_H_
-#define _TERM_H_
-
-#define auto_left_margin (_CUR_TERM.bools[0])
-#define auto_right_margin (_CUR_TERM.bools[1])
-#define ceol_standout_glitch (_CUR_TERM.bools[2])
-#define dest_tabs_magic_smso (_CUR_TERM.bools[3])
-#define eat_newline_glitch (_CUR_TERM.bools[4])
-#define erase_overstrike (_CUR_TERM.bools[5])
-#define generic_type (_CUR_TERM.bools[6])
-#define hard_copy (_CUR_TERM.bools[7])
-#define hard_cursor (_CUR_TERM.bools[8])
-#define has_meta_key (_CUR_TERM.bools[9])
-#define has_status_line (_CUR_TERM.bools[10])
-#define insert_null_glitch (_CUR_TERM.bools[11])
-#define memory_above (_CUR_TERM.bools[12])
-#define memory_below (_CUR_TERM.bools[13])
-#define move_insert_mode (_CUR_TERM.bools[14])
-#define move_standout_mode (_CUR_TERM.bools[15])
-#define needs_xon_xoff (_CUR_TERM.bools[16])
-#define no_esc_ctlc (_CUR_TERM.bools[17])
-#define no_pad_char (_CUR_TERM.bools[18])
-#define non_rev_rmcup (_CUR_TERM.bools[19])
-#define over_strike (_CUR_TERM.bools[20])
-#define prtr_silent (_CUR_TERM.bools[21])
-#define status_line_esc_ok (_CUR_TERM.bools[22])
-#define tilde_glitch (_CUR_TERM.bools[23])
-#define transparent_underline (_CUR_TERM.bools[24])
-#define xon_xoff (_CUR_TERM.bools[25])
-#define back_color_erase (_CUR_TERM.bools[26])
-#define can_change (_CUR_TERM.bools[27])
-#define col_addr_glitch (_CUR_TERM.bools[28])
-#define cpi_changes_res (_CUR_TERM.bools[29])
-#define cr_cancels_micro_mode (_CUR_TERM.bools[30])
-#define has_print_wheel (_CUR_TERM.bools[31])
-#define hue_lightness_saturation (_CUR_TERM.bools[32])
-#define lpi_changes_res (_CUR_TERM.bools[33])
-#define non_dest_scroll_region (_CUR_TERM.bools[34])
-#define row_addr_glitch (_CUR_TERM.bools[35])
-#define semi_auto_right_margin (_CUR_TERM.bools[36])
-#define backspaces_with_bs (_CUR_TERM.bools[37])
-#define even_parity (_CUR_TERM.bools[38])
-#define half_duplex (_CUR_TERM.bools[39])
-#define lower_case_only (_CUR_TERM.bools[40])
-#define no_correctly_working_cr (_CUR_TERM.bools[41])
-#define linefeed_is_newline (_CUR_TERM.bools[42])
-#define crt_without_scrolling (_CUR_TERM.bools[43])
-#define odd_parity (_CUR_TERM.bools[44])
-#define has_hardware_tabs (_CUR_TERM.bools[45])
-#define uppercase_only (_CUR_TERM.bools[46])
-#define return_does_clr_eol (_CUR_TERM.bools[47])
-#define tek_4025_insert_line (_CUR_TERM.bools[48])
-#define initialization_messy (_CUR_TERM.bools[49])
-#define index_at_bottom_does_cr (_CUR_TERM.bools[50])
-#define rind_only_at_top (_CUR_TERM.bools[51])
-#define GNU_has_meta_key (_CUR_TERM.bools[52])
-#define columns (_CUR_TERM.nums[0])
-#define init_tabs (_CUR_TERM.nums[1])
-#define label_height (_CUR_TERM.nums[2])
-#define label_width (_CUR_TERM.nums[3])
-#define lines (_CUR_TERM.nums[4])
-#define lines_of_memory (_CUR_TERM.nums[5])
-#define magic_cookie_glitch (_CUR_TERM.nums[6])
-#define num_labels (_CUR_TERM.nums[7])
-#define padding_baud_rate (_CUR_TERM.nums[8])
-#define virtual_terminal (_CUR_TERM.nums[9])
-#define width_status_line (_CUR_TERM.nums[10])
-#define bit_image_entwining (_CUR_TERM.nums[11])
-#define bit_image_type (_CUR_TERM.nums[12])
-#define buffer_capacity (_CUR_TERM.nums[13])
-#define buttons (_CUR_TERM.nums[14])
-#define dot_horz_spacing (_CUR_TERM.nums[15])
-#define dot_vert_spacing (_CUR_TERM.nums[16])
-#define max_attributes (_CUR_TERM.nums[17])
-#define max_colors (_CUR_TERM.nums[18])
-#define max_micro_address (_CUR_TERM.nums[19])
-#define max_micro_jump (_CUR_TERM.nums[20])
-#define max_pairs (_CUR_TERM.nums[21])
-#define maximum_windows (_CUR_TERM.nums[22])
-#define micro_char_size (_CUR_TERM.nums[23])
-#define micro_line_size (_CUR_TERM.nums[24])
-#define no_color_video (_CUR_TERM.nums[25])
-#define number_of_pins (_CUR_TERM.nums[26])
-#define output_res_char (_CUR_TERM.nums[27])
-#define output_res_horz_inch (_CUR_TERM.nums[28])
-#define output_res_line (_CUR_TERM.nums[29])
-#define output_res_vert_inch (_CUR_TERM.nums[30])
-#define print_rate (_CUR_TERM.nums[31])
-#define wide_char_size (_CUR_TERM.nums[32])
-#define backspace_delay (_CUR_TERM.nums[33])
-#define carriage_return_delay (_CUR_TERM.nums[34])
-#define form_feed_delay (_CUR_TERM.nums[35])
-#define new_line_delay (_CUR_TERM.nums[36])
-#define horizontal_tab_delay (_CUR_TERM.nums[37])
-#define vertical_tab_delay (_CUR_TERM.nums[38])
-#define number_of_function_keys (_CUR_TERM.nums[39])
-#define magic_cookie_glitch_ul (_CUR_TERM.nums[40])
-#define GNU_tab_width (_CUR_TERM.nums[41])
-#define acs_chars (_CUR_TERM.strs[0])
-#define back_tab (_CUR_TERM.strs[1])
-#define bell (_CUR_TERM.strs[2])
-#define carriage_return (_CUR_TERM.strs[3])
-#define change_scroll_region (_CUR_TERM.strs[4])
-#define char_padding (_CUR_TERM.strs[5])
-#define clear_all_tabs (_CUR_TERM.strs[6])
-#define clear_margins (_CUR_TERM.strs[7])
-#define clear_screen (_CUR_TERM.strs[8])
-#define clr_bol (_CUR_TERM.strs[9])
-#define clr_eol (_CUR_TERM.strs[10])
-#define clr_eos (_CUR_TERM.strs[11])
-#define column_address (_CUR_TERM.strs[12])
-#define command_character (_CUR_TERM.strs[13])
-#define cursor_address (_CUR_TERM.strs[14])
-#define cursor_down (_CUR_TERM.strs[15])
-#define cursor_home (_CUR_TERM.strs[16])
-#define cursor_invisible (_CUR_TERM.strs[17])
-#define cursor_left (_CUR_TERM.strs[18])
-#define cursor_mem_address (_CUR_TERM.strs[19])
-#define cursor_normal (_CUR_TERM.strs[20])
-#define cursor_right (_CUR_TERM.strs[21])
-#define cursor_to_ll (_CUR_TERM.strs[22])
-#define cursor_up (_CUR_TERM.strs[23])
-#define cursor_visible (_CUR_TERM.strs[24])
-#define delete_character (_CUR_TERM.strs[25])
-#define delete_line (_CUR_TERM.strs[26])
-#define dis_status_line (_CUR_TERM.strs[27])
-#define down_half_line (_CUR_TERM.strs[28])
-#define ena_acs (_CUR_TERM.strs[29])
-#define enter_alt_charset_mode (_CUR_TERM.strs[30])
-#define enter_am_mode (_CUR_TERM.strs[31])
-#define enter_blink_mode (_CUR_TERM.strs[32])
-#define enter_bold_mode (_CUR_TERM.strs[33])
-#define enter_ca_mode (_CUR_TERM.strs[34])
-#define enter_delete_mode (_CUR_TERM.strs[35])
-#define enter_dim_mode (_CUR_TERM.strs[36])
-#define enter_insert_mode (_CUR_TERM.strs[37])
-#define enter_protected_mode (_CUR_TERM.strs[38])
-#define enter_reverse_mode (_CUR_TERM.strs[39])
-#define enter_secure_mode (_CUR_TERM.strs[40])
-#define enter_standout_mode (_CUR_TERM.strs[41])
-#define enter_underline_mode (_CUR_TERM.strs[42])
-#define enter_xon_mode (_CUR_TERM.strs[43])
-#define erase_chars (_CUR_TERM.strs[44])
-#define exit_alt_charset_mode (_CUR_TERM.strs[45])
-#define exit_am_mode (_CUR_TERM.strs[46])
-#define exit_attribute_mode (_CUR_TERM.strs[47])
-#define exit_ca_mode (_CUR_TERM.strs[48])
-#define exit_delete_mode (_CUR_TERM.strs[49])
-#define exit_insert_mode (_CUR_TERM.strs[50])
-#define exit_standout_mode (_CUR_TERM.strs[51])
-#define exit_underline_mode (_CUR_TERM.strs[52])
-#define exit_xon_mode (_CUR_TERM.strs[53])
-#define flash_screen (_CUR_TERM.strs[54])
-#define form_feed (_CUR_TERM.strs[55])
-#define from_status_line (_CUR_TERM.strs[56])
-#define init_1string (_CUR_TERM.strs[57])
-#define init_2string (_CUR_TERM.strs[58])
-#define init_3string (_CUR_TERM.strs[59])
-#define init_file (_CUR_TERM.strs[60])
-#define init_prog (_CUR_TERM.strs[61])
-#define insert_character (_CUR_TERM.strs[62])
-#define insert_line (_CUR_TERM.strs[63])
-#define insert_padding (_CUR_TERM.strs[64])
-#define key_a1 (_CUR_TERM.strs[65])
-#define key_a3 (_CUR_TERM.strs[66])
-#define key_b2 (_CUR_TERM.strs[67])
-#define key_backspace (_CUR_TERM.strs[68])
-#define key_beg (_CUR_TERM.strs[69])
-#define key_btab (_CUR_TERM.strs[70])
-#define key_c1 (_CUR_TERM.strs[71])
-#define key_c3 (_CUR_TERM.strs[72])
-#define key_cancel (_CUR_TERM.strs[73])
-#define key_catab (_CUR_TERM.strs[74])
-#define key_clear (_CUR_TERM.strs[75])
-#define key_close (_CUR_TERM.strs[76])
-#define key_command (_CUR_TERM.strs[77])
-#define key_copy (_CUR_TERM.strs[78])
-#define key_create (_CUR_TERM.strs[79])
-#define key_ctab (_CUR_TERM.strs[80])
-#define key_dc (_CUR_TERM.strs[81])
-#define key_dl (_CUR_TERM.strs[82])
-#define key_down (_CUR_TERM.strs[83])
-#define key_eic (_CUR_TERM.strs[84])
-#define key_end (_CUR_TERM.strs[85])
-#define key_enter (_CUR_TERM.strs[86])
-#define key_eol (_CUR_TERM.strs[87])
-#define key_eos (_CUR_TERM.strs[88])
-#define key_exit (_CUR_TERM.strs[89])
-#define key_f0 (_CUR_TERM.strs[90])
-#define key_f1 (_CUR_TERM.strs[91])
-#define key_f10 (_CUR_TERM.strs[92])
-#define key_f11 (_CUR_TERM.strs[93])
-#define key_f12 (_CUR_TERM.strs[94])
-#define key_f13 (_CUR_TERM.strs[95])
-#define key_f14 (_CUR_TERM.strs[96])
-#define key_f15 (_CUR_TERM.strs[97])
-#define key_f16 (_CUR_TERM.strs[98])
-#define key_f17 (_CUR_TERM.strs[99])
-#define key_f18 (_CUR_TERM.strs[100])
-#define key_f19 (_CUR_TERM.strs[101])
-#define key_f2 (_CUR_TERM.strs[102])
-#define key_f20 (_CUR_TERM.strs[103])
-#define key_f21 (_CUR_TERM.strs[104])
-#define key_f22 (_CUR_TERM.strs[105])
-#define key_f23 (_CUR_TERM.strs[106])
-#define key_f24 (_CUR_TERM.strs[107])
-#define key_f25 (_CUR_TERM.strs[108])
-#define key_f26 (_CUR_TERM.strs[109])
-#define key_f27 (_CUR_TERM.strs[110])
-#define key_f28 (_CUR_TERM.strs[111])
-#define key_f29 (_CUR_TERM.strs[112])
-#define key_f3 (_CUR_TERM.strs[113])
-#define key_f30 (_CUR_TERM.strs[114])
-#define key_f31 (_CUR_TERM.strs[115])
-#define key_f32 (_CUR_TERM.strs[116])
-#define key_f33 (_CUR_TERM.strs[117])
-#define key_f34 (_CUR_TERM.strs[118])
-#define key_f35 (_CUR_TERM.strs[119])
-#define key_f36 (_CUR_TERM.strs[120])
-#define key_f37 (_CUR_TERM.strs[121])
-#define key_f38 (_CUR_TERM.strs[122])
-#define key_f39 (_CUR_TERM.strs[123])
-#define key_f4 (_CUR_TERM.strs[124])
-#define key_f40 (_CUR_TERM.strs[125])
-#define key_f41 (_CUR_TERM.strs[126])
-#define key_f42 (_CUR_TERM.strs[127])
-#define key_f43 (_CUR_TERM.strs[128])
-#define key_f44 (_CUR_TERM.strs[129])
-#define key_f45 (_CUR_TERM.strs[130])
-#define key_f46 (_CUR_TERM.strs[131])
-#define key_f47 (_CUR_TERM.strs[132])
-#define key_f48 (_CUR_TERM.strs[133])
-#define key_f49 (_CUR_TERM.strs[134])
-#define key_f5 (_CUR_TERM.strs[135])
-#define key_f50 (_CUR_TERM.strs[136])
-#define key_f51 (_CUR_TERM.strs[137])
-#define key_f52 (_CUR_TERM.strs[138])
-#define key_f53 (_CUR_TERM.strs[139])
-#define key_f54 (_CUR_TERM.strs[140])
-#define key_f55 (_CUR_TERM.strs[141])
-#define key_f56 (_CUR_TERM.strs[142])
-#define key_f57 (_CUR_TERM.strs[143])
-#define key_f58 (_CUR_TERM.strs[144])
-#define key_f59 (_CUR_TERM.strs[145])
-#define key_f6 (_CUR_TERM.strs[146])
-#define key_f60 (_CUR_TERM.strs[147])
-#define key_f61 (_CUR_TERM.strs[148])
-#define key_f62 (_CUR_TERM.strs[149])
-#define key_f63 (_CUR_TERM.strs[150])
-#define key_f7 (_CUR_TERM.strs[151])
-#define key_f8 (_CUR_TERM.strs[152])
-#define key_f9 (_CUR_TERM.strs[153])
-#define key_find (_CUR_TERM.strs[154])
-#define key_help (_CUR_TERM.strs[155])
-#define key_home (_CUR_TERM.strs[156])
-#define key_ic (_CUR_TERM.strs[157])
-#define key_il (_CUR_TERM.strs[158])
-#define key_left (_CUR_TERM.strs[159])
-#define key_ll (_CUR_TERM.strs[160])
-#define key_mark (_CUR_TERM.strs[161])
-#define key_message (_CUR_TERM.strs[162])
-#define key_move (_CUR_TERM.strs[163])
-#define key_next (_CUR_TERM.strs[164])
-#define key_npage (_CUR_TERM.strs[165])
-#define key_open (_CUR_TERM.strs[166])
-#define key_options (_CUR_TERM.strs[167])
-#define key_ppage (_CUR_TERM.strs[168])
-#define key_previous (_CUR_TERM.strs[169])
-#define key_print (_CUR_TERM.strs[170])
-#define key_redo (_CUR_TERM.strs[171])
-#define key_reference (_CUR_TERM.strs[172])
-#define key_refresh (_CUR_TERM.strs[173])
-#define key_replace (_CUR_TERM.strs[174])
-#define key_restart (_CUR_TERM.strs[175])
-#define key_resume (_CUR_TERM.strs[176])
-#define key_right (_CUR_TERM.strs[177])
-#define key_save (_CUR_TERM.strs[178])
-#define key_sbeg (_CUR_TERM.strs[179])
-#define key_scancel (_CUR_TERM.strs[180])
-#define key_scommand (_CUR_TERM.strs[181])
-#define key_scopy (_CUR_TERM.strs[182])
-#define key_screate (_CUR_TERM.strs[183])
-#define key_sdc (_CUR_TERM.strs[184])
-#define key_sdl (_CUR_TERM.strs[185])
-#define key_select (_CUR_TERM.strs[186])
-#define key_send (_CUR_TERM.strs[187])
-#define key_seol (_CUR_TERM.strs[188])
-#define key_sexit (_CUR_TERM.strs[189])
-#define key_sf (_CUR_TERM.strs[190])
-#define key_sfind (_CUR_TERM.strs[191])
-#define key_shelp (_CUR_TERM.strs[192])
-#define key_shome (_CUR_TERM.strs[193])
-#define key_sic (_CUR_TERM.strs[194])
-#define key_sleft (_CUR_TERM.strs[195])
-#define key_smessage (_CUR_TERM.strs[196])
-#define key_smove (_CUR_TERM.strs[197])
-#define key_snext (_CUR_TERM.strs[198])
-#define key_soptions (_CUR_TERM.strs[199])
-#define key_sprevious (_CUR_TERM.strs[200])
-#define key_sprint (_CUR_TERM.strs[201])
-#define key_sr (_CUR_TERM.strs[202])
-#define key_sredo (_CUR_TERM.strs[203])
-#define key_sreplace (_CUR_TERM.strs[204])
-#define key_sright (_CUR_TERM.strs[205])
-#define key_srsume (_CUR_TERM.strs[206])
-#define key_ssave (_CUR_TERM.strs[207])
-#define key_ssuspend (_CUR_TERM.strs[208])
-#define key_stab (_CUR_TERM.strs[209])
-#define key_sundo (_CUR_TERM.strs[210])
-#define key_suspend (_CUR_TERM.strs[211])
-#define key_undo (_CUR_TERM.strs[212])
-#define key_up (_CUR_TERM.strs[213])
-#define keypad_local (_CUR_TERM.strs[214])
-#define keypad_xmit (_CUR_TERM.strs[215])
-#define lab_f0 (_CUR_TERM.strs[216])
-#define lab_f1 (_CUR_TERM.strs[217])
-#define lab_f10 (_CUR_TERM.strs[218])
-#define lab_f2 (_CUR_TERM.strs[219])
-#define lab_f3 (_CUR_TERM.strs[220])
-#define lab_f4 (_CUR_TERM.strs[221])
-#define lab_f5 (_CUR_TERM.strs[222])
-#define lab_f6 (_CUR_TERM.strs[223])
-#define lab_f7 (_CUR_TERM.strs[224])
-#define lab_f8 (_CUR_TERM.strs[225])
-#define lab_f9 (_CUR_TERM.strs[226])
-#define label_off (_CUR_TERM.strs[227])
-#define label_on (_CUR_TERM.strs[228])
-#define meta_off (_CUR_TERM.strs[229])
-#define meta_on (_CUR_TERM.strs[230])
-#define newline (_CUR_TERM.strs[231])
-#define pad_char (_CUR_TERM.strs[232])
-#define parm_dch (_CUR_TERM.strs[233])
-#define parm_delete_line (_CUR_TERM.strs[234])
-#define parm_down_cursor (_CUR_TERM.strs[235])
-#define parm_ich (_CUR_TERM.strs[236])
-#define parm_index (_CUR_TERM.strs[237])
-#define parm_insert_line (_CUR_TERM.strs[238])
-#define parm_left_cursor (_CUR_TERM.strs[239])
-#define parm_right_cursor (_CUR_TERM.strs[240])
-#define parm_rindex (_CUR_TERM.strs[241])
-#define parm_up_cursor (_CUR_TERM.strs[242])
-#define pkey_key (_CUR_TERM.strs[243])
-#define pkey_local (_CUR_TERM.strs[244])
-#define pkey_xmit (_CUR_TERM.strs[245])
-#define plab_norm (_CUR_TERM.strs[246])
-#define print_screen (_CUR_TERM.strs[247])
-#define prtr_non (_CUR_TERM.strs[248])
-#define prtr_off (_CUR_TERM.strs[249])
-#define prtr_on (_CUR_TERM.strs[250])
-#define repeat_char (_CUR_TERM.strs[251])
-#define req_for_input (_CUR_TERM.strs[252])
-#define reset_1string (_CUR_TERM.strs[253])
-#define reset_2string (_CUR_TERM.strs[254])
-#define reset_3string (_CUR_TERM.strs[255])
-#define reset_file (_CUR_TERM.strs[256])
-#define restore_cursor (_CUR_TERM.strs[257])
-#define row_address (_CUR_TERM.strs[258])
-#define save_cursor (_CUR_TERM.strs[259])
-#define scroll_forward (_CUR_TERM.strs[260])
-#define scroll_reverse (_CUR_TERM.strs[261])
-#define set_attributes (_CUR_TERM.strs[262])
-#define set_left_margin (_CUR_TERM.strs[263])
-#define set_right_margin (_CUR_TERM.strs[264])
-#define set_tab (_CUR_TERM.strs[265])
-#define set_window (_CUR_TERM.strs[266])
-#define tab (_CUR_TERM.strs[267])
-#define to_status_line (_CUR_TERM.strs[268])
-#define underline_char (_CUR_TERM.strs[269])
-#define up_half_line (_CUR_TERM.strs[270])
-#define xoff_character (_CUR_TERM.strs[271])
-#define xon_character (_CUR_TERM.strs[272])
-#define alt_scancode_esc (_CUR_TERM.strs[273])
-#define bit_image_carriage_return (_CUR_TERM.strs[274])
-#define bit_image_newline (_CUR_TERM.strs[275])
-#define bit_image_repeat (_CUR_TERM.strs[276])
-#define change_char_pitch (_CUR_TERM.strs[277])
-#define change_line_pitch (_CUR_TERM.strs[278])
-#define change_res_horz (_CUR_TERM.strs[279])
-#define change_res_vert (_CUR_TERM.strs[280])
-#define char_set_names (_CUR_TERM.strs[281])
-#define code_set_init (_CUR_TERM.strs[282])
-#define color_names (_CUR_TERM.strs[283])
-#define create_window (_CUR_TERM.strs[284])
-#define define_bit_image_region (_CUR_TERM.strs[285])
-#define define_char (_CUR_TERM.strs[286])
-#define device_type (_CUR_TERM.strs[287])
-#define dial_phone (_CUR_TERM.strs[288])
-#define display_clock (_CUR_TERM.strs[289])
-#define display_pc_char (_CUR_TERM.strs[290])
-#define end_bit_image_region (_CUR_TERM.strs[291])
-#define enter_doublewide_mode (_CUR_TERM.strs[292])
-#define enter_draft_quality (_CUR_TERM.strs[293])
-#define enter_italics_mode (_CUR_TERM.strs[294])
-#define enter_leftward_mode (_CUR_TERM.strs[295])
-#define enter_micro_mode (_CUR_TERM.strs[296])
-#define enter_near_letter_quality (_CUR_TERM.strs[297])
-#define enter_normal_quality (_CUR_TERM.strs[298])
-#define enter_pc_charset_mode (_CUR_TERM.strs[299])
-#define enter_scancode_mode (_CUR_TERM.strs[300])
-#define enter_shadow_mode (_CUR_TERM.strs[301])
-#define enter_subscript_mode (_CUR_TERM.strs[302])
-#define enter_superscript_mode (_CUR_TERM.strs[303])
-#define enter_upward_mode (_CUR_TERM.strs[304])
-#define exit_doublewide_mode (_CUR_TERM.strs[305])
-#define exit_italics_mode (_CUR_TERM.strs[306])
-#define exit_leftward_mode (_CUR_TERM.strs[307])
-#define exit_micro_mode (_CUR_TERM.strs[308])
-#define exit_pc_charset_mode (_CUR_TERM.strs[309])
-#define exit_scancode_mode (_CUR_TERM.strs[310])
-#define exit_shadow_mode (_CUR_TERM.strs[311])
-#define exit_subscript_mode (_CUR_TERM.strs[312])
-#define exit_superscript_mode (_CUR_TERM.strs[313])
-#define exit_upward_mode (_CUR_TERM.strs[314])
-#define fixed_pause (_CUR_TERM.strs[315])
-#define flash_hook (_CUR_TERM.strs[316])
-#define get_mouse (_CUR_TERM.strs[317])
-#define goto_window (_CUR_TERM.strs[318])
-#define hangup (_CUR_TERM.strs[319])
-#define initialize_color (_CUR_TERM.strs[320])
-#define initialize_pair (_CUR_TERM.strs[321])
-#define key_mouse (_CUR_TERM.strs[322])
-#define label_format (_CUR_TERM.strs[323])
-#define micro_column_address (_CUR_TERM.strs[324])
-#define micro_down (_CUR_TERM.strs[325])
-#define micro_left (_CUR_TERM.strs[326])
-#define micro_right (_CUR_TERM.strs[327])
-#define micro_row_address (_CUR_TERM.strs[328])
-#define micro_up (_CUR_TERM.strs[329])
-#define mouse_info (_CUR_TERM.strs[330])
-#define order_of_pins (_CUR_TERM.strs[331])
-#define orig_colors (_CUR_TERM.strs[332])
-#define orig_pair (_CUR_TERM.strs[333])
-#define parm_down_micro (_CUR_TERM.strs[334])
-#define parm_left_micro (_CUR_TERM.strs[335])
-#define parm_right_micro (_CUR_TERM.strs[336])
-#define parm_up_micro (_CUR_TERM.strs[337])
-#define pc_term_options (_CUR_TERM.strs[338])
-#define pkey_plab (_CUR_TERM.strs[339])
-#define pulse (_CUR_TERM.strs[340])
-#define quick_dial (_CUR_TERM.strs[341])
-#define remove_clock (_CUR_TERM.strs[342])
-#define req_mouse_pos (_CUR_TERM.strs[343])
-#define scancode_escape (_CUR_TERM.strs[344])
-#define select_char_set (_CUR_TERM.strs[345])
-#define set0_des_seq (_CUR_TERM.strs[346])
-#define set1_des_seq (_CUR_TERM.strs[347])
-#define set2_des_seq (_CUR_TERM.strs[348])
-#define set3_des_seq (_CUR_TERM.strs[349])
-#define set_a_background (_CUR_TERM.strs[350])
-#define set_a_foreground (_CUR_TERM.strs[351])
-#define set_background (_CUR_TERM.strs[352])
-#define set_bottom_margin (_CUR_TERM.strs[353])
-#define set_bottom_margin_parm (_CUR_TERM.strs[354])
-#define set_clock (_CUR_TERM.strs[355])
-#define set_color_band (_CUR_TERM.strs[356])
-#define set_color_pair (_CUR_TERM.strs[357])
-#define set_foreground (_CUR_TERM.strs[358])
-#define set_left_margin_parm (_CUR_TERM.strs[359])
-#define set_lr_margin (_CUR_TERM.strs[360])
-#define set_page_length (_CUR_TERM.strs[361])
-#define set_right_margin_parm (_CUR_TERM.strs[362])
-#define set_tb_margin (_CUR_TERM.strs[363])
-#define set_top_margin (_CUR_TERM.strs[364])
-#define set_top_margin_parm (_CUR_TERM.strs[365])
-#define start_bit_image (_CUR_TERM.strs[366])
-#define start_char_set_def (_CUR_TERM.strs[367])
-#define stop_bit_image (_CUR_TERM.strs[368])
-#define stop_char_set_def (_CUR_TERM.strs[369])
-#define subscript_characters (_CUR_TERM.strs[370])
-#define superscript_characters (_CUR_TERM.strs[371])
-#define these_cause_cr (_CUR_TERM.strs[372])
-#define tone (_CUR_TERM.strs[373])
-#define user0 (_CUR_TERM.strs[374])
-#define user1 (_CUR_TERM.strs[375])
-#define user2 (_CUR_TERM.strs[376])
-#define user3 (_CUR_TERM.strs[377])
-#define user4 (_CUR_TERM.strs[378])
-#define user5 (_CUR_TERM.strs[379])
-#define user6 (_CUR_TERM.strs[380])
-#define user7 (_CUR_TERM.strs[381])
-#define user8 (_CUR_TERM.strs[382])
-#define user9 (_CUR_TERM.strs[383])
-#define wait_tone (_CUR_TERM.strs[384])
-#define zero_motion (_CUR_TERM.strs[385])
-#define backspace_if_not_bs (_CUR_TERM.strs[386])
-#define other_non_function_keys (_CUR_TERM.strs[387])
-#define arrow_key_map (_CUR_TERM.strs[388])
-#define memory_lock_above (_CUR_TERM.strs[389])
-#define memory_unlock (_CUR_TERM.strs[390])
-#define linefeed_if_not_lf (_CUR_TERM.strs[391])
-#define key_interrupt_char (_CUR_TERM.strs[392])
-#define key_kill_char (_CUR_TERM.strs[393])
-#define key_suspend_char (_CUR_TERM.strs[394])
-#define scroll_left (_CUR_TERM.strs[395])
-#define scroll_right (_CUR_TERM.strs[396])
-#define parm_scroll_left (_CUR_TERM.strs[397])
-#define parm_scroll_right (_CUR_TERM.strs[398])
-#define _get_other (_CUR_TERM.strs[399])
-
-#define NUM_OF_BOOLS 53
-#define NUM_OF_NUMS 42
-#define NUM_OF_STRS 400
-
-#ifndef OVERRIDE
-#undef _USE_SGTTY
-#undef _USE_TERMIO
-#undef _USE_TERMIOS
-#define _USE_TERMIOS
-#undef _USE_SMALLMEM
-#undef _USE_PROTOTYPES
-#define _USE_PROTOTYPES
-#undef _USE_WINSZ
-#define _USE_WINSZ
-#undef _USE_TERMINFO
-#undef _USE_TERMCAP
-#define _USE_TERMCAP
-#undef _MAX_CHUNK
-#define _MAX_CHUNK 640
-#endif /* OVERRIDE */
-
-/*
- * 92/02/01 07:30:28
- * @(#) mytinfo term.tail 3.2 92/02/01 public domain, By Ross Ridge
- *
- */
-
-#if defined(_USE_TERMIO) || defined(_USE_TERMIOS)
-#ifndef ICANON
-#ifdef _USE_TERMIO
-#include <termio.h>
-#else
-#include <termios.h>
-#endif
-#endif
-#if defined(_USE_WINSZ) && defined(__FreeBSD__)
-#include <sys/ioctl.h>
-#endif
-#if defined(_USE_WINSZ) && defined(xenix)
-#include <sys/stream.h>
-#include <sys/ptem.h>
-#endif
-#endif
-
-#ifdef _USE_SGTTY
-#ifndef CBREAK
-#include <sgtty.h>
-#endif
-#endif
-
-typedef struct _terminal {
- int fd;
-#ifdef _USE_SMALLMEM
-#ifdef _USE_TERMIOS
- speed_t baudrate;
-#else
- unsigned short baudrate;
-#endif
- unsigned pad:1, xon:1, termcap:1;
-#else
- int pad;
- int xon;
- int termcap;
-#ifdef _USE_TERMIOS
- speed_t baudrate;
-#else
- long baudrate;
-#endif
-#endif
- char padch;
- short true_lines, true_columns;
- struct strbuf {
- struct strbuf *next;
-#ifdef _USE_SMALLMEM
- short len;
-#else
- int len;
-#endif
- char buf[_MAX_CHUNK];
- } *strbuf;
- char *name, *name_long, *name_all;
-#ifdef _USE_SGTTY
- struct sgtty_str {
- struct sgttyb v6;
-#ifdef TIOCGETC
- struct tchars v7;
-#endif
-#ifdef TIOCLGET
- int bsd;
-#endif
-#ifdef TIOCGLTC
- struct ltchars bsd_new;
-#endif
- } prog_mode, shell_mode;
-#else /* _USE_SGTTY */
-#ifdef _USE_TERMIOS
- struct termios prog_mode, shell_mode;
-#else
-#ifdef _USE_TERMIO
- struct termio prog_mode, shell_mode;
-#endif
-#endif
-#endif /* else _USE_SGTTY */
-#ifdef _USE_WINSZ
-#ifdef TIOCGWINSZ
- struct winsize prog_winsz, shell_winsz;
-#endif
-#endif
- char bools[NUM_OF_BOOLS];
- short nums[NUM_OF_NUMS];
- char *strs[NUM_OF_STRS];
-} TERMINAL;
-
-#ifndef _CUR_TERM
-#ifdef SINGLE
-#define _CUR_TERM _term_buf
-#else
-#define _CUR_TERM (*cur_term)
-#endif
-#endif
-
-extern TERMINAL *cur_term;
-extern TERMINAL _term_buf;
-
-#ifndef __P
-#if defined(_USE_PROTOTYPES) && (defined(__STDC__) || defined(__cplusplus))
-#define __P(protos) protos /* full-blown ANSI C */
-#else
-#define __P(protos) () /* traditional C preprocessor */
-#endif
-#endif
-
-extern char *tparm __P((const char *, ...));
-extern int setupterm __P((char *, int, int *)), set_curterm __P((TERMINAL *));
-extern int del_curterm __P((TERMINAL *)), tputs __P((const char *, int, int (*)(int)));
-extern int putp __P((char *));
-extern int tigetflag __P((char *)), tigetnum __P((char *));
-extern char *tigetstr __P((char *));
-extern int def_prog_mode __P((void)), def_shell_mode __P((void));
-extern int reset_prog_mode __P((void)), reset_shell_mode __P((void));
-
-extern char *boolnames[], *boolcodes[], *boolfnames[];
-extern char *numnames[], *numcodes[], *numfnames[];
-extern char *strnames[], *strcodes[], *strfnames[];
-
-#ifndef OK
-#undef ERR
-#define OK (0)
-#define ERR (-1)
-#endif
-
-/* Compatibility */
-#define Filedes fd
-#define Ottyb shell_mode
-#define Nttyb prog_mode
-#define TTY struct termios
-
-#endif /* _TERM_H_ */
diff --git a/lib/libmytinfo/term.head b/lib/libmytinfo/term.head
deleted file mode 100644
index 4001038..0000000
--- a/lib/libmytinfo/term.head
+++ /dev/null
@@ -1,527 +0,0 @@
-/*
- * term.h
- *
- * This file was generated automatically.
- *
- */
-
-#ifndef _TERM_H_
-#define _TERM_H_
-
-#define auto_left_margin (_CUR_TERM.bools[0])
-#define auto_right_margin (_CUR_TERM.bools[1])
-#define ceol_standout_glitch (_CUR_TERM.bools[2])
-#define dest_tabs_magic_smso (_CUR_TERM.bools[3])
-#define eat_newline_glitch (_CUR_TERM.bools[4])
-#define erase_overstrike (_CUR_TERM.bools[5])
-#define generic_type (_CUR_TERM.bools[6])
-#define hard_copy (_CUR_TERM.bools[7])
-#define hard_cursor (_CUR_TERM.bools[8])
-#define has_meta_key (_CUR_TERM.bools[9])
-#define has_status_line (_CUR_TERM.bools[10])
-#define insert_null_glitch (_CUR_TERM.bools[11])
-#define memory_above (_CUR_TERM.bools[12])
-#define memory_below (_CUR_TERM.bools[13])
-#define move_insert_mode (_CUR_TERM.bools[14])
-#define move_standout_mode (_CUR_TERM.bools[15])
-#define needs_xon_xoff (_CUR_TERM.bools[16])
-#define no_esc_ctlc (_CUR_TERM.bools[17])
-#define no_pad_char (_CUR_TERM.bools[18])
-#define non_rev_rmcup (_CUR_TERM.bools[19])
-#define over_strike (_CUR_TERM.bools[20])
-#define prtr_silent (_CUR_TERM.bools[21])
-#define status_line_esc_ok (_CUR_TERM.bools[22])
-#define tilde_glitch (_CUR_TERM.bools[23])
-#define transparent_underline (_CUR_TERM.bools[24])
-#define xon_xoff (_CUR_TERM.bools[25])
-#define back_color_erase (_CUR_TERM.bools[26])
-#define can_change (_CUR_TERM.bools[27])
-#define col_addr_glitch (_CUR_TERM.bools[28])
-#define cpi_changes_res (_CUR_TERM.bools[29])
-#define cr_cancels_micro_mode (_CUR_TERM.bools[30])
-#define has_print_wheel (_CUR_TERM.bools[31])
-#define hue_lightness_saturation (_CUR_TERM.bools[32])
-#define lpi_changes_res (_CUR_TERM.bools[33])
-#define non_dest_scroll_region (_CUR_TERM.bools[34])
-#define row_addr_glitch (_CUR_TERM.bools[35])
-#define semi_auto_right_margin (_CUR_TERM.bools[36])
-#define backspaces_with_bs (_CUR_TERM.bools[37])
-#define even_parity (_CUR_TERM.bools[38])
-#define half_duplex (_CUR_TERM.bools[39])
-#define lower_case_only (_CUR_TERM.bools[40])
-#define no_correctly_working_cr (_CUR_TERM.bools[41])
-#define linefeed_is_newline (_CUR_TERM.bools[42])
-#define crt_without_scrolling (_CUR_TERM.bools[43])
-#define odd_parity (_CUR_TERM.bools[44])
-#define has_hardware_tabs (_CUR_TERM.bools[45])
-#define uppercase_only (_CUR_TERM.bools[46])
-#define return_does_clr_eol (_CUR_TERM.bools[47])
-#define tek_4025_insert_line (_CUR_TERM.bools[48])
-#define initialization_messy (_CUR_TERM.bools[49])
-#define index_at_bottom_does_cr (_CUR_TERM.bools[50])
-#define rind_only_at_top (_CUR_TERM.bools[51])
-#define GNU_has_meta_key (_CUR_TERM.bools[52])
-#define columns (_CUR_TERM.nums[0])
-#define init_tabs (_CUR_TERM.nums[1])
-#define label_height (_CUR_TERM.nums[2])
-#define label_width (_CUR_TERM.nums[3])
-#define lines (_CUR_TERM.nums[4])
-#define lines_of_memory (_CUR_TERM.nums[5])
-#define magic_cookie_glitch (_CUR_TERM.nums[6])
-#define num_labels (_CUR_TERM.nums[7])
-#define padding_baud_rate (_CUR_TERM.nums[8])
-#define virtual_terminal (_CUR_TERM.nums[9])
-#define width_status_line (_CUR_TERM.nums[10])
-#define bit_image_entwining (_CUR_TERM.nums[11])
-#define bit_image_type (_CUR_TERM.nums[12])
-#define buffer_capacity (_CUR_TERM.nums[13])
-#define buttons (_CUR_TERM.nums[14])
-#define dot_horz_spacing (_CUR_TERM.nums[15])
-#define dot_vert_spacing (_CUR_TERM.nums[16])
-#define max_attributes (_CUR_TERM.nums[17])
-#define max_colors (_CUR_TERM.nums[18])
-#define max_micro_address (_CUR_TERM.nums[19])
-#define max_micro_jump (_CUR_TERM.nums[20])
-#define max_pairs (_CUR_TERM.nums[21])
-#define maximum_windows (_CUR_TERM.nums[22])
-#define micro_char_size (_CUR_TERM.nums[23])
-#define micro_line_size (_CUR_TERM.nums[24])
-#define no_color_video (_CUR_TERM.nums[25])
-#define number_of_pins (_CUR_TERM.nums[26])
-#define output_res_char (_CUR_TERM.nums[27])
-#define output_res_horz_inch (_CUR_TERM.nums[28])
-#define output_res_line (_CUR_TERM.nums[29])
-#define output_res_vert_inch (_CUR_TERM.nums[30])
-#define print_rate (_CUR_TERM.nums[31])
-#define wide_char_size (_CUR_TERM.nums[32])
-#define backspace_delay (_CUR_TERM.nums[33])
-#define carriage_return_delay (_CUR_TERM.nums[34])
-#define form_feed_delay (_CUR_TERM.nums[35])
-#define new_line_delay (_CUR_TERM.nums[36])
-#define horizontal_tab_delay (_CUR_TERM.nums[37])
-#define vertical_tab_delay (_CUR_TERM.nums[38])
-#define number_of_function_keys (_CUR_TERM.nums[39])
-#define magic_cookie_glitch_ul (_CUR_TERM.nums[40])
-#define GNU_tab_width (_CUR_TERM.nums[41])
-#define acs_chars (_CUR_TERM.strs[0])
-#define back_tab (_CUR_TERM.strs[1])
-#define bell (_CUR_TERM.strs[2])
-#define carriage_return (_CUR_TERM.strs[3])
-#define change_scroll_region (_CUR_TERM.strs[4])
-#define char_padding (_CUR_TERM.strs[5])
-#define clear_all_tabs (_CUR_TERM.strs[6])
-#define clear_margins (_CUR_TERM.strs[7])
-#define clear_screen (_CUR_TERM.strs[8])
-#define clr_bol (_CUR_TERM.strs[9])
-#define clr_eol (_CUR_TERM.strs[10])
-#define clr_eos (_CUR_TERM.strs[11])
-#define column_address (_CUR_TERM.strs[12])
-#define command_character (_CUR_TERM.strs[13])
-#define cursor_address (_CUR_TERM.strs[14])
-#define cursor_down (_CUR_TERM.strs[15])
-#define cursor_home (_CUR_TERM.strs[16])
-#define cursor_invisible (_CUR_TERM.strs[17])
-#define cursor_left (_CUR_TERM.strs[18])
-#define cursor_mem_address (_CUR_TERM.strs[19])
-#define cursor_normal (_CUR_TERM.strs[20])
-#define cursor_right (_CUR_TERM.strs[21])
-#define cursor_to_ll (_CUR_TERM.strs[22])
-#define cursor_up (_CUR_TERM.strs[23])
-#define cursor_visible (_CUR_TERM.strs[24])
-#define delete_character (_CUR_TERM.strs[25])
-#define delete_line (_CUR_TERM.strs[26])
-#define dis_status_line (_CUR_TERM.strs[27])
-#define down_half_line (_CUR_TERM.strs[28])
-#define ena_acs (_CUR_TERM.strs[29])
-#define enter_alt_charset_mode (_CUR_TERM.strs[30])
-#define enter_am_mode (_CUR_TERM.strs[31])
-#define enter_blink_mode (_CUR_TERM.strs[32])
-#define enter_bold_mode (_CUR_TERM.strs[33])
-#define enter_ca_mode (_CUR_TERM.strs[34])
-#define enter_delete_mode (_CUR_TERM.strs[35])
-#define enter_dim_mode (_CUR_TERM.strs[36])
-#define enter_insert_mode (_CUR_TERM.strs[37])
-#define enter_protected_mode (_CUR_TERM.strs[38])
-#define enter_reverse_mode (_CUR_TERM.strs[39])
-#define enter_secure_mode (_CUR_TERM.strs[40])
-#define enter_standout_mode (_CUR_TERM.strs[41])
-#define enter_underline_mode (_CUR_TERM.strs[42])
-#define enter_xon_mode (_CUR_TERM.strs[43])
-#define erase_chars (_CUR_TERM.strs[44])
-#define exit_alt_charset_mode (_CUR_TERM.strs[45])
-#define exit_am_mode (_CUR_TERM.strs[46])
-#define exit_attribute_mode (_CUR_TERM.strs[47])
-#define exit_ca_mode (_CUR_TERM.strs[48])
-#define exit_delete_mode (_CUR_TERM.strs[49])
-#define exit_insert_mode (_CUR_TERM.strs[50])
-#define exit_standout_mode (_CUR_TERM.strs[51])
-#define exit_underline_mode (_CUR_TERM.strs[52])
-#define exit_xon_mode (_CUR_TERM.strs[53])
-#define flash_screen (_CUR_TERM.strs[54])
-#define form_feed (_CUR_TERM.strs[55])
-#define from_status_line (_CUR_TERM.strs[56])
-#define init_1string (_CUR_TERM.strs[57])
-#define init_2string (_CUR_TERM.strs[58])
-#define init_3string (_CUR_TERM.strs[59])
-#define init_file (_CUR_TERM.strs[60])
-#define init_prog (_CUR_TERM.strs[61])
-#define insert_character (_CUR_TERM.strs[62])
-#define insert_line (_CUR_TERM.strs[63])
-#define insert_padding (_CUR_TERM.strs[64])
-#define key_a1 (_CUR_TERM.strs[65])
-#define key_a3 (_CUR_TERM.strs[66])
-#define key_b2 (_CUR_TERM.strs[67])
-#define key_backspace (_CUR_TERM.strs[68])
-#define key_beg (_CUR_TERM.strs[69])
-#define key_btab (_CUR_TERM.strs[70])
-#define key_c1 (_CUR_TERM.strs[71])
-#define key_c3 (_CUR_TERM.strs[72])
-#define key_cancel (_CUR_TERM.strs[73])
-#define key_catab (_CUR_TERM.strs[74])
-#define key_clear (_CUR_TERM.strs[75])
-#define key_close (_CUR_TERM.strs[76])
-#define key_command (_CUR_TERM.strs[77])
-#define key_copy (_CUR_TERM.strs[78])
-#define key_create (_CUR_TERM.strs[79])
-#define key_ctab (_CUR_TERM.strs[80])
-#define key_dc (_CUR_TERM.strs[81])
-#define key_dl (_CUR_TERM.strs[82])
-#define key_down (_CUR_TERM.strs[83])
-#define key_eic (_CUR_TERM.strs[84])
-#define key_end (_CUR_TERM.strs[85])
-#define key_enter (_CUR_TERM.strs[86])
-#define key_eol (_CUR_TERM.strs[87])
-#define key_eos (_CUR_TERM.strs[88])
-#define key_exit (_CUR_TERM.strs[89])
-#define key_f0 (_CUR_TERM.strs[90])
-#define key_f1 (_CUR_TERM.strs[91])
-#define key_f10 (_CUR_TERM.strs[92])
-#define key_f11 (_CUR_TERM.strs[93])
-#define key_f12 (_CUR_TERM.strs[94])
-#define key_f13 (_CUR_TERM.strs[95])
-#define key_f14 (_CUR_TERM.strs[96])
-#define key_f15 (_CUR_TERM.strs[97])
-#define key_f16 (_CUR_TERM.strs[98])
-#define key_f17 (_CUR_TERM.strs[99])
-#define key_f18 (_CUR_TERM.strs[100])
-#define key_f19 (_CUR_TERM.strs[101])
-#define key_f2 (_CUR_TERM.strs[102])
-#define key_f20 (_CUR_TERM.strs[103])
-#define key_f21 (_CUR_TERM.strs[104])
-#define key_f22 (_CUR_TERM.strs[105])
-#define key_f23 (_CUR_TERM.strs[106])
-#define key_f24 (_CUR_TERM.strs[107])
-#define key_f25 (_CUR_TERM.strs[108])
-#define key_f26 (_CUR_TERM.strs[109])
-#define key_f27 (_CUR_TERM.strs[110])
-#define key_f28 (_CUR_TERM.strs[111])
-#define key_f29 (_CUR_TERM.strs[112])
-#define key_f3 (_CUR_TERM.strs[113])
-#define key_f30 (_CUR_TERM.strs[114])
-#define key_f31 (_CUR_TERM.strs[115])
-#define key_f32 (_CUR_TERM.strs[116])
-#define key_f33 (_CUR_TERM.strs[117])
-#define key_f34 (_CUR_TERM.strs[118])
-#define key_f35 (_CUR_TERM.strs[119])
-#define key_f36 (_CUR_TERM.strs[120])
-#define key_f37 (_CUR_TERM.strs[121])
-#define key_f38 (_CUR_TERM.strs[122])
-#define key_f39 (_CUR_TERM.strs[123])
-#define key_f4 (_CUR_TERM.strs[124])
-#define key_f40 (_CUR_TERM.strs[125])
-#define key_f41 (_CUR_TERM.strs[126])
-#define key_f42 (_CUR_TERM.strs[127])
-#define key_f43 (_CUR_TERM.strs[128])
-#define key_f44 (_CUR_TERM.strs[129])
-#define key_f45 (_CUR_TERM.strs[130])
-#define key_f46 (_CUR_TERM.strs[131])
-#define key_f47 (_CUR_TERM.strs[132])
-#define key_f48 (_CUR_TERM.strs[133])
-#define key_f49 (_CUR_TERM.strs[134])
-#define key_f5 (_CUR_TERM.strs[135])
-#define key_f50 (_CUR_TERM.strs[136])
-#define key_f51 (_CUR_TERM.strs[137])
-#define key_f52 (_CUR_TERM.strs[138])
-#define key_f53 (_CUR_TERM.strs[139])
-#define key_f54 (_CUR_TERM.strs[140])
-#define key_f55 (_CUR_TERM.strs[141])
-#define key_f56 (_CUR_TERM.strs[142])
-#define key_f57 (_CUR_TERM.strs[143])
-#define key_f58 (_CUR_TERM.strs[144])
-#define key_f59 (_CUR_TERM.strs[145])
-#define key_f6 (_CUR_TERM.strs[146])
-#define key_f60 (_CUR_TERM.strs[147])
-#define key_f61 (_CUR_TERM.strs[148])
-#define key_f62 (_CUR_TERM.strs[149])
-#define key_f63 (_CUR_TERM.strs[150])
-#define key_f7 (_CUR_TERM.strs[151])
-#define key_f8 (_CUR_TERM.strs[152])
-#define key_f9 (_CUR_TERM.strs[153])
-#define key_find (_CUR_TERM.strs[154])
-#define key_help (_CUR_TERM.strs[155])
-#define key_home (_CUR_TERM.strs[156])
-#define key_ic (_CUR_TERM.strs[157])
-#define key_il (_CUR_TERM.strs[158])
-#define key_left (_CUR_TERM.strs[159])
-#define key_ll (_CUR_TERM.strs[160])
-#define key_mark (_CUR_TERM.strs[161])
-#define key_message (_CUR_TERM.strs[162])
-#define key_move (_CUR_TERM.strs[163])
-#define key_next (_CUR_TERM.strs[164])
-#define key_npage (_CUR_TERM.strs[165])
-#define key_open (_CUR_TERM.strs[166])
-#define key_options (_CUR_TERM.strs[167])
-#define key_ppage (_CUR_TERM.strs[168])
-#define key_previous (_CUR_TERM.strs[169])
-#define key_print (_CUR_TERM.strs[170])
-#define key_redo (_CUR_TERM.strs[171])
-#define key_reference (_CUR_TERM.strs[172])
-#define key_refresh (_CUR_TERM.strs[173])
-#define key_replace (_CUR_TERM.strs[174])
-#define key_restart (_CUR_TERM.strs[175])
-#define key_resume (_CUR_TERM.strs[176])
-#define key_right (_CUR_TERM.strs[177])
-#define key_save (_CUR_TERM.strs[178])
-#define key_sbeg (_CUR_TERM.strs[179])
-#define key_scancel (_CUR_TERM.strs[180])
-#define key_scommand (_CUR_TERM.strs[181])
-#define key_scopy (_CUR_TERM.strs[182])
-#define key_screate (_CUR_TERM.strs[183])
-#define key_sdc (_CUR_TERM.strs[184])
-#define key_sdl (_CUR_TERM.strs[185])
-#define key_select (_CUR_TERM.strs[186])
-#define key_send (_CUR_TERM.strs[187])
-#define key_seol (_CUR_TERM.strs[188])
-#define key_sexit (_CUR_TERM.strs[189])
-#define key_sf (_CUR_TERM.strs[190])
-#define key_sfind (_CUR_TERM.strs[191])
-#define key_shelp (_CUR_TERM.strs[192])
-#define key_shome (_CUR_TERM.strs[193])
-#define key_sic (_CUR_TERM.strs[194])
-#define key_sleft (_CUR_TERM.strs[195])
-#define key_smessage (_CUR_TERM.strs[196])
-#define key_smove (_CUR_TERM.strs[197])
-#define key_snext (_CUR_TERM.strs[198])
-#define key_soptions (_CUR_TERM.strs[199])
-#define key_sprevious (_CUR_TERM.strs[200])
-#define key_sprint (_CUR_TERM.strs[201])
-#define key_sr (_CUR_TERM.strs[202])
-#define key_sredo (_CUR_TERM.strs[203])
-#define key_sreplace (_CUR_TERM.strs[204])
-#define key_sright (_CUR_TERM.strs[205])
-#define key_srsume (_CUR_TERM.strs[206])
-#define key_ssave (_CUR_TERM.strs[207])
-#define key_ssuspend (_CUR_TERM.strs[208])
-#define key_stab (_CUR_TERM.strs[209])
-#define key_sundo (_CUR_TERM.strs[210])
-#define key_suspend (_CUR_TERM.strs[211])
-#define key_undo (_CUR_TERM.strs[212])
-#define key_up (_CUR_TERM.strs[213])
-#define keypad_local (_CUR_TERM.strs[214])
-#define keypad_xmit (_CUR_TERM.strs[215])
-#define lab_f0 (_CUR_TERM.strs[216])
-#define lab_f1 (_CUR_TERM.strs[217])
-#define lab_f10 (_CUR_TERM.strs[218])
-#define lab_f2 (_CUR_TERM.strs[219])
-#define lab_f3 (_CUR_TERM.strs[220])
-#define lab_f4 (_CUR_TERM.strs[221])
-#define lab_f5 (_CUR_TERM.strs[222])
-#define lab_f6 (_CUR_TERM.strs[223])
-#define lab_f7 (_CUR_TERM.strs[224])
-#define lab_f8 (_CUR_TERM.strs[225])
-#define lab_f9 (_CUR_TERM.strs[226])
-#define label_off (_CUR_TERM.strs[227])
-#define label_on (_CUR_TERM.strs[228])
-#define meta_off (_CUR_TERM.strs[229])
-#define meta_on (_CUR_TERM.strs[230])
-#define newline (_CUR_TERM.strs[231])
-#define pad_char (_CUR_TERM.strs[232])
-#define parm_dch (_CUR_TERM.strs[233])
-#define parm_delete_line (_CUR_TERM.strs[234])
-#define parm_down_cursor (_CUR_TERM.strs[235])
-#define parm_ich (_CUR_TERM.strs[236])
-#define parm_index (_CUR_TERM.strs[237])
-#define parm_insert_line (_CUR_TERM.strs[238])
-#define parm_left_cursor (_CUR_TERM.strs[239])
-#define parm_right_cursor (_CUR_TERM.strs[240])
-#define parm_rindex (_CUR_TERM.strs[241])
-#define parm_up_cursor (_CUR_TERM.strs[242])
-#define pkey_key (_CUR_TERM.strs[243])
-#define pkey_local (_CUR_TERM.strs[244])
-#define pkey_xmit (_CUR_TERM.strs[245])
-#define plab_norm (_CUR_TERM.strs[246])
-#define print_screen (_CUR_TERM.strs[247])
-#define prtr_non (_CUR_TERM.strs[248])
-#define prtr_off (_CUR_TERM.strs[249])
-#define prtr_on (_CUR_TERM.strs[250])
-#define repeat_char (_CUR_TERM.strs[251])
-#define req_for_input (_CUR_TERM.strs[252])
-#define reset_1string (_CUR_TERM.strs[253])
-#define reset_2string (_CUR_TERM.strs[254])
-#define reset_3string (_CUR_TERM.strs[255])
-#define reset_file (_CUR_TERM.strs[256])
-#define restore_cursor (_CUR_TERM.strs[257])
-#define row_address (_CUR_TERM.strs[258])
-#define save_cursor (_CUR_TERM.strs[259])
-#define scroll_forward (_CUR_TERM.strs[260])
-#define scroll_reverse (_CUR_TERM.strs[261])
-#define set_attributes (_CUR_TERM.strs[262])
-#define set_left_margin (_CUR_TERM.strs[263])
-#define set_right_margin (_CUR_TERM.strs[264])
-#define set_tab (_CUR_TERM.strs[265])
-#define set_window (_CUR_TERM.strs[266])
-#define tab (_CUR_TERM.strs[267])
-#define to_status_line (_CUR_TERM.strs[268])
-#define underline_char (_CUR_TERM.strs[269])
-#define up_half_line (_CUR_TERM.strs[270])
-#define xoff_character (_CUR_TERM.strs[271])
-#define xon_character (_CUR_TERM.strs[272])
-#define alt_scancode_esc (_CUR_TERM.strs[273])
-#define bit_image_carriage_return (_CUR_TERM.strs[274])
-#define bit_image_newline (_CUR_TERM.strs[275])
-#define bit_image_repeat (_CUR_TERM.strs[276])
-#define change_char_pitch (_CUR_TERM.strs[277])
-#define change_line_pitch (_CUR_TERM.strs[278])
-#define change_res_horz (_CUR_TERM.strs[279])
-#define change_res_vert (_CUR_TERM.strs[280])
-#define char_set_names (_CUR_TERM.strs[281])
-#define code_set_init (_CUR_TERM.strs[282])
-#define color_names (_CUR_TERM.strs[283])
-#define create_window (_CUR_TERM.strs[284])
-#define define_bit_image_region (_CUR_TERM.strs[285])
-#define define_char (_CUR_TERM.strs[286])
-#define device_type (_CUR_TERM.strs[287])
-#define dial_phone (_CUR_TERM.strs[288])
-#define display_clock (_CUR_TERM.strs[289])
-#define display_pc_char (_CUR_TERM.strs[290])
-#define end_bit_image_region (_CUR_TERM.strs[291])
-#define enter_doublewide_mode (_CUR_TERM.strs[292])
-#define enter_draft_quality (_CUR_TERM.strs[293])
-#define enter_italics_mode (_CUR_TERM.strs[294])
-#define enter_leftward_mode (_CUR_TERM.strs[295])
-#define enter_micro_mode (_CUR_TERM.strs[296])
-#define enter_near_letter_quality (_CUR_TERM.strs[297])
-#define enter_normal_quality (_CUR_TERM.strs[298])
-#define enter_pc_charset_mode (_CUR_TERM.strs[299])
-#define enter_scancode_mode (_CUR_TERM.strs[300])
-#define enter_shadow_mode (_CUR_TERM.strs[301])
-#define enter_subscript_mode (_CUR_TERM.strs[302])
-#define enter_superscript_mode (_CUR_TERM.strs[303])
-#define enter_upward_mode (_CUR_TERM.strs[304])
-#define exit_doublewide_mode (_CUR_TERM.strs[305])
-#define exit_italics_mode (_CUR_TERM.strs[306])
-#define exit_leftward_mode (_CUR_TERM.strs[307])
-#define exit_micro_mode (_CUR_TERM.strs[308])
-#define exit_pc_charset_mode (_CUR_TERM.strs[309])
-#define exit_scancode_mode (_CUR_TERM.strs[310])
-#define exit_shadow_mode (_CUR_TERM.strs[311])
-#define exit_subscript_mode (_CUR_TERM.strs[312])
-#define exit_superscript_mode (_CUR_TERM.strs[313])
-#define exit_upward_mode (_CUR_TERM.strs[314])
-#define fixed_pause (_CUR_TERM.strs[315])
-#define flash_hook (_CUR_TERM.strs[316])
-#define get_mouse (_CUR_TERM.strs[317])
-#define goto_window (_CUR_TERM.strs[318])
-#define hangup (_CUR_TERM.strs[319])
-#define initialize_color (_CUR_TERM.strs[320])
-#define initialize_pair (_CUR_TERM.strs[321])
-#define key_mouse (_CUR_TERM.strs[322])
-#define label_format (_CUR_TERM.strs[323])
-#define micro_column_address (_CUR_TERM.strs[324])
-#define micro_down (_CUR_TERM.strs[325])
-#define micro_left (_CUR_TERM.strs[326])
-#define micro_right (_CUR_TERM.strs[327])
-#define micro_row_address (_CUR_TERM.strs[328])
-#define micro_up (_CUR_TERM.strs[329])
-#define mouse_info (_CUR_TERM.strs[330])
-#define order_of_pins (_CUR_TERM.strs[331])
-#define orig_colors (_CUR_TERM.strs[332])
-#define orig_pair (_CUR_TERM.strs[333])
-#define parm_down_micro (_CUR_TERM.strs[334])
-#define parm_left_micro (_CUR_TERM.strs[335])
-#define parm_right_micro (_CUR_TERM.strs[336])
-#define parm_up_micro (_CUR_TERM.strs[337])
-#define pc_term_options (_CUR_TERM.strs[338])
-#define pkey_plab (_CUR_TERM.strs[339])
-#define pulse (_CUR_TERM.strs[340])
-#define quick_dial (_CUR_TERM.strs[341])
-#define remove_clock (_CUR_TERM.strs[342])
-#define req_mouse_pos (_CUR_TERM.strs[343])
-#define scancode_escape (_CUR_TERM.strs[344])
-#define select_char_set (_CUR_TERM.strs[345])
-#define set0_des_seq (_CUR_TERM.strs[346])
-#define set1_des_seq (_CUR_TERM.strs[347])
-#define set2_des_seq (_CUR_TERM.strs[348])
-#define set3_des_seq (_CUR_TERM.strs[349])
-#define set_a_background (_CUR_TERM.strs[350])
-#define set_a_foreground (_CUR_TERM.strs[351])
-#define set_background (_CUR_TERM.strs[352])
-#define set_bottom_margin (_CUR_TERM.strs[353])
-#define set_bottom_margin_parm (_CUR_TERM.strs[354])
-#define set_clock (_CUR_TERM.strs[355])
-#define set_color_band (_CUR_TERM.strs[356])
-#define set_color_pair (_CUR_TERM.strs[357])
-#define set_foreground (_CUR_TERM.strs[358])
-#define set_left_margin_parm (_CUR_TERM.strs[359])
-#define set_lr_margin (_CUR_TERM.strs[360])
-#define set_page_length (_CUR_TERM.strs[361])
-#define set_right_margin_parm (_CUR_TERM.strs[362])
-#define set_tb_margin (_CUR_TERM.strs[363])
-#define set_top_margin (_CUR_TERM.strs[364])
-#define set_top_margin_parm (_CUR_TERM.strs[365])
-#define start_bit_image (_CUR_TERM.strs[366])
-#define start_char_set_def (_CUR_TERM.strs[367])
-#define stop_bit_image (_CUR_TERM.strs[368])
-#define stop_char_set_def (_CUR_TERM.strs[369])
-#define subscript_characters (_CUR_TERM.strs[370])
-#define superscript_characters (_CUR_TERM.strs[371])
-#define these_cause_cr (_CUR_TERM.strs[372])
-#define tone (_CUR_TERM.strs[373])
-#define user0 (_CUR_TERM.strs[374])
-#define user1 (_CUR_TERM.strs[375])
-#define user2 (_CUR_TERM.strs[376])
-#define user3 (_CUR_TERM.strs[377])
-#define user4 (_CUR_TERM.strs[378])
-#define user5 (_CUR_TERM.strs[379])
-#define user6 (_CUR_TERM.strs[380])
-#define user7 (_CUR_TERM.strs[381])
-#define user8 (_CUR_TERM.strs[382])
-#define user9 (_CUR_TERM.strs[383])
-#define wait_tone (_CUR_TERM.strs[384])
-#define zero_motion (_CUR_TERM.strs[385])
-#define backspace_if_not_bs (_CUR_TERM.strs[386])
-#define other_non_function_keys (_CUR_TERM.strs[387])
-#define arrow_key_map (_CUR_TERM.strs[388])
-#define memory_lock_above (_CUR_TERM.strs[389])
-#define memory_unlock (_CUR_TERM.strs[390])
-#define linefeed_if_not_lf (_CUR_TERM.strs[391])
-#define key_interrupt_char (_CUR_TERM.strs[392])
-#define key_kill_char (_CUR_TERM.strs[393])
-#define key_suspend_char (_CUR_TERM.strs[394])
-#define scroll_left (_CUR_TERM.strs[395])
-#define scroll_right (_CUR_TERM.strs[396])
-#define parm_scroll_left (_CUR_TERM.strs[397])
-#define parm_scroll_right (_CUR_TERM.strs[398])
-#define _get_other (_CUR_TERM.strs[399])
-
-#define NUM_OF_BOOLS 53
-#define NUM_OF_NUMS 42
-#define NUM_OF_STRS 400
-
-#ifndef OVERRIDE
-#undef _USE_SGTTY
-#undef _USE_TERMIO
-#undef _USE_TERMIOS
-#define _USE_TERMIOS
-#undef _USE_SMALLMEM
-#undef _USE_PROTOTYPES
-#define _USE_PROTOTYPES
-#undef _USE_WINSZ
-#define _USE_WINSZ
-#undef _USE_TERMINFO
-#undef _USE_TERMCAP
-#define _USE_TERMCAP
-#undef _MAX_CHUNK
-#define _MAX_CHUNK 640
-#endif /* OVERRIDE */
-
diff --git a/lib/libmytinfo/term.tail b/lib/libmytinfo/term.tail
deleted file mode 100644
index dd5b6ad..0000000
--- a/lib/libmytinfo/term.tail
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * 92/02/01 07:30:28
- * @(#) mytinfo term.tail 3.2 92/02/01 public domain, By Ross Ridge
- *
- */
-
-#if defined(_USE_TERMIO) || defined(_USE_TERMIOS)
-#ifndef ICANON
-#ifdef _USE_TERMIO
-#include <termio.h>
-#else
-#include <termios.h>
-#endif
-#endif
-#if defined(_USE_WINSZ) && defined(__FreeBSD__)
-#include <sys/ioctl.h>
-#endif
-#if defined(_USE_WINSZ) && defined(xenix)
-#include <sys/stream.h>
-#include <sys/ptem.h>
-#endif
-#endif
-
-#ifdef _USE_SGTTY
-#ifndef CBREAK
-#include <sgtty.h>
-#endif
-#endif
-
-typedef struct _terminal {
- int fd;
-#ifdef _USE_SMALLMEM
-#ifdef _USE_TERMIOS
- speed_t baudrate;
-#else
- unsigned short baudrate;
-#endif
- unsigned pad:1, xon:1, termcap:1;
-#else
- int pad;
- int xon;
- int termcap;
-#ifdef _USE_TERMIOS
- speed_t baudrate;
-#else
- long baudrate;
-#endif
-#endif
- char padch;
- short true_lines, true_columns;
- struct strbuf {
- struct strbuf *next;
-#ifdef _USE_SMALLMEM
- short len;
-#else
- int len;
-#endif
- char buf[_MAX_CHUNK];
- } *strbuf;
- char *name, *name_long, *name_all;
-#ifdef _USE_SGTTY
- struct sgtty_str {
- struct sgttyb v6;
-#ifdef TIOCGETC
- struct tchars v7;
-#endif
-#ifdef TIOCLGET
- int bsd;
-#endif
-#ifdef TIOCGLTC
- struct ltchars bsd_new;
-#endif
- } prog_mode, shell_mode;
-#else /* _USE_SGTTY */
-#ifdef _USE_TERMIOS
- struct termios prog_mode, shell_mode;
-#else
-#ifdef _USE_TERMIO
- struct termio prog_mode, shell_mode;
-#endif
-#endif
-#endif /* else _USE_SGTTY */
-#ifdef _USE_WINSZ
-#ifdef TIOCGWINSZ
- struct winsize prog_winsz, shell_winsz;
-#endif
-#endif
- char bools[NUM_OF_BOOLS];
- short nums[NUM_OF_NUMS];
- char *strs[NUM_OF_STRS];
-} TERMINAL;
-
-#ifndef _CUR_TERM
-#ifdef SINGLE
-#define _CUR_TERM _term_buf
-#else
-#define _CUR_TERM (*cur_term)
-#endif
-#endif
-
-extern TERMINAL *cur_term;
-extern TERMINAL _term_buf;
-
-#ifndef __P
-#if defined(_USE_PROTOTYPES) && (defined(__STDC__) || defined(__cplusplus))
-#define __P(protos) protos /* full-blown ANSI C */
-#else
-#define __P(protos) () /* traditional C preprocessor */
-#endif
-#endif
-
-extern char *tparm __P((const char *, ...));
-extern int setupterm __P((char *, int, int *)), set_curterm __P((TERMINAL *));
-extern int del_curterm __P((TERMINAL *)), tputs __P((const char *, int, int (*)(int)));
-extern int putp __P((char *));
-extern int tigetflag __P((char *)), tigetnum __P((char *));
-extern char *tigetstr __P((char *));
-extern int def_prog_mode __P((void)), def_shell_mode __P((void));
-extern int reset_prog_mode __P((void)), reset_shell_mode __P((void));
-
-extern char *boolnames[], *boolcodes[], *boolfnames[];
-extern char *numnames[], *numcodes[], *numfnames[];
-extern char *strnames[], *strcodes[], *strfnames[];
-
-#ifndef OK
-#undef ERR
-#define OK (0)
-#define ERR (-1)
-#endif
-
-/* Compatibility */
-#define Filedes fd
-#define Ottyb shell_mode
-#define Nttyb prog_mode
-#define TTY struct termios
-
-#endif /* _TERM_H_ */
diff --git a/lib/libmytinfo/termcap.c b/lib/libmytinfo/termcap.c
deleted file mode 100644
index f914c0b..0000000
--- a/lib/libmytinfo/termcap.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * termcap.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/06/01 07:43:08
- *
- * termcap compatibility functions
- *
- */
-
-#include "defs.h"
-#include <term.h>
-#ifdef __FreeBSD__
-#include <unistd.h>
-#endif
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo termcap.c 3.3 92/06/01 public domain, By Ross Ridge";
-#endif
-
-extern char _mytinfo_version[];
-/* not static */
-char *_force_pick1 = _mytinfo_version;
-
-int
-tgetent(buf, term)
-char *term, *buf; {
- char *s;
- struct term_path *path;
- int r = -1;
- int fd;
-
- if (term == NULL)
- term = getenv("TERM");
- if (term == NULL)
- return 0;
-
- path = _buildpath(
-#ifdef USE_TERMINFO
- "$MYTERMINFO", 2,
- "$TERMINFO", 2,
-#ifdef TERMINFODIR
- TERMINFODIR, 0,
-#endif
-#ifdef TERMINFOSRC
- TERMINFOSRC, 0,
-#endif
-#endif
-#ifdef USE_TERMCAP
- "$TERMCAP", 1,
-#ifdef TERMCAPFILE
- TERMCAPFILE, 0,
-#endif
-#endif
- NULL, -1);
-
- if (path == NULL)
- return -1;
-
-#if 1
- {
- char buf1[MAX_BUF];
- r = _fillterm(term, path, buf1);
- }
-#else
- r = _fillterm(term, path, buf);
-#endif
-
- _delpath(path);
-
- switch(r) {
- case -3:
- case -2:
- case -1:
- return -1;
- case 0:
- return 0;
- case 1:
- case 2:
- case 3:
- if (isatty(1))
- fd = 1;
- else if (isatty(2))
- fd = 2;
- else if (isatty(3)) /* V10 /dev/tty ?? */
- fd = 3;
- else if (isatty(0))
- fd = 0;
- else
- fd = 1;
-
- cur_term->fd = fd;
- _term_buf.fd = fd;
-
- if (_init_tty() == ERR)
- return 0;
- if ((s = getenv("LINES")) != NULL && atoi(s) > 0)
- lines = atoi(s);
- if ((s = getenv("COLUMNS")) != NULL && atoi(s) > 0)
- columns = atoi(s);
- cur_term->termcap = 1;
- return 1;
- default:
- return -1;
- }
-}
-
-static char cap2[3];
-
-int
-tgetnum(cap)
-char *cap; {
- int ind;
-
- cap2[0] = cap[0];
- cap2[1] = cap[1];
- cap2[2] = '\0';
-
- ind = _findnumcode(cap2);
- if (ind == -1)
- return -1;
- return cur_term->nums[ind];
-}
-
-int
-tgetflag(cap)
-char *cap; {
- int ind;
-
- cap2[0] = cap[0];
- cap2[1] = cap[1];
- cap2[2] = '\0';
-
- ind = _findboolcode(cap2);
- if (ind == -1)
- return 0;
- return cur_term->bools[ind];
-}
-
-char *
-tgetstr(cap, area)
-char *cap;
-char **area; {
- register char *sp, *dp;
- int ind;
-
- cap2[0] = cap[0];
- cap2[1] = cap[1];
- cap2[2] = '\0';
-
- ind = _findstrcode(cap2);
- if (ind == -1)
- return NULL;
- sp = cur_term->strs[ind];
- if (area == NULL || sp == NULL)
- return sp;
- dp = *area;
- while (*sp != '\0')
- *dp++ = *sp++;
- *dp++ = '\0';
- sp = *area;
- *area = dp;
- return sp;
-}
diff --git a/lib/libmytinfo/terminfo.c b/lib/libmytinfo/terminfo.c
deleted file mode 100644
index 0568588..0000000
--- a/lib/libmytinfo/terminfo.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * terminfo.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:30
- *
- * terminfo compatible libary functions
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo terminfo.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-extern char _mytinfo_version[];
-/* not static */
-char *_force_pick2 = _mytinfo_version;
-
-#ifdef USE_FAKE_STDIO
-
-#ifdef __GNUC__
-__inline__
-#endif
-static int
-printerr(msg)
-char *msg; {
- return write(2, msg, strlen(msg));
-}
-
-#define RETERR(e, msg) { (err == NULL ? (printerr(msg), exit(1)) \
- : (*err = e)); return ERR; }
-
-#else
-
-#define RETERR(e, msg) { (err == NULL ? (fprintf(stderr, "setupterm(\"%s\",%d,NULL): %s", term, fd, msg), exit(1)) \
- : (*err = e)); return ERR; }
-
-#endif
-
-int
-setupterm(term, fd, err)
-char *term;
-int fd;
-int *err; {
- struct term_path *path;
- char *s;
- int r = -1;
- char buf[MAX_BUF];
-
-
- if (term == NULL)
- term = getenv("TERM");
- if (term == NULL)
- RETERR(0, "TERM not set\n")
-
- path = _buildpath(
-#ifdef USE_TERMINFO
- "$MYTERMINFO", 2,
- "$TERMINFO", 2,
-#ifdef TERMINFODIR
- TERMINFODIR, 0,
-#endif
-#ifdef TERMINFOSRC
- TERMINFOSRC, 0,
-#endif
-#endif
-#ifdef USE_TERMCAP
- "$TERMCAP", 1,
-#ifdef TERMCAPFILE
- TERMCAPFILE, 0,
-#endif
-#endif
- NULL, -1);
-
- if (path == NULL)
- RETERR(0, "malloc error\n");
-
- r = _fillterm(term, path, buf);
-
- _delpath(path);
-
- switch(r) {
- case -3:
- RETERR(0, "malloc error\n");
- case -2:
- RETERR(-1, "bad format\n");
- case -1:
- RETERR(-1, "database not found\n");
- case 0:
- RETERR(0, "terminal not found\n");
- case 1:
- case 2:
- case 3:
- cur_term->fd = fd;
- _term_buf.fd = fd;
- if (_init_tty() == ERR)
- RETERR(0, "problem initializing tty\n");
- if ((s = getenv("LINES")) != NULL && atoi(s) > 0)
- lines = atoi(s);
- if ((s = getenv("COLUMNS")) != NULL && atoi(s) > 0)
- columns = atoi(s);
- if (err != NULL)
- *err = 1;
- return OK;
- default:
- RETERR(0, "oops...\n");
- }
-}
-
-int
-set_curterm(p)
-TERMINAL *p; {
- cur_term = p;
- if (_init_tty() == ERR)
- return ERR;
- if (_check_tty() == ERR)
- return ERR;
- return OK;
-}
-
-int
-del_curterm(p)
-TERMINAL *p; {
- _del_strs(p);
- free((anyptr) p);
-
- return OK;
-}
diff --git a/lib/libmytinfo/tgoto.c b/lib/libmytinfo/tgoto.c
deleted file mode 100644
index 1bc735b..0000000
--- a/lib/libmytinfo/tgoto.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * tgoto.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:33
- *
- * A few kludged attempts to worry outputing ^D's and NL's...
- * My advice is to get a decent terminal.
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo tgoto.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-#ifdef USE_LITOUT_KLUDGE
-
-/*
- * This kludge works by telling tputs to switch the tty driver to
- * "literal output" when printing the string so we don't have worry
- * about newlines and EOTs. The problem is that ioctls used to
- * switch modes might flush buffers and cause other problems.
- */
-
-
-char *
-tgoto(str, x, y)
-char *str;
-int x,y; {
- register char *sp;
-
- static char buf[MAX_LINE] = {'\\', '@'};
-
- sp = str = tparm(str, y, x);
-
- while (*sp != '\0') {
- if (*sp == '\004' || *sp == '\n') {
- strncpy(buf + 2, str, MAX_LINE - 2);
- buf[MAX_LINE - 2] = '\0';
- return buf;
- }
- sp++;
- }
- return sp;
-}
-#else
-
-#ifdef USE_UPBC_KLUDGE
-
-#ifdef USE_EXTERN_UPBC
-extern char *BC, *UP;
-#else
-#define BC cursor_left
-#define UP cursor_right
-#endif
-
-#ifdef __GNUC__
-__inline__
-#endif
-static int
-checkit(s)
-register char *s; {
- while(*s != '\0') {
- if (*s == '\004' || *s == '\n')
- return 1;
- s++;
- }
- return 0;
-}
-
-/*
- * Major kludge, basically we just change the parmeters until we get
- * a string that doesn't contain a newline or EOT.
- */
-
-char *
-tgoto(str, x, y)
-char *str;
-int x,y; {
- static char buf[MAX_LINE];
- register char *orig, *s;
- int l;
-
- orig = tparm(str, y, x);
-
- if (!checkit(orig))
- return orig;
-
- s = tparm(str, y + 1, x);
-
- if (!checkit(s)) {
- if (BC == NULL)
- return s;
- l = strlen(s);
- strncpy(buf, s, MAX_LINE - 1);
- if (l < MAX_LINE - 1)
- strncpy(buf + l, BC, MAX_LINE - 1 - l);
- return s;
- }
-
- s = tparm(str, y, x + 1);
-
- if (!checkit(s)) {
- if (UP == NULL)
- return s;
- l = strlen(s);
- strncpy(buf, s, MAX_LINE - 1);
- if (l < MAX_LINE - 1)
- strncpy(buf + l, UP, MAX_LINE - 1 - l);
- return s;
- }
-
- s = tparm(str, y + 1, x + 1);
-
- if (!checkit(s)) {
- if (UP == NULL || BC == NULL)
- return s;
- l = strlen(s);
- strncpy(buf, s, MAX_LINE - 1);
- if (l < MAX_LINE - 1)
- strncpy(buf + l, UP, MAX_LINE - 1 - l);
- l += strlen(UP);
- if (l < MAX_LINE - 1)
- strncpy(buf + l, BC, MAX_LINE - 1 - l);
- return s;
- }
-
- return orig;
-}
-
-#else
-
-/* the simple tgoto, don't worry about any of this newline/EOT crap */
-
-char *
-tgoto(str, x, y)
-char *str;
-int x,y; {
- return tparm(str, y, x);
-}
-
-#endif
-
-#endif
diff --git a/lib/libmytinfo/tiget.c b/lib/libmytinfo/tiget.c
deleted file mode 100644
index e312422..0000000
--- a/lib/libmytinfo/tiget.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * tiget.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:34
- *
- * The various tiget terminfo functions.
- */
-
-#include "defs.h"
-#include <term.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo tiget.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-int
-tigetnum(cap)
-char *cap; {
- int ind;
-
- ind = _findnumname(cap);
- if (ind == -1)
- return -2;
- return cur_term->nums[ind];
-}
-
-int
-tigetflag(cap)
-char *cap; {
- int ind;
-
- ind = _findboolname(cap);
- if (ind == -1)
- return -1;
- return cur_term->bools[ind];
-}
-
-char *
-tigetstr(cap)
-char *cap; {
- int ind;
-
- ind = _findstrname(cap);
- if (ind == -1)
- return (char *) -1;
- return cur_term->strs[ind];
-}
-
-
diff --git a/lib/libmytinfo/tmatch.c b/lib/libmytinfo/tmatch.c
deleted file mode 100644
index afccda7..0000000
--- a/lib/libmytinfo/tmatch.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * tmatch.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:35
- *
- * See if a terminal name matches a list of terminal names from a
- * terminal description
- *
- */
-
-#include "defs.h"
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo tmatch.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-int
-_tmatch(line, name)
-char *line, *name; {
- char term[MAX_LINE];
- char *sp, *dp;
-
- sp = line;
- while (*sp != '\0') {
- dp = term;
- while (*sp != '\0' && *sp != '|')
- *dp++ = *sp++;
- *dp = '\0';
- if (strcmp(term, name) == 0)
- return 1;
- if (*sp == '|')
- sp++;
- }
- return 0;
-}
diff --git a/lib/libmytinfo/tparm.c b/lib/libmytinfo/tparm.c
deleted file mode 100644
index 0cc2c89..0000000
--- a/lib/libmytinfo/tparm.c
+++ /dev/null
@@ -1,807 +0,0 @@
-/*
- * tparm.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:36
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#include <ctype.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo tparm.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-#ifndef MAX_PUSHED
-#define MAX_PUSHED 32
-#endif
-
-#define ARG 1
-#define NUM 2
-
-#define INTEGER 1
-#define STRING 2
-
-typedef struct stack_str {
- int type;
- int argnum;
- int value;
-} stack;
-
-static stack S[MAX_PUSHED];
-static stack vars['z'-'a'+1];
-static int pos = 0;
-
-static struct arg_str {
- int type;
- int integer;
- char *string;
-} arg_list[10];
-
-static int argcnt;
-
-static va_list tparm_args;
-
-static int
-pusharg(arg)
-int arg; {
- if (pos == MAX_PUSHED)
- return 1;
- S[pos].type = ARG;
- S[pos++].argnum = arg;
- return 0;
-}
-
-static int
-pushnum(num)
-int num; {
- if (pos == MAX_PUSHED)
- return 1;
- S[pos].type = NUM;
- S[pos++].value = num;
- return 0;
-}
-
-/* VARARGS2 */
-static int
-getarg(argnum, type, p)
-int argnum, type;
-anyptr p; {
- while (argcnt < argnum) {
- arg_list[argcnt].type = INTEGER;
- arg_list[argcnt++].integer = (int) va_arg(tparm_args, int);
- }
- if (argcnt > argnum) {
- if (arg_list[argnum].type != type)
- return 1;
- else if (type == STRING)
- *(char **)p = arg_list[argnum].string;
- else
- *(int *)p = arg_list[argnum].integer;
- } else {
- arg_list[argcnt].type = type;
- if (type == STRING)
- *(char **)p = arg_list[argcnt++].string
- = (char *) va_arg(tparm_args, char *);
- else
- *(int *)p = arg_list[argcnt++].integer = (int) va_arg(tparm_args, int);
- }
- return 0;
-}
-
-
-static int
-popstring(str)
-char **str; {
- if (pos-- == 0)
- return 1;
- if (S[pos].type != ARG)
- return 1;
- return(getarg(S[pos].argnum, STRING, (anyptr) str));
-}
-
-static int
-popnum(num)
-int *num; {
- if (pos-- == 0)
- return 1;
- switch (S[pos].type) {
- case ARG:
- return (getarg(S[pos].argnum, INTEGER, (anyptr) num));
- case NUM:
- *num = S[pos].value;
- return 0;
- }
- return 1;
-}
-
-static int
-cvtchar(sp, c)
-register char *sp, *c; {
- switch(*sp) {
- case '\\':
- switch(*++sp) {
- case '\'':
- case '$':
- case '\\':
- case '%':
- *c = *sp;
- return 2;
- case '\0':
- *c = '\\';
- return 1;
- case '0':
- if (sp[1] == '0' && sp[2] == '0') {
- *c = '\0';
- return 4;
- }
- *c = '\200'; /* '\0' ???? */
- return 2;
- default:
- *c = *sp;
- return 2;
- }
- default:
- *c = *sp;
- return 1;
- }
-}
-
-static int termcap;
-
-/* sigh... this has got to be the ugliest code I've ever written.
- Trying to handle everything has its cost, I guess.
-
- It actually isn't to hard to figure out if a given % code is supposed
- to be interpeted with its termcap or terminfo meaning since almost
- all terminfo codes are invalid unless something has been pushed on
- the stack and termcap strings will never push things on the stack
- (%p isn't used by termcap). So where we have a choice we make the
- decision by wether or not somthing has been pushed on the stack.
- The static variable termcap keeps track of this; it starts out set
- to 1 and is incremented as each argument processed by a termcap % code,
- however if something is pushed on the stack it's set to 0 and the
- rest of the % codes are interpeted as terminfo % codes. Another way
- of putting it is that if termcap equals one we haven't decided either
- way yet, if it equals zero we're looking for terminfo codes, and if
- its greater than 1 we're looking for termcap codes.
-
- Terminfo % codes:
-
- %% output a '%'
- %[[:][-+# ][width][.precision]][doxXs]
- output pop according to the printf format
- %c output pop as a char
- %'c' push character constant c.
- %{n} push decimal constant n.
- %p[1-9] push paramter [1-9]
- %g[a-z] push variable [a-z]
- %P[a-z] put pop in variable [a-z]
- %l push the length of pop (a string)
- %+ add pop to pop and push the result
- %- subtract pop from pop and push the result
- %* multiply pop and pop and push the result
- %& bitwise and pop and pop and push the result
- %| bitwise or pop and pop and push the result
- %^ bitwise xor pop and pop and push the result
- %~ push the bitwise not of pop
- %= compare if pop and pop are equal and push the result
- %> compare if pop is less than pop and push the result
- %< compare if pop is greater than pop and push the result
- %A logical and pop and pop and push the result
- %O logical or pop and pop and push the result
- %! push the logical not of pop
- %? condition %t if_true [%e if_false] %;
- if condtion evaulates as true then evaluate if_true,
- else evaluate if_false. elseif's can be done:
-%? cond %t true [%e cond2 %t true2] ... [%e condN %t trueN] [%e false] %;
- %i add one to parameters 1 and 2. (ANSI)
-
- Termcap Codes:
-
- %% output a %
- %. output parameter as a character
- %d output parameter as a decimal number
- %2 output parameter in printf format %02d
- %3 output parameter in printf format %03d
- %+x add the character x to parameter and output it as a character
-(UW) %-x subtract parameter FROM the character x and output it as a char
-(UW) %ax add the character x to parameter
-(GNU) %a[+*-/=][cp]x
- GNU arithmetic.
-(UW) %sx subtract parameter FROM the character x
- %>xy if parameter > character x then add character y to parameter
- %B convert to BCD (parameter = (parameter/10)*16 + parameter%16)
- %D Delta Data encode (parameter = parameter - 2*(paramter%16))
- %i increment the first two parameters by one
- %n xor the first two parameters by 0140
-(GNU) %m xor the first two parameters by 0177
- %r swap the first two parameters
-(GNU) %b backup to previous parameter
-(GNU) %f skip this parameter
-
- Note the two definitions of %a, the GNU defintion is used if the characters
- after the 'a' are valid, otherwise the UW definition is used.
-
- (GNU) used by GNU Emacs termcap libraries
- (UW) used by the University of Waterloo (MFCF) termcap libraries
-
-*/
-
-#ifdef lint
-/* VARARGS1 */
-char *
-tparm(str)
-char *str; {
-#else /* lint */
-#ifdef USE_STDARG
-#ifdef USE_PROTOTYPES
-char *tparm(const char *str, ...) {
-#else /* USE_PROTOTYPES */
-char *tparm(str)
-char *str; {
-#endif /* USE_PROTOTYPES */
-#else /* USE_STDARG */
-char *tparm(va_alist)
-va_dcl {
- char *str;
-#endif
-#endif
- static char OOPS[] = "OOPS";
- static char buf[MAX_LINE];
- register char *dp;
- register char *fmt;
- const char *sp;
- char conv_char;
- char scan_for;
- int scan_depth = 0, if_depth;
- static int i, j;
- static char *s, c;
- char fmt_buf[MAX_LINE];
- char sbuf[MAX_LINE];
-
-#ifdef USE_STDARG
- va_start(tparm_args, str);
-#else
- va_start(tparm_args);
- str = (char *) va_arg(tparm_args, char *);
-#endif
-
- sp = str;
- dp = buf;
- scan_for = 0;
- if_depth = 0;
- argcnt = 0;
- pos = 0;
- termcap = 1;
- while(*sp != '\0') {
- switch(*sp) {
- case '\\':
- if (scan_for) {
- if (*++sp != '\0')
- sp++;
- break;
- }
- *dp++ = *sp++;
- if (*sp != '\0')
- *dp++ = *sp++;
- break;
- case '%':
- sp++;
- if (scan_for) {
- if (*sp == scan_for && if_depth == scan_depth) {
- if (scan_for == ';')
- if_depth--;
- scan_for = 0;
- } else if (*sp == '?')
- if_depth++;
- else if (*sp == ';') {
- if (if_depth == 0)
- return OOPS;
- else
- if_depth--;
- }
- sp++;
- break;
- }
- fmt = NULL;
- switch(*sp) {
- case '%':
- *dp++ = *sp++;
- break;
- case '+':
- if (!termcap) {
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i += j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- }
- ;/* FALLTHROUGH */
- case 'C':
- if (*sp == 'C') {
- if (getarg(termcap - 1, INTEGER, &i))
- return OOPS;
- if (i >= 96) {
- i /= 96;
- if (i == '$')
- *dp++ = '\\';
- *dp++ = i;
- }
- }
- fmt = "%c";
- /* FALLTHROUGH */
- case 'a':
- if (!termcap)
- return OOPS;
- if (getarg(termcap - 1, INTEGER, (anyptr) &i))
- return OOPS;
- if (*++sp == '\0')
- return OOPS;
- if ((sp[1] == 'p' || sp[1] == 'c')
- && sp[2] != '\0' && fmt == NULL) {
- /* GNU aritmitic parameter, what they
- realy need is terminfo. */
- int val, lc;
- if (sp[1] == 'p'
- && getarg(termcap - 1 + sp[2] - '@',
- INTEGER, (anyptr) &val))
- return OOPS;
- if (sp[1] == 'c') {
- lc = cvtchar(sp + 2, &c) + 2;
- /* Mask out 8th bit so \200 can be
- used for \0 as per GNU doc's */
- val = c & 0177;
- } else
- lc = 2;
- switch(sp[0]) {
- case '=':
- break;
- case '+':
- val = i + val;
- break;
- case '-':
- val = i - val;
- break;
- case '*':
- val = i * val;
- break;
- case '/':
- val = i / val;
- break;
- default:
- /* Not really GNU's %a after all... */
- lc = cvtchar(sp, &c);
- val = c + i;
- break;
- }
- arg_list[termcap - 1].integer = val;
- sp += lc;
- break;
- }
- sp += cvtchar(sp, &c);
- arg_list[termcap - 1].integer = c + i;
- if (fmt == NULL)
- break;
- sp--;
- /* FALLTHROUGH */
- case '-':
- if (!termcap) {
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i -= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- }
- fmt = "%c";
- /* FALLTHROUGH */
- case 's':
- if (termcap && (fmt == NULL || *sp == '-')) {
- if (getarg(termcap - 1, INTEGER, &i))
- return OOPS;
- if (*++sp == '\0')
- return OOPS;
- sp += cvtchar(sp, &c);
- arg_list[termcap - 1].integer = c - i;
- if (fmt == NULL)
- break;
- sp--;
- }
- if (!termcap)
- return OOPS;
- ;/* FALLTHROUGH */
- case '.':
- if (termcap && fmt == NULL)
- fmt = "%c";
- ;/* FALLTHROUGH */
- case 'd':
- if (termcap && fmt == NULL)
- fmt = "%d";
- ;/* FALLTHROUGH */
- case '2':
- if (termcap && fmt == NULL)
- fmt = "%02d";
- ;/* FALLTHROUGH */
- case '3':
- if (termcap && fmt == NULL)
- fmt = "%03d";
- ;/* FALLTHROUGH */
- case ':': case ' ': case '#': case 'u':
- case 'x': case 'X': case 'o': case 'c':
- case '0': case '1': case '4': case '5':
- case '6': case '7': case '8': case '9':
- if (fmt == NULL) {
- if (termcap)
- return OOPS;
- if (*sp == ':')
- sp++;
- fmt = fmt_buf;
- *fmt++ = '%';
- while(*sp != 's' && *sp != 'x' && *sp != 'X' && *sp != 'd' && *sp != 'o' && *sp != 'c' && *sp != 'u') {
- if (*sp == '\0')
- return OOPS;
- *fmt++ = *sp++;
- }
- *fmt++ = *sp;
- *fmt = '\0';
- fmt = fmt_buf;
- }
- conv_char = fmt[strlen(fmt) - 1];
- if (conv_char == 's') {
- if (popstring(&s))
- return OOPS;
- sprintf(sbuf, fmt, s);
- } else {
- if (termcap) {
- if (getarg(termcap++ - 1,
- INTEGER, &i))
- return OOPS;
- } else
- if (popnum(&i))
- return OOPS;
- if (i == 0 && conv_char == 'c')
- strcpy(sbuf, "\000");
- else
- sprintf(sbuf, fmt, i);
- }
- sp++;
- fmt = sbuf;
- while(*fmt != '\0') {
- if (*fmt == '$')
- *dp++ = '\\';
- *dp++ = *fmt++;
- }
- break;
- case 'r':
- if (!termcap || getarg(1, INTEGER, &i))
- return OOPS;
- arg_list[1].integer = arg_list[0].integer;
- arg_list[0].integer = i;
- sp++;
- break;
- case 'i':
- if (getarg(1, INTEGER, &i)
- || arg_list[0].type != INTEGER)
- return OOPS;
- arg_list[1].integer++;
- arg_list[0].integer++;
- sp++;
- break;
- case 'n':
- if (!termcap || getarg(1, INTEGER, &i))
- return OOPS;
- arg_list[0].integer ^= 0140;
- arg_list[1].integer ^= 0140;
- sp++;
- break;
- case '>':
- if (!termcap) {
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i > j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- }
- if (getarg(termcap-1, INTEGER, &i))
- return OOPS;
- sp += cvtchar(sp, &c);
- if (i > c) {
- sp += cvtchar(sp, &c);
- arg_list[termcap-1].integer += c;
- } else
- sp += cvtchar(sp, &c);
- sp++;
- break;
- case 'B':
- if (!termcap || getarg(termcap-1, INTEGER, &i))
- return OOPS;
- arg_list[termcap-1].integer = 16*(i/10)+i%10;
- sp++;
- break;
- case 'D':
- if (!termcap || getarg(termcap-1, INTEGER, &i))
- return OOPS;
- arg_list[termcap-1].integer = i - 2 * (i % 16);
- sp++;
- break;
- case 'p':
- if (termcap > 1)
- return OOPS;
- if (*++sp == '\0')
- return OOPS;
- if (*sp == '0')
- i = 9;
- else
- i = *sp - '1';
- if (i < 0 || i > 9)
- return OOPS;
- if (pusharg(i))
- return OOPS;
- termcap = 0;
- sp++;
- break;
- case 'P':
- if (termcap || *++sp == '\0')
- return OOPS;
- i = *sp++ - 'a';
- if (i < 0 || i > 25)
- return OOPS;
- if (pos-- == 0)
- return OOPS;
- switch(vars[i].type = S[pos].type) {
- case ARG:
- vars[i].argnum = S[pos].argnum;
- break;
- case NUM:
- vars[i].value = S[pos].value;
- break;
- }
- break;
- case 'g':
- if (termcap || *++sp == '\0')
- return OOPS;
- i = *sp++ - 'a';
- if (i < 0 || i > 25)
- return OOPS;
- switch(vars[i].type) {
- case ARG:
- if (pusharg(vars[i].argnum))
- return OOPS;
- break;
- case NUM:
- if (pushnum(vars[i].value))
- return OOPS;
- break;
- }
- break;
- case '\'':
- if (termcap > 1)
- return OOPS;
- if (*++sp == '\0')
- return OOPS;
- sp += cvtchar(sp, &c);
- if (pushnum(c) || *sp++ != '\'')
- return OOPS;
- termcap = 0;
- break;
- case '{':
- if (termcap > 1)
- return OOPS;
- i = 0;
- sp++;
- while(isdigit(*sp))
- i = 10 * i + *sp++ - '0';
- if (*sp++ != '}' || pushnum(i))
- return OOPS;
- termcap = 0;
- break;
- case 'l':
- if (termcap || popstring(&s))
- return OOPS;
- i = strlen(s);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '*':
- if (termcap || popnum(&j) || popnum(&i))
- return OOPS;
- i *= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '/':
- if (termcap || popnum(&j) || popnum(&i))
- return OOPS;
- i /= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case 'm':
- if (termcap) {
- if (getarg(1, INTEGER, &i))
- return OOPS;
- arg_list[0].integer ^= 0177;
- arg_list[1].integer ^= 0177;
- sp++;
- break;
- }
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i %= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '&':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i &= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '|':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i |= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '^':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i ^= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '=':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i == j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '<':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i < j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case 'A':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i && j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case 'O':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i || j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '!':
- if (popnum(&i))
- return OOPS;
- i = !i;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '~':
- if (popnum(&i))
- return OOPS;
- i = ~i;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '?':
- if (termcap > 1)
- return OOPS;
- termcap = 0;
- if_depth++;
- sp++;
- break;
- case 't':
- if (popnum(&i) || if_depth == 0)
- return OOPS;
- if (!i) {
- scan_for = 'e';
- scan_depth = if_depth;
- }
- sp++;
- break;
- case 'e':
- if (if_depth == 0)
- return OOPS;
- scan_for = ';';
- scan_depth = if_depth;
- sp++;
- break;
- case ';':
- if (if_depth-- == 0)
- return OOPS;
- sp++;
- break;
- case 'b':
- if (--termcap < 1)
- return OOPS;
- sp++;
- break;
- case 'f':
- if (!termcap++)
- return OOPS;
- sp++;
- break;
- }
- break;
- default:
- if (scan_for)
- sp++;
- else
- *dp++ = *sp++;
- break;
- }
- }
- va_end(tparm_args);
- *dp = '\0';
- return buf;
-}
-
-#ifdef TEST
-
-void
-putch(c)
-char c; {
- if (c < 0) {
- printf("\\%03o", c);
- } else if (c < 32) {
- printf("^%c", c + '@');
- } else if (c == 127) {
- printf("^?");
- } else {
- putchar(c);
- }
-}
-
-char line[MAX_LINE];
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- register char *sp;
- putchar('\n');
-
- while(fgets(line, sizeof(line), stdin) != NULL) {
- line[strlen(line)-1] = '\0';
- sp = tparm(line, 1, -2, 30, 0, "bob was here");
- while(*sp)
- putch(*sp++);
- putchar('\n');
- }
- return 0;
-}
-#endif
diff --git a/lib/libmytinfo/tputs.c b/lib/libmytinfo/tputs.c
deleted file mode 100644
index 840b3c8..0000000
--- a/lib/libmytinfo/tputs.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * tputs.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/06/04 11:41:15
- *
- * Output a terminal capability string with any needed padding
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#include <ctype.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo tputs.c 3.3 92/06/04 public domain, By Ross Ridge";
-#endif
-
-#ifdef TEST
-#define def_prog_mode() (OK)
-#define _norm_output() ((void)(0))
-#define _lit_output() (1)
-#endif
-
-/*
- * BITSPERCHAR (as actually transmitted over a serial line) is usually 10
- * (not 8). 1 stop bit, 1 start bit, 7 data bits, and one parity bit.
- */
-
-#define BITSPERCHAR 10
-
-#ifdef USE_FAKE_STDIO
-#undef putchar
-#endif
-
-#ifdef USE_PROTOTYPES
-#define PUTCHAR(c) (outc == (int (*)(int)) NULL ? (putchar(c)):(*outc)(c))
-#else
-#define PUTCHAR(c) (outc == (int (*)()) NULL ? (putchar(c)):(*outc)(c))
-#endif
-
-int
-tputs(sp, count, outc)
-register const char *sp;
-int count;
-#ifdef USE_PROTOTYPES
-register int (*outc)(int);
-#else
-register int (*outc)();
-#endif
-{
- register int l;
- register long cnt;
- int must_pad, multiply_pad;
- int forced_lit = 0;
-
- /* some programmes expect this behaviour from tputs */
- if (sp == NULL) {
-#ifdef DEBUG
- fprintf(stderr, "tputs: NULL\n");
-#endif
- return 0;
- }
-
- if (cur_term->termcap) {
- _figure_termcap();
- }
-
- while(*sp != '\0') {
- switch(*sp) {
- case '\\':
- switch(*++sp) {
- case 'n': PUTCHAR('\n'); sp++; break;
- case 'b': PUTCHAR('\b'); sp++; break;
- case 't': PUTCHAR('\t'); sp++; break;
- case 'r': PUTCHAR('\r'); sp++; break;
- case 'f': PUTCHAR('\f'); sp++; break;
- case 'l': PUTCHAR('\012'); sp++; break;
- case 's': PUTCHAR(' '); sp++; break;
- case 'e': case 'E': PUTCHAR('\033'); sp++; break;
-
- case '^':
- case '\\':
- case ',':
- case ':':
- case '\'':
- case '$':
- PUTCHAR(*sp++);
- break;
-
- case '0':
- if (*(sp + 1) < '0' || *(sp + 1) > '7') {
- PUTCHAR('\200'); /* I'd prefer \0 */
- sp++;
- break;
- }
- ;/* FALLTHROUGH */
- case '1': case '2': case '3': case '4':
- case '5': case '6': case '7':
- l = *sp++ - '0';
- if (*sp >= '0' && *sp <= '7') {
- l = l * 8 + (*sp++ - '0');
- if (*sp >= '0' && *sp <= '7')
- l = l * 8 + (*sp++ - '0');
- }
- PUTCHAR(l);
- break;
-
- case '\0':
- PUTCHAR('\\');
- break;
-
- case '@':
- if (!forced_lit)
- forced_lit = _lit_output();
- sp++;
- break;
-
- default:
- PUTCHAR('\\');
- PUTCHAR(*sp++);
- break;
- }
- break;
- case '^':
- if (*++sp == '\0')
- break;
- l = *sp - '@';
- if (l > 31)
- l -= 32;
- if (l < 0 || l > 31) {
- PUTCHAR('^');
- PUTCHAR(*sp++);
- } else {
- PUTCHAR(l);
- sp++;
- }
- break;
- case '$':
- if (*++sp != '<') {
- PUTCHAR('$');
- break;
- }
- must_pad = 0;
- multiply_pad = 0;
- l = 0;
- sp++;
- while (isdigit(*sp))
- l = l * 10 + (*sp++ - '0');
- l *= 10;
- if (*sp == '.') {
- sp++;
- if (isdigit(*sp))
- l += *sp++ - '0';
- }
- if (*sp == '/') {
- must_pad = 1;
- if (*++sp == '*') {
- multiply_pad = 1;
- sp++;
- }
- } else if (*sp == '*') {
- multiply_pad = 1;
- if (*++sp == '/') {
- must_pad = 1;
- sp++;
- }
- }
- if (*sp != '>') {
- PUTCHAR('p');
- PUTCHAR('a');
- PUTCHAR('d');
- PUTCHAR('?');
- break;
- }
- sp++;
-#ifdef TEST
- printf("\nl = %d", l);
-#endif
- if (cur_term->pad || must_pad) {
- cnt = ((long) l * cur_term->baudrate
- * (multiply_pad ? count : 1)
- + (10000L * BITSPERCHAR / 2L))
- / (10000L * BITSPERCHAR);
-#ifdef TEST
- printf("; cnt = %ld\n", cnt);
-#endif
- while(cnt--)
- PUTCHAR(cur_term->padch);
- }
-#ifdef TEST
- printf("\n");
-#endif
- break;
- default:
- PUTCHAR(*sp++);
- }
- }
- if (forced_lit)
- _norm_output();
- return OK;
-}
-
-int
-putp(str)
-char *str; {
-#ifdef USE_PROTOTYPES
- return(tputs(str, 1,(int (*)(int)) NULL));
-#else
- return(tputs(str, 1,(int (*)()) NULL));
-#endif
-}
-
-#ifdef TEST
-
-TERMINAL test_term, *cur_term = &test_term;
-
-int
-#ifdef USE_PROTOTYPES
-putch(char c)
-#else
-putch(c)
-char c;
-#endif
-{
- if (c & 0x80) {
- printf("\\%03o", c);
- } else if (c < 32) {
- printf("^%c", c + '@');
- } else if (c == 127) {
- printf("^?");
- } else {
- putchar(c);
- }
- return 0;
-}
-
-char line[MAX_LINE];
-
-int
-main(argc, argv)
-int argc;
-char **argv; {
- test_term.termcap = 0;
- test_term.baudrate = 1200;
- test_term.pad = 0;
- test_term.padch = 0;
- if (argc > 1)
- test_term.baudrate = atoi(argv[1]);
- if (argc > 2)
- test_term.padch = argv[2][0];
- if (argc > 3)
- test_term.pad = 1;
-
- putchar('\n');
-
- while(fgets(line, sizeof(line), stdin) != NULL) {
- line[strlen(line)-1] = '\0';
- tputs(line, 7, putch);
- putchar('\n');
- }
- return 0;
-}
-#endif
diff --git a/lib/libmytinfo/tty.c b/lib/libmytinfo/tty.c
deleted file mode 100644
index 2ba2a7c..0000000
--- a/lib/libmytinfo/tty.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * tty.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:49
- *
- * Do some tty related things
- *
- */
-
-#include "defs.h"
-#include <term.h>
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo tty.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-#ifndef EXTA_IS
-#define EXTA_IS 19200
-#endif
-
-#ifndef EXTB_IS
-#define EXTB_IS 38400
-#endif
-
-#ifdef lint
-#define ioctl _ioctl
-/* shutup lint */
-/* ARGSUSED */
-/* VARARGS1 */
-static int ioctl(a, b, p) int a; long b; anyptr *p; { return 0; }
-#endif
-
-#if defined(USE_TERMIO) || defined(USE_TERMIOS)
-
-#ifdef USE_TERMIOS
-speed_t _baud_tbl[] = {0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800,
- 2400, 4800, 9600, EXTA_IS, EXTB_IS
-#ifdef B57600
- ,57600
-#endif
-#ifdef B115200
- ,115200
-#endif
- };
-#else
-#ifdef USE_SMALLMEM
-unsigned short _baud_tbl[] = {0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
- 1800, 2400, 4800, 9600, EXTA_IS, EXTB_IS};
-#else
-long _baud_tbl[] = {0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800,
- 2400, 4800, 9600, EXTA_IS, EXTB_IS};
-#endif
-#endif
-
-#ifdef USE_TERMIO
-static struct termio old;
-#else
-static struct termios old;
-#endif
-
-int
-_lit_output() {
-#ifdef USE_TERMIO
- struct termio tmp;
- if (ioctl(cur_term->fd, TCGETA, &old) == -1)
- return 0;
-#else
- struct termios tmp;
- if (tcgetattr(cur_term->fd, &old) == -1)
- return 0;
-#endif
- if (!(old.c_oflag & OPOST) || !(old.c_oflag & ONLCR))
- return 0;
- memcpy((anyptr)&tmp, (anyptr)&old, sizeof(old));
- tmp.c_oflag &= ~OPOST;
-#ifdef USE_TERMIO
- ioctl(cur_term->fd, TCSETA, &tmp);
-#else
- tcsetattr(cur_term->fd, TCSADRAIN, &tmp);
-#endif
- return 1;
-}
-
-void
-_norm_output() {
-#ifdef USE_TERMIO
- ioctl(cur_term->fd, TCSETA, &old);
-#else
- tcsetattr(cur_term->fd, TCSADRAIN, &old);
-#endif
-}
-
-int
-_check_tty() {
- if ((cur_term->prog_mode.c_iflag & IXON) && cur_term->xon)
- cur_term->pad = 0;
- else
- cur_term->pad = 1;
-#ifdef USE_TERMIO
- cur_term->baudrate = _baud_tbl[cur_term->prog_mode.c_cflag & CBAUD];
-#else
- cur_term->baudrate = cfgetospeed(&cur_term->prog_mode);
-#endif
- return OK;
-}
-
-int
-def_prog_mode() {
-#ifdef USE_WINSZ
-#ifdef TIOCGWINSZ
- if (ioctl(cur_term->fd, TIOCGWINSZ, &cur_term->prog_winsz) < 0)
- return ERR;
-#endif
-#endif
-#ifdef USE_TERMIO
- if (ioctl(cur_term->fd, TCGETA, &cur_term->prog_mode) == 0
-#else
- if (tcgetattr(cur_term->fd, &cur_term->prog_mode) == 0
-#endif
- && _check_tty() == OK)
- return OK;
- return ERR;
-}
-
-int
-def_shell_mode() {
- cur_term->termcap = 0;
-#ifdef USE_WINSZ
-#ifdef TIOCGWINSZ
- if (ioctl(cur_term->fd, TIOCGWINSZ, &cur_term->shell_winsz) < 0)
- return ERR;
-#endif
-#endif
-#ifdef USE_TERMIO
- return ioctl(cur_term->fd, TCGETA, &cur_term->shell_mode)==0 ? OK : ERR;
-#else
- return tcgetattr(cur_term->fd, &cur_term->shell_mode)==0 ? OK : ERR;
-#endif
-}
-
-int
-reset_prog_mode() {
-#ifdef USE_TERMIO
- return ioctl(cur_term->fd, TCSETA, &cur_term->prog_mode)==0 ? OK : ERR;
-#else
- return tcsetattr(cur_term->fd, TCSADRAIN, &cur_term->prog_mode)==0 ? OK : ERR;
-#endif
-}
-
-int
-reset_shell_mode() {
-#ifdef USE_TERMIO
- return ioctl(cur_term->fd, TCSETA, &cur_term->shell_mode)==0 ? OK : ERR;
-#else
- return tcsetattr(cur_term->fd, TCSADRAIN, &cur_term->shell_mode)==0 ? OK : ERR;
-#endif
-}
-
-int
-_init_tty() {
- cur_term->true_lines = lines;
- cur_term->true_columns = columns;
- if (pad_char == NULL)
- cur_term->padch = '\000';
- else
- cur_term->padch = pad_char[0];
- if (def_shell_mode() == ERR || def_prog_mode() == ERR) {
- cur_term->pad = 0;
- cur_term->baudrate = 1;
- cur_term->xon = 0;
- return OK;
- }
- cur_term->xon = (xoff_character == NULL || xoff_character[0] == '\021')
- && (xon_character == NULL || xon_character[0] == '\023')
- && xon_xoff;
-#ifdef USE_WINSZ
-#ifdef TIOCGWINSZ
- if (cur_term->prog_winsz.ws_row != 0
- && cur_term->prog_winsz.ws_col != 0) {
- lines = cur_term->prog_winsz.ws_row;
- columns = cur_term->prog_winsz.ws_col;
- }
-#endif
-#endif
- return OK;
-}
-
-#else
-
-#ifdef USE_SGTTY
-
-#ifdef USE_SMALLMEM
-unsigned short _baud_tbl[] = {0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
- 1800, 2400, 4800, 9600, EXTA_IS, EXTB_IS};
-#else
-long _baud_tbl[] = {0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
- 1800, 2400, 4800, 9600, EXTA_IS, EXTB_IS};
-#endif
-
-
-#ifdef TIOCLGET
-
-static int old;
-
-int
-_lit_output() {
- struct sgttyb buf;
- int tmp;
-
- ioctl(cur_term->fd, TIOCGETP, &buf);
- if (buf.sg_flags & RAW)
- return 0;
- ioctl(cur_term->fd, TIOCLGET, &old);
- if (old & LLITOUT)
- return 0;
- tmp = old | LLITOUT;
- ioctl(cur_term->fd, TIOCLSET, &tmp);
- return 1;
-}
-
-void
-_norm_output() {
- ioctl(cur_term->fd, TIOCLSET, &old);
-}
-
-#else
-
-static struct sgttyb old;
-
-int
-_lit_output() {
- struct sgttyb tmp;
- ioctl(cur_term->fd, TIOCGETP, &old);
- if (old.sg_flags & RAW)
- return 0;
- memcpy((anyptr)&tmp, (anyptr)&old, sizeof(old));
- tmp.sg_flags |= RAW;
- ioctl(cur_term->fd, TIOCSETP, &tmp);
- return 1;
-}
-
-void
-_norm_output() {
- ioctl(cur_term->fd, TIOCSETP, &old);
-}
-
-#endif
-
-int
-_check_tty() {
- if (!(cur_term->prog_mode.v6.sg_flags & RAW) && cur_term->xon)
- cur_term->pad = 0;
- else
- cur_term->pad = 1;
- cur_term->baudrate = _baud_tbl[cur_term->prog_mode.v6.sg_ospeed & 0xf];
- return OK;
-}
-
-int
-def_shell_mode() {
- if (ioctl(cur_term->fd, TIOCGETP, &cur_term->shell_mode.v6) < 0)
- return ERR;
-#ifdef TIOCGETC
- if (ioctl(cur_term->fd, TIOCGETC, &cur_term->shell_mode.v7) < 0)
- return ERR;
-#endif
-#ifdef TIOCLGET
- if (ioctl(cur_term->fd, TIOCLGET, &cur_term->shell_mode.bsd) < 0)
- return ERR;
-#endif
-#ifdef TIOCGLTC
- if (ioctl(cur_term->fd, TIOCGLTC, &cur_term->shell_mode.bsd_new) < 0)
- return ERR;
-#endif
-#ifdef USE_WINSZ
-#ifdef TIOCGWINSZ
- if (ioctl(cur_term->fd, TIOCGWINSZ, &cur_term->shell_winsz)<0)
- return ERR;
-#endif
-#endif
- cur_term->termcap = 0;
- return OK;
-}
-
-int
-def_prog_mode() {
- if (ioctl(cur_term->fd, TIOCGETP, &cur_term->prog_mode.v6) < 0)
- return ERR;
-#ifdef TIOCGETC
- if (ioctl(cur_term->fd, TIOCGETC, &cur_term->prog_mode.v7) < 0)
- return ERR;
-#endif
-#ifdef TIOCLGET
- if (ioctl(cur_term->fd, TIOCLGET, &cur_term->prog_mode.bsd) < 0)
- return ERR;
-#endif
-#ifdef TIOCGLTC
- if (ioctl(cur_term->fd, TIOCGLTC, &cur_term->prog_mode.bsd_new) < 0)
- return ERR;
-#endif
-#ifdef USE_WINSZ
-#ifdef TIOCGWINSZ
- if (ioctl(cur_term->fd, TIOCGWINSZ, &cur_term->prog_winsz)<0)
- return ERR;
-#endif
-#endif
- return _check_tty();
-}
-
-int
-reset_shell_mode() {
- if (ioctl(cur_term->fd, TIOCSETP, &cur_term->shell_mode.v6) < 0)
- return ERR;
-#ifdef TIOCGETC
- if (ioctl(cur_term->fd, TIOCSETC, &cur_term->shell_mode.v7) < 0)
- return ERR;
-#endif
-#ifdef TIOCLGET
- if (ioctl(cur_term->fd, TIOCLSET, &cur_term->shell_mode.bsd) < 0)
- return ERR;
-#endif
-#ifdef TIOCGLTC
- if (ioctl(cur_term->fd, TIOCSLTC, &cur_term->shell_mode.bsd_new) < 0)
- return ERR;
-#endif
- return OK;
-}
-
-int
-reset_prog_mode() {
- if (ioctl(cur_term->fd, TIOCSETP, &cur_term->prog_mode.v6) < 0)
- return ERR;
-#ifdef TIOCGETC
- if (ioctl(cur_term->fd, TIOCSETC, &cur_term->prog_mode.v7) < 0)
- return ERR;
-#endif
-#ifdef TIOCLGET
- if (ioctl(cur_term->fd, TIOCLSET, &cur_term->prog_mode.bsd) < 0)
- return ERR;
-#endif
-#ifdef TIOCGLTC
- if (ioctl(cur_term->fd, TIOCSLTC, &cur_term->prog_mode.bsd_new) < 0)
- return ERR;
-#endif
- return OK;
-}
-
-int
-_init_tty() {
- cur_term->true_lines = lines;
- cur_term->true_columns = columns;
- if (pad_char == NULL)
- cur_term->padch = '\000';
- else
- cur_term->padch = pad_char[0];
- if (def_shell_mode() == ERR || def_prog_mode() == ERR) {
- cur_term->pad = 0;
- cur_term->baudrate = 1;
- cur_term->xon = 0;
- return OK;
- }
-#ifndef TIOCGETC
- cur_term->xon = (xoff_character == NULL || xoff_character[0] == '\021')
- && (xon_character == NULL || xon_character[0] == '\023')
- && xon_xoff;
-#else
- if (xon_xoff) {
- if (xon_character != NULL) {
- cur_term->prog_mode.v7.t_startc = xon_character[0];
- if (ioctl(cur_term->fd, TIOCSETC,
- &cur_term->prog_mode.v7) < 0)
- return ERR;
- }
- if (xoff_character != NULL) {
- cur_term->prog_mode.v7.t_stopc = xoff_character[0];
- if (ioctl(cur_term->fd, TIOCSETC,
- &cur_term->prog_mode.v7) < 0)
- return ERR;
- }
- }
- cur_term->xon = xon_xoff;
-#endif
-#ifdef USE_WINSZ
-#ifdef TIOCGWINSZ
- if (cur_term->prog_winsz.ws_row != 0
- && cur_term->prog_winsz.ws_col != 0) {
- lines = cur_term->prog_winsz.ws_row;
- columns = cur_term->prog_winsz.ws_col;
- }
-#endif
-#endif
- return OK;
-}
-
-#else
-
-int
-_lit_output() {
- return 0;
-}
-
-void
-_norm_output() {
- return;
-}
-
-int
-_check_tty() {
- return OK;
-}
-
-int
-def_prog_mode() {
- return OK;
-}
-
-int
-reset_prog_mode() {
- return OK;
-}
-
-int
-def_shell_mode() {
- return OK;
-}
-
-int
-reset_shell_mode() {
- return OK;
-}
-
-int
-_init_tty() {
- cur_term->pad = 1;
- cur_term->padch = 0;
- cur_term->baudrate = 1200;
- cur_term->xon = 0;
- cur_term->termcap = 0;
- cur_term->true_lines = lines;
- cur_term->true_columns = columns;
-}
-
-#endif
-
-#endif
diff --git a/lib/libmytinfo/version.h b/lib/libmytinfo/version.h
deleted file mode 100644
index 917223d..0000000
--- a/lib/libmytinfo/version.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * version.h
- *
- * By Ross Ridge
- * Public Domain
- *
- */
-
-#define RELEASE 3
-#define PATCHLEVEL 0
diff --git a/lib/libncurses/COPYRIGHT.NEW b/lib/libncurses/COPYRIGHT.NEW
deleted file mode 100644
index 7c5d22b..0000000
--- a/lib/libncurses/COPYRIGHT.NEW
+++ /dev/null
@@ -1,19 +0,0 @@
-/***************************************************************************
-* COPYRIGHT NOTICE *
-****************************************************************************
-* ncurses is copyright (C) 1992, 1993, 1994 *
-* by Zeyd M. Ben-Halim *
-* zmbenhal@netcom.com *
-* *
-* Permission is hereby granted to reproduce and distribute ncurses *
-* by any means and for any fee, whether alone or as part of a *
-* larger distribution, in source or in binary form, PROVIDED *
-* this notice is included with any such distribution, not removed *
-* from header files, and is reproduced in any documentation *
-* accompanying it or the applications linked with it. *
-* *
-* ncurses comes AS IS with no warranty, implied or expressed. *
-* *
-***************************************************************************/
-
-
diff --git a/lib/libncurses/COPYRIGHT.OLD b/lib/libncurses/COPYRIGHT.OLD
deleted file mode 100644
index 4049db0..0000000
--- a/lib/libncurses/COPYRIGHT.OLD
+++ /dev/null
@@ -1,5 +0,0 @@
-
-Pavel Curtis has given up his copyright to the public domain. This mean
-his ORIGINAL sources are in the public domain, not this current release.
-This current release IS copyrighted, see COPYRIGHT.NEW.
-
diff --git a/lib/libncurses/MKkeyname.awk b/lib/libncurses/MKkeyname.awk
deleted file mode 100644
index 12613ce..0000000
--- a/lib/libncurses/MKkeyname.awk
+++ /dev/null
@@ -1,30 +0,0 @@
-
-BEGIN {
- print ""
- print "#include <stdlib.h>"
- print "#include \"curses.h\""
- print ""
- print "struct kn {"
- print "\tchar *name;"
- print "\tint code;"
- print "};"
- print ""
- print "struct kn key_names[] = {"
-}
-
-{printf "\t{\"%s\", %s,},\n", $1, $2;}
-
-END {
- print "};"
- print ""
- print "char *keyname(int c)"
- print "{"
- print "int i, size = sizeof(key_names)/sizeof(struct kn);"
- print ""
- print "\tfor (i = 0; i < size; i++) {"
- print "\t\tif (key_names[i].code == c) return key_names[i].name;"
- print "\t}"
- print "\treturn NULL;"
- print "}"
- print ""
-}
diff --git a/lib/libncurses/MKkeys.awk b/lib/libncurses/MKkeys.awk
deleted file mode 100644
index 669c455..0000000
--- a/lib/libncurses/MKkeys.awk
+++ /dev/null
@@ -1 +0,0 @@
-{printf "\tadd_to_try(%s, %s);\n", $1, $2;}
diff --git a/lib/libncurses/Makefile b/lib/libncurses/Makefile
deleted file mode 100644
index b62856a..0000000
--- a/lib/libncurses/Makefile
+++ /dev/null
@@ -1,209 +0,0 @@
-# Makefile for ncurses
-# $Id: Makefile,v 1.23 1997/08/25 07:41:13 ache Exp $
-
-LIB= ncurses
-SHLIB_MAJOR= 3
-SHLIB_MINOR= 1
-SRCS= lib_kernel.c lib_pad.c lib_bkgd.c \
- lib_unctrl.c lib_raw.c lib_vidattr.c lib_trace.c lib_beep.c \
- lib_doupdate.c lib_refresh.c lib_initscr.c lib_newwin.c lib_addch.c \
- lib_addstr.c lib_scroll.c lib_clreol.c lib_touch.c lib_mvcur.c lib_keyname.c\
- lib_delwin.c lib_endwin.c lib_clrbot.c lib_move.c lib_printw.c \
- lib_scanw.c lib_erase.c lib_getch.c lib_options.c lib_acs.c lib_slk.c\
- lib_box.c lib_clear.c lib_delch.c lib_insch.c lib_instr.c \
- lib_getstr.c lib_mvwin.c lib_longname.c lib_tstp.c \
- lib_newterm.c lib_set_term.c lib_overlay.c lib_scrreg.c lib_color.c \
- lib_insstr.c lib_insdel.c lib_twait.c lib_window.c copyright.c
-
-CFLAGS+= -I. -I${.CURDIR} -Wall -DMYTINFO #-DTRACE
-DPADD= ${LIBMYTINFO}
-LDADD= -lmytinfo
-
-CLEANFILES+= lib_keyname.c keys.tries
-
-beforedepend: keys.tries
-
-beforeinstall:
- ${INSTALL} -C -m 444 -o $(BINOWN) -g $(BINGRP) ${.CURDIR}/unctrl.h \
- ${DESTDIR}/usr/include
- ${INSTALL} -C -m 444 -o $(BINOWN) -g $(BINGRP) ${.CURDIR}/curses.h \
- ${DESTDIR}/usr/include/ncurses.h
-
-keys.tries: ${.CURDIR}/keys.list ${.CURDIR}/MKkeys.awk
- awk -f ${.CURDIR}/MKkeys.awk ${.CURDIR}/keys.list > keys.tries
-
-# in case you don't run make depend
-lib_options.o lib_options.so lib_options.po: keys.tries
-
-lib_keyname.c: ${.CURDIR}/keys.list ${.CURDIR}/MKkeyname.awk
- awk -f ${.CURDIR}/MKkeyname.awk ${.CURDIR}/keys.list > lib_keyname.c
-
-MAN3 = curs_addch.3 \
- curs_addchst.3 \
- curs_addstr.3 \
- curs_attr.3 \
- curs_beep.3 \
- curs_bkgd.3 \
- curs_border.3 \
- curs_clear.3 \
- curs_color.3 \
- curs_delch.3 \
- curs_delln.3 \
- curs_getch.3 \
- curs_getstr.3 \
- curs_getyx.3 \
- curs_inch.3 \
- curs_inchstr.3 \
- curs_initscr.3 \
- curs_inopts.3 \
- curs_insch.3 \
- curs_insstr.3 \
- curs_instr.3 \
- curs_kernel.3 \
- curs_move.3 \
- curs_outopts.3 \
- curs_overlay.3 \
- curs_pad.3 \
- curs_printw.3 \
- curs_refresh.3 \
- curs_scanw.3 \
- curs_scr_dmp.3 \
- curs_scroll.3 \
- curs_slk.3 \
- curs_termatt.3 \
- curs_termin.3 \
- curs_touch.3 \
- curs_util.3 \
- curs_window.3 \
- ncurses.3
-
-MAN5 = term.5
-
-MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 echochar.3 \
- curs_addch.3 wechochar.3 curs_addch.3 mvaddch.3 \
- curs_addch.3 mvwaddch.3
-MLINKS+=curs_addchst.3 addchstr.3 curs_addchst.3 addchnstr.3 \
- curs_addchst.3 waddchstr.3 curs_addchst.3 waddchnstr.3 \
- curs_addchst.3 mvaddchstr.3 curs_addchst.3 mvaddchnstr.3 \
- curs_addchst.3 mvwaddchstr.3 curs_addchst.3 mvwaddchnstr.3
-MLINKS+=curs_addstr.3 addstr.3 curs_addstr.3 addnstr.3 \
- curs_addstr.3 waddstr.3 curs_addstr.3 waddnstr.3 \
- curs_addstr.3 mvaddstr.3 curs_addstr.3 mvaddnstr.3 \
- curs_addstr.3 mvwaddstr.3 curs_addstr.3 mvwaddnstr.3
-MLINKS+=curs_attr.3 attroff.3 curs_attr.3 wattroff.3 \
- curs_attr.3 attron.3 curs_attr.3 wattron.3 \
- curs_attr.3 attrset.3 curs_attr.3 wattrset.3 \
- curs_attr.3 standend.3 curs_attr.3 wstandend.3 \
- curs_attr.3 standout.3 curs_attr.3 wstandout.3
-MLINKS+=curs_beep.3 beep.3 curs_beep.3 flash.3
-MLINKS+=curs_bkgd.3 bkgdset.3 curs_bkgd.3 wbkgdset.3 \
- curs_bkgd.3 bkgd.3 curs_bkgd.3 wbkgd.3
-MLINKS+=curs_border.3 border.3 curs_border.3 wborder.3 curs_border.3 box.3 \
- curs_border.3 hline.3 curs_border.3 whline.3 \
- curs_border.3 vline.3 curs_border.3 wvline.3
-MLINKS+=curs_clear.3 erase.3 curs_clear.3 werase.3 curs_clear.3 clear.3 \
- curs_clear.3 wclear.3 curs_clear.3 clrtobot.3 \
- curs_clear.3 wclrtobot.3 curs_clear.3 clrtoeol.3 \
- curs_clear.3 wclrtoeol.3
-MLINKS+=curs_color.3 start_color.3 curs_color.3 init_pair.3 \
- curs_color.3 init_color.3 curs_color.3 has_colors.3 \
- curs_color.3 can_change_color.3 curs_color.3 color_content.3 \
- curs_color.3 pair_content.3
-MLINKS+=curs_delch.3 delch.3 curs_delch.3 wdelch.3 curs_delch.3 mvdelch.3 \
- curs_delch.3 mvwdelch.3
-MLINKS+=curs_delln.3 deleteln.3 curs_delln.3 wdeleteln.3 \
- curs_delln.3 insdelln.3 curs_delln.3 winsdelln.3 \
- curs_delln.3 insertln.3 curs_delln.3 winsertln.3
-MLINKS+=curs_getch.3 getch.3 curs_getch.3 wgetch.3 curs_getch.3 mvgetch.3 \
- curs_getch.3 mvwgetch.3 curs_getch.3 ungetch.3
-MLINKS+=curs_getstr.3 getstr.3 curs_getstr.3 wgetstr.3 \
- curs_getstr.3 mvgetstr.3 curs_getstr.3 mvwgetstr.3 \
- curs_getstr.3 wgetnstr.3
-MLINKS+=curs_getyx.3 getyx.3 curs_getyx.3 pgetparyx.3 curs_getyx.3 getbegyx.3 \
- curs_getyx.3 getmaxyx.3
-MLINKS+=curs_inch.3 inch.3 curs_inch.3 winch.3 curs_inch.3 mvinch.3 \
- curs_inch.3 mvwinch.3
-MLINKS+=curs_inchstr.3 inchstr.3 curs_inchstr.3 inchnstr.3 \
- curs_inchstr.3 winchstr.3 curs_inchstr.3 winchnstr.3 \
- curs_inchstr.3 mvinchstr.3 curs_inchstr.3 mvinchnstr.3 \
- curs_inchstr.3 mvwinchstr.3 curs_inchstr.3 mvwinchnstr.3
-MLINKS+=curs_initscr.3 initscr.3 curs_initscr.3 newterm.3 \
- curs_initscr.3 endwin.3 curs_initscr.3 isendwin.3 \
- curs_initscr.3 set_term.3 curs_initscr.3 delscreen.3
-MLINKS+=curs_inopts.3 cbreak.3 curs_inopts.3 nocbreak.3 curs_inopts.3 echo.3 \
- curs_inopts.3 noecho.3 curs_inopts.3 halfdelay.3 \
- curs_inopts.3 intrflush.3 curs_inopts.3 keypad.3 curs_inopts.3 meta.3 \
- curs_inopts.3 nodelay.3 curs_inopts.3 notimeout.3 curs_inopts.3 raw.3 \
- curs_inopts.3 noraw.3 curs_inopts.3 noqiflush.3 \
- curs_inopts.3 qiflush.3 curs_inopts.3 timeout.3 \
- curs_inopts.3 wtimeout.3 curs_inopts.3 typeahead.3
-MLINKS+=curs_insch.3 insch.3 curs_insch.3 winsch.3 curs_insch.3 mvinsch.3 \
- curs_insch.3 mvwinsch.3
-MLINKS+=curs_insstr.3 insstr.3 curs_insstr.3 insnstr.3 \
- curs_insstr.3 winsstr.3 curs_insstr.3 winsnstr.3 \
- curs_insstr.3 mvinsstr.3 curs_insstr.3 mvinsnstr.3 \
- curs_insstr.3 mvwinsstr.3 curs_insstr.3 mvwinsnstr.3
-MLINKS+=curs_instr.3 instr.3 curs_instr.3 innstr.3 curs_instr.3 winstr.3 \
- curs_instr.3 winnstr.3 curs_instr.3 mvinstr.3 curs_instr.3 mvinnstr.3 \
- curs_instr.3 mvwinstr.3 curs_instr.3 mvwinnstr.3
-MLINKS+=curs_kernel.3 def_prog_mode.3 curs_kernel.3 def_shell_mode.3 \
- curs_kernel.3 reset_prog_mode.3 curs_kernel.3 reset_shell_mode.3 \
- curs_kernel.3 resetty.3 curs_kernel.3 savetty.3 \
- curs_kernel.3 getsyx.3 curs_kernel.3 setsyx.3 \
- curs_kernel.3 ripoffline.3 curs_kernel.3 curs_set.3 \
- curs_kernel.3 napms.3
-MLINKS+=curs_move.3 move.3 curs_move.3 wmove.3
-MLINKS+=curs_outopts.3 clearok.3 curs_outopts.3 idlok.3 \
- curs_outopts.3 idcok.3 curs_outopts.3 immedok.3 \
- curs_outopts.3 leaveok.3 curs_outopts.3 setscrreg.3 \
- curs_outopts.3 wsetscrreg.3 curs_outopts.3 scrollok.3 \
- curs_outopts.3 nl.3 curs_outopts.3 nonl.3
-MLINKS+=curs_overlay.3 overlay.3 curs_overlay.3 overwrite.3 \
- curs_overlay.3 copywin.3
-MLINKS+=curs_pad.3 newpad.3 curs_pad.3 subpad.3 curs_pad.3 prefresh.3 \
- curs_pad.3 pnoutrefresh.3 curs_pad.3 pechochar.3
-MLINKS+=curs_printw.3 printw.3 curs_printw.3 wprintw.3 \
- curs_printw.3 mvprintw.3 curs_printw.3 mvwprintw.3 \
- curs_printw.3 vwprintw.3
-MLINKS+=curs_refresh.3 refresh.3 curs_refresh.3 wrefresh.3 \
- curs_refresh.3 wnoutrefresh.3 curs_refresh.3 doupdate.3 \
- curs_refresh.3 redrawwin.3 curs_refresh.3 wredrawln.3
-MLINKS+=curs_scanw.3 scanw.3 curs_scanw.3 wscanw.3 curs_scanw.3 mvscanw.3 \
- curs_scanw.3 mvwscanw.3 curs_scanw.3 vwscanw.3
-MLINKS+=curs_scr_dmp.3 scr_dump.3 curs_scr_dmp.3 scr_restore.3 \
- curs_scr_dmp.3 scr_init.3 curs_scr_dmp.3 scr_set.3
-MLINKS+=curs_scroll.3 scroll.3 curs_scroll.3 scrl.3 curs_scroll.3 wscrl.3
-MLINKS+=curs_slk.3 slk_init.3 curs_slk.3 slk_set.3 curs_slk.3 slk_refresh.3 \
- curs_slk.3 slk_noutrefresh.3 curs_slk.3 slk_label.3 \
- curs_slk.3 slk_clear.3 curs_slk.3 slk_restore.3 \
- curs_slk.3 slk_touch.3 curs_slk.3 slk_attron.3 \
- curs_slk.3 slk_attrset.3 curs_slk.3 slk_attroff.3
-MLINKS+=curs_termatt.3 baudrate.3 curs_termatt.3 erasechar.3 \
- curs_termatt.3 has_ic.3 curs_termatt.3 has_il.3 \
- curs_termatt.3 killchar.3 curs_termatt.3 longname.3 \
- curs_termatt.3 termattrs.3 curs_termatt.3 termname.3
-
-# XXX name clash with termcap(3)
-# MLINKS+= curs_termin.3 tparm.3
-MLINKS+=curs_termin.3 setupterm.3 curs_termin.3 setterm.3 \
- curs_termin.3 set_curterm.3 curs_termin.3 del_curterm.3 \
- curs_termin.3 restartterm.3 \
- curs_termin.3 putp.3 curs_termin.3 vidputs.3 \
- curs_termin.3 vidattr.3 curs_termin.3 mvcur.3 \
- curs_termin.3 tigetflag.3 curs_termin.3 tigetnum.3 \
- curs_termin.3 tigetstr.3
-MLINKS+=curs_touch.3 touchwin.3 curs_touch.3 touchline.3 \
- curs_touch.3 untouchwin.3 curs_touch.3 wtouchln.3 \
- curs_touch.3 is_linetouched.3 curs_touch.3 is_wintouched.3
-MLINKS+=curs_util.3 unctrl.3 curs_util.3 keyname.3 \
- curs_util.3 filter.3 curs_util.3 use_env.3 \
- curs_util.3 putwin.3 curs_util.3 getwin.3 \
- curs_util.3 delay_output.3 curs_util.3 flushinp.3
-MLINKS+=curs_window.3 newwin.3 curs_window.3 delwin.3 \
- curs_window.3 mvwin.3 curs_window.3 subwin.3 \
- curs_window.3 derwin.3 curs_window.3 mvderwin.3 \
- curs_window.3 dupwin.3 curs_window.3 wsyncup.3 \
- curs_window.3 syncok.3 curs_window.3 wcursyncup.3 \
- curs_window.3 wsyncdown.3
-
-.include <bsd.lib.mk>
diff --git a/lib/libncurses/README b/lib/libncurses/README
deleted file mode 100644
index d1f93bb..0000000
--- a/lib/libncurses/README
+++ /dev/null
@@ -1,42 +0,0 @@
-NCURSES 1.8.6 - July 24, 1994
------------------------------
-This file is intended to help people interested in working
-on fixing ncurses, enhancing it, or porting it to other
-platforms.
-
-PORTABILITY:
-The file matrix is an attempt at centralizing all portability
-information. The top line lists the different options, down
-the leftside are the operating systems supported. If an option
-is not needed then it should have an entry of NONE. Note the
-use of ':' to terminate each field. If somebody knows awk better
-than me, get in touch.
-
-OS: name of operating system
-ISPOSIX: -DNONPOSIX if <unistd.h> is missing
-POSIX: -DSTRICTPOSIX if _POSIX_SOURCE turns off non-POSIX features.
- -DSVR4_ACTION if like svr4 you need _POSIX_SOURCE to have sigaction
-TERMINAL: -DNOTERMIOS if you don't have <termios.h> but have <sgtty.h>
-HEADERS: -DBRAINDEAD if system headers don't declare external variables
-TABS: -DBSDTABS if you don't have TABS3 but have OXTABS
-OPT: -DOPT_MVCUR if you want mvcur() to cost its actions or you have a
- terminal that doesn't have direct cursor addressing.
-SRCDIR: the directory where the terminfo database lives
-CC: ANSI C compiler
-FLAGS: standard compiler flags
-EXTRA: extra flags needed by individual systems
- Sun: -DSUNIOCTL <sys/ioctl.h> conflicts with <termios.h>
- HP-UX: -D_HPUX_SOURCE so that we get POSIX and XOPEN features.
- SVR4: -DBROKEN_TIOCGETWINSZ guess what?
- AIX: -DSYS_SELECT if you need <sys/select.h>
-BASE: The directory under which headers and libraries will
- be installed.
-INSTALL: The name of an install program similar to BSD's (ie. understands
- -m, -g, -o, etc.) GNU install works.
-
-The awk script in script.src reads matrix and generates all the Config.*
-files.
-
-There are several problems with strict POSIX systems so extra flags
-or #define's maybe needed.
-
diff --git a/lib/libncurses/TESTS/Makefile b/lib/libncurses/TESTS/Makefile
deleted file mode 100644
index 64dc0e3..0000000
--- a/lib/libncurses/TESTS/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-TESTS = test corner ensor getch ncurses hanoi knight rain worm \
- over scroll2 battle newdemo scroll3 xmas copy firework testcurs \
- scroll
-
-CLEANFILES += $(TESTS)
-
-LIBS += -lncurses -lmytinfo
-
-all: $(TESTS)
-
-$(TESTS):
- $(CC) $(CFLAGS) $(LDFLAGS) ${.CURDIR}/$@.c -o $@ $(LIBS)
-
-test: test.c
-corner: corner.c
-ensor: ensor.c
-getch: getch.c
-ncurses: ncurses.c
-hanoi: hanoi.c
-knight: knight.c
-rain: rain.c
-worm: worm.c
-over: over.c
-scroll2: scroll2.c
-battle: battle.c
-newdemo: newdemo.c
-scroll3: scroll3.c
-xmas: xmas.c
-copy: copy.c
-firework: firework.c
-testcurs: testcurs.c
-scroll: scroll.c
-
-.include <bsd.prog.mk>
-
diff --git a/lib/libncurses/TESTS/README b/lib/libncurses/TESTS/README
deleted file mode 100644
index 279c6d8..0000000
--- a/lib/libncurses/TESTS/README
+++ /dev/null
@@ -1,21 +0,0 @@
-The programs in this directory are designed to test your newest toy :-)
-Check the sources for any further details.
-
-asc.c - tests the line drawing functions
-attr.c - display attributes available on the terminal
-bs.c - the game of battleship
-battle.c - older version of battleship with different interface
-caps.c - output a list of all capabilites to stderr (redirect to a file
- or it will screw up the terminal)
-copy.c - test overlay
-gdc.c - Great Digital Clock, gives an example of usng color
-getch.c - tests ketpad() and getch()
-hanoi.c - the game of hanoi, also an example of using color
-knight.c - the game of Knight's Tour
-rain.c - rain drops are falling on my head..
-scroll.c - test scrolling region
-slk.c - test soft labels
-worm.c - worms run all over your screen
-firework.c - multi-colored fireworks
-newdemo.c - a demo from the PDCurses people
-testcurs.c - a test from the PDCurses people
diff --git a/lib/libncurses/TESTS/battle.c b/lib/libncurses/TESTS/battle.c
deleted file mode 100644
index 5b5a961..0000000
--- a/lib/libncurses/TESTS/battle.c
+++ /dev/null
@@ -1,705 +0,0 @@
-/*
- * battle.c - original author: Bruce Holloway
- * mods by: Chuck A DeGaul
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <time.h>
-#include <signal.h>
-#include <ncurses.h>
-
-#define OTHER 1-turn
-
-char numbers[] = " 0 1 2 3 4 5 6 7 8 9";
-
-char carrier[] = "Aircraft Carrier";
-char battle[] = "Battleship";
-char sub[] = "Submarine";
-char destroy[] = "Destroyer";
-char ptboat[] = "PT Boat";
-
-char name[40];
-char dftname[] = "Stranger";
-
-struct _ships {
- char *name;
- char symbol;
- char length;
- char start; /* Coordinates - 0,0=0; 10,10=100. */
- char dir; /* Direction - 0 = right; 1 = down. */
- char hits; /* How many times has this ship been hit? (-1==sunk) */
-};
-
-struct _ships plyship[] = {
- { carrier,'A',5,0,0,0 },
- { battle,'B',4,0,0,0 },
- { destroy,'D',3,0,0,0 },
- { sub,'S',3,0,0,0 },
- { ptboat,'P',2,0,0,0 },
-};
-
-struct _ships cpuship[] = {
- { carrier,'A',5,0,0,0 },
- { battle,'B',4,0,0,0 },
- { destroy,'D',3,0,0,0 },
- { sub,'S',3,0,0,0 },
- { ptboat,'P',2,0,0,0 },
-};
-
-char hits[2][100], board[2][100]; /* "Hits" board, and main board. */
-
-int srchstep;
-int cpuhits;
-int cstart, cdir;
-int plywon=0, cpuwon=0; /* How many games has each won? */
-int turn; /* 0=player, 1=computer */
-int huntoffs; /* Offset on search strategy */
-
-int salvo, blitz, ask, seemiss; /* options */
-
-void intro(void);
-void initgame(void);
-int rnd(int);
-void plyplace(struct _ships *);
-int getdir(void);
-void placeship(struct _ships *, int, int);
-int checkplace(struct _ships *, int, int);
-void error(char *);
-void prompt(void);
-char getcoord(void);
-void cpuplace(struct _ships *);
-int awinna(void);
-int plyturn(void);
-int hitship(int);
-int cputurn(void);
-int playagain(void);
-void uninitgame();
-int sgetc(char *);
-int do_options(int, char *[]);
-int scount(int);
-
-int
-main(int argc, char **argv)
-{
- do_options(argc, argv);
-
- intro();
- do {
- initgame();
- while(awinna() == -1) {
- if (!blitz) {
- if (!salvo) {
- if (turn)
- cputurn();
- else plyturn();
- } else {
- register int i;
-
- i = scount(turn);
- while (i--) {
- if (turn)
- if (cputurn())
- if (awinna() != -1)
- i = 0;
- else
- if(plyturn())
- if (awinna() != -1)
- i = 0;
- }
- }
- } else {
- while((turn) ? cputurn() : plyturn());
- }
- turn = OTHER;
- }
- } while(playagain());
- uninitgame();
- exit(0);
-}
-
-#define PR addstr
-
-void
-intro()
-{
-char *tmpname;
-
- srand(time(0L)); /* Kick the random number generator */
-
- signal(SIGINT,uninitgame);
- if(signal(SIGQUIT,SIG_IGN) != SIG_IGN) signal(SIGQUIT,uninitgame);
-#if 1
- /* for some bizzare reason, getlogin or cuserid cause havoc with the terminal */
- if ((tmpname = getlogin()) != NULL) {
- strcpy(name, tmpname);
- } else
-#endif
- strcpy(name,dftname);
- name[0] = toupper(name[0]);
-
- initscr();
- savetty();
- nonl();
- cbreak();
- noecho();
- clear();
- mvaddstr(4,29,"Welcome to Battleship!");
- move(8,0);
-PR(" \\\n");
-PR(" \\ \\ \\\n");
-PR(" \\ \\ \\ \\ \\_____________\n");
-PR(" \\ \\ \\_____________ \\ \\/ |\n");
-PR(" \\ \\/ \\ \\/ |\n");
-PR(" \\/ \\_____/ |__\n");
-PR(" ________________/ |\n");
-PR(" \\ S.S. Penguin |\n");
-PR(" \\ /\n");
-PR(" \\___________________________________________________/\n");
- mvaddstr(20,27,"Hit any key to continue..."); refresh();
- getch();
-}
-
-void
-initgame()
-{
-int i;
-
- clear();
- mvaddstr(0,35,"BATTLESHIP");
- mvaddstr(4,12,"Main Board");
- mvaddstr(6,0,numbers);
- move(7,0);
- for(i=0; i<10; ++i){
- printw("%c . . . . . . . . . . %c\n",i+'A',i+'A');
- }
- mvaddstr(17,0,numbers);
- mvaddstr(4,55,"Hit/Miss Board");
- mvaddstr(6,45,numbers);
- for(i=0; i<10; ++i){
- mvprintw(7+i,45,"%c . . . . . . . . . . %c",i+'A',i+'A');
- }
- mvaddstr(17,45,numbers);
- for(turn=0; turn<2; ++turn)
- for(i=0; i<100; ++i){
- hits[turn][i] = board[turn][i] = 0;
- }
- for(turn=0; turn<2; ++turn){
- for(i=0; i<5; ++i)
- if (!turn)
- plyplace(&plyship[i]);
- else
- cpuplace(&cpuship[i]);
- }
- turn = rnd(2);
- cstart = cdir = -1;
- cpuhits = 0;
- srchstep = 3;
- huntoffs = rnd(srchstep);
-}
-
-int
-rnd(int n)
-{
- return(((rand() & 0x7FFF) % n));
-}
-
-void
-plyplace(ss)
-struct _ships *ss;
-{
-int c, d;
-
- do {
- prompt();
- printw("Place your %s (ex.%c%d) ? ",ss->name,rnd(10)+'A',rnd(10));
- c = getcoord();
- d = getdir();
- } while(!checkplace(ss,c,d));
- placeship(ss,c,d);
-}
-
-int
-getdir()
-{
-
- prompt();
- addstr("What direction (0=right, 1=down) ? ");
- return(sgetc("01")-'0');
-}
-
-void
-placeship(ss,c,d)
-struct _ships *ss;
-int c, d;
-{
-int x, y, l, i;
-
- for(l=0; l<ss->length; ++l){
- i = c + l * ((d) ? 10 : 1);
- board[turn][i] = ss->symbol;
- x = (i % 10) * 3 + 3;
- y = (i / 10) + 7;
- if(!turn) mvaddch(y,x,ss->symbol);
- }
- ss->start = c;
- ss->dir = d;
- ss->hits = 0;
-}
-
-int
-checkplace(ss,c,d)
-struct _ships *ss;
-int c, d;
-{
-int x, y, l;
-
- x = c%10; y = c/10;
- if(((x+ss->length) > 10 && !d) || ((y+ss->length) > 10 && d==1)){
- if(!turn)
- switch(rnd(3)){
- case 0:
- error("Ship is hanging from the edge of the world");
- break;
- case 1:
- error("Try fitting it on the board");
- break;
- case 2:
- error("Figure I won't find it if you put it there?");
- break;
- }
- return(0);
- }
- for(l=0; l<ss->length; ++l){
- x = c + l * ((d) ? 10 : 1);
- if(board[turn][x]){
- if(!turn)
- switch(rnd(3)){
- case 0:
- error("There's already a ship there");
- break;
- case 1:
- error("Collision alert! Aaaaaagh!");
- break;
- case 2:
- error("Er, Admiral, what about the other ship?");
- break;
- }
- return(0);
- }
- }
- return(1);
-}
-
-void
-error(s)
-char *s;
-{
- prompt();
- beep();
- printw("%s -- hit any key to continue --",s);
- refresh();
- getch();
-}
-
-void
-prompt(){
- move(22,0);
- clrtoeol();
-}
-
-char
-getcoord()
-{
-int ch, x, y;
-
-redo:
- y = sgetc("ABCDEFGHIJ");
- do {
- ch = getch();
- if (ch == 0x7F || ch == 8) {
- addstr("\b \b");
- refresh();
- goto redo;
- }
- } while(ch < '0' || ch > '9');
- addch(x = ch);
- refresh();
- return((y-'A')*10+x-'0');
-}
-
-void
-cpuplace(ss)
-struct _ships *ss;
-{
-int c, d;
-
- do{
- c = rnd(100);
- d = rnd(2);
- } while(!checkplace(ss,c,d));
- placeship(ss,c,d);
-}
-
-int
-awinna()
-{
-int i, j;
-struct _ships *ss;
-
- for (i = 0; i < 2; ++i) {
- ss = (i) ? cpuship : plyship;
- for(j=0; j<5; ++j, ++ss)
- if(ss->length != ss->hits)
- break;
- if(j == 5) return(OTHER);
- }
- return(-1);
-}
-
-int
-plyturn()
-{
-int c, res;
-char *m;
-
- prompt();
- addstr("Where do you want to shoot? ");
- c = getcoord();
- if(!(res = hits[turn][c])){
- hits[turn][c] = res = (board[OTHER][c]) ? 'H' : 'M';
- mvaddch(7+c/10,48+3*(c%10),(res=='H') ? 'H' : 'o');
- if(c = hitship(c)){
- prompt();
- switch(rnd(3)){
- case 0:
- m = "You sank my %s!";
- break;
- case 1:
- m = "I have this sinking feeling about my %s....";
- break;
- case 2:
- m = "Have some mercy for my %s!";
- break;
- }
- move(23,0);
- clrtoeol();
- beep();
- printw(m,cpuship[c-1].name); refresh();
- return(awinna() == -1);
- }
- }
- prompt();
- move(23,0); clrtoeol();
- printw("You %s.",(res=='M')?"missed":"scored a hit"); refresh();
- return(res == 'H');
-}
-
-int
-hitship(c)
-int c;
-{
-struct _ships *ss;
-int sym, i, j;
-
- ss = (turn) ? plyship : cpuship;
- if (!(sym = board[OTHER][c])) return(0);
- for (i = 0; i < 5; ++i, ++ss)
- if (ss->symbol == sym) {
- j = ss->hits;
- ++j;
- ss->hits = j;
- if (j == ss->length)
- return(i+1);
- return(0);
- }
-}
-
-int
-cputurn()
-{
-int c, res, x, y, i, d;
-
-redo:
- if (cstart == -1){
- if (cpuhits){
- for(i=0, c=rnd(100); i<100; ++i, c = (c+1) % 100)
- if(hits[turn][c] == 'H')
- break;
- if(i != 100){
- cstart = c;
- cdir = -1;
- goto fndir;
- }
- }
- do {
- i = 0;
- do{
- while(hits[turn][c=rnd(100)]);
- x = c % 10; y = c / 10;
- if(++i == 1000) break;
- } while(((x+huntoffs) % srchstep) != (y % srchstep));
- if(i == 1000) --srchstep;
- } while(i == 1000);
- }
- else if(cdir == -1){
-fndir: for(i=0, d=rnd(4); i++ < 4; d = (d+1) % 4){
- x = cstart%10; y = cstart/10;
- switch(d){
- case 0: ++x; break;
- case 1: ++y; break;
- case 2: --x; break;
- case 3: --y; break;
- }
- if(x<0 || x>9 || y<0 || y>9) continue;
- if(hits[turn][c=y*10+x]) continue;
- cdir = -2;
- break;
- }
- if(i == 4){
- cstart = -1;
- goto redo;
- }
- }
- else{
- x = cstart%10; y = cstart/10;
- switch(cdir){
- case 0: ++x; break;
- case 1: ++y; break;
- case 2: --x; break;
- case 3: --y; break;
- }
- if(x<0 || x>9 || y<0 || y>9 || hits[turn][y*10+x]){
- cdir = (cdir+2) % 4;
- for(;;){
- switch(cdir){
- case 0: ++x; break;
- case 1: ++y; break;
- case 2: --x; break;
- case 3: --y; break;
- }
- if(x<0 || x>9 || y<0 || y>9){ cstart = -1;
- goto redo;
- }
- if(!hits[turn][y*10+x]) break;
- }
- }
- c = y*10 + x;
- }
-
- if (!ask) {
- res = (board[OTHER][c]) ? 'H' : 'M';
- move(21,0); clrtoeol();
- printw("I shoot at %c%d. I %s!",c/10+'A',c%10,(res=='H')?"hit":"miss");
- } else {
- for(;;){
- prompt();
- printw("I shoot at %c%d. Do I (H)it or (M)iss? ",c/10+'A',c%10);
- res = sgetc("HM");
- if((res=='H' && !board[OTHER][c]) || (res=='M' && board[OTHER][c])){
- error("You lie!");
- continue;
- }
- break;
- }
- addch(res);
- }
- hits[turn][c] = res;
- if(res == 'H') {
- ++cpuhits;
- if(cstart == -1) cdir = -1;
- cstart = c;
- if(cdir == -2) cdir = d;
- mvaddch(7+(c/10),3+3*(c%10),'*');
- if (blitz && !ask) {
- refresh();
- sleep(1);
- }
- }
- else {
- if (seemiss) {
- mvaddch(7+(c/10),3+3*(c%10),' ');
- } else {
- if(cdir == -2) cdir = -1;
- }
- }
- if(c=hitship(c)){
- cstart = -1;
- cpuhits -= plyship[c-1].length;
- x = plyship[c-1].start;
- d = plyship[c-1].dir;
- y = plyship[c-1].length;
- for(i=0; i<y; ++i){
- hits[turn][x] = '*';
- x += (d) ? 10 : 1;
- }
- }
- if (salvo && !ask) {
- refresh();
- sleep(1);
- }
- if(awinna() != -1) return(0);
- return(res == 'H');
-}
-
-int
-playagain()
-{
-int i, x, y, dx, dy, j;
-
- for(i=0; i<5; ++i){
- x = cpuship[i].start; y = x/10+7; x = (x % 10) * 3 + 48;
- dx = (cpuship[i].dir) ? 0 : 3;
- dy = (cpuship[i].dir) ? 1 : 0;
- for(j=0; j < cpuship[i].length; ++j){
- mvaddch(y,x,cpuship[i].symbol);
- x += dx; y += dy;
- }
- }
-
- if(awinna()) ++cpuwon; else ++plywon;
- i = 18 + strlen(name);
- if(plywon >= 10) ++i;
- if(cpuwon >= 10) ++i;
- mvprintw(2,(80-i)/2,"%s: %d Computer: %d",name,plywon,cpuwon);
-
- prompt();
- printw((awinna()) ? "Want to be humiliated again, %s? "
- : "Going to give me a chance for revenge, %s? ",name);
- return(sgetc("YN") == 'Y');
-}
-
-void
-uninitgame(int sig)
-{
- refresh();
- endwin();
- exit(0);
-}
-
-int
-sgetc(s)
-char *s;
-{
-char *s1;
-int ch;
-
- refresh();
- for (;;) {
- ch = toupper(getch());
- for (s1 = s; *s1 && ch != *s1; ++s1);
- if (*s1) {
- addch(ch);
- refresh();
- return(ch);
- }
- }
-}
-
-/*
- * I should use getopts() from libc.a, but I'm leary that other UNIX
- * systems might not have it, although I'd love to use it.
- */
-
-int
-do_options(c,op)
-int c;
-char *op[];
-{
-register int i;
-
- if (c > 1) {
- for (i=1; i<c; i++) {
- switch(op[i][0]) {
- default:
- case '?':
- fprintf(stderr, "Usage: battle [ -s | -b ] [ -a ] [ -m ]\n");
- fprintf(stderr, "\tWhere the options are:\n");
- fprintf(stderr, "\t-s : play a salvo game (mutex with -b)\n");
- fprintf(stderr, "\t-b : play a blitz game (mutex with -s)\n");
- fprintf(stderr, "\t-a : computer asks you for hit/miss\n");
- fprintf(stderr, "\t-m : computer misses are displayed\n");
- exit(1);
- break;
- case '-':
- switch(op[i][1]) {
- case 'b':
- blitz = 1;
- if (salvo == 1) {
- fprintf(stderr,
- "Bad Arg: -b and -s are mutually exclusive\n");
- exit(1);
- }
- break;
- case 's':
- salvo = 1;
- if (blitz == 1) {
- fprintf(stderr,
- "Bad Arg: -s and -b are mutually exclusive\n");
- exit(1);
- }
- break;
- case 'a':
- ask = 1;
- break;
- case 'm':
- seemiss = 1;
- break;
- default:
- fprintf(stderr,
- "Bad Arg: type \"%s ?\" for usage message\n", op[0]);
- exit(1);
- }
- }
- }
- fprintf(stdout, "Playing optional game (");
- if (salvo)
- fprintf(stdout, "salvo, noblitz, ");
- else if (blitz)
- fprintf(stdout, "blitz, nosalvo, ");
- else
- fprintf(stdout, "noblitz, nosalvo, ");
-
- if (ask)
- fprintf(stdout, "ask, ");
- else
- fprintf(stdout, "noask, ");
-
- if (seemiss)
- fprintf(stdout, "seemiss)\n");
- else
- fprintf(stdout, "noseemiss)\n");
- }
- else
- fprintf(stdout,
- "Playing standard game (no blitz, no slavo, no ask, no seemiss)\n");
- sleep(2);
- return(0);
-}
-
-int
-scount(who)
-int who;
-{
-int i, shots;
-struct _ships *sp;
-
- if (who) {
- /* count cpu shots */
- sp = cpuship;
- } else {
- /* count player shots */
- sp = plyship;
- }
- for (i=0, shots = 0; i<5; i++, sp++) {
- /* extra test for machines with unsigned chars! */
- if (sp->hits == (char) -1 || sp->hits >= sp->length) {
- continue; /* dead ship */
- } else {
- shots++;
- }
- }
- return(shots);
-}
-
diff --git a/lib/libncurses/TESTS/copy.c b/lib/libncurses/TESTS/copy.c
deleted file mode 100644
index 013f9db..0000000
--- a/lib/libncurses/TESTS/copy.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <ncurses.h>
-
-main()
-{
-WINDOW *win1, *win2;
-int h, i;
-
- initscr();
- cbreak();
- noecho();
- win1 = newwin(20, 50, 0, 20);
- for (h = 0; h < 20; h++)
- for (i = 0; i < 50; i++)
- mvwaddch(win1, h, i, 'X');
- wrefresh(win1);
- getch();
-
- win2 = newwin(20, 50, 3, 30);
- for (h = 0; h < 20; h++)
- for (i = 0; i < 50; i++)
- mvwaddch(win2, h, i, 'Y');
- wnoutrefresh(win1);
- wnoutrefresh(win2);
- doupdate();
- getch();
-
- /* now, remove window 2 and restore the contents of window 1 */
- i = copywin(win1, win2, 5, 10, 0, 0, 14, 39, 0);
- wnoutrefresh(win1);
- wnoutrefresh(win2);
- printw("copywin returns %d\n", i);
- wnoutrefresh(stdscr);
- doupdate();
-
- getch();
-
- endwin();
-}
-
diff --git a/lib/libncurses/TESTS/corner.c b/lib/libncurses/TESTS/corner.c
deleted file mode 100644
index 2ab38a9..0000000
--- a/lib/libncurses/TESTS/corner.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <ncurses.h>
-
-int main()
-{
-int i, j;
-
- initscr();
-
- for (i = 0; i < LINES; i++) {
- j = mvaddch(i, COLS - 1, 'A' + i);
- }
- refresh();
- endwin();
- exit(0);
-}
-
diff --git a/lib/libncurses/TESTS/ensor.c b/lib/libncurses/TESTS/ensor.c
deleted file mode 100644
index 4eca9cb..0000000
--- a/lib/libncurses/TESTS/ensor.c
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <ncurses.h>
-
-main()
-{
- int i;
- WINDOW *win;
-
- initscr();
- noecho();
- nonl();
- cbreak();
-
- scrollok(stdscr, TRUE);
-
- for (i=0; i<25; i++)
- printw("This is in the background, this should be left alone!\n");
-
- refresh();
- win=newwin(10,50,6,20);
- scrollok(win,TRUE);
- wmove(win,0,0);
- whline(win,0,49);
- wmove(win,9,0);
- whline(win,0,49);
- wrefresh(win);
- wattrset(win,A_STANDOUT);
- mvwprintw(win, 0, 14, " Scrolling Demo! ");
- mvwprintw(win, 9, 14, " Scrolling Demo! ");
- wattroff(win,A_STANDOUT);
- wsetscrreg(win, 1,8);
-
- mvwprintw(win, 0, 5, " DOWN ");
- wmove(win,1,0);
- wrefresh(win);
-
- getch();
- for (i=0; i<25; i++){ wprintw(win, "This is window line test (%d).\n", i);
- if (i%2) wattrset(win,A_BOLD); else wattroff(win,A_BOLD);
- wrefresh(win); }
-
- mvwprintw(win, 0, 5, " UP ");
- wrefresh(win);
- getch();
- for (i=0; i<25; i++) { wmove(win,1,0); winsertln(win);
- if (i%2) wattrset(win,A_BOLD); else wattroff(win,A_BOLD);
- wprintw(win, "Scrolling backwards! (%d)\n", i); wrefresh(win); }
-
- mvwprintw(win, 0, 5, " DONE "); wrefresh(win);
-
- endwin();
-}
-
diff --git a/lib/libncurses/TESTS/firework.c b/lib/libncurses/TESTS/firework.c
deleted file mode 100644
index b497584..0000000
--- a/lib/libncurses/TESTS/firework.c
+++ /dev/null
@@ -1,113 +0,0 @@
-#include <stdio.h>
-#include <signal.h>
-#include <ncurses.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <time.h>
-
-void explode();
-
-int main()
-{
-int start,end,row,diff,flag,direction,seed;
-
- initscr();
- if (has_colors())
- start_color();
- seed = time((time_t *)0);
- srand(seed);
- cbreak();
- for (;;) {
- do {
- start = rand() % (COLS -3);
- end = rand() % (COLS - 3);
- start = (start < 2) ? 2 : start;
- end = (end < 2) ? 2 : end;
- direction = (start > end) ? -1 : 1;
- diff = abs(start-end);
- } while (diff<2 || diff>=LINES-2);
- attrset(A_NORMAL);
- for (row=0;row<diff;row++) {
- mvprintw(LINES - row,start + (row * direction),
- (direction < 0) ? "\\" : "/");
- if (flag++) {
- refresh();
- erase();
- flag = 0;
- }
- }
- if (flag++) {
- refresh();
- flag = 0;
- }
- seed = time((time_t *)0);
- srand(seed);
- explode(LINES-row,start+(diff*direction));
- erase();
- refresh();
- }
- endwin();
- exit(0);
-}
-
-void explode(int row, int col)
-{
- erase();
- mvprintw(row,col,"-");
- refresh();
-
- init_pair(1,get_colour(),COLOR_BLACK);
- attrset(COLOR_PAIR(1));
- mvprintw(row-1,col-1," - ");
- mvprintw(row,col-1,"-+-");
- mvprintw(row+1,col-1," - ");
- refresh();
-
- init_pair(1,get_colour(),COLOR_BLACK);
- attrset(COLOR_PAIR(1));
- mvprintw(row-2,col-2," --- ");
- mvprintw(row-1,col-2,"-+++-");
- mvprintw(row, col-2,"-+#+-");
- mvprintw(row+1,col-2,"-+++-");
- mvprintw(row+2,col-2," --- ");
- refresh();
-
- init_pair(1,get_colour(),COLOR_BLACK);
- attrset(COLOR_PAIR(1));
- mvprintw(row-2,col-2," +++ ");
- mvprintw(row-1,col-2,"++#++");
- mvprintw(row, col-2,"+# #+");
- mvprintw(row+1,col-2,"++#++");
- mvprintw(row+2,col-2," +++ ");
- refresh();
-
- init_pair(1,get_colour(),COLOR_BLACK);
- attrset(COLOR_PAIR(1));
- mvprintw(row-2,col-2," # ");
- mvprintw(row-1,col-2,"## ##");
- mvprintw(row, col-2,"# #");
- mvprintw(row+1,col-2,"## ##");
- mvprintw(row+2,col-2," # ");
- refresh();
-
- init_pair(1,get_colour(),COLOR_BLACK);
- attrset(COLOR_PAIR(1));
- mvprintw(row-2,col-2," # # ");
- mvprintw(row-1,col-2,"# #");
- mvprintw(row, col-2," ");
- mvprintw(row+1,col-2,"# #");
- mvprintw(row+2,col-2," # # ");
- refresh();
- return;
-}
-
-int get_colour()
-{
- int attr;
- attr = (rand() % 16)+1;
- if (attr == 1 || attr == 9)
- attr = COLOR_RED;
- if (attr > 8)
- attr |= A_BOLD;
- return(attr);
-}
diff --git a/lib/libncurses/TESTS/getch.c b/lib/libncurses/TESTS/getch.c
deleted file mode 100644
index 90a0ee4..0000000
--- a/lib/libncurses/TESTS/getch.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <ncurses.h>
-
-main()
- {
- int c,i;
- initscr();
- cbreak();
- noecho();
-#if 1
- wtimeout(stdscr,1000);
-#endif
- scrollok(stdscr,TRUE);
- for (c='A';c<='Z';c++)
- for (i=0;i<25;i++)
- {
- move(i,i);
- addch(c);
- refresh();
- }
- move (0,0);
- while ((c=wgetch(stdscr))!='A')
- {
- if (c == EOF) printw(">>wait for keypress<<");
- else printw(">>%c<<\n",c);
- refresh();
- }
- endwin();
- }
-
diff --git a/lib/libncurses/TESTS/hanoi.c b/lib/libncurses/TESTS/hanoi.c
deleted file mode 100644
index 8a482d5..0000000
--- a/lib/libncurses/TESTS/hanoi.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Name: Towers of Hanoi.
- *
- * Desc:
- * This is a playable copy of towers of hanoi.
- * Its sole purpose is to demonstrate my Amiga Curses package.
- * This program should compile on any system that has Curses.
- * 'hanoi' will give a manual game with 7 playing pieces.
- * 'hanoi n' will give a manual game with n playing pieces.
- * 'hanoi n a' will give an auto solved game with n playing pieces.
- *
- * Author: Simon J Raybould (sie@fulcrum.bt.co.uk).
- *
- * Date: 05.Nov.90
- *
- */
-
-#include <ncurses.h>
-
-#define NPEGS 3 /* This is not configurable !! */
-#define MINTILES 3
-#define MAXTILES 9
-#define DEFAULTTILES 7
-#define TOPLINE 6
-#define BASELINE 16
-#define STATUSLINE (LINES-3)
-#define LEFTPEG 19
-#define MIDPEG 39
-#define RIGHTPEG 59
-
-#define LENTOIND(x) (((x)-1)/2)
-#define OTHER(a,b) (3-((a)+(b)))
-
-struct Peg {
- int Length[MAXTILES];
- int Count;
-};
-
-struct Peg Pegs[NPEGS];
-int PegPos[] = { LEFTPEG, MIDPEG, RIGHTPEG };
-int TileColour[] = {
- COLOR_GREEN, /* Length 3 */
- COLOR_MAGENTA, /* Length 5 */
- COLOR_RED, /* Length 7 */
- COLOR_BLUE, /* Length 9 */
- COLOR_CYAN, /* Length 11 */
- COLOR_YELLOW, /* Length 13 */
- COLOR_GREEN, /* Length 15 */
- COLOR_MAGENTA, /* Length 17 */
- COLOR_RED, /* Length 19 */
-};
-int NMoves = 0;
-
-static unsigned char AutoFlag;
-
-void InitTiles(), DisplayTiles(), MakeMove(), AutoMove(), Usage();
-
-int
-main(int argc, char **argv)
-{
-int NTiles, FromCol, ToCol;
-
- switch(argc) {
- case 1:
- NTiles = DEFAULTTILES;
- break;
- case 2:
- NTiles = atoi(argv[1]);
- if (NTiles > MAXTILES || NTiles < MINTILES) {
- fprintf(stderr, "Range %d to %d\n", MINTILES, MAXTILES);
- exit(1);
- }
- break;
- case 3:
- if (strcmp(argv[2], "a")) {
- Usage();
- exit(1);
- }
- NTiles = atoi(argv[1]);
- if (NTiles > MAXTILES || NTiles < MINTILES) {
- fprintf(stderr, "Range %d to %d\n", MINTILES, MAXTILES);
- exit(1);
- }
- AutoFlag = TRUE;
- break;
- default:
- Usage();
- exit(1);
- }
- initscr();
- if (!has_colors()) {
- puts("terminal doesn't support color.");
- exit(1);
- }
- start_color();
- {
- int i;
- for (i = 0; i < 9; i++)
- init_pair(i+1, COLOR_BLACK, TileColour[i]);
- }
- cbreak();
- if (LINES < 24) {
- fprintf(stderr, "Min screen length 24 lines\n");
- endwin();
- exit(1);
- }
- if(AutoFlag)
- leaveok(stdscr, TRUE); /* Attempt to remove cursor */
- InitTiles(NTiles);
- DisplayTiles();
- if(AutoFlag) {
- do {
- noecho();
- AutoMove(0, 2, NTiles);
- } while(!Solved(NTiles));
- sleep(2);
- } else {
- for(;;) {
- if(GetMove(&FromCol, &ToCol))
- break;
- if (AutoFlag) {
- AutoMove(0, 2, NTiles);
- break;
- }
- if(InvalidMove(FromCol, ToCol)) {
- mvaddstr(STATUSLINE, 0, "Invalid Move !!");
- refresh();
- beep();
- continue;
- }
- MakeMove(FromCol, ToCol);
- if(Solved(NTiles)) {
- mvprintw(STATUSLINE, 0, "Well Done !! You did it in %d moves", NMoves);
- refresh();
- sleep(5);
- break;
- }
- }
- }
- endwin();
-}
-
-int
-InvalidMove(int From, int To)
-{
- if(From == To)
- return TRUE;
- if(!Pegs[From].Count)
- return TRUE;
- if(Pegs[To].Count &&
- Pegs[From].Length[Pegs[From].Count-1] >
- Pegs[To].Length[Pegs[To].Count-1])
- return TRUE;
- return FALSE;
-}
-
-void
-InitTiles(int NTiles)
-{
-int Size, SlotNo;
-
- for(Size=NTiles*2+1, SlotNo=0; Size>=3; Size-=2)
- Pegs[0].Length[SlotNo++] = Size;
-
- Pegs[0].Count = NTiles;
- Pegs[1].Count = 0;
- Pegs[2].Count = 0;
-}
-
-#define gc() {noecho();getch();echo();}
-
-void
-DisplayTiles()
-{
- int Line, Peg, SlotNo;
- char TileBuf[BUFSIZ];
-
- erase();
- mvaddstr(1, 24, "T O W E R S O F H A N O I");
- mvaddstr(3, 34, "SJR 1990");
- mvprintw(19, 5, "Moves : %d", NMoves);
- standout();
- mvaddstr(BASELINE, 8, " ");
-
- for(Line=TOPLINE; Line<BASELINE; Line++) {
- mvaddch(Line, LEFTPEG, ' ');
- mvaddch(Line, MIDPEG, ' ');
- mvaddch(Line, RIGHTPEG, ' ');
- }
- mvaddch(BASELINE, LEFTPEG, '1');
- mvaddch(BASELINE, MIDPEG, '2');
- mvaddch(BASELINE, RIGHTPEG, '3');
- standend();
-
- /* Draw tiles */
- for(Peg=0; Peg<NPEGS; Peg++) {
- for(SlotNo=0; SlotNo<Pegs[Peg].Count; SlotNo++) {
- memset(TileBuf, ' ', Pegs[Peg].Length[SlotNo]);
- TileBuf[Pegs[Peg].Length[SlotNo]] = '\0';
- attrset(COLOR_PAIR(LENTOIND(Pegs[Peg].Length[SlotNo])));
- mvaddstr(BASELINE-(SlotNo+1),
- PegPos[Peg]-Pegs[Peg].Length[SlotNo]/2, TileBuf);
- }
- }
- attrset(A_NORMAL);
- refresh();
-}
-
-int
-GetMove(int *From, int *To)
-{
- mvaddstr(STATUSLINE, 0, "Next move ('q' to quit) from ");
- clrtoeol();
- refresh();
- if((*From = getch()) == 'q')
- return TRUE;
- else if (*From == 'a') {
- AutoFlag = TRUE;
- return FALSE;
- }
- *From -= ('0'+1);
- addstr(" to ");
- clrtoeol();
- refresh();
- if((*To = getch()) == 'q')
- return TRUE;
- *To -= ('0'+1);
- move(STATUSLINE, 0);
- clrtoeol();
- refresh();
- return FALSE;
-}
-
-void
-MakeMove(int From, int To)
-{
-
- Pegs[From].Count--;
- Pegs[To].Length[Pegs[To].Count] = Pegs[From].Length[Pegs[From].Count];
- Pegs[To].Count++;
- NMoves++;
- DisplayTiles();
-}
-
-void
-AutoMove(int From, int To, int Num)
-{
-
- if(Num == 1) {
- MakeMove(From, To);
- return;
- }
- AutoMove(From, OTHER(From, To), Num-1);
- MakeMove(From, To);
- AutoMove(OTHER(From, To), To, Num-1);
-}
-
-int
-Solved(int NumTiles)
-{
-int i;
-
- for(i = 1; i < NPEGS; i++)
- if (Pegs[i].Count == NumTiles)
- return TRUE;
- return FALSE;
-}
-
-void
-Usage()
-{
- fprintf(stderr, "Usage: hanoi [<No Of Tiles>] [a]\n");
- fprintf(stderr, "The 'a' option causes the tower to be solved automatically\n");
-}
-
diff --git a/lib/libncurses/TESTS/knight.c b/lib/libncurses/TESTS/knight.c
deleted file mode 100644
index 73f7b42..0000000
--- a/lib/libncurses/TESTS/knight.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/* Knights Tour - a brain game */
-
-#include <ncurses.h>
-#include <signal.h>
-#include <ctype.h>
-#include <stdlib.h>
-
-#ifdef __FreeBSD__
-#define srand48 srandom
-#define lrand48 random
-#endif
-
-short board [64]; /* the squares */
-char row, column; /* input characters */
-int rw,col; /* numeric equivalent of row and column */
-int curow,curcol; /* current row and column integers */
-int rdif, cdif; /* difference between input and current */
-int j; /* index into board */
-
-char script[]={"'_)//,/(-)/__/__(_<_(__),|/|/_///_/_<//_/_)__o__o'______///_(--_(_)___,(_/,_/__(_\0"};
-
-int ypos[] ={1,0,1,2,3,0,1,2,2,3,3,2,2,3,2,2,3,3,3,3,3,2,3,3,2,4,5,5,
- 4,3,3,2,1,2,3,3,3,2,1,3,3,2,3,3,3,2,1,1,0,1,4,4,4,4,4,4,5,6,7,7,
- 7,6,6,6,7,7,7,6,6,6,6,7,7,7,6,7,7,6,6,7,7};
-
-int xpos[]={0,1,2,1,0,5,4,3,2,4,6,7,8,8,9,10,10,11,12,13,14,15,15,16,
- 16,16,15,14,15,17,18,19,20,20,20,21,22,23,24,23,25,26,27,26,28,
- 13,23,25,27,27,2,3,4,5,6,7,4,3,2,1,0,1,2,5,4,5,6,6,7,8,9,8,9,10,
- 11,11,12,13,14,14,15};
-
-static char *instructions[] =
-{
-" Knight's Tour is a board game for one player. It is played on",
-"an eight by eight board and is based on the allowable moves that a knight",
-"can make in the game of chess. For those who are unfamiliar with the",
-"game, a knight may move either on a row or a column but not diagonally.",
-"He may move one square in any direction and two squares in a perpendicular",
-"direction >or< two squares in any direction and one square in a",
-"perpendicular direction. He may not, of course, move off the board.",
-"",
-" At the beginning of a game you will be asked to either choose a",
-"starting square or allow the computer to select a random location.",
-"Squares are designated by a letter-number combination where the row is",
-"specified by a letter A-H and the numbers 1-8 define a column. Invalid",
-"entries are ignored and illegal moves produce a beep at the terminal.",
-"",
-" The objective is to visit every square on the board. When you claim",
-"a square a marker is placed on it to show where you've been. You may",
-"not revisit a square that you've landed on before.",
-"",
-" After each move the program checks to see if you have any legal",
-"moves left. If not, the game ends and your squares are counted. If",
-"you've made all the squares you win the game. Otherwise, you are told",
-"the number of squares you did make.",
-"END"
-};
-
-void init(void);
-int play(void);
-void drawboard(void);
-void dosquares(void);
-void getfirst(void);
-void getrc(void);
-void putstars(void);
-int evalmove(void);
-int chkmoves(void);
-int endgame(void);
-int chksqr(int, int);
-void instruct(void);
-void title(int, int);
-
-int
-main ()
-{
- init ();
- for (;;)
- if (!play ()) {
- endwin ();
- exit (0);
- }
-}
-
-void
-init ()
-{
-
- srand48 (getpid());
- initscr ();
- cbreak (); /* immediate char return */
- noecho (); /* no immediate echo */
- title (1,23);
- mvaddstr (23, 25, "Would you like instructions? ");
- refresh();
- if ((toupper(getch())) == 'Y')
- instruct();
- clear ();
-}
-
-int
-play ()
-{
- drawboard (); /* clear screen and drawboard */
- for (j = 0; j < 64; j++) board[j]=0;
- getfirst (); /* get the starting square */
- for (;;) {
- getrc();
- if (evalmove()) {
- putstars ();
- if (!chkmoves())
- return (endgame ());
- }
- else beep();
- }
-}
-
-void
-drawboard ()
-{
- erase ();
- dosquares ();
- refresh ();
- mvaddstr (0, 7, "1 2 3 4 5 6 7 8");
- for (j = 0; j < 8; j++) mvaddch (2*j+2, 3, j + 'A');
- refresh ();
- mvaddstr (20, 5, "ROW:");
- mvaddstr (20, 27, "COLUMN:");
- mvaddstr (14, 49, "CURRENT ROW");
- mvaddstr (16, 49, "CURRENT COL");
- mvaddstr (22, 5, "A - H or Q to quit");
- mvaddstr (22, 27, "1 - 8 or ESC to cancel row");
- refresh ();
- title (1,40);
-}
-
-void
-dosquares ()
-{
- mvaddstr (1, 6, "-------------------------------");
- for (j = 1; j < 9; j++){
- mvaddstr (2*j, 5, "| | | | | | | | |");
- mvaddstr (2*j+1, 6, "-------------------------------");
- }
-}
-
-void
-getfirst () /* get first square */
-{
- mvaddstr (23, 25, "(S)elect or (R)andom "); refresh ();
- do {
- row = toupper(getch());
- } while ((row != 'S') && (row != 'R'));
- if (row == 'R') {
- rw = lrand48() % 8;
- col = lrand48() % 8;
- j = 8* rw + col;
- row = rw + 'A';
- column = col + '1';
- }
- else {
- mvaddstr (23, 25, "Enter starting row and column");
- refresh ();
- getrc(); /* get row and column */
- }
- putstars ();
- move (23, 0);
- clrtobot();
-}
-
-void
-getrc () /* get row and column */
-{
- noecho ();
- do {
- mvaddstr (20, 35, " ");
- refresh ();
- do {
- mvaddch (20, 11, ' ');
- move (20, 11);
- refresh ();
- row=toupper(getch());
- if (row == 'Q') {
- endwin ();
- exit (1);
- }
- } while ((row < 'A') || (row > 'H'));
- addch (row);
- move (20, 35);
- refresh ();
- do {
- column=getch();
- if (column == '\033') break;
- } while ((column < '1') || (column > '8'));
- if (column != '\033') addch (column);
- } while (column == '\033');
- refresh();
- rw = row - 'A';
- col= column - '1';
- j = 8 * rw + col;
-}
-
-void
-putstars () /* place the stars, update board & currents */
-{
- mvaddch (2*curow+2, 38, ' ');
- mvaddch (2*rw+2, 38, '<');
- mvaddch (18, curcol*4+7, ' ');
- mvaddch (18, col*4+7, '^');
- curow = rw;
- curcol= col;
- mvaddstr (2 * rw + 2, 4*col+6, "***");
- mvaddch (14, 61, row);
- mvaddch (16, 61, column);
- refresh ();
- board[j] = 1;
-}
-
-int
-evalmove() /* convert row and column to integers */
- /* and evaluate move */
-{
- rdif = rw - curow;
- cdif = col - curcol;
- rdif = abs(rw - curow);
- cdif = abs(col - curcol);
- refresh ();
- if ((rdif == 1) && (cdif == 2)) if (board [j] == 0) return (1);
- if ((rdif == 2) && (cdif == 1)) if (board [j] == 0) return (1);
- return (0);
-}
-
-int
-chkmoves () /* check to see if valid moves are available */
-{
- if (chksqr(2,1)) return (1);
- if (chksqr(2,-1)) return (1);
- if (chksqr(-2,1)) return (1);
- if (chksqr(-2,-1)) return (1);
- if (chksqr(1,2)) return (1);
- if (chksqr(1,-2)) return (1);
- if (chksqr(-1,2)) return (1);
- if (chksqr(-1,-2)) return (1);
- return (0);
-}
-
-int
-endgame () /* check for filled board or not */
-{
- rw = 0;
- for (j = 0; j < 64; j++) if (board[j] != 0) rw+=1;
- if (rw == 64) mvaddstr (20, 20, "Congratulations !! You got 'em all");
- else mvprintw (20, 20, "You have ended up with %2d squares",rw);
- mvaddstr (21, 25, "Play again ? (y/n) ");
- refresh ();
- if ((row=tolower(getch())) == 'y') return (1);
- else return (0);
-}
-
-#ifndef abs
-abs(num)
-int num;
-{
- if (num < 0) return (-num);
- else return (num);
-}
-#endif
-
-int
-chksqr (int n1, int n2)
-{
-int r1, c1;
-
- r1 = rw + n1;
- c1 = col + n2;
- if ((r1<0) || (r1>7)) return (0);
- if ((c1<0) || (c1>7)) return (0);
- if (board[r1*8+c1] == 0) return (1);
- else return (0);
-}
-
-void
-instruct()
-{
-int i;
-
- clear ();
- for (i=0;;i++) {
- if ((strcmp(instructions[i],"END"))) mvaddstr (i, 0, instructions[i]);
- else {
- mvaddstr (23, 25, "Ready to play ? (y/n) ");
- refresh();
- if (toupper(getch()) == 'Y') {
- clear ();
- return;
- } else {
- clear ();
- refresh ();
- endwin ();
- exit (0);
- }
- }
- }
-}
-
-void
-title (y,x)
-int y,x;
-{
-char c;
-
- j = 0;
- do {
- c = script[j];
- if (c == 0) break ;
- mvaddch (ypos[j]+y, xpos[j]+x, c);
- j++;
- } while (c != 0);
- refresh ();
-}
-
-
diff --git a/lib/libncurses/TESTS/ncurses.c b/lib/libncurses/TESTS/ncurses.c
deleted file mode 100644
index 9151236..0000000
--- a/lib/libncurses/TESTS/ncurses.c
+++ /dev/null
@@ -1,1121 +0,0 @@
-/****************************************************************************
-
-NAME
- ncurses.c --- ncurses library exerciser
-
-SYNOPSIS
- ncurses
-
-DESCRIPTION
- An interactive test module for the ncurses library.
-
-AUTHOR
- This software is Copyright (C) 1993 by Eric S. Raymond, all rights reserved.
-It is issued with ncurses under the same terms and conditions as the ncurses
-library source.
-
-***************************************************************************/
-/*LINTLIBRARY */
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <assert.h>
-#include <ncurses.h>
-
-#define P(s) printw("%s\n", s)
-#ifndef CTRL
-#define CTRL(x) ((x) & 0x1f)
-#endif
-
-/****************************************************************************
- *
- * Character input test
- *
- ****************************************************************************/
-
-static void getch_test(void)
-/* test the keypad feature */
-{
-char buf[BUFSIZ];
-unsigned int c;
-int incount = 0, firsttime = 0;
-bool blocking = TRUE;
-
- refresh();
-
- (void) printw("Delay in 10ths of a second (<CR> for blocking input)? ");
- echo();
- getstr(buf);
- noecho();
-
- if (isdigit(buf[0]))
- {
- timeout(atoi(buf) * 100);
- blocking = FALSE;
- }
-
- c = '?';
- for (;;)
- {
- if (firsttime++)
- {
- printw("Key pressed: %04o ", c);
- if (c >= KEY_MIN)
- {
- (void) addstr(keyname(c));
- addch('\n');
- }
- else if (c > 0x80)
- {
- if (isprint(c & ~0x80))
- (void) printw("M-%c", c);
- else
- (void) printw("M-%s", unctrl(c));
- addstr(" (high-half character)\n");
- }
- else
- {
- if (isprint(c))
- (void) printw("%c (ASCII printable character)\n", c);
- else
- (void) printw("%s (ASCII control character)\n", unctrl(c));
- }
- }
- if (c == 'x' || c == 'q')
- break;
- if (c == '?')
- addstr("Type any key to see its keypad value, `q' to quit, `?' for help.\n");
-
- while ((c = getch()) == ERR)
- if (!blocking)
- (void) printw("%05d: input timed out\n", incount++);
- }
-
- timeout(-1);
- erase();
- endwin();
-}
-
-static void attr_test(void)
-/* test text attributes */
-{
- refresh();
-
- mvaddstr(0, 20, "Character attribute test display");
-
- mvaddstr(2,8,"This is STANDOUT mode: ");
- attron(A_STANDOUT);
- addstr("abcde fghij klmno pqrst uvwxy x");
- attroff(A_STANDOUT);
-
- mvaddstr(4,8,"This is REVERSE mode: ");
- attron(A_REVERSE);
- addstr("abcde fghij klmno pqrst uvwxy x");
- attroff(A_REVERSE);
-
- mvaddstr(6,8,"This is BOLD mode: ");
- attron(A_BOLD);
- addstr("abcde fghij klmno pqrst uvwxy x");
- attroff(A_BOLD);
-
- mvaddstr(8,8,"This is UNDERLINE mode: ");
- attron(A_UNDERLINE);
- addstr("abcde fghij klmno pqrst uvwxy x");
- attroff(A_UNDERLINE);
-
- mvaddstr(10,8,"This is DIM mode: ");
- attron(A_DIM);
- addstr("abcde fghij klmno pqrst uvwxy x");
- attroff(A_DIM);
-
- mvaddstr(12,8,"This is BLINK mode: ");
- attron(A_BLINK);
- addstr("abcde fghij klmno pqrst uvwxy x");
- attroff(A_BLINK);
-
- mvaddstr(14,8,"This is BOLD UNDERLINE BLINK mode: ");
- attron(A_BOLD|A_BLINK|A_UNDERLINE);
- addstr("abcde fghij klmno pqrst uvwxy x");
- attroff(A_BOLD|A_BLINK|A_UNDERLINE);
-
- attrset(A_NORMAL);
- mvaddstr(16,8,"This is NORMAL mode: ");
- addstr("abcde fghij klmno pqrst uvwxy x");
-
- refresh();
-
- move(LINES - 1, 0);
- addstr("Press any key to continue... ");
- (void) getch();
-
- erase();
- endwin();
-}
-
-/****************************************************************************
- *
- * Color support tests
- *
- ****************************************************************************/
-
-static char *colors[] =
-{
- "black",
- "red",
- "green",
- "yellow",
- "blue",
- "magenta",
- "cyan",
- "white"
-};
-
-static void color_test(void)
-/* generate a color test pattern */
-{
- int i;
-
- refresh();
- (void) printw("There are %d color pairs\n", COLOR_PAIRS);
-
- (void) mvprintw(1, 0,
- "%dx%d matrix of foreground/background colors, bright *off*\n",
- COLORS, COLORS);
- for (i = 0; i < COLORS; i++)
- mvaddstr(2, (i+1) * 8, colors[i]);
- for (i = 0; i < COLORS; i++)
- mvaddstr(3 + i, 0, colors[i]);
- for (i = 1; i < COLOR_PAIRS; i++)
- {
- init_pair(i, i % COLORS, i / COLORS);
- attron(COLOR_PAIR(i));
- mvaddstr(3 + (i / COLORS), (i % COLORS + 1) * 8, "Hello");
- attrset(A_NORMAL);
- }
-
- (void) mvprintw(COLORS + 4, 0,
- "%dx%d matrix of foreground/background colors, bright *on*\n",
- COLORS, COLORS);
- for (i = 0; i < COLORS; i++)
- mvaddstr(5 + COLORS, (i+1) * 8, colors[i]);
- for (i = 0; i < COLORS; i++)
- mvaddstr(6 + COLORS + i, 0, colors[i]);
- for (i = 1; i < COLOR_PAIRS; i++)
- {
- init_pair(i, i % COLORS, i / COLORS);
- attron(COLOR_PAIR(i) | A_BOLD);
- mvaddstr(6 + COLORS + (i / COLORS), (i % COLORS + 1) * 8, "Hello");
- attrset(A_NORMAL);
- }
-
- move(LINES - 1, 0);
- addstr("Press any key to continue... ");
- (void) getch();
-
- erase();
- endwin();
-}
-
-static void color_edit(void)
-/* display the color test pattern, without trying to edit colors */
-{
- int i, c, value = 0, current = 0, field = 0, usebase = 0;
-
- refresh();
-
- for (i = 0; i < COLORS; i++)
- init_pair(i, COLOR_WHITE, i);
-
- do {
- short red, green, blue;
-
- attron(A_BOLD);
- mvaddstr(0, 20, "Color RGB Value Editing");
- attroff(A_BOLD);
-
- for (i = 0; i < COLORS; i++)
- {
- mvprintw(2 + i, 0, "%c %-8s:",
- (i == current ? '>' : ' '),
- (i < sizeof(colors)/sizeof(colors[0]) ? colors[i] : ""));
- attrset(COLOR_PAIR(i));
- addstr(" ");
- attrset(A_NORMAL);
-
- /*
- * Note: this refresh should *not* be necessary! It works around
- * a bug in attribute handling that apparently causes the A_NORMAL
- * attribute sets to interfere with the actual emission of the
- * color setting somehow. This needs to be fixed.
- */
- refresh();
-
- color_content(i, &red, &green, &blue);
- addstr(" R = ");
- if (current == i && field == 0) attron(A_STANDOUT);
- printw("%04d", red);
- if (current == i && field == 0) attrset(A_NORMAL);
- addstr(", G = ");
- if (current == i && field == 1) attron(A_STANDOUT);
- printw("%04d", green);
- if (current == i && field == 1) attrset(A_NORMAL);
- addstr(", B = ");
- if (current == i && field == 2) attron(A_STANDOUT);
- printw("%04d", blue);
- if (current == i && field == 2) attrset(A_NORMAL);
- attrset(A_NORMAL);
- addstr(")");
- }
-
- mvaddstr(COLORS + 3, 0,
- "Use up/down to select a color, left/right to change fields.");
- mvaddstr(COLORS + 4, 0,
- "Modify field by typing nnn=, nnn-, or nnn+. ? for help.");
-
- move(2 + current, 0);
-
- switch (c = getch())
- {
- case KEY_UP:
- current = (current == 0 ? (COLORS - 1) : current - 1);
- value = 0;
- break;
-
- case KEY_DOWN:
- current = (current == (COLORS - 1) ? 0 : current + 1);
- value = 0;
- break;
-
- case KEY_RIGHT:
- field = (field == 2 ? 0 : field + 1);
- value = 0;
- break;
-
- case KEY_LEFT:
- field = (field == 0 ? 2 : field - 1);
- value = 0;
- break;
-
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- do {
- value = value * 10 + (c - '0');
- c = getch();
- } while
- (isdigit(c));
- if (c != '+' && c != '-' && c != '=')
- beep();
- else
- ungetch(c);
- break;
-
- case '+':
- usebase = 1;
- goto changeit;
-
- case '-':
- value = -value;
- usebase = 1;
- goto changeit;
-
- case '=':
- usebase = 0;
- changeit:
- color_content(current, &red, &green, &blue);
- if (field == 0)
- red = red * usebase + value;
- else if (field == 1)
- green = green * usebase + value;
- else if (field == 2)
- blue = blue * usebase + value;
- init_color(current, red, green, blue);
- break;
-
- case '?':
- erase();
- P(" RGB Value Editing Help");
- P("");
- P("You are in the RGB value editor. Use the arrow keys to select one of");
- P("the fields in one of the RGB triples of the current colors; the one");
- P("currently selected will be reverse-video highlighted.");
- P("");
- P("To change a field, enter the digits of the new value; they won't be");
- P("echoed. Finish by typing `='; the change will take effect instantly.");
- P("To increment or decrement a value, use the same procedure, but finish");
- P("with a `+' or `-'.");
- P("");
- P("To quit, do `x' or 'q'");
-
- move(LINES - 1, 0);
- addstr("Press any key to continue... ");
- (void) getch();
- erase();
- break;
-
- case 'x':
- case 'q':
- break;
-
- default:
- beep();
- break;
- }
- } while
- (c != 'x' && c != 'q');
-
- erase();
- endwin();
-}
-
-/****************************************************************************
- *
- * Soft-key label test
- *
- ****************************************************************************/
-
-static void slk_test(void)
-/* exercise the soft keys */
-{
- int c, fmt = 1;
- char buf[9];
-
- c = CTRL('l');
- do {
- switch(c)
- {
- case CTRL('l'):
- erase();
- attron(A_BOLD);
- mvaddstr(0, 20, "Soft Key Exerciser");
- attroff(A_BOLD);
-
- move(2, 0);
- P("Available commands are:");
- P("");
- P("^L -- refresh screen");
- P("a -- activate or restore soft keys");
- P("d -- disable soft keys");
- P("c -- set centered format for labels");
- P("l -- set left-justified format for labels");
- P("r -- set right-justified format for labels");
- P("[12345678] -- set label; labels are numbered 1 through 8");
- P("e -- erase stdscr (should not erase labels)");
- P("s -- test scrolling of shortened screen");
- P("x, q -- return to main menu");
- P("");
- P("Note: if activating the soft keys causes your terminal to");
- P("scroll up one line, your terminal auto-scrolls when anything");
- P("is written to the last screen position. The ncurses code");
- P("does not yet handle this gracefully.");
- refresh();
- /* fall through */
-
- case 'a':
- slk_restore();
- break;
-
- case 'e':
- wclear(stdscr);
- break;
-
- case 's':
- move(20, 0);
- while ((c = getch()) != 'Q')
- addch(c);
- break;
-
- case 'd':
- slk_clear();
- break;
-
- case 'l':
- fmt = 0;
- break;
-
- case 'c':
- fmt = 1;
- break;
-
- case 'r':
- fmt = 2;
- break;
-
- case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8':
- (void) mvaddstr(20, 0, "Please enter the label value: ");
- wgetnstr(stdscr, buf, 8);
- slk_set((c - '0'), buf, fmt);
- slk_refresh();
- break;
-
- case 'x':
- case 'q':
- goto done;
-
- default:
- beep();
- }
- } while
- ((c = getch()) != EOF);
-
- done:
- erase();
- endwin();
-}
-
-/****************************************************************************
- *
- * Alternate character-set stuff
- *
- ****************************************************************************/
-
-static void acs_display()
-/* display the ACS character set */
-{
- int i, j;
-
- erase();
- attron(A_BOLD);
- mvaddstr(0, 20, "Display of the ACS Character Set");
- attroff(A_BOLD);
- refresh();
-
-#define ACSY 2
- mvaddstr(ACSY + 0, 0, "ACS_ULCORNER: "); addch(ACS_ULCORNER);
- mvaddstr(ACSY + 1, 0, "ACS_LLCORNER: "); addch(ACS_LLCORNER);
- mvaddstr(ACSY + 2, 0, "ACS_URCORNER: "); addch(ACS_URCORNER);
- mvaddstr(ACSY + 3, 0, "ACS_LRCORNER: "); addch(ACS_LRCORNER);
- mvaddstr(ACSY + 4, 0, "ACS_RTEE: "); addch(ACS_RTEE);
- mvaddstr(ACSY + 5, 0, "ACS_LTEE: "); addch(ACS_LTEE);
- mvaddstr(ACSY + 6, 0, "ACS_BTEE: "); addch(ACS_BTEE);
- mvaddstr(ACSY + 7, 0, "ACS_TTEE: "); addch(ACS_TTEE);
- mvaddstr(ACSY + 8, 0, "ACS_HLINE: "); addch(ACS_HLINE);
- mvaddstr(ACSY + 9, 0, "ACS_VLINE: "); addch(ACS_VLINE);
- mvaddstr(ACSY + 10,0, "ACS_PLUS: "); addch(ACS_PLUS);
- mvaddstr(ACSY + 11,0, "ACS_S1: "); addch(ACS_S1);
- mvaddstr(ACSY + 12,0, "ACS_S9: "); addch(ACS_S9);
-
- mvaddstr(ACSY + 0, 40, "ACS_DIAMOND: "); addch(ACS_DIAMOND);
- mvaddstr(ACSY + 1, 40, "ACS_CKBOARD: "); addch(ACS_CKBOARD);
- mvaddstr(ACSY + 2, 40, "ACS_DEGREE: "); addch(ACS_DEGREE);
- mvaddstr(ACSY + 3, 40, "ACS_PLMINUS: "); addch(ACS_PLMINUS);
- mvaddstr(ACSY + 4, 40, "ACS_BULLET: "); addch(ACS_BULLET);
- mvaddstr(ACSY + 5, 40, "ACS_LARROW: "); addch(ACS_LARROW);
- mvaddstr(ACSY + 6, 40, "ACS_RARROW: "); addch(ACS_RARROW);
- mvaddstr(ACSY + 7, 40, "ACS_DARROW: "); addch(ACS_DARROW);
- mvaddstr(ACSY + 8, 40, "ACS_UARROW: "); addch(ACS_UARROW);
- mvaddstr(ACSY + 9, 40, "ACS_BOARD: "); addch(ACS_BOARD);
- mvaddstr(ACSY + 10,40, "ACS_LANTERN: "); addch(ACS_LANTERN);
- mvaddstr(ACSY + 11,40, "ACS_BLOCK: "); addch(ACS_BLOCK);
-
-#define HYBASE (ACSY + 13)
- mvprintw(HYBASE + 1, 0, "High-half characters via echochar:\n");
- for (i = 0; i < 4; i++)
- {
- move(HYBASE + i + 3, 24);
- for (j = 0; j < 32; j++)
- echochar(128 + 32 * i + j);
- }
-
- move(LINES - 1, 0);
- addstr("Press any key to continue... ");
- (void) getch();
-
- erase();
- endwin();
-}
-
-/****************************************************************************
- *
- * Windows and scrolling tester.
- *
- ****************************************************************************/
-
-typedef struct
-{
- int y, x;
-}
-pair;
-
-static void report(void)
-/* report on the cursor's current position, then restore it */
-{
- int y, x;
-
- getyx(stdscr, y, x);
- move(LINES - 1, COLS - 17);
- printw("Y = %2d X = %2d", y, x);
- move(y, x);
-}
-
-static pair *selectcell(uli, ulj, lri, lrj)
-/* arrows keys move cursor, return location at current on non-arrow key */
-int uli, ulj, lri, lrj; /* co-ordinates of corners */
-{
- static pair res; /* result cell */
- int si = lri - uli + 1; /* depth of the select area */
- int sj = lrj - ulj + 1; /* width of the select area */
- int i = 0, j = 0; /* offsets into the select area */
-
- for (;;)
- {
- move(LINES - 1, COLS - 17);
- printw("Y = %2d X = %2d", uli + i, ulj + j);
- move(uli + i, ulj + j);
-
- switch(getch())
- {
- case KEY_UP: i += si - 1; break;
- case KEY_DOWN: i++; break;
- case KEY_LEFT: j += sj - 1; break;
- case KEY_RIGHT: j++; break;
- case '\004': return((pair *)NULL);
- default: res.y = uli + i; res.x = ulj + j; return(&res);
- }
- i %= si;
- j %= sj;
- }
-}
-
-static WINDOW *getwindow(void)
-/* Ask user for a window definition */
-{
- WINDOW *rwindow, *bwindow;
- pair ul, lr, *tmp;
-
- move(0, 0); clrtoeol();
- addstr("Use arrows to move cursor, anything else to mark corner 1");
- refresh();
- if ((tmp = selectcell(1, 0, LINES-1, COLS-1)) == (pair *)NULL)
- return((WINDOW *)NULL);
- memcpy(&ul, tmp, sizeof(pair));
- addch(ACS_ULCORNER);
- move(0, 0); clrtoeol();
- addstr("Use arrows to move cursor, anything else to mark corner 2");
- refresh();
- if ((tmp = selectcell(ul.y, ul.x, LINES-1, COLS-1)) == (pair *)NULL)
- return((WINDOW *)NULL);
- memcpy(&lr, tmp, sizeof(pair));
-
- rwindow = newwin(lr.y - ul.y + 1, lr.x - ul.x + 1, ul.y, ul.x);
-
- bwindow = newwin(lr.y - ul.y + 3, lr.x - ul.x + 3, ul.y - 1, ul.x - 1);
- wborder(bwindow, ACS_VLINE, ACS_VLINE, ACS_HLINE, ACS_HLINE,
- 0, 0, 0, 0);
- wrefresh(bwindow);
- delwin(bwindow);
-
- scrollok(rwindow, TRUE);
-/* immedok(rwindow); */
- wrefresh(rwindow);
-
- return(rwindow);
-}
-
-static void acs_and_scroll()
-/* Demonstrate windows */
-{
- int c;
- struct frame
- {
- struct frame *next, *last;
- WINDOW *wind;
- }
- *oldw = (struct frame *)NULL, *current = (struct frame *)NULL, *neww;
-
- refresh();
- mvaddstr(LINES - 2, 0,
- "F1 = make new window, F2 = next window, F3 = previous window, Ctrl-D = exit");
- mvaddstr(LINES - 1, 0,
- "All other characters are echoed, windows should scroll.");
-
- c = KEY_F(1);
- do {
- report();
- if (current)
- wrefresh(current->wind);
-
- switch(c)
- {
- case KEY_F(1):
- neww = (struct frame *) malloc(sizeof(struct frame));
- if ((neww->wind = getwindow()) == (WINDOW *)NULL)
- goto breakout;
- if (oldw == NULL) /* First element, */
- {
- neww->next = neww; /* so point it at itself */
- neww->last = neww;
- current = neww;
- }
- else
- {
- neww->last = oldw; oldw->next = neww;
- neww->next = current; current->last = neww;
- }
- oldw = neww;
- keypad(neww->wind, TRUE);
- break;
-
- case KEY_F(2):
- current = current->next;
- break;
-
- case KEY_F(3):
- current = current->last;
- break;
-
- case KEY_F(4): /* undocumented --- use this to test area clears */
- selectcell(0, 0, LINES - 1, COLS - 1);
- clrtobot();
- refresh();
- break;
-
- case '\r':
- c = '\n';
- /* FALLTHROUGH */
-
- default:
- waddch(current->wind, c);
- break;
- }
- report();
- wrefresh(current->wind);
- } while
- ((c = wgetch(current->wind)) != '\004');
-
- breakout:
- erase();
- endwin();
-}
-
-#define GRIDSIZE 5
-
-static void panner(WINDOW *pad, int iy, int ix, int (*pgetc)(void))
-{
- static int porty, portx, basex = 0, basey = 0;
- int pxmax, pymax, c;
- WINDOW *vscroll = (WINDOW *)NULL, *hscroll = (WINDOW *)NULL;
-
- porty = iy; portx = ix;
-
- getmaxyx(pad, pymax, pxmax);
-
- if (pymax > porty)
- vscroll = newwin(porty - (pxmax > ix), 1, 0, portx - (pymax > iy));
- if (pxmax > portx)
- hscroll = newwin(1, portx - (pymax > iy), porty - (pxmax > ix), 0);
-
- c = KEY_REFRESH;
- do {
- switch(c)
- {
- case KEY_REFRESH:
- /* do nothing */
- break;
-
- case KEY_IC:
- if (portx >= pxmax || portx >= ix)
- beep();
- else
- {
- mvwin(vscroll, 0, ++portx - 1);
- delwin(hscroll);
- hscroll = newwin(1, portx - (pymax > porty),
- porty - (pxmax > portx), 0);
- }
- break;
-
- case KEY_IL:
- if (porty >= pymax || porty >= iy)
- beep();
- else
- {
- mvwin(hscroll, ++porty - 1, 0);
- delwin(vscroll);
- vscroll = newwin(porty - (pxmax > portx), 1,
- 0, portx - (pymax > porty));
- }
- break;
-
- case KEY_DC:
- if (portx <= 0)
- beep();
- else
- {
- mvwin(vscroll, 0, --portx - 1);
- delwin(hscroll);
- hscroll = newwin(1, portx - (pymax > porty),
- porty - (pxmax > portx), 0);
- }
- break;
-
- case KEY_DL:
- if (porty <= 0)
- beep();
- else
- {
- mvwin(hscroll, --porty - 1, 0);
- delwin(vscroll);
- vscroll = newwin(porty - (pxmax > portx), 1,
- 0, portx - (pymax > porty));
- }
- break;
-
- case KEY_LEFT:
- if (basex > 0)
- basex--;
- else
- beep();
- break;
-
- case KEY_RIGHT:
- if (basex + portx < pxmax)
- basex++;
- else
- beep();
- break;
-
- case KEY_UP:
- if (basey > 0)
- basey--;
- else
- beep();
- break;
-
- case KEY_DOWN:
- if (basey + porty < pymax)
- basey++;
- else
- beep();
- break;
- }
-
- prefresh(pad,
- basey, basex,
- 0, 0,
- porty - (hscroll != (WINDOW *)NULL) - 1,
- portx - (vscroll != (WINDOW *)NULL) - 1);
- if (vscroll)
- {
- int lowend, i, highend;
-
- lowend = basey * ((float)porty / (float)pymax);
- highend = (basey + porty) * ((float)porty / (float)pymax);
-
- touchwin(vscroll);
- for (i = 0; i < lowend; i++)
- mvwaddch(vscroll, i, 0, ACS_VLINE);
- wattron(vscroll, A_REVERSE);
- for (i = lowend; i <= highend; i++)
- mvwaddch(vscroll, i, 0, ' ');
- wattroff(vscroll, A_REVERSE);
- for (i = highend + 1; i < porty; i++)
- mvwaddch(vscroll, i, 0, ACS_VLINE);
- wrefresh(vscroll);
- }
- if (hscroll)
- {
- int lowend, j, highend;
-
- lowend = basex * ((float)portx / (float)pxmax);
- highend = (basex + portx) * ((float)portx / (float)pxmax);
-
- touchwin(hscroll);
- for (j = 0; j < lowend; j++)
- mvwaddch(hscroll, 0, j, ACS_HLINE);
- wattron(hscroll, A_REVERSE);
- for (j = lowend; j <= highend; j++)
- mvwaddch(hscroll, 0, j, ' ');
- wattroff(hscroll, A_REVERSE);
- for (j = highend + 1; j < portx; j++)
- mvwaddch(hscroll, 0, j, ACS_HLINE);
- wrefresh(hscroll);
- }
- mvaddch(porty - 1, portx - 1, ACS_LRCORNER);
-
- } while
- ((c = pgetc()) != KEY_EXIT);
-}
-
-int padgetch(void)
-{
- int c;
-
- switch(c = getch())
- {
- case 'u': return(KEY_UP);
- case 'd': return(KEY_DOWN);
- case 'r': return(KEY_RIGHT);
- case 'l': return(KEY_LEFT);
- case '+': return(KEY_IL);
- case '-': return(KEY_DL);
- case '>': return(KEY_IC);
- case '<': return(KEY_DC);
- default: return(c);
- }
-}
-
-static void demo_pad(void)
-/* Demonstrate pads. */
-{
- int i, j, gridcount = 0;
- WINDOW *panpad = newpad(200, 200);
-
- for (i = 0; i < 200; i++)
- {
- for (j = 0; j < 200; j++)
- if (i % GRIDSIZE == 0 && j % GRIDSIZE == 0)
- {
- if (i == 0 || j == 0)
- waddch(panpad, '+');
- else
- waddch(panpad, 'A' + (gridcount++ % 26));
- }
- else if (i % GRIDSIZE == 0)
- waddch(panpad, '-');
- else if (j % GRIDSIZE == 0)
- waddch(panpad, '|');
- else
- waddch(panpad, ' ');
- }
- mvprintw(LINES - 3, 0, "Use arrow keys to pan over the test pattern");
- mvprintw(LINES - 2, 0, "Use +,- to grow/shrink the panner vertically.");
- mvprintw(LINES - 1, 0, "Use <,> to grow/shrink the panner horizontally.");
- panner(panpad, LINES - 4, COLS, padgetch);
-
- endwin();
- erase();
-}
-
-/****************************************************************************
- *
- * Tests from John Burnell's PDCurses tester
- *
- ****************************************************************************/
-
-static void Continue (WINDOW *win)
-{
- wmove(win, 10, 1);
- mvwaddstr(win, 10, 1, " Press any key to continue");
- wrefresh(win);
- wgetch(win);
-}
-
-static void input_test(WINDOW *win)
-/* Input test, adapted from John Burnell's PDCurses tester */
-{
- int w, h, bx, by, sw, sh, i;
- WINDOW *subWin;
- wclear (win);
-#ifdef FOO
- char buffer [80];
- int num;
-#endif /* FOO */
-
- w = win->_maxx;
- h = win->_maxy;
- bx = win->_begx;
- by = win->_begy;
- sw = w / 3;
- sh = h / 3;
- if((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) == NULL)
- return;
-
-#ifdef A_COLOR
- if (has_colors())
- {
- init_pair(2,COLOR_CYAN,COLOR_BLUE);
- wattrset(subWin, COLOR_PAIR(2) | A_BOLD);
- }
- else
- wattrset(subWin, A_BOLD);
-#else
- wattrset(subWin, A_BOLD);
-#endif
- box(subWin, ACS_VLINE, ACS_HLINE);
-#ifdef FOO
- mvwaddstr(subWin, 2, 1, "This is a subwindow");
-#endif /* FOO */
- wrefresh(win);
-
- nocbreak();
- mvwaddstr(win, 1, 1, "Type random keys for 5 seconds.");
- mvwaddstr(win, 2, 1,
- "These should be discarded (not echoed) after the subwindow goes away.");
- wrefresh(win);
-
- for (i = 0; i < 5; i++)
- {
- mvwprintw (subWin, 1, 1, "Time = %d", i);
- wrefresh(subWin);
- sleep(1);
- flushinp();
- }
-
- delwin (subWin);
- werase(win);
- flash();
- wrefresh(win);
- sleep(1);
-
- mvwaddstr(win, 2, 1, "Press a key");
- wmove(win, 9, 10);
- wrefresh(win);
- echo();
- wgetch(win);
- flushinp();
- mvwaddstr(win, 12, 0,
- "If you see any key other than what you typed, flushinp() is broken.");
- Continue(win);
-
- wmove(win, 9, 10);
- wdelch(win);
- wrefresh(win);
- wmove(win, 12, 0);
- clrtoeol();
- waddstr(win,
- "What you typed should now have been deleted; if not, wdelch() failed.");
- Continue(win);
-
-#ifdef FOO
- /*
- * This test won't be portable until vsscanf() is
- */
- mvwaddstr(win, 6, 2, "Enter a number then a string separated by space");
- echo();
- mvwscanw(win, 7, 6, "%d %s", &num,buffer);
- mvwprintw(win, 8, 6, "String: %s Number: %d", buffer,num);
-#endif /* FOO */
-
- Continue(win);
-}
-
-/****************************************************************************
- *
- * Main sequence
- *
- ****************************************************************************/
-
-bool do_single_test(const char c)
-/* perform a single specified test */
-{
- switch (c)
- {
- case 'a':
- getch_test();
- return(TRUE);
-
- case 'b':
- attr_test();
- return(TRUE);
-
- case 'c':
- if (!has_colors())
- (void) printf("This %s terminal does not support color.\n",
- getenv("TERM"));
- else
- color_test();
- return(TRUE);
-
- case 'd':
- if (!has_colors())
- (void) printf("This %s terminal does not support color.\n",
- getenv("TERM"));
- else if (!can_change_color())
- (void) printf("This %s terminal has hardwired color values.\n",
- getenv("TERM"));
- else
- color_edit();
- return(TRUE);
-
- case 'e':
- slk_test();
- return(TRUE);
-
- case 'f':
- acs_display();
- return(TRUE);
-
- case 'g':
- acs_and_scroll();
- return(TRUE);
-
- case 'p':
- demo_pad();
- return(TRUE);
-
- case 'i':
- input_test(stdscr);
- return(TRUE);
-
- case '?':
- (void) puts("This is the ncurses capability tester.");
- (void) puts("You may select a test from the main menu by typing the");
- (void) puts("key letter of the choice (the letter to left of the =)");
- (void) puts("at the > prompt. The commands `x' or `q' will exit.");
- return(TRUE);
- }
-
- return(FALSE);
-}
-
-int main(const int argc, const char *argv[])
-{
- char buf[BUFSIZ];
-
- /* enable debugging */
- trace(TRACE_ORDINARY);
-
- /* tell it we're going to play with soft keys */
- slk_init(1);
-
- /* we must initialize the curses data structure only once */
- initscr();
-
- /* tests, in general, will want these modes */
- start_color();
- cbreak();
- noecho();
- scrollok(stdscr, TRUE);
- keypad(stdscr, TRUE);
-
- /*
- * Return to terminal mode, so we're guaranteed of being able to
- * select terminal commands even if the capabilities are wrong.
- */
- endwin();
-
- (void) puts("Welcome to ncurses. Press ? for help.");
-
- do {
- (void) puts("This is the ncurses main menu");
- (void) puts("a = character input test");
- (void) puts("b = character attribute test");
- (void) puts("c = color test pattern");
- (void) puts("d = edit RGB color values");
- (void) puts("e = exercise soft keys");
- (void) puts("f = display ACS characters");
- (void) puts("g = display windows and scrolling");
- (void) puts("p = exercise pad features");
- (void) puts("i = subwindow input test");
- (void) puts("? = get help");
-
- (void) fputs("> ", stdout);
- (void) fflush(stdout); /* necessary under SVr4 curses */
- (void) fgets(buf, BUFSIZ, stdin);
-
- if (do_single_test(buf[0])) {
- clear();
- refresh();
- endwin();
- continue;
- }
- } while
- (buf[0] != 'q' && buf[0] != 'x');
-
- exit(0);
-}
-
-/* ncurses.c ends here */
diff --git a/lib/libncurses/TESTS/newdemo.c b/lib/libncurses/TESTS/newdemo.c
deleted file mode 100644
index 5573557..0000000
--- a/lib/libncurses/TESTS/newdemo.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/* $Header: /home/ncvs/src/lib/libncurses/TESTS/newdemo.c,v 1.1.1.1 1994/10/07 08:58:56 ache Exp $
- *
- * newdemo.c - A demo program using PDCurses. The program illustrate
- * the use of colours for text output.
- */
-
-#include <stdio.h>
-#include <signal.h>
-#include <time.h>
-#include <ncurses.h>
-
-#define delay_output(x)
-
-/*
- * The Australian map
- */
-char *AusMap[16] =
-{
- " A A ",
- " N.T. AAAAA AAAA ",
- " AAAAAAAAAAA AAAAAAAA ",
- " AAAAAAAAAAAAAAAAAAAAAAAAA Qld.",
- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA ",
- "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ",
- " AAAAAAAAAAAAAAAAAAAAAAAAAAAA ",
- " AAAAAAAAAAAAAAAAAAAAAAAAA N.S.W.",
- "W.A. AAAAAAAAA AAAAAA Vic.",
- " AAA S.A. AA",
- " A Tas.",
- ""
-};
-
-/*
- * Funny messages
- */
-#define NMESSAGES 6
-
-char *messages[] =
-{
- "Hello from the Land Down Under",
- "The Land of crocs. and a big Red Rock",
- "Where the sunflower runs along the highways",
- "the dusty red roads lead one to loneliness",
- "Blue sky in the morning and",
- "freezing nights and twinkling stars",
- ""
-};
-
-/*
- * Main driver
- */
-main()
-{
-WINDOW *win;
-int w, x, y, i, j, c, len;
-time_t t;
-char buffer[80], *message;
-int width, height;
-chtype save[80];
-void trap();
-
- initscr();
- start_color();
- cbreak();
- signal(SIGINT, trap);
- width = 48;
- height = 14; /* Create a drawing window */
- win = newwin(height, width, (LINES-height)/2, (COLS-width)/2);
- if(win == NULL)
- { endwin();
- return 1;
- }
-
- while(1)
- { init_pair(1,COLOR_WHITE,COLOR_BLUE);
- wattrset(win, COLOR_PAIR(1));
- werase(win);
-
- init_pair(2,COLOR_RED,COLOR_RED);
- wattrset(win, COLOR_PAIR(2));
- box(win, ACS_VLINE, ACS_HLINE);
- wrefresh(win);
- /* Do ramdom output of a character */
- wattrset(win, COLOR_PAIR(1));
- c = 'a';
- for(i=0; i < 5000; ++i)
- { x = rand() % (width-2) + 1;
- y = rand() % (height-2) + 1;
- mvwaddch(win, y, x, c);
- wrefresh(win);
- nodelay(win,TRUE);
- if (wgetch(win) != ERR)
- break;
- if(i == 2000)
- { c = 'b';
- init_pair(3,COLOR_CYAN,COLOR_YELLOW);
- wattron(win, COLOR_PAIR(3));
- }
- }
-
- SubWinTest(win);
- /* Erase and draw green window */
- init_pair(4,COLOR_YELLOW,COLOR_GREEN);
- wattrset(win, COLOR_PAIR(4) | A_BOLD);
- werase(win);
- wrefresh(win);
- /* Draw RED bounding box */
- wattrset(win, COLOR_PAIR(2));
- box(win, ' ', ' ');
- wrefresh(win);
- /* Display Australia map */
- wattrset(win, COLOR_PAIR(4) | A_BOLD);
- i = 0;
- while(*AusMap[i])
- { mvwaddstr(win, i+1, 8, AusMap[i]);
- wrefresh(win);
- delay_output(100);
- ++i;
- }
-
- init_pair(5,COLOR_BLUE,COLOR_WHITE);
- wattrset(win, COLOR_PAIR(5) | A_BLINK);
- mvwaddstr(win, height-2, 6, " PDCurses 2.1 for DOS, OS/2 and Unix");
- wrefresh(win);
-
- /* Draw running messages */
- init_pair(6,COLOR_YELLOW,COLOR_WHITE);
- wattrset(win, COLOR_PAIR(6));
- message = messages[0];
- len = strlen(message);
- j = 0;
- i = 2;
- w = width-2;
- while(j < NMESSAGES)
- { strncpy(buffer, message, w - i);
- buffer[w-i] = 0;
- mvwaddstr(win, height/2, i, buffer);
- if(w - i < len)
- { memset(buffer, ' ', i);
- strcpy(buffer, message + (w - i));
- buffer[strlen(buffer)] = ' ';
- buffer[i-2] = '\0';
- mvwaddstr(win, height/2, 2, buffer);
- }
- wrefresh(win);
- nodelay(win,TRUE);
- if (wgetch(win) != ERR)
- { flushinp();
- break;
- }
- mvwaddch(win, height/2, i, ' ');
- i = ++i % w;
- if(i < 2)
- { message = messages[++j%NMESSAGES];
- memset(buffer, ' ', w-2);
- buffer[w-2] = 0;
- mvwaddstr(win, height/2, 2, buffer);
- i = 2;
- }
- delay_output(300);
- }
-
- j = 0;
- /* Draw running As across in RED */
- init_pair(7,COLOR_RED,COLOR_GREEN);
- wattron(win, COLOR_PAIR(7));
- for(i=2; i < width - 4; ++i)
- { c = mvwinch(win, 4, i);
- save[j++] = c;
- c = c & 0x7f;
- mvwaddch(win, 4, i, c);
- }
- wrefresh(win);
-
- /* Put a message up wait for a key */
- i = height-2;
- wattrset(win, COLOR_PAIR(5));
- mvwaddstr(win, i, 5, " Type a key to continue or 'Q' to quit ");
- wrefresh(win);
-
- if(WaitForUser() == 1)
- break;
-
- j = 0; /* Restore the old line */
- for(i=2; i < width - 4; ++i)
- mvwaddch(win, 4, i, save[j++]);
- wrefresh(win);
-
- BouncingBalls(win);
- /* Put a message up wait for a key */
- i = height-2;
- wattrset(win, COLOR_PAIR(5));
- mvwaddstr(win, i, 5, " Type a key to continue or 'Q' to quit ");
- wrefresh(win);
- if(WaitForUser() == 1)
- break;
- }
-exit:
- endwin();
- return 0;
-}
-
-/*
- * Test sub windows
- */
-SubWinTest(WINDOW *win)
-{
-int w, h, sw, sh, bx, by;
-WINDOW *swin1, *swin2, *swin3;
-
- w = win->_maxx;
- h = win->_maxy;
- bx = win->_begx;
- by = win->_begy;
- sw = w / 3;
- sh = h / 3;
- if((swin1 = subwin(win, sh, sw, by+3, bx+5)) == NULL)
- return 1;
- if((swin2 = subwin(win, sh, sw, by+4, bx+8)) == NULL)
- return 1;
- if((swin3 = subwin(win, sh, sw, by+5, bx+11)) == NULL)
- return 1;
-
- init_pair(8,COLOR_RED,COLOR_BLUE);
- wattrset(swin1, COLOR_PAIR(8));
- werase(swin1);
- mvwaddstr(swin1, 0, 3, "Sub-window 1");
- wrefresh(swin1);
-
- init_pair(8,COLOR_CYAN,COLOR_MAGENTA);
- wattrset(swin2, COLOR_PAIR(8));
- werase(swin2);
- mvwaddstr(swin2, 0, 3, "Sub-window 2");
- wrefresh(swin2);
-
- init_pair(8,COLOR_YELLOW,COLOR_GREEN);
- wattrset(swin3, COLOR_PAIR(8));
- werase(swin3);
- mvwaddstr(swin3, 0, 3, "Sub-window 3");
- wrefresh(swin3);
-
- delwin(swin1);
- delwin(swin2);
- delwin(swin3);
- WaitForUser();
- return 0;
-}
-
-/*
- * Bouncing balls
- */
-BouncingBalls(WINDOW *win)
-{
-chtype c1, c2, c3;
-int w, h;
-int x1, y1, xd1, yd1;
-int x2, y2, xd2, yd2;
-int x3, y3, xd3, yd3;
-
- w = win->_maxx;
- h = win->_maxy;
- x1 = 2 + rand() % (w - 4);
- y1 = 2 + rand() % (h - 4);
- x2 = 2 + rand() % (w - 4);
- y2 = 2 + rand() % (h - 4);
- x3 = 2 + rand() % (w - 4);
- y3 = 2 + rand() % (h - 4);
- xd1 = 1; yd1 = 1;
- xd2 = 1; yd2 = 0;
- xd3 = 0; yd3 = 1;
- nodelay(win,TRUE);
- while(wgetch(win) == ERR)
- { x1 = xd1 > 0 ? ++x1 : --x1;
- if(x1 <= 1 || x1 >= w - 2)
- xd1 = xd1 ? 0 : 1;
- y1 = yd1 > 0 ? ++y1 : --y1;
- if(y1 <= 1 || y1 >= h - 2)
- yd1 = yd1 ? 0 : 1;
-
- x2 = xd2 > 0 ? ++x2 : --x2;
- if(x2 <= 1 || x2 >= w - 2)
- xd2 = xd2 ? 0 : 1;
- y2 = yd2 > 0 ? ++y2 : --y2;
- if(y2 <= 1 || y2 >= h - 2)
- yd2 = yd2 ? 0 : 1;
-
- x3 = xd3 > 0 ? ++x3 : --x3;
- if(x3 <= 1 || x3 >= w - 2)
- xd3 = xd3 ? 0 : 1;
- y3 = yd3 > 0 ? ++y3 : --y3;
- if(y3 <= 1 || y3 >= h - 2)
- yd3 = yd3 ? 0 : 1;
-
- c1 = mvwinch(win, y1, x1);
- c2 = mvwinch(win, y2, x2);
- c3 = mvwinch(win, y3, x3);
-
- init_pair(8,COLOR_RED,COLOR_BLUE);
- wattrset(win, COLOR_PAIR(8));
- mvwaddch(win, y1, x1, 'O');
- init_pair(8,COLOR_BLUE,COLOR_RED);
- wattrset(win, COLOR_PAIR(8));
- mvwaddch(win, y2, x2, '*');
- init_pair(8,COLOR_YELLOW,COLOR_WHITE);
- wattrset(win, COLOR_PAIR(8));
- mvwaddch(win, y3, x3, '@');
- wmove(win, 0, 0);
- wrefresh(win);
- mvwaddch(win, y1, x1, c1);
- mvwaddch(win, y2, x2, c2);
- mvwaddch(win, y3, x3, c3);
- delay_output(150);
- }
- return 0;
-}
-
-/*
- * Wait for user
- */
-int WaitForUser()
-{
- time_t t;
- chtype key;
-
- nodelay(stdscr,TRUE);
- t = time((time_t *)0);
- while(1)
- {
- if ((key = getch()) != ERR)
- {
- if (key == 'q' || key == 'Q')
- return 1;
- else
- return 0;
- }
- if (time((time_t *)0) - t > 5)
- return 0;
- }
-}
-
-/*
- * Trap interrupt
- */
-void trap()
-{
- endwin();
- exit(0);
-}
-
-/* End of DEMO.C */
diff --git a/lib/libncurses/TESTS/over.c b/lib/libncurses/TESTS/over.c
deleted file mode 100644
index 5681916..0000000
--- a/lib/libncurses/TESTS/over.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*********************************************************************
- * [program] overwrite() - Play with overwrite() function to *
- * attempt pop-up windows. *
- * ----------------------------------------------------------------- *
- * [written] 1-Feb-1993 by Neal Ensor (ensor@cs.utk.edu) *
- * ----------------------------------------------------------------- *
- * [notes] Originally written on SVR4 UNIX, then recompiled on *
- * Linux (Slackware 1.1.1, ncurses 1.8.1) *
- * ----------------------------------------------------------------- *
- * [problem] On ncurses, the overwrite() function doesn't seem to *
- * overwrite. Maybe I'm missing something, but this *
- * program in SVR4 displays three windows, waits for a *
- * keypress, then removes the top window. With ncurses, *
- * nothing changes on the display. *
- *********************************************************************/
-
-# include <ncurses.h> /* ncurses include lives here */
-
-main()
-{
- /****************************************************************
- * Declare three little window pointers... *
- ****************************************************************/
- WINDOW *win, *win1, *win2;
-
- /****************************************************************
- * Set up the screen... *
- ****************************************************************/
- initscr();
- /* traceon(); */
- noecho();
- nonl();
- cbreak();
- refresh();
-
- /****************************************************************
- * Draw three overlapping windows. *
- ****************************************************************/
- win=newwin(6,45, 6,6);
- win1=newwin(10,20,5,5);
- win2=newwin(10,30,7,7);
-
- /****************************************************************
- * Box them, and print a hidden message... *
- ****************************************************************/
- box(win, 0, 0);
- box(win1, 0, 0);
- box(win2, 0, 0);
- mvwprintw(win1, 6,6, "Hey!");
- mvwaddch(win, 1, 1, '0');
- mvwaddch(win1, 1, 1, '1');
- mvwaddch(win2, 1, 1, '2');
- wnoutrefresh(win);
- wnoutrefresh(win1);
- wnoutrefresh(win2);
- doupdate();
-
- /****************************************************************
- * Await a keypress to show what we've done so far. *
- ****************************************************************/
- getch();
-
- /****************************************************************
- * Now, overwrite win2 with contents of all lower windows IN *
- * ORDER from the stdscr up... *
- ****************************************************************/
- if (overwrite(stdscr, win2) == ERR)
- fprintf(stderr, "overwrite(stdscr, win2) failed!\n");
-
- touchwin(stdscr); wnoutrefresh(stdscr);
- touchwin(win); wnoutrefresh(win);
- touchwin(win1); wnoutrefresh(win1);
- touchwin(win2); wnoutrefresh(win2);
- doupdate();
-
- getch();
- if (overwrite(win, win2) == ERR)
- fprintf(stderr, "overwrite(win, win2) failed!\n");
-
- touchwin(stdscr); wnoutrefresh(stdscr);
- touchwin(win); wnoutrefresh(win);
- touchwin(win1); wnoutrefresh(win1);
- touchwin(win2); wnoutrefresh(win2);
- doupdate();
-
- getch();
- if (overwrite(win1, win2) == ERR)
- fprintf(stderr, "overwrite(win1, win2) failed!\n");
-
- /****************************************************************
- * Perform touches, and hidden refreshes on each window. *
- * ------------------------------------------------------------ *
- * NOTE: If you replace the wnoutrefresh() call with wrefresh()*
- * you can see all windows being redrawn untouched. *
- ****************************************************************/
- touchwin(stdscr); wnoutrefresh(stdscr);
- touchwin(win); wnoutrefresh(win);
- touchwin(win1); wnoutrefresh(win1);
- touchwin(win2); wnoutrefresh(win2);
- doupdate();
-
- /****************************************************************
- * At this point, win2 should be "destroyed"; having all other *
- * window contents overwritten onto it. The doupdate() should *
- * effectively remove it from the screen, leaving the others *
- * untouched. On SVR4, this happens, but not with ncurses. *
- * I'd suspect something in overwrite() causes this, as nothing *
- * appears to be overwritten after the calls, with no errors *
- * being reported. This was compiled on my Linux from Slackware*
- * 1.1.1, with ncurses1.8.1 recompiled on it, using the console *
- * entry from the "new" terminfo from ncurses1.8.1. *
- ****************************************************************/
- getch();
-
- /****************************************************************
- * Clean up our act and exit. *
- ****************************************************************/
- endwin();
-}
-
diff --git a/lib/libncurses/TESTS/rain.c b/lib/libncurses/TESTS/rain.c
deleted file mode 100644
index 9779d02..0000000
--- a/lib/libncurses/TESTS/rain.c
+++ /dev/null
@@ -1,96 +0,0 @@
-#include <ncurses.h>
-#include <signal.h>
-/* rain 11/3/1980 EPS/CITHEP */
-
-#define cursor(col,row) move(row,col)
-
-float ranf();
-void onsig();
-
-main(argc,argv)
-int argc;
-char *argv[];
-{
-int x, y, j;
-static int xpos[5], ypos[5];
-float r;
-float c;
-
- for (j=SIGHUP;j<=SIGTERM;j++)
- if (signal(j,SIG_IGN)!=SIG_IGN) signal(j,onsig);
-
- initscr();
- nl();
- noecho();
- r = (float)(LINES - 4);
- c = (float)(COLS - 4);
- for (j=5;--j>=0;) {
- xpos[j]=(int)(c* ranf())+2;
- ypos[j]=(int)(r* ranf())+2;
- }
- for (j=0;;) {
- x=(int)(c*ranf())+2;
- y=(int)(r*ranf())+2;
-
- cursor(x,y); addch('.');
-
- cursor(xpos[j],ypos[j]); addch('o');
-
- if (j==0) j=4; else --j;
- cursor(xpos[j],ypos[j]); addch('O');
-
- if (j==0) j=4; else --j;
- cursor(xpos[j],ypos[j]-1);
- addch('-');
- cursor(xpos[j]-1,ypos[j]);
- addstr("|.|");
- cursor(xpos[j],ypos[j]+1);
- addch('-');
-
- if (j==0) j=4; else --j;
- cursor(xpos[j],ypos[j]-2);
- addch('-');
- cursor(xpos[j]-1,ypos[j]-1);
- addstr("/ \\");
- cursor(xpos[j]-2,ypos[j]);
- addstr("| O |");
- cursor(xpos[j]-1,ypos[j]+1);
- addstr("\\ /");
- cursor(xpos[j],ypos[j]+2);
- addch('-');
-
- if (j==0) j=4; else --j;
- cursor(xpos[j],ypos[j]-2);
- addch(' ');
- cursor(xpos[j]-1,ypos[j]-1);
- addstr(" ");
- cursor(xpos[j]-2,ypos[j]);
- addstr(" ");
- cursor(xpos[j]-1,ypos[j]+1);
- addstr(" ");
- cursor(xpos[j],ypos[j]+2);
- addch(' ');
- xpos[j]=x; ypos[j]=y;
- refresh();
- }
-}
-
-void
-onsig(n)
-int n;
-{
- endwin();
- exit(0);
-}
-
-float
-ranf()
-{
- float rv;
- long r = rand();
-
- r &= 077777;
- rv =((float)r/32767.);
- return rv;
-}
-
diff --git a/lib/libncurses/TESTS/scroll.c b/lib/libncurses/TESTS/scroll.c
deleted file mode 100644
index 428a064..0000000
--- a/lib/libncurses/TESTS/scroll.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <ncurses.h>
-
-main()
-{
-int i;
-
- initscr();
- noecho();
- scrollok(stdscr, TRUE);
- setscrreg(0, 9);
- mvaddstr(0,0,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
- mvaddstr(1,0,"bbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
- mvaddstr(2,0,"ccccccccccccccccccccccccccccc");
- mvaddstr(3,0,"ddddddddddddddddddddddddddddd");
- mvaddstr(4,0,"eeeeeeeeeeeeeeeeeeeeeeeeeeeee");
- mvaddstr(5,0,"fffffffffffffffffffffffffffff");
- mvaddstr(6,0,"ggggggggggggggggggggggggggggg");
- mvaddstr(7,0,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
- mvaddstr(8,0,"iiiiiiiiiiiiiiiiiiiiiiiiiiiii");
- mvaddstr(9,0,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
- refresh();
- for (i = 0; i < 4; i++) {
- getch();
- scrl(-1);
- refresh();
- }
- getch();
- endwin();
-
-}
diff --git a/lib/libncurses/TESTS/scroll2.c b/lib/libncurses/TESTS/scroll2.c
deleted file mode 100644
index e7b2e30..0000000
--- a/lib/libncurses/TESTS/scroll2.c
+++ /dev/null
@@ -1,91 +0,0 @@
-#include <ncurses.h>
-#define ROWS 20
-#define scroll_window wscrl
-
-main()
-{
- int i;
- WINDOW * w;
-
-
- initscr();
- cbreak();
- noecho();
- w = newwin (ROWS, 35, 2, 25);
- scrollok(w, TRUE);
- wsetscrreg(w, 0, ROWS-1);
-
-#ifdef LELE
- mvaddstr (0, 0, "With my function");
-#else
- mvaddstr (0, 0, "With the original wscrl");
-#endif
- refresh();
-
-
- for (i=0; i<ROWS-1; i++)
- {
- mvwprintw (w, i, 0, "Line number %d", i);
- }
- mvwaddstr (w, ROWS-1, 0, "Moving one line at a time");
- wrefresh(w);
- for (i = 0; i < 4; i++) {
- getch();
- scroll_window (w, 1);
- wrefresh(w);
- }
- for (i = 0; i < 4; i++) {
- getch();
- scroll_window (w, -1);
- wrefresh(w);
- }
- getch();
- wclear (w);
-
-
- for (i=0; i<ROWS-1; i++)
- {
- mvwprintw (w, i, 0, "Line number %d", i);
- }
- mvwaddstr (w, ROWS-1, 0, "Moving two line at a time");
-#ifndef LELE
- mvaddstr (0, 30, "** THIS FAILS ON MY MACHINE WITH A BUS ERROR
-**");
-#endif
-
-
- wrefresh(w);
- for (i = 0; i < 4; i++) {
- getch();
- scroll_window (w, 2);
- wrefresh(w);
- }
- for (i = 0; i < 4; i++) {
- getch();
- scroll_window (w, -2);
- wrefresh(w);
- }
- getch();
- wclear (w);
- for (i=0; i<ROWS-1; i++)
- {
- mvwprintw (w, i, 0, "Line number %d", i);
- }
- mvwaddstr (w, ROWS-1, 0, "Moving three line at a time");
- wrefresh(w);
- for (i = 0; i < 4; i++) {
- getch();
- scroll_window (w, 3);
- wrefresh(w);
- }
- for (i = 0; i < 4; i++) {
- getch();
- scroll_window (w, -3);
- wrefresh(w);
- }
- getch();
-
-
- endwin();
-}
-
diff --git a/lib/libncurses/TESTS/scroll3.c b/lib/libncurses/TESTS/scroll3.c
deleted file mode 100644
index b2a10c3..0000000
--- a/lib/libncurses/TESTS/scroll3.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <ncurses.h>
-
-main(int argc, char **argv)
-{
- WINDOW *w, *x;
-
- initscr();
- w = newwin(0, 0, 0, 0);
- if (argc > 2)
- x = newwin(0, 0, 0, 0);
- scrollok(w, TRUE);
- if (argc > 2)
- scrollok(x, TRUE);
- idlok(w, TRUE);
- if (argc > 2)
- idlok(x, TRUE);
- wmove(w, LINES - 1, 0);
- waddstr(w, "test 1 in w");
- wrefresh(w);
- sleep(1);
- if (argc == 2 || argc == 4)
- {
- waddch(w, '\n');
- sleep(1);
- waddch(w, '\n');
- sleep(1);
- waddch(w, '\n');
- sleep(1);
- beep();
- wrefresh(w);
- }
- sleep(1);
- if (argc > 2)
- {
- wmove(x, LINES - 1, 0);
- waddstr(x, "test 2 in x");
- sleep(1);
- waddch(x, '\n');
- sleep(1);
- waddch(x, '\n');
- sleep(1);
- waddch(x, '\n');
- sleep(1);
- beep();
- wrefresh(w);
- sleep(1);
- }
- endwin();
- return 0;
-}
-
diff --git a/lib/libncurses/TESTS/test.c b/lib/libncurses/TESTS/test.c
deleted file mode 100644
index f77f3a1..0000000
--- a/lib/libncurses/TESTS/test.c
+++ /dev/null
@@ -1,27 +0,0 @@
-
-#include <ncurses.h>
-
-main()
-{
-int x, y;
-
- initscr();
- cbreak();
- nodelay(stdscr, TRUE);
-
- for (y = 0; y < 43; y++)
- for (x =0; x < 132; x++) {
- move(y,x);
- printw("X");
- refresh();
- if (!getch()) {
- beep();
- sleep(1);
- }
- }
-
- nocbreak();
- endwin();
-}
-
-
diff --git a/lib/libncurses/TESTS/testcurs.c b/lib/libncurses/TESTS/testcurs.c
deleted file mode 100644
index df2468a..0000000
--- a/lib/libncurses/TESTS/testcurs.c
+++ /dev/null
@@ -1,532 +0,0 @@
-/*
- *
- * This is a test program for the PDCurses screen package for IBM PC type
- * machines.
- * This program was written by John Burnell (johnb@kea.am.dsir.govt.nz)
- *
- */
-
-#include <stdio.h>
-#include <ncurses.h>
-
-#ifdef __STDC__
-void inputTest (WINDOW *);
-void scrollTest (WINDOW *);
-void introTest (WINDOW *);
-int initTest (WINDOW **);
-void outputTest (WINDOW *);
-void padTest (WINDOW *);
-void resizeTest (WINDOW *);
-void display_menu(int,int);
-#else
-void inputTest ();
-void scrollTest ();
-void introTest ();
-int initTest ();
-void outputTest ();
-void padTest ();
-void resizeTest ();
-void display_menu();
-#endif
-
-struct commands
-{
- char *text;
-#ifdef __STDC__
- void (*function)(WINDOW *);
-#else
- void (*function)();
-#endif
-};
-typedef struct commands COMMAND;
-#define MAX_OPTIONS 6
-COMMAND command[MAX_OPTIONS] =
-{
- {"Intro Test",introTest},
- {"Pad Test",padTest},
- {"Resize Test",resizeTest},
- {"Scroll Test",scrollTest},
- {"Input Test",inputTest},
- {"Output Test",outputTest}
-};
-
-int width, height;
-
-main()
-{
-WINDOW *win;
-int key,old_option=(-1),new_option=0;
-bool quit=FALSE;
-
-#ifdef PDCDEBUG
- PDC_debug("testcurs started\n");
-#endif
- if (!initTest (&win)) {return 1;}
-
-#ifdef A_COLOR
- if (has_colors())
- {
- init_pair(1,COLOR_WHITE,COLOR_BLUE);
- wattrset(win, COLOR_PAIR(1));
- }
- else
- wattrset(win, A_REVERSE);
-#else
- wattrset(win, A_REVERSE);
-#endif
-
- erase();
- display_menu(old_option,new_option);
- while(1)
- {
- noecho();
- keypad(stdscr,TRUE);
- raw();
- key = getch();
- switch(key)
- {
- case 10:
- case 13:
- case KEY_ENTER:
- erase();
- refresh();
- (*command[new_option].function)(win);
- erase();
- display_menu(old_option,new_option);
- break;
- case KEY_UP:
- new_option = (new_option == 0) ? new_option : new_option-1;
- display_menu(old_option,new_option);
- break;
- case KEY_DOWN:
- new_option = (new_option == MAX_OPTIONS-1) ? new_option : new_option+1;
- display_menu(old_option,new_option);
- break;
- case 'Q':
- case 'q':
- quit = TRUE;
- break;
- default: break;
- }
- if (quit == TRUE)
- break;
- }
-
- delwin (win);
-
- endwin();
- return 0;
-}
-#ifdef __STDC__
-void Continue (WINDOW *win)
-#else
-void Continue (win)
-WINDOW *win;
-#endif
-{
- wmove(win, 10, 1);
-/* wclrtoeol(win);
-*/ mvwaddstr(win, 10, 1, " Press any key to continue");
- wrefresh(win);
- raw();
- wgetch(win);
-}
-#ifdef __STDC_
-int initTest (WINDOW **win)
-#else
-int initTest (win)
-WINDOW **win;
-#endif
-{
-#ifdef PDCDEBUG
- PDC_debug("initTest called\n");
-#endif
- initscr();
-#ifdef PDCDEBUG
- PDC_debug("after initscr()\n");
-#endif
-#ifdef A_COLOR
- if (has_colors())
- start_color();
-#endif
- width = 60;
- height = 13; /* Create a drawing window */
- *win = newwin(height, width, (LINES-height)/2, (COLS-width)/2);
- if(*win == NULL)
- { endwin();
- return 1;
- }
-}
-#ifdef __STDC__
-void introTest (WINDOW *win)
-#else
-void introTest (win)
-WINDOW *win;
-#endif
-{
- beep ();
- werase(win);
-
- box(win, ACS_VLINE, ACS_HLINE);
- wrefresh(win);
- cbreak ();
- mvwaddstr(win, 1, 1, "You should have rectangle in the middle of the screen");
- mvwaddstr(win, 2, 1, "You should have heard a beep");
- Continue(win);
- return;
-}
-#ifdef __STDC__
-void scrollTest (WINDOW *win)
-#else
-void scrollTest (win)
-WINDOW *win;
-#endif
-{
- int i;
- int OldX, OldY;
- char *Message = "The window will now scroll slowly";
-
- mvwprintw (win, height - 2, 1, Message);
- wrefresh (win);
- scrollok(win, TRUE);
- for (i = 1; i <= height; i++) {
- usleep (250);
- scroll(win);
- wrefresh (win);
- };
-
- getmaxyx (win, OldY, OldX);
- mvwprintw (win, 6, 1, "The top of the window will scroll");
- wmove (win, 1, 1);
- wsetscrreg (win, 0, 4);
- box(win, ACS_VLINE, ACS_HLINE);
- wrefresh (win);
- for (i = 1; i <= 5; i++) {
- usleep (500);
- scroll(win);
- wrefresh (win);
- };
- wsetscrreg (win, 0, --OldY);
-
-}
-#ifdef __STDC__
-void inputTest (WINDOW *win)
-#else
-void inputTest (win)
-WINDOW *win;
-#endif
-{
- int w, h, bx, by, sw, sh, i, c,num;
- char buffer [80];
- WINDOW *subWin;
- wclear (win);
-
- w = win->_maxx;
- h = win->_maxy;
- bx = win->_begx;
- by = win->_begy;
- sw = w / 3;
- sh = h / 3;
- if((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) == NULL)
- return;
-
-#ifdef A_COLOR
- if (has_colors())
- {
- init_pair(2,COLOR_CYAN,COLOR_BLUE);
- wattrset(subWin, COLOR_PAIR(2) | A_BOLD);
- }
- else
- wattrset(subWin, A_BOLD);
-#else
- wattrset(subWin, A_BOLD);
-#endif
- box(subWin, ACS_VLINE, ACS_HLINE);
- wrefresh(win);
-
- nocbreak();
- mvwaddstr(win, 2, 1, "Press some keys for 5 seconds");
- mvwaddstr(win, 1, 1, "Pressing ^C should do nothing");
- wrefresh(win);
-
- for (i = 0; i < 5; i++) {
- werase (subWin);
- box(subWin, ACS_VLINE, ACS_HLINE);
- mvwprintw (subWin, 1, 1, "Time = %d", i);
- wrefresh(subWin);
- usleep(1000);
- flushinp();
- }
-
- delwin (subWin);
- werase(win);
- flash();
- wrefresh(win);
- usleep(500);
-
- mvwaddstr(win, 2, 1, "Press a key, followed by ENTER");
- wmove(win, 9, 10);
- wrefresh(win);
- echo();
- noraw();
- wgetch(win);
- flushinp();
-
- wmove(win, 9, 10);
- wdelch(win);
- mvwaddstr(win, 4, 1, "The character should now have been deleted");
- Continue(win);
-
- wclear (win);
- mvwaddstr(win, 2, 1, "Press a function key or an arrow key");
- wrefresh(win);
- keypad(win, TRUE);
- raw();
- c = wgetch(win);
-
- nodelay(win, TRUE);
- wgetch(win);
- nodelay(win, FALSE);
-
- refresh();
- wclear (win);
- mvwaddstr(win, 3, 2, "The window should have moved");
- mvwaddstr(win, 4, 2, "This text should have appeared without you pressing a key");
- mvwprintw(win, 2, 2, "Keycode = %d", c);
- mvwaddstr(win, 6, 2, "Enter a number then a string seperated by space");
- echo();
- noraw();
- mvwscanw(win, 7, 6, "%d %s", &num,buffer);
- mvwprintw(win, 8, 6, "String: %s Number: %d", buffer,num);
- Continue(win);
-}
-#ifdef __STDC__
-void outputTest (WINDOW *win)
-#else
-void outputTest (win)
-WINDOW *win;
-#endif
-{
- WINDOW *win1;
- char Buffer [80];
- chtype ch;
-
- /* traceon(); */
- nl ();
- wclear (win);
- mvwaddstr(win, 1, 1, "You should now have a screen in the upper left corner, and this text should have wrapped");
- mvwin(win, 2, 1);
- Continue(win);
-
- wclear(win);
- mvwaddstr(win, 1, 1, "A new window will appear with this text in it");
- mvwaddstr(win, 8, 1, "Press any key to continue");
- wrefresh(win);
- wgetch(win);
-
- win1 = newwin(10, 50, 15, 25);
- if(win1 == NULL)
- { endwin();
- return;
- }
-#ifdef A_COLOR
- if (has_colors())
- {
- init_pair(3,COLOR_BLUE,COLOR_WHITE);
- wattrset(win1, COLOR_PAIR(3));
- }
- else
- wattrset(win1, A_NORMAL);
-#else
- wattrset(win1, A_NORMAL);
-#endif
- wclear (win1);
- mvwaddstr(win1, 5, 1, "This text should appear; using overlay option");
- copywin(win, win1,0,0,0,0,10,50,TRUE);
-
-#ifdef UNIX
- box(win1,ACS_VLINE,ACS_HLINE);
-#else
- box(win1,0xb3,0xc4);
-#endif
- wmove(win1, 8, 26);
- wrefresh(win1);
- wgetch(win1);
-
- wclear(win1);
- wattron(win1, A_BLINK);
- mvwaddstr(win1, 4, 1, "This blinking text should appear in only the second window");
- wattroff(win1, A_BLINK);
- wrefresh(win1);
- wgetch(win1);
- delwin(win1);
-
- wclear(win);
- wrefresh(win);
- mvwaddstr(win, 6, 2, "This line shouldn't appear");
- mvwaddstr(win, 4, 2, "Only half of the next line is visible");
- mvwaddstr(win, 5, 2, "Only half of the next line is visible");
- wmove(win, 6, 1);
- wclrtobot (win);
- wmove(win, 5, 20);
- wclrtoeol (win);
- mvwaddstr(win, 8, 2, "This line also shouldn't appear");
- wmove(win, 8, 1);
- wdeleteln(win);
- Continue(win);
- /* traceoff(); */
-
- wmove (win, 5, 9);
- ch = winch (win);
-
- wclear(win);
- wmove (win, 6, 2);
- waddstr (win, "The next char should be l: ");
- winsch (win, ch);
- Continue(win);
-
- wmove(win, 5, 1);
- winsertln (win);
- mvwaddstr(win, 5, 2, "The lines below should have moved down");
- Continue(win);
-
- wclear(win);
- wmove(win, 2, 2);
- wprintw(win, "This is a formatted string in a window: %d %s\n", 42, "is it");
- mvwaddstr(win, 10, 1, "Enter a string: ");
- wrefresh(win);
- noraw();
- echo();
- wscanw (win, "%s", Buffer);
-
- wclear(win);
- mvwaddstr(win, 10, 1, "Enter a string");
- wrefresh(win);
- clear();
- move(0,0);
- printw("This is a formatted string in stdscr: %d %s\n", 42, "is it");
- mvaddstr(10, 1, "Enter a string: ");
- refresh();
- noraw();
- echo();
- scanw ("%s", Buffer);
-
- wclear(win);
- curs_set(2);
- mvwaddstr(win, 1, 1, "The cursor should appear as a block");
- Continue(win);
-
- wclear(win);
- curs_set(0);
- mvwaddstr(win, 1, 1, "The cursor should have disappeared");
- Continue(win);
-
- wclear(win);
- curs_set(1);
- mvwaddstr(win, 1, 1, "The cursor should be an underline");
- Continue(win);
-}
-
-#ifdef __STDC__
-void resizeTest(WINDOW *dummy)
-#else
-void resizeTest(dummy)
-WINDOW *dummy;
-#endif
-{
- WINDOW *win1;
- char Buffer [80];
- chtype ch;
-
- savetty ();
-
- clear();
- refresh();
-#ifdef __PDCURSES__
- resize(50);
-#endif
-
-
- win1 = newwin(11, 50, 14, 25);
- if(win1 == NULL)
- { endwin();
- return;
- }
-#ifdef A_COLOR
- if (has_colors())
- {
- init_pair(3,COLOR_BLUE,COLOR_WHITE);
- wattrset(win1, COLOR_PAIR(3));
- }
-#endif
- wclear (win1);
-
- mvwaddstr(win1, 1, 1, "The screen may now have 50 lines");
- Continue(win1);
-
- resetty ();
-
- wclear (win1);
- mvwaddstr(win1, 1, 1, "The screen should now be reset");
- Continue(win1);
-
- delwin(win1);
-
- clear();
- refresh();
-
-}
-#ifdef __STDC__
-void padTest(WINDOW *dummy)
-#else
-void padTest(dummy)
-WINDOW *dummy;
-#endif
-{
-WINDOW *pad;
-
- pad = newpad(50,100);
- mvwaddstr(pad, 5, 2, "This is a new pad");
- mvwaddstr(pad, 8, 0, "The end of this line should be truncated here:abcd");
- mvwaddstr(pad,11, 1, "This line should not appear.");
- wmove(pad, 10, 1);
- wclrtoeol(pad);
- mvwaddstr(pad, 10, 1, " Press any key to continue");
- prefresh(pad,0,0,0,0,10,45);
- keypad(pad, TRUE);
- raw();
- wgetch(pad);
-
- mvwaddstr(pad, 35, 2, "This is displayed at line 35 in the pad");
- mvwaddstr(pad, 40, 1, " Press any key to continue");
- prefresh(pad,30,0,0,0,10,45);
- keypad(pad, TRUE);
- raw();
- wgetch(pad);
-
- delwin(pad);
-}
-
-#ifdef __STDC__
-void display_menu(int old_option,int new_option)
-#else
-void display_menu(old_option,new_option)
-int old_option,new_option;
-#endif
-{
- register int i;
-
- attrset(A_NORMAL);
- mvaddstr(3,20,"PDCurses Test Program");
-
- for (i=0;i<MAX_OPTIONS;i++)
- mvaddstr(5+i,25,command[i].text);
- if (old_option != (-1))
- mvaddstr(5+old_option,25,command[old_option].text);
- attrset(A_REVERSE);
- mvaddstr(5+new_option,25,command[new_option].text);
- attrset(A_NORMAL);
- mvaddstr(13,3,"Use Up and Down Arrows to select - Enter to run - Q to quit");
- refresh();
-}
-
diff --git a/lib/libncurses/TESTS/worm.c b/lib/libncurses/TESTS/worm.c
deleted file mode 100644
index abbe241..0000000
--- a/lib/libncurses/TESTS/worm.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
-
- @@@ @@@ @@@@@@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@
- @@@ @@@ @@@@@@@@@@@@ @@@@@@@@@@@@ @@@@@@@@@@@@@
- @@@ @@@ @@@@ @@@@ @@@@ @@@@ @@@ @@@@
- @@@ @@ @@@ @@@ @@@ @@@ @@@ @@@ @@@
- @@@ @@@@ @@@ @@@ @@@ @@@ @@@ @@@ @@@
- @@@@ @@@@ @@@@ @@@ @@@ @@@ @@@ @@@ @@@
- @@@@@@@@@@@@ @@@@ @@@@ @@@ @@@ @@@ @@@
- @@@@ @@@@ @@@@@@@@@@@@ @@@ @@@ @@@ @@@
- @@ @@ @@@@@@@@@@ @@@ @@@ @@@ @@@
-
- Eric P. Scott
- Caltech High Energy Physics
- October, 1980
-
-*/
-
-#include <ncurses.h>
-#include <signal.h>
-
-#define cursor(col,row) move(row,col)
-
-int Wrap;
-short *ref[128];
-static char flavor[]={
- 'O', '*', '#', '$', '%', '0'
-};
-static short xinc[]={
- 1, 1, 1, 0, -1, -1, -1, 0
-}, yinc[]={
- -1, 0, 1, 1, 1, 0, -1, -1
-};
-static struct worm {
- int orientation, head;
- short *xpos, *ypos;
-} worm[40];
-static char *field;
-static int length=16, number=3, trail=' ';
-static struct options {
- int nopts;
- int opts[3];
-} normal[8]={
- { 3, { 7, 0, 1 } },
- { 3, { 0, 1, 2 } },
- { 3, { 1, 2, 3 } },
- { 3, { 2, 3, 4 } },
- { 3, { 3, 4, 5 } },
- { 3, { 4, 5, 6 } },
- { 3, { 5, 6, 7 } },
- { 3, { 6, 7, 0 } }
-}, upper[8]={
- { 1, { 1, 0, 0 } },
- { 2, { 1, 2, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 2, { 4, 5, 0 } },
- { 1, { 5, 0, 0 } },
- { 2, { 1, 5, 0 } }
-}, left[8]={
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 2, { 2, 3, 0 } },
- { 1, { 3, 0, 0 } },
- { 2, { 3, 7, 0 } },
- { 1, { 7, 0, 0 } },
- { 2, { 7, 0, 0 } }
-}, right[8]={
- { 1, { 7, 0, 0 } },
- { 2, { 3, 7, 0 } },
- { 1, { 3, 0, 0 } },
- { 2, { 3, 4, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 2, { 6, 7, 0 } }
-}, lower[8]={
- { 0, { 0, 0, 0 } },
- { 2, { 0, 1, 0 } },
- { 1, { 1, 0, 0 } },
- { 2, { 1, 5, 0 } },
- { 1, { 5, 0, 0 } },
- { 2, { 5, 6, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } }
-}, upleft[8]={
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 1, { 3, 0, 0 } },
- { 2, { 1, 3, 0 } },
- { 1, { 1, 0, 0 } }
-}, upright[8]={
- { 2, { 3, 5, 0 } },
- { 1, { 3, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 1, { 5, 0, 0 } }
-}, lowleft[8]={
- { 3, { 7, 0, 1 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 1, { 1, 0, 0 } },
- { 2, { 1, 7, 0 } },
- { 1, { 7, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } }
-}, lowright[8]={
- { 0, { 0, 0, 0 } },
- { 1, { 7, 0, 0 } },
- { 2, { 5, 7, 0 } },
- { 1, { 5, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } },
- { 0, { 0, 0, 0 } }
-};
-
-void onsig();
-float ranf();
-
-main(argc,argv)
-int argc;
-char *argv[];
-{
-int x, y;
-int n;
-struct worm *w;
-struct options *op;
-int h;
-short *ip;
-int last, bottom;
-
- for (x=1;x<argc;x++) {
- register char *p;
- p=argv[x];
- if (*p=='-') p++;
- switch (*p) {
- case 'f':
- field="WORM";
- break;
- case 'l':
- if (++x==argc) goto usage;
- if ((length=atoi(argv[x]))<2||length>1024) {
- fprintf(stderr,"%s: Invalid length\n",*argv);
- exit(1);
- }
- break;
- case 'n':
- if (++x==argc) goto usage;
- if ((number=atoi(argv[x]))<1||number>40) {
- fprintf(stderr,"%s: Invalid number of worms\n",*argv);
- exit(1);
- }
- break;
- case 't':
- trail='.';
- break;
- default:
- usage:
- fprintf(stderr, "usage: %s [-field] [-length #] [-number #] [-trail]\n",*argv);
- exit(1);
- break;
- }
- }
-
- signal(SIGINT, onsig);
- initscr();
- bottom = LINES-1;
- last = COLS-1;
-
- ip=(short *)malloc(LINES*COLS*sizeof (short));
-
- for (n=0;n<LINES;) {
- ref[n++]=ip; ip+=COLS;
- }
- for (ip=ref[0],n=LINES*COLS;--n>=0;) *ip++=0;
- ref[bottom][last]=1;
- for (n=number, w= &worm[0];--n>=0;w++) {
- w->orientation=w->head=0;
- if (!(ip=(short *)malloc(length*sizeof (short)))) {
- fprintf(stderr,"%s: out of memory\n",*argv);
- exit(1);
- }
- w->xpos=ip;
- for (x=length;--x>=0;) *ip++ = -1;
- if (!(ip=(short *)malloc(length*sizeof (short)))) {
- fprintf(stderr,"%s: out of memory\n",*argv);
- exit(1);
- }
- w->ypos=ip;
- for (y=length;--y>=0;) *ip++ = -1;
- }
- if (field) {
- register char *p;
- p=field;
- for (y=bottom;--y>=0;) {
- for (x=COLS;--x>=0;) {
- addch(*p++);
- if (!*p) p=field;
- }
- addch('\n');
- }
- }
- refresh();
-
- for (;;) {
- for (n=0,w= &worm[0];n<number;n++,w++) {
- if ((x=w->xpos[h=w->head])<0) {
- cursor(x=w->xpos[h]=0,y=w->ypos[h]=bottom);
- addch(flavor[n%6]);
- ref[y][x]++;
- }
- else y=w->ypos[h];
- if (++h==length) h=0;
- if (w->xpos[w->head=h]>=0) {
- register int x1, y1;
- x1=w->xpos[h]; y1=w->ypos[h];
- if (--ref[y1][x1]==0) {
- cursor(x1,y1); addch(trail);
- }
- }
- op= &(x==0 ? (y==0 ? upleft : (y==bottom ? lowleft : left)) :
- (x==last ? (y==0 ? upright : (y==bottom ? lowright : right)) :
- (y==0 ? upper : (y==bottom ? lower : normal))))[w->orientation];
- switch (op->nopts) {
- case 0:
- refresh();
- endwin();
- exit(0);
- case 1:
- w->orientation=op->opts[0];
- break;
- default:
- w->orientation=op->opts[(int)(ranf()*(float)op->nopts)];
- }
- cursor(x+=xinc[w->orientation], y+=yinc[w->orientation]);
- if (!Wrap||x!=last||y!=bottom) addch(flavor[n%6]);
- ref[w->ypos[h]=y][w->xpos[h]=x]++;
- }
- refresh();
- }
-}
-
-void
-onsig()
-{
- endwin();
- exit(0);
-}
-
-float
-ranf()
-{
-float rv;
-long r = rand();
-
- r &= 077777;
- rv =((float)r/32767.);
- return rv;
-}
diff --git a/lib/libncurses/TESTS/xmas.c b/lib/libncurses/TESTS/xmas.c
deleted file mode 100644
index 57cc0ea..0000000
--- a/lib/libncurses/TESTS/xmas.c
+++ /dev/null
@@ -1,1192 +0,0 @@
-/******************************************************************************/
-/* asciixmas */
-/* December 1989 Larry Bartz Indianapolis, IN */
-/* */
-/* */
-/* I'm dreaming of an ascii character-based monochrome Christmas, */
-/* Just like the one's I used to know! */
-/* Via a full duplex communications channel, */
-/* At 9600 bits per second, */
-/* Even though it's kinda slow. */
-/* */
-/* I'm dreaming of an ascii character-based monochrome Christmas, */
-/* With ev'ry C program I write! */
-/* May your screen be merry and bright! */
-/* And may all your Christmases be amber or green, */
-/* (for reduced eyestrain and improved visibility)! */
-/* */
-/* */
-/* */
-/* */
-/* */
-/* IMPLEMENTATION */
-/* */
-/* Feel free to modify the defined string FROMWHO to reflect you, your */
-/* organization, your site, whatever. */
-/* */
-/* This really looks a lot better if you can turn off your cursor before */
-/* execution. I wanted to do that here but very few termcap entries or */
-/* terminfo definitions have the appropriate string defined. If you know */
-/* the string(s) for the terminal(s) you use or which your site supports, */
-/* you could call asciixmas from within a shell in which you issue the */
-/* string to the terminal. The cursor is distracting but it doesn't really */
-/* ruin the show. */
-/* */
-/* At our site, we invoke this for our users just after login and the */
-/* determination of terminal type. */
-/* */
-/* */
-/* PORTABILITY */
-/* */
-/* I wrote this using only the very simplest curses functions so that it */
-/* might be the most portable. I was personally able to test on five */
-/* different cpu/UNIX combinations. */
-/* */
-/* */
-/* COMPILE */
-/* */
-/* usually this: */
-/* */
-/* cc -O asciixmas.c -lcurses -o asciixmas -s */
-/* */
-/* */
-/* Zilog S8000 models 11, 21, 31, etc with ZEUS variant of SYSTEM III */
-/* maybe other SYSTEM III also: */
-/* */
-/* cc asciixmas.c -lcurses -ltermlib -o asciixmas -s */
-/* */
-/* as above with optional "peephole optimizer" installed: */
-/* */
-/* cc -O asciixmas.c -lcurses -ltermlib -o asciixmas -s */
-/* */
-/* */
-/* Zilog S8000 models 32, 130 with WE32100 chip and SYS V, REL2 */
-/* maybe 3B2 also? */
-/* */
-/* cc -f -O -K sd asciixmas.c -lcurses -o asciixmas -s */
-/* */
-/* */
-/* Pyramid, Sequent, any other "dual universe" types compile and execute */
-/* under either universe. The compile line for the ucb universe (as you */
-/* might expect) is the same as for SYS III UNIX: */
-/* */
-/* cc -O asciixmas.c -lcurses -ltermlib -o asciixmas -s */
-/* */
-/* The above compile will also hold true for other BSD systems. (I hope) */
-/* */
-/* */
-/* */
-/* */
-/* For the Scrooges out there among you who don't want this thing to loop */
-/* forever (or until the user hits a key), insert this into your compile */
-/* line just after "cc" : */
-/* */
-/* -DNOLOOP */
-/* */
-/* like so: */
-/* */
-/* cc -DNOLOOP -O asciixmas.c -lcurses -o asciixmas -s */
-/* */
-/* */
-/* */
-/******************************************************************************/
-
-#include <ncurses.h>
-#include <signal.h>
-
-#define FROMWHO "Mark Hessling - (M.Hessling@gu.edu.au)"
-
-int y_pos, x_pos;
-
-WINDOW
- *treescrn, *treescrn2,*treescrn3, *treescrn4,*treescrn5, *treescrn6,
- *treescrn7, *treescrn8,
- *dotdeer0,
- *stardeer0,
- *lildeer0, *lildeer1, *lildeer2, *lildeer3,
- *middeer0, *middeer1, *middeer2, *middeer3,
- *bigdeer0, *bigdeer1, *bigdeer2, *bigdeer3, *bigdeer4,
- *lookdeer0, *lookdeer1, *lookdeer2, *lookdeer3, *lookdeer4,
- *w_holiday,
- *w_del_msg;
-
-void main()
-{
- void done();
- int loopy;
-
- initscr();
- noecho();
- nonl();
- refresh();
- signal(SIGINT,done);
- signal(SIGTERM,done);
-#if !defined DOS && !defined OS2
- signal(SIGHUP,done);
- signal(SIGQUIT,done);
-#endif
-
-
-
- treescrn = newwin(16,27,3,53);
- treescrn2 = newwin(16,27,3,53);
- treescrn3 = newwin(16,27,3,53);
- treescrn4 = newwin(16,27,3,53);
- treescrn5 = newwin(16,27,3,53);
- treescrn6 = newwin(16,27,3,53);
- treescrn7 = newwin(16,27,3,53);
- treescrn8 = newwin(16,27,3,53);
-
- dotdeer0 = newwin(3,71,0,8);
-
- stardeer0 = newwin(4,56,0,8);
-
- lildeer0 = newwin(7,53,0,8);
- lildeer1 = newwin(2,4,0,0);
- lildeer2 = newwin(2,4,0,0);
- lildeer3 = newwin(2,4,0,0);
-
- middeer0 = newwin(15,42,0,8);
- middeer1 = newwin(3,7,0,0);
- middeer2 = newwin(3,7,0,0);
- middeer3 = newwin(3,7,0,0);
-
- bigdeer0 = newwin(10,23,0,0);
- bigdeer1 = newwin(10,23,0,0);
- bigdeer2 = newwin(10,23,0,0);
- bigdeer3 = newwin(10,23,0,0);
- bigdeer4 = newwin(10,23,0,0);
-
- lookdeer0 = newwin(10,25,0,0);
- lookdeer1 = newwin(10,25,0,0);
- lookdeer2 = newwin(10,25,0,0);
- lookdeer3 = newwin(10,25,0,0);
- lookdeer4 = newwin(10,25,0,0);
-
- w_holiday = newwin(1,26,3,27);
-
- w_del_msg = newwin(1,12,23,60);
-
- mvwaddstr(w_del_msg,0,0,"Hit any key to quit");
-
- mvwaddstr(w_holiday,0,0,"H A P P Y H O L I D A Y S");
-
- /* set up the windows for our various reindeer */
-
- /* lildeer1 */
- mvwaddch(lildeer1,0,0,(chtype)'V');
- mvwaddch(lildeer1,1,0,(chtype)'@');
- mvwaddch(lildeer1,1,1,(chtype)'<');
- mvwaddch(lildeer1,1,2,(chtype)'>');
- mvwaddch(lildeer1,1,3,(chtype)'~');
-
- /* lildeer2 */
- mvwaddch(lildeer2,0,0,(chtype)'V');
- mvwaddch(lildeer2,1,0,(chtype)'@');
- mvwaddch(lildeer2,1,1,(chtype)'|');
- mvwaddch(lildeer2,1,2,(chtype)'|');
- mvwaddch(lildeer2,1,3,(chtype)'~');
-
- /* lildeer3 */
- mvwaddch(lildeer3,0,0,(chtype)'V');
- mvwaddch(lildeer3,1,0,(chtype)'@');
- mvwaddch(lildeer3,1,1,(chtype)'>');
- mvwaddch(lildeer3,1,2,(chtype)'<');
- mvwaddch(lildeer2,1,3,(chtype)'~');
-
-
- /* middeer1 */
- mvwaddch(middeer1,0,2,(chtype)'y');
- mvwaddch(middeer1,0,3,(chtype)'y');
- mvwaddch(middeer1,1,2,(chtype)'0');
- mvwaddch(middeer1,1,3,(chtype)'(');
- mvwaddch(middeer1,1,4,(chtype)'=');
- mvwaddch(middeer1,1,5,(chtype)')');
- mvwaddch(middeer1,1,6,(chtype)'~');
- mvwaddch(middeer1,2,3,(chtype)'\\');
- mvwaddch(middeer1,2,4,(chtype)'/');
-
- /* middeer2 */
- mvwaddch(middeer2,0,2,(chtype)'y');
- mvwaddch(middeer2,0,3,(chtype)'y');
- mvwaddch(middeer2,1,2,(chtype)'0');
- mvwaddch(middeer2,1,3,(chtype)'(');
- mvwaddch(middeer2,1,4,(chtype)'=');
- mvwaddch(middeer2,1,5,(chtype)')');
- mvwaddch(middeer2,1,6,(chtype)'~');
- mvwaddch(middeer2,2,3,(chtype)'|');
- mvwaddch(middeer2,2,5,(chtype)'|');
-
- /* middeer3 */
- mvwaddch(middeer3,0,2,(chtype)'y');
- mvwaddch(middeer3,0,3,(chtype)'y');
- mvwaddch(middeer3,1,2,(chtype)'0');
- mvwaddch(middeer3,1,3,(chtype)'(');
- mvwaddch(middeer3,1,4,(chtype)'=');
- mvwaddch(middeer3,1,5,(chtype)')');
- mvwaddch(middeer3,1,6,(chtype)'~');
- mvwaddch(middeer3,2,2,(chtype)'/');
- mvwaddch(middeer3,2,6,(chtype)'\\');
-
-
- /* bigdeer1 */
- mvwaddch(bigdeer1,0,17,(chtype)'\\');
- mvwaddch(bigdeer1,0,18,(chtype)'/');
- mvwaddch(bigdeer1,0,20,(chtype)'\\');
- mvwaddch(bigdeer1,0,21,(chtype)'/');
- mvwaddch(bigdeer1,1,18,(chtype)'\\');
- mvwaddch(bigdeer1,1,20,(chtype)'/');
- mvwaddch(bigdeer1,2,19,(chtype)'|');
- mvwaddch(bigdeer1,2,20,(chtype)'_');
- mvwaddch(bigdeer1,3,18,(chtype)'/');
- mvwaddch(bigdeer1,3,19,(chtype)'^');
- mvwaddch(bigdeer1,3,20,(chtype)'0');
- mvwaddch(bigdeer1,3,21,(chtype)'\\');
- mvwaddch(bigdeer1,4,17,(chtype)'/');
- mvwaddch(bigdeer1,4,18,(chtype)'/');
- mvwaddch(bigdeer1,4,19,(chtype)'\\');
- mvwaddch(bigdeer1,4,22,(chtype)'\\');
- mvwaddstr(bigdeer1,5,7,"^~~~~~~~~// ~~U");
- mvwaddstr(bigdeer1,6,7,"( \\_____( /");
- mvwaddstr(bigdeer1,7,8,"( ) /");
- mvwaddstr(bigdeer1,8,9,"\\\\ /");
- mvwaddstr(bigdeer1,9,11,"\\>/>");
-
- /* bigdeer2 */
- mvwaddch(bigdeer2,0,17,(chtype)'\\');
- mvwaddch(bigdeer2,0,18,(chtype)'/');
- mvwaddch(bigdeer2,0,20,(chtype)'\\');
- mvwaddch(bigdeer2,0,21,(chtype)'/');
- mvwaddch(bigdeer2,1,18,(chtype)'\\');
- mvwaddch(bigdeer2,1,20,(chtype)'/');
- mvwaddch(bigdeer2,2,19,(chtype)'|');
- mvwaddch(bigdeer2,2,20,(chtype)'_');
- mvwaddch(bigdeer2,3,18,(chtype)'/');
- mvwaddch(bigdeer2,3,19,(chtype)'^');
- mvwaddch(bigdeer2,3,20,(chtype)'0');
- mvwaddch(bigdeer2,3,21,(chtype)'\\');
- mvwaddch(bigdeer2,4,17,(chtype)'/');
- mvwaddch(bigdeer2,4,18,(chtype)'/');
- mvwaddch(bigdeer2,4,19,(chtype)'\\');
- mvwaddch(bigdeer2,4,22,(chtype)'\\');
- mvwaddstr(bigdeer2,5,7,"^~~~~~~~~// ~~U");
- mvwaddstr(bigdeer2,6,7,"(( )____( /");
- mvwaddstr(bigdeer2,7,7,"( / |");
- mvwaddstr(bigdeer2,8,8,"\\/ |");
- mvwaddstr(bigdeer2,9,9,"|> |>");
-
- /* bigdeer3 */
- mvwaddch(bigdeer3,0,17,(chtype)'\\');
- mvwaddch(bigdeer3,0,18,(chtype)'/');
- mvwaddch(bigdeer3,0,20,(chtype)'\\');
- mvwaddch(bigdeer3,0,21,(chtype)'/');
- mvwaddch(bigdeer3,1,18,(chtype)'\\');
- mvwaddch(bigdeer3,1,20,(chtype)'/');
- mvwaddch(bigdeer3,2,19,(chtype)'|');
- mvwaddch(bigdeer3,2,20,(chtype)'_');
- mvwaddch(bigdeer3,3,18,(chtype)'/');
- mvwaddch(bigdeer3,3,19,(chtype)'^');
- mvwaddch(bigdeer3,3,20,(chtype)'0');
- mvwaddch(bigdeer3,3,21,(chtype)'\\');
- mvwaddch(bigdeer3,4,17,(chtype)'/');
- mvwaddch(bigdeer3,4,18,(chtype)'/');
- mvwaddch(bigdeer3,4,19,(chtype)'\\');
- mvwaddch(bigdeer3,4,22,(chtype)'\\');
- mvwaddstr(bigdeer3,5,7,"^~~~~~~~~// ~~U");
- mvwaddstr(bigdeer3,6,6,"( ()_____( /");
- mvwaddstr(bigdeer3,7,6,"/ / /");
- mvwaddstr(bigdeer3,8,5,"|/ \\");
- mvwaddstr(bigdeer3,9,5,"/> \\>");
-
- /* bigdeer4 */
- mvwaddch(bigdeer4,0,17,(chtype)'\\');
- mvwaddch(bigdeer4,0,18,(chtype)'/');
- mvwaddch(bigdeer4,0,20,(chtype)'\\');
- mvwaddch(bigdeer4,0,21,(chtype)'/');
- mvwaddch(bigdeer4,1,18,(chtype)'\\');
- mvwaddch(bigdeer4,1,20,(chtype)'/');
- mvwaddch(bigdeer4,2,19,(chtype)'|');
- mvwaddch(bigdeer4,2,20,(chtype)'_');
- mvwaddch(bigdeer4,3,18,(chtype)'/');
- mvwaddch(bigdeer4,3,19,(chtype)'^');
- mvwaddch(bigdeer4,3,20,(chtype)'0');
- mvwaddch(bigdeer4,3,21,(chtype)'\\');
- mvwaddch(bigdeer4,4,17,(chtype)'/');
- mvwaddch(bigdeer4,4,18,(chtype)'/');
- mvwaddch(bigdeer4,4,19,(chtype)'\\');
- mvwaddch(bigdeer4,4,22,(chtype)'\\');
- mvwaddstr(bigdeer4,5,7,"^~~~~~~~~// ~~U");
- mvwaddstr(bigdeer4,6,6,"( )______( /");
- mvwaddstr(bigdeer4,7,5,"(/ \\");
- mvwaddstr(bigdeer4,8,0,"v___= ----^");
-
-
- /* lookdeer1 */
- mvwaddstr(lookdeer1,0,16,"\\/ \\/");
- mvwaddstr(lookdeer1,1,17,"\\Y/ \\Y/");
- mvwaddstr(lookdeer1,2,19,"\\=/");
- mvwaddstr(lookdeer1,3,17,"^\\o o/^");
- mvwaddstr(lookdeer1,4,17,"//( )");
- mvwaddstr(lookdeer1,5,7,"^~~~~~~~~// \\O/");
- mvwaddstr(lookdeer1,6,7,"( \\_____( /");
- mvwaddstr(lookdeer1,7,8,"( ) /");
- mvwaddstr(lookdeer1,8,9,"\\\\ /");
- mvwaddstr(lookdeer1,9,11,"\\>/>");
-
- /* lookdeer2 */
- mvwaddstr(lookdeer2,0,16,"\\/ \\/");
- mvwaddstr(lookdeer2,1,17,"\\Y/ \\Y/");
- mvwaddstr(lookdeer2,2,19,"\\=/");
- mvwaddstr(lookdeer2,3,17,"^\\o o/^");
- mvwaddstr(lookdeer2,4,17,"//( )");
- mvwaddstr(lookdeer2,5,7,"^~~~~~~~~// \\O/");
- mvwaddstr(lookdeer2,6,7,"(( )____( /");
- mvwaddstr(lookdeer2,7,7,"( / |");
- mvwaddstr(lookdeer2,8,8,"\\/ |");
- mvwaddstr(lookdeer2,9,9,"|> |>");
-
- /* lookdeer3 */
- mvwaddstr(lookdeer3,0,16,"\\/ \\/");
- mvwaddstr(lookdeer3,1,17,"\\Y/ \\Y/");
- mvwaddstr(lookdeer3,2,19,"\\=/");
- mvwaddstr(lookdeer3,3,17,"^\\o o/^");
- mvwaddstr(lookdeer3,4,17,"//( )");
- mvwaddstr(lookdeer3,5,7,"^~~~~~~~~// \\O/");
- mvwaddstr(lookdeer3,6,6,"( ()_____( /");
- mvwaddstr(lookdeer3,7,6,"/ / /");
- mvwaddstr(lookdeer3,8,5,"|/ \\");
- mvwaddstr(lookdeer3,9,5,"/> \\>");
-
- /* lookdeer4 */
- mvwaddstr(lookdeer4,0,16,"\\/ \\/");
- mvwaddstr(lookdeer4,1,17,"\\Y/ \\Y/");
- mvwaddstr(lookdeer4,2,19,"\\=/");
- mvwaddstr(lookdeer4,3,17,"^\\o o/^");
- mvwaddstr(lookdeer4,4,17,"//( )");
- mvwaddstr(lookdeer4,5,7,"^~~~~~~~~// \\O/");
- mvwaddstr(lookdeer4,6,6,"( )______( /");
- mvwaddstr(lookdeer4,7,5,"(/ \\");
- mvwaddstr(lookdeer4,8,0,"v___= ----^");
-
-
-
- /***********************************************/
- cbreak();
- nodelay(stdscr,TRUE);
- do
- {
- clear();
- werase(treescrn);
- touchwin(treescrn);
- werase(treescrn2);
- touchwin(treescrn2);
- werase(treescrn8);
- touchwin(treescrn8);
- refresh();
- usleep(1000);
- boxit();
- refresh();
- usleep(1000);
- seas();
- refresh();
- usleep(1000);
- greet();
- refresh();
- usleep(1000);
- fromwho();
- refresh();
- usleep(1000);
- tree();
- usleep(1000);
- balls();
- usleep(1000);
- star();
- usleep(1000);
- strng1();
- strng2();
- strng3();
- strng4();
- strng5();
-
-
- /* set up the windows for our blinking trees */
- /* **************************************** */
- /* treescrn3 */
-
- overlay(treescrn, treescrn3);
-
- /*balls*/
- mvwaddch(treescrn3, 4, 18, ' ');
- mvwaddch(treescrn3, 7, 6, ' ');
- mvwaddch(treescrn3, 8, 19, ' ');
- mvwaddch(treescrn3, 11, 22, ' ');
-
- /*star*/
- mvwaddch(treescrn3, 0, 12, '*');
-
- /*strng1*/
- mvwaddch(treescrn3, 3, 11, ' ');
-
- /*strng2*/
- mvwaddch(treescrn3, 5, 13, ' ');
- mvwaddch(treescrn3, 6, 10, ' ');
-
- /*strng3*/
- mvwaddch(treescrn3, 7, 16, ' ');
- mvwaddch(treescrn3, 7, 14, ' ');
-
- /*strng4*/
- mvwaddch(treescrn3, 10, 13, ' ');
- mvwaddch(treescrn3, 10, 10, ' ');
- mvwaddch(treescrn3, 11, 8, ' ');
-
- /*strng5*/
- mvwaddch(treescrn3, 11, 18, ' ');
- mvwaddch(treescrn3, 12, 13, ' ');
-
-
- /* treescrn4 */
-
- overlay(treescrn, treescrn4);
-
- /*balls*/
- mvwaddch(treescrn4, 3, 9, ' ');
- mvwaddch(treescrn4, 4, 16, ' ');
- mvwaddch(treescrn4, 7, 6, ' ');
- mvwaddch(treescrn4, 8, 19, ' ');
- mvwaddch(treescrn4, 11, 2, ' ');
- mvwaddch(treescrn4, 12, 23, ' ');
-
- /*star*/
- wstandout(treescrn4);
- mvwaddch(treescrn4, 0, 12, '*');
- wstandend(treescrn4);
-
- /*strng1*/
- mvwaddch(treescrn4, 3, 13, ' ');
-
- /*strng2*/
-
- /*strng3*/
- mvwaddch(treescrn4, 7, 15, ' ');
- mvwaddch(treescrn4, 8, 11, ' ');
-
- /*strng4*/
- mvwaddch(treescrn4, 9, 16, ' ');
- mvwaddch(treescrn4, 10, 12, ' ');
- mvwaddch(treescrn4, 11, 8, ' ');
-
- /*strng5*/
- mvwaddch(treescrn4, 11, 18, ' ');
- mvwaddch(treescrn4, 12, 14, ' ');
-
-
- /* treescrn5 */
-
- overlay(treescrn, treescrn5);
-
- /*balls*/
- mvwaddch(treescrn5, 3, 15, ' ');
- mvwaddch(treescrn5, 10, 20, ' ');
- mvwaddch(treescrn5, 12, 1, ' ');
-
- /*star*/
- mvwaddch(treescrn5, 0, 12, '*');
-
- /*strng1*/
- mvwaddch(treescrn5, 3, 11, ' ');
-
- /*strng2*/
- mvwaddch(treescrn5, 5, 12, ' ');
-
- /*strng3*/
- mvwaddch(treescrn5, 7, 14, ' ');
- mvwaddch(treescrn5, 8, 10, ' ');
-
- /*strng4*/
- mvwaddch(treescrn5, 9, 15, ' ');
- mvwaddch(treescrn5, 10, 11, ' ');
- mvwaddch(treescrn5, 11, 7, ' ');
-
- /*strng5*/
- mvwaddch(treescrn5, 11, 17, ' ');
- mvwaddch(treescrn5, 12, 13, ' ');
-
- /* treescrn6 */
-
- overlay(treescrn, treescrn6);
-
- /*balls*/
- mvwaddch(treescrn6, 6, 7, ' ');
- mvwaddch(treescrn6, 7, 18, ' ');
- mvwaddch(treescrn6, 10, 4, ' ');
- mvwaddch(treescrn6, 11, 23, ' ');
-
- /*star*/
- wstandout(treescrn6);
- mvwaddch(treescrn6, 0, 12, '*');
- wstandend(treescrn6);
-
- /*strng1*/
-
- /*strng2*/
- mvwaddch(treescrn6, 5, 11, ' ');
-
- /*strng3*/
- mvwaddch(treescrn6, 7, 13, ' ');
- mvwaddch(treescrn6, 8, 9, ' ');
-
- /*strng4*/
- mvwaddch(treescrn6, 9, 14, ' ');
- mvwaddch(treescrn6, 10, 10, ' ');
- mvwaddch(treescrn6, 11, 6, ' ');
-
- /*strng5*/
- mvwaddch(treescrn6, 11, 16, ' ');
- mvwaddch(treescrn6, 12, 12, ' ');
-
- /* treescrn7 */
-
- overlay(treescrn, treescrn7);
-
- /*balls*/
- mvwaddch(treescrn7, 3, 15, ' ');
- mvwaddch(treescrn7, 6, 7, ' ');
- mvwaddch(treescrn7, 7, 18, ' ');
- mvwaddch(treescrn7, 10, 4, ' ');
- mvwaddch(treescrn7, 11, 22, ' ');
-
- /*star*/
- mvwaddch(treescrn7, 0, 12, '*');
-
- /*strng1*/
- mvwaddch(treescrn7, 3, 12, ' ');
-
- /*strng2*/
- mvwaddch(treescrn7, 5, 13, ' ');
- mvwaddch(treescrn7, 6, 9, ' ');
-
- /*strng3*/
- mvwaddch(treescrn7, 7, 15, ' ');
- mvwaddch(treescrn7, 8, 11, ' ');
-
- /*strng4*/
- mvwaddch(treescrn7, 9, 16, ' ');
- mvwaddch(treescrn7, 10, 12, ' ');
- mvwaddch(treescrn7, 11, 8, ' ');
-
- /*strng5*/
- mvwaddch(treescrn7, 11, 18, ' ');
- mvwaddch(treescrn7, 12, 14, ' ');
-
-
- usleep(1000);
- reindeer();
-
- touchwin(w_holiday);
- wrefresh(w_holiday);
- wrefresh(w_del_msg);
-
- usleep(1000);
- for(loopy = 0;loopy < 100;loopy++)
- {
- blinkit();
- }
-
-#ifdef NOLOOP
- done();
-#endif
-
- }
- while(getch() == (ERR));
-/* while(!typeahead(stdin));*/
- done();
-}
-
-boxit()
-{
- int x = 0;
-
- while(x < 20)
- {
- mvaddch(x, 7, '|');
- ++x;
- }
-
- x = 8;
-
- while(x < 80)
- {
- mvaddch(19, x, '_');
- ++x;
- }
-
- x = 0;
-
- while(x < 80)
- {
- mvaddch(22, x, '_');
- ++x;
- }
-
- return( 0 );
-}
-
-seas()
-{
- mvaddch(4, 1, 'S');
- mvaddch(6, 1, 'E');
- mvaddch(8, 1, 'A');
- mvaddch(10, 1, 'S');
- mvaddch(12, 1, 'O');
- mvaddch(14, 1, 'N');
- mvaddch(16, 1, '`');
- mvaddch(18, 1, 'S');
-
- return( 0 );
-}
-
-
-greet()
-{
- mvaddch(3, 5, 'G');
- mvaddch(5, 5, 'R');
- mvaddch(7, 5, 'E');
- mvaddch(9, 5, 'E');
- mvaddch(11, 5, 'T');
- mvaddch(13, 5, 'I');
- mvaddch(15, 5, 'N');
- mvaddch(17, 5, 'G');
- mvaddch(19, 5, 'S');
-
- return( 0 );
-}
-
-
-fromwho()
-{
- mvaddstr(21, 13, FROMWHO);
- return( 0 );
-}
-
-
-del_msg()
-{
- mvwaddstr(w_del_msg, 0, 0, "Hit any key to quit");
- wrefresh(w_del_msg);
-
- refresh();
-
- return( 0 );
-}
-
-
-tree()
-{
- mvwaddch(treescrn, 1, 11, (chtype)'/');
- mvwaddch(treescrn, 2, 11, (chtype)'/');
- mvwaddch(treescrn, 3, 10, (chtype)'/');
- mvwaddch(treescrn, 4, 9, (chtype)'/');
- mvwaddch(treescrn, 5, 9, (chtype)'/');
- mvwaddch(treescrn, 6, 8, (chtype)'/');
- mvwaddch(treescrn, 7, 7, (chtype)'/');
- mvwaddch(treescrn, 8, 6, (chtype)'/');
- mvwaddch(treescrn, 9, 6, (chtype)'/');
- mvwaddch(treescrn, 10, 5, (chtype)'/');
- mvwaddch(treescrn, 11, 3, (chtype)'/');
- mvwaddch(treescrn, 12, 2, (chtype)'/');
-
- mvwaddch(treescrn, 1, 13, (chtype)'\\');
- mvwaddch(treescrn, 2, 13, (chtype)'\\');
- mvwaddch(treescrn, 3, 14, (chtype)'\\');
- mvwaddch(treescrn, 4, 15, (chtype)'\\');
- mvwaddch(treescrn, 5, 15, (chtype)'\\');
- mvwaddch(treescrn, 6, 16, (chtype)'\\');
- mvwaddch(treescrn, 7, 17, (chtype)'\\');
- mvwaddch(treescrn, 8, 18, (chtype)'\\');
- mvwaddch(treescrn, 9, 18, (chtype)'\\');
- mvwaddch(treescrn, 10, 19, (chtype)'\\');
- mvwaddch(treescrn, 11, 21, (chtype)'\\');
- mvwaddch(treescrn, 12, 22, (chtype)'\\');
-
- mvwaddch(treescrn, 4, 10, (chtype)'_');
- mvwaddch(treescrn, 4, 14, (chtype)'_');
- mvwaddch(treescrn, 8, 7, (chtype)'_');
- mvwaddch(treescrn, 8, 17, (chtype)'_');
-
- mvwaddstr(treescrn, 13, 0, "//////////// \\\\\\\\\\\\\\\\\\\\\\\\");
-
- mvwaddstr(treescrn, 14, 11, "| |");
- mvwaddstr(treescrn, 15, 11, "|_|");
-
- wrefresh(treescrn);
- wrefresh(w_del_msg);
-
- return( 0 );
-}
-
-
-balls()
-{
-
- overlay(treescrn, treescrn2);
-
- mvwaddch(treescrn2, 3, 9, (chtype)'@');
- mvwaddch(treescrn2, 3, 15, (chtype)'@');
- mvwaddch(treescrn2, 4, 8, (chtype)'@');
- mvwaddch(treescrn2, 4, 16, (chtype)'@');
- mvwaddch(treescrn2, 5, 7, (chtype)'@');
- mvwaddch(treescrn2, 5, 17, (chtype)'@');
- mvwaddch(treescrn2, 7, 6, (chtype)'@');
- mvwaddch(treescrn2, 7, 18, (chtype)'@');
- mvwaddch(treescrn2, 8, 5, (chtype)'@');
- mvwaddch(treescrn2, 8, 19, (chtype)'@');
- mvwaddch(treescrn2, 10, 4, (chtype)'@');
- mvwaddch(treescrn2, 10, 20, (chtype)'@');
- mvwaddch(treescrn2, 11, 2, (chtype)'@');
- mvwaddch(treescrn2, 11, 22, (chtype)'@');
- mvwaddch(treescrn2, 12, 1, (chtype)'@');
- mvwaddch(treescrn2, 12, 23, (chtype)'@');
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
-}
-
-
-star()
-{
- wstandout(treescrn2);
- mvwaddch(treescrn2, 0, 12, (chtype)'*');
- wstandend(treescrn2);
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
-}
-
-
-strng1()
-{
- mvwaddch(treescrn2, 3, 13, (chtype)'\'');
- mvwaddch(treescrn2, 3, 12, (chtype)':');
- mvwaddch(treescrn2, 3, 11, (chtype)'.');
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
-}
-
-
-strng2()
-{
- mvwaddch(treescrn2, 5, 14, (chtype)'\'');
- mvwaddch(treescrn2, 5, 13, (chtype)':');
- mvwaddch(treescrn2, 5, 12, (chtype)'.');
- mvwaddch(treescrn2, 5, 11, (chtype)',');
- mvwaddch(treescrn2, 6, 10, (chtype)'\'');
- mvwaddch(treescrn2, 6, 9, (chtype)':');
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
-}
-
-
-strng3()
-{
- mvwaddch(treescrn2, 7, 16, (chtype)'\'');
- mvwaddch(treescrn2, 7, 15, (chtype)':');
- mvwaddch(treescrn2, 7, 14, (chtype)'.');
- mvwaddch(treescrn2, 7, 13, (chtype)',');
- mvwaddch(treescrn2, 8, 12, (chtype)'\'');
- mvwaddch(treescrn2, 8, 11, (chtype)':');
- mvwaddch(treescrn2, 8, 10, (chtype)'.');
- mvwaddch(treescrn2, 8, 9, (chtype)',');
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
-}
-
-
-strng4()
-{
- mvwaddch(treescrn2, 9, 17, (chtype)'\'');
- mvwaddch(treescrn2, 9, 16, (chtype)':');
- mvwaddch(treescrn2, 9, 15, (chtype)'.');
- mvwaddch(treescrn2, 9, 14, (chtype)',');
- mvwaddch(treescrn2, 10, 13, (chtype)'\'');
- mvwaddch(treescrn2, 10, 12, (chtype)':');
- mvwaddch(treescrn2, 10, 11, (chtype)'.');
- mvwaddch(treescrn2, 10, 10, (chtype)',');
- mvwaddch(treescrn2, 11, 9, (chtype)'\'');
- mvwaddch(treescrn2, 11, 8, (chtype)':');
- mvwaddch(treescrn2, 11, 7, (chtype)'.');
- mvwaddch(treescrn2, 11, 6, (chtype)',');
- mvwaddch(treescrn2, 12, 5, (chtype)'\'');
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
-}
-
-
-strng5()
-{
- mvwaddch(treescrn2, 11, 19, (chtype)'\'');
- mvwaddch(treescrn2, 11, 18, (chtype)':');
- mvwaddch(treescrn2, 11, 17, (chtype)'.');
- mvwaddch(treescrn2, 11, 16, (chtype)',');
- mvwaddch(treescrn2, 12, 15, (chtype)'\'');
- mvwaddch(treescrn2, 12, 14, (chtype)':');
- mvwaddch(treescrn2, 12, 13, (chtype)'.');
- mvwaddch(treescrn2, 12, 12, (chtype)',');
-
- /* save a fully lit tree */
- overlay(treescrn2, treescrn);
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
-}
-
-
-
-blinkit()
-{
- static int cycle;
-
- if(cycle > 4)
- {
- cycle = 0;
- }
-
-
- touchwin(treescrn8);
-
- switch(cycle)
- {
-
- case 0:
- overlay(treescrn3, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
-
- break;
- case 1:
- overlay(treescrn4, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
-
- break;
- case 2:
- overlay(treescrn5, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
-
- break;
- case 3:
- overlay(treescrn6, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
-
- break;
- case 4:
- overlay(treescrn7, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
-
- break;
- }
-
- touchwin(treescrn8);
-
-
-
- /*ALL ON***************************************************/
-
-
- overlay(treescrn, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
-
-
- ++cycle;
- return( 0 );
-}
-
-
-reindeer()
-{
- int looper;
-
- y_pos = 0;
-
-
- for(x_pos = 70; x_pos > 62; x_pos--)
- {
- if(x_pos < 62)
- {
- y_pos = 1;
- }
- for(looper = 0; looper < 4; looper++)
- {
- mvwaddch(dotdeer0, y_pos, x_pos, (chtype)'.');
- wrefresh(dotdeer0);
- wrefresh(w_del_msg);
- werase(dotdeer0);
- wrefresh(dotdeer0);
- wrefresh(w_del_msg);
- }
- }
-
- y_pos = 2;
-
- for(; x_pos > 50; x_pos--)
- {
-
- for(looper = 0; looper < 4; looper++)
- {
-
- if(x_pos < 56)
- {
- y_pos = 3;
-
- mvwaddch(stardeer0, y_pos, x_pos, (chtype)'*');
- wrefresh(stardeer0);
- wrefresh(w_del_msg);
- werase(stardeer0);
- wrefresh(stardeer0);
- wrefresh(w_del_msg);
- }
- else
- {
- mvwaddch(dotdeer0, y_pos, x_pos, (chtype)'*');
- wrefresh(dotdeer0);
- wrefresh(w_del_msg);
- werase(dotdeer0);
- wrefresh(dotdeer0);
- wrefresh(w_del_msg);
- }
- }
- }
-
- x_pos = 58;
-
- for(y_pos = 2; y_pos < 5; y_pos++)
- {
-
- touchwin(lildeer0);
- wrefresh(lildeer0);
- wrefresh(w_del_msg);
-
- for(looper = 0; looper < 4; looper++)
- {
- mvwin(lildeer3, y_pos, x_pos);
- wrefresh(lildeer3);
- wrefresh(w_del_msg);
-
- mvwin(lildeer2, y_pos, x_pos);
- wrefresh(lildeer2);
- wrefresh(w_del_msg);
-
- mvwin(lildeer1, y_pos, x_pos);
- wrefresh(lildeer1);
- wrefresh(w_del_msg);
-
- mvwin(lildeer2, y_pos, x_pos);
- wrefresh(lildeer2);
- wrefresh(w_del_msg);
-
- mvwin(lildeer3, y_pos, x_pos);
- wrefresh(lildeer3);
- wrefresh(w_del_msg);
-
- touchwin(lildeer0);
- wrefresh(lildeer0);
- wrefresh(w_del_msg);
-
- x_pos -= 2;
- }
- }
-
-
- x_pos = 35;
-
- for(y_pos = 5; y_pos < 10; y_pos++)
- {
-
- touchwin(middeer0);
- wrefresh(middeer0);
- wrefresh(w_del_msg);
-
- for(looper = 0; looper < 2; looper++)
- {
- mvwin(middeer3, y_pos, x_pos);
- wrefresh(middeer3);
- wrefresh(w_del_msg);
-
- mvwin(middeer2, y_pos, x_pos);
- wrefresh(middeer2);
- wrefresh(w_del_msg);
-
- mvwin(middeer1, y_pos, x_pos);
- wrefresh(middeer1);
- wrefresh(w_del_msg);
-
- mvwin(middeer2, y_pos, x_pos);
- wrefresh(middeer2);
- wrefresh(w_del_msg);
-
- mvwin(middeer3, y_pos, x_pos);
- wrefresh(middeer3);
- wrefresh(w_del_msg);
-
- touchwin(middeer0);
- wrefresh(middeer0);
- wrefresh(w_del_msg);
-
- x_pos -= 3;
- }
- }
-
- usleep(2000);
-
- y_pos = 1;
-
- for(x_pos = 8; x_pos < 16; x_pos++)
- {
-
- mvwin(bigdeer4, y_pos, x_pos);
- wrefresh(bigdeer4);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer3, y_pos, x_pos);
- wrefresh(bigdeer3);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer2, y_pos, x_pos);
- wrefresh(bigdeer2);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer1, y_pos, x_pos);
- wrefresh(bigdeer1);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer2, y_pos, x_pos);
- wrefresh(bigdeer2);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer3, y_pos, x_pos);
- wrefresh(bigdeer3);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer4, y_pos, x_pos);
- wrefresh(bigdeer4);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer0, y_pos, x_pos);
- wrefresh(bigdeer0);
- wrefresh(w_del_msg);
- }
-
- --x_pos;
-
- for(looper = 0; looper < 6; looper++)
- {
- mvwin(lookdeer4, y_pos, x_pos);
- wrefresh(lookdeer4);
- wrefresh(w_del_msg);
-
- mvwin(lookdeer3, y_pos, x_pos);
- wrefresh(lookdeer3);
- wrefresh(w_del_msg);
-
- mvwin(lookdeer2, y_pos, x_pos);
- wrefresh(lookdeer2);
- wrefresh(w_del_msg);
-
- mvwin(lookdeer1, y_pos, x_pos);
- wrefresh(lookdeer1);
- wrefresh(w_del_msg);
-
- mvwin(lookdeer2, y_pos, x_pos);
- wrefresh(lookdeer2);
- wrefresh(w_del_msg);
-
- mvwin(lookdeer3, y_pos, x_pos);
- wrefresh(lookdeer3);
- wrefresh(w_del_msg);
-
- mvwin(lookdeer4, y_pos, x_pos);
- wrefresh(lookdeer4);
- wrefresh(w_del_msg);
-
- }
-
- mvwin(lookdeer0, y_pos, x_pos);
- wrefresh(lookdeer0);
- wrefresh(w_del_msg);
-
- for(; y_pos < 10; y_pos++)
- {
-
- for(looper = 0; looper < 2; looper++)
- {
- mvwin(bigdeer4, y_pos, x_pos);
- wrefresh(bigdeer4);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer3, y_pos, x_pos);
- wrefresh(bigdeer3);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer2, y_pos, x_pos);
- wrefresh(bigdeer2);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer1, y_pos, x_pos);
- wrefresh(bigdeer1);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer2, y_pos, x_pos);
- wrefresh(bigdeer2);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer3, y_pos, x_pos);
- wrefresh(bigdeer3);
- wrefresh(w_del_msg);
-
- mvwin(bigdeer4, y_pos, x_pos);
- wrefresh(bigdeer4);
- wrefresh(w_del_msg);
- }
- mvwin(bigdeer0, y_pos, x_pos);
- wrefresh(bigdeer0);
- wrefresh(w_del_msg);
- }
-
- --y_pos;
-
- mvwin(lookdeer3, y_pos, x_pos);
- wrefresh(lookdeer3);
- wrefresh(w_del_msg);
- return( 0 );
-}
-
-
-
-void done()
-{
- signal(SIGINT,done);
- signal(SIGTERM,done);
-#if !defined DOS && !defined OS2
- signal(SIGHUP,done);
- signal(SIGQUIT,done);
-#endif
- clear();
- refresh();
- endwin();
- exit(0);
-}
diff --git a/lib/libncurses/copyright.c b/lib/libncurses/copyright.c
deleted file mode 100644
index 5964afc..0000000
--- a/lib/libncurses/copyright.c
+++ /dev/null
@@ -1,19 +0,0 @@
-char _ncurses_copyright[] = "\n\
-/***************************************************************************
-* COPYRIGHT NOTICE *
-****************************************************************************
-* ncurses is copyright (C) 1992, 1993, 1994 *
-* by Zeyd M. Ben-Halim *
-* zmbenhal@netcom.com *
-* *
-* Permission is hereby granted to reproduce and distribute ncurses *
-* by any means and for any fee, whether alone or as part of a *
-* larger distribution, in source or in binary form, PROVIDED *
-* this notice is included with any such distribution, not removed *
-* from header files, and is reproduced in any documentation *
-* accompanying it or the applications linked with it. *
-* *
-* ncurses comes AS IS with no warranty, implied or expressed. *
-* *
-***************************************************************************/
-\n";
diff --git a/lib/libncurses/curs_addch.3 b/lib/libncurses/curs_addch.3
deleted file mode 100644
index 5b26e32..0000000
--- a/lib/libncurses/curs_addch.3
+++ /dev/null
@@ -1,115 +0,0 @@
-.\" $Id$
-.\"
-.TH curs_addch 3 ""
-.SH NAME
-\fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR,
-\fBechochar\fR,
-\fBwechochar\fR - add a character (with attributes) to a \fBncurses\fR window, then advance the cursor
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBaddch(chtype ch);\fR
-.br
-\fBwaddch(WINDOW *win, chtype ch);\fR
-.br
-\fBmvaddch(int y, int x, chtype ch);\fR
-.br
-\fBmvwaddch(WINDOW *win, int y, int x, chtype ch);\fR
-.br
-\fBechochar(chtype ch);\fR
-.br
-\fBwechochar(WINDOW *win, chtype ch);\fR
-.br
-.SH DESCRIPTION
-The \fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR and \fBmvwaddch\fR routines put
-the character \fIch\fR into the given window at its current window position,
-which is then advanced. They are analogous to \fBputchar\fR in \fBstdio\fR(3).
-If the advance is at the right margin, the cursor automatically wraps to the
-beginning of the next line. At the bottom of the scrolling region, if
-\fBscrollok\fR is enabled, the scrolling region is scrolled up one line.
-
-If \fIch\fR is a tab, newline, or backspace, the cursor is moved appropriately
-within the window. A newline also does a \fBclrtoeol\fR before moving. Tabs
-are considered to be at every eighth column.
-
-If \fIch\fR is any control character other than tab, newline, or backspace, it
-is drawn in \fB^\fR\fIX\fR notation. Calling \fBwinch\fR after adding a
-control character does not return the control character, but instead returns
-the representation of the control character. (To emit control characters
-literally, use \fBechochar\fR.)
-
-Video attributes can be combined with a character by OR-ing them into the
-parameter. This results in these attributes also being set. (The intent here
-is that text, including attributes, can be copied from one place to another
-using \fBinch\fR and \fBaddch\fR.) [see \fBstandout\fR, predefined video
-attribute constants, on the curs_attr(3) page].
-
-The \fBechochar\fR and \fBwechochar\fR routines are functionally equivalent to
-a call to \fBaddch\fR followed by a call to \fBrefresh\fR, or a call to
-\fBwaddch\fR followed by a call to \fBwrefresh\fR. The knowledge that only a
-single character is being output is taken into consideration and, for
-non-control characters, a considerable performance gain might be seen by using
-these routines instead of their equivalents.
-.SS Line Graphics
-The following variables may be used to add line drawing characters to the
-screen with routines of the \fBaddch\fR family. The default character listed
-below is used if the \fBacsc\fR capability doesn't define a terminal-specific
-replacement for it. The names are taken from the VT100 nomenclature.
-
-.TS
-l l l
-_ _ _
-l l l.
-\fIName\fR \fIDefault\fR \fIDescription\fR
-ACS_ULCORNER + upper left-hand corner
-ACS_LLCORNER + lower left-hand corner
-ACS_URCORNER + upper right-hand corner
-ACS_LRCORNER + lower right-hand corner
-ACS_RTEE + right tee
-ACS_LTEE + left tee
-ACS_BTEE + bottom tee
-ACS_TTEE + top tee
-ACS_HLINE - horizontal line
-ACS_VLINE | vertical line
-ACS_PLUS + plus
-ACS_S1 - scan line 1
-ACS_S9 \&_ scan line 9
-ACS_DIAMOND + diamond
-ACS_CKBOARD : checker board (stipple)
-ACS_DEGREE ' degree symbol
-ACS_PLMINUS # plus/minus
-ACS_BULLET o bullet
-ACS_LARROW < arrow pointing left
-ACS_RARROW > arrow pointing right
-ACS_DARROW v arrow pointing down
-ACS_UARROW ^ arrow pointing up
-ACS_BOARD # board of squares
-ACS_LANTERN # lantern symbol
-ACS_BLOCK # solid square block
-.TE
-
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion, unless otherwise noted in the
-preceding routine descriptions.
-.SH BUGS
-.SH NOTES
-Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and
-\fBechochar\fR may be macros.
-
-On 386 and 486 consoles, giving \fBwechochar\fR an argument with its high
-bit set will produce the corresponding high-half ASCIIZ graphic (SVr4 curses
-also has this feature but does not document it). A control-character argument,
-however, will not typically produce the corresponding graphic;
-characters such as CR, NL, FF and TAB are typically interpreted by the console
-driver itself, and ESC will be interpreted as the leader of a control sequence.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_attr\fR(3), \fBcurs_clear\fR(3),
-\fBcurs_inch\fR(3), \fBcurs_outopts\fR(3), \fBcurs_refresh\fR(3),
-\fBputc\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_addchst.3 b/lib/libncurses/curs_addchst.3
deleted file mode 100644
index 2991dcd..0000000
--- a/lib/libncurses/curs_addchst.3
+++ /dev/null
@@ -1,49 +0,0 @@
-.TH curs_addchstr 3 ""
-.SH NAME
-\fBaddchstr\fR, \fBaddchnstr\fR, \fBwaddchstr\fR,
-\fBwaddchnstr\fR, \fBmvaddchstr\fR, \fBmvaddchnstr\fR, \fBmvwaddchstr\fR,
-\fBmvwaddchnstr\fR - add string of characters (and attributes) to a \fBncurses\fR window
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint addchstr(chtype *chstr);\fR
-.br
-\fBint addchnstr(chtype *chstr, int n);\fR
-.br
-\fBint waddchstr(WINDOW *win, chtype *chstr);\fR
-.br
-\fBint waddchnstr(WINDOW *win, chtype *chstr, int n);\fR
-.br
-\fBint mvaddchstr(int y, int x, chtype *chstr);\fR
-.br
-\fBint mvaddchnstr(int y, int x, chtype *chstr, int n);\fR
-.br
-\fBint mvwaddchstr(WINDOW *win, int y, int x, chtype *chstr);\fR
-.br
-\fBint mvwaddchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);\fR
-.SH DESCRIPTION
-These routines copy \fIchstr\fR into the window image structure at and after
-the current cursor position. The four routines with \fIn\fR as the last
-argument copy at most \fIn\fR elements, but no more than will fit on the line.
-If \fBn\fR=\fB-1\fR then the whole string is copied, to the maximum number of
-characters that will fit on the line.
-
-The window cursor is \fINOT\fR advanced, and these routines work faster than
-\fBwaddnstr\fR. On the other hand, care must be taken when using them because
-they don't perform any kind of checking (such as for the newline character),
-they don't advance the current cursor position, and they truncate the string if
-it crosses the right margin, rather then wrapping it around to the new line.
-.SH RETURN VALUES
-All these routines return the integer \fBERR\fR upon failure and an integer
-value other than \fBERR\fR upon successful completion, unless
-otherwise noted in the preceding routine descriptions.
-.SH NOTES
-Note that all routines except \fBwaddchnstr\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_addstr.3 b/lib/libncurses/curs_addstr.3
deleted file mode 100644
index c55c2f5..0000000
--- a/lib/libncurses/curs_addstr.3
+++ /dev/null
@@ -1,44 +0,0 @@
-.TH curs_addstr 3 ""
-.SH NAME
-\fBaddstr\fR, \fBaddnstr\fR, \fBwaddstr\fR, \fBwaddnstr\fR,
-\fBmvaddstr\fR, \fBmvaddnstr\fR, \fBmvwaddstr\fR,
-\fBmvwaddnstr\fR - add a string of characters to a \fBncurses\fR window and advance cursor
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint addstr(char *str);\fR
-.br
-\fBint addnstr(char *str, int n);\fR
-.br
-\fBint waddstr(WINDOW *win, char *str);\fR
-.br
-\fBint waddnstr(WINDOW *win, char *str, int n);\fR
-.br
-\fBint mvaddstr(y, int x, char *str);\fR
-.br
-\fBint mvaddnstr(y, int x, char *str, int n);\fR
-.br
-\fBint mvwaddstr(WINDOW *win, int y, int x, char *str);\fR
-.br
-\fBint mvwaddnstr(WINDOW *win, int y, int x, char *str,
- int n);\fR
-.SH DESCRIPTION
-These routines write the characters of the null terminated character string
-\fIstr\fR on the given window. It is similar to calling \fBwaddch\fR once for
-each character in the string. The four routines with \fIn\fR as the last
-argument write at most \fIn\fR characters. If \fIn\fR is negative, then the
-entire string will be added.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that all of these routines except \fBwaddstr\fR and \fBwaddnstr\fR may be
-macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_addch\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_attr.3 b/lib/libncurses/curs_attr.3
deleted file mode 100644
index a7a2b45..0000000
--- a/lib/libncurses/curs_attr.3
+++ /dev/null
@@ -1,84 +0,0 @@
-.TH curs_attr 3 ""
-.SH NAME
-\fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
-\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR, \fBwstandend\fR, \fBstandout\fR,
-\fBwstandout\fR - \fBncurses\fR character and window attribute control routines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-.br
-\fBint attroff(int attrs);\fR
-.br
-\fBint wattroff(WINDOW *win, int attrs);\fR
-.br
-\fBint attron(int attrs);\fR
-.br
-\fBint wattron(WINDOW *win, int attrs);\fR
-.br
-\fBint attrset(int attrs);\fR
-.br
-\fBint wattrset(WINDOW *win, int attrs);\fR
-.br
-\fBint standend(void);\fR
-.br
-\fBint wstandend(WINDOW *win);\fR
-.br
-\fBint standout(void);\fR
-.br
-\fBint wstandout(WINDOW *win);\fR
-.br
-.SH DESCRIPTION
-These routines manipulate the current attributes of the named window. The
-current attributes of a window apply to all characters that are written into
-the window with \fBwaddch\fR, \fBwaddstr\fR and \fBwprintw\fR. Attributes are
-a property of the character, and move with the character through any scrolling
-and insert/delete line/character operations. To the extent possible, they are
-displayed as appropriate modifications to the graphic rendition of characters
-put on the screen.
-
-The routine \fBattrset\fR sets the current attributes of the given window to
-\fIattrs\fR. The routine \fBattroff\fR turns off the named attributes without
-turning any other attributes on or off. The routine \fBattron\fR turns on the
-named attributes without affecting any others. The routine \fBstandout\fR is
-the same as \fBattron(A_STANDOUT)\fR. The routine \fBstandend\fR is the same
-as \fBattrset(A_NORMAL)\fR or \fBattrset(0)\fR, that is, it turns off all
-attributes.
-.SS Attributes
-The following video attributes, defined in \fB<ncurses.h>\fR, can be passed to
-the routines \fBattron\fR, \fBattroff\fR, and \fBattrset\fR, or OR-ed with the
-characters passed to \fBaddch\fR.
-
-.nf
-\fBA_NORMAL\fR Normal display (no highlight)
-\fBA_STANDOUT\fR Best highlighting mode of the terminal.
-\fBA_UNDERLINE\fR Underlining
-\fBA_REVERSE\fR Reverse video
-\fBA_BLINK\fR Blinking
-\fBA_DIM\fR Half bright
-\fBA_BOLD\fR Extra bright or bold
-\fBA_ALTCHARSET\fR Alternate character set
-\fBA_CHARTEXT\fR Bit-mask to extract a character
-\fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR Color-pair number \fIn\fR
-.fi
-
-The following macro is the reverse of \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR:
-
-.DS C
-\fBPAIR_NUMBER(\fIattrs\fR) Returns the pair number associated
- with the \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR attribute.
-.DE
-
-The return values of these routines are not meaningful (many are implemented
-as macro-expanded assignments and simply return their argument). The SVr4
-manual page claims (falsely) that these routines always return \fB1\fR.
-.SH NOTES
-Note that \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
-\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR and \fBstandout\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_addch\fR(3), \fBcurs_addstr\fR(3),
-\fBcurs_printw\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_beep.3 b/lib/libncurses/curs_beep.3
deleted file mode 100644
index b80fd52..0000000
--- a/lib/libncurses/curs_beep.3
+++ /dev/null
@@ -1,29 +0,0 @@
-.TH curs_beep 3 ""
-.SH NAME
-\fBbeep\fR, \fBflash\fR - \fBncurses\fR bell and screen flash routines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint beep(void);\fR
-.br
-\fBint flash(void);\fR
-.br
-.SH DESCRIPTION
-The \fBbeep\fR and \fBflash\fR routines are used to alert the terminal user.
-The routine \fBbeep\fR sounds an audible alarm on the terminal, if possible;
-otherwise it flashes the screen (visible bell). The routine \fBflash\fR
-flashes the screen, and if that is not possible, sounds the alert. If neither
-alert is possible, nothing happens. Nearly all terminals have an audible alert
-(bell or beep), but only some can flash the screen.
-.SH RETURN VALUE
-These routines always return \fBOK\fR.
-.SH CAPABILITIES
-\fBbell\fR, \fBflash_screen\fR.
-.SH SEE ALSO
-\fBncurses\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_bkgd.3 b/lib/libncurses/curs_bkgd.3
deleted file mode 100644
index 7e360705..0000000
--- a/lib/libncurses/curs_bkgd.3
+++ /dev/null
@@ -1,50 +0,0 @@
-.TH curs_bkgd 3 ""
-.SH NAME
-\fBbkgdset\fR, \fBwbkgdset\fR, \fBbkgd\fR,
-\fBwbkgd\fR - \fBncurses\fR window background manipulation routines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBvoid bkgdset(chtype ch);\fR
-.br
-\fBvoid wbkgdset(WINDOW *win, chtype ch);\fR
-.br
-\fBint bkgd(chtype ch);\fR
-.br
-\fBint wbkgd(WINDOW *win, chtype ch);\fR
-.br
-.SH DESCRIPTION
-The \fBbkgdset\fR and \fBwbkgdset\fR routines manipulate the
-background of the named window. Background is a \fBchtype\fR
-consisting of any combination of attributes and a character. The
-attribute part of the background is combined (ORed) with all non-blank
-characters that are written into the window with \fBwaddch\fR. Both
-the character and attribute parts of the background are combined with
-the blank characters. The background becomes a property of the
-character and moves with the character through any scrolling and
-insert/delete line/character operations. To the extent possible on a
-particular terminal, the attribute part of the background is displayed
-as the graphic rendition of the character put on the screen.
-
-The \fBbkgd\fR and \fBwbkgd\fR routines combine the new background
-with every position in the window. Background is any combination of
-attributes and a character. Only the attribute part is used to set
-the background of non-blank characters, while both character and
-attributes are used for blank positions. To the extent possible on a
-particular terminal, the attribute part of the background is displayed
-as the graphic rendition of the character put on the screen.
-.SH RETURN VALUE
-\fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR, or a
-non-negative integer, if \fBimmedok\fR is set.
-.SH NOTES
-Note that \fBbkgdset\fR and \fBbkgd\fR may be macros.
-.SH BUGS
-\fBimmedok\fR is not yet implemented in ncurses 1.8.6.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_addch\fR(3), \fBcurs_outopts\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_border.3 b/lib/libncurses/curs_border.3
deleted file mode 100644
index 1fa94fd..0000000
--- a/lib/libncurses/curs_border.3
+++ /dev/null
@@ -1,67 +0,0 @@
-.TH curs_border 3 ""
-.SH NAME
-\fBborder\fR, \fBwborder\fR, \fBbox\fR,
-\fBhline\fR, \fBwhline\fR, \fBvline\fR,
-\fBwvline\fR - create \fBncurses\fR borders, horizontal and vertical lines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-.br
-\fBint border(chtype ls, chtype rs, chtype ts, chtype bs,
- chtype tl, chtype tr, chtype bl, chtype br);\fR
-.br
-\fBint wborder(WINDOW *win, chtype ls, chtype rs,
- chtype ts, chtype bs, chtype tl, chtype tr,
- chtype bl, chtype br);\fR
-.br
-\fBint box(WINDOW *win, chtype verch, chtype horch);\fR
-.br
-\fBint hline(chtype ch, int n);\fR
-.br
-\fBint whline(WINDOW *win, chtype ch, int n);\fR
-.br
-\fBint vline(chtype ch, int n);\fR
-.br
-\fBint wvline(WINDOW *win, chtype ch, int n);\fR
-.br
-.SH DESCRIPTION
-The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines draw a box around the
-edges of a window. The argument \fIls\fR is a character and attributes used
-for the left side of the border, \fIrs\fR - right side, \fIts\fR - top side,
-\fIbs\fR - bottom side, \fItl\fR - top left-hand corner, \fItr\fR - top
-right-hand corner, \fIbl\fR - bottom left-hand corner, and \fIbr\fR - bottom
-right-hand corner. If any of these arguments is zero, then the following
-default values (defined in \fBncurses.h\fR) are used instead: \fBACS_VLINE,
-ACS_VLINE, ACS_HLINE, ACS_HLINE, \fBACS_ULCORNER, ACS_URCORNER, ACS_LLCORNER,
-ACS_LRCORNER.\fR
-
-\fBbox(\fR\fIwin\fR\gB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand
-for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
-\fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.
-
-The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
-line using \fIch\fR starting at the current cursor position in the window. The
-current cursor position is not changed. The line is at most \fIn\fR characters
-long, or as many as fit into the window.
-
-The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
-using \fIch\fR starting at the current cursor position in the window. The
-current cursor position is not changed. The line is at most \fIn\fR characters
-long, or as many as fit into the window.
-.SH RETURN VALUE
-All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a
-non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
-.SH NOTES
-The borders generated by these functions are \fIinside\fR borders (this
-is also true of SVr4 curses, though the fact is not documented).
-
-Note that \fBborder\fR and \fBbox\fR may be macros.
-.SH BUGS
-The \fBimmedok\fR function is not yet implemented in ncurses 1.8.6.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_outopts\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_clear.3 b/lib/libncurses/curs_clear.3
deleted file mode 100644
index 60c637b..0000000
--- a/lib/libncurses/curs_clear.3
+++ /dev/null
@@ -1,53 +0,0 @@
-.TH curs_clear 3 ""
-.SH NAME
-\fBerase\fR, \fBwerase\fR, \fBclear\fR,
-\fBwclear\fR, \fBclrtobot\fR, \fBwclrtobot\fR, \fBclrtoeol\fR,
-\fBwclrtoeol\fR - clear all or part of a \fBncurses\fR window
-.SH SYNOPSIS
-\fB# include <ncurses.h>\fR
-
-\fBint erase(void);\fR
-.br
-\fBint werase(WINDOW *win);\fR
-.br
-\fBint clear(void);\fR
-.br
-\fBint wclear(WINDOW *win);\fR
-.br
-\fBint clrtobot(void);\fR
-.br
-\fBint wclrtobot(WINDOW *win);\fR
-.br
-\fBint clrtoeol(void);\fR
-.br
-\fBint wclrtoeol(WINDOW *win);\fR
-.br
-.SH DESCRIPTION
-The \fBerase\fR and \fBwerase\fR routines copy blanks to every
-position in the window, clearing the screen.
-
-The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and
-\fBwerase\fR, but they also call \fBclearok\fR, so that the screen is
-cleared completely on the next call to \fBwrefresh\fR for that window
-and repainted from scratch.
-
-The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the
-end of screen. That is, they erase all lines below the cursor in the window.
-Also, the current line to the right of the cursor, inclusive, is erased.
-
-The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line
-to the right of the cursor, inclusive.
-.SH RETURN VALUE
-All routines return the integer \fBOK\fR, or a non-negative integer if
-\fBimmedok\fR is set.
-.SH NOTES
-Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
-\fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_outopts\fR(3), \fBcurs_refresh\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_color.3 b/lib/libncurses/curs_color.3
deleted file mode 100644
index cd32cf3..0000000
--- a/lib/libncurses/curs_color.3
+++ /dev/null
@@ -1,138 +0,0 @@
-.TH curs_color 3 ""
-.SH NAME
-\fBstart_color\fR, \fBinit_pair\fR,
-\fBinit_color\fR, \fBhas_colors\fR, \fBcan_change_color\fR,
-\fBcolor_content\fR,
-\fBpair_content\fR - \fBncurses\fR color manipulation routines
-.SH SYNOPSIS
-\fB# include <ncurses.h>\fR
-.br
-\fBint start_color(void);\fR
-.br
-\fBint init_pair(short pair, short f, short b);\fR
-.br
-\fBint init_color(short color, short r, short g, short b);\fR
-.br
-\fBbool has_colors(void);\fR
-.br
-\fBbool can_change_color(void);\fR
-.br
-\fBint color_content(short color, short *r, short *g, short *b);\fR
-.br
-\fBint pair_content(short pair, short *f, short *b);\fR
-.br
-.SH DESCRIPTION
-.SS Overview
-\fBncurses\fR support color attributes on terminals with that capability. To
-use these routines \fBstart_color\fR must be called, usually right after
-\fBinitscr\fR. Colors are always used in pairs (referred to as color-pairs).
-A color-pair consists of a foreground color (for characters) and a background
-color (for the blank field on which the characters are displayed). A
-programmer initializes a color-pair with the routine \fBinit_pair\fR. After it
-has been initialized, \fBCOLOR_PAIR\fR(\fIn\fR), a macro defined in
-\fB<ncurses.h>\fR, can be used as a new video attribute.
-
-If a terminal is capable of redefining colors, the programmer can use the
-routine \fBinit_color\fR to change the definition of a color. The routines
-\fBhas_colors\fR and \fBcan_change_color\fR return \fBTRUE\fR or \fBFALSE\fR,
-depending on whether the terminal has color capabilities and whether the
-programmer can change the colors. The routine \fBcolor_content\fR allows a
-programmer to extract the amounts of red, green, and blue components in an
-initialized color. The routine \fBpair_content\fR allows a programmer to find
-out how a given color-pair is currently defined.
-.SS Routine Descriptions
-The \fBstart_color\fR routine requires no arguments. It must be
-called if the programmer wants to use colors, and before any other
-color manipulation routine is called. It is good practice to call
-this routine right after \fBinitscr\fR. \fBstart_color\fR initializes
-eight basic colors (black, red, green, yellow, blue, magenta, cyan,
-and white), and two global variables, \fBCOLORS\fR and
-\fBCOLOR_PAIRS\fR (respectively defining the maximum number of colors
-and color-pairs the terminal can support). It also restores the
-colors on the terminal to the values they had when the terminal was
-just turned on.
-
-The \fBinit_pair\fR routine changes the definition of a color-pair. It takes
-three arguments: the number of the color-pair to be changed, the foreground
-color number, and the background color number. The value of the first argument
-must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR. The value of the second and
-third arguments must be between 0 and \fBCOLORS\fR (the 0 color pair is wired
-to white on black and cannot be changed). If the color-pair was previously
-initialized, the screen is refreshed and all occurrences of that color-pair is
-changed to the new definition.
-
-The \fBinit_color\fR routine changes the definition of a color. It takes four
-arguments: the number of the color to be changed followed by three RGB values
-(for the amounts of red, green, and blue components). The value of the first
-argument must be between \fB0\fR and \fBCOLORS\fR. (See the section
-\fBColors\fR for the default color index.) Each of the last three arguments
-must be a value between 0 and 1000. When \fBinit_color\fR is used, all
-occurrences of that color on the screen immediately change to the new
-definition.
-
-The \fBhas_colors\fR routine requires no arguments. It returns \fBTRUE\fR if
-the terminal can manipulate colors; otherwise, it returns \fBFALSE\fR. This
-routine facilitates writing terminal-independent programs. For example, a
-programmer can use it to decide whether to use color or some other video
-attribute.
-
-The \fBcan_change_color\fR routine requires no arguments. It returns
-\fBTRUE\fR if the terminal supports colors and can change their definitions;
-other, it returns \fBFALSE\fR. This routine facilitates writing
-terminal-independent programs.
-
-The \fBcolor_content\fR routine gives programmers a way to find the intensity
-of the red, green, and blue (RGB) components in a color. It requires four
-arguments: the color number, and three addresses of \fBshort\fRs for storing
-the information about the amounts of red, green, and blue components in the
-given color. The value of the first argument must be between 0 and
-\fBCOLORS\fR. The values that are stored at the addresses pointed to by the
-last three arguments are between 0 (no component) and 1000 (maximum amount of
-component).
-
-The \fBpair_content\fR routine allows programmers to find out what colors a
-given color-pair consists of. It requires three arguments: the color-pair
-number, and two addresses of \fBshort\fRs for storing the foreground and the
-background color numbers. The value of the first argument must be between 1
-and \fBCOLOR_PAIRS-1\fR. The values that are stored at the addresses pointed
-to by the second and third arguments are between 0 and \fBCOLORS\fR.
-.SS Colors
-In \fB<ncurses.h>\fR the following macros are defined. These are the default
-colors. \fBncurses\fR also assumes that \fBCOLOR_BLACK\fR is the default
-background color for all terminals.
-
-.nf
- \fBCOLOR_BLACK\fR
- \fBCOLOR_RED\fR
- \fBCOLOR_GREEN\fR
- \fBCOLOR_YELLOW\fR
- \fBCOLOR_BLUE\fR
- \fBCOLOR_MAGENTA\fR
- \fBCOLOR_CYAN\fR
- \fBCOLOR_WHITE\fR
-.fi
-.SH RETURN VALUE
-All routines that return an integer return \fBERR\fR upon failure and \fBOK\fR
-upon successful completion.
-.SH NOTES
-Several caveats apply onn 386 and 486 machines with VGA-compatible graphics:
-
-COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with
-the \fBA_BOLD\fR attribute.
-
-The A_BLINK attribute should in theory cause the background to go bright. This
-often fails to work, and even some cards for which it mostly works (such as the
-Paradise and compatibles) do the wrong thing when you try to set a bright
-"yellow" background (you get a blinking yellow foreground instead).
-
-Color RGB values are not settable.
-.SH CAPABILITIES
-\fBsetf\fR, \fBsetb\fR, \fBsetaf\fR, \fBsetab\fR. The ncurses library uses
-the second pair by preference, falling back to the first.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_initscr\fR(3), \fBcurs_attr\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
diff --git a/lib/libncurses/curs_delch.3 b/lib/libncurses/curs_delch.3
deleted file mode 100644
index 441eaac..0000000
--- a/lib/libncurses/curs_delch.3
+++ /dev/null
@@ -1,34 +0,0 @@
-.TH curs_delch 3 ""
-.SH NAME
-\fBdelch\fR, \fBwdelch\fR, \fBmvdelch\fR,
-\fBmvwdelch\fR - delete character under the cursor in a \fBncurses\fR window
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint delch(void);\fR
-.br
-\fBint wdelch(WINDOW *win);\fR
-.br
-\fBint mvdelch(int y, int x);\fR
-.br
-\fBint mvwdelch(WINDOW *win, int y, int x);\fR
-.br
-.SH DESCRIPTION
-These routines delete the character under the cursor; all characters to the
-right of the cursor on the same line are moved to the left one position and the
-last character on the line is filled with a blank. The cursor position does
-not change (after moving to \fIy\fR, \fIx\fR, if specified). (This does not
-imply use of the hardware delete character feature.)
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that \fBdelch\fR, \fBmvdelch\fR, and \fBmvwdelch\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_delln.3 b/lib/libncurses/curs_delln.3
deleted file mode 100644
index 6ae1025..0000000
--- a/lib/libncurses/curs_delln.3
+++ /dev/null
@@ -1,50 +0,0 @@
-.TH curs_deleteln 3 ""
-.SH NAME
-\fBdeleteln\fR, \fBwdeleteln\fR, \fBinsdelln\fR,
-\fBwinsdelln\fR, \fBinsertln\fR,
-\fBwinsertln\fR - delete and insert lines in a \fBncurses\fR window
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint deleteln(void);\fR
-.br
-\fBint wdeleteln(WINDOW *win);\fR
-.br
-\fBint insdelln(int n);\fR
-.br
-\fBint winsdelln(WINDOW *win, int n);\fR
-.br
-\fBint insertln(void);\fR
-.br
-\fBint winsertln(WINDOW *win);\fR
-.br
-.SH DESCRIPTION
-The \fBdeleteln\fR and \fBwdeleteln\fR routines delete the line under the
-cursor in the window; all lines below the current line are moved up one line.
-The bottom line of the window is cleared. The cursor position does not change.
-
-The \fBinsdelln\fR and \fBwinsdelln\fR routines, for positive \fIn\fR, insert
-\fIn\fR lines into the specified window above the current line. The \fIn\fR
-bottom lines are lost. For negative \fIn\fR, delete \fIn\fR lines (starting
-with the one under the cursor), and move the remaining lines up. The bottom
-\fIn\fR lines are cleared. The current cursor position remains the same.
-
-The \fBinsertln\fR and \fBinsertln\fR routines, insert a blank line above the
-current line and the bottom line is lost.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer
-value other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that all but \fBwinsdelln\fR may be a macros.
-
-These routines do not require a hardware line delete or insert feature in the
-terminal. In fact, they won't use hardware line delete/insert unless
-\fBidlok(..., TRUE)\fR has been set on the current window.
-.SH SEE ALSO
-\fBncurses\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_getch.3 b/lib/libncurses/curs_getch.3
deleted file mode 100644
index 8a5c9ae..0000000
--- a/lib/libncurses/curs_getch.3
+++ /dev/null
@@ -1,188 +0,0 @@
-.TH curs_getch 3 ""
-.SH NAME
-\fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR,
-\fBmvwgetch\fR,
-\fBungetch\fR - get (or push back) characters from \fBncurses\fR terminal keyboard
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint getch(void);\fR
-.br
-\fBint wgetch(WINDOW *win);\fR
-.br
-\fBint mvgetch(int y, int x);\fR
-.br
-\fBint mvwgetch(WINDOW *win, int y, int x);\fR
-.br
-\fBint ungetch(int ch);\fR
-.br
-.SH DESCRIPTION
-The \fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR and \fBmvwgetch\fR, routines read
-a character from the window. In no-delay mode, if no input is waiting, the
-value \fBERR\fR is returned. In delay mode, the program waits until the system
-passes text through to the program. Depending on the setting of \fBcbreak\fR,
-this is after one character (cbreak mode), or after the first newline (nocbreak
-mode). In half-delay mode, the program waits until a character is typed or the
-specified timeout has been reached. Unless \fBnoecho\fR has been set, the
-character will also be echoed into the designated window.
-
-If the window is not a pad, and it has been moved or modified since the last
-call to \fBwrefresh\fR, \fBwrefresh\fR will be called before another character
-is read.
-
-If \fBkeypad\fR is \fBTRUE\fR, and a function key is pressed, the token for
-that function key is returned instead of the raw characters. Possible function
-keys are defined in \fB<ncurses.h>\fR as macros with values outside the range
-of 8-bit characters whose names begin with \fBKEY_.\fR Thus, a variable
-intended to hold the return value of a function key must be of short size or
-larger.
-
-When a character that could be the beginning of a function key is received
-(which, on modern terminals, means an escape character), \fBncurses\fR sets a
-timer. If the remainder of the sequence does not come in within the designated
-time, the character is passed through; otherwise, the function key value is
-returned. For this reason, many terminals experience a delay between the time
-a user presses the escape key and the escape is returned to the program.
-
-The \fBungetch\fR routine places \fIch\fR back onto the input queue to be
-returned by the next call to \fBwgetch\fR. Note that there is, in effect,
-just one input queue for all windows.
-
-.SS Function Keys
-The following function keys, defined in \fB<ncurses.h>\fR, might be returned by
-\fBgetch\fR if \fBkeypad\fR has been enabled. Note that not all of these are
-necessarily supported on any particular terminal.
-.nf
-__________________________________________________________________
-\fIName\fR \fIKey\fR \fIname\fR
-__________________________________________________________________
-KEY_BREAK Break key
-KEY_DOWN The four arrow keys ...
-KEY_UP
-KEY_LEFT
-KEY_RIGHT
-KEY_HOME Home key (upward+left arrow)
-KEY_BACKSPACE Backspace
-KEY_F0 Function keys; space for 64 keys is reserved.
-KEY_F(\fIn\fR) For 0 \fI<\fR \fIn\fR \fI<\fR 63
-KEY_DL Delete line
-KEY_IL Insert line
-KEY_DC Delete character
-KEY_IC Insert char or enter insert mode
-KEY_EIC Exit insert char mode
-KEY_CLEAR Clear screen
-KEY_EOS Clear to end of screen
-KEY_EOL Clear to end of line
-KEY_SF Scroll 1 line forward
-KEY_SR Scroll 1 line backward (reverse)
-KEY_NPAGE Next page
-KEY_PPAGE Previous page
-KEY_STAB Set tab
-KEY_CTAB Clear tab
-KEY_CATAB Clear all tabs
-KEY_ENTER Enter or send
-KEY_SRESET Soft (partial) reset
-KEY_RESET Reset or hard reset
-KEY_PRINT Print or copy
-KEY_LL Home down or bottom (lower left). Keypad is
- arranged like this:
- \fBA1\fR \fBup\fR \fBA3\fR
- \fBleft\fR \fBB2\fR \fBright\fR
- \fBC1\fR \fBdown\fR \fBC3\fR
-KEY_A1 Upper left of keypad
-KEY_A3 Upper right of keypad
-KEY_B2 Center of keypad
-KEY_C1 Lower left of keypad
-KEY_C3 Lower right of keypad
-KEY_BTAB Back tab key
-KEY_BEG Beg(inning) key
-KEY_CANCEL Cancel key
-KEY_CLOSE Close key
-KEY_COMMAND Cmd (command) key
-KEY_COPY Copy key
-KEY_CREATE Create key
-KEY_END End key
-KEY_EXIT Exit key
-KEY_FIND Find key
-KEY_HELP Help key
-KEY_MARK Mark key
-KEY_MESSAGE Message key
-KEY_MOVE Move key
-KEY_NEXT Next object key
-KEY_OPEN Open key
-KEY_OPTIONS Options key
-KEY_PREVIOUS Previous object key
-KEY_REDO Redo key
-KEY_REFERENCE Ref(erence) key
-KEY_REFRESH Refresh key
-KEY_REPLACE Replace key
-KEY_RESTART Restart key
-KEY_RESUME Resume key
-KEY_SAVE Save key
-KEY_SBEG Shifted beginning key
-KEY_SCANCEL Shifted cancel key
-KEY_SCOMMAND Shifted command key
-KEY_SCOPY Shifted copy key
-KEY_SCREATE Shifted create key
-KEY_SDC Shifted delete char key
-KEY_SDL Shifted delete line key
-KEY_SELECT Select key
-KEY_SEND Shifted end key
-KEY_SEOL Shifted clear line key
-KEY_SEXIT Shifted exit key
-KEY_SFIND Shifted find key
-KEY_SHELP Shifted help key
-KEY_SHOME Shifted home key
-KEY_SIC Shifted input key
-KEY_SLEFT Shifted left arrow key
-KEY_SMESSAGE Shifted message key
-KEY_SMOVE Shifted move key
-KEY_SNEXT Shifted next key
-KEY_SOPTIONS Shifted options key
-KEY_SPREVIOUS Shifted prev key
-KEY_SPRINT Shifted print key
-KEY_SREDO Shifted redo key
-KEY_SREPLACE Shifted replace key
-KEY_SRIGHT Shifted right arrow
-KEY_SRSUME Shifted resume key
-KEY_SSAVE Shifted save key
-KEY_SSUSPEND Shifted suspend key
-KEY_SUNDO Shifted undo key
-KEY_SUSPEND Suspend key
-KEY_UNDO Undo key
-.fi
-
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer
-value other than \fBERR\fR upon successful completion.
-.SH NOTES
-Use of the escape key by a programmer for a single character function is
-discouraged, as it will cause a delay of up to one second while the
-keypad code looks for a following function-key sequence.
-
-When using \fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR, or
-\fBmvwgetch\fR, nocbreak mode (\fBnocbreak\fR) and echo mode
-(\fBecho\fR) should not be used at the same time. Depending on the
-state of the tty driver when each character is typed, the program may
-produce undesirable results.
-
-Note that \fBgetch\fR, \fBmvgetch\fR, and \fBmvwgetch\fR may be macros.
-
-Historically, the set of keypad macros was largely defined by the extremely
-function-key-rich keyboard of the AT&T 7300, aka 3B1, aka Safari 4. Modern
-personal computers usually have only a small subset of these. IBM PC-style
-consoles typically support little more than \fBKEY_UP\fR, \fBKEY_DOWN\fR,
-\fBKEY_LEFT\fR, \fBKEY_RIGHT\fR, \fBKEY_HOME\fR, \fBKEY_END\fR,
-\fBKEY_NPAGE\fR, \fBKEY_PPAGE\fR, and function keys 1 through 12. The Ins key
-is usually mapped to \fBKEY_IC\fR.
-.SH CAPABILITIES
-All of the key_* capabilities; also \fBkeypad_local\fR and \fBkeypad_xmit\fR.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_inopts\fR(3), \fBcurs_move\fR(3),
-\fBcurs_refresh\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_getstr.3 b/lib/libncurses/curs_getstr.3
deleted file mode 100644
index 91d934b..0000000
--- a/lib/libncurses/curs_getstr.3
+++ /dev/null
@@ -1,53 +0,0 @@
-.TH curs_getstr 3 ""
-.SH NAME
-\fBgetstr\fR, \fBwgetstr\fR, \fBmvgetstr\fR,
-\fBmvwgetstr\fR,
-\fBwgetnstr\fR - accept character strings from \fBncurses\fR terminal keyboard
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint getstr(char *str);\fR
-.br
-\fBint wgetstr(WINDOW *win, char *str);\fR
-.br
-\fBint mvgetstr(int y, int x, char *str);\fR
-.br
-\fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR
-.br
-\fBint wgetnstr(WINDOW *win, char *str, int n);\fR
-.br
-.SH DESCRIPTION
-The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR,
-until a newline or carriage return is received (the terminating character is
-not included in the returned string). The resulting value is placed in the
-area pointed to by the character pointer \fIstr\fR.
-
-\fBwgetnstr\fR reads at most \fIn\fR characters, thus preventing a possible
-overflow of the input buffer. Any attempt to enter more characters (other
-than the terminating newline or carriage return) causes a beep.
-
-The user's erase and kill characters are interpreted. If keypad
-mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR
-are both considered equivalent to the user's kill character.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH BUGS
-When the window is in keypad mode and the user types any special key
-other than those named above, the `character' value appended to the
-string by the ncurses implementation is predictable but not useful
-(being, in fact, the low-order eight bits of the key's KEY_ value).
-
-The SVr4.0 documentation claims that "special keys (such as function
-keys, "home" key, "clear" key, \fIetc\fR.) are interpreted" without
-giving details. It lies. The actual behavior is like that of ncurses.
-.SH NOTES
-Note that \fBgetstr\fR, \fBmvgetstr\fR, and \fBmvwgetstr\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_getch\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_getyx.3 b/lib/libncurses/curs_getyx.3
deleted file mode 100644
index 8d46126..0000000
--- a/lib/libncurses/curs_getyx.3
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH curs_getyx 3 ""
-.SH NAME
-\fBgetyx\fR, \fBgetparyx\fR, \fBgetbegyx\fR,
-\fBgetmaxyx\fR - get \fBncurses\fR cursor and window coordinates
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBvoid getyx(WINDOW *win, int y, int x);\fR
-.br
-\fBvoid getparyx(WINDOW *win, int y, int x);\fR
-.br
-\fBvoid getbegyx(WINDOW *win, int y, int x);\fR
-.br
-\fBvoid getmaxyx(WINDOW *win, int y, int x);\fR
-.br
-.SH DESCRIPTION
-The \fBgetyx\fR macro places the cursor position of the window in the two
-integer variables \fIy\fR and \fIx\fR.
-
-If \fIwin\fR is a subwindow, the \fBgetparyx\fR macro places the beginning
-coordinates of the subwindow relative to the parent window into two integer
-variables \fIy\fR and \fIx\fR. Otherwise, \fB-1\fR is placed into \fIy\fR and
-\fIx\fR.
-
-Like \fBgetyx\fR, the \fBgetbegyx\fR and \fBgetmaxyx\fR macros store
-the current beginning coordinates and size of the specified window.
-.SH RETURN VALUE
-The return values of these macros are undefined (\fIi\fR.\fIe\fR.,
-they should not be used as the right-hand side of assignment
-statements).
-.SH NOTES
-All of these interfaces are macros and that "\fB&\fR" is not
-necessary before the variables \fIy\fR and \fIx\fR.
-.SH SEE ALSO
-\fBncurses\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_inch.3 b/lib/libncurses/curs_inch.3
deleted file mode 100644
index 7e9e218..0000000
--- a/lib/libncurses/curs_inch.3
+++ /dev/null
@@ -1,40 +0,0 @@
-.TH curs_inch 3 ""
-.SH NAME
-\fBinch\fR, \fBwinch\fR, \fBmvinch\fR,
-\fBmvwinch\fR - get a character and attributes from a \fBncurses\fR window
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBchtype inch(void);\fR
-.br
-\fBchtype winch(WINDOW *win);\fR
-.br
-\fBchtype mvinch(int y, int x);\fR
-.br
-\fBchtype mvwinch(WINDOW *win, int y, int x);\fR
-.br
-.SH DESCRIPTION
-These routines return the character, of type \fBchtype\fR, at the current
-position in the named window. If any attributes are set for that position,
-their values are OR-ed into the value returned. Constants defined in
-\fB<ncurses.h>\fR can be used with the \fB&\fR (logical AND) operator to
-extract the character or attributes alone.
-
-.SS Attributes
-The following bit-masks may be AND-ed with characters returned by \fBwinch\fR.
-
-.nf
-\fBA_CHARTEXT\fR Bit-mask to extract character
-\fBA_ATTRIBUTES\fR Bit-mask to extract attributes
-\fBA_COLOR\fR Bit-mask to extract color-pair field information
-.fi
-.SH NOTES
-Note that all of these routines may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_inchstr.3 b/lib/libncurses/curs_inchstr.3
deleted file mode 100644
index 83e7ee7..0000000
--- a/lib/libncurses/curs_inchstr.3
+++ /dev/null
@@ -1,45 +0,0 @@
-.TH curs_inchstr 3 ""
-.SH NAME
-\fBinchstr\fR, \fBinchnstr\fR, \fBwinchstr\fR,
-\fBwinchnstr\fR, \fBmvinchstr\fR, \fBmvinchnstr\fR, \fBmvwinchstr\fR,
-\fBmvwinchnstr\fR - get a string of characters (and attributes) from a \fBncurses\fR window
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint inchstr(chtype *chstr);\fR
-.br
-\fBint inchnstr(chtype *chstr, int n);\fR
-.br
-\fBint winchstr(WINDOW *win, chtype *chstr);\fR
-.br
-\fBint winchnstr(WINDOW *win, chtype *chstr, int n);\fR
-.br
-\fBint mvinchstr(int y, int x, chtype *chstr);\fR
-.br
-\fBint mvinchnstr(int y, int x, chtype *chstr, int n);\fR
-.br
-\fBint mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);\fR
-.br
-\fBint mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);\fR
-.br
-.SH DESCRIPTION
-These routines return a NULL-terminated array of \fBchtype\fR quantities,
-starting at the current cursor position in the named window and ending at the
-right margin of the window. The four functions with \fIn\fR as
-the last argument, return a leading substring at most \fIn\fR characters long.
-Constants defined in \fB<ncurses.h>\fR can be used with the \fB&\fR (logical
-AND) operator to extract the character or the attribute alone from any position
-in the \fIchstr\fR [see curs_inch(3)].
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that all routines except \fBwinchnstr\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_inch\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_initscr.3 b/lib/libncurses/curs_initscr.3
deleted file mode 100644
index 20ee121..0000000
--- a/lib/libncurses/curs_initscr.3
+++ /dev/null
@@ -1,84 +0,0 @@
-.TH curs_initscr 3 ""
-.SH NAME
-\fBinitscr\fR, \fBnewterm\fR, \fBendwin\fR,
-\fBisendwin\fR, \fBset_term\fR,
-\fBdelscreen\fR - \fBncurses\fR screen initialization and manipulation routines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBWINDOW *initscr(void);\fR
-.br
-\fBint endwin(void);\fR
-.br
-\fBint isendwin(void);\fR
-.br
-\fBSCREEN *newterm(char *type, FILE *outfd, FILE *infd);\fR
-.br
-\fBSCREEN *set_term(SCREEN *new);\fR
-.br
-\fBvoid delscreen(SCREEN* sp);\fR
-.br
-.SH DESCRIPTION
-\fBinitscr\fR is normally the first \fBncurses\fR routine to call when
-initializing a program. A few special routines sometimes need to be
-called before it; these are \fBslk_init\fR, \fBfilter\fR, \fBripoffline\fR,
-\fBuse_env\fR. For multiple-terminal applications, or in order to test
-for the presence of given capabilities, \fBnewterm\fR may be called before
-\fBinitscr\fR.
-
-The initscr code determines the terminal type and initializes all \fBncurses\fR
-data structures. \fBinitscr\fR also causes the first call to \fBrefresh\fR to
-clear the screen. If errors occur, \fBinitscr\fR writes an appropriate error
-message to standard error and exits; otherwise, a pointer is returned to
-\fBstdscr\fR.
-
-A program that outputs to more than one terminal should use the \fBnewterm\fR
-routine for each terminal instead of \fBinitscr\fR. A program that needs to
-inspect capabilities, so it can continue to run in a line-oriented mode if the
-terminal cannot support a screen-oriented program, would also use
-\fBnewterm\fR. The routine \fBnewterm\fR should be called once for each
-terminal. It returns a variable of type \fBSCREEN *\fR which should be saved
-as a reference to that terminal. The arguments are the \fItype\fR of the
-terminal to be used in place of \fB$TERM\fR, a file pointer for output to the
-terminal, and another file pointer for input from the terminal (if \fItype\fR
-is \fBNULL\fR, \fB$TERM\fR will be used). The program must also call
-\fBendwin\fR for each terminal being used before exiting from ncurses. If
-\fBnewterm\fR is called more than once for the same terminal, the first
-terminal referred to must be the last one for which \fBendwin\fR is called.
-
-A program should always call \fBendwin\fR before exiting or escaping from
-\fBncurses\fR mode temporarily. This routine restores tty modes, moves the
-cursor to the lower left-hand corner of the screen and resets the terminal into
-the proper non-visual mode. Calling \fBrefresh\fR or \fBdoupdate\fR after a
-temporary escape causes the program to resume visual mode.
-
-The \fBisendwin\fR routine returns \fBTRUE\fR if \fBendwin\fR has been
-called without any subsequent calls to \fBwrefresh\fR, and \fBFALSE\fR
-otherwise.
-
-The \fBset_term\fR routine is used to switch between different
-terminals. The screen reference \fBnew\fR becomes the new current
-terminal. The previous terminal is returned by the routine. This is
-the only routine which manipulates \fBSCREEN\fR pointers; all other
-routines affect only the current terminal.
-
-The \fBdelscreen\fR routine frees storage associated with the
-\fBSCREEN\fR data structure. The \fBendwin\fR routine does not do
-this, so \fBdelscreen\fR should be called after \fBendwin\fR if a
-particular \fBSCREEN\fR is no longer needed.
-.SH RETURN VALUE
-\fBendwin\fR returns the integer \fBERR\fR upon failure and \fBOK\fR
-upon successful completion.
-
-Routines that return pointers always return \fBNULL\fR on error.
-.SH NOTES
-Note that \fBinitscr\fR and \fBnewterm\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_kernel\fR(3), \fBcurs_refresh\fR(3),
-\fBcurs_slk\fR(3), \fBcurs_util\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_inopts.3 b/lib/libncurses/curs_inopts.3
deleted file mode 100644
index f8cd814..0000000
--- a/lib/libncurses/curs_inopts.3
+++ /dev/null
@@ -1,170 +0,0 @@
-.TH curs_inopts 3 ""
-.SH NAME
-\fBcbreak\fR, \fBnocbreak\fR, \fBecho\fR,
-\fBnoecho\fR, \fBhalfdelay\fR, \fBintrflush\fR, \fBkeypad\fR,
-\fBmeta\fR, \fBnodelay\fR, \fBnotimeout\fR, \fBraw\fR, \fBnoraw\fR,
-\fBnoqiflush\fR, \fBqiflush\fR, \fBtimeout\fR, \fBwtimeout\fR,
-\fBtypeahead\fR - \fBncurses\fR input options
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint cbreak(void);\fR
-.br
-\fBint nocbreak(void);\fR
-.br
-\fBint echo(void);\fR
-.br
-\fBint noecho(void);\fR
-.br
-\fBint halfdelay(int tenths);\fR
-.br
-\fBint intrflush(WINDOW *win, bool bf);\fR
-.br
-\fBint keypad(WINDOW *win, bool bf);\fR
-.br
-\fBint meta(WINDOW *win, bool bf);\fR
-.br
-\fBint nodelay(WINDOW *win, bool bf);\fR
-.br
-\fBint notimeout(WINDOW *win, bool bf);\fR
-.br
-\fBint raw(void);\fR
-.br
-\fBint noraw(void);\fR
-.br
-\fBvoid noqiflush(void);\fR
-.br
-\fBvoid qiflush(void);\fR
-.br
-\fBvoid timeout(int delay);\fR
-.br
-\fBvoid wtimeout(WINDOW *win, int delay);\fR
-.br
-\fBint typeahead(int fd);\fR
-.br
-.SH DESCRIPTION
-Normally, the tty driver buffers typed characters until a newline or carriage
-return is typed. The \fBcbreak\fR routine disables line buffering and
-erase/kill character-processing (interrupt and flow control characters are
-unaffected), making characters typed by the user immediately available to the
-program. The \fBnocbreak\fR routine returns the terminal to normal (cooked)
-mode.
-
-Initially the terminal may or may not be in \fBcbreak\fR mode, as the mode is
-inherited; therefore, a program should call \fBcbreak\fR or \fBnocbreak\fR
-explicitly. Most interactive programs using \fBncurses\fR set the \fBcbreak\fR
-mode. Note that \fBcbreak\fR overrides \fBraw\fR. [See curs_getch(3) for a
-discussion of how these routines interact with \fBecho\fR and \fBnoecho\fR.]
-
-The \fBecho\fR and \fBnoecho\fR routines control whether characters typed by
-the user are echoed by \fBgetch\fR as they are typed. Echoing by the tty
-driver is always disabled, but initially \fBgetch\fR is in echo mode, so
-characters typed are echoed. Authors of most interactive programs prefer to do
-their own echoing in a controlled area of the screen, or not to echo at all, so
-they disable echoing by calling \fBnoecho\fR. [See curs_getch(3) for a
-discussion of how these routines interact with \fBcbreak\fR and
-\fBnocbreak\fR.]
-
-The \fBhalfdelay\fR routine is used for half-delay mode, which is similar to
-\fBcbreak\fR mode in that characters typed by the user are immediately
-available to the program. However, after blocking for \fItenths\fR tenths of
-seconds, ERR is returned if nothing has been typed. The value of \fBtenths\fR
-must be a number between 1 and 255. Use \fBnocbreak\fR to leave half-delay
-mode.
-
-If the \fBintrflush\fR option is enabled, (\fIbf\fR is \fBTRUE\fR), when an
-interrupt key is pressed on the keyboard (interrupt, break, quit) all output in
-the tty driver queue will be flushed, giving the effect of faster response to
-the interrupt, but causing \fBncurses\fR to have the wrong idea of what is on
-the screen. Disabling (\fIbf\fR is \fBFALSE\fR), the option prevents the
-flush. The default for the option is inherited from the tty driver settings.
-The window argument is ignored.
-
-The \fBkeypad\fR option enables the keypad of the user's terminal. If
-enabled (\fIbf\fR is \fBTRUE\fR), the user can press a function key
-(such as an arrow key) and \fBwgetch\fR returns a single value
-representing the function key, as in \fBKEY_LEFT\fR. If disabled
-(\fIbf\fR is \fBFALSE\fR), \fBncurses\fR does not treat function keys
-specially and the program has to interpret the escape sequences
-itself. If the keypad in the terminal can be turned on (made to
-transmit) and off (made to work locally), turning on this option
-causes the terminal keypad to be turned on when \fBwgetch\fR is
-called. The default value for keypad is false.
-
-Initially, whether the terminal returns 7 or 8 significant bits on
-input depends on the control mode of the tty driver [see termios(4)].
-To force 8 bits to be returned, invoke \fBmeta\fR(\fIwin\fR,
-\fBTRUE\fR). To force 7 bits to be returned, invoke
-\fBmeta\fR(\fIwin\fR, \fBFALSE\fR). The window argument, \fIwin\fR,
-is always ignored. If the terminfo capabilities \fBsmm\fR (meta_on)
-and \fBrmm\fR (meta_off) are defined for the terminal, \fBsmm\fR is
-sent to the terminal when \fBmeta\fR(\fIwin\fR, \fBTRUE\fR) is called
-and \fBrmm\fR is sent when \fBmeta\fR(\fIwin\fR, \fBFALSE\fR) is
-called.
-
-The \fBnodelay\fR option causes \fBgetch\fR to be a non-blocking call.
-If no input is ready, \fBgetch\fR returns \fBERR\fR. If disabled
-(\fIbf\fR is \fBFALSE\fR), \fBgetch\fR waits until a key is pressed.
-
-While interpreting an input escape sequence, \fBwgetch\fR sets a timer
-while waiting for the next character. If \fBnotimeout(\fR\fIwin\fR,
-\fBTRUE\fR) is called, then \fBwgetch\fR does not set a timer. The
-purpose of the timeout is to differentiate between sequences received
-from a function key and those typed by a user.
-
-With the \fBraw\fR and \fBnoraw\fR routines, the terminal is placed
-into or out of raw mode. Raw mode is similar to \fBcbreak\fR mode, in
-that characters typed are immediately passed through to the user
-program. The differences are that in raw mode, the interrupt, quit,
-suspend, and flow control characters are all passed through
-uninterpreted, instead of generating a signal. The behavior of the
-BREAK key depends on other bits in the tty driver that are not set by
-\fBncurses\fR.
-
-When the \fBnoqiflush\fR routine is used, normal flush of input and
-output queues associated with the \fBINTR\fR, \fBQUIT\fR and
-\fBSUSP\fR characters will not be done [see termios(4)]. When
-\fBqiflush\fR is called, the queues will be flushed when these control
-characters are read.
-
-The \fBtimeout\fR and \fBwtimeout\fR routines set blocking or
-non-blocking read for a given window. If \fIdelay\fR is negative,
-blocking read is used (\fIi\fR.\fIe\fR., waits indefinitely for
-input). If \fIdelay\fR is zero, then non-blocking read is used
-(\fIi\fR.\fIe\fR., read returns \fBERR\fR if no input is waiting). If
-\fIdelay\fR is positive, then read blocks for \fIdelay\fR
-milliseconds, and returns \fBERR\fR if there is still no input.
-Hence, these routines provide the same functionality as \fBnodelay\fR,
-plus the additional capability of being able to block for only
-\fIdelay\fR milliseconds (where \fIdelay\fR is positive).
-
-\fBncurses\fR does ``line-breakout optimization'' by looking for
-typeahead periodically while updating the screen. If input is found,
-and it is coming from a tty, the current update is postponed until
-\fBrefresh\fR or \fBdoupdate\fR is called again. This allows faster
-response to commands typed in advance. Normally, the input FILE
-pointer passed to \fBnewterm\fR, or \fBstdin\fR in the case that
-\fBinitscr\fR was used, will be used to do this typeahead checking.
-The \fBtypeahead\fR routine specifies that the file descriptor
-\fIfd\fR is to be used to check for typeahead instead. If \fIfd\fR is
--1, then no typeahead checking is done.
-.SH RETURN VALUE
-All routines that return an integer return \fBERR\fR upon failure and an
-integer value other than \fBERR\fR upon successful completion, unless otherwise
-noted in the preceding routine descriptions.
-.SH NOTES
-Note that \fBecho\fR, \fBnoecho\fR, \fBhalfdelay\fR, \fBintrflush\fR,
-\fBmeta\fR, \fBnodelay\fR, \fBnotimeout\fR, \fBnoqiflush\fR,
-\fBqiflush\fR, \fBtimeout\fR, and \fBwtimeout\fR may be macros.
-.SH BUGS
-The entry points \fBintrflush\fR, \fBqiflush\fR, \fBnoqiflush\fR, and
-\fBtypeahead\fR are not yet implemented in ncurses 1.8.6. The ncurses
-code does not do typeahead checking during input as SVr4 curses does.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_getch\fR(3), \fBcurs_initscr\fR(3), \fBtermios\fR(4)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_insch.3 b/lib/libncurses/curs_insch.3
deleted file mode 100644
index a4ab456..0000000
--- a/lib/libncurses/curs_insch.3
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH curs_insch 3 ""
-.SH NAME
-\fBinsch\fR, \fBwinsch\fR, \fBmvinsch\fR,
-\fBmvwinsch\fR - insert a character before cursor in a \fBncurses\fR window
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint insch(chtype ch);\fR
-.br
-\fBint winsch(WINDOW *win, chtype ch);\fR
-.br
-\fBint mvinsch(int y, int x, chtype ch);\fR
-.br
-\fBint mvwinsch(WINDOW *win, int y, int x, chtype ch);\fR
-.br
-.SH DESCRIPTION
-These routines, insert the character \fIch\fR before the character under the
-cursor. All characters to the right of the cursor are moved one space to the
-right, with the possibility of the rightmost character on the line being lost.
-The insertion operation does not change the cursor position.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH NOTES
-These routines do not necessarily imply use of a hardware insert character
-feature.
-
-Note that \fBinsch\fR, \fBmvinsch\fR, and \fBmvwinsch\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_insstr.3 b/lib/libncurses/curs_insstr.3
deleted file mode 100644
index 735dd1b..0000000
--- a/lib/libncurses/curs_insstr.3
+++ /dev/null
@@ -1,59 +0,0 @@
-.\" $Id$
-.\"
-.TH curs_insstr 3 ""
-.SH NAME
-\fBinsstr\fR, \fBinsnstr\fR, \fBwinsstr\fR, \fBwinsnstr\fR,
-\fBmvinsstr\fR, \fBmvinsnstr\fR, \fBmvwinsstr\fR,
-\fBmvwinsnstr\fR - insert string before cursor a \fBncurses\fR window
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-.br
-\fBint insstr(char *str);\fR
-.br
-\fBint insnstr(char *str, int n);\fR
-.br
-\fBint winsstr(WINDOW *win, char *str);\fR
-.br
-\fBint winsnstr(WINDOW *win, char *str, int n);\fR
-.br
-\fBint mvinsstr(int y, int x, char *str);\fR
-.br
-\fBint mvinsnstr(int y, int x, char *str, int n);\fR
-.br
-\fBint mvwinsstr(WINDOW *win, int y, int x, char *str);\fR
-.br
-\fBint mvwinsnstr(WINDOW *win, int y, int x, char *str, int n);\fR
-.br
-.SH DESCRIPTION
-These routines insert a character string (as many characters as will fit on the
-line) before the character under the cursor. All characters to the right of
-the cursor are shifted right, with the possibility of the rightmost characters
-on the line being lost. The cursor position does not change (after moving to
-\fIy\fR, \fIx\fR, if specified). The four routines with \fIn\fR as the last
-argument insert a leading substring of at most \fIn\fR characters. If
-\fIn\fR<=0, then the entire string is inserted.
-
-If a character in \fIstr\fR is a tab, newline, carriage return or
-backspace, the cursor is moved appropriately within the window. A
-newline also does a \fBclrtoeol\fR before moving. Tabs are considered
-to be at every eighth column. If a character in \fIstr\fR is another
-control character, it is drawn in the \fB^\fR\fIX\fR notation.
-Calling \fBwinch\fR after adding a control character (and moving to
-it, if necessary) does not return the control character, but instead
-returns a character in the ^-representation of the control character.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH BUGS
-Entry points for these functions are in ncurses.h but they are not
-implemented as of ncurses 1.8.6.
-.SH NOTES
-Note that all but \fBwinsnstr\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_clear\fR(3), \fBcurs_inch\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_instr.3 b/lib/libncurses/curs_instr.3
deleted file mode 100644
index 0aa539b..0000000
--- a/lib/libncurses/curs_instr.3
+++ /dev/null
@@ -1,44 +0,0 @@
-.TH curs_instr 3 ""
-.SH NAME
-\fBinstr\fR, \fBinnstr\fR, \fBwinstr\fR, \fBwinnstr\fR,
-\fBmvinstr\fR, \fBmvinnstr\fR, \fBmvwinstr\fR,
-\fBmvwinnstr\fR - get a string of characters from a \fBncurses\fR window
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint instr(char *str);\fR
-.br
-\fBint innstr(char *str, int n);\fR
-.br
-\fBint winstr(WINDOW *win, char *str);\fR
-.br
-\fBint winnstr(WINDOW *win, char *str, int n);\fR
-.br
-\fBint mvinstr(int y, int x, char *str);\fR
-.br
-\fBint mvinnstr(int y, int x, char *str, int n);\fR
-.br
-\fBint mvwinstr(WINDOW *win, int y, int x, char *str);\fR
-.br
-\fBint mvwinnstr(WINDOW *win, int y, int x, char *str, int n);\fR
-.br
-.SH DESCRIPTION
-These routines return a string of characters in \fIstr\fR, extracted starting
-at the current cursor position in the named window and ending at the right
-margin of the window. Attributes are stripped from the characters. The four
-functions with \fIn\fR as the last argument return a leading substring at most
-\fIn\fR characters long.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that all routines except \fBwinnstr\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
-
diff --git a/lib/libncurses/curs_kernel.3 b/lib/libncurses/curs_kernel.3
deleted file mode 100644
index 1eff4e1..0000000
--- a/lib/libncurses/curs_kernel.3
+++ /dev/null
@@ -1,115 +0,0 @@
-.TH curs_kernel 3 ""
-.SH NAME
-\fBdef_prog_mode\fR, \fBdef_shell_mode\fR,
-\fBreset_prog_mode\fR, \fBreset_shell_mode\fR, \fBresetty\fR,
-\fBsavetty\fR, \fBgetsyx\fR, \fBsetsyx\fR, \fBripoffline\fR,
-\fBcurs_set\fR, \fBnapms\fR - low-level \fBncurses\fR routines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint def_prog_mode(void);\fR
-.br
-\fBint def_shell_mode(void);\fR
-.br
-\fBint reset_prog_mode(void);\fR
-.br
-\fBint reset_shell_mode(void);\fR
-.br
-\fBint resetty(void);\fR
-.br
-\fBint savetty(void);\fR
-.br
-\fBint getsyx(int y, int x);\fR
-.br
-\fBint setsyx(int y, int x);\fR
-.br
-\fBint ripoffline(int line, int (*init)(WINDOW *, int));\fR
-.br
-\fBint curs_set(int visibility);\fR
-.br
-\fBint napms(int ms);\fR
-.br
-.SH DESCRIPTION
-The following routines give low-level access to various \fBncurses\fR
-capabilities. Theses routines typically are used inside library
-routines.
-
-The \fBdef_prog_mode\fR and \fBdef_shell_mode\fR routines save the
-current terminal modes as the "program" (in \fBncurses\fR) or "shell"
-(not in \fBncurses\fR) state for use by the \fBreset_prog_mode\fR and
-\fBreset_shell_mode\fR routines. This is done automatically by
-\fBinitscr\fR.
-
-The \fBreset_prog_mode\fR and \fBreset_shell_mode\fR routines restore
-the terminal to "program" (in \fBncurses\fR) or "shell" (out of
-\fBncurses\fR) state. These are done automatically by \fBendwin\fR
-and, after an \fBendwin\fR, by \fBdoupdate\fR, so they normally are
-not called.
-
-The \fBresetty\fR and \fBsavetty\fR routines save and restore the
-state of the terminal modes. \fBsavetty\fR saves the current state in
-a buffer and \fBresetty\fR restores the state to what it was at the
-last call to \fBsavetty\fR.
-
-With the \fBgetsyx\fR routine, the current coordinates of the virtual
-screen cursor are returned in \fIy\fR and \fIx\fR. If \fBleaveok\fR
-is currently \fBTRUE\fR, then \fB-1\fR,\fB-1\fR is returned. If lines
-have been removed from the top of the screen, using \fBripoffline\fR,
-\fIy\fR and \fIx\fR include these lines; therefore, \fIy\fR and
-\fIx\fR should be used only as arguments for \fBsetsyx\fR.
-
-With the \fBsetsyx\fR routine, the virtual screen cursor is set to
-\fIy\fR, \fIx\fR. If \fIy\fR and \fIx\fR are both \fB-1\fR, then
-\fBleaveok\fR is set. The two routines \fBgetsyx\fR and \fBsetsyx\fR
-are designed to be used by a library routine, which manipulates
-\fBncurses\fR windows but does not want to change the current position
-of the program's cursor. The library routine would call \fBgetsyx\fR
-at the beginning, do its manipulation of its own windows, do a
-\fBwnoutrefresh\fR on its windows, call \fBsetsyx\fR, and then call
-\fBdoupdate\fR.
-
-The \fBripoffline\fR routine provides access to the same facility that
-\fBslk_init\fR [see curs_slk(3)] uses to reduce the size of the
-screen. \fBripoffline\fR must be called before \fBinitscr\fR or
-\fBnewterm\fR is called. If \fIline\fR is positive, a line is removed
-from the top of \fBstdscr\fR; if \fIline\fR is negative, a line is
-removed from the bottom. When this is done inside \fBinitscr\fR, the
-routine \fBinit\fR (supplied by the user) is called with two
-arguments: a window pointer to the one-line window that has been
-allocated and an integer with the number of columns in the window.
-Inside this initialization routine, the integer variables \fBLINES\fR
-and \fBCOLS\fR (defined in \fB<ncurses.h>\fR) are not guaranteed to be
-accurate and \fBwrefresh\fR or \fBdoupdate\fR must not be called. It
-is allowable to call \fBwnoutrefresh\fR during the initialization
-routine.
-
-\fBripoffline\fR can be called up to five times before calling \fBinitscr\fR or
-\fBnewterm\fR.
-
-The \fBcurs_set\fR routine sets the cursor state is set to invisible,
-normal, or very visible for \fBvisibility\fR equal to \fB0\fR,
-\fB1\fR, or \fB2\fR respectively. If the terminal supports the
-\fIvisibility\fR requested, the previous \fIcursor\fR state is
-returned; otherwise, \fBERR\fR is returned.
-
-The \fBnapms\fR routine is used to sleep for \fIms\fR milliseconds.
-.SH RETURN VALUE
-Except for \fBcurs_set\fR, these routines always return \fBOK\fR.
-\fBcurs_set\fR returns the previous cursor state, or \fBERR\fR if the
-requested \fIvisibility\fR is not supported.
-.SH NOTES
-Note that \fBgetsyx\fR is a macro, so \fB&\fR is not necessary before
-the variables \fIy\fR and \fIx\fR.
-
-The SVr4 man pages warn that the return value of \fBcurs_set\fR "is currently
-incorrect". This implementation gets it right, but it may be unwise to count
-on the correctness of the return value anywhere else.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_initscr\fR(3), \fBcurs_outopts\fR(3), \fBcurs_refresh\fR(3),
-\fBcurs_scr_dmp\fR(3), \fBcurs_slk\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_move.3 b/lib/libncurses/curs_move.3
deleted file mode 100644
index fcb36f3..0000000
--- a/lib/libncurses/curs_move.3
+++ /dev/null
@@ -1,28 +0,0 @@
-.TH curs_move 3 ""
-.SH NAME
-\fBmove\fR, \fBwmove\fR - move \fBncurses\fR window cursor
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint move(int y, int x);\fR
-.br
-\fBint wmove(WINDOW *win, int y, int x);\fR
-.br
-.SH DESCRIPTION
-These routines move the cursor associated with the window to line \fIy\fR and
-column \fIx\fR. This routine does not move the physical cursor of the terminal
-until \fBrefresh\fR is called. The position specified is relative to the upper
-left-hand corner of the window, which is (0,0).
-.SH RETURN VALUE
-These routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that \fBmove\fR may be a macro.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_refresh\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_outopts.3 b/lib/libncurses/curs_outopts.3
deleted file mode 100644
index 6c1f382..0000000
--- a/lib/libncurses/curs_outopts.3
+++ /dev/null
@@ -1,115 +0,0 @@
-.TH curs_outopts 3 ""
-.SH NAME
-\fBclearok\fR, \fBidlok\fR, \fBidcok immedok\fR,
-\fBleaveok\fR, \fBsetscrreg\fR, \fBwsetscrreg\fR, \fBscrollok\fR,
-\fBnl\fR, \fBnonl\fR - \fBncurses\fR output options
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint clearok(WINDOW *win, bool bf);\fR
-.br
-\fBint idlok(WINDOW *win, bool bf);\fR
-.br
-\fBvoid idcok(WINDOW *win, bool bf);\fR
-.br
-\fBvoid immedok(WINDOW *win, bool bf);\fR
-.br
-\fBint leaveok(WINDOW *win, bool bf);\fR
-.br
-\fBint setscrreg(int top, int bot);\fR
-.br
-\fBint wsetscrreg(WINDOW *win, int top, int bot);\fR
-.br
-\fBint scrollok(WINDOW *win, bool bf);\fR
-.br
-\fBint nl(void);\fR
-.br
-\fBint nonl(void);\fR
-.br
-.SH DESCRIPTION
-These routines set options that change the style of output within
-\fBncurses\fR. All options are initially \fBFALSE\fR, unless otherwise stated.
-It is not necessary to turn these options off before calling \fBendwin\fR.
-
-With the \fBclearok\fR routine, if enabled (\fIbf\fR is \fBTRUE\fR), the next
-call to \fBwrefresh\fR with this window will clear the screen completely and
-redraw the entire screen from scratch. This is useful when the contents of the
-screen are uncertain, or in some cases for a more pleasing visual effect. If
-the \fIwin\fR argument to \fBclearok\fR is the global variable \fBcurscr\fR,
-the next call to \fBwrefresh\fR with any window causes the screen to be cleared
-and repainted from scratch.
-
-With the \fBidlok\fR routine, if enabled (\fIbf\fR is \fBTRUE\fR),
-\fBncurses\fR considers using the hardware insert/delete line feature of
-terminals so equipped. If disabled (\fIbf\fR is \fBFALSE\fR), \fBncurses\fR
-very seldom uses this feature. (The insert/delete character feature is always
-considered.) This option should be enabled only if the application needs
-insert/delete line, for example, for a screen editor. It is disabled by
-default because insert/delete line tends to be visually annoying when used in
-applications where it isn't really needed. If insert/delete line cannot be
-used, \fBncurses\fR redraws the changed portions of all lines.
-
-With the \fBidcok\fR routine, if enabled (\fIbf\fR is \fBTRUE\fR),
-\fBncurses\fR considers using the hardware insert/delete character feature of
-terminals so equipped. This is enabled by default.
-
-With the \fBimmedok\fR routine, if enabled (\fIbf\fR is \fBTRUE)\fR, any change
-in the window image, such as the ones caused by \fBwaddch, wclrtobot, wscrl\fR,
-\fIetc\fR., automatically cause a call to \fBwrefresh\fR. However, it may
-degrade the performance considerably, due to repeated calls to \fBwrefresh\fR.
-It is disabled by default.
-
-Normally, the hardware cursor is left at the location of the window cursor
-being refreshed. The \fBleaveok\fR option allows the cursor to be left
-wherever the update happens to leave it. It is useful for applications where
-the cursor is not used, since it reduces the need for cursor motions. If
-possible, the cursor is made invisible when this option is enabled.
-
-The \fBsetscrreg\fR and \fBwsetscrreg\fR routines allow the application
-programmer to set a software scrolling region in a window. \fItop\fR and
-\fIbot\fR are the line numbers of the top and bottom margin of the scrolling
-region. (Line 0 is the top line of the window.) If this option and
-\fBscrollok\fR are enabled, an attempt to move off the bottom margin line
-causes all lines in the scrolling region to scroll up one line. Only the text
-of the window is scrolled. (Note that this has nothing to do with the use of a
-physical scrolling region capability in the terminal, like that in the VT100.
-If \fBidlok\fR is enabled and the terminal has either a scrolling region or
-insert/delete line capability, they will probably be used by the output
-routines.)
-
-The \fBscrollok\fR option controls what happens when the cursor of a window is
-moved off the edge of the window or scrolling region, either as a result of a
-newline action on the bottom line, or typing the last character of the last
-line. If disabled, (\fIbf\fR is \fBFALSE\fR), the cursor is left on the bottom
-line. If enabled, (\fIbf\fR is \fBTRUE\fR), \fBwrefresh\fR is called on the
-window, and the physical terminal and window are scrolled up one line. [Note
-that in order to get the physical scrolling effect on the terminal, it is also
-necessary to call \fBidlok\fR.]
-
-The \fBnl\fR and \fBnonl\fR routines control whether newline is translated into
-carriage return and linefeed on output, and whether return is translated into
-newline on input. Initially, the translations do occur. By disabling these
-translations using \fBnonl\fR, \fBncurses\fR is able to make better use of the
-linefeed capability, resulting in faster cursor motion.
-.SH RETURN VALUE
-\fBsetscrreg\fR and \fBwsetscrreg\fR return \fBOK\fR upon success and \fBERR\fR upon failure.
-All other routines that return an integer always return \fBOK\fR.
-.SH BUGS
-The entry points \fBidcok\fR, \fBimmedok\fR are not yet implemented in
-ncurses 1.8.6. Setting \fIidlok\fR has unfortunate effects on scrolling
-windows.
-.SH NOTES
-Note that \fBclearok\fR, \fBleaveok\fR, \fBscrollok\fR, \fBidcok\fR, \fBnl\fR,
-\fBnonl\fR and \fBsetscrreg\fR may be macros.
-
-The \fBimmedok\fR routine is useful for windows that are used as terminal
-emulators.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_addch\fR(3), \fBcurs_clear\fR(3),
-\fBcurs_initscr\fR(3), \fBcurs_scroll\fR(3), \fBcurs_refresh\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_overlay.3 b/lib/libncurses/curs_overlay.3
deleted file mode 100644
index 302fa17..0000000
--- a/lib/libncurses/curs_overlay.3
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH curs_overlay 3 ""
-.SH NAME
-\fBoverlay\fR, \fBoverwrite\fR,
-\fBcopywin\fR - overlay and manipulate overlapped \fBncurses\fR windows
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint overlay(WINDOW *srcwin, WINDOW *dstwin);\fR
-.br
-\fBint overwrite(WINDOW *srcwin, WINDOW *dstwin);\fR
-.br
-\fBint copywin(WINDOW *srcwin, WINDOW *dstwin, int sminrow,
- int smincol, int dminrow, int dmincol, int dmaxrow,
- int dmaxcol, int overlay);\fR
-.SH DESCRIPTION
-The \fBoverlay\fR and \fBoverwrite\fR routines overlay \fIsrcwin\fR on
-top of \fIdstwin\fR. \fIscrwin\fR and \fIdstwin\fR are not required
-to be the same size; only text where the two windows overlap is
-copied. The difference is that \fBoverlay\fR is non-destructive
-(blanks are not copied) whereas \fBoverwrite\fR is destructive.
-
-The \fBcopywin\fR routine provides a finer granularity of control over the
-\fBoverlay\fR and \fBoverwrite\fR routines. Like in the \fBprefresh\fR
-routine, a rectangle is specified in the destination window, (\fIdminrow\fR,
-\fIdmincol\fR) and (\fIdmaxrow\fR, \fIdmaxcol\fR), and the upper-left-corner
-coordinates of the source window, (\fIsminrow\fR, \fIsmincol\fR). If the
-argument \fIoverlay\fR is \fBtrue\fR, then copying is non-destructive, as in
-\fBoverlay\fR.
-.SH RETURN VALUE
-Routines that return an integer return \fBERR\fR upon failure and an integer
-value other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that \fBoverlay\fR and \fBoverwrite\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_pad\fR(3), \fBcurs_refresh\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_pad.3 b/lib/libncurses/curs_pad.3
deleted file mode 100644
index cba5e92..0000000
--- a/lib/libncurses/curs_pad.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.TH curs_pad 3 ""
-.SH NAME
-\fBnewpad\fR, \fBsubpad\fR, \fBprefresh\fR,
-\fBpnoutrefresh\fR, \fBpechochar\fR - create and display \fBncurses\fR pads
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBWINDOW *newpad(int nlines, int ncols);\fR
-.br
-\fBWINDOW *subpad(WINDOW *orig, int nlines, int ncols,
- int begin_y, int begin_x);\fR
-\fBint prefresh(WINDOW *pad, int pminrow, int pmincol,
- int sminrow, int smincol, int smaxrow, int smaxcol);\fR
-\fBint pnoutrefresh(WINDOW *pad, int pminrow, int pmincol,
- int sminrow, int smincol, int smaxrow, int smaxcol);\fR
-\fBint pechochar(WINDOW *pad, chtype ch);\fR
-.SH DESCRIPTION
-The \fBnewpad\fR routine creates and returns a pointer to a new pad data
-structure with the given number of lines, \fInlines\fR, and columns,
-\fIncols\fR. A pad is like a window, except that it is not restricted by the
-screen size, and is not necessarily associated with a particular part of the
-screen. Pads can be used when a large window is needed, and only a part of the
-window will be on the screen at one time. Automatic refreshes of pads
-(\fIe\fR.\fIg\fR., from scrolling or echoing of input) do not occur. It is not
-legal to call \fBwrefresh\fR with a \fIpad\fR as an argument; the routines
-\fBprefresh\fR or \fBpnoutrefresh\fR should be called instead. Note that these
-routines require additional parameters to specify the part of the pad to be
-displayed and the location on the screen to be used for the display.
-
-The \fBsubpad\fR routine creates and returns a pointer to a subwindow within a
-pad with the given number of lines, \fInlines\fR, and columns, \fIncols\fR.
-Unlike \fBsubwin\fR, which uses screen coordinates, the window is at position
-(\fIbegin\fR_\fIx\fR\fB,\fR \fIbegin\fR_\fIy\fR) on the pad. The window is
-made in the middle of the window \fIorig\fR, so that changes made to one window
-affect both windows. During the use of this routine, it will often be
-necessary to call \fBtouchwin\fR or \fBtouchline\fR on \fIorig\fR before
-calling \fBprefresh\fR.
-
-The \fBprefresh\fR and \fBpnoutrefresh\fR routines are analogous to
-\fBwrefresh\fR and \fBwnoutrefresh\fR except that they relate to pads instead
-of windows. The additional parameters are needed to indicate what part of the
-pad and screen are involved. \fIpminrow\fR and \fIpmincol\fR specify the upper
-left-hand corner of the rectangle to be displayed in the pad. \fIsminrow\fR,
-\fIsmincol\fR, \fIsmaxrow\fR, and \fIsmaxcol\fR specify the edges of the
-rectangle to be displayed on the screen. The lower right-hand corner of the
-rectangle to be displayed in the pad is calculated from the screen coordinates,
-since the rectangles must be the same size. Both rectangles must be entirely
-contained within their respective structures. Negative values of
-\fIpminrow\fR, \fIpmincol\fR, \fIsminrow\fR, or \fIsmincol\fR are treated as if
-they were zero.
-
-The \fBpechochar\fR routine is functionally equivalent to a call to \fBaddch\fR
-followed by a call to \fBrefresh\fR, a call to \fBwaddch\fR followed by a call
-to \fBwrefresh\fR, or a call to \fBwaddch\fR followed by a call to
-\fBprefresh.\fR The knowledge that only a single character is being output is
-taken into consideration and, for non-control characters, a considerable
-performance gain might be seen by using these routines instead of their
-equivalents. In the case of \fBpechochar\fR, the last location of the pad on
-the screen is reused for the arguments to \fBprefresh\fR.
-.SH RETURN VALUE
-Routines that return an integer return \fBERR\fR upon failure and an integer
-value other than \fBERR\fR upon successful completion.
-
-Routines that return pointers return \fBNULL\fR on error.
-.SH NOTES
-Note that \fBpechochar\fR may be a macro.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_refresh\fR(3), \fBcurs_touch\fR(3), \fBcurs_addch\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_printw.3 b/lib/libncurses/curs_printw.3
deleted file mode 100644
index d2f6688..0000000
--- a/lib/libncurses/curs_printw.3
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH curs_printw 3 ""
-.SH NAME
-\fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR,
-\fBmvwprintw\fR, \fBvwprintw\fR - print formatted output in \fBncurses\fR windows
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint printw(char *fmt\fR [\fB, arg\fR] \fB...);\fR
-.br
-\fBint wprintw(WINDOW *win, char *fmt\fR [\fB, arg\fR] \fB...);\fR
-.br
-\fBint mvprintw(int y, int x, char *fmt\fR [\fB, arg\fR] \fB...);\fR
-.br
-\fBint mvwprintw(WINDOW *win, int y, int x,
- \fBchar *fmt\fR [\fB, arg]\fR ...);
-
-\fB#include <varargs.h>\fR
-.br
-\fBint vwprintw(WINDOW *win, char *fmt, varglist);\fR
-.br
-.SH DESCRIPTION
-The \fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR and \fBmvwprintw\fR
-routines are analogous to \fBprintf\fR [see \fBprintf\fR(3)]. In
-effect, the string that would be output by \fBprintf\fR is output
-instead as though \fBwaddstr\fR were used on the given window.
-
-The \fBvwprintw\fR routine is analogous to \fBvprintf\fR [see
-\fBprintf\fR(3)] and performs a \fBwprintw\fR using a variable
-argument list. The third argument is a \fBva_list\fR, a pointer to a
-list of arguments, as defined in \fB<varargs.h>\fR.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBprintf\fR(3), \fBvprintf(3)\fR
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_refresh.3 b/lib/libncurses/curs_refresh.3
deleted file mode 100644
index 3c204e2..0000000
--- a/lib/libncurses/curs_refresh.3
+++ /dev/null
@@ -1,69 +0,0 @@
-.TH curs_refresh 3 ""
-.SH NAME
-\fBrefresh\fR, \fBwrefresh\fR, \fBwnoutrefresh\fR,
-\fBdoupdate\fR, \fBredrawwin\fR,
-\fBwredrawln\fR - refresh \fBncurses\fR windows and lines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint refresh(void);\fR
-.br
-\fBint wrefresh(WINDOW *win);\fR
-.br
-\fBint wnoutrefresh(WINDOW *win);\fR
-.br
-\fBint doupdate(void);\fR
-.br
-\fBint redrawwin(WINDOW *win);\fR
-.br
-\fBint wredrawln(WINDOW *win, int beg_line, int num_lines);\fR
-.br
-.SH DESCRIPTION
-The \fBrefresh\fR and \fBwrefresh\fR routines (or \fBwnoutrefresh\fR and
-\fBdoupdate\fR) must be called to get actual output to the terminal, as other
-routines merely manipulate data structures. The routine \fBwrefresh\fR copies
-the named window to the physical terminal screen, taking into account what is
-already there in order to do optimizations. The \fBrefresh\fR routine is the
-same, using \fBstdscr\fR as the default window. Unless \fBleaveok\fR has been
-enabled, the physical cursor of the terminal is left at the location of the
-cursor for that window.
-
-The \fBwnoutrefresh\fR and \fBdoupdate\fR routines allow multiple updates with
-more efficiency than \fBwrefresh\fR alone. In addition to all the window
-structures, \fBncurses\fR keeps two data structures representing the terminal
-screen: a physical screen, describing what is actually on the screen, and a
-virtual screen, describing what the programmer wants to have on the screen.
-
-The routine \fBwrefresh\fR works by first calling \fBwnoutrefresh\fR, which
-copies the named window to the virtual screen, and then calling \fBdoupdate\fR,
-which compares the virtual screen to the physical screen and does the actual
-update. If the programmer wishes to output several windows at once, a series
-of calls to \fBwrefresh\fR results in alternating calls to \fBwnoutrefresh\fR
-and \fBdoupdate\fR, causing several bursts of output to the screen. By first
-calling \fBwnoutrefresh\fR for each window, it is then possible to call
-\fBdoupdate\fR once, resulting in only one burst of output, with fewer total
-characters transmitted and less CPU time used. If the \fIwin\fR argument to
-\fBwrefresh\fR is the global variable \fBcurscr\fR, the screen is immediately
-cleared and repainted from scratch.
-
-The \fBredrawwin\fR routine indicates to \fBncurses\fR that some screen lines
-are corrupted and should be thrown away before anything is written over them.
-These routines could be used for programs such as editors, which want a command
-to redraw some part of the screen or the entire screen. The routine
-\fBredrawln\fR is preferred over \fBredrawwin\fR where a noisy communication
-line exists and redrawing the entire window could be subject to even more
-communication noise. Just redrawing several lines offers the possibility that
-they would show up unblemished.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that \fBrefresh\fR and \fBredrawwin\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_outopts\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_scanw.3 b/lib/libncurses/curs_scanw.3
deleted file mode 100644
index 22a8b60..0000000
--- a/lib/libncurses/curs_scanw.3
+++ /dev/null
@@ -1,43 +0,0 @@
-.TH curs_scanw 3 ""
-.SH NAME
-\fBscanw\fR, \fBwscanw\fR, \fBmvscanw\fR,
-\fBmvwscanw\fR, \fBvwscanw\fR - convert formatted input from a \fBncurses\fR widow
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint scanw(char *fmt\fR [\fB, arg\fR] \fB...);\fR
-.br
-\fBint wscanw(WINDOW *win, char *fmt\fR [\fB, arg\fR] \fB...);\fR
-.br
-\fBint mvscanw(int y, int x, char *fmt\fR [\fB, arg\fR] \fB...);\fR
-.br
-\fBint mvwscanw(WINDOW *win, int y, int x,
- char *fmt\fR [\fB, arg]\fR \fB...);\fR
-.br
-\fBint vwscanw(WINDOW *win, char *fmt, va_list varglist);\fR
-.SH DESCRIPTION
-The \fBscanw\fR, \fBwscanw\fR and \fBmvscanw\fR routines are analogous to
-\fBscanf\fR [see \fBscanf\fR(3)]. The effect of these routines is as though
-\fBwgetstr\fR were called on the window, and the resulting line used as input
-for \fBsscanf\fR(3). Fields which do not map to a variable in the \fIfmt\fR
-field are lost.
-
-The \fBvwscanw\fR routine is similar to \fBvwprintw\fR in that it performs a
-\fBwscanw\fR using a variable argument list. The third argument is a
-\fIva\fR_\fIlist\fR, a pointer to a list of arguments, as defined in
-\fB<varargs.h>\fR.
-.SH RETURN VALUE
-\fBvwscanw\fR returns \fBERR\fR on failure and an integer equal to the
-number of fields scanned on success.
-
-Applications may use the return value from the \fBscanw\fR, \fBwscanw\fR,
-\fBmvscanw\fR and \fBmvwscanw\fR routines to determine the number of fields
-which were mapped in the call.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_getstr\fR(3), \fBcurs_printw\fR(3), \fBscanf\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_scr_dmp.3 b/lib/libncurses/curs_scr_dmp.3
deleted file mode 100644
index 622b0f9..0000000
--- a/lib/libncurses/curs_scr_dmp.3
+++ /dev/null
@@ -1,58 +0,0 @@
-.TH curs_scr_dump 3 ""
-.SH NAME
-\fBscr_dump\fR, \fBscr_restore\fR,
-\fBscr_init\fR,
-\fBscr_set\fR - read (write) a \fBncurses\fR screen from (to) a file
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint scr_dump(char *filename);\fR
-.br
-\fBint scr_restore(char *filename);\fR
-.br
-\fBint scr_init(char *filename);\fR
-.br
-\fBint scr_set(char *filename);\fR
-.br
-.SH DESCRIPTION
-The \fBscr_dump\fR routine dumps the current contents of the virtual screen
-to the file \fIfilename\fR.
-
-The \fBscr_restore\fR routine sets the virtual screen to the contents
-of \fIfilename\fR, which must have been written using \fBscr_dump\fR. The next
-call to \fBdoupdate\fR restores the screen to the way it looked in the dump
-file.
-
-The \fBscr_init\fR routine reads in the contents of \fIfilename\fR and uses
-them to initialize the \fBncurses\fR data structures about what the terminal
-currently has on its screen. If the data is determined to be valid,
-\fBncurses\fR bases its next update of the screen on this information rather
-than clearing the screen and starting from scratch. \fBscr_init\fR is used
-after \fBinitscr\fR or a \fBsystem\fR [see \fBsystem\fR(BA_LIB)] call to share
-the screen with another process which has done a \fBscr_dump\fR after its
-\fBendwin\fR call. The data is declared invalid if the time-stamp of the tty
-is old or the terminfo capabilities \fBrmcup\fR and \fBnrrmc\fR exist.
-
-The \fBscr_set\fR routine is a combination of \fBscr_restore\fR and
-\fBscr_init\fR. It tells the program that the information in \fIfilename\fR is
-what is currently on the screen, and also what the program wants on the screen.
-This can be thought of as a screen inheritance function.
-
-To read (write) a window from (to) a file, use the \fBgetwin\fR and
-\fBputwin\fR routines [see \fBcurs_util\fR(3)].
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and \fBOK\fR
-upon success.
-.SH NOTES
-Note that \fBscr_init\fR, \fBscr_set\fR, and \fBscr_restore\fR may be macros.
-.BUGS
-The time-stamp and rmcup/nrrmc checks are not implemented in \fBncurses\fR(3).
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_initscr\fR(3), \fBcurs_refresh\fR(3),
-\fBcurs_util\fR(3), \fBsystem\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_scroll.3 b/lib/libncurses/curs_scroll.3
deleted file mode 100644
index a779a90..0000000
--- a/lib/libncurses/curs_scroll.3
+++ /dev/null
@@ -1,37 +0,0 @@
-.TH curs_scroll 3 ""
-.SH NAME
-\fBscroll\fR, \fBscrl\fR, \fBwscrl\fR - scroll a \fBncurses\fR window
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint scroll(WINDOW *win);\fR
-.br
-\fBint scrl(int n);\fR
-.br
-\fBint wscrl(WINDOW *win, int n);\fR
-.br
-.SH DESCRIPTION
-The \fBscroll\fR routine scrolls the window up one line. This involves moving
-the lines in the window data structure. As an optimization, if the scrolling
-region of the window is the entire screen, the physical screen is scrolled at
-the same time.
-
-With the \fBscrl\fR and \fBwscrl\fR routines, for positive \fIn\fR scroll the
-window up \fIn\fR lines (line \fIi\fR+\fIn\fR becomes \fIi\fR); otherwise
-scroll the window down \fIn\fR lines. This involves moving the lines in the
-window character image structure. The current cursor position is not changed.
-
-For these functions to work, scrolling must be enabled via \fBscrollok\fR.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that \fBscrl\fR and \fBscroll\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_outopts\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_slk.3 b/lib/libncurses/curs_slk.3
deleted file mode 100644
index c391701..0000000
--- a/lib/libncurses/curs_slk.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.TH curs_slk 3 ""
-.SH NAME
-\fBslk_init\fR, \fBslk_set\fR, \fBslk_refresh\fR,
-\fBslk_noutrefresh\fR, \fBslk_label\fR, \fBslk_clear\fR, \fBslk_restore\fR,
-\fBslk_touch\fR, \fBslk_attron\fR, \fBslk_attrset\fR,
-\fBslk_attroff\fR - \fBncurses\fR soft label routines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint slk_init(int fmt);\fR
-.br
-\fBint slk_set(int labnum, char *label, int fmt);\fR
-.br
-\fBint slk_refresh(void);\fR
-.br
-\fBint slk_noutrefresh(void);\fR
-.br
-\fBchar *slk_label(int labnum);\fR
-.br
-\fBint slk_clear(void);\fR
-.br
-\fBint slk_restore(void);\fR
-.br
-\fBint slk_touch(void);\fR
-.br
-\fBint slk_attron(chtype attrs);\fR
-.br
-\fBint slk_attrset(chtype attrs);\fR
-.br
-\fBint slk_attroff(chtype attrs);\fR
-.br
-.SH DESCRIPTION
-The slk* functions manipulate the set of soft function-key labels that exist on
-many terminals. For those terminals that do not have soft labels,
-\fBncurses\fR takes over the bottom line of \fBstdscr\fR, reducing the size of
-\fBstdscr\fR and the variable \fBLINES\fR. \fBncurses\fR standardizes on eight
-labels of up to eight characters each.
-
-The \fBslk_init\fR routine must be called before \fBinitscr\fR or \fBnewterm\fR
-is called. If \fBinitscr\fR eventually uses a line from \fBstdscr\fR to
-emulate the soft labels, then \fIfmt\fR determines how the labels are arranged
-on the screen. Setting \fIfmt\fR to \fB0\fR indicates a 3-2-3 arrangement of
-the labels; \fB1\fR indicates a 4-4 arrangement.
-
-With the \fBslk_set\fR routine, \fIlabnum\fR is the label number, from \fB1\fR
-to \fB8\fR. \fIlabel\fR is the string to be put on the label, up to eight
-characters in length. A null string or a null pointer sets up a blank label.
-\fIfmt\fR is either \fB0\fR, \fB1\fR, or \fB2\fR, indicating whether the label
-is to be left-justified, centered, or right-justified, respectively, within the
-label.
-
-The \fBslk_refresh\fR and \fBslk_noutrefresh\fR routines correspond to
-the \fBwrefresh\fR and \fBwnoutrefresh\fR routines.
-
-The \fBslk_label\fR routine returns the current label for label number
-\fIlabnum\fR, with leading and trailing blanks stripped.
-
-The \fBslk_clear\fR routine clears the soft labels from the screen.
-
-The \fBslk_restore\fR routine, restores the soft labels to the screen
-after a \fBslk_clear\fR has been performed.
-
-The \fBslk_touch\fR routine forces all the soft labels to be output
-the next time a \fBslk_noutrefresh\fR is performed.
-
-The \fBslk_attron\fR, \fBslk_attrset\fR and \fBslk_attroff\fR routines
-correspond to \fBattron\fR, \fBattrset\fR, and \fBattroff\fR. They
-have an effect only if soft labels are simulated on the bottom line of
-the screen.
-.SH RETURN VALUE
-Routines that return an integer return \fBERR\fR upon failure and an integer
-value other than \fBERR\fR upon successful completion.
-
-\fBslk_label\fR returns \fBNULL\fR on error.
-.SH NOTES
-Most applications would use \fBslk_noutrefresh\fR because a
-\fBwrefresh\fR is likely to follow soon.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_attr\fR(3), \fBcurs_initscr\fR(3), \fBcurs_refresh\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_termatt.3 b/lib/libncurses/curs_termatt.3
deleted file mode 100644
index ea4a62c..0000000
--- a/lib/libncurses/curs_termatt.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.TH curs_termattrs 3 ""
-.SH NAME
-\fBbaudrate\fR, \fBerasechar\fR, \fBhas_ic\fR,
-\fBhas_il\fR, \fBkillchar\fR, \fBlongname\fR, \fBtermattrs\fR,
-\fBtermname\fR - \fBncurses\fR environment query routines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBint baudrate(void);\fR
-.br
-\fBchar erasechar(void);\fR
-.br
-\fBint has_ic(void);\fR
-.br
-\fBint has_il(void);\fR
-.br
-\fBchar killchar(void);\fR
-.br
-\fBchar *longname(void);\fR
-.br
-\fBchtype termattrs(void);\fR
-.br
-\fBchar *termname(void);\fR
-.br
-.SH DESCRIPTION
-The \fBbaudrate\fR routine returns the output speed of the terminal. The
-number returned is in bits per second, for example \fB9600\fR, and is an
-integer.
-
-The \fBerasechar\fR routine returns the user's current erase character.
-
-The \fBhas_ic\fR routine is true if the terminal has insert- and delete-
-character capabilities.
-
-The \fBhas_il\fR routine is true if the terminal has insert- and delete-line
-capabilities, or can simulate them using scrolling regions. This might
-be used to determine if it would be appropriate to turn on physical
-scrolling using \fBscrollok\fR.
-
-The \fBkillchar\fR routine returns the user's current line kill character.
-
-The \fBlongname\fR routine returns a pointer to a static area
-containing a verbose description of the current terminal. The maximum
-length of a verbose description is 128 characters. It is defined only
-after the call to \fBinitscr\fR or \fBnewterm\fR. The area is
-overwritten by each call to \fBnewterm\fR and is not restored by
-\fBset_term\fR, so the value should be saved between calls to
-\fBnewterm\fR if \fBlongname\fR is going to be used with multiple
-terminals.
-
-If a given terminal doesn't support a video attribute that an
-application program is trying to use, \fBncurses\fR may substitute a
-different video attribute for it. The \fBtermattrs\fR function
-returns a logical \fBOR\fR of all video attributes supported by the
-terminal. This information is useful when a \fBncurses\fR program
-needs complete control over the appearance of the screen.
-
-The \fBtermname\fR routine returns the value of the environment
-variable \fBTERM\fR (truncated to 14 characters).
-.SH RETURN VALUE
-\fBlongname\fR and \fBtermname\fR return \fBNULL\fR on error.
-
-Routines that return an integer return \fBERR\fR upon failure and an integer
-value other than \fBERR\fR upon successful completion.
-.SH NOTES
-Note that \fBtermattrs\fR may be a macro.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_initscr\fR(3), \fBcurs_outopts\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_termin.3 b/lib/libncurses/curs_termin.3
deleted file mode 100644
index a624b65..0000000
--- a/lib/libncurses/curs_termin.3
+++ /dev/null
@@ -1,191 +0,0 @@
-.TH curs_terminfo 3 ""
-.ds n 5
-.SH NAME
-\fBsetupterm\fR, \fBsetterm\fR,
-\fBset_curterm\fR, \fBdel_curterm\fR, \fBrestartterm\fR, \fBtparm\fR,
-\fBtputs\fR, \fBputp\fR, \fBvidputs\fR, \fBvidattr\fR, \fBmvcur\fR,
-\fBtigetflag\fR, \fBtigetnum\fR,
-\fBtigetstr\fR - \fBncurses\fR interfaces to terminfo database
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-.br
-\fB#include <term.h>\fR
-
-\fBint setupterm(char *term, int fildes, int *errret);\fR
-.br
-\fBint setterm(char *term);\fR
-.br
-\fBint set_curterm(TERMINAL *nterm);\fR
-.br
-\fBint del_curterm(TERMINAL *oterm);\fR
-.br
-\fBint restartterm(char *term, int fildes, int *errret);\fR
-.br
-\fBchar *tparm(char *str, long int p1, long int p2,
- long int p3, long int p4, long int p5, long int p6,
- long int p7, long int p8, long int p9);\fR
-.br
-\fBint tputs(char *str, int affcnt, int (*putc)(char));\fR
-.br
-\fBint putp(char *str);\fR
-.br
-\fBint vidputs(chtype attrs, int (*putc)(char));\fR
-.br
-\fBint vidattr(chtype attrs);\fR
-.br
-\fBint mvcur(int oldrow, int oldcol, int newrow, int newcol);\fR
-.br
-\fBint tigetflag(char *capname);\fR
-.br
-\fBint tigetnum(char *capname);\fR
-.br
-\fBint tigetstr(char *capname);\fR
-.br
-.SH DESCRIPTION
-These low-level routines must be called by programs that have to deal
-directly with the \fBterminfo\fR database to handle certain terminal
-capabilities, such as programming function keys. For all other
-functionality, \fBncurses\fR routines are more suitable and their use is
-recommended.
-
-Initially, \fBsetupterm\fR should be called. Note that
-\fBsetupterm\fR is automatically called by \fBinitscr\fR and
-\fBnewterm\fR. This defines the set of terminal-dependent variables
-[listed in \fBterminfo\fR(5)]. The \fBterminfo\fR variables
-\fBlines\fR and \fBcolumns\fR are initialized by \fBsetupterm\fR as
-follows: If \fBuse_env(FALSE)\fR has been called, values for
-\fBlines\fR and \fBcolumns\fR specified in \fBterminfo\fR are used.
-Otherwise, if the environment variables \fBLINES\fR and \fBCOLUMNS\fR
-exist, their values are used. If these environment variables do not
-exist and the program is running in a window, the current window size
-is used. Otherwise, if the environment variables do not exist, the
-values for \fBlines\fR and \fBcolumns\fR specified in the
-\fBterminfo\fR database are used.
-
-The header files \fBncurses.h\fR and \fBnterm.h\fR should be included (in this
-order) to get the definitions for these strings, numbers, and flags (these
-correspond to the SVr4 headers \fBcurses.h\fR and \fBterm.h\fR). Parameterized
-strings should be passed through \fBtparm\fR to instantiate them. All
-\fBterminfo\fR strings [including the output of \fBtparm\fR] should be printed
-with \fBtputs\fR or \fBputp\fR. Call the \fBreset_shell_mode\fR to restore the
-tty modes before exiting [see \fBcurs_kernel\fR(3)]. Programs which use
-cursor addressing should output \fBenter_ca_mode\fR upon startup and should
-output \fBexit_ca_mode\fR before exiting. Programs desiring shell escapes
-should call
-
-\fBreset_shell_mode\fR and output \fBexit_ca_mode\fR before the shell
-is called and should output \fBenter_ca_mode\fR and call
-\fBreset_prog_mode\fR after returning from the shell.
-
-The \fBsetupterm\fR routine reads in the \fBterminfo\fR database,
-initializing the \fBterminfo\fR structures, but does not set up the
-output virtualization structures used by \fBncurses\fR. The terminal
-type is the character string \fIterm\fR; if \fIterm\fR is null, the
-environment variable \fBTERM\fR is used. All output is to file
-descriptor \fBfildes\fR which is initialized for output. If
-\fIerrret\fR is not null, then \fBsetupterm\fR returns \fBOK\fR or
-\fBERR\fR and stores a status value in the integer pointed to by
-\fIerrret\fR. A status of \fB1\fR in \fIerrret\fR is normal, \fB0\fR
-means that the terminal could not be found, and \fB-1\fR means that
-the \fBterminfo\fR database could not be found. If \fIerrret\fR is
-null, \fBsetupterm\fR prints an error message upon finding an error
-and exits. Thus, the simplest call is:
-
- \fBsetupterm((char *)0, 1, (int *)0);\fR,
-
-which uses all the defaults and sends the output to \fBstdout\fR.
-
-The \fBsetterm\fR routine is being replaced by \fBsetupterm\fR. The call:
-
- \fBsetupterm(\fR\fIterm\fR\fB, 1, (int *)0)\fR
-
-provides the same functionality as \fBsetterm(\fR\fIterm\fR\fB)\fR.
-The \fBsetterm\fR routine is included here for BSD compatibility, and
-is not recommended for new programs.
-
-The \fBset_curterm\fR routine sets the variable \fBcur_term\fR to
-\fInterm\fR, and makes all of the \fBterminfo\fR boolean, numeric, and
-string variables use the values from \fInterm\fR.
-
-The \fBdel_curterm\fR routine frees the space pointed to by
-\fIoterm\fR and makes it available for further use. If \fIoterm\fR is
-the same as \fBcur_term\fR, references to any of the \fBterminfo\fR
-boolean, numeric, and string variables thereafter may refer to invalid
-memory locations until another \fBsetupterm\fR has been called.
-
-The \fBrestartterm\fR routine is similar to \fBsetupterm\fR and
-\fBinitscr\fR, except that it is called after restoring memory to a
-previous state. It assumes that the windows and the input and output
-options are the same as when memory was saved, but the terminal type
-and baud rate may be different.
-
-The \fBtparm\fR routine instantiates the string \fIstr\fR with
-parameters \fIpi\fR. A pointer is returned to the result of \fIstr\fR
-with the parameters applied.
-
-The \fBtputs\fR routine applies padding information to the string
-\fIstr\fR and outputs it. The \fIstr\fR must be a terminfo string
-variable or the return value from \fBtparm\fR, \fBtgetstr\fR, or
-\fBtgoto\fR. \fIaffcnt\fR is the number of lines affected, or 1 if
-not applicable. \fIputc\fR is a \fBputchar\fR-like routine to which
-the characters are passed, one at a time.
-
-The \fBputp\fR routine calls \fBtputs(\fR\fIstr\fR\fB, 1, putchar)\fR.
-Note that the output of \fBputp\fR always goes to \fBstdout\fR, not to
-the \fIfildes\fR specified in \fBsetupterm\fR.
-
-The \fBvidputs\fR routine displays the string on the terminal in the
-video attribute mode \fIattrs\fR, which is any combination of the
-attributes listed in \fBncurses\fR(3). The characters are passed to
-the \fBputchar\fR-like routine \fIputc\fR.
-
-The \fBvidattr\fR routine is like the \fBvidputs\fR routine, except
-that it outputs through \fBputchar\fR.
-
-The \fBmvcur\fR routine provides low-level cursor motion. It takes
-effect immediately (rather than at the next refresh).
-
-The \fBtigetflag\fR, \fBtigetnum\fR and \fBtigetstr\fR routines return
-the value of the capability corresponding to the \fBterminfo\fR
-\fIcapname\fR passed to them, such as \fBxenl\fR.
-
-With the \fBtigetflag\fR routine, the value \fB-1\fR is returned if
-\fIcapname\fR is not a boolean capability.
-
-With the \fBtigetnum\fR routine, the value \fB-2\fR is returned if
-\fIcapname\fR is not a numeric capability.
-
-With the \fBtigetstr\fR routine, the value \fB(char *)-1\fR is
-returned if \fIcapname\fR is not a string capability.
-
-The \fIcapname\fR for each capability is given in the table column entitled
-\fIcapname\fR code in the capabilities section of \fBterminfo\fR(5).
-
-\fBchar *boolnames\fR, \fB*boolcodes\fR, \fB*boolfnames\fR
-
-\fBchar *numnames\fR, \fB*numcodes\fR, \fB*numfnames\fR
-
-\fBchar *strnames\fR, \fB*strcodes\fR, \fB*strfnames\fR
-
-These null-terminated arrays contain the \fIcapnames\fR, the
-\fBtermcap\fR codes, and the full C names, for each of the
-\fBterminfo\fR variables.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion, unless otherwise noted in the
-preceding routine descriptions.
-
-Routines that return pointers always return \fBNULL\fR on error.
-.SH NOTES
-The \fBsetupterm\fR routine should be used in place of \fBsetterm\fR.
-
-Note that \fBvidattr\fR and \fBvidputs\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_initscr\fR(3), \fBcurs_kernel\fR(3),
-\fBputc\fR(3), \fBterminfo\fR(5)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_touch.3 b/lib/libncurses/curs_touch.3
deleted file mode 100644
index 5d3a620..0000000
--- a/lib/libncurses/curs_touch.3
+++ /dev/null
@@ -1,57 +0,0 @@
-.TH curs_touch 3 ""
-.SH NAME
-\fBtouchwin\fR, \fBtouchline\fR, \fBuntouchwin\fR,
-\fBwtouchln\fR, \fBis_linetouched\fR,
-\fBis_wintouched\fR - \fBncurses\fR refresh control routines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-.br
-\fBint touchwin(WINDOW *win);\fR
-.br
-\fBint touchline(WINDOW *win, int start, int count);\fR
-.br
-\fBint untouchwin(WINDOW *win);\fR
-.br
-\fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR
-.br
-\fBint is_linetouched(WINDOW *win, int line);\fR
-.br
-\fBint is_wintouched(WINDOW *win);\fR
-.br
-.SH DESCRIPTION
-The \fBtouchwin\fR and \fBtouchline\fR routines throw away all
-optimization information about which parts of the window have been
-touched, by pretending that the entire window has been drawn on. This
-is sometimes necessary when using overlapping windows, since a change
-to one window affects the other window, but the records of which lines
-have been changed in the other window do not reflect the change. The
-routine \fBtouchline\fR only pretends that \fIcount\fR lines have been
-changed, beginning with line \fIstart\fR.
-
-The \fBuntouchwin\fR routine marks all lines in the window as unchanged since
-the last call to \fBwrefresh\fR.
-
-The \fBwtouchln\fR routine makes \fIn\fR lines in the window, starting
-at line \fIy\fR, look as if they have (\fIchanged\fR\fB=1\fR) or have
-not (\fIchanged\fR\fB=0\fR) been changed since the last call to
-\fBwrefresh\fR.
-
-The \fBis_linetouched\fR and \fBis_wintouched\fR routines return
-\fBTRUE\fR if the specified line/window was modified since the last
-call to \fBwrefresh\fR; otherwise they return \fBFALSE\fR. In
-addition, \fBis_linetouched\fR returns \fBERR\fR if \fIline\fR is not
-valid for the given window.
-.SH RETURN VALUE
-All routines return the integer \fBERR\fR upon failure and an integer value
-other than \fBERR\fR upon successful completion, unless otherwise noted in the
-preceding routine descriptions.
-.SH NOTES
-Note that all routines except \fBwtouchln\fR may be macros.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_refresh\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_util.3 b/lib/libncurses/curs_util.3
deleted file mode 100644
index ee46fad..0000000
--- a/lib/libncurses/curs_util.3
+++ /dev/null
@@ -1,81 +0,0 @@
-.TH curs_util 3 ""
-.SH NAME
-\fBunctrl\fR, \fBkeyname\fR, \fBfilter\fR,
-\fBuse_env\fR, \fBputwin\fR, \fBgetwin\fR, \fBdelay_output\fR,
-\fBflushinp\fR - miscellaneous \fBncurses\fR utility routines
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBchar *unctrl(chtype c);\fR
-.br
-\fBchar *keyname(int c);\fR
-.br
-\fBint filter(void);\fR
-.br
-\fBvoid use_env(char bool);\fR
-.br
-\fBint putwin(WINDOW *win, FILE *filep);\fR
-.br
-\fBWINDOW *getwin(FILE *filep);\fR
-.br
-\fBint delay_output(int ms);\fR
-.br
-\fBint flushinp(void);\fR
-.br
-.SH DESCRIPTION
-The \fBunctrl\fR macro expands to a character string which is a printable
-representation of the character \fIc\fR. Control characters are displayed in
-the \fB^\fR\fIX\fR notation. Printing characters are displayed as is.
-
-The \fBkeyname\fR routine returns a character string corresponding to
-the key \fIc\fR.
-
-The \fBfilter\fR routine, if used, must be called before \fBinitscr\fR or
-\fBnewterm\fR are called. It makes \fBncurses\fR think that there is a
-one-line screen. \fBncurses\fR does not use any terminal capabilities
-that assume that they know on what line of the screen the cursor is
-positioned.
-
-The \fBuse_env\fR routine, if used, is called before \fBinitscr\fR or
-\fBnewterm\fR are called. When called with \fBFALSE\fR as an
-argument, the values of \fBlines\fR and \fBcolumns\fR specified in the
-\fIterminfo\fR database will be used, even if environment variables
-\fBLINES\fR and \fBCOLUMNS\fR (used by default) are set, or if
-\fBncurses\fR is running in a window (in which case default behavior
-would be to use the window size if \fBLINES\fR and \fBCOLUMNS\fR are
-not set).
-
-The \fBputwin\fR routine writes all data associated with window \fIwin\fR into
-the file to which \fIfilep\fR points. This information can be later retrieved
-using the \fBgetwin\fR function.
-
-The \fBgetwin\fR routine reads window related data stored in the file by
-\fBputwin\fR. The routine then creates and initializes a new window using that
-data. It returns a pointer to the new window.
-
-The \fBdelay_output\fR routine inserts an \fIms\fR millisecond pause
-in output. This routine should not be used extensively because
-padding characters are used rather than a CPU pause.
-
-The \fBflushinp\fR routine throws away any typeahead that has been typed by the
-user and has not yet been read by the program.
-.SH RETURN VALUE
-Except for \fBflushinp\fR, routines that return an integer return
-\fBERR\fR upon failure and an integer value other than \fBERR\fR upon
-successful completion.
-
-\fBflushinp\fR always returns \fBOK\fR.
-
-Routines that return pointers return \fBNULL\fR on error.
-.SH BUGS
-The \fBfilter\fR entry point is not yet supported.
-.SH NOTES
-Note that \fBunctrl\fR is a macro, which is defined in <\fBunctrl.h\fR>.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_initscr\fR(3), \fBcurs_scr_dmp\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curs_window.3 b/lib/libncurses/curs_window.3
deleted file mode 100644
index 5ac63f4..0000000
--- a/lib/libncurses/curs_window.3
+++ /dev/null
@@ -1,123 +0,0 @@
-.TH curs_window 3 ""
-.SH NAME
-\fBnewwin\fR, \fBdelwin\fR, \fBmvwin\fR,
-\fBsubwin\fR, \fBderwin\fR, \fBmvderwin\fR, \fBdupwin\fR,
-\fBwsyncup\fR, \fBsyncok\fR, \fBwcursyncup\fR,
-\fBwsyncdown\fR - create \fBncurses\fR windows
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-
-\fBWINDOW *newwin(int nlines, int ncols, int begin_y,\fR
- \fBintbegin_x);\fR
-
-\fBint delwin(WINDOW *win);\fR
-.br
-\fBint mvwin(WINDOW *win, int y, int x);\fR
-.br
-\fBWINDOW *subwin(WINDOW *orig, int nlines, int ncols,
- int begin_y, int begin_x);\fR
-\fBWINDOW *derwin(WINDOW *orig, int nlines, int ncols,
- int begin_y, int begin_x);\fR
-\fBint mvderwin(WINDOW *win, int par_y, int par_x);\fR
-.br
-\fBWINDOW *dupwin(WINDOW *win);\fR
-.br
-\fBvoid wsyncup(WINDOW *win);\fR
-.br
-\fBint syncok(WINDOW *win, bool bf);\fR
-.br
-\fBvoid wcursyncup(WINDOW *win);\fR
-.br
-\fBvoid wsyncdown(WINDOW *win);\fR
-.br
-.SH DESCRIPTION
-The \fBnewwin\fR routine creates and returns a pointer to a new window with the
-given number of lines and columns. The upper left-hand corner of the window is
-at line \fIbegin\fR_\fIy\fR, column \fIbegin\fR_\fIx\fR. If either
-\fInlines\fR or \fIncols\fR is zero, they default to \fBLINES -\fR
-\fIbegin\fR_\fIy\fR and \fBCOLS -\fR \fIbegin\fR_\fIx\fR. A new full-screen
-window is created by calling \fBnewwin(0,0,0,0)\fR.
-
-The \fBdelwin\fR routine deletes the named window, freeing all memory
-associated with it (it does not actually erase the window's screen
-image). Subwindows must be deleted before the main window can be
-deleted.
-
-The \fBmvwin\fR routine moves the window so that the upper left-hand
-corner is at position (\fIx\fR, \fIy\fR). If the move would cause the
-window to be off the screen, it is an error and the window is not
-moved. Moving subwindows is allowed, but should be avoided.
-
-The \fBsubwin\fR routine creates and returns a pointer to a new window
-with the given number of lines, \fInlines\fR, and columns,
-\fIncols\fR. The window is at position (\fIbegin\fR_\fIy\fR,
-\fIbegin\fR_\fIx\fR) on the screen. (This position is relative to the
-screen, and not to the window \fIorig\fR.) The window is made in the
-middle of the window \fIorig\fR, so that changes made to one window
-will affect both windows. The subwindow shares memory with the window
-\fIorig\fR. When using this routine, it is necessary to call
-\fBtouchwin\fR or \fBtouchline\fR on \fIorig\fR before calling
-\fBwrefresh\fR on the subwindow.
-
-The \fBderwin\fR routine is the same as \fBsubwin,\fR except that
-\fIbegin\fR_\fIy\fR and \fIbegin\fR_\fIx\fR are relative to the origin
-of the window \fIorig\fR rather than the screen. There is no
-difference between the subwindows and the derived windows.
-
-The \fBmvderwin\fR routine moves a derived window (or subwindow)
-inside its parent window. The screen-relative parameters of the
-window are not changed. This routine is used to display different
-parts of the parent window at the same physical position on the
-screen.
-
-The \fBdupwin\fR routine creates an exact duplicate of the window \fIwin\fR.
-
-Each \fBncurses\fR window maintains two data structures: the character
-image structure and the status structure. The character image
-structure is shared among all windows in the window hierarchy
-(\fIi\fR.\fIe\fR., the window with all subwindows). The status
-structure, which contains information about individual line changes in
-the window, is private to each window. The routine \fBwrefresh\fR
-uses the status data structure when performing screen updating. Since
-status structures are not shared, changes made to one window in the
-hierarchy may not be properly reflected on the screen.
-
-The routine \fBwsyncup\fR causes the changes in the status structure
-of a window to be reflected in the status structures of its ancestors.
-If \fBsyncok\fR is called with second argument \fBTRUE\fR then
-\fBwsyncup\fR is called automatically whenever there is a change in
-the window.
-
-The routine \fBwcursyncup\fR updates the current cursor position of all the
-ancestors of the window to reflect the current cursor position of the
-window.
-
-The routine \fBwsyncdown\fR updates the status structure of the window
-to reflect the changes in the status structures of its ancestors.
-Applications seldom call this routine because it is called
-automatically by \fBwrefresh\fR.
-.SH RETURN VALUE
-Routines that return an integer return the integer \fBERR\fR upon failure and
-an integer value other than \fBERR\fR upon successful completion.
-
-\fBdelwin\fR returns the integer \fBERR\fR upon failure and \fBOK\fR
-upon successful completion.
-
-Routines that return pointers return \fBNULL\fR on error.
-.SH NOTES
-If many small changes are made to the window, the \fBwsyncup\fR option could
-degrade performance.
-
-Note that \fBsyncok\fR may be a macro.
-.SH BUGS
-The subwindow functions (\fIsubwin\fR, \fIderwin\fR, etc.) are flaky,
-incompletely implemented, and not well tested, especially in their
-interaction with scrolling.
-.SH SEE ALSO
-\fBncurses\fR(3), \fBcurs_refresh\fR(3), \fBcurs_touch\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/curses.h b/lib/libncurses/curses.h
deleted file mode 100644
index 0800a8a..0000000
--- a/lib/libncurses/curses.h
+++ /dev/null
@@ -1,544 +0,0 @@
-
-/***************************************************************************
-* COPYRIGHT NOTICE *
-****************************************************************************
-* ncurses is copyright (C) 1992, 1993, 1994 *
-* by Zeyd M. Ben-Halim *
-* zmbenhal@netcom.com *
-* *
-* Permission is hereby granted to reproduce and distribute ncurses *
-* by any means and for any fee, whether alone or as part of a *
-* larger distribution, in source or in binary form, PROVIDED *
-* this notice is included with any such distribution, not removed *
-* from header files, and is reproduced in any documentation *
-* accompanying it or the applications linked with it. *
-* *
-* ncurses comes AS IS with no warranty, implied or expressed. *
-* *
-***************************************************************************/
-
-#ifndef __NCURSES_H
-#define __NCURSES_H
-#define CURSES 1
-#define CURSES_H 1
-
-/* This is defined in more than one ncurses header, for identification */
-#undef NCURSES_VERSION
-#define NCURSES_VERSION "1.8.6/ache"
-
-typedef unsigned long chtype;
-
-#include <stdio.h>
-#include <stdarg.h>
-#ifndef NOTERMIOS
-#include <termios.h>
-#ifndef TERMIOS
-#define TERMIOS 1
-#endif
-#else
-#include <sgtty.h>
-#include <sys/ioctl.h>
-#endif
-#include <unctrl.h>
-
-#define bool char
-
-/* attributes */
-#define A_ATTRIBUTES 0xffffff00
-#define A_NORMAL 0x00000000
-#define A_STANDOUT 0x00010000
-#define A_UNDERLINE 0x00020000
-#define A_REVERSE 0x00040000
-#define A_BLINK 0x00080000
-#define A_DIM 0x00100000
-#define A_BOLD 0x00200000
-#define A_ALTCHARSET 0x00400000
-#define A_INVIS 0x00800000
-#define A_PROTECT 0x01000000
-#define A_CHARTEXT 0x000000ff
-#define A_COLOR 0x0000ff00
-#define COLOR_PAIR(n) (n << 8)
-#define PAIR_NUMBER(a) ((a & A_COLOR) >> 8)
-
-/* colors */
-extern int COLORS;
-extern int COLOR_PAIRS;
-extern unsigned char *color_pairs;
-
-#define COLOR_BLACK 0
-#define COLOR_RED 1
-#define COLOR_GREEN 2
-#define COLOR_YELLOW 3
-#define COLOR_BLUE 4
-#define COLOR_MAGENTA 5
-#define COLOR_CYAN 6
-#define COLOR_WHITE 7
-
-/* line graphics */
-
-extern chtype acs_map[];
-
-
-#define ACS_ULCORNER (acs_map['l'])
-#define ACS_LLCORNER (acs_map['m'])
-#define ACS_URCORNER (acs_map['k'])
-#define ACS_LRCORNER (acs_map['j'])
-#define ACS_RTEE (acs_map['u'])
-#define ACS_LTEE (acs_map['t'])
-#define ACS_BTEE (acs_map['v'])
-#define ACS_TTEE (acs_map['w'])
-#define ACS_HLINE (acs_map['q'])
-#define ACS_VLINE (acs_map['x'])
-#define ACS_PLUS (acs_map['n'])
-#define ACS_S1 (acs_map['o']) /* scan line 1 */
-#define ACS_S9 (acs_map['s']) /* scan line 9 */
-#define ACS_DIAMOND (acs_map['`']) /* diamond */
-#define ACS_CKBOARD (acs_map['a']) /* checker board (stipple) */
-#define ACS_DEGREE (acs_map['f']) /* degree symbol */
-#define ACS_PLMINUS (acs_map['g']) /* plus/minus */
-#define ACS_BULLET (acs_map['~']) /* bullet */
-#define ACS_LARROW (acs_map[',']) /* arrow pointing left */
-#define ACS_RARROW (acs_map['+']) /* arrow pointing right */
-#define ACS_DARROW (acs_map['.']) /* arrow pointing down */
-#define ACS_UARROW (acs_map['-']) /* arrow pointing up */
-#define ACS_BOARD (acs_map['h']) /* board of squares */
-#define ACS_LANTERN (acs_map['I']) /* lantern symbol */
-#define ACS_BLOCK (acs_map['0']) /* solid square block */
-
-#ifndef TRUE
-# define TRUE (1)
-# define FALSE (0)
-#endif
-
-#define ERR (-1)
-#define OK (0)
-
-#define _SUBWIN 0x01
-#define _ENDLINE 0x02
-#define _FULLWIN 0x04
-#define _SCROLLWIN 0x08
-#define _ISPAD 0x10
-#define _HASMOVED 0x20
-
-#define _NOCHANGE -1
-
-typedef struct screen SCREEN;
-typedef struct _win_st WINDOW;
-
-struct _win_st {
- short _cury, _curx; /* current cursor position */
- short _maxy, _maxx; /* maximum values of x and y NOT the screen dimensions */
- short _begy, _begx;
- short _flags;
- chtype _attrs;
- chtype _bkgd;
-
- /* The following should be consolidated into one bitset */
- bool _notimeout;
- bool _use_idc;
- bool _clear;
- bool _leave;
- bool _scroll;
- bool _idlok;
- bool _immed;
- bool _sync;
- bool _use_keypad; /* 0=no, 1=yes */
- bool _use_meta; /* T=use the meta key */
-
- int _delay; /* 0 = nodelay
- <0 = blocking
- >0 = delay */
- chtype **_line;
- short *_firstchar; /* First changed character in the line */
- short *_lastchar; /* Last changed character in the line */
- short _regtop; /* Top and bottom of scrolling region */
- short _regbottom;
- int _parx;
- int _pary;
- WINDOW *_parent; /* parent if a sub-window */
-};
-
-extern WINDOW *stdscr, *curscr, *newscr;
-
-extern int LINES, COLS;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern int resizeterm (int, int);
-
-#if 0 /* MYTINFO not have it */
-extern char ttytype[]; /* needed for backward compatibility */
-#endif
-
-extern int tigetflag(char *);
-extern int tigetnum(char *);
-extern char *tigetstr(char *);
-
-/* Debugging : use with libdcurses.a */
-
-extern void _init_trace(void);
-extern void _tracef(char *, ...);
-extern char *_traceattr(int mode);
-extern char *_tracechar(const unsigned char mode);
-extern void trace(const unsigned int tracelevel);
-
-/* trace masks */
-#define TRACE_DISABLE 0x00 /* turn off tracing */
-#define TRACE_ORDINARY 0x01 /* ordinary trace mode */
-#define TRACE_CHARPUT 0x02 /* also trace all character outputs */
-#define TRACE_MAXIMUM 0x0f /* maximum trace level */
-
-/* function prototypes */
-
-extern int baudrate(void);
-extern int beep(void);
-extern int cbreak(void);
-extern int clearok(WINDOW *,int);
-extern int copywin(WINDOW *,WINDOW *,int,int,int,int,int,int,int);
-extern int curs_set(int);
-extern int def_prog_mode(void);
-extern int def_shell_mode(void);
-extern int delwin(WINDOW *);
-extern WINDOW *derwin(WINDOW *,int,int,int,int);
-extern int doupdate(void);
-extern WINDOW *dupwin(WINDOW *);
-extern int echo(void);
-extern int endwin(void);
-extern char erasechar(void);
-extern int flash(void);
-extern int flushinp(void);
-extern int halfdelay(int);
-extern int idlok(WINDOW *,int);
-extern int intrflush(WINDOW *,bool);
-extern int is_linetouched(WINDOW *,int);
-extern int is_wintouched(WINDOW *);
-extern WINDOW *initscr(void);
-extern int isendwin(void);
-extern char *keyname(int);
-extern int keypad(WINDOW *,int);
-extern char killchar(void);
-extern int leaveok(WINDOW *,int);
-extern char *longname(void);
-extern int meta(WINDOW *,int);
-extern int mvcur(int,int,int,int);
-extern int mvprintw(int,int,char *,...);
-extern int mvscanw(int,int,char *,...);
-extern int mvwin(WINDOW *,int,int);
-extern int mvwprintw(WINDOW *,int,int,char *,...);
-extern int mvwscanw(WINDOW *,int,int,char *,...);
-extern WINDOW *newpad(int,int);
-extern SCREEN *newterm(char *,FILE *,FILE *);
-extern WINDOW *newwin(int,int,int,int);
-extern int nl(void);
-extern int nocbreak(void);
-extern int nodelay(WINDOW *,int);
-extern int noecho(void);
-extern int nonl(void);
-extern int noraw(void);
-extern int notimeout(WINDOW *,bool);
-extern int overlay(WINDOW *,WINDOW *);
-extern int overwrite(WINDOW *,WINDOW *);
-extern int pnoutrefresh(WINDOW *,int,int,int,int,int,int);
-extern int prefresh(WINDOW *,int,int,int,int,int,int);
-extern int printw(char *,...);
-extern int putp(char *);
-extern int raw(void);
-extern int reset_prog_mode(void);
-extern int reset_shell_mode(void);
-extern int resetty(void);
-extern int ripoffline(int line, int (*init)(WINDOW *, int));
-extern int savetty(void);
-extern int scanw(char *,...);
-extern int scrollok(WINDOW *,int);
-extern SCREEN *set_term(SCREEN *);
-extern int setupterm(char *,int,int *);
-extern WINDOW *subwin(WINDOW *,int,int,int,int);
-extern int timeout(int);
-extern char *tparm(const char *, ...);
-extern int tputs(const char *,int,int (*)(int));
-extern int typeahead(int);
-extern int ungetch(int);
-extern int vidattr(chtype);
-extern int vidputs(chtype,int (*)(int));
-extern int vwscanw(WINDOW *,char *,va_list);
-extern int vwprintw(WINDOW *,char *,va_list);
-extern int waddch(WINDOW *,chtype);
-extern int waddchnstr(WINDOW *,chtype *,int);
-extern int waddnstr(WINDOW *,char *,int);
-extern int wattron(WINDOW *,chtype);
-extern int wattroff(WINDOW *,chtype);
-extern int wbkgd(WINDOW *,chtype);
-extern int wborder(WINDOW *,chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype);
-extern int wclear(WINDOW *);
-extern int wclrtobot(WINDOW *);
-extern int wclrtoeol(WINDOW *);
-extern int wdelch(WINDOW *);
-extern int wechochar(WINDOW *, chtype);
-extern int werase(WINDOW *);
-extern int wgetch(WINDOW *);
-extern int wgetnstr(WINDOW *,char *,int maxlen);
-extern int whline(WINDOW *,chtype,int);
-extern int winnstr(WINDOW *, char *, int);
-extern int winsch(WINDOW *,chtype);
-extern int winsdelln(WINDOW *,int);
-extern int winsnstr(WINDOW *,char *,int);
-extern int wmove(WINDOW *,int,int);
-extern int wnoutrefresh(WINDOW *);
-extern int wprintw(WINDOW *,char *,...);
-extern int wredrawln(WINDOW *,int,int);
-extern int wrefresh(WINDOW *);
-extern int wscanw(WINDOW *,char *,...);
-extern int wscrl(WINDOW *,int);
-extern int wsetscrreg(WINDOW *,int,int);
-extern int wtimeout(WINDOW *,int);
-extern int wtouchln(WINDOW *,int,int,int);
-extern int wvline(WINDOW *,chtype,int);
-
-extern bool can_change_color(void);
-extern int color_content(short,short *,short *, short *);
-extern int has_colors(void);
-extern int init_color(short,short,short,short);
-extern int init_pair(short,short,short);
-extern int pair_content(short,short*,short*);
-extern int start_color(void);
-
-extern int slk_init(int);
-extern int slk_set(int,char *,int);
-extern int slk_refresh(void);
-extern int slk_noutrefresh(void);
-extern char *slk_label(int);
-extern int slk_clear(void);
-extern int slk_restore(void);
-extern int slk_touch(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-/*
- * pseudo functions
- */
-#define wgetstr(w, s) wgetnstr(w, s, -1)
-
-#define napms(x) usleep(1000*x)
-#define setterm(term) setupterm(term, 1, (int *)0)
-
-#define fixterm() reset_prog_mode()
-#define resetterm() reset_shell_mode()
-#define saveterm() def_prog_mode()
-#define crmode() cbreak()
-#define nocrmode() nocbreak()
-#define gettmode()
-
-#define getyx(win,y,x) (y = (win)->_cury, x = (win)->_curx)
-#define getbegyx(win,y,x) (y = (win)->_begy, x = (win)->_begx)
-#define getmaxyx(win,y,x) (y = (win)->_maxy + 1, x = (win)->_maxx + 1)
-#define getsyx(y,x) getyx(stdscr, y, x)
-#define setsyx(y,x) (stdscr->_cury = y, stdscr->_curx = x)
-
-#define wbkgdset(win,ch) ((win)->_bkgd = ch)
-#define getbkgd(win) ((win)->_bkgd)
-
-/* It seems older SYSV curses define these */
-#define getattrs(win) (win->_attrs)
-#define getmaxx(win) ((win)->_maxx + 1)
-#define getmaxy(win) ((win)->_maxy + 1)
-
-#define winch(win) ((win)->_line[(win)->_cury][(win)->_curx])
-#define wstandout(win) (wattrset(win,A_STANDOUT))
-#define wstandend(win) (wattrset(win,A_NORMAL))
-#define wattrset(win,at) ((win)->_attrs = (at))
-
-#define subpad(p,l,c,y,x) derwin(p,l,c,y,x)
-#define scroll(win) wscrl(win,1)
-
-#define touchwin(win) wtouchln((win), 0, (win)->_maxy + 1, 1)
-#define touchline(win, s, c) wtouchln((win), s, c, 1)
-#define untouchwin(win) wtouchln((win), 0, (win)->_maxy + 1, 0)
-
-#define box(win, v, h) wborder(win, v, v, h, h, 0, 0, 0, 0)
-#define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
-#define hline(ch, n) whline(stdscr, ch, n)
-#define vline(ch, n) wvline(stdscr, ch, n)
-
-#define winsstr(w, s) winsnstr(w, s, 0)
-#define winstr(w, s) winnstr(w, s, -1)
-
-#define redrawwin(w) wredrawln(w, 0, w->_maxy+1)
-#define waddstr(win,str) waddnstr(win,str,-1)
-#define waddchstr(win,str) waddchnstr(win,str,-1)
-
-/*
- * pseudo functions for standard screen
- */
-
-#define bkgdset(ch) wbkgdset(stdscr,ch)
-#define bkgd(ch) wbkgd(stdscr,ch)
-#define inch() winch(stdscr)
-#define standout() wstandout(stdscr)
-#define standend() wstandend(stdscr)
-#define attron(at) wattron(stdscr,at)
-#define attroff(at) wattroff(stdscr,at)
-#define attrset(at) wattrset(stdscr,at)
-#define addch(ch) waddch(stdscr,ch)
-#define echochar(c) wechochar(stdscr, c)
-#define getch() wgetch(stdscr)
-#define addstr(str) waddnstr(stdscr,str,-1)
-#define getstr(str) wgetstr(stdscr,str)
-#define move(y, x) wmove(stdscr,y,x)
-#define clear() wclear(stdscr)
-#define erase() werase(stdscr)
-#define clrtobot() wclrtobot(stdscr)
-#define clrtoeol() wclrtoeol(stdscr)
-#define insertln() winsdelln(stdscr, 1)
-#define winsertln(w) winsdelln(w, 1)
-#define deleteln() winsdelln(stdscr, -1)
-#define wdeleteln(w) winsdelln(w, -1)
-#define refresh() wrefresh(stdscr)
-#define innstr(s,n) winnstr(stdscr,s,n)
-#define insch(c) winsch(stdscr,c)
-#define delch() wdelch(stdscr)
-#define setscrreg(t,b) wsetscrreg(stdscr,t,b)
-#define scrl(n) wscrl(stdscr,n)
-#define timeout(delay) wtimeout(stdscr, delay)
-#define addnstr(str,n) waddnstr(stdscr,str,n)
-#define addchstr(str) waddchstr(stdscr,str)
-#define addchnstr(str,n) waddchnstr(stdscr,str, n)
-#define insdelln(n) winsdelln(stdscr, n)
-#define insstr(s) winsstr(stdscr, s)
-#define insnstr(s,n) winsnstr(stdscr, s, n)
-
-/*
- * mv functions
-*/
-
-#define mvwaddch(win,y,x,ch) (wmove(win,y,x) == ERR ? ERR : waddch(win,ch))
-#define mvwgetch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wgetch(win))
-#define mvwaddchnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,n))
-#define mvwaddchstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,-1))
-#define mvwaddnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,n))
-#define mvwaddstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,-1))
-#define mvwgetstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : wgetstr(win,str))
-#define mvwinch(win,y,x) (wmove(win,y,x) == ERR ? ERR : winch(win))
-#define mvwdelch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wdelch(win))
-#define mvwinnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winnstr(win,s,n))
-#define mvwinsch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winsch(win,c))
-#define mvaddch(y,x,ch) mvwaddch(stdscr,y,x,ch)
-#define mvgetch(y,x) mvwgetch(stdscr,y,x)
-#define mvaddnstr(y,x,str,n) mvwaddnstr(stdscr,y,x,str,n)
-#define mvaddstr(y,x,str) mvwaddstr(stdscr,y,x,str)
-#define mvgetstr(y,x,str) mvwgetstr(stdscr,y,x,str)
-#define mvinch(y,x) mvwinch(stdscr,y,x)
-#define mvdelch(y,x) mvwdelch(stdscr,y,x)
-#define mvinnstr(y,x,s,n) mvwinnstr(stdscr,y,x,s,n)
-#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c)
-#define mvwinsstr(w, y, x, s) (wmove(w,y,x) == ERR ? ERR : winsstr(w,s))
-#define mvwinsnstr(w, y, x, s, n) (wmove(w,y,x) == ERR ? ERR : winsnstr(w,s,n))
-#define mvinsstr(y,x,s) mvwinsstr(stdscr,y,x,s)
-#define mvinsnstr(y,x,s,n) mvwinsnstr(stdscr,y,x,s,n)
-
-/* Funny "characters" enabled for various special function keys for input */
-/* Whether such a key exists depend if its definition is in the terminfo entry */
-
-#define KEY_MIN 0401 /* Minimum curses key */
-#define KEY_BREAK 0401 /* break key (unreliable) */
-#define KEY_DOWN 0402 /* The four arrow keys ... */
-#define KEY_UP 0403
-#define KEY_LEFT 0404
-#define KEY_RIGHT 0405 /* ... */
-#define KEY_HOME 0406 /* Home key (upward+left arrow) */
-#define KEY_BACKSPACE 0407 /* backspace (unreliable) */
-#define KEY_F0 0410 /* Function keys. Space for 64 */
-#define KEY_F(n) (KEY_F0+(n)) /* keys is reserved. */
-#define KEY_DL 0510 /* Delete line */
-#define KEY_IL 0511 /* Insert line */
-#define KEY_DC 0512 /* Delete character */
-#define KEY_IC 0513 /* Insert char or enter insert mode */
-#define KEY_EIC 0514 /* Exit insert char mode */
-#define KEY_CLEAR 0515 /* Clear screen */
-#define KEY_EOS 0516 /* Clear to end of screen */
-#define KEY_EOL 0517 /* Clear to end of line */
-#define KEY_SF 0520 /* Scroll 1 line forward */
-#define KEY_SR 0521 /* Scroll 1 line backwards (reverse) */
-#define KEY_NPAGE 0522 /* Next page */
-#define KEY_PPAGE 0523 /* Previous page */
-#define KEY_STAB 0524 /* Set tab */
-#define KEY_CTAB 0525 /* Clear tab */
-#define KEY_CATAB 0526 /* Clear all tabs */
-#define KEY_ENTER 0527 /* Enter or send (unreliable) */
-#define KEY_SRESET 0530 /* soft (partial) reset (unreliable) */
-#define KEY_RESET 0531 /* reset or hard reset (unreliable) */
-#define KEY_PRINT 0532 /* print or copy */
-#define KEY_LL 0533 /* home down or bottom (lower left) */
-
-/* The keypad is arranged like this: */
-/* a1 up a3 */
-/* left b2 right */
-/* c1 down c3 */
-
-#define KEY_A1 0534 /* Upper left of keypad */
-#define KEY_A3 0535 /* Upper right of keypad */
-#define KEY_B2 0536 /* Center of keypad */
-#define KEY_C1 0537 /* Lower left of keypad */
-#define KEY_C3 0540 /* Lower right of keypad */
-#define KEY_BTAB 0541 /* Back tab key */
-#define KEY_BEG 0542 /* beg(inning) key */
-#define KEY_CANCEL 0543 /* cancel key */
-#define KEY_CLOSE 0544 /* close key */
-#define KEY_COMMAND 0545 /* cmd (command) key */
-#define KEY_COPY 0546 /* copy key */
-#define KEY_CREATE 0547 /* create key */
-#define KEY_END 0550 /* end key */
-#define KEY_EXIT 0551 /* exit key */
-#define KEY_FIND 0552 /* find key */
-#define KEY_HELP 0553 /* help key */
-#define KEY_MARK 0554 /* mark key */
-#define KEY_MESSAGE 0555 /* message key */
-#define KEY_MOVE 0556 /* move key */
-#define KEY_NEXT 0557 /* next object key */
-#define KEY_OPEN 0560 /* open key */
-#define KEY_OPTIONS 0561 /* options key */
-#define KEY_PREVIOUS 0562 /* previous object key */
-#define KEY_REDO 0563 /* redo key */
-#define KEY_REFERENCE 0564 /* ref(erence) key */
-#define KEY_REFRESH 0565 /* refresh key */
-#define KEY_REPLACE 0566 /* replace key */
-#define KEY_RESTART 0567 /* restart key */
-#define KEY_RESUME 0570 /* resume key */
-#define KEY_SAVE 0571 /* save key */
-#define KEY_SBEG 0572 /* shifted beginning key */
-#define KEY_SCANCEL 0573 /* shifted cancel key */
-#define KEY_SCOMMAND 0574 /* shifted command key */
-#define KEY_SCOPY 0575 /* shifted copy key */
-#define KEY_SCREATE 0576 /* shifted create key */
-#define KEY_SDC 0577 /* shifted delete char key */
-#define KEY_SDL 0600 /* shifted delete line key */
-#define KEY_SELECT 0601 /* select key */
-#define KEY_SEND 0602 /* shifted end key */
-#define KEY_SEOL 0603 /* shifted clear line key */
-#define KEY_SEXIT 0604 /* shifted exit key */
-#define KEY_SFIND 0605 /* shifted find key */
-#define KEY_SHELP 0606 /* shifted help key */
-#define KEY_SHOME 0607 /* shifted home key */
-#define KEY_SIC 0610 /* shifted input key */
-#define KEY_SLEFT 0611 /* shifted left arrow key */
-#define KEY_SMESSAGE 0612 /* shifted message key */
-#define KEY_SMOVE 0613 /* shifted move key */
-#define KEY_SNEXT 0614 /* shifted next key */
-#define KEY_SOPTIONS 0615 /* shifted options key */
-#define KEY_SPREVIOUS 0616 /* shifted prev key */
-#define KEY_SPRINT 0617 /* shifted print key */
-#define KEY_SREDO 0620 /* shifted redo key */
-#define KEY_SREPLACE 0621 /* shifted replace key */
-#define KEY_SRIGHT 0622 /* shifted right arrow */
-#define KEY_SRSUME 0623 /* shifted resume key */
-#define KEY_SSAVE 0624 /* shifted save key */
-#define KEY_SSUSPEND 0625 /* shifted suspend key */
-#define KEY_SUNDO 0626 /* shifted undo key */
-#define KEY_SUSPEND 0627 /* suspend key */
-#define KEY_UNDO 0630 /* undo key */
-#define KEY_MAX 0777 /* Maximum curses key */
-
-#endif
diff --git a/lib/libncurses/curses.priv.h b/lib/libncurses/curses.priv.h
deleted file mode 100644
index 73e3d7d..0000000
--- a/lib/libncurses/curses.priv.h
+++ /dev/null
@@ -1,136 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
- * curses.priv.h
- *
- * Header file for curses library objects which are private to
- * the library.
- *
- */
-
-#ifndef __GNUC__
-#define inline
-#endif
-
-#ifndef NOACTION
-#include <unistd.h>
-typedef struct sigaction sigaction_t;
-#else
-#include "SigAction.h"
-#endif
-
-#include "curses.h"
-
-#define min(a,b) ((a) > (b) ? (b) : (a))
-#define max(a,b) ((a) < (b) ? (b) : (a))
-
-#define FG(n) ((n) & 0x0f)
-#define BG(n) (((n) & 0xf0) >> 4)
-
-#define TextOf(c) ((c) & (chtype)A_CHARTEXT)
-#define AttrOf(c) ((c) & (chtype)A_ATTRIBUTES)
-
-#define BLANK (' '|A_NORMAL)
-
-#define CHANGED -1
-
-#define ALL_BUT_COLOR ((chtype)~(A_COLOR))
-
-/* Macro to put together character and attribute info and return it.
- If colors are in the attribute, they have precedence. */
-#define ch_or_attr(ch,at) \
- ((PAIR_NUMBER(at) > 0) ? \
- ((((chtype)ch) & ALL_BUT_COLOR) | (at)) : ((((chtype)ch) | (at))))
-
-extern WINDOW *newscr;
-
-#ifdef TRACE
-#define T(a) if (_tracing & TRACE_ORDINARY) _tracef a
-#define TR(n, a) if (_tracing & (n)) _tracef a
-extern int _tracing;
-extern char *visbuf(const char *);
-#else
-#define T(a)
-#define TR(n, a)
-#endif
-
-extern int _outch(int);
-extern void init_acs(void);
-extern void tstp(int);
-extern WINDOW *makenew(int, int, int, int);
-extern int timed_wait(int fd, int wait, int *timeleft);
-extern chtype _nc_background(WINDOW *);
-extern chtype _nc_render(WINDOW *, chtype);
-extern void _nc_scroll_window(WINDOW *, int, short const, short const, chtype);
-
-struct try {
- struct try *child; /* ptr to child. NULL if none */
- struct try *sibling; /* ptr to sibling. NULL if none */
- unsigned char ch; /* character at this node */
- unsigned short value; /* code of string so far. 0 if none. */
-};
-
-/*
- * Structure for soft labels.
- */
-
-typedef struct {
- char dirty; /* all labels have changed */
- char hidden; /* soft lables are hidden */
- WINDOW *win;
- struct slk_ent {
- char text[9]; /* text for the label */
- char form_text[9]; /* formatted text (left/center/...) */
- int x; /* x coordinate of this field */
- char dirty; /* this label has changed */
- char visible; /* field is visible */
- } ent[8];
-} SLK;
-
-#define FIFO_SIZE 32
-
-struct screen {
- FILE *_ifp; /* input file ptr for this terminal */
- FILE *_ofp; /* output file ptr for this terminal */
- int _checkfd;
-#ifdef MYTINFO
- struct _terminal *_term;
-#else
- struct term *_term; /* used by terminfo stuff */
-#endif
- WINDOW *_curscr; /* windows specific to a given terminal */
- WINDOW *_newscr;
- WINDOW *_stdscr;
- struct try *_keytry; /* "Try" for use with keypad mode */
- unsigned int _fifo[FIFO_SIZE]; /* Buffer for pushed back characters */
- signed char _fifohead,
- _fifotail,
- _fifopeek;
- bool _endwin;
- chtype _current_attr;
- bool _coloron;
- int _cursor; /* visibility of the cursor */
- int _cursrow; /* Row and column of physical cursor */
- int _curscol;
- bool _nl; /* True if NL -> CR/NL is on */
- bool _raw; /* True if in raw mode */
- int _cbreak; /* 1 if in cbreak mode */
- /* > 1 if in halfdelay mode */
- bool _echo; /* True if echo on */
- bool _nlmapping; /* True if terminal is really doing */
- /* NL mapping (fn of raw and nl) */
- SLK *_slk; /* ptr to soft key struct / NULL */
- int _costs[9]; /* costs of cursor movements for mvcur */
- int _costinit; /* flag wether costs[] is initialized */
-};
-
-extern struct screen *SP;
-
-extern int _slk_format; /* format specified in slk_init() */
-
-#define MAXCOLUMNS 135
-#define MAXLINES 66
-#define UNINITIALISED ((struct try * ) -1)
diff --git a/lib/libncurses/doc/color.doc b/lib/libncurses/doc/color.doc
deleted file mode 100644
index 55f3346..0000000
--- a/lib/libncurses/doc/color.doc
+++ /dev/null
@@ -1,71 +0,0 @@
-
- 5.10. Color Manipulation
-
- Ncurses provides support for the use of color on terminals
- that are capable of display it. Note the BSD and older SYSV
- curses don't support color. Color support in the PC version
- is not compatible with SYSR4.
-
- has_colors()
- this function returns TRUE if the terminal supports color,
- FALSE otherwise. Other color handling funtions will return
- ERR if has_colors() is FALSE. You should always check before
- using color and use other video attributes to replace color.
-
- can_change_color()
- This function returns TRUE if the terminal is capable of
- redefining colors using the init_color function, FALSE if it
- can't. Don't use init_color and color_content if it returns
- FALSE.
-
- start_color()
- This function must be called before any other color handling
- function is called. It initializes the 8 basic colors (see
- appendix I) and sets the global variables COLORS and COLOR_
- PAIRS to the maximum number of colors and color-pairs a
- terminal can handle.
-
- init_pair(pair, fg, bg)
- This function changes the definition of a color-pair, pair.
- Each pair has a foregroung color fg, and a background color
- bg. Both values must be between 0 and COLORS-1. pair must be
- between 1 and COLOR_PAIRS-1.
- [If a pair is changed from a previous definition, the screen
- is refreshed and all occurances of the color-pair are
- changed to reflect the change.]
-
- pair_content(pair, f, b)
- This function stores the foreground and background colors of
- the color-pair pair into the variables pointed to by f, b.
- pair should be between 1 and COLOR_PAIRS-1.
-
- init_color(color, r, g, b)
- This function changes the value of a given color. A color is
- defined by its red, green, and blue components, r, g, and b.
- These values must be between 0 and 1000. color should be
- between 0 and COLORS-1.
-
- color_content(color, r, g, b)
- This function puts the red, green, and blue components of
- color into the variable pointed to by r, g, b respectively.
- color should be between 0 and COLORS-1.
-
- COLOR_PAIR(n) set color-pair to that stored in n
- PAIR_NUMBER(a) get color-pair stored in attribute a
-
-
- Appendix II: COLORS
- -------------------
-
- Colors are defined in <ncurses.h> are used with init_pair().
-
- COLOR_BLACK 0
- COLOR_RED 1
- COLOR_GREEN 2
- COLOR_YELLOW 3
- COLOR_BLUE 4
- COLOR_MAGENTA 5
- COLOR_CYAN 6
- COLOR_WHITE 7
-
-
diff --git a/lib/libncurses/doc/manual.doc b/lib/libncurses/doc/manual.doc
deleted file mode 100644
index 5ae7d39..0000000
--- a/lib/libncurses/doc/manual.doc
+++ /dev/null
@@ -1,1361 +0,0 @@
-
-
-
-
-
-
-
-
-
- The Curses Reference Manual
-
- Pavel Curtis 1982
- Zeyd M. Ben-Halim 1993
- zmbenhal@netcom.com
-
-
-
-
-
-
- Caveat Emptor:
- I'm slowly but surely updating the documentation of
- ncurses to reflect the current status of the code. The text
- below may refer to yet to be implemented functions or
- missing functionality. Description of functions may be
- missing or out of date. ncurses is aimed at being compatible
- with AT&T curses as defined in SysVR4.
-
- There is no ?roff sources for this document. I may one day
- go nuts and create one, but don't hold your breath :-)
-
- 1. Introduction
-
- Terminfo is a database describing many capabilities of over
- 150 different terminals. Curses is a subroutine package
- which presents a high level screen model to the programmer,
- while dealing with issues such as terminal differences and
- optimization of output to change one screenfull of text into
- another.
- Terminfo is based on Berkeley's termcap database, but con-
- tains a number of improvements and extensions. Parameterized
- strings are introduced, making it possible to describe such
- capabilities as video attributes, and to handle far more
- unusual terminals than possible with termcap.
- Curses is also based on Berkeley's curses package, with many
- improvements. The package makes use of the insert and
- delete line and character features of terminals so equipped,
- and determines how to optimally use these features with no
- help from the programmer. It allows arbitrary combinations
- of video attributes to be displayed, even on terminals that
- leave ``magic cookies'' on the screen to mark changes in
- attributes.+
-
- 2. An Overview of the Package
-
- 2.1. Terminology
-
- In this document, the following terminology is kept
- to with reasonable consistency:
-
- window An internal representation containing an image of
- what a section of the terminal screen may look
- like at some point in time. This subsection can
- either encompass the entire terminal screen, or
- any smaller portion down to a single character
- within that screen.
- terminal Sometimes called terminal screen. The package's
- idea of what the terminal's screen currently looks
- like, i.e., what the user sees now. This is a
- special screen.
- screen This is a subset of windows which are as large as
- the terminal screen, i.e., they start at the upper
- left hand corner and encompass the lower right
- hand corner. One of these, stdscr, is automati-
- cally provided for the programmer.
-
- 2.2. Compiling Programs using the Package
-
- In order to use the library, it is necessary to have
- certain types and variables defined. Therefore, the pro-
- grammer must have a line:
- #include <ncurses.h>
- at the top of the program source. The screen package
- uses the Standard I/O library, so <ncurses.h> includes
- <stdio.h>. Ncurses also includes <termios.h>, <termio.h>, or
- <sgtty.h> depending on your system. It is redundant (but
- harmless) for the programmer to do it, too. In linking with
- ncurses you need to have `-lncurses' in your LDFLAGS or on
- the command line. There is no need for any other libraries.
-
- 2.3. Updating the Screen
-
- In order to update the screen optimally, it is
- necessary for the routines to know what the screen currently
- looks like and what the programmer wants it to look like
- next. For this purpose, a data type (structure) named WINDOW
- is defined which describes a window image to the routines,
- including its starting position on the screen (the (y, x)
- coordinates of the upper left hand corner) and its size.
- One of these (called curscr, for current screen) is a screen
- image of what the terminal currently looks like. Another
- screen (called stdscr, for standard screen) is provided by
- default to make changes on.
- A window is a purely internal representation. It is
- used to build and store a potential image of a portion of
- the terminal. It doesn't bear any necessary relation to
- what is really on the terminal screen. It is more like an
- array of characters on which to make changes.
- When one has a window which describes what some part of
- the terminal screen should look like, the routine refresh()
- (or wrefresh() if the window is not stdscr) is called.
- Refresh() in the area covered by the window, look like that
- window. Note, therefore, that changing something on a win-
- dow does not change the terminal. Actual updates to the
- terminal screen are made only by calling refresh() or wre-
- fresh(). This allows the programmer to maintain several
- different ideas of what a portion of the terminal screen
- should look like. Also, changes can be made to windows in
- any order, without regard to motion efficiency. Then, at
- will, the programmer can effectively say ``make it look like
- this,'' and let the package worry about the best way to do
- this.
-
- 2.4. Naming Conventions
-
- As hinted above, the routines can use several windows,
- but two are automatically given: curscr, which knows what
- the terminal looks like, and stdscr, which is what the pro-
- grammer wants the terminal to look like next. The user
- should never really access curscr directly. Changes should
- be made to the appropriate screen, and then the routine
- refresh() (or wrefresh()) should be called.
- Many functions are set up to deal with stdscr as a
- default screen. For example, to add a character to stdscr,
- one calls addch() with the desired character. If a differ-
- ent window is to be used, the routine waddch() (for
- `w'indow-specific addch()) is provided. This convention of
- prepending function names with a ``w'' when they are to be
- applied to specific windows is consistent. The only rou-
- tines which do not do this are those to which a window must
- always be specified.
- In order to move the current (y, x) coordinates from
- one point to another, the routines move() and wmove() are
- provided. However, it is often desirable to first move and
- then perform some I/O operation. In order to avoid clumsy-
- ness, most I/O routines can be preceded by the prefix 'mv'
- and the desired (y, x) coordinates then can be added to the
- arguments to the function. For example, the calls
- move(y, x);
- addch(ch);
- can be replaced by
- mvaddch(y, x, ch);
- and
- wmove(win, y, x);
- waddch(win, ch);
- can be replaced by
- mvwaddch(win, y, x, ch);
- Note that the window description pointer (win) comes before
- the added (y, x) coordinates. If such pointers are need,
- they are always the first parameters passed.
-
- 3. Variables
-
- Many variables which are used to describe the terminal
- environment are available to the programmer. They are:
-
- type name description
- ------------------------------------------------------------------
- WINDOW *curscr current version of the screen (terminal screen).
- WINDOW *stdscr standard screen. Most updates are done here.
- int LINES number of lines on the terminal
- int COLS number of columns on the terminal
-
- There are also several `#define' constants and types which
- are of general usefulness:
-
- bool boolean type, actually a `char' (e.g., bool doneit;)
- TRUE boolean `true' flag (1).
- FALSE boolean `false' flag (0).
- ERR -1 error flag returned by routines on a fail.
- OK 0 error flag returned by routines when things
- go right.
-
- 4. Usage
-
- This is a description of how to actually use the screen
- package. In it, we assume all updating, reading, etc. is
- applied to stdscr. All instructions will work on any win-
- dow, with changing the function name and parameters as men-
- tioned above.
-
- 4.1. Starting up
-
- In order to use the screen package, the routines must
- know about terminal characteristics, and the space for
- curscr and stdscr must be allocated. These functions are
- performed by initscr(). Since it must allocate space for the
- windows, it can overflow memory when attempting to do so. On
- this rather rare occasion, initscr() returns ERR.
- initscr() must always be called before any of the routines
- which affect windows are used. If it is not, the program
- will core dump as soon as either curscr or stdscr are
- referenced. However, it is usually best to wait to call it
- until after you are sure you will need it, like after
- checking for startup errors. Terminal status changing
- routines like nl() and cbreak() should be called after
- initscr().
- Now that the screen windows have been allocated, you
- can set them up for the run. If you want to, say, allow the
- window to scroll, use scrollok(). If you want the cursor to
- be left after the last change, use leaveok(). If this isn't
- done, refresh() will move the cursor to the window's current
- (y, x) coordinates after updating it. New windows of your
- own can be created, too, by using the functions newwin(),
- derwin(), and subwin(). delwin() will allow you to get rid
- of old windows.
-
- 4.2. Output
-
- Now that we have set things up, we will want to actu-
- ally update the terminal. The basic functions used to
- change what will go on a window are addch() and move().
- addch() adds a character at the current (y, x) coordinates,
- returning ERR if it would cause the window to illegally
- scroll, i.e., printing a character in the lower right-hand
- corner of a terminal which automatically scrolls if
- scrolling is not allowed. move() changes the current (y, x)
- coordinates to whatever you want them to be. It returns ERR
- if you try to move off the window. As mentioned above, you
- can combine the two into mvaddch() to do both things at
- once.
- The other output functions, such as addstr() and
- printw(), all call addch() to add characters to the window.
- After you have put on the window what you want there,
- when you want the portion of the terminal covered by the
- window to be made to look like it, you must call refresh().
- In order to optimize finding changes, refresh() assumes that
- any part of the window not changed since the last refresh()
- of that window has not been changed on the terminal, i.e.,
- that you have not refreshed a portion of the terminal with
- an overlapping window. If this is not the case, the routine
- touchwin() is provided to make it look like the entire win-
- dow has been changed, thus making refresh() check the whole
- subsection of the terminal for changes.
- If you call wrefresh() with curscr(), it will make the
- screen look like curscr thinks it looks like. This is use-
- ful for implementing a command which would redraw the screen
- in case it get messed up.
-
- 4.3. Input
-
- Input is essentially a mirror image of output. The
- complementary function to addch() is getch() which, if echo
- is set, will call addch() to echo the character. Since the
- screen package needs to know what is on the terminal at all
- times, if characters are to be echoed, the tty must be in
- raw or cbreak mode. Since initially the terminal has echo-
- ing enable and is in nocreak mode, one or the other has to
- changed before calling getch(). The result of not doing this
- is unpredictable output.
-
- 4.4. Miscellaneous
-
- A plethora of other functions exist for maintaining and
- changing information about the windows. For the most part,
- the descriptions in section 5 should suffice.
-
- 4.5. Finishing Up
-
- In order to do certain optimizations, and, on some ter-
- minals, to work at all, some things must be done before the
- screen routines start up. In order to clean up after the
- routines, the routine endwin() is provided. It restores tty
- modes to what they were when initscr() was first called,
- moves the cursor down to the lower-left corner, etc. Thus,
- anytime after the call to initscr, endwin() should be called
- before exiting.
-
- 5. Descriptions of the Functions
-
- This section describes all the functions available to the
- programmer in the curses package. For an alphabetical list,
- see the manual page ncurses(3).
-
- 5.1. Initialization
-
- These functions are called when initializing a program.
-
- initscr()
- The first function called should always be initscr. This
- will determine the terminal type and initialize curses data
- structures. initscr also arranges that the first call to
- refresh will clear the screen. If an error occurs a message
- is writen to standard error and the program exits. Otherwise
- it returns a pointer to stdscr. Some function may be called
- before initscr (slk_init, filter, ripofflines, use_env, and
- if you are using multiple terminals newterm.)
-
- endwin()
- A program should always call endwin before exiting or
- shelling out of the program. This function will restore tty
- modes, move the cursor to the lower left corner of the
- screen, reset the terminal into the proper nonvisual mode.
- Calling refresh() or doupdate() after a temporary escape
- from the program will restore the screen to its original
- status.
-
- newterm(type, ofp, ifp)
- A program which outputs to more than one terminal should use
- newterm instead of initscr. newterm should be called once
- for each terminal. It returns a variable of type SCREEN
- * which should be saved as a reference to that terminal. The
- arguments are the type of the terminal (a string) and FILE
- pointers for the output and input of the terminal. If type
- is NULL then the environment variable $TERM is used. endwin
- must called for each terminal opened using this function.
-
- set_term(new)
- This function is used to switch to a different terminal.
- The screen reference for the new terminal is passed as the
- parameter. The previous terminal is returned by the func-
- tion. All other calls affect only the current terminal.
-
- delscreen(sp)
-
- longname()
- This function returns a pointer to a static area containing
- a verbose description of the current terminal. It is defined
- only after a call to initscr or newterm.
-
- termattrs()
-
- termname()
-
- 5.2. Option Setting
-
- These functions set options within curses. In each case,
- win is the window affected, and bf is a boolean flag with
- value TRUE or FALSE indicating whether to enable or disable
- the option. All options are initially FALSE. It is not
- necessary to turn these options off before calling endwin.
-
- clearok(win,bf)
- If set, the next call to wrefresh with this window will
- clear the screen and redraw the entire screen. If win is
- curscr, the next call to wrefresh with any window will cause
- the screen to be cleared. This is useful when the contents
- of the screen are uncertain, or in some cases for a more
- pleasing visual effect.
-
- idlok(win,bf)
- If enabled, curses will consider using the hardware
- insert/delete line feature of terminals so equipped. If
- disabled, curses will not use this feature. Enable this
- option only if your application needs insert/delete line,
- for example, for a screen editor. It is disabled by default
- because insert/delete line is visually annoying when used in
- applications where it isn't really needed.
-
- idcok(win,bf)
- This option allows curses will use inset/delete character
- capabilities if any are defined. This option is on be
- default.
-
- immedok(win,bf)
- If this option is enabled any change in the window's image
- causes a call to wrefresh. Enabling this option can degrade
- performance; it is disabled by default.
-
- keypad(win,bf)
- This option enables the keypad of the users terminal. If
- enabled, the user can press a function key (such as an arrow
- key) and getch will return a single value representing the
- function key. If disabled, curses will not treat function
- keys specially. If the keypad in the terminal can be turned
- on (made to transmit) and off (made to work locally), turn-
- ing on this option will turn on the terminal keypad. All the
- possible function keys are defined in ncurses.h as KEY_*.
-
- leaveok(win,bf)
- Normally, the hardware cursor is left at the location of the
- window cursor being refreshed. This option allows the cur-
- sor to be left wherever the update happens to leave it. It
- is useful for applications where the cursor is not used,
- since it saves cursor motions. If possible, the cursor is
- made invisible when this option is enabled.
-
- meta(win,bf)
- If enabled, characters returned by getch are transmitted
- with all 8 bits, instead of stripping the highest bit. It
- is useful for extending the non-text command set in applica-
- tions where the terminal has a meta shift key, such as
- EMACS. NOTE: This function is currently unsupported.
-
- notimeout(win,bf)
- This option controls whether a timer is set when wgetch is
- trying to interpret an input sequence. See keypad.
-
- scrollok(win,bf)
- This option controls what happens when the cursor of a win-
- dow is moved off the edge of the window, either from a new-
- line on the bottom line, or typing the last character of the
- last line. If disabled, the cursor is left on the bottom
- line. If enabled, wrefresh is called on the window, and then
- the physical terminal and window are scrolled up one line.
-
- setscrreg(t,b)
- wsetscrreg(win,t,b)
- These functions allow the user to set a software scrolling
- region in a window win or stdscr. t and b are the line num-
- bers of the top and bottom margin of the scrolling region.
- (Line 0 is the top line of the screen.) If this option and
- scrollok are enabled, an attempt to move off the bottom mar-
- gin line will cause all lines in the scrolling region to
- scroll up one line. Note that this has nothing to do with
- use of a physical scrolling region capability in the termi-
- nal, like that in the VT100. Only the text of the window is
- scrolled.
- The scrolling region really acts as a sort of barrier, lim-
- iting the area of a window over which changes take place.
- For this reason, an attempt to create a scrolling region in
- an area of the screen which does not contain the current (y,
- x) coordinates for that window is an error. Similarly,
- attempts to move the (y, x) coordinates out of the region
- will also fail with an ERR return.
- When a scrolling region is in place, all changes are limited
- to the region. For example, erase() will only erase the
- area inside the region; insertln() will only shift lines
- down to the bottom of the region, etc. It is anticipated
- that this method of controlling the area of change will
- prove quite handy in a number of applications.
- To disable the scrolling region, once defined, simply rede-
- fine it to be the whole window. For example, to disable the
- scrolling region on stdscr, the following call would be
- used:
- setscrreg(0, LINES - 1)
- For other windows, the height of the window should be used
- instead of (LINES - 1).
-
- 5.3. Terminal Mode Setting
-
- These functions are used to set modes in the tty driver. The
- initial mode usually depends on the setting when the program
- was called: the initial modes documented here represenet the
- normal situation.
-
- cbreak()
- nocbreak()
- crmode()
- nocrmode()
- These functions put the terminal into and out of CBREAK
- mode. In this mode, characters typed by the user are immedi-
- ately available to the program. When out of this mode, the
- device driver will buffer characters typed until newline is
- typed. Interrupt and flow control characters are unaffected
- by this mode. Initially the terminal is not in CBREAK mode.
- Most interactive programs using curses will set this mode.
- The functions crmode() and nocrmode() are the result of an
- accident in the first version of curses and are retained
- solely for upward compatibility. crmode() is the same as
- cbreak() and nocrmode() is the same as nocbreak(). See 4.3
- for a important note on using these functions.
-
- raw()
- noraw()
- These functions put the terminal into and out of RAW mode.
- RAW mode is just like CBREAK mode except that no special
- character processing is done (e.g. the interrupt character
- will be passed through to the program, uninterpreted, as
- will the kill character, etc.) and all 8 bits of the input
- character are retained; in CBREAK mode, the eighth bit is
- stripped off before it is given to the program. Because of
- the lack of interpretation of special characters, it is not
- recommended that programs use this mode.
-
- echo()
- noecho()
- These functions control whether characters typed by the user
- are echoed as typed. Initially, characters typed are echoed
- by the teletype driver. Authors of most interactive pro-
- grams prefer to do their own echoing in a controlled area of
- the screen, or not to echo at all, so they disable echoing.
-
- halfdelay(t)
- This options is similar to cbreak mode except that if after
- blocking for t tenth of a seconds no input is received ERR
- is returned. t must between 1 and 255. Use nocbreak to leave
- this mode.
-
- nodelay(win,bf)
- This option causes getch to be a non-blocking call. If no
- input is ready, getch will return ERR. If disabled, getch
- will hang until a key is pressed.
-
- timeout(t)
- wtimeout(win,t)
- These functions offer control over the blocking action of a
- read. If t is negative, reading will block until there is
- input. If t is zero, no blocking will occur, read returns
- ERR if no input is available. If t is posistive, the read
- will block for t milliseconds and return ERR if there is
- still no input.
- These routines offer better and finer control than nodelay()
- and halfdelay() and their use is recommended.
-
- nl()
- nonl()
- These functions control whether newline is translated into
- carriage return and linefeed on output, and whether return
- is translated into newline on input. Initially, the trans-
- lations do occur. By disabling these translations, curses
- is able to make better use of the linefeed capability,
- resulting in faster cursor motion.
-
- savetty()
- resetty()
- These functions save and restore the state of the tty modes.
- savetty saves the current state in a buffer, resetty
- restores the state to what it was at the last call to save-
- tty.
-
- 5.4. Window Manipulation
-
- newwin(num_lines, num_cols, begy, begx)
- Create a new window with the given number of lines and
- columns. The upper left corner of the window is at line
- begy column begx. If either num_lines or num_cols is zero,
- they will be defaulted to LINES-begy and COLS-begx. A new
- full-screen window is created by calling newwin(0,0,0,0).
-
- subwin(orig, num_lines, num_cols, begy, begx)
- Create a new window with the given number of lines and
- columns. The window is at position (begy, begx) on the
- screen. (It is relative to the screen, not orig.) The win-
- dow is made in the middle of the window orig, so that
- changes made to one window will affect both windows. When
- using this function, often it will be necessary to call
- touchwin before calling wrefresh.
-
- derwin(orig, num_lines, num_cols, begy, begx)
- Is similar to subwin only the new window is created relative
- to the original window, not the screen.
-
- delwin(win)
- Deletes the named window, freeing up all memory associated
- with it. In the case of sub-windows, they should be deleted
- before the main window.
-
- dupwin(win)
-
- mvderwin(win,y,x)
-
- syncok(win,bf)
- wsyncup(win)
- wcursyncup(win)
- wsyncdown(win)
-
- mvwin(win, by, bx)
- Move the window so that the upper left corner will be at
- position (by, bx). If the move would cause the window to be
- off the screen, it is an error and the window is not moved.
-
- touchline(win,start,count)
- touchwin(win)
- Throw away all optimization information about which parts of
- the window have been touched, by pretending the entire win-
- dow has been drawn on. This is sometimes necessary when
- using overlapping windows, since a change to one window will
- affect the other window, but the optimization records of the
- other window will not reflect the change.
-
- wtouchln(win,y,n,changed)
- Throw away optimization information, or mark as unchanged,
- n lines starting at y, depending on the value of changed.
-
- untouchwin(win)
- Mark the whole window as unchcnged since the lat wrefresh.
-
- is_linetouched(win,line)
- is_wintouched(win)
- These routines are used to check if the given line/window
- has been modified since the last wrefresh. They will return
- TRUE is that is the case, FALSE otherwise. is_linetouched
- will return ERR if there is no such line.
-
- overlay(win1, win2)
- overwrite(win1, win2)
- These functions overlay win1 on top of win2, that is, all
- text in win1 is copied into win2, after lining up the two
- windows' origins. The difference between the functions is
- that overlay is nondestructive (blanks are not copied) while
- overwrite is destructive.
-
- copywin(win,win,sminrow,smincol,dminrow,dmincol,dmaxrow,
- dmaxcol,overlay)
- Low level function used to implement overlay/overwrite.
-
- 5.5. Causing Output to the Terminal
-
- refresh()
- wrefresh(win)
- These functions must be called to actually get any output on
- the terminal, as other routines merely manipulate data
- structures. wrefresh copies the named window to the physi-
- cal terminal screen, taking into account what is already
- there in order to do optimizations. refresh is the same,
- using stdscr as a default screen. Unless leaveok has been
- enabled, the physical cursor of the terminal is left at the
- location of the window's cursor.
-
- doupdate()
- wnoutrefresh(win)
- These two functions allow multiple updates with more effi-
- ciency than wrefresh. To use them, it is important to
- understand how curses works. In addition to all the window
- structures, curses keeps two data structures representing
- the terminal screen: a physical screen, describing what is
- actually on the screen, and a virtual screen, describing
- what the programmer wants to have on the screen. wrefresh
- works by first copying the named window to the virtual
- screen (wnoutrefresh), and then calling the routine to
- update the screen (doupdate). If the programmer wishes to
- output several windows at once, a series of calls to wre-
- fresh will result in alternating calls to wnoutrefresh and
- doupdate, causing several bursts of output to the screen.
- By calling wnoutrefresh for each window, it is then possible
- to call doupdate once, resulting in only one burst of out-
- put, with probably fewer total characters transmitted.
-
- redrawwin(win)
- wredrawln(win,start,count)
-
- 5.6. Writing on Window Structures
-
- These routines are used to ``draw'' text on windows. In all
- cases, a missing win is taken to be stdscr. y and x are the
- row and column, respectively. The upper left corner is
- always (0, 0) not (1, 1). The mv functions imply a call to
- move before the call to the other function.
-
- 5.6.1. Moving the Cursor
-
- move(y, x)
- wmove(win, y, x)
- The cursor associated with the window is moved to the given
- location. This does not move the physical cursor of the
- terminal until refresh is called.
-
- 5.6.2. Writing One Character
-
- addch(ch)
- waddch(win, ch)
- mvaddch(y, x, ch)
- mvwaddch(win, y, x, ch)
- The character ch is put in the window at the current cursor
- position of the window. If ch is a tab, newline, or
- backspace, the cursor will be moved appropriately in the
- window. If ch is a different control character, it will be
- drawn in the ^X notation. The position of the window cursor
- is advanced. At the right margin, an automatic newline is
- performed. At the bottom of the scrolling region, if scrol-
- lok is enabled, the scrolling region will be scrolled up one
- line.
-
- 5.6.3. Writing a String
-
- addstr(str)
- addnstr(str,n)
- waddstr(win,str)
- waddnstr(win,str,n)
- mvaddstr(y,x,str)
- mvaddnstr(y,x,str,n)
- mvwaddstr(win,y,x,str)
- mvwaddnstr(win,y,x,str,n)
- These functions write all the characters of the null termi-
- nated character string str on the given window. They are
- identical to a series of calls to addch. Routines with 'n'
- write n characters of str. If n is -1 then the entire string
- is written.
-
- addchstr(chstr)
- addchnstr(chstr,n)
- waddchstr(win,chstr)
- waddchnstr(win,chstr,n)
- mvaddchstr(y,x,chstr)
- mvaddchnstr(y,x,chstr,n)
- mvwaddchstr(win,y,x,chstr)
- mvwaddchnstr(win,y,x,chstr,n)
- These functions copy chstr onto the window image starting at
- the current cursor position. Routines with 'n' write at most
- n characters of chstr (as many as will fit on the line). If
- n is -1 then the entire string is written. The cursor is not
- advanced and no checking for control characters is done.
- These routines are faster than the addstr() group. chstr is
- a pointer to an array of chtype.
-
- 5.6.4. Clearing Areas of the Screen
-
- erase()
- werase(win)
- These functions copy blanks to every position in the window.
-
- clear()
- wclear(win)
- These functions are like erase and werase but they also call
- clearok, arranging that the screen will be cleared on the
- next refresh. The result can visually annoying.
-
- clrtobot()
- wclrtobot(win)
- All lines below the cursor in this window are erased. Also,
- the current line to the right of the cursor is erased.
-
- clrtoeol()
- wclrtoeol(win)
- The current line to the right of the cursor is erased.
-
- 5.6.5. Inserting and Deleting Text
-
- delch()
- wdelch(win)
- mvdelch(y,x)
- mvwdelch(win,y,x)
- The character under the cursor in the window is deleted.
- All characters to the right on the same line are moved to
- the left one position. This does not imply use of the hard-
- ware delete character feature.
-
- deleteln()
- wdeleteln(win)
- The line under the cursor in the window is deleted. All
- lines below the current line are moved up one line. The
- bottom line of the window is cleared. This does not imply
- use of the hardware delete line feature.
-
- insch(c)
- winsch(win, c)
- mvinsch(y,x,c)
- mvwinsch(win,y,x,c)
- The character c is inserted before the character under the
- cursor. All characters to the right are moved one space to
- the right, possibly losing the rightmost character on the
- line. This does not imply use of the hardware insert char-
- acter feature.
-
- insertln()
- winsertln(win)
- A blank line is inserted above the current line. The bottom
- line is lost. This does not imply use of the hardware
- insert line feature.
-
- 5.6.6. Formatted Output
-
- printw(fmt, ...)
- wprintw(win, fmt, ...)
- mvprintw(y, x, fmt, ...)
- mvwprintw(win, y, x, fmt, ...)
- vwprintw(win, fmt, va_list)
- These functions correspond to printf. The characters which
- would be output by printf are instead output using waddch on
- the given window. vwprintw() acts like vprintf().
-
- 5.6.7. Line drawing
-
- Borders are drawn inside a window and not around it.
-
- border(ls, rs, ts, bs, tl, tr, bl, br)
- wborder(win, ls, rs, ts, bs, tl, tr, bl, br)
- box(win, vert, hor)
- A border is drawn around the edges of the window. ls, rs,
- ts, bs, tl, tr, bl, and br are the character and attribute
- to draw the left side, right side, top side, bottom side,
- top left, top right, bottom left, and bottom right respec-
- tively.
- If any of these are 0, the follwing defaults are used:
- ACS_VLINE. ACS_VLINE, ACS_HLINE, ACS_HLINE, ACS_ULCORNER,
- ACS_URCORNER, ACS_LLCORNER, ACS_LRCORNER. box is shorthand
- for wborder(win, vert, vert, hor, hor, 0, 0, 0, 0).
-
- vline(ch,n)
- wvline(win,ch,n)
- These functions draw a vertical line starting at the current
- cursor position using ch for n characters or as many as will
- fit on the window. The cursor position is not advanced.
-
- hline(ch,n)
- whline(win,ch,n)
- These functions draw a horizontal line starting at the
- current cursor position using ch for n characters or as many
- as will fit on the window. The cursor position is not
- advanced.
-
- 5.6.8 Scrolling
-
- Scrolling only works if enabled via scrollok(). The cursor
- position is unchanged by these functions. As an optimization
- the physical screen is scrolled if the window in question is
- covering the entire screen.
-
- scroll(win)
- The window is scrolled up one line. This involves moving
- the lines in the window data structure.
-
- scrl(n)
- wscrl(win,n)
- These functions scroll thw window up/down n lines depending
- on the sign on n (+ for up, - for down).
-
- 5.7. Querying the Contents of a Window
-
- getyx(win,y,x)
- The cursor position of the window is placed in the two
- integer variables y and x. Since this is a macro, no & is
- necessary.
-
- inch()
- winch(win)
- mvinch(y,x)
- mvwinch(win,y,x)
- The character at the current position in the named window is
- returned.
-
- 5.8. Input from the Terminal
-
- getch()
- wgetch(win)
- mvgetch(y,x)
- mvwgetch(win,y,x)
- A character is read from the terminal associated with the
- window. In nodelay mode, if there is no input waiting, the
- value -1 is returned. In delay mode, the program will hang
- until a character is typed.
-
- If keypad mode is enabled, and a function key is pressed,
- the code for that function key will be returned instead of
- the raw characters. Possible function keys are defined with
- integers beginning with 0401, whose names begin with KEY_,
- defined in <ncurses.h>. If a character is received that
- could be the beginning of a function key (such as escape),
- curses will set a one second timer. If the remainder of the
- sequence does not come in within one second, the character
- will be passed through, otherwise the function key value
- will be returned. For this reason, on many terminals, there
- will be a one second delay after a user presses the escape
- key. (Use by a programmer of the escape key for a single
- character function is discouraged.) The one second delay can
- be turned off using the notimeout() function.
-
- getstr(str)
- wgetstr(win,str)
- mvgetstr(y,x,str)
- mvwgetstr(win,y,x,str)
- A series of calls to getch is made, until a newline is
- received. The resulting value is placed in the area pointed
- at by the character pointer str. The users erase and kill
- characters are interpreted, and the string is echoed.
-
- scanw(fmt, ...)
- wscanw(win, fmt, ...)
- mvscanw(y, x, fmt, ...)
- mvwscanw(win, y, x, fmt, ...)
- vwscanw(win,fmt,va_list)
- These functions corresponds to scanf. wgetstr is called on
- the window, and the resulting line is used as input for the
- scan.
-
- 5.9. Video Attributes
-
- attroff(at)
- wattroff(win, attrs)
- attron(at)
- wattron(win, attrs)
- attrset(at)
- wattrset(win, attrs)
- standout()
- standend()
- wstandout(win)
- wstandend(win)
- These functions set the current attributes of the named win-
- dow. These attributes can be any combination of A_STANDOUT,
- A_REVERSE, A_BOLD, A_DIM, A_BLINK, A_BLANK, A_UNDERLINE,
- A_PROTECT, A_INVIS, and A_ALTCHARSET. These constants are
- defined in <ncurses.h> and can be combined with the C | (or)
- operator. The current attributes of a window are applied to
- all characters that are written into the window. Attributes
- are a property of the character, and move with the char-
- acter through any scrolling and insert/delete line/character
- operations. To the extent possible on the particular
- terminal, they will be displayed as the graphic rendition
- of characters put on the screen.
- attrset(at) sets the current attributes of the given window
- to at. attroff(at) turns off the named attributes without
- affecting any other attributes. attron(at) turns on the
- named attributes without affecting any others. standout is
- the same as attrset(A_STANDOUT), standend is the same as
- attrset(0), that is, it turns off all attributes.
-
- 5.10. Color Manipulation
-
- Ncurses provides support for the use of color on terminals
- that are capable of display it. Note the BSD and older SYSV
- curses don't support color. Color support in the PC version
- is not compatible with SYSR4.
-
- has_colors()
- this function returns TRUE if the terminal supports color,
- FALSE otherwise. Other color handling funtions will return
- ERR if has_colors() is FALSE. You should always check before
- using color and use other video attributes to replace color.
-
- can_change_color()
- This function returns TRUE if the terminal is capable of
- redefining colors using the init_color function, FALSE if it
- can't. Don't use init_color and color_content if it returns
- FALSE.
-
- start_color()
- This function must be called before any other color handling
- function is called. It initializes the 8 basic colors (see
- appendix I) and sets the global variables COLORS and COLOR_
- PAIRS to the maximum number of colors and color-pairs a
- terminal can handle.
-
- init_pair(pair, fg, bg)
- This function changes the definition of a color-pair, pair.
- Each pair has a foregroung color fg, and a background color
- bg. Both values must be between 0 and COLORS-1. pair must be
- between 1 and COLOR_PAIRS-1.
- [If a pair is changed from a previous definition, the screen
- is refreshed and all occurances of the color-pair are
- changed to reflect the change.]
-
- pair_content(pair, f, b)
- This function stores the foreground and background colors of
- the color-pair pair into the variables pointed to by f, b.
- pair should be between 1 and COLOR_PAIRS-1.
-
- init_color(color, r, g, b)
- This function changes the value of a given color. A color is
- defined by its red, green, and blue components, r, g, and b.
- These values must be between 0 and 1000. color should be
- between 0 and COLORS-1.
-
- color_content(color, r, g, b)
- This function puts the red, green, and blue components of
- color into the variable pointed to by r, g, b respectively.
- color should be between 0 and COLORS-1.
-
- 5.11. Pads
-
- 5.12. Soft Labels
-
- 5.13. Bells and Flashing Lights
-
- beep()
- flash()
- These functions are used to signal the programmer. beep
- will sound the audible alarm on the terminal, if possible,
- and if not, will flash the screen (visible bell), if that is
- possible. flash will flash the screen, and if that is not
- possible, will sound the audible signal. If neither signal
- is possible, nothing will happen. Nearly all terminals have
- an audible signal (bell or beep) but only some can flash the
- screen.
-
- 5.14. Portability Functions
-
- These functions do not have anything to do with terminal
- dependent character output, but tend to be needed by pro-
- grams that use curses. Unfortunately, their implemention
- varies from one version of UNIX* to another. They have been
- included here to enhance the portability of programs using
- curses.
-
- baudrate()
- baudrate returns the output speed of the terminal. The num-
- ber returned is the integer baud rate, for example, 9600,
- rather than a table index such as B9600.
-
- erasechar()
- The erase character chosen by the user is returned. This is
- the character typed by the user to erase the character just
- typed.
-
- killchar()
- The line kill character chosen by the user is returned.
- This is the character typed by the user to forget the entire
- line being typed.
-
- flushinp()
- flushinp throws away any typeahead that has been typed by
- the user and has not yet been read by the program.
-
- 5.15. Debugging
-
- These functions are useful when debugging a program with
- curses.
-
- unctrl(ch)
- This macro expands to a character string which is a print-
- able representation of the character ch. The program must
- include the file <unctrl.h>. Control characters are dis-
- played in the ^x notation. Printing characters are displayed
- as is.
-
- traceoff()
- traceon()
- It is possible to compile a debugging version of curses with
- tracing turned on, and with the -g option for gdb. This
- library may be available on your system as -ldcurses. When
- using this version, the file ``trace'' will be created each
- time the program is run, containing verbose information
- showing each step done by curses. This output is useful for
- finding bugs in curses, and may be useful for finding bugs
- in user programs. Since the output is so verbose, with any
- bug that cannot be easily and quickly reproduced, it may be
- necessary to turn the debugging output off in some parts of
- the program. These functions can be used to turn tracing
- off and back on. When initscr is first called, tracing is
- automatically turned on.
- You should use -DTRACE when compiling programs that use
- tracing.
-
- _tracef()
- This function can be used to output your own debugging info-
- rmation. It is only available only if you compile with the
- -DTRACE flag and linking with -ldcurses. It can be used the
- same way as printf, only it outputs a newline after the end
- of arguments.
-
- 6. Lower Level Functions
-
- These functions are provided for programs not needing the
- screen optimization capabilities of curses. Programs are
- discouraged from working at this level, since they must han-
- dle various glitches in certain terminals. However, a pro-
- gram can be smaller if it only brings in the low level rou-
- tines.
-
- gettmode()
- setterm(type)
- These two initialization routines are provided for upward
- compatibility with the old curses. gettmode does nothing.
- setterm results in a call to setupterm with appropriate
- arguments.
-
- def_prog_mode()
- def_shell_mode()
- These functions define "program" mode and "shell" mode. The
- first describes the status of a terminal while in curses,
- the second the status outside curses.
-
- reset_prog_mode()
- reset_shell_mode()
- These functions restore a terminal to "program" mode after
- shelling out, or to "shell" mode before shelling out.
-
- fixterm()
- resetterm()
- These functions are obselete and have been replaced by
- reset_prog_mode() and reset_prog_mode() respectively.
-
- saveterm()
- This fucntion is obselete and is replaced by
- def_prog_mode().
-
- mvcur(oldrow, oldcol, newrow, newcol)
- This routine optimally moves the cursor from (oldrow, old-
- col) to (newrow, newcol). The user program is expected to
- keep track of the current cursor position. Note that unless
- a full screen image is kept, curses will have to make pes-
- simistic assumptions, sometimes resulting in less than opti-
- mal cursor motion. For example, moving the cursor a few
- spaces to the right can be done by transmitting the charac-
- ters being moved over, but if curses does not have access to
- the screen image, it doesn't know what these characters are.
- If either of oldcol or oldrow are negative, mvcur() will
- refrain from using any relative motions. This is handy for
- occasions when a program is unsure as to the current cursor
- location.
-
- 7. Terminfo Level
-
- These routines are called by low level programs that need
- access to specific capabilities of terminfo. A program
- working at this level should include both <ncurses.h> and
- <term.h>. After a call to setupterm, the capabilities will
- be available with macro names defined in <term.h>. See ter-
- minfo(5) for a detailed description of the capabilies. If
- the program only needs to handle one terminal, the defini-
- tion -DSINGLE can be passed to the C compiler, resulting in
- static references to capabilities instead of dynamic refer-
- ences. This can result in smaller code, but prevents use of
- more than one terminal at a time. Very few programs use
- more than one terminal, so almost all programs can use this
- flag.
-
- setupterm(term, filenum, errret)
- This routine is called to initialize a terminal. term is
- the character string representing the name of the terminal
- being used. filenum is the UNIX file descriptor of the ter-
- minal being used for output. errret is a pointer to an
- integer, in which a success or failure indication is
- returned. The values returned can be 1 (all is well), 0 (no
- such terminal), or -1 (some problem locating the terminfo
- database).
- The value of term can be given as 0, which will cause the
- value of TERM in the environment to be used. The errret
- pointer can also be given as 0, meaning no error code is
- wanted. If errret is defaulted, and something goes wrong,
- setupterm will print an appropriate error message and exit,
- rather than returning. Thus, a simple program can call
- setupterm(0, 1, 0) and not worry about initialization
- errors.
- setupterm will check the tty driver mode bits, and change
- any that might prevent the correct operation of other low
- level routines. Currently, the mode that expands tabs into
- spaces is disabled, because the tab character is sometimes
- used for different functions by different terminals. (Some
- terminals use it to move right one space. Others use it to
- address the cursor to row or column 9.) If the system is
- expanding tabs, setupterm will remove the definition of the
- tab and backtab functions, assuming that since the user is
- not using hardware tabs, they may not be properly set in the
- terminal.
- After the call to setupterm, the global variable cur_term is
- set to point to the current structure of terminal capabili-
- ties. By calling setupterm for each terminal, and saving
- and restoring cur_term, it is possible for a program to use
- two or more terminals at once. Setupterm also stores the
- names section of the terminal description in the global
- character array ttytype[]. Subsequent calls to setupterm
- will overwrite this array, so you'll have to save it your-
- self if need be.
- The mode that turns newlines into CRLF on output is not dis-
- abled. Programs that use cud1 or ind should avoid these
- capabilities if their value is linefeed unless they disable
- this mode. setupterm calls fixterm after any changes it
- makes.
-
- vidattr(newmode)
- vidputs(newmode, outc)
- newmode is any combination of attributes, defined in
- <ncurses.h>. The proper string to put the terminal in the
- given video mode is output. The routine vidattr() sends the
- output characters to putchar; vidputs sends them to the
- given routine outc, one character at a time. That routine
- should therefore expect one char parameter. The previous
- mode is remembered by this routine.
-
- tparm(instring, p1, p2, p3, p4, p5, p6, p7, p8, p9)
- tparm is used to instantiate a parameterized string. The
- character string returned is suitable for tputs. Up to 9
- parameters can be passed, in addition to the parameterized
- string.
-
- tputs(cp, affcnt, outc)
- A string capability, possibly containing padding informa-
- tion, is processed. Enough padding characters to delay for
- the specified time replace the padding specification, and
- the resulting string is passed, one character at a time, to
- the routine outc, which should expect one character parame-
- ter. (This routine often just calls putchar.) cp is the
- capability string. affcnt is the number of units affected
- by the capability, which varies with the particular capabil-
- ity. (For example, the affcnt for insert_line is the number
- of lines below the inserted line on the screen, that is, the
- number of lines that will have to be moved by the terminal.)
- affcnt is used by the padding information of some terminals
- as a multiplication factor. If the capability does not have
- a factor, the value 1 should be passed.
-
- putp(str)
- This is a convenient function to output a capability with no
- affcnt. The string is output to putchar with an affcnt of
- 1. It can be used in simple applications that do not need
- to process the output of tputs.
-
-
- 8. Termcap Emulation
-
- Appendix I: Attributes
- ----------------------
-
- Attributes are used with wattron(), wattroff(), wattrset(),
- or or'ed with the character passed to waddch(). They are
- defined in <ncurses.h>
-
- A_ATTRIBUTES mask chtype for attributes
- A_NORMAL reset all attributes
- A_STANDOUT best highlighting mode
- A_UNDERLINE underline
- A_REVERSE reverse video, background and foreground reversed
- A_BLINK blinking
- A_DIM dim or half bright
- A_BOLD bold or extra bright
- A_ALTCHARSET use alternate character set
- A_INVIS invisible, background same as foreground
- A_PROTECT I haven't a clue
- A_CHARTEXT mask chtype for actual character
- A_COLOR mask for color
- COLOR_PAIR(n) set color-pair to that stored in n
- PAIR_NUMBER(a) get color-pair stored in attribute a
-
-
- Appendix II: COLORS
- -------------------
-
- Colors are defined in <ncurses.h> are used with init_pair().
-
- COLOR_BLACK 0
- COLOR_RED 1
- COLOR_GREEN 2
- COLOR_YELLOW 3
- COLOR_BLUE 4
- COLOR_MAGENTA 5
- COLOR_CYAN 6
- COLOR_WHITE 7
-
- Appendix III: Alternative character sets
- ----------------------------------------
-
- ACS variables are used to add line-drawing capability to
- ncurses on terminals that support it. When defined for a
- given terminal (using acs) the A_ALTCHARSET attribute is
- set for that variable, otherwise the default value is
- used.
-
- ACS_ULCORNER +
- ACS_LLCORNER +
- ACS_URCORNER +
- ACS_LRCORNER +
- ACS_RTEE +
- ACS_LTEE +
- ACS_BTEE +
- ACS_TTEE +
- ACS_HLINE -
- ACS_VLINE |
- ACS_PLUS +
- ACS_S1 ~ /* scan line 1 */
- ACS_S9 _ /* scan line 9 */
- ACS_DIAMOND + /* diamond */
- ACS_CKBOARD : /* checker board (stipple) */
- ACS_DEGREE ' /* degree symbol */
- ACS_PLMINUS # /* plus/minus */
- ACS_BULLET 0 /* bullet */
- ACS_LARROW < /* arrow pointing left */
- ACS_RARROW > /* arrow pointing right */
- ACS_DARROW v /* arrow pointing down */
- ACS_UARROW ^ /* arrow pointing up */
- ACS_BOARD # /* board of squares */
- ACS_LANTERN # /* lantern symbol */
- ACS_BLOCK # /* solid square block */
-
-
- Appendix IV: Function keys, their codes, and their definition
- -------------------------------------------------------------
-
- Function keys can return their respective codes if keypad()
- is enabled and they are defined in the terminal's terminfo
- description (assuming the terminal transmits unique sequences
- for the key. They are defined in <ncurses.h>
-
- KEY_BREAK 0401 /* break key (unreliable) */
- KEY_DOWN 0402 /* The four arrow keys ... */
- KEY_UP 0403
- KEY_LEFT 0404
- KEY_RIGHT 0405 /* ... */
- KEY_HOME 0406 /* Home key (upward+left arrow) */
- KEY_BACKSPACE 0407 /* backspace (unreliable) */
- KEY_F0 0410 /* Function keys. Space for 64 */
- KEY_F(n) (KEY_F0+(n)) /* keys is reserved. */
- KEY_DL 0510 /* Delete line */
- KEY_IL 0511 /* Insert line */
- KEY_DC 0512 /* Delete character */
- KEY_IC 0513 /* Insert char or enter insert mode */
- KEY_EIC 0514 /* Exit insert char mode */
- KEY_CLEAR 0515 /* Clear screen */
- KEY_EOS 0516 /* Clear to end of screen */
- KEY_EOL 0517 /* Clear to end of line */
- KEY_SF 0520 /* Scroll 1 line forward */
- KEY_SR 0521 /* Scroll 1 line backwards (reverse) */
- KEY_NPAGE 0522 /* Next page */
- KEY_PPAGE 0523 /* Previous page */
- KEY_STAB 0524 /* Set tab */
- KEY_CTAB 0525 /* Clear tab */
- KEY_CATAB 0526 /* Clear all tabs */
- KEY_ENTER 0527 /* Enter or send (unreliable) */
- KEY_SRESET 0530 /* soft (partial) reset (unreliable) */
- KEY_RESET 0531 /* reset or hard reset (unreliable) */
- KEY_PRINT 0532 /* print or copy */
- KEY_LL 0533 /* home down or bottom (lower left) */
-
- /* The keypad is arranged like this: */
- /* a1 up a3 */
- /* left b2 right */
- /* c1 down c3 */
-
- KEY_A1 0534 /* Upper left of keypad */
- KEY_A3 0535 /* Upper right of keypad */
- KEY_B2 0536 /* Center of keypad */
- KEY_C1 0537 /* Lower left of keypad */
- KEY_C3 0540 /* Lower right of keypad */
- KEY_BTAB 0541 /* Back tab key */
- KEY_BEG 0542 /* beg(inning) key */
- KEY_CANCEL 0543 /* cancel key */
- KEY_CLOSE 0544 /* close key */
- KEY_COMMAND 0545 /* cmd (command) key */
- KEY_COPY 0546 /* copy key */
- KEY_CREATE 0547 /* create key */
- KEY_END 0550 /* end key */
- KEY_EXIT 0551 /* exit key */
- KEY_FIND 0552 /* find key */
- KEY_HELP 0553 /* help key */
- KEY_MARK 0554 /* mark key */
- KEY_MESSAGE 0555 /* message key */
- KEY_MOVE 0556 /* move key */
- KEY_NEXT 0557 /* next object key */
- KEY_OPEN 0560 /* open key */
- KEY_OPTIONS 0561 /* options key */
- KEY_PREVIOUS 0562 /* previous object key */
- KEY_REDO 0563 /* redo key */
- KEY_REFERENCE 0564 /* ref(erence) key */
- KEY_REFRESH 0565 /* refresh key */
- KEY_REPLACE 0566 /* replace key */
- KEY_RESTART 0567 /* restart key */
- KEY_RESUME 0570 /* resume key */
- KEY_SAVE 0571 /* save key */
- KEY_SBEG 0572 /* shifted beginning key */
- KEY_SCANCEL 0573 /* shifted cancel key */
- KEY_SCOMMAND 0574 /* shifted command key */
- KEY_SCOPY 0575 /* shifted copy key */
- KEY_SCREATE 0576 /* shifted create key */
- KEY_SDC 0577 /* shifted delete char key */
- KEY_SDL 0600 /* shifted delete line key */
- KEY_SELECT 0601 /* select key */
- KEY_SEND 0602 /* shifted end key */
- KEY_SEOL 0603 /* shifted clear line key */
- KEY_SEXIT 0604 /* shifted exit key */
- KEY_SFIND 0605 /* shifted find key */
- KEY_SHELP 0606 /* shifted help key */
- KEY_SHOME 0607 /* shifted home key */
- KEY_SIC 0610 /* shifted input key */
- KEY_SLEFT 0611 /* shifted left arrow key */
- KEY_SMESSAGE 0612 /* shifted message key */
- KEY_SMOVE 0613 /* shifted move key */
- KEY_SNEXT 0614 /* shifted next key */
- KEY_SOPTIONS 0615 /* shifted options key */
- KEY_SPREVIOUS 0616 /* shifted prev key */
- KEY_SPRINT 0617 /* shifted print key */
- KEY_SREDO 0620 /* shifted redo key */
- KEY_SREPLACE 0621 /* shifted replace key */
- KEY_SRIGHT 0622 /* shifted right arrow */
- KEY_SRSUME 0623 /* shifted resume key */
- KEY_SSAVE 0624 /* shifted save key */
- KEY_SSUSPEND 0625 /* shifted suspend key */
- KEY_SUNDO 0626 /* shifted undo key */
- KEY_SUSPEND 0627 /* suspend key */
- KEY_UNDO 0630 /* undo key */
- KEY_MAX 0777 /* Maximum curses key */
-
diff --git a/lib/libncurses/keys.list b/lib/libncurses/keys.list
deleted file mode 100644
index e766f32..0000000
--- a/lib/libncurses/keys.list
+++ /dev/null
@@ -1,149 +0,0 @@
-key_a1 KEY_A1
-key_a3 KEY_A3
-key_b2 KEY_B2
-key_backspace KEY_BACKSPACE
-key_beg KEY_BEG
-key_btab KEY_BTAB
-key_c1 KEY_C1
-key_c3 KEY_C3
-key_cancel KEY_CANCEL
-key_catab KEY_CATAB
-key_clear KEY_CLEAR
-key_close KEY_CLOSE
-key_command KEY_COMMAND
-key_copy KEY_COPY
-key_create KEY_CREATE
-key_ctab KEY_CTAB
-key_dc KEY_DC
-key_dl KEY_DL
-key_down KEY_DOWN
-key_eic KEY_EIC
-key_end KEY_END
-key_enter KEY_ENTER
-key_eol KEY_EOL
-key_eos KEY_EOS
-key_exit KEY_EXIT
-key_f0 KEY_F(0)
-key_f1 KEY_F(1)
-key_f2 KEY_F(2)
-key_f3 KEY_F(3)
-key_f4 KEY_F(4)
-key_f5 KEY_F(5)
-key_f6 KEY_F(6)
-key_f7 KEY_F(7)
-key_f8 KEY_F(8)
-key_f9 KEY_F(9)
-key_f10 KEY_F(10)
-key_f11 KEY_F(11)
-key_f12 KEY_F(12)
-key_f13 KEY_F(13)
-key_f14 KEY_F(14)
-key_f15 KEY_F(15)
-key_f16 KEY_F(16)
-key_f17 KEY_F(17)
-key_f18 KEY_F(18)
-key_f19 KEY_F(19)
-key_f20 KEY_F(20)
-key_f21 KEY_F(21)
-key_f22 KEY_F(22)
-key_f23 KEY_F(23)
-key_f24 KEY_F(24)
-key_f25 KEY_F(25)
-key_f26 KEY_F(26)
-key_f27 KEY_F(27)
-key_f28 KEY_F(28)
-key_f29 KEY_F(29)
-key_f30 KEY_F(30)
-key_f31 KEY_F(31)
-key_f32 KEY_F(32)
-key_f33 KEY_F(33)
-key_f34 KEY_F(34)
-key_f35 KEY_F(35)
-key_f36 KEY_F(36)
-key_f37 KEY_F(37)
-key_f38 KEY_F(38)
-key_f39 KEY_F(39)
-key_f40 KEY_F(40)
-key_f41 KEY_F(41)
-key_f42 KEY_F(42)
-key_f43 KEY_F(43)
-key_f44 KEY_F(44)
-key_f45 KEY_F(45)
-key_f46 KEY_F(46)
-key_f47 KEY_F(47)
-key_f48 KEY_F(48)
-key_f49 KEY_F(49)
-key_f50 KEY_F(50)
-key_f51 KEY_F(51)
-key_f52 KEY_F(52)
-key_f53 KEY_F(53)
-key_f54 KEY_F(54)
-key_f55 KEY_F(55)
-key_f56 KEY_F(56)
-key_f57 KEY_F(57)
-key_f58 KEY_F(58)
-key_f59 KEY_F(59)
-key_f60 KEY_F(60)
-key_f61 KEY_F(61)
-key_f62 KEY_F(62)
-key_f63 KEY_F(63)
-key_find KEY_FIND
-key_help KEY_HELP
-key_home KEY_HOME
-key_ic KEY_IC
-key_il KEY_IL
-key_left KEY_LEFT
-key_ll KEY_LL
-key_mark KEY_MARK
-key_message KEY_MESSAGE
-key_move KEY_MOVE
-key_next KEY_NEXT
-key_npage KEY_NPAGE
-key_open KEY_OPEN
-key_options KEY_OPTIONS
-key_ppage KEY_PPAGE
-key_previous KEY_PREVIOUS
-key_print KEY_PRINT
-key_redo KEY_REDO
-key_reference KEY_REFERENCE
-key_refresh KEY_REFRESH
-key_replace KEY_REPLACE
-key_restart KEY_RESTART
-key_resume KEY_RESUME
-key_right KEY_RIGHT
-key_save KEY_SAVE
-key_sbeg KEY_SBEG
-key_scancel KEY_SCANCEL
-key_scommand KEY_SCOMMAND
-key_scopy KEY_SCOPY
-key_screate KEY_SCREATE
-key_sdc KEY_SDC
-key_sdl KEY_SDL
-key_select KEY_SELECT
-key_send KEY_SEND
-key_seol KEY_SEOL
-key_sexit KEY_SEXIT
-key_sf KEY_SF
-key_sfind KEY_SFIND
-key_shelp KEY_SHELP
-key_shome KEY_SHOME
-key_sic KEY_SIC
-key_sleft KEY_SLEFT
-key_smessage KEY_SMESSAGE
-key_smove KEY_SMOVE
-key_snext KEY_SNEXT
-key_soptions KEY_SOPTIONS
-key_sprevious KEY_SPREVIOUS
-key_sprint KEY_SPRINT
-key_sr KEY_SR
-key_sredo KEY_SREDO
-key_sreplace KEY_SREPLACE
-key_sright KEY_SRIGHT
-key_srsume KEY_SRSUME
-key_ssave KEY_SSAVE
-key_ssuspend KEY_SSUSPEND
-key_stab KEY_STAB
-key_sundo KEY_SUNDO
-key_suspend KEY_SUSPEND
-key_undo KEY_UNDO
-key_up KEY_UP
diff --git a/lib/libncurses/lib_acs.c b/lib/libncurses/lib_acs.c
deleted file mode 100644
index 2b6d25b..0000000
--- a/lib/libncurses/lib_acs.c
+++ /dev/null
@@ -1,98 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-
-#include "curses.priv.h"
-#include "terminfo.h"
-#include <string.h>
-
-/* line graphics */
-
-
-chtype acs_map[128];
-
-void init_acs()
-{
-
-/*
- ACS_ULCORNER (acs_map['l'])
- ACS_LLCORNER (acs_map['m'])
- ACS_URCORNER (acs_map['k'])
- ACS_LRCORNER (acs_map['j'])
- ACS_RTEE (acs_map['u'])
- ACS_LTEE (acs_map['t'])
- ACS_BTEE (acs_map['v'])
- ACS_TTEE (acs_map['w'])
- ACS_HLINE (acs_map['q'])
- ACS_VLINE (acs_map['x'])
- ACS_PLUS (acs_map['n'])
- ACS_S1 (acs_map['o']) scan line 1
- ACS_S9 (acs_map['s']) scan line 9
- ACS_DIAMOND (acs_map['`']) diamond
- ACS_CKBOARD (acs_map['a']) checker board (stipple)
- ACS_DEGREE (acs_map['f']) degree symbol
- ACS_PLMINUS (acs_map['g']) plus/minus
- ACS_BULLET (acs_map['~']) bullet
- ACS_LARROW (acs_map[',']) arrow pointing left
- ACS_RARROW (acs_map['+']) arrow pointing right
- ACS_DARROW (acs_map['.']) arrow pointing down
- ACS_UARROW (acs_map['-']) arrow pointing up
- ACS_BOARD (acs_map['h']) board of squares
- ACS_LANTERN (acs_map['I']) lantern symbol
- ACS_BLOCK (acs_map['0']) solid square block
-*/
-
- T(("initializing ACS map"));
-
- acs_map['l'] = acs_map['m'] = acs_map['k'] = acs_map['j'] =
- acs_map['u'] = acs_map['t'] = acs_map['v'] = acs_map['w'] = (chtype)'+' & A_CHARTEXT;
- acs_map['q'] = (chtype)'-' & A_CHARTEXT;
- acs_map['x'] = (chtype)'|' & A_CHARTEXT;
- acs_map['n'] = (chtype)'+' & A_CHARTEXT;
- acs_map['o'] = (chtype)'~' & A_CHARTEXT;
- acs_map['s'] = (chtype)'_' & A_CHARTEXT;
- acs_map['`'] = (chtype)'+' & A_CHARTEXT;
- acs_map['a'] = (chtype)':' & A_CHARTEXT;
- acs_map['f'] = (chtype)'\'' & A_CHARTEXT;
- acs_map['g'] = (chtype)'#' & A_CHARTEXT;
- acs_map['~'] = (chtype)'o' & A_CHARTEXT;
- acs_map[','] = (chtype)'<' & A_CHARTEXT;
- acs_map['+'] = (chtype)'>' & A_CHARTEXT;
- acs_map['.'] = (chtype)'v' & A_CHARTEXT;
- acs_map['-'] = (chtype)'^' & A_CHARTEXT;
- acs_map['h'] = (chtype)'#' & A_CHARTEXT;
- acs_map['I'] = (chtype)'#' & A_CHARTEXT;
- acs_map['0'] = (chtype)'#' & A_CHARTEXT;
-
- if (ena_acs != NULL)
- putp(ena_acs);
-
- if (acs_chars != NULL) {
- int i = 0;
- int length = strlen(acs_chars);
-
- while (i < length)
- switch (acs_chars[i]) {
- case 'l':case 'm':case 'k':case 'j':
- case 'u':case 't':case 'v':case 'w':
- case 'q':case 'x':case 'n':case 'o':
- case 's':case '`':case 'a':case 'f':
- case 'g':case '~':case ',':case '+':
- case '.':case '-':case 'h':case 'I':
- case '0':
- acs_map[(unsigned int)(unsigned char)acs_chars[i]] =
- (acs_chars[++i] & A_CHARTEXT) | A_ALTCHARSET;
- default:
- i++;
- break;
- }
- }
-#ifdef TRACE
- else {
- T(("acsc not defined, using default mapping"));
- }
-#endif
-}
-
diff --git a/lib/libncurses/lib_addch.c b/lib/libncurses/lib_addch.c
deleted file mode 100644
index 60386b4..0000000
--- a/lib/libncurses/lib_addch.c
+++ /dev/null
@@ -1,127 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_addch.c
-**
-** The routine waddch().
-**
-*/
-
-#include "curses.priv.h"
-#include "unctrl.h"
-
-static inline chtype render_char(WINDOW *win, chtype ch)
-/* compute a rendition of the given char correct for the current context */
-{
- if (TextOf(ch) == ' ')
- ch = ch_or_attr(ch, win->_bkgd);
- else if (!(ch & A_ATTRIBUTES))
- ch = ch_or_attr(ch, (win->_bkgd & A_ATTRIBUTES));
- TR(TRACE_CHARPUT, ("bkg = %#lx -> ch = %#lx", win->_bkgd, ch));
-
- return(ch);
-}
-
-chtype _nc_background(WINDOW *win)
-/* make render_char() visible while still allowing us to inline it below */
-{
- return(render_char(win, BLANK));
-}
-
-chtype _nc_render(WINDOW *win, chtype ch)
-/* make render_char() visible while still allowing us to inline it below */
-{
- chtype c = render_char(win,ch);
- return (ch_or_attr(c,win->_attrs));
-}
-
-static int
-wladdch(WINDOW *win, chtype c, bool literal)
-{
-int x, y;
-int newx;
-chtype ch = c;
-
- x = win->_curx;
- y = win->_cury;
-
- if (y > win->_maxy || x > win->_maxx || y < 0 || x < 0)
- return(ERR);
-
- /* ugly, but necessary --- and, bizarrely enough, even portable! */
- if (literal)
- goto noctrl;
-
- switch (ch&A_CHARTEXT) {
- case '\t':
- for (newx = x + (8 - (x & 07)); x < newx; x++)
- if (waddch(win, ' ') == ERR)
- return(ERR);
- return(OK);
- case '\n':
- wclrtoeol(win);
- x = 0;
- goto newline;
- case '\r':
- x = 0;
- break;
- case '\b':
- if (--x < 0)
- x = 0;
- break;
- default:
- if (ch < ' ')
- return(waddstr(win, unctrl(ch)));
-
- /* FALL THROUGH */
- noctrl:
- T(("win attr = %x", win->_attrs));
- ch = render_char(win, ch);
- ch = ch_or_attr(ch,win->_attrs);
-
- if (win->_line[y][x] != ch) {
- if (win->_firstchar[y] == _NOCHANGE)
- win->_firstchar[y] = win->_lastchar[y] = x;
- else if (x < win->_firstchar[y])
- win->_firstchar[y] = x;
- else if (x > win->_lastchar[y])
- win->_lastchar[y] = x;
-
- }
-
- T(("char %d of line %d is %x", x, y, ch));
- win->_line[y][x++] = ch;
- if (x > win->_maxx) {
- x = 0;
-newline:
- y++;
- if (y > win->_regbottom) {
- y--;
- if (win->_scroll)
- scroll(win);
- }
- }
- break;
- }
-
- win->_curx = x;
- win->_cury = y;
-
- return(OK);
-}
-
-int waddch(WINDOW *win, chtype ch)
-{
- TR(TRACE_CHARPUT, ("waddch(%x,%c (%x)) called", win, ch&A_CHARTEXT, ch));
- return wladdch(win, ch, FALSE);
-}
-
-int wechochar(WINDOW *win, chtype ch)
-{
- T(("wechochar(%x,%c (%x)) called", win, ch&A_CHARTEXT, ch));
-
- return wladdch(win, ch, TRUE);
-}
diff --git a/lib/libncurses/lib_addstr.c b/lib/libncurses/lib_addstr.c
deleted file mode 100644
index d9cb30a..0000000
--- a/lib/libncurses/lib_addstr.c
+++ /dev/null
@@ -1,56 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_addstr.c
-*
-** The routines waddnstr(), waddchnstr().
-**
-*/
-
-#include "curses.priv.h"
-
-int
-waddnstr(WINDOW *win, char *str, int n)
-{
- T(("waddnstr(%x,\"%s\",%d) called", win, visbuf(str), n));
-
- if (str == NULL)
- return ERR;
-
- if (n < 0) {
- while (*str != '\0') {
- if (waddch(win, (chtype)(unsigned char)*str++) == ERR)
- return(ERR);
- }
- return OK;
- }
-
- while((n-- > 0) && (*str != '\0')) {
- if (waddch(win, (chtype)(unsigned char)*str++) == ERR)
- return ERR;
- }
- return OK;
-}
-
-int
-waddchnstr(WINDOW *win, chtype *str, int n)
-{
- T(("waddchnstr(%x,%x,%d) called", win, str, n));
-
- if (n < 0) {
- while (*str) {
- if (waddch(win, (chtype)(unsigned char)*str++) == ERR)
- return(ERR);
- }
- return OK;
- }
-
- while(n-- > 0) {
- if (waddch(win, (chtype)(unsigned char)*str++) == ERR)
- return ERR;
- }
- return OK;
-}
diff --git a/lib/libncurses/lib_beep.c b/lib/libncurses/lib_beep.c
deleted file mode 100644
index 60ce592..0000000
--- a/lib/libncurses/lib_beep.c
+++ /dev/null
@@ -1,56 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
- * beep.c
- *
- * Routines beep() and flash()
- *
- */
-
-#include "curses.priv.h"
-#include "terminfo.h"
-
-/*
- * beep()
- *
- * Sound the current terminal's audible bell if it has one. If not,
- * flash the screen if possible.
- *
- */
-
-int beep()
-{
- T(("beep() called"));
-
- /* should make sure that we are not in altchar mode */
- if (bell)
- return(putp(bell));
- else if (flash_screen)
- return(putp(flash_screen));
- else
- return(ERR);
-}
-
-/*
- * flash()
- *
- * Flash the current terminal's screen if possible. If not,
- * sound the audible bell if one exists.
- *
- */
-
-int flash()
-{
- T(("flash() called"));
-
- /* should make sure that we are not in altchar mode */
- if (flash_screen)
- return(putp(flash_screen));
- else if (bell)
- return(putp(bell));
- else
- return(ERR);
-}
diff --git a/lib/libncurses/lib_bkgd.c b/lib/libncurses/lib_bkgd.c
deleted file mode 100644
index d75585c..0000000
--- a/lib/libncurses/lib_bkgd.c
+++ /dev/null
@@ -1,49 +0,0 @@
-
-/***************************************************************************
-* COPYRIGHT NOTICE *
-****************************************************************************
-* ncurses is copyright (C) 1992, 1993, 1994 *
-* by Zeyd M. Ben-Halim *
-* zmbenhal@netcom.com *
-* *
-* Permission is hereby granted to reproduce and distribute ncurses *
-* by any means and for any fee, whether alone or as part of a *
-* larger distribution, in source or in binary form, PROVIDED *
-* this notice is included with any such distribution, not removed *
-* from header files, and is reproduced in any documentation *
-* accompanying it or the applications linked with it. *
-* *
-* ncurses comes AS IS with no warranty, implied or expressed. *
-* *
-***************************************************************************/
-
-#include "curses.h"
-#include "curses.priv.h"
-
-int wbkgd(WINDOW *win, chtype ch)
-{
-int x, y;
-chtype old_bkgd = getbkgd(win);
-chtype new_bkgd = ch;
-
- T(("wbkgd(%x, %x) called", win, ch));
-
- if (TextOf(new_bkgd) == 0)
- new_bkgd |= BLANK;
- wbkgdset(win, new_bkgd);
- wattrset(win, AttrOf(new_bkgd));
-
- for (y = 0; y <= win->_maxy; y++) {
- for (x = 0; x <= win->_maxx; x++) {
- if (win->_line[y][x] == old_bkgd)
- win->_line[y][x] = new_bkgd;
- else
- win->_line[y][x] =
- TextOf(win->_line[y][x])
- | AttrOf(new_bkgd);
- }
- }
- touchwin(win);
- return OK;
-}
-
diff --git a/lib/libncurses/lib_box.c b/lib/libncurses/lib_box.c
deleted file mode 100644
index a467808..0000000
--- a/lib/libncurses/lib_box.c
+++ /dev/null
@@ -1,131 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_box.c
-**
-** line drawing routines:
-** wborder()
-** whline()
-** wvline()
-**
-*/
-
-#include "curses.priv.h"
-
-int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts,
- chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
-{
-int i;
-int endx, endy;
-
- T(("wborder() called"));
-
- if (ls == 0) ls = ACS_VLINE;
- if (rs == 0) rs = ACS_VLINE;
- if (ts == 0) ts = ACS_HLINE;
- if (bs == 0) bs = ACS_HLINE;
- if (tl == 0) tl = ACS_ULCORNER;
- if (tr == 0) tr = ACS_URCORNER;
- if (bl == 0) bl = ACS_LLCORNER;
- if (br == 0) br = ACS_LRCORNER;
-
- ls = _nc_render(win, ls);
- rs = _nc_render(win, rs);
- ts = _nc_render(win, ts);
- bs = _nc_render(win, bs);
- tl = _nc_render(win, tl);
- tr = _nc_render(win, tr);
- bl = _nc_render(win, bl);
- br = _nc_render(win, br);
-
- T(("using %x, %x, %x, %x, %x, %x, %x, %x", ls, rs, ts, bs, tl, tr, bl, br));
-
- endx = win->_maxx;
- endy = win->_maxy;
-
- for (i = 0; i <= endx; i++) {
- win->_line[0][i] = ts;
- win->_line[endy][i] = bs;
- }
- win->_firstchar[endy] = win->_firstchar[0] = 0;
- win->_lastchar[endy] = win->_lastchar[0] = endx;
-
- for (i = 0; i <= endy; i++) {
- win->_line[i][0] = ls;
- win->_line[i][endx] = rs;
- win->_firstchar[i] = 0;
- win->_lastchar[i] = endx;
- }
- win->_line[0][0] = tl;
- win->_line[0][endx] = tr;
- win->_line[endy][0] = bl;
- win->_line[endy][endx] = br;
-
-#if 0
- if (! win->_scroll && (win->_flags & _SCROLLWIN))
- fp[0] = fp[endx] = lp[0] = lp[endx] = ' ';
-#endif
-
- return OK;
-}
-
-int whline(WINDOW *win, chtype ch, int n)
-{
-int line;
-int start;
-int end;
-
- T(("whline(%x,%x,%d) called", win, ch, n));
-
- line = win->_cury;
- start = win->_curx;
- end = start + n - 1;
- if (end > win->_maxx)
- end = win->_maxx;
-
- if (win->_firstchar[line] == _NOCHANGE || win->_firstchar[line] > start)
- win->_firstchar[line] = start;
- if (win->_lastchar[line] == _NOCHANGE || win->_lastchar[line] < start)
- win->_lastchar[line] = end;
-
- if (ch == 0)
- ch = ACS_HLINE;
- while ( end >= start) {
- win->_line[line][end] = ch | win->_attrs;
- end--;
- }
-
- return OK;
-}
-
-int wvline(WINDOW *win, chtype ch, int n)
-{
-int row, col;
-int end;
-
- T(("wvline(%x,%x,%d) called", win, ch, n));
-
- row = win->_cury;
- col = win->_curx;
- end = row + n - 1;
- if (end > win->_maxy)
- end = win->_maxy;
-
- if (ch == 0)
- ch = ACS_VLINE;
-
- while(end >= row) {
- win->_line[end][col] = ch | win->_attrs;
- if (win->_firstchar[end] == _NOCHANGE || win->_firstchar[end] > col)
- win->_firstchar[end] = col;
- if (win->_lastchar[end] == _NOCHANGE || win->_lastchar[end] < col)
- win->_lastchar[end] = col;
- end--;
- }
-
- return OK;
-}
-
diff --git a/lib/libncurses/lib_clear.c b/lib/libncurses/lib_clear.c
deleted file mode 100644
index c82db9b..0000000
--- a/lib/libncurses/lib_clear.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_clear.c
-**
-** The routine wclear().
-**
-*/
-
-#include "curses.priv.h"
-
-int wclear(WINDOW *win)
-{
- T(("wclear(%x) called", win));
-
- werase(win);
-
- win->_clear = TRUE;
-
- return OK;
-}
diff --git a/lib/libncurses/lib_clrbot.c b/lib/libncurses/lib_clrbot.c
deleted file mode 100644
index e803920..0000000
--- a/lib/libncurses/lib_clrbot.c
+++ /dev/null
@@ -1,53 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_clrbot.c
-**
-** The routine wclrtobot().
-**
-*/
-
-#include "curses.priv.h"
-
-int wclrtobot(WINDOW *win)
-{
-chtype *ptr, *end, *maxx = NULL;
-int y, startx, minx;
-
- T(("wclrtobot(%x) called", win));
-
- startx = win->_curx;
-
- T(("clearing from y = %d to y = %d with maxx = %d", win->_cury, win->_maxy, win->_maxx));
-
- for (y = win->_cury; y <= win->_maxy; y++) {
- minx = _NOCHANGE;
- end = &win->_line[y][win->_maxx];
-
- for (ptr = &win->_line[y][startx]; ptr <= end; ptr++) {
- chtype blank = _nc_background(win);
-
- if (*ptr != blank) {
- maxx = ptr;
- if (minx == _NOCHANGE)
- minx = ptr - win->_line[y];
- *ptr = blank;
- }
- }
-
- if (minx != _NOCHANGE) {
- if (win->_firstchar[y] > minx
- || win->_firstchar[y] == _NOCHANGE)
- win->_firstchar[y] = minx;
-
- if (win->_lastchar[y] < maxx - win->_line[y])
- win->_lastchar[y] = maxx - win->_line[y];
- }
-
- startx = 0;
- }
- return OK;
-}
diff --git a/lib/libncurses/lib_clreol.c b/lib/libncurses/lib_clreol.c
deleted file mode 100644
index b0a15b9..0000000
--- a/lib/libncurses/lib_clreol.c
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_clreol.c
-**
-** The routine wclrtoeol().
-**
-*/
-
-#include "curses.priv.h"
-
-int wclrtoeol(WINDOW *win)
-{
-chtype *maxx, *ptr, *end;
-int y, x, minx;
-
- T(("wclrtoeol(%x) called", win));
-
- y = win->_cury;
- x = win->_curx;
-
- end = &win->_line[y][win->_maxx];
- minx = _NOCHANGE;
- maxx = &win->_line[y][x];
-
- for (ptr = maxx; ptr <= end; ptr++) {
- chtype blank = _nc_background(win);
-
- if (*ptr != blank) {
- maxx = ptr;
- if (minx == _NOCHANGE)
- minx = ptr - win->_line[y];
- *ptr = blank;
- }
- }
-
- if (minx != _NOCHANGE) {
- if (win->_firstchar[y] > minx || win->_firstchar[y] == _NOCHANGE)
- win->_firstchar[y] = minx;
-
- if (win->_lastchar[y] < maxx - win->_line[y])
- win->_lastchar[y] = maxx - win->_line[y];
- }
- return(OK);
-}
diff --git a/lib/libncurses/lib_color.c b/lib/libncurses/lib_color.c
deleted file mode 100644
index 3d40a69..0000000
--- a/lib/libncurses/lib_color.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* This work is copyrighted. See COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/* lib_color.c
- *
- * Handles color emulation of SYS V curses
- *
- */
-
-#include <stdlib.h>
-#include "curses.priv.h"
-#include "terminfo.h"
-
-int COLOR_PAIRS;
-int COLORS;
-unsigned char *color_pairs;
-
-int start_color()
-{
- T(("start_color() called."));
-
- if (orig_pair != NULL)
- putp(orig_pair);
- else return ERR;
- if (max_pairs != -1)
- COLOR_PAIRS = max_pairs;
- else return ERR;
- color_pairs = malloc(max_pairs);
- if (max_colors != -1)
- COLORS = max_colors;
- else return ERR;
- SP->_coloron = 1;
-
- T(("started color: COLORS = %d, COLOR_PAIRS = %d", COLORS, COLOR_PAIRS));
-
- return OK;
-}
-
-int init_pair(short pair, short f, short b)
-{
- T(("init_pair( %d, %d, %d )", pair, f, b));
-
- if ((pair < 1) || (pair >= COLOR_PAIRS))
- return ERR;
- if ((f < 0) || (f >= COLORS) || (b < 0) || (b >= COLORS))
- return ERR;
-
- /* still to do:
- if pair was initialized before a screen update is performed
- replacing original pair colors with the new ones
- */
-
- color_pairs[pair] = ( (f & 0x0f) | (b & 0x0f) << 4 );
-
- return OK;
-}
-
-int init_color(short color, short r, short g, short b)
-{
- if (initialize_color != NULL) {
- if (color < 0 || color >= COLORS)
- return ERR;
- if (hue_lightness_saturation == TRUE)
- if (r < 0 || r > 360 || g < 0 || g > 100 || b < 0 || b > 100)
- return ERR;
- if (hue_lightness_saturation == FALSE)
- if (r < 0 || r > 1000 || g < 0 || g > 1000 || b < 0 || b > 1000)
- return ERR;
-
- putp(tparm(initialize_color, color, r, g, b));
- return OK;
- }
-
- return ERR;
-}
-
-bool can_change_color()
-{
- return can_change;
-}
-
-int has_colors()
-{
- return ((orig_pair != NULL) && (max_colors != -1) && (max_pairs != -1)
- &&
- (((set_foreground != NULL) && (set_background != NULL)) ||
- ((set_a_foreground != NULL) && (set_a_background != NULL)))
- );
-}
-
-int color_content(short color, short *r, short *g, short *b)
-{
- return ERR;
-}
-
-int pair_content(short pair, short *f, short *b)
-{
-
- if ((pair < 1) || (pair > COLOR_PAIRS))
- return ERR;
- *f = color_pairs[pair] & 0x0f;
- *b = color_pairs[pair] & 0xf0;
- *b >>= 4;
- return OK;
-}
-
diff --git a/lib/libncurses/lib_delch.c b/lib/libncurses/lib_delch.c
deleted file mode 100644
index 0a0fd0a..0000000
--- a/lib/libncurses/lib_delch.c
+++ /dev/null
@@ -1,39 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_delch.c
-**
-** The routine wdelch().
-**
-*/
-
-#include "curses.priv.h"
-#include "terminfo.h"
-
-int wdelch(WINDOW *win)
-{
-chtype *temp1, *temp2;
-chtype *end;
-chtype blank = _nc_background(win);
-
- T(("wdelch(%x) called", win));
-
- end = &win->_line[win->_cury][win->_maxx];
- temp2 = &win->_line[win->_cury][win->_curx + 1];
- temp1 = temp2 - 1;
-
- while (temp1 < end)
- *temp1++ = *temp2++;
-
- *temp1 = blank;
-
- win->_lastchar[win->_cury] = win->_maxx;
-
- if (win->_firstchar[win->_cury] == _NOCHANGE
- || win->_firstchar[win->_cury] > win->_curx)
- win->_firstchar[win->_cury] = win->_curx;
- return OK;
-}
diff --git a/lib/libncurses/lib_delwin.c b/lib/libncurses/lib_delwin.c
deleted file mode 100644
index 0edc73b..0000000
--- a/lib/libncurses/lib_delwin.c
+++ /dev/null
@@ -1,36 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_delwin.c
-**
-** The routine delwin().
-**
-*/
-
-#include <stdlib.h>
-#include "curses.priv.h"
-
-int delwin(WINDOW *win)
-{
-int i;
-
- T(("delwin(%x) called", win));
-
- if (! (win->_flags & _SUBWIN)) {
- for (i = 0; i < win->_maxy && win->_line[i]; i++)
- free(win->_line[i]);
- }
-
- free(win->_firstchar);
- free(win->_lastchar);
- free(win->_line);
-
- touchwin((win->_flags & _SUBWIN) ? win->_parent : curscr);
-
- free(win);
-
- return(OK);
-}
diff --git a/lib/libncurses/lib_doupdate.c b/lib/libncurses/lib_doupdate.c
deleted file mode 100644
index 1f42a90..0000000
--- a/lib/libncurses/lib_doupdate.c
+++ /dev/null
@@ -1,593 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*-----------------------------------------------------------------
- *
- * lib_doupdate.c
- *
- * The routine doupdate() and its dependents
- *
- *-----------------------------------------------------------------*/
-
-#include <stdlib.h>
-#include <sys/time.h>
-#ifdef SYS_SELECT
-#include <sys/select.h>
-#endif
-#include <string.h>
-#include "curses.priv.h"
-#include "terminfo.h"
-#ifdef SVR4_ACTION
-#define _POSIX_SOURCE
-#endif
-#include <signal.h>
-
-static void ClrUpdate( WINDOW *scr );
-static void TransformLine( int lineno );
-static void NoIDcTransformLine( int lineno );
-static void IDcTransformLine( int lineno );
-static void ClearScreen( void );
-static void InsStr( chtype *line, int count );
-static void DelChar( int count );
-
-static inline void PutAttrChar(chtype ch)
-{
- TR(TRACE_CHARPUT, ("PutAttrChar(%s, %s)",
- _tracechar(ch & A_CHARTEXT),
- _traceattr((ch & (chtype)A_ATTRIBUTES))));
- if (curscr->_attrs != (ch & (chtype)A_ATTRIBUTES)) {
- curscr->_attrs = ch & (chtype)A_ATTRIBUTES;
- vidputs(curscr->_attrs, _outch);
- }
- putc(ch & A_CHARTEXT, SP->_ofp);
-}
-
-static int LRCORNER = FALSE;
-
-static inline void PutChar(chtype ch)
-{
- if (LRCORNER == TRUE && SP->_curscol == columns-1) {
- int i = lines -1;
- int j = columns -1;
-
- LRCORNER = FALSE;
- if ( (!enter_insert_mode || !exit_insert_mode)
- && !insert_character
- )
- return;
- if (cursor_left)
- putp(cursor_left);
- else
- mvcur(-1, -1, i, j);
- PutAttrChar(ch);
- if (cursor_left)
- putp(cursor_left);
- else
- mvcur(-1, -1, i, j);
- if (enter_insert_mode && exit_insert_mode) {
- putp(enter_insert_mode);
- PutAttrChar(newscr->_line[i][j-1]);
- putp(exit_insert_mode);
- } else if (insert_character) {
- putp(insert_character);
- PutAttrChar(newscr->_line[i][j-1]);
- }
- return;
- }
- PutAttrChar(ch);
- SP->_curscol++;
- if (SP->_curscol >= columns) {
- if (auto_right_margin) {
- SP->_curscol = 0;
- SP->_cursrow++;
- } else {
- SP->_curscol--;
- }
- }
-}
-
-static inline void GoTo(int row, int col)
-{
- mvcur(SP->_cursrow, SP->_curscol, row, col);
- SP->_cursrow = row;
- SP->_curscol = col;
-}
-
-int _outch(int ch)
-{
- if (SP != NULL)
- putc(ch, SP->_ofp);
- else
- putc(ch, stdout);
- return OK;
-}
-
-int doupdate(void)
-{
-int i;
-sigaction_t act, oact;
-
- T(("doupdate() called"));
-
- act.sa_handler = SIG_IGN;
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
- sigaction(SIGTSTP, &act, &oact);
-
- if (SP->_endwin == TRUE) {
- T(("coming back from shell mode"));
- reset_prog_mode();
- if (enter_ca_mode)
- putp(enter_ca_mode);
- /* is this necessary? */
- if (enter_alt_charset_mode)
- init_acs();
- newscr->_clear = TRUE;
- SP->_endwin = FALSE;
- }
-
-#if 0 /* Not works for output-only pgms */
- /* check for pending input */
- {
- fd_set fdset;
- struct timeval timeout = {0,0};
-
- FD_ZERO(&fdset);
- FD_SET(SP->_checkfd, &fdset);
- if (select(SP->_checkfd+1, &fdset, NULL, NULL, &timeout) != 0) {
- fflush(SP->_ofp);
- return OK;
- }
- }
-#endif
-
- if (curscr->_clear) { /* force refresh ? */
- T(("clearing and updating curscr"));
- ClrUpdate(newscr); /* yes, clear all & update */
- curscr->_clear = FALSE; /* reset flag */
- } else if (newscr->_clear) {
- T(("clearing and updating newscr"));
- ClrUpdate(newscr);
- newscr->_clear = FALSE;
- } else {
- T(("Transforming lines"));
- for (i = 0; i < lines ; i++) {
- if(newscr->_firstchar[i] != _NOCHANGE)
- TransformLine(i);
- }
- }
- T(("marking screen as updated"));
- for (i = 0; i < lines; i++) {
- newscr->_firstchar[i] = _NOCHANGE;
- newscr->_lastchar[i] = _NOCHANGE;
- }
-
- curscr->_curx = newscr->_curx;
- curscr->_cury = newscr->_cury;
-
- GoTo(curscr->_cury, curscr->_curx);
-
- /* perhaps we should turn attributes off here */
-
- if (curscr->_attrs != A_NORMAL)
- vidattr(curscr->_attrs = A_NORMAL);
-
- fflush(SP->_ofp);
-
- sigaction(SIGTSTP, &oact, NULL);
-
- return OK;
-}
-
-static int move_right_cost = -1;
-
-static int countc(int c)
-{
- return(move_right_cost++);
-}
-
-/*
-** ClrUpdate(scr)
-**
-** Update by clearing and redrawing the entire screen.
-**
-*/
-
-static void ClrUpdate(WINDOW *scr)
-{
-int i = 0, j = 0;
-int lastNonBlank;
-
- T(("ClrUpdate(%x) called", scr));
- if (back_color_erase && curscr->_attrs != A_NORMAL) {
- T(("back_color_erase, turning attributes off"));
- vidattr(curscr->_attrs = A_NORMAL);
- }
- ClearScreen();
-
- if ((move_right_cost == -1) && parm_right_cursor) {
- move_right_cost = 0;
- tputs(tparm(parm_right_cursor, 10), 1, countc);
- }
-
- T(("updating screen from scratch"));
- for (i = 0; i < min(lines, scr->_maxy + 1); i++) {
- lastNonBlank = scr->_maxx;
-
- while (lastNonBlank >= 0 && scr->_line[i][lastNonBlank] == BLANK)
- lastNonBlank--;
-
- /* check if we are at the lr corner */
- if (i == lines-1)
- if ((auto_right_margin) && !(eat_newline_glitch) &&
- (lastNonBlank == columns-1))
- {
- T(("Lower-right corner needs special handling"));
- LRCORNER = TRUE;
- }
-
- for (j = 0; j <= lastNonBlank; j++) {
- if (parm_right_cursor) {
- static int inspace = 0;
-
- if ((scr->_line[i][j]) == BLANK) {
- inspace++;
- continue;
- } else if(inspace) {
- if (inspace < move_right_cost) {
- for (; inspace > 0; inspace--)
- PutChar(scr->_line[i][j-1]);
- } else {
- T(("trying to use parm_right_cursor"));
- putp(tparm(parm_right_cursor, inspace));
- SP->_curscol += inspace;
- inspace = 0;
- }
- }
- }
- PutChar(scr->_line[i][j]);
- }
- /* move cursor to the next line */
- if ((!auto_right_margin) || (lastNonBlank < columns - 1) ||
- (auto_right_margin && eat_newline_glitch && lastNonBlank == columns-1))
- {
- SP->_curscol = (lastNonBlank < 0) ? 0 : lastNonBlank;
- SP->_cursrow++;
- GoTo(i+1, 0);
- }
- }
-
-
- if (scr != curscr) {
- for (i = 0; i < lines ; i++)
- for (j = 0; j < columns; j++)
- curscr->_line[i][j] = scr->_line[i][j];
- }
-}
-
-/*
-** TransformLine(lineno)
-**
-** Call either IDcTransformLine or NoIDcTransformLine to do the
-** update, depending upon availability of insert/delete character.
-*/
-
-static void TransformLine(int lineno)
-{
-
- T(("TransformLine(%d) called",lineno));
-
- if ( (insert_character || (enter_insert_mode && exit_insert_mode))
- && delete_character)
- IDcTransformLine(lineno);
- else
- NoIDcTransformLine(lineno);
-}
-
-
-
-/*
-** NoIDcTransformLine(lineno)
-**
-** Transform the given line in curscr to the one in newscr, without
-** using Insert/Delete Character.
-**
-** firstChar = position of first different character in line
-** lastChar = position of last different character in line
-**
-** overwrite all characters between firstChar and lastChar.
-**
-*/
-
-static void NoIDcTransformLine(int lineno)
-{
-int firstChar, lastChar;
-chtype *newLine = newscr->_line[lineno];
-chtype *oldLine = curscr->_line[lineno];
-int k;
-int attrchanged = 0;
-
- T(("NoIDcTransformLine(%d) called", lineno));
-
- firstChar = 0;
- while (firstChar < columns - 1 && newLine[firstChar] == oldLine[firstChar]) {
- if(ceol_standout_glitch) {
- if((newLine[firstChar] & (chtype)A_ATTRIBUTES) != (oldLine[firstChar] & (chtype)A_ATTRIBUTES))
- attrchanged = 1;
- }
- firstChar++;
- }
-
- T(("first char at %d is %x", firstChar, newLine[firstChar]));
- if (firstChar > columns)
- return;
-
- if(ceol_standout_glitch && attrchanged) {
- firstChar = 0;
- lastChar = columns - 1;
- GoTo(lineno, firstChar);
- if(clr_eol) {
- if (back_color_erase && curscr->_attrs != A_NORMAL) {
- T(("back_color_erase, turning attributes off"));
- vidattr(curscr->_attrs = A_NORMAL);
- }
- putp(clr_eol);
- }
- } else {
- lastChar = columns - 1;
- while (lastChar > firstChar && newLine[lastChar] == oldLine[lastChar])
- lastChar--;
- GoTo(lineno, firstChar);
- }
-
- /* check if we are at the lr corner */
- if (lineno == lines-1)
- if ((auto_right_margin) && !(eat_newline_glitch) &&
- (lastChar == columns-1))
- {
- T(("Lower-right corner needs special handling"));
- LRCORNER = TRUE;
- }
-
- T(("updating chars %d to %d", firstChar, lastChar));
- for (k = firstChar; k <= lastChar; k++) {
- PutChar(newLine[k]);
- oldLine[k] = newLine[k];
- }
-}
-
-/*
-** IDcTransformLine(lineno)
-**
-** Transform the given line in curscr to the one in newscr, using
-** Insert/Delete Character.
-**
-** firstChar = position of first different character in line
-** oLastChar = position of last different character in old line
-** nLastChar = position of last different character in new line
-**
-** move to firstChar
-** overwrite chars up to min(oLastChar, nLastChar)
-** if oLastChar < nLastChar
-** insert newLine[oLastChar+1..nLastChar]
-** else
-** delete oLastChar - nLastChar spaces
-*/
-
-static void IDcTransformLine(int lineno)
-{
-int firstChar, oLastChar, nLastChar;
-chtype *newLine = newscr->_line[lineno];
-chtype *oldLine = curscr->_line[lineno];
-int k, n;
-int attrchanged = 0;
-
- T(("IDcTransformLine(%d) called", lineno));
-
- if(ceol_standout_glitch && clr_eol) {
- firstChar = 0;
- while(firstChar < columns) {
- if((newLine[firstChar] & (chtype)A_ATTRIBUTES) != (oldLine[firstChar] & (chtype)A_ATTRIBUTES))
- attrchanged = 1;
- firstChar++;
- }
- }
-
- firstChar = 0;
-
- if (attrchanged) {
- GoTo(lineno, firstChar);
- if (back_color_erase && curscr->_attrs != A_NORMAL) {
- T(("back_color_erase, turning attributes off"));
- vidattr(curscr->_attrs = A_NORMAL);
- }
- putp(clr_eol);
-
- /* check if we are at the lr corner */
- if (lineno == lines-1)
- if ((auto_right_margin) && !(eat_newline_glitch))
- {
- T(("Lower-right corner needs special handling"));
- LRCORNER = TRUE;
- }
-
- for( k = 0 ; k <= (columns-1) ; k++ )
- PutChar(newLine[k]);
- } else {
- while (firstChar < columns &&
- newLine[firstChar] == oldLine[firstChar])
- firstChar++;
-
- if (firstChar >= columns)
- return;
-
- oLastChar = columns - 1;
- while (oLastChar > firstChar && oldLine[oLastChar] == BLANK)
- oLastChar--;
-
- nLastChar = columns - 1;
- while (nLastChar > firstChar && newLine[nLastChar] == BLANK)
- nLastChar--;
-
- if((nLastChar == firstChar) && clr_eol) {
- GoTo(lineno, firstChar);
- if (back_color_erase && curscr->_attrs != A_NORMAL) {
- T(("back_color_erase, turning attributes off"));
- vidattr(curscr->_attrs = A_NORMAL);
- }
- putp(clr_eol);
-
- if(newLine[firstChar] != BLANK ) {
- /* check if we are at the lr corner */
- if (lineno == lines-1)
- if ((auto_right_margin) && !(eat_newline_glitch) &&
- (firstChar == columns-1))
- {
- T(("Lower-right corner needs special handling"));
- LRCORNER = TRUE;
- }
- PutChar(newLine[firstChar]);
- }
- } else if( newLine[nLastChar] != oldLine[oLastChar] ) {
- n = max( nLastChar , oLastChar );
-
- GoTo(lineno, firstChar);
-
- /* check if we are at the lr corner */
- if (lineno == lines-1)
- if ((auto_right_margin) && !(eat_newline_glitch) &&
- (n == columns-1))
- {
- T(("Lower-right corner needs special handling"));
- LRCORNER = TRUE;
- }
-
- for( k=firstChar ; k <= n ; k++ )
- PutChar(newLine[k]);
- } else {
- while (newLine[nLastChar] == oldLine[oLastChar]) {
- nLastChar--;
- oLastChar--;
- }
-
- n = min(oLastChar, nLastChar);
-
- GoTo(lineno, firstChar);
-
- /* check if we are at the lr corner */
- if (lineno == lines-1)
- if ((auto_right_margin) && !(eat_newline_glitch) &&
- (n == columns-1))
- {
- T(("Lower-right corner needs special handling"));
- LRCORNER = TRUE;
- }
-
- for (k=firstChar; k <= n; k++)
- PutChar(newLine[k]);
-
- if (oLastChar < nLastChar)
- InsStr(&newLine[k], nLastChar - oLastChar);
-
- else if (oLastChar > nLastChar )
- DelChar(oLastChar - nLastChar);
- }
- }
- for (k = firstChar; k < columns; k++)
- oldLine[k] = newLine[k];
-}
-
-/*
-** ClearScreen()
-**
-** Clear the physical screen and put cursor at home
-**
-*/
-
-static void ClearScreen()
-{
-
- T(("ClearScreen() called"));
-
- if (clear_screen) {
- putp(clear_screen);
- SP->_cursrow = SP->_curscol = 0;
- } else if (clr_eos) {
- SP->_cursrow = SP->_curscol = -1;
- GoTo(0,0);
-
- putp(clr_eos);
- } else if (clr_eol) {
- SP->_cursrow = SP->_curscol = -1;
-
- while (SP->_cursrow < lines) {
- GoTo(SP->_cursrow, 0);
- putp(clr_eol);
- }
- GoTo(0,0);
- }
- T(("screen cleared"));
-}
-
-
-/*
-** InsStr(line, count)
-**
-** Insert the count characters pointed to by line.
-**
-*/
-
-static void InsStr(chtype *line, int count)
-{
- T(("InsStr(%x,%d) called", line, count));
-
- if (enter_insert_mode && exit_insert_mode) {
- putp(enter_insert_mode);
- while (count) {
- PutChar(*line);
- line++;
- count--;
- }
- putp(exit_insert_mode);
- } else if (parm_ich) {
- putp(tparm(parm_ich, count));
- while (count) {
- PutChar(*line);
- line++;
- count--;
- }
- } else {
- while (count) {
- putp(insert_character);
- PutChar(*line);
- line++;
- count--;
- }
- }
-}
-
-/*
-** DelChar(count)
-**
-** Delete count characters at current position
-**
-*/
-
-static void DelChar(int count)
-{
- T(("DelChar(%d) called", count));
-
- if (back_color_erase && curscr->_attrs != A_NORMAL) {
- T(("back_color_erase, turning attributes off"));
- vidattr(curscr->_attrs = A_NORMAL);
- }
- if (parm_dch) {
- putp(tparm(parm_dch, count));
- } else {
- while (count--)
- putp(delete_character);
- }
-}
-
diff --git a/lib/libncurses/lib_endwin.c b/lib/libncurses/lib_endwin.c
deleted file mode 100644
index 4e07e8f..0000000
--- a/lib/libncurses/lib_endwin.c
+++ /dev/null
@@ -1,50 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_endwin.c
-**
-** The routine endwin().
-**
-*/
-
-#include "terminfo.h"
-#include "curses.priv.h"
-
-int isendwin()
-{
- if (SP == NULL)
- return FALSE;
- return SP->_endwin;
-}
-
-int
-endwin()
-{
- T(("endwin() called"));
-
- SP->_endwin = TRUE;
-
- if (change_scroll_region)
- putp(tparm(change_scroll_region, 0, lines - 1));
-
- mvcur(-1, -1, lines - 1, 0);
-
- if (exit_ca_mode)
- putp(exit_ca_mode);
-
- if (SP->_coloron == TRUE)
- putp(orig_pair);
-
- if (curscr && (curscr->_attrs != A_NORMAL))
- vidattr(curscr->_attrs = A_NORMAL);
-
- if (SP->_cursor != 1)
- putp(cursor_normal);
-
- fflush(SP->_ofp);
-
- return(reset_shell_mode());
-}
diff --git a/lib/libncurses/lib_erase.c b/lib/libncurses/lib_erase.c
deleted file mode 100644
index 38bf5ea..0000000
--- a/lib/libncurses/lib_erase.c
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_erase.c
-**
-** The routine werase().
-**
-*/
-
-#include "curses.priv.h"
-#include "terminfo.h"
-
-int werase(WINDOW *win)
-{
-int y;
-chtype *sp, *end, *start, *maxx = NULL;
-int minx;
-
- T(("werase(%x) called", win));
-
- for (y = win->_regtop; y <= win->_regbottom; y++) {
- minx = _NOCHANGE;
- start = win->_line[y];
- end = &start[win->_maxx];
-
- maxx = start;
- for (sp = start; sp <= end; sp++) {
- maxx = sp;
- if (minx == _NOCHANGE)
- minx = sp - start;
- *sp = _nc_background(win);
- }
-
- if (minx != _NOCHANGE) {
- if (win->_firstchar[y] > minx ||
- win->_firstchar[y] == _NOCHANGE)
- win->_firstchar[y] = minx;
-
- if (win->_lastchar[y] < maxx - win->_line[y])
- win->_lastchar[y] = maxx - win->_line[y];
- }
- }
- win->_curx = win->_cury = 0;
- return OK;
-}
diff --git a/lib/libncurses/lib_getch.c b/lib/libncurses/lib_getch.c
deleted file mode 100644
index c30f7f2..0000000
--- a/lib/libncurses/lib_getch.c
+++ /dev/null
@@ -1,224 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_getch.c
-**
-** The routine getch().
-**
-*/
-
-#include <sys/types.h>
-#include <string.h>
-#include <signal.h>
-#include <errno.h>
-#if defined(BRAINDEAD)
-extern int errno;
-#endif
-#include "curses.priv.h"
-
-#define head SP->_fifohead
-#define tail SP->_fifotail
-#define peek SP->_fifopeek
-
-#define h_inc() { head == FIFO_SIZE-1 ? head = 0 : head++; if (head == tail) head = -1, tail = 0;}
-#define h_dec() { head == 0 ? head = FIFO_SIZE-1 : head--; if (head == tail) tail = -1;}
-#define t_inc() { tail == FIFO_SIZE-1 ? tail = 0 : tail++; if (tail == head) tail = -1;}
-#define p_inc() { peek == FIFO_SIZE-1 ? peek = 0 : peek++;}
-
-static int fifo_peek()
-{
- T(("peeking at %d", peek+1));
- return SP->_fifo[++peek];
-}
-
-static inline void fifo_dump()
-{
-int i;
- T(("head = %d, tail = %d, peek = %d", head, tail, peek));
- for (i = 0; i < 10; i++)
- T(("char %d = %d (%c)", i, SP->_fifo[i], (unsigned char)SP->_fifo[i]));
-}
-
-static inline int fifo_pull()
-{
-int ch;
- ch = SP->_fifo[head];
- T(("pulling %d from %d", ch, head));
-
- h_inc();
- fifo_dump();
- return ch;
-}
-
-int ungetch(int ch)
-{
- if (tail == -1)
- return ERR;
- if (head == -1) {
- head = 0;
- t_inc()
- } else
- h_dec();
-
- SP->_fifo[head] = ch;
- T(("ungetch ok"));
- fifo_dump();
- return OK;
-}
-
-static inline int fifo_push()
-{
-int n;
-unsigned char ch;
-
- if (tail == -1) return ERR;
-again:
- n = read(fileno(SP->_ifp), &ch, 1);
- if (n == -1 && errno == EINTR)
- goto again;
- T(("read %d characters", n));
- SP->_fifo[tail] = ch;
- if (head == -1) head = tail;
- t_inc();
- T(("pushed %d at %d", ch, tail));
- fifo_dump();
- return ch;
-}
-
-static inline void fifo_clear()
-{
-int i;
- for (i = 0; i < FIFO_SIZE; i++)
- SP->_fifo[i] = 0;
- head = -1; tail = peek = 0;
-}
-
-static int kgetch(WINDOW *);
-
-int
-wgetch(WINDOW *win)
-{
-bool setHere = FALSE; /* cbreak mode was set here */
-int ch;
-
- T(("wgetch(%x) called", win));
-
- /* this should be eliminated */
- if (! win->_scroll && (SP->_echo) && (win->_flags & _FULLWIN)
- && win->_curx == win->_maxx && win->_cury == win->_maxy)
- return(ERR);
-
- if ((is_wintouched(win) || (win->_flags & _HASMOVED)) &&
- !(win->_flags & _ISPAD))
- wrefresh(win);
-
- if (SP->_echo && ! (SP->_raw || SP->_cbreak)) {
- cbreak();
- setHere = TRUE;
- }
-
- if (win->_delay >= 0 || SP->_cbreak > 1) {
- int delay;
-
- T(("timed delay in wgetch()"));
- if (SP->_cbreak > 1)
- delay = (SP->_cbreak-1) * 100;
- else
- delay = win->_delay;
-
- T(("delay is %d microseconds", delay));
-
- if (head == -1) /* fifo is empty */
- if (timed_wait(fileno(SP->_ifp), delay, NULL) == 0)
- return ERR;
- /* else go on to read data available */
- }
-
- if (win->_use_keypad)
- ch = kgetch(win);
- else {
- if (head == -1)
- fifo_push();
- ch = fifo_pull();
- }
-
- /* This should be eliminated */
- /* handle 8-bit input */
- if (ch & 0x80)
- if (!win->_use_meta)
- ch &= 0x7f;
-
- /* there must be a simpler way of doing this */
- if (!(win->_flags & _ISPAD) &&
- SP->_echo && ch < 0400) { /* ch < 0400 => not a keypad key */
- mvwaddch(curscr, win->_begy + win->_cury,
- win->_begx + win->_curx, ch | win->_attrs);
- waddch(win, ch | win->_attrs);
- }
- if (setHere)
- nocbreak();
-
- T(("wgetch returning : '%c', '0x%x'", ch, ch));
-
- return(ch);
-}
-
-
-/*
-** int
-** kgetch()
-**
-** Get an input character, but take care of keypad sequences, returning
-** an appropriate code when one matches the input. After each character
-** is received, set a one-second alarm call. If no more of the sequence
-** is received by the time the alarm goes off, pass through the sequence
-** gotten so far.
-**
-*/
-
-static int
-kgetch(WINDOW *win)
-{
-struct try *ptr;
-int ch = 0;
-int timeleft = 1000;
-
- T(("kgetch(%x) called", win));
-
- ptr = SP->_keytry;
-
- if (head == -1) {
- ch = fifo_push();
- peek = 0;
- while (ptr != NULL) {
- T(("ch = %d", ch));
- while ((ptr != NULL) && (ptr->ch != (unsigned char)ch))
- ptr = ptr->sibling;
-
- if (ptr != NULL)
- if (ptr->value != 0) { /* sequence terminated */
- T(("end of sequence"));
- fifo_clear();
- return(ptr->value);
- } else { /* go back for another character */
- ptr = ptr->child;
- T(("going back for more"));
- } else
- break;
-
- T(("waiting for rest of sequence"));
- if (timed_wait(fileno(SP->_ifp), timeleft, &timeleft) < 1) {
- T(("ran out of time"));
- return(fifo_pull());
- } else {
- T(("got more!"));
- fifo_push();
- ch = fifo_peek();
- }
- }
- }
- return(fifo_pull());
-}
diff --git a/lib/libncurses/lib_getstr.c b/lib/libncurses/lib_getstr.c
deleted file mode 100644
index 0eda9b9..0000000
--- a/lib/libncurses/lib_getstr.c
+++ /dev/null
@@ -1,113 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_getstr.c
-**
-** The routine wgetstr().
-**
-*/
-
-#include "curses.priv.h"
-#include "unctrl.h"
-
-inline void backspace(WINDOW *win)
-{
- mvwaddstr(curscr, win->_begy + win->_cury, win->_begx + win->_curx,
- "\b \b");
- waddstr(win, "\b \b");
- fputs("\b \b", SP->_ofp);
- fflush(SP->_ofp);
- SP->_curscol--;
-}
-
-int wgetnstr(WINDOW *win, char *str, int maxlen)
-{
-bool oldnl, oldecho, oldraw, oldcbreak, oldkeypad;
-char erasec;
-char killc;
-char *oldstr;
-int ch;
-
- T(("wgetnstr(%x,%x, %d) called", win, str, maxlen));
-
- oldnl = SP->_nl;
- oldecho = SP->_echo;
- oldraw = SP->_raw;
- oldcbreak = SP->_cbreak;
- oldkeypad = win->_use_keypad;
- nl();
- noecho();
- noraw();
- cbreak();
- keypad(win, TRUE);
-
- erasec = erasechar();
- killc = killchar();
-
- oldstr = str;
-
- vidattr(win->_attrs);
- if (is_wintouched(win) || (win->_flags & _HASMOVED))
- wrefresh(win);
-
- while ((ch = wgetch(win)) != ERR) {
- if (ch == '\n' || ch == '\r')
- break;
- if (ch == erasec || ch == KEY_LEFT || ch == KEY_BACKSPACE) {
- if (str > oldstr) {
- str--;
- backspace(win);
- }
- } else if (ch == killc) {
- while (str > oldstr) {
- str--;
- backspace(win);
- }
- } else if (maxlen >= 0 && str - oldstr >= maxlen) {
- beep();
- } else {
- mvwaddstr(curscr, win->_begy + win->_cury,
- win->_begx + win->_curx, unctrl(ch));
- waddstr(win, unctrl(ch));
- if (oldecho == TRUE) {
- fputs(unctrl(ch), SP->_ofp);
- fflush(SP->_ofp);
- }
- SP->_curscol++;
- *str++ = ch;
- }
- }
-
- win->_curx = 0;
- if (win->_cury < win->_maxy)
- win->_cury++;
- wrefresh(win);
-
- if (oldnl == FALSE)
- nonl();
-
- if (oldecho == TRUE)
- echo();
-
- if (oldraw == TRUE)
- raw();
-
- if (oldcbreak == FALSE)
- nocbreak();
-
- if (oldkeypad == FALSE)
- keypad(win, FALSE);
-
- if (ch == ERR) {
- *str = '\0';
- return ERR;
- }
- *str = '\0';
-
- T(("wgetnstr returns \"%s\"", visbuf(oldstr)));
-
- return(OK);
-}
diff --git a/lib/libncurses/lib_inchstr.c b/lib/libncurses/lib_inchstr.c
deleted file mode 100644
index d0ad351..0000000
--- a/lib/libncurses/lib_inchstr.c
+++ /dev/null
@@ -1,29 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_inchstr.c
-**
-** The routine winchnstr().
-**
-*/
-
-#include "curses.priv.h"
-
-int winchnstr(WINDOW *win, chtype *chstr, int i)
-{
-chtype *point, *end;
-
- T(("winschnstr(%x,'%x',%d) called", win, chstr, i));
-
- point = &win->_line[win->_cury][win->_curx];
- end = &win->_line[win->_cury][win->_maxx];
- if (point + i - 1 < end)
- end = point + i - 1;
-
- chstr = (chtype *)malloc((end - point + 1)*sizeof(chtype));
- chstr[end - point] = '\0';
- return OK;
-}
diff --git a/lib/libncurses/lib_initscr.c b/lib/libncurses/lib_initscr.c
deleted file mode 100644
index 1c2d9e3..0000000
--- a/lib/libncurses/lib_initscr.c
+++ /dev/null
@@ -1,40 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_initscr.c
-**
-** The routine initscr().
-**
-*/
-
-#include <stdlib.h>
-#include "curses.priv.h"
-
-WINDOW *initscr()
-{
-static bool initialized = FALSE;
-char *name;
-#ifdef TRACE
- _init_trace();
-
- T(("initscr() called"));
-#endif
-
- /* Portable applications must not call initscr() more than once */
- if (!initialized) {
- initialized = TRUE;
-
- if ((name = getenv("TERM")) == 0)
- name = "unknown";
- if (newterm(name, stdout, stdin) == 0) {
- fprintf(stderr, "Error opening terminal: %s.\n", name);
- exit(1);
- }
- /* def_shell_mode - done in newterm */
- def_prog_mode();
- }
- return(stdscr);
-}
diff --git a/lib/libncurses/lib_insch.c b/lib/libncurses/lib_insch.c
deleted file mode 100644
index ff30668..0000000
--- a/lib/libncurses/lib_insch.c
+++ /dev/null
@@ -1,36 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_insch.c
-**
-** The routine winsch().
-**
-*/
-
-#include "curses.priv.h"
-
-int winsch(WINDOW *win, chtype c)
-{
-chtype *temp1, *temp2;
-chtype *end;
-
- T(("winsch(%x,'%x') called", win, c));
-
- end = &win->_line[win->_cury][win->_curx];
- temp1 = &win->_line[win->_cury][win->_maxx];
- temp2 = temp1 - 1;
-
- while (temp1 > end)
- *temp1-- = *temp2--;
-
- *temp1 = _nc_render(win, c);
-
- win->_lastchar[win->_cury] = win->_maxx;
- if (win->_firstchar[win->_cury] == _NOCHANGE
- || win->_firstchar[win->_cury] > win->_curx)
- win->_firstchar[win->_cury] = win->_curx;
- return OK;
-}
diff --git a/lib/libncurses/lib_insdel.c b/lib/libncurses/lib_insdel.c
deleted file mode 100644
index 8729efe..0000000
--- a/lib/libncurses/lib_insdel.c
+++ /dev/null
@@ -1,31 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_insdel.c
-**
-** The routine winsdel(win, n).
-** positive n insert n lines above current line
-** negative n delete n lines starting from current line
-**
-*/
-
-#include "curses.priv.h"
-
-int
-winsdelln(WINDOW *win, int n)
-{
-int code = ERR;
-
- T(("winsdel(%x,%d) called", win, n));
-
- if (win) {
- if (n != 0) {
- _nc_scroll_window(win, -n, win->_cury, win->_maxy, _nc_background(win));
- }
- code = OK;
- }
- return code;
-}
diff --git a/lib/libncurses/lib_insstr.c b/lib/libncurses/lib_insstr.c
deleted file mode 100644
index 6307662..0000000
--- a/lib/libncurses/lib_insstr.c
+++ /dev/null
@@ -1,21 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_insstr.c
-**
-** The routine winsnstr().
-**
-*/
-
-#include "curses.priv.h"
-
-int winsnstr(WINDOW *win, char *str, int n)
-{
-
- T(("winsstr(%x,'%x',%d) called", win, str, n));
-
- return OK;
-}
diff --git a/lib/libncurses/lib_instr.c b/lib/libncurses/lib_instr.c
deleted file mode 100644
index 6d850b3..0000000
--- a/lib/libncurses/lib_instr.c
+++ /dev/null
@@ -1,54 +0,0 @@
-
-/***************************************************************************
-* COPYRIGHT NOTICE *
-****************************************************************************
-* ncurses is copyright (C) 1992-1995 *
-* Zeyd M. Ben-Halim *
-* zmbenhal@netcom.com *
-* Eric S. Raymond *
-* esr@snark.thyrsus.com *
-* *
-* Permission is hereby granted to reproduce and distribute ncurses *
-* by any means and for any fee, whether alone or as part of a *
-* larger distribution, in source or in binary form, PROVIDED *
-* this notice is included with any such distribution, and is not *
-* removed from any of its header files. Mention of ncurses in any *
-* applications linked with it is highly appreciated. *
-* *
-* ncurses comes AS IS with no warranty, implied or expressed. *
-* *
-***************************************************************************/
-
-
-/*
-** lib_instr.c
-**
-** The routine winnstr().
-**
-*/
-
-#include "curses.priv.h"
-
-int winnstr(WINDOW *win, char *str, int n)
-{
- int i, row, col;
-
- T(("winnstr(%p,%p,%d) called", win, str, n));
-
- getyx(win, row, col);
-
- if (n < 0)
- n = win->_maxx - win->_curx + 1;
-
- for (i = 0; i < n;) {
- str[i++] = TextOf(win->_line[row][col]);
- if (++col > win->_maxx) {
- col = 0;
- if (++row > win->_maxy)
- break;
- }
- }
- str[i] = '\0'; /* SVr4 does not seem to count the null */
-
- return (i);
-}
diff --git a/lib/libncurses/lib_kernel.c b/lib/libncurses/lib_kernel.c
deleted file mode 100644
index a1d0a85..0000000
--- a/lib/libncurses/lib_kernel.c
+++ /dev/null
@@ -1,318 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
- * lib_kernel.c
- *
- * Misc. low-level routines:
- * reset_prog_mode()
- * reset_shell_mode()
- * baudrate()
- * erasechar()
- * killchar()
- * flushinp()
- * savetty()
- * resetty()
- *
- *
- */
-
-#include "curses.priv.h"
-#include "terminfo.h"
-
-int wattron(WINDOW *win, chtype at)
-{
- T(("wattron(%x,%s) current = %s", win, _traceattr(at), _traceattr(win->_attrs)));
- if (PAIR_NUMBER(at) > 0x00) {
- win->_attrs = (win->_attrs & ~A_COLOR) | at ;
- T(("new attribute is %s", _traceattr(win->_attrs)));
- } else {
- win->_attrs |= at;
- T(("new attribute is %s", _traceattr(win->_attrs)));
- }
- return OK;
-}
-
-int wattroff(WINDOW *win, chtype at)
-{
-#define IGNORE_COLOR_OFF FALSE
-
- T(("wattroff(%x,%s) current = %s", win, _traceattr(at), _traceattr(win->_attrs)));
- if (IGNORE_COLOR_OFF == TRUE) {
- if (PAIR_NUMBER(at) == 0xff) /* turn off color */
- win->_attrs &= ~at;
- else /* leave color alone */
- win->_attrs &= ~(at & ~A_COLOR);
- } else {
- if (PAIR_NUMBER(at) > 0x00) /* turn off color */
- win->_attrs &= ~at;
- else /* leave color alone */
- win->_attrs &= ~(at & ~A_COLOR);
- }
- T(("new attribute is %s", _traceattr(win->_attrs)));
- return OK;
-}
-
-#ifndef MYTINFO
-int reset_prog_mode()
-{
- T(("reset_prog_mode() called"));
-
-#ifdef TERMIOS
- tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb);
-#else
- stty(cur_term->Filedes, &cur_term->Nttyb);
-#endif
-
- return OK;
-}
-
-
-int reset_shell_mode()
-{
- T(("reset_shell_mode() called"));
-
-#ifdef TERMIOS
- tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Ottyb);
-#else
- stty(cur_term->Filedes, &cur_term->Ottyb);
-#endif
-
- return OK;
-}
-#endif
-
-int curs_set(int vis)
-{
-int cursor = SP->_cursor;
-
- T(("curs_set(%d)", vis));
-
- if (vis < 0 || vis > 2)
- return ERR;
-
- switch(vis) {
- case 2:
- if (cursor_visible)
- putp(cursor_visible);
- break;
- case 1:
- if (cursor_normal)
- putp(cursor_normal);
- break;
- case 0:
- if (cursor_invisible)
- putp(cursor_invisible);
- break;
- }
- SP->_cursor = vis;
- return cursor;
-}
-
-int delay_output(int ms)
-{
-int speed;
-
- T(("delay_output(%d) called", ms));
-
- if (!no_pad_char && (speed = baudrate()) == ERR)
- return(ERR);
- else {
- register int nullcount;
-
- if (!no_pad_char)
- for (nullcount = ms * 1000 / speed; nullcount > 0; nullcount--)
- putc(*pad_char, SP->_ofp);
- (void) fflush(SP->_ofp);
- if (no_pad_char)
- napms(ms);
- }
-
- return OK;
-}
-
-/*
- * erasechar()
- *
- * Return erase character as given in cur_term->Ottyb.
- *
- */
-
-char
-erasechar()
-{
- T(("erasechar() called"));
-
-#ifdef TERMIOS
- return(cur_term->Ottyb.c_cc[VERASE]);
-#else
- return(cur_term->Ottyb.sg_erase);
-#endif
-
-}
-
-
-
-/*
- * killchar()
- *
- * Return kill character as given in cur_term->Ottyb.
- *
- */
-
-char
-killchar()
-{
- T(("killchar() called"));
-
-#ifdef TERMIOS
- return(cur_term->Ottyb.c_cc[VKILL]);
-#else
- return(cur_term->Ottyb.sg_kill);
-#endif
-}
-
-
-
-/*
- * flushinp()
- *
- * Flush any input on cur_term->Filedes
- *
- */
-
-int flushinp()
-{
- T(("flushinp() called"));
-
-#ifdef TERMIOS
- tcflush(cur_term->Filedes, TCIFLUSH);
-#else
- ioctl(cur_term->Filedes, TIOCFLUSH, 0);
-#endif
- if (SP) {
- SP->_fifohead = -1;
- SP->_fifotail = 0;
- SP->_fifopeek = 0;
- }
- return OK;
-
-}
-
-
-
-/*
- * int
- * baudrate()
- *
- * Returns the current terminal's baud rate.
- *
- */
-
-#ifndef TERMIOS
-struct speed {
- speed_t s;
- int sp;
-};
-
-static struct speed speeds[] = {
- {B0, 0},
- {B50, 50},
- {B75, 75},
- {B110, 110},
- {B134, 134},
- {B150, 150},
- {B200, 200},
- {B300, 300},
- {B600, 600},
- {B1200, 1200},
- {B1800, 1800},
- {B2400, 2400},
- {B4800, 4800},
- {B9600, 9600}
-#define MAX_BAUD B9600
-#ifdef B19200
-#undef MAX_BAUD
-#define MAX_BAUD B19200
- ,{B19200, 19200}
-#endif
-#ifdef B38400
-#undef MAX_BAUD
-#define MAX_BAUD B38400
- ,{B38400, 38400}
-#endif
-#ifdef B57600
-#undef MAX_BAUD
-#define MAX_BAUD B57600
- ,{B57600, 57600}
-#endif
-#ifdef B115200
-#undef MAX_BAUD
-#define MAX_BAUD B115200
- ,{B115200, 115200}
-#endif
-};
-#endif
-
-int
-baudrate()
-{
-#ifndef TERMIOS
-int i, ret;
-#endif
-
- T(("baudrate() called"));
-
-#ifdef TERMIOS
- return cfgetospeed(&cur_term->Nttyb);
-#else
- ret = cur_term->Nttyb.sg_ospeed;
- if(ret < 0 || ret > MAX_BAUD)
- return ERR;
- for (i = 0; i < (sizeof(speeds) / sizeof(struct speed)); i++)
- if (speeds[i].s == ret)
- return speeds[i].sp;
- return ERR;
-#endif
-}
-
-
-/*
-** savetty() and resetty()
-**
-*/
-
-static TTY buf;
-
-int savetty()
-{
- T(("savetty() called"));
-
-#ifdef TERMIOS
- tcgetattr(cur_term->Filedes, &buf);
-#else
- gtty(cur_term->Filedes, &buf);
-#endif
- return OK;
-}
-
-int resetty()
-{
- T(("resetty() called"));
-
-#ifdef TERMIOS
- tcsetattr(cur_term->Filedes, TCSANOW, &buf);
-#else
- stty(cur_term->Filedes, &buf);
-#endif
- return OK;
-}
-
-
-int
-resizeterm(int ToLines, int ToCols)
-{
- return OK;
-}
diff --git a/lib/libncurses/lib_longname.c b/lib/libncurses/lib_longname.c
deleted file mode 100644
index a8de085..0000000
--- a/lib/libncurses/lib_longname.c
+++ /dev/null
@@ -1,35 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_longname.c
-**
-** The routine longname().
-**
-*/
-
-#include <string.h>
-#include "curses.priv.h"
-#include "terminfo.h"
-
-char *
-longname()
-{
-#ifndef MYTINFO
-char *ptr;
-#endif
-
- T(("longname() called"));
-
-#ifdef MYTINFO
- return cur_term->name_long;
-#else
- for (ptr = ttytype + strlen(ttytype); ptr > ttytype; ptr--)
- if (*ptr == '|')
- return(ptr + 1);
-
- return(ttytype);
-#endif
-}
diff --git a/lib/libncurses/lib_move.c b/lib/libncurses/lib_move.c
deleted file mode 100644
index cf56fa0..0000000
--- a/lib/libncurses/lib_move.c
+++ /dev/null
@@ -1,30 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_move.c
-**
-** The routine wmove().
-**
-*/
-
-#include "curses.priv.h"
-
-int
-wmove(WINDOW *win, int y, int x)
-{
- T(("wmove(%x,%d,%d) called", win, y, x));
-
- if (x >= 0 && x <= win->_maxx &&
- y >= 0 && y <= win->_maxy)
- {
- win->_curx = x;
- win->_cury = y;
-
- win->_flags |= _HASMOVED;
- return(OK);
- } else
- return(ERR);
-}
diff --git a/lib/libncurses/lib_mvcur.c b/lib/libncurses/lib_mvcur.c
deleted file mode 100644
index 388c680..0000000
--- a/lib/libncurses/lib_mvcur.c
+++ /dev/null
@@ -1,700 +0,0 @@
-/*---------------------------------------------------------------------------
- *
- * lib_mvcur.c
- *
- * The routine mvcur() etc.
- *
- * last edit-date: [Wed Jun 16 14:13:22 1993]
- *
- * -hm conversion from termcap -> terminfo
- * -hm optimization debugging
- * -hm zeyd's ncurses 0.7 update
- * -hm eat_newline_glitch bugfix
- * -hm hpux lint'ing ..
- *
- *---------------------------------------------------------------------------*/
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-#include <string.h>
-#include <stdlib.h>
-#include "terminfo.h"
-#include "curses.priv.h"
-
-#ifndef OPT_MVCUR
-/*
-**
-** mvcur(oldrow, oldcol, newrow, newcol)
-** A hack for terminals that are smart enough
-** to know how to move cursor.
-** There is still a bug in the alternative long-
-** winded code.
-**
-*/
-
-int mvcur(int oldrow, int oldcol, int newrow, int newcol)
-{
- T(("mvcur(%d,%d,%d,%d) called", oldrow, oldcol, newrow, newcol));
-
- if(!cursor_address)
- return ERR;
-
- newrow %= lines;
- newcol %= columns;
-
- if (cursor_address)
- putp(tparm(cursor_address, newrow, newcol));
- return OK;
-
-}
-
-#else
-
-#define BUFSIZE 128 /* size of strategy buffer */
-
-struct Sequence
-{
- int vec[BUFSIZE]; /* vector of operations */
- int *end; /* end of vector */
- int cost; /* cost of vector */
-};
-
-static void row(struct Sequence *outseq, int orow, int nrow);
-static void column(struct Sequence *outseq, int ocol, int ncol);
-static void simp_col(struct Sequence *outseq, int oc, int nc);
-static void zero_seq(struct Sequence *seq);
-static void add_seq(struct Sequence *seq1, struct Sequence *seq2);
-static void out_seq(struct Sequence *seq);
-static void update_ops(void);
-static void init_costs(int costs[]);
-static int countc(char ch);
-static void add_op(struct Sequence *seq, int op, ...);
-static char *sequence(int op);
-
-static int c_count; /* used for counting tputs output */
-
-#define INFINITY 1000 /* biggest, impossible sequence cost */
-#define NUM_OPS 16 /* num. term. control sequences */
-#define NUM_NPARM 9 /* num. ops wo/ parameters */
-
- /* operator indexes into op_info */
-
-#define CARRIAGE_RETURN 0 /* watch out for nl mapping */
-#define CURS_DOWN 1
-#define CURS_HOME 2
-#define CURS_LEFT 3
-#define CURS_RIGHT 4
-#define CURS_TO_LL 5
-#define CURS_UP 6
-#define TAB 7
-#define BACK_TAB 8
-#define ROW_ADDR 9
-#define COL_ADDR 10
-#define P_DOWN_CURS 11
-#define P_LEFT_CURS 12
-#define P_RIGHT_CURS 13
-#define P_UP_CURS 14
-#define CURS_ADDR 15
-
-static bool loc_init = FALSE; /* set if op_info is init'ed */
-
-static bool rel_ok; /* set if we really know where we are */
-
-/*
- * op_info[NUM_OPS]
- *
- * op_info[] contains for operations with no parameters
- * the cost of the operation. These ops should be first in the array.
- * For operations with parameters, op_info[] contains
- * the negative of the number of parameters.
- */
-
-static int op_info[NUM_OPS] = {
- 0, /* carriage_return */
- 0, /* cursor_down */
- 0, /* cursor_home */
- 0, /* cursor_left */
- 0, /* cursor_right */
- 0, /* cursor_to_ll */
- 0, /* cursor_up */
- 0, /* tab */
- 0, /* back_tab */
- -1, /* row_address */
- -1, /* column_address */
- -1, /* parm_down_cursor */
- -1, /* parm_left_cursor */
- -1, /* parm_right_cursor */
- -1, /* parm_up_cursor */
- -2 /* cursor_address */
-};
-
-/*
-** Make_seq_best(best, try)
-**
-** Make_seq_best() copies try to best if try->cost < best->cost
-**
-** fixed the old version, now it really runs .. (-hm/08.04.93)
-**
-*/
-
-inline void Make_seq_best(struct Sequence *best, struct Sequence *try)
-{
- if (best->cost > try->cost) {
- register int *sptr;
-
- sptr = try->vec; /* src ptr */
- best->end = best->vec; /* dst ptr */
- while(sptr != try->end) /* copy src -> dst */
- *(best->end++) = *(sptr++);
- best->cost = try->cost; /* copy cost */
- }
-}
-
-
-/*
-**
-** mvcur(oldrow, oldcol, newrow, newcol)
-**
-** mvcur() optimally moves the cursor from the position
-** specified by (oldrow, oldcol) to (newrow, newcol). If
-** (oldrow, oldcol) == (-1, -1), mvcur() does not use relative
-** cursor motions. If the coordinates are otherwise
-** out of bounds, it mods them into range.
-**
-** Revisions needed:
-** eat_newline_glitch, auto_right_margin
-*/
-
-int mvcur(int oldrow, int oldcol, int newrow, int newcol)
-{
-struct Sequence seqA, seqB, /* allocate work structures */
- col0seq, /* sequence to get from col0 to nc */
- *best, /* best sequence so far */
- *try; /* next try */
-bool nlstat = SP->_nl; /* nl-output-mapping in effect ?*/
-
- T(("=============================\nmvcur(%d,%d,%d,%d) called",
- oldrow, oldcol, newrow, newcol));
-
- if ((oldrow == newrow) && (oldcol == newcol))
- return OK;
-
- if (oldcol == columns-1 && eat_newline_glitch && auto_right_margin) {
- putp(tparm(cursor_address, newrow, newcol));
- return OK;
- }
-
-#if 0
- if (nlstat)
- nonl();
-#endif
- update_ops(); /* make sure op_info[] is current */
-
- if (oldrow < 0 || oldcol < 0 || (eat_newline_glitch && oldcol == 0 )) {
- rel_ok = FALSE; /* relative ops ok? */
- } else {
- rel_ok = TRUE;
- oldrow %= lines; /* mod values into range */
- oldcol %= columns;
- }
-
- newrow %= lines;
- newcol %= columns;
-
- best = &seqA;
- try = &seqB;
-
- /* try out direct cursor addressing */
-
- zero_seq(best);
- add_op(best, CURS_ADDR, newrow, newcol);
-
- /* try out independent row/column addressing */
-
- if(rel_ok) {
- zero_seq(try);
- row(try, oldrow, newrow);
- column(try, oldcol, newcol);
- Make_seq_best(best, try);
- }
-
- zero_seq(&col0seq); /* store seq. to get from c0 to nc */
- column(&col0seq, 0, newcol);
-
- if(col0seq.cost < INFINITY) { /* can get from col0 to newcol */
-
- /* try out homing and then row/column */
-
- if (! rel_ok || newcol < oldcol || newrow < oldrow) {
- zero_seq(try);
- add_op(try, CURS_HOME, 1);
- row(try, 0, newrow);
- add_seq(try, &col0seq);
- Make_seq_best(best, try);
- }
-
- /* try out homing to last line and then row/column */
-
- if (! rel_ok || newcol < oldcol || newrow > oldrow) {
- zero_seq(try);
- add_op(try, CURS_TO_LL, 1);
- row(try, lines - 1, newrow);
- add_seq(try, &col0seq);
- Make_seq_best(best, try);
- }
- }
-
- out_seq(best);
-#if 0
- if(nlstat)
- nl();
-#endif
-
- T(("==================================="));
-
- return OK;
-}
-
-/*
-** row(outseq, oldrow, newrow)
-**
-** row() adds the best sequence for moving
-** the cursor from oldrow to newrow to seq.
-** row() considers row_address, parm_up/down_cursor
-** and cursor_up/down.
-*/
-
-static void
-row(struct Sequence *outseq, /* where to put the output */
-int orow, int nrow) /* old, new cursor locations */
-{
-struct Sequence seqA, seqB,
- *best, /* best sequence so far */
- *try; /* next try */
-
-int parm_cursor, one_step;
-
- best = &seqA;
- try = &seqB;
-
- if (nrow == orow)
- return;
-
- if (nrow < orow) {
- parm_cursor = P_UP_CURS;
- one_step = CURS_UP;
- } else {
- parm_cursor = P_DOWN_CURS;
- one_step = CURS_DOWN;
- }
-
- /* try out direct row addressing */
-
- zero_seq(best);
- add_op(best, ROW_ADDR, nrow);
-
- /* try out paramaterized up or down motion */
-
- if (rel_ok) {
- zero_seq(try);
- add_op(try, parm_cursor, abs(orow - nrow));
- Make_seq_best(best, try);
- }
-
- /* try getting there one step at a time... */
-
- if (rel_ok) {
- zero_seq(try);
- add_op(try, one_step, abs(orow-nrow));
- Make_seq_best(best, try);
- }
-
- add_seq(outseq, best);
-}
-
-
-/*
-** column(outseq, oldcol, newcol)
-**
-** column() adds the best sequence for moving
-** the cursor from oldcol to newcol to outseq.
-** column() considers column_address, parm_left/right_cursor,
-** simp_col(), and carriage_return followed by simp_col().
-*/
-
-static void column(struct Sequence *outseq, /* where to put the output */
-int ocol, int ncol) /* old, new cursor column */
-{
-struct Sequence seqA, seqB,
- *best, *try;
-int parm_cursor; /* set to either parm_up/down_cursor */
-
- best = &seqA;
- try = &seqB;
-
- if (ncol == ocol)
- return;
-
- if (ncol < ocol)
- parm_cursor = P_LEFT_CURS;
- else
- parm_cursor = P_RIGHT_CURS;
-
- /* try out direct column addressing */
-
- zero_seq(best);
- add_op(best, COL_ADDR, ncol);
-
- /* try carriage_return then simp_col() */
-
- if(! rel_ok || (ncol < ocol)) {
- zero_seq(try);
- add_op(try, CARRIAGE_RETURN, 1);
- simp_col(try, 0, ncol);
- Make_seq_best(best, try);
- }
- if(rel_ok) {
- /* try out paramaterized left or right motion */
-
- zero_seq(try);
- add_op(try, parm_cursor, abs(ocol - ncol));
- Make_seq_best(best, try);
-
- /* try getting there with simp_col() */
-
- zero_seq(try);
- simp_col(try, ocol, ncol);
- Make_seq_best(best, try);
- }
-
- add_seq(outseq, best);
-}
-
-
-/*
-** simp_col(outseq, oldcol, newcol)
-**
-** simp_col() adds the best simple sequence for getting
-** from oldcol to newcol to outseq.
-** simp_col() considers (back_)tab and cursor_left/right.
-**
-** Revisions needed:
-** Simp_col asssumes that the cost of a (back_)tab
-** is less then the cost of one-stepping to get to the same column.
-** Should sometimes use overprinting instead of cursor_right.
-*/
-
-static void
-simp_col( struct Sequence *outseq, /* place to put sequence */
-int oc, int nc) /* old column, new column */
-{
-struct Sequence seqA, seqB, tabseq,
- *best, *try;
-int mytab, tabs, onepast,
- one_step, opp_step;
-
- onepast = -1;
-
- if (oc == nc)
- return;
-
- if(! rel_ok) {
- outseq->cost = INFINITY;
- return;
- }
-
- best = &seqA;
- try = &seqB;
-
- if(oc < nc) {
- mytab = TAB;
-
- if (init_tabs > 0 && op_info[TAB] < INFINITY) {
- tabs = (nc / init_tabs) - (oc / init_tabs);
- onepast = ((nc / init_tabs) + 1) * init_tabs;
- if (tabs)
- oc = onepast - init_tabs; /* consider it done */
- } else {
- tabs = 0;
- }
- one_step = CURS_RIGHT;
- opp_step = CURS_LEFT;
- } else {
- mytab = BACK_TAB;
- if (init_tabs > 0 && op_info[BACK_TAB] < INFINITY) {
- tabs = (oc / init_tabs) - (nc / init_tabs);
- onepast = ((nc - 1) / init_tabs) * init_tabs;
- if (tabs)
- oc = onepast + init_tabs; /* consider it done */
- } else {
- tabs = 0;
- }
- one_step = CURS_LEFT;
- opp_step = CURS_RIGHT;
- }
-
- /* tab as close as possible to nc */
-
- zero_seq(&tabseq);
- add_op(&tabseq, mytab, tabs);
-
- /* try extra tab and backing up */
-
- zero_seq(best);
-
- if (onepast >= 0 && onepast < columns) {
- add_op(best, mytab, 1);
- add_op(best, opp_step, abs(onepast - nc));
- } else {
- best->cost = INFINITY; /* make sure of next swap */
- }
-
- /* try stepping to nc */
-
- zero_seq(try);
- add_op(try, one_step, abs(nc - oc));
- Make_seq_best(best, try);
-
- if (tabseq.cost < INFINITY)
- add_seq(outseq, &tabseq);
- add_seq(outseq, best);
-}
-
-
-/*
-** zero_seq(seq) empties seq.
-** add_seq(seq1, seq2) adds seq1 to seq2.
-** out_seq(seq) outputs a sequence.
-*/
-
-static void
-zero_seq(seq)
-struct Sequence *seq;
-{
- seq->end = seq->vec;
- seq->cost = 0;
-}
-
-static void
-add_seq(struct Sequence *seq1, struct Sequence *seq2)
-{
-int *vptr;
-
- T(("add_seq(%x, %x)", seq1, seq2));
-
- if(seq1->cost >= INFINITY || seq2->cost >= INFINITY)
- seq1->cost = INFINITY;
- else {
- vptr = seq2->vec;
- while (vptr != seq2->end)
- *(seq1->end++) = *(vptr++);
- seq1->cost += seq2->cost;
- }
-}
-
-
-static void
-out_seq(struct Sequence *seq)
-{
-int *opptr, prm[9], ps, p, op;
-int count;
-char *sequence();
-
- T(("out_seq(%x)", seq));
-
- if (seq->cost >= INFINITY)
- return;
-
- for (opptr = seq->vec; opptr < seq->end; opptr++) {
- op = *opptr; /* grab operator */
- ps = -op_info[op];
- if(ps > 0) { /* parameterized */
- for (p = 0; p < ps; p++) /* fill in needed parms */
- prm[p] = *(++opptr);
-
- putp(tparm(sequence(op),
- prm[0], prm[1], prm[2], prm[3], prm[4],
- prm[5], prm[6], prm[7], prm[8]));
- } else {
- count = *(++opptr);
- /*rev should save tputs output instead of mult calls */
- while (count--) /* do count times */
- putp(sequence(op));
- }
- }
-}
-
-
-/*
-** update_ops()
-**
-** update_ops() makes sure that
-** the op_info[] array is updated and initializes
-** the cost array for SP if needed.
-*/
-
-static void
-update_ops()
-{
- T(("update_ops()"));
-
- if (SP) { /* SP structure exists */
- int op;
-
- if (! SP->_costinit) { /* this term not yet assigned costs */
- loc_init = FALSE; /* if !SP in the future, new term */
- init_costs(SP->_costs); /* fill term costs */
- SP->_costinit = TRUE;
- }
-
- for (op = 0; op < NUM_NPARM; op++)
- op_info[op] = SP->_costs[op]; /* set up op_info */
-
- /* check for newline that might be mapped... */
-
- if (SP->_nlmapping && index(sequence(CURS_DOWN), '\n'))
- op_info[CURS_DOWN] = INFINITY;
- } else {
- if (! loc_init) { /* using local costs */
- loc_init = TRUE;
- init_costs(op_info); /* set up op_info */
- }
-
- /* check for newline that might be mapped... */
-
- if (index(sequence(CURS_DOWN), '\n'))
- op_info[CURS_DOWN] = INFINITY;
- }
-}
-
-
-/*
-** init_costs(costs)
-**
-** init_costs() fills the array costs[NUM_NPARM]
-** with costs calculated by doing tputs() calls.
-*/
-
-static void
-init_costs(int costs[])
-{
-int i;
-
- for (i = 0; i < NUM_NPARM; i++) {
- if (sequence(i) != (char *) 0) {
- c_count = 0;
- tputs(sequence(i), 1, countc);
- costs[i] = c_count;
- } else
- costs[i] = INFINITY;
- }
-}
-
-
-/*
-** countc() increments global var c_count.
-*/
-
-static int countc(char ch)
-{
- return(c_count++);
-}
-
-/*
-** add_op(seq, op, p0, p1, ... , p8)
-**
-** add_op() adds the operator op and the appropriate
-** number of paramaters to seq. It also increases the
-** cost appropriately.
-** if op has no parameters, p0 is taken to be a count.
-*/
-
-static void add_op(struct Sequence *seq, int op, ...)
-{
-va_list argp;
-int num_ps, p;
-
- T(("adding op %d to sequence", op));
-
- va_start(argp, op);
-
- num_ps = - op_info[op]; /* get parms or -cost */
-
- *(seq->end++) = op;
-
- if (num_ps == (- INFINITY) || sequence(op) == (char *) 0) {
- seq->cost = INFINITY;
- } else if (num_ps <= 0) { /* no parms, -cost */
- int i = va_arg(argp, int);
- seq->cost -= i * num_ps; /* ADD count * cost */
- *(seq->end++) = i;
- } else {
- int prm[9];
-
- for (p = 0; p < num_ps; p++)
- *(seq->end++) = prm[p] = va_arg(argp, int);
-
- c_count = 0;
-
- tputs(tparm(sequence(op), prm[0], prm[1], prm[2], prm[3], prm[4],
- prm[5], prm[6], prm[7], prm[8]), 1, countc);
-
- seq->cost += c_count;
- }
- va_end(argp);
-}
-
-
-/*
-** char *sequence(op)
-**
-** sequence() returns a pointer to the op's
-** terminal control sequence.
-*/
-
-static char *sequence(int op)
-{
- T(("sequence(%d)", op));
-
- switch(op) {
- case CARRIAGE_RETURN:
- return (carriage_return);
- case CURS_DOWN:
- return (cursor_down);
- case CURS_HOME:
- return (cursor_home);
- case CURS_LEFT:
- return (cursor_left);
- case CURS_RIGHT:
- return (cursor_right);
- case CURS_TO_LL:
- return (cursor_to_ll);
- case CURS_UP:
- return (cursor_up);
- case TAB:
- return (tab);
- case BACK_TAB:
- return (back_tab);
- case ROW_ADDR:
- return (row_address);
- case COL_ADDR:
- return (column_address);
- case P_DOWN_CURS:
- return (parm_down_cursor);
- case P_LEFT_CURS:
- return (parm_left_cursor);
- case P_RIGHT_CURS:
- return (parm_right_cursor);
- case P_UP_CURS:
- return (parm_up_cursor);
- case CURS_ADDR:
- return (cursor_address);
- default:
- return ((char *) 0);
- }
-}
-
-#endif
-
diff --git a/lib/libncurses/lib_mvwin.c b/lib/libncurses/lib_mvwin.c
deleted file mode 100644
index 2e6159f..0000000
--- a/lib/libncurses/lib_mvwin.c
+++ /dev/null
@@ -1,29 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_mvwin.c
-**
-** The routine mvwin().
-**
-*/
-
-#include "curses.priv.h"
-#include "terminfo.h"
-
-int mvwin(WINDOW *win, int by, int bx)
-{
- T(("mvwin(%x,%d,%d) called", win, by, bx));
-
- if (by + win->_maxy > lines - 1 || bx + win->_maxx > columns - 1)
- return(ERR);
-
- win->_begy = by;
- win->_begx = bx;
-
- touchwin(win);
-
- return(OK);
-}
diff --git a/lib/libncurses/lib_newterm.c b/lib/libncurses/lib_newterm.c
deleted file mode 100644
index 95ef1eb..0000000
--- a/lib/libncurses/lib_newterm.c
+++ /dev/null
@@ -1,176 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_newterm.c
-**
-** The newterm() function.
-**
-*/
-
-#include <stdlib.h>
-#include "curses.priv.h"
-#include "terminfo.h"
-#ifdef SVR4_ACTION
-#define _POSIX_SOURCE
-#endif
-#include <signal.h>
-
-#ifdef MYTINFO
-int LINES, COLS;
-#endif
-
-static void cleanup(int sig)
-{
-
- if (sig == SIGSEGV)
- fprintf(stderr, "Got a segmentation violation signal, cleaning up and exiting\n");
- endwin();
- exit(1);
-}
-
-static void
-size_change(int sig)
-{
- struct ttysize ws;
-
- if (ioctl(0, TIOCGSIZE, &ws) != -1) {
- LINES = ws.ts_lines;
- COLS = ws.ts_cols;
- }
-}
-
-WINDOW *stdscr, *curscr, *newscr;
-SCREEN *SP;
-
-struct ripoff_t
-{
- int line;
- int (*hook)();
-}
-rippedoff[5], *rsp = rippedoff;
-
-SCREEN * newterm(char *term, FILE *ofp, FILE *ifp)
-{
-sigaction_t act;
-int errret;
-int stolen, topstolen;
-extern char _ncurses_copyright[];
-char *use_it = _ncurses_copyright;
-
- use_it = use_it; /* shut up compiler */
-#ifdef TRACE
- _init_trace();
- T(("newterm(\"%s\",%x,%x) called", term, ofp, ifp));
-#endif
-
-#ifdef MYTINFO
- if (setupterm(term, fileno(ofp), &errret) != OK)
- return NULL;
- COLS = columns;
- LINES = lines;
-#else
- if (setupterm(term, fileno(ofp), &errret) != 1)
- return NULL;
-#endif
-
- if ((SP = (SCREEN *) malloc(sizeof *SP)) == NULL)
- return NULL;
-
- if (ofp == stdout && ifp == stdin) {
- SP->_ofp = stdout;
- SP->_ifp = stdin;
- } else {
- SP->_ofp = ofp;
- SP->_ifp = ofp;
- }
- SP->_term = cur_term;
- SP->_cursrow = -1;
- SP->_curscol = -1;
- SP->_keytry = UNINITIALISED;
- SP->_nl = TRUE;
- SP->_raw = FALSE;
- SP->_cbreak = FALSE;
- SP->_echo = TRUE;
- SP->_nlmapping = TRUE;
- SP->_fifohead = -1;
- SP->_fifotail = 0;
- SP->_fifopeek = 0;
- SP->_endwin = FALSE;
- SP->_checkfd = fileno(ifp);
- typeahead(fileno(ifp));
-
- if (enter_ca_mode)
- putp(enter_ca_mode);
-
- init_acs();
-
- T(("creating newscr"));
- if ((newscr = newwin(lines, columns, 0, 0)) == (WINDOW *)NULL)
- return(NULL);
-
- T(("creating curscr"));
- if ((curscr = newwin(lines, columns, 0, 0)) == (WINDOW *)NULL)
- return(NULL);
-
- SP->_newscr = newscr;
- SP->_curscr = curscr;
-
- newscr->_clear = TRUE;
- curscr->_clear = FALSE;
-
- stolen = topstolen = 0;
- for (rsp = rippedoff; rsp->line; rsp++) {
- if (rsp->hook)
- if (rsp->line < 0)
- rsp->hook(newwin(1,COLS, LINES-1,0), COLS);
- else
- rsp->hook(newwin(1,COLS, topstolen++,0), COLS);
- --LINES;
- stolen++;
- }
-
- act.sa_handler = tstp;
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
- sigaction(SIGTSTP, &act, NULL);
- act.sa_handler = cleanup;
- sigaction(SIGINT, &act, NULL);
- sigaction(SIGTERM, &act, NULL);
-#if 0
- sigaction(SIGSEGV, &act, NULL);
-#endif
- act.sa_handler = size_change;
- act.sa_flags = SA_RESTART;
- sigaction(SIGWINCH, &act, NULL); /* this must restart read() */
- if ((stdscr = newwin(lines - stolen, columns, topstolen, 0)) == NULL)
- return(NULL);
-
- SP->_stdscr = stdscr;
-
- def_shell_mode();
- def_prog_mode();
-
- T(("newterm returns %x", SP));
-
- return(SP);
-}
-
-int
-ripoffline(int line, int (*init)(WINDOW *, int))
-{
- if (line == 0)
- return(OK);
-
- if (rsp >= rippedoff + sizeof(rippedoff)/sizeof(rippedoff[0]))
- return(ERR);
-
- rsp->line = line;
- rsp->hook = init;
- rsp++;
-
- return(OK);
-}
-
diff --git a/lib/libncurses/lib_newwin.c b/lib/libncurses/lib_newwin.c
deleted file mode 100644
index b58eb07..0000000
--- a/lib/libncurses/lib_newwin.c
+++ /dev/null
@@ -1,185 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_newwin.c
-**
-** The routines newwin(), subwin() and their dependent
-**
-*/
-
-#include <stdlib.h>
-#include "terminfo.h"
-#include "curses.priv.h"
-
-WINDOW * newwin(int num_lines, int num_columns, int begy, int begx)
-{
-WINDOW *win;
-chtype *ptr;
-int i, j;
-
- T(("newwin(%d,%d,%d,%d) called", num_lines, num_columns, begy, begx));
-
- if (num_lines == 0)
- num_lines = lines - begy;
-
- if (num_columns == 0)
- num_columns = columns - begx;
-
- if (num_columns + begx > columns || num_lines + begy > lines)
- return NULL;
-
- if ((win = makenew(num_lines, num_columns, begy, begx)) == NULL)
- return NULL;
-
- for (i = 0; i < num_lines; i++) {
- if ((win->_line[i] = (chtype *) calloc(num_columns, sizeof(chtype))) == NULL) {
- for (j = 0; j < i; j++)
- free(win->_line[j]);
-
- free(win->_firstchar);
- free(win->_lastchar);
- free(win->_line);
- free(win);
-
- return NULL;
- }
- else
- for (ptr = win->_line[i]; ptr < win->_line[i] + num_columns; )
- *ptr++ = ' ';
- }
-
- T(("newwin: returned window is %x", win));
-
- return(win);
-}
-
-WINDOW * derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
-{
-WINDOW *win;
-int i;
-
- T(("derwin(%x, %d,%d,%d,%d) called", orig, num_lines, num_columns, begy, begx));
-
- /*
- ** make sure window fits inside the original one
- */
- if ( begy < 0 || begx < 0)
- return NULL;
- if ( begy + num_lines > orig->_maxy + 1
- || begx + num_columns > orig->_maxx + 1)
- return NULL;
-
- if (num_lines == 0)
- num_lines = orig->_maxy - orig->_begy - begy;
-
- if (num_columns == 0)
- num_columns = orig->_maxx - orig->_begx - begx;
-
- if ((win = makenew(num_lines, num_columns, orig->_begy + begy, orig->_begx + begx)) == NULL)
- return NULL;
-
- win->_pary = begy;
- win->_parx = begx;
- win->_attrs = orig->_attrs;
- win->_bkgd = orig->_bkgd;
-
- for (i = 0; i < num_lines; i++)
- win->_line[i] = &orig->_line[begy++][begx];
-
- win->_flags = _SUBWIN;
- win->_parent = orig;
-
- T(("derwin: returned window is %x", win));
-
- return(win);
-}
-
-
-WINDOW *subwin(WINDOW *w, int l, int c, int y, int x)
-{
- T(("subwin(%x, %d, %d, %d, %d) called", w, l, c, y, x));
- T(("parent has begy = %d, begx = %d", w->_begy, w->_begx));
-
- return derwin(w, l, c, y - w->_begy, x - w->_begx);
-}
-
-WINDOW *
-makenew(int num_lines, int num_columns, int begy, int begx)
-{
-int i;
-WINDOW *win;
-
- T(("makenew(%d,%d,%d,%d)", num_lines, num_columns, begy, begx));
-
- if ((win = (WINDOW *) malloc(sizeof(WINDOW))) == NULL)
- return NULL;
-
- if ((win->_line = (chtype **) calloc(num_lines, sizeof (chtype *))) == NULL) {
- free(win);
- return NULL;
- }
-
- if ((win->_firstchar = calloc(num_lines, sizeof(short))) == NULL) {
- free(win);
- free(win->_line);
- return NULL;
- }
-
- if ((win->_lastchar = calloc(num_lines, sizeof(short))) == NULL) {
- free(win);
- free(win->_line);
- free(win->_firstchar);
- return NULL;
- }
-
- win->_curx = 0;
- win->_cury = 0;
- win->_maxy = num_lines - 1;
- win->_maxx = num_columns - 1;
- win->_begy = begy;
- win->_begx = begx;
-
- win->_flags = 0;
- win->_attrs = A_NORMAL;
- win->_bkgd = BLANK;
-
- win->_clear = (num_lines == lines && num_columns == columns);
- win->_idlok = FALSE;
- win->_use_idc = TRUE;
- win->_scroll = FALSE;
- win->_leave = FALSE;
- win->_use_keypad = FALSE;
-#ifdef TERMIOS
- win->_use_meta = ((cur_term->Ottyb.c_cflag & CSIZE) == CS8 &&
- !(cur_term->Ottyb.c_iflag & ISTRIP));
-#else
- win->_use_meta = FALSE;
-#endif
- win->_delay = -1;
- win->_immed = FALSE;
- win->_sync = 0;
- win->_parx = 0;
- win->_pary = 0;
- win->_parent = (WINDOW *)NULL;
-
- win->_regtop = 0;
- win->_regbottom = num_lines - 1;
-
- for (i = 0; i < num_lines; i++)
- win->_firstchar[i] = win->_lastchar[i] = _NOCHANGE;
-
- if (begx + num_columns == columns) {
- win->_flags |= _ENDLINE;
-
- if (begx == 0 && num_lines == lines && begy == 0)
- win->_flags |= _FULLWIN;
-
- if (begy + num_lines == lines)
- win->_flags |= _SCROLLWIN;
- }
-
- return(win);
-}
diff --git a/lib/libncurses/lib_options.c b/lib/libncurses/lib_options.c
deleted file mode 100644
index 7aefe96..0000000
--- a/lib/libncurses/lib_options.c
+++ /dev/null
@@ -1,252 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_options.c
-**
-** The routines to handle option setting.
-**
-*/
-
-#include <stdlib.h>
-#include "terminfo.h"
-#include "curses.priv.h"
-
-int idlok(WINDOW *win, int flag)
-{
- T(("idlok(%x,%d) called", win, flag));
-
- if (flag == FALSE) {
- win->_idlok = FALSE;
- return OK;
- }
-
- if ((insert_line || parm_insert_line) && (delete_line || parm_delete_line)) {
- win->_idlok = TRUE;
- }
- return OK;
-}
-
-
-int clearok(WINDOW *win, int flag)
-{
- T(("clearok(%x,%d) called", win, flag));
-
- if (win == curscr)
- newscr->_clear = flag;
- else
- win->_clear = flag;
- return OK;
-}
-
-
-int leaveok(WINDOW *win, int flag)
-{
- T(("leaveok(%x,%d) called", win, flag));
-
- win->_leave = flag;
- if (flag == TRUE)
- curs_set(0);
- else
- curs_set(1);
- return OK;
-}
-
-
-int scrollok(WINDOW *win, int flag)
-{
- T(("scrollok(%x,%d) called", win, flag));
-
- win->_scroll = flag;
- return OK;
-}
-
-int halfdelay(int t)
-{
- T(("halfdelay(%d) called", t));
-
- if (t < 1 || t > 255)
- return ERR;
-
- cbreak();
- SP->_cbreak = t+1;
- return OK;
-}
-
-int nodelay(WINDOW *win, int flag)
-{
- T(("nodelay(%x,%d) called", win, flag));
-
- if (flag == TRUE)
- win->_delay = 0;
- else win->_delay = -1;
- return OK;
-}
-
-int notimeout(WINDOW *win, bool f)
-{
- T(("notimout(%x,%d) called", win, f));
-
- win->_notimeout = f;
- return OK;
-}
-
-int wtimeout(WINDOW *win, int delay)
-{
- T(("wtimeout(%x,%d) called", win, delay));
-
- win->_delay = delay;
- return OK;
-}
-
-static void init_keytry();
-static void add_to_try(char *, short);
-
-int keypad(WINDOW *win, int flag)
-{
- T(("keypad(%x,%d) called", win, flag));
-
- win->_use_keypad = flag;
-
- if (flag && keypad_xmit)
- putp(keypad_xmit);
- else if (! flag && keypad_local)
- putp(keypad_local);
-
- if (SP->_keytry == UNINITIALISED)
- init_keytry();
- return OK;
-}
-
-
-
-int meta(WINDOW *win, int flag)
-{
- T(("meta(%x,%d) called", win, flag));
-
- win->_use_meta = flag;
-
- if (flag && meta_on)
- putp(meta_on);
- else if (! flag && meta_off)
- putp(meta_off);
- return OK;
-}
-
-/*
-** init_keytry()
-**
-** Construct the try for the current terminal's keypad keys.
-**
-*/
-
-
-static struct try *newtry;
-
-static void init_keytry()
-{
- newtry = NULL;
-
-#include "keys.tries"
-
- SP->_keytry = newtry;
-}
-
-
-static void add_to_try(char *str, short code)
-{
-static bool out_of_memory = FALSE;
-struct try *ptr, *savedptr;
-
- if (! str || out_of_memory)
- return;
-
- if (newtry != NULL) {
- ptr = savedptr = newtry;
-
- for (;;) {
- while (ptr->ch != (unsigned char) *str
- && ptr->sibling != NULL)
- ptr = ptr->sibling;
-
- if (ptr->ch == (unsigned char) *str) {
- if (*(++str)) {
- if (ptr->child != NULL)
- ptr = ptr->child;
- else
- break;
- } else {
- ptr->value = code;
- return;
- }
- } else {
- if ((ptr->sibling = (struct try *) malloc(sizeof *ptr)) == NULL) {
- out_of_memory = TRUE;
- return;
- }
-
- savedptr = ptr = ptr->sibling;
- ptr->child = ptr->sibling = NULL;
- ptr->ch = *str++;
- ptr->value = (short) NULL;
-
- break;
- }
- } /* end for (;;) */
- } else { /* newtry == NULL :: First sequence to be added */
- savedptr = ptr = newtry = (struct try *) malloc(sizeof *ptr);
-
- if (ptr == NULL) {
- out_of_memory = TRUE;
- return;
- }
-
- ptr->child = ptr->sibling = NULL;
- ptr->ch = *(str++);
- ptr->value = (short) NULL;
- }
-
- /* at this point, we are adding to the try. ptr->child == NULL */
-
- while (*str) {
- ptr->child = (struct try *) malloc(sizeof *ptr);
-
- ptr = ptr->child;
-
- if (ptr == NULL) {
- out_of_memory = TRUE;
-
- ptr = savedptr;
- while (ptr != NULL) {
- savedptr = ptr->child;
- free(ptr);
- ptr = savedptr;
- }
-
- return;
- }
-
- ptr->child = ptr->sibling = NULL;
- ptr->ch = *(str++);
- ptr->value = (short) NULL;
- }
-
- ptr->value = code;
- return;
-}
-
-int typeahead(int fd)
-{
-
- T(("typeahead(%d) called", fd));
- SP->_checkfd = fd;
- return OK;
-}
-
-int intrflush(WINDOW *win, bool flag)
-{
- T(("intrflush(%x, %d) called", win, flag));
- return OK;
-}
diff --git a/lib/libncurses/lib_overlay.c b/lib/libncurses/lib_overlay.c
deleted file mode 100644
index 19e58f3..0000000
--- a/lib/libncurses/lib_overlay.c
+++ /dev/null
@@ -1,110 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_overlay.c
-**
-** The routines overlay(), copywin(), and overwrite().
-**
-*/
-
-#include "curses.priv.h"
-
-static void overlap(WINDOW *s, WINDOW *d, int flag)
-{
-int sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol;
-
- T(("overlap : sby %d, sbx %d, smy %d, smx %d, dby %d, dbx %d, dmy %d, dmx %d",
- s->_begy, s->_begx, s->_maxy, s->_maxx,
- d->_begy, d->_begx, d->_maxy, d->_maxx));
- sminrow = max(s->_begy, d->_begy) - s->_begy;
- smincol = max(s->_begx, d->_begx) - s->_begx;
- dminrow = max(s->_begy, d->_begy) - d->_begy;
- dmincol = max(s->_begx, d->_begx) - d->_begx;
- dmaxrow = min(s->_maxy+s->_begy, d->_maxy+d->_begy) - d->_begy;
- dmaxcol = min(s->_maxx+s->_begx, d->_maxx+d->_begx) - d->_begx;
-
- copywin(s, d, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, flag);
-}
-
-/*
-**
-** overlay(win1, win2)
-**
-**
-** overlay() writes the overlapping area of win1 behind win2
-** on win2 non-destructively.
-**
-**/
-
-int overlay(WINDOW *win1, WINDOW *win2)
-{
- overlap(win1, win2, TRUE);
- return OK;
-}
-
-/*
-**
-** overwrite(win1, win2)
-**
-**
-** overwrite() writes the overlapping area of win1 behind win2
-** on win2 destructively.
-**
-**/
-
-int overwrite(WINDOW *win1, WINDOW *win2)
-{
- overlap(win1, win2, FALSE);
- return OK;
-}
-
-int copywin(WINDOW *src, WINDOW *dst,
- int sminrow, int smincol,
- int dminrow, int dmincol, int dmaxrow, int dmaxcol,
- int over)
-{
-int sx, sy, dx, dy;
-
- T(("copywin(%x, %x, %d, %d, %d, %d, %d, %d, %d)",
- src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over));
-
- /* make sure rectangle exists in source */
- if ((sminrow + dmaxrow - dminrow) > (src->_maxy + 1) ||
- (smincol + dmaxcol - dmincol) > (src->_maxx + 1)) {
- return ERR;
- }
-
- T(("rectangle exists in source"));
-
- /* make sure rectangle fits in destination */
- if (dmaxrow > dst->_maxy || dmaxcol > dst->_maxx) {
- return ERR;
- }
-
- T(("rectangle fits in destination"));
-
- for (dy = dminrow, sy = sminrow; dy <= dmaxrow; sy++, dy++) {
- dst->_firstchar[dy] = dmincol;
- dst->_lastchar[dy] = dmincol;
- for (dx = dmincol, sx = smincol; dx <= dmaxcol; sx++, dx++) {
- if (over == TRUE ) {
- if (((src->_line[sy][sx] & A_CHARTEXT) != ' ') && (dst->_line[dy][dx] != src->_line[sy][sx])) {
- dst->_line[dy][dx] = src->_line[sy][sx];
- dst->_lastchar[dy] = dx;
- } else
- dst->_firstchar[dy]++;
- } else {
- if (dst->_line[dy][dx] != src->_line[sy][sx]) {
- dst->_line[dy][dx] = src->_line[sy][sx];
- dst->_lastchar[dy] = dx;
- } else
- dst->_firstchar[dy]++;
- }
- }
- }
- T(("finished copywin"));
- return OK;
-}
diff --git a/lib/libncurses/lib_pad.c b/lib/libncurses/lib_pad.c
deleted file mode 100644
index 5b4aa99..0000000
--- a/lib/libncurses/lib_pad.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
- * lib_pad.c
- * newpad -- create a new pad
- * pnoutrefresh -- refresh a pad, no update
- * pechochar -- add a char to a pad and refresh
- */
-
-#include <stdlib.h>
-#include "curses.priv.h"
-
-WINDOW *newpad(int l, int c)
-{
-WINDOW *win;
-chtype *ptr;
-int i, j;
-
- T(("newpad(%d, %d) called", l, c));
-
- if (l <= 0 || c <= 0)
- return NULL;
-
- if ((win = makenew(l,c,0,0)) == NULL)
- return NULL;
-
- win->_flags |= _ISPAD;
-
- for (i = 0; i < l; i++) {
- if ((win->_line[i] = (chtype *) calloc(c, sizeof(chtype))) == NULL) {
- for (j = 0; j < i; j++)
- free(win->_line[j]);
-
- free(win->_firstchar);
- free(win->_lastchar);
- free(win->_line);
- free(win);
-
- return NULL;
- }
- else
- for (ptr = win->_line[i]; ptr < win->_line[i] + c; )
- *ptr++ = ' ';
- }
-
- T(("newpad: returned window is %x", win));
-
- return(win);
-}
-
-int prefresh(WINDOW *win, int pminrow, int pmincol,
- int sminrow, int smincol, int smaxrow, int smaxcol)
-{
- T(("prefresh() called"));
- if (pnoutrefresh(win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol) != ERR)
- return (doupdate());
- else
- return ERR;
-
-}
-
-int pnoutrefresh(WINDOW *win, int pminrow, int pmincol,
- int sminrow, int smincol, int smaxrow, int smaxcol)
-{
-int i, j;
-int m, n;
-
- T(("pnoutrefresh(%x, %d, %d, %d, %d, %d, %d) called",
- win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol));
-
- if (!(win->_flags & _ISPAD))
- return ERR;
-
- T(("one"));
- if (pminrow < 0) pminrow = 0;
- if (pmincol < 0) pmincol = 0;
- if (sminrow < 0) sminrow = 0;
- if (smincol < 0) smincol = 0;
-
- T(("two"));
- if (smaxrow >= LINES || smaxcol >= COLS)
- return ERR;
-
- T(("three"));
- if ((pminrow + smaxrow - sminrow > win->_maxy) ||
- (pmincol + smaxcol - smincol > win->_maxx))
- return ERR;
-
- T(("pad being refreshed"));
-
- for (i = pminrow, m = sminrow; i <= pminrow + smaxrow-sminrow;
- i++, m++) {
- for (j = pmincol, n = smincol; j <= pmincol + smaxcol-smincol;
- j++, n++) {
- if (win->_line[i][j] != newscr->_line[m][n]) {
- newscr->_line[m][n] = win->_line[i][j];
-
- if (newscr->_firstchar[m] == _NOCHANGE)
- newscr->_firstchar[m] = newscr->_lastchar[m] = n;
- else if (n < newscr->_firstchar[m])
- newscr->_firstchar[m] = n;
- else if (n > newscr->_lastchar[m])
- newscr->_lastchar[m] = n;
- }
- }
- }
-
- win->_firstchar[i] = win->_lastchar[i] = _NOCHANGE;
-
- win->_begx = smincol;
- win->_begy = sminrow;
-
- if (win->_clear) {
- win->_clear = FALSE;
- newscr->_clear = TRUE;
- }
-
- if (! win->_leave) {
- newscr->_cury = win->_cury + win->_begy;
- newscr->_curx = win->_curx + win->_begx;
- }
- return OK;
-}
-
-int pechochar(WINDOW *pad, chtype ch)
-{
-int x, y;
-
- T(("echochar(%x, %x)", pad, ch));
-
- if (pad->_flags & _ISPAD)
- return ERR;
-
- x = pad->_begx + pad->_curx;
- y = pad->_begy + pad->_cury;
-
- waddch(curscr, ch);
- doupdate();
- return OK;
-}
-
diff --git a/lib/libncurses/lib_printw.c b/lib/libncurses/lib_printw.c
deleted file mode 100644
index 236c29a..0000000
--- a/lib/libncurses/lib_printw.c
+++ /dev/null
@@ -1,75 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_printw.c
-**
-** The routines printw(), wprintw() and friends.
-**
-*/
-
-#include "curses.priv.h"
-
-int printw(char *fmt, ...)
-{
-va_list argp;
-char buf[BUFSIZ];
-
- T(("printw(\"%s\",...) called", fmt));
-
- va_start(argp, fmt);
- vsprintf(buf, fmt, argp);
- va_end(argp);
- return(waddstr(stdscr, buf));
-}
-
-
-
-int wprintw(WINDOW *win, char *fmt, ...)
-{
-va_list argp;
-char buf[BUFSIZ];
-
- T(("wprintw(%x,\"%s\",...) called", win, fmt));
-
- va_start(argp, fmt);
- vsprintf(buf, fmt, argp);
- va_end(argp);
- return(waddstr(win, buf));
-}
-
-
-
-int mvprintw(int y, int x, char *fmt, ...)
-{
-va_list argp;
-char buf[BUFSIZ];
-
- va_start(argp, fmt);
- vsprintf(buf, fmt, argp);
- va_end(argp);
- return(move(y, x) == OK ? waddstr(stdscr, buf) : ERR);
-}
-
-
-
-int mvwprintw(WINDOW *win, int y, int x, char *fmt, ...)
-{
-va_list argp;
-char buf[BUFSIZ];
-
- va_start(argp, fmt);
- vsprintf(buf, fmt, argp);
- va_end(argp);
- return(wmove(win, y, x) == OK ? waddstr(win, buf) : ERR);
-}
-
-int vwprintw(WINDOW *win, char *fmt, va_list argp)
-{
-char buf[BUFSIZ];
-
- vsprintf(buf, fmt, argp);
- return(waddstr(win, buf));
-}
diff --git a/lib/libncurses/lib_raw.c b/lib/libncurses/lib_raw.c
deleted file mode 100644
index fac726e..0000000
--- a/lib/libncurses/lib_raw.c
+++ /dev/null
@@ -1,201 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
- * raw.c
- *
- * Routines:
- * raw()
- * echo()
- * nl()
- * cbreak()
- * noraw()
- * noecho()
- * nonl()
- * nocbreak()
- *
- */
-
-#include "curses.priv.h"
-#include "terminfo.h"
-
-#ifdef TERMIOS
-static tcflag_t iexten = 0;
-#endif
-
-int raw()
-{
- T(("raw() called"));
-
- SP->_raw = TRUE;
- SP->_cbreak = TRUE;
- SP->_nlmapping = TRUE;
-
-#ifdef TERMIOS
- if(iexten == 0)
- iexten = cur_term->Nttyb.c_lflag & IEXTEN;
- cur_term->Nttyb.c_lflag &= ~(ICANON|ISIG|iexten);
- cur_term->Nttyb.c_iflag &= ~(INPCK|ISTRIP|IXON);
- cur_term->Nttyb.c_oflag &= ~(OPOST);
- cur_term->Nttyb.c_cc[VMIN] = 1;
- cur_term->Nttyb.c_cc[VTIME] = 0;
- if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1)
- return ERR;
- else
- return OK;
-#else
- cur_term->Nttyb.sg_flags |= RAW;
- stty(cur_term->Filedes, &cur_term->Nttyb);
- return OK;
-#endif
-}
-
-int cbreak()
-{
- T(("cbreak() called"));
-
- SP->_cbreak = 1;
-
-#ifdef TERMIOS
- cur_term->Nttyb.c_lflag &= ~ICANON;
- cur_term->Nttyb.c_lflag |= ISIG;
- cur_term->Nttyb.c_cc[VMIN] = 1;
- cur_term->Nttyb.c_cc[VTIME] = 0;
- if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1)
- return ERR;
- else
- return OK;
-#else
- cur_term->Nttyb.sg_flags |= CBREAK;
- stty(cur_term->Filedes, &cur_term->Nttyb);
- return OK;
-#endif
-}
-
-int echo()
-{
- T(("echo() called"));
-
- SP->_echo = TRUE;
-
-#ifdef TERMIOS
- cur_term->Nttyb.c_lflag |= ECHO;
- if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1)
- return ERR;
- else
- return OK;
-#else
- cur_term->Nttyb.sg_flags |= ECHO;
- stty(cur_term->Filedes, &cur_term->Nttyb);
- return OK;
-#endif
-}
-
-
-int nl()
-{
- T(("nl() called"));
-
- SP->_nl = TRUE;
- SP->_nlmapping = ! SP->_raw;
-
-#ifdef TERMIOS
- cur_term->Nttyb.c_iflag |= IXON|ICRNL|IXOFF;
- cur_term->Nttyb.c_oflag |= OPOST|ONLCR;
- if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1)
- return ERR;
- else
- return OK;
-#else
- cur_term->Nttyb.sg_flags |= CRMOD;
- stty(cur_term->Filedes, &cur_term->Nttyb);
- return OK;
-#endif
-}
-
-
-int noraw()
-{
- T(("noraw() called"));
-
- SP->_raw = FALSE;
- SP->_cbreak = FALSE;
- SP->_nlmapping = SP->_nl;
-
-#ifdef TERMIOS
- cur_term->Nttyb.c_lflag |= ISIG|ICANON|iexten;
- cur_term->Nttyb.c_iflag |= IXON;
- cur_term->Nttyb.c_oflag |= OPOST;
- if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1)
- return ERR;
- else
- return OK;
-#else
- cur_term->Nttyb.sg_flags &= ~(RAW|CBREAK);
- stty(cur_term->Filedes, &cur_term->Nttyb);
- return OK;
-#endif
-
-}
-
-
-int nocbreak()
-{
- T(("nocbreak() called"));
-
- SP->_cbreak = 0;
-
-#ifdef TERMIOS
- cur_term->Nttyb.c_lflag |= ICANON;
- if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1)
- return ERR;
- else
- return OK;
-#else
- cur_term->Nttyb.sg_flags &= ~CBREAK;
- stty(cur_term->Filedes, &cur_term->Nttyb);
- return OK;
-#endif
-}
-
-int noecho()
-{
- T(("noecho() called"));
-
- SP->_echo = FALSE;
-
-#ifdef TERMIOS
- cur_term->Nttyb.c_lflag &= ~(ECHO);
- if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1)
- return ERR;
- else
- return OK;
-#else
- cur_term->Nttyb.sg_flags &= ~ECHO;
- stty(cur_term->Filedes, &cur_term->Nttyb);
- return OK;
-#endif
-}
-
-
-int nonl()
-{
- T(("nonl() called"));
-
- SP->_nl = SP->_nlmapping = FALSE;
-
-#ifdef TERMIOS
- cur_term->Nttyb.c_iflag &= ~ICRNL;
- cur_term->Nttyb.c_oflag &= ~ONLCR;
- if((tcsetattr(cur_term->Filedes, TCSANOW, &cur_term->Nttyb)) == -1)
- return ERR;
- else
- return OK;
-#else
- cur_term->Nttyb.sg_flags &= ~CRMOD;
- stty(cur_term->Filedes, &cur_term->Nttyb);
- return OK;
-#endif
-}
diff --git a/lib/libncurses/lib_refresh.c b/lib/libncurses/lib_refresh.c
deleted file mode 100644
index 9948025..0000000
--- a/lib/libncurses/lib_refresh.c
+++ /dev/null
@@ -1,91 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
- * lib_refresh.c
- *
- * The routines wredrawln(), wrefresh() and wnoutrefresh().
- *
- */
-
-#include "curses.priv.h"
-
-int wredrawln(WINDOW *win, int beg, int num)
-{
- T(("wredrawln(%x,%d,%d) called", win, beg, num));
- touchline(win, beg, num);
- wrefresh(win);
- return OK;
-}
-
-int wrefresh(WINDOW *win)
-{
- T(("wrefresh(%x) called", win));
-
- if (win == curscr)
- curscr->_clear = TRUE;
- else
- wnoutrefresh(win);
- return(doupdate());
-}
-
-int wnoutrefresh(WINDOW *win)
-{
-int i, j;
-int begx = win->_begx;
-int begy = win->_begy;
-int m, n;
-
- T(("wnoutrefresh(%x) called", win));
-
- /*
- * This function will break badly if we try to refresh a pad.
- */
- if ((win == 0)
- || (win->_flags & _ISPAD))
- return(ERR);
-
- /*
- * If 'newscr' has a different background than the window that we're
- * trying to refresh, we'll have to copy the whole thing.
- */
- if (win->_bkgd != newscr->_bkgd) {
- touchwin(win);
- newscr->_bkgd = win->_bkgd;
- }
- newscr->_attrs = win->_attrs;
-
- win->_flags &= ~_HASMOVED;
- for (i = 0, m = begy; i <= win->_maxy; i++, m++) {
- if (win->_firstchar[i] != _NOCHANGE) {
- j = win->_firstchar[i];
- n = j + begx;
- for (; j <= win->_lastchar[i]; j++, n++) {
- if (win->_line[i][j] != newscr->_line[m][n]) {
- newscr->_line[m][n] = win->_line[i][j];
-
- if (newscr->_firstchar[m] == _NOCHANGE)
- newscr->_firstchar[m] = newscr->_lastchar[m] = n;
- else if (n < newscr->_firstchar[m])
- newscr->_firstchar[m] = n;
- else if (n > newscr->_lastchar[m])
- newscr->_lastchar[m] = n;
- }
- }
- }
- win->_firstchar[i] = win->_lastchar[i] = _NOCHANGE;
- }
-
- if (win->_clear) {
- win->_clear = FALSE;
- newscr->_clear = TRUE;
- }
-
- if (! win->_leave) {
- newscr->_cury = win->_cury + win->_begy;
- newscr->_curx = win->_curx + win->_begx;
- }
- return(OK);
-}
diff --git a/lib/libncurses/lib_scanw.c b/lib/libncurses/lib_scanw.c
deleted file mode 100644
index 69b5a33..0000000
--- a/lib/libncurses/lib_scanw.c
+++ /dev/null
@@ -1,66 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_scanw.c
-**
-** The routines scanw(), wscanw() and friends.
-**
-*/
-
-#include <stdio.h>
-#include "curses.priv.h"
-
-int vwscanw(WINDOW *win, char *fmt, va_list argp)
-{
-char buf[BUFSIZ];
-
- if (wgetstr(win, buf) == ERR)
- return(ERR);
-
- return(vsscanf(buf, fmt, argp));
-}
-
-int scanw(char *fmt, ...)
-{
-va_list ap;
-
- T(("scanw(\"%s\",...) called", fmt));
-
- va_start(ap, fmt);
- return(vwscanw(stdscr, fmt, ap));
-}
-
-int wscanw(WINDOW *win, char *fmt, ...)
-{
-va_list ap;
-
- T(("wscanw(%x,\"%s\",...) called", win, fmt));
-
- va_start(ap, fmt);
- return(vwscanw(win, fmt, ap));
-}
-
-
-
-int mvscanw(int y, int x, char *fmt, ...)
-{
-va_list ap;
-
- va_start(ap, fmt);
- return(move(y, x) == OK ? vwscanw(stdscr, fmt, ap) : ERR);
-}
-
-
-
-int mvwscanw(WINDOW *win, int y, int x, char *fmt, ...)
-{
-va_list ap;
-
- va_start(ap, fmt);
- return(wmove(win, y, x) == OK ? vwscanw(win, fmt, ap) : ERR);
-}
-
-
diff --git a/lib/libncurses/lib_screen.c b/lib/libncurses/lib_screen.c
deleted file mode 100644
index 382411b..0000000
--- a/lib/libncurses/lib_screen.c
+++ /dev/null
@@ -1,58 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-#included "curses.priv.h"
-
-int putwin(WINDOW *win, char *file)
-{
-int fd, i;
-
- fd = open(file, O_WRONLY);
- if (fd < -1)
- return ERR;
- for (i = 0; i < lines; i++)
- write(fd, win->_line[i], sizeof(chtype)*columns);
- close(fd);
- return OK;
-}
-
-int scr_restore(char *file)
-{
-int fd, i;
-
- fd = open(file, O_RDONLY);
- if (fd < -1)
- return ERR;
- for (i = 0; i < lines; i++)
- read(fd, curscr->_line[i], sizeof(chtype)*columns);
- touchwin(curscr);
- close(fd);
- return OK;
-}
-
-int scr_dump(char *file)
-{
-
- putwin(curscr, file);
-}
-
-int scr_init(char *file)
-{
-
- return ERR;
-}
-
-int scr_set(char *file)
-{
-
- return ERR;
-}
-
-WINDOW *getwin(FILE *filep)
-{
-
- return NULL;
-}
-
diff --git a/lib/libncurses/lib_scroll.c b/lib/libncurses/lib_scroll.c
deleted file mode 100644
index 3a60836..0000000
--- a/lib/libncurses/lib_scroll.c
+++ /dev/null
@@ -1,218 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_scroll.c
-**
-** The routine wscrl(win, n).
-** positive n scroll the window up (ie. move lines down)
-** negative n scroll the window down (ie. move lines up)
-**
-*/
-
-#include <stdlib.h>
-#include "curses.priv.h"
-#include "terminfo.h"
-
-void _nc_soft_scroll_window(WINDOW *win, int const n, short const top, short const bottom, chtype blank)
-{
-int line, i;
-chtype *ptr, *temp;
-chtype **saved;
-
- saved = (chtype **)calloc(abs(n), sizeof(chtype *));
-
- if (n < 0) {
- /* save overwritten lines */
-
- for (i = 0; i < -n && bottom-i >= 0; i++)
- saved[i] = win->_line[bottom-i];
-
- /* shift n lines */
-
- for (line = bottom; line >= top-n && line >= 0; line--)
- win->_line[line] = win->_line[line+n];
-
- /* restore saved lines and blank them */
-
- for (i = 0, line = top; line < top-n && line <= win->_maxy; line++, i++) {
- if (saved[i])
- win->_line[line] = saved[i];
- temp = win->_line[line];
- for (ptr = temp; ptr - temp <= win->_maxx; ptr++)
- *ptr = blank;
- }
- } else {
- /* save overwritten lines */
-
- for (i = 0; i < n && top+i <= win->_maxy; i++)
- saved[i] = win->_line[top+i];
-
- /* shift n lines */
-
- for (line = top; line <= bottom-n && line+n <= win->_maxy; line++)
- win->_line[line] = win->_line[line+n];
-
- /* restore saved lines and blank them */
-
- for (i = 0, line = bottom; line > bottom - n && line >= 0; line--, i++) {
- if (saved[i])
- win->_line[line] = saved[i];
- temp = win->_line[line];
- for (ptr = temp; ptr - temp <= win->_maxx; ptr++)
- *ptr = blank;
- }
- }
- /* touchline(win, top, bottom-top+1); */ /* not yet */
- free(saved);
-}
-
-void _nc_scroll_window(WINDOW *win, int n, short const top, short const bottom, chtype blank)
-{
-int physical = FALSE;
-int i;
-
- if (n > lines)
- n = lines;
- else if (-n > lines)
- n = -lines;
-
- /* as an optimization, if the scrolling region is the entire screen
- scroll the physical screen */
-
- if ( top != bottom
- && win->_begx == 0 && win->_maxx == columns - 1
- && !memory_above && !memory_below
- && ((((win->_begy+top == 0 && win->_begy+bottom == lines - 1)
- || change_scroll_region)
- && ( (n < 0 && (parm_rindex || scroll_reverse))
- || (n > 0 && (parm_index || scroll_forward))
- )
- ) || (win->_idlok && (parm_insert_line || insert_line)
- && (parm_delete_line || delete_line)
- )
- )
- )
- physical = TRUE;
-
- if (physical == TRUE) {
- wrefresh(win);
- _nc_soft_scroll_window(curscr, n, win->_begy+top, win->_begy+bottom, blank);
- _nc_soft_scroll_window(newscr, n, win->_begy+top, win->_begy+bottom, blank);
- }
- _nc_soft_scroll_window(win, n, top, bottom, blank);
-
- if (physical == TRUE) {
- if (n < 0) {
- if ( (( win->_begy+top == 0
- && win->_begy+bottom == lines - 1)
- || change_scroll_region)
- && (parm_rindex || scroll_reverse)
- ) {
- if (change_scroll_region &&
- (win->_begy+top != 0 || win->_begy+bottom != lines - 1)
- )
- putp(tparm(change_scroll_region, win->_begy+top, win->_begy+bottom));
- i = abs(n);
- mvcur(-1, -1, win->_begy+top, 0);
- if (parm_rindex) {
- putp(tparm(parm_rindex, i));
- } else if (scroll_reverse) {
- while (i--)
- putp(scroll_reverse);
- }
- if (change_scroll_region &&
- (win->_begy+top != 0 || win->_begy+bottom != lines - 1)
- )
- putp(tparm(change_scroll_region, 0, lines-1));
- } else {
- i = abs(n);
- if (win->_begy+bottom < lines - 1) {
- mvcur(-1, -1, win->_begy+bottom, 0);
- if (parm_delete_line) {
- putp(tparm(parm_delete_line, i));
- } else if (delete_line) {
- while (i--)
- putp(delete_line);
- i = abs(n);
- }
- }
- mvcur(-1, -1, win->_begy+top, 0);
- if (parm_insert_line) {
- putp(tparm(parm_insert_line, i));
- } else if (insert_line) {
- while (i--)
- putp(insert_line);
- }
- }
- } else {
- if ( (( win->_begy+top == 0
- && win->_begy+bottom == lines - 1)
- || change_scroll_region)
- && (parm_index || scroll_forward)
- ) {
- if (change_scroll_region &&
- (win->_begy+top != 0 || win->_begy+bottom != lines - 1)
- )
- putp(tparm(change_scroll_region, win->_begy+top, win->_begy+bottom));
- mvcur(-1, -1, win->_begy+bottom, 0);
- if (parm_index) {
- putp(tparm(parm_index, n));
- } else if (scroll_forward) {
- i = n;
- while (i--)
- putp(scroll_forward);
- }
- if (change_scroll_region &&
- (win->_begy+top != 0 || win->_begy+bottom != lines - 1)
- )
- putp(tparm(change_scroll_region, 0, lines-1));
- } else {
- mvcur(-1, -1, win->_begy+top, 0);
- if (parm_delete_line) {
- putp(tparm(parm_delete_line, n));
- } else if (delete_line) {
- i = n;
- while (i--)
- putp(delete_line);
- }
- if (win->_begy+bottom < lines - 1) {
- mvcur(win->_begy+top, 0, win->_begy+bottom, 0);
- if (parm_insert_line) {
- putp(tparm(parm_insert_line, n));
- } else if (insert_line) {
- i = n;
- while (i--)
- putp(insert_line);
- }
- }
- }
- }
-
- mvcur(-1, -1, win->_begy+win->_cury, win->_begx+win->_curx);
- } else
- touchline(win, top, bottom - top + 1);
-}
-
-
-int
-wscrl(WINDOW *win, int n)
-{
- T(("wscrl(%x,%d) called", win, n));
-
- if (!win || !win->_scroll)
- return ERR;
-
- if (n == 0)
- return OK;
-
- if ((n > (win->_regbottom - win->_regtop)) ||
- (-n > (win->_regbottom - win->_regtop)))
- return ERR;
-
- _nc_scroll_window(win, n, win->_regtop, win->_regbottom, _nc_background(win));
-
- return OK;
-}
diff --git a/lib/libncurses/lib_scrreg.c b/lib/libncurses/lib_scrreg.c
deleted file mode 100644
index 31bab4f..0000000
--- a/lib/libncurses/lib_scrreg.c
+++ /dev/null
@@ -1,32 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_scrreg.c
-**
-** The routine wsetscrreg().
-**
-*/
-
-#include "curses.priv.h"
-#include "terminfo.h"
-
-int wsetscrreg(WINDOW *win, int top, int bottom)
-{
- T(("wsetscrreg(%x,%d,%d) called", win, top, bottom));
-
- if (top >= 0 && top <= win->_maxy &&
- bottom >= 0 && bottom <= win->_maxy &&
- bottom > top)
- {
- win->_regtop = top;
- win->_regbottom = bottom;
-
- T(("correctly set scrolling region between %d and %d", top, bottom));
-
- return(OK);
- } else
- return(ERR);
-}
diff --git a/lib/libncurses/lib_set_term.c b/lib/libncurses/lib_set_term.c
deleted file mode 100644
index bc73ca3..0000000
--- a/lib/libncurses/lib_set_term.c
+++ /dev/null
@@ -1,33 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_set_term.c
-**
-** The routine set_term().
-**
-*/
-
-#include "curses.priv.h"
-#include "terminfo.h"
-
-struct screen *
-set_term(screen)
-struct screen *screen;
-{
-struct screen *oldSP;
-
- T(("set_term(%o) called", screen));
-
- oldSP = SP;
- SP = screen;
-
- cur_term = SP->_term;
- curscr = SP->_curscr;
- newscr = SP->_newscr;
- stdscr = SP->_stdscr;
-
- return(oldSP);
-}
diff --git a/lib/libncurses/lib_slk.c b/lib/libncurses/lib_slk.c
deleted file mode 100644
index 8be6ac0..0000000
--- a/lib/libncurses/lib_slk.c
+++ /dev/null
@@ -1,255 +0,0 @@
-
-/*
- * lib_slk.c
- * Soft key routines.
- *
- * Copyright (C) Gerhard Fuernkranz 1993
- * Permisson is granted to redistribute this
- * code under the terms of the GNU Copyleft.
- */
-
-#include "terminfo.h"
-#include "curses.priv.h"
-#include <string.h>
-#include <stdlib.h>
-
-int _slk_format; /* format specified in slk_init() */
-
-#define MAXCOLUMNS 135
-#define MAXLINES 66
-#define UNINITIALISED ((struct try * ) -1)
-/*
- * Retrieve label text.
- */
-
-char *
-slk_label(int n)
-{
-SLK *slk = SP->_slk;
-
- T(("slk_label(%d)", n));
-
- if (slk == NULL || n < 1 || n > 8)
- return NULL;
- return slk->ent[n-1].text;
-}
-
-/*
- * Write the soft lables to the slk window.
- */
-
-static void
-slk_intern_refresh(SLK *slk)
-{
-int i;
- T(("slk_intern_refresh(%x)", slk));
-
- for (i = 0; i < 8; i++) {
- if (slk->dirty || slk->ent[i].dirty) {
- if (slk->ent[i].visible) {
- wmove(slk->win,0,slk->ent[i].x);
- wattrset(slk->win,A_REVERSE);
- waddstr(slk->win,slk->ent[i].form_text);
- wattrset(slk->win,A_NORMAL);
- }
- slk->ent[i].dirty = FALSE;
- }
- }
- slk->dirty = FALSE;
-}
-
-/*
- * Refresh the soft label window.
- */
-
-int
-slk_noutrefresh(void)
-{
-SLK *slk = SP->_slk;
-
- T(("slk_noutrefresh()"));
-
- if (slk == NULL)
- return ERR;
- if (slk->hidden)
- return OK;
- slk_intern_refresh(slk);
- return wnoutrefresh(slk->win);
-}
-
-/*
- * Refresh the soft label window.
- */
-
-int
-slk_refresh(void)
-{
-SLK *slk = SP->_slk;
-
- T(("slk_refresh()"));
-
- if (slk == NULL)
- return ERR;
- if (slk->hidden)
- return OK;
- slk_intern_refresh(slk);
- return wrefresh(slk->win);
-}
-
-/*
- * Restore the soft labels on the screen.
- */
-
-int
-slk_restore(void)
-{
-SLK *slk = SP->_slk;
-
- T(("slk_restore()"));
-
- if (slk == NULL)
- return ERR;
- slk->hidden = FALSE;
- slk->dirty = TRUE;
- return slk_refresh();
-}
-
-/*
- * Set soft label text.
- */
-
-int
-slk_set(int i, char *str, int format)
-{
-SLK *slk = SP->_slk;
-int len;
- T(("slk_set(%d, \"%s\", %d)", i, str, format));
-
- if (slk == NULL || i < 1 || i > 8 || format < 0 || format > 2)
- return ERR;
- if (str == NULL)
- str = "";
- i--;
- strncpy(slk->ent[i].text,str,8);
- memset(slk->ent[i].form_text,' ',8);
- slk->ent[i].text[8] = 0;
- slk->ent[i].form_text[8] = 0;
- len = strlen(slk->ent[i].text);
- switch(format) {
- case 0: /* left */
- memcpy(slk->ent[i].form_text,slk->ent[i].text,len);
- break;
- case 1: /* center */
- memcpy(slk->ent[i].form_text+(8-len)/2,slk->ent[i].text,len);
- break;
- case 2: /* right */
- memcpy(slk->ent[i].form_text+8-len,slk->ent[i].text,len);
- break;
- }
- slk->ent[i].dirty = TRUE;
- return OK;
-}
-
-/*
- * Pretend, that soft keys have been changed.
- */
-
-int
-slk_touch(void)
-{
-SLK *slk = SP->_slk;
- T(("slk_touch()"));
-
- if (slk == NULL)
- return ERR;
- slk->dirty = TRUE;
- return OK;
-}
-
-/*
- * Remove soft labels from the screen.
- */
-
-int
-slk_clear(void)
-{
-SLK *slk = SP->_slk;
-
- T(("slk_clear()"));
-
- if (slk == NULL)
- return ERR;
- slk->hidden = TRUE;
- /* For simulated SLK's it's looks much more natural to
- inherit those attributes from the standard screen */
- slk->win->_bkgd = stdscr->_bkgd;
- slk->win->_attrs = stdscr->_attrs;
- werase(slk->win);
- return wrefresh(slk->win);
-}
-
-/*
- * Initialize soft labels.
- * Called from newterm()
- */
-
-static int
-slk_initialize(WINDOW *stwin, int cols)
-{
-SLK *slk;
-int i, maxlab, x;
-
- T(("slk_initialize()"));
-
- if ((SP->_slk = slk = (SLK*) calloc(1,sizeof(SLK))) == NULL)
- return OK;
- maxlab = (cols+1)/9;
- for (i = 0; i < 8; i++) {
- memset(slk->ent[i].form_text,' ',8);
- slk->ent[i].visible = i < maxlab;
- }
- if (_slk_format == 1) { /* 4-4 */
- int gap = cols - 64 - 6;
- if (gap < 1)
- gap = 1;
- for (i = x = 0; i < 8; i++) {
- slk->ent[i].x = x;
- x += 8;
- x += (i == 3) ? gap : 1;
- }
- }
- else { /* 0 -> 3-2-3 */
- int gap = (cols - 64 - 5) / 2;
- if (gap < 1)
- gap = 1;
- for (i = x = 0; i < 8; i++) {
- slk->ent[i].x = x;
- x += 8;
- x += (i == 2 || i == 4) ? gap : 1;
- }
- }
- slk->dirty = TRUE;
- if ((slk->win = stwin) == NULL)
- {
- free(slk);
- return ERR;
- }
-
- return OK;
-}
-
-/*
- * Initialize soft labels.
- * Called by the user.
- */
-
-int
-slk_init(int format)
-{
- if (format < 0 || format > 1)
- return ERR;
- _slk_format = format;
- ripoffline(-1, slk_initialize);
- return OK;
-}
-
diff --git a/lib/libncurses/lib_touch.c b/lib/libncurses/lib_touch.c
deleted file mode 100644
index 4d291b3..0000000
--- a/lib/libncurses/lib_touch.c
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_touch.c
-**
-** The routines untouchwin(),
-** wtouchln(),
-** is_linetouched()
-** is_wintouched().
-**
-*/
-
-#include "curses.priv.h"
-
-int is_linetouched(WINDOW *win, int line)
-{
- if (line > win->_maxy || line < 0)
- return ERR;
- if (win->_firstchar[line] != _NOCHANGE) return TRUE;
- return FALSE;
-}
-
-int is_wintouched(WINDOW *win)
-{
-int i;
-
- for (i = 0; i <= win->_maxy; i++)
- if (win->_firstchar[i] != _NOCHANGE)
- return TRUE;
- return FALSE;
-}
-
-int wtouchln(WINDOW *win, int y, int n, int changed)
-{
-int i;
-
- T(("wtouchln(%x,%d,%d,%d)", win, y, n, changed));
-
- for (i = y; i < y+n; i++) {
- win->_firstchar[i] = changed ? 0 : _NOCHANGE;
- win->_lastchar[i] = changed ? win->_maxx : _NOCHANGE;
- }
- return OK;
-}
-
diff --git a/lib/libncurses/lib_trace.c b/lib/libncurses/lib_trace.c
deleted file mode 100644
index 3a66467..0000000
--- a/lib/libncurses/lib_trace.c
+++ /dev/null
@@ -1,179 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
- * lib_trace.c - Tracing/Debugging routines
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <errno.h>
-#include "curses.priv.h"
-#include "terminfo.h"
-
-#if defined(BRAINDEAD)
-extern int errno;
-#endif
-
-int _tracing = 0;
-
-static int tracefd;
-
-void _tracef(char *fmt, ...);
-
-void _init_trace()
-{
-static int been_here = 0;
-
- if (! been_here) {
- been_here = 1;
-
- if ((tracefd = creat("trace", 0644)) < 0) {
- write(2, "curses: Can't open 'trace' file: ", 33);
- write(2, strerror(errno), strlen(strerror(errno)));
- write(2, "\n", 1);
- exit(1);
- }
- _tracef("TRACING NCURSES version %s", NCURSES_VERSION);
- }
-}
-
-
-void trace(const unsigned int tracelevel)
-{
- _tracing = tracelevel;
-}
-
-
-char *_traceattr(int newmode)
-{
-static char buf[BUFSIZ];
-struct {unsigned int val; char *name;}
-names[] =
- {
- {A_STANDOUT, "A_STANDOUT, ",},
- {A_UNDERLINE, "A_UNDERLINE, ",},
- {A_REVERSE, "A_REVERSE, ",},
- {A_BLINK, "A_BLINK, ",},
- {A_DIM, "A_DIM, ",},
- {A_BOLD, "A_BOLD, ",},
- {A_ALTCHARSET, "A_ALTCHARSET, ",},
- {A_INVIS, "A_INVIS, ",},
- {A_PROTECT, "A_PROTECT, ",},
- {A_CHARTEXT, "A_CHARTEXT, ",},
- {A_NORMAL, "A_NORMAL, ",},
- },
-colors[] =
- {
- {COLOR_BLACK, "COLOR_BLACK",},
- {COLOR_RED, "COLOR_RED",},
- {COLOR_GREEN, "COLOR_GREEN",},
- {COLOR_YELLOW, "COLOR_YELLOW",},
- {COLOR_BLUE, "COLOR_BLUE",},
- {COLOR_MAGENTA, "COLOR_MAGENTA",},
- {COLOR_CYAN, "COLOR_CYAN",},
- {COLOR_WHITE, "COLOR_WHITE",},
- },
- *sp;
-
- strcpy(buf, "{");
- for (sp = names; sp->val; sp++)
- if (newmode & sp->val)
- strcat(buf, sp->name);
- if (newmode & A_COLOR)
- {
- int pairnum = PAIR_NUMBER(newmode);
-
- (void) sprintf(buf + strlen(buf),
- "COLOR_PAIR(%d) = (%s, %s), ",
- pairnum,
- colors[FG(color_pairs[pairnum])].name,
- colors[BG(color_pairs[pairnum])].name
- );
- }
- if ((newmode & A_ATTRIBUTES) == 0)
- strcat(buf,"A_NORMAL, ");
- if (buf[strlen(buf) - 2] == ',')
- buf[strlen(buf) - 2] = '\0';
- return(strcat(buf,"}"));
-}
-
-char *visbuf(const char *buf)
-/* visibilize a given string */
-{
- static char vbuf[BUFSIZ];
- char *tp = vbuf;
-
- while (*buf)
- {
- if (isprint(*buf) || *buf == ' ')
- *tp++ = *buf++;
- else if (*buf == '\n')
- {
- *tp++ = '\\'; *tp++ = 'n';
- buf++;
- }
- else if (*buf == '\r')
- {
- *tp++ = '\\'; *tp++ = 'r';
- buf++;
- }
- else if (*buf == '\b')
- {
- *tp++ = '\\'; *tp++ = 'b';
- buf++;
- }
- else if (*buf == '\033')
- {
- *tp++ = '\\'; *tp++ = 'e';
- buf++;
- }
- else if (*buf < ' ')
- {
- *tp++ = '\\'; *tp++ = '^'; *tp++ = '@' + *buf;
- buf++;
- }
- else
- {
- (void) sprintf(tp, "\\0x%02x", *buf++);
- tp += strlen(tp);
- }
- }
- *tp++ = '\0';
- return(vbuf);
-}
-
-char *_tracechar(const unsigned char ch)
-{
- static char crep[20];
- /*
- * We can show the actual character if it's either an ordinary printable
- * or one of the high-half characters.
- */
- if (isprint(ch) || (ch & 0x80))
- {
- crep[0] = '\'';
- crep[1] = ch; /* necessary; printf tries too hard on metachars */
- (void) sprintf(crep + 2, "' = 0x%02x", ch);
- }
- else
- (void) sprintf(crep, "0x%02x", ch);
- return(crep);
-}
-
-void
-_tracef(char *fmt, ...)
-{
-va_list ap;
-char buffer[256];
-
- va_start(ap, fmt);
- vsprintf(buffer, fmt, ap);
- write(tracefd, buffer, strlen(buffer));
- write(tracefd, "\n", 1);
-}
-
diff --git a/lib/libncurses/lib_tstp.c b/lib/libncurses/lib_tstp.c
deleted file mode 100644
index cb96ff0..0000000
--- a/lib/libncurses/lib_tstp.c
+++ /dev/null
@@ -1,78 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_tstp.c
-**
-** The routine tstp().
-**
-*/
-
-#include "curses.priv.h"
-#include "terminfo.h"
-#ifdef SVR4_ACTION
-#define _POSIX_SOURCE
-#endif
-#include <signal.h>
-
-void tstp(int dummy)
-{
-sigaction_t act, oact;
-sigset_t mask, omask;
-
- T(("tstp() called"));
-
- /*
- * The user may have changed the prog_mode tty bits, so save them.
- */
- def_prog_mode();
-
- /*
- * Block window change and timer signals. The latter
- * is because applications use timers to decide when
- * to repaint the screen.
- */
- (void)sigemptyset(&mask);
- (void)sigaddset(&mask, SIGALRM);
-#ifdef SIGWINCH
- (void)sigaddset(&mask, SIGWINCH);
-#endif
- (void)sigprocmask(SIG_BLOCK, &mask, &omask);
-
- endwin();
-
- sigemptyset(&mask);
- sigaddset(&mask, SIGTSTP);
- sigprocmask(SIG_UNBLOCK, &mask, NULL);
-
- act.sa_handler = SIG_DFL;
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
-#ifdef SA_RESTART
- act.sa_flags |= SA_RESTART;
-#endif
- sigaction(SIGTSTP, &act, &oact);
- kill(getpid(), SIGTSTP);
-
- T(("SIGCONT received"));
- sigaction(SIGTSTP, &oact, NULL);
- flushinp();
-
- /*
- * If the user modified the tty state while suspended, he wants
- * those changes to stick. So save the new "default" terminal state.
- */
- def_shell_mode();
-
- /*
- * This relies on the fact that doupdate() will restore the
- * program-mode tty state, and issue enter_ca_mode if need be.
- */
- doupdate();
-
- /* Reset the signals. */
- (void)sigprocmask(SIG_SETMASK, &omask, NULL);
-}
-
diff --git a/lib/libncurses/lib_twait.c b/lib/libncurses/lib_twait.c
deleted file mode 100644
index 1b0fd1e..0000000
--- a/lib/libncurses/lib_twait.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_twait.c
-**
-** The routine timed_wait().
-**
-*/
-
-#include <string.h>
-#include <sys/types.h> /* some systems can't live without this */
-#include <sys/time.h>
-#include <unistd.h>
-#if defined(SYS_SELECT)
-#include <sys/select.h>
-#endif
-#include "curses.priv.h"
-
-#if defined(NOUSLEEP)
-void usleep(unsigned int usec)
-{
-struct timeval tval;
-
- tval.tv_sec = usec / 1000000;
- tval.tv_usec = usec % 1000000;
- select(0, NULL, NULL, NULL, &tval);
-
-}
-#endif
-
-int timed_wait(int fd, int wait, int *timeleft)
-{
-int result;
-struct timeval timeout;
-static fd_set set;
-#ifndef GOOD_SELECT
-struct timeval starttime, returntime;
-
- gettimeofday(&starttime, NULL);
-#endif
-
- FD_ZERO(&set);
- FD_SET(fd, &set);
-
- /* the units of wait are milliseconds */
- timeout.tv_sec = wait / 1000;
- timeout.tv_usec = (wait % 1000) * 1000;
-
- T(("start twait: sec = %d, usec = %d", timeout.tv_sec, timeout.tv_usec));
-
- result = select(fd+1, &set, NULL, NULL, &timeout);
-
-#ifndef GOOD_SELECT
- gettimeofday(&returntime, NULL);
- timeout.tv_sec -= (returntime.tv_sec - starttime.tv_sec);
- timeout.tv_usec -= (returntime.tv_usec - starttime.tv_usec);
- if (timeout.tv_usec < 0 && timeout.tv_sec > 0) {
- timeout.tv_sec--;
- timeout.tv_usec += 1000000;
- }
- if (timeout.tv_sec < 0)
- timeout.tv_sec = timeout.tv_usec = 0;
-#endif
-
- /* return approximate time left on the timeout, in milliseconds */
- if (timeleft)
- *timeleft = (timeout.tv_sec * 1000) + (timeout.tv_usec / 1000);
-
- T(("end twait: returned %d, sec = %d, usec = %d (%d msec)",
- result, timeout.tv_sec, timeout.tv_usec, *timeleft));
-
- return(result);
-}
diff --git a/lib/libncurses/lib_unctrl.c b/lib/libncurses/lib_unctrl.c
deleted file mode 100644
index 6c04d32..0000000
--- a/lib/libncurses/lib_unctrl.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* generated by MKunctrl.awk */
-
-#include "curses.priv.h"
-
-char *unctrl(register chtype ch)
-{
-static const char* const table[] = {
- "^\100", "^\101", "^\102", "^\103", "^\104", "^\105", "^\106", "^\107",
- "^\110", "^\111", "^\112", "^\113", "^\114", "^\115", "^\116", "^\117",
- "^\120", "^\121", "^\122", "^\123", "^\124", "^\125", "^\126", "^\127",
- "^\130", "^\131", "^\132", "^\133", "^\134", "^\135", "^\136", "^\137",
- "\040", "\041", "\042", "\043", "\044", "\045", "\046", "\047",
- "\050", "\051", "\052", "\053", "\054", "\055", "\056", "\057",
- "\060", "\061", "\062", "\063", "\064", "\065", "\066", "\067",
- "\070", "\071", "\072", "\073", "\074", "\075", "\076", "\077",
- "\100", "\101", "\102", "\103", "\104", "\105", "\106", "\107",
- "\110", "\111", "\112", "\113", "\114", "\115", "\116", "\117",
- "\120", "\121", "\122", "\123", "\124", "\125", "\126", "\127",
- "\130", "\131", "\132", "\133", "\134", "\135", "\136", "\137",
- "\140", "\141", "\142", "\143", "\144", "\145", "\146", "\147",
- "\150", "\151", "\152", "\153", "\154", "\155", "\156", "\157",
- "\160", "\161", "\162", "\163", "\164", "\165", "\166", "\167",
- "\170", "\171", "\172", "\173", "\174", "\175", "\176", "^?",
- "\200", "\201", "\202", "\203", "\204", "\205", "\206", "\207",
- "\210", "\211", "\212", "\213", "\214", "\215", "\216", "\217",
- "\220", "\221", "\222", "\223", "\224", "\225", "\226", "\227",
- "\230", "\231", "\232", "\233", "\234", "\235", "\236", "\237",
- "\240", "\241", "\242", "\243", "\244", "\245", "\246", "\247",
- "\250", "\251", "\252", "\253", "\254", "\255", "\256", "\257",
- "\260", "\261", "\262", "\263", "\264", "\265", "\266", "\267",
- "\270", "\271", "\272", "\273", "\274", "\275", "\276", "\277",
- "\300", "\301", "\302", "\303", "\304", "\305", "\306", "\307",
- "\310", "\311", "\312", "\313", "\314", "\315", "\316", "\317",
- "\320", "\321", "\322", "\323", "\324", "\325", "\326", "\327",
- "\330", "\331", "\332", "\333", "\334", "\335", "\336", "\337",
- "\340", "\341", "\342", "\343", "\344", "\345", "\346", "\347",
- "\350", "\351", "\352", "\353", "\354", "\355", "\356", "\357",
- "\360", "\361", "\362", "\363", "\364", "\365", "\366", "\367",
- "\370", "\371", "\372", "\373", "\374", "\375", "\376", "\377"
-};
-
- return (char *)table[TextOf(ch)];
-}
diff --git a/lib/libncurses/lib_vidattr.c b/lib/libncurses/lib_vidattr.c
deleted file mode 100644
index 0bb5675..0000000
--- a/lib/libncurses/lib_vidattr.c
+++ /dev/null
@@ -1,199 +0,0 @@
-
-/***************************************************************************
-* COPYRIGHT NOTICE *
-****************************************************************************
-* ncurses is copyright (C) 1992, 1993, 1994 *
-* by Zeyd M. Ben-Halim *
-* zmbenhal@netcom.com *
-* *
-* Permission is hereby granted to reproduce and distribute ncurses *
-* by any means and for any fee, whether alone or as part of a *
-* larger distribution, in source or in binary form, PROVIDED *
-* this notice is included with any such distribution, not removed *
-* from header files, and is reproduced in any documentation *
-* accompanying it or the applications linked with it. *
-* *
-* ncurses comes AS IS with no warranty, implied or expressed. *
-* *
-***************************************************************************/
-
-/*
- * vidputs(newmode, outc)
- *
- * newmode is taken to be the logical 'or' of the symbols in curses.h
- * representing graphic renditions. The teminal is set to be in all of
- * the given modes, if possible.
- *
- * if set-attributes exists
- * use it to set exactly what you want
- * else
- * if exit-attribute-mode exists
- * turn off everything
- * else
- * turn off those which can be turned off and aren't in
- * newmode.
- * turn on each mode which should be on and isn't, one by one
- *
- * NOTE that this algorithm won't achieve the desired mix of attributes
- * in some cases, but those are probably just those cases in which it is
- * actually impossible, anyway, so...
- *
- */
-
-#include <string.h>
-#include "curses.priv.h"
-#include "terminfo.h"
-
-static void do_color(int pair, int (*outc)(int))
-{
-int fg, bg;
-
- if ( pair == 0 ) {
- if (orig_pair) {
- tputs(orig_pair, 1, outc);
- }
- } else if ((set_a_foreground || set_foreground) &&
- (set_a_background || set_background)
- ) {
- fg = FG(color_pairs[pair]);
- bg = BG(color_pairs[pair]);
-
- T(("setting colors: pair = %d, fg = %d, bg = %d\n", pair, fg, bg));
-
- if (set_a_foreground)
- tputs(tparm(set_a_foreground, fg), 1, outc);
- else
- tputs(tparm(set_foreground, fg), 1, outc);
- if (set_a_background)
- tputs(tparm(set_a_background, bg), 1, outc);
- else
- tputs(tparm(set_background, bg), 1, outc);
- }
-}
-
-#define previous_attr SP->_current_attr
-
-int vidputs(chtype newmode, int (*outc)(int))
-{
-chtype turn_off = (~newmode & previous_attr) & ~A_COLOR;
-chtype turn_on = (newmode & ~previous_attr) & ~A_COLOR;
-int pair, current_pair;
-
- T(("vidputs(%x) called %s", newmode, _traceattr(newmode)));
- T(("previous attribute was %s", _traceattr(previous_attr)));
-
- if (newmode == previous_attr)
- return OK;
-
- pair = PAIR_NUMBER(newmode);
- current_pair = PAIR_NUMBER(previous_attr);
-
- if ((!SP || SP->_coloron) && pair == 0) {
- T(("old pair = %d -- new pair = %d", current_pair, pair));
- if (pair != current_pair) {
- do_color(pair, outc);
- previous_attr &= ~A_COLOR;
- }
- }
-
- if (newmode == A_NORMAL && exit_attribute_mode) {
- if((previous_attr & A_ALTCHARSET) && exit_alt_charset_mode) {
- tputs(exit_alt_charset_mode, 1, outc);
- previous_attr &= ~A_ALTCHARSET;
- }
- if (previous_attr) {
- tputs(exit_attribute_mode, 1, outc);
- previous_attr &= ~A_COLOR;
- }
- } else if (set_attributes) {
- if (turn_on || turn_off) {
- tputs(tparm(set_attributes,
- (newmode & A_STANDOUT) != 0,
- (newmode & A_UNDERLINE) != 0,
- (newmode & A_REVERSE) != 0,
- (newmode & A_BLINK) != 0,
- (newmode & A_DIM) != 0,
- (newmode & A_BOLD) != 0,
- (newmode & A_INVIS) != 0,
- (newmode & A_PROTECT) != 0,
- (newmode & A_ALTCHARSET) != 0), 1, outc);
- previous_attr &= ~A_COLOR;
- }
- } else {
-
- T(("turning %x off", _traceattr(turn_off)));
-
- if ((turn_off & A_ALTCHARSET) && exit_alt_charset_mode) {
- tputs(exit_alt_charset_mode, 1, outc);
- turn_off &= ~A_ALTCHARSET;
- }
-
- if ((turn_off & A_UNDERLINE) && exit_underline_mode) {
- tputs(exit_underline_mode, 1, outc);
- turn_off &= ~A_UNDERLINE;
- }
-
- if ((turn_off & A_STANDOUT) && exit_standout_mode) {
- tputs(exit_standout_mode, 1, outc);
- turn_off &= ~A_STANDOUT;
- }
-
- if (turn_off && exit_attribute_mode) {
- tputs(exit_attribute_mode, 1, outc);
- turn_on |= newmode & (A_UNDERLINE|A_REVERSE|A_BLINK|A_DIM|A_BOLD|A_INVIS|A_PROTECT);
- previous_attr &= ~A_COLOR;
- }
-
- T(("turning %x on", _traceattr(turn_on)));
-
- if ((turn_on & A_ALTCHARSET) && enter_alt_charset_mode)
- tputs(enter_alt_charset_mode, 1, outc);
-
- if ((turn_on & A_BLINK) && enter_blink_mode)
- tputs(enter_blink_mode, 1, outc);
-
- if ((turn_on & A_BOLD) && enter_bold_mode)
- tputs(enter_bold_mode, 1, outc);
-
- if ((turn_on & A_DIM) && enter_dim_mode)
- tputs(enter_dim_mode, 1, outc);
-
- if ((turn_on & A_REVERSE) && enter_reverse_mode)
- tputs(enter_reverse_mode, 1, outc);
-
- if ((turn_on & A_STANDOUT) && enter_standout_mode)
- tputs(enter_standout_mode, 1, outc);
-
- if ((turn_on & A_PROTECT) && enter_protected_mode)
- tputs(enter_protected_mode, 1, outc);
-
- if ((turn_on & A_INVIS) && enter_secure_mode)
- tputs(enter_secure_mode, 1, outc);
-
- if ((turn_on & A_UNDERLINE) && enter_underline_mode)
- tputs(enter_underline_mode, 1, outc);
-
- }
-
- if ((!SP || SP->_coloron) && pair != 0) {
- current_pair = PAIR_NUMBER(previous_attr);
- T(("old pair = %d -- new pair = %d", current_pair, pair));
- if (pair != current_pair) {
- do_color(pair, outc);
- }
- }
-
- previous_attr = newmode;
-
- T(("vidputs finished"));
- return OK;
-}
-
-int vidattr(chtype newmode)
-{
-
- T(("vidattr(%x) called", newmode));
-
- return(vidputs(newmode, _outch));
-}
-
diff --git a/lib/libncurses/lib_window.c b/lib/libncurses/lib_window.c
deleted file mode 100644
index 699863c..0000000
--- a/lib/libncurses/lib_window.c
+++ /dev/null
@@ -1,85 +0,0 @@
-
-/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
-* details. If they are missing then this copy is in violation of *
-* the copyright conditions. */
-
-/*
-** lib_window.c
-**
-**
-*/
-
-#include <string.h>
-#include "curses.priv.h"
-
-int mvder(WINDOW *win, int y, int x)
-{
- return(ERR);
-}
-
-void wsyncup(WINDOW *win)
-{
-
-}
-
-int syncok(WINDOW *win, bool bf)
-{
- return(ERR);
-}
-
-void wcursyncup(WINDOW *win)
-{
-
-}
-
-void wsyncdown(WINDOW *win)
-{
-
-}
-
-WINDOW *dupwin(WINDOW *win)
-{
-WINDOW *nwin;
-int linesize, i;
-
- T(("dupwin(%x) called", win));
-
- if ((nwin = newwin(win->_maxy + 1, win->_maxx + 1, win->_begy, win->_begx)) == NULL)
- return NULL;
-
- nwin->_curx = win->_curx;
- nwin->_cury = win->_cury;
- nwin->_maxy = win->_maxy;
- nwin->_maxx = win->_maxx;
- nwin->_begy = win->_begy;
- nwin->_begx = win->_begx;
-
- nwin->_flags = win->_flags;
- nwin->_attrs = win->_attrs;
- nwin->_bkgd = win->_bkgd;
-
- nwin->_clear = win->_clear;
- nwin->_scroll = win->_scroll;
- nwin->_leave = win->_leave;
- nwin->_use_keypad = win->_use_keypad;
- nwin->_use_meta = win->_use_meta;
- nwin->_delay = win->_delay;
- nwin->_immed = win->_immed;
- nwin->_sync = win->_sync;
- nwin->_parx = win->_parx;
- nwin->_pary = win->_pary;
- nwin->_parent = win->_parent;
-
- nwin->_regtop = win->_regtop;
- nwin->_regbottom = win->_regbottom;
-
- linesize = (win->_maxx + 1) * sizeof(chtype);
- for (i = 0; i <= nwin->_maxy; i++) {
- memcpy(nwin->_line[i], win->_line[i], linesize);
- nwin->_firstchar[i] = win->_firstchar[i];
- nwin->_lastchar[i] = win->_lastchar[i];
- }
-
- return nwin;
-}
-
diff --git a/lib/libncurses/ncurses.3 b/lib/libncurses/ncurses.3
deleted file mode 100644
index 09aa12d..0000000
--- a/lib/libncurses/ncurses.3
+++ /dev/null
@@ -1,427 +0,0 @@
-.TH ncurses 3 ""
-.ds n 5
-.ds d @TERMINFO@
-.SH NAME
-\fBncurses\fR - CRT screen handling and optimization package
-.SH SYNOPSIS
-\fB#include <ncurses.h>\fR
-.br
-.SH DESCRIPTION
-The \fBncurses\fR library routines give the user a terminal-independent
-method of updating character screens with reasonable optimization.
-
-The \fBncurses\fR routines emulate the \fBcurses\fR(3) library of System V
-Release 4 UNIX, but is freely redistributable in source form. Differences from
-the SVr4 curses are described in the BUGS sections of individual man pages.
-There are only few of these, and as ncurses matures they will become fewer
-still.
-
-A program using these routines must be linked with the \fB-lncurses\fR option,
-or (if they have been generated) with one of the debugging libraries
-\fB-ldcurses\fR or \fB-lpcurses\fR. The dcurses library generates trace logs
-that describe curses actions; the pcurses library supports profiling.
-
-The \fBncurses\fR package supports: overall screen, window and pad
-manipulation; output to windows and pads; reading terminal input; control over
-terminal and \fBncurses\fR input and output options; environment query
-routines; color manipulation; use of soft label keys; terminfo capabilities;
-and access to low-level \fBncurses\fR routines.
-
-To initialize the routines, the routine \fBinitscr\fR or \fBnewterm\fR
-must be called before any of the other routines that deal with windows
-and screens are used. The routine \fBendwin\fR must be called before
-exiting. To get character-at-a-time input without echoing (most
-interactive, screen oriented programs want this), the following
-sequence should be used:
-
- \fBinitscr(); cbreak(); noecho();\fR
-
-Most programs would additionally use the sequence:
-
- \fBnonl(); intrflush(stdscr,FALSE); keypad(stdscr,TRUE);\fR
-
-Before a \fBncurses\fR program is run, the tab stops of the terminal
-should be set and its initialization strings, if defined, must be
-output. This can be done by executing the \fBtput init\fR command
-after the shell environment variable \fBTERM\fR has been exported.
-[See \fBterminfo\fR(\*n) for further details.]
-
-The \fBncurses\fR library permits manipulation of data structures,
-called \fIwindows\fR, which can be thought of as two-dimensional
-arrays of characters representing all or part of a CRT screen. A
-default window called \fBstdscr\fR, which is the size of the terminal
-screen, is supplied. Others may be created with \fBnewwin\fR.
-
-Windows are referred to by variables declared as \fBWINDOW *\fR.
-These data structures are manipulated with routines described in manual section 3
-pages (whose names begin "curs_"). Among which the most basic
-routines are \fBmove\fR and \fBaddch\fR. More general versions of
-these routines are included with names beginning with \fBw\fR,
-allowing the user to specify a window. The routines not beginning
-with \fBw\fR affect \fBstdscr\fR.)
-
-After using routines to manipulate a window, \fBrefresh\fR is called,
-telling \fBncurses\fR to make the user's CRT screen look like
-\fBstdscr\fR. The characters in a window are actually of type
-\fBchtype\fR, (character and attribute data) so that other information
-about the character may also be stored with each character.
-
-Special windows called \fIpads\fR may also be manipulated. These are windows
-which are not constrained to the size of the screen and whose contents need not
-be completely displayed. See curs_pad(3) for more information.
-
-In addition to drawing characters on the screen, video attributes and colors
-may be supported, causing the characters to show up in such modes as
-underlined, in reverse video, or in color on terminals that support such
-display enhancements. Line drawing characters may be specified to be output.
-On input, \fBncurses\fR is also able to translate arrow and function keys that
-transmit escape sequences into single values. The video attributes, line
-drawing characters, and input values use names, defined in \fB<ncurses.h>\fR,
-such as \fBA_REVERSE\fR, \fBACS_HLINE\fR, and \fBKEY_LEFT\fR.
-
-If the environment variables \fBLINES\fR and \fBCOLUMNS\fR are set, or if the
-program is executing in a window environment, line and column information in
-the environment will override information read by \fIterminfo\fR. This would
-effect a program running in an AT&T 630 layer, for example, where the size of a
-screen is changeable.
-
-If the environment variable \fBTERMINFO\fR is defined, any program using
-\fBncurses\fR checks for a local terminal definition before checking in the
-standard place. For example, if \fBTERM\fR is set to \fBatt4424\fR, then the
-compiled terminal definition is found in
-
- \fB\*d/a/att4424\fR.
-
-(The \fBa\fR is copied from the first letter of \fBatt4424\fR to avoid
-creation of huge directories.) However, if \fBTERMINFO\fR is set to
-\fB$HOME/myterms\fR, \fBncurses\fR first checks
-
- \fB$HOME/myterms/a/att4424\fR,
-
-and if that fails, it then checks
-
- \fB\*d/a/att4424\fR.
-
-This is useful for developing experimental definitions or when write
-permission in \fB\*d\fR is not available.
-
-The integer variables \fBLINES\fR and \fBCOLS\fR are defined in
-\fB<ncurses.h>\fR and will be filled in by \fBinitscr\fR with the size of the
-screen. The constants \fBTRUE\fR and \fBFALSE\fR have the values \fB1\fR and
-\fB0\fR, respectively.
-
-The \fBncurses\fR routines also define the \fBWINDOW *\fR variable \fBcurscr\fR
-which is used for certain low-level operations like clearing and redrawing a
-screen containing garbage. The \fBcurscr\fR can be used in only a few
-routines.
-
-.SS Routine and Argument Names
-Many \fBncurses\fR routines have two or more versions. The routines prefixed
-with \fBw\fR require a window argument. The routines prefixed with \fBp\fR
-require a pad argument. Those without a prefix generally use \fBstdscr\fR.
-
-The routines prefixed with \fBmv\fR require a \fIy\fR and \fIx\fR
-coordinate to move to before performing the appropriate action. The
-\fBmv\fR routines imply a call to \fBmove\fR before the call to the
-other routine. The coordinate \fIy\fR always refers to the row (of
-the window), and \fIx\fR always refers to the column. The upper
-left-hand corner is always (0,0), not (1,1).
-
-The routines prefixed with \fBmvw\fR take both a window argument and
-\fIx\fR and \fIy\fR coordinates. The window argument is always
-specified before the coordinates.
-
-In each case, \fIwin\fR is the window affected, and \fIpad\fR is the
-pad affected; \fIwin\fR and \fIpad\fR are always pointers to type
-\fBWINDOW\fR.
-
-Option setting routines require a Boolean flag \fIbf\fR with the value
-\fBTRUE\fR or \fBFALSE\fR; \fIbf\fR is always of type \fBbool\fR. The
-variables \fIch\fR and \fIattrs\fR below are always of type
-\fBchtype\fR. The types \fBWINDOW\fR, \fBSCREEN\fR, \fBbool\fR, and
-\fBchtype\fR are defined in \fB<ncurses.h>\fR. The type \fBTERMINAL\fR
-is defined in \fB<term.h>\fR. All other arguments are integers.
-
-.SS Routine Name Index
-The following table lists each \fBncurses\fR routine and the name of
-the manual page on which it is described.
-
-.nf
-\fBncurses\fR Routine Name Manual Page Name
-___________________________________________
-addch curs_addch(3)
-addchnstr curs_addchstr(3)
-addchstr curs_addchstr(3)
-addnstr curs_addstr(3)
-addstr curs_addstr(3)
-attroff curs_attr(3)
-attron curs_attr(3)
-attrset curs_attr(3)
-baudrate curs_termattrs(3)
-beep curs_beep(3)
-bkgd curs_bkgd(3)
-bkgdset curs_bkgd(3)
-border curs_border(3)
-box curs_border(3)
-can_change_color curs_color(3)
-cbreak curs_inopts(3)
-clear curs_clear(3)
-clearok curs_outopts(3)
-clrtobot curs_clear(3)
-clrtoeol curs_clear(3)
-color_content curs_color(3)
-copywin curs_overlay(3)
-curs_set curs_kernel(3)
-def_prog_mode curs_kernel(3)
-def_shell_mode curs_kernel(3)
-del_curterm curs_terminfo(\*n)
-delay_output curs_util(3)
-delch curs_delch(3)
-deleteln curs_deleteln(3)
-delscreen curs_initscr(3)
-delwin curs_window(3)
-derwin curs_window(3)
-doupdate curs_refresh(3)
-dupwin curs_window(3)
-echo curs_inopts(3)
-echochar curs_addch(3)
-endwin curs_initscr(3)
-erase curs_clear(3)
-erasechar curs_termattrs(3)
-filter curs_util(3)
-flash curs_beep(3)
-flushinp curs_util(3)
-getbegyx curs_getyx(3)
-getch curs_getch(3)
-getmaxyx curs_getyx(3)
-getparyx curs_getyx(3)
-getstr curs_getstr(3)
-getsyx curs_kernel(3)
-getwin curs_util(3)
-getyx curs_getyx(3)
-halfdelay curs_inopts(3)
-has_colors curs_color(3)
-has_ic curs_termattrs(3)
-has_il curs_termattrs(3)
-hline curs_border(3)
-idcok curs_outopts(3)
-idlok curs_outopts(3)
-immedok curs_outopts(3)
-inch curs_inch(3)
-inchnstr curs_inchstr(3)
-inchstr curs_inchstr(3)
-init_color curs_color(3)
-init_pair curs_color(3)
-initscr curs_initscr(3)
-innstr curs_instr(3)
-insch curs_insch(3)
-insdelln curs_deleteln(3)
-insertln curs_deleteln(3)
-insnstr curs_insstr(3)
-insstr curs_insstr(3)
-instr curs_instr(3)
-intrflush curs_inopts(3)
-is_linetouched curs_touch(3)
-is_wintouched curs_touch(3)
-isendwin curs_initscr(3)
-keyname curs_util(3)
-keypad curs_inopts(3)
-killchar curs_termattrs(3)
-leaveok curs_outopts(3)
-longname curs_termattrs(3)
-meta curs_inopts(3)
-move curs_move(3)
-mvaddch curs_addch(3)
-mvaddchnstr curs_addchstr(3)
-mvaddchstr curs_addchstr(3)
-mvaddnstr curs_addstr(3)
-mvaddstr curs_addstr(3)
-mvcur curs_terminfo(\*n)
-mvdelch curs_delch(3)
-mvderwin curs_window(3)
-mvgetch curs_getch(3)
-mvgetstr curs_getstr(3)
-mvinch curs_inch(3)
-mvinchnstr curs_inchstr(3)
-mvinchstr curs_inchstr(3)
-mvinnstr curs_instr(3)
-mvinsch curs_insch(3)
-mvinsnstr curs_insstr(3)
-mvinsstr curs_insstr(3)
-mvinstr curs_instr(3)
-mvprintw curs_printw(3)
-mvscanw curs_scanw(3)
-mvwaddch curs_addch(3)
-mvwaddchnstr curs_addchstr(3)
-mvwaddchstr curs_addchstr(3)
-mvwaddnstr curs_addstr(3)
-mvwaddstr curs_addstr(3)
-mvwdelch curs_delch(3)
-mvwgetch curs_getch(3)
-mvwgetstr curs_getstr(3)
-mvwin curs_window(3)
-mvwinch curs_inch(3)
-mvwinchnstr curs_inchstr(3)
-mvwinchstr curs_inchstr(3)
-mvwinnstr curs_instr(3)
-mvwinsch curs_insch(3)
-mvwinsnstr curs_insstr(3)
-mvwinsstr curs_insstr(3)
-mvwinstr curs_instr(3)
-mvwprintw curs_printw(3)
-mvwscanw curs_scanw(3)
-napms curs_kernel(3)
-newpad curs_pad(3)
-newterm curs_initscr(3)
-newwin curs_window(3)
-nl curs_outopts(3)
-nocbreak curs_inopts(3)
-nodelay curs_inopts(3)
-noecho curs_inopts(3)
-nonl curs_outopts(3)
-noqiflush curs_inopts(3)
-noraw curs_inopts(3)
-notimeout curs_inopts(3)
-overlay curs_overlay(3)
-overwrite curs_overlay(3)
-pair_content curs_color(3)
-pechochar curs_pad(3)
-pnoutrefresh curs_pad(3)
-prefresh curs_pad(3)
-printw curs_printw(3)
-putp curs_terminfo(\*n)
-putwin curs_util(3)
-qiflush curs_inopts(3)
-raw curs_inopts(3)
-redrawwin curs_refresh(3)
-refresh curs_refresh(3)
-reset_prog_mode curs_kernel(3)
-reset_shell_mode curs_kernel(3)
-resetty curs_kernel(3)
-restartterm curs_terminfo(\*n)
-ripoffline curs_kernel(3)
-savetty curs_kernel(3)
-scanw curs_scanw(3)
-scr_dump curs_scr_dmp(3)
-scr_init curs_scr_dmp(3)
-scr_restore curs_scr_dmp(3)
-scr_set curs_scr_dmp(3)
-scrl curs_scroll(3)
-scroll curs_scroll(3)
-scrollok curs_outopts(3)
-set_curterm curs_terminfo(\*n)
-set_term curs_initscr(3)
-setscrreg curs_outopts(3)
-setsyx curs_kernel(3)
-setterm curs_terminfo(\*n)
-setupterm curs_terminfo(\*n)
-slk_attroff curs_slk(3)
-slk_attron curs_slk(3)
-slk_attrset curs_slk(3)
-slk_clear curs_slk(3)
-slk_init curs_slk(3)
-slk_label curs_slk(3)
-slk_noutrefresh curs_slk(3)
-slk_refresh curs_slk(3)
-slk_restore curs_slk(3)
-slk_set curs_slk(3)
-slk_touch curs_slk(3)
-standend curs_attr(3)
-standout curs_attr(3)
-start_color curs_color(3)
-subpad curs_pad(3)
-subwin curs_window(3)
-syncok curs_window(3)
-termattrs curs_termattrs(3)
-termname curs_termattrs(3)
-tigetflag curs_terminfo(\*n)
-tigetnum curs_terminfo(\*n)
-tigetstr curs_terminfo(\*n)
-timeout curs_inopts(3)
-touchline curs_touch(3)
-touchwin curs_touch(3)
-tparm curs_terminfo(\*n)
-tputs curs_terminfo(\*n)
-typeahead curs_inopts(3)
-unctrl curs_util(3)
-ungetch curs_getch(3)
-untouchwin curs_touch(3)
-use_env curs_util(3)
-vidattr curs_terminfo(\*n)
-vidputs curs_terminfo(\*n)
-vline curs_border(3)
-vwprintw curs_printw(3)
-vwscanw curs_scanw(3)
-waddch curs_addch(3)
-waddchnstr curs_addchstr(3)
-waddchstr curs_addchstr(3)
-waddnstr curs_addstr(3)
-waddstr curs_addstr(3)
-wattroff curs_attr(3)
-wattron curs_attr(3)
-wattrset curs_attr(3)
-wbkgd curs_bkgd(3)
-wbkgdset curs_bkgd(3)
-wborder curs_border(3)
-wclear curs_clear(3)
-wclrtobot curs_clear(3)
-wclrtoeol curs_clear(3)
-wcursyncup curs_window(3)
-wdelch curs_delch(3)
-wdeleteln curs_deleteln(3)
-wechochar curs_addch(3)
-werase curs_clear(3)
-wgetch curs_getch(3)
-wgetnstr curs_getstr(3)
-wgetstr curs_getstr(3)
-whline curs_border(3)
-winch curs_inch(3)
-winchnstr curs_inchstr(3)
-winchstr curs_inchstr(3)
-winnstr curs_instr(3)
-winsch curs_insch(3)
-winsdelln curs_deleteln(3)
-winsertln curs_deleteln(3)
-winsnstr curs_insstr(3)
-winsstr curs_insstr(3)
-winstr curs_instr(3)
-wmove curs_move(3)
-wnoutrefresh curs_refresh(3)
-wprintw curs_printw(3)
-wredrawln curs_refresh(3)
-wrefresh curs_refresh(3)
-wscanw curs_scanw(3)
-wscrl curs_scroll(3)
-wsetscrreg curs_outopts(3)
-wstandend curs_attr(3)
-wstandout curs_attr(3)
-wsyncdown curs_window(3)
-wsyncup curs_window(3)
-wtimeout curs_inopts(3)
-wtouchln curs_touch(3)
-wvline curs_border(3)
-.fi
-.SH RETURN VALUE
-Routines that return an integer return \fBERR\fR upon failure and an
-integer value other than \fBERR\fR upon successful completion, unless
-otherwise noted in the routine descriptions.
-
-All macros return the value of the \fBw\fR version, except \fBsetscrreg\fR,
-\fBwsetscrreg\fR, \fBgetyx\fR, \fBgetbegyx\fR, \fBgetmaxyx\fR. The return
-values of \fBsetscrreg\fR, \fBwsetscrreg\fR, \fBgetyx\fR, \fBgetbegyx\fR, and
-\fBgetmaxyx\fR are undefined (\fIi\fR.\fIe\fR., these should not be used as the
-right-hand side of assignment statements).
-
-Routines that return pointers return \fBNULL\fR on error.
-.SH SEE ALSO
-\fBterminfo\fR(5) and section 3 pages whose names begin "curs_" for detailed routine
-descriptions.
-.SH NOTES
-The header file \fB<ncurses.h>\fR automatically includes the header files
-\fB<stdio.h>\fR and \fB<unctrl.h>\fR.
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/lib/libncurses/term.5 b/lib/libncurses/term.5
deleted file mode 100644
index 3fe30bd..0000000
--- a/lib/libncurses/term.5
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH TERM 5
-.ds n 5
-.ds d /usr/lib/terminfo
-.SH NAME
-term \- format of compiled term file.
-.SH SYNOPSIS
-.B term
-.SH DESCRIPTION
-.PP
-Compiled terminfo descriptions are placed under the directory \fB\*d\fP.
-In order to avoid a linear search of a huge \s-1UNIX\s+1 system directory, a
-two-level scheme is used: \fB\*b/c/name\fP
-where
-.I name
-is the name of the terminal, and
-.I c
-is the first character of
-.IR name .
-Thus,
-.I act4
-can be found in the file \fB\*d/a/act4\fP.
-Synonyms for the same terminal are implemented by multiple
-links to the same compiled file.
-.PP
-The format has been chosen so that it will be the same on all hardware.
-An 8 or more bit byte is assumed, but no assumptions about byte ordering
-or sign extension are made.
-.PP
-The compiled file is created with the
-.I tic
-program, and read by the routine
-.IR setupterm .
-Both of these pieces of software are part of
-.IR ncurses (3).
-The file is divided into six parts:
-the header,
-terminal names,
-boolean flags,
-numbers,
-strings,
-and
-string table.
-.PP
-The header section begins the file.
-This section contains six short integers in the format
-described below.
-These integers are
-(1) the magic number (octal 0432);
-(2) the size, in bytes, of the names section;
-(3) the number of bytes in the boolean section;
-(4) the number of short integers in the numbers section;
-(5) the number of offsets (short integers) in the strings section;
-(6) the size, in bytes, of the string table.
-.PP
-Short integers are stored in two 8-bit bytes.
-The first byte contains the least significant 8 bits of the value,
-and the second byte contains the most significant 8 bits.
-(Thus, the value represented is 256*second+first.)
-The value \-1 is represented by 0377, 0377, other negative
-value are illegal.
-The
-\-1 generally means that a capability is missing from this terminal.
-Note that this format corresponds to the hardware of the \s-1VAX\s+1 and \s-1PDP\s+1-11.
-Machines where this does not correspond to the hardware read the
-integers as two bytes and compute the result.
-.PP
-The terminal names section comes next.
-It contains the first line of the terminfo description,
-listing the various names for the terminal,
-separated by the `|' character.
-The section is terminated with an \s-1ASCII NUL\s+1 character.
-.PP
-The boolean flags have one byte for each flag.
-This byte is either 0 or 1 as the flag is present or absent.
-The capabilities are in the same order as the file <term.h>.
-.PP
-Between the boolean section and the number section,
-a null byte will be inserted, if necessary,
-to ensure that the number section begins on an even byte.
-All short integers are aligned on a short word boundary.
-.PP
-The numbers section is similar to the flags section.
-Each capability takes up two bytes,
-and is stored as a short integer.
-If the value represented is \-1, the capability is taken to be missing.
-.PP
-The strings section is also similar.
-Each capability is stored as a short integer, in the format above.
-A value of \-1 means the capability is missing.
-Otherwise, the value is taken as an offset from the beginning
-of the string table.
-Special characters in ^X or \ec notation are stored in their
-interpreted form, not the printing representation.
-Padding information $<nn> and parameter information %x are
-stored intact in uninterpreted form.
-.PP
-The final section is the string table.
-It contains all the values of string capabilities referenced in
-the string section.
-Each string is null terminated.
-.PP
-Note that it is possible for
-.I setupterm
-to expect a different set of capabilities
-than are actually present in the file.
-Either the database may have been updated since
-.I setupterm
-has been recompiled
-(resulting in extra unrecognized entries in the file)
-or the program may have been recompiled more recently
-than the database was updated
-(resulting in missing entries).
-The routine
-.I setupterm
-must be prepared for both possibilities \-
-this is why the numbers and sizes are included.
-Also, new capabilities must always be added at the end of the lists
-of boolean, number, and string capabilities.
-.PP
-As an example, an octal dump of the description for the Microterm ACT 4
-is included:
-.nf
-.sp
-microterm|act4|microterm act iv,
- cr=^M, cud1=^J, ind=^J, bel=^G, am, cub1=^H,
- ed=^_, el=^^, clear=^L, cup=^T%p1%c%p2%c,
- cols#80, lines#24, cuf1=^X, cuu1=^Z, home=^],
-.sp
-.ft CW
-\s-2000 032 001 \e0 025 \e0 \eb \e0 212 \e0 " \e0 m i c r
-020 o t e r m | a c t 4 | m i c r o
-040 t e r m a c t i v \e0 \e0 001 \e0 \e0
-060 \e0 \e0 \e0 \e0 \e0 \e0 \e0 \e0 \e0 \e0 \e0 \e0 \e0 \e0 \e0 \e0
-100 \e0 \e0 P \e0 377 377 030 \e0 377 377 377 377 377 377 377 377
-120 377 377 377 377 \e0 \e0 002 \e0 377 377 377 377 004 \e0 006 \e0
-140 \eb \e0 377 377 377 377 \en \e0 026 \e0 030 \e0 377 377 032 \e0
-160 377 377 377 377 034 \e0 377 377 036 \e0 377 377 377 377 377 377
-200 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
-*
-520 377 377 377 377 \e0 377 377 377 377 377 377 377 377 377 377
-540 377 377 377 377 377 377 007 \e0 \er \e0 \ef \e0 036 \e0 037 \e0
-560 024 % p 1 % c % p 2 % c \e0 \en \e0 035 \e0
-600 \eb \e0 030 \e0 032 \e0 \en \e0\s+2
-.ft R
-.fi
-.sp
-.PP
-Some limitations: total compiled entries cannot exceed 4096 bytes.
-The name field cannot exceed 128 bytes.
-.SH FILES
-\*d/*/* compiled terminal capability data base
-.SH "SEE ALSO"
-ncurses(3), terminfo(5).
diff --git a/lib/libncurses/terminfo.h b/lib/libncurses/terminfo.h
deleted file mode 100644
index c238040..0000000
--- a/lib/libncurses/terminfo.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* fake header for sources compatibility */
-#include <nterm.h>
diff --git a/lib/libncurses/unctrl.h b/lib/libncurses/unctrl.h
deleted file mode 100644
index 43986dc..0000000
--- a/lib/libncurses/unctrl.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/***************************************************************************
-* COPYRIGHT NOTICE *
-****************************************************************************
-* ncurses is copyright (C) 1992-1995 *
-* Zeyd M. Ben-Halim *
-* zmbenhal@netcom.com *
-* Eric S. Raymond *
-* esr@snark.thyrsus.com *
-* *
-* Permission is hereby granted to reproduce and distribute ncurses *
-* by any means and for any fee, whether alone or as part of a *
-* larger distribution, in source or in binary form, PROVIDED *
-* this notice is included with any such distribution, and is not *
-* removed from any of its header files. Mention of ncurses in any *
-* applications linked with it is highly appreciated. *
-* *
-* ncurses comes AS IS with no warranty, implied or expressed. *
-* *
-***************************************************************************/
-
-/*
- * unctrl.h
- *
- * Display a printable version of a control character.
- * Control characters are displayed in caret notation (^x), DELETE is displayed
- * as ^?. Printable characters are displayed as is.
- *
- * The returned pointer points to a static buffer which gets overwritten by
- * each call. Therefore, you must copy the resulting string to a safe place
- * before calling unctrl() again.
- *
- */
-
-#ifndef _UNCTRL_H
-#define _UNCTRL_H 1
-
-#undef NCURSES_VERSION
-#define NCURSES_VERSION "1.8.6/ache"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <ncurses.h>
-
-extern char *unctrl(chtype);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _UNCTRL_H */
diff --git a/lib/libopie/Makefile b/lib/libopie/Makefile
deleted file mode 100644
index f51d143..0000000
--- a/lib/libopie/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-# Makefile for libopie
-#
-# $Id: Makefile,v 1.6 1997/09/29 11:38:36 ache Exp $
-#
-OPIE_DIST?= ${.CURDIR}/../../contrib/opie
-DIST_DIR= ${OPIE_DIST}/${.CURDIR:T}
-SHLIB_MAJOR= 2
-SHLIB_MINOR= 1
-
-KEYFILE?= \"/etc/opiekeys\"
-
-.PATH: ${DIST_DIR} ${OPIE_DIST}/libmissing
-
-LIB= opie
-SRCS= atob8.c btoa8.c btoh.c challenge.c getsequence.c hash.c hashlen.c \
- keycrunch.c lock.c lookup.c newseed.c parsechallenge.c passcheck.c \
- passwd.c randomchallenge.c readpass.c unlock.c verify.c version.c \
- btoe.c accessfile.c generator.c insecure.c getutmpentry.c \
- readrec.c writerec.c login.c open.c logwtmp.c \
- getutline.c pututline.c endutent.c setutent.c # from libmissing
-
-CFLAGS+=-I${.CURDIR} -I${OPIE_DIST} -I${DIST_DIR} \
- -DKEY_FILE=${KEYFILE}
-
-MAN4= ${OPIE_DIST}/opie.4
-MAN5= ${OPIE_DIST}/opiekeys.5 ${OPIE_DIST}/opieaccess.5
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${OPIE_DIST}/opie.h \
- ${DESTDIR}/usr/include
-
-.include <bsd.lib.mk>
diff --git a/lib/libopie/config.h b/lib/libopie/config.h
deleted file mode 100644
index bf91b2e..0000000
--- a/lib/libopie/config.h
+++ /dev/null
@@ -1,379 +0,0 @@
-/* config.h. Generated automatically by configure. */
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
-#ifndef _ALL_SOURCE
-/* #undef _ALL_SOURCE */
-#endif
-
-/* Define if using alloca.c. */
-/* #undef C_ALLOCA */
-
-/* Define to empty if the keyword does not work. */
-/* #undef const */
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
- This function is required for alloca.c support on those systems. */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define if you have alloca, as a function or macro. */
-#define HAVE_ALLOCA 1
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
-/* #undef HAVE_ALLOCA_H */
-
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
-#define HAVE_SYS_WAIT_H 1
-
-/* Define if on MINIX. */
-/* #undef _MINIX */
-
-/* Define if the system does not provide POSIX.1 features except
- with this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define if you need to in order for stat and other things to work. */
-/* #undef _POSIX_SOURCE */
-
-/* Define as the return type of signal handlers (int or void). */
-#define RETSIGTYPE void
-
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-/* #undef STACK_DIRECTION */
-
-/* Define if you want the FTP daemon to support anonymous logins. */
-/* #undef DOANONYMOUS */
-
-/* The default value of the PATH environment variable */
-#define DEFAULT_PATH "/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin"
-
-/* Defined if the file /etc/default/login exists
- (and, presumably, should be looked at by login) */
-/* #undef HAVE_ETC_DEFAULT_LOGIN */
-
-/* Defined to the name of a file that contains a list of files whose
- permissions and ownerships should be changed on login. */
-/* #undef HAVE_LOGIN_PERMFILE */
-
-/* Defined to the name of a file that contains a list of environment
- values that should be set on login. */
-/* #undef HAVE_LOGIN_ENVFILE */
-
-/* Defined if the file /etc/securetty exists
- (and, presumably, should be looked at by login) */
-/* #undef HAVE_SECURETTY */
-
-/* Defined if the file /etc/shadow exists
- (and, presumably, should be looked at for shadow passwords) */
-/* #undef HAVE_ETC_SHADOW */
-
-/* The path to the access file, if we're going to use it */
-/* #undef PATH_ACCESS_FILE */
-
-/* The path to the mail spool, if we know it */
-#define PATH_MAIL "/var/mail"
-
-/* The path to the utmp file, if we know it */
-#define PATH_UTMP_AC "/var/run/utmp"
-
-/* The path to the wtmp file, if we know it */
-#define PATH_WTMP_AC "/var/log/wtmp"
-
-/* The path to the wtmpx file, if we know it */
-/* #undef PATH_WTMPX_AC */
-
-/* Defined if the system's profile (/etc/profile) displays
- the motd file */
-/* #undef HAVE_MOTD_IN_PROFILE */
-
-/* Defined if the system's profile (/etc/profile) informs the
- user of new mail */
-/* #undef HAVE_MAILCHECK_IN_PROFILE */
-
-/* Define if you have a nonstandard gettimeofday() that takes one argument
- instead of two. */
-/* #undef HAVE_ONE_ARG_GETTIMEOFDAY */
-
-/* Define if the system has the getenv function */
-#define HAVE_GETENV 1
-
-/* Define if the system has the setenv function */
-#define HAVE_SETENV 1
-
-/* Define if the system has the /var/adm/sulog file */
-/* #undef HAVE_SULOG */
-
-/* Define if the system has the unsetenv function */
-#define HAVE_UNSETENV 1
-
-/* Define if the compiler can handle ANSI-style argument lists */
-#define HAVE_ANSIDECL 1
-
-/* Define if the compiler can handle ANSI-style prototypes */
-#define HAVE_ANSIPROTO 1
-
-/* Define if the system has an ANSI-style printf (returns int instead of char *) */
-#define HAVE_ANSISPRINTF 1
-
-/* Define if the compiler can handle ANSI-style variable argument lists */
-#define HAVE_ANSISTDARG 1
-
-/* Define if the compiler can handle void argument lists to functions */
-#define HAVE_VOIDARG 1
-
-/* Define if the compiler can handle void return "values" from functions */
-#define HAVE_VOIDRET 1
-
-/* Define if the compiler can handle void pointers to our liking */
-#define HAVE_VOIDPTR 1
-
-/* Define if the /bin/ls command seems to support the -g flag */
-/* #undef HAVE_LS_G_FLAG */
-
-/* Define if there is a ut_pid field in struct utmp */
-/* #undef HAVE_UT_PID */
-
-/* Define if there is a ut_type field in struct utmp */
-/* #undef HAVE_UT_TYPE */
-
-/* Define if there is a ut_name field in struct utmp */
-#define HAVE_UT_NAME 1
-
-/* Define if there is a ut_host field in struct utmp */
-#define HAVE_UT_HOST 1
-
-/* Define if the system has getutline() */
-/* #undef HAVE_GETUTLINE */
-
-/* Defined if the system has SunOS C2 security shadow passwords */
-/* #undef HAVE_SUNOS_C2_SHADOW */
-
-/* Defined if you want to disable utmp support */
-/* #undef DISABLE_UTMP */
-
-/* Defined if you want to allow users to override the insecure checks */
-/* #undef INSECURE_OVERRIDE */
-
-/* Defined to the default hash value, always defined */
-#define MDX 5
-
-/* Defined if new-style prompts are to be used */
-#define NEW_PROMPTS 1
-
-/* Defined to the path of the OPIE lock directory */
-#define OPIE_LOCK_DIR "/var/spool/opielocks"
-
-/* Defined if users are to be asked to re-type secret pass phrases */
-/* #undef RETYPE */
-
-/* Defined if su should not switch to disabled accounts */
-/* #undef SU_STAR_CHECK */
-
-/* Defined if user locking is to be used */
-#define USER_LOCKING 1
-
-/* Define if you have the bcopy function. */
-/* #undef HAVE_BCOPY */
-
-/* Define if you have the bzero function. */
-/* #undef HAVE_BZERO */
-
-/* Define if you have the endspent function. */
-/* #undef HAVE_ENDSPENT */
-
-/* Define if you have the fpurge function. */
-#define HAVE_FPURGE 1
-
-/* Define if you have the getdtablesize function. */
-/* #undef HAVE_GETDTABLESIZE */
-
-/* Define if you have the getgroups function. */
-#define HAVE_GETGROUPS 1
-
-/* Define if you have the gethostname function. */
-/* #undef HAVE_GETHOSTNAME */
-
-/* Define if you have the getspnam function. */
-/* #undef HAVE_GETSPNAM */
-
-/* Define if you have the gettimeofday function. */
-#define HAVE_GETTIMEOFDAY 1
-
-/* Define if you have the getttynam function. */
-#define HAVE_GETTTYNAM 1
-
-/* Define if you have the getusershell function. */
-#define HAVE_GETUSERSHELL 1
-
-/* Define if you have the getutxline function. */
-/* #undef HAVE_GETUTXLINE */
-
-/* Define if you have the getwd function. */
-/* #undef HAVE_GETWD */
-
-/* Define if you have the index function. */
-/* #undef HAVE_INDEX */
-
-/* Define if you have the lstat function. */
-#define HAVE_LSTAT 1
-
-/* Define if you have the on_exit function. */
-/* #undef HAVE_ON_EXIT */
-
-/* Define if you have the pututxline function. */
-/* #undef HAVE_PUTUTXLINE */
-
-/* Define if you have the rindex function. */
-/* #undef HAVE_RINDEX */
-
-/* Define if you have the setgroups function. */
-#define HAVE_SETGROUPS 1
-
-/* Define if you have the setlogin function. */
-#define HAVE_SETLOGIN 1
-
-/* Define if you have the setpriority function. */
-#define HAVE_SETPRIORITY 1
-
-/* Define if you have the setregid function. */
-/* #undef HAVE_SETREGID */
-
-/* Define if you have the setresgid function. */
-/* #undef HAVE_SETRESGID */
-
-/* Define if you have the setresuid function. */
-/* #undef HAVE_SETRESUID */
-
-/* Define if you have the setreuid function. */
-/* #undef HAVE_SETREUID */
-
-/* Define if you have the setvbuf function. */
-#define HAVE_SETVBUF 1
-
-/* Define if you have the sigaddset function. */
-#define HAVE_SIGADDSET 1
-
-/* Define if you have the sigblock function. */
-/* #undef HAVE_SIGBLOCK */
-
-/* Define if you have the sigemptyset function. */
-#define HAVE_SIGEMPTYSET 1
-
-/* Define if you have the sigsetmask function. */
-/* #undef HAVE_SIGSETMASK */
-
-/* Define if you have the socket function. */
-#define HAVE_SOCKET 1
-
-/* Define if you have the strerror function. */
-#define HAVE_STRERROR 1
-
-/* Define if you have the strftime function. */
-#define HAVE_STRFTIME 1
-
-/* Define if you have the strncasecmp function. */
-#define HAVE_STRNCASECMP 1
-
-/* Define if you have the strstr function. */
-#define HAVE_STRSTR 1
-
-/* Define if you have the ttyslot function. */
-#define HAVE_TTYSLOT 1
-
-/* Define if you have the usleep function. */
-#define HAVE_USLEEP 1
-
-/* Define if you have the <crypt.h> header file. */
-/* #undef HAVE_CRYPT_H */
-
-/* Define if you have the <dirent.h> header file. */
-#define HAVE_DIRENT_H 1
-
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <lastlog.h> header file. */
-/* #undef HAVE_LASTLOG_H */
-
-/* Define if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <ndir.h> header file. */
-/* #undef HAVE_NDIR_H */
-
-/* Define if you have the <paths.h> header file. */
-#define HAVE_PATHS_H 1
-
-/* Define if you have the <pwd.h> header file. */
-#define HAVE_PWD_H 1
-
-/* Define if you have the <shadow.h> header file. */
-/* #undef HAVE_SHADOW_H */
-
-/* Define if you have the <signal.h> header file. */
-#define HAVE_SIGNAL_H 1
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define if you have the <sys/dir.h> header file. */
-/* #undef HAVE_SYS_DIR_H */
-
-/* Define if you have the <sys/file.h> header file. */
-#define HAVE_SYS_FILE_H 1
-
-/* Define if you have the <sys/ioctl.h> header file. */
-#define HAVE_SYS_IOCTL_H 1
-
-/* Define if you have the <sys/ndir.h> header file. */
-/* #undef HAVE_SYS_NDIR_H */
-
-/* Define if you have the <sys/param.h> header file. */
-#define HAVE_SYS_PARAM_H 1
-
-/* Define if you have the <sys/select.h> header file. */
-#define HAVE_SYS_SELECT_H 1
-
-/* Define if you have the <sys/signal.h> header file. */
-#define HAVE_SYS_SIGNAL_H 1
-
-/* Define if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define if you have the <sys/utsname.h> header file. */
-#define HAVE_SYS_UTSNAME_H 1
-
-/* Define if you have the <syslog.h> header file. */
-#define HAVE_SYSLOG_H 1
-
-/* Define if you have the <termios.h> header file. */
-#define HAVE_TERMIOS_H 1
-
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define if you have the <utmpx.h> header file. */
-/* #undef HAVE_UTMPX_H */
-
-/* Define if you have the crypt library (-lcrypt). */
-#define HAVE_LIBCRYPT 1
-
-/* Define if you have the nsl library (-lnsl). */
-/* #undef HAVE_LIBNSL */
-
-/* Define if you have the posix library (-lposix). */
-/* #undef HAVE_LIBPOSIX */
-
-/* Define if you have the socket library (-lsocket). */
-/* #undef HAVE_LIBSOCKET */
diff --git a/lib/libpam/modules/pam_kerberosIV/klogin.c b/lib/libpam/modules/pam_kerberosIV/klogin.c
deleted file mode 100644
index 7c61b84..0000000
--- a/lib/libpam/modules/pam_kerberosIV/klogin.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static const char sccsid[] = "@(#)klogin.c 8.3 (Berkeley) 4/2/94";
-#endif /* not lint */
-
-#ifdef KERBEROS
-#include <sys/param.h>
-#include <sys/syslog.h>
-#include <des.h>
-#include <krb.h>
-
-#include <err.h>
-#include <netdb.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#define INITIAL_TICKET "krbtgt"
-#define VERIFY_SERVICE "rcmd"
-
-extern int notickets;
-extern char *krbtkfile_env;
-
-/*
- * Attempt to log the user in using Kerberos authentication
- *
- * return 0 on success (will be logged in)
- * 1 if Kerberos failed (try local password in login)
- */
-int
-klogin(pw, instance, localhost, password)
- struct passwd *pw;
- char *instance, *localhost, *password;
-{
- int kerror;
- char realm[REALM_SZ], savehost[MAXHOSTNAMELEN];
- char tkt_location[MAXPATHLEN];
- char *krb_get_phost();
- extern int noticketsdontcomplain;
-
-#ifdef KLOGIN_PARANOID
- AUTH_DAT authdata;
- KTEXT_ST ticket;
- struct hostent *hp;
- unsigned long faddr;
-
- noticketsdontcomplain = 0; /* enable warning message */
-#endif
-
- /*
- * Root logins don't use Kerberos.
- * If we have a realm, try getting a ticket-granting ticket
- * and using it to authenticate. Otherwise, return
- * failure so that we can try the normal passwd file
- * for a password. If that's ok, log the user in
- * without issuing any tickets.
- */
- if (strcmp(pw->pw_name, "root") == 0 ||
- krb_get_lrealm(realm, 0) != KSUCCESS)
- return (1);
-
- noticketsdontcomplain = 0; /* enable warning message */
-
- /*
- * get TGT for local realm
- * tickets are stored in a file named TKT_ROOT plus uid
- * except for user.root tickets.
- */
-
- if (strcmp(instance, "root") != 0)
- (void)sprintf(tkt_location, "%s%d", TKT_ROOT, pw->pw_uid);
- else {
- (void)sprintf(tkt_location, "%s_root_%d", TKT_ROOT, pw->pw_uid);
- krbtkfile_env = tkt_location;
- }
- (void)krb_set_tkt_string(tkt_location);
-
- /*
- * Set real as well as effective ID to 0 for the moment,
- * to make the kerberos library do the right thing.
- */
- if (setuid(0) < 0) {
- warnx("setuid");
- return (1);
- }
- kerror = krb_get_pw_in_tkt(pw->pw_name, instance,
- realm, INITIAL_TICKET, realm, DEFAULT_TKT_LIFE, password);
-
- /*
- * If we got a TGT, get a local "rcmd" ticket and check it so as to
- * ensure that we are not talking to a bogus Kerberos server.
- *
- * There are 2 cases where we still allow a login:
- * 1: the VERIFY_SERVICE doesn't exist in the KDC
- * 2: local host has no srvtab, as (hopefully) indicated by a
- * return value of RD_AP_UNDEC from krb_rd_req().
- */
- if (kerror != INTK_OK) {
- if (kerror != INTK_BADPW && kerror != KDC_PR_UNKNOWN) {
- syslog(LOG_ERR, "Kerberos intkt error: %s",
- krb_err_txt[kerror]);
- dest_tkt();
- }
- return (1);
- }
-
- if (chown(TKT_FILE, pw->pw_uid, pw->pw_gid) < 0)
- syslog(LOG_ERR, "chown tkfile (%s): %m", TKT_FILE);
-
- (void)strncpy(savehost, krb_get_phost(localhost), sizeof(savehost));
- savehost[sizeof(savehost)-1] = NULL;
-
-#ifdef KLOGIN_PARANOID
- /*
- * if the "VERIFY_SERVICE" doesn't exist in the KDC for this host,
- * still allow login with tickets, but log the error condition.
- */
-
- kerror = krb_mk_req(&ticket, VERIFY_SERVICE, savehost, realm, 33);
- if (kerror == KDC_PR_UNKNOWN) {
- syslog(LOG_NOTICE,
- "warning: TGT not verified (%s); %s.%s not registered, or srvtab is wrong?",
- krb_err_txt[kerror], VERIFY_SERVICE, savehost);
- notickets = 0;
- return (0);
- }
-
- if (kerror != KSUCCESS) {
- warnx("unable to use TGT: (%s)", krb_err_txt[kerror]);
- syslog(LOG_NOTICE, "unable to use TGT: (%s)",
- krb_err_txt[kerror]);
- dest_tkt();
- return (1);
- }
-
- if (!(hp = gethostbyname(localhost))) {
- syslog(LOG_ERR, "couldn't get local host address");
- dest_tkt();
- return (1);
- }
-
- memmove((void *)&faddr, (void *)hp->h_addr, sizeof(faddr));
-
- kerror = krb_rd_req(&ticket, VERIFY_SERVICE, savehost, faddr,
- &authdata, "");
-
- if (kerror == KSUCCESS) {
- notickets = 0;
- return (0);
- }
-
- /* undecipherable: probably didn't have a srvtab on the local host */
- if (kerror == RD_AP_UNDEC) {
- syslog(LOG_NOTICE, "krb_rd_req: (%s)\n", krb_err_txt[kerror]);
- dest_tkt();
- return (1);
- }
- /* failed for some other reason */
- warnx("unable to verify %s ticket: (%s)", VERIFY_SERVICE,
- krb_err_txt[kerror]);
- syslog(LOG_NOTICE, "couldn't verify %s ticket: %s", VERIFY_SERVICE,
- krb_err_txt[kerror]);
- dest_tkt();
- return (1);
-#else
- notickets = 0;
- return (0);
-#endif
-}
-#endif
diff --git a/lib/libpam/modules/pam_login_access/login.access.5 b/lib/libpam/modules/pam_login_access/login.access.5
deleted file mode 100644
index 80c9afa..0000000
--- a/lib/libpam/modules/pam_login_access/login.access.5
+++ /dev/null
@@ -1,50 +0,0 @@
-.\" this is comment
-.Dd April 30, 1994
-.Dt LOGIN.ACCESS 5
-.Os FreeBSD 1.2
-.Sh NAME
-.Nm login.access
-.Nd login access control table
-.Sh DESCRIPTION
-The
-.Nm
-file specifies (user, host) combinations and/or (user, tty)
-combinations for which a login will be either accepted or refused.
-.Pp
-When someone logs in, the
-.Nm
-is scanned for the first entry that
-matches the (user, host) combination, or, in case of non-networked
-logins, the first entry that matches the (user, tty) combination. The
-permissions field of that table entry determines whether the login will
-be accepted or refused.
-.Pp
-Each line of the login access control table has three fields separated by a
-":" character: permission : users : origins
-.Pp
-The first field should be a "+" (access granted) or "-" (access denied)
-character. The second field should be a list of one or more login names,
-group names, or ALL (always matches). The third field should be a list
-of one or more tty names (for non-networked logins), host names, domain
-names (begin with "."), host addresses, internet network numbers (end
-with "."), ALL (always matches) or LOCAL (matches any string that does
-not contain a "." character). If you run NIS you can use @netgroupname
-in host or user patterns.
-.Pp
-The EXCEPT operator makes it possible to write very compact rules.
-.Pp
-The group file is searched only when a name does not match that of the
-logged-in user. Only groups are matched in which users are explicitly
-listed: the program does not look at a user's primary group id value.
-.Sh FILES
-.Bl -tag -width /etc/login.access -compact
-.It Pa /etc/login.access
-The
-.Nm
-file resides in
-.Pa /etc .
-.El
-.Sh SEE ALSO
-.Xr login 1
-.Sh AUTHOR
-Guido van Rooij
diff --git a/lib/libpam/modules/pam_login_access/login_access.c b/lib/libpam/modules/pam_login_access/login_access.c
deleted file mode 100644
index cfb24d2..0000000
--- a/lib/libpam/modules/pam_login_access/login_access.c
+++ /dev/null
@@ -1,239 +0,0 @@
- /*
- * This module implements a simple but effective form of login access
- * control based on login names and on host (or domain) names, internet
- * addresses (or network numbers), or on terminal line names in case of
- * non-networked logins. Diagnostics are reported through syslog(3).
- *
- * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
- */
-
-#ifdef LOGIN_ACCESS
-#ifndef lint
-static const char sccsid[] = "%Z% %M% %I% %E% %U%";
-#endif
-
-#include <stdio.h>
-#include <syslog.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <grp.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-#include "pathnames.h"
-
- /* Delimiters for fields and for lists of users, ttys or hosts. */
-
-static char fs[] = ":"; /* field separator */
-static char sep[] = ", \t"; /* list-element separator */
-
- /* Constants to be used in assignments only, not in comparisons... */
-
-#define YES 1
-#define NO 0
-
-static int list_match();
-static int user_match();
-static int from_match();
-static int string_match();
-
-/* login_access - match username/group and host/tty with access control file */
-
-int
-login_access(user, from)
-char *user;
-char *from;
-{
- FILE *fp;
- char line[BUFSIZ];
- char *perm; /* becomes permission field */
- char *users; /* becomes list of login names */
- char *froms; /* becomes list of terminals or hosts */
- int match = NO;
- int end;
- int lineno = 0; /* for diagnostics */
-
- /*
- * Process the table one line at a time and stop at the first match.
- * Blank lines and lines that begin with a '#' character are ignored.
- * Non-comment lines are broken at the ':' character. All fields are
- * mandatory. The first field should be a "+" or "-" character. A
- * non-existing table means no access control.
- */
-
- if ((fp = fopen(_PATH_LOGACCESS, "r")) != NULL) {
- while (!match && fgets(line, sizeof(line), fp)) {
- lineno++;
- if (line[end = strlen(line) - 1] != '\n') {
- syslog(LOG_ERR, "%s: line %d: missing newline or line too long",
- _PATH_LOGACCESS, lineno);
- continue;
- }
- if (line[0] == '#')
- continue; /* comment line */
- while (end > 0 && isspace(line[end - 1]))
- end--;
- line[end] = 0; /* strip trailing whitespace */
- if (line[0] == 0) /* skip blank lines */
- continue;
- if (!(perm = strtok(line, fs))
- || !(users = strtok((char *) 0, fs))
- || !(froms = strtok((char *) 0, fs))
- || strtok((char *) 0, fs)) {
- syslog(LOG_ERR, "%s: line %d: bad field count", _PATH_LOGACCESS,
- lineno);
- continue;
- }
- if (perm[0] != '+' && perm[0] != '-') {
- syslog(LOG_ERR, "%s: line %d: bad first field", _PATH_LOGACCESS,
- lineno);
- continue;
- }
- match = (list_match(froms, from, from_match)
- && list_match(users, user, user_match));
- }
- (void) fclose(fp);
- } else if (errno != ENOENT) {
- syslog(LOG_ERR, "cannot open %s: %m", _PATH_LOGACCESS);
- }
- return (match == 0 || (line[0] == '+'));
-}
-
-/* list_match - match an item against a list of tokens with exceptions */
-
-static int list_match(list, item, match_fn)
-char *list;
-char *item;
-int (*match_fn) ();
-{
- char *tok;
- int match = NO;
-
- /*
- * Process tokens one at a time. We have exhausted all possible matches
- * when we reach an "EXCEPT" token or the end of the list. If we do find
- * a match, look for an "EXCEPT" list and recurse to determine whether
- * the match is affected by any exceptions.
- */
-
- for (tok = strtok(list, sep); tok != 0; tok = strtok((char *) 0, sep)) {
- if (strcasecmp(tok, "EXCEPT") == 0) /* EXCEPT: give up */
- break;
- if ((match = (*match_fn)(tok, item)) != NULL) /* YES */
- break;
- }
- /* Process exceptions to matches. */
-
- if (match != NO) {
- while ((tok = strtok((char *) 0, sep)) && strcasecmp(tok, "EXCEPT"))
- /* VOID */ ;
- if (tok == 0 || list_match((char *) 0, item, match_fn) == NO)
- return (match);
- }
- return (NO);
-}
-
-/* netgroup_match - match group against machine or user */
-
-static int netgroup_match(group, machine, user)
-gid_t group;
-char *machine;
-char *user;
-{
-#ifdef NIS
- static char *mydomain = 0;
-
- if (mydomain == 0)
- yp_get_default_domain(&mydomain);
- return (innetgr(group, machine, user, mydomain));
-#else
- syslog(LOG_ERR, "NIS netgroup support not configured");
- return 0;
-#endif
-}
-
-/* user_match - match a username against one token */
-
-static int user_match(tok, string)
-char *tok;
-char *string;
-{
- struct group *group;
- int i;
-
- /*
- * If a token has the magic value "ALL" the match always succeeds.
- * Otherwise, return YES if the token fully matches the username, or if
- * the token is a group that contains the username.
- */
-
- if (tok[0] == '@') { /* netgroup */
- return (netgroup_match(tok + 1, (char *) 0, string));
- } else if (string_match(tok, string)) { /* ALL or exact match */
- return (YES);
- } else if ((group = getgrnam(tok)) != NULL) {/* try group membership */
- for (i = 0; group->gr_mem[i]; i++)
- if (strcasecmp(string, group->gr_mem[i]) == 0)
- return (YES);
- }
- return (NO);
-}
-
-/* from_match - match a host or tty against a list of tokens */
-
-static int from_match(tok, string)
-char *tok;
-char *string;
-{
- int tok_len;
- int str_len;
-
- /*
- * If a token has the magic value "ALL" the match always succeeds. Return
- * YES if the token fully matches the string. If the token is a domain
- * name, return YES if it matches the last fields of the string. If the
- * token has the magic value "LOCAL", return YES if the string does not
- * contain a "." character. If the token is a network number, return YES
- * if it matches the head of the string.
- */
-
- if (tok[0] == '@') { /* netgroup */
- return (netgroup_match(tok + 1, string, (char *) 0));
- } else if (string_match(tok, string)) { /* ALL or exact match */
- return (YES);
- } else if (tok[0] == '.') { /* domain: match last fields */
- if ((str_len = strlen(string)) > (tok_len = strlen(tok))
- && strcasecmp(tok, string + str_len - tok_len) == 0)
- return (YES);
- } else if (strcasecmp(tok, "LOCAL") == 0) { /* local: no dots */
- if (strchr(string, '.') == 0)
- return (YES);
- } else if (tok[(tok_len = strlen(tok)) - 1] == '.' /* network */
- && strncmp(tok, string, tok_len) == 0) {
- return (YES);
- }
- return (NO);
-}
-
-/* string_match - match a string against one token */
-
-static int string_match(tok, string)
-char *tok;
-char *string;
-{
-
- /*
- * If the token has the magic value "ALL" the match always succeeds.
- * Otherwise, return YES if the token fully matches the string.
- */
-
- if (strcasecmp(tok, "ALL") == 0) { /* all: always matches */
- return (YES);
- } else if (strcasecmp(tok, string) == 0) { /* try exact match */
- return (YES);
- }
- return (NO);
-}
-#endif /* LOGIN_ACCES */
diff --git a/lib/libpcap/Makefile b/lib/libpcap/Makefile
deleted file mode 100644
index 2a12962..0000000
--- a/lib/libpcap/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-# Makefile for libpcap
-# $Id: Makefile,v 1.17 1997/10/05 09:39:25 jkh Exp $
-
-LIB= pcap
-SRCS= grammar.c tokdefs.h pcap-bpf.c \
- pcap.c inet.c gencode.c optimize.c nametoaddr.c \
- etherent.c savefile.c bpf_filter.c bpf_image.c \
- scanner.c
-MAN3= pcap.3
-CLEANFILES+= tokdefs.h grammar.c scanner.c y.tab.c y.tab.h
-
-DEFS= -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 \
- -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 \
- -DHAVE_SOCKADDR_SA_LEN=1 -DLBL_ALIGN=1
-
-CFLAGS+=-I. -Dyylval=pcap_lval ${DEFS}
-
-SHLIB_MAJOR=2
-SHLIB_MINOR=2
-
-#
-# Magic to grab sources out of src/contrib
-#
-PCAP_DISTDIR?=${.CURDIR}/../../contrib/libpcap
-CFLAGS+=-I${PCAP_DISTDIR} -I${PCAP_DISTDIR}/lbl -I${PCAP_DISTDIR}/bpf
-.PATH: ${PCAP_DISTDIR}
-.PATH: ${PCAP_DISTDIR}/bpf/net
-
-beforeinstall:
-.for i in pcap.h pcap-int.h pcap-namedb.h
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${PCAP_DISTDIR}/$i \
- ${DESTDIR}/usr/include
-.endfor
-
-.ORDER: grammar.c tokdefs.h
-tokdefs.h grammar.c: grammar.y
- ${YACC} ${YACCFLAGS} -d ${PCAP_DISTDIR}/grammar.y
- mv y.tab.c grammar.c
- mv y.tab.h tokdefs.h
-
-.include <bsd.lib.mk>
diff --git a/lib/libpthread/Makefile b/lib/libpthread/Makefile
deleted file mode 100644
index 363f308..0000000
--- a/lib/libpthread/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# $Id$
-#
-# All library objects contain rcsid strings by default; they may be
-# excluded as a space-saving measure. To produce a library that does
-# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
-# from CFLAGS below. To remove these strings from just the system call
-# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
-LIB=c_r
-SHLIB_MAJOR= 3
-SHLIB_MINOR= 0
-CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS
-CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
-AINC= -I${.CURDIR}/../libc/${MACHINE} -I${.CURDIR}/uthread
-PRECIOUSLIB= yes
-
-.include "${.CURDIR}/../libc/Makefile.inc"
-.include "${.CURDIR}/man/Makefile.inc"
-.include "${.CURDIR}/uthread/Makefile.inc"
-.include "${.CURDIR}/sys/Makefile.inc"
-
-.include <bsd.lib.mk>
diff --git a/lib/libpthread/man/Makefile.inc b/lib/libpthread/man/Makefile.inc
deleted file mode 100644
index 7d67fb8..0000000
--- a/lib/libpthread/man/Makefile.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-# $Id$
-
-# POSIX thread man files
-
-.PATH: ${.CURDIR}/man
-
-MAN3+= pthread_create.3 \
- pthread_detach.3 \
- pthread_equal.3 \
- pthread_exit.3 \
- pthread_getspecific.3 \
- pthread_join.3 \
- pthread_key_create.3 \
- pthread_key_delete.3 \
- pthread_once.3 \
- pthread_self.3 \
- pthread_setspecific.3
diff --git a/lib/libpthread/man/pthread_create.3 b/lib/libpthread/man/pthread_create.3
deleted file mode 100644
index aa81588..0000000
--- a/lib/libpthread/man/pthread_create.3
+++ /dev/null
@@ -1,109 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_CREATE 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_create
-.Nd create a new thread
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_create "pthread_t *thread" "const pthread_attr_t *attr" "void *(*start_routine)(void *)" "void *arg"
-.Sh DESCRIPTION
-The
-.Fn pthread_create
-function is used to create a new thread, with attributes specified by
-.Fa attr ,
-within a process. If
-.Fa attr
-is NULL, the default attributes are used. If the attributes specified by
-.Fa attr
-are modified later, the thread's attributes are not affected. Upon
-successful completion
-.Fn pthread_create
-will store the ID of the created thread in the location specified by
-.Fa thread .
-.Pp
-The thread is created executing
-.Fa start_routine
-with
-.Fa arg
-as its sole argument. If the
-.Fa start_routine
-returns, the effect is as if there was an implicit call to
-.Fn pthread_exit
-using the return value of
-.Fa start_toutine
-as the exit status. Note that the thread in which
-.Fn main
-was originally invoked differs from this. When it returns from
-.Fn main ,
-the effect is as if there was an implicit call to
-.Fn exit using the return value of
-.Fn main
-as the exit status.
-.Pp
-The signal state of the new thread is initialized as:
-.Bl -bullet -offset indent
-.It
-The signal mask is inherited from the creating thread.
-.It
-The set of signals pending for the new thread is empty.
-.El
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_create
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_create
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EAGAIN
-The system lacked the necessary resources to create another thread, or
-the system-imposed limit on the total number of threads in a process
-[PTHREAD_THREADS_MAX] would be exceeded.
-.It Bq Er EINVAL
-The value specified by
-.Fa attr
-is invalid.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr fork 2 ,
-.Xr pthread_exit 3 ,
-.Xr pthread_join 3
-.Sh STANDARDS
-.Fn pthread_create
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_detach.3 b/lib/libpthread/man/pthread_detach.3
deleted file mode 100644
index d2a60dd..0000000
--- a/lib/libpthread/man/pthread_detach.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_DETACH 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_detach
-.Nd detach a thread
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_detach "pthread_t thread"
-.Sh DESCRIPTION
-The
-.Fn pthread_detach
-function is used to indicate to the implementation that storage for the
-thread
-.Fa thread
-can be reclaimed when the thread terminates. If
-.Fa thread
-has not terminated,
-.Fn pthread_detach
-will not cause it to terminate. The effect of multiple
-.Fn pthread_detach
-calls on the same target thread is unspecified.
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_detach
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_detach
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The implementation has detected that the value specified by
-.Fa thread
-does not refer to a joinable thread.
-.It Bq Er ESRCH
-No thread could be found corresponding to that specified by the given
-thread ID,
-.Fa thread .
-.El
-.Pp
-.Sh SEE ALSO
-.Xr pthread_join 3
-.Sh STANDARDS
-.Fn pthread_detach
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_equal.3 b/lib/libpthread/man/pthread_equal.3
deleted file mode 100644
index 3324855..0000000
--- a/lib/libpthread/man/pthread_equal.3
+++ /dev/null
@@ -1,66 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_EQUAL 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_equal
-.Nd compare thread IDs
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_equal "pthread_t t1" "pthread_t t2"
-.Sh DESCRIPTION
-The
-.Fn pthread_equal
-function compares the thread IDs
-.Fa t1
-and
-.Fa t2 .
-.Sh RETURN VALUES
-The
-.Fn pthread_equal
-function will non-zero if the thread IDs
-.Fa t1
-and
-.Fa t2
-correspond to the same thread, otherwise it will return zero.
-.Sh ERRORS
-None.
-.Pp
-.Sh SEE ALSO
-.Xr pthread_create 3 ,
-.Xr pthread_exit 3
-.Sh STANDARDS
-.Fn pthread_equal
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_exit.3 b/lib/libpthread/man/pthread_exit.3
deleted file mode 100644
index aad365e..0000000
--- a/lib/libpthread/man/pthread_exit.3
+++ /dev/null
@@ -1,99 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_EXIT 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_exit
-.Nd terminate the calling thread
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft void
-.Fn pthread_exit "void *value_ptr"
-.Sh DESCRIPTION
-The
-.Fn pthread_exit
-function terminates the calling thread and makes the value
-.Fa value_ptr
-available to any successful join with the terminating thread. Any
-cancellation cleanup handlers that have been pushed and are not yet popped
-are popped in the reverse order that they were pushed and then executed.
-After all cancellation handlers have been executed, if the thread has any
-thread-specific data, appropriate destructor functions are called in an
-unspecified order. Thread termination does not release any application
-visible process resources, including, but not limited to, mutexes and
-file descriptors, nor does it perform any process level cleanup
-actions, including, but not limited to, calling
-.Fn atexit
-routines that may exist.
-.Pp
-An implicit call to
-.Fn pthread_exit
-is made when a thread other than the thread in which
-.Fn main
-was first invoked returns from the start routine that was used to create
-it. The function's return value serves as the thread's exit status.
-.Pp
-The behavior of
-.Fn pthread_exit
-is undefied if called from a cancellation handler or destructor function
-that was invoked as the result of an implicit or explicit call to
-.Fn pthread_exit .
-.Pp
-After a thread has terminated, the result of access to local (auto)
-variables of the thread is undefined. Thus, references to local variables
-of the exiting thread should not be used for the
-.Fn pthread_exit
-.Fa value_ptr
-parameter value.
-.Pp
-The process will exit with an exit status of 0 after the last thread has
-been terminated. The behavior is as if the implementation called
-.Fn exit
-with a zero argument at thread termination time.
-.Pp
-.Sh RETURN VALUES
-The
-.Fn pthread_exit
-function cannot return to its caller.
-.Sh ERRORS
-None.
-.Pp
-.Sh SEE ALSO
-.Xr _exit 2 ,
-.Xr exit 2 ,
-.Xr pthread_create 3 ,
-.Xr pthread_join 3
-.Sh STANDARDS
-.Fn pthread_exit
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_getspecific.3 b/lib/libpthread/man/pthread_getspecific.3
deleted file mode 100644
index b53841e..0000000
--- a/lib/libpthread/man/pthread_getspecific.3
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id$
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_GETSPECIFIC 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_getspecific
-.Nd get a thread-specific data value
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft void *
-.Fn pthread_getspecific "pthread_key_t key"
-.Sh DESCRIPTION
-The
-.Fn pthread_getspecific
-function returns the value currently bound to the specified
-.Fa key
-on behalf of the calling thread.
-.Pp
-The effect of calling
-.Fn pthread_getspecific
-with a
-.Fa key
-value not obtained from
-.Fn pthread_key_create
-or after
-.Fa key
-has been deleted with
-.Fn pthread_key_delete
-is undefined.
-.Pp
-.Fn pthread_getspecific
-may be called from a thread-specific data destructor function.
-.Sh RETURN VALUES
-The
-.Fn pthread_getspecific
-function will return the thread-specific data value associated with the given
-.Fa key .
-If no thread-specific data value is associated with
-.Fa key ,
-then the value NULL is returned.
-.Sh ERRORS
-None.
-.Sh SEE ALSO
-.Xr pthread_key_create 3 ,
-.Xr pthread_key_delete 3 ,
-.Xr pthread_setspecific 3
-.Sh STANDARDS
-.Fn pthread_getspecific
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_join.3 b/lib/libpthread/man/pthread_join.3
deleted file mode 100644
index cabf319..0000000
--- a/lib/libpthread/man/pthread_join.3
+++ /dev/null
@@ -1,100 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_JOIN 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_join
-.Nd wait for thread termination
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_join "pthread_t thread" "void **value_ptr"
-.Sh DESCRIPTION
-The
-.Fn pthread_join
-function suspends execution of the calling thread until the target
-.Fa thread
-terminates unless the target
-.Fa thread
-has already terminated.
-.Pp
-On return from a successful
-.Fn pthread_join
-call with a non-NULL
-.Fa value_ptr
-argument, the value passed to
-.Fn pthread_exit
-by the terminating thread is stored in the location referenced by
-.Fa value_ptr .
-When a
-.Fn pthread_join
-returns successfully, the target thread has been terminated. The results
-of multiple simultaneous calls to
-.Fn pthread_join
-specifying the same target thread are undefined. If the thread calling
-.Fn pthread_join
-is cancelled, then the target thread is not detached.
-.Pp
-A thread that has exited but remains unjoined counts against
-[_POSIX_THREAD_THREADS_MAX].
-.Pp
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_join
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_join
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The implementation has detected that the value specified by
-.Fa thread
-does not refer to a joinable thread.
-.It Bq Er ESRCH
-No thread could be found corresponding to that specified by the given
-thread ID,
-.Fa thread .
-.It Bq Er EDEADLK
-A deadlock was detected or the value of
-.Fa thread
-specifies the calling thread.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr wait 2 ,
-.Xr pthread_create 3
-.Sh STANDARDS
-.Fn pthread_join
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_key_create.3 b/lib/libpthread/man/pthread_key_create.3
deleted file mode 100644
index 25165ce..0000000
--- a/lib/libpthread/man/pthread_key_create.3
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_KEY_CREATE 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_key_create
-.Nd thread-specific data key creation
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_key_create "pthread_key_t *key" "void (*destructor)(void *)"
-.Sh DESCRIPTION
-The
-.Fn pthread_key_create
-function creates a thread-specific data key visible to all threads in the
-process. Key values provided by
-.Fn pthread_key_create
-are opaque objects used to locate thread-specific data. Although the same
-key value may be used by different threads, the values bound to the key
-by
-.Fn pthread_setspecific
-are maintained on a per-thread basis and persist for the life of the calling
-thread.
-.Pp
-Upon key creation, the value NULL is associated with the new key in all
-active threads. Upon thread creation, the value NULL is associated with all
-defined keys in the new thread.
-.Pp
-An optional destructor function may be associated with each key value. At
-thread exit, if a key value has a non-NULL destructor pointer, and the
-thread has a non-NULL value associated with the key, the function pointed
-to is called with the current associated value as its sole argument. The
-order of destructor calls is unspecified if more than one destructor exists
-for a thread when it exits.
-.Pp
-If, after all the destructors have been called for all non-NULL values
-with associated destructors, there are still some non-NULL values with
-associated destructors, then the process is repeated. If, after at least
-[PTHREAD_DESTRUCTOR_ITERATIONS] iterations of destructor calls for
-outstanding non-NULL values, there are still some non-NULL values with
-associated destructors, the implementation stops calling destructors.
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_key_create
-function will store the newly created key value at the location specified by
-.Fa key
-and returns zero. Otherwise an error number will be returned to indicate
-the error.
-.Sh ERRORS
-.Fn pthread_key_create
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EAGAIN
-The system lacked the necessary resources to create another thread-specific
-data key, or the system-imposed limit on the total number of keys per process
-[PTHREAD_KEYS_MAX] would be exceeded.
-.It Bq Er ENOMEM
-Insufficient memory exists to create the key.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr pthread_getspecific 3 ,
-.Xr pthread_key_delete 3 ,
-.Xr pthread_setspecific 3
-.Sh STANDARDS
-.Fn pthread_key_create
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_key_delete.3 b/lib/libpthread/man/pthread_key_delete.3
deleted file mode 100644
index badfa8c..0000000
--- a/lib/libpthread/man/pthread_key_delete.3
+++ /dev/null
@@ -1,92 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_KEY_DELETE 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_key_delete
-.Nd delete a thread-specific data key
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_key_delete "pthread_key_t key"
-.Sh DESCRIPTION
-The
-.Fn pthread_key_delete
-function deletes a thread-specific data key previously returned by
-.Fn pthread_key_create .
-The thread-specific data values associated with
-.Fa key
-need not be NULL at the time that
-.Fn pthread_key_delete
-is called. It is the responsibility of the application to free any
-application storage or perform any cleanup actions for data structures
-related to the deleted key or associated thread-specific data in any threads;
-this cleanup can be done either before or after
-.Fn pthread_key_delete
-is called. Any attempt to use
-.Fa key
-following the call to
-.Fn pthread_key_delete
-results in undefined behavior.
-.Pp
-The
-.Fn pthread_key_delete
-function is callable from within destructor functions. Destructor functions
-are not invoked by
-.Fn pthread_key_delete .
-Any destructor function that may have been associated with
-.Fa key
-will no longer be called upon thread exit.
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_key_delete
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_key_delete
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-The
-.Fa key
-value is invalid.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr pthread_getspecific 3 ,
-.Xr pthread_key_create 3 ,
-.Xr pthread_setspecific 3
-.Sh STANDARDS
-.Fn pthread_key_delete
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_once.3 b/lib/libpthread/man/pthread_once.3
deleted file mode 100644
index 9ade42f..0000000
--- a/lib/libpthread/man/pthread_once.3
+++ /dev/null
@@ -1,100 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_ONCE 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_once
-.Nd dynamic package initialization
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Pp
-pthread_once
-.Fa once_control
-= PTHREAD_ONCE_INIT;
-.Ft int
-.Fn pthread_once "pthread_once_t *once_control" "void *(*init_routine)(void)"
-.Sh DESCRIPTION
-The first call to
-.Fn pthread_once
-by any thread in a process, with a given
-.Fa once_control ,
-will call the
-.Fn init_routine
-with no arguments. Subsequent calls to
-.Fn pthread_once
-with the same
-.Fa once_control
-will not call the
-.Fn init_routine .
-On return from
-.Fn pthread_once ,
-it is guaranteed that
-.Fn init_routine
-has completed. The
-.Fa once_control
-parameter is used to determine whether the associated initialization
-routine has been called.
-.Pp
-The function
-.Fn pthread_once
-is not a cancellation point. However, if
-.Fn init_routine
-is a cancellation point and is cancelled, the effect on
-.Fa once_control is as if
-.Fn pthread_once
-was never called.
-.Pp
-The constant
-.Fa PTHREAD_ONCE_INIT
-is defined by header
-.Aq Pa pthread.h .
-.Pp
-The behavior of
-.Fn pthread_once
-is undefined if
-.Fa once_control
-has automatic storage duration or is not initialized by
-.Fa PTHREAD_ONCE_INIT .
-.Pp
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_once
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-None.
-.Pp
-.Sh STANDARDS
-.Fn pthread_once
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_self.3 b/lib/libpthread/man/pthread_self.3
deleted file mode 100644
index 9ba0ee6..0000000
--- a/lib/libpthread/man/pthread_self.3
+++ /dev/null
@@ -1,59 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_SELF 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_self
-.Nd get the calling thread's ID
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft pthread_t
-.Fn pthread_self "void"
-.Sh DESCRIPTION
-The
-.Fn pthread_self
-function returns the thread ID of the calling thread.
-.Sh RETURN VALUES
-The
-.Fn pthread_self
-function returns the thread ID of the calling thread.
-.Sh ERRORS
-None.
-.Pp
-.Sh SEE ALSO
-.Xr pthread_create 3 ,
-.Xr pthread_equal 3
-.Sh STANDARDS
-.Fn pthread_self
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/man/pthread_setspecific.3 b/lib/libpthread/man/pthread_setspecific.3
deleted file mode 100644
index 838b587..0000000
--- a/lib/libpthread/man/pthread_setspecific.3
+++ /dev/null
@@ -1,91 +0,0 @@
-.\" Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by John Birrell.
-.\" 4. Neither the name of the author nor the names of any co-contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.Dd April 4, 1996
-.Dt PTHREAD_SETSPECIFIC 3
-.Os BSD 4
-.Sh NAME
-.Nm pthread_setspecific
-.Nd set a thread-specific data value
-.Sh SYNOPSIS
-.Fd #include <pthread.h>
-.Ft int
-.Fn pthread_setspecific "pthread_key_t key" "const void *value"
-.Sh DESCRIPTION
-The
-.Fn pthread_setspecific
-function associates a thread-specific value with a
-.Fa key
-obtained via a previous call to
-.Fn pthread_key_create .
-Different threads man bind different values to the same key. These values are
-typically pointers to blocks of dynamically allocated memory that have been
-reserved for use by the calling thread.
-.Pp
-The effect of calling
-.Fn pthread_setspecific
-with a key value not obtained from
-.Fn pthread_key_create
-or after
-.Fa key
-has been deleted with
-.Fn pthread_key_delete
-is undefined.
-.Pp
-.Fn pthread_setspecific
-may be called from a thread-specific data destructor function, however this
-may result in lost storage or infinite loops.
-.Sh RETURN VALUES
-If successful, the
-.Fn pthread_setspecific
-function will return zero. Otherwise an error number will be returned to
-indicate the error.
-.Sh ERRORS
-.Fn pthread_setspecific
-will fail if:
-.Bl -tag -width Er
-.It Bq Er ENOMEM
-Insufficient memory exists to associate the value with the
-.Fa key .
-.It Bq Er EINVAL
-The
-.Fa key
-value is invalid.
-.El
-.Pp
-.Sh SEE ALSO
-.Xr pthread_getspecific 3 ,
-.Xr pthread_key_create 3 ,
-.Xr pthread_key_delete 3
-.Sh STANDARDS
-.Fn pthread_setspecific
-is expected to conform to IEEE
-.Pq Dq Tn POSIX
-Std 1003.1c when it is published.
diff --git a/lib/libpthread/sys/Makefile.inc b/lib/libpthread/sys/Makefile.inc
deleted file mode 100644
index 16fd33d..0000000
--- a/lib/libpthread/sys/Makefile.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-
-.PATH: ${.CURDIR}/sys
-
-SRCS+= __error.c
diff --git a/lib/libpthread/thread/Makefile.inc b/lib/libpthread/thread/Makefile.inc
deleted file mode 100644
index 4f1b308..0000000
--- a/lib/libpthread/thread/Makefile.inc
+++ /dev/null
@@ -1,94 +0,0 @@
-# $Id: Makefile.inc,v 1.9 1997/05/06 00:49:36 jdp Exp $
-
-# uthread sources
-.PATH: ${.CURDIR}/uthread
-
-SRCS+= \
- uthread_accept.c \
- uthread_attr_destroy.c \
- uthread_attr_init.c \
- uthread_attr_getdetachstate.c \
- uthread_attr_getstackaddr.c \
- uthread_attr_getstacksize.c \
- uthread_attr_setcreatesuspend_np.c \
- uthread_attr_setdetachstate.c \
- uthread_attr_setstackaddr.c \
- uthread_attr_setstacksize.c \
- uthread_autoinit.cc \
- uthread_bind.c \
- uthread_clean.c \
- uthread_close.c \
- uthread_cond.c \
- uthread_condattr_destroy.c \
- uthread_condattr_init.c \
- uthread_connect.c \
- uthread_create.c \
- uthread_detach.c \
- uthread_dup.c \
- uthread_dup2.c \
- uthread_equal.c \
- uthread_execve.c \
- uthread_exit.c \
- uthread_fchmod.c \
- uthread_fchown.c \
- uthread_fcntl.c \
- uthread_fd.c \
- uthread_file.c \
- uthread_flock.c \
- uthread_fork.c \
- uthread_fstat.c \
- uthread_fstatfs.c \
- uthread_fsync.c \
- uthread_getdirentries.c \
- uthread_getpeername.c \
- uthread_getprio.c \
- uthread_getsockname.c \
- uthread_getsockopt.c \
- uthread_info.c \
- uthread_init.c \
- uthread_ioctl.c \
- uthread_join.c \
- uthread_kern.c \
- uthread_kill.c \
- uthread_listen.c \
- uthread_longjmp.c \
- uthread_mattr_init.c \
- uthread_mattr_kind_np.c \
- uthread_multi_np.c \
- uthread_mutex.c \
- uthread_mutexattr_destroy.c \
- uthread_nanosleep.c \
- uthread_once.c \
- uthread_open.c \
- uthread_pipe.c \
- uthread_queue.c \
- uthread_read.c \
- uthread_readv.c \
- uthread_recvfrom.c \
- uthread_resume_np.c \
- uthread_select.c \
- uthread_self.c \
- uthread_sendto.c \
- uthread_seterrno.c \
- uthread_setjmp.c \
- uthread_setprio.c \
- uthread_setsockopt.c \
- uthread_shutdown.c \
- uthread_sig.c \
- uthread_sigaction.c \
- uthread_sigblock.c \
- uthread_single_np.c \
- uthread_sigmask.c \
- uthread_signal.c \
- uthread_sigprocmask.c \
- uthread_sigsetmask.c \
- uthread_sigsuspend.c \
- uthread_sigwait.c \
- uthread_socket.c \
- uthread_socketpair.c \
- uthread_spec.c \
- uthread_suspend_np.c \
- uthread_wait4.c \
- uthread_write.c \
- uthread_writev.c \
- uthread_yield.c
diff --git a/lib/libpthread/thread/thr_attr_destroy.c b/lib/libpthread/thread/thr_attr_destroy.c
deleted file mode 100644
index 1f4b2c8..0000000
--- a/lib/libpthread/thread/thr_attr_destroy.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_destroy(pthread_attr_t *attr)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL)
- /* Invalid argument: */
- ret = EINVAL;
- else {
- /* Free the memory allocated to the attribute object: */
- free(*attr);
-
- /*
- * Leave the attribute pointer NULL now that the memory
- * has been freed:
- */
- *attr = NULL;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_attr_getdetachstate.c b/lib/libpthread/thread/thr_attr_getdetachstate.c
deleted file mode 100644
index 4715cb6..0000000
--- a/lib/libpthread/thread/thr_attr_getdetachstate.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_getdetachstate(pthread_attr_t *attr, int *detachstate)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || detachstate == NULL)
- ret = EINVAL;
- else {
- /* Check if the detached flag is set: */
- if ((*attr)->flags & PTHREAD_DETACHED)
- /* Return detached: */
- *detachstate = PTHREAD_CREATE_DETACHED;
- else
- /* Return joinable: */
- *detachstate = PTHREAD_CREATE_JOINABLE;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_attr_getstackaddr.c b/lib/libpthread/thread/thr_attr_getstackaddr.c
deleted file mode 100644
index 1850a32..0000000
--- a/lib/libpthread/thread/thr_attr_getstackaddr.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_getstackaddr(pthread_attr_t *attr, void **stackaddr)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stackaddr == NULL)
- ret = EINVAL;
- else {
- /* Return the stack address: */
- *stackaddr = (*attr)->stackaddr_attr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_attr_getstacksize.c b/lib/libpthread/thread/thr_attr_getstacksize.c
deleted file mode 100644
index de81106..0000000
--- a/lib/libpthread/thread/thr_attr_getstacksize.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_getstacksize(pthread_attr_t *attr, size_t *stacksize)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stacksize == NULL)
- ret = EINVAL;
- else {
- /* Return the stack size: */
- *stacksize = (*attr)->stacksize_attr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_attr_init.c b/lib/libpthread/thread/thr_attr_init.c
deleted file mode 100644
index c64e29f..0000000
--- a/lib/libpthread/thread/thr_attr_init.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_init(pthread_attr_t *attr)
-{
- int ret;
- pthread_attr_t pattr;
-
- /* Allocate memory for the attribute object: */
- if ((pattr = (pthread_attr_t) malloc(sizeof(struct pthread_attr))) == NULL)
- /* Insufficient memory: */
- ret = ENOMEM;
- else {
- /* Initialise the attribute object with the defaults: */
- memcpy(pattr, &pthread_attr_default, sizeof(struct pthread_attr));
-
- /* Return a pointer to the attribute object: */
- *attr = pattr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c b/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c
deleted file mode 100644
index afe6b23..0000000
--- a/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_attr_setcreatesuspend_np(pthread_attr_t *attr)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- (*attr)->suspend = PTHREAD_CREATE_SUSPENDED;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_attr_setdetachstate.c b/lib/libpthread/thread/thr_attr_setdetachstate.c
deleted file mode 100644
index 6ec0dbc..0000000
--- a/lib/libpthread/thread/thr_attr_setdetachstate.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL ||
- (detachstate != PTHREAD_CREATE_DETACHED &&
- detachstate != PTHREAD_CREATE_JOINABLE))
- ret = EINVAL;
- else {
- /* Check if detached state: */
- if (detachstate == PTHREAD_CREATE_DETACHED)
- /* Set the detached flag: */
- (*attr)->flags |= PTHREAD_DETACHED;
- else
- /* Reset the detached flag: */
- (*attr)->flags &= ~PTHREAD_DETACHED;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_attr_setstackaddr.c b/lib/libpthread/thread/thr_attr_setstackaddr.c
deleted file mode 100644
index ce54915..0000000
--- a/lib/libpthread/thread/thr_attr_setstackaddr.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stackaddr == NULL)
- ret = EINVAL;
- else {
- /* Save the stack address: */
- (*attr)->stackaddr_attr = stackaddr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_attr_setstacksize.c b/lib/libpthread/thread/thr_attr_setstacksize.c
deleted file mode 100644
index 94e575e..0000000
--- a/lib/libpthread/thread/thr_attr_setstacksize.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize)
-{
- int ret;
-
- /* Check for invalid arguments: */
- if (attr == NULL || *attr == NULL || stacksize < PTHREAD_STACK_MIN)
- ret = EINVAL;
- else {
- /* Save the stack size: */
- (*attr)->stacksize_attr = stacksize;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_clean.c b/lib/libpthread/thread/thr_clean.c
deleted file mode 100644
index 9319f85..0000000
--- a/lib/libpthread/thread/thr_clean.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#include <stdlib.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-pthread_cleanup_push(void (*routine) (void *), void *routine_arg)
-{
- struct pthread_cleanup *new;
-
- if ((new = (struct pthread_cleanup *) malloc(sizeof(struct pthread_cleanup))) != NULL) {
- new->routine = routine;
- new->routine_arg = routine_arg;
- new->next = _thread_run->cleanup;
-
- _thread_run->cleanup = new;
- }
-}
-
-void
-pthread_cleanup_pop(int execute)
-{
- struct pthread_cleanup *old;
-
- if ((old = _thread_run->cleanup) != NULL) {
- _thread_run->cleanup = old->next;
- if (execute) {
- old->routine(old->routine_arg);
- }
- free(old);
- }
-}
-
-#endif
diff --git a/lib/libpthread/thread/thr_close.c b/lib/libpthread/thread/thr_close.c
deleted file mode 100644
index 26a8fbf..0000000
--- a/lib/libpthread/thread/thr_close.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-close(int fd)
-{
- int flags;
- int ret;
- int status;
- struct stat sb;
-
- /* Lock the file descriptor while the file is closed: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Get file descriptor status. */
- fstat(fd, &sb);
-
- /*
- * Check if the file should be left as blocking.
- *
- * This is so that the file descriptors shared with a parent
- * process aren't left set to non-blocking if the child
- * closes them prior to exit. An example where this causes
- * problems with /bin/sh is when a child closes stdin.
- *
- * Setting a file as blocking causes problems if a threaded
- * parent accesses the file descriptor before the child exits.
- * Once the threaded parent receives a SIGCHLD then it resets
- * all of its files to non-blocking, and so it is then safe
- * to access them.
- *
- * Pipes are not set to blocking when they are closed, as
- * the parent and child will normally close the file
- * descriptor of the end of the pipe that they are not
- * using, which would then cause any reads to block
- * indefinitely.
- */
- if ((S_ISREG(sb.st_mode) || S_ISCHR(sb.st_mode)) && (_thread_fd_table[fd]->flags & O_NONBLOCK) == 0) {
- /* Get the current flags: */
- flags = _thread_sys_fcntl(fd, F_GETFL, NULL);
- /* Clear the nonblocking file descriptor flag: */
- _thread_sys_fcntl(fd, F_SETFL, flags & ~O_NONBLOCK);
- }
-
- /* Close the file descriptor: */
- ret = _thread_sys_close(fd);
-
- /* Free the file descriptor table entry: */
- free(_thread_fd_table[fd]);
- _thread_fd_table[fd] = NULL;
-
- /* Unblock signals again: */
- _thread_kern_sig_unblock(status);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_cond.c b/lib/libpthread/thread/thr_cond.c
deleted file mode 100644
index 978ad04..0000000
--- a/lib/libpthread/thread/thr_cond.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_cond_init(pthread_cond_t * cond, const pthread_condattr_t * cond_attr)
-{
- enum pthread_cond_type type;
- pthread_cond_t pcond;
- int rval = 0;
-
- if (cond == NULL) {
- rval = EINVAL;
- } else {
- /*
- * Check if a pointer to a condition variable attribute
- * structure was passed by the caller:
- */
- if (cond_attr != NULL && *cond_attr != NULL) {
- /* Default to a fast condition variable: */
- type = (*cond_attr)->c_type;
- } else {
- /* Default to a fast condition variable: */
- type = COND_TYPE_FAST;
- }
-
- /* Process according to condition variable type: */
- switch (type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Check for no errors: */
- if (rval == 0) {
- if ((pcond = (pthread_cond_t)
- malloc(sizeof(struct pthread_cond))) == NULL) {
- rval = ENOMEM;
- } else {
- /*
- * Initialise the condition variable
- * structure:
- */
- _thread_queue_init(&pcond->c_queue);
- pcond->c_flags |= COND_FLAGS_INITED;
- pcond->c_type = type;
- *cond = pcond;
- }
- }
- }
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_destroy(pthread_cond_t * cond)
-{
- int rval = 0;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Check for errors: */
- if (rval == 0) {
- /* Destroy the contents of the condition structure: */
- _thread_queue_init(&(*cond)->c_queue);
- (*cond)->c_flags = 0;
- free(*cond);
- *cond = NULL;
- }
- }
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex)
-{
- int rval = 0;
- int status;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /*
- * Queue the running thread for the condition
- * variable:
- */
- _thread_queue_enq(&(*cond)->c_queue, _thread_run);
-
- /* Unlock the mutex: */
- pthread_mutex_unlock(mutex);
-
- /* Wait forever: */
- _thread_run->wakeup_time.tv_sec = -1;
-
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_COND_WAIT,
- __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Lock the mutex: */
- rval = pthread_mutex_lock(mutex);
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex,
- const struct timespec * abstime)
-{
- int rval = 0;
- int status;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Set the wakeup time: */
- _thread_run->wakeup_time.tv_sec = abstime->tv_sec;
- _thread_run->wakeup_time.tv_nsec = abstime->tv_nsec;
-
- /* Reset the timeout flag: */
- _thread_run->timeout = 0;
-
- /*
- * Queue the running thread for the condition
- * variable:
- */
- _thread_queue_enq(&(*cond)->c_queue, _thread_run);
-
- /* Unlock the mutex: */
- if ((rval = pthread_mutex_unlock(mutex)) != 0) {
- /*
- * Cannot unlock the mutex, so remove the
- * running thread from the condition
- * variable queue:
- */
- _thread_queue_deq(&(*cond)->c_queue);
- } else {
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_COND_WAIT,
- __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Lock the mutex: */
- if ((rval = pthread_mutex_lock(mutex)) != 0) {
- }
- /* Check if the wait timed out: */
- else if (_thread_run->timeout) {
- /* Return a timeout error: */
- rval = ETIMEDOUT;
- }
- }
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_signal(pthread_cond_t * cond)
-{
- int rval = 0;
- int status;
- pthread_t pthread;
-
- if (cond == NULL || *cond == NULL) {
- rval = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /* Bring the next thread off the condition queue: */
- if ((pthread = _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
- /* Allow the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-
-int
-pthread_cond_broadcast(pthread_cond_t * cond)
-{
- int rval = 0;
- int status;
- pthread_t pthread;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to condition variable type: */
- switch ((*cond)->c_type) {
- /* Fast condition variable: */
- case COND_TYPE_FAST:
- /*
- * Enter a loop to bring all threads off the
- * condition queue:
- */
- while ((pthread =
- _thread_queue_deq(&(*cond)->c_queue)) != NULL) {
- /* Allow the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- break;
-
- /* Trap invalid condition variable types: */
- default:
- /* Return an invalid argument error: */
- rval = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_condattr_destroy.c b/lib/libpthread/thread/thr_condattr_destroy.c
deleted file mode 100644
index 4179970..0000000
--- a/lib/libpthread/thread/thr_condattr_destroy.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_condattr_destroy(pthread_condattr_t *attr)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- ret = EINVAL;
- } else {
- free(*attr);
- *attr = NULL;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_condattr_init.c b/lib/libpthread/thread/thr_condattr_init.c
deleted file mode 100644
index c87323d..0000000
--- a/lib/libpthread/thread/thr_condattr_init.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_condattr_init(pthread_condattr_t *attr)
-{
- int ret;
- pthread_condattr_t pattr;
-
- if ((pattr = (pthread_condattr_t)
- malloc(sizeof(struct pthread_cond_attr))) == NULL) {
- ret = ENOMEM;
- } else {
- memcpy(pattr, &pthread_condattr_default,
- sizeof(struct pthread_cond_attr));
- *attr = pattr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c
deleted file mode 100644
index e4925a9..0000000
--- a/lib/libpthread/thread/thr_create.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/time.h>
-#ifdef _THREAD_SAFE
-#include <machine/reg.h>
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-_thread_create(pthread_t * thread, const pthread_attr_t * attr,
- void *(*start_routine) (void *), void *arg, pthread_t parent)
-{
- int i;
- int ret = 0;
- int status;
- pthread_t new_thread;
- pthread_attr_t pattr;
- void *stack;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Allocate memory for the thread structure: */
- if ((new_thread = (pthread_t) malloc(sizeof(struct pthread))) == NULL) {
- /* Insufficient memory to create a thread: */
- ret = EAGAIN;
- } else {
- /* Check if default thread attributes are required: */
- if (attr == NULL || *attr == NULL) {
- /* Use the default thread attributes: */
- pattr = &pthread_attr_default;
- } else {
- pattr = *attr;
- }
- /* Check if a stack was specified in the thread attributes: */
- if ((stack = pattr->stackaddr_attr) != NULL) {
- }
- /* Allocate memory for the stack: */
- else if ((stack = (void *) malloc(pattr->stacksize_attr)) == NULL) {
- /* Insufficient memory to create a thread: */
- ret = EAGAIN;
- free(new_thread);
- }
- /* Check for errors: */
- if (ret != 0) {
- } else {
- /* Initialise the thread structure: */
- memset(new_thread, 0, sizeof(struct pthread));
- new_thread->slice_usec = -1;
- new_thread->sig_saved = 0;
- new_thread->stack = stack;
- new_thread->start_routine = start_routine;
- new_thread->arg = arg;
- if (pattr->suspend == PTHREAD_CREATE_SUSPENDED) {
- PTHREAD_NEW_STATE(new_thread,PS_SUSPENDED);
- } else {
- PTHREAD_NEW_STATE(new_thread,PS_RUNNING);
- }
-
- /* Initialise the thread for signals: */
- new_thread->sigmask = _thread_run->sigmask;
-
- /*
- * Enter a loop to initialise the signal handler
- * array:
- */
- for (i = 1; i < NSIG; i++) {
- /* Default the signal handler: */
- sigfillset(&new_thread->act[i - 1].sa_mask);
- new_thread->act[i - 1].sa_handler = _thread_run->act[i - 1].sa_handler;
- new_thread->act[i - 1].sa_flags = _thread_run->act[i - 1].sa_flags;
- }
-
- /* Initialise the jump buffer: */
- _thread_sys_setjmp(new_thread->saved_jmp_buf);
-
- /*
- * Set up new stack frame so that it looks like it
- * returned from a longjmp() to the beginning of
- * _thread_start(). Check if this is a user thread:
- */
- if (parent == NULL) {
- /* Use the user start function: */
-#if defined(__FreeBSD__)
- new_thread->saved_jmp_buf[0]._jb[0] = (long) _thread_start;
-#elif defined(__NetBSD__)
-#if defined(__alpha)
- new_thread->saved_jmp_buf[2] = (long) _thread_start;
- new_thread->saved_jmp_buf[4 + R_RA] = 0;
- new_thread->saved_jmp_buf[4 + R_T12] = (long) _thread_start;
-#else
- new_thread->saved_jmp_buf[0] = (long) _thread_start;
-#endif
-#else
-#error "Don't recognize this operating system!"
-#endif
- } else {
- /*
- * Use the (funny) signal handler start
- * function:
- */
-#if defined(__FreeBSD__)
- new_thread->saved_jmp_buf[0]._jb[0] = (int) _thread_start_sig_handler;
-#elif defined(__NetBSD__)
-#if defined(__alpha)
- new_thread->saved_jmp_buf[2] = (long) _thread_start_sig_handler;
- new_thread->saved_jmp_buf[4 + R_RA] = 0;
- new_thread->saved_jmp_buf[4 + R_T12] = (long) _thread_start_sig_handler;
-#else
- new_thread->saved_jmp_buf[0] = (long) _thread_start_sig_handler;
-#endif
-#else
-#error "Don't recognize this operating system!"
-#endif
- }
-
- /* The stack starts high and builds down: */
-#if defined(__FreeBSD__)
- new_thread->saved_jmp_buf[0]._jb[2] = (int) (new_thread->stack + pattr->stacksize_attr - sizeof(double));
-#elif defined(__NetBSD__)
-#if defined(__alpha)
- new_thread->saved_jmp_buf[4 + R_SP] = (long) new_thread->stack + pattr->stacksize_attr - sizeof(double);
-#else
- new_thread->saved_jmp_buf[2] = (long) new_thread->stack + pattr->stacksize_attr - sizeof(double);
-#endif
-#else
-#error "Don't recognize this operating system!"
-#endif
-
- /* Copy the thread attributes: */
- memcpy(&new_thread->attr, pattr, sizeof(struct pthread_attr));
-
- /*
- * Check if this thread is to inherit the scheduling
- * attributes from its parent:
- */
- if (new_thread->attr.flags & PTHREAD_INHERIT_SCHED) {
- /* Copy the scheduling attributes: */
- new_thread->pthread_priority = _thread_run->pthread_priority;
- new_thread->attr.prio = _thread_run->pthread_priority;
- new_thread->attr.schedparam_policy = _thread_run->attr.schedparam_policy;
- } else {
- /*
- * Use just the thread priority, leaving the
- * other scheduling attributes as their
- * default values:
- */
- new_thread->pthread_priority = new_thread->attr.prio;
- }
-
- /* Initialise the join queue for the new thread: */
- _thread_queue_init(&(new_thread->join_queue));
-
- /* Initialise hooks in the thread structure: */
- new_thread->specific_data = NULL;
- new_thread->cleanup = NULL;
- new_thread->queue = NULL;
- new_thread->qnxt = NULL;
- new_thread->parent_thread = parent;
- new_thread->flags = 0;
-
- /* Add the thread to the linked list of all threads: */
- new_thread->nxt = _thread_link_list;
- _thread_link_list = new_thread;
-
- /* Return a pointer to the thread structure: */
- (*thread) = new_thread;
-
- /* Check if a parent thread was specified: */
- if (parent != NULL) {
- /*
- * A parent thread was specified, so this is
- * a signal handler thread which must now
- * wait for the signal handler to complete:
- */
- PTHREAD_NEW_STATE(parent,PS_SIGTHREAD);
- } else {
- /* Schedule the new user thread: */
- _thread_kern_sched(NULL);
- }
- }
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the status: */
- return (ret);
-}
-
-int
-pthread_create(pthread_t * thread, const pthread_attr_t * attr,
- void *(*start_routine) (void *), void *arg)
-{
- int ret = 0;
-
- /*
- * Call the low level thread creation function which allows a parent
- * thread to be specified:
- */
- ret = _thread_create(thread, attr, start_routine, arg, NULL);
-
- /* Return the status: */
- return (ret);
-}
-
-void
-_thread_start(void)
-{
- /* Run the current thread's start routine with argument: */
- pthread_exit(_thread_run->start_routine(_thread_run->arg));
-
- /* This point should never be reached. */
- PANIC("Thread has resumed after exit");
-}
-
-void
-_thread_start_sig_handler(void)
-{
- int sig;
- long arg;
- void (*sig_routine) (int);
-
- /*
- * Cast the argument from 'void *' to a variable that is NO SMALLER
- * than a pointer (otherwise gcc under NetBSD/Alpha will complain):
- */
- arg = (long) _thread_run->arg;
-
- /* Cast the argument as a signal number: */
- sig = (int) arg;
-
- /* Cast a pointer to the signal handler function: */
- sig_routine = (void (*) (int)) _thread_run->start_routine;
-
- /* Call the signal handler function: */
- (*sig_routine) (sig);
-
- /* Exit the signal handler thread: */
- pthread_exit(&arg);
-
- /* This point should never be reached. */
- PANIC("Signal handler thread has resumed after exit");
-}
-#endif
diff --git a/lib/libpthread/thread/thr_detach.c b/lib/libpthread/thread/thr_detach.c
deleted file mode 100644
index a9f2469..0000000
--- a/lib/libpthread/thread/thr_detach.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_detach(pthread_t pthread)
-{
- int rval = 0;
- int status;
- pthread_t next_thread;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Check for invalid calling parameters: */
- if (pthread == NULL) {
- /* Return an invalid argument error: */
- rval = EINVAL;
- }
- /* Check if the thread has not been detached: */
- else if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) {
- /* Flag the thread as detached: */
- pthread->attr.flags |= PTHREAD_DETACHED;
-
- /* Enter a loop to bring all threads off the join queue: */
- while ((next_thread = _thread_queue_deq(&pthread->join_queue)) != NULL) {
- /* Make the thread run: */
- PTHREAD_NEW_STATE(next_thread,PS_RUNNING);
- }
- } else {
- /* Return an error: */
- rval = EINVAL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_equal.c b/lib/libpthread/thread/thr_equal.c
deleted file mode 100644
index 99ffb5d..0000000
--- a/lib/libpthread/thread/thr_equal.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_equal(pthread_t t1, pthread_t t2)
-{
- /* Compare the two thread pointers: */
- return (t1 == t2);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_exit.c b/lib/libpthread/thread/thr_exit.c
deleted file mode 100644
index 15bcfa3..0000000
--- a/lib/libpthread/thread/thr_exit.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void _exit(int status)
-{
- int flags;
- int i;
- struct itimerval itimer;
-
- /* Disable the interval timer: */
- itimer.it_interval.tv_sec = 0;
- itimer.it_interval.tv_usec = 0;
- itimer.it_value.tv_sec = 0;
- itimer.it_value.tv_usec = 0;
- setitimer(ITIMER_VIRTUAL, &itimer, NULL);
-
- /* Close the pthread kernel pipe: */
- _thread_sys_close(_thread_kern_pipe[0]);
- _thread_sys_close(_thread_kern_pipe[1]);
-
- /*
- * Enter a loop to set all file descriptors to blocking
- * if they were not created as non-blocking:
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Check if this file descriptor is in use: */
- if (_thread_fd_table[i] != NULL &&
- !(_thread_fd_table[i]->flags & O_NONBLOCK)) {
- /* Get the current flags: */
- flags = _thread_sys_fcntl(i, F_GETFL, NULL);
- /* Clear the nonblocking file descriptor flag: */
- _thread_sys_fcntl(i, F_SETFL, flags & ~O_NONBLOCK);
- }
- }
-
- /* Call the _exit syscall: */
- _thread_sys__exit(status);
-}
-
-void
-_thread_exit(char *fname, int lineno, char *string)
-{
- char s[256];
-
- /* Prepare an error message string: */
- strcpy(s, "Fatal error '");
- strcat(s, string);
- strcat(s, "' at line ? ");
- strcat(s, "in file ");
- strcat(s, fname);
- strcat(s, " (errno = ?");
- strcat(s, ")\n");
-
- /* Write the string to the standard error file descriptor: */
- _thread_sys_write(2, s, strlen(s));
-
- /* Force this process to exit: */
- _exit(1);
-}
-
-void
-pthread_exit(void *status)
-{
- int sig;
- long l;
- pthread_t pthread;
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Save the return value: */
- _thread_run->ret = status;
-
- while (_thread_run->cleanup != NULL) {
- pthread_cleanup_pop(1);
- }
-
- if (_thread_run->attr.cleanup_attr != NULL) {
- _thread_run->attr.cleanup_attr(_thread_run->attr.arg_attr);
- }
- /* Check if there is thread specific data: */
- if (_thread_run->specific_data != NULL) {
- /* Run the thread-specific data destructors: */
- _thread_cleanupspecific();
- }
- /* Check if there are any threads joined to this one: */
- while ((pthread = _thread_queue_deq(&(_thread_run->join_queue))) != NULL) {
- /* Wake the joined thread and let it detach this thread: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
-
- /* Check if the running thread is at the head of the linked list: */
- if (_thread_link_list == _thread_run) {
- /* There is no previous thread: */
- _thread_link_list = _thread_run->nxt;
- } else {
- /* Point to the first thread in the list: */
- pthread = _thread_link_list;
-
- /*
- * Enter a loop to find the thread in the linked list before
- * the running thread:
- */
- while (pthread != NULL && pthread->nxt != _thread_run) {
- /* Point to the next thread: */
- pthread = pthread->nxt;
- }
-
- /* Check that a previous thread was found: */
- if (pthread != NULL) {
- /*
- * Point the previous thread to the one after the
- * running thread:
- */
- pthread->nxt = _thread_run->nxt;
- }
- }
-
- /* Check if this is a signal handler thread: */
- if (_thread_run->parent_thread != NULL) {
- /*
- * Enter a loop to search for other threads with the same
- * parent:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Compare the parent thread pointers: */
- if (pthread->parent_thread == _thread_run->parent_thread) {
- /*
- * The parent thread is waiting on at least
- * one other signal handler. Exit the loop
- * now that this is known.
- */
- break;
- }
- }
-
- /*
- * Check if the parent is not waiting on any other signal
- * handler threads and if it hasn't died in the meantime:
- */
- if (pthread == NULL && _thread_run->parent_thread->state != PS_DEAD) {
- /* Allow the parent thread to run again: */
- PTHREAD_NEW_STATE(_thread_run->parent_thread,PS_RUNNING);
- }
- /* Get the signal number: */
- l = (long) _thread_run->arg;
- sig = (int) l;
-
- /* Unblock the signal from the parent thread: */
- sigdelset(&_thread_run->parent_thread->sigmask, sig);
- }
- /*
- * This thread will never run again. Add it to the list of dead
- * threads:
- */
- _thread_run->nxt = _thread_dead;
- _thread_dead = _thread_run;
-
- /*
- * The running thread is no longer in the thread link list so it will
- * now die:
- */
- _thread_kern_sched_state(PS_DEAD, __FILE__, __LINE__);
-
- /* This point should not be reached. */
- PANIC("Dead thread has resumed");
-}
-#endif
diff --git a/lib/libpthread/thread/thr_fcntl.c b/lib/libpthread/thread/thr_fcntl.c
deleted file mode 100644
index f83ee50..0000000
--- a/lib/libpthread/thread/thr_fcntl.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdarg.h>
-#include <unistd.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fcntl(int fd, int cmd,...)
-{
- int flags = 0;
- int oldfd;
- int ret;
- int status;
- va_list ap;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Lock the file descriptor: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- /* Initialise the variable argument list: */
- va_start(ap, cmd);
-
- /* Process according to file control command type: */
- switch (cmd) {
- /* Duplicate a file descriptor: */
- case F_DUPFD:
- /*
- * Get the file descriptor that the caller wants to
- * use:
- */
- oldfd = va_arg(ap, int);
-
- /* Initialise the file descriptor table entry: */
- if ((ret = _thread_sys_fcntl(fd, cmd, oldfd)) < 0) {
- }
- /* Initialise the file descriptor table entry: */
- else if (_thread_fd_table_init(ret) != 0) {
- /* Quietly close the file: */
- _thread_sys_close(ret);
-
- /* Reset the file descriptor: */
- ret = -1;
- } else {
- /*
- * Save the file open flags so that they can
- * be checked later:
- */
- _thread_fd_table[ret]->flags = _thread_fd_table[fd]->flags;
- }
- break;
- case F_SETFD:
- break;
- case F_GETFD:
- break;
- case F_GETFL:
- ret = _thread_fd_table[fd]->flags;
- break;
- case F_SETFL:
- flags = va_arg(ap, int);
- if ((ret = _thread_sys_fcntl(fd, cmd, flags | O_NONBLOCK)) == 0) {
- _thread_fd_table[fd]->flags = flags;
- }
- break;
- default:
- /* Might want to make va_arg use a union */
- ret = _thread_sys_fcntl(fd, cmd, va_arg(ap, void *));
- break;
- }
-
- /* Free variable arguments: */
- va_end(ap);
-
- /* Unlock the file descriptor: */
- _thread_fd_unlock(fd, FD_RDWR);
- }
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_fork.c b/lib/libpthread/thread/thr_fork.c
deleted file mode 100644
index 19f674d..0000000
--- a/lib/libpthread/thread/thr_fork.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-pid_t
-fork(void)
-{
- int flags;
- pid_t ret;
-
- /* Fork a new process: */
- if ((ret = _thread_sys_fork()) <= 0) {
- /* Parent process or error. Nothing to do here. */
- } else {
- /* Close the pthread kernel pipe: */
- _thread_sys_close(_thread_kern_pipe[0]);
- _thread_sys_close(_thread_kern_pipe[1]);
-
- /* Reset signals pending for the running thread: */
- memset(_thread_run->sigpend, 0, sizeof(_thread_run->sigpend));
-
- /*
- * Create a pipe that is written to by the signal handler to
- * prevent signals being missed in calls to
- * _thread_sys_select:
- */
- if (_thread_sys_pipe(_thread_kern_pipe) != 0) {
- /* Cannot create pipe, so abort: */
- PANIC("Cannot create pthread kernel pipe for forked process");
- }
- /* Get the flags for the read pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[0], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- abort();
- }
- /* Make the read pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[0], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- abort();
- }
- /* Get the flags for the write pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[1], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- abort();
- }
- /* Make the write pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[1], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- abort();
- }
- }
-
- /* Return the process ID: */
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_fsync.c b/lib/libpthread/thread/thr_fsync.c
deleted file mode 100644
index 51078e5..0000000
--- a/lib/libpthread/thread/thr_fsync.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-fsync(int fd)
-{
- int ret;
-
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL, __FILE__, __LINE__)) == 0) {
- ret = _thread_sys_fsync(fd);
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_getprio.c b/lib/libpthread/thread/thr_getprio.c
deleted file mode 100644
index 85bd261..0000000
--- a/lib/libpthread/thread/thr_getprio.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_getprio(pthread_t pthread)
-{
- int rval = 0;
- int status;
- pthread_t pthread_p;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the first thread in the list: */
- pthread_p = _thread_link_list;
-
- /* Enter a loop to search for the thread: */
- while (pthread_p != NULL && pthread_p != pthread) {
- /* Point to the next thread: */
- pthread_p = pthread_p->nxt;
- }
-
- /* Check if the thread pointer is NULL: */
- if (pthread == NULL || pthread_p == NULL) {
- /* Return an invalid argument error: */
- errno = EINVAL;
- rval = -1;
- } else {
- /* Get the thread priority: */
- rval = pthread->pthread_priority;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the thread priority or an error status: */
- return (rval);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_info.c b/lib/libpthread/thread/thr_info.c
deleted file mode 100644
index be25d45..0000000
--- a/lib/libpthread/thread/thr_info.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdio.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-struct s_thread_info {
- enum pthread_state state;
- char *name;
-};
-
-/* Static variables: */
-static const struct s_thread_info thread_info[] = {
- {PS_RUNNING , "Running"},
- {PS_SIGTHREAD , "Waiting on signal thread"},
- {PS_MUTEX_WAIT , "Waiting on a mutex"},
- {PS_COND_WAIT , "Waiting on a condition variable"},
- {PS_FDLR_WAIT , "Waiting for a file read lock"},
- {PS_FDLW_WAIT , "Waiting for a file write lock"},
- {PS_FDR_WAIT , "Waiting for read"},
- {PS_FDW_WAIT , "Waitingfor write"},
- {PS_SELECT_WAIT , "Waiting on select"},
- {PS_SLEEP_WAIT , "Sleeping"},
- {PS_WAIT_WAIT , "Waiting process"},
- {PS_SIGWAIT , "Waiting for a signal"},
- {PS_JOIN , "Waiting to join"},
- {PS_SUSPENDED , "Suspended"},
- {PS_DEAD , "Dead"},
- {PS_STATE_MAX , "Not a real state!"}
-};
-
-void
-_thread_dump_info(void)
-{
- char s[128];
- int fd;
- int i;
- int j;
- pthread_t pthread;
-
- /* Open the dump file for append and create it if necessary: */
- if ((fd = _thread_sys_open("/tmp/uthread.dump", O_RDWR | O_CREAT | O_APPEND, 0666)) < 0) {
- /* Can't open the dump file. */
- } else {
- /* Output a header for active threads: */
- strcpy(s, "\n\n=============\nACTIVE THREADS\n\n");
- _thread_sys_write(fd, s, strlen(s));
-
- /* Enter a loop to report each thread in the global list: */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Find the state: */
- for (j = 0; j < (sizeof(thread_info) / sizeof(struct s_thread_info)) - 1; j++)
- if (thread_info[j].state == pthread->state)
- break;
- /* Output a record for the current thread: */
- sprintf(s, "--------------------\nThread %p prio %3d state %s [%s:%d]\n",
- pthread, pthread->pthread_priority, thread_info[j].name,pthread->fname,pthread->lineno);
- _thread_sys_write(fd, s, strlen(s));
-
- /* Check if this is the running thread: */
- if (pthread == _thread_run) {
- /* Output a record for the running thread: */
- strcpy(s, "This is the running thread\n");
- _thread_sys_write(fd, s, strlen(s));
- }
- /* Check if this is the initial thread: */
- if (pthread == _thread_initial) {
- /* Output a record for the initial thread: */
- strcpy(s, "This is the initial thread\n");
- _thread_sys_write(fd, s, strlen(s));
- }
- /* Process according to thread state: */
- switch (pthread->state) {
- /* File descriptor read lock wait: */
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_FDR_WAIT:
- case PS_FDW_WAIT:
- /* Write the lock details: */
- sprintf(s, "fd %d[%s:%d]", pthread->data.fd.fd, pthread->data.fd.fname, pthread->data.fd.branch);
- _thread_sys_write(fd, s, strlen(s));
- sprintf(s, "owner %pr/%pw\n", _thread_fd_table[pthread->data.fd.fd]->r_owner, _thread_fd_table[pthread->data.fd.fd]->w_owner);
- _thread_sys_write(fd, s, strlen(s));
- break;
-
- /*
- * Trap other states that are not explicitly
- * coded to dump information:
- */
- default:
- /* Nothing to do here. */
- break;
- }
- }
-
- /* Check if there are no dead threads: */
- if (_thread_dead == NULL) {
- /* Output a record: */
- strcpy(s, "\n\nTHERE ARE NO DEAD THREADS\n");
- _thread_sys_write(fd, s, strlen(s));
- } else {
- /* Output a header for dead threads: */
- strcpy(s, "\n\nDEAD THREADS\n\n");
- _thread_sys_write(fd, s, strlen(s));
-
- /*
- * Enter a loop to report each thread in the global
- * dead thread list:
- */
- for (pthread = _thread_dead; pthread != NULL; pthread = pthread->nxt) {
- /* Output a record for the current thread: */
- sprintf(s, "Thread %p prio %3d [%s:%d]\n", pthread, pthread->pthread_priority,pthread->fname,pthread->lineno);
- _thread_sys_write(fd, s, strlen(s));
- }
- }
-
- /* Output a header for file descriptors: */
- strcpy(s, "\n\n=============\nFILE DESCRIPTOR TABLE\n\n");
- _thread_sys_write(fd, s, strlen(s));
-
- /* Enter a loop to report file descriptor lock usage: */
- for (i = 0; i < _thread_dtablesize; i++) {
- /*
- * Check if memory is allocated for this file
- * descriptor:
- */
- if (_thread_fd_table[i] != NULL) {
- /* Report the file descriptor lock status: */
- sprintf(s, "fd[%3d] read owner %p count %d [%s:%d]\n write owner %p count %d [%s:%d]\n",
- i,
- _thread_fd_table[i]->r_owner,
- _thread_fd_table[i]->r_lockcount,
- _thread_fd_table[i]->r_fname,
- _thread_fd_table[i]->r_lineno,
- _thread_fd_table[i]->w_owner,
- _thread_fd_table[i]->w_lockcount,
- _thread_fd_table[i]->w_fname,
- _thread_fd_table[i]->w_lineno);
- _thread_sys_write(fd, s, strlen(s));
- }
- }
-
- /* Close the dump file: */
- _thread_sys_close(fd);
- }
- return;
-}
-#endif
diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c
deleted file mode 100644
index 5833cdf..0000000
--- a/lib/libpthread/thread/thr_init.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-/* Allocate space for global thread variables here: */
-#define GLOBAL_PTHREAD_PRIVATE
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/time.h>
-#ifdef _THREAD_SAFE
-#include <machine/reg.h>
-#include <pthread.h>
-#include "pthread_private.h"
-extern int _thread_autoinit_dummy_decl;
-
-/*
- * Threaded process initialization
- */
-void
-_thread_init(void)
-{
- int flags;
- int i;
- struct sigaction act;
-
- /* Ensure that the auto-initialization routine is linked in: */
- _thread_autoinit_dummy_decl = 1;
-
- /* Check if this function has already been called: */
- if (_thread_initial)
- /* Only initialise the threaded application once. */
- return;
-
- /* Get the standard I/O flags before messing with them : */
- for (i = 0; i < 3; i++)
- if ((_pthread_stdio_flags[i] =
- _thread_sys_fcntl(i,F_GETFL, NULL)) == -1)
- PANIC("Cannot get stdio flags");
-
- /*
- * Create a pipe that is written to by the signal handler to prevent
- * signals being missed in calls to _thread_sys_select:
- */
- if (_thread_sys_pipe(_thread_kern_pipe) != 0) {
- /* Cannot create pipe, so abort: */
- PANIC("Cannot create kernel pipe");
- }
- /* Get the flags for the read pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[0], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- PANIC("Cannot get kernel read pipe flags");
- }
- /* Make the read pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[0], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- PANIC("Cannot make kernel read pipe non-blocking");
- }
- /* Get the flags for the write pipe: */
- else if ((flags = _thread_sys_fcntl(_thread_kern_pipe[1], F_GETFL, NULL)) == -1) {
- /* Abort this application: */
- PANIC("Cannot get kernel write pipe flags");
- }
- /* Make the write pipe non-blocking: */
- else if (_thread_sys_fcntl(_thread_kern_pipe[1], F_SETFL, flags | O_NONBLOCK) == -1) {
- /* Abort this application: */
- PANIC("Cannot get kernel write pipe flags");
- }
- /* Allocate memory for the thread structure of the initial thread: */
- else if ((_thread_initial = (pthread_t) malloc(sizeof(struct pthread))) == NULL) {
- /*
- * Insufficient memory to initialise this application, so
- * abort:
- */
- PANIC("Cannot allocate memory for initial thread");
- } else {
- /* Zero the global kernel thread structure: */
- memset(&_thread_kern_thread, 0, sizeof(struct pthread));
- memset(_thread_initial, 0, sizeof(struct pthread));
-
- /* Default the priority of the initial thread: */
- _thread_initial->pthread_priority = PTHREAD_DEFAULT_PRIORITY;
-
- /* Initialise the state of the initial thread: */
- _thread_initial->state = PS_RUNNING;
-
- /* Initialise the queue: */
- _thread_queue_init(&(_thread_initial->join_queue));
-
- /* Initialise the rest of the fields: */
- _thread_initial->parent_thread = NULL;
- _thread_initial->specific_data = NULL;
- _thread_initial->cleanup = NULL;
- _thread_initial->queue = NULL;
- _thread_initial->qnxt = NULL;
- _thread_initial->nxt = NULL;
- _thread_initial->flags = 0;
- _thread_initial->error = 0;
- _thread_link_list = _thread_initial;
- _thread_run = _thread_initial;
-
- /* Enter a loop to get the existing signal status: */
- for (i = 1; i < NSIG; i++) {
- /* Check for signals which cannot be trapped: */
- if (i == SIGKILL || i == SIGSTOP) {
- }
- /* Get the signal handler details: */
- else if (_thread_sys_sigaction(i, NULL, &act) != 0) {
- /*
- * Abort this process if signal
- * initialisation fails:
- */
- PANIC("Cannot read signal handler info");
- }
- /* Set the signal handler for the initial thread: */
- else if (sigaction(i, &act, NULL) != 0) {
- /*
- * Abort this process if signal
- * initialisation fails:
- */
- PANIC("Cannot initialise signal handler for initial thread");
- }
- }
-
- /* Initialise the global signal action structure: */
- sigfillset(&act.sa_mask);
- act.sa_handler = (void (*) ()) _thread_sig_handler;
- act.sa_flags = SA_RESTART;
-
- /* Enter a loop to initialise the rest of the signals: */
- for (i = 1; i < NSIG; i++) {
- /* Check for signals which cannot be trapped: */
- if (i == SIGKILL || i == SIGSTOP) {
- }
- /* Initialise the signal for default handling: */
- else if (_thread_sys_sigaction(i, &act, NULL) != 0) {
- /*
- * Abort this process if signal
- * initialisation fails:
- */
- PANIC("Cannot initialise signal handler");
- }
- }
-
- /* Get the table size: */
- if ((_thread_dtablesize = getdtablesize()) < 0) {
- /*
- * Cannot get the system defined table size, so abort
- * this process.
- */
- PANIC("Cannot get dtablesize");
- }
- /* Allocate memory for the file descriptor table: */
- if ((_thread_fd_table = (struct fd_table_entry **) malloc(sizeof(struct fd_table_entry *) * _thread_dtablesize)) == NULL) {
- /*
- * Cannot allocate memory for the file descriptor
- * table, so abort this process.
- */
- PANIC("Cannot allocate memory for file descriptor table");
- } else {
- /*
- * Enter a loop to initialise the file descriptor
- * table:
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Initialise the file descriptor table: */
- _thread_fd_table[i] = NULL;
- }
- }
- }
- return;
-}
-
-/*
- * Special start up code for NetBSD/Alpha
- */
-#if defined(__NetBSD__) && defined(__alpha__)
-int
-main(int argc, char *argv[], char *env);
-
-int
-_thread_main(int argc, char *argv[], char *env)
-{
- _thread_init();
- return (main(argc, argv, env));
-}
-#endif
-#else
-/*
- * A stub for non-threaded programs.
- */
-void
-_thread_init(void)
-{
-}
-#endif
diff --git a/lib/libpthread/thread/thr_join.c b/lib/libpthread/thread/thr_join.c
deleted file mode 100644
index 63d0d58..0000000
--- a/lib/libpthread/thread/thr_join.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_join(pthread_t pthread, void **thread_return)
-{
- int rval = 0;
- int status;
- pthread_t pthread1;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the first thread in the list: */
- pthread1 = _thread_link_list;
-
- /* Search for the thread to join to: */
- while (pthread1 != NULL && pthread1 != pthread) {
- /* Point to the next thread: */
- pthread1 = pthread1->nxt;
- }
-
- if (pthread1 == NULL) {
- /* Point to the first thread in the dead thread list: */
- pthread1 = _thread_dead;
-
- /* Search for the thread to join to: */
- while (pthread1 != NULL && pthread1 != pthread) {
- /* Point to the next thread: */
- pthread1 = pthread1->nxt;
- }
- }
-
- if (pthread1 == NULL) {
- /* Return an error: */
- rval = ESRCH;
-
- /* Check if this thread has been detached: */
- } else if ((pthread->attr.flags & PTHREAD_DETACHED) != 0) {
- /* Return an error: */
- rval = ESRCH;
- }
- /* Check if the thread is not dead: */
- else if (pthread->state != PS_DEAD) {
- /* Add the running thread to the join queue: */
- _thread_queue_enq(&(pthread->join_queue), _thread_run);
-
- /* Schedule the next thread: */
- _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__);
-
- /* Block signals again: */
- _thread_kern_sig_block(NULL);
-
- /* Check if the thread is not detached: */
- if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) {
- /* Check if the return value is required: */
- if (thread_return) {
- /* Return the thread's return value: */
- *thread_return = pthread->ret;
- }
- } else {
- /* Return an error: */
- rval = ESRCH;
- }
- } else {
- /* Check if the return value is required: */
- if (thread_return != NULL) {
- /* Return the thread's return value: */
- *thread_return = pthread->ret;
- }
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c
deleted file mode 100644
index ba8e250..0000000
--- a/lib/libpthread/thread/thr_kern.c
+++ /dev/null
@@ -1,1739 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <errno.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <unistd.h>
-#include <setjmp.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <sys/uio.h>
-#include <sys/syscall.h>
-#include <fcntl.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/* Static variables: */
-static sigset_t sig_to_block = 0xffffffff;
-static sigset_t sig_to_unblock = 0;
-
-/* Static function prototype definitions: */
-static void
-_thread_kern_select(int wait_reqd);
-static void
-_thread_signal(pthread_t pthread, int sig);
-
-void
-_thread_kern_sched(struct sigcontext * scp)
-{
-#ifndef __alpha
- char *fdata;
-#endif
- int i;
- int prio = -1;
- pthread_t pthread;
- pthread_t pthread_h = NULL;
- pthread_t pthread_nxt = NULL;
- pthread_t pthread_prv = NULL;
- pthread_t pthread_s = NULL;
- struct itimerval itimer;
- struct timespec ts;
- struct timespec ts1;
- struct timeval tv;
- struct timeval tv1;
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
-
- /* Check if this function was called from the signal handler: */
- if (scp != NULL) {
- /*
- * Copy the signal context to the current thread's jump
- * buffer:
- */
- memcpy(&_thread_run->saved_sigcontext, scp, sizeof(_thread_run->saved_sigcontext));
-
-#ifndef __alpha
- /* Point to the floating point data in the running thread: */
- fdata = _thread_run->saved_fp;
-
- /* Save the floating point data: */
-__asm__("fnsave %0": :"m"(*fdata));
-#endif
-
- /* Flag the signal context as the last state saved: */
- _thread_run->sig_saved = 1;
- }
- /* Save the state of the current thread: */
- else if (_thread_sys_setjmp(_thread_run->saved_jmp_buf) != 0) {
- /* Unblock signals (just in case): */
- _thread_kern_sig_unblock(0);
-
- /*
- * This point is reached when a longjmp() is called to
- * restore the state of a thread.
- */
- return;
- } else {
- /* Flag the jump buffer was the last state saved: */
- _thread_run->sig_saved = 0;
- }
-
- /* Point to the first dead thread (if there are any): */
- pthread = _thread_dead;
-
- /* There is no previous dead thread: */
- pthread_prv = NULL;
-
- /* Enter a loop to cleanup after dead threads: */
- while (pthread != NULL) {
- /* Save a pointer to the next thread: */
- pthread_nxt = pthread->nxt;
-
- /* Check if this thread is one which is running: */
- if (pthread == _thread_run || pthread == _thread_initial) {
- /*
- * Don't destroy the running thread or the initial
- * thread.
- */
- pthread_prv = pthread;
- }
- /*
- * Check if this thread has detached or if it is a signal
- * handler thread:
- */
- else if (((pthread->attr.flags & PTHREAD_DETACHED) != 0) || pthread->parent_thread != NULL) {
- /* Check if there is no previous dead thread: */
- if (pthread_prv == NULL) {
- /*
- * The dead thread is at the head of the
- * list:
- */
- _thread_dead = pthread_nxt;
- } else {
- /*
- * The dead thread is not at the head of the
- * list:
- */
- pthread_prv->nxt = pthread->nxt;
- }
-
- /*
- * Check if the stack was not specified by the caller
- * to pthread_create and has not been destroyed yet:
- */
- if (pthread->attr.stackaddr_attr == NULL && pthread->stack != NULL) {
- /* Free the stack of the dead thread: */
- free(pthread->stack);
- }
- /* Free the memory allocated to the thread structure: */
- free(pthread);
- } else {
- /*
- * This thread has not detached, so do not destroy
- * it:
- */
- pthread_prv = pthread;
-
- /*
- * Check if the stack was not specified by the caller
- * to pthread_create and has not been destroyed yet:
- */
- if (pthread->attr.stackaddr_attr == NULL && pthread->stack != NULL) {
- /* Free the stack of the dead thread: */
- free(pthread->stack);
-
- /*
- * NULL the stack pointer now that the memory
- * has been freed:
- */
- pthread->stack = NULL;
- }
- }
-
- /* Point to the next thread: */
- pthread = pthread_nxt;
- }
-
- /*
- * Enter a the scheduling loop that finds the next thread that is
- * ready to run. This loop completes when there are no more threads
- * in the global list or when a thread has its state restored by
- * either a sigreturn (if the state was saved as a sigcontext) or a
- * longjmp (if the state was saved by a setjmp).
- */
- while (_thread_link_list != NULL) {
- /* Get the current time of day: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &ts);
-
- /*
- * Poll file descriptors to update the state of threads
- * waiting on file I/O where data may be available:
- */
- _thread_kern_select(0);
-
- /*
- * Enter a loop to look for sleeping threads that are ready
- * or threads with pending signals that are no longer
- * blocked:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Enter a loop to process the sending signals: */
- for (i = 1; i < NSIG; i++) {
- /*
- * Check if there are no pending signals of
- * this type:
- */
- if (pthread->sigpend[i] == 0) {
- }
- /* Check if this signal type is not masked: */
- else if (sigismember(&pthread->sigmask, i) == 0) {
- /*
- * Delete the signal from the set of
- * pending signals for this thread:
- */
- pthread->sigpend[i] -= 1;
-
- /*
- * Act on the signal for the current
- * thread:
- */
- _thread_signal(pthread, i);
- } else {
- /*
- * This signal is masked, so make
- * sure the count does not exceed 1:
- */
- pthread->sigpend[i] = 1;
- }
- }
-
- /* Check if this thread is to timeout: */
- if (pthread->state == PS_COND_WAIT ||
- pthread->state == PS_SLEEP_WAIT ||
- pthread->state == PS_FDR_WAIT ||
- pthread->state == PS_FDW_WAIT ||
- pthread->state == PS_SELECT_WAIT) {
- /* Check if this thread is to wait forever: */
- if (pthread->wakeup_time.tv_sec == -1) {
- }
- /*
- * Check if this thread is to wakeup
- * immediately or if it is past its wakeup
- * time:
- */
- else if ((pthread->wakeup_time.tv_sec == 0 &&
- pthread->wakeup_time.tv_nsec == 0) ||
- (ts.tv_sec > pthread->wakeup_time.tv_sec) ||
- ((ts.tv_sec == pthread->wakeup_time.tv_sec) &&
- (ts.tv_nsec >= pthread->wakeup_time.tv_nsec))) {
- /*
- * Check if this thread is waiting on
- * select:
- */
- if (pthread->state == PS_SELECT_WAIT) {
- /*
- * The select has timed out,
- * so zero the file
- * descriptor sets:
- */
- FD_ZERO(&pthread->data.select_data->readfds);
- FD_ZERO(&pthread->data.select_data->writefds);
- FD_ZERO(&pthread->data.select_data->exceptfds);
- pthread->data.select_data->nfds = 0;
- }
- /*
- * Return an error as an interrupted
- * wait:
- */
- _thread_seterrno(pthread, EINTR);
-
- /*
- * Flag the timeout in the thread
- * structure:
- */
- pthread->timeout = 1;
-
- /*
- * Change the threads state to allow
- * it to be restarted:
- */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- }
- }
-
- /* Check if there is a current thread: */
- if (_thread_run != &_thread_kern_thread) {
- /*
- * Save the current time as the time that the thread
- * became inactive:
- */
- _thread_run->last_inactive.tv_sec = tv.tv_sec;
- _thread_run->last_inactive.tv_usec = tv.tv_usec;
-
- /*
- * Accumulate the number of microseconds that this
- * thread has run for:
- */
- _thread_run->slice_usec += (_thread_run->last_inactive.tv_sec -
- _thread_run->last_active.tv_sec) * 1000000 +
- _thread_run->last_inactive.tv_usec -
- _thread_run->last_active.tv_usec;
-
- /*
- * Check if this thread has reached its allocated
- * time slice period:
- */
- if (_thread_run->slice_usec > TIMESLICE_USEC) {
- /*
- * Flag the allocated time slice period as
- * up:
- */
- _thread_run->slice_usec = -1;
- }
- }
- /* Check if an incremental priority update is required: */
- if (((tv.tv_sec - kern_inc_prio_time.tv_sec) * 1000000 +
- tv.tv_usec - kern_inc_prio_time.tv_usec) > INC_PRIO_USEC) {
- /*
- * Enter a loop to look for run-enabled threads that
- * have not run since the last time that an
- * incremental priority update was performed:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if this thread is unable to run: */
- if (pthread->state != PS_RUNNING) {
- }
- /*
- * Check if the last time that this thread
- * was run (as indicated by the last time it
- * became inactive) is before the time that
- * the last incremental priority check was
- * made:
- */
- else if (timercmp(&_thread_run->last_inactive, &kern_inc_prio_time, >)) {
- /*
- * Increment the incremental priority
- * for this thread in the hope that
- * it will eventually get a chance to
- * run:
- */
- (pthread->inc_prio)++;
- }
- }
-
- /* Save the new incremental priority update time: */
- kern_inc_prio_time.tv_sec = tv.tv_sec;
- kern_inc_prio_time.tv_usec = tv.tv_usec;
- }
- /*
- * Enter a loop to look for the first thread of the highest
- * priority that is ready to run:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if in single-threaded mode: */
- if (_thread_single != NULL) {
- /*
- * Check if the current thread is
- * the thread for which single-threaded
- * mode is enabled:
- */
- if (pthread == _thread_single) {
- /*
- * This thread is allowed
- * to run.
- */
- } else {
- /*
- * Walk up the signal handler
- * parent thread tree to see
- * if the current thread is
- * descended from the thread
- * for which single-threaded
- * mode is enabled.
- */
- pthread_nxt = pthread;
- while(pthread_nxt != NULL &&
- pthread_nxt != _thread_single) {
- pthread_nxt = pthread->parent_thread;
- }
- /*
- * Check if the current
- * thread is not descended
- * from the thread for which
- * single-threaded mode is
- * enabled.
- */
- if (pthread_nxt == NULL)
- /* Ignore this thread. */
- continue;
- }
- }
-
- /* Check if the current thread is unable to run: */
- if (pthread->state != PS_RUNNING) {
- }
- /*
- * Check if no run-enabled thread has been seen or if
- * the current thread has a priority higher than the
- * highest seen so far:
- */
- else if (pthread_h == NULL || (pthread->pthread_priority + pthread->inc_prio) > prio) {
- /*
- * Save this thread as the highest priority
- * thread seen so far:
- */
- pthread_h = pthread;
- prio = pthread->pthread_priority + pthread->inc_prio;
- }
- }
-
- /*
- * Enter a loop to look for a thread that: 1. Is run-enabled.
- * 2. Has the required agregate priority. 3. Has not been
- * allocated its allocated time slice. 4. Became inactive
- * least recently.
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if in single-threaded mode: */
- if (_thread_single != NULL) {
- /*
- * Check if the current thread is
- * the thread for which single-threaded
- * mode is enabled:
- */
- if (pthread == _thread_single) {
- /*
- * This thread is allowed
- * to run.
- */
- } else {
- /*
- * Walk up the signal handler
- * parent thread tree to see
- * if the current thread is
- * descended from the thread
- * for which single-threaded
- * mode is enabled.
- */
- pthread_nxt = pthread;
- while(pthread_nxt != NULL &&
- pthread_nxt != _thread_single) {
- pthread_nxt = pthread->parent_thread;
- }
- /*
- * Check if the current
- * thread is not descended
- * from the thread for which
- * single-threaded mode is
- * enabled.
- */
- if (pthread_nxt == NULL)
- /* Ignore this thread. */
- continue;
- }
- }
-
- /* Check if the current thread is unable to run: */
- if (pthread->state != PS_RUNNING) {
- /* Ignore threads that are not ready to run. */
- }
- /*
- * Check if the current thread as an agregate
- * priority not equal to the highest priority found
- * above:
- */
- else if ((pthread->pthread_priority + pthread->inc_prio) != prio) {
- /*
- * Ignore threads which have lower agregate
- * priority.
- */
- }
- /*
- * Check if the current thread reached its time slice
- * allocation last time it ran (or if it has not run
- * yet):
- */
- else if (pthread->slice_usec == -1) {
- }
- /*
- * Check if an eligible thread has not been found
- * yet, or if the current thread has an inactive time
- * earlier than the last one seen:
- */
- else if (pthread_s == NULL || timercmp(&pthread->last_inactive, &tv1, <)) {
- /*
- * Save the pointer to the current thread as
- * the most eligible thread seen so far:
- */
- pthread_s = pthread;
-
- /*
- * Save the time that the selected thread
- * became inactive:
- */
- tv1.tv_sec = pthread->last_inactive.tv_sec;
- tv1.tv_usec = pthread->last_inactive.tv_usec;
- }
- }
-
- /*
- * Check if no thread was selected according to incomplete
- * time slice allocation:
- */
- if (pthread_s == NULL) {
- /*
- * Enter a loop to look for any other thread that: 1.
- * Is run-enabled. 2. Has the required agregate
- * priority. 3. Became inactive least recently.
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Check if in single-threaded mode: */
- if (_thread_single != NULL) {
- /*
- * Check if the current thread is
- * the thread for which single-threaded
- * mode is enabled:
- */
- if (pthread == _thread_single) {
- /*
- * This thread is allowed
- * to run.
- */
- } else {
- /*
- * Walk up the signal handler
- * parent thread tree to see
- * if the current thread is
- * descended from the thread
- * for which single-threaded
- * mode is enabled.
- */
- pthread_nxt = pthread;
- while(pthread_nxt != NULL &&
- pthread_nxt != _thread_single) {
- pthread_nxt = pthread->parent_thread;
- }
- /*
- * Check if the current
- * thread is not descended
- * from the thread for which
- * single-threaded mode is
- * enabled.
- */
- if (pthread_nxt == NULL)
- /* Ignore this thread. */
- continue;
- }
- }
-
- /*
- * Check if the current thread is unable to
- * run:
- */
- if (pthread->state != PS_RUNNING) {
- /*
- * Ignore threads that are not ready
- * to run.
- */
- }
- /*
- * Check if the current thread as an agregate
- * priority not equal to the highest priority
- * found above:
- */
- else if ((pthread->pthread_priority + pthread->inc_prio) != prio) {
- /*
- * Ignore threads which have lower
- * agregate priority.
- */
- }
- /*
- * Check if an eligible thread has not been
- * found yet, or if the current thread has an
- * inactive time earlier than the last one
- * seen:
- */
- else if (pthread_s == NULL || timercmp(&pthread->last_inactive, &tv1, <)) {
- /*
- * Save the pointer to the current
- * thread as the most eligible thread
- * seen so far:
- */
- pthread_s = pthread;
-
- /*
- * Save the time that the selected
- * thread became inactive:
- */
- tv1.tv_sec = pthread->last_inactive.tv_sec;
- tv1.tv_usec = pthread->last_inactive.tv_usec;
- }
- }
- }
- /* Check if there are no threads ready to run: */
- if (pthread_s == NULL) {
- /*
- * Lock the pthread kernel by changing the pointer to
- * the running thread to point to the global kernel
- * thread structure:
- */
- _thread_run = &_thread_kern_thread;
-
- /*
- * There are no threads ready to run, so wait until
- * something happens that changes this condition:
- */
- _thread_kern_select(1);
- } else {
- /* Make the selected thread the current thread: */
- _thread_run = pthread_s;
-
- /*
- * Save the current time as the time that the thread
- * became active:
- */
- _thread_run->last_active.tv_sec = tv.tv_sec;
- _thread_run->last_active.tv_usec = tv.tv_usec;
-
- /*
- * Check if this thread is running for the first time
- * or running again after using its full time slice
- * allocation:
- */
- if (_thread_run->slice_usec == -1) {
- /* Reset the accumulated time slice period: */
- _thread_run->slice_usec = 0;
- }
- /*
- * Reset the incremental priority now that this
- * thread has been given the chance to run:
- */
- _thread_run->inc_prio = 0;
-
- /* Check if there is more than one thread: */
- if (_thread_run != _thread_link_list || _thread_run->nxt != NULL) {
- /*
- * Define the maximum time before a SIGVTALRM
- * is required:
- */
- itimer.it_value.tv_sec = 0;
- itimer.it_value.tv_usec = TIMESLICE_USEC;
-
- /*
- * The interval timer is not reloaded when it
- * times out. The interval time needs to be
- * calculated every time.
- */
- itimer.it_interval.tv_sec = 0;
- itimer.it_interval.tv_usec = 0;
-
- /*
- * Enter a loop to look for threads waiting
- * for a time:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /*
- * Check if this thread is to
- * timeout:
- */
- if (pthread->state == PS_COND_WAIT ||
- pthread->state == PS_SLEEP_WAIT ||
- pthread->state == PS_FDR_WAIT ||
- pthread->state == PS_FDW_WAIT ||
- pthread->state == PS_SELECT_WAIT) {
- /*
- * Check if this thread is to
- * wait forever:
- */
- if (pthread->wakeup_time.tv_sec == -1) {
- }
- /*
- * Check if this thread is to
- * wakeup immediately:
- */
- else if (pthread->wakeup_time.tv_sec == 0 &&
- pthread->wakeup_time.tv_nsec == 0) {
- }
- /*
- * Check if the current time
- * is after the wakeup time:
- */
- else if ((ts.tv_sec > pthread->wakeup_time.tv_sec) ||
- ((ts.tv_sec == pthread->wakeup_time.tv_sec) &&
- (ts.tv_nsec > pthread->wakeup_time.tv_nsec))) {
- } else {
- /*
- * Calculate the time
- * until this thread
- * is ready, allowing
- * for the clock
- * resolution:
- */
- ts1.tv_sec = pthread->wakeup_time.tv_sec - ts.tv_sec;
- ts1.tv_nsec = pthread->wakeup_time.tv_nsec - ts.tv_nsec +
- CLOCK_RES_NSEC;
-
- /*
- * Check for
- * underflow of the
- * nanosecond field:
- */
- if (ts1.tv_nsec < 0) {
- /*
- * Allow for
- * the
- * underflow
- * of the
- * nanosecond
- * field:
- */
- ts1.tv_sec--;
- ts1.tv_nsec += 1000000000;
- }
- /*
- * Check for overflow
- * of the nanosecond
- * field:
- */
- if (ts1.tv_nsec >= 1000000000) {
- /*
- * Allow for
- * the
- * overflow
- * of the
- * nanosecond
- * field:
- */
- ts1.tv_sec++;
- ts1.tv_nsec -= 1000000000;
- }
- /*
- * Convert the
- * timespec structure
- * to a timeval
- * structure:
- */
- TIMESPEC_TO_TIMEVAL(&tv, &ts1);
-
- /*
- * Check if the
- * thread will be
- * ready sooner than
- * the earliest one
- * found so far:
- */
- if (timercmp(&tv, &itimer.it_value, <)) {
- /*
- * Update the
- * time
- * value:
- */
- itimer.it_value.tv_sec = tv.tv_sec;
- itimer.it_value.tv_usec = tv.tv_usec;
- }
- }
- }
- }
-
- /*
- * Start the interval timer for the
- * calculated time interval:
- */
- if (setitimer(ITIMER_VIRTUAL, &itimer, NULL) != 0) {
- /*
- * Cannot initialise the timer, so
- * abort this process:
- */
- PANIC("Cannot set virtual timer");
- }
- }
- /* Check if a signal context was saved: */
- if (_thread_run->sig_saved == 1) {
-#ifndef __alpha
- /*
- * Point to the floating point data in the
- * running thread:
- */
- fdata = _thread_run->saved_fp;
-
- /* Restore the floating point state: */
- __asm__("frstor %0": :"m"(*fdata));
-#endif
-
- /*
- * Do a sigreturn to restart the thread that
- * was interrupted by a signal:
- */
- _thread_sys_sigreturn(&_thread_run->saved_sigcontext);
- } else {
- /*
- * Do a longjmp to restart the thread that
- * was context switched out (by a longjmp to
- * a different thread):
- */
- _thread_sys_longjmp(_thread_run->saved_jmp_buf, 1);
- }
-
- /* This point should not be reached. */
- PANIC("Thread has returned from sigreturn or longjmp");
- }
- }
-
- /* There are no more threads, so exit this process: */
- exit(0);
-}
-
-static void
-_thread_signal(pthread_t pthread, int sig)
-{
- int done;
- long l;
- pthread_t new_pthread;
- struct sigaction act;
- void *arg;
-
- /*
- * Assume that the signal will not be dealt with according
- * to the thread state:
- */
- done = 0;
-
- /* Process according to thread state: */
- switch (pthread->state) {
- /* States which do not change when a signal is trapped: */
- case PS_COND_WAIT:
- case PS_DEAD:
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_JOIN:
- case PS_MUTEX_WAIT:
- case PS_RUNNING:
- case PS_STATE_MAX:
- case PS_SIGTHREAD:
- case PS_SUSPENDED:
- /* Nothing to do here. */
- break;
-
- /* Wait for child: */
- case PS_WAIT_WAIT:
- /* Check if the signal is from a child exiting: */
- if (sig == SIGCHLD) {
- /* Reset the error: */
- _thread_seterrno(pthread, 0);
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- } else {
- /* Return the 'interrupted' error: */
- _thread_seterrno(pthread, EINTR);
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- pthread->interrupted = 1;
- break;
-
- /* Waiting on I/O for zero or more file descriptors: */
- case PS_SELECT_WAIT:
- pthread->data.select_data->nfds = -1;
-
- /* Return the 'interrupted' error: */
- _thread_seterrno(pthread, EINTR);
- pthread->interrupted = 1;
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- break;
-
- /*
- * States that are interrupted by the occurrence of a signal
- * other than the scheduling alarm:
- */
- case PS_FDR_WAIT:
- case PS_FDW_WAIT:
- case PS_SLEEP_WAIT:
- /* Return the 'interrupted' error: */
- _thread_seterrno(pthread, EINTR);
- pthread->interrupted = 1;
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
-
- /* Return the signal number: */
- pthread->signo = sig;
- break;
-
- /* Waiting on a signal: */
- case PS_SIGWAIT:
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
-
- /* Return the signal number: */
- pthread->signo = sig;
-
- /* Flag the signal as dealt with: */
- done = 1;
- break;
- }
-
- /*
- * Check if this signal has been dealt with, or is being
- * ignored:
- */
- if (done || pthread->act[sig - 1].sa_handler == SIG_IGN) {
- /* Ignore the signal for this thread. */
- }
- /* Check if this signal is to use the default handler: */
- else if (pthread->act[sig - 1].sa_handler == SIG_DFL) {
- /* Process according to signal type: */
- switch (sig) {
- /* Signals which cause core dumps: */
- case SIGQUIT:
- case SIGILL:
- case SIGTRAP:
- case SIGABRT:
- case SIGEMT:
- case SIGFPE:
- case SIGBUS:
- case SIGSEGV:
- case SIGSYS:
- /* Clear the signal action: */
- sigfillset(&act.sa_mask);
- act.sa_handler = SIG_DFL;
- act.sa_flags = SA_RESTART;
- _thread_sys_sigaction(sig, &act, NULL);
-
- /*
- * Do a sigreturn back to where the signal was
- * detected and a core dump should occur:
- */
- _thread_sys_sigreturn(&pthread->saved_sigcontext);
- break;
-
- /* Default processing for other signals: */
- default:
- /*
- * ### Default processing is a problem to resolve!
- * ###
- */
- break;
- }
- } else {
- /*
- * Cast the signal number as a long and then to a void
- * pointer. Sigh. This is POSIX.
- */
- l = (long) sig;
- arg = (void *) l;
-
- /* Create a signal handler thread, but don't run it yet: */
- if (_thread_create(&new_pthread, NULL, (void *) pthread->act[sig - 1].sa_handler, arg, pthread) != 0) {
- /*
- * Error creating signal handler thread, so abort
- * this process:
- */
- PANIC("Cannot create signal handler thread");
- }
- }
-
- /* Nothing to return. */
- return;
-}
-
-void
-_thread_kern_sig_block(int *status)
-{
- sigset_t oset;
-
- /*
- * Block all signals so that the process will not be interrupted by
- * signals:
- */
- _thread_sys_sigprocmask(SIG_SETMASK, &sig_to_block, &oset);
-
- /* Check if the caller wants the current block status returned: */
- if (status != NULL) {
- /* Return the previous signal block status: */
- *status = (oset != 0);
- }
- return;
-}
-
-void
-_thread_kern_sig_unblock(int status)
-{
- sigset_t oset;
-
- /*
- * Check if the caller thinks that signals weren't blocked when it
- * called _thread_kern_sig_block:
- */
- if (status == 0) {
- /*
- * Unblock all signals so that the process will be
- * interrupted when a signal occurs:
- */
- _thread_sys_sigprocmask(SIG_SETMASK, &sig_to_unblock, &oset);
- }
- return;
-}
-
-void
-_thread_kern_sched_state(enum pthread_state state, char *fname, int lineno)
-{
- /* Change the state of the current thread: */
- _thread_run->state = state;
- _thread_run->fname = fname;
- _thread_run->lineno = lineno;
-
- /* Schedule the next thread that is ready: */
- _thread_kern_sched(NULL);
- return;
-}
-
-static void
-_thread_kern_select(int wait_reqd)
-{
- char bufr[128];
- fd_set fd_set_except;
- fd_set fd_set_read;
- fd_set fd_set_write;
- int count = 0;
- int count_dec;
- int found_one;
- int i;
- int nfds = -1;
- int settimeout;
- pthread_t pthread;
- ssize_t num;
- struct timespec ts;
- struct timespec ts1;
- struct timeval *p_tv;
- struct timeval tv;
- struct timeval tv1;
-
- /* Zero the file descriptor sets: */
- FD_ZERO(&fd_set_read);
- FD_ZERO(&fd_set_write);
- FD_ZERO(&fd_set_except);
-
- /* Check if the caller wants to wait: */
- if (wait_reqd) {
- /*
- * Add the pthread kernel pipe file descriptor to the read
- * set:
- */
- FD_SET(_thread_kern_pipe[0], &fd_set_read);
- nfds = _thread_kern_pipe[0];
-
- /* Get the current time of day: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &ts);
- }
- /* Initialise the time value structure: */
- tv.tv_sec = 0;
- tv.tv_usec = 0;
-
- /*
- * Enter a loop to process threads waiting on either file descriptors
- * or times:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Assume that this state does not time out: */
- settimeout = 0;
-
- /* Process according to thread state: */
- switch (pthread->state) {
- /*
- * States which do not depend on file descriptor I/O
- * operations or timeouts:
- */
- case PS_DEAD:
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_JOIN:
- case PS_MUTEX_WAIT:
- case PS_RUNNING:
- case PS_SIGTHREAD:
- case PS_SIGWAIT:
- case PS_STATE_MAX:
- case PS_WAIT_WAIT:
- case PS_SUSPENDED:
- /* Nothing to do here. */
- break;
-
- /* File descriptor read wait: */
- case PS_FDR_WAIT:
- /* Add the file descriptor to the read set: */
- FD_SET(pthread->data.fd.fd, &fd_set_read);
-
- /*
- * Check if this file descriptor is greater than any
- * of those seen so far:
- */
- if (pthread->data.fd.fd > nfds) {
- /* Remember this file descriptor: */
- nfds = pthread->data.fd.fd;
- }
- /* Increment the file descriptor count: */
- count++;
-
- /* This state can time out: */
- settimeout = 1;
- break;
-
- /* File descriptor write wait: */
- case PS_FDW_WAIT:
- /* Add the file descriptor to the write set: */
- FD_SET(pthread->data.fd.fd, &fd_set_write);
-
- /*
- * Check if this file descriptor is greater than any
- * of those seen so far:
- */
- if (pthread->data.fd.fd > nfds) {
- /* Remember this file descriptor: */
- nfds = pthread->data.fd.fd;
- }
- /* Increment the file descriptor count: */
- count++;
-
- /* This state can time out: */
- settimeout = 1;
- break;
-
- /* States that time out: */
- case PS_SLEEP_WAIT:
- case PS_COND_WAIT:
- /* Flag a timeout as required: */
- settimeout = 1;
- break;
-
- /* Select wait: */
- case PS_SELECT_WAIT:
- /*
- * Enter a loop to process each file descriptor in
- * the thread-specific file descriptor sets:
- */
- for (i = 0; i < pthread->data.select_data->nfds; i++) {
- /*
- * Check if this file descriptor is set for
- * exceptions:
- */
- if (FD_ISSET(i, &pthread->data.select_data->exceptfds)) {
- /*
- * Add the file descriptor to the
- * exception set:
- */
- FD_SET(i, &fd_set_except);
-
- /*
- * Increment the file descriptor
- * count:
- */
- count++;
-
- /*
- * Check if this file descriptor is
- * greater than any of those seen so
- * far:
- */
- if (i > nfds) {
- /*
- * Remember this file
- * descriptor:
- */
- nfds = i;
- }
- }
- /*
- * Check if this file descriptor is set for
- * write:
- */
- if (FD_ISSET(i, &pthread->data.select_data->writefds)) {
- /*
- * Add the file descriptor to the
- * write set:
- */
- FD_SET(i, &fd_set_write);
-
- /*
- * Increment the file descriptor
- * count:
- */
- count++;
-
- /*
- * Check if this file descriptor is
- * greater than any of those seen so
- * far:
- */
- if (i > nfds) {
- /*
- * Remember this file
- * descriptor:
- */
- nfds = i;
- }
- }
- /*
- * Check if this file descriptor is set for
- * read:
- */
- if (FD_ISSET(i, &pthread->data.select_data->readfds)) {
- /*
- * Add the file descriptor to the
- * read set:
- */
- FD_SET(i, &fd_set_read);
-
- /*
- * Increment the file descriptor
- * count:
- */
- count++;
-
- /*
- * Check if this file descriptor is
- * greater than any of those seen so
- * far:
- */
- if (i > nfds) {
- /*
- * Remember this file
- * descriptor:
- */
- nfds = i;
- }
- }
- }
-
- /* This state can time out: */
- settimeout = 1;
- break;
- }
-
- /*
- * Check if the caller wants to wait and if the thread state
- * is one that times out:
- */
- if (wait_reqd && settimeout) {
- /* Check if this thread wants to wait forever: */
- if (pthread->wakeup_time.tv_sec == -1) {
- }
- /* Check if this thread doesn't want to wait at all: */
- else if (pthread->wakeup_time.tv_sec == 0 &&
- pthread->wakeup_time.tv_nsec == 0) {
- /* Override the caller's request to wait: */
- wait_reqd = 0;
- } else {
- /*
- * Calculate the time until this thread is
- * ready, allowing for the clock resolution:
- */
- ts1.tv_sec = pthread->wakeup_time.tv_sec - ts.tv_sec;
- ts1.tv_nsec = pthread->wakeup_time.tv_nsec - ts.tv_nsec +
- CLOCK_RES_NSEC;
-
- /*
- * Check for underflow of the nanosecond
- * field:
- */
- if (ts1.tv_nsec < 0) {
- /*
- * Allow for the underflow of the
- * nanosecond field:
- */
- ts1.tv_sec--;
- ts1.tv_nsec += 1000000000;
- }
- /*
- * Check for overflow of the nanosecond
- * field:
- */
- if (ts1.tv_nsec >= 1000000000) {
- /*
- * Allow for the overflow of the
- * nanosecond field:
- */
- ts1.tv_sec++;
- ts1.tv_nsec -= 1000000000;
- }
- /*
- * Convert the timespec structure to a
- * timeval structure:
- */
- TIMESPEC_TO_TIMEVAL(&tv1, &ts1);
-
- /*
- * Check if no time value has been found yet,
- * or if the thread will be ready sooner that
- * the earliest one found so far:
- */
- if ((tv.tv_sec == 0 && tv.tv_usec == 0) || timercmp(&tv1, &tv, <)) {
- /* Update the time value: */
- tv.tv_sec = tv1.tv_sec;
- tv.tv_usec = tv1.tv_usec;
- }
- }
- }
- }
-
- /* Check if the caller wants to wait: */
- if (wait_reqd) {
- /* Check if no threads were found with timeouts: */
- if (tv.tv_sec == 0 && tv.tv_usec == 0) {
- /* Wait forever: */
- p_tv = NULL;
- } else {
- /*
- * Point to the time value structure which contains
- * the earliest time that a thread will be ready:
- */
- p_tv = &tv;
- }
-
- /*
- * Flag the pthread kernel as in a select. This is to avoid
- * the window between the next statement that unblocks
- * signals and the select statement which follows.
- */
- _thread_kern_in_select = 1;
-
- /* Unblock all signals: */
- _thread_kern_sig_unblock(0);
-
- /*
- * Wait for a file descriptor to be ready for read, write, or
- * an exception, or a timeout to occur:
- */
- count = _thread_sys_select(nfds + 1, &fd_set_read, &fd_set_write, &fd_set_except, p_tv);
-
- /* Block all signals again: */
- _thread_kern_sig_block(NULL);
-
- /* Reset the kernel in select flag: */
- _thread_kern_in_select = 0;
-
- /*
- * Check if it is possible that there are bytes in the kernel
- * read pipe waiting to be read:
- */
- if (count < 0 || FD_ISSET(_thread_kern_pipe[0], &fd_set_read)) {
- /*
- * Check if the kernel read pipe was included in the
- * count:
- */
- if (count > 0) {
- /*
- * Remove the kernel read pipe from the
- * count:
- */
- FD_CLR(_thread_kern_pipe[0], &fd_set_read);
-
- /* Decrement the count of file descriptors: */
- count--;
- }
- /*
- * Enter a loop to read (and trash) bytes from the
- * pthread kernel pipe:
- */
- while ((num = _thread_sys_read(_thread_kern_pipe[0], bufr, sizeof(bufr))) > 0) {
- /*
- * The buffer read contains one byte per
- * signal and each byte is the signal number.
- * This data is not used, but the fact that
- * the signal handler wrote to the pipe *is*
- * used to cause the _thread_sys_select call
- * to complete if the signal occurred between
- * the time when signals were unblocked and
- * the _thread_sys_select select call being
- * made.
- */
- }
- }
- }
- /* Check if there are file descriptors to poll: */
- else if (count > 0) {
- /*
- * Point to the time value structure which has been zeroed so
- * that the call to _thread_sys_select will not wait:
- */
- p_tv = &tv;
-
- /* Poll file descrptors without wait: */
- count = _thread_sys_select(nfds + 1, &fd_set_read, &fd_set_write, &fd_set_except, p_tv);
- }
- /*
- * Check if the select call was interrupted, or some other error
- * occurred:
- */
- if (count < 0) {
- /* Check if the select call was interrupted: */
- if (errno == EINTR) {
- /*
- * Interrupted calls are expected. The interrupting
- * signal will be in the sigpend array.
- */
- } else {
- /* This should not occur: */
- }
- }
- /* Check if no file descriptors are ready: */
- else if (count == 0) {
- /* Nothing to do here. */
- } else {
- /*
- * Enter a loop to look for threads waiting on file
- * descriptors that are flagged as available by the
- * _thread_sys_select syscall:
- */
- for (pthread = _thread_link_list; pthread != NULL; pthread = pthread->nxt) {
- /* Process according to thread state: */
- switch (pthread->state) {
- /*
- * States which do not depend on file
- * descriptor I/O operations:
- */
- case PS_RUNNING:
- case PS_COND_WAIT:
- case PS_DEAD:
- case PS_FDLR_WAIT:
- case PS_FDLW_WAIT:
- case PS_JOIN:
- case PS_MUTEX_WAIT:
- case PS_SIGWAIT:
- case PS_SLEEP_WAIT:
- case PS_WAIT_WAIT:
- case PS_SIGTHREAD:
- case PS_STATE_MAX:
- case PS_SUSPENDED:
- /* Nothing to do here. */
- break;
-
- /* File descriptor read wait: */
- case PS_FDR_WAIT:
- /*
- * Check if the file descriptor is available
- * for read:
- */
- if (FD_ISSET(pthread->data.fd.fd, &fd_set_read)) {
- /*
- * Change the thread state to allow
- * it to read from the file when it
- * is scheduled next:
- */
- pthread->state = PS_RUNNING;
- }
- break;
-
- /* File descriptor write wait: */
- case PS_FDW_WAIT:
- /*
- * Check if the file descriptor is available
- * for write:
- */
- if (FD_ISSET(pthread->data.fd.fd, &fd_set_write)) {
- /*
- * Change the thread state to allow
- * it to write to the file when it is
- * scheduled next:
- */
- pthread->state = PS_RUNNING;
- }
- break;
-
- /* Select wait: */
- case PS_SELECT_WAIT:
- /*
- * Reset the flag that indicates if a file
- * descriptor is ready for some type of
- * operation:
- */
- count_dec = 0;
-
- /*
- * Enter a loop to search though the
- * thread-specific select file descriptors
- * for the first descriptor that is ready:
- */
- for (i = 0; i < pthread->data.select_data->nfds && count_dec == 0; i++) {
- /*
- * Check if this file descriptor does
- * not have an exception:
- */
- if (FD_ISSET(i, &pthread->data.select_data->exceptfds) && FD_ISSET(i, &fd_set_except)) {
- /*
- * Flag this file descriptor
- * as ready:
- */
- count_dec = 1;
- }
- /*
- * Check if this file descriptor is
- * not ready for write:
- */
- if (FD_ISSET(i, &pthread->data.select_data->writefds) && FD_ISSET(i, &fd_set_write)) {
- /*
- * Flag this file descriptor
- * as ready:
- */
- count_dec = 1;
- }
- /*
- * Check if this file descriptor is
- * not ready for read:
- */
- if (FD_ISSET(i, &pthread->data.select_data->readfds) && FD_ISSET(i, &fd_set_read)) {
- /*
- * Flag this file descriptor
- * as ready:
- */
- count_dec = 1;
- }
- }
-
- /*
- * Check if any file descriptors are ready
- * for the current thread:
- */
- if (count_dec) {
- /*
- * Reset the count of file
- * descriptors that are ready for
- * this thread:
- */
- found_one = 0;
-
- /*
- * Enter a loop to search though the
- * thread-specific select file
- * descriptors:
- */
- for (i = 0; i < pthread->data.select_data->nfds; i++) {
- /*
- * Reset the count of
- * operations for which the
- * current file descriptor is
- * ready:
- */
- count_dec = 0;
-
- /*
- * Check if this file
- * descriptor is selected for
- * exceptions:
- */
- if (FD_ISSET(i, &pthread->data.select_data->exceptfds)) {
- /*
- * Check if this file
- * descriptor has an
- * exception:
- */
- if (FD_ISSET(i, &fd_set_except)) {
- /*
- * Increment
- * the count
- * for this
- * file:
- */
- count_dec++;
- } else {
- /*
- * Clear the
- * file
- * descriptor
- * in the
- * thread-spec
- * ific file
- * descriptor
- * set:
- */
- FD_CLR(i, &pthread->data.select_data->exceptfds);
- }
- }
- /*
- * Check if this file
- * descriptor is selected for
- * write:
- */
- if (FD_ISSET(i, &pthread->data.select_data->writefds)) {
- /*
- * Check if this file
- * descriptor is
- * ready for write:
- */
- if (FD_ISSET(i, &fd_set_write)) {
- /*
- * Increment
- * the count
- * for this
- * file:
- */
- count_dec++;
- } else {
- /*
- * Clear the
- * file
- * descriptor
- * in the
- * thread-spec
- * ific file
- * descriptor
- * set:
- */
- FD_CLR(i, &pthread->data.select_data->writefds);
- }
- }
- /*
- * Check if this file
- * descriptor is selected for
- * read:
- */
- if (FD_ISSET(i, &pthread->data.select_data->readfds)) {
- /*
- * Check if this file
- * descriptor is
- * ready for read:
- */
- if (FD_ISSET(i, &fd_set_read)) {
- /*
- * Increment
- * the count
- * for this
- * file:
- */
- count_dec++;
- } else {
- /*
- * Clear the
- * file
- * descriptor
- * in the
- * thread-spec
- * ific file
- * descriptor
- * set:
- */
- FD_CLR(i, &pthread->data.select_data->readfds);
- }
- }
- /*
- * Check if the current file
- * descriptor is ready for
- * any one of the operations:
- */
- if (count_dec > 0) {
- /*
- * Increment the
- * count of file
- * descriptors that
- * are ready for the
- * current thread:
- */
- found_one++;
- }
- }
-
- /*
- * Return the number of file
- * descriptors that are ready:
- */
- pthread->data.select_data->nfds = found_one;
-
- /*
- * Change the state of the current
- * thread to run:
- */
- pthread->state = PS_RUNNING;
- }
- break;
- }
- }
- }
-
- /* Nothing to return. */
- return;
-}
-
-void
-_thread_kern_set_timeout(struct timespec * timeout)
-{
- struct timespec current_time;
- struct timeval tv;
-
- /* Reset the timeout flag for the running thread: */
- _thread_run->timeout = 0;
-
- /* Check if the thread is to wait forever: */
- if (timeout == NULL) {
- /*
- * Set the wakeup time to something that can be recognised as
- * different to an actual time of day:
- */
- _thread_run->wakeup_time.tv_sec = -1;
- _thread_run->wakeup_time.tv_nsec = -1;
- }
- /* Check if no waiting is required: */
- else if (timeout->tv_sec == 0 && timeout->tv_nsec == 0) {
- /* Set the wake up time to 'immediately': */
- _thread_run->wakeup_time.tv_sec = 0;
- _thread_run->wakeup_time.tv_nsec = 0;
- } else {
- /* Get the current time: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &current_time);
-
- /* Calculate the time for the current thread to wake up: */
- _thread_run->wakeup_time.tv_sec = current_time.tv_sec + timeout->tv_sec;
- _thread_run->wakeup_time.tv_nsec = current_time.tv_nsec + timeout->tv_nsec;
-
- /* Check if the nanosecond field needs to wrap: */
- if (_thread_run->wakeup_time.tv_nsec >= 1000000000) {
- /* Wrap the nanosecond field: */
- _thread_run->wakeup_time.tv_sec += 1;
- _thread_run->wakeup_time.tv_nsec -= 1000000000;
- }
- }
- return;
-}
-#endif
diff --git a/lib/libpthread/thread/thr_kill.c b/lib/libpthread/thread/thr_kill.c
deleted file mode 100644
index eb2c6b7..0000000
--- a/lib/libpthread/thread/thr_kill.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <signal.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_kill(pthread_t pthread, int sig)
-{
- int rval = 0;
- int status;
- pthread_t p_pthread;
-
- /* Check for invalid signal numbers: */
- if (sig < 0 || sig >= NSIG)
- /* Invalid signal: */
- rval = EINVAL;
- else {
- /* Assume that the search will succeed: */
- rval = 0;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Search for the thread: */
- p_pthread = _thread_link_list;
- while (p_pthread != NULL && p_pthread != pthread) {
- p_pthread = p_pthread->nxt;
- }
-
- /* Check if the thread was not found: */
- if (p_pthread == NULL)
- /* Can't find the thread: */
- rval = ESRCH;
- else
- /* Increment the pending signal count: */
- p_pthread->sigpend[sig] += 1;
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (rval);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_mattr_init.c b/lib/libpthread/thread/thr_mattr_init.c
deleted file mode 100644
index 73226a6..0000000
--- a/lib/libpthread/thread/thr_mattr_init.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1996 Jeffrey Hsu <hsu@freebsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_mutexattr_init(pthread_mutexattr_t *attr)
-{
- int ret;
- pthread_mutexattr_t pattr;
-
- if ((pattr = (pthread_mutexattr_t)
- malloc(sizeof(struct pthread_mutex_attr))) == NULL) {
- ret = ENOMEM;
- } else {
- memcpy(pattr, &pthread_mutexattr_default,
- sizeof(struct pthread_mutex_attr));
- *attr = pattr;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_mattr_kind_np.c b/lib/libpthread/thread/thr_mattr_kind_np.c
deleted file mode 100644
index 3eeabff..0000000
--- a/lib/libpthread/thread/thr_mattr_kind_np.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1996 Jeffrey Hsu <hsu@freebsd.org>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- (*attr)->m_type = kind;
- ret = 0;
- }
- return(ret);
-}
-
-int
-pthread_mutexattr_getkind_np(pthread_mutexattr_t attr)
-{
- int ret;
- if (attr == NULL) {
- errno = EINVAL;
- ret = -1;
- } else {
- ret = attr->m_type;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_multi_np.c b/lib/libpthread/thread/thr_multi_np.c
deleted file mode 100644
index 64f360f..0000000
--- a/lib/libpthread/thread/thr_multi_np.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_multi_np()
-{
- /* Return to multi-threaded scheduling mode: */
- _thread_single = NULL;
- return(0);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_mutex.c b/lib/libpthread/thread/thr_mutex.c
deleted file mode 100644
index e6be6de..0000000
--- a/lib/libpthread/thread/thr_mutex.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_mutex_init(pthread_mutex_t * mutex,
- const pthread_mutexattr_t * mutex_attr)
-{
- enum pthread_mutextype type;
- pthread_mutex_t pmutex;
- int ret = 0;
- int status;
-
- if (mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Check if default mutex attributes: */
- if (mutex_attr == NULL || *mutex_attr == NULL) {
- /* Default to a fast mutex: */
- type = MUTEX_TYPE_FAST;
- } else if ((*mutex_attr)->m_type >= MUTEX_TYPE_MAX) {
- /* Return an invalid argument error: */
- ret = EINVAL;
- } else {
- /* Use the requested mutex type: */
- type = (*mutex_attr)->m_type;
- }
-
- /* Check no errors so far: */
- if (ret == 0) {
- if ((pmutex = (pthread_mutex_t) malloc(sizeof(struct pthread_mutex))) == NULL) {
- ret = ENOMEM;
- } else {
- /* Reset the mutex flags: */
- pmutex->m_flags = 0;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch (type) {
- /* Fast mutex: */
- case MUTEX_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Reset the mutex count: */
- pmutex->m_data.m_count = 0;
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
- if (ret == 0) {
- /* Initialise the rest of the mutex: */
- _thread_queue_init(&pmutex->m_queue);
- pmutex->m_flags |= MUTEX_FLAGS_INITED;
- pmutex->m_owner = NULL;
- pmutex->m_type = type;
- *mutex = pmutex;
- } else {
- free(pmutex);
- *mutex = NULL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
- }
- }
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_destroy(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutex: */
- case MUTEX_TYPE_FAST:
- /* Nothing to do here. */
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Reset the mutex count: */
- (*mutex)->m_data.m_count = 0;
- break;
-
- /* Trap undefined mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Clean up the mutex in case that others want to use it: */
- _thread_queue_init(&(*mutex)->m_queue);
- (*mutex)->m_owner = NULL;
- (*mutex)->m_flags = 0;
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_trylock(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutex: */
- case MUTEX_TYPE_FAST:
- /* Check if this mutex is not locked: */
- if ((*mutex)->m_owner == NULL) {
- /* Lock the mutex for the running thread: */
- (*mutex)->m_owner = _thread_run;
- } else {
- /* Return a busy error: */
- ret = EBUSY;
- }
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Check if this mutex is locked: */
- if ((*mutex)->m_owner != NULL) {
- /*
- * Check if the mutex is locked by the running
- * thread:
- */
- if ((*mutex)->m_owner == _thread_run) {
- /* Increment the lock count: */
- (*mutex)->m_data.m_count++;
- } else {
- /* Return a busy error: */
- ret = EBUSY;
- }
- } else {
- /* Lock the mutex for the running thread: */
- (*mutex)->m_owner = _thread_run;
- }
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_lock(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutexes do not check for any error conditions: */
- case MUTEX_TYPE_FAST:
- /*
- * Enter a loop to wait for the mutex to be locked by the
- * current thread:
- */
- while ((*mutex)->m_owner != _thread_run) {
- /* Check if the mutex is not locked: */
- if ((*mutex)->m_owner == NULL) {
- /* Lock the mutex for this thread: */
- (*mutex)->m_owner = _thread_run;
- } else {
- /*
- * Join the queue of threads waiting to lock
- * the mutex:
- */
- _thread_queue_enq(&(*mutex)->m_queue, _thread_run);
-
- /* Block signals: */
- _thread_kern_sched_state(PS_MUTEX_WAIT, __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
- }
- }
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /*
- * Enter a loop to wait for the mutex to be locked by the
- * current thread:
- */
- while ((*mutex)->m_owner != _thread_run) {
- /* Check if the mutex is not locked: */
- if ((*mutex)->m_owner == NULL) {
- /* Lock the mutex for this thread: */
- (*mutex)->m_owner = _thread_run;
-
- /* Reset the lock count for this mutex: */
- (*mutex)->m_data.m_count = 0;
- } else {
- /*
- * Join the queue of threads waiting to lock
- * the mutex:
- */
- _thread_queue_enq(&(*mutex)->m_queue, _thread_run);
-
- /* Block signals: */
- _thread_kern_sched_state(PS_MUTEX_WAIT, __FILE__, __LINE__);
-
- /* Block signals: */
- _thread_kern_sig_block(NULL);
- }
- }
-
- /* Increment the lock count for this mutex: */
- (*mutex)->m_data.m_count++;
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-
-int
-pthread_mutex_unlock(pthread_mutex_t * mutex)
-{
- int ret = 0;
- int status;
-
- if (mutex == NULL || *mutex == NULL) {
- ret = EINVAL;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Process according to mutex type: */
- switch ((*mutex)->m_type) {
- /* Fast mutexes do not check for any error conditions: */
- case MUTEX_TYPE_FAST:
- /* Check if the running thread is not the owner of the mutex: */
- if ((*mutex)->m_owner != _thread_run) {
- /* Return an invalid argument error: */
- ret = EINVAL;
- }
- /*
- * Get the next thread from the queue of threads waiting on
- * the mutex:
- */
- else if (((*mutex)->m_owner = _thread_queue_deq(&(*mutex)->m_queue)) != NULL) {
- /* Allow the new owner of the mutex to run: */
- PTHREAD_NEW_STATE((*mutex)->m_owner,PS_RUNNING);
- }
- break;
-
- /* Counting mutex: */
- case MUTEX_TYPE_COUNTING_FAST:
- /* Check if the running thread is not the owner of the mutex: */
- if ((*mutex)->m_owner != _thread_run) {
- /* Return an invalid argument error: */
- ret = EINVAL;
- }
- /* Check if there are still counts: */
- else if ((*mutex)->m_data.m_count) {
- /* Decrement the count: */
- (*mutex)->m_data.m_count--;
- }
- /*
- * Get the next thread from the queue of threads waiting on
- * the mutex:
- */
- else if (((*mutex)->m_owner = _thread_queue_deq(&(*mutex)->m_queue)) != NULL) {
- /* Allow the new owner of the mutex to run: */
- PTHREAD_NEW_STATE((*mutex)->m_owner,PS_RUNNING);
- }
- break;
-
- /* Trap invalid mutex types: */
- default:
- /* Return an invalid argument error: */
- ret = EINVAL;
- break;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_mutexattr_destroy.c b/lib/libpthread/thread/thr_mutexattr_destroy.c
deleted file mode 100644
index 5642cbe..0000000
--- a/lib/libpthread/thread/thr_mutexattr_destroy.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdlib.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
-{
- int ret;
- if (attr == NULL || *attr == NULL) {
- ret = EINVAL;
- } else {
- free(*attr);
- *attr = NULL;
- ret = 0;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_nanosleep.c b/lib/libpthread/thread/thr_nanosleep.c
deleted file mode 100644
index 39c7dad..0000000
--- a/lib/libpthread/thread/thr_nanosleep.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <stdio.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-nanosleep(const struct timespec * time_to_sleep,
- struct timespec * time_remaining)
-{
- int ret = 0;
- struct timespec current_time;
- struct timespec current_time1;
- struct timespec remaining_time;
- struct timeval tv;
-
- /* Check if the time to sleep is legal: */
- if (time_to_sleep == NULL || time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) {
- /* Return an EINVAL error : */
- errno = EINVAL;
- ret = -1;
- } else {
- /* Get the current time: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &current_time);
-
- /* Calculate the time for the current thread to wake up: */
- _thread_run->wakeup_time.tv_sec = current_time.tv_sec + time_to_sleep->tv_sec;
- _thread_run->wakeup_time.tv_nsec = current_time.tv_nsec + time_to_sleep->tv_nsec;
-
- /* Check if the nanosecond field has overflowed: */
- if (_thread_run->wakeup_time.tv_nsec >= 1000000000) {
- /* Wrap the nanosecond field: */
- _thread_run->wakeup_time.tv_sec += 1;
- _thread_run->wakeup_time.tv_nsec -= 1000000000;
- }
-
- /* Reschedule the current thread to sleep: */
- _thread_kern_sched_state(PS_SLEEP_WAIT, __FILE__, __LINE__);
-
- /* Get the current time: */
- gettimeofday(&tv, NULL);
- TIMEVAL_TO_TIMESPEC(&tv, &current_time1);
-
- /* Calculate the remaining time to sleep: */
- remaining_time.tv_sec = time_to_sleep->tv_sec + current_time.tv_sec - current_time1.tv_sec;
- remaining_time.tv_nsec = time_to_sleep->tv_nsec + current_time.tv_nsec - current_time1.tv_nsec;
-
- /* Check if the nanosecond field has underflowed: */
- if (remaining_time.tv_nsec < 0) {
- /* Handle the underflow: */
- remaining_time.tv_sec -= 1;
- remaining_time.tv_nsec += 1000000000;
- }
-
- /* Check if the nanosecond field has overflowed: */
- if (remaining_time.tv_nsec >= 1000000000) {
- /* Handle the overflow: */
- remaining_time.tv_sec += 1;
- remaining_time.tv_nsec -= 1000000000;
- }
-
- /* Check if the sleep was longer than the required time: */
- if (remaining_time.tv_sec < 0) {
- /* Reset the time left: */
- remaining_time.tv_sec = 0;
- remaining_time.tv_nsec = 0;
- }
-
- /* Check if the time remaining is to be returned: */
- if (time_remaining != NULL) {
- /* Return the actual time slept: */
- time_remaining->tv_sec = remaining_time.tv_sec;
- time_remaining->tv_nsec = remaining_time.tv_nsec;
- }
-
- /* Check if the entire sleep was not completed: */
- if (remaining_time.tv_nsec != 0 || remaining_time.tv_sec != 0) {
- /* Return an EINTR error : */
- errno = EINTR;
- ret = -1;
- }
- }
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_once.c b/lib/libpthread/thread/thr_once.c
deleted file mode 100644
index c55ba9e..0000000
--- a/lib/libpthread/thread/thr_once.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_once(pthread_once_t * once_control, void (*init_routine) (void))
-{
- if (once_control->state == PTHREAD_NEEDS_INIT) {
- pthread_mutex_lock(&(once_control->mutex));
- if (once_control->state == PTHREAD_NEEDS_INIT) {
- init_routine();
- once_control->state = PTHREAD_DONE_INIT;
- }
- pthread_mutex_unlock(&(once_control->mutex));
- }
- return (0);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_open.c b/lib/libpthread/thread/thr_open.c
deleted file mode 100644
index ef7a504..0000000
--- a/lib/libpthread/thread/thr_open.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <stdarg.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-open(const char *path, int flags,...)
-{
- int fd;
- int mode = 0;
- int status;
- va_list ap;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Check if the file is being created: */
- if (flags & O_CREAT) {
- /* Get the creation mode: */
- va_start(ap, flags);
- mode = va_arg(ap, int);
- va_end(ap);
- }
- /* Open the file: */
- if ((fd = _thread_sys_open(path, flags, mode)) < 0) {
- }
- /* Initialise the file descriptor table entry: */
- else if (_thread_fd_table_init(fd) != 0) {
- /* Quietly close the file: */
- _thread_sys_close(fd);
-
- /* Reset the file descriptor: */
- fd = -1;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the file descriptor or -1 on error: */
- return (fd);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h
deleted file mode 100644
index e0a0511..0000000
--- a/lib/libpthread/thread/thr_private.h
+++ /dev/null
@@ -1,783 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * Private thread definitions for the uthread kernel.
- *
- */
-
-#ifndef _PTHREAD_PRIVATE_H
-#define _PTHREAD_PRIVATE_H
-
-/*
- * Evaluate the storage class specifier.
- */
-#ifdef GLOBAL_PTHREAD_PRIVATE
-#define SCLASS
-#else
-#define SCLASS extern
-#endif
-
-/*
- * Include files.
- */
-#include <setjmp.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/time.h>
-
-/*
- * Kernel fatal error handler macro.
- */
-#define PANIC(string) _thread_exit(__FILE__,__LINE__,string)
-
-/*
- * State change macro:
- */
-#define PTHREAD_NEW_STATE(thrd, newstate) { \
- (thrd)->state = newstate; \
- (thrd)->fname = __FILE__; \
- (thrd)->lineno = __LINE__; \
-}
-
-/*
- * Queue definitions.
- */
-struct pthread_queue {
- struct pthread *q_next;
- struct pthread *q_last;
- void *q_data;
-};
-
-/*
- * Static queue initialization values.
- */
-#define PTHREAD_QUEUE_INITIALIZER { NULL, NULL, NULL }
-
-/*
- * Mutex definitions.
- */
-union pthread_mutex_data {
- void *m_ptr;
- int m_count;
-};
-
-struct pthread_mutex {
- enum pthread_mutextype m_type;
- struct pthread_queue m_queue;
- struct pthread *m_owner;
- union pthread_mutex_data m_data;
- long m_flags;
-};
-
-/*
- * Flags for mutexes.
- */
-#define MUTEX_FLAGS_PRIVATE 0x01
-#define MUTEX_FLAGS_INITED 0x02
-#define MUTEX_FLAGS_BUSY 0x04
-
-/*
- * Static mutex initialization values.
- */
-#define PTHREAD_MUTEX_INITIALIZER \
- { MUTEX_TYPE_FAST, PTHREAD_QUEUE_INITIALIZER, \
- NULL, { NULL }, MUTEX_FLAGS_INITED }
-
-struct pthread_mutex_attr {
- enum pthread_mutextype m_type;
- long m_flags;
-};
-
-/*
- * Condition variable definitions.
- */
-enum pthread_cond_type {
- COND_TYPE_FAST,
- COND_TYPE_MAX
-};
-
-struct pthread_cond {
- enum pthread_cond_type c_type;
- struct pthread_queue c_queue;
- void *c_data;
- long c_flags;
-};
-
-struct pthread_cond_attr {
- enum pthread_cond_type c_type;
- long c_flags;
-};
-
-/*
- * Flags for condition variables.
- */
-#define COND_FLAGS_PRIVATE 0x01
-#define COND_FLAGS_INITED 0x02
-#define COND_FLAGS_BUSY 0x04
-
-/*
- * Static cond initialization values.
- */
-#define PTHREAD_COND_INITIALIZER \
- { COND_TYPE_FAST, PTHREAD_QUEUE_INITIALIZER, NULL, COND_FLAGS_INITED }
-
-/*
- * Cleanup definitions.
- */
-struct pthread_cleanup {
- struct pthread_cleanup *next;
- void (*routine) ();
- void *routine_arg;
-};
-
-/*
- * Scheduling definitions.
- */
-enum schedparam_policy {
- SCHED_RR,
- SCHED_IO,
- SCHED_FIFO,
- SCHED_OTHER
-};
-
-struct pthread_attr {
- enum schedparam_policy schedparam_policy;
- int prio;
- int suspend;
- int flags;
- void *arg_attr;
- void (*cleanup_attr) ();
- void *stackaddr_attr;
- size_t stacksize_attr;
-};
-
-struct sched_param {
- int prio;
- void *no_data;
-};
-
-/*
- * Thread creation state attributes.
- */
-#define PTHREAD_CREATE_RUNNING 0
-#define PTHREAD_CREATE_SUSPENDED 1
-
-/*
- * Miscellaneous definitions.
- */
-#define PTHREAD_STACK_DEFAULT 65536
-#define PTHREAD_DEFAULT_PRIORITY 64
-#define PTHREAD_MAX_PRIORITY 126
-#define PTHREAD_MIN_PRIORITY 0
-#define _POSIX_THREAD_ATTR_STACKSIZE
-
-/*
- * Clock resolution in nanoseconds.
- */
-#define CLOCK_RES_NSEC 10000000
-
-/*
- * Number of microseconds between incremental priority updates for
- * threads that are ready to run, but denied being run.
- */
-#define INC_PRIO_USEC 500000
-
-/*
- * Time slice period in microseconds.
- */
-#define TIMESLICE_USEC 100000
-
-struct pthread_key {
- pthread_mutex_t mutex;
- long count;
- void (*destructor) ();
-};
-
-/*
- * Thread states.
- */
-enum pthread_state {
- PS_RUNNING,
- PS_SIGTHREAD,
- PS_MUTEX_WAIT,
- PS_COND_WAIT,
- PS_FDLR_WAIT,
- PS_FDLW_WAIT,
- PS_FDR_WAIT,
- PS_FDW_WAIT,
- PS_SELECT_WAIT,
- PS_SLEEP_WAIT,
- PS_WAIT_WAIT,
- PS_SIGWAIT,
- PS_JOIN,
- PS_SUSPENDED,
- PS_DEAD,
- PS_STATE_MAX
-};
-
-
-/*
- * File descriptor locking definitions.
- */
-#define FD_READ 0x1
-#define FD_WRITE 0x2
-#define FD_RDWR (FD_READ | FD_WRITE)
-
-/*
- * File descriptor table structure.
- */
-struct fd_table_entry {
- struct pthread_queue r_queue; /* Read queue. */
- struct pthread_queue w_queue; /* Write queue. */
- struct pthread *r_owner; /* Ptr to thread owning read lock. */
- struct pthread *w_owner; /* Ptr to thread owning write lock. */
- char *r_fname; /* Ptr to read lock source file name */
- int r_lineno; /* Read lock source line number. */
- char *w_fname; /* Ptr to write lock source file name */
- int w_lineno; /* Write lock source line number. */
- int r_lockcount; /* Count for FILE read locks. */
- int w_lockcount; /* Count for FILE write locks. */
- int flags; /* Flags used in open. */
-};
-
-struct pthread_select_data {
- int nfds;
- fd_set readfds;
- fd_set writefds;
- fd_set exceptfds;
-};
-
-union pthread_wait_data {
- pthread_mutex_t *mutex;
- pthread_cond_t *cond;
- const sigset_t *sigwait; /* Waiting on a signal in sigwait */
- struct {
- short fd; /* Used when thread waiting on fd */
- short branch; /* Line number, for debugging. */
- char *fname; /* Source file name for debugging.*/
- } fd;
- struct pthread_select_data * select_data;
-};
-
-/*
- * Thread structure.
- */
-struct pthread {
- /*
- * Pointer to the next thread in the thread linked list.
- */
- struct pthread *nxt;
-
- /*
- * Thread start routine, argument, stack pointer and thread
- * attributes.
- */
- void *(*start_routine)(void *);
- void *arg;
- void *stack;
- struct pthread_attr attr;
-
- /*
- * Thread-specific signal handler interface:
- *
- * Array of signal actions for this thread.
- */
- struct sigaction act[NSIG];
-
-#if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(__i386__)
- /*
- * Saved floating point registers on systems where they are not
- * saved in the signal context.
- */
- char saved_fp[108];
-#endif
-
- /*
- * Saved signal context used in call to sigreturn by
- * _thread_kern_sched if sig_saved is TRUE.
- */
- struct sigcontext saved_sigcontext;
-
- /*
- * Saved jump buffer used in call to longjmp by _thread_kern_sched
- * if sig_saved is FALSE.
- */
- jmp_buf saved_jmp_buf;
-
- /*
- * TRUE if the last state saved was a signal context. FALSE if the
- * last state saved was a jump buffer.
- */
- int sig_saved;
-
- /*
- * Current signal mask and array of pending signals.
- */
- sigset_t sigmask;
- int sigpend[NSIG];
-
- /*
- * Pointer to the parent thread for which the current thread is
- * a signal handler thread, otherwise NULL if the current thread
- * is not a signal handler thread.
- */
- struct pthread *parent_thread;
-
- /* Thread state: */
- enum pthread_state state;
-
- /* Time that this thread was last made active. */
- struct timeval last_active;
-
- /* Time that this thread was last made inactive. */
- struct timeval last_inactive;
-
- /*
- * Number of microseconds accumulated by this thread when
- * time slicing is active.
- */
- long slice_usec;
-
- /*
- * Incremental priority accumulated by thread while it is ready to
- * run but is denied being run.
- */
- int inc_prio;
-
- /*
- * Time to wake up thread. This is used for sleeping threads and
- * for any operation which may time out (such as select).
- */
- struct timespec wakeup_time;
-
- /* TRUE if operation has timed out. */
- int timeout;
-
- /*
- * Error variable used instead of errno. The function __error()
- * returns a pointer to this.
- */
- int error;
-
- /* Join queue for waiting threads: */
- struct pthread_queue join_queue;
-
- /*
- * The current thread can belong to only one queue at a time.
- *
- * Pointer to queue (if any) on which the current thread is waiting.
- */
- struct pthread_queue *queue;
-
- /* Pointer to next element in queue. */
- struct pthread *qnxt;
-
- /* Wait data. */
- union pthread_wait_data data;
-
- /*
- * Set to TRUE if a blocking operation was
- * interrupted by a signal:
- */
- int interrupted;
-
- /* Signal number when in state PS_SIGWAIT: */
- int signo;
-
- /* Miscellaneous data. */
- char flags;
- char pthread_priority;
- void *ret;
- const void **specific_data;
- int specific_data_count;
-
- /* Cleanup handlers Link List */
- struct pthread_cleanup *cleanup;
- char *fname; /* Ptr to source file name */
- int lineno; /* Source line number. */
-};
-
-/*
- * Global variables for the uthread kernel.
- */
-
-/* Kernel thread structure used when there are no running threads: */
-SCLASS struct pthread _thread_kern_thread;
-
-/* Ptr to the thread structure for the running thread: */
-SCLASS struct pthread * volatile _thread_run
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= &_thread_kern_thread;
-#else
-;
-#endif
-
-/*
- * Ptr to the thread running in single-threaded mode or NULL if
- * running multi-threaded (default POSIX behaviour).
- */
-SCLASS struct pthread * volatile _thread_single
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/* Ptr to the first thread in the thread linked list: */
-SCLASS struct pthread * volatile _thread_link_list
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/*
- * Array of kernel pipe file descriptors that are used to ensure that
- * no signals are missed in calls to _thread_sys_select.
- */
-SCLASS int _thread_kern_pipe[2]
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= {
- -1,
- -1
-};
-#else
-;
-#endif
-SCLASS int _thread_kern_in_select
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= 0;
-#else
-;
-#endif
-
-/* Last time that an incremental priority update was performed: */
-SCLASS struct timeval kern_inc_prio_time
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { 0, 0 };
-#else
-;
-#endif
-
-/* Dead threads: */
-SCLASS struct pthread * volatile _thread_dead
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/* Initial thread: */
-SCLASS struct pthread *_thread_initial
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-/* Default thread attributes: */
-SCLASS struct pthread_attr pthread_attr_default
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { SCHED_RR, PTHREAD_DEFAULT_PRIORITY, PTHREAD_CREATE_RUNNING,
- PTHREAD_CREATE_JOINABLE, NULL, NULL, NULL, PTHREAD_STACK_DEFAULT };
-#else
-;
-#endif
-
-/* Default mutex attributes: */
-SCLASS struct pthread_mutex_attr pthread_mutexattr_default
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { MUTEX_TYPE_FAST, 0 };
-#else
-;
-#endif
-
-/* Default condition variable attributes: */
-SCLASS struct pthread_cond_attr pthread_condattr_default
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= { COND_TYPE_FAST, 0 };
-#else
-;
-#endif
-
-/*
- * Standard I/O file descriptors need special flag treatment since
- * setting one to non-blocking does all on *BSD. Sigh. This array
- * is used to store the initial flag settings.
- */
-SCLASS int _pthread_stdio_flags[3];
-
-/* File table information: */
-SCLASS struct fd_table_entry **_thread_fd_table
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= NULL;
-#else
-;
-#endif
-
-SCLASS const int dtablecount
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= 4096/sizeof(struct fd_table_entry);
-#else
-;
-#endif
-SCLASS int _thread_dtablesize /* Descriptor table size. */
-#ifdef GLOBAL_PTHREAD_PRIVATE
-= 1024;
-#else
-;
-#endif
-
-/* Undefine the storage class specifier: */
-#undef SCLASS
-
-/*
- * Function prototype definitions.
- */
-__BEGIN_DECLS
-char *__ttyname_basic(int);
-char *__ttyname_r_basic(int, char *, size_t);
-char *ttyname_r(int, char *, size_t);
-int _thread_create(pthread_t *,const pthread_attr_t *,void *(*start_routine)(void *),void *,pthread_t);
-int _thread_fd_lock(int, int, struct timespec *,char *fname,int lineno);
-void _thread_exit(char *, int, char *);
-void _thread_fd_unlock(int, int);
-void *_thread_cleanup(pthread_t);
-void _thread_cleanupspecific(void);
-void _thread_dump_info(void);
-void _thread_init(void);
-void _thread_kern_sched(struct sigcontext *);
-void _thread_kern_sched_state(enum pthread_state,char *fname,int lineno);
-void _thread_kern_set_timeout(struct timespec *);
-void _thread_kern_sig_block(int *);
-void _thread_kern_sig_unblock(int);
-void _thread_sig_handler(int, int, struct sigcontext *);
-void _thread_start(void);
-void _thread_start_sig_handler(void);
-void _thread_seterrno(pthread_t,int);
-void _thread_queue_init(struct pthread_queue *);
-void _thread_queue_enq(struct pthread_queue *, struct pthread *);
-int _thread_queue_remove(struct pthread_queue *, struct pthread *);
-int _thread_fd_table_init(int fd);
-struct pthread *_thread_queue_get(struct pthread_queue *);
-struct pthread *_thread_queue_deq(struct pthread_queue *);
-
-/* #include <signal.h> */
-int _thread_sys_sigaction(int, const struct sigaction *, struct sigaction *);
-int _thread_sys_sigpending(sigset_t *);
-int _thread_sys_sigprocmask(int, const sigset_t *, sigset_t *);
-int _thread_sys_sigsuspend(const sigset_t *);
-int _thread_sys_sigblock(int);
-int _thread_sys_siginterrupt(int, int);
-int _thread_sys_sigpause(int);
-int _thread_sys_sigreturn(struct sigcontext *);
-int _thread_sys_sigsetmask(int);
-int _thread_sys_sigstack(const struct sigstack *, struct sigstack *);
-int _thread_sys_sigvec(int, struct sigvec *, struct sigvec *);
-void _thread_sys_psignal(unsigned int, const char *);
-void (*_thread_sys_signal(int, void (*)(int)))(int);
-
-/* #include <sys/stat.h> */
-#ifdef _SYS_STAT_H_
-int _thread_sys_fchmod(int, mode_t);
-int _thread_sys_fstat(int, struct stat *);
-int _thread_sys_fchflags(int, u_long);
-#endif
-
-/* #include <sys/mount.h> */
-#ifdef _SYS_MOUNT_H_
-int _thread_sys_fstatfs(int, struct statfs *);
-#endif
-int _thread_sys_pipe(int *);
-
-/* #include <sys/socket.h> */
-#ifdef _SYS_SOCKET_H_
-int _thread_sys_accept(int, struct sockaddr *, int *);
-int _thread_sys_bind(int, const struct sockaddr *, int);
-int _thread_sys_connect(int, const struct sockaddr *, int);
-int _thread_sys_getpeername(int, struct sockaddr *, int *);
-int _thread_sys_getsockname(int, struct sockaddr *, int *);
-int _thread_sys_getsockopt(int, int, int, void *, int *);
-int _thread_sys_listen(int, int);
-int _thread_sys_setsockopt(int, int, int, const void *, int);
-int _thread_sys_shutdown(int, int);
-int _thread_sys_socket(int, int, int);
-int _thread_sys_socketpair(int, int, int, int *);
-ssize_t _thread_sys_recv(int, void *, size_t, int);
-ssize_t _thread_sys_recvfrom(int, void *, size_t, int, struct sockaddr *, int *);
-ssize_t _thread_sys_recvmsg(int, struct msghdr *, int);
-ssize_t _thread_sys_send(int, const void *, size_t, int);
-ssize_t _thread_sys_sendmsg(int, const struct msghdr *, int);
-ssize_t _thread_sys_sendto(int, const void *,size_t, int, const struct sockaddr *, int);
-#endif
-
-/* #include <stdio.h> */
-#ifdef _STDIO_H_
-void _thread_flockfile(FILE *fp,char *fname,int lineno);
-void _thread_funlockfile(FILE *fp);
-FILE *_thread_sys_fdopen(int, const char *);
-FILE *_thread_sys_fopen(const char *, const char *);
-FILE *_thread_sys_freopen(const char *, const char *, FILE *);
-FILE *_thread_sys_popen(const char *, const char *);
-FILE *_thread_sys_tmpfile(void);
-char *_thread_sys_ctermid(char *);
-char *_thread_sys_cuserid(char *);
-char *_thread_sys_fgetln(FILE *, size_t *);
-char *_thread_sys_fgets(char *, int, FILE *);
-char *_thread_sys_gets(char *);
-char *_thread_sys_tempnam(const char *, const char *);
-char *_thread_sys_tmpnam(char *);
-int _thread_sys_fclose(FILE *);
-int _thread_sys_feof(FILE *);
-int _thread_sys_ferror(FILE *);
-int _thread_sys_fflush(FILE *);
-int _thread_sys_fgetc(FILE *);
-int _thread_sys_fgetpos(FILE *, fpos_t *);
-int _thread_sys_fileno(FILE *);
-int _thread_sys_fprintf(FILE *, const char *, ...);
-int _thread_sys_fpurge(FILE *);
-int _thread_sys_fputc(int, FILE *);
-int _thread_sys_fputs(const char *, FILE *);
-int _thread_sys_fscanf(FILE *, const char *, ...);
-int _thread_sys_fseek(FILE *, long, int);
-int _thread_sys_fsetpos(FILE *, const fpos_t *);
-int _thread_sys_getc(FILE *);
-int _thread_sys_getchar(void);
-int _thread_sys_getw(FILE *);
-int _thread_sys_pclose(FILE *);
-int _thread_sys_printf(const char *, ...);
-int _thread_sys_putc(int, FILE *);
-int _thread_sys_putchar(int);
-int _thread_sys_puts(const char *);
-int _thread_sys_putw(int, FILE *);
-int _thread_sys_remove(const char *);
-int _thread_sys_rename (const char *, const char *);
-int _thread_sys_scanf(const char *, ...);
-int _thread_sys_setlinebuf(FILE *);
-int _thread_sys_setvbuf(FILE *, char *, int, size_t);
-int _thread_sys_snprintf(char *, size_t, const char *, ...);
-int _thread_sys_sprintf(char *, const char *, ...);
-int _thread_sys_sscanf(const char *, const char *, ...);
-int _thread_sys_ungetc(int, FILE *);
-int _thread_sys_vfprintf(FILE *, const char *, _BSD_VA_LIST_);
-int _thread_sys_vprintf(const char *, _BSD_VA_LIST_);
-int _thread_sys_vscanf(const char *, _BSD_VA_LIST_);
-int _thread_sys_vsnprintf(char *, size_t, const char *, _BSD_VA_LIST_);
-int _thread_sys_vsprintf(char *, const char *, _BSD_VA_LIST_);
-int _thread_sys_vsscanf(const char *, const char *, _BSD_VA_LIST_);
-long _thread_sys_ftell(FILE *);
-size_t _thread_sys_fread(void *, size_t, size_t, FILE *);
-size_t _thread_sys_fwrite(const void *, size_t, size_t, FILE *);
-void _thread_sys_clearerr(FILE *);
-void _thread_sys_perror(const char *);
-void _thread_sys_rewind(FILE *);
-void _thread_sys_setbuf(FILE *, char *);
-void _thread_sys_setbuffer(FILE *, char *, int);
-#endif
-
-/* #include <unistd.h> */
-#ifdef _UNISTD_H_
-char *_thread_sys_ttyname(int);
-int _thread_sys_close(int);
-int _thread_sys_dup(int);
-int _thread_sys_dup2(int, int);
-int _thread_sys_exect(const char *, char * const *, char * const *);
-int _thread_sys_execve(const char *, char * const *, char * const *);
-int _thread_sys_fchdir(int);
-int _thread_sys_fchown(int, uid_t, gid_t);
-int _thread_sys_fsync(int);
-int _thread_sys_ftruncate(int, off_t);
-int _thread_sys_pause(void);
-int _thread_sys_pipe(int *);
-int _thread_sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
-off_t _thread_sys_lseek(int, off_t, int);
-pid_t _thread_sys_fork(void);
-pid_t _thread_sys_tcgetpgrp(int);
-ssize_t _thread_sys_read(int, void *, size_t);
-ssize_t _thread_sys_write(int, const void *, size_t);
-void _thread_sys__exit(int);
-#endif
-
-/* #include <fcntl.h> */
-#ifdef _SYS_FCNTL_H_
-int _thread_sys_creat(const char *, mode_t);
-int _thread_sys_fcntl(int, int, ...);
-int _thread_sys_flock(int, int);
-int _thread_sys_open(const char *, int, ...);
-#endif
-
-/* #include <setjmp.h> */
-#ifdef _SETJMP_H_
-int __thread_sys_setjmp(jmp_buf);
-int _thread_sys_setjmp(jmp_buf);
-int _thread_sys_sigsetjmp(sigjmp_buf, int);
-void __thread_sys_longjmp(jmp_buf, int);
-void _thread_sys_longjmp(jmp_buf, int);
-void _thread_sys_longjmperror(void);
-void _thread_sys_siglongjmp(sigjmp_buf, int);
-#endif
-
-/* #include <sys/ioctl.h> */
-#ifdef _SYS_IOCTL_H_
-int _thread_sys_ioctl(int, unsigned long, ...);
-#endif
-
-/* #include <dirent.h> */
-#ifdef _DIRENT_H_
-DIR *___thread_sys_opendir2(const char *, int);
-DIR *_thread_sys_opendir(const char *);
-int _thread_sys_alphasort(const void *, const void *);
-int _thread_sys_scandir(const char *, struct dirent ***,
- int (*)(struct dirent *), int (*)(const void *, const void *));
-int _thread_sys_closedir(DIR *);
-int _thread_sys_getdirentries(int, char *, int, long *);
-long _thread_sys_telldir(const DIR *);
-struct dirent *_thread_sys_readdir(DIR *);
-void _thread_sys_rewinddir(DIR *);
-void _thread_sys_seekdir(DIR *, long);
-#endif
-
-/* #include <sys/uio.h> */
-#ifdef _SYS_UIO_H_
-ssize_t _thread_sys_readv(int, const struct iovec *, int);
-ssize_t _thread_sys_writev(int, const struct iovec *, int);
-#endif
-
-/* #include <sys/wait.h> */
-#ifdef WNOHANG
-pid_t _thread_sys_wait(int *);
-pid_t _thread_sys_waitpid(pid_t, int *, int);
-pid_t _thread_sys_wait3(int *, int, struct rusage *);
-pid_t _thread_sys_wait4(pid_t, int *, int, struct rusage *);
-#endif
-__END_DECLS
-
-#endif /* !_PTHREAD_PRIVATE_H */
diff --git a/lib/libpthread/thread/thr_read.c b/lib/libpthread/thread/thr_read.c
deleted file mode 100644
index 242014e..0000000
--- a/lib/libpthread/thread/thr_read.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-read(int fd, void *buf, size_t nbytes)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read: */
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking read syscall: */
- while ((ret = _thread_sys_read(fd, buf, nbytes)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDR_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_READ);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_readv.c b/lib/libpthread/thread/thr_readv.c
deleted file mode 100644
index 3ea065e..0000000
--- a/lib/libpthread/thread/thr_readv.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-readv(int fd, const struct iovec * iov, int iovcnt)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read: */
- if ((ret = _thread_fd_lock(fd, FD_READ, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking readv syscall: */
- while ((ret = _thread_sys_readv(fd, iov, iovcnt)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDR_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_READ);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_resume_np.c b/lib/libpthread/thread/thr_resume_np.c
deleted file mode 100644
index 934df58..0000000
--- a/lib/libpthread/thread/thr_resume_np.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_resume_np(pthread_t thread)
-{
- int ret = -1;
- pthread_t pthread;
- /*
- * Search for the thread in the linked list.
- */
- for (pthread = _thread_link_list; pthread != NULL && ret == -1; pthread = pthread->nxt) {
- /* Is this the thread? */
- if (pthread == thread) {
- /* Found the thread. Is it suspended? */
- if (pthread->state == PS_SUSPENDED) {
- /* Allow the thread to run. */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- ret = 0;
- } else if (pthread->state == PS_RUNNING) {
- /* Thread is already running. */
- ret = 0;
- } else {
- /* Thread is in some other state. */
- errno = EINVAL;
- }
- }
- }
- /* Check if thread was not found. */
- if (ret == -1) {
- /* No such thread */
- errno = ESRCH;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_select.c b/lib/libpthread/thread/thr_select.c
deleted file mode 100644
index 7db3ed2..0000000
--- a/lib/libpthread/thread/thr_select.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-select(int numfds, fd_set * readfds, fd_set * writefds,
- fd_set * exceptfds, struct timeval * timeout)
-{
- fd_set read_locks, write_locks, rdwr_locks;
- struct timespec ts;
- struct timeval zero_timeout = {0, 0};
- int i, ret = 0, got_all_locks = 1;
- struct pthread_select_data data;
-
- if (numfds > _thread_dtablesize) {
- numfds = _thread_dtablesize;
- }
- /* Check if a timeout was specified: */
- if (timeout) {
- /* Convert the timeval to a timespec: */
- TIMEVAL_TO_TIMESPEC(timeout, &ts);
-
- /* Set the wake up time: */
- _thread_kern_set_timeout(&ts);
- } else {
- /* Wait for ever: */
- _thread_kern_set_timeout(NULL);
- }
-
- FD_ZERO(&read_locks);
- FD_ZERO(&write_locks);
- FD_ZERO(&rdwr_locks);
-
- /* lock readfds */
- if (readfds || writefds || exceptfds) {
- for (i = 0; i < numfds; i++) {
- if ((readfds && (FD_ISSET(i, readfds))) || (exceptfds && FD_ISSET(i, exceptfds))) {
- if (writefds && FD_ISSET(i, writefds)) {
- if ((ret = _thread_fd_lock(i, FD_RDWR, NULL, __FILE__, __LINE__)) != 0) {
- got_all_locks = 0;
- break;
- }
- FD_SET(i, &rdwr_locks);
- } else {
- if ((ret = _thread_fd_lock(i, FD_READ, NULL, __FILE__, __LINE__)) != 0) {
- got_all_locks = 0;
- break;
- }
- FD_SET(i, &read_locks);
- }
- } else {
- if (writefds && FD_ISSET(i, writefds)) {
- if ((ret = _thread_fd_lock(i, FD_WRITE, NULL, __FILE__, __LINE__)) != 0) {
- got_all_locks = 0;
- break;
- }
- FD_SET(i, &write_locks);
- }
- }
- }
- }
- if (got_all_locks) {
- data.nfds = numfds;
- FD_ZERO(&data.readfds);
- FD_ZERO(&data.writefds);
- FD_ZERO(&data.exceptfds);
- if (readfds != NULL) {
- memcpy(&data.readfds, readfds, sizeof(data.readfds));
- }
- if (writefds != NULL) {
- memcpy(&data.writefds, writefds, sizeof(data.writefds));
- }
- if (exceptfds != NULL) {
- memcpy(&data.exceptfds, exceptfds, sizeof(data.exceptfds));
- }
- if ((ret = _thread_sys_select(data.nfds, &data.readfds, &data.writefds, &data.exceptfds, &zero_timeout)) == 0) {
- data.nfds = numfds;
- FD_ZERO(&data.readfds);
- FD_ZERO(&data.writefds);
- FD_ZERO(&data.exceptfds);
- if (readfds != NULL) {
- memcpy(&data.readfds, readfds, sizeof(data.readfds));
- }
- if (writefds != NULL) {
- memcpy(&data.writefds, writefds, sizeof(data.writefds));
- }
- if (exceptfds != NULL) {
- memcpy(&data.exceptfds, exceptfds, sizeof(data.exceptfds));
- }
- _thread_run->data.select_data = &data;
- _thread_kern_sched_state(PS_SELECT_WAIT, __FILE__, __LINE__);
- ret = data.nfds;
- }
- }
- /* clean up the locks */
- for (i = 0; i < numfds; i++)
- if (FD_ISSET(i, &read_locks))
- _thread_fd_unlock(i, FD_READ);
- for (i = 0; i < numfds; i++)
- if (FD_ISSET(i, &rdwr_locks))
- _thread_fd_unlock(i, FD_RDWR);
- for (i = 0; i < numfds; i++)
- if (FD_ISSET(i, &write_locks))
- _thread_fd_unlock(i, FD_WRITE);
-
- if (ret > 0) {
- if (readfds != NULL) {
- for (i = 0; i < numfds; i++) {
- if (FD_ISSET(i, readfds) &&
- !FD_ISSET(i, &data.readfds)) {
- FD_CLR(i, readfds);
- }
- }
- }
- if (writefds != NULL) {
- for (i = 0; i < numfds; i++) {
- if (FD_ISSET(i, writefds) &&
- !FD_ISSET(i, &data.writefds)) {
- FD_CLR(i, writefds);
- }
- }
- }
- if (exceptfds != NULL) {
- for (i = 0; i < numfds; i++) {
- if (FD_ISSET(i, exceptfds) &&
- !FD_ISSET(i, &data.exceptfds)) {
- FD_CLR(i, exceptfds);
- }
- }
- }
- }
-
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_self.c b/lib/libpthread/thread/thr_self.c
deleted file mode 100644
index a0a2d2a..0000000
--- a/lib/libpthread/thread/thr_self.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-pthread_t
-pthread_self(void)
-{
- /* Return the running thread pointer: */
- return (_thread_run);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_seterrno.c b/lib/libpthread/thread/thr_seterrno.c
deleted file mode 100644
index c4fe08b6..0000000
--- a/lib/libpthread/thread/thr_seterrno.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/*
- * This function needs to reference the global error variable which is
- * normally hidden from the user.
- */
-#ifdef errno
-#undef errno;
-#endif
-extern int errno;
-
-void
-_thread_seterrno(pthread_t thread, int error)
-{
- /* Check for the initial thread: */
- if (thread == _thread_initial) {
- /* The initial thread always uses the global error variable: */
- errno = error;
- } else {
- /*
- * Threads other than the initial thread always use the error
- * field in the thread structureL
- */
- thread->error = error;
- }
-}
-#endif
diff --git a/lib/libpthread/thread/thr_setprio.c b/lib/libpthread/thread/thr_setprio.c
deleted file mode 100644
index 4b49ed0..0000000
--- a/lib/libpthread/thread/thr_setprio.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_setprio(pthread_t pthread, int prio)
-{
- int rval = 0;
- int status;
- pthread_t pthread_p;
-
- /* Check if the priority is invalid: */
- if (prio < PTHREAD_MIN_PRIORITY || prio > PTHREAD_MAX_PRIORITY) {
- /* Return an invalid argument error: */
- errno = EINVAL;
- rval = -1;
- } else {
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the first thread in the list: */
- pthread_p = _thread_link_list;
-
- /* Enter a loop to search for the thread: */
- while (pthread_p != NULL && pthread_p != pthread) {
- /* Point to the next thread: */
- pthread_p = pthread_p->nxt;
- }
-
- /* Check if the thread pointer is NULL: */
- if (pthread == NULL || pthread_p == NULL) {
- /* Return a 'search' error: */
- errno = ESRCH;
- rval = -1;
- } else {
- /* Set the thread priority: */
- pthread->pthread_priority = prio;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- }
-
- /* Return the error status: */
- return (rval);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c
deleted file mode 100644
index e73d5a2..0000000
--- a/lib/libpthread/thread/thr_sig.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-_thread_sig_handler(int sig, int code, struct sigcontext * scp)
-{
- char c;
- int i;
- pthread_t pthread;
-
- /*
- * Check if the pthread kernel has unblocked signals (or is about to)
- * and was on its way into a _thread_sys_select when the current
- * signal interrupted it:
- */
- if (_thread_kern_in_select) {
- /* Cast the signal number to a character variable: */
- c = sig;
-
- /*
- * Write the signal number to the kernel pipe so that it will
- * be ready to read when this signal handler returns. This
- * means that the _thread_sys_select call will complete
- * immediately.
- */
- if (_thread_sys_write(_thread_kern_pipe[1], &c, 1) != 1) {
- }
- }
- /* Check if the signal requires a dump of thread information: */
- if (sig == SIGINFO) {
- /* Dump thread information to file: */
- _thread_dump_info();
- } else {
- /* Handle depending on signal type: */
- switch (sig) {
- /* Interval timer used for timeslicing: */
- case SIGVTALRM:
- /*
- * Don't add the signal to any thread. Just want to
- * call the scheduler:
- */
- break;
-
- /* Child termination: */
- case SIGCHLD:
- /*
- * Enter a loop to process each thread in the linked
- * list:
- */
- for (pthread = _thread_link_list; pthread != NULL;
- pthread = pthread->nxt) {
- /*
- * Add the signal to the set of pending
- * signals:
- */
- pthread->sigpend[sig] += 1;
- if (pthread->state == PS_WAIT_WAIT) {
- /* Reset the error: */
- /* There should be another flag so that this is not required! ### */
- _thread_seterrno(pthread, 0);
-
- /* Change the state of the thread to run: */
- PTHREAD_NEW_STATE(pthread,PS_RUNNING);
- }
- }
-
- /*
- * Go through the file list and set all files
- * to non-blocking again in case the child
- * set some of them to block. Sigh.
- */
- for (i = 0; i < _thread_dtablesize; i++) {
- /* Check if this file is used: */
- if (_thread_fd_table[i] != NULL) {
- /* Set the file descriptor to non-blocking: */
- _thread_sys_fcntl(i, F_SETFL, _thread_fd_table[i]->flags | O_NONBLOCK);
- }
- }
- break;
-
- /* Signals specific to the running thread: */
- case SIGBUS:
- case SIGEMT:
- case SIGFPE:
- case SIGILL:
- case SIGPIPE:
- case SIGSEGV:
- case SIGSYS:
- /* Add the signal to the set of pending signals: */
- _thread_run->sigpend[sig] += 1;
- break;
-
- /* Signals to send to all threads: */
- default:
- /*
- * Enter a loop to process each thread in the linked
- * list:
- */
- for (pthread = _thread_link_list; pthread != NULL;
- pthread = pthread->nxt) {
- /*
- * Add the signal to the set of pending
- * signals:
- */
- pthread->sigpend[sig] += 1;
- }
- break;
- }
-
- /* Check if the kernel is not locked: */
- if (_thread_run != &_thread_kern_thread) {
- /*
- * Schedule the next thread. This function is not
- * expected to return because it will do a longjmp
- * instead.
- */
- _thread_kern_sched(scp);
-
- /*
- * This point should not be reached, so abort the
- * process:
- */
- PANIC("Returned to signal function from scheduler");
- }
- }
-
- /* Returns nothing. */
- return;
-}
-#endif
diff --git a/lib/libpthread/thread/thr_sigaction.c b/lib/libpthread/thread/thr_sigaction.c
deleted file mode 100644
index dd08405..0000000
--- a/lib/libpthread/thread/thr_sigaction.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigaction(int sig, const struct sigaction * act, struct sigaction * oact)
-{
- int ret = 0;
- int status;
-
- /* Check if the signal number is out of range: */
- if (sig < 1 || sig > NSIG) {
- /* Return an invalid argument: */
- errno = EINVAL;
- ret = -1;
- } else {
- /*
- * Check if the existing signal action structure contents are
- * to be returned:
- */
- if (oact != NULL) {
- /* Return the existing signal action contents: */
- oact->sa_handler = _thread_run->act[sig - 1].sa_handler;
- oact->sa_mask = _thread_run->act[sig - 1].sa_mask;
- oact->sa_flags = _thread_run->act[sig - 1].sa_flags;
- }
- /* Check if a signal action was supplied: */
- if (act != NULL) {
- /* Block signals while the signal handler is changed: */
- _thread_kern_sig_block(&status);
-
- /* Set the new signal handler: */
- _thread_run->act[sig - 1].sa_handler = act->sa_handler;
- _thread_run->act[sig - 1].sa_mask = act->sa_mask;
- _thread_run->act[sig - 1].sa_flags = act->sa_flags;
-
- /*
- * Unblock signals to allow the new signal handler to
- * take effect:
- */
- _thread_kern_sig_unblock(status);
- }
- }
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_sigmask.c b/lib/libpthread/thread/thr_sigmask.c
deleted file mode 100644
index 94f64cb..0000000
--- a/lib/libpthread/thread/thr_sigmask.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <signal.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
-{
- int ret = 0;
- int status;
-
- /* Check if the existing signal process mask is to be returned: */
- if (oset != NULL) {
- /* Return the current mask: */
- *oset = _thread_run->sigmask;
- }
- /* Check if a new signal set was provided by the caller: */
- if (set != NULL) {
- /* Block signals while the signal mask is changed: */
- _thread_kern_sig_block(&status);
-
- /* Process according to what to do: */
- switch (how) {
- /* Block signals: */
- case SIG_BLOCK:
- /* Add signals to the existing mask: */
- _thread_run->sigmask |= *set;
- break;
-
- /* Unblock signals: */
- case SIG_UNBLOCK:
- /* Clear signals from the existing mask: */
- _thread_run->sigmask &= ~(*set);
- break;
-
- /* Set the signal process mask: */
- case SIG_SETMASK:
- /* Set the new mask: */
- _thread_run->sigmask = *set;
- break;
-
- /* Trap invalid actions: */
- default:
- /* Return an invalid argument: */
- errno = EINVAL;
- ret = -1;
- break;
- }
-
- /*
- * Schedule the next thread in case there are signals that
- * now need to be acted on:
- */
- _thread_kern_sched(NULL);
- }
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_sigprocmask.c b/lib/libpthread/thread/thr_sigprocmask.c
deleted file mode 100644
index b4a8d84..0000000
--- a/lib/libpthread/thread/thr_sigprocmask.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigprocmask(int how, const sigset_t * set, sigset_t * oset)
-{
- int ret = 0;
- int status;
-
- /* Check if the existing signal process mask is to be returned: */
- if (oset != NULL) {
- /* Return the current mask: */
- *oset = _thread_run->sigmask;
- }
- /* Check if a new signal set was provided by the caller: */
- if (set != NULL) {
- /* Block signals while the signal mask is changed: */
- _thread_kern_sig_block(&status);
-
- /* Process according to what to do: */
- switch (how) {
- /* Block signals: */
- case SIG_BLOCK:
- /* Add signals to the existing mask: */
- _thread_run->sigmask |= *set;
- break;
-
- /* Unblock signals: */
- case SIG_UNBLOCK:
- /* Clear signals from the existing mask: */
- _thread_run->sigmask &= ~(*set);
- break;
-
- /* Set the signal process mask: */
- case SIG_SETMASK:
- /* Set the new mask: */
- _thread_run->sigmask = *set;
- break;
-
- /* Trap invalid actions: */
- default:
- /* Return an invalid argument: */
- errno = EINVAL;
- ret = -1;
- break;
- }
-
- /*
- * Schedule the next thread in case there are signals that
- * now need to be acted on:
- */
- _thread_kern_sched(NULL);
- }
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_sigsuspend.c b/lib/libpthread/thread/thr_sigsuspend.c
deleted file mode 100644
index 14cf74b..0000000
--- a/lib/libpthread/thread/thr_sigsuspend.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigsuspend(const sigset_t * set)
-{
- int ret = -1;
- sigset_t oset;
-
- /* Check if a new signal set was provided by the caller: */
- if (set != NULL) {
- /* Save the current sigmal mask: */
- oset = _thread_run->sigmask;
-
- /* Combine the caller's mask with the current one: */
- _thread_run->sigmask |= *set;
-
- /* Wait for a signal: */
- _thread_kern_sched_state(PS_SIGWAIT, __FILE__, __LINE__);
-
- /* Restore the signal mask: */
- _thread_run->sigmask = oset;
- } else {
- /* Return an invalid argument error: */
- errno = EINVAL;
- }
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_sigwait.c b/lib/libpthread/thread/thr_sigwait.c
deleted file mode 100644
index 4f95190..0000000
--- a/lib/libpthread/thread/thr_sigwait.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1997 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-sigwait(const sigset_t * set, int *sig)
-{
- int ret;
- int status;
- sigset_t oset;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Save the current sigmal mask: */
- oset = _thread_run->sigmask;
-
- /* Combine the caller's mask with the current one: */
- _thread_run->sigmask |= *set;
-
- /* Wait for a signal: */
- _thread_kern_sched_state(PS_SIGWAIT, __FILE__, __LINE__);
-
- /* Block signals again: */
- _thread_kern_sig_block(NULL);
-
- /* Return the signal number to the caller: */
- *sig = _thread_run->signo;
-
- /* Restore the signal mask: */
- _thread_run->sigmask = oset;
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-
- /* Return the completion status: */
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_single_np.c b/lib/libpthread/thread/thr_single_np.c
deleted file mode 100644
index e36c856..0000000
--- a/lib/libpthread/thread/thr_single_np.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1996 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <string.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int pthread_single_np()
-{
- /* Enter single-threaded (non-POSIX) scheduling mode: */
- _thread_single = _thread_run;
- return(0);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_spec.c b/lib/libpthread/thread/thr_spec.c
deleted file mode 100644
index 7ff9054..0000000
--- a/lib/libpthread/thread/thr_spec.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <signal.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-/* Static variables: */
-static struct pthread_key key_table[PTHREAD_KEYS_MAX];
-
-int
-pthread_key_create(pthread_key_t * key, void (*destructor) (void *))
-{
- for ((*key) = 0; (*key) < PTHREAD_KEYS_MAX; (*key)++) {
- if (key_table[(*key)].count == 0) {
- key_table[(*key)].count++;
- key_table[(*key)].destructor = destructor;
- return (0);
- }
- }
- return (EAGAIN);
-}
-
-int
-pthread_key_delete(pthread_key_t key)
-{
- int ret;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- if (key < PTHREAD_KEYS_MAX) {
- switch (key_table[key].count) {
- case 1:
- key_table[key].destructor = NULL;
- key_table[key].count = 0;
- case 0:
- ret = 0;
- break;
- default:
- ret = EBUSY;
- }
- } else {
- ret = EINVAL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return (ret);
-}
-
-void
-_thread_cleanupspecific(void)
-{
- void *data;
- int key;
- int itr;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- for (itr = 0; itr < PTHREAD_DESTRUCTOR_ITERATIONS; itr++) {
- for (key = 0; key < PTHREAD_KEYS_MAX; key++) {
- if (_thread_run->specific_data_count) {
- if (_thread_run->specific_data[key]) {
- data = (void *) _thread_run->specific_data[key];
- _thread_run->specific_data[key] = NULL;
- _thread_run->specific_data_count--;
- if (key_table[key].destructor) {
- key_table[key].destructor(data);
- }
- key_table[key].count--;
- }
- } else {
- free(_thread_run->specific_data);
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return;
- }
- }
- }
- free(_thread_run->specific_data);
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
-}
-
-static inline const void **
-pthread_key_allocate_data(void)
-{
- const void **new_data;
- if ((new_data = (const void **) malloc(sizeof(void *) * PTHREAD_KEYS_MAX)) != NULL) {
- memset((void *) new_data, 0, sizeof(void *) * PTHREAD_KEYS_MAX);
- }
- return (new_data);
-}
-
-int
-pthread_setspecific(pthread_key_t key, const void *value)
-{
- pthread_t pthread;
- int ret = 0;
- int status;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the running thread: */
- pthread = _thread_run;
-
- /*
- * Enter a loop for signal handler threads to find the parent thread
- * which has the specific data associated with it:
- */
- while (pthread->parent_thread != NULL) {
- /* Point to the parent thread: */
- pthread = pthread->parent_thread;
- }
-
- if ((pthread->specific_data) || (pthread->specific_data = pthread_key_allocate_data())) {
- if ((key < PTHREAD_KEYS_MAX) && (key_table)) {
- if (key_table[key].count) {
- if (pthread->specific_data[key] == NULL) {
- if (value != NULL) {
- pthread->specific_data_count++;
- key_table[key].count++;
- }
- } else {
- if (value == NULL) {
- pthread->specific_data_count--;
- key_table[key].count--;
- }
- }
- pthread->specific_data[key] = value;
- ret = 0;
- } else {
- ret = EINVAL;
- }
- } else {
- ret = EINVAL;
- }
- } else {
- ret = ENOMEM;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return (ret);
-}
-
-void *
-pthread_getspecific(pthread_key_t key)
-{
- pthread_t pthread;
- int status;
- void *data;
-
- /* Block signals: */
- _thread_kern_sig_block(&status);
-
- /* Point to the running thread: */
- pthread = _thread_run;
-
- /*
- * Enter a loop for signal handler threads to find the parent thread
- * which has the specific data associated with it:
- */
- while (pthread->parent_thread != NULL) {
- /* Point to the parent thread: */
- pthread = pthread->parent_thread;
- }
-
- /* Check for errors: */
- if (pthread == NULL) {
- /* Return an invalid argument error: */
- data = NULL;
- }
- /* Check if there is specific data: */
- else if (pthread->specific_data != NULL && (key < PTHREAD_KEYS_MAX) && (key_table)) {
- /* Check if this key has been used before: */
- if (key_table[key].count) {
- /* Return the value: */
- data = (void *) pthread->specific_data[key];
- } else {
- /*
- * This key has not been used before, so return NULL
- * instead:
- */
- data = NULL;
- }
- } else {
- /* No specific data has been created, so just return NULL: */
- data = NULL;
- }
-
- /* Unblock signals: */
- _thread_kern_sig_unblock(status);
- return (data);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_suspend_np.c b/lib/libpthread/thread/thr_suspend_np.c
deleted file mode 100644
index d065b73..0000000
--- a/lib/libpthread/thread/thr_suspend_np.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-int
-pthread_suspend_np(pthread_t thread)
-{
- int ret = -1;
- pthread_t pthread;
- /*
- * Search for the thread in the linked list.
- */
- for (pthread = _thread_link_list; pthread != NULL && ret == -1; pthread = pthread->nxt) {
- /* Is this the thread? */
- if (pthread == thread) {
- /* Found the thread. Is it running? */
- if (pthread->state != PS_RUNNING &&
- pthread->state != PS_SUSPENDED) {
- /* The thread operation has been interrupted */
- _thread_seterrno(pthread,EINTR);
- }
- /* Suspend the thread. */
- PTHREAD_NEW_STATE(pthread,PS_SUSPENDED);
- ret = 0;
- }
- }
- /* Check if thread was not found. */
- if (ret == -1) {
- /* No such thread */
- errno = ESRCH;
- }
- return(ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_wait4.c b/lib/libpthread/thread/thr_wait4.c
deleted file mode 100644
index 0a721af4f..0000000
--- a/lib/libpthread/thread/thr_wait4.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#include <errno.h>
-#include <sys/wait.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-pid_t
-wait4(pid_t pid, int *istat, int options, struct rusage * rusage)
-{
- int status;
- pid_t ret;
- _thread_kern_sig_block(&status);
-
- /* Perform a non-blocking wait4 syscall: */
- while ((ret = _thread_sys_wait4(pid, istat, options | WNOHANG, rusage)) == 0 && (options & WNOHANG) == 0) {
- /* Schedule the next thread while this one waits: */
- _thread_kern_sched_state(PS_WAIT_WAIT, __FILE__, __LINE__);
-
- /* Check if this call was interrupted by a signal: */
- if (errno == EINTR) {
- ret = -1;
- break;
- }
- _thread_kern_sig_block(NULL);
- }
- _thread_kern_sig_unblock(status);
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_write.c b/lib/libpthread/thread/thr_write.c
deleted file mode 100644
index eab105d..0000000
--- a/lib/libpthread/thread/thr_write.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-write(int fd, const void *buf, size_t nbytes)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read and write: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking write syscall: */
- while ((ret = _thread_sys_write(fd, buf, nbytes)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDW_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_writev.c b/lib/libpthread/thread/thr_writev.c
deleted file mode 100644
index 5ad1ce9..0000000
--- a/lib/libpthread/thread/thr_writev.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- *
- */
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/uio.h>
-#include <errno.h>
-#include <unistd.h>
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-ssize_t
-writev(int fd, const struct iovec * iov, int iovcnt)
-{
- int ret;
- int status;
-
- /* Lock the file descriptor for read and write: */
- if ((ret = _thread_fd_lock(fd, FD_RDWR, NULL,
- __FILE__, __LINE__)) == 0) {
- /* Perform a non-blocking writev syscall: */
- while ((ret = _thread_sys_writev(fd, iov, iovcnt)) < 0) {
- if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 &&
- (errno == EWOULDBLOCK || errno == EAGAIN)) {
- _thread_kern_sig_block(&status);
- _thread_run->data.fd.fd = fd;
- _thread_kern_set_timeout(NULL);
-
- /* Reset the interrupted operation flag: */
- _thread_run->interrupted = 0;
-
- _thread_kern_sched_state(PS_FDW_WAIT,
- __FILE__, __LINE__);
-
- /*
- * Check if the operation was
- * interrupted by a signal
- */
- if (_thread_run->interrupted) {
- ret = -1;
- break;
- }
- } else {
- break;
- }
- }
- _thread_fd_unlock(fd, FD_RDWR);
- }
- return (ret);
-}
-#endif
diff --git a/lib/libpthread/thread/thr_yield.c b/lib/libpthread/thread/thr_yield.c
deleted file mode 100644
index a88a948..0000000
--- a/lib/libpthread/thread/thr_yield.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by John Birrell.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-#ifdef _THREAD_SAFE
-#include <pthread.h>
-#include "pthread_private.h"
-
-void
-pthread_yield(void)
-{
- /* Reset the accumulated time slice value for the current thread: */
- _thread_run->slice_usec = -1;
-
- /* Schedule the next thread: */
- _thread_kern_sched(NULL);
-
- /* Nothing to return. */
- return;
-}
-#endif
diff --git a/lib/libresolv/Makefile b/lib/libresolv/Makefile
deleted file mode 100644
index 69dcbe8..0000000
--- a/lib/libresolv/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/4/93
-
-LIB= resolv
-INTERNALLIB= yes # Do not build or install ${LIB}*.a
-SHLIB_MAJOR= 2
-SHLIB_MINOR= 0
-
-SRCS= fakelib.c
-
-#
-# Before complaining about this, please *double-check* that you have
-# updated the ldconfig path in /etc/rc to include /usr/lib/compat that
-# was added in src/etc/rc rev 1.98.
-# This is so that programs that use autoconf will not "detect" -lresolv
-# and continue to propagate the bogosity. The ldconfig path fix will
-# enable you to run programs that were linked with -lresolv.
-#
-# libresolv on FreeBSD-2.x **never did anything**!!
-#
-beforeinstall:
- rm -f ${DESTDIR}${LIBDIR}/lib${LIB}.a \
- ${DESTDIR}${LIBDIR}/lib${LIB}_p.a \
- ${DESTDIR}${ORIG_SHLIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
-
-.include <bsd.lib.mk>
-
-# This must follow the .include in case SHLIBDIR is defined there.
-ORIG_SHLIBDIR:= ${SHLIBDIR}
-
-# The ldconfig line in/etc/rc doesn't depend on ${LIBDIR} or ${SHLIBDIR},
-# so neither does this.
-SHLIBDIR= /usr/lib/compat
diff --git a/lib/libresolv/fakelib.c b/lib/libresolv/fakelib.c
deleted file mode 100644
index 0f7b46f..0000000
--- a/lib/libresolv/fakelib.c
+++ /dev/null
@@ -1 +0,0 @@
-static int ___fake_library___;
diff --git a/lib/librpcsvc/Makefile b/lib/librpcsvc/Makefile
deleted file mode 100644
index 44c2384..0000000
--- a/lib/librpcsvc/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-# from: @(#)Makefile 5.10 (Berkeley) 6/24/90
-# $Id: Makefile,v 1.6 1996/08/30 02:02:09 peter Exp $
-
-.PATH: ${DESTDIR}/usr/include/rpcsvc
-
-LIB= rpcsvc
-
-RPCSRCS= klm_prot.x mount.x nfs_prot.x nlm_prot.x rex.x rnusers.x \
- rquota.x rstat.x rwall.x sm_inter.x spray.x yppasswd.x ypxfrd.x \
- ypupdate_prot.x
-
-OTHERSRCS= rnusers.c rstat.c rwall.c yp_passwd.c yp_update.c
-SECRPCSRCS= publickey.c secretkey.c xcrypt.c
-
-RPCCOM = rpcgen -C
-
-INCDIRS= -I${DESTDIR}/usr/include/rpcsvc -I${DESTDIR}/usr/include
-
-CFLAGS+= -DYP ${INCDIRS}
-
-GENSRCS= ${RPCSRCS:R:S/$/_xdr.c/g}
-SRCS+= ${GENSRCS} ${OTHERSRCS} ${SECRPCSRCS}
-
-CLEANFILES+= ${GENSRCS} ${RPCSRCS}
-
-NOMAN= noman
-
-.include <bsd.lib.mk>
-
-.SUFFIXES: .x _xdr.c
-
-.x_xdr.c:
- ${RPCCOM} -c ${.IMPSRC} -o ${.TARGET}
-
-OBJS= ${RPCSRCS:R:S/$/_xdr.o/g} ${SECRPCSRCS:R:S/$/.o/g} \
- ${OTHERSRCS:R:S/$/.o/g}
diff --git a/lib/librpcsvc/publickey.c b/lib/librpcsvc/publickey.c
deleted file mode 100644
index e1c34d9..0000000
--- a/lib/librpcsvc/publickey.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user or with the express written consent of
- * Sun Microsystems, Inc.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)publickey.c 1.10 91/03/11 Copyr 1986 Sun Micro";
-#endif
-
-/*
- * publickey.c
- * Copyright (C) 1986, Sun Microsystems, Inc.
- */
-
-/*
- * Public key lookup routines
- */
-#include <stdio.h>
-#include <pwd.h>
-#include <rpc/rpc.h>
-#include <rpc/key_prot.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#include <string.h>
-#include <stdlib.h>
-
-#define PKFILE "/etc/publickey"
-
-/*
- * Hack to let ypserv/rpc.nisd use AUTH_DES.
- */
-int (*__getpublickey_LOCAL)() = 0;
-
-/*
- * Get somebody's public key
- */
-int
-__getpublickey_real(netname, publickey)
- char *netname;
- char *publickey;
-{
- char lookup[3 * HEXKEYBYTES];
- char *p;
-
- if (publickey == NULL)
- return (0);
- if (!getpublicandprivatekey(netname, lookup))
- return (0);
- p = strchr(lookup, ':');
- if (p == NULL) {
- return (0);
- }
- *p = '\0';
- (void) strncpy(publickey, lookup, HEXKEYBYTES);
- publickey[HEXKEYBYTES] = '\0';
- return (1);
-}
-
-/*
- * reads the file /etc/publickey looking for a + to optionally go to the
- * yellow pages
- */
-
-int
-getpublicandprivatekey(key, ret)
- char *key;
- char *ret;
-{
- char buf[1024]; /* big enough */
- char *res;
- FILE *fd;
- char *mkey;
- char *mval;
-
- fd = fopen(PKFILE, "r");
- if (fd == (FILE *) 0)
- return (0);
- for (;;) {
- res = fgets(buf, 1024, fd);
- if (res == 0) {
- fclose(fd);
- return (0);
- }
- if (res[0] == '#')
- continue;
- else if (res[0] == '+') {
-#ifdef YP
- char *PKMAP = "publickey.byname";
- char *lookup;
- char *domain;
- int err;
- int len;
-
- err = yp_get_default_domain(&domain);
- if (err) {
- continue;
- }
- lookup = NULL;
- err = yp_match(domain, PKMAP, key, strlen(key), &lookup, &len);
- if (err) {
-#ifdef DEBUG
- fprintf(stderr, "match failed error %d\n", err);
-#endif
- continue;
- }
- lookup[len] = 0;
- strcpy(ret, lookup);
- fclose(fd);
- free(lookup);
- return (2);
-#else /* YP */
-#ifdef DEBUG
- fprintf(stderr,
-"Bad record in %s '+' -- NIS not supported in this library copy\n", PKFILE);
-#endif /* DEBUG */
- continue;
-#endif /* YP */
- } else {
- mkey = strtok(buf, "\t ");
- if (mkey == NULL) {
- fprintf(stderr,
- "Bad record in %s -- %s", PKFILE, buf);
- continue;
- }
- mval = strtok((char *)NULL, " \t#\n");
- if (mval == NULL) {
- fprintf(stderr,
- "Bad record in %s val problem - %s", PKFILE, buf);
- continue;
- }
- if (strcmp(mkey, key) == 0) {
- strcpy(ret, mval);
- fclose(fd);
- return (1);
- }
- }
- }
-}
-
-int getpublickey(netname, publickey)
- char *netname;
- char *publickey;
-{
- if (__getpublickey_LOCAL != NULL)
- return(__getpublickey_LOCAL(netname, publickey));
- else
- return(__getpublickey_real(netname, publickey));
-}
diff --git a/lib/librpcsvc/rnusers.c b/lib/librpcsvc/rnusers.c
deleted file mode 100644
index 3a4629f..0000000
--- a/lib/librpcsvc/rnusers.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user or with the express written consent of
- * Sun Microsystems, Inc.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rnusers.c 1.2 91/03/11 TIRPC 1.0; from 1.7 89/03/24 SMI";
-#endif
-
-/*
- * rnusers.c
- *
- * "High" level programmatic interface to rnusers RPC service.
- *
- * Copyright (c) 1985 by Sun Microsystems, Inc.
- */
-
-#include <rpc/rpc.h>
-#include <rpcsvc/rnusers.h>
-
-int
-rusers(host, up)
- char *host;
- struct utmpidlearr *up;
-{
- return (callrpc(host, RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NAMES,
- xdr_void, (char *) NULL,
- xdr_utmpidlearr, (char *) up));
-}
-
-int
-rnusers(host)
- char *host;
-{
- int nusers;
-
- if (callrpc(host, RUSERSPROG, RUSERSVERS_ORIG, RUSERSPROC_NUM,
- xdr_void, (char *) NULL,
- xdr_u_long, (char *) &nusers) != 0)
- return (-1);
- else
- return (nusers);
-}
-
diff --git a/lib/librpcsvc/rstat.c b/lib/librpcsvc/rstat.c
deleted file mode 100644
index 6851c75..0000000
--- a/lib/librpcsvc/rstat.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user or with the express written consent of
- * Sun Microsystems, Inc.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rstat.c 1.2 91/03/11 TIRPC 1.0; from 1.6 89/03/24 SMI";
-#endif
-
-/*
- * Copyright (c) 1985 by Sun Microsystems, Inc.
- */
-
-/*
- * "High" level programmatic interface to rstat RPC service.
- */
-#include <rpc/rpc.h>
-#include <rpcsvc/rstat.h>
-
-int
-rstat(host, statp)
- char *host;
- struct statstime *statp;
-{
- return (callrpc(host, RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS,
- xdr_void, (char *) NULL,
- xdr_statstime, (char *) statp));
-}
-
-int
-havedisk(host)
- char *host;
-{
- long have;
-
- if (callrpc(host, RSTATPROG, RSTATVERS_SWTCH, RSTATPROC_HAVEDISK,
- xdr_void, (char *) NULL,
- xdr_long, (char *) &have) != 0)
- return (-1);
- else
- return (have);
-}
-
diff --git a/lib/librpcsvc/rwall.c b/lib/librpcsvc/rwall.c
deleted file mode 100644
index 97de86e..0000000
--- a/lib/librpcsvc/rwall.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user or with the express written consent of
- * Sun Microsystems, Inc.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)rwall.c 1.2 91/03/11 TIRPC 1.0; from 1.3 89/03/24 SMI";
-#endif
-
-/*
- * Copyright (c) 1985 by Sun Microsystems, Inc.
- */
-
-/*
- * "High" level programmatic interface to rwall RPC service.
- */
-#include <rpc/rpc.h>
-#include <rpcsvc/rwall.h>
-
-int
-rwall(host, msg)
- char *host;
- char *msg;
-{
- return (callrpc(host, WALLPROG, WALLVERS, WALLPROC_WALL,
- xdr_wrapstring, (char *) &msg,
- xdr_void, (char *) NULL));
-}
diff --git a/lib/librpcsvc/secretkey.c b/lib/librpcsvc/secretkey.c
deleted file mode 100644
index 374372b..0000000
--- a/lib/librpcsvc/secretkey.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user or with the express written consent of
- * Sun Microsystems, Inc.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)secretkey.c 1.8 91/03/11 Copyr 1986 Sun Micro";
-#endif
-
-/*
- * secretkey.c
- * Copyright (C) 1986, Sun Microsystems, Inc.
- */
-
-/*
- * Secret key lookup routines
- */
-#include <stdio.h>
-#include <pwd.h>
-#include <rpc/rpc.h>
-#include <rpc/key_prot.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#include <string.h>
-
-extern int xdecrypt __P(( char *, char * ));
-
-/*
- * Get somebody's encrypted secret key from the database, using the given
- * passwd to decrypt it.
- */
-int
-getsecretkey(netname, secretkey, passwd)
- char *netname;
- char *secretkey;
- char *passwd;
-{
- char lookup[3 * HEXKEYBYTES];
- char *p;
-
- if (secretkey == NULL)
- return (0);
- if (!getpublicandprivatekey(netname, lookup))
- return (0);
- p = strchr(lookup, ':');
- if (p == NULL) {
- return (0);
- }
- p++;
- if (!xdecrypt(p, passwd)) {
- return (0);
- }
- if (memcmp(p, p + HEXKEYBYTES, KEYCHECKSUMSIZE) != 0) {
- secretkey[0] = '\0';
- return (1);
- }
- p[HEXKEYBYTES] = '\0';
- (void) strncpy(secretkey, p, HEXKEYBYTES);
- secretkey[HEXKEYBYTES] = '\0';
- return (1);
-}
diff --git a/lib/librpcsvc/xcrypt.c b/lib/librpcsvc/xcrypt.c
deleted file mode 100644
index 3635bd8..0000000
--- a/lib/librpcsvc/xcrypt.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part. Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California 94043
- */
-/*
- * Hex encryption/decryption and utility routines
- *
- * Copyright (C) 1986, Sun Microsystems, Inc.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/cdefs.h>
-#include <rpc/des_crypt.h>
-
-#ifndef lint
-/*from: static char sccsid[] = "@(#)xcrypt.c 2.2 88/08/10 4.0 RPCSRC"; */
-static const char rcsid[] = "$Id: xcrypt.c,v 1.1 1996/11/12 02:36:12 wpaul Exp $";
-#endif
-
-static char hex[]; /* forward */
-static char hexval __P(( char ));
-static void bin2hex __P(( int, unsigned char *, char * ));
-static void hex2bin __P(( int, char *, char * ));
-void passwd2des __P(( char *, char * ));
-
-/*
- * Encrypt a secret key given passwd
- * The secret key is passed and returned in hex notation.
- * Its length must be a multiple of 16 hex digits (64 bits).
- */
-int
-xencrypt(secret, passwd)
- char *secret;
- char *passwd;
-{
- char key[8];
- char ivec[8];
- char *buf;
- int err;
- int len;
-
- len = strlen(secret) / 2;
- buf = malloc((unsigned)len);
-
- hex2bin(len, secret, buf);
- passwd2des(passwd, key);
- bzero(ivec, 8);
-
- err = cbc_crypt(key, buf, len, DES_ENCRYPT | DES_HW, ivec);
- if (DES_FAILED(err)) {
- free(buf);
- return (0);
- }
- bin2hex(len, (unsigned char *) buf, secret);
- free(buf);
- return (1);
-}
-
-/*
- * Decrypt secret key using passwd
- * The secret key is passed and returned in hex notation.
- * Once again, the length is a multiple of 16 hex digits
- */
-int
-xdecrypt(secret, passwd)
- char *secret;
- char *passwd;
-{
- char key[8];
- char ivec[8];
- char *buf;
- int err;
- int len;
-
- len = strlen(secret) / 2;
- buf = malloc((unsigned)len);
-
- hex2bin(len, secret, buf);
- passwd2des(passwd, key);
- bzero(ivec, 8);
-
- err = cbc_crypt(key, buf, len, DES_DECRYPT | DES_HW, ivec);
- if (DES_FAILED(err)) {
- free(buf);
- return (0);
- }
- bin2hex(len, (unsigned char *) buf, secret);
- free(buf);
- return (1);
-}
-
-
-/*
- * Turn password into DES key
- */
-void
-passwd2des(pw, key)
- char *pw;
- char *key;
-{
- int i;
-
- bzero(key, 8);
- for (i = 0; *pw; i = (i+1)%8) {
- key[i] ^= *pw++ << 1;
- }
- des_setparity(key);
-}
-
-
-
-/*
- * Hex to binary conversion
- */
-static void
-hex2bin(len, hexnum, binnum)
- int len;
- char *hexnum;
- char *binnum;
-{
- int i;
-
- for (i = 0; i < len; i++) {
- *binnum++ = 16 * hexval(hexnum[2*i]) + hexval(hexnum[2*i+1]);
- }
-}
-
-/*
- * Binary to hex conversion
- */
-static void
-bin2hex(len, binnum, hexnum)
- int len;
- unsigned char *binnum;
- char *hexnum;
-{
- int i;
- unsigned val;
-
- for (i = 0; i < len; i++) {
- val = binnum[i];
- hexnum[i*2] = hex[val >> 4];
- hexnum[i*2+1] = hex[val & 0xf];
- }
- hexnum[len*2] = 0;
-}
-
-static char hex[16] = {
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
-};
-
-static char
-hexval(c)
- char c;
-{
- if (c >= '0' && c <= '9') {
- return (c - '0');
- } else if (c >= 'a' && c <= 'z') {
- return (c - 'a' + 10);
- } else if (c >= 'A' && c <= 'Z') {
- return (c - 'A' + 10);
- } else {
- return (-1);
- }
-}
diff --git a/lib/librpcsvc/yp_passwd.c b/lib/librpcsvc/yp_passwd.c
deleted file mode 100644
index 253291a..0000000
--- a/lib/librpcsvc/yp_passwd.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 1995, 1996
- * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Bill Paul.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: yp_passwd.c,v 1.1 1996/11/16 20:52:13 wpaul Exp $
- */
-
-#include <stdlib.h>
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#include <rpcsvc/yppasswd.h>
-#include <netinet/in.h>
-
-#ifndef LINT
-static const char rcsid[] = "$Id: yp_passwd.c,v 1.1 1996/11/16 20:52:13 wpaul Exp $";
-#endif
-
-/*
- * XXX <rpcsvc/yppasswd.h> does a typedef that makes 'yppasswd'
- * a type of struct yppasswd. This leads to a namespace collision:
- * gcc will not let you have a type called yppasswd and a function
- * called yppasswd(). In order to get around this, we call the
- * actual function _yppasswd() and put a macro called yppasswd()
- * in yppasswd.h which calls the underlying function, thereby
- * fooling gcc.
- */
-
-int _yppasswd(oldpass, newpw)
- char *oldpass;
- struct x_passwd *newpw;
-{
- char *server;
- char *domain;
- int rval, result;
- struct yppasswd yppasswd;
-
- yppasswd.newpw = *newpw;
- yppasswd.oldpass = oldpass;
-
- if (yp_get_default_domain(&domain))
- return (-1);
-
- if (yp_master(domain, "passwd.byname", &server))
- return(-1);
-
- rval = getrpcport(server, YPPASSWDPROG,
- YPPASSWDPROC_UPDATE, IPPROTO_UDP);
-
- if (rval == 0 || rval >= IPPORT_RESERVED) {
- free(server);
- return(-1);
- }
-
- rval = callrpc(server, YPPASSWDPROG, YPPASSWDVERS, YPPASSWDPROC_UPDATE,
- xdr_yppasswd, (char *)&yppasswd, xdr_int, &result);
-
- free(server);
- if (rval || result)
- return(-1);
- else
- return(0);
-}
diff --git a/lib/librpcsvc/yp_update.c b/lib/librpcsvc/yp_update.c
deleted file mode 100644
index cbaa0fd..0000000
--- a/lib/librpcsvc/yp_update.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (c) 1995, 1996
- * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Bill Paul.
- * 4. Neither the name of the author nor the names of any co-contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * ypupdate client-side library function.
- *
- * Written by Bill Paul <wpaul@ctr.columbia.edu>
- * Center for Telecommunications Research
- * Columbia University, New York City
- *
- * $Id: yp_update.c,v 1.1 1996/11/16 20:54:57 wpaul Exp $
- */
-
-#include <stdlib.h>
-#include <rpc/rpc.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-#include <rpcsvc/ypupdate_prot.h>
-#include <rpc/key_prot.h>
-
-#ifndef lint
-static const char rcsid[] = "$Id: yp_update.c,v 1.1 1996/11/16 20:54:57 wpaul Exp $";
-#endif
-
-#ifndef WINDOW
-#define WINDOW (60*60)
-#endif
-
-#ifndef TIMEOUT
-#define TIMEOUT 300
-#endif
-
-int
-yp_update(domain, map, ypop, key, keylen, data, datalen)
- char *domain;
- char *map;
- unsigned int ypop;
- char *key;
- int keylen;
- char *data;
- int datalen;
-{
- char *master;
- int rval;
- unsigned int res;
- struct ypupdate_args upargs;
- struct ypdelete_args delargs;
- CLIENT *clnt;
- char netname[MAXNETNAMELEN+1];
- des_block des_key;
- struct timeval timeout;
-
- /* Get the master server name for 'domain.' */
- if ((rval = yp_master(domain, map, &master)))
- return(rval);
-
- /* Check that ypupdated is running there. */
- if (getrpcport(master, YPU_PROG, YPU_VERS, ypop))
- return(YPERR_DOMAIN);
-
- /* Get a handle. */
- if ((clnt = clnt_create(master, YPU_PROG, YPU_VERS, "tcp")) == NULL)
- return(YPERR_RPC);
-
- /*
- * Assemble netname of server.
- * NOTE: It's difficult to discern from the documentation, but
- * when you make a Secure RPC call, the netname you pass should
- * be the netname of the guy on the other side, not your own
- * netname. This is how the client side knows what public key
- * to use for the initial exchange. Passing your own netname
- * only works if the server on the other side is running under
- * your UID.
- */
- if (!host2netname(netname, master, domain)) {
- clnt_destroy(clnt);
- return(YPERR_BADARGS);
- }
-
- /* Make up a DES session key. */
- key_gendes(&des_key);
-
- /* Set up DES authentication. */
- if ((clnt->cl_auth = (AUTH *)authdes_create(netname, WINDOW, NULL,
- &des_key)) == NULL) {
- clnt_destroy(clnt);
- return(YPERR_RESRC);
- }
-
- /* Set a timeout for clnt_call(). */
- timeout.tv_usec = 0;
- timeout.tv_sec = TIMEOUT;
-
- /*
- * Make the call. Note that we use clnt_call() here rather than
- * the rpcgen-erated client stubs. We could use those stubs, but
- * then we'd have to do some gymnastics to get at the error
- * information to figure out what error code to send back to the
- * caller. With clnt_call(), we get the error status returned to
- * us right away, and we only have to exert a small amount of
- * extra effort.
- */
- switch(ypop) {
- case YPOP_CHANGE:
- upargs.mapname = map;
- upargs.key.yp_buf_len = keylen;
- upargs.key.yp_buf_val = key;
- upargs.datum.yp_buf_len = datalen;
- upargs.datum.yp_buf_val = data;
-
- if ((rval = clnt_call(clnt, YPU_CHANGE, xdr_ypupdate_args,
- &upargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
- if (rval == RPC_AUTHERROR)
- res = YPERR_ACCESS;
- else
- res = YPERR_RPC;
- }
-
- break;
- case YPOP_INSERT:
- upargs.mapname = map;
- upargs.key.yp_buf_len = keylen;
- upargs.key.yp_buf_val = key;
- upargs.datum.yp_buf_len = datalen;
- upargs.datum.yp_buf_val = data;
-
- if ((rval = clnt_call(clnt, YPU_INSERT, xdr_ypupdate_args,
- &upargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
- if (rval == RPC_AUTHERROR)
- res = YPERR_ACCESS;
- else
- res = YPERR_RPC;
- }
-
- break;
- case YPOP_DELETE:
- delargs.mapname = map;
- delargs.key.yp_buf_len = keylen;
- delargs.key.yp_buf_val = key;
-
- if ((rval = clnt_call(clnt, YPU_DELETE, xdr_ypdelete_args,
- &delargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
- if (rval == RPC_AUTHERROR)
- res = YPERR_ACCESS;
- else
- res = YPERR_RPC;
- }
-
- break;
- case YPOP_STORE:
- upargs.mapname = map;
- upargs.key.yp_buf_len = keylen;
- upargs.key.yp_buf_val = key;
- upargs.datum.yp_buf_len = datalen;
- upargs.datum.yp_buf_val = data;
-
- if ((rval = clnt_call(clnt, YPU_STORE, xdr_ypupdate_args,
- &upargs, xdr_u_int, &res, timeout)) != RPC_SUCCESS) {
- if (rval == RPC_AUTHERROR)
- res = YPERR_ACCESS;
- else
- res = YPERR_RPC;
- }
-
- break;
- default:
- res = YPERR_BADARGS;
- break;
- }
-
- /* All done: tear down the connection. */
- auth_destroy(clnt->cl_auth);
- clnt_destroy(clnt);
- free(master);
-
- return(res);
-}
diff --git a/lib/libscsi/Makefile b/lib/libscsi/Makefile
deleted file mode 100644
index 5aed689..0000000
--- a/lib/libscsi/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/4/93
-
-LIB= scsi
-#CFLAGS+=-DLIBC_SCCS -I${.CURDIR}/../../sys
-SRCS= scsi.c
-
-MAN3= scsi.3
-
-MLINKS+=scsi.3 scsireq_buff_decode.3 scsi.3 scsireq_build.3 \
- scsi.3 scsireq_decode.3 scsi.3 scsireq_encode.3 \
- scsi.3 scsireq_enter.3 scsi.3 scsireq_new.3 \
- scsi.3 scsireq_reset.3 scsi.3 SCSIREQ_ERROR.3 \
- scsi.3 scsi_open.3 scsi.3 scsi_debug.3 \
- scsi.3 scsi_debug_output.3
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/scsi.h \
- ${DESTDIR}/usr/include
-
-
-.include <bsd.lib.mk>
diff --git a/lib/libscsi/scsi.3 b/lib/libscsi/scsi.3
deleted file mode 100644
index a61166b..0000000
--- a/lib/libscsi/scsi.3
+++ /dev/null
@@ -1,350 +0,0 @@
-.\" Copyright (c) 1994 HD Associates (hd@world.std.com)
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by HD Associates
-.\" 4. Neither the name of the HD Associates 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 BY HD ASSOCIATES``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\"
-.Dd November 20, 1994
-.Dt SCSI 3
-.Os
-.Sh NAME
-.Nm scsireq_buff_decode ,
-.Nm scsireq_build ,
-.Nm scsireq_decode ,
-.Nm scsireq_encode ,
-.Nm scsireq_enter ,
-.Nm scsireq_new ,
-.Nm scsireq_reset ,
-.Nm SCSIREQ_ERROR ,
-.Nm scsi_open ,
-.Nm scsi_debug ,
-.Nm scsi_debug_output
-.Nd SCSI User library
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/scsiio.h>
-.Fd #include <scsi.h>
-.Ft int
-.Fn scsireq_buff_decode "u_char *ptr" "size_t len" "char *fmt" ...
-.Ft struct scsireq *
-.Fn scsireq_build "struct scsireq *s" "u_long len" "caddr_t buf" "u_long flags" "char *fmt" ...
-.Ft int
-.Fn scsireq_decode "struct scsireq *" "char *fmt" ...
-.Ft int
-.Fn scsireq_encode "struct scsireq *" "char *fmt" ...
-.Ft int
-.Fn scsireq_enter "int fid" "struct scsireq *s"
-.Ft struct scsireq *
-.Fn scsireq_new void
-.Ft struct scsireq *
-.Fn scsireq_reset "struct scsireq *"
-.Ft int
-.Fn SCSIREQ_ERROR "struct scsireq *"
-.Ft int
-.Fn scsi_open "const char *path" "int flags"
-.Ft int
-.Fn scsi_debug "FILE *f" "int ret" "struct scsireq *s"
-.Ft FILE *
-.Fn scsi_debug_output "char *s"
-.Sh DESCRIPTION
-These functions
-use the SCIOCCOMMAND
-.Xr ioctl 2
-of the FreeBSD SCSI subsystem
-to provide user level access to SCSI commands.
-The programmer must know the SCSI CDB (Command Descriptor
-Block) to perform the desired command. These functions assist in
-building up the CDB, submitting it to the SCSI subsystem, and decoding
-the result.
-.Pp
-Look at the
-.Xr scsi 8
-command before using the library directly - simple programs are
-best implemented as scripts using that facility.
-.Pp
-To provide for security,
-not all devices accept the SCIOCCOMAND ioctl. It is accepted by the
-control device for tape drives, partition D for disk drives, partition C
-for CD ROM drives, and any "unknown" device.
-The "super scsi"
-.Xr ssc 4
-device also accepts the ioctl.
-.Pp
-Most of the SCSI library functions build up and manipulate the
-.Fa scsireq
-structure found in the include file
-.Aq Pa sys/scsiio.h :
-.Bd -literal -offset indent
-#define SENSEBUFLEN 48
-.Pp
-typedef struct scsireq {
- u_long flags; /* info about the request status and type */
- u_long timeout;
- u_char cmd[16]; /* 12 is actually the max */
- u_char cmdlen;
- caddr_t databuf; /* address in user space of buffer */
- u_long datalen; /* size of user buffer (request) */
- u_long datalen_used; /* size of user buffer (used)*/
- u_char sense[SENSEBUFLEN]; /* returned sense will be in here */
- u_char senselen; /* sensedata request size (MAX of SENSEBUFLEN)*/
- u_char senselen_used; /* return value only */
- u_char status; /* what the scsi status was from the adapter */
- u_char retsts; /* the return status for the command */
- int error; /* error bits */
-} scsireq_t;
-.Ed
-.Pp
-.Fn scsireq_new
-allocates a new
-.Fa scsireq
-structure and returns a pointer to it or NULL if it can't allocate
-memory.
-.Pp
-.Fn scsireq_reset
-resets the structure to reasonable values and returns the same pointer passed
-in to it.
-It gracefully handles the NULL pointer passed in to it so that you can
-unconditionally use
-.Fa scsireq_new .
-.Pp
-.Fn scsireq_build
-builds up a scsireq structure based on the information provided in
-the variable argument list.
-It gracefully handles a NULL pointer passed to it.
-.Pp
-.Fa len
-is the length of the data phase; the data transfer direction is
-determined by the
-.Fa flags
-argument.
-.Pp
-.Fa buf
-is the data buffer used during the SCSI data phase. If it is NULL it
-is allocated via malloc and
-.Fa scsireq->databuf
-is set to point to the newly allocated memory.
-.Pp
-.Fa flags
-are the flags defined in
-.Aq Pa sys/scsiio.h :
-.Bd -literal -offset indent
-/* bit definitions for flags */
-#define SCCMD_READ 0x00000001
-#define SCCMD_WRITE 0x00000002
-#define SCCMD_IOV 0x00000004
-#define SCCMD_ESCAPE 0x00000010
-#define SCCMD_TARGET 0x00000020
-.Ed
-Only two of these flags are supported in this release of the software:
-.Dv SCCMD_READ
-indicates a data in phase (a transfer into the user buffer at
-.Fa scsireg->databuf
-), and
-.Dv SCCMD_WRITE
-indicates a data out phase (a transfer out of the user buffer).
-.Pp
-.Fa fmt
-is a CDB format specifier used to build up the SCSI CDB.
-This text string is made up of a list of field specifiers. Field
-specifiers specify the value for each CDB field (including indicating
-that the value be taken from the next argument in the
-variable argument list), the width
-of the field in bits or bytes, and an optional name. White space is
-ignored, and the pound sign ('#') introduces a comment that ends at the
-end of the current line.
-.Pp
-The optional name is the first part of a field specifier and
-is in curly braces. The text in curly braces in this example are
-the names:
-.Bd -literal -offset indent
-.Fa "{PS} v:b1 {Reserved} 0:b1 {Page Code} v:b6 # Mode select page"
-.Ed
-.Pp
-This field specifier has two one bit fields and one six bit field.
-The second one bit field is the constant value 0 and the first
-one bit field and the six bit field are taken from the variable
-argument list.
-Multi byte fields are swapped into the SCSI byte order in the
-CDB and white space is ignored.
-.Pp
-When the field is a hex value or the letter v, (e.g.,
-.Fa "1A"
-or
-.Fa "v" )
-then a single byte value
-is copied to the next unused byte of the CDB.
-When the letter
-.Fa v
-is used the next integer argument is taken from the variable argument list
-and that value used.
-.Pp
-A constant hex value followed by a field width specifier or the letter
-.Fa v
-followed by a field width specifier (e.g.,
-.Fa 3:4 ,
-.Fa 3:b4 ,
-.Fa 3:i3 ,
-.FR v:i3 )
-specifies a field of a given bit or byte width.
-Either the constant value or (for the V specifier) the next integer value from
-the variable argument list is copied to the next unused
-bits or bytes of the CDB.
-.Pp
-A decimal number or the letter
-.Fa b
-followed by a decimal number field width indicates a bit field of that width.
-The bit fields are packed as tightly as possible beginning with the
-high bit (so that it reads the same as the SCSI spec), and a new byte of
-the CDB is started whenever a byte fills completely or when an
-.Fa i
-field is encountered.
-.Pp
-A field width specifier consisting of the letter
-.Fa i
-followed by either
-1, 2, 3 or 4 indicates a 1, 2, 3 or 4 byte integral value that must
-be swapped into SCSI byte order (MSB first).
-.Pp
-For the
-.Fa v
-field specifier the next integer argument is taken from the variable argument
-list and that value is used swapped into SCSI byte order.
-.Pp
-.Fn scsireq_decode
-is used to decode information from the data in phase of the SCSI
-transfer.
-.Pp
-The decoding is similar to
-the command specifier processing of
-.Fn scsireq_build
-except that the data is extracted from the data pointed to by
-.Fa scsireq->databuf.
-The stdarg list should be pointers to integers instead of integer
-values.
-A seek field type and a suppression modifier are added.
-The
-.Fa *
-suppression modifier (e.g.,
-.Fa *i3
-or
-.Fa *b4 )
-suppresses assignment from the field and can be used to skip
-over bytes or bits in the data, without having to copy
-them to a dummy variable in the arg list.
-.Pp
-The seek field type
-.Fa s
-permits you to skip over data.
-This seeks to an absolute position (
-.Fa s3 )
-or a relative position (
-.Fa s+3 )
-in the data, based on whether or not the presence of the '+' sign.
-The seek value can be specified as
-.Fa v
-and the next integer value from the argument list will be
-used as the seek value.
-.Pp
-.Fn scsireq_buff_decode
-decodes an arbitrary data buffer using the method
-described above in
-.Fn scsireq_decode .
-.Pp
-.Fn scsireq_encode
-encodes the data phase section of the structure. The encoding is
-handled identically as the encoding of the CDB structure by
-.Fn scsireq_build
-.Pp
-.Fn scsireq_enter
-submits the built up structure for processing using
-the SCIOCCOMMAND ioctl.
-.Pp
-.Fn SCSIREQ_ERROR
-is a macro that determines if the result of the SCIOCCOMMAND ioctl may
-have been
-in error by examining the host adapter return code, whether sense was sent
-or not, and so on.
-.Pp
-.Fn scsi_open
-checks environment variables and initializes the library for
-consistent library use and then calls the regular open system call.
-.Pp
-.Fn scsi_debug
-prints the results of a scsireq_enter function to the specified stdio
-stream.
-.Pp
-.Fn scsi_debug_output
-requests that the results of all transactions be debugged to the
-supplied file using
-.Fn scsi_debug .
-.Sh RETURN VALUES
-The function
-.Fn scsireq_new
-returns a pointer to storage allocated from malloc, and therefore
-potentially a NULL.
-.Pp
-The functions
-.Fn scsireq_build
-and
-.Fn scsireq_reset
-return the same pointer as the one passed in.
-.Pp
-The functions
-.Fn scsireq_buff_decode
-and
-.Fn scsireq_decode
-return the number of assignments performed.
-.Pp
-.Fn scsireq_encode
-returns the number of fields processed.
-.Pp
-The function
-.Fn scsireq_enter
-returns the result of the ioctl call.
-.Sh SEE ALSO
-.Xr scsi 4 ,
-.Xr scsi 8
-.Sh BUGS
-This only works completely for the 1542C. The host adapter code
-that sets up the residual amount of data transfer has to be added
-to each individual adapter. This library is usable on the other
-host adapters, however, the SCSI driver pretends that the proper
-amount of data is always transferred. If you have an Adaptec 174x
-and can hack contact dufault@hda.com and you can have the code to
-calculate residual data for the 174x series to integrate and test.
-.Sh HISTORY
-Many systems have comparable interfaces to permit a user to construct a
-SCSI command in user space.
-.Pp
-The data structure is almost identical to the SGI /dev/scsi data
-structure. If anyone knows the name of the authors it should
-go here; Peter Dufault first read about it in a 1989 Sun Expert magazine.
-.Pp
-Peter Dufault implemented a clone of SGI's interface in 386bsd that
-led to this library and the related kernel ioctl.
-If anyone needs that for compatibility contact dufault@hda.com.
diff --git a/lib/libscsi/scsi.c b/lib/libscsi/scsi.c
deleted file mode 100644
index 3293a72..0000000
--- a/lib/libscsi/scsi.c
+++ /dev/null
@@ -1,1192 +0,0 @@
-/* scsi: SCSI user library
- */
-/* Copyright (c) 1994 HD Associates
- * (contact: dufault@hda.com)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by HD Associates
- * 4. Neither the name of the HD Associaates 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 BY HD ASSOCIATES``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * $Id$
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <sys/scsiio.h>
-#include <sys/errno.h>
-#include <stdarg.h>
-#include <fcntl.h>
-
-#include "scsi.h"
-
-static struct
-{
- FILE *db_f;
- int db_level;
- int db_trunc;
-} behave;
-
-/* scsireq_reset: Reset a scsireq structure.
- */
-scsireq_t *scsireq_reset(scsireq_t *scsireq)
-{
- if (scsireq == 0)
- return scsireq;
-
- scsireq->flags = 0; /* info about the request status and type */
- scsireq->timeout = 2000; /* 2 seconds */
- bzero(scsireq->cmd, sizeof(scsireq->cmd));
- scsireq->cmdlen = 0;
- /* Leave scsireq->databuf alone */
- /* Leave scsireq->datalen alone */
- scsireq->datalen_used = 0;
- bzero(scsireq->sense, sizeof(scsireq->sense));
- scsireq->senselen = sizeof(scsireq->sense);
- scsireq->senselen_used = 0;
- scsireq->status = 0;
- scsireq->retsts = 0;
- scsireq->error = 0;
-
- return scsireq;
-}
-
-/* scsireq_new: Allocate and initialize a new scsireq.
- */
-scsireq_t *scsireq_new(void)
-{
- scsireq_t *p = (scsireq_t *)malloc(sizeof(scsireq_t));
-
- if (p)
- scsireq_reset(p);
-
- return p;
-}
-
-/*
- * Decode: Decode the data section of a scsireq. This decodes
- * trivial grammar:
- *
- * fields : field fields
- * ;
- *
- * field : field_specifier
- * | control
- * ;
- *
- * control : 's' seek_value
- * | 's' '+' seek_value
- * ;
- *
- * seek_value : DECIMAL_NUMBER
- * | 'v' // For indirect seek, i.e., value from the arg list
- * ;
- *
- * field_specifier : type_specifier field_width
- * | '{' NAME '}' type_specifier field_width
- * ;
- *
- * field_width : DECIMAL_NUMBER
- * ;
- *
- * type_specifier : 'i' // Integral types (i1, i2, i3, i4)
- * | 'b' // Bits
- * | 't' // Bits
- * | 'c' // Character arrays
- * | 'z' // Character arrays with zeroed trailing spaces
- * ;
- *
- * Notes:
- * 1. Integral types are swapped into host order.
- * 2. Bit fields are allocated MSB to LSB to match the SCSI spec documentation.
- * 3. 's' permits "seeking" in the string. "s+DECIMAL" seeks relative to
- * DECIMAL; "sDECIMAL" seeks absolute to decimal.
- * 4. 's' permits an indirect reference. "sv" or "s+v" will get the
- * next integer value from the arg array.
- * 5. Field names can be anything between the braces
- *
- * BUGS:
- * i and b types are promoted to ints.
- *
- */
-
-static int do_buff_decode(u_char *databuf, size_t len,
-void (*arg_put)(void *, int , void *, int, char *), void *puthook,
-char *fmt, va_list ap)
-{
- int assigned = 0;
- int width;
- int suppress;
- int plus;
- int done = 0;
- static u_char mask[] = {0, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff};
- int value;
- u_char *base = databuf;
- char letter;
- char field_name[80];
-
-# define ARG_PUT(ARG) \
- do \
- { \
- if (!suppress) \
- { \
- if (arg_put) \
- (*arg_put)(puthook, (letter == 't' ? 'b' : letter), \
- (void *)((long)(ARG)), 1, field_name); \
- else \
- *(va_arg(ap, int *)) = (ARG); \
- assigned++; \
- } \
- field_name[0] = 0; \
- suppress = 0; \
- } while (0)
-
- u_char bits = 0; /* For bit fields */
- int shift = 0; /* Bits already shifted out */
- suppress = 0;
- field_name[0] = 0;
-
- while (!done)
- {
- switch(letter = *fmt)
- {
- case ' ': /* White space */
- case '\t':
- case '\r':
- case '\n':
- case '\f':
- fmt++;
- break;
-
- case '#': /* Comment */
- while (*fmt && (*fmt != '\n'))
- fmt++;
- if (fmt)
- fmt++; /* Skip '\n' */
- break;
-
- case '*': /* Suppress assignment */
- fmt++;
- suppress = 1;
- break;
-
- case '{': /* Field Name */
- {
- int i = 0;
- fmt++; /* Skip '{' */
- while (*fmt && (*fmt != '}'))
- {
- if (i < sizeof(field_name))
- field_name[i++] = *fmt;
-
- fmt++;
- }
- if (fmt)
- fmt++; /* Skip '}' */
- field_name[i] = 0;
- }
- break;
-
- case 't': /* Bit (field) */
- case 'b': /* Bits */
- fmt++;
- width = strtol(fmt, &fmt, 10);
- if (width > 8)
- done = 1;
- else
- {
- if (shift <= 0)
- {
- bits = *databuf++;
- shift = 8;
- }
- value = (bits >> (shift - width)) & mask[width];
-
-#if 0
- printf("shift %2d bits %02x value %02x width %2d mask %02x\n",
- shift, bits, value, width, mask[width]);
-#endif
-
- ARG_PUT(value);
-
- shift -= width;
- }
-
- break;
-
- case 'i': /* Integral values */
- shift = 0;
- fmt++;
- width = strtol(fmt, &fmt, 10);
- switch(width)
- {
- case 1:
- ARG_PUT(*databuf);
- databuf++;
- break;
-
- case 2:
- ARG_PUT(
- (*databuf) << 8 |
- *(databuf + 1));
- databuf += 2;
- break;
-
- case 3:
- ARG_PUT(
- (*databuf) << 16 |
- (*(databuf + 1)) << 8 |
- *(databuf + 2));
- databuf += 3;
- break;
-
- case 4:
- ARG_PUT(
- (*databuf) << 24 |
- (*(databuf + 1)) << 16 |
- (*(databuf + 2)) << 8 |
- *(databuf + 3));
- databuf += 4;
- break;
-
- default:
- done = 1;
- }
-
- break;
-
- case 'c': /* Characters (i.e., not swapped) */
- case 'z': /* Characters with zeroed trailing spaces */
- shift = 0;
- fmt++;
- width = strtol(fmt, &fmt, 10);
- if (!suppress)
- {
- if (arg_put)
- (*arg_put)(puthook, (letter == 't' ? 'b' : letter),
- databuf, width, field_name);
- else
- {
- char *dest;
- dest = va_arg(ap, char *);
- bcopy(databuf, dest, width);
- if (letter == 'z')
- {
- char *p;
- for (p = dest + width - 1;
- (p >= (char *)dest) && (*p == ' '); p--)
- *p = 0;
- }
- }
- assigned++;
- }
- databuf += width;
- field_name[0] = 0;
- suppress = 0;
- break;
-
- case 's': /* Seek */
- shift = 0;
- fmt++;
- if (*fmt == '+')
- {
- plus = 1;
- fmt++;
- }
- else
- plus = 0;
-
- if (tolower(*fmt) == 'v')
- {
- /* You can't suppress a seek value. You also
- * can't have a variable seek when you are using
- * "arg_put".
- */
- width = (arg_put) ? 0 : va_arg(ap, int);
- fmt++;
- }
- else
- width = strtol(fmt, &fmt, 10);
-
- if (plus)
- databuf += width; /* Relative seek */
- else
- databuf = base + width; /* Absolute seek */
-
- break;
-
- case 0:
- done = 1;
- break;
-
- default:
- fprintf(stderr, "Unknown letter in format: %c\n", letter);
- fmt++;
- }
- }
-
- return assigned;
-}
-
-int scsireq_decode(scsireq_t *scsireq, char *fmt, ...)
-{
- va_list ap;
- va_start (ap, fmt);
- return do_buff_decode(scsireq->databuf, (size_t)scsireq->datalen,
- 0, 0, fmt, ap);
-}
-
-int scsireq_decode_visit(scsireq_t *scsireq, char *fmt,
-void (*arg_put)(void *, int , void *, int, char *), void *puthook)
-{
- va_list ap = (va_list)0;
- return do_buff_decode(scsireq->databuf, (size_t)scsireq->datalen,
- arg_put, puthook, fmt, ap);
-}
-
-int scsireq_buff_decode(u_char *buff, size_t len, char *fmt, ...)
-{
- va_list ap;
- va_start (ap, fmt);
- return do_buff_decode(buff, len, 0, 0, fmt, ap);
-}
-
-int scsireq_buff_decode_visit(u_char *buff, size_t len, char *fmt,
-void (*arg_put)(void *, int, void *, int, char *), void *puthook)
-{
- va_list ap = (va_list)0;
- return do_buff_decode(buff, len, arg_put, puthook, fmt, ap);
-}
-
-/* next_field: Return the next field in a command specifier. This
- * builds up a SCSI command using this trivial grammar:
- *
- * fields : field fields
- * ;
- *
- * field : value
- * | value ':' field_width
- * ;
- *
- * field_width : digit
- * | 'i' digit // i2 = 2 byte integer, i3 = 3 byte integer etc.
- * ;
- *
- * value : HEX_NUMBER
- * | 'v' // For indirection.
- * ;
- *
- * Notes:
- * Bit fields are specified MSB first to match the SCSI spec.
- *
- * Examples:
- * TUR: "0 0 0 0 0 0"
- * WRITE BUFFER: "38 v:3 0:2 0:3 v v:i3 v:i3 0", mode, buffer_id, list_length
- *
- * The function returns the value:
- * 0: For reached end, with error_p set if an error was found
- * 1: For valid stuff setup
- * 2: For "v" was entered as the value (implies use varargs)
- *
- */
-
-static int next_field(char **pp,
-char *fmt, int *width_p, int *value_p, char *name, int n_name, int *error_p,
-int *suppress_p)
-{
- char *p = *pp;
-
- int something = 0;
-
- enum
- {
- BETWEEN_FIELDS,
- START_FIELD,
- GET_FIELD,
- DONE,
- } state;
-
- int value = 0;
- int field_size; /* Default to byte field type... */
- int field_width; /* 1 byte wide */
- int is_error = 0;
- int suppress = 0;
-
- field_size = 8; /* Default to byte field type... */
- *fmt = 'i';
- field_width = 1; /* 1 byte wide */
- if (name)
- *name = 0;
-
- state = BETWEEN_FIELDS;
-
- while (state != DONE)
- {
- switch(state)
- {
- case BETWEEN_FIELDS:
- if (*p == 0)
- state = DONE;
- else if (isspace(*p))
- p++;
- else if (*p == '#')
- {
- while (*p && *p != '\n')
- p++;
- if (p)
- p++;
- }
- else if (*p == '{')
- {
- int i = 0;
-
- p++;
-
- while (*p && *p != '}')
- {
- if(name && i < n_name)
- {
- name[i] = *p;
- i++;
- }
- p++;
- }
-
- if(name && i < n_name)
- name[i] = 0;
-
- if (*p == '}')
- p++;
- }
- else if (*p == '*')
- {
- p++;
- suppress = 1;
- }
- else if (isxdigit(*p))
- {
- something = 1;
- value = strtol(p, &p, 16);
- state = START_FIELD;
- }
- else if (tolower(*p) == 'v')
- {
- p++;
- something = 2;
- value = *value_p;
- state = START_FIELD;
- }
-/* Try to work without the "v".
- */
- else if (tolower(*p) == 'i')
- {
- something = 2;
- value = *value_p;
- p++;
-
- *fmt = 'i';
- field_size = 8;
- field_width = strtol(p, &p, 10);
- state = DONE;
- }
-
-/* XXX: B can't work: Sees the 'b' as a hex digit in "isxdigit".
- * try "t" for bit field.
- */
- else if (tolower(*p) == 't')
- {
- something = 2;
- value = *value_p;
- p++;
-
- *fmt = 'b';
- field_size = 1;
- field_width = strtol(p, &p, 10);
- state = DONE;
- }
- else if (tolower(*p) == 's') /* Seek */
- {
- *fmt = 's';
- p++;
- if (tolower(*p) == 'v')
- {
- p++;
- something = 2;
- value = *value_p;
- }
- else
- {
- something = 1;
- value = strtol(p, &p, 0);
- }
- state = DONE;
- }
- else
- {
- fprintf(stderr, "Invalid starting character: %c\n", *p);
- is_error = 1;
- state = DONE;
- }
- break;
-
- case START_FIELD:
- if (*p == ':')
- {
- p++;
- field_size = 1; /* Default to bits when specified */
- state = GET_FIELD;
- }
- else
- state = DONE;
- break;
-
- case GET_FIELD:
- if (isdigit(*p))
- {
- *fmt = 'b';
- field_size = 1;
- field_width = strtol(p, &p, 10);
- state = DONE;
- }
- else if (*p == 'i') /* Integral (bytes) */
- {
- p++;
-
- *fmt = 'i';
- field_size = 8;
- field_width = strtol(p, &p, 10);
- state = DONE;
- }
- else if (*p == 'b') /* Bits */
- {
- p++;
-
- *fmt = 'b';
- field_size = 1;
- field_width = strtol(p, &p, 10);
- state = DONE;
- }
- else
- {
- fprintf(stderr, "Invalid startfield %c (%02x)\n",
- *p, *p);
- is_error = 1;
- state = DONE;
- }
- break;
-
- case DONE:
- break;
- }
- }
-
- if (is_error)
- {
- *error_p = 1;
- return 0;
- }
-
- *error_p = 0;
- *pp = p;
- *width_p = field_width * field_size;
- *value_p = value;
- *suppress_p = suppress;
-
- return something;
-}
-
-static int do_encode(u_char *buff, size_t vec_max, size_t *used,
-int (*arg_get)(void *, char *), void *gethook,
-char *fmt, va_list ap)
-{
- int ind;
- int shift;
- u_char val;
- int ret;
- int width, value, error, suppress;
- char c;
- int encoded = 0;
- char field_name[80];
-
- ind = 0;
- shift = 0;
- val = 0;
-
- while ((ret = next_field(&fmt,
- &c, &width, &value, field_name, sizeof(field_name), &error, &suppress)))
- {
- encoded++;
-
- if (ret == 2) {
- if (suppress)
- value = 0;
- else
- value = arg_get ? (*arg_get)(gethook, field_name) : va_arg(ap, int);
- }
-
-#if 0
- printf(
-"do_encode: ret %d fmt %c width %d value %d name \"%s\" error %d suppress %d\n",
- ret, c, width, value, field_name, error, suppress);
-#endif
-
- if (c == 's') /* Absolute seek */
- {
- ind = value;
- continue;
- }
-
- if (width < 8) /* A width of < 8 is a bit field. */
- {
-
- /* This is a bit field. We start with the high bits
- * so it reads the same as the SCSI spec.
- */
-
- shift += width;
-
- val |= (value << (8 - shift));
-
- if (shift == 8)
- {
- if (ind < vec_max)
- {
- buff[ind++] = val;
- val = 0;
- }
- shift = 0;
- }
- }
- else
- {
- if (shift)
- {
- if (ind < vec_max)
- {
- buff[ind++] = val;
- val = 0;
- }
- shift = 0;
- }
- switch(width)
- {
- case 8: /* 1 byte integer */
- if (ind < vec_max)
- buff[ind++] = value;
- break;
-
- case 16: /* 2 byte integer */
- if (ind < vec_max - 2 + 1)
- {
- buff[ind++] = value >> 8;
- buff[ind++] = value;
- }
- break;
-
- case 24: /* 3 byte integer */
- if (ind < vec_max - 3 + 1)
- {
- buff[ind++] = value >> 16;
- buff[ind++] = value >> 8;
- buff[ind++] = value;
- }
- break;
-
- case 32: /* 4 byte integer */
- if (ind < vec_max - 4 + 1)
- {
- buff[ind++] = value >> 24;
- buff[ind++] = value >> 16;
- buff[ind++] = value >> 8;
- buff[ind++] = value;
- }
- break;
-
- default:
- fprintf(stderr, "do_encode: Illegal width\n");
- break;
- }
- }
- }
-
- /* Flush out any remaining bits
- */
- if (shift && ind < vec_max)
- {
- buff[ind++] = val;
- val = 0;
- }
-
-
- if (used)
- *used = ind;
-
- if (error)
- return -1;
-
- return encoded;
-}
-
-/* XXX: Should be a constant in scsiio.h
- */
-#define CMD_BUFLEN 16
-
-scsireq_t *scsireq_build(scsireq_t *scsireq,
- u_long datalen, caddr_t databuf, u_long flags,
- char *cmd_spec, ...)
-{
- int cmdlen;
- va_list ap;
-
- if (scsireq == 0)
- return 0;
-
- scsireq_reset(scsireq);
-
- if (databuf)
- {
- scsireq->databuf = databuf;
- scsireq->datalen = datalen;
- scsireq->flags = flags;
- }
- else if (datalen)
- {
- /* XXX: Good way to get a memory leak. Perhaps this should be
- * removed.
- */
- if ( (scsireq->databuf = malloc(datalen)) == 0)
- return 0;
-
- scsireq->datalen = datalen;
- scsireq->flags = flags;
- }
-
- va_start(ap, cmd_spec);
-
- if (do_encode(scsireq->cmd, CMD_BUFLEN, &cmdlen, 0, 0, cmd_spec, ap) == -1)
- return 0;
-
- scsireq->cmdlen = cmdlen;
- return scsireq;
-}
-
-scsireq_t
-*scsireq_build_visit(scsireq_t *scsireq,
- u_long datalen, caddr_t databuf, u_long flags, char *cmd_spec,
- int (*arg_get)(void *hook, char *field_name), void *gethook)
-{
- int cmdlen;
- va_list ap = (va_list) 0;
-
- if (scsireq == 0)
- return 0;
-
- scsireq_reset(scsireq);
-
- if (databuf)
- {
- scsireq->databuf = databuf;
- scsireq->datalen = datalen;
- scsireq->flags = flags;
- }
- else if (datalen)
- {
- /* XXX: Good way to get a memory leak. Perhaps this should be
- * removed.
- */
- if ( (scsireq->databuf = malloc(datalen)) == 0)
- return 0;
-
- scsireq->datalen = datalen;
- scsireq->flags = flags;
- }
-
- if (do_encode(scsireq->cmd, CMD_BUFLEN, &cmdlen, arg_get, gethook,
- cmd_spec, ap) == -1)
- return 0;
-
- scsireq->cmdlen = cmdlen;
-
- return scsireq;
-}
-
-int scsireq_encode(scsireq_t *scsireq, char *fmt, ...)
-{
- va_list ap;
-
- if (scsireq == 0)
- return 0;
-
- va_start(ap, fmt);
-
- return do_encode(scsireq->databuf,
- scsireq->datalen, 0, 0, 0, fmt, ap);
-}
-
-int scsireq_buff_encode_visit(u_char *buff, size_t len, char *fmt,
- int (*arg_get)(void *hook, char *field_name), void *gethook)
-{
- va_list ap = (va_list)0;
- return do_encode(buff, len, 0,
- arg_get, gethook, fmt, ap);
-}
-
-int scsireq_encode_visit(scsireq_t *scsireq, char *fmt,
- int (*arg_get)(void *hook, char *field_name), void *gethook)
-{
- va_list ap = (va_list)0;
- return do_encode(scsireq->databuf, scsireq->datalen, 0,
- arg_get, gethook, fmt, ap);
-}
-
-FILE *scsi_debug_output(char *s)
-{
- if (s == 0)
- behave.db_f = 0;
- else
- {
- behave.db_f = fopen(s, "w");
-
- if (behave.db_f == 0)
- behave.db_f = stderr;
- }
-
- return behave.db_f;
-}
-
-#define SCSI_TRUNCATE -1
-
-typedef struct scsi_assoc
-{
- int code;
- char *text;
-} scsi_assoc_t;
-
-static scsi_assoc_t retsts[] =
-{
- { SCCMD_OK, "No error" },
- { SCCMD_TIMEOUT, "Command Timeout" },
- { SCCMD_BUSY, "Busy" },
- { SCCMD_SENSE, "Sense Returned" },
- { SCCMD_UNKNOWN, "Unknown return status" },
-
- { 0, 0 }
-};
-
-static char *scsi_assoc_text(int code, scsi_assoc_t *tab)
-{
- while (tab->text)
- {
- if (tab->code == code)
- return tab->text;
-
- tab++;
- }
-
- return "Unknown code";
-}
-
-void scsi_dump(FILE *f, char *text, u_char *p, int req, int got, int dump_print)
-{
- int i;
- int trunc = 0;
-
- if (f == 0 || req == 0)
- return;
-
- fprintf(f, "%s (%d of %d):\n", text, got, req);
-
- if (behave.db_trunc != -1 && got > behave.db_trunc)
- {
- trunc = 1;
- got = behave.db_trunc;
- }
-
- for (i = 0; i < got; i++)
- {
- fprintf(f, "%02x", p[i]);
-
- putc(' ', f);
-
- if ((i % 16) == 15 || i == got - 1)
- {
- int j;
- if (dump_print)
- {
- fprintf(f, " # ");
- for (j = i - 15; j <= i; j++)
- putc((isprint(p[j]) ? p[j] : '.'), f);
-
- putc('\n', f);
- }
- else
- putc('\n', f);
- }
- }
-
- fprintf(f, "%s", (trunc) ? "(truncated)...\n" : "\n");
-}
-
-/* XXX: sense_7x_dump and scsi_sense dump was just sort of
- * grabbed out of the old ds
- * library and not really merged in carefully. It should use the
- * new buffer decoding stuff.
- */
-
-/* Get unsigned long.
- */
-static u_long g_u_long(u_char *s)
-{
- return (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3];
-}
-
-/* In the old software you could patch in a special error table:
- */
-scsi_assoc_t *error_table = 0;
-
-static void sense_7x_dump(FILE *f, scsireq_t *scsireq)
-{
- int code;
- u_char *s = (u_char *)scsireq->sense;
- int valid = (*s) & 0x80;
- u_long val;
-
- static scsi_assoc_t sense[] = {
- { 0, "No sense" },
- { 1, "Recovered error" },
- { 2, "Not Ready" },
- { 3, "Medium error" },
- { 4, "Hardware error" },
- { 5, "Illegal request" },
- { 6, "Unit attention" },
- { 7, "Data protect" },
- { 8, "Blank check" },
- { 9, "Vendor specific" },
- { 0xa, "Copy aborted" },
- { 0xb, "Aborted Command" },
- { 0xc, "Equal" },
- { 0xd, "Volume overflow" },
- { 0xe, "Miscompare" },
- { 0, 0 },
- };
-
- static scsi_assoc_t code_tab[] = {
- {0x70, "current errors"},
- {0x71, "deferred errors"},
- };
-
- fprintf(f, "Error code is \"%s\"\n", scsi_assoc_text(s[0]&0x7F, code_tab));
- fprintf(f, "Segment number is %02x\n", s[1]);
-
- if (s[2] & 0x20)
- fprintf(f, "Incorrect Length Indicator is set.\n");
-
- fprintf(f, "Sense key is \"%s\"\n", scsi_assoc_text(s[2] & 0x7, sense));
-
- val = g_u_long(s + 3);
- fprintf(f, "The Information field is%s %08lx (%ld).\n",
- valid ? "" : " not valid but contains", (long)val, (long)val);
-
- val = g_u_long(s + 8);
- fprintf(f, "The Command Specific Information field is %08lx (%ld).\n",
- (long)val, (long)val);
-
- fprintf(f, "Additional sense code: %02x\n", s[12]);
- fprintf(f, "Additional sense code qualifier: %02x\n", s[13]);
-
- code = (s[12] << 8) | s[13];
-
- if (error_table)
- fprintf(f, "%s\n", scsi_assoc_text(code, error_table));
-
- if (s[15] & 0x80)
- {
- if ((s[2] & 0x7) == 0x05) /* Illegal request */
- {
- int byte;
- u_char value, bit;
- int bad_par = ((s[15] & 0x40) == 0);
- fprintf(f, "Illegal value in the %s.\n",
- (bad_par ? "parameter list" : "command descriptor block"));
- byte = ((s[16] << 8) | s[17]);
- value = bad_par ? (u_char)scsireq->databuf[byte] : (u_char)scsireq->cmd[byte];
- bit = s[15] & 0x7;
- if (s[15] & 0x08)
- fprintf(f, "Bit %d of byte %d (value %02x) is illegal.\n",
- bit, byte, value);
- else
- fprintf(f, "Byte %d (value %02x) is illegal.\n", byte, value);
- }
- else
- {
- fprintf(f, "Sense Key Specific (valid but not illegal request):\n");
- fprintf(f,
- "%02x %02x %02x\n", s[15] & 0x7f, s[16], s[17]);
- }
- }
-}
-
-/* scsi_sense_dump: Dump the sense portion of the scsireq structure.
- */
-void scsi_sense_dump(FILE *f, scsireq_t *scsireq)
-{
- u_char *s = (u_char *)scsireq->sense;
- int code = (*s) & 0x7f;
-
- if (scsireq->senselen_used == 0)
- {
- fprintf(f, "No sense sent.\n");
- return;
- }
-
-#if 0
- if (!valid)
- fprintf(f, "The sense data is not valid.\n");
-#endif
-
- switch(code)
- {
- case 0x70:
- case 0x71:
- sense_7x_dump(f, scsireq);
- break;
-
- default:
- fprintf(f, "No sense dump for error code %02x.\n", code);
- }
- scsi_dump(f, "sense", s, scsireq->senselen, scsireq->senselen_used, 0);
-}
-
-void scsi_retsts_dump(FILE *f, scsireq_t *scsireq)
-{
- if (scsireq->retsts == 0)
- return;
-
- fprintf(f, "return status %d (%s)",
- scsireq->retsts, scsi_assoc_text(scsireq->retsts, retsts));
-
- switch(scsireq->retsts)
- {
- case SCCMD_TIMEOUT:
- fprintf(f, " after %ld ms", scsireq->timeout);
- break;
-
- default:
- break;
- }
-}
-
-int scsi_debug(FILE *f, int ret, scsireq_t *scsireq)
-{
- char *d;
- if (f == 0)
- return 0;
-
- fprintf(f, "SCIOCCOMMAND ioctl");
-
- if (ret == 0)
- fprintf(f, ": Command accepted.");
- else
- {
- if (ret != -1)
- fprintf(f, ", return value %d?", ret);
-
- if (errno)
- {
- fprintf(f, ": %s", strerror(errno));
- errno = 0;
- }
- }
-
- fputc('\n', f);
-
- if (ret == 0 && (scsireq->status || scsireq->retsts || behave.db_level))
- {
- scsi_retsts_dump(f, scsireq);
-
- if (scsireq->status)
- fprintf(f, " host adapter status %d\n", scsireq->status);
-
- if (scsireq->flags & SCCMD_READ)
- d = "Data in";
- else if (scsireq->flags & SCCMD_WRITE)
- d = "Data out";
- else
- d = "No data transfer?";
-
- if (scsireq->cmdlen == 0)
- fprintf(f, "Zero length command????\n");
-
- scsi_dump(f, "Command out",
- (u_char *)scsireq->cmd, scsireq->cmdlen, scsireq->cmdlen, 0);
- scsi_dump(f, d,
- (u_char *)scsireq->databuf, scsireq->datalen,
- scsireq->datalen_used, 1);
- scsi_sense_dump(f, scsireq);
- }
-
- fflush(f);
-
- return ret;
-}
-
-static char *debug_output;
-
-int scsi_open(const char *path, int flags)
-{
- int fd = open(path, flags);
-
- if (fd != -1)
- {
- char *p;
- debug_output = getenv("SU_DEBUG_OUTPUT");
- (void)scsi_debug_output(debug_output);
-
- if ((p = getenv("SU_DEBUG_LEVEL")))
- sscanf(p, "%d", &behave.db_level);
-
- if ((p = getenv("SU_DEBUG_TRUNCATE")))
- sscanf(p, "%d", &behave.db_trunc);
- else
- behave.db_trunc = SCSI_TRUNCATE;
- }
-
- return fd;
-}
-
-int scsireq_enter(int fid, scsireq_t *scsireq)
-{
- int ret;
-
- if (scsireq == 0)
- return EFAULT;
-
- ret = ioctl(fid, SCIOCCOMMAND, (void *)scsireq);
-
- if (behave.db_f) scsi_debug(behave.db_f, ret, scsireq);
-
- return ret;
-}
diff --git a/lib/libscsi/scsi.h b/lib/libscsi/scsi.h
deleted file mode 100644
index e0cd340..0000000
--- a/lib/libscsi/scsi.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (c) 1994 HD Associates (hd@world.std.com)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by HD Associates
- * 4. Neither the name of the HD Associaates 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 BY HD ASSOCIATES``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _SCSI_H_
-#define _SCSI_H_
-
-#include <sys/cdefs.h>
-
-/* libscsi: Library header file for the SCSI user library.
- */
-
-#include <sys/scsiio.h>
-#include <stdio.h>
-
-#define SCSIREQ_ERROR(SR) (\
-0 \
-|| SR->senselen_used /* Sent sense */ \
-|| SR->status /* Host adapter status */ \
-|| SR->retsts /* SCSI transfer status */ \
-|| SR->error /* copy of errno */ \
-)
-
-__BEGIN_DECLS
-scsireq_t *scsireq_reset __P((scsireq_t *));
-scsireq_t *scsireq_new __P((void));
-
-int scsireq_buff_decode __P((u_char *, size_t, char *, ...));
-int scsireq_buff_decode_visit __P((u_char *, size_t, char *,
-void (*a)(void *, int, void *, int, char *), void *));
-
-int scsireq_decode __P((scsireq_t *, char *, ...));
-int scsireq_decode_visit __P((scsireq_t *, char *,
-void (*) (void *, int, void *, int, char *), void *));
-
-int scsireq_encode __P((scsireq_t *, char *, ...));
-int scsireq_encode_visit __P((scsireq_t *, char *,
- int (*)(void *, char *), void *));
-int scsireq_buff_encode_visit __P((u_char *, size_t, char *,
- int (*)(void *, char *), void *));
-
-scsireq_t *scsireq_build __P((scsireq_t *,
- u_long, caddr_t, u_long,
- char *, ...));
-
-scsireq_t *scsireq_build_visit __P((scsireq_t *,
- u_long, caddr_t, u_long, char *,
- int (*)(void *, char *), void *));
-
-int scsireq_enter __P((int, scsireq_t *));
-
-void scsi_dump __P((FILE *, char *, u_char *, int, int, int ));
-
-int scsi_debug __P((FILE *, int, scsireq_t *));
-FILE *scsi_debug_output __P((char *));
-int scsi_open __P((const char *, int ));
-__END_DECLS
-
-#endif /* _SCSI_H_ */
diff --git a/lib/libskey/Makefile b/lib/libskey/Makefile
deleted file mode 100644
index 63df390..0000000
--- a/lib/libskey/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-# @(#)Makefile 5.4 (Berkeley) 5/7/91
-
-LIB= skey
-SRCS= skeyaccess.c put.c skey_crypt.c skey_getpass.c skeylogin.c skeysubr.c
-MAN1= skey.1
-MAN3= skey.3
-MLINKS= skey.3 skeylookup.3 skey.3 skeyverify.3 skey.3 skeychallenge.3 \
- skey.3 skeyinfo.3 skey.3 skeyaccess.3 skey.3 skey_getpass.3 \
- skey.3 skey_crypt.3
-MAN5= skey.access.5
-
-CFLAGS+=-DPERMIT_CONSOLE -D_SKEY_INTERNAL -I${.CURDIR}
-
-.if ${BINFORMAT} == elf
-DPADD+= ${LIBCRYPT} ${LIBMD}
-LDADD+= -lcrypt -lmd
-.endif
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/skey.h \
- ${DESTDIR}/usr/include
-
-.include <bsd.lib.mk>
diff --git a/lib/libskey/mdx.h b/lib/libskey/mdx.h
deleted file mode 100644
index 567d541..0000000
--- a/lib/libskey/mdx.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef MD5
-/* S/Key can use MD5 now, if defined... */
-#include <md5.h>
-
-#define MDXFinal MD5Final
-#define MDXInit MD5Init
-#define MDXUpdate MD5Update
-#define MDX_CTX MD5_CTX
-#else
-
-/* By default, use MD4 for compatibility */
-#include <md4.h>
-
-#define MDXFinal MD4Final
-#define MDXInit MD4Init
-#define MDXUpdate MD4Update
-#define MDX_CTX MD4_CTX
-
-#endif
diff --git a/lib/libskey/pathnames.h b/lib/libskey/pathnames.h
deleted file mode 100644
index 84f0d32..0000000
--- a/lib/libskey/pathnames.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* $Id$ (FreeBSD) */
-
-#include <paths.h>
-
-#define _PATH_SKEYACCESS "/etc/skey.access"
-#define _PATH_SKEYFILE "/etc/skeykeys"
diff --git a/lib/libskey/put.c b/lib/libskey/put.c
deleted file mode 100644
index 5c9eaea..0000000
--- a/lib/libskey/put.c
+++ /dev/null
@@ -1,2292 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include <ctype.h>
-#include "skey.h"
-
-static unsigned long extract __P((char *s,int start,int length));
-static void standard __P((char *word));
-static void insert __P((char *s, int x, int start, int length));
-static int wsrch __P((char *w,int low,int high));
-
-/* Dictionary for integer-word translations */
-static char Wp[2048][4] = {
-"A",
-"ABE",
-"ACE",
-"ACT",
-"AD",
-"ADA",
-"ADD",
-"AGO",
-"AID",
-"AIM",
-"AIR",
-"ALL",
-"ALP",
-"AM",
-"AMY",
-"AN",
-"ANA",
-"AND",
-"ANN",
-"ANT",
-"ANY",
-"APE",
-"APS",
-"APT",
-"ARC",
-"ARE",
-"ARK",
-"ARM",
-"ART",
-"AS",
-"ASH",
-"ASK",
-"AT",
-"ATE",
-"AUG",
-"AUK",
-"AVE",
-"AWE",
-"AWK",
-"AWL",
-"AWN",
-"AX",
-"AYE",
-"BAD",
-"BAG",
-"BAH",
-"BAM",
-"BAN",
-"BAR",
-"BAT",
-"BAY",
-"BE",
-"BED",
-"BEE",
-"BEG",
-"BEN",
-"BET",
-"BEY",
-"BIB",
-"BID",
-"BIG",
-"BIN",
-"BIT",
-"BOB",
-"BOG",
-"BON",
-"BOO",
-"BOP",
-"BOW",
-"BOY",
-"BUB",
-"BUD",
-"BUG",
-"BUM",
-"BUN",
-"BUS",
-"BUT",
-"BUY",
-"BY",
-"BYE",
-"CAB",
-"CAL",
-"CAM",
-"CAN",
-"CAP",
-"CAR",
-"CAT",
-"CAW",
-"COD",
-"COG",
-"COL",
-"CON",
-"COO",
-"COP",
-"COT",
-"COW",
-"COY",
-"CRY",
-"CUB",
-"CUE",
-"CUP",
-"CUR",
-"CUT",
-"DAB",
-"DAD",
-"DAM",
-"DAN",
-"DAR",
-"DAY",
-"DEE",
-"DEL",
-"DEN",
-"DES",
-"DEW",
-"DID",
-"DIE",
-"DIG",
-"DIN",
-"DIP",
-"DO",
-"DOE",
-"DOG",
-"DON",
-"DOT",
-"DOW",
-"DRY",
-"DUB",
-"DUD",
-"DUE",
-"DUG",
-"DUN",
-"EAR",
-"EAT",
-"ED",
-"EEL",
-"EGG",
-"EGO",
-"ELI",
-"ELK",
-"ELM",
-"ELY",
-"EM",
-"END",
-"EST",
-"ETC",
-"EVA",
-"EVE",
-"EWE",
-"EYE",
-"FAD",
-"FAN",
-"FAR",
-"FAT",
-"FAY",
-"FED",
-"FEE",
-"FEW",
-"FIB",
-"FIG",
-"FIN",
-"FIR",
-"FIT",
-"FLO",
-"FLY",
-"FOE",
-"FOG",
-"FOR",
-"FRY",
-"FUM",
-"FUN",
-"FUR",
-"GAB",
-"GAD",
-"GAG",
-"GAL",
-"GAM",
-"GAP",
-"GAS",
-"GAY",
-"GEE",
-"GEL",
-"GEM",
-"GET",
-"GIG",
-"GIL",
-"GIN",
-"GO",
-"GOT",
-"GUM",
-"GUN",
-"GUS",
-"GUT",
-"GUY",
-"GYM",
-"GYP",
-"HA",
-"HAD",
-"HAL",
-"HAM",
-"HAN",
-"HAP",
-"HAS",
-"HAT",
-"HAW",
-"HAY",
-"HE",
-"HEM",
-"HEN",
-"HER",
-"HEW",
-"HEY",
-"HI",
-"HID",
-"HIM",
-"HIP",
-"HIS",
-"HIT",
-"HO",
-"HOB",
-"HOC",
-"HOE",
-"HOG",
-"HOP",
-"HOT",
-"HOW",
-"HUB",
-"HUE",
-"HUG",
-"HUH",
-"HUM",
-"HUT",
-"I",
-"ICY",
-"IDA",
-"IF",
-"IKE",
-"ILL",
-"INK",
-"INN",
-"IO",
-"ION",
-"IQ",
-"IRA",
-"IRE",
-"IRK",
-"IS",
-"IT",
-"ITS",
-"IVY",
-"JAB",
-"JAG",
-"JAM",
-"JAN",
-"JAR",
-"JAW",
-"JAY",
-"JET",
-"JIG",
-"JIM",
-"JO",
-"JOB",
-"JOE",
-"JOG",
-"JOT",
-"JOY",
-"JUG",
-"JUT",
-"KAY",
-"KEG",
-"KEN",
-"KEY",
-"KID",
-"KIM",
-"KIN",
-"KIT",
-"LA",
-"LAB",
-"LAC",
-"LAD",
-"LAG",
-"LAM",
-"LAP",
-"LAW",
-"LAY",
-"LEA",
-"LED",
-"LEE",
-"LEG",
-"LEN",
-"LEO",
-"LET",
-"LEW",
-"LID",
-"LIE",
-"LIN",
-"LIP",
-"LIT",
-"LO",
-"LOB",
-"LOG",
-"LOP",
-"LOS",
-"LOT",
-"LOU",
-"LOW",
-"LOY",
-"LUG",
-"LYE",
-"MA",
-"MAC",
-"MAD",
-"MAE",
-"MAN",
-"MAO",
-"MAP",
-"MAT",
-"MAW",
-"MAY",
-"ME",
-"MEG",
-"MEL",
-"MEN",
-"MET",
-"MEW",
-"MID",
-"MIN",
-"MIT",
-"MOB",
-"MOD",
-"MOE",
-"MOO",
-"MOP",
-"MOS",
-"MOT",
-"MOW",
-"MUD",
-"MUG",
-"MUM",
-"MY",
-"NAB",
-"NAG",
-"NAN",
-"NAP",
-"NAT",
-"NAY",
-"NE",
-"NED",
-"NEE",
-"NET",
-"NEW",
-"NIB",
-"NIL",
-"NIP",
-"NIT",
-"NO",
-"NOB",
-"NOD",
-"NON",
-"NOR",
-"NOT",
-"NOV",
-"NOW",
-"NU",
-"NUN",
-"NUT",
-"O",
-"OAF",
-"OAK",
-"OAR",
-"OAT",
-"ODD",
-"ODE",
-"OF",
-"OFF",
-"OFT",
-"OH",
-"OIL",
-"OK",
-"OLD",
-"ON",
-"ONE",
-"OR",
-"ORB",
-"ORE",
-"ORR",
-"OS",
-"OTT",
-"OUR",
-"OUT",
-"OVA",
-"OW",
-"OWE",
-"OWL",
-"OWN",
-"OX",
-"PA",
-"PAD",
-"PAL",
-"PAM",
-"PAN",
-"PAP",
-"PAR",
-"PAT",
-"PAW",
-"PAY",
-"PEA",
-"PEG",
-"PEN",
-"PEP",
-"PER",
-"PET",
-"PEW",
-"PHI",
-"PI",
-"PIE",
-"PIN",
-"PIT",
-"PLY",
-"PO",
-"POD",
-"POE",
-"POP",
-"POT",
-"POW",
-"PRO",
-"PRY",
-"PUB",
-"PUG",
-"PUN",
-"PUP",
-"PUT",
-"QUO",
-"RAG",
-"RAM",
-"RAN",
-"RAP",
-"RAT",
-"RAW",
-"RAY",
-"REB",
-"RED",
-"REP",
-"RET",
-"RIB",
-"RID",
-"RIG",
-"RIM",
-"RIO",
-"RIP",
-"ROB",
-"ROD",
-"ROE",
-"RON",
-"ROT",
-"ROW",
-"ROY",
-"RUB",
-"RUE",
-"RUG",
-"RUM",
-"RUN",
-"RYE",
-"SAC",
-"SAD",
-"SAG",
-"SAL",
-"SAM",
-"SAN",
-"SAP",
-"SAT",
-"SAW",
-"SAY",
-"SEA",
-"SEC",
-"SEE",
-"SEN",
-"SET",
-"SEW",
-"SHE",
-"SHY",
-"SIN",
-"SIP",
-"SIR",
-"SIS",
-"SIT",
-"SKI",
-"SKY",
-"SLY",
-"SO",
-"SOB",
-"SOD",
-"SON",
-"SOP",
-"SOW",
-"SOY",
-"SPA",
-"SPY",
-"SUB",
-"SUD",
-"SUE",
-"SUM",
-"SUN",
-"SUP",
-"TAB",
-"TAD",
-"TAG",
-"TAN",
-"TAP",
-"TAR",
-"TEA",
-"TED",
-"TEE",
-"TEN",
-"THE",
-"THY",
-"TIC",
-"TIE",
-"TIM",
-"TIN",
-"TIP",
-"TO",
-"TOE",
-"TOG",
-"TOM",
-"TON",
-"TOO",
-"TOP",
-"TOW",
-"TOY",
-"TRY",
-"TUB",
-"TUG",
-"TUM",
-"TUN",
-"TWO",
-"UN",
-"UP",
-"US",
-"USE",
-"VAN",
-"VAT",
-"VET",
-"VIE",
-"WAD",
-"WAG",
-"WAR",
-"WAS",
-"WAY",
-"WE",
-"WEB",
-"WED",
-"WEE",
-"WET",
-"WHO",
-"WHY",
-"WIN",
-"WIT",
-"WOK",
-"WON",
-"WOO",
-"WOW",
-"WRY",
-"WU",
-"YAM",
-"YAP",
-"YAW",
-"YE",
-"YEA",
-"YES",
-"YET",
-"YOU",
-"ABED",
-"ABEL",
-"ABET",
-"ABLE",
-"ABUT",
-"ACHE",
-"ACID",
-"ACME",
-"ACRE",
-"ACTA",
-"ACTS",
-"ADAM",
-"ADDS",
-"ADEN",
-"AFAR",
-"AFRO",
-"AGEE",
-"AHEM",
-"AHOY",
-"AIDA",
-"AIDE",
-"AIDS",
-"AIRY",
-"AJAR",
-"AKIN",
-"ALAN",
-"ALEC",
-"ALGA",
-"ALIA",
-"ALLY",
-"ALMA",
-"ALOE",
-"ALSO",
-"ALTO",
-"ALUM",
-"ALVA",
-"AMEN",
-"AMES",
-"AMID",
-"AMMO",
-"AMOK",
-"AMOS",
-"AMRA",
-"ANDY",
-"ANEW",
-"ANNA",
-"ANNE",
-"ANTE",
-"ANTI",
-"AQUA",
-"ARAB",
-"ARCH",
-"AREA",
-"ARGO",
-"ARID",
-"ARMY",
-"ARTS",
-"ARTY",
-"ASIA",
-"ASKS",
-"ATOM",
-"AUNT",
-"AURA",
-"AUTO",
-"AVER",
-"AVID",
-"AVIS",
-"AVON",
-"AVOW",
-"AWAY",
-"AWRY",
-"BABE",
-"BABY",
-"BACH",
-"BACK",
-"BADE",
-"BAIL",
-"BAIT",
-"BAKE",
-"BALD",
-"BALE",
-"BALI",
-"BALK",
-"BALL",
-"BALM",
-"BAND",
-"BANE",
-"BANG",
-"BANK",
-"BARB",
-"BARD",
-"BARE",
-"BARK",
-"BARN",
-"BARR",
-"BASE",
-"BASH",
-"BASK",
-"BASS",
-"BATE",
-"BATH",
-"BAWD",
-"BAWL",
-"BEAD",
-"BEAK",
-"BEAM",
-"BEAN",
-"BEAR",
-"BEAT",
-"BEAU",
-"BECK",
-"BEEF",
-"BEEN",
-"BEER",
-"BEET",
-"BELA",
-"BELL",
-"BELT",
-"BEND",
-"BENT",
-"BERG",
-"BERN",
-"BERT",
-"BESS",
-"BEST",
-"BETA",
-"BETH",
-"BHOY",
-"BIAS",
-"BIDE",
-"BIEN",
-"BILE",
-"BILK",
-"BILL",
-"BIND",
-"BING",
-"BIRD",
-"BITE",
-"BITS",
-"BLAB",
-"BLAT",
-"BLED",
-"BLEW",
-"BLOB",
-"BLOC",
-"BLOT",
-"BLOW",
-"BLUE",
-"BLUM",
-"BLUR",
-"BOAR",
-"BOAT",
-"BOCA",
-"BOCK",
-"BODE",
-"BODY",
-"BOGY",
-"BOHR",
-"BOIL",
-"BOLD",
-"BOLO",
-"BOLT",
-"BOMB",
-"BONA",
-"BOND",
-"BONE",
-"BONG",
-"BONN",
-"BONY",
-"BOOK",
-"BOOM",
-"BOON",
-"BOOT",
-"BORE",
-"BORG",
-"BORN",
-"BOSE",
-"BOSS",
-"BOTH",
-"BOUT",
-"BOWL",
-"BOYD",
-"BRAD",
-"BRAE",
-"BRAG",
-"BRAN",
-"BRAY",
-"BRED",
-"BREW",
-"BRIG",
-"BRIM",
-"BROW",
-"BUCK",
-"BUDD",
-"BUFF",
-"BULB",
-"BULK",
-"BULL",
-"BUNK",
-"BUNT",
-"BUOY",
-"BURG",
-"BURL",
-"BURN",
-"BURR",
-"BURT",
-"BURY",
-"BUSH",
-"BUSS",
-"BUST",
-"BUSY",
-"BYTE",
-"CADY",
-"CAFE",
-"CAGE",
-"CAIN",
-"CAKE",
-"CALF",
-"CALL",
-"CALM",
-"CAME",
-"CANE",
-"CANT",
-"CARD",
-"CARE",
-"CARL",
-"CARR",
-"CART",
-"CASE",
-"CASH",
-"CASK",
-"CAST",
-"CAVE",
-"CEIL",
-"CELL",
-"CENT",
-"CERN",
-"CHAD",
-"CHAR",
-"CHAT",
-"CHAW",
-"CHEF",
-"CHEN",
-"CHEW",
-"CHIC",
-"CHIN",
-"CHOU",
-"CHOW",
-"CHUB",
-"CHUG",
-"CHUM",
-"CITE",
-"CITY",
-"CLAD",
-"CLAM",
-"CLAN",
-"CLAW",
-"CLAY",
-"CLOD",
-"CLOG",
-"CLOT",
-"CLUB",
-"CLUE",
-"COAL",
-"COAT",
-"COCA",
-"COCK",
-"COCO",
-"CODA",
-"CODE",
-"CODY",
-"COED",
-"COIL",
-"COIN",
-"COKE",
-"COLA",
-"COLD",
-"COLT",
-"COMA",
-"COMB",
-"COME",
-"COOK",
-"COOL",
-"COON",
-"COOT",
-"CORD",
-"CORE",
-"CORK",
-"CORN",
-"COST",
-"COVE",
-"COWL",
-"CRAB",
-"CRAG",
-"CRAM",
-"CRAY",
-"CREW",
-"CRIB",
-"CROW",
-"CRUD",
-"CUBA",
-"CUBE",
-"CUFF",
-"CULL",
-"CULT",
-"CUNY",
-"CURB",
-"CURD",
-"CURE",
-"CURL",
-"CURT",
-"CUTS",
-"DADE",
-"DALE",
-"DAME",
-"DANA",
-"DANE",
-"DANG",
-"DANK",
-"DARE",
-"DARK",
-"DARN",
-"DART",
-"DASH",
-"DATA",
-"DATE",
-"DAVE",
-"DAVY",
-"DAWN",
-"DAYS",
-"DEAD",
-"DEAF",
-"DEAL",
-"DEAN",
-"DEAR",
-"DEBT",
-"DECK",
-"DEED",
-"DEEM",
-"DEER",
-"DEFT",
-"DEFY",
-"DELL",
-"DENT",
-"DENY",
-"DESK",
-"DIAL",
-"DICE",
-"DIED",
-"DIET",
-"DIME",
-"DINE",
-"DING",
-"DINT",
-"DIRE",
-"DIRT",
-"DISC",
-"DISH",
-"DISK",
-"DIVE",
-"DOCK",
-"DOES",
-"DOLE",
-"DOLL",
-"DOLT",
-"DOME",
-"DONE",
-"DOOM",
-"DOOR",
-"DORA",
-"DOSE",
-"DOTE",
-"DOUG",
-"DOUR",
-"DOVE",
-"DOWN",
-"DRAB",
-"DRAG",
-"DRAM",
-"DRAW",
-"DREW",
-"DRUB",
-"DRUG",
-"DRUM",
-"DUAL",
-"DUCK",
-"DUCT",
-"DUEL",
-"DUET",
-"DUKE",
-"DULL",
-"DUMB",
-"DUNE",
-"DUNK",
-"DUSK",
-"DUST",
-"DUTY",
-"EACH",
-"EARL",
-"EARN",
-"EASE",
-"EAST",
-"EASY",
-"EBEN",
-"ECHO",
-"EDDY",
-"EDEN",
-"EDGE",
-"EDGY",
-"EDIT",
-"EDNA",
-"EGAN",
-"ELAN",
-"ELBA",
-"ELLA",
-"ELSE",
-"EMIL",
-"EMIT",
-"EMMA",
-"ENDS",
-"ERIC",
-"EROS",
-"EVEN",
-"EVER",
-"EVIL",
-"EYED",
-"FACE",
-"FACT",
-"FADE",
-"FAIL",
-"FAIN",
-"FAIR",
-"FAKE",
-"FALL",
-"FAME",
-"FANG",
-"FARM",
-"FAST",
-"FATE",
-"FAWN",
-"FEAR",
-"FEAT",
-"FEED",
-"FEEL",
-"FEET",
-"FELL",
-"FELT",
-"FEND",
-"FERN",
-"FEST",
-"FEUD",
-"FIEF",
-"FIGS",
-"FILE",
-"FILL",
-"FILM",
-"FIND",
-"FINE",
-"FINK",
-"FIRE",
-"FIRM",
-"FISH",
-"FISK",
-"FIST",
-"FITS",
-"FIVE",
-"FLAG",
-"FLAK",
-"FLAM",
-"FLAT",
-"FLAW",
-"FLEA",
-"FLED",
-"FLEW",
-"FLIT",
-"FLOC",
-"FLOG",
-"FLOW",
-"FLUB",
-"FLUE",
-"FOAL",
-"FOAM",
-"FOGY",
-"FOIL",
-"FOLD",
-"FOLK",
-"FOND",
-"FONT",
-"FOOD",
-"FOOL",
-"FOOT",
-"FORD",
-"FORE",
-"FORK",
-"FORM",
-"FORT",
-"FOSS",
-"FOUL",
-"FOUR",
-"FOWL",
-"FRAU",
-"FRAY",
-"FRED",
-"FREE",
-"FRET",
-"FREY",
-"FROG",
-"FROM",
-"FUEL",
-"FULL",
-"FUME",
-"FUND",
-"FUNK",
-"FURY",
-"FUSE",
-"FUSS",
-"GAFF",
-"GAGE",
-"GAIL",
-"GAIN",
-"GAIT",
-"GALA",
-"GALE",
-"GALL",
-"GALT",
-"GAME",
-"GANG",
-"GARB",
-"GARY",
-"GASH",
-"GATE",
-"GAUL",
-"GAUR",
-"GAVE",
-"GAWK",
-"GEAR",
-"GELD",
-"GENE",
-"GENT",
-"GERM",
-"GETS",
-"GIBE",
-"GIFT",
-"GILD",
-"GILL",
-"GILT",
-"GINA",
-"GIRD",
-"GIRL",
-"GIST",
-"GIVE",
-"GLAD",
-"GLEE",
-"GLEN",
-"GLIB",
-"GLOB",
-"GLOM",
-"GLOW",
-"GLUE",
-"GLUM",
-"GLUT",
-"GOAD",
-"GOAL",
-"GOAT",
-"GOER",
-"GOES",
-"GOLD",
-"GOLF",
-"GONE",
-"GONG",
-"GOOD",
-"GOOF",
-"GORE",
-"GORY",
-"GOSH",
-"GOUT",
-"GOWN",
-"GRAB",
-"GRAD",
-"GRAY",
-"GREG",
-"GREW",
-"GREY",
-"GRID",
-"GRIM",
-"GRIN",
-"GRIT",
-"GROW",
-"GRUB",
-"GULF",
-"GULL",
-"GUNK",
-"GURU",
-"GUSH",
-"GUST",
-"GWEN",
-"GWYN",
-"HAAG",
-"HAAS",
-"HACK",
-"HAIL",
-"HAIR",
-"HALE",
-"HALF",
-"HALL",
-"HALO",
-"HALT",
-"HAND",
-"HANG",
-"HANK",
-"HANS",
-"HARD",
-"HARK",
-"HARM",
-"HART",
-"HASH",
-"HAST",
-"HATE",
-"HATH",
-"HAUL",
-"HAVE",
-"HAWK",
-"HAYS",
-"HEAD",
-"HEAL",
-"HEAR",
-"HEAT",
-"HEBE",
-"HECK",
-"HEED",
-"HEEL",
-"HEFT",
-"HELD",
-"HELL",
-"HELM",
-"HERB",
-"HERD",
-"HERE",
-"HERO",
-"HERS",
-"HESS",
-"HEWN",
-"HICK",
-"HIDE",
-"HIGH",
-"HIKE",
-"HILL",
-"HILT",
-"HIND",
-"HINT",
-"HIRE",
-"HISS",
-"HIVE",
-"HOBO",
-"HOCK",
-"HOFF",
-"HOLD",
-"HOLE",
-"HOLM",
-"HOLT",
-"HOME",
-"HONE",
-"HONK",
-"HOOD",
-"HOOF",
-"HOOK",
-"HOOT",
-"HORN",
-"HOSE",
-"HOST",
-"HOUR",
-"HOVE",
-"HOWE",
-"HOWL",
-"HOYT",
-"HUCK",
-"HUED",
-"HUFF",
-"HUGE",
-"HUGH",
-"HUGO",
-"HULK",
-"HULL",
-"HUNK",
-"HUNT",
-"HURD",
-"HURL",
-"HURT",
-"HUSH",
-"HYDE",
-"HYMN",
-"IBIS",
-"ICON",
-"IDEA",
-"IDLE",
-"IFFY",
-"INCA",
-"INCH",
-"INTO",
-"IONS",
-"IOTA",
-"IOWA",
-"IRIS",
-"IRMA",
-"IRON",
-"ISLE",
-"ITCH",
-"ITEM",
-"IVAN",
-"JACK",
-"JADE",
-"JAIL",
-"JAKE",
-"JANE",
-"JAVA",
-"JEAN",
-"JEFF",
-"JERK",
-"JESS",
-"JEST",
-"JIBE",
-"JILL",
-"JILT",
-"JIVE",
-"JOAN",
-"JOBS",
-"JOCK",
-"JOEL",
-"JOEY",
-"JOHN",
-"JOIN",
-"JOKE",
-"JOLT",
-"JOVE",
-"JUDD",
-"JUDE",
-"JUDO",
-"JUDY",
-"JUJU",
-"JUKE",
-"JULY",
-"JUNE",
-"JUNK",
-"JUNO",
-"JURY",
-"JUST",
-"JUTE",
-"KAHN",
-"KALE",
-"KANE",
-"KANT",
-"KARL",
-"KATE",
-"KEEL",
-"KEEN",
-"KENO",
-"KENT",
-"KERN",
-"KERR",
-"KEYS",
-"KICK",
-"KILL",
-"KIND",
-"KING",
-"KIRK",
-"KISS",
-"KITE",
-"KLAN",
-"KNEE",
-"KNEW",
-"KNIT",
-"KNOB",
-"KNOT",
-"KNOW",
-"KOCH",
-"KONG",
-"KUDO",
-"KURD",
-"KURT",
-"KYLE",
-"LACE",
-"LACK",
-"LACY",
-"LADY",
-"LAID",
-"LAIN",
-"LAIR",
-"LAKE",
-"LAMB",
-"LAME",
-"LAND",
-"LANE",
-"LANG",
-"LARD",
-"LARK",
-"LASS",
-"LAST",
-"LATE",
-"LAUD",
-"LAVA",
-"LAWN",
-"LAWS",
-"LAYS",
-"LEAD",
-"LEAF",
-"LEAK",
-"LEAN",
-"LEAR",
-"LEEK",
-"LEER",
-"LEFT",
-"LEND",
-"LENS",
-"LENT",
-"LEON",
-"LESK",
-"LESS",
-"LEST",
-"LETS",
-"LIAR",
-"LICE",
-"LICK",
-"LIED",
-"LIEN",
-"LIES",
-"LIEU",
-"LIFE",
-"LIFT",
-"LIKE",
-"LILA",
-"LILT",
-"LILY",
-"LIMA",
-"LIMB",
-"LIME",
-"LIND",
-"LINE",
-"LINK",
-"LINT",
-"LION",
-"LISA",
-"LIST",
-"LIVE",
-"LOAD",
-"LOAF",
-"LOAM",
-"LOAN",
-"LOCK",
-"LOFT",
-"LOGE",
-"LOIS",
-"LOLA",
-"LONE",
-"LONG",
-"LOOK",
-"LOON",
-"LOOT",
-"LORD",
-"LORE",
-"LOSE",
-"LOSS",
-"LOST",
-"LOUD",
-"LOVE",
-"LOWE",
-"LUCK",
-"LUCY",
-"LUGE",
-"LUKE",
-"LULU",
-"LUND",
-"LUNG",
-"LURA",
-"LURE",
-"LURK",
-"LUSH",
-"LUST",
-"LYLE",
-"LYNN",
-"LYON",
-"LYRA",
-"MACE",
-"MADE",
-"MAGI",
-"MAID",
-"MAIL",
-"MAIN",
-"MAKE",
-"MALE",
-"MALI",
-"MALL",
-"MALT",
-"MANA",
-"MANN",
-"MANY",
-"MARC",
-"MARE",
-"MARK",
-"MARS",
-"MART",
-"MARY",
-"MASH",
-"MASK",
-"MASS",
-"MAST",
-"MATE",
-"MATH",
-"MAUL",
-"MAYO",
-"MEAD",
-"MEAL",
-"MEAN",
-"MEAT",
-"MEEK",
-"MEET",
-"MELD",
-"MELT",
-"MEMO",
-"MEND",
-"MENU",
-"MERT",
-"MESH",
-"MESS",
-"MICE",
-"MIKE",
-"MILD",
-"MILE",
-"MILK",
-"MILL",
-"MILT",
-"MIMI",
-"MIND",
-"MINE",
-"MINI",
-"MINK",
-"MINT",
-"MIRE",
-"MISS",
-"MIST",
-"MITE",
-"MITT",
-"MOAN",
-"MOAT",
-"MOCK",
-"MODE",
-"MOLD",
-"MOLE",
-"MOLL",
-"MOLT",
-"MONA",
-"MONK",
-"MONT",
-"MOOD",
-"MOON",
-"MOOR",
-"MOOT",
-"MORE",
-"MORN",
-"MORT",
-"MOSS",
-"MOST",
-"MOTH",
-"MOVE",
-"MUCH",
-"MUCK",
-"MUDD",
-"MUFF",
-"MULE",
-"MULL",
-"MURK",
-"MUSH",
-"MUST",
-"MUTE",
-"MUTT",
-"MYRA",
-"MYTH",
-"NAGY",
-"NAIL",
-"NAIR",
-"NAME",
-"NARY",
-"NASH",
-"NAVE",
-"NAVY",
-"NEAL",
-"NEAR",
-"NEAT",
-"NECK",
-"NEED",
-"NEIL",
-"NELL",
-"NEON",
-"NERO",
-"NESS",
-"NEST",
-"NEWS",
-"NEWT",
-"NIBS",
-"NICE",
-"NICK",
-"NILE",
-"NINA",
-"NINE",
-"NOAH",
-"NODE",
-"NOEL",
-"NOLL",
-"NONE",
-"NOOK",
-"NOON",
-"NORM",
-"NOSE",
-"NOTE",
-"NOUN",
-"NOVA",
-"NUDE",
-"NULL",
-"NUMB",
-"OATH",
-"OBEY",
-"OBOE",
-"ODIN",
-"OHIO",
-"OILY",
-"OINT",
-"OKAY",
-"OLAF",
-"OLDY",
-"OLGA",
-"OLIN",
-"OMAN",
-"OMEN",
-"OMIT",
-"ONCE",
-"ONES",
-"ONLY",
-"ONTO",
-"ONUS",
-"ORAL",
-"ORGY",
-"OSLO",
-"OTIS",
-"OTTO",
-"OUCH",
-"OUST",
-"OUTS",
-"OVAL",
-"OVEN",
-"OVER",
-"OWLY",
-"OWNS",
-"QUAD",
-"QUIT",
-"QUOD",
-"RACE",
-"RACK",
-"RACY",
-"RAFT",
-"RAGE",
-"RAID",
-"RAIL",
-"RAIN",
-"RAKE",
-"RANK",
-"RANT",
-"RARE",
-"RASH",
-"RATE",
-"RAVE",
-"RAYS",
-"READ",
-"REAL",
-"REAM",
-"REAR",
-"RECK",
-"REED",
-"REEF",
-"REEK",
-"REEL",
-"REID",
-"REIN",
-"RENA",
-"REND",
-"RENT",
-"REST",
-"RICE",
-"RICH",
-"RICK",
-"RIDE",
-"RIFT",
-"RILL",
-"RIME",
-"RING",
-"RINK",
-"RISE",
-"RISK",
-"RITE",
-"ROAD",
-"ROAM",
-"ROAR",
-"ROBE",
-"ROCK",
-"RODE",
-"ROIL",
-"ROLL",
-"ROME",
-"ROOD",
-"ROOF",
-"ROOK",
-"ROOM",
-"ROOT",
-"ROSA",
-"ROSE",
-"ROSS",
-"ROSY",
-"ROTH",
-"ROUT",
-"ROVE",
-"ROWE",
-"ROWS",
-"RUBE",
-"RUBY",
-"RUDE",
-"RUDY",
-"RUIN",
-"RULE",
-"RUNG",
-"RUNS",
-"RUNT",
-"RUSE",
-"RUSH",
-"RUSK",
-"RUSS",
-"RUST",
-"RUTH",
-"SACK",
-"SAFE",
-"SAGE",
-"SAID",
-"SAIL",
-"SALE",
-"SALK",
-"SALT",
-"SAME",
-"SAND",
-"SANE",
-"SANG",
-"SANK",
-"SARA",
-"SAUL",
-"SAVE",
-"SAYS",
-"SCAN",
-"SCAR",
-"SCAT",
-"SCOT",
-"SEAL",
-"SEAM",
-"SEAR",
-"SEAT",
-"SEED",
-"SEEK",
-"SEEM",
-"SEEN",
-"SEES",
-"SELF",
-"SELL",
-"SEND",
-"SENT",
-"SETS",
-"SEWN",
-"SHAG",
-"SHAM",
-"SHAW",
-"SHAY",
-"SHED",
-"SHIM",
-"SHIN",
-"SHOD",
-"SHOE",
-"SHOT",
-"SHOW",
-"SHUN",
-"SHUT",
-"SICK",
-"SIDE",
-"SIFT",
-"SIGH",
-"SIGN",
-"SILK",
-"SILL",
-"SILO",
-"SILT",
-"SINE",
-"SING",
-"SINK",
-"SIRE",
-"SITE",
-"SITS",
-"SITU",
-"SKAT",
-"SKEW",
-"SKID",
-"SKIM",
-"SKIN",
-"SKIT",
-"SLAB",
-"SLAM",
-"SLAT",
-"SLAY",
-"SLED",
-"SLEW",
-"SLID",
-"SLIM",
-"SLIT",
-"SLOB",
-"SLOG",
-"SLOT",
-"SLOW",
-"SLUG",
-"SLUM",
-"SLUR",
-"SMOG",
-"SMUG",
-"SNAG",
-"SNOB",
-"SNOW",
-"SNUB",
-"SNUG",
-"SOAK",
-"SOAR",
-"SOCK",
-"SODA",
-"SOFA",
-"SOFT",
-"SOIL",
-"SOLD",
-"SOME",
-"SONG",
-"SOON",
-"SOOT",
-"SORE",
-"SORT",
-"SOUL",
-"SOUR",
-"SOWN",
-"STAB",
-"STAG",
-"STAN",
-"STAR",
-"STAY",
-"STEM",
-"STEW",
-"STIR",
-"STOW",
-"STUB",
-"STUN",
-"SUCH",
-"SUDS",
-"SUIT",
-"SULK",
-"SUMS",
-"SUNG",
-"SUNK",
-"SURE",
-"SURF",
-"SWAB",
-"SWAG",
-"SWAM",
-"SWAN",
-"SWAT",
-"SWAY",
-"SWIM",
-"SWUM",
-"TACK",
-"TACT",
-"TAIL",
-"TAKE",
-"TALE",
-"TALK",
-"TALL",
-"TANK",
-"TASK",
-"TATE",
-"TAUT",
-"TEAL",
-"TEAM",
-"TEAR",
-"TECH",
-"TEEM",
-"TEEN",
-"TEET",
-"TELL",
-"TEND",
-"TENT",
-"TERM",
-"TERN",
-"TESS",
-"TEST",
-"THAN",
-"THAT",
-"THEE",
-"THEM",
-"THEN",
-"THEY",
-"THIN",
-"THIS",
-"THUD",
-"THUG",
-"TICK",
-"TIDE",
-"TIDY",
-"TIED",
-"TIER",
-"TILE",
-"TILL",
-"TILT",
-"TIME",
-"TINA",
-"TINE",
-"TINT",
-"TINY",
-"TIRE",
-"TOAD",
-"TOGO",
-"TOIL",
-"TOLD",
-"TOLL",
-"TONE",
-"TONG",
-"TONY",
-"TOOK",
-"TOOL",
-"TOOT",
-"TORE",
-"TORN",
-"TOTE",
-"TOUR",
-"TOUT",
-"TOWN",
-"TRAG",
-"TRAM",
-"TRAY",
-"TREE",
-"TREK",
-"TRIG",
-"TRIM",
-"TRIO",
-"TROD",
-"TROT",
-"TROY",
-"TRUE",
-"TUBA",
-"TUBE",
-"TUCK",
-"TUFT",
-"TUNA",
-"TUNE",
-"TUNG",
-"TURF",
-"TURN",
-"TUSK",
-"TWIG",
-"TWIN",
-"TWIT",
-"ULAN",
-"UNIT",
-"URGE",
-"USED",
-"USER",
-"USES",
-"UTAH",
-"VAIL",
-"VAIN",
-"VALE",
-"VARY",
-"VASE",
-"VAST",
-"VEAL",
-"VEDA",
-"VEIL",
-"VEIN",
-"VEND",
-"VENT",
-"VERB",
-"VERY",
-"VETO",
-"VICE",
-"VIEW",
-"VINE",
-"VISE",
-"VOID",
-"VOLT",
-"VOTE",
-"WACK",
-"WADE",
-"WAGE",
-"WAIL",
-"WAIT",
-"WAKE",
-"WALE",
-"WALK",
-"WALL",
-"WALT",
-"WAND",
-"WANE",
-"WANG",
-"WANT",
-"WARD",
-"WARM",
-"WARN",
-"WART",
-"WASH",
-"WAST",
-"WATS",
-"WATT",
-"WAVE",
-"WAVY",
-"WAYS",
-"WEAK",
-"WEAL",
-"WEAN",
-"WEAR",
-"WEED",
-"WEEK",
-"WEIR",
-"WELD",
-"WELL",
-"WELT",
-"WENT",
-"WERE",
-"WERT",
-"WEST",
-"WHAM",
-"WHAT",
-"WHEE",
-"WHEN",
-"WHET",
-"WHOA",
-"WHOM",
-"WICK",
-"WIFE",
-"WILD",
-"WILL",
-"WIND",
-"WINE",
-"WING",
-"WINK",
-"WINO",
-"WIRE",
-"WISE",
-"WISH",
-"WITH",
-"WOLF",
-"WONT",
-"WOOD",
-"WOOL",
-"WORD",
-"WORE",
-"WORK",
-"WORM",
-"WORN",
-"WOVE",
-"WRIT",
-"WYNN",
-"YALE",
-"YANG",
-"YANK",
-"YARD",
-"YARN",
-"YAWL",
-"YAWN",
-"YEAH",
-"YEAR",
-"YELL",
-"YOGA",
-"YOKE"
-};
-
-/* Encode 8 bytes in 'c' as a string of English words.
- * Returns a pointer to a static buffer
- */
-char *
-btoe(engout,c)
-char *c, *engout;
-{
- char cp[9]; /* add in room for the parity 2 bits*/
- int p,i ;
-
- engout[0] = '\0';
- memcpy(cp, c,8);
- /* compute parity */
- for(p = 0,i = 0; i < 64;i += 2)
- p += extract(cp,i,2);
-
- cp[8] = (char)p << 6;
- strncat(engout,&Wp[extract(cp, 0,11)][0],4);
- strcat(engout," ");
- strncat(engout,&Wp[extract(cp,11,11)][0],4);
- strcat(engout," ");
- strncat(engout,&Wp[extract(cp,22,11)][0],4);
- strcat(engout," ");
- strncat(engout,&Wp[extract(cp,33,11)][0],4);
- strcat(engout," ");
- strncat(engout,&Wp[extract(cp,44,11)][0],4);
- strcat(engout," ");
- strncat(engout,&Wp[extract(cp,55,11)][0],4);
-#ifdef notdef
- printf("engout is %s\n\r",engout);
-#endif
- return(engout);
-}
-
-/* convert English to binary
- * returns 1 OK - all good words and parity is OK
- * 0 word not in data base
- * -1 badly formed in put ie > 4 char word
- * -2 words OK but parity is wrong
- */
-int
-etob(out, e)
-char *out;
-char *e;
-{
- char *word, *cp;
- int i, p, v,l, low,high;
- char b[9];
- char input[36];
-
- if(e == NULL)
- return -1;
-
- strncpy(input,e,sizeof(input));
- cp = input;
- memset(b, 0, sizeof(b));
- memset(out, 0, 8);
- for(i=0,p=0;i<6;i++,p+=11){
- while ((word = strsep(&cp, " ")) != NULL && *word == '\0')
- ;
- if (word == NULL)
- return -1;
- l = strlen(word);
- if(l > 4 || l < 1){
- return -1;
- } else if(l < 4){
- low = 0;
- high = 570;
- } else {
- low = 571;
- high = 2047;
- }
- standard(word);
- if( (v = wsrch(word,low,high)) < 0 )
- return 0;
- insert(b,v,p,11);
- }
-
- /* now check the parity of what we got */
- for(p = 0, i = 0; i < 64; i +=2)
- p += extract(b, i, 2);
-
- if( (p & 3) != extract(b, 64,2) )
- return -2;
-
- memcpy(out,b,8);
-
- return 1;
-}
-/* Display 8 bytes as a series of 16-bit hex digits */
-char *
-put8(out,s)
-char *out;
-char *s;
-{
- sprintf(out,"%02X%02X %02X%02X %02X%02X %02X%02X",
- s[0] & 0xff,s[1] & 0xff,s[2] & 0xff,
- s[3] & 0xff,s[4] & 0xff,s[5] & 0xff,
- s[6] & 0xff,s[7] & 0xff);
- return out;
-}
-#ifdef notdef
-/* Encode 8 bytes in 'cp' as stream of ascii letters.
- * Provided as a possible alternative to btoe()
- */
-char *
-btoc(cp)
-char *cp;
-{
- int i;
- static char out[31];
-
- /* code out put by characters 6 bits each added to 0x21 (!)*/
- for(i=0;i <= 10;i++){
- /* last one is only 4 bits not 6*/
- out[i] = '!'+ extract(cp,6*i,i >= 10 ? 4:6);
- }
- out[i] = '\0';
- return(out);
-}
-#endif
-
-/* Internal subroutines for word encoding/decoding */
-
-/* Dictionary binary search */
-static int
-wsrch(w,low,high)
-char *w;
-int low, high;
-{
- int i,j;
-
- for(;;){
- i = (low + high)/2;
- if((j = strncmp(w,Wp[i],4)) == 0)
- return i; /* Found it */
- if(high == low+1){
- /* Avoid effects of integer truncation in /2 */
- if(strncmp(w,Wp[high],4) == 0)
- return high;
- else
- return -1;
- }
- if(low >= high)
- return -1; /* I don't *think* this can happen...*/
- if(j < 0)
- high = i; /* Search lower half */
- else
- low = i; /* Search upper half */
- }
-}
-static void
-insert(s, x, start, length)
-char *s;
-int x;
-int start, length;
-{
- unsigned char cl;
- unsigned char cc;
- unsigned char cr;
- unsigned long y;
- int shift;
-
- assert(length <= 11);
- assert(start >= 0);
- assert(length >= 0);
- assert(start +length <= 66);
-
- shift = ((8 -(( start + length) % 8))%8);
- y = (long) x << shift;
- cl = (y >> 16) & 0xff;
- cc = (y >> 8) & 0xff;
- cr = y & 0xff;
- if(shift + length > 16){
- s[start /8] |= cl;
- s[start/8 +1] |= cc;
- s[start/8 +2] |= cr;
- } else if(shift +length > 8){
- s[start/8] |= cc;
- s[start/8 + 1] |= cr;
- } else {
- s[start/8] |= cr;
- }
-}
-
-static void
-standard(word)
-register char *word;
-{
- while(*word){
- if(!isascii(*word))
- break;
- if(islower(*word))
- *word = toupper(*word);
- if(*word == '1')
- *word = 'L';
- if(*word == '0')
- *word = 'O';
- if(*word == '5')
- *word = 'S';
- word++;
- }
-}
-
-/* Extract 'length' bits from the char array 's' starting with bit 'start' */
-static unsigned long
-extract(s, start, length)
-char *s;
-int start, length;
-{
- unsigned char cl;
- unsigned char cc;
- unsigned char cr;
- unsigned long x;
-
- assert(length <= 11);
- assert(start >= 0);
- assert(length >= 0);
- assert(start +length <= 66);
-
- cl = s[start/8];
- cc = s[start/8 +1];
- cr = s[start/8 +2];
- x = ((long)(cl<<8 | cc) <<8 | cr) ;
- x = x >> (24 - (length + (start %8)));
- x =( x & (0xffff >> (16-length) ) );
- return(x);
-}
-
diff --git a/lib/libskey/skey.1 b/lib/libskey/skey.1
deleted file mode 100644
index b4e0455..0000000
--- a/lib/libskey/skey.1
+++ /dev/null
@@ -1,59 +0,0 @@
-.ll 6i
-.pl 10.5i
-.\" @(#)skey.1 1.1 10/28/93
-.\"
-.lt 6.0i
-.TH KEY 1 "28 October 1993"
-.AT 3
-.SH NAME
-S/key \- A procedure to use one time passwords for accessing computer systems.
-.SH DESCRIPTION
-.I S/key
-is a procedure for using one time password to authenticate access to
-computer systems. It uses 64 bits of information transformed by the
-MD4 algorithm. The user supplies the 64 bits in the form of 6 English
-words that are generated by a secure computer.
-Example use of the S/key program
-.I key
-.sp
- Usage example:
-.sp 0
- >key 99 th91334
-.sp 0
- Enter password: <your secret password is entered here>
-.sp 0
- OMEN US HORN OMIT BACK AHOY
-.sp 0
- >
-.sp
-The programs that are part of the S/Key system are keyinit, key, and
-keyinfo. Keyinit is used to get your ID set up, key is
-used to get the one time password each time,
-keyinfo is used to extract information from the S/Key database.
-.sp
-When you run "keyinit" you inform the system of your
-secret password. Running "key" then generates the
-one-time passwords, and also requires your secret
-password. If however, you misspell your password
-while running "key", you will get a list of passwords
-that will not work, and no indication about the problem.
-.sp
-Password sequence numbers count backward from 99. If you
-don't know this, the syntax for "key" will be confusing.
-.sp
-You can enter the passwords using small letters, even
-though the "key" program gives them in caps.
-.sp
-Macintosh and a general purpose PC use
-are available.
-.sp
-Under FreeBSD, you can control, with /etc/skey.access, from which
-hosts and/or networks the use of S/Key passwords is obligated.
-.LP
-.SH SEE ALSO
-.BR keyinit(1),
-.BR key(1),
-.BR keyinfo(1)
-.BR skey.access(5)
-.SH AUTHOR
-Phil Karn, Neil M. Haller, John S. Walden, Scott Chasin
diff --git a/lib/libskey/skey.3 b/lib/libskey/skey.3
deleted file mode 100644
index 1b368d3..0000000
--- a/lib/libskey/skey.3
+++ /dev/null
@@ -1,157 +0,0 @@
-.\" Copyright (c) 1996
-.\" David L. Nugent. All Rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY DAVID L. NUGENT AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL DAVID L. NUGENT OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" $Id: skey.3,v 1.5 1997/02/22 15:07:58 peter Exp $
-.\"
-.Dd December 22, 1996
-.Dt SKEY 3
-.Os
-.Sh NAME
-.Nm skeylookup ,
-.Nm skeyverify ,
-.Nm skeychallenge ,
-.Nm skeyinfo ,
-.Nm skeyaccess ,
-.Nm skey_getpass ,
-.Nm skey_crypt
-.Nd Library routines for S/Key password control table access
-.Sh SYNOPSIS
-.Fd #include <stdio.h>
-.Fd #include <skey.h>
-.Ft int
-.Fn skeylookup "struct skey *mp" "const char *name"
-.Ft int
-.Fn skeyverify "struct skey *mp" "char *response"
-.Ft int
-.Fn skeychallenge "struct skey *mp" "const char *name" "char *challenge"
-.Ft int
-.Fn skeyinfo "struct skey *mp" "const char *name" "char *ss"
-.Ft int
-.Fn skeyaccess "char *user" "const char *port" "const char *host" "const char *addr"
-.Ft char *
-.Fn skey_getpass "const char *prompt" "struct passwd *pwd" "int pwok"
-.Ft char *
-.Fn skey_crypt "char *pp" "char *salt" "struct passwd *pwd" "int pwok"
-.Sh DESCRIPTION
-These routes support the S/Key one time password system used for
-accessing computer systems.
-See
-.Xr skey 1
-for more information about the S/Key system itself.
-.Pp
-.Pp
-.Fn skeylookup
-finds an entry in the one-time password database.
-On success (an entry is found corresponding to the given name),
-they skey structure passed by the caller is filled and 0 is
-returned, with the file read/write pointer positioned at the
-beginning of the record found.
-If no entry is found corresponding to the given name, the file
-read/write pointer is positioned at end of file and the routine
-returns 1.
-If the database cannot be opened or an access error occurs,
-.Fn skeylookup
-returns -1.
-.Pp
-The
-.Fn skeyinfo
-function looks up skey info for user 'name'.
-If successful, the caller's skey structure is filled and
-.Fn skeyinfo
-returns 0.
-If an optional challenge string buffer is given, it is updated.
-If unsuccessful (e.g. if the name is unknown, or the database
-cannot be accessed) -1 is returned.
-.Pp
-.Fn skeychallenge
-returns an skey challenge string for 'name'.
-If successful, the caller's skey structure is filled, and
-the function returns 0, with the file read/write pointer
-left at the start of the record.
-If unsuccessful (ie. the name was not found), the function
-returns -1 and the database is closed.
-.Pp
-.Fn skeyverify
-verifies a response to an s/key challenge.
-If this function returns 0, the verify was successful and
-the database was updated.
-If 1 is returned, the verify failed and the database remains
-unchanged.
-If -1 is returned, some sort of error occurred with the database,
-and the database is left unchanged.
-The s/key database is always closed by this call.
-.Pp
-The
-.Fn skey_getpass
-function may be used to read regular or s/key passwords.
-The prompt to use is passed to the function, along with the
-full (secure) struct passwd for the user to be verified.
-.Fn skey_getpass
-uses the standard library getpass on the first attempt at
-retrieving the user's password, and if that is blank, turns
-echo back on and retrieves the S/Key password.
-In either case, the entered string is returned back to the
-caller.
-.Pp
-The
-.Fn skey_crypt
-is a wrapper function for the standard library
-.Xr crypt 3 ,
-which returns the encrypted UNIX password if either the given
-s/key or regular passwords are ok.
-.Fn skey_crypt
-first attempts verification of the given password via the skey
-method, and will return the encrypted password from the
-passwd structure if it can be verified, as though the user had
-actually entered the correct UNIX password.
-If s/key password verification does not work, then the password
-is encrypted in the usual way and the result passed back to the
-caller.
-If the passwd structure pointer is NULL,
-.Fn skey_crypt
-returns a non-NULL string which could not possibly be a valid
-UNIX password (namely, a string containing ":").
-.Pp
-The
-.Fn skeyaccess
-function determines whether s/key passwords are permitted for any
-combination of user name, group member, terminal port, host name or
-network.
-See
-.Xr skey.access 5
-for more information on the layout and structure of the
-skey.access configuration file which this function uses.
-.Sh RETURN VALUES
-See above.
-.Sh SEE ALSO
-.Xr skey 1 ,
-.Xr skey.access 5
-.Sh BUGS
-No advisory locking is done on the s/key database to guard against
-simultaneous access from multiple processes.
-This is not normally a problem when keys are added to or updated
-in the file, but may be problematic when keys are removed.
-.Sh AUTHOR
-Phil Karn, Neil M. Haller, John S. Walden, Scott Chasin
-
diff --git a/lib/libskey/skey.access.5 b/lib/libskey/skey.access.5
deleted file mode 100644
index 2e12ad1..0000000
--- a/lib/libskey/skey.access.5
+++ /dev/null
@@ -1,125 +0,0 @@
-.TH SKEY.ACCESS 5
-.SH NAME
-skey.access \- S/Key password control table
-.SH DESCRIPTION
-The S/Key password control table (\fI/etc/skey.access\fR) is used by
-\fIlogin\fR-like programs to determine when UNIX passwords may be used
-to access the system.
-.IP \(bu
-When the table does not exist, there are no password restrictions. The
-user may enter the UNIX password or the S/Key one.
-.IP \(bu
-When the table does exist, UNIX passwords are permitted only when
-explicitly specified.
-.IP \(bu
-For the sake of sanity, UNIX passwords are always permitted on the
-systems console.
-.SH "TABLE FORMAT"
-The format of the table is one rule per line. Rules are matched in
-order. The search terminates when the first matching rule is found, or
-when the end of the table is reached.
-.PP
-Rules have the form:
-.sp
-.in +5
-permit condition condition...
-.br
-deny condition condition...
-.in
-.PP
-where
-.I permit
-and
-.I deny
-may be followed by zero or more conditions. Comments begin with a `#\'
-character, and extend through the end of the line. Empty lines or
-lines with only comments are ignored.
-.PP
-A rule is matched when all conditions are satisfied. A rule without
-conditions is always satisfied. For example, the last entry could
-be a line with just the word
-.I deny
-on it.
-.SH CONDITIONS
-.IP "hostname wzv.win.tue.nl"
-True when the login comes from host wzv.win.tue.nl.
-See the WARNINGS section below.
-.IP "internet 131.155.210.0 255.255.255.0"
-True when the remote host has an internet address in network
-131.155.210. The general form of a net/mask rule is:
-.sp
-.ti +5
-internet net mask
-.sp
-The expression is true when the host has an internet address for which
-the bitwise and of
-.I address
-and
-.I mask
-equals
-.IR net.
-See the WARNINGS section below.
-.IP "port ttya"
-True when the login terminal is equal to
-.IR /dev/ttya .
-Remember that UNIX passwords are always permitted with logins on the
-system console.
-.IP "user uucp"
-True when the user attempts to log in as
-.IR uucp .
-.IP "group wheel"
-True when the user attempts to log in as a member of the
-.I wheel
-group.
-.SH COMPATIBILITY
-For the sake of backwards compatibility, the
-.I internet
-keyword may be omitted from net/mask patterns.
-.SH WARNINGS
-Several rule types depend on host name or address information obtained
-through the network. What follows is a list of conceivable attacks to
-force the system to permit UNIX passwords.
-.IP "Host address spoofing (source routing)"
-An intruder configures a local interface to an address in a trusted
-network and connects to the victim using that source address. Given
-the wrong client address, the victim draws the wrong conclusion from
-rules based on host addresses or from rules based on host names derived
-from addresses.
-.sp
-Remedies: (1) do not permit UNIX passwords with network logins; (2)
-use network software that discards source routing information (e.g.
-a tcp wrapper).
-.PP
-Almost every network server must look up the client host name using the
-client network address. The next obvious attack therefore is:
-.IP "Host name spoofing (bad PTR record)"
-An intruder manipulates the name server system so that the client
-network address resolves to the name of a trusted host. Given the
-wrong host name, the victim draws the wrong conclusion from rules based
-on host names, or from rules based on addresses derived from host
-names.
-.sp
-Remedies: (1) do not permit UNIX passwords with network logins; (2) use
-network software that verifies that the hostname resolves to the client
-network address (e.g. a tcp wrapper).
-.PP
-Some applications, such as the UNIX login program, must look up the
-client network address using the client host name. In addition to the
-previous two attacks, this opens up yet another possibility:
-.IP "Host address spoofing (extra A record)"
-An intruder manipulates the name server system so that the client host
-name (also) resolves to a trusted address.
-.sp
-Remedies: (1) do not permit UNIX passwords with network logins; (2)
-the skeyaccess() routines ignore network addresses that appear to
-belong to someone else.
-.SH DIAGNOSTICS
-Syntax errors are reported to the syslogd. When an error is found
-the rule is skipped.
-.SH FILES
-/etc/skey.access, password control table
-.SH AUTHOR
-.nf
-Wietse Venema
-Eindhoven University of Technology
-The Netherlands
diff --git a/lib/libskey/skey.h b/lib/libskey/skey.h
deleted file mode 100644
index 10cbebc..0000000
--- a/lib/libskey/skey.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _SKEY_H_
-#define _SKEY_H_
-
-#include <sys/cdefs.h>
-
-/* Server-side data structure for reading keys file during login */
-struct skey {
- FILE *keyfile;
- char buf[256];
- char *logname;
- int n;
- char *seed;
- char *val;
- long recstart; /*needed so reread of buffer is efficient*/
-};
-
-#ifdef _SKEY_INTERNAL
-/* Client-side structure for scanning data stream for challenge */
-struct mc {
- char buf[256];
- int skip;
- int cnt;
-};
-
-#define atob8 _sk_atob8
-#define btoa8 _sk_btoa8
-#define btoe _sk_btoe
-#define etob _sk_etob
-#define f _sk_f
-#define htoi _sk_htoi
-#define keycrunch _sk_keycrunch
-#define put8 _sk_put8
-#define readpass _sk_readpass
-#define rip _sk_rip
-#define sevenbit _sk_sevenbit
-
-void f __P((char *x));
-int keycrunch __P((char *result,char *seed,char *passwd));
-char *btoe __P((char *engout,char *c));
-char *put8 __P((char *out,char *s));
-int atob8 __P((char *out, char *in));
-int btoa8 __P((char *out, char *in));
-int htoi __P((char c));
-int etob __P((char *out,char *e));
-void sevenbit __P((char *s));
-char *readpass __P((char *buf, int n));
-void rip __P((char *buf));
-#endif /* _SKEY_INTERNAL */
-
-/* Simplified application programming interface. */
-#include <pwd.h>
-int skeylookup __P((struct skey *mp, const char *name));
-int skeyverify __P((struct skey *mp, char *response));
-int skeychallenge __P((struct skey *mp, const char *name, char *challenge));
-int skeyinfo __P((struct skey *mp, const char* name, char *ss));
-int skeyaccess __P((char *user, const char *port, const char *host, const char *addr));
-char *skey_getpass __P((const char *prompt, struct passwd * pwd, int pwok));
-char *skey_crypt __P((char *pp, char *salt, struct passwd *pwd, int pwok));
-
-#endif /* _SKEY_H_ */
diff --git a/lib/libskey/skey_crypt.c b/lib/libskey/skey_crypt.c
deleted file mode 100644
index 6ed6bdb..0000000
--- a/lib/libskey/skey_crypt.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Author: Wietse Venema, Eindhoven University of Technology. */
-
-#include <string.h>
-#include <stdio.h>
-#include <pwd.h>
-
-#include "skey.h"
-
-/* skey_crypt - return encrypted UNIX passwd if s/key or regular password ok */
-
-char *skey_crypt(pp, salt, pwd, pwok)
-char *pp;
-char *salt;
-struct passwd *pwd;
-int pwok;
-{
- struct skey skey;
- char *p;
- char *crypt();
-
- /* Try s/key authentication even when the UNIX password is permitted. */
-
- if (pwd != 0 && skeyinfo(&skey, pwd->pw_name, (char *) 0) == 0
- && skeyverify(&skey, pp) == 0) {
- /* s/key authentication succeeded */
- return (pwd->pw_passwd);
- }
-
- /* When s/key authentication does not work, always invoke crypt(). */
-
- p = crypt(pp, salt);
- if (pwok && pwd != 0 && strcmp(p, pwd->pw_passwd) == 0)
- return (pwd->pw_passwd);
-
- /* The user does not exist or entered bad input. */
-
- return (":");
-}
diff --git a/lib/libskey/skey_getpass.c b/lib/libskey/skey_getpass.c
deleted file mode 100644
index c3f5432..0000000
--- a/lib/libskey/skey_getpass.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <unistd.h>
-#include <stdio.h>
-#include <skey.h>
-
-/* skey_getpass - read regular or s/key password */
-
-char *skey_getpass(prompt, pwd, pwok)
-const char *prompt;
-struct passwd *pwd;
-int pwok;
-{
- static char buf[128];
- struct skey skey;
- char *pass;
- int sflag;
-
- /* Attempt an s/key challenge. */
- sflag = (pwd == NULL || skeyinfo(&skey, pwd->pw_name, buf));
- if (!sflag) {
- printf("%s\n", buf);
- if (!pwok)
- printf("(s/key required)\n");
- }
-
- pass = getpass(prompt);
-
- /* Give S/Key users a chance to do it with echo on. */
- if (!sflag && !feof(stdin) && *pass == '\0') {
- fputs(" (turning echo on)\n", stdout);
- fputs(prompt, stdout);
- fflush(stdout);
- fgets(buf, sizeof(buf), stdin);
- rip(buf);
- return (buf);
- } else
- return (pass);
-}
diff --git a/lib/libskey/skeyaccess.c b/lib/libskey/skeyaccess.c
deleted file mode 100644
index 0d52caf..0000000
--- a/lib/libskey/skeyaccess.c
+++ /dev/null
@@ -1,485 +0,0 @@
- /*
- * Figure out if UNIX passwords are permitted for any combination of user
- * name, group member, terminal port, host_name or network:
- *
- * Programmatic interface: skeyaccess(user, port, host, addr)
- *
- * All arguments are null-terminated strings. Specify a null character pointer
- * where information is not available.
- *
- * When no address information is given this code performs the host (internet)
- * address lookup itself. It rejects addresses that appear to belong to
- * someone else.
- *
- * When compiled with -DPERMIT_CONSOLE always permits UNIX passwords with
- * console logins, no matter what the configuration file says.
- *
- * To build a stand-alone test version, compile with -DTEST and run it off an
- * skey.access file in the current directory:
- *
- * Command-line interface: ./skeyaccess user port [host_or_ip_addr]
- *
- * Errors are reported via syslogd.
- *
- * Author: Wietse Venema, Eindhoven University of Technology.
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <string.h>
-#include <netdb.h>
-#include <arpa/inet.h>
-#include <stdio.h>
-#include <grp.h>
-#include <ctype.h>
-#include <syslog.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/param.h>
-
-#include "pathnames.h"
-
- /*
- * Token input with one-deep pushback.
- */
-static char *prev_token = 0; /* push-back buffer */
-static char *line_pointer = NULL;
-static char *first_token();
-static int line_number;
-static void unget_token();
-static char *get_token();
-static char *need_token();
-static char *need_internet_addr();
-
- /*
- * Various forms of token matching.
- */
-#define match_host_name(l) match_token((l)->host_name)
-#define match_port(l) match_token((l)->port)
-#define match_user(l) match_token((l)->user)
-static int match_internet_addr();
-static int match_group();
-static int match_token();
-static int is_internet_addr();
-static struct in_addr *convert_internet_addr();
-static struct in_addr *lookup_internet_addr();
-
-#define MAX_ADDR 32
-#define PERMIT 1
-#define DENY 0
-
-#ifndef CONSOLE
-#define CONSOLE "console"
-#endif
-#ifndef VTY_PREFIX
-#define VTY_PREFIX "ttyv"
-#endif
-
-struct login_info {
- char *host_name; /* host name */
- struct in_addr *internet_addr; /* null terminated list */
- char *user; /* user name */
- char *port; /* login port */
-};
-
-static int _skeyaccess __P(( FILE *, struct login_info * ));
-
-/* skeyaccess - find out if UNIX passwords are permitted */
-
-int skeyaccess(user, port, host, addr)
-char *user;
-char *port;
-char *host;
-char *addr;
-{
- FILE *fp;
- struct login_info login_info;
- int result;
-
- /*
- * Assume no restriction on the use of UNIX passwords when the s/key
- * acces table does not exist.
- */
- if ((fp = fopen(_PATH_SKEYACCESS, "r")) == 0) {
-#ifdef TEST
- fprintf(stderr, "No file %s, thus no access control\n", _PATH_SKEYACCESS);
-#endif
- return (PERMIT);
- }
-
- /*
- * Bundle up the arguments in a structure so we won't have to drag around
- * boring long argument lists.
- *
- * Look up the host address when only the name is given. We try to reject
- * addresses that belong to someone else.
- */
- login_info.user = user;
- login_info.port = port;
-
- if (host != 0 && !is_internet_addr(host)) {
- login_info.host_name = host;
- } else {
- login_info.host_name = 0;
- }
-
- if (addr != 0 && is_internet_addr(addr)) {
- login_info.internet_addr = convert_internet_addr(addr);
- } else if (host != 0) {
- if (is_internet_addr(host)) {
- login_info.internet_addr = convert_internet_addr(host);
- } else {
- login_info.internet_addr = lookup_internet_addr(host);
- }
- } else {
- login_info.internet_addr = 0;
- }
-
- /*
- * Print what we think the user wants us to do.
- */
-#ifdef TEST
- printf("port: %s\n", login_info.port);
- printf("user: %s\n", login_info.user);
- printf("host: %s\n", login_info.host_name ? login_info.host_name : "none");
- printf("addr: ");
- if (login_info.internet_addr == 0) {
- printf("none\n");
- } else {
- int i;
-
- for (i = 0; login_info.internet_addr[i].s_addr; i++)
- printf("%s%s", login_info.internet_addr[i].s_addr == -1 ?
- "(see error log)" : inet_ntoa(login_info.internet_addr[i]),
- login_info.internet_addr[i + 1].s_addr ? " " : "\n");
- }
-#endif
- result = _skeyaccess(fp, &login_info);
- fclose(fp);
- return (result);
-}
-
-/* _skeyaccess - find out if UNIX passwords are permitted */
-
-static int _skeyaccess(fp, login_info)
-FILE *fp;
-struct login_info *login_info;
-{
- char buf[BUFSIZ];
- char *tok;
- int match;
- int permission=DENY;
-
-#ifdef PERMIT_CONSOLE
- if (login_info->port != 0 &&
- (strcmp(login_info->port, CONSOLE) == 0 ||
- strncmp(login_info->port, VTY_PREFIX, sizeof(VTY_PREFIX) - 1) == 0
- )
- )
- return (1);
-#endif
-
- /*
- * Scan the s/key access table until we find an entry that matches. If no
- * match is found, assume that UNIX passwords are disallowed.
- */
- match = 0;
- while (match == 0 && (tok = first_token(buf, sizeof(buf), fp))) {
- if (strncasecmp(tok, "permit", 4) == 0) {
- permission = PERMIT;
- } else if (strncasecmp(tok, "deny", 4) == 0) {
- permission = DENY;
- } else {
- syslog(LOG_ERR, "%s: line %d: bad permission: %s",
- _PATH_SKEYACCESS, line_number, tok);
- continue; /* error */
- }
-
- /*
- * Process all conditions in this entry until we find one that fails.
- */
- match = 1;
- while (match != 0 && (tok = get_token())) {
- if (strcasecmp(tok, "hostname") == 0) {
- match = match_host_name(login_info);
- } else if (strcasecmp(tok, "port") == 0) {
- match = match_port(login_info);
- } else if (strcasecmp(tok, "user") == 0) {
- match = match_user(login_info);
- } else if (strcasecmp(tok, "group") == 0) {
- match = match_group(login_info);
- } else if (strcasecmp(tok, "internet") == 0) {
- match = match_internet_addr(login_info);
- } else if (is_internet_addr(tok)) {
- unget_token(tok);
- match = match_internet_addr(login_info);
- } else {
- syslog(LOG_ERR, "%s: line %d: bad condition: %s",
- _PATH_SKEYACCESS, line_number, tok);
- match = 0;
- }
- }
- }
- return (match ? permission : DENY);
-}
-
-/* match_internet_addr - match internet network address */
-
-static int match_internet_addr(login_info)
-struct login_info *login_info;
-{
- char *tok;
- long pattern;
- long mask;
- struct in_addr *addrp;
-
- if (login_info->internet_addr == 0)
- return (0);
- if ((tok = need_internet_addr()) == 0)
- return (0);
- pattern = inet_addr(tok);
- if ((tok = need_internet_addr()) == 0)
- return (0);
- mask = inet_addr(tok);
-
- /*
- * See if any of the addresses matches a pattern in the control file. We
- * have already tried to drop addresses that belong to someone else.
- */
-
- for (addrp = login_info->internet_addr; addrp->s_addr; addrp++)
- if (addrp->s_addr != -1 && (addrp->s_addr & mask) == pattern)
- return (1);
- return (0);
-}
-
-/* match_group - match username against group */
-
-static int match_group(login_info)
-struct login_info *login_info;
-{
- struct group *group;
- char *tok;
- char **memp;
-
- if ((tok = need_token()) && (group = getgrnam(tok))) {
- for (memp = group->gr_mem; *memp; memp++)
- if (strcmp(login_info->user, *memp) == 0)
- return (1);
- }
- return (0); /* XXX endgrent() */
-}
-
-/* match_token - get and match token */
-
-static int match_token(str)
-char *str;
-{
- char *tok;
-
- return (str && (tok = need_token()) && strcasecmp(str, tok) == 0);
-}
-
-/* first_token - read line and return first token */
-
-static char *first_token(buf, len, fp)
-char *buf;
-int len;
-FILE *fp;
-{
- char *cp;
-
- prev_token = 0;
- for (;;) {
- if (fgets(buf, len, fp) == 0)
- return (0);
- line_number++;
- buf[strcspn(buf, "\r\n#")] = 0;
-#ifdef TEST
- if (buf[0])
- printf("rule: %s\n", buf);
-#endif
- line_pointer = buf;
- while ((cp = strsep(&line_pointer, " \t")) != NULL && *cp == '\0')
- ;
- if (cp != NULL)
- return (cp);
- }
-}
-
-/* unget_token - push back last token */
-
-static void unget_token(cp)
-char *cp;
-{
- prev_token = cp;
-}
-
-/* get_token - retrieve next token from buffer */
-
-static char *get_token()
-{
- char *cp;
-
- if ( (cp = prev_token) ) {
- prev_token = 0;
- } else {
- while ((cp = strsep(&line_pointer, " \t")) != NULL && *cp == '\0')
- ;
- }
- return (cp);
-}
-
-/* need_token - complain if next token is not available */
-
-static char *need_token()
-{
- char *cp;
-
- if ((cp = get_token()) == 0)
- syslog(LOG_ERR, "%s: line %d: premature end of rule",
- _PATH_SKEYACCESS, line_number);
- return (cp);
-}
-
-/* need_internet_addr - complain if next token is not an internet address */
-
-static char *need_internet_addr()
-{
- char *cp;
-
- if ((cp = get_token()) == 0) {
- syslog(LOG_ERR, "%s: line %d: internet address expected",
- _PATH_SKEYACCESS, line_number);
- return (0);
- } else if (!is_internet_addr(cp)) {
- syslog(LOG_ERR, "%s: line %d: bad internet address: %s",
- _PATH_SKEYACCESS, line_number, cp);
- return (0);
- } else {
- return (cp);
- }
-}
-
-/* is_internet_addr - determine if string is a dotted quad decimal address */
-
-static int is_internet_addr(str)
-char *str;
-{
- int in_run = 0;
- int runs = 0;
-
- /* Count the number of runs of characters between the dots. */
-
- while (*str) {
- if (*str == '.') {
- in_run = 0;
- } else {
- if (!isdigit(*str))
- return (0);
- if (in_run == 0) {
- in_run = 1;
- runs++;
- }
- }
- str++;
- }
- return (runs == 4);
-}
-
-/* lookup_internet_addr - look up internet addresses with extreme prejudice */
-
-static struct in_addr *lookup_internet_addr(host)
-char *host;
-{
- struct hostent *hp;
- static struct in_addr list[MAX_ADDR + 1];
- char buf[MAXHOSTNAMELEN + 1];
- int length;
- int i;
-
- if ((hp = gethostbyname(host)) == 0 || hp->h_addrtype != AF_INET)
- return (0);
-
- /*
- * Save a copy of the results before gethostbyaddr() clobbers them.
- */
-
- for (i = 0; i < MAX_ADDR && hp->h_addr_list[i]; i++)
- memcpy((char *) &list[i],
- hp->h_addr_list[i], hp->h_length);
- list[i].s_addr = 0;
-
- strncpy(buf, hp->h_name, MAXHOSTNAMELEN);
- buf[MAXHOSTNAMELEN] = 0;
- length = hp->h_length;
-
- /*
- * Wipe addresses that appear to belong to someone else. We will get
- * false alarms when when the hostname comes from DNS, while its
- * addresses are listed under different names in local databases.
- */
-#define NEQ(x,y) (strcasecmp((x),(y)) != 0)
-#define NEQ3(x,y,n) (strncasecmp((x),(y), (n)) != 0)
-
- while (--i >= 0) {
- if ((hp = gethostbyaddr((char *) &list[i], length, AF_INET)) == 0) {
- syslog(LOG_ERR, "address %s not registered for host %s",
- inet_ntoa(list[i]), buf);
- list[i].s_addr = -1;
- }
- if (NEQ(buf, hp->h_name) && NEQ3(buf, "localhost.", 10)) {
- syslog(LOG_ERR, "address %s registered for host %s and %s",
- inet_ntoa(list[i]), hp->h_name, buf);
- list[i].s_addr = -1;
- }
- }
- return (list);
-}
-
-/* convert_internet_addr - convert string to internet address */
-
-static struct in_addr *convert_internet_addr(string)
-char *string;
-{
- static struct in_addr list[2];
-
- list[0].s_addr = inet_addr(string);
- list[1].s_addr = 0;
- return (list);
-}
-
-#ifdef TEST
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- struct hostent *hp;
- char host[MAXHOSTNAMELEN + 1];
- int verdict;
- char *user;
- char *port;
-
- if (argc != 3 && argc != 4) {
- fprintf(stderr, "usage: %s user port [host_or_ip_address]\n", argv[0]);
- exit(0);
- }
- if (_PATH_SKEYACCESS[0] != '/')
- printf("Warning: this program uses control file: %s\n", KEYACCESS);
- openlog("login", LOG_PID, LOG_AUTH);
-
- user = argv[1];
- port = argv[2];
- if (argv[3]) {
- strncpy(host, (hp = gethostbyname(argv[3])) ?
- hp->h_name : argv[3], MAXHOSTNAMELEN);
- host[MAXHOSTNAMELEN] = 0;
- }
- verdict = skeyaccess(user, port, argv[3] ? host : (char *) 0, (char *) 0);
- printf("UNIX passwords %spermitted\n", verdict ? "" : "NOT ");
- return (0);
-}
-
-#endif
diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c
deleted file mode 100644
index 10af30b..0000000
--- a/lib/libskey/skeylogin.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/* Login code for S/KEY Authentication. S/KEY is a trademark
- * of Bellcore.
- *
- * Mink is the former name of the S/KEY authentication system.
- * Many references for mink may still be found in this program.
- */
-
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
-
-#include "skey.h"
-#include "pathnames.h"
-
-static char *skipspace();
-
-#define setpriority(x,y,z) /* nothing */
-
-static char *month[12] = {
- "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-
-/* Look up skey info for user 'name'. If successful, fill in the caller's
- * skey structure and return 0. If unsuccessful (e.g., if name is unknown)
- * return -1. If an optional challenge string buffer is given, update it.
- *
- * The file read/write pointer is left at the start of the
- * record.
- */
-int
-skeyinfo(mp,name,ss)
-struct skey *mp;
-const char *name;
-char *ss;
-{
- int rval;
-
- rval = skeylookup(mp,name);
- switch(rval){
- case -1: /* File error */
- return -1;
- case 0: /* Lookup succeeded */
- if (ss != 0) {
- sprintf(ss, "s/key %d %s",mp->n - 1,mp->seed);
- fclose(mp->keyfile);
- }
- return 0;
- case 1: /* User not found */
- fclose(mp->keyfile);
- return -1;
- }
- return -1; /* Can't happen */
-}
-
-/* Return a skey challenge string for user 'name'. If successful,
- * fill in the caller's skey structure and return 0. If unsuccessful
- * (e.g., if name is unknown) return -1.
- *
- * The file read/write pointer is left at the start of the
- * record.
- */
-int
-skeychallenge(mp,name, ss)
-struct skey *mp;
-const char *name;
-char *ss;
-{
- int rval;
-
- rval = skeylookup(mp,name);
- switch(rval){
- case -1: /* File error */
- return -1;
- case 0: /* Lookup succeeded, issue challenge */
- sprintf(ss, "s/key %d %s",mp->n - 1,mp->seed);
- return 0;
- case 1: /* User not found */
- fclose(mp->keyfile);
- return -1;
- }
- return -1; /* Can't happen */
-}
-
-/* Find an entry in the One-time Password database.
- * Return codes:
- * -1: error in opening database
- * 0: entry found, file R/W pointer positioned at beginning of record
- * 1: entry not found, file R/W pointer positioned at EOF
- */
-int
-skeylookup(mp,name)
-struct skey *mp;
-const char *name;
-{
- int found;
- int len;
- long recstart;
- char *cp, *p;
- struct stat statbuf;
- mode_t oldmask;
-
- /* See if the _PATH_SKEYFILE exists, and create it if not */
- if(stat(_PATH_SKEYFILE,&statbuf) == -1 && errno == ENOENT){
- oldmask = umask(S_IRWXG|S_IRWXO);
- mp->keyfile = fopen(_PATH_SKEYFILE,"w+");
- (void)umask(oldmask);
- } else {
- /* Otherwise open normally for update */
- mp->keyfile = fopen(_PATH_SKEYFILE,"r+");
- }
- if(mp->keyfile == NULL)
- return -1;
-
- /* Look up user name in database */
- len = strlen(name);
- if( len > 8 ) len = 8; /* Added 8/2/91 - nmh */
- found = 0;
- while(!feof(mp->keyfile)){
- recstart = ftell(mp->keyfile);
- mp->recstart = recstart;
- if(fgets(mp->buf,sizeof(mp->buf),mp->keyfile) != mp->buf){
- break;
- }
- rip(mp->buf);
- if(mp->buf[0] == '#')
- continue; /* Comment */
- p = mp->buf;
- while ((cp = strsep(&p, " \t")) != NULL && *cp == '\0')
- ;
- if((mp->logname = cp) == NULL)
- continue;
- while ((cp = strsep(&p, " \t")) != NULL && *cp == '\0')
- ;
- if(cp == NULL)
- continue;
- mp->n = atoi(cp);
- while ((cp = strsep(&p, " \t")) != NULL && *cp == '\0')
- ;
- if((mp->seed = cp) == NULL)
- continue;
- while ((cp = strsep(&p, " \t")) != NULL && *cp == '\0')
- ;
- if((mp->val = cp) == NULL)
- continue;
- if(strlen(mp->logname) == len
- && strncmp(mp->logname,name,len) == 0){
- found = 1;
- break;
- }
- }
- if(found){
- fseek(mp->keyfile,recstart,0);
- return 0;
- } else
- return 1;
-}
-/* Verify response to a s/key challenge.
- *
- * Return codes:
- * -1: Error of some sort; database unchanged
- * 0: Verify successful, database updated
- * 1: Verify failed, database unchanged
- *
- * The database file is always closed by this call.
- */
-int
-skeyverify(mp,response)
-struct skey *mp;
-char *response;
-{
- char key[8];
- char fkey[8];
- char filekey[8];
- time_t now;
- struct tm *tm;
- char tbuf[27], fbuf[20];
- char *cp, *p;
-
- time(&now);
- tm = localtime(&now);
-/* can't use %b here, because it can be in national form */
- strftime(fbuf, sizeof(fbuf), "%d,%Y %T", tm);
- snprintf(tbuf, sizeof(tbuf), " %s %s", month[tm->tm_mon], fbuf);
-
- if(response == NULL){
- fclose(mp->keyfile);
- return -1;
- }
- rip(response);
-
- /* Convert response to binary */
- if(etob(key,response) != 1 && atob8(key,response) != 0){
- /* Neither english words or ascii hex */
- fclose(mp->keyfile);
- return -1;
- }
-
- /* Compute fkey = f(key) */
- memcpy(fkey,key,sizeof(key));
- f(fkey);
- /* in order to make the window of update as short as possible
- we must do the comparison here and if OK write it back
- other wise the same password can be used twice to get in
- to the system
- */
-
- setpriority(PRIO_PROCESS, 0, -4);
-
- /* reread the file record NOW*/
-
- fseek(mp->keyfile,mp->recstart,0);
- if(fgets(mp->buf,sizeof(mp->buf),mp->keyfile) != mp->buf){
- setpriority(PRIO_PROCESS, 0, 0);
- fclose(mp->keyfile);
- return -1;
- }
- rip(mp->buf);
- p = mp->buf;
- while ((cp = strsep(&p, " \t")) != NULL && *cp == '\0')
- ;
- mp->logname = cp;
- while ((cp = strsep(&p, " \t")) != NULL && *cp == '\0')
- ;
- while ((cp = strsep(&p, " \t")) != NULL && *cp == '\0')
- ;
- mp->seed = cp;
- while ((cp = strsep(&p, " \t")) != NULL && *cp == '\0')
- ;
- mp->val = cp;
- /* And convert file value to hex for comparison */
- atob8(filekey,mp->val);
-
- /* Do actual comparison */
- if(memcmp(filekey,fkey,8) != 0){
- /* Wrong response */
- setpriority(PRIO_PROCESS, 0, 0);
- fclose(mp->keyfile);
- return 1;
- }
-
- /* Update key in database by overwriting entire record. Note
- * that we must write exactly the same number of bytes as in
- * the original record (note fixed width field for N)
- */
- btoa8(mp->val,key);
- mp->n--;
- fseek(mp->keyfile,mp->recstart,0);
- fprintf(mp->keyfile,"%s %04d %-16s %s %-21s\n",mp->logname,mp->n,mp->seed,
- mp->val, tbuf);
-
- fclose(mp->keyfile);
-
- setpriority(PRIO_PROCESS, 0, 0);
- return 0;
-}
-
-
-/* Convert 8-byte hex-ascii string to binary array
- * Returns 0 on success, -1 on error
- */
-int
-atob8(out,in)
-register char *out,*in;
-{
- register int i;
- register int val;
-
- if(in == NULL || out == NULL)
- return -1;
-
- for(i=0;i<8;i++){
- if((in = skipspace(in)) == NULL)
- return -1;
- if((val = htoi(*in++)) == -1)
- return -1;
- *out = val << 4;
-
- if((in = skipspace(in)) == NULL)
- return -1;
- if((val = htoi(*in++)) == -1)
- return -1;
- *out++ |= val;
- }
- return 0;
-}
-
-static
-char *
-skipspace(cp)
-register char *cp;
-{
- while(*cp == ' ' || *cp == '\t')
- cp++;
-
- if(*cp == '\0')
- return NULL;
- else
- return cp;
-}
-
-/* Convert 8-byte binary array to hex-ascii string */
-int
-btoa8(out,in)
-register char *out,*in;
-{
- register int i;
-
- if(in == NULL || out == NULL)
- return -1;
-
- for(i=0;i<8;i++){
- sprintf(out,"%02x",*in++ & 0xff);
- out += 2;
- }
- return 0;
-}
-
-
-/* Convert hex digit to binary integer */
-int
-htoi(c)
-register char c;
-{
- if('0' <= c && c <= '9')
- return c - '0';
- if('a' <= c && c <= 'f')
- return 10 + c - 'a';
- if('A' <= c && c <= 'F')
- return 10 + c - 'A';
- return -1;
-}
diff --git a/lib/libskey/skeysubr.c b/lib/libskey/skeysubr.c
deleted file mode 100644
index 2bd344f..0000000
--- a/lib/libskey/skeysubr.c
+++ /dev/null
@@ -1,130 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <termios.h>
-#include <signal.h>
-
-#include "skey.h"
-#include "mdx.h"
-
-/* Crunch a key:
- * concatenate the seed and the password, run through MDX and
- * collapse to 64 bits. This is defined as the user's starting key.
- */
-int
-keycrunch(result,seed,passwd)
-char *result; /* 8-byte result */
-char *seed; /* Seed, any length */
-char *passwd; /* Password, any length */
-{
- char *buf;
- MDX_CTX md;
- u_long results[4];
- unsigned int buflen;
-
- buflen = strlen(seed) + strlen(passwd);
- if((buf = malloc(buflen+1)) == NULL)
- return -1;
- strcpy(buf,seed);
- strcat(buf,passwd);
-
- /* Crunch the key through MD[45] */
- sevenbit(buf);
- MDXInit(&md);
- MDXUpdate(&md,(unsigned char *)buf,buflen);
- MDXFinal((unsigned char *)results,&md);
- free(buf);
-
- results[0] ^= results[2];
- results[1] ^= results[3];
-
- memcpy(result,(char *)results,8);
-
- return 0;
-}
-
-/* The one-way function f(). Takes 8 bytes and returns 8 bytes in place */
-void
-f(x)
-char *x;
-{
- MDX_CTX md;
- u_long results[4];
-
- MDXInit(&md);
- MDXUpdate(&md,(unsigned char *)x,8);
- MDXFinal((unsigned char *)results,&md);
- /* Fold 128 to 64 bits */
- results[0] ^= results[2];
- results[1] ^= results[3];
-
- memcpy(x,(char *)results,8);
-}
-
-/* Strip trailing cr/lf from a line of text */
-void
-rip(buf)
-char *buf;
-{
- buf[strcspn(buf, "\r\n")] = 0;
-}
-
-static struct termios saved_ttymode;
-
-static void interrupt(sig)
-int sig;
-{
- tcsetattr(0, TCSANOW, &saved_ttymode);
- exit(1);
-}
-
-char *
-readpass(buf,n)
-char *buf;
-int n;
-{
- struct termios noecho_ttymode;
- void (*oldsig)();
-
- /* Save normal line editing modes */
- tcgetattr(0, &saved_ttymode);
- if ((oldsig = signal(SIGINT, SIG_IGN)) != SIG_IGN)
- signal(SIGINT, interrupt);
-
- /* Turn off echoing */
- tcgetattr(0, &noecho_ttymode);
- noecho_ttymode.c_lflag &= ~ECHO;
- tcsetattr(0, TCSANOW, &noecho_ttymode);
- fgets(buf,n,stdin);
- rip(buf);
-
- /* Restore previous tty modes */
- tcsetattr(0, TCSANOW, &saved_ttymode);
- if (oldsig != SIG_IGN)
- signal(SIGINT, oldsig);
-
- /*
- after the secret key is taken from the keyboard, the line feed is
- written to standard error instead of standard output. That means that
- anyone using the program from a terminal won't notice, but capturing
- standard output will get the key words without a newline in front of
- them.
- */
- fprintf(stderr, "\n");
- fflush(stderr);
- sevenbit(buf);
-
- return buf;
-}
-
-void
-sevenbit(s)
-char *s;
-{
- /* make sure there are only 7 bit code in the line*/
- while(*s){
- *s &= 0x7f;
- s++;
- }
-}
diff --git a/lib/libss/Makefile b/lib/libss/Makefile
deleted file mode 100644
index 979238b..0000000
--- a/lib/libss/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-# $Id$
-
-LIB= ss
-SRCS= ss_err.c data.c error.c execute_cmd.c help.c invocation.c list_rqs.c \
- listen.c pager.c parse.c prompt.c request_tbl.c requests.c \
- std_rqs.c
-CFLAGS+= -I. -I${.CURDIR} -DPOSIX -DIN_LIBSS
-CLEANFILES+= ss ss_err.c ss_err.h std_rqs.c
-.if exists(${.OBJDIR}/../libcom_err)
-LIBDESTDIR= ${.OBJDIR}/../libcom_err
-.else
-LIBDESTDIR= ${.CURDIR}/../libcom_err
-.endif
-DPADD= ${LIBDESTDIR}/libcom_err.a
-LDADD= -L${LIBDESTDIR} -lcom_err
-
-ss_err.h ss_err.c: ${.CURDIR}/ss_err.et
- test -e ss_err.et || ln -s ${.CURDIR}/ss_err.et .
- compile_et ss_err.et
- -test -h ss_err.et && rm -f ss_err.et
-
-std_rqs.c: ${.CURDIR}/std_rqs.ct
- test -e std_rqs.ct || ln -s ${.CURDIR}/std_rqs.ct .
- mk_cmds std_rqs.ct
- -test -h std_rqs.ct && rm -f std_rqs.ct
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/ss.h \
- ${DESTDIR}/usr/include/ss
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/copyright.h \
- ${DESTDIR}/usr/include/ss/mit-sipb-copyright.h
-.if exists(${.OBJDIR}/ss_err.h)
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ss_err.h \
- ${DESTDIR}/usr/include/ss
-.endif
-
-.include <bsd.lib.mk>
-
diff --git a/lib/libss/copyright.h b/lib/libss/copyright.h
deleted file mode 100644
index e0d1572..0000000
--- a/lib/libss/copyright.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-
-Copyright 1987, 1989 by the Student Information Processing Board
- of the Massachusetts Institute of Technology
-
-Permission to use, copy, modify, and distribute this software
-and its documentation for any purpose and without fee is
-hereby granted, 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 names of M.I.T. and the M.I.T. S.I.P.B. not be
-used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-M.I.T. and the M.I.T. S.I.P.B. make no representations about
-the suitability of this software for any purpose. It is
-provided "as is" without express or implied warranty.
-
-*/
-
diff --git a/lib/libss/data.c b/lib/libss/data.c
deleted file mode 100644
index 45e49d7..0000000
--- a/lib/libss/data.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright 1987, 1988, 1989 Massachusetts Institute of Technology
- * (Student Information Processing Board)
- *
- * For copyright info, see copyright.h.
- */
-
-#include <stdio.h>
-#include "ss_internal.h"
-#include "copyright.h"
-
-static const char copyright[] =
- "Copyright 1987, 1988, 1989 by the Massachusetts Institute of Technology";
-
-ss_data **_ss_table = (ss_data **)NULL;
-char *_ss_pager_name = (char *)NULL;
diff --git a/lib/libss/error.c b/lib/libss/error.c
deleted file mode 100644
index 223d72a..0000000
--- a/lib/libss/error.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 1987, 1988, 1989 by MIT Student Information Processing
- * Board
- *
- * For copyright information, see copyright.h.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-/*
- * Our standalone dpANS environment on the RT doesn't include any
- * header files.
- */
-#if defined(__STDC__) && !defined(ibm032)
-#include <stdarg.h>
-#define STDARG
-#else
-#include <varargs.h>
-#define ss_error ss_error_external
-#endif
-
-#include "copyright.h"
-#include <com_err.h>
-#include "ss_internal.h"
-
-#undef ss_error
-
-extern void com_err_va __P(( ));
-
-char * ss_name(sci_idx)
- int sci_idx;
-{
- register char *ret_val;
- register ss_data *infop;
-
- infop = ss_info(sci_idx);
- if (infop->current_request == (char const *)NULL) {
- ret_val = malloc((unsigned)
- (strlen(infop->subsystem_name)+1)
- * sizeof(char));
- if (ret_val == (char *)NULL)
- return((char *)NULL);
- strcpy(ret_val, infop->subsystem_name);
- return(ret_val);
- }
- else {
- register char *cp;
- register char const *cp1;
- ret_val = malloc((unsigned)sizeof(char) *
- (strlen(infop->subsystem_name)+
- strlen(infop->current_request)+
- 4));
- cp = ret_val;
- cp1 = infop->subsystem_name;
- while (*cp1)
- *cp++ = *cp1++;
- *cp++ = ' ';
- *cp++ = '(';
- cp1 = infop->current_request;
- while (*cp1)
- *cp++ = *cp1++;
- *cp++ = ')';
- *cp = '\0';
- return(ret_val);
- }
-}
-
-#ifdef STDARG
-void ss_error (int sci_idx, long code, const char * fmt, ...)
-#else
-void ss_error (va_alist)
- va_dcl
-#endif
-{
- register char const *whoami;
- va_list pvar;
-#ifndef STDARG
- int sci_idx;
- long code;
- char * fmt;
- va_start (pvar);
- sci_idx = va_arg (pvar, int);
- code = va_arg (pvar, long);
- fmt = va_arg (pvar, char *);
-#else
- va_start (pvar, fmt);
-#endif
- whoami = ss_name (sci_idx);
- com_err_va (whoami, code, fmt, pvar);
- free (whoami);
- va_end(pvar);
-}
-
-void ss_perror (sci_idx, code, msg) /* for compatibility */
- int sci_idx;
- long code;
- char const *msg;
-{
- ss_error (sci_idx, code, "%s", msg);
-}
diff --git a/lib/libss/execute_cmd.c b/lib/libss/execute_cmd.c
deleted file mode 100644
index 1bb0129..0000000
--- a/lib/libss/execute_cmd.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright 1987, 1988, 1989 by Massachusetts Institute of Technology
- *
- * For copyright info, see copyright.h.
- */
-
-#include "ss_internal.h"
-#include "copyright.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifndef lint
-static char const rcsid[] =
- "Header: execute_cmd.c,v 1.7 89/01/25 08:27:43 raeburn Exp ";
-#endif
-
-/*
- * get_request(tbl, idx)
- *
- * Function:
- * Gets the idx'th request from the request table pointed to
- * by tbl.
- * Arguments:
- * tbl (ss_request_table *)
- * pointer to request table
- * idx (int)
- * index into table
- * Returns:
- * (ss_request_entry *)
- * pointer to request table entry
- * Notes:
- * Has been replaced by a macro.
- */
-
-#ifdef __SABER__
-/* sigh. saber won't deal with pointer-to-const-struct */
-static struct _ss_request_entry * get_request (tbl, idx)
- ss_request_table * tbl;
- int idx;
-{
- struct _ss_request_table *tbl1 = (struct _ss_request_table *) tbl;
- struct _ss_request_entry *e = (struct _ss_request_entry *) tbl1->requests;
- return e + idx;
-}
-#else
-#define get_request(tbl,idx) ((tbl) -> requests + (idx))
-#endif
-
-/*
- * check_request_table(rqtbl, argc, argv, sci_idx)
- *
- * Function:
- * If the command string in argv[0] is in the request table, execute
- * the commands and return error code 0. Otherwise, return error
- * code ss_et_command_not_found.
- * Arguments:
- * rqtbl (ss_request_table *)
- * pointer to request table
- * argc (int)
- * number of elements in argv[]
- * argv (char *[])
- * argument string array
- * sci_idx (int)
- * ss-internal index for subsystem control info structure
- * Returns:
- * (int)
- * zero if command found, ss_et_command_not_found otherwise
- * Notes:
- */
-
-static int check_request_table (rqtbl, argc, argv, sci_idx)
- register ss_request_table *rqtbl;
- int argc;
- char *argv[];
- int sci_idx;
-{
-#ifdef __SABER__
- struct _ss_request_entry *request;
-#else
- register ss_request_entry *request;
-#endif
- register ss_data *info;
- register char const * const * name;
- char *string = argv[0];
- int i;
-
- info = ss_info(sci_idx);
- info->argc = argc;
- info->argv = argv;
- for (i = 0; (request = get_request(rqtbl, i))->command_names; i++) {
- for (name = request->command_names; *name; name++)
- if (!strcmp(*name, string)) {
- info->current_request = request->command_names[0];
- (request->function)(argc, (const char *const *) argv,
- sci_idx,info->info_ptr);
- info->current_request = (char *)NULL;
- return(0);
- }
- }
- return(SS_ET_COMMAND_NOT_FOUND);
-}
-
-/*
- * really_execute_command(sci_idx, argc, argv)
- *
- * Function:
- * Fills in the argc, argv values in the subsystem entry and
- * call the appropriate routine.
- * Arguments:
- * sci_idx (int)
- * ss-internal index for subsystem control info structure
- * argc (int)
- * number of arguments in argument list
- * argv (char **[])
- * pointer to parsed argument list (may be reallocated
- * on abbrev expansion)
- *
- * Returns:
- * (int)
- * Zero if successful, ss_et_command_not_found otherwise.
- * Notes:
- */
-
-static int really_execute_command (sci_idx, argc, argv)
- int sci_idx;
- int argc;
- char **argv[];
-{
- register ss_request_table **rqtbl;
- register ss_data *info;
-
- info = ss_info(sci_idx);
-
- for (rqtbl = info->rqt_tables; *rqtbl; rqtbl++) {
- if (check_request_table (*rqtbl, argc, *argv, sci_idx) == 0)
- return(0);
- }
- return(SS_ET_COMMAND_NOT_FOUND);
-}
-
-/*
- * ss_execute_command(sci_idx, argv)
- *
- * Function:
- * Executes a parsed command list within the subsystem.
- * Arguments:
- * sci_idx (int)
- * ss-internal index for subsystem control info structure
- * argv (char *[])
- * parsed argument list
- * Returns:
- * (int)
- * Zero if successful, ss_et_command_not_found otherwise.
- * Notes:
- */
-
-int
-ss_execute_command(sci_idx, argv)
- int sci_idx;
- register char *argv[];
-{
- register int i, argc;
- char **argp;
-
- argc = 0;
- for (argp = argv; *argp; argp++)
- argc++;
- argp = (char **)malloc((argc+1)*sizeof(char *));
- for (i = 0; i <= argc; i++)
- argp[i] = argv[i];
- i = really_execute_command(sci_idx, argc, &argp);
- free(argp);
- return(i);
-}
-
-/*
- * ss_execute_line(sci_idx, line_ptr)
- *
- * Function:
- * Parses and executes a command line within a subsystem.
- * Arguments:
- * sci_idx (int)
- * ss-internal index for subsystem control info structure
- * line_ptr (char *)
- * Pointer to command line to be parsed.
- * Returns:
- * (int)
- * Error code.
- * Notes:
- */
-
-int ss_execute_line (sci_idx, line_ptr)
- int sci_idx;
- char *line_ptr;
-{
- char **argv;
- int argc;
-
- /* flush leading whitespace */
- while (line_ptr[0] == ' ' || line_ptr[0] == '\t')
- line_ptr++;
-
- /* check if it should be sent to operating system for execution */
- if (*line_ptr == '!') {
- if (ss_info(sci_idx)->flags.escape_disabled)
- return SS_ET_ESCAPE_DISABLED;
- else {
- line_ptr++;
- system(line_ptr);
- return 0;
- }
- }
-
- /* parse it */
- argv = ss_parse(sci_idx, line_ptr, &argc);
- if (argc == 0)
- return 0;
-
- /* look it up in the request tables, execute if found */
- return really_execute_command (sci_idx, argc, &argv);
-}
diff --git a/lib/libss/help.c b/lib/libss/help.c
deleted file mode 100644
index 48aece43..0000000
--- a/lib/libss/help.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright info, see copyright.h.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/wait.h>
-#include <dirent.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include "ss_internal.h"
-#include "copyright.h"
-
-extern int errno;
-
-void ss_help (argc, argv, sci_idx, info_ptr)
- int argc;
- char const * const *argv;
- int sci_idx;
- pointer info_ptr;
-{
- char buffer[MAXPATHLEN];
- char const *request_name;
- int code;
- int fd, child;
- register int idx;
- register ss_data *info;
-
- request_name = ss_current_request(sci_idx, &code);
- if (code != 0) {
- ss_perror(sci_idx, code, "");
- return; /* no ss_abort_line, if invalid invocation */
- }
- if (argc == 1) {
- ss_list_requests(argc, argv, sci_idx, info_ptr);
- return;
- }
- else if (argc != 2) {
- /* should do something better than this */
- sprintf(buffer, "usage:\n\t%s [topic|command]\nor\t%s\n",
- request_name, request_name);
- ss_perror(sci_idx, 0, buffer);
- return;
- }
- info = ss_info(sci_idx);
- if (info->info_dirs == (char **)NULL) {
- ss_perror(sci_idx, SS_ET_NO_INFO_DIR, (char *)NULL);
- return;
- }
- if (info->info_dirs[0] == (char *)NULL) {
- ss_perror(sci_idx, SS_ET_NO_INFO_DIR, (char *)NULL);
- return;
- }
- for (idx = 0; info->info_dirs[idx] != (char *)NULL; idx++) {
- (void) strcpy(buffer, info->info_dirs[idx]);
- (void) strcat(buffer, "/");
- (void) strcat(buffer, argv[1]);
- (void) strcat(buffer, ".info");
- if ((fd = open(&buffer[0], O_RDONLY, 0)) >= 0) goto got_it;
- }
- if ((fd = open(&buffer[0], O_RDONLY, 0)) < 0) {
- char buf[MAXPATHLEN];
- strcpy(buf, "No info found for ");
- strcat(buf, argv[1]);
- ss_perror(sci_idx, 0, buf);
- return;
- }
-got_it:
- switch (child = fork()) {
- case -1:
- ss_perror(sci_idx, errno, "Can't fork for pager");
- return;
- case 0:
- (void) dup2(fd, 0); /* put file on stdin */
- ss_page_stdin();
- default:
- (void) close(fd); /* what can we do if it fails? */
-#ifndef POSIX
- while (wait((union wait *)NULL) != child)
-#else
- while (wait((int *)NULL) != child)
-#endif
- {
- /* do nothing if wrong pid */
- };
- }
-}
-
-void ss_add_info_dir(sci_idx, info_dir, code_ptr)
- int sci_idx;
- char *info_dir;
- int *code_ptr;
-{
- register ss_data *info;
- DIR *d;
- int n_dirs;
- register char **dirs;
-
- info = ss_info(sci_idx);
- if (info_dir == NULL && *info_dir) {
- *code_ptr = SS_ET_NO_INFO_DIR;
- return;
- }
- if ((d = opendir(info_dir)) == (DIR *)NULL) {
- *code_ptr = errno;
- return;
- }
- closedir(d);
- dirs = info->info_dirs;
- for (n_dirs = 0; dirs[n_dirs] != (char *)NULL; n_dirs++)
- ; /* get number of non-NULL dir entries */
- dirs = (char **)realloc((char *)dirs,
- (unsigned)(n_dirs + 2)*sizeof(char *));
- if (dirs == (char **)NULL) {
- info->info_dirs = (char **)NULL;
- *code_ptr = errno;
- return;
- }
- info->info_dirs = dirs;
- dirs[n_dirs + 1] = (char *)NULL;
- dirs[n_dirs] = malloc((unsigned)strlen(info_dir)+1);
- strcpy(dirs[n_dirs], info_dir);
- *code_ptr = 0;
-}
-
-void ss_delete_info_dir(sci_idx, info_dir, code_ptr)
- int sci_idx;
- char *info_dir;
- int *code_ptr;
-{
- register char **i_d;
- register char **info_dirs;
-
- info_dirs = ss_info(sci_idx)->info_dirs;
- for (i_d = info_dirs; *i_d; i_d++) {
- if (!strcmp(*i_d, info_dir)) {
- while (*i_d) {
- *i_d = *(i_d+1);
- i_d++;
- }
- *code_ptr = 0;
- return;
- }
- }
- *code_ptr = SS_ET_NO_INFO_DIR;
-}
diff --git a/lib/libss/invocation.c b/lib/libss/invocation.c
deleted file mode 100644
index 513ec7d..0000000
--- a/lib/libss/invocation.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright information, see copyright.h.
- */
-
-#include <stdlib.h>
-#include "ss_internal.h"
-#include "copyright.h"
-#define size sizeof(ss_data *)
-
-#ifndef lint
-static char const rcsid[] =
- "Header: invocation.c,v 1.6 89/01/25 07:45:47 raeburn Exp ";
-#endif
-
-int ss_create_invocation(subsystem_name, version_string, info_ptr,
- request_table_ptr, code_ptr)
- char *subsystem_name, *version_string;
- char *info_ptr;
- ss_request_table *request_table_ptr;
- int *code_ptr;
-{
- register int sci_idx;
- register ss_data *new_table;
- register ss_data **table;
-
- *code_ptr = 0;
- table = _ss_table;
- new_table = (ss_data *) malloc(sizeof(ss_data));
-
- if (table == (ss_data **) NULL) {
- table = (ss_data **) malloc(2 * size);
- table[0] = table[1] = (ss_data *)NULL;
- }
- initialize_ss_error_table ();
-
- for (sci_idx = 1; table[sci_idx] != (ss_data *)NULL; sci_idx++)
- ;
- table = (ss_data **) realloc((char *)table,
- ((unsigned)sci_idx+2)*size);
- table[sci_idx+1] = (ss_data *) NULL;
- table[sci_idx] = new_table;
-
- new_table->subsystem_name = subsystem_name;
- new_table->subsystem_version = version_string;
- new_table->argv = (char **)NULL;
- new_table->current_request = (char *)NULL;
- new_table->info_dirs = (char **)malloc(sizeof(char *));
- *new_table->info_dirs = (char *)NULL;
- new_table->info_ptr = info_ptr;
- new_table->prompt = malloc((unsigned)strlen(subsystem_name)+4);
- strcpy(new_table->prompt, subsystem_name);
- strcat(new_table->prompt, ": ");
-#ifdef silly
- new_table->abbrev_info = ss_abbrev_initialize("/etc/passwd", code_ptr);
-#else
- new_table->abbrev_info = NULL;
-#endif
- new_table->flags.escape_disabled = 0;
- new_table->flags.abbrevs_disabled = 0;
- new_table->rqt_tables =
- (ss_request_table **) calloc(2, sizeof(ss_request_table *));
- *(new_table->rqt_tables) = request_table_ptr;
- *(new_table->rqt_tables+1) = (ss_request_table *) NULL;
- _ss_table = table;
- return(sci_idx);
-}
-
-void
-ss_delete_invocation(sci_idx)
- int sci_idx;
-{
- register ss_data *t;
- int ignored_code;
-
- t = ss_info(sci_idx);
- free(t->prompt);
- free((char *)t->rqt_tables);
- while(t->info_dirs[0] != (char *)NULL)
- ss_delete_info_dir(sci_idx, t->info_dirs[0], &ignored_code);
- free((char *)t->info_dirs);
- free((char *)t);
-}
diff --git a/lib/libss/list_rqs.c b/lib/libss/list_rqs.c
deleted file mode 100644
index 14e7748..0000000
--- a/lib/libss/list_rqs.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright information, see copyright.h.
- */
-#include "copyright.h"
-#include "ss_internal.h"
-#include <signal.h>
-#include <setjmp.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#ifdef lint /* "lint returns a value which is sometimes ignored" */
-#define DONT_USE(x) x=x;
-#else /* !lint */
-#define DONT_USE(x) ;
-#endif /* lint */
-
-static char const twentyfive_spaces[26] =
- " ";
-static char const NL[2] = "\n";
-
-void
-ss_list_requests(argc, argv, sci_idx, info_ptr)
- int argc;
- char **argv;
- int sci_idx;
- pointer info_ptr;
-{
- register ss_request_entry *entry;
- register char const * const *name;
- register int spacing;
- register ss_request_table **table;
-
- char buffer[BUFSIZ];
- FILE *output;
- int fd;
- int mask;
-#ifdef POSIX
- void (*func)();
-#else
- int (*func)();
-#endif
-#ifdef POSIX
- int waitb;
-#else
- union wait waitb;
-#endif
-
- DONT_USE(argc);
- DONT_USE(argv);
-
- mask = sigblock(sigmask(SIGINT));
- func = signal(SIGINT, SIG_IGN);
- fd = ss_pager_create();
- output = fdopen(fd, "w");
- sigsetmask(mask);
-
- fprintf (output, "Available %s requests:\n\n",
- ss_info (sci_idx) -> subsystem_name);
-
- for (table = ss_info(sci_idx)->rqt_tables; *table; table++) {
- entry = (*table)->requests;
- for (; entry->command_names; entry++) {
- spacing = -2;
- buffer[0] = '\0';
- if (entry->flags & SS_OPT_DONT_LIST)
- continue;
- for (name = entry->command_names; *name; name++) {
- register int len = strlen(*name);
- strncat(buffer, *name, len);
- spacing += len + 2;
- if (name[1]) {
- strcat(buffer, ", ");
- }
- }
- if (spacing > 23) {
- strcat(buffer, NL);
- fputs(buffer, output);
- spacing = 0;
- buffer[0] = '\0';
- }
- strncat(buffer, twentyfive_spaces, 25-spacing);
- strcat(buffer, entry->info_string);
- strcat(buffer, NL);
- fputs(buffer, output);
- }
- }
- fclose(output);
-#ifndef NO_FORK
- wait(&waitb);
-#endif
- (void) signal(SIGINT, func);
-}
diff --git a/lib/libss/listen.c b/lib/libss/listen.c
deleted file mode 100644
index 351129c..0000000
--- a/lib/libss/listen.c
+++ /dev/null
@@ -1,164 +0,0 @@
-
-
-/*
- * Listener loop for subsystem library libss.a.
- *
- * Header: /afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.lib/ss/RCS/listen.c,v 1.2 90/07/12 12:28:58 epeisach Exp
- * $Locker: $
- *
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright information, see copyright.h.
- */
-
-#include "copyright.h"
-#include "ss_internal.h"
-#include <stdio.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <sys/param.h>
-#if defined(BSD) && !defined(POSIX)
-#include <sgtty.h>
-#endif
-#ifdef POSIX
-#include <termios.h>
-#endif
-
-#ifndef lint
-static char const rcs_id[] =
- "Header: /afs/rel-eng.athena.mit.edu/project/release/current/source/athena/athena.lib/ss/RCS/listen.c,v 1.2 90/07/12 12:28:58 epeisach Exp ";
-#endif
-
-#ifdef POSIX
-#define sigtype void
-#else
-#define sigtype int
-#endif POSIX
-
-extern char *index();
-
-static ss_data *current_info;
-static jmp_buf listen_jmpb;
-
-static sigtype print_prompt()
-{
- /* put input into a reasonable mode */
-#if defined(BSD) && !defined(POSIX)
- struct sgttyb ttyb;
- if (ioctl(fileno(stdin), TIOCGETP, &ttyb) != -1) {
- if (ttyb.sg_flags & (CBREAK|RAW)) {
- ttyb.sg_flags &= ~(CBREAK|RAW);
- (void) ioctl(0, TIOCSETP, &ttyb);
- }
-#endif
-#ifdef POSIX
- struct termios tio;
- if (tcgetattr(fileno(stdin), &tio) != -1) {
- tio.c_oflag |= (OPOST|ONLCR);
- tio.c_iflag &= ~(IGNCR|INLCR);
- tio.c_iflag |= (ICRNL);
- tio.c_lflag |= (ICANON);
- (void) tcsetattr(0, TCSADRAIN, &tio);
- }
-#endif
- (void) fputs(current_info->prompt, stdout);
- (void) fflush(stdout);
-}
-
-static sigtype listen_int_handler()
-{
- putc('\n', stdout);
- longjmp(listen_jmpb, 1);
-}
-
-int ss_listen (sci_idx)
- int sci_idx;
-{
- register char *cp;
- register sigtype (*sig_cont)();
- register ss_data *info;
- sigtype (*sig_int)(), (*old_sig_cont)();
- char input[BUFSIZ];
- char buffer[BUFSIZ];
- char *end = buffer;
- int mask;
- int code;
- jmp_buf old_jmpb;
- ss_data *old_info = current_info;
- static sigtype print_prompt();
-
- current_info = info = ss_info(sci_idx);
- sig_cont = (sigtype (*)())0;
- info->abort = 0;
- mask = sigblock(sigmask(SIGINT));
- bcopy(listen_jmpb, old_jmpb, sizeof(jmp_buf));
- sig_int = signal(SIGINT, listen_int_handler);
- setjmp(listen_jmpb);
- (void) sigsetmask(mask);
- while(!info->abort) {
- print_prompt();
- *end = '\0';
- old_sig_cont = sig_cont;
- sig_cont = signal(SIGCONT, print_prompt);
-#ifdef mips
- /* The mips compiler breaks on determining the types,
- we help */
- if ( (sigtype *) sig_cont == (sigtype *) print_prompt)
-#else
- if ( sig_cont == print_prompt)
-#endif
- sig_cont = old_sig_cont;
- if (fgets(input, BUFSIZ, stdin) != input) {
- code = SS_ET_EOF;
- goto egress;
- }
- cp = index(input, '\n');
- if (cp) {
- *cp = '\0';
- if (cp == input)
- continue;
- }
- (void) signal(SIGCONT, sig_cont);
- for (end = input; *end; end++)
- ;
-
- code = ss_execute_line (sci_idx, input);
- if (code == SS_ET_COMMAND_NOT_FOUND) {
- register char *c = input;
- while (*c == ' ' || *c == '\t')
- c++;
- cp = index (c, ' ');
- if (cp)
- *cp = '\0';
- cp = index (c, '\t');
- if (cp)
- *cp = '\0';
- ss_error (sci_idx, 0,
- "Unknown request \"%s\". Type \"?\" for a request list.",
- c);
- }
- }
- code = 0;
-egress:
- (void) signal(SIGINT, sig_int);
- bcopy(old_jmpb, listen_jmpb, sizeof(jmp_buf));
- current_info = old_info;
- return code;
-}
-
-void ss_abort_subsystem(sci_idx, code)
- int sci_idx, code;
-{
- ss_info(sci_idx)->abort = 1;
- ss_info(sci_idx)->exit_status = code;
-
-}
-
-void ss_quit(argc, argv, sci_idx, infop)
- int argc;
- char **argv;
- int sci_idx;
- pointer infop;
-{
- ss_abort_subsystem(sci_idx, 0);
-}
diff --git a/lib/libss/pager.c b/lib/libss/pager.c
deleted file mode 100644
index b419725..0000000
--- a/lib/libss/pager.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Pager: Routines to create a "more" running out of a particular file
- * descriptor.
- *
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright information, see copyright.h.
- */
-
-#include "ss_internal.h"
-#include "copyright.h"
-#include <stdio.h>
-#include <sys/file.h>
-#include <signal.h>
-#include <unistd.h>
-
-static char MORE[] = "more";
-extern char *_ss_pager_name;
-extern char *getenv();
-extern int errno;
-
-/*
- * this needs a *lot* of work....
- *
- * run in same process
- * handle SIGINT sensibly
- * allow finer control -- put-page-break-here
- */
-void ss_page_stdin();
-
-#ifndef NO_FORK
-int ss_pager_create()
-{
- int filedes[2];
-
- if (pipe(filedes) != 0)
- return(-1);
-
- switch(fork()) {
- case -1:
- return(-1);
- case 0:
- /*
- * Child; dup read half to 0, close all but 0, 1, and 2
- */
- if (dup2(filedes[0], 0) == -1)
- exit(1);
- ss_page_stdin();
- default:
- /*
- * Parent: close "read" side of pipe, return
- * "write" side.
- */
- (void) close(filedes[0]);
- return(filedes[1]);
- }
-}
-#else /* don't fork */
-int ss_pager_create()
-{
- int fd;
- fd = open("/dev/tty", O_WRONLY, 0);
- return fd;
-}
-#endif
-
-void ss_page_stdin()
-{
- int i;
- for (i = 3; i < 32; i++)
- (void) close(i);
- (void) signal(SIGINT, SIG_DFL);
- {
- register int mask = sigblock(0);
- mask &= ~sigmask(SIGINT);
- sigsetmask(mask);
- }
- if (_ss_pager_name == (char *)NULL) {
- if ((_ss_pager_name = getenv("PAGER")) == (char *)NULL)
- _ss_pager_name = MORE;
- }
- (void) execlp(_ss_pager_name, _ss_pager_name, (char *) NULL);
- {
- /* minimal recovery if pager program isn't found */
- char buf[80];
- register int n;
- while ((n = read(0, buf, 80)) > 0)
- write(1, buf, n);
- }
- exit(errno);
-}
diff --git a/lib/libss/parse.c b/lib/libss/parse.c
deleted file mode 100644
index 8a61ea8..0000000
--- a/lib/libss/parse.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright info, see copyright.h.
- */
-
-#include <stdlib.h>
-#include "ss_internal.h"
-#include "copyright.h"
-
-#ifndef lint
-static char const rcsid[] =
- "Header: parse.c,v 1.1 89/01/25 07:53:13 raeburn Exp ";
-#endif
-
-enum parse_mode { WHITESPACE, TOKEN, QUOTED_STRING };
-
-/*
- * parse(line_ptr, argc_ptr)
- *
- * Function:
- * Parses line, dividing at whitespace, into tokens, returns
- * the "argc" and "argv" values.
- * Arguments:
- * line_ptr (char *)
- * Pointer to text string to be parsed.
- * argc_ptr (int *)
- * Where to put the "argc" (number of tokens) value.
- * Returns:
- * argv (char **)
- * Series of pointers to parsed tokens.
- */
-
-#define NEW_ARGV(old,n) (char **)realloc((char *)old,\
- (unsigned)(n+2)*sizeof(char*))
-
-char **ss_parse (sci_idx, line_ptr, argc_ptr)
- int sci_idx;
- register char *line_ptr;
- int *argc_ptr;
-{
- register char **argv, *cp;
- register int argc;
- register enum parse_mode parse_mode;
-
- argv = (char **) malloc (sizeof(char *));
- if (argv == (char **)NULL) {
- ss_error(sci_idx, errno, "Can't allocate storage");
- return(argv);
- }
- *argv = (char *)NULL;
-
- argc = 0;
-
- parse_mode = WHITESPACE; /* flushing whitespace */
- cp = line_ptr; /* cp is for output */
- while (1) {
-#ifdef DEBUG
- {
- printf ("character `%c', mode %d\n", *line_ptr, parse_mode);
- }
-#endif
- while (parse_mode == WHITESPACE) {
- if (*line_ptr == '\0')
- goto end_of_line;
- if (*line_ptr == ' ' || *line_ptr == '\t') {
- line_ptr++;
- continue;
- }
- if (*line_ptr == '"') {
- /* go to quoted-string mode */
- parse_mode = QUOTED_STRING;
- cp = line_ptr++;
- argv = NEW_ARGV (argv, argc);
- argv[argc++] = cp;
- argv[argc] = NULL;
- }
- else {
- /* random-token mode */
- parse_mode = TOKEN;
- cp = line_ptr;
- argv = NEW_ARGV (argv, argc);
- argv[argc++] = line_ptr;
- argv[argc] = NULL;
- }
- }
- while (parse_mode == TOKEN) {
- if (*line_ptr == '\0') {
- *cp++ = '\0';
- goto end_of_line;
- }
- else if (*line_ptr == ' ' || *line_ptr == '\t') {
- *cp++ = '\0';
- line_ptr++;
- parse_mode = WHITESPACE;
- }
- else if (*line_ptr == '"') {
- line_ptr++;
- parse_mode = QUOTED_STRING;
- }
- else {
- *cp++ = *line_ptr++;
- }
- }
- while (parse_mode == QUOTED_STRING) {
- if (*line_ptr == '\0') {
- ss_error (sci_idx, 0,
- "Unbalanced quotes in command line");
- free (argv);
- return NULL;
- }
- else if (*line_ptr == '"') {
- if (*++line_ptr == '"') {
- *cp++ = '"';
- line_ptr++;
- }
- else {
- parse_mode = TOKEN;
- }
- }
- else {
- *cp++ = *line_ptr++;
- }
- }
- }
-end_of_line:
- *argc_ptr = argc;
-#ifdef DEBUG
- {
- int i;
- printf ("argc = %d\n", argc);
- for (i = 0; i <= argc; i++)
- printf ("\targv[%2d] = `%s'\n", i,
- argv[i] ? argv[i] : "<NULL>");
- }
-#endif
- return(argv);
-}
diff --git a/lib/libss/prompt.c b/lib/libss/prompt.c
deleted file mode 100644
index d6f5ff8..0000000
--- a/lib/libss/prompt.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * prompt.c: Routines for retrieving and setting a prompt.
- *
- * Header: prompt.c,v 1.2 89/01/18 18:27:02 raeburn Exp
- * $Locker: $
- *
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright information, see copyright.h.
- */
-
-#include "copyright.h"
-#include <stdio.h>
-#include "ss_internal.h"
-
-static const char rcsid[] =
- "Header: prompt.c,v 1.2 89/01/18 18:27:02 raeburn Exp ";
-
-void
-ss_set_prompt(sci_idx, new_prompt)
- int sci_idx;
- char *new_prompt;
-{
- ss_info(sci_idx)->prompt = new_prompt;
-}
-
-char *
-ss_get_prompt(sci_idx)
- int sci_idx;
-{
- return(ss_info(sci_idx)->prompt);
-}
diff --git a/lib/libss/request_tbl.c b/lib/libss/request_tbl.c
deleted file mode 100644
index b860064..0000000
--- a/lib/libss/request_tbl.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright information, see copyright.h.
- */
-
-#include <stdlib.h>
-#include "copyright.h"
-#include "ss_internal.h"
-
-#define ssrt ss_request_table /* for some readable code... */
-
-void
-ss_add_request_table(sci_idx, rqtbl_ptr, position, code_ptr)
- int sci_idx;
- ssrt *rqtbl_ptr;
- int position; /* 1 -> becomes second... */
- int *code_ptr;
-{
- register ss_data *info;
- register int i, size;
-
- info = ss_info(sci_idx);
- for (size=0; info->rqt_tables[size] != (ssrt *)NULL; size++)
- ;
- /* size == C subscript of NULL == #elements */
- size += 2; /* new element, and NULL */
- info->rqt_tables = (ssrt **)realloc((char *)info->rqt_tables,
- (unsigned)size*sizeof(ssrt));
- if (info->rqt_tables == (ssrt **)NULL) {
- *code_ptr = errno;
- return;
- }
- if (position > size - 2)
- position = size - 2;
-
- if (size > 1)
- for (i = size - 2; i >= position; i--)
- info->rqt_tables[i+1] = info->rqt_tables[i];
-
- info->rqt_tables[position] = rqtbl_ptr;
- info->rqt_tables[size-1] = (ssrt *)NULL;
- *code_ptr = 0;
-}
-
-void
-ss_delete_request_table(sci_idx, rqtbl_ptr, code_ptr)
- int sci_idx;
- ssrt *rqtbl_ptr;
- int *code_ptr;
-{
- register ss_data *info;
- register ssrt **rt1, **rt2;
-
- *code_ptr = SS_ET_TABLE_NOT_FOUND;
- info = ss_info(sci_idx);
- rt1 = info->rqt_tables;
- for (rt2 = rt1; *rt1; rt1++) {
- if (*rt1 != rqtbl_ptr) {
- *rt2++ = *rt1;
- *code_ptr = 0;
- }
- }
- *rt2 = (ssrt *)NULL;
- return;
-}
diff --git a/lib/libss/requests.c b/lib/libss/requests.c
deleted file mode 100644
index 7aaf4f5..0000000
--- a/lib/libss/requests.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Various minor routines...
- *
- * Copyright 1987, 1988, 1989 by MIT
- *
- * For copyright information, see copyright.h.
- */
-
-#include "copyright.h"
-#include <stdio.h>
-#include "ss_internal.h"
-
-#define DECLARE(name) name(argc,argv,sci_idx)int argc,sci_idx;char **argv;
-
-/*
- * ss_self_identify -- assigned by default to the "." request
- */
-void
-DECLARE(ss_self_identify)
-{
- register ss_data *info = ss_info(sci_idx);
- printf("%s version %s\n", info->subsystem_name,
- info->subsystem_version);
-}
-
-/*
- * ss_subsystem_name -- print name of subsystem
- */
-void
-DECLARE(ss_subsystem_name)
-{
- printf("%s\n", ss_info(sci_idx)->subsystem_name);
-}
-
-/*
- * ss_subsystem_version -- print version of subsystem
- */
-void
-DECLARE(ss_subsystem_version)
-{
- printf("%s\n", ss_info(sci_idx)->subsystem_version);
-}
-
-/*
- * ss_unimplemented -- routine not implemented (should be
- * set up as (dont_list,dont_summarize))
- */
-void
-DECLARE(ss_unimplemented)
-{
- ss_perror(sci_idx, SS_ET_UNIMPLEMENTED, "");
-}
diff --git a/lib/libss/ss.h b/lib/libss/ss.h
deleted file mode 100644
index a727d8e..0000000
--- a/lib/libss/ss.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright information, see mit-sipb-copyright.h.
- */
-
-#ifndef _ss_h
-#define _ss_h __FILE__
-
-#if 0
-#include <ss/mit-sipb-copyright.h>
-#endif
-#ifndef IN_MK_CMDS
-# ifdef IN_LIBSS
-# include "ss_err.h"
-# else
-# include <ss/ss_err.h>
-# endif
-#endif
-
-extern int errno;
-
-#ifdef __STDC__
-#define __SS_CONST const
-#define __SS_PROTO (int, const char * const *, int, void *)
-#else
-#define __SS_CONST
-#define __SS_PROTO ()
-#endif
-
-typedef __SS_CONST struct _ss_request_entry {
- __SS_CONST char * __SS_CONST *command_names; /* whatever */
- void (* __SS_CONST function) __SS_PROTO; /* foo */
- __SS_CONST char * __SS_CONST info_string; /* NULL */
- int flags; /* 0 */
-} ss_request_entry;
-
-typedef __SS_CONST struct _ss_request_table {
- int version;
- ss_request_entry *requests;
-} ss_request_table;
-
-#define SS_RQT_TBL_V2 2
-
-typedef struct _ss_rp_options { /* DEFAULT VALUES */
- int version; /* SS_RP_V1 */
- void (*unknown) __SS_PROTO; /* call for unknown command */
- int allow_suspend;
- int catch_int;
-} ss_rp_options;
-
-#define SS_RP_V1 1
-
-#define SS_OPT_DONT_LIST 0x0001
-#define SS_OPT_DONT_SUMMARIZE 0x0002
-
-void ss_help __SS_PROTO;
-char *ss_current_request();
-char *ss_name();
-#ifdef __STDC__
-void ss_error (int, long, char const *, ...);
-void ss_perror (int, long, char const *);
-#else
-void ss_error ();
-void ss_perror ();
-#endif
-void ss_abort_subsystem();
-extern ss_request_table ss_std_requests;
-#endif /* _ss_h */
diff --git a/lib/libss/ss_err.et b/lib/libss/ss_err.et
deleted file mode 100644
index 80e9dfa..0000000
--- a/lib/libss/ss_err.et
+++ /dev/null
@@ -1,39 +0,0 @@
- error_table ss
-
-ec SS_ET_SUBSYSTEM_ABORTED,
- "Subsystem aborted"
-
-ec SS_ET_VERSION_MISMATCH,
- "Version mismatch"
-
-ec SS_ET_NULL_INV,
- "No current invocation"
-
-ec SS_ET_NO_INFO_DIR,
- "No info directory"
-
-ec SS_ET_COMMAND_NOT_FOUND,
- "Command not found"
-
-ec SS_ET_LINE_ABORTED,
- "Command line aborted"
-
-ec SS_ET_EOF,
- "End-of-file reached"
-
-ec SS_ET_PERMISSION_DENIED,
- "Permission denied"
-
-ec SS_ET_TABLE_NOT_FOUND,
- "Request table not found"
-
-ec SS_ET_NO_HELP_FILE,
- "No info available"
-
-ec SS_ET_ESCAPE_DISABLED,
- "Shell escapes are disabled"
-
-ec SS_ET_UNIMPLEMENTED,
- "Sorry, this request is not yet implemented"
-
- end
diff --git a/lib/libss/ss_internal.h b/lib/libss/ss_internal.h
deleted file mode 100644
index 240e6ab..0000000
--- a/lib/libss/ss_internal.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 1987, 1988 by MIT Student Information Processing Board
- *
- * For copyright information, see copyright.h.
- */
-
-#ifndef _ss_ss_internal_h
-#define _ss_ss_internal_h __FILE__
-#include <stdio.h>
-#include <string.h>
-
-#ifdef __STDC__
-
-#define PROTOTYPE(p) p
-typedef void * pointer;
-
-#else
-
-#define const
-#define volatile
-#define PROTOTYPE(p) ()
-typedef char * pointer;
-
-#endif /* not __STDC__ */
-
-#include "ss.h"
-
-#if defined(__GNUC__)
-#define LOCAL_ALLOC(x) __builtin_alloca(x)
-#define LOCAL_FREE(x)
-#else
-#if defined(vax)
-#define LOCAL_ALLOC(x) alloca(x)
-#define LOCAL_FREE(x)
-extern pointer alloca PROTOTYPE((unsigned));
-#else
-#if defined(__HIGHC__) /* Barf! */
-pragma on(alloca);
-#define LOCAL_ALLOC(x) alloca(x)
-#define LOCAL_FREE(x)
-extern pointer alloca PROTOTYPE((unsigned));
-#else
-/* no alloca? */
-#define LOCAL_ALLOC(x) malloc(x)
-#define LOCAL_FREE(x) free(x)
-#endif
-#endif
-#endif /* LOCAL_ALLOC stuff */
-
-typedef char BOOL;
-
-typedef struct _ss_abbrev_entry {
- char *name; /* abbrev name */
- char **abbrev; /* new tokens to insert */
- char beginning_of_line : 1;
-} ss_abbrev_entry;
-
-typedef struct _ss_abbrev_list {
- int n_abbrevs;
- ss_abbrev_entry *first_abbrev;
-} ss_abbrev_list;
-
-typedef struct {
-/* char *path; */
- ss_abbrev_list abbrevs[127];
-} ss_abbrev_info;
-
-typedef struct _ss_data { /* init values */
- /* this subsystem */
- char *subsystem_name;
- char *subsystem_version;
- /* current request info */
- int argc;
- char **argv; /* arg list */
- char const *current_request; /* primary name */
- /* info directory for 'help' */
- char **info_dirs;
- /* to be extracted by subroutines */
- pointer info_ptr; /* (void *) NULL */
- /* for ss_listen processing */
- char *prompt;
- ss_request_table **rqt_tables;
- ss_abbrev_info *abbrev_info;
- struct {
- unsigned char escape_disabled : 1,
- abbrevs_disabled : 1;
- } flags;
- /* to get out */
- int abort; /* exit subsystem */
- int exit_status;
-} ss_data;
-
-#define CURRENT_SS_VERSION 1
-
-#define ss_info(sci_idx) (_ss_table[sci_idx])
-#define ss_current_request(sci_idx,code_ptr) \
- (*code_ptr=0,ss_info(sci_idx)->current_request)
-void ss_unknown_function();
-void ss_delete_info_dir();
-int ss_execute_line();
-char **ss_parse();
-ss_abbrev_info *ss_abbrev_initialize PROTOTYPE((char *, int *));
-void ss_page_stdin();
-
-extern ss_data **_ss_table;
-extern char *ss_et_msgs[];
-
-#if !defined(__FreeBSD__) && !defined(__NetBSD__)
-extern pointer malloc PROTOTYPE((unsigned));
-extern pointer realloc PROTOTYPE((pointer, unsigned));
-extern pointer calloc PROTOTYPE((unsigned, unsigned));
-extern int exit PROTOTYPE((int));
-#endif
-
-#endif /* _ss_internal_h */
diff --git a/lib/libss/std_rqs.ct b/lib/libss/std_rqs.ct
deleted file mode 100644
index 500288a..0000000
--- a/lib/libss/std_rqs.ct
+++ /dev/null
@@ -1,46 +0,0 @@
- command_table ss_std_requests;
-
- request ss_self_identify, "Identify the subsystem.",
- ".",
- (dont_list, dont_summarize);
-
- request ss_help, "Display info on command or topic.",
- help;
-
- unimplemented
- ss_list_help,
- "List topics for which help is available.",
- list_help, lh;
-
- request ss_list_requests, "List available commands.",
- list_requests, lr, "?";
-
- request ss_quit, "Leave the subsystem.",
- quit, q;
-
- unimplemented
- ss_abbrev,
- "Enable/disable abbreviation processing of request lines.",
- abbrev, ab;
-
- unimplemented
- ss_execute,
- "Execute a UNIX command line.",
- execute, e;
-
- unimplemented
- ss_summarize_requests,
- "Produce a list of the most commonly used requests.",
- "?";
-
- request ss_subsystem_name,
- "Return the name of this subsystem.",
- subsystem_name,
- (dont_list);
-
- request ss_subsystem_version,
- "Return the version of this subsystem.",
- subsystem_version,
- (dont_list);
-
- end;
diff --git a/lib/libtcl/Makefile b/lib/libtcl/Makefile
deleted file mode 100644
index ae5cd2e..0000000
--- a/lib/libtcl/Makefile
+++ /dev/null
@@ -1,375 +0,0 @@
-# $Id: Makefile,v 1.24 1997/10/01 13:37:27 phk Exp $
-#
-# This file is generated automatically, do not edit it here!
-#
-# Please change src/tools/tools/tcl_bmake/mkMakefile.sh instead
-#
-# Generated by src/tools/tools/tcl_bmake/mkMakefile.sh version:
-# Id: mkMakefile.sh,v 1.26 1997/10/01 13:31:29 phk Exp
-#
-
-TCLDIST=${.CURDIR}/../../contrib/tcl
-
-.PATH: ${TCLDIST}/generic
-.PATH: ${TCLDIST}/unix
-.PATH: ${TCLDIST}/doc
-
-CFLAGS+= -I${TCLDIST}/generic
-CFLAGS+= -I${TCLDIST}/unix
-
-TCL_LIBRARY= /usr/libdata/tcl
-SHLIB_MAJOR= 80
-SHLIB_MINOR= 4
-
-LIB= tcl
-
-CFLAGS+= -DHAVE_GETCWD=1 -DNO_VALUES_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -DTCL_SHLIB_EXT=\".so\"
-CFLAGS+= -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
-CFLAGS+= -DTCL_PACKAGE_PATH=\"/usr/libdata/tcl\"
-
-LDADD+= -lm
-DPADD+= ${LIBM}
-
-SRCS= panic.c regexp.c tclAsync.c tclBasic.c tclBinary.c tclCkalloc.c \
- tclClock.c tclCmdAH.c tclCmdIL.c tclCmdMZ.c tclCompExpr.c \
- tclCompile.c tclDate.c tclEnv.c tclEvent.c tclExecute.c \
- tclFCmd.c tclFileName.c tclGet.c tclHash.c tclHistory.c \
- tclIndexObj.c tclInterp.c tclIO.c tclIOCmd.c tclIOSock.c \
- tclIOUtil.c tclLink.c tclListObj.c tclLoad.c tclMain.c \
- tclNamesp.c tclNotify.c tclObj.c tclParse.c tclPipe.c tclPkg.c \
- tclPosixStr.c tclPreserve.c tclProc.c tclStringObj.c tclTimer.c \
- tclUtil.c tclVar.c tclMtherr.c tclUnixChan.c tclUnixEvent.c \
- tclUnixFCmd.c tclUnixFile.c tclUnixPipe.c tclUnixSock.c \
- tclUnixTime.c tclUnixInit.c tclUnixNotfy.c tclLoadDl.c
-
-HEADERS=generic/patchlevel.h generic/tclInt.h generic/tclPort.h \
- generic/tclRegexp.h unix/tclUnixPort.h
-
-beforeinstall: installhdrs
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
- ${TCLDIST}/library/tclIndex ${DESTDIR}${TCL_LIBRARY}
- ( cd ${TCLDIST}/library && \
- for e in . http1.0 ; do \
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
- $$e/*.tcl ${DESTDIR}${TCL_LIBRARY}/$$e ; \
- done )
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
- ${TCLDIST}/unix/tclAppInit.c ${DESTDIR}${TCL_LIBRARY}
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \
- ${TCLDIST}/doc/man.macros ${DESTDIR}/usr/share/tmac/tcl.macros
-
-installhdrs:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
- ${TCLDIST}/generic/tcl.h ${DESTDIR}/usr/include/tcl
-.for m in ${HEADERS}
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${TCLDIST}/$m \
- ${DESTDIR}/usr/include/tcl/$m
-.endfor
-
-
-MANFILTER=sed "/\.so *man.macros/s;.*;.so /usr/share/tmac/tcl.macros;"
-
-MANn+= Tcl.n after.n append.n array.n bgerror.n binary.n break.n \
- case.n catch.n cd.n clock.n close.n concat.n continue.n eof.n \
- error.n eval.n exec.n exit.n expr.n fblocked.n fconfigure.n \
- fcopy.n file.n fileevent.n filename.n flush.n for.n foreach.n \
- format.n gets.n glob.n global.n history.n http.n if.n incr.n \
- info.n interp.n join.n lappend.n library.n lindex.n linsert.n \
- list.n llength.n load.n lrange.n lreplace.n lsearch.n lsort.n \
- namespace.n open.n package.n pid.n pkgMkIndex.n proc.n puts.n \
- pwd.n read.n regexp.n registry.n regsub.n rename.n resource.n \
- return.n safe.n scan.n seek.n set.n socket.n source.n split.n \
- string.n subst.n switch.n tclvars.n tell.n time.n trace.n \
- unknown.n unset.n update.n uplevel.n upvar.n variable.n vwait.n \
- while.n
-
-MAN3+= Tcl_AddObjErrorInfo.3 Tcl_Alloc.3 Tcl_AllowExceptions.3 \
- Tcl_AppInit.3 Tcl_GetAssocData.3 Tcl_AsyncCreate.3 \
- Tcl_BackgroundError.3 Tcl_Backslash.3 Tcl_NewBooleanObj.3 \
- Tcl_CallWhenDeleted.3 Tcl_CommandComplete.3 Tcl_Concat.3 \
- Tcl_CreateChannel.3 Tcl_CreateChannelHandler.3 \
- Tcl_CreateCloseHandler.3 Tcl_CreateCommand.3 \
- Tcl_CreateFileHandler.3 Tcl_CreateInterp.3 Tcl_CreateMathFunc.3 \
- Tcl_CreateModalTimeout.3 Tcl_CreateObjCommand.3 Tcl_IsSafe.3 \
- Tcl_CreateTimerHandler.3 Tcl_CreateTrace.3 Tcl_DStringInit.3 \
- Tcl_DetachPids.3 Tcl_DoOneEvent.3 Tcl_DoWhenIdle.3 \
- Tcl_NewDoubleObj.3 Tcl_Eval.3 Tcl_EvalObj.3 Tcl_Exit.3 \
- Tcl_ExprLong.3 Tcl_ExprLongObj.3 Tcl_FindExecutable.3 \
- Tcl_GetFile.3 Tcl_GetIndexFromObj.3 Tcl_GetInt.3 \
- Tcl_GetOpenFile.3 Tcl_GetStdChannel.3 Tcl_InitHashTable.3 \
- Tcl_NewIntObj.3 Tcl_Interp.3 Tcl_LinkVar.3 \
- Tcl_ListObjAppendList.3 Tcl_CreateEventSource.3 Tcl_ObjSetVar2.3 \
- Tcl_NewObj.3 Tcl_RegisterObjType.3 Tcl_OpenFileChannel.3 \
- Tcl_OpenTcpClient.3 Tcl_PkgRequire.3 Tcl_Preserve.3 \
- Tcl_PrintDouble.3 Tcl_RecordAndEvalObj.3 Tcl_RecordAndEval.3 \
- Tcl_RegExpMatch.3 Tcl_SetErrno.3 Tcl_SetRecursionLimit.3 \
- Tcl_SetObjResult.3 Tcl_SetVar.3 Tcl_Sleep.3 Tcl_SplitList.3 \
- Tcl_SplitPath.3 Tcl_StaticPackage.3 Tcl_StringMatch.3 \
- Tcl_NewStringObj.3 Tcl_Main.3 Tcl_TraceVar.3 \
- Tcl_TranslateFileName.3 Tcl_UpVar.3 Tcl_WrongNumArgs.3
-
-MLINKS+= Tcl_AddObjErrorInfo.3 Tcl_AddErrorInfo.3
-MLINKS+= Tcl_AddObjErrorInfo.3 Tcl_SetErrorCode.3
-MLINKS+= Tcl_AddObjErrorInfo.3 Tcl_PosixError.3
-MLINKS+= Tcl_Alloc.3 Tcl_Free.3
-MLINKS+= Tcl_Alloc.3 Tcl_Realloc.3
-MLINKS+= Tcl_GetAssocData.3 Tcl_SetAssocData.3
-MLINKS+= Tcl_GetAssocData.3 Tcl_DeleteAssocData.3
-MLINKS+= Tcl_AsyncCreate.3 Tcl_AsyncMark.3
-MLINKS+= Tcl_AsyncCreate.3 Tcl_AsyncInvoke.3
-MLINKS+= Tcl_AsyncCreate.3 Tcl_AsyncDelete.3
-MLINKS+= Tcl_NewBooleanObj.3 Tcl_SetBooleanObj.3
-MLINKS+= Tcl_NewBooleanObj.3 Tcl_GetBooleanFromObj.3
-MLINKS+= Tcl_CallWhenDeleted.3 Tcl_DontCallWhenDeleted.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_GetChannelInstanceData.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_GetChannelType.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_GetChannelName.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_GetChannelHandle.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_GetChannelMode.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_GetChannelBufferSize.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_SetDefaultTranslation.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_SetChannelBufferSize.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_NotifyChannel.3
-MLINKS+= Tcl_CreateChannel.3 Tcl_BadChannelOption.3
-MLINKS+= Tcl_CreateChannelHandler.3 Tcl_DeleteChannelHandler.3
-MLINKS+= Tcl_CreateCloseHandler.3 Tcl_DeleteCloseHandler.3
-MLINKS+= Tcl_CreateFileHandler.3 Tcl_DeleteFileHandler.3
-MLINKS+= Tcl_CreateInterp.3 Tcl_DeleteInterp.3
-MLINKS+= Tcl_CreateInterp.3 Tcl_InterpDeleted.3
-MLINKS+= Tcl_CreateModalTimeout.3 Tcl_DeleteModalTimeout.3
-MLINKS+= Tcl_CreateObjCommand.3 Tcl_DeleteCommand.3
-MLINKS+= Tcl_CreateObjCommand.3 Tcl_DeleteCommandFromToken.3
-MLINKS+= Tcl_CreateObjCommand.3 Tcl_GetCommandInfo.3
-MLINKS+= Tcl_CreateObjCommand.3 Tcl_SetCommandInfo.3
-MLINKS+= Tcl_CreateObjCommand.3 Tcl_GetCommandName.3
-MLINKS+= Tcl_IsSafe.3 Tcl_MakeSafe.3
-MLINKS+= Tcl_IsSafe.3 Tcl_CreateSlave.3
-MLINKS+= Tcl_IsSafe.3 Tcl_GetSlave.3
-MLINKS+= Tcl_IsSafe.3 Tcl_GetMaster.3
-MLINKS+= Tcl_IsSafe.3 Tcl_GetInterpPath.3
-MLINKS+= Tcl_IsSafe.3 Tcl_CreateAlias.3
-MLINKS+= Tcl_IsSafe.3 Tcl_CreateAliasObj.3
-MLINKS+= Tcl_IsSafe.3 Tcl_GetAlias.3
-MLINKS+= Tcl_IsSafe.3 Tcl_GetAliasObj.3
-MLINKS+= Tcl_IsSafe.3 Tcl_ExposeCommand.3
-MLINKS+= Tcl_IsSafe.3 Tcl_HideCommand.3
-MLINKS+= Tcl_CreateTimerHandler.3 Tcl_DeleteTimerHandler.3
-MLINKS+= Tcl_CreateTrace.3 Tcl_DeleteTrace.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringAppend.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringAppendElement.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringStartSublist.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringEndSublist.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringLength.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringValue.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringSetLength.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringFree.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringResult.3
-MLINKS+= Tcl_DStringInit.3 Tcl_DStringGetResult.3
-MLINKS+= Tcl_DetachPids.3 Tcl_ReapDetachedProcs.3
-MLINKS+= Tcl_DoWhenIdle.3 Tcl_CancelIdleCall.3
-MLINKS+= Tcl_NewDoubleObj.3 Tcl_SetDoubleObj.3
-MLINKS+= Tcl_NewDoubleObj.3 Tcl_GetDoubleFromObj.3
-MLINKS+= Tcl_Eval.3 Tcl_VarEval.3
-MLINKS+= Tcl_Eval.3 Tcl_EvalFile.3
-MLINKS+= Tcl_Eval.3 Tcl_GlobalEval.3
-MLINKS+= Tcl_EvalObj.3 Tcl_GlobalEvalObj.3
-MLINKS+= Tcl_Exit.3 Tcl_Finalize.3
-MLINKS+= Tcl_Exit.3 Tcl_CreateExitHandler.3
-MLINKS+= Tcl_Exit.3 Tcl_DeleteExitHandler.3
-MLINKS+= Tcl_ExprLong.3 Tcl_ExprDouble.3
-MLINKS+= Tcl_ExprLong.3 Tcl_ExprBoolean.3
-MLINKS+= Tcl_ExprLong.3 Tcl_ExprString.3
-MLINKS+= Tcl_ExprLongObj.3 Tcl_ExprDoubleObj.3
-MLINKS+= Tcl_ExprLongObj.3 Tcl_ExprBooleanObj.3
-MLINKS+= Tcl_ExprLongObj.3 Tcl_ExprObj.3
-MLINKS+= Tcl_GetFile.3 Tcl_FreeFile.3
-MLINKS+= Tcl_GetFile.3 Tcl_GetFileInfo.3
-MLINKS+= Tcl_GetInt.3 Tcl_GetDouble.3
-MLINKS+= Tcl_GetInt.3 Tcl_GetBoolean.3
-MLINKS+= Tcl_GetStdChannel.3 Tcl_SetStdChannel.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_DeleteHashTable.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_CreateHashEntry.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_DeleteHashEntry.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_FindHashEntry.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_GetHashValue.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_SetHashValue.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_GetHashKey.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_FirstHashEntry.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_NextHashEntry.3
-MLINKS+= Tcl_InitHashTable.3 Tcl_HashStats.3
-MLINKS+= Tcl_NewIntObj.3 Tcl_NewLongObj.3
-MLINKS+= Tcl_NewIntObj.3 Tcl_SetIntObj.3
-MLINKS+= Tcl_NewIntObj.3 Tcl_SetLongObj.3
-MLINKS+= Tcl_NewIntObj.3 Tcl_GetIntFromObj.3
-MLINKS+= Tcl_NewIntObj.3 Tcl_GetLongFromObj.3
-MLINKS+= Tcl_LinkVar.3 Tcl_UnlinkVar.3
-MLINKS+= Tcl_LinkVar.3 Tcl_UpdateLinkedVar.3
-MLINKS+= Tcl_ListObjAppendList.3 Tcl_ListObjAppendElement.3
-MLINKS+= Tcl_ListObjAppendList.3 Tcl_NewListObj.3
-MLINKS+= Tcl_ListObjAppendList.3 Tcl_SetListObj.3
-MLINKS+= Tcl_ListObjAppendList.3 Tcl_ListObjGetElements.3
-MLINKS+= Tcl_ListObjAppendList.3 Tcl_ListObjLength.3
-MLINKS+= Tcl_ListObjAppendList.3 Tcl_ListObjIndex.3
-MLINKS+= Tcl_ListObjAppendList.3 Tcl_ListObjReplace.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_DeleteEventSource.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_SetMaxBlockTime.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_QueueEvent.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_DeleteEvents.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_WaitForEvent.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_SetTimer.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_ServiceAll.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_ServiceEvent.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_GetServiceMode.3
-MLINKS+= Tcl_CreateEventSource.3 Tcl_SetServiceMode.3
-MLINKS+= Tcl_ObjSetVar2.3 Tcl_ObjGetVar2.3
-MLINKS+= Tcl_NewObj.3 Tcl_DuplicateObj.3
-MLINKS+= Tcl_NewObj.3 Tcl_IncrRefCount.3
-MLINKS+= Tcl_NewObj.3 Tcl_DecrRefCount.3
-MLINKS+= Tcl_NewObj.3 Tcl_IsShared.3
-MLINKS+= Tcl_RegisterObjType.3 Tcl_GetObjType.3
-MLINKS+= Tcl_RegisterObjType.3 Tcl_AppendAllObjTypes.3
-MLINKS+= Tcl_RegisterObjType.3 Tcl_ConvertToType.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_OpenCommandChannel.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_MakeFileChannel.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_GetChannel.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_RegisterChannel.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_UnregisterChannel.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_Close.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_Read.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_Gets.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_Write.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_Flush.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_Seek.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_Tell.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_Eof.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_InputBlocked.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_InputBuffered.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_GetChannelOption.3
-MLINKS+= Tcl_OpenFileChannel.3 Tcl_SetChannelOption.3
-MLINKS+= Tcl_OpenTcpClient.3 Tcl_MakeTcpClientChannel.3
-MLINKS+= Tcl_OpenTcpClient.3 Tcl_OpenTcpServer.3
-MLINKS+= Tcl_PkgRequire.3 Tcl_PkgProvide.3
-MLINKS+= Tcl_Preserve.3 Tcl_Release.3
-MLINKS+= Tcl_Preserve.3 Tcl_EventuallyFree.3
-MLINKS+= Tcl_RegExpMatch.3 Tcl_RegExpCompile.3
-MLINKS+= Tcl_RegExpMatch.3 Tcl_RegExpExec.3
-MLINKS+= Tcl_RegExpMatch.3 Tcl_RegExpRange.3
-MLINKS+= Tcl_SetErrno.3 Tcl_GetErrno.3
-MLINKS+= Tcl_SetObjResult.3 Tcl_GetObjResult.3
-MLINKS+= Tcl_SetObjResult.3 Tcl_SetResult.3
-MLINKS+= Tcl_SetObjResult.3 Tcl_GetStringResult.3
-MLINKS+= Tcl_SetObjResult.3 Tcl_AppendResult.3
-MLINKS+= Tcl_SetObjResult.3 Tcl_AppendElement.3
-MLINKS+= Tcl_SetObjResult.3 Tcl_ResetResult.3
-MLINKS+= Tcl_SetVar.3 Tcl_SetVar2.3
-MLINKS+= Tcl_SetVar.3 Tcl_GetVar.3
-MLINKS+= Tcl_SetVar.3 Tcl_GetVar2.3
-MLINKS+= Tcl_SetVar.3 Tcl_UnsetVar.3
-MLINKS+= Tcl_SetVar.3 Tcl_UnsetVar2.3
-MLINKS+= Tcl_SplitList.3 Tcl_Merge.3
-MLINKS+= Tcl_SplitList.3 Tcl_ScanElement.3
-MLINKS+= Tcl_SplitList.3 Tcl_ConvertElement.3
-MLINKS+= Tcl_SplitPath.3 Tcl_JoinPath.3
-MLINKS+= Tcl_SplitPath.3 Tcl_GetPathType.3
-MLINKS+= Tcl_NewStringObj.3 Tcl_SetStringObj.3
-MLINKS+= Tcl_NewStringObj.3 Tcl_GetStringFromObj.3
-MLINKS+= Tcl_NewStringObj.3 Tcl_AppendToObj.3
-MLINKS+= Tcl_NewStringObj.3 Tcl_AppendStringsToObj.3
-MLINKS+= Tcl_NewStringObj.3 Tcl_SetObjLength.3
-MLINKS+= Tcl_NewStringObj.3 TclConcatObj.3
-MLINKS+= Tcl_TraceVar.3 Tcl_TraceVar2.3
-MLINKS+= Tcl_TraceVar.3 Tcl_UntraceVar.3
-MLINKS+= Tcl_TraceVar.3 Tcl_UntraceVar2.3
-MLINKS+= Tcl_TraceVar.3 Tcl_VarTraceInfo.3
-MLINKS+= Tcl_TraceVar.3 Tcl_VarTraceInfo2.3
-MLINKS+= Tcl_UpVar.3 Tcl_UpVar2.3
-
-# Ugly, I know, but what else can I do?!?
-TCLMAN+= Tcl_AddObjErrorInfo.3 AddErrInfo.3
-TCLMAN+= Tcl_Alloc.3 Alloc.3
-TCLMAN+= Tcl_AllowExceptions.3 AllowExc.3
-TCLMAN+= Tcl_AppInit.3 AppInit.3
-TCLMAN+= Tcl_GetAssocData.3 AssocData.3
-TCLMAN+= Tcl_AsyncCreate.3 Async.3
-TCLMAN+= Tcl_BackgroundError.3 BackgdErr.3
-TCLMAN+= Tcl_Backslash.3 Backslash.3
-TCLMAN+= Tcl_NewBooleanObj.3 BoolObj.3
-TCLMAN+= Tcl_CallWhenDeleted.3 CallDel.3
-TCLMAN+= Tcl_CommandComplete.3 CmdCmplt.3
-TCLMAN+= Tcl_Concat.3 Concat.3
-TCLMAN+= Tcl_CreateChannel.3 CrtChannel.3
-TCLMAN+= Tcl_CreateChannelHandler.3 CrtChnlHdlr.3
-TCLMAN+= Tcl_CreateCloseHandler.3 CrtCloseHdlr.3
-TCLMAN+= Tcl_CreateCommand.3 CrtCommand.3
-TCLMAN+= Tcl_CreateFileHandler.3 CrtFileHdlr.3
-TCLMAN+= Tcl_CreateInterp.3 CrtInterp.3
-TCLMAN+= Tcl_CreateMathFunc.3 CrtMathFnc.3
-TCLMAN+= Tcl_CreateModalTimeout.3 CrtModalTmt.3
-TCLMAN+= Tcl_CreateObjCommand.3 CrtObjCmd.3
-TCLMAN+= Tcl_IsSafe.3 CrtSlave.3
-TCLMAN+= Tcl_CreateTimerHandler.3 CrtTimerHdlr.3
-TCLMAN+= Tcl_CreateTrace.3 CrtTrace.3
-TCLMAN+= Tcl_DStringInit.3 DString.3
-TCLMAN+= Tcl_DetachPids.3 DetachPids.3
-TCLMAN+= Tcl_DoOneEvent.3 DoOneEvent.3
-TCLMAN+= Tcl_DoWhenIdle.3 DoWhenIdle.3
-TCLMAN+= Tcl_NewDoubleObj.3 DoubleObj.3
-TCLMAN+= Tcl_Eval.3 Eval.3
-TCLMAN+= Tcl_EvalObj.3 EvalObj.3
-TCLMAN+= Tcl_Exit.3 Exit.3
-TCLMAN+= Tcl_ExprLong.3 ExprLong.3
-TCLMAN+= Tcl_ExprLongObj.3 ExprLongObj.3
-TCLMAN+= Tcl_FindExecutable.3 FindExec.3
-TCLMAN+= Tcl_GetFile.3 GetFile.3
-TCLMAN+= Tcl_GetIndexFromObj.3 GetIndex.3
-TCLMAN+= Tcl_GetInt.3 GetInt.3
-TCLMAN+= Tcl_GetOpenFile.3 GetOpnFl.3
-TCLMAN+= Tcl_GetStdChannel.3 GetStdChan.3
-TCLMAN+= Tcl_InitHashTable.3 Hash.3
-TCLMAN+= Tcl_NewIntObj.3 IntObj.3
-TCLMAN+= Tcl_Interp.3 Interp.3
-TCLMAN+= Tcl_LinkVar.3 LinkVar.3
-TCLMAN+= Tcl_ListObjAppendList.3 ListObj.3
-TCLMAN+= Tcl_CreateEventSource.3 Notifier.3
-TCLMAN+= Tcl_ObjSetVar2.3 ObjSetVar.3
-TCLMAN+= Tcl_NewObj.3 Object.3
-TCLMAN+= Tcl_RegisterObjType.3 ObjectType.3
-TCLMAN+= Tcl_OpenFileChannel.3 OpenFileChnl.3
-TCLMAN+= Tcl_OpenTcpClient.3 OpenTcp.3
-TCLMAN+= Tcl_PkgRequire.3 PkgRequire.3
-TCLMAN+= Tcl_Preserve.3 Preserve.3
-TCLMAN+= Tcl_PrintDouble.3 PrintDbl.3
-TCLMAN+= Tcl_RecordAndEvalObj.3 RecEvalObj.3
-TCLMAN+= Tcl_RecordAndEval.3 RecordEval.3
-TCLMAN+= Tcl_RegExpMatch.3 RegExp.3
-TCLMAN+= Tcl_SetErrno.3 SetErrno.3
-TCLMAN+= Tcl_SetRecursionLimit.3 SetRecLmt.3
-TCLMAN+= Tcl_SetObjResult.3 SetResult.3
-TCLMAN+= Tcl_SetVar.3 SetVar.3
-TCLMAN+= Tcl_Sleep.3 Sleep.3
-TCLMAN+= Tcl_SplitList.3 SplitList.3
-TCLMAN+= Tcl_SplitPath.3 SplitPath.3
-TCLMAN+= Tcl_StaticPackage.3 StaticPkg.3
-TCLMAN+= Tcl_StringMatch.3 StrMatch.3
-TCLMAN+= Tcl_NewStringObj.3 StringObj.3
-TCLMAN+= Tcl_Main.3 Tcl_Main.3
-TCLMAN+= Tcl_TraceVar.3 TraceVar.3
-TCLMAN+= Tcl_TranslateFileName.3 Translate.3
-TCLMAN+= Tcl_UpVar.3 UpVar.3
-TCLMAN+= Tcl_WrongNumArgs.3 WrongNumArgs.3
-
-_tcltmp=
-_tclprev=
-.for _tclpage in ${TCLMAN}
-.if !empty(_tclprev)
-_tcltmp:= ${_tcltmp} ${_tclprev} # assign with expansion
-${_tclprev}: ${TCLDIST}/doc/${_tclpage}
- cp -f ${.ALLSRC} ${.TARGET}
-_tclprev=
-.else
-_tclprev=${_tclpage}
-.endif
-.endfor
-CLEANFILES+= ${_tcltmp}
-
-.include <bsd.lib.mk>
diff --git a/lib/libtelnet/Makefile b/lib/libtelnet/Makefile
deleted file mode 100644
index eff83a8..0000000
--- a/lib/libtelnet/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-# From: @(#)Makefile 8.2 (Berkeley) 12/15/93
-# $Id$
-
-LIB= telnet
-SRCS= genget.c getent.c misc.c
-#SRCS+= auth.c encrypt.c
-#SRCS+= kerberos.c enc_des.c
-#SRCS+= kerberos5.c
-CFLAGS+= -DHAS_CGETENT
-
-.include <bsd.lib.mk>
-
diff --git a/lib/libtelnet/genget.c b/lib/libtelnet/genget.c
deleted file mode 100644
index 29c7519..0000000
--- a/lib/libtelnet/genget.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)genget.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-
-#include <ctype.h>
-
-#define LOWER(x) (isupper(x) ? tolower(x) : (x))
-/*
- * The prefix function returns 0 if *s1 is not a prefix
- * of *s2. If *s1 exactly matches *s2, the negative of
- * the length is returned. If *s1 is a prefix of *s2,
- * the length of *s1 is returned.
- */
- int
-isprefix(s1, s2)
- register char *s1, *s2;
-{
- char *os1;
- register char c1, c2;
-
- if (*s1 == '\0')
- return(-1);
- os1 = s1;
- c1 = *s1;
- c2 = *s2;
- while (LOWER(c1) == LOWER(c2)) {
- if (c1 == '\0')
- break;
- c1 = *++s1;
- c2 = *++s2;
- }
- return(*s1 ? 0 : (*s2 ? (s1 - os1) : (os1 - s1)));
-}
-
-static char *ambiguous; /* special return value for command routines */
-
- char **
-genget(name, table, stlen)
- char *name; /* name to match */
- char **table; /* name entry in table */
- int stlen;
-{
- register char **c, **found;
- register int n;
-
- if (name == 0)
- return 0;
-
- found = 0;
- for (c = table; *c != 0; c = (char **)((char *)c + stlen)) {
- if ((n = isprefix(name, *c)) == 0)
- continue;
- if (n < 0) /* exact match */
- return(c);
- if (found)
- return(&ambiguous);
- found = c;
- }
- return(found);
-}
-
-/*
- * Function call version of Ambiguous()
- */
- int
-Ambiguous(s)
- char *s;
-{
- return((char **)s == &ambiguous);
-}
diff --git a/lib/libtelnet/getent.c b/lib/libtelnet/getent.c
deleted file mode 100644
index e87bf66..0000000
--- a/lib/libtelnet/getent.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)getent.c 8.2 (Berkeley) 12/15/93";
-#endif /* not lint */
-
-#include <stdlib.h>
-
-static char *area;
-
-/*ARGSUSED*/
-int
-getent(cp, name)
-char *cp, *name;
-{
-#ifdef HAS_CGETENT
- char *dba[2];
-
- dba[0] = "/etc/gettytab";
- dba[1] = 0;
- return((cgetent(&area, dba, name) == 0) ? 1 : 0);
-#else
- return(0);
-#endif
-}
-
-#ifndef SOLARIS
-/*ARGSUSED*/
-char *
-getstr(id, cpp)
-char *id, **cpp;
-{
-# ifdef HAS_CGETENT
- char *answer;
- return((cgetstr(area, id, &answer) > 0) ? answer : 0);
-# else
- return(0);
-# endif
-}
-#endif
diff --git a/lib/libtelnet/misc-proto.h b/lib/libtelnet/misc-proto.h
deleted file mode 100644
index e5f334a..0000000
--- a/lib/libtelnet/misc-proto.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)misc-proto.h 8.1 (Berkeley) 6/4/93
- */
-
-/*
- * Copyright (C) 1990 by the Massachusetts Institute of Technology
- *
- * Export of this software from the United States of America is assumed
- * to require a specific license from the United States Government.
- * It is the responsibility of any person or organization contemplating
- * export to obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- * distribute this software and its documentation for any purpose and
- * without fee is hereby granted, 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 M.I.T. not be used in advertising or publicity pertaining
- * to distribution of the software without specific, written prior
- * permission. M.I.T. makes no representations about the suitability of
- * this software for any purpose. It is provided "as is" without express
- * or implied warranty.
- */
-
-#ifndef __MISC_PROTO__
-#define __MISC_PROTO__
-
-#if !defined(P)
-#ifdef __STDC__
-#define P(x) x
-#else
-#define P(x) ()
-#endif
-#endif
-
-void auth_encrypt_init P((char *, char *, char *, int));
-void auth_encrypt_connect P((int));
-void printd P((unsigned char *, int));
-
-/*
- * These functions are imported from the application
- */
-int net_write P((unsigned char *, int));
-void net_encrypt P((void));
-int telnet_spin P((void));
-char *telnet_getenv P((char *));
-char *telnet_gets P((char *, char *, int, int));
-#endif
diff --git a/lib/libtelnet/misc.c b/lib/libtelnet/misc.c
deleted file mode 100644
index d4242b6..0000000
--- a/lib/libtelnet/misc.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "misc.h"
-
-char *RemoteHostName;
-char *LocalHostName;
-char *UserNameRequested = 0;
-int ConnectedCount = 0;
-
- void
-auth_encrypt_init(local, remote, name, server)
- char *local;
- char *remote;
- char *name;
- int server;
-{
- RemoteHostName = remote;
- LocalHostName = local;
-#if defined(AUTHENTICATION)
- auth_init(name, server);
-#endif
- if (UserNameRequested) {
- free(UserNameRequested);
- UserNameRequested = 0;
- }
-}
-
- void
-auth_encrypt_user(name)
- char *name;
-{
- extern char *strdup();
-
- if (UserNameRequested)
- free(UserNameRequested);
- UserNameRequested = name ? strdup(name) : 0;
-}
-
- void
-auth_encrypt_connect(cnt)
- int cnt;
-{
-}
-
- void
-printd(data, cnt)
- unsigned char *data;
- int cnt;
-{
- if (cnt > 16)
- cnt = 16;
- while (cnt-- > 0) {
- printf(" %02x", *data);
- ++data;
- }
-}
diff --git a/lib/libtelnet/misc.h b/lib/libtelnet/misc.h
deleted file mode 100644
index 41ffa7f..0000000
--- a/lib/libtelnet/misc.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * Copyright (c) 1991, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)misc.h 8.1 (Berkeley) 6/4/93
- */
-
-extern char *UserNameRequested;
-extern char *LocalHostName;
-extern char *RemoteHostName;
-extern int ConnectedCount;
-extern int ReservedPort;
-
-#include "misc-proto.h"
diff --git a/lib/libtermcap/Makefile b/lib/libtermcap/Makefile
deleted file mode 100644
index 632de37..0000000
--- a/lib/libtermcap/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/4/93
-
-LIB= termcap
-SHLIB_MAJOR= 2
-SHLIB_MINOR= 1
-CFLAGS+=-DCM_N -DCM_GT -DCM_B -DCM_D -I${.CURDIR}
-SRCS= termcap.c tgoto.c tputs.c tparm.c tospeed.c
-
-MAN3= termcap.3
-MLINKS= termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \
- termcap.3 tgetstr.3 termcap.3 tgoto.3 termcap.3 tputs.3 \
- termcap.3 tparm.3 termcap.3 __set_ospeed.3
-LINKS= ${LIBDIR}/libtermcap.a ${LIBDIR}/libtermlib.a
-.if !defined(NOPIC)
-LINKS+= ${SHLIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
- ${SHLIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
-.endif
-.if !defined(NOPROFILE)
-LINKS+= ${LIBDIR}/libtermcap_p.a ${LIBDIR}/libtermlib_p.a
-.endif
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/termcap.h \
- ${DESTDIR}/usr/include
-
-# This is a hack.. Work around a major number bump that should have been
-# done differently. Back out this delta when it's time to go to 3.0 for real.
-.if !defined(NOPIC)
-afterinstall:
-.for lib in libtermcap.so libtermlib.so
- rm -f ${DESTDIR}/usr/lib/compat/${lib}.3.0
- ln -s ${SHLIBDIR}/${lib}.${SHLIB_MAJOR}.${SHLIB_MINOR} \
- ${DESTDIR}/usr/lib/compat/${lib}.3.0
- rm -f ${DESTDIR}${SHLIBDIR}/${lib}.3.0
-.endfor
-.endif
-
-.include <bsd.lib.mk>
diff --git a/lib/libtermcap/TEST/tc1.c b/lib/libtermcap/TEST/tc1.c
deleted file mode 100644
index fd0870a..0000000
--- a/lib/libtermcap/TEST/tc1.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1983, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)tc1.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/*
- * tc1 [term]
- * dummy program to test termlib.
- * gets entry, counts it, and prints it.
- */
-#include <stdio.h>
-char buf[1024];
-char *getenv();
-
-main(argc, argv) char **argv; {
- char *p;
- int rc;
-
- if (argc < 2)
- p = getenv("TERM");
- else
- p = argv[1];
- rc = tgetent(buf,p);
- printf("tgetent returns %d, len=%d, text=\n'%s'\n",rc,strlen(buf),buf);
-}
diff --git a/lib/libtermcap/TEST/tc2.c b/lib/libtermcap/TEST/tc2.c
deleted file mode 100644
index 1db9d00..0000000
--- a/lib/libtermcap/TEST/tc2.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*-
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1983, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)tc2.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/*
- * tc2 [term]
- * Dummy program to test out termlib.
- * Commands are "tcc\n" where t is type (s for string, f for flag,
- * or n for number) and cc is the name of the capability.
- */
-#include <stdio.h>
-char buf[1024];
-char *getenv(), *tgetstr();
-
-main(argc, argv) char **argv; {
- char *p, *q;
- int rc;
- char b[3], c;
- char area[200];
-
- if (argc < 2)
- p = getenv("TERM");
- else
- p = argv[1];
- rc = tgetent(buf,p);
- for (;;) {
- c = getchar();
- if (c < 0)
- exit(0);
- b[0] = getchar();
- if (b[0] < ' ')
- exit(0);
- b[1] = getchar();
- b[2] = 0;
- getchar();
- switch(c) {
- case 'f':
- printf("%s: %d\n",b,tgetflag(b));
- break;
- case 'n':
- printf("%s: %d\n",b,tgetnum(b));
- break;
- case 's':
- q = area;
- printf("%s: %s\n",b,tgetstr(b,&q));
- break;
- default:
- exit(0);
- }
- }
-}
diff --git a/lib/libtermcap/TEST/tc3.c b/lib/libtermcap/TEST/tc3.c
deleted file mode 100644
index 3935e10..0000000
--- a/lib/libtermcap/TEST/tc3.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*-
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char copyright[] =
-"@(#) Copyright (c) 1983, 1993\n\
- The Regents of the University of California. All rights reserved.\n";
-#endif /* not lint */
-
-#ifndef lint
-static char sccsid[] = "@(#)tc3.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/*
- * tc3 [term]
- * Dummy program to test out termlib. Input two numbers (row and col)
- * and it prints out the tgoto string generated.
- */
-#include <stdio.h>
-char buf[1024];
-char *getenv(), *tgetstr();
-char *rdchar();
-char *tgoto();
-char *CM;
-char cmbuff[30];
-char *x;
-char *UP;
-char *tgout;
-
-main(argc, argv) char **argv; {
- char *p;
- int rc;
- int row, col;
-
- if (argc < 2)
- p = getenv("TERM");
- else
- p = argv[1];
- rc = tgetent(buf,p);
- x = cmbuff;
- UP = tgetstr("up", &x);
- printf("UP = %x = ", UP); pr(UP); printf("\n");
- if (UP && *UP==0)
- UP = 0;
- CM = tgetstr("cm", &x);
- printf("CM = "); pr(CM); printf("\n");
- for (;;) {
- if (scanf("%d %d", &row, &col) < 2)
- exit(0);
- tgout = tgoto(CM, col, row);
- pr(tgout);
- printf("\n");
- }
-}
-
-pr(p)
-register char *p;
-{
- for (; *p; p++)
- printf("%s", rdchar(*p));
-}
-
-/*
- * rdchar() returns a readable representation of an ASCII character
- * using ^ for control, ' for meta.
- */
-#include <ctype.h>
-char *rdchar(c)
-char c;
-{
- static char ret[4];
- register char *p = ret;
-
- if ((c&0377) > 0177)
- *p++ = '\'';
- c &= 0177;
- if (!isprint(c))
- *p++ = '^';
- *p++ = (isprint(c) ? c : c^0100);
- *p = 0;
- return (ret);
-}
diff --git a/lib/libtermcap/pathnames.h b/lib/libtermcap/pathnames.h
deleted file mode 100644
index e77bab8..0000000
--- a/lib/libtermcap/pathnames.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)pathnames.h 8.1 (Berkeley) 6/4/93
- */
-
-#define _PATH_DEF ".termcap /usr/share/misc/termcap"
-#define _PATH_DEF_SEC "/usr/share/misc/termcap"
diff --git a/lib/libtermcap/termcap.3 b/lib/libtermcap/termcap.3
deleted file mode 100644
index d6d2656..0000000
--- a/lib/libtermcap/termcap.3
+++ /dev/null
@@ -1,290 +0,0 @@
-.\" Copyright (c) 1980, 1991, 1993
-.\" The Regents of the University of California. All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" @(#)termcap.3 8.2 (Berkeley) 12/11/93
-.\"
-.Dd December 11, 1993
-.Dt TERMCAP 3
-.Os BSD 4
-.Sh NAME
-.Nm tgetent ,
-.Nm tgetnum ,
-.Nm tgetflag ,
-.Nm tgetstr ,
-.Nm tgoto ,
-.Nm tputs ,
-.Nm tparm ,
-.Nm __set_ospeed
-.Nd terminal independent operation routines
-.Sh SYNOPSIS
-.Fd #include <termcap.h>
-.Vt char PC;
-.Vt char *BC;
-.Vt char *UP;
-.Vt short ospeed;
-.Ft int
-.Fn tgetent "char *bp" "const char *name"
-.Ft int
-.Fn tgetnum "const char *id"
-.Ft int
-.Fn tgetflag "const char *id"
-.Ft char *
-.Fn tgetstr "const char *id" "char **area"
-.Ft char *
-.Fn tgoto "const char *cm" "int destcol" "int destline"
-.Ft int
-.Fn tputs "const char *cp" "int affcnt" "int (*outc)(int)"
-.Ft char *
-.Fn tparm "const char *cp" "..."
-.Ft void
-.Fn __set_ospeed "long speed"
-.Sh DESCRIPTION
-These functions extract and use capabilities from a terminal capability data
-base, usually
-.Pa /usr/share/misc/termcap ,
-the format of which is described in
-.Xr termcap 5 .
-These are low level routines;
-see
-.Xr curses 3
-for a higher level package.
-.Pp
-The
-.Fn tgetent
-function
-extracts the entry for terminal
-.Fa name
-into the buffer at
-.Fa bp .
-The
-.Fa bp
-argument
-should be a character buffer of size
-1024 and must be retained through all subsequent calls to
-.Fn tgetnum ,
-.Fn tgetflag ,
-and
-.Fn tgetstr .
-The
-.Fn tgetent
-function
-returns \-1 if none of the
-.Nm termcap
-data base files could be opened,
-0 if the terminal name given does not have an entry,
-and 1 if all goes well.
-It will look in the environment for a
-.Ev TERMCAP
-variable.
-If found, and the value does not begin with a slash,
-and the terminal type
-.Fa name
-is the same as the environment string
-.Ev TERM ,
-the
-.Ev TERMCAP
-string is used instead of reading a
-.Nm termcap
-file.
-If it does begin with a slash, the string is used as a path name
-of the
-.Nm termcap
-file to search.
-If
-.Ev TERMCAP
-does not begin with a slash and
-.Fa name
-is different from
-.Ev TERM ,
-.Fn tgetent
-searches the files
-.Pa $HOME/.termcap
-and
-.Pa /usr/share/misc/termcap ,
-in that order, unless the environment variable
-.Ev TERMPATH
-exists,
-in which case it specifies a list of file pathnames
-(separated by spaces or colons) to be searched instead.
-Whenever multiple files are searched and a
-.Sy tc
-field occurs in the requested entry, the entry it names must be found
-in the same file or one of the succeeding files.
-This can speed up entry into programs that call
-.Fn tgetent ,
-as well as help debug new terminal descriptions
-or make one for your terminal if you can't write the file
-.Pa /usr/share/misc/termcap .
-.Pp
-The
-.Fn tgetnum
-function
-gets the numeric value of capability
-.Fa id ,
-returning \-1 if it is not given for the terminal.
-The
-.Fn tgetflag
-function
-returns 1 if the specified capability is present in
-the terminal's entry, 0 if it is not.
-The
-.Fn tgetstr
-function
-returns the string value of the capability
-.Fa id ,
-places it in the buffer at
-.Fa area ,
-and advances the
-.Fa area
-pointer.
-It decodes the abbreviations for this field described in
-.Xr termcap 5 ,
-except for cursor addressing and padding information.
-The
-.Fn tgetstr
-function
-returns
-.Dv NULL
-if the capability was not found.
-.Pp
-The
-.Fn tgoto
-function
-returns a cursor addressing string decoded from
-.Fa cm
-to go to column
-.Fa destcol
-in line
-.Fa destline .
-It uses the external variables
-.Va UP
-(from the
-.Sy up
-capability)
-and
-.Va BC
-(if
-.Sy bc
-is given rather than
-.Sy bs )
-if necessary to avoid placing
-.Sy \en ,
-.Sy ^D
-or
-.Sy ^@
-in
-the returned string.
-(Programs which call
-.Fn tgoto
-should be sure to turn off the
-.Dv XTABS
-bit(s),
-since
-.Fn tgoto
-may now output a tab.
-Note that programs using termcap should in general turn off
-.Dv XTABS
-anyway since some terminals use control-I for other functions,
-such as nondestructive space.)
-If a
-.Sy %
-sequence is given which is not understood, then
-.Fn tgoto
-returns
-.Pq Dv OOPS .
-.Pp
-The
-.Fn tputs
-function
-decodes the leading padding information of the string
-.Fa cp ;
-.Fa affcnt
-gives the number of lines affected by the operation, or 1 if this is
-not applicable,
-.Fa outc
-is a routine which is called with each character in turn.
-The external variable
-.Va PC
-should contain a pad character to be used (from the
-.SY pc
-capability)
-if a null
-.Pq Sy ^@
-is inappropriate.
-The external variable
-.Va ospeed
-should contain the output speed of the terminal as encoded by
-.Xr stty 3 .
-The
-.Fn __set_ospeed
-function converts the speed in cps
-.Fa speed
-to the closest
-.Xr stty 3
-encoded speed and stores the result in
-.Va ospeed .
-.Pp
-The
-.Fn tparm
-function
-instantiates the string
-.Fa cp
-with the given parameters.
-A pointer is returned which points to
-the result of
-.Fa cp
-with the parameters applied.
-If a
-.Sy %
-sequence is given which is not understood, then
-.Fn tparm
-returns
-.Pq Dv OOPS .
-.Sh FILES
-.Bl -tag -width /usr/share/misc/termcap -compact
-.It Pa /usr/lib/libtermcap.a
-.Fl l Ar ltermcap
-library (also known as
-.Fl l Ar ltermlib )
-.It Pa /usr/share/misc/termcap
-standard terminal capability data base
-.It Pa $HOME/.termcap
-user's terminal capability data base
-.El
-.Sh SEE ALSO
-.Xr ex 1 ,
-.Xr curses 3 ,
-.Xr termcap 5
-.Sh HISTORY
-The
-.Nm
-functions appeared in
-.Bx 4.0 .
diff --git a/lib/libtermcap/termcap.c b/lib/libtermcap/termcap.c
deleted file mode 100644
index 0428a45..0000000
--- a/lib/libtermcap/termcap.c
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * Copyright (c) 1980, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)termcap.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#define PBUFSIZ 512 /* max length of filename path */
-#define PVECSIZ 32 /* max number of names in path */
-#define TBUFSIZ 1024 /* max length of tgetent buffer */
-
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <termios.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/syscall.h>
-#include "termcap.h"
-#include "pathnames.h"
-
-/*
- * termcap - routines for dealing with the terminal capability data base
- *
- * BUG: Should use a "last" pointer in tbuf, so that searching
- * for capabilities alphabetically would not be a n**2/2
- * process when large numbers of capabilities are given.
- * Note: If we add a last pointer now we will screw up the
- * tc capability. We really should compile termcap.
- *
- * Essentially all the work here is scanning and decoding escapes
- * in string capabilities. We don't use stdio because the editor
- * doesn't, and because living w/o it is not hard.
- */
-
-static char *tbuf; /* termcap buffer */
-
-static int use_issetugid = 1; /* 0 = not present, 1 = try it, 2 = exists */
-
-/*
- * Get an entry for terminal name in buffer bp from the termcap file.
- */
-int
-tgetent(char *bp, const char *name)
-{
- register char *p;
- register char *cp;
- char *dummy;
- char **fname;
- char *home;
- int i;
- char pathbuf[PBUFSIZ]; /* holds raw path of filenames */
- char *pathvec[PVECSIZ]; /* to point to names in pathbuf */
- char **pvec; /* holds usable tail of path vector */
- char *termpath;
- struct termios tty;
-
- dummy = NULL;
- fname = pathvec;
- pvec = pathvec;
- tbuf = bp;
- p = pathbuf;
- cp = getenv("TERMCAP");
- /*
- * TERMCAP can have one of two things in it. It can be the
- * name of a file to use instead of /etc/termcap. In this
- * case it better start with a "/". Or it can be an entry to
- * use so we don't have to read the file. In this case it
- * has to already have the newlines crunched out. If TERMCAP
- * does not hold a file name then a path of names is searched
- * instead. The path is found in the TERMPATH variable, or
- * becomes "$HOME/.termcap /etc/termcap" if no TERMPATH exists.
- */
- if (!cp || *cp != '/') { /* no TERMCAP or it holds an entry */
- if ( (termpath = getenv("TERMPATH")) )
- strncpy(pathbuf, termpath, PBUFSIZ);
- else {
- if ( (home = getenv("HOME")) ) {/* set up default */
- strncpy(pathbuf, home, PBUFSIZ - 1); /* $HOME first */
- pathbuf[PBUFSIZ - 2] = '\0'; /* -2 because we add a slash */
- p += strlen(pathbuf); /* path, looking in */
- *p++ = '/';
- } /* if no $HOME look in current directory */
- strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf));
- }
- }
- else /* user-defined name in TERMCAP */
- strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */
- pathbuf[PBUFSIZ - 1] = '\0';
-
-#ifdef SYS_issetugid
- /*
- * This stuff is to try and detect the presence of the issetugid()
- * syscall without breaking dynamic linking during compiles.. Sigh.
- */
-othersyscall:
- if (use_issetugid) {
- struct sigaction sa, osa;
- int sigsys_installed = 0;
- int unsafe;
-
- if (use_issetugid == 1) {
- bzero(&sa, sizeof(sa));
- sa.sa_handler = SIG_IGN;
- if (sigaction(SIGSYS, &sa, &osa) >= 0)
- sigsys_installed = 1;
- }
- errno = 0;
- unsafe = syscall(SYS_issetugid);
- if (sigsys_installed == 1) {
- int oerrno = errno;
- sigaction(SIGSYS, &osa, NULL);
- errno = oerrno;
- }
- if (errno == ENOSYS || errno == EINVAL) {
- use_issetugid = 0;
- goto othersyscall;
- } else if (sigsys_installed == 1)
- sigsys_installed = 2;
- if (unsafe)
- strcpy(pathbuf, _PATH_DEF_SEC);
- } else
-#endif /* SYS_issetugid */
- /* issetugid() not in kernel or undefined - try second best */
- if (getuid() != geteuid() || getgid() != getegid())
- strcpy(pathbuf, _PATH_DEF_SEC);
-
- *fname++ = pathbuf; /* tokenize path into vector of names */
- while (*++p)
- if (*p == ' ' || *p == ':') {
- *p = '\0';
- while (*++p)
- if (*p != ' ' && *p != ':')
- break;
- if (*p == '\0')
- break;
- *fname++ = p;
- if (fname >= pathvec + PVECSIZ) {
- fname--;
- break;
- }
- }
- *fname = (char *) 0; /* mark end of vector */
- if (cp && *cp && *cp != '/')
- if (cgetset(cp) < 0)
- return(-2);
-
- i = cgetent(&dummy, pathvec, (char *)name);
-
- if (i == 0) {
- char *pd, *ps, *tok, *s, *tcs;
- size_t len;
-
- pd = bp;
- ps = dummy;
- if ((tok = strchr(ps, ':')) == NULL) {
- len = strlen(ps);
- if (len >= TBUFSIZ)
- i = -1;
- else
- strcpy(pd, ps);
- goto done;
- }
- len = tok - ps + 1;
- if (pd + len + 1 - bp >= TBUFSIZ) {
- i = -1;
- goto done;
- }
- memcpy(pd, ps, len);
- ps += len;
- pd += len;
- *pd = '\0';
- tcs = pd - 1;
- for (;;) {
- while ((tok = strsep(&ps, ":")) != NULL &&
- (*tok == '\0' || *tok == '\\' || !isgraph(*tok)))
- ;
- if (tok == NULL)
- break;
- for (s = tcs; s != NULL && s[1] != '\0'; s = strchr(s, ':')) {
- s++;
- if (s[0] == tok[0] && s[1] == tok[1])
- goto skip_it;
- }
- len = strlen(tok);
- if (pd + len + 1 - bp >= TBUFSIZ) {
- i = -1;
- break;
- }
- memcpy(pd, tok, len);
- pd += len;
- *pd++ = ':';
- *pd = '\0';
- skip_it: ;
- }
- }
-done:
- if ( i == 0
- && ( tcgetattr(STDERR_FILENO, &tty) != -1
- || tcgetattr(STDOUT_FILENO, &tty) != -1
- )
- )
- __set_ospeed(cfgetospeed(&tty));
- if (dummy)
- free(dummy);
- /* no tc reference loop return code in libterm XXX */
- if (i == -3)
- return(-1);
- return(i + 1);
-}
-
-/*
- * Return the (numeric) option id.
- * Numeric options look like
- * li#80
- * i.e. the option string is separated from the numeric value by
- * a # character. If the option is not found we return -1.
- * Note that we handle octal numbers beginning with 0.
- */
-int
-tgetnum(const char *id)
-{
- long num;
-
- if (cgetnum(tbuf, (char *)id, &num) == 0)
- return(num);
- else
- return(-1);
-}
-
-/*
- * Handle a flag option.
- * Flag options are given "naked", i.e. followed by a : or the end
- * of the buffer. Return 1 if we find the option, or 0 if it is
- * not given.
- */
-int
-tgetflag(const char *id)
-{
- return(cgetcap(tbuf, (char *)id, ':') != NULL);
-}
-
-/*
- * Get a string valued option.
- * These are given as
- * cl=^Z
- * Much decoding is done on the strings, and the strings are
- * placed in area, which is a ref parameter which is updated.
- * No checking on area overflow.
- */
-char *
-tgetstr(const char *id, char **area)
-{
- char ids[3];
- char *s;
- int i;
-
- /*
- * XXX
- * This is for all the boneheaded programs that relied on tgetstr
- * to look only at the first 2 characters of the string passed...
- */
- *ids = *id;
- ids[1] = id[1];
- ids[2] = '\0';
-
- if ((i = cgetstr(tbuf, ids, &s)) < 0)
- return NULL;
-
- strcpy(*area, s);
- *area += i + 1;
- return(s);
-}
diff --git a/lib/libtermcap/termcap.h b/lib/libtermcap/termcap.h
deleted file mode 100644
index 38345d6..0000000
--- a/lib/libtermcap/termcap.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 1994,1995 by Andrey A. Chernov, Moscow, Russia.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/* $Id: termcap.h,v 1.10 1997/02/22 15:08:12 peter Exp $ */
-
-#ifndef _TERMCAP_H_
-#define _TERMCAP_H_
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-extern char PC, *UP, *BC;
-extern short ospeed;
-
-extern int tgetent __P((char *, const char *));
-extern int tgetflag __P((const char *));
-extern int tgetnum __P((const char *));
-extern char *tgetstr __P((const char *, char **));
-
-extern int tputs __P((const char *, int, int (*)(int)));
-
-extern char *tgoto __P((const char *, int, int));
-extern char *tparm __P((const char *, ...));
-
-extern void __set_ospeed __P((long speed));
-
-__END_DECLS
-
-#endif /* _TERMCAP_H_ */
diff --git a/lib/libtermcap/tgoto.c b/lib/libtermcap/tgoto.c
deleted file mode 100644
index 4088fa5..0000000
--- a/lib/libtermcap/tgoto.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (c) 1980, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)tgoto.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <string.h>
-#include "termcap.h"
-
-#define CTRL(c) ((c) & 037)
-
-#define MAXRETURNSIZE 64
-
-char *UP;
-char *BC;
-
-/*
- * Routine to perform cursor addressing.
- * CM is a string containing printf type escapes to allow
- * cursor addressing. We start out ready to print the destination
- * line, and switch each time we print row or column.
- * The following escapes are defined for substituting row/column:
- *
- * %d as in printf
- * %2 like %2d
- * %3 like %3d
- * %. gives %c hacking special case characters
- * %+x like %c but adding x first
- *
- * The codes below affect the state but don't use up a value.
- *
- * %>xy if value > x add y
- * %r reverses row/column
- * %i increments row/column (for one origin indexing)
- * %% gives %
- * %B BCD (2 decimal digits encoded in one byte)
- * %D Delta Data (backwards bcd)
- *
- * all other characters are ``self-inserting''.
- */
-char *
-tgoto(const char *CM, int destcol, int destline)
-{
- static char result[MAXRETURNSIZE];
- static char added[10];
- const char *cp = CM;
- register char *dp = result;
- register int c;
- int oncol = 0;
- register int which = destline;
-
- if (cp == 0) {
-toohard:
- /*
- * ``We don't do that under BOZO's big top''
- */
- return ("OOPS");
- }
- added[0] = 0;
- while ( (c = *cp++) ) {
- if (c != '%') {
- if (dp >= &result[MAXRETURNSIZE])
- return ("OVERFLOW");
- *dp++ = c;
- continue;
- }
- switch (c = *cp++) {
-
-#ifdef CM_N
- case 'n':
- destcol ^= 0140;
- destline ^= 0140;
- goto setwhich;
-#endif
-
- case 'd':
- if (which < 10)
- goto one;
- if (which < 100)
- goto two;
- /* fall into... */
-
- case '3':
- if (dp >= &result[MAXRETURNSIZE])
- return ("OVERFLOW");
- *dp++ = (which / 100) | '0';
- which %= 100;
- /* fall into... */
-
- case '2':
-two:
- if (dp >= &result[MAXRETURNSIZE])
- return ("OVERFLOW");
- *dp++ = which / 10 | '0';
-one:
- if (dp >= &result[MAXRETURNSIZE])
- return ("OVERFLOW");
- *dp++ = which % 10 | '0';
-swap:
- oncol = 1 - oncol;
-setwhich:
- which = oncol ? destcol : destline;
- continue;
-
-#ifdef CM_GT
- case '>':
- if (which > *cp++)
- which += *cp++;
- else
- cp++;
- continue;
-#endif
-
- case '+':
- which += *cp++;
- /* fall into... */
-
- case '.':
-casedot:
- /*
- * This code is worth scratching your head at for a
- * while. The idea is that various weird things can
- * happen to nulls, EOT's, tabs, and newlines by the
- * tty driver, arpanet, and so on, so we don't send
- * them if we can help it.
- *
- * Tab is taken out to get Ann Arbors to work, otherwise
- * when they go to column 9 we increment which is wrong
- * because bcd isn't continuous. We should take out
- * the rest too, or run the thing through more than
- * once until it doesn't make any of these, but that
- * would make termlib (and hence pdp-11 ex) bigger,
- * and also somewhat slower. This requires all
- * programs which use termlib to stty tabs so they
- * don't get expanded. They should do this anyway
- * because some terminals use ^I for other things,
- * like nondestructive space.
- */
- if (which == 0 || which == CTRL('d') || /* which == '\t' || */ which == '\n') {
- if (oncol || UP) /* Assumption: backspace works */
- /*
- * Loop needed because newline happens
- * to be the successor of tab.
- */
- do {
- const char *extra;
-
- extra = oncol ? (BC ? BC : "\b") : UP;
- if (strlen(added) + strlen(extra) >= 10)
- return ("OVERFLOW");
- strcat(added, extra);
- which++;
- } while (which == '\n');
- }
- if (dp >= &result[MAXRETURNSIZE])
- return ("OVERFLOW");
- *dp++ = which;
- goto swap;
-
- case 'r':
- oncol = 1;
- goto setwhich;
-
- case 'i':
- destcol++;
- destline++;
- which++;
- continue;
-
- case '%':
- if (dp >= &result[MAXRETURNSIZE])
- return ("OVERFLOW");
- *dp++ = c;
- continue;
-
-#ifdef CM_B
- case 'B':
- which = (which/10 << 4) + which%10;
- continue;
-#endif
-
-#ifdef CM_D
- case 'D':
- which = which - 2 * (which%16);
- continue;
-#endif
-
- default:
- goto toohard;
- }
- }
- if (strlen(added) >= &result[MAXRETURNSIZE] - dp)
- return ("OVERFLOW");
- strcpy(dp, added);
- return (result);
-}
diff --git a/lib/libtermcap/tospeed.c b/lib/libtermcap/tospeed.c
deleted file mode 100644
index dd2026a..0000000
--- a/lib/libtermcap/tospeed.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <termios.h>
-#include "termcap.h"
-
-static struct stable {
- speed_t speed;
- short code;
-} table[] = {
- {B115200,17},
- {B57600, 16},
- {B38400, 15},
- {B19200, 14},
- {B9600, 13},
- {B4800, 12},
- {B2400, 11},
- {B1800, 10},
- {B1200, 9},
- {B600, 8},
- {B300, 7},
- {B200, 6},
- {B150, 5},
- {B134, 4},
- {B110, 3},
- {B75, 2},
- {B50, 1},
- {B0, 0},
- {-1, -1}
-};
-
-void __set_ospeed(speed_t speed)
-{
- struct stable *stable;
-
- if (speed == B0) {
- ospeed = 0;
- return;
- }
- for (stable = table; stable->speed > B0; stable++) {
- /* nearest one, rounded down */
- if (stable->speed <= speed) {
- ospeed = stable->code;
- return;
- }
- }
- ospeed = 1; /* 50, min and not hangup */
-}
-
diff --git a/lib/libtermcap/tparm.c b/lib/libtermcap/tparm.c
deleted file mode 100644
index 6a537ce..0000000
--- a/lib/libtermcap/tparm.c
+++ /dev/null
@@ -1,753 +0,0 @@
-/*
- * tparm.c
- *
- * By Ross Ridge
- * Public Domain
- * 92/02/01 07:30:36
- *
- */
-
-#include <ctype.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include "termcap.h"
-
-#ifdef USE_SCCS_IDS
-static const char SCCSid[] = "@(#) mytinfo tparm.c 3.2 92/02/01 public domain, By Ross Ridge";
-#endif
-
-#ifndef MAX_PUSHED
-#define MAX_PUSHED 32
-#endif
-
-#define ARG 1
-#define NUM 2
-
-#define INTEGER 1
-#define STRING 2
-
-#define MAX_LINE 640
-
-typedef void* anyptr;
-
-typedef struct stack_str {
- int type;
- int argnum;
- int value;
-} stack;
-
-static stack S[MAX_PUSHED];
-static stack vars['z'-'a'+1];
-static int pos = 0;
-
-static struct arg_str {
- int type;
- int integer;
- char *string;
-} arg_list[10];
-
-static int argcnt;
-
-static va_list tparm_args;
-
-static int
-pusharg(arg)
-int arg; {
- if (pos == MAX_PUSHED)
- return 1;
- S[pos].type = ARG;
- S[pos++].argnum = arg;
- return 0;
-}
-
-static int
-pushnum(num)
-int num; {
- if (pos == MAX_PUSHED)
- return 1;
- S[pos].type = NUM;
- S[pos++].value = num;
- return 0;
-}
-
-/* VARARGS2 */
-static int
-getarg(argnum, type, p)
-int argnum, type;
-anyptr p; {
- while (argcnt < argnum) {
- arg_list[argcnt].type = INTEGER;
- arg_list[argcnt++].integer = (int) va_arg(tparm_args, int);
- }
- if (argcnt > argnum) {
- if (arg_list[argnum].type != type)
- return 1;
- else if (type == STRING)
- *(char **)p = arg_list[argnum].string;
- else
- *(int *)p = arg_list[argnum].integer;
- } else {
- arg_list[argcnt].type = type;
- if (type == STRING)
- *(char **)p = arg_list[argcnt++].string
- = (char *) va_arg(tparm_args, char *);
- else
- *(int *)p = arg_list[argcnt++].integer = (int) va_arg(tparm_args, int);
- }
- return 0;
-}
-
-
-static int
-popstring(str)
-char **str; {
- if (pos-- == 0)
- return 1;
- if (S[pos].type != ARG)
- return 1;
- return(getarg(S[pos].argnum, STRING, (anyptr) str));
-}
-
-static int
-popnum(num)
-int *num; {
- if (pos-- == 0)
- return 1;
- switch (S[pos].type) {
- case ARG:
- return (getarg(S[pos].argnum, INTEGER, (anyptr) num));
- case NUM:
- *num = S[pos].value;
- return 0;
- }
- return 1;
-}
-
-static int
-cvtchar(sp, c)
-register char *sp, *c; {
- switch(*sp) {
- case '\\':
- switch(*++sp) {
- case '\'':
- case '$':
- case '\\':
- case '%':
- *c = *sp;
- return 2;
- case '\0':
- *c = '\\';
- return 1;
- case '0':
- if (sp[1] == '0' && sp[2] == '0') {
- *c = '\0';
- return 4;
- }
- *c = '\200'; /* '\0' ???? */
- return 2;
- default:
- *c = *sp;
- return 2;
- }
- default:
- *c = *sp;
- return 1;
- }
-}
-
-static int termcap;
-
-/* sigh... this has got to be the ugliest code I've ever written.
- Trying to handle everything has its cost, I guess.
-
- It actually isn't to hard to figure out if a given % code is supposed
- to be interpeted with its termcap or terminfo meaning since almost
- all terminfo codes are invalid unless something has been pushed on
- the stack and termcap strings will never push things on the stack
- (%p isn't used by termcap). So where we have a choice we make the
- decision by wether or not somthing has been pushed on the stack.
- The static variable termcap keeps track of this; it starts out set
- to 1 and is incremented as each argument processed by a termcap % code,
- however if something is pushed on the stack it's set to 0 and the
- rest of the % codes are interpeted as terminfo % codes. Another way
- of putting it is that if termcap equals one we haven't decided either
- way yet, if it equals zero we're looking for terminfo codes, and if
- its greater than 1 we're looking for termcap codes.
-
- Terminfo % codes:
-
- %% output a '%'
- %[[:][-+# ][width][.precision]][doxXs]
- output pop according to the printf format
- %c output pop as a char
- %'c' push character constant c.
- %{n} push decimal constant n.
- %p[1-9] push paramter [1-9]
- %g[a-z] push variable [a-z]
- %P[a-z] put pop in variable [a-z]
- %l push the length of pop (a string)
- %+ add pop to pop and push the result
- %- subtract pop from pop and push the result
- %* multiply pop and pop and push the result
- %& bitwise and pop and pop and push the result
- %| bitwise or pop and pop and push the result
- %^ bitwise xor pop and pop and push the result
- %~ push the bitwise not of pop
- %= compare if pop and pop are equal and push the result
- %> compare if pop is less than pop and push the result
- %< compare if pop is greater than pop and push the result
- %A logical and pop and pop and push the result
- %O logical or pop and pop and push the result
- %! push the logical not of pop
- %? condition %t if_true [%e if_false] %;
- if condtion evaulates as true then evaluate if_true,
- else evaluate if_false. elseif's can be done:
-%? cond %t true [%e cond2 %t true2] ... [%e condN %t trueN] [%e false] %;
- %i add one to parameters 1 and 2. (ANSI)
-
- Termcap Codes:
-
- %% output a %
- %. output parameter as a character
- %d output parameter as a decimal number
- %2 output parameter in printf format %02d
- %3 output parameter in printf format %03d
- %+x add the character x to parameter and output it as a character
-(UW) %-x subtract parameter FROM the character x and output it as a char
-(UW) %ax add the character x to parameter
-(GNU) %a[+*-/=][cp]x
- GNU arithmetic.
-(UW) %sx subtract parameter FROM the character x
- %>xy if parameter > character x then add character y to parameter
- %B convert to BCD (parameter = (parameter/10)*16 + parameter%16)
- %D Delta Data encode (parameter = parameter - 2*(paramter%16))
- %i increment the first two parameters by one
- %n xor the first two parameters by 0140
-(GNU) %m xor the first two parameters by 0177
- %r swap the first two parameters
-(GNU) %b backup to previous parameter
-(GNU) %f skip this parameter
-
- Note the two definitions of %a, the GNU defintion is used if the characters
- after the 'a' are valid, otherwise the UW definition is used.
-
- (GNU) used by GNU Emacs termcap libraries
- (UW) used by the University of Waterloo (MFCF) termcap libraries
-
-*/
-
-char *tparm(const char *str, ...) {
- static char OOPS[] = "OOPS";
- static char buf[MAX_LINE];
- register const char *sp;
- register char *dp;
- register char *fmt;
- char conv_char;
- char scan_for;
- int scan_depth = 0, if_depth;
- static int i, j;
- static char *s, c;
- char fmt_buf[MAX_LINE];
- char sbuf[MAX_LINE];
-
- va_start(tparm_args, str);
-
- sp = str;
- dp = buf;
- scan_for = 0;
- if_depth = 0;
- argcnt = 0;
- pos = 0;
- termcap = 1;
- while(*sp != '\0') {
- switch(*sp) {
- case '\\':
- if (scan_for) {
- if (*++sp != '\0')
- sp++;
- break;
- }
- *dp++ = *sp++;
- if (*sp != '\0')
- *dp++ = *sp++;
- break;
- case '%':
- sp++;
- if (scan_for) {
- if (*sp == scan_for && if_depth == scan_depth) {
- if (scan_for == ';')
- if_depth--;
- scan_for = 0;
- } else if (*sp == '?')
- if_depth++;
- else if (*sp == ';') {
- if (if_depth == 0)
- return OOPS;
- else
- if_depth--;
- }
- sp++;
- break;
- }
- fmt = NULL;
- switch(*sp) {
- case '%':
- *dp++ = *sp++;
- break;
- case '+':
- if (!termcap) {
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i += j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- }
- ;/* FALLTHROUGH */
- case 'C':
- if (*sp == 'C') {
- if (getarg(termcap - 1, INTEGER, &i))
- return OOPS;
- if (i >= 96) {
- i /= 96;
- if (i == '$')
- *dp++ = '\\';
- *dp++ = i;
- }
- }
- fmt = "%c";
- /* FALLTHROUGH */
- case 'a':
- if (!termcap)
- return OOPS;
- if (getarg(termcap - 1, INTEGER, (anyptr) &i))
- return OOPS;
- if (*++sp == '\0')
- return OOPS;
- if ((sp[1] == 'p' || sp[1] == 'c')
- && sp[2] != '\0' && fmt == NULL) {
- /* GNU aritmitic parameter, what they
- realy need is terminfo. */
- int val, lc;
- if (sp[1] == 'p'
- && getarg(termcap - 1 + sp[2] - '@',
- INTEGER, (anyptr) &val))
- return OOPS;
- if (sp[1] == 'c') {
- lc = cvtchar(sp + 2, &c) + 2;
- /* Mask out 8th bit so \200 can be
- used for \0 as per GNU doc's */
- val = c & 0177;
- } else
- lc = 2;
- switch(sp[0]) {
- case '=':
- break;
- case '+':
- val = i + val;
- break;
- case '-':
- val = i - val;
- break;
- case '*':
- val = i * val;
- break;
- case '/':
- val = i / val;
- break;
- default:
- /* Not really GNU's %a after all... */
- lc = cvtchar(sp, &c);
- val = c + i;
- break;
- }
- arg_list[termcap - 1].integer = val;
- sp += lc;
- break;
- }
- sp += cvtchar(sp, &c);
- arg_list[termcap - 1].integer = c + i;
- if (fmt == NULL)
- break;
- sp--;
- /* FALLTHROUGH */
- case '-':
- if (!termcap) {
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i -= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- }
- fmt = "%c";
- /* FALLTHROUGH */
- case 's':
- if (termcap && (fmt == NULL || *sp == '-')) {
- if (getarg(termcap - 1, INTEGER, &i))
- return OOPS;
- if (*++sp == '\0')
- return OOPS;
- sp += cvtchar(sp, &c);
- arg_list[termcap - 1].integer = c - i;
- if (fmt == NULL)
- break;
- sp--;
- }
- if (!termcap)
- return OOPS;
- ;/* FALLTHROUGH */
- case '.':
- if (termcap && fmt == NULL)
- fmt = "%c";
- ;/* FALLTHROUGH */
- case 'd':
- if (termcap && fmt == NULL)
- fmt = "%d";
- ;/* FALLTHROUGH */
- case '2':
- if (termcap && fmt == NULL)
- fmt = "%02d";
- ;/* FALLTHROUGH */
- case '3':
- if (termcap && fmt == NULL)
- fmt = "%03d";
- ;/* FALLTHROUGH */
- case ':': case ' ': case '#': case 'u':
- case 'x': case 'X': case 'o': case 'c':
- case '0': case '1': case '4': case '5':
- case '6': case '7': case '8': case '9':
- if (fmt == NULL) {
- if (termcap)
- return OOPS;
- if (*sp == ':')
- sp++;
- fmt = fmt_buf;
- *fmt++ = '%';
- while(*sp != 's' && *sp != 'x' && *sp != 'X' && *sp != 'd' && *sp != 'o' && *sp != 'c' && *sp != 'u') {
- if (*sp == '\0')
- return OOPS;
- *fmt++ = *sp++;
- }
- *fmt++ = *sp;
- *fmt = '\0';
- fmt = fmt_buf;
- }
- conv_char = fmt[strlen(fmt) - 1];
- if (conv_char == 's') {
- if (popstring(&s))
- return OOPS;
- sprintf(sbuf, fmt, s);
- } else {
- if (termcap) {
- if (getarg(termcap++ - 1,
- INTEGER, &i))
- return OOPS;
- } else
- if (popnum(&i))
- return OOPS;
- if (i == 0 && conv_char == 'c')
- strcpy(sbuf, "\000");
- else
- sprintf(sbuf, fmt, i);
- }
- sp++;
- fmt = sbuf;
- while(*fmt != '\0') {
- if (*fmt == '$')
- *dp++ = '\\';
- *dp++ = *fmt++;
- }
- break;
- case 'r':
- if (!termcap || getarg(1, INTEGER, &i))
- return OOPS;
- arg_list[1].integer = arg_list[0].integer;
- arg_list[0].integer = i;
- sp++;
- break;
- case 'i':
- if (getarg(1, INTEGER, &i)
- || arg_list[0].type != INTEGER)
- return OOPS;
- arg_list[1].integer++;
- arg_list[0].integer++;
- sp++;
- break;
- case 'n':
- if (!termcap || getarg(1, INTEGER, &i))
- return OOPS;
- arg_list[0].integer ^= 0140;
- arg_list[1].integer ^= 0140;
- sp++;
- break;
- case '>':
- if (!termcap) {
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i > j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- }
- if (getarg(termcap-1, INTEGER, &i))
- return OOPS;
- sp += cvtchar(sp, &c);
- if (i > c) {
- sp += cvtchar(sp, &c);
- arg_list[termcap-1].integer += c;
- } else
- sp += cvtchar(sp, &c);
- sp++;
- break;
- case 'B':
- if (!termcap || getarg(termcap-1, INTEGER, &i))
- return OOPS;
- arg_list[termcap-1].integer = 16*(i/10)+i%10;
- sp++;
- break;
- case 'D':
- if (!termcap || getarg(termcap-1, INTEGER, &i))
- return OOPS;
- arg_list[termcap-1].integer = i - 2 * (i % 16);
- sp++;
- break;
- case 'p':
- if (termcap > 1)
- return OOPS;
- if (*++sp == '\0')
- return OOPS;
- if (*sp == '0')
- i = 9;
- else
- i = *sp - '1';
- if (i < 0 || i > 9)
- return OOPS;
- if (pusharg(i))
- return OOPS;
- termcap = 0;
- sp++;
- break;
- case 'P':
- if (termcap || *++sp == '\0')
- return OOPS;
- i = *sp++ - 'a';
- if (i < 0 || i > 25)
- return OOPS;
- if (pos-- == 0)
- return OOPS;
- switch(vars[i].type = S[pos].type) {
- case ARG:
- vars[i].argnum = S[pos].argnum;
- break;
- case NUM:
- vars[i].value = S[pos].value;
- break;
- }
- break;
- case 'g':
- if (termcap || *++sp == '\0')
- return OOPS;
- i = *sp++ - 'a';
- if (i < 0 || i > 25)
- return OOPS;
- switch(vars[i].type) {
- case ARG:
- if (pusharg(vars[i].argnum))
- return OOPS;
- break;
- case NUM:
- if (pushnum(vars[i].value))
- return OOPS;
- break;
- }
- break;
- case '\'':
- if (termcap > 1)
- return OOPS;
- if (*++sp == '\0')
- return OOPS;
- sp += cvtchar(sp, &c);
- if (pushnum(c) || *sp++ != '\'')
- return OOPS;
- termcap = 0;
- break;
- case '{':
- if (termcap > 1)
- return OOPS;
- i = 0;
- sp++;
- while(isdigit(*sp))
- i = 10 * i + *sp++ - '0';
- if (*sp++ != '}' || pushnum(i))
- return OOPS;
- termcap = 0;
- break;
- case 'l':
- if (termcap || popstring(&s))
- return OOPS;
- i = strlen(s);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '*':
- if (termcap || popnum(&j) || popnum(&i))
- return OOPS;
- i *= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '/':
- if (termcap || popnum(&j) || popnum(&i))
- return OOPS;
- i /= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case 'm':
- if (termcap) {
- if (getarg(1, INTEGER, &i))
- return OOPS;
- arg_list[0].integer ^= 0177;
- arg_list[1].integer ^= 0177;
- sp++;
- break;
- }
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i %= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '&':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i &= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '|':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i |= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '^':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i ^= j;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '=':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i == j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '<':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i < j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case 'A':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i && j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case 'O':
- if (popnum(&j) || popnum(&i))
- return OOPS;
- i = (i || j);
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '!':
- if (popnum(&i))
- return OOPS;
- i = !i;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '~':
- if (popnum(&i))
- return OOPS;
- i = ~i;
- if (pushnum(i))
- return OOPS;
- sp++;
- break;
- case '?':
- if (termcap > 1)
- return OOPS;
- termcap = 0;
- if_depth++;
- sp++;
- break;
- case 't':
- if (popnum(&i) || if_depth == 0)
- return OOPS;
- if (!i) {
- scan_for = 'e';
- scan_depth = if_depth;
- }
- sp++;
- break;
- case 'e':
- if (if_depth == 0)
- return OOPS;
- scan_for = ';';
- scan_depth = if_depth;
- sp++;
- break;
- case ';':
- if (if_depth-- == 0)
- return OOPS;
- sp++;
- break;
- case 'b':
- if (--termcap < 1)
- return OOPS;
- sp++;
- break;
- case 'f':
- if (!termcap++)
- return OOPS;
- sp++;
- break;
- }
- break;
- default:
- if (scan_for)
- sp++;
- else
- *dp++ = *sp++;
- break;
- }
- }
- va_end(tparm_args);
- *dp = '\0';
- return buf;
-}
diff --git a/lib/libtermcap/tputs.c b/lib/libtermcap/tputs.c
deleted file mode 100644
index 0e8b147..0000000
--- a/lib/libtermcap/tputs.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 1980, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)tputs.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <ctype.h>
-#include "termcap.h"
-
-/*
- * The following array gives the number of tens of milliseconds per
- * character for each speed as returned by gtty. Thus since 300
- * baud returns a 7, there are 33.3 milliseconds per char at 300 baud.
- */
-static
-short tmspc10[] = {
- 0, 2000, 1333, 909, 743, 666, 500, 333, 166, 83, 55, 41, 20, 10, 5,
- 3, 2, 1
-};
-
-short ospeed;
-char PC;
-
-/*
- * Put the character string cp out, with padding.
- * The number of affected lines is affcnt, and the routine
- * used to output one character is outc.
- */
-int
-tputs(const char *cp, int affcnt, int (*outc)(int))
-{
- register int i = 0;
- register int mspc10;
-
- if (cp == 0)
- return 0;
-
- /*
- * Convert the number representing the delay.
- */
- if (isdigit(*cp)) {
- do
- i = i * 10 + *cp++ - '0';
- while (isdigit(*cp));
- }
- i *= 10;
- if (*cp == '.') {
- cp++;
- if (isdigit(*cp))
- i += *cp - '0';
- /*
- * Only one digit to the right of the decimal point.
- */
- while (isdigit(*cp))
- cp++;
- }
-
- /*
- * If the delay is followed by a `*', then
- * multiply by the affected lines count.
- */
- if (*cp == '*')
- cp++, i *= affcnt;
-
- /*
- * The guts of the string.
- */
- while (*cp)
- (*outc)(*cp++);
-
- /*
- * If no delay needed, or output speed is
- * not comprehensible, then don't try to delay.
- */
- if (i == 0)
- return 0;
- if (ospeed <= 0 || ospeed >= (sizeof tmspc10 / sizeof tmspc10[0]))
- return 0;
-
- /*
- * Round up by a half a character frame,
- * and then do the delay.
- * Too bad there are no user program accessible programmed delays.
- * Transmitting pad characters slows many
- * terminals down and also loads the system.
- */
- mspc10 = tmspc10[ospeed];
- i += mspc10 / 2;
- for (i /= mspc10; i > 0; i--)
- (*outc)(PC);
- return 0;
-}
diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile
deleted file mode 100644
index ae0a2e8..0000000
--- a/lib/libutil/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-# @(#)Makefile 8.1 (Berkeley) 6/4/93
-
-LIB= util
-SHLIB_MAJOR= 2
-SHLIB_MINOR= 2
-CFLAGS+=-Wall -DLIBC_SCCS -I${.CURDIR} -I${.CURDIR}/../../sys
-#CFLAGS+=LOGIN_CAP_AUTH
-SRCS= login.c login_tty.c logout.c logwtmp.c pty.c setproctitle.c \
- login_cap.c login_class.c login_auth.c login_times.c login_ok.c \
- _secure_path.c uucplock.c
-MAN3+= login.3 login_tty.3 logout.3 logwtmp.3 pty.3 setproctitle.3 \
- login_cap.3 login_class.3 login_times.3 login_ok.3 \
- _secure_path.3 uucplock.3
-MAN5+= login.conf.5
-MLINKS+= pty.3 openpty.3 pty.3 forkpty.3
-MLINKS+=login_cap.3 login_getclassbyname.3 login_cap.3 login_close.3 \
- login_cap.3 login_getclass.3 login_cap.3 login_getuserclass.3 \
- login_cap.3 login_getcapstr.3 login_cap.3 login_getcaplist.3 \
- login_cap.3 login_getstyle.3 login_cap.3 login_getcaptime.3 \
- login_cap.3 login_getcapnum.3 login_cap.3 login_getcapsize.3 \
- login_cap.3 login_getcapbool.3 login_cap.3 login_getpath.3
-MLINKS+=login_class.3 setusercontext.3 login_class.3 setclasscontext.3 \
- login_class.3 setclassenvironment.3 login_class.3 setclassresources.3
-MLINKS+=login_times.3 parse_lt.3 login_times.3 in_ltm.3 \
- login_times.3 in_lt.3 login_times.3 in_ltms.3 \
- login_times.3 in_lts.3
-MLINKS+=login_ok.3 auth_ttyok.3 login_ok.3 auth_hostok.3 \
- login_ok.3 auth_timeok.3
-MLINKS+=uucplock.3 uu_lock.3 uucplock.3 uu_unlock.3 uucplock.3 uu_lockerr.3
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/libutil.h \
- ${DESTDIR}/usr/include
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/login_cap.h \
- ${DESTDIR}/usr/include
-
-.include <bsd.lib.mk>
diff --git a/lib/libutil/_secure_path.3 b/lib/libutil/_secure_path.3
deleted file mode 100644
index 66fbb2c..0000000
--- a/lib/libutil/_secure_path.3
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (c) 1997 David Nugent <davidn@blaze.net.au>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" this list of conditions, and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" David Nugent.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id: _secure_path.3,v 1.1 1997/05/10 18:55:37 davidn Exp $
-.\"
-.Dd May 2, 1997
-.Os FreeBSD
-.Dt _SECURE_PATH 3
-.Sh NAME
-.Nm _secure_path
-.Nd determine if a file appears to be secure
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <libutil.h>
-.Ft int
-.Fn _secure_path "const char *path" "uid_t uid" "gid_t gid"
-.Pp
-.Sh DESCRIPTION
-This function does some basic security checking on a given path.
-It is intended to be used by processes running with root privileges
-in order to decide whether or not to trust the contents of a given
-file.
-It uses a method often used to detect system compromise.
-.Pp
-A file is considered 'secure' if it meets the following conditions:
-.Bl -enum
-.It
-The file exists, and is a regular file (not a symlink, device
-special or named pipe, etc.),
-.It
-Is not world writable.
-.It
-Is owned by the given uid or uid 0, if uid is not -1,
-.It
-Is not group wriable or it has group ownership by the given
-gid, if gid is not -1.
-.El
-.Sh RETURN VALUES
-This function returns zero if the file exists and may be
-considered secure, -2 if the file does not exist, and
--1 otherwise to indicate a security failure.
-.Xr syslog 3 ,
-is used to log any failure of this function, including the
-reason, at LOG_ERR priority.
-.Sh BUGS
-The checks carried out are rudamentary and no attempt is made
-to eliminate race conditions between use of this function and
-access to the file referenced.
-.Sh SEE ALSO
-.Xr lstat 3 ,
-.Xr syslog 3 .
-.Sh HISTORY
-Code from which this function was derived was contributed to the
-FreeBSD project by Berkeley Software Design, Inc.
diff --git a/lib/libutil/_secure_path.c b/lib/libutil/_secure_path.c
deleted file mode 100644
index 01c29bf..0000000
--- a/lib/libutil/_secure_path.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * Based on code copyright (c) 1995,1997 by
- * Berkeley Software Design, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. This work was done expressly for inclusion into FreeBSD. Other use
- * is permitted provided this notation is included.
- * 4. Absolutely no warranty of function or purpose is made by the authors.
- * 5. Modifications may be freely made to this file providing the above
- * conditions are met.
- *
- * $Id: _secure_path.c,v 1.1 1997/05/10 18:55:37 davidn Exp $
- */
-
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <syslog.h>
-#include <errno.h>
-#include <libutil.h>
-
-/*
- * Check for common security problems on a given path
- * It must be:
- * 1. A regular file, and exists
- * 2. Owned and writaable only by root (or given owner)
- * 3. Group ownership is given group or is non-group writable
- *
- * Returns: -2 if file does not exist,
- * -1 if security test failure
- * 0 otherwise
- */
-
-int
-_secure_path(const char *path, uid_t uid, gid_t gid)
-{
- int r = -1;
- struct stat sb;
- const char *msg = NULL;
-
- if (lstat(path, &sb) < 0) {
- if (errno == ENOENT) /* special case */
- r = -2; /* if it is just missing, skip the log entry */
- else
- msg = "%s: cannot stat %s: %m";
- }
- else if (!S_ISREG(sb.st_mode))
- msg = "%s: %s is not a regular file";
- else if (sb.st_mode & S_IWOTH)
- msg = "%s: %s is world writable";
- else if (uid != -1 && sb.st_uid != uid && sb.st_uid != 0) {
- if (uid == 0)
- msg = "%s: %s is not owned by root";
- else
- msg = "%s: %s is not owned by uid %d";
- } else if (gid != -1 && sb.st_gid != gid && (sb.st_mode & S_IWGRP))
- msg = "%s: %s is group writeable by non-authorised groups";
- else
- r = 0;
- if (msg != NULL)
- syslog(LOG_ERR, msg, "_secure_path", path, uid);
- return r;
-}
diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h
deleted file mode 100644
index 8a96284..0000000
--- a/lib/libutil/libutil.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1995 Peter Wemm <peter@freebsd.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. This work was done expressly for inclusion into FreeBSD. Other use
- * is permitted provided this notation is included.
- * 4. Absolutely no warranty of function or purpose is made by the author
- * Peter Wemm.
- * 5. Modifications may be freely made to this file providing the above
- * conditions are met.
- *
- * $Id: libutil.h,v 1.12 1997/08/31 20:09:38 brian Exp $
- */
-
-#ifndef _LIBUTIL_H_
-#define _LIBUTIL_H_
-
-#include <sys/cdefs.h>
-
-/* Avoid pulling in all the include files for no need */
-struct termios;
-struct winsize;
-struct utmp;
-
-__BEGIN_DECLS
-void setproctitle __P((const char *_fmt, ...));
-void login __P((struct utmp *_ut));
-int login_tty __P((int _fd));
-int logout __P((char *_line));
-void logwtmp __P((const char *_line, const char *_name, const char *_host));
-int openpty __P((int *_amaster, int *_aslave, char *_name,
- struct termios *_termp, struct winsize *_winp));
-int forkpty __P((int *_amaster, char *_name,
- struct termios *_termp, struct winsize *_winp));
-const char *uu_lockerr __P((int _uu_lockresult));
-int uu_lock __P((const char *_ttyname));
-int uu_unlock __P((const char *_ttyname));
-int _secure_path __P((const char *_path, uid_t _uid, gid_t _gid));
-__END_DECLS
-
-#define UU_LOCK_INUSE (1)
-#define UU_LOCK_OK (0)
-#define UU_LOCK_OPEN_ERR (-1)
-#define UU_LOCK_READ_ERR (-2)
-#define UU_LOCK_CREAT_ERR (-3)
-#define UU_LOCK_WRITE_ERR (-4)
-#define UU_LOCK_LINK_ERR (-5)
-#define UU_LOCK_TRY_ERR (-6)
-
-#endif /* !_LIBUTIL_H_ */
diff --git a/lib/libutil/login.3 b/lib/libutil/login.3
deleted file mode 100644
index faec5bb..0000000
--- a/lib/libutil/login.3
+++ /dev/null
@@ -1,69 +0,0 @@
-.\"
-.\" Copyright (c) 1996 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id$
-.\" "
-.Dd December 29, 1996
-.Os
-.Dt LOGIN 3
-.Sh NAME
-.Nm login
-.Nd "log a new login record to the utmp and wtmp files"
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <utmp.h>
-.Fd #include <libutil.h>
-.Ft void
-.Fn login "struct utmp *ut"
-.Pp
-Link with
-.Va -lutil
-on the
-.Xr cc 1
-command line.
-.Sh DESCRIPTION
-The function
-.Fn login
-records the
-.Ar ut
-entry being passed into the appropriate slot of the
-.Xr utmp 5
-file (according to the controlling terminal of the calling process),
-and appends it to the
-.Xr wtmp 5
-file. The calling process must have permission to write to both files.
-.Sh RETURN VALUES
-None.
-.Sh SEE ALSO
-.Xr logout 3 ,
-.Xr ttyslot 3 ,
-.Xr utmp 5 ,
-.Xr wtmp 5
-.Sh BUGS
-The interface provided by
-.Fn login
-is rather crude. The caller must know about the details of a
-.Va struct utmp .
-Some better abstraction needs to be worked out.
diff --git a/lib/libutil/login.c b/lib/libutil/login.c
deleted file mode 100644
index 235f271..0000000
--- a/lib/libutil/login.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)login.c 8.1 (Berkeley) 6/4/93";
-#else
-static const char rcsid[] =
- "$Id$";
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <utmp.h>
-#include <stdio.h>
-#include <libutil.h>
-
-void
-login(ut)
- struct utmp *ut;
-{
- register int fd;
- int tty;
-
- tty = ttyslot();
- if (tty > 0 && (fd = open(_PATH_UTMP, O_WRONLY|O_CREAT, 0644)) >= 0) {
- (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), L_SET);
- (void)write(fd, ut, sizeof(struct utmp));
- (void)close(fd);
- }
- if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) {
- (void)write(fd, ut, sizeof(struct utmp));
- (void)close(fd);
- }
-}
diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5
deleted file mode 100644
index 9bf45fe..0000000
--- a/lib/libutil/login.conf.5
+++ /dev/null
@@ -1,365 +0,0 @@
-.\" Copyright (c) 1996 David Nugent <davidn@blaze.net.au>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" this list of conditions, and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" David Nugent.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id: login.conf.5,v 1.12 1997/08/31 20:09:39 brian Exp $
-.\"
-.Dd November 22, 1996
-.Dt LOGIN.CONF 5
-.Os FreeBSD
-.Sh NAME
-.Nm login.conf
-.Nd login class capability database
-.Sh SYNOPSIS
-.Pa /etc/login.conf ,
-.Pa ~/.login_conf
-.Sh DESCRIPTION
-login.conf contains various attributes and capabilities of login classes.
-A login class (an optional annotation against each record in the user
-account database,
-.Pa /etc/master.passwd )
-determines session accounting, resource limits and user environment settings.
-It is used by various programs in the system to set up a user's login
-environment and to enforce policy, accounting and administrative restrictions.
-It also provides the means by which users are able to be
-authenticated to the system and the types of authentication available.
-.Pp
-A special record "default" in the system user class capability database
-.Pa /etc/login.conf
-is used automatically for any
-non-root user without a valid login class in
-.Pa /etc/master.passwd .
-A user with a uid of 0 without a valid login class will use the record
-"root" if it exists, or "default" if not.
-.Pp
-In FreeBSD, users may individually create a file called
-.Pa .login_conf
-in their home directory using the same format, consisting of a single
-entry with a record id of "me".
-If present, this file is used by
-.Xr login 1
-to set user-defined environment settings which override those specified
-in the system login capabilities database.
-Only a subset of login capabilities may be overridden, typically those
-which do not involve authentication, resource limits and accounting.
-.Pp
-Records in a class capabilities database consist of a number of
-colon-separated fields.
-The first entry for each record gives one or more names that a record is
-to be known by, each separated by a '|' character.
-The first name is the most common abbreviation.
-The last name given should be a long name that is more descriptive
-of the capability entry, and all others are synonyms.
-All names but the last should be in lower case and contain no blanks;
-the last name may contain upper case characters and blanks for
-readability.
-.Pp
-See
-.Xr getcap 3
-for a more in-depth description of the format of a capability database.
-.Sh CAPABILITIES
-Fields within each record in the database follow the
-.Xr getcap 3
-conventions for boolean, type string
-.Ql \&=
-and type numeric
-.Ql \&# ,
-although type numeric is depreciated in favour of the string format and
-either form is accepted for a numeric datum.
-Values fall into the following categories:
-.Bl -tag -width "program"
-.It file
-Path name to a data file
-.It program
-Path name to an executable file
-.It list
-A list of values (or pairs of values) separated by commas or spaces
-.It path
-A space or comma separated list of path names, following the usual csh
-conventions (leading tilde with and without username being expanded to
-home directories etc.)
-.It number
-A numeric value, either decimal (default), hexadecimal (with leading 0x),
-or octal (with a leading 0).
-With a numeric type, only one numeric value is allowed.
-Numeric types may also be specified in string format (ie. the capability
-tag being delimited from the value by '=' instead of '#').
-Whichever method is used, then all records in the database must use the
-same method to allow values to be correctly overridden in interpolated
-records.
-.It size
-A number which expresses a size.
-The default interpretation of a value is the number of bytes, but a
-suffix may specify alternate units:
-.Bl -tag -offset indent -compact -width xxxx
-.It b
-explicitly selects 512-byte blocks
-.It k
-selects kilobytes (1024 bytes)
-.It m
-specifies a multiplier of 1 megabyte (1048576 bytes),
-.It g
-specifies units of gigabytes, and
-.It t
-represents terabytes.
-.El
-A size value is a numeric quantity and case of the suffix is not significant.
-Concatenated values are added together.
-.It time
-A period of time, by default in seconds.
-A prefix may specify a different unit;
-.Bl -tag -offset indent -compact -width xxxx
-.It y
-indicates the number of 365 day years,
-.It w
-indicates the number of weeks,
-.It d
-the number of days,
-.It h
-the number of minutes, and
-.It s
-the number of seconds.
-.El
-Concatenated values are added together.
-For example, 2 hours and 40 minutes may be written either as
-9600s, 160m or 2h40m.
-.El
-.Pp
-The usual convention to interpolate capability entries using the special
-.Em tc=value
-notation may be used.
-.Pp
-.Sh RESOURCE LIMITS
-.Bl -column coredumpsize indent indent
-.Sy Name Type Notes Description
-.It cputime time CPU usage limit.
-.It filesize size Maximum file size limit.
-.It datasize size Maximum data size limit.
-.It stacksize size Maximum stack size limit.
-.It coredumpsize size Maximum coredump size limit.
-.It memoryuse size Maximum of core memory use size limit.
-.It memorylocked size Maximum locked in core memory size limit.
-.It maxproc number Maximum number of processes.
-.It openfiles number Maximum number of open files per process.
-.El
-.Pp
-These resource limit entries actually specify both the maximum
-and current limits (see
-.Xr getrlimit 2 ).
-The current (soft) limit is the one normally used, although the user is permitted
-to increase the current limit to the maximum (hard) limit.
-The maximum and current limits may be specified individually by appending a
--max or -cur to the capability name.
-.Pp
-.Sh ENVIRONMENT
-.Bl -column ignorenologin indent xbinxxusrxbin
-.Sy Name Type Notes Description
-.It charset string Set $MM_CHARSET environment variable to the specified
-value.
-.It hushlogin bool false Same as having a ~/.hushlogin file.
-.It ignorenologin bool false Login not prevented by nologin.
-.It lang string Set $LANG environment variable to the specified value.
-.It manpath path Default search path for manpages.
-.It nologin file If the file exists it will be displayed and
-the login session will be terminated.
-.It path path /bin /usr/bin Default search path.
-.It priority number Initial priority (nice) level.
-.It requirehome bool false Require a valid home directory to login.
-.It setenv list A comma-separated list of environment variables and
-values to which they are to be set.
-.It shell prog Session shell to execute rather than the
-shell specified in the passwd file. The SHELL environment variable will
-contain the shell specified in the password file.
-.It term string su Default terminal type if not able to determine from
-other means.
-.It timezone string Default value of $TZ environment variable.
-.It umask number 022 Initial umask. Should always have a leading 0 to
-ensure octal interpretation.
-.It welcome file /etc/motd File containing welcome message.
-.El
-.Pp
-.Sh AUTHENTICATION
-.Bl -column minpasswordlen indent indent
-.Sy Name Type Notes Description
-.It minpasswordlen number 6 The minimum length a local password may be.
-.\" .It approve program Program to approve login.
-.It auth list passwd Allowed authentication styles. The first value is the
-default style.
-.It auth-<type> list Allowed authentication styles for the
-authentication type 'type'.
-.It copyright file File containing additional copyright information
-.\".It widepasswords bool false Use the wide password format. The wide password
-.\" format allows up to 128 significant characters in the password.
-.It host.allow list List of remote host wildcards from which users in
-the class may access.
-.It host.deny list List of remote host wildcards from which users in
-the class may not access.
-.It times.allow list List of time periods during which
-logins are allowed.
-.It times.deny list List of time periods during which logins are
-disallowed.
-.It tty.allow list List of ttys and ttygroups which users
-in the class may use for access.
-.It tty.deny list List of ttys and ttygroups which users
-in the class may not use for access.
-.El
-.Pp
-These fields are intended to be used by
-.Xr passwd 1
-and other programs in the login authentication system.
-.Pp
-Capabilities that set environment variables are scanned for both
-.Ql \&~
-and
-.Ql \&$
-characters, which are substituted for a user's home directory and name
-respectively.
-To pass these characters literally into the environment variable, escape
-the character by preceding it with a backslash '\\'.
-.Pp
-The
-.Em host.allow
-and
-.Em host.deny
-entries are comma separated lists used for checking remote access to the system,
-and consist of a list of hostnames and/or IP addresses against which remote
-network logins are checked.
-Items in these lists may contain wildcards in the form used by shell programs
-for wildcard matching (See
-.Xr fnmatch 3
-for details on the implementation).
-The check on hosts is made against both the remote system's Internet address
-and hostname (if available).
-If both lists are empty or not specified, then logins from any remote host
-are allowed.
-If host.allow contains one or more hosts, then only remote systems matching
-any of the items in that list are allowed to log in.
-If host.deny contains one or more hosts, then a login from any matching hosts
-will be disallowed.
-.Pp
-The
-.Em times.allow
-and
-.Em times.deny
-entries consist of a comma-separated list of time periods during which the users
-in a class are allowed to be logged in.
-These are expressed as one or more day codes followed by a start and end times
-expressed in 24 hour format, separated by a hyphen or dash.
-For example, MoThSa0200-1300 translates to Monday, Thursday and Saturday between
-the hours of 2 am and 1 p.m..
-If both of these time lists are empty, users in the class are allowed access at
-any time.
-If
-.Em times.allow
-is specified, then logins are only allowed during the periods given.
-If
-.Em times.deny
-is specified, then logins are denied during the periods given, regardless of whether
-one of the periods specified in
-.Em times.allow
-applies.
-.Pp
-Note that
-.Xr login 1
-enforces only that the actual login falls within periods allowed by these entries.
-Further enforcement over the life of a session requires a separate daemon to
-monitor transitions from an allowed period to a non-allowed one.
-.Pp
-The
-.Em tty.allow
-and
-.Em tty.deny
-entries contain a comma-separated list of tty devices (without the /dev/ prefix)
-that a user in a class may use to access the system, and/or a list of ttygroups
-(See
-.Xr getttyent 3
-and
-.Xr ttys 5
-for information on ttygroups).
-If neither entry exists, then the choice of login device used by the user is
-unrestricted.
-If only
-.Em tty.allow
-is specified, then the user is restricted only to ttys in the given
-group or device list.
-If only
-.Em tty.deny
-is specified, then the user is prevented from using the specified devices or
-devices in the group.
-If both lists are given and are non-empty, the user is restricted to those
-devices allowed by tty.allow that are not available by tty.deny.
-.Sh ACCOUNTING LIMITS
-.Bl -column passwordperiod indent indent
-.Sy Name Type Notes Description
-.It accounted bool false Enable session time accounting for all users
-in this class.
-.It autodelete time Time after expiry when account is auto-deleted.
-.It bootfull bool false Enable 'boot only if ttygroup is full' strategy
-when terminating sessions.
-.It daytime time Maximum login time per day.
-.It expireperiod time Time for expiry allocation.
-.It graceexpire time Grace days for expired account.
-.It gracetime time Additional grace login time allowed.
-.It host.accounted list List of remote host wildcards from which
-login sessions will be accounted.
-.It host.exempt list List of remote host wildcards from which
-login session accounting is exempted.
-.It idletime time Maximum idle time before logout.
-.It monthtime time Maximum login time per month.
-.It passwordtime time Time for password expiry.
-.It refreshtime time New time allowed on account refresh.
-.It refreshperiod str How often account time is refreshed.
-.It sessiontime time Maximum login time per session.
-.It sessionlimit number Maximum number of concurrent
-login sessions on ttys in any group.
-.It tty.accounted list List of ttys and ttygroups for which
-login accounting is active.
-.It tty.exempt list List of ttys and ttygroups for which login accounting
-is exempt.
-.It warnexpire time Advance notice for pending account expiry.
-.It warnpassword time Advance notice for pending password expiry.
-.It warntime time Advance notice for pending out-of-time.
-.It weektime time Maximum login time per week.
-.El
-.Pp
-These fields are used by the time accounting system, which regulates,
-controls and records user login access.
-.Pp
-The
-.Em ttys.accounted
-and
-.Em ttys.exempt
-fields operate in a similar manner to
-.Em ttys.allow
-and
-.Em ttys.deny
-as explained
-above.
-Similarly with the
-.Em host.accounted
-and
-.Em host.exempt
-lists.
-.Sh SEE ALSO
-.Xr login 1 ,
-.Xr getcap 3 ,
-.Xr getttyent 3 ,
-.Xr login_cap 3 ,
-.Xr login_class 3 ,
-.Xr passwd 5 ,
-.Xr ttys 5
diff --git a/lib/libutil/login_auth.3 b/lib/libutil/login_auth.3
deleted file mode 100644
index 14a2a63..0000000
--- a/lib/libutil/login_auth.3
+++ /dev/null
@@ -1,71 +0,0 @@
-.\" Copyright (c) 1995 David Nugent <davidn@blaze.net.au>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" this list of conditions, and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" David Nugent.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id$
-.\"
-.Dd December 29, 1996
-.Os FreeBSD
-.Dt LOGIN_AUTH 3
-.Sh NAME
-.Nm authenticate
-.Nm auth_script
-.Nm auth_env
-.Nm auth_scan
-.Nm auth_rmfiles
-.Nm auth_checknologin
-.Nm auth_cat
-.Nm auth_ttyok
-.Nm auth_hostok
-.Nm auth_timesok
-.Nd Authentication style support library for login class capabilities database.
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <login_cap.h>
-.Ft int
-.Fn authenticate "const char *name" "const char *classname" "const char *style" "const char *service"
-.Ft int
-.Fn auth_script "const char * path" ...
-.Ft int
-.Fn auth_env "void"
-.Ft int
-.Fn auth_scan "int ok"
-.Ft int
-.Fn auth_rmfiles "void"
-.Ft int
-.Fn auth_checknologin "login_cap_t *lc"
-.Ft int
-.Fn auth_cat "const char *file"
-.Ft int
-.Fn auth_ttyok "login_cap_t *lc" "const char *tty"
-.Ft int
-.Fn auth_hostok "login_cap_t *lc" "const char *hostname" "char const *ip"
-.Ft int
-.Fn auth_timesok "login_cap_t *lc" "time_t now"
-.Sh DESCRIPTION
-This set of functions support the login class authorisation style interface provided
-by
-.Xr login.conf 5 .
-
-.Sh RETURN VALUES
-.Sh SEE ALSO
-.Xr getcap 3 ,
-.Xr login_cap 3 ,
-.Xr login_class 3 ,
-.Xr login.conf 5 ,
-.Xr termcap 5
diff --git a/lib/libutil/login_auth.c b/lib/libutil/login_auth.c
deleted file mode 100644
index 1bd6c13..0000000
--- a/lib/libutil/login_auth.c
+++ /dev/null
@@ -1,671 +0,0 @@
-/*-
- * Copyright (c) 1996 by
- * Sean Eric Fagan <sef@kithrup.com>
- * David Nugent <davidn@blaze.net.au>
- * All rights reserved.
- *
- * Portions copyright (c) 1995,1997 by
- * Berkeley Software Design, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. This work was done expressly for inclusion into FreeBSD. Other use
- * is permitted provided this notation is included.
- * 4. Absolutely no warranty of function or purpose is made by the authors.
- * 5. Modifications may be freely made to this file providing the above
- * conditions are met.
- *
- * Low-level routines relating to the user capabilities database
- *
- * $Id: login_auth.c,v 1.7 1997/05/10 18:55:37 davidn Exp $
- */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <pwd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <syslog.h>
-#include <unistd.h>
-#include <login_cap.h>
-#include <stdarg.h>
-#include <paths.h>
-#include <sys/socket.h>
-#include <sys/wait.h>
-#include <err.h>
-#include <libutil.h>
-
-#ifdef LOGIN_CAP_AUTH
-/*
- * Comment from BSDI's authenticate.c module:
- * NOTE: THIS MODULE IS TO BE DEPRECATED. FUTURE VERSIONS OF BSD/OS WILL
- * HAVE AN UPDATED API, THOUGH THESE FUNCTIONS WILL CONTINUE TO BE AVAILABLE
- * FOR BACKWARDS COMPATABILITY
- */
-
-
-#define AUTHMAXSPOOL (8 * 1024) /* Max size of authentication data */
-#define AUTHCOMM_FD 3 /* Handle used to read/write auth data */
-
-struct rmfiles {
- struct rmfiles *next;
- char file[1];
-};
-
-struct authopts {
- struct authopts *next;
- char opt[1];
-};
-
-static char *spoolbuf = NULL;
-static int spoolidx = 0;
-static struct rmfiles *rmfirst = NULL;
-static struct authopts *optfirst = NULL;
-
-
-/*
- * Setup a known environment for all authentication scripts.
- */
-
-static char *auth_environ[] = {
- "PATH=" _PATH_DEFPATH,
- "SHELL=" _PATH_BSHELL,
- NULL,
-};
-
-
-
-/*
- * nextline()
- * Get the next line from the data buffer collected from
- * the authentication program. This function relies on the
- * fact that lines are nul terminated.
- */
-
-static char *
-nextline(int *idx)
-{
- char *ptr = NULL;
-
- if (spoolbuf != NULL && *idx < spoolidx) {
- ptr = spoolbuf + *idx;
- *idx += strlen(ptr) + 1;
- }
- return ptr;
-}
-
-
-/*
- * spooldata()
- * Read data returned on authentication backchannel and
- * stuff it into our spool buffer. We also replace \n with nul
- * to make parsing easier later.
- */
-
-static int
-spooldata(int fd)
-{
-
- if (spoolbuf)
- free(spoolbuf);
- spoolidx = 0;
-
- if (spoolbuf == NULL && (spoolbuf = malloc(AUTHMAXSPOOL)) == NULL)
- syslog(LOG_ERR, "authbuffer malloc: %m");
-
- else while (spoolidx < sizeof(spoolbuf) - 1) {
- int r = read(fd, spoolbuf + spoolidx, sizeof(spoolbuf)-spoolidx);
- char *b;
-
- if (r <= 0) {
- spoolbuf[spoolidx] = '\0';
- return 0;
- }
- /*
- * Convert newlines into NULs to allow
- * easier scanning of the file.
- */
- while ((b = memchr(spoolbuf + spoolidx, '\n', r)) != NULL)
- *b = '\0';
- spoolidx += r;
- }
- return -1;
-}
-
-
-/*
- * auth_check()
- * Starts an auth_script() for the given <user>, with a class <class>,
- * style <style>, and service <service>. <style> is necessary,
- * as are <user> and <class>, but <service> is optional -- it defaults
- * to "login".
- * Since auth_script() expects an execl'able program name, authenticate()
- * also concatenates <style> to _PATH_AUTHPROG.
- * Lastly, calls auth_scan(0) to see if there are any "reject" statements,
- * or lack of "auth" statements.
- * Returns -1 on error, 0 on rejection, and >0 on success.
- * (See AUTH_* for the return values.)
- *
- */
-
-int
-auth_check(const char *name, const char *clss, const char *style,
- const char *service, int *status)
-{
- int _status;
-
- if (status == NULL)
- status = &_status;
- *status = 0;
-
- if (style != NULL) {
- char path[MAXPATHLEN];
-
- if (service == NULL)
- service = LOGIN_DEFSERVICE;
-
- snprintf(path, sizeof(path), _PATH_AUTHPROG "%s", style);
- if (auth_script(path, style, "-s", service, name, clss, 0))
- status = 0;
- else
- *status = auth_scan(0);
-
- return *status & AUTH_ALLOW;
- }
- return -1;
-}
-
-
-int
-auth_response(const char *name, const char *class, const char *style,
- const char *service, int *status,
- const char *challenge, const char *response)
-{
- int _status;
-
- if (status == NULL)
- status = &_status;
- *status = 0;
-
- if (style != NULL) {
- int datalen;
- char *data;
-
- if (service == NULL)
- service = LOGIN_DEFSERVICE;
-
- datalen = strlen(challenge) + strlen(response) + 2;
-
- if ((data = malloc(datalen)) == NULL) {
- syslog(LOG_ERR, "auth_response: %m");
- warnx("internal resource failure");
- } else {
- char path[MAXPATHLEN];
-
- snprintf(data, datalen, "%s%c%s", challenge, 0, response);
- snprintf(path, sizeof(path), _PATH_AUTHPROG "%s", style);
- if (auth_script_data(data, datalen, path, style, "-s", service,
- name, class, 0))
- *status = 0;
- else
- *status = auth_scan(0);
- free(data);
- return (*status & AUTH_ALLOW);
- }
- }
- return -1;
-}
-
-
-int
-auth_approve(login_cap_t *lc, const char *name, const char *service)
-{
- int r = -1;
- char path[MAXPATHLEN];
-
- if (lc == NULL) {
- if (strlen(name) > MAXPATHLEN) {
- syslog(LOG_ERR, "%s: username too long", name);
- warnx("username too long");
- } else {
- struct passwd *pwd;
- char *p;
-
- pwd = getpwnam(name);
- if (pwd == NULL && (p = strchr(name, '.')) != NULL) {
- int i = p - name;
-
- if (i >= MAXPATHLEN)
- i = MAXPATHLEN - 1;
- strncpy(path, name, i);
- path[i] = '\0';
- pwd = getpwnam(path); /* Fixed bug in BSDI code... */
- }
- if ((lc = login_getpwclass(pwd ? pwd->pw_class : NULL)) == NULL)
- warnx("unable to classify user '%s'", name);
- }
- }
-
- if (lc != NULL) {
- char *approve;
- char *s;
-
- if (service != NULL)
- service = LOGIN_DEFSERVICE;
-
- snprintf(path, sizeof(path), "approve-%s", service);
-
- if ((approve = login_getcapstr(lc, s = path, NULL, NULL)) == NULL &&
- (approve = login_getcapstr(lc, s = "approve", NULL, NULL)) == NULL)
- r = AUTH_OKAY;
- else {
-
- if (approve[0] != '/') {
- syslog(LOG_ERR, "Invalid %s script: %s", s, approve);
- warnx("invalid path to approval script");
- } else {
- char *s;
-
- s = strrchr(approve, '/') + 1;
- if (auth_script(approve, s, name,
- lc->lc_class, service, 0) == 0 &&
- (r = auth_scan(AUTH_OKAY) & AUTH_ALLOW) != 0)
- auth_env();
- }
- }
- }
- return r;
-}
-
-
-void
-auth_env(void)
-{
- int idx = 0;
- char *line;
-
- while ((line = nextline(&idx)) != NULL) {
- if (!strncasecmp(line, BI_SETENV, sizeof(BI_SETENV)-1)) {
- line += sizeof(BI_SETENV) - 1;
- if (*line && isspace(*line)) {
- char *name;
- char ch, *p;
-
- while (*line && isspace(*line))
- ++line;
- name = line;
- while (*line && !isspace(*line))
- ++line;
- ch = *(p = line);
- if (*line)
- ++line;
- if (setenv(name, line, 1))
- warn("setenv(%s, %s)", name, line);
- *p = ch;
- }
- }
- }
-}
-
-
-char *
-auth_value(const char *what)
-{
- int idx = 0;
- char *line;
-
- while ((line = nextline(&idx)) != NULL) {
- if (!strncasecmp(line, BI_VALUE, sizeof(BI_VALUE)-1)) {
- char *name;
-
- line += sizeof(BI_VALUE) - 1;
- while (*line && isspace(*line))
- ++line;
- name = line;
- if (*line) {
- int i;
- char ch, *p;
-
- ch = *(p = line);
- *line++ = '\0';
- i = strcmp(name, what);
- *p = ch;
- if (i == 0)
- return auth_mkvalue(line);
- }
- }
- }
- return NULL;
-}
-
-char *
-auth_mkvalue(const char *value)
-{
- char *big, *p;
-
- big = malloc(strlen(value) * 4 + 1);
- if (big != NULL) {
- for (p = big; *value; ++value) {
- switch (*value) {
- case '\r':
- *p++ = '\\';
- *p++ = 'r';
- break;
- case '\n':
- *p++ = '\\';
- *p++ = 'n';
- break;
- case '\\':
- *p++ = '\\';
- *p++ = *value;
- break;
- case '\t':
- case ' ':
- if (p == big)
- *p++ = '\\';
- *p++ = *value;
- break;
- default:
- if (!isprint(*value)) {
- *p++ = '\\';
- *p++ = ((*value >> 6) & 0x3) + '0';
- *p++ = ((*value >> 3) & 0x7) + '0';
- *p++ = ((*value ) & 0x7) + '0';
- } else
- *p++ = *value;
- break;
- }
- }
- *p = '\0';
- big = realloc(big, strlen(big) + 1);
- }
- return big;
-}
-
-
-#define NARGC 63
-static int
-_auth_script(const char *data, int nbytes, const char *path, va_list ap)
-{
- int r, argc, status;
- int pfd[2];
- pid_t pid;
- struct authopts *e;
- char *argv[NARGC+1];
-
- r = -1;
- argc = 0;
- for (e = optfirst; argc < (NARGC - 1) && e != NULL; e = e->next) {
- argv[argc++] = "-v";
- argv[argc++] = e->opt;
- }
- while (argc < NARGC && (argv[argc] = va_arg(ap, char *)) != NULL)
- ++argc;
- argv[argc] = NULL;
-
- if (argc >= NARGC && va_arg(ap, char *))
- syslog(LOG_ERR, "too many arguments");
- else if (_secure_path(path, 0, 0) < 0) {
- syslog(LOG_ERR, "%s: path not secure", path);
- warnx("invalid script: %s", path);
- } else if (socketpair(PF_LOCAL, SOCK_STREAM, 0, pfd) < 0) {
- syslog(LOG_ERR, "unable to create backchannel %m");
- warnx("internal resource failure");
- } else switch (pid = fork()) {
- case -1: /* fork() failure */
- close(pfd[0]);
- close(pfd[1]);
- syslog(LOG_ERR, "fork %s: %m", path);
- warnx("internal resource failure");
- break;
- case 0: /* child process */
- close(pfd[0]);
- if (pfd[1] != AUTHCOMM_FD) {
- if (dup2(pfd[1], AUTHCOMM_FD) < 0)
- err(1, "dup backchannel");
- close(pfd[1]);
- }
- for (r = getdtablesize(); --r > AUTHCOMM_FD; )
- close(r);
- execve(path, argv, auth_environ);
- syslog(LOG_ERR, "exec %s: %m", path);
- err(1, path);
- default: /* parent */
- close(pfd[1]);
- if (data && nbytes)
- write(pfd[0], data, nbytes);
- r = spooldata(pfd[0]);
- close(pfd[0]);
- if (waitpid(pid, &status, 0) < 0) {
- syslog(LOG_ERR, "%s: waitpid: %m", path);
- warnx("internal failure");
- r = -1;
- } else {
- if (r != 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0)
- r = -1;
- }
- /* kill the buffer if it is of no use */
- if (r != 0) {
- free(spoolbuf);
- spoolbuf = NULL;
- spoolidx = 0;
- }
- break;
- }
- return r;
-}
-
-
-
-/*
- * auth_script()
- * Runs an authentication program with specified arguments.
- * It sets up file descriptor 3 for the program to write to;
- * it stashes the output somewhere. The output of the program
- * consists of statements:
- * reject [challenge|silent]
- * authorize [root|secure]
- * setenv <name> [<value>]
- * remove <file>
- *
- * Terribly exciting, isn't it?
- * Output cannot exceed AUTHMAXSPOOL characters.
- */
-
-int
-auth_script(const char *path, ...)
-{
- int r;
- va_list ap;
-
- va_start(ap, path);
- r = _auth_script(NULL, 0, path, ap);
- va_end(ap);
- return r;
-}
-
-
-int
-auth_script_data(const char *data, int nbytes, const char *path, ...)
-{
- int r;
- va_list ap;
-
- va_start(ap, path);
- r = _auth_script(data, nbytes, path, ap);
- va_end(ap);
- return r;
-}
-
-
-static void
-add_rmlist(const char *file)
-{
- struct rmfiles *rm;
-
- if ((rm = malloc(sizeof(struct rmfiles) + strlen(file) + 1)) == NULL)
- syslog(LOG_ERR, "add_rmfile malloc: %m");
- else {
- strcpy(rm->file, file);
- rm->next = rmfirst;
- rmfirst = rm;
- }
-}
-
-
-int
-auth_scan(int okay)
-{
- int idx = 0;
- char *line;
-
- while ((line = nextline(&idx)) != NULL) {
- if (!strncasecmp(line, BI_REJECT, sizeof(BI_REJECT)-1)) {
- line += sizeof(BI_REJECT) - 1;
- while (*line && isspace(*line))
- ++line;
- if (*line) {
- if (!strcasecmp(line, "silent"))
- return AUTH_SILENT;
- if (!strcasecmp(line, "challenge"))
- return AUTH_CHALLENGE;
- }
- return 0;
- } else if (!strncasecmp(line, BI_AUTH, sizeof(BI_AUTH)-1)) {
- line += sizeof(BI_AUTH) - 1;
- while (*line && isspace(*line))
- ++line;
- if (*line == '\0')
- okay |= AUTH_OKAY;
- else if (!strcasecmp(line, "root"))
- okay |= AUTH_ROOTOKAY;
- else if (!strcasecmp(line, "secure"))
- okay |= AUTH_SECURE;
- }
- else if (!strncasecmp(line, BI_REMOVE, sizeof(BI_REMOVE)-1)) {
- line += sizeof(BI_REMOVE) - 1;
- while (*line && isspace(*line))
- ++line;
- if (*line)
- add_rmlist(line);
- }
- }
-
- return okay;
-}
-
-
-int
-auth_setopt(const char *n, const char *v)
-{
- int r;
- struct authopts *e;
-
- if ((e = malloc(sizeof(*e) + strlen(n) + strlen(v) + 1)) == NULL)
- r = -1;
- else {
- sprintf(e->opt, "%s=%s", n, v);
- e->next = optfirst;
- optfirst = e;
- r = 0;
- }
- return r;
-}
-
-
-void
-auth_clropts(void)
-{
- struct authopts *e;
-
- while ((e = optfirst) != NULL) {
- optfirst = e->next;
- free(e);
- }
-}
-
-
-void
-auth_rmfiles(void)
-{
- struct rmfiles *rm;
-
- while ((rm = rmfirst) != NULL) {
- unlink(rm->file);
- rmfirst = rm->next;
- free(rm);
- }
-}
-
-#endif
-
-
-/*
- * auth_checknologin()
- * Checks for the existance of a nologin file in the login_cap
- * capability <lc>. If there isn't one specified, then it checks
- * to see if this class should just ignore nologin files. Lastly,
- * it tries to print out the default nologin file, and, if such
- * exists, it exits.
- */
-
-void
-auth_checknologin(login_cap_t *lc)
-{
- char *file;
-
- /* Do we ignore a nologin file? */
- if (login_getcapbool(lc, "ignorenologin", 0))
- return;
-
- /* Note that <file> will be "" if there is no nologin capability */
- if ((file = login_getcapstr(lc, "nologin", "", NULL)) == NULL)
- exit(1);
-
- /*
- * *file is true IFF there was a "nologin" capability
- * Note that auth_cat() returns 1 only if the specified
- * file exists, and is readable. E.g., /.nologin exists.
- */
- if ((*file && auth_cat(file)) || auth_cat(_PATH_NOLOGIN))
- exit(1);
-}
-
-
-/*
- * auth_cat()
- * Checks for the readability of <file>; if it can be opened for
- * reading, it prints it out to stdout, and then exits. Otherwise,
- * it returns 0 (meaning no nologin file).
- */
-
-int
-auth_cat(const char *file)
-{
- int fd, count;
- char buf[BUFSIZ];
-
- if ((fd = open(file, O_RDONLY)) < 0)
- return 0;
- while ((count = read(fd, buf, sizeof(buf))) > 0)
- (void)write(fileno(stdout), buf, count);
- close(fd);
- sleep(5); /* wait an arbitrary time to drain */
- return 1;
-}
diff --git a/lib/libutil/login_cap.3 b/lib/libutil/login_cap.3
deleted file mode 100644
index c998d23..0000000
--- a/lib/libutil/login_cap.3
+++ /dev/null
@@ -1,392 +0,0 @@
-.\" Copyright (c) 1995 David Nugent <davidn@blaze.net.au>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" this list of conditions, and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" David Nugent.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id: login_cap.3,v 1.7 1997/05/18 09:14:11 davidn Exp $
-.\"
-.Dd December 27, 1996
-.Os FreeBSD
-.Dt LOGIN_CAP 3
-.Sh NAME
-.Nm login_getclassbyname ,
-.Nm login_close ,
-.Nm login_getclass ,
-.Nm login_getpwclass ,
-.Nm login_getuserclass ,
-.Nm login_getcapstr ,
-.Nm login_getcaplist ,
-.Nm login_getcaptime ,
-.Nm login_getcapnum ,
-.Nm login_getcapsize ,
-.Nm login_getcapbool ,
-.Nm login_getstyle
-.Nd functions for accessing the login class capabilities database.
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <login_cap.h>
-.Ft void
-.Fn login_close "login_cap_t * lc"
-.Ft login_cap_t *
-.Fn login_getclassbyname "const char *nam" "const struct passwd *pwd"
-.Ft login_cap_t *
-.Fn login_getclass "const char *nam"
-.Ft login_cap_t *
-.Fn login_getpwclass "const struct passwd *pwd"
-.Ft login_cap_t *
-.Fn login_getuserclass "const struct passwd *pwd"
-.Ft char *
-.Fn login_getcapstr "login_cap_t *lc" "const char *cap" "char *def" "char *error"
-.Ft char **
-.Fn login_getcaplist "login_cap_t *lc" "const char *cap" "const char *chars"
-.Ft char *
-.Fn login_getpath "login_cap_t *lc" "const char *cap" "char *error"
-.Ft rlim_t
-.Fn login_getcaptime "login_cap_t *lc" "const char *cap" "rlim_t def" "rlim_t error"
-.Ft rlim_t
-.Fn login_getcapnum "login_cap_t *lc" "const char *cap" "rlim_t def" "rlim_t error"
-.Ft rlim_t
-.Fn login_getcapsize "login_cap_t *lc" "const char *cap" "rlim_t def" "rlim_t error"
-.Ft int
-.Fn login_getcapbool "login_cap_t *lc" "const char *cap" "int def"
-.Ft char *
-.Fn login_getstyle "login_cap_t *lc" "char *style" "const char *auth"
-.Pp
-.Sh DESCRIPTION
-These functions represent a programming interface to the login
-classes database provided in
-.Xr login.conf 5 .
-This database contains capabilities, attributes and default environment
-and accounting settings for users and programs running as specific users,
-as determined by the login class field within entries in
-.Pa /etc/master.passwd .
-.Pp
-Entries in
-.Xr login.conf 5
-consist of colon
-.Ql \&:
-separated fields, the first field in each record being one or more
-identifiers for the record which must be unique for the entire database
-each separated by a '|' and may optionally include a description as
-the last 'name'.
-Remaining fields in the record consist of keyword/data pairs.
-Long lines may be continued with a backslash within empty entries
-with the second and subsequent lines optionally indented for readability.
-This is similar to the format used in
-.Xr termcap 5
-except that keywords are not limited to two significant characters,
-and are usually longer for improved readability.
-As with termcap entries, multiple records can be linked together
-(one record including another) using a field containing tc=<recordid>,
-the result is that the entire record referenced by <recordid> replaces
-the tc= field at the point at which it occurs.
-See
-.Xr getcap 3
-for further details on the format and use of a capabilities database.
-.Pp
-The
-.Nm login_cap
-interface provides a convenient means of retrieving login class
-records with all tc= references expanded.
-A program will typically call one of
-.Fn login_getclass ,
-.Fn login_getpwclass ,
-.Fn login_getuserclass
-or
-.Fn login_getclassbyname
-according to its requirements.
-Each of these functions returns a login capabilities structure,
-.Ft login_cap_t
-which may subsequently be used to interrogate the database for
-specific values using the rest of the API.
-Once the login_cap_t is of no further use, the
-.Fn login_close
-function should be called to free all resources used.
-.Pp
-The structure of login_cap_t is defined in login_cap.h, as:
-.Bd -literal -offset indent
-typedef struct {
- char *lc_class;
- char *lc_cap;
- char *lc_style;
-} login_cap_t;
-.Ed
-.Pp
-The
-.Ar lc_class
-member contains a pointer to the name of the login class
-retrieved.
-This may not necessarily be the same as the one requested,
-either directly via
-.Fn login_getclassbyname ,
-indirectly via a user's login record using
-.Fn login_getpwclass ,
-by class name using
-.Fn login_getclass
-or
-.Fn login_getuserclass .
-If the referenced user has no login class specified in
-.Pa /etc/master.passwd ,
-the class name is NULL or an empty string, or if the class
-specified does not exist in the database, each of these
-functions will search for a record with an id of "default",
-with that name returned in the
-.Ar lc_class
-field.
-.Pp
-The
-.Ar lc_cap
-field is used internally by the library to contain the
-expanded login capabilities record.
-Programs with unusual requirements may wish to use this
-with the lower-level
-.Fn getcap
-style functions to access the record directly.
-.Pp
-The
-.Ar lc_style
-field is set by the
-.Fn login_getstyle
-function to the authorisation style according to the requirements
-of the program handling a login itself.
-.Pp
-As noted above, the
-.Fn get*class
-functions return a login_cap_t object which is used to access
-the matching or default record in the capabilities database.
-.Fn getclassbyname
-accepts two arguments: the first one is the record identifier of the
-record to be retrieved, the second being an optional directory name.
-If the first
-.Ar name
-argument is NULL, an empty string, or a class that does not exist
-in the supplimental or system login class database, then the system
-.Em default
-record is returned instead.
-If the second
-.Ar dir
-parameter is NULL, then only the system login class database is
-used, but when not NULL, the named directory is searched for
-a login database file called ".login_conf", and capability records
-contained within it may override the system defaults.
-This scheme allows users to override some login settings from
-those in the system login class database by creating class records
-for their own private class with a record id of `me'.
-In the context of a
-.Em login ,
-it should be noted that some options cannot by overridden by
-users for two reasons; many options, such as resource settings
-and deafult process priorities, require root privileges
-in order to take effect, and other fields in the user's file are
-not be consulted at all during the early phases of login for
-security or administrative reasons.
-See
-.Xr login.conf 5
-for more information on which settings a user is able to override.
-Typically, these are limited purely to the user's default login
-environment which might otherwise have been overridden in shell
-startup scripts in any case.
-The user's
-.Pa .login_conf
-merely provides a convenient way for a user to set up their preferred
-login environment before the shell is invoked on login.
-.Pp
-If the specified record is NULL, empty or does not exist, and the
-system has no "default" record available to fallback, there is a
-memory allocation error or for some reason
-.Xr cgetent 3
-is unable to access the login capabilities database, this function
-returns NULL.
-.Pp
-The functions
-.Fn login_getpwclass ,
-.Fn login_getclass
-and
-.Fn login_getuserclass
-retrieve the applicable login class record for the user's passwd
-entry or class name by calling
-.Fn login_getclassbyname .
-On failure, NULL is returned.
-The difference between these functions is that
-.Fn login_getuserclass
-includes the user's overriding
-.Pa .login_conf
-that exists in the user's home directory,
-.Fn login_getpwclass,
-and
-.Fn login_getclass
-restricts loookup only to the system login class database in
-.Pa /etc/login.conf .
-.Fn login_getpwclass
-only differs from
-.Fn login_getclass
-in that it allows the default class for user 'root' as "root"
-if none has been specified in the password database.
-Otherwise, if the passwd pointer is NULL, or the user record
-has no login class, then the system "default" entry is retrieved.
-.Pp
-Once a program no longer wishes to use a login_cap_t object,
-.Fn login_close
-may be called to free all resources used by the login class.
-.Fn login_close
-may be passed a NULL pointer with no harmful side-effects.
-.Pp
-The remaining functions may be used to retrieve individual
-capability records.
-Each function takes a login_cap_t object as its first parameter,
-a capability tag as the second, and remaining parameters being
-default and error values that are returned if the capability is
-not found.
-The type of the additional parameters passed and returned depend
-on the
-.Em type
-of capability each deals with, be it a simple string, a list,
-a time value, a file or memory size value, a path (consisting of
-a colon-separated list of directories) or a boolean flag.
-The manpage for
-.Xr login.conf 5
-deals in specific tags and their type.
-.Pp
-Note that with all functions in this group, you should not call
-.Xr free 3
-on any pointers returned.
-Memory allocated during retrieval or processing of capability
-tags is automatically reused by subsequent calls to functions
-in this group, or deallocated on calling
-.Fn login_close .
-.Bl -tag -width "login_getcaplist()"
-.It Fn login_getcapstr
-This function returns a simple string capability.
-If the string is not found, then the value in
-.Ar def
-is returned as the default value, or if an error
-occurs, the value in the
-.Ar error
-parameter is returned.
-.It Fn login_getcaplist
-This function returns the value corresponding to the named
-capability tag as a list of values in a NULL terminated
-array.
-Within the login class database, some tags are of type
-.Em list ,
-which consist of one or more comma- or space separated
-values.
-Usually, this function is not called directly from an
-application, but is used indirectly via
-.Fn login_getstyle .
-.It Fn login_getpath
-This function returns a list of directories separated by colons
-.Ql &: .
-Capability tags for which this function is called consist of a list of
-directories separated by spaces.
-.It Fn login_getcaptime
-This function returns a
-.Em time value
-associated with a particular capability tag with the value expressed
-in seconds (the default), minutes, hours, days, weeks or (365 day)
-years or any combination of these.
-A suffix determines the units used: S for seconds, M for minutes,
-H for hours, D for days, W for weeks and Y for 365 day years.
-Case of the units suffix is ignored.
-.Pp
-Time values are normally used for setting resource, accounting and
-session limits.
-If supported by the operating system and compiler (which is true of
-FreeBSD), the value returned is a quad (long long), of type
-.Em rlim_t .
-A value "inf" or "infinity" may be used to express an infinite
-value, in which case RLIM_INFINITY is returned.
-.It Fn login_getcapnum
-This function returns a numeric value for a tag, expressed either as
-tag=<value> or the standard
-.Fn cgetnum
-format tag#<value>.
-The first format should be used in preference to the second, the
-second format is provided for compatibility and consistency with the
-.Xr getcap 3
-database format where numeric types use the
-.Ql \&#
-as the delimiter for numeric values.
-If in the first format, then the value given may be "inf" or
-"infinity" which results in a return value of RLIM_INFINITY.
-If the given capability tag cannot be found, the
-.Ar def
-parameter is returned, and if an error occurs, the
-.Ar error
-parameter is returned.
-.It Fn login_getcapsize
-.Fn login_getcapsize
-returns a value representing a size (typicially, file or memory)
-which may be expressed as bytes (the default), 512 byte blocks,
-kilobytes, megabytes, gigabytes, and on systems that support the
-.Ar long long
-type, terrabytes.
-The suffix used determines the units, and multiple values and
-units may be used in combination (e.g. 1m500k = 1.5 megabytes).
-A value with no suffix is interpreted as bytes, B as 512-byte
-blocks, K as kilobytes, M as megabytes, G as gigabytes and T as
-terrabytes.
-Case is ignored.
-The error value is returned if there is a login capabilities database
-error, if an invalid suffix is used, or if a numeric value cannot be
-interpreted.
-.It Fn login_getcapbool
-This function returns a boolean value tied to a particular flag.
-It returns 0 if the given capability tag is not present or is
-negated by the presence of a "tag@" (See
-.Xr getcap 3
-for more information on boolean flags), and returns 1 if the tag
-is found.
-.It Fn login_getstyle
-This function is used by the login authorisation system to determine
-the style of login available in a particular case.
-The function accepts three parameters, the login_cap entry itself and
-two optional parameters, and authorisation type 'auth' and 'style', and
-applies these to determine the authorisation style that best suites
-these rules.
-.Bl -bullet -indent offset
-.It
-If 'auth' is neither NULL nor an empty string, look for a tag of type
-"auth-<auth>" in the capability record.
-If not present, then look for the default default tag "auth=".
-.It
-If no valid authorisation list was found from the previous step, then
-default to "passwd" as the authorisation list.
-.It
-If 'style' is not NULL or empty, look for it in the list of authorisation
-methods found from the pprevious step.
-If 'style' is NULL or an empty string, then default to "passwd"
-authorisation.
-.It
-If 'style' is found in the chosen list of authorisation methods, then
-return that, otherwise return NULL.
-.El
-.Pp
-This scheme allows the administrator to determine the types of
-authorisation methods accepted by the system, depending on the
-means by which the access occurs.
-For example, the administrator may require skey or kerberos as
-the authentication method used for access to the system via the
-network, and standard methods via direct dialup or console
-logins, significantly reducing the risk of password discovery
-by "snooping" network packets.
-.El
-.Sh SEE ALSO
-.Xr getcap 3 ,
-.Xr login_class 3 ,
-.Xr login.conf 5 ,
-.Xr termcap 5
diff --git a/lib/libutil/login_cap.c b/lib/libutil/login_cap.c
deleted file mode 100644
index 0369907..0000000
--- a/lib/libutil/login_cap.c
+++ /dev/null
@@ -1,780 +0,0 @@
-/*-
- * Copyright (c) 1996 by
- * Sean Eric Fagan <sef@kithrup.com>
- * David Nugent <davidn@blaze.net.au>
- * All rights reserved.
- *
- * Portions copyright (c) 1995,1997
- * Berkeley Software Design, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. This work was done expressly for inclusion into FreeBSD. Other use
- * is permitted provided this notation is included.
- * 4. Absolutely no warranty of function or purpose is made by the authors.
- * 5. Modifications may be freely made to this file providing the above
- * conditions are met.
- *
- * Low-level routines relating to the user capabilities database
- *
- * $Id: login_cap.c,v 1.13 1997/05/11 08:07:29 davidn Exp $
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/param.h>
-#include <pwd.h>
-#include <libutil.h>
-#include <syslog.h>
-#include <login_cap.h>
-
-/*
- * allocstr()
- * Manage a single static pointer for handling a local char* buffer,
- * resizing as necessary to contain the string.
- *
- * allocarray()
- * Manage a static array for handling a group of strings, resizing
- * when necessary.
- */
-
-static int lc_object_count = 0;
-
-static size_t internal_stringsz = 0;
-static char * internal_string = NULL;
-static size_t internal_arraysz = 0;
-static char ** internal_array = NULL;
-
-static char *
-allocstr(char *str)
-{
- char *p;
-
- size_t sz = strlen(str) + 1; /* realloc() only if necessary */
- if (sz <= internal_stringsz)
- p = strcpy(internal_string, str);
- else if ((p = realloc(internal_string, sz)) != NULL) {
- internal_stringsz = sz;
- internal_string = strcpy(p, str);
- }
- return p;
-}
-
-
-static char **
-allocarray(size_t sz)
-{
- char **p;
-
- if (sz <= internal_arraysz)
- p = internal_array;
- else if ((p = realloc(internal_array, sz * sizeof(char*))) != NULL) {
- internal_arraysz = sz;
- internal_array = p;
- }
- return p;
-}
-
-
-/*
- * arrayize()
- * Turn a simple string <str> seperated by any of
- * the set of <chars> into an array. The last element
- * of the array will be NULL, as is proper.
- * Free using freearraystr()
- */
-
-static char **
-arrayize(char *str, const char *chars, int *size)
-{
- int i;
- char *ptr;
- char **res = NULL;
-
- /* count the sub-strings */
- for (i = 0, ptr = str; *ptr; i++) {
- int count = strcspn(ptr, chars);
- ptr += count;
- if (*ptr)
- ++ptr;
- }
-
- /* alloc the array */
- if ((ptr = allocstr(str)) != NULL) {
- if ((res = allocarray(++i)) == NULL)
- free(str);
- else {
- /* now split the string */
- i = 0;
- while (*ptr) {
- int count = strcspn(ptr, chars);
- res[i++] = ptr;
- ptr += count;
- if (*ptr)
- *ptr++ = '\0';
- }
- res[i] = NULL;
- }
- }
-
- if (size)
- *size = i;
-
- return res;
-}
-
-
-/*
- * login_close()
- * Frees up all resources relating to a login class
- *
- */
-
-void
-login_close(login_cap_t * lc)
-{
- if (lc) {
- free(lc->lc_style);
- free(lc->lc_class);
- free(lc);
- if (--lc_object_count == 0) {
- free(internal_string);
- free(internal_array);
- internal_array = NULL;
- internal_arraysz = 0;
- internal_string = NULL;
- internal_stringsz = 0;
- cgetclose();
- }
- }
-}
-
-
-/*
- * login_getclassbyname() get the login class by its name.
- * If the name given is NULL or empty, the default class
- * LOGIN_DEFCLASS (ie. "default") is fetched. If the
- * 'dir' argument contains a non-NULL non-empty string,
- * then the file _FILE_LOGIN_CONF is picked up from that
- * directory instead of the system login database.
- * Return a filled-out login_cap_t structure, including
- * class name, and the capability record buffer.
- */
-
-login_cap_t *
-login_getclassbyname(char const *name, const struct passwd *pwd)
-{
- login_cap_t *lc;
-
- if ((lc = malloc(sizeof(login_cap_t))) != NULL) {
- int r, i = 0;
- const char *msg = NULL;
- const char *dir = (pwd == NULL) ? NULL : pwd->pw_dir;
- char userpath[MAXPATHLEN];
-
- static char *login_dbarray[] = { NULL, NULL, NULL };
-
- if (dir && snprintf(userpath, MAXPATHLEN, "%s/%s", dir,
- _FILE_LOGIN_CONF) < MAXPATHLEN) {
- login_dbarray[i] = userpath;
- if (_secure_path(userpath, pwd->pw_uid, pwd->pw_gid) != -1)
- i++; /* only use 'secure' data */
- }
- if (_secure_path(_PATH_LOGIN_CONF, 0, 0) != -1)
- login_dbarray[i++] = _PATH_LOGIN_CONF;
- login_dbarray[i] = NULL;
-
- memset(lc, 0, sizeof(login_cap_t));
- lc->lc_cap = lc->lc_class = lc->lc_style = NULL;
-
- if (name == NULL || *name == '\0')
- name = LOGIN_DEFCLASS;
-
- switch (cgetent(&lc->lc_cap, login_dbarray, (char*)name)) {
- case -1: /* Failed, entry does not exist */
- if (strcmp(name, LOGIN_MECLASS) == 0)
- break; /* Don't retry default on 'me' */
- if (i == 0)
- r = -1;
- else if ((r = open(login_dbarray[0], O_RDONLY)) >= 0)
- close(r);
- /*
- * If there's at least one login class database,
- * and we aren't searching for a default class
- * then complain about a non-existent class.
- */
- if (r >= 0 || strcmp(name, LOGIN_DEFCLASS) != 0)
- syslog(LOG_ERR, "login_getclass: unknown class '%s'", name);
- /* fall-back to default class */
- name = LOGIN_DEFCLASS;
- msg = "%s: no default/fallback class '%s'";
- if (cgetent(&lc->lc_cap, login_dbarray, (char*)name) != 0 && r >= 0)
- break;
- /* Fallthru - just return system defaults */
- case 0: /* success! */
- if ((lc->lc_class = strdup(name)) != NULL) {
- ++lc_object_count;
- return lc;
- }
- msg = "%s: strdup: %m";
- break;
- case -2:
- msg = "%s: retrieving class information: %m";
- break;
- case -3:
- msg = "%s: 'tc=' reference loop '%s'";
- break;
- case 1:
- msg = "couldn't resolve 'tc=' reference in '%s'";
- break;
- default:
- msg = "%s: unexpected cgetent() error '%s': %m";
- break;
- }
- if (msg != NULL)
- syslog(LOG_ERR, msg, "login_getclass", name);
- free(lc);
- }
-
- return NULL;
-}
-
-
-
-/*
- * login_getclass()
- * Get the login class for the system (only) login class database.
- * Return a filled-out login_cap_t structure, including
- * class name, and the capability record buffer.
- */
-
-login_cap_t *
-login_getclass(const char *cls)
-{
- return login_getclassbyname(cls, NULL);
-}
-
-
-/*
- * login_getclass()
- * Get the login class for a given password entry from
- * the system (only) login class database.
- * If the password entry's class field is not set, or
- * the class specified does not exist, then use the
- * default of LOGIN_DEFCLASS (ie. "default").
- * Return a filled-out login_cap_t structure, including
- * class name, and the capability record buffer.
- */
-
-login_cap_t *
-login_getpwclass(const struct passwd *pwd)
-{
- const char *cls = NULL;
-
- if (pwd != NULL) {
- cls = pwd->pw_class;
- if (cls == NULL || *cls == '\0')
- cls = (pwd->pw_uid == 0) ? LOGIN_DEFROOTCLASS : LOGIN_DEFCLASS;
- }
- return login_getclassbyname(cls, pwd);
-}
-
-
-/*
- * login_getuserclass()
- * Get the login class for a given password entry, allowing user
- * overrides via ~/.login_conf.
- */
-
-login_cap_t *
-login_getuserclass(const struct passwd *pwd)
-{
- return login_getclassbyname(LOGIN_MECLASS, pwd);
-}
-
-
-
-/*
- * login_getcapstr()
- * Given a login_cap entry, and a capability name, return the
- * value defined for that capability, a defualt if not found, or
- * an error string on error.
- */
-
-char *
-login_getcapstr(login_cap_t *lc, const char *cap, char *def, char *error)
-{
- char *res;
- int ret;
-
- if (lc == NULL || cap == NULL || lc->lc_cap == NULL || *cap == '\0')
- return def;
-
- if ((ret = cgetstr(lc->lc_cap, (char *)cap, &res)) == -1)
- return def;
- return (ret >= 0) ? res : error;
-}
-
-
-/*
- * login_getcaplist()
- * Given a login_cap entry, and a capability name, return the
- * value defined for that capability split into an array of
- * strings.
- */
-
-char **
-login_getcaplist(login_cap_t *lc, const char *cap, const char *chars)
-{
- char *lstring;
-
- if (chars == NULL)
- chars = ", \t";
- if ((lstring = login_getcapstr(lc, (char*)cap, NULL, NULL)) != NULL)
- return arrayize(lstring, chars, NULL);
- return NULL;
-}
-
-
-/*
- * login_getpath()
- * From the login_cap_t <lc>, get the capability <cap> which is
- * formatted as either a space or comma delimited list of paths
- * and append them all into a string and separate by semicolons.
- * If there is an error of any kind, return <error>.
- */
-
-char *
-login_getpath(login_cap_t *lc, const char *cap, char * error)
-{
- char *str;
-
- if ((str = login_getcapstr(lc, (char*)cap, NULL, NULL)) == NULL)
- str = error;
- else {
- char *ptr = str;
-
- while (*ptr) {
- int count = strcspn(ptr, ", \t");
- ptr += count;
- if (*ptr)
- *ptr++ = ':';
- }
- }
- return str;
-}
-
-
-static int
-isinfinite(const char *s)
-{
- static const char *infs[] = {
- "infinity",
- "inf",
- "unlimited",
- "unlimit",
- "-1",
- NULL
- };
- const char **i = &infs[0];
-
- while (*i != NULL) {
- if (strcasecmp(s, *i) == 0)
- return 1;
- ++i;
- }
- return 0;
-}
-
-
-static u_quad_t
-rmultiply(u_quad_t n1, u_quad_t n2)
-{
- u_quad_t m, r;
- int b1, b2;
-
- static int bpw = 0;
-
- /* Handle simple cases */
- if (n1 == 0 || n2 == 0)
- return 0;
- if (n1 == 1)
- return n2;
- if (n2 == 1)
- return n1;
-
- /*
- * sizeof() returns number of bytes needed for storage.
- * This may be different from the actual number of useful bits.
- */
- if (!bpw) {
- bpw = sizeof(u_quad_t) * 8;
- while (((u_quad_t)1 << (bpw-1)) == 0)
- --bpw;
- }
-
- /*
- * First check the magnitude of each number. If the sum of the
- * magnatude is way to high, reject the number. (If this test
- * is not done then the first multiply below may overflow.)
- */
- for (b1 = bpw; (((u_quad_t)1 << (b1-1)) & n1) == 0; --b1)
- ;
- for (b2 = bpw; (((u_quad_t)1 << (b2-1)) & n2) == 0; --b2)
- ;
- if (b1 + b2 - 2 > bpw) {
- errno = ERANGE;
- return (UQUAD_MAX);
- }
-
- /*
- * Decompose the multiplication to be:
- * h1 = n1 & ~1
- * h2 = n2 & ~1
- * l1 = n1 & 1
- * l2 = n2 & 1
- * (h1 + l1) * (h2 + l2)
- * (h1 * h2) + (h1 * l2) + (l1 * h2) + (l1 * l2)
- *
- * Since h1 && h2 do not have the low bit set, we can then say:
- *
- * (h1>>1 * h2>>1 * 4) + ...
- *
- * So if (h1>>1 * h2>>1) > (1<<(bpw - 2)) then the result will
- * overflow.
- *
- * Finally, if MAX - ((h1 * l2) + (l1 * h2) + (l1 * l2)) < (h1*h2)
- * then adding in residual amout will cause an overflow.
- */
-
- m = (n1 >> 1) * (n2 >> 1);
- if (m >= ((u_quad_t)1 << (bpw-2))) {
- errno = ERANGE;
- return (UQUAD_MAX);
- }
- m *= 4;
-
- r = (n1 & n2 & 1)
- + (n2 & 1) * (n1 & ~(u_quad_t)1)
- + (n1 & 1) * (n2 & ~(u_quad_t)1);
-
- if ((u_quad_t)(m + r) < m) {
- errno = ERANGE;
- return (UQUAD_MAX);
- }
- m += r;
-
- return (m);
-}
-
-
-/*
- * login_getcaptime()
- * From the login_cap_t <lc>, get the capability <cap>, which is
- * formatted as a time (e.g., "<cap>=10h3m2s"). If <cap> is not
- * present in <lc>, return <def>; if there is an error of some kind,
- * return <error>.
- */
-
-rlim_t
-login_getcaptime(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error)
-{
- char *res, *ep, *oval;
- int r;
- rlim_t tot;
-
- errno = 0;
- if (lc == NULL || lc->lc_cap == NULL)
- return def;
-
- /*
- * Look for <cap> in lc_cap.
- * If it's not there (-1), return <def>.
- * If there's an error, return <error>.
- */
-
- if ((r = cgetstr(lc->lc_cap, (char *)cap, &res)) == -1)
- return def;
- else if (r < 0) {
- errno = ERANGE;
- return error;
- }
-
- /* "inf" and "infinity" are special cases */
- if (isinfinite(res))
- return RLIM_INFINITY;
-
- /*
- * Now go through the string, turning something like 1h2m3s into
- * an integral value. Whee.
- */
-
- errno = 0;
- tot = 0;
- oval = res;
- while (*res) {
- rlim_t tim = strtoq(res, &ep, 0);
- rlim_t mult = 1;
-
- if (ep == NULL || ep == res || errno != 0) {
- invalid:
- syslog(LOG_WARNING, "login_getcaptime: class '%s' bad value %s=%s",
- lc->lc_class, cap, oval);
- errno = ERANGE;
- return error;
- }
- /* Look for suffixes */
- switch (*ep++) {
- case 0:
- ep--;
- break; /* end of string */
- case 's': case 'S': /* seconds */
- break;
- case 'm': case 'M': /* minutes */
- mult = 60;
- break;
- case 'h': case 'H': /* hours */
- mult = 60L * 60L;
- break;
- case 'd': case 'D': /* days */
- mult = 60L * 60L * 24L;
- break;
- case 'w': case 'W': /* weeks */
- mult = 60L * 60L * 24L * 7L;
- break;
- case 'y': case 'Y': /* 365-day years */
- mult = 60L * 60L * 24L * 365L;
- break;
- default:
- goto invalid;
- }
- res = ep;
- tot += rmultiply(tim, mult);
- if (errno)
- goto invalid;
- }
-
- return tot;
-}
-
-
-/*
- * login_getcapnum()
- * From the login_cap_t <lc>, extract the numerical value <cap>.
- * If it is not present, return <def> for a default, and return
- * <error> if there is an error.
- * Like login_getcaptime(), only it only converts to a number, not
- * to a time; "infinity" and "inf" are 'special.'
- */
-
-rlim_t
-login_getcapnum(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error)
-{
- char *ep, *res;
- int r;
- rlim_t val;
-
- if (lc == NULL || lc->lc_cap == NULL)
- return def;
-
- /*
- * For BSDI compatibility, try for the tag=<val> first
- */
- if ((r = cgetstr(lc->lc_cap, (char *)cap, &res)) == -1) {
- long lval;
- /* string capability not present, so try for tag#<val> as numeric */
- if ((r = cgetnum(lc->lc_cap, (char *)cap, &lval)) == -1)
- return def; /* Not there, so return default */
- else if (r >= 0)
- return (rlim_t)lval;
- }
-
- if (r < 0) {
- errno = ERANGE;
- return error;
- }
-
- if (isinfinite(res))
- return RLIM_INFINITY;
-
- errno = 0;
- val = strtoq(res, &ep, 0);
- if (ep == NULL || ep == res || errno != 0) {
- syslog(LOG_WARNING, "login_getcapnum: class '%s' bad value %s=%s",
- lc->lc_class, cap, res);
- errno = ERANGE;
- return error;
- }
-
- return val;
-}
-
-
-
-/*
- * login_getcapsize()
- * From the login_cap_t <lc>, extract the capability <cap>, which is
- * formatted as a size (e.g., "<cap>=10M"); it can also be "infinity".
- * If not present, return <def>, or <error> if there is an error of
- * some sort.
- */
-
-rlim_t
-login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error)
-{
- char *ep, *res, *oval;
- int r;
- rlim_t tot;
-
- if (lc == NULL || lc->lc_cap == NULL)
- return def;
-
- if ((r = cgetstr(lc->lc_cap, (char *)cap, &res)) == -1)
- return def;
- else if (r < 0) {
- errno = ERANGE;
- return error;
- }
-
- if (isinfinite(res))
- return RLIM_INFINITY;
-
- errno = 0;
- tot = 0;
- oval = res;
- while (*res) {
- rlim_t siz = strtoq(res, &ep, 0);
- rlim_t mult = 1;
-
- if (ep == NULL || ep == res || errno != 0) {
- invalid:
- syslog(LOG_WARNING, "login_getcapsize: class '%s' bad value %s=%s",
- lc->lc_class, cap, oval);
- errno = ERANGE;
- return error;
- }
- switch (*ep++) {
- case 0: /* end of string */
- ep--;
- break;
- case 'b': case 'B': /* 512-byte blocks */
- mult = 512;
- break;
- case 'k': case 'K': /* 1024-byte Kilobytes */
- mult = 1024;
- break;
- case 'm': case 'M': /* 1024-k kbytes */
- mult = 1024 * 1024;
- break;
- case 'g': case 'G': /* 1Gbyte */
- mult = 1024 * 1024 * 1024;
- break;
- case 't': case 'T': /* 1TBte */
- mult = 1024LL * 1024LL * 1024LL * 1024LL;
- break;
- default:
- goto invalid;
- }
- res = ep;
- tot += rmultiply(siz, mult);
- if (errno)
- goto invalid;
- }
-
- return tot;
-}
-
-
-/*
- * login_getcapbool()
- * From the login_cap_t <lc>, check for the existance of the capability
- * of <cap>. Return <def> if <lc>->lc_cap is NULL, otherwise return
- * the whether or not <cap> exists there.
- */
-
-int
-login_getcapbool(login_cap_t *lc, const char *cap, int def)
-{
- if (lc == NULL || lc->lc_cap == NULL)
- return def;
- return (cgetcap(lc->lc_cap, (char *)cap, ':') != NULL);
-}
-
-
-/*
- * login_getstyle()
- * Given a login_cap entry <lc>, and optionally a type of auth <auth>,
- * and optionally a style <style>, find the style that best suits these
- * rules:
- * 1. If <auth> is non-null, look for an "auth-<auth>=" string
- * in the capability; if not present, default to "auth=".
- * 2. If there is no auth list found from (1), default to
- * "passwd" as an authorization list.
- * 3. If <style> is non-null, look for <style> in the list of
- * authorization methods found from (2); if <style> is NULL, default
- * to LOGIN_DEFSTYLE ("passwd").
- * 4. If the chosen style is found in the chosen list of authorization
- * methods, return that; otherwise, return NULL.
- * E.g.:
- * login_getstyle(lc, NULL, "ftp");
- * login_getstyle(lc, "login", NULL);
- * login_getstyle(lc, "skey", "network");
- */
-
-char *
-login_getstyle(login_cap_t *lc, char *style, const char *auth)
-{
- int i;
- char **authtypes = NULL;
- char *auths= NULL;
- char realauth[64];
-
- static char *defauthtypes[] = { LOGIN_DEFSTYLE, NULL };
-
- if (auth != NULL && *auth != '\0') {
- if (snprintf(realauth, sizeof realauth, "auth-%s", auth) < sizeof realauth)
- authtypes = login_getcaplist(lc, realauth, NULL);
- }
-
- if (authtypes == NULL)
- authtypes = login_getcaplist(lc, "auth", NULL);
-
- if (authtypes == NULL)
- authtypes = defauthtypes;
-
- /*
- * We have at least one authtype now; auths is a comma-seperated
- * (or space-separated) list of authentication types. We have to
- * convert from this to an array of char*'s; authtypes then gets this.
- */
- i = 0;
- if (style != NULL && *style != '\0') {
- while (authtypes[i] != NULL && strcmp(style, authtypes[i]) != 0)
- i++;
- }
-
- lc->lc_style = NULL;
- if (authtypes[i] != NULL && (auths = strdup(authtypes[i])) != NULL)
- lc->lc_style = auths;
-
- if (lc->lc_style != NULL)
- lc->lc_style = strdup(lc->lc_style);
-
- return lc->lc_style;
-}
diff --git a/lib/libutil/login_cap.h b/lib/libutil/login_cap.h
deleted file mode 100644
index f380936..0000000
--- a/lib/libutil/login_cap.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*-
- * Copyright (c) 1996 by
- * Sean Eric Fagan <sef@kithrup.com>
- * David Nugent <davidn@blaze.net.au>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. This work was done expressly for inclusion into FreeBSD. Other use
- * is permitted provided this notation is included.
- * 4. Absolutely no warranty of function or purpose is made by the authors.
- * 5. Modifications may be freely made to this file providing the above
- * conditions are met.
- *
- * Low-level routines relating to the user capabilities database
- *
- * Was login_cap.h,v 1.9 1997/05/07 20:00:01 eivind Exp
- * $Id: login_cap.h,v 1.1 1997/05/10 12:49:30 davidn Exp $
- */
-
-#ifndef _LOGIN_CAP_H_
-#define _LOGIN_CAP_H_
-
-#define LOGIN_DEFCLASS "default"
-#define LOGIN_DEFROOTCLASS "root"
-#define LOGIN_MECLASS "me"
-#define LOGIN_DEFSTYLE "passwd"
-#define LOGIN_DEFSERVICE "login"
-#define LOGIN_DEFUMASK 022
-#define LOGIN_DEFPRI 0
-#define _PATH_LOGIN_CONF "/etc/login.conf"
-#define _FILE_LOGIN_CONF ".login_conf"
-#define _PATH_AUTHPROG "/usr/libexec/login_"
-
-#define LOGIN_SETGROUP 0x0001 /* set group */
-#define LOGIN_SETLOGIN 0x0002 /* set login (via setlogin) */
-#define LOGIN_SETPATH 0x0004 /* set path */
-#define LOGIN_SETPRIORITY 0x0008 /* set priority */
-#define LOGIN_SETRESOURCES 0x0010 /* set resources (cputime, etc.) */
-#define LOGIN_SETUMASK 0x0020 /* set umask, obviously */
-#define LOGIN_SETUSER 0x0040 /* set user (via setuid) */
-#define LOGIN_SETENV 0x0080 /* set user environment */
-#define LOGIN_SETALL 0x00ff /* set everything */
-
-#define BI_AUTH "authorize" /* accepted authentication */
-#define BI_REJECT "reject" /* rejected authentication */
-#define BI_CHALLENG "reject challenge" /* reject with a challenge */
-#define BI_SILENT "reject silent" /* reject silently */
-#define BI_REMOVE "remove" /* remove file on error */
-#define BI_ROOTOKAY "authorize root" /* root authenticated */
-#define BI_SECURE "authorize secure" /* okay on non-secure line */
-#define BI_SETENV "setenv" /* set environment variable */
-#define BI_VALUE "value" /* set local variable */
-
-#define AUTH_OKAY 0x01 /* user authenticated */
-#define AUTH_ROOTOKAY 0x02 /* root login okay */
-#define AUTH_SECURE 0x04 /* secure login */
-#define AUTH_SILENT 0x08 /* silent rejection */
-#define AUTH_CHALLENGE 0x10 /* a chellenge was given */
-
-#define AUTH_ALLOW (AUTH_OKAY | AUTH_ROOTOKAY | AUTH_SECURE)
-
-typedef struct login_cap {
- char *lc_class;
- char *lc_cap;
- char *lc_style;
-} login_cap_t;
-
-typedef struct login_time {
- u_short lt_start; /* Start time */
- u_short lt_end; /* End time */
-#define LTM_NONE 0x00
-#define LTM_SUN 0x01
-#define LTM_MON 0x02
-#define LTM_TUE 0x04
-#define LTM_WED 0x08
-#define LTM_THU 0x10
-#define LTM_FRI 0x20
-#define LTM_SAT 0x40
-#define LTM_ANY 0x7F
-#define LTM_WK 0x3E
-#define LTM_WD 0x41
- u_char lt_dow; /* Days of week */
-} login_time_t;
-
-#define LC_MAXTIMES 64
-
-#include <sys/cdefs.h>
-__BEGIN_DECLS
-struct passwd;
-
-void login_close __P((login_cap_t *));
-login_cap_t *login_getclassbyname __P((const char *, const struct passwd *));
-login_cap_t *login_getclass __P((const char *));
-login_cap_t *login_getpwclass __P((const struct passwd *));
-login_cap_t *login_getuserclass __P((const struct passwd *));
-
-char *login_getcapstr __P((login_cap_t*, const char *, char *, char *));
-char **login_getcaplist __P((login_cap_t *, const char *, const char *));
-char *login_getstyle __P((login_cap_t *, char *, const char *));
-rlim_t login_getcaptime __P((login_cap_t *, const char *, rlim_t, rlim_t));
-rlim_t login_getcapnum __P((login_cap_t *, const char *, rlim_t, rlim_t));
-rlim_t login_getcapsize __P((login_cap_t *, const char *, rlim_t, rlim_t));
-char *login_getpath __P((login_cap_t *, const char *, char *));
-int login_getcapbool __P((login_cap_t *, const char *, int));
-
-int setclasscontext __P((const char*, unsigned int));
-int setusercontext __P((login_cap_t*, const struct passwd*, uid_t, unsigned int));
-void setclassresources __P((login_cap_t *));
-void setclassenvironment __P((login_cap_t *, const struct passwd *, int));
-
-/* Most of these functions are deprecated */
-int auth_approve __P((login_cap_t*, const char*, const char*));
-int auth_check __P((const char *, const char *, const char *, const char *, int *));
-void auth_env __P((void));
-char *auth_mkvalue __P((const char *n));
-int auth_response __P((const char *, const char *, const char *, const char *, int *, const char *, const char *));
-void auth_rmfiles __P((void));
-int auth_scan __P((int));
-int auth_script __P((const char*, ...));
-int auth_script_data __P((const char *, int, const char *, ...));
-char *auth_valud __P((const char *));
-int auth_setopt __P((const char *, const char *));
-void auth_clropts __P((void));
-
-void auth_checknologin __P((login_cap_t*));
-int auth_cat __P((const char*));
-
-int auth_ttyok __P((login_cap_t*, const char *));
-int auth_hostok __P((login_cap_t*, const char *, char const *));
-int auth_timeok __P((login_cap_t*, time_t));
-
-struct tm;
-
-login_time_t parse_lt __P((const char *));
-int in_ltm __P((const login_time_t *, struct tm *, time_t *));
-int in_ltms __P((const login_time_t *, struct tm *, time_t *));
-
-/* helper functions */
-
-int login_strinlist __P((char **, char const *, int));
-int login_str2inlist __P((char **, const char *, const char *, int));
-login_time_t * login_timelist __P((login_cap_t *, char const *, int *, login_time_t **));
-int login_ttyok __P((login_cap_t *, const char *, const char *, const char *));
-int login_hostok __P((login_cap_t *, const char *, const char *, const char *, const char *));
-
-__END_DECLS
-
-#endif /* _LOGIN_CAP_H_ */
diff --git a/lib/libutil/login_class.3 b/lib/libutil/login_class.3
deleted file mode 100644
index f74803c..0000000
--- a/lib/libutil/login_class.3
+++ /dev/null
@@ -1,187 +0,0 @@
-.\" Copyright (c) 1995 David Nugent <davidn@blaze.net.au>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" this list of conditions, and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" David Nugent.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id: login_class.3,v 1.4 1997/02/22 15:08:20 peter Exp $
-.\"
-.Dd December 28, 1996
-.Os FreeBSD
-.Dt LOGIN_CLASS 3
-.Sh NAME
-.Nm setclasscontext ,
-.Nm setusercontext ,
-.Nm setclassresources ,
-.Nm setclassenvironment
-.Nd functions for using the login class capabilities database.
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <login_cap.h>
-.Ft int
-.Fn setclasscontext "const char *classname" "unsigned int flags"
-.Ft int
-.Fn setusercontext "login_cap_t *lc" "const struct passwd *pwd" "uid_t uid" "unsigned int flags"
-.Ft void
-.Fn setclassresources "login_cap_t *lc"
-.Ft void
-.Fn setclassenvironment "login_cap_t *lc" "const struct passwd *pwd" "int paths"
-.Pp
-.Sh DESCRIPTION
-These functions provide a higher level interface to the login class
-database than those documented in
-.Xr login_cap 3 .
-These functions are used to set resource limits, environment and
-accounting settings for users on logging into the system and when
-selecting an appropriate set of environment and resource settings
-for system daemons based on login classes.
-These functions may only be called if the current process is
-running with root priviledges.
-If the LOGIN_SETLOGIN flag is used this function calls
-.Xr setlogin 2 ,
-and due care must be taken as detailed in the manpage for that
-function and this affects all processes running in the same session
-and not just the current process.
-.Pp
-.Fn setclasscontext
-sets various class context values (resource limits, umask and
-process priorities) based on values for a specific named class.
-.Pp
-The function
-.Fn setusercontext
-sets class context values based on a given login_cap_t
-object, a specific passwd record (if login_cap_t is NULL),
-sets the current session's login and the current process
-user and group ownership.
-Each of these functions is selectable via bit-flags passed
-in the
-.Ar flags
-parameter, which is comprised of one or more of the following:
-.Bl -tag -width LOGIN_SETRESOURCES
-.It LOGIN_SETLOGIN
-Set the login associated with the current session to the user
-specified in the passwd structure.
-.Xr setlogin 2 .
-The
-.Ar pwd
-parameter must not be NULL if this option is used.
-.It LOGIN_SETUSER
-Set ownship of the current process to the uid specified in the
-.Ar uid
-parameter using
-.Xr setuid 2 .
-.It LOGIN_SETGROUP
-Set group ownership of the current process to the group id
-specified in the passwd structure using
-.Xr setgid 2 ,
-and calls
-.Xr initgroups 3
-to set up the group access list for the current process.
-The
-.Ar pwd
-parameter must not be NULL if this option is used.
-.It LOGIN_SETRESOURCES
-Set resource limits for the current process based on values
-specified in the system login class database.
-Class capability tags used, with and without -cur (soft limit)
-or -max (hard limit) suffixes and the corresponding resource
-setting:
-.Bd -literal
-cputime RLIMIT_CPU
-filesize RLIMIT_FSIZE
-datasize RLIMIT_DATA
-stacksize RLIMIT_STACK
-coredumpsize RLIMIT_CORE
-memoryuse RLIMIT_RSS
-memorylocked RLIMIT_MEMLOCK
-maxproc RLIMIT_NPROC
-openfiles RLIMIT_NOFILE
-.Ed
-.It LOGIN_SETPRIORITY
-Set the scheduling priority for the current process based on the
-value specified in the system login class database.
-Class capability tags used:
-.Bd -literal
-priority
-.Ed
-.It LOGIN_SETUMASK
-Set the umask for the current process to a value in the user or
-system login class database.
-Class capability tags used:
-.Bd -literal
-umask
-.Ed
-.It LOGIN_SETPATH
-Set the "path" and "manpath" environment variables based on values
-in the user or system login class database.
-Class capability tags used with the corresponding environment
-variables set:
-.Bd -literal
-path PATH
-manpath MANPATH
-.Ed
-.It LOGIN_SETENV
-Set various environment variables based on values in the user or
-system login class database.
-Class capability tags used with the corresponding environment
-variables set:
-.Bd -literal
-lang LANG
-charset MM_CHARSET
-timezone TZ
-term TERM
-.Ed
-.Pp
-Additional environment variables may be set using the list type
-capability "setenv=var1 val1,var2 val2..,varN valN".
-.It LOGIN_SETALL
-Enables all of the above settings.
-.El
-.Pp
-Note that when setting environment variables and a valid passwd
-pointer is provided in the
-.Ar pwd
-parameter, the characters
-.Ql \&~
-and
-.Ql \&$
-are substituted for the user's home directory and login name
-respectively.
-.Pp
-The
-.Fn setclassresources
-and
-.Fn setclassenvironment
-functions are subsets of the setcontext functions above, but may
-be useful in isolation.
-.Sh RETURN VALUES
-.Fn setclasscontext
-and
-.Fn setusercontext
-return -1 if an error occured, or 0 on success.
-If an error occurs when attempting to set the user, login, group
-or resources, a message is reported to
-.Xr syslog 3 ,
-with LOG_ERR priority and directed to the currently active facility.
-.Sh SEE ALSO
-.Xr setgid 2 ,
-.Xr setlogin 2 ,
-.Xr setuid 2 ,
-.Xr getcap 3 ,
-.Xr initgroups 3 ,
-.Xr login_cap 3 ,
-.Xr login.conf 5 ,
-.Xr termcap 5
diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c
deleted file mode 100644
index 73190e9..0000000
--- a/lib/libutil/login_class.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/*-
- * Copyright (c) 1996 by
- * Sean Eric Fagan <sef@kithrup.com>
- * David Nugent <davidn@blaze.net.au>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. This work was done expressly for inclusion into FreeBSD. Other use
- * is permitted provided this notation is included.
- * 4. Absolutely no warranty of function or purpose is made by the authors.
- * 5. Modifications may be freely made to this file providing the above
- * conditions are met.
- *
- * High-level routines relating to use of the user capabilities database
- *
- * $Id: login_class.c,v 1.5 1997/02/22 15:08:22 peter Exp $
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <fcntl.h>
-#include <pwd.h>
-#include <syslog.h>
-#include <login_cap.h>
-#include <paths.h>
-
-
-#undef UNKNOWN
-#define UNKNOWN "su"
-
-
-static struct login_res {
- const char *what;
- rlim_t (*who)(login_cap_t *, const char *, rlim_t, rlim_t);
- int why;
-} resources[] = {
- { "cputime", login_getcaptime, RLIMIT_CPU },
- { "filesize", login_getcapsize, RLIMIT_FSIZE },
- { "datasize", login_getcapsize, RLIMIT_DATA },
- { "stacksize", login_getcapsize, RLIMIT_STACK },
- { "memoryuse", login_getcapsize, RLIMIT_RSS },
- { "memorylocked", login_getcapsize, RLIMIT_MEMLOCK },
- { "maxproc", login_getcapnum, RLIMIT_NPROC },
- { "openfiles", login_getcapnum, RLIMIT_NOFILE },
- { "coredumpsize", login_getcapsize, RLIMIT_CORE },
- { NULL, 0, 0 }
-};
-
-
-void
-setclassresources(login_cap_t *lc)
-{
- struct login_res *lr;
-
- if (lc == NULL)
- return;
-
- for (lr = resources; lr->what != NULL; ++lr) {
- struct rlimit rlim;
-
- /*
- * The login.conf file can have <limit>, <limit>-max, and
- * <limit>-cur entries.
- * What we do is get the current current- and maximum- limits.
- * Then, we try to get an entry for <limit> from the capability,
- * using the current and max limits we just got as the
- * default/error values.
- * *Then*, we try looking for <limit>-cur and <limit>-max,
- * again using the appropriate values as the default/error
- * conditions.
- */
-
- if (getrlimit(lr->why, &rlim) != 0)
- syslog(LOG_ERR, "getting %s resource limit: %m", lr->what);
- else {
- char name_cur[40];
- char name_max[40];
- rlim_t rcur = rlim.rlim_cur;
- rlim_t rmax = rlim.rlim_max;
-
- sprintf(name_cur, "%s-cur", lr->what);
- sprintf(name_max, "%s-max", lr->what);
-
- rcur = (*lr->who)(lc, lr->what, rcur, rcur);
- rmax = (*lr->who)(lc, lr->what, rmax, rmax);
- rlim.rlim_cur = (*lr->who)(lc, name_cur, rcur, rcur);
- rlim.rlim_max = (*lr->who)(lc, name_max, rmax, rmax);
-
- if (setrlimit(lr->why, &rlim) == -1)
- syslog(LOG_WARNING, "set class '%s' resource limit %s: %m", lc->lc_class, lr->what);
- }
- }
-}
-
-
-
-static struct login_vars {
- const char *tag;
- const char *var;
- const char *def;
-} pathvars[] = {
- { "path", "PATH", NULL },
- { "cdpath", "CDPATH", NULL },
- { "manpath", "MANPATH", NULL },
- { NULL, NULL, NULL }
-}, envars[] = {
- { "lang", "LANG", NULL },
- { "charset", "MM_CHARSET", NULL },
- { "timezone", "TZ", NULL },
- { "term", "TERM", UNKNOWN },
- { NULL, NULL, NULL }
-};
-
-static char *
-substvar(char * var, const struct passwd * pwd, int hlen, int pch, int nlen)
-{
- char *np = NULL;
-
- if (var != NULL) {
- int tildes = 0;
- int dollas = 0;
- char *p;
-
- if (pwd != NULL) {
- /* Count the number of ~'s in var to substitute */
- p = var;
- for (p = var; (p = strchr(p, '~')) != NULL; p++)
- ++tildes;
- /* Count the number of $'s in var to substitute */
- p = var;
- for (p = var; (p = strchr(p, '$')) != NULL; p++)
- ++dollas;
- }
-
- np = malloc(strlen(var) + (dollas * nlen)
- - dollas + (tildes * (pch+hlen))
- - tildes + 1);
-
- if (np != NULL) {
- p = strcpy(np, var);
-
- if (pwd != NULL) {
- /*
- * This loop does user username and homedir substitutions
- * for unescaped $ (username) and ~ (homedir)
- */
- while (*(p += strcspn(p, "~$")) != '\0') {
- int l = strlen(p);
-
- if (p > var && *(p-1) == '\\') /* Escaped: */
- memmove(p - 1, p, l + 1); /* Slide-out the backslash */
- else if (*p == '~') {
- int v = pch && *(p+1) != '/'; /* Avoid double // */
- memmove(p + hlen + v, p + 1, l); /* Subst homedir */
- memmove(p, pwd->pw_dir, hlen);
- if (v)
- p[hlen] = '/';
- p += hlen + v;
- }
- else /* if (*p == '$') */ {
- memmove(p + nlen, p + 1, l); /* Subst username */
- memmove(p, pwd->pw_name, nlen);
- p += nlen;
- }
- }
- }
- }
- }
-
- return np;
-}
-
-
-void
-setclassenvironment(login_cap_t *lc, const struct passwd * pwd, int paths)
-{
- struct login_vars *vars = paths ? pathvars : envars;
- int hlen = pwd ? strlen(pwd->pw_dir) : 0;
- int nlen = pwd ? strlen(pwd->pw_name) : 0;
- char pch = 0;
-
- if (hlen && pwd->pw_dir[hlen-1] != '/')
- ++pch;
-
- while (vars->tag != NULL) {
- char * var = paths ? login_getpath(lc, vars->tag, NULL)
- : login_getcapstr(lc, vars->tag, NULL, NULL);
-
- char * np = substvar(var, pwd, hlen, pch, nlen);
-
- if (np != NULL) {
- setenv(vars->var, np, 1);
- free(np);
- } else if (vars->def != NULL) {
- setenv(vars->var, vars->def, 0);
- }
- ++vars;
- }
-
- /*
- * If we're not processing paths, then see if there is a setenv list by
- * which the admin and/or user may set an arbitrary set of env vars.
- */
- if (!paths) {
- char **set_env = login_getcaplist(lc, "setenv", ",");
-
- if (set_env != NULL) {
- while (*set_env != NULL) {
- char *p = strchr(*set_env, '=');
-
- if (p != NULL) { /* Discard invalid entries */
- char *np;
-
- *p++ = '\0';
- if ((np = substvar(p, pwd, hlen, pch, nlen)) != NULL) {
- setenv(*set_env, np, 1);
- free(np);
- }
- }
- ++set_env;
- }
- }
- }
-}
-
-
-/*
- * setclasscontext()
- *
- * For the login class <class>, set various class context values
- * (limits, mainly) to the values for that class. Which values are
- * set are controlled by <flags> -- see <login_class.h> for the
- * possible values.
- *
- * setclasscontext() can only set resources, priority, and umask.
- */
-
-int
-setclasscontext(const char *classname, unsigned int flags)
-{
- int rc;
- login_cap_t *lc;
-
- lc = login_getclassbyname(classname, NULL);
-
- flags &= LOGIN_SETRESOURCES | LOGIN_SETPRIORITY |
- LOGIN_SETUMASK | LOGIN_SETPATH;
-
- rc = lc ? setusercontext(lc, NULL, 0, flags) : -1;
- login_close(lc);
- return rc;
-}
-
-
-
-/*
- * Private functionw which takes care of processing
- */
-
-static mode_t
-setlogincontext(login_cap_t *lc, const struct passwd *pwd,
- mode_t mymask, unsigned long flags)
-{
- if (lc) {
- /* Set resources */
- if (flags & LOGIN_SETRESOURCES)
- setclassresources(lc);
- /* See if there's a umask override */
- if (flags & LOGIN_SETUMASK)
- mymask = (mode_t)login_getcapnum(lc, "umask", mymask, mymask);
- /* Set paths */
- if (flags & LOGIN_SETPATH)
- setclassenvironment(lc, pwd, 1);
- /* Set environment */
- if (flags & LOGIN_SETENV)
- setclassenvironment(lc, pwd, 0);
- }
- return mymask;
-}
-
-
-
-/*
- * setusercontext()
- *
- * Given a login class <lc> and a user in <pwd>, with a uid <uid>,
- * set the context as in setclasscontext(). <flags> controls which
- * values are set.
- *
- * The difference between setclasscontext() and setusercontext() is
- * that the former sets things up for an already-existing process,
- * while the latter sets things up from a root context. Such as might
- * be called from login(1).
- *
- */
-
-int
-setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned int flags)
-{
- quad_t p;
- mode_t mymask;
- login_cap_t *llc = NULL;
-
- if (lc == NULL) {
- if (pwd != NULL && (lc = login_getpwclass(pwd)) != NULL)
- llc = lc; /* free this when we're done */
- }
-
- if (flags & LOGIN_SETPATH)
- pathvars[0].def = uid ? _PATH_DEFPATH : _PATH_STDPATH;
-
- /* we need a passwd entry to set these */
- if (pwd == NULL)
- flags &= ~(LOGIN_SETGROUP | LOGIN_SETLOGIN);
-
- /* Set the process priority */
- if (flags & LOGIN_SETPRIORITY) {
- p = login_getcapnum(lc, "priority", LOGIN_DEFPRI, LOGIN_DEFPRI);
-
- p = (p < PRIO_MIN || p > PRIO_MAX) ? LOGIN_DEFPRI : p;
- if (setpriority(PRIO_PROCESS, 0, (int)p) != 0)
- syslog(LOG_WARNING, "setpriority '%s' (%s): %m",
- pwd->pw_name, lc ? lc->lc_class : LOGIN_DEFCLASS);
- }
-
- /* Setup the user's group permissions */
- if (flags & LOGIN_SETGROUP) {
- if (setgid(pwd->pw_gid) != 0) {
- syslog(LOG_ERR, "setgid(%ld): %m", (long)pwd->pw_gid);
- login_close(llc);
- return -1;
- }
- if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) {
- syslog(LOG_ERR, "initgroups(%s,%ld): %m", pwd->pw_name,
- pwd->pw_gid);
- login_close(llc);
- return -1;
- }
- }
-
- /* Set the sessions login */
- if ((flags & LOGIN_SETLOGIN) && setlogin(pwd->pw_name) != 0) {
- syslog(LOG_ERR, "setlogin(%s): %m", pwd->pw_name);
- login_close(llc);
- return -1;
- }
-
- mymask = (flags & LOGIN_SETUMASK) ? umask(LOGIN_DEFUMASK) : 0;
- mymask = setlogincontext(lc, pwd, mymask, flags);
- login_close(llc);
-
- /* This needs to be done after anything that needs root privs */
- if ((flags & LOGIN_SETUSER) && setuid(uid) != 0) {
- syslog(LOG_ERR, "setuid(%ld): %m", uid);
- return -1; /* Paranoia again */
- }
-
- /*
- * Now, we repeat some of the above for the user's private entries
- */
- if ((lc = login_getuserclass(pwd)) != NULL) {
- mymask = setlogincontext(lc, pwd, mymask, flags);
- login_close(lc);
- }
-
- /* Finally, set any umask we've found */
- if (flags & LOGIN_SETUMASK)
- umask(mymask);
-
- return 0;
-}
-
diff --git a/lib/libutil/login_ok.3 b/lib/libutil/login_ok.3
deleted file mode 100644
index f90710f..0000000
--- a/lib/libutil/login_ok.3
+++ /dev/null
@@ -1,138 +0,0 @@
-.\" Copyright (c) 1995 David Nugent <davidn@blaze.net.au>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" this list of conditions, and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" David Nugent.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id$
-.\"
-.Dd January 2, 1997
-.Os FreeBSD
-.Dt LOGIN_OK 3
-.Sh NAME
-.Nm auth_ttyok
-.Nm auth_hostok
-.Nm auth_timeok
-.Nd Functions for checking login class based login restrictions
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <time.h>
-.Fd #include <login_cap.h>
-.Ft int
-.Fn auth_ttyok "login_cap_t *lc" "const char *tty"
-.Ft int
-.Fn auth_hostok "login_cap_t *lc" "const char *host" "char const *ip"
-.Ft int
-.Fn auth_timeok "login_cap_t *lc" "time_t t"
-.Sh DESCRIPTION
-This set of functions checks to see if login is allowed based on login
-class capability entries in the login database,
-.Xr login.conf 5 .
-.Pp
-.Fn auth_ttyok
-checks to see if the named tty is available to users of a specific
-class, and is either in the
-.Em ttys.allow
-access list, and not in
-the
-.Em ttys.deny
-access list.
-An empty
-.Em ttys.allow
-list (or if no such capability exists for
-the give login class) logins via any tty device are allowed unless
-the
-.Em ttys.deny
-list exists and is non-empty, and the device or its
-tty group (see
-.Xr ttys 5 )
-is not in the list.
-Access to ttys may be allowed or restricted specifically by tty device
-name, a device name which includes a wildcard (e.g. ttyD* or cuaD*),
-or may name a ttygroup, when group=<name> tags have been assigned in
-.Pa /etc/ttys .
-Matching of ttys and ttygroups is case sensitive.
-Passing a
-.Dv NULL
-or empty string as the
-.Ar tty
-parameter causes the function to return a non-zero value.
-.Pp
-.Fn auth_hostok
-checks for any host restrictions for remote logins.
-The function checks on both a host name and IP address (given in its
-text form, typically n.n.n.n) against the
-.Em host.allow
-and
-.Em host.deny
-login class capabilities.
-As with ttys and their groups, wildcards and character classes may be
-used in the host allow and deny capability records.
-The
-.Xr fnmatch 3
-function is used for matching, and the matching on hostnames is case
-insensitive.
-Note that this function expects that the hostname is fully expanded
-(i.e. the local domain name added if necessary) and the IP address
-is in its canonical form.
-No hostname or address lookups are attempted.
-.Pp
-It is possible to call this function with either the hostname or
-the IP address missing (i.e.
-.Dv NULL )
-and matching will be performed
-only on the basis of the parameter given.
-Passing
-.Dv NULL
-or empty strings in both parameters will result in
-a non-zero return value.
-.Pp
-The
-.Fn auth_timeok
-function checks to see that a given time value is within the
-.Em times.allow
-login class capability and not within the
-.Em times.deny
-access lists.
-An empty or non-existent
-.Em times.allow
-list allows access at any
-time, except if a given time is falls within a period in the
-.Em times.deny
-list.
-The format of time period records contained in both
-.Em times.allow
-and
-.Em times.deny
-capability fields is explained in detail in the
-.Xr login_times 3
-manual page.
-.Sh RETURN VALUES
-A non-zero return value from any of these functions indicates that
-login access is granted.
-A zero return value means either that the item being tested is not
-in the
-.Em allow
-access list, or is within the
-.Em deny
-access list.
-.Sh SEE ALSO
-.Xr getcap 3 ,
-.Xr login_cap 3 ,
-.Xr login_class 3 ,
-.Xr login_times 3 ,
-.Xr login.conf 5 ,
-.Xr termcap 5
diff --git a/lib/libutil/login_ok.c b/lib/libutil/login_ok.c
deleted file mode 100644
index 1bfcd2f..0000000
--- a/lib/libutil/login_ok.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/*-
- * Copyright (c) 1996 by
- * David Nugent <davidn@blaze.net.au>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. This work was done expressly for inclusion into FreeBSD. Other use
- * is permitted provided this notation is included.
- * 4. Absolutely no warranty of function or purpose is made by the authors.
- * 5. Modifications may be freely made to this file providing the above
- * conditions are met.
- *
- * Support allow/deny lists in login class capabilities
- *
- * $Id: login_ok.c,v 1.4 1997/05/10 18:55:38 davidn Exp $
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <ttyent.h>
-#include <fnmatch.h>
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/param.h>
-#include <login_cap.h>
-
-
-/* -- support functions -- */
-
-/*
- * login_strinlist()
- * This function is intentionally public - reused by TAS.
- * Returns TRUE (non-zero) if a string matches a pattern
- * in a given array of patterns. 'flags' is passed directly
- * to fnmatch(3).
- */
-
-int
-login_strinlist(char **list, char const *str, int flags)
-{
- int rc = 0;
-
- if (str != NULL && *str != '\0') {
- int i = 0;
-
- while (rc == 0 && list[i] != NULL)
- rc = fnmatch(list[i++], str, flags) == 0;
- }
- return rc;
-}
-
-
-/*
- * login_str2inlist()
- * Locate either or two strings in a given list
- */
-
-int
-login_str2inlist(char **ttlst, const char *str1, const char *str2, int flags)
-{
- int rc = 0;
-
- if (login_strinlist(ttlst, str1, flags))
- rc = 1;
- else if (login_strinlist(ttlst, str2, flags))
- rc = 1;
- return rc;
-}
-
-
-/*
- * login_timelist()
- * This function is intentinoally public - reused by TAS.
- * Returns an allocated list of time periods given an array
- * of time periods in ascii form.
- */
-
-login_time_t *
-login_timelist(login_cap_t *lc, char const *cap, int *ltno,
- login_time_t **ltptr)
-{
- int j = 0;
- struct login_time *lt = NULL;
- char **tl;
-
- if ((tl = login_getcaplist(lc, cap, NULL)) != NULL) {
-
- while (tl[j++] != NULL)
- ;
- if (*ltno >= j)
- lt = *ltptr;
- else if ((lt = realloc(*ltptr, j)) != NULL) {
- *ltno = j;
- *ltptr = lt;
- }
- if (lt != NULL) {
- int i = 0;
-
- for (--j; i < j; i++)
- lt[i] = parse_lt(tl[i]);
- lt[i].lt_dow = LTM_NONE;
- }
- }
- return lt;
-}
-
-
-/*
- * login_ttyok()
- * This function is a variation of auth_ttyok(), but it checks two
- * arbitrary capability lists not necessarily related to access.
- * This hook is provided for the accounted/exclude accounting lists.
- */
-
-int
-login_ttyok(login_cap_t *lc, const char *tty, const char *allowcap,
- const char *denycap)
-{
- int rc = 1;
-
- if (lc != NULL && tty != NULL && *tty != '\0') {
- struct ttyent *te;
- char *grp;
- char **ttl;
-
- te = getttynam(tty); /* Need group name */
- grp = te ? te->ty_group : NULL;
- ttl = login_getcaplist(lc, allowcap, NULL);
-
- if (ttl != NULL && !login_str2inlist(ttl, tty, grp, 0))
- rc = 0; /* tty or ttygroup not in allow list */
- else {
-
- ttl = login_getcaplist(lc, denycap, NULL);
- if (ttl != NULL && login_str2inlist(ttl, tty, grp, 0))
- rc = 0; /* tty or ttygroup in deny list */
- }
- }
-
- return rc;
-}
-
-
-/*
- * auth_ttyok()
- * Determine whether or not login on a tty is accessible for
- * a login class
- */
-
-int
-auth_ttyok(login_cap_t *lc, const char * tty)
-{
- return login_ttyok(lc, tty, "ttys.allow", "ttys.deny");
-}
-
-
-/*
- * login_hostok()
- * This function is a variation of auth_hostok(), but it checks two
- * arbitrary capability lists not necessarily related to access.
- * This hook is provided for the accounted/exclude accounting lists.
- */
-
-int
-login_hostok(login_cap_t *lc, const char *host, const char *ip,
- const char *allowcap, const char *denycap)
-{
- int rc = 1; /* Default is ok */
-
- if (lc != NULL &&
- ((host != NULL && *host != '\0') || (ip != NULL && *ip != '\0'))) {
- char **hl;
-
- hl = login_getcaplist(lc, allowcap, NULL);
- if (hl != NULL && !login_str2inlist(hl, host, ip, FNM_CASEFOLD))
- rc = 0; /* host or IP not in allow list */
- else {
-
- hl = login_getcaplist(lc, "host.deny", NULL);
- if (hl != NULL && login_str2inlist(hl, host, ip, FNM_CASEFOLD))
- rc = 0; /* host or IP in deny list */
- }
- }
-
- return rc;
-}
-
-
-/*
- * auth_hostok()
- * Determine whether or not login from a host is ok
- */
-
-int
-auth_hostok(login_cap_t *lc, const char *host, const char *ip)
-{
- return login_hostok(lc, host, ip, "host.allow", "host.deny");
-}
-
-
-/*
- * auth_timeok()
- * Determine whether or not login is ok at a given time
- */
-
-int
-auth_timeok(login_cap_t *lc, time_t t)
-{
- int rc = 1; /* Default is ok */
-
- if (lc != NULL && t != (time_t)0 && t != (time_t)-1) {
- struct tm *tptr;
-
- static int ltimesno = 0;
- static struct login_time *ltimes = NULL;
-
- if ((tptr = localtime(&t)) != NULL) {
- struct login_time *lt;
-
- lt = login_timelist(lc, "times.allow", &ltimesno, &ltimes);
- if (lt != NULL && in_ltms(lt, tptr, NULL) == -1)
- rc = 0; /* not in allowed times list */
- else {
-
- lt = login_timelist(lc, "times.deny", &ltimesno, &ltimes);
- if (lt != NULL && in_ltms(lt, tptr, NULL) != -1)
- rc = 0; /* in deny times list */
- }
- if (ltimes) {
- free(ltimes);
- ltimes = NULL;
- ltimesno = 0;
- }
- }
- }
-
- return rc;
-}
diff --git a/lib/libutil/login_times.3 b/lib/libutil/login_times.3
deleted file mode 100644
index e2e7a3f..0000000
--- a/lib/libutil/login_times.3
+++ /dev/null
@@ -1,155 +0,0 @@
-.\" Copyright (c) 1995 David Nugent <davidn@blaze.net.au>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" this list of conditions, and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" David Nugent.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id$
-.\"
-.Dd January 2, 1997
-.Os FreeBSD
-.Dt LOGIN_TIMES 3
-.Sh NAME
-.Nm parse_lt
-.Nm in_ltm
-.Nm in_ltms
-.Nd Functions for parsing and checking login time periods
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <time.h>
-.Fd #include <login_cap.h>
-.Ft login_time_t
-.Fn parse_lt "const char *str"
-.Ft int
-.Fn in_ltm "const login_time_t *lt" "struct tm *t" "time_t *ends"
-.Ft int
-.Fn in_ltms "const login_time_t *lt" "struct tm *t" "time_t *ends"
-.Sh DESCRIPTION
-This set of functions may be used for parsing and checking login and
-session times against a predefined list of allowed login times as
-used in
-.Xr login.conf 5 .
-.Pp
-The format of allowed and disallowed session times specified in the
-.Ar times.allow
-and
-.Ar times.deny
-capability fields in a login class are comprised of a prefix which
-specifies one or more 2- or 3-character day codes, followed by
-a start and end time in 24 hour format separated by a hyphen.
-Day codes may be concatenated together to select specific days, or
-the special mnemonics "Any" and "All" (for any/all days of the week),
-"Wk" for any day of the week (excluding Saturdays and Sundays) and
-"Wd" for any weekend day may be used.
-.Pp
-For example, the following time period:
-.Dl MoThFrSa1400-2200
-is interpreted as Monday, Thursday through Saturday between the hours
-of 2pm and 10pm.
-.Dl Wd0600-1800
-means Saturday and Sunday, between the hours of 6am through 6pm, and
-.Dl Any0400-1600
-means any day of the week, between 4am and 4pm.
-.Pp
-Note that all time periods reference system local time.
-.Pp
-The
-.Fn parse_lt
-function converts the ascii representation of a time period into
-a structure of type
-.Ft login_time_t .
-This is defined as:
-.Bd -literal
-typedef struct login_time
-{
- u_short lt_start; /* Start time */
- u_short lt_end; /* End time */
- u_char lt_dow; /* Days of week */
-} login_time_t;
-.Ed
-.Pp
-The
-.Ar lt_start
-and
-.Ar lt_end
-fields contain the number of minutes past midnight at which the
-described period begins and ends.
-The
-.Ar lt_dow
-field is a bit field, containing one bit for each day of the week
-and one bit unused.
-A series
-.Em LTM_*
-macros may be used for testing bits individually and in combination.
-If no bits are set in this field - ie. it contains the value
-.Em LTM_NONE -
-then the entire period is assumed invalid.
-This is used as a convention to mark the termination of an array
-of login_time_t values.
-If
-.Fn parse_lt
-returns a
-.Ar login_time_t
-with
-.Ar lt_dow
-equal to
-.Em LTM_NONE
-then a parsing error was encountered.
-.Pp
-The remaining functions provide the ability to test a given time_t or
-struct tm value against a specific time period or array of time
-periods.
-.Fn in_ltm
-determines whether the given time described by the struct tm
-passed as the second parameter falls within the period described
-by the first parameter.
-A boolean value is returned, indicating whether or not the time
-specified falls within the period.
-If the time does fall within the time period, and the third
-parameter to the function is not NULL, the time at which the
-period ends relative to the time passed is returned.
-.Pp
-The
-.Fn in_ltms
-function is similar to
-.Fn in_ltm
-except that the first parameter must be a pointer to an array
-of login_time_t objects, which is up to LC_MAXTIMES (64)
-elements in length, and terminated by an element with its
-.Ar lt_dow
-field set to
-.Em LTM_NONE.
-.Sh RETURN VALUES
-.Fn parse_lt
-returns a filled in structure of type login_time_t containing the
-parsed time period.
-If a parsing error occurs, the lt_dow field is set to
-.Em LTM_NONE
-(i.e. 0).
-.Pp
-.Fn in_ltm
-returns non-zero if the given time falls within the period described
-by the login_time_t passed as the first parameter.
-.Pp
-.Fn in_ltms
-returns the index of the first time period found in which the given
-time falls, or -1 if none of them apply.
-.Sh SEE ALSO
-.Xr getcap 3 ,
-.Xr login_cap 3 ,
-.Xr login_class 3 ,
-.Xr login.conf 5 ,
-.Xr termcap 5
diff --git a/lib/libutil/login_times.c b/lib/libutil/login_times.c
deleted file mode 100644
index 598592b..0000000
--- a/lib/libutil/login_times.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*-
- * Copyright (c) 1996 by
- * David Nugent <davidn@blaze.net.au>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. This work was done expressly for inclusion into FreeBSD. Other use
- * is permitted provided this notation is included.
- * 4. Absolutely no warranty of function or purpose is made by the authors.
- * 5. Modifications may be freely made to this file providing the above
- * conditions are met.
- *
- * Login period parsing and comparison functions.
- *
- * $Id: login_times.c,v 1.4 1997/02/22 15:08:27 peter Exp $
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <ctype.h>
-
-#include <sys/types.h>
-#include <login_cap.h>
-
-static struct
-{
- const char *dw;
- u_char cn;
- u_char fl;
-} dws[] =
-{
- { "su", 2, LTM_SUN }, { "mo", 2, LTM_MON }, { "tu", 2, LTM_TUE },
- { "we", 2, LTM_WED }, { "th", 2, LTM_THU }, { "fr", 2, LTM_FRI },
- { "sa", 2, LTM_SAT }, { "any",3, LTM_ANY }, { "all",3, LTM_ANY },
- { "wk", 2, LTM_WK }, { "wd", 2, LTM_WD }, { NULL, 0, 0 }
-};
-
-static char *
-parse_time(char * ptr, u_short * t)
-{
- u_short val;
-
- for (val = 0; *ptr && isdigit(*ptr); ptr++)
- val = (u_short)(val * 10 + (*ptr - '0'));
-
- *t = (u_short)((val / 100) * 60 + (val % 100));
-
- return ptr;
-}
-
-
-login_time_t
-parse_lt(const char * str)
-{
- login_time_t t;
-
- memset(&t, 0, sizeof t);
- t.lt_dow = LTM_NONE;
- if (str && *str && strcmp(str, "Never") != 0 && strcmp(str, "None") != 0) {
- int i;
- login_time_t m = t;
- char *p;
- char buf[64];
-
- /* Make local copy and force lowercase to simplify parsing */
- p = strncpy(buf, str, sizeof buf);
- buf[sizeof buf - 1] = '\0';
- for (i = 0; buf[i]; i++)
- buf[i] = (char)tolower(buf[i]);
-
- while (isalpha(*p)) {
-
- i = 0;
- while (dws[i].dw && strncmp(p, dws[i].dw, dws[i].cn) != 0)
- i++;
- if (dws[i].dw == NULL)
- break;
- m.lt_dow |= dws[i].fl;
- p += dws[i].cn;
- }
-
- if (m.lt_dow == LTM_NONE) /* No (valid) prefix, assume any */
- m.lt_dow |= LTM_ANY;
-
- if (isdigit(*p))
- p = parse_time(p, &m.lt_start);
- else
- m.lt_start = 0;
- if (*p == '-')
- p = parse_time(++p, &m.lt_end);
- else
- m.lt_end = 1440;
-
- t = m;
- }
- return t;
-}
-
-
-int
-in_ltm(const login_time_t * ltm, struct tm * tt, time_t * ends)
-{
- int rc = 0;
-
- if (tt != NULL) {
- /* First, examine the day of the week */
- if ((u_char)(0x01 << tt->tm_wday) & ltm->lt_dow) {
- /* Convert `current' time to minute of the day */
- u_short now = (u_short)((tt->tm_hour * 60) + tt->tm_min);
-
- if (tt->tm_sec > 30)
- ++now;
- if (now >= ltm->lt_start && now < ltm->lt_end) {
- rc = 2;
- if (ends != NULL) {
- /* If requested, return ending time for this period */
- tt->tm_hour = (int)(ltm->lt_end / 60);
- tt->tm_min = (int)(ltm->lt_end % 60);
- *ends = mktime(tt);
- }
- }
- }
- }
- return rc;
-}
-
-
-int
-in_lt(const login_time_t * ltm, time_t * t)
-{
- return in_ltm(ltm, localtime(t), t);
-}
-
-int
-in_ltms(const login_time_t * ltm, struct tm * tm, time_t * t)
-{
- int i = 0;
-
- while (i < LC_MAXTIMES && ltm[i].lt_dow != LTM_NONE) {
- if (in_ltm(ltm + i, tm, t))
- return i;
- i++;
- }
- return -1;
-}
-
-int
-in_lts(const login_time_t * ltm, time_t * t)
-{
- return in_ltms(ltm, localtime(t), t);
-}
-
diff --git a/lib/libutil/login_tty.3 b/lib/libutil/login_tty.3
deleted file mode 100644
index 8a4c8fe..0000000
--- a/lib/libutil/login_tty.3
+++ /dev/null
@@ -1,66 +0,0 @@
-.\"
-.\" Copyright (c) 1996 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id$
-.\" "
-.Dd December 29, 1996
-.Os
-.Dt LOGIN_TTY 3
-.Sh NAME
-.Nm login_tty
-.Nd prepare a tty for a new login session
-.Sh SYNOPSIS
-.Fd #include <libutil.h>
-.Ft int
-.Fn login_tty "int fd"
-.Pp
-Link with
-.Va -lutil
-on the
-.Xr cc 1
-command line.
-.Sh DESCRIPTION
-The function
-.Fn login_tty
-prepares a terminal for a new login session. The file descriptor
-.Ar fd
-passed to
-.Fn login_tty
-must be opened for reading and writing on a terminal device. It will be
-made the controlling terminal for the calling process, after allocating
-a new session with
-.Xr setsid 2 .
-This terminal device will also be made the standard input, standard output,
-and standard error output of the calling process.
-.Sh RETURN VALUES
-.Fn Login_tty
-returns -1 if it could not make the device referenced by
-.Ar fd
-the controlling terminal of the calling process, and 0 otherwise.
-.Sh SEE ALSO
-.Xr dup2 2 ,
-.Xr ioctl 2 ,
-.Xr setsid 2 ,
-.Xr tty 4
diff --git a/lib/libutil/login_tty.c b/lib/libutil/login_tty.c
deleted file mode 100644
index 06072f0..0000000
--- a/lib/libutil/login_tty.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)login_tty.c 8.1 (Berkeley) 6/4/93";
-#else
-static const char rcsid[] =
- "$Id$";
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/param.h>
-#include <sys/ioctl.h>
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <libutil.h>
-
-int
-login_tty(fd)
- int fd;
-{
- (void) setsid();
- if (ioctl(fd, TIOCSCTTY, (char *)NULL) == -1)
- return (-1);
- (void) dup2(fd, 0);
- (void) dup2(fd, 1);
- (void) dup2(fd, 2);
- if (fd > 2)
- (void) close(fd);
- return (0);
-}
diff --git a/lib/libutil/logout.3 b/lib/libutil/logout.3
deleted file mode 100644
index 7127e8a..0000000
--- a/lib/libutil/logout.3
+++ /dev/null
@@ -1,71 +0,0 @@
-.\"
-.\" Copyright (c) 1996 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: logout.3,v 1.4 1997/02/22 15:08:28 peter Exp $
-.\" "
-.Dd December 29, 1996
-.Os
-.Dt LOGOUT 3
-.Sh NAME
-.Nm logout
-.Nd remove an entry from the utmp file
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <libutil.h>
-.Ft int
-.Fn logout "char *line"
-.Pp
-Link with
-.Va -lutil
-on the
-.Xr cc 1
-command line.
-.Sh DESCRIPTION
-The function
-.Fn logout
-searches the
-.Xr utmp 5
-file for the slot described by
-.Ar line
-(usually a tty name). If such a slot could be found, it will be updated
-with a record where the
-.Em name
-and
-.Em host
-fields are empty, and the time stamp field is updated to the current time.
-.Sh RETURN VALUES
-.Fn Logout
-returns 1 if the slot described by
-.Ar line
-has been found and updated, 0 otherwise.
-.Sh SEE ALSO
-.Xr login 3 ,
-.Xr utmp 5 ,
-.Xr wtmp 5
-.Sh BUGS
-The calling interface of
-.Fn logout
-is inconsistent with that of
-.Xr login 3 .
diff --git a/lib/libutil/logout.c b/lib/libutil/logout.c
deleted file mode 100644
index 0d3bf05..0000000
--- a/lib/libutil/logout.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)logout.c 8.1 (Berkeley) 6/4/93";
-#else
-static const char rcsid[] =
- "$Id$";
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-#include <fcntl.h>
-#include <utmp.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <libutil.h>
-
-typedef struct utmp UTMP;
-
-int
-logout(line)
- register char *line;
-{
- register int fd;
- UTMP ut;
- int rval;
-
- if ((fd = open(_PATH_UTMP, O_RDWR, 0)) < 0)
- return(0);
- rval = 0;
- while (read(fd, &ut, sizeof(UTMP)) == sizeof(UTMP)) {
- if (!ut.ut_name[0] || strncmp(ut.ut_line, line, UT_LINESIZE))
- continue;
- bzero(ut.ut_name, UT_NAMESIZE);
- bzero(ut.ut_host, UT_HOSTSIZE);
- (void)time(&ut.ut_time);
- (void)lseek(fd, -(off_t)sizeof(UTMP), L_INCR);
- (void)write(fd, &ut, sizeof(UTMP));
- rval = 1;
- }
- (void)close(fd);
- return(rval);
-}
diff --git a/lib/libutil/logwtmp.3 b/lib/libutil/logwtmp.3
deleted file mode 100644
index 765fdde..0000000
--- a/lib/libutil/logwtmp.3
+++ /dev/null
@@ -1,73 +0,0 @@
-.\"
-.\" Copyright (c) 1996 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: logwtmp.3,v 1.4 1997/02/22 15:08:30 peter Exp $
-.\" "
-.Dd December 29, 1996
-.Os
-.Dt LOGWTMP 3
-.Sh NAME
-.Nm logwtmp
-.Nd append a new record to the wtmp file
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <libutil.h>
-.Ft void
-.Fn logwtmp "char *line" "char *name" "char *host"
-.Pp
-Link with
-.Va -lutil
-on the
-.Xr cc 1
-command line.
-.Sh DESCRIPTION
-The function
-.Fn logwtmp
-tries to append a new record to the
-.Xr wtmp 5
-file, using the provided arguments
-.Ar line ,
-.Ar name ,
-and
-.Ar host ,
-and the current time.
-.Pp
-If the length of the hostname string
-.Ar host
-is longer than what would fit into the hostname field of the
-.Xr wtmp 5
-file, it will first be attempted to convert it into a numerical IP
-address using
-.Xr gethostbyname 3 .
-Failing this, the hostname will be recorded as
-.Qq invalid hostname .
-.Pp
-The calling process must have permission to write to both files.
-.Sh RETURN VALUES
-None.
-.Sh SEE ALSO
-.Xr gethostbyname 3 ,
-.Xr login 3 ,
-.Xr wtmp 5
diff --git a/lib/libutil/logwtmp.c b/lib/libutil/logwtmp.c
deleted file mode 100644
index de3c5d6..0000000
--- a/lib/libutil/logwtmp.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*-
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)logwtmp.c 8.1 (Berkeley) 6/4/93";
-#else
-static const char rcsid[] =
- "$Id: logwtmp.c,v 1.4 1997/08/13 20:42:18 steve Exp $";
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include <libutil.h>
-#include <netdb.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-#include <utmp.h>
-
-void
-logwtmp(line, name, host)
- const char *line;
- const char *name;
- const char *host;
-{
- struct utmp ut;
- struct stat buf;
- int fd;
-
- if (strlen(host) > UT_HOSTSIZE) {
- struct hostent *hp = gethostbyname(host);
-
- if (hp != NULL) {
- struct in_addr in;
-
- memmove(&in, hp->h_addr, sizeof(in));
- host = inet_ntoa(in);
- } else
- host = "invalid hostname";
- }
-
- if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) < 0)
- return;
- if (fstat(fd, &buf) == 0) {
- (void) strncpy(ut.ut_line, line, sizeof(ut.ut_line));
- (void) strncpy(ut.ut_name, name, sizeof(ut.ut_name));
- (void) strncpy(ut.ut_host, host, sizeof(ut.ut_host));
- (void) time(&ut.ut_time);
- if (write(fd, (char *)&ut, sizeof(struct utmp)) !=
- sizeof(struct utmp))
- (void) ftruncate(fd, buf.st_size);
- }
- (void) close(fd);
-}
diff --git a/lib/libutil/pty.3 b/lib/libutil/pty.3
deleted file mode 100644
index 74c8f97..0000000
--- a/lib/libutil/pty.3
+++ /dev/null
@@ -1,144 +0,0 @@
-.\"
-.\" Copyright (c) 1996 Joerg Wunsch
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id$
-.\" "
-.Dd December 29, 1996
-.Os
-.Dt PTY 3
-.Sh NAME
-.Nm openpty ,
-.Nm forkpty
-.Nd auxiliary functions to obtain a pseudo-terminal
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <sys/ioctl.h>
-.Fd #include <termios.h>
-.Fd #include <libutil.h>
-.Ft int
-.Fn openpty "int *amaster" "int *aslave" "char *name" "struct termios *termp" "struct winsize *winp"
-.Ft int
-.Fn forkpty "int *amaster" "char *name" "struct termios *termp" "struct winsize *winp"
-.Pp
-Link with
-.Va -lutil
-on the
-.Xr cc 1
-command line.
-.Sh DESCRIPTION
-The function
-.Fn openpty
-attempts to obtain the next available pseudo-terminal from the system (see
-.Xr pty 4 ) .
-If it successfully finds one, it subsequently tries to change the
-ownership of the slave device to the real UID of the current process,
-the group membership to the group
-.Dq tty
-(if such a group exists in the system), the access permissions for
-reading and writing by the owner, and for writing by the group, and to
-invalidate any current use of the line by calling
-.Xr revoke 2 .
-.Pp
-If the argument
-.Fa name
-is not
-.Dv NULL ,
-.Fn openpty
-copies the pathname of the slave pty to this area. The caller is
-responsible for allocating the required space in this array.
-.Pp
-If the arguments
-.Fa termp
-or
-.Fa winp
-are not
-.Dv NULL ,
-.Fn openpty
-initializes the termios and window size settings from the structures
-these arguments point to, respectively.
-.Pp
-Upon return, the open file descriptors for the master and slave side
-of the pty are returned in the locations pointed to by
-.Fa amaster
-and
-.Fa aslave ,
-respectively.
-.Pp
-.Fn Forkpty
-first calls
-.Fn openpty
-to obtain the next available pseudo-terminal from the system. Upon success,
-it forks off a new process. In the child process, it closes the descriptor
-for the master side of the pty, and calls
-.Xr login_tty 3
-for the slave pty. In the parent process, it closes the descriptor for the
-slave side of the pty. The arguments
-.Fa amaster ,
-.Fa name ,
-.Fa termp ,
-and
-.Fa winp
-have the same meaning as described for
-.Fn openpty .
-.Sh RETURN VALUES
-.Fn Openpty
-returns 0 on success, or -1 on failure.
-.Pp
-.Fn Forkpty
-returns -1 on failure, 0 in the slave process, and the process ID of the
-slave process in the parent process.
-.Sh ERRORS
-On failure,
-.Fn openpty
-will set the global variable
-.Dv errno
-to
-.Er ENOENT .
-.Pp
-In addition to this,
-.Fn forkpty
-may set it to any value as described for
-.Xr fork 2 .
-.Sh SEE ALSO
-.Xr chmod 2 ,
-.Xr chown 2 ,
-.Xr fork 2 ,
-.Xr getuid 2 ,
-.Xr open 2 ,
-.Xr revoke 2 ,
-.Xr login_tty 3 ,
-.Xr termios 3 ,
-.Xr pty 4 ,
-.Xr group 5
-.Sh BUGS
-The calling process must have an effective UID of super-user in order
-to perform all the intended actions. No notification will occur if
-.Fn openpty
-or
-.Fn forkpty
-failed to proceed with one of the described steps, as long as they could
-at least allocate the pty at all (and create the new process in the case
-of
-.Fn forkpty ) .
diff --git a/lib/libutil/pty.c b/lib/libutil/pty.c
deleted file mode 100644
index 57e684c..0000000
--- a/lib/libutil/pty.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
-static char sccsid[] = "@(#)pty.c 8.3 (Berkeley) 5/16/94";
-#else
-static const char rcsid[] =
- "$Id$";
-#endif
-#endif /* LIBC_SCCS and not lint */
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
-#include <libutil.h>
-
-int
-openpty(amaster, aslave, name, termp, winp)
- int *amaster, *aslave;
- char *name;
- struct termios *termp;
- struct winsize *winp;
-{
- static char line[] = "/dev/ptyXX";
- register const char *cp1, *cp2;
- register int master, slave, ttygid;
- struct group *gr;
-
- if ((gr = getgrnam("tty")) != NULL)
- ttygid = gr->gr_gid;
- else
- ttygid = -1;
-
- for (cp1 = "pqrsPQRS"; *cp1; cp1++) {
- line[8] = *cp1;
- for (cp2 = "0123456789abcdefghijklmnopqrstuv"; *cp2; cp2++) {
- line[5] = 'p';
- line[9] = *cp2;
- if ((master = open(line, O_RDWR, 0)) == -1) {
- if (errno == ENOENT)
- return (-1); /* out of ptys */
- } else {
- line[5] = 't';
- (void) chown(line, getuid(), ttygid);
- (void) chmod(line, S_IRUSR|S_IWUSR|S_IWGRP);
- (void) revoke(line);
- if ((slave = open(line, O_RDWR, 0)) != -1) {
- *amaster = master;
- *aslave = slave;
- if (name)
- strcpy(name, line);
- if (termp)
- (void) tcsetattr(slave,
- TCSAFLUSH, termp);
- if (winp)
- (void) ioctl(slave, TIOCSWINSZ,
- (char *)winp);
- return (0);
- }
- (void) close(master);
- }
- }
- }
- errno = ENOENT; /* out of ptys */
- return (-1);
-}
-
-int
-forkpty(amaster, name, termp, winp)
- int *amaster;
- char *name;
- struct termios *termp;
- struct winsize *winp;
-{
- int master, slave, pid;
-
- if (openpty(&master, &slave, name, termp, winp) == -1)
- return (-1);
- switch (pid = fork()) {
- case -1:
- return (-1);
- case 0:
- /*
- * child
- */
- (void) close(master);
- login_tty(slave);
- return (0);
- }
- /*
- * parent
- */
- *amaster = master;
- (void) close(slave);
- return (pid);
-}
diff --git a/lib/libutil/pw_util.c b/lib/libutil/pw_util.c
deleted file mode 100644
index b6f6719..0000000
--- a/lib/libutil/pw_util.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993, 1994
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-#if 0
-static const char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94";
-#endif
-static const char rcsid[] =
- "$Id$";
-#endif /* not lint */
-
-/*
- * This file is used by all the "password" programs; vipw(8), chpass(1),
- * and passwd(1).
- */
-
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-
-#include <err.h>
-#include <fcntl.h>
-#include <paths.h>
-#include <pwd.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "pw_util.h"
-
-extern char *tempname;
-static pid_t editpid = -1;
-static int lockfd;
-
-void
-pw_cont(sig)
- int sig;
-{
-
- if (editpid != -1)
- kill(editpid, sig);
-}
-
-void
-pw_init()
-{
- struct rlimit rlim;
-
- /* Unlimited resource limits. */
- rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
- (void)setrlimit(RLIMIT_CPU, &rlim);
- (void)setrlimit(RLIMIT_FSIZE, &rlim);
- (void)setrlimit(RLIMIT_STACK, &rlim);
- (void)setrlimit(RLIMIT_DATA, &rlim);
- (void)setrlimit(RLIMIT_RSS, &rlim);
-
- /* Don't drop core (not really necessary, but GP's). */
- rlim.rlim_cur = rlim.rlim_max = 0;
- (void)setrlimit(RLIMIT_CORE, &rlim);
-
- /* Turn off signals. */
- (void)signal(SIGALRM, SIG_IGN);
- (void)signal(SIGHUP, SIG_IGN);
- (void)signal(SIGINT, SIG_IGN);
- (void)signal(SIGPIPE, SIG_IGN);
- (void)signal(SIGQUIT, SIG_IGN);
- (void)signal(SIGTERM, SIG_IGN);
- (void)signal(SIGCONT, pw_cont);
-
- /* Create with exact permissions. */
- (void)umask(0);
-}
-
-int
-pw_lock()
-{
- /*
- * If the master password file doesn't exist, the system is hosed.
- * Might as well try to build one. Set the close-on-exec bit so
- * that users can't get at the encrypted passwords while editing.
- * Open should allow flock'ing the file; see 4.4BSD. XXX
- */
- lockfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0);
- if (lockfd < 0 || fcntl(lockfd, F_SETFD, 1) == -1)
- err(1, "%s", _PATH_MASTERPASSWD);
- if (flock(lockfd, LOCK_EX|LOCK_NB))
- errx(1, "the password db file is busy");
- return (lockfd);
-}
-
-int
-pw_tmp()
-{
- static char path[MAXPATHLEN] = _PATH_MASTERPASSWD;
- int fd;
- char *p;
-
- if ((p = strrchr(path, '/')))
- ++p;
- else
- p = path;
- strcpy(p, "pw.XXXXXX");
- if ((fd = mkstemp(path)) == -1)
- err(1, "%s", path);
- tempname = path;
- return (fd);
-}
-
-int
-pw_mkdb(username)
-char *username;
-{
- int pstat;
- pid_t pid;
-
- (void)fflush(stderr);
- if (!(pid = vfork())) {
- if(!username) {
- warnx("rebuilding the database...");
- execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", tempname, NULL);
- } else {
- warnx("updating the database...");
- execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", "-u",
- username, tempname, NULL);
- }
- pw_error(_PATH_PWD_MKDB, 1, 1);
- }
- pid = waitpid(pid, &pstat, 0);
- if (pid == -1 || !WIFEXITED(pstat) || WEXITSTATUS(pstat) != 0)
- return (0);
- warnx("done");
- return (1);
-}
-
-void
-pw_edit(notsetuid)
- int notsetuid;
-{
- int pstat;
- char *p, *editor;
-
- if (!(editor = getenv("EDITOR")))
- editor = _PATH_VI;
- if ((p = strrchr(editor, '/')))
- ++p;
- else
- p = editor;
-
- if (!(editpid = vfork())) {
- if (notsetuid) {
- (void)setgid(getgid());
- (void)setuid(getuid());
- }
- execlp(editor, p, tempname, NULL);
- _exit(1);
- }
- for (;;) {
- editpid = waitpid(editpid, (int *)&pstat, WUNTRACED);
- if (editpid == -1)
- pw_error(editor, 1, 1);
- else if (WIFSTOPPED(pstat))
- raise(WSTOPSIG(pstat));
- else if (WIFEXITED(pstat) && WEXITSTATUS(pstat) == 0)
- break;
- else
- pw_error(editor, 1, 1);
- }
- editpid = -1;
-}
-
-void
-pw_prompt()
-{
- int c, first;
-
- (void)printf("re-edit the password file? [y]: ");
- (void)fflush(stdout);
- first = c = getchar();
- while (c != '\n' && c != EOF)
- c = getchar();
- if (first == 'n')
- pw_error(NULL, 0, 0);
-}
-
-void
-pw_error(name, err, eval)
- char *name;
- int err, eval;
-{
-#ifdef YP
- extern int _use_yp;
-#endif /* YP */
- if (err)
- warn(name);
-#ifdef YP
- if (_use_yp)
- warnx("NIS information unchanged");
- else
-#endif /* YP */
- warnx("%s: unchanged", _PATH_MASTERPASSWD);
- (void)unlink(tempname);
- exit(eval);
-}
diff --git a/lib/libutil/setproctitle.3 b/lib/libutil/setproctitle.3
deleted file mode 100644
index c3f2031..0000000
--- a/lib/libutil/setproctitle.3
+++ /dev/null
@@ -1,113 +0,0 @@
-.\" Copyright (c) 1995 Peter Wemm <peter@freebsd.org>
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, is permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice immediately at the beginning of the file, without modification,
-.\" this list of conditions, and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
-.\" is permitted provided this notation is included.
-.\" 4. Absolutely no warranty of function or purpose is made by the author
-.\" Peter Wemm.
-.\" 5. Modifications may be freely made to this file providing the above
-.\" conditions are met.
-.\"
-.\" $Id: setproctitle.3,v 1.8 1997/04/17 23:31:47 danny Exp $
-.\"
-.\" The following requests are required for all man pages.
-.Dd December 16, 1995
-.Os FreeBSD
-.Dt SETPROCTITLE 3
-.Sh NAME
-.Nm setproctitle
-.Nd set the process title for
-.Xr ps 1
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <libutil.h>
-.Ft void
-.Fn setproctitle "const char *fmt" "..."
-.Pp
-Link with
-.Va -lutil
-on the
-.Xr cc 1
-command line.
-.Sh DESCRIPTION
-The
-.Fn setproctitle
-library routine sets the process title that appears on the
-.Xr ps 1
-command.
-.Pp
-The title is set from the executable's name, followed by the
-result of a
-.Xr printf 3
-style expansion of the arguments as specified by the
-.Va fmt
-argument.
-.Pp
-If
-.Va fmt
-is NULL, the process title is reset to simply the name of the executable.
-.\" The following requests should be uncommented and used where appropriate.
-.\" This next request is for sections 2 and 3 function return values only.
-.\" .Sh RETURN VALUES
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" .Sh ENVIRONMENT
-.\" .Sh FILES
-.Sh EXAMPLES
-To set the title on a daemon to indicate its activity:
-.Bd -literal -offset indent
-setproctitle("talking to %s", inet_ntoa(addr));
-.Ed
-.\" This next request is for sections 1, 6, 7 & 8 only
-.\" (command return values (to shell) and fprintf/stderr type diagnostics)
-.\" .Sh DIAGNOSTICS
-.\" The next request is for sections 2 and 3 error and signal handling only.
-.\" .Sh ERRORS
-.Sh SEE ALSO
-.Xr ps 1 ,
-.Xr w 1 ,
-.Xr kvm 3 ,
-.Xr kvm_getargv 3 ,
-.Xr printf 3
-.Sh STANDARDS
-.Fn setproctitle
-is implicitly non-standard. Other methods of causing the
-.Xr ps 1
-command line to change, including copying over the argv[0] string are
-also implicitly non-portable. It is preferable to use an operating system
-supplied
-.Fn setproctitle
-if present.
-.Pp
-Unfortunately, it is possible that there are other calling conventions
-to other versions of
-.Fn setproctitle ,
-although none have been found by the author as yet. This is believed to be
-the predominant convention.
-.Pp
-It is thought that the implementation is compatible with other systems,
-including
-.Tn NetBSD
-and
-.Tn BSD/OS .
-.Sh HISTORY
-.Fn setproctitle
-first appeared in
-.Fx 2.2 .
-Other operating systems have
-similar functions.
-.Sh AUTHORS
-.Sy "Peter Wemm <peter@FreeBSD.org>"
-stole the idea from the
-.Sy "Sendmail 8.7.3"
-source code by
-.Sy "Eric Allman <eric@sendmail.org>" .
-.\" .Sh BUGS
diff --git a/lib/libutil/setproctitle.c b/lib/libutil/setproctitle.c
deleted file mode 100644
index ba21d1c..0000000
--- a/lib/libutil/setproctitle.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 1995 Peter Wemm <peter@freebsd.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, is permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Absolutely no warranty of function or purpose is made by the author
- * Peter Wemm.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/exec.h>
-#include <sys/sysctl.h>
-
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/pmap.h>
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-/*
- * Older FreeBSD 2.0, 2.1 and 2.2 had different ps_strings structures and
- * in different locations.
- * 1: old_ps_strings at the very top of the stack.
- * 2: old_ps_strings at SPARE_USRSPACE below the top of the stack.
- * 3: ps_strings at the very top of the stack.
- * This attempts to support a kernel built in the #2 and #3 era.
- */
-
-struct old_ps_strings {
- char *old_ps_argvstr;
- int old_ps_nargvstr;
- char *old_ps_envstr;
- int old_ps_nenvstr;
-};
-#define OLD_PS_STRINGS ((struct old_ps_strings *) \
- (USRSTACK - SPARE_USRSPACE - sizeof(struct old_ps_strings)))
-
-#if defined(__STDC__) /* from other parts of sendmail */
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-
-#define SPT_BUFSIZE 2048 /* from other parts of sendmail */
-extern char * __progname; /* is this defined in a .h anywhere? */
-
-void
-#if defined(__STDC__)
-setproctitle(const char *fmt, ...)
-#else
-setproctitle(fmt, va_alist)
- const char *fmt;
- va_dcl
-#endif
-{
- static char buf[SPT_BUFSIZE];
- static char *ps_argv[2];
- va_list ap;
- int mib[2];
- struct ps_strings *ps_strings;
- size_t len;
-
-#if defined(__STDC__)
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
-
- buf[sizeof(buf) - 1] = '\0';
- if (fmt) {
-
- /* print program name heading for grep */
- (void) snprintf(buf, sizeof(buf) - 1, "%s: ", __progname);
-
- /*
- * can't use return from sprintf, as that is the count of how
- * much it wanted to write, not how much it actually did.
- */
-
- len = strlen(buf);
-
- /* print the argument string */
- (void) vsnprintf(buf + len, sizeof(buf) - 1 - len, fmt, ap);
- } else {
- /* Idea from NetBSD - reset the title on fmt == NULL */
- strncpy(buf, __progname, sizeof(buf) - 1);
- }
-
- va_end(ap);
-
- ps_strings = NULL;
- mib[0] = CTL_KERN;
- mib[1] = KERN_PS_STRINGS;
- len = sizeof(ps_strings);
- if (sysctl(mib, 2, &ps_strings, &len, NULL, 0) < 0 ||
- ps_strings == NULL)
- ps_strings = PS_STRINGS;
-
- /* PS_STRINGS points to zeroed memory on a style #2 kernel */
- if (ps_strings->ps_argvstr) {
- /* style #3 */
- ps_argv[0] = buf;
- ps_argv[1] = NULL;
- ps_strings->ps_nargvstr = 1;
- ps_strings->ps_argvstr = ps_argv;
- } else {
- /* style #2 */
- OLD_PS_STRINGS->old_ps_nargvstr = 1;
- OLD_PS_STRINGS->old_ps_argvstr = buf;
- }
-}
diff --git a/lib/libutil/stat_flags.c b/lib/libutil/stat_flags.c
deleted file mode 100644
index 1f22f5a..0000000
--- a/lib/libutil/stat_flags.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*-
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-#if 0
-static char sccsid[] = "@(#)stat_flags.c 8.1 (Berkeley) 5/31/93";
-#else
-static const char rcsid[] =
- "$Id: stat_flags.c,v 1.8 1997/08/07 22:28:25 steve Exp $";
-#endif
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <stddef.h>
-#include <string.h>
-
-#define SAPPEND(s) { \
- if (prefix != NULL) \
- (void)strcat(string, prefix); \
- (void)strcat(string, s); \
- prefix = ","; \
-}
-
-/*
- * flags_to_string --
- * Convert stat flags to a comma-separated string. If no flags
- * are set, return the default string.
- */
-char *
-flags_to_string(flags, def)
- u_long flags;
- char *def;
-{
- static char string[128];
- char *prefix;
-
- string[0] = '\0';
- prefix = NULL;
- if (flags & UF_APPEND)
- SAPPEND("uappnd");
- if (flags & UF_IMMUTABLE)
- SAPPEND("uchg");
-#ifdef UF_NOUNLINK
- if (flags & UF_NOUNLINK)
- SAPPEND("uunlnk");
-#endif
- if (flags & UF_NODUMP)
- SAPPEND("nodump");
- if (flags & UF_OPAQUE)
- SAPPEND("opaque");
- if (flags & SF_APPEND)
- SAPPEND("sappnd");
- if (flags & SF_ARCHIVED)
- SAPPEND("arch");
- if (flags & SF_IMMUTABLE)
- SAPPEND("schg");
-#ifdef SF_NOUNLINK
- if (flags & SF_NOUNLINK)
- SAPPEND("sunlnk");
-#endif
- return (prefix == NULL && def != NULL ? def : string);
-}
-
-#define TEST(a, b, f) { \
- if (!memcmp(a, b, sizeof(b))) { \
- if (clear) { \
- if (clrp) \
- *clrp |= (f); \
- } else if (setp) \
- *setp |= (f); \
- break; \
- } \
-}
-
-/*
- * string_to_flags --
- * Take string of arguments and return stat flags. Return 0 on
- * success, 1 on failure. On failure, stringp is set to point
- * to the offending token.
- */
-int
-string_to_flags(stringp, setp, clrp)
- char **stringp;
- u_long *setp, *clrp;
-{
- int clear;
- char *string, *p;
-
- clear = 0;
- if (setp)
- *setp = 0;
- if (clrp)
- *clrp = 0;
- string = *stringp;
- while ((p = strsep(&string, "\t ,")) != NULL) {
- *stringp = p;
- if (*p == '\0')
- continue;
- if (p[0] == 'n' && p[1] == 'o') {
- clear = 1;
- p += 2;
- }
- switch (p[0]) {
- case 'a':
- TEST(p, "arch", SF_ARCHIVED);
- TEST(p, "archived", SF_ARCHIVED);
- return (1);
- case 'd':
- clear = !clear;
- TEST(p, "dump", UF_NODUMP);
- return (1);
- case 'o':
- TEST(p, "opaque", UF_OPAQUE);
- return (1);
- case 's':
- TEST(p, "sappnd", SF_APPEND);
- TEST(p, "sappend", SF_APPEND);
- TEST(p, "schg", SF_IMMUTABLE);
- TEST(p, "schange", SF_IMMUTABLE);
- TEST(p, "simmutable", SF_IMMUTABLE);
-#ifdef SF_NOUNLINK
- TEST(p, "sunlnk", SF_NOUNLINK);
- TEST(p, "sunlink", SF_NOUNLINK);
-#endif
- return (1);
- case 'u':
- TEST(p, "uappnd", UF_APPEND);
- TEST(p, "uappend", UF_APPEND);
- TEST(p, "uchg", UF_IMMUTABLE);
- TEST(p, "uchange", UF_IMMUTABLE);
- TEST(p, "uimmutable", UF_IMMUTABLE);
-#ifdef UF_NOUNLINK
- TEST(p, "uunlnk", UF_NOUNLINK);
- TEST(p, "uunlink", UF_NOUNLINK);
-#endif
- /* FALLTHROUGH */
- default:
- return (1);
- }
- }
- return (0);
-}
diff --git a/lib/libutil/uucplock.3 b/lib/libutil/uucplock.3
deleted file mode 100644
index c920e4a..0000000
--- a/lib/libutil/uucplock.3
+++ /dev/null
@@ -1,162 +0,0 @@
-.\"
-.\" Copyright (c) 1996 Brian Somers <brian@awfulhak.demon.co.uk>
-.\"
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: uucplock.3,v 1.9 1997/09/29 19:11:25 wosch Exp $
-.\" "
-.Dd March 30, 1997
-.Os
-.Dt uucplock 3
-.Sh NAME
-.Nm uu_lock ,
-.Nm uu_unlock ,
-.Nm uu_lockerr
-.Nd acquire and release control of a serial device
-.Sh SYNOPSIS
-.Fd #include <sys/types.h>
-.Fd #include <libutil.h>
-.Ft int
-.Fn uu_lock "const char *ttyname"
-.Ft int
-.Fn uu_unlock "const char *ttyname"
-.Ft const char *
-.Fn uu_lockerr "int uu_lockresult"
-.Pp
-Link with
-.Va -lutil
-on the
-.Xr cc 1
-command line.
-.Sh DESCRIPTION
-The
-.Fn uu_lock
-function attempts to create a lock file called
-.Pa /var/spool/lock/LCK..
-with a suffix given by the passed
-.Fa ttyname .
-If the file already exists, it is expected to contain the process
-id of the locking program.
-.Pp
-If the file does not already exist, or the owning process given by
-the process id found in the lock file is no longer running,
-.Fn uu_lock
-will write its own process id into the file and return success.
-.Pp
-.Fn uu_unlock
-removes the lockfile created by
-.Fn uu_lock
-for the given
-.Fa ttyname .
-Care should be taken that
-.Fn uu_lock
-was successful before calling
-.Fn uu_unlock .
-.Pp
-.Fn uu_lockerr
-returns an error string representing the error
-.Fa uu_lockresult ,
-as returned from
-.Fn uu_lock .
-.Sh RETURN VALUES
-.Fn uu_unlock
-returns 0 on success and -1 on failure.
-.Pp
-.Fn uu_lock
-may return any of the following values:
-.Pp
-.Dv UU_LOCK_INUSE:
-The lock is in use by another process.
-.Pp
-.Dv UU_LOCK_OK:
-The lock was successfully created.
-.Pp
-.Dv UU_LOCK_OPEN_ERR:
-The lock file could not be opened via
-.Xr open 2 .
-.Pp
-.Dv UU_LOCK_READ_ERR:
-The lock file could not be read via
-.Xr read 2 .
-.Pp
-.Dv UU_LOCK_CREAT_ERR:
-Can't create temporary lock file via
-.Xr creat 2 .
-.Pp
-.Dv UU_LOCK_WRITE_ERR:
-The current process id could not be written to the lock file via a call to
-.Xr write 2 .
-.Pp
-.Dv UU_LOCK_LINK_ERR:
-Can't link temporary lock file via
-.Xr link 2 .
-.Pp
-.Dv UU_LOCK_TRY_ERR:
-Locking attempts are failed after 5 tries.
-.Pp
-If a value of
-.Dv UU_LOCK_OK
-is passed to
-.Fn uu_lockerr ,
-an empty string is returned.
-Otherwise, a string specifying
-the reason for failure is returned.
-.Fn uu_lockerr
-uses the current value of
-.Va errno
-to determine the exact error. Care should be made not to allow
-.Va errno
-to be changed between calls to
-.Fn uu_lock
-and
-.Fn uu_lockerr .
-.Sh ERRORS
-If
-.Fn uu_lock
-returns one of the four error values above, the global value
-.Va errno
-can be used to determine the cause. Refer to the respective manual pages
-for further details.
-.Pp
-.Fn uu_unlock
-will set the global variable
-.Va errno
-to reflect the reason that the lock file could not be removed.
-Refer to the description of
-.Xr unlink 2
-for further details.
-.Sh SEE ALSO
-.Xr lseek 2 ,
-.Xr open 2 ,
-.Xr read 2 ,
-.Xr write 2
-.Sh BUGS
-It is possible that a stale lock is not recognised as such if a new
-processes is assigned the same processes id as the program that left
-the stale lock.
-.Pp
-The calling process must have write permissions to the
-.Pa /var/spool/lock
-directory. There is no mechanism in place to ensure that the
-permissions of this directory are the same as those of the
-serial devices that might be locked.
diff --git a/lib/libutil/uucplock.c b/lib/libutil/uucplock.c
deleted file mode 100644
index 8e037e4..0000000
--- a/lib/libutil/uucplock.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id: uucplock.c,v 1.7 1997/08/05 12:58:02 ache Exp $
- *
- */
-
-#ifndef lint
-static const char sccsid[] = "@(#)uucplock.c 8.1 (Berkeley) 6/6/93";
-#endif /* not lint */
-
-#include <sys/types.h>
-#include <sys/file.h>
-#include <dirent.h>
-#include <errno.h>
-#include <unistd.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <paths.h>
-#include <string.h>
-#include "libutil.h"
-
-#define MAXTRIES 5
-
-#define LOCKTMP "LCKTMP..%d"
-#define LOCKFMT "LCK..%s"
-
-#define GORET(level, val) { err = errno; uuerr = (val); \
- goto __CONCAT(ret, level); }
-
-/* Forward declarations */
-static int put_pid (int fd, pid_t pid);
-static pid_t get_pid (int fd,int *err);
-
-/*
- * uucp style locking routines
- */
-
-int uu_lock (const char *ttyname)
-{
- int fd, tmpfd, i;
- pid_t pid;
- char lckname[sizeof(_PATH_UUCPLOCK) + MAXNAMLEN],
- lcktmpname[sizeof(_PATH_UUCPLOCK) + MAXNAMLEN];
- int err, uuerr;
-
- pid = getpid();
- (void)snprintf(lcktmpname, sizeof(lcktmpname), _PATH_UUCPLOCK LOCKTMP,
- pid);
- (void)snprintf(lckname, sizeof(lckname), _PATH_UUCPLOCK LOCKFMT,
- ttyname);
- if ((tmpfd = creat(lcktmpname, 0664)) < 0)
- GORET(0, UU_LOCK_CREAT_ERR);
-
- for (i = 0; i < MAXTRIES; i++) {
- if (link (lcktmpname, lckname) < 0) {
- if (errno != EEXIST)
- GORET(1, UU_LOCK_LINK_ERR);
- /*
- * file is already locked
- * check to see if the process holding the lock
- * still exists
- */
- if ((fd = open(lckname, O_RDONLY)) < 0)
- GORET(1, UU_LOCK_OPEN_ERR);
-
- if ((pid = get_pid (fd, &err)) == -1)
- GORET(2, UU_LOCK_READ_ERR);
-
- close(fd);
-
- if (kill(pid, 0) == 0 || errno != ESRCH)
- GORET(1, UU_LOCK_INUSE);
- /*
- * The process that locked the file isn't running, so
- * we'll lock it ourselves
- */
- (void)unlink(lckname);
- } else {
- if (!put_pid (tmpfd, pid))
- GORET(3, UU_LOCK_WRITE_ERR);
- break;
- }
- }
- GORET(1, (i >= MAXTRIES) ? UU_LOCK_TRY_ERR : UU_LOCK_OK);
-
-ret3:
- (void)unlink(lckname);
- goto ret1;
-ret2:
- (void)close(fd);
-ret1:
- (void)close(tmpfd);
- (void)unlink(lcktmpname);
-ret0:
- errno = err;
- return uuerr;
-}
-
-int uu_unlock (const char *ttyname)
-{
- char tbuf[sizeof(_PATH_UUCPLOCK) + MAXNAMLEN];
-
- (void)snprintf(tbuf, sizeof(tbuf), _PATH_UUCPLOCK LOCKFMT, ttyname);
- return unlink(tbuf);
-}
-
-const char *uu_lockerr (int uu_lockresult)
-{
- static char errbuf[128];
- char *fmt;
-
- switch (uu_lockresult) {
- case UU_LOCK_INUSE:
- return "device in use";
- case UU_LOCK_OK:
- return "";
- case UU_LOCK_OPEN_ERR:
- fmt = "open error: %s";
- break;
- case UU_LOCK_READ_ERR:
- fmt = "read error: %s";
- break;
- case UU_LOCK_CREAT_ERR:
- fmt = "creat error: %s";
- break;
- case UU_LOCK_WRITE_ERR:
- fmt = "write error: %s";
- break;
- case UU_LOCK_LINK_ERR:
- fmt = "link error: %s";
- break;
- case UU_LOCK_TRY_ERR:
- fmt = "too many tries: %s";
- break;
- default:
- fmt = "undefined error: %s";
- break;
- }
-
- (void)snprintf(errbuf, sizeof(errbuf), fmt, strerror(errno));
- return errbuf;
-}
-
-static int put_pid (int fd, pid_t pid)
-{
- char buf[32];
- int len;
-
- len = sprintf (buf, "%10d\n", pid);
- return write (fd, buf, len) == len;
-}
-
-static pid_t get_pid (int fd, int *err)
-{
- int bytes_read;
- char buf[32];
- pid_t pid;
-
- bytes_read = read (fd, buf, sizeof (buf) - 1);
- if (bytes_read > 0) {
- buf[bytes_read] = '\0';
- pid = strtol (buf, (char **) NULL, 10);
- } else {
- pid = -1;
- *err = bytes_read ? errno : EINVAL;
- }
- return pid;
-}
-
-/* end of uucplock.c */
diff --git a/lib/libvgl/Makefile b/lib/libvgl/Makefile
deleted file mode 100644
index d540dd4..0000000
--- a/lib/libvgl/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-LIB= vgl
-SHLIB_MAJOR= 1
-SHLIB_MINOR= 0
-CFLAGS+=-Wall -I${.CURDIR}
-SRCS= main.c simple.c bitmap.c text.c mouse.c keyboard.c
-MAN3= vgl.3
-
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/vgl.h \
- ${DESTDIR}/usr/include
-
-.include <bsd.lib.mk>
diff --git a/lib/libvgl/bitmap.c b/lib/libvgl/bitmap.c
deleted file mode 100644
index ffadb79..0000000
--- a/lib/libvgl/bitmap.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer,
- * in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: bitmap.c,v 1.8 1997/08/15 12:32:59 sos Exp $
- */
-
-#include <sys/types.h>
-#include <signal.h>
-#include "vgl.h"
-
-static byte VGLPlane[4][128];
-static byte mask[8] = {0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01};
-static int color2bit[16] = {0x00000000, 0x00000001, 0x00000100, 0x00000101,
- 0x00010000, 0x00010001, 0x00010100, 0x00010101,
- 0x01000000, 0x01000001, 0x01000100, 0x01000101,
- 0x01010000, 0x01010001, 0x01010100, 0x01010101};
-
-static void
-WriteVerticalLine(VGLBitmap *dst, int x, int y, int width, byte *line)
-{
- int i, pos, last, planepos, start_offset, end_offset, offset;
- unsigned int word = 0;
- byte *address;
-
- switch (dst->Type) {
- case VIDBUF4:
- address = dst->Bitmap + (dst->Xsize/8 * y) + x/8;
- start_offset = (x & 0x07);
- end_offset = (x + width) & 0x07;
- offset = start_offset;
- pos = 0;
- planepos = 0;
- while (pos < width) {
- word = 0;
- last = pos + 8 - offset;
- while (pos < last && pos < width)
- word = (word<<1) | color2bit[line[pos++]&0x0f];
- VGLPlane[0][planepos] = word;
- VGLPlane[1][planepos] = word>>8;
- VGLPlane[2][planepos] = word>>16;
- VGLPlane[3][planepos] = word>>24;
- planepos++;
- offset = 0;
- }
- planepos--;
- if (end_offset) {
- word <<= (8 - end_offset);
- VGLPlane[0][planepos] = word;
- VGLPlane[1][planepos] = word>>8;
- VGLPlane[2][planepos] = word>>16;
- VGLPlane[3][planepos] = word>>24;
- }
- if (start_offset || end_offset)
- width+=8;
- for (i=0; i<4; i++) {
- outb(0x3c4, 0x02);
- outb(0x3c5, 0x01<<i);
- outb(0x3ce, 0x04);
- outb(0x3cf, i);
- if (start_offset)
- VGLPlane[i][0] |= *address & ~mask[start_offset];
- if (end_offset)
- VGLPlane[i][planepos] |= *(address + planepos) & mask[end_offset];
- bcopy(&VGLPlane[i][0], address, width/8);
- }
- break;
- case VIDBUF8X:
- address = dst->Bitmap + ((dst->Xsize * y) + x)/2;
- for (i=0; i<4; i++) {
- outb(0x3c4, 0x02);
- outb(0x3c5, 0x01<<i);
- pos = i;
- for (planepos=0; planepos<width/4; planepos++, pos+=4)
- address[planepos] = line[pos];
- }
- break;
- case VIDBUF8:
- case MEMBUF:
- address = dst->Bitmap + (dst->Xsize * y) + x;
- bcopy(line, address, width);
- break;
-
- default:
- }
-}
-
-static void
-ReadVerticalLine(VGLBitmap *src, int x, int y, int width, byte *line)
-{
- int i, bit, pos, count, planepos, start_offset, end_offset, offset;
- byte *address;
-
- switch (src->Type) {
- case VIDBUF4:
- address = src->Bitmap + (src->Xsize/8 * y) + x/8;
- start_offset = (x & 0x07);
- end_offset = (x + width) & 0x07;
- offset = start_offset;
- if (start_offset)
- count = (width - (8 - start_offset)) / 8 + 1;
- else
- count = width / 8;
- if (end_offset)
- count++;
- for (i=0; i<4; i++) {
- outb(0x3ce, 0x04);
- outb(0x3cf, i);
- bcopy(address, &VGLPlane[i][0], count);
- }
- pos = 0;
- planepos = 0;
- while (pos < width) {
- for (bit = (7-offset); bit >= 0 && pos < width; bit--, pos++) {
- line[pos] = (VGLPlane[0][planepos] & (1<<bit) ? 1 : 0) |
- ((VGLPlane[1][planepos] & (1<<bit) ? 1 : 0) << 1) |
- ((VGLPlane[2][planepos] & (1<<bit) ? 1 : 0) << 2) |
- ((VGLPlane[3][planepos] & (1<<bit) ? 1 : 0) << 3);
- }
- planepos++;
- offset = 0;
- }
- break;
- case VIDBUF8X:
- address = src->Bitmap + ((src->Xsize * y) + x)/2;
- for (i=0; i<4; i++) {
- outb(0x3ce, 0x04);
- outb(0x3cf, i);
- pos = i;
- for (planepos=0; planepos<width/4; planepos++, pos+=4)
- line[pos] = address[planepos];
- }
- break;
- case VIDBUF8:
- case MEMBUF:
- address = src->Bitmap + (src->Xsize * y) + x;
- bcopy(address, line, width);
- break;
- default:
- }
-}
-
-int
-__VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
- VGLBitmap *dst, int dstx, int dsty, int width, int hight)
-{
- int srcline, dstline;
-
- if (srcx>src->Xsize||srcy>src->Ysize||dsty>dst->Xsize||dsty>dst->Ysize)
- return -1;
- if (srcx < 0) {
- width=width+srcx; dstx-=srcx; srcx=0;
- }
- if (srcy < 0) {
- hight=hight+srcy; dsty-=srcy; srcy=0;
- }
- if (dstx < 0) {
- width=width+dstx; srcx-=dstx; dstx=0;
- }
- if (dsty < 0) {
- hight=hight+dsty; srcy-=dsty; dsty=0;
- }
- if (srcx+width > src->Xsize)
- width=src->Xsize-srcx;
- if (srcy+hight > src->Ysize)
- hight=src->Ysize-srcy;
- if (dstx+width > dst->Xsize)
- width=dst->Xsize-dstx;
- if (dsty+hight > dst->Ysize)
- hight=dst->Ysize-dsty;
- if (width < 0 || hight < 0)
- return -1;
- if (src->Type == MEMBUF) {
- for (srcline=srcy, dstline=dsty; srcline<srcy+hight; srcline++, dstline++) {
- WriteVerticalLine(dst, dstx, dstline, width,
- (src->Bitmap+(srcline*src->Xsize)+srcx));
- }
- }
- else if (dst->Type == MEMBUF) {
- for (srcline=srcy, dstline=dsty; srcline<srcy+hight; srcline++, dstline++) {
- ReadVerticalLine(src, srcx, srcline, width,
- (dst->Bitmap+(dstline*dst->Xsize)+dstx));
- }
- }
- else {
- byte buffer[1024];
- for (srcline=srcy, dstline=dsty; srcline<srcy+hight; srcline++, dstline++) {
- ReadVerticalLine(src, srcx, srcline, width, buffer);
- WriteVerticalLine(dst, dstx, dstline, width, buffer);
- }
- }
- return 0;
-}
-
-int
-VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy,
- VGLBitmap *dst, int dstx, int dsty, int width, int hight)
-{
- int error;
-
- VGLMouseFreeze(dstx, dsty, width, hight, 0);
- error = __VGLBitmapCopy(src, srcx, srcy, dst, dstx, dsty, width, hight);
- VGLMouseUnFreeze();
- return error;
-}
-
diff --git a/lib/libvgl/keyboard.c b/lib/libvgl/keyboard.c
deleted file mode 100644
index 334d973..0000000
--- a/lib/libvgl/keyboard.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*-
- * Copyright (c) 1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
- * in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <termios.h>
-#include <sys/time.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-static struct termios VGLKeyboardTty;
-static int VGLKeyboardMode = -1;
-
-int
-VGLKeyboardInit(int mode)
-{
- static struct termios term;
-
- ioctl(0, KDGKBMODE, &VGLKeyboardMode);
- tcgetattr(0, &VGLKeyboardTty);
-
- term = VGLKeyboardTty;
- term.c_iflag = IGNPAR | IGNBRK;
- term.c_oflag = 0;
- term.c_cflag = CREAD | CS8;
- term.c_lflag &= ~(ICANON | ECHO | ISIG);
- term.c_cc[VTIME] = 0;
- term.c_cc[VMIN] = 0;
- cfsetispeed(&term, 9600);
- cfsetospeed(&term, 9600);
- tcsetattr(0, TCSANOW, &term);
-
- switch (mode) {
- case VGL_RAWKEYS:
- ioctl(0, KDSKBMODE, K_RAW);
- break;
- case VGL_CODEKEYS:
- ioctl(0, KDSKBMODE, K_CODE);
- break;
- case VGL_XLATEKEYS:
- ioctl(0, KDSKBMODE, K_XLATE);
- break;
- }
- return 0;
-}
-
-void
-VGLKeyboardEnd()
-{
- if (VGLKeyboardMode != -1)
- ioctl(0, KDSKBMODE, VGLKeyboardMode);
- tcsetattr(0, TCSANOW, &VGLKeyboardTty);
-}
-
-int
-VGLKeyboardGetCh()
-{
- unsigned char ch = 0;
-
- read (0, &ch, 1);
- return (int)ch;
-}
diff --git a/lib/libvgl/main.c b/lib/libvgl/main.c
deleted file mode 100644
index a7af6e9..0000000
--- a/lib/libvgl/main.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
- * in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: main.c,v 1.1 1997/08/17 21:09:34 sos Exp $
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/signal.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-VGLBitmap *VGLDisplay;
-
-static int VGLMode;
-static int VGLOldMode;
-static byte *VGLBuf;
-static byte *VGLMem;
-static int VGLSwitchPending;
-static int VGLOnDisplay;
-static int VGLInitDone = 0;
-
-void
-VGLEnd()
-{
-struct vt_mode smode;
-
- if (!VGLInitDone)
- return;
-/*
- while (!VGLOnDisplay) pause();
- VGLCheckSwitch();;
-*/
- outb(0x3c4, 0x02);
- outb(0x3c5, 0x0f);
- bzero(VGLMem, 64*1024);
- ioctl(0, _IO('S', VGLOldMode), 0);
- ioctl(0, KDDISABIO, 0);
- ioctl(0, KDSETMODE, KD_TEXT);
- smode.mode = VT_AUTO;
- ioctl(0, VT_SETMODE, &smode);
- free(VGLBuf);
- free(VGLDisplay);
- VGLKeyboardEnd();
-}
-
-static void
-VGLAbort()
-{
- VGLEnd();
- exit(0);
-}
-
-static void
-VGLSwitch()
-{
- if (!VGLOnDisplay)
- VGLOnDisplay = 1;
- else
- VGLOnDisplay = 0;
- VGLSwitchPending = 1;
- signal(SIGUSR1, VGLSwitch);
-}
-
-int
-VGLInit(int mode)
-{
- struct vt_mode smode;
- struct winsize winsz;
- int error;
-
- signal(SIGUSR1, VGLSwitch);
- signal(SIGINT, VGLAbort);
- signal(SIGSEGV, VGLAbort);
- signal(SIGBUS, VGLAbort);
-
- VGLOnDisplay = 1;
- VGLSwitchPending = 0;
-
- ioctl(0, CONS_GET, &VGLOldMode);
-
- VGLMem = (byte*)mmap(0, 0x10000, PROT_READ|PROT_WRITE, MAP_FILE,
- open("/dev/mem", O_RDWR), 0xA0000);
- if (VGLMem <= (byte*)0)
- return 1;
-
- VGLBuf = (byte*)malloc(256*1024);
- if (VGLBuf == NULL)
- return 1;
-
- VGLDisplay = (VGLBitmap*) malloc(sizeof(VGLBitmap));
- if (VGLDisplay == NULL) {
- free(VGLBuf);
- return 1;
- }
-
- switch (mode) {
- case SW_BG640x480: case SW_CG640x480:
- VGLDisplay->Type = VIDBUF4;
- break;
- case SW_VGA_CG320:
- VGLDisplay->Type = VIDBUF8;
- break;
- case SW_VGA_MODEX:
- VGLDisplay->Type = VIDBUF8X;
- break;
- default:
- VGLEnd();
- return 1;
- }
-
- if ((error = ioctl(0, KDENABIO, 0)))
- return error;
-
- ioctl(0, VT_WAITACTIVE, 0);
- ioctl(0, KDSETMODE, KD_GRAPHICS);
- if ((error = ioctl(0, mode, 0))) {
- ioctl(0, KDSETMODE, KD_TEXT);
- ioctl(0, KDDISABIO, 0);
- return error;
- }
-
- VGLMode = mode;
-
- outb(0x3c4, 0x02);
- outb(0x3c5, 0x0f);
- bzero(VGLMem, 64*1024);
-
- if (ioctl(0, TIOCGWINSZ, &winsz)) {
- VGLEnd();
- return 1;
- }
-
- VGLDisplay->Bitmap = VGLMem;
- VGLDisplay->Xsize = winsz.ws_xpixel;
- VGLDisplay->Ysize = winsz.ws_ypixel;
- VGLSavePalette();
-
- smode.mode = VT_PROCESS;
- smode.waitv = 0;
- smode.relsig = SIGUSR1;
- smode.acqsig = SIGUSR1;
- smode.frsig = SIGINT;
- if (ioctl(0, VT_SETMODE, &smode) == -1) {
- VGLEnd();
- return 1;
- }
- VGLTextSetFontFile((byte*)0);
- VGLInitDone = 1;
- return 0;
-}
-
-void
-VGLCheckSwitch()
-{
- if (VGLSwitchPending) {
- int i;
-
- VGLSwitchPending = 0;
- if (VGLOnDisplay) {
- ioctl(0, KDENABIO, 0);
- ioctl(0, KDSETMODE, KD_GRAPHICS);
- ioctl(0, VGLMode, 0);
- outb(0x3c6, 0xff);
- for (i=0; i<4; i++) {
- outb(0x3c4, 0x02);
- outb(0x3c5, 0x01<<i);
- bcopy(&VGLBuf[i*64*1024], VGLMem, 64*1024);
- }
- VGLRestorePalette();
- ioctl(0, VT_RELDISP, VT_ACKACQ);
- VGLDisplay->Bitmap = VGLMem;
- switch (VGLMode) {
- case SW_BG640x480: case SW_CG640x480:
- VGLDisplay->Type = VIDBUF4;
- break;
- case SW_VGA_CG320:
- VGLDisplay->Type = VIDBUF8;
- break;
- case SW_VGA_MODEX:
- VGLDisplay->Type = VIDBUF8X;
- break;
- default:
- VGLDisplay->Type = VIDBUF8; /* XXX */
- break;
- }
- }
- else {
- for (i=0; i<4; i++) {
- outb(0x3ce, 0x04);
- outb(0x3cf, i);
- bcopy(VGLMem, &VGLBuf[i*64*1024], 64*1024);
- }
- ioctl(0, VGLOldMode, 0);
- ioctl(0, KDSETMODE, KD_TEXT);
- ioctl(0, KDDISABIO, 0);
- ioctl(0, VT_RELDISP, VT_TRUE);
- VGLDisplay->Bitmap = VGLBuf;
- VGLDisplay->Type = MEMBUF;
- }
- }
- while (!VGLOnDisplay) pause();
-}
-
diff --git a/lib/libvgl/mouse.c b/lib/libvgl/mouse.c
deleted file mode 100644
index 6f54be6..0000000
--- a/lib/libvgl/mouse.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
- * in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: mouse.c,v 1.10 1997/08/15 12:32:59 sos Exp $
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/signal.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-/* prototype for internal function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0,0,0,0,
- 0,0,0,0,X,X,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,X,X,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,X,X,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,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,0,0,0,0,0,0,0,0,0,0,0,
-};
-#undef X
-static VGLBitmap VGLMouseStdAndMask =
- { MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdAndMask };
-static VGLBitmap VGLMouseStdOrMask =
- { MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, StdOrMask };
-static VGLBitmap *VGLMouseAndMask, *VGLMouseOrMask;
-static byte map[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE];
-static VGLBitmap VGLMouseSave = { MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, map};
-static int VGLMouseVisible = 0;
-static int VGLMouseFrozen = 0;
-static int VGLMouseShown = 0;
-static int VGLMouseXpos = 0;
-static int VGLMouseYpos = 0;
-static int VGLMouseButtons = 0;
-
-void
-VGLMousePointerShow()
-{
- byte buf[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE];
- VGLBitmap buffer = { MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, buf };
- byte crtcidx, crtcval, gdcidx, gdcval;
- int pos;
-
- if (!VGLMouseVisible) {
- VGLMouseVisible = 1;
- crtcidx = inb(0x3c4);
- crtcval = inb(0x3c5);
- gdcidx = inb(0x3ce);
- gdcval = inb(0x3cf);
- __VGLBitmapCopy(VGLDisplay, VGLMouseXpos, VGLMouseYpos,
- &VGLMouseSave, 0, 0, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
- bcopy(VGLMouseSave.Bitmap, buffer.Bitmap, MOUSE_IMG_SIZE*MOUSE_IMG_SIZE);
- for (pos = 0; pos < MOUSE_IMG_SIZE*MOUSE_IMG_SIZE; pos++)
- buffer.Bitmap[pos]=(buffer.Bitmap[pos]&~(VGLMouseAndMask->Bitmap[pos])) |
- VGLMouseOrMask->Bitmap[pos];
- __VGLBitmapCopy(&buffer, 0, 0, VGLDisplay,
- VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
- outb(0x3c4, crtcidx);
- outb(0x3c5, crtcval);
- outb(0x3ce, gdcidx);
- outb(0x3cf, gdcval);
- }
-}
-
-void
-VGLMousePointerHide()
-{
- byte crtcidx, crtcval, gdcidx, gdcval;
-
- if (VGLMouseVisible) {
- VGLMouseVisible = 0;
- crtcidx = inb(0x3c4);
- crtcval = inb(0x3c5);
- gdcidx = inb(0x3ce);
- gdcval = inb(0x3cf);
- __VGLBitmapCopy(&VGLMouseSave, 0, 0, VGLDisplay,
- VGLMouseXpos, VGLMouseYpos, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE);
- outb(0x3c4, crtcidx);
- outb(0x3c5, crtcval);
- outb(0x3ce, gdcidx);
- outb(0x3cf, gdcval);
- }
-}
-
-void
-VGLMouseMode(int mode)
-{
- if (mode == VGL_MOUSESHOW) {
- if (VGLMouseShown == VGL_MOUSEHIDE) {
- VGLMousePointerShow();
- VGLMouseShown = VGL_MOUSESHOW;
- }
- }
- else {
- if (VGLMouseShown == VGL_MOUSESHOW) {
- VGLMousePointerHide();
- VGLMouseShown = VGL_MOUSEHIDE;
- }
- }
-}
-
-void
-VGLMouseAction(int dummy)
-{
- struct mouse_info mouseinfo;
-
- if (VGLMouseFrozen) {
- VGLMouseFrozen++;
- return;
- }
- mouseinfo.operation = MOUSE_GETINFO;
- ioctl(0, CONS_MOUSECTL, &mouseinfo);
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerHide();
- VGLMouseXpos = mouseinfo.u.data.x;
- VGLMouseYpos = mouseinfo.u.data.y;
- VGLMouseButtons = mouseinfo.u.data.buttons;
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerShow();
-}
-
-void
-VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask)
-{
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerHide();
- VGLMouseAndMask = AndMask;
- VGLMouseOrMask = OrMask;
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerShow();
-}
-
-void
-VGLMouseSetStdImage()
-{
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerHide();
- VGLMouseAndMask = &VGLMouseStdAndMask;
- VGLMouseOrMask = &VGLMouseStdOrMask;
- if (VGLMouseShown == VGL_MOUSESHOW)
- VGLMousePointerShow();
-}
-
-int
-VGLMouseInit(int mode)
-{
- struct mouse_info mouseinfo;
- int error;
-
- VGLMouseSetStdImage();
- mouseinfo.operation = MOUSE_MODE;
- mouseinfo.u.mode.signal = SIGUSR2;
- if ((error = ioctl(0, CONS_MOUSECTL, &mouseinfo)))
- return error;
- signal(SIGUSR2, VGLMouseAction);
- mouseinfo.operation = MOUSE_GETINFO;
- ioctl(0, CONS_MOUSECTL, &mouseinfo);
- VGLMouseXpos = mouseinfo.u.data.x;
- VGLMouseYpos = mouseinfo.u.data.y;
- VGLMouseButtons = mouseinfo.u.data.buttons;
- VGLMouseMode(mode);
- return 0;
-}
-
-int
-VGLMouseStatus(int *x, int *y, char *buttons)
-{
- signal(SIGUSR2, SIG_IGN);
- *x = VGLMouseXpos;
- *y = VGLMouseYpos;
- *buttons = VGLMouseButtons;
- signal(SIGUSR2, VGLMouseAction);
- return VGLMouseShown;
-}
-
-int
-VGLMouseFreeze(int x, int y, int width, int hight, byte color)
-{
- if (!VGLMouseFrozen) {
- VGLMouseFrozen = 1;
- if (width > 1 || hight > 1) { /* bitmap */
- if (VGLMouseShown == 1) {
- int overlap;
-
- if (x > VGLMouseXpos)
- overlap = (VGLMouseXpos + MOUSE_IMG_SIZE) - x;
- else
- overlap = (x + width) - VGLMouseXpos;
- if (overlap > 0) {
- if (y > VGLMouseYpos)
- overlap = (VGLMouseYpos + MOUSE_IMG_SIZE) - y;
- else
- overlap = (y + hight) - VGLMouseYpos;
- if (overlap > 0)
- VGLMousePointerHide();
- }
- }
- }
- else { /* bit */
- if (VGLMouseShown &&
- x >= VGLMouseXpos && x < VGLMouseXpos + MOUSE_IMG_SIZE &&
- y >= VGLMouseYpos && y < VGLMouseYpos + MOUSE_IMG_SIZE) {
- VGLMouseSave.Bitmap[(y-VGLMouseYpos)*MOUSE_IMG_SIZE+(x-VGLMouseXpos)] =
- (color);
- if (VGLMouseAndMask->Bitmap
- [(y-VGLMouseYpos)*MOUSE_IMG_SIZE+(x-VGLMouseXpos)]) {
- return 1;
- }
- }
- }
- }
- return 0;
-}
-
-void
-VGLMouseUnFreeze()
-{
- if (VGLMouseFrozen > 1) {
- VGLMouseFrozen = 0;
- VGLMouseAction(0);
- }
- else {
- VGLMouseFrozen = 0;
- if (VGLMouseShown == VGL_MOUSESHOW && !VGLMouseVisible)
- VGLMousePointerShow();
- }
-}
diff --git a/lib/libvgl/simple.c b/lib/libvgl/simple.c
deleted file mode 100644
index 2b966e5..0000000
--- a/lib/libvgl/simple.c
+++ /dev/null
@@ -1,357 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
- * in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: simple.c,v 1.8 1997/08/15 12:32:59 sos Exp $
- */
-
-#include <signal.h>
-#include <machine/console.h>
-#include "vgl.h"
-
-static byte VGLSavePaletteRed[256];
-static byte VGLSavePaletteGreen[256];
-static byte VGLSavePaletteBlue[256];
-
-#define ABS(a) (((a)<0) ? -(a) : (a))
-#define SGN(a) (((a)<0) ? -1 : 1)
-
-
-void
-VGLSetXY(VGLBitmap *object, int x, int y, byte color)
-{
- VGLCheckSwitch();
- if (x>=0 && x<object->Xsize && y>=0 && y<object->Ysize) {
- if (!VGLMouseFreeze(x, y, 1, 1, color)) {
- switch (object->Type) {
- case MEMBUF:
- case VIDBUF8:
- object->Bitmap[y*object->Xsize+x]=(color);
- break;
- case VIDBUF8X:
- outb(0x3c4, 0x02);
- outb(0x3c5, 0x01 << (x&0x3));
- object->Bitmap[(unsigned)(object->Xsize/2*y)+(x/4)] = (color);
- break;
- case VIDBUF4:
- outb(0x3c4, 0x02); outb(0x3c5, 0x01);
- outb(0x3ce, 0x04); outb(0x3cf, 0x00);
- object->Bitmap[(y*object->Xsize/8+x/8)&0xffff] =
- ( object->Bitmap[(y*object->Xsize/8+x/8)&0xffff] & ~(0x80>>(x%8)) )
- | ((color & 0x01) ? (0x80>>(x%8)) : 0);
- outb(0x3c4, 0x02); outb(0x3c5, 0x02);
- outb(0x3ce, 0x04); outb(0x3cf, 0x01);
- object->Bitmap[(y*object->Xsize/8+x/8)&0xffff] =
- ( object->Bitmap[(y*object->Xsize/8+x/8)&0xffff] & ~(0x80>>(x%8)) )
- | ((color & 0x02) ? (0x80>>(x%8)) : 0);
- outb(0x3c4, 0x02); outb(0x3c5, 0x04);
- outb(0x3ce, 0x04); outb(0x3cf, 0x02);
- object->Bitmap[(y*object->Xsize/8+x/8)&0xffff] =
- ( object->Bitmap[(y*object->Xsize/8+x/8)&0xffff] & ~(0x80>>(x%8)) )
- | ((color & 0x04) ? (0x80>>(x%8)) : 0);
- outb(0x3c4, 0x02); outb(0x3c5, 0x08);
- outb(0x3ce, 0x04); outb(0x3cf, 0x03);
- object->Bitmap[(y*object->Xsize/8+x/8)&0xffff] =
- ( object->Bitmap[(y*object->Xsize/8+x/8)&0xffff] & ~(0x80>>(x%8)) )
- | ((color & 0x08) ? (0x80>>(x%8)) : 0);
- }
- }
- VGLMouseUnFreeze();
- }
-}
-
-byte
-VGLGetXY(VGLBitmap *object, int x, int y)
-{
- VGLCheckSwitch();
- switch (object->Type) {
- case MEMBUF:
- case VIDBUF8:
- return object->Bitmap[((y*object->Xsize)+x)];
- break;
- case VIDBUF8X:
- outb(0x3ce, 0x04); outb(0x3cf, x & 0x3);
- return object->Bitmap[(unsigned)(object->Xsize/4*y)+(x/4)];
- break;
- case VIDBUF4:
- return (object->Bitmap[((y*object->Xsize/8)+x/8)]&(0x80>>(x%8))) ? 1 : 0;
- break;
- }
- return 0;
-}
-
-void
-VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color)
-{
- int d, x, y, ax, ay, sx, sy, dx, dy;
-
- dx = x2-x1; ax = ABS(dx)<<1; sx = SGN(dx); x = x1;
- dy = y2-y1; ay = ABS(dy)<<1; sy = SGN(dy); y = y1;
-
- if (ax>ay) { /* x dominant */
- d = ay-(ax>>1);
- for (;;) {
- VGLSetXY(object, x, y, color);
- if (x==x2)
- break;
- if (d>=0) {
- y += sy; d -= ax;
- }
- x += sx; d += ay;
- }
- }
- else { /* y dominant */
- d = ax-(ay>>1);
- for (;;) {
- VGLSetXY(object, x, y, color);
- if (y==y2)
- break;
- if (d>=0) {
- x += sx; d -= ay;
- }
- y += sy; d += ax;
- }
- }
-}
-
-void
-VGLBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color)
-{
- VGLLine(object, x1, y1, x2, y1, color);
- VGLLine(object, x2, y1, x2, y2, color);
- VGLLine(object, x2, y2, x1, y2, color);
- VGLLine(object, x1, y2, x1, y1, color);
-}
-
-void
-VGLFilledBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color)
-{
- int y;
-
- for (y=y1; y<=y2; y++) VGLLine(object, x1, y, x2, y, color);
-}
-
-void
-inline set4pixels(VGLBitmap *object, int x, int y, int xc, int yc, byte color)
-{
- if (x!=0) {
- VGLSetXY(object, xc+x, yc+y, color);
- VGLSetXY(object, xc-x, yc+y, color);
- if (y!=0) {
- VGLSetXY(object, xc+x, yc-y, color);
- VGLSetXY(object, xc-x, yc-y, color);
- }
- }
- else {
- VGLSetXY(object, xc, yc+y, color);
- if (y!=0)
- VGLSetXY(object, xc, yc-y, color);
- }
-}
-
-void
-VGLEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color)
-{
- int x = 0, y = b, asq = a*a, asq2 = a*a*2, bsq = b*b;
- int bsq2 = b*b*2, d = bsq-asq*b+asq/4, dx = 0, dy = asq2*b;
-
- while (dx<dy) {
- set4pixels(object, x, y, xc, yc, color);
- if (d>0) {
- y--; dy-=asq2; d-=dy;
- }
- x++; dx+=bsq2; d+=bsq+dx;
- }
- d+=(3*(asq-bsq)/2-(dx+dy))/2;
- while (y>=0) {
- set4pixels(object, x, y, xc, yc, color);
- if (d<0) {
- x++; dx+=bsq2; d+=dx;
- }
- y--; dy-=asq2; d+=asq-dy;
- }
-}
-
-void
-inline set2lines(VGLBitmap *object, int x, int y, int xc, int yc, byte color)
-{
- if (x!=0) {
- VGLLine(object, xc+x, yc+y, xc-x, yc+y, color);
- if (y!=0)
- VGLLine(object, xc+x, yc-y, xc-x, yc-y, color);
- }
- else {
- VGLLine(object, xc, yc+y, xc, yc-y, color);
- }
-}
-
-void
-VGLFilledEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color)
-{
- int x = 0, y = b, asq = a*a, asq2 = a*a*2, bsq = b*b;
- int bsq2 = b*b*2, d = bsq-asq*b+asq/4, dx = 0, dy = asq2*b;
-
- while (dx<dy) {
- set2lines(object, x, y, xc, yc, color);
- if (d>0) {
- y--; dy-=asq2; d-=dy;
- }
- x++; dx+=bsq2; d+=bsq+dx;
- }
- d+=(3*(asq-bsq)/2-(dx+dy))/2;
- while (y>=0) {
- set2lines(object, x, y, xc, yc, color);
- if (d<0) {
- x++; dx+=bsq2; d+=dx;
- }
- y--; dy-=asq2; d+=asq-dy;
- }
-}
-
-void
-VGLClear(VGLBitmap *object, byte color)
-{
- VGLCheckSwitch();
- VGLMouseFreeze(0, 0, object->Xsize, object->Ysize, color);
- switch (object->Type) {
- case MEMBUF:
- case VIDBUF8:
- memset(object->Bitmap, color, object->Xsize*object->Ysize);
- break;
- case VIDBUF8X:
- /* XXX works only for Xsize % 4 = 0 */
- outb(0x3c4, 0x02); outb(0x3c5, 0x0f);
- memset(object->Bitmap, color, object->Xsize*object->Ysize/4);
- break;
-
- case VIDBUF4:
- /* XXX works only for Xsize % 8 = 0 */
- memset(object->Bitmap, color, object->Xsize/8*object->Ysize);
- break;
- }
- VGLMouseUnFreeze();
-}
-
-void
-VGLRestorePalette()
-{
- int i;
-
- outb(0x3C6, 0xFF);
- inb(0x3DA);
- outb(0x3C8, 0x00);
- for (i=0; i<256; i++) {
- outb(0x3C9, VGLSavePaletteRed[i]);
- inb(0x84);
- outb(0x3C9, VGLSavePaletteGreen[i]);
- inb(0x84);
- outb(0x3C9, VGLSavePaletteBlue[i]);
- inb(0x84);
- }
- inb(0x3DA);
- outb(0x3C0, 0x20);
-}
-
-void
-VGLSavePalette()
-{
- int i;
-
- outb(0x3C6, 0xFF);
- inb(0x3DA);
- outb(0x3C7, 0x00);
- for (i=0; i<256; i++) {
- VGLSavePaletteRed[i] = inb(0x3C9);
- inb(0x84);
- VGLSavePaletteGreen[i] = inb(0x3C9);
- inb(0x84);
- VGLSavePaletteBlue[i] = inb(0x3C9);
- inb(0x84);
- }
- inb(0x3DA);
- outb(0x3C0, 0x20);
-}
-
-void
-VGLSetPalette(byte *red, byte *green, byte *blue)
-{
- int i;
-
- for (i=0; i<256; i++) {
- VGLSavePaletteRed[i] = red[i];
- VGLSavePaletteGreen[i] = green[i];
- VGLSavePaletteBlue[i] = blue[i];
- }
- VGLCheckSwitch();
- outb(0x3C6, 0xFF);
- inb(0x3DA);
- outb(0x3C8, 0x00);
- for (i=0; i<256; i++) {
- outb(0x3C9, VGLSavePaletteRed[i]);
- inb(0x84);
- outb(0x3C9, VGLSavePaletteGreen[i]);
- inb(0x84);
- outb(0x3C9, VGLSavePaletteBlue[i]);
- inb(0x84);
- }
- inb(0x3DA);
- outb(0x3C0, 0x20);
-}
-
-void
-VGLSetPaletteIndex(byte color, byte red, byte green, byte blue)
-{
- VGLSavePaletteRed[color] = red;
- VGLSavePaletteGreen[color] = green;
- VGLSavePaletteBlue[color] = blue;
- VGLCheckSwitch();
- outb(0x3C6, 0xFF);
- inb(0x3DA);
- outb(0x3C8, color);
- outb(0x3C9, red); outb(0x3C9, green); outb(0x3C9, blue);
- inb(0x3DA);
- outb(0x3C0, 0x20);
-}
-
-void
-VGLSetBorder(byte color)
-{
- VGLCheckSwitch();
- inb(0x3DA);
- outb(0x3C0,0x11); outb(0x3C0, color);
- inb(0x3DA);
- outb(0x3C0, 0x20);
-}
-
-void
-VGLBlankDisplay(int blank)
-{
- byte val;
-
- VGLCheckSwitch();
- outb(0x3C4, 0x01); val = inb(0x3C5); outb(0x3C4, 0x01);
- outb(0x3C5, ((blank) ? (val |= 0x20) : (val &= 0xDF)));
-}
diff --git a/lib/libvgl/text.c b/lib/libvgl/text.c
deleted file mode 100644
index f598e47..0000000
--- a/lib/libvgl/text.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
- * in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: text.c,v 1.4 1997/08/13 19:34:23 sos Exp $
- */
-
-#include <stdio.h>
-#include "vgl.h"
-
-static VGLText *VGLTextFont = 0;
-
-extern byte VGLFont[];
-
-int
-VGLTextSetFontFile(char *filename)
-{
-FILE *fd;
-
- if (VGLTextFont) {
- if (VGLTextFont->BitmapArray)
- free (VGLTextFont->BitmapArray);
- free(VGLTextFont);
- }
-
- if ((VGLTextFont=(VGLText*)malloc(sizeof(VGLText))) == (VGLText*)0)
- return 1;
-
- if (filename==NULL) {
- VGLTextFont->Width = 8;
- VGLTextFont->Height = 8;
- VGLTextFont->BitmapArray = VGLFont;
- }
- else {
- if ((fd=fopen(filename, "r"))==(FILE*)0)
- return 1;
- fread(&VGLTextFont->Width, 1 , 1, fd);
- fread(&VGLTextFont->Height, 1 , 1, fd);
- VGLTextFont->BitmapArray =
- (byte*)malloc(256*VGLTextFont->Width*VGLTextFont->Height);
- fread(VGLTextFont->BitmapArray, 1,
- (256*VGLTextFont->Width* VGLTextFont->Height), fd);
- fclose(fd);
- }
- return 0;
-}
-
-void
-VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch,
- byte fgcol, byte bgcol, int fill, int dir)
-{
- int lin, bit;
-
- for(lin = 0; lin < VGLTextFont->Height; lin++) {
- for(bit = 0; bit < VGLTextFont->Width; bit++) {
- if (VGLTextFont->BitmapArray[((ch*VGLTextFont->Height)+lin)]&(1<<bit))
- switch (dir) {
- case 0:
- VGLSetXY(Object, (x+7-bit), (y+lin), fgcol);
- break;
- case 1:
- VGLSetXY(Object, (x+lin), (y-7+bit), fgcol);
- break;
- case 2:
- VGLSetXY(Object, (x-7+bit), (y-lin), fgcol);
- break;
- case 3:
- VGLSetXY(Object, (x-lin), (y+7-bit), fgcol);
- break;
- case 4:
- VGLSetXY(Object, (x+lin+7-bit), (y+lin+bit), fgcol);
- break;
- }
- else if (fill)
- switch (dir) {
- case 0:
- VGLSetXY(Object, (x+7-bit), (y+lin), bgcol);
- break;
- case 1:
- VGLSetXY(Object, (x+lin), (y-7+bit), bgcol);
- break;
- case 2:
- VGLSetXY(Object, (x-7+bit), (y-lin), bgcol);
- break;
- case 3:
- VGLSetXY(Object, (x-lin), (y+7-bit), bgcol);
- break;
- case 4:
- VGLSetXY(Object, (x+lin+7-bit), (y+lin+bit), bgcol);
- break;
- }
- }
- }
-}
-
-void
-VGLBitmapString(VGLBitmap *Object, int x, int y, char *str,
- byte fgcol, byte bgcol, int fill, int dir)
-{
- int pos;
-
- for (pos=0; pos<strlen(str); pos++) {
- switch (dir) {
- case 0:
- VGLBitmapPutChar(Object, x+(pos*VGLTextFont->Width), y,
- str[pos], fgcol, bgcol, fill, dir);
- break;
- case 1:
- VGLBitmapPutChar(Object, x, y-(pos*VGLTextFont->Width),
- str[pos], fgcol, bgcol, fill, dir);
- break;
- case 2:
- VGLBitmapPutChar(Object, x-(pos*VGLTextFont->Width), y,
- str[pos], fgcol, bgcol, fill, dir);
- break;
- case 3:
- VGLBitmapPutChar(Object, x, y+(pos*VGLTextFont->Width),
- str[pos], fgcol, bgcol, fill, dir);
- break;
- case 4:
- VGLBitmapPutChar(Object, x+(pos*VGLTextFont->Width),
- y-(pos*VGLTextFont->Width),
- str[pos], fgcol, bgcol, fill, dir);
- break;
- }
- }
-}
-
-byte VGLFont[] = {
-0,0,0,0,0,0,0,0,126,129,165,129,189,153,129,126,126,255,219,255,195,231,
-255,126,108,254,254,254,124,56,16,0,16,56,124,254,124,56,16,0,56,124,56,
-254,254,124,56,124,16,16,56,124,254,124,56,124,0,0,24,60,60,24,0,0,255,
-255,231,195,195,231,255,255,0,60,102,66,66,102,60,0,255,195,153,189,189,
-153,195,255,15,7,15,125,204,204,204,120,60,102,102,102,60,24,126,24,63,
-51,63,48,48,112,240,224,127,99,127,99,99,103,230,192,153,90,60,231,231,
-60,90,153,128,224,248,254,248,224,128,0,2,14,62,254,62,14,2,0,24,60,126,
-24,24,126,60,24,102,102,102,102,102,0,102,0,127,219,219,123,27,27,27,0,
-62,99,56,108,108,56,204,120,0,0,0,0,126,126,126,0,24,60,126,24,126,60,24,
-255,24,60,126,24,24,24,24,0,24,24,24,24,126,60,24,0,0,24,12,254,12,24,0,
-0,0,48,96,254,96,48,0,0,0,0,192,192,192,254,0,0,0,36,102,255,102,36,0,0,
-0,24,60,126,255,255,0,0,0,255,255,126,60,24,0,0,0,0,0,0,0,0,0,0,48,120,
-120,48,48,0,48,0,108,108,108,0,0,0,0,0,108,108,254,108,254,108,108,0,48,
-124,192,120,12,248,48,0,0,198,204,24,48,102,198,0,56,108,56,118,220,204,
-118,0,96,96,192,0,0,0,0,0,24,48,96,96,96,48,24,0,96,48,24,24,24,48,96,0,
-0,102,60,255,60,102,0,0,0,48,48,252,48,48,0,0,0,0,0,0,0,48,48,96,0,0,0,
-252,0,0,0,0,0,0,0,0,0,48,48,0,6,12,24,48,96,192,128,0,124,198,206,222,246,
-230,124,0,48,112,48,48,48,48,252,0,120,204,12,56,96,204,252,0,120,204,12,
-56,12,204,120,0,28,60,108,204,254,12,30,0,252,192,248,12,12,204,120,0,56,
-96,192,248,204,204,120,0,252,204,12,24,48,48,48,0,120,204,204,120,204,204,
-120,0,120,204,204,124,12,24,112,0,0,48,48,0,0,48,48,0,0,48,48,0,0,48,48,
-96,24,48,96,192,96,48,24,0,0,0,252,0,0,252,0,0,96,48,24,12,24,48,96,0,120,
-204,12,24,48,0,48,0,124,198,222,222,222,192,120,0,48,120,204,204,252,204,
-204,0,252,102,102,124,102,102,252,0,60,102,192,192,192,102,60,0,248,108,
-102,102,102,108,248,0,254,98,104,120,104,98,254,0,254,98,104,120,104,96,
-240,0,60,102,192,192,206,102,62,0,204,204,204,252,204,204,204,0,120,48,
-48,48,48,48,120,0,30,12,12,12,204,204,120,0,230,102,108,120,108,102,230,
-0,240,96,96,96,98,102,254,0,198,238,254,254,214,198,198,0,198,230,246,222,
-206,198,198,0,56,108,198,198,198,108,56,0,252,102,102,124,96,96,240,0,120,
-204,204,204,220,120,28,0,252,102,102,124,108,102,230,0,120,204,224,112,
-28,204,120,0,252,180,48,48,48,48,120,0,204,204,204,204,204,204,252,0,204,
-204,204,204,204,120,48,0,198,198,198,214,254,238,198,0,198,198,108,56,56,
-108,198,0,204,204,204,120,48,48,120,0,254,198,140,24,50,102,254,0,120,96,
-96,96,96,96,120,0,192,96,48,24,12,6,2,0,120,24,24,24,24,24,120,0,16,56,
-108,198,0,0,0,0,0,0,0,0,0,0,0,255,48,48,24,0,0,0,0,0,0,0,120,12,124,204,
-118,0,224,96,96,124,102,102,220,0,0,0,120,204,192,204,120,0,28,12,12,124,
-204,204,118,0,0,0,120,204,252,192,120,0,56,108,96,240,96,96,240,0,0,0,118,
-204,204,124,12,248,224,96,108,118,102,102,230,0,48,0,112,48,48,48,120,0,
-12,0,12,12,12,204,204,120,224,96,102,108,120,108,230,0,112,48,48,48,48,
-48,120,0,0,0,204,254,254,214,198,0,0,0,248,204,204,204,204,0,0,0,120,204,
-204,204,120,0,0,0,220,102,102,124,96,240,0,0,118,204,204,124,12,30,0,0,
-220,118,102,96,240,0,0,0,124,192,120,12,248,0,16,48,124,48,48,52,24,0,0,
-0,204,204,204,204,118,0,0,0,204,204,204,120,48,0,0,0,198,214,254,254,108,
-0,0,0,198,108,56,108,198,0,0,0,204,204,204,124,12,248,0,0,252,152,48,100,
-252,0,28,48,48,224,48,48,28,0,24,24,24,0,24,24,24,0,224,48,48,28,48,48,
-224,0,118,220,0,0,0,0,0,0,0,16,56,108,198,198,254,0,0,0,0,0,0,0,0,0,0,0,
-60,126,255,126,24,0,170,85,85,170,170,85,85,170,68,68,68,68,31,4,4,4,124,
-64,64,64,31,16,16,16,56,68,68,56,30,17,20,19,64,64,64,124,31,16,16,16,56,
-108,56,0,0,0,0,0,0,0,24,24,24,24,126,0,68,100,76,68,16,16,16,31,68,68,40,
-16,31,4,4,4,24,24,24,24,248,0,0,0,0,0,0,0,248,24,24,24,0,0,0,0,31,24,24,
-24,24,24,24,24,31,0,0,0,24,24,24,24,255,24,24,24,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,255,0,0,0,0,0,0,0,0,0,24,24,24,
-24,31,24,24,24,24,24,24,24,248,24,24,24,24,24,24,24,255,0,0,0,0,0,0,0,255,
-24,24,24,24,24,24,24,24,24,24,24,0,12,48,96,24,12,126,0,0,48,12,6,24,48,
-126,0,0,0,3,62,54,54,108,0,0,0,4,126,16,126,64,0,0,28,48,48,48,48,126,0,
-0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,48,0,48,48,120,120,48,0,0,0,16,124,192,
-192,124,16,0,56,96,96,240,96,252,0,0,195,60,102,102,60,195,0,0,204,204,
-120,48,252,48,0,24,24,24,0,24,24,24,0,126,192,124,198,124,6,252,0,198,0,
-0,0,0,0,0,0,124,130,186,162,186,130,124,0,28,6,30,34,31,63,0,0,0,51,102,
-204,102,51,0,0,0,254,6,0,0,0,0,0,0,0,0,0,0,0,0,0,124,130,186,178,170,130,
-124,0,254,0,0,0,0,0,0,0,56,108,56,0,0,0,0,0,0,16,124,16,0,124,0,0,28,54,
-6,24,62,0,0,0,30,2,14,2,30,0,0,0,24,48,0,0,0,0,0,0,0,0,204,204,204,204,
-118,192,126,202,202,126,10,10,10,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,24,48,6,
-14,6,6,6,0,0,0,14,17,17,17,14,31,0,0,0,204,102,51,102,204,0,0,96,224,102,
-108,51,103,15,3,96,224,102,108,54,106,4,14,240,32,150,108,51,103,15,3,48,
-0,48,96,192,204,120,0,24,12,48,120,204,252,204,0,96,192,48,120,204,252,
-204,0,120,132,48,120,204,252,204,0,102,152,48,120,204,252,204,0,204,0,48,
-120,204,252,204,0,48,72,48,120,204,252,204,0,62,120,152,156,248,152,158,
-0,60,102,192,192,192,102,28,48,48,24,254,98,120,98,254,0,24,48,254,98,120,
-98,254,0,56,68,254,98,120,98,254,0,102,0,254,98,120,98,254,0,96,48,120,
-48,48,48,120,0,24,48,120,48,48,48,120,0,120,132,120,48,48,48,120,0,204,
-0,120,48,48,48,120,0,120,108,102,246,102,108,120,0,102,152,230,246,222,
-206,198,0,48,24,124,198,198,198,124,0,24,48,124,198,198,198,124,0,56,68,
-124,198,198,198,124,0,102,152,124,198,198,198,124,0,198,0,124,198,198,198,
-124,0,0,198,108,56,56,108,198,0,6,124,206,154,178,230,120,192,96,48,204,
-204,204,204,252,0,24,48,204,204,204,204,252,0,120,132,204,204,204,204,252,
-0,204,0,204,204,204,204,252,0,24,48,204,204,120,48,120,0,96,120,108,120,
-96,96,96,0,120,204,196,220,198,198,220,192,48,24,120,12,124,204,118,0,24,
-48,120,12,124,204,118,0,120,132,120,12,124,204,118,0,102,152,120,12,124,
-204,118,0,204,0,120,12,124,204,118,0,48,72,56,12,124,204,118,0,0,0,236,
-50,126,176,110,0,0,0,60,102,192,102,28,48,48,24,120,204,252,192,120,0,24,
-48,120,204,252,192,120,0,120,132,120,204,252,192,120,0,204,0,120,204,252,
-192,120,0,96,48,0,112,48,48,120,0,24,48,0,112,48,48,120,0,112,136,0,112,
-48,48,120,0,204,0,0,112,48,48,120,0,108,56,108,12,108,204,120,0,102,152,
-248,204,204,204,204,0,96,48,0,124,198,198,124,0,24,48,0,124,198,198,124,
-0,56,68,0,124,198,198,124,0,102,152,0,124,198,198,124,0,198,0,0,124,198,
-198,124,0,0,0,24,0,126,0,24,0,0,0,6,124,222,246,124,192,96,48,0,204,204,
-204,118,0,24,48,0,204,204,204,118,0,48,72,0,204,204,204,118,0,204,0,0,204,
-204,204,118,0,24,48,204,204,204,124,12,248,224,120,108,102,108,120,224,
-0,204,0,204,204,204,124,12,248
-};
diff --git a/lib/libvgl/vgl.3 b/lib/libvgl/vgl.3
deleted file mode 100644
index 366a19e..0000000
--- a/lib/libvgl/vgl.3
+++ /dev/null
@@ -1,280 +0,0 @@
-.\" Copyright (c) 1997 Søren Schmidt
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer,
-.\" in this position and unchanged.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. The name of the author may not be used to endorse or promote products
-.\" derived from this software withough specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $Id: vgl.3,v 1.2 1997/10/16 09:12:31 sos Exp $
-
-.Dd August 13, 1997
-.Dt VGL 3
-.Os FreeBSD 3
-.Sh NAME
-.Nm vgl
-.Nd Video Graphics Library functions
-.Sh SYNOPSIS
-.Fd #include <vgl.h>
-
-.Sh DESCRIPTION
-Libvgl is a library that enables the programmer access to the graphics
-modes supported by the console driver (syscons). The library takes care of
-programming the actual video hardware, and provides a number of simple
-functions to do various graphic operations. There is also support for a
-mouse via the standard mouse system in FreeBSD, see
-.Fn moused
-, including the ability to transparently have a mouse pointer superimposed on
-the graphic image currently being worked on.
-The library takes care of screen switching by storing the current image in
-memory before switching to another virtual console, and restoring when the
-user switches back. This allows several graphic applications at once, but
-on different virtual consoles.
-
-Below is a short description of the various functions:
-
-.Sh AUTHOR
-.An Søren Schmidt (sos@FreeBSD.org)
-
-.Sh FUNCTIONS
-
-.Ft int
-.Fn VGLInit "int mode"
-
-Initialize the library and set up the graphic mode
-.Em mode .
-
-
-.Ft void
-.Fn VGLEnd "void"
-
-Terminate graphic mode, and restore the screenmode that was active before
-.Fn VGLInit
-was called.
-
-
-.Ft void
-.Fn VGLCheckSwitch "void"
-
-If the program goes into longer periods of processing without doing
-any graphics output, calling this function occasionally will allow
-the system to switch screens.
-
-
-.Ft int
-.Fn VGLTextSetFontFile "char *filename"
-
-Instruct the char/string functions to use the font in file
-.Em filename
-instead of the builtin font.
-
-
-.Ft int
-.Fn VGLMouseInit "int mode"
-
-Initialize the mouse. The optional on-screen mouse pointer is shown if the
-argument is
-.Em VGL_MOUSESHOW .
-
-
-.Ft void
-.Fn VGLMouseMode "int mode"
-
-Either shows the mouse pointer if the argument is
-.Em VGL_MOUSESHOW
-, or hides the mouse pointer if the argument is
-.Em VGL_MOUSEHIDE .
-
-
-.Ft int
-.Fn VGLMouseStatus "int *x" "int *y" "char *buttons"
-
-Returns the current mouse pointer coordinates and button state in
-.Em x, y
-, buttons. The return value reflects if the mouse pointer
-is currently shown on screen or not.
-
-
-.Ft void
-.Fn VGLMouseSetImage "VGLBitmap *AndMask" "VGLBitmap *OrMask"
-
-With this function it is possible to change the image of the mouse pointer
-on screen.
-
-
-.Ft void
-.Fn VGLMouseSetStdImage "void"
-
-This function restores the mouse pointer to the standard arrow.
-
-
-.Ft void
-.Fn VGLLine "VGLBitmap *object" "int x1" "int y1" "int x2" "int y2" "byte color"
-
-Draw a line from
-.Em x1, y1
-to
-.Em x2, y2
-in color
-.Em color .
-
-
-.Ft void
-.Fn VGLBox "VGLBitmap *object" "int x1" "int y1" "int x2" "int y2" "byte color"
-
-Draw a box with upper left hand corner at
-.Em x1, y1
-and lower right hand corner at
-.Em x2, y2
-in color
-.Em color .
-
-
-.Ft void
-.Fn VGLFilledBox "VGLBitmap *object" "int x1" "int y1" "int x2" "int y2" "byte color"
-
-Draw a filled (solid) box with upper left hand corner at
-.Em x1, y1
-and lower right hand corner at
-.Em x2, y2
-in color
-.Em color .
-
-
-.Ft void
-.Fn VGLEllipse "VGLBitmap *object" "int xc" "int yc" "int a" "int b" "byte color"
-
-Draw an ellipse centered at
-.Em xc, yc
-make it
-.Em a
-pixels wide, and
-.Em b
-pixels high in color
-.Em color .
-
-
-.Ft void
-.Fn VGLFilledEllipse "VGLBitmap *object" "int xc" "int yc" "int a" "int b" "byte color"
-
-Draw a filled (solid) ellipse centered at
-.Em xc, yc
-make it
-.Em a
-pixels wide, and
-.Em b
-pixels high in color
-.Em color .
-
-
-.Ft int
-.Fn VGLBitmapCopy "VGLBitmap *src" "int srcx" "int srcy" "VGLBitmap *dst" "int dstx" "int dsty" "int width" "int hight"
-
-Copy a rectangle of pixels from bitmap
-.Em src
-upper left hand corner at
-.Em srcx, srcy
-to bitmap
-.Em dst
-at
-.Em dstx, dsty
-of the size
-.Em width, height .
-
-
-.Ft void
-.Fn VGLBitmapPutChar "VGLBitmap *Object" "int x" "int y" "byte ch" "byte fgcol" "byte bgcol" "int fill" "int dir"
-
-Write the character
-.Em ch
-at position
-.Em x, y
-in foreground color
-.Em fgcol.
-If
-.Em fill
-is != 0, use the color
-.Em bgcol
-as background otherwise the background is transparent.
-The character is drawn in the direction specified by the argument
-.Em dir .
-
-
-.Ft void
-.Fn VGLBitmapString "VGLBitmap *Object" "int x" "int y" "char *str" "byte fgcol" "byte bgcol" "int fill" "int dir"
-
-Write the string
-.Em str
-at position
-.Em x, y
-in foreground color
-.Em fgcol.
-If
-.Em fill
-is != 0, use the color
-.Em bgcol
-as background otherwise the background is transparent.
-The string is drawn in the direction specified by the argument
-.Em dir .
-
-.Ft void
-.Fn VGLClear "VGLBitmap *object" "byte color"
-
-Clears the entire bitmap to color
-.Em color .
-
-
-.Ft void
-.Fn VGLSetPalette "byte *red" "byte *green" "byte *blue"
-
-This function sets the palette used, the arguments
-.Em red, green, blue
-should point to byte arrays of 256 positions each.
-
-
-.Ft void
-.Fn VGLSetPaletteIndex "byte color" "byte red" "byte green" "byte blue"
-
-Set the palette index
-.Em color
-to the specified RGB value.
-
-
-.Ft void
-.Fn VGLSetBorder "byte color"
-
-Set the border color to color
-.Em color .
-
-
-.Ft void
-.Fn VGLBlankDisplay "int blank"
-
-Blank the display if the argment
-.Em blank
-!= 0. This can be done to shut off the screen during display updates that
-the user should first see when it's done.
-
-
-.Sh HISTORY
-The
-.Nm
-library appeared in FreeBSD 3.0
diff --git a/lib/libvgl/vgl.h b/lib/libvgl/vgl.h
deleted file mode 100644
index b08dc82..0000000
--- a/lib/libvgl/vgl.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*-
- * Copyright (c) 1991-1997 Søren Schmidt
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
- * in this position and unchanged.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software withough specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: vgl.h,v 1.1 1997/08/17 21:09:35 sos Exp $
- */
-
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <machine/cpufunc.h>
-
-typedef unsigned char byte;
-typedef struct {
- byte Type;
- int Xsize, Ysize;
- byte *Bitmap;
-} VGLBitmap;
-
-/*
- * Defined Type's
- */
-#define MEMBUF 0
-#define VIDBUF4 1
-#define VIDBUF8 2
-#define VIDBUF8X 3
-#define NOBUF 255
-
-typedef struct VGLText {
- byte Width, Height;
- byte *BitmapArray;
-} VGLText;
-
-typedef struct VGLObject {
- int Id;
- int Type;
- int Status;
- int Xpos, Ypos;
- int Xhot, Yhot;
- VGLBitmap *Image;
- VGLBitmap *Mask;
- int (*CallBackFunction)();
-} VGLObject;
-
-#define MOUSE_IMG_SIZE 16
-#define VGL_MOUSEHIDE 0
-#define VGL_MOUSESHOW 1
-#define VGL_MOUSEFREEZE 0
-#define VGL_MOUSEUNFREEZE 1
-#define VGL_DIR_RIGHT 0
-#define VGL_DIR_UP 1
-#define VGL_DIR_LEFT 2
-#define VGL_DIR_DOWN 3
-#define VGL_RAWKEYS 1
-#define VGL_CODEKEYS 2
-#define VGL_XLATEKEYS 3
-
-extern VGLBitmap *VGLDisplay;
-
-/*
- * Prototypes
- */
-/* bitmap.c */
-int __VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, VGLBitmap *dst, int dstx, int dsty, int width, int hight);
-int VGLBitmapCopy(VGLBitmap *src, int srcx, int srcy, VGLBitmap *dst, int dstx, int dsty, int width, int hight);
-/* keyboard.c */
-int VGLKeyboardInit(int mode);
-void VGLKeyboardEnd(void);
-int VGLKeyboardGetCh(void);
-/* main.c */
-void VGLEnd(void);
-int VGLInit(int mode);
-void VGLCheckSwitch(void);
-/* mouse.c */
-void VGLMousePointerShow(void);
-void VGLMousePointerHide(void);
-void VGLMouseMode(int mode);
-void VGLMouseAction(int dummy);
-void VGLMouseSetImage(VGLBitmap *AndMask, VGLBitmap *OrMask);
-void VGLMouseSetStdImage(void);
-int VGLMouseInit(int mode);
-int VGLMouseStatus(int *x, int *y, char *buttons);
-int VGLMouseFreeze(int x, int y, int width, int hight, byte color);
-void VGLMouseUnFreeze(void);
-/* simple.c */
-void VGLSetXY(VGLBitmap *object, int x, int y, byte color);
-byte VGLGetXY(VGLBitmap *object, int x, int y);
-void VGLLine(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color);
-void VGLBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color);
-void VGLFilledBox(VGLBitmap *object, int x1, int y1, int x2, int y2, byte color);
-void VGLEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color);
-void VGLFilledEllipse(VGLBitmap *object, int xc, int yc, int a, int b, byte color);
-void VGLClear(VGLBitmap *object, byte color);
-void VGLRestorePalette(void);
-void VGLSavePalette(void);
-void VGLSetPalette(byte *red, byte *green, byte *blue);
-void VGLSetPaletteIndex(byte color, byte red, byte green, byte blue);
-void VGLSetBorder(byte color);
-void VGLBlankDisplay(int blank);
-/* text.c */
-int VGLTextSetFontFile(char *filename);
-void VGLBitmapPutChar(VGLBitmap *Object, int x, int y, byte ch, byte fgcol, byte bgcol, int fill, int dir);
-void VGLBitmapString(VGLBitmap *Object, int x, int y, char *str, byte fgcol, byte bgcol, int fill, int dir);
diff --git a/lib/libxpg4/Makefile b/lib/libxpg4/Makefile
deleted file mode 100644
index 1e5c123..0000000
--- a/lib/libxpg4/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-LIB= xpg4
-SRCS= setlocale.c setrunelocale.c euc.c mskanji.c utf2.c runetype.c \
- tolower.c toupper.c
-CFLAGS+= -Wall -DXPG4 -I${.CURDIR}/../libc/locale
-.PATH: ${.CURDIR}/../libc/locale
-
-NOMAN= YES
-
-.include <bsd.lib.mk>
diff --git a/lib/liby/Makefile b/lib/liby/Makefile
deleted file mode 100644
index eebde5e..0000000
--- a/lib/liby/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id$
-
-LIB= y
-SHLIB_MAJOR= 2
-SHLIB_MINOR= 0
-
-SRCS= main.c yyerror.c
-
-#
-# Before complaining about this, please *double-check* that you have
-# updated the ldconfig path in /etc/rc to include /usr/lib/compat that
-# was added in src/etc/rc rev 1.98.
-# This is so that `ld' will not continue to generatebinaries linked
-# shared against liby, so that in a future release we can move this
-# off to a compat dist (like compat22).
-#
-beforeinstall:
- rm -f ${DESTDIR}${ORIG_SHLIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
-
-.include <bsd.lib.mk>
-
-# This must follow the .include in case SHLIBDIR is defined there.
-ORIG_SHLIBDIR:= ${SHLIBDIR}
-
-# The ldconfig line in/etc/rc doesn't depend on ${LIBDIR} or ${SHLIBDIR},
-# so neither does this.
-SHLIBDIR= /usr/lib/compat
diff --git a/lib/liby/main.c b/lib/liby/main.c
deleted file mode 100644
index 4b4e67a..0000000
--- a/lib/liby/main.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-int
-main(void)
-{
- exit(yyparse());
-}
diff --git a/lib/liby/yyerror.c b/lib/liby/yyerror.c
deleted file mode 100644
index b21a7a8..0000000
--- a/lib/liby/yyerror.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)yyerror.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-#include <stdio.h>
-
-int
-yyerror(msg)
-char *msg;
-{
- (void)fprintf(stderr, "%s\n", msg);
- return(0);
-}
diff --git a/lib/libz/ChangeLog b/lib/libz/ChangeLog
deleted file mode 100644
index 218cfb0..0000000
--- a/lib/libz/ChangeLog
+++ /dev/null
@@ -1,239 +0,0 @@
-
- ChangeLog file for zlib
-
-Changes in 1.0.4 (24 Jul 96)
-- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF
- bit, so the decompressor could decompress all the correct data but went
- on to attempt decompressing extra garbage data. This affected minigzip too.
-- zlibVersion and gzerror return const char* (needed for DLL)
-- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno)
-- use z_error only for DEBUG (avoid problem with DLLs)
-
-Changes in 1.0.3 (2 Jul 96)
-- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS
- small and medium models; this makes the library incompatible with previous
- versions for these models. (No effect in large model or on other systems.)
-- return OK instead of BUF_ERROR if previous deflate call returned with
- avail_out as zero but there is nothing to do
-- added memcmp for non STDC compilers
-- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly)
-- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO)
-- better check for 16-bit mode MSC (avoids problem with Symantec)
-
-Changes in 1.0.2 (23 May 96)
-- added Windows DLL support
-- added a function zlibVersion (for the DLL support)
-- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model)
-- Bytef is define's instead of typedef'd only for Borland C
-- avoid reading uninitialized memory in example.c
-- mention in README that the zlib format is now RFC1950
-- updated Makefile.dj2
-- added algorithm.doc
-
-Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
-- fix array overlay in deflate.c which sometimes caused bad compressed data
-- fix inflate bug with empty stored block
-- fix MSDOS medium model which was broken in 0.99
-- fix deflateParams() which could generated bad compressed data.
-- Bytef is define'd instead of typedef'ed (work around Borland bug)
-- added an INDEX file
-- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32),
- Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas)
-- speed up adler32 for modern machines without auto-increment
-- added -ansi for IRIX in configure
-- static_init_done in trees.c is an int
-- define unlink as delete for VMS
-- fix configure for QNX
-- add configure branch for SCO and HPUX
-- avoid many warnings (unused variables, dead assignments, etc...)
-- no fdopen for BeOS
-- fix the Watcom fix for 32 bit mode (define FAR as empty)
-- removed redefinition of Byte for MKWERKS
-- work around an MWKERKS bug (incorrect merge of all .h files)
-
-Changes in 0.99 (27 Jan 96)
-- allow preset dictionary shared between compressor and decompressor
-- allow compression level 0 (no compression)
-- add deflateParams in zlib.h: allow dynamic change of compression level
- and compression strategy.
-- test large buffers and deflateParams in example.c
-- add optional "configure" to build zlib as a shared library
-- suppress Makefile.qnx, use configure instead
-- fixed deflate for 64-bit systems (detected on Cray)
-- fixed inflate_blocks for 64-bit systems (detected on Alpha)
-- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2)
-- always return Z_BUF_ERROR when deflate() has nothing to do
-- deflateInit and inflateInit are now macros to allow version checking
-- prefix all global functions and types with z_ with -DZ_PREFIX
-- make falloc completely reentrant (inftrees.c)
-- fixed very unlikely race condition in ct_static_init
-- free in reverse order of allocation to help memory manager
-- use zlib-1.0/* instead of zlib/* inside the tar.gz
-- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith
- -Wconversion -Wstrict-prototypes -Wmissing-prototypes"
-- allow gzread on concatenated .gz files
-- deflateEnd now returns Z_DATA_ERROR if it was premature
-- deflate is finally (?) fully deterministic (no matches beyond end of input)
-- Document Z_SYNC_FLUSH
-- add uninstall in Makefile
-- Check for __cpluplus in zlib.h
-- Better test in ct_align for partial flush
-- avoid harmless warnings for Borland C++
-- initialize hash_head in deflate.c
-- avoid warning on fdopen (gzio.c) for HP cc -Aa
-- include stdlib.h for STDC compilers
-- include errno.h for Cray
-- ignore error if ranlib doesn't exist
-- call ranlib twice for NeXTSTEP
-- use exec_prefix instead of prefix for libz.a
-- renamed ct_* as _tr_* to avoid conflict with applications
-- clear z->msg in inflateInit2 before any error return
-- initialize opaque in example.c, gzio.c, deflate.c and inflate.c
-- fixed typo in zconf.h (_GNUC__ => __GNUC__)
-- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode)
-- fix typo in Make_vms.com (f$trnlnm -> f$getsyi)
-- in fcalloc, normalize pointer if size > 65520 bytes
-- don't use special fcalloc for 32 bit Borland C++
-- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc...
-- use Z_BINARY instead of BINARY
-- document that gzclose after gzdopen will close the file
-- allow "a" as mode in gzopen.
-- fix error checking in gzread
-- allow skipping .gz extra-field on pipes
-- added reference to Perl interface in README
-- put the crc table in FAR data (I dislike more and more the medium model :)
-- added get_crc_table
-- added a dimension to all arrays (Borland C can't count).
-- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast
-- guard against multiple inclusion of *.h (for precompiled header on Mac)
-- Watcom C pretends to be Microsoft C small model even in 32 bit mode.
-- don't use unsized arrays to avoid silly warnings by Visual C++:
- warning C4746: 'inflate_mask' : unsized array treated as '__far'
- (what's wrong with far data in far model?).
-- define enum out of inflate_blocks_state to allow compilation with C++
-
-Changes in 0.95 (16 Aug 95)
-- fix MSDOS small and medium model (now easier to adapt to any compiler)
-- inlined send_bits
-- fix the final (:-) bug for deflate with flush (output was correct but
- not completely flushed in rare occasions).
-- default window size is same for compression and decompression
- (it's now sufficient to set MAX_WBITS in zconf.h).
-- voidp -> voidpf and voidnp -> voidp (for consistency with other
- typedefs and because voidnp was not near in large model).
-
-Changes in 0.94 (13 Aug 95)
-- support MSDOS medium model
-- fix deflate with flush (could sometimes generate bad output)
-- fix deflateReset (zlib header was incorrectly suppressed)
-- added support for VMS
-- allow a compression level in gzopen()
-- gzflush now calls fflush
-- For deflate with flush, flush even if no more input is provided.
-- rename libgz.a as libz.a
-- avoid complex expression in infcodes.c triggering Turbo C bug
-- work around a problem with gcc on Alpha (in INSERT_STRING)
-- don't use inline functions (problem with some gcc versions)
-- allow renaming of Byte, uInt, etc... with #define.
-- avoid warning about (unused) pointer before start of array in deflate.c
-- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c
-- avoid reserved word 'new' in trees.c
-
-Changes in 0.93 (25 June 95)
-- temporarily disable inline functions
-- make deflate deterministic
-- give enough lookahead for PARTIAL_FLUSH
-- Set binary mode for stdin/stdout in minigzip.c for OS/2
-- don't even use signed char in inflate (not portable enough)
-- fix inflate memory leak for segmented architectures
-
-Changes in 0.92 (3 May 95)
-- don't assume that char is signed (problem on SGI)
-- Clear bit buffer when starting a stored block
-- no memcpy on Pyramid
-- suppressed inftest.c
-- optimized fill_window, put longest_match inline for gcc
-- optimized inflate on stored blocks.
-- untabify all sources to simplify patches
-
-Changes in 0.91 (2 May 95)
-- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h
-- Document the memory requirements in zconf.h
-- added "make install"
-- fix sync search logic in inflateSync
-- deflate(Z_FULL_FLUSH) now works even if output buffer too short
-- after inflateSync, don't scare people with just "lo world"
-- added support for DJGPP
-
-Changes in 0.9 (1 May 95)
-- don't assume that zalloc clears the allocated memory (the TurboC bug
- was Mark's bug after all :)
-- let again gzread copy uncompressed data unchanged (was working in 0.71)
-- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented
-- added a test of inflateSync in example.c
-- moved MAX_WBITS to zconf.h because users might want to change that.
-- document explicitly that zalloc(64K) on MSDOS must return a normalized
- pointer (zero offset)
-- added Makefiles for Microsoft C, Turbo C, Borland C++
-- faster crc32()
-
-Changes in 0.8 (29 April 95)
-- added fast inflate (inffast.c)
-- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this
- is incompatible with previous versions of zlib which returned Z_OK.
-- work around a TurboC compiler bug (bad code for b << 0, see infutil.h)
- (actually that was not a compiler bug, see 0.81 above)
-- gzread no longer reads one extra byte in certain cases
-- In gzio destroy(), don't reference a freed structure
-- avoid many warnings for MSDOS
-- avoid the ERROR symbol which is used by MS Windows
-
-Changes in 0.71 (14 April 95)
-- Fixed more MSDOS compilation problems :( There is still a bug with
- TurboC large model.
-
-Changes in 0.7 (14 April 95)
-- Added full inflate support.
-- Simplified the crc32() interface. The pre- and post-conditioning
- (one's complement) is now done inside crc32(). WARNING: this is
- incompatible with previous versions; see zlib.h for the new usage.
-
-Changes in 0.61 (12 April 95)
-- workaround for a bug in TurboC. example and minigzip now work on MSDOS.
-
-Changes in 0.6 (11 April 95)
-- added minigzip.c
-- added gzdopen to reopen a file descriptor as gzFile
-- added transparent reading of non-gziped files in gzread.
-- fixed bug in gzread (don't read crc as data)
-- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose).
-- don't allocate big arrays in the stack (for MSDOS)
-- fix some MSDOS compilation problems
-
-Changes in 0.5:
-- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but
- not yet Z_FULL_FLUSH.
-- support decompression but only in a single step (forced Z_FINISH)
-- added opaque object for zalloc and zfree.
-- added deflateReset and inflateReset
-- added a variable zlib_version for consistency checking.
-- renamed the 'filter' parameter of deflateInit2 as 'strategy'.
- Added Z_FILTERED and Z_HUFFMAN_ONLY constants.
-
-Changes in 0.4:
-- avoid "zip" everywhere, use zlib instead of ziplib.
-- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush
- if compression method == 8.
-- added adler32 and crc32
-- renamed deflateOptions as deflateInit2, call one or the other but not both
-- added the method parameter for deflateInit2.
-- added inflateInit2
-- simplied considerably deflateInit and inflateInit by not supporting
- user-provided history buffer. This is supported only in deflateInit2
- and inflateInit2.
-
-Changes in 0.3:
-- prefix all macro names with Z_
-- use Z_FINISH instead of deflateEnd to finish compression.
-- added Z_HUFFMAN_ONLY
-- added gzerror()
diff --git a/lib/libz/Makefile b/lib/libz/Makefile
deleted file mode 100644
index 7cce380..0000000
--- a/lib/libz/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# $Id$
-#
-
-MAINTAINER=peter@FreeBSD.org
-
-LIB= z
-
-#CFLAGS+= -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS+= -g -DDEBUG
-#CFLAGS+= -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-# -Wstrict-prototypes -Wmissing-prototypes
-
-CLEANFILES+= example.o example minigzip.o minigzip
-
-SRCS = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c trees.c \
- zutil.c inflate.c infblock.c inftrees.c infcodes.c infutil.c inffast.c
-
-beforeinstall:
-.for hdr in zconf.h zlib.h
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/${hdr} \
- ${DESTDIR}/usr/include
-.endfor
-
-minigzip: all minigzip.o
- $(CC) -o minigzip minigzip.o -L. -lz
-
-example: all example.o
- $(CC) -o example example.o -L. -lz
-
-test: example minigzip
- (export LD_LIBRARY_PATH=. ; ./example )
- (export LD_LIBRARY_PATH=. ; \
- echo hello world | ./minigzip | ./minigzip -d )
-
-.include <bsd.lib.mk>
diff --git a/lib/libz/README b/lib/libz/README
deleted file mode 100644
index 28adc90..0000000
--- a/lib/libz/README
+++ /dev/null
@@ -1,99 +0,0 @@
-zlib 1.0.4 is a general purpose data compression library. All the code
-is reentrant (thread safe). The data format used by the zlib library
-is described by RFCs (Request for Comments) 1950 to 1952 in the files
-ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate
-format) and rfc1952.txt (gzip format). These documents are also available in
-other formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-
-All functions of the compression library are documented in the file
-zlib.h. A usage example of the library is given in the file example.c
-which also tests that the library is working correctly. Another
-example is given in the file minigzip.c. The compression library itself
-is composed of all source files except example.c and minigzip.c.
-
-To compile all files and run the test program, follow the instructions
-given at the top of Makefile. In short "make test; make install"
-should work for most machines. For MSDOS, use one of the special
-makefiles such as Makefile.msc; for VMS, use Make_vms.com or descrip.mms.
-
-Questions about zlib should be sent to <zlib@quest.jpl.nasa.gov> or,
-if this fails, to the addresses given below in the Copyright section.
-The zlib home page is http://quest.jpl.nasa.gov/zlib/
-
-The changes made in version 1.0.4 are documented in the file ChangeLog.
-The main changes since 1.0.3 are:
-
-- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF
- bit, so the decompressor could decompress all the correct data but went
- on to attempt decompressing extra garbage data. This affected minigzip too.
-- zlibVersion and gzerror return const char* (needed for DLL)
-- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno)
-
-
-A Perl interface to zlib written by Paul Marquess <pmarquess@bfsec.bt.co.uk>
-is in the CPAN (Comprehensive Perl Archive Network) sites, such as:
-ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-module/Compress/Compress-Zlib*
-
-
-Notes for some targets:
-
-- For Turbo C the small model is supported only with reduced performance to
- avoid any far allocation; it was tested with -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
-
-- For 64-bit Iris, deflate.c must be compiled without any optimization.
- With -O, one libpng test fails. The test works in 32 bit mode (with
- the -32 compiler flag). The compiler bug has been reported to SGI.
-
-- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1
- it works when compiled with cc.
-
-- zlib doesn't work on HP-UX 9.05 with one cc compiler (the one not
- accepting the -O option). It works with the other cc compiler.
-
-- To build a Windows DLL version, include in a DLL project zlib.def, zlib.rc
- and all .c files except example.c and minigzip.c; compile with -DZLIB_DLL
- For help on building a zlib DLL, contact Alessandro Iacopetti
- <iaco@email.alessandria.alpcom.it> http://lisa.unial.it/iaco ,
- or contact Brad Clarke <bclarke@cyberus.ca>.
-
-- gzdopen is not supported on RISCOS
-
-
-Acknowledgments:
-
- The deflate format used by zlib was defined by Phil Katz. The deflate
- and zlib specifications were written by Peter Deutsch. Thanks to all the
- people who reported problems and suggested various improvements in zlib;
- they are too numerous to cite here.
-
-Copyright notice:
-
- (C) 1995-1996 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly Mark Adler
- gzip@prep.ai.mit.edu madler@alumni.caltech.edu
-
-If you use the zlib library in a product, we would appreciate *not*
-receiving lengthy legal documents to sign. The sources are provided
-for free but without warranty of any kind. The library has been
-entirely written by Jean-loup Gailly and Mark Adler; it does not
-include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include
-in the file ChangeLog history information documenting your changes.
diff --git a/lib/libz/adler32.c b/lib/libz/adler32.c
deleted file mode 100644
index 7c35d51..0000000
--- a/lib/libz/adler32.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* $FreeBSD$ */
-
-#include "zlib.h"
-
-#define BASE 65521L /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i) {s1 += buf[i]; s2 += s1;}
-#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf) DO8(buf,0); DO8(buf,8);
-
-/* ========================================================================= */
-uLong adler32(adler, buf, len)
- uLong adler;
- const Bytef *buf;
- uInt len;
-{
- unsigned long s1 = adler & 0xffff;
- unsigned long s2 = (adler >> 16) & 0xffff;
- int k;
-
- if (buf == Z_NULL) return 1L;
-
- while (len > 0) {
- k = len < NMAX ? len : NMAX;
- len -= k;
- while (k >= 16) {
- DO16(buf);
- buf += 16;
- k -= 16;
- }
- if (k != 0) do {
- s1 += *buf++;
- s2 += s1;
- } while (--k);
- s1 %= BASE;
- s2 %= BASE;
- }
- return (s2 << 16) | s1;
-}
diff --git a/lib/libz/algorithm.doc b/lib/libz/algorithm.doc
deleted file mode 100644
index 01902af..0000000
--- a/lib/libz/algorithm.doc
+++ /dev/null
@@ -1,105 +0,0 @@
-1. Compression algorithm (deflate)
-
-The deflation algorithm used by zlib (also zip and gzip) is a variation of
-LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
-the input data. The second occurrence of a string is replaced by a
-pointer to the previous string, in the form of a pair (distance,
-length). Distances are limited to 32K bytes, and lengths are limited
-to 258 bytes. When a string does not occur anywhere in the previous
-32K bytes, it is emitted as a sequence of literal bytes. (In this
-description, `string' must be taken as an arbitrary sequence of bytes,
-and is not restricted to printable characters.)
-
-Literals or match lengths are compressed with one Huffman tree, and
-match distances are compressed with another tree. The trees are stored
-in a compact form at the start of each block. The blocks can have any
-size (except that the compressed data for one block must fit in
-available memory). A block is terminated when deflate() determines that
-it would be useful to start another block with fresh trees. (This is
-somewhat similar to the behavior of LZW-based _compress_.)
-
-Duplicated strings are found using a hash table. All input strings of
-length 3 are inserted in the hash table. A hash index is computed for
-the next 3 bytes. If the hash chain for this index is not empty, all
-strings in the chain are compared with the current input string, and
-the longest match is selected.
-
-The hash chains are searched starting with the most recent strings, to
-favor small distances and thus take advantage of the Huffman encoding.
-The hash chains are singly linked. There are no deletions from the
-hash chains, the algorithm simply discards matches that are too old.
-
-To avoid a worst-case situation, very long hash chains are arbitrarily
-truncated at a certain length, determined by a runtime option (level
-parameter of deflateInit). So deflate() does not always find the longest
-possible match but generally finds a match which is long enough.
-
-deflate() also defers the selection of matches with a lazy evaluation
-mechanism. After a match of length N has been found, deflate() searches for a
-longer match at the next input byte. If a longer match is found, the
-previous match is truncated to a length of one (thus producing a single
-literal byte) and the longer match is emitted afterwards. Otherwise,
-the original match is kept, and the next match search is attempted only
-N steps later.
-
-The lazy match evaluation is also subject to a runtime parameter. If
-the current match is long enough, deflate() reduces the search for a longer
-match, thus speeding up the whole process. If compression ratio is more
-important than speed, deflate() attempts a complete second search even if
-the first match is already long enough.
-
-The lazy match evaluation is not performed for the fastest compression
-modes (level parameter 1 to 3). For these fast modes, new strings
-are inserted in the hash table only when no match was found, or
-when the match is not too long. This degrades the compression ratio
-but saves time since there are both fewer insertions and fewer searches.
-
-
-2. Decompression algorithm (inflate)
-
-The real question is, given a Huffman tree, how to decode fast. The most
-important realization is that shorter codes are much more common than
-longer codes, so pay attention to decoding the short codes fast, and let
-the long codes take longer to decode.
-
-inflate() sets up a first level table that covers some number of bits of
-input less than the length of longest code. It gets that many bits from the
-stream, and looks it up in the table. The table will tell if the next
-code is that many bits or less and how many, and if it is, it will tell
-the value, else it will point to the next level table for which inflate()
-grabs more bits and tries to decode a longer code.
-
-How many bits to make the first lookup is a tradeoff between the time it
-takes to decode and the time it takes to build the table. If building the
-table took no time (and if you had infinite memory), then there would only
-be a first level table to cover all the way to the longest code. However,
-building the table ends up taking a lot longer for more bits since short
-codes are replicated many times in such a table. What inflate() does is
-simply to make the number of bits in the first table a variable, and set it
-for the maximum speed.
-
-inflate() sends new trees relatively often, so it is possibly set for a
-smaller first level table than an application that has only one tree for
-all the data. For inflate, which has 286 possible codes for the
-literal/length tree, the size of the first table is nine bits. Also the
-distance trees have 30 possible values, and the size of the first table is
-six bits. Note that for each of those cases, the table ended up one bit
-longer than the ``average'' code length, i.e. the code length of an
-approximately flat code which would be a little more than eight bits for
-286 symbols and a little less than five bits for 30 symbols. It would be
-interesting to see if optimizing the first level table for other
-applications gave values within a bit or two of the flat code size.
-
-
-Jean-loup Gailly Mark Adler
-gzip@prep.ai.mit.edu madler@alumni.caltech.edu
-
-
-References:
-
-[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data
-Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
-pp. 337-343.
-
-``DEFLATE Compressed Data Format Specification'' available in
-ftp://ds.internic.net/rfc/rfc1951.txt
diff --git a/lib/libz/compress.c b/lib/libz/compress.c
deleted file mode 100644
index 686f365..0000000
--- a/lib/libz/compress.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* $FreeBSD$ */
-
-#include "zlib.h"
-
-/* ===========================================================================
- Compresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be at least 0.1% larger than
- sourceLen plus 8 bytes. Upon exit, destLen is the actual size of the
- compressed buffer.
- This function can be used to compress a whole file at once if the
- input file is mmap'ed.
- compress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer.
-*/
-int compress (dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
-{
- z_stream stream;
- int err;
-
- stream.next_in = (Bytef*)source;
- stream.avail_in = (uInt)sourceLen;
-#ifdef MAXSEG_64K
- /* Check for source > 64K on 16-bit machine: */
- if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-#endif
- stream.next_out = dest;
- stream.avail_out = (uInt)*destLen;
- if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
- stream.zalloc = (alloc_func)0;
- stream.zfree = (free_func)0;
- stream.opaque = (voidpf)0;
-
- err = deflateInit(&stream, Z_DEFAULT_COMPRESSION);
- if (err != Z_OK) return err;
-
- err = deflate(&stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- deflateEnd(&stream);
- return err == Z_OK ? Z_BUF_ERROR : err;
- }
- *destLen = stream.total_out;
-
- err = deflateEnd(&stream);
- return err;
-}
diff --git a/lib/libz/crc32.c b/lib/libz/crc32.c
deleted file mode 100644
index 8fa0ee6..0000000
--- a/lib/libz/crc32.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* $FreeBSD$ */
-
-#include "zlib.h"
-
-#define local static
-
-#ifdef DYNAMIC_CRC_TABLE
-
-local int crc_table_empty = 1;
-local uLongf crc_table[256];
-local void make_crc_table OF((void));
-
-/*
- Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
- x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
-
- Polynomials over GF(2) are represented in binary, one bit per coefficient,
- with the lowest powers in the most significant bit. Then adding polynomials
- is just exclusive-or, and multiplying a polynomial by x is a right shift by
- one. If we call the above polynomial p, and represent a byte as the
- polynomial q, also with the lowest power in the most significant bit (so the
- byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
- where a mod b means the remainder after dividing a by b.
-
- This calculation is done using the shift-register method of multiplying and
- taking the remainder. The register is initialized to zero, and for each
- incoming bit, x^32 is added mod p to the register if the bit is a one (where
- x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
- x (which is shifting right by one and adding x^32 mod p if the bit shifted
- out is a one). We start with the highest power (least significant bit) of
- q and repeat for all eight bits of q.
-
- The table is simply the CRC of all possible eight bit values. This is all
- the information needed to generate CRC's on data a byte at a time for all
- combinations of CRC register values and incoming bytes.
-*/
-local void make_crc_table()
-{
- uLong c;
- int n, k;
- uLong poly; /* polynomial exclusive-or pattern */
- /* terms of polynomial defining this crc (except x^32): */
- static Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
-
- /* make exclusive-or pattern from polynomial (0xedb88320L) */
- poly = 0L;
- for (n = 0; n < sizeof(p)/sizeof(Byte); n++)
- poly |= 1L << (31 - p[n]);
-
- for (n = 0; n < 256; n++)
- {
- c = (uLong)n;
- for (k = 0; k < 8; k++)
- c = c & 1 ? poly ^ (c >> 1) : c >> 1;
- crc_table[n] = c;
- }
- crc_table_empty = 0;
-}
-#else
-/* ========================================================================
- * Table of CRC-32's of all single-byte values (made by make_crc_table)
- */
-local uLongf crc_table[256] = {
- 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
- 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
- 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
- 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
- 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
- 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
- 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
- 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
- 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
- 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
- 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
- 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
- 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
- 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
- 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
- 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
- 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
- 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
- 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
- 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
- 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
- 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
- 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
- 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
- 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
- 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
- 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
- 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
- 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
- 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
- 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
- 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
- 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
- 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
- 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
- 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
- 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
- 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
- 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
- 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
- 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
- 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
- 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
- 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
- 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
- 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
- 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
- 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
- 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
- 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
- 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
- 0x2d02ef8dL
-};
-#endif
-
-/* =========================================================================
- * This function can be used by asm versions of crc32()
- */
-uLongf *get_crc_table()
-{
-#ifdef DYNAMIC_CRC_TABLE
- if (crc_table_empty) make_crc_table();
-#endif
- return (uLongf *)crc_table;
-}
-
-/* ========================================================================= */
-#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
-#define DO2(buf) DO1(buf); DO1(buf);
-#define DO4(buf) DO2(buf); DO2(buf);
-#define DO8(buf) DO4(buf); DO4(buf);
-
-/* ========================================================================= */
-uLong crc32(crc, buf, len)
- uLong crc;
- const Bytef *buf;
- uInt len;
-{
- if (buf == Z_NULL) return 0L;
-#ifdef DYNAMIC_CRC_TABLE
- if (crc_table_empty)
- make_crc_table();
-#endif
- crc = crc ^ 0xffffffffL;
- while (len >= 8)
- {
- DO8(buf);
- len -= 8;
- }
- if (len) do {
- DO1(buf);
- } while (--len);
- return crc ^ 0xffffffffL;
-}
diff --git a/lib/libz/deflate.c b/lib/libz/deflate.c
deleted file mode 100644
index 81c649e..0000000
--- a/lib/libz/deflate.c
+++ /dev/null
@@ -1,1207 +0,0 @@
-/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * ALGORITHM
- *
- * The "deflation" process depends on being able to identify portions
- * of the input text which are identical to earlier input (within a
- * sliding window trailing behind the input currently being processed).
- *
- * The most straightforward technique turns out to be the fastest for
- * most input files: try all possible matches and select the longest.
- * The key feature of this algorithm is that insertions into the string
- * dictionary are very simple and thus fast, and deletions are avoided
- * completely. Insertions are performed at each input character, whereas
- * string matches are performed only when the previous match ends. So it
- * is preferable to spend more time in matches to allow very fast string
- * insertions and avoid deletions. The matching algorithm for small
- * strings is inspired from that of Rabin & Karp. A brute force approach
- * is used to find longer strings when a small match has been found.
- * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze
- * (by Leonid Broukhis).
- * A previous version of this file used a more sophisticated algorithm
- * (by Fiala and Greene) which is guaranteed to run in linear amortized
- * time, but has a larger average cost, uses more memory and is patented.
- * However the F&G algorithm may be faster for some highly redundant
- * files if the parameter max_chain_length (described below) is too large.
- *
- * ACKNOWLEDGEMENTS
- *
- * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
- * I found it in 'freeze' written by Leonid Broukhis.
- * Thanks to many people for bug reports and testing.
- *
- * REFERENCES
- *
- * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
- * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
- *
- * A description of the Rabin and Karp algorithm is given in the book
- * "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
- *
- * Fiala,E.R., and Greene,D.H.
- * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595
- *
- */
-
-/* $FreeBSD$ */
-
-#include "deflate.h"
-
-char deflate_copyright[] = " deflate 1.0.4 Copyright 1995-1996 Jean-loup Gailly ";
-/*
- If you use the zlib library in a product, an acknowledgment is welcome
- in the documentation of your product. If for some reason you cannot
- include such an acknowledgment, I would appreciate that you keep this
- copyright string in the executable of your product.
- */
-
-/* ===========================================================================
- * Function prototypes.
- */
-typedef enum {
- need_more, /* block not completed, need more input or more output */
- block_done, /* block flush performed */
- finish_started, /* finish started, need only more output at next deflate */
- finish_done /* finish done, accept no more input or output */
-} block_state;
-
-typedef block_state (*compress_func) OF((deflate_state *s, int flush));
-/* Compression function. Returns the block state after the call. */
-
-local void fill_window OF((deflate_state *s));
-local block_state deflate_stored OF((deflate_state *s, int flush));
-local block_state deflate_fast OF((deflate_state *s, int flush));
-local block_state deflate_slow OF((deflate_state *s, int flush));
-local void lm_init OF((deflate_state *s));
-local uInt longest_match OF((deflate_state *s, IPos cur_match));
-local void putShortMSB OF((deflate_state *s, uInt b));
-local void flush_pending OF((z_streamp strm));
-local int read_buf OF((z_streamp strm, charf *buf, unsigned size));
-#ifdef ASMV
- void match_init OF((void)); /* asm code initialization */
-#endif
-
-#ifdef DEBUG
-local void check_match OF((deflate_state *s, IPos start, IPos match,
- int length));
-#endif
-
-/* ===========================================================================
- * Local data
- */
-
-#define NIL 0
-/* Tail of hash chains */
-
-#ifndef TOO_FAR
-# define TOO_FAR 4096
-#endif
-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-/* Values for max_lazy_match, good_match and max_chain_length, depending on
- * the desired pack level (0..9). The values given below have been tuned to
- * exclude worst case performance for pathological files. Better values may be
- * found for specific files.
- */
-typedef struct config_s {
- ush good_length; /* reduce lazy search above this match length */
- ush max_lazy; /* do not perform lazy search above this match length */
- ush nice_length; /* quit search above this match length */
- ush max_chain;
- compress_func func;
-} config;
-
-local config configuration_table[10] = {
-/* good lazy nice chain */
-/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */
-/* 1 */ {4, 4, 8, 4, deflate_fast}, /* maximum speed, no lazy matches */
-/* 2 */ {4, 5, 16, 8, deflate_fast},
-/* 3 */ {4, 6, 32, 32, deflate_fast},
-
-/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */
-/* 5 */ {8, 16, 32, 32, deflate_slow},
-/* 6 */ {8, 16, 128, 128, deflate_slow},
-/* 7 */ {8, 32, 128, 256, deflate_slow},
-/* 8 */ {32, 128, 258, 1024, deflate_slow},
-/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* maximum compression */
-
-/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
- * For deflate_fast() (levels <= 3) good is ignored and lazy has a different
- * meaning.
- */
-
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
-
-/* ===========================================================================
- * Update a hash value with the given input byte
- * IN assertion: all calls to to UPDATE_HASH are made with consecutive
- * input characters, so that a running hash key can be computed from the
- * previous key instead of complete recalculation each time.
- */
-#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
-
-
-/* ===========================================================================
- * Insert string str in the dictionary and set match_head to the previous head
- * of the hash chain (the most recent string with same hash key). Return
- * the previous length of the hash chain.
- * IN assertion: all calls to to INSERT_STRING are made with consecutive
- * input characters and the first MIN_MATCH bytes of str are valid
- * (except for the last MIN_MATCH-1 bytes of the input file).
- */
-#define INSERT_STRING(s, str, match_head) \
- (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
- s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \
- s->head[s->ins_h] = (Pos)(str))
-
-/* ===========================================================================
- * Initialize the hash table (avoiding 64K overflow for 16 bit systems).
- * prev[] will be initialized on the fly.
- */
-#define CLEAR_HASH(s) \
- s->head[s->hash_size-1] = NIL; \
- zmemzero((charf *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
-
-/* ========================================================================= */
-int deflateInit_(strm, level, version, stream_size)
- z_streamp strm;
- int level;
- const char *version;
- int stream_size;
-{
- return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
- Z_DEFAULT_STRATEGY, version, stream_size);
- /* To do: ignore strm->next_in if we use it as window */
-}
-
-/* ========================================================================= */
-int deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
- version, stream_size)
- z_streamp strm;
- int level;
- int method;
- int windowBits;
- int memLevel;
- int strategy;
- const char *version;
- int stream_size;
-{
- deflate_state *s;
- int noheader = 0;
-
- ushf *overlay;
- /* We overlay pending_buf and d_buf+l_buf. This works since the average
- * output size for (length,distance) codes is <= 24 bits.
- */
-
- if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
- stream_size != sizeof(z_stream)) {
- return Z_VERSION_ERROR;
- }
- if (strm == Z_NULL) return Z_STREAM_ERROR;
-
- strm->msg = Z_NULL;
- if (strm->zalloc == Z_NULL) {
- strm->zalloc = zcalloc;
- strm->opaque = (voidpf)0;
- }
- if (strm->zfree == Z_NULL) strm->zfree = zcfree;
-
- if (level == Z_DEFAULT_COMPRESSION) level = 6;
-
- if (windowBits < 0) { /* undocumented feature: suppress zlib header */
- noheader = 1;
- windowBits = -windowBits;
- }
- if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
- windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
- strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
- return Z_STREAM_ERROR;
- }
- s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
- if (s == Z_NULL) return Z_MEM_ERROR;
- strm->state = (struct internal_state FAR *)s;
- s->strm = strm;
-
- s->noheader = noheader;
- s->w_bits = windowBits;
- s->w_size = 1 << s->w_bits;
- s->w_mask = s->w_size - 1;
-
- s->hash_bits = memLevel + 7;
- s->hash_size = 1 << s->hash_bits;
- s->hash_mask = s->hash_size - 1;
- s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
-
- s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
- s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));
- s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos));
-
- s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
-
- overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
- s->pending_buf = (uchf *) overlay;
-
- if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
- s->pending_buf == Z_NULL) {
- strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
- deflateEnd (strm);
- return Z_MEM_ERROR;
- }
- s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
- s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
-
- s->level = level;
- s->strategy = strategy;
- s->method = (Byte)method;
-
- return deflateReset(strm);
-}
-
-/* ========================================================================= */
-int deflateSetDictionary (strm, dictionary, dictLength)
- z_streamp strm;
- const Bytef *dictionary;
- uInt dictLength;
-{
- deflate_state *s;
- uInt length = dictLength;
- uInt n;
- IPos hash_head = 0;
-
- if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
- strm->state->status != INIT_STATE) return Z_STREAM_ERROR;
-
- s = strm->state;
- strm->adler = adler32(strm->adler, dictionary, dictLength);
-
- if (length < MIN_MATCH) return Z_OK;
- if (length > MAX_DIST(s)) {
- length = MAX_DIST(s);
- dictionary += dictLength - length;
- }
- zmemcpy((charf *)s->window, dictionary, length);
- s->strstart = length;
- s->block_start = (long)length;
-
- /* Insert all strings in the hash table (except for the last two bytes).
- * s->lookahead stays null, so s->ins_h will be recomputed at the next
- * call of fill_window.
- */
- s->ins_h = s->window[0];
- UPDATE_HASH(s, s->ins_h, s->window[1]);
- for (n = 0; n <= length - MIN_MATCH; n++) {
- INSERT_STRING(s, n, hash_head);
- }
- if (hash_head) hash_head = 0; /* to make compiler happy */
- return Z_OK;
-}
-
-/* ========================================================================= */
-int deflateReset (strm)
- z_streamp strm;
-{
- deflate_state *s;
-
- if (strm == Z_NULL || strm->state == Z_NULL ||
- strm->zalloc == Z_NULL || strm->zfree == Z_NULL) return Z_STREAM_ERROR;
-
- strm->total_in = strm->total_out = 0;
- strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
- strm->data_type = Z_UNKNOWN;
-
- s = (deflate_state *)strm->state;
- s->pending = 0;
- s->pending_out = s->pending_buf;
-
- if (s->noheader < 0) {
- s->noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */
- }
- s->status = s->noheader ? BUSY_STATE : INIT_STATE;
- strm->adler = 1;
- s->last_flush = Z_NO_FLUSH;
-
- _tr_init(s);
- lm_init(s);
-
- return Z_OK;
-}
-
-/* ========================================================================= */
-int deflateParams(strm, level, strategy)
- z_streamp strm;
- int level;
- int strategy;
-{
- deflate_state *s;
- compress_func func;
- int err = Z_OK;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- s = strm->state;
-
- if (level == Z_DEFAULT_COMPRESSION) {
- level = 6;
- }
- if (level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
- return Z_STREAM_ERROR;
- }
- func = configuration_table[s->level].func;
-
- if (func != configuration_table[level].func && strm->total_in != 0) {
- /* Flush the last buffer: */
- err = deflate(strm, Z_PARTIAL_FLUSH);
- }
- if (s->level != level) {
- s->level = level;
- s->max_lazy_match = configuration_table[level].max_lazy;
- s->good_match = configuration_table[level].good_length;
- s->nice_match = configuration_table[level].nice_length;
- s->max_chain_length = configuration_table[level].max_chain;
- }
- s->strategy = strategy;
- return err;
-}
-
-/* =========================================================================
- * Put a short in the pending buffer. The 16-bit value is put in MSB order.
- * IN assertion: the stream state is correct and there is enough room in
- * pending_buf.
- */
-local void putShortMSB (s, b)
- deflate_state *s;
- uInt b;
-{
- put_byte(s, (Byte)(b >> 8));
- put_byte(s, (Byte)(b & 0xff));
-}
-
-/* =========================================================================
- * Flush as much pending output as possible. All deflate() output goes
- * through this function so some applications may wish to modify it
- * to avoid allocating a large strm->next_out buffer and copying into it.
- * (See also read_buf()).
- */
-local void flush_pending(strm)
- z_streamp strm;
-{
- unsigned len = strm->state->pending;
-
- if (len > strm->avail_out) len = strm->avail_out;
- if (len == 0) return;
-
- zmemcpy(strm->next_out, strm->state->pending_out, len);
- strm->next_out += len;
- strm->state->pending_out += len;
- strm->total_out += len;
- strm->avail_out -= len;
- strm->state->pending -= len;
- if (strm->state->pending == 0) {
- strm->state->pending_out = strm->state->pending_buf;
- }
-}
-
-/* ========================================================================= */
-int deflate (strm, flush)
- z_streamp strm;
- int flush;
-{
- int old_flush; /* value of flush param for previous deflate call */
- deflate_state *s;
-
- if (strm == Z_NULL || strm->state == Z_NULL ||
- flush > Z_FINISH || flush < 0) {
- return Z_STREAM_ERROR;
- }
- s = strm->state;
-
- if (strm->next_out == Z_NULL ||
- (strm->next_in == Z_NULL && strm->avail_in != 0) ||
- (s->status == FINISH_STATE && flush != Z_FINISH)) {
- ERR_RETURN(strm, Z_STREAM_ERROR);
- }
- if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
-
- s->strm = strm; /* just in case */
- old_flush = s->last_flush;
- s->last_flush = flush;
-
- /* Write the zlib header */
- if (s->status == INIT_STATE) {
-
- uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
- uInt level_flags = (s->level-1) >> 1;
-
- if (level_flags > 3) level_flags = 3;
- header |= (level_flags << 6);
- if (s->strstart != 0) header |= PRESET_DICT;
- header += 31 - (header % 31);
-
- s->status = BUSY_STATE;
- putShortMSB(s, header);
-
- /* Save the adler32 of the preset dictionary: */
- if (s->strstart != 0) {
- putShortMSB(s, (uInt)(strm->adler >> 16));
- putShortMSB(s, (uInt)(strm->adler & 0xffff));
- }
- strm->adler = 1L;
- }
-
- /* Flush as much pending output as possible */
- if (s->pending != 0) {
- flush_pending(strm);
- if (strm->avail_out == 0) {
- /* Since avail_out is 0, deflate will be called again with
- * more output space, but possibly with both pending and
- * avail_in equal to zero. There won't be anything to do,
- * but this is not an error situation so make sure we
- * return OK instead of BUF_ERROR at next call of deflate:
- */
- s->last_flush = -1;
- return Z_OK;
- }
-
- /* Make sure there is something to do and avoid duplicate consecutive
- * flushes. For repeated and useless calls with Z_FINISH, we keep
- * returning Z_STREAM_END instead of Z_BUFF_ERROR.
- */
- } else if (strm->avail_in == 0 && flush <= old_flush &&
- flush != Z_FINISH) {
- ERR_RETURN(strm, Z_BUF_ERROR);
- }
-
- /* User must not provide more input after the first FINISH: */
- if (s->status == FINISH_STATE && strm->avail_in != 0) {
- ERR_RETURN(strm, Z_BUF_ERROR);
- }
-
- /* Start a new block or continue the current one.
- */
- if (strm->avail_in != 0 || s->lookahead != 0 ||
- (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
- block_state bstate;
-
- bstate = (*(configuration_table[s->level].func))(s, flush);
-
- if (bstate == finish_started || bstate == finish_done) {
- s->status = FINISH_STATE;
- }
- if (bstate == need_more || bstate == finish_started) {
- if (strm->avail_out == 0) {
- s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
- }
- return Z_OK;
- /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
- * of deflate should use the same flush parameter to make sure
- * that the flush is complete. So we don't have to output an
- * empty block here, this will be done at next call. This also
- * ensures that for a very small output buffer, we emit at most
- * one empty block.
- */
- }
- if (bstate == block_done) {
- if (flush == Z_PARTIAL_FLUSH) {
- _tr_align(s);
- } else { /* FULL_FLUSH or SYNC_FLUSH */
- _tr_stored_block(s, (char*)0, 0L, 0);
- /* For a full flush, this empty block will be recognized
- * as a special marker by inflate_sync().
- */
- if (flush == Z_FULL_FLUSH) {
- CLEAR_HASH(s); /* forget history */
- }
- }
- flush_pending(strm);
- if (strm->avail_out == 0) {
- s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
- return Z_OK;
- }
- }
- }
- Assert(strm->avail_out > 0, "bug2");
-
- if (flush != Z_FINISH) return Z_OK;
- if (s->noheader) return Z_STREAM_END;
-
- /* Write the zlib trailer (adler32) */
- putShortMSB(s, (uInt)(strm->adler >> 16));
- putShortMSB(s, (uInt)(strm->adler & 0xffff));
- flush_pending(strm);
- /* If avail_out is zero, the application will call deflate again
- * to flush the rest.
- */
- s->noheader = -1; /* write the trailer only once! */
- return s->pending != 0 ? Z_OK : Z_STREAM_END;
-}
-
-/* ========================================================================= */
-int deflateEnd (strm)
- z_streamp strm;
-{
- int status;
-
- if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-
- /* Deallocate in reverse order of allocations: */
- TRY_FREE(strm, strm->state->pending_buf);
- TRY_FREE(strm, strm->state->head);
- TRY_FREE(strm, strm->state->prev);
- TRY_FREE(strm, strm->state->window);
-
- status = strm->state->status;
- ZFREE(strm, strm->state);
- strm->state = Z_NULL;
-
- return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
-}
-
-/* ========================================================================= */
-int deflateCopy (dest, source)
- z_streamp dest;
- z_streamp source;
-{
- if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
- return Z_STREAM_ERROR;
- }
- *dest = *source;
- return Z_STREAM_ERROR; /* to be implemented */
-#if 0
- dest->state = (struct internal_state FAR *)
- (*dest->zalloc)(1, sizeof(deflate_state));
- if (dest->state == Z_NULL) return Z_MEM_ERROR;
-
- *(dest->state) = *(source->state);
- return Z_OK;
-#endif
-}
-
-/* ===========================================================================
- * Read a new buffer from the current input stream, update the adler32
- * and total number of bytes read. All deflate() input goes through
- * this function so some applications may wish to modify it to avoid
- * allocating a large strm->next_in buffer and copying from it.
- * (See also flush_pending()).
- */
-local int read_buf(strm, buf, size)
- z_streamp strm;
- charf *buf;
- unsigned size;
-{
- unsigned len = strm->avail_in;
-
- if (len > size) len = size;
- if (len == 0) return 0;
-
- strm->avail_in -= len;
-
- if (!strm->state->noheader) {
- strm->adler = adler32(strm->adler, strm->next_in, len);
- }
- zmemcpy(buf, strm->next_in, len);
- strm->next_in += len;
- strm->total_in += len;
-
- return (int)len;
-}
-
-/* ===========================================================================
- * Initialize the "longest match" routines for a new zlib stream
- */
-local void lm_init (s)
- deflate_state *s;
-{
- s->window_size = (ulg)2L*s->w_size;
-
- CLEAR_HASH(s);
-
- /* Set the default configuration parameters:
- */
- s->max_lazy_match = configuration_table[s->level].max_lazy;
- s->good_match = configuration_table[s->level].good_length;
- s->nice_match = configuration_table[s->level].nice_length;
- s->max_chain_length = configuration_table[s->level].max_chain;
-
- s->strstart = 0;
- s->block_start = 0L;
- s->lookahead = 0;
- s->match_length = s->prev_length = MIN_MATCH-1;
- s->match_available = 0;
- s->ins_h = 0;
-#ifdef ASMV
- match_init(); /* initialize the asm code */
-#endif
-}
-
-/* ===========================================================================
- * Set match_start to the longest match starting at the given string and
- * return its length. Matches shorter or equal to prev_length are discarded,
- * in which case the result is equal to prev_length and match_start is
- * garbage.
- * IN assertions: cur_match is the head of the hash chain for the current
- * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
- * OUT assertion: the match length is not greater than s->lookahead.
- */
-#ifndef ASMV
-/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
- * match.S. The code will be functionally equivalent.
- */
-local uInt longest_match(s, cur_match)
- deflate_state *s;
- IPos cur_match; /* current match */
-{
- unsigned chain_length = s->max_chain_length;/* max hash chain length */
- register Bytef *scan = s->window + s->strstart; /* current string */
- register Bytef *match; /* matched string */
- register int len; /* length of current match */
- int best_len = s->prev_length; /* best match length so far */
- int nice_match = s->nice_match; /* stop if match long enough */
- IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
- s->strstart - (IPos)MAX_DIST(s) : NIL;
- /* Stop when cur_match becomes <= limit. To simplify the code,
- * we prevent matches with the string of window index 0.
- */
- Posf *prev = s->prev;
- uInt wmask = s->w_mask;
-
-#ifdef UNALIGNED_OK
- /* Compare two bytes at a time. Note: this is not always beneficial.
- * Try with and without -DUNALIGNED_OK to check.
- */
- register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
- register ush scan_start = *(ushf*)scan;
- register ush scan_end = *(ushf*)(scan+best_len-1);
-#else
- register Bytef *strend = s->window + s->strstart + MAX_MATCH;
- register Byte scan_end1 = scan[best_len-1];
- register Byte scan_end = scan[best_len];
-#endif
-
- /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
- * It is easy to get rid of this optimization if necessary.
- */
- Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
- /* Do not waste too much time if we already have a good match: */
- if (s->prev_length >= s->good_match) {
- chain_length >>= 2;
- }
- /* Do not look for matches beyond the end of the input. This is necessary
- * to make deflate deterministic.
- */
- if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
- Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
- do {
- Assert(cur_match < s->strstart, "no future");
- match = s->window + cur_match;
-
- /* Skip to next match if the match length cannot increase
- * or if the match length is less than 2:
- */
-#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
- /* This code assumes sizeof(unsigned short) == 2. Do not use
- * UNALIGNED_OK if your compiler uses a different size.
- */
- if (*(ushf*)(match+best_len-1) != scan_end ||
- *(ushf*)match != scan_start) continue;
-
- /* It is not necessary to compare scan[2] and match[2] since they are
- * always equal when the other bytes match, given that the hash keys
- * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
- * strstart+3, +5, ... up to strstart+257. We check for insufficient
- * lookahead only every 4th comparison; the 128th check will be made
- * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
- * necessary to put more guard bytes at the end of the window, or
- * to check more often for insufficient lookahead.
- */
- Assert(scan[2] == match[2], "scan[2]?");
- scan++, match++;
- do {
- } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
- scan < strend);
- /* The funny "do {}" generates better code on most compilers */
-
- /* Here, scan <= window+strstart+257 */
- Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
- if (*scan == *match) scan++;
-
- len = (MAX_MATCH - 1) - (int)(strend-scan);
- scan = strend - (MAX_MATCH-1);
-
-#else /* UNALIGNED_OK */
-
- if (match[best_len] != scan_end ||
- match[best_len-1] != scan_end1 ||
- *match != *scan ||
- *++match != scan[1]) continue;
-
- /* The check at best_len-1 can be removed because it will be made
- * again later. (This heuristic is not always a win.)
- * It is not necessary to compare scan[2] and match[2] since they
- * are always equal when the other bytes match, given that
- * the hash keys are equal and that HASH_BITS >= 8.
- */
- scan += 2, match++;
- Assert(*scan == *match, "match[2]?");
-
- /* We check for insufficient lookahead only every 8th comparison;
- * the 256th check will be made at strstart+258.
- */
- do {
- } while (*++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- *++scan == *++match && *++scan == *++match &&
- scan < strend);
-
- Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
- len = MAX_MATCH - (int)(strend - scan);
- scan = strend - MAX_MATCH;
-
-#endif /* UNALIGNED_OK */
-
- if (len > best_len) {
- s->match_start = cur_match;
- best_len = len;
- if (len >= nice_match) break;
-#ifdef UNALIGNED_OK
- scan_end = *(ushf*)(scan+best_len-1);
-#else
- scan_end1 = scan[best_len-1];
- scan_end = scan[best_len];
-#endif
- }
- } while ((cur_match = prev[cur_match & wmask]) > limit
- && --chain_length != 0);
-
- if ((uInt)best_len <= s->lookahead) return best_len;
- return s->lookahead;
-}
-#endif /* ASMV */
-
-#ifdef DEBUG
-/* ===========================================================================
- * Check that the match at match_start is indeed a match.
- */
-local void check_match(s, start, match, length)
- deflate_state *s;
- IPos start, match;
- int length;
-{
- /* check that the match is indeed a match */
- if (zmemcmp((charf *)s->window + match,
- (charf *)s->window + start, length) != EQUAL) {
- fprintf(stderr, " start %u, match %u, length %d\n",
- start, match, length);
- do {
- fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
- } while (--length != 0);
- z_error("invalid match");
- }
- if (verbose > 1) {
- fprintf(stderr,"\\[%d,%d]", start-match, length);
- do { putc(s->window[start++], stderr); } while (--length != 0);
- }
-}
-#else
-# define check_match(s, start, match, length)
-#endif
-
-/* ===========================================================================
- * Fill the window when the lookahead becomes insufficient.
- * Updates strstart and lookahead.
- *
- * IN assertion: lookahead < MIN_LOOKAHEAD
- * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
- * At least one byte has been read, or avail_in == 0; reads are
- * performed for at least two bytes (required for the zip translate_eol
- * option -- not supported here).
- */
-local void fill_window(s)
- deflate_state *s;
-{
- register unsigned n, m;
- register Posf *p;
- unsigned more; /* Amount of free space at the end of the window. */
- uInt wsize = s->w_size;
-
- do {
- more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
-
- /* Deal with !@#$% 64K limit: */
- if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
- more = wsize;
-
- } else if (more == (unsigned)(-1)) {
- /* Very unlikely, but possible on 16 bit machine if strstart == 0
- * and lookahead == 1 (input done one byte at time)
- */
- more--;
-
- /* If the window is almost full and there is insufficient lookahead,
- * move the upper half to the lower one to make room in the upper half.
- */
- } else if (s->strstart >= wsize+MAX_DIST(s)) {
-
- zmemcpy((charf *)s->window, (charf *)s->window+wsize,
- (unsigned)wsize);
- s->match_start -= wsize;
- s->strstart -= wsize; /* we now have strstart >= MAX_DIST */
-
- s->block_start -= (long) wsize;
-
- /* Slide the hash table (could be avoided with 32 bit values
- at the expense of memory usage):
- */
- n = s->hash_size;
- p = &s->head[n];
- do {
- m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
- } while (--n);
-
- n = wsize;
- p = &s->prev[n];
- do {
- m = *--p;
- *p = (Pos)(m >= wsize ? m-wsize : NIL);
- /* If n is not on any hash chain, prev[n] is garbage but
- * its value will never be used.
- */
- } while (--n);
-
- more += wsize;
- }
- if (s->strm->avail_in == 0) return;
-
- /* If there was no sliding:
- * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
- * more == window_size - lookahead - strstart
- * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
- * => more >= window_size - 2*WSIZE + 2
- * In the BIG_MEM or MMAP case (not yet supported),
- * window_size == input_size + MIN_LOOKAHEAD &&
- * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
- * Otherwise, window_size == 2*WSIZE so more >= 2.
- * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
- */
- Assert(more >= 2, "more < 2");
-
- n = read_buf(s->strm, (charf *)s->window + s->strstart + s->lookahead,
- more);
- s->lookahead += n;
-
- /* Initialize the hash value now that we have some input: */
- if (s->lookahead >= MIN_MATCH) {
- s->ins_h = s->window[s->strstart];
- UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
- Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
- }
- /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
- * but this is not important since only literal bytes will be emitted.
- */
-
- } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
-}
-
-/* ===========================================================================
- * Flush the current block, with given end-of-file flag.
- * IN assertion: strstart is set to the end of the current match.
- */
-#define FLUSH_BLOCK_ONLY(s, eof) { \
- _tr_flush_block(s, (s->block_start >= 0L ? \
- (charf *)&s->window[(unsigned)s->block_start] : \
- (charf *)Z_NULL), \
- (ulg)((long)s->strstart - s->block_start), \
- (eof)); \
- s->block_start = s->strstart; \
- flush_pending(s->strm); \
- Tracev((stderr,"[FLUSH]")); \
-}
-
-/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
- FLUSH_BLOCK_ONLY(s, eof); \
- if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
-}
-
-/* ===========================================================================
- * Copy without compression as much as possible from the input stream, return
- * the current block state.
- * This function does not insert new strings in the dictionary since
- * uncompressible data is probably not useful. This function is used
- * only for the level=0 compression option.
- * NOTE: this function should be optimized to avoid extra copying.
- */
-local block_state deflate_stored(s, flush)
- deflate_state *s;
- int flush;
-{
- for (;;) {
- /* Fill the window as much as possible: */
- if (s->lookahead <= 1) {
-
- Assert(s->strstart < s->w_size+MAX_DIST(s) ||
- s->block_start >= (long)s->w_size, "slide too late");
-
- fill_window(s);
- if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
-
- if (s->lookahead == 0) break; /* flush the current block */
- }
- Assert(s->block_start >= 0L, "block gone");
-
- s->strstart += s->lookahead;
- s->lookahead = 0;
-
- /* Stored blocks are limited to 0xffff bytes: */
- if (s->strstart == 0 || s->strstart > 0xfffe) {
- /* strstart == 0 is possible when wraparound on 16-bit machine */
- s->lookahead = s->strstart - 0xffff;
- s->strstart = 0xffff;
- }
-
- /* Emit a stored block if it is large enough: */
- if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
- FLUSH_BLOCK(s, 0);
- }
- }
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
-}
-
-/* ===========================================================================
- * Compress as much as possible from the input stream, return the current
- * block state.
- * This function does not perform lazy evaluation of matches and inserts
- * new strings in the dictionary only for unmatched strings or for short
- * matches. It is used only for the fast compression options.
- */
-local block_state deflate_fast(s, flush)
- deflate_state *s;
- int flush;
-{
- IPos hash_head = NIL; /* head of the hash chain */
- int bflush; /* set if current block must be flushed */
-
- for (;;) {
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the next match, plus MIN_MATCH bytes to insert the
- * string following the next match.
- */
- if (s->lookahead < MIN_LOOKAHEAD) {
- fill_window(s);
- if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
- return need_more;
- }
- if (s->lookahead == 0) break; /* flush the current block */
- }
-
- /* Insert the string window[strstart .. strstart+2] in the
- * dictionary, and set hash_head to the head of the hash chain:
- */
- if (s->lookahead >= MIN_MATCH) {
- INSERT_STRING(s, s->strstart, hash_head);
- }
-
- /* Find the longest match, discarding those <= prev_length.
- * At this point we have always match_length < MIN_MATCH
- */
- if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
- /* To simplify the code, we prevent matches with the string
- * of window index 0 (in particular we have to avoid a match
- * of the string with itself at the start of the input file).
- */
- if (s->strategy != Z_HUFFMAN_ONLY) {
- s->match_length = longest_match (s, hash_head);
- }
- /* longest_match() sets match_start */
- }
- if (s->match_length >= MIN_MATCH) {
- check_match(s, s->strstart, s->match_start, s->match_length);
-
- bflush = _tr_tally(s, s->strstart - s->match_start,
- s->match_length - MIN_MATCH);
-
- s->lookahead -= s->match_length;
-
- /* Insert new strings in the hash table only if the match length
- * is not too large. This saves time but degrades compression.
- */
- if (s->match_length <= s->max_insert_length &&
- s->lookahead >= MIN_MATCH) {
- s->match_length--; /* string at strstart already in hash table */
- do {
- s->strstart++;
- INSERT_STRING(s, s->strstart, hash_head);
- /* strstart never exceeds WSIZE-MAX_MATCH, so there are
- * always MIN_MATCH bytes ahead.
- */
- } while (--s->match_length != 0);
- s->strstart++;
- } else {
- s->strstart += s->match_length;
- s->match_length = 0;
- s->ins_h = s->window[s->strstart];
- UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
- Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
- /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
- * matter since it will be recomputed at next deflate call.
- */
- }
- } else {
- /* No match, output a literal byte */
- Tracevv((stderr,"%c", s->window[s->strstart]));
- bflush = _tr_tally (s, 0, s->window[s->strstart]);
- s->lookahead--;
- s->strstart++;
- }
- if (bflush) FLUSH_BLOCK(s, 0);
- }
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
-}
-
-/* ===========================================================================
- * Same as above, but achieves better compression. We use a lazy
- * evaluation for matches: a match is finally adopted only if there is
- * no better match at the next window position.
- */
-local block_state deflate_slow(s, flush)
- deflate_state *s;
- int flush;
-{
- IPos hash_head = NIL; /* head of hash chain */
- int bflush; /* set if current block must be flushed */
-
- /* Process the input block. */
- for (;;) {
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the next match, plus MIN_MATCH bytes to insert the
- * string following the next match.
- */
- if (s->lookahead < MIN_LOOKAHEAD) {
- fill_window(s);
- if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
- return need_more;
- }
- if (s->lookahead == 0) break; /* flush the current block */
- }
-
- /* Insert the string window[strstart .. strstart+2] in the
- * dictionary, and set hash_head to the head of the hash chain:
- */
- if (s->lookahead >= MIN_MATCH) {
- INSERT_STRING(s, s->strstart, hash_head);
- }
-
- /* Find the longest match, discarding those <= prev_length.
- */
- s->prev_length = s->match_length, s->prev_match = s->match_start;
- s->match_length = MIN_MATCH-1;
-
- if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
- s->strstart - hash_head <= MAX_DIST(s)) {
- /* To simplify the code, we prevent matches with the string
- * of window index 0 (in particular we have to avoid a match
- * of the string with itself at the start of the input file).
- */
- if (s->strategy != Z_HUFFMAN_ONLY) {
- s->match_length = longest_match (s, hash_head);
- }
- /* longest_match() sets match_start */
-
- if (s->match_length <= 5 && (s->strategy == Z_FILTERED ||
- (s->match_length == MIN_MATCH &&
- s->strstart - s->match_start > TOO_FAR))) {
-
- /* If prev_match is also MIN_MATCH, match_start is garbage
- * but we will ignore the current match anyway.
- */
- s->match_length = MIN_MATCH-1;
- }
- }
- /* If there was a match at the previous step and the current
- * match is not better, output the previous match:
- */
- if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
- uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
- /* Do not insert strings in hash table beyond this. */
-
- check_match(s, s->strstart-1, s->prev_match, s->prev_length);
-
- bflush = _tr_tally(s, s->strstart -1 - s->prev_match,
- s->prev_length - MIN_MATCH);
-
- /* Insert in hash table all strings up to the end of the match.
- * strstart-1 and strstart are already inserted. If there is not
- * enough lookahead, the last two strings are not inserted in
- * the hash table.
- */
- s->lookahead -= s->prev_length-1;
- s->prev_length -= 2;
- do {
- if (++s->strstart <= max_insert) {
- INSERT_STRING(s, s->strstart, hash_head);
- }
- } while (--s->prev_length != 0);
- s->match_available = 0;
- s->match_length = MIN_MATCH-1;
- s->strstart++;
-
- if (bflush) FLUSH_BLOCK(s, 0);
-
- } else if (s->match_available) {
- /* If there was no match at the previous position, output a
- * single literal. If there was a match but the current match
- * is longer, truncate the previous match to a single literal.
- */
- Tracevv((stderr,"%c", s->window[s->strstart-1]));
- if (_tr_tally (s, 0, s->window[s->strstart-1])) {
- FLUSH_BLOCK_ONLY(s, 0);
- }
- s->strstart++;
- s->lookahead--;
- if (s->strm->avail_out == 0) return need_more;
- } else {
- /* There is no previous match to compare with, wait for
- * the next step to decide.
- */
- s->match_available = 1;
- s->strstart++;
- s->lookahead--;
- }
- }
- Assert (flush != Z_NO_FLUSH, "no flush?");
- if (s->match_available) {
- Tracevv((stderr,"%c", s->window[s->strstart-1]));
- _tr_tally (s, 0, s->window[s->strstart-1]);
- s->match_available = 0;
- }
- FLUSH_BLOCK(s, flush == Z_FINISH);
- return flush == Z_FINISH ? finish_done : block_done;
-}
diff --git a/lib/libz/deflate.h b/lib/libz/deflate.h
deleted file mode 100644
index 689adea..0000000
--- a/lib/libz/deflate.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/* deflate.h -- internal compression state
- * Copyright (C) 1995-1996 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* $FreeBSD$ */
-
-#ifndef _DEFLATE_H
-#define _DEFLATE_H
-
-#include "zutil.h"
-
-/* ===========================================================================
- * Internal compression state.
- */
-
-#define LENGTH_CODES 29
-/* number of length codes, not counting the special END_BLOCK code */
-
-#define LITERALS 256
-/* number of literal bytes 0..255 */
-
-#define L_CODES (LITERALS+1+LENGTH_CODES)
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-#define D_CODES 30
-/* number of distance codes */
-
-#define BL_CODES 19
-/* number of codes used to transfer the bit lengths */
-
-#define HEAP_SIZE (2*L_CODES+1)
-/* maximum heap size */
-
-#define MAX_BITS 15
-/* All codes must not exceed MAX_BITS bits */
-
-#define INIT_STATE 42
-#define BUSY_STATE 113
-#define FINISH_STATE 666
-/* Stream status */
-
-
-/* Data structure describing a single value and its code string. */
-typedef struct ct_data_s {
- union {
- ush freq; /* frequency count */
- ush code; /* bit string */
- } fc;
- union {
- ush dad; /* father node in Huffman tree */
- ush len; /* length of bit string */
- } dl;
-} FAR ct_data;
-
-#define Freq fc.freq
-#define Code fc.code
-#define Dad dl.dad
-#define Len dl.len
-
-typedef struct static_tree_desc_s static_tree_desc;
-
-typedef struct tree_desc_s {
- ct_data *dyn_tree; /* the dynamic tree */
- int max_code; /* largest code with non zero frequency */
- static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
-
-typedef ush Pos;
-typedef Pos FAR Posf;
-typedef unsigned IPos;
-
-/* A Pos is an index in the character window. We use short instead of int to
- * save space in the various tables. IPos is used only for parameter passing.
- */
-
-typedef struct internal_state {
- z_streamp strm; /* pointer back to this zlib stream */
- int status; /* as the name implies */
- Bytef *pending_buf; /* output still pending */
- Bytef *pending_out; /* next pending byte to output to the stream */
- int pending; /* nb of bytes in the pending buffer */
- int noheader; /* suppress zlib header and adler32 */
- Byte data_type; /* UNKNOWN, BINARY or ASCII */
- Byte method; /* STORED (for zip only) or DEFLATED */
- int last_flush; /* value of flush param for previous deflate call */
-
- /* used by deflate.c: */
-
- uInt w_size; /* LZ77 window size (32K by default) */
- uInt w_bits; /* log2(w_size) (8..16) */
- uInt w_mask; /* w_size - 1 */
-
- Bytef *window;
- /* Sliding window. Input bytes are read into the second half of the window,
- * and move to the first half later to keep a dictionary of at least wSize
- * bytes. With this organization, matches are limited to a distance of
- * wSize-MAX_MATCH bytes, but this ensures that IO is always
- * performed with a length multiple of the block size. Also, it limits
- * the window size to 64K, which is quite useful on MSDOS.
- * To do: use the user input buffer as sliding window.
- */
-
- ulg window_size;
- /* Actual size of window: 2*wSize, except when the user input buffer
- * is directly used as sliding window.
- */
-
- Posf *prev;
- /* Link to older string with same hash index. To limit the size of this
- * array to 64K, this link is maintained only for the last 32K strings.
- * An index in this array is thus a window index modulo 32K.
- */
-
- Posf *head; /* Heads of the hash chains or NIL. */
-
- uInt ins_h; /* hash index of string to be inserted */
- uInt hash_size; /* number of elements in hash table */
- uInt hash_bits; /* log2(hash_size) */
- uInt hash_mask; /* hash_size-1 */
-
- uInt hash_shift;
- /* Number of bits by which ins_h must be shifted at each input
- * step. It must be such that after MIN_MATCH steps, the oldest
- * byte no longer takes part in the hash key, that is:
- * hash_shift * MIN_MATCH >= hash_bits
- */
-
- long block_start;
- /* Window position at the beginning of the current output block. Gets
- * negative when the window is moved backwards.
- */
-
- uInt match_length; /* length of best match */
- IPos prev_match; /* previous match */
- int match_available; /* set if previous match exists */
- uInt strstart; /* start of string to insert */
- uInt match_start; /* start of matching string */
- uInt lookahead; /* number of valid bytes ahead in window */
-
- uInt prev_length;
- /* Length of the best match at previous step. Matches not greater than this
- * are discarded. This is used in the lazy match evaluation.
- */
-
- uInt max_chain_length;
- /* To speed up deflation, hash chains are never searched beyond this
- * length. A higher limit improves compression ratio but degrades the
- * speed.
- */
-
- uInt max_lazy_match;
- /* Attempt to find a better match only when the current match is strictly
- * smaller than this value. This mechanism is used only for compression
- * levels >= 4.
- */
-# define max_insert_length max_lazy_match
- /* Insert new strings in the hash table only if the match length is not
- * greater than this length. This saves time but degrades compression.
- * max_insert_length is used only for compression levels <= 3.
- */
-
- int level; /* compression level (1..9) */
- int strategy; /* favor or force Huffman coding*/
-
- uInt good_match;
- /* Use a faster search when the previous match is longer than this */
-
- int nice_match; /* Stop searching when current match exceeds this */
-
- /* used by trees.c: */
- /* Didn't use ct_data typedef below to supress compiler warning */
- struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
- struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
- struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
-
- struct tree_desc_s l_desc; /* desc. for literal tree */
- struct tree_desc_s d_desc; /* desc. for distance tree */
- struct tree_desc_s bl_desc; /* desc. for bit length tree */
-
- ush bl_count[MAX_BITS+1];
- /* number of codes at each bit length for an optimal tree */
-
- int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
- int heap_len; /* number of elements in the heap */
- int heap_max; /* element of largest frequency */
- /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
- * The same heap array is used to build all trees.
- */
-
- uch depth[2*L_CODES+1];
- /* Depth of each subtree used as tie breaker for trees of equal frequency
- */
-
- uchf *l_buf; /* buffer for literals or lengths */
-
- uInt lit_bufsize;
- /* Size of match buffer for literals/lengths. There are 4 reasons for
- * limiting lit_bufsize to 64K:
- * - frequencies can be kept in 16 bit counters
- * - if compression is not successful for the first block, all input
- * data is still in the window so we can still emit a stored block even
- * when input comes from standard input. (This can also be done for
- * all blocks if lit_bufsize is not greater than 32K.)
- * - if compression is not successful for a file smaller than 64K, we can
- * even emit a stored file instead of a stored block (saving 5 bytes).
- * This is applicable only for zip (not gzip or zlib).
- * - creating new Huffman trees less frequently may not provide fast
- * adaptation to changes in the input data statistics. (Take for
- * example a binary file with poorly compressible code followed by
- * a highly compressible string table.) Smaller buffer sizes give
- * fast adaptation but have of course the overhead of transmitting
- * trees more frequently.
- * - I can't count above 4
- */
-
- uInt last_lit; /* running index in l_buf */
-
- ushf *d_buf;
- /* Buffer for distances. To simplify the code, d_buf and l_buf have
- * the same number of elements. To use different lengths, an extra flag
- * array would be necessary.
- */
-
- ulg opt_len; /* bit length of current block with optimal trees */
- ulg static_len; /* bit length of current block with static trees */
- ulg compressed_len; /* total bit length of compressed file */
- uInt matches; /* number of string matches in current block */
- int last_eob_len; /* bit length of EOB code for last block */
-
-#ifdef DEBUG
- ulg bits_sent; /* bit length of the compressed data */
-#endif
-
- ush bi_buf;
- /* Output buffer. bits are inserted starting at the bottom (least
- * significant bits).
- */
- int bi_valid;
- /* Number of valid bits in bi_buf. All bits above the last valid bit
- * are always zero.
- */
-
-} FAR deflate_state;
-
-/* Output a byte on the stream.
- * IN assertion: there is enough room in pending_buf.
- */
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD)
-/* In order to simplify the code, particularly on 16 bit machines, match
- * distances are limited to MAX_DIST instead of WSIZE.
- */
-
- /* in trees.c */
-void _tr_init OF((deflate_state *s));
-int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
-ulg _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
-void _tr_align OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
-#endif
diff --git a/lib/libz/example.c b/lib/libz/example.c
deleted file mode 100644
index 3830842..0000000
--- a/lib/libz/example.c
+++ /dev/null
@@ -1,503 +0,0 @@
-/* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* $FreeBSD$ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-# include <string.h>
-# include <stdlib.h>
-#else
- extern void exit OF((int));
-#endif
-
-#define CHECK_ERR(err, msg) { \
- if (err != Z_OK) { \
- fprintf(stderr, "%s error: %d\n", msg, err); \
- exit(1); \
- } \
-}
-
-const char hello[] = "hello, hello!";
-/* "hello world" would be more standard, but the repeated "hello"
- * stresses the compression code better, sorry...
- */
-
-const char dictionary[] = "hello";
-uLong dictId; /* Adler32 value of the dictionary */
-
-void test_compress OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_gzio OF((const char *out, const char *in,
- Byte *uncompr, int uncomprLen));
-void test_deflate OF((Byte *compr, uLong comprLen));
-void test_inflate OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_large_deflate OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_large_inflate OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_flush OF((Byte *compr, uLong comprLen));
-void test_sync OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-void test_dict_deflate OF((Byte *compr, uLong comprLen));
-void test_dict_inflate OF((Byte *compr, uLong comprLen,
- Byte *uncompr, uLong uncomprLen));
-int main OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Test compress() and uncompress()
- */
-void test_compress(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- uLong len = strlen(hello)+1;
-
- err = compress(compr, &comprLen, (const Bytef*)hello, len);
- CHECK_ERR(err, "compress");
-
- strcpy((char*)uncompr, "garbage");
-
- err = uncompress(uncompr, &uncomprLen, compr, comprLen);
- CHECK_ERR(err, "uncompress");
-
- if (strcmp((char*)uncompr, hello)) {
- fprintf(stderr, "bad uncompress\n");
- } else {
- printf("uncompress(): %s\n", uncompr);
- }
-}
-
-/* ===========================================================================
- * Test read/write of .gz files
- */
-void test_gzio(out, in, uncompr, uncomprLen)
- const char *out; /* output file */
- const char *in; /* input file */
- Byte *uncompr;
- int uncomprLen;
-{
- int err;
- int len = strlen(hello)+1;
- gzFile file;
-
- file = gzopen(out, "wb");
- if (file == NULL) {
- fprintf(stderr, "gzopen error\n");
- exit(1);
- }
-
- if (gzwrite(file, (const voidp)hello, (unsigned)len) != len) {
- fprintf(stderr, "gzwrite err: %s\n", gzerror(file, &err));
- }
- gzclose(file);
-
- file = gzopen(in, "rb");
- if (file == NULL) {
- fprintf(stderr, "gzopen error\n");
- }
- strcpy((char*)uncompr, "garbage");
-
- uncomprLen = gzread(file, uncompr, (unsigned)uncomprLen);
- if (uncomprLen != len) {
- fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
- }
- gzclose(file);
-
- if (strcmp((char*)uncompr, hello)) {
- fprintf(stderr, "bad gzread\n");
- } else {
- printf("gzread(): %s\n", uncompr);
- }
-}
-
-/* ===========================================================================
- * Test deflate() with small buffers
- */
-void test_deflate(compr, comprLen)
- Byte *compr;
- uLong comprLen;
-{
- z_stream c_stream; /* compression stream */
- int err;
- int len = strlen(hello)+1;
-
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
- c_stream.opaque = (voidpf)0;
-
- err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
- CHECK_ERR(err, "deflateInit");
-
- c_stream.next_in = (Bytef*)hello;
- c_stream.next_out = compr;
-
- while (c_stream.total_in != (uLong)len && c_stream.total_out < comprLen) {
- c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */
- err = deflate(&c_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "deflate");
- }
- /* Finish the stream, still forcing small buffers: */
- for (;;) {
- c_stream.avail_out = 1;
- err = deflate(&c_stream, Z_FINISH);
- if (err == Z_STREAM_END) break;
- CHECK_ERR(err, "deflate");
- }
-
- err = deflateEnd(&c_stream);
- CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with small buffers
- */
-void test_inflate(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- z_stream d_stream; /* decompression stream */
-
- strcpy((char*)uncompr, "garbage");
-
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
- d_stream.opaque = (voidpf)0;
-
- err = inflateInit(&d_stream);
- CHECK_ERR(err, "inflateInit");
-
- d_stream.next_in = compr;
- d_stream.next_out = uncompr;
-
- while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) {
- d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */
- err = inflate(&d_stream, Z_NO_FLUSH);
- if (err == Z_STREAM_END) break;
- CHECK_ERR(err, "inflate");
- }
-
- err = inflateEnd(&d_stream);
- CHECK_ERR(err, "inflateEnd");
-
- if (strcmp((char*)uncompr, hello)) {
- fprintf(stderr, "bad inflate\n");
- } else {
- printf("inflate(): %s\n", uncompr);
- }
-}
-
-/* ===========================================================================
- * Test deflate() with large buffers and dynamic change of compression level
- */
-void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- z_stream c_stream; /* compression stream */
- int err;
-
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
- c_stream.opaque = (voidpf)0;
-
- err = deflateInit(&c_stream, Z_BEST_SPEED);
- CHECK_ERR(err, "deflateInit");
-
- c_stream.next_out = compr;
- c_stream.avail_out = (uInt)comprLen;
-
- /* At this point, uncompr is still mostly zeroes, so it should compress
- * very well:
- */
- c_stream.next_in = uncompr;
- c_stream.avail_in = (uInt)uncomprLen;
- err = deflate(&c_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "deflate");
- if (c_stream.avail_in != 0) {
- fprintf(stderr, "deflate not greedy\n");
- }
-
- /* Feed in already compressed data and switch to no compression: */
- deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
- c_stream.next_in = compr;
- c_stream.avail_in = (uInt)comprLen/2;
- err = deflate(&c_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "deflate");
-
- /* Switch back to compressing mode: */
- deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
- c_stream.next_in = uncompr;
- c_stream.avail_in = (uInt)uncomprLen;
- err = deflate(&c_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "deflate");
-
- err = deflate(&c_stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- fprintf(stderr, "deflate should report Z_STREAM_END\n");
- }
- err = deflateEnd(&c_stream);
- CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with large buffers
- */
-void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- z_stream d_stream; /* decompression stream */
-
- strcpy((char*)uncompr, "garbage");
-
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
- d_stream.opaque = (voidpf)0;
-
- err = inflateInit(&d_stream);
- CHECK_ERR(err, "inflateInit");
-
- d_stream.next_in = compr;
- d_stream.avail_in = (uInt)comprLen;
-
- for (;;) {
- d_stream.next_out = uncompr; /* discard the output */
- d_stream.avail_out = (uInt)uncomprLen;
- err = inflate(&d_stream, Z_NO_FLUSH);
- if (err == Z_STREAM_END) break;
- CHECK_ERR(err, "large inflate");
- }
-
- err = inflateEnd(&d_stream);
- CHECK_ERR(err, "inflateEnd");
-
- if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
- fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
- } else {
- printf("large_inflate(): OK\n");
- }
-}
-
-/* ===========================================================================
- * Test deflate() with full flush
- */
-void test_flush(compr, comprLen)
- Byte *compr;
- uLong comprLen;
-{
- z_stream c_stream; /* compression stream */
- int err;
- int len = strlen(hello)+1;
-
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
- c_stream.opaque = (voidpf)0;
-
- err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
- CHECK_ERR(err, "deflateInit");
-
- c_stream.next_in = (Bytef*)hello;
- c_stream.next_out = compr;
- c_stream.avail_in = 3;
- c_stream.avail_out = (uInt)comprLen;
- err = deflate(&c_stream, Z_FULL_FLUSH);
- CHECK_ERR(err, "deflate");
-
- compr[3]++; /* force an error in first compressed block */
- c_stream.avail_in = len - 3;
-
- err = deflate(&c_stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- CHECK_ERR(err, "deflate");
- }
- err = deflateEnd(&c_stream);
- CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflateSync()
- */
-void test_sync(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- z_stream d_stream; /* decompression stream */
-
- strcpy((char*)uncompr, "garbage");
-
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
- d_stream.opaque = (voidpf)0;
-
- err = inflateInit(&d_stream);
- CHECK_ERR(err, "inflateInit");
-
- d_stream.next_in = compr;
- d_stream.next_out = uncompr;
- d_stream.avail_in = 2; /* just read the zlib header */
- d_stream.avail_out = (uInt)uncomprLen;
-
- inflate(&d_stream, Z_NO_FLUSH);
- CHECK_ERR(err, "inflate");
-
- d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */
- err = inflateSync(&d_stream); /* but skip the damaged part */
- CHECK_ERR(err, "inflateSync");
-
- err = inflate(&d_stream, Z_FINISH);
- if (err != Z_DATA_ERROR) {
- fprintf(stderr, "inflate should report DATA_ERROR\n");
- /* Because of incorrect adler32 */
- }
- err = inflateEnd(&d_stream);
- CHECK_ERR(err, "inflateEnd");
-
- printf("after inflateSync(): hel%s\n", uncompr);
-}
-
-/* ===========================================================================
- * Test deflate() with preset dictionary
- */
-void test_dict_deflate(compr, comprLen)
- Byte *compr;
- uLong comprLen;
-{
- z_stream c_stream; /* compression stream */
- int err;
-
- c_stream.zalloc = (alloc_func)0;
- c_stream.zfree = (free_func)0;
- c_stream.opaque = (voidpf)0;
-
- err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
- CHECK_ERR(err, "deflateInit");
-
- err = deflateSetDictionary(&c_stream,
- (const Bytef*)dictionary, sizeof(dictionary));
- CHECK_ERR(err, "deflateSetDictionary");
-
- dictId = c_stream.adler;
- c_stream.next_out = compr;
- c_stream.avail_out = (uInt)comprLen;
-
- c_stream.next_in = (Bytef*)hello;
- c_stream.avail_in = (uInt)strlen(hello)+1;
-
- err = deflate(&c_stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- fprintf(stderr, "deflate should report Z_STREAM_END\n");
- }
- err = deflateEnd(&c_stream);
- CHECK_ERR(err, "deflateEnd");
-}
-
-/* ===========================================================================
- * Test inflate() with a preset dictionary
- */
-void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
- Byte *compr, *uncompr;
- uLong comprLen, uncomprLen;
-{
- int err;
- z_stream d_stream; /* decompression stream */
-
- strcpy((char*)uncompr, "garbage");
-
- d_stream.zalloc = (alloc_func)0;
- d_stream.zfree = (free_func)0;
- d_stream.opaque = (voidpf)0;
-
- err = inflateInit(&d_stream);
- CHECK_ERR(err, "inflateInit");
-
- d_stream.next_in = compr;
- d_stream.avail_in = (uInt)comprLen;
-
- d_stream.next_out = uncompr;
- d_stream.avail_out = (uInt)uncomprLen;
-
- for (;;) {
- err = inflate(&d_stream, Z_NO_FLUSH);
- if (err == Z_STREAM_END) break;
- if (err == Z_NEED_DICT) {
- if (d_stream.adler != dictId) {
- fprintf(stderr, "unexpected dictionary");
- exit(1);
- }
- err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
- sizeof(dictionary));
- }
- CHECK_ERR(err, "inflate with dict");
- }
-
- err = inflateEnd(&d_stream);
- CHECK_ERR(err, "inflateEnd");
-
- if (strcmp((char*)uncompr, hello)) {
- fprintf(stderr, "bad inflate with dict\n");
- } else {
- printf("inflate with dictionary: %s\n", uncompr);
- }
-}
-
-/* ===========================================================================
- * Usage: example [output.gz [input.gz]]
- */
-
-int main(argc, argv)
- int argc;
- char *argv[];
-{
- Byte *compr, *uncompr;
- uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */
- uLong uncomprLen = comprLen;
-
- if (zlibVersion()[0] != ZLIB_VERSION[0]) {
- fprintf(stderr, "incompatible zlib version\n");
- exit(1);
-
- } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) {
- fprintf(stderr, "warning: different zlib version\n");
- }
-
- compr = (Byte*)calloc((uInt)comprLen, 1);
- uncompr = (Byte*)calloc((uInt)uncomprLen, 1);
- /* compr and uncompr are cleared to avoid reading uninitialized
- * data and to ensure that uncompr compresses well.
- */
- if (compr == Z_NULL || uncompr == Z_NULL) {
- printf("out of memory\n");
- exit(1);
- }
-
- test_compress(compr, comprLen, uncompr, uncomprLen);
-
- test_gzio((argc > 1 ? argv[1] : "foo.gz"),
- (argc > 2 ? argv[2] : "foo.gz"),
- uncompr, (int)uncomprLen);
-
- test_deflate(compr, comprLen);
- test_inflate(compr, comprLen, uncompr, uncomprLen);
-
- test_large_deflate(compr, comprLen, uncompr, uncomprLen);
- test_large_inflate(compr, comprLen, uncompr, uncomprLen);
-
- test_flush(compr, comprLen);
- test_sync(compr, comprLen, uncompr, uncomprLen);
-
- test_dict_deflate(compr, comprLen);
- test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
-
- exit(0);
- return 0; /* to avoid warning */
-}
diff --git a/lib/libz/gzio.c b/lib/libz/gzio.c
deleted file mode 100644
index f62b125..0000000
--- a/lib/libz/gzio.c
+++ /dev/null
@@ -1,523 +0,0 @@
-/* gzio.c -- IO on .gz files
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* $FreeBSD$ */
-
-#include <stdio.h>
-
-#include "zutil.h"
-
-struct internal_state {int dummy;}; /* for buggy compilers */
-
-#define Z_BUFSIZE 4096
-
-#define ALLOC(size) malloc(size)
-#define TRYFREE(p) {if (p) free(p);}
-
-static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
-
-/* gzip flag byte */
-#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
-#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
-#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
-#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
-#define COMMENT 0x10 /* bit 4 set: file comment present */
-#define RESERVED 0xE0 /* bits 5..7: reserved */
-
-typedef struct gz_stream {
- z_stream stream;
- int z_err; /* error code for last stream operation */
- int z_eof; /* set if end of input file */
- FILE *file; /* .gz file */
- Byte *inbuf; /* input buffer */
- Byte *outbuf; /* output buffer */
- uLong crc; /* crc32 of uncompressed data */
- char *msg; /* error message */
- char *path; /* path name for debugging only */
- int transparent; /* 1 if input file is not a .gz file */
- char mode; /* 'w' or 'r' */
-} gz_stream;
-
-
-local gzFile gz_open OF((const char *path, const char *mode, int fd));
-local int get_byte OF((gz_stream *s));
-local void check_header OF((gz_stream *s));
-local int destroy OF((gz_stream *s));
-local void putLong OF((FILE *file, uLong x));
-local uLong getLong OF((gz_stream *s));
-
-/* ===========================================================================
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb"). The file is given either by file descriptor
- or path name (if fd == -1).
- gz_open return NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR).
-*/
-local gzFile gz_open (path, mode, fd)
- const char *path;
- const char *mode;
- int fd;
-{
- int err;
- int level = Z_DEFAULT_COMPRESSION; /* compression level */
- char *p = (char*)mode;
- gz_stream *s;
- char fmode[80]; /* copy of mode, without the compression level */
- char *m = fmode;
-
- if (!path || !mode) return Z_NULL;
-
- s = (gz_stream *)ALLOC(sizeof(gz_stream));
- if (!s) return Z_NULL;
-
- s->stream.zalloc = (alloc_func)0;
- s->stream.zfree = (free_func)0;
- s->stream.opaque = (voidpf)0;
- s->stream.next_in = s->inbuf = Z_NULL;
- s->stream.next_out = s->outbuf = Z_NULL;
- s->stream.avail_in = s->stream.avail_out = 0;
- s->file = NULL;
- s->z_err = Z_OK;
- s->z_eof = 0;
- s->crc = crc32(0L, Z_NULL, 0);
- s->msg = NULL;
- s->transparent = 0;
-
- s->path = (char*)ALLOC(strlen(path)+1);
- if (s->path == NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- strcpy(s->path, path); /* do this early for debugging */
-
- s->mode = '\0';
- do {
- if (*p == 'r') s->mode = 'r';
- if (*p == 'w' || *p == 'a') s->mode = 'w';
- if (*p >= '0' && *p <= '9') {
- level = *p - '0';
- } else {
- *m++ = *p; /* copy the mode */
- }
- } while (*p++ && m != fmode + sizeof(fmode));
- if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
-
- if (s->mode == 'w') {
- err = deflateInit2(&(s->stream), level,
- Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, 0);
- /* windowBits is passed < 0 to suppress zlib header */
-
- s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-
- if (err != Z_OK || s->outbuf == Z_NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- } else {
- err = inflateInit2(&(s->stream), -MAX_WBITS);
- s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
-
- if (err != Z_OK || s->inbuf == Z_NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- }
- s->stream.avail_out = Z_BUFSIZE;
-
- errno = 0;
- s->file = fd < 0 ? FOPEN(path, fmode) : (FILE*)fdopen(fd, fmode);
-
- if (s->file == NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- if (s->mode == 'w') {
- /* Write a very simple .gz header:
- */
- fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
- Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
- } else {
- check_header(s); /* skip the .gz header */
- }
- return (gzFile)s;
-}
-
-/* ===========================================================================
- Opens a gzip (.gz) file for reading or writing.
-*/
-gzFile gzopen (path, mode)
- const char *path;
- const char *mode;
-{
- return gz_open (path, mode, -1);
-}
-
-/* ===========================================================================
- Associate a gzFile with the file descriptor fd. fd is not dup'ed here
- to mimic the behavio(u)r of fdopen.
-*/
-gzFile gzdopen (fd, mode)
- int fd;
- const char *mode;
-{
- char name[20];
-
- if (fd < 0) return (gzFile)Z_NULL;
- sprintf(name, "<fd:%d>", fd); /* for debugging */
-
- return gz_open (name, mode, fd);
-}
-
-/* ===========================================================================
- Read a byte from a gz_stream; update next_in and avail_in. Return EOF
- for end of file.
- IN assertion: the stream s has been sucessfully opened for reading.
-*/
-local int get_byte(s)
- gz_stream *s;
-{
- if (s->z_eof) return EOF;
- if (s->stream.avail_in == 0) {
- errno = 0;
- s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);
- if (s->stream.avail_in == 0) {
- s->z_eof = 1;
- if (ferror(s->file)) s->z_err = Z_ERRNO;
- return EOF;
- }
- s->stream.next_in = s->inbuf;
- }
- s->stream.avail_in--;
- return *(s->stream.next_in)++;
-}
-
-/* ===========================================================================
- Check the gzip header of a gz_stream opened for reading. Set the stream
- mode to transparent if the gzip magic header is not present; set s->err
- to Z_DATA_ERROR if the magic header is present but the rest of the header
- is incorrect.
- IN assertion: the stream s has already been created sucessfully;
- s->stream.avail_in is zero for the first time, but may be non-zero
- for concatenated .gz files.
-*/
-local void check_header(s)
- gz_stream *s;
-{
- int method; /* method byte */
- int flags; /* flags byte */
- uInt len;
- int c;
-
- /* Check the gzip magic header */
- for (len = 0; len < 2; len++) {
- c = get_byte(s);
- if (c != gz_magic[len]) {
- s->transparent = 1;
- if (c != EOF) s->stream.avail_in++, s->stream.next_in--;
- s->z_err = s->stream.avail_in != 0 ? Z_OK : Z_STREAM_END;
- return;
- }
- }
- method = get_byte(s);
- flags = get_byte(s);
- if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
- s->z_err = Z_DATA_ERROR;
- return;
- }
-
- /* Discard time, xflags and OS code: */
- for (len = 0; len < 6; len++) (void)get_byte(s);
-
- if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
- len = (uInt)get_byte(s);
- len += ((uInt)get_byte(s))<<8;
- /* len is garbage if EOF but the loop below will quit anyway */
- while (len-- != 0 && get_byte(s) != EOF) ;
- }
- if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
- while ((c = get_byte(s)) != 0 && c != EOF) ;
- }
- if ((flags & COMMENT) != 0) { /* skip the .gz file comment */
- while ((c = get_byte(s)) != 0 && c != EOF) ;
- }
- if ((flags & HEAD_CRC) != 0) { /* skip the header crc */
- for (len = 0; len < 2; len++) (void)get_byte(s);
- }
- s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
-}
-
- /* ===========================================================================
- * Cleanup then free the given gz_stream. Return a zlib error code.
- Try freeing in the reverse order of allocations.
- */
-local int destroy (s)
- gz_stream *s;
-{
- int err = Z_OK;
-
- if (!s) return Z_STREAM_ERROR;
-
- TRYFREE(s->msg);
-
- if (s->stream.state != NULL) {
- if (s->mode == 'w') {
- err = deflateEnd(&(s->stream));
- } else if (s->mode == 'r') {
- err = inflateEnd(&(s->stream));
- }
- }
- if (s->file != NULL && fclose(s->file)) {
- err = Z_ERRNO;
- }
- if (s->z_err < 0) err = s->z_err;
-
- TRYFREE(s->inbuf);
- TRYFREE(s->outbuf);
- TRYFREE(s->path);
- TRYFREE(s);
- return err;
-}
-
-/* ===========================================================================
- Reads the given number of uncompressed bytes from the compressed file.
- gzread returns the number of bytes actually read (0 for end of file).
-*/
-int gzread (file, buf, len)
- gzFile file;
- voidp buf;
- unsigned len;
-{
- gz_stream *s = (gz_stream*)file;
- Bytef *start = buf; /* starting point for crc computation */
- Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */
-
- if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
-
- if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
- if (s->z_err == Z_STREAM_END) return 0; /* EOF */
-
- s->stream.next_out = next_out = buf;
- s->stream.avail_out = len;
-
- while (s->stream.avail_out != 0) {
-
- if (s->transparent) {
- /* Copy first the lookahead bytes: */
- uInt n = s->stream.avail_in;
- if (n > s->stream.avail_out) n = s->stream.avail_out;
- if (n > 0) {
- zmemcpy(s->stream.next_out, s->stream.next_in, n);
- next_out += n;
- s->stream.next_out = next_out;
- s->stream.next_in += n;
- s->stream.avail_out -= n;
- s->stream.avail_in -= n;
- }
- if (s->stream.avail_out > 0) {
- s->stream.avail_out -= fread(next_out, 1, s->stream.avail_out,
- s->file);
- }
- return (int)(len - s->stream.avail_out);
- }
- if (s->stream.avail_in == 0 && !s->z_eof) {
-
- errno = 0;
- s->stream.avail_in = fread(s->inbuf, 1, Z_BUFSIZE, s->file);
- if (s->stream.avail_in == 0) {
- s->z_eof = 1;
- if (ferror(s->file)) {
- s->z_err = Z_ERRNO;
- break;
- }
- }
- s->stream.next_in = s->inbuf;
- }
- s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
-
- if (s->z_err == Z_STREAM_END) {
- /* Check CRC and original size */
- s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
- start = s->stream.next_out;
-
- if (getLong(s) != s->crc || getLong(s) != s->stream.total_out) {
- s->z_err = Z_DATA_ERROR;
- } else {
- /* Check for concatenated .gz files: */
- check_header(s);
- if (s->z_err == Z_OK) {
- inflateReset(&(s->stream));
- s->crc = crc32(0L, Z_NULL, 0);
- }
- }
- }
- if (s->z_err != Z_OK || s->z_eof) break;
- }
- s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-
- return (int)(len - s->stream.avail_out);
-}
-
-/* ===========================================================================
- Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of bytes actually written (0 in case of error).
-*/
-int gzwrite (file, buf, len)
- gzFile file;
- const voidp buf;
- unsigned len;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
- s->stream.next_in = buf;
- s->stream.avail_in = len;
-
- while (s->stream.avail_in != 0) {
-
- if (s->stream.avail_out == 0) {
-
- s->stream.next_out = s->outbuf;
- if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
- s->z_err = Z_ERRNO;
- break;
- }
- s->stream.avail_out = Z_BUFSIZE;
- }
- s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
- if (s->z_err != Z_OK) break;
- }
- s->crc = crc32(s->crc, buf, len);
-
- return (int)(len - s->stream.avail_in);
-}
-
-/* ===========================================================================
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function.
- gzflush should be called only when strictly necessary because it can
- degrade compression.
-*/
-int gzflush (file, flush)
- gzFile file;
- int flush;
-{
- uInt len;
- int done = 0;
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
- s->stream.avail_in = 0; /* should be zero already anyway */
-
- for (;;) {
- len = Z_BUFSIZE - s->stream.avail_out;
-
- if (len != 0) {
- if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
- s->z_err = Z_ERRNO;
- return Z_ERRNO;
- }
- s->stream.next_out = s->outbuf;
- s->stream.avail_out = Z_BUFSIZE;
- }
- if (done) break;
- s->z_err = deflate(&(s->stream), flush);
-
- /* deflate has finished flushing only when it hasn't used up
- * all the available space in the output buffer:
- */
- done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
-
- if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
- }
- fflush(s->file);
- return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-
-/* ===========================================================================
- Outputs a long in LSB order to the given file
-*/
-local void putLong (file, x)
- FILE *file;
- uLong x;
-{
- int n;
- for (n = 0; n < 4; n++) {
- fputc((int)(x & 0xff), file);
- x >>= 8;
- }
-}
-
-/* ===========================================================================
- Reads a long in LSB order from the given gz_stream. Sets
-*/
-local uLong getLong (s)
- gz_stream *s;
-{
- uLong x = (uLong)get_byte(s);
- int c;
-
- x += ((uLong)get_byte(s))<<8;
- x += ((uLong)get_byte(s))<<16;
- c = get_byte(s);
- if (c == EOF) s->z_err = Z_DATA_ERROR;
- x += ((uLong)c)<<24;
- return x;
-}
-
-/* ===========================================================================
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state.
-*/
-int gzclose (file)
- gzFile file;
-{
- int err;
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL) return Z_STREAM_ERROR;
-
- if (s->mode == 'w') {
- err = gzflush (file, Z_FINISH);
- if (err != Z_OK) return destroy(file);
-
- putLong (s->file, s->crc);
- putLong (s->file, s->stream.total_in);
-
- }
- return destroy(file);
-}
-
-/* ===========================================================================
- Returns the error message for the last error which occured on the
- given compressed file. errnum is set to zlib error number. If an
- error occured in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
-*/
-const char* gzerror (file, errnum)
- gzFile file;
- int *errnum;
-{
- char *m;
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL) {
- *errnum = Z_STREAM_ERROR;
- return (const char*)ERR_MSG(Z_STREAM_ERROR);
- }
- *errnum = s->z_err;
- if (*errnum == Z_OK) return (const char*)"";
-
- m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
-
- if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
-
- TRYFREE(s->msg);
- s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);
- strcpy(s->msg, s->path);
- strcat(s->msg, ": ");
- strcat(s->msg, m);
- return (const char*)s->msg;
-}
diff --git a/lib/libz/infblock.c b/lib/libz/infblock.c
deleted file mode 100644
index 89602a6..0000000
--- a/lib/libz/infblock.c
+++ /dev/null
@@ -1,405 +0,0 @@
-/* infblock.c -- interpret and process block types to last block
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "infblock.h"
-#include "inftrees.h"
-#include "infcodes.h"
-#include "infutil.h"
-
-struct inflate_codes_state {int dummy;}; /* for buggy compilers */
-
-/* Table for deflate from PKZIP's appnote.txt. */
-local const uInt border[] = { /* Order of the bit length code lengths */
- 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-/*
- Notes beyond the 1.93a appnote.txt:
-
- 1. Distance pointers never point before the beginning of the output
- stream.
- 2. Distance pointers can point back across blocks, up to 32k away.
- 3. There is an implied maximum of 7 bits for the bit length table and
- 15 bits for the actual data.
- 4. If only one code exists, then it is encoded using one bit. (Zero
- would be more efficient, but perhaps a little confusing.) If two
- codes exist, they are coded using one bit each (0 and 1).
- 5. There is no way of sending zero distance codes--a dummy must be
- sent if there are none. (History: a pre 2.0 version of PKZIP would
- store blocks with no distance codes, but this was discovered to be
- too harsh a criterion.) Valid only for 1.93a. 2.04c does allow
- zero distance codes, which is sent as one code of zero bits in
- length.
- 6. There are up to 286 literal/length codes. Code 256 represents the
- end-of-block. Note however that the static length tree defines
- 288 codes just to fill out the Huffman codes. Codes 286 and 287
- cannot be used though, since there is no length base or extra bits
- defined for them. Similarily, there are up to 30 distance codes.
- However, static trees define 32 codes (all 5 bits) to fill out the
- Huffman codes, but the last two had better not show up in the data.
- 7. Unzip can check dynamic Huffman blocks for complete code sets.
- The exception is that a single code would not be complete (see #4).
- 8. The five bits following the block type is really the number of
- literal codes sent minus 257.
- 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
- (1+6+6). Therefore, to output three times the length, you output
- three codes (1+1+1), whereas to output four times the same length,
- you only need two codes (1+3). Hmm.
- 10. In the tree reconstruction algorithm, Code = Code + Increment
- only if BitLength(i) is not zero. (Pretty obvious.)
- 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19)
- 12. Note: length code 284 can represent 227-258, but length code 285
- really is 258. The last length deserves its own, short code
- since it gets used a lot in very redundant files. The length
- 258 is special since 258 - 3 (the min match length) is 255.
- 13. The literal/length and distance code bit lengths are read as a
- single stream of lengths. It is possible (and advantageous) for
- a repeat code (16, 17, or 18) to go across the boundary between
- the two sets of lengths.
- */
-
-
-void inflate_blocks_reset(s, z, c)
-inflate_blocks_statef *s;
-z_streamp z;
-uLongf *c;
-{
- if (s->checkfn != Z_NULL)
- *c = s->check;
- if (s->mode == BTREE || s->mode == DTREE)
- ZFREE(z, s->sub.trees.blens);
- if (s->mode == CODES)
- {
- inflate_codes_free(s->sub.decode.codes, z);
- inflate_trees_free(s->sub.decode.td, z);
- inflate_trees_free(s->sub.decode.tl, z);
- }
- s->mode = TYPE;
- s->bitk = 0;
- s->bitb = 0;
- s->read = s->write = s->window;
- if (s->checkfn != Z_NULL)
- z->adler = s->check = (*s->checkfn)(0L, Z_NULL, 0);
- Trace((stderr, "inflate: blocks reset\n"));
-}
-
-
-inflate_blocks_statef *inflate_blocks_new(z, c, w)
-z_streamp z;
-check_func c;
-uInt w;
-{
- inflate_blocks_statef *s;
-
- if ((s = (inflate_blocks_statef *)ZALLOC
- (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL)
- return s;
- if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)
- {
- ZFREE(z, s);
- return Z_NULL;
- }
- s->end = s->window + w;
- s->checkfn = c;
- s->mode = TYPE;
- Trace((stderr, "inflate: blocks allocated\n"));
- inflate_blocks_reset(s, z, &s->check);
- return s;
-}
-
-
-#ifdef DEBUG
- extern uInt inflate_hufts;
-#endif
-int inflate_blocks(s, z, r)
-inflate_blocks_statef *s;
-z_streamp z;
-int r;
-{
- uInt t; /* temporary storage */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Bytef *p; /* input data pointer */
- uInt n; /* bytes available there */
- Bytef *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
-
- /* copy input/output information to locals (UPDATE macro restores) */
- LOAD
-
- /* process input based on current state */
- while (1) switch (s->mode)
- {
- case TYPE:
- NEEDBITS(3)
- t = (uInt)b & 7;
- s->last = t & 1;
- switch (t >> 1)
- {
- case 0: /* stored */
- Trace((stderr, "inflate: stored block%s\n",
- s->last ? " (last)" : ""));
- DUMPBITS(3)
- t = k & 7; /* go to byte boundary */
- DUMPBITS(t)
- s->mode = LENS; /* get length of stored block */
- break;
- case 1: /* fixed */
- Trace((stderr, "inflate: fixed codes block%s\n",
- s->last ? " (last)" : ""));
- {
- uInt bl, bd;
- inflate_huft *tl, *td;
-
- inflate_trees_fixed(&bl, &bd, &tl, &td);
- s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
- if (s->sub.decode.codes == Z_NULL)
- {
- r = Z_MEM_ERROR;
- LEAVE
- }
- s->sub.decode.tl = Z_NULL; /* don't try to free these */
- s->sub.decode.td = Z_NULL;
- }
- DUMPBITS(3)
- s->mode = CODES;
- break;
- case 2: /* dynamic */
- Trace((stderr, "inflate: dynamic codes block%s\n",
- s->last ? " (last)" : ""));
- DUMPBITS(3)
- s->mode = TABLE;
- break;
- case 3: /* illegal */
- DUMPBITS(3)
- s->mode = BAD;
- z->msg = (char*)"invalid block type";
- r = Z_DATA_ERROR;
- LEAVE
- }
- break;
- case LENS:
- NEEDBITS(32)
- if ((((~b) >> 16) & 0xffff) != (b & 0xffff))
- {
- s->mode = BAD;
- z->msg = (char*)"invalid stored block lengths";
- r = Z_DATA_ERROR;
- LEAVE
- }
- s->sub.left = (uInt)b & 0xffff;
- b = k = 0; /* dump bits */
- Tracev((stderr, "inflate: stored length %u\n", s->sub.left));
- s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE);
- break;
- case STORED:
- if (n == 0)
- LEAVE
- NEEDOUT
- t = s->sub.left;
- if (t > n) t = n;
- if (t > m) t = m;
- zmemcpy(q, p, t);
- p += t; n -= t;
- q += t; m -= t;
- if ((s->sub.left -= t) != 0)
- break;
- Tracev((stderr, "inflate: stored end, %lu total out\n",
- z->total_out + (q >= s->read ? q - s->read :
- (s->end - s->read) + (q - s->window))));
- s->mode = s->last ? DRY : TYPE;
- break;
- case TABLE:
- NEEDBITS(14)
- s->sub.trees.table = t = (uInt)b & 0x3fff;
-#ifndef PKZIP_BUG_WORKAROUND
- if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)
- {
- s->mode = BAD;
- z->msg = (char*)"too many length or distance symbols";
- r = Z_DATA_ERROR;
- LEAVE
- }
-#endif
- t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
- if (t < 19)
- t = 19;
- if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)
- {
- r = Z_MEM_ERROR;
- LEAVE
- }
- DUMPBITS(14)
- s->sub.trees.index = 0;
- Tracev((stderr, "inflate: table sizes ok\n"));
- s->mode = BTREE;
- case BTREE:
- while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
- {
- NEEDBITS(3)
- s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;
- DUMPBITS(3)
- }
- while (s->sub.trees.index < 19)
- s->sub.trees.blens[border[s->sub.trees.index++]] = 0;
- s->sub.trees.bb = 7;
- t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,
- &s->sub.trees.tb, z);
- if (t != Z_OK)
- {
- ZFREE(z, s->sub.trees.blens);
- r = t;
- if (r == Z_DATA_ERROR)
- s->mode = BAD;
- LEAVE
- }
- s->sub.trees.index = 0;
- Tracev((stderr, "inflate: bits tree ok\n"));
- s->mode = DTREE;
- case DTREE:
- while (t = s->sub.trees.table,
- s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
- {
- inflate_huft *h;
- uInt i, j, c;
-
- t = s->sub.trees.bb;
- NEEDBITS(t)
- h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);
- t = h->word.what.Bits;
- c = h->more.Base;
- if (c < 16)
- {
- DUMPBITS(t)
- s->sub.trees.blens[s->sub.trees.index++] = c;
- }
- else /* c == 16..18 */
- {
- i = c == 18 ? 7 : c - 14;
- j = c == 18 ? 11 : 3;
- NEEDBITS(t + i)
- DUMPBITS(t)
- j += (uInt)b & inflate_mask[i];
- DUMPBITS(i)
- i = s->sub.trees.index;
- t = s->sub.trees.table;
- if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
- (c == 16 && i < 1))
- {
- inflate_trees_free(s->sub.trees.tb, z);
- ZFREE(z, s->sub.trees.blens);
- s->mode = BAD;
- z->msg = (char*)"invalid bit length repeat";
- r = Z_DATA_ERROR;
- LEAVE
- }
- c = c == 16 ? s->sub.trees.blens[i - 1] : 0;
- do {
- s->sub.trees.blens[i++] = c;
- } while (--j);
- s->sub.trees.index = i;
- }
- }
- inflate_trees_free(s->sub.trees.tb, z);
- s->sub.trees.tb = Z_NULL;
- {
- uInt bl, bd;
- inflate_huft *tl, *td;
- inflate_codes_statef *c;
-
- bl = 9; /* must be <= 9 for lookahead assumptions */
- bd = 6; /* must be <= 9 for lookahead assumptions */
- t = s->sub.trees.table;
-#ifdef DEBUG
- inflate_hufts = 0;
-#endif
- t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
- s->sub.trees.blens, &bl, &bd, &tl, &td, z);
- ZFREE(z, s->sub.trees.blens);
- if (t != Z_OK)
- {
- if (t == (uInt)Z_DATA_ERROR)
- s->mode = BAD;
- r = t;
- LEAVE
- }
- Tracev((stderr, "inflate: trees ok, %d * %d bytes used\n",
- inflate_hufts, sizeof(inflate_huft)));
- if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
- {
- inflate_trees_free(td, z);
- inflate_trees_free(tl, z);
- r = Z_MEM_ERROR;
- LEAVE
- }
- s->sub.decode.codes = c;
- s->sub.decode.tl = tl;
- s->sub.decode.td = td;
- }
- s->mode = CODES;
- case CODES:
- UPDATE
- if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)
- return inflate_flush(s, z, r);
- r = Z_OK;
- inflate_codes_free(s->sub.decode.codes, z);
- inflate_trees_free(s->sub.decode.td, z);
- inflate_trees_free(s->sub.decode.tl, z);
- LOAD
- Tracev((stderr, "inflate: codes end, %lu total out\n",
- z->total_out + (q >= s->read ? q - s->read :
- (s->end - s->read) + (q - s->window))));
- if (!s->last)
- {
- s->mode = TYPE;
- break;
- }
- if (k > 7) /* return unused byte, if any */
- {
- Assert(k < 16, "inflate_codes grabbed too many bytes")
- k -= 8;
- n++;
- p--; /* can always return one */
- }
- s->mode = DRY;
- case DRY:
- FLUSH
- if (s->read != s->write)
- LEAVE
- s->mode = DONE;
- case DONE:
- r = Z_STREAM_END;
- LEAVE
- case BAD:
- r = Z_DATA_ERROR;
- LEAVE
- default:
- r = Z_STREAM_ERROR;
- LEAVE
- }
-}
-
-
-int inflate_blocks_free(s, z, c)
-inflate_blocks_statef *s;
-z_streamp z;
-uLongf *c;
-{
- inflate_blocks_reset(s, z, c);
- ZFREE(z, s->window);
- ZFREE(z, s);
- Trace((stderr, "inflate: blocks freed\n"));
- return Z_OK;
-}
-
-
-void inflate_set_dictionary(s, d, n)
-inflate_blocks_statef *s;
-const Bytef *d;
-uInt n;
-{
- zmemcpy((charf *)s->window, d, n);
- s->read = s->write = s->window + n;
-}
diff --git a/lib/libz/infblock.h b/lib/libz/infblock.h
deleted file mode 100644
index 3ecd50c..0000000
--- a/lib/libz/infblock.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* infblock.h -- header to use infblock.c
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-struct inflate_blocks_state;
-typedef struct inflate_blocks_state FAR inflate_blocks_statef;
-
-extern inflate_blocks_statef * inflate_blocks_new OF((
- z_streamp z,
- check_func c, /* check function */
- uInt w)); /* window size */
-
-extern int inflate_blocks OF((
- inflate_blocks_statef *,
- z_streamp ,
- int)); /* initial return code */
-
-extern void inflate_blocks_reset OF((
- inflate_blocks_statef *,
- z_streamp ,
- uLongf *)); /* check value on output */
-
-extern int inflate_blocks_free OF((
- inflate_blocks_statef *,
- z_streamp ,
- uLongf *)); /* check value on output */
-
-extern void inflate_set_dictionary OF((
- inflate_blocks_statef *s,
- const Bytef *d, /* dictionary */
- uInt n)); /* dictionary length */
diff --git a/lib/libz/infcodes.c b/lib/libz/infcodes.c
deleted file mode 100644
index 3ae3818..0000000
--- a/lib/libz/infcodes.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/* infcodes.c -- process literals and length/distance pairs
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "infblock.h"
-#include "infcodes.h"
-#include "infutil.h"
-#include "inffast.h"
-
-/* simplify the use of the inflate_huft type with some defines */
-#define base more.Base
-#define next more.Next
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-/* inflate codes private state */
-struct inflate_codes_state {
-
- /* mode */
- enum { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
- START, /* x: set up for LEN */
- LEN, /* i: get length/literal/eob next */
- LENEXT, /* i: getting length extra (have base) */
- DIST, /* i: get distance next */
- DISTEXT, /* i: getting distance extra */
- COPY, /* o: copying bytes in window, waiting for space */
- LIT, /* o: got literal, waiting for output space */
- WASH, /* o: got eob, possibly still output waiting */
- END, /* x: got eob and all data flushed */
- BADCODE} /* x: got error */
- mode; /* current inflate_codes mode */
-
- /* mode dependent information */
- uInt len;
- union {
- struct {
- inflate_huft *tree; /* pointer into tree */
- uInt need; /* bits needed */
- } code; /* if LEN or DIST, where in tree */
- uInt lit; /* if LIT, literal */
- struct {
- uInt get; /* bits to get for extra */
- uInt dist; /* distance back to copy from */
- } copy; /* if EXT or COPY, where and how much */
- } sub; /* submode */
-
- /* mode independent information */
- Byte lbits; /* ltree bits decoded per branch */
- Byte dbits; /* dtree bits decoder per branch */
- inflate_huft *ltree; /* literal/length/eob tree */
- inflate_huft *dtree; /* distance tree */
-
-};
-
-
-inflate_codes_statef *inflate_codes_new(bl, bd, tl, td, z)
-uInt bl, bd;
-inflate_huft *tl;
-inflate_huft *td; /* need separate declaration for Borland C++ */
-z_streamp z;
-{
- inflate_codes_statef *c;
-
- if ((c = (inflate_codes_statef *)
- ZALLOC(z,1,sizeof(struct inflate_codes_state))) != Z_NULL)
- {
- c->mode = START;
- c->lbits = (Byte)bl;
- c->dbits = (Byte)bd;
- c->ltree = tl;
- c->dtree = td;
- Tracev((stderr, "inflate: codes new\n"));
- }
- return c;
-}
-
-
-int inflate_codes(s, z, r)
-inflate_blocks_statef *s;
-z_streamp z;
-int r;
-{
- uInt j; /* temporary storage */
- inflate_huft *t; /* temporary pointer */
- uInt e; /* extra bits or operation */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Bytef *p; /* input data pointer */
- uInt n; /* bytes available there */
- Bytef *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
- Bytef *f; /* pointer to copy strings from */
- inflate_codes_statef *c = s->sub.decode.codes; /* codes state */
-
- /* copy input/output information to locals (UPDATE macro restores) */
- LOAD
-
- /* process input and output based on current state */
- while (1) switch (c->mode)
- { /* waiting for "i:"=input, "o:"=output, "x:"=nothing */
- case START: /* x: set up for LEN */
-#ifndef SLOW
- if (m >= 258 && n >= 10)
- {
- UPDATE
- r = inflate_fast(c->lbits, c->dbits, c->ltree, c->dtree, s, z);
- LOAD
- if (r != Z_OK)
- {
- c->mode = r == Z_STREAM_END ? WASH : BADCODE;
- break;
- }
- }
-#endif /* !SLOW */
- c->sub.code.need = c->lbits;
- c->sub.code.tree = c->ltree;
- c->mode = LEN;
- case LEN: /* i: get length/literal/eob next */
- j = c->sub.code.need;
- NEEDBITS(j)
- t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);
- DUMPBITS(t->bits)
- e = (uInt)(t->exop);
- if (e == 0) /* literal */
- {
- c->sub.lit = t->base;
- Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
- "inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", t->base));
- c->mode = LIT;
- break;
- }
- if (e & 16) /* length */
- {
- c->sub.copy.get = e & 15;
- c->len = t->base;
- c->mode = LENEXT;
- break;
- }
- if ((e & 64) == 0) /* next table */
- {
- c->sub.code.need = e;
- c->sub.code.tree = t->next;
- break;
- }
- if (e & 32) /* end of block */
- {
- Tracevv((stderr, "inflate: end of block\n"));
- c->mode = WASH;
- break;
- }
- c->mode = BADCODE; /* invalid code */
- z->msg = (char*)"invalid literal/length code";
- r = Z_DATA_ERROR;
- LEAVE
- case LENEXT: /* i: getting length extra (have base) */
- j = c->sub.copy.get;
- NEEDBITS(j)
- c->len += (uInt)b & inflate_mask[j];
- DUMPBITS(j)
- c->sub.code.need = c->dbits;
- c->sub.code.tree = c->dtree;
- Tracevv((stderr, "inflate: length %u\n", c->len));
- c->mode = DIST;
- case DIST: /* i: get distance next */
- j = c->sub.code.need;
- NEEDBITS(j)
- t = c->sub.code.tree + ((uInt)b & inflate_mask[j]);
- DUMPBITS(t->bits)
- e = (uInt)(t->exop);
- if (e & 16) /* distance */
- {
- c->sub.copy.get = e & 15;
- c->sub.copy.dist = t->base;
- c->mode = DISTEXT;
- break;
- }
- if ((e & 64) == 0) /* next table */
- {
- c->sub.code.need = e;
- c->sub.code.tree = t->next;
- break;
- }
- c->mode = BADCODE; /* invalid code */
- z->msg = (char*)"invalid distance code";
- r = Z_DATA_ERROR;
- LEAVE
- case DISTEXT: /* i: getting distance extra */
- j = c->sub.copy.get;
- NEEDBITS(j)
- c->sub.copy.dist += (uInt)b & inflate_mask[j];
- DUMPBITS(j)
- Tracevv((stderr, "inflate: distance %u\n", c->sub.copy.dist));
- c->mode = COPY;
- case COPY: /* o: copying bytes in window, waiting for space */
-#ifndef __TURBOC__ /* Turbo C bug for following expression */
- f = (uInt)(q - s->window) < c->sub.copy.dist ?
- s->end - (c->sub.copy.dist - (q - s->window)) :
- q - c->sub.copy.dist;
-#else
- f = q - c->sub.copy.dist;
- if ((uInt)(q - s->window) < c->sub.copy.dist)
- f = s->end - (c->sub.copy.dist - (uInt)(q - s->window));
-#endif
- while (c->len)
- {
- NEEDOUT
- OUTBYTE(*f++)
- if (f == s->end)
- f = s->window;
- c->len--;
- }
- c->mode = START;
- break;
- case LIT: /* o: got literal, waiting for output space */
- NEEDOUT
- OUTBYTE(c->sub.lit)
- c->mode = START;
- break;
- case WASH: /* o: got eob, possibly more output */
- FLUSH
- if (s->read != s->write)
- LEAVE
- c->mode = END;
- case END:
- r = Z_STREAM_END;
- LEAVE
- case BADCODE: /* x: got error */
- r = Z_DATA_ERROR;
- LEAVE
- default:
- r = Z_STREAM_ERROR;
- LEAVE
- }
-}
-
-
-void inflate_codes_free(c, z)
-inflate_codes_statef *c;
-z_streamp z;
-{
- ZFREE(z, c);
- Tracev((stderr, "inflate: codes free\n"));
-}
diff --git a/lib/libz/infcodes.h b/lib/libz/infcodes.h
deleted file mode 100644
index c2c38df..0000000
--- a/lib/libz/infcodes.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* infcodes.h -- header to use infcodes.c
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-struct inflate_codes_state;
-typedef struct inflate_codes_state FAR inflate_codes_statef;
-
-extern inflate_codes_statef *inflate_codes_new OF((
- uInt, uInt,
- inflate_huft *, inflate_huft *,
- z_streamp ));
-
-extern int inflate_codes OF((
- inflate_blocks_statef *,
- z_streamp ,
- int));
-
-extern void inflate_codes_free OF((
- inflate_codes_statef *,
- z_streamp ));
-
diff --git a/lib/libz/inffast.c b/lib/libz/inffast.c
deleted file mode 100644
index 86eee4a..0000000
--- a/lib/libz/inffast.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/* inffast.c -- process literals and length/distance pairs fast
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "infblock.h"
-#include "infcodes.h"
-#include "infutil.h"
-#include "inffast.h"
-
-struct inflate_codes_state {int dummy;}; /* for buggy compilers */
-
-/* simplify the use of the inflate_huft type with some defines */
-#define base more.Base
-#define next more.Next
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-/* macros for bit input with no checking and for returning unused bytes */
-#define GRABBITS(j) {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}}
-#define UNGRAB {n+=(c=k>>3);p-=c;k&=7;}
-
-/* Called with number of bytes left to write in window at least 258
- (the maximum string length) and number of input bytes available
- at least ten. The ten bytes are six bytes for the longest length/
- distance pair plus four bytes for overloading the bit buffer. */
-
-int inflate_fast(bl, bd, tl, td, s, z)
-uInt bl, bd;
-inflate_huft *tl;
-inflate_huft *td; /* need separate declaration for Borland C++ */
-inflate_blocks_statef *s;
-z_streamp z;
-{
- inflate_huft *t; /* temporary pointer */
- uInt e; /* extra bits or operation */
- uLong b; /* bit buffer */
- uInt k; /* bits in bit buffer */
- Bytef *p; /* input data pointer */
- uInt n; /* bytes available there */
- Bytef *q; /* output window write pointer */
- uInt m; /* bytes to end of window or read pointer */
- uInt ml; /* mask for literal/length tree */
- uInt md; /* mask for distance tree */
- uInt c; /* bytes to copy */
- uInt d; /* distance back to copy from */
- Bytef *r; /* copy source pointer */
-
- /* load input, output, bit values */
- LOAD
-
- /* initialize masks */
- ml = inflate_mask[bl];
- md = inflate_mask[bd];
-
- /* do until not enough input or output space for fast loop */
- do { /* assume called with m >= 258 && n >= 10 */
- /* get literal/length code */
- GRABBITS(20) /* max bits for literal/length code */
- if ((e = (t = tl + ((uInt)b & ml))->exop) == 0)
- {
- DUMPBITS(t->bits)
- Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
- "inflate: * literal '%c'\n" :
- "inflate: * literal 0x%02x\n", t->base));
- *q++ = (Byte)t->base;
- m--;
- continue;
- }
- do {
- DUMPBITS(t->bits)
- if (e & 16)
- {
- /* get extra bits for length */
- e &= 15;
- c = t->base + ((uInt)b & inflate_mask[e]);
- DUMPBITS(e)
- Tracevv((stderr, "inflate: * length %u\n", c));
-
- /* decode distance base of block to copy */
- GRABBITS(15); /* max bits for distance code */
- e = (t = td + ((uInt)b & md))->exop;
- do {
- DUMPBITS(t->bits)
- if (e & 16)
- {
- /* get extra bits to add to distance base */
- e &= 15;
- GRABBITS(e) /* get extra bits (up to 13) */
- d = t->base + ((uInt)b & inflate_mask[e]);
- DUMPBITS(e)
- Tracevv((stderr, "inflate: * distance %u\n", d));
-
- /* do the copy */
- m -= c;
- if ((uInt)(q - s->window) >= d) /* offset before dest */
- { /* just copy */
- r = q - d;
- *q++ = *r++; c--; /* minimum count is three, */
- *q++ = *r++; c--; /* so unroll loop a little */
- }
- else /* else offset after destination */
- {
- e = d - (uInt)(q - s->window); /* bytes from offset to end */
- r = s->end - e; /* pointer to offset */
- if (c > e) /* if source crosses, */
- {
- c -= e; /* copy to end of window */
- do {
- *q++ = *r++;
- } while (--e);
- r = s->window; /* copy rest from start of window */
- }
- }
- do { /* copy all or what's left */
- *q++ = *r++;
- } while (--c);
- break;
- }
- else if ((e & 64) == 0)
- e = (t = t->next + ((uInt)b & inflate_mask[e]))->exop;
- else
- {
- z->msg = (char*)"invalid distance code";
- UNGRAB
- UPDATE
- return Z_DATA_ERROR;
- }
- } while (1);
- break;
- }
- if ((e & 64) == 0)
- {
- if ((e = (t = t->next + ((uInt)b & inflate_mask[e]))->exop) == 0)
- {
- DUMPBITS(t->bits)
- Tracevv((stderr, t->base >= 0x20 && t->base < 0x7f ?
- "inflate: * literal '%c'\n" :
- "inflate: * literal 0x%02x\n", t->base));
- *q++ = (Byte)t->base;
- m--;
- break;
- }
- }
- else if (e & 32)
- {
- Tracevv((stderr, "inflate: * end of block\n"));
- UNGRAB
- UPDATE
- return Z_STREAM_END;
- }
- else
- {
- z->msg = (char*)"invalid literal/length code";
- UNGRAB
- UPDATE
- return Z_DATA_ERROR;
- }
- } while (1);
- } while (m >= 258 && n >= 10);
-
- /* not enough input or output--restore pointers and return */
- UNGRAB
- UPDATE
- return Z_OK;
-}
diff --git a/lib/libz/inffast.h b/lib/libz/inffast.h
deleted file mode 100644
index 8cc644e..0000000
--- a/lib/libz/inffast.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-extern int inflate_fast OF((
- uInt,
- uInt,
- inflate_huft *,
- inflate_huft *,
- inflate_blocks_statef *,
- z_streamp ));
diff --git a/lib/libz/inflate.c b/lib/libz/inflate.c
deleted file mode 100644
index 74cc69c..0000000
--- a/lib/libz/inflate.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/* inflate.c -- zlib interface to inflate modules
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "infblock.h"
-
-struct inflate_blocks_state {int dummy;}; /* for buggy compilers */
-
-/* inflate private state */
-struct internal_state {
-
- /* mode */
- enum {
- METHOD, /* waiting for method byte */
- FLAG, /* waiting for flag byte */
- DICT4, /* four dictionary check bytes to go */
- DICT3, /* three dictionary check bytes to go */
- DICT2, /* two dictionary check bytes to go */
- DICT1, /* one dictionary check byte to go */
- DICT0, /* waiting for inflateSetDictionary */
- BLOCKS, /* decompressing blocks */
- CHECK4, /* four check bytes to go */
- CHECK3, /* three check bytes to go */
- CHECK2, /* two check bytes to go */
- CHECK1, /* one check byte to go */
- DONE, /* finished check, done */
- BAD} /* got an error--stay here */
- mode; /* current inflate mode */
-
- /* mode dependent information */
- union {
- uInt method; /* if FLAGS, method byte */
- struct {
- uLong was; /* computed check value */
- uLong need; /* stream check value */
- } check; /* if CHECK, check values to compare */
- uInt marker; /* if BAD, inflateSync's marker bytes count */
- } sub; /* submode */
-
- /* mode independent information */
- int nowrap; /* flag for no wrapper */
- uInt wbits; /* log2(window size) (8..15, defaults to 15) */
- inflate_blocks_statef
- *blocks; /* current inflate_blocks state */
-
-};
-
-
-int inflateReset(z)
-z_streamp z;
-{
- uLong c;
-
- if (z == Z_NULL || z->state == Z_NULL)
- return Z_STREAM_ERROR;
- z->total_in = z->total_out = 0;
- z->msg = Z_NULL;
- z->state->mode = z->state->nowrap ? BLOCKS : METHOD;
- inflate_blocks_reset(z->state->blocks, z, &c);
- Trace((stderr, "inflate: reset\n"));
- return Z_OK;
-}
-
-
-int inflateEnd(z)
-z_streamp z;
-{
- uLong c;
-
- if (z == Z_NULL || z->state == Z_NULL || z->zfree == Z_NULL)
- return Z_STREAM_ERROR;
- if (z->state->blocks != Z_NULL)
- inflate_blocks_free(z->state->blocks, z, &c);
- ZFREE(z, z->state);
- z->state = Z_NULL;
- Trace((stderr, "inflate: end\n"));
- return Z_OK;
-}
-
-
-int inflateInit2_(z, w, version, stream_size)
-z_streamp z;
-int w;
-const char *version;
-int stream_size;
-{
- if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
- stream_size != sizeof(z_stream))
- return Z_VERSION_ERROR;
-
- /* initialize state */
- if (z == Z_NULL)
- return Z_STREAM_ERROR;
- z->msg = Z_NULL;
- if (z->zalloc == Z_NULL)
- {
- z->zalloc = zcalloc;
- z->opaque = (voidpf)0;
- }
- if (z->zfree == Z_NULL) z->zfree = zcfree;
- if ((z->state = (struct internal_state FAR *)
- ZALLOC(z,1,sizeof(struct internal_state))) == Z_NULL)
- return Z_MEM_ERROR;
- z->state->blocks = Z_NULL;
-
- /* handle undocumented nowrap option (no zlib header or check) */
- z->state->nowrap = 0;
- if (w < 0)
- {
- w = - w;
- z->state->nowrap = 1;
- }
-
- /* set window size */
- if (w < 8 || w > 15)
- {
- inflateEnd(z);
- return Z_STREAM_ERROR;
- }
- z->state->wbits = (uInt)w;
-
- /* create inflate_blocks state */
- if ((z->state->blocks =
- inflate_blocks_new(z, z->state->nowrap ? Z_NULL : adler32, (uInt)1 << w))
- == Z_NULL)
- {
- inflateEnd(z);
- return Z_MEM_ERROR;
- }
- Trace((stderr, "inflate: allocated\n"));
-
- /* reset state */
- inflateReset(z);
- return Z_OK;
-}
-
-
-int inflateInit_(z, version, stream_size)
-z_streamp z;
-const char *version;
-int stream_size;
-{
- return inflateInit2_(z, DEF_WBITS, version, stream_size);
-}
-
-
-#define NEEDBYTE {if(z->avail_in==0)return r;r=Z_OK;}
-#define NEXTBYTE (z->avail_in--,z->total_in++,*z->next_in++)
-
-int inflate(z, f)
-z_streamp z;
-int f;
-{
- int r;
- uInt b;
-
- if (z == Z_NULL || z->state == Z_NULL || z->next_in == Z_NULL || f < 0)
- return Z_STREAM_ERROR;
- r = Z_BUF_ERROR;
- while (1) switch (z->state->mode)
- {
- case METHOD:
- NEEDBYTE
- if (((z->state->sub.method = NEXTBYTE) & 0xf) != Z_DEFLATED)
- {
- z->state->mode = BAD;
- z->msg = (char*)"unknown compression method";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- if ((z->state->sub.method >> 4) + 8 > z->state->wbits)
- {
- z->state->mode = BAD;
- z->msg = (char*)"invalid window size";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- z->state->mode = FLAG;
- case FLAG:
- NEEDBYTE
- b = NEXTBYTE;
- if (((z->state->sub.method << 8) + b) % 31)
- {
- z->state->mode = BAD;
- z->msg = (char*)"incorrect header check";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- Trace((stderr, "inflate: zlib header ok\n"));
- if (!(b & PRESET_DICT))
- {
- z->state->mode = BLOCKS;
- break;
- }
- z->state->mode = DICT4;
- case DICT4:
- NEEDBYTE
- z->state->sub.check.need = (uLong)NEXTBYTE << 24;
- z->state->mode = DICT3;
- case DICT3:
- NEEDBYTE
- z->state->sub.check.need += (uLong)NEXTBYTE << 16;
- z->state->mode = DICT2;
- case DICT2:
- NEEDBYTE
- z->state->sub.check.need += (uLong)NEXTBYTE << 8;
- z->state->mode = DICT1;
- case DICT1:
- NEEDBYTE
- z->state->sub.check.need += (uLong)NEXTBYTE;
- z->adler = z->state->sub.check.need;
- z->state->mode = DICT0;
- return Z_NEED_DICT;
- case DICT0:
- z->state->mode = BAD;
- z->msg = (char*)"need dictionary";
- z->state->sub.marker = 0; /* can try inflateSync */
- return Z_STREAM_ERROR;
- case BLOCKS:
- r = inflate_blocks(z->state->blocks, z, r);
- if (r == Z_DATA_ERROR)
- {
- z->state->mode = BAD;
- z->state->sub.marker = 0; /* can try inflateSync */
- break;
- }
- if (r != Z_STREAM_END)
- return r;
- r = Z_OK;
- inflate_blocks_reset(z->state->blocks, z, &z->state->sub.check.was);
- if (z->state->nowrap)
- {
- z->state->mode = DONE;
- break;
- }
- z->state->mode = CHECK4;
- case CHECK4:
- NEEDBYTE
- z->state->sub.check.need = (uLong)NEXTBYTE << 24;
- z->state->mode = CHECK3;
- case CHECK3:
- NEEDBYTE
- z->state->sub.check.need += (uLong)NEXTBYTE << 16;
- z->state->mode = CHECK2;
- case CHECK2:
- NEEDBYTE
- z->state->sub.check.need += (uLong)NEXTBYTE << 8;
- z->state->mode = CHECK1;
- case CHECK1:
- NEEDBYTE
- z->state->sub.check.need += (uLong)NEXTBYTE;
-
- if (z->state->sub.check.was != z->state->sub.check.need)
- {
- z->state->mode = BAD;
- z->msg = (char*)"incorrect data check";
- z->state->sub.marker = 5; /* can't try inflateSync */
- break;
- }
- Trace((stderr, "inflate: zlib check ok\n"));
- z->state->mode = DONE;
- case DONE:
- return Z_STREAM_END;
- case BAD:
- return Z_DATA_ERROR;
- default:
- return Z_STREAM_ERROR;
- }
-}
-
-
-int inflateSetDictionary(z, dictionary, dictLength)
-z_streamp z;
-const Bytef *dictionary;
-uInt dictLength;
-{
- uInt length = dictLength;
-
- if (z == Z_NULL || z->state == Z_NULL || z->state->mode != DICT0)
- return Z_STREAM_ERROR;
-
- if (adler32(1L, dictionary, dictLength) != z->adler) return Z_DATA_ERROR;
- z->adler = 1L;
-
- if (length >= ((uInt)1<<z->state->wbits))
- {
- length = (1<<z->state->wbits)-1;
- dictionary += dictLength - length;
- }
- inflate_set_dictionary(z->state->blocks, dictionary, length);
- z->state->mode = BLOCKS;
- return Z_OK;
-}
-
-
-int inflateSync(z)
-z_streamp z;
-{
- uInt n; /* number of bytes to look at */
- Bytef *p; /* pointer to bytes */
- uInt m; /* number of marker bytes found in a row */
- uLong r, w; /* temporaries to save total_in and total_out */
-
- /* set up */
- if (z == Z_NULL || z->state == Z_NULL)
- return Z_STREAM_ERROR;
- if (z->state->mode != BAD)
- {
- z->state->mode = BAD;
- z->state->sub.marker = 0;
- }
- if ((n = z->avail_in) == 0)
- return Z_BUF_ERROR;
- p = z->next_in;
- m = z->state->sub.marker;
-
- /* search */
- while (n && m < 4)
- {
- if (*p == (Byte)(m < 2 ? 0 : 0xff))
- m++;
- else if (*p)
- m = 0;
- else
- m = 4 - m;
- p++, n--;
- }
-
- /* restore */
- z->total_in += p - z->next_in;
- z->next_in = p;
- z->avail_in = n;
- z->state->sub.marker = m;
-
- /* return no joy or set up to restart on a new block */
- if (m != 4)
- return Z_DATA_ERROR;
- r = z->total_in; w = z->total_out;
- inflateReset(z);
- z->total_in = r; z->total_out = w;
- z->state->mode = BLOCKS;
- return Z_OK;
-}
diff --git a/lib/libz/inftrees.c b/lib/libz/inftrees.c
deleted file mode 100644
index b7b2f6b..0000000
--- a/lib/libz/inftrees.c
+++ /dev/null
@@ -1,478 +0,0 @@
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-
-char inflate_copyright[] = " inflate 1.0.4 Copyright 1995-1996 Mark Adler ";
-/*
- If you use the zlib library in a product, an acknowledgment is welcome
- in the documentation of your product. If for some reason you cannot
- include such an acknowledgment, I would appreciate that you keep this
- copyright string in the executable of your product.
- */
-struct internal_state {int dummy;}; /* for buggy compilers */
-
-/* simplify the use of the inflate_huft type with some defines */
-#define base more.Base
-#define next more.Next
-#define exop word.what.Exop
-#define bits word.what.Bits
-
-
-local int huft_build OF((
- uIntf *, /* code lengths in bits */
- uInt, /* number of codes */
- uInt, /* number of "simple" codes */
- const uIntf *, /* list of base values for non-simple codes */
- const uIntf *, /* list of extra bits for non-simple codes */
- inflate_huft * FAR*,/* result: starting table */
- uIntf *, /* maximum lookup bits (returns actual) */
- z_streamp )); /* for zalloc function */
-
-local voidpf falloc OF((
- voidpf, /* opaque pointer (not used) */
- uInt, /* number of items */
- uInt)); /* size of item */
-
-/* Tables for deflate from PKZIP's appnote.txt. */
-local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
- 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
- /* see note #13 above about 258 */
-local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
- 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */
-local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */
- 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
- 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
- 8193, 12289, 16385, 24577};
-local const uInt cpdext[30] = { /* Extra bits for distance codes */
- 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
- 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
- 12, 12, 13, 13};
-
-/*
- Huffman code decoding is performed using a multi-level table lookup.
- The fastest way to decode is to simply build a lookup table whose
- size is determined by the longest code. However, the time it takes
- to build this table can also be a factor if the data being decoded
- is not very long. The most common codes are necessarily the
- shortest codes, so those codes dominate the decoding time, and hence
- the speed. The idea is you can have a shorter table that decodes the
- shorter, more probable codes, and then point to subsidiary tables for
- the longer codes. The time it costs to decode the longer codes is
- then traded against the time it takes to make longer tables.
-
- This results of this trade are in the variables lbits and dbits
- below. lbits is the number of bits the first level table for literal/
- length codes can decode in one step, and dbits is the same thing for
- the distance codes. Subsequent tables are also less than or equal to
- those sizes. These values may be adjusted either when all of the
- codes are shorter than that, in which case the longest code length in
- bits is used, or when the shortest code is *longer* than the requested
- table size, in which case the length of the shortest code in bits is
- used.
-
- There are two different values for the two tables, since they code a
- different number of possibilities each. The literal/length table
- codes 286 possible values, or in a flat code, a little over eight
- bits. The distance table codes 30 possible values, or a little less
- than five bits, flat. The optimum values for speed end up being
- about one bit more than those, so lbits is 8+1 and dbits is 5+1.
- The optimum values may differ though from machine to machine, and
- possibly even between compilers. Your mileage may vary.
- */
-
-
-/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */
-#define BMAX 15 /* maximum bit length of any code */
-#define N_MAX 288 /* maximum number of codes in any set */
-
-#ifdef DEBUG
- uInt inflate_hufts;
-#endif
-
-local int huft_build(b, n, s, d, e, t, m, zs)
-uIntf *b; /* code lengths in bits (all assumed <= BMAX) */
-uInt n; /* number of codes (assumed <= N_MAX) */
-uInt s; /* number of simple-valued codes (0..s-1) */
-const uIntf *d; /* list of base values for non-simple codes */
-const uIntf *e; /* list of extra bits for non-simple codes */
-inflate_huft * FAR *t; /* result: starting table */
-uIntf *m; /* maximum lookup bits, returns actual */
-z_streamp zs; /* for zalloc function */
-/* Given a list of code lengths and a maximum table size, make a set of
- tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR
- if the given code set is incomplete (the tables are still built in this
- case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of
- lengths), or Z_MEM_ERROR if not enough memory. */
-{
-
- uInt a; /* counter for codes of length k */
- uInt c[BMAX+1]; /* bit length count table */
- uInt f; /* i repeats in table every f entries */
- int g; /* maximum code length */
- int h; /* table level */
- register uInt i; /* counter, current code */
- register uInt j; /* counter */
- register int k; /* number of bits in current code */
- int l; /* bits per table (returned in m) */
- register uIntf *p; /* pointer into c[], b[], or v[] */
- inflate_huft *q; /* points to current table */
- struct inflate_huft_s r; /* table entry for structure assignment */
- inflate_huft *u[BMAX]; /* table stack */
- uInt v[N_MAX]; /* values in order of bit length */
- register int w; /* bits before this table == (l * h) */
- uInt x[BMAX+1]; /* bit offsets, then code stack */
- uIntf *xp; /* pointer into x */
- int y; /* number of dummy codes added */
- uInt z; /* number of entries in current table */
-
-
- /* Generate counts for each bit length */
- p = c;
-#define C0 *p++ = 0;
-#define C2 C0 C0 C0 C0
-#define C4 C2 C2 C2 C2
- C4 /* clear c[]--assume BMAX+1 is 16 */
- p = b; i = n;
- do {
- c[*p++]++; /* assume all entries <= BMAX */
- } while (--i);
- if (c[0] == n) /* null input--all zero length codes */
- {
- *t = (inflate_huft *)Z_NULL;
- *m = 0;
- return Z_OK;
- }
-
-
- /* Find minimum and maximum length, bound *m by those */
- l = *m;
- for (j = 1; j <= BMAX; j++)
- if (c[j])
- break;
- k = j; /* minimum code length */
- if ((uInt)l < j)
- l = j;
- for (i = BMAX; i; i--)
- if (c[i])
- break;
- g = i; /* maximum code length */
- if ((uInt)l > i)
- l = i;
- *m = l;
-
-
- /* Adjust last length count to fill out codes, if needed */
- for (y = 1 << j; j < i; j++, y <<= 1)
- if ((y -= c[j]) < 0)
- return Z_DATA_ERROR;
- if ((y -= c[i]) < 0)
- return Z_DATA_ERROR;
- c[i] += y;
-
-
- /* Generate starting offsets into the value table for each length */
- x[1] = j = 0;
- p = c + 1; xp = x + 2;
- while (--i) { /* note that i == g from above */
- *xp++ = (j += *p++);
- }
-
-
- /* Make a table of values in order of bit lengths */
- p = b; i = 0;
- do {
- if ((j = *p++) != 0)
- v[x[j]++] = i;
- } while (++i < n);
- n = x[g]; /* set n to length of v */
-
-
- /* Generate the Huffman codes and for each, make the table entries */
- x[0] = i = 0; /* first Huffman code is zero */
- p = v; /* grab values in bit order */
- h = -1; /* no tables yet--level -1 */
- w = -l; /* bits decoded == (l * h) */
- u[0] = (inflate_huft *)Z_NULL; /* just to keep compilers happy */
- q = (inflate_huft *)Z_NULL; /* ditto */
- z = 0; /* ditto */
-
- /* go through the bit lengths (k already is bits in shortest code) */
- for (; k <= g; k++)
- {
- a = c[k];
- while (a--)
- {
- /* here i is the Huffman code of length k bits for value *p */
- /* make tables up to required level */
- while (k > w + l)
- {
- h++;
- w += l; /* previous table always l bits */
-
- /* compute minimum size table less than or equal to l bits */
- z = g - w;
- z = z > (uInt)l ? l : z; /* table size upper limit */
- if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */
- { /* too few codes for k-w bit table */
- f -= a + 1; /* deduct codes from patterns left */
- xp = c + k;
- if (j < z)
- while (++j < z) /* try smaller tables up to z bits */
- {
- if ((f <<= 1) <= *++xp)
- break; /* enough codes to use up j bits */
- f -= *xp; /* else deduct codes from patterns */
- }
- }
- z = 1 << j; /* table entries for j-bit table */
-
- /* allocate and link in new table */
- if ((q = (inflate_huft *)ZALLOC
- (zs,z + 1,sizeof(inflate_huft))) == Z_NULL)
- {
- if (h)
- inflate_trees_free(u[0], zs);
- return Z_MEM_ERROR; /* not enough memory */
- }
-#ifdef DEBUG
- inflate_hufts += z + 1;
-#endif
- *t = q + 1; /* link to list for huft_free() */
- *(t = &(q->next)) = Z_NULL;
- u[h] = ++q; /* table starts after link */
-
- /* connect to last table, if there is one */
- if (h)
- {
- x[h] = i; /* save pattern for backing up */
- r.bits = (Byte)l; /* bits to dump before this table */
- r.exop = (Byte)j; /* bits in this table */
- r.next = q; /* pointer to this table */
- j = i >> (w - l); /* (get around Turbo C bug) */
- u[h-1][j] = r; /* connect to last table */
- }
- }
-
- /* set up table entry in r */
- r.bits = (Byte)(k - w);
- if (p >= v + n)
- r.exop = 128 + 64; /* out of values--invalid code */
- else if (*p < s)
- {
- r.exop = (Byte)(*p < 256 ? 0 : 32 + 64); /* 256 is end-of-block */
- r.base = *p++; /* simple code is just the value */
- }
- else
- {
- r.exop = (Byte)(e[*p - s] + 16 + 64);/* non-simple--look up in lists */
- r.base = d[*p++ - s];
- }
-
- /* fill code-like entries with r */
- f = 1 << (k - w);
- for (j = i >> w; j < z; j += f)
- q[j] = r;
-
- /* backwards increment the k-bit code i */
- for (j = 1 << (k - 1); i & j; j >>= 1)
- i ^= j;
- i ^= j;
-
- /* backup over finished tables */
- while ((i & ((1 << w) - 1)) != x[h])
- {
- h--; /* don't need to update q */
- w -= l;
- }
- }
- }
-
-
- /* Return Z_BUF_ERROR if we were given an incomplete table */
- return y != 0 && g != 1 ? Z_BUF_ERROR : Z_OK;
-}
-
-
-int inflate_trees_bits(c, bb, tb, z)
-uIntf *c; /* 19 code lengths */
-uIntf *bb; /* bits tree desired/actual depth */
-inflate_huft * FAR *tb; /* bits tree result */
-z_streamp z; /* for zfree function */
-{
- int r;
-
- r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, tb, bb, z);
- if (r == Z_DATA_ERROR)
- z->msg = (char*)"oversubscribed dynamic bit lengths tree";
- else if (r == Z_BUF_ERROR || *bb == 0)
- {
- inflate_trees_free(*tb, z);
- z->msg = (char*)"incomplete dynamic bit lengths tree";
- r = Z_DATA_ERROR;
- }
- return r;
-}
-
-
-int inflate_trees_dynamic(nl, nd, c, bl, bd, tl, td, z)
-uInt nl; /* number of literal/length codes */
-uInt nd; /* number of distance codes */
-uIntf *c; /* that many (total) code lengths */
-uIntf *bl; /* literal desired/actual bit depth */
-uIntf *bd; /* distance desired/actual bit depth */
-inflate_huft * FAR *tl; /* literal/length tree result */
-inflate_huft * FAR *td; /* distance tree result */
-z_streamp z; /* for zfree function */
-{
- int r;
-
- /* build literal/length tree */
- r = huft_build(c, nl, 257, cplens, cplext, tl, bl, z);
- if (r != Z_OK || *bl == 0)
- {
- if (r == Z_DATA_ERROR)
- z->msg = (char*)"oversubscribed literal/length tree";
- else if (r != Z_MEM_ERROR)
- {
- inflate_trees_free(*tl, z);
- z->msg = (char*)"incomplete literal/length tree";
- r = Z_DATA_ERROR;
- }
- return r;
- }
-
- /* build distance tree */
- r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, z);
- if (r != Z_OK || (*bd == 0 && nl > 257))
- {
- if (r == Z_DATA_ERROR)
- z->msg = (char*)"oversubscribed distance tree";
- else if (r == Z_BUF_ERROR) {
-#ifdef PKZIP_BUG_WORKAROUND
- r = Z_OK;
- }
-#else
- inflate_trees_free(*td, z);
- z->msg = (char*)"incomplete distance tree";
- r = Z_DATA_ERROR;
- }
- else if (r != Z_MEM_ERROR)
- {
- z->msg = (char*)"empty distance tree with lengths";
- r = Z_DATA_ERROR;
- }
- inflate_trees_free(*tl, z);
- return r;
-#endif
- }
-
- /* done */
- return Z_OK;
-}
-
-
-/* build fixed tables only once--keep them here */
-local int fixed_built = 0;
-#define FIXEDH 530 /* number of hufts used by fixed tables */
-local inflate_huft fixed_mem[FIXEDH];
-local uInt fixed_bl;
-local uInt fixed_bd;
-local inflate_huft *fixed_tl;
-local inflate_huft *fixed_td;
-
-
-local voidpf falloc(q, n, s)
-voidpf q; /* opaque pointer */
-uInt n; /* number of items */
-uInt s; /* size of item */
-{
- Assert(s == sizeof(inflate_huft) && n <= *(intf *)q,
- "inflate_trees falloc overflow");
- *(intf *)q -= n+s-s; /* s-s to avoid warning */
- return (voidpf)(fixed_mem + *(intf *)q);
-}
-
-
-int inflate_trees_fixed(bl, bd, tl, td)
-uIntf *bl; /* literal desired/actual bit depth */
-uIntf *bd; /* distance desired/actual bit depth */
-inflate_huft * FAR *tl; /* literal/length tree result */
-inflate_huft * FAR *td; /* distance tree result */
-{
- /* build fixed tables if not already (multiple overlapped executions ok) */
- if (!fixed_built)
- {
- int k; /* temporary variable */
- unsigned c[288]; /* length list for huft_build */
- z_stream z; /* for falloc function */
- int f = FIXEDH; /* number of hufts left in fixed_mem */
-
- /* set up fake z_stream for memory routines */
- z.zalloc = falloc;
- z.zfree = Z_NULL;
- z.opaque = (voidpf)&f;
-
- /* literal table */
- for (k = 0; k < 144; k++)
- c[k] = 8;
- for (; k < 256; k++)
- c[k] = 9;
- for (; k < 280; k++)
- c[k] = 7;
- for (; k < 288; k++)
- c[k] = 8;
- fixed_bl = 7;
- huft_build(c, 288, 257, cplens, cplext, &fixed_tl, &fixed_bl, &z);
-
- /* distance table */
- for (k = 0; k < 30; k++)
- c[k] = 5;
- fixed_bd = 5;
- huft_build(c, 30, 0, cpdist, cpdext, &fixed_td, &fixed_bd, &z);
-
- /* done */
- Assert(f == 0, "invalid build of fixed tables");
- fixed_built = 1;
- }
- *bl = fixed_bl;
- *bd = fixed_bd;
- *tl = fixed_tl;
- *td = fixed_td;
- return Z_OK;
-}
-
-
-int inflate_trees_free(t, z)
-inflate_huft *t; /* table to free */
-z_streamp z; /* for zfree function */
-/* Free the malloc'ed tables built by huft_build(), which makes a linked
- list of the tables it made, with the links in a dummy first entry of
- each table. */
-{
- register inflate_huft *p, *q, *r;
-
- /* Reverse linked list */
- p = Z_NULL;
- q = t;
- while (q != Z_NULL)
- {
- r = (q - 1)->next;
- (q - 1)->next = p;
- p = q;
- q = r;
- }
- /* Go through linked list, freeing from the malloced (t[-1]) address. */
- while (p != Z_NULL)
- {
- q = (--p)->next;
- ZFREE(z,p);
- p = q;
- }
- return Z_OK;
-}
diff --git a/lib/libz/inftrees.h b/lib/libz/inftrees.h
deleted file mode 100644
index b06613d..0000000
--- a/lib/libz/inftrees.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* Huffman code lookup table entry--this entry is four bytes for machines
- that have 16-bit pointers (e.g. PC's in the small or medium model). */
-
-typedef struct inflate_huft_s FAR inflate_huft;
-
-struct inflate_huft_s {
- union {
- struct {
- Byte Exop; /* number of extra bits or operation */
- Byte Bits; /* number of bits in this code or subcode */
- } what;
- Bytef *pad; /* pad structure to a power of 2 (4 bytes for */
- } word; /* 16-bit, 8 bytes for 32-bit machines) */
- union {
- uInt Base; /* literal, length base, or distance base */
- inflate_huft *Next; /* pointer to next level of table */
- } more;
-};
-
-#ifdef DEBUG
- extern uInt inflate_hufts;
-#endif
-
-extern int inflate_trees_bits OF((
- uIntf *, /* 19 code lengths */
- uIntf *, /* bits tree desired/actual depth */
- inflate_huft * FAR *, /* bits tree result */
- z_streamp )); /* for zalloc, zfree functions */
-
-extern int inflate_trees_dynamic OF((
- uInt, /* number of literal/length codes */
- uInt, /* number of distance codes */
- uIntf *, /* that many (total) code lengths */
- uIntf *, /* literal desired/actual bit depth */
- uIntf *, /* distance desired/actual bit depth */
- inflate_huft * FAR *, /* literal/length tree result */
- inflate_huft * FAR *, /* distance tree result */
- z_streamp )); /* for zalloc, zfree functions */
-
-extern int inflate_trees_fixed OF((
- uIntf *, /* literal desired/actual bit depth */
- uIntf *, /* distance desired/actual bit depth */
- inflate_huft * FAR *, /* literal/length tree result */
- inflate_huft * FAR *)); /* distance tree result */
-
-extern int inflate_trees_free OF((
- inflate_huft *, /* tables to free */
- z_streamp )); /* for zfree function */
-
diff --git a/lib/libz/infutil.c b/lib/libz/infutil.c
deleted file mode 100644
index eb21199..0000000
--- a/lib/libz/infutil.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* inflate_util.c -- data and routines common to blocks and codes
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "infblock.h"
-#include "inftrees.h"
-#include "infcodes.h"
-#include "infutil.h"
-
-struct inflate_codes_state {int dummy;}; /* for buggy compilers */
-
-/* And'ing with mask[n] masks the lower n bits */
-uInt inflate_mask[17] = {
- 0x0000,
- 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
- 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
-};
-
-
-/* copy as much as possible from the sliding window to the output area */
-int inflate_flush(s, z, r)
-inflate_blocks_statef *s;
-z_streamp z;
-int r;
-{
- uInt n;
- Bytef *p;
- Bytef *q;
-
- /* local copies of source and destination pointers */
- p = z->next_out;
- q = s->read;
-
- /* compute number of bytes to copy as far as end of window */
- n = (uInt)((q <= s->write ? s->write : s->end) - q);
- if (n > z->avail_out) n = z->avail_out;
- if (n && r == Z_BUF_ERROR) r = Z_OK;
-
- /* update counters */
- z->avail_out -= n;
- z->total_out += n;
-
- /* update check information */
- if (s->checkfn != Z_NULL)
- z->adler = s->check = (*s->checkfn)(s->check, q, n);
-
- /* copy as far as end of window */
- zmemcpy(p, q, n);
- p += n;
- q += n;
-
- /* see if more to copy at beginning of window */
- if (q == s->end)
- {
- /* wrap pointers */
- q = s->window;
- if (s->write == s->end)
- s->write = s->window;
-
- /* compute bytes to copy */
- n = (uInt)(s->write - q);
- if (n > z->avail_out) n = z->avail_out;
- if (n && r == Z_BUF_ERROR) r = Z_OK;
-
- /* update counters */
- z->avail_out -= n;
- z->total_out += n;
-
- /* update check information */
- if (s->checkfn != Z_NULL)
- z->adler = s->check = (*s->checkfn)(s->check, q, n);
-
- /* copy */
- zmemcpy(p, q, n);
- p += n;
- q += n;
- }
-
- /* update pointers */
- z->next_out = p;
- s->read = q;
-
- /* done */
- return r;
-}
diff --git a/lib/libz/infutil.h b/lib/libz/infutil.h
deleted file mode 100644
index 702cd29..0000000
--- a/lib/libz/infutil.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* infutil.h -- types and macros common to blocks and codes
- * Copyright (C) 1995-1996 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-#ifndef _INFUTIL_H
-#define _INFUTIL_H
-
-typedef enum {
- TYPE, /* get type bits (3, including end bit) */
- LENS, /* get lengths for stored */
- STORED, /* processing stored block */
- TABLE, /* get table lengths */
- BTREE, /* get bit lengths tree for a dynamic block */
- DTREE, /* get length, distance trees for a dynamic block */
- CODES, /* processing fixed or dynamic block */
- DRY, /* output remaining window bytes */
- DONE, /* finished last block, done */
- BAD} /* got a data error--stuck here */
-inflate_block_mode;
-
-/* inflate blocks semi-private state */
-struct inflate_blocks_state {
-
- /* mode */
- inflate_block_mode mode; /* current inflate_block mode */
-
- /* mode dependent information */
- union {
- uInt left; /* if STORED, bytes left to copy */
- struct {
- uInt table; /* table lengths (14 bits) */
- uInt index; /* index into blens (or border) */
- uIntf *blens; /* bit lengths of codes */
- uInt bb; /* bit length tree depth */
- inflate_huft *tb; /* bit length decoding tree */
- } trees; /* if DTREE, decoding info for trees */
- struct {
- inflate_huft *tl;
- inflate_huft *td; /* trees to free */
- inflate_codes_statef
- *codes;
- } decode; /* if CODES, current state */
- } sub; /* submode */
- uInt last; /* true if this block is the last block */
-
- /* mode independent information */
- uInt bitk; /* bits in bit buffer */
- uLong bitb; /* bit buffer */
- Bytef *window; /* sliding window */
- Bytef *end; /* one byte after sliding window */
- Bytef *read; /* window read pointer */
- Bytef *write; /* window write pointer */
- check_func checkfn; /* check function */
- uLong check; /* check on output */
-
-};
-
-
-/* defines for inflate input/output */
-/* update pointers and return */
-#define UPDBITS {s->bitb=b;s->bitk=k;}
-#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;}
-#define UPDOUT {s->write=q;}
-#define UPDATE {UPDBITS UPDIN UPDOUT}
-#define LEAVE {UPDATE return inflate_flush(s,z,r);}
-/* get bytes and bits */
-#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}
-#define NEEDBYTE {if(n)r=Z_OK;else LEAVE}
-#define NEXTBYTE (n--,*p++)
-#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}
-#define DUMPBITS(j) {b>>=(j);k-=(j);}
-/* output bytes */
-#define WAVAIL (uInt)(q<s->read?s->read-q-1:s->end-q)
-#define LOADOUT {q=s->write;m=(uInt)WAVAIL;}
-#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}
-#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT}
-#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}
-#define OUTBYTE(a) {*q++=(Byte)(a);m--;}
-/* load local pointers */
-#define LOAD {LOADIN LOADOUT}
-
-/* masks for lower bits (size given to avoid silly warnings with Visual C++) */
-extern uInt inflate_mask[17];
-
-/* copy as much as possible from the sliding window to the output area */
-extern int inflate_flush OF((
- inflate_blocks_statef *,
- z_streamp ,
- int));
-
-struct internal_state {int dummy;}; /* for buggy compilers */
-
-#endif
diff --git a/lib/libz/minigzip.c b/lib/libz/minigzip.c
deleted file mode 100644
index 9548ab8..0000000
--- a/lib/libz/minigzip.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/* minigzip.c -- simulate gzip using the zlib compression library
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * minigzip is a minimal implementation of the gzip utility. This is
- * only an example of using zlib and isn't meant to replace the
- * full-featured gzip. No attempt is made to deal with file systems
- * limiting names to 14 or 8+3 characters, etc... Error checking is
- * very limited. So use minigzip only for testing; use gzip for the
- * real thing. On MSDOS, use only on file names without extension
- * or in pipe mode.
- */
-
-/* $FreeBSD$ */
-
-#include <stdio.h>
-#include "zlib.h"
-
-#ifdef STDC
-# include <string.h>
-# include <stdlib.h>
-#else
- extern void exit OF((int));
-#endif
-
-
-#if defined(MSDOS) || defined(OS2) || defined(WIN32)
-# include <fcntl.h>
-# include <io.h>
-# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
-#else
-# define SET_BINARY_MODE(file)
-#endif
-
-#ifdef VMS
-# define unlink delete
-# define GZ_SUFFIX "-gz"
-#endif
-#ifdef RISCOS
-# define unlink remove
-# define GZ_SUFFIX "-gz"
-# define fileno(file) file->__file
-#endif
-
-#ifndef GZ_SUFFIX
-# define GZ_SUFFIX ".gz"
-#endif
-#define SUFFIX_LEN sizeof(GZ_SUFFIX)
-
-extern int unlink OF((const char *));
-
-#define BUFLEN 4096
-#define MAX_NAME_LEN 1024
-
-#define local static
-/* For MSDOS and other systems with limitation on stack size. For Unix,
- #define local
- works also.
- */
-
-char *prog;
-
-void error OF((const char *msg));
-void gz_compress OF((FILE *in, gzFile out));
-void gz_uncompress OF((gzFile in, FILE *out));
-void file_compress OF((char *file));
-void file_uncompress OF((char *file));
-int main OF((int argc, char *argv[]));
-
-/* ===========================================================================
- * Display error message and exit
- */
-void error(msg)
- const char *msg;
-{
- fprintf(stderr, "%s: %s\n", prog, msg);
- exit(1);
-}
-
-/* ===========================================================================
- * Compress input to output then close both files.
- */
-void gz_compress(in, out)
- FILE *in;
- gzFile out;
-{
- local char buf[BUFLEN];
- int len;
- int err;
-
- for (;;) {
- len = fread(buf, 1, sizeof(buf), in);
- if (ferror(in)) {
- perror("fread");
- exit(1);
- }
- if (len == 0) break;
-
- if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err));
- }
- fclose(in);
- if (gzclose(out) != Z_OK) error("failed gzclose");
-}
-
-/* ===========================================================================
- * Uncompress input to output then close both files.
- */
-void gz_uncompress(in, out)
- gzFile in;
- FILE *out;
-{
- local char buf[BUFLEN];
- int len;
- int err;
-
- for (;;) {
- len = gzread(in, buf, sizeof(buf));
- if (len < 0) error (gzerror(in, &err));
- if (len == 0) break;
-
- if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
- error("failed fwrite");
- }
- }
- if (fclose(out)) error("failed fclose");
-
- if (gzclose(in) != Z_OK) error("failed gzclose");
-}
-
-
-/* ===========================================================================
- * Compress the given file: create a corresponding .gz file and remove the
- * original.
- */
-void file_compress(file)
- char *file;
-{
- local char outfile[MAX_NAME_LEN];
- FILE *in;
- gzFile out;
-
- strcpy(outfile, file);
- strcat(outfile, GZ_SUFFIX);
-
- in = fopen(file, "rb");
- if (in == NULL) {
- perror(file);
- exit(1);
- }
- out = gzopen(outfile, "wb"); /* use "wb9" for maximal compression */
- if (out == NULL) {
- fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile);
- exit(1);
- }
- gz_compress(in, out);
-
- unlink(file);
-}
-
-
-/* ===========================================================================
- * Uncompress the given file and remove the original.
- */
-void file_uncompress(file)
- char *file;
-{
- local char buf[MAX_NAME_LEN];
- char *infile, *outfile;
- FILE *out;
- gzFile in;
- int len = strlen(file);
-
- strcpy(buf, file);
-
- if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) {
- infile = file;
- outfile = buf;
- outfile[len-3] = '\0';
- } else {
- outfile = file;
- infile = buf;
- strcat(infile, GZ_SUFFIX);
- }
- in = gzopen(infile, "rb");
- if (in == NULL) {
- fprintf(stderr, "%s: can't gzopen %s\n", prog, infile);
- exit(1);
- }
- out = fopen(outfile, "wb");
- if (out == NULL) {
- perror(file);
- exit(1);
- }
-
- gz_uncompress(in, out);
-
- unlink(infile);
-}
-
-
-/* ===========================================================================
- * Usage: minigzip [-d] [files...]
- */
-
-int main(argc, argv)
- int argc;
- char *argv[];
-{
- int uncompr = 0;
- gzFile file;
-
- prog = argv[0];
- argc--, argv++;
-
- if (argc > 0) {
- uncompr = (strcmp(*argv, "-d") == 0);
- if (uncompr) {
- argc--, argv++;
- }
- }
- if (argc == 0) {
- SET_BINARY_MODE(stdin);
- SET_BINARY_MODE(stdout);
- if (uncompr) {
- file = gzdopen(fileno(stdin), "rb");
- if (file == NULL) error("can't gzdopen stdin");
- gz_uncompress(file, stdout);
- } else {
- file = gzdopen(fileno(stdout), "wb"); /* "wb9" for max compr. */
- if (file == NULL) error("can't gzdopen stdout");
- gz_compress(stdin, file);
- }
- } else {
- do {
- if (uncompr) {
- file_uncompress(*argv);
- } else {
- file_compress(*argv);
- }
- } while (argv++, --argc);
- }
- exit(0);
- return 0; /* to avoid warning */
-}
diff --git a/lib/libz/trees.c b/lib/libz/trees.c
deleted file mode 100644
index a5a8173..0000000
--- a/lib/libz/trees.c
+++ /dev/null
@@ -1,1141 +0,0 @@
-/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-1996 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * ALGORITHM
- *
- * The "deflation" process uses several Huffman trees. The more
- * common source values are represented by shorter bit sequences.
- *
- * Each code tree is stored in a compressed form which is itself
- * a Huffman encoding of the lengths of all the code strings (in
- * ascending order by source values). The actual code strings are
- * reconstructed from the lengths in the inflate process, as described
- * in the deflate specification.
- *
- * REFERENCES
- *
- * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
- * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
- *
- * Storer, James A.
- * Data Compression: Methods and Theory, pp. 49-50.
- * Computer Science Press, 1988. ISBN 0-7167-8156-5.
- *
- * Sedgewick, R.
- * Algorithms, p290.
- * Addison-Wesley, 1983. ISBN 0-201-06672-6.
- */
-
-/* $FreeBSD$ */
-
-#include "deflate.h"
-
-#ifdef DEBUG
-# include <ctype.h>
-#endif
-
-/* ===========================================================================
- * Constants
- */
-
-#define MAX_BL_BITS 7
-/* Bit length codes must not exceed MAX_BL_BITS bits */
-
-#define END_BLOCK 256
-/* end of block literal code */
-
-#define REP_3_6 16
-/* repeat previous bit length 3-6 times (2 bits of repeat count) */
-
-#define REPZ_3_10 17
-/* repeat a zero length 3-10 times (3 bits of repeat count) */
-
-#define REPZ_11_138 18
-/* repeat a zero length 11-138 times (7 bits of repeat count) */
-
-local int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
- = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
-
-local int extra_dbits[D_CODES] /* extra bits for each distance code */
- = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-
-local int extra_blbits[BL_CODES]/* extra bits for each bit length code */
- = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
-
-local uch bl_order[BL_CODES]
- = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
-/* The lengths of the bit length codes are sent in order of decreasing
- * probability, to avoid transmitting the lengths for unused bit length codes.
- */
-
-#define Buf_size (8 * 2*sizeof(char))
-/* Number of bits used within bi_buf. (bi_buf might be implemented on
- * more than 16 bits on some systems.)
- */
-
-/* ===========================================================================
- * Local data. These are initialized only once.
- */
-
-local ct_data static_ltree[L_CODES+2];
-/* The static literal tree. Since the bit lengths are imposed, there is no
- * need for the L_CODES extra codes used during heap construction. However
- * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
- * below).
- */
-
-local ct_data static_dtree[D_CODES];
-/* The static distance tree. (Actually a trivial tree since all codes use
- * 5 bits.)
- */
-
-local uch dist_code[512];
-/* distance codes. The first 256 values correspond to the distances
- * 3 .. 258, the last 256 values correspond to the top 8 bits of
- * the 15 bit distances.
- */
-
-local uch length_code[MAX_MATCH-MIN_MATCH+1];
-/* length code for each normalized match length (0 == MIN_MATCH) */
-
-local int base_length[LENGTH_CODES];
-/* First normalized length for each code (0 = MIN_MATCH) */
-
-local int base_dist[D_CODES];
-/* First normalized distance for each code (0 = distance of 1) */
-
-struct static_tree_desc_s {
- ct_data *static_tree; /* static tree or NULL */
- intf *extra_bits; /* extra bits for each code or NULL */
- int extra_base; /* base index for extra_bits */
- int elems; /* max number of elements in the tree */
- int max_length; /* max bit length for the codes */
-};
-
-local static_tree_desc static_l_desc =
-{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
-
-local static_tree_desc static_d_desc =
-{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
-
-local static_tree_desc static_bl_desc =
-{(ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
-
-/* ===========================================================================
- * Local (static) routines in this file.
- */
-
-local void tr_static_init OF((void));
-local void init_block OF((deflate_state *s));
-local void pqdownheap OF((deflate_state *s, ct_data *tree, int k));
-local void gen_bitlen OF((deflate_state *s, tree_desc *desc));
-local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count));
-local void build_tree OF((deflate_state *s, tree_desc *desc));
-local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code));
-local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
-local int build_bl_tree OF((deflate_state *s));
-local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
- int blcodes));
-local void compress_block OF((deflate_state *s, ct_data *ltree,
- ct_data *dtree));
-local void set_data_type OF((deflate_state *s));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup OF((deflate_state *s));
-local void bi_flush OF((deflate_state *s));
-local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
- int header));
-
-#ifndef DEBUG
-# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
- /* Send a code of the given tree. c and tree must not have side effects */
-
-#else /* DEBUG */
-# define send_code(s, c, tree) \
- { if (verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
- send_bits(s, tree[c].Code, tree[c].Len); }
-#endif
-
-#define d_code(dist) \
- ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)])
-/* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. dist_code[256] and dist_code[257] are never
- * used.
- */
-
-/* ===========================================================================
- * Output a short LSB first on the stream.
- * IN assertion: there is enough room in pendingBuf.
- */
-#define put_short(s, w) { \
- put_byte(s, (uch)((w) & 0xff)); \
- put_byte(s, (uch)((ush)(w) >> 8)); \
-}
-
-/* ===========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
-#ifdef DEBUG
-local void send_bits OF((deflate_state *s, int value, int length));
-
-local void send_bits(s, value, length)
- deflate_state *s;
- int value; /* value to send */
- int length; /* number of bits */
-{
- Tracevv((stderr," l %2d v %4x ", length, value));
- Assert(length > 0 && length <= 15, "invalid length");
- s->bits_sent += (ulg)length;
-
- /* If not enough room in bi_buf, use (valid) bits from bi_buf and
- * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
- * unused bits in value.
- */
- if (s->bi_valid > (int)Buf_size - length) {
- s->bi_buf |= (value << s->bi_valid);
- put_short(s, s->bi_buf);
- s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
- s->bi_valid += length - Buf_size;
- } else {
- s->bi_buf |= value << s->bi_valid;
- s->bi_valid += length;
- }
-}
-#else /* !DEBUG */
-
-#define send_bits(s, value, length) \
-{ int len = length;\
- if (s->bi_valid > (int)Buf_size - len) {\
- int val = value;\
- s->bi_buf |= (val << s->bi_valid);\
- put_short(s, s->bi_buf);\
- s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
- s->bi_valid += len - Buf_size;\
- } else {\
- s->bi_buf |= (value) << s->bi_valid;\
- s->bi_valid += len;\
- }\
-}
-#endif /* DEBUG */
-
-
-#define MAX(a,b) (a >= b ? a : b)
-/* the arguments must not have side effects */
-
-/* ===========================================================================
- * Initialize the various 'constant' tables. In a multi-threaded environment,
- * this function may be called by two threads concurrently, but this is
- * harmless since both invocations do exactly the same thing.
- */
-local void tr_static_init()
-{
- static int static_init_done = 0;
- int n; /* iterates over tree elements */
- int bits; /* bit counter */
- int length; /* length value */
- int code; /* code value */
- int dist; /* distance index */
- ush bl_count[MAX_BITS+1];
- /* number of codes at each bit length for an optimal tree */
-
- if (static_init_done) return;
-
- /* Initialize the mapping length (0..255) -> length code (0..28) */
- length = 0;
- for (code = 0; code < LENGTH_CODES-1; code++) {
- base_length[code] = length;
- for (n = 0; n < (1<<extra_lbits[code]); n++) {
- length_code[length++] = (uch)code;
- }
- }
- Assert (length == 256, "tr_static_init: length != 256");
- /* Note that the length 255 (match length 258) can be represented
- * in two different ways: code 284 + 5 bits or code 285, so we
- * overwrite length_code[255] to use the best encoding:
- */
- length_code[length-1] = (uch)code;
-
- /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
- dist = 0;
- for (code = 0 ; code < 16; code++) {
- base_dist[code] = dist;
- for (n = 0; n < (1<<extra_dbits[code]); n++) {
- dist_code[dist++] = (uch)code;
- }
- }
- Assert (dist == 256, "tr_static_init: dist != 256");
- dist >>= 7; /* from now on, all distances are divided by 128 */
- for ( ; code < D_CODES; code++) {
- base_dist[code] = dist << 7;
- for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
- dist_code[256 + dist++] = (uch)code;
- }
- }
- Assert (dist == 256, "tr_static_init: 256+dist != 512");
-
- /* Construct the codes of the static literal tree */
- for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
- n = 0;
- while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
- while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
- while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
- while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
- /* Codes 286 and 287 do not exist, but we must include them in the
- * tree construction to get a canonical Huffman tree (longest code
- * all ones)
- */
- gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
-
- /* The static distance tree is trivial: */
- for (n = 0; n < D_CODES; n++) {
- static_dtree[n].Len = 5;
- static_dtree[n].Code = bi_reverse((unsigned)n, 5);
- }
- static_init_done = 1;
-}
-
-/* ===========================================================================
- * Initialize the tree data structures for a new zlib stream.
- */
-void _tr_init(s)
- deflate_state *s;
-{
- tr_static_init();
-
- s->compressed_len = 0L;
-
- s->l_desc.dyn_tree = s->dyn_ltree;
- s->l_desc.stat_desc = &static_l_desc;
-
- s->d_desc.dyn_tree = s->dyn_dtree;
- s->d_desc.stat_desc = &static_d_desc;
-
- s->bl_desc.dyn_tree = s->bl_tree;
- s->bl_desc.stat_desc = &static_bl_desc;
-
- s->bi_buf = 0;
- s->bi_valid = 0;
- s->last_eob_len = 8; /* enough lookahead for inflate */
-#ifdef DEBUG
- s->bits_sent = 0L;
-#endif
-
- /* Initialize the first block of the first file: */
- init_block(s);
-}
-
-/* ===========================================================================
- * Initialize a new block.
- */
-local void init_block(s)
- deflate_state *s;
-{
- int n; /* iterates over tree elements */
-
- /* Initialize the trees. */
- for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0;
- for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0;
- for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
-
- s->dyn_ltree[END_BLOCK].Freq = 1;
- s->opt_len = s->static_len = 0L;
- s->last_lit = s->matches = 0;
-}
-
-#define SMALLEST 1
-/* Index within the heap array of least frequent node in the Huffman tree */
-
-
-/* ===========================================================================
- * Remove the smallest element from the heap and recreate the heap with
- * one less element. Updates heap and heap_len.
- */
-#define pqremove(s, tree, top) \
-{\
- top = s->heap[SMALLEST]; \
- s->heap[SMALLEST] = s->heap[s->heap_len--]; \
- pqdownheap(s, tree, SMALLEST); \
-}
-
-/* ===========================================================================
- * Compares to subtrees, using the tree depth as tie breaker when
- * the subtrees have equal frequency. This minimizes the worst case length.
- */
-#define smaller(tree, n, m, depth) \
- (tree[n].Freq < tree[m].Freq || \
- (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
-
-/* ===========================================================================
- * Restore the heap property by moving down the tree starting at node k,
- * exchanging a node with the smallest of its two sons if necessary, stopping
- * when the heap property is re-established (each father smaller than its
- * two sons).
- */
-local void pqdownheap(s, tree, k)
- deflate_state *s;
- ct_data *tree; /* the tree to restore */
- int k; /* node to move down */
-{
- int v = s->heap[k];
- int j = k << 1; /* left son of k */
- while (j <= s->heap_len) {
- /* Set j to the smallest of the two sons: */
- if (j < s->heap_len &&
- smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
- j++;
- }
- /* Exit if v is smaller than both sons */
- if (smaller(tree, v, s->heap[j], s->depth)) break;
-
- /* Exchange v with the smallest son */
- s->heap[k] = s->heap[j]; k = j;
-
- /* And continue down the tree, setting j to the left son of k */
- j <<= 1;
- }
- s->heap[k] = v;
-}
-
-/* ===========================================================================
- * Compute the optimal bit lengths for a tree and update the total bit length
- * for the current block.
- * IN assertion: the fields freq and dad are set, heap[heap_max] and
- * above are the tree nodes sorted by increasing frequency.
- * OUT assertions: the field len is set to the optimal bit length, the
- * array bl_count contains the frequencies for each bit length.
- * The length opt_len is updated; static_len is also updated if stree is
- * not null.
- */
-local void gen_bitlen(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
-{
- ct_data *tree = desc->dyn_tree;
- int max_code = desc->max_code;
- ct_data *stree = desc->stat_desc->static_tree;
- intf *extra = desc->stat_desc->extra_bits;
- int base = desc->stat_desc->extra_base;
- int max_length = desc->stat_desc->max_length;
- int h; /* heap index */
- int n, m; /* iterate over the tree elements */
- int bits; /* bit length */
- int xbits; /* extra bits */
- ush f; /* frequency */
- int overflow = 0; /* number of elements with bit length too large */
-
- for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
-
- /* In a first pass, compute the optimal bit lengths (which may
- * overflow in the case of the bit length tree).
- */
- tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
-
- for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
- n = s->heap[h];
- bits = tree[tree[n].Dad].Len + 1;
- if (bits > max_length) bits = max_length, overflow++;
- tree[n].Len = (ush)bits;
- /* We overwrite tree[n].Dad which is no longer needed */
-
- if (n > max_code) continue; /* not a leaf node */
-
- s->bl_count[bits]++;
- xbits = 0;
- if (n >= base) xbits = extra[n-base];
- f = tree[n].Freq;
- s->opt_len += (ulg)f * (bits + xbits);
- if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
- }
- if (overflow == 0) return;
-
- Trace((stderr,"\nbit length overflow\n"));
- /* This happens for example on obj2 and pic of the Calgary corpus */
-
- /* Find the first bit length which could increase: */
- do {
- bits = max_length-1;
- while (s->bl_count[bits] == 0) bits--;
- s->bl_count[bits]--; /* move one leaf down the tree */
- s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
- s->bl_count[max_length]--;
- /* The brother of the overflow item also moves one step up,
- * but this does not affect bl_count[max_length]
- */
- overflow -= 2;
- } while (overflow > 0);
-
- /* Now recompute all bit lengths, scanning in increasing frequency.
- * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
- * lengths instead of fixing only the wrong ones. This idea is taken
- * from 'ar' written by Haruhiko Okumura.)
- */
- for (bits = max_length; bits != 0; bits--) {
- n = s->bl_count[bits];
- while (n != 0) {
- m = s->heap[--h];
- if (m > max_code) continue;
- if (tree[m].Len != (unsigned) bits) {
- Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
- s->opt_len += ((long)bits - (long)tree[m].Len)
- *(long)tree[m].Freq;
- tree[m].Len = (ush)bits;
- }
- n--;
- }
- }
-}
-
-/* ===========================================================================
- * Generate the codes for a given tree and bit counts (which need not be
- * optimal).
- * IN assertion: the array bl_count contains the bit length statistics for
- * the given tree and the field len is set for all tree elements.
- * OUT assertion: the field code is set for all tree elements of non
- * zero code length.
- */
-local void gen_codes (tree, max_code, bl_count)
- ct_data *tree; /* the tree to decorate */
- int max_code; /* largest code with non zero frequency */
- ushf *bl_count; /* number of codes at each bit length */
-{
- ush next_code[MAX_BITS+1]; /* next code value for each bit length */
- ush code = 0; /* running code value */
- int bits; /* bit index */
- int n; /* code index */
-
- /* The distribution counts are first used to generate the code values
- * without bit reversal.
- */
- for (bits = 1; bits <= MAX_BITS; bits++) {
- next_code[bits] = code = (code + bl_count[bits-1]) << 1;
- }
- /* Check that the bit counts in bl_count are consistent. The last code
- * must be all ones.
- */
- Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
- "inconsistent bit counts");
- Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
- for (n = 0; n <= max_code; n++) {
- int len = tree[n].Len;
- if (len == 0) continue;
- /* Now reverse the bits */
- tree[n].Code = bi_reverse(next_code[len]++, len);
-
- Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
- n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
- }
-}
-
-/* ===========================================================================
- * Construct one Huffman tree and assigns the code bit strings and lengths.
- * Update the total bit length for the current block.
- * IN assertion: the field freq is set for all tree elements.
- * OUT assertions: the fields len and code are set to the optimal bit length
- * and corresponding code. The length opt_len is updated; static_len is
- * also updated if stree is not null. The field max_code is set.
- */
-local void build_tree(s, desc)
- deflate_state *s;
- tree_desc *desc; /* the tree descriptor */
-{
- ct_data *tree = desc->dyn_tree;
- ct_data *stree = desc->stat_desc->static_tree;
- int elems = desc->stat_desc->elems;
- int n, m; /* iterate over heap elements */
- int max_code = -1; /* largest code with non zero frequency */
- int node; /* new node being created */
-
- /* Construct the initial heap, with least frequent element in
- * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
- * heap[0] is not used.
- */
- s->heap_len = 0, s->heap_max = HEAP_SIZE;
-
- for (n = 0; n < elems; n++) {
- if (tree[n].Freq != 0) {
- s->heap[++(s->heap_len)] = max_code = n;
- s->depth[n] = 0;
- } else {
- tree[n].Len = 0;
- }
- }
-
- /* The pkzip format requires that at least one distance code exists,
- * and that at least one bit should be sent even if there is only one
- * possible code. So to avoid special checks later on we force at least
- * two codes of non zero frequency.
- */
- while (s->heap_len < 2) {
- node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
- tree[node].Freq = 1;
- s->depth[node] = 0;
- s->opt_len--; if (stree) s->static_len -= stree[node].Len;
- /* node is 0 or 1 so it does not have extra bits */
- }
- desc->max_code = max_code;
-
- /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
- * establish sub-heaps of increasing lengths:
- */
- for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
-
- /* Construct the Huffman tree by repeatedly combining the least two
- * frequent nodes.
- */
- node = elems; /* next internal node of the tree */
- do {
- pqremove(s, tree, n); /* n = node of least frequency */
- m = s->heap[SMALLEST]; /* m = node of next least frequency */
-
- s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
- s->heap[--(s->heap_max)] = m;
-
- /* Create a new node father of n and m */
- tree[node].Freq = tree[n].Freq + tree[m].Freq;
- s->depth[node] = (uch) (MAX(s->depth[n], s->depth[m]) + 1);
- tree[n].Dad = tree[m].Dad = (ush)node;
-#ifdef DUMP_BL_TREE
- if (tree == s->bl_tree) {
- fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
- node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
- }
-#endif
- /* and insert the new node in the heap */
- s->heap[SMALLEST] = node++;
- pqdownheap(s, tree, SMALLEST);
-
- } while (s->heap_len >= 2);
-
- s->heap[--(s->heap_max)] = s->heap[SMALLEST];
-
- /* At this point, the fields freq and dad are set. We can now
- * generate the bit lengths.
- */
- gen_bitlen(s, (tree_desc *)desc);
-
- /* The field len is now set, we can generate the bit codes */
- gen_codes ((ct_data *)tree, max_code, s->bl_count);
-}
-
-/* ===========================================================================
- * Scan a literal or distance tree to determine the frequencies of the codes
- * in the bit length tree.
- */
-local void scan_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
-{
- int n; /* iterates over all tree elements */
- int prevlen = -1; /* last emitted length */
- int curlen; /* length of current code */
- int nextlen = tree[0].Len; /* length of next code */
- int count = 0; /* repeat count of the current code */
- int max_count = 7; /* max repeat count */
- int min_count = 4; /* min repeat count */
-
- if (nextlen == 0) max_count = 138, min_count = 3;
- tree[max_code+1].Len = (ush)0xffff; /* guard */
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen; nextlen = tree[n+1].Len;
- if (++count < max_count && curlen == nextlen) {
- continue;
- } else if (count < min_count) {
- s->bl_tree[curlen].Freq += count;
- } else if (curlen != 0) {
- if (curlen != prevlen) s->bl_tree[curlen].Freq++;
- s->bl_tree[REP_3_6].Freq++;
- } else if (count <= 10) {
- s->bl_tree[REPZ_3_10].Freq++;
- } else {
- s->bl_tree[REPZ_11_138].Freq++;
- }
- count = 0; prevlen = curlen;
- if (nextlen == 0) {
- max_count = 138, min_count = 3;
- } else if (curlen == nextlen) {
- max_count = 6, min_count = 3;
- } else {
- max_count = 7, min_count = 4;
- }
- }
-}
-
-/* ===========================================================================
- * Send a literal or distance tree in compressed form, using the codes in
- * bl_tree.
- */
-local void send_tree (s, tree, max_code)
- deflate_state *s;
- ct_data *tree; /* the tree to be scanned */
- int max_code; /* and its largest code of non zero frequency */
-{
- int n; /* iterates over all tree elements */
- int prevlen = -1; /* last emitted length */
- int curlen; /* length of current code */
- int nextlen = tree[0].Len; /* length of next code */
- int count = 0; /* repeat count of the current code */
- int max_count = 7; /* max repeat count */
- int min_count = 4; /* min repeat count */
-
- /* tree[max_code+1].Len = -1; */ /* guard already set */
- if (nextlen == 0) max_count = 138, min_count = 3;
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen; nextlen = tree[n+1].Len;
- if (++count < max_count && curlen == nextlen) {
- continue;
- } else if (count < min_count) {
- do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
-
- } else if (curlen != 0) {
- if (curlen != prevlen) {
- send_code(s, curlen, s->bl_tree); count--;
- }
- Assert(count >= 3 && count <= 6, " 3_6?");
- send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
-
- } else if (count <= 10) {
- send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
-
- } else {
- send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
- }
- count = 0; prevlen = curlen;
- if (nextlen == 0) {
- max_count = 138, min_count = 3;
- } else if (curlen == nextlen) {
- max_count = 6, min_count = 3;
- } else {
- max_count = 7, min_count = 4;
- }
- }
-}
-
-/* ===========================================================================
- * Construct the Huffman tree for the bit lengths and return the index in
- * bl_order of the last bit length code to send.
- */
-local int build_bl_tree(s)
- deflate_state *s;
-{
- int max_blindex; /* index of last bit length code of non zero freq */
-
- /* Determine the bit length frequencies for literal and distance trees */
- scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
- scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
-
- /* Build the bit length tree: */
- build_tree(s, (tree_desc *)(&(s->bl_desc)));
- /* opt_len now includes the length of the tree representations, except
- * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
- */
-
- /* Determine the number of bit length codes to send. The pkzip format
- * requires that at least 4 bit length codes be sent. (appnote.txt says
- * 3 but the actual value used is 4.)
- */
- for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
- if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
- }
- /* Update opt_len to include the bit length tree and counts */
- s->opt_len += 3*(max_blindex+1) + 5+5+4;
- Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
- s->opt_len, s->static_len));
-
- return max_blindex;
-}
-
-/* ===========================================================================
- * Send the header for a block using dynamic Huffman trees: the counts, the
- * lengths of the bit length codes, the literal tree and the distance tree.
- * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
- */
-local void send_all_trees(s, lcodes, dcodes, blcodes)
- deflate_state *s;
- int lcodes, dcodes, blcodes; /* number of codes for each tree */
-{
- int rank; /* index in bl_order */
-
- Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
- Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
- "too many codes");
- Tracev((stderr, "\nbl counts: "));
- send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
- send_bits(s, dcodes-1, 5);
- send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */
- for (rank = 0; rank < blcodes; rank++) {
- Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
- send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
- }
- Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
-
- send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
- Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
-
- send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
- Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
-}
-
-/* ===========================================================================
- * Send a stored block
- */
-void _tr_stored_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
-{
- send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
- s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
- s->compressed_len += (stored_len + 4) << 3;
-
- copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
-}
-
-/* ===========================================================================
- * Send one empty static block to give enough lookahead for inflate.
- * This takes 10 bits, of which 7 may remain in the bit buffer.
- * The current inflate code requires 9 bits of lookahead. If the
- * last two codes for the previous block (real code plus EOB) were coded
- * on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
- * the last real code. In this case we send two empty static blocks instead
- * of one. (There are no problems if the previous block is stored or fixed.)
- * To simplify the code, we assume the worst case of last real code encoded
- * on one bit only.
- */
-void _tr_align(s)
- deflate_state *s;
-{
- send_bits(s, STATIC_TREES<<1, 3);
- send_code(s, END_BLOCK, static_ltree);
- s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
- bi_flush(s);
- /* Of the 10 bits for the empty block, we have already sent
- * (10 - bi_valid) bits. The lookahead for the last real code (before
- * the EOB of the previous block) was thus at least one plus the length
- * of the EOB plus what we have just sent of the empty static block.
- */
- if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
- send_bits(s, STATIC_TREES<<1, 3);
- send_code(s, END_BLOCK, static_ltree);
- s->compressed_len += 10L;
- bi_flush(s);
- }
- s->last_eob_len = 7;
-}
-
-/* ===========================================================================
- * Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file. This function
- * returns the total compressed length for the file so far.
- */
-ulg _tr_flush_block(s, buf, stored_len, eof)
- deflate_state *s;
- charf *buf; /* input block, or NULL if too old */
- ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
-{
- ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
- int max_blindex = 0; /* index of last bit length code of non zero freq */
-
- /* Build the Huffman trees unless a stored block is forced */
- if (s->level > 0) {
-
- /* Check if the file is ascii or binary */
- if (s->data_type == Z_UNKNOWN) set_data_type(s);
-
- /* Construct the literal and distance trees */
- build_tree(s, (tree_desc *)(&(s->l_desc)));
- Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
- s->static_len));
-
- build_tree(s, (tree_desc *)(&(s->d_desc)));
- Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
- s->static_len));
- /* At this point, opt_len and static_len are the total bit lengths of
- * the compressed block data, excluding the tree representations.
- */
-
- /* Build the bit length tree for the above two trees, and get the index
- * in bl_order of the last bit length code to send.
- */
- max_blindex = build_bl_tree(s);
-
- /* Determine the best encoding. Compute first the block length in bytes*/
- opt_lenb = (s->opt_len+3+7)>>3;
- static_lenb = (s->static_len+3+7)>>3;
-
- Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
- opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
- s->last_lit));
-
- if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
-
- } else {
- Assert(buf != (char*)0, "lost buf");
- opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
- }
-
- /* If compression failed and this is the first and last block,
- * and if the .zip file can be seeked (to rewrite the local header),
- * the whole file is transformed into a stored file:
- */
-#ifdef STORED_FILE_OK
-# ifdef FORCE_STORED_FILE
- if (eof && s->compressed_len == 0L) { /* force stored file */
-# else
- if (stored_len <= opt_lenb && eof && s->compressed_len==0L && seekable()) {
-# endif
- /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */
- if (buf == (charf*)0) error ("block vanished");
-
- copy_block(buf, (unsigned)stored_len, 0); /* without header */
- s->compressed_len = stored_len << 3;
- s->method = STORED;
- } else
-#endif /* STORED_FILE_OK */
-
-#ifdef FORCE_STORED
- if (buf != (char*)0) { /* force stored block */
-#else
- if (stored_len+4 <= opt_lenb && buf != (char*)0) {
- /* 4: two words for the lengths */
-#endif
- /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
- * Otherwise we can't have processed more than WSIZE input bytes since
- * the last block flush, because compression would have been
- * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
- * transform a block into a stored block.
- */
- _tr_stored_block(s, buf, stored_len, eof);
-
-#ifdef FORCE_STATIC
- } else if (static_lenb >= 0) { /* force static trees */
-#else
- } else if (static_lenb == opt_lenb) {
-#endif
- send_bits(s, (STATIC_TREES<<1)+eof, 3);
- compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
- s->compressed_len += 3 + s->static_len;
- } else {
- send_bits(s, (DYN_TREES<<1)+eof, 3);
- send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
- max_blindex+1);
- compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
- s->compressed_len += 3 + s->opt_len;
- }
- Assert (s->compressed_len == s->bits_sent, "bad compressed size");
- init_block(s);
-
- if (eof) {
- bi_windup(s);
- s->compressed_len += 7; /* align on byte boundary */
- }
- Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
- s->compressed_len-7*eof));
-
- return s->compressed_len >> 3;
-}
-
-/* ===========================================================================
- * Save the match info and tally the frequency counts. Return true if
- * the current block must be flushed.
- */
-int _tr_tally (s, dist, lc)
- deflate_state *s;
- unsigned dist; /* distance of matched string */
- unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
-{
- s->d_buf[s->last_lit] = (ush)dist;
- s->l_buf[s->last_lit++] = (uch)lc;
- if (dist == 0) {
- /* lc is the unmatched char */
- s->dyn_ltree[lc].Freq++;
- } else {
- s->matches++;
- /* Here, lc is the match length - MIN_MATCH */
- dist--; /* dist = match distance - 1 */
- Assert((ush)dist < (ush)MAX_DIST(s) &&
- (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
- (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
-
- s->dyn_ltree[length_code[lc]+LITERALS+1].Freq++;
- s->dyn_dtree[d_code(dist)].Freq++;
- }
-
- /* Try to guess if it is profitable to stop the current block here */
- if (s->level > 2 && (s->last_lit & 0xfff) == 0) {
- /* Compute an upper bound for the compressed length */
- ulg out_length = (ulg)s->last_lit*8L;
- ulg in_length = (ulg)((long)s->strstart - s->block_start);
- int dcode;
- for (dcode = 0; dcode < D_CODES; dcode++) {
- out_length += (ulg)s->dyn_dtree[dcode].Freq *
- (5L+extra_dbits[dcode]);
- }
- out_length >>= 3;
- Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
- s->last_lit, in_length, out_length,
- 100L - out_length*100L/in_length));
- if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
- }
- return (s->last_lit == s->lit_bufsize-1);
- /* We avoid equality with lit_bufsize because of wraparound at 64K
- * on 16 bit machines and because stored blocks are restricted to
- * 64K-1 bytes.
- */
-}
-
-/* ===========================================================================
- * Send the block data compressed using the given Huffman trees
- */
-local void compress_block(s, ltree, dtree)
- deflate_state *s;
- ct_data *ltree; /* literal tree */
- ct_data *dtree; /* distance tree */
-{
- unsigned dist; /* distance of matched string */
- int lc; /* match length or unmatched char (if dist == 0) */
- unsigned lx = 0; /* running index in l_buf */
- unsigned code; /* the code to send */
- int extra; /* number of extra bits to send */
-
- if (s->last_lit != 0) do {
- dist = s->d_buf[lx];
- lc = s->l_buf[lx++];
- if (dist == 0) {
- send_code(s, lc, ltree); /* send a literal byte */
- Tracecv(isgraph(lc), (stderr," '%c' ", lc));
- } else {
- /* Here, lc is the match length - MIN_MATCH */
- code = length_code[lc];
- send_code(s, code+LITERALS+1, ltree); /* send the length code */
- extra = extra_lbits[code];
- if (extra != 0) {
- lc -= base_length[code];
- send_bits(s, lc, extra); /* send the extra length bits */
- }
- dist--; /* dist is now the match distance - 1 */
- code = d_code(dist);
- Assert (code < D_CODES, "bad d_code");
-
- send_code(s, code, dtree); /* send the distance code */
- extra = extra_dbits[code];
- if (extra != 0) {
- dist -= base_dist[code];
- send_bits(s, dist, extra); /* send the extra distance bits */
- }
- } /* literal or match pair ? */
-
- /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
- Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow");
-
- } while (lx < s->last_lit);
-
- send_code(s, END_BLOCK, ltree);
- s->last_eob_len = ltree[END_BLOCK].Len;
-}
-
-/* ===========================================================================
- * Set the data type to ASCII or BINARY, using a crude approximation:
- * binary if more than 20% of the bytes are <= 6 or >= 128, ascii otherwise.
- * IN assertion: the fields freq of dyn_ltree are set and the total of all
- * frequencies does not exceed 64K (to fit in an int on 16 bit machines).
- */
-local void set_data_type(s)
- deflate_state *s;
-{
- int n = 0;
- unsigned ascii_freq = 0;
- unsigned bin_freq = 0;
- while (n < 7) bin_freq += s->dyn_ltree[n++].Freq;
- while (n < 128) ascii_freq += s->dyn_ltree[n++].Freq;
- while (n < LITERALS) bin_freq += s->dyn_ltree[n++].Freq;
- s->data_type = (Byte)(bin_freq > (ascii_freq >> 2) ? Z_BINARY : Z_ASCII);
-}
-
-/* ===========================================================================
- * Reverse the first len bits of a code, using straightforward code (a faster
- * method would use a table)
- * IN assertion: 1 <= len <= 15
- */
-local unsigned bi_reverse(code, len)
- unsigned code; /* the value to invert */
- int len; /* its bit length */
-{
- register unsigned res = 0;
- do {
- res |= code & 1;
- code >>= 1, res <<= 1;
- } while (--len > 0);
- return res >> 1;
-}
-
-/* ===========================================================================
- * Flush the bit buffer, keeping at most 7 bits in it.
- */
-local void bi_flush(s)
- deflate_state *s;
-{
- if (s->bi_valid == 16) {
- put_short(s, s->bi_buf);
- s->bi_buf = 0;
- s->bi_valid = 0;
- } else if (s->bi_valid >= 8) {
- put_byte(s, (Byte)s->bi_buf);
- s->bi_buf >>= 8;
- s->bi_valid -= 8;
- }
-}
-
-/* ===========================================================================
- * Flush the bit buffer and align the output on a byte boundary
- */
-local void bi_windup(s)
- deflate_state *s;
-{
- if (s->bi_valid > 8) {
- put_short(s, s->bi_buf);
- } else if (s->bi_valid > 0) {
- put_byte(s, (Byte)s->bi_buf);
- }
- s->bi_buf = 0;
- s->bi_valid = 0;
-#ifdef DEBUG
- s->bits_sent = (s->bits_sent+7) & ~7;
-#endif
-}
-
-/* ===========================================================================
- * Copy a stored block, storing first the length and its
- * one's complement if requested.
- */
-local void copy_block(s, buf, len, header)
- deflate_state *s;
- charf *buf; /* the input data */
- unsigned len; /* its length */
- int header; /* true if block header must be written */
-{
- bi_windup(s); /* align on byte boundary */
- s->last_eob_len = 8; /* enough lookahead for inflate */
-
- if (header) {
- put_short(s, (ush)len);
- put_short(s, (ush)~len);
-#ifdef DEBUG
- s->bits_sent += 2*16;
-#endif
- }
-#ifdef DEBUG
- s->bits_sent += (ulg)len<<3;
-#endif
- while (len--) {
- put_byte(s, *buf++);
- }
-}
diff --git a/lib/libz/uncompr.c b/lib/libz/uncompr.c
deleted file mode 100644
index 06cd6a8..0000000
--- a/lib/libz/uncompr.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* $FreeBSD$ */
-
-#include "zlib.h"
-
-/* ===========================================================================
- Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
-
- uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-int uncompress (dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
- uLong sourceLen;
-{
- z_stream stream;
- int err;
-
- stream.next_in = (Bytef*)source;
- stream.avail_in = (uInt)sourceLen;
- /* Check for source > 64K on 16-bit machine: */
- if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-
- stream.next_out = dest;
- stream.avail_out = (uInt)*destLen;
- if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
- stream.zalloc = (alloc_func)0;
- stream.zfree = (free_func)0;
-
- err = inflateInit(&stream);
- if (err != Z_OK) return err;
-
- err = inflate(&stream, Z_FINISH);
- if (err != Z_STREAM_END) {
- inflateEnd(&stream);
- return err;
- }
- *destLen = stream.total_out;
-
- err = inflateEnd(&stream);
- return err;
-}
diff --git a/lib/libz/zconf.h b/lib/libz/zconf.h
deleted file mode 100644
index 858e0a0..0000000
--- a/lib/libz/zconf.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* $FreeBSD$ */
-
-#ifndef _ZCONF_H
-#define _ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-# define deflateInit_ z_deflateInit_
-# define deflate z_deflate
-# define deflateEnd z_deflateEnd
-# define inflateInit_ z_inflateInit_
-# define inflate z_inflate
-# define inflateEnd z_inflateEnd
-# define deflateInit2_ z_deflateInit2_
-# define deflateSetDictionary z_deflateSetDictionary
-# define deflateCopy z_deflateCopy
-# define deflateReset z_deflateReset
-# define deflateParams z_deflateParams
-# define inflateInit2_ z_inflateInit2_
-# define inflateSetDictionary z_inflateSetDictionary
-# define inflateSync z_inflateSync
-# define inflateReset z_inflateReset
-# define compress z_compress
-# define uncompress z_uncompress
-# define adler32 z_adler32
-# define crc32 z_crc32
-# define get_crc_table z_get_crc_table
-
-# define Byte z_Byte
-# define uInt z_uInt
-# define uLong z_uLong
-# define Bytef z_Bytef
-# define charf z_charf
-# define intf z_intf
-# define uIntf z_uIntf
-# define uLongf z_uLongf
-# define voidpf z_voidpf
-# define voidp z_voidp
-#endif
-
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
-# define WIN32
-#endif
-#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
-# ifndef __32BIT__
-# define __32BIT__
-# endif
-#endif
-#if defined(__MSDOS__) && !defined(MSDOS)
-# define MSDOS
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#if defined(MSDOS) && !defined(__32BIT__)
-# define MAXSEG_64K
-#endif
-#ifdef MSDOS
-# define UNALIGNED_OK
-#endif
-
-#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32)) && !defined(STDC)
-# define STDC
-#endif
-#if (defined(__STDC__) || defined(__cplusplus)) && !defined(STDC)
-# define STDC
-#endif
-
-#ifndef STDC
-# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-# define const
-# endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
-# define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-# ifdef MAXSEG_64K
-# define MAX_MEM_LEVEL 8
-# else
-# define MAX_MEM_LEVEL 9
-# endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2 */
-#ifndef MAX_WBITS
-# define MAX_WBITS 15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
- 1 << (windowBits+2) + 1 << (memLevel+9)
- that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
- make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
- The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
- /* Type declarations */
-
-#ifndef OF /* function prototypes */
-# ifdef STDC
-# define OF(args) args
-# else
-# define OF(args) ()
-# endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
- /* MSC small or medium model */
-# define SMALL_MEDIUM
-# ifdef _MSC_VER
-# define FAR __far
-# else
-# define FAR far
-# endif
-#endif
-#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
-# ifndef __32BIT__
-# define SMALL_MEDIUM
-# define FAR __far
-# endif
-#endif
-#ifndef FAR
-# define FAR
-#endif
-
-typedef unsigned char Byte; /* 8 bits */
-typedef unsigned int uInt; /* 16 bits or more */
-typedef unsigned long uLong; /* 32 bits or more */
-
-#if defined(__BORLANDC__) && defined(SMALL_MEDIUM)
- /* Borland C/C++ ignores FAR inside typedef */
-# define Bytef Byte FAR
-#else
- typedef Byte FAR Bytef;
-#endif
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
- typedef void FAR *voidpf;
- typedef void *voidp;
-#else
- typedef Byte FAR *voidpf;
- typedef Byte *voidp;
-#endif
-
-
-/* Compile with -DZLIB_DLL for Windows DLL support */
-#if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL)
-# include <windows.h>
-# define EXPORT WINAPI
-#else
-# define EXPORT
-#endif
-
-#endif /* _ZCONF_H */
diff --git a/lib/libz/zlib.h b/lib/libz/zlib.h
deleted file mode 100644
index 337fe9f..0000000
--- a/lib/libz/zlib.h
+++ /dev/null
@@ -1,780 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.0.4, Jul 24th, 1996.
-
- Copyright (C) 1995-1996 Jean-loup Gailly and Mark Adler
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Jean-loup Gailly Mark Adler
- gzip@prep.ai.mit.edu madler@alumni.caltech.edu
-
-
- The data format used by the zlib library is described by RFCs (Request for
- Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
- (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef _ZLIB_H
-#define _ZLIB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "zconf.h"
-
-#define ZLIB_VERSION "1.0.4"
-
-/*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
- data. This version of the library supports only one compression method
- (deflation) but other algorithms may be added later and will have the same
- stream interface.
-
- For compression the application must provide the output buffer and
- may optionally provide the input buffer for optimization. For decompression,
- the application must provide the input buffer and may optionally provide
- the output buffer for optimization.
-
- Compression can be done in a single step if the buffers are large
- enough (for example if an input file is mmap'ed), or can be done by
- repeated calls of the compression function. In the latter case, the
- application must provide more input and/or consume the output
- (providing more output space) before each call.
-
- The library does not install any signal handler. It is recommended to
- add at least a handler for SIGSEGV when decompressing; the library checks
- the consistency of the input data whenever possible but may go nuts
- for some forms of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void (*free_func) OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
- Bytef *next_in; /* next input byte */
- uInt avail_in; /* number of bytes available at next_in */
- uLong total_in; /* total nb of input bytes read so far */
-
- Bytef *next_out; /* next output byte should be put there */
- uInt avail_out; /* remaining free space at next_out */
- uLong total_out; /* total nb of bytes output so far */
-
- char *msg; /* last error message, NULL if no error */
- struct internal_state FAR *state; /* not visible by applications */
-
- alloc_func zalloc; /* used to allocate the internal state */
- free_func zfree; /* used to free the internal state */
- voidpf opaque; /* private data object passed to zalloc and zfree */
-
- int data_type; /* best guess about the data type: ascii or binary */
- uLong adler; /* adler32 value of the uncompressed data */
- uLong reserved; /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
- The application must update next_in and avail_in when avail_in has
- dropped to zero. It must update next_out and avail_out when avail_out
- has dropped to zero. The application must initialize zalloc, zfree and
- opaque before calling the init function. All other fields are set by the
- compression library and must not be updated by the application.
-
- The opaque value provided by the application will be passed as the first
- parameter for calls of zalloc and zfree. This can be useful for custom
- memory management. The compression library attaches no meaning to the
- opaque value.
-
- zalloc must return Z_NULL if there is not enough memory for the object.
- On 16-bit systems, the functions zalloc and zfree must be able to allocate
- exactly 65536 bytes, but will not be required to allocate more than this
- if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
- pointers returned by zalloc for objects of exactly 65536 bytes *must*
- have their offset normalized to zero. The default allocation function
- provided by this library ensures this (see zutil.c). To reduce memory
- requirements and avoid any allocation of 64K objects, at the expense of
- compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
- The fields total_in and total_out can be used for statistics or
- progress reports. After compression, total_in holds the total size of
- the uncompressed data and may be saved for use in the decompressor
- (particularly if the decompressor wants to decompress everything in
- a single step).
-*/
-
- /* constants */
-
-#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1
-#define Z_SYNC_FLUSH 2
-#define Z_FULL_FLUSH 3
-#define Z_FINISH 4
-/* Allowed flush values; see deflate() below for details */
-
-#define Z_OK 0
-#define Z_STREAM_END 1
-#define Z_NEED_DICT 2
-#define Z_ERRNO (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR (-3)
-#define Z_MEM_ERROR (-4)
-#define Z_BUF_ERROR (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION 0
-#define Z_BEST_SPEED 1
-#define Z_BEST_COMPRESSION 9
-#define Z_DEFAULT_COMPRESSION (-1)
-/* compression levels */
-
-#define Z_FILTERED 1
-#define Z_HUFFMAN_ONLY 2
-#define Z_DEFAULT_STRATEGY 0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY 0
-#define Z_ASCII 1
-#define Z_UNKNOWN 2
-/* Possible values of the data_type field */
-
-#define Z_DEFLATED 8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
- /* basic functions */
-
-extern const char * EXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
- If the first character differs, the library code actually used is
- not compatible with the zlib.h header file used by the application.
- This check is automatically made by deflateInit and inflateInit.
- */
-
-/*
-extern int EXPORT deflateInit OF((z_streamp strm, int level));
-
- Initializes the internal stream state for compression. The fields
- zalloc, zfree and opaque must be initialized before by the caller.
- If zalloc and zfree are set to Z_NULL, deflateInit updates them to
- use default allocation functions.
-
- The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
- 1 gives best speed, 9 gives best compression, 0 gives no compression at
- all (the input data is simply copied a block at a time).
- Z_DEFAULT_COMPRESSION requests a default compromise between speed and
- compression (currently equivalent to level 6).
-
- deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if level is not a valid compression level,
- Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
- with the version assumed by the caller (ZLIB_VERSION).
- msg is set to null if there is no error message. deflateInit does not
- perform any compression: this will be done by deflate().
-*/
-
-
-extern int EXPORT deflate OF((z_streamp strm, int flush));
-/*
- Performs one or both of the following actions:
-
- - Compress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in and avail_in are updated and
- processing will resume at this point for the next call of deflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. This action is forced if the parameter flush is non zero.
- Forcing flush frequently degrades the compression ratio, so this parameter
- should be set only when necessary (in interactive applications).
- Some output may be provided even if flush is not set.
-
- Before the call of deflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating avail_in or avail_out accordingly; avail_out
- should never be zero before the call. The application can consume the
- compressed output when it wants, for example when the output buffer is full
- (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
- and with zero avail_out, it must be called again after making room in the
- output buffer because there might be more output pending.
-
- If the parameter flush is set to Z_PARTIAL_FLUSH, the current compression
- block is terminated and flushed to the output buffer so that the
- decompressor can get all input data available so far. For method 9, a future
- variant on method 8, the current block will be flushed but not terminated.
- Z_SYNC_FLUSH has the same effect as partial flush except that the compressed
- output is byte aligned (the compressor can clear its internal bit buffer)
- and the current block is always terminated; this can be useful if the
- compressor has to be restarted from scratch after an interruption (in which
- case the internal state of the compressor may be lost).
- If flush is set to Z_FULL_FLUSH, the compression block is terminated, a
- special marker is output and the compression dictionary is discarded; this
- is useful to allow the decompressor to synchronize if one compressed block
- has been damaged (see inflateSync below). Flushing degrades compression and
- so should be used only when necessary. Using Z_FULL_FLUSH too often can
- seriously degrade the compression. If deflate returns with avail_out == 0,
- this function must be called again with the same value of the flush
- parameter and more output space (updated avail_out), until the flush is
- complete (deflate returns with non-zero avail_out).
-
- If the parameter flush is set to Z_FINISH, pending input is processed,
- pending output is flushed and deflate returns with Z_STREAM_END if there
- was enough output space; if deflate returns with Z_OK, this function must be
- called again with Z_FINISH and more output space (updated avail_out) but no
- more input data, until it returns with Z_STREAM_END or an error. After
- deflate has returned Z_STREAM_END, the only possible operations on the
- stream are deflateReset or deflateEnd.
-
- Z_FINISH can be used immediately after deflateInit if all the compression
- is to be done in a single step. In this case, avail_out must be at least
- 0.1% larger than avail_in plus 12 bytes. If deflate does not return
- Z_STREAM_END, then it must be called again as described above.
-
- deflate() may update data_type if it can make a good guess about
- the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered
- binary. This field is only for information purposes and does not affect
- the compression algorithm in any manner.
-
- deflate() returns Z_OK if some progress has been made (more input
- processed or more output produced), Z_STREAM_END if all input has been
- consumed and all output has been produced (only when flush is set to
- Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
- if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible.
-*/
-
-
-extern int EXPORT deflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
- stream state was inconsistent, Z_DATA_ERROR if the stream was freed
- prematurely (some input or output was discarded). In the error case,
- msg may be set but then points to a static string (which must not be
- deallocated).
-*/
-
-
-/*
-extern int EXPORT inflateInit OF((z_streamp strm));
-
- Initializes the internal stream state for decompression. The fields
- zalloc, zfree and opaque must be initialized before by the caller. If
- zalloc and zfree are set to Z_NULL, inflateInit updates them to use default
- allocation functions.
-
- inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_VERSION_ERROR if the zlib library version is incompatible
- with the version assumed by the caller. msg is set to null if there is no
- error message. inflateInit does not perform any decompression: this will be
- done by inflate().
-*/
-
-
-extern int EXPORT inflate OF((z_streamp strm, int flush));
-/*
- Performs one or both of the following actions:
-
- - Decompress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing
- will resume at this point for the next call of inflate().
-
- - Provide more output starting at next_out and update next_out and avail_out
- accordingly. inflate() provides as much output as possible, until there
- is no more input data or no more space in the output buffer (see below
- about the flush parameter).
-
- Before the call of inflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating the next_* and avail_* values accordingly.
- The application can consume the uncompressed output when it wants, for
- example when the output buffer is full (avail_out == 0), or after each
- call of inflate(). If inflate returns Z_OK and with zero avail_out, it
- must be called again after making room in the output buffer because there
- might be more output pending.
-
- If the parameter flush is set to Z_PARTIAL_FLUSH, inflate flushes as much
- output as possible to the output buffer. The flushing behavior of inflate is
- not specified for values of the flush parameter other than Z_PARTIAL_FLUSH
- and Z_FINISH, but the current implementation actually flushes as much output
- as possible anyway.
-
- inflate() should normally be called until it returns Z_STREAM_END or an
- error. However if all decompression is to be performed in a single step
- (a single call of inflate), the parameter flush should be set to
- Z_FINISH. In this case all pending input is processed and all pending
- output is flushed; avail_out must be large enough to hold all the
- uncompressed data. (The size of the uncompressed data may have been saved
- by the compressor for this purpose.) The next operation on this stream must
- be inflateEnd to deallocate the decompression state. The use of Z_FINISH
- is never required, but can be used to inform inflate that a faster routine
- may be used for the single inflate() call.
-
- inflate() returns Z_OK if some progress has been made (more input
- processed or more output produced), Z_STREAM_END if the end of the
- compressed data has been reached and all uncompressed output has been
- produced, Z_NEED_DICT if a preset dictionary is needed at this point (see
- inflateSetDictionary below), Z_DATA_ERROR if the input data was corrupted,
- Z_STREAM_ERROR if the stream structure was inconsistent (for example if
- next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
- Z_BUF_ERROR if no progress is possible or if there was not enough room in
- the output buffer when Z_FINISH is used. In the Z_DATA_ERROR case, the
- application may then call inflateSync to look for a good compression block.
- In the Z_NEED_DICT case, strm->adler is set to the Adler32 value of the
- dictionary chosen by the compressor.
-*/
-
-
-extern int EXPORT inflateEnd OF((z_streamp strm));
-/*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
-
- inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
- static string (which must not be deallocated).
-*/
-
- /* Advanced functions */
-
-/*
- The following functions are needed only in some special applications.
-*/
-
-/*
-extern int EXPORT deflateInit2 OF((z_streamp strm,
- int level,
- int method,
- int windowBits,
- int memLevel,
- int strategy));
-
- This is another version of deflateInit with more compression options. The
- fields next_in, zalloc, zfree and opaque must be initialized before by
- the caller.
-
- The method parameter is the compression method. It must be Z_DEFLATED in
- this version of the library. (Method 9 will allow a 64K history buffer and
- partial block flushes.)
-
- The windowBits parameter is the base two logarithm of the window size
- (the size of the history buffer). It should be in the range 8..15 for this
- version of the library (the value 16 will be allowed for method 9). Larger
- values of this parameter result in better compression at the expense of
- memory usage. The default value is 15 if deflateInit is used instead.
-
- The memLevel parameter specifies how much memory should be allocated
- for the internal compression state. memLevel=1 uses minimum memory but
- is slow and reduces compression ratio; memLevel=9 uses maximum memory
- for optimal speed. The default value is 8. See zconf.h for total memory
- usage as a function of windowBits and memLevel.
-
- The strategy parameter is used to tune the compression algorithm. Use the
- value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
- filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
- string match). Filtered data consists mostly of small values with a
- somewhat random distribution. In this case, the compression algorithm is
- tuned to compress them better. The effect of Z_FILTERED is to force more
- Huffman coding and less string matching; it is somewhat intermediate
- between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
- the compression ratio but not the correctness of the compressed output even
- if it is not set appropriately.
-
- If next_in is not null, the library will use this buffer to hold also
- some history information; the buffer must either hold the entire input
- data, or have at least 1<<(windowBits+1) bytes and be writable. If next_in
- is null, the library will allocate its own history buffer (and leave next_in
- null). next_out need not be provided here but must be provided by the
- application for the next call of deflate().
-
- If the history buffer is provided by the application, next_in must
- must never be changed by the application since the compressor maintains
- information inside this buffer from call to call; the application
- must provide more input only by increasing avail_in. next_in is always
- reset by the library in this case.
-
- deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was
- not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as
- an invalid method). msg is set to null if there is no error message.
- deflateInit2 does not perform any compression: this will be done by
- deflate().
-*/
-
-extern int EXPORT deflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
-/*
- Initializes the compression dictionary (history buffer) from the given
- byte sequence without producing any compressed output. This function must
- be called immediately after deflateInit or deflateInit2, before any call
- of deflate. The compressor and decompressor must use exactly the same
- dictionary (see inflateSetDictionary).
- The dictionary should consist of strings (byte sequences) that are likely
- to be encountered later in the data to be compressed, with the most commonly
- used strings preferably put towards the end of the dictionary. Using a
- dictionary is most useful when the data to be compressed is short and
- can be predicted with good accuracy; the data can then be compressed better
- than with the default empty dictionary. In this version of the library,
- only the last 32K bytes of the dictionary are used.
- Upon return of this function, strm->adler is set to the Adler32 value
- of the dictionary; the decompressor may later use this value to determine
- which dictionary has been used by the compressor. (The Adler32 value
- applies to the whole dictionary even if only a subset of the dictionary is
- actually used by the compressor.)
-
- deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state
- is inconsistent (for example if deflate has already been called for this
- stream). deflateSetDictionary does not perform any compression: this will
- be done by deflate().
-*/
-
-extern int EXPORT deflateCopy OF((z_streamp dest,
- z_streamp source));
-/*
- Sets the destination stream as a complete copy of the source stream. If
- the source stream is using an application-supplied history buffer, a new
- buffer is allocated for the destination stream. The compressed output
- buffer is always application-supplied. It's the responsibility of the
- application to provide the correct values of next_out and avail_out for the
- next call of deflate.
-
- This function can be useful when several compression strategies will be
- tried, for example when there are several ways of pre-processing the input
- data with a filter. The streams that will be discarded should then be freed
- by calling deflateEnd. Note that deflateCopy duplicates the internal
- compression state which can be quite large, so this strategy is slow and
- can consume lots of memory.
-
- deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
- destination.
-*/
-
-extern int EXPORT deflateReset OF((z_streamp strm));
-/*
- This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state.
- The stream will keep the same compression level and any other attributes
- that may have been set by deflateInit2.
-
- deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-extern int EXPORT deflateParams OF((z_streamp strm, int level, int strategy));
-/*
- Dynamically update the compression level and compression strategy.
- This can be used to switch between compression and straight copy of
- the input data, or to switch to a different kind of input data requiring
- a different strategy. If the compression level is changed, the input
- available so far is compressed with the old level (and may be flushed);
- the new level will take effect only at the next call of deflate().
-
- Before the call of deflateParams, the stream state must be set as for
- a call of deflate(), since the currently available input may have to
- be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
- deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
- stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
- if strm->avail_out was zero.
-*/
-
-/*
-extern int EXPORT inflateInit2 OF((z_streamp strm,
- int windowBits));
-
- This is another version of inflateInit with more compression options. The
- fields next_out, zalloc, zfree and opaque must be initialized before by
- the caller.
-
- The windowBits parameter is the base two logarithm of the maximum window
- size (the size of the history buffer). It should be in the range 8..15 for
- this version of the library (the value 16 will be allowed soon). The
- default value is 15 if inflateInit is used instead. If a compressed stream
- with a larger window size is given as input, inflate() will return with
- the error code Z_DATA_ERROR instead of trying to allocate a larger window.
-
- If next_out is not null, the library will use this buffer for the history
- buffer; the buffer must either be large enough to hold the entire output
- data, or have at least 1<<windowBits bytes. If next_out is null, the
- library will allocate its own buffer (and leave next_out null). next_in
- need not be provided here but must be provided by the application for the
- next call of inflate().
-
- If the history buffer is provided by the application, next_out must
- never be changed by the application since the decompressor maintains
- history information inside this buffer from call to call; the application
- can only reset next_out to the beginning of the history buffer when
- avail_out is zero and all output has been consumed.
-
- inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was
- not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as
- windowBits < 8). msg is set to null if there is no error message.
- inflateInit2 does not perform any decompression: this will be done by
- inflate().
-*/
-
-extern int EXPORT inflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
-/*
- Initializes the decompression dictionary (history buffer) from the given
- uncompressed byte sequence. This function must be called immediately after
- a call of inflate if this call returned Z_NEED_DICT. The dictionary chosen
- by the compressor can be determined from the Adler32 value returned by this
- call of inflate. The compressor and decompressor must use exactly the same
- dictionary (see deflateSetDictionary).
-
- inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
- inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
- expected one (incorrect Adler32 value). inflateSetDictionary does not
- perform any decompression: this will be done by subsequent calls of
- inflate().
-*/
-
-extern int EXPORT inflateSync OF((z_streamp strm));
-/*
- Skips invalid compressed data until the special marker (see deflate()
- above) can be found, or until all available input is skipped. No output
- is provided.
-
- inflateSync returns Z_OK if the special marker has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no marker has been found,
- or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
- case, the application may save the current current value of total_in which
- indicates where valid compressed data was found. In the error case, the
- application may repeatedly call inflateSync, providing more input each time,
- until success or end of the input data.
-*/
-
-extern int EXPORT inflateReset OF((z_streamp strm));
-/*
- This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
- The stream will keep attributes that may have been set by inflateInit2.
-
- inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-
- /* utility functions */
-
-/*
- The following utility functions are implemented on top of the
- basic stream-oriented functions. To simplify the interface, some
- default options are assumed (compression level, window size,
- standard memory allocation functions). The source code of these
- utility functions can easily be modified if you need special options.
-*/
-
-extern int EXPORT compress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
-/*
- Compresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be at least 0.1% larger than
- sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
- compressed buffer.
- This function can be used to compress a whole file at once if the
- input file is mmap'ed.
- compress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer.
-*/
-
-extern int EXPORT uncompress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
-/*
- Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
-
- uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-
-
-typedef voidp gzFile;
-
-extern gzFile EXPORT gzopen OF((const char *path, const char *mode));
-/*
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb") but can also include a compression level
- ("wb9"). gzopen can be used to read a file which is not in gzip format;
- in this case gzread will directly read from the file without decompression.
- gzopen returns NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR).
-*/
-
-extern gzFile EXPORT gzdopen OF((int fd, const char *mode));
-/*
- gzdopen() associates a gzFile with the file descriptor fd. File
- descriptors are obtained from calls like open, dup, creat, pipe or
- fileno (in the file has been previously opened with fopen).
- The mode parameter is as in gzopen.
- The next call of gzclose on the returned gzFile will also close the
- file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
- descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
- gzdopen returns NULL if there was insufficient memory to allocate
- the (de)compression state.
-*/
-
-extern int EXPORT gzread OF((gzFile file, voidp buf, unsigned len));
-/*
- Reads the given number of uncompressed bytes from the compressed file.
- If the input file was not in gzip format, gzread copies the given number
- of bytes into the buffer.
- gzread returns the number of uncompressed bytes actually read (0 for
- end of file, -1 for error). */
-
-extern int EXPORT gzwrite OF((gzFile file, const voidp buf, unsigned len));
-/*
- Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of uncompressed bytes actually written
- (0 in case of error).
-*/
-
-extern int EXPORT gzflush OF((gzFile file, int flush));
-/*
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function. The return value is the zlib
- error number (see function gzerror below). gzflush returns Z_OK if
- the flush parameter is Z_FINISH and all output could be flushed.
- gzflush should be called only when strictly necessary because it can
- degrade compression.
-*/
-
-extern int EXPORT gzclose OF((gzFile file));
-/*
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state. The return value is the zlib
- error number (see function gzerror below).
-*/
-
-extern const char * EXPORT gzerror OF((gzFile file, int *errnum));
-/*
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
- error occurred in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
-*/
-
- /* checksum functions */
-
-/*
- These functions are not related to compression but are exported
- anyway because they might be useful in applications using the
- compression library.
-*/
-
-extern uLong EXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-
-/*
- Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns
- the required initial value for the checksum.
- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
- much faster. Usage example:
-
- uLong adler = adler32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- adler = adler32(adler, buffer, length);
- }
- if (adler != original_adler) error();
-*/
-
-extern uLong EXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
-/*
- Update a running crc with the bytes buf[0..len-1] and return the updated
- crc. If buf is NULL, this function returns the required initial value
- for the crc. Pre- and post-conditioning (one's complement) is performed
- within this function so it shouldn't be done by the application.
- Usage example:
-
- uLong crc = crc32(0L, Z_NULL, 0);
-
- while (read_buffer(buffer, length) != EOF) {
- crc = crc32(crc, buffer, length);
- }
- if (crc != original_crc) error();
-*/
-
-
- /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-extern int EXPORT deflateInit_ OF((z_streamp strm, int level,
- const char *version, int stream_size));
-extern int EXPORT inflateInit_ OF((z_streamp strm,
- const char *version, int stream_size));
-extern int EXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
- int windowBits, int memLevel, int strategy,
- const char *version, int stream_size));
-extern int EXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
- const char *version, int stream_size));
-#define deflateInit(strm, level) \
- deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
- inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
- deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
- (strategy), ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-
-#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
- struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-uLongf *get_crc_table OF((void)); /* can be used by asm versions of crc32() */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ZLIB_H */
diff --git a/lib/libz/zutil.c b/lib/libz/zutil.c
deleted file mode 100644
index 5858792..0000000
--- a/lib/libz/zutil.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* $FreeBSD$ */
-
-#include <stdio.h>
-
-#include "zutil.h"
-
-struct internal_state {int dummy;}; /* for buggy compilers */
-
-#ifndef STDC
-extern void exit OF((int));
-#endif
-
-const char *z_errmsg[10] = {
-"need dictionary", /* Z_NEED_DICT 2 */
-"stream end", /* Z_STREAM_END 1 */
-"", /* Z_OK 0 */
-"file error", /* Z_ERRNO (-1) */
-"stream error", /* Z_STREAM_ERROR (-2) */
-"data error", /* Z_DATA_ERROR (-3) */
-"insufficient memory", /* Z_MEM_ERROR (-4) */
-"buffer error", /* Z_BUF_ERROR (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
-
-
-const char *zlibVersion()
-{
- return ZLIB_VERSION;
-}
-
-#ifdef DEBUG
-void z_error (m)
- char *m;
-{
- fprintf(stderr, "%s\n", m);
- exit(1);
-}
-#endif
-
-#ifndef HAVE_MEMCPY
-
-void zmemcpy(dest, source, len)
- Bytef* dest;
- Bytef* source;
- uInt len;
-{
- if (len == 0) return;
- do {
- *dest++ = *source++; /* ??? to be unrolled */
- } while (--len != 0);
-}
-
-int zmemcmp(s1, s2, len)
- Bytef* s1;
- Bytef* s2;
- uInt len;
-{
- uInt j;
-
- for (j = 0; j < len; j++) {
- if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
- }
- return 0;
-}
-
-void zmemzero(dest, len)
- Bytef* dest;
- uInt len;
-{
- if (len == 0) return;
- do {
- *dest++ = 0; /* ??? to be unrolled */
- } while (--len != 0);
-}
-#endif
-
-#ifdef __TURBOC__
-#if (defined( __BORLANDC__) || !defined(SMALL_MEDIUM)) && !defined(__32BIT__)
-/* Small and medium model in Turbo C are for now limited to near allocation
- * with reduced MAX_WBITS and MAX_MEM_LEVEL
- */
-# define MY_ZCALLOC
-
-/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
- * and farmalloc(64K) returns a pointer with an offset of 8, so we
- * must fix the pointer. Warning: the pointer must be put back to its
- * original form in order to free it, use zcfree().
- */
-
-#define MAX_PTR 10
-/* 10*64K = 640K */
-
-local int next_ptr = 0;
-
-typedef struct ptr_table_s {
- voidpf org_ptr;
- voidpf new_ptr;
-} ptr_table;
-
-local ptr_table table[MAX_PTR];
-/* This table is used to remember the original form of pointers
- * to large buffers (64K). Such pointers are normalized with a zero offset.
- * Since MSDOS is not a preemptive multitasking OS, this table is not
- * protected from concurrent access. This hack doesn't work anyway on
- * a protected system like OS/2. Use Microsoft C instead.
- */
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
- voidpf buf = opaque; /* just to make some compilers happy */
- ulg bsize = (ulg)items*size;
-
- /* If we allocate less than 65520 bytes, we assume that farmalloc
- * will return a usable pointer which doesn't have to be normalized.
- */
- if (bsize < 65520L) {
- buf = farmalloc(bsize);
- if (*(ush*)&buf != 0) return buf;
- } else {
- buf = farmalloc(bsize + 16L);
- }
- if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
- table[next_ptr].org_ptr = buf;
-
- /* Normalize the pointer to seg:0 */
- *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
- *(ush*)&buf = 0;
- table[next_ptr++].new_ptr = buf;
- return buf;
-}
-
-void zcfree (voidpf opaque, voidpf ptr)
-{
- int n;
- if (*(ush*)&ptr != 0) { /* object < 64K */
- farfree(ptr);
- return;
- }
- /* Find the original pointer */
- for (n = 0; n < next_ptr; n++) {
- if (ptr != table[n].new_ptr) continue;
-
- farfree(table[n].org_ptr);
- while (++n < next_ptr) {
- table[n-1] = table[n];
- }
- next_ptr--;
- return;
- }
- ptr = opaque; /* just to make some compilers happy */
- Assert(0, "zcfree: ptr not found");
-}
-#endif
-#endif /* __TURBOC__ */
-
-
-#if defined(M_I86) && !defined(__32BIT__)
-/* Microsoft C in 16-bit mode */
-
-# define MY_ZCALLOC
-
-#if (!defined(_MSC_VER) || (_MSC_VER < 600))
-# define _halloc halloc
-# define _hfree hfree
-#endif
-
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
- if (opaque) opaque = 0; /* to make compiler happy */
- return _halloc((long)items, size);
-}
-
-void zcfree (voidpf opaque, voidpf ptr)
-{
- if (opaque) opaque = 0; /* to make compiler happy */
- _hfree(ptr);
-}
-
-#endif /* MSC */
-
-
-#ifndef MY_ZCALLOC /* Any system without a special alloc function */
-
-#ifndef STDC
-extern voidp calloc OF((uInt items, uInt size));
-extern void free OF((voidpf ptr));
-#endif
-
-voidpf zcalloc (opaque, items, size)
- voidpf opaque;
- unsigned items;
- unsigned size;
-{
- if (opaque) items += size - size; /* make compiler happy */
- return (voidpf)calloc(items, size);
-}
-
-void zcfree (opaque, ptr)
- voidpf opaque;
- voidpf ptr;
-{
- free(ptr);
- if (opaque) return; /* make compiler happy */
-}
-
-#endif /* MY_ZCALLOC */
diff --git a/lib/libz/zutil.h b/lib/libz/zutil.h
deleted file mode 100644
index 14b6f0a..0000000
--- a/lib/libz/zutil.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-1996 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
- part of the implementation of the compression library and is
- subject to change. Applications should only use zlib.h.
- */
-
-/* $FreeBSD$ */
-
-#ifndef _Z_UTIL_H
-#define _Z_UTIL_H
-
-#include "zlib.h"
-
-#if defined(MSDOS)||defined(VMS)||defined(CRAY)||defined(WIN32)||defined(RISCOS)
-# include <stddef.h>
-# include <errno.h>
-#else
- extern int errno;
-#endif
-#ifdef STDC
-# include <string.h>
-# include <stdlib.h>
-#endif
-
-#ifndef local
-# define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-typedef unsigned char uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long ulg;
-
-extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
- return (strm->msg = (char*)ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
- /* common constants */
-
-#ifndef DEF_WBITS
-# define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-# define DEF_MEM_LEVEL 8
-#else
-# define DEF_MEM_LEVEL MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES 2
-/* The three kinds of block type */
-
-#define MIN_MATCH 3
-#define MAX_MATCH 258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
- /* target dependencies */
-
-#ifdef MSDOS
-# define OS_CODE 0x00
-# ifdef __TURBOC__
-# include <alloc.h>
-# else /* MSC or DJGPP */
-# include <malloc.h>
-# endif
-#endif
-
-#ifdef OS2
-# define OS_CODE 0x06
-#endif
-
-#ifdef WIN32 /* Window 95 & Windows NT */
-# define OS_CODE 0x0b
-#endif
-
-#if defined(VAXC) || defined(VMS)
-# define OS_CODE 0x02
-# define FOPEN(name, mode) \
- fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-#endif
-
-#ifdef AMIGA
-# define OS_CODE 0x01
-#endif
-
-#if defined(ATARI) || defined(atarist)
-# define OS_CODE 0x05
-#endif
-
-#ifdef MACOS
-# define OS_CODE 0x07
-#endif
-
-#ifdef __50SERIES /* Prime/PRIMOS */
-# define OS_CODE 0x0F
-#endif
-
-#ifdef TOPS20
-# define OS_CODE 0x0a
-#endif
-
-#if defined(_BEOS_) || defined(RISCOS)
-# define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
- /* Common defaults */
-
-#ifndef OS_CODE
-# define OS_CODE 0x03 /* assume Unix */
-#endif
-
-#ifndef FOPEN
-# define FOPEN(name, mode) fopen((name), (mode))
-#endif
-
- /* functions */
-
-#ifdef HAVE_STRERROR
- extern char *strerror OF((int));
-# define zstrerror(errnum) strerror(errnum)
-#else
-# define zstrerror(errnum) ""
-#endif
-
-#if defined(pyr)
-# define NO_MEMCPY
-#endif
-#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(_MSC_VER)
- /* Use our own functions for small and medium model with MSC <= 5.0.
- * You may have to use the same strategy for Borland C (untested).
- */
-# define NO_MEMCPY
-#endif
-#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-# define HAVE_MEMCPY
-#endif
-#ifdef HAVE_MEMCPY
-# ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-# define zmemcpy _fmemcpy
-# define zmemcmp _fmemcmp
-# define zmemzero(dest, len) _fmemset(dest, 0, len)
-# else
-# define zmemcpy memcpy
-# define zmemcmp memcmp
-# define zmemzero(dest, len) memset(dest, 0, len)
-# endif
-#else
- extern void zmemcpy OF((Bytef* dest, Bytef* source, uInt len));
- extern int zmemcmp OF((Bytef* s1, Bytef* s2, uInt len));
- extern void zmemzero OF((Bytef* dest, uInt len));
-#endif
-
-/* Diagnostic functions */
-#ifdef DEBUG
-# include <stdio.h>
-# ifndef verbose
-# define verbose 0
-# endif
- extern void z_error OF((char *m));
-# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-# define Trace(x) fprintf x
-# define Tracev(x) {if (verbose) fprintf x ;}
-# define Tracevv(x) {if (verbose>1) fprintf x ;}
-# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
-# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
-#else
-# define Assert(cond,msg)
-# define Trace(x)
-# define Tracev(x)
-# define Tracevv(x)
-# define Tracec(c,x)
-# define Tracecv(c,x)
-#endif
-
-
-typedef uLong (*check_func) OF((uLong check, const Bytef *buf, uInt len));
-
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-void zcfree OF((voidpf opaque, voidpf ptr));
-
-#define ZALLOC(strm, items, size) \
- (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-
-#endif /* _Z_UTIL_H */
diff --git a/lib/msun/Makefile b/lib/msun/Makefile
deleted file mode 100644
index 81576f7..0000000
--- a/lib/msun/Makefile
+++ /dev/null
@@ -1,154 +0,0 @@
-# @(#)Makefile 5.1beta 93/09/24
-# $Id: Makefile,v 1.18 1997/02/22 15:08:42 peter Exp $
-#
-# ====================================================
-# Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
-#
-# Developed at SunPro, a Sun Microsystems, Inc. business.
-# Permission to use, copy, modify, and distribute this
-# software is freely granted, provided that this notice
-# is preserved.
-# ====================================================
-#
-#
-
-#
-# There are two options in making libm at fdlibm compile time:
-# _IEEE_LIBM --- IEEE libm; smaller, and somewhat faster
-# _MULTI_LIBM --- Support multi-standard at runtime by
-# imposing wrapper functions defined in
-# fdlibm.h:
-# _IEEE_MODE -- IEEE
-# _XOPEN_MODE -- X/OPEN
-# _POSIX_MODE -- POSIX/ANSI
-# _SVID3_MODE -- SVID
-#
-# Here is how to set up CFLAGS to create the desired libm at
-# compile time:
-#
-# CFLAGS = -D_IEEE_LIBM ... IEEE libm (recommended)
-# CFLAGS = -D_SVID3_MODE ... Multi-standard supported
-# libm with SVID as the
-# default standard
-# CFLAGS = -D_XOPEN_MODE ... Multi-standard supported
-# libm with XOPEN as the
-# default standard
-# CFLAGS = -D_POSIX_MODE ... Multi-standard supported
-# libm with POSIX as the
-# default standard
-# CFLAGS = ... Multi-standard supported
-# libm with IEEE as the
-# default standard
-#
-
-ARCH= i387
-ARCH_PREFIX= ${ARCH}_
-ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_fmod.S e_log.S e_log10.S \
- e_remainder.S e_scalb.S e_sqrt.S s_atan.S s_ceil.S s_copysign.S \
- s_cos.S s_finite.S s_floor.S s_ilogb.S s_logb.S \
- s_rint.S s_scalbn.S s_significand.S s_sin.S s_tan.S
-
-# Broken
-# ARCH_SRCS+= s_log1p.S
-
-.PATH: ${.CURDIR}/man
-.PATH: ${.CURDIR}/src
-
-CFLAGS+= -D_IEEE_LIBM -D_ARCH_INDIRECT=${ARCH_PREFIX}
-
-LIB= m
-COMMON_SRCS = e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \
- e_atan2.c e_atan2f.c e_atanh.c e_atanhf.c e_cosh.c e_coshf.c e_exp.c \
- e_expf.c e_fmod.c e_fmodf.c e_gamma.c e_gamma_r.c e_gammaf.c \
- e_gammaf_r.c e_hypot.c e_hypotf.c e_j0.c e_j0f.c e_j1.c e_j1f.c \
- e_jn.c e_jnf.c e_lgamma.c e_lgamma_r.c e_lgammaf.c e_lgammaf_r.c \
- e_log.c e_log10.c e_log10f.c e_logf.c e_pow.c e_powf.c e_rem_pio2.c \
- e_rem_pio2f.c e_remainder.c e_remainderf.c e_scalb.c e_scalbf.c \
- e_sinh.c e_sinhf.c e_sqrt.c e_sqrtf.c \
- get_hw_float.c \
- k_cos.c k_cosf.c k_rem_pio2.c k_rem_pio2f.c k_sin.c k_sinf.c \
- k_standard.c k_tan.c k_tanf.c \
- s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_cbrt.c s_cbrtf.c s_ceil.c \
- s_ceilf.c s_copysign.c s_copysignf.c s_cos.c s_cosf.c s_erf.c s_erff.c \
- s_expm1.c s_expm1f.c s_fabsf.c s_finite.c s_finitef.c \
- s_floor.c s_floorf.c s_frexpf.c s_ilogb.c s_ilogbf.c \
- s_isnanf.c s_ldexpf.c s_lib_version.c s_log1p.c \
- s_log1pf.c s_logb.c s_logbf.c s_matherr.c s_modff.c \
- s_nextafter.c s_nextafterf.c s_rint.c s_rintf.c s_scalbn.c s_scalbnf.c \
- s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c s_tan.c \
- s_tanf.c s_tanh.c s_tanhf.c \
- w_acos.c w_acosf.c w_acosh.c w_acoshf.c w_asin.c w_asinf.c w_atan2.c \
- w_atan2f.c w_atanh.c w_atanhf.c w_cabs.c w_cabsf.c w_cosh.c w_coshf.c \
- w_drem.c w_dremf.c w_exp.c w_expf.c w_fmod.c w_fmodf.c w_gamma.c \
- w_gamma_r.c w_gammaf.c w_gammaf_r.c w_hypot.c w_hypotf.c w_j0.c \
- w_j0f.c w_j1.c w_j1f.c w_jn.c w_jnf.c w_lgamma.c w_lgamma_r.c \
- w_lgammaf.c w_lgammaf_r.c w_log.c w_log10.c w_log10f.c w_logf.c \
- w_pow.c w_powf.c w_remainder.c w_remainderf.c w_scalb.c w_scalbf.c \
- w_sinh.c w_sinhf.c w_sqrt.c w_sqrtf.c \
- w_y0.c w_y0f.c w_y1.c w_y1f.c w_yn.c w_ynf.c
-
-# FreeBSD's C library supplies these functions:
-#COMMON_SRCS+= s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c
-
-CLEANFILES+= ${RENAMED_ARCH_SRCS}
-RENAMED_ARCH_SRCS= ${ARCH_SRCS:S/^/${ARCH_PREFIX}/g}
-SRCS= ${COMMON_SRCS} ${RENAMED_ARCH_SRCS}
-
-# Generate rules to rename arch-specific sources to avoid conflicts.
-# The path to the arch-specific sources is given explicitly instead of
-# with `.PATH: ${.CURDIR}/${ARCH}' since otherwise bsd.lib.mk would
-# use .S.o rules instead of .c.o rules for the conflicting prefixes
-# (except after `make depend' it uses the correct rules!).
-.for i in ${ARCH_SRCS}
-${ARCH_PREFIX}${i}: ${.CURDIR}/${ARCH}/${i}
- cp ${.ALLSRC} ${.TARGET}
-.endfor
-
-MANSRC= ${.CURDIR}/man
-
-MAN3+= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \
- cos.3 cosh.3 erf.3 exp.3 fabs.3 floor.3 fmod.3 hypot.3 ieee.3 \
- ieee_test.3 j0.3 lgamma.3 math.3 rint.3 sin.3 sinh.3 sqrt.3 \
- tan.3 tanh.3
-
-MLINKS+=acos.3 acosf.3
-MLINKS+=acosh.3 acoshf.3
-MLINKS+=asin.3 asinf.3
-MLINKS+=asinh.3 asinhf.3
-MLINKS+=atan.3 atanf.3
-MLINKS+=atanh.3 atanhf.3
-MLINKS+=atan2.3 atan2f.3
-MLINKS+=ceil.3 ceilf.3
-MLINKS+=cos.3 cosf.3
-MLINKS+=cosh.3 coshf.3
-MLINKS+=erf.3 erfc.3 erf.3 erff.3 erf.3 erfcf.3
-MLINKS+=exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 exp.3 pow.3 \
- exp.3 expf.3 exp.3 exp2.3 exp.3 exp2f.3 exp.3 exp10.3 exp.3 exp10f.3 \
- exp.3 expm1f.3 exp.3 logf.3 exp.3 log2.3 exp.3 log2f.3 exp.3 powf.3 \
- exp.3 log10f.3 exp.3 log1pf.3
-MLINKS+=fabs.3 fabsf.3
-MLINKS+=floor.3 floorf.3
-MLINKS+=fmod.3 fmodf.3
-MLINKS+=hypot.3 cabs.3 hypot.3 cabsf.3 hypot.3 hypotf.3
-MLINKS+=ieee.3 copysign.3 ieee.3 copysignf.3 ieee.3 finite.3 ieee.3 finitef.3 \
- ieee.3 ilogb.3 ieee.3 ilogbf.3 ieee.3 nextafter.3 ieee.3 nextafterf.3 \
- ieee.3 remainder.3 ieee.3 remainderf.3 ieee.3 scalbn.3 ieee.3 scalbnf.3
-MLINKS+=ieee_test.3 logb.3 ieee_test.3 logbf.3
-MLINKS+=ieee_test.3 scalb.3 ieee_test.3 scalbf.3
-MLINKS+=ieee_test.3 significand.3 ieee_test.3 significandf.3
-MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0.3 y1.3 j0.3 y1f.3 j0.3 yn.3
-MLINKS+=j0.3 j0f.3 j0.3 j1f.3 j0.3 jnf.3 j0.3 y0f.3 j0.3 ynf.3
-MLINKS+=lgamma.3 gamma.3 lgamma.3 lgammaf.3 lgamma.3 gammaf.3
-MLINKS+=rint.3 rintf.3
-MLINKS+=sin.3 sinf.3
-MLINKS+=sinh.3 sinhf.3
-MLINKS+=sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 sqrtf.3
-MLINKS+=tan.3 tanf.3
-MLINKS+=tanh.3 tanhf.3
-
-# XXX we should have only one math.h, and a rule for installing .h's...
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/src/math.h \
- ${DESTDIR}/usr/include
-
-.include <bsd.lib.mk>
diff --git a/lib/msun/alpha/s_copysign.S b/lib/msun/alpha/s_copysign.S
deleted file mode 100644
index 98417dc..0000000
--- a/lib/msun/alpha/s_copysign.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $Id$ */
-/* From: NetBSD: s_copysign.S,v 1.3 1997/07/30 23:58:38 jtc Exp */
-
-/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by J.T. Conklin.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <machine/asm.h>
-
-LEAF(copysign, 2)
- cpys fa1, fa0, fv0
- RET
-END(copysign)
diff --git a/lib/msun/alpha/s_copysignf.S b/lib/msun/alpha/s_copysignf.S
deleted file mode 100644
index 5ce0f91..0000000
--- a/lib/msun/alpha/s_copysignf.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/* $Id$ */
-/* From: NetBSD: s_copysignf.S,v 1.3 1997/07/30 23:58:41 jtc Exp */
-
-/*-
- * Copyright (c) 1996 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by J.T. Conklin.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <machine/asm.h>
-
-LEAF(copysignf, 2)
- cpys fa1, fa0, fv0
- RET
-END(copysignf)
diff --git a/lib/msun/bsdsrc/b_exp.c b/lib/msun/bsdsrc/b_exp.c
deleted file mode 100644
index fa6ea75..0000000
--- a/lib/msun/bsdsrc/b_exp.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 1985, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)exp.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/* EXP(X)
- * RETURN THE EXPONENTIAL OF X
- * DOUBLE PRECISION (IEEE 53 bits, VAX D FORMAT 56 BITS)
- * CODED IN C BY K.C. NG, 1/19/85;
- * REVISED BY K.C. NG on 2/6/85, 2/15/85, 3/7/85, 3/24/85, 4/16/85, 6/14/86.
- *
- * Required system supported functions:
- * scalb(x,n)
- * copysign(x,y)
- * finite(x)
- *
- * Method:
- * 1. Argument Reduction: given the input x, find r and integer k such
- * that
- * x = k*ln2 + r, |r| <= 0.5*ln2 .
- * r will be represented as r := z+c for better accuracy.
- *
- * 2. Compute exp(r) by
- *
- * exp(r) = 1 + r + r*R1/(2-R1),
- * where
- * R1 = x - x^2*(p1+x^2*(p2+x^2*(p3+x^2*(p4+p5*x^2)))).
- *
- * 3. exp(x) = 2^k * exp(r) .
- *
- * Special cases:
- * exp(INF) is INF, exp(NaN) is NaN;
- * exp(-INF)= 0;
- * for finite argument, only exp(0)=1 is exact.
- *
- * Accuracy:
- * exp(x) returns the exponential of x nearly rounded. In a test run
- * with 1,156,000 random arguments on a VAX, the maximum observed
- * error was 0.869 ulps (units in the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "mathimpl.h"
-
-vc(ln2hi, 6.9314718055829871446E-1 ,7217,4031,0000,f7d0, 0, .B17217F7D00000)
-vc(ln2lo, 1.6465949582897081279E-12 ,bcd5,2ce7,d9cc,e4f1, -39, .E7BCD5E4F1D9CC)
-vc(lnhuge, 9.4961163736712506989E1 ,ec1d,43bd,9010,a73e, 7, .BDEC1DA73E9010)
-vc(lntiny,-9.5654310917272452386E1 ,4f01,c3bf,33af,d72e, 7,-.BF4F01D72E33AF)
-vc(invln2, 1.4426950408889634148E0 ,aa3b,40b8,17f1,295c, 1, .B8AA3B295C17F1)
-vc(p1, 1.6666666666666602251E-1 ,aaaa,3f2a,a9f1,aaaa, -2, .AAAAAAAAAAA9F1)
-vc(p2, -2.7777777777015591216E-3 ,0b60,bc36,ec94,b5f5, -8,-.B60B60B5F5EC94)
-vc(p3, 6.6137563214379341918E-5 ,b355,398a,f15f,792e, -13, .8AB355792EF15F)
-vc(p4, -1.6533902205465250480E-6 ,ea0e,b6dd,5f84,2e93, -19,-.DDEA0E2E935F84)
-vc(p5, 4.1381367970572387085E-8 ,bb4b,3431,2683,95f5, -24, .B1BB4B95F52683)
-
-#ifdef vccast
-#define ln2hi vccast(ln2hi)
-#define ln2lo vccast(ln2lo)
-#define lnhuge vccast(lnhuge)
-#define lntiny vccast(lntiny)
-#define invln2 vccast(invln2)
-#define p1 vccast(p1)
-#define p2 vccast(p2)
-#define p3 vccast(p3)
-#define p4 vccast(p4)
-#define p5 vccast(p5)
-#endif
-
-ic(p1, 1.6666666666666601904E-1, -3, 1.555555555553E)
-ic(p2, -2.7777777777015593384E-3, -9, -1.6C16C16BEBD93)
-ic(p3, 6.6137563214379343612E-5, -14, 1.1566AAF25DE2C)
-ic(p4, -1.6533902205465251539E-6, -20, -1.BBD41C5D26BF1)
-ic(p5, 4.1381367970572384604E-8, -25, 1.6376972BEA4D0)
-ic(ln2hi, 6.9314718036912381649E-1, -1, 1.62E42FEE00000)
-ic(ln2lo, 1.9082149292705877000E-10,-33, 1.A39EF35793C76)
-ic(lnhuge, 7.1602103751842355450E2, 9, 1.6602B15B7ECF2)
-ic(lntiny,-7.5137154372698068983E2, 9, -1.77AF8EBEAE354)
-ic(invln2, 1.4426950408889633870E0, 0, 1.71547652B82FE)
-
-double exp(x)
-double x;
-{
- double z,hi,lo,c;
- int k;
-
-#if !defined(vax)&&!defined(tahoe)
- if(x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- if( x <= lnhuge ) {
- if( x >= lntiny ) {
-
- /* argument reduction : x --> x - k*ln2 */
-
- k=invln2*x+copysign(0.5,x); /* k=NINT(x/ln2) */
-
- /* express x-k*ln2 as hi-lo and let x=hi-lo rounded */
-
- hi=x-k*ln2hi;
- x=hi-(lo=k*ln2lo);
-
- /* return 2^k*[1+x+x*c/(2+c)] */
- z=x*x;
- c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5))));
- return scalb(1.0+(hi-(lo-(x*c)/(2.0-c))),k);
-
- }
- /* end of x > lntiny */
-
- else
- /* exp(-big#) underflows to zero */
- if(finite(x)) return(scalb(1.0,-5000));
-
- /* exp(-INF) is zero */
- else return(0.0);
- }
- /* end of x < lnhuge */
-
- else
- /* exp(INF) is INF, exp(+big#) overflows to INF */
- return( finite(x) ? scalb(1.0,5000) : x);
-}
-
-/* returns exp(r = x + c) for |c| < |x| with no overlap. */
-
-double __exp__D(x, c)
-double x, c;
-{
- double z,hi,lo, t;
- int k;
-
-#if !defined(vax)&&!defined(tahoe)
- if (x!=x) return(x); /* x is NaN */
-#endif /* !defined(vax)&&!defined(tahoe) */
- if ( x <= lnhuge ) {
- if ( x >= lntiny ) {
-
- /* argument reduction : x --> x - k*ln2 */
- z = invln2*x;
- k = z + copysign(.5, x);
-
- /* express (x+c)-k*ln2 as hi-lo and let x=hi-lo rounded */
-
- hi=(x-k*ln2hi); /* Exact. */
- x= hi - (lo = k*ln2lo-c);
- /* return 2^k*[1+x+x*c/(2+c)] */
- z=x*x;
- c= x - z*(p1+z*(p2+z*(p3+z*(p4+z*p5))));
- c = (x*c)/(2.0-c);
-
- return scalb(1.+(hi-(lo - c)), k);
- }
- /* end of x > lntiny */
-
- else
- /* exp(-big#) underflows to zero */
- if(finite(x)) return(scalb(1.0,-5000));
-
- /* exp(-INF) is zero */
- else return(0.0);
- }
- /* end of x < lnhuge */
-
- else
- /* exp(INF) is INF, exp(+big#) overflows to INF */
- return( finite(x) ? scalb(1.0,5000) : x);
-}
diff --git a/lib/msun/bsdsrc/b_log.c b/lib/msun/bsdsrc/b_log.c
deleted file mode 100644
index 908b8544..0000000
--- a/lib/msun/bsdsrc/b_log.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)log.c 8.2 (Berkeley) 11/30/93";
-#endif /* not lint */
-
-#include <math.h>
-#include <errno.h>
-
-#include "mathimpl.h"
-
-/* Table-driven natural logarithm.
- *
- * This code was derived, with minor modifications, from:
- * Peter Tang, "Table-Driven Implementation of the
- * Logarithm in IEEE Floating-Point arithmetic." ACM Trans.
- * Math Software, vol 16. no 4, pp 378-400, Dec 1990).
- *
- * Calculates log(2^m*F*(1+f/F)), |f/j| <= 1/256,
- * where F = j/128 for j an integer in [0, 128].
- *
- * log(2^m) = log2_hi*m + log2_tail*m
- * since m is an integer, the dominant term is exact.
- * m has at most 10 digits (for subnormal numbers),
- * and log2_hi has 11 trailing zero bits.
- *
- * log(F) = logF_hi[j] + logF_lo[j] is in tabular form in log_table.h
- * logF_hi[] + 512 is exact.
- *
- * log(1+f/F) = 2*f/(2*F + f) + 1/12 * (2*f/(2*F + f))**3 + ...
- * the leading term is calculated to extra precision in two
- * parts, the larger of which adds exactly to the dominant
- * m and F terms.
- * There are two cases:
- * 1. when m, j are non-zero (m | j), use absolute
- * precision for the leading term.
- * 2. when m = j = 0, |1-x| < 1/256, and log(x) ~= (x-1).
- * In this case, use a relative precision of 24 bits.
- * (This is done differently in the original paper)
- *
- * Special cases:
- * 0 return signalling -Inf
- * neg return signalling NaN
- * +Inf return +Inf
-*/
-
-#if defined(vax) || defined(tahoe)
-#define _IEEE 0
-#define TRUNC(x) x = (double) (float) (x)
-#else
-#define _IEEE 1
-#define endian (((*(int *) &one)) ? 1 : 0)
-#define TRUNC(x) *(((int *) &x) + endian) &= 0xf8000000
-#define infnan(x) 0.0
-#endif
-
-#define N 128
-
-/* Table of log(Fj) = logF_head[j] + logF_tail[j], for Fj = 1+j/128.
- * Used for generation of extend precision logarithms.
- * The constant 35184372088832 is 2^45, so the divide is exact.
- * It ensures correct reading of logF_head, even for inaccurate
- * decimal-to-binary conversion routines. (Everybody gets the
- * right answer for integers less than 2^53.)
- * Values for log(F) were generated using error < 10^-57 absolute
- * with the bc -l package.
-*/
-static double A1 = .08333333333333178827;
-static double A2 = .01250000000377174923;
-static double A3 = .002232139987919447809;
-static double A4 = .0004348877777076145742;
-
-static double logF_head[N+1] = {
- 0.,
- .007782140442060381246,
- .015504186535963526694,
- .023167059281547608406,
- .030771658666765233647,
- .038318864302141264488,
- .045809536031242714670,
- .053244514518837604555,
- .060624621816486978786,
- .067950661908525944454,
- .075223421237524235039,
- .082443669210988446138,
- .089612158689760690322,
- .096729626458454731618,
- .103796793681567578460,
- .110814366340264314203,
- .117783035656430001836,
- .124703478501032805070,
- .131576357788617315236,
- .138402322859292326029,
- .145182009844575077295,
- .151916042025732167530,
- .158605030176659056451,
- .165249572895390883786,
- .171850256926518341060,
- .178407657472689606947,
- .184922338493834104156,
- .191394852999565046047,
- .197825743329758552135,
- .204215541428766300668,
- .210564769107350002741,
- .216873938300523150246,
- .223143551314024080056,
- .229374101064877322642,
- .235566071312860003672,
- .241719936886966024758,
- .247836163904594286577,
- .253915209980732470285,
- .259957524436686071567,
- .265963548496984003577,
- .271933715484010463114,
- .277868451003087102435,
- .283768173130738432519,
- .289633292582948342896,
- .295464212893421063199,
- .301261330578199704177,
- .307025035294827830512,
- .312755710004239517729,
- .318453731118097493890,
- .324119468654316733591,
- .329753286372579168528,
- .335355541920762334484,
- .340926586970454081892,
- .346466767346100823488,
- .351976423156884266063,
- .357455888922231679316,
- .362905493689140712376,
- .368325561158599157352,
- .373716409793814818840,
- .379078352934811846353,
- .384411698910298582632,
- .389716751140440464951,
- .394993808240542421117,
- .400243164127459749579,
- .405465108107819105498,
- .410659924985338875558,
- .415827895143593195825,
- .420969294644237379543,
- .426084395310681429691,
- .431173464818130014464,
- .436236766774527495726,
- .441274560805140936281,
- .446287102628048160113,
- .451274644139630254358,
- .456237433481874177232,
- .461175715122408291790,
- .466089729924533457960,
- .470979715219073113985,
- .475845904869856894947,
- .480688529345570714212,
- .485507815781602403149,
- .490303988045525329653,
- .495077266798034543171,
- .499827869556611403822,
- .504556010751912253908,
- .509261901790523552335,
- .513945751101346104405,
- .518607764208354637958,
- .523248143765158602036,
- .527867089620485785417,
- .532464798869114019908,
- .537041465897345915436,
- .541597282432121573947,
- .546132437597407260909,
- .550647117952394182793,
- .555141507540611200965,
- .559615787935399566777,
- .564070138285387656651,
- .568504735352689749561,
- .572919753562018740922,
- .577315365035246941260,
- .581691739635061821900,
- .586049045003164792433,
- .590387446602107957005,
- .594707107746216934174,
- .599008189645246602594,
- .603290851438941899687,
- .607555250224322662688,
- .611801541106615331955,
- .616029877215623855590,
- .620240409751204424537,
- .624433288012369303032,
- .628608659422752680256,
- .632766669570628437213,
- .636907462236194987781,
- .641031179420679109171,
- .645137961373620782978,
- .649227946625615004450,
- .653301272011958644725,
- .657358072709030238911,
- .661398482245203922502,
- .665422632544505177065,
- .669430653942981734871,
- .673422675212350441142,
- .677398823590920073911,
- .681359224807238206267,
- .685304003098281100392,
- .689233281238557538017,
- .693147180560117703862
-};
-
-static double logF_tail[N+1] = {
- 0.,
- -.00000000000000543229938420049,
- .00000000000000172745674997061,
- -.00000000000001323017818229233,
- -.00000000000001154527628289872,
- -.00000000000000466529469958300,
- .00000000000005148849572685810,
- -.00000000000002532168943117445,
- -.00000000000005213620639136504,
- -.00000000000001819506003016881,
- .00000000000006329065958724544,
- .00000000000008614512936087814,
- -.00000000000007355770219435028,
- .00000000000009638067658552277,
- .00000000000007598636597194141,
- .00000000000002579999128306990,
- -.00000000000004654729747598444,
- -.00000000000007556920687451336,
- .00000000000010195735223708472,
- -.00000000000017319034406422306,
- -.00000000000007718001336828098,
- .00000000000010980754099855238,
- -.00000000000002047235780046195,
- -.00000000000008372091099235912,
- .00000000000014088127937111135,
- .00000000000012869017157588257,
- .00000000000017788850778198106,
- .00000000000006440856150696891,
- .00000000000016132822667240822,
- -.00000000000007540916511956188,
- -.00000000000000036507188831790,
- .00000000000009120937249914984,
- .00000000000018567570959796010,
- -.00000000000003149265065191483,
- -.00000000000009309459495196889,
- .00000000000017914338601329117,
- -.00000000000001302979717330866,
- .00000000000023097385217586939,
- .00000000000023999540484211737,
- .00000000000015393776174455408,
- -.00000000000036870428315837678,
- .00000000000036920375082080089,
- -.00000000000009383417223663699,
- .00000000000009433398189512690,
- .00000000000041481318704258568,
- -.00000000000003792316480209314,
- .00000000000008403156304792424,
- -.00000000000034262934348285429,
- .00000000000043712191957429145,
- -.00000000000010475750058776541,
- -.00000000000011118671389559323,
- .00000000000037549577257259853,
- .00000000000013912841212197565,
- .00000000000010775743037572640,
- .00000000000029391859187648000,
- -.00000000000042790509060060774,
- .00000000000022774076114039555,
- .00000000000010849569622967912,
- -.00000000000023073801945705758,
- .00000000000015761203773969435,
- .00000000000003345710269544082,
- -.00000000000041525158063436123,
- .00000000000032655698896907146,
- -.00000000000044704265010452446,
- .00000000000034527647952039772,
- -.00000000000007048962392109746,
- .00000000000011776978751369214,
- -.00000000000010774341461609578,
- .00000000000021863343293215910,
- .00000000000024132639491333131,
- .00000000000039057462209830700,
- -.00000000000026570679203560751,
- .00000000000037135141919592021,
- -.00000000000017166921336082431,
- -.00000000000028658285157914353,
- -.00000000000023812542263446809,
- .00000000000006576659768580062,
- -.00000000000028210143846181267,
- .00000000000010701931762114254,
- .00000000000018119346366441110,
- .00000000000009840465278232627,
- -.00000000000033149150282752542,
- -.00000000000018302857356041668,
- -.00000000000016207400156744949,
- .00000000000048303314949553201,
- -.00000000000071560553172382115,
- .00000000000088821239518571855,
- -.00000000000030900580513238244,
- -.00000000000061076551972851496,
- .00000000000035659969663347830,
- .00000000000035782396591276383,
- -.00000000000046226087001544578,
- .00000000000062279762917225156,
- .00000000000072838947272065741,
- .00000000000026809646615211673,
- -.00000000000010960825046059278,
- .00000000000002311949383800537,
- -.00000000000058469058005299247,
- -.00000000000002103748251144494,
- -.00000000000023323182945587408,
- -.00000000000042333694288141916,
- -.00000000000043933937969737844,
- .00000000000041341647073835565,
- .00000000000006841763641591466,
- .00000000000047585534004430641,
- .00000000000083679678674757695,
- -.00000000000085763734646658640,
- .00000000000021913281229340092,
- -.00000000000062242842536431148,
- -.00000000000010983594325438430,
- .00000000000065310431377633651,
- -.00000000000047580199021710769,
- -.00000000000037854251265457040,
- .00000000000040939233218678664,
- .00000000000087424383914858291,
- .00000000000025218188456842882,
- -.00000000000003608131360422557,
- -.00000000000050518555924280902,
- .00000000000078699403323355317,
- -.00000000000067020876961949060,
- .00000000000016108575753932458,
- .00000000000058527188436251509,
- -.00000000000035246757297904791,
- -.00000000000018372084495629058,
- .00000000000088606689813494916,
- .00000000000066486268071468700,
- .00000000000063831615170646519,
- .00000000000025144230728376072,
- -.00000000000017239444525614834
-};
-
-double
-#ifdef _ANSI_SOURCE
-log(double x)
-#else
-log(x) double x;
-#endif
-{
- int m, j;
- double F, f, g, q, u, u2, v, zero = 0.0, one = 1.0;
- volatile double u1;
-
- /* Catch special cases */
- if (x <= 0)
- if (_IEEE && x == zero) /* log(0) = -Inf */
- return (-one/zero);
- else if (_IEEE) /* log(neg) = NaN */
- return (zero/zero);
- else if (x == zero) /* NOT REACHED IF _IEEE */
- return (infnan(-ERANGE));
- else
- return (infnan(EDOM));
- else if (!finite(x))
- if (_IEEE) /* x = NaN, Inf */
- return (x+x);
- else
- return (infnan(ERANGE));
-
- /* Argument reduction: 1 <= g < 2; x/2^m = g; */
- /* y = F*(1 + f/F) for |f| <= 2^-8 */
-
- m = logb(x);
- g = ldexp(x, -m);
- if (_IEEE && m == -1022) {
- j = logb(g), m += j;
- g = ldexp(g, -j);
- }
- j = N*(g-1) + .5;
- F = (1.0/N) * j + 1; /* F*128 is an integer in [128, 512] */
- f = g - F;
-
- /* Approximate expansion for log(1+f/F) ~= u + q */
- g = 1/(2*F+f);
- u = 2*f*g;
- v = u*u;
- q = u*v*(A1 + v*(A2 + v*(A3 + v*A4)));
-
- /* case 1: u1 = u rounded to 2^-43 absolute. Since u < 2^-8,
- * u1 has at most 35 bits, and F*u1 is exact, as F has < 8 bits.
- * It also adds exactly to |m*log2_hi + log_F_head[j] | < 750
- */
- if (m | j)
- u1 = u + 513, u1 -= 513;
-
- /* case 2: |1-x| < 1/256. The m- and j- dependent terms are zero;
- * u1 = u to 24 bits.
- */
- else
- u1 = u, TRUNC(u1);
- u2 = (2.0*(f - F*u1) - u1*f) * g;
- /* u1 + u2 = 2f/(2F+f) to extra precision. */
-
- /* log(x) = log(2^m*F*(1+f/F)) = */
- /* (m*log2_hi+logF_head[j]+u1) + (m*log2_lo+logF_tail[j]+q); */
- /* (exact) + (tiny) */
-
- u1 += m*logF_head[N] + logF_head[j]; /* exact */
- u2 = (u2 + logF_tail[j]) + q; /* tiny */
- u2 += logF_tail[N]*m;
- return (u1 + u2);
-}
-
-/*
- * Extra precision variant, returning struct {double a, b;};
- * log(x) = a+b to 63 bits, with a is rounded to 26 bits.
- */
-struct Double
-#ifdef _ANSI_SOURCE
-__log__D(double x)
-#else
-__log__D(x) double x;
-#endif
-{
- int m, j;
- double F, f, g, q, u, v, u2, one = 1.0;
- volatile double u1;
- struct Double r;
-
- /* Argument reduction: 1 <= g < 2; x/2^m = g; */
- /* y = F*(1 + f/F) for |f| <= 2^-8 */
-
- m = logb(x);
- g = ldexp(x, -m);
- if (_IEEE && m == -1022) {
- j = logb(g), m += j;
- g = ldexp(g, -j);
- }
- j = N*(g-1) + .5;
- F = (1.0/N) * j + 1;
- f = g - F;
-
- g = 1/(2*F+f);
- u = 2*f*g;
- v = u*u;
- q = u*v*(A1 + v*(A2 + v*(A3 + v*A4)));
- if (m | j)
- u1 = u + 513, u1 -= 513;
- else
- u1 = u, TRUNC(u1);
- u2 = (2.0*(f - F*u1) - u1*f) * g;
-
- u1 += m*logF_head[N] + logF_head[j];
-
- u2 += logF_tail[j]; u2 += q;
- u2 += logF_tail[N]*m;
- r.a = u1 + u2; /* Only difference is here */
- TRUNC(r.a);
- r.b = (u1 - r.a) + u2;
- return (r);
-}
diff --git a/lib/msun/bsdsrc/b_tgamma.c b/lib/msun/bsdsrc/b_tgamma.c
deleted file mode 100644
index 5d270f0..0000000
--- a/lib/msun/bsdsrc/b_tgamma.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/*-
- * Copyright (c) 1992, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef lint
-static char sccsid[] = "@(#)gamma.c 8.1 (Berkeley) 6/4/93";
-#endif /* not lint */
-
-/*
- * This code by P. McIlroy, Oct 1992;
- *
- * The financial support of UUNET Communications Services is greatfully
- * acknowledged.
- */
-
-#include <math.h>
-#include "mathimpl.h"
-#include <errno.h>
-
-/* METHOD:
- * x < 0: Use reflection formula, G(x) = pi/(sin(pi*x)*x*G(x))
- * At negative integers, return +Inf, and set errno.
- *
- * x < 6.5:
- * Use argument reduction G(x+1) = xG(x) to reach the
- * range [1.066124,2.066124]. Use a rational
- * approximation centered at the minimum (x0+1) to
- * ensure monotonicity.
- *
- * x >= 6.5: Use the asymptotic approximation (Stirling's formula)
- * adjusted for equal-ripples:
- *
- * log(G(x)) ~= (x-.5)*(log(x)-1) + .5(log(2*pi)-1) + 1/x*P(1/(x*x))
- *
- * Keep extra precision in multiplying (x-.5)(log(x)-1), to
- * avoid premature round-off.
- *
- * Special values:
- * non-positive integer: Set overflow trap; return +Inf;
- * x > 171.63: Set overflow trap; return +Inf;
- * NaN: Set invalid trap; return NaN
- *
- * Accuracy: Gamma(x) is accurate to within
- * x > 0: error provably < 0.9ulp.
- * Maximum observed in 1,000,000 trials was .87ulp.
- * x < 0:
- * Maximum observed error < 4ulp in 1,000,000 trials.
- */
-
-static double neg_gam __P((double));
-static double small_gam __P((double));
-static double smaller_gam __P((double));
-static struct Double large_gam __P((double));
-static struct Double ratfun_gam __P((double, double));
-
-/*
- * Rational approximation, A0 + x*x*P(x)/Q(x), on the interval
- * [1.066.., 2.066..] accurate to 4.25e-19.
- */
-#define LEFT -.3955078125 /* left boundary for rat. approx */
-#define x0 .461632144968362356785 /* xmin - 1 */
-
-#define a0_hi 0.88560319441088874992
-#define a0_lo -.00000000000000004996427036469019695
-#define P0 6.21389571821820863029017800727e-01
-#define P1 2.65757198651533466104979197553e-01
-#define P2 5.53859446429917461063308081748e-03
-#define P3 1.38456698304096573887145282811e-03
-#define P4 2.40659950032711365819348969808e-03
-#define Q0 1.45019531250000000000000000000e+00
-#define Q1 1.06258521948016171343454061571e+00
-#define Q2 -2.07474561943859936441469926649e-01
-#define Q3 -1.46734131782005422506287573015e-01
-#define Q4 3.07878176156175520361557573779e-02
-#define Q5 5.12449347980666221336054633184e-03
-#define Q6 -1.76012741431666995019222898833e-03
-#define Q7 9.35021023573788935372153030556e-05
-#define Q8 6.13275507472443958924745652239e-06
-/*
- * Constants for large x approximation (x in [6, Inf])
- * (Accurate to 2.8*10^-19 absolute)
- */
-#define lns2pi_hi 0.418945312500000
-#define lns2pi_lo -.000006779295327258219670263595
-#define Pa0 8.33333333333333148296162562474e-02
-#define Pa1 -2.77777777774548123579378966497e-03
-#define Pa2 7.93650778754435631476282786423e-04
-#define Pa3 -5.95235082566672847950717262222e-04
-#define Pa4 8.41428560346653702135821806252e-04
-#define Pa5 -1.89773526463879200348872089421e-03
-#define Pa6 5.69394463439411649408050664078e-03
-#define Pa7 -1.44705562421428915453880392761e-02
-
-static const double zero = 0., one = 1.0, tiny = 1e-300;
-static int endian;
-/*
- * TRUNC sets trailing bits in a floating-point number to zero.
- * is a temporary variable.
- */
-#if defined(vax) || defined(tahoe)
-#define _IEEE 0
-#define TRUNC(x) x = (double) (float) (x)
-#else
-#define _IEEE 1
-#define TRUNC(x) *(((int *) &x) + endian) &= 0xf8000000
-#define infnan(x) 0.0
-#endif
-
-double
-gamma(x)
- double x;
-{
- struct Double u;
- endian = (*(int *) &one) ? 1 : 0;
-
- if (x >= 6) {
- if(x > 171.63)
- return(one/zero);
- u = large_gam(x);
- return(__exp__D(u.a, u.b));
- } else if (x >= 1.0 + LEFT + x0)
- return (small_gam(x));
- else if (x > 1.e-17)
- return (smaller_gam(x));
- else if (x > -1.e-17) {
- if (x == 0.0)
- if (!_IEEE) return (infnan(ERANGE));
- else return (one/x);
- one+1e-20; /* Raise inexact flag. */
- return (one/x);
- } else if (!finite(x)) {
- if (_IEEE) /* x = NaN, -Inf */
- return (x*x);
- else
- return (infnan(EDOM));
- } else
- return (neg_gam(x));
-}
-/*
- * Accurate to max(ulp(1/128) absolute, 2^-66 relative) error.
- */
-static struct Double
-large_gam(x)
- double x;
-{
- double z, p;
- int i;
- struct Double t, u, v;
-
- z = one/(x*x);
- p = Pa0+z*(Pa1+z*(Pa2+z*(Pa3+z*(Pa4+z*(Pa5+z*(Pa6+z*Pa7))))));
- p = p/x;
-
- u = __log__D(x);
- u.a -= one;
- v.a = (x -= .5);
- TRUNC(v.a);
- v.b = x - v.a;
- t.a = v.a*u.a; /* t = (x-.5)*(log(x)-1) */
- t.b = v.b*u.a + x*u.b;
- /* return t.a + t.b + lns2pi_hi + lns2pi_lo + p */
- t.b += lns2pi_lo; t.b += p;
- u.a = lns2pi_hi + t.b; u.a += t.a;
- u.b = t.a - u.a;
- u.b += lns2pi_hi; u.b += t.b;
- return (u);
-}
-/*
- * Good to < 1 ulp. (provably .90 ulp; .87 ulp on 1,000,000 runs.)
- * It also has correct monotonicity.
- */
-static double
-small_gam(x)
- double x;
-{
- double y, ym1, t, x1;
- struct Double yy, r;
- y = x - one;
- ym1 = y - one;
- if (y <= 1.0 + (LEFT + x0)) {
- yy = ratfun_gam(y - x0, 0);
- return (yy.a + yy.b);
- }
- r.a = y;
- TRUNC(r.a);
- yy.a = r.a - one;
- y = ym1;
- yy.b = r.b = y - yy.a;
- /* Argument reduction: G(x+1) = x*G(x) */
- for (ym1 = y-one; ym1 > LEFT + x0; y = ym1--, yy.a--) {
- t = r.a*yy.a;
- r.b = r.a*yy.b + y*r.b;
- r.a = t;
- TRUNC(r.a);
- r.b += (t - r.a);
- }
- /* Return r*gamma(y). */
- yy = ratfun_gam(y - x0, 0);
- y = r.b*(yy.a + yy.b) + r.a*yy.b;
- y += yy.a*r.a;
- return (y);
-}
-/*
- * Good on (0, 1+x0+LEFT]. Accurate to 1ulp.
- */
-static double
-smaller_gam(x)
- double x;
-{
- double t, d;
- struct Double r, xx;
- if (x < x0 + LEFT) {
- t = x, TRUNC(t);
- d = (t+x)*(x-t);
- t *= t;
- xx.a = (t + x), TRUNC(xx.a);
- xx.b = x - xx.a; xx.b += t; xx.b += d;
- t = (one-x0); t += x;
- d = (one-x0); d -= t; d += x;
- x = xx.a + xx.b;
- } else {
- xx.a = x, TRUNC(xx.a);
- xx.b = x - xx.a;
- t = x - x0;
- d = (-x0 -t); d += x;
- }
- r = ratfun_gam(t, d);
- d = r.a/x, TRUNC(d);
- r.a -= d*xx.a; r.a -= d*xx.b; r.a += r.b;
- return (d + r.a/x);
-}
-/*
- * returns (z+c)^2 * P(z)/Q(z) + a0
- */
-static struct Double
-ratfun_gam(z, c)
- double z, c;
-{
- int i;
- double p, q;
- struct Double r, t;
-
- q = Q0 +z*(Q1+z*(Q2+z*(Q3+z*(Q4+z*(Q5+z*(Q6+z*(Q7+z*Q8)))))));
- p = P0 + z*(P1 + z*(P2 + z*(P3 + z*P4)));
-
- /* return r.a + r.b = a0 + (z+c)^2*p/q, with r.a truncated to 26 bits. */
- p = p/q;
- t.a = z, TRUNC(t.a); /* t ~= z + c */
- t.b = (z - t.a) + c;
- t.b *= (t.a + z);
- q = (t.a *= t.a); /* t = (z+c)^2 */
- TRUNC(t.a);
- t.b += (q - t.a);
- r.a = p, TRUNC(r.a); /* r = P/Q */
- r.b = p - r.a;
- t.b = t.b*p + t.a*r.b + a0_lo;
- t.a *= r.a; /* t = (z+c)^2*(P/Q) */
- r.a = t.a + a0_hi, TRUNC(r.a);
- r.b = ((a0_hi-r.a) + t.a) + t.b;
- return (r); /* r = a0 + t */
-}
-
-static double
-neg_gam(x)
- double x;
-{
- int sgn = 1;
- struct Double lg, lsine;
- double y, z;
-
- y = floor(x + .5);
- if (y == x) /* Negative integer. */
- if(!_IEEE)
- return (infnan(ERANGE));
- else
- return (one/zero);
- z = fabs(x - y);
- y = .5*ceil(x);
- if (y == ceil(y))
- sgn = -1;
- if (z < .25)
- z = sin(M_PI*z);
- else
- z = cos(M_PI*(0.5-z));
- /* Special case: G(1-x) = Inf; G(x) may be nonzero. */
- if (x < -170) {
- if (x < -190)
- return ((double)sgn*tiny*tiny);
- y = one - x; /* exact: 128 < |x| < 255 */
- lg = large_gam(y);
- lsine = __log__D(M_PI/z); /* = TRUNC(log(u)) + small */
- lg.a -= lsine.a; /* exact (opposite signs) */
- lg.b -= lsine.b;
- y = -(lg.a + lg.b);
- z = (y + lg.a) + lg.b;
- y = __exp__D(y, z);
- if (sgn < 0) y = -y;
- return (y);
- }
- y = one-x;
- if (one-y == x)
- y = gamma(y);
- else /* 1-x is inexact */
- y = -x*gamma(-x);
- if (sgn < 0) y = -y;
- return (M_PI / (y*z));
-}
diff --git a/lib/msun/bsdsrc/mathimpl.h b/lib/msun/bsdsrc/mathimpl.h
deleted file mode 100644
index 6a2a37d..0000000
--- a/lib/msun/bsdsrc/mathimpl.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1988, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)mathimpl.h 8.1 (Berkeley) 6/4/93
- */
-
-#include <sys/cdefs.h>
-#include <math.h>
-
-#if defined(vax)||defined(tahoe)
-
-/* Deal with different ways to concatenate in cpp */
-# ifdef __STDC__
-# define cat3(a,b,c) a ## b ## c
-# else
-# define cat3(a,b,c) a/**/b/**/c
-# endif
-
-/* Deal with vax/tahoe byte order issues */
-# ifdef vax
-# define cat3t(a,b,c) cat3(a,b,c)
-# else
-# define cat3t(a,b,c) cat3(a,c,b)
-# endif
-
-# define vccast(name) (*(const double *)(cat3(name,,x)))
-
- /*
- * Define a constant to high precision on a Vax or Tahoe.
- *
- * Args are the name to define, the decimal floating point value,
- * four 16-bit chunks of the float value in hex
- * (because the vax and tahoe differ in float format!), the power
- * of 2 of the hex-float exponent, and the hex-float mantissa.
- * Most of these arguments are not used at compile time; they are
- * used in a post-check to make sure the constants were compiled
- * correctly.
- *
- * People who want to use the constant will have to do their own
- * #define foo vccast(foo)
- * since CPP cannot do this for them from inside another macro (sigh).
- * We define "vccast" if this needs doing.
- */
-# define vc(name, value, x1,x2,x3,x4, bexp, xval) \
- const static long cat3(name,,x)[] = {cat3t(0x,x1,x2), cat3t(0x,x3,x4)};
-
-# define ic(name, value, bexp, xval) ;
-
-#else /* vax or tahoe */
-
- /* Hooray, we have an IEEE machine */
-# undef vccast
-# define vc(name, value, x1,x2,x3,x4, bexp, xval) ;
-
-# define ic(name, value, bexp, xval) \
- const static double name = value;
-
-#endif /* defined(vax)||defined(tahoe) */
-
-
-/*
- * Functions internal to the math package, yet not static.
- */
-extern double __exp__E();
-extern double __log__L();
-
-struct Double {double a, b;};
-double __exp__D __P((double, double));
-struct Double __log__D __P((double));
diff --git a/lib/msun/i387/e_acos.S b/lib/msun/i387/e_acos.S
deleted file mode 100644
index 9c0b286..0000000
--- a/lib/msun/i387/e_acos.S
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_acos.S,v 1.5 1997/02/22 15:08:43 peter Exp $")
-
-/*
- * acos(x) = atan2(sqrt(1 - x^2, x).
- * Actually evaluate (1 - x^2) as (1 - x) * (1 + x) to avoid loss of
- * precision when |x| is nearly 1.
- */
-ENTRY(__ieee754_acos)
- fldl 4(%esp) /* x */
- fld1
- fld %st(0)
- fsub %st(2) /* 1 - x */
- fxch %st(1)
- fadd %st(2) /* 1 + x */
- fmulp %st(1) /* (1 - x) * (1 + x) */
- fsqrt
- fxch %st(1)
- fpatan
- ret
diff --git a/lib/msun/i387/e_asin.S b/lib/msun/i387/e_asin.S
deleted file mode 100644
index 3c22226..0000000
--- a/lib/msun/i387/e_asin.S
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_asin.S,v 1.5 1997/02/22 15:08:44 peter Exp $")
-
-/*
- * asin(x) = atan2(x, sqrt(1 - x^2).
- * Actually evaluate (1 - x^2) as (1 - x) * (1 + x) to avoid loss of
- * precision when |x| is nearly 1.
- */
-ENTRY(__ieee754_asin)
- fldl 4(%esp) /* x */
- fld1
- fld %st(0)
- fsub %st(2) /* 1 - x */
- fxch %st(1)
- fadd %st(2) /* 1 + x */
- fmulp %st(1) /* (1 - x) * (1 + x) */
- fsqrt
- fpatan
- ret
diff --git a/lib/msun/i387/e_atan2.S b/lib/msun/i387/e_atan2.S
deleted file mode 100644
index 1e20fd5..0000000
--- a/lib/msun/i387/e_atan2.S
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1994 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_atan2.S,v 1.4 1997/02/22 15:08:45 peter Exp $")
-
-ENTRY(__ieee754_atan2)
- fldl 4(%esp)
- fldl 12(%esp)
- fpatan
- ret
diff --git a/lib/msun/i387/e_exp.S b/lib/msun/i387/e_exp.S
deleted file mode 100644
index 6145ffe..0000000
--- a/lib/msun/i387/e_exp.S
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_exp.S,v 1.6 1997/02/22 15:08:46 peter Exp $")
-
-/* e^x = 2^(x * log2(e)) */
-ENTRY(__ieee754_exp)
- /*
- * If x is +-Inf, then the subtraction would give Inf-Inf = NaN.
- * Avoid this. Also avoid it if x is NaN for convenience.
- */
- movl 8(%esp),%eax
- andl $0x7fffffff,%eax
- cmpl $0x7ff00000,%eax
- jae x_Inf_or_NaN
-
- fldl 4(%esp)
-
- /*
- * Ensure that the rounding mode is to nearest (to give the smallest
- * possible fraction) and that the precision is as high as possible.
- * We may as well mask interrupts if we switch the mode.
- */
- fstcw 4(%esp)
- movl 4(%esp),%eax
- andl $0x0300,%eax
- cmpl $0x0300,%eax /* RC == 0 && PC == 3? */
- je 1f /* jump if mode is good */
- movl $0x137f,8(%esp)
- fldcw 8(%esp)
-1:
- fldl2e
- fmulp /* x * log2(e) */
- fstl %st(1)
- frndint /* int(x * log2(e)) */
- fstl %st(2)
- fsubrp /* fract(x * log2(e)) */
- f2xm1 /* 2^(fract(x * log2(e))) - 1 */
- fld1
- faddp /* 2^(fract(x * log2(e))) */
- fscale /* e^x */
- fstpl %st(1)
- je 1f
- fldcw 4(%esp)
-1:
- ret
-
-x_Inf_or_NaN:
- /*
- * Return 0 if x is -Inf. Otherwise just return x, although the
- * C version would return (x + x) (Real Indefinite) if x is a NaN.
- */
- cmpl $0xfff00000,8(%esp)
- jne x_not_minus_Inf
- cmpl $0,4(%esp)
- jne x_not_minus_Inf
- fldz
- ret
-
-x_not_minus_Inf:
- fldl 4(%esp)
- ret
diff --git a/lib/msun/i387/e_fmod.S b/lib/msun/i387/e_fmod.S
deleted file mode 100644
index 6ecc716..0000000
--- a/lib/msun/i387/e_fmod.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_fmod.S,v 1.4 1997/02/22 15:08:47 peter Exp $")
-
-ENTRY(__ieee754_fmod)
- fldl 12(%esp)
- fldl 4(%esp)
-1: fprem
- fstsw %ax
- sahf
- jp 1b
- fstpl %st(1)
- ret
diff --git a/lib/msun/i387/e_log.S b/lib/msun/i387/e_log.S
deleted file mode 100644
index d1415d3..0000000
--- a/lib/msun/i387/e_log.S
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_log.S,v 1.4 1997/02/22 15:08:48 peter Exp $")
-
-ENTRY(__ieee754_log)
- fldln2
- fldl 4(%esp)
- fyl2x
- ret
diff --git a/lib/msun/i387/e_log10.S b/lib/msun/i387/e_log10.S
deleted file mode 100644
index 808af7b..0000000
--- a/lib/msun/i387/e_log10.S
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_log10.S,v 1.4 1997/02/22 15:08:49 peter Exp $")
-
-ENTRY(__ieee754_log10)
- fldlg2
- fldl 4(%esp)
- fyl2x
- ret
diff --git a/lib/msun/i387/e_remainder.S b/lib/msun/i387/e_remainder.S
deleted file mode 100644
index 39289bc..0000000
--- a/lib/msun/i387/e_remainder.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_remainder.S,v 1.4 1997/02/22 15:08:50 peter Exp $")
-
-ENTRY(__ieee754_remainder)
- fldl 12(%esp)
- fldl 4(%esp)
-1: fprem1
- fstsw %ax
- sahf
- jp 1b
- fstpl %st(1)
- ret
diff --git a/lib/msun/i387/e_scalb.S b/lib/msun/i387/e_scalb.S
deleted file mode 100644
index 8b77980..0000000
--- a/lib/msun/i387/e_scalb.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1994 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_scalb.S,v 1.5 1997/02/22 15:08:51 peter Exp $")
-
-ENTRY(__ieee754_scalb)
- fldl 12(%esp)
- fldl 4(%esp)
- fscale
- fstp %st(1)
- ret
diff --git a/lib/msun/i387/e_sqrt.S b/lib/msun/i387/e_sqrt.S
deleted file mode 100644
index b6ab4c9..0000000
--- a/lib/msun/i387/e_sqrt.S
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: e_sqrt.S,v 1.4 1997/02/22 15:08:52 peter Exp $")
-
-ENTRY(__ieee754_sqrt)
- fldl 4(%esp)
- fsqrt
- ret
diff --git a/lib/msun/i387/s_atan.S b/lib/msun/i387/s_atan.S
deleted file mode 100644
index 3625ece..0000000
--- a/lib/msun/i387/s_atan.S
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_atan.S,v 1.4 1997/02/22 15:08:53 peter Exp $")
-
-ENTRY(atan)
- fldl 4(%esp)
- fld1
- fpatan
- ret
diff --git a/lib/msun/i387/s_ceil.S b/lib/msun/i387/s_ceil.S
deleted file mode 100644
index b97345a..0000000
--- a/lib/msun/i387/s_ceil.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_ceil.S,v 1.5 1997/02/22 15:08:54 peter Exp $")
-
-ENTRY(ceil)
- pushl %ebp
- movl %esp,%ebp
- subl $8,%esp
-
- fstcw -4(%ebp) /* store fpu control word */
- movw -4(%ebp),%dx
- orw $0x0800,%dx /* round towards +oo */
- andw $0xfbff,%dx
- movw %dx,-8(%ebp)
- fldcw -8(%ebp) /* load modfied control word */
-
- fldl 8(%ebp); /* round */
- frndint
-
- fldcw -4(%ebp) /* restore original control word */
-
- leave
- ret
diff --git a/lib/msun/i387/s_copysign.S b/lib/msun/i387/s_copysign.S
deleted file mode 100644
index eccdbb8..0000000
--- a/lib/msun/i387/s_copysign.S
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_copysign.S,v 1.4 1997/02/22 15:08:55 peter Exp $")
-
-ENTRY(copysign)
- movl 16(%esp),%edx
- andl $0x80000000,%edx
- movl 8(%esp),%eax
- andl $0x7fffffff,%eax
- orl %edx,%eax
- movl %eax,8(%esp)
- fldl 4(%esp)
- ret
diff --git a/lib/msun/i387/s_cos.S b/lib/msun/i387/s_cos.S
deleted file mode 100644
index 9e4f139..0000000
--- a/lib/msun/i387/s_cos.S
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1994 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_cos.S,v 1.4 1997/02/22 15:08:55 peter Exp $")
-
-ENTRY(cos)
- fldl 4(%esp)
- fcos
- fnstsw %ax
- andw $0x400,%ax
- jnz 1f
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fnstsw %ax
- andw $0x400,%ax
- jnz 2b
- fstp %st(1)
- fcos
- ret
diff --git a/lib/msun/i387/s_finite.S b/lib/msun/i387/s_finite.S
deleted file mode 100644
index 4f6db83..0000000
--- a/lib/msun/i387/s_finite.S
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_finite.S,v 1.5 1997/03/09 14:00:50 bde Exp $")
-
-ENTRY(finite)
- movl 8(%esp),%eax
- andl $0x7ff00000, %eax
- cmpl $0x7ff00000, %eax
- setneb %al
- andl $0x000000ff, %eax
- ret
diff --git a/lib/msun/i387/s_floor.S b/lib/msun/i387/s_floor.S
deleted file mode 100644
index 13e79c0..0000000
--- a/lib/msun/i387/s_floor.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_floor.S,v 1.5 1997/02/22 15:08:57 peter Exp $")
-
-ENTRY(floor)
- pushl %ebp
- movl %esp,%ebp
- subl $8,%esp
-
- fstcw -4(%ebp) /* store fpu control word */
- movw -4(%ebp),%dx
- orw $0x0400,%dx /* round towards -oo */
- andw $0xf7ff,%dx
- movw %dx,-8(%ebp)
- fldcw -8(%ebp) /* load modfied control word */
-
- fldl 8(%ebp); /* round */
- frndint
-
- fldcw -4(%ebp) /* restore original control word */
-
- leave
- ret
diff --git a/lib/msun/i387/s_ilogb.S b/lib/msun/i387/s_ilogb.S
deleted file mode 100644
index 640bd28..0000000
--- a/lib/msun/i387/s_ilogb.S
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1994 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_ilogb.S,v 1.5 1997/02/22 15:08:59 peter Exp $")
-
-ENTRY(ilogb)
- pushl %ebp
- movl %esp,%ebp
- subl $4,%esp
-
- fldl 8(%ebp)
- fxtract
- fstpl %st
-
- fistpl -4(%ebp)
- movl -4(%ebp),%eax
-
- leave
- ret
diff --git a/lib/msun/i387/s_log1p.S b/lib/msun/i387/s_log1p.S
deleted file mode 100644
index 07f3c64..0000000
--- a/lib/msun/i387/s_log1p.S
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_log1p.S,v 1.5 1997/02/22 15:08:59 peter Exp $")
-
-/*
- * The fyl2xp1 instruction has such a limited range:
- * -(1 - (sqrt(2) / 2)) <= x <= sqrt(2) - 1
- * it's not worth trying to use it.
- *
- * Also, I'm not sure fyl2xp1's extra precision will
- * matter once the result is converted from extended
- * real (80 bits) back to double real (64 bits).
- */
-ENTRY(log1p)
- fldln2
- fldl 4(%esp)
- fld1
- faddp
- fyl2x
- ret
diff --git a/lib/msun/i387/s_logb.S b/lib/msun/i387/s_logb.S
deleted file mode 100644
index dedb853..0000000
--- a/lib/msun/i387/s_logb.S
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_logb.S,v 1.4 1997/02/22 15:09:00 peter Exp $")
-
-ENTRY(logb)
- fldl 4(%esp)
- fxtract
- fstpl %st
- ret
diff --git a/lib/msun/i387/s_rint.S b/lib/msun/i387/s_rint.S
deleted file mode 100644
index 91a1ee0..0000000
--- a/lib/msun/i387/s_rint.S
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_rint.S,v 1.4 1997/02/22 15:09:01 peter Exp $")
-
-ENTRY(rint)
- fldl 4(%esp)
- frndint
- ret
diff --git a/lib/msun/i387/s_scalbn.S b/lib/msun/i387/s_scalbn.S
deleted file mode 100644
index 2678c39..0000000
--- a/lib/msun/i387/s_scalbn.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1994 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_scalbn.S,v 1.5 1997/02/22 15:09:02 peter Exp $")
-
-ENTRY(scalbn)
- fildl 12(%esp)
- fldl 4(%esp)
- fscale
- fstp %st(1)
- ret
diff --git a/lib/msun/i387/s_significand.S b/lib/msun/i387/s_significand.S
deleted file mode 100644
index 63ddd6b..0000000
--- a/lib/msun/i387/s_significand.S
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1993,94 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_significand.S,v 1.4 1997/02/22 15:09:03 peter Exp $")
-
-ENTRY(significand)
- fldl 4(%esp)
- fxtract
- fstpl %st(1)
- ret
diff --git a/lib/msun/i387/s_sin.S b/lib/msun/i387/s_sin.S
deleted file mode 100644
index 9691edb..0000000
--- a/lib/msun/i387/s_sin.S
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 1994 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_sin.S,v 1.4 1997/02/22 15:09:05 peter Exp $")
-
-ENTRY(sin)
- fldl 4(%esp)
- fsin
- fnstsw %ax
- andw $0x400,%ax
- jnz 1f
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fnstsw %ax
- andw $0x400,%ax
- jnz 2b
- fstp %st(1)
- fsin
- ret
diff --git a/lib/msun/i387/s_tan.S b/lib/msun/i387/s_tan.S
deleted file mode 100644
index 4bf1985..0000000
--- a/lib/msun/i387/s_tan.S
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1994 Winning Strategies, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Winning Strategies, Inc.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Written by:
- * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
- */
-
-#include <machine/asm.h>
-
-RCSID("$Id: s_tan.S,v 1.4 1997/02/22 15:09:06 peter Exp $")
-
-ENTRY(tan)
- fldl 4(%esp)
- fptan
- fnstsw %ax
- andw $0x400,%ax
- jnz 1f
- fstp %st(0)
- ret
-1: fldpi
- fadd %st(0)
- fxch %st(1)
-2: fprem1
- fstsw %ax
- andw $0x400,%ax
- jnz 2b
- fstp %st(1)
- fptan
- fstp %st(0)
- ret
diff --git a/lib/msun/man/acos.3 b/lib/msun/man/acos.3
deleted file mode 100644
index 1af095e..0000000
--- a/lib/msun/man/acos.3
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)acos.3 5.1 (Berkeley) 5/2/91
-.\" $Id$
-.\"
-.Dd May 2, 1991
-.Dt ACOS 3
-.Os
-.Sh NAME
-.Nm acos ,
-.Nm acosf
-.Nd arc cosine functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn acos "double x"
-.Ft float
-.Fn acosf "float x"
-.Sh DESCRIPTION
-The
-.Fn acos
-and the
-.Fn acosf
-functions compute the principal value of the arc cosine of
-.Fa x .
-A domain error occurs for arguments not in the range [-1, +1].
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn acos
-and the
-.Fn acosf
-functions return the arc cosine in the range
-.Bq 0 , \*(Pi
-radians.
-On the
-.Tn VAX
-and
-.Tn Tahoe ,
-if:
-.Bd -unfilled -offset indent
-.Pf \&| Ns Ar x Ns \&| > 1 ,
-.Ed
-.Pp
-.Fn acos x
-sets the global variable
-.Va errno
-to
-.Dv EDOM
-and a reserved operand fault is generated.
-.Sh SEE ALSO
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn acos
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/acosh.3 b/lib/msun/man/acosh.3
deleted file mode 100644
index 9ac3247..0000000
--- a/lib/msun/man/acosh.3
+++ /dev/null
@@ -1,88 +0,0 @@
-.\" Copyright (c) 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)acosh.3 5.2 (Berkeley) 5/6/91
-.\" $Id$
-.\"
-.Dd May 6, 1991
-.Dt ACOSH 3
-.Os BSD 4.3
-.Sh NAME
-.Nm acosh ,
-.Nm acoshf
-.Nd inverse hyperbolic cosine functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn acosh "double x"
-.Ft float
-.Fn acoshf "float x"
-.Sh DESCRIPTION
-The
-.Fn acosh
-and the
-.Fn acoshf
-functions compute the inverse hyperbolic cosine
-of the real
-argument
-.Ar x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn acosh
-and the
-.Fn acoshf
-functions
-return the inverse hyperbolic cosine of
-.Ar x .
-On the
-.Tn VAX
-and
-.Tn Tahoe ,
-if the argument is less than one
-.Fn acosh
-sets the global variable
-.Va errno
-to
-.Er EDOM
-and
-causes a reserved operand fault.
-.Sh SEE ALSO
-.Xr asinh 3 ,
-.Xr atanh 3 ,
-.Xr exp 3 ,
-.Xr math 3
-.Sh HISTORY
-The
-.Fn acosh
-function appeared in
-.Bx 4.3 .
diff --git a/lib/msun/man/asin.3 b/lib/msun/man/asin.3
deleted file mode 100644
index eeb4f7c..0000000
--- a/lib/msun/man/asin.3
+++ /dev/null
@@ -1,98 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)asin.3 5.1 (Berkeley) 5/2/91
-.\" $Id$
-.\"
-.Dd May 2, 1991
-.Dt ASIN 3
-.Os
-.Sh NAME
-.Nm asin ,
-.Nm asinf
-.Nd arc sine functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn asin "double x"
-.Ft float
-.Fn asinf "float x"
-.Sh DESCRIPTION
-The
-.Fn asin
-and the
-.Fn asinf
-functions compute the principal value of the arc sine of
-.Fa x .
-A domain error occurs for arguments not in the range [-1, +1].
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn asin
-and the
-.Fn asinf
-functions return the arc sine in the range
-.Bk -words
-.Bq -\*(Pi/2, +\*(Pi/2
-.Ek
-radians.
-On the
-.Tn VAX ,
-and Tahoe ,
-if:
-.Bd -unfilled -offset indent
-.Pf \&| Ns Ar x Ns \&| > 1
-.Ed
-.Pp
-the
-global variable
-.Va errno
-is set to
-.Er EDOM
-and
-a reserved operand fault generated.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn asin
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/asinh.3 b/lib/msun/man/asinh.3
deleted file mode 100644
index d122497..0000000
--- a/lib/msun/man/asinh.3
+++ /dev/null
@@ -1,76 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)asinh.3 6.4 (Berkeley) 5/6/91
-.\" $Id$
-.\"
-.Dd May 6, 1991
-.Dt ASINH 3
-.Os BSD 4.3
-.Sh NAME
-.Nm asinh ,
-.Nm asinhf
-.Nd inverse hyperbolic sine functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn asinh "double x"
-.Ft float
-.Fn asinhf "float x"
-.Sh DESCRIPTION
-The
-.Fn asinh
-and the
-.Fn asinhf
-functions compute the inverse hyperbolic sine
-of the real
-argument
-.Ar x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn asinh
-and the
-.Fn asinhf
-functions
-return the inverse hyperbolic sine of
-.Ar x .
-.Sh SEE ALSO
-.Xr acosh 3 ,
-.Xr atanh 3 ,
-.Xr exp 3 ,
-.Xr math 3
-.Sh HISTORY
-The
-.Fn asinh
-function appeared in
-.Bx 4.3 .
diff --git a/lib/msun/man/atan.3 b/lib/msun/man/atan.3
deleted file mode 100644
index b68bf34..0000000
--- a/lib/msun/man/atan.3
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)atan.3 5.1 (Berkeley) 5/2/91
-.\" $Id$
-.\"
-.Dd May 2, 1991
-.Dt ATAN 3
-.Os
-.Sh NAME
-.Nm atan ,
-.Nm atanf
-.Nd arc tangent functions of one variable
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn atan "double x"
-.Ft float
-.Fn atanf "float x"
-.Sh DESCRIPTION
-The
-.Fn atan
-and the
-.Fn atanf
-functions compute the principal value of the arc tangent of
-.Fa x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn atan
-and the
-.Fn atanf
-function returns the arc tangent in the range
-.Bk -words
-.Bq -\*(Pi/2 , +\*(Pi/2
-.Ek
-radians.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn atan
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/atan2.3 b/lib/msun/man/atan2.3
deleted file mode 100644
index 75e556c..0000000
--- a/lib/msun/man/atan2.3
+++ /dev/null
@@ -1,196 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)atan2.3 5.1 (Berkeley) 5/2/91
-.\" $Id$
-.\"
-.Dd May 2, 1991
-.Dt ATAN2 3
-.Os
-.Sh NAME
-.Nm atan2 ,
-.Nm atan2f
-.Nd arc tangent functions of two variables
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn atan2 "double y" "double x"
-.Ft float
-.Fn atan2f "float y" "float x"
-.Sh DESCRIPTION
-The
-.Fn atan2
-and the
-.Fn atan2f
-functions compute the principal value of the arc tangent of
-.Fa y/ Ns Ar x ,
-using the signs of both arguments to determine the quadrant of
-the return value.
-.Sh RETURN VALUES
-The
-.Fn atan2
-and the
-.Fn atan2f
-functions, if successful,
-return the arc tangent of
-.Fa y/ Ns Ar x
-in the range
-.Bk -words
-.Bq \&- Ns \*(Pi , \&+ Ns \*(Pi
-.Ek
-radians.
-If both
-.Fa x
-and
-.Fa y
-are zero, the global variable
-.Va errno
-is set to
-.Er EDOM .
-On the
-.Tn VAX :
-.Bl -column atan_(y,x)_:=____ sign(y)_(Pi_atan2(Xy_xX))___
-.It Fn atan2 y x No := Ta
-.Fn atan y/x Ta
-if
-.Ar x
-> 0,
-.It Ta sign( Ns Ar y Ns )*(\*(Pi -
-.Fn atan "\\*(Bay/x\\*(Ba" ) Ta
-if
-.Ar x
-< 0,
-.It Ta
-.No 0 Ta
-if x = y = 0, or
-.It Ta
-.Pf sign( Ar y Ns )*\\*(Pi/2 Ta
-if
-.Ar x
-= 0 \*(!=
-.Ar y .
-.El
-.Sh NOTES
-The function
-.Fn atan2
-defines "if x > 0,"
-.Fn atan2 0 0
-= 0 on a
-.Tn VAX
-despite that previously
-.Fn atan2 0 0
-may have generated an error message.
-The reasons for assigning a value to
-.Fn atan2 0 0
-are these:
-.Bl -enum -offset indent
-.It
-Programs that test arguments to avoid computing
-.Fn atan2 0 0
-must be indifferent to its value.
-Programs that require it to be invalid are vulnerable
-to diverse reactions to that invalidity on diverse computer systems.
-.It
-The
-.Fn atan2
-function is used mostly to convert from rectangular (x,y)
-to polar
-.if n\
-(r,theta)
-.if t\
-(r,\(*h)
-coordinates that must satisfy x =
-.if n\
-r\(**cos theta
-.if t\
-r\(**cos\(*h
-and y =
-.if n\
-r\(**sin theta.
-.if t\
-r\(**sin\(*h.
-These equations are satisfied when (x=0,y=0)
-is mapped to
-.if n \
-(r=0,theta=0)
-.if t \
-(r=0,\(*h=0)
-on a VAX. In general, conversions to polar coordinates
-should be computed thus:
-.Bd -unfilled -offset indent
-.if n \{\
-r := hypot(x,y); ... := sqrt(x\(**x+y\(**y)
-theta := atan2(y,x).
-.\}
-.if t \{\
-r := hypot(x,y); ... := \(sr(x\u\s82\s10\d+y\u\s82\s10\d)
-\(*h := atan2(y,x).
-.\}
-.Ed
-.It
-The foregoing formulas need not be altered to cope in a
-reasonable way with signed zeros and infinities
-on a machine that conforms to
-.Tn IEEE 754 ;
-the versions of
-.Xr hypot 3
-and
-.Fn atan2
-provided for
-such a machine are designed to handle all cases.
-That is why
-.Fn atan2 \(+-0 \-0
-= \(+-\*(Pi
-for instance.
-In general the formulas above are equivalent to these:
-.Bd -unfilled -offset indent
-.if n \
-r := sqrt(x\(**x+y\(**y); if r = 0 then x := copysign(1,x);
-.if t \
-r := \(sr(x\(**x+y\(**y);\0\0if r = 0 then x := copysign(1,x);
-.Ed
-.El
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn atan2
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/atanh.3 b/lib/msun/man/atanh.3
deleted file mode 100644
index 9c8acf3..0000000
--- a/lib/msun/man/atanh.3
+++ /dev/null
@@ -1,90 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)atanh.3 5.2 (Berkeley) 5/6/91
-.\" $Id$
-.\"
-.Dd May 6, 1991
-.Dt ATANH 3
-.Os BSD 4.3
-.Sh NAME
-.Nm atanh ,
-.Nm atanhf
-.Nd inverse hyperbolic tangent functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn atanh "double x"
-.Ft float
-.Fn atanhf "float x"
-.Sh DESCRIPTION
-The
-.Fn atanh
-and the
-.Fn atanhf
-functions compute the inverse hyperbolic tangent
-of the real
-argument
-.Ar x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn atanh
-and the
-.Fn atanhf
-functions
-return the inverse hyperbolic tangent of
-.Ar x
-if successful.
-On the
-.Tn VAX
-and
-.Tn Tahoe ,
-if the argument has absolute value
-bigger than or equal to 1,
-.Fn atanh
-sets the global variable
-.Va errno
-to
-.Er EDOM
-and
-a reserved operand fault is generated.
-.Sh SEE ALSO
-.Xr acosh 3 ,
-.Xr asinh 3 ,
-.Xr exp 3 ,
-.Xr math 3
-.Sh HISTORY
-The
-.Fn atanh
-function appeared in
-.Bx 4.3 .
diff --git a/lib/msun/man/ceil.3 b/lib/msun/man/ceil.3
deleted file mode 100644
index 8f17871..0000000
--- a/lib/msun/man/ceil.3
+++ /dev/null
@@ -1,68 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)ceil.3 5.1 (Berkeley) 5/2/91
-.\" $Id: ceil.3,v 1.6 1997/02/22 15:09:26 peter Exp $
-.\"
-.Dd March 10, 1994
-.Dt CEIL 3
-.Os
-.Sh NAME
-.Nm ceil ,
-.Nm ceilf
-.Nd round to smallest integral value >= x
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn ceil "double x"
-.Ft float
-.Fn ceilf "float x"
-.Sh DESCRIPTION
-The
-.Fn ceil
-and the
-.Fn ceilf
-functions return the smallest integral value
-(represented as a double precision number)
-greater than or equal to
-.Fa x .
-.Sh SEE ALSO
-.Xr abs 3 ,
-.Xr fabs 3 ,
-.Xr floor 3 ,
-.Xr ieee 3 ,
-.Xr math 3 ,
-.Xr rint 3
-.Sh STANDARDS
-The
-.Fn ceil
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/cos.3 b/lib/msun/man/cos.3
deleted file mode 100644
index f9e4b27..0000000
--- a/lib/msun/man/cos.3
+++ /dev/null
@@ -1,81 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)cos.3 5.1 (Berkeley) 5/2/91
-.\" $Id: cos.3,v 1.5 1997/02/22 15:09:27 peter Exp $
-.\"
-.Dd May 2, 1991
-.Dt COS 3
-.Os
-.Sh NAME
-.Nm cos ,
-.Nm cosf
-.Nd cosine functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn cos "double x"
-.Ft float
-.Fn cosf "float x"
-.Sh DESCRIPTION
-The
-.Fn cos
-and the
-.Fn cosf
-functions compute the cosine of
-.Fa x
-(measured in radians).
-A large magnitude argument may yield a result with little or no
-significance.
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn cos
-and the
-.Fn cosf
-functions return the cosine value.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn cos
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/cosh.3 b/lib/msun/man/cosh.3
deleted file mode 100644
index 9255ecc..0000000
--- a/lib/msun/man/cosh.3
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1989, 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)cosh.3 5.1 (Berkeley) 5/2/91
-.\" $Id: cosh.3,v 1.5 1997/02/22 15:09:28 peter Exp $
-.\"
-.Dd May 2, 1991
-.Dt COSH 3
-.Os
-.Sh NAME
-.Nm cosh ,
-.Nm coshf
-.Nd hyperbolic cosine functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn cosh "double x"
-.Ft float
-.Fn coshf "float x"
-.Sh DESCRIPTION
-The
-.Fn cosh
-and the
-.Fn coshf
-functions compute the hyperbolic cosine of
-.Fa x .
-.Sh RETURN VALUES
-The
-.Fn cosh
-and the
-.Fn coshf
-functions return the hyperbolic cosine unless the magnitude
-of
-.Fa x
-is too large; in this event, the global variable
-.Va errno
-is set to
-.Er ERANGE .
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn cosh
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/erf.3 b/lib/msun/man/erf.3
deleted file mode 100644
index c63aacc..0000000
--- a/lib/msun/man/erf.3
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)erf.3 6.4 (Berkeley) 4/20/91
-.\" $Id$
-.\"
-.Dd April 20, 1991
-.Dt ERF 3
-.Os BSD 4.3
-.Sh NAME
-.Nm erf ,
-.Nm erff ,
-.Nm erfc ,
-.Nm erfcf
-.Nd error function operators
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn erf "double x"
-.Ft float
-.Fn erff "float x"
-.Ft double
-.Fn erfc "double x"
-.Ft float
-.Fn erfcf "float x"
-.Sh DESCRIPTION
-These functions calculate the error function of
-.Fa x .
-.Pp
-The
-.Fn erf
-and the
-.Fn erff
-functions calculate the error function of x; where
-.Bd -filled -offset indent
-.if n \{\
-erf(x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. \}
-.if t \{\
-erf\|(x) :=
-(2/\(sr\(*p)\|\(is\d\s8\z0\s10\u\u\s8x\s10\d\|exp(\-t\u\s82\s10\d)\|dt. \}
-.Ed
-.Pp
-The
-.Fn erfc
-and the
-.Fn erfcf
-functions calculate the complementary error function of
-.Fa x ;
-that is
-.Fn erfc
-subtracts the result of the error function
-.Fn erf x
-from 1.0.
-This is useful, since for large
-.Fa x
-places disappear.
-.Sh SEE ALSO
-.Xr math 3
-.Sh HISTORY
-The
-.Fn erf
-and
-.Fn erfc
-functions appeared in
-.Bx 4.3 .
diff --git a/lib/msun/man/exp.3 b/lib/msun/man/exp.3
deleted file mode 100644
index 9e38d643..0000000
--- a/lib/msun/man/exp.3
+++ /dev/null
@@ -1,320 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)exp.3 6.12 (Berkeley) 7/31/91
-.\" $Id$
-.\"
-.Dd July 31, 1991
-.Dt EXP 3
-.Os BSD 4
-.Sh NAME
-.Nm exp ,
-.Nm expf ,
-.Nm exp2 ,
-.Nm exp2f ,
-.Nm exp10 ,
-.Nm exp10f ,
-.Nm expm1 ,
-.Nm expm1f ,
-.Nm log ,
-.Nm logf ,
-.Nm log10 ,
-.Nm log10f ,
-.Nm log1p ,
-.Nm log1pf ,
-.Nm pow ,
-.Nm powf
-.Nd exponential, logarithm, power functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn exp "double x"
-.Ft float
-.Fn expf "float x"
-.Ft double
-.Fn expm1 "double x"
-.Ft float
-.Fn expm1f "float x"
-.Ft double
-.Fn log "double x"
-.Ft float
-.Fn logf "float x"
-.Ft double
-.Fn log10 "double x"
-.Ft float
-.Fn log10f "float x"
-.Ft double
-.Fn log1p "double x"
-.Ft float
-.Fn log1pf "float x"
-.Ft double
-.Fn pow "double x" "double y"
-.Ft float
-.Fn powf "float x" "float y"
-.Sh DESCRIPTION
-The
-.Fn exp
-and the
-.Fn expf
-functions compute the exponential value of the given argument
-.Fa x .
-.Pp
-The
-.Fn expm1
-and the
-.Fn expm1f
-functions compute the value exp(x)\-1 accurately even for tiny argument
-.Fa x .
-.Pp
-The
-.Fn log
-and the
-.Fn logf
-functions compute the value of the natural logarithm of argument
-.Fa x.
-.Pp
-The
-.Fn log10
-and the
-.Fn log10f
-functions compute the value of the logarithm of argument
-.Fa x
-to base 10.
-.Pp
-The
-.Fn log1p
-and the
-.Fn log1pf
-functions compute
-the value of log(1+x) accurately even for tiny argument
-.Fa x .
-.Pp
-The
-.Fn pow
-and the
-.Fn powf
-functions compute the value
-of
-.Ar x
-to the exponent
-.Ar y .
-.Sh ERROR (due to Roundoff etc.)
-.Fn exp(x) ,
-.Fn log(x) ,
-.Fn expm1(x) and
-.Fn log1p(x)
-are accurate to within
-an
-.Em ulp ,
-and log10(x) to within about 2
-.Em ulps ;
-an
-.Em ulp
-is one
-.Em Unit
-in the
-.Em Last
-.Em Place .
-The error in
-.Fn pow x y
-is below about 2
-.Em ulps
-when its
-magnitude is moderate, but increases as
-.Fn pow x y
-approaches
-the over/underflow thresholds until almost as many bits could be
-lost as are occupied by the floating\-point format's exponent
-field; that is 8 bits for
-.Tn "VAX D"
-and 11 bits for IEEE 754 Double.
-No such drastic loss has been exposed by testing; the worst
-errors observed have been below 20
-.Em ulps
-for
-.Tn "VAX D" ,
-300
-.Em ulps
-for
-.Tn IEEE
-754 Double.
-Moderate values of
-.Fn pow
-are accurate enough that
-.Fn pow integer integer
-is exact until it is bigger than 2**56 on a
-.Tn VAX ,
-2**53 for
-.Tn IEEE
-754.
-.Sh RETURN VALUES
-These functions will return the appropriate computation unless an error
-occurs or an argument is out of range.
-The functions
-.Fn exp ,
-.Fn expm1 ,
-.Fn pow
-detect if the computed value will overflow,
-set the global variable
-.Va errno to
-.Er ERANGE
-and cause a reserved operand fault on a
-.Tn VAX
-or
-.Tn Tahoe .
-The functions
-.Fn pow x y
-checks to see if
-.Fa x
-< 0 and
-.Fa y
-is not an integer, in the event this is true,
-the global variable
-.Va errno
-is set to
-.Er EDOM
-and on the
-.Tn VAX
-and
-.Tn Tahoe
-generate a reserved operand fault.
-On a
-.Tn VAX
-and
-.Tn Tahoe ,
-.Va errno
-is set to
-.Er EDOM
-and the reserved operand is returned
-by log unless
-.Fa x
-> 0, by
-.Fn log1p
-unless
-.Fa x
-> \-1.
-.Sh NOTES
-The functions exp(x)\-1 and log(1+x) are called
-expm1 and logp1 in
-.Tn BASIC
-on the Hewlett\-Packard
-.Tn HP Ns \-71B
-and
-.Tn APPLE
-Macintosh,
-.Tn EXP1
-and
-.Tn LN1
-in Pascal, exp1 and log1 in C
-on
-.Tn APPLE
-Macintoshes, where they have been provided to make
-sure financial calculations of ((1+x)**n\-1)/x, namely
-expm1(n\(**log1p(x))/x, will be accurate when x is tiny.
-They also provide accurate inverse hyperbolic functions.
-.Pp
-The function
-.Fn pow x 0
-returns x**0 = 1 for all x including x = 0,
-.if n \
-Infinity
-.if t \
-\(if
-(not found on a
-.Tn VAX ) ,
-and
-.Em NaN
-(the reserved
-operand on a
-.Tn VAX ) . Previous implementations of pow may
-have defined x**0 to be undefined in some or all of these
-cases. Here are reasons for returning x**0 = 1 always:
-.Bl -enum -width indent
-.It
-Any program that already tests whether x is zero (or
-infinite or \*(Na) before computing x**0 cannot care
-whether 0**0 = 1 or not. Any program that depends
-upon 0**0 to be invalid is dubious anyway since that
-expression's meaning and, if invalid, its consequences
-vary from one computer system to another.
-.It
-Some Algebra texts (e.g. Sigler's) define x**0 = 1 for
-all x, including x = 0.
-This is compatible with the convention that accepts a[0]
-as the value of polynomial
-.Bd -literal -offset indent
-p(x) = a[0]\(**x**0 + a[1]\(**x**1 + a[2]\(**x**2 +...+ a[n]\(**x**n
-.Ed
-.Pp
-at x = 0 rather than reject a[0]\(**0**0 as invalid.
-.It
-Analysts will accept 0**0 = 1 despite that x**y can
-approach anything or nothing as x and y approach 0
-independently.
-The reason for setting 0**0 = 1 anyway is this:
-.Bd -filled -offset indent
-If x(z) and y(z) are
-.Em any
-functions analytic (expandable
-in power series) in z around z = 0, and if there
-x(0) = y(0) = 0, then x(z)**y(z) \(-> 1 as z \(-> 0.
-.Ed
-.It
-If 0**0 = 1, then
-.if n \
-infinity**0 = 1/0**0 = 1 too; and
-.if t \
-\(if**0 = 1/0**0 = 1 too; and
-then \*(Na**0 = 1 too because x**0 = 1 for all finite
-and infinite x, i.e., independently of x.
-.El
-.Sh SEE ALSO
-.Xr math 3
-.Sh HISTORY
-A
-.Fn exp ,
-.Fn log
-and
-.Fn pow
-functions
-appeared in
-.At v6 .
-A
-.Fn log10
-function
-appeared in
-.At v7 .
-The
-.Fn log1p
-and
-.Fn expm1
-functions appeared in
-.Bx 4.3 .
diff --git a/lib/msun/man/fabs.3 b/lib/msun/man/fabs.3
deleted file mode 100644
index e7cd317..0000000
--- a/lib/msun/man/fabs.3
+++ /dev/null
@@ -1,74 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" @(#)fabs.3 5.1 (Berkeley) 5/2/91
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)fabs.3 5.1 (Berkeley) 5/2/91
-.\" $Id$
-.\"
-.Dd May 2, 1991
-.Dt FABS 3
-.Os
-.Sh NAME
-.Nm fabs ,
-.Nm fabsf
-.Nd floating-point absolute value functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn fabs "double x"
-.Ft float
-.Fn fabsf "float x"
-.Sh DESCRIPTION
-The
-.Fn fabs
-and the
-.Fn fabsf
-functions compute the absolute value of a floating-point number
-.Fa x .
-.Sh RETURN VALUES
-The
-.Fn fabs
-and the
-.Fn fabsf
-functions return the absolute value of
-.Fa x .
-.Sh SEE ALSO
-.Xr abs 3 ,
-.Xr ceil 3 ,
-.Xr floor 3 ,
-.Xr ieee 3 ,
-.Xr math 3 ,
-.Xr rint 3
-.Sh STANDARDS
-The
-.Fn fabs
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/floor.3 b/lib/msun/man/floor.3
deleted file mode 100644
index 71080f0..0000000
--- a/lib/msun/man/floor.3
+++ /dev/null
@@ -1,68 +0,0 @@
-.\" Copyright (c) 1985, 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)floor.3 6.5 (Berkeley) 4/19/91
-.\" $Id$
-.\"
-.Dd March 10, 1994
-.Dt FLOOR 3
-.Os
-.Sh NAME
-.Nm floor ,
-.Nm floorf
-.Nd round to largest integral value <= x
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn floor "double x"
-.Ft float
-.Fn floorf "float x"
-.Sh DESCRIPTION
-The
-.Fn floor
-and the
-.Fn floorf
-function returns the largest integral value
-(represented as a double precision number)
-less than or equal to
-.Fa x .
-.Sh SEE ALSO
-.Xr abs 3 ,
-.Xr ceil 3 ,
-.Xr fabs 3 ,
-.Xr ieee 3 ,
-.Xr math 3 ,
-.Xr rint 3
-.Sh STANDARDS
-The
-.Fn floor
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/fmod.3 b/lib/msun/man/fmod.3
deleted file mode 100644
index 61cdfa0..0000000
--- a/lib/msun/man/fmod.3
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)fmod.3 5.1 (Berkeley) 5/2/91
-.\" $Id$
-.\"
-.Dd May 2, 1991
-.Dt FMOD 3
-.Os
-.Sh NAME
-.Nm fmod ,
-.Nm fmodf
-.Nd floating-point remainder functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn fmod "double x" "double y"
-.Ft float
-.Fn fmodf "float x" "float y"
-.Sh DESCRIPTION
-The
-.Fn fmod
-and the
-.Fn fmodf
-functions compute the floating-point remainder of
-.Fa x Ns / Fa y .
-.Sh RETURN VALUES
-The
-.Fn fmod
-and the
-.Fn fmodf
-functions return the value
-.Sm off
-.Fa x - Em i * Fa y ,
-.Sm on
-for some integer
-.Em i
-such that, if
-.Fa y
-is non-zero, the result has the same sign as
-.Fa x
-and magnitude less than the magnitude of
-.Fa y .
-If
-.Fa y
-is zero, whether a domain error occurs or the
-.Fn fmod
-and the
-.Fn fmodf
-function returns zero is implementation-defined.
-.Sh SEE ALSO
-.Xr math 3
-.Sh STANDARDS
-The
-.Fn fmod
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/hypot.3 b/lib/msun/man/hypot.3
deleted file mode 100644
index bebd1db..0000000
--- a/lib/msun/man/hypot.3
+++ /dev/null
@@ -1,134 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)hypot.3 6.7 (Berkeley) 5/6/91
-.\" $Id$
-.\"
-.Dd May 6, 1991
-.Dt HYPOT 3
-.Os BSD 4
-.Sh NAME
-.Nm hypot ,
-.Nm hypotf ,
-.Nm cabs ,
-.Nm cabsf
-.Nd euclidean distance and complex absolute value functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn hypot "double x" "double y"
-.Ft float
-.Fn hypotf "float x" "float y"
-.Fd struct {double x, y;} z;
-.Ft double
-.Fn cabs z
-.Fd struct {float x, y;} z;
-.Ft float
-.Fn cabsf z
-.Sh DESCRIPTION
-The
-.Fn hypot ,
-.Fn hypotf ,
-.Fn cabs
-and
-.Fn cabsf
-functions
-compute the
-sqrt(x*x+y*y)
-in such a way that underflow will not happen, and overflow
-occurs only if the final result deserves it.
-.Pp
-.Fn hypot "\*(If" "v"
-=
-.Fn hypot "v" "\*(If"
-= +\*(If for all
-.Ar v ,
-including \*(Na.
-.Sh ERROR (due to Roundoff, etc.)
-Below 0.97
-.Em ulps .
-Consequently
-.Fn hypot "5.0" "12.0"
-= 13.0
-exactly;
-in general, hypot and cabs return an integer whenever an
-integer might be expected.
-.Pp
-The same cannot be said for the shorter and faster version of hypot
-and cabs that is provided in the comments in cabs.c; its error can
-exceed 1.2
-.Em ulps .
-.Sh NOTES
-As might be expected,
-.Fn hypot "v" "\*(Na"
-and
-.Fn hypot "\*(Na" "v"
-are \*(Na for all
-.Em finite
-.Ar v ;
-with "reserved operand" in place of "\*(Na", the
-same is true on a
-.Tn VAX .
-But programmers on machines other than a
-.Tn VAX
-(if has no \*(If)
-might be surprised at first to discover that
-.Fn hypot "\(+-\*(If" "\*(Na"
-= +\*(If.
-This is intentional; it happens because
-.Fn hypot "\*(If" "v"
-= +\*(If
-for
-.Em all
-.Ar v ,
-finite or infinite.
-Hence
-.Fn hypot "\*(If" "v"
-is independent of
-.Ar v .
-Unlike the reserved operand fault on a
-.Tn VAX ,
-the
-.Tn IEEE
-\*(Na is designed to
-disappear when it turns out to be irrelevant, as it does in
-.Fn hypot "\*(If" "\*(Na" .
-.Sh SEE ALSO
-.Xr math 3 ,
-.Xr sqrt 3
-.Sh HISTORY
-Both a
-.Fn hypot
-function and a
-.Fn cabs
-function
-appeared in
-.At v7 .
diff --git a/lib/msun/man/ieee.3 b/lib/msun/man/ieee.3
deleted file mode 100644
index c983a3f..0000000
--- a/lib/msun/man/ieee.3
+++ /dev/null
@@ -1,182 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91
-.\" $Id$
-.\"
-.Dd Feb 25, 1994
-.Dt IEEE 3
-.Os
-.Sh NAME
-.Nm copysign ,
-.Nm copysignf ,
-.Nm finite ,
-.Nm finitef ,
-.Nm ilogb ,
-.Nm ilogbf ,
-.Nm nextafter ,
-.Nm nextafterf ,
-.Nm remainder ,
-.Nm remainderf ,
-.Nm scalbn ,
-.Nm scalbnf
-.Nd Functions for IEEE arithmetic
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn copysign "double x" "double y"
-.Ft float
-.Fn copysignf "float x" "float y"
-.Ft int
-.Fn finite "double x"
-.Ft int
-.Fn finitef "float x"
-.Ft int
-.Fn ilogb "double x"
-.Ft int
-.Fn ilogbf "float x"
-.Ft double
-.Fn nextafter "double x" "double y"
-.Ft float
-.Fn nextafterf "float x" "float y"
-.Ft double
-.Fn remainder "double x" "double y"
-.Ft float
-.Fn remainderf "float x" "float y"
-.Ft double
-.Fn scalbn "double x" "int n"
-.Ft float
-.Fn scalbnf "float x" "int n"
-.Sh DESCRIPTION
-These functions are required or recommended by
-.St -ieee754 .
-.Pp
-.Fn copysign
-and
-.Fn copysignf
-return
-.Fa x
-with its sign changed to
-.Fa y Ns 's.
-.Pp
-.Fn finite
-and
-.Fn finitef
-return the value 1 just when
-\-\*(If \*(Lt
-.Fa x
-\*(Lt +\*(If;
-otherwise a
-zero is returned
-(when
-.Pf \\*(Ba Ns Fa x Ns \\*(Ba
-= \*(If or
-.Fa x
-is \*(Na
-.Pp
-.Fn ilogb
-and
-.Fn ilogbf
-return
-.Fa x Ns 's exponent
-.Fa n ,
-in integer format.
-.Fn ilogb \*(Pm\*(If
-returns
-.Dv INT_MAX
-and
-.Fn ilogb 0
-returns
-.Dv INT_MIN .
-.Pp
-.Fn nextafter
-and
-.Fn nextafterf
-return the next machine representable number from
-.Fa x
-in direction
-.Fa y .
-.Pp
-.Fn remainder
-and
-.Fn remainderf
-return the remainder
-.Fa r
-:=
-.Fa x
-\-
-.Fa n\(**y
-where
-.Fa n
-is the integer nearest the exact value of
-.Bk -words
-.Fa x Ns / Ns Fa y ;
-.Ek
-moreover if
-.Pf \\*(Ba Fa n
-\-
-.Sm off
-.Fa x No / Fa y No \\*(Ba
-.Sm on
-=
-1/2
-then
-.Fa n
-is even. Consequently
-the remainder is computed exactly and
-.Sm off
-.Pf \\*(Ba Fa r No \\*(Ba
-.Sm on
-\*(Le
-.Sm off
-.Pf \\*(Ba Fa y No \\*(Ba/2.
-.Sm on
-But
-.Fn remainder x 0
-and
-.Fn remainder \*(If 0
-are invalid operations that produce a \*(Na.
-.Pp
-.Fn scalbn
-and
-.Fn scalbnf
-return
-.Fa x Ns \(**(2** Ns Fa n )
-computed by exponent manipulation.
-.Sh SEE ALSO
-.Xr math 3
-.Sh HISTORY
-The
-.Nm ieee
-functions appeared in
-.Bx 4.3 .
-.Sh STANDARDS
-.St -ieee754
diff --git a/lib/msun/man/ieee_test.3 b/lib/msun/man/ieee_test.3
deleted file mode 100644
index c2c7e49..0000000
--- a/lib/msun/man/ieee_test.3
+++ /dev/null
@@ -1,107 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)ieee.3 6.4 (Berkeley) 5/6/91
-.\" $Id$
-.\"
-.Dd March 10, 1994
-.Dt IEEE_TEST 3
-.Os
-.Sh NAME
-.Nm logb ,
-.Nm logbf ,
-.Nm scalb ,
-.Nm scalbf ,
-.Nm significand ,
-.Nm significandf
-.Nd IEEE test functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn logb "double x"
-.Ft float
-.Fn logbf "float x"
-.Ft double
-.Fn scalb "double x" "double n"
-.Ft float
-.Fn scalbf "float x" "float n"
-.Ft double
-.Fn significand "double x"
-.Ft float
-.Fn significandf "float x"
-.Sh DESCRIPTION
-These functions allow users to test conformance to
-.St -ieee754 .
-Their use is not otherwise recommended.
-.Pp
-.Fn logb x
-and
-.Fn logbf x
-return
-.Fa x Ns 's exponent
-.Fa n ,
-a signed integer converted to double\-precision floating\-point.
-.Fn logb \*(Pm\*(If
-= +\*(If;
-.Fn logb 0
-= -\*(If with a division by zero exception.
-.Pp
-.Fn scalbn x n
-and
-.Fn scalbnf x n
-return
-.Fa x Ns \(**(2** Ns Fa n )
-computed by exponent manipulation.
-.Pp
-.Fn significand x
-and
-.Fn significandf x
-return
-.Fa sig ,
-where
-.Fa x
-:=
-.Fa sig No \(** 2** Ns Fa n
-with 1 \(<=
-.Fa sig
-< 2.
-.Fn significand x
-and
-.Fn significandf x
-are not defined when
-.Fa x
-is 0, \*(Pm\*(If, or \*(Na.
-.Sh SEE ALSO
-.Xr ieee 3 ,
-.Xr math 3
-
-.Sh STANDARDS
-.St -ieee754
diff --git a/lib/msun/man/j0.3 b/lib/msun/man/j0.3
deleted file mode 100644
index 54088c3..0000000
--- a/lib/msun/man/j0.3
+++ /dev/null
@@ -1,155 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)j0.3 6.7 (Berkeley) 4/19/91
-.\" $Id$
-.\"
-.Dd April 19, 1991
-.Dt J0 3
-.Os BSD 4
-.Sh NAME
-.Nm j0 ,
-.Nm j0f ,
-.Nm j1 ,
-.Nm j1f ,
-.Nm jn ,
-.Nm jnf ,
-.Nm y0 ,
-.Nm y0f ,
-.Nm y1 ,
-.Nm y1f ,
-.Nm yn ,
-.Nm ynf
-.Nd Bessel functions of first and second kind
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn j0 "double x"
-.Ft float
-.Fn j0f "float x"
-.Ft double
-.Fn j1 "double x"
-.Ft float
-.Fn j1f "float x"
-.Ft double
-.Fn jn "int n" "double x"
-.Ft float
-.Fn jnf "int n" "float x"
-.Ft double
-.Fn y0 "double x"
-.Ft float
-.Fn y0f "float x"
-.Ft double
-.Fn y1 "double x"
-.Ft float
-.Fn y1f "float x"
-.Ft double
-.Fn yn "int n" "double x"
-.Ft float
-.Fn ynf "int n" "float x"
-.Sh DESCRIPTION
-The functions
-.Fn j0 ,
-.Fn j0f ,
-.Fn j1
-and
-.Fn j1f
-compute the
-.Em Bessel function of the first kind of the order
-0 and the
-.Em order
-1, respectively,
-for the
-real value
-.Fa x ;
-the functions
-.Fn jn
-and
-.Fn jnf
-compute the
-.Em Bessel function of the first kind of the integer
-.Em order
-.Fa n
-for the real value
-.Fa x .
-.Pp
-The functions
-.Fn y0 ,
-.Fn y0f ,
-.Fn y1 ,
-and
-.Fn y1f
-compute the linearly independent
-.Em Bessel function of the second kind of the order
-0 and the
-.Em order
-1, respectively,
-for the
-positive
-.Em real
-value
-.Fa x ;
-the functions
-.Fn yn
-and
-.Fn ynf
-compute the
-.Em Bessel function of the second kind for the integer
-.Em order
-.Fa n
-for the positive
-.Em real
-value
-.Fa x .
-.Sh RETURN VALUES
-If these functions are successful,
-the computed value is returned. On the
-.Tn VAX
-and
-.Tn Tahoe
-architectures,
-for the Bessel functions of the second kind,
-a negative
-or zero
-.Fa x
-value
-results in an error; the global
-variable
-.Va errno
-is set to
-.Er EDOM
-and a reserve operand fault is generated.
-.Sh SEE ALSO
-.Xr math 3
-.Sh HISTORY
-This set of functions
-appeared in
-.At v7 .
diff --git a/lib/msun/man/lgamma.3 b/lib/msun/man/lgamma.3
deleted file mode 100644
index 6f469fd..0000000
--- a/lib/msun/man/lgamma.3
+++ /dev/null
@@ -1,139 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)lgamma.3 6.6 (Berkeley) 12/3/92
-.\" $Id: lgamma.3,v 1.5 1997/02/22 15:09:38 peter Exp $
-.\"
-.Dd December 3, 1992
-.Dt LGAMMA 3
-.Os BSD 4.3
-.Sh NAME
-.Nm lgamma ,
-.Nm lgammaf ,
-.Nm gamma ,
-.Nm gammaf
-.Nd log gamma functions, gamma functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft extern int
-.Fa signgam ;
-.sp
-.Ft double
-.Fn lgamma "double x"
-.Ft float
-.Fn lgammaf "float x"
-.Ft double
-.Fn gamma "double x"
-.Ft float
-.Fn gammaf "float x"
-.Sh DESCRIPTION
-.Fn lgamma x
-and
-.Fn lgammaf x
-.if t \{\
-return ln\||\(*G(x)| where
-.Bd -unfilled -offset indent
-\(*G(x) = \(is\d\s8\z0\s10\u\u\s8\(if\s10\d t\u\s8x\-1\s10\d e\u\s8\-t\s10\d dt for x > 0 and
-.br
-\(*G(x) = \(*p/(\(*G(1\-x)\|sin(\(*px)) for x < 1.
-.Ed
-.\}
-.if n \
-return ln\||\(*G(x)|.
-.Pp
-The external integer
-.Fa signgam
-returns the sign of \(*G(x).
-.Pp
-.Fn gamma x
-and
-.Fn gammaf x
-return \(*G(x), with no effect on
-.Fa signgam .
-.Sh IDIOSYNCRASIES
-Do not use the expression
-.Dq Li signgam\(**exp(lgamma(x))
-to compute g := \(*G(x).
-Instead use a program like this (in C):
-.Bd -literal -offset indent
-lg = lgamma(x); g = signgam\(**exp(lg);
-.Ed
-.Pp
-Only after
-.Fn lgamma
-or
-.Fn lgammaf
-has returned can signgam be correct.
-.Pp
-For arguments in its range,
-.Fn gamma
-and
-.Fn gammaf
-is preferred, as for positive arguments
-it is accurate to within one unit in the last place.
-Exponentiation of
-.Fn lgamma
-will lose up to 10 significant bits.
-.Sh RETURN VALUES
-.Fn gamma ,
-.Fn gammaf ,
-.Fn lgamma ,
-and
-.Fn lgammaf
-return appropriate values unless an argument is out of range.
-Overflow will occur for sufficiently large positive values, and
-non-positive integers.
-On the
-.Tn VAX,
-the reserved operator is returned,
-and
-.Va errno
-is set to
-.Er ERANGE
-For large non-integer negative values,
-.Fn gamma
-will underflow.
-.Sh SEE ALSO
-.Xr math 3
-.Sh HISTORY
-The
-.Nm lgamma
-function appeared in
-.Bx 4.3 .
-The
-.Nm gamma
-function appeared in
-.Bx 4.4 .
-The name
-.Fn gamma
-was originally dedicated to the
-.Fn lgamma
-function, so some old code may no longer be compatible.
diff --git a/lib/msun/man/math.3 b/lib/msun/man/math.3
deleted file mode 100644
index a692b5f..0000000
--- a/lib/msun/man/math.3
+++ /dev/null
@@ -1,635 +0,0 @@
-.\" Copyright (c) 1985 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)math.3 6.10 (Berkeley) 5/6/91
-.\" $Id$
-.\"
-.TH MATH 3M "May 6, 1991"
-.UC 4
-.ds up \fIulp\fR
-.ds nn \fINaN\fR
-.de If
-.if n \\
-\\$1Infinity\\$2
-.if t \\
-\\$1\\(if\\$2
-..
-.SH NAME
-math \- introduction to mathematical library functions
-.SH DESCRIPTION
-These functions constitute the C math library,
-.I libm.
-The link editor searches this library under the \*(lq\-lm\*(rq option.
-Declarations for these functions may be obtained from the include file
-.RI < math.h >.
-.\" The Fortran math library is described in ``man 3f intro''.
-.SH "LIST OF FUNCTIONS"
-Each of the following double functions has a float counterpart with the
-name ending in f, as an example the float counterpart of double acos(double
-x) is float acosf(float x).
-.sp 2
-.nf
-.ta \w'copysign'u+2n +\w'infnan.3m'u+10n +\w'inverse trigonometric func'u
-\fIName\fP \fIAppears on Page\fP \fIDescription\fP \fIError Bound (ULPs)\fP
-.ta \w'copysign'u+4n +\w'infnan.3m'u+4n +\w'inverse trigonometric function'u+6nC
-.sp 5p
-acos sin.3m inverse trigonometric function 3
-acosh asinh.3m inverse hyperbolic function 3
-asin sin.3m inverse trigonometric function 3
-asinh asinh.3m inverse hyperbolic function 3
-atan sin.3m inverse trigonometric function 1
-atanh asinh.3m inverse hyperbolic function 3
-atan2 sin.3m inverse trigonometric function 2
-cabs hypot.3m complex absolute value 1
-cbrt sqrt.3m cube root 1
-ceil floor.3m integer no less than 0
-copysign ieee.3m copy sign bit 0
-cos sin.3m trigonometric function 1
-cosh sinh.3m hyperbolic function 3
-erf erf.3m error function ???
-erfc erf.3m complementary error function ???
-exp exp.3m exponential 1
-expm1 exp.3m exp(x)\-1 1
-fabs floor.3m absolute value 0
-floor floor.3m integer no greater than 0
-hypot hypot.3m Euclidean distance 1
-ilogb ieee.3m exponent extraction 0
-j0 j0.3m bessel function ???
-j1 j0.3m bessel function ???
-jn j0.3m bessel function ???
-lgamma lgamma.3m log gamma function; (formerly gamma.3m)
-log exp.3m natural logarithm 1
-log10 exp.3m logarithm to base 10 3
-log1p exp.3m log(1+x) 1
-pow exp.3m exponential x**y 60\-500
-remainder ieee.3m remainder 0
-rint floor.3m round to nearest integer 0
-scalbn ieee.3m exponent adjustment 0
-sin sin.3m trigonometric function 1
-sinh sinh.3m hyperbolic function 3
-sqrt sqrt.3m square root 1
-tan sin.3m trigonometric function 3
-tanh sinh.3m hyperbolic function 3
-y0 j0.3m bessel function ???
-y1 j0.3m bessel function ???
-yn j0.3m bessel function ???
-.ta
-.fi
-.SH NOTES
-In 4.3 BSD, distributed from the University of California
-in late 1985, most of the foregoing functions come in two
-versions, one for the double\-precision "D" format in the
-DEC VAX\-11 family of computers, another for double\-precision
-arithmetic conforming to the IEEE Standard 754 for Binary
-Floating\-Point Arithmetic. The two versions behave very
-similarly, as should be expected from programs more accurate
-and robust than was the norm when UNIX was born. For
-instance, the programs are accurat ere accurn the numbers
-of \*(ups tabulated above; an \*(up is one \fIU\fRnit in the \fIL\fRast
-\fIP\fRlace. And the progrod the prbeen cured of anomalies that
-afflicted the older mat` older math library \fIlibm\fR in which incidents like
-the followineported:
-.RS
-sqrt(\-1.0) = 0.0 and log(\-1.0) = \-1.7e38.
-.br
-cos(1.0e\-11) > cos(0.0) > 1.0.
-.br
-pow(x,1.0)
-.if n \
-!=
-.if t \
-\(!=
-x when x = 2.0, 3.0, 4.0, ..., 9.0.
-.br
-pow(\-1.0,1.0e10) trapped on Integer Overflow.
-.br
-sqrt(1.0e30) and sqrt(1.0e\-30) were very slow.
-.RE
-However the two versions do differ in ways that have to be
-explained, to which end the following notes are provided.
-.PP
-\fBDEC VAX\-11 D_floating\-point:\fR
-.PP
-This is the format for which the original math library \fIlibm\fR
-was developed, and to which this manual is still principally
-dedicated. It is \fIthe\fR double\-precision format for the PDP\-11
-and the earlier VAX\-11 machines; VAX\-11s after 1983 were
-provided with an optional "G" format closer to the IEEE
-double\-precision format. The earlier DEC MicroVAXs have no
-D format, only G double\-precision. (Why? Why not?)
-.PP
-Properties of D_floating\-point:
-.RS
-Wordsize: 64 bits, 8 bytes. Radix: Binary.
-.br
-Precision: 56
-.if n \
-sig.
-.if t \
-significant
-bits, roughly like 17
-.if n \
-sig.
-.if t \
-significant
-decimals.
-.RS
-If x and x' are consecutive positive D_floating\-point
-numbers (they differ by 1 \*(up), then
-.br
-1.3e\-17 < 0.5**56 < (x'\-x)/x \(<= 0.5**55 < 2.8e\-17.
-.RE
-.nf
-.ta \w'Range:'u+1n +\w'Underflow threshold'u+1n +\w'= 2.0**127'u+1n
-Range: Overflow threshold = 2.0**127 = 1.7e38.
- Underflow threshold = 0.5**128 = 2.9e\-39.
- NOTE: THIS RANGE IS COMPARATIVELY NARROW.
-.ta
-.fi
-.RS
-Overflow customarily stops computation.
-.br
-Underflow is customarily flushed quietly to zero.
-.br
-CAUTION:
-.RS
-It is possible to have x
-.if n \
-!=
-.if t \
-\(!=
-y and yet
-x\-y = 0 because of underflow. Similarly
-x > y > 0 cannot prevent either x\(**y = 0
-or y/x = 0 from happening without warning.
-.RE
-.RE
-Zero is represented ambiguously.
-.RS
-Although 2**55 different representations of zero are accepted by
-the hardware, only the obvious representation is ever produced.
-There is no \-0 on a VAX.
-.RE
-.If
-is not part of the VAX architecture.
-.br
-Reserved operands:
-.RS
-of the 2**55 that the hardware
-recognizes, only one of them is ever produced.
-Any floating\-point operation upon a reserved
-operand, even a MOVF or MOVD, customarily stops
-computation, so they are not much used.
-.RE
-Exceptions:
-.RS
-Divisions by zero and operations that
-overflow are invalid operations that customarily
-stop computation or, in earlier machines, produce
-reserved operands that will stop computation.
-.RE
-Rounding:
-.RS
-Every rational operation (+, \-, \(**, /) on a
-VAX (but not necessarily on a PDP\-11), if not an
-over/underflow nor division by zero, is rounded to
-within half an \*(up, and when the rounding error is
-exactly half an \*(up then rounding is away from 0.
-.RE
-.RE
-.PP
-Except for its narrow range, D_floating\-point is one of the
-better computer arithmetics designed in the 1960's.
-Its properties are reflected fairly faithfully in the elementary
-functions for a VAX distributed in 4.3 BSD.
-They over/underflow only if their results have to lie out of range
-or very nearly so, and then they behave much as any rational
-arithmetic operation that over/underflowed would behave.
-Similarly, expressions like log(0) and atanh(1) behave
-like 1/0; and sqrt(\-3) and acos(3) behave like 0/0;
-they all produce reserved operands and/or stop computation!
-The situation is described in more detail in manual pages.
-.RS
-.ll -0.5i
-\fIThis response seems excessively punitive, so it is destined
-to be replaced at some time in the foreseeable future by a
-more flexible but still uniform scheme being developed to
-handle all floating\-point arithmetic exceptions neatly.
-.\" See infnan(3M) for the present state of affairs.\fR
-.ll +0.5i
-.RE
-.PP
-How do the functions in 4.3 BSD's new \fIlibm\fR for UNIX
-compare with their counterparts in DEC's VAX/VMS library?
-Some of the VMS functions are a little faster, some are
-a little more accurate, some are more puritanical about
-exceptions (like pow(0.0,0.0) and atan2(0.0,0.0)),
-and most occupy much more memory than their counterparts in
-\fIlibm\fR.
-The VMS codes interpolate in large table to achieve
-speed and accuracy; the \fIlibm\fR codes use tricky formulas
-compact enough that all of them may some day fit into a ROM.
-.PP
-More important, DEC regards the VMS codes as proprietary
-and guards them zealously against unauthorized use. But the
-\fIlibm\fR codes in 4.3 BSD are intended for the public domain;
-they may be copied freely provided their provenance is always
-acknowledged, and provided users assist the authors in their
-researches by reporting experience with the codes.
-Therefore no user of UNIX on a machine whose arithmetic resembles
-VAX D_floating\-point need use anything worse than the new \fIlibm\fR.
-.PP
-\fBIEEE STANDARD 754 Floating\-Point Arithmetic:\fR
-.PP
-This standard is on its way to becoming more widely adopted
-than any other design for computer arithmetic.
-VLSI chips that conform to some version of that standard have been
-produced by a host of manufacturers, among them ...
-.nf
-.ta 0.5i +\w'Intel i8070, i80287'u+6n
- Intel i8087, i80287 National Semiconductor 32081
- Motorola 68881 Weitek WTL-1032, ... , -1165
- Zilog Z8070 Western Electric (AT&T) WE32106.
-.ta
-.fi
-Other implementations range from software, done thoroughly
-in the Apple Macintosh, through VLSI in the Hewlett\-Packard
-9000 series, to the ELXSI 6400 running ECL at 3 Megaflops.
-Several other companies have adopted the formats
-of IEEE 754 without, alas, adhering to the standard's way
-of handling rounding and exceptions like over/underflow.
-The DEC VAX G_floating\-point format is very similar to the IEEE
-754 Double format, so similar that the C programs for the
-IEEE versions of most of the elementary functions listed
-above could easily be converted to run on a MicroVAX, though
-nobody has volunteered to do that yet.
-.PP
-The codes in 4.3 BSD's \fIlibm\fR for machines that conform to
-IEEE 754 are intended primarily for the National Semi. 32081
-and WTL 1164/65. To use these codes with the Intel or Zilog
-chips, or with the Apple Macintosh or ELXSI 6400, is to
-forego the use of better codes provided (perhaps freely) by
-those companies and designed by some of the authors of the
-codes above.
-Except for \fIatan\fR, \fIcabs\fR, \fIcbrt\fR, \fIerf\fR,
-\fIerfc\fR, \fIhypot\fR, \fIj0\-jn\fR, \fIlgamma\fR, \fIpow\fR
-and \fIy0\-yn\fR,
-the Motorola 68881 has all the functions in \fIlibm\fR on chip,
-and faster and more accurate;
-it, Apple, the i8087, Z8070 and WE32106 all use 64
-.if n \
-sig.
-.if t \
-significant
-bits.
-The main virtue of 4.3 BSD's
-\fIlibm\fR codes is that they are intended for the public domain;
-they may be copied freely provided their provenance is always
-acknowledged, and provided users assist the authors in their
-researches by reporting experience with the codes.
-Therefore no user of UNIX on a machine that conforms to
-IEEE 754 need use anything worse than the new \fIlibm\fR.
-.PP
-Properties of IEEE 754 Double\-Precision:
-.RS
-Wordsize: 64 bits, 8 bytes. Radix: Binary.
-.br
-Precision: 53
-.if n \
-sig.
-.if t \
-significant
-bits, roughly like 16
-.if n \
-sig.
-.if t \
-significant
-decimals.
-.RS
-If x and x' are consecutive positive Double\-Precision
-numbers (they differ by 1 \*(up), then
-.br
-1.1e\-16 < 0.5**53 < (x'\-x)/x \(<= 0.5**52 < 2.3e\-16.
-.RE
-.nf
-.ta \w'Range:'u+1n +\w'Underflow threshold'u+1n +\w'= 2.0**1024'u+1n
-Range: Overflow threshold = 2.0**1024 = 1.8e308
- Underflow threshold = 0.5**1022 = 2.2e\-308
-.ta
-.fi
-.RS
-Overflow goes by default to a signed
-.If "" .
-.br
-Underflow is \fIGradual,\fR rounding to the nearest
-integer multiple of 0.5**1074 = 4.9e\-324.
-.RE
-Zero is represented ambiguously as +0 or \-0.
-.RS
-Its sign transforms correctly through multiplication or
-division, and is preserved by addition of zeros
-with like signs; but x\-x yields +0 for every
-finite x. The only operations that reveal zero's
-sign are division by zero and copysign(x,\(+-0).
-In particular, comparison (x > y, x \(>= y, etc.)
-cannot be affected by the sign of zero; but if
-finite x = y then
-.If
-\&= 1/(x\-y)
-.if n \
-!=
-.if t \
-\(!=
-\-1/(y\-x) =
-.If \- .
-.RE
-.If
-is signed.
-.RS
-it persists when added to itself
-or to any finite number. Its sign transforms
-correctly through multiplication and division, and
-.If (finite)/\(+- \0=\0\(+-0
-(nonzero)/0 =
-.If \(+- .
-But
-.if n \
-Infinity\-Infinity, Infinity\(**0 and Infinity/Infinity
-.if t \
-\(if\-\(if, \(if\(**0 and \(if/\(if
-are, like 0/0 and sqrt(\-3),
-invalid operations that produce \*(nn. ...
-.RE
-Reserved operands:
-.RS
-there are 2**53\-2 of them, all
-called \*(nn (\fIN\fRot \fIa N\fRumber).
-Some, called Signaling \*(nns, trap any floating\-point operation
-performed upon them; they are used to mark missing
-or uninitialized values, or nonexistent elements
-of arrays. The rest are Quiet \*(nns; they are
-the default results of Invalid Operations, and
-propagate through subsequent arithmetic operations.
-If x
-.if n \
-!=
-.if t \
-\(!=
-x then x is \*(nn; every other predicate
-(x > y, x = y, x < y, ...) is FALSE if \*(nn is involved.
-.br
-NOTE: Trichotomy is violated by \*(nn.
-.RS
-Besides being FALSE, predicates that entail ordered
-comparison, rather than mere (in)equality,
-signal Invalid Operation when \*(nn is involved.
-.RE
-.RE
-Rounding:
-.RS
-Every algebraic operation (+, \-, \(**, /,
-.if n \
-sqrt)
-.if t \
-\(sr)
-is rounded by default to within half an \*(up, and
-when the rounding error is exactly half an \*(up then
-the rounded value's least significant bit is zero.
-This kind of rounding is usually the best kind,
-sometimes provably so; for instance, for every
-x = 1.0, 2.0, 3.0, 4.0, ..., 2.0**52, we find
-(x/3.0)\(**3.0 == x and (x/10.0)\(**10.0 == x and ...
-despite that both the quotients and the products
-have been rounded. Only rounding like IEEE 754
-can do that. But no single kind of rounding can be
-proved best for every circumstance, so IEEE 754
-provides rounding towards zero or towards
-.If +
-or towards
-.If \-
-at the programmer's option. And the
-same kinds of rounding are specified for
-Binary\-Decimal Conversions, at least for magnitudes
-between roughly 1.0e\-10 and 1.0e37.
-.RE
-Exceptions:
-.RS
-IEEE 754 recognizes five kinds of floating\-point exceptions,
-listed below in declining order of probable importance.
-.RS
-.nf
-.ta \w'Invalid Operation'u+6n +\w'Gradual Underflow'u+2n
-Exception Default Result
-.tc \(ru
-
-.tc
-Invalid Operation \*(nn, or FALSE
-.if n \{\
-Overflow \(+-Infinity
-Divide by Zero \(+-Infinity \}
-.if t \{\
-Overflow \(+-\(if
-Divide by Zero \(+-\(if \}
-Underflow Gradual Underflow
-Inexact Rounded value
-.ta
-.fi
-.RE
-NOTE: An Exception is not an Error unless handled
-badly. What makes a class of exceptions exceptional
-is that no single default response can be satisfactory
-in every instance. On the other hand, if a default
-response will serve most instances satisfactorily,
-the unsatisfactory instances cannot justify aborting
-computation every time the exception occurs.
-.RE
-.PP
-For each kind of floating\-point exception, IEEE 754
-provides a Flag that is raised each time its exception
-is signaled, and stays raised until the program resets
-it. Programs may also test, save and restore a flag.
-Thus, IEEE 754 provides three ways by which programs
-may cope with exceptions for which the default result
-might be unsatisfactory:
-.IP 1) \w'\0\0\0\0'u
-Test for a condition that might cause an exception
-later, and branch to avoid the exception.
-.IP 2) \w'\0\0\0\0'u
-Test a flag to see whether an exception has occurred
-since the program last reset its flag.
-.IP 3) \w'\0\0\0\0'u
-Test a result to see whether it is a value that only
-an exception could have produced.
-.RS
-CAUTION: The only reliable ways to discover
-whether Underflow has occurred are to test whether
-products or quotients lie closer to zero than the
-underflow threshold, or to test the Underflow
-flag. (Sums and differences cannot underflow in
-IEEE 754; if x
-.if n \
-!=
-.if t \
-\(!=
-y then x\-y is correct to
-full precision and certainly nonzero regardless of
-how tiny it may be.) Products and quotients that
-underflow gradually can lose accuracy gradually
-without vanishing, so comparing them with zero
-(as one might on a VAX) will not reveal the loss.
-Fortunately, if a gradually underflowed value is
-destined to be added to something bigger than the
-underflow threshold, as is almost always the case,
-digits lost to gradual underflow will not be missed
-because they would have been rounded off anyway.
-So gradual underflows are usually \fIprovably\fR ignorable.
-The same cannot be said of underflows flushed to 0.
-.RE
-.PP
-At the option of an implementor conforming to IEEE 754,
-other ways to cope with exceptions may be provided:
-.IP 4) \w'\0\0\0\0'u
-ABORT. This mechanism classifies an exception in
-advance as an incident to be handled by means
-traditionally associated with error\-handling
-statements like "ON ERROR GO TO ...". Different
-languages offer different forms of this statement,
-but most share the following characteristics:
-.IP \(em \w'\0\0\0\0'u
-No means is provided to substitute a value for
-the offending operation's result and resume
-computation from what may be the middle of an
-expression. An exceptional result is abandoned.
-.IP \(em \w'\0\0\0\0'u
-In a subprogram that lacks an error\-handling
-statement, an exception causes the subprogram to
-abort within whatever program called it, and so
-on back up the chain of calling subprograms until
-an error\-handling statement is encountered or the
-whole task is aborted and memory is dumped.
-.IP 5) \w'\0\0\0\0'u
-STOP. This mechanism, requiring an interactive
-debugging environment, is more for the programmer
-than the program. It classifies an exception in
-advance as a symptom of a programmer's error; the
-exception suspends execution as near as it can to
-the offending operation so that the programmer can
-look around to see how it happened. Quite often
-the first several exceptions turn out to be quite
-unexceptionable, so the programmer ought ideally
-to be able to resume execution after each one as if
-execution had not been stopped.
-.IP 6) \w'\0\0\0\0'u
-\&... Other ways lie beyond the scope of this document.
-.RE
-.PP
-The crucial problem for exception handling is the problem of
-Scope, and the problem's solution is understood, but not
-enough manpower was available to implement it fully in time
-to be distributed in 4.3 BSD's \fIlibm\fR. Ideally, each
-elementary function should act as if it were indivisible, or
-atomic, in the sense that ...
-.IP i) \w'iii)'u+2n
-No exception should be signaled that is not deserved by
-the data supplied to that function.
-.IP ii) \w'iii)'u+2n
-Any exception signaled should be identified with that
-function rather than with one of its subroutines.
-.IP iii) \w'iii)'u+2n
-The internal behavior of an atomic function should not
-be disrupted when a calling program changes from
-one to another of the five or so ways of handling
-exceptions listed above, although the definition
-of the function may be correlated intentionally
-with exception handling.
-.PP
-Ideally, every programmer should be able \fIconveniently\fR to
-turn a debugged subprogram into one that appears atomic to
-its users. But simulating all three characteristics of an
-atomic function is still a tedious affair, entailing hosts
-of tests and saves\-restores; work is under way to ameliorate
-the inconvenience.
-.PP
-Meanwhile, the functions in \fIlibm\fR are only approximately
-atomic. They signal no inappropriate exception except
-possibly ...
-.RS
-Over/Underflow
-.RS
-when a result, if properly computed, might have lain barely within range, and
-.RE
-Inexact in \fIcabs\fR, \fIcbrt\fR, \fIhypot\fR, \fIlog10\fR and \fIpow\fR
-.RS
-when it happens to be exact, thanks to fortuitous cancellation of errors.
-.RE
-.RE
-Otherwise, ...
-.RS
-Invalid Operation is signaled only when
-.RS
-any result but \*(nn would probably be misleading.
-.RE
-Overflow is signaled only when
-.RS
-the exact result would be finite but beyond the overflow threshold.
-.RE
-Divide\-by\-Zero is signaled only when
-.RS
-a function takes exactly infinite values at finite operands.
-.RE
-Underflow is signaled only when
-.RS
-the exact result would be nonzero but tinier than the underflow threshold.
-.RE
-Inexact is signaled only when
-.RS
-greater range or precision would be needed to represent the exact result.
-.RE
-.RE
-.SH BUGS
-When signals are appropriate, they are emitted by certain
-operations within the codes, so a subroutine\-trace may be
-needed to identify the function with its signal in case
-method 5) above is in use. And the codes all take the
-IEEE 754 defaults for granted; this means that a decision to
-trap all divisions by zero could disrupt a code that would
-otherwise get correct results despite division by zero.
-.SH SEE ALSO
-An explanation of IEEE 754 and its proposed extension p854
-was published in the IEEE magazine MICRO in August 1984 under
-the title "A Proposed Radix\- and Word\-length\-independent
-Standard for Floating\-point Arithmetic" by W. J. Cody et al.
-The manuals for Pascal, C and BASIC on the Apple Macintosh
-document the features of IEEE 754 pretty well.
-Articles in the IEEE magazine COMPUTER vol. 14 no. 3 (Mar.
-1981), and in the ACM SIGNUM Newsletter Special Issue of
-Oct. 1979, may be helpful although they pertain to
-superseded drafts of the standard.
diff --git a/lib/msun/man/rint.3 b/lib/msun/man/rint.3
deleted file mode 100644
index 5aa591d..0000000
--- a/lib/msun/man/rint.3
+++ /dev/null
@@ -1,68 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)rint.3 5.1 (Berkeley) 5/2/91
-.\" $Id$
-.\"
-.Dd March 10, 1994
-.Dt RINT 3
-.Os
-.Sh NAME
-.Nm rint ,
-.Nm rintf
-.Nd round to integral value in floating-point format
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn rint "double x"
-.Ft float
-.Fn rintf "float x"
-.Sh DESCRIPTION
-The
-.Fn rint
-and the
-.Fn rintf
-functions return the integral value (represented as a double or float
-precision number) nearest to
-.Fa x
-according to the prevailing rounding mode.
-.Sh SEE ALSO
-.Xr abs 3 ,
-.Xr ceil 3 ,
-.Xr fabs 3 ,
-.Xr floor 3 ,
-.Xr ieee 3 ,
-.Xr math 3
-.Sh HISTORY
-A
-.Fn rint
-function appeared in
-.At v6 .
diff --git a/lib/msun/man/sin.3 b/lib/msun/man/sin.3
deleted file mode 100644
index 222f24b..0000000
--- a/lib/msun/man/sin.3
+++ /dev/null
@@ -1,80 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" @(#)sin.3 6.7 (Berkeley) 4/19/91
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)sin.3 6.7 (Berkeley) 4/19/91
-.\" $Id$
-.\"
-.Dd April 19, 1991
-.Dt SIN 3
-.Os
-.Sh NAME
-.Nm sin ,
-.Nm sinf
-.Nd sine functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn sin "double x"
-.Ft float
-.Fn sinf "float x"
-.Sh DESCRIPTION
-The
-.Fn sin
-and the
-.Fn sinf
-functions compute the sine of
-.Fa x
-(measured in radians).
-A large magnitude argument may yield a result with little
-or no significance.
-.Sh RETURN VALUES
-The
-.Fn sin
-and the
-.Fn sinf
-functions return the sine value.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sinh 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn sin
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/sinh.3 b/lib/msun/man/sinh.3
deleted file mode 100644
index 91b17f1..0000000
--- a/lib/msun/man/sinh.3
+++ /dev/null
@@ -1,82 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)sinh.3 6.6 (Berkeley) 4/19/91
-.\" $Id$
-.Dd April 19, 1991
-.Dt SINH 3
-.Os
-.Sh NAME
-.Nm sinh ,
-.Nm sinhf
-.Nd hyperbolic sine function
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn sinh "double x"
-.Ft float
-.Fn sinhf "float x"
-.Sh DESCRIPTION
-The
-.Fn sinh
-and the
-.Fn sinhf
-functions compute the hyperbolic sine of
-.Fa x .
-.Sh RETURN VALUES
-The
-.Fn sinh
-and the
-.Fn sinhf
-functions return the hyperbolic sine value unless
-the magnitude
-of
-.Fa x
-is too large; in this event, the global variable
-.Va errno
-is set to
-.Er ERANGE .
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr tan 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn sinh
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/sqrt.3 b/lib/msun/man/sqrt.3
deleted file mode 100644
index d3e698d..0000000
--- a/lib/msun/man/sqrt.3
+++ /dev/null
@@ -1,134 +0,0 @@
-.\" Copyright (c) 1985, 1991 Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)sqrt.3 6.4 (Berkeley) 5/6/91
-.\" $Id$
-.\"
-.Dd May 6, 1991
-.Dt SQRT 3
-.Os
-.Sh NAME
-.Nm cbrt ,
-.Nm cbrtf ,
-.Nm sqrt ,
-.Nm sqrtf
-.Nd cube root and square root functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn cbrt "double x"
-.Ft float
-.Fn cbrtf "float x"
-.Ft double
-.Fn sqrt "double x"
-.Ft float
-.Fn sqrtf "float x"
-.Sh DESCRIPTION
-The
-.Fn cbrt
-and the
-.Fn cbrtf
-functions compute
-the cube root of
-.Ar x .
-.Pp
-The
-.Fn sqrt
-and the
-.Fn sqrtf
-functions compute the
-non-negative square root of x.
-.Sh RETURN VALUES
-The
-.Fn cbrt
-and the
-.Fn cbrtf
-functions return the requested cube root.
-The
-.Fn sqrt
-and the
-.Fn sqrtf
-functions return the requested square root
-unless an error occurs.
-On the
-.Tn VAX
-or
-.Tn Tahoe
-processor an attempt to take the
-.Fn sqrt
-of negative
-.Fa x
-causes an error; in this event,
-the global variable
-.Va errno
-is set to
-.Dv EDOM
-and a reserved operand fault is generated.
-.Sh ERROR (due to Roundoff etc.)
-The
-.Fn cbrt
-function
-is accurate to within 0.7
-.Em ulps .
-.Pp
-The
-.Fn sqrt
-function on a
-.Tn VAX
-is accurate to within 0.501
-.Em ulps .
-Sqrt on a machine that conforms to
-.Tn IEEE
-754 is correctly rounded
-in accordance with the rounding mode in force; the error is less than
-half an
-.Em ulp
-in the default mode (round\-to\-nearest).
-An
-.Em ulp
-is one
-.Em U Ns nit
-in the
-.Em L Ns ast
-.Em P Ns lace
-carried.
-.Sh SEE ALSO
-.Xr math 3
-.Sh STANDARDS
-The
-.Nm sqrt
-function conforms to
-.St -ansiC .
-.Sh HISTORY
-The
-.Nm cbrt
-function appeared in
-.Bx 4.3 .
diff --git a/lib/msun/man/tan.3 b/lib/msun/man/tan.3
deleted file mode 100644
index 21af639..0000000
--- a/lib/msun/man/tan.3
+++ /dev/null
@@ -1,79 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)tan.3 5.1 (Berkeley) 5/2/91
-.\" $Id$
-.\"
-.Dd May 2, 1991
-.Dt TAN 3
-.Os
-.Sh NAME
-.Nm tan ,
-.Nm tanf
-.Nd tangent functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn tan "double x"
-.Ft float
-.Fn tanf "float x"
-.Sh DESCRIPTION
-The
-.Fn tan
-and the
-.Fn tanf
-functions compute the tangent of
-.Fa x
-(measured in radians).
-A large magnitude argument may yield a result
-with little or no significance.
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn tan
-function returns the tangent value.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tanh 3
-.Sh STANDARDS
-The
-.Fn tan
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/man/tanh.3 b/lib/msun/man/tanh.3
deleted file mode 100644
index 3d5f902..0000000
--- a/lib/msun/man/tanh.3
+++ /dev/null
@@ -1,78 +0,0 @@
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\" from: @(#)tanh.3 5.1 (Berkeley) 5/2/91
-.\" $Id$
-.\"
-.Dd May 2, 1991
-.Dt TANH 3
-.Os
-.Sh NAME
-.Nm tanh ,
-.Nm tanhf
-.Nd hyperbolic tangent functions
-.Sh SYNOPSIS
-.Fd #include <math.h>
-.Ft double
-.Fn tanh "double x"
-.Ft float
-.Fn tanhf "float x"
-.Sh DESCRIPTION
-The
-.Fn tanh
-and the
-.Fn tanhf
-functions compute the hyperbolic tangent of
-.Fa x .
-For a discussion of error due to roundoff, see
-.Xr math 3 .
-.Sh RETURN VALUES
-The
-.Fn tanh
-and the
-.Fn tanhf
-functions return the hyperbolic tangent value.
-.Sh SEE ALSO
-.Xr acos 3 ,
-.Xr asin 3 ,
-.Xr atan 3 ,
-.Xr atan2 3 ,
-.Xr cos 3 ,
-.Xr cosh 3 ,
-.Xr math 3 ,
-.Xr sin 3 ,
-.Xr sinh 3 ,
-.Xr tan 3
-.Sh STANDARDS
-The
-.Fn tanh
-function conforms to
-.St -ansiC .
diff --git a/lib/msun/src/e_acos.c b/lib/msun/src/e_acos.c
deleted file mode 100644
index da965af..0000000
--- a/lib/msun/src/e_acos.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* @(#)e_acos.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_acos.c,v 1.5 1997/02/22 15:09:54 peter Exp $";
-#endif
-
-/* __ieee754_acos(x)
- * Method :
- * acos(x) = pi/2 - asin(x)
- * acos(-x) = pi/2 + asin(x)
- * For |x|<=0.5
- * acos(x) = pi/2 - (x + x*x^2*R(x^2)) (see asin.c)
- * For x>0.5
- * acos(x) = pi/2 - (pi/2 - 2asin(sqrt((1-x)/2)))
- * = 2asin(sqrt((1-x)/2))
- * = 2s + 2s*z*R(z) ...z=(1-x)/2, s=sqrt(z)
- * = 2f + (2c + 2s*z*R(z))
- * where f=hi part of s, and c = (z-f*f)/(s+f) is the correction term
- * for f so that f+c ~ sqrt(z).
- * For x<-0.5
- * acos(x) = pi - 2asin(sqrt((1-|x|)/2))
- * = pi - 0.5*(s+s*z*R(z)), where z=(1-|x|)/2,s=sqrt(z)
- *
- * Special cases:
- * if x is NaN, return x itself;
- * if |x|>1, return NaN with invalid signal.
- *
- * Function needed: __ieee754_sqrt
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
-pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
-pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
-pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */
-pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */
-pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */
-pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */
-pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */
-pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */
-pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */
-qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */
-qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
-qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
-qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
-
-#ifdef __STDC__
- double __generic___ieee754_acos(double x)
-#else
- double __generic___ieee754_acos(x)
- double x;
-#endif
-{
- double z,p,q,r,w,s,c,df;
- int32_t hx,ix;
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x3ff00000) { /* |x| >= 1 */
- u_int32_t lx;
- GET_LOW_WORD(lx,x);
- if(((ix-0x3ff00000)|lx)==0) { /* |x|==1 */
- if(hx>0) return 0.0; /* acos(1) = 0 */
- else return pi+2.0*pio2_lo; /* acos(-1)= pi */
- }
- return (x-x)/(x-x); /* acos(|x|>1) is NaN */
- }
- if(ix<0x3fe00000) { /* |x| < 0.5 */
- if(ix<=0x3c600000) return pio2_hi+pio2_lo;/*if|x|<2**-57*/
- z = x*x;
- p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
- q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
- r = p/q;
- return pio2_hi - (x - (pio2_lo-x*r));
- } else if (hx<0) { /* x < -0.5 */
- z = (one+x)*0.5;
- p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
- q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
- s = __ieee754_sqrt(z);
- r = p/q;
- w = r*s-pio2_lo;
- return pi - 2.0*(s+w);
- } else { /* x > 0.5 */
- z = (one-x)*0.5;
- s = __ieee754_sqrt(z);
- df = s;
- SET_LOW_WORD(df,0);
- c = (z-df*df)/(s+df);
- p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
- q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
- r = p/q;
- w = r*s+c;
- return 2.0*(df+w);
- }
-}
diff --git a/lib/msun/src/e_acosf.c b/lib/msun/src/e_acosf.c
deleted file mode 100644
index f3c6a50..0000000
--- a/lib/msun/src/e_acosf.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* e_acosf.c -- float version of e_acos.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_acosf.c,v 1.4 1997/02/22 15:09:55 peter Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-one = 1.0000000000e+00, /* 0x3F800000 */
-pi = 3.1415925026e+00, /* 0x40490fda */
-pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
-pio2_lo = 7.5497894159e-08, /* 0x33a22168 */
-pS0 = 1.6666667163e-01, /* 0x3e2aaaab */
-pS1 = -3.2556581497e-01, /* 0xbea6b090 */
-pS2 = 2.0121252537e-01, /* 0x3e4e0aa8 */
-pS3 = -4.0055535734e-02, /* 0xbd241146 */
-pS4 = 7.9153501429e-04, /* 0x3a4f7f04 */
-pS5 = 3.4793309169e-05, /* 0x3811ef08 */
-qS1 = -2.4033949375e+00, /* 0xc019d139 */
-qS2 = 2.0209457874e+00, /* 0x4001572d */
-qS3 = -6.8828397989e-01, /* 0xbf303361 */
-qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
-
-#ifdef __STDC__
- float __ieee754_acosf(float x)
-#else
- float __ieee754_acosf(x)
- float x;
-#endif
-{
- float z,p,q,r,w,s,c,df;
- int32_t hx,ix;
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix==0x3f800000) { /* |x|==1 */
- if(hx>0) return 0.0; /* acos(1) = 0 */
- else return pi+(float)2.0*pio2_lo; /* acos(-1)= pi */
- } else if(ix>0x3f800000) { /* |x| >= 1 */
- return (x-x)/(x-x); /* acos(|x|>1) is NaN */
- }
- if(ix<0x3f000000) { /* |x| < 0.5 */
- if(ix<=0x23000000) return pio2_hi+pio2_lo;/*if|x|<2**-57*/
- z = x*x;
- p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
- q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
- r = p/q;
- return pio2_hi - (x - (pio2_lo-x*r));
- } else if (hx<0) { /* x < -0.5 */
- z = (one+x)*(float)0.5;
- p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
- q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
- s = __ieee754_sqrtf(z);
- r = p/q;
- w = r*s-pio2_lo;
- return pi - (float)2.0*(s+w);
- } else { /* x > 0.5 */
- int32_t idf;
- z = (one-x)*(float)0.5;
- s = __ieee754_sqrtf(z);
- df = s;
- GET_FLOAT_WORD(idf,df);
- SET_FLOAT_WORD(df,idf&0xfffff000);
- c = (z-df*df)/(s+df);
- p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
- q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
- r = p/q;
- w = r*s+c;
- return (float)2.0*(df+w);
- }
-}
diff --git a/lib/msun/src/e_acosh.c b/lib/msun/src/e_acosh.c
deleted file mode 100644
index a471769..0000000
--- a/lib/msun/src/e_acosh.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* @(#)e_acosh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_acosh.c,v 1.4 1997/02/22 15:09:56 peter Exp $";
-#endif
-
-/* __ieee754_acosh(x)
- * Method :
- * Based on
- * acosh(x) = log [ x + sqrt(x*x-1) ]
- * we have
- * acosh(x) := log(x)+ln2, if x is large; else
- * acosh(x) := log(2x-1/(sqrt(x*x-1)+x)) if x>2; else
- * acosh(x) := log1p(t+sqrt(2.0*t+t*t)); where t=x-1.
- *
- * Special cases:
- * acosh(x) is NaN with signal if x<1.
- * acosh(NaN) is NaN without signal.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-one = 1.0,
-ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
-
-#ifdef __STDC__
- double __ieee754_acosh(double x)
-#else
- double __ieee754_acosh(x)
- double x;
-#endif
-{
- double t;
- int32_t hx;
- u_int32_t lx;
- EXTRACT_WORDS(hx,lx,x);
- if(hx<0x3ff00000) { /* x < 1 */
- return (x-x)/(x-x);
- } else if(hx >=0x41b00000) { /* x > 2**28 */
- if(hx >=0x7ff00000) { /* x is inf of NaN */
- return x+x;
- } else
- return __ieee754_log(x)+ln2; /* acosh(huge)=log(2x) */
- } else if(((hx-0x3ff00000)|lx)==0) {
- return 0.0; /* acosh(1) = 0 */
- } else if (hx > 0x40000000) { /* 2**28 > x > 2 */
- t=x*x;
- return __ieee754_log(2.0*x-one/(x+__ieee754_sqrt(t-one)));
- } else { /* 1<x<2 */
- t = x-one;
- return log1p(t+__ieee754_sqrt(2.0*t+t*t));
- }
-}
diff --git a/lib/msun/src/e_acoshf.c b/lib/msun/src/e_acoshf.c
deleted file mode 100644
index 1d234d2..0000000
--- a/lib/msun/src/e_acoshf.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* e_acoshf.c -- float version of e_acosh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_acoshf.c,v 1.4 1997/02/22 15:09:56 peter Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-one = 1.0,
-ln2 = 6.9314718246e-01; /* 0x3f317218 */
-
-#ifdef __STDC__
- float __ieee754_acoshf(float x)
-#else
- float __ieee754_acoshf(x)
- float x;
-#endif
-{
- float t;
- int32_t hx;
- GET_FLOAT_WORD(hx,x);
- if(hx<0x3f800000) { /* x < 1 */
- return (x-x)/(x-x);
- } else if(hx >=0x4d800000) { /* x > 2**28 */
- if(hx >=0x7f800000) { /* x is inf of NaN */
- return x+x;
- } else
- return __ieee754_logf(x)+ln2; /* acosh(huge)=log(2x) */
- } else if (hx==0x3f800000) {
- return 0.0; /* acosh(1) = 0 */
- } else if (hx > 0x40000000) { /* 2**28 > x > 2 */
- t=x*x;
- return __ieee754_logf((float)2.0*x-one/(x+__ieee754_sqrtf(t-one)));
- } else { /* 1<x<2 */
- t = x-one;
- return log1pf(t+__ieee754_sqrtf((float)2.0*t+t*t));
- }
-}
diff --git a/lib/msun/src/e_asin.c b/lib/msun/src/e_asin.c
deleted file mode 100644
index e7814c9..0000000
--- a/lib/msun/src/e_asin.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/* @(#)e_asin.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_asin.c,v 1.6 1997/02/22 15:09:57 peter Exp $";
-#endif
-
-/* __ieee754_asin(x)
- * Method :
- * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ...
- * we approximate asin(x) on [0,0.5] by
- * asin(x) = x + x*x^2*R(x^2)
- * where
- * R(x^2) is a rational approximation of (asin(x)-x)/x^3
- * and its remez error is bounded by
- * |(asin(x)-x)/x^3 - R(x^2)| < 2^(-58.75)
- *
- * For x in [0.5,1]
- * asin(x) = pi/2-2*asin(sqrt((1-x)/2))
- * Let y = (1-x), z = y/2, s := sqrt(z), and pio2_hi+pio2_lo=pi/2;
- * then for x>0.98
- * asin(x) = pi/2 - 2*(s+s*z*R(z))
- * = pio2_hi - (2*(s+s*z*R(z)) - pio2_lo)
- * For x<=0.98, let pio4_hi = pio2_hi/2, then
- * f = hi part of s;
- * c = sqrt(z) - f = (z-f*f)/(s+f) ...f+c=sqrt(z)
- * and
- * asin(x) = pi/2 - 2*(s+s*z*R(z))
- * = pio4_hi+(pio4-2s)-(2s*z*R(z)-pio2_lo)
- * = pio4_hi+(pio4-2f)-(2s*z*R(z)-(pio2_lo+2c))
- *
- * Special cases:
- * if x is NaN, return x itself;
- * if |x|>1, return NaN with invalid signal.
- *
- */
-
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
-huge = 1.000e+300,
-pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
-pio2_lo = 6.12323399573676603587e-17, /* 0x3C91A626, 0x33145C07 */
-pio4_hi = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */
- /* coefficient for R(x^2) */
-pS0 = 1.66666666666666657415e-01, /* 0x3FC55555, 0x55555555 */
-pS1 = -3.25565818622400915405e-01, /* 0xBFD4D612, 0x03EB6F7D */
-pS2 = 2.01212532134862925881e-01, /* 0x3FC9C155, 0x0E884455 */
-pS3 = -4.00555345006794114027e-02, /* 0xBFA48228, 0xB5688F3B */
-pS4 = 7.91534994289814532176e-04, /* 0x3F49EFE0, 0x7501B288 */
-pS5 = 3.47933107596021167570e-05, /* 0x3F023DE1, 0x0DFDF709 */
-qS1 = -2.40339491173441421878e+00, /* 0xC0033A27, 0x1C8A2D4B */
-qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
-qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
-qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
-
-#ifdef __STDC__
- double __generic___ieee754_asin(double x)
-#else
- double __generic___ieee754_asin(x)
- double x;
-#endif
-{
- double t=0.0,w,p,q,c,r,s;
- int32_t hx,ix;
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>= 0x3ff00000) { /* |x|>= 1 */
- u_int32_t lx;
- GET_LOW_WORD(lx,x);
- if(((ix-0x3ff00000)|lx)==0)
- /* asin(1)=+-pi/2 with inexact */
- return x*pio2_hi+x*pio2_lo;
- return (x-x)/(x-x); /* asin(|x|>1) is NaN */
- } else if (ix<0x3fe00000) { /* |x|<0.5 */
- if(ix<0x3e400000) { /* if |x| < 2**-27 */
- if(huge+x>one) return x;/* return x with inexact if x!=0*/
- } else
- t = x*x;
- p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
- q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
- w = p/q;
- return x+x*w;
- }
- /* 1> |x|>= 0.5 */
- w = one-fabs(x);
- t = w*0.5;
- p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
- q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
- s = __ieee754_sqrt(t);
- if(ix>=0x3FEF3333) { /* if |x| > 0.975 */
- w = p/q;
- t = pio2_hi-(2.0*(s+s*w)-pio2_lo);
- } else {
- w = s;
- SET_LOW_WORD(w,0);
- c = (t-w*w)/(s+w);
- r = p/q;
- p = 2.0*s*r-(pio2_lo-2.0*c);
- q = pio4_hi-2.0*w;
- t = pio4_hi-(p-q);
- }
- if(hx>0) return t; else return -t;
-}
diff --git a/lib/msun/src/e_asinf.c b/lib/msun/src/e_asinf.c
deleted file mode 100644
index 593f2e5..0000000
--- a/lib/msun/src/e_asinf.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* e_asinf.c -- float version of e_asin.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_asinf.c,v 1.5 1997/02/22 15:09:58 peter Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-one = 1.0000000000e+00, /* 0x3F800000 */
-huge = 1.000e+30,
-pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
-pio2_lo = 7.5497894159e-08, /* 0x33a22168 */
-pio4_hi = 7.8539818525e-01, /* 0x3f490fdb */
- /* coefficient for R(x^2) */
-pS0 = 1.6666667163e-01, /* 0x3e2aaaab */
-pS1 = -3.2556581497e-01, /* 0xbea6b090 */
-pS2 = 2.0121252537e-01, /* 0x3e4e0aa8 */
-pS3 = -4.0055535734e-02, /* 0xbd241146 */
-pS4 = 7.9153501429e-04, /* 0x3a4f7f04 */
-pS5 = 3.4793309169e-05, /* 0x3811ef08 */
-qS1 = -2.4033949375e+00, /* 0xc019d139 */
-qS2 = 2.0209457874e+00, /* 0x4001572d */
-qS3 = -6.8828397989e-01, /* 0xbf303361 */
-qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
-
-#ifdef __STDC__
- float __ieee754_asinf(float x)
-#else
- float __ieee754_asinf(x)
- float x;
-#endif
-{
- float t=0.0,w,p,q,c,r,s;
- int32_t hx,ix;
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix==0x3f800000) {
- /* asin(1)=+-pi/2 with inexact */
- return x*pio2_hi+x*pio2_lo;
- } else if(ix> 0x3f800000) { /* |x|>= 1 */
- return (x-x)/(x-x); /* asin(|x|>1) is NaN */
- } else if (ix<0x3f000000) { /* |x|<0.5 */
- if(ix<0x32000000) { /* if |x| < 2**-27 */
- if(huge+x>one) return x;/* return x with inexact if x!=0*/
- } else
- t = x*x;
- p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
- q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
- w = p/q;
- return x+x*w;
- }
- /* 1> |x|>= 0.5 */
- w = one-fabsf(x);
- t = w*(float)0.5;
- p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
- q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
- s = __ieee754_sqrtf(t);
- if(ix>=0x3F79999A) { /* if |x| > 0.975 */
- w = p/q;
- t = pio2_hi-((float)2.0*(s+s*w)-pio2_lo);
- } else {
- int32_t iw;
- w = s;
- GET_FLOAT_WORD(iw,w);
- SET_FLOAT_WORD(w,iw&0xfffff000);
- c = (t-w*w)/(s+w);
- r = p/q;
- p = (float)2.0*s*r-(pio2_lo-(float)2.0*c);
- q = pio4_hi-(float)2.0*w;
- t = pio4_hi-(p-q);
- }
- if(hx>0) return t; else return -t;
-}
diff --git a/lib/msun/src/e_atan2.c b/lib/msun/src/e_atan2.c
deleted file mode 100644
index d85db89..0000000
--- a/lib/msun/src/e_atan2.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/* @(#)e_atan2.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_atan2(y,x)
- * Method :
- * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
- * 2. Reduce x to positive by (if x and y are unexceptional):
- * ARG (x+iy) = arctan(y/x) ... if x > 0,
- * ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
- *
- * Special cases:
- *
- * ATAN2((anything), NaN ) is NaN;
- * ATAN2(NAN , (anything) ) is NaN;
- * ATAN2(+-0, +(anything but NaN)) is +-0 ;
- * ATAN2(+-0, -(anything but NaN)) is +-pi ;
- * ATAN2(+-(anything but 0 and NaN), 0) is +-pi/2;
- * ATAN2(+-(anything but INF and NaN), +INF) is +-0 ;
- * ATAN2(+-(anything but INF and NaN), -INF) is +-pi;
- * ATAN2(+-INF,+INF ) is +-pi/4 ;
- * ATAN2(+-INF,-INF ) is +-3pi/4;
- * ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-pi/2;
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
- * to produce the hexadecimal values shown.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-tiny = 1.0e-300,
-zero = 0.0,
-pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */
-pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */
-pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
-pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
-
-#ifdef __STDC__
- double __generic___ieee754_atan2(double y, double x)
-#else
- double __generic___ieee754_atan2(y,x)
- double y,x;
-#endif
-{
- double z;
- int32_t k,m,hx,hy,ix,iy;
- u_int32_t lx,ly;
-
- EXTRACT_WORDS(hx,lx,x);
- ix = hx&0x7fffffff;
- EXTRACT_WORDS(hy,ly,y);
- iy = hy&0x7fffffff;
- if(((ix|((lx|-lx)>>31))>0x7ff00000)||
- ((iy|((ly|-ly)>>31))>0x7ff00000)) /* x or y is NaN */
- return x+y;
- if(((hx-0x3ff00000)|lx)==0) return atan(y); /* x=1.0 */
- m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */
-
- /* when y = 0 */
- if((iy|ly)==0) {
- switch(m) {
- case 0:
- case 1: return y; /* atan(+-0,+anything)=+-0 */
- case 2: return pi+tiny;/* atan(+0,-anything) = pi */
- case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
- }
- }
- /* when x = 0 */
- if((ix|lx)==0) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
-
- /* when x is INF */
- if(ix==0x7ff00000) {
- if(iy==0x7ff00000) {
- switch(m) {
- case 0: return pi_o_4+tiny;/* atan(+INF,+INF) */
- case 1: return -pi_o_4-tiny;/* atan(-INF,+INF) */
- case 2: return 3.0*pi_o_4+tiny;/*atan(+INF,-INF)*/
- case 3: return -3.0*pi_o_4-tiny;/*atan(-INF,-INF)*/
- }
- } else {
- switch(m) {
- case 0: return zero ; /* atan(+...,+INF) */
- case 1: return -zero ; /* atan(-...,+INF) */
- case 2: return pi+tiny ; /* atan(+...,-INF) */
- case 3: return -pi-tiny ; /* atan(-...,-INF) */
- }
- }
- }
- /* when y is INF */
- if(iy==0x7ff00000) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
-
- /* compute y/x */
- k = (iy-ix)>>20;
- if(k > 60) z=pi_o_2+0.5*pi_lo; /* |y/x| > 2**60 */
- else if(hx<0&&k<-60) z=0.0; /* |y|/x < -2**60 */
- else z=atan(fabs(y/x)); /* safe to do y/x */
- switch (m) {
- case 0: return z ; /* atan(+,+) */
- case 1: {
- u_int32_t zh;
- GET_HIGH_WORD(zh,z);
- SET_HIGH_WORD(z,zh ^ 0x80000000);
- }
- return z ; /* atan(-,+) */
- case 2: return pi-(z-pi_lo);/* atan(+,-) */
- default: /* case 3 */
- return (z-pi_lo)-pi;/* atan(-,-) */
- }
-}
diff --git a/lib/msun/src/e_atan2f.c b/lib/msun/src/e_atan2f.c
deleted file mode 100644
index 6742432..0000000
--- a/lib/msun/src/e_atan2f.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* e_atan2f.c -- float version of e_atan2.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-tiny = 1.0e-30,
-zero = 0.0,
-pi_o_4 = 7.8539818525e-01, /* 0x3f490fdb */
-pi_o_2 = 1.5707963705e+00, /* 0x3fc90fdb */
-pi = 3.1415925026e+00, /* 0x40490fda */
-pi_lo = 1.5099578832e-07; /* 0x34222168 */
-
-#ifdef __STDC__
- float __ieee754_atan2f(float y, float x)
-#else
- float __ieee754_atan2f(y,x)
- float y,x;
-#endif
-{
- float z;
- int32_t k,m,hx,hy,ix,iy;
-
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- GET_FLOAT_WORD(hy,y);
- iy = hy&0x7fffffff;
- if((ix>0x7f800000)||
- (iy>0x7f800000)) /* x or y is NaN */
- return x+y;
- if(hx==0x3f800000) return atanf(y); /* x=1.0 */
- m = ((hy>>31)&1)|((hx>>30)&2); /* 2*sign(x)+sign(y) */
-
- /* when y = 0 */
- if(iy==0) {
- switch(m) {
- case 0:
- case 1: return y; /* atan(+-0,+anything)=+-0 */
- case 2: return pi+tiny;/* atan(+0,-anything) = pi */
- case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
- }
- }
- /* when x = 0 */
- if(ix==0) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
-
- /* when x is INF */
- if(ix==0x7f800000) {
- if(iy==0x7f800000) {
- switch(m) {
- case 0: return pi_o_4+tiny;/* atan(+INF,+INF) */
- case 1: return -pi_o_4-tiny;/* atan(-INF,+INF) */
- case 2: return (float)3.0*pi_o_4+tiny;/*atan(+INF,-INF)*/
- case 3: return (float)-3.0*pi_o_4-tiny;/*atan(-INF,-INF)*/
- }
- } else {
- switch(m) {
- case 0: return zero ; /* atan(+...,+INF) */
- case 1: return -zero ; /* atan(-...,+INF) */
- case 2: return pi+tiny ; /* atan(+...,-INF) */
- case 3: return -pi-tiny ; /* atan(-...,-INF) */
- }
- }
- }
- /* when y is INF */
- if(iy==0x7f800000) return (hy<0)? -pi_o_2-tiny: pi_o_2+tiny;
-
- /* compute y/x */
- k = (iy-ix)>>23;
- if(k > 60) z=pi_o_2+(float)0.5*pi_lo; /* |y/x| > 2**60 */
- else if(hx<0&&k<-60) z=0.0; /* |y|/x < -2**60 */
- else z=atanf(fabsf(y/x)); /* safe to do y/x */
- switch (m) {
- case 0: return z ; /* atan(+,+) */
- case 1: {
- u_int32_t zh;
- GET_FLOAT_WORD(zh,z);
- SET_FLOAT_WORD(z,zh ^ 0x80000000);
- }
- return z ; /* atan(-,+) */
- case 2: return pi-(z-pi_lo);/* atan(+,-) */
- default: /* case 3 */
- return (z-pi_lo)-pi;/* atan(-,-) */
- }
-}
diff --git a/lib/msun/src/e_atanh.c b/lib/msun/src/e_atanh.c
deleted file mode 100644
index 0c683e1..0000000
--- a/lib/msun/src/e_atanh.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* @(#)e_atanh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_atanh(x)
- * Method :
- * 1.Reduced x to positive by atanh(-x) = -atanh(x)
- * 2.For x>=0.5
- * 1 2x x
- * atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
- * 2 1 - x 1 - x
- *
- * For x<0.5
- * atanh(x) = 0.5*log1p(2x+2x*x/(1-x))
- *
- * Special cases:
- * atanh(x) is NaN if |x| > 1 with signal;
- * atanh(NaN) is that NaN with no signal;
- * atanh(+-1) is +-INF with signal.
- *
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double one = 1.0, huge = 1e300;
-#else
-static double one = 1.0, huge = 1e300;
-#endif
-
-#ifdef __STDC__
-static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-
-#ifdef __STDC__
- double __ieee754_atanh(double x)
-#else
- double __ieee754_atanh(x)
- double x;
-#endif
-{
- double t;
- int32_t hx,ix;
- u_int32_t lx;
- EXTRACT_WORDS(hx,lx,x);
- ix = hx&0x7fffffff;
- if ((ix|((lx|(-lx))>>31))>0x3ff00000) /* |x|>1 */
- return (x-x)/(x-x);
- if(ix==0x3ff00000)
- return x/zero;
- if(ix<0x3e300000&&(huge+x)>zero) return x; /* x<2**-28 */
- SET_HIGH_WORD(x,ix);
- if(ix<0x3fe00000) { /* x < 0.5 */
- t = x+x;
- t = 0.5*log1p(t+t*x/(one-x));
- } else
- t = 0.5*log1p((x+x)/(one-x));
- if(hx>=0) return t; else return -t;
-}
diff --git a/lib/msun/src/e_atanhf.c b/lib/msun/src/e_atanhf.c
deleted file mode 100644
index d4126af..0000000
--- a/lib/msun/src/e_atanhf.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* e_atanhf.c -- float version of e_atanh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float one = 1.0, huge = 1e30;
-#else
-static float one = 1.0, huge = 1e30;
-#endif
-
-#ifdef __STDC__
-static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-
-#ifdef __STDC__
- float __ieee754_atanhf(float x)
-#else
- float __ieee754_atanhf(x)
- float x;
-#endif
-{
- float t;
- int32_t hx,ix;
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if (ix>0x3f800000) /* |x|>1 */
- return (x-x)/(x-x);
- if(ix==0x3f800000)
- return x/zero;
- if(ix<0x31800000&&(huge+x)>zero) return x; /* x<2**-28 */
- SET_FLOAT_WORD(x,ix);
- if(ix<0x3f000000) { /* x < 0.5 */
- t = x+x;
- t = (float)0.5*log1pf(t+t*x/(one-x));
- } else
- t = (float)0.5*log1pf((x+x)/(one-x));
- if(hx>=0) return t; else return -t;
-}
diff --git a/lib/msun/src/e_cosh.c b/lib/msun/src/e_cosh.c
deleted file mode 100644
index 3a7ac97..0000000
--- a/lib/msun/src/e_cosh.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* @(#)e_cosh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_cosh(x)
- * Method :
- * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2
- * 1. Replace x by |x| (cosh(x) = cosh(-x)).
- * 2.
- * [ exp(x) - 1 ]^2
- * 0 <= x <= ln2/2 : cosh(x) := 1 + -------------------
- * 2*exp(x)
- *
- * exp(x) + 1/exp(x)
- * ln2/2 <= x <= 22 : cosh(x) := -------------------
- * 2
- * 22 <= x <= lnovft : cosh(x) := exp(x)/2
- * lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2)
- * ln2ovft < x : cosh(x) := huge*huge (overflow)
- *
- * Special cases:
- * cosh(x) is |x| if x is +INF, -INF, or NaN.
- * only cosh(0)=1 is exact for finite x.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double one = 1.0, half=0.5, huge = 1.0e300;
-#else
-static double one = 1.0, half=0.5, huge = 1.0e300;
-#endif
-
-#ifdef __STDC__
- double __ieee754_cosh(double x)
-#else
- double __ieee754_cosh(x)
- double x;
-#endif
-{
- double t,w;
- int32_t ix;
- u_int32_t lx;
-
- /* High word of |x|. */
- GET_HIGH_WORD(ix,x);
- ix &= 0x7fffffff;
-
- /* x is INF or NaN */
- if(ix>=0x7ff00000) return x*x;
-
- /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
- if(ix<0x3fd62e43) {
- t = expm1(fabs(x));
- w = one+t;
- if (ix<0x3c800000) return w; /* cosh(tiny) = 1 */
- return one+(t*t)/(w+w);
- }
-
- /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
- if (ix < 0x40360000) {
- t = __ieee754_exp(fabs(x));
- return half*t+half/t;
- }
-
- /* |x| in [22, log(maxdouble)] return half*exp(|x|) */
- if (ix < 0x40862E42) return half*__ieee754_exp(fabs(x));
-
- /* |x| in [log(maxdouble), overflowthresold] */
- GET_LOW_WORD(lx,x);
- if (ix<0x408633CE ||
- ((ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d))) {
- w = __ieee754_exp(half*fabs(x));
- t = half*w;
- return t*w;
- }
-
- /* |x| > overflowthresold, cosh(x) overflow */
- return huge*huge;
-}
diff --git a/lib/msun/src/e_coshf.c b/lib/msun/src/e_coshf.c
deleted file mode 100644
index 501d87b..0000000
--- a/lib/msun/src/e_coshf.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* e_coshf.c -- float version of e_cosh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float one = 1.0, half=0.5, huge = 1.0e30;
-#else
-static float one = 1.0, half=0.5, huge = 1.0e30;
-#endif
-
-#ifdef __STDC__
- float __ieee754_coshf(float x)
-#else
- float __ieee754_coshf(x)
- float x;
-#endif
-{
- float t,w;
- int32_t ix;
-
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff;
-
- /* x is INF or NaN */
- if(ix>=0x7f800000) return x*x;
-
- /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
- if(ix<0x3eb17218) {
- t = expm1f(fabsf(x));
- w = one+t;
- if (ix<0x24000000) return w; /* cosh(tiny) = 1 */
- return one+(t*t)/(w+w);
- }
-
- /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
- if (ix < 0x41b00000) {
- t = __ieee754_expf(fabsf(x));
- return half*t+half/t;
- }
-
- /* |x| in [22, log(maxdouble)] return half*exp(|x|) */
- if (ix < 0x42b17180) return half*__ieee754_expf(fabsf(x));
-
- /* |x| in [log(maxdouble), overflowthresold] */
- if (ix<=0x42b2d4fc) {
- w = __ieee754_expf(half*fabsf(x));
- t = half*w;
- return t*w;
- }
-
- /* |x| > overflowthresold, cosh(x) overflow */
- return huge*huge;
-}
diff --git a/lib/msun/src/e_exp.c b/lib/msun/src/e_exp.c
deleted file mode 100644
index e0d6469..0000000
--- a/lib/msun/src/e_exp.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/* @(#)e_exp.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_exp(x)
- * Returns the exponential of x.
- *
- * Method
- * 1. Argument reduction:
- * Reduce x to an r so that |r| <= 0.5*ln2 ~ 0.34658.
- * Given x, find r and integer k such that
- *
- * x = k*ln2 + r, |r| <= 0.5*ln2.
- *
- * Here r will be represented as r = hi-lo for better
- * accuracy.
- *
- * 2. Approximation of exp(r) by a special rational function on
- * the interval [0,0.34658]:
- * Write
- * R(r**2) = r*(exp(r)+1)/(exp(r)-1) = 2 + r*r/6 - r**4/360 + ...
- * We use a special Reme algorithm on [0,0.34658] to generate
- * a polynomial of degree 5 to approximate R. The maximum error
- * of this polynomial approximation is bounded by 2**-59. In
- * other words,
- * R(z) ~ 2.0 + P1*z + P2*z**2 + P3*z**3 + P4*z**4 + P5*z**5
- * (where z=r*r, and the values of P1 to P5 are listed below)
- * and
- * | 5 | -59
- * | 2.0+P1*z+...+P5*z - R(z) | <= 2
- * | |
- * The computation of exp(r) thus becomes
- * 2*r
- * exp(r) = 1 + -------
- * R - r
- * r*R1(r)
- * = 1 + r + ----------- (for better accuracy)
- * 2 - R1(r)
- * where
- * 2 4 10
- * R1(r) = r - (P1*r + P2*r + ... + P5*r ).
- *
- * 3. Scale back to obtain exp(x):
- * From step 1, we have
- * exp(x) = 2^k * exp(r)
- *
- * Special cases:
- * exp(INF) is INF, exp(NaN) is NaN;
- * exp(-INF) is 0, and
- * for finite argument, only exp(0)=1 is exact.
- *
- * Accuracy:
- * according to an error analysis, the error is always less than
- * 1 ulp (unit in the last place).
- *
- * Misc. info.
- * For IEEE double
- * if x > 7.09782712893383973096e+02 then exp(x) overflow
- * if x < -7.45133219101941108420e+02 then exp(x) underflow
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
- * to produce the hexadecimal values shown.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-one = 1.0,
-halF[2] = {0.5,-0.5,},
-huge = 1.0e+300,
-twom1000= 9.33263618503218878990e-302, /* 2**-1000=0x01700000,0*/
-o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */
-u_threshold= -7.45133219101941108420e+02, /* 0xc0874910, 0xD52D3051 */
-ln2HI[2] ={ 6.93147180369123816490e-01, /* 0x3fe62e42, 0xfee00000 */
- -6.93147180369123816490e-01,},/* 0xbfe62e42, 0xfee00000 */
-ln2LO[2] ={ 1.90821492927058770002e-10, /* 0x3dea39ef, 0x35793c76 */
- -1.90821492927058770002e-10,},/* 0xbdea39ef, 0x35793c76 */
-invln2 = 1.44269504088896338700e+00, /* 0x3ff71547, 0x652b82fe */
-P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */
-P2 = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */
-P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */
-P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
-P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
-
-
-#ifdef __STDC__
- double __generic___ieee754_exp(double x) /* default IEEE double exp */
-#else
- double __generic___ieee754_exp(x) /* default IEEE double exp */
- double x;
-#endif
-{
- double y,hi=0.0,lo=0.0,c,t;
- int32_t k=0,xsb;
- u_int32_t hx;
-
- GET_HIGH_WORD(hx,x);
- xsb = (hx>>31)&1; /* sign bit of x */
- hx &= 0x7fffffff; /* high word of |x| */
-
- /* filter out non-finite argument */
- if(hx >= 0x40862E42) { /* if |x|>=709.78... */
- if(hx>=0x7ff00000) {
- u_int32_t lx;
- GET_LOW_WORD(lx,x);
- if(((hx&0xfffff)|lx)!=0)
- return x+x; /* NaN */
- else return (xsb==0)? x:0.0; /* exp(+-inf)={inf,0} */
- }
- if(x > o_threshold) return huge*huge; /* overflow */
- if(x < u_threshold) return twom1000*twom1000; /* underflow */
- }
-
- /* argument reduction */
- if(hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */
- if(hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */
- hi = x-ln2HI[xsb]; lo=ln2LO[xsb]; k = 1-xsb-xsb;
- } else {
- k = invln2*x+halF[xsb];
- t = k;
- hi = x - t*ln2HI[0]; /* t*ln2HI is exact here */
- lo = t*ln2LO[0];
- }
- x = hi - lo;
- }
- else if(hx < 0x3e300000) { /* when |x|<2**-28 */
- if(huge+x>one) return one+x;/* trigger inexact */
- }
- else k = 0;
-
- /* x is now in primary range */
- t = x*x;
- c = x - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
- if(k==0) return one-((x*c)/(c-2.0)-x);
- else y = one-((lo-(x*c)/(2.0-c))-hi);
- if(k >= -1021) {
- u_int32_t hy;
- GET_HIGH_WORD(hy,y);
- SET_HIGH_WORD(y,hy+(k<<20)); /* add k to y's exponent */
- return y;
- } else {
- u_int32_t hy;
- GET_HIGH_WORD(hy,y);
- SET_HIGH_WORD(y,hy+((k+1000)<<20)); /* add k to y's exponent */
- return y*twom1000;
- }
-}
diff --git a/lib/msun/src/e_expf.c b/lib/msun/src/e_expf.c
deleted file mode 100644
index 24e9096..0000000
--- a/lib/msun/src/e_expf.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* e_expf.c -- float version of e_exp.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-one = 1.0,
-halF[2] = {0.5,-0.5,},
-huge = 1.0e+30,
-twom100 = 7.8886090522e-31, /* 2**-100=0x0d800000 */
-o_threshold= 8.8721679688e+01, /* 0x42b17180 */
-u_threshold= -1.0397208405e+02, /* 0xc2cff1b5 */
-ln2HI[2] ={ 6.9313812256e-01, /* 0x3f317180 */
- -6.9313812256e-01,}, /* 0xbf317180 */
-ln2LO[2] ={ 9.0580006145e-06, /* 0x3717f7d1 */
- -9.0580006145e-06,}, /* 0xb717f7d1 */
-invln2 = 1.4426950216e+00, /* 0x3fb8aa3b */
-P1 = 1.6666667163e-01, /* 0x3e2aaaab */
-P2 = -2.7777778450e-03, /* 0xbb360b61 */
-P3 = 6.6137559770e-05, /* 0x388ab355 */
-P4 = -1.6533901999e-06, /* 0xb5ddea0e */
-P5 = 4.1381369442e-08; /* 0x3331bb4c */
-
-#ifdef __STDC__
- float __ieee754_expf(float x) /* default IEEE double exp */
-#else
- float __ieee754_expf(x) /* default IEEE double exp */
- float x;
-#endif
-{
- float y,hi=0.0,lo=0.0,c,t;
- int32_t k=0,xsb;
- u_int32_t hx;
-
- GET_FLOAT_WORD(hx,x);
- xsb = (hx>>31)&1; /* sign bit of x */
- hx &= 0x7fffffff; /* high word of |x| */
-
- /* filter out non-finite argument */
- if(hx >= 0x42b17218) { /* if |x|>=88.721... */
- if(hx>0x7f800000)
- return x+x; /* NaN */
- if(hx==0x7f800000)
- return (xsb==0)? x:0.0; /* exp(+-inf)={inf,0} */
- if(x > o_threshold) return huge*huge; /* overflow */
- if(x < u_threshold) return twom100*twom100; /* underflow */
- }
-
- /* argument reduction */
- if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */
- if(hx < 0x3F851592) { /* and |x| < 1.5 ln2 */
- hi = x-ln2HI[xsb]; lo=ln2LO[xsb]; k = 1-xsb-xsb;
- } else {
- k = invln2*x+halF[xsb];
- t = k;
- hi = x - t*ln2HI[0]; /* t*ln2HI is exact here */
- lo = t*ln2LO[0];
- }
- x = hi - lo;
- }
- else if(hx < 0x31800000) { /* when |x|<2**-28 */
- if(huge+x>one) return one+x;/* trigger inexact */
- }
- else k = 0;
-
- /* x is now in primary range */
- t = x*x;
- c = x - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
- if(k==0) return one-((x*c)/(c-(float)2.0)-x);
- else y = one-((lo-(x*c)/((float)2.0-c))-hi);
- if(k >= -125) {
- u_int32_t hy;
- GET_FLOAT_WORD(hy,y);
- SET_FLOAT_WORD(y,hy+(k<<23)); /* add k to y's exponent */
- return y;
- } else {
- u_int32_t hy;
- GET_FLOAT_WORD(hy,y);
- SET_FLOAT_WORD(y,hy+((k+100)<<23)); /* add k to y's exponent */
- return y*twom100;
- }
-}
diff --git a/lib/msun/src/e_fmod.c b/lib/msun/src/e_fmod.c
deleted file mode 100644
index 4f65de1..0000000
--- a/lib/msun/src/e_fmod.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/* @(#)e_fmod.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * __ieee754_fmod(x,y)
- * Return x mod y in exact arithmetic
- * Method: shift and subtract
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double one = 1.0, Zero[] = {0.0, -0.0,};
-#else
-static double one = 1.0, Zero[] = {0.0, -0.0,};
-#endif
-
-#ifdef __STDC__
- double __generic___ieee754_fmod(double x, double y)
-#else
- double __generic___ieee754_fmod(x,y)
- double x,y ;
-#endif
-{
- int32_t n,hx,hy,hz,ix,iy,sx,i;
- u_int32_t lx,ly,lz;
-
- EXTRACT_WORDS(hx,lx,x);
- EXTRACT_WORDS(hy,ly,y);
- sx = hx&0x80000000; /* sign of x */
- hx ^=sx; /* |x| */
- hy &= 0x7fffffff; /* |y| */
-
- /* purge off exception values */
- if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */
- ((hy|((ly|-ly)>>31))>0x7ff00000)) /* or y is NaN */
- return (x*y)/(x*y);
- if(hx<=hy) {
- if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */
- if(lx==ly)
- return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/
- }
-
- /* determine ix = ilogb(x) */
- if(hx<0x00100000) { /* subnormal x */
- if(hx==0) {
- for (ix = -1043, i=lx; i>0; i<<=1) ix -=1;
- } else {
- for (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1;
- }
- } else ix = (hx>>20)-1023;
-
- /* determine iy = ilogb(y) */
- if(hy<0x00100000) { /* subnormal y */
- if(hy==0) {
- for (iy = -1043, i=ly; i>0; i<<=1) iy -=1;
- } else {
- for (iy = -1022,i=(hy<<11); i>0; i<<=1) iy -=1;
- }
- } else iy = (hy>>20)-1023;
-
- /* set up {hx,lx}, {hy,ly} and align y to x */
- if(ix >= -1022)
- hx = 0x00100000|(0x000fffff&hx);
- else { /* subnormal x, shift x to normal */
- n = -1022-ix;
- if(n<=31) {
- hx = (hx<<n)|(lx>>(32-n));
- lx <<= n;
- } else {
- hx = lx<<(n-32);
- lx = 0;
- }
- }
- if(iy >= -1022)
- hy = 0x00100000|(0x000fffff&hy);
- else { /* subnormal y, shift y to normal */
- n = -1022-iy;
- if(n<=31) {
- hy = (hy<<n)|(ly>>(32-n));
- ly <<= n;
- } else {
- hy = ly<<(n-32);
- ly = 0;
- }
- }
-
- /* fix point fmod */
- n = ix - iy;
- while(n--) {
- hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
- if(hz<0){hx = hx+hx+(lx>>31); lx = lx+lx;}
- else {
- if((hz|lz)==0) /* return sign(x)*0 */
- return Zero[(u_int32_t)sx>>31];
- hx = hz+hz+(lz>>31); lx = lz+lz;
- }
- }
- hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
- if(hz>=0) {hx=hz;lx=lz;}
-
- /* convert back to floating value and restore the sign */
- if((hx|lx)==0) /* return sign(x)*0 */
- return Zero[(u_int32_t)sx>>31];
- while(hx<0x00100000) { /* normalize x */
- hx = hx+hx+(lx>>31); lx = lx+lx;
- iy -= 1;
- }
- if(iy>= -1022) { /* normalize output */
- hx = ((hx-0x00100000)|((iy+1023)<<20));
- INSERT_WORDS(x,hx|sx,lx);
- } else { /* subnormal output */
- n = -1022 - iy;
- if(n<=20) {
- lx = (lx>>n)|((u_int32_t)hx<<(32-n));
- hx >>= n;
- } else if (n<=31) {
- lx = (hx<<(32-n))|(lx>>n); hx = sx;
- } else {
- lx = hx>>(n-32); hx = sx;
- }
- INSERT_WORDS(x,hx|sx,lx);
- x *= one; /* create necessary signal */
- }
- return x; /* exact output */
-}
diff --git a/lib/msun/src/e_fmodf.c b/lib/msun/src/e_fmodf.c
deleted file mode 100644
index 2c0bd81..0000000
--- a/lib/msun/src/e_fmodf.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/* e_fmodf.c -- float version of e_fmod.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * __ieee754_fmodf(x,y)
- * Return x mod y in exact arithmetic
- * Method: shift and subtract
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float one = 1.0, Zero[] = {0.0, -0.0,};
-#else
-static float one = 1.0, Zero[] = {0.0, -0.0,};
-#endif
-
-#ifdef __STDC__
- float __ieee754_fmodf(float x, float y)
-#else
- float __ieee754_fmodf(x,y)
- float x,y ;
-#endif
-{
- int32_t n,hx,hy,hz,ix,iy,sx,i;
-
- GET_FLOAT_WORD(hx,x);
- GET_FLOAT_WORD(hy,y);
- sx = hx&0x80000000; /* sign of x */
- hx ^=sx; /* |x| */
- hy &= 0x7fffffff; /* |y| */
-
- /* purge off exception values */
- if(hy==0||(hx>=0x7f800000)|| /* y=0,or x not finite */
- (hy>0x7f800000)) /* or y is NaN */
- return (x*y)/(x*y);
- if(hx<hy) return x; /* |x|<|y| return x */
- if(hx==hy)
- return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/
-
- /* determine ix = ilogb(x) */
- if(hx<0x00800000) { /* subnormal x */
- for (ix = -126,i=(hx<<8); i>0; i<<=1) ix -=1;
- } else ix = (hx>>23)-127;
-
- /* determine iy = ilogb(y) */
- if(hy<0x00800000) { /* subnormal y */
- for (iy = -126,i=(hy<<8); i>=0; i<<=1) iy -=1;
- } else iy = (hy>>23)-127;
-
- /* set up {hx,lx}, {hy,ly} and align y to x */
- if(ix >= -126)
- hx = 0x00800000|(0x007fffff&hx);
- else { /* subnormal x, shift x to normal */
- n = -126-ix;
- hx = hx<<n;
- }
- if(iy >= -126)
- hy = 0x00800000|(0x007fffff&hy);
- else { /* subnormal y, shift y to normal */
- n = -126-iy;
- hy = hy<<n;
- }
-
- /* fix point fmod */
- n = ix - iy;
- while(n--) {
- hz=hx-hy;
- if(hz<0){hx = hx+hx;}
- else {
- if(hz==0) /* return sign(x)*0 */
- return Zero[(u_int32_t)sx>>31];
- hx = hz+hz;
- }
- }
- hz=hx-hy;
- if(hz>=0) {hx=hz;}
-
- /* convert back to floating value and restore the sign */
- if(hx==0) /* return sign(x)*0 */
- return Zero[(u_int32_t)sx>>31];
- while(hx<0x00800000) { /* normalize x */
- hx = hx+hx;
- iy -= 1;
- }
- if(iy>= -126) { /* normalize output */
- hx = ((hx-0x00800000)|((iy+127)<<23));
- SET_FLOAT_WORD(x,hx|sx);
- } else { /* subnormal output */
- n = -126 - iy;
- hx >>= n;
- SET_FLOAT_WORD(x,hx|sx);
- x *= one; /* create necessary signal */
- }
- return x; /* exact output */
-}
diff --git a/lib/msun/src/e_gamma.c b/lib/msun/src/e_gamma.c
deleted file mode 100644
index 6401d59..0000000
--- a/lib/msun/src/e_gamma.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* @(#)e_gamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- *
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_gamma(x)
- * Return the logarithm of the Gamma function of x.
- *
- * Method: call __ieee754_gamma_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-extern int signgam;
-
-#ifdef __STDC__
- double __ieee754_gamma(double x)
-#else
- double __ieee754_gamma(x)
- double x;
-#endif
-{
- return __ieee754_gamma_r(x,&signgam);
-}
diff --git a/lib/msun/src/e_gamma_r.c b/lib/msun/src/e_gamma_r.c
deleted file mode 100644
index d1334f3..0000000
--- a/lib/msun/src/e_gamma_r.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* @(#)er_gamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_gamma_r(x, signgamp)
- * Reentrant version of the logarithm of the Gamma function
- * with user provide pointer for the sign of Gamma(x).
- *
- * Method: See __ieee754_lgamma_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double __ieee754_gamma_r(double x, int *signgamp)
-#else
- double __ieee754_gamma_r(x,signgamp)
- double x; int *signgamp;
-#endif
-{
- return __ieee754_lgamma_r(x,signgamp);
-}
diff --git a/lib/msun/src/e_gammaf.c b/lib/msun/src/e_gammaf.c
deleted file mode 100644
index 97731d9..0000000
--- a/lib/msun/src/e_gammaf.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* e_gammaf.c -- float version of e_gamma.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_gammaf(x)
- * Return the logarithm of the Gamma function of x.
- *
- * Method: call __ieee754_gammaf_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-extern int signgam;
-
-#ifdef __STDC__
- float __ieee754_gammaf(float x)
-#else
- float __ieee754_gammaf(x)
- float x;
-#endif
-{
- return __ieee754_gammaf_r(x,&signgam);
-}
diff --git a/lib/msun/src/e_gammaf_r.c b/lib/msun/src/e_gammaf_r.c
deleted file mode 100644
index 4e2e4a7..0000000
--- a/lib/msun/src/e_gammaf_r.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* e_gammaf_r.c -- float version of e_gamma_r.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_gammaf_r(x, signgamp)
- * Reentrant version of the logarithm of the Gamma function
- * with user provide pointer for the sign of Gamma(x).
- *
- * Method: See __ieee754_lgammaf_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float __ieee754_gammaf_r(float x, int *signgamp)
-#else
- float __ieee754_gammaf_r(x,signgamp)
- float x; int *signgamp;
-#endif
-{
- return __ieee754_lgammaf_r(x,signgamp);
-}
diff --git a/lib/msun/src/e_hypot.c b/lib/msun/src/e_hypot.c
deleted file mode 100644
index b2a577f..0000000
--- a/lib/msun/src/e_hypot.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* @(#)e_hypot.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_hypot.c,v 1.4 1997/02/22 15:10:12 peter Exp $";
-#endif
-
-/* __ieee754_hypot(x,y)
- *
- * Method :
- * If (assume round-to-nearest) z=x*x+y*y
- * has error less than sqrt(2)/2 ulp, than
- * sqrt(z) has error less than 1 ulp (exercise).
- *
- * So, compute sqrt(x*x+y*y) with some care as
- * follows to get the error below 1 ulp:
- *
- * Assume x>y>0;
- * (if possible, set rounding to round-to-nearest)
- * 1. if x > 2y use
- * x1*x1+(y*y+(x2*(x+x1))) for x*x+y*y
- * where x1 = x with lower 32 bits cleared, x2 = x-x1; else
- * 2. if x <= 2y use
- * t1*y1+((x-y)*(x-y)+(t1*y2+t2*y))
- * where t1 = 2x with lower 32 bits cleared, t2 = 2x-t1,
- * y1= y with lower 32 bits chopped, y2 = y-y1.
- *
- * NOTE: scaling may be necessary if some argument is too
- * large or too tiny
- *
- * Special cases:
- * hypot(x,y) is INF if x or y is +INF or -INF; else
- * hypot(x,y) is NAN if x or y is NAN.
- *
- * Accuracy:
- * hypot(x,y) returns sqrt(x^2+y^2) with error less
- * than 1 ulps (units in the last place)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double __ieee754_hypot(double x, double y)
-#else
- double __ieee754_hypot(x,y)
- double x, y;
-#endif
-{
- double a=x,b=y,t1,t2,y1,y2,w;
- int32_t j,k,ha,hb;
-
- GET_HIGH_WORD(ha,x);
- ha &= 0x7fffffff;
- GET_HIGH_WORD(hb,y);
- hb &= 0x7fffffff;
- if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;}
- SET_HIGH_WORD(a,ha); /* a <- |a| */
- SET_HIGH_WORD(b,hb); /* b <- |b| */
- if((ha-hb)>0x3c00000) {return a+b;} /* x/y > 2**60 */
- k=0;
- if(ha > 0x5f300000) { /* a>2**500 */
- if(ha >= 0x7ff00000) { /* Inf or NaN */
- u_int32_t low;
- w = a+b; /* for sNaN */
- GET_LOW_WORD(low,a);
- if(((ha&0xfffff)|low)==0) w = a;
- GET_LOW_WORD(low,b);
- if(((hb^0x7ff00000)|low)==0) w = b;
- return w;
- }
- /* scale a and b by 2**-600 */
- ha -= 0x25800000; hb -= 0x25800000; k += 600;
- SET_HIGH_WORD(a,ha);
- SET_HIGH_WORD(b,hb);
- }
- if(hb < 0x20b00000) { /* b < 2**-500 */
- if(hb <= 0x000fffff) { /* subnormal b or 0 */
- u_int32_t low;
- GET_LOW_WORD(low,b);
- if((hb|low)==0) return a;
- t1=0;
- SET_HIGH_WORD(t1,0x7fd00000); /* t1=2^1022 */
- b *= t1;
- a *= t1;
- k -= 1022;
- } else { /* scale a and b by 2^600 */
- ha += 0x25800000; /* a *= 2^600 */
- hb += 0x25800000; /* b *= 2^600 */
- k -= 600;
- SET_HIGH_WORD(a,ha);
- SET_HIGH_WORD(b,hb);
- }
- }
- /* medium size a and b */
- w = a-b;
- if (w>b) {
- t1 = 0;
- SET_HIGH_WORD(t1,ha);
- t2 = a-t1;
- w = __ieee754_sqrt(t1*t1-(b*(-b)-t2*(a+t1)));
- } else {
- a = a+a;
- y1 = 0;
- SET_HIGH_WORD(y1,hb);
- y2 = b - y1;
- t1 = 0;
- SET_HIGH_WORD(t1,ha+0x00100000);
- t2 = a - t1;
- w = __ieee754_sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b)));
- }
- if(k!=0) {
- u_int32_t high;
- t1 = 1.0;
- GET_HIGH_WORD(high,t1);
- SET_HIGH_WORD(t1,high+(k<<20));
- return t1*w;
- } else return w;
-}
diff --git a/lib/msun/src/e_hypotf.c b/lib/msun/src/e_hypotf.c
deleted file mode 100644
index 5a40918..0000000
--- a/lib/msun/src/e_hypotf.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/* e_hypotf.c -- float version of e_hypot.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_hypotf.c,v 1.5 1997/03/05 11:54:00 bde Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float __ieee754_hypotf(float x, float y)
-#else
- float __ieee754_hypot(x,y)
- float x, y;
-#endif
-{
- float a=x,b=y,t1,t2,y1,y2,w;
- int32_t j,k,ha,hb;
-
- GET_FLOAT_WORD(ha,x);
- ha &= 0x7fffffff;
- GET_FLOAT_WORD(hb,y);
- hb &= 0x7fffffff;
- if(hb > ha) {a=y;b=x;j=ha; ha=hb;hb=j;} else {a=x;b=y;}
- SET_FLOAT_WORD(a,ha); /* a <- |a| */
- SET_FLOAT_WORD(b,hb); /* b <- |b| */
- if((ha-hb)>0xf000000) {return a+b;} /* x/y > 2**30 */
- k=0;
- if(ha > 0x58800000) { /* a>2**50 */
- if(ha >= 0x7f800000) { /* Inf or NaN */
- w = a+b; /* for sNaN */
- if(ha == 0x7f800000) w = a;
- if(hb == 0x7f800000) w = b;
- return w;
- }
- /* scale a and b by 2**-68 */
- ha -= 0x22000000; hb -= 0x22000000; k += 68;
- SET_FLOAT_WORD(a,ha);
- SET_FLOAT_WORD(b,hb);
- }
- if(hb < 0x26800000) { /* b < 2**-50 */
- if(hb <= 0x007fffff) { /* subnormal b or 0 */
- if(hb==0) return a;
- SET_FLOAT_WORD(t1,0x7e800000); /* t1=2^126 */
- b *= t1;
- a *= t1;
- k -= 126;
- } else { /* scale a and b by 2^68 */
- ha += 0x22000000; /* a *= 2^68 */
- hb += 0x22000000; /* b *= 2^68 */
- k -= 68;
- SET_FLOAT_WORD(a,ha);
- SET_FLOAT_WORD(b,hb);
- }
- }
- /* medium size a and b */
- w = a-b;
- if (w>b) {
- SET_FLOAT_WORD(t1,ha&0xfffff000);
- t2 = a-t1;
- w = __ieee754_sqrtf(t1*t1-(b*(-b)-t2*(a+t1)));
- } else {
- a = a+a;
- SET_FLOAT_WORD(y1,hb&0xfffff000);
- y2 = b - y1;
- SET_FLOAT_WORD(t1,ha+0x00800000);
- t2 = a - t1;
- w = __ieee754_sqrtf(t1*y1-(w*(-w)-(t1*y2+t2*b)));
- }
- if(k!=0) {
- SET_FLOAT_WORD(t1,0x3f800000+(k<<23));
- return t1*w;
- } else return w;
-}
diff --git a/lib/msun/src/e_j0.c b/lib/msun/src/e_j0.c
deleted file mode 100644
index ecbc9b7..0000000
--- a/lib/msun/src/e_j0.c
+++ /dev/null
@@ -1,487 +0,0 @@
-/* @(#)e_j0.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_j0(x), __ieee754_y0(x)
- * Bessel function of the first and second kinds of order zero.
- * Method -- j0(x):
- * 1. For tiny x, we use j0(x) = 1 - x^2/4 + x^4/64 - ...
- * 2. Reduce x to |x| since j0(x)=j0(-x), and
- * for x in (0,2)
- * j0(x) = 1-z/4+ z^2*R0/S0, where z = x*x;
- * (precision: |j0-1+z/4-z^2R0/S0 |<2**-63.67 )
- * for x in (2,inf)
- * j0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)-q0(x)*sin(x0))
- * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
- * as follow:
- * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
- * = 1/sqrt(2) * (cos(x) + sin(x))
- * sin(x0) = sin(x)cos(pi/4)-cos(x)sin(pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * (To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.)
- *
- * 3 Special cases
- * j0(nan)= nan
- * j0(0) = 1
- * j0(inf) = 0
- *
- * Method -- y0(x):
- * 1. For x<2.
- * Since
- * y0(x) = 2/pi*(j0(x)*(ln(x/2)+Euler) + x^2/4 - ...)
- * therefore y0(x)-2/pi*j0(x)*ln(x) is an even function.
- * We use the following function to approximate y0,
- * y0(x) = U(z)/V(z) + (2/pi)*(j0(x)*ln(x)), z= x^2
- * where
- * U(z) = u00 + u01*z + ... + u06*z^6
- * V(z) = 1 + v01*z + ... + v04*z^4
- * with absolute approximation error bounded by 2**-72.
- * Note: For tiny x, U/V = u0 and j0(x)~1, hence
- * y0(tiny) = u0 + (2/pi)*ln(tiny), (choose tiny<2**-27)
- * 2. For x>=2.
- * y0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)+q0(x)*sin(x0))
- * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
- * by the method mentioned above.
- * 3. Special cases: y0(0)=-inf, y0(x<0)=NaN, y0(inf)=0.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static double pzero(double), qzero(double);
-#else
-static double pzero(), qzero();
-#endif
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-huge = 1e300,
-one = 1.0,
-invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */
-tpi = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
- /* R0/S0 on [0, 2.00] */
-R02 = 1.56249999999999947958e-02, /* 0x3F8FFFFF, 0xFFFFFFFD */
-R03 = -1.89979294238854721751e-04, /* 0xBF28E6A5, 0xB61AC6E9 */
-R04 = 1.82954049532700665670e-06, /* 0x3EBEB1D1, 0x0C503919 */
-R05 = -4.61832688532103189199e-09, /* 0xBE33D5E7, 0x73D63FCE */
-S01 = 1.56191029464890010492e-02, /* 0x3F8FFCE8, 0x82C8C2A4 */
-S02 = 1.16926784663337450260e-04, /* 0x3F1EA6D2, 0xDD57DBF4 */
-S03 = 5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */
-S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */
-
-#ifdef __STDC__
-static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-
-#ifdef __STDC__
- double __ieee754_j0(double x)
-#else
- double __ieee754_j0(x)
- double x;
-#endif
-{
- double z, s,c,ss,cc,r,u,v;
- int32_t hx,ix;
-
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) return one/(x*x);
- x = fabs(x);
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- s = sin(x);
- c = cos(x);
- ss = s-c;
- cc = s+c;
- if(ix<0x7fe00000) { /* make sure x+x not overflow */
- z = -cos(x+x);
- if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
- }
- /*
- * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
- * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
- */
- if(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(x);
- else {
- u = pzero(x); v = qzero(x);
- z = invsqrtpi*(u*cc-v*ss)/sqrt(x);
- }
- return z;
- }
- if(ix<0x3f200000) { /* |x| < 2**-13 */
- if(huge+x>one) { /* raise inexact if x != 0 */
- if(ix<0x3e400000) return one; /* |x|<2**-27 */
- else return one - 0.25*x*x;
- }
- }
- z = x*x;
- r = z*(R02+z*(R03+z*(R04+z*R05)));
- s = one+z*(S01+z*(S02+z*(S03+z*S04)));
- if(ix < 0x3FF00000) { /* |x| < 1.00 */
- return one + z*(-0.25+(r/s));
- } else {
- u = 0.5*x;
- return((one+u)*(one-u)+z*(r/s));
- }
-}
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-u00 = -7.38042951086872317523e-02, /* 0xBFB2E4D6, 0x99CBD01F */
-u01 = 1.76666452509181115538e-01, /* 0x3FC69D01, 0x9DE9E3FC */
-u02 = -1.38185671945596898896e-02, /* 0xBF8C4CE8, 0xB16CFA97 */
-u03 = 3.47453432093683650238e-04, /* 0x3F36C54D, 0x20B29B6B */
-u04 = -3.81407053724364161125e-06, /* 0xBECFFEA7, 0x73D25CAD */
-u05 = 1.95590137035022920206e-08, /* 0x3E550057, 0x3B4EABD4 */
-u06 = -3.98205194132103398453e-11, /* 0xBDC5E43D, 0x693FB3C8 */
-v01 = 1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */
-v02 = 7.60068627350353253702e-05, /* 0x3F13ECBB, 0xF578C6C1 */
-v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
-v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
-
-#ifdef __STDC__
- double __ieee754_y0(double x)
-#else
- double __ieee754_y0(x)
- double x;
-#endif
-{
- double z, s,c,ss,cc,u,v;
- int32_t hx,ix,lx;
-
- EXTRACT_WORDS(hx,lx,x);
- ix = 0x7fffffff&hx;
- /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0 */
- if(ix>=0x7ff00000) return one/(x+x*x);
- if((ix|lx)==0) return -one/zero;
- if(hx<0) return zero/zero;
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- /* y0(x) = sqrt(2/(pi*x))*(p0(x)*sin(x0)+q0(x)*cos(x0))
- * where x0 = x-pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
- * = 1/sqrt(2) * (sin(x) + cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
- s = sin(x);
- c = cos(x);
- ss = s-c;
- cc = s+c;
- /*
- * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
- * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
- */
- if(ix<0x7fe00000) { /* make sure x+x not overflow */
- z = -cos(x+x);
- if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
- }
- if(ix>0x48000000) z = (invsqrtpi*ss)/sqrt(x);
- else {
- u = pzero(x); v = qzero(x);
- z = invsqrtpi*(u*ss+v*cc)/sqrt(x);
- }
- return z;
- }
- if(ix<=0x3e400000) { /* x < 2**-27 */
- return(u00 + tpi*__ieee754_log(x));
- }
- z = x*x;
- u = u00+z*(u01+z*(u02+z*(u03+z*(u04+z*(u05+z*u06)))));
- v = one+z*(v01+z*(v02+z*(v03+z*v04)));
- return(u/v + tpi*(__ieee754_j0(x)*__ieee754_log(x)));
-}
-
-/* The asymptotic expansions of pzero is
- * 1 - 9/128 s^2 + 11025/98304 s^4 - ..., where s = 1/x.
- * For x >= 2, We approximate pzero by
- * pzero(x) = 1 + (R/S)
- * where R = pR0 + pR1*s^2 + pR2*s^4 + ... + pR5*s^10
- * S = 1 + pS0*s^2 + ... + pS4*s^10
- * and
- * | pzero(x)-1-R/S | <= 2 ** ( -60.26)
- */
-#ifdef __STDC__
-static const double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
- 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
- -7.03124999999900357484e-02, /* 0xBFB1FFFF, 0xFFFFFD32 */
- -8.08167041275349795626e+00, /* 0xC02029D0, 0xB44FA779 */
- -2.57063105679704847262e+02, /* 0xC0701102, 0x7B19E863 */
- -2.48521641009428822144e+03, /* 0xC0A36A6E, 0xCD4DCAFC */
- -5.25304380490729545272e+03, /* 0xC0B4850B, 0x36CC643D */
-};
-#ifdef __STDC__
-static const double pS8[5] = {
-#else
-static double pS8[5] = {
-#endif
- 1.16534364619668181717e+02, /* 0x405D2233, 0x07A96751 */
- 3.83374475364121826715e+03, /* 0x40ADF37D, 0x50596938 */
- 4.05978572648472545552e+04, /* 0x40E3D2BB, 0x6EB6B05F */
- 1.16752972564375915681e+05, /* 0x40FC810F, 0x8F9FA9BD */
- 4.76277284146730962675e+04, /* 0x40E74177, 0x4F2C49DC */
-};
-
-#ifdef __STDC__
-static const double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
- -1.14125464691894502584e-11, /* 0xBDA918B1, 0x47E495CC */
- -7.03124940873599280078e-02, /* 0xBFB1FFFF, 0xE69AFBC6 */
- -4.15961064470587782438e+00, /* 0xC010A370, 0xF90C6BBF */
- -6.76747652265167261021e+01, /* 0xC050EB2F, 0x5A7D1783 */
- -3.31231299649172967747e+02, /* 0xC074B3B3, 0x6742CC63 */
- -3.46433388365604912451e+02, /* 0xC075A6EF, 0x28A38BD7 */
-};
-#ifdef __STDC__
-static const double pS5[5] = {
-#else
-static double pS5[5] = {
-#endif
- 6.07539382692300335975e+01, /* 0x404E6081, 0x0C98C5DE */
- 1.05125230595704579173e+03, /* 0x40906D02, 0x5C7E2864 */
- 5.97897094333855784498e+03, /* 0x40B75AF8, 0x8FBE1D60 */
- 9.62544514357774460223e+03, /* 0x40C2CCB8, 0xFA76FA38 */
- 2.40605815922939109441e+03, /* 0x40A2CC1D, 0xC70BE864 */
-};
-
-#ifdef __STDC__
-static const double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#else
-static double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
- -2.54704601771951915620e-09, /* 0xBE25E103, 0x6FE1AA86 */
- -7.03119616381481654654e-02, /* 0xBFB1FFF6, 0xF7C0E24B */
- -2.40903221549529611423e+00, /* 0xC00345B2, 0xAEA48074 */
- -2.19659774734883086467e+01, /* 0xC035F74A, 0x4CB94E14 */
- -5.80791704701737572236e+01, /* 0xC04D0A22, 0x420A1A45 */
- -3.14479470594888503854e+01, /* 0xC03F72AC, 0xA892D80F */
-};
-#ifdef __STDC__
-static const double pS3[5] = {
-#else
-static double pS3[5] = {
-#endif
- 3.58560338055209726349e+01, /* 0x4041ED92, 0x84077DD3 */
- 3.61513983050303863820e+02, /* 0x40769839, 0x464A7C0E */
- 1.19360783792111533330e+03, /* 0x4092A66E, 0x6D1061D6 */
- 1.12799679856907414432e+03, /* 0x40919FFC, 0xB8C39B7E */
- 1.73580930813335754692e+02, /* 0x4065B296, 0xFC379081 */
-};
-
-#ifdef __STDC__
-static const double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
- -8.87534333032526411254e-08, /* 0xBE77D316, 0xE927026D */
- -7.03030995483624743247e-02, /* 0xBFB1FF62, 0x495E1E42 */
- -1.45073846780952986357e+00, /* 0xBFF73639, 0x8A24A843 */
- -7.63569613823527770791e+00, /* 0xC01E8AF3, 0xEDAFA7F3 */
- -1.11931668860356747786e+01, /* 0xC02662E6, 0xC5246303 */
- -3.23364579351335335033e+00, /* 0xC009DE81, 0xAF8FE70F */
-};
-#ifdef __STDC__
-static const double pS2[5] = {
-#else
-static double pS2[5] = {
-#endif
- 2.22202997532088808441e+01, /* 0x40363865, 0x908B5959 */
- 1.36206794218215208048e+02, /* 0x4061069E, 0x0EE8878F */
- 2.70470278658083486789e+02, /* 0x4070E786, 0x42EA079B */
- 1.53875394208320329881e+02, /* 0x40633C03, 0x3AB6FAFF */
- 1.46576176948256193810e+01, /* 0x402D50B3, 0x44391809 */
-};
-
-#ifdef __STDC__
- static double pzero(double x)
-#else
- static double pzero(x)
- double x;
-#endif
-{
-#ifdef __STDC__
- const double *p,*q;
-#else
- double *p,*q;
-#endif
- double z,r,s;
- int32_t ix;
- GET_HIGH_WORD(ix,x);
- ix &= 0x7fffffff;
- if(ix>=0x40200000) {p = pR8; q= pS8;}
- else if(ix>=0x40122E8B){p = pR5; q= pS5;}
- else if(ix>=0x4006DB6D){p = pR3; q= pS3;}
- else if(ix>=0x40000000){p = pR2; q= pS2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
- return one+ r/s;
-}
-
-
-/* For x >= 8, the asymptotic expansions of qzero is
- * -1/8 s + 75/1024 s^3 - ..., where s = 1/x.
- * We approximate pzero by
- * qzero(x) = s*(-1.25 + (R/S))
- * where R = qR0 + qR1*s^2 + qR2*s^4 + ... + qR5*s^10
- * S = 1 + qS0*s^2 + ... + qS5*s^12
- * and
- * | qzero(x)/s +1.25-R/S | <= 2 ** ( -61.22)
- */
-#ifdef __STDC__
-static const double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
- 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
- 7.32421874999935051953e-02, /* 0x3FB2BFFF, 0xFFFFFE2C */
- 1.17682064682252693899e+01, /* 0x40278952, 0x5BB334D6 */
- 5.57673380256401856059e+02, /* 0x40816D63, 0x15301825 */
- 8.85919720756468632317e+03, /* 0x40C14D99, 0x3E18F46D */
- 3.70146267776887834771e+04, /* 0x40E212D4, 0x0E901566 */
-};
-#ifdef __STDC__
-static const double qS8[6] = {
-#else
-static double qS8[6] = {
-#endif
- 1.63776026895689824414e+02, /* 0x406478D5, 0x365B39BC */
- 8.09834494656449805916e+03, /* 0x40BFA258, 0x4E6B0563 */
- 1.42538291419120476348e+05, /* 0x41016652, 0x54D38C3F */
- 8.03309257119514397345e+05, /* 0x412883DA, 0x83A52B43 */
- 8.40501579819060512818e+05, /* 0x4129A66B, 0x28DE0B3D */
- -3.43899293537866615225e+05, /* 0xC114FD6D, 0x2C9530C5 */
-};
-
-#ifdef __STDC__
-static const double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
- 1.84085963594515531381e-11, /* 0x3DB43D8F, 0x29CC8CD9 */
- 7.32421766612684765896e-02, /* 0x3FB2BFFF, 0xD172B04C */
- 5.83563508962056953777e+00, /* 0x401757B0, 0xB9953DD3 */
- 1.35111577286449829671e+02, /* 0x4060E392, 0x0A8788E9 */
- 1.02724376596164097464e+03, /* 0x40900CF9, 0x9DC8C481 */
- 1.98997785864605384631e+03, /* 0x409F17E9, 0x53C6E3A6 */
-};
-#ifdef __STDC__
-static const double qS5[6] = {
-#else
-static double qS5[6] = {
-#endif
- 8.27766102236537761883e+01, /* 0x4054B1B3, 0xFB5E1543 */
- 2.07781416421392987104e+03, /* 0x40A03BA0, 0xDA21C0CE */
- 1.88472887785718085070e+04, /* 0x40D267D2, 0x7B591E6D */
- 5.67511122894947329769e+04, /* 0x40EBB5E3, 0x97E02372 */
- 3.59767538425114471465e+04, /* 0x40E19118, 0x1F7A54A0 */
- -5.35434275601944773371e+03, /* 0xC0B4EA57, 0xBEDBC609 */
-};
-
-#ifdef __STDC__
-static const double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#else
-static double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
- 4.37741014089738620906e-09, /* 0x3E32CD03, 0x6ADECB82 */
- 7.32411180042911447163e-02, /* 0x3FB2BFEE, 0x0E8D0842 */
- 3.34423137516170720929e+00, /* 0x400AC0FC, 0x61149CF5 */
- 4.26218440745412650017e+01, /* 0x40454F98, 0x962DAEDD */
- 1.70808091340565596283e+02, /* 0x406559DB, 0xE25EFD1F */
- 1.66733948696651168575e+02, /* 0x4064D77C, 0x81FA21E0 */
-};
-#ifdef __STDC__
-static const double qS3[6] = {
-#else
-static double qS3[6] = {
-#endif
- 4.87588729724587182091e+01, /* 0x40486122, 0xBFE343A6 */
- 7.09689221056606015736e+02, /* 0x40862D83, 0x86544EB3 */
- 3.70414822620111362994e+03, /* 0x40ACF04B, 0xE44DFC63 */
- 6.46042516752568917582e+03, /* 0x40B93C6C, 0xD7C76A28 */
- 2.51633368920368957333e+03, /* 0x40A3A8AA, 0xD94FB1C0 */
- -1.49247451836156386662e+02, /* 0xC062A7EB, 0x201CF40F */
-};
-
-#ifdef __STDC__
-static const double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
- 1.50444444886983272379e-07, /* 0x3E84313B, 0x54F76BDB */
- 7.32234265963079278272e-02, /* 0x3FB2BEC5, 0x3E883E34 */
- 1.99819174093815998816e+00, /* 0x3FFFF897, 0xE727779C */
- 1.44956029347885735348e+01, /* 0x402CFDBF, 0xAAF96FE5 */
- 3.16662317504781540833e+01, /* 0x403FAA8E, 0x29FBDC4A */
- 1.62527075710929267416e+01, /* 0x403040B1, 0x71814BB4 */
-};
-#ifdef __STDC__
-static const double qS2[6] = {
-#else
-static double qS2[6] = {
-#endif
- 3.03655848355219184498e+01, /* 0x403E5D96, 0xF7C07AED */
- 2.69348118608049844624e+02, /* 0x4070D591, 0xE4D14B40 */
- 8.44783757595320139444e+02, /* 0x408A6645, 0x22B3BF22 */
- 8.82935845112488550512e+02, /* 0x408B977C, 0x9C5CC214 */
- 2.12666388511798828631e+02, /* 0x406A9553, 0x0E001365 */
- -5.31095493882666946917e+00, /* 0xC0153E6A, 0xF8B32931 */
-};
-
-#ifdef __STDC__
- static double qzero(double x)
-#else
- static double qzero(x)
- double x;
-#endif
-{
-#ifdef __STDC__
- const double *p,*q;
-#else
- double *p,*q;
-#endif
- double s,r,z;
- int32_t ix;
- GET_HIGH_WORD(ix,x);
- ix &= 0x7fffffff;
- if(ix>=0x40200000) {p = qR8; q= qS8;}
- else if(ix>=0x40122E8B){p = qR5; q= qS5;}
- else if(ix>=0x4006DB6D){p = qR3; q= qS3;}
- else if(ix>=0x40000000){p = qR2; q= qS2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));
- return (-.125 + r/s)/x;
-}
diff --git a/lib/msun/src/e_j0f.c b/lib/msun/src/e_j0f.c
deleted file mode 100644
index cdfedd9..0000000
--- a/lib/msun/src/e_j0f.c
+++ /dev/null
@@ -1,444 +0,0 @@
-/* e_j0f.c -- float version of e_j0.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static float pzerof(float), qzerof(float);
-#else
-static float pzerof(), qzerof();
-#endif
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-huge = 1e30,
-one = 1.0,
-invsqrtpi= 5.6418961287e-01, /* 0x3f106ebb */
-tpi = 6.3661974669e-01, /* 0x3f22f983 */
- /* R0/S0 on [0, 2.00] */
-R02 = 1.5625000000e-02, /* 0x3c800000 */
-R03 = -1.8997929874e-04, /* 0xb947352e */
-R04 = 1.8295404516e-06, /* 0x35f58e88 */
-R05 = -4.6183270541e-09, /* 0xb19eaf3c */
-S01 = 1.5619102865e-02, /* 0x3c7fe744 */
-S02 = 1.1692678527e-04, /* 0x38f53697 */
-S03 = 5.1354652442e-07, /* 0x3509daa6 */
-S04 = 1.1661400734e-09; /* 0x30a045e8 */
-
-#ifdef __STDC__
-static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-
-#ifdef __STDC__
- float __ieee754_j0f(float x)
-#else
- float __ieee754_j0f(x)
- float x;
-#endif
-{
- float z, s,c,ss,cc,r,u,v;
- int32_t hx,ix;
-
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7f800000) return one/(x*x);
- x = fabsf(x);
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- s = sinf(x);
- c = cosf(x);
- ss = s-c;
- cc = s+c;
- if(ix<0x7f000000) { /* make sure x+x not overflow */
- z = -cosf(x+x);
- if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
- }
- /*
- * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
- * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
- */
- if(ix>0x80000000) z = (invsqrtpi*cc)/sqrtf(x);
- else {
- u = pzerof(x); v = qzerof(x);
- z = invsqrtpi*(u*cc-v*ss)/sqrtf(x);
- }
- return z;
- }
- if(ix<0x39000000) { /* |x| < 2**-13 */
- if(huge+x>one) { /* raise inexact if x != 0 */
- if(ix<0x32000000) return one; /* |x|<2**-27 */
- else return one - (float)0.25*x*x;
- }
- }
- z = x*x;
- r = z*(R02+z*(R03+z*(R04+z*R05)));
- s = one+z*(S01+z*(S02+z*(S03+z*S04)));
- if(ix < 0x3F800000) { /* |x| < 1.00 */
- return one + z*((float)-0.25+(r/s));
- } else {
- u = (float)0.5*x;
- return((one+u)*(one-u)+z*(r/s));
- }
-}
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-u00 = -7.3804296553e-02, /* 0xbd9726b5 */
-u01 = 1.7666645348e-01, /* 0x3e34e80d */
-u02 = -1.3818567619e-02, /* 0xbc626746 */
-u03 = 3.4745343146e-04, /* 0x39b62a69 */
-u04 = -3.8140706238e-06, /* 0xb67ff53c */
-u05 = 1.9559013964e-08, /* 0x32a802ba */
-u06 = -3.9820518410e-11, /* 0xae2f21eb */
-v01 = 1.2730483897e-02, /* 0x3c509385 */
-v02 = 7.6006865129e-05, /* 0x389f65e0 */
-v03 = 2.5915085189e-07, /* 0x348b216c */
-v04 = 4.4111031494e-10; /* 0x2ff280c2 */
-
-#ifdef __STDC__
- float __ieee754_y0f(float x)
-#else
- float __ieee754_y0f(x)
- float x;
-#endif
-{
- float z, s,c,ss,cc,u,v;
- int32_t hx,ix;
-
- GET_FLOAT_WORD(hx,x);
- ix = 0x7fffffff&hx;
- /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0 */
- if(ix>=0x7f800000) return one/(x+x*x);
- if(ix==0) return -one/zero;
- if(hx<0) return zero/zero;
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- /* y0(x) = sqrt(2/(pi*x))*(p0(x)*sin(x0)+q0(x)*cos(x0))
- * where x0 = x-pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
- * = 1/sqrt(2) * (sin(x) + cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
- s = sinf(x);
- c = cosf(x);
- ss = s-c;
- cc = s+c;
- /*
- * j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
- * y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
- */
- if(ix<0x7f000000) { /* make sure x+x not overflow */
- z = -cosf(x+x);
- if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
- }
- if(ix>0x80000000) z = (invsqrtpi*ss)/sqrtf(x);
- else {
- u = pzerof(x); v = qzerof(x);
- z = invsqrtpi*(u*ss+v*cc)/sqrtf(x);
- }
- return z;
- }
- if(ix<=0x32000000) { /* x < 2**-27 */
- return(u00 + tpi*__ieee754_logf(x));
- }
- z = x*x;
- u = u00+z*(u01+z*(u02+z*(u03+z*(u04+z*(u05+z*u06)))));
- v = one+z*(v01+z*(v02+z*(v03+z*v04)));
- return(u/v + tpi*(__ieee754_j0f(x)*__ieee754_logf(x)));
-}
-
-/* The asymptotic expansions of pzero is
- * 1 - 9/128 s^2 + 11025/98304 s^4 - ..., where s = 1/x.
- * For x >= 2, We approximate pzero by
- * pzero(x) = 1 + (R/S)
- * where R = pR0 + pR1*s^2 + pR2*s^4 + ... + pR5*s^10
- * S = 1 + pS0*s^2 + ... + pS4*s^10
- * and
- * | pzero(x)-1-R/S | <= 2 ** ( -60.26)
- */
-#ifdef __STDC__
-static const float pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static float pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
- 0.0000000000e+00, /* 0x00000000 */
- -7.0312500000e-02, /* 0xbd900000 */
- -8.0816707611e+00, /* 0xc1014e86 */
- -2.5706311035e+02, /* 0xc3808814 */
- -2.4852163086e+03, /* 0xc51b5376 */
- -5.2530439453e+03, /* 0xc5a4285a */
-};
-#ifdef __STDC__
-static const float pS8[5] = {
-#else
-static float pS8[5] = {
-#endif
- 1.1653436279e+02, /* 0x42e91198 */
- 3.8337448730e+03, /* 0x456f9beb */
- 4.0597855469e+04, /* 0x471e95db */
- 1.1675296875e+05, /* 0x47e4087c */
- 4.7627726562e+04, /* 0x473a0bba */
-};
-#ifdef __STDC__
-static const float pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static float pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
- -1.1412546255e-11, /* 0xad48c58a */
- -7.0312492549e-02, /* 0xbd8fffff */
- -4.1596107483e+00, /* 0xc0851b88 */
- -6.7674766541e+01, /* 0xc287597b */
- -3.3123129272e+02, /* 0xc3a59d9b */
- -3.4643338013e+02, /* 0xc3ad3779 */
-};
-#ifdef __STDC__
-static const float pS5[5] = {
-#else
-static float pS5[5] = {
-#endif
- 6.0753936768e+01, /* 0x42730408 */
- 1.0512523193e+03, /* 0x44836813 */
- 5.9789707031e+03, /* 0x45bad7c4 */
- 9.6254453125e+03, /* 0x461665c8 */
- 2.4060581055e+03, /* 0x451660ee */
-};
-
-#ifdef __STDC__
-static const float pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#else
-static float pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
- -2.5470459075e-09, /* 0xb12f081b */
- -7.0311963558e-02, /* 0xbd8fffb8 */
- -2.4090321064e+00, /* 0xc01a2d95 */
- -2.1965976715e+01, /* 0xc1afba52 */
- -5.8079170227e+01, /* 0xc2685112 */
- -3.1447946548e+01, /* 0xc1fb9565 */
-};
-#ifdef __STDC__
-static const float pS3[5] = {
-#else
-static float pS3[5] = {
-#endif
- 3.5856033325e+01, /* 0x420f6c94 */
- 3.6151397705e+02, /* 0x43b4c1ca */
- 1.1936077881e+03, /* 0x44953373 */
- 1.1279968262e+03, /* 0x448cffe6 */
- 1.7358093262e+02, /* 0x432d94b8 */
-};
-
-#ifdef __STDC__
-static const float pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static float pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
- -8.8753431271e-08, /* 0xb3be98b7 */
- -7.0303097367e-02, /* 0xbd8ffb12 */
- -1.4507384300e+00, /* 0xbfb9b1cc */
- -7.6356959343e+00, /* 0xc0f4579f */
- -1.1193166733e+01, /* 0xc1331736 */
- -3.2336456776e+00, /* 0xc04ef40d */
-};
-#ifdef __STDC__
-static const float pS2[5] = {
-#else
-static float pS2[5] = {
-#endif
- 2.2220300674e+01, /* 0x41b1c32d */
- 1.3620678711e+02, /* 0x430834f0 */
- 2.7047027588e+02, /* 0x43873c32 */
- 1.5387539673e+02, /* 0x4319e01a */
- 1.4657617569e+01, /* 0x416a859a */
-};
-
-#ifdef __STDC__
- static float pzerof(float x)
-#else
- static float pzerof(x)
- float x;
-#endif
-{
-#ifdef __STDC__
- const float *p,*q;
-#else
- float *p,*q;
-#endif
- float z,r,s;
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff;
- if(ix>=0x41000000) {p = pR8; q= pS8;}
- else if(ix>=0x40f71c58){p = pR5; q= pS5;}
- else if(ix>=0x4036db68){p = pR3; q= pS3;}
- else if(ix>=0x40000000){p = pR2; q= pS2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
- return one+ r/s;
-}
-
-
-/* For x >= 8, the asymptotic expansions of qzero is
- * -1/8 s + 75/1024 s^3 - ..., where s = 1/x.
- * We approximate pzero by
- * qzero(x) = s*(-1.25 + (R/S))
- * where R = qR0 + qR1*s^2 + qR2*s^4 + ... + qR5*s^10
- * S = 1 + qS0*s^2 + ... + qS5*s^12
- * and
- * | qzero(x)/s +1.25-R/S | <= 2 ** ( -61.22)
- */
-#ifdef __STDC__
-static const float qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static float qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
- 0.0000000000e+00, /* 0x00000000 */
- 7.3242187500e-02, /* 0x3d960000 */
- 1.1768206596e+01, /* 0x413c4a93 */
- 5.5767340088e+02, /* 0x440b6b19 */
- 8.8591972656e+03, /* 0x460a6cca */
- 3.7014625000e+04, /* 0x471096a0 */
-};
-#ifdef __STDC__
-static const float qS8[6] = {
-#else
-static float qS8[6] = {
-#endif
- 1.6377603149e+02, /* 0x4323c6aa */
- 8.0983447266e+03, /* 0x45fd12c2 */
- 1.4253829688e+05, /* 0x480b3293 */
- 8.0330925000e+05, /* 0x49441ed4 */
- 8.4050156250e+05, /* 0x494d3359 */
- -3.4389928125e+05, /* 0xc8a7eb69 */
-};
-
-#ifdef __STDC__
-static const float qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static float qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
- 1.8408595828e-11, /* 0x2da1ec79 */
- 7.3242180049e-02, /* 0x3d95ffff */
- 5.8356351852e+00, /* 0x40babd86 */
- 1.3511157227e+02, /* 0x43071c90 */
- 1.0272437744e+03, /* 0x448067cd */
- 1.9899779053e+03, /* 0x44f8bf4b */
-};
-#ifdef __STDC__
-static const float qS5[6] = {
-#else
-static float qS5[6] = {
-#endif
- 8.2776611328e+01, /* 0x42a58da0 */
- 2.0778142090e+03, /* 0x4501dd07 */
- 1.8847289062e+04, /* 0x46933e94 */
- 5.6751113281e+04, /* 0x475daf1d */
- 3.5976753906e+04, /* 0x470c88c1 */
- -5.3543427734e+03, /* 0xc5a752be */
-};
-
-#ifdef __STDC__
-static const float qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#else
-static float qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
- 4.3774099900e-09, /* 0x3196681b */
- 7.3241114616e-02, /* 0x3d95ff70 */
- 3.3442313671e+00, /* 0x405607e3 */
- 4.2621845245e+01, /* 0x422a7cc5 */
- 1.7080809021e+02, /* 0x432acedf */
- 1.6673394775e+02, /* 0x4326bbe4 */
-};
-#ifdef __STDC__
-static const float qS3[6] = {
-#else
-static float qS3[6] = {
-#endif
- 4.8758872986e+01, /* 0x42430916 */
- 7.0968920898e+02, /* 0x44316c1c */
- 3.7041481934e+03, /* 0x4567825f */
- 6.4604252930e+03, /* 0x45c9e367 */
- 2.5163337402e+03, /* 0x451d4557 */
- -1.4924745178e+02, /* 0xc3153f59 */
-};
-
-#ifdef __STDC__
-static const float qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static float qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
- 1.5044444979e-07, /* 0x342189db */
- 7.3223426938e-02, /* 0x3d95f62a */
- 1.9981917143e+00, /* 0x3fffc4bf */
- 1.4495602608e+01, /* 0x4167edfd */
- 3.1666231155e+01, /* 0x41fd5471 */
- 1.6252708435e+01, /* 0x4182058c */
-};
-#ifdef __STDC__
-static const float qS2[6] = {
-#else
-static float qS2[6] = {
-#endif
- 3.0365585327e+01, /* 0x41f2ecb8 */
- 2.6934811401e+02, /* 0x4386ac8f */
- 8.4478375244e+02, /* 0x44533229 */
- 8.8293585205e+02, /* 0x445cbbe5 */
- 2.1266638184e+02, /* 0x4354aa98 */
- -5.3109550476e+00, /* 0xc0a9f358 */
-};
-
-#ifdef __STDC__
- static float qzerof(float x)
-#else
- static float qzerof(x)
- float x;
-#endif
-{
-#ifdef __STDC__
- const float *p,*q;
-#else
- float *p,*q;
-#endif
- float s,r,z;
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff;
- if(ix>=0x41000000) {p = qR8; q= qS8;}
- else if(ix>=0x40f71c58){p = qR5; q= qS5;}
- else if(ix>=0x4036db68){p = qR3; q= qS3;}
- else if(ix>=0x40000000){p = qR2; q= qS2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));
- return (-(float).125 + r/s)/x;
-}
diff --git a/lib/msun/src/e_j1.c b/lib/msun/src/e_j1.c
deleted file mode 100644
index 8af4560..0000000
--- a/lib/msun/src/e_j1.c
+++ /dev/null
@@ -1,486 +0,0 @@
-/* @(#)e_j1.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_j1(x), __ieee754_y1(x)
- * Bessel function of the first and second kinds of order zero.
- * Method -- j1(x):
- * 1. For tiny x, we use j1(x) = x/2 - x^3/16 + x^5/384 - ...
- * 2. Reduce x to |x| since j1(x)=-j1(-x), and
- * for x in (0,2)
- * j1(x) = x/2 + x*z*R0/S0, where z = x*x;
- * (precision: |j1/x - 1/2 - R0/S0 |<2**-61.51 )
- * for x in (2,inf)
- * j1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))
- * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
- * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
- * as follow:
- * cos(x1) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * sin(x1) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = -1/sqrt(2) * (sin(x) + cos(x))
- * (To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.)
- *
- * 3 Special cases
- * j1(nan)= nan
- * j1(0) = 0
- * j1(inf) = 0
- *
- * Method -- y1(x):
- * 1. screen out x<=0 cases: y1(0)=-inf, y1(x<0)=NaN
- * 2. For x<2.
- * Since
- * y1(x) = 2/pi*(j1(x)*(ln(x/2)+Euler)-1/x-x/2+5/64*x^3-...)
- * therefore y1(x)-2/pi*j1(x)*ln(x)-1/x is an odd function.
- * We use the following function to approximate y1,
- * y1(x) = x*U(z)/V(z) + (2/pi)*(j1(x)*ln(x)-1/x), z= x^2
- * where for x in [0,2] (abs err less than 2**-65.89)
- * U(z) = U0[0] + U0[1]*z + ... + U0[4]*z^4
- * V(z) = 1 + v0[0]*z + ... + v0[4]*z^5
- * Note: For tiny x, 1/x dominate y1 and hence
- * y1(tiny) = -2/pi/tiny, (choose tiny<2**-54)
- * 3. For x>=2.
- * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
- * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
- * by method mentioned above.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static double pone(double), qone(double);
-#else
-static double pone(), qone();
-#endif
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-huge = 1e300,
-one = 1.0,
-invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */
-tpi = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
- /* R0/S0 on [0,2] */
-r00 = -6.25000000000000000000e-02, /* 0xBFB00000, 0x00000000 */
-r01 = 1.40705666955189706048e-03, /* 0x3F570D9F, 0x98472C61 */
-r02 = -1.59955631084035597520e-05, /* 0xBEF0C5C6, 0xBA169668 */
-r03 = 4.96727999609584448412e-08, /* 0x3E6AAAFA, 0x46CA0BD9 */
-s01 = 1.91537599538363460805e-02, /* 0x3F939D0B, 0x12637E53 */
-s02 = 1.85946785588630915560e-04, /* 0x3F285F56, 0xB9CDF664 */
-s03 = 1.17718464042623683263e-06, /* 0x3EB3BFF8, 0x333F8498 */
-s04 = 5.04636257076217042715e-09, /* 0x3E35AC88, 0xC97DFF2C */
-s05 = 1.23542274426137913908e-11; /* 0x3DAB2ACF, 0xCFB97ED8 */
-
-#ifdef __STDC__
-static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-
-#ifdef __STDC__
- double __ieee754_j1(double x)
-#else
- double __ieee754_j1(x)
- double x;
-#endif
-{
- double z, s,c,ss,cc,r,u,v,y;
- int32_t hx,ix;
-
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) return one/x;
- y = fabs(x);
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- s = sin(y);
- c = cos(y);
- ss = -s-c;
- cc = s-c;
- if(ix<0x7fe00000) { /* make sure y+y not overflow */
- z = cos(y+y);
- if ((s*c)>zero) cc = z/ss;
- else ss = z/cc;
- }
- /*
- * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
- * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x)
- */
- if(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(y);
- else {
- u = pone(y); v = qone(y);
- z = invsqrtpi*(u*cc-v*ss)/sqrt(y);
- }
- if(hx<0) return -z;
- else return z;
- }
- if(ix<0x3e400000) { /* |x|<2**-27 */
- if(huge+x>one) return 0.5*x;/* inexact if x!=0 necessary */
- }
- z = x*x;
- r = z*(r00+z*(r01+z*(r02+z*r03)));
- s = one+z*(s01+z*(s02+z*(s03+z*(s04+z*s05))));
- r *= x;
- return(x*0.5+r/s);
-}
-
-#ifdef __STDC__
-static const double U0[5] = {
-#else
-static double U0[5] = {
-#endif
- -1.96057090646238940668e-01, /* 0xBFC91866, 0x143CBC8A */
- 5.04438716639811282616e-02, /* 0x3FA9D3C7, 0x76292CD1 */
- -1.91256895875763547298e-03, /* 0xBF5F55E5, 0x4844F50F */
- 2.35252600561610495928e-05, /* 0x3EF8AB03, 0x8FA6B88E */
- -9.19099158039878874504e-08, /* 0xBE78AC00, 0x569105B8 */
-};
-#ifdef __STDC__
-static const double V0[5] = {
-#else
-static double V0[5] = {
-#endif
- 1.99167318236649903973e-02, /* 0x3F94650D, 0x3F4DA9F0 */
- 2.02552581025135171496e-04, /* 0x3F2A8C89, 0x6C257764 */
- 1.35608801097516229404e-06, /* 0x3EB6C05A, 0x894E8CA6 */
- 6.22741452364621501295e-09, /* 0x3E3ABF1D, 0x5BA69A86 */
- 1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */
-};
-
-#ifdef __STDC__
- double __ieee754_y1(double x)
-#else
- double __ieee754_y1(x)
- double x;
-#endif
-{
- double z, s,c,ss,cc,u,v;
- int32_t hx,ix,lx;
-
- EXTRACT_WORDS(hx,lx,x);
- ix = 0x7fffffff&hx;
- /* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */
- if(ix>=0x7ff00000) return one/(x+x*x);
- if((ix|lx)==0) return -one/zero;
- if(hx<0) return zero/zero;
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- s = sin(x);
- c = cos(x);
- ss = -s-c;
- cc = s-c;
- if(ix<0x7fe00000) { /* make sure x+x not overflow */
- z = cos(x+x);
- if ((s*c)>zero) cc = z/ss;
- else ss = z/cc;
- }
- /* y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x0)+q1(x)*cos(x0))
- * where x0 = x-3pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = -1/sqrt(2) * (cos(x) + sin(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
- if(ix>0x48000000) z = (invsqrtpi*ss)/sqrt(x);
- else {
- u = pone(x); v = qone(x);
- z = invsqrtpi*(u*ss+v*cc)/sqrt(x);
- }
- return z;
- }
- if(ix<=0x3c900000) { /* x < 2**-54 */
- return(-tpi/x);
- }
- z = x*x;
- u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4])));
- v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4]))));
- return(x*(u/v) + tpi*(__ieee754_j1(x)*__ieee754_log(x)-one/x));
-}
-
-/* For x >= 8, the asymptotic expansions of pone is
- * 1 + 15/128 s^2 - 4725/2^15 s^4 - ..., where s = 1/x.
- * We approximate pone by
- * pone(x) = 1 + (R/S)
- * where R = pr0 + pr1*s^2 + pr2*s^4 + ... + pr5*s^10
- * S = 1 + ps0*s^2 + ... + ps4*s^10
- * and
- * | pone(x)-1-R/S | <= 2 ** ( -60.06)
- */
-
-#ifdef __STDC__
-static const double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
- 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
- 1.17187499999988647970e-01, /* 0x3FBDFFFF, 0xFFFFFCCE */
- 1.32394806593073575129e+01, /* 0x402A7A9D, 0x357F7FCE */
- 4.12051854307378562225e+02, /* 0x4079C0D4, 0x652EA590 */
- 3.87474538913960532227e+03, /* 0x40AE457D, 0xA3A532CC */
- 7.91447954031891731574e+03, /* 0x40BEEA7A, 0xC32782DD */
-};
-#ifdef __STDC__
-static const double ps8[5] = {
-#else
-static double ps8[5] = {
-#endif
- 1.14207370375678408436e+02, /* 0x405C8D45, 0x8E656CAC */
- 3.65093083420853463394e+03, /* 0x40AC85DC, 0x964D274F */
- 3.69562060269033463555e+04, /* 0x40E20B86, 0x97C5BB7F */
- 9.76027935934950801311e+04, /* 0x40F7D42C, 0xB28F17BB */
- 3.08042720627888811578e+04, /* 0x40DE1511, 0x697A0B2D */
-};
-
-#ifdef __STDC__
-static const double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
- 1.31990519556243522749e-11, /* 0x3DAD0667, 0xDAE1CA7D */
- 1.17187493190614097638e-01, /* 0x3FBDFFFF, 0xE2C10043 */
- 6.80275127868432871736e+00, /* 0x401B3604, 0x6E6315E3 */
- 1.08308182990189109773e+02, /* 0x405B13B9, 0x452602ED */
- 5.17636139533199752805e+02, /* 0x40802D16, 0xD052D649 */
- 5.28715201363337541807e+02, /* 0x408085B8, 0xBB7E0CB7 */
-};
-#ifdef __STDC__
-static const double ps5[5] = {
-#else
-static double ps5[5] = {
-#endif
- 5.92805987221131331921e+01, /* 0x404DA3EA, 0xA8AF633D */
- 9.91401418733614377743e+02, /* 0x408EFB36, 0x1B066701 */
- 5.35326695291487976647e+03, /* 0x40B4E944, 0x5706B6FB */
- 7.84469031749551231769e+03, /* 0x40BEA4B0, 0xB8A5BB15 */
- 1.50404688810361062679e+03, /* 0x40978030, 0x036F5E51 */
-};
-
-#ifdef __STDC__
-static const double pr3[6] = {
-#else
-static double pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
- 3.02503916137373618024e-09, /* 0x3E29FC21, 0xA7AD9EDD */
- 1.17186865567253592491e-01, /* 0x3FBDFFF5, 0x5B21D17B */
- 3.93297750033315640650e+00, /* 0x400F76BC, 0xE85EAD8A */
- 3.51194035591636932736e+01, /* 0x40418F48, 0x9DA6D129 */
- 9.10550110750781271918e+01, /* 0x4056C385, 0x4D2C1837 */
- 4.85590685197364919645e+01, /* 0x4048478F, 0x8EA83EE5 */
-};
-#ifdef __STDC__
-static const double ps3[5] = {
-#else
-static double ps3[5] = {
-#endif
- 3.47913095001251519989e+01, /* 0x40416549, 0xA134069C */
- 3.36762458747825746741e+02, /* 0x40750C33, 0x07F1A75F */
- 1.04687139975775130551e+03, /* 0x40905B7C, 0x5037D523 */
- 8.90811346398256432622e+02, /* 0x408BD67D, 0xA32E31E9 */
- 1.03787932439639277504e+02, /* 0x4059F26D, 0x7C2EED53 */
-};
-
-#ifdef __STDC__
-static const double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
- 1.07710830106873743082e-07, /* 0x3E7CE9D4, 0xF65544F4 */
- 1.17176219462683348094e-01, /* 0x3FBDFF42, 0xBE760D83 */
- 2.36851496667608785174e+00, /* 0x4002F2B7, 0xF98FAEC0 */
- 1.22426109148261232917e+01, /* 0x40287C37, 0x7F71A964 */
- 1.76939711271687727390e+01, /* 0x4031B1A8, 0x177F8EE2 */
- 5.07352312588818499250e+00, /* 0x40144B49, 0xA574C1FE */
-};
-#ifdef __STDC__
-static const double ps2[5] = {
-#else
-static double ps2[5] = {
-#endif
- 2.14364859363821409488e+01, /* 0x40356FBD, 0x8AD5ECDC */
- 1.25290227168402751090e+02, /* 0x405F5293, 0x14F92CD5 */
- 2.32276469057162813669e+02, /* 0x406D08D8, 0xD5A2DBD9 */
- 1.17679373287147100768e+02, /* 0x405D6B7A, 0xDA1884A9 */
- 8.36463893371618283368e+00, /* 0x4020BAB1, 0xF44E5192 */
-};
-
-#ifdef __STDC__
- static double pone(double x)
-#else
- static double pone(x)
- double x;
-#endif
-{
-#ifdef __STDC__
- const double *p,*q;
-#else
- double *p,*q;
-#endif
- double z,r,s;
- int32_t ix;
- GET_HIGH_WORD(ix,x);
- ix &= 0x7fffffff;
- if(ix>=0x40200000) {p = pr8; q= ps8;}
- else if(ix>=0x40122E8B){p = pr5; q= ps5;}
- else if(ix>=0x4006DB6D){p = pr3; q= ps3;}
- else if(ix>=0x40000000){p = pr2; q= ps2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
- return one+ r/s;
-}
-
-
-/* For x >= 8, the asymptotic expansions of qone is
- * 3/8 s - 105/1024 s^3 - ..., where s = 1/x.
- * We approximate pone by
- * qone(x) = s*(0.375 + (R/S))
- * where R = qr1*s^2 + qr2*s^4 + ... + qr5*s^10
- * S = 1 + qs1*s^2 + ... + qs6*s^12
- * and
- * | qone(x)/s -0.375-R/S | <= 2 ** ( -61.13)
- */
-
-#ifdef __STDC__
-static const double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
- 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
- -1.02539062499992714161e-01, /* 0xBFBA3FFF, 0xFFFFFDF3 */
- -1.62717534544589987888e+01, /* 0xC0304591, 0xA26779F7 */
- -7.59601722513950107896e+02, /* 0xC087BCD0, 0x53E4B576 */
- -1.18498066702429587167e+04, /* 0xC0C724E7, 0x40F87415 */
- -4.84385124285750353010e+04, /* 0xC0E7A6D0, 0x65D09C6A */
-};
-#ifdef __STDC__
-static const double qs8[6] = {
-#else
-static double qs8[6] = {
-#endif
- 1.61395369700722909556e+02, /* 0x40642CA6, 0xDE5BCDE5 */
- 7.82538599923348465381e+03, /* 0x40BE9162, 0xD0D88419 */
- 1.33875336287249578163e+05, /* 0x4100579A, 0xB0B75E98 */
- 7.19657723683240939863e+05, /* 0x4125F653, 0x72869C19 */
- 6.66601232617776375264e+05, /* 0x412457D2, 0x7719AD5C */
- -2.94490264303834643215e+05, /* 0xC111F969, 0x0EA5AA18 */
-};
-
-#ifdef __STDC__
-static const double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
- -2.08979931141764104297e-11, /* 0xBDB6FA43, 0x1AA1A098 */
- -1.02539050241375426231e-01, /* 0xBFBA3FFF, 0xCB597FEF */
- -8.05644828123936029840e+00, /* 0xC0201CE6, 0xCA03AD4B */
- -1.83669607474888380239e+02, /* 0xC066F56D, 0x6CA7B9B0 */
- -1.37319376065508163265e+03, /* 0xC09574C6, 0x6931734F */
- -2.61244440453215656817e+03, /* 0xC0A468E3, 0x88FDA79D */
-};
-#ifdef __STDC__
-static const double qs5[6] = {
-#else
-static double qs5[6] = {
-#endif
- 8.12765501384335777857e+01, /* 0x405451B2, 0xFF5A11B2 */
- 1.99179873460485964642e+03, /* 0x409F1F31, 0xE77BF839 */
- 1.74684851924908907677e+04, /* 0x40D10F1F, 0x0D64CE29 */
- 4.98514270910352279316e+04, /* 0x40E8576D, 0xAABAD197 */
- 2.79480751638918118260e+04, /* 0x40DB4B04, 0xCF7C364B */
- -4.71918354795128470869e+03, /* 0xC0B26F2E, 0xFCFFA004 */
-};
-
-#ifdef __STDC__
-static const double qr3[6] = {
-#else
-static double qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
- -5.07831226461766561369e-09, /* 0xBE35CFA9, 0xD38FC84F */
- -1.02537829820837089745e-01, /* 0xBFBA3FEB, 0x51AEED54 */
- -4.61011581139473403113e+00, /* 0xC01270C2, 0x3302D9FF */
- -5.78472216562783643212e+01, /* 0xC04CEC71, 0xC25D16DA */
- -2.28244540737631695038e+02, /* 0xC06C87D3, 0x4718D55F */
- -2.19210128478909325622e+02, /* 0xC06B66B9, 0x5F5C1BF6 */
-};
-#ifdef __STDC__
-static const double qs3[6] = {
-#else
-static double qs3[6] = {
-#endif
- 4.76651550323729509273e+01, /* 0x4047D523, 0xCCD367E4 */
- 6.73865112676699709482e+02, /* 0x40850EEB, 0xC031EE3E */
- 3.38015286679526343505e+03, /* 0x40AA684E, 0x448E7C9A */
- 5.54772909720722782367e+03, /* 0x40B5ABBA, 0xA61D54A6 */
- 1.90311919338810798763e+03, /* 0x409DBC7A, 0x0DD4DF4B */
- -1.35201191444307340817e+02, /* 0xC060E670, 0x290A311F */
-};
-
-#ifdef __STDC__
-static const double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
- -1.78381727510958865572e-07, /* 0xBE87F126, 0x44C626D2 */
- -1.02517042607985553460e-01, /* 0xBFBA3E8E, 0x9148B010 */
- -2.75220568278187460720e+00, /* 0xC0060484, 0x69BB4EDA */
- -1.96636162643703720221e+01, /* 0xC033A9E2, 0xC168907F */
- -4.23253133372830490089e+01, /* 0xC04529A3, 0xDE104AAA */
- -2.13719211703704061733e+01, /* 0xC0355F36, 0x39CF6E52 */
-};
-#ifdef __STDC__
-static const double qs2[6] = {
-#else
-static double qs2[6] = {
-#endif
- 2.95333629060523854548e+01, /* 0x403D888A, 0x78AE64FF */
- 2.52981549982190529136e+02, /* 0x406F9F68, 0xDB821CBA */
- 7.57502834868645436472e+02, /* 0x4087AC05, 0xCE49A0F7 */
- 7.39393205320467245656e+02, /* 0x40871B25, 0x48D4C029 */
- 1.55949003336666123687e+02, /* 0x40637E5E, 0x3C3ED8D4 */
- -4.95949898822628210127e+00, /* 0xC013D686, 0xE71BE86B */
-};
-
-#ifdef __STDC__
- static double qone(double x)
-#else
- static double qone(x)
- double x;
-#endif
-{
-#ifdef __STDC__
- const double *p,*q;
-#else
- double *p,*q;
-#endif
- double s,r,z;
- int32_t ix;
- GET_HIGH_WORD(ix,x);
- ix &= 0x7fffffff;
- if(ix>=0x40200000) {p = qr8; q= qs8;}
- else if(ix>=0x40122E8B){p = qr5; q= qs5;}
- else if(ix>=0x4006DB6D){p = qr3; q= qs3;}
- else if(ix>=0x40000000){p = qr2; q= qs2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));
- return (.375 + r/s)/x;
-}
diff --git a/lib/msun/src/e_j1f.c b/lib/msun/src/e_j1f.c
deleted file mode 100644
index 137b5f8..0000000
--- a/lib/msun/src/e_j1f.c
+++ /dev/null
@@ -1,444 +0,0 @@
-/* e_j1f.c -- float version of e_j1.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static float ponef(float), qonef(float);
-#else
-static float ponef(), qonef();
-#endif
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-huge = 1e30,
-one = 1.0,
-invsqrtpi= 5.6418961287e-01, /* 0x3f106ebb */
-tpi = 6.3661974669e-01, /* 0x3f22f983 */
- /* R0/S0 on [0,2] */
-r00 = -6.2500000000e-02, /* 0xbd800000 */
-r01 = 1.4070566976e-03, /* 0x3ab86cfd */
-r02 = -1.5995563444e-05, /* 0xb7862e36 */
-r03 = 4.9672799207e-08, /* 0x335557d2 */
-s01 = 1.9153760746e-02, /* 0x3c9ce859 */
-s02 = 1.8594678841e-04, /* 0x3942fab6 */
-s03 = 1.1771846857e-06, /* 0x359dffc2 */
-s04 = 5.0463624390e-09, /* 0x31ad6446 */
-s05 = 1.2354227016e-11; /* 0x2d59567e */
-
-#ifdef __STDC__
-static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-
-#ifdef __STDC__
- float __ieee754_j1f(float x)
-#else
- float __ieee754_j1f(x)
- float x;
-#endif
-{
- float z, s,c,ss,cc,r,u,v,y;
- int32_t hx,ix;
-
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7f800000) return one/x;
- y = fabsf(x);
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- s = sinf(y);
- c = cosf(y);
- ss = -s-c;
- cc = s-c;
- if(ix<0x7f000000) { /* make sure y+y not overflow */
- z = cosf(y+y);
- if ((s*c)>zero) cc = z/ss;
- else ss = z/cc;
- }
- /*
- * j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
- * y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x)
- */
- if(ix>0x80000000) z = (invsqrtpi*cc)/sqrtf(y);
- else {
- u = ponef(y); v = qonef(y);
- z = invsqrtpi*(u*cc-v*ss)/sqrtf(y);
- }
- if(hx<0) return -z;
- else return z;
- }
- if(ix<0x32000000) { /* |x|<2**-27 */
- if(huge+x>one) return (float)0.5*x;/* inexact if x!=0 necessary */
- }
- z = x*x;
- r = z*(r00+z*(r01+z*(r02+z*r03)));
- s = one+z*(s01+z*(s02+z*(s03+z*(s04+z*s05))));
- r *= x;
- return(x*(float)0.5+r/s);
-}
-
-#ifdef __STDC__
-static const float U0[5] = {
-#else
-static float U0[5] = {
-#endif
- -1.9605709612e-01, /* 0xbe48c331 */
- 5.0443872809e-02, /* 0x3d4e9e3c */
- -1.9125689287e-03, /* 0xbafaaf2a */
- 2.3525259166e-05, /* 0x37c5581c */
- -9.1909917899e-08, /* 0xb3c56003 */
-};
-#ifdef __STDC__
-static const float V0[5] = {
-#else
-static float V0[5] = {
-#endif
- 1.9916731864e-02, /* 0x3ca3286a */
- 2.0255257550e-04, /* 0x3954644b */
- 1.3560879779e-06, /* 0x35b602d4 */
- 6.2274145840e-09, /* 0x31d5f8eb */
- 1.6655924903e-11, /* 0x2d9281cf */
-};
-
-#ifdef __STDC__
- float __ieee754_y1f(float x)
-#else
- float __ieee754_y1f(x)
- float x;
-#endif
-{
- float z, s,c,ss,cc,u,v;
- int32_t hx,ix;
-
- GET_FLOAT_WORD(hx,x);
- ix = 0x7fffffff&hx;
- /* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */
- if(ix>=0x7f800000) return one/(x+x*x);
- if(ix==0) return -one/zero;
- if(hx<0) return zero/zero;
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- s = sinf(x);
- c = cosf(x);
- ss = -s-c;
- cc = s-c;
- if(ix<0x7f000000) { /* make sure x+x not overflow */
- z = cosf(x+x);
- if ((s*c)>zero) cc = z/ss;
- else ss = z/cc;
- }
- /* y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x0)+q1(x)*cos(x0))
- * where x0 = x-3pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = -1/sqrt(2) * (cos(x) + sin(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
- if(ix>0x48000000) z = (invsqrtpi*ss)/sqrtf(x);
- else {
- u = ponef(x); v = qonef(x);
- z = invsqrtpi*(u*ss+v*cc)/sqrtf(x);
- }
- return z;
- }
- if(ix<=0x24800000) { /* x < 2**-54 */
- return(-tpi/x);
- }
- z = x*x;
- u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4])));
- v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4]))));
- return(x*(u/v) + tpi*(__ieee754_j1f(x)*__ieee754_logf(x)-one/x));
-}
-
-/* For x >= 8, the asymptotic expansions of pone is
- * 1 + 15/128 s^2 - 4725/2^15 s^4 - ..., where s = 1/x.
- * We approximate pone by
- * pone(x) = 1 + (R/S)
- * where R = pr0 + pr1*s^2 + pr2*s^4 + ... + pr5*s^10
- * S = 1 + ps0*s^2 + ... + ps4*s^10
- * and
- * | pone(x)-1-R/S | <= 2 ** ( -60.06)
- */
-
-#ifdef __STDC__
-static const float pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static float pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
- 0.0000000000e+00, /* 0x00000000 */
- 1.1718750000e-01, /* 0x3df00000 */
- 1.3239480972e+01, /* 0x4153d4ea */
- 4.1205184937e+02, /* 0x43ce06a3 */
- 3.8747453613e+03, /* 0x45722bed */
- 7.9144794922e+03, /* 0x45f753d6 */
-};
-#ifdef __STDC__
-static const float ps8[5] = {
-#else
-static float ps8[5] = {
-#endif
- 1.1420736694e+02, /* 0x42e46a2c */
- 3.6509309082e+03, /* 0x45642ee5 */
- 3.6956207031e+04, /* 0x47105c35 */
- 9.7602796875e+04, /* 0x47bea166 */
- 3.0804271484e+04, /* 0x46f0a88b */
-};
-
-#ifdef __STDC__
-static const float pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static float pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
- 1.3199052094e-11, /* 0x2d68333f */
- 1.1718749255e-01, /* 0x3defffff */
- 6.8027510643e+00, /* 0x40d9b023 */
- 1.0830818176e+02, /* 0x42d89dca */
- 5.1763616943e+02, /* 0x440168b7 */
- 5.2871520996e+02, /* 0x44042dc6 */
-};
-#ifdef __STDC__
-static const float ps5[5] = {
-#else
-static float ps5[5] = {
-#endif
- 5.9280597687e+01, /* 0x426d1f55 */
- 9.9140142822e+02, /* 0x4477d9b1 */
- 5.3532670898e+03, /* 0x45a74a23 */
- 7.8446904297e+03, /* 0x45f52586 */
- 1.5040468750e+03, /* 0x44bc0180 */
-};
-
-#ifdef __STDC__
-static const float pr3[6] = {
-#else
-static float pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
- 3.0250391081e-09, /* 0x314fe10d */
- 1.1718686670e-01, /* 0x3defffab */
- 3.9329774380e+00, /* 0x407bb5e7 */
- 3.5119403839e+01, /* 0x420c7a45 */
- 9.1055007935e+01, /* 0x42b61c2a */
- 4.8559066772e+01, /* 0x42423c7c */
-};
-#ifdef __STDC__
-static const float ps3[5] = {
-#else
-static float ps3[5] = {
-#endif
- 3.4791309357e+01, /* 0x420b2a4d */
- 3.3676245117e+02, /* 0x43a86198 */
- 1.0468714600e+03, /* 0x4482dbe3 */
- 8.9081134033e+02, /* 0x445eb3ed */
- 1.0378793335e+02, /* 0x42cf936c */
-};
-
-#ifdef __STDC__
-static const float pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static float pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
- 1.0771083225e-07, /* 0x33e74ea8 */
- 1.1717621982e-01, /* 0x3deffa16 */
- 2.3685150146e+00, /* 0x401795c0 */
- 1.2242610931e+01, /* 0x4143e1bc */
- 1.7693971634e+01, /* 0x418d8d41 */
- 5.0735230446e+00, /* 0x40a25a4d */
-};
-#ifdef __STDC__
-static const float ps2[5] = {
-#else
-static float ps2[5] = {
-#endif
- 2.1436485291e+01, /* 0x41ab7dec */
- 1.2529022980e+02, /* 0x42fa9499 */
- 2.3227647400e+02, /* 0x436846c7 */
- 1.1767937469e+02, /* 0x42eb5bd7 */
- 8.3646392822e+00, /* 0x4105d590 */
-};
-
-#ifdef __STDC__
- static float ponef(float x)
-#else
- static float ponef(x)
- float x;
-#endif
-{
-#ifdef __STDC__
- const float *p,*q;
-#else
- float *p,*q;
-#endif
- float z,r,s;
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff;
- if(ix>=0x41000000) {p = pr8; q= ps8;}
- else if(ix>=0x40f71c58){p = pr5; q= ps5;}
- else if(ix>=0x4036db68){p = pr3; q= ps3;}
- else if(ix>=0x40000000){p = pr2; q= ps2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
- return one+ r/s;
-}
-
-
-/* For x >= 8, the asymptotic expansions of qone is
- * 3/8 s - 105/1024 s^3 - ..., where s = 1/x.
- * We approximate pone by
- * qone(x) = s*(0.375 + (R/S))
- * where R = qr1*s^2 + qr2*s^4 + ... + qr5*s^10
- * S = 1 + qs1*s^2 + ... + qs6*s^12
- * and
- * | qone(x)/s -0.375-R/S | <= 2 ** ( -61.13)
- */
-
-#ifdef __STDC__
-static const float qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static float qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
- 0.0000000000e+00, /* 0x00000000 */
- -1.0253906250e-01, /* 0xbdd20000 */
- -1.6271753311e+01, /* 0xc1822c8d */
- -7.5960174561e+02, /* 0xc43de683 */
- -1.1849806641e+04, /* 0xc639273a */
- -4.8438511719e+04, /* 0xc73d3683 */
-};
-#ifdef __STDC__
-static const float qs8[6] = {
-#else
-static float qs8[6] = {
-#endif
- 1.6139537048e+02, /* 0x43216537 */
- 7.8253862305e+03, /* 0x45f48b17 */
- 1.3387534375e+05, /* 0x4802bcd6 */
- 7.1965775000e+05, /* 0x492fb29c */
- 6.6660125000e+05, /* 0x4922be94 */
- -2.9449025000e+05, /* 0xc88fcb48 */
-};
-
-#ifdef __STDC__
-static const float qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static float qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
- -2.0897993405e-11, /* 0xadb7d219 */
- -1.0253904760e-01, /* 0xbdd1fffe */
- -8.0564479828e+00, /* 0xc100e736 */
- -1.8366960144e+02, /* 0xc337ab6b */
- -1.3731937256e+03, /* 0xc4aba633 */
- -2.6124443359e+03, /* 0xc523471c */
-};
-#ifdef __STDC__
-static const float qs5[6] = {
-#else
-static float qs5[6] = {
-#endif
- 8.1276550293e+01, /* 0x42a28d98 */
- 1.9917987061e+03, /* 0x44f8f98f */
- 1.7468484375e+04, /* 0x468878f8 */
- 4.9851425781e+04, /* 0x4742bb6d */
- 2.7948074219e+04, /* 0x46da5826 */
- -4.7191835938e+03, /* 0xc5937978 */
-};
-
-#ifdef __STDC__
-static const float qr3[6] = {
-#else
-static float qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
- -5.0783124372e-09, /* 0xb1ae7d4f */
- -1.0253783315e-01, /* 0xbdd1ff5b */
- -4.6101160049e+00, /* 0xc0938612 */
- -5.7847221375e+01, /* 0xc267638e */
- -2.2824453735e+02, /* 0xc3643e9a */
- -2.1921012878e+02, /* 0xc35b35cb */
-};
-#ifdef __STDC__
-static const float qs3[6] = {
-#else
-static float qs3[6] = {
-#endif
- 4.7665153503e+01, /* 0x423ea91e */
- 6.7386511230e+02, /* 0x4428775e */
- 3.3801528320e+03, /* 0x45534272 */
- 5.5477290039e+03, /* 0x45ad5dd5 */
- 1.9031191406e+03, /* 0x44ede3d0 */
- -1.3520118713e+02, /* 0xc3073381 */
-};
-
-#ifdef __STDC__
-static const float qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static float qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
- -1.7838172539e-07, /* 0xb43f8932 */
- -1.0251704603e-01, /* 0xbdd1f475 */
- -2.7522056103e+00, /* 0xc0302423 */
- -1.9663616180e+01, /* 0xc19d4f16 */
- -4.2325313568e+01, /* 0xc2294d1f */
- -2.1371921539e+01, /* 0xc1aaf9b2 */
-};
-#ifdef __STDC__
-static const float qs2[6] = {
-#else
-static float qs2[6] = {
-#endif
- 2.9533363342e+01, /* 0x41ec4454 */
- 2.5298155212e+02, /* 0x437cfb47 */
- 7.5750280762e+02, /* 0x443d602e */
- 7.3939318848e+02, /* 0x4438d92a */
- 1.5594900513e+02, /* 0x431bf2f2 */
- -4.9594988823e+00, /* 0xc09eb437 */
-};
-
-#ifdef __STDC__
- static float qonef(float x)
-#else
- static float qonef(x)
- float x;
-#endif
-{
-#ifdef __STDC__
- const float *p,*q;
-#else
- float *p,*q;
-#endif
- float s,r,z;
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff;
- if(ix>=0x40200000) {p = qr8; q= qs8;}
- else if(ix>=0x40f71c58){p = qr5; q= qs5;}
- else if(ix>=0x4036db68){p = qr3; q= qs3;}
- else if(ix>=0x40000000){p = qr2; q= qs2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*(q[4]+z*q[5])))));
- return ((float).375 + r/s)/x;
-}
diff --git a/lib/msun/src/e_jn.c b/lib/msun/src/e_jn.c
deleted file mode 100644
index 2265639..0000000
--- a/lib/msun/src/e_jn.c
+++ /dev/null
@@ -1,281 +0,0 @@
-/* @(#)e_jn.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * __ieee754_jn(n, x), __ieee754_yn(n, x)
- * floating point Bessel's function of the 1st and 2nd kind
- * of order n
- *
- * Special cases:
- * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
- * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
- * Note 2. About jn(n,x), yn(n,x)
- * For n=0, j0(x) is called,
- * for n=1, j1(x) is called,
- * for n<x, forward recursion us used starting
- * from values of j0(x) and j1(x).
- * for n>x, 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 "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */
-two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */
-one = 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */
-
-#ifdef __STDC__
-static const double zero = 0.00000000000000000000e+00;
-#else
-static double zero = 0.00000000000000000000e+00;
-#endif
-
-#ifdef __STDC__
- double __ieee754_jn(int n, double x)
-#else
- double __ieee754_jn(n,x)
- int n; double x;
-#endif
-{
- int32_t i,hx,ix,lx, sgn;
- double a, b, temp, di;
- double z, w;
-
- /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x)
- * Thus, J(-n,x) = J(n,-x)
- */
- EXTRACT_WORDS(hx,lx,x);
- ix = 0x7fffffff&hx;
- /* if J(n,NaN) is NaN */
- if((ix|((u_int32_t)(lx|-lx))>>31)>0x7ff00000) return x+x;
- if(n<0){
- n = -n;
- x = -x;
- hx ^= 0x80000000;
- }
- if(n==0) return(__ieee754_j0(x));
- if(n==1) return(__ieee754_j1(x));
- sgn = (n&1)&(hx>>31); /* even n -- 0, odd n -- sign(x) */
- x = fabs(x);
- if((ix|lx)==0||ix>=0x7ff00000) /* if x is 0 or inf */
- b = zero;
- else if((double)n<=x) {
- /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */
- if(ix>=0x52D00000) { /* x > 2**302 */
- /* (x >> n**2)
- * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Let s=sin(x), c=cos(x),
- * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
- *
- * n sin(xn)*sqt2 cos(xn)*sqt2
- * ----------------------------------
- * 0 s-c c+s
- * 1 -s-c -c+s
- * 2 -s+c -c-s
- * 3 s+c c-s
- */
- switch(n&3) {
- case 0: temp = cos(x)+sin(x); break;
- case 1: temp = -cos(x)+sin(x); break;
- case 2: temp = -cos(x)-sin(x); break;
- case 3: temp = cos(x)-sin(x); break;
- }
- b = invsqrtpi*temp/sqrt(x);
- } else {
- a = __ieee754_j0(x);
- b = __ieee754_j1(x);
- for(i=1;i<n;i++){
- temp = b;
- b = b*((double)(i+i)/x) - a; /* avoid underflow */
- a = temp;
- }
- }
- } else {
- if(ix<0x3e100000) { /* x < 2**-29 */
- /* x is tiny, return the first Taylor expansion of J(n,x)
- * J(n,x) = 1/n!*(x/2)^n - ...
- */
- if(n>33) /* underflow */
- b = zero;
- else {
- temp = x*0.5; b = temp;
- for (a=one,i=2;i<=n;i++) {
- a *= (double)i; /* a = n! */
- b *= temp; /* b = (x/2)^n */
- }
- b = b/a;
- }
- } else {
- /* use backward recurrence */
- /* x x^2 x^2
- * J(n,x)/J(n-1,x) = ---- ------ ------ .....
- * 2n - 2(n+1) - 2(n+2)
- *
- * 1 1 1
- * (for large x) = ---- ------ ------ .....
- * 2n 2(n+1) 2(n+2)
- * -- - ------ - ------ -
- * x x x
- *
- * Let w = 2n/x and h=2/x, then the above quotient
- * is equal to the continued fraction:
- * 1
- * = -----------------------
- * 1
- * w - -----------------
- * 1
- * w+h - ---------
- * w+2h - ...
- *
- * To determine how many terms needed, let
- * Q(0) = w, Q(1) = w(w+h) - 1,
- * Q(k) = (w+k*h)*Q(k-1) - Q(k-2),
- * When Q(k) > 1e4 good for single
- * When Q(k) > 1e9 good for double
- * When Q(k) > 1e17 good for quadruple
- */
- /* determine k */
- double t,v;
- double q0,q1,h,tmp; int32_t k,m;
- w = (n+n)/(double)x; h = 2.0/(double)x;
- q0 = w; z = w+h; q1 = w*z - 1.0; k=1;
- while(q1<1.0e9) {
- k += 1; z += h;
- tmp = z*q1 - q0;
- q0 = q1;
- q1 = tmp;
- }
- m = n+n;
- for(t=zero, i = 2*(n+k); i>=m; i -= 2) t = one/(i/x-t);
- a = t;
- b = one;
- /* estimate log((2/x)^n*n!) = n*log(2/x)+n*ln(n)
- * Hence, if n*(log(2n/x)) > ...
- * single 8.8722839355e+01
- * double 7.09782712893383973096e+02
- * long double 1.1356523406294143949491931077970765006170e+04
- * then recurrent value may overflow and the result is
- * likely underflow to zero
- */
- tmp = n;
- v = two/x;
- tmp = tmp*__ieee754_log(fabs(v*tmp));
- if(tmp<7.09782712893383973096e+02) {
- for(i=n-1,di=(double)(i+i);i>0;i--){
- temp = b;
- b *= di;
- b = b/x - a;
- a = temp;
- di -= two;
- }
- } else {
- for(i=n-1,di=(double)(i+i);i>0;i--){
- temp = b;
- b *= di;
- b = b/x - a;
- a = temp;
- di -= two;
- /* scale b to avoid spurious overflow */
- if(b>1e100) {
- a /= b;
- t /= b;
- b = one;
- }
- }
- }
- b = (t*__ieee754_j0(x)/b);
- }
- }
- if(sgn==1) return -b; else return b;
-}
-
-#ifdef __STDC__
- double __ieee754_yn(int n, double x)
-#else
- double __ieee754_yn(n,x)
- int n; double x;
-#endif
-{
- int32_t i,hx,ix,lx;
- int32_t sign;
- double a, b, temp;
-
- EXTRACT_WORDS(hx,lx,x);
- ix = 0x7fffffff&hx;
- /* if Y(n,NaN) is NaN */
- if((ix|((u_int32_t)(lx|-lx))>>31)>0x7ff00000) return x+x;
- if((ix|lx)==0) return -one/zero;
- if(hx<0) return zero/zero;
- sign = 1;
- if(n<0){
- n = -n;
- sign = 1 - ((n&1)<<1);
- }
- if(n==0) return(__ieee754_y0(x));
- if(n==1) return(sign*__ieee754_y1(x));
- if(ix==0x7ff00000) return zero;
- if(ix>=0x52D00000) { /* x > 2**302 */
- /* (x >> n**2)
- * Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Yn(x) = sin(x-(2n+1)*pi/4)*sqrt(2/x*pi)
- * Let s=sin(x), c=cos(x),
- * xn=x-(2n+1)*pi/4, sqt2 = sqrt(2),then
- *
- * n sin(xn)*sqt2 cos(xn)*sqt2
- * ----------------------------------
- * 0 s-c c+s
- * 1 -s-c -c+s
- * 2 -s+c -c-s
- * 3 s+c c-s
- */
- switch(n&3) {
- case 0: temp = sin(x)-cos(x); break;
- case 1: temp = -sin(x)-cos(x); break;
- case 2: temp = -sin(x)+cos(x); break;
- case 3: temp = sin(x)+cos(x); break;
- }
- b = invsqrtpi*temp/sqrt(x);
- } else {
- u_int32_t high;
- a = __ieee754_y0(x);
- b = __ieee754_y1(x);
- /* quit if b is -inf */
- GET_HIGH_WORD(high,b);
- for(i=1;i<n&&high!=0xfff00000;i++){
- temp = b;
- b = ((double)(i+i)/x)*b - a;
- GET_HIGH_WORD(high,b);
- a = temp;
- }
- }
- if(sign>0) return b; else return -b;
-}
diff --git a/lib/msun/src/e_jnf.c b/lib/msun/src/e_jnf.c
deleted file mode 100644
index 544d6e5..0000000
--- a/lib/msun/src/e_jnf.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/* e_jnf.c -- float version of e_jn.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-invsqrtpi= 5.6418961287e-01, /* 0x3f106ebb */
-two = 2.0000000000e+00, /* 0x40000000 */
-one = 1.0000000000e+00; /* 0x3F800000 */
-
-#ifdef __STDC__
-static const float zero = 0.0000000000e+00;
-#else
-static float zero = 0.0000000000e+00;
-#endif
-
-#ifdef __STDC__
- float __ieee754_jnf(int n, float x)
-#else
- float __ieee754_jnf(n,x)
- int n; float x;
-#endif
-{
- int32_t i,hx,ix, sgn;
- float a, b, temp, di;
- float z, w;
-
- /* J(-n,x) = (-1)^n * J(n, x), J(n, -x) = (-1)^n * J(n, x)
- * Thus, J(-n,x) = J(n,-x)
- */
- GET_FLOAT_WORD(hx,x);
- ix = 0x7fffffff&hx;
- /* if J(n,NaN) is NaN */
- if(ix>0x7f800000) return x+x;
- if(n<0){
- n = -n;
- x = -x;
- hx ^= 0x80000000;
- }
- if(n==0) return(__ieee754_j0f(x));
- if(n==1) return(__ieee754_j1f(x));
- sgn = (n&1)&(hx>>31); /* even n -- 0, odd n -- sign(x) */
- x = fabsf(x);
- if(ix==0||ix>=0x7f800000) /* if x is 0 or inf */
- b = zero;
- else if((float)n<=x) {
- /* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */
- a = __ieee754_j0f(x);
- b = __ieee754_j1f(x);
- for(i=1;i<n;i++){
- temp = b;
- b = b*((float)(i+i)/x) - a; /* avoid underflow */
- a = temp;
- }
- } else {
- if(ix<0x30800000) { /* x < 2**-29 */
- /* x is tiny, return the first Taylor expansion of J(n,x)
- * J(n,x) = 1/n!*(x/2)^n - ...
- */
- if(n>33) /* underflow */
- b = zero;
- else {
- temp = x*(float)0.5; b = temp;
- for (a=one,i=2;i<=n;i++) {
- a *= (float)i; /* a = n! */
- b *= temp; /* b = (x/2)^n */
- }
- b = b/a;
- }
- } else {
- /* use backward recurrence */
- /* x x^2 x^2
- * J(n,x)/J(n-1,x) = ---- ------ ------ .....
- * 2n - 2(n+1) - 2(n+2)
- *
- * 1 1 1
- * (for large x) = ---- ------ ------ .....
- * 2n 2(n+1) 2(n+2)
- * -- - ------ - ------ -
- * x x x
- *
- * Let w = 2n/x and h=2/x, then the above quotient
- * is equal to the continued fraction:
- * 1
- * = -----------------------
- * 1
- * w - -----------------
- * 1
- * w+h - ---------
- * w+2h - ...
- *
- * To determine how many terms needed, let
- * Q(0) = w, Q(1) = w(w+h) - 1,
- * Q(k) = (w+k*h)*Q(k-1) - Q(k-2),
- * When Q(k) > 1e4 good for single
- * When Q(k) > 1e9 good for double
- * When Q(k) > 1e17 good for quadruple
- */
- /* determine k */
- float t,v;
- float q0,q1,h,tmp; int32_t k,m;
- w = (n+n)/(float)x; h = (float)2.0/(float)x;
- q0 = w; z = w+h; q1 = w*z - (float)1.0; k=1;
- while(q1<(float)1.0e9) {
- k += 1; z += h;
- tmp = z*q1 - q0;
- q0 = q1;
- q1 = tmp;
- }
- m = n+n;
- for(t=zero, i = 2*(n+k); i>=m; i -= 2) t = one/(i/x-t);
- a = t;
- b = one;
- /* estimate log((2/x)^n*n!) = n*log(2/x)+n*ln(n)
- * Hence, if n*(log(2n/x)) > ...
- * single 8.8722839355e+01
- * double 7.09782712893383973096e+02
- * long double 1.1356523406294143949491931077970765006170e+04
- * then recurrent value may overflow and the result is
- * likely underflow to zero
- */
- tmp = n;
- v = two/x;
- tmp = tmp*__ieee754_logf(fabsf(v*tmp));
- if(tmp<(float)8.8721679688e+01) {
- for(i=n-1,di=(float)(i+i);i>0;i--){
- temp = b;
- b *= di;
- b = b/x - a;
- a = temp;
- di -= two;
- }
- } else {
- for(i=n-1,di=(float)(i+i);i>0;i--){
- temp = b;
- b *= di;
- b = b/x - a;
- a = temp;
- di -= two;
- /* scale b to avoid spurious overflow */
- if(b>(float)1e10) {
- a /= b;
- t /= b;
- b = one;
- }
- }
- }
- b = (t*__ieee754_j0f(x)/b);
- }
- }
- if(sgn==1) return -b; else return b;
-}
-
-#ifdef __STDC__
- float __ieee754_ynf(int n, float x)
-#else
- float __ieee754_ynf(n,x)
- int n; float x;
-#endif
-{
- int32_t i,hx,ix,ib;
- int32_t sign;
- float a, b, temp;
-
- GET_FLOAT_WORD(hx,x);
- ix = 0x7fffffff&hx;
- /* if Y(n,NaN) is NaN */
- if(ix>0x7f800000) return x+x;
- if(ix==0) return -one/zero;
- if(hx<0) return zero/zero;
- sign = 1;
- if(n<0){
- n = -n;
- sign = 1 - ((n&1)<<1);
- }
- if(n==0) return(__ieee754_y0f(x));
- if(n==1) return(sign*__ieee754_y1f(x));
- if(ix==0x7f800000) return zero;
-
- a = __ieee754_y0f(x);
- b = __ieee754_y1f(x);
- /* quit if b is -inf */
- GET_FLOAT_WORD(ib,b);
- for(i=1;i<n&&ib!=0xff800000;i++){
- temp = b;
- b = ((float)(i+i)/x)*b - a;
- GET_FLOAT_WORD(ib,b);
- a = temp;
- }
- if(sign>0) return b; else return -b;
-}
diff --git a/lib/msun/src/e_lgamma.c b/lib/msun/src/e_lgamma.c
deleted file mode 100644
index 1bf264b..0000000
--- a/lib/msun/src/e_lgamma.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* @(#)e_lgamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_lgamma(x)
- * Return the logarithm of the Gamma function of x.
- *
- * Method: call __ieee754_lgamma_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-extern int signgam;
-
-#ifdef __STDC__
- double __ieee754_lgamma(double x)
-#else
- double __ieee754_lgamma(x)
- double x;
-#endif
-{
- return __ieee754_lgamma_r(x,&signgam);
-}
diff --git a/lib/msun/src/e_lgamma_r.c b/lib/msun/src/e_lgamma_r.c
deleted file mode 100644
index ab6d2f0..0000000
--- a/lib/msun/src/e_lgamma_r.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/* @(#)er_lgamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_lgamma_r(x, signgamp)
- * Reentrant version of the logarithm of the Gamma function
- * with user provide pointer for the sign of Gamma(x).
- *
- * Method:
- * 1. Argument Reduction for 0 < x <= 8
- * Since gamma(1+s)=s*gamma(s), for x in [0,8], we may
- * reduce x to a number in [1.5,2.5] by
- * lgamma(1+s) = log(s) + lgamma(s)
- * for example,
- * lgamma(7.3) = log(6.3) + lgamma(6.3)
- * = log(6.3*5.3) + lgamma(5.3)
- * = log(6.3*5.3*4.3*3.3*2.3) + lgamma(2.3)
- * 2. Polynomial approximation of lgamma around its
- * minimun ymin=1.461632144968362245 to maintain monotonicity.
- * On [ymin-0.23, ymin+0.27] (i.e., [1.23164,1.73163]), use
- * Let z = x-ymin;
- * lgamma(x) = -1.214862905358496078218 + z^2*poly(z)
- * where
- * poly(z) is a 14 degree polynomial.
- * 2. Rational approximation in the primary interval [2,3]
- * We use the following approximation:
- * s = x-2.0;
- * lgamma(x) = 0.5*s + s*P(s)/Q(s)
- * with accuracy
- * |P/Q - (lgamma(x)-0.5s)| < 2**-61.71
- * Our algorithms are based on the following observation
- *
- * zeta(2)-1 2 zeta(3)-1 3
- * lgamma(2+s) = s*(1-Euler) + --------- * s - --------- * s + ...
- * 2 3
- *
- * where Euler = 0.5771... is the Euler constant, which is very
- * close to 0.5.
- *
- * 3. For x>=8, we have
- * lgamma(x)~(x-0.5)log(x)-x+0.5*log(2pi)+1/(12x)-1/(360x**3)+....
- * (better formula:
- * lgamma(x)~(x-0.5)*(log(x)-1)-.5*(log(2pi)-1) + ...)
- * Let z = 1/x, then we approximation
- * f(z) = lgamma(x) - (x-0.5)(log(x)-1)
- * by
- * 3 5 11
- * w = w0 + w1*z + w2*z + w3*z + ... + w6*z
- * where
- * |w - f(z)| < 2**-58.74
- *
- * 4. For negative x, since (G is gamma function)
- * -x*G(-x)*G(x) = pi/sin(pi*x),
- * we have
- * G(x) = pi/(sin(pi*x)*(-x)*G(-x))
- * since G(-x) is positive, sign(G(x)) = sign(sin(pi*x)) for x<0
- * Hence, for x<0, signgam = sign(sin(pi*x)) and
- * lgamma(x) = log(|Gamma(x)|)
- * = log(pi/(|x*sin(pi*x)|)) - lgamma(-x);
- * Note: one should avoid compute pi*(-x) directly in the
- * computation of sin(pi*(-x)).
- *
- * 5. Special Cases
- * lgamma(2+s) ~ s*(1-Euler) for tiny s
- * lgamma(1)=lgamma(2)=0
- * lgamma(x) ~ -log(x) for tiny x
- * lgamma(0) = lgamma(inf) = inf
- * lgamma(-integer) = +-inf
- *
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-two52= 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
-half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
-one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
-pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
-a0 = 7.72156649015328655494e-02, /* 0x3FB3C467, 0xE37DB0C8 */
-a1 = 3.22467033424113591611e-01, /* 0x3FD4A34C, 0xC4A60FAD */
-a2 = 6.73523010531292681824e-02, /* 0x3FB13E00, 0x1A5562A7 */
-a3 = 2.05808084325167332806e-02, /* 0x3F951322, 0xAC92547B */
-a4 = 7.38555086081402883957e-03, /* 0x3F7E404F, 0xB68FEFE8 */
-a5 = 2.89051383673415629091e-03, /* 0x3F67ADD8, 0xCCB7926B */
-a6 = 1.19270763183362067845e-03, /* 0x3F538A94, 0x116F3F5D */
-a7 = 5.10069792153511336608e-04, /* 0x3F40B6C6, 0x89B99C00 */
-a8 = 2.20862790713908385557e-04, /* 0x3F2CF2EC, 0xED10E54D */
-a9 = 1.08011567247583939954e-04, /* 0x3F1C5088, 0x987DFB07 */
-a10 = 2.52144565451257326939e-05, /* 0x3EFA7074, 0x428CFA52 */
-a11 = 4.48640949618915160150e-05, /* 0x3F07858E, 0x90A45837 */
-tc = 1.46163214496836224576e+00, /* 0x3FF762D8, 0x6356BE3F */
-tf = -1.21486290535849611461e-01, /* 0xBFBF19B9, 0xBCC38A42 */
-/* tt = -(tail of tf) */
-tt = -3.63867699703950536541e-18, /* 0xBC50C7CA, 0xA48A971F */
-t0 = 4.83836122723810047042e-01, /* 0x3FDEF72B, 0xC8EE38A2 */
-t1 = -1.47587722994593911752e-01, /* 0xBFC2E427, 0x8DC6C509 */
-t2 = 6.46249402391333854778e-02, /* 0x3FB08B42, 0x94D5419B */
-t3 = -3.27885410759859649565e-02, /* 0xBFA0C9A8, 0xDF35B713 */
-t4 = 1.79706750811820387126e-02, /* 0x3F9266E7, 0x970AF9EC */
-t5 = -1.03142241298341437450e-02, /* 0xBF851F9F, 0xBA91EC6A */
-t6 = 6.10053870246291332635e-03, /* 0x3F78FCE0, 0xE370E344 */
-t7 = -3.68452016781138256760e-03, /* 0xBF6E2EFF, 0xB3E914D7 */
-t8 = 2.25964780900612472250e-03, /* 0x3F6282D3, 0x2E15C915 */
-t9 = -1.40346469989232843813e-03, /* 0xBF56FE8E, 0xBF2D1AF1 */
-t10 = 8.81081882437654011382e-04, /* 0x3F4CDF0C, 0xEF61A8E9 */
-t11 = -5.38595305356740546715e-04, /* 0xBF41A610, 0x9C73E0EC */
-t12 = 3.15632070903625950361e-04, /* 0x3F34AF6D, 0x6C0EBBF7 */
-t13 = -3.12754168375120860518e-04, /* 0xBF347F24, 0xECC38C38 */
-t14 = 3.35529192635519073543e-04, /* 0x3F35FD3E, 0xE8C2D3F4 */
-u0 = -7.72156649015328655494e-02, /* 0xBFB3C467, 0xE37DB0C8 */
-u1 = 6.32827064025093366517e-01, /* 0x3FE4401E, 0x8B005DFF */
-u2 = 1.45492250137234768737e+00, /* 0x3FF7475C, 0xD119BD6F */
-u3 = 9.77717527963372745603e-01, /* 0x3FEF4976, 0x44EA8450 */
-u4 = 2.28963728064692451092e-01, /* 0x3FCD4EAE, 0xF6010924 */
-u5 = 1.33810918536787660377e-02, /* 0x3F8B678B, 0xBF2BAB09 */
-v1 = 2.45597793713041134822e+00, /* 0x4003A5D7, 0xC2BD619C */
-v2 = 2.12848976379893395361e+00, /* 0x40010725, 0xA42B18F5 */
-v3 = 7.69285150456672783825e-01, /* 0x3FE89DFB, 0xE45050AF */
-v4 = 1.04222645593369134254e-01, /* 0x3FBAAE55, 0xD6537C88 */
-v5 = 3.21709242282423911810e-03, /* 0x3F6A5ABB, 0x57D0CF61 */
-s0 = -7.72156649015328655494e-02, /* 0xBFB3C467, 0xE37DB0C8 */
-s1 = 2.14982415960608852501e-01, /* 0x3FCB848B, 0x36E20878 */
-s2 = 3.25778796408930981787e-01, /* 0x3FD4D98F, 0x4F139F59 */
-s3 = 1.46350472652464452805e-01, /* 0x3FC2BB9C, 0xBEE5F2F7 */
-s4 = 2.66422703033638609560e-02, /* 0x3F9B481C, 0x7E939961 */
-s5 = 1.84028451407337715652e-03, /* 0x3F5E26B6, 0x7368F239 */
-s6 = 3.19475326584100867617e-05, /* 0x3F00BFEC, 0xDD17E945 */
-r1 = 1.39200533467621045958e+00, /* 0x3FF645A7, 0x62C4AB74 */
-r2 = 7.21935547567138069525e-01, /* 0x3FE71A18, 0x93D3DCDC */
-r3 = 1.71933865632803078993e-01, /* 0x3FC601ED, 0xCCFBDF27 */
-r4 = 1.86459191715652901344e-02, /* 0x3F9317EA, 0x742ED475 */
-r5 = 7.77942496381893596434e-04, /* 0x3F497DDA, 0xCA41A95B */
-r6 = 7.32668430744625636189e-06, /* 0x3EDEBAF7, 0xA5B38140 */
-w0 = 4.18938533204672725052e-01, /* 0x3FDACFE3, 0x90C97D69 */
-w1 = 8.33333333333329678849e-02, /* 0x3FB55555, 0x5555553B */
-w2 = -2.77777777728775536470e-03, /* 0xBF66C16C, 0x16B02E5C */
-w3 = 7.93650558643019558500e-04, /* 0x3F4A019F, 0x98CF38B6 */
-w4 = -5.95187557450339963135e-04, /* 0xBF4380CB, 0x8C0FE741 */
-w5 = 8.36339918996282139126e-04, /* 0x3F4B67BA, 0x4CDAD5D1 */
-w6 = -1.63092934096575273989e-03; /* 0xBF5AB89D, 0x0B9E43E4 */
-
-#ifdef __STDC__
-static const double zero= 0.00000000000000000000e+00;
-#else
-static double zero= 0.00000000000000000000e+00;
-#endif
-
-#ifdef __STDC__
- static double sin_pi(double x)
-#else
- static double sin_pi(x)
- double x;
-#endif
-{
- double y,z;
- int n,ix;
-
- GET_HIGH_WORD(ix,x);
- ix &= 0x7fffffff;
-
- if(ix<0x3fd00000) return __kernel_sin(pi*x,zero,0);
- y = -x; /* x is assume negative */
-
- /*
- * argument reduction, make sure inexact flag not raised if input
- * is an integer
- */
- z = floor(y);
- if(z!=y) { /* inexact anyway */
- y *= 0.5;
- y = 2.0*(y - floor(y)); /* y = |x| mod 2.0 */
- n = (int) (y*4.0);
- } else {
- if(ix>=0x43400000) {
- y = zero; n = 0; /* y must be even */
- } else {
- if(ix<0x43300000) z = y+two52; /* exact */
- GET_LOW_WORD(n,z);
- n &= 1;
- y = n;
- n<<= 2;
- }
- }
- switch (n) {
- case 0: y = __kernel_sin(pi*y,zero,0); break;
- case 1:
- case 2: y = __kernel_cos(pi*(0.5-y),zero); break;
- case 3:
- case 4: y = __kernel_sin(pi*(one-y),zero,0); break;
- case 5:
- case 6: y = -__kernel_cos(pi*(y-1.5),zero); break;
- default: y = __kernel_sin(pi*(y-2.0),zero,0); break;
- }
- return -y;
-}
-
-
-#ifdef __STDC__
- double __ieee754_lgamma_r(double x, int *signgamp)
-#else
- double __ieee754_lgamma_r(x,signgamp)
- double x; int *signgamp;
-#endif
-{
- double t,y,z,nadj,p,p1,p2,p3,q,r,w;
- int i,hx,lx,ix;
-
- EXTRACT_WORDS(hx,lx,x);
-
- /* purge off +-inf, NaN, +-0, and negative arguments */
- *signgamp = 1;
- ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) return x*x;
- if((ix|lx)==0) return one/zero;
- if(ix<0x3b900000) { /* |x|<2**-70, return -log(|x|) */
- if(hx<0) {
- *signgamp = -1;
- return -__ieee754_log(-x);
- } else return -__ieee754_log(x);
- }
- if(hx<0) {
- if(ix>=0x43300000) /* |x|>=2**52, must be -integer */
- return one/zero;
- t = sin_pi(x);
- if(t==zero) return one/zero; /* -integer */
- nadj = __ieee754_log(pi/fabs(t*x));
- if(t<zero) *signgamp = -1;
- x = -x;
- }
-
- /* purge off 1 and 2 */
- if((((ix-0x3ff00000)|lx)==0)||(((ix-0x40000000)|lx)==0)) r = 0;
- /* for x < 2.0 */
- else if(ix<0x40000000) {
- if(ix<=0x3feccccc) { /* lgamma(x) = lgamma(x+1)-log(x) */
- r = -__ieee754_log(x);
- if(ix>=0x3FE76944) {y = one-x; i= 0;}
- else if(ix>=0x3FCDA661) {y= x-(tc-one); i=1;}
- else {y = x; i=2;}
- } else {
- r = zero;
- if(ix>=0x3FFBB4C3) {y=2.0-x;i=0;} /* [1.7316,2] */
- else if(ix>=0x3FF3B4C4) {y=x-tc;i=1;} /* [1.23,1.73] */
- else {y=x-one;i=2;}
- }
- switch(i) {
- case 0:
- z = y*y;
- p1 = a0+z*(a2+z*(a4+z*(a6+z*(a8+z*a10))));
- p2 = z*(a1+z*(a3+z*(a5+z*(a7+z*(a9+z*a11)))));
- p = y*p1+p2;
- r += (p-0.5*y); break;
- case 1:
- z = y*y;
- w = z*y;
- p1 = t0+w*(t3+w*(t6+w*(t9 +w*t12))); /* parallel comp */
- p2 = t1+w*(t4+w*(t7+w*(t10+w*t13)));
- p3 = t2+w*(t5+w*(t8+w*(t11+w*t14)));
- p = z*p1-(tt-w*(p2+y*p3));
- r += (tf + p); break;
- case 2:
- p1 = y*(u0+y*(u1+y*(u2+y*(u3+y*(u4+y*u5)))));
- p2 = one+y*(v1+y*(v2+y*(v3+y*(v4+y*v5))));
- r += (-0.5*y + p1/p2);
- }
- }
- else if(ix<0x40200000) { /* x < 8.0 */
- i = (int)x;
- t = zero;
- y = x-(double)i;
- p = y*(s0+y*(s1+y*(s2+y*(s3+y*(s4+y*(s5+y*s6))))));
- q = one+y*(r1+y*(r2+y*(r3+y*(r4+y*(r5+y*r6)))));
- r = half*y+p/q;
- z = one; /* lgamma(1+s) = log(s) + lgamma(s) */
- switch(i) {
- case 7: z *= (y+6.0); /* FALLTHRU */
- case 6: z *= (y+5.0); /* FALLTHRU */
- case 5: z *= (y+4.0); /* FALLTHRU */
- case 4: z *= (y+3.0); /* FALLTHRU */
- case 3: z *= (y+2.0); /* FALLTHRU */
- r += __ieee754_log(z); break;
- }
- /* 8.0 <= x < 2**58 */
- } else if (ix < 0x43900000) {
- t = __ieee754_log(x);
- z = one/x;
- y = z*z;
- w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6)))));
- r = (x-half)*(t-one)+w;
- } else
- /* 2**58 <= x <= inf */
- r = x*(__ieee754_log(x)-one);
- if(hx<0) r = nadj - r;
- return r;
-}
diff --git a/lib/msun/src/e_lgammaf.c b/lib/msun/src/e_lgammaf.c
deleted file mode 100644
index c44054e..0000000
--- a/lib/msun/src/e_lgammaf.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* e_lgammaf.c -- float version of e_lgamma.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_lgammaf(x)
- * Return the logarithm of the Gamma function of x.
- *
- * Method: call __ieee754_lgammaf_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-extern int signgam;
-
-#ifdef __STDC__
- float __ieee754_lgammaf(float x)
-#else
- float __ieee754_lgammaf(x)
- float x;
-#endif
-{
- return __ieee754_lgammaf_r(x,&signgam);
-}
diff --git a/lib/msun/src/e_lgammaf_r.c b/lib/msun/src/e_lgammaf_r.c
deleted file mode 100644
index 9fbe798..0000000
--- a/lib/msun/src/e_lgammaf_r.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/* e_lgammaf_r.c -- float version of e_lgamma_r.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-two23= 8.3886080000e+06, /* 0x4b000000 */
-half= 5.0000000000e-01, /* 0x3f000000 */
-one = 1.0000000000e+00, /* 0x3f800000 */
-pi = 3.1415927410e+00, /* 0x40490fdb */
-a0 = 7.7215664089e-02, /* 0x3d9e233f */
-a1 = 3.2246702909e-01, /* 0x3ea51a66 */
-a2 = 6.7352302372e-02, /* 0x3d89f001 */
-a3 = 2.0580807701e-02, /* 0x3ca89915 */
-a4 = 7.3855509982e-03, /* 0x3bf2027e */
-a5 = 2.8905137442e-03, /* 0x3b3d6ec6 */
-a6 = 1.1927076848e-03, /* 0x3a9c54a1 */
-a7 = 5.1006977446e-04, /* 0x3a05b634 */
-a8 = 2.2086278477e-04, /* 0x39679767 */
-a9 = 1.0801156895e-04, /* 0x38e28445 */
-a10 = 2.5214456400e-05, /* 0x37d383a2 */
-a11 = 4.4864096708e-05, /* 0x383c2c75 */
-tc = 1.4616321325e+00, /* 0x3fbb16c3 */
-tf = -1.2148628384e-01, /* 0xbdf8cdcd */
-/* tt = -(tail of tf) */
-tt = 6.6971006518e-09, /* 0x31e61c52 */
-t0 = 4.8383611441e-01, /* 0x3ef7b95e */
-t1 = -1.4758771658e-01, /* 0xbe17213c */
-t2 = 6.4624942839e-02, /* 0x3d845a15 */
-t3 = -3.2788541168e-02, /* 0xbd064d47 */
-t4 = 1.7970675603e-02, /* 0x3c93373d */
-t5 = -1.0314224288e-02, /* 0xbc28fcfe */
-t6 = 6.1005386524e-03, /* 0x3bc7e707 */
-t7 = -3.6845202558e-03, /* 0xbb7177fe */
-t8 = 2.2596477065e-03, /* 0x3b141699 */
-t9 = -1.4034647029e-03, /* 0xbab7f476 */
-t10 = 8.8108185446e-04, /* 0x3a66f867 */
-t11 = -5.3859531181e-04, /* 0xba0d3085 */
-t12 = 3.1563205994e-04, /* 0x39a57b6b */
-t13 = -3.1275415677e-04, /* 0xb9a3f927 */
-t14 = 3.3552918467e-04, /* 0x39afe9f7 */
-u0 = -7.7215664089e-02, /* 0xbd9e233f */
-u1 = 6.3282704353e-01, /* 0x3f2200f4 */
-u2 = 1.4549225569e+00, /* 0x3fba3ae7 */
-u3 = 9.7771751881e-01, /* 0x3f7a4bb2 */
-u4 = 2.2896373272e-01, /* 0x3e6a7578 */
-u5 = 1.3381091878e-02, /* 0x3c5b3c5e */
-v1 = 2.4559779167e+00, /* 0x401d2ebe */
-v2 = 2.1284897327e+00, /* 0x4008392d */
-v3 = 7.6928514242e-01, /* 0x3f44efdf */
-v4 = 1.0422264785e-01, /* 0x3dd572af */
-v5 = 3.2170924824e-03, /* 0x3b52d5db */
-s0 = -7.7215664089e-02, /* 0xbd9e233f */
-s1 = 2.1498242021e-01, /* 0x3e5c245a */
-s2 = 3.2577878237e-01, /* 0x3ea6cc7a */
-s3 = 1.4635047317e-01, /* 0x3e15dce6 */
-s4 = 2.6642270386e-02, /* 0x3cda40e4 */
-s5 = 1.8402845599e-03, /* 0x3af135b4 */
-s6 = 3.1947532989e-05, /* 0x3805ff67 */
-r1 = 1.3920053244e+00, /* 0x3fb22d3b */
-r2 = 7.2193557024e-01, /* 0x3f38d0c5 */
-r3 = 1.7193385959e-01, /* 0x3e300f6e */
-r4 = 1.8645919859e-02, /* 0x3c98bf54 */
-r5 = 7.7794247773e-04, /* 0x3a4beed6 */
-r6 = 7.3266842264e-06, /* 0x36f5d7bd */
-w0 = 4.1893854737e-01, /* 0x3ed67f1d */
-w1 = 8.3333335817e-02, /* 0x3daaaaab */
-w2 = -2.7777778450e-03, /* 0xbb360b61 */
-w3 = 7.9365057172e-04, /* 0x3a500cfd */
-w4 = -5.9518753551e-04, /* 0xba1c065c */
-w5 = 8.3633989561e-04, /* 0x3a5b3dd2 */
-w6 = -1.6309292987e-03; /* 0xbad5c4e8 */
-
-#ifdef __STDC__
-static const float zero= 0.0000000000e+00;
-#else
-static float zero= 0.0000000000e+00;
-#endif
-
-#ifdef __STDC__
- static float sin_pif(float x)
-#else
- static float sin_pif(x)
- float x;
-#endif
-{
- float y,z;
- int n,ix;
-
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff;
-
- if(ix<0x3e800000) return __kernel_sinf(pi*x,zero,0);
- y = -x; /* x is assume negative */
-
- /*
- * argument reduction, make sure inexact flag not raised if input
- * is an integer
- */
- z = floorf(y);
- if(z!=y) { /* inexact anyway */
- y *= (float)0.5;
- y = (float)2.0*(y - floorf(y)); /* y = |x| mod 2.0 */
- n = (int) (y*(float)4.0);
- } else {
- if(ix>=0x4b800000) {
- y = zero; n = 0; /* y must be even */
- } else {
- if(ix<0x4b000000) z = y+two23; /* exact */
- GET_FLOAT_WORD(n,z);
- n &= 1;
- y = n;
- n<<= 2;
- }
- }
- switch (n) {
- case 0: y = __kernel_sinf(pi*y,zero,0); break;
- case 1:
- case 2: y = __kernel_cosf(pi*((float)0.5-y),zero); break;
- case 3:
- case 4: y = __kernel_sinf(pi*(one-y),zero,0); break;
- case 5:
- case 6: y = -__kernel_cosf(pi*(y-(float)1.5),zero); break;
- default: y = __kernel_sinf(pi*(y-(float)2.0),zero,0); break;
- }
- return -y;
-}
-
-
-#ifdef __STDC__
- float __ieee754_lgammaf_r(float x, int *signgamp)
-#else
- float __ieee754_lgammaf_r(x,signgamp)
- float x; int *signgamp;
-#endif
-{
- float t,y,z,nadj,p,p1,p2,p3,q,r,w;
- int i,hx,ix;
-
- GET_FLOAT_WORD(hx,x);
-
- /* purge off +-inf, NaN, +-0, and negative arguments */
- *signgamp = 1;
- ix = hx&0x7fffffff;
- if(ix>=0x7f800000) return x*x;
- if(ix==0) return one/zero;
- if(ix<0x1c800000) { /* |x|<2**-70, return -log(|x|) */
- if(hx<0) {
- *signgamp = -1;
- return -__ieee754_logf(-x);
- } else return -__ieee754_logf(x);
- }
- if(hx<0) {
- if(ix>=0x4b000000) /* |x|>=2**23, must be -integer */
- return one/zero;
- t = sin_pif(x);
- if(t==zero) return one/zero; /* -integer */
- nadj = __ieee754_logf(pi/fabsf(t*x));
- if(t<zero) *signgamp = -1;
- x = -x;
- }
-
- /* purge off 1 and 2 */
- if (ix==0x3f800000||ix==0x40000000) r = 0;
- /* for x < 2.0 */
- else if(ix<0x40000000) {
- if(ix<=0x3f666666) { /* lgamma(x) = lgamma(x+1)-log(x) */
- r = -__ieee754_logf(x);
- if(ix>=0x3f3b4a20) {y = one-x; i= 0;}
- else if(ix>=0x3e6d3308) {y= x-(tc-one); i=1;}
- else {y = x; i=2;}
- } else {
- r = zero;
- if(ix>=0x3fdda618) {y=(float)2.0-x;i=0;} /* [1.7316,2] */
- else if(ix>=0x3F9da620) {y=x-tc;i=1;} /* [1.23,1.73] */
- else {y=x-one;i=2;}
- }
- switch(i) {
- case 0:
- z = y*y;
- p1 = a0+z*(a2+z*(a4+z*(a6+z*(a8+z*a10))));
- p2 = z*(a1+z*(a3+z*(a5+z*(a7+z*(a9+z*a11)))));
- p = y*p1+p2;
- r += (p-(float)0.5*y); break;
- case 1:
- z = y*y;
- w = z*y;
- p1 = t0+w*(t3+w*(t6+w*(t9 +w*t12))); /* parallel comp */
- p2 = t1+w*(t4+w*(t7+w*(t10+w*t13)));
- p3 = t2+w*(t5+w*(t8+w*(t11+w*t14)));
- p = z*p1-(tt-w*(p2+y*p3));
- r += (tf + p); break;
- case 2:
- p1 = y*(u0+y*(u1+y*(u2+y*(u3+y*(u4+y*u5)))));
- p2 = one+y*(v1+y*(v2+y*(v3+y*(v4+y*v5))));
- r += (-(float)0.5*y + p1/p2);
- }
- }
- else if(ix<0x41000000) { /* x < 8.0 */
- i = (int)x;
- t = zero;
- y = x-(float)i;
- p = y*(s0+y*(s1+y*(s2+y*(s3+y*(s4+y*(s5+y*s6))))));
- q = one+y*(r1+y*(r2+y*(r3+y*(r4+y*(r5+y*r6)))));
- r = half*y+p/q;
- z = one; /* lgamma(1+s) = log(s) + lgamma(s) */
- switch(i) {
- case 7: z *= (y+(float)6.0); /* FALLTHRU */
- case 6: z *= (y+(float)5.0); /* FALLTHRU */
- case 5: z *= (y+(float)4.0); /* FALLTHRU */
- case 4: z *= (y+(float)3.0); /* FALLTHRU */
- case 3: z *= (y+(float)2.0); /* FALLTHRU */
- r += __ieee754_logf(z); break;
- }
- /* 8.0 <= x < 2**58 */
- } else if (ix < 0x5c800000) {
- t = __ieee754_logf(x);
- z = one/x;
- y = z*z;
- w = w0+z*(w1+y*(w2+y*(w3+y*(w4+y*(w5+y*w6)))));
- r = (x-half)*(t-one)+w;
- } else
- /* 2**58 <= x <= inf */
- r = x*(__ieee754_logf(x)-one);
- if(hx<0) r = nadj - r;
- return r;
-}
diff --git a/lib/msun/src/e_log.c b/lib/msun/src/e_log.c
deleted file mode 100644
index 93294a2..0000000
--- a/lib/msun/src/e_log.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* @(#)e_log.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_log(x)
- * Return the logrithm of x
- *
- * Method :
- * 1. Argument Reduction: find k and f such that
- * x = 2^k * (1+f),
- * where sqrt(2)/2 < 1+f < sqrt(2) .
- *
- * 2. Approximation of log(1+f).
- * Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
- * = 2s + 2/3 s**3 + 2/5 s**5 + .....,
- * = 2s + s*R
- * We use a special Reme algorithm on [0,0.1716] to generate
- * a polynomial of degree 14 to approximate R The maximum error
- * of this polynomial approximation is bounded by 2**-58.45. In
- * other words,
- * 2 4 6 8 10 12 14
- * R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s +Lg5*s +Lg6*s +Lg7*s
- * (the values of Lg1 to Lg7 are listed in the program)
- * and
- * | 2 14 | -58.45
- * | Lg1*s +...+Lg7*s - R(z) | <= 2
- * | |
- * Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.
- * In order to guarantee error in log below 1ulp, we compute log
- * by
- * log(1+f) = f - s*(f - R) (if f is not too large)
- * log(1+f) = f - (hfsq - s*(hfsq+R)). (better accuracy)
- *
- * 3. Finally, log(x) = k*ln2 + log(1+f).
- * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))
- * Here ln2 is split into two floating point number:
- * ln2_hi + ln2_lo,
- * where n*ln2_hi is always exact for |n| < 2000.
- *
- * Special cases:
- * log(x) is NaN with signal if x < 0 (including -INF) ;
- * log(+INF) is +INF; log(0) is -INF with signal;
- * log(NaN) is that NaN with no signal.
- *
- * Accuracy:
- * according to an error analysis, the error is always less than
- * 1 ulp (unit in the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
- * to produce the hexadecimal values shown.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
-ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */
-two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */
-Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
-Lg2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
-Lg3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */
-Lg4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */
-Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
-Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
-Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
-
-#ifdef __STDC__
-static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-
-#ifdef __STDC__
- double __generic___ieee754_log(double x)
-#else
- double __generic___ieee754_log(x)
- double x;
-#endif
-{
- double hfsq,f,s,z,R,w,t1,t2,dk;
- int32_t k,hx,i,j;
- u_int32_t lx;
-
- EXTRACT_WORDS(hx,lx,x);
-
- k=0;
- if (hx < 0x00100000) { /* x < 2**-1022 */
- if (((hx&0x7fffffff)|lx)==0)
- return -two54/zero; /* log(+-0)=-inf */
- if (hx<0) return (x-x)/zero; /* log(-#) = NaN */
- k -= 54; x *= two54; /* subnormal number, scale up x */
- GET_HIGH_WORD(hx,x);
- }
- if (hx >= 0x7ff00000) return x+x;
- k += (hx>>20)-1023;
- hx &= 0x000fffff;
- i = (hx+0x95f64)&0x100000;
- SET_HIGH_WORD(x,hx|(i^0x3ff00000)); /* normalize x or x/2 */
- k += (i>>20);
- f = x-1.0;
- if((0x000fffff&(2+hx))<3) { /* |f| < 2**-20 */
- if(f==zero) if(k==0) return zero; else {dk=(double)k;
- return dk*ln2_hi+dk*ln2_lo;}
- R = f*f*(0.5-0.33333333333333333*f);
- if(k==0) return f-R; else {dk=(double)k;
- return dk*ln2_hi-((R-dk*ln2_lo)-f);}
- }
- s = f/(2.0+f);
- dk = (double)k;
- z = s*s;
- i = hx-0x6147a;
- w = z*z;
- j = 0x6b851-hx;
- t1= w*(Lg2+w*(Lg4+w*Lg6));
- t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
- i |= j;
- R = t2+t1;
- if(i>0) {
- hfsq=0.5*f*f;
- if(k==0) return f-(hfsq-s*(hfsq+R)); else
- return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f);
- } else {
- if(k==0) return f-s*(f-R); else
- return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f);
- }
-}
diff --git a/lib/msun/src/e_log10.c b/lib/msun/src/e_log10.c
deleted file mode 100644
index afc3376..0000000
--- a/lib/msun/src/e_log10.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* @(#)e_log10.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_log10(x)
- * Return the base 10 logarithm of x
- *
- * Method :
- * Let log10_2hi = leading 40 bits of log10(2) and
- * log10_2lo = log10(2) - log10_2hi,
- * ivln10 = 1/log(10) rounded.
- * Then
- * n = ilogb(x),
- * if(n<0) n = n+1;
- * x = scalbn(x,-n);
- * log10(x) := n*log10_2hi + (n*log10_2lo + ivln10*log(x))
- *
- * Note 1:
- * To guarantee log10(10**n)=n, where 10**n is normal, the rounding
- * mode must set to Round-to-Nearest.
- * Note 2:
- * [1/log(10)] rounded to 53 bits has error .198 ulps;
- * log10 is monotonic at all binary break points.
- *
- * Special cases:
- * log10(x) is NaN with signal if x < 0;
- * log10(+INF) is +INF with no signal; log10(0) is -INF with signal;
- * log10(NaN) is that NaN with no signal;
- * log10(10**N) = N for N=0,1,...,22.
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following constants.
- * The decimal values may be used, provided that the compiler will convert
- * from decimal to binary accurately enough to produce the hexadecimal values
- * shown.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
-ivln10 = 4.34294481903251816668e-01, /* 0x3FDBCB7B, 0x1526E50E */
-log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
-log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */
-
-#ifdef __STDC__
-static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-
-#ifdef __STDC__
- double __generic___ieee754_log10(double x)
-#else
- double __generic___ieee754_log10(x)
- double x;
-#endif
-{
- double y,z;
- int32_t i,k,hx;
- u_int32_t lx;
-
- EXTRACT_WORDS(hx,lx,x);
-
- k=0;
- if (hx < 0x00100000) { /* x < 2**-1022 */
- if (((hx&0x7fffffff)|lx)==0)
- return -two54/zero; /* log(+-0)=-inf */
- if (hx<0) return (x-x)/zero; /* log(-#) = NaN */
- k -= 54; x *= two54; /* subnormal number, scale up x */
- GET_HIGH_WORD(hx,x);
- }
- if (hx >= 0x7ff00000) return x+x;
- k += (hx>>20)-1023;
- i = ((u_int32_t)k&0x80000000)>>31;
- hx = (hx&0x000fffff)|((0x3ff-i)<<20);
- y = (double)(k+i);
- SET_HIGH_WORD(x,hx);
- z = y*log10_2lo + ivln10*__ieee754_log(x);
- return z+y*log10_2hi;
-}
diff --git a/lib/msun/src/e_log10f.c b/lib/msun/src/e_log10f.c
deleted file mode 100644
index ed5f3e7..0000000
--- a/lib/msun/src/e_log10f.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* e_log10f.c -- float version of e_log10.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-two25 = 3.3554432000e+07, /* 0x4c000000 */
-ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */
-log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */
-log10_2lo = 7.9034151668e-07; /* 0x355427db */
-
-#ifdef __STDC__
-static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-
-#ifdef __STDC__
- float __ieee754_log10f(float x)
-#else
- float __ieee754_log10f(x)
- float x;
-#endif
-{
- float y,z;
- int32_t i,k,hx;
-
- GET_FLOAT_WORD(hx,x);
-
- k=0;
- if (hx < 0x00800000) { /* x < 2**-126 */
- if ((hx&0x7fffffff)==0)
- return -two25/zero; /* log(+-0)=-inf */
- if (hx<0) return (x-x)/zero; /* log(-#) = NaN */
- k -= 25; x *= two25; /* subnormal number, scale up x */
- GET_FLOAT_WORD(hx,x);
- }
- if (hx >= 0x7f800000) return x+x;
- k += (hx>>23)-127;
- i = ((u_int32_t)k&0x80000000)>>31;
- hx = (hx&0x007fffff)|((0x7f-i)<<23);
- y = (float)(k+i);
- SET_FLOAT_WORD(x,hx);
- z = y*log10_2lo + ivln10*__ieee754_logf(x);
- return z+y*log10_2hi;
-}
diff --git a/lib/msun/src/e_logf.c b/lib/msun/src/e_logf.c
deleted file mode 100644
index 48a0d86..0000000
--- a/lib/msun/src/e_logf.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* e_logf.c -- float version of e_log.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-ln2_hi = 6.9313812256e-01, /* 0x3f317180 */
-ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */
-two25 = 3.355443200e+07, /* 0x4c000000 */
-Lg1 = 6.6666668653e-01, /* 3F2AAAAB */
-Lg2 = 4.0000000596e-01, /* 3ECCCCCD */
-Lg3 = 2.8571429849e-01, /* 3E924925 */
-Lg4 = 2.2222198546e-01, /* 3E638E29 */
-Lg5 = 1.8183572590e-01, /* 3E3A3325 */
-Lg6 = 1.5313838422e-01, /* 3E1CD04F */
-Lg7 = 1.4798198640e-01; /* 3E178897 */
-
-#ifdef __STDC__
-static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-
-#ifdef __STDC__
- float __ieee754_logf(float x)
-#else
- float __ieee754_logf(x)
- float x;
-#endif
-{
- float hfsq,f,s,z,R,w,t1,t2,dk;
- int32_t k,ix,i,j;
-
- GET_FLOAT_WORD(ix,x);
-
- k=0;
- if (ix < 0x00800000) { /* x < 2**-126 */
- if ((ix&0x7fffffff)==0)
- return -two25/zero; /* log(+-0)=-inf */
- if (ix<0) return (x-x)/zero; /* log(-#) = NaN */
- k -= 25; x *= two25; /* subnormal number, scale up x */
- GET_FLOAT_WORD(ix,x);
- }
- if (ix >= 0x7f800000) return x+x;
- k += (ix>>23)-127;
- ix &= 0x007fffff;
- i = (ix+(0x95f64<<3))&0x800000;
- SET_FLOAT_WORD(x,ix|(i^0x3f800000)); /* normalize x or x/2 */
- k += (i>>23);
- f = x-(float)1.0;
- if((0x007fffff&(15+ix))<16) { /* |f| < 2**-20 */
- if(f==zero) if(k==0) return zero; else {dk=(float)k;
- return dk*ln2_hi+dk*ln2_lo;}
- R = f*f*((float)0.5-(float)0.33333333333333333*f);
- if(k==0) return f-R; else {dk=(float)k;
- return dk*ln2_hi-((R-dk*ln2_lo)-f);}
- }
- s = f/((float)2.0+f);
- dk = (float)k;
- z = s*s;
- i = ix-(0x6147a<<3);
- w = z*z;
- j = (0x6b851<<3)-ix;
- t1= w*(Lg2+w*(Lg4+w*Lg6));
- t2= z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
- i |= j;
- R = t2+t1;
- if(i>0) {
- hfsq=(float)0.5*f*f;
- if(k==0) return f-(hfsq-s*(hfsq+R)); else
- return dk*ln2_hi-((hfsq-(s*(hfsq+R)+dk*ln2_lo))-f);
- } else {
- if(k==0) return f-s*(f-R); else
- return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f);
- }
-}
diff --git a/lib/msun/src/e_pow.c b/lib/msun/src/e_pow.c
deleted file mode 100644
index 1aa2f02..0000000
--- a/lib/msun/src/e_pow.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/* @(#)e_pow.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_pow.c,v 1.4 1997/02/22 15:10:29 peter Exp $";
-#endif
-
-/* __ieee754_pow(x,y) return x**y
- *
- * n
- * Method: Let x = 2 * (1+f)
- * 1. Compute and return log2(x) in two pieces:
- * log2(x) = w1 + w2,
- * where w1 has 53-24 = 29 bit trailing zeros.
- * 2. Perform y*log2(x) = n+y' by simulating muti-precision
- * arithmetic, where |y'|<=0.5.
- * 3. Return x**y = 2**n*exp(y'*log2)
- *
- * Special cases:
- * 1. (anything) ** 0 is 1
- * 2. (anything) ** 1 is itself
- * 3. (anything) ** NAN is NAN
- * 4. NAN ** (anything except 0) is NAN
- * 5. +-(|x| > 1) ** +INF is +INF
- * 6. +-(|x| > 1) ** -INF is +0
- * 7. +-(|x| < 1) ** +INF is +0
- * 8. +-(|x| < 1) ** -INF is +INF
- * 9. +-1 ** +-INF is NAN
- * 10. +0 ** (+anything except 0, NAN) is +0
- * 11. -0 ** (+anything except 0, NAN, odd integer) is +0
- * 12. +0 ** (-anything except 0, NAN) is +INF
- * 13. -0 ** (-anything except 0, NAN, odd integer) is +INF
- * 14. -0 ** (odd integer) = -( +0 ** (odd integer) )
- * 15. +INF ** (+anything except 0,NAN) is +INF
- * 16. +INF ** (-anything except 0,NAN) is +0
- * 17. -INF ** (anything) = -0 ** (-anything)
- * 18. (-anything) ** (integer) is (-1)**(integer)*(+anything**integer)
- * 19. (-anything except 0 and inf) ** (non-integer) is NAN
- *
- * Accuracy:
- * pow(x,y) returns x**y nearly rounded. In particular
- * pow(integer,integer)
- * always returns the correct integer provided it is
- * representable.
- *
- * Constants :
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
- * to produce the hexadecimal values shown.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-bp[] = {1.0, 1.5,},
-dp_h[] = { 0.0, 5.84962487220764160156e-01,}, /* 0x3FE2B803, 0x40000000 */
-dp_l[] = { 0.0, 1.35003920212974897128e-08,}, /* 0x3E4CFDEB, 0x43CFD006 */
-zero = 0.0,
-one = 1.0,
-two = 2.0,
-two53 = 9007199254740992.0, /* 0x43400000, 0x00000000 */
-huge = 1.0e300,
-tiny = 1.0e-300,
- /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */
-L1 = 5.99999999999994648725e-01, /* 0x3FE33333, 0x33333303 */
-L2 = 4.28571428578550184252e-01, /* 0x3FDB6DB6, 0xDB6FABFF */
-L3 = 3.33333329818377432918e-01, /* 0x3FD55555, 0x518F264D */
-L4 = 2.72728123808534006489e-01, /* 0x3FD17460, 0xA91D4101 */
-L5 = 2.30660745775561754067e-01, /* 0x3FCD864A, 0x93C9DB65 */
-L6 = 2.06975017800338417784e-01, /* 0x3FCA7E28, 0x4A454EEF */
-P1 = 1.66666666666666019037e-01, /* 0x3FC55555, 0x5555553E */
-P2 = -2.77777777770155933842e-03, /* 0xBF66C16C, 0x16BEBD93 */
-P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */
-P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
-P5 = 4.13813679705723846039e-08, /* 0x3E663769, 0x72BEA4D0 */
-lg2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
-lg2_h = 6.93147182464599609375e-01, /* 0x3FE62E43, 0x00000000 */
-lg2_l = -1.90465429995776804525e-09, /* 0xBE205C61, 0x0CA86C39 */
-ovt = 8.0085662595372944372e-0017, /* -(1024-log2(ovfl+.5ulp)) */
-cp = 9.61796693925975554329e-01, /* 0x3FEEC709, 0xDC3A03FD =2/(3ln2) */
-cp_h = 9.61796700954437255859e-01, /* 0x3FEEC709, 0xE0000000 =(float)cp */
-cp_l = -7.02846165095275826516e-09, /* 0xBE3E2FE0, 0x145B01F5 =tail of cp_h*/
-ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */
-ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
-ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
-
-#ifdef __STDC__
- double __ieee754_pow(double x, double y)
-#else
- double __ieee754_pow(x,y)
- double x, y;
-#endif
-{
- double z,ax,z_h,z_l,p_h,p_l;
- double y1,t1,t2,r,s,t,u,v,w;
- int32_t i,j,k,yisint,n;
- int32_t hx,hy,ix,iy;
- u_int32_t lx,ly;
-
- EXTRACT_WORDS(hx,lx,x);
- EXTRACT_WORDS(hy,ly,y);
- ix = hx&0x7fffffff; iy = hy&0x7fffffff;
-
- /* y==zero: x**0 = 1 */
- if((iy|ly)==0) return one;
-
- /* +-NaN return x+y */
- if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) ||
- iy > 0x7ff00000 || ((iy==0x7ff00000)&&(ly!=0)))
- return x+y;
-
- /* determine if y is an odd int when x < 0
- * yisint = 0 ... y is not an integer
- * yisint = 1 ... y is an odd int
- * yisint = 2 ... y is an even int
- */
- yisint = 0;
- if(hx<0) {
- if(iy>=0x43400000) yisint = 2; /* even integer y */
- else if(iy>=0x3ff00000) {
- k = (iy>>20)-0x3ff; /* exponent */
- if(k>20) {
- j = ly>>(52-k);
- if((j<<(52-k))==ly) yisint = 2-(j&1);
- } else if(ly==0) {
- j = iy>>(20-k);
- if((j<<(20-k))==iy) yisint = 2-(j&1);
- }
- }
- }
-
- /* special value of y */
- if(ly==0) {
- if (iy==0x7ff00000) { /* y is +-inf */
- if(((ix-0x3ff00000)|lx)==0)
- return y - y; /* inf**+-1 is NaN */
- else if (ix >= 0x3ff00000)/* (|x|>1)**+-inf = inf,0 */
- return (hy>=0)? y: zero;
- else /* (|x|<1)**-,+inf = inf,0 */
- return (hy<0)?-y: zero;
- }
- if(iy==0x3ff00000) { /* y is +-1 */
- if(hy<0) return one/x; else return x;
- }
- if(hy==0x40000000) return x*x; /* y is 2 */
- if(hy==0x3fe00000) { /* y is 0.5 */
- if(hx>=0) /* x >= +0 */
- return __ieee754_sqrt(x);
- }
- }
-
- ax = fabs(x);
- /* special value of x */
- if(lx==0) {
- if(ix==0x7ff00000||ix==0||ix==0x3ff00000){
- z = ax; /*x is +-0,+-inf,+-1*/
- if(hy<0) z = one/z; /* z = (1/|x|) */
- if(hx<0) {
- if(((ix-0x3ff00000)|yisint)==0) {
- z = (z-z)/(z-z); /* (-1)**non-int is NaN */
- } else if(yisint==1)
- z = -z; /* (x<0)**odd = -(|x|**odd) */
- }
- return z;
- }
- }
-
- /* (x<0)**(non-int) is NaN */
- /* CYGNUS LOCAL: This used to be
- if((((hx>>31)+1)|yisint)==0) return (x-x)/(x-x);
- but ANSI C says a right shift of a signed negative quantity is
- implementation defined. */
- if(((((u_int32_t)hx>>31)-1)|yisint)==0) return (x-x)/(x-x);
-
- /* |y| is huge */
- if(iy>0x41e00000) { /* if |y| > 2**31 */
- if(iy>0x43f00000){ /* if |y| > 2**64, must o/uflow */
- if(ix<=0x3fefffff) return (hy<0)? huge*huge:tiny*tiny;
- if(ix>=0x3ff00000) return (hy>0)? huge*huge:tiny*tiny;
- }
- /* over/underflow if x is not close to one */
- if(ix<0x3fefffff) return (hy<0)? huge*huge:tiny*tiny;
- if(ix>0x3ff00000) return (hy>0)? huge*huge:tiny*tiny;
- /* now |1-x| is tiny <= 2**-20, suffice to compute
- log(x) by x-x^2/2+x^3/3-x^4/4 */
- t = x-1; /* t has 20 trailing zeros */
- w = (t*t)*(0.5-t*(0.3333333333333333333333-t*0.25));
- u = ivln2_h*t; /* ivln2_h has 21 sig. bits */
- v = t*ivln2_l-w*ivln2;
- t1 = u+v;
- SET_LOW_WORD(t1,0);
- t2 = v-(t1-u);
- } else {
- double s2,s_h,s_l,t_h,t_l;
- n = 0;
- /* take care subnormal number */
- if(ix<0x00100000)
- {ax *= two53; n -= 53; GET_HIGH_WORD(ix,ax); }
- n += ((ix)>>20)-0x3ff;
- j = ix&0x000fffff;
- /* determine interval */
- ix = j|0x3ff00000; /* normalize ix */
- if(j<=0x3988E) k=0; /* |x|<sqrt(3/2) */
- else if(j<0xBB67A) k=1; /* |x|<sqrt(3) */
- else {k=0;n+=1;ix -= 0x00100000;}
- SET_HIGH_WORD(ax,ix);
-
- /* compute s = s_h+s_l = (x-1)/(x+1) or (x-1.5)/(x+1.5) */
- u = ax-bp[k]; /* bp[0]=1.0, bp[1]=1.5 */
- v = one/(ax+bp[k]);
- s = u*v;
- s_h = s;
- SET_LOW_WORD(s_h,0);
- /* t_h=ax+bp[k] High */
- t_h = zero;
- SET_HIGH_WORD(t_h,((ix>>1)|0x20000000)+0x00080000+(k<<18));
- t_l = ax - (t_h-bp[k]);
- s_l = v*((u-s_h*t_h)-s_h*t_l);
- /* compute log(ax) */
- s2 = s*s;
- r = s2*s2*(L1+s2*(L2+s2*(L3+s2*(L4+s2*(L5+s2*L6)))));
- r += s_l*(s_h+s);
- s2 = s_h*s_h;
- t_h = 3.0+s2+r;
- SET_LOW_WORD(t_h,0);
- t_l = r-((t_h-3.0)-s2);
- /* u+v = s*(1+...) */
- u = s_h*t_h;
- v = s_l*t_h+t_l*s;
- /* 2/(3log2)*(s+...) */
- p_h = u+v;
- SET_LOW_WORD(p_h,0);
- p_l = v-(p_h-u);
- z_h = cp_h*p_h; /* cp_h+cp_l = 2/(3*log2) */
- z_l = cp_l*p_h+p_l*cp+dp_l[k];
- /* log2(ax) = (s+..)*2/(3*log2) = n + dp_h + z_h + z_l */
- t = (double)n;
- t1 = (((z_h+z_l)+dp_h[k])+t);
- SET_LOW_WORD(t1,0);
- t2 = z_l-(((t1-t)-dp_h[k])-z_h);
- }
-
- s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
- if(((((u_int32_t)hx>>31)-1)|(yisint-1))==0)
- s = -one;/* (-ve)**(odd int) */
-
- /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */
- y1 = y;
- SET_LOW_WORD(y1,0);
- p_l = (y-y1)*t1+y*t2;
- p_h = y1*t1;
- z = p_l+p_h;
- EXTRACT_WORDS(j,i,z);
- if (j>=0x40900000) { /* z >= 1024 */
- if(((j-0x40900000)|i)!=0) /* if z > 1024 */
- return s*huge*huge; /* overflow */
- else {
- if(p_l+ovt>z-p_h) return s*huge*huge; /* overflow */
- }
- } else if((j&0x7fffffff)>=0x4090cc00 ) { /* z <= -1075 */
- if(((j-0xc090cc00)|i)!=0) /* z < -1075 */
- return s*tiny*tiny; /* underflow */
- else {
- if(p_l<=z-p_h) return s*tiny*tiny; /* underflow */
- }
- }
- /*
- * compute 2**(p_h+p_l)
- */
- i = j&0x7fffffff;
- k = (i>>20)-0x3ff;
- n = 0;
- if(i>0x3fe00000) { /* if |z| > 0.5, set n = [z+0.5] */
- n = j+(0x00100000>>(k+1));
- k = ((n&0x7fffffff)>>20)-0x3ff; /* new k for n */
- t = zero;
- SET_HIGH_WORD(t,n&~(0x000fffff>>k));
- n = ((n&0x000fffff)|0x00100000)>>(20-k);
- if(j<0) n = -n;
- p_h -= t;
- }
- t = p_l+p_h;
- SET_LOW_WORD(t,0);
- u = t*lg2_h;
- v = (p_l-(t-p_h))*lg2+t*lg2_l;
- z = u+v;
- w = v-(z-u);
- t = z*z;
- t1 = z - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
- r = (z*t1)/(t1-two)-(w+z*w);
- z = one-(r-z);
- GET_HIGH_WORD(j,z);
- j += (n<<20);
- if((j>>20)<=0) z = scalbn(z,n); /* subnormal output */
- else SET_HIGH_WORD(z,j);
- return s*z;
-}
diff --git a/lib/msun/src/e_powf.c b/lib/msun/src/e_powf.c
deleted file mode 100644
index a68bb8b..0000000
--- a/lib/msun/src/e_powf.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/* e_powf.c -- float version of e_pow.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: e_powf.c,v 1.4 1997/02/22 15:10:30 peter Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-bp[] = {1.0, 1.5,},
-dp_h[] = { 0.0, 5.84960938e-01,}, /* 0x3f15c000 */
-dp_l[] = { 0.0, 1.56322085e-06,}, /* 0x35d1cfdc */
-zero = 0.0,
-one = 1.0,
-two = 2.0,
-two24 = 16777216.0, /* 0x4b800000 */
-huge = 1.0e30,
-tiny = 1.0e-30,
- /* poly coefs for (3/2)*(log(x)-2s-2/3*s**3 */
-L1 = 6.0000002384e-01, /* 0x3f19999a */
-L2 = 4.2857143283e-01, /* 0x3edb6db7 */
-L3 = 3.3333334327e-01, /* 0x3eaaaaab */
-L4 = 2.7272811532e-01, /* 0x3e8ba305 */
-L5 = 2.3066075146e-01, /* 0x3e6c3255 */
-L6 = 2.0697501302e-01, /* 0x3e53f142 */
-P1 = 1.6666667163e-01, /* 0x3e2aaaab */
-P2 = -2.7777778450e-03, /* 0xbb360b61 */
-P3 = 6.6137559770e-05, /* 0x388ab355 */
-P4 = -1.6533901999e-06, /* 0xb5ddea0e */
-P5 = 4.1381369442e-08, /* 0x3331bb4c */
-lg2 = 6.9314718246e-01, /* 0x3f317218 */
-lg2_h = 6.93145752e-01, /* 0x3f317200 */
-lg2_l = 1.42860654e-06, /* 0x35bfbe8c */
-ovt = 4.2995665694e-08, /* -(128-log2(ovfl+.5ulp)) */
-cp = 9.6179670095e-01, /* 0x3f76384f =2/(3ln2) */
-cp_h = 9.6179199219e-01, /* 0x3f763800 =head of cp */
-cp_l = 4.7017383622e-06, /* 0x369dc3a0 =tail of cp_h */
-ivln2 = 1.4426950216e+00, /* 0x3fb8aa3b =1/ln2 */
-ivln2_h = 1.4426879883e+00, /* 0x3fb8aa00 =16b 1/ln2*/
-ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
-
-#ifdef __STDC__
- float __ieee754_powf(float x, float y)
-#else
- float __ieee754_powf(x,y)
- float x, y;
-#endif
-{
- float z,ax,z_h,z_l,p_h,p_l;
- float y1,t1,t2,r,s,t,u,v,w;
- int32_t i,j,k,yisint,n;
- int32_t hx,hy,ix,iy,is;
-
- GET_FLOAT_WORD(hx,x);
- GET_FLOAT_WORD(hy,y);
- ix = hx&0x7fffffff; iy = hy&0x7fffffff;
-
- /* y==zero: x**0 = 1 */
- if(iy==0) return one;
-
- /* +-NaN return x+y */
- if(ix > 0x7f800000 ||
- iy > 0x7f800000)
- return x+y;
-
- /* determine if y is an odd int when x < 0
- * yisint = 0 ... y is not an integer
- * yisint = 1 ... y is an odd int
- * yisint = 2 ... y is an even int
- */
- yisint = 0;
- if(hx<0) {
- if(iy>=0x4b800000) yisint = 2; /* even integer y */
- else if(iy>=0x3f800000) {
- k = (iy>>23)-0x7f; /* exponent */
- j = iy>>(23-k);
- if((j<<(23-k))==iy) yisint = 2-(j&1);
- }
- }
-
- /* special value of y */
- if (iy==0x7f800000) { /* y is +-inf */
- if (ix==0x3f800000)
- return y - y; /* inf**+-1 is NaN */
- else if (ix > 0x3f800000)/* (|x|>1)**+-inf = inf,0 */
- return (hy>=0)? y: zero;
- else /* (|x|<1)**-,+inf = inf,0 */
- return (hy<0)?-y: zero;
- }
- if(iy==0x3f800000) { /* y is +-1 */
- if(hy<0) return one/x; else return x;
- }
- if(hy==0x40000000) return x*x; /* y is 2 */
- if(hy==0x3f000000) { /* y is 0.5 */
- if(hx>=0) /* x >= +0 */
- return __ieee754_sqrtf(x);
- }
-
- ax = fabsf(x);
- /* special value of x */
- if(ix==0x7f800000||ix==0||ix==0x3f800000){
- z = ax; /*x is +-0,+-inf,+-1*/
- if(hy<0) z = one/z; /* z = (1/|x|) */
- if(hx<0) {
- if(((ix-0x3f800000)|yisint)==0) {
- z = (z-z)/(z-z); /* (-1)**non-int is NaN */
- } else if(yisint==1)
- z = -z; /* (x<0)**odd = -(|x|**odd) */
- }
- return z;
- }
-
- /* (x<0)**(non-int) is NaN */
- if(((((u_int32_t)hx>>31)-1)|yisint)==0) return (x-x)/(x-x);
-
- /* |y| is huge */
- if(iy>0x4d000000) { /* if |y| > 2**27 */
- /* over/underflow if x is not close to one */
- if(ix<0x3f7ffff8) return (hy<0)? huge*huge:tiny*tiny;
- if(ix>0x3f800007) return (hy>0)? huge*huge:tiny*tiny;
- /* now |1-x| is tiny <= 2**-20, suffice to compute
- log(x) by x-x^2/2+x^3/3-x^4/4 */
- t = x-1; /* t has 20 trailing zeros */
- w = (t*t)*((float)0.5-t*((float)0.333333333333-t*(float)0.25));
- u = ivln2_h*t; /* ivln2_h has 16 sig. bits */
- v = t*ivln2_l-w*ivln2;
- t1 = u+v;
- GET_FLOAT_WORD(is,t1);
- SET_FLOAT_WORD(t1,is&0xfffff000);
- t2 = v-(t1-u);
- } else {
- float s2,s_h,s_l,t_h,t_l;
- n = 0;
- /* take care subnormal number */
- if(ix<0x00800000)
- {ax *= two24; n -= 24; GET_FLOAT_WORD(ix,ax); }
- n += ((ix)>>23)-0x7f;
- j = ix&0x007fffff;
- /* determine interval */
- ix = j|0x3f800000; /* normalize ix */
- if(j<=0x1cc471) k=0; /* |x|<sqrt(3/2) */
- else if(j<0x5db3d7) k=1; /* |x|<sqrt(3) */
- else {k=0;n+=1;ix -= 0x00800000;}
- SET_FLOAT_WORD(ax,ix);
-
- /* compute s = s_h+s_l = (x-1)/(x+1) or (x-1.5)/(x+1.5) */
- u = ax-bp[k]; /* bp[0]=1.0, bp[1]=1.5 */
- v = one/(ax+bp[k]);
- s = u*v;
- s_h = s;
- GET_FLOAT_WORD(is,s_h);
- SET_FLOAT_WORD(s_h,is&0xfffff000);
- /* t_h=ax+bp[k] High */
- SET_FLOAT_WORD(t_h,((ix>>1)|0x20000000)+0x0040000+(k<<21));
- t_l = ax - (t_h-bp[k]);
- s_l = v*((u-s_h*t_h)-s_h*t_l);
- /* compute log(ax) */
- s2 = s*s;
- r = s2*s2*(L1+s2*(L2+s2*(L3+s2*(L4+s2*(L5+s2*L6)))));
- r += s_l*(s_h+s);
- s2 = s_h*s_h;
- t_h = (float)3.0+s2+r;
- GET_FLOAT_WORD(is,t_h);
- SET_FLOAT_WORD(t_h,is&0xfffff000);
- t_l = r-((t_h-(float)3.0)-s2);
- /* u+v = s*(1+...) */
- u = s_h*t_h;
- v = s_l*t_h+t_l*s;
- /* 2/(3log2)*(s+...) */
- p_h = u+v;
- GET_FLOAT_WORD(is,p_h);
- SET_FLOAT_WORD(p_h,is&0xfffff000);
- p_l = v-(p_h-u);
- z_h = cp_h*p_h; /* cp_h+cp_l = 2/(3*log2) */
- z_l = cp_l*p_h+p_l*cp+dp_l[k];
- /* log2(ax) = (s+..)*2/(3*log2) = n + dp_h + z_h + z_l */
- t = (float)n;
- t1 = (((z_h+z_l)+dp_h[k])+t);
- GET_FLOAT_WORD(is,t1);
- SET_FLOAT_WORD(t1,is&0xfffff000);
- t2 = z_l-(((t1-t)-dp_h[k])-z_h);
- }
-
- s = one; /* s (sign of result -ve**odd) = -1 else = 1 */
- if(((((u_int32_t)hx>>31)-1)|(yisint-1))==0)
- s = -one; /* (-ve)**(odd int) */
-
- /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */
- GET_FLOAT_WORD(is,y);
- SET_FLOAT_WORD(y1,is&0xfffff000);
- p_l = (y-y1)*t1+y*t2;
- p_h = y1*t1;
- z = p_l+p_h;
- GET_FLOAT_WORD(j,z);
- if (j>0x43000000) /* if z > 128 */
- return s*huge*huge; /* overflow */
- else if (j==0x43000000) { /* if z == 128 */
- if(p_l+ovt>z-p_h) return s*huge*huge; /* overflow */
- }
- else if ((j&0x7fffffff)>0x43160000) /* z <= -150 */
- return s*tiny*tiny; /* underflow */
- else if (j==0xc3160000){ /* z == -150 */
- if(p_l<=z-p_h) return s*tiny*tiny; /* underflow */
- }
- /*
- * compute 2**(p_h+p_l)
- */
- i = j&0x7fffffff;
- k = (i>>23)-0x7f;
- n = 0;
- if(i>0x3f000000) { /* if |z| > 0.5, set n = [z+0.5] */
- n = j+(0x00800000>>(k+1));
- k = ((n&0x7fffffff)>>23)-0x7f; /* new k for n */
- SET_FLOAT_WORD(t,n&~(0x007fffff>>k));
- n = ((n&0x007fffff)|0x00800000)>>(23-k);
- if(j<0) n = -n;
- p_h -= t;
- }
- t = p_l+p_h;
- GET_FLOAT_WORD(is,t);
- SET_FLOAT_WORD(t,is&0xfffff000);
- u = t*lg2_h;
- v = (p_l-(t-p_h))*lg2+t*lg2_l;
- z = u+v;
- w = v-(z-u);
- t = z*z;
- t1 = z - t*(P1+t*(P2+t*(P3+t*(P4+t*P5))));
- r = (z*t1)/(t1-two)-(w+z*w);
- z = one-(r-z);
- GET_FLOAT_WORD(j,z);
- j += (n<<23);
- if((j>>23)<=0) z = scalbnf(z,n); /* subnormal output */
- else SET_FLOAT_WORD(z,j);
- return s*z;
-}
diff --git a/lib/msun/src/e_rem_pio2.c b/lib/msun/src/e_rem_pio2.c
deleted file mode 100644
index 1ee6ce3..0000000
--- a/lib/msun/src/e_rem_pio2.c
+++ /dev/null
@@ -1,183 +0,0 @@
-/* @(#)e_rem_pio2.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_rem_pio2(x,y)
- *
- * return the remainder of x rem pi/2 in y[0]+y[1]
- * use __kernel_rem_pio2()
- */
-
-#include "math.h"
-#include "math_private.h"
-
-/*
- * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
- */
-#ifdef __STDC__
-static const int32_t two_over_pi[] = {
-#else
-static int32_t two_over_pi[] = {
-#endif
-0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
-0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
-0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
-0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
-0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
-0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
-0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
-0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
-0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
-0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
-0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
-};
-
-#ifdef __STDC__
-static const int32_t npio2_hw[] = {
-#else
-static int32_t npio2_hw[] = {
-#endif
-0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C,
-0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C,
-0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,
-0x403DD85A, 0x403F6A7A, 0x40407E4C, 0x4041475C, 0x4042106C, 0x4042D97C,
-0x4043A28C, 0x40446B9C, 0x404534AC, 0x4045FDBB, 0x4046C6CB, 0x40478FDB,
-0x404858EB, 0x404921FB,
-};
-
-/*
- * invpio2: 53 bits of 2/pi
- * pio2_1: first 33 bit of pi/2
- * pio2_1t: pi/2 - pio2_1
- * pio2_2: second 33 bit of pi/2
- * pio2_2t: pi/2 - (pio2_1+pio2_2)
- * pio2_3: third 33 bit of pi/2
- * pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3)
- */
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-zero = 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
-half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
-two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
-invpio2 = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
-pio2_1 = 1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */
-pio2_1t = 6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */
-pio2_2 = 6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */
-pio2_2t = 2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */
-pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
-pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
-
-#ifdef __STDC__
- int32_t __ieee754_rem_pio2(double x, double *y)
-#else
- int32_t __ieee754_rem_pio2(x,y)
- double x,y[];
-#endif
-{
- double z,w,t,r,fn;
- double tx[3];
- int32_t e0,i,j,nx,n,ix,hx;
- u_int32_t low;
-
- GET_HIGH_WORD(hx,x); /* high word of x */
- ix = hx&0x7fffffff;
- if(ix<=0x3fe921fb) /* |x| ~<= pi/4 , no need for reduction */
- {y[0] = x; y[1] = 0; return 0;}
- if(ix<0x4002d97c) { /* |x| < 3pi/4, special case with n=+-1 */
- if(hx>0) {
- z = x - pio2_1;
- if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
- y[0] = z - pio2_1t;
- y[1] = (z-y[0])-pio2_1t;
- } else { /* near pi/2, use 33+33+53 bit pi */
- z -= pio2_2;
- y[0] = z - pio2_2t;
- y[1] = (z-y[0])-pio2_2t;
- }
- return 1;
- } else { /* negative x */
- z = x + pio2_1;
- if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
- y[0] = z + pio2_1t;
- y[1] = (z-y[0])+pio2_1t;
- } else { /* near pi/2, use 33+33+53 bit pi */
- z += pio2_2;
- y[0] = z + pio2_2t;
- y[1] = (z-y[0])+pio2_2t;
- }
- return -1;
- }
- }
- if(ix<=0x413921fb) { /* |x| ~<= 2^19*(pi/2), medium size */
- t = fabs(x);
- n = (int32_t) (t*invpio2+half);
- fn = (double)n;
- r = t-fn*pio2_1;
- w = fn*pio2_1t; /* 1st round good to 85 bit */
- if(n<32&&ix!=npio2_hw[n-1]) {
- y[0] = r-w; /* quick check no cancellation */
- } else {
- u_int32_t high;
- j = ix>>20;
- y[0] = r-w;
- GET_HIGH_WORD(high,y[0]);
- i = j-((high>>20)&0x7ff);
- if(i>16) { /* 2nd iteration needed, good to 118 */
- t = r;
- w = fn*pio2_2;
- r = t-w;
- w = fn*pio2_2t-((t-r)-w);
- y[0] = r-w;
- GET_HIGH_WORD(high,y[0]);
- i = j-((high>>20)&0x7ff);
- if(i>49) { /* 3rd iteration need, 151 bits acc */
- t = r; /* will cover all possible cases */
- w = fn*pio2_3;
- r = t-w;
- w = fn*pio2_3t-((t-r)-w);
- y[0] = r-w;
- }
- }
- }
- y[1] = (r-y[0])-w;
- if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
- else return n;
- }
- /*
- * all other (large) arguments
- */
- if(ix>=0x7ff00000) { /* x is inf or NaN */
- y[0]=y[1]=x-x; return 0;
- }
- /* set z = scalbn(|x|,ilogb(x)-23) */
- GET_LOW_WORD(low,x);
- SET_LOW_WORD(z,low);
- e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */
- SET_HIGH_WORD(z, ix - ((int32_t)(e0<<20)));
- for(i=0;i<2;i++) {
- tx[i] = (double)((int32_t)(z));
- z = (z-tx[i])*two24;
- }
- tx[2] = z;
- nx = 3;
- while(tx[nx-1]==zero) nx--; /* skip zero term */
- n = __kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi);
- if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
- return n;
-}
diff --git a/lib/msun/src/e_rem_pio2f.c b/lib/msun/src/e_rem_pio2f.c
deleted file mode 100644
index 49e698f..0000000
--- a/lib/msun/src/e_rem_pio2f.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/* e_rem_pio2f.c -- float version of e_rem_pio2.c
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_rem_pio2f(x,y)
- *
- * return the remainder of x rem pi/2 in y[0]+y[1]
- * use __kernel_rem_pio2f()
- */
-
-#include "math.h"
-#include "math_private.h"
-
-/*
- * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
- */
-#ifdef __STDC__
-static const int32_t two_over_pi[] = {
-#else
-static int32_t two_over_pi[] = {
-#endif
-0xA2, 0xF9, 0x83, 0x6E, 0x4E, 0x44, 0x15, 0x29, 0xFC,
-0x27, 0x57, 0xD1, 0xF5, 0x34, 0xDD, 0xC0, 0xDB, 0x62,
-0x95, 0x99, 0x3C, 0x43, 0x90, 0x41, 0xFE, 0x51, 0x63,
-0xAB, 0xDE, 0xBB, 0xC5, 0x61, 0xB7, 0x24, 0x6E, 0x3A,
-0x42, 0x4D, 0xD2, 0xE0, 0x06, 0x49, 0x2E, 0xEA, 0x09,
-0xD1, 0x92, 0x1C, 0xFE, 0x1D, 0xEB, 0x1C, 0xB1, 0x29,
-0xA7, 0x3E, 0xE8, 0x82, 0x35, 0xF5, 0x2E, 0xBB, 0x44,
-0x84, 0xE9, 0x9C, 0x70, 0x26, 0xB4, 0x5F, 0x7E, 0x41,
-0x39, 0x91, 0xD6, 0x39, 0x83, 0x53, 0x39, 0xF4, 0x9C,
-0x84, 0x5F, 0x8B, 0xBD, 0xF9, 0x28, 0x3B, 0x1F, 0xF8,
-0x97, 0xFF, 0xDE, 0x05, 0x98, 0x0F, 0xEF, 0x2F, 0x11,
-0x8B, 0x5A, 0x0A, 0x6D, 0x1F, 0x6D, 0x36, 0x7E, 0xCF,
-0x27, 0xCB, 0x09, 0xB7, 0x4F, 0x46, 0x3F, 0x66, 0x9E,
-0x5F, 0xEA, 0x2D, 0x75, 0x27, 0xBA, 0xC7, 0xEB, 0xE5,
-0xF1, 0x7B, 0x3D, 0x07, 0x39, 0xF7, 0x8A, 0x52, 0x92,
-0xEA, 0x6B, 0xFB, 0x5F, 0xB1, 0x1F, 0x8D, 0x5D, 0x08,
-0x56, 0x03, 0x30, 0x46, 0xFC, 0x7B, 0x6B, 0xAB, 0xF0,
-0xCF, 0xBC, 0x20, 0x9A, 0xF4, 0x36, 0x1D, 0xA9, 0xE3,
-0x91, 0x61, 0x5E, 0xE6, 0x1B, 0x08, 0x65, 0x99, 0x85,
-0x5F, 0x14, 0xA0, 0x68, 0x40, 0x8D, 0xFF, 0xD8, 0x80,
-0x4D, 0x73, 0x27, 0x31, 0x06, 0x06, 0x15, 0x56, 0xCA,
-0x73, 0xA8, 0xC9, 0x60, 0xE2, 0x7B, 0xC0, 0x8C, 0x6B,
-};
-
-/* This array is like the one in e_rem_pio2.c, but the numbers are
- single precision and the last 8 bits are forced to 0. */
-#ifdef __STDC__
-static const int32_t npio2_hw[] = {
-#else
-static int32_t npio2_hw[] = {
-#endif
-0x3fc90f00, 0x40490f00, 0x4096cb00, 0x40c90f00, 0x40fb5300, 0x4116cb00,
-0x412fed00, 0x41490f00, 0x41623100, 0x417b5300, 0x418a3a00, 0x4196cb00,
-0x41a35c00, 0x41afed00, 0x41bc7e00, 0x41c90f00, 0x41d5a000, 0x41e23100,
-0x41eec200, 0x41fb5300, 0x4203f200, 0x420a3a00, 0x42108300, 0x4216cb00,
-0x421d1400, 0x42235c00, 0x4229a500, 0x422fed00, 0x42363600, 0x423c7e00,
-0x4242c700, 0x42490f00
-};
-
-/*
- * invpio2: 24 bits of 2/pi
- * pio2_1: first 17 bit of pi/2
- * pio2_1t: pi/2 - pio2_1
- * pio2_2: second 17 bit of pi/2
- * pio2_2t: pi/2 - (pio2_1+pio2_2)
- * pio2_3: third 17 bit of pi/2
- * pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3)
- */
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-zero = 0.0000000000e+00, /* 0x00000000 */
-half = 5.0000000000e-01, /* 0x3f000000 */
-two8 = 2.5600000000e+02, /* 0x43800000 */
-invpio2 = 6.3661980629e-01, /* 0x3f22f984 */
-pio2_1 = 1.5707855225e+00, /* 0x3fc90f80 */
-pio2_1t = 1.0804334124e-05, /* 0x37354443 */
-pio2_2 = 1.0804273188e-05, /* 0x37354400 */
-pio2_2t = 6.0770999344e-11, /* 0x2e85a308 */
-pio2_3 = 6.0770943833e-11, /* 0x2e85a300 */
-pio2_3t = 6.1232342629e-17; /* 0x248d3132 */
-
-#ifdef __STDC__
- int32_t __ieee754_rem_pio2f(float x, float *y)
-#else
- int32_t __ieee754_rem_pio2f(x,y)
- float x,y[];
-#endif
-{
- float z,w,t,r,fn;
- float tx[3];
- int32_t e0,i,j,nx,n,ix,hx;
-
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix<=0x3f490fd8) /* |x| ~<= pi/4 , no need for reduction */
- {y[0] = x; y[1] = 0; return 0;}
- if(ix<0x4016cbe4) { /* |x| < 3pi/4, special case with n=+-1 */
- if(hx>0) {
- z = x - pio2_1;
- if((ix&0xfffffff0)!=0x3fc90fd0) { /* 24+24 bit pi OK */
- y[0] = z - pio2_1t;
- y[1] = (z-y[0])-pio2_1t;
- } else { /* near pi/2, use 24+24+24 bit pi */
- z -= pio2_2;
- y[0] = z - pio2_2t;
- y[1] = (z-y[0])-pio2_2t;
- }
- return 1;
- } else { /* negative x */
- z = x + pio2_1;
- if((ix&0xfffffff0)!=0x3fc90fd0) { /* 24+24 bit pi OK */
- y[0] = z + pio2_1t;
- y[1] = (z-y[0])+pio2_1t;
- } else { /* near pi/2, use 24+24+24 bit pi */
- z += pio2_2;
- y[0] = z + pio2_2t;
- y[1] = (z-y[0])+pio2_2t;
- }
- return -1;
- }
- }
- if(ix<=0x43490f80) { /* |x| ~<= 2^7*(pi/2), medium size */
- t = fabsf(x);
- n = (int32_t) (t*invpio2+half);
- fn = (float)n;
- r = t-fn*pio2_1;
- w = fn*pio2_1t; /* 1st round good to 40 bit */
- if(n<32&&(ix&0xffffff00)!=npio2_hw[n-1]) {
- y[0] = r-w; /* quick check no cancellation */
- } else {
- u_int32_t high;
- j = ix>>23;
- y[0] = r-w;
- GET_FLOAT_WORD(high,y[0]);
- i = j-((high>>23)&0xff);
- if(i>8) { /* 2nd iteration needed, good to 57 */
- t = r;
- w = fn*pio2_2;
- r = t-w;
- w = fn*pio2_2t-((t-r)-w);
- y[0] = r-w;
- GET_FLOAT_WORD(high,y[0]);
- i = j-((high>>23)&0xff);
- if(i>25) { /* 3rd iteration need, 74 bits acc */
- t = r; /* will cover all possible cases */
- w = fn*pio2_3;
- r = t-w;
- w = fn*pio2_3t-((t-r)-w);
- y[0] = r-w;
- }
- }
- }
- y[1] = (r-y[0])-w;
- if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
- else return n;
- }
- /*
- * all other (large) arguments
- */
- if(ix>=0x7f800000) { /* x is inf or NaN */
- y[0]=y[1]=x-x; return 0;
- }
- /* set z = scalbn(|x|,ilogb(x)-7) */
- e0 = (ix>>23)-134; /* e0 = ilogb(z)-7; */
- SET_FLOAT_WORD(z, ix - ((int32_t)(e0<<23)));
- for(i=0;i<2;i++) {
- tx[i] = (float)((int32_t)(z));
- z = (z-tx[i])*two8;
- }
- tx[2] = z;
- nx = 3;
- while(tx[nx-1]==zero) nx--; /* skip zero term */
- n = __kernel_rem_pio2f(tx,y,e0,nx,2,two_over_pi);
- if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
- return n;
-}
diff --git a/lib/msun/src/e_remainder.c b/lib/msun/src/e_remainder.c
deleted file mode 100644
index 4b603a0..0000000
--- a/lib/msun/src/e_remainder.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* @(#)e_remainder.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_remainder(x,p)
- * Return :
- * returns x REM p = x - [x/p]*p as if in infinite
- * precise arithmetic, where [x/p] is the (infinite bit)
- * integer nearest x/p (in half way case choose the even one).
- * Method :
- * Based on fmod() return x-[x/p]chopped*p exactlp.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-
-
-#ifdef __STDC__
- double __generic___ieee754_remainder(double x, double p)
-#else
- double __generic___ieee754_remainder(x,p)
- double x,p;
-#endif
-{
- int32_t hx,hp;
- u_int32_t sx,lx,lp;
- double p_half;
-
- EXTRACT_WORDS(hx,lx,x);
- EXTRACT_WORDS(hp,lp,p);
- sx = hx&0x80000000;
- hp &= 0x7fffffff;
- hx &= 0x7fffffff;
-
- /* purge off exception values */
- if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */
- if((hx>=0x7ff00000)|| /* x not finite */
- ((hp>=0x7ff00000)&& /* p is NaN */
- (((hp-0x7ff00000)|lp)!=0)))
- return (x*p)/(x*p);
-
-
- if (hp<=0x7fdfffff) x = __ieee754_fmod(x,p+p); /* now x < 2p */
- if (((hx-hp)|(lx-lp))==0) return zero*x;
- x = fabs(x);
- p = fabs(p);
- if (hp<0x00200000) {
- if(x+x>p) {
- x-=p;
- if(x+x>=p) x -= p;
- }
- } else {
- p_half = 0.5*p;
- if(x>p_half) {
- x-=p;
- if(x>=p_half) x -= p;
- }
- }
- GET_HIGH_WORD(hx,x);
- SET_HIGH_WORD(x,hx^sx);
- return x;
-}
diff --git a/lib/msun/src/e_remainderf.c b/lib/msun/src/e_remainderf.c
deleted file mode 100644
index ddfc8de..0000000
--- a/lib/msun/src/e_remainderf.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/* e_remainderf.c -- float version of e_remainder.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-
-
-#ifdef __STDC__
- float __ieee754_remainderf(float x, float p)
-#else
- float __ieee754_remainderf(x,p)
- float x,p;
-#endif
-{
- int32_t hx,hp;
- u_int32_t sx;
- float p_half;
-
- GET_FLOAT_WORD(hx,x);
- GET_FLOAT_WORD(hp,p);
- sx = hx&0x80000000;
- hp &= 0x7fffffff;
- hx &= 0x7fffffff;
-
- /* purge off exception values */
- if(hp==0) return (x*p)/(x*p); /* p = 0 */
- if((hx>=0x7f800000)|| /* x not finite */
- ((hp>0x7f800000))) /* p is NaN */
- return (x*p)/(x*p);
-
-
- if (hp<=0x7effffff) x = __ieee754_fmodf(x,p+p); /* now x < 2p */
- if ((hx-hp)==0) return zero*x;
- x = fabsf(x);
- p = fabsf(p);
- if (hp<0x01000000) {
- if(x+x>p) {
- x-=p;
- if(x+x>=p) x -= p;
- }
- } else {
- p_half = (float)0.5*p;
- if(x>p_half) {
- x-=p;
- if(x>=p_half) x -= p;
- }
- }
- GET_FLOAT_WORD(hx,x);
- SET_FLOAT_WORD(x,hx^sx);
- return x;
-}
diff --git a/lib/msun/src/e_scalb.c b/lib/msun/src/e_scalb.c
deleted file mode 100644
index 89a4127..0000000
--- a/lib/msun/src/e_scalb.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* @(#)e_scalb.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * __ieee754_scalb(x, fn) is provide for
- * passing various standard test suite. One
- * should use scalbn() instead.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef _SCALB_INT
-#ifdef __STDC__
- double __generic___ieee754_scalb(double x, int fn)
-#else
- double __generic___ieee754_scalb(x,fn)
- double x; int fn;
-#endif
-#else
-#ifdef __STDC__
- double __generic___ieee754_scalb(double x, double fn)
-#else
- double __generic___ieee754_scalb(x,fn)
- double x, fn;
-#endif
-#endif
-{
-#ifdef _SCALB_INT
- return scalbn(x,fn);
-#else
- if (isnan(x)||isnan(fn)) return x*fn;
- if (!finite(fn)) {
- if(fn>0.0) return x*fn;
- else return x/(-fn);
- }
- if (rint(fn)!=fn) return (fn-fn)/(fn-fn);
- if ( fn > 65000.0) return scalbn(x, 65000);
- if (-fn > 65000.0) return scalbn(x,-65000);
- return scalbn(x,(int)fn);
-#endif
-}
diff --git a/lib/msun/src/e_scalbf.c b/lib/msun/src/e_scalbf.c
deleted file mode 100644
index df2a54d..0000000
--- a/lib/msun/src/e_scalbf.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* e_scalbf.c -- float version of e_scalb.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef _SCALB_INT
-#ifdef __STDC__
- float __ieee754_scalbf(float x, int fn)
-#else
- float __ieee754_scalbf(x,fn)
- float x; int fn;
-#endif
-#else
-#ifdef __STDC__
- float __ieee754_scalbf(float x, float fn)
-#else
- float __ieee754_scalbf(x,fn)
- float x, fn;
-#endif
-#endif
-{
-#ifdef _SCALB_INT
- return scalbnf(x,fn);
-#else
- if (isnanf(x)||isnanf(fn)) return x*fn;
- if (!finitef(fn)) {
- if(fn>(float)0.0) return x*fn;
- else return x/(-fn);
- }
- if (rintf(fn)!=fn) return (fn-fn)/(fn-fn);
- if ( fn > (float)65000.0) return scalbnf(x, 65000);
- if (-fn > (float)65000.0) return scalbnf(x,-65000);
- return scalbnf(x,(int)fn);
-#endif
-}
diff --git a/lib/msun/src/e_sinh.c b/lib/msun/src/e_sinh.c
deleted file mode 100644
index 764fdc3..0000000
--- a/lib/msun/src/e_sinh.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* @(#)e_sinh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_sinh(x)
- * Method :
- * mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
- * 1. Replace x by |x| (sinh(-x) = -sinh(x)).
- * 2.
- * E + E/(E+1)
- * 0 <= x <= 22 : sinh(x) := --------------, E=expm1(x)
- * 2
- *
- * 22 <= x <= lnovft : sinh(x) := exp(x)/2
- * lnovft <= x <= ln2ovft: sinh(x) := exp(x/2)/2 * exp(x/2)
- * ln2ovft < x : sinh(x) := x*shuge (overflow)
- *
- * Special cases:
- * sinh(x) is |x| if x is +INF, -INF, or NaN.
- * only sinh(0)=0 is exact for finite x.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double one = 1.0, shuge = 1.0e307;
-#else
-static double one = 1.0, shuge = 1.0e307;
-#endif
-
-#ifdef __STDC__
- double __ieee754_sinh(double x)
-#else
- double __ieee754_sinh(x)
- double x;
-#endif
-{
- double t,w,h;
- int32_t ix,jx;
- u_int32_t lx;
-
- /* High word of |x|. */
- GET_HIGH_WORD(jx,x);
- ix = jx&0x7fffffff;
-
- /* x is INF or NaN */
- if(ix>=0x7ff00000) return x+x;
-
- h = 0.5;
- if (jx<0) h = -h;
- /* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */
- if (ix < 0x40360000) { /* |x|<22 */
- if (ix<0x3e300000) /* |x|<2**-28 */
- if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */
- t = expm1(fabs(x));
- if(ix<0x3ff00000) return h*(2.0*t-t*t/(t+one));
- return h*(t+t/(t+one));
- }
-
- /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */
- if (ix < 0x40862E42) return h*__ieee754_exp(fabs(x));
-
- /* |x| in [log(maxdouble), overflowthresold] */
- GET_LOW_WORD(lx,x);
- if (ix<0x408633CE || ((ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d))) {
- w = __ieee754_exp(0.5*fabs(x));
- t = h*w;
- return t*w;
- }
-
- /* |x| > overflowthresold, sinh(x) overflow */
- return x*shuge;
-}
diff --git a/lib/msun/src/e_sinhf.c b/lib/msun/src/e_sinhf.c
deleted file mode 100644
index 26db978..0000000
--- a/lib/msun/src/e_sinhf.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* e_sinhf.c -- float version of e_sinh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float one = 1.0, shuge = 1.0e37;
-#else
-static float one = 1.0, shuge = 1.0e37;
-#endif
-
-#ifdef __STDC__
- float __ieee754_sinhf(float x)
-#else
- float __ieee754_sinhf(x)
- float x;
-#endif
-{
- float t,w,h;
- int32_t ix,jx;
-
- GET_FLOAT_WORD(jx,x);
- ix = jx&0x7fffffff;
-
- /* x is INF or NaN */
- if(ix>=0x7f800000) return x+x;
-
- h = 0.5;
- if (jx<0) h = -h;
- /* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */
- if (ix < 0x41b00000) { /* |x|<22 */
- if (ix<0x31800000) /* |x|<2**-28 */
- if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */
- t = expm1f(fabsf(x));
- if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one));
- return h*(t+t/(t+one));
- }
-
- /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */
- if (ix < 0x42b17180) return h*__ieee754_expf(fabsf(x));
-
- /* |x| in [log(maxdouble), overflowthresold] */
- if (ix<=0x42b2d4fc) {
- w = __ieee754_expf((float)0.5*fabsf(x));
- t = h*w;
- return t*w;
- }
-
- /* |x| > overflowthresold, sinh(x) overflow */
- return x*shuge;
-}
diff --git a/lib/msun/src/e_sqrt.c b/lib/msun/src/e_sqrt.c
deleted file mode 100644
index 813017f..0000000
--- a/lib/msun/src/e_sqrt.c
+++ /dev/null
@@ -1,453 +0,0 @@
-/* @(#)e_sqrt.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __ieee754_sqrt(x)
- * Return correctly rounded sqrt.
- * ------------------------------------------
- * | Use the hardware sqrt if you have one |
- * ------------------------------------------
- * Method:
- * Bit by bit method using integer arithmetic. (Slow, but portable)
- * 1. Normalization
- * Scale x to y in [1,4) with even powers of 2:
- * find an integer k such that 1 <= (y=x*2^(2k)) < 4, then
- * sqrt(x) = 2^k * sqrt(y)
- * 2. Bit by bit computation
- * Let q = sqrt(y) truncated to i bit after binary point (q = 1),
- * i 0
- * i+1 2
- * s = 2*q , and y = 2 * ( y - q ). (1)
- * i i i i
- *
- * To compute q from q , one checks whether
- * i+1 i
- *
- * -(i+1) 2
- * (q + 2 ) <= y. (2)
- * i
- * -(i+1)
- * If (2) is false, then q = q ; otherwise q = q + 2 .
- * i+1 i i+1 i
- *
- * With some algebric manipulation, it is not difficult to see
- * that (2) is equivalent to
- * -(i+1)
- * s + 2 <= y (3)
- * i i
- *
- * The advantage of (3) is that s and y can be computed by
- * i i
- * the following recurrence formula:
- * if (3) is false
- *
- * s = s , y = y ; (4)
- * i+1 i i+1 i
- *
- * otherwise,
- * -i -(i+1)
- * s = s + 2 , y = y - s - 2 (5)
- * i+1 i i+1 i i
- *
- * One may easily use induction to prove (4) and (5).
- * Note. Since the left hand side of (3) contain only i+2 bits,
- * it does not necessary to do a full (53-bit) comparison
- * in (3).
- * 3. Final rounding
- * After generating the 53 bits result, we compute one more bit.
- * Together with the remainder, we can decide whether the
- * result is exact, bigger than 1/2ulp, or less than 1/2ulp
- * (it will never equal to 1/2ulp).
- * The rounding mode can be detected by checking whether
- * huge + tiny is equal to huge, and whether huge - tiny is
- * equal to huge for some floating point number "huge" and "tiny".
- *
- * Special cases:
- * sqrt(+-0) = +-0 ... exact
- * sqrt(inf) = inf
- * sqrt(-ve) = NaN ... with invalid signal
- * sqrt(NaN) = NaN ... with invalid signal for signaling NaN
- *
- * Other methods : see the appended file at the end of the program below.
- *---------------
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double one = 1.0, tiny=1.0e-300;
-#else
-static double one = 1.0, tiny=1.0e-300;
-#endif
-
-#ifdef __STDC__
- double __generic___ieee754_sqrt(double x)
-#else
- double __generic___ieee754_sqrt(x)
- double x;
-#endif
-{
- double z;
- int32_t sign = (int)0x80000000;
- int32_t ix0,s0,q,m,t,i;
- u_int32_t r,t1,s1,ix1,q1;
-
- EXTRACT_WORDS(ix0,ix1,x);
-
- /* take care of Inf and NaN */
- if((ix0&0x7ff00000)==0x7ff00000) {
- return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
- sqrt(-inf)=sNaN */
- }
- /* take care of zero */
- if(ix0<=0) {
- if(((ix0&(~sign))|ix1)==0) return x;/* sqrt(+-0) = +-0 */
- else if(ix0<0)
- return (x-x)/(x-x); /* sqrt(-ve) = sNaN */
- }
- /* normalize x */
- m = (ix0>>20);
- if(m==0) { /* subnormal x */
- while(ix0==0) {
- m -= 21;
- ix0 |= (ix1>>11); ix1 <<= 21;
- }
- for(i=0;(ix0&0x00100000)==0;i++) ix0<<=1;
- m -= i-1;
- ix0 |= (ix1>>(32-i));
- ix1 <<= i;
- }
- m -= 1023; /* unbias exponent */
- ix0 = (ix0&0x000fffff)|0x00100000;
- if(m&1){ /* odd m, double x to make it even */
- ix0 += ix0 + ((ix1&sign)>>31);
- ix1 += ix1;
- }
- m >>= 1; /* m = [m/2] */
-
- /* generate sqrt(x) bit by bit */
- ix0 += ix0 + ((ix1&sign)>>31);
- ix1 += ix1;
- q = q1 = s0 = s1 = 0; /* [q,q1] = sqrt(x) */
- r = 0x00200000; /* r = moving bit from right to left */
-
- while(r!=0) {
- t = s0+r;
- if(t<=ix0) {
- s0 = t+r;
- ix0 -= t;
- q += r;
- }
- ix0 += ix0 + ((ix1&sign)>>31);
- ix1 += ix1;
- r>>=1;
- }
-
- r = sign;
- while(r!=0) {
- t1 = s1+r;
- t = s0;
- if((t<ix0)||((t==ix0)&&(t1<=ix1))) {
- s1 = t1+r;
- if(((t1&sign)==sign)&&(s1&sign)==0) s0 += 1;
- ix0 -= t;
- if (ix1 < t1) ix0 -= 1;
- ix1 -= t1;
- q1 += r;
- }
- ix0 += ix0 + ((ix1&sign)>>31);
- ix1 += ix1;
- r>>=1;
- }
-
- /* use floating add to find out rounding direction */
- if((ix0|ix1)!=0) {
- z = one-tiny; /* trigger inexact flag */
- if (z>=one) {
- z = one+tiny;
- if (q1==(u_int32_t)0xffffffff) { q1=0; q += 1;}
- else if (z>one) {
- if (q1==(u_int32_t)0xfffffffe) q+=1;
- q1+=2;
- } else
- q1 += (q1&1);
- }
- }
- ix0 = (q>>1)+0x3fe00000;
- ix1 = q1>>1;
- if ((q&1)==1) ix1 |= sign;
- ix0 += (m <<20);
- INSERT_WORDS(z,ix0,ix1);
- return z;
-}
-
-/*
-Other methods (use floating-point arithmetic)
--------------
-(This is a copy of a drafted paper by Prof W. Kahan
-and K.C. Ng, written in May, 1986)
-
- Two algorithms are given here to implement sqrt(x)
- (IEEE double precision arithmetic) in software.
- Both supply sqrt(x) correctly rounded. The first algorithm (in
- Section A) uses newton iterations and involves four divisions.
- The second one uses reciproot iterations to avoid division, but
- requires more multiplications. Both algorithms need the ability
- to chop results of arithmetic operations instead of round them,
- and the INEXACT flag to indicate when an arithmetic operation
- is executed exactly with no roundoff error, all part of the
- standard (IEEE 754-1985). The ability to perform shift, add,
- subtract and logical AND operations upon 32-bit words is needed
- too, though not part of the standard.
-
-A. sqrt(x) by Newton Iteration
-
- (1) Initial approximation
-
- Let x0 and x1 be the leading and the trailing 32-bit words of
- a floating point number x (in IEEE double format) respectively
-
- 1 11 52 ...widths
- ------------------------------------------------------
- x: |s| e | f |
- ------------------------------------------------------
- msb lsb msb lsb ...order
-
-
- ------------------------ ------------------------
- x0: |s| e | f1 | x1: | f2 |
- ------------------------ ------------------------
-
- By performing shifts and subtracts on x0 and x1 (both regarded
- as integers), we obtain an 8-bit approximation of sqrt(x) as
- follows.
-
- k := (x0>>1) + 0x1ff80000;
- y0 := k - T1[31&(k>>15)]. ... y ~ sqrt(x) to 8 bits
- Here k is a 32-bit integer and T1[] is an integer array containing
- correction terms. Now magically the floating value of y (y's
- leading 32-bit word is y0, the value of its trailing word is 0)
- approximates sqrt(x) to almost 8-bit.
-
- Value of T1:
- static int T1[32]= {
- 0, 1024, 3062, 5746, 9193, 13348, 18162, 23592,
- 29598, 36145, 43202, 50740, 58733, 67158, 75992, 85215,
- 83599, 71378, 60428, 50647, 41945, 34246, 27478, 21581,
- 16499, 12183, 8588, 5674, 3403, 1742, 661, 130,};
-
- (2) Iterative refinement
-
- Apply Heron's rule three times to y, we have y approximates
- sqrt(x) to within 1 ulp (Unit in the Last Place):
-
- y := (y+x/y)/2 ... almost 17 sig. bits
- y := (y+x/y)/2 ... almost 35 sig. bits
- y := y-(y-x/y)/2 ... within 1 ulp
-
-
- Remark 1.
- Another way to improve y to within 1 ulp is:
-
- y := (y+x/y) ... almost 17 sig. bits to 2*sqrt(x)
- y := y - 0x00100006 ... almost 18 sig. bits to sqrt(x)
-
- 2
- (x-y )*y
- y := y + 2* ---------- ...within 1 ulp
- 2
- 3y + x
-
-
- This formula has one division fewer than the one above; however,
- it requires more multiplications and additions. Also x must be
- scaled in advance to avoid spurious overflow in evaluating the
- expression 3y*y+x. Hence it is not recommended uless division
- is slow. If division is very slow, then one should use the
- reciproot algorithm given in section B.
-
- (3) Final adjustment
-
- By twiddling y's last bit it is possible to force y to be
- correctly rounded according to the prevailing rounding mode
- as follows. Let r and i be copies of the rounding mode and
- inexact flag before entering the square root program. Also we
- use the expression y+-ulp for the next representable floating
- numbers (up and down) of y. Note that y+-ulp = either fixed
- point y+-1, or multiply y by nextafter(1,+-inf) in chopped
- mode.
-
- I := FALSE; ... reset INEXACT flag I
- R := RZ; ... set rounding mode to round-toward-zero
- z := x/y; ... chopped quotient, possibly inexact
- If(not I) then { ... if the quotient is exact
- if(z=y) {
- I := i; ... restore inexact flag
- R := r; ... restore rounded mode
- return sqrt(x):=y.
- } else {
- z := z - ulp; ... special rounding
- }
- }
- i := TRUE; ... sqrt(x) is inexact
- If (r=RN) then z=z+ulp ... rounded-to-nearest
- If (r=RP) then { ... round-toward-+inf
- y = y+ulp; z=z+ulp;
- }
- y := y+z; ... chopped sum
- y0:=y0-0x00100000; ... y := y/2 is correctly rounded.
- I := i; ... restore inexact flag
- R := r; ... restore rounded mode
- return sqrt(x):=y.
-
- (4) Special cases
-
- Square root of +inf, +-0, or NaN is itself;
- Square root of a negative number is NaN with invalid signal.
-
-
-B. sqrt(x) by Reciproot Iteration
-
- (1) Initial approximation
-
- Let x0 and x1 be the leading and the trailing 32-bit words of
- a floating point number x (in IEEE double format) respectively
- (see section A). By performing shifs and subtracts on x0 and y0,
- we obtain a 7.8-bit approximation of 1/sqrt(x) as follows.
-
- k := 0x5fe80000 - (x0>>1);
- y0:= k - T2[63&(k>>14)]. ... y ~ 1/sqrt(x) to 7.8 bits
-
- Here k is a 32-bit integer and T2[] is an integer array
- containing correction terms. Now magically the floating
- value of y (y's leading 32-bit word is y0, the value of
- its trailing word y1 is set to zero) approximates 1/sqrt(x)
- to almost 7.8-bit.
-
- Value of T2:
- static int T2[64]= {
- 0x1500, 0x2ef8, 0x4d67, 0x6b02, 0x87be, 0xa395, 0xbe7a, 0xd866,
- 0xf14a, 0x1091b,0x11fcd,0x13552,0x14999,0x15c98,0x16e34,0x17e5f,
- 0x18d03,0x19a01,0x1a545,0x1ae8a,0x1b5c4,0x1bb01,0x1bfde,0x1c28d,
- 0x1c2de,0x1c0db,0x1ba73,0x1b11c,0x1a4b5,0x1953d,0x18266,0x16be0,
- 0x1683e,0x179d8,0x18a4d,0x19992,0x1a789,0x1b445,0x1bf61,0x1c989,
- 0x1d16d,0x1d77b,0x1dddf,0x1e2ad,0x1e5bf,0x1e6e8,0x1e654,0x1e3cd,
- 0x1df2a,0x1d635,0x1cb16,0x1be2c,0x1ae4e,0x19bde,0x1868e,0x16e2e,
- 0x1527f,0x1334a,0x11051,0xe951, 0xbe01, 0x8e0d, 0x5924, 0x1edd,};
-
- (2) Iterative refinement
-
- Apply Reciproot iteration three times to y and multiply the
- result by x to get an approximation z that matches sqrt(x)
- to about 1 ulp. To be exact, we will have
- -1ulp < sqrt(x)-z<1.0625ulp.
-
- ... set rounding mode to Round-to-nearest
- y := y*(1.5-0.5*x*y*y) ... almost 15 sig. bits to 1/sqrt(x)
- y := y*((1.5-2^-30)+0.5*x*y*y)... about 29 sig. bits to 1/sqrt(x)
- ... special arrangement for better accuracy
- z := x*y ... 29 bits to sqrt(x), with z*y<1
- z := z + 0.5*z*(1-z*y) ... about 1 ulp to sqrt(x)
-
- Remark 2. The constant 1.5-2^-30 is chosen to bias the error so that
- (a) the term z*y in the final iteration is always less than 1;
- (b) the error in the final result is biased upward so that
- -1 ulp < sqrt(x) - z < 1.0625 ulp
- instead of |sqrt(x)-z|<1.03125ulp.
-
- (3) Final adjustment
-
- By twiddling y's last bit it is possible to force y to be
- correctly rounded according to the prevailing rounding mode
- as follows. Let r and i be copies of the rounding mode and
- inexact flag before entering the square root program. Also we
- use the expression y+-ulp for the next representable floating
- numbers (up and down) of y. Note that y+-ulp = either fixed
- point y+-1, or multiply y by nextafter(1,+-inf) in chopped
- mode.
-
- R := RZ; ... set rounding mode to round-toward-zero
- switch(r) {
- case RN: ... round-to-nearest
- if(x<= z*(z-ulp)...chopped) z = z - ulp; else
- if(x<= z*(z+ulp)...chopped) z = z; else z = z+ulp;
- break;
- case RZ:case RM: ... round-to-zero or round-to--inf
- R:=RP; ... reset rounding mod to round-to-+inf
- if(x<z*z ... rounded up) z = z - ulp; else
- if(x>=(z+ulp)*(z+ulp) ...rounded up) z = z+ulp;
- break;
- case RP: ... round-to-+inf
- if(x>(z+ulp)*(z+ulp)...chopped) z = z+2*ulp; else
- if(x>z*z ...chopped) z = z+ulp;
- break;
- }
-
- Remark 3. The above comparisons can be done in fixed point. For
- example, to compare x and w=z*z chopped, it suffices to compare
- x1 and w1 (the trailing parts of x and w), regarding them as
- two's complement integers.
-
- ...Is z an exact square root?
- To determine whether z is an exact square root of x, let z1 be the
- trailing part of z, and also let x0 and x1 be the leading and
- trailing parts of x.
-
- If ((z1&0x03ffffff)!=0) ... not exact if trailing 26 bits of z!=0
- I := 1; ... Raise Inexact flag: z is not exact
- else {
- j := 1 - [(x0>>20)&1] ... j = logb(x) mod 2
- k := z1 >> 26; ... get z's 25-th and 26-th
- fraction bits
- I := i or (k&j) or ((k&(j+j+1))!=(x1&3));
- }
- R:= r ... restore rounded mode
- return sqrt(x):=z.
-
- If multiplication is cheaper then the foregoing red tape, the
- Inexact flag can be evaluated by
-
- I := i;
- I := (z*z!=x) or I.
-
- Note that z*z can overwrite I; this value must be sensed if it is
- True.
-
- Remark 4. If z*z = x exactly, then bit 25 to bit 0 of z1 must be
- zero.
-
- --------------------
- z1: | f2 |
- --------------------
- bit 31 bit 0
-
- Further more, bit 27 and 26 of z1, bit 0 and 1 of x1, and the odd
- or even of logb(x) have the following relations:
-
- -------------------------------------------------
- bit 27,26 of z1 bit 1,0 of x1 logb(x)
- -------------------------------------------------
- 00 00 odd and even
- 01 01 even
- 10 10 odd
- 10 00 even
- 11 01 even
- -------------------------------------------------
-
- (4) Special cases (see (4) of Section A).
-
- */
-
diff --git a/lib/msun/src/e_sqrtf.c b/lib/msun/src/e_sqrtf.c
deleted file mode 100644
index d7748e2..0000000
--- a/lib/msun/src/e_sqrtf.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* e_sqrtf.c -- float version of e_sqrt.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float one = 1.0, tiny=1.0e-30;
-#else
-static float one = 1.0, tiny=1.0e-30;
-#endif
-
-#ifdef __STDC__
- float __ieee754_sqrtf(float x)
-#else
- float __ieee754_sqrtf(x)
- float x;
-#endif
-{
- float z;
- int32_t sign = (int)0x80000000;
- int32_t ix,s,q,m,t,i;
- u_int32_t r;
-
- GET_FLOAT_WORD(ix,x);
-
- /* take care of Inf and NaN */
- if((ix&0x7f800000)==0x7f800000) {
- return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
- sqrt(-inf)=sNaN */
- }
- /* take care of zero */
- if(ix<=0) {
- if((ix&(~sign))==0) return x;/* sqrt(+-0) = +-0 */
- else if(ix<0)
- return (x-x)/(x-x); /* sqrt(-ve) = sNaN */
- }
- /* normalize x */
- m = (ix>>23);
- if(m==0) { /* subnormal x */
- for(i=0;(ix&0x00800000)==0;i++) ix<<=1;
- m -= i-1;
- }
- m -= 127; /* unbias exponent */
- ix = (ix&0x007fffff)|0x00800000;
- if(m&1) /* odd m, double x to make it even */
- ix += ix;
- m >>= 1; /* m = [m/2] */
-
- /* generate sqrt(x) bit by bit */
- ix += ix;
- q = s = 0; /* q = sqrt(x) */
- r = 0x01000000; /* r = moving bit from right to left */
-
- while(r!=0) {
- t = s+r;
- if(t<=ix) {
- s = t+r;
- ix -= t;
- q += r;
- }
- ix += ix;
- r>>=1;
- }
-
- /* use floating add to find out rounding direction */
- if(ix!=0) {
- z = one-tiny; /* trigger inexact flag */
- if (z>=one) {
- z = one+tiny;
- if (z>one)
- q += 2;
- else
- q += (q&1);
- }
- }
- ix = (q>>1)+0x3f000000;
- ix += (m <<23);
- SET_FLOAT_WORD(z,ix);
- return z;
-}
diff --git a/lib/msun/src/get_hw_float.c b/lib/msun/src/get_hw_float.c
deleted file mode 100644
index fea5c89..0000000
--- a/lib/msun/src/get_hw_float.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * Copyright (c) 1997 Bruce D. Evans
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $Id$
- */
-
-#include <sys/types.h>
-#include <sys/sysctl.h>
-
-int __get_hw_float __P((void));
-
-static int hw_float = -1;
-
-int
-__get_hw_float()
-{
- size_t len;
- int mib[2];
-
- if (hw_float == -1) {
- len = sizeof(hw_float);
- mib[0] = CTL_HW;
- mib[1] = HW_FLOATINGPT;
- if (__sysctl(mib, 2, &hw_float, &len, (void *)0, 0) == -1)
- hw_float = 0; /* shouldn't happen; assume the worst */
- }
- return (hw_float);
-}
diff --git a/lib/msun/src/k_cos.c b/lib/msun/src/k_cos.c
deleted file mode 100644
index f2ba373..0000000
--- a/lib/msun/src/k_cos.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/* @(#)k_cos.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * __kernel_cos( x, y )
- * kernel cos function on [-pi/4, pi/4], pi/4 ~ 0.785398164
- * Input x is assumed to be bounded by ~pi/4 in magnitude.
- * Input y is the tail of x.
- *
- * Algorithm
- * 1. Since cos(-x) = cos(x), we need only to consider positive x.
- * 2. if x < 2^-27 (hx<0x3e400000 0), return 1 with inexact if x!=0.
- * 3. cos(x) is approximated by a polynomial of degree 14 on
- * [0,pi/4]
- * 4 14
- * cos(x) ~ 1 - x*x/2 + C1*x + ... + C6*x
- * where the remez error is
- *
- * | 2 4 6 8 10 12 14 | -58
- * |cos(x)-(1-.5*x +C1*x +C2*x +C3*x +C4*x +C5*x +C6*x )| <= 2
- * | |
- *
- * 4 6 8 10 12 14
- * 4. let r = C1*x +C2*x +C3*x +C4*x +C5*x +C6*x , then
- * cos(x) = 1 - x*x/2 + r
- * since cos(x+y) ~ cos(x) - sin(x)*y
- * ~ cos(x) - x*y,
- * a correction term is necessary in cos(x) and hence
- * cos(x+y) = 1 - (x*x/2 - (r - x*y))
- * For better accuracy when x > 0.3, let qx = |x|/4 with
- * the last 32 bits mask off, and if x > 0.78125, let qx = 0.28125.
- * Then
- * cos(x+y) = (1-qx) - ((x*x/2-qx) - (r-x*y)).
- * Note that 1-qx and (x*x/2-qx) is EXACT here, and the
- * magnitude of the latter is at least a quarter of x*x/2,
- * thus, reducing the rounding error in the subtraction.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
-C1 = 4.16666666666666019037e-02, /* 0x3FA55555, 0x5555554C */
-C2 = -1.38888888888741095749e-03, /* 0xBF56C16C, 0x16C15177 */
-C3 = 2.48015872894767294178e-05, /* 0x3EFA01A0, 0x19CB1590 */
-C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */
-C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
-C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
-
-#ifdef __STDC__
- double __kernel_cos(double x, double y)
-#else
- double __kernel_cos(x, y)
- double x,y;
-#endif
-{
- double a,hz,z,r,qx;
- int32_t ix;
- GET_HIGH_WORD(ix,x);
- ix &= 0x7fffffff; /* ix = |x|'s high word*/
- if(ix<0x3e400000) { /* if x < 2**27 */
- if(((int)x)==0) return one; /* generate inexact */
- }
- z = x*x;
- r = z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*C6)))));
- if(ix < 0x3FD33333) /* if |x| < 0.3 */
- return one - (0.5*z - (z*r - x*y));
- else {
- if(ix > 0x3fe90000) { /* x > 0.78125 */
- qx = 0.28125;
- } else {
- INSERT_WORDS(qx,ix-0x00200000,0); /* x/4 */
- }
- hz = 0.5*z-qx;
- a = one-qx;
- return a - (hz - (z*r-x*y));
- }
-}
diff --git a/lib/msun/src/k_cosf.c b/lib/msun/src/k_cosf.c
deleted file mode 100644
index 65f3192..0000000
--- a/lib/msun/src/k_cosf.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* k_cosf.c -- float version of k_cos.c
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-one = 1.0000000000e+00, /* 0x3f800000 */
-C1 = 4.1666667908e-02, /* 0x3d2aaaab */
-C2 = -1.3888889225e-03, /* 0xbab60b61 */
-C3 = 2.4801587642e-05, /* 0x37d00d01 */
-C4 = -2.7557314297e-07, /* 0xb493f27c */
-C5 = 2.0875723372e-09, /* 0x310f74f6 */
-C6 = -1.1359647598e-11; /* 0xad47d74e */
-
-#ifdef __STDC__
- float __kernel_cosf(float x, float y)
-#else
- float __kernel_cosf(x, y)
- float x,y;
-#endif
-{
- float a,hz,z,r,qx;
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff; /* ix = |x|'s high word*/
- if(ix<0x32000000) { /* if x < 2**27 */
- if(((int)x)==0) return one; /* generate inexact */
- }
- z = x*x;
- r = z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*C6)))));
- if(ix < 0x3e99999a) /* if |x| < 0.3 */
- return one - ((float)0.5*z - (z*r - x*y));
- else {
- if(ix > 0x3f480000) { /* x > 0.78125 */
- qx = (float)0.28125;
- } else {
- SET_FLOAT_WORD(qx,ix-0x01000000); /* x/4 */
- }
- hz = (float)0.5*z-qx;
- a = one-qx;
- return a - (hz - (z*r-x*y));
- }
-}
diff --git a/lib/msun/src/k_rem_pio2.c b/lib/msun/src/k_rem_pio2.c
deleted file mode 100644
index 6e46a95..0000000
--- a/lib/msun/src/k_rem_pio2.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/* @(#)k_rem_pio2.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
- * double x[],y[]; int e0,nx,prec; int ipio2[];
- *
- * __kernel_rem_pio2 return the last three digits of N with
- * y = x - N*pi/2
- * so that |y| < pi/2.
- *
- * The method is to compute the integer (mod 8) and fraction parts of
- * (2/pi)*x without doing the full multiplication. In general we
- * skip the part of the product that are known to be a huge integer (
- * more accurately, = 0 mod 8 ). Thus the number of operations are
- * independent of the exponent of the input.
- *
- * (2/pi) is represented by an array of 24-bit integers in ipio2[].
- *
- * Input parameters:
- * x[] The input value (must be positive) is broken into nx
- * pieces of 24-bit integers in double precision format.
- * x[i] will be the i-th 24 bit of x. The scaled exponent
- * of x[0] is given in input parameter e0 (i.e., x[0]*2^e0
- * match x's up to 24 bits.
- *
- * Example of breaking a double positive z into x[0]+x[1]+x[2]:
- * e0 = ilogb(z)-23
- * z = scalbn(z,-e0)
- * for i = 0,1,2
- * x[i] = floor(z)
- * z = (z-x[i])*2**24
- *
- *
- * y[] ouput result in an array of double precision numbers.
- * The dimension of y[] is:
- * 24-bit precision 1
- * 53-bit precision 2
- * 64-bit precision 2
- * 113-bit precision 3
- * The actual value is the sum of them. Thus for 113-bit
- * precison, one may have to do something like:
- *
- * long double t,w,r_head, r_tail;
- * t = (long double)y[2] + (long double)y[1];
- * w = (long double)y[0];
- * r_head = t+w;
- * r_tail = w - (r_head - t);
- *
- * e0 The exponent of x[0]
- *
- * nx dimension of x[]
- *
- * prec an integer indicating the precision:
- * 0 24 bits (single)
- * 1 53 bits (double)
- * 2 64 bits (extended)
- * 3 113 bits (quad)
- *
- * ipio2[]
- * integer array, contains the (24*i)-th to (24*i+23)-th
- * bit of 2/pi after binary point. The corresponding
- * floating value is
- *
- * ipio2[i] * 2^(-24(i+1)).
- *
- * External function:
- * double scalbn(), floor();
- *
- *
- * Here is the description of some local variables:
- *
- * jk jk+1 is the initial number of terms of ipio2[] needed
- * in the computation. The recommended value is 2,3,4,
- * 6 for single, double, extended,and quad.
- *
- * jz local integer variable indicating the number of
- * terms of ipio2[] used.
- *
- * jx nx - 1
- *
- * jv index for pointing to the suitable ipio2[] for the
- * computation. In general, we want
- * ( 2^e0*x[0] * ipio2[jv-1]*2^(-24jv) )/8
- * is an integer. Thus
- * e0-3-24*jv >= 0 or (e0-3)/24 >= jv
- * Hence jv = max(0,(e0-3)/24).
- *
- * jp jp+1 is the number of terms in PIo2[] needed, jp = jk.
- *
- * q[] double array with integral value, representing the
- * 24-bits chunk of the product of x and 2/pi.
- *
- * q0 the corresponding exponent of q[0]. Note that the
- * exponent for q[i] would be q0-24*i.
- *
- * PIo2[] double precision array, obtained by cutting pi/2
- * into 24 bits chunks.
- *
- * f[] ipio2[] in floating point
- *
- * iq[] integer array by breaking up q[] in 24-bits chunk.
- *
- * fq[] final product of x*(2/pi) in fq[0],..,fq[jk]
- *
- * ih integer. If >0 it indicates q[] is >= 0.5, hence
- * it also indicates the *sign* of the result.
- *
- */
-
-
-/*
- * Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
- * to produce the hexadecimal values shown.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const int init_jk[] = {2,3,4,6}; /* initial value for jk */
-#else
-static int init_jk[] = {2,3,4,6};
-#endif
-
-#ifdef __STDC__
-static const double PIo2[] = {
-#else
-static double PIo2[] = {
-#endif
- 1.57079625129699707031e+00, /* 0x3FF921FB, 0x40000000 */
- 7.54978941586159635335e-08, /* 0x3E74442D, 0x00000000 */
- 5.39030252995776476554e-15, /* 0x3CF84698, 0x80000000 */
- 3.28200341580791294123e-22, /* 0x3B78CC51, 0x60000000 */
- 1.27065575308067607349e-29, /* 0x39F01B83, 0x80000000 */
- 1.22933308981111328932e-36, /* 0x387A2520, 0x40000000 */
- 2.73370053816464559624e-44, /* 0x36E38222, 0x80000000 */
- 2.16741683877804819444e-51, /* 0x3569F31D, 0x00000000 */
-};
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-zero = 0.0,
-one = 1.0,
-two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
-twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
-
-#ifdef __STDC__
- int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
-#else
- int __kernel_rem_pio2(x,y,e0,nx,prec,ipio2)
- double x[], y[]; int e0,nx,prec; int32_t ipio2[];
-#endif
-{
- int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
- double z,fw,f[20],fq[20],q[20];
-
- /* initialize jk*/
- jk = init_jk[prec];
- jp = jk;
-
- /* determine jx,jv,q0, note that 3>q0 */
- jx = nx-1;
- jv = (e0-3)/24; if(jv<0) jv=0;
- q0 = e0-24*(jv+1);
-
- /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */
- j = jv-jx; m = jx+jk;
- for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (double) ipio2[j];
-
- /* compute q[0],q[1],...q[jk] */
- for (i=0;i<=jk;i++) {
- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
- }
-
- jz = jk;
-recompute:
- /* distill q[] into iq[] reversingly */
- for(i=0,j=jz,z=q[jz];j>0;i++,j--) {
- fw = (double)((int32_t)(twon24* z));
- iq[i] = (int32_t)(z-two24*fw);
- z = q[j-1]+fw;
- }
-
- /* compute n */
- z = scalbn(z,q0); /* actual value of z */
- z -= 8.0*floor(z*0.125); /* trim off integer >= 8 */
- n = (int32_t) z;
- z -= (double)n;
- ih = 0;
- if(q0>0) { /* need iq[jz-1] to determine n */
- i = (iq[jz-1]>>(24-q0)); n += i;
- iq[jz-1] -= i<<(24-q0);
- ih = iq[jz-1]>>(23-q0);
- }
- else if(q0==0) ih = iq[jz-1]>>23;
- else if(z>=0.5) ih=2;
-
- if(ih>0) { /* q > 0.5 */
- n += 1; carry = 0;
- for(i=0;i<jz ;i++) { /* compute 1-q */
- j = iq[i];
- if(carry==0) {
- if(j!=0) {
- carry = 1; iq[i] = 0x1000000- j;
- }
- } else iq[i] = 0xffffff - j;
- }
- if(q0>0) { /* rare case: chance is 1 in 12 */
- switch(q0) {
- case 1:
- iq[jz-1] &= 0x7fffff; break;
- case 2:
- iq[jz-1] &= 0x3fffff; break;
- }
- }
- if(ih==2) {
- z = one - z;
- if(carry!=0) z -= scalbn(one,q0);
- }
- }
-
- /* check if recomputation is needed */
- if(z==zero) {
- j = 0;
- for (i=jz-1;i>=jk;i--) j |= iq[i];
- if(j==0) { /* need recomputation */
- for(k=1;iq[jk-k]==0;k++); /* k = no. of terms needed */
-
- for(i=jz+1;i<=jz+k;i++) { /* add q[jz+1] to q[jz+k] */
- f[jx+i] = (double) ipio2[jv+i];
- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
- q[i] = fw;
- }
- jz += k;
- goto recompute;
- }
- }
-
- /* chop off zero terms */
- if(z==0.0) {
- jz -= 1; q0 -= 24;
- while(iq[jz]==0) { jz--; q0-=24;}
- } else { /* break z into 24-bit if necessary */
- z = scalbn(z,-q0);
- if(z>=two24) {
- fw = (double)((int32_t)(twon24*z));
- iq[jz] = (int32_t)(z-two24*fw);
- jz += 1; q0 += 24;
- iq[jz] = (int32_t) fw;
- } else iq[jz] = (int32_t) z ;
- }
-
- /* convert integer "bit" chunk to floating-point value */
- fw = scalbn(one,q0);
- for(i=jz;i>=0;i--) {
- q[i] = fw*(double)iq[i]; fw*=twon24;
- }
-
- /* compute PIo2[0,...,jp]*q[jz,...,0] */
- for(i=jz;i>=0;i--) {
- for(fw=0.0,k=0;k<=jp&&k<=jz-i;k++) fw += PIo2[k]*q[i+k];
- fq[jz-i] = fw;
- }
-
- /* compress fq[] into y[] */
- switch(prec) {
- case 0:
- fw = 0.0;
- for (i=jz;i>=0;i--) fw += fq[i];
- y[0] = (ih==0)? fw: -fw;
- break;
- case 1:
- case 2:
- fw = 0.0;
- for (i=jz;i>=0;i--) fw += fq[i];
- y[0] = (ih==0)? fw: -fw;
- fw = fq[0]-fw;
- for (i=1;i<=jz;i++) fw += fq[i];
- y[1] = (ih==0)? fw: -fw;
- break;
- case 3: /* painful */
- for (i=jz;i>0;i--) {
- fw = fq[i-1]+fq[i];
- fq[i] += fq[i-1]-fw;
- fq[i-1] = fw;
- }
- for (i=jz;i>1;i--) {
- fw = fq[i-1]+fq[i];
- fq[i] += fq[i-1]-fw;
- fq[i-1] = fw;
- }
- for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
- if(ih==0) {
- y[0] = fq[0]; y[1] = fq[1]; y[2] = fw;
- } else {
- y[0] = -fq[0]; y[1] = -fq[1]; y[2] = -fw;
- }
- }
- return n&7;
-}
diff --git a/lib/msun/src/k_rem_pio2f.c b/lib/msun/src/k_rem_pio2f.c
deleted file mode 100644
index 1ae7ade..0000000
--- a/lib/msun/src/k_rem_pio2f.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/* k_rem_pio2f.c -- float version of k_rem_pio2.c
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-/* In the float version, the input parameter x contains 8 bit
- integers, not 24 bit integers. 113 bit precision is not supported. */
-
-#ifdef __STDC__
-static const int init_jk[] = {4,7,9}; /* initial value for jk */
-#else
-static int init_jk[] = {4,7,9};
-#endif
-
-#ifdef __STDC__
-static const float PIo2[] = {
-#else
-static float PIo2[] = {
-#endif
- 1.5703125000e+00, /* 0x3fc90000 */
- 4.5776367188e-04, /* 0x39f00000 */
- 2.5987625122e-05, /* 0x37da0000 */
- 7.5437128544e-08, /* 0x33a20000 */
- 6.0026650317e-11, /* 0x2e840000 */
- 7.3896444519e-13, /* 0x2b500000 */
- 5.3845816694e-15, /* 0x27c20000 */
- 5.6378512969e-18, /* 0x22d00000 */
- 8.3009228831e-20, /* 0x1fc40000 */
- 3.2756352257e-22, /* 0x1bc60000 */
- 6.3331015649e-25, /* 0x17440000 */
-};
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-zero = 0.0,
-one = 1.0,
-two8 = 2.5600000000e+02, /* 0x43800000 */
-twon8 = 3.9062500000e-03; /* 0x3b800000 */
-
-#ifdef __STDC__
- int __kernel_rem_pio2f(float *x, float *y, int e0, int nx, int prec, const int32_t *ipio2)
-#else
- int __kernel_rem_pio2f(x,y,e0,nx,prec,ipio2)
- float x[], y[]; int e0,nx,prec; int32_t ipio2[];
-#endif
-{
- int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
- float z,fw,f[20],fq[20],q[20];
-
- /* initialize jk*/
- jk = init_jk[prec];
- jp = jk;
-
- /* determine jx,jv,q0, note that 3>q0 */
- jx = nx-1;
- jv = (e0-3)/8; if(jv<0) jv=0;
- q0 = e0-8*(jv+1);
-
- /* set up f[0] to f[jx+jk] where f[jx+jk] = ipio2[jv+jk] */
- j = jv-jx; m = jx+jk;
- for(i=0;i<=m;i++,j++) f[i] = (j<0)? zero : (float) ipio2[j];
-
- /* compute q[0],q[1],...q[jk] */
- for (i=0;i<=jk;i++) {
- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
- }
-
- jz = jk;
-recompute:
- /* distill q[] into iq[] reversingly */
- for(i=0,j=jz,z=q[jz];j>0;i++,j--) {
- fw = (float)((int32_t)(twon8* z));
- iq[i] = (int32_t)(z-two8*fw);
- z = q[j-1]+fw;
- }
-
- /* compute n */
- z = scalbnf(z,q0); /* actual value of z */
- z -= (float)8.0*floorf(z*(float)0.125); /* trim off integer >= 8 */
- n = (int32_t) z;
- z -= (float)n;
- ih = 0;
- if(q0>0) { /* need iq[jz-1] to determine n */
- i = (iq[jz-1]>>(8-q0)); n += i;
- iq[jz-1] -= i<<(8-q0);
- ih = iq[jz-1]>>(7-q0);
- }
- else if(q0==0) ih = iq[jz-1]>>8;
- else if(z>=(float)0.5) ih=2;
-
- if(ih>0) { /* q > 0.5 */
- n += 1; carry = 0;
- for(i=0;i<jz ;i++) { /* compute 1-q */
- j = iq[i];
- if(carry==0) {
- if(j!=0) {
- carry = 1; iq[i] = 0x100- j;
- }
- } else iq[i] = 0xff - j;
- }
- if(q0>0) { /* rare case: chance is 1 in 12 */
- switch(q0) {
- case 1:
- iq[jz-1] &= 0x7f; break;
- case 2:
- iq[jz-1] &= 0x3f; break;
- }
- }
- if(ih==2) {
- z = one - z;
- if(carry!=0) z -= scalbnf(one,q0);
- }
- }
-
- /* check if recomputation is needed */
- if(z==zero) {
- j = 0;
- for (i=jz-1;i>=jk;i--) j |= iq[i];
- if(j==0) { /* need recomputation */
- for(k=1;iq[jk-k]==0;k++); /* k = no. of terms needed */
-
- for(i=jz+1;i<=jz+k;i++) { /* add q[jz+1] to q[jz+k] */
- f[jx+i] = (float) ipio2[jv+i];
- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j];
- q[i] = fw;
- }
- jz += k;
- goto recompute;
- }
- }
-
- /* chop off zero terms */
- if(z==(float)0.0) {
- jz -= 1; q0 -= 8;
- while(iq[jz]==0) { jz--; q0-=8;}
- } else { /* break z into 8-bit if necessary */
- z = scalbnf(z,-q0);
- if(z>=two8) {
- fw = (float)((int32_t)(twon8*z));
- iq[jz] = (int32_t)(z-two8*fw);
- jz += 1; q0 += 8;
- iq[jz] = (int32_t) fw;
- } else iq[jz] = (int32_t) z ;
- }
-
- /* convert integer "bit" chunk to floating-point value */
- fw = scalbnf(one,q0);
- for(i=jz;i>=0;i--) {
- q[i] = fw*(float)iq[i]; fw*=twon8;
- }
-
- /* compute PIo2[0,...,jp]*q[jz,...,0] */
- for(i=jz;i>=0;i--) {
- for(fw=0.0,k=0;k<=jp&&k<=jz-i;k++) fw += PIo2[k]*q[i+k];
- fq[jz-i] = fw;
- }
-
- /* compress fq[] into y[] */
- switch(prec) {
- case 0:
- fw = 0.0;
- for (i=jz;i>=0;i--) fw += fq[i];
- y[0] = (ih==0)? fw: -fw;
- break;
- case 1:
- case 2:
- fw = 0.0;
- for (i=jz;i>=0;i--) fw += fq[i];
- y[0] = (ih==0)? fw: -fw;
- fw = fq[0]-fw;
- for (i=1;i<=jz;i++) fw += fq[i];
- y[1] = (ih==0)? fw: -fw;
- break;
- case 3: /* painful */
- for (i=jz;i>0;i--) {
- fw = fq[i-1]+fq[i];
- fq[i] += fq[i-1]-fw;
- fq[i-1] = fw;
- }
- for (i=jz;i>1;i--) {
- fw = fq[i-1]+fq[i];
- fq[i] += fq[i-1]-fw;
- fq[i-1] = fw;
- }
- for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
- if(ih==0) {
- y[0] = fq[0]; y[1] = fq[1]; y[2] = fw;
- } else {
- y[0] = -fq[0]; y[1] = -fq[1]; y[2] = -fw;
- }
- }
- return n&7;
-}
diff --git a/lib/msun/src/k_sin.c b/lib/msun/src/k_sin.c
deleted file mode 100644
index b2f05e6..0000000
--- a/lib/msun/src/k_sin.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* @(#)k_sin.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __kernel_sin( x, y, iy)
- * kernel sin function on [-pi/4, pi/4], pi/4 ~ 0.7854
- * Input x is assumed to be bounded by ~pi/4 in magnitude.
- * Input y is the tail of x.
- * Input iy indicates whether y is 0. (if iy=0, y assume to be 0).
- *
- * Algorithm
- * 1. Since sin(-x) = -sin(x), we need only to consider positive x.
- * 2. if x < 2^-27 (hx<0x3e400000 0), return x with inexact if x!=0.
- * 3. sin(x) is approximated by a polynomial of degree 13 on
- * [0,pi/4]
- * 3 13
- * sin(x) ~ x + S1*x + ... + S6*x
- * where
- *
- * |sin(x) 2 4 6 8 10 12 | -58
- * |----- - (1+S1*x +S2*x +S3*x +S4*x +S5*x +S6*x )| <= 2
- * | x |
- *
- * 4. sin(x+y) = sin(x) + sin'(x')*y
- * ~ sin(x) + (1-x*x/2)*y
- * For better accuracy, let
- * 3 2 2 2 2
- * r = x *(S2+x *(S3+x *(S4+x *(S5+x *S6))))
- * then 3 2
- * sin(x) = x + (S1*x + (x *(r-y/2)+y))
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
-S1 = -1.66666666666666324348e-01, /* 0xBFC55555, 0x55555549 */
-S2 = 8.33333333332248946124e-03, /* 0x3F811111, 0x1110F8A6 */
-S3 = -1.98412698298579493134e-04, /* 0xBF2A01A0, 0x19C161D5 */
-S4 = 2.75573137070700676789e-06, /* 0x3EC71DE3, 0x57B1FE7D */
-S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
-S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
-
-#ifdef __STDC__
- double __kernel_sin(double x, double y, int iy)
-#else
- double __kernel_sin(x, y, iy)
- double x,y; int iy; /* iy=0 if y is zero */
-#endif
-{
- double z,r,v;
- int32_t ix;
- GET_HIGH_WORD(ix,x);
- ix &= 0x7fffffff; /* high word of x */
- if(ix<0x3e400000) /* |x| < 2**-27 */
- {if((int)x==0) return x;} /* generate inexact */
- z = x*x;
- v = z*x;
- r = S2+z*(S3+z*(S4+z*(S5+z*S6)));
- if(iy==0) return x+v*(S1+z*r);
- else return x-((z*(half*y-v*r)-y)-v*S1);
-}
diff --git a/lib/msun/src/k_sinf.c b/lib/msun/src/k_sinf.c
deleted file mode 100644
index 9317793..0000000
--- a/lib/msun/src/k_sinf.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* k_sinf.c -- float version of k_sin.c
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-half = 5.0000000000e-01,/* 0x3f000000 */
-S1 = -1.6666667163e-01, /* 0xbe2aaaab */
-S2 = 8.3333337680e-03, /* 0x3c088889 */
-S3 = -1.9841270114e-04, /* 0xb9500d01 */
-S4 = 2.7557314297e-06, /* 0x3638ef1b */
-S5 = -2.5050759689e-08, /* 0xb2d72f34 */
-S6 = 1.5896910177e-10; /* 0x2f2ec9d3 */
-
-#ifdef __STDC__
- float __kernel_sinf(float x, float y, int iy)
-#else
- float __kernel_sinf(x, y, iy)
- float x,y; int iy; /* iy=0 if y is zero */
-#endif
-{
- float z,r,v;
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff; /* high word of x */
- if(ix<0x32000000) /* |x| < 2**-27 */
- {if((int)x==0) return x;} /* generate inexact */
- z = x*x;
- v = z*x;
- r = S2+z*(S3+z*(S4+z*(S5+z*S6)));
- if(iy==0) return x+v*(S1+z*r);
- else return x-((z*(half*y-v*r)-y)-v*S1);
-}
diff --git a/lib/msun/src/k_standard.c b/lib/msun/src/k_standard.c
deleted file mode 100644
index 84ee2a4..0000000
--- a/lib/msun/src/k_standard.c
+++ /dev/null
@@ -1,782 +0,0 @@
-/* @(#)k_standard.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-#include <errno.h>
-
-#ifndef _USE_WRITE
-#include <stdio.h> /* fputs(), stderr */
-#define WRITE2(u,v) fputs(u, stderr)
-#else /* !defined(_USE_WRITE) */
-#include <unistd.h> /* write */
-#define WRITE2(u,v) write(2, u, v)
-#undef fflush
-#endif /* !defined(_USE_WRITE) */
-
-#ifdef __STDC__
-static const double zero = 0.0; /* used as const */
-#else
-static double zero = 0.0; /* used as const */
-#endif
-
-/*
- * Standard conformance (non-IEEE) on exception cases.
- * Mapping:
- * 1 -- acos(|x|>1)
- * 2 -- asin(|x|>1)
- * 3 -- atan2(+-0,+-0)
- * 4 -- hypot overflow
- * 5 -- cosh overflow
- * 6 -- exp overflow
- * 7 -- exp underflow
- * 8 -- y0(0)
- * 9 -- y0(-ve)
- * 10-- y1(0)
- * 11-- y1(-ve)
- * 12-- yn(0)
- * 13-- yn(-ve)
- * 14-- lgamma(finite) overflow
- * 15-- lgamma(-integer)
- * 16-- log(0)
- * 17-- log(x<0)
- * 18-- log10(0)
- * 19-- log10(x<0)
- * 20-- pow(0.0,0.0)
- * 21-- pow(x,y) overflow
- * 22-- pow(x,y) underflow
- * 23-- pow(0,negative)
- * 24-- pow(neg,non-integral)
- * 25-- sinh(finite) overflow
- * 26-- sqrt(negative)
- * 27-- fmod(x,0)
- * 28-- remainder(x,0)
- * 29-- acosh(x<1)
- * 30-- atanh(|x|>1)
- * 31-- atanh(|x|=1)
- * 32-- scalb overflow
- * 33-- scalb underflow
- * 34-- j0(|x|>X_TLOSS)
- * 35-- y0(x>X_TLOSS)
- * 36-- j1(|x|>X_TLOSS)
- * 37-- y1(x>X_TLOSS)
- * 38-- jn(|x|>X_TLOSS, n)
- * 39-- yn(x>X_TLOSS, n)
- * 40-- gamma(finite) overflow
- * 41-- gamma(-integer)
- * 42-- pow(NaN,0.0)
- */
-
-
-#ifdef __STDC__
- double __kernel_standard(double x, double y, int type)
-#else
- double __kernel_standard(x,y,type)
- double x,y; int type;
-#endif
-{
- struct exception exc;
-#ifndef HUGE_VAL /* this is the only routine that uses HUGE_VAL */
-#define HUGE_VAL inf
- double inf = 0.0;
-
- SET_HIGH_WORD(inf,0x7ff00000); /* set inf to infinite */
-#endif
-
-#ifdef _USE_WRITE
- (void) fflush(stdout);
-#endif
- exc.arg1 = x;
- exc.arg2 = y;
- switch(type) {
- case 1:
- case 101:
- /* acos(|x|>1) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "acos" : "acosf";
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if(_LIB_VERSION == _SVID_) {
- (void) WRITE2("acos: DOMAIN error\n", 19);
- }
- errno = EDOM;
- }
- break;
- case 2:
- case 102:
- /* asin(|x|>1) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "asin" : "asinf";
- exc.retval = zero;
- if(_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if(_LIB_VERSION == _SVID_) {
- (void) WRITE2("asin: DOMAIN error\n", 19);
- }
- errno = EDOM;
- }
- break;
- case 3:
- case 103:
- /* atan2(+-0,+-0) */
- exc.arg1 = y;
- exc.arg2 = x;
- exc.type = DOMAIN;
- exc.name = type < 100 ? "atan2" : "atan2f";
- exc.retval = zero;
- if(_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if(_LIB_VERSION == _SVID_) {
- (void) WRITE2("atan2: DOMAIN error\n", 20);
- }
- errno = EDOM;
- }
- break;
- case 4:
- case 104:
- /* hypot(finite,finite) overflow */
- exc.type = OVERFLOW;
- exc.name = type < 100 ? "hypot" : "hypotf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = HUGE;
- else
- exc.retval = HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 5:
- case 105:
- /* cosh(finite) overflow */
- exc.type = OVERFLOW;
- exc.name = type < 100 ? "cosh" : "coshf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = HUGE;
- else
- exc.retval = HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 6:
- case 106:
- /* exp(finite) overflow */
- exc.type = OVERFLOW;
- exc.name = type < 100 ? "exp" : "expf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = HUGE;
- else
- exc.retval = HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 7:
- case 107:
- /* exp(finite) underflow */
- exc.type = UNDERFLOW;
- exc.name = type < 100 ? "exp" : "expf";
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 8:
- case 108:
- /* y0(0) = -inf */
- exc.type = DOMAIN; /* should be SING for IEEE */
- exc.name = type < 100 ? "y0" : "y0f";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("y0: DOMAIN error\n", 17);
- }
- errno = EDOM;
- }
- break;
- case 9:
- case 109:
- /* y0(x<0) = NaN */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "y0" : "y0f";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("y0: DOMAIN error\n", 17);
- }
- errno = EDOM;
- }
- break;
- case 10:
- case 110:
- /* y1(0) = -inf */
- exc.type = DOMAIN; /* should be SING for IEEE */
- exc.name = type < 100 ? "y1" : "y1f";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("y1: DOMAIN error\n", 17);
- }
- errno = EDOM;
- }
- break;
- case 11:
- case 111:
- /* y1(x<0) = NaN */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "y1" : "y1f";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("y1: DOMAIN error\n", 17);
- }
- errno = EDOM;
- }
- break;
- case 12:
- case 112:
- /* yn(n,0) = -inf */
- exc.type = DOMAIN; /* should be SING for IEEE */
- exc.name = type < 100 ? "yn" : "ynf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("yn: DOMAIN error\n", 17);
- }
- errno = EDOM;
- }
- break;
- case 13:
- case 113:
- /* yn(x<0) = NaN */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "yn" : "ynf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("yn: DOMAIN error\n", 17);
- }
- errno = EDOM;
- }
- break;
- case 14:
- case 114:
- /* lgamma(finite) overflow */
- exc.type = OVERFLOW;
- exc.name = type < 100 ? "lgamma" : "lgammaf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = HUGE;
- else
- exc.retval = HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 15:
- case 115:
- /* lgamma(-integer) or lgamma(0) */
- exc.type = SING;
- exc.name = type < 100 ? "lgamma" : "lgammaf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = HUGE;
- else
- exc.retval = HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("lgamma: SING error\n", 19);
- }
- errno = EDOM;
- }
- break;
- case 16:
- case 116:
- /* log(0) */
- exc.type = SING;
- exc.name = type < 100 ? "log" : "logf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("log: SING error\n", 16);
- }
- errno = EDOM;
- }
- break;
- case 17:
- case 117:
- /* log(x<0) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "log" : "logf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("log: DOMAIN error\n", 18);
- }
- errno = EDOM;
- }
- break;
- case 18:
- case 118:
- /* log10(0) */
- exc.type = SING;
- exc.name = type < 100 ? "log10" : "log10f";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("log10: SING error\n", 18);
- }
- errno = EDOM;
- }
- break;
- case 19:
- case 119:
- /* log10(x<0) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "log10" : "log10f";
- if (_LIB_VERSION == _SVID_)
- exc.retval = -HUGE;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("log10: DOMAIN error\n", 20);
- }
- errno = EDOM;
- }
- break;
- case 20:
- case 120:
- /* pow(0.0,0.0) */
- /* error only if _LIB_VERSION == _SVID_ */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "pow" : "powf";
- exc.retval = zero;
- if (_LIB_VERSION != _SVID_) exc.retval = 1.0;
- else if (!matherr(&exc)) {
- (void) WRITE2("pow(0,0): DOMAIN error\n", 23);
- errno = EDOM;
- }
- break;
- case 21:
- case 121:
- /* pow(x,y) overflow */
- exc.type = OVERFLOW;
- exc.name = type < 100 ? "pow" : "powf";
- if (_LIB_VERSION == _SVID_) {
- exc.retval = HUGE;
- y *= 0.5;
- if(x<zero&&rint(y)!=y) exc.retval = -HUGE;
- } else {
- exc.retval = HUGE_VAL;
- y *= 0.5;
- if(x<zero&&rint(y)!=y) exc.retval = -HUGE_VAL;
- }
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 22:
- case 122:
- /* pow(x,y) underflow */
- exc.type = UNDERFLOW;
- exc.name = type < 100 ? "pow" : "powf";
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 23:
- case 123:
- /* 0**neg */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "pow" : "powf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = zero;
- else
- exc.retval = -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("pow(0,neg): DOMAIN error\n", 25);
- }
- errno = EDOM;
- }
- break;
- case 24:
- case 124:
- /* neg**non-integral */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "pow" : "powf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = zero;
- else
- exc.retval = zero/zero; /* X/Open allow NaN */
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("neg**non-integral: DOMAIN error\n", 32);
- }
- errno = EDOM;
- }
- break;
- case 25:
- case 125:
- /* sinh(finite) overflow */
- exc.type = OVERFLOW;
- exc.name = type < 100 ? "sinh" : "sinhf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = ( (x>zero) ? HUGE : -HUGE);
- else
- exc.retval = ( (x>zero) ? HUGE_VAL : -HUGE_VAL);
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 26:
- case 126:
- /* sqrt(x<0) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "sqrt" : "sqrtf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = zero;
- else
- exc.retval = zero/zero;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("sqrt: DOMAIN error\n", 19);
- }
- errno = EDOM;
- }
- break;
- case 27:
- case 127:
- /* fmod(x,0) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "fmod" : "fmodf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = x;
- else
- exc.retval = zero/zero;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("fmod: DOMAIN error\n", 20);
- }
- errno = EDOM;
- }
- break;
- case 28:
- case 128:
- /* remainder(x,0) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "remainder" : "remainderf";
- exc.retval = zero/zero;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("remainder: DOMAIN error\n", 24);
- }
- errno = EDOM;
- }
- break;
- case 29:
- case 129:
- /* acosh(x<1) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "acosh" : "acoshf";
- exc.retval = zero/zero;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("acosh: DOMAIN error\n", 20);
- }
- errno = EDOM;
- }
- break;
- case 30:
- case 130:
- /* atanh(|x|>1) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "atanh" : "atanhf";
- exc.retval = zero/zero;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("atanh: DOMAIN error\n", 20);
- }
- errno = EDOM;
- }
- break;
- case 31:
- case 131:
- /* atanh(|x|=1) */
- exc.type = SING;
- exc.name = type < 100 ? "atanh" : "atanhf";
- exc.retval = x/zero; /* sign(x)*inf */
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("atanh: SING error\n", 18);
- }
- errno = EDOM;
- }
- break;
- case 32:
- case 132:
- /* scalb overflow; SVID also returns +-HUGE_VAL */
- exc.type = OVERFLOW;
- exc.name = type < 100 ? "scalb" : "scalbf";
- exc.retval = x > zero ? HUGE_VAL : -HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 33:
- case 133:
- /* scalb underflow */
- exc.type = UNDERFLOW;
- exc.name = type < 100 ? "scalb" : "scalbf";
- exc.retval = copysign(zero,x);
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 34:
- case 134:
- /* j0(|x|>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "j0" : "j0f";
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- errno = ERANGE;
- }
- break;
- case 35:
- case 135:
- /* y0(x>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "y0" : "y0f";
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- errno = ERANGE;
- }
- break;
- case 36:
- case 136:
- /* j1(|x|>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "j1" : "j1f";
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- errno = ERANGE;
- }
- break;
- case 37:
- case 137:
- /* y1(x>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "y1" : "y1f";
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- errno = ERANGE;
- }
- break;
- case 38:
- case 138:
- /* jn(|x|>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "jn" : "jnf";
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- errno = ERANGE;
- }
- break;
- case 39:
- case 139:
- /* yn(x>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "yn" : "ynf";
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- errno = ERANGE;
- }
- break;
- case 40:
- case 140:
- /* gamma(finite) overflow */
- exc.type = OVERFLOW;
- exc.name = type < 100 ? "gamma" : "gammaf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = HUGE;
- else
- exc.retval = HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = ERANGE;
- else if (!matherr(&exc)) {
- errno = ERANGE;
- }
- break;
- case 41:
- case 141:
- /* gamma(-integer) or gamma(0) */
- exc.type = SING;
- exc.name = type < 100 ? "gamma" : "gammaf";
- if (_LIB_VERSION == _SVID_)
- exc.retval = HUGE;
- else
- exc.retval = HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
- errno = EDOM;
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("gamma: SING error\n", 18);
- }
- errno = EDOM;
- }
- break;
- case 42:
- case 142:
- /* pow(NaN,0.0) */
- /* error only if _LIB_VERSION == _SVID_ & _XOPEN_ */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "pow" : "powf";
- exc.retval = x;
- if (_LIB_VERSION == _IEEE_ ||
- _LIB_VERSION == _POSIX_) exc.retval = 1.0;
- else if (!matherr(&exc)) {
- errno = EDOM;
- }
- break;
- }
- return exc.retval;
-}
diff --git a/lib/msun/src/k_tan.c b/lib/msun/src/k_tan.c
deleted file mode 100644
index 00ea9a4..0000000
--- a/lib/msun/src/k_tan.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* @(#)k_tan.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* __kernel_tan( x, y, k )
- * kernel tan function on [-pi/4, pi/4], pi/4 ~ 0.7854
- * Input x is assumed to be bounded by ~pi/4 in magnitude.
- * Input y is the tail of x.
- * Input k indicates whether tan (if k=1) or
- * -1/tan (if k= -1) is returned.
- *
- * Algorithm
- * 1. Since tan(-x) = -tan(x), we need only to consider positive x.
- * 2. if x < 2^-28 (hx<0x3e300000 0), return x with inexact if x!=0.
- * 3. tan(x) is approximated by a odd polynomial of degree 27 on
- * [0,0.67434]
- * 3 27
- * tan(x) ~ x + T1*x + ... + T13*x
- * where
- *
- * |tan(x) 2 4 26 | -59.2
- * |----- - (1+T1*x +T2*x +.... +T13*x )| <= 2
- * | x |
- *
- * Note: tan(x+y) = tan(x) + tan'(x)*y
- * ~ tan(x) + (1+x*x)*y
- * Therefore, for better accuracy in computing tan(x+y), let
- * 3 2 2 2 2
- * r = x *(T2+x *(T3+x *(...+x *(T12+x *T13))))
- * then
- * 3 2
- * tan(x+y) = x + (T1*x + (x *(r+y)+y))
- *
- * 4. For x in [0.67434,pi/4], let y = pi/4 - x, then
- * tan(x) = tan(pi/4-y) = (1-tan(y))/(1+tan(y))
- * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y)))
- */
-
-#include "math.h"
-#include "math_private.h"
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
-pio4 = 7.85398163397448278999e-01, /* 0x3FE921FB, 0x54442D18 */
-pio4lo= 3.06161699786838301793e-17, /* 0x3C81A626, 0x33145C07 */
-T[] = {
- 3.33333333333334091986e-01, /* 0x3FD55555, 0x55555563 */
- 1.33333333333201242699e-01, /* 0x3FC11111, 0x1110FE7A */
- 5.39682539762260521377e-02, /* 0x3FABA1BA, 0x1BB341FE */
- 2.18694882948595424599e-02, /* 0x3F9664F4, 0x8406D637 */
- 8.86323982359930005737e-03, /* 0x3F8226E3, 0xE96E8493 */
- 3.59207910759131235356e-03, /* 0x3F6D6D22, 0xC9560328 */
- 1.45620945432529025516e-03, /* 0x3F57DBC8, 0xFEE08315 */
- 5.88041240820264096874e-04, /* 0x3F4344D8, 0xF2F26501 */
- 2.46463134818469906812e-04, /* 0x3F3026F7, 0x1A8D1068 */
- 7.81794442939557092300e-05, /* 0x3F147E88, 0xA03792A6 */
- 7.14072491382608190305e-05, /* 0x3F12B80F, 0x32F0A7E9 */
- -1.85586374855275456654e-05, /* 0xBEF375CB, 0xDB605373 */
- 2.59073051863633712884e-05, /* 0x3EFB2A70, 0x74BF7AD4 */
-};
-
-#ifdef __STDC__
- double __kernel_tan(double x, double y, int iy)
-#else
- double __kernel_tan(x, y, iy)
- double x,y; int iy;
-#endif
-{
- double z,r,v,w,s;
- int32_t ix,hx;
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff; /* high word of |x| */
- if(ix<0x3e300000) /* x < 2**-28 */
- {if((int)x==0) { /* generate inexact */
- u_int32_t low;
- GET_LOW_WORD(low,x);
- if(((ix|low)|(iy+1))==0) return one/fabs(x);
- else return (iy==1)? x: -one/x;
- }
- }
- if(ix>=0x3FE59428) { /* |x|>=0.6744 */
- if(hx<0) {x = -x; y = -y;}
- z = pio4-x;
- w = pio4lo-y;
- x = z+w; y = 0.0;
- }
- z = x*x;
- w = z*z;
- /* Break x^5*(T[1]+x^2*T[2]+...) into
- * x^5(T[1]+x^4*T[3]+...+x^20*T[11]) +
- * x^5(x^2*(T[2]+x^4*T[4]+...+x^22*[T12]))
- */
- r = T[1]+w*(T[3]+w*(T[5]+w*(T[7]+w*(T[9]+w*T[11]))));
- v = z*(T[2]+w*(T[4]+w*(T[6]+w*(T[8]+w*(T[10]+w*T[12])))));
- s = z*x;
- r = y + z*(s*(r+v)+y);
- r += T[0]*s;
- w = x+r;
- if(ix>=0x3FE59428) {
- v = (double)iy;
- return (double)(1-((hx>>30)&2))*(v-2.0*(x-(w*w/(w+v)-r)));
- }
- if(iy==1) return w;
- else { /* if allow error up to 2 ulp,
- simply return -1.0/(x+r) here */
- /* compute -1.0/(x+r) accurately */
- double a,t;
- z = w;
- SET_LOW_WORD(z,0);
- v = r-(z - x); /* z+v = r+x */
- t = a = -1.0/w; /* a = -1.0/w */
- SET_LOW_WORD(t,0);
- s = 1.0+t*z;
- return t+a*(s+t*v);
- }
-}
diff --git a/lib/msun/src/k_tanf.c b/lib/msun/src/k_tanf.c
deleted file mode 100644
index ad585f6..0000000
--- a/lib/msun/src/k_tanf.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* k_tanf.c -- float version of k_tan.c
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-one = 1.0000000000e+00, /* 0x3f800000 */
-pio4 = 7.8539812565e-01, /* 0x3f490fda */
-pio4lo= 3.7748947079e-08, /* 0x33222168 */
-T[] = {
- 3.3333334327e-01, /* 0x3eaaaaab */
- 1.3333334029e-01, /* 0x3e088889 */
- 5.3968254477e-02, /* 0x3d5d0dd1 */
- 2.1869488060e-02, /* 0x3cb327a4 */
- 8.8632395491e-03, /* 0x3c11371f */
- 3.5920790397e-03, /* 0x3b6b6916 */
- 1.4562094584e-03, /* 0x3abede48 */
- 5.8804126456e-04, /* 0x3a1a26c8 */
- 2.4646313977e-04, /* 0x398137b9 */
- 7.8179444245e-05, /* 0x38a3f445 */
- 7.1407252108e-05, /* 0x3895c07a */
- -1.8558637748e-05, /* 0xb79bae5f */
- 2.5907305826e-05, /* 0x37d95384 */
-};
-
-#ifdef __STDC__
- float __kernel_tanf(float x, float y, int iy)
-#else
- float __kernel_tanf(x, y, iy)
- float x,y; int iy;
-#endif
-{
- float z,r,v,w,s;
- int32_t ix,hx;
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff; /* high word of |x| */
- if(ix<0x31800000) /* x < 2**-28 */
- {if((int)x==0) { /* generate inexact */
- if((ix|(iy+1))==0) return one/fabsf(x);
- else return (iy==1)? x: -one/x;
- }
- }
- if(ix>=0x3f2ca140) { /* |x|>=0.6744 */
- if(hx<0) {x = -x; y = -y;}
- z = pio4-x;
- w = pio4lo-y;
- x = z+w; y = 0.0;
- }
- z = x*x;
- w = z*z;
- /* Break x^5*(T[1]+x^2*T[2]+...) into
- * x^5(T[1]+x^4*T[3]+...+x^20*T[11]) +
- * x^5(x^2*(T[2]+x^4*T[4]+...+x^22*[T12]))
- */
- r = T[1]+w*(T[3]+w*(T[5]+w*(T[7]+w*(T[9]+w*T[11]))));
- v = z*(T[2]+w*(T[4]+w*(T[6]+w*(T[8]+w*(T[10]+w*T[12])))));
- s = z*x;
- r = y + z*(s*(r+v)+y);
- r += T[0]*s;
- w = x+r;
- if(ix>=0x3f2ca140) {
- v = (float)iy;
- return (float)(1-((hx>>30)&2))*(v-(float)2.0*(x-(w*w/(w+v)-r)));
- }
- if(iy==1) return w;
- else { /* if allow error up to 2 ulp,
- simply return -1.0/(x+r) here */
- /* compute -1.0/(x+r) accurately */
- float a,t;
- int32_t i;
- z = w;
- GET_FLOAT_WORD(i,z);
- SET_FLOAT_WORD(z,i&0xfffff000);
- v = r-(z - x); /* z+v = r+x */
- t = a = -(float)1.0/w; /* a = -1.0/w */
- GET_FLOAT_WORD(i,t);
- SET_FLOAT_WORD(t,i&0xfffff000);
- s = (float)1.0+t*z;
- return t+a*(s+t*v);
- }
-}
diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h
deleted file mode 100644
index d4fe9e6..0000000
--- a/lib/msun/src/math.h
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * from: @(#)fdlibm.h 5.1 93/09/24
- * $Id: math.h,v 1.4 1997/02/22 15:10:54 peter Exp $
- */
-
-#ifndef _MATH_H_
-#define _MATH_H_
-
-/*
- * ANSI/POSIX
- */
-extern char __infinity[];
-#define HUGE_VAL (*(double *) __infinity)
-
-/*
- * XOPEN/SVID
- */
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
-#define M_E 2.7182818284590452354 /* e */
-#define M_LOG2E 1.4426950408889634074 /* log 2e */
-#define M_LOG10E 0.43429448190325182765 /* log 10e */
-#define M_LN2 0.69314718055994530942 /* log e2 */
-#define M_LN10 2.30258509299404568402 /* log e10 */
-#define M_PI 3.14159265358979323846 /* pi */
-#define M_PI_2 1.57079632679489661923 /* pi/2 */
-#define M_PI_4 0.78539816339744830962 /* pi/4 */
-#define M_1_PI 0.31830988618379067154 /* 1/pi */
-#define M_2_PI 0.63661977236758134308 /* 2/pi */
-#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
-#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
-#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
-
-#define MAXFLOAT ((float)3.40282346638528860e+38)
-extern int signgam;
-
-#if !defined(_XOPEN_SOURCE)
-enum fdversion {fdlibm_ieee = -1, fdlibm_svid, fdlibm_xopen, fdlibm_posix};
-
-#define _LIB_VERSION_TYPE enum fdversion
-#define _LIB_VERSION _fdlib_version
-
-/* if global variable _LIB_VERSION is not desirable, one may
- * change the following to be a constant by:
- * #define _LIB_VERSION_TYPE const enum version
- * In that case, after one initializes the value _LIB_VERSION (see
- * s_lib_version.c) during compile time, it cannot be modified
- * in the middle of a program
- */
-extern _LIB_VERSION_TYPE _LIB_VERSION;
-
-#define _IEEE_ fdlibm_ieee
-#define _SVID_ fdlibm_svid
-#define _XOPEN_ fdlibm_xopen
-#define _POSIX_ fdlibm_posix
-
-#ifndef __cplusplus
-struct exception {
- int type;
- char *name;
- double arg1;
- double arg2;
- double retval;
-};
-#endif
-
-#define HUGE MAXFLOAT
-
-/*
- * set X_TLOSS = pi*2**52, which is possibly defined in <values.h>
- * (one may replace the following line by "#include <values.h>")
- */
-
-#define X_TLOSS 1.41484755040568800000e+16
-
-#define DOMAIN 1
-#define SING 2
-#define OVERFLOW 3
-#define UNDERFLOW 4
-#define TLOSS 5
-#define PLOSS 6
-
-#endif /* !_XOPEN_SOURCE */
-#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
-
-
-#include <sys/cdefs.h>
-__BEGIN_DECLS
-/*
- * ANSI/POSIX
- */
-extern double acos __P((double));
-extern double asin __P((double));
-extern double atan __P((double));
-extern double atan2 __P((double, double));
-extern double cos __P((double));
-extern double sin __P((double));
-extern double tan __P((double));
-
-extern double cosh __P((double));
-extern double sinh __P((double));
-extern double tanh __P((double));
-
-extern double exp __P((double));
-extern double frexp __P((double, int *));
-extern double ldexp __P((double, int));
-extern double log __P((double));
-extern double log10 __P((double));
-extern double modf __P((double, double *));
-
-extern double pow __P((double, double));
-extern double sqrt __P((double));
-
-extern double ceil __P((double));
-extern double fabs __P((double));
-extern double floor __P((double));
-extern double fmod __P((double, double));
-
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
-extern double erf __P((double));
-extern double erfc __P((double));
-extern double gamma __P((double));
-extern double hypot __P((double, double));
-extern int isinf __P((double));
-extern int isnan __P((double));
-extern int finite __P((double));
-extern double j0 __P((double));
-extern double j1 __P((double));
-extern double jn __P((int, double));
-extern double lgamma __P((double));
-extern double y0 __P((double));
-extern double y1 __P((double));
-extern double yn __P((int, double));
-
-#if !defined(_XOPEN_SOURCE)
-extern double acosh __P((double));
-extern double asinh __P((double));
-extern double atanh __P((double));
-extern double cbrt __P((double));
-extern double logb __P((double));
-extern double nextafter __P((double, double));
-extern double remainder __P((double, double));
-extern double scalb __P((double, double));
-
-#ifndef __cplusplus
-extern int matherr __P((struct exception *));
-#endif
-
-/*
- * IEEE Test Vector
- */
-extern double significand __P((double));
-
-/*
- * Functions callable from C, intended to support IEEE arithmetic.
- */
-extern double copysign __P((double, double));
-extern int ilogb __P((double));
-extern double rint __P((double));
-extern double scalbn __P((double, int));
-
-/*
- * BSD math library entry points
- */
-extern double cabs();
-extern double drem __P((double, double));
-extern double expm1 __P((double));
-extern double log1p __P((double));
-
-/*
- * Reentrant version of gamma & lgamma; passes signgam back by reference
- * as the second argument; user must allocate space for signgam.
- */
-#ifdef _REENTRANT
-extern double gamma_r __P((double, int *));
-extern double lgamma_r __P((double, int *));
-#endif /* _REENTRANT */
-
-
-/* float versions of ANSI/POSIX functions */
-extern float acosf __P((float));
-extern float asinf __P((float));
-extern float atanf __P((float));
-extern float atan2f __P((float, float));
-extern float cosf __P((float));
-extern float sinf __P((float));
-extern float tanf __P((float));
-
-extern float coshf __P((float));
-extern float sinhf __P((float));
-extern float tanhf __P((float));
-
-extern float expf __P((float));
-extern float frexpf __P((float, int *));
-extern float ldexpf __P((float, int));
-extern float logf __P((float));
-extern float log10f __P((float));
-extern float modff __P((float, float *));
-
-extern float powf __P((float, float));
-extern float sqrtf __P((float));
-
-extern float ceilf __P((float));
-extern float fabsf __P((float));
-extern float floorf __P((float));
-extern float fmodf __P((float, float));
-
-extern float erff __P((float));
-extern float erfcf __P((float));
-extern float gammaf __P((float));
-extern float hypotf __P((float, float));
-extern int isnanf __P((float));
-extern int finitef __P((float));
-extern float j0f __P((float));
-extern float j1f __P((float));
-extern float jnf __P((int, float));
-extern float lgammaf __P((float));
-extern float y0f __P((float));
-extern float y1f __P((float));
-extern float ynf __P((int, float));
-
-extern float acoshf __P((float));
-extern float asinhf __P((float));
-extern float atanhf __P((float));
-extern float cbrtf __P((float));
-extern float logbf __P((float));
-extern float nextafterf __P((float, float));
-extern float remainderf __P((float, float));
-extern float scalbf __P((float, float));
-
-/*
- * float version of IEEE Test Vector
- */
-extern float significandf __P((float));
-
-/*
- * Float versions of functions callable from C, intended to support
- * IEEE arithmetic.
- */
-extern float copysignf __P((float, float));
-extern int ilogbf __P((float));
-extern float rintf __P((float));
-extern float scalbnf __P((float, int));
-
-/*
- * float versions of BSD math library entry points
- */
-extern float cabsf ();
-extern float dremf __P((float, float));
-extern float expm1f __P((float));
-extern float log1pf __P((float));
-
-/*
- * Float versions of reentrant version of gamma & lgamma; passes
- * signgam back by reference as the second argument; user must
- * allocate space for signgam.
- */
-#ifdef _REENTRANT
-extern float gammaf_r __P((float, int *));
-extern float lgammaf_r __P((float, int *));
-#endif /* _REENTRANT */
-
-#endif /* !_XOPEN_SOURCE */
-#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
-__END_DECLS
-
-#endif /* _MATH_H_ */
diff --git a/lib/msun/src/math_private.h b/lib/msun/src/math_private.h
deleted file mode 100644
index 1d93957..0000000
--- a/lib/msun/src/math_private.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * from: @(#)fdlibm.h 5.1 93/09/24
- * $Id$
- */
-
-#ifndef _MATH_PRIVATE_H_
-#define _MATH_PRIVATE_H_
-
-#include <machine/endian.h>
-#include <sys/types.h>
-
-/* The original fdlibm code used statements like:
- n0 = ((*(int*)&one)>>29)^1; * index of high word *
- ix0 = *(n0+(int*)&x); * high word of x *
- ix1 = *((1-n0)+(int*)&x); * low word of x *
- to dig two 32 bit words out of the 64 bit IEEE floating point
- value. That is non-ANSI, and, moreover, the gcc instruction
- scheduler gets it wrong. We instead use the following macros.
- Unlike the original code, we determine the endianness at compile
- time, not at run time; I don't see much benefit to selecting
- endianness at run time. */
-
-/* A union which permits us to convert between a double and two 32 bit
- ints. */
-
-#if BYTE_ORDER == BIG_ENDIAN
-
-typedef union
-{
- double value;
- struct
- {
- u_int32_t msw;
- u_int32_t lsw;
- } parts;
-} ieee_double_shape_type;
-
-#endif
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-
-typedef union
-{
- double value;
- struct
- {
- u_int32_t lsw;
- u_int32_t msw;
- } parts;
-} ieee_double_shape_type;
-
-#endif
-
-/* Get two 32 bit ints from a double. */
-
-#define EXTRACT_WORDS(ix0,ix1,d) \
-do { \
- ieee_double_shape_type ew_u; \
- ew_u.value = (d); \
- (ix0) = ew_u.parts.msw; \
- (ix1) = ew_u.parts.lsw; \
-} while (0)
-
-/* Get the more significant 32 bit int from a double. */
-
-#define GET_HIGH_WORD(i,d) \
-do { \
- ieee_double_shape_type gh_u; \
- gh_u.value = (d); \
- (i) = gh_u.parts.msw; \
-} while (0)
-
-/* Get the less significant 32 bit int from a double. */
-
-#define GET_LOW_WORD(i,d) \
-do { \
- ieee_double_shape_type gl_u; \
- gl_u.value = (d); \
- (i) = gl_u.parts.lsw; \
-} while (0)
-
-/* Set a double from two 32 bit ints. */
-
-#define INSERT_WORDS(d,ix0,ix1) \
-do { \
- ieee_double_shape_type iw_u; \
- iw_u.parts.msw = (ix0); \
- iw_u.parts.lsw = (ix1); \
- (d) = iw_u.value; \
-} while (0)
-
-/* Set the more significant 32 bits of a double from an int. */
-
-#define SET_HIGH_WORD(d,v) \
-do { \
- ieee_double_shape_type sh_u; \
- sh_u.value = (d); \
- sh_u.parts.msw = (v); \
- (d) = sh_u.value; \
-} while (0)
-
-/* Set the less significant 32 bits of a double from an int. */
-
-#define SET_LOW_WORD(d,v) \
-do { \
- ieee_double_shape_type sl_u; \
- sl_u.value = (d); \
- sl_u.parts.lsw = (v); \
- (d) = sl_u.value; \
-} while (0)
-
-/* A union which permits us to convert between a float and a 32 bit
- int. */
-
-typedef union
-{
- float value;
- /* FIXME: Assumes 32 bit int. */
- unsigned int word;
-} ieee_float_shape_type;
-
-/* Get a 32 bit int from a float. */
-
-#define GET_FLOAT_WORD(i,d) \
-do { \
- ieee_float_shape_type gf_u; \
- gf_u.value = (d); \
- (i) = gf_u.word; \
-} while (0)
-
-/* Set a float from a 32 bit int. */
-
-#define SET_FLOAT_WORD(d,i) \
-do { \
- ieee_float_shape_type sf_u; \
- sf_u.word = (i); \
- (d) = sf_u.value; \
-} while (0)
-
-/* ieee style elementary functions */
-extern double __ieee754_sqrt __P((double));
-extern double __ieee754_acos __P((double));
-extern double __ieee754_acosh __P((double));
-extern double __ieee754_log __P((double));
-extern double __ieee754_atanh __P((double));
-extern double __ieee754_asin __P((double));
-extern double __ieee754_atan2 __P((double,double));
-extern double __ieee754_exp __P((double));
-extern double __ieee754_cosh __P((double));
-extern double __ieee754_fmod __P((double,double));
-extern double __ieee754_pow __P((double,double));
-extern double __ieee754_lgamma_r __P((double,int *));
-extern double __ieee754_gamma_r __P((double,int *));
-extern double __ieee754_lgamma __P((double));
-extern double __ieee754_gamma __P((double));
-extern double __ieee754_log10 __P((double));
-extern double __ieee754_sinh __P((double));
-extern double __ieee754_hypot __P((double,double));
-extern double __ieee754_j0 __P((double));
-extern double __ieee754_j1 __P((double));
-extern double __ieee754_y0 __P((double));
-extern double __ieee754_y1 __P((double));
-extern double __ieee754_jn __P((int,double));
-extern double __ieee754_yn __P((int,double));
-extern double __ieee754_remainder __P((double,double));
-extern int __ieee754_rem_pio2 __P((double,double*));
-extern double __ieee754_scalb __P((double,double));
-
-/* fdlibm kernel function */
-extern double __kernel_standard __P((double,double,int));
-extern double __kernel_sin __P((double,double,int));
-extern double __kernel_cos __P((double,double));
-extern double __kernel_tan __P((double,double,int));
-extern int __kernel_rem_pio2 __P((double*,double*,int,int,int,const int*));
-
-
-/* ieee style elementary float functions */
-extern float __ieee754_sqrtf __P((float));
-extern float __ieee754_acosf __P((float));
-extern float __ieee754_acoshf __P((float));
-extern float __ieee754_logf __P((float));
-extern float __ieee754_atanhf __P((float));
-extern float __ieee754_asinf __P((float));
-extern float __ieee754_atan2f __P((float,float));
-extern float __ieee754_expf __P((float));
-extern float __ieee754_coshf __P((float));
-extern float __ieee754_fmodf __P((float,float));
-extern float __ieee754_powf __P((float,float));
-extern float __ieee754_lgammaf_r __P((float,int *));
-extern float __ieee754_gammaf_r __P((float,int *));
-extern float __ieee754_lgammaf __P((float));
-extern float __ieee754_gammaf __P((float));
-extern float __ieee754_log10f __P((float));
-extern float __ieee754_sinhf __P((float));
-extern float __ieee754_hypotf __P((float,float));
-extern float __ieee754_j0f __P((float));
-extern float __ieee754_j1f __P((float));
-extern float __ieee754_y0f __P((float));
-extern float __ieee754_y1f __P((float));
-extern float __ieee754_jnf __P((int,float));
-extern float __ieee754_ynf __P((int,float));
-extern float __ieee754_remainderf __P((float,float));
-extern int __ieee754_rem_pio2f __P((float,float*));
-extern float __ieee754_scalbf __P((float,float));
-
-/* float versions of fdlibm kernel functions */
-extern float __kernel_sinf __P((float,float,int));
-extern float __kernel_cosf __P((float,float));
-extern float __kernel_tanf __P((float,float,int));
-extern int __kernel_rem_pio2f __P((float*,float*,int,int,int,const int*));
-
-#endif /* _MATH_PRIVATE_H_ */
diff --git a/lib/msun/src/s_asinh.c b/lib/msun/src/s_asinh.c
deleted file mode 100644
index 9276327..0000000
--- a/lib/msun/src/s_asinh.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* @(#)s_asinh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: s_asinh.c,v 1.4 1997/02/22 15:10:56 peter Exp $";
-#endif
-
-/* asinh(x)
- * Method :
- * Based on
- * asinh(x) = sign(x) * log [ |x| + sqrt(x*x+1) ]
- * we have
- * asinh(x) := x if 1+x*x=1,
- * := sign(x)*(log(x)+ln2)) for large |x|, else
- * := sign(x)*log(2|x|+1/(|x|+sqrt(x*x+1))) if|x|>2, else
- * := sign(x)*log1p(|x| + x^2/(1 + sqrt(1+x^2)))
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
-ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
-huge= 1.00000000000000000000e+300;
-
-#ifdef __STDC__
- double asinh(double x)
-#else
- double asinh(x)
- double x;
-#endif
-{
- double t,w;
- int32_t hx,ix;
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) return x+x; /* x is inf or NaN */
- if(ix< 0x3e300000) { /* |x|<2**-28 */
- if(huge+x>one) return x; /* return x inexact except 0 */
- }
- if(ix>0x41b00000) { /* |x| > 2**28 */
- w = __ieee754_log(fabs(x))+ln2;
- } else if (ix>0x40000000) { /* 2**28 > |x| > 2.0 */
- t = fabs(x);
- w = __ieee754_log(2.0*t+one/(__ieee754_sqrt(x*x+one)+t));
- } else { /* 2.0 > |x| > 2**-28 */
- t = x*x;
- w =log1p(fabs(x)+t/(one+__ieee754_sqrt(one+t)));
- }
- if(hx>0) return w; else return -w;
-}
diff --git a/lib/msun/src/s_asinhf.c b/lib/msun/src/s_asinhf.c
deleted file mode 100644
index b14db85..0000000
--- a/lib/msun/src/s_asinhf.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* s_asinhf.c -- float version of s_asinh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id: s_asinhf.c,v 1.4 1997/02/22 15:10:57 peter Exp $";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-one = 1.0000000000e+00, /* 0x3F800000 */
-ln2 = 6.9314718246e-01, /* 0x3f317218 */
-huge= 1.0000000000e+30;
-
-#ifdef __STDC__
- float asinhf(float x)
-#else
- float asinhf(x)
- float x;
-#endif
-{
- float t,w;
- int32_t hx,ix;
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7f800000) return x+x; /* x is inf or NaN */
- if(ix< 0x31800000) { /* |x|<2**-28 */
- if(huge+x>one) return x; /* return x inexact except 0 */
- }
- if(ix>0x4d800000) { /* |x| > 2**28 */
- w = __ieee754_logf(fabsf(x))+ln2;
- } else if (ix>0x40000000) { /* 2**28 > |x| > 2.0 */
- t = fabsf(x);
- w = __ieee754_logf((float)2.0*t+one/(__ieee754_sqrtf(x*x+one)+t));
- } else { /* 2.0 > |x| > 2**-28 */
- t = x*x;
- w =log1pf(fabsf(x)+t/(one+__ieee754_sqrtf(one+t)));
- }
- if(hx>0) return w; else return -w;
-}
diff --git a/lib/msun/src/s_atan.c b/lib/msun/src/s_atan.c
deleted file mode 100644
index 40e3de9..0000000
--- a/lib/msun/src/s_atan.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/* @(#)s_atan.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* atan(x)
- * Method
- * 1. Reduce x to positive by atan(x) = -atan(-x).
- * 2. According to the integer k=4t+0.25 chopped, t=x, the argument
- * is further reduced to one of the following intervals and the
- * arctangent of t is evaluated by the corresponding formula:
- *
- * [0,7/16] atan(x) = t-t^3*(a1+t^2*(a2+...(a10+t^2*a11)...)
- * [7/16,11/16] atan(x) = atan(1/2) + atan( (t-0.5)/(1+t/2) )
- * [11/16.19/16] atan(x) = atan( 1 ) + atan( (t-1)/(1+t) )
- * [19/16,39/16] atan(x) = atan(3/2) + atan( (t-1.5)/(1+1.5t) )
- * [39/16,INF] atan(x) = atan(INF) + atan( -1/t )
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
- * to produce the hexadecimal values shown.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double atanhi[] = {
-#else
-static double atanhi[] = {
-#endif
- 4.63647609000806093515e-01, /* atan(0.5)hi 0x3FDDAC67, 0x0561BB4F */
- 7.85398163397448278999e-01, /* atan(1.0)hi 0x3FE921FB, 0x54442D18 */
- 9.82793723247329054082e-01, /* atan(1.5)hi 0x3FEF730B, 0xD281F69B */
- 1.57079632679489655800e+00, /* atan(inf)hi 0x3FF921FB, 0x54442D18 */
-};
-
-#ifdef __STDC__
-static const double atanlo[] = {
-#else
-static double atanlo[] = {
-#endif
- 2.26987774529616870924e-17, /* atan(0.5)lo 0x3C7A2B7F, 0x222F65E2 */
- 3.06161699786838301793e-17, /* atan(1.0)lo 0x3C81A626, 0x33145C07 */
- 1.39033110312309984516e-17, /* atan(1.5)lo 0x3C700788, 0x7AF0CBBD */
- 6.12323399573676603587e-17, /* atan(inf)lo 0x3C91A626, 0x33145C07 */
-};
-
-#ifdef __STDC__
-static const double aT[] = {
-#else
-static double aT[] = {
-#endif
- 3.33333333333329318027e-01, /* 0x3FD55555, 0x5555550D */
- -1.99999999998764832476e-01, /* 0xBFC99999, 0x9998EBC4 */
- 1.42857142725034663711e-01, /* 0x3FC24924, 0x920083FF */
- -1.11111104054623557880e-01, /* 0xBFBC71C6, 0xFE231671 */
- 9.09088713343650656196e-02, /* 0x3FB745CD, 0xC54C206E */
- -7.69187620504482999495e-02, /* 0xBFB3B0F2, 0xAF749A6D */
- 6.66107313738753120669e-02, /* 0x3FB10D66, 0xA0D03D51 */
- -5.83357013379057348645e-02, /* 0xBFADDE2D, 0x52DEFD9A */
- 4.97687799461593236017e-02, /* 0x3FA97B4B, 0x24760DEB */
- -3.65315727442169155270e-02, /* 0xBFA2B444, 0x2C6A6C2F */
- 1.62858201153657823623e-02, /* 0x3F90AD3A, 0xE322DA11 */
-};
-
-#ifdef __STDC__
- static const double
-#else
- static double
-#endif
-one = 1.0,
-huge = 1.0e300;
-
-#ifdef __STDC__
- double __generic_atan(double x)
-#else
- double __generic_atan(x)
- double x;
-#endif
-{
- double w,s1,s2,z;
- int32_t ix,hx,id;
-
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x44100000) { /* if |x| >= 2^66 */
- u_int32_t low;
- GET_LOW_WORD(low,x);
- if(ix>0x7ff00000||
- (ix==0x7ff00000&&(low!=0)))
- return x+x; /* NaN */
- if(hx>0) return atanhi[3]+atanlo[3];
- else return -atanhi[3]-atanlo[3];
- } if (ix < 0x3fdc0000) { /* |x| < 0.4375 */
- if (ix < 0x3e200000) { /* |x| < 2^-29 */
- if(huge+x>one) return x; /* raise inexact */
- }
- id = -1;
- } else {
- x = fabs(x);
- if (ix < 0x3ff30000) { /* |x| < 1.1875 */
- if (ix < 0x3fe60000) { /* 7/16 <=|x|<11/16 */
- id = 0; x = (2.0*x-one)/(2.0+x);
- } else { /* 11/16<=|x|< 19/16 */
- id = 1; x = (x-one)/(x+one);
- }
- } else {
- if (ix < 0x40038000) { /* |x| < 2.4375 */
- id = 2; x = (x-1.5)/(one+1.5*x);
- } else { /* 2.4375 <= |x| < 2^66 */
- id = 3; x = -1.0/x;
- }
- }}
- /* end of argument reduction */
- z = x*x;
- w = z*z;
- /* break sum from i=0 to 10 aT[i]z**(i+1) into odd and even poly */
- s1 = z*(aT[0]+w*(aT[2]+w*(aT[4]+w*(aT[6]+w*(aT[8]+w*aT[10])))));
- s2 = w*(aT[1]+w*(aT[3]+w*(aT[5]+w*(aT[7]+w*aT[9]))));
- if (id<0) return x - x*(s1+s2);
- else {
- z = atanhi[id] - ((x*(s1+s2) - atanlo[id]) - x);
- return (hx<0)? -z:z;
- }
-}
diff --git a/lib/msun/src/s_atanf.c b/lib/msun/src/s_atanf.c
deleted file mode 100644
index f8e103d..0000000
--- a/lib/msun/src/s_atanf.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/* s_atanf.c -- float version of s_atan.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float atanhi[] = {
-#else
-static float atanhi[] = {
-#endif
- 4.6364760399e-01, /* atan(0.5)hi 0x3eed6338 */
- 7.8539812565e-01, /* atan(1.0)hi 0x3f490fda */
- 9.8279368877e-01, /* atan(1.5)hi 0x3f7b985e */
- 1.5707962513e+00, /* atan(inf)hi 0x3fc90fda */
-};
-
-#ifdef __STDC__
-static const float atanlo[] = {
-#else
-static float atanlo[] = {
-#endif
- 5.0121582440e-09, /* atan(0.5)lo 0x31ac3769 */
- 3.7748947079e-08, /* atan(1.0)lo 0x33222168 */
- 3.4473217170e-08, /* atan(1.5)lo 0x33140fb4 */
- 7.5497894159e-08, /* atan(inf)lo 0x33a22168 */
-};
-
-#ifdef __STDC__
-static const float aT[] = {
-#else
-static float aT[] = {
-#endif
- 3.3333334327e-01, /* 0x3eaaaaaa */
- -2.0000000298e-01, /* 0xbe4ccccd */
- 1.4285714924e-01, /* 0x3e124925 */
- -1.1111110449e-01, /* 0xbde38e38 */
- 9.0908870101e-02, /* 0x3dba2e6e */
- -7.6918758452e-02, /* 0xbd9d8795 */
- 6.6610731184e-02, /* 0x3d886b35 */
- -5.8335702866e-02, /* 0xbd6ef16b */
- 4.9768779427e-02, /* 0x3d4bda59 */
- -3.6531571299e-02, /* 0xbd15a221 */
- 1.6285819933e-02, /* 0x3c8569d7 */
-};
-
-#ifdef __STDC__
- static const float
-#else
- static float
-#endif
-one = 1.0,
-huge = 1.0e30;
-
-#ifdef __STDC__
- float atanf(float x)
-#else
- float atanf(x)
- float x;
-#endif
-{
- float w,s1,s2,z;
- int32_t ix,hx,id;
-
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x50800000) { /* if |x| >= 2^34 */
- if(ix>0x7f800000)
- return x+x; /* NaN */
- if(hx>0) return atanhi[3]+atanlo[3];
- else return -atanhi[3]-atanlo[3];
- } if (ix < 0x3ee00000) { /* |x| < 0.4375 */
- if (ix < 0x31000000) { /* |x| < 2^-29 */
- if(huge+x>one) return x; /* raise inexact */
- }
- id = -1;
- } else {
- x = fabsf(x);
- if (ix < 0x3f980000) { /* |x| < 1.1875 */
- if (ix < 0x3f300000) { /* 7/16 <=|x|<11/16 */
- id = 0; x = ((float)2.0*x-one)/((float)2.0+x);
- } else { /* 11/16<=|x|< 19/16 */
- id = 1; x = (x-one)/(x+one);
- }
- } else {
- if (ix < 0x401c0000) { /* |x| < 2.4375 */
- id = 2; x = (x-(float)1.5)/(one+(float)1.5*x);
- } else { /* 2.4375 <= |x| < 2^66 */
- id = 3; x = -(float)1.0/x;
- }
- }}
- /* end of argument reduction */
- z = x*x;
- w = z*z;
- /* break sum from i=0 to 10 aT[i]z**(i+1) into odd and even poly */
- s1 = z*(aT[0]+w*(aT[2]+w*(aT[4]+w*(aT[6]+w*(aT[8]+w*aT[10])))));
- s2 = w*(aT[1]+w*(aT[3]+w*(aT[5]+w*(aT[7]+w*aT[9]))));
- if (id<0) return x - x*(s1+s2);
- else {
- z = atanhi[id] - ((x*(s1+s2) - atanlo[id]) - x);
- return (hx<0)? -z:z;
- }
-}
diff --git a/lib/msun/src/s_cbrt.c b/lib/msun/src/s_cbrt.c
deleted file mode 100644
index 09f8d08..0000000
--- a/lib/msun/src/s_cbrt.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* @(#)s_cbrt.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-/* cbrt(x)
- * Return cube root of x
- */
-#ifdef __STDC__
-static const u_int32_t
-#else
-static u_int32_t
-#endif
- B1 = 715094163, /* B1 = (682-0.03306235651)*2**20 */
- B2 = 696219795; /* B2 = (664-0.03306235651)*2**20 */
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-C = 5.42857142857142815906e-01, /* 19/35 = 0x3FE15F15, 0xF15F15F1 */
-D = -7.05306122448979611050e-01, /* -864/1225 = 0xBFE691DE, 0x2532C834 */
-E = 1.41428571428571436819e+00, /* 99/70 = 0x3FF6A0EA, 0x0EA0EA0F */
-F = 1.60714285714285720630e+00, /* 45/28 = 0x3FF9B6DB, 0x6DB6DB6E */
-G = 3.57142857142857150787e-01; /* 5/14 = 0x3FD6DB6D, 0xB6DB6DB7 */
-
-#ifdef __STDC__
- double cbrt(double x)
-#else
- double cbrt(x)
- double x;
-#endif
-{
- int32_t hx;
- double r,s,t=0.0,w;
- u_int32_t sign;
- u_int32_t high,low;
-
- GET_HIGH_WORD(hx,x);
- sign=hx&0x80000000; /* sign= sign(x) */
- hx ^=sign;
- if(hx>=0x7ff00000) return(x+x); /* cbrt(NaN,INF) is itself */
- GET_LOW_WORD(low,x);
- if((hx|low)==0)
- return(x); /* cbrt(0) is itself */
-
- SET_HIGH_WORD(x,hx); /* x <- |x| */
- /* rough cbrt to 5 bits */
- if(hx<0x00100000) /* subnormal number */
- {SET_HIGH_WORD(t,0x43500000); /* set t= 2**54 */
- t*=x; GET_HIGH_WORD(high,t); SET_HIGH_WORD(t,high/3+B2);
- }
- else
- SET_HIGH_WORD(t,hx/3+B1);
-
-
- /* new cbrt to 23 bits, may be implemented in single precision */
- r=t*t/x;
- s=C+r*t;
- t*=G+F/(s+E+D/s);
-
- /* chopped to 20 bits and make it larger than cbrt(x) */
- GET_HIGH_WORD(high,t);
- INSERT_WORDS(t,high+0x00000001,0);
-
-
- /* one step newton iteration to 53 bits with error less than 0.667 ulps */
- s=t*t; /* t*t is exact */
- r=x/s;
- w=t+t;
- r=(r-t)/(w+r); /* r-s is exact */
- t=t+t*r;
-
- /* retore the sign bit */
- GET_HIGH_WORD(high,t);
- SET_HIGH_WORD(t,high|sign);
- return(t);
-}
diff --git a/lib/msun/src/s_cbrtf.c b/lib/msun/src/s_cbrtf.c
deleted file mode 100644
index 8bb1b89..0000000
--- a/lib/msun/src/s_cbrtf.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* s_cbrtf.c -- float version of s_cbrt.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-/* cbrtf(x)
- * Return cube root of x
- */
-#ifdef __STDC__
-static const unsigned
-#else
-static unsigned
-#endif
- B1 = 709958130, /* B1 = (84+2/3-0.03306235651)*2**23 */
- B2 = 642849266; /* B2 = (76+2/3-0.03306235651)*2**23 */
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-C = 5.4285717010e-01, /* 19/35 = 0x3f0af8b0 */
-D = -7.0530611277e-01, /* -864/1225 = 0xbf348ef1 */
-E = 1.4142856598e+00, /* 99/70 = 0x3fb50750 */
-F = 1.6071428061e+00, /* 45/28 = 0x3fcdb6db */
-G = 3.5714286566e-01; /* 5/14 = 0x3eb6db6e */
-
-#ifdef __STDC__
- float cbrtf(float x)
-#else
- float cbrtf(x)
- float x;
-#endif
-{
- float r,s,t;
- int32_t hx;
- u_int32_t sign;
- u_int32_t high;
-
- GET_FLOAT_WORD(hx,x);
- sign=hx&0x80000000; /* sign= sign(x) */
- hx ^=sign;
- if(hx>=0x7f800000) return(x+x); /* cbrt(NaN,INF) is itself */
- if(hx==0)
- return(x); /* cbrt(0) is itself */
-
- SET_FLOAT_WORD(x,hx); /* x <- |x| */
- /* rough cbrt to 5 bits */
- if(hx<0x00800000) /* subnormal number */
- {SET_FLOAT_WORD(t,0x4b800000); /* set t= 2**24 */
- t*=x; GET_FLOAT_WORD(high,t); SET_FLOAT_WORD(t,high/3+B2);
- }
- else
- SET_FLOAT_WORD(t,hx/3+B1);
-
-
- /* new cbrt to 23 bits */
- r=t*t/x;
- s=C+r*t;
- t*=G+F/(s+E+D/s);
-
- /* retore the sign bit */
- GET_FLOAT_WORD(high,t);
- SET_FLOAT_WORD(t,high|sign);
- return(t);
-}
diff --git a/lib/msun/src/s_ceil.c b/lib/msun/src/s_ceil.c
deleted file mode 100644
index 2fc9bcc..0000000
--- a/lib/msun/src/s_ceil.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* @(#)s_ceil.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * ceil(x)
- * Return x rounded toward -inf to integral value
- * Method:
- * Bit twiddling.
- * Exception:
- * Inexact flag raised if x not equal to ceil(x).
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double huge = 1.0e300;
-#else
-static double huge = 1.0e300;
-#endif
-
-#ifdef __STDC__
- double __generic_ceil(double x)
-#else
- double __generic_ceil(x)
- double x;
-#endif
-{
- int32_t i0,i1,j0;
- u_int32_t i,j;
- EXTRACT_WORDS(i0,i1,x);
- j0 = ((i0>>20)&0x7ff)-0x3ff;
- if(j0<20) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0<0) {i0=0x80000000;i1=0;}
- else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;}
- }
- } else {
- i = (0x000fffff)>>j0;
- if(((i0&i)|i1)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0>0) i0 += (0x00100000)>>j0;
- i0 &= (~i); i1=0;
- }
- }
- } else if (j0>51) {
- if(j0==0x400) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- } else {
- i = ((u_int32_t)(0xffffffff))>>(j0-20);
- if((i1&i)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0>0) {
- if(j0==20) i0+=1;
- else {
- j = i1 + (1<<(52-j0));
- if(j<i1) i0+=1; /* got a carry */
- i1 = j;
- }
- }
- i1 &= (~i);
- }
- }
- INSERT_WORDS(x,i0,i1);
- return x;
-}
diff --git a/lib/msun/src/s_ceilf.c b/lib/msun/src/s_ceilf.c
deleted file mode 100644
index 5925ee4..0000000
--- a/lib/msun/src/s_ceilf.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* s_ceilf.c -- float version of s_ceil.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float huge = 1.0e30;
-#else
-static float huge = 1.0e30;
-#endif
-
-#ifdef __STDC__
- float ceilf(float x)
-#else
- float ceilf(x)
- float x;
-#endif
-{
- int32_t i0,j0;
- u_int32_t i;
-
- GET_FLOAT_WORD(i0,x);
- j0 = ((i0>>23)&0xff)-0x7f;
- if(j0<23) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0<0) {i0=0x80000000;}
- else if(i0!=0) { i0=0x3f800000;}
- }
- } else {
- i = (0x007fffff)>>j0;
- if((i0&i)==0) return x; /* x is integral */
- if(huge+x>(float)0.0) { /* raise inexact flag */
- if(i0>0) i0 += (0x00800000)>>j0;
- i0 &= (~i);
- }
- }
- } else {
- if(j0==0x80) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- }
- SET_FLOAT_WORD(x,i0);
- return x;
-}
diff --git a/lib/msun/src/s_copysign.c b/lib/msun/src/s_copysign.c
deleted file mode 100644
index c119edf..0000000
--- a/lib/msun/src/s_copysign.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* @(#)s_copysign.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * copysign(double x, double y)
- * copysign(x,y) returns a value with the magnitude of x and
- * with the sign bit of y.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double __generic_copysign(double x, double y)
-#else
- double __generic_copysign(x,y)
- double x,y;
-#endif
-{
- u_int32_t hx,hy;
- GET_HIGH_WORD(hx,x);
- GET_HIGH_WORD(hy,y);
- SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000));
- return x;
-}
diff --git a/lib/msun/src/s_copysignf.c b/lib/msun/src/s_copysignf.c
deleted file mode 100644
index d5eb48f..0000000
--- a/lib/msun/src/s_copysignf.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* s_copysignf.c -- float version of s_copysign.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * copysignf(float x, float y)
- * copysignf(x,y) returns a value with the magnitude of x and
- * with the sign bit of y.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float copysignf(float x, float y)
-#else
- float copysignf(x,y)
- float x,y;
-#endif
-{
- u_int32_t ix,iy;
- GET_FLOAT_WORD(ix,x);
- GET_FLOAT_WORD(iy,y);
- SET_FLOAT_WORD(x,(ix&0x7fffffff)|(iy&0x80000000));
- return x;
-}
diff --git a/lib/msun/src/s_cos.c b/lib/msun/src/s_cos.c
deleted file mode 100644
index 7e4eda9..0000000
--- a/lib/msun/src/s_cos.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* @(#)s_cos.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* cos(x)
- * Return cosine function of x.
- *
- * kernel function:
- * __kernel_sin ... sine function on [-pi/4,pi/4]
- * __kernel_cos ... cosine function on [-pi/4,pi/4]
- * __ieee754_rem_pio2 ... argument reduction routine
- *
- * Method.
- * Let S,C and T denote the sin, cos and tan respectively on
- * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
- * in [-pi/4 , +pi/4], and let n = k mod 4.
- * We have
- *
- * n sin(x) cos(x) tan(x)
- * ----------------------------------------------------------
- * 0 S C T
- * 1 C -S -1/T
- * 2 -S -C T
- * 3 -C S -1/T
- * ----------------------------------------------------------
- *
- * Special cases:
- * Let trig be any of sin, cos, or tan.
- * trig(+-INF) is NaN, with signals;
- * trig(NaN) is that NaN;
- *
- * Accuracy:
- * TRIG(x) returns trig(x) nearly rounded
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double __generic_cos(double x)
-#else
- double __generic_cos(x)
- double x;
-#endif
-{
- double y[2],z=0.0;
- int32_t n, ix;
-
- /* High word of x. */
- GET_HIGH_WORD(ix,x);
-
- /* |x| ~< pi/4 */
- ix &= 0x7fffffff;
- if(ix <= 0x3fe921fb) return __kernel_cos(x,z);
-
- /* cos(Inf or NaN) is NaN */
- else if (ix>=0x7ff00000) return x-x;
-
- /* argument reduction needed */
- else {
- n = __ieee754_rem_pio2(x,y);
- switch(n&3) {
- case 0: return __kernel_cos(y[0],y[1]);
- case 1: return -__kernel_sin(y[0],y[1],1);
- case 2: return -__kernel_cos(y[0],y[1]);
- default:
- return __kernel_sin(y[0],y[1],1);
- }
- }
-}
diff --git a/lib/msun/src/s_cosf.c b/lib/msun/src/s_cosf.c
deleted file mode 100644
index 18df5d0..0000000
--- a/lib/msun/src/s_cosf.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* s_cosf.c -- float version of s_cos.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float one=1.0;
-#else
-static float one=1.0;
-#endif
-
-#ifdef __STDC__
- float cosf(float x)
-#else
- float cosf(x)
- float x;
-#endif
-{
- float y[2],z=0.0;
- int32_t n,ix;
-
- GET_FLOAT_WORD(ix,x);
-
- /* |x| ~< pi/4 */
- ix &= 0x7fffffff;
- if(ix <= 0x3f490fd8) return __kernel_cosf(x,z);
-
- /* cos(Inf or NaN) is NaN */
- else if (ix>=0x7f800000) return x-x;
-
- /* argument reduction needed */
- else {
- n = __ieee754_rem_pio2f(x,y);
- switch(n&3) {
- case 0: return __kernel_cosf(y[0],y[1]);
- case 1: return -__kernel_sinf(y[0],y[1],1);
- case 2: return -__kernel_cosf(y[0],y[1]);
- default:
- return __kernel_sinf(y[0],y[1],1);
- }
- }
-}
diff --git a/lib/msun/src/s_erf.c b/lib/msun/src/s_erf.c
deleted file mode 100644
index 07129a3..0000000
--- a/lib/msun/src/s_erf.c
+++ /dev/null
@@ -1,314 +0,0 @@
-/* @(#)s_erf.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* double erf(double x)
- * double erfc(double x)
- * x
- * 2 |\
- * erf(x) = --------- | exp(-t*t)dt
- * sqrt(pi) \|
- * 0
- *
- * erfc(x) = 1-erf(x)
- * Note that
- * erf(-x) = -erf(x)
- * erfc(-x) = 2 - erfc(x)
- *
- * Method:
- * 1. For |x| in [0, 0.84375]
- * erf(x) = x + x*R(x^2)
- * erfc(x) = 1 - erf(x) if x in [-.84375,0.25]
- * = 0.5 + ((0.5-x)-x*R) if x in [0.25,0.84375]
- * where R = P/Q where P is an odd poly of degree 8 and
- * Q is an odd poly of degree 10.
- * -57.90
- * | R - (erf(x)-x)/x | <= 2
- *
- *
- * Remark. The formula is derived by noting
- * erf(x) = (2/sqrt(pi))*(x - x^3/3 + x^5/10 - x^7/42 + ....)
- * and that
- * 2/sqrt(pi) = 1.128379167095512573896158903121545171688
- * is close to one. The interval is chosen because the fix
- * point of erf(x) is near 0.6174 (i.e., erf(x)=x when x is
- * near 0.6174), and by some experiment, 0.84375 is chosen to
- * guarantee the error is less than one ulp for erf.
- *
- * 2. For |x| in [0.84375,1.25], let s = |x| - 1, and
- * c = 0.84506291151 rounded to single (24 bits)
- * erf(x) = sign(x) * (c + P1(s)/Q1(s))
- * erfc(x) = (1-c) - P1(s)/Q1(s) if x > 0
- * 1+(c+P1(s)/Q1(s)) if x < 0
- * |P1/Q1 - (erf(|x|)-c)| <= 2**-59.06
- * Remark: here we use the taylor series expansion at x=1.
- * erf(1+s) = erf(1) + s*Poly(s)
- * = 0.845.. + P1(s)/Q1(s)
- * That is, we use rational approximation to approximate
- * erf(1+s) - (c = (single)0.84506291151)
- * Note that |P1/Q1|< 0.078 for x in [0.84375,1.25]
- * where
- * P1(s) = degree 6 poly in s
- * Q1(s) = degree 6 poly in s
- *
- * 3. For x in [1.25,1/0.35(~2.857143)],
- * erfc(x) = (1/x)*exp(-x*x-0.5625+R1/S1)
- * erf(x) = 1 - erfc(x)
- * where
- * R1(z) = degree 7 poly in z, (z=1/x^2)
- * S1(z) = degree 8 poly in z
- *
- * 4. For x in [1/0.35,28]
- * erfc(x) = (1/x)*exp(-x*x-0.5625+R2/S2) if x > 0
- * = 2.0 - (1/x)*exp(-x*x-0.5625+R2/S2) if -6<x<0
- * = 2.0 - tiny (if x <= -6)
- * erf(x) = sign(x)*(1.0 - erfc(x)) if x < 6, else
- * erf(x) = sign(x)*(1.0 - tiny)
- * where
- * R2(z) = degree 6 poly in z, (z=1/x^2)
- * S2(z) = degree 7 poly in z
- *
- * Note1:
- * To compute exp(-x*x-0.5625+R/S), let s be a single
- * precision number and s := x; then
- * -x*x = -s*s + (s-x)*(s+x)
- * exp(-x*x-0.5626+R/S) =
- * exp(-s*s-0.5625)*exp((s-x)*(s+x)+R/S);
- * Note2:
- * Here 4 and 5 make use of the asymptotic series
- * exp(-x*x)
- * erfc(x) ~ ---------- * ( 1 + Poly(1/x^2) )
- * x*sqrt(pi)
- * We use rational approximation to approximate
- * g(s)=f(1/x^2) = log(erfc(x)*x) - x*x + 0.5625
- * Here is the error bound for R1/S1 and R2/S2
- * |R1/S1 - f(x)| < 2**(-62.57)
- * |R2/S2 - f(x)| < 2**(-61.52)
- *
- * 5. For inf > x >= 28
- * erf(x) = sign(x) *(1 - tiny) (raise inexact)
- * erfc(x) = tiny*tiny (raise underflow) if x > 0
- * = 2 - tiny if x<0
- *
- * 7. Special case:
- * erf(0) = 0, erf(inf) = 1, erf(-inf) = -1,
- * erfc(0) = 1, erfc(inf) = 0, erfc(-inf) = 2,
- * erfc/erf(NaN) is NaN
- */
-
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-tiny = 1e-300,
-half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
-one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
-two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */
- /* c = (float)0.84506291151 */
-erx = 8.45062911510467529297e-01, /* 0x3FEB0AC1, 0x60000000 */
-/*
- * Coefficients for approximation to erf on [0,0.84375]
- */
-efx = 1.28379167095512586316e-01, /* 0x3FC06EBA, 0x8214DB69 */
-efx8= 1.02703333676410069053e+00, /* 0x3FF06EBA, 0x8214DB69 */
-pp0 = 1.28379167095512558561e-01, /* 0x3FC06EBA, 0x8214DB68 */
-pp1 = -3.25042107247001499370e-01, /* 0xBFD4CD7D, 0x691CB913 */
-pp2 = -2.84817495755985104766e-02, /* 0xBF9D2A51, 0xDBD7194F */
-pp3 = -5.77027029648944159157e-03, /* 0xBF77A291, 0x236668E4 */
-pp4 = -2.37630166566501626084e-05, /* 0xBEF8EAD6, 0x120016AC */
-qq1 = 3.97917223959155352819e-01, /* 0x3FD97779, 0xCDDADC09 */
-qq2 = 6.50222499887672944485e-02, /* 0x3FB0A54C, 0x5536CEBA */
-qq3 = 5.08130628187576562776e-03, /* 0x3F74D022, 0xC4D36B0F */
-qq4 = 1.32494738004321644526e-04, /* 0x3F215DC9, 0x221C1A10 */
-qq5 = -3.96022827877536812320e-06, /* 0xBED09C43, 0x42A26120 */
-/*
- * Coefficients for approximation to erf in [0.84375,1.25]
- */
-pa0 = -2.36211856075265944077e-03, /* 0xBF6359B8, 0xBEF77538 */
-pa1 = 4.14856118683748331666e-01, /* 0x3FDA8D00, 0xAD92B34D */
-pa2 = -3.72207876035701323847e-01, /* 0xBFD7D240, 0xFBB8C3F1 */
-pa3 = 3.18346619901161753674e-01, /* 0x3FD45FCA, 0x805120E4 */
-pa4 = -1.10894694282396677476e-01, /* 0xBFBC6398, 0x3D3E28EC */
-pa5 = 3.54783043256182359371e-02, /* 0x3FA22A36, 0x599795EB */
-pa6 = -2.16637559486879084300e-03, /* 0xBF61BF38, 0x0A96073F */
-qa1 = 1.06420880400844228286e-01, /* 0x3FBB3E66, 0x18EEE323 */
-qa2 = 5.40397917702171048937e-01, /* 0x3FE14AF0, 0x92EB6F33 */
-qa3 = 7.18286544141962662868e-02, /* 0x3FB2635C, 0xD99FE9A7 */
-qa4 = 1.26171219808761642112e-01, /* 0x3FC02660, 0xE763351F */
-qa5 = 1.36370839120290507362e-02, /* 0x3F8BEDC2, 0x6B51DD1C */
-qa6 = 1.19844998467991074170e-02, /* 0x3F888B54, 0x5735151D */
-/*
- * Coefficients for approximation to erfc in [1.25,1/0.35]
- */
-ra0 = -9.86494403484714822705e-03, /* 0xBF843412, 0x600D6435 */
-ra1 = -6.93858572707181764372e-01, /* 0xBFE63416, 0xE4BA7360 */
-ra2 = -1.05586262253232909814e+01, /* 0xC0251E04, 0x41B0E726 */
-ra3 = -6.23753324503260060396e+01, /* 0xC04F300A, 0xE4CBA38D */
-ra4 = -1.62396669462573470355e+02, /* 0xC0644CB1, 0x84282266 */
-ra5 = -1.84605092906711035994e+02, /* 0xC067135C, 0xEBCCABB2 */
-ra6 = -8.12874355063065934246e+01, /* 0xC0545265, 0x57E4D2F2 */
-ra7 = -9.81432934416914548592e+00, /* 0xC023A0EF, 0xC69AC25C */
-sa1 = 1.96512716674392571292e+01, /* 0x4033A6B9, 0xBD707687 */
-sa2 = 1.37657754143519042600e+02, /* 0x4061350C, 0x526AE721 */
-sa3 = 4.34565877475229228821e+02, /* 0x407B290D, 0xD58A1A71 */
-sa4 = 6.45387271733267880336e+02, /* 0x40842B19, 0x21EC2868 */
-sa5 = 4.29008140027567833386e+02, /* 0x407AD021, 0x57700314 */
-sa6 = 1.08635005541779435134e+02, /* 0x405B28A3, 0xEE48AE2C */
-sa7 = 6.57024977031928170135e+00, /* 0x401A47EF, 0x8E484A93 */
-sa8 = -6.04244152148580987438e-02, /* 0xBFAEEFF2, 0xEE749A62 */
-/*
- * Coefficients for approximation to erfc in [1/.35,28]
- */
-rb0 = -9.86494292470009928597e-03, /* 0xBF843412, 0x39E86F4A */
-rb1 = -7.99283237680523006574e-01, /* 0xBFE993BA, 0x70C285DE */
-rb2 = -1.77579549177547519889e+01, /* 0xC031C209, 0x555F995A */
-rb3 = -1.60636384855821916062e+02, /* 0xC064145D, 0x43C5ED98 */
-rb4 = -6.37566443368389627722e+02, /* 0xC083EC88, 0x1375F228 */
-rb5 = -1.02509513161107724954e+03, /* 0xC0900461, 0x6A2E5992 */
-rb6 = -4.83519191608651397019e+02, /* 0xC07E384E, 0x9BDC383F */
-sb1 = 3.03380607434824582924e+01, /* 0x403E568B, 0x261D5190 */
-sb2 = 3.25792512996573918826e+02, /* 0x40745CAE, 0x221B9F0A */
-sb3 = 1.53672958608443695994e+03, /* 0x409802EB, 0x189D5118 */
-sb4 = 3.19985821950859553908e+03, /* 0x40A8FFB7, 0x688C246A */
-sb5 = 2.55305040643316442583e+03, /* 0x40A3F219, 0xCEDF3BE6 */
-sb6 = 4.74528541206955367215e+02, /* 0x407DA874, 0xE79FE763 */
-sb7 = -2.24409524465858183362e+01; /* 0xC03670E2, 0x42712D62 */
-
-#ifdef __STDC__
- double erf(double x)
-#else
- double erf(x)
- double x;
-#endif
-{
- int32_t hx,ix,i;
- double R,S,P,Q,s,y,z,r;
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) { /* erf(nan)=nan */
- i = ((u_int32_t)hx>>31)<<1;
- return (double)(1-i)+one/x; /* erf(+-inf)=+-1 */
- }
-
- if(ix < 0x3feb0000) { /* |x|<0.84375 */
- if(ix < 0x3e300000) { /* |x|<2**-28 */
- if (ix < 0x00800000)
- return 0.125*(8.0*x+efx8*x); /*avoid underflow */
- return x + efx*x;
- }
- z = x*x;
- r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
- s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
- y = r/s;
- return x + x*y;
- }
- if(ix < 0x3ff40000) { /* 0.84375 <= |x| < 1.25 */
- s = fabs(x)-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if(hx>=0) return erx + P/Q; else return -erx - P/Q;
- }
- if (ix >= 0x40180000) { /* inf>|x|>=6 */
- if(hx>=0) return one-tiny; else return tiny-one;
- }
- x = fabs(x);
- s = one/(x*x);
- if(ix< 0x4006DB6E) { /* |x| < 1/0.35 */
- R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
- ra5+s*(ra6+s*ra7))))));
- S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
- sa5+s*(sa6+s*(sa7+s*sa8)))))));
- } else { /* |x| >= 1/0.35 */
- R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
- rb5+s*rb6)))));
- S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
- sb5+s*(sb6+s*sb7))))));
- }
- z = x;
- SET_LOW_WORD(z,0);
- r = __ieee754_exp(-z*z-0.5625)*__ieee754_exp((z-x)*(z+x)+R/S);
- if(hx>=0) return one-r/x; else return r/x-one;
-}
-
-#ifdef __STDC__
- double erfc(double x)
-#else
- double erfc(x)
- double x;
-#endif
-{
- int32_t hx,ix;
- double R,S,P,Q,s,y,z,r;
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) { /* erfc(nan)=nan */
- /* erfc(+-inf)=0,2 */
- return (double)(((u_int32_t)hx>>31)<<1)+one/x;
- }
-
- if(ix < 0x3feb0000) { /* |x|<0.84375 */
- if(ix < 0x3c700000) /* |x|<2**-56 */
- return one-x;
- z = x*x;
- r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
- s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
- y = r/s;
- if(hx < 0x3fd00000) { /* x<1/4 */
- return one-(x+x*y);
- } else {
- r = x*y;
- r += (x-half);
- return half - r ;
- }
- }
- if(ix < 0x3ff40000) { /* 0.84375 <= |x| < 1.25 */
- s = fabs(x)-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if(hx>=0) {
- z = one-erx; return z - P/Q;
- } else {
- z = erx+P/Q; return one+z;
- }
- }
- if (ix < 0x403c0000) { /* |x|<28 */
- x = fabs(x);
- s = one/(x*x);
- if(ix< 0x4006DB6D) { /* |x| < 1/.35 ~ 2.857143*/
- R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
- ra5+s*(ra6+s*ra7))))));
- S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
- sa5+s*(sa6+s*(sa7+s*sa8)))))));
- } else { /* |x| >= 1/.35 ~ 2.857143 */
- if(hx<0&&ix>=0x40180000) return two-tiny;/* x < -6 */
- R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
- rb5+s*rb6)))));
- S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
- sb5+s*(sb6+s*sb7))))));
- }
- z = x;
- SET_LOW_WORD(z,0);
- r = __ieee754_exp(-z*z-0.5625)*
- __ieee754_exp((z-x)*(z+x)+R/S);
- if(hx>0) return r/x; else return two-r/x;
- } else {
- if(hx>0) return tiny*tiny; else return two-tiny;
- }
-}
diff --git a/lib/msun/src/s_erff.c b/lib/msun/src/s_erff.c
deleted file mode 100644
index 1a3b3b2..0000000
--- a/lib/msun/src/s_erff.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/* s_erff.c -- float version of s_erf.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-tiny = 1e-30,
-half= 5.0000000000e-01, /* 0x3F000000 */
-one = 1.0000000000e+00, /* 0x3F800000 */
-two = 2.0000000000e+00, /* 0x40000000 */
- /* c = (subfloat)0.84506291151 */
-erx = 8.4506291151e-01, /* 0x3f58560b */
-/*
- * Coefficients for approximation to erf on [0,0.84375]
- */
-efx = 1.2837916613e-01, /* 0x3e0375d4 */
-efx8= 1.0270333290e+00, /* 0x3f8375d4 */
-pp0 = 1.2837916613e-01, /* 0x3e0375d4 */
-pp1 = -3.2504209876e-01, /* 0xbea66beb */
-pp2 = -2.8481749818e-02, /* 0xbce9528f */
-pp3 = -5.7702702470e-03, /* 0xbbbd1489 */
-pp4 = -2.3763017452e-05, /* 0xb7c756b1 */
-qq1 = 3.9791721106e-01, /* 0x3ecbbbce */
-qq2 = 6.5022252500e-02, /* 0x3d852a63 */
-qq3 = 5.0813062117e-03, /* 0x3ba68116 */
-qq4 = 1.3249473704e-04, /* 0x390aee49 */
-qq5 = -3.9602282413e-06, /* 0xb684e21a */
-/*
- * Coefficients for approximation to erf in [0.84375,1.25]
- */
-pa0 = -2.3621185683e-03, /* 0xbb1acdc6 */
-pa1 = 4.1485610604e-01, /* 0x3ed46805 */
-pa2 = -3.7220788002e-01, /* 0xbebe9208 */
-pa3 = 3.1834661961e-01, /* 0x3ea2fe54 */
-pa4 = -1.1089469492e-01, /* 0xbde31cc2 */
-pa5 = 3.5478305072e-02, /* 0x3d1151b3 */
-pa6 = -2.1663755178e-03, /* 0xbb0df9c0 */
-qa1 = 1.0642088205e-01, /* 0x3dd9f331 */
-qa2 = 5.4039794207e-01, /* 0x3f0a5785 */
-qa3 = 7.1828655899e-02, /* 0x3d931ae7 */
-qa4 = 1.2617121637e-01, /* 0x3e013307 */
-qa5 = 1.3637083583e-02, /* 0x3c5f6e13 */
-qa6 = 1.1984500103e-02, /* 0x3c445aa3 */
-/*
- * Coefficients for approximation to erfc in [1.25,1/0.35]
- */
-ra0 = -9.8649440333e-03, /* 0xbc21a093 */
-ra1 = -6.9385856390e-01, /* 0xbf31a0b7 */
-ra2 = -1.0558626175e+01, /* 0xc128f022 */
-ra3 = -6.2375331879e+01, /* 0xc2798057 */
-ra4 = -1.6239666748e+02, /* 0xc322658c */
-ra5 = -1.8460508728e+02, /* 0xc3389ae7 */
-ra6 = -8.1287437439e+01, /* 0xc2a2932b */
-ra7 = -9.8143291473e+00, /* 0xc11d077e */
-sa1 = 1.9651271820e+01, /* 0x419d35ce */
-sa2 = 1.3765776062e+02, /* 0x4309a863 */
-sa3 = 4.3456588745e+02, /* 0x43d9486f */
-sa4 = 6.4538726807e+02, /* 0x442158c9 */
-sa5 = 4.2900814819e+02, /* 0x43d6810b */
-sa6 = 1.0863500214e+02, /* 0x42d9451f */
-sa7 = 6.5702495575e+00, /* 0x40d23f7c */
-sa8 = -6.0424413532e-02, /* 0xbd777f97 */
-/*
- * Coefficients for approximation to erfc in [1/.35,28]
- */
-rb0 = -9.8649431020e-03, /* 0xbc21a092 */
-rb1 = -7.9928326607e-01, /* 0xbf4c9dd4 */
-rb2 = -1.7757955551e+01, /* 0xc18e104b */
-rb3 = -1.6063638306e+02, /* 0xc320a2ea */
-rb4 = -6.3756646729e+02, /* 0xc41f6441 */
-rb5 = -1.0250950928e+03, /* 0xc480230b */
-rb6 = -4.8351919556e+02, /* 0xc3f1c275 */
-sb1 = 3.0338060379e+01, /* 0x41f2b459 */
-sb2 = 3.2579251099e+02, /* 0x43a2e571 */
-sb3 = 1.5367296143e+03, /* 0x44c01759 */
-sb4 = 3.1998581543e+03, /* 0x4547fdbb */
-sb5 = 2.5530502930e+03, /* 0x451f90ce */
-sb6 = 4.7452853394e+02, /* 0x43ed43a7 */
-sb7 = -2.2440952301e+01; /* 0xc1b38712 */
-
-#ifdef __STDC__
- float erff(float x)
-#else
- float erff(x)
- float x;
-#endif
-{
- int32_t hx,ix,i;
- float R,S,P,Q,s,y,z,r;
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7f800000) { /* erf(nan)=nan */
- i = ((u_int32_t)hx>>31)<<1;
- return (float)(1-i)+one/x; /* erf(+-inf)=+-1 */
- }
-
- if(ix < 0x3f580000) { /* |x|<0.84375 */
- if(ix < 0x31800000) { /* |x|<2**-28 */
- if (ix < 0x04000000)
- /*avoid underflow */
- return (float)0.125*((float)8.0*x+efx8*x);
- return x + efx*x;
- }
- z = x*x;
- r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
- s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
- y = r/s;
- return x + x*y;
- }
- if(ix < 0x3fa00000) { /* 0.84375 <= |x| < 1.25 */
- s = fabsf(x)-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if(hx>=0) return erx + P/Q; else return -erx - P/Q;
- }
- if (ix >= 0x40c00000) { /* inf>|x|>=6 */
- if(hx>=0) return one-tiny; else return tiny-one;
- }
- x = fabsf(x);
- s = one/(x*x);
- if(ix< 0x4036DB6E) { /* |x| < 1/0.35 */
- R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
- ra5+s*(ra6+s*ra7))))));
- S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
- sa5+s*(sa6+s*(sa7+s*sa8)))))));
- } else { /* |x| >= 1/0.35 */
- R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
- rb5+s*rb6)))));
- S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
- sb5+s*(sb6+s*sb7))))));
- }
- GET_FLOAT_WORD(ix,x);
- SET_FLOAT_WORD(z,ix&0xfffff000);
- r = __ieee754_expf(-z*z-(float)0.5625)*__ieee754_expf((z-x)*(z+x)+R/S);
- if(hx>=0) return one-r/x; else return r/x-one;
-}
-
-#ifdef __STDC__
- float erfcf(float x)
-#else
- float erfcf(x)
- float x;
-#endif
-{
- int32_t hx,ix;
- float R,S,P,Q,s,y,z,r;
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if(ix>=0x7f800000) { /* erfc(nan)=nan */
- /* erfc(+-inf)=0,2 */
- return (float)(((u_int32_t)hx>>31)<<1)+one/x;
- }
-
- if(ix < 0x3f580000) { /* |x|<0.84375 */
- if(ix < 0x23800000) /* |x|<2**-56 */
- return one-x;
- z = x*x;
- r = pp0+z*(pp1+z*(pp2+z*(pp3+z*pp4)));
- s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5))));
- y = r/s;
- if(hx < 0x3e800000) { /* x<1/4 */
- return one-(x+x*y);
- } else {
- r = x*y;
- r += (x-half);
- return half - r ;
- }
- }
- if(ix < 0x3fa00000) { /* 0.84375 <= |x| < 1.25 */
- s = fabsf(x)-one;
- P = pa0+s*(pa1+s*(pa2+s*(pa3+s*(pa4+s*(pa5+s*pa6)))));
- Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6)))));
- if(hx>=0) {
- z = one-erx; return z - P/Q;
- } else {
- z = erx+P/Q; return one+z;
- }
- }
- if (ix < 0x41e00000) { /* |x|<28 */
- x = fabsf(x);
- s = one/(x*x);
- if(ix< 0x4036DB6D) { /* |x| < 1/.35 ~ 2.857143*/
- R=ra0+s*(ra1+s*(ra2+s*(ra3+s*(ra4+s*(
- ra5+s*(ra6+s*ra7))))));
- S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*(
- sa5+s*(sa6+s*(sa7+s*sa8)))))));
- } else { /* |x| >= 1/.35 ~ 2.857143 */
- if(hx<0&&ix>=0x40c00000) return two-tiny;/* x < -6 */
- R=rb0+s*(rb1+s*(rb2+s*(rb3+s*(rb4+s*(
- rb5+s*rb6)))));
- S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*(
- sb5+s*(sb6+s*sb7))))));
- }
- GET_FLOAT_WORD(ix,x);
- SET_FLOAT_WORD(z,ix&0xfffff000);
- r = __ieee754_expf(-z*z-(float)0.5625)*
- __ieee754_expf((z-x)*(z+x)+R/S);
- if(hx>0) return r/x; else return two-r/x;
- } else {
- if(hx>0) return tiny*tiny; else return two-tiny;
- }
-}
diff --git a/lib/msun/src/s_expm1.c b/lib/msun/src/s_expm1.c
deleted file mode 100644
index bff3492..0000000
--- a/lib/msun/src/s_expm1.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/* @(#)s_expm1.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* expm1(x)
- * Returns exp(x)-1, the exponential of x minus 1.
- *
- * Method
- * 1. Argument reduction:
- * Given x, find r and integer k such that
- *
- * x = k*ln2 + r, |r| <= 0.5*ln2 ~ 0.34658
- *
- * Here a correction term c will be computed to compensate
- * the error in r when rounded to a floating-point number.
- *
- * 2. Approximating expm1(r) by a special rational function on
- * the interval [0,0.34658]:
- * Since
- * r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 - r^4/360 + ...
- * we define R1(r*r) by
- * r*(exp(r)+1)/(exp(r)-1) = 2+ r^2/6 * R1(r*r)
- * That is,
- * R1(r**2) = 6/r *((exp(r)+1)/(exp(r)-1) - 2/r)
- * = 6/r * ( 1 + 2.0*(1/(exp(r)-1) - 1/r))
- * = 1 - r^2/60 + r^4/2520 - r^6/100800 + ...
- * We use a special Reme algorithm on [0,0.347] to generate
- * a polynomial of degree 5 in r*r to approximate R1. The
- * maximum error of this polynomial approximation is bounded
- * by 2**-61. In other words,
- * R1(z) ~ 1.0 + Q1*z + Q2*z**2 + Q3*z**3 + Q4*z**4 + Q5*z**5
- * where Q1 = -1.6666666666666567384E-2,
- * Q2 = 3.9682539681370365873E-4,
- * Q3 = -9.9206344733435987357E-6,
- * Q4 = 2.5051361420808517002E-7,
- * Q5 = -6.2843505682382617102E-9;
- * (where z=r*r, and the values of Q1 to Q5 are listed below)
- * with error bounded by
- * | 5 | -61
- * | 1.0+Q1*z+...+Q5*z - R1(z) | <= 2
- * | |
- *
- * expm1(r) = exp(r)-1 is then computed by the following
- * specific way which minimize the accumulation rounding error:
- * 2 3
- * r r [ 3 - (R1 + R1*r/2) ]
- * expm1(r) = r + --- + --- * [--------------------]
- * 2 2 [ 6 - r*(3 - R1*r/2) ]
- *
- * To compensate the error in the argument reduction, we use
- * expm1(r+c) = expm1(r) + c + expm1(r)*c
- * ~ expm1(r) + c + r*c
- * Thus c+r*c will be added in as the correction terms for
- * expm1(r+c). Now rearrange the term to avoid optimization
- * screw up:
- * ( 2 2 )
- * ({ ( r [ R1 - (3 - R1*r/2) ] ) } r )
- * expm1(r+c)~r - ({r*(--- * [--------------------]-c)-c} - --- )
- * ({ ( 2 [ 6 - r*(3 - R1*r/2) ] ) } 2 )
- * ( )
- *
- * = r - E
- * 3. Scale back to obtain expm1(x):
- * From step 1, we have
- * expm1(x) = either 2^k*[expm1(r)+1] - 1
- * = or 2^k*[expm1(r) + (1-2^-k)]
- * 4. Implementation notes:
- * (A). To save one multiplication, we scale the coefficient Qi
- * to Qi*2^i, and replace z by (x^2)/2.
- * (B). To achieve maximum accuracy, we compute expm1(x) by
- * (i) if x < -56*ln2, return -1.0, (raise inexact if x!=inf)
- * (ii) if k=0, return r-E
- * (iii) if k=-1, return 0.5*(r-E)-0.5
- * (iv) if k=1 if r < -0.25, return 2*((r+0.5)- E)
- * else return 1.0+2.0*(r-E);
- * (v) if (k<-2||k>56) return 2^k(1-(E-r)) - 1 (or exp(x)-1)
- * (vi) if k <= 20, return 2^k((1-2^-k)-(E-r)), else
- * (vii) return 2^k(1-((E+2^-k)-r))
- *
- * Special cases:
- * expm1(INF) is INF, expm1(NaN) is NaN;
- * expm1(-INF) is -1, and
- * for finite argument, only expm1(0)=0 is exact.
- *
- * Accuracy:
- * according to an error analysis, the error is always less than
- * 1 ulp (unit in the last place).
- *
- * Misc. info.
- * For IEEE double
- * if x > 7.09782712893383973096e+02 then expm1(x) overflow
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
- * to produce the hexadecimal values shown.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-one = 1.0,
-huge = 1.0e+300,
-tiny = 1.0e-300,
-o_threshold = 7.09782712893383973096e+02,/* 0x40862E42, 0xFEFA39EF */
-ln2_hi = 6.93147180369123816490e-01,/* 0x3fe62e42, 0xfee00000 */
-ln2_lo = 1.90821492927058770002e-10,/* 0x3dea39ef, 0x35793c76 */
-invln2 = 1.44269504088896338700e+00,/* 0x3ff71547, 0x652b82fe */
- /* scaled coefficients related to expm1 */
-Q1 = -3.33333333333331316428e-02, /* BFA11111 111110F4 */
-Q2 = 1.58730158725481460165e-03, /* 3F5A01A0 19FE5585 */
-Q3 = -7.93650757867487942473e-05, /* BF14CE19 9EAADBB7 */
-Q4 = 4.00821782732936239552e-06, /* 3ED0CFCA 86E65239 */
-Q5 = -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */
-
-#ifdef __STDC__
- double expm1(double x)
-#else
- double expm1(x)
- double x;
-#endif
-{
- double y,hi,lo,c,t,e,hxs,hfx,r1;
- int32_t k,xsb;
- u_int32_t hx;
-
- GET_HIGH_WORD(hx,x);
- xsb = hx&0x80000000; /* sign bit of x */
- if(xsb==0) y=x; else y= -x; /* y = |x| */
- hx &= 0x7fffffff; /* high word of |x| */
-
- /* filter out huge and non-finite argument */
- if(hx >= 0x4043687A) { /* if |x|>=56*ln2 */
- if(hx >= 0x40862E42) { /* if |x|>=709.78... */
- if(hx>=0x7ff00000) {
- u_int32_t low;
- GET_LOW_WORD(low,x);
- if(((hx&0xfffff)|low)!=0)
- return x+x; /* NaN */
- else return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */
- }
- if(x > o_threshold) return huge*huge; /* overflow */
- }
- if(xsb!=0) { /* x < -56*ln2, return -1.0 with inexact */
- if(x+tiny<0.0) /* raise inexact */
- return tiny-one; /* return -1 */
- }
- }
-
- /* argument reduction */
- if(hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */
- if(hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */
- if(xsb==0)
- {hi = x - ln2_hi; lo = ln2_lo; k = 1;}
- else
- {hi = x + ln2_hi; lo = -ln2_lo; k = -1;}
- } else {
- k = invln2*x+((xsb==0)?0.5:-0.5);
- t = k;
- hi = x - t*ln2_hi; /* t*ln2_hi is exact here */
- lo = t*ln2_lo;
- }
- x = hi - lo;
- c = (hi-x)-lo;
- }
- else if(hx < 0x3c900000) { /* when |x|<2**-54, return x */
- t = huge+x; /* return x with inexact flags when x!=0 */
- return x - (t-(huge+x));
- }
- else k = 0;
-
- /* x is now in primary range */
- hfx = 0.5*x;
- hxs = x*hfx;
- r1 = one+hxs*(Q1+hxs*(Q2+hxs*(Q3+hxs*(Q4+hxs*Q5))));
- t = 3.0-r1*hfx;
- e = hxs*((r1-t)/(6.0 - x*t));
- if(k==0) return x - (x*e-hxs); /* c is 0 */
- else {
- e = (x*(e-c)-c);
- e -= hxs;
- if(k== -1) return 0.5*(x-e)-0.5;
- if(k==1)
- if(x < -0.25) return -2.0*(e-(x+0.5));
- else return one+2.0*(x-e);
- if (k <= -2 || k>56) { /* suffice to return exp(x)-1 */
- u_int32_t high;
- y = one-(e-x);
- GET_HIGH_WORD(high,y);
- SET_HIGH_WORD(y,high+(k<<20)); /* add k to y's exponent */
- return y-one;
- }
- t = one;
- if(k<20) {
- u_int32_t high;
- SET_HIGH_WORD(t,0x3ff00000 - (0x200000>>k)); /* t=1-2^-k */
- y = t-(e-x);
- GET_HIGH_WORD(high,y);
- SET_HIGH_WORD(y,high+(k<<20)); /* add k to y's exponent */
- } else {
- u_int32_t high;
- SET_HIGH_WORD(t,((0x3ff-k)<<20)); /* 2^-k */
- y = x-(e+t);
- y += one;
- GET_HIGH_WORD(high,y);
- SET_HIGH_WORD(y,high+(k<<20)); /* add k to y's exponent */
- }
- }
- return y;
-}
diff --git a/lib/msun/src/s_expm1f.c b/lib/msun/src/s_expm1f.c
deleted file mode 100644
index e6d8709..0000000
--- a/lib/msun/src/s_expm1f.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/* s_expm1f.c -- float version of s_expm1.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-one = 1.0,
-huge = 1.0e+30,
-tiny = 1.0e-30,
-o_threshold = 8.8721679688e+01,/* 0x42b17180 */
-ln2_hi = 6.9313812256e-01,/* 0x3f317180 */
-ln2_lo = 9.0580006145e-06,/* 0x3717f7d1 */
-invln2 = 1.4426950216e+00,/* 0x3fb8aa3b */
- /* scaled coefficients related to expm1 */
-Q1 = -3.3333335072e-02, /* 0xbd088889 */
-Q2 = 1.5873016091e-03, /* 0x3ad00d01 */
-Q3 = -7.9365076090e-05, /* 0xb8a670cd */
-Q4 = 4.0082177293e-06, /* 0x36867e54 */
-Q5 = -2.0109921195e-07; /* 0xb457edbb */
-
-#ifdef __STDC__
- float expm1f(float x)
-#else
- float expm1f(x)
- float x;
-#endif
-{
- float y,hi,lo,c,t,e,hxs,hfx,r1;
- int32_t k,xsb;
- u_int32_t hx;
-
- GET_FLOAT_WORD(hx,x);
- xsb = hx&0x80000000; /* sign bit of x */
- if(xsb==0) y=x; else y= -x; /* y = |x| */
- hx &= 0x7fffffff; /* high word of |x| */
-
- /* filter out huge and non-finite argument */
- if(hx >= 0x4195b844) { /* if |x|>=27*ln2 */
- if(hx >= 0x42b17218) { /* if |x|>=88.721... */
- if(hx>0x7f800000)
- return x+x; /* NaN */
- if(hx==0x7f800000)
- return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */
- if(x > o_threshold) return huge*huge; /* overflow */
- }
- if(xsb!=0) { /* x < -27*ln2, return -1.0 with inexact */
- if(x+tiny<(float)0.0) /* raise inexact */
- return tiny-one; /* return -1 */
- }
- }
-
- /* argument reduction */
- if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */
- if(hx < 0x3F851592) { /* and |x| < 1.5 ln2 */
- if(xsb==0)
- {hi = x - ln2_hi; lo = ln2_lo; k = 1;}
- else
- {hi = x + ln2_hi; lo = -ln2_lo; k = -1;}
- } else {
- k = invln2*x+((xsb==0)?(float)0.5:(float)-0.5);
- t = k;
- hi = x - t*ln2_hi; /* t*ln2_hi is exact here */
- lo = t*ln2_lo;
- }
- x = hi - lo;
- c = (hi-x)-lo;
- }
- else if(hx < 0x33000000) { /* when |x|<2**-25, return x */
- t = huge+x; /* return x with inexact flags when x!=0 */
- return x - (t-(huge+x));
- }
- else k = 0;
-
- /* x is now in primary range */
- hfx = (float)0.5*x;
- hxs = x*hfx;
- r1 = one+hxs*(Q1+hxs*(Q2+hxs*(Q3+hxs*(Q4+hxs*Q5))));
- t = (float)3.0-r1*hfx;
- e = hxs*((r1-t)/((float)6.0 - x*t));
- if(k==0) return x - (x*e-hxs); /* c is 0 */
- else {
- e = (x*(e-c)-c);
- e -= hxs;
- if(k== -1) return (float)0.5*(x-e)-(float)0.5;
- if(k==1)
- if(x < (float)-0.25) return -(float)2.0*(e-(x+(float)0.5));
- else return one+(float)2.0*(x-e);
- if (k <= -2 || k>56) { /* suffice to return exp(x)-1 */
- int32_t i;
- y = one-(e-x);
- GET_FLOAT_WORD(i,y);
- SET_FLOAT_WORD(y,i+(k<<23)); /* add k to y's exponent */
- return y-one;
- }
- t = one;
- if(k<23) {
- int32_t i;
- SET_FLOAT_WORD(t,0x3f800000 - (0x1000000>>k)); /* t=1-2^-k */
- y = t-(e-x);
- GET_FLOAT_WORD(i,y);
- SET_FLOAT_WORD(y,i+(k<<23)); /* add k to y's exponent */
- } else {
- int32_t i;
- SET_FLOAT_WORD(t,((0x7f-k)<<23)); /* 2^-k */
- y = x-(e+t);
- y += one;
- GET_FLOAT_WORD(i,y);
- SET_FLOAT_WORD(y,i+(k<<23)); /* add k to y's exponent */
- }
- }
- return y;
-}
diff --git a/lib/msun/src/s_fabs.c b/lib/msun/src/s_fabs.c
deleted file mode 100644
index ef15a69..0000000
--- a/lib/msun/src/s_fabs.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* @(#)s_fabs.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * fabs(x) returns the absolute value of x.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double fabs(double x)
-#else
- double fabs(x)
- double x;
-#endif
-{
- u_int32_t high;
- GET_HIGH_WORD(high,x);
- SET_HIGH_WORD(x,high&0x7fffffff);
- return x;
-}
diff --git a/lib/msun/src/s_fabsf.c b/lib/msun/src/s_fabsf.c
deleted file mode 100644
index d064ba0..0000000
--- a/lib/msun/src/s_fabsf.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* s_fabsf.c -- float version of s_fabs.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * fabsf(x) returns the absolute value of x.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float fabsf(float x)
-#else
- float fabsf(x)
- float x;
-#endif
-{
- u_int32_t ix;
- GET_FLOAT_WORD(ix,x);
- SET_FLOAT_WORD(x,ix&0x7fffffff);
- return x;
-}
diff --git a/lib/msun/src/s_finite.c b/lib/msun/src/s_finite.c
deleted file mode 100644
index b5429b4..0000000
--- a/lib/msun/src/s_finite.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* @(#)s_finite.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * finite(x) returns 1 is x is finite, else 0;
- * no branching!
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- int __generic_finite(double x)
-#else
- int __generic_finite(x)
- double x;
-#endif
-{
- int32_t hx;
- GET_HIGH_WORD(hx,x);
- return (int)((u_int32_t)((hx&0x7fffffff)-0x7ff00000)>>31);
-}
diff --git a/lib/msun/src/s_finitef.c b/lib/msun/src/s_finitef.c
deleted file mode 100644
index 0243993..0000000
--- a/lib/msun/src/s_finitef.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* s_finitef.c -- float version of s_finite.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * finitef(x) returns 1 is x is finite, else 0;
- * no branching!
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- int finitef(float x)
-#else
- int finitef(x)
- float x;
-#endif
-{
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- return (int)((u_int32_t)((ix&0x7fffffff)-0x7f800000)>>31);
-}
diff --git a/lib/msun/src/s_floor.c b/lib/msun/src/s_floor.c
deleted file mode 100644
index 37f0e1d..0000000
--- a/lib/msun/src/s_floor.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* @(#)s_floor.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * floor(x)
- * Return x rounded toward -inf to integral value
- * Method:
- * Bit twiddling.
- * Exception:
- * Inexact flag raised if x not equal to floor(x).
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double huge = 1.0e300;
-#else
-static double huge = 1.0e300;
-#endif
-
-#ifdef __STDC__
- double __generic_floor(double x)
-#else
- double __generic_floor(x)
- double x;
-#endif
-{
- int32_t i0,i1,j0;
- u_int32_t i,j;
- EXTRACT_WORDS(i0,i1,x);
- j0 = ((i0>>20)&0x7ff)-0x3ff;
- if(j0<20) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0>=0) {i0=i1=0;}
- else if(((i0&0x7fffffff)|i1)!=0)
- { i0=0xbff00000;i1=0;}
- }
- } else {
- i = (0x000fffff)>>j0;
- if(((i0&i)|i1)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0<0) i0 += (0x00100000)>>j0;
- i0 &= (~i); i1=0;
- }
- }
- } else if (j0>51) {
- if(j0==0x400) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- } else {
- i = ((u_int32_t)(0xffffffff))>>(j0-20);
- if((i1&i)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0<0) {
- if(j0==20) i0+=1;
- else {
- j = i1+(1<<(52-j0));
- if(j<i1) i0 +=1 ; /* got a carry */
- i1=j;
- }
- }
- i1 &= (~i);
- }
- }
- INSERT_WORDS(x,i0,i1);
- return x;
-}
diff --git a/lib/msun/src/s_floorf.c b/lib/msun/src/s_floorf.c
deleted file mode 100644
index caa6427..0000000
--- a/lib/msun/src/s_floorf.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* s_floorf.c -- float version of s_floor.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * floorf(x)
- * Return x rounded toward -inf to integral value
- * Method:
- * Bit twiddling.
- * Exception:
- * Inexact flag raised if x not equal to floorf(x).
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float huge = 1.0e30;
-#else
-static float huge = 1.0e30;
-#endif
-
-#ifdef __STDC__
- float floorf(float x)
-#else
- float floorf(x)
- float x;
-#endif
-{
- int32_t i0,j0;
- u_int32_t i;
- GET_FLOAT_WORD(i0,x);
- j0 = ((i0>>23)&0xff)-0x7f;
- if(j0<23) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0>=0) {i0=0;}
- else if((i0&0x7fffffff)!=0)
- { i0=0xbf800000;}
- }
- } else {
- i = (0x007fffff)>>j0;
- if((i0&i)==0) return x; /* x is integral */
- if(huge+x>(float)0.0) { /* raise inexact flag */
- if(i0<0) i0 += (0x00800000)>>j0;
- i0 &= (~i);
- }
- }
- } else {
- if(j0==0x80) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- }
- SET_FLOAT_WORD(x,i0);
- return x;
-}
diff --git a/lib/msun/src/s_frexp.c b/lib/msun/src/s_frexp.c
deleted file mode 100644
index c6b5244..0000000
--- a/lib/msun/src/s_frexp.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* @(#)s_frexp.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * for non-zero x
- * x = frexp(arg,&exp);
- * return a double fp quantity x such that 0.5 <= |x| <1.0
- * and the corresponding binary exponent "exp". That is
- * arg = x*2^exp.
- * If arg is inf, 0.0, or NaN, then frexp(arg,&exp) returns arg
- * with *exp=0.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */
-
-#ifdef __STDC__
- double frexp(double x, int *eptr)
-#else
- double frexp(x, eptr)
- double x; int *eptr;
-#endif
-{
- int32_t hx, ix, lx;
- EXTRACT_WORDS(hx,lx,x);
- ix = 0x7fffffff&hx;
- *eptr = 0;
- if(ix>=0x7ff00000||((ix|lx)==0)) return x; /* 0,inf,nan */
- if (ix<0x00100000) { /* subnormal */
- x *= two54;
- GET_HIGH_WORD(hx,x);
- ix = hx&0x7fffffff;
- *eptr = -54;
- }
- *eptr += (ix>>20)-1022;
- hx = (hx&0x800fffff)|0x3fe00000;
- SET_HIGH_WORD(x,hx);
- return x;
-}
diff --git a/lib/msun/src/s_frexpf.c b/lib/msun/src/s_frexpf.c
deleted file mode 100644
index 1a1df34..0000000
--- a/lib/msun/src/s_frexpf.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* s_frexpf.c -- float version of s_frexp.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-two25 = 3.3554432000e+07; /* 0x4c000000 */
-
-#ifdef __STDC__
- float frexpf(float x, int *eptr)
-#else
- float frexpf(x, eptr)
- float x; int *eptr;
-#endif
-{
- int32_t hx,ix;
- GET_FLOAT_WORD(hx,x);
- ix = 0x7fffffff&hx;
- *eptr = 0;
- if(ix>=0x7f800000||(ix==0)) return x; /* 0,inf,nan */
- if (ix<0x00800000) { /* subnormal */
- x *= two25;
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- *eptr = -25;
- }
- *eptr += (ix>>23)-126;
- hx = (hx&0x807fffff)|0x3f000000;
- *(int*)&x = hx;
- return x;
-}
diff --git a/lib/msun/src/s_ilogb.c b/lib/msun/src/s_ilogb.c
deleted file mode 100644
index 9a10666..0000000
--- a/lib/msun/src/s_ilogb.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* @(#)s_ilogb.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* ilogb(double x)
- * return the binary exponent of non-zero x
- * ilogb(0) = 0x80000001
- * ilogb(inf/NaN) = 0x7fffffff (no signal is raised)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- int __generic_ilogb(double x)
-#else
- int __generic_ilogb(x)
- double x;
-#endif
-{
- int32_t hx,lx,ix;
-
- EXTRACT_WORDS(hx,lx,x);
- hx &= 0x7fffffff;
- if(hx<0x00100000) {
- if((hx|lx)==0)
- return 0x80000001; /* ilogb(0) = 0x80000001 */
- else /* subnormal x */
- if(hx==0) {
- for (ix = -1043; lx>0; lx<<=1) ix -=1;
- } else {
- for (ix = -1022,hx<<=11; hx>0; hx<<=1) ix -=1;
- }
- return ix;
- }
- else if (hx<0x7ff00000) return (hx>>20)-1023;
- else return 0x7fffffff;
-}
diff --git a/lib/msun/src/s_ilogbf.c b/lib/msun/src/s_ilogbf.c
deleted file mode 100644
index 31c0443..0000000
--- a/lib/msun/src/s_ilogbf.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* s_ilogbf.c -- float version of s_ilogb.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- int ilogbf(float x)
-#else
- int ilogbf(x)
- float x;
-#endif
-{
- int32_t hx,ix;
-
- GET_FLOAT_WORD(hx,x);
- hx &= 0x7fffffff;
- if(hx<0x00800000) {
- if(hx==0)
- return 0x80000001; /* ilogb(0) = 0x80000001 */
- else /* subnormal x */
- for (ix = -126,hx<<=8; hx>0; hx<<=1) ix -=1;
- return ix;
- }
- else if (hx<0x7f800000) return (hx>>23)-127;
- else return 0x7fffffff;
-}
diff --git a/lib/msun/src/s_isnan.c b/lib/msun/src/s_isnan.c
deleted file mode 100644
index 212a5ee..0000000
--- a/lib/msun/src/s_isnan.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* @(#)s_isnan.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * isnan(x) returns 1 is x is nan, else 0;
- * no branching!
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- int isnan(double x)
-#else
- int isnan(x)
- double x;
-#endif
-{
- int32_t hx,lx;
- EXTRACT_WORDS(hx,lx,x);
- hx &= 0x7fffffff;
- hx |= (u_int32_t)(lx|(-lx))>>31;
- hx = 0x7ff00000 - hx;
- return (int)((u_int32_t)(hx))>>31;
-}
diff --git a/lib/msun/src/s_isnanf.c b/lib/msun/src/s_isnanf.c
deleted file mode 100644
index 8432c0e..0000000
--- a/lib/msun/src/s_isnanf.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* s_isnanf.c -- float version of s_isnan.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * isnanf(x) returns 1 is x is nan, else 0;
- * no branching!
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- int isnanf(float x)
-#else
- int isnanf(x)
- float x;
-#endif
-{
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff;
- ix = 0x7f800000 - ix;
- return (int)(((u_int32_t)(ix))>>31);
-}
diff --git a/lib/msun/src/s_ldexp.c b/lib/msun/src/s_ldexp.c
deleted file mode 100644
index 8fe2d4b..0000000
--- a/lib/msun/src/s_ldexp.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* @(#)s_ldexp.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-#include <errno.h>
-
-#ifdef __STDC__
- double ldexp(double value, int exp)
-#else
- double ldexp(value, exp)
- double value; int exp;
-#endif
-{
- if(!finite(value)||value==0.0) return value;
- value = scalbn(value,exp);
- if(!finite(value)||value==0.0) errno = ERANGE;
- return value;
-}
diff --git a/lib/msun/src/s_ldexpf.c b/lib/msun/src/s_ldexpf.c
deleted file mode 100644
index ff01c1d..0000000
--- a/lib/msun/src/s_ldexpf.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* s_ldexpf.c -- float version of s_ldexp.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-#include <errno.h>
-
-#ifdef __STDC__
- float ldexpf(float value, int exp)
-#else
- float ldexpf(value, exp)
- float value; int exp;
-#endif
-{
- if(!finitef(value)||value==(float)0.0) return value;
- value = scalbnf(value,exp);
- if(!finitef(value)||value==(float)0.0) errno = ERANGE;
- return value;
-}
diff --git a/lib/msun/src/s_lib_version.c b/lib/msun/src/s_lib_version.c
deleted file mode 100644
index b9ca845..0000000
--- a/lib/msun/src/s_lib_version.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* @(#)s_lib_ver.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * MACRO for standards
- */
-
-#include "math.h"
-#include "math_private.h"
-
-/*
- * define and initialize _LIB_VERSION
- */
-#ifdef _POSIX_MODE
-_LIB_VERSION_TYPE _LIB_VERSION = _POSIX_;
-#else
-#ifdef _XOPEN_MODE
-_LIB_VERSION_TYPE _LIB_VERSION = _XOPEN_;
-#else
-#ifdef _SVID3_MODE
-_LIB_VERSION_TYPE _LIB_VERSION = _SVID_;
-#else /* default _IEEE_MODE */
-_LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
-#endif
-#endif
-#endif
diff --git a/lib/msun/src/s_log1p.c b/lib/msun/src/s_log1p.c
deleted file mode 100644
index 07bc93a..0000000
--- a/lib/msun/src/s_log1p.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/* @(#)s_log1p.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* double log1p(double x)
- *
- * Method :
- * 1. Argument Reduction: find k and f such that
- * 1+x = 2^k * (1+f),
- * where sqrt(2)/2 < 1+f < sqrt(2) .
- *
- * Note. If k=0, then f=x is exact. However, if k!=0, then f
- * may not be representable exactly. In that case, a correction
- * term is need. Let u=1+x rounded. Let c = (1+x)-u, then
- * log(1+x) - log(u) ~ c/u. Thus, we proceed to compute log(u),
- * and add back the correction term c/u.
- * (Note: when x > 2**53, one can simply return log(x))
- *
- * 2. Approximation of log1p(f).
- * Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
- * = 2s + 2/3 s**3 + 2/5 s**5 + .....,
- * = 2s + s*R
- * We use a special Reme algorithm on [0,0.1716] to generate
- * a polynomial of degree 14 to approximate R The maximum error
- * of this polynomial approximation is bounded by 2**-58.45. In
- * other words,
- * 2 4 6 8 10 12 14
- * R(z) ~ Lp1*s +Lp2*s +Lp3*s +Lp4*s +Lp5*s +Lp6*s +Lp7*s
- * (the values of Lp1 to Lp7 are listed in the program)
- * and
- * | 2 14 | -58.45
- * | Lp1*s +...+Lp7*s - R(z) | <= 2
- * | |
- * Note that 2s = f - s*f = f - hfsq + s*hfsq, where hfsq = f*f/2.
- * In order to guarantee error in log below 1ulp, we compute log
- * by
- * log1p(f) = f - (hfsq - s*(hfsq+R)).
- *
- * 3. Finally, log1p(x) = k*ln2 + log1p(f).
- * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))
- * Here ln2 is split into two floating point number:
- * ln2_hi + ln2_lo,
- * where n*ln2_hi is always exact for |n| < 2000.
- *
- * Special cases:
- * log1p(x) is NaN with signal if x < -1 (including -INF) ;
- * log1p(+INF) is +INF; log1p(-1) is -INF with signal;
- * log1p(NaN) is that NaN with no signal.
- *
- * Accuracy:
- * according to an error analysis, the error is always less than
- * 1 ulp (unit in the last place).
- *
- * Constants:
- * The hexadecimal values are the intended ones for the following
- * constants. The decimal values may be used, provided that the
- * compiler will convert from decimal to binary accurately enough
- * to produce the hexadecimal values shown.
- *
- * Note: Assuming log() return accurate answer, the following
- * algorithm can be used to compute log1p(x) to within a few ULP:
- *
- * u = 1+x;
- * if(u==1.0) return x ; else
- * return log(u)*(x/(u-1.0));
- *
- * See HP-15C Advanced Functions Handbook, p.193.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
-ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */
-two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */
-Lp1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
-Lp2 = 3.999999999940941908e-01, /* 3FD99999 9997FA04 */
-Lp3 = 2.857142874366239149e-01, /* 3FD24924 94229359 */
-Lp4 = 2.222219843214978396e-01, /* 3FCC71C5 1D8E78AF */
-Lp5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
-Lp6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
-Lp7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
-
-#ifdef __STDC__
-static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-
-#ifdef __STDC__
- double log1p(double x)
-#else
- double log1p(x)
- double x;
-#endif
-{
- double hfsq,f,c,s,z,R,u;
- int32_t k,hx,hu,ax;
-
- GET_HIGH_WORD(hx,x);
- ax = hx&0x7fffffff;
-
- k = 1;
- if (hx < 0x3FDA827A) { /* x < 0.41422 */
- if(ax>=0x3ff00000) { /* x <= -1.0 */
- if(x==-1.0) return -two54/zero; /* log1p(-1)=+inf */
- else return (x-x)/(x-x); /* log1p(x<-1)=NaN */
- }
- if(ax<0x3e200000) { /* |x| < 2**-29 */
- if(two54+x>zero /* raise inexact */
- &&ax<0x3c900000) /* |x| < 2**-54 */
- return x;
- else
- return x - x*x*0.5;
- }
- if(hx>0||hx<=((int32_t)0xbfd2bec3)) {
- k=0;f=x;hu=1;} /* -0.2929<x<0.41422 */
- }
- if (hx >= 0x7ff00000) return x+x;
- if(k!=0) {
- if(hx<0x43400000) {
- u = 1.0+x;
- GET_HIGH_WORD(hu,u);
- k = (hu>>20)-1023;
- c = (k>0)? 1.0-(u-x):x-(u-1.0);/* correction term */
- c /= u;
- } else {
- u = x;
- GET_HIGH_WORD(hu,u);
- k = (hu>>20)-1023;
- c = 0;
- }
- hu &= 0x000fffff;
- if(hu<0x6a09e) {
- SET_HIGH_WORD(u,hu|0x3ff00000); /* normalize u */
- } else {
- k += 1;
- SET_HIGH_WORD(u,hu|0x3fe00000); /* normalize u/2 */
- hu = (0x00100000-hu)>>2;
- }
- f = u-1.0;
- }
- hfsq=0.5*f*f;
- if(hu==0) { /* |f| < 2**-20 */
- if(f==zero) if(k==0) return zero;
- else {c += k*ln2_lo; return k*ln2_hi+c;}
- R = hfsq*(1.0-0.66666666666666666*f);
- if(k==0) return f-R; else
- return k*ln2_hi-((R-(k*ln2_lo+c))-f);
- }
- s = f/(2.0+f);
- z = s*s;
- R = z*(Lp1+z*(Lp2+z*(Lp3+z*(Lp4+z*(Lp5+z*(Lp6+z*Lp7))))));
- if(k==0) return f-(hfsq-s*(hfsq+R)); else
- return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f);
-}
diff --git a/lib/msun/src/s_log1pf.c b/lib/msun/src/s_log1pf.c
deleted file mode 100644
index 54b3c61..0000000
--- a/lib/msun/src/s_log1pf.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* s_log1pf.c -- float version of s_log1p.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-ln2_hi = 6.9313812256e-01, /* 0x3f317180 */
-ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */
-two25 = 3.355443200e+07, /* 0x4c000000 */
-Lp1 = 6.6666668653e-01, /* 3F2AAAAB */
-Lp2 = 4.0000000596e-01, /* 3ECCCCCD */
-Lp3 = 2.8571429849e-01, /* 3E924925 */
-Lp4 = 2.2222198546e-01, /* 3E638E29 */
-Lp5 = 1.8183572590e-01, /* 3E3A3325 */
-Lp6 = 1.5313838422e-01, /* 3E1CD04F */
-Lp7 = 1.4798198640e-01; /* 3E178897 */
-
-#ifdef __STDC__
-static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-
-#ifdef __STDC__
- float log1pf(float x)
-#else
- float log1pf(x)
- float x;
-#endif
-{
- float hfsq,f,c,s,z,R,u;
- int32_t k,hx,hu,ax;
-
- GET_FLOAT_WORD(hx,x);
- ax = hx&0x7fffffff;
-
- k = 1;
- if (hx < 0x3ed413d7) { /* x < 0.41422 */
- if(ax>=0x3f800000) { /* x <= -1.0 */
- if(x==(float)-1.0) return -two25/zero; /* log1p(-1)=+inf */
- else return (x-x)/(x-x); /* log1p(x<-1)=NaN */
- }
- if(ax<0x31000000) { /* |x| < 2**-29 */
- if(two25+x>zero /* raise inexact */
- &&ax<0x24800000) /* |x| < 2**-54 */
- return x;
- else
- return x - x*x*(float)0.5;
- }
- if(hx>0||hx<=((int32_t)0xbe95f61f)) {
- k=0;f=x;hu=1;} /* -0.2929<x<0.41422 */
- }
- if (hx >= 0x7f800000) return x+x;
- if(k!=0) {
- if(hx<0x5a000000) {
- u = (float)1.0+x;
- GET_FLOAT_WORD(hu,u);
- k = (hu>>23)-127;
- /* correction term */
- c = (k>0)? (float)1.0-(u-x):x-(u-(float)1.0);
- c /= u;
- } else {
- u = x;
- GET_FLOAT_WORD(hu,u);
- k = (hu>>23)-127;
- c = 0;
- }
- hu &= 0x007fffff;
- if(hu<0x3504f7) {
- SET_FLOAT_WORD(u,hu|0x3f800000);/* normalize u */
- } else {
- k += 1;
- SET_FLOAT_WORD(u,hu|0x3f000000); /* normalize u/2 */
- hu = (0x00800000-hu)>>2;
- }
- f = u-(float)1.0;
- }
- hfsq=(float)0.5*f*f;
- if(hu==0) { /* |f| < 2**-20 */
- if(f==zero) if(k==0) return zero;
- else {c += k*ln2_lo; return k*ln2_hi+c;}
- R = hfsq*((float)1.0-(float)0.66666666666666666*f);
- if(k==0) return f-R; else
- return k*ln2_hi-((R-(k*ln2_lo+c))-f);
- }
- s = f/((float)2.0+f);
- z = s*s;
- R = z*(Lp1+z*(Lp2+z*(Lp3+z*(Lp4+z*(Lp5+z*(Lp6+z*Lp7))))));
- if(k==0) return f-(hfsq-s*(hfsq+R)); else
- return k*ln2_hi-((hfsq-(s*(hfsq+R)+(k*ln2_lo+c)))-f);
-}
diff --git a/lib/msun/src/s_logb.c b/lib/msun/src/s_logb.c
deleted file mode 100644
index aac20e3..0000000
--- a/lib/msun/src/s_logb.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @(#)s_logb.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * double logb(x)
- * IEEE 754 logb. Included to pass IEEE test suite. Not recommend.
- * Use ilogb instead.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double __generic_logb(double x)
-#else
- double __generic_logb(x)
- double x;
-#endif
-{
- int32_t lx,ix;
- EXTRACT_WORDS(ix,lx,x);
- ix &= 0x7fffffff; /* high |x| */
- if((ix|lx)==0) return -1.0/fabs(x);
- if(ix>=0x7ff00000) return x*x;
- if((ix>>=20)==0) /* IEEE 754 logb */
- return -1022.0;
- else
- return (double) (ix-1023);
-}
diff --git a/lib/msun/src/s_logbf.c b/lib/msun/src/s_logbf.c
deleted file mode 100644
index 5769e2d..0000000
--- a/lib/msun/src/s_logbf.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* s_logbf.c -- float version of s_logb.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float logbf(float x)
-#else
- float logbf(x)
- float x;
-#endif
-{
- int32_t ix;
- GET_FLOAT_WORD(ix,x);
- ix &= 0x7fffffff; /* high |x| */
- if(ix==0) return (float)-1.0/fabsf(x);
- if(ix>=0x7f800000) return x*x;
- if((ix>>=23)==0) /* IEEE 754 logb */
- return -126.0;
- else
- return (float) (ix-127);
-}
diff --git a/lib/msun/src/s_matherr.c b/lib/msun/src/s_matherr.c
deleted file mode 100644
index fbc5664..0000000
--- a/lib/msun/src/s_matherr.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* @(#)s_matherr.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- int matherr(struct exception *x)
-#else
- int matherr(x)
- struct exception *x;
-#endif
-{
- int n=0;
- if(x->arg1!=x->arg1) return 0;
- return n;
-}
diff --git a/lib/msun/src/s_modf.c b/lib/msun/src/s_modf.c
deleted file mode 100644
index d82cda3..0000000
--- a/lib/msun/src/s_modf.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* @(#)s_modf.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * modf(double x, double *iptr)
- * return fraction part of x, and return x's integral part in *iptr.
- * Method:
- * Bit twiddling.
- *
- * Exception:
- * No exception.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double one = 1.0;
-#else
-static double one = 1.0;
-#endif
-
-#ifdef __STDC__
- double modf(double x, double *iptr)
-#else
- double modf(x, iptr)
- double x,*iptr;
-#endif
-{
- int32_t i0,i1,j0;
- u_int32_t i;
- EXTRACT_WORDS(i0,i1,x);
- j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */
- if(j0<20) { /* integer part in high x */
- if(j0<0) { /* |x|<1 */
- INSERT_WORDS(*iptr,i0&0x80000000,0); /* *iptr = +-0 */
- return x;
- } else {
- i = (0x000fffff)>>j0;
- if(((i0&i)|i1)==0) { /* x is integral */
- u_int32_t high;
- *iptr = x;
- GET_HIGH_WORD(high,x);
- INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */
- return x;
- } else {
- INSERT_WORDS(*iptr,i0&(~i),0);
- return x - *iptr;
- }
- }
- } else if (j0>51) { /* no fraction part */
- u_int32_t high;
- *iptr = x*one;
- GET_HIGH_WORD(high,x);
- INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */
- return x;
- } else { /* fraction part in low x */
- i = ((u_int32_t)(0xffffffff))>>(j0-20);
- if((i1&i)==0) { /* x is integral */
- u_int32_t high;
- *iptr = x;
- GET_HIGH_WORD(high,x);
- INSERT_WORDS(x,high&0x80000000,0); /* return +-0 */
- return x;
- } else {
- INSERT_WORDS(*iptr,i0,i1&(~i));
- return x - *iptr;
- }
- }
-}
diff --git a/lib/msun/src/s_modff.c b/lib/msun/src/s_modff.c
deleted file mode 100644
index 8fd9bb0..0000000
--- a/lib/msun/src/s_modff.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* s_modff.c -- float version of s_modf.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float one = 1.0;
-#else
-static float one = 1.0;
-#endif
-
-#ifdef __STDC__
- float modff(float x, float *iptr)
-#else
- float modff(x, iptr)
- float x,*iptr;
-#endif
-{
- int32_t i0,j0;
- u_int32_t i;
- GET_FLOAT_WORD(i0,x);
- j0 = ((i0>>23)&0xff)-0x7f; /* exponent of x */
- if(j0<23) { /* integer part in x */
- if(j0<0) { /* |x|<1 */
- SET_FLOAT_WORD(*iptr,i0&0x80000000); /* *iptr = +-0 */
- return x;
- } else {
- i = (0x007fffff)>>j0;
- if((i0&i)==0) { /* x is integral */
- u_int32_t ix;
- *iptr = x;
- GET_FLOAT_WORD(ix,x);
- SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */
- return x;
- } else {
- SET_FLOAT_WORD(*iptr,i0&(~i));
- return x - *iptr;
- }
- }
- } else { /* no fraction part */
- u_int32_t ix;
- *iptr = x*one;
- GET_FLOAT_WORD(ix,x);
- SET_FLOAT_WORD(x,ix&0x80000000); /* return +-0 */
- return x;
- }
-}
diff --git a/lib/msun/src/s_nextafter.c b/lib/msun/src/s_nextafter.c
deleted file mode 100644
index 877f7b8..0000000
--- a/lib/msun/src/s_nextafter.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* @(#)s_nextafter.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* IEEE functions
- * nextafter(x,y)
- * return the next machine floating-point number of x in the
- * direction toward y.
- * Special cases:
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double nextafter(double x, double y)
-#else
- double nextafter(x,y)
- double x,y;
-#endif
-{
- int32_t hx,hy,ix,iy;
- u_int32_t lx,ly;
-
- EXTRACT_WORDS(hx,lx,x);
- EXTRACT_WORDS(hy,ly,y);
- ix = hx&0x7fffffff; /* |x| */
- iy = hy&0x7fffffff; /* |y| */
-
- if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || /* x is nan */
- ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) /* y is nan */
- return x+y;
- if(x==y) return x; /* x=y, return x */
- if((ix|lx)==0) { /* x == 0 */
- INSERT_WORDS(x,hy&0x80000000,1); /* return +-minsubnormal */
- y = x*x;
- if(y==x) return y; else return x; /* raise underflow flag */
- }
- if(hx>=0) { /* x > 0 */
- if(hx>hy||((hx==hy)&&(lx>ly))) { /* x > y, x -= ulp */
- if(lx==0) hx -= 1;
- lx -= 1;
- } else { /* x < y, x += ulp */
- lx += 1;
- if(lx==0) hx += 1;
- }
- } else { /* x < 0 */
- if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){/* x < y, x -= ulp */
- if(lx==0) hx -= 1;
- lx -= 1;
- } else { /* x > y, x += ulp */
- lx += 1;
- if(lx==0) hx += 1;
- }
- }
- hy = hx&0x7ff00000;
- if(hy>=0x7ff00000) return x+x; /* overflow */
- if(hy<0x00100000) { /* underflow */
- y = x*x;
- if(y!=x) { /* raise underflow flag */
- INSERT_WORDS(y,hx,lx);
- return y;
- }
- }
- INSERT_WORDS(x,hx,lx);
- return x;
-}
diff --git a/lib/msun/src/s_nextafterf.c b/lib/msun/src/s_nextafterf.c
deleted file mode 100644
index e9fd541..0000000
--- a/lib/msun/src/s_nextafterf.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* s_nextafterf.c -- float version of s_nextafter.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float nextafterf(float x, float y)
-#else
- float nextafterf(x,y)
- float x,y;
-#endif
-{
- int32_t hx,hy,ix,iy;
-
- GET_FLOAT_WORD(hx,x);
- GET_FLOAT_WORD(hy,y);
- ix = hx&0x7fffffff; /* |x| */
- iy = hy&0x7fffffff; /* |y| */
-
- if((ix>0x7f800000) || /* x is nan */
- (iy>0x7f800000)) /* y is nan */
- return x+y;
- if(x==y) return x; /* x=y, return x */
- if(ix==0) { /* x == 0 */
- SET_FLOAT_WORD(x,(hy&0x80000000)|1);/* return +-minsubnormal */
- y = x*x;
- if(y==x) return y; else return x; /* raise underflow flag */
- }
- if(hx>=0) { /* x > 0 */
- if(hx>hy) { /* x > y, x -= ulp */
- hx -= 1;
- } else { /* x < y, x += ulp */
- hx += 1;
- }
- } else { /* x < 0 */
- if(hy>=0||hx>hy){ /* x < y, x -= ulp */
- hx -= 1;
- } else { /* x > y, x += ulp */
- hx += 1;
- }
- }
- hy = hx&0x7f800000;
- if(hy>=0x7f800000) return x+x; /* overflow */
- if(hy<0x00800000) { /* underflow */
- y = x*x;
- if(y!=x) { /* raise underflow flag */
- SET_FLOAT_WORD(y,hx);
- return y;
- }
- }
- SET_FLOAT_WORD(x,hx);
- return x;
-}
diff --git a/lib/msun/src/s_rint.c b/lib/msun/src/s_rint.c
deleted file mode 100644
index a289102..0000000
--- a/lib/msun/src/s_rint.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/* @(#)s_rint.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * rint(x)
- * Return x rounded to integral value according to the prevailing
- * rounding mode.
- * Method:
- * Using floating addition.
- * Exception:
- * Inexact flag raised if x not equal to rint(x).
- */
-
-#include "math.h"
-#include "math_private.h"
-
-/*
- * TWO23 is long double instead of double to avoid a bug in gcc. Without
- * this, gcc thinks that TWO23[sx]+x and w-TWO23[sx] already have double
- * precision and doesn't clip them to double precision when they are
- * assigned and returned. Use long double even in the !__STDC__ case in
- * case this is compiled with gcc -traditional.
- */
-#ifdef __STDC__
-static const long double
-#else
-static long double
-#endif
-TWO52[2]={
- 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
- -4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */
-};
-
-#ifdef __STDC__
- double __generic_rint(double x)
-#else
- double __generic_rint(x)
- double x;
-#endif
-{
- int32_t i0,j0,sx;
- u_int32_t i,i1;
- double w,t;
- EXTRACT_WORDS(i0,i1,x);
- sx = (i0>>31)&1;
- j0 = ((i0>>20)&0x7ff)-0x3ff;
- if(j0<20) {
- if(j0<0) {
- if(((i0&0x7fffffff)|i1)==0) return x;
- i1 |= (i0&0x0fffff);
- i0 &= 0xfffe0000;
- i0 |= ((i1|-i1)>>12)&0x80000;
- SET_HIGH_WORD(x,i0);
- w = TWO52[sx]+x;
- t = w-TWO52[sx];
- GET_HIGH_WORD(i0,t);
- SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31));
- return t;
- } else {
- i = (0x000fffff)>>j0;
- if(((i0&i)|i1)==0) return x; /* x is integral */
- i>>=1;
- if(((i0&i)|i1)!=0) {
- if(j0==19) i1 = 0x40000000; else
- i0 = (i0&(~i))|((0x20000)>>j0);
- }
- }
- } else if (j0>51) {
- if(j0==0x400) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- } else {
- i = ((u_int32_t)(0xffffffff))>>(j0-20);
- if((i1&i)==0) return x; /* x is integral */
- i>>=1;
- if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20));
- }
- INSERT_WORDS(x,i0,i1);
- w = TWO52[sx]+x;
- return w-TWO52[sx];
-}
diff --git a/lib/msun/src/s_rintf.c b/lib/msun/src/s_rintf.c
deleted file mode 100644
index 9db496a..0000000
--- a/lib/msun/src/s_rintf.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* s_rintf.c -- float version of s_rint.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-/*
- * TWO23 is double instead of float to avoid a bug in gcc. Without
- * this, gcc thinks that TWO23[sx]+x and w-TWO23[sx] already have float
- * precision and doesn't clip them to float precision when they are
- * assigned and returned.
- */
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-TWO23[2]={
- 8.3886080000e+06, /* 0x4b000000 */
- -8.3886080000e+06, /* 0xcb000000 */
-};
-
-#ifdef __STDC__
- float rintf(float x)
-#else
- float rintf(x)
- float x;
-#endif
-{
- int32_t i0,j0,sx;
- u_int32_t i,i1;
- float w,t;
- GET_FLOAT_WORD(i0,x);
- sx = (i0>>31)&1;
- j0 = ((i0>>23)&0xff)-0x7f;
- if(j0<23) {
- if(j0<0) {
- if((i0&0x7fffffff)==0) return x;
- i1 = (i0&0x07fffff);
- i0 &= 0xfff00000;
- i0 |= ((i1|-i1)>>9)&0x400000;
- SET_FLOAT_WORD(x,i0);
- w = TWO23[sx]+x;
- t = w-TWO23[sx];
- GET_FLOAT_WORD(i0,t);
- SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31));
- return t;
- } else {
- i = (0x007fffff)>>j0;
- if((i0&i)==0) return x; /* x is integral */
- i>>=1;
- if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);
- }
- } else {
- if(j0==0x80) return x+x; /* inf or NaN */
- else return x; /* x is integral */
- }
- SET_FLOAT_WORD(x,i0);
- w = TWO23[sx]+x;
- return w-TWO23[sx];
-}
diff --git a/lib/msun/src/s_scalbn.c b/lib/msun/src/s_scalbn.c
deleted file mode 100644
index 3159215..0000000
--- a/lib/msun/src/s_scalbn.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* @(#)s_scalbn.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * scalbn (double x, int n)
- * scalbn(x,n) returns x* 2**n computed by exponent
- * manipulation rather than by actually performing an
- * exponentiation or a multiplication.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
-twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */
-huge = 1.0e+300,
-tiny = 1.0e-300;
-
-#ifdef __STDC__
- double __generic_scalbn (double x, int n)
-#else
- double __generic_scalbn (x,n)
- double x; int n;
-#endif
-{
- int32_t k,hx,lx;
- EXTRACT_WORDS(hx,lx,x);
- k = (hx&0x7ff00000)>>20; /* extract exponent */
- if (k==0) { /* 0 or subnormal x */
- if ((lx|(hx&0x7fffffff))==0) return x; /* +-0 */
- x *= two54;
- GET_HIGH_WORD(hx,x);
- k = ((hx&0x7ff00000)>>20) - 54;
- if (n< -50000) return tiny*x; /*underflow*/
- }
- if (k==0x7ff) return x+x; /* NaN or Inf */
- k = k+n;
- if (k > 0x7fe) return huge*copysign(huge,x); /* overflow */
- if (k > 0) /* normal result */
- {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;}
- if (k <= -54)
- if (n > 50000) /* in case integer overflow in n+k */
- return huge*copysign(huge,x); /*overflow*/
- else return tiny*copysign(tiny,x); /*underflow*/
- k += 54; /* subnormal result */
- SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20));
- return x*twom54;
-}
diff --git a/lib/msun/src/s_scalbnf.c b/lib/msun/src/s_scalbnf.c
deleted file mode 100644
index af1b099..0000000
--- a/lib/msun/src/s_scalbnf.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* s_scalbnf.c -- float version of s_scalbn.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-two25 = 3.355443200e+07, /* 0x4c000000 */
-twom25 = 2.9802322388e-08, /* 0x33000000 */
-huge = 1.0e+30,
-tiny = 1.0e-30;
-
-#ifdef __STDC__
- float scalbnf (float x, int n)
-#else
- float scalbn (x,n)
- float x; int n;
-#endif
-{
- int32_t k,ix;
- GET_FLOAT_WORD(ix,x);
- k = (ix&0x7f800000)>>23; /* extract exponent */
- if (k==0) { /* 0 or subnormal x */
- if ((ix&0x7fffffff)==0) return x; /* +-0 */
- x *= two25;
- GET_FLOAT_WORD(ix,x);
- k = ((ix&0x7f800000)>>23) - 25;
- if (n< -50000) return tiny*x; /*underflow*/
- }
- if (k==0xff) return x+x; /* NaN or Inf */
- k = k+n;
- if (k > 0xfe) return huge*copysignf(huge,x); /* overflow */
- if (k > 0) /* normal result */
- {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;}
- if (k <= -25)
- if (n > 50000) /* in case integer overflow in n+k */
- return huge*copysignf(huge,x); /*overflow*/
- else return tiny*copysignf(tiny,x); /*underflow*/
- k += 25; /* subnormal result */
- SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23));
- return x*twom25;
-}
diff --git a/lib/msun/src/s_signgam.c b/lib/msun/src/s_signgam.c
deleted file mode 100644
index d67d591..0000000
--- a/lib/msun/src/s_signgam.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "math.h"
-#include "math_private.h"
-int signgam = 0;
diff --git a/lib/msun/src/s_significand.c b/lib/msun/src/s_significand.c
deleted file mode 100644
index 4bbf36d..0000000
--- a/lib/msun/src/s_significand.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* @(#)s_signif.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * significand(x) computes just
- * scalb(x, (double) -ilogb(x)),
- * for exercising the fraction-part(F) IEEE 754-1985 test vector.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double __generic_significand(double x)
-#else
- double __generic_significand(x)
- double x;
-#endif
-{
- return __ieee754_scalb(x,(double) -ilogb(x));
-}
diff --git a/lib/msun/src/s_significandf.c b/lib/msun/src/s_significandf.c
deleted file mode 100644
index ce46be8..0000000
--- a/lib/msun/src/s_significandf.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* s_significandf.c -- float version of s_significand.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float significandf(float x)
-#else
- float significandf(x)
- float x;
-#endif
-{
- return __ieee754_scalbf(x,(float) -ilogbf(x));
-}
diff --git a/lib/msun/src/s_sin.c b/lib/msun/src/s_sin.c
deleted file mode 100644
index d12a495..0000000
--- a/lib/msun/src/s_sin.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* @(#)s_sin.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* sin(x)
- * Return sine function of x.
- *
- * kernel function:
- * __kernel_sin ... sine function on [-pi/4,pi/4]
- * __kernel_cos ... cose function on [-pi/4,pi/4]
- * __ieee754_rem_pio2 ... argument reduction routine
- *
- * Method.
- * Let S,C and T denote the sin, cos and tan respectively on
- * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
- * in [-pi/4 , +pi/4], and let n = k mod 4.
- * We have
- *
- * n sin(x) cos(x) tan(x)
- * ----------------------------------------------------------
- * 0 S C T
- * 1 C -S -1/T
- * 2 -S -C T
- * 3 -C S -1/T
- * ----------------------------------------------------------
- *
- * Special cases:
- * Let trig be any of sin, cos, or tan.
- * trig(+-INF) is NaN, with signals;
- * trig(NaN) is that NaN;
- *
- * Accuracy:
- * TRIG(x) returns trig(x) nearly rounded
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double __generic_sin(double x)
-#else
- double __generic_sin(x)
- double x;
-#endif
-{
- double y[2],z=0.0;
- int32_t n, ix;
-
- /* High word of x. */
- GET_HIGH_WORD(ix,x);
-
- /* |x| ~< pi/4 */
- ix &= 0x7fffffff;
- if(ix <= 0x3fe921fb) return __kernel_sin(x,z,0);
-
- /* sin(Inf or NaN) is NaN */
- else if (ix>=0x7ff00000) return x-x;
-
- /* argument reduction needed */
- else {
- n = __ieee754_rem_pio2(x,y);
- switch(n&3) {
- case 0: return __kernel_sin(y[0],y[1],1);
- case 1: return __kernel_cos(y[0],y[1]);
- case 2: return -__kernel_sin(y[0],y[1],1);
- default:
- return -__kernel_cos(y[0],y[1]);
- }
- }
-}
diff --git a/lib/msun/src/s_sinf.c b/lib/msun/src/s_sinf.c
deleted file mode 100644
index d6ac1a0..0000000
--- a/lib/msun/src/s_sinf.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* s_sinf.c -- float version of s_sin.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float sinf(float x)
-#else
- float sinf(x)
- float x;
-#endif
-{
- float y[2],z=0.0;
- int32_t n, ix;
-
- GET_FLOAT_WORD(ix,x);
-
- /* |x| ~< pi/4 */
- ix &= 0x7fffffff;
- if(ix <= 0x3f490fd8) return __kernel_sinf(x,z,0);
-
- /* sin(Inf or NaN) is NaN */
- else if (ix>=0x7f800000) return x-x;
-
- /* argument reduction needed */
- else {
- n = __ieee754_rem_pio2f(x,y);
- switch(n&3) {
- case 0: return __kernel_sinf(y[0],y[1],1);
- case 1: return __kernel_cosf(y[0],y[1]);
- case 2: return -__kernel_sinf(y[0],y[1],1);
- default:
- return -__kernel_cosf(y[0],y[1]);
- }
- }
-}
diff --git a/lib/msun/src/s_tan.c b/lib/msun/src/s_tan.c
deleted file mode 100644
index f63a213..0000000
--- a/lib/msun/src/s_tan.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* @(#)s_tan.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* tan(x)
- * Return tangent function of x.
- *
- * kernel function:
- * __kernel_tan ... tangent function on [-pi/4,pi/4]
- * __ieee754_rem_pio2 ... argument reduction routine
- *
- * Method.
- * Let S,C and T denote the sin, cos and tan respectively on
- * [-PI/4, +PI/4]. Reduce the argument x to y1+y2 = x-k*pi/2
- * in [-pi/4 , +pi/4], and let n = k mod 4.
- * We have
- *
- * n sin(x) cos(x) tan(x)
- * ----------------------------------------------------------
- * 0 S C T
- * 1 C -S -1/T
- * 2 -S -C T
- * 3 -C S -1/T
- * ----------------------------------------------------------
- *
- * Special cases:
- * Let trig be any of sin, cos, or tan.
- * trig(+-INF) is NaN, with signals;
- * trig(NaN) is that NaN;
- *
- * Accuracy:
- * TRIG(x) returns trig(x) nearly rounded
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double __generic_tan(double x)
-#else
- double __generic_tan(x)
- double x;
-#endif
-{
- double y[2],z=0.0;
- int32_t n, ix;
-
- /* High word of x. */
- GET_HIGH_WORD(ix,x);
-
- /* |x| ~< pi/4 */
- ix &= 0x7fffffff;
- if(ix <= 0x3fe921fb) return __kernel_tan(x,z,1);
-
- /* tan(Inf or NaN) is NaN */
- else if (ix>=0x7ff00000) return x-x; /* NaN */
-
- /* argument reduction needed */
- else {
- n = __ieee754_rem_pio2(x,y);
- return __kernel_tan(y[0],y[1],1-((n&1)<<1)); /* 1 -- n even
- -1 -- n odd */
- }
-}
diff --git a/lib/msun/src/s_tanf.c b/lib/msun/src/s_tanf.c
deleted file mode 100644
index e7f51c7..0000000
--- a/lib/msun/src/s_tanf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* s_tanf.c -- float version of s_tan.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float tanf(float x)
-#else
- float tanf(x)
- float x;
-#endif
-{
- float y[2],z=0.0;
- int32_t n, ix;
-
- GET_FLOAT_WORD(ix,x);
-
- /* |x| ~< pi/4 */
- ix &= 0x7fffffff;
- if(ix <= 0x3f490fda) return __kernel_tanf(x,z,1);
-
- /* tan(Inf or NaN) is NaN */
- else if (ix>=0x7f800000) return x-x; /* NaN */
-
- /* argument reduction needed */
- else {
- n = __ieee754_rem_pio2f(x,y);
- return __kernel_tanf(y[0],y[1],1-((n&1)<<1)); /* 1 -- n even
- -1 -- n odd */
- }
-}
diff --git a/lib/msun/src/s_tanh.c b/lib/msun/src/s_tanh.c
deleted file mode 100644
index 8eb3197..0000000
--- a/lib/msun/src/s_tanh.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* @(#)s_tanh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* Tanh(x)
- * Return the Hyperbolic Tangent of x
- *
- * Method :
- * x -x
- * e - e
- * 0. tanh(x) is defined to be -----------
- * x -x
- * e + e
- * 1. reduce x to non-negative by tanh(-x) = -tanh(x).
- * 2. 0 <= x <= 2**-55 : tanh(x) := x*(one+x)
- * -t
- * 2**-55 < x <= 1 : tanh(x) := -----; t = expm1(-2x)
- * t + 2
- * 2
- * 1 <= x <= 22.0 : tanh(x) := 1- ----- ; t=expm1(2x)
- * t + 2
- * 22.0 < x <= INF : tanh(x) := 1.
- *
- * Special cases:
- * tanh(NaN) is NaN;
- * only tanh(0)=0 is exact for finite argument.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double one=1.0, two=2.0, tiny = 1.0e-300;
-#else
-static double one=1.0, two=2.0, tiny = 1.0e-300;
-#endif
-
-#ifdef __STDC__
- double tanh(double x)
-#else
- double tanh(x)
- double x;
-#endif
-{
- double t,z;
- int32_t jx,ix;
-
- /* High word of |x|. */
- GET_HIGH_WORD(jx,x);
- ix = jx&0x7fffffff;
-
- /* x is INF or NaN */
- if(ix>=0x7ff00000) {
- if (jx>=0) return one/x+one; /* tanh(+-inf)=+-1 */
- else return one/x-one; /* tanh(NaN) = NaN */
- }
-
- /* |x| < 22 */
- if (ix < 0x40360000) { /* |x|<22 */
- if (ix<0x3c800000) /* |x|<2**-55 */
- return x*(one+x); /* tanh(small) = small */
- if (ix>=0x3ff00000) { /* |x|>=1 */
- t = expm1(two*fabs(x));
- z = one - two/(t+two);
- } else {
- t = expm1(-two*fabs(x));
- z= -t/(t+two);
- }
- /* |x| > 22, return +-1 */
- } else {
- z = one - tiny; /* raised inexact flag */
- }
- return (jx>=0)? z: -z;
-}
diff --git a/lib/msun/src/s_tanhf.c b/lib/msun/src/s_tanhf.c
deleted file mode 100644
index f8b41c8..0000000
--- a/lib/msun/src/s_tanhf.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* s_tanhf.c -- float version of s_tanh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float one=1.0, two=2.0, tiny = 1.0e-30;
-#else
-static float one=1.0, two=2.0, tiny = 1.0e-30;
-#endif
-
-#ifdef __STDC__
- float tanhf(float x)
-#else
- float tanhf(x)
- float x;
-#endif
-{
- float t,z;
- int32_t jx,ix;
-
- GET_FLOAT_WORD(jx,x);
- ix = jx&0x7fffffff;
-
- /* x is INF or NaN */
- if(ix>=0x7f800000) {
- if (jx>=0) return one/x+one; /* tanh(+-inf)=+-1 */
- else return one/x-one; /* tanh(NaN) = NaN */
- }
-
- /* |x| < 22 */
- if (ix < 0x41b00000) { /* |x|<22 */
- if (ix<0x24000000) /* |x|<2**-55 */
- return x*(one+x); /* tanh(small) = small */
- if (ix>=0x3f800000) { /* |x|>=1 */
- t = expm1f(two*fabsf(x));
- z = one - two/(t+two);
- } else {
- t = expm1f(-two*fabsf(x));
- z= -t/(t+two);
- }
- /* |x| > 22, return +-1 */
- } else {
- z = one - tiny; /* raised inexact flag */
- }
- return (jx>=0)? z: -z;
-}
diff --git a/lib/msun/src/w_acos.c b/lib/msun/src/w_acos.c
deleted file mode 100644
index 21f2ff4..0000000
--- a/lib/msun/src/w_acos.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* @(#)w_acos.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrap_acos(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double acos(double x) /* wrapper acos */
-#else
- double acos(x) /* wrapper acos */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_acos(x);
-#else
- double z;
- z = __ieee754_acos(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
- if(fabs(x)>1.0) {
- return __kernel_standard(x,x,1); /* acos(|x|>1) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_acosf.c b/lib/msun/src/w_acosf.c
deleted file mode 100644
index 70d2f13..0000000
--- a/lib/msun/src/w_acosf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_acosf.c -- float version of w_acos.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrap_acosf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float acosf(float x) /* wrapper acosf */
-#else
- float acosf(x) /* wrapper acosf */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_acosf(x);
-#else
- float z;
- z = __ieee754_acosf(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z;
- if(fabsf(x)>(float)1.0) {
- /* acosf(|x|>1) */
- return (float)__kernel_standard((double)x,(double)x,101);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_acosh.c b/lib/msun/src/w_acosh.c
deleted file mode 100644
index 5533f22..0000000
--- a/lib/msun/src/w_acosh.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @(#)w_acosh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper acosh(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double acosh(double x) /* wrapper acosh */
-#else
- double acosh(x) /* wrapper acosh */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_acosh(x);
-#else
- double z;
- z = __ieee754_acosh(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
- if(x<1.0) {
- return __kernel_standard(x,x,29); /* acosh(x<1) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_acoshf.c b/lib/msun/src/w_acoshf.c
deleted file mode 100644
index 73b2f06c..0000000
--- a/lib/msun/src/w_acoshf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_acoshf.c -- float version of w_acosh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- *
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper acoshf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float acoshf(float x) /* wrapper acoshf */
-#else
- float acoshf(x) /* wrapper acoshf */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_acoshf(x);
-#else
- float z;
- z = __ieee754_acoshf(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z;
- if(x<(float)1.0) {
- /* acosh(x<1) */
- return (float)__kernel_standard((double)x,(double)x,129);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_asin.c b/lib/msun/src/w_asin.c
deleted file mode 100644
index 3620c00..0000000
--- a/lib/msun/src/w_asin.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* @(#)w_asin.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper asin(x)
- */
-
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double asin(double x) /* wrapper asin */
-#else
- double asin(x) /* wrapper asin */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_asin(x);
-#else
- double z;
- z = __ieee754_asin(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
- if(fabs(x)>1.0) {
- return __kernel_standard(x,x,2); /* asin(|x|>1) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_asinf.c b/lib/msun/src/w_asinf.c
deleted file mode 100644
index 02392bb..0000000
--- a/lib/msun/src/w_asinf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_asinf.c -- float version of w_asin.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper asinf(x)
- */
-
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float asinf(float x) /* wrapper asinf */
-#else
- float asinf(x) /* wrapper asinf */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_asinf(x);
-#else
- float z;
- z = __ieee754_asinf(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z;
- if(fabsf(x)>(float)1.0) {
- /* asinf(|x|>1) */
- return (float)__kernel_standard((double)x,(double)x,102);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_atan2.c b/lib/msun/src/w_atan2.c
deleted file mode 100644
index 1405d1c..0000000
--- a/lib/msun/src/w_atan2.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* @(#)w_atan2.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper atan2(y,x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double atan2(double y, double x) /* wrapper atan2 */
-#else
- double atan2(y,x) /* wrapper atan2 */
- double y,x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_atan2(y,x);
-#else
- double z;
- z = __ieee754_atan2(y,x);
- if(_LIB_VERSION == _IEEE_||isnan(x)||isnan(y)) return z;
- if(x==0.0&&y==0.0) {
- return __kernel_standard(y,x,3); /* atan2(+-0,+-0) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_atan2f.c b/lib/msun/src/w_atan2f.c
deleted file mode 100644
index bba9f3b..0000000
--- a/lib/msun/src/w_atan2f.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_atan2f.c -- float version of w_atan2.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper atan2f(y,x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float atan2f(float y, float x) /* wrapper atan2f */
-#else
- float atan2f(y,x) /* wrapper atan2 */
- float y,x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_atan2f(y,x);
-#else
- float z;
- z = __ieee754_atan2f(y,x);
- if(_LIB_VERSION == _IEEE_||isnanf(x)||isnanf(y)) return z;
- if(x==(float)0.0&&y==(float)0.0) {
- /* atan2f(+-0,+-0) */
- return (float)__kernel_standard((double)y,(double)x,103);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_atanh.c b/lib/msun/src/w_atanh.c
deleted file mode 100644
index ba2aca9..0000000
--- a/lib/msun/src/w_atanh.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* @(#)w_atanh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper atanh(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double atanh(double x) /* wrapper atanh */
-#else
- double atanh(x) /* wrapper atanh */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_atanh(x);
-#else
- double z,y;
- z = __ieee754_atanh(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
- y = fabs(x);
- if(y>=1.0) {
- if(y>1.0)
- return __kernel_standard(x,x,30); /* atanh(|x|>1) */
- else
- return __kernel_standard(x,x,31); /* atanh(|x|==1) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_atanhf.c b/lib/msun/src/w_atanhf.c
deleted file mode 100644
index 9556e34..0000000
--- a/lib/msun/src/w_atanhf.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* w_atanhf.c -- float version of w_atanh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper atanhf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float atanhf(float x) /* wrapper atanhf */
-#else
- float atanhf(x) /* wrapper atanhf */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_atanhf(x);
-#else
- float z,y;
- z = __ieee754_atanhf(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z;
- y = fabsf(x);
- if(y>=(float)1.0) {
- if(y>(float)1.0)
- /* atanhf(|x|>1) */
- return (float)__kernel_standard((double)x,(double)x,130);
- else
- /* atanhf(|x|==1) */
- return (float)__kernel_standard((double)x,(double)x,131);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_cabs.c b/lib/msun/src/w_cabs.c
deleted file mode 100644
index b140515..0000000
--- a/lib/msun/src/w_cabs.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * cabs() wrapper for hypot().
- *
- * Written by J.T. Conklin, <jtc@wimsey.com>
- * Placed into the Public Domain, 1994.
- */
-
-#include <math.h>
-
-struct complex {
- double x;
- double y;
-};
-
-double
-cabs(z)
- struct complex z;
-{
- return hypot(z.x, z.y);
-}
-
-double
-z_abs(z)
- struct complex *z;
-{
- return hypot(z->x, z->y);
-}
diff --git a/lib/msun/src/w_cabsf.c b/lib/msun/src/w_cabsf.c
deleted file mode 100644
index 6336d6d..0000000
--- a/lib/msun/src/w_cabsf.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * cabsf() wrapper for hypotf().
- *
- * Written by J.T. Conklin, <jtc@wimsey.com>
- * Placed into the Public Domain, 1994.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-struct complex {
- float x;
- float y;
-};
-
-float
-cabsf(z)
- struct complex z;
-{
- return hypotf(z.x, z.y);
-}
diff --git a/lib/msun/src/w_cosh.c b/lib/msun/src/w_cosh.c
deleted file mode 100644
index 0711687..0000000
--- a/lib/msun/src/w_cosh.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @(#)w_cosh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper cosh(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double cosh(double x) /* wrapper cosh */
-#else
- double cosh(x) /* wrapper cosh */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_cosh(x);
-#else
- double z;
- z = __ieee754_cosh(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
- if(fabs(x)>7.10475860073943863426e+02) {
- return __kernel_standard(x,x,5); /* cosh overflow */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_coshf.c b/lib/msun/src/w_coshf.c
deleted file mode 100644
index 385bcfa..0000000
--- a/lib/msun/src/w_coshf.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* w_coshf.c -- float version of w_cosh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper coshf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float coshf(float x) /* wrapper coshf */
-#else
- float coshf(x) /* wrapper coshf */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_coshf(x);
-#else
- float z;
- z = __ieee754_coshf(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z;
- if(fabsf(x)>(float)8.9415985107e+01) {
- /* cosh overflow */
- return (float)__kernel_standard((double)x,(double)x,105);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_drem.c b/lib/msun/src/w_drem.c
deleted file mode 100644
index 0f68409..0000000
--- a/lib/msun/src/w_drem.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * drem() wrapper for remainder().
- *
- * Written by J.T. Conklin, <jtc@wimsey.com>
- * Placed into the Public Domain, 1994.
- */
-
-#include <math.h>
-
-double
-drem(x, y)
- double x, y;
-{
- return remainder(x, y);
-}
diff --git a/lib/msun/src/w_dremf.c b/lib/msun/src/w_dremf.c
deleted file mode 100644
index 92079a9..0000000
--- a/lib/msun/src/w_dremf.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * dremf() wrapper for remainderf().
- *
- * Written by J.T. Conklin, <jtc@wimsey.com>
- * Placed into the Public Domain, 1994.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-float
-dremf(x, y)
- float x, y;
-{
- return remainderf(x, y);
-}
diff --git a/lib/msun/src/w_exp.c b/lib/msun/src/w_exp.c
deleted file mode 100644
index 4496acb..0000000
--- a/lib/msun/src/w_exp.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* @(#)w_exp.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper exp(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
-o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */
-u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */
-
-#ifdef __STDC__
- double exp(double x) /* wrapper exp */
-#else
- double exp(x) /* wrapper exp */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_exp(x);
-#else
- double z;
- z = __ieee754_exp(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(finite(x)) {
- if(x>o_threshold)
- return __kernel_standard(x,x,6); /* exp overflow */
- else if(x<u_threshold)
- return __kernel_standard(x,x,7); /* exp underflow */
- }
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_expf.c b/lib/msun/src/w_expf.c
deleted file mode 100644
index a775ac6..0000000
--- a/lib/msun/src/w_expf.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* w_expf.c -- float version of w_exp.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper expf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
-o_threshold= 8.8721679688e+01, /* 0x42b17180 */
-u_threshold= -1.0397208405e+02; /* 0xc2cff1b5 */
-
-#ifdef __STDC__
- float expf(float x) /* wrapper expf */
-#else
- float expf(x) /* wrapper expf */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_expf(x);
-#else
- float z;
- z = __ieee754_expf(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(finitef(x)) {
- if(x>o_threshold)
- /* exp overflow */
- return (float)__kernel_standard((double)x,(double)x,106);
- else if(x<u_threshold)
- /* exp underflow */
- return (float)__kernel_standard((double)x,(double)x,107);
- }
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_fmod.c b/lib/msun/src/w_fmod.c
deleted file mode 100644
index b420063..0000000
--- a/lib/msun/src/w_fmod.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* @(#)w_fmod.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper fmod(x,y)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double fmod(double x, double y) /* wrapper fmod */
-#else
- double fmod(x,y) /* wrapper fmod */
- double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_fmod(x,y);
-#else
- double z;
- z = __ieee754_fmod(x,y);
- if(_LIB_VERSION == _IEEE_ ||isnan(y)||isnan(x)) return z;
- if(y==0.0) {
- return __kernel_standard(x,y,27); /* fmod(x,0) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_fmodf.c b/lib/msun/src/w_fmodf.c
deleted file mode 100644
index 3cf05ed..0000000
--- a/lib/msun/src/w_fmodf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_fmodf.c -- float version of w_fmod.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper fmodf(x,y)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float fmodf(float x, float y) /* wrapper fmodf */
-#else
- float fmodf(x,y) /* wrapper fmodf */
- float x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_fmodf(x,y);
-#else
- float z;
- z = __ieee754_fmodf(x,y);
- if(_LIB_VERSION == _IEEE_ ||isnanf(y)||isnanf(x)) return z;
- if(y==(float)0.0) {
- /* fmodf(x,0) */
- return (float)__kernel_standard((double)x,(double)y,127);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_gamma.c b/lib/msun/src/w_gamma.c
deleted file mode 100644
index fd44c1c..0000000
--- a/lib/msun/src/w_gamma.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* @(#)w_gamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* double gamma(double x)
- * Return the logarithm of the Gamma function of x.
- *
- * Method: call gamma_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-extern int signgam;
-
-#ifdef __STDC__
- double gamma(double x)
-#else
- double gamma(x)
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_gamma_r(x,&signgam);
-#else
- double y;
- y = __ieee754_gamma_r(x,&signgam);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!finite(y)&&finite(x)) {
- if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,41); /* gamma pole */
- else
- return __kernel_standard(x,x,40); /* gamma overflow */
- } else
- return y;
-#endif
-}
diff --git a/lib/msun/src/w_gamma_r.c b/lib/msun/src/w_gamma_r.c
deleted file mode 100644
index fa59f8d..0000000
--- a/lib/msun/src/w_gamma_r.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* @(#)wr_gamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper double gamma_r(double x, int *signgamp)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double gamma_r(double x, int *signgamp) /* wrapper lgamma_r */
-#else
- double gamma_r(x,signgamp) /* wrapper lgamma_r */
- double x; int *signgamp;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_gamma_r(x,signgamp);
-#else
- double y;
- y = __ieee754_gamma_r(x,signgamp);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!finite(y)&&finite(x)) {
- if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,41); /* gamma pole */
- else
- return __kernel_standard(x,x,40); /* gamma overflow */
- } else
- return y;
-#endif
-}
diff --git a/lib/msun/src/w_gammaf.c b/lib/msun/src/w_gammaf.c
deleted file mode 100644
index e956f51..0000000
--- a/lib/msun/src/w_gammaf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_gammaf.c -- float version of w_gamma.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-extern int signgam;
-
-#ifdef __STDC__
- float gammaf(float x)
-#else
- float gammaf(x)
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_gammaf_r(x,&signgam);
-#else
- float y;
- y = __ieee754_gammaf_r(x,&signgam);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!finitef(y)&&finitef(x)) {
- if(floorf(x)==x&&x<=(float)0.0)
- /* gammaf pole */
- return (float)__kernel_standard((double)x,(double)x,141);
- else
- /* gammaf overflow */
- return (float)__kernel_standard((double)x,(double)x,140);
- } else
- return y;
-#endif
-}
diff --git a/lib/msun/src/w_gammaf_r.c b/lib/msun/src/w_gammaf_r.c
deleted file mode 100644
index b8c1e12..0000000
--- a/lib/msun/src/w_gammaf_r.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* w_gammaf_r.c -- float version of w_gamma_r.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper float gammaf_r(float x, int *signgamp)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float gammaf_r(float x, int *signgamp) /* wrapper lgammaf_r */
-#else
- float gammaf_r(x,signgamp) /* wrapper lgammaf_r */
- float x; int *signgamp;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_gammaf_r(x,signgamp);
-#else
- float y;
- y = __ieee754_gammaf_r(x,signgamp);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!finitef(y)&&finitef(x)) {
- if(floorf(x)==x&&x<=(float)0.0)
- /* gammaf pole */
- return (float)__kernel_standard((double)x,(double)x,141);
- else
- /* gamma overflow */
- return (float)__kernel_standard((double)x,(double)x,140);
- } else
- return y;
-#endif
-}
diff --git a/lib/msun/src/w_hypot.c b/lib/msun/src/w_hypot.c
deleted file mode 100644
index a434a1d..0000000
--- a/lib/msun/src/w_hypot.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* @(#)w_hypot.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper hypot(x,y)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double hypot(double x, double y)/* wrapper hypot */
-#else
- double hypot(x,y) /* wrapper hypot */
- double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_hypot(x,y);
-#else
- double z;
- z = __ieee754_hypot(x,y);
- if(_LIB_VERSION == _IEEE_) return z;
- if((!finite(z))&&finite(x)&&finite(y))
- return __kernel_standard(x,y,4); /* hypot overflow */
- else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_hypotf.c b/lib/msun/src/w_hypotf.c
deleted file mode 100644
index 7987740..0000000
--- a/lib/msun/src/w_hypotf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* w_hypotf.c -- float version of w_hypot.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper hypotf(x,y)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float hypotf(float x, float y) /* wrapper hypotf */
-#else
- float hypotf(x,y) /* wrapper hypotf */
- float x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_hypotf(x,y);
-#else
- float z;
- z = __ieee754_hypotf(x,y);
- if(_LIB_VERSION == _IEEE_) return z;
- if((!finitef(z))&&finitef(x)&&finitef(y))
- /* hypot overflow */
- return (float)__kernel_standard((double)x,(double)y,104);
- else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_j0.c b/lib/msun/src/w_j0.c
deleted file mode 100644
index 1b2260b..0000000
--- a/lib/msun/src/w_j0.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* @(#)w_j0.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper j0(double x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double j0(double x) /* wrapper j0 */
-#else
- double j0(x) /* wrapper j0 */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_j0(x);
-#else
- double z = __ieee754_j0(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
- if(fabs(x)>X_TLOSS) {
- return __kernel_standard(x,x,34); /* j0(|x|>X_TLOSS) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_j0f.c b/lib/msun/src/w_j0f.c
deleted file mode 100644
index f332e2d..0000000
--- a/lib/msun/src/w_j0f.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* w_j0f.c -- float version of w_j0.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper j0f(float x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float j0f(float x) /* wrapper j0f */
-#else
- float j0f(x) /* wrapper j0f */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_j0f(x);
-#else
- float z = __ieee754_j0f(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z;
- if(fabsf(x)>(float)X_TLOSS) {
- /* j0f(|x|>X_TLOSS) */
- return (float)__kernel_standard((double)x,(double)x,134);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_j1.c b/lib/msun/src/w_j1.c
deleted file mode 100644
index 068ac94..0000000
--- a/lib/msun/src/w_j1.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @(#)w_j1.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper of j1
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double j1(double x) /* wrapper j1 */
-#else
- double j1(x) /* wrapper j1 */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_j1(x);
-#else
- double z;
- z = __ieee754_j1(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
- if(fabs(x)>X_TLOSS) {
- return __kernel_standard(x,x,36); /* j1(|x|>X_TLOSS) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_j1f.c b/lib/msun/src/w_j1f.c
deleted file mode 100644
index 87995e3..0000000
--- a/lib/msun/src/w_j1f.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* w_j1f.c -- float version of w_j1.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper of j1f
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float j1f(float x) /* wrapper j1f */
-#else
- float j1f(x) /* wrapper j1f */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_j1f(x);
-#else
- float z;
- z = __ieee754_j1f(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z;
- if(fabsf(x)>(float)X_TLOSS) {
- /* j1(|x|>X_TLOSS) */
- return (float)__kernel_standard((double)x,(double)x,136);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_jn.c b/lib/msun/src/w_jn.c
deleted file mode 100644
index a575700..0000000
--- a/lib/msun/src/w_jn.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @(#)w_jn.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper jn(int n, double x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double jn(int n, double x) /* wrapper jn */
-#else
- double jn(n,x) /* wrapper jn */
- double x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_jn(n,x);
-#else
- double z;
- z = __ieee754_jn(n,x);
- if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
- if(fabs(x)>X_TLOSS) {
- return __kernel_standard((double)n,x,38); /* jn(|x|>X_TLOSS,n) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_jnf.c b/lib/msun/src/w_jnf.c
deleted file mode 100644
index 3d1a3d5..0000000
--- a/lib/msun/src/w_jnf.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* w_jnf.c -- float version of w_jn.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float jnf(int n, float x) /* wrapper jnf */
-#else
- float jnf(n,x) /* wrapper jnf */
- float x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_jnf(n,x);
-#else
- float z;
- z = __ieee754_jnf(n,x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z;
- if(fabsf(x)>(float)X_TLOSS) {
- /* jn(|x|>X_TLOSS,n) */
- return (float)__kernel_standard((double)n,(double)x,138);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_lgamma.c b/lib/msun/src/w_lgamma.c
deleted file mode 100644
index 88ab418..0000000
--- a/lib/msun/src/w_lgamma.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* @(#)w_lgamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/* double lgamma(double x)
- * Return the logarithm of the Gamma function of x.
- *
- * Method: call __ieee754_lgamma_r
- */
-
-#include "math.h"
-#include "math_private.h"
-
-extern int signgam;
-
-#ifdef __STDC__
- double lgamma(double x)
-#else
- double lgamma(x)
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_lgamma_r(x,&signgam);
-#else
- double y;
- y = __ieee754_lgamma_r(x,&signgam);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!finite(y)&&finite(x)) {
- if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,15); /* lgamma pole */
- else
- return __kernel_standard(x,x,14); /* lgamma overflow */
- } else
- return y;
-#endif
-}
diff --git a/lib/msun/src/w_lgamma_r.c b/lib/msun/src/w_lgamma_r.c
deleted file mode 100644
index 74cdfba..0000000
--- a/lib/msun/src/w_lgamma_r.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* @(#)wr_lgamma.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper double lgamma_r(double x, int *signgamp)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double lgamma_r(double x, int *signgamp) /* wrapper lgamma_r */
-#else
- double lgamma_r(x,signgamp) /* wrapper lgamma_r */
- double x; int *signgamp;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_lgamma_r(x,signgamp);
-#else
- double y;
- y = __ieee754_lgamma_r(x,signgamp);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!finite(y)&&finite(x)) {
- if(floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,15); /* lgamma pole */
- else
- return __kernel_standard(x,x,14); /* lgamma overflow */
- } else
- return y;
-#endif
-}
diff --git a/lib/msun/src/w_lgammaf.c b/lib/msun/src/w_lgammaf.c
deleted file mode 100644
index b8f66e6..0000000
--- a/lib/msun/src/w_lgammaf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_lgammaf.c -- float version of w_lgamma.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-extern int signgam;
-
-#ifdef __STDC__
- float lgammaf(float x)
-#else
- float lgammaf(x)
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_lgammaf_r(x,&signgam);
-#else
- float y;
- y = __ieee754_lgammaf_r(x,&signgam);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!finitef(y)&&finitef(x)) {
- if(floorf(x)==x&&x<=(float)0.0)
- /* lgamma pole */
- return (float)__kernel_standard((double)x,(double)x,115);
- else
- /* lgamma overflow */
- return (float)__kernel_standard((double)x,(double)x,114);
- } else
- return y;
-#endif
-}
diff --git a/lib/msun/src/w_lgammaf_r.c b/lib/msun/src/w_lgammaf_r.c
deleted file mode 100644
index f955dfb..0000000
--- a/lib/msun/src/w_lgammaf_r.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* w_lgammaf_r.c -- float version of w_lgamma_r.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper float lgammaf_r(float x, int *signgamp)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float lgammaf_r(float x, int *signgamp) /* wrapper lgammaf_r */
-#else
- float lgammaf_r(x,signgamp) /* wrapper lgammaf_r */
- float x; int *signgamp;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_lgammaf_r(x,signgamp);
-#else
- float y;
- y = __ieee754_lgammaf_r(x,signgamp);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!finitef(y)&&finitef(x)) {
- if(floorf(x)==x&&x<=(float)0.0)
- /* lgamma pole */
- return (float)__kernel_standard((double)x,(double)x,115);
- else
- /* lgamma overflow */
- return (float)__kernel_standard((double)x,(double)x,114);
- } else
- return y;
-#endif
-}
diff --git a/lib/msun/src/w_log.c b/lib/msun/src/w_log.c
deleted file mode 100644
index 9440eb6..0000000
--- a/lib/msun/src/w_log.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* @(#)w_log.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper log(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double log(double x) /* wrapper log */
-#else
- double log(x) /* wrapper log */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_log(x);
-#else
- double z;
- z = __ieee754_log(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x) || x > 0.0) return z;
- if(x==0.0)
- return __kernel_standard(x,x,16); /* log(0) */
- else
- return __kernel_standard(x,x,17); /* log(x<0) */
-#endif
-}
diff --git a/lib/msun/src/w_log10.c b/lib/msun/src/w_log10.c
deleted file mode 100644
index c6910b3..0000000
--- a/lib/msun/src/w_log10.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* @(#)w_log10.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper log10(X)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double log10(double x) /* wrapper log10 */
-#else
- double log10(x) /* wrapper log10 */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_log10(x);
-#else
- double z;
- z = __ieee754_log10(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
- if(x<=0.0) {
- if(x==0.0)
- return __kernel_standard(x,x,18); /* log10(0) */
- else
- return __kernel_standard(x,x,19); /* log10(x<0) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_log10f.c b/lib/msun/src/w_log10f.c
deleted file mode 100644
index 96057e1..0000000
--- a/lib/msun/src/w_log10f.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* w_log10f.c -- float version of w_log10.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper log10f(X)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float log10f(float x) /* wrapper log10f */
-#else
- float log10f(x) /* wrapper log10f */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_log10f(x);
-#else
- float z;
- z = __ieee754_log10f(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z;
- if(x<=(float)0.0) {
- if(x==(float)0.0)
- /* log10(0) */
- return (float)__kernel_standard((double)x,(double)x,118);
- else
- /* log10(x<0) */
- return (float)__kernel_standard((double)x,(double)x,119);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_logf.c b/lib/msun/src/w_logf.c
deleted file mode 100644
index 5e66a7d..0000000
--- a/lib/msun/src/w_logf.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* w_logf.c -- float version of w_log.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper logf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float logf(float x) /* wrapper logf */
-#else
- float logf(x) /* wrapper logf */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_logf(x);
-#else
- float z;
- z = __ieee754_logf(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x) || x > (float)0.0) return z;
- if(x==(float)0.0)
- /* logf(0) */
- return (float)__kernel_standard((double)x,(double)x,116);
- else
- /* logf(x<0) */
- return (float)__kernel_standard((double)x,(double)x,117);
-#endif
-}
diff --git a/lib/msun/src/w_pow.c b/lib/msun/src/w_pow.c
deleted file mode 100644
index 571897c..0000000
--- a/lib/msun/src/w_pow.c
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-/* @(#)w_pow.c 5.2 93/10/01 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-/*
- * wrapper pow(x,y) return x**y
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- double pow(double x, double y) /* wrapper pow */
-#else
- double pow(x,y) /* wrapper pow */
- double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_pow(x,y);
-#else
- double z;
- z=__ieee754_pow(x,y);
- if(_LIB_VERSION == _IEEE_|| isnan(y)) return z;
- if(isnan(x)) {
- if(y==0.0)
- return __kernel_standard(x,y,42); /* pow(NaN,0.0) */
- else
- return z;
- }
- if(x==0.0){
- if(y==0.0)
- return __kernel_standard(x,y,20); /* pow(0.0,0.0) */
- if(finite(y)&&y<0.0)
- return __kernel_standard(x,y,23); /* pow(0.0,negative) */
- return z;
- }
- if(!finite(z)) {
- if(finite(x)&&finite(y)) {
- if(isnan(z))
- return __kernel_standard(x,y,24); /* pow neg**non-int */
- else
- return __kernel_standard(x,y,21); /* pow overflow */
- }
- }
- if(z==0.0&&finite(x)&&finite(y))
- return __kernel_standard(x,y,22); /* pow underflow */
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_powf.c b/lib/msun/src/w_powf.c
deleted file mode 100644
index d6e48d8..0000000
--- a/lib/msun/src/w_powf.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* w_powf.c -- float version of w_pow.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper powf(x,y) return x**y
- */
-
-#include "math.h"
-#include "math_private.h"
-
-
-#ifdef __STDC__
- float powf(float x, float y) /* wrapper powf */
-#else
- float powf(x,y) /* wrapper powf */
- float x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_powf(x,y);
-#else
- float z;
- z=__ieee754_powf(x,y);
- if(_LIB_VERSION == _IEEE_|| isnanf(y)) return z;
- if(isnanf(x)) {
- if(y==(float)0.0)
- /* powf(NaN,0.0) */
- return (float)__kernel_standard((double)x,(double)y,142);
- else
- return z;
- }
- if(x==(float)0.0){
- if(y==(float)0.0)
- /* powf(0.0,0.0) */
- return (float)__kernel_standard((double)x,(double)y,120);
- if(finitef(y)&&y<(float)0.0)
- /* powf(0.0,negative) */
- return (float)__kernel_standard((double)x,(double)y,123);
- return z;
- }
- if(!finitef(z)) {
- if(finitef(x)&&finitef(y)) {
- if(isnanf(z))
- /* powf neg**non-int */
- return (float)__kernel_standard((double)x,(double)y,124);
- else
- /* powf overflow */
- return (float)__kernel_standard((double)x,(double)y,121);
- }
- }
- if(z==(float)0.0&&finitef(x)&&finitef(y))
- /* powf underflow */
- return (float)__kernel_standard((double)x,(double)y,122);
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_remainder.c b/lib/msun/src/w_remainder.c
deleted file mode 100644
index 26b0a2e..0000000
--- a/lib/msun/src/w_remainder.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @(#)w_remainder.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper remainder(x,p)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double remainder(double x, double y) /* wrapper remainder */
-#else
- double remainder(x,y) /* wrapper remainder */
- double x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_remainder(x,y);
-#else
- double z;
- z = __ieee754_remainder(x,y);
- if(_LIB_VERSION == _IEEE_ || isnan(y)) return z;
- if(y==0.0)
- return __kernel_standard(x,y,28); /* remainder(x,0) */
- else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_remainderf.c b/lib/msun/src/w_remainderf.c
deleted file mode 100644
index 496bb1f..0000000
--- a/lib/msun/src/w_remainderf.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* w_remainderf.c -- float version of w_remainder.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper remainderf(x,p)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float remainderf(float x, float y) /* wrapper remainder */
-#else
- float remainderf(x,y) /* wrapper remainder */
- float x,y;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_remainderf(x,y);
-#else
- float z;
- z = __ieee754_remainderf(x,y);
- if(_LIB_VERSION == _IEEE_ || isnanf(y)) return z;
- if(y==(float)0.0)
- /* remainder(x,0) */
- return (float)__kernel_standard((double)x,(double)y,128);
- else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_scalb.c b/lib/msun/src/w_scalb.c
deleted file mode 100644
index 5fe8033..0000000
--- a/lib/msun/src/w_scalb.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* @(#)w_scalb.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper scalb(double x, double fn) is provide for
- * passing various standard test suite. One
- * should use scalbn() instead.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#include <errno.h>
-
-#ifdef __STDC__
-#ifdef _SCALB_INT
- double scalb(double x, int fn) /* wrapper scalb */
-#else
- double scalb(double x, double fn) /* wrapper scalb */
-#endif
-#else
- double scalb(x,fn) /* wrapper scalb */
-#ifdef _SCALB_INT
- double x; int fn;
-#else
- double x,fn;
-#endif
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_scalb(x,fn);
-#else
- double z;
- z = __ieee754_scalb(x,fn);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!(finite(z)||isnan(z))&&finite(x)) {
- return __kernel_standard(x,(double)fn,32); /* scalb overflow */
- }
- if(z==0.0&&z!=x) {
- return __kernel_standard(x,(double)fn,33); /* scalb underflow */
- }
-#ifndef _SCALB_INT
- if(!finite(fn)) errno = ERANGE;
-#endif
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_scalbf.c b/lib/msun/src/w_scalbf.c
deleted file mode 100644
index 64a6994..0000000
--- a/lib/msun/src/w_scalbf.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* w_scalbf.c -- float version of w_scalb.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper scalbf(float x, float fn) is provide for
- * passing various standard test suite. One
- * should use scalbn() instead.
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#include <errno.h>
-
-#ifdef __STDC__
-#ifdef _SCALB_INT
- float scalbf(float x, int fn) /* wrapper scalbf */
-#else
- float scalbf(float x, float fn) /* wrapper scalbf */
-#endif
-#else
- float scalbf(x,fn) /* wrapper scalbf */
-#ifdef _SCALB_INT
- float x; int fn;
-#else
- float x,fn;
-#endif
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_scalbf(x,fn);
-#else
- float z;
- z = __ieee754_scalbf(x,fn);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!(finitef(z)||isnanf(z))&&finitef(x)) {
- /* scalbf overflow */
- return (float)__kernel_standard((double)x,(double)fn,132);
- }
- if(z==(float)0.0&&z!=x) {
- /* scalbf underflow */
- return (float)__kernel_standard((double)x,(double)fn,133);
- }
-#ifndef _SCALB_INT
- if(!finitef(fn)) errno = ERANGE;
-#endif
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_sinh.c b/lib/msun/src/w_sinh.c
deleted file mode 100644
index e222a02..0000000
--- a/lib/msun/src/w_sinh.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @(#)w_sinh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper sinh(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double sinh(double x) /* wrapper sinh */
-#else
- double sinh(x) /* wrapper sinh */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_sinh(x);
-#else
- double z;
- z = __ieee754_sinh(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!finite(z)&&finite(x)) {
- return __kernel_standard(x,x,25); /* sinh overflow */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_sinhf.c b/lib/msun/src/w_sinhf.c
deleted file mode 100644
index 4bcd9ae..0000000
--- a/lib/msun/src/w_sinhf.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* w_sinhf.c -- float version of w_sinh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper sinhf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float sinhf(float x) /* wrapper sinhf */
-#else
- float sinhf(x) /* wrapper sinhf */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_sinhf(x);
-#else
- float z;
- z = __ieee754_sinhf(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!finitef(z)&&finitef(x)) {
- /* sinhf overflow */
- return (float)__kernel_standard((double)x,(double)x,125);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_sqrt.c b/lib/msun/src/w_sqrt.c
deleted file mode 100644
index b4cf0a6..0000000
--- a/lib/msun/src/w_sqrt.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* @(#)w_sqrt.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper sqrt(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double sqrt(double x) /* wrapper sqrt */
-#else
- double sqrt(x) /* wrapper sqrt */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_sqrt(x);
-#else
- double z;
- z = __ieee754_sqrt(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;
- if(x<0.0) {
- return __kernel_standard(x,x,26); /* sqrt(negative) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_sqrtf.c b/lib/msun/src/w_sqrtf.c
deleted file mode 100644
index d24fc8c..0000000
--- a/lib/msun/src/w_sqrtf.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* w_sqrtf.c -- float version of w_sqrt.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper sqrtf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float sqrtf(float x) /* wrapper sqrtf */
-#else
- float sqrt(x) /* wrapper sqrtf */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_sqrtf(x);
-#else
- float z;
- z = __ieee754_sqrtf(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x)) return z;
- if(x<(float)0.0) {
- /* sqrtf(negative) */
- return (float)__kernel_standard((double)x,(double)x,126);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_y0.c b/lib/msun/src/w_y0.c
deleted file mode 100644
index 91b9760..0000000
--- a/lib/msun/src/w_y0.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* from: @(#)w_j0.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper y0(double x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double y0(double x) /* wrapper y0 */
-#else
- double y0(x) /* wrapper y0 */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_y0(x);
-#else
- double z;
- z = __ieee754_y0(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
- if(x <= 0.0){
- if(x==0.0)
- /* d= -one/(x-x); */
- return __kernel_standard(x,x,8);
- else
- /* d = zero/(x-x); */
- return __kernel_standard(x,x,9);
- }
- if(x>X_TLOSS) {
- return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_y0f.c b/lib/msun/src/w_y0f.c
deleted file mode 100644
index 52ed041..0000000
--- a/lib/msun/src/w_y0f.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* w_y0f.c -- float version of w_y0.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper y0f(float x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float y0f(float x) /* wrapper y0f */
-#else
- float y0f(x) /* wrapper y0f */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_y0f(x);
-#else
- float z;
- z = __ieee754_y0f(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z;
- if(x <= (float)0.0){
- if(x==(float)0.0)
- /* d= -one/(x-x); */
- return (float)__kernel_standard((double)x,(double)x,108);
- else
- /* d = zero/(x-x); */
- return (float)__kernel_standard((double)x,(double)x,109);
- }
- if(x>(float)X_TLOSS) {
- /* y0(x>X_TLOSS) */
- return (float)__kernel_standard((double)x,(double)x,135);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_y1.c b/lib/msun/src/w_y1.c
deleted file mode 100644
index b46d81e..0000000
--- a/lib/msun/src/w_y1.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* from: @(#)w_j1.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper of y1
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double y1(double x) /* wrapper y1 */
-#else
- double y1(x) /* wrapper y1 */
- double x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_y1(x);
-#else
- double z;
- z = __ieee754_y1(x);
- if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
- if(x <= 0.0){
- if(x==0.0)
- /* d= -one/(x-x); */
- return __kernel_standard(x,x,10);
- else
- /* d = zero/(x-x); */
- return __kernel_standard(x,x,11);
- }
- if(x>X_TLOSS) {
- return __kernel_standard(x,x,37); /* y1(x>X_TLOSS) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_y1f.c b/lib/msun/src/w_y1f.c
deleted file mode 100644
index b4e4633..0000000
--- a/lib/msun/src/w_y1f.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* w_y1f.c -- float version of w_y1.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper of y1f
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float y1f(float x) /* wrapper y1f */
-#else
- float y1f(x) /* wrapper y1f */
- float x;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_y1f(x);
-#else
- float z;
- z = __ieee754_y1f(x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z;
- if(x <= (float)0.0){
- if(x==(float)0.0)
- /* d= -one/(x-x); */
- return (float)__kernel_standard((double)x,(double)x,110);
- else
- /* d = zero/(x-x); */
- return (float)__kernel_standard((double)x,(double)x,111);
- }
- if(x>(float)X_TLOSS) {
- /* y1(x>X_TLOSS) */
- return (float)__kernel_standard((double)x,(double)x,137);
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_yn.c b/lib/msun/src/w_yn.c
deleted file mode 100644
index af03376..0000000
--- a/lib/msun/src/w_yn.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* from: @(#)w_jn.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-/*
- * wrapper yn(int n, double x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- double yn(int n, double x) /* wrapper yn */
-#else
- double yn(n,x) /* wrapper yn */
- double x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_yn(n,x);
-#else
- double z;
- z = __ieee754_yn(n,x);
- if(_LIB_VERSION == _IEEE_ || isnan(x) ) return z;
- if(x <= 0.0){
- if(x==0.0)
- /* d= -one/(x-x); */
- return __kernel_standard((double)n,x,12);
- else
- /* d = zero/(x-x); */
- return __kernel_standard((double)n,x,13);
- }
- if(x>X_TLOSS) {
- return __kernel_standard((double)n,x,39); /* yn(x>X_TLOSS,n) */
- } else
- return z;
-#endif
-}
diff --git a/lib/msun/src/w_ynf.c b/lib/msun/src/w_ynf.c
deleted file mode 100644
index 0597b92..0000000
--- a/lib/msun/src/w_ynf.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* w_ynf.c -- float version of w_yn.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#ifndef lint
-static char rcsid[] = "$Id$";
-#endif
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
- float ynf(int n, float x) /* wrapper ynf */
-#else
- float ynf(n,x) /* wrapper ynf */
- float x; int n;
-#endif
-{
-#ifdef _IEEE_LIBM
- return __ieee754_ynf(n,x);
-#else
- float z;
- z = __ieee754_ynf(n,x);
- if(_LIB_VERSION == _IEEE_ || isnanf(x) ) return z;
- if(x <= (float)0.0){
- if(x==(float)0.0)
- /* d= -one/(x-x); */
- return (float)__kernel_standard((double)n,(double)x,112);
- else
- /* d = zero/(x-x); */
- return (float)__kernel_standard((double)n,(double)x,113);
- }
- if(x>(float)X_TLOSS) {
- /* yn(x>X_TLOSS,n) */
- return (float)__kernel_standard((double)n,(double)x,139);
- } else
- return z;
-#endif
-}
diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile
deleted file mode 100644
index b62856a..0000000
--- a/lib/ncurses/ncurses/Makefile
+++ /dev/null
@@ -1,209 +0,0 @@
-# Makefile for ncurses
-# $Id: Makefile,v 1.23 1997/08/25 07:41:13 ache Exp $
-
-LIB= ncurses
-SHLIB_MAJOR= 3
-SHLIB_MINOR= 1
-SRCS= lib_kernel.c lib_pad.c lib_bkgd.c \
- lib_unctrl.c lib_raw.c lib_vidattr.c lib_trace.c lib_beep.c \
- lib_doupdate.c lib_refresh.c lib_initscr.c lib_newwin.c lib_addch.c \
- lib_addstr.c lib_scroll.c lib_clreol.c lib_touch.c lib_mvcur.c lib_keyname.c\
- lib_delwin.c lib_endwin.c lib_clrbot.c lib_move.c lib_printw.c \
- lib_scanw.c lib_erase.c lib_getch.c lib_options.c lib_acs.c lib_slk.c\
- lib_box.c lib_clear.c lib_delch.c lib_insch.c lib_instr.c \
- lib_getstr.c lib_mvwin.c lib_longname.c lib_tstp.c \
- lib_newterm.c lib_set_term.c lib_overlay.c lib_scrreg.c lib_color.c \
- lib_insstr.c lib_insdel.c lib_twait.c lib_window.c copyright.c
-
-CFLAGS+= -I. -I${.CURDIR} -Wall -DMYTINFO #-DTRACE
-DPADD= ${LIBMYTINFO}
-LDADD= -lmytinfo
-
-CLEANFILES+= lib_keyname.c keys.tries
-
-beforedepend: keys.tries
-
-beforeinstall:
- ${INSTALL} -C -m 444 -o $(BINOWN) -g $(BINGRP) ${.CURDIR}/unctrl.h \
- ${DESTDIR}/usr/include
- ${INSTALL} -C -m 444 -o $(BINOWN) -g $(BINGRP) ${.CURDIR}/curses.h \
- ${DESTDIR}/usr/include/ncurses.h
-
-keys.tries: ${.CURDIR}/keys.list ${.CURDIR}/MKkeys.awk
- awk -f ${.CURDIR}/MKkeys.awk ${.CURDIR}/keys.list > keys.tries
-
-# in case you don't run make depend
-lib_options.o lib_options.so lib_options.po: keys.tries
-
-lib_keyname.c: ${.CURDIR}/keys.list ${.CURDIR}/MKkeyname.awk
- awk -f ${.CURDIR}/MKkeyname.awk ${.CURDIR}/keys.list > lib_keyname.c
-
-MAN3 = curs_addch.3 \
- curs_addchst.3 \
- curs_addstr.3 \
- curs_attr.3 \
- curs_beep.3 \
- curs_bkgd.3 \
- curs_border.3 \
- curs_clear.3 \
- curs_color.3 \
- curs_delch.3 \
- curs_delln.3 \
- curs_getch.3 \
- curs_getstr.3 \
- curs_getyx.3 \
- curs_inch.3 \
- curs_inchstr.3 \
- curs_initscr.3 \
- curs_inopts.3 \
- curs_insch.3 \
- curs_insstr.3 \
- curs_instr.3 \
- curs_kernel.3 \
- curs_move.3 \
- curs_outopts.3 \
- curs_overlay.3 \
- curs_pad.3 \
- curs_printw.3 \
- curs_refresh.3 \
- curs_scanw.3 \
- curs_scr_dmp.3 \
- curs_scroll.3 \
- curs_slk.3 \
- curs_termatt.3 \
- curs_termin.3 \
- curs_touch.3 \
- curs_util.3 \
- curs_window.3 \
- ncurses.3
-
-MAN5 = term.5
-
-MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 echochar.3 \
- curs_addch.3 wechochar.3 curs_addch.3 mvaddch.3 \
- curs_addch.3 mvwaddch.3
-MLINKS+=curs_addchst.3 addchstr.3 curs_addchst.3 addchnstr.3 \
- curs_addchst.3 waddchstr.3 curs_addchst.3 waddchnstr.3 \
- curs_addchst.3 mvaddchstr.3 curs_addchst.3 mvaddchnstr.3 \
- curs_addchst.3 mvwaddchstr.3 curs_addchst.3 mvwaddchnstr.3
-MLINKS+=curs_addstr.3 addstr.3 curs_addstr.3 addnstr.3 \
- curs_addstr.3 waddstr.3 curs_addstr.3 waddnstr.3 \
- curs_addstr.3 mvaddstr.3 curs_addstr.3 mvaddnstr.3 \
- curs_addstr.3 mvwaddstr.3 curs_addstr.3 mvwaddnstr.3
-MLINKS+=curs_attr.3 attroff.3 curs_attr.3 wattroff.3 \
- curs_attr.3 attron.3 curs_attr.3 wattron.3 \
- curs_attr.3 attrset.3 curs_attr.3 wattrset.3 \
- curs_attr.3 standend.3 curs_attr.3 wstandend.3 \
- curs_attr.3 standout.3 curs_attr.3 wstandout.3
-MLINKS+=curs_beep.3 beep.3 curs_beep.3 flash.3
-MLINKS+=curs_bkgd.3 bkgdset.3 curs_bkgd.3 wbkgdset.3 \
- curs_bkgd.3 bkgd.3 curs_bkgd.3 wbkgd.3
-MLINKS+=curs_border.3 border.3 curs_border.3 wborder.3 curs_border.3 box.3 \
- curs_border.3 hline.3 curs_border.3 whline.3 \
- curs_border.3 vline.3 curs_border.3 wvline.3
-MLINKS+=curs_clear.3 erase.3 curs_clear.3 werase.3 curs_clear.3 clear.3 \
- curs_clear.3 wclear.3 curs_clear.3 clrtobot.3 \
- curs_clear.3 wclrtobot.3 curs_clear.3 clrtoeol.3 \
- curs_clear.3 wclrtoeol.3
-MLINKS+=curs_color.3 start_color.3 curs_color.3 init_pair.3 \
- curs_color.3 init_color.3 curs_color.3 has_colors.3 \
- curs_color.3 can_change_color.3 curs_color.3 color_content.3 \
- curs_color.3 pair_content.3
-MLINKS+=curs_delch.3 delch.3 curs_delch.3 wdelch.3 curs_delch.3 mvdelch.3 \
- curs_delch.3 mvwdelch.3
-MLINKS+=curs_delln.3 deleteln.3 curs_delln.3 wdeleteln.3 \
- curs_delln.3 insdelln.3 curs_delln.3 winsdelln.3 \
- curs_delln.3 insertln.3 curs_delln.3 winsertln.3
-MLINKS+=curs_getch.3 getch.3 curs_getch.3 wgetch.3 curs_getch.3 mvgetch.3 \
- curs_getch.3 mvwgetch.3 curs_getch.3 ungetch.3
-MLINKS+=curs_getstr.3 getstr.3 curs_getstr.3 wgetstr.3 \
- curs_getstr.3 mvgetstr.3 curs_getstr.3 mvwgetstr.3 \
- curs_getstr.3 wgetnstr.3
-MLINKS+=curs_getyx.3 getyx.3 curs_getyx.3 pgetparyx.3 curs_getyx.3 getbegyx.3 \
- curs_getyx.3 getmaxyx.3
-MLINKS+=curs_inch.3 inch.3 curs_inch.3 winch.3 curs_inch.3 mvinch.3 \
- curs_inch.3 mvwinch.3
-MLINKS+=curs_inchstr.3 inchstr.3 curs_inchstr.3 inchnstr.3 \
- curs_inchstr.3 winchstr.3 curs_inchstr.3 winchnstr.3 \
- curs_inchstr.3 mvinchstr.3 curs_inchstr.3 mvinchnstr.3 \
- curs_inchstr.3 mvwinchstr.3 curs_inchstr.3 mvwinchnstr.3
-MLINKS+=curs_initscr.3 initscr.3 curs_initscr.3 newterm.3 \
- curs_initscr.3 endwin.3 curs_initscr.3 isendwin.3 \
- curs_initscr.3 set_term.3 curs_initscr.3 delscreen.3
-MLINKS+=curs_inopts.3 cbreak.3 curs_inopts.3 nocbreak.3 curs_inopts.3 echo.3 \
- curs_inopts.3 noecho.3 curs_inopts.3 halfdelay.3 \
- curs_inopts.3 intrflush.3 curs_inopts.3 keypad.3 curs_inopts.3 meta.3 \
- curs_inopts.3 nodelay.3 curs_inopts.3 notimeout.3 curs_inopts.3 raw.3 \
- curs_inopts.3 noraw.3 curs_inopts.3 noqiflush.3 \
- curs_inopts.3 qiflush.3 curs_inopts.3 timeout.3 \
- curs_inopts.3 wtimeout.3 curs_inopts.3 typeahead.3
-MLINKS+=curs_insch.3 insch.3 curs_insch.3 winsch.3 curs_insch.3 mvinsch.3 \
- curs_insch.3 mvwinsch.3
-MLINKS+=curs_insstr.3 insstr.3 curs_insstr.3 insnstr.3 \
- curs_insstr.3 winsstr.3 curs_insstr.3 winsnstr.3 \
- curs_insstr.3 mvinsstr.3 curs_insstr.3 mvinsnstr.3 \
- curs_insstr.3 mvwinsstr.3 curs_insstr.3 mvwinsnstr.3
-MLINKS+=curs_instr.3 instr.3 curs_instr.3 innstr.3 curs_instr.3 winstr.3 \
- curs_instr.3 winnstr.3 curs_instr.3 mvinstr.3 curs_instr.3 mvinnstr.3 \
- curs_instr.3 mvwinstr.3 curs_instr.3 mvwinnstr.3
-MLINKS+=curs_kernel.3 def_prog_mode.3 curs_kernel.3 def_shell_mode.3 \
- curs_kernel.3 reset_prog_mode.3 curs_kernel.3 reset_shell_mode.3 \
- curs_kernel.3 resetty.3 curs_kernel.3 savetty.3 \
- curs_kernel.3 getsyx.3 curs_kernel.3 setsyx.3 \
- curs_kernel.3 ripoffline.3 curs_kernel.3 curs_set.3 \
- curs_kernel.3 napms.3
-MLINKS+=curs_move.3 move.3 curs_move.3 wmove.3
-MLINKS+=curs_outopts.3 clearok.3 curs_outopts.3 idlok.3 \
- curs_outopts.3 idcok.3 curs_outopts.3 immedok.3 \
- curs_outopts.3 leaveok.3 curs_outopts.3 setscrreg.3 \
- curs_outopts.3 wsetscrreg.3 curs_outopts.3 scrollok.3 \
- curs_outopts.3 nl.3 curs_outopts.3 nonl.3
-MLINKS+=curs_overlay.3 overlay.3 curs_overlay.3 overwrite.3 \
- curs_overlay.3 copywin.3
-MLINKS+=curs_pad.3 newpad.3 curs_pad.3 subpad.3 curs_pad.3 prefresh.3 \
- curs_pad.3 pnoutrefresh.3 curs_pad.3 pechochar.3
-MLINKS+=curs_printw.3 printw.3 curs_printw.3 wprintw.3 \
- curs_printw.3 mvprintw.3 curs_printw.3 mvwprintw.3 \
- curs_printw.3 vwprintw.3
-MLINKS+=curs_refresh.3 refresh.3 curs_refresh.3 wrefresh.3 \
- curs_refresh.3 wnoutrefresh.3 curs_refresh.3 doupdate.3 \
- curs_refresh.3 redrawwin.3 curs_refresh.3 wredrawln.3
-MLINKS+=curs_scanw.3 scanw.3 curs_scanw.3 wscanw.3 curs_scanw.3 mvscanw.3 \
- curs_scanw.3 mvwscanw.3 curs_scanw.3 vwscanw.3
-MLINKS+=curs_scr_dmp.3 scr_dump.3 curs_scr_dmp.3 scr_restore.3 \
- curs_scr_dmp.3 scr_init.3 curs_scr_dmp.3 scr_set.3
-MLINKS+=curs_scroll.3 scroll.3 curs_scroll.3 scrl.3 curs_scroll.3 wscrl.3
-MLINKS+=curs_slk.3 slk_init.3 curs_slk.3 slk_set.3 curs_slk.3 slk_refresh.3 \
- curs_slk.3 slk_noutrefresh.3 curs_slk.3 slk_label.3 \
- curs_slk.3 slk_clear.3 curs_slk.3 slk_restore.3 \
- curs_slk.3 slk_touch.3 curs_slk.3 slk_attron.3 \
- curs_slk.3 slk_attrset.3 curs_slk.3 slk_attroff.3
-MLINKS+=curs_termatt.3 baudrate.3 curs_termatt.3 erasechar.3 \
- curs_termatt.3 has_ic.3 curs_termatt.3 has_il.3 \
- curs_termatt.3 killchar.3 curs_termatt.3 longname.3 \
- curs_termatt.3 termattrs.3 curs_termatt.3 termname.3
-
-# XXX name clash with termcap(3)
-# MLINKS+= curs_termin.3 tparm.3
-MLINKS+=curs_termin.3 setupterm.3 curs_termin.3 setterm.3 \
- curs_termin.3 set_curterm.3 curs_termin.3 del_curterm.3 \
- curs_termin.3 restartterm.3 \
- curs_termin.3 putp.3 curs_termin.3 vidputs.3 \
- curs_termin.3 vidattr.3 curs_termin.3 mvcur.3 \
- curs_termin.3 tigetflag.3 curs_termin.3 tigetnum.3 \
- curs_termin.3 tigetstr.3
-MLINKS+=curs_touch.3 touchwin.3 curs_touch.3 touchline.3 \
- curs_touch.3 untouchwin.3 curs_touch.3 wtouchln.3 \
- curs_touch.3 is_linetouched.3 curs_touch.3 is_wintouched.3
-MLINKS+=curs_util.3 unctrl.3 curs_util.3 keyname.3 \
- curs_util.3 filter.3 curs_util.3 use_env.3 \
- curs_util.3 putwin.3 curs_util.3 getwin.3 \
- curs_util.3 delay_output.3 curs_util.3 flushinp.3
-MLINKS+=curs_window.3 newwin.3 curs_window.3 delwin.3 \
- curs_window.3 mvwin.3 curs_window.3 subwin.3 \
- curs_window.3 derwin.3 curs_window.3 mvderwin.3 \
- curs_window.3 dupwin.3 curs_window.3 wsyncup.3 \
- curs_window.3 syncok.3 curs_window.3 wcursyncup.3 \
- curs_window.3 wsyncdown.3
-
-.include <bsd.lib.mk>
OpenPOWER on IntegriCloud